@aurodesignsystem-dev/auro-formkit 0.0.0-pr1448.0 → 0.0.0-pr1451.1
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/demo/api.md +201 -221
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.md +21 -23
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/keyboard-behavior.md +39 -0
- package/components/checkbox/demo/readme.md +23 -35
- package/components/checkbox/dist/auro-checkbox-group.d.ts +6 -6
- package/components/checkbox/dist/auro-checkbox.d.ts +8 -8
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/README.md +13 -3
- package/components/combobox/demo/accessibility.html +57 -0
- package/components/combobox/demo/accessibility.md +77 -0
- package/components/combobox/demo/api.html +24 -0
- package/components/combobox/demo/api.md +1613 -1685
- package/components/combobox/demo/api.min.js +15 -21
- package/components/combobox/demo/design.html +83 -0
- package/components/combobox/demo/design.md +283 -0
- package/components/combobox/demo/index.html +49 -16
- package/components/combobox/demo/index.js +3 -2
- package/components/combobox/demo/index.md +861 -185
- package/components/combobox/demo/index.min.js +41 -22
- package/components/combobox/demo/install.html +84 -0
- package/components/combobox/demo/install.js +24 -0
- package/components/combobox/demo/install.md +100 -0
- package/components/combobox/demo/install.min.js +17991 -0
- package/components/combobox/demo/{keyboardBehavior.html → keyboard-behavior.html} +2 -1
- package/components/combobox/demo/keyboard-behavior.md +276 -0
- package/components/combobox/demo/layout.md +112 -0
- package/components/combobox/demo/readme.html +25 -1
- package/components/combobox/demo/readme.md +50 -52
- package/components/combobox/demo/styles.css +141 -0
- package/components/combobox/demo/voiceover.html +66 -0
- package/components/combobox/demo/voiceover.md +118 -0
- package/components/combobox/dist/auro-combobox.d.ts +36 -36
- package/components/combobox/dist/index.js +12 -17
- package/components/combobox/dist/registered.js +12 -17
- package/components/counter/demo/api.md +751 -819
- package/components/counter/demo/api.min.js +2 -2
- package/components/counter/demo/index.md +35 -39
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/demo/keyboard-behavior.md +127 -0
- package/components/counter/demo/readme.md +39 -51
- 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 +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/api.md +827 -931
- package/components/datepicker/demo/api.min.js +4 -4
- package/components/datepicker/demo/index.md +79 -87
- package/components/datepicker/demo/index.min.js +4 -4
- package/components/datepicker/demo/keyboard-behavior.md +19 -0
- package/components/datepicker/demo/readme.md +19 -31
- package/components/datepicker/dist/index.js +4 -4
- package/components/datepicker/dist/registered.js +4 -4
- 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/{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/demo/api.md +795 -851
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/index.md +145 -155
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/demo/keyboard-behavior.md +72 -0
- package/components/dropdown/demo/readme.md +39 -51
- 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/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/api.md +173 -179
- package/components/form/demo/api.min.js +27 -33
- package/components/form/demo/index.md +27 -33
- package/components/form/demo/index.min.js +27 -33
- package/components/form/demo/keyboard-behavior.md +38 -0
- package/components/form/demo/readme.md +14 -28
- package/components/input/demo/api.md +572 -664
- package/components/input/demo/api.min.js +2 -2
- package/components/input/demo/index.md +93 -99
- package/components/input/demo/index.min.js +2 -2
- package/components/input/demo/keyboard-behavior.md +25 -0
- package/components/input/demo/readme.md +17 -29
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +29 -29
- package/components/input/dist/index.js +2 -2
- package/components/input/dist/registered.js +2 -2
- package/components/menu/demo/api.md +745 -789
- package/components/menu/demo/api.min.js +3 -4
- package/components/menu/demo/index.md +35 -37
- package/components/menu/demo/index.min.js +3 -4
- package/components/menu/demo/keyboard-behavior.md +18 -0
- package/components/menu/demo/readme.md +23 -35
- 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 +5 -5
- package/components/menu/dist/auro-menuoption.d.ts +6 -6
- package/components/menu/dist/index.js +3 -4
- package/components/menu/dist/registered.js +3 -4
- package/components/radio/demo/api.md +318 -350
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.md +25 -29
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/keyboard-behavior.md +72 -0
- package/components/radio/demo/readme.md +21 -33
- 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 +12 -1
- package/components/select/demo/accessibility.html +65 -0
- package/components/select/demo/accessibility.md +76 -0
- package/components/select/demo/api.md +1713 -1793
- package/components/select/demo/api.min.js +5 -6
- package/components/select/demo/index.html +247 -37
- package/components/select/demo/index.md +225 -345
- package/components/select/demo/index.min.js +5 -6
- package/components/select/demo/keyboard-behavior.md +39 -0
- package/components/select/demo/layout.html +59 -0
- package/components/select/demo/layout.md +299 -0
- package/components/select/demo/readme.md +45 -46
- package/components/select/demo/voiceover.html +65 -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 +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +13 -11
- package/package.json +26 -26
- 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/dropdown/demo/keyboardBehavior.md +0 -77
- 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/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/{iconVersion.d.ts → src/iconVersion.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
|
@@ -1322,13 +1322,10 @@ class MenuService {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
|
|
1324
1324
|
const optionsSet = new Set(optionsToDeselect);
|
|
1325
|
-
const previousCount = this.selectedOptions.length;
|
|
1326
1325
|
this.selectedOptions = (this.selectedOptions || [])
|
|
1327
1326
|
.filter(opt => !optionsSet.has(opt));
|
|
1328
1327
|
|
|
1329
|
-
|
|
1330
|
-
this.stageUpdate();
|
|
1331
|
-
}
|
|
1328
|
+
this.stageUpdate();
|
|
1332
1329
|
}
|
|
1333
1330
|
|
|
1334
1331
|
/**
|
|
@@ -1748,6 +1745,8 @@ class AuroMenu extends AuroElement {
|
|
|
1748
1745
|
*/
|
|
1749
1746
|
this.size = "sm";
|
|
1750
1747
|
|
|
1748
|
+
// Value of the selected options
|
|
1749
|
+
this.value = undefined;
|
|
1751
1750
|
// Currently selected option
|
|
1752
1751
|
this.optionSelected = undefined;
|
|
1753
1752
|
// String used for highlighting/filtering
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
THIS PAGE'S CONTENT SHOULD BE KEPT MINIMAL.
|
|
3
|
+
ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE — THE BASIC EXAMPLE IS USUALLY ENOUGH.
|
|
4
|
+
ALL OTHER EXAMPLES SHOULD GO IN THE API DOCUMENTATION.
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
7
|
# Menu
|
|
@@ -29,44 +29,42 @@ The `<auro-menu>` element should be used in situations where users may:
|
|
|
29
29
|
### Basic
|
|
30
30
|
|
|
31
31
|
<div class="exampleWrapper">
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/preselect.html) -->
|
|
33
|
+
<!-- The below content is automatically added from ./../apiExamples/preselect.html -->
|
|
34
|
+
<auro-menu>
|
|
35
|
+
<auro-menuoption value="new tab">New tab</auro-menuoption>
|
|
36
|
+
<auro-menuoption value="new window" selected>New window</auro-menuoption>
|
|
37
|
+
<auro-menuoption value="open file">Open file</auro-menuoption>
|
|
38
|
+
<auro-menuoption value="open location">Open location</auro-menuoption>
|
|
39
|
+
<hr>
|
|
40
|
+
<auro-menuoption value="close window">Close window</auro-menuoption>
|
|
41
|
+
<auro-menuoption value="close tab" disabled>Close tab</auro-menuoption>
|
|
42
|
+
<auro-menuoption value="save page as...">Save page as...</auro-menuoption>
|
|
43
|
+
<hr>
|
|
44
|
+
<auro-menuoption value="share" disabled>Share</auro-menuoption>
|
|
45
|
+
<hr>
|
|
46
|
+
<auro-menuoption value="print">Print</auro-menuoption>
|
|
47
|
+
</auro-menu>
|
|
48
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
49
49
|
</div>
|
|
50
50
|
<auro-accordion alignRight>
|
|
51
|
-
|
|
51
|
+
<span slot="trigger">See code</span>
|
|
52
52
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/preselect.html) -->
|
|
53
53
|
<!-- The below code snippet is automatically added from ./../apiExamples/preselect.html -->
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</auro-menu>
|
|
70
|
-
```
|
|
55
|
+
<pre class="language-html"><code class="language-html"><auro-menu>
|
|
56
|
+
<auro-menuoption value="new tab">New tab</auro-menuoption>
|
|
57
|
+
<auro-menuoption value="new window" selected>New window</auro-menuoption>
|
|
58
|
+
<auro-menuoption value="open file">Open file</auro-menuoption>
|
|
59
|
+
<auro-menuoption value="open location">Open location</auro-menuoption>
|
|
60
|
+
<hr>
|
|
61
|
+
<auro-menuoption value="close window">Close window</auro-menuoption>
|
|
62
|
+
<auro-menuoption value="close tab" disabled>Close tab</auro-menuoption>
|
|
63
|
+
<auro-menuoption value="save page as...">Save page as...</auro-menuoption>
|
|
64
|
+
<hr>
|
|
65
|
+
<auro-menuoption value="share" disabled>Share</auro-menuoption>
|
|
66
|
+
<hr>
|
|
67
|
+
<auro-menuoption value="print">Print</auro-menuoption>
|
|
68
|
+
</auro-menu></code></pre>
|
|
71
69
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
72
70
|
</auro-accordion>
|
|
@@ -1230,13 +1230,10 @@ class MenuService {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
|
|
1232
1232
|
const optionsSet = new Set(optionsToDeselect);
|
|
1233
|
-
const previousCount = this.selectedOptions.length;
|
|
1234
1233
|
this.selectedOptions = (this.selectedOptions || [])
|
|
1235
1234
|
.filter(opt => !optionsSet.has(opt));
|
|
1236
1235
|
|
|
1237
|
-
|
|
1238
|
-
this.stageUpdate();
|
|
1239
|
-
}
|
|
1236
|
+
this.stageUpdate();
|
|
1240
1237
|
}
|
|
1241
1238
|
|
|
1242
1239
|
/**
|
|
@@ -1656,6 +1653,8 @@ class AuroMenu extends AuroElement {
|
|
|
1656
1653
|
*/
|
|
1657
1654
|
this.size = "sm";
|
|
1658
1655
|
|
|
1656
|
+
// Value of the selected options
|
|
1657
|
+
this.value = undefined;
|
|
1659
1658
|
// Currently selected option
|
|
1660
1659
|
this.optionSelected = undefined;
|
|
1661
1660
|
// String used for highlighting/filtering
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<auro-header level="1" id="overview">Menu - 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 <code><auro-menu></code> component does not participate in the <code>tabindex</code> sequence directly. Keyboard navigation is managed by the parent component (e.g., <code><auro-select></code>, <code><auro-combobox></code>) through their keyboard strategy classes.</p>
|
|
7
|
+
<auro-header level="2" id="keyEvents">Key Events</auro-header>
|
|
8
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/keyEvents.md) -->
|
|
9
|
+
<!-- The below content is automatically added from ./../docs/partials/keyEvents.md -->
|
|
10
|
+
<!-- auro-menu does not implement direct keyboard event handling. -->
|
|
11
|
+
<!-- Keyboard navigation is delegated to parent components (auro-select, auro-combobox) via their keyboard strategy files. -->
|
|
12
|
+
<div class="note">
|
|
13
|
+
<p><strong>Note:</strong> The <code><auro-menu></code> component does not handle keyboard events directly. Keyboard navigation is managed by the parent component (e.g., <code><auro-select></code>, <code><auro-combobox></code>) through their keyboard strategy classes, which call menu methods such as <code>navigateOptions()</code>, <code>makeSelection()</code>, and <code>updateActiveOption()</code>.</p>
|
|
14
|
+
</div>
|
|
15
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
@@ -48,9 +48,7 @@ The `<auro-menu>` element should be used in situations where users may:
|
|
|
48
48
|
|
|
49
49
|
#### NPM Installation
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
$ npm i @aurodesignsystem/auro-formkit
|
|
53
|
-
```
|
|
51
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-formkit</code></pre>
|
|
54
52
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
55
53
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
56
54
|
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
@@ -59,13 +57,11 @@ $ npm i @aurodesignsystem/auro-formkit
|
|
|
59
57
|
|
|
60
58
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
{
|
|
60
|
+
<pre class="language-json"><code class="language-json">{
|
|
64
61
|
"compilerOptions": {
|
|
65
62
|
"moduleResolution": "bundler"
|
|
66
63
|
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
64
|
+
}</code></pre>
|
|
69
65
|
|
|
70
66
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
71
67
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -76,9 +72,7 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
76
72
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
77
73
|
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.
|
|
78
74
|
|
|
79
|
-
|
|
80
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-menu/+esm"></script>
|
|
81
|
-
```
|
|
75
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-menu/+esm"></script></code></pre>
|
|
82
76
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
83
77
|
|
|
84
78
|
## Formkit Development
|
|
@@ -92,9 +86,7 @@ Running the `dev` command will open a `localhost` development server for all com
|
|
|
92
86
|
|
|
93
87
|
To only develop a single component, use the `--filter` flag:
|
|
94
88
|
|
|
95
|
-
|
|
96
|
-
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
97
|
-
```
|
|
89
|
+
<pre class="language-shell"><code class="language-shell">npx turbo dev --filter=@aurodesignsystem/auro-input</code></pre>
|
|
98
90
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
99
91
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
100
92
|
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
@@ -109,37 +101,33 @@ However, if you need to load multiple versions of the same component on a single
|
|
|
109
101
|
|
|
110
102
|
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
111
103
|
|
|
112
|
-
|
|
113
|
-
// Import the class only
|
|
104
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
114
105
|
import { AuroMenu, AuroMenuOption } from '@aurodesignsystem/auro-formkit/auro-menu/class';
|
|
115
|
-
|
|
106
|
+
|
|
116
107
|
// Register with a custom name if desired
|
|
117
108
|
AuroMenu.register('custom-menu');
|
|
118
|
-
AuroMenuOption.register('custom-menu-option')
|
|
119
|
-
```
|
|
109
|
+
AuroMenuOption.register('custom-menu-option');</code></pre>
|
|
120
110
|
|
|
121
111
|
This will create a new custom element `<custom-menu>` and `<custom-menu-option>` that behaves exactly like `<auro-menu>` and `<auro-menu-option>`, allowing both to coexist on the same page without interfering with each other.
|
|
122
112
|
|
|
123
113
|
<div class="exampleWrapper exampleWrapper--flex">
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
114
|
+
<custom-menu>
|
|
115
|
+
<custom-menuoption value="stops">Stops</custom-menuoption>
|
|
116
|
+
<custom-menuoption value="price">Price</custom-menuoption>
|
|
117
|
+
<custom-menuoption value="duration">Duration</custom-menuoption>
|
|
118
|
+
<custom-menuoption value="departure">Departure</custom-menuoption>
|
|
119
|
+
<custom-menuoption value="arrival">Arrival</custom-menuoption>
|
|
120
|
+
</custom-menu>
|
|
131
121
|
</div>
|
|
132
122
|
<auro-accordion alignRight>
|
|
133
|
-
|
|
123
|
+
<span slot="trigger">See code</span>
|
|
134
124
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</custom-menu>
|
|
143
|
-
```
|
|
125
|
+
<pre class="language-html"><code class="language-html"><custom-menu>
|
|
126
|
+
<custom-menuoption value="stops">Stops</custom-menuoption>
|
|
127
|
+
<custom-menuoption value="price">Price</custom-menuoption>
|
|
128
|
+
<custom-menuoption value="duration">Duration</custom-menuoption>
|
|
129
|
+
<custom-menuoption value="departure">Departure</custom-menuoption>
|
|
130
|
+
<custom-menuoption value="arrival">Arrival</custom-menuoption>
|
|
131
|
+
</custom-menu></code></pre>
|
|
144
132
|
</auro-accordion>
|
|
145
133
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -31,4 +31,4 @@ export function isOptionInteractive(option: HTMLElement): boolean;
|
|
|
31
31
|
* @param {string} eventName - Name of the event to dispatch.
|
|
32
32
|
* @param {Object} [detail] - Optional detail object to include with the event.
|
|
33
33
|
*/
|
|
34
|
-
export function dispatchMenuEvent(element: HTMLElement, eventName: string, detail?:
|
|
34
|
+
export function dispatchMenuEvent(element: HTMLElement, eventName: string, detail?: Object): void;
|
|
@@ -45,7 +45,7 @@ export class MenuService {
|
|
|
45
45
|
* @returns {string|string[]|undefined}
|
|
46
46
|
*/
|
|
47
47
|
get currentKeys(): string | string[] | undefined;
|
|
48
|
-
host:
|
|
48
|
+
host: any;
|
|
49
49
|
size: any;
|
|
50
50
|
shape: any;
|
|
51
51
|
noCheckmark: any;
|
|
@@ -59,7 +59,7 @@ export class MenuService {
|
|
|
59
59
|
_subscribers: any[];
|
|
60
60
|
internalUpdateInProgress: boolean;
|
|
61
61
|
selectedOptions: any[];
|
|
62
|
-
_pendingValue: string | number | (string | number)[];
|
|
62
|
+
_pendingValue: string | number | (string | number)[] | null;
|
|
63
63
|
_pendingRetryScheduled: boolean;
|
|
64
64
|
_pendingRetryCount: number;
|
|
65
65
|
/**
|
|
@@ -87,7 +87,7 @@ export class MenuService {
|
|
|
87
87
|
* Sets multiple properties on the instance.
|
|
88
88
|
* @param {Object} properties - Key-value pairs of properties to set.
|
|
89
89
|
*/
|
|
90
|
-
setProperties(properties:
|
|
90
|
+
setProperties(properties: Object): void;
|
|
91
91
|
/**
|
|
92
92
|
* MENU OPTION HIGHLIGHTING
|
|
93
93
|
*/
|
|
@@ -144,6 +144,7 @@ export class AuroMenu extends AuroElement {
|
|
|
144
144
|
* @private
|
|
145
145
|
*/
|
|
146
146
|
private size;
|
|
147
|
+
value: any;
|
|
147
148
|
optionSelected: any;
|
|
148
149
|
matchWord: any;
|
|
149
150
|
noCheckmark: boolean;
|
|
@@ -195,7 +196,7 @@ export class AuroMenu extends AuroElement {
|
|
|
195
196
|
* @protected
|
|
196
197
|
*/
|
|
197
198
|
protected provideContext(): void;
|
|
198
|
-
rootMenu: boolean;
|
|
199
|
+
rootMenu: boolean | undefined;
|
|
199
200
|
menuService: any;
|
|
200
201
|
_contextProvider: any;
|
|
201
202
|
/**
|
|
@@ -209,14 +210,13 @@ export class AuroMenu extends AuroElement {
|
|
|
209
210
|
* @protected
|
|
210
211
|
*/
|
|
211
212
|
protected setInternalValue(value: string | Array<string>): void;
|
|
212
|
-
internalUpdateInProgress: boolean;
|
|
213
|
-
value: any;
|
|
213
|
+
internalUpdateInProgress: boolean | undefined;
|
|
214
214
|
/**
|
|
215
215
|
* Handles changes from the menu service and updates component state.
|
|
216
216
|
* @param {Object} event - The event object from the menu service.
|
|
217
217
|
* @protected
|
|
218
218
|
*/
|
|
219
|
-
protected handleMenuChange(event:
|
|
219
|
+
protected handleMenuChange(event: Object): void;
|
|
220
220
|
_index: any;
|
|
221
221
|
options: any;
|
|
222
222
|
/**
|
|
@@ -230,7 +230,7 @@ export class AuroMenu extends AuroElement {
|
|
|
230
230
|
*/
|
|
231
231
|
get selectedOption(): HTMLElement | null;
|
|
232
232
|
firstUpdated(): void;
|
|
233
|
-
loadingSlots: NodeListOf<Element
|
|
233
|
+
loadingSlots: NodeListOf<Element> | undefined;
|
|
234
234
|
updated(changedProperties: any): void;
|
|
235
235
|
/**
|
|
236
236
|
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
@@ -119,15 +119,15 @@ export class AuroMenuOption extends AuroElement {
|
|
|
119
119
|
* @private
|
|
120
120
|
*/
|
|
121
121
|
private runtimeUtils;
|
|
122
|
-
menuService:
|
|
122
|
+
menuService: Object | null;
|
|
123
123
|
unsubscribe: any;
|
|
124
124
|
/**
|
|
125
125
|
* Handles changes from the menu service and updates the option's state.
|
|
126
126
|
* This function synchronizes the option's properties and selection/highlight state with menu events.
|
|
127
127
|
* @param {Object} event - The event object from the menu service.
|
|
128
128
|
*/
|
|
129
|
-
handleMenuChange(event:
|
|
130
|
-
_contextConsumer: ContextConsumer<import("@lit/context").Context<"menu-context", any>, this
|
|
129
|
+
handleMenuChange(event: Object): void;
|
|
130
|
+
_contextConsumer: ContextConsumer<import("@lit/context").Context<"menu-context", any>, this> | undefined;
|
|
131
131
|
key: any;
|
|
132
132
|
firstUpdated(): void;
|
|
133
133
|
updated(changedProperties: any): void;
|
|
@@ -141,15 +141,15 @@ export class AuroMenuOption extends AuroElement {
|
|
|
141
141
|
* This method enables the option to participate in menu selection and highlighting logic.
|
|
142
142
|
* @param {Object} service - The menu service instance to attach to.
|
|
143
143
|
*/
|
|
144
|
-
attachTo(service:
|
|
145
|
-
active: boolean;
|
|
144
|
+
attachTo(service: Object): void;
|
|
145
|
+
active: boolean | undefined;
|
|
146
146
|
/**
|
|
147
147
|
* Updates the internal selected state of the menu option bypassing 'updated' and triggers custom events if selected.
|
|
148
148
|
* This function ensures the option's selection state is synchronized with menu logic and notifies listeners.
|
|
149
149
|
* @param {boolean} isSelected - Whether the option should be marked as selected.
|
|
150
150
|
*/
|
|
151
151
|
setInternalSelected(isSelected: boolean): void;
|
|
152
|
-
internalUpdateInProgress: boolean;
|
|
152
|
+
internalUpdateInProgress: boolean | undefined;
|
|
153
153
|
/**
|
|
154
154
|
* Sets the selected state of the menu option.
|
|
155
155
|
* This function updates whether the option is currently selected.
|
|
@@ -1204,13 +1204,10 @@ class MenuService {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
|
|
1206
1206
|
const optionsSet = new Set(optionsToDeselect);
|
|
1207
|
-
const previousCount = this.selectedOptions.length;
|
|
1208
1207
|
this.selectedOptions = (this.selectedOptions || [])
|
|
1209
1208
|
.filter(opt => !optionsSet.has(opt));
|
|
1210
1209
|
|
|
1211
|
-
|
|
1212
|
-
this.stageUpdate();
|
|
1213
|
-
}
|
|
1210
|
+
this.stageUpdate();
|
|
1214
1211
|
}
|
|
1215
1212
|
|
|
1216
1213
|
/**
|
|
@@ -1630,6 +1627,8 @@ class AuroMenu extends AuroElement {
|
|
|
1630
1627
|
*/
|
|
1631
1628
|
this.size = "sm";
|
|
1632
1629
|
|
|
1630
|
+
// Value of the selected options
|
|
1631
|
+
this.value = undefined;
|
|
1633
1632
|
// Currently selected option
|
|
1634
1633
|
this.optionSelected = undefined;
|
|
1635
1634
|
// String used for highlighting/filtering
|
|
@@ -1151,13 +1151,10 @@ class MenuService {
|
|
|
1151
1151
|
}
|
|
1152
1152
|
|
|
1153
1153
|
const optionsSet = new Set(optionsToDeselect);
|
|
1154
|
-
const previousCount = this.selectedOptions.length;
|
|
1155
1154
|
this.selectedOptions = (this.selectedOptions || [])
|
|
1156
1155
|
.filter(opt => !optionsSet.has(opt));
|
|
1157
1156
|
|
|
1158
|
-
|
|
1159
|
-
this.stageUpdate();
|
|
1160
|
-
}
|
|
1157
|
+
this.stageUpdate();
|
|
1161
1158
|
}
|
|
1162
1159
|
|
|
1163
1160
|
/**
|
|
@@ -1577,6 +1574,8 @@ class AuroMenu extends AuroElement {
|
|
|
1577
1574
|
*/
|
|
1578
1575
|
this.size = "sm";
|
|
1579
1576
|
|
|
1577
|
+
// Value of the selected options
|
|
1578
|
+
this.value = undefined;
|
|
1580
1579
|
// Currently selected option
|
|
1581
1580
|
this.optionSelected = undefined;
|
|
1582
1581
|
// String used for highlighting/filtering
|