@aurodesignsystem-dev/auro-formkit 0.0.0-pr1387.2 → 0.0.0-pr1387.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/checkbox/demo/api.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/api.min.js +131 -55
- package/components/combobox/demo/index.min.js +131 -55
- package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +4 -4
- package/components/combobox/dist/index.js +128 -52
- package/components/combobox/dist/registered.js +128 -52
- package/components/counter/demo/api.min.js +22 -4
- package/components/counter/demo/index.min.js +22 -4
- package/components/counter/dist/auro-counter.d.ts +7 -0
- package/components/counter/dist/index.js +22 -4
- package/components/counter/dist/registered.js +22 -4
- package/components/datepicker/demo/api.min.js +11 -41
- package/components/datepicker/demo/index.min.js +11 -41
- package/components/datepicker/dist/auro-datepicker.d.ts +0 -7
- package/components/datepicker/dist/index.js +11 -41
- package/components/datepicker/dist/registered.js +11 -41
- package/components/dropdown/demo/api.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/api.min.js +226 -120
- package/components/form/demo/index.min.js +226 -120
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/api.min.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/api.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.min.js +63 -21
- package/components/select/demo/index.min.js +63 -21
- package/components/select/dist/index.js +60 -18
- package/components/select/dist/registered.js +60 -18
- package/components/select/dist/selectKeyboardStrategy.d.ts +3 -3
- package/custom-elements.json +17 -88
- package/package.json +4 -3
- package/components/dropdown/dist/keyboardUtils.d.ts +0 -18
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export namespace selectKeyboardStrategy {
|
|
2
|
-
export function ArrowUp(component: any, evt: any): void;
|
|
3
|
-
export function ArrowDown(component: any, evt: any): void;
|
|
2
|
+
export function ArrowUp(component: any, evt: any, ctx: any): void;
|
|
3
|
+
export function ArrowDown(component: any, evt: any, ctx: any): void;
|
|
4
4
|
export function Enter(component: any, evt: any): void;
|
|
5
|
-
export function Tab(component: any): void;
|
|
5
|
+
export function Tab(component: any, _evt: any, ctx: any): void;
|
|
6
6
|
function _default(component: any, evt: any): void;
|
|
7
7
|
export { _default as default };
|
|
8
8
|
}
|
package/custom-elements.json
CHANGED
|
@@ -1554,7 +1554,7 @@
|
|
|
1554
1554
|
"type": {
|
|
1555
1555
|
"text": "object"
|
|
1556
1556
|
},
|
|
1557
|
-
"default": "{ async Enter(component, evt) { // 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.
|
|
1557
|
+
"default": "{ async Enter(component, evt, 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. if (isClearBtnFocused(ctx)) { evt.stopPropagation(); return; } if (ctx.isExpanded && component.optionActive) { component.menu.makeSelection(); await component.updateComplete; evt.preventDefault(); evt.stopPropagation(); component.setClearBtnFocus(); } 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(); } }, Tab(component, _evt, ctx) { if (!ctx.isExpanded) { return; } if (ctx.isModal) { if (!ctx.activeInput) { return; } const clearBtn = getClearBtn(ctx); const clearBtnHasFocus = isClearBtnFocused(ctx, clearBtn); // Tab from input: if clear button exists and doesn't have focus, focus it if (clearBtn && !clearBtnHasFocus && ctx.activeInput.value) { // Force clear button container visible to work around Safari not // propagating :focus-within through shadow DOM boundaries, which // causes .wrapper:not(:focus-within) to hide .notification.clear. const clearContainer = clearBtn.closest('.clear'); if (clearContainer) { clearContainer.style.display = 'flex'; clearBtn.addEventListener('focusout', () => { // Delay cleanup so :focus-within settles when focus moves // to a sibling (e.g., Shift+Tab back to the input). requestAnimationFrame(() => { clearContainer.style.display = ''; }); }, { once: true }); } // Focus the native button inside auro-button so the browser // treats it as a real focusable element inside the dialog. const nativeBtn = clearBtn.shadowRoot && clearBtn.shadowRoot.querySelector('button'); if (nativeBtn) { nativeBtn.focus(); } else { clearBtn.focus(); } return; } // Tab from clear button (or no clear button / no value) → // select the highlighted option if any, then close if (component.optionActive) { component.menu.makeSelection(); } component.hideBib(); return; } // Non-fullscreen: select + close if (component.menu.optionActive && component.menu.optionActive.value) { component.menu.value = component.menu.optionActive.value; } component.hideBib(); }, ArrowUp(component, evt, ctx) { // If the clear button has focus, let the browser handle ArrowUp normally. if (isClearBtnFocused(ctx)) { return; } if (component.availableOptions.length > 0) { component.showBib(); } // Read live visibility — ctx.isExpanded was computed before showBib() above, // so it wouldn't reflect the state change. if (component.dropdown.isPopoverVisible) { evt.preventDefault(); navigateArrow(component, 'up'); } }, ArrowDown(component, evt, ctx) { // If the clear button has focus, let the browser handle ArrowDown normally. if (isClearBtnFocused(ctx)) { return; } if (component.availableOptions.length > 0) { component.showBib(); } // Read live visibility — ctx.isExpanded was computed before showBib() above, // so it wouldn't reflect the state change. if (component.dropdown.isPopoverVisible) { evt.preventDefault(); navigateArrow(component, 'down'); } }, }"
|
|
1558
1558
|
}
|
|
1559
1559
|
],
|
|
1560
1560
|
"exports": [
|
|
@@ -3733,6 +3733,21 @@
|
|
|
3733
3733
|
"description": "Handles the change event for the default slot.\nUpdates the defaultSlot property with the trimmed text content of the first assigned node.",
|
|
3734
3734
|
"privacy": "private"
|
|
3735
3735
|
},
|
|
3736
|
+
{
|
|
3737
|
+
"kind": "method",
|
|
3738
|
+
"name": "onDescriptionSlotChange",
|
|
3739
|
+
"parameters": [
|
|
3740
|
+
{
|
|
3741
|
+
"name": "event",
|
|
3742
|
+
"description": "The slotchange event.",
|
|
3743
|
+
"type": {
|
|
3744
|
+
"text": "Event"
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3747
|
+
],
|
|
3748
|
+
"description": "Sets ariaDescribedByElements on the spinbutton to the slotted description elements,\nbridging the shadow DOM boundary for screen readers.",
|
|
3749
|
+
"privacy": "private"
|
|
3750
|
+
},
|
|
3736
3751
|
{
|
|
3737
3752
|
"kind": "method",
|
|
3738
3753
|
"name": "renderHelpText",
|
|
@@ -5642,17 +5657,6 @@
|
|
|
5642
5657
|
}
|
|
5643
5658
|
}
|
|
5644
5659
|
},
|
|
5645
|
-
{
|
|
5646
|
-
"kind": "method",
|
|
5647
|
-
"name": "handleReadOnly",
|
|
5648
|
-
"description": "Sets the readonly attribute on the inputs based on the window width.",
|
|
5649
|
-
"privacy": "private",
|
|
5650
|
-
"return": {
|
|
5651
|
-
"type": {
|
|
5652
|
-
"text": "void"
|
|
5653
|
-
}
|
|
5654
|
-
}
|
|
5655
|
-
},
|
|
5656
5660
|
{
|
|
5657
5661
|
"kind": "method",
|
|
5658
5662
|
"name": "handleCalendarCentralDateChange",
|
|
@@ -9082,81 +9086,6 @@
|
|
|
9082
9086
|
}
|
|
9083
9087
|
]
|
|
9084
9088
|
},
|
|
9085
|
-
{
|
|
9086
|
-
"kind": "javascript-module",
|
|
9087
|
-
"path": "components/dropdown/src/keyboardUtils.js",
|
|
9088
|
-
"declarations": [
|
|
9089
|
-
{
|
|
9090
|
-
"kind": "function",
|
|
9091
|
-
"name": "applyKeyboardStrategy",
|
|
9092
|
-
"parameters": [
|
|
9093
|
-
{
|
|
9094
|
-
"name": "component",
|
|
9095
|
-
"description": "The component to attach the listener to.",
|
|
9096
|
-
"type": {
|
|
9097
|
-
"text": "HTMLElement"
|
|
9098
|
-
}
|
|
9099
|
-
},
|
|
9100
|
-
{
|
|
9101
|
-
"name": "strategy",
|
|
9102
|
-
"description": "Map of key names to handler functions.",
|
|
9103
|
-
"type": {
|
|
9104
|
-
"text": "Object"
|
|
9105
|
-
}
|
|
9106
|
-
}
|
|
9107
|
-
],
|
|
9108
|
-
"description": "Wires up a keydown listener that dispatches to strategy[evt.key] or strategy.default.\nHandles both sync and async handlers."
|
|
9109
|
-
},
|
|
9110
|
-
{
|
|
9111
|
-
"kind": "function",
|
|
9112
|
-
"name": "navigateArrow",
|
|
9113
|
-
"parameters": [
|
|
9114
|
-
{
|
|
9115
|
-
"name": "component",
|
|
9116
|
-
"description": "The component with dropdown and menu references.",
|
|
9117
|
-
"type": {
|
|
9118
|
-
"text": "HTMLElement"
|
|
9119
|
-
}
|
|
9120
|
-
},
|
|
9121
|
-
{
|
|
9122
|
-
"name": "direction",
|
|
9123
|
-
"description": "'up' or 'down'.",
|
|
9124
|
-
"type": {
|
|
9125
|
-
"text": "string"
|
|
9126
|
-
}
|
|
9127
|
-
},
|
|
9128
|
-
{
|
|
9129
|
-
"name": "options",
|
|
9130
|
-
"default": "{}",
|
|
9131
|
-
"description": "Optional config.",
|
|
9132
|
-
"optional": true,
|
|
9133
|
-
"type": {
|
|
9134
|
-
"text": "@param {Function} [options.showFn] - Called to open the dropdown when closed.\n "
|
|
9135
|
-
}
|
|
9136
|
-
}
|
|
9137
|
-
],
|
|
9138
|
-
"description": "Shared arrow navigation. Calls menu.navigateOptions(direction) if visible.\nOptionally opens dropdown via showFn when closed."
|
|
9139
|
-
}
|
|
9140
|
-
],
|
|
9141
|
-
"exports": [
|
|
9142
|
-
{
|
|
9143
|
-
"kind": "js",
|
|
9144
|
-
"name": "applyKeyboardStrategy",
|
|
9145
|
-
"declaration": {
|
|
9146
|
-
"name": "applyKeyboardStrategy",
|
|
9147
|
-
"module": "components/dropdown/src/keyboardUtils.js"
|
|
9148
|
-
}
|
|
9149
|
-
},
|
|
9150
|
-
{
|
|
9151
|
-
"kind": "js",
|
|
9152
|
-
"name": "navigateArrow",
|
|
9153
|
-
"declaration": {
|
|
9154
|
-
"name": "navigateArrow",
|
|
9155
|
-
"module": "components/dropdown/src/keyboardUtils.js"
|
|
9156
|
-
}
|
|
9157
|
-
}
|
|
9158
|
-
]
|
|
9159
|
-
},
|
|
9160
9089
|
{
|
|
9161
9090
|
"kind": "javascript-module",
|
|
9162
9091
|
"path": "components/dropdown/src/registered.js",
|
|
@@ -18699,7 +18628,7 @@
|
|
|
18699
18628
|
"type": {
|
|
18700
18629
|
"text": "object"
|
|
18701
18630
|
},
|
|
18702
|
-
"default": "{ ArrowUp(component, evt) { evt.preventDefault(); navigateArrow(component, 'up', { showFn: () => component.dropdown.show() }); }, ArrowDown(component, evt) { evt.preventDefault(); navigateArrow(component, 'down', { showFn: () => component.dropdown.show() }); }, Enter(component, evt) { evt.preventDefault(); component.menu.makeSelection(); }, Tab(component) { if (!
|
|
18631
|
+
"default": "{ ArrowUp(component, evt, ctx) { evt.preventDefault(); navigateArrow(component, 'up', { ctx, showFn: () => component.dropdown.show(), }); }, ArrowDown(component, evt, ctx) { evt.preventDefault(); navigateArrow(component, 'down', { ctx, showFn: () => component.dropdown.show(), }); }, Enter(component, evt) { evt.preventDefault(); component.menu.makeSelection(); }, 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.multiSelect) { component.menu.makeSelection(); } component.dropdown.hide(); }, default(component, evt) { component.updateActiveOptionBasedOnKey(evt.key); }, }"
|
|
18703
18632
|
}
|
|
18704
18633
|
],
|
|
18705
18634
|
"exports": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurodesignsystem-dev/auro-formkit",
|
|
3
|
-
"version": "0.0.0-pr1387.
|
|
3
|
+
"version": "0.0.0-pr1387.4",
|
|
4
4
|
"description": "A collection of web components used to build forms.",
|
|
5
5
|
"homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dev:svelte": "concurrently \"npx turbo run build:watch --concurrency=20\" \"npm run dev:app:open --workspace=apps/svelte-framework\"",
|
|
47
47
|
"dev:react": "concurrently \"npx turbo run build:watch --concurrency=20\" \"npm run dev:app:open --workspace=apps/react-framework\"",
|
|
48
48
|
"lint": "turbo run lint",
|
|
49
|
-
"test": "turbo run test",
|
|
49
|
+
"test": "turbo run test && npm run test:frameworks",
|
|
50
50
|
"test:watch": "turbo run test:watch",
|
|
51
51
|
"clean": "turbo run clean && rm -rf node_modules",
|
|
52
52
|
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
"lit": "^3.3.1"
|
|
74
74
|
},
|
|
75
75
|
"optionalDependencies": {
|
|
76
|
-
"@rollup/rollup-linux-x64-gnu": "*"
|
|
76
|
+
"@rollup/rollup-linux-x64-gnu": "*",
|
|
77
|
+
"@rolldown/binding-linux-x64-gnu": "*"
|
|
77
78
|
},
|
|
78
79
|
"devDependencies": {
|
|
79
80
|
"@aurodesignsystem/auro-accordion": "^6.1.1",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wires up a keydown listener that dispatches to strategy[evt.key] or strategy.default.
|
|
3
|
-
* Handles both sync and async handlers.
|
|
4
|
-
* @param {HTMLElement} component - The component to attach the listener to.
|
|
5
|
-
* @param {Object} strategy - Map of key names to handler functions.
|
|
6
|
-
*/
|
|
7
|
-
export function applyKeyboardStrategy(component: HTMLElement, strategy: any): void;
|
|
8
|
-
/**
|
|
9
|
-
* Shared arrow navigation. Calls menu.navigateOptions(direction) if visible.
|
|
10
|
-
* Optionally opens dropdown via showFn when closed.
|
|
11
|
-
* @param {HTMLElement} component - The component with dropdown and menu references.
|
|
12
|
-
* @param {string} direction - 'up' or 'down'.
|
|
13
|
-
* @param {Object} [options] - Optional config.
|
|
14
|
-
* @param {Function} [options.showFn] - Called to open the dropdown when closed.
|
|
15
|
-
*/
|
|
16
|
-
export function navigateArrow(component: HTMLElement, direction: string, options?: {
|
|
17
|
-
showFn?: Function;
|
|
18
|
-
}): void;
|