@aurodesignsystem-dev/auro-formkit 0.0.0-pr1504.0 → 0.0.0-pr1505.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.
Files changed (77) hide show
  1. package/components/checkbox/demo/customize.html +1 -2
  2. package/components/checkbox/demo/customize.min.js +2 -2
  3. package/components/checkbox/demo/getting-started.min.js +2 -2
  4. package/components/checkbox/demo/index.min.js +2 -2
  5. package/components/checkbox/dist/index.js +2 -2
  6. package/components/checkbox/dist/registered.js +2 -2
  7. package/components/combobox/demo/customize.html +1 -2
  8. package/components/combobox/demo/customize.md +115 -135
  9. package/components/combobox/demo/customize.min.js +1451 -1663
  10. package/components/combobox/demo/getting-started.min.js +1451 -1663
  11. package/components/combobox/demo/index.min.js +1451 -1663
  12. package/components/combobox/dist/auro-combobox.d.ts +5 -0
  13. package/components/combobox/dist/index.js +505 -142
  14. package/components/combobox/dist/registered.js +505 -142
  15. package/components/counter/demo/customize.min.js +3 -3
  16. package/components/counter/demo/index.min.js +3 -3
  17. package/components/counter/dist/index.js +3 -3
  18. package/components/counter/dist/registered.js +3 -3
  19. package/components/datepicker/demo/api.md +2 -0
  20. package/components/datepicker/demo/customize.md +195 -33
  21. package/components/datepicker/demo/customize.min.js +145 -60
  22. package/components/datepicker/demo/index.min.js +137 -59
  23. package/components/datepicker/dist/index.js +137 -59
  24. package/components/datepicker/dist/registered.js +137 -59
  25. package/components/datepicker/dist/src/auro-datepicker.d.ts +2 -0
  26. package/components/dropdown/demo/customize.min.js +1 -1
  27. package/components/dropdown/demo/getting-started.min.js +1 -1
  28. package/components/dropdown/demo/index.min.js +1 -1
  29. package/components/dropdown/dist/index.js +1 -1
  30. package/components/dropdown/dist/registered.js +1 -1
  31. package/components/form/demo/customize.html +6 -6
  32. package/components/form/demo/customize.js +19 -0
  33. package/components/form/demo/customize.md +203 -51
  34. package/components/form/demo/customize.min.js +2778 -2301
  35. package/components/form/demo/getting-started.min.js +2706 -2301
  36. package/components/form/demo/index.min.js +2706 -2301
  37. package/components/form/demo/registerDemoDeps.min.js +2341 -2262
  38. package/components/form/dist/auro-form.d.ts +122 -4
  39. package/components/form/dist/index.js +363 -37
  40. package/components/form/dist/registered.js +363 -37
  41. package/components/input/demo/api.md +1 -1
  42. package/components/input/demo/customize.html +1 -2
  43. package/components/input/demo/customize.md +56 -55
  44. package/components/input/demo/customize.min.js +132 -57
  45. package/components/input/demo/getting-started.min.js +132 -57
  46. package/components/input/demo/index.md +2 -2
  47. package/components/input/demo/index.min.js +132 -57
  48. package/components/input/dist/auro-input.d.ts +1 -1
  49. package/components/input/dist/base-input.d.ts +16 -0
  50. package/components/input/dist/index.js +132 -57
  51. package/components/input/dist/registered.js +132 -57
  52. package/components/menu/demo/api.md +41 -45
  53. package/components/menu/demo/customize.md +0 -28
  54. package/components/menu/demo/index.min.js +779 -1354
  55. package/components/menu/dist/auro-menu.d.ts +95 -110
  56. package/components/menu/dist/auro-menuoption.d.ts +32 -138
  57. package/components/menu/dist/index.js +753 -1308
  58. package/components/menu/dist/registered.js +765 -1308
  59. package/components/radio/demo/customize.min.js +2 -2
  60. package/components/radio/demo/getting-started.min.js +2 -2
  61. package/components/radio/demo/index.min.js +2 -2
  62. package/components/radio/dist/index.js +2 -2
  63. package/components/radio/dist/registered.js +2 -2
  64. package/components/select/demo/api.md +1 -0
  65. package/components/select/demo/customize.html +1 -2
  66. package/components/select/demo/customize.md +78 -3
  67. package/components/select/demo/customize.min.js +1140 -1577
  68. package/components/select/demo/getting-started.min.js +1140 -1577
  69. package/components/select/demo/index.min.js +1140 -1577
  70. package/components/select/demo/keyboard-behavior.md +18 -0
  71. package/components/select/dist/auro-select.d.ts +38 -2
  72. package/components/select/dist/index.js +177 -39
  73. package/components/select/dist/registered.js +177 -39
  74. package/components/select/dist/selectUtils.d.ts +24 -0
  75. package/custom-elements.json +606 -1031
  76. package/package.json +1 -1
  77. package/components/menu/dist/auro-menu.context.d.ts +0 -238
@@ -2454,7 +2454,7 @@
2454
2454
  "type": {
2455
2455
  "text": "object"
2456
2456
  },
2457
- "default": "{ ArrowDown(component, evt, ctx) { // If the clear button has focus, let the browser handle ArrowDown normally. if (isClearBtnFocused(ctx)) { return; } // option display and navigation are prevented if there are no available options if (component.availableOptions.length > 0) { evt.preventDefault(); // navigate if bib is open otherwise open it if (component.dropdown.isPopoverVisible) { if (evt.altKey || evt.ctrlKey || evt.metaKey) { component.activateLastEnabledAvailableOption(); } else { navigateArrow(component, 'down'); } } else { component.showBib(); } } }, ArrowUp(component, evt, ctx) { // If the clear button has focus, let the browser handle ArrowUp normally. if (isClearBtnFocused(ctx)) { return; } // option display and navigation are prevented if there are no available options if (component.availableOptions.length > 0) { evt.preventDefault(); // navigate if bib is open otherwise open it if (component.dropdown.isPopoverVisible) { if (evt.altKey || evt.ctrlKey || evt.metaKey) { component.activateFirstEnabledAvailableOption(); } else { navigateArrow(component, 'up'); } } else { component.showBib(); } } }, End(component, evt, ctx) { if (ctx.isExpanded) { evt.preventDefault(); evt.stopPropagation(); component.activateLastEnabledAvailableOption(); } }, Enter(component, evt, ctx) { if (isClearBtnFocused(ctx)) { // If the clear button has focus, let the browser activate it normally. // stopPropagation prevents parent containers (e.g., forms) from treating // Enter as a submit, but we must NOT call preventDefault — that would // block the browser's built-in \"Enter activates focused button\" behavior. evt.stopPropagation(); } else if (ctx.isExpanded && component.menu.optionActive) { component.menu.makeSelection(); if (ctx.isModal) { component.setTriggerInputFocus(); } evt.preventDefault(); evt.stopPropagation(); } else { // Prevent the keypress from bubbling to parent containers (e.g., forms) // which could interpret Enter as a submit or trigger other unintended behavior. // This is safe because showBib() opens the dialog programmatically, // not via event propagation. evt.preventDefault(); evt.stopPropagation(); component.showBib(); } }, Escape(component, evt, ctx) { if (!ctx.isExpanded) { return; } // Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups evt.stopPropagation(); if (ctx.isModal) { component.setTriggerInputFocus(); } component.hideBib(); }, Home(component, evt, ctx) { if (ctx.isExpanded) { evt.preventDefault(); evt.stopPropagation(); component.activateFirstEnabledAvailableOption(); } }, Tab(component, evt, ctx) { if (ctx.isExpanded && !isClearBtnFocused(ctx)) { // When the clear button is focused, Tab events do not bubble out of // its shadow DOM, so this handler only fires when the clear button // is NOT focused. In that case, select the active option and close. component.menu.makeSelection(); component.hideBib(); // In fullscreen modal mode, closing the dialog does not // automatically restores focus to the input. In the tab case, // Explicitly move focus to the trigger's clear button so the // user can continues tabbing through the page normally. if (ctx.isModal && !evt.shiftKey) { component.setClearBtnFocus(); } } }, }"
2457
+ "default": "{ ArrowDown(component, evt, ctx) { // If the clear button has focus, let the browser handle ArrowDown normally. if (isClearBtnFocused(ctx)) { return; } // option display and navigation are prevented if there are no available options if (component.availableOptions.length > 0) { evt.preventDefault(); // navigate if bib is open otherwise open it if (component.dropdown.isPopoverVisible) { if (evt.altKey || evt.ctrlKey || evt.metaKey) { component.activateLastEnabledAvailableOption(); } else { navigateArrow(component, 'down'); } } else { component.showBib(); } } }, ArrowUp(component, evt, ctx) { // If the clear button has focus, let the browser handle ArrowUp normally. if (isClearBtnFocused(ctx)) { return; } // option display and navigation are prevented if there are no available options if (component.availableOptions.length > 0) { evt.preventDefault(); // navigate if bib is open otherwise open it if (component.dropdown.isPopoverVisible) { if (evt.altKey || evt.ctrlKey || evt.metaKey) { component.activateFirstEnabledAvailableOption(); } else { navigateArrow(component, 'up'); } } else { component.showBib(); } } }, End(component, evt, ctx) { if (ctx.isExpanded) { evt.preventDefault(); evt.stopPropagation(); component.activateLastEnabledAvailableOption(); } }, Enter(component, evt, ctx) { if (isClearBtnFocused(ctx)) { // If the clear button has focus, let the browser activate it normally. // stopPropagation prevents parent containers (e.g., forms) from treating // Enter as a submit, but we must NOT call preventDefault — that would // block the browser's built-in \"Enter activates focused button\" behavior. evt.stopPropagation(); } else if (ctx.isExpanded && component.menu.optionActive) { reconcileMenuIndex(component.menu); component.menu.makeSelection(); if (ctx.isModal) { component.setTriggerInputFocus(); } evt.preventDefault(); evt.stopPropagation(); } else { // Prevent the keypress from bubbling to parent containers (e.g., forms) // which could interpret Enter as a submit or trigger other unintended behavior. // This is safe because showBib() opens the dialog programmatically, // not via event propagation. evt.preventDefault(); evt.stopPropagation(); component.showBib(); } }, Escape(component, evt, ctx) { if (!ctx.isExpanded) { return; } // Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups evt.stopPropagation(); if (ctx.isModal) { component.setTriggerInputFocus(); } component.hideBib(); }, Home(component, evt, ctx) { if (ctx.isExpanded) { evt.preventDefault(); evt.stopPropagation(); component.activateFirstEnabledAvailableOption(); } }, Tab(component, evt, ctx) { if (ctx.isExpanded && !isClearBtnFocused(ctx)) { // When the clear button is focused, Tab events do not bubble out of // its shadow DOM, so this handler only fires when the clear button // is NOT focused. In that case, select the active option and close. reconcileMenuIndex(component.menu); component.menu.makeSelection(); component.hideBib(); // In fullscreen modal mode, closing the dialog does not // automatically restores focus to the input. In the tab case, // Explicitly move focus to the trigger's clear button so the // user can continues tabbing through the page normally. if (ctx.isModal && !evt.shiftKey) { component.setClearBtnFocus(); } } }, }"
2458
2458
  }
2459
2459
  ],
2460
2460
  "exports": [
@@ -6305,6 +6305,14 @@
6305
6305
  "description": "Defines the label content for the first input.",
6306
6306
  "name": "fromLabel"
6307
6307
  },
6308
+ {
6309
+ "description": "Overrides the \" (optional)\" text rendered next to the first input's label when the datepicker is not `required`.",
6310
+ "name": "optionalFromLabel"
6311
+ },
6312
+ {
6313
+ "description": "Overrides the \" (optional)\" text rendered next to the second input's label when `range` is set and the datepicker is not `required`.",
6314
+ "name": "optionalToLabel"
6315
+ },
6308
6316
  {
6309
6317
  "description": "Defines the content to display in the auro-calendar-cell for the specified date. The content text is colored using the success state token when the `highlight` attribute is applied to the slot.",
6310
6318
  "name": "date_YYYY_MM_DD"
@@ -10493,6 +10501,46 @@
10493
10501
  },
10494
10502
  "privacy": "private"
10495
10503
  },
10504
+ {
10505
+ "kind": "method",
10506
+ "name": "_isDisabled",
10507
+ "parameters": [
10508
+ {
10509
+ "name": "element",
10510
+ "description": "The element to check.",
10511
+ "type": {
10512
+ "text": "HTMLElement | undefined | null"
10513
+ }
10514
+ }
10515
+ ],
10516
+ "description": "Whether a given element is currently disabled. Disabled controls are excluded\nfrom submission, validity, and initial-state checks per the HTML spec\n(section 4.10.19.2 \"Enabling and disabling form controls\":\nhttps://www.w3.org/TR/2011/WD-html5-20110113/association-of-controls-and-forms.html).\n\nImplementation note: we deliberately read only the attribute. Every Auro\nform element in `formElementTags` declares `disabled` with `reflect: true`,\nso the attribute and property stay in sync. Reading the attribute also\nlets the MutationObserver in `connectedCallback` (which is filtered to\n`['disabled', 'name']`) be the single source of truth for re-renders.\nIf a future form-element type ships without attribute reflection, expand\nthis helper to also read `element.disabled`.",
10517
+ "return": {
10518
+ "type": {
10519
+ "text": "boolean"
10520
+ }
10521
+ },
10522
+ "privacy": "private"
10523
+ },
10524
+ {
10525
+ "kind": "method",
10526
+ "name": "_isNameDisabled",
10527
+ "parameters": [
10528
+ {
10529
+ "name": "name",
10530
+ "description": "The `name` attribute used to register the element.",
10531
+ "type": {
10532
+ "text": "string"
10533
+ }
10534
+ }
10535
+ ],
10536
+ "description": "Whether the tracked form element registered under `name` is currently disabled.\nSee `_isDisabled` for the HTML-spec rationale behind excluding disabled\ncontrols from form state.\n\nReads a cached flag on `formState[name]` populated by `_addElementToState`\nat registration and refreshed by `_handleAttributeMutations` whenever the\nelement's `disabled` attribute toggles. The cache is fed by the same\n`hasAttribute('disabled')` read as `_isDisabled`, so the \"future form-element\ntype without attribute reflection\" caveat documented there applies here too.",
10537
+ "return": {
10538
+ "type": {
10539
+ "text": "boolean"
10540
+ }
10541
+ },
10542
+ "privacy": "private"
10543
+ },
10496
10544
  {
10497
10545
  "kind": "method",
10498
10546
  "name": "_eventIsValidFormEvent",
@@ -10574,10 +10622,52 @@
10574
10622
  "privacy": "private",
10575
10623
  "readonly": true
10576
10624
  },
10625
+ {
10626
+ "kind": "method",
10627
+ "name": "_isFormValid",
10628
+ "description": "Raw constraint-validation check. Returns `true` when no enabled field\nhas a validity error. Unlike the public `validity` getter, this does\nNOT gate on `isInitialState` — callers that need to make a decision\nbased on the actual constraint state (submit-button enablement, the\ninternal `submit()` gate) read this so a pre-filled valid form is\ncorrectly recognized as submittable at first render.",
10629
+ "return": {
10630
+ "type": {
10631
+ "text": "boolean"
10632
+ }
10633
+ },
10634
+ "privacy": "private"
10635
+ },
10636
+ {
10637
+ "kind": "method",
10638
+ "name": "_hasResetableState",
10639
+ "description": "Whether the reset button should be enabled. True when the form has\ndiverged from its initial state (so the user can always return to\ndefaults — even if the dirty value lives behind a now-disabled field),\nOR when any non-disabled field has a current value or captured initial\nvalue (covers pre-filled forms and user-cleared-back-to-empty cases).",
10640
+ "return": {
10641
+ "type": {
10642
+ "text": "boolean"
10643
+ }
10644
+ },
10645
+ "privacy": "private"
10646
+ },
10647
+ {
10648
+ "kind": "method",
10649
+ "name": "_normalizeEmpty",
10650
+ "parameters": [
10651
+ {
10652
+ "name": "value",
10653
+ "description": "Value to normalize.",
10654
+ "type": {
10655
+ "text": "*"
10656
+ }
10657
+ }
10658
+ ],
10659
+ "description": "Collapse empty representations to a single canonical `null`.\n\n`_addElementToState` captures `null` for a field that mounts without a\n`value` attribute (`element.value || element.getAttribute('value')` is\nfalsy → resolves to `null`), but `sharedInputListener` later stores the\nraw `event.target.value` — which is `''` for a user-cleared text input.\nWithout this normalization, backspacing back to empty would taint the\nform forever (`'' !== null`) and Reset would stay enabled with nothing\nto actually reset.\n\n`''`, `undefined`, and `[]` all collapse to `null`. The empty-array case\ncovers checkbox-group, radio-group, and multiselect, where `[]` means\n\"no selection\" — semantically the same as `null`/`''`. Genuine values\n— including `0`, `false`, non-empty strings, and non-empty arrays —\npass through unchanged so number, boolean, and populated multi-value\nfields still compare correctly.",
10660
+ "return": {
10661
+ "type": {
10662
+ "text": "*"
10663
+ }
10664
+ },
10665
+ "privacy": "private"
10666
+ },
10577
10667
  {
10578
10668
  "kind": "method",
10579
10669
  "name": "_calculateValidity",
10580
- "description": "Infer validity status based on current formState.",
10670
+ "description": "Infer validity status based on current formState.\n\nValidity stays `null` while the form is in its initial state — this is\nthe \"stay quiet until the user interacts\" UX contract that consumers\ndepend on to delay error indicators. Code that needs the raw\nconstraint-validation result regardless of interaction (e.g.,\nsubmit-button enablement) should call `_isFormValid()` directly.",
10581
10671
  "privacy": "private"
10582
10672
  },
10583
10673
  {
@@ -10594,7 +10684,7 @@
10594
10684
  {
10595
10685
  "kind": "method",
10596
10686
  "name": "_setInitialState",
10597
- "description": "Determines whether the form is in its initial (untouched) state and updates `_isInitialState` accordingly.",
10687
+ "description": "Determines whether the form is in its initial (untouched) state.\n\nA field is tainted if either:\n - its value differs from the value captured on first render, OR\n - its validity is failing (anything other than `null` or `'valid'`).\n\nValidity acts as a backup signal: it catches users who interact with a\nfield without changing its value (e.g., focusing and blurring a required\nfield). We skip `null` (not yet validated) and `'valid'` (the default\nafter Auro's auto-validation on mount) because neither proves the user\ntouched anything.",
10598
10688
  "return": {
10599
10689
  "type": {
10600
10690
  "text": "void"
@@ -10754,6 +10844,26 @@
10754
10844
  },
10755
10845
  "privacy": "private"
10756
10846
  },
10847
+ {
10848
+ "kind": "method",
10849
+ "name": "_handleAttributeMutations",
10850
+ "parameters": [
10851
+ {
10852
+ "name": "mutations",
10853
+ "description": "The batched mutation records.",
10854
+ "type": {
10855
+ "text": "MutationRecord[]"
10856
+ }
10857
+ }
10858
+ ],
10859
+ "description": "Handle batched MutationObserver records for `disabled` and `name`\nattribute changes on tracked form elements. A `name` change invalidates\nthe formState keying — we resolve it by re-initializing state. A `disabled`\nchange simply needs a re-render (so `value` / `validity` getters re-evaluate)\nand a refresh of the submit/reset button enablement.",
10860
+ "return": {
10861
+ "type": {
10862
+ "text": "void"
10863
+ }
10864
+ },
10865
+ "privacy": "private"
10866
+ },
10757
10867
  {
10758
10868
  "kind": "method",
10759
10869
  "name": "mutationEventListener",
@@ -10847,6 +10957,25 @@
10847
10957
  },
10848
10958
  "privacy": "private",
10849
10959
  "default": "[]"
10960
+ },
10961
+ {
10962
+ "kind": "field",
10963
+ "name": "_initialValues",
10964
+ "type": {
10965
+ "text": "Record<string, string | number | boolean | string[] | null | undefined>"
10966
+ },
10967
+ "description": "Captured initial (default) value per field `name`. Populated on first\nsight of each name in `_addElementToState` and preserved across\nsubsequent `initializeState` cycles (slot change, rename, reset) so\n`_setInitialState` can detect user edits as `current !== initial`,\nmatching HTML's `dirtyValueFlag` semantics.",
10968
+ "privacy": "private",
10969
+ "default": "{}"
10970
+ },
10971
+ {
10972
+ "kind": "field",
10973
+ "name": "_attributeObserver",
10974
+ "type": {
10975
+ "text": "MutationObserver | null"
10976
+ },
10977
+ "privacy": "private",
10978
+ "default": "null"
10850
10979
  }
10851
10980
  ],
10852
10981
  "events": [
@@ -11232,7 +11361,7 @@
11232
11361
  "name": "label"
11233
11362
  },
11234
11363
  {
11235
- "description": "Allows overriding the optional display text \"(optional)\", which appears next to the label.",
11364
+ "description": "Allows overriding the optional display text \" (optional)\", which appears next to the label.",
11236
11365
  "name": "optionalLabel"
11237
11366
  },
11238
11367
  {
@@ -11696,6 +11825,30 @@
11696
11825
  "module": "components/input/src/base-input.js"
11697
11826
  }
11698
11827
  },
11828
+ {
11829
+ "kind": "method",
11830
+ "name": "_computeDateObjectFallback",
11831
+ "parameters": [
11832
+ {
11833
+ "name": "dateStr",
11834
+ "description": "ISO date string from `value`/`min`/`max`.",
11835
+ "type": {
11836
+ "text": "string|undefined"
11837
+ }
11838
+ }
11839
+ ],
11840
+ "description": "Parses a date string into a Date object when the corresponding `_*Object`\nfield hasn't been synced yet by `updated()`. Returns undefined when the\ninput type/format isn't a full date or the string is not a valid date.\n\nWhy this exists: a parent (datepicker) can call `inputN.validate()` from\ninside its own `updated()` before this input's `updated()` has run\n`syncDateValues()` — so `_valueObject`/`_maxObject` are still `undefined`\nand range checks would otherwise silently no-op (flipping the result to\n`valid` or `patternMismatch`).",
11841
+ "privacy": "private",
11842
+ "return": {
11843
+ "type": {
11844
+ "text": "Date|undefined"
11845
+ }
11846
+ },
11847
+ "inheritedFrom": {
11848
+ "name": "BaseInput",
11849
+ "module": "components/input/src/base-input.js"
11850
+ }
11851
+ },
11699
11852
  {
11700
11853
  "kind": "method",
11701
11854
  "name": "setDateObjectProperty",
@@ -13783,6 +13936,26 @@
13783
13936
  },
13784
13937
  "readonly": true
13785
13938
  },
13939
+ {
13940
+ "kind": "method",
13941
+ "name": "_computeDateObjectFallback",
13942
+ "parameters": [
13943
+ {
13944
+ "name": "dateStr",
13945
+ "description": "ISO date string from `value`/`min`/`max`.",
13946
+ "type": {
13947
+ "text": "string|undefined"
13948
+ }
13949
+ }
13950
+ ],
13951
+ "description": "Parses a date string into a Date object when the corresponding `_*Object`\nfield hasn't been synced yet by `updated()`. Returns undefined when the\ninput type/format isn't a full date or the string is not a valid date.\n\nWhy this exists: a parent (datepicker) can call `inputN.validate()` from\ninside its own `updated()` before this input's `updated()` has run\n`syncDateValues()` — so `_valueObject`/`_maxObject` are still `undefined`\nand range checks would otherwise silently no-op (flipping the result to\n`valid` or `patternMismatch`).",
13952
+ "privacy": "private",
13953
+ "return": {
13954
+ "type": {
13955
+ "text": "Date|undefined"
13956
+ }
13957
+ }
13958
+ },
13786
13959
  {
13787
13960
  "kind": "method",
13788
13961
  "name": "setDateObjectProperty",
@@ -15969,826 +16142,300 @@
15969
16142
  },
15970
16143
  {
15971
16144
  "kind": "javascript-module",
15972
- "path": "components/menu/src/auro-menu.context.js",
16145
+ "path": "components/menu/src/auro-menu.js",
15973
16146
  "declarations": [
15974
16147
  {
15975
16148
  "kind": "class",
15976
- "description": "",
15977
- "name": "MenuService",
16149
+ "description": "The `auro-menu` element provides users a way to select from a list of options.",
16150
+ "name": "AuroMenu",
16151
+ "slots": [
16152
+ {
16153
+ "description": "Text to show while loading attribute is set",
16154
+ "name": "loadingText"
16155
+ },
16156
+ {
16157
+ "description": "Icon to show while loading attribute is set",
16158
+ "name": "loadingIcon"
16159
+ },
16160
+ {
16161
+ "description": "Slot for insertion of menu options.",
16162
+ "name": ""
16163
+ }
16164
+ ],
15978
16165
  "members": [
16166
+ {
16167
+ "kind": "method",
16168
+ "name": "register",
16169
+ "static": true,
16170
+ "parameters": [
16171
+ {
16172
+ "name": "name",
16173
+ "default": "\"auro-menu\"",
16174
+ "description": "The name of element that you want to register to.",
16175
+ "optional": true,
16176
+ "type": {
16177
+ "text": "string"
16178
+ }
16179
+ }
16180
+ ],
16181
+ "description": "This will register this element with the browser."
16182
+ },
15979
16183
  {
15980
16184
  "kind": "field",
15981
- "name": "menuOptions",
15982
- "description": "Gets the list of registered menu options.",
16185
+ "name": "options",
16186
+ "readonly": true,
15983
16187
  "return": {
15984
16188
  "type": {
15985
- "text": "AuroMenuOption[]"
16189
+ "text": "Array<HTMLElement>"
15986
16190
  }
15987
- },
15988
- "readonly": true
16191
+ }
15989
16192
  },
15990
16193
  {
15991
16194
  "kind": "field",
15992
- "name": "highlightedOption",
15993
- "description": "Gets the currently highlighted option.",
16195
+ "name": "index",
15994
16196
  "return": {
15995
16197
  "type": {
15996
- "text": "AuroMenuOption|null"
16198
+ "text": "number"
15997
16199
  }
15998
16200
  },
15999
- "readonly": true
16201
+ "parameters": [
16202
+ {
16203
+ "description": "Sets the index of the currently active option.",
16204
+ "name": "value",
16205
+ "type": {
16206
+ "text": "number"
16207
+ }
16208
+ }
16209
+ ]
16000
16210
  },
16001
16211
  {
16002
16212
  "kind": "field",
16003
- "name": "currentValue",
16004
- "description": "Gets the current value(s) of the selected option(s).",
16213
+ "name": "selectedOptions",
16214
+ "description": "Gets the currently selected options as an array.",
16005
16215
  "return": {
16006
16216
  "type": {
16007
- "text": "string|string[]|undefined"
16217
+ "text": "Array<HTMLElement>"
16008
16218
  }
16009
16219
  },
16010
16220
  "readonly": true
16011
16221
  },
16012
16222
  {
16013
16223
  "kind": "field",
16014
- "name": "currentLabel",
16015
- "description": "Gets the label(s) of the currently selected option(s).",
16224
+ "name": "selectedOption",
16225
+ "description": "Gets the first selected option, or null if none.",
16016
16226
  "return": {
16017
16227
  "type": {
16018
- "text": "string"
16228
+ "text": "HTMLElement|null"
16019
16229
  }
16020
16230
  },
16021
16231
  "readonly": true
16022
16232
  },
16023
16233
  {
16024
16234
  "kind": "field",
16025
- "name": "stringValue",
16026
- "description": "Gets the string representation of the current value(s).\nFor multi-select, this is a JSON stringified array.",
16235
+ "name": "currentLabel",
16236
+ "readonly": true,
16027
16237
  "return": {
16028
16238
  "type": {
16029
- "text": "string|undefined"
16239
+ "text": "string"
16030
16240
  }
16031
- },
16032
- "readonly": true
16241
+ }
16033
16242
  },
16034
16243
  {
16035
16244
  "kind": "field",
16036
- "name": "currentKeys",
16037
- "description": "Gets the key(s) of the currently selected option(s).",
16245
+ "name": "formattedValue",
16246
+ "description": "Formatted value based on `multiSelect` state.\nDefault type is `String`, changing to `Array<String>` when `multiSelect` is true.",
16247
+ "privacy": "private",
16038
16248
  "return": {
16039
16249
  "type": {
16040
- "text": "string|string[]|undefined"
16250
+ "text": "String|Array<String>"
16041
16251
  }
16042
16252
  },
16043
16253
  "readonly": true
16044
16254
  },
16045
16255
  {
16046
16256
  "kind": "method",
16047
- "name": "hostUpdated",
16048
- "description": "Handles host updates.\nThis is a lit reactive lifecycle method.\nThis comes from the Lit controller interface provided by adding this service as a controller to the host.\nSee constructor for `this.host.addController(this)`\nYou can read more about Lit reactive controllers here: https://lit.dev/docs/composition/controllers/"
16049
- },
16050
- {
16051
- "kind": "method",
16052
- "name": "hostDisconnected",
16053
- "description": "Handles host disconnection and memory cleanup."
16257
+ "name": "selectByValue",
16258
+ "parameters": [
16259
+ {
16260
+ "name": "value",
16261
+ "description": "The value(s) to select.",
16262
+ "type": {
16263
+ "text": "string|string[]|undefined|null"
16264
+ }
16265
+ }
16266
+ ],
16267
+ "description": "Selects options by value.",
16268
+ "privacy": "public"
16054
16269
  },
16055
16270
  {
16056
16271
  "kind": "method",
16057
- "name": "setProperty",
16272
+ "name": "setTagAttribute",
16058
16273
  "parameters": [
16059
16274
  {
16060
- "name": "property",
16275
+ "name": "tagName",
16276
+ "description": "The tag name to set as an attribute.",
16061
16277
  "type": {
16062
16278
  "text": "string"
16063
16279
  }
16064
- },
16065
- {
16066
- "name": "value",
16067
- "type": {
16068
- "text": "any"
16069
- }
16070
16280
  }
16071
16281
  ],
16072
- "description": "Sets a property value if it exists on the instance and the value has changed."
16282
+ "description": "Sets an attribute that matches the default tag name if the tag name is not the default.",
16283
+ "privacy": "private"
16073
16284
  },
16074
16285
  {
16075
16286
  "kind": "method",
16076
- "name": "setProperties",
16287
+ "name": "updateItemsState",
16077
16288
  "parameters": [
16078
16289
  {
16079
- "name": "properties",
16080
- "description": "Key-value pairs of properties to set.",
16290
+ "name": "changedProperties",
16291
+ "description": "LitElement's changed properties map.",
16081
16292
  "type": {
16082
- "text": "Object"
16293
+ "text": "Map<string, boolean>"
16083
16294
  }
16084
16295
  }
16085
16296
  ],
16086
- "description": "Sets multiple properties on the instance."
16297
+ "description": "Updates the UI state and appearance of menu items based on changed properties.",
16298
+ "privacy": "private"
16087
16299
  },
16088
16300
  {
16089
16301
  "kind": "method",
16090
- "name": "highlightNext",
16091
- "description": "Highlights the next active option in the menu."
16302
+ "name": "initializeMenu",
16303
+ "description": "Initializes the menu's state and structure.",
16304
+ "privacy": "private"
16092
16305
  },
16093
16306
  {
16094
16307
  "kind": "method",
16095
- "name": "highlightPrevious",
16096
- "description": "Highlights the previous active option in the menu."
16308
+ "name": "initItems",
16309
+ "description": "Initializes menu items and their attributes.",
16310
+ "privacy": "private"
16097
16311
  },
16098
16312
  {
16099
16313
  "kind": "method",
16100
- "name": "moveHighlightedOption",
16314
+ "name": "handleSelectState",
16101
16315
  "parameters": [
16102
16316
  {
16103
- "name": "direction",
16104
- "description": "The direction to move the highlight (\"next\" or \"previous\").",
16317
+ "name": "option",
16318
+ "description": "The option element to select.",
16105
16319
  "type": {
16106
- "text": "string"
16320
+ "text": "HTMLElement"
16107
16321
  }
16108
16322
  }
16109
16323
  ],
16110
- "description": "Moves the highlighted option in the specified direction."
16324
+ "description": "Updates menu state when an option is selected.",
16325
+ "privacy": "private"
16111
16326
  },
16112
16327
  {
16113
16328
  "kind": "method",
16114
- "name": "setHighlightedOption",
16329
+ "name": "handleDeselectState",
16115
16330
  "parameters": [
16116
16331
  {
16117
16332
  "name": "option",
16118
- "description": "The option to highlight.",
16333
+ "description": "The menuoption to be deselected.",
16119
16334
  "type": {
16120
- "text": "AuroMenuOption"
16335
+ "text": "HTMLElement"
16121
16336
  }
16122
16337
  }
16123
16338
  ],
16124
- "description": "Sets the highlighted index to the specified option."
16339
+ "description": "Deselects a menu option and updates related state.",
16340
+ "privacy": "private"
16125
16341
  },
16126
16342
  {
16127
16343
  "kind": "method",
16128
- "name": "setHighlightedIndex",
16129
- "parameters": [
16130
- {
16131
- "name": "index",
16132
- "type": {
16133
- "text": "number"
16134
- }
16135
- }
16136
- ],
16137
- "description": "Sets the highlighted option to the option at the specified index if it exists."
16138
- },
16139
- {
16140
- "kind": "method",
16141
- "name": "selectHighlightedOption",
16142
- "description": "Selects the currently highlighted option."
16143
- },
16144
- {
16145
- "kind": "method",
16146
- "name": "selectOptions",
16147
- "parameters": [
16148
- {
16149
- "name": "options",
16150
- "description": "Single option or array of options to select",
16151
- "type": {
16152
- "text": "AuroMenuOption|AuroMenuOption[]"
16153
- }
16154
- }
16155
- ],
16156
- "description": "Selects one or more options in a batch operation"
16157
- },
16158
- {
16159
- "kind": "method",
16160
- "name": "deselectOptions",
16161
- "parameters": [
16162
- {
16163
- "name": "options",
16164
- "description": "Single option or array of options to deselect",
16165
- "type": {
16166
- "text": "AuroMenuOption|AuroMenuOption[]"
16167
- }
16168
- }
16169
- ],
16170
- "description": "Deselects one or more options in a batch operation"
16171
- },
16172
- {
16173
- "kind": "method",
16174
- "name": "selectOption",
16175
- "parameters": [
16176
- {
16177
- "name": "option",
16178
- "type": {
16179
- "text": "AuroMenuOption"
16180
- }
16181
- }
16182
- ],
16183
- "description": "Selects a single option."
16184
- },
16185
- {
16186
- "kind": "method",
16187
- "name": "deselectOption",
16188
- "parameters": [
16189
- {
16190
- "name": "option",
16191
- "type": {
16192
- "text": "AuroMenuOption"
16193
- }
16194
- }
16195
- ],
16196
- "description": "Deselects a single option."
16197
- },
16198
- {
16199
- "kind": "method",
16200
- "name": "toggleOption",
16201
- "parameters": [
16202
- {
16203
- "name": "option",
16204
- "type": {
16205
- "text": "AuroMenuOption"
16206
- }
16207
- }
16208
- ],
16209
- "description": "Toggles the selection state of a single option."
16210
- },
16211
- {
16212
- "kind": "method",
16213
- "name": "selectByValue",
16214
- "parameters": [
16215
- {
16216
- "name": "value",
16217
- "description": "The value(s) to select.",
16218
- "type": {
16219
- "text": "string|number|Array<string|number>"
16220
- }
16221
- }
16222
- ],
16223
- "description": "Selects options based on their value(s) when compared to a passed value or values.\nValue or values are normalized to an array of strings that can be matched to option keys."
16224
- },
16225
- {
16226
- "kind": "method",
16227
- "name": "queuePendingValue",
16228
- "parameters": [
16229
- {
16230
- "name": "value",
16231
- "description": "The value to retry.",
16232
- "type": {
16233
- "text": "string|number|Array<string|number>"
16234
- }
16235
- }
16236
- ],
16237
- "description": "Queues a pending value and schedules a bounded retry."
16238
- },
16239
- {
16240
- "kind": "method",
16241
- "name": "clearPendingValue",
16242
- "description": "Clears pending retry state."
16344
+ "name": "clearSelection",
16345
+ "description": "Resets all options to their default state.",
16346
+ "privacy": "private"
16243
16347
  },
16244
16348
  {
16245
16349
  "kind": "method",
16246
16350
  "name": "reset",
16247
- "description": "Resets the selected options to an empty array."
16248
- },
16249
- {
16250
- "kind": "method",
16251
- "name": "subscribe",
16252
- "parameters": [
16253
- {
16254
- "name": "callback",
16255
- "description": "The callback to invoke on events.",
16256
- "type": {
16257
- "text": "Function"
16258
- }
16259
- }
16260
- ],
16261
- "description": "Subscribes a callback to menu service events."
16262
- },
16263
- {
16264
- "kind": "method",
16265
- "name": "unsubscribe",
16266
- "parameters": [
16267
- {
16268
- "name": "callback",
16269
- "type": {
16270
- "text": "Function"
16271
- }
16272
- }
16273
- ],
16274
- "description": "Remove a previously subscribed callback from menu service events."
16275
- },
16276
- {
16277
- "kind": "method",
16278
- "name": "stageUpdate",
16279
- "parameters": [
16280
- {
16281
- "name": "meta",
16282
- "default": "{}"
16283
- }
16284
- ],
16285
- "description": "Stages an update to notify subscribers of state and value changes."
16286
- },
16287
- {
16288
- "kind": "method",
16289
- "name": "notify",
16290
- "parameters": [
16291
- {
16292
- "name": "event",
16293
- "description": "The event to send to subscribers.",
16294
- "type": {
16295
- "text": "string"
16296
- }
16297
- }
16298
- ],
16299
- "description": "Notifies subscribers of a menu service event.\nAll notifications are sent to all subscribers."
16300
- },
16301
- {
16302
- "kind": "method",
16303
- "name": "notifyStateChange",
16304
- "parameters": [
16305
- {
16306
- "name": "meta",
16307
- "default": "{}"
16308
- }
16309
- ],
16310
- "description": "Notifies subscribers of a state change (selected options has changed)."
16311
- },
16312
- {
16313
- "kind": "method",
16314
- "name": "notifyValueChange",
16315
- "parameters": [
16316
- {
16317
- "name": "meta",
16318
- "default": "{}"
16319
- }
16320
- ],
16321
- "description": "Notifies subscribers of a value change (current value has changed)."
16322
- },
16323
- {
16324
- "kind": "method",
16325
- "name": "dispatchChangeEvent",
16326
- "parameters": [
16327
- {
16328
- "name": "eventName",
16329
- "type": {
16330
- "text": "string"
16331
- }
16332
- },
16333
- {
16334
- "name": "detail",
16335
- "type": {
16336
- "text": "any"
16337
- }
16338
- }
16339
- ],
16340
- "description": "Dispatches a custom event from the host element."
16341
- },
16342
- {
16343
- "kind": "method",
16344
- "name": "addMenuOption",
16345
- "parameters": [
16346
- {
16347
- "name": "option",
16348
- "description": "the option to track",
16349
- "type": {
16350
- "text": "AuroMenuOption"
16351
- }
16352
- }
16353
- ],
16354
- "description": "Adds a menu option to the service's list."
16355
- },
16356
- {
16357
- "kind": "method",
16358
- "name": "removeMenuOption",
16359
- "parameters": [
16360
- {
16361
- "name": "option",
16362
- "description": "the option to remove",
16363
- "type": {
16364
- "text": "AuroMenuOption"
16365
- }
16366
- }
16367
- ],
16368
- "description": "Removes a menu option from the service's list."
16369
- },
16370
- {
16371
- "kind": "method",
16372
- "name": "_getNormalizedValues",
16373
- "parameters": [
16374
- {
16375
- "name": "value",
16376
- "description": "The value(s) to normalize.",
16377
- "type": {
16378
- "text": "string|number|Array<string|number>"
16379
- }
16380
- }
16381
- ],
16382
- "description": "Normalizes a value or array of values into an array of strings for option selection.\nThis function ensures that input values are consistently formatted for matching menu options.",
16383
- "return": {
16384
- "type": {
16385
- "text": "Array<string>"
16386
- }
16387
- }
16388
- },
16389
- {
16390
- "kind": "method",
16391
- "name": "optionsArraysMatch",
16392
- "parameters": [
16393
- {
16394
- "name": "arr1",
16395
- "description": "First array of options.",
16396
- "type": {
16397
- "text": "AuroMenuOption[]"
16398
- }
16399
- },
16400
- {
16401
- "name": "arr2",
16402
- "description": "Second array of options.",
16403
- "type": {
16404
- "text": "AuroMenuOption[]"
16405
- }
16406
- }
16407
- ],
16408
- "description": "Returns whether two arrays of options contain the same elements.",
16409
- "return": {
16410
- "type": {
16411
- "text": "boolean"
16412
- }
16413
- }
16414
- },
16415
- {
16416
- "kind": "field",
16417
- "name": "host",
16418
- "default": "host"
16419
- },
16420
- {
16421
- "kind": "field",
16422
- "name": "size",
16423
- "default": "undefined"
16424
- },
16425
- {
16426
- "kind": "field",
16427
- "name": "shape",
16428
- "default": "undefined"
16429
- },
16430
- {
16431
- "kind": "field",
16432
- "name": "noCheckmark",
16433
- "default": "undefined"
16434
- },
16435
- {
16436
- "kind": "field",
16437
- "name": "disabled",
16438
- "default": "undefined"
16439
- },
16440
- {
16441
- "kind": "field",
16442
- "name": "matchWord",
16443
- "default": "undefined"
16444
- },
16445
- {
16446
- "kind": "field",
16447
- "name": "multiSelect",
16448
- "default": "undefined"
16449
- },
16450
- {
16451
- "kind": "field",
16452
- "name": "allowDeselect",
16453
- "default": "undefined"
16454
- },
16455
- {
16456
- "kind": "field",
16457
- "name": "selectAllMatchingOptions",
16458
- "default": "undefined"
16459
- },
16460
- {
16461
- "kind": "field",
16462
- "name": "highlightedIndex",
16463
- "type": {
16464
- "text": "number"
16465
- },
16466
- "default": "-1"
16467
- },
16468
- {
16469
- "kind": "field",
16470
- "name": "_menuOptions",
16471
- "type": {
16472
- "text": "array"
16473
- },
16474
- "default": "[]"
16475
- },
16476
- {
16477
- "kind": "field",
16478
- "name": "_subscribers",
16479
- "type": {
16480
- "text": "array"
16481
- },
16482
- "default": "[]"
16483
- },
16484
- {
16485
- "kind": "field",
16486
- "name": "internalUpdateInProgress",
16487
- "type": {
16488
- "text": "boolean"
16489
- },
16490
- "default": "false"
16491
- },
16492
- {
16493
- "kind": "field",
16494
- "name": "selectedOptions",
16495
- "type": {
16496
- "text": "array"
16497
- },
16498
- "default": "[]"
16499
- },
16500
- {
16501
- "kind": "field",
16502
- "name": "_pendingValue",
16503
- "type": {
16504
- "text": "null"
16505
- },
16506
- "default": "null"
16507
- },
16508
- {
16509
- "kind": "field",
16510
- "name": "_pendingRetryScheduled",
16511
- "type": {
16512
- "text": "boolean"
16513
- },
16514
- "default": "false"
16515
- },
16516
- {
16517
- "kind": "field",
16518
- "name": "_pendingRetryCount",
16519
- "type": {
16520
- "text": "number"
16521
- },
16522
- "default": "0"
16523
- }
16524
- ]
16525
- },
16526
- {
16527
- "kind": "variable",
16528
- "name": "MenuContext"
16529
- }
16530
- ],
16531
- "exports": [
16532
- {
16533
- "kind": "js",
16534
- "name": "MenuService",
16535
- "declaration": {
16536
- "name": "MenuService",
16537
- "module": "components/menu/src/auro-menu.context.js"
16538
- }
16539
- },
16540
- {
16541
- "kind": "js",
16542
- "name": "MenuContext",
16543
- "declaration": {
16544
- "name": "MenuContext",
16545
- "module": "components/menu/src/auro-menu.context.js"
16546
- }
16547
- }
16548
- ]
16549
- },
16550
- {
16551
- "kind": "javascript-module",
16552
- "path": "components/menu/src/auro-menu.js",
16553
- "declarations": [
16554
- {
16555
- "kind": "class",
16556
- "description": "The `auro-menu` element provides users a way to select from a list of options.",
16557
- "name": "AuroMenu",
16558
- "slots": [
16559
- {
16560
- "description": "Text to show while loading attribute is set",
16561
- "name": "loadingText"
16562
- },
16563
- {
16564
- "description": "Icon to show while loading attribute is set",
16565
- "name": "loadingIcon"
16566
- },
16567
- {
16568
- "description": "Slot for insertion of menu options.",
16569
- "name": ""
16570
- }
16571
- ],
16572
- "members": [
16573
- {
16574
- "kind": "field",
16575
- "name": "currentLabel",
16576
- "readonly": true,
16577
- "return": {
16578
- "type": {
16579
- "text": "string"
16580
- }
16581
- }
16582
- },
16583
- {
16584
- "kind": "field",
16585
- "name": "items",
16586
- "readonly": true,
16587
- "return": {
16588
- "type": {
16589
- "text": "Array<HTMLElement>"
16590
- }
16591
- },
16592
- "deprecated": "Use `options` property instead."
16593
- },
16594
- {
16595
- "kind": "field",
16596
- "name": "index",
16597
- "return": {
16598
- "type": {
16599
- "text": "number"
16600
- }
16601
- },
16602
- "parameters": [
16603
- {
16604
- "description": "Sets the index of the currently active option.",
16605
- "name": "value",
16606
- "type": {
16607
- "text": "number"
16608
- }
16609
- }
16610
- ]
16351
+ "description": "Resets the menu to its initial state.\nThis is the only way to return value to undefined.",
16352
+ "privacy": "public"
16611
16353
  },
16612
16354
  {
16613
16355
  "kind": "method",
16614
- "name": "register",
16615
- "static": true,
16356
+ "name": "handleNestedMenus",
16616
16357
  "parameters": [
16617
16358
  {
16618
- "name": "name",
16619
- "default": "\"auro-menu\"",
16620
- "description": "The name of the element that you want to register.",
16621
- "optional": true,
16359
+ "name": "menu",
16360
+ "description": "Root menu element.",
16622
16361
  "type": {
16623
- "text": "string"
16362
+ "text": "HTMLElement"
16624
16363
  }
16625
16364
  }
16626
16365
  ],
16627
- "description": "This will register this element with the browser."
16628
- },
16629
- {
16630
- "kind": "field",
16631
- "name": "formattedValue",
16632
- "description": "Formatted value based on `multiSelect` state.\nDefault type is `String`, changing to `Array<String>` when `multiSelect` is true.",
16633
- "privacy": "private",
16634
- "return": {
16635
- "type": {
16636
- "text": "String|Array<String>"
16637
- }
16638
- },
16639
- "readonly": true
16640
- },
16641
- {
16642
- "kind": "field",
16643
- "name": "propertyValues",
16644
- "description": "Gets the current property values for the menu service.",
16645
- "privacy": "private",
16646
- "return": {
16647
- "type": {
16648
- "text": "Object"
16649
- }
16650
- },
16651
- "readonly": true
16366
+ "description": "Handles nested menu structure.",
16367
+ "privacy": "private"
16652
16368
  },
16653
16369
  {
16654
16370
  "kind": "method",
16655
- "name": "provideContext",
16656
- "description": "Provides the menu context to child components.\nInitializes the MenuService and subscribes to menu changes.",
16657
- "privacy": "protected"
16371
+ "name": "makeSelection",
16372
+ "description": "Makes a selection based on the current index.",
16373
+ "privacy": "private"
16658
16374
  },
16659
16375
  {
16660
16376
  "kind": "method",
16661
- "name": "updateActiveOption",
16377
+ "name": "toggleOption",
16662
16378
  "parameters": [
16663
16379
  {
16664
16380
  "name": "option",
16665
- "description": "The option to set as active.",
16381
+ "description": "The menuoption to toggle.",
16666
16382
  "type": {
16667
16383
  "text": "HTMLElement"
16668
16384
  }
16669
16385
  }
16670
16386
  ],
16671
- "description": "Updates the currently active option in the menu."
16672
- },
16673
- {
16674
- "kind": "method",
16675
- "name": "setInternalValue",
16676
- "parameters": [
16677
- {
16678
- "name": "value",
16679
- "description": "The value to set.",
16680
- "type": {
16681
- "text": "String|Array<String>"
16682
- }
16683
- }
16684
- ],
16685
- "description": "Sets the internal value and manages update state.",
16686
- "privacy": "protected"
16387
+ "description": "Toggle the selection state of the menuoption.",
16388
+ "privacy": "private"
16687
16389
  },
16688
16390
  {
16689
16391
  "kind": "method",
16690
- "name": "handleMenuChange",
16392
+ "name": "handleKeyDown",
16691
16393
  "parameters": [
16692
16394
  {
16693
16395
  "name": "event",
16694
- "description": "The event object from the menu service.",
16396
+ "description": "The keydown event.",
16695
16397
  "type": {
16696
- "text": "Object"
16398
+ "text": "KeyboardEvent"
16697
16399
  }
16698
16400
  }
16699
16401
  ],
16700
- "description": "Handles changes from the menu service and updates component state.",
16701
- "privacy": "protected"
16702
- },
16703
- {
16704
- "kind": "field",
16705
- "name": "selectedOptions",
16706
- "description": "Gets the currently selected options.",
16707
- "return": {
16708
- "type": {
16709
- "text": "Array<HTMLElement>"
16710
- }
16711
- },
16712
- "readonly": true
16713
- },
16714
- {
16715
- "kind": "field",
16716
- "name": "selectedOption",
16717
- "description": "Gets the first selected option, or null if none.",
16718
- "return": {
16719
- "type": {
16720
- "text": "HTMLElement|null"
16721
- }
16722
- },
16723
- "readonly": true
16402
+ "description": "Handles keyboard navigation and selection.",
16403
+ "privacy": "private"
16724
16404
  },
16725
16405
  {
16726
16406
  "kind": "method",
16727
- "name": "setTagAttribute",
16407
+ "name": "handleMouseSelect",
16728
16408
  "parameters": [
16729
16409
  {
16730
- "name": "tagName",
16731
- "description": "The tag name to set as an attribute.",
16410
+ "name": "event",
16411
+ "description": "The auroMenuOption-click event.",
16732
16412
  "type": {
16733
- "text": "string"
16413
+ "text": "CustomEvent"
16734
16414
  }
16735
16415
  }
16736
16416
  ],
16737
- "description": "Sets an attribute that matches the default tag name if the tag name is not the default.",
16417
+ "description": "Handles option selection via click events from menuoptions.",
16738
16418
  "privacy": "private"
16739
16419
  },
16740
16420
  {
16741
16421
  "kind": "method",
16742
- "name": "setLoadingState",
16422
+ "name": "handleOptionHover",
16743
16423
  "parameters": [
16744
16424
  {
16745
- "name": "isLoading",
16746
- "description": "Whether the menu is loading.",
16425
+ "name": "event",
16426
+ "description": "Event object from the browser.",
16747
16427
  "type": {
16748
- "text": "boolean"
16428
+ "text": "CustomEvent"
16749
16429
  }
16750
16430
  }
16751
16431
  ],
16752
- "description": "Sets the loading state and dispatches a loading change event.",
16753
- "privacy": "protected"
16754
- },
16755
- {
16756
- "kind": "method",
16757
- "name": "initializeMenu",
16758
- "description": "Initializes the menu's state and structure.",
16759
- "privacy": "private"
16760
- },
16761
- {
16762
- "kind": "method",
16763
- "name": "makeSelection",
16764
- "description": "Selects the currently highlighted option.",
16765
- "privacy": "protected"
16766
- },
16767
- {
16768
- "kind": "method",
16769
- "name": "clearSelection",
16770
- "description": "Resets all options to their default state.",
16432
+ "description": "Handles option hover events.",
16771
16433
  "privacy": "private"
16772
16434
  },
16773
16435
  {
16774
16436
  "kind": "method",
16775
- "name": "reset",
16776
- "description": "Resets the menu to its initial state.\nThis is the only way to return value to undefined.",
16777
- "privacy": "public"
16778
- },
16779
- {
16780
- "kind": "method",
16781
- "name": "handleNestedMenus",
16782
- "parameters": [
16783
- {
16784
- "name": "menu",
16785
- "description": "Root menu element.",
16786
- "type": {
16787
- "text": "HTMLElement"
16788
- }
16789
- }
16790
- ],
16791
- "description": "Handles nested menu structure.",
16437
+ "name": "handleSlotChange",
16438
+ "description": "Handles slot change events.",
16792
16439
  "privacy": "private"
16793
16440
  },
16794
16441
  {
@@ -16797,20 +16444,27 @@
16797
16444
  "parameters": [
16798
16445
  {
16799
16446
  "name": "direction",
16800
- "description": "The direction to navigate.",
16447
+ "description": "'up' or 'down'.",
16801
16448
  "type": {
16802
- "text": "'up'|'down'"
16449
+ "text": "string"
16803
16450
  }
16804
16451
  }
16805
16452
  ],
16806
- "description": "Navigates the menu options in the specified direction.",
16807
- "privacy": "protected"
16453
+ "description": "Navigates through options using keyboard."
16808
16454
  },
16809
16455
  {
16810
16456
  "kind": "method",
16811
- "name": "handleSlotChange",
16812
- "description": "Handles slot change events.",
16813
- "privacy": "private"
16457
+ "name": "updateActiveOption",
16458
+ "parameters": [
16459
+ {
16460
+ "name": "indexOrOption",
16461
+ "description": "Index of the option or the option element to make active.",
16462
+ "type": {
16463
+ "text": "number|HTMLElement"
16464
+ }
16465
+ }
16466
+ ],
16467
+ "description": "Updates the active option state and dispatches events.\nAccepts either a numeric index or an HTMLElement option."
16814
16468
  },
16815
16469
  {
16816
16470
  "kind": "method",
@@ -16832,12 +16486,9 @@
16832
16486
  "name": "notifySelectionChange",
16833
16487
  "parameters": [
16834
16488
  {
16835
- "name": "{value, stringValue, keys, options, reason}",
16836
- "default": "{}"
16837
- },
16838
- {
16839
- "description": "The source that triggers this event.",
16840
16489
  "name": "source",
16490
+ "default": "undefined",
16491
+ "description": "The source that triggers this event.",
16841
16492
  "type": {
16842
16493
  "text": "any"
16843
16494
  }
@@ -16846,6 +16497,32 @@
16846
16497
  "description": "Notifies selection change to parent components.",
16847
16498
  "privacy": "private"
16848
16499
  },
16500
+ {
16501
+ "kind": "method",
16502
+ "name": "selectionEquals",
16503
+ "parameters": [
16504
+ {
16505
+ "name": "current",
16506
+ "description": "Current selection.",
16507
+ "type": {
16508
+ "text": "any"
16509
+ }
16510
+ },
16511
+ {
16512
+ "name": "next",
16513
+ "description": "New selection to compare.",
16514
+ "type": {
16515
+ "text": "any"
16516
+ }
16517
+ }
16518
+ ],
16519
+ "privacy": "private",
16520
+ "return": {
16521
+ "type": {
16522
+ "text": "boolean"
16523
+ }
16524
+ }
16525
+ },
16849
16526
  {
16850
16527
  "kind": "method",
16851
16528
  "name": "isOptionSelected",
@@ -16869,18 +16546,13 @@
16869
16546
  {
16870
16547
  "kind": "field",
16871
16548
  "name": "hasLoadingPlaceholder",
16872
- "privacy": "public",
16873
- "type": {
16874
- "text": "boolean"
16875
- },
16876
16549
  "description": "Getter for loading placeholder state.",
16877
16550
  "return": {
16878
16551
  "type": {
16879
16552
  "text": "boolean"
16880
16553
  }
16881
16554
  },
16882
- "readonly": true,
16883
- "attribute": "hasLoadingPlaceholder"
16555
+ "readonly": true
16884
16556
  },
16885
16557
  {
16886
16558
  "kind": "field",
@@ -16914,7 +16586,6 @@
16914
16586
  },
16915
16587
  "attribute": "shape",
16916
16588
  "reflects": true,
16917
- "description": "Sets the shape of the menu.",
16918
16589
  "default": "\"box\"",
16919
16590
  "inheritedFrom": {
16920
16591
  "name": "AuroElement",
@@ -16930,13 +16601,24 @@
16930
16601
  },
16931
16602
  "attribute": "size",
16932
16603
  "reflects": true,
16933
- "description": "Sets the size of the menu.",
16934
16604
  "default": "\"sm\"",
16935
16605
  "inheritedFrom": {
16936
16606
  "name": "AuroElement",
16937
16607
  "module": "components/layoutElement/src/auroElement.js"
16938
16608
  }
16939
16609
  },
16610
+ {
16611
+ "kind": "field",
16612
+ "name": "value",
16613
+ "privacy": "public",
16614
+ "type": {
16615
+ "text": "string"
16616
+ },
16617
+ "description": "The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.",
16618
+ "default": "undefined",
16619
+ "attribute": "value",
16620
+ "reflects": true
16621
+ },
16940
16622
  {
16941
16623
  "kind": "field",
16942
16624
  "name": "optionSelected",
@@ -17006,30 +16688,6 @@
17006
16688
  "attribute": "multiselect",
17007
16689
  "reflects": true
17008
16690
  },
17009
- {
17010
- "kind": "field",
17011
- "name": "allowDeselect",
17012
- "privacy": "public",
17013
- "type": {
17014
- "text": "boolean"
17015
- },
17016
- "description": "Allows deselecting an already selected option when clicked again in single-select mode.",
17017
- "default": "false",
17018
- "attribute": "allowDeselect",
17019
- "reflects": true
17020
- },
17021
- {
17022
- "kind": "field",
17023
- "name": "selectAllMatchingOptions",
17024
- "privacy": "public",
17025
- "type": {
17026
- "text": "boolean"
17027
- },
17028
- "description": "When true, selects all options that match the provided value/key when setting value and multiselect is enabled.",
17029
- "default": "false",
17030
- "attribute": "selectAllMatchingOptions",
17031
- "reflects": true
17032
- },
17033
16691
  {
17034
16692
  "kind": "field",
17035
16693
  "name": "disabled",
@@ -17041,22 +16699,6 @@
17041
16699
  "attribute": "disabled",
17042
16700
  "reflects": true
17043
16701
  },
17044
- {
17045
- "kind": "field",
17046
- "name": "layout",
17047
- "privacy": "public",
17048
- "type": {
17049
- "text": "string"
17050
- },
17051
- "description": "Defines the language of an element.",
17052
- "default": "{'default'}",
17053
- "attribute": "layout",
17054
- "reflects": true,
17055
- "inheritedFrom": {
17056
- "name": "AuroElement",
17057
- "module": "components/layoutElement/src/auroElement.js"
17058
- }
17059
- },
17060
16702
  {
17061
16703
  "kind": "field",
17062
16704
  "name": "level",
@@ -17066,27 +16708,6 @@
17066
16708
  },
17067
16709
  "description": "Indent level for submenus."
17068
16710
  },
17069
- {
17070
- "kind": "field",
17071
- "name": "options",
17072
- "privacy": "public",
17073
- "type": {
17074
- "text": "array"
17075
- },
17076
- "description": "Available menu options.",
17077
- "readonly": true
17078
- },
17079
- {
17080
- "kind": "field",
17081
- "name": "value",
17082
- "privacy": "public",
17083
- "type": {
17084
- "text": "string"
17085
- },
17086
- "description": "The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.",
17087
- "attribute": "value",
17088
- "reflects": true
17089
- },
17090
16711
  {
17091
16712
  "kind": "field",
17092
16713
  "name": "componentHasFocus",
@@ -17127,6 +16748,22 @@
17127
16748
  "module": "components/layoutElement/src/auroElement.js"
17128
16749
  }
17129
16750
  },
16751
+ {
16752
+ "kind": "field",
16753
+ "name": "layout",
16754
+ "privacy": "public",
16755
+ "type": {
16756
+ "text": "string"
16757
+ },
16758
+ "description": "Defines the language of an element.",
16759
+ "default": "{'default'}",
16760
+ "attribute": "layout",
16761
+ "reflects": true,
16762
+ "inheritedFrom": {
16763
+ "name": "AuroElement",
16764
+ "module": "components/layoutElement/src/auroElement.js"
16765
+ }
16766
+ },
17130
16767
  {
17131
16768
  "kind": "field",
17132
16769
  "name": "onDark",
@@ -17177,13 +16814,6 @@
17177
16814
  "description": "Notifies that an attempt to select a menuoption by matching a value has failed.",
17178
16815
  "name": "auroMenu-selectValueFailure"
17179
16816
  },
17180
- {
17181
- "type": {
17182
- "text": "CustomEvent<{ values: HTMLElement[] }>"
17183
- },
17184
- "description": "Notifies that deselection was prevented and includes the affected options in `detail.values`.",
17185
- "name": "auroMenu-deselectPrevented"
17186
- },
17187
16817
  {
17188
16818
  "type": {
17189
16819
  "text": "CustomEvent<any>"
@@ -17200,15 +16830,6 @@
17200
16830
  }
17201
16831
  ],
17202
16832
  "attributes": [
17203
- {
17204
- "name": "allowDeselect",
17205
- "type": {
17206
- "text": "boolean"
17207
- },
17208
- "description": "Allows deselecting an already selected option when clicked again in single-select mode.",
17209
- "default": "false",
17210
- "fieldName": "allowDeselect"
17211
- },
17212
16833
  {
17213
16834
  "name": "disabled",
17214
16835
  "type": {
@@ -17217,33 +16838,6 @@
17217
16838
  "description": "When true, the entire menu and all options are disabled.",
17218
16839
  "fieldName": "disabled"
17219
16840
  },
17220
- {
17221
- "name": "hasLoadingPlaceholder",
17222
- "type": {
17223
- "text": "boolean"
17224
- },
17225
- "description": "Getter for loading placeholder state.",
17226
- "return": {
17227
- "type": {
17228
- "text": "boolean"
17229
- }
17230
- },
17231
- "readonly": true,
17232
- "fieldName": "hasLoadingPlaceholder"
17233
- },
17234
- {
17235
- "name": "layout",
17236
- "type": {
17237
- "text": "string"
17238
- },
17239
- "description": "Defines the language of an element.",
17240
- "default": "{'default'}",
17241
- "fieldName": "layout",
17242
- "inheritedFrom": {
17243
- "name": "AuroElement",
17244
- "module": "components/layoutElement/src/auroElement.js"
17245
- }
17246
- },
17247
16841
  {
17248
16842
  "name": "loading",
17249
16843
  "type": {
@@ -17299,26 +16893,26 @@
17299
16893
  "fieldName": "optionSelected"
17300
16894
  },
17301
16895
  {
17302
- "name": "size",
16896
+ "name": "value",
17303
16897
  "type": {
17304
16898
  "text": "string"
17305
16899
  },
17306
- "fieldName": "size",
17307
- "description": "Sets the size of the menu.",
17308
- "default": "\"sm\"",
17309
- "inheritedFrom": {
17310
- "name": "AuroElement",
17311
- "module": "components/layoutElement/src/auroElement.js"
17312
- }
16900
+ "description": "The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.",
16901
+ "default": "undefined",
16902
+ "fieldName": "value"
17313
16903
  },
17314
16904
  {
17315
- "name": "selectAllMatchingOptions",
16905
+ "name": "layout",
17316
16906
  "type": {
17317
- "text": "boolean"
16907
+ "text": "string"
17318
16908
  },
17319
- "description": "When true, selects all options that match the provided value/key when setting value and multiselect is enabled.",
17320
- "default": "false",
17321
- "fieldName": "selectAllMatchingOptions"
16909
+ "description": "Defines the language of an element.",
16910
+ "default": "{'default'}",
16911
+ "fieldName": "layout",
16912
+ "inheritedFrom": {
16913
+ "name": "AuroElement",
16914
+ "module": "components/layoutElement/src/auroElement.js"
16915
+ }
17322
16916
  },
17323
16917
  {
17324
16918
  "name": "shape",
@@ -17326,20 +16920,21 @@
17326
16920
  "text": "string"
17327
16921
  },
17328
16922
  "fieldName": "shape",
17329
- "description": "Sets the shape of the menu.",
17330
- "default": "\"box\"",
17331
16923
  "inheritedFrom": {
17332
16924
  "name": "AuroElement",
17333
16925
  "module": "components/layoutElement/src/auroElement.js"
17334
16926
  }
17335
16927
  },
17336
16928
  {
17337
- "name": "value",
16929
+ "name": "size",
17338
16930
  "type": {
17339
16931
  "text": "string"
17340
16932
  },
17341
- "description": "The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.",
17342
- "fieldName": "value"
16933
+ "fieldName": "size",
16934
+ "inheritedFrom": {
16935
+ "name": "AuroElement",
16936
+ "module": "components/layoutElement/src/auroElement.js"
16937
+ }
17343
16938
  },
17344
16939
  {
17345
16940
  "name": "ondark",
@@ -17395,7 +16990,7 @@
17395
16990
  {
17396
16991
  "name": "name",
17397
16992
  "default": "\"auro-menuoption\"",
17398
- "description": "The name of the element that you want to register.",
16993
+ "description": "The name of element that you want to register to.",
17399
16994
  "optional": true,
17400
16995
  "type": {
17401
16996
  "text": "string"
@@ -17407,7 +17002,7 @@
17407
17002
  {
17408
17003
  "kind": "field",
17409
17004
  "name": "isActive",
17410
- "description": "Returns whether the menu option is currently active and selectable.\nAn option is considered active if it is not hidden, not disabled, and not static.",
17005
+ "description": "Returns whether the menu option is currently active and selectable.",
17411
17006
  "return": {
17412
17007
  "type": {
17413
17008
  "text": "boolean"
@@ -17417,115 +17012,34 @@
17417
17012
  },
17418
17013
  {
17419
17014
  "kind": "method",
17420
- "name": "bindEvents",
17421
- "description": "Sets up event listeners for user interaction with the menu option.\nThis function enables click and mouse enter events to trigger selection and highlighting logic."
17422
- },
17423
- {
17424
- "kind": "method",
17425
- "name": "attachTo",
17426
- "parameters": [
17427
- {
17428
- "name": "service",
17429
- "description": "The menu service instance to attach to.",
17430
- "type": {
17431
- "text": "Object"
17432
- }
17433
- }
17434
- ],
17435
- "description": "Attaches this menu option to a menu service and subscribes to its events.\nThis method enables the option to participate in menu selection and highlighting logic."
17436
- },
17437
- {
17438
- "kind": "method",
17439
- "name": "handleMenuChange",
17440
- "parameters": [
17441
- {
17442
- "name": "event",
17443
- "description": "The event object from the menu service.",
17444
- "type": {
17445
- "text": "Object"
17446
- }
17447
- }
17448
- ],
17449
- "description": "Handles changes from the menu service and updates the option's state.\nThis function synchronizes the option's properties and selection/highlight state with menu events."
17450
- },
17451
- {
17452
- "kind": "method",
17453
- "name": "setInternalSelected",
17454
- "parameters": [
17455
- {
17456
- "name": "isSelected",
17457
- "description": "Whether the option should be marked as selected.",
17458
- "type": {
17459
- "text": "boolean"
17460
- }
17461
- }
17462
- ],
17463
- "description": "Updates the internal selected state of the menu option bypassing 'updated' and triggers custom events if selected.\nThis function ensures the option's selection state is synchronized with menu logic and notifies listeners."
17015
+ "name": "handleMenuChange"
17464
17016
  },
17465
17017
  {
17466
17018
  "kind": "method",
17467
17019
  "name": "setSelected",
17468
17020
  "parameters": [
17469
17021
  {
17470
- "name": "isSelected",
17471
- "description": "Whether the option should be marked as selected.",
17472
- "type": {
17473
- "text": "boolean"
17474
- }
17475
- }
17476
- ],
17477
- "description": "Sets the selected state of the menu option.\nThis function updates whether the option is currently selected.",
17478
- "deprecated": "Simply modify the `selected` property directly instead."
17479
- },
17480
- {
17481
- "kind": "method",
17482
- "name": "updateActive",
17483
- "parameters": [
17484
- {
17485
- "name": "isActive",
17486
- "description": "Whether the option should be marked as active.",
17487
- "type": {
17488
- "text": "boolean"
17489
- }
17022
+ "name": "value"
17490
17023
  }
17491
- ],
17492
- "description": "Updates the active state and visual highlighting of the menu option.\nThis function toggles the option's active status and applies or removes the active CSS class.",
17493
- "deprecated": "Simply modify the `active` property directly instead."
17494
- },
17495
- {
17496
- "kind": "method",
17497
- "name": "updateActiveClasses",
17498
- "description": "Updates the CSS class for the menu option based on its active state.\nThis function adds or removes the 'active' class to visually indicate the option's active status.",
17499
- "privacy": "private"
17500
- },
17501
- {
17502
- "kind": "method",
17503
- "name": "updateTextHighlight",
17504
- "description": "Updates the visual highlighting of text within the menu option based on the current match word.\nThis function highlights matching text segments and manages nested spacers for display formatting.",
17505
- "privacy": "private"
17506
- },
17507
- {
17508
- "kind": "method",
17509
- "name": "handleClick",
17510
- "description": "Handles click events on the menu option, toggling its selected state.\nThis function dispatches a click event and updates selection if the option is not disabled.",
17511
- "privacy": "private"
17024
+ ]
17512
17025
  },
17513
17026
  {
17514
17027
  "kind": "method",
17515
- "name": "handleMouseEnter",
17516
- "description": "Handles mouse enter events to highlight the menu option.\nThis function updates the menu service to set this option as the currently highlighted item if not disabled.",
17517
- "privacy": "private"
17028
+ "name": "updateActive",
17029
+ "parameters": [
17030
+ {
17031
+ "name": "active"
17032
+ }
17033
+ ]
17518
17034
  },
17519
17035
  {
17520
17036
  "kind": "method",
17521
- "name": "handleCustomEvent",
17522
- "description": "Dispatches custom events defined for this menu option.\nThis function notifies listeners when a custom event is triggered by the option.",
17523
- "privacy": "private"
17037
+ "name": "attachTo"
17524
17038
  },
17525
17039
  {
17526
17040
  "kind": "method",
17527
- "name": "dispatchClickEvent",
17528
- "description": "Dispatches a click event for this menu option.\nThis function notifies listeners that the option has been clicked.",
17041
+ "name": "handleClick",
17042
+ "description": "Handles click events on the menu option.",
17529
17043
  "privacy": "private"
17530
17044
  },
17531
17045
  {
@@ -17600,7 +17114,6 @@
17600
17114
  "type": {
17601
17115
  "text": "boolean"
17602
17116
  },
17603
- "description": "Specifies that an option is selected.",
17604
17117
  "default": "false",
17605
17118
  "attribute": "selected",
17606
17119
  "reflects": true
@@ -17608,7 +17121,7 @@
17608
17121
  {
17609
17122
  "kind": "field",
17610
17123
  "name": "noCheckmark",
17611
- "privacy": "private",
17124
+ "privacy": "public",
17612
17125
  "type": {
17613
17126
  "text": "boolean"
17614
17127
  },
@@ -17623,7 +17136,6 @@
17623
17136
  "type": {
17624
17137
  "text": "boolean"
17625
17138
  },
17626
- "description": "When true, disables the menu option.",
17627
17139
  "default": "false",
17628
17140
  "attribute": "disabled",
17629
17141
  "reflects": true
@@ -17635,101 +17147,46 @@
17635
17147
  "type": {
17636
17148
  "text": "boolean"
17637
17149
  },
17638
- "description": "When true, marks this option as the \"no matching results\" placeholder shown by combobox when the user's input does not match any available options. Enables distinct styling and prevents the option from being treated as a selectable match.",
17150
+ "description": "When true, marks this option as the \"no matching results\" placeholder shown by combobox\nwhen the user's input does not match any available options.",
17639
17151
  "default": "false",
17640
17152
  "attribute": "nomatch",
17641
17153
  "reflects": true
17642
17154
  },
17643
17155
  {
17644
17156
  "kind": "field",
17645
- "name": "runtimeUtils",
17646
- "privacy": "private",
17647
- "default": "new AuroLibraryRuntimeUtils()"
17648
- },
17649
- {
17650
- "kind": "field",
17651
- "name": "menuService",
17652
- "privacy": "private",
17653
- "type": {
17654
- "text": "null"
17655
- },
17656
- "default": "null",
17657
- "attribute": "menuService"
17658
- },
17659
- {
17660
- "kind": "field",
17661
- "name": "unsubscribe",
17662
- "type": {
17663
- "text": "null"
17664
- },
17665
- "default": "null"
17666
- },
17667
- {
17668
- "kind": "field",
17669
- "name": "event",
17157
+ "name": "tabIndex",
17670
17158
  "privacy": "private",
17671
17159
  "type": {
17672
- "text": "string"
17160
+ "text": "number"
17673
17161
  },
17674
- "attribute": "event",
17162
+ "default": "-1",
17163
+ "attribute": "tabIndex",
17675
17164
  "reflects": true
17676
17165
  },
17677
17166
  {
17678
17167
  "kind": "field",
17679
- "name": "layout",
17680
- "privacy": "public",
17681
- "type": {
17682
- "text": "string"
17683
- },
17684
- "description": "Defines the language of an element.",
17685
- "default": "{'default'}",
17686
- "attribute": "layout",
17687
- "reflects": true,
17688
- "inheritedFrom": {
17689
- "name": "AuroElement",
17690
- "module": "components/layoutElement/src/auroElement.js"
17691
- }
17168
+ "name": "runtimeUtils",
17169
+ "privacy": "private",
17170
+ "default": "new AuroLibraryRuntimeUtils()"
17692
17171
  },
17693
17172
  {
17694
17173
  "kind": "field",
17695
- "name": "key",
17174
+ "name": "value",
17696
17175
  "privacy": "public",
17697
17176
  "type": {
17698
17177
  "text": "string"
17699
17178
  },
17700
- "description": "Allows users to set a unique key for the menu option for specified option selection. If no key is provided, the value property will be used.",
17701
- "attribute": "key",
17179
+ "attribute": "value",
17702
17180
  "reflects": true
17703
17181
  },
17704
17182
  {
17705
17183
  "kind": "field",
17706
- "name": "matchWord",
17184
+ "name": "event",
17707
17185
  "privacy": "private",
17708
17186
  "type": {
17709
17187
  "text": "string"
17710
17188
  },
17711
- "attribute": "matchWord"
17712
- },
17713
- {
17714
- "kind": "field",
17715
- "name": "tabIndex",
17716
- "privacy": "public",
17717
- "type": {
17718
- "text": "number"
17719
- },
17720
- "description": "Specifies the tab index of the menu option.",
17721
- "attribute": "tabIndex",
17722
- "reflects": true
17723
- },
17724
- {
17725
- "kind": "field",
17726
- "name": "value",
17727
- "privacy": "public",
17728
- "type": {
17729
- "text": "string"
17730
- },
17731
- "description": "Specifies the value to be sent to a server.",
17732
- "attribute": "value",
17189
+ "attribute": "event",
17733
17190
  "reflects": true
17734
17191
  },
17735
17192
  {
@@ -17772,6 +17229,22 @@
17772
17229
  "module": "components/layoutElement/src/auroElement.js"
17773
17230
  }
17774
17231
  },
17232
+ {
17233
+ "kind": "field",
17234
+ "name": "layout",
17235
+ "privacy": "public",
17236
+ "type": {
17237
+ "text": "string"
17238
+ },
17239
+ "description": "Defines the language of an element.",
17240
+ "default": "{'default'}",
17241
+ "attribute": "layout",
17242
+ "reflects": true,
17243
+ "inheritedFrom": {
17244
+ "name": "AuroElement",
17245
+ "module": "components/layoutElement/src/auroElement.js"
17246
+ }
17247
+ },
17775
17248
  {
17776
17249
  "kind": "field",
17777
17250
  "name": "onDark",
@@ -17799,103 +17272,78 @@
17799
17272
  "name": "auroMenuOption-click",
17800
17273
  "type": {
17801
17274
  "text": "CustomEvent"
17802
- }
17275
+ },
17276
+ "description": "Notifies that this option has been clicked."
17803
17277
  }
17804
17278
  ],
17805
17279
  "attributes": [
17806
17280
  {
17807
- "name": "disabled",
17281
+ "name": "noCheckmark",
17808
17282
  "type": {
17809
17283
  "text": "boolean"
17810
17284
  },
17811
- "description": "When true, disables the menu option.",
17812
17285
  "default": "false",
17813
- "fieldName": "disabled"
17286
+ "fieldName": "noCheckmark"
17814
17287
  },
17815
17288
  {
17816
- "name": "event",
17289
+ "name": "selected",
17817
17290
  "type": {
17818
- "text": "string"
17291
+ "text": "boolean"
17819
17292
  },
17820
- "fieldName": "event"
17293
+ "default": "false",
17294
+ "fieldName": "selected"
17821
17295
  },
17822
17296
  {
17823
- "name": "layout",
17297
+ "name": "disabled",
17824
17298
  "type": {
17825
- "text": "string"
17299
+ "text": "boolean"
17826
17300
  },
17827
- "description": "Defines the language of an element.",
17828
- "default": "{'default'}",
17829
- "fieldName": "layout",
17830
- "inheritedFrom": {
17831
- "name": "AuroElement",
17832
- "module": "components/layoutElement/src/auroElement.js"
17833
- }
17301
+ "default": "false",
17302
+ "fieldName": "disabled"
17834
17303
  },
17835
17304
  {
17836
- "name": "key",
17305
+ "name": "value",
17837
17306
  "type": {
17838
17307
  "text": "string"
17839
17308
  },
17840
- "description": "Allows users to set a unique key for the menu option for specified option selection. If no key is provided, the value property will be used.",
17841
- "fieldName": "key"
17309
+ "fieldName": "value"
17842
17310
  },
17843
17311
  {
17844
- "name": "menuService",
17312
+ "name": "tabIndex",
17845
17313
  "type": {
17846
- "text": "null"
17314
+ "text": "number"
17847
17315
  },
17848
- "default": "null",
17849
- "fieldName": "menuService"
17316
+ "default": "-1",
17317
+ "fieldName": "tabIndex"
17850
17318
  },
17851
17319
  {
17852
- "name": "matchWord",
17320
+ "name": "event",
17853
17321
  "type": {
17854
17322
  "text": "string"
17855
17323
  },
17856
- "fieldName": "matchWord"
17857
- },
17858
- {
17859
- "name": "noCheckmark",
17860
- "type": {
17861
- "text": "boolean"
17862
- },
17863
- "default": "false",
17864
- "fieldName": "noCheckmark"
17324
+ "fieldName": "event"
17865
17325
  },
17866
17326
  {
17867
17327
  "name": "nomatch",
17868
17328
  "type": {
17869
17329
  "text": "boolean"
17870
17330
  },
17871
- "description": "When true, marks this option as the \"no matching results\" placeholder shown by combobox when the user's input does not match any available options. Enables distinct styling and prevents the option from being treated as a selectable match.",
17331
+ "description": "When true, marks this option as the \"no matching results\" placeholder shown by combobox\nwhen the user's input does not match any available options.",
17872
17332
  "default": "false",
17873
17333
  "fieldName": "noMatch"
17874
17334
  },
17875
17335
  {
17876
- "name": "selected",
17877
- "type": {
17878
- "text": "boolean"
17879
- },
17880
- "description": "Specifies that an option is selected.",
17881
- "default": "false",
17882
- "fieldName": "selected"
17883
- },
17884
- {
17885
- "name": "tabIndex",
17886
- "type": {
17887
- "text": "number"
17888
- },
17889
- "description": "Specifies the tab index of the menu option.",
17890
- "fieldName": "tabIndex"
17891
- },
17892
- {
17893
- "name": "value",
17336
+ "name": "layout",
17894
17337
  "type": {
17895
17338
  "text": "string"
17896
17339
  },
17897
- "description": "Specifies the value to be sent to a server.",
17898
- "fieldName": "value"
17340
+ "description": "Defines the language of an element.",
17341
+ "default": "{'default'}",
17342
+ "fieldName": "layout",
17343
+ "inheritedFrom": {
17344
+ "name": "AuroElement",
17345
+ "module": "components/layoutElement/src/auroElement.js"
17346
+ }
17899
17347
  },
17900
17348
  {
17901
17349
  "name": "shape",
@@ -19279,6 +18727,32 @@
19279
18727
  ],
19280
18728
  "description": "Updates the active option in the menu."
19281
18729
  },
18730
+ {
18731
+ "kind": "method",
18732
+ "name": "_getOptionDisplayText",
18733
+ "parameters": [
18734
+ {
18735
+ "name": "option",
18736
+ "description": "The menu option element.",
18737
+ "type": {
18738
+ "text": "HTMLElement"
18739
+ }
18740
+ }
18741
+ ],
18742
+ "description": "Returns the lowercase, trimmed text content of a menu option.",
18743
+ "privacy": "private",
18744
+ "return": {
18745
+ "type": {
18746
+ "text": "string"
18747
+ }
18748
+ }
18749
+ },
18750
+ {
18751
+ "kind": "method",
18752
+ "name": "_clearTypeaheadBuffer",
18753
+ "description": "Empties the type-ahead buffer and cancels any pending reset timeout.\nCalled when focus leaves the component, when Escape closes the bib, and on disconnect\nso a stale buffer never bridges into a fresh interaction.",
18754
+ "privacy": "private"
18755
+ },
19282
18756
  {
19283
18757
  "kind": "method",
19284
18758
  "name": "updateActiveOptionBasedOnKey",
@@ -19291,7 +18765,7 @@
19291
18765
  }
19292
18766
  }
19293
18767
  ],
19294
- "description": "Updates the active option in the menu based on keyboard input.",
18768
+ "description": "Updates the active option in the menu based on keyboard input.\n\nImplements the WAI-ARIA APG Listbox type-ahead pattern: accumulates printable\nkeystrokes into a buffer that resets after `typeaheadTimeoutMs` of inactivity.\nA multi-character buffer matches the first option whose displayed text starts\nwith the buffer; repeating a single character cycles through options that start\nwith that character.",
19295
18769
  "privacy": "private",
19296
18770
  "return": {
19297
18771
  "type": {
@@ -19687,6 +19161,24 @@
19687
19161
  },
19688
19162
  "default": "false"
19689
19163
  },
19164
+ {
19165
+ "kind": "field",
19166
+ "name": "typeaheadBuffer",
19167
+ "type": {
19168
+ "text": "string"
19169
+ },
19170
+ "privacy": "private",
19171
+ "default": "''"
19172
+ },
19173
+ {
19174
+ "kind": "field",
19175
+ "name": "_typeaheadTimeout",
19176
+ "type": {
19177
+ "text": "null"
19178
+ },
19179
+ "privacy": "private",
19180
+ "default": "null"
19181
+ },
19690
19182
  {
19691
19183
  "kind": "field",
19692
19184
  "name": "appearance",
@@ -19971,6 +19463,18 @@
19971
19463
  },
19972
19464
  "description": "Indicates whether the input is in a dirty state (has been interacted with)."
19973
19465
  },
19466
+ {
19467
+ "kind": "field",
19468
+ "name": "typeaheadTimeoutMs",
19469
+ "privacy": "public",
19470
+ "type": {
19471
+ "text": "number"
19472
+ },
19473
+ "description": "Milliseconds of keyboard inactivity before the type-ahead buffer resets.\nIncrease for users who type slowly.",
19474
+ "default": "500",
19475
+ "attribute": "typeaheadTimeoutMs",
19476
+ "reflects": true
19477
+ },
19974
19478
  {
19975
19479
  "kind": "field",
19976
19480
  "name": "validity",
@@ -20323,6 +19827,15 @@
20323
19827
  "module": "components/layoutElement/src/auroElement.js"
20324
19828
  }
20325
19829
  },
19830
+ {
19831
+ "name": "typeaheadTimeoutMs",
19832
+ "type": {
19833
+ "text": "number"
19834
+ },
19835
+ "description": "Milliseconds of keyboard inactivity before the type-ahead buffer resets.\nIncrease for users who type slowly.",
19836
+ "default": "500",
19837
+ "fieldName": "typeaheadTimeoutMs"
19838
+ },
20326
19839
  {
20327
19840
  "name": "validity",
20328
19841
  "type": {
@@ -20401,7 +19914,7 @@
20401
19914
  "type": {
20402
19915
  "text": "object"
20403
19916
  },
20404
- "default": "{ ArrowDown(component, evt, ctx) { evt.preventDefault(); if (ctx.isExpanded) { if (evt.altKey || evt.ctrlKey || evt.metaKey) { // navigate to last enabled option selectKeyboardStrategy.End(component, evt, ctx); } else { navigateArrow(component, 'down', { ctx }); } } else { component.dropdown.show(); } }, ArrowUp(component, evt, ctx) { evt.preventDefault(); if (ctx.isExpanded) { if (evt.altKey || evt.ctrlKey || evt.metaKey) { // navigate to first enabled option selectKeyboardStrategy.Home(component, evt, ctx); } else { navigateArrow(component, 'up', { ctx }); } } else { component.dropdown.show(); } }, Escape(component, evt, ctx) { if (!ctx.isExpanded) { return; } // Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups evt.stopPropagation(); component.dropdown.hide(); }, End(component, evt, ctx) { if (!ctx.isExpanded) { return; } evt.preventDefault(); evt.stopPropagation(); const lastOption = [...component.menu.menuService.menuOptions].reverse().find((option) => !option.disabled); if (lastOption) { component.menu.updateActiveOption(lastOption); } }, Enter(component, evt, ctx) { evt.preventDefault(); evt.stopPropagation(); if (!ctx.isExpanded) { component.dropdown.show(); return; } component.menu.makeSelection(); }, Home(component, evt, ctx) { if (!ctx.isExpanded) { return; } evt.preventDefault(); evt.stopPropagation(); const firstOption = component.menu.menuService.menuOptions.find((option) => !option.disabled); if (firstOption) { component.menu.updateActiveOption(firstOption); } }, Tab(component, evt, ctx) { if (!ctx.isExpanded) { return; } // Tab selects the focused option and closes the popup per the // WAI-ARIA APG select-only combobox / listbox pattern. if (component.optionActive) { component.menu.makeSelection(); } component.dropdown.hide(); }, default(component, evt, ctx) { component.updateActiveOptionBasedOnKey(evt.key); if (evt.key === ' ') { evt.preventDefault(); evt.stopPropagation(); if (ctx.isExpanded) { component.dropdown.hide(); return; } component.dropdown.show(); } }, }"
19917
+ "default": "{ ArrowDown(component, evt, ctx) { evt.preventDefault(); if (ctx.isExpanded) { if (evt.altKey || evt.ctrlKey || evt.metaKey) { // navigate to last enabled option selectKeyboardStrategy.End(component, evt, ctx); } else { navigateArrow(component, 'down', { ctx }); } } else { component.dropdown.show(); } }, ArrowUp(component, evt, ctx) { evt.preventDefault(); if (ctx.isExpanded) { if (evt.altKey || evt.ctrlKey || evt.metaKey) { // navigate to first enabled option selectKeyboardStrategy.Home(component, evt, ctx); } else { navigateArrow(component, 'up', { ctx }); } } else { component.dropdown.show(); } }, Escape(component, evt, ctx) { // Always clear the type-ahead buffer — Escape is a universal cancel. // Safe to call when the buffer is empty. // eslint-disable-next-line no-underscore-dangle if (typeof component._clearTypeaheadBuffer === 'function') { // eslint-disable-next-line no-underscore-dangle component._clearTypeaheadBuffer(); } if (!ctx.isExpanded) { return; } // Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups evt.stopPropagation(); component.dropdown.hide(); }, End(component, evt, ctx) { if (!ctx.isExpanded) { return; } evt.preventDefault(); evt.stopPropagation(); // `pop()` is safe here: getEnabledOptions returns a fresh filtered array. const lastOption = getEnabledOptions(component.menu).pop(); if (lastOption) { component.menu.updateActiveOption(lastOption); } }, Enter(component, evt, ctx) { evt.preventDefault(); evt.stopPropagation(); if (!ctx.isExpanded) { component.dropdown.show(); return; } component.menu.makeSelection(); }, Home(component, evt, ctx) { if (!ctx.isExpanded) { return; } evt.preventDefault(); evt.stopPropagation(); const [firstOption] = getEnabledOptions(component.menu); if (firstOption) { component.menu.updateActiveOption(firstOption); } }, Tab(component, evt, ctx) { if (!ctx.isExpanded) { return; } // Tab selects the focused option and closes the popup per the // WAI-ARIA APG select-only combobox / listbox pattern. if (component.optionActive) { component.menu.makeSelection(); } component.dropdown.hide(); }, default(component, evt, ctx) { // Space resolves to either typeahead-buffer extension or bib toggle // depending on whether a type-ahead buffer is active. Mirrors native // <select> and the WAI-ARIA APG Listbox guidance: mid-typeahead space // is a search character (e.g. \"San Francisco\"); otherwise it toggles. if (evt.key === ' ') { evt.preventDefault(); evt.stopPropagation(); if (component.typeaheadBuffer && component.typeaheadBuffer.length > 0) { component.updateActiveOptionBasedOnKey(evt.key); return; } if (ctx.isExpanded) { component.dropdown.hide(); } else { component.dropdown.show(); } return; } component.updateActiveOptionBasedOnKey(evt.key); }, }"
20405
19918
  }
20406
19919
  ],
20407
19920
  "exports": [
@@ -20414,6 +19927,68 @@
20414
19927
  }
20415
19928
  }
20416
19929
  ]
19930
+ },
19931
+ {
19932
+ "kind": "javascript-module",
19933
+ "path": "components/select/src/selectUtils.js",
19934
+ "declarations": [
19935
+ {
19936
+ "kind": "function",
19937
+ "name": "getEnabledOptions",
19938
+ "parameters": [
19939
+ {
19940
+ "name": "menu",
19941
+ "description": "The auro-menu element.",
19942
+ "type": {
19943
+ "text": "HTMLElement | null | undefined"
19944
+ }
19945
+ }
19946
+ ],
19947
+ "description": "Returns the enabled (non-disabled) options for a menu, safely.\n\nAuro-menu's `options` getter returns `undefined` when the menu has no items\n(initItems sets `items` to undefined for empty menus). Callers that reach for\n`.find()` / `[...spread]` would otherwise crash; this helper normalizes the\nempty case to `[]` so array methods are always safe.",
19948
+ "return": {
19949
+ "type": {
19950
+ "text": "Array<HTMLElement>"
19951
+ }
19952
+ }
19953
+ },
19954
+ {
19955
+ "kind": "function",
19956
+ "name": "getActiveOptions",
19957
+ "parameters": [
19958
+ {
19959
+ "name": "menu",
19960
+ "description": "The auro-menu element.",
19961
+ "type": {
19962
+ "text": "HTMLElement | null | undefined"
19963
+ }
19964
+ }
19965
+ ],
19966
+ "description": "Returns the active (selectable + visible) options for type-ahead navigation.\n\nUses auro-menuoption's `isActive` getter, which excludes disabled, hidden,\nand static options (e.g. `static nomatch` placeholders) so the type-ahead\ncursor never lands on a non-actionable item. Same empty-safe handling as\n`getEnabledOptions`.",
19967
+ "return": {
19968
+ "type": {
19969
+ "text": "Array<HTMLElement>"
19970
+ }
19971
+ }
19972
+ }
19973
+ ],
19974
+ "exports": [
19975
+ {
19976
+ "kind": "js",
19977
+ "name": "getEnabledOptions",
19978
+ "declaration": {
19979
+ "name": "getEnabledOptions",
19980
+ "module": "components/select/src/selectUtils.js"
19981
+ }
19982
+ },
19983
+ {
19984
+ "kind": "js",
19985
+ "name": "getActiveOptions",
19986
+ "declaration": {
19987
+ "name": "getActiveOptions",
19988
+ "module": "components/select/src/selectUtils.js"
19989
+ }
19990
+ }
19991
+ ]
20417
19992
  }
20418
19993
  ]
20419
19994
  }