@aurodesignsystem-dev/auro-formkit 0.0.0-pr1456.1 → 0.0.0-pr1457.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.
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +10 -10
- package/components/bibtemplate/dist/registered.js +10 -10
- package/components/checkbox/README.md +26 -56
- package/components/checkbox/demo/accessibility.html +48 -0
- package/components/checkbox/demo/accessibility.md +44 -0
- package/components/checkbox/demo/api.html +17 -26
- package/components/checkbox/demo/api.md +0 -396
- package/components/checkbox/demo/api.min.js +2 -2106
- package/components/checkbox/demo/customize.html +51 -0
- package/components/checkbox/demo/customize.md +361 -0
- package/components/checkbox/demo/demo-support.js +60 -0
- package/components/checkbox/demo/demo-support.min.js +55732 -0
- package/components/checkbox/demo/design.html +51 -0
- package/components/checkbox/demo/design.md +149 -0
- package/components/checkbox/demo/getting-started.html +51 -0
- package/components/checkbox/demo/getting-started.md +261 -0
- package/components/checkbox/demo/index.html +17 -21
- package/components/checkbox/demo/index.md +158 -45
- package/components/checkbox/demo/index.min.js +2 -3
- package/components/checkbox/demo/install.md +82 -0
- package/components/checkbox/demo/keyboard-behavior.html +48 -0
- package/components/checkbox/demo/readme.html +10 -18
- package/components/checkbox/demo/readme.md +26 -56
- package/components/checkbox/demo/styles.min.css +1 -0
- package/components/checkbox/demo/styles.scss +1 -0
- package/components/checkbox/demo/voiceover.html +48 -0
- package/components/checkbox/demo/voiceover.md +37 -0
- package/components/checkbox/dist/auro-checkbox-group.d.ts +6 -6
- package/components/checkbox/dist/auro-checkbox.d.ts +8 -9
- package/components/checkbox/dist/index.js +2 -3
- package/components/checkbox/dist/registered.js +2 -3
- package/components/combobox/README.md +41 -66
- package/components/combobox/demo/accessibility.html +50 -0
- package/components/combobox/demo/accessibility.md +77 -0
- package/components/combobox/demo/api.html +8 -20
- package/components/combobox/demo/api.md +54 -2334
- package/components/combobox/demo/api.min.js +3 -17971
- package/components/combobox/demo/customize.html +52 -0
- package/components/combobox/demo/customize.js +24 -0
- package/components/combobox/demo/customize.md +1249 -0
- package/components/combobox/demo/customize.min.js +177 -0
- package/components/combobox/demo/demo-support.js +60 -0
- package/components/combobox/demo/demo-support.min.js +55732 -0
- package/components/combobox/demo/design.html +53 -0
- package/components/combobox/demo/design.md +283 -0
- package/components/combobox/demo/getting-started.html +52 -0
- package/components/combobox/demo/getting-started.js +21 -0
- package/components/combobox/demo/getting-started.md +397 -0
- package/components/combobox/demo/getting-started.min.js +12 -0
- package/components/combobox/demo/index.html +16 -22
- package/components/combobox/demo/index.js +3 -2
- package/components/combobox/demo/index.md +298 -188
- package/components/combobox/demo/index.min.js +13 -17956
- package/components/combobox/demo/install.md +77 -0
- package/components/combobox/demo/{keyboardBehavior.html → keyboard-behavior.html} +5 -11
- package/components/combobox/demo/keyboard-behavior.md +276 -0
- package/components/combobox/demo/readme.html +5 -11
- package/components/combobox/demo/readme.md +41 -66
- package/components/combobox/demo/registered.min.js +18095 -0
- package/components/combobox/demo/styles.css +974 -0
- package/components/combobox/demo/styles.min.css +1 -0
- package/components/combobox/demo/styles.scss +1 -0
- package/components/combobox/demo/swap-value.min.js +16 -0
- package/components/combobox/demo/voiceover.html +59 -0
- package/components/combobox/demo/voiceover.md +118 -0
- package/components/combobox/dist/auro-combobox.d.ts +35 -35
- package/components/combobox/dist/index.js +183 -46
- package/components/combobox/dist/registered.js +183 -46
- package/components/counter/README.md +37 -55
- package/components/counter/demo/api.md +745 -813
- package/components/counter/demo/api.min.js +182 -44
- package/components/counter/demo/index.md +28 -32
- package/components/counter/demo/index.min.js +182 -44
- package/components/counter/demo/keyboard-behavior.md +127 -0
- package/components/counter/demo/readme.md +37 -55
- package/components/counter/dist/auro-counter-group.d.ts +2 -2
- package/components/counter/dist/auro-counter.d.ts +10 -10
- package/components/counter/dist/index.js +181 -43
- package/components/counter/dist/registered.js +181 -43
- package/components/datepicker/README.md +23 -51
- package/components/datepicker/demo/accessibility.html +50 -0
- package/components/datepicker/demo/accessibility.md +64 -0
- package/components/datepicker/demo/api.md +0 -1774
- package/components/datepicker/demo/api.min.js +2 -24475
- package/components/datepicker/demo/auro-datepicker.min.js +24613 -0
- package/components/datepicker/demo/customize.html +52 -0
- package/components/datepicker/demo/customize.md +723 -0
- package/components/datepicker/demo/demo-support.js +60 -0
- package/components/datepicker/demo/demo-support.min.js +55732 -0
- package/components/datepicker/demo/design.html +54 -0
- package/components/datepicker/demo/design.md +158 -0
- package/components/datepicker/demo/getting-started.html +52 -0
- package/components/datepicker/demo/getting-started.md +237 -0
- package/components/datepicker/demo/index.html +14 -35
- package/components/datepicker/demo/index.md +201 -152
- package/components/datepicker/demo/index.min.js +1 -24474
- package/components/datepicker/demo/keyboard-behavior.html +12 -33
- package/components/datepicker/demo/readme.md +23 -51
- package/components/datepicker/demo/styles.min.css +1 -0
- package/components/datepicker/demo/styles.scss +1 -0
- package/components/datepicker/demo/voiceover.html +59 -0
- package/components/datepicker/demo/voiceover.md +98 -0
- package/components/datepicker/dist/index.js +194 -57
- package/components/datepicker/dist/registered.js +194 -57
- package/components/datepicker/dist/{auro-calendar-cell.d.ts → src/auro-calendar-cell.d.ts} +2 -2
- package/components/datepicker/dist/{auro-datepicker.d.ts → src/auro-datepicker.d.ts} +13 -13
- package/components/datepicker/dist/src/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/{utilities.d.ts → src/utilities.d.ts} +4 -4
- package/components/datepicker/dist/{utilitiesCalendar.d.ts → src/utilitiesCalendar.d.ts} +3 -3
- package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +2 -2
- package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker.d.ts +1 -1
- package/components/dropdown/README.md +35 -53
- package/components/dropdown/demo/api.md +717 -773
- package/components/dropdown/demo/api.min.js +161 -23
- package/components/dropdown/demo/index.md +120 -130
- package/components/dropdown/demo/index.min.js +161 -23
- package/components/dropdown/demo/{keyboardBehavior.md → keyboard-behavior.md} +52 -57
- package/components/dropdown/demo/readme.md +35 -53
- package/components/dropdown/dist/auro-dropdown.d.ts +22 -22
- package/components/dropdown/dist/auro-dropdownBib.d.ts +3 -3
- package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +1 -1
- package/components/dropdown/dist/iconVersion.d.ts +1 -1
- package/components/dropdown/dist/index.js +160 -22
- package/components/dropdown/dist/registered.js +160 -22
- package/components/form/README.md +14 -34
- package/components/form/demo/api.md +156 -162
- package/components/form/demo/api.min.js +756 -208
- package/components/form/demo/index.md +27 -33
- package/components/form/demo/index.min.js +756 -208
- package/components/form/demo/keyboard-behavior.md +38 -0
- package/components/form/demo/readme.md +14 -34
- package/components/input/README.md +28 -53
- package/components/input/demo/accessibility.html +37 -0
- package/components/input/demo/accessibility.md +69 -0
- package/components/input/demo/api.html +17 -23
- package/components/input/demo/api.js +4 -23
- package/components/input/demo/api.md +67 -1359
- package/components/input/demo/api.min.js +1 -7453
- package/components/input/demo/auro-input.min.js +7362 -0
- package/components/input/demo/customize.html +53 -0
- package/components/input/demo/customize.js +25 -0
- package/components/input/demo/customize.md +1372 -0
- package/components/input/demo/customize.min.js +71 -0
- package/components/input/demo/demo-support.js +60 -0
- package/components/input/demo/demo-support.min.js +55732 -0
- package/components/input/demo/design.html +38 -0
- package/components/input/demo/design.md +224 -0
- package/components/input/demo/getting-started.html +52 -0
- package/components/input/demo/getting-started.js +8 -0
- package/components/input/demo/getting-started.md +312 -0
- package/components/input/demo/getting-started.min.js +9 -0
- package/components/input/demo/index.html +16 -23
- package/components/input/demo/index.js +0 -11
- package/components/input/demo/index.md +180 -154
- package/components/input/demo/index.min.js +1 -7373
- package/components/input/demo/keyboard-behavior.html +37 -0
- package/components/input/demo/readme.md +28 -53
- package/components/input/demo/styles.css +974 -0
- package/components/input/demo/styles.min.css +1 -0
- package/components/input/demo/styles.scss +1 -0
- package/components/input/demo/voiceover.html +37 -0
- package/components/input/demo/voiceover.md +70 -0
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +29 -30
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +10 -11
- package/components/input/dist/registered.js +10 -11
- package/components/menu/README.md +24 -42
- package/components/menu/demo/api.md +785 -829
- package/components/menu/demo/api.min.js +7 -7
- package/components/menu/demo/index.md +33 -35
- package/components/menu/demo/index.min.js +7 -7
- package/components/menu/demo/keyboard-behavior.md +18 -0
- package/components/menu/demo/readme.md +24 -42
- package/components/menu/dist/auro-menu-utils.d.ts +1 -1
- package/components/menu/dist/auro-menu.context.d.ts +3 -3
- package/components/menu/dist/auro-menu.d.ts +4 -4
- package/components/menu/dist/auro-menuoption.d.ts +6 -6
- package/components/menu/dist/index.js +6 -6
- package/components/menu/dist/registered.js +6 -6
- package/components/radio/README.md +22 -49
- package/components/radio/demo/accessibility.html +51 -0
- package/components/radio/demo/accessibility.md +44 -0
- package/components/radio/demo/api.html +13 -20
- package/components/radio/demo/api.md +44 -621
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/customize.html +53 -0
- package/components/radio/demo/customize.md +368 -0
- package/components/radio/demo/demo-support.js +60 -0
- package/components/radio/demo/design.html +52 -0
- package/components/radio/demo/design.md +143 -0
- package/components/radio/demo/getting-started.html +54 -0
- package/components/radio/demo/getting-started.md +296 -0
- package/components/radio/demo/index.html +16 -19
- package/components/radio/demo/index.md +124 -63
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/keyboard-behavior.html +51 -0
- package/components/radio/demo/keyboard-behavior.md +72 -0
- package/components/radio/demo/layout.md +30 -0
- package/components/radio/demo/readme.html +11 -17
- package/components/radio/demo/readme.md +22 -49
- package/components/radio/demo/styles.css +974 -0
- package/components/radio/demo/voiceover.html +51 -0
- package/components/radio/demo/voiceover.md +43 -0
- package/components/radio/dist/auro-radio-group.d.ts +9 -9
- package/components/radio/dist/auro-radio.d.ts +8 -8
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/README.md +50 -68
- package/components/select/demo/accessibility.html +50 -0
- package/components/select/demo/accessibility.md +76 -0
- package/components/select/demo/api.html +5 -17
- package/components/select/demo/api.md +52 -2422
- package/components/select/demo/customize.html +52 -0
- package/components/select/demo/customize.js +11 -0
- package/components/select/demo/customize.md +1049 -0
- package/components/select/demo/customize.min.js +12 -0
- package/components/select/demo/demo-support.js +60 -0
- package/components/select/demo/demo-support.min.js +55732 -0
- package/components/select/demo/design.html +51 -0
- package/components/select/demo/design.md +391 -0
- package/components/select/demo/getting-started.html +52 -0
- package/components/select/demo/getting-started.js +26 -0
- package/components/select/demo/getting-started.md +412 -0
- package/components/select/demo/getting-started.min.js +56 -0
- package/components/select/demo/index.html +18 -35
- package/components/select/demo/index.js +5 -3
- package/components/select/demo/index.md +165 -345
- package/components/select/demo/index.min.js +6 -10484
- package/components/select/demo/install.md +95 -0
- package/components/select/demo/keyboard-behavior.html +8 -39
- package/components/select/demo/keyboard-behavior.md +249 -0
- package/components/select/demo/keyboardBehavior.html +5 -38
- package/components/select/demo/layout.html +51 -0
- package/components/select/demo/readme.html +5 -13
- package/components/select/demo/readme.md +50 -68
- package/components/select/demo/{api.min.js → registered.min.js} +179 -151
- package/components/select/demo/styles.min.css +1 -0
- package/components/select/demo/styles.scss +1 -0
- package/components/select/demo/voiceover.html +48 -0
- package/components/select/demo/voiceover.md +183 -0
- package/components/select/dist/auro-select.d.ts +11 -11
- package/components/select/dist/index.js +171 -33
- package/components/select/dist/registered.js +171 -33
- package/custom-elements.json +1491 -1494
- package/package.json +37 -30
- package/components/checkbox/demo/keyboardBehavior.md +0 -0
- package/components/combobox/demo/keyboardBehavior.md +0 -281
- package/components/counter/demo/keyboardBehavior.md +0 -127
- package/components/datepicker/demo/keyboardBehavior.md +0 -19
- package/components/datepicker/dist/iconVersion.d.ts +0 -2
- package/components/form/demo/keyboardBehavior.md +0 -0
- package/components/input/demo/keyboardBehavior.md +0 -0
- package/components/menu/demo/keyboardBehavior.md +0 -0
- package/components/radio/demo/keyboardBehavior.md +0 -0
- package/components/select/demo/api.js +0 -39
- package/components/select/demo/keyboardBehavior.md +0 -245
- /package/components/datepicker/dist/{auro-calendar-month.d.ts → src/auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{auro-calendar.d.ts → src/auro-calendar.d.ts} +0 -0
- /package/components/datepicker/dist/{buttonVersion.d.ts → src/buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{datepickerKeyboardStrategy.d.ts → src/datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/components/datepicker/dist/{popoverVersion.d.ts → src/popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{utilitiesCalendarRender.d.ts → src/utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<auro-header level="1" id="install">Install</auro-header>
|
|
2
|
+
<auro-header level="2" id="npmInstall">NPM Installation</auro-header>
|
|
3
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/templates/componentInstall.md) -->
|
|
4
|
+
<!-- The below content is automatically added from ./../../../docs/templates/componentInstall.md -->
|
|
5
|
+
|
|
6
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/</code></pre>
|
|
7
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
8
|
+
<auro-header level="2" id="gettingStarted">Getting Started</auro-header>
|
|
9
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/templates/gettingStarted.md) -->
|
|
10
|
+
<!-- The below content is automatically added from ./../../../docs/templates/gettingStarted.md -->
|
|
11
|
+
|
|
12
|
+
### TypeScript Module Resolution
|
|
13
|
+
|
|
14
|
+
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
15
|
+
|
|
16
|
+
<pre class="language-json"><code class="language-json">{
|
|
17
|
+
"compilerOptions": {
|
|
18
|
+
"moduleResolution": "bundler"
|
|
19
|
+
}
|
|
20
|
+
}</code></pre>
|
|
21
|
+
|
|
22
|
+
This configuration enables proper module resolution for the component's TypeScript files.
|
|
23
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
24
|
+
<auro-header level="2" id="defaultSetup">Default Component Setup</auro-header>
|
|
25
|
+
Once installed, the component can be used in your project by importing the component's registered module:
|
|
26
|
+
|
|
27
|
+
<pre class="language-js"><code class="language-js">import '@aurodesignsystem/auro-formkit/auro-combobox';</code></pre>
|
|
28
|
+
|
|
29
|
+
This import registers the `<auro-combobox>` custom element globally. You can then use it in your HTML:
|
|
30
|
+
|
|
31
|
+
<pre class="language-html"><code class="language-html"><auro-combobox>
|
|
32
|
+
<span slot="label">Choose an option</span>
|
|
33
|
+
<auro-menu>
|
|
34
|
+
<auro-menuoption value="option1">Option 1</auro-menuoption>
|
|
35
|
+
<auro-menuoption value="option2">Option 2</auro-menuoption>
|
|
36
|
+
</auro-menu>
|
|
37
|
+
</auro-combobox></code></pre>
|
|
38
|
+
|
|
39
|
+
<auro-header level="2" id="cdn">Install from CDN</auro-header>
|
|
40
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/templates/bundleInstallDescription.md) -->
|
|
41
|
+
<!-- The below content is automatically added from ./../../../docs/templates/bundleInstallDescription.md -->
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/@latest/auro-combobox/+esm"></script></code></pre>
|
|
45
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
46
|
+
<auro-header level="2" id="customRegistration">Custom Component Registration</auro-header>
|
|
47
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/customRegistration.md) -->
|
|
48
|
+
<!-- The below content is automatically added from ./../docs/partials/customRegistration.md -->
|
|
49
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/partials/customRegistrationDescription.md) -->
|
|
50
|
+
<!-- The below content is automatically added from ./../../../docs/partials/customRegistrationDescription.md -->
|
|
51
|
+
<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>
|
|
52
|
+
<p>The default import (shown above) handles both steps automatically, registering the component under its standard tag name.</p>
|
|
53
|
+
<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>
|
|
54
|
+
<p>To do this, import the component class directly and call its <code>register(name)</code> method with a unique name:</p>
|
|
55
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
56
|
+
|
|
57
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
58
|
+
import { AuroCombobox } from '@aurodesignsystem/auro-formkit/auro-combobox/class';
|
|
59
|
+
|
|
60
|
+
// Register with a custom name if desired
|
|
61
|
+
AuroCombobox.register('custom-combobox');</code></pre>
|
|
62
|
+
|
|
63
|
+
This will create a new custom element `<custom-combobox>` that behaves exactly like `<auro-combobox>`, allowing both to coexist on the same page without interfering with each other.
|
|
64
|
+
|
|
65
|
+
<pre class="language-html"><code class="language-html"><custom-combobox>
|
|
66
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
67
|
+
<span slot="label">Name</span>
|
|
68
|
+
<auro-menu>
|
|
69
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
70
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
71
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
72
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
73
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
74
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
75
|
+
</auro-menu>
|
|
76
|
+
</custom-combobox></code></pre>
|
|
77
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -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-combobox</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-combobox'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,6 +33,7 @@
|
|
|
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.min.css" />
|
|
36
37
|
<style>
|
|
37
38
|
table {
|
|
38
39
|
--ds-color-container-secondary-default: transparent;
|
|
@@ -63,15 +64,8 @@
|
|
|
63
64
|
<main></main>
|
|
64
65
|
|
|
65
66
|
<script type="module">
|
|
66
|
-
import '
|
|
67
|
-
|
|
68
|
-
fetch('./keyboardBehavior.md')
|
|
69
|
-
.then((response) => response.text())
|
|
70
|
-
.then((text) => {
|
|
71
|
-
const rawHtml = marked.parse(text);
|
|
72
|
-
document.querySelector('main').innerHTML = rawHtml;
|
|
73
|
-
Prism.highlightAll();
|
|
74
|
-
})
|
|
67
|
+
import { renderPage } from './demo-support.js';
|
|
68
|
+
await renderPage('./keyboard-behavior.md');
|
|
75
69
|
</script>
|
|
76
70
|
|
|
77
71
|
<!-- If additional elements are needed for the demo, add them here. -->
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
<auro-header level="1" id="overview">Combobox - Keyboard Behavior</auro-header>
|
|
2
|
+
<div class="contentWrapper">
|
|
3
|
+
<div class="mainContent">
|
|
4
|
+
<div class="scrollWrapper">
|
|
5
|
+
<auro-header level="2" id="tabBehavior">Tab Behavior</auro-header>
|
|
6
|
+
<p>The component trigger contains an <code><auro-input></code> which has two elements:</p>
|
|
7
|
+
<ol>
|
|
8
|
+
<li><strong>Input</strong></li>
|
|
9
|
+
<li><strong>Clear button:</strong> only shown when the input has a value.</li>
|
|
10
|
+
</ol>
|
|
11
|
+
<p>Each focusable element <em>(when shown)</em> participates in the browser window's default <code>tabindex</code> sequence.</p>
|
|
12
|
+
<p>When the component is <code>disabled</code> it is removed from the <code>tabindex</code> sequence. VoiceOver's virtual cursor <em>(swipe navigation)</em> can still encounter the component, but standard keyboard <code>Tab</code> navigation skips it.</p>
|
|
13
|
+
<p>On <strong>large viewport devices</strong> (e.g., desktop browser, tablet) there is no focusable content inside the component bib.</p>
|
|
14
|
+
<p>On <strong>small viewport devices</strong> (e.g., phone) the bib opens a modal dialog with a focusable <strong>input</strong> and <strong>clear button</strong> which can receive <strong>Click</strong> and <strong>Tap</strong> events.</p>
|
|
15
|
+
<auro-header level="2" id="keyEvents">Key Events</auro-header>
|
|
16
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/keyboard-behavior/keyEvents.md) -->
|
|
17
|
+
<!-- The below content is automatically added from ./../docs/partials/keyboard-behavior/keyEvents.md -->
|
|
18
|
+
<div class="note">
|
|
19
|
+
<p><strong>Static vs Dynamic Option List:</strong> The <strong>expanded</strong> state can never be applied without list options rendered into the DOM. Since the component supports dynamic option lists generated <em>after</em> a value is typed into the <strong>input</strong>, certain key events (as noted in the <strong>Current State</strong> column of the table below) only function with the option list rendered into the DOM.</p>
|
|
20
|
+
</div>
|
|
21
|
+
<table>
|
|
22
|
+
<thead>
|
|
23
|
+
<tr>
|
|
24
|
+
<th>Key</th>
|
|
25
|
+
<th>Modifier</th>
|
|
26
|
+
<th>Current State</th>
|
|
27
|
+
<th>Focus Element</th>
|
|
28
|
+
<th>Behavior</th>
|
|
29
|
+
</tr>
|
|
30
|
+
</thead>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr>
|
|
33
|
+
<td rowspan="6">ArrowDown</td>
|
|
34
|
+
<td rowspan="2">-</td>
|
|
35
|
+
<td>Collapsed, list options have been populated</td>
|
|
36
|
+
<td>
|
|
37
|
+
Trigger input element, <strong>NOT</strong> the trigger input clear button
|
|
38
|
+
</td>
|
|
39
|
+
<td>Opens the bib.</td>
|
|
40
|
+
</tr>
|
|
41
|
+
<tr>
|
|
42
|
+
<td>Expanded</td>
|
|
43
|
+
<td>
|
|
44
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
45
|
+
<div class="note">
|
|
46
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs depending on viewport size.
|
|
47
|
+
</div>
|
|
48
|
+
</td>
|
|
49
|
+
<td>
|
|
50
|
+
Advances the <code>focused</code> option to the next enabled option in the list. If the current <code>focused</code> option is the last enabled option, selection wraps to the first enabled option.
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td rowspan="2">Command</td>
|
|
55
|
+
<td>Collapsed, list options have been populated</td>
|
|
56
|
+
<td>
|
|
57
|
+
Trigger input element, <strong>NOT</strong> the trigger input clear button
|
|
58
|
+
</td>
|
|
59
|
+
<td>Opens the bib.</td>
|
|
60
|
+
</tr>
|
|
61
|
+
<tr>
|
|
62
|
+
<td>Expanded</td>
|
|
63
|
+
<td>
|
|
64
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
65
|
+
<div class="note">
|
|
66
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
67
|
+
</div>
|
|
68
|
+
</td>
|
|
69
|
+
<td>
|
|
70
|
+
Advances the <code>focused</code> option to the last enabled option in the list.
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
<tr>
|
|
74
|
+
<td rowspan="2">Option</td>
|
|
75
|
+
<td>Collapsed, list options have been populated</td>
|
|
76
|
+
<td>
|
|
77
|
+
Trigger input element, <strong>NOT</strong> the trigger input clear button
|
|
78
|
+
</td>
|
|
79
|
+
<td>Opens the bib.</td>
|
|
80
|
+
</tr>
|
|
81
|
+
<tr>
|
|
82
|
+
<td>Expanded</td>
|
|
83
|
+
<td>
|
|
84
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
85
|
+
<div class="note">
|
|
86
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
87
|
+
</div>
|
|
88
|
+
</td>
|
|
89
|
+
<td>
|
|
90
|
+
Advances the <code>focused</code> option to the last enabled option in the list.
|
|
91
|
+
</td>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<td rowspan="6">ArrowUp</td>
|
|
95
|
+
<td rowspan="2">-</td>
|
|
96
|
+
<td>Collapsed, list options have been populated</td>
|
|
97
|
+
<td>
|
|
98
|
+
Trigger input element, <strong>NOT</strong> the trigger input clear button
|
|
99
|
+
</td>
|
|
100
|
+
<td>Opens the bib.</td>
|
|
101
|
+
</tr>
|
|
102
|
+
<tr>
|
|
103
|
+
<td>Expanded</td>
|
|
104
|
+
<td>
|
|
105
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
106
|
+
<div class="note">
|
|
107
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
108
|
+
</div>
|
|
109
|
+
</td>
|
|
110
|
+
<td>
|
|
111
|
+
Advances the <code>focused</code> option to the previous enabled option in the list. If the current <code>focused</code> option is the first enabled option, selection wraps to the last enabled option.
|
|
112
|
+
</td>
|
|
113
|
+
</tr>
|
|
114
|
+
<tr>
|
|
115
|
+
<td rowspan="2">Command</td>
|
|
116
|
+
<td>Collapsed, list options have been populated</td>
|
|
117
|
+
<td>
|
|
118
|
+
Trigger input element, <strong>NOT</strong> the trigger input clear button
|
|
119
|
+
</td>
|
|
120
|
+
<td>Opens the bib.</td>
|
|
121
|
+
</tr>
|
|
122
|
+
<tr>
|
|
123
|
+
<td>Expanded</td>
|
|
124
|
+
<td>
|
|
125
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
126
|
+
<div class="note">
|
|
127
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
128
|
+
</div>
|
|
129
|
+
</td>
|
|
130
|
+
<td>
|
|
131
|
+
Advances the <code>focused</code> option to the first enabled option in the list.
|
|
132
|
+
</td>
|
|
133
|
+
</tr>
|
|
134
|
+
<tr>
|
|
135
|
+
<td rowspan="2">Option</td>
|
|
136
|
+
<td>Collapsed, list options have been populated</td>
|
|
137
|
+
<td>
|
|
138
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
139
|
+
</td>
|
|
140
|
+
<td>Opens the bib.</td>
|
|
141
|
+
</tr>
|
|
142
|
+
<tr>
|
|
143
|
+
<td>Expanded</td>
|
|
144
|
+
<td>
|
|
145
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
146
|
+
<div class="note">
|
|
147
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
148
|
+
</div>
|
|
149
|
+
</td>
|
|
150
|
+
<td>
|
|
151
|
+
Advances the <code>focused</code> option to the first enabled option in the list.
|
|
152
|
+
</td>
|
|
153
|
+
</tr>
|
|
154
|
+
<tr>
|
|
155
|
+
<td>End</td>
|
|
156
|
+
<td>-</td>
|
|
157
|
+
<td>Expanded</td>
|
|
158
|
+
<td>
|
|
159
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
160
|
+
<div class="note">
|
|
161
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
162
|
+
</div>
|
|
163
|
+
</td>
|
|
164
|
+
<td>
|
|
165
|
+
Advances the <code>focused</code> option to the last enabled option in the list.
|
|
166
|
+
</td>
|
|
167
|
+
</tr>
|
|
168
|
+
<tr>
|
|
169
|
+
<td rowspan="4">Enter</td>
|
|
170
|
+
<td rowspan="4">-</td>
|
|
171
|
+
<td>Collapsed, list options have been populated</td>
|
|
172
|
+
<td>
|
|
173
|
+
Trigger input, <strong>NOT</strong> the input clear button
|
|
174
|
+
</td>
|
|
175
|
+
<td>
|
|
176
|
+
The bib is opened.
|
|
177
|
+
</td>
|
|
178
|
+
</tr>
|
|
179
|
+
<tr>
|
|
180
|
+
<td>Collapsed</td>
|
|
181
|
+
<td>
|
|
182
|
+
Input clear button, <strong>NOT</strong> the input element
|
|
183
|
+
</td>
|
|
184
|
+
<td>
|
|
185
|
+
The <strong>input</strong> value is cleared, <strong>focus</strong> moves to the trigger input element.
|
|
186
|
+
</td>
|
|
187
|
+
</tr>
|
|
188
|
+
<tr>
|
|
189
|
+
<td>Expanded, large viewport device</td>
|
|
190
|
+
<td>
|
|
191
|
+
Trigger input element, <strong>NOT</strong> the trigger input clear button
|
|
192
|
+
</td>
|
|
193
|
+
<td>
|
|
194
|
+
The current <code>focused</code> option is selected, closes the bib and <strong>focus</strong> is returned to the trigger input element.
|
|
195
|
+
</td>
|
|
196
|
+
</tr>
|
|
197
|
+
<tr>
|
|
198
|
+
<td>Expanded, small viewport device</td>
|
|
199
|
+
<td>
|
|
200
|
+
Dialog input element, <strong>NOT</strong> the dialog input clear button
|
|
201
|
+
</td>
|
|
202
|
+
<td>
|
|
203
|
+
The current <code>focused</code> option is selected, closes the bib and <strong>focus</strong> is returned to the trigger input element.
|
|
204
|
+
</td>
|
|
205
|
+
</tr>
|
|
206
|
+
<tr>
|
|
207
|
+
<td>Escape</td>
|
|
208
|
+
<td>-</td>
|
|
209
|
+
<td>Expanded</td>
|
|
210
|
+
<td>
|
|
211
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
212
|
+
<div class="note">
|
|
213
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
214
|
+
</div>
|
|
215
|
+
</td>
|
|
216
|
+
<td>
|
|
217
|
+
Closes the bib, moves <strong>focus</strong> to the trigger input element.
|
|
218
|
+
</td>
|
|
219
|
+
</tr>
|
|
220
|
+
<tr>
|
|
221
|
+
<td>Home</td>
|
|
222
|
+
<td>-</td>
|
|
223
|
+
<td>Expanded</td>
|
|
224
|
+
<td>
|
|
225
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
226
|
+
<div class="note">
|
|
227
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
228
|
+
</div>
|
|
229
|
+
</td>
|
|
230
|
+
<td>
|
|
231
|
+
Advances the <code>focused</code> option to the first enabled option in the list.
|
|
232
|
+
</td>
|
|
233
|
+
</tr>
|
|
234
|
+
<tr>
|
|
235
|
+
<td rowspan="2">Tab</td>
|
|
236
|
+
<td>-</td>
|
|
237
|
+
<td>Expanded</td>
|
|
238
|
+
<td>
|
|
239
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
240
|
+
<div class="note">
|
|
241
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
242
|
+
</div>
|
|
243
|
+
</td>
|
|
244
|
+
<td>
|
|
245
|
+
The current <code>focused</code> option is selected, the bib is closed and <strong>focus</strong> is moved to the <strong>clear button</strong> in the component trigger.
|
|
246
|
+
</td>
|
|
247
|
+
</tr>
|
|
248
|
+
<tr>
|
|
249
|
+
<td>Shift</td>
|
|
250
|
+
<td>Expanded</td>
|
|
251
|
+
<td>
|
|
252
|
+
Input element, <strong>NOT</strong> the input clear button
|
|
253
|
+
<div class="note">
|
|
254
|
+
<strong>Note:</strong> Includes both trigger and bib content inputs.
|
|
255
|
+
</div>
|
|
256
|
+
</td>
|
|
257
|
+
<td>
|
|
258
|
+
Advances the <code>focused</code> option to the first enabled option in the list.
|
|
259
|
+
<div class="note">
|
|
260
|
+
<strong>Note:</strong> the bib will <strong>NOT</strong> close and the page will <strong>NOT</strong> navigate to the previous focusable element in the tabindex order.
|
|
261
|
+
</div>
|
|
262
|
+
</td>
|
|
263
|
+
</tr>
|
|
264
|
+
</tbody>
|
|
265
|
+
</table>
|
|
266
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
267
|
+
<div class="note">
|
|
268
|
+
<p><strong>Note:</strong> The following keyboard behavior is unsupported at this time:</p>
|
|
269
|
+
<ul>
|
|
270
|
+
<li><strong>PageUp:</strong> The browser moves the <code>focused</code> option up by approximately one <strong>page</strong> of visible options (typically equal to the number of rendered rows). The scroll position updates in tandem so that the newly focused option is brought into view, usually aligning near the top of the visible list.</li>
|
|
271
|
+
<li><strong>PageDown:</strong> The browser advances the <code>focused</code> option down by approximately one <strong>page</strong> of visible items (typically equal to the number of rendered rows). The scroll position updates accordingly so the newly focused option is brought into view, often aligning near the bottom of the visible list.</li>
|
|
272
|
+
</ul>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
@@ -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-combobox</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-combobox'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,14 @@
|
|
|
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.min.css" />
|
|
36
37
|
</head>
|
|
37
38
|
<body class="auro-markdown">
|
|
38
39
|
<main></main>
|
|
39
40
|
|
|
40
41
|
<script type="module">
|
|
41
|
-
import '
|
|
42
|
-
|
|
43
|
-
fetch('./readme.md')
|
|
44
|
-
.then((response) => response.text())
|
|
45
|
-
.then((text) => {
|
|
46
|
-
const rawHtml = marked.parse(text);
|
|
47
|
-
document.querySelector('main').innerHTML = rawHtml;
|
|
48
|
-
Prism.highlightAll();
|
|
49
|
-
})
|
|
42
|
+
import { renderPage } from './demo-support.js';
|
|
43
|
+
await renderPage('./readme.md');
|
|
50
44
|
</script>
|
|
51
45
|
<script src="./index.min.js" data-demo-script="true" type="module"></script>
|
|
52
46
|
|
|
@@ -21,9 +21,19 @@ The following sections are editable by making changes to the following files:
|
|
|
21
21
|
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
23
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
<p><code><auro-combobox></code> combines a text input with a filterable dropdown menu, letting users either type a value or pick one from a list. As the user types, the menu narrows to show only matching options.</p>
|
|
25
|
+
<p>The component supports two modes:</p>
|
|
26
|
+
<ul>
|
|
27
|
+
<li><strong>Suggestion (default)</strong> — The user may type any value. The menu provides suggestions but does not restrict input.</li>
|
|
28
|
+
<li><strong>Filter</strong> — The user must select from the menu. Typing filters the available options but does not set the component's value. The value is only set when a menu option is selected.</li>
|
|
29
|
+
</ul>
|
|
30
|
+
<p>Common use cases:</p>
|
|
31
|
+
<ul>
|
|
32
|
+
<li><strong>Airport or city search</strong> — Type a city name or airport code to filter a long list of destinations.</li>
|
|
33
|
+
<li><strong>Country or region selection</strong> — Quickly find and select from a large set of geographic options.</li>
|
|
34
|
+
<li><strong>Autocomplete fields</strong> — Provide type-ahead suggestions for form fields where the set of valid values is known.</li>
|
|
35
|
+
<li><strong>Search with suggestions</strong> — Offer recommended results while still allowing freeform input.</li>
|
|
36
|
+
</ul>
|
|
27
37
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
28
38
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
29
39
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
@@ -50,11 +60,7 @@ The `<auro-combobox>` element should be used in situations where users may:
|
|
|
50
60
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
51
61
|
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
52
62
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```shell
|
|
56
|
-
$ npm i @aurodesignsystem/auro-formkit
|
|
57
|
-
```
|
|
63
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/</code></pre>
|
|
58
64
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
59
65
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
60
66
|
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
@@ -63,13 +69,11 @@ $ npm i @aurodesignsystem/auro-formkit
|
|
|
63
69
|
|
|
64
70
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
{
|
|
72
|
+
<pre class="language-json"><code class="language-json">{
|
|
68
73
|
"compilerOptions": {
|
|
69
74
|
"moduleResolution": "bundler"
|
|
70
75
|
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
76
|
+
}</code></pre>
|
|
73
77
|
|
|
74
78
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
75
79
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -80,9 +84,7 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
80
84
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
81
85
|
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.
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-combobox/+esm"></script>
|
|
85
|
-
```
|
|
87
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/@latest/auro-combobox/+esm"></script></code></pre>
|
|
86
88
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
87
89
|
|
|
88
90
|
## Formkit Development
|
|
@@ -96,63 +98,36 @@ Running the `dev` command will open a `localhost` development server for all com
|
|
|
96
98
|
|
|
97
99
|
To only develop a single component, use the `--filter` flag:
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
101
|
-
```
|
|
101
|
+
<pre class="language-shell"><code class="language-shell">npx turbo dev --filter=@aurodesignsystem/auro-input</code></pre>
|
|
102
102
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
103
103
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
104
|
-
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
104
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
105
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/partials/customRegistrationDescription.md) -->
|
|
106
|
+
<!-- The below content is automatically added from ./../../../docs/partials/customRegistrationDescription.md -->
|
|
107
|
+
<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>
|
|
108
|
+
<p>The default import (shown above) handles both steps automatically, registering the component under its standard tag name.</p>
|
|
109
|
+
<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>
|
|
110
|
+
<p>To do this, import the component class directly and call its <code>register(name)</code> method with a unique name:</p>
|
|
111
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
105
112
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
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.
|
|
109
|
-
|
|
110
|
-
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
111
|
-
|
|
112
|
-
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.
|
|
113
|
-
|
|
114
|
-
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
115
|
-
|
|
116
|
-
```js
|
|
117
|
-
// Import the class only
|
|
113
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
118
114
|
import { AuroCombobox } from '@aurodesignsystem/auro-formkit/auro-combobox/class';
|
|
119
|
-
|
|
115
|
+
|
|
120
116
|
// Register with a custom name if desired
|
|
121
|
-
AuroCombobox.register('custom-combobox')
|
|
122
|
-
```
|
|
117
|
+
AuroCombobox.register('custom-combobox');</code></pre>
|
|
123
118
|
|
|
124
119
|
This will create a new custom element `<custom-combobox>` that behaves exactly like `<auro-combobox>`, allowing both to coexist on the same page without interfering with each other.
|
|
125
120
|
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
</custom-combobox>
|
|
139
|
-
</div>
|
|
140
|
-
<auro-accordion alignRight>
|
|
141
|
-
<span slot="trigger">See code</span>
|
|
142
|
-
|
|
143
|
-
```html
|
|
144
|
-
<custom-combobox>
|
|
145
|
-
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
146
|
-
<span slot="label">Name</span>
|
|
147
|
-
<auro-menu>
|
|
148
|
-
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
149
|
-
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
150
|
-
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
151
|
-
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
152
|
-
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
153
|
-
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
154
|
-
</auro-menu>
|
|
155
|
-
</custom-combobox>
|
|
156
|
-
```
|
|
157
|
-
</auro-accordion>
|
|
121
|
+
<pre class="language-html"><code class="language-html"><custom-combobox>
|
|
122
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
123
|
+
<span slot="label">Name</span>
|
|
124
|
+
<auro-menu>
|
|
125
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
126
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
127
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
128
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
129
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
130
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
131
|
+
</auro-menu>
|
|
132
|
+
</custom-combobox></code></pre>
|
|
158
133
|
<!-- AURO-GENERATED-CONTENT:END -->
|