@aurodesignsystem-dev/auro-formkit 0.0.0-pr1422.2 → 0.0.0-pr1424.0

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +183 -133
  3. package/components/checkbox/demo/api.min.js +1 -1
  4. package/components/checkbox/demo/index.min.js +1 -1
  5. package/components/checkbox/dist/index.js +1 -1
  6. package/components/checkbox/dist/registered.js +1 -1
  7. package/components/combobox/demo/api.min.js +165 -276
  8. package/components/combobox/demo/index.min.js +165 -276
  9. package/components/combobox/dist/index.js +165 -276
  10. package/components/combobox/dist/registered.js +165 -276
  11. package/components/counter/demo/api.min.js +164 -275
  12. package/components/counter/demo/index.min.js +164 -275
  13. package/components/counter/dist/index.js +164 -275
  14. package/components/counter/dist/registered.js +164 -275
  15. package/components/datepicker/demo/api.min.js +165 -276
  16. package/components/datepicker/demo/index.min.js +165 -276
  17. package/components/datepicker/dist/index.js +165 -276
  18. package/components/datepicker/dist/registered.js +165 -276
  19. package/components/dropdown/demo/api.min.js +164 -275
  20. package/components/dropdown/demo/index.min.js +164 -275
  21. package/components/dropdown/dist/index.js +164 -275
  22. package/components/dropdown/dist/registered.js +164 -275
  23. package/components/form/demo/api.md +460 -76
  24. package/components/form/demo/api.min.js +661 -1105
  25. package/components/form/demo/index.min.js +661 -1105
  26. package/components/input/demo/api.min.js +1 -1
  27. package/components/input/demo/index.min.js +1 -1
  28. package/components/input/dist/index.js +1 -1
  29. package/components/input/dist/registered.js +1 -1
  30. package/components/radio/demo/api.min.js +1 -1
  31. package/components/radio/demo/index.min.js +1 -1
  32. package/components/radio/dist/index.js +1 -1
  33. package/components/radio/dist/registered.js +1 -1
  34. package/components/select/demo/api.min.js +164 -275
  35. package/components/select/demo/index.min.js +164 -275
  36. package/components/select/dist/index.js +164 -275
  37. package/components/select/dist/registered.js +164 -275
  38. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
- # Changelog
1
+ ### Changelog
2
2
 
3
- You can view a complete history of changes to this repository on the GitHub releases page:
3
+ You can view a history of changes to this repository on the releases page:
4
4
 
5
5
  https://github.com/AlaskaAirlines/auro-formkit/releases
package/README.md CHANGED
@@ -3,25 +3,21 @@ The README.md file is a compiled document. No edits should be made directly to t
3
3
 
4
4
  README.md is created by running `npm run build:docs:kit`.
5
5
 
6
- This file is generated based on the template at
7
- `./docs/templates/kitReadmeTemplate.md`
8
- and compiled to `./README.md` each time the docs are compiled.
9
-
10
6
  The following sections are editable by making changes to the following files:
11
7
 
12
8
  | SECTION | DESCRIPTION | FILE LOCATION |
13
9
  |------------------------|---------------------------------------------------|-------------------------------------|
14
- | Description | Description of the kit | `./docs/partials/description.md` |
15
- | Use Cases | Examples for when to use this kit | `./docs/partials/useCases.md` |
16
- | Additional Information | For use to add any kit specific information | `./docs/partials/readmeAddlInfo.md` |
17
- | kit Example Code | HTML sample code of the kits use | `./apiExamples/basic.html` |
18
- -->
19
-
20
- # Formkit
10
+ | Description | Description of the component | `./docs/partials/description.md` |
11
+ | Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
12
+ | Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
13
+ | Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
14
+ -->
15
+
16
+ # Auro Formkit
21
17
 
22
18
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
23
- <!-- The below content is automatically added from ./docs/partials/description.md -->
24
-
19
+ <!-- The below content is automatically added from ./docs/partials/description.md -->
20
+
25
21
  ## Description
26
22
 
27
23
  `auro-formkit` is a collection of web components that can be used to build forms.
@@ -42,73 +38,58 @@ It is a monorepo that contains the following components:
42
38
  - `auro-radio`
43
39
  - `auro-radio-group`
44
40
  - `auro-select`
45
- <!-- AURO-GENERATED-CONTENT:END -->
46
-
47
- ## Use Cases
48
-
49
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
50
- <!-- The below content is automatically added from ./docs/partials/useCases.md -->
51
-
52
- ### 1. User Accounts
53
- - Sign up and login forms
54
- - Email and password validation
55
-
56
- ### 2. Checkout & Payments
57
- - Collect shipping and billing info
58
- - Use autofill and validation to reduce errors
59
-
60
- ### 3. Booking & Scheduling
61
- - Select dates and times
62
- - Prevent invalid selections (like past dates)
63
-
64
- ### 4. Search & Filters
65
- - Search inputs with suggestions
66
- - Filters like price ranges or categories
67
-
68
- ### 5. File Uploads
69
- - Upload images, documents, or media
70
- - Restrict file types and allow multiple files
71
-
72
- ### 6. Feedback & Surveys
73
- - Collect ratings, choices, and comments
74
- - Require answers where needed
75
-
76
- ### 7. Calculators & Dynamic Forms
77
- - Show real-time results (e.g., pricing, totals)
78
-
79
- ### 8. Multi-Step Forms
80
- - Break long forms into smaller steps
81
-
82
- ### 9. Mobile-Friendly Input
83
- - Use input types that trigger the right keyboard
84
-
85
- ### 10. Accessible Forms
86
- - Proper labels and grouped inputs
87
- - Built-in error handling
88
-
89
- ### 11. Built-in Validation
90
- - Use HTML5 rules instead of custom JavaScript
91
- <!-- AURO-GENERATED-CONTENT:END -->
92
-
93
- ## Getting Started
41
+ <!-- AURO-GENERATED-CONTENT:END -->
42
+
43
+ ## Install
94
44
 
95
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/kitInstall.md) -->
96
- <!-- The below content is automatically added from ./docs/partials/kitInstall.md -->
45
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/usage/componentInstall_esm.md) -->
97
46
  [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-formkit/testPublish.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-formkit/actions/workflows/testPublish.yml)
98
47
  [![See it on NPM!](https://img.shields.io/npm/v/@aurodesignsystem/auro-formkit?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurodesignsystem/auro-formkit)
99
48
  [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-formkit?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
100
49
  ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
101
50
 
102
- #### NPM Installation
103
-
104
51
  ```shell
105
52
  $ npm i @aurodesignsystem/auro-formkit
106
53
  ```
107
- <!-- AURO-GENERATED-CONTENT:END -->
54
+
55
+ Installing as a direct, dev or peer dependency is up to the user installing the package. If you are unsure as to what type of dependency you should use, consider reading this [stack overflow](https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies) answer.
56
+
57
+ <!-- AURO-GENERATED-CONTENT:END -->
58
+
59
+ ## Getting Started
60
+
108
61
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/gettingStarted.md) -->
109
- <!-- The below content is automatically added from ./docs/partials/gettingStarted.md -->
110
-
111
- ### TypeScript Module Resolution
62
+ <!-- The below content is automatically added from ./docs/partials/gettingStarted.md -->
63
+ To start using the Auro Formkit components, follow the instructions below:
64
+
65
+ ### Usage
66
+
67
+ You can use Auro Formkit components in your project in two ways: automatic or custom registration.
68
+
69
+ #### Automatic Registration
70
+
71
+ For automatic registration, simply import the component:
72
+
73
+ ```javascript
74
+ import "@aurodesignsystem/auro-formkit/auro-checkbox";
75
+ ```
76
+
77
+ This will automatically register both the `<auro-checkbox>` and the included `<auro-checkbox-group>` component for use in your project. Note that not all Auro Formkit components have sub-components. Be sure to check the documentation for each component to understand its specific usage and registration requirements.
78
+
79
+ #### Custom Registration
80
+
81
+ If you prefer to register the component with a custom name, you can call the component class directly to create a custom registration:
82
+
83
+ ```javascript
84
+ import { AuroCheckbox, AuroCheckboxGroup } from "@aurodesignsystem/auro-formkit/auro-checkbox/class";
85
+
86
+ AuroCheckbox.register('custom-checkbox');
87
+ AuroCheckbox.register('custom-checkbox-group');
88
+ ```
89
+
90
+ This will register the component as `<custom-checkbox>` and `<custom-checkbox-group>`.
91
+
92
+ #### TypeScript Module Resolution
112
93
 
113
94
  When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
114
95
 
@@ -121,47 +102,111 @@ When using TypeScript set `moduleResolution` to `bundler`, add the following to
121
102
  ```
122
103
 
123
104
  This configuration enables proper module resolution for the component's TypeScript files.
124
- <!-- AURO-GENERATED-CONTENT:END -->
125
-
126
- ## Install from CDN
127
105
 
128
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/bundleInstallDescription.md) -->
129
- <!-- The below content is automatically added from ./docs/partials/bundleInstallDescription.md -->
130
- In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
106
+ ### Basic HTML Example
107
+
108
+ Here is an example of how to use the Auro Checkbox component in your HTML:
109
+
110
+ `index.html -> <head>`
111
+
112
+ ```html
113
+ <script type="module">
114
+ import "@aurodesignsystem/auro-formkit/auro-checkbox";
115
+ </script>
116
+ ```
131
117
 
132
- Each component is imported individually by its export path:
118
+ `index.html -> <body>`
133
119
 
134
120
  ```html
135
- <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-checkbox/+esm"></script>
136
- <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-input/+esm"></script>
137
- <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-select/+esm"></script>
138
- ```
139
- <!-- AURO-GENERATED-CONTENT:END -->
140
-
141
- ## Additional Information
121
+ <auro-checkbox-group>
122
+ <span slot="legend">
123
+ Form label goes here
124
+ </span>
125
+ <auro-checkbox value="value1" name="basic" id="checkbox-basic1">
126
+ Checkbox option
127
+ </auro-checkbox>
128
+ <auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>
129
+ Checkbox option two
130
+ </auro-checkbox>
131
+ </auro-checkbox-group>
132
+ ```
133
+
134
+ By following these steps, you can easily integrate Auro Formkit components into your project.
135
+ <!-- AURO-GENERATED-CONTENT:END -->
136
+
137
+ ### Design Token CSS Custom Property dependency
138
+
139
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
140
+ The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
141
+
142
+ <!-- AURO-GENERATED-CONTENT:END -->
143
+
144
+ ## Development
145
+
146
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/developmentDescription.md) -->
147
+ <!-- The below content is automatically added from ./docs/partials/developmentDescription.md -->
148
+
149
+ ### Filtering
150
+
151
+ Running the `dev` command will open a `localhost` development server for all components in the monorepo at once.
152
+
153
+ To only develop a single component, use the `--filter` flag:
154
+
155
+ ```shell
156
+ npx turbo dev --filter=@aurodesignsystem/auro-input
157
+ ```
158
+ <!-- AURO-GENERATED-CONTENT:END -->
159
+
160
+ ### Start development environment
161
+
162
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/localhost.md) -->
163
+ <!-- The below content is automatically added from ./docs/partials/localhost.md -->
164
+
165
+ ## Local Development
166
+ <!-- AURO-GENERATED-CONTENT:END -->
167
+
168
+ ### Testing
169
+
170
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/testing.md) -->
171
+ <!-- The below content is automatically added from ./docs/partials/testing.md -->
172
+ ```
173
+ npm run test
174
+ ```
175
+
176
+ #### Port configuration
142
177
 
178
+ Turbo will attempt to test components in parallel which will lead to port conflicts.
179
+
180
+ Setting the `concurrency` to `1` will prevent Turbo from running tests in parallel:
181
+
182
+ ```
183
+ "test": "turbo run test --concurrency=1",
184
+ ```
185
+
186
+ `turbo.json`does not support `--concurrency` yet. See [this issue](https://github.com/vercel/turborepo/discussions/7493).
187
+ <!-- AURO-GENERATED-CONTENT:END -->
143
188
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
144
- <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
145
-
146
- ### Turborepo Overview
147
-
148
- This monorepo is managed using [Turborepo](https://turborepo.org/).
149
-
150
- ### Managing dependencies
151
-
189
+ <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
190
+
191
+ ## Turborepo Overview
192
+
193
+ This monorepo is managed using [Turborepo](https://turborepo.org/).
194
+
195
+ ### Managing dependencies
196
+
152
197
  #### Best practices for dependency installation
153
198
 
154
199
  When you install a dependency in a component or package in `auro-formkit`, you should install it directly in the package that uses it.
155
200
 
156
- The package's `package.json` will have every dependency that it needs. This is true for both external and internal dependencies.
157
-
158
- ### Types of Dependencies by Source
159
-
201
+ The package's `package.json` will have every dependency that it needs. This is true for both external and internal dependencies.
202
+
203
+ ### Types of Dependencies by Source
204
+
160
205
  #### External Dependencies
161
206
  - These are packages fetched from the `npm` registry (e.g., Lit, Rollup, Sass)
162
207
  - Declared in `package.json` using exact versions or version ranges
163
- - Installed in `node_modules` during `npm install` or `yarn install`
164
-
208
+ - Installed in `node_modules` during `npm install` or `yarn install`
209
+
165
210
  #### Internal Dependencies
166
211
  - These are packages from within the `auro-formkit` monorepo
167
212
  - Allow sharing code between different packages in your repository
@@ -169,19 +214,33 @@ The package's `package.json` will have every dependency that it needs. This is t
169
214
  - Must be declared in `package.json` just like external dependencies
170
215
  - Use workspace protocols (e.g., `"workspace:*"` or `"workspace:^1.0.0"`)
171
216
 
172
- ### Types of Dependencies by Purpose
173
-
217
+ ### Types of Dependencies by Purpose
218
+
174
219
  #### Dependencies (`dependencies`)
175
220
  - Required for the package to function in production
176
221
  - Example:
177
222
  ```json
178
223
  {
179
224
  "dependencies": {
180
- "lit": "^3.0.0"
225
+ "lit.js": "^3.0.0", // External dependency
226
+ "@aurodesignsystem/input": "workspace:*" // Internal dependency
227
+ }
228
+ }
229
+ ```
230
+
231
+ #### Peer Dependencies (`peerDependencies`)
232
+ - Packages that your library expects the consuming application to provide
233
+ - Common for plugins or UI component libraries
234
+ - Example:
235
+ ```json
236
+ {
237
+ "peerDependencies": {
238
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
239
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
181
240
  }
182
241
  }
183
- ```
184
-
242
+ ```
243
+
185
244
  ### Development Dependencies (`devDependencies`)
186
245
  - Only needed during development, testing, or building
187
246
  - Not included in the production bundle
@@ -189,30 +248,36 @@ The package's `package.json` will have every dependency that it needs. This is t
189
248
  ```json
190
249
  {
191
250
  "devDependencies": {
192
- "@aurodesignsystem/auro-dropdown": "*",
193
- "@aurodesignsystem/build-tools": "*",
194
- "rollup": "^4.24.4"
251
+ "typescript": "^5.0.0",
252
+ "@open-wc/testing": "^4.0.0" // Internal dev dependency
195
253
  }
196
254
  }
197
- ```
198
-
199
- ### Example: Component Dependencies
255
+ ```
200
256
 
201
- Let's use `@aurodesignsystem/combobox` as an example to illustrate these concepts:
257
+ ## Example: Component Dependencies
258
+
259
+ Let's use `@auro-formki/combobox` as an example to illustrate these concepts:
202
260
 
203
261
  ```json
204
262
  {
205
263
  "name": "@aurodesignsystem/combobox",
206
264
  "dependencies": {
207
- "lit": "^3.2.1"
265
+ // Internal dependencies
266
+ "@aurodesignsystem/auro-dropdown": "*", // Required UI component
267
+ "@aurodesignsystem/auro-input": "*", // Required UI component
268
+
269
+ // External dependencies
270
+ "@alaskaairux/icons": "^5.3.0", // Required UI component
271
+ "lit": "^3.2.1" // Framework
272
+ },
273
+ "peerDependencies": {
274
+ "@aurodesignsystem/design-tokens": "^4.12.1",
275
+ "@aurodesignsystem/webcorestylesheets": "^5.1.2"
208
276
  },
209
277
  "devDependencies": {
210
- // Internal component dependencies
211
- "@aurodesignsystem/auro-dropdown": "*",
212
- "@aurodesignsystem/auro-input": "*",
213
278
  // Build utilities
214
279
  "rollup": "^4.24.4",
215
- "@aurodesignsystem/build-tools": "*"
280
+ "@aurodesignsystem/build-tools": "*",
216
281
  }
217
282
  }
218
283
  ```
@@ -221,6 +286,7 @@ This structure ensures that:
221
286
  1. The package explicitly declares all its dependencies
222
287
  2. Internal dependencies are properly tracked and versioned
223
288
  3. Development tools are separated from production dependencies
289
+ 4. Peer dependencies are clearly communicated to consumers
224
290
 
225
291
  - External dependencies come from the `npm` registry.
226
292
 
@@ -236,8 +302,8 @@ This practice has several benefits:
236
302
 
237
303
  - **Pruning unused dependencies:** When dependencies are installed in the packages that they are meant for, Turborepo can read your lockfile and remove dependencies that aren't used in the packages you need.
238
304
 
239
- For more information, see the [Turborepo docs](https://turbo.build/repo/docs/crafting-your-repository/managing-dependencies).
240
-
305
+ For more information, see the [Turborepo docs](https://turbo.build/repo/docs/crafting-your-repository/managing-dependencies).
306
+
241
307
  ### Root `package.json`
242
308
 
243
309
  The only dependencies that belong in the root `package.json` are **tools for managing the repository**.
@@ -245,20 +311,4 @@ The only dependencies that belong in the root `package.json` are **tools for man
245
311
  Some examples of dependencies that make sense to install in the root are `turbo`, `husky`, or `stylelint`.
246
312
 
247
313
  Conversely, dependencies Auro components rely on should be installed in their respective packages, such as `Lit`, `Rollup`, or other `auro-formkit` dependencies.
248
- <!-- AURO-GENERATED-CONTENT:END -->
249
-
250
- ## Formkit Development
251
-
252
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/developmentDescription.md) -->
253
- <!-- The below content is automatically added from ./docs/partials/developmentDescription.md -->
254
-
255
- ### Filtering
256
-
257
- Running the `dev` command will open a `localhost` development server for all components in the monorepo at once.
258
-
259
- To only develop a single component, use the `--filter` flag:
260
-
261
- ```shell
262
- npx turbo dev --filter=@aurodesignsystem/auro-input
263
- ```
264
314
  <!-- AURO-GENERATED-CONTENT:END -->
@@ -1687,7 +1687,7 @@ class AuroHelpText extends i$2 {
1687
1687
  }
1688
1688
  }
1689
1689
 
1690
- var formkitVersion = '202604071818';
1690
+ var formkitVersion = '202604072118';
1691
1691
 
1692
1692
  // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1693
1693
  // See LICENSE in the project root for license information.
@@ -1679,7 +1679,7 @@ class AuroHelpText extends i$2 {
1679
1679
  }
1680
1680
  }
1681
1681
 
1682
- var formkitVersion = '202604071818';
1682
+ var formkitVersion = '202604072118';
1683
1683
 
1684
1684
  // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1685
1685
  // See LICENSE in the project root for license information.
@@ -1632,7 +1632,7 @@ class AuroHelpText extends LitElement {
1632
1632
  }
1633
1633
  }
1634
1634
 
1635
- var formkitVersion = '202604071818';
1635
+ var formkitVersion = '202604072118';
1636
1636
 
1637
1637
  // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1638
1638
  // See LICENSE in the project root for license information.
@@ -1632,7 +1632,7 @@ class AuroHelpText extends LitElement {
1632
1632
  }
1633
1633
  }
1634
1634
 
1635
- var formkitVersion = '202604071818';
1635
+ var formkitVersion = '202604072118';
1636
1636
 
1637
1637
  // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1638
1638
  // See LICENSE in the project root for license information.