@aurodesignsystem-dev/auro-formkit 0.0.0-pr1451.1 → 0.0.0-pr1451.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/components/checkbox/README.md +23 -37
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/readme.md +0 -2
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/README.md +43 -57
- package/components/combobox/demo/accessibility.html +22 -11
- package/components/combobox/demo/api.html +27 -16
- package/components/combobox/demo/api.min.js +4 -4
- package/components/combobox/demo/design.html +27 -16
- package/components/combobox/demo/index.html +28 -22
- package/components/combobox/demo/index.min.js +4 -4
- package/components/combobox/demo/install.html +26 -16
- package/components/combobox/demo/install.md +0 -2
- package/components/combobox/demo/install.min.js +4 -4
- package/components/combobox/demo/keyboard-behavior.html +22 -11
- package/components/combobox/demo/readme.html +27 -16
- package/components/combobox/demo/readme.md +0 -2
- package/components/combobox/demo/styles.css +911 -71
- package/components/combobox/demo/voiceover.html +22 -11
- package/components/combobox/dist/index.js +4 -4
- package/components/combobox/dist/registered.js +4 -4
- package/components/counter/README.md +39 -53
- package/components/counter/demo/api.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/demo/readme.md +0 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/README.md +19 -33
- package/components/datepicker/demo/api.min.js +4 -4
- package/components/datepicker/demo/index.min.js +4 -4
- package/components/datepicker/demo/readme.md +0 -2
- package/components/datepicker/dist/index.js +4 -4
- package/components/datepicker/dist/registered.js +4 -4
- package/components/dropdown/README.md +39 -53
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/demo/readme.md +0 -2
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/README.md +14 -30
- package/components/form/demo/api.min.js +16 -16
- package/components/form/demo/index.min.js +16 -16
- package/components/form/demo/readme.md +0 -2
- package/components/input/README.md +17 -31
- package/components/input/demo/api.min.js +2 -2
- package/components/input/demo/index.min.js +2 -2
- package/components/input/demo/readme.md +0 -2
- package/components/input/dist/index.js +2 -2
- package/components/input/dist/registered.js +2 -2
- package/components/menu/README.md +23 -37
- package/components/menu/demo/readme.md +0 -2
- package/components/radio/README.md +21 -35
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/readme.md +0 -2
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/README.md +41 -73
- package/components/select/demo/accessibility.html +23 -20
- package/components/select/demo/api.html +45 -10
- package/components/select/demo/api.min.js +2 -2
- package/components/select/demo/design.html +94 -0
- package/components/select/demo/design.md +391 -0
- package/components/select/demo/getting-started.html +125 -0
- package/components/select/demo/getting-started.js +9 -0
- package/components/select/demo/getting-started.md +1020 -0
- package/components/select/demo/getting-started.min.js +10490 -0
- package/components/select/demo/index.html +55 -241
- package/components/select/demo/index.md +38 -98
- package/components/select/demo/index.min.js +2 -2
- package/components/select/demo/install.md +92 -0
- package/components/select/demo/keyboard-behavior.html +23 -11
- package/components/select/demo/keyboard-behavior.md +247 -36
- package/components/select/demo/keyboardBehavior.html +22 -11
- package/components/select/demo/layout.html +45 -10
- package/components/select/demo/layout.md +71 -260
- package/components/select/demo/readme.html +46 -11
- package/components/select/demo/readme.md +25 -45
- package/components/select/demo/styles.css +1026 -0
- package/components/select/demo/voiceover.html +23 -11
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +1667 -1667
- package/package.json +1 -1
|
@@ -1,25 +1,39 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
The
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
<p>The component consists of the following elements:</p>
|
|
2
|
+
<ul>
|
|
3
|
+
<li>
|
|
4
|
+
<strong>trigger:</strong> shows the component label, current value and will render to reflect state of the component (e.g. <code>focus</code>, <code>hover</code>, <code>disabled</code>, <code>valid</code>, <code>invalid</code>), and a flag marking instances that are required.
|
|
5
|
+
</li>
|
|
6
|
+
<li>
|
|
7
|
+
<strong>options list:</strong> a list of options that may be selected which are rendered in an element which can be expanded/collapsed by interacting with the trigger.
|
|
8
|
+
</li>
|
|
9
|
+
<li>
|
|
10
|
+
<strong>help text:</strong> descriptive text rendered below the trigger intended to help clarify the intended use of the component instance and any current validation error with instructions to resolve those errors.
|
|
11
|
+
</li>
|
|
12
|
+
</ul>
|
|
13
|
+
<auro-header level="4" id="trigger">Trigger</auro-header>
|
|
14
|
+
<p>The trigger includes the component label, a flag marking the component optional/required and the current value. This label is required in order to ensure correct behavior when a guest is using accessibility tools such as screen readers and VoiceOver utilities. The invalid state will also announce to accessibility tools when applied.</p>
|
|
15
|
+
<p>The optional/required flag content may be customized.</p>
|
|
16
|
+
<p>When rendering the value of a selected option, the entire text content of the option will render in the trigger, including any icons.</p>
|
|
17
|
+
<p>The trigger is a focusable element and will visually respond to common UI states - <strong>Hover</strong> <em>(:hover)</em>, <strong>Focus</strong> <em>(:focus / :focus-visible)</em>, <strong>Disabled</strong> <em>(:disabled)</em>. The component does not have a visual response to the <strong>Active</strong> <em>(:active)</em> state.</p>
|
|
18
|
+
<auro-header level="4" id="options">List Options</auro-header>
|
|
19
|
+
<p>The component will render a list of options that may be selected. Each option may be in one of the following states when rendered:</p>
|
|
20
|
+
<ul>
|
|
21
|
+
<li>
|
|
22
|
+
<code>selected</code> - One option may be selected at a time and identifies the current value of the component. There is an optional feature that may be used to enable more than one option to be selected at a time.
|
|
23
|
+
</li>
|
|
24
|
+
<li>
|
|
25
|
+
<code>active</code> - One option may be active at a time. The active option indicates the item that will become selected if the user chooses.
|
|
26
|
+
</li>
|
|
27
|
+
<li>
|
|
28
|
+
<code>disabled</code> - One or more options may be disabled. Disabled options are not interactive and cannot be marked as active or selected.
|
|
29
|
+
</li>
|
|
30
|
+
</ul>
|
|
31
|
+
<auro-header level="4" id="helpText">Help Text</auro-header>
|
|
32
|
+
<p>Help text is not required. However, consideration should be given to how users will understand the full context of the component instance, particularly users reliant on accessibility tools like screen readers. In certain cases, a component label alone may be confusing.</p>
|
|
33
|
+
<p>If the component fails validation, the help text will change to show a validation help message instead of the default help text.</p>
|
|
34
|
+
<auro-header level="3" id="colors">Colors</auro-header>
|
|
35
|
+
<auro-header level="4" id="defaultColor">Default Color</auro-header>
|
|
36
|
+
<p>When the component is used on a light background.</p>
|
|
23
37
|
<div class="exampleWrapper">
|
|
24
38
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
25
39
|
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
@@ -37,12 +51,11 @@ The `classic` layout is default for `auro-select`. No customization is needed to
|
|
|
37
51
|
</auro-menu>
|
|
38
52
|
</auro-select>
|
|
39
53
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
|
-
</div>
|
|
54
|
+
</div>
|
|
41
55
|
<auro-accordion alignRight>
|
|
42
|
-
<span slot="trigger">See code</span>
|
|
56
|
+
<span slot="trigger">See code</span>
|
|
43
57
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
44
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
45
|
-
|
|
58
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
46
59
|
<pre class="language-html"><code class="language-html"><auro-select>
|
|
47
60
|
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
48
61
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
@@ -55,245 +68,43 @@ The `classic` layout is default for `auro-select`. No customization is needed to
|
|
|
55
68
|
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
56
69
|
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
57
70
|
</auro-menu>
|
|
58
|
-
</auro-select></code></pre>
|
|
59
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
60
|
-
</auro-accordion>
|
|
61
|
-
|
|
62
|
-
#### Emphasized Layout
|
|
63
|
-
|
|
64
|
-
The `emphasized` layout is only supported on light backgrounds.
|
|
65
|
-
|
|
66
|
-
The `emphasized` layout supports the following shapes:
|
|
67
|
-
- `pill`
|
|
68
|
-
- `pill-left`
|
|
69
|
-
- `pill-right`
|
|
70
|
-
|
|
71
|
-
The `emphasized` layout supports the following sizes:
|
|
72
|
-
- `xl`
|
|
73
|
-
|
|
74
|
-
<div class="exampleWrapper">
|
|
75
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/emphasized/basic.html) -->
|
|
76
|
-
<!-- The below content is automatically added from ./../apiExamples/emphasized/basic.html -->
|
|
77
|
-
<div style="display: flex; flex-direction: row; gap: 10px;">
|
|
78
|
-
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" forceDisplayValue style="display:inline-block;">
|
|
79
|
-
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
80
|
-
<span slot="label">Select Example</span>
|
|
81
|
-
<auro-menu nocheckmark>
|
|
82
|
-
<auro-menuoption value="flights">
|
|
83
|
-
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
84
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="terminal" name="plane-diag-fill" customcolor></auro-icon>
|
|
85
|
-
</auro-menuoption>
|
|
86
|
-
<auro-menuoption value="cars">
|
|
87
|
-
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
88
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="car-rental-stroke" customcolor></auro-icon>
|
|
89
|
-
</auro-menuoption>
|
|
90
|
-
<auro-menuoption value="hotels">
|
|
91
|
-
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
92
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="hotel-filled" customcolor></auro-icon>
|
|
93
|
-
</auro-menuoption>
|
|
94
|
-
<auro-menuoption value="packages">
|
|
95
|
-
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
96
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="shop" name="gift-filled" customcolor></auro-icon>
|
|
97
|
-
</auro-menuoption>
|
|
98
|
-
<auro-menuoption value="cruises">
|
|
99
|
-
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
100
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="in-flight" name="boarding" customcolor></auro-icon>
|
|
101
|
-
</auro-menuoption>
|
|
102
|
-
</auro-menu>
|
|
103
|
-
</auro-select>
|
|
104
|
-
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" style="display:inline-block;">
|
|
105
|
-
<span slot="label">Select Example</span>
|
|
106
|
-
<auro-menu nocheckmark>
|
|
107
|
-
<auro-menuoption value="flights">
|
|
108
|
-
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
109
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="terminal" name="plane-diag-fill" customcolor></auro-icon>
|
|
110
|
-
</auro-menuoption>
|
|
111
|
-
<auro-menuoption value="cars">
|
|
112
|
-
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
113
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="car-rental-stroke" customcolor></auro-icon>
|
|
114
|
-
</auro-menuoption>
|
|
115
|
-
<auro-menuoption value="hotels">
|
|
116
|
-
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
117
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="hotel-filled" customcolor></auro-icon>
|
|
118
|
-
</auro-menuoption>
|
|
119
|
-
<auro-menuoption value="packages">
|
|
120
|
-
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
121
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="shop" name="gift-filled" customcolor></auro-icon>
|
|
122
|
-
</auro-menuoption>
|
|
123
|
-
<auro-menuoption value="cruises">
|
|
124
|
-
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
125
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="in-flight" name="boarding" customcolor></auro-icon>
|
|
126
|
-
</auro-menuoption>
|
|
127
|
-
</auro-menu>
|
|
128
|
-
</auro-select>
|
|
129
|
-
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" required style="display:inline-block;">
|
|
130
|
-
<span slot="label">Select Example</span>
|
|
131
|
-
<span slot="helpText">no displayValue in menuoptions</span>
|
|
132
|
-
<auro-menu nocheckmark>
|
|
133
|
-
<auro-menuoption value="flights">
|
|
134
|
-
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
135
|
-
</auro-menuoption>
|
|
136
|
-
<auro-menuoption value="cars">
|
|
137
|
-
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
138
|
-
</auro-menuoption>
|
|
139
|
-
<auro-menuoption value="hotels">
|
|
140
|
-
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
141
|
-
</auro-menuoption>
|
|
142
|
-
<auro-menuoption value="packages">
|
|
143
|
-
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
144
|
-
</auro-menuoption>
|
|
145
|
-
<auro-menuoption value="cruises">
|
|
146
|
-
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
147
|
-
</auro-menuoption>
|
|
148
|
-
</auro-menu>
|
|
149
|
-
</auro-select>
|
|
150
|
-
</div>
|
|
71
|
+
</auro-select></code></pre>
|
|
151
72
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
152
|
-
</
|
|
153
|
-
<auro-
|
|
154
|
-
<
|
|
155
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/emphasized/basic.html) -->
|
|
156
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/emphasized/basic.html -->
|
|
157
|
-
|
|
158
|
-
<pre class="language-html"><code class="language-html"><div style="display: flex; flex-direction: row; gap: 10px;">
|
|
159
|
-
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" forceDisplayValue style="display:inline-block;">
|
|
160
|
-
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
161
|
-
<span slot="label">Select Example</span>
|
|
162
|
-
<auro-menu nocheckmark>
|
|
163
|
-
<auro-menuoption value="flights">
|
|
164
|
-
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
165
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="terminal" name="plane-diag-fill" customcolor></auro-icon>
|
|
166
|
-
</auro-menuoption>
|
|
167
|
-
<auro-menuoption value="cars">
|
|
168
|
-
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
169
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="car-rental-stroke" customcolor></auro-icon>
|
|
170
|
-
</auro-menuoption>
|
|
171
|
-
<auro-menuoption value="hotels">
|
|
172
|
-
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
173
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="hotel-filled" customcolor></auro-icon>
|
|
174
|
-
</auro-menuoption>
|
|
175
|
-
<auro-menuoption value="packages">
|
|
176
|
-
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
177
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="shop" name="gift-filled" customcolor></auro-icon>
|
|
178
|
-
</auro-menuoption>
|
|
179
|
-
<auro-menuoption value="cruises">
|
|
180
|
-
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
181
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="in-flight" name="boarding" customcolor></auro-icon>
|
|
182
|
-
</auro-menuoption>
|
|
183
|
-
</auro-menu>
|
|
184
|
-
</auro-select>
|
|
185
|
-
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" style="display:inline-block;">
|
|
186
|
-
<span slot="label">Select Example</span>
|
|
187
|
-
<auro-menu nocheckmark>
|
|
188
|
-
<auro-menuoption value="flights">
|
|
189
|
-
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
190
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="terminal" name="plane-diag-fill" customcolor></auro-icon>
|
|
191
|
-
</auro-menuoption>
|
|
192
|
-
<auro-menuoption value="cars">
|
|
193
|
-
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
194
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="car-rental-stroke" customcolor></auro-icon>
|
|
195
|
-
</auro-menuoption>
|
|
196
|
-
<auro-menuoption value="hotels">
|
|
197
|
-
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
198
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="hotel-filled" customcolor></auro-icon>
|
|
199
|
-
</auro-menuoption>
|
|
200
|
-
<auro-menuoption value="packages">
|
|
201
|
-
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
202
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="shop" name="gift-filled" customcolor></auro-icon>
|
|
203
|
-
</auro-menuoption>
|
|
204
|
-
<auro-menuoption value="cruises">
|
|
205
|
-
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
206
|
-
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="in-flight" name="boarding" customcolor></auro-icon>
|
|
207
|
-
</auro-menuoption>
|
|
208
|
-
</auro-menu>
|
|
209
|
-
</auro-select>
|
|
210
|
-
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" required style="display:inline-block;">
|
|
211
|
-
<span slot="label">Select Example</span>
|
|
212
|
-
<span slot="helpText">no displayValue in menuoptions</span>
|
|
213
|
-
<auro-menu nocheckmark>
|
|
214
|
-
<auro-menuoption value="flights">
|
|
215
|
-
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
216
|
-
</auro-menuoption>
|
|
217
|
-
<auro-menuoption value="cars">
|
|
218
|
-
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
219
|
-
</auro-menuoption>
|
|
220
|
-
<auro-menuoption value="hotels">
|
|
221
|
-
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
222
|
-
</auro-menuoption>
|
|
223
|
-
<auro-menuoption value="packages">
|
|
224
|
-
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
225
|
-
</auro-menuoption>
|
|
226
|
-
<auro-menuoption value="cruises">
|
|
227
|
-
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
228
|
-
</auro-menuoption>
|
|
229
|
-
</auro-menu>
|
|
230
|
-
</auro-select>
|
|
231
|
-
</div></code></pre>
|
|
232
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
233
|
-
</auro-accordion>
|
|
234
|
-
|
|
235
|
-
#### Snowflake Layout
|
|
236
|
-
|
|
237
|
-
The `snowflake` layout is a unique, one off layout that does not follow the normal pattern. There is only one way to use snowflake as shown in the following example.
|
|
238
|
-
|
|
239
|
-
The `snowflake` layout is only expected to be used on dark backgrounds, in conjunction with `appearance="inverse"`.
|
|
240
|
-
|
|
73
|
+
</auro-accordion>
|
|
74
|
+
<auro-header level="4" id="inverseColor">Inverse Color</auro-header>
|
|
75
|
+
<p>When the component is used on a darker background, set <code>appearance="inverse"</code> to invert the component colors for proper contrast and visibility.</p>
|
|
241
76
|
<div class="exampleWrapper--ondark">
|
|
242
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
243
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
244
|
-
<auro-select
|
|
245
|
-
<span slot="
|
|
246
|
-
<span slot="label">
|
|
247
|
-
<
|
|
248
|
-
<auro-
|
|
249
|
-
<auro-menuoption value="
|
|
250
|
-
<auro-
|
|
251
|
-
</auro-menuoption>
|
|
252
|
-
<auro-menuoption value="
|
|
253
|
-
<auro-
|
|
254
|
-
</auro-menuoption>
|
|
255
|
-
<auro-menuoption value="hotels">
|
|
256
|
-
<auro-icon category="destination" name="hotel-stroke" customColor></auro-icon> Hotels
|
|
257
|
-
</auro-menuoption>
|
|
258
|
-
<auro-menuoption value="packages">
|
|
259
|
-
<auro-icon category="shop" name="gift-stroke" customColor></auro-icon> Packages
|
|
260
|
-
</auro-menuoption>
|
|
261
|
-
<auro-menuoption value="cruises">
|
|
262
|
-
<auro-icon category="in-flight" name="boarding" customColor></auro-icon> Cruises
|
|
263
|
-
</auro-menuoption>
|
|
77
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse.html) -->
|
|
78
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
79
|
+
<auro-select appearance="inverse">
|
|
80
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
81
|
+
<span slot="label">Select Example</span>
|
|
82
|
+
<auro-menu>
|
|
83
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
84
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
85
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
86
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
87
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
88
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
264
89
|
</auro-menu>
|
|
265
90
|
</auro-select>
|
|
266
91
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
267
92
|
</div>
|
|
268
93
|
<auro-accordion alignRight>
|
|
269
|
-
<span slot="trigger">See code</span>
|
|
270
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/
|
|
271
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
<span slot="
|
|
275
|
-
<
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
<auro-menuoption value="
|
|
279
|
-
|
|
280
|
-
</auro-menuoption>
|
|
281
|
-
<auro-menuoption value="
|
|
282
|
-
<auro-icon category="destination" name="car-rental-stroke" customColor></auro-icon> Cars
|
|
283
|
-
</auro-menuoption>
|
|
284
|
-
<auro-menuoption value="hotels">
|
|
285
|
-
<auro-icon category="destination" name="hotel-stroke" customColor></auro-icon> Hotels
|
|
286
|
-
</auro-menuoption>
|
|
287
|
-
<auro-menuoption value="packages">
|
|
288
|
-
<auro-icon category="shop" name="gift-stroke" customColor></auro-icon> Packages
|
|
289
|
-
</auro-menuoption>
|
|
290
|
-
<auro-menuoption value="cruises">
|
|
291
|
-
<auro-icon category="in-flight" name="boarding" customColor></auro-icon> Cruises
|
|
292
|
-
</auro-menuoption>
|
|
94
|
+
<span slot="trigger">See code</span>
|
|
95
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/appearance-inverse.html) -->
|
|
96
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
97
|
+
<pre class="language-html"><code class="language-html"><auro-select appearance="inverse">
|
|
98
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
99
|
+
<span slot="label">Select Example</span>
|
|
100
|
+
<auro-menu>
|
|
101
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
102
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
103
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
104
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
105
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
106
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
293
107
|
</auro-menu>
|
|
294
|
-
</auro-select></code></pre>
|
|
295
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
296
|
-
</auro-accordion>
|
|
297
|
-
</div>
|
|
298
|
-
</div>
|
|
299
|
-
</div>
|
|
108
|
+
</auro-select></code></pre>
|
|
109
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
110
|
+
</auro-accordion>
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
19
|
<title>Auro Web Component Demo | auro-select</title>
|
|
20
20
|
|
|
21
|
-
<!--
|
|
22
|
-
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/
|
|
21
|
+
<!-- highlight.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
23
23
|
|
|
24
24
|
<!-- Legacy reference is still needed to support auro-select's use of legacy token values at this time -->
|
|
25
25
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
@@ -33,20 +33,55 @@
|
|
|
33
33
|
<!-- Demo Specific Styles -->
|
|
34
34
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
35
35
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
36
|
+
<link rel="stylesheet" type="text/css" href="./styles.css" />
|
|
36
37
|
</head>
|
|
37
38
|
<body class="auro-markdown">
|
|
38
39
|
<main></main>
|
|
39
40
|
|
|
40
41
|
<script type="module">
|
|
41
|
-
import 'https://
|
|
42
|
-
import 'https://
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
import {unified} from 'https://esm.sh/unified';
|
|
43
|
+
import remarkParse from 'https://esm.sh/remark-parse';
|
|
44
|
+
import remarkGfm from 'https://esm.sh/remark-gfm';
|
|
45
|
+
import remarkRehype from 'https://esm.sh/remark-rehype';
|
|
46
|
+
import rehypeRaw from 'https://esm.sh/rehype-raw';
|
|
47
|
+
import rehypeHighlight from 'https://esm.sh/rehype-highlight';
|
|
48
|
+
import rehypeStringify from 'https://esm.sh/rehype-stringify';
|
|
49
|
+
|
|
50
|
+
const response = await fetch('./readme.md');
|
|
51
|
+
const text = await response.text();
|
|
52
|
+
const result = await unified()
|
|
53
|
+
.use(remarkParse)
|
|
54
|
+
.use(remarkGfm)
|
|
55
|
+
.use(remarkRehype, { allowDangerousHtml: true })
|
|
56
|
+
.use(rehypeRaw)
|
|
57
|
+
.use(rehypeHighlight)
|
|
58
|
+
.use(rehypeStringify)
|
|
59
|
+
.process(text);
|
|
60
|
+
|
|
61
|
+
document.querySelector('main').innerHTML = String(result);
|
|
62
|
+
addCopyButtons();
|
|
63
|
+
|
|
64
|
+
function addCopyButtons() {
|
|
65
|
+
document.querySelectorAll('pre code[class*="language-"], pre code[class*="hljs"]').forEach((code) => {
|
|
66
|
+
const pre = code.parentElement;
|
|
67
|
+
const wrapper = document.createElement('div');
|
|
68
|
+
wrapper.className = 'pre-wrapper';
|
|
69
|
+
pre.parentNode.insertBefore(wrapper, pre);
|
|
70
|
+
wrapper.appendChild(pre);
|
|
71
|
+
const btn = document.createElement('button');
|
|
72
|
+
btn.className = 'copy-btn';
|
|
73
|
+
btn.textContent = 'Copy';
|
|
74
|
+
btn.addEventListener('click', () => {
|
|
75
|
+
const raw = code.textContent;
|
|
76
|
+
const text = raw.replace(/\u200B/g, '').replace(/^\n+/, '').replace(/\n+$/, '\n').replace(/^\$ /, '');
|
|
77
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
78
|
+
btn.textContent = 'Copied!';
|
|
79
|
+
setTimeout(() => { btn.textContent = 'Copy'; }, 1500);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
wrapper.appendChild(btn);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
50
85
|
</script>
|
|
51
86
|
<script src="./index.min.js" data-demo-script="true" type="module"></script>
|
|
52
87
|
|
|
@@ -51,8 +51,6 @@ See description.
|
|
|
51
51
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
52
52
|
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
53
53
|
|
|
54
|
-
#### NPM Installation
|
|
55
|
-
|
|
56
54
|
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-formkit</code></pre>
|
|
57
55
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
58
56
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
@@ -94,54 +92,36 @@ To only develop a single component, use the `--filter` flag:
|
|
|
94
92
|
<pre class="language-shell"><code class="language-shell">npx turbo dev --filter=@aurodesignsystem/auro-input</code></pre>
|
|
95
93
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
96
94
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
97
|
-
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
95
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
96
|
+
<p>Every Auro component consists of a JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and a <a href="https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define">custom element registration</a>. The class defines the component's behavior, and the registration maps it to an HTML tag name so it can be used in markup.</p>
|
|
97
|
+
<p>The default import (shown above) handles both steps automatically, registering the component under its standard tag name.</p>
|
|
98
|
+
<p>If you need multiple versions of the same component on a single page — for example, when two projects depend on different versions — you can register the class under a custom tag name to avoid conflicts.</p>
|
|
99
|
+
<p>To do this, import the component class directly and call its `register(name)` method with a unique name:</p>
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
<pre class="language-js"><code class="language-js">// Import the classes
|
|
102
|
+
import { AuroSelect } from '@aurodesignsystem/auro-formkit/auro-select/class';
|
|
103
|
+
import { AuroMenu } from '@aurodesignsystem/auro-formkit/auro-menu/class';
|
|
104
|
+
import { AuroMenuOption } from '@aurodesignsystem/auro-formkit/auro-menuoption/class';
|
|
105
|
+
|
|
106
|
+
// Register each component with a custom name
|
|
107
|
+
AuroSelect.register('custom-select');
|
|
108
|
+
AuroMenu.register('custom-menu');
|
|
109
|
+
AuroMenuOption.register('custom-menuoption');</code></pre>
|
|
104
110
|
|
|
105
|
-
|
|
111
|
+
The `<auro-menu>` and `<auro-menuoption>` components must also be custom registered when using a custom `<auro-select>` registration. All three components work together and need to be registered under the same custom naming convention.
|
|
106
112
|
|
|
107
|
-
|
|
113
|
+
This will create new custom elements that behave exactly like their standard counterparts, allowing both to coexist on the same page without interfering with each other.
|
|
108
114
|
|
|
109
|
-
<pre class="language-
|
|
110
|
-
import { AuroSelect } from '@aurodesignsystem/auro-formkit/auro-select/class';
|
|
111
|
-
|
|
112
|
-
// Register with a custom name if desired
|
|
113
|
-
AuroSelect.register('custom-select');</code></pre>
|
|
114
|
-
|
|
115
|
-
This will create a new custom element `<custom-select>` that behaves exactly like `<auro-select>`, allowing both to coexist on the same page without interfering with each other.
|
|
116
|
-
|
|
117
|
-
<div class="exampleWrapper exampleWrapper--flex">
|
|
118
|
-
<custom-select placeholder="Placeholder Text">
|
|
119
|
-
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
120
|
-
<span slot="label">Label</span>
|
|
121
|
-
<auro-menu>
|
|
122
|
-
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
123
|
-
<auro-menuoption value="price">Price</auro-menuoption>
|
|
124
|
-
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
125
|
-
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
126
|
-
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
127
|
-
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
128
|
-
</auro-menu>
|
|
129
|
-
</custom-select>
|
|
130
|
-
</div>
|
|
131
|
-
<auro-accordion alignRight>
|
|
132
|
-
<span slot="trigger">See code</span>
|
|
133
|
-
|
|
134
|
-
<pre class="language-html"><code class="language-html"><custom-select placeholder="Placeholder Text">
|
|
115
|
+
<pre class="language-html"><code class="language-html"><custom-select placeholder="Placeholder Text" id="custom-select">
|
|
135
116
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
136
117
|
<span slot="label">Label</span>
|
|
137
|
-
<
|
|
138
|
-
<
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
<
|
|
142
|
-
<
|
|
143
|
-
<
|
|
144
|
-
</
|
|
118
|
+
<custom-menu>
|
|
119
|
+
<custom-menuoption value="stops">Stops</custom-menuoption>
|
|
120
|
+
<custom-menuoption value="price">Price</custom-menuoption>
|
|
121
|
+
<custom-menuoption value="duration">Duration</custom-menuoption>
|
|
122
|
+
<custom-menuoption value="departure">Departure</custom-menuoption>
|
|
123
|
+
<custom-menuoption value="arrival">Arrival</custom-menuoption>
|
|
124
|
+
<custom-menuoption value="prefer alaska">Prefer Alaska</custom-menuoption>
|
|
125
|
+
</custom-menu>
|
|
145
126
|
</custom-select></code></pre>
|
|
146
|
-
</auro-accordion>
|
|
147
127
|
<!-- AURO-GENERATED-CONTENT:END -->
|