@aurodesignsystem/auro-formkit 5.9.0 → 5.9.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.
- package/CHANGELOG.md +13 -4
- package/README.md +4 -4
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +2 -2
- package/components/bibtemplate/dist/registered.js +2 -2
- package/components/checkbox/README.md +62 -62
- package/components/checkbox/demo/api.js +1 -1
- package/components/checkbox/demo/api.md +127 -84
- package/components/checkbox/demo/api.min.js +125 -42
- package/components/checkbox/demo/index.md +9 -281
- package/components/checkbox/demo/index.min.js +125 -42
- package/components/checkbox/demo/readme.html +3 -4
- package/components/checkbox/demo/readme.md +62 -62
- package/components/checkbox/dist/auro-checkbox-group.d.ts +7 -8
- package/components/checkbox/dist/auro-checkbox.d.ts +74 -20
- package/components/checkbox/dist/index.js +125 -42
- package/components/checkbox/dist/registered.js +125 -42
- package/components/combobox/README.md +76 -74
- package/components/combobox/demo/api.html +1 -0
- package/components/combobox/demo/api.js +11 -12
- package/components/combobox/demo/api.md +1302 -875
- package/components/combobox/demo/api.min.js +416 -492
- package/components/combobox/demo/index.html +1 -7
- package/components/combobox/demo/index.js +0 -19
- package/components/combobox/demo/index.md +43 -723
- package/components/combobox/demo/index.min.js +369 -302
- package/components/combobox/demo/readme.html +3 -4
- package/components/combobox/demo/readme.md +76 -74
- package/components/combobox/dist/auro-combobox.d.ts +42 -42
- package/components/combobox/dist/index.js +204 -210
- package/components/combobox/dist/registered.js +204 -210
- package/components/counter/README.md +81 -66
- package/components/counter/demo/api.html +1 -2
- package/components/counter/demo/api.js +2 -2
- package/components/counter/demo/api.md +777 -259
- package/components/counter/demo/api.min.js +119 -171
- package/components/counter/demo/index.html +0 -2
- package/components/counter/demo/index.md +20 -329
- package/components/counter/demo/index.min.js +117 -152
- package/components/counter/demo/readme.html +3 -4
- package/components/counter/demo/readme.md +81 -66
- package/components/counter/dist/auro-counter-group.d.ts +21 -36
- package/components/counter/dist/auro-counter-wrapper.d.ts +1 -6
- package/components/counter/dist/auro-counter.d.ts +5 -8
- package/components/counter/dist/index.js +117 -152
- package/components/counter/dist/registered.js +117 -152
- package/components/datepicker/README.md +57 -61
- package/components/datepicker/demo/api.js +8 -8
- package/components/datepicker/demo/api.md +720 -561
- package/components/datepicker/demo/api.min.js +678 -2769
- package/components/datepicker/demo/index.md +65 -117
- package/components/datepicker/demo/index.min.js +678 -2769
- package/components/datepicker/demo/readme.html +3 -4
- package/components/datepicker/demo/readme.md +57 -61
- package/components/datepicker/dist/auro-calendar.d.ts +60 -34
- package/components/datepicker/dist/auro-datepicker.d.ts +32 -32
- package/components/datepicker/dist/iconVersion.d.ts +1 -1
- package/components/datepicker/dist/index.js +505 -2596
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +505 -2596
- package/components/dropdown/README.md +78 -62
- package/components/dropdown/demo/api.js +4 -4
- package/components/dropdown/demo/api.md +520 -478
- package/components/dropdown/demo/api.min.js +80 -95
- package/components/dropdown/demo/index.md +65 -119
- package/components/dropdown/demo/index.min.js +70 -85
- package/components/dropdown/demo/readme.html +3 -4
- package/components/dropdown/demo/readme.md +78 -62
- package/components/dropdown/dist/auro-dropdown.d.ts +42 -33
- package/components/dropdown/dist/iconVersion.d.ts +1 -1
- package/components/dropdown/dist/index.js +70 -85
- package/components/dropdown/dist/registered.js +70 -85
- package/components/form/README.md +16 -58
- package/components/form/demo/api.md +16 -21
- package/components/form/demo/api.min.js +13 -8
- package/components/form/demo/index.md +38 -39
- package/components/form/demo/index.min.js +13 -8
- package/components/form/demo/readme.md +16 -58
- package/components/form/demo/working.html +1 -1
- package/components/form/dist/auro-form.d.ts +15 -3
- package/components/form/dist/index.js +13 -8
- package/components/form/dist/registered.js +13 -8
- package/components/input/README.md +55 -60
- package/components/input/demo/api.js +3 -5
- package/components/input/demo/api.md +558 -537
- package/components/input/demo/api.min.js +102 -115
- package/components/input/demo/index.js +0 -1
- package/components/input/demo/index.md +90 -203
- package/components/input/demo/index.min.js +87 -99
- package/components/input/demo/readme.html +3 -4
- package/components/input/demo/readme.md +55 -60
- package/components/input/dist/auro-input.d.ts +6 -5
- package/components/input/dist/base-input.d.ts +68 -69
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +87 -82
- package/components/input/dist/registered.js +87 -82
- package/components/menu/README.md +61 -61
- package/components/menu/demo/api.js +6 -8
- package/components/menu/demo/api.md +520 -577
- package/components/menu/demo/api.min.js +199 -97
- package/components/menu/demo/index.js +0 -5
- package/components/menu/demo/index.md +36 -119
- package/components/menu/demo/index.min.js +164 -101
- package/components/menu/demo/readme.html +3 -4
- package/components/menu/demo/readme.md +61 -61
- package/components/menu/dist/auro-menu.context.d.ts +5 -0
- package/components/menu/dist/auro-menu.d.ts +75 -37
- package/components/menu/dist/auro-menuoption.d.ts +38 -13
- package/components/menu/dist/index.js +164 -50
- package/components/menu/dist/registered.js +164 -50
- package/components/radio/README.md +61 -57
- package/components/radio/demo/api.js +2 -2
- package/components/radio/demo/api.md +241 -170
- package/components/radio/demo/api.min.js +154 -77
- package/components/radio/demo/index.md +22 -99
- package/components/radio/demo/index.min.js +145 -68
- package/components/radio/demo/readme.html +3 -4
- package/components/radio/demo/readme.md +61 -57
- package/components/radio/dist/auro-radio-group.d.ts +67 -35
- package/components/radio/dist/auro-radio.d.ts +56 -33
- package/components/radio/dist/index.js +145 -68
- package/components/radio/dist/registered.js +145 -68
- package/components/select/README.md +68 -65
- package/components/select/demo/api.html +1 -0
- package/components/select/demo/api.js +7 -7
- package/components/select/demo/api.md +1305 -625
- package/components/select/demo/api.min.js +357 -262
- package/components/select/demo/index.html +0 -2
- package/components/select/demo/index.md +25 -833
- package/components/select/demo/index.min.js +356 -230
- package/components/select/demo/readme.html +3 -4
- package/components/select/demo/readme.md +68 -65
- package/components/select/dist/auro-select.d.ts +99 -90
- package/components/select/dist/index.js +192 -180
- package/components/select/dist/registered.js +192 -180
- package/package.json +9 -4
|
@@ -18,6 +18,7 @@ The following sections are editable by making changes to the following files:
|
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
20
|
# Datepicker
|
|
21
|
+
|
|
21
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
22
23
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
23
24
|
The `<auro-datepicker>` element allows users to select a date, or a pair of dates identifying a range, either with text input or by making a section in a calendar. The `<auro-datepicker>` element is the combination of [auro-dropdown](http://auro.alaskaair.com/components/auro/dropdown), [auro-input](http://auro.alaskaair.com/components/auro/input), and Auro's extension of [wc-range-datepicker](https://www.npmjs.com/package/wc-range-datepicker).
|
|
@@ -27,7 +28,18 @@ The `<auro-datepicker>` element allows users to select a date, or a pair of date
|
|
|
27
28
|
<!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
|
|
28
29
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
29
30
|
|
|
31
|
+
## Datepicker Use Cases
|
|
32
|
+
|
|
33
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
34
|
+
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
35
|
+
The `<auro-datepicker>` element should be used in situations where users may:
|
|
36
|
+
|
|
37
|
+
* select a single date
|
|
38
|
+
* select a pair of dates which identify a calendar range
|
|
39
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
|
+
|
|
30
41
|
## Getting Started
|
|
42
|
+
|
|
31
43
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
32
44
|
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
33
45
|
|
|
@@ -40,30 +52,7 @@ $ npm i @aurodesignsystem/auro-formkit
|
|
|
40
52
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
41
53
|
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
42
54
|
|
|
43
|
-
###
|
|
44
|
-
|
|
45
|
-
#### Automatic Registration
|
|
46
|
-
|
|
47
|
-
For automatic registration, simply import the component:
|
|
48
|
-
|
|
49
|
-
```javascript
|
|
50
|
-
// Registers <auro-datepicker> automatically
|
|
51
|
-
import '@aurodesignsystem/auro-formkit/auro-datepicker';
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
#### Custom Registration
|
|
55
|
-
|
|
56
|
-
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our static `AuroDatepicker.register('custom-datepicker')` method on the component class and pass in a unique name.
|
|
57
|
-
|
|
58
|
-
```javascript
|
|
59
|
-
// Import the class only
|
|
60
|
-
import { AuroDatepicker } from '@aurodesignsystem/auro-formkit/auro-datepicker/class';
|
|
61
|
-
|
|
62
|
-
// Register with a custom name if desired
|
|
63
|
-
AuroDatepicker.register('custom-datepicker');
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
#### TypeScript Module Resolution
|
|
55
|
+
### TypeScript Module Resolution
|
|
67
56
|
|
|
68
57
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
69
58
|
|
|
@@ -76,30 +65,10 @@ When using TypeScript set `moduleResolution` to `bundler`, add the following to
|
|
|
76
65
|
```
|
|
77
66
|
|
|
78
67
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
79
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
|
-
**Reference component in HTML**
|
|
81
|
-
|
|
82
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
83
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
84
|
-
|
|
85
|
-
```html
|
|
86
|
-
<auro-datepicker required="">
|
|
87
|
-
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
88
|
-
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
89
|
-
<span slot="fromLabel">Choose a date</span>
|
|
90
|
-
<span slot="bib.fullscreen.dateLabel">Choose a date</span>
|
|
91
|
-
</auro-datepicker>
|
|
92
|
-
```
|
|
93
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
94
|
-
|
|
95
|
-
### Design Token CSS Custom Property dependency
|
|
96
|
-
|
|
97
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
|
|
98
|
-
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
99
|
-
|
|
100
68
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
101
69
|
|
|
102
70
|
## Install from CDN
|
|
71
|
+
|
|
103
72
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
104
73
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
105
74
|
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.
|
|
@@ -109,22 +78,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
109
78
|
```
|
|
110
79
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
111
80
|
|
|
112
|
-
##
|
|
113
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
114
|
-
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
115
|
-
|
|
116
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
117
|
-
|
|
118
|
-
## auro-datepicker use cases
|
|
119
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
120
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
121
|
-
The `<auro-datepicker>` element should be used in situations where users may:
|
|
122
|
-
|
|
123
|
-
* select a single date
|
|
124
|
-
* select a pair of dates which identify a calendar range
|
|
125
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
126
|
-
|
|
127
|
-
## Formkit development
|
|
81
|
+
## Formkit Development
|
|
128
82
|
|
|
129
83
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
130
84
|
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
@@ -138,4 +92,46 @@ To only develop a single component, use the `--filter` flag:
|
|
|
138
92
|
```shell
|
|
139
93
|
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
140
94
|
```
|
|
95
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
96
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
97
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
98
|
+
|
|
99
|
+
## Custom Component Registration for Version Management
|
|
100
|
+
|
|
101
|
+
There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition. The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
102
|
+
|
|
103
|
+
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
104
|
+
|
|
105
|
+
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
|
|
106
|
+
|
|
107
|
+
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
// Import the class only
|
|
111
|
+
import { AuroDatepicker } from '@aurodesignsystem/auro-formkit/auro-datepicker/class';
|
|
112
|
+
|
|
113
|
+
// Register with a custom name if desired
|
|
114
|
+
AuroDatepicker.register('custom-datepicker');
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
This will create a new custom element `<custom-datepicker>` that behaves exactly like `<auro-datepicker>`, allowing both to coexist on the same page without interfering with each other.
|
|
118
|
+
|
|
119
|
+
<div class="exampleWrapper exampleWrapper--flex">
|
|
120
|
+
<custom-datepicker>
|
|
121
|
+
<span slot="bib.fullscreen.headline">custom-datepicker Example</span>
|
|
122
|
+
<span slot="fromLabel">Choose a date</span>
|
|
123
|
+
<span slot="bib.fullscreen.dateLabel">Choose a date</span>
|
|
124
|
+
</custom-datepicker>
|
|
125
|
+
</div>
|
|
126
|
+
<auro-accordion alignRight>
|
|
127
|
+
<span slot="trigger">See code</span>
|
|
128
|
+
|
|
129
|
+
```html
|
|
130
|
+
<custom-datepicker>
|
|
131
|
+
<span slot="bib.fullscreen.headline">custom-datepicker Example</span>
|
|
132
|
+
<span slot="fromLabel">Choose a date</span>
|
|
133
|
+
<span slot="bib.fullscreen.dateLabel">Choose a date</span>
|
|
134
|
+
</custom-datepicker>
|
|
135
|
+
```
|
|
136
|
+
</auro-accordion>
|
|
141
137
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { alertValueExample } from './../apiExamples/
|
|
1
|
+
import { alertValueExample } from './../apiExamples/alert-value';
|
|
2
2
|
import { errorExample } from './../apiExamples/error';
|
|
3
|
-
import { focusExample } from './../apiExamples/focus
|
|
4
|
-
import { populateSlotContentExample } from './../apiExamples/
|
|
5
|
-
import { updateMaxDateExample } from './../apiExamples/
|
|
6
|
-
import { updateMinDateExample } from './../apiExamples/
|
|
3
|
+
import { focusExample } from './../apiExamples/focus';
|
|
4
|
+
import { populateSlotContentExample } from './../apiExamples/dynamic-slot';
|
|
5
|
+
import { updateMaxDateExample } from './../apiExamples/update-max-date';
|
|
6
|
+
import { updateMinDateExample } from './../apiExamples/update-min-date';
|
|
7
7
|
import { validityExample } from './../apiExamples/validity';
|
|
8
|
-
import { inDialogExample } from '../apiExamples/
|
|
9
|
-
import { localizationExample } from '../apiExamples/localization
|
|
10
|
-
import { resetStateExample } from '../apiExamples/
|
|
8
|
+
import { inDialogExample } from '../apiExamples/in-dialog';
|
|
9
|
+
import { localizationExample } from '../apiExamples/localization';
|
|
10
|
+
import { resetStateExample } from '../apiExamples/reset-state';
|
|
11
11
|
import '../src/registered.js';
|
|
12
12
|
|
|
13
13
|
export function initExamples(initCount) {
|