@aurodesignsystem-dev/auro-formkit 0.0.0-pr1505.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.
- package/components/checkbox/demo/customize.html +1 -2
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.html +1 -2
- package/components/combobox/demo/customize.md +108 -132
- package/components/combobox/demo/customize.min.js +6 -6
- package/components/combobox/demo/getting-started.min.js +6 -6
- package/components/combobox/demo/index.min.js +6 -6
- package/components/combobox/dist/index.js +4 -4
- package/components/combobox/dist/registered.js +4 -4
- package/components/counter/demo/customize.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/api.md +2 -2
- package/components/datepicker/demo/customize.min.js +6 -6
- package/components/datepicker/demo/index.min.js +6 -6
- package/components/datepicker/dist/index.js +6 -6
- package/components/datepicker/dist/registered.js +6 -6
- package/components/datepicker/dist/src/auro-datepicker.d.ts +2 -2
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/getting-started.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/customize.html +6 -6
- package/components/form/demo/customize.js +19 -0
- package/components/form/demo/customize.md +203 -51
- package/components/form/demo/customize.min.js +586 -81
- package/components/form/demo/getting-started.min.js +514 -81
- package/components/form/demo/index.min.js +514 -81
- package/components/form/demo/registerDemoDeps.min.js +151 -44
- package/components/form/dist/auro-form.d.ts +122 -4
- package/components/form/dist/index.js +363 -37
- package/components/form/dist/registered.js +363 -37
- package/components/input/demo/api.md +1 -1
- package/components/input/demo/customize.html +1 -2
- package/components/input/demo/customize.min.js +2 -2
- package/components/input/demo/getting-started.min.js +2 -2
- package/components/input/demo/index.min.js +2 -2
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/index.js +2 -2
- package/components/input/dist/registered.js +2 -2
- package/components/menu/demo/index.min.js +2 -2
- package/components/menu/dist/index.js +2 -2
- package/components/menu/dist/registered.js +2 -2
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.md +1 -0
- package/components/select/demo/customize.html +1 -2
- package/components/select/demo/customize.md +71 -0
- package/components/select/demo/customize.min.js +135 -28
- package/components/select/demo/getting-started.min.js +135 -28
- package/components/select/demo/index.min.js +135 -28
- package/components/select/demo/keyboard-behavior.md +18 -0
- package/components/select/dist/auro-select.d.ts +38 -2
- package/components/select/dist/index.js +133 -26
- package/components/select/dist/registered.js +133 -26
- package/components/select/dist/selectUtils.d.ts +12 -0
- package/custom-elements.json +220 -7
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -6306,11 +6306,11 @@
|
|
|
6306
6306
|
"name": "fromLabel"
|
|
6307
6307
|
},
|
|
6308
6308
|
{
|
|
6309
|
-
"description": "Overrides the \"(optional)\" text rendered next to the first input's label when the datepicker is not `required`.",
|
|
6309
|
+
"description": "Overrides the \" (optional)\" text rendered next to the first input's label when the datepicker is not `required`.",
|
|
6310
6310
|
"name": "optionalFromLabel"
|
|
6311
6311
|
},
|
|
6312
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`.",
|
|
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
6314
|
"name": "optionalToLabel"
|
|
6315
6315
|
},
|
|
6316
6316
|
{
|
|
@@ -10501,6 +10501,46 @@
|
|
|
10501
10501
|
},
|
|
10502
10502
|
"privacy": "private"
|
|
10503
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
|
+
},
|
|
10504
10544
|
{
|
|
10505
10545
|
"kind": "method",
|
|
10506
10546
|
"name": "_eventIsValidFormEvent",
|
|
@@ -10582,10 +10622,52 @@
|
|
|
10582
10622
|
"privacy": "private",
|
|
10583
10623
|
"readonly": true
|
|
10584
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
|
+
},
|
|
10585
10667
|
{
|
|
10586
10668
|
"kind": "method",
|
|
10587
10669
|
"name": "_calculateValidity",
|
|
10588
|
-
"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.",
|
|
10589
10671
|
"privacy": "private"
|
|
10590
10672
|
},
|
|
10591
10673
|
{
|
|
@@ -10602,7 +10684,7 @@
|
|
|
10602
10684
|
{
|
|
10603
10685
|
"kind": "method",
|
|
10604
10686
|
"name": "_setInitialState",
|
|
10605
|
-
"description": "Determines whether the form is in its initial (untouched) state and
|
|
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.",
|
|
10606
10688
|
"return": {
|
|
10607
10689
|
"type": {
|
|
10608
10690
|
"text": "void"
|
|
@@ -10762,6 +10844,26 @@
|
|
|
10762
10844
|
},
|
|
10763
10845
|
"privacy": "private"
|
|
10764
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
|
+
},
|
|
10765
10867
|
{
|
|
10766
10868
|
"kind": "method",
|
|
10767
10869
|
"name": "mutationEventListener",
|
|
@@ -10855,6 +10957,25 @@
|
|
|
10855
10957
|
},
|
|
10856
10958
|
"privacy": "private",
|
|
10857
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"
|
|
10858
10979
|
}
|
|
10859
10980
|
],
|
|
10860
10981
|
"events": [
|
|
@@ -11240,7 +11361,7 @@
|
|
|
11240
11361
|
"name": "label"
|
|
11241
11362
|
},
|
|
11242
11363
|
{
|
|
11243
|
-
"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.",
|
|
11244
11365
|
"name": "optionalLabel"
|
|
11245
11366
|
},
|
|
11246
11367
|
{
|
|
@@ -18606,6 +18727,32 @@
|
|
|
18606
18727
|
],
|
|
18607
18728
|
"description": "Updates the active option in the menu."
|
|
18608
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
|
+
},
|
|
18609
18756
|
{
|
|
18610
18757
|
"kind": "method",
|
|
18611
18758
|
"name": "updateActiveOptionBasedOnKey",
|
|
@@ -18618,7 +18765,7 @@
|
|
|
18618
18765
|
}
|
|
18619
18766
|
}
|
|
18620
18767
|
],
|
|
18621
|
-
"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.",
|
|
18622
18769
|
"privacy": "private",
|
|
18623
18770
|
"return": {
|
|
18624
18771
|
"type": {
|
|
@@ -19014,6 +19161,24 @@
|
|
|
19014
19161
|
},
|
|
19015
19162
|
"default": "false"
|
|
19016
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
|
+
},
|
|
19017
19182
|
{
|
|
19018
19183
|
"kind": "field",
|
|
19019
19184
|
"name": "appearance",
|
|
@@ -19298,6 +19463,18 @@
|
|
|
19298
19463
|
},
|
|
19299
19464
|
"description": "Indicates whether the input is in a dirty state (has been interacted with)."
|
|
19300
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
|
+
},
|
|
19301
19478
|
{
|
|
19302
19479
|
"kind": "field",
|
|
19303
19480
|
"name": "validity",
|
|
@@ -19650,6 +19827,15 @@
|
|
|
19650
19827
|
"module": "components/layoutElement/src/auroElement.js"
|
|
19651
19828
|
}
|
|
19652
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
|
+
},
|
|
19653
19839
|
{
|
|
19654
19840
|
"name": "validity",
|
|
19655
19841
|
"type": {
|
|
@@ -19728,7 +19914,7 @@
|
|
|
19728
19914
|
"type": {
|
|
19729
19915
|
"text": "object"
|
|
19730
19916
|
},
|
|
19731
|
-
"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(); // `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) {
|
|
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); }, }"
|
|
19732
19918
|
}
|
|
19733
19919
|
],
|
|
19734
19920
|
"exports": [
|
|
@@ -19764,6 +19950,25 @@
|
|
|
19764
19950
|
"text": "Array<HTMLElement>"
|
|
19765
19951
|
}
|
|
19766
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
|
+
}
|
|
19767
19972
|
}
|
|
19768
19973
|
],
|
|
19769
19974
|
"exports": [
|
|
@@ -19774,6 +19979,14 @@
|
|
|
19774
19979
|
"name": "getEnabledOptions",
|
|
19775
19980
|
"module": "components/select/src/selectUtils.js"
|
|
19776
19981
|
}
|
|
19982
|
+
},
|
|
19983
|
+
{
|
|
19984
|
+
"kind": "js",
|
|
19985
|
+
"name": "getActiveOptions",
|
|
19986
|
+
"declaration": {
|
|
19987
|
+
"name": "getActiveOptions",
|
|
19988
|
+
"module": "components/select/src/selectUtils.js"
|
|
19989
|
+
}
|
|
19777
19990
|
}
|
|
19778
19991
|
]
|
|
19779
19992
|
}
|
package/package.json
CHANGED