@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
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
<auro-header level="1" id="overview">Select - Design</auro-header>
|
|
2
|
+
<div class="contentWrapper">
|
|
3
|
+
<div class="mainContent">
|
|
4
|
+
<div class="scrollWrapper">
|
|
5
|
+
<auro-header level="3" id="anatomy">Component Anatomy</auro-header>
|
|
6
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/layout.md) -->
|
|
7
|
+
<!-- The below content is automatically added from ./../docs/partials/layout.md -->
|
|
8
|
+
<p>The component consists of the following elements:</p>
|
|
9
|
+
<ul>
|
|
10
|
+
<li>
|
|
11
|
+
<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.
|
|
12
|
+
</li>
|
|
13
|
+
<li>
|
|
14
|
+
<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.
|
|
15
|
+
</li>
|
|
16
|
+
<li>
|
|
17
|
+
<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.
|
|
18
|
+
</li>
|
|
19
|
+
</ul>
|
|
20
|
+
<auro-header level="4" id="trigger">Trigger</auro-header>
|
|
21
|
+
<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>
|
|
22
|
+
<p>The optional/required flag content may be customized.</p>
|
|
23
|
+
<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>
|
|
24
|
+
<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>
|
|
25
|
+
<auro-header level="4" id="options">List Options</auro-header>
|
|
26
|
+
<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>
|
|
27
|
+
<ul>
|
|
28
|
+
<li>
|
|
29
|
+
<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.
|
|
30
|
+
</li>
|
|
31
|
+
<li>
|
|
32
|
+
<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.
|
|
33
|
+
</li>
|
|
34
|
+
<li>
|
|
35
|
+
<code>disabled</code> - One or more options may be disabled. Disabled options are not interactive and cannot be marked as active or selected.
|
|
36
|
+
</li>
|
|
37
|
+
</ul>
|
|
38
|
+
<auro-header level="4" id="helpText">Help Text</auro-header>
|
|
39
|
+
<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>
|
|
40
|
+
<p>If the component fails validation, the help text will change to show a validation help message instead of the default help text.</p>
|
|
41
|
+
<auro-header level="3" id="colors">Colors</auro-header>
|
|
42
|
+
<auro-header level="4" id="defaultColor">Default Color</auro-header>
|
|
43
|
+
<p>When the component is used on a light background.</p>
|
|
44
|
+
<div class="exampleWrapper">
|
|
45
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
46
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
47
|
+
<auro-select>
|
|
48
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
49
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
50
|
+
<span slot="label">Select Example</span>
|
|
51
|
+
<auro-menu>
|
|
52
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
53
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
54
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
55
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
56
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
57
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
58
|
+
</auro-menu>
|
|
59
|
+
</auro-select>
|
|
60
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
61
|
+
</div>
|
|
62
|
+
<auro-accordion alignRight>
|
|
63
|
+
<span slot="trigger">See code</span>
|
|
64
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
65
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
66
|
+
<pre class="language-html"><code class="language-html"><auro-select>
|
|
67
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
68
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
69
|
+
<span slot="label">Select Example</span>
|
|
70
|
+
<auro-menu>
|
|
71
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
72
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
73
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
74
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
75
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
76
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
77
|
+
</auro-menu>
|
|
78
|
+
</auro-select></code></pre>
|
|
79
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
|
+
</auro-accordion>
|
|
81
|
+
<auro-header level="4" id="inverseColor">Inverse Color</auro-header>
|
|
82
|
+
<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>
|
|
83
|
+
<div class="exampleWrapper--ondark">
|
|
84
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse.html) -->
|
|
85
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
86
|
+
<auro-select appearance="inverse">
|
|
87
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
88
|
+
<span slot="label">Select Example</span>
|
|
89
|
+
<auro-menu>
|
|
90
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
91
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
92
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
93
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
94
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
95
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
96
|
+
</auro-menu>
|
|
97
|
+
</auro-select>
|
|
98
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
99
|
+
</div>
|
|
100
|
+
<auro-accordion alignRight>
|
|
101
|
+
<span slot="trigger">See code</span>
|
|
102
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/appearance-inverse.html) -->
|
|
103
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
104
|
+
<pre class="language-html"><code class="language-html"><auro-select appearance="inverse">
|
|
105
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
106
|
+
<span slot="label">Select Example</span>
|
|
107
|
+
<auro-menu>
|
|
108
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
109
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
110
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
111
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
112
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
113
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
114
|
+
</auro-menu>
|
|
115
|
+
</auro-select></code></pre>
|
|
116
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
117
|
+
</auro-accordion>
|
|
118
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
119
|
+
<auro-header level="3" id="shapeSizeLayout">Shape | Size | Layout Support</auro-header>
|
|
120
|
+
<p>The <code>auro-select</code> component supports the <code>shape</code>, <code>size</code> and <code>layout</code> feature set. The component defaults to the <code>layout="classic"</code>, <code>shape="classic"</code> and <code>size="lg"</code>.</p>
|
|
121
|
+
<auro-header level="4" id="classicLayout">Classic Layout</auro-header>
|
|
122
|
+
<p>The <code>classic</code> layout is default for <code>auro-select</code>. No customization is needed to achieve this look.</p>
|
|
123
|
+
<div class="exampleWrapper">
|
|
124
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
125
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
126
|
+
<auro-select>
|
|
127
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
128
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
129
|
+
<span slot="label">Select Example</span>
|
|
130
|
+
<auro-menu>
|
|
131
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
132
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
133
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
134
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
135
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
136
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
137
|
+
</auro-menu>
|
|
138
|
+
</auro-select>
|
|
139
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
140
|
+
</div>
|
|
141
|
+
<auro-accordion alignRight>
|
|
142
|
+
<span slot="trigger">See code</span>
|
|
143
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
144
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
145
|
+
<pre class="language-html"><code class="language-html"><auro-select>
|
|
146
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
147
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
148
|
+
<span slot="label">Select Example</span>
|
|
149
|
+
<auro-menu>
|
|
150
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
151
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
152
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
153
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
154
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
155
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
156
|
+
</auro-menu>
|
|
157
|
+
</auro-select></code></pre>
|
|
158
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
159
|
+
</auro-accordion>
|
|
160
|
+
<auro-header level="4" id="emphasizedLayout">Emphasized Layout</auro-header>
|
|
161
|
+
<p>The <code>emphasized</code> layout is only supported on light backgrounds.</p>
|
|
162
|
+
<p>The <code>emphasized</code> layout supports the following shapes:</p>
|
|
163
|
+
<ul>
|
|
164
|
+
<li><code>pill</code></li>
|
|
165
|
+
<li><code>pill-left</code></li>
|
|
166
|
+
<li><code>pill-right</code></li>
|
|
167
|
+
</ul>
|
|
168
|
+
<p>The <code>emphasized</code> layout supports the following sizes:</p>
|
|
169
|
+
<ul>
|
|
170
|
+
<li><code>xl</code></li>
|
|
171
|
+
</ul>
|
|
172
|
+
<div class="exampleWrapper">
|
|
173
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/emphasized/basic.html) -->
|
|
174
|
+
<!-- The below content is automatically added from ./../apiExamples/emphasized/basic.html -->
|
|
175
|
+
<div style="display: flex; flex-direction: row; gap: 10px;">
|
|
176
|
+
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" forceDisplayValue style="display:inline-block;">
|
|
177
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
178
|
+
<span slot="label">Select Example</span>
|
|
179
|
+
<auro-menu nocheckmark>
|
|
180
|
+
<auro-menuoption value="flights">
|
|
181
|
+
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
182
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="terminal" name="plane-diag-fill" customcolor></auro-icon>
|
|
183
|
+
</auro-menuoption>
|
|
184
|
+
<auro-menuoption value="cars">
|
|
185
|
+
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
186
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="car-rental-stroke" customcolor></auro-icon>
|
|
187
|
+
</auro-menuoption>
|
|
188
|
+
<auro-menuoption value="hotels">
|
|
189
|
+
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
190
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="hotel-filled" customcolor></auro-icon>
|
|
191
|
+
</auro-menuoption>
|
|
192
|
+
<auro-menuoption value="packages">
|
|
193
|
+
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
194
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="shop" name="gift-filled" customcolor></auro-icon>
|
|
195
|
+
</auro-menuoption>
|
|
196
|
+
<auro-menuoption value="cruises">
|
|
197
|
+
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
198
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="in-flight" name="boarding" customcolor></auro-icon>
|
|
199
|
+
</auro-menuoption>
|
|
200
|
+
</auro-menu>
|
|
201
|
+
</auro-select>
|
|
202
|
+
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" style="display:inline-block;">
|
|
203
|
+
<span slot="label">Select Example</span>
|
|
204
|
+
<auro-menu nocheckmark>
|
|
205
|
+
<auro-menuoption value="flights">
|
|
206
|
+
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
207
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="terminal" name="plane-diag-fill" customcolor></auro-icon>
|
|
208
|
+
</auro-menuoption>
|
|
209
|
+
<auro-menuoption value="cars">
|
|
210
|
+
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
211
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="car-rental-stroke" customcolor></auro-icon>
|
|
212
|
+
</auro-menuoption>
|
|
213
|
+
<auro-menuoption value="hotels">
|
|
214
|
+
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
215
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="hotel-filled" customcolor></auro-icon>
|
|
216
|
+
</auro-menuoption>
|
|
217
|
+
<auro-menuoption value="packages">
|
|
218
|
+
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
219
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="shop" name="gift-filled" customcolor></auro-icon>
|
|
220
|
+
</auro-menuoption>
|
|
221
|
+
<auro-menuoption value="cruises">
|
|
222
|
+
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
223
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="in-flight" name="boarding" customcolor></auro-icon>
|
|
224
|
+
</auro-menuoption>
|
|
225
|
+
</auro-menu>
|
|
226
|
+
</auro-select>
|
|
227
|
+
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" required style="display:inline-block;">
|
|
228
|
+
<span slot="label">Select Example</span>
|
|
229
|
+
<span slot="helpText">no displayValue in menuoptions</span>
|
|
230
|
+
<auro-menu nocheckmark>
|
|
231
|
+
<auro-menuoption value="flights">
|
|
232
|
+
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
233
|
+
</auro-menuoption>
|
|
234
|
+
<auro-menuoption value="cars">
|
|
235
|
+
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
236
|
+
</auro-menuoption>
|
|
237
|
+
<auro-menuoption value="hotels">
|
|
238
|
+
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
239
|
+
</auro-menuoption>
|
|
240
|
+
<auro-menuoption value="packages">
|
|
241
|
+
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
242
|
+
</auro-menuoption>
|
|
243
|
+
<auro-menuoption value="cruises">
|
|
244
|
+
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
245
|
+
</auro-menuoption>
|
|
246
|
+
</auro-menu>
|
|
247
|
+
</auro-select>
|
|
248
|
+
</div>
|
|
249
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
250
|
+
</div>
|
|
251
|
+
<auro-accordion alignRight>
|
|
252
|
+
<span slot="trigger">See code</span>
|
|
253
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/emphasized/basic.html) -->
|
|
254
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/emphasized/basic.html -->
|
|
255
|
+
<pre class="language-html"><code class="language-html"><div style="display: flex; flex-direction: row; gap: 10px;">
|
|
256
|
+
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" forceDisplayValue style="display:inline-block;">
|
|
257
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
258
|
+
<span slot="label">Select Example</span>
|
|
259
|
+
<auro-menu nocheckmark>
|
|
260
|
+
<auro-menuoption value="flights">
|
|
261
|
+
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
262
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="terminal" name="plane-diag-fill" customcolor></auro-icon>
|
|
263
|
+
</auro-menuoption>
|
|
264
|
+
<auro-menuoption value="cars">
|
|
265
|
+
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
266
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="car-rental-stroke" customcolor></auro-icon>
|
|
267
|
+
</auro-menuoption>
|
|
268
|
+
<auro-menuoption value="hotels">
|
|
269
|
+
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
270
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="hotel-filled" customcolor></auro-icon>
|
|
271
|
+
</auro-menuoption>
|
|
272
|
+
<auro-menuoption value="packages">
|
|
273
|
+
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
274
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="shop" name="gift-filled" customcolor></auro-icon>
|
|
275
|
+
</auro-menuoption>
|
|
276
|
+
<auro-menuoption value="cruises">
|
|
277
|
+
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
278
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="in-flight" name="boarding" customcolor></auro-icon>
|
|
279
|
+
</auro-menuoption>
|
|
280
|
+
</auro-menu>
|
|
281
|
+
</auro-select>
|
|
282
|
+
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" style="display:inline-block;">
|
|
283
|
+
<span slot="label">Select Example</span>
|
|
284
|
+
<auro-menu nocheckmark>
|
|
285
|
+
<auro-menuoption value="flights">
|
|
286
|
+
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
287
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="terminal" name="plane-diag-fill" customcolor></auro-icon>
|
|
288
|
+
</auro-menuoption>
|
|
289
|
+
<auro-menuoption value="cars">
|
|
290
|
+
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
291
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="car-rental-stroke" customcolor></auro-icon>
|
|
292
|
+
</auro-menuoption>
|
|
293
|
+
<auro-menuoption value="hotels">
|
|
294
|
+
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
295
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="destination" name="hotel-filled" customcolor></auro-icon>
|
|
296
|
+
</auro-menuoption>
|
|
297
|
+
<auro-menuoption value="packages">
|
|
298
|
+
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
299
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="shop" name="gift-filled" customcolor></auro-icon>
|
|
300
|
+
</auro-menuoption>
|
|
301
|
+
<auro-menuoption value="cruises">
|
|
302
|
+
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
303
|
+
<auro-icon style="--ds-auro-icon-size: 40px;" slot="displayValue" category="in-flight" name="boarding" customcolor></auro-icon>
|
|
304
|
+
</auro-menuoption>
|
|
305
|
+
</auro-menu>
|
|
306
|
+
</auro-select>
|
|
307
|
+
<auro-select layout="emphasized" shape="pill" size="xl" value="flights" required style="display:inline-block;">
|
|
308
|
+
<span slot="label">Select Example</span>
|
|
309
|
+
<span slot="helpText">no displayValue in menuoptions</span>
|
|
310
|
+
<auro-menu nocheckmark>
|
|
311
|
+
<auro-menuoption value="flights">
|
|
312
|
+
<auro-icon category="terminal" name="plane-diag-stroke" customcolor></auro-icon> Flights
|
|
313
|
+
</auro-menuoption>
|
|
314
|
+
<auro-menuoption value="cars">
|
|
315
|
+
<auro-icon category="destination" name="car-rental-stroke" customcolor></auro-icon> Cars
|
|
316
|
+
</auro-menuoption>
|
|
317
|
+
<auro-menuoption value="hotels">
|
|
318
|
+
<auro-icon category="destination" name="hotel-stroke" customcolor></auro-icon> Hotels
|
|
319
|
+
</auro-menuoption>
|
|
320
|
+
<auro-menuoption value="packages">
|
|
321
|
+
<auro-icon category="shop" name="gift-stroke" customcolor></auro-icon> Packages
|
|
322
|
+
</auro-menuoption>
|
|
323
|
+
<auro-menuoption value="cruises">
|
|
324
|
+
<auro-icon category="in-flight" name="boarding" customcolor></auro-icon> Cruises
|
|
325
|
+
</auro-menuoption>
|
|
326
|
+
</auro-menu>
|
|
327
|
+
</auro-select>
|
|
328
|
+
</div></code></pre>
|
|
329
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
330
|
+
</auro-accordion>
|
|
331
|
+
<auro-header level="4" id="snowflakeLayout">Snowflake Layout</auro-header>
|
|
332
|
+
<p>The <code>snowflake</code> 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.</p>
|
|
333
|
+
<p>The <code>snowflake</code> layout is only expected to be used on dark backgrounds, in conjunction with <code>appearance="inverse"</code>.</p>
|
|
334
|
+
<div class="exampleWrapper--ondark">
|
|
335
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/snowflake/basic.html) -->
|
|
336
|
+
<!-- The below content is automatically added from ./../apiExamples/snowflake/basic.html -->
|
|
337
|
+
<auro-select layout="snowflake" shape="snowflake" appearance="inverse" required style="width:300px;">
|
|
338
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
339
|
+
<span slot="label">Label</span>
|
|
340
|
+
<span slot="helpText">Help Text</span>
|
|
341
|
+
<auro-menu nocheckmark>
|
|
342
|
+
<auro-menuoption value="flights">
|
|
343
|
+
<auro-icon category="terminal" name="plane-diag-stroke" customColor></auro-icon> Flights
|
|
344
|
+
</auro-menuoption>
|
|
345
|
+
<auro-menuoption value="cars">
|
|
346
|
+
<auro-icon category="destination" name="car-rental-stroke" customColor></auro-icon> Cars
|
|
347
|
+
</auro-menuoption>
|
|
348
|
+
<auro-menuoption value="hotels">
|
|
349
|
+
<auro-icon category="destination" name="hotel-stroke" customColor></auro-icon> Hotels
|
|
350
|
+
</auro-menuoption>
|
|
351
|
+
<auro-menuoption value="packages">
|
|
352
|
+
<auro-icon category="shop" name="gift-stroke" customColor></auro-icon> Packages
|
|
353
|
+
</auro-menuoption>
|
|
354
|
+
<auro-menuoption value="cruises">
|
|
355
|
+
<auro-icon category="in-flight" name="boarding" customColor></auro-icon> Cruises
|
|
356
|
+
</auro-menuoption>
|
|
357
|
+
</auro-menu>
|
|
358
|
+
</auro-select>
|
|
359
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
360
|
+
</div>
|
|
361
|
+
<auro-accordion alignRight>
|
|
362
|
+
<span slot="trigger">See code</span>
|
|
363
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/snowflake/basic.html) -->
|
|
364
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/snowflake/basic.html -->
|
|
365
|
+
<pre class="language-html"><code class="language-html"><auro-select layout="snowflake" shape="snowflake" appearance="inverse" required style="width:300px;">
|
|
366
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
367
|
+
<span slot="label">Label</span>
|
|
368
|
+
<span slot="helpText">Help Text</span>
|
|
369
|
+
<auro-menu nocheckmark>
|
|
370
|
+
<auro-menuoption value="flights">
|
|
371
|
+
<auro-icon category="terminal" name="plane-diag-stroke" customColor></auro-icon> Flights
|
|
372
|
+
</auro-menuoption>
|
|
373
|
+
<auro-menuoption value="cars">
|
|
374
|
+
<auro-icon category="destination" name="car-rental-stroke" customColor></auro-icon> Cars
|
|
375
|
+
</auro-menuoption>
|
|
376
|
+
<auro-menuoption value="hotels">
|
|
377
|
+
<auro-icon category="destination" name="hotel-stroke" customColor></auro-icon> Hotels
|
|
378
|
+
</auro-menuoption>
|
|
379
|
+
<auro-menuoption value="packages">
|
|
380
|
+
<auro-icon category="shop" name="gift-stroke" customColor></auro-icon> Packages
|
|
381
|
+
</auro-menuoption>
|
|
382
|
+
<auro-menuoption value="cruises">
|
|
383
|
+
<auro-icon category="in-flight" name="boarding" customColor></auro-icon> Cruises
|
|
384
|
+
</auro-menuoption>
|
|
385
|
+
</auro-menu>
|
|
386
|
+
</auro-select></code></pre>
|
|
387
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
388
|
+
</auro-accordion>
|
|
389
|
+
</div>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3
|
+
See LICENSE in the project root for license information.
|
|
4
|
+
|
|
5
|
+
HTML in this document is standardized and NOT to be edited.
|
|
6
|
+
All demo code should be added/edited in ./demo/getting-started.md
|
|
7
|
+
|
|
8
|
+
----------------------- DO NOT EDIT -----------------------------
|
|
9
|
+
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<!DOCTYPE html>
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<head>
|
|
15
|
+
<meta charset="UTF-8" />
|
|
16
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
17
|
+
<title>Auro Web Component Demo | auro-select | Getting Started</title>
|
|
18
|
+
|
|
19
|
+
<!-- highlight.js Stylesheet -->
|
|
20
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
21
|
+
|
|
22
|
+
<!-- Legacy reference is still needed to support auro-select's use of legacy token values at this time -->
|
|
23
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
24
|
+
|
|
25
|
+
<!-- Design Token Alaska Theme -->
|
|
26
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
27
|
+
|
|
28
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
29
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
30
|
+
|
|
31
|
+
<!-- Demo Specific Styles -->
|
|
32
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
33
|
+
<!-- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" /> -->
|
|
34
|
+
<link rel="stylesheet" type="text/css" href="./styles.css" />
|
|
35
|
+
</head>
|
|
36
|
+
<body class="auro-markdown">
|
|
37
|
+
<main></main>
|
|
38
|
+
|
|
39
|
+
<!-- If additional elements are needed for the demo, add them here. -->
|
|
40
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
|
|
41
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-nav@latest/+esm" type="module"></script>
|
|
42
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
|
|
43
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm" type="module"></script>
|
|
44
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
|
|
45
|
+
<script type="module">
|
|
46
|
+
import {unified} from 'https://esm.sh/unified';
|
|
47
|
+
import remarkParse from 'https://esm.sh/remark-parse';
|
|
48
|
+
import remarkGfm from 'https://esm.sh/remark-gfm';
|
|
49
|
+
import remarkRehype from 'https://esm.sh/remark-rehype';
|
|
50
|
+
import rehypeRaw from 'https://esm.sh/rehype-raw';
|
|
51
|
+
import rehypeHighlight from 'https://esm.sh/rehype-highlight';
|
|
52
|
+
import rehypeStringify from 'https://esm.sh/rehype-stringify';
|
|
53
|
+
|
|
54
|
+
const response = await fetch('./getting-started.md');
|
|
55
|
+
const text = await response.text();
|
|
56
|
+
const result = await unified()
|
|
57
|
+
.use(remarkParse)
|
|
58
|
+
.use(remarkGfm)
|
|
59
|
+
.use(remarkRehype, { allowDangerousHtml: true })
|
|
60
|
+
.use(rehypeRaw)
|
|
61
|
+
.use(rehypeHighlight)
|
|
62
|
+
.use(rehypeStringify)
|
|
63
|
+
.process(text);
|
|
64
|
+
|
|
65
|
+
document.querySelector('main').innerHTML = String(result);
|
|
66
|
+
</script>
|
|
67
|
+
<script type="module">
|
|
68
|
+
// import "https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js";
|
|
69
|
+
// import "https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js";
|
|
70
|
+
|
|
71
|
+
function addCopyButtons() {
|
|
72
|
+
document.querySelectorAll('pre[class*="language-"]').forEach((pre) => {
|
|
73
|
+
const wrapper = document.createElement('div');
|
|
74
|
+
wrapper.className = 'pre-wrapper';
|
|
75
|
+
pre.parentNode.insertBefore(wrapper, pre);
|
|
76
|
+
wrapper.appendChild(pre);
|
|
77
|
+
const btn = document.createElement('button');
|
|
78
|
+
btn.className = 'copy-btn';
|
|
79
|
+
btn.textContent = 'Copy';
|
|
80
|
+
btn.addEventListener('click', () => {
|
|
81
|
+
const code = pre.querySelector('code');
|
|
82
|
+
const raw = code ? code.textContent : pre.textContent;
|
|
83
|
+
const text = raw.replace(/\u200B/g, '').replace(/^\n+/, '').replace(/\n+$/, '\n').replace(/^\$ /, '');
|
|
84
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
85
|
+
btn.textContent = 'Copied!';
|
|
86
|
+
setTimeout(() => { btn.textContent = 'Copy'; }, 1500);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
wrapper.appendChild(btn);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function openAccordion(id) {
|
|
94
|
+
document.querySelectorAll('auro-accordion').forEach((accordion) => {
|
|
95
|
+
accordion.removeAttribute('expanded');
|
|
96
|
+
});
|
|
97
|
+
const target = document.getElementById(id);
|
|
98
|
+
if (target) {
|
|
99
|
+
target.setAttribute('expanded', '');
|
|
100
|
+
// Wait for accordion collapse/expand animation (500ms) to finish before scrolling
|
|
101
|
+
setTimeout(() => {
|
|
102
|
+
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
103
|
+
}, 550);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
window.openAccordion = openAccordion;
|
|
108
|
+
|
|
109
|
+
// function loadMd(path) {
|
|
110
|
+
// fetch(path)
|
|
111
|
+
// .then((response) => response.text())
|
|
112
|
+
// .then((text) => {
|
|
113
|
+
// const rawHtml = marked.parse(text);
|
|
114
|
+
// document.querySelector("main").innerHTML = rawHtml;
|
|
115
|
+
// Prism.highlightAll();
|
|
116
|
+
// addCopyButtons();
|
|
117
|
+
// });
|
|
118
|
+
// }
|
|
119
|
+
|
|
120
|
+
// loadMd("./getting-started.md");
|
|
121
|
+
addCopyButtons();
|
|
122
|
+
</script>
|
|
123
|
+
<script src="./getting-started.min.js" data-demo-script="true" type="module"></script>
|
|
124
|
+
</body>
|
|
125
|
+
</html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// import { exampleFunction } from "exampleFile.js";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */
|
|
4
|
+
|
|
5
|
+
import { AuroSelect } from '../src/auro-select.js';
|
|
6
|
+
import '../../menu/src/registered.js';
|
|
7
|
+
|
|
8
|
+
AuroSelect.register(); // registering to `auro-select`
|
|
9
|
+
AuroSelect.register('custom-select');
|