-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade to Stimulus 3.0 Also updates docs to use ESM and importmaps * Fix tests * Remove babel * Update dependencies * Use from CDN * Update tests for Jest 27
- Loading branch information
Showing
27 changed files
with
11,444 additions
and
12,262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,8 @@ | |
<head> | ||
<meta charset="UTF-8"> | ||
<title>Tailwind Stimulus Components</title> | ||
<link href="https://unpkg.com/[email protected]/dist/tailwind.min.css" rel="stylesheet"> | ||
<link href="https://unpkg.com/@tailwindcss/[email protected]/dist/forms.min.css" rel="stylesheet"> | ||
<script src="https://unpkg.com/stimulus/dist/stimulus.umd.js"></script> | ||
<script src="https://unpkg.com/tailwindcss-stimulus-components/dist/tailwindcss-stimulus-components.umd.js"></script> | ||
<!-- To use a local copy for testing, uncomment this | ||
<script src="../dist/tailwindcss-stimulus-components.umd.js"></script> | ||
--> | ||
<link href="https://unpkg.com/tailwindcss/dist/tailwind.min.css" rel="stylesheet"> | ||
<link href="https://unpkg.com/@tailwindcss/forms/dist/forms.min.css" rel="stylesheet"> | ||
<body> | ||
<div class="container mx-auto p-8" | ||
data-controller="slideover" | ||
|
@@ -289,9 +284,23 @@ <h2 class="text-2xl text-gray-800 font-semibold mb-4">Color Picker and Preview</ | |
</div> | ||
</div> | ||
|
||
<script> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"@hotwired/stimulus": "https://unpkg.com/@hotwired/stimulus/dist/stimulus.js", | ||
"tailwindcss-stimulus-components": "https://unpkg.com/tailwindcss-stimulus-components/dist/tailwindcss-stimulus-components.modern.js" | ||
// Uncomment to use local package with "npx serve" | ||
//"tailwindcss-stimulus-components": "../dist/tailwindcss-stimulus-components.modern.js" | ||
} | ||
} | ||
</script> | ||
|
||
<script type="module"> | ||
import { Application } from "@hotwired/stimulus" | ||
import TailwindcssStimulusComponents from "tailwindcss-stimulus-components" | ||
|
||
(() => { | ||
const application = Stimulus.Application.start(); | ||
const application = Application.start(); | ||
application.register('dropdown', TailwindcssStimulusComponents.Dropdown); | ||
application.register('modal', TailwindcssStimulusComponents.Modal); | ||
application.register('tabs', TailwindcssStimulusComponents.Tabs); | ||
|
Oops, something went wrong.