@proyecto-viviana/solidaria 0.4.2 → 0.4.3
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/dist/_chunk/DragManager.js.map +1 -1
- package/dist/_chunk/DragManager.jsx.map +1 -1
- package/dist/_chunk/actiongroup.js.map +1 -1
- package/dist/_chunk/actiongroup.jsx.map +1 -1
- package/dist/_chunk/datepicker.js +544 -544
- package/dist/_chunk/datepicker.js.map +1 -1
- package/dist/_chunk/datepicker.jsx +544 -544
- package/dist/_chunk/datepicker.jsx.map +1 -1
- package/dist/_chunk/dnd.js.map +1 -1
- package/dist/_chunk/dnd.jsx.map +1 -1
- package/dist/_chunk/select.js +6 -2
- package/dist/_chunk/select.js.map +1 -1
- package/dist/_chunk/select.jsx +6 -2
- package/dist/_chunk/select.jsx.map +1 -1
- package/dist/_chunk/spinbutton.js +34 -34
- package/dist/_chunk/spinbutton.js.map +1 -1
- package/dist/_chunk/spinbutton.jsx +34 -34
- package/dist/_chunk/spinbutton.jsx.map +1 -1
- package/dist/_chunk/table.js.map +1 -1
- package/dist/_chunk/table.jsx.map +1 -1
- package/dist/_chunk/tree.js.map +1 -1
- package/dist/_chunk/tree.jsx.map +1 -1
- package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
- package/dist/datepicker/createDateField.d.ts.map +1 -1
- package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -1
- package/dist/datepicker/createDateSegment.d.ts.map +1 -1
- package/dist/datepicker/createTimeField.d.ts.map +1 -1
- package/dist/datepicker/intl.d.ts.map +1 -1
- package/dist/dnd/DragManager.d.ts.map +1 -1
- package/dist/dnd/createDraggableItem.d.ts.map +1 -1
- package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
- package/dist/select/createSelect.d.ts.map +1 -1
- package/dist/spinbutton/index.d.ts +2 -2
- package/dist/spinbutton/index.d.ts.map +1 -1
- package/dist/table/createTable.d.ts.map +1 -1
- package/dist/table/utils.d.ts.map +1 -1
- package/dist/tree/createTree.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/actiongroup/createActionGroup.ts +1 -4
- package/src/datepicker/createDateField.ts +3 -1
- package/src/datepicker/createDatePickerGroup.ts +8 -4
- package/src/datepicker/createDateSegment.ts +47 -39
- package/src/datepicker/createTimeField.ts +1 -5
- package/src/datepicker/intl.ts +587 -544
- package/src/dnd/DragManager.ts +5 -5
- package/src/dnd/DropTargetKeyboardNavigation.ts +6 -4
- package/src/dnd/createDraggableItem.ts +3 -1
- package/src/dnd/createDroppableCollection.ts +7 -8
- package/src/select/createSelect.ts +19 -16
- package/src/spinbutton/index.ts +2 -10
- package/src/spinbutton/intl.ts +34 -34
- package/src/table/createTable.ts +2 -3
- package/src/table/utils.ts +1 -6
- package/src/tree/createTree.ts +1 -4
|
@@ -5,40 +5,40 @@ import { createEffect, createMemo } from "solid-js";
|
|
|
5
5
|
import { LocalizedStringDictionary } from "@internationalized/string";
|
|
6
6
|
//#region src/spinbutton/intl.ts
|
|
7
7
|
const spinButtonStrings = {
|
|
8
|
-
"ar-AE": {
|
|
9
|
-
"bg-BG": {
|
|
10
|
-
"cs-CZ": {
|
|
11
|
-
"da-DK": {
|
|
12
|
-
"de-DE": {
|
|
13
|
-
"el-GR": {
|
|
14
|
-
"en-US": {
|
|
15
|
-
"es-ES": {
|
|
16
|
-
"et-EE": {
|
|
17
|
-
"fi-FI": {
|
|
18
|
-
"fr-FR": {
|
|
19
|
-
"he-IL": {
|
|
20
|
-
"hr-HR": {
|
|
21
|
-
"hu-HU": {
|
|
22
|
-
"it-IT": {
|
|
23
|
-
"ja-JP": {
|
|
24
|
-
"ko-KR": {
|
|
25
|
-
"lt-LT": {
|
|
26
|
-
"lv-LV": {
|
|
27
|
-
"nb-NO": {
|
|
28
|
-
"nl-NL": {
|
|
29
|
-
"pl-PL": {
|
|
30
|
-
"pt-BR": {
|
|
31
|
-
"pt-PT": {
|
|
32
|
-
"ro-RO": {
|
|
33
|
-
"ru-RU": {
|
|
34
|
-
"sk-SK": {
|
|
35
|
-
"sl-SI": {
|
|
36
|
-
"sr-SP": {
|
|
37
|
-
"sv-SE": {
|
|
38
|
-
"tr-TR": {
|
|
39
|
-
"uk-UA": {
|
|
40
|
-
"zh-CN": {
|
|
41
|
-
"zh-TW": {
|
|
8
|
+
"ar-AE": { Empty: `\u{641}\u{627}\u{631}\u{63A}` },
|
|
9
|
+
"bg-BG": { Empty: `\u{418}\u{437}\u{43F}\u{440}\u{430}\u{437}\u{43D}\u{438}` },
|
|
10
|
+
"cs-CZ": { Empty: `Pr\xe1zdn\xe9` },
|
|
11
|
+
"da-DK": { Empty: `Tom` },
|
|
12
|
+
"de-DE": { Empty: `Leer` },
|
|
13
|
+
"el-GR": { Empty: `\u{386}\u{3B4}\u{3B5}\u{3B9}\u{3BF}` },
|
|
14
|
+
"en-US": { Empty: `Empty` },
|
|
15
|
+
"es-ES": { Empty: `Vac\xedo` },
|
|
16
|
+
"et-EE": { Empty: `T\xfchjenda` },
|
|
17
|
+
"fi-FI": { Empty: `Tyhj\xe4` },
|
|
18
|
+
"fr-FR": { Empty: `Vide` },
|
|
19
|
+
"he-IL": { Empty: `\u{5E8}\u{5D9}\u{5E7}` },
|
|
20
|
+
"hr-HR": { Empty: `Prazno` },
|
|
21
|
+
"hu-HU": { Empty: `\xdcres` },
|
|
22
|
+
"it-IT": { Empty: `Vuoto` },
|
|
23
|
+
"ja-JP": { Empty: `\u{7A7A}` },
|
|
24
|
+
"ko-KR": { Empty: `\u{BE44}\u{C5B4} \u{C788}\u{C74C}` },
|
|
25
|
+
"lt-LT": { Empty: `Tu\u{161}\u{10D}ias` },
|
|
26
|
+
"lv-LV": { Empty: `Tuk\u{161}s` },
|
|
27
|
+
"nb-NO": { Empty: `Tom` },
|
|
28
|
+
"nl-NL": { Empty: `Leeg` },
|
|
29
|
+
"pl-PL": { Empty: `Pusty` },
|
|
30
|
+
"pt-BR": { Empty: `Vazio` },
|
|
31
|
+
"pt-PT": { Empty: `Vazio` },
|
|
32
|
+
"ro-RO": { Empty: `Gol` },
|
|
33
|
+
"ru-RU": { Empty: `\u{41D}\u{435} \u{437}\u{430}\u{43F}\u{43E}\u{43B}\u{43D}\u{435}\u{43D}\u{43E}` },
|
|
34
|
+
"sk-SK": { Empty: `Pr\xe1zdne` },
|
|
35
|
+
"sl-SI": { Empty: `Prazen` },
|
|
36
|
+
"sr-SP": { Empty: `Prazno` },
|
|
37
|
+
"sv-SE": { Empty: `Tomt` },
|
|
38
|
+
"tr-TR": { Empty: `Bo\u{15F}` },
|
|
39
|
+
"uk-UA": { Empty: `\u{41F}\u{443}\u{441}\u{442}\u{43E}` },
|
|
40
|
+
"zh-CN": { Empty: `\u{7A7A}` },
|
|
41
|
+
"zh-TW": { Empty: `\u{7A7A}\u{767D}` }
|
|
42
42
|
};
|
|
43
43
|
const spinButtonDictionary = new LocalizedStringDictionary(spinButtonStrings);
|
|
44
44
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinbutton.jsx","names":[],"sources":["../../src/spinbutton/intl.ts","../../src/spinbutton/createSpinButton.ts"],"sourcesContent":["// Spinbutton announcement catalog, ported verbatim from @react-aria/spinbutton's\n// intl/*.json (34 locales). Keep in sync with the vendored react-spectrum source on\n// every pin bump.\nimport { LocalizedStringDictionary } from \"@internationalized/string\";\n\nexport type SpinButtonStringKey = \"Empty\";\n\nexport const spinButtonStrings: Record<string, Record<SpinButtonStringKey, string>> = {\n \"ar-AE\": {\n \"Empty\": `\\u{641}\\u{627}\\u{631}\\u{63A}`\n },\n \"bg-BG\": {\n \"Empty\": `\\u{418}\\u{437}\\u{43F}\\u{440}\\u{430}\\u{437}\\u{43D}\\u{438}`\n },\n \"cs-CZ\": {\n \"Empty\": `Pr\\xe1zdn\\xe9`\n },\n \"da-DK\": {\n \"Empty\": `Tom`\n },\n \"de-DE\": {\n \"Empty\": `Leer`\n },\n \"el-GR\": {\n \"Empty\": `\\u{386}\\u{3B4}\\u{3B5}\\u{3B9}\\u{3BF}`\n },\n \"en-US\": {\n \"Empty\": `Empty`\n },\n \"es-ES\": {\n \"Empty\": `Vac\\xedo`\n },\n \"et-EE\": {\n \"Empty\": `T\\xfchjenda`\n },\n \"fi-FI\": {\n \"Empty\": `Tyhj\\xe4`\n },\n \"fr-FR\": {\n \"Empty\": `Vide`\n },\n \"he-IL\": {\n \"Empty\": `\\u{5E8}\\u{5D9}\\u{5E7}`\n },\n \"hr-HR\": {\n \"Empty\": `Prazno`\n },\n \"hu-HU\": {\n \"Empty\": `\\xdcres`\n },\n \"it-IT\": {\n \"Empty\": `Vuoto`\n },\n \"ja-JP\": {\n \"Empty\": `\\u{7A7A}`\n },\n \"ko-KR\": {\n \"Empty\": `\\u{BE44}\\u{C5B4} \\u{C788}\\u{C74C}`\n },\n \"lt-LT\": {\n \"Empty\": `Tu\\u{161}\\u{10D}ias`\n },\n \"lv-LV\": {\n \"Empty\": `Tuk\\u{161}s`\n },\n \"nb-NO\": {\n \"Empty\": `Tom`\n },\n \"nl-NL\": {\n \"Empty\": `Leeg`\n },\n \"pl-PL\": {\n \"Empty\": `Pusty`\n },\n \"pt-BR\": {\n \"Empty\": `Vazio`\n },\n \"pt-PT\": {\n \"Empty\": `Vazio`\n },\n \"ro-RO\": {\n \"Empty\": `Gol`\n },\n \"ru-RU\": {\n \"Empty\": `\\u{41D}\\u{435} \\u{437}\\u{430}\\u{43F}\\u{43E}\\u{43B}\\u{43D}\\u{435}\\u{43D}\\u{43E}`\n },\n \"sk-SK\": {\n \"Empty\": `Pr\\xe1zdne`\n },\n \"sl-SI\": {\n \"Empty\": `Prazen`\n },\n \"sr-SP\": {\n \"Empty\": `Prazno`\n },\n \"sv-SE\": {\n \"Empty\": `Tomt`\n },\n \"tr-TR\": {\n \"Empty\": `Bo\\u{15F}`\n },\n \"uk-UA\": {\n \"Empty\": `\\u{41F}\\u{443}\\u{441}\\u{442}\\u{43E}`\n },\n \"zh-CN\": {\n \"Empty\": `\\u{7A7A}`\n },\n \"zh-TW\": {\n \"Empty\": `\\u{7A7A}\\u{767D}`\n },\n};\n\nexport const spinButtonDictionary = new LocalizedStringDictionary<SpinButtonStringKey, string>(\n spinButtonStrings,\n);\n","/**\n * createSpinButton hook for Solidaria\n *\n * Provides the ARIA spinbutton props and live-region announcement behaviour for\n * a single spinbutton (e.g. a date-field segment). Port of the keyboard/announce\n * portion of @react-aria/spinbutton `useSpinButton`. The pointer press-and-hold\n * button machinery (increment/decrement buttons) is intentionally omitted — date\n * segments drive value changes through the keyboard only.\n */\n\nimport { createMemo, createEffect } from \"solid-js\";\nimport { access, type MaybeAccessor } from \"../utils/reactivity\";\nimport { createStringFormatter } from \"../i18n\";\nimport { announce, clearAnnouncer } from \"../live-announcer\";\nimport { spinButtonStrings, type SpinButtonStringKey } from \"./intl\";\n\nexport interface SpinButtonProps {\n /** The current value of the spinbutton. */\n value?: number;\n /** A human-readable text alternative for the value. */\n textValue?: string;\n /** The smallest value allowed. */\n minValue?: number;\n /** The largest value allowed. */\n maxValue?: number;\n /** Whether the spinbutton is disabled. */\n isDisabled?: boolean;\n /** Whether the spinbutton is read only. */\n isReadOnly?: boolean;\n /** Whether the spinbutton is required. */\n isRequired?: boolean;\n onIncrement?: () => void;\n onIncrementPage?: () => void;\n onDecrement?: () => void;\n onDecrementPage?: () => void;\n onDecrementToMin?: () => void;\n onIncrementToMax?: () => void;\n}\n\nexport interface SpinButtonAria {\n /** Props for the spinbutton element. */\n spinButtonProps: Record<string, unknown>;\n}\n\n/**\n * Provides the behaviour and accessibility implementation for a spinbutton.\n */\nexport function createSpinButton(props: MaybeAccessor<SpinButtonProps>): SpinButtonAria {\n const getProps = () => access(props);\n const stringFormatter = createStringFormatter<SpinButtonStringKey>(\n spinButtonStrings,\n \"@react-aria/spinbutton\",\n );\n\n const onKeyDown = (e: KeyboardEvent) => {\n const p = getProps();\n if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || p.isReadOnly || e.isComposing) {\n return;\n }\n\n switch (e.key) {\n // Upstream deliberately falls through PageUp → ArrowUp when no page\n // handler exists; our tsconfig forbids lexical fallthrough, so the\n // PageUp case mirrors that branch inline instead.\n case \"PageUp\":\n if (p.onIncrementPage) {\n e.preventDefault();\n p.onIncrementPage();\n } else if (p.onIncrement) {\n e.preventDefault();\n p.onIncrement();\n }\n break;\n case \"ArrowUp\":\n case \"Up\":\n if (p.onIncrement) {\n e.preventDefault();\n p.onIncrement();\n }\n break;\n // Same faithful fallthrough as PageUp, mirrored inline (PageDown → ArrowDown).\n case \"PageDown\":\n if (p.onDecrementPage) {\n e.preventDefault();\n p.onDecrementPage();\n } else if (p.onDecrement) {\n e.preventDefault();\n p.onDecrement();\n }\n break;\n case \"ArrowDown\":\n case \"Down\":\n if (p.onDecrement) {\n e.preventDefault();\n p.onDecrement();\n }\n break;\n case \"Home\":\n if (p.onDecrementToMin) {\n e.preventDefault();\n p.onDecrementToMin();\n }\n break;\n case \"End\":\n if (p.onIncrementToMax) {\n e.preventDefault();\n p.onIncrementToMax();\n }\n break;\n }\n };\n\n // Non-reactive focus flag — matches upstream's `isFocused` ref. Toggling it must\n // NOT re-run the announce effect; only a change in `ariaTextValue` announces.\n let isFocused = false;\n const onFocus = () => {\n isFocused = true;\n };\n const onBlur = () => {\n isFocused = false;\n };\n\n // Replace Unicode hyphen-minus (U+002D) with minus sign (U+2212) so VoiceOver\n // announces it as \"minus\". Replace the empty string with the word \"Empty\".\n const ariaTextValue = createMemo(() => {\n const p = getProps();\n return p.textValue === \"\"\n ? stringFormatter().format(\"Empty\")\n : (p.textValue || `${p.value}`).replace(\"-\", \"−\");\n });\n\n createEffect(() => {\n const value = ariaTextValue();\n if (isFocused) {\n clearAnnouncer(\"assertive\");\n announce(value, \"assertive\");\n }\n });\n\n const spinButtonProps = createMemo(() => {\n const p = getProps();\n const value = p.value;\n return {\n role: \"spinbutton\",\n \"aria-valuenow\": value !== undefined && !isNaN(value) ? value : undefined,\n \"aria-valuetext\": ariaTextValue(),\n \"aria-valuemin\": p.minValue,\n \"aria-valuemax\": p.maxValue,\n \"aria-disabled\": p.isDisabled || undefined,\n \"aria-readonly\": p.isReadOnly || undefined,\n \"aria-required\": p.isRequired || undefined,\n onKeyDown,\n onFocus,\n onBlur,\n };\n });\n\n return {\n get spinButtonProps() {\n return spinButtonProps();\n },\n };\n}\n"],"mappings":";;;;;;AAOA,MAAa,oBAAyE;CACpF,SAAS,EACT,SAAS,+BACT;CACA,SAAS,EACT,SAAS,2DACT;CACA,SAAS,EACT,SAAS,gBACT;CACA,SAAS,EACT,SAAS,MACT;CACA,SAAS,EACT,SAAS,OACT;CACA,SAAS,EACT,SAAS,sCACT;CACA,SAAS,EACT,SAAS,QACT;CACA,SAAS,EACT,SAAS,WACT;CACA,SAAS,EACT,SAAS,cACT;CACA,SAAS,EACT,SAAS,WACT;CACA,SAAS,EACT,SAAS,OACT;CACA,SAAS,EACT,SAAS,wBACT;CACA,SAAS,EACT,SAAS,SACT;CACA,SAAS,EACT,SAAS,UACT;CACA,SAAS,EACT,SAAS,QACT;CACA,SAAS,EACT,SAAS,WACT;CACA,SAAS,EACT,SAAS,oCACT;CACA,SAAS,EACT,SAAS,sBACT;CACA,SAAS,EACT,SAAS,cACT;CACA,SAAS,EACT,SAAS,MACT;CACA,SAAS,EACT,SAAS,OACT;CACA,SAAS,EACT,SAAS,QACT;CACA,SAAS,EACT,SAAS,QACT;CACA,SAAS,EACT,SAAS,QACT;CACA,SAAS,EACT,SAAS,MACT;CACA,SAAS,EACT,SAAS,iFACT;CACA,SAAS,EACT,SAAS,aACT;CACA,SAAS,EACT,SAAS,SACT;CACA,SAAS,EACT,SAAS,SACT;CACA,SAAS,EACT,SAAS,OACT;CACA,SAAS,EACT,SAAS,YACT;CACA,SAAS,EACT,SAAS,sCACT;CACA,SAAS,EACT,SAAS,WACT;CACA,SAAS,EACT,SAAS,mBACT;AACF;AAEA,MAAa,uBAAuB,IAAI,0BACtC,iBACF;;;;;;;;;;;;;;;ACnEA,SAAgB,iBA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AC5B,IAAI,WAAW;GACb,eAAe,WAAW;GAC1B,SAAS,OAAO,WAAW;EAC7B;CACF,CAAC;CAED,MAAM,kBAAkB,iBAAiB;EACvC,MAAM,IAAI,SAAS;EACnB,MAAM,QAAQ,EAAE;EAChB,OAAO;GACL,MAAM;GACN,iBAAiB,UAAU,KAAA,KAAa,CAAC,MAAM,KAAK,IAAI,QAAQ,KAAA;GAChE,kBAAkB,cAAc;GAChC,iBAAiB,EAAE;GACnB,iBAAiB,EAAE;GACnB,iBAAiB,EAAE,cAAc,KAAA;GACjC,iBAAiB,EAAE,cAAc,KAAA;GACjC,iBAAiB,EAAE,cAAc,KAAA;GACjC;GACA;GACA;EACF;CACF,CAAC;CAED,OAAO,EACL,IAAI,kBAAkB;EACpB,OAAO,gBAAgB;CACzB,EACF;AACF"}
|
|
1
|
+
{"version":3,"file":"spinbutton.jsx","names":[],"sources":["../../src/spinbutton/intl.ts","../../src/spinbutton/createSpinButton.ts"],"sourcesContent":["// Spinbutton announcement catalog, ported verbatim from @react-aria/spinbutton's\n// intl/*.json (34 locales). Keep in sync with the vendored react-spectrum source on\n// every pin bump.\nimport { LocalizedStringDictionary } from \"@internationalized/string\";\n\nexport type SpinButtonStringKey = \"Empty\";\n\nexport const spinButtonStrings: Record<string, Record<SpinButtonStringKey, string>> = {\n \"ar-AE\": {\n Empty: `\\u{641}\\u{627}\\u{631}\\u{63A}`,\n },\n \"bg-BG\": {\n Empty: `\\u{418}\\u{437}\\u{43F}\\u{440}\\u{430}\\u{437}\\u{43D}\\u{438}`,\n },\n \"cs-CZ\": {\n Empty: `Pr\\xe1zdn\\xe9`,\n },\n \"da-DK\": {\n Empty: `Tom`,\n },\n \"de-DE\": {\n Empty: `Leer`,\n },\n \"el-GR\": {\n Empty: `\\u{386}\\u{3B4}\\u{3B5}\\u{3B9}\\u{3BF}`,\n },\n \"en-US\": {\n Empty: `Empty`,\n },\n \"es-ES\": {\n Empty: `Vac\\xedo`,\n },\n \"et-EE\": {\n Empty: `T\\xfchjenda`,\n },\n \"fi-FI\": {\n Empty: `Tyhj\\xe4`,\n },\n \"fr-FR\": {\n Empty: `Vide`,\n },\n \"he-IL\": {\n Empty: `\\u{5E8}\\u{5D9}\\u{5E7}`,\n },\n \"hr-HR\": {\n Empty: `Prazno`,\n },\n \"hu-HU\": {\n Empty: `\\xdcres`,\n },\n \"it-IT\": {\n Empty: `Vuoto`,\n },\n \"ja-JP\": {\n Empty: `\\u{7A7A}`,\n },\n \"ko-KR\": {\n Empty: `\\u{BE44}\\u{C5B4} \\u{C788}\\u{C74C}`,\n },\n \"lt-LT\": {\n Empty: `Tu\\u{161}\\u{10D}ias`,\n },\n \"lv-LV\": {\n Empty: `Tuk\\u{161}s`,\n },\n \"nb-NO\": {\n Empty: `Tom`,\n },\n \"nl-NL\": {\n Empty: `Leeg`,\n },\n \"pl-PL\": {\n Empty: `Pusty`,\n },\n \"pt-BR\": {\n Empty: `Vazio`,\n },\n \"pt-PT\": {\n Empty: `Vazio`,\n },\n \"ro-RO\": {\n Empty: `Gol`,\n },\n \"ru-RU\": {\n Empty: `\\u{41D}\\u{435} \\u{437}\\u{430}\\u{43F}\\u{43E}\\u{43B}\\u{43D}\\u{435}\\u{43D}\\u{43E}`,\n },\n \"sk-SK\": {\n Empty: `Pr\\xe1zdne`,\n },\n \"sl-SI\": {\n Empty: `Prazen`,\n },\n \"sr-SP\": {\n Empty: `Prazno`,\n },\n \"sv-SE\": {\n Empty: `Tomt`,\n },\n \"tr-TR\": {\n Empty: `Bo\\u{15F}`,\n },\n \"uk-UA\": {\n Empty: `\\u{41F}\\u{443}\\u{441}\\u{442}\\u{43E}`,\n },\n \"zh-CN\": {\n Empty: `\\u{7A7A}`,\n },\n \"zh-TW\": {\n Empty: `\\u{7A7A}\\u{767D}`,\n },\n};\n\nexport const spinButtonDictionary = new LocalizedStringDictionary<SpinButtonStringKey, string>(\n spinButtonStrings,\n);\n","/**\n * createSpinButton hook for Solidaria\n *\n * Provides the ARIA spinbutton props and live-region announcement behaviour for\n * a single spinbutton (e.g. a date-field segment). Port of the keyboard/announce\n * portion of @react-aria/spinbutton `useSpinButton`. The pointer press-and-hold\n * button machinery (increment/decrement buttons) is intentionally omitted — date\n * segments drive value changes through the keyboard only.\n */\n\nimport { createMemo, createEffect } from \"solid-js\";\nimport { access, type MaybeAccessor } from \"../utils/reactivity\";\nimport { createStringFormatter } from \"../i18n\";\nimport { announce, clearAnnouncer } from \"../live-announcer\";\nimport { spinButtonStrings, type SpinButtonStringKey } from \"./intl\";\n\nexport interface SpinButtonProps {\n /** The current value of the spinbutton. */\n value?: number;\n /** A human-readable text alternative for the value. */\n textValue?: string;\n /** The smallest value allowed. */\n minValue?: number;\n /** The largest value allowed. */\n maxValue?: number;\n /** Whether the spinbutton is disabled. */\n isDisabled?: boolean;\n /** Whether the spinbutton is read only. */\n isReadOnly?: boolean;\n /** Whether the spinbutton is required. */\n isRequired?: boolean;\n onIncrement?: () => void;\n onIncrementPage?: () => void;\n onDecrement?: () => void;\n onDecrementPage?: () => void;\n onDecrementToMin?: () => void;\n onIncrementToMax?: () => void;\n}\n\nexport interface SpinButtonAria {\n /** Props for the spinbutton element. */\n spinButtonProps: Record<string, unknown>;\n}\n\n/**\n * Provides the behaviour and accessibility implementation for a spinbutton.\n */\nexport function createSpinButton(props: MaybeAccessor<SpinButtonProps>): SpinButtonAria {\n const getProps = () => access(props);\n const stringFormatter = createStringFormatter<SpinButtonStringKey>(\n spinButtonStrings,\n \"@react-aria/spinbutton\",\n );\n\n const onKeyDown = (e: KeyboardEvent) => {\n const p = getProps();\n if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || p.isReadOnly || e.isComposing) {\n return;\n }\n\n switch (e.key) {\n // Upstream deliberately falls through PageUp → ArrowUp when no page\n // handler exists; our tsconfig forbids lexical fallthrough, so the\n // PageUp case mirrors that branch inline instead.\n case \"PageUp\":\n if (p.onIncrementPage) {\n e.preventDefault();\n p.onIncrementPage();\n } else if (p.onIncrement) {\n e.preventDefault();\n p.onIncrement();\n }\n break;\n case \"ArrowUp\":\n case \"Up\":\n if (p.onIncrement) {\n e.preventDefault();\n p.onIncrement();\n }\n break;\n // Same faithful fallthrough as PageUp, mirrored inline (PageDown → ArrowDown).\n case \"PageDown\":\n if (p.onDecrementPage) {\n e.preventDefault();\n p.onDecrementPage();\n } else if (p.onDecrement) {\n e.preventDefault();\n p.onDecrement();\n }\n break;\n case \"ArrowDown\":\n case \"Down\":\n if (p.onDecrement) {\n e.preventDefault();\n p.onDecrement();\n }\n break;\n case \"Home\":\n if (p.onDecrementToMin) {\n e.preventDefault();\n p.onDecrementToMin();\n }\n break;\n case \"End\":\n if (p.onIncrementToMax) {\n e.preventDefault();\n p.onIncrementToMax();\n }\n break;\n }\n };\n\n // Non-reactive focus flag — matches upstream's `isFocused` ref. Toggling it must\n // NOT re-run the announce effect; only a change in `ariaTextValue` announces.\n let isFocused = false;\n const onFocus = () => {\n isFocused = true;\n };\n const onBlur = () => {\n isFocused = false;\n };\n\n // Replace Unicode hyphen-minus (U+002D) with minus sign (U+2212) so VoiceOver\n // announces it as \"minus\". Replace the empty string with the word \"Empty\".\n const ariaTextValue = createMemo(() => {\n const p = getProps();\n return p.textValue === \"\"\n ? stringFormatter().format(\"Empty\")\n : (p.textValue || `${p.value}`).replace(\"-\", \"−\");\n });\n\n createEffect(() => {\n const value = ariaTextValue();\n if (isFocused) {\n clearAnnouncer(\"assertive\");\n announce(value, \"assertive\");\n }\n });\n\n const spinButtonProps = createMemo(() => {\n const p = getProps();\n const value = p.value;\n return {\n role: \"spinbutton\",\n \"aria-valuenow\": value !== undefined && !isNaN(value) ? value : undefined,\n \"aria-valuetext\": ariaTextValue(),\n \"aria-valuemin\": p.minValue,\n \"aria-valuemax\": p.maxValue,\n \"aria-disabled\": p.isDisabled || undefined,\n \"aria-readonly\": p.isReadOnly || undefined,\n \"aria-required\": p.isRequired || undefined,\n onKeyDown,\n onFocus,\n onBlur,\n };\n });\n\n return {\n get spinButtonProps() {\n return spinButtonProps();\n },\n };\n}\n"],"mappings":";;;;;;AAOA,MAAa,oBAAyE;CACpF,SAAS,EACP,OAAO,+BACT;CACA,SAAS,EACP,OAAO,2DACT;CACA,SAAS,EACP,OAAO,gBACT;CACA,SAAS,EACP,OAAO,MACT;CACA,SAAS,EACP,OAAO,OACT;CACA,SAAS,EACP,OAAO,sCACT;CACA,SAAS,EACP,OAAO,QACT;CACA,SAAS,EACP,OAAO,WACT;CACA,SAAS,EACP,OAAO,cACT;CACA,SAAS,EACP,OAAO,WACT;CACA,SAAS,EACP,OAAO,OACT;CACA,SAAS,EACP,OAAO,wBACT;CACA,SAAS,EACP,OAAO,SACT;CACA,SAAS,EACP,OAAO,UACT;CACA,SAAS,EACP,OAAO,QACT;CACA,SAAS,EACP,OAAO,WACT;CACA,SAAS,EACP,OAAO,oCACT;CACA,SAAS,EACP,OAAO,sBACT;CACA,SAAS,EACP,OAAO,cACT;CACA,SAAS,EACP,OAAO,MACT;CACA,SAAS,EACP,OAAO,OACT;CACA,SAAS,EACP,OAAO,QACT;CACA,SAAS,EACP,OAAO,QACT;CACA,SAAS,EACP,OAAO,QACT;CACA,SAAS,EACP,OAAO,MACT;CACA,SAAS,EACP,OAAO,iFACT;CACA,SAAS,EACP,OAAO,aACT;CACA,SAAS,EACP,OAAO,SACT;CACA,SAAS,EACP,OAAO,SACT;CACA,SAAS,EACP,OAAO,OACT;CACA,SAAS,EACP,OAAO,YACT;CACA,SAAS,EACP,OAAO,sCACT;CACA,SAAS,EACP,OAAO,WACT;CACA,SAAS,EACP,OAAO,mBACT;AACF;AAEA,MAAa,uBAAuB,IAAI,0BACtC,iBACF;;;;;;;;;;;;;;;ACnEA,SAAgB,iBAAiB,OAAuD;CACtF,MAAM,iBAAiB,OAAO,KAAK;CACnC,MAAM,kBAAkB,sBACtB,mBACA,wBACF;CAEA,MAAM,aAAa,MAAqB;EACtC,MAAM,IAAI,SAAS;EACnB,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,Y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;GACN,iBAAiB,UAAU,KAAA,KAAa,CAAC,MAAM,KAAK,IAAI,QAAQ,KAAA;GAChE,kBAAkB,cAAc;GAChC,iBAAiB,EAAE;GACnB,iBAAiB,EAAE;GACnB,iBAAiB,EAAE,cAAc,KAAA;GACjC,iBAAiB,EAAE,cAAc,KAAA;GACjC,iBAAiB,EAAE,cAAc,KAAA;GACjC;GACA;GACA;EACF;CACF,CAAC;CAED,OAAO,EACL,IAAI,kBAAkB;EACpB,OAAO,gBAAgB;CACzB,EACF;AACF"}
|
package/dist/_chunk/table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","names":["mergeProps"],"sources":["../../src/table/createTable.ts","../../src/table/createTableHeaderRow.ts","../../src/table/createTableColumnHeader.ts","../../src/table/utils.ts","../../src/table/createTableRow.ts","../../src/table/createTableCell.ts","../../src/table/createTableRowGroup.ts","../../src/table/createTableSelectionCheckbox.ts","../../src/table/createTableSelectAllCheckbox.ts","../../src/table/createTableColumnResize.ts"],"sourcesContent":["/**\n * createTable - Provides accessibility for a table component.\n * Based on @react-aria/table/useTable.\n */\n\nimport { createMemo, createEffect, on, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport { createId } from \"@proyecto-viviana/solid-stately\";\nimport type { TableState, TableCollection, Key, GridNode } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableProps, TableAria } from \"./types\";\nimport { useLocale } from \"../i18n\";\nimport { announce } from \"../live-announcer\";\nimport { createDescription } from \"../utils/createDescription\";\nimport { scrollIntoViewport } from \"../utils\";\nimport { getInteractionModality } from \"../interactions/createInteractionModality\";\n\n// Global map to store table metadata for child components\nconst tableMap = new WeakMap<\n object,\n {\n tableId: string;\n actions: { onRowAction?: (key: Key) => void; onCellAction?: (key: Key) => void };\n shouldSelectOnPressUp?: boolean;\n focusMode?: \"row\" | \"cell\";\n }\n>();\n\n/**\n * Get the table metadata for child components.\n */\nexport function getTableData<T>(state: TableState<T, TableCollection<T>>) {\n return tableMap.get(state);\n}\n\n/**\n * Helper to get cells from a row by iterating children\n */\nfunction getChildCells<T>(collection: TableCollection<T>, rowKey: Key): GridNode<T>[] {\n const children = collection.getChildren(rowKey);\n return [...children].filter((node) => node.type === \"cell\" || node.type === \"rowheader\");\n}\n\n/**\n * Helper to get cell at specific index in a row\n */\nfunction getCellAtIndex<T>(\n collection: TableCollection<T>,\n rowKey: Key,\n index: number,\n): GridNode<T> | null {\n const cells = getChildCells(collection, rowKey);\n return cells[index] ?? null;\n}\n\n/**\n * Helper to check if a node is a cell\n */\nfunction isCell<T>(node: GridNode<T> | null): boolean {\n return node?.type === \"cell\" || node?.type === \"rowheader\";\n}\n\n/**\n * Helper to check if a node is a row\n */\nfunction isRow<T>(node: GridNode<T> | null): boolean {\n return node?.type === \"item\";\n}\n\n/**\n * Creates accessibility props for a table component.\n */\nexport function createTable<T extends object>(\n props: Accessor<AriaTableProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n ref: Accessor<HTMLTableElement | null>,\n): TableAria {\n const id = createId(props().id);\n const locale = useLocale();\n\n // Track previous sort descriptor for announcements\n let prevSortDescriptor: { column: Key; direction: \"ascending\" | \"descending\" } | null = null;\n let isFirstRender = true;\n let typeaheadBuffer = \"\";\n let typeaheadTimeout: ReturnType<typeof setTimeout> | undefined;\n\n // Store metadata for child components\n const storeTableData = () => {\n const s = state();\n const p = props();\n tableMap.set(s, {\n tableId: id,\n actions: {\n onRowAction: p.onRowAction,\n onCellAction: p.onCellAction,\n },\n shouldSelectOnPressUp: p.shouldSelectOnPressUp,\n focusMode: p.focusMode,\n });\n };\n\n // Update table data whenever props/state changes\n createMemo(() => {\n storeTableData();\n });\n\n // Announce sort changes (only after initial render)\n createEffect(\n on(\n () => state().sortDescriptor,\n (sortDescriptor) => {\n if (isFirstRender) {\n isFirstRender = false;\n prevSortDescriptor = sortDescriptor;\n return;\n }\n\n if (\n sortDescriptor &&\n (sortDescriptor.column !== prevSortDescriptor?.column ||\n sortDescriptor.direction !== prevSortDescriptor?.direction)\n ) {\n const collection = state().collection;\n const column = collection.columns.find((c) => c.key === sortDescriptor.column);\n const columnName = column?.textValue ?? String(sortDescriptor.column);\n const directionText =\n sortDescriptor.direction === \"ascending\" ? \"ascending\" : \"descending\";\n\n announce(`Sorted by ${columnName}, ${directionText}`, \"assertive\", 500);\n }\n\n prevSortDescriptor = sortDescriptor;\n },\n ),\n );\n\n // Keyboard navigation handler with full 2D navigation\n const onKeyDown = (e: KeyboardEvent) => {\n const s = state();\n const collection = s.collection;\n const p = props();\n const focusMode = p.focusMode ?? \"row\";\n const isRTL = locale().direction === \"rtl\";\n const setFocusedKey = (key: Key) => {\n s.setFocusedKey(key);\n };\n const runTypeahead = (focusedKey: Key, focusedItem: GridNode<T>) => {\n if (e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) {\n return false;\n }\n\n // A leading Spacebar is a selection/action key, not the start of a type-ahead\n // search. Mirror upstream useTypeSelect (`search.length === 0 && character === ' '`)\n // and let it fall through so the focused row's own Space handler toggles selection.\n // Once a search is active, Space continues the query as normal.\n if (e.key === \" \" && typeaheadBuffer.length === 0) {\n return false;\n }\n\n typeaheadBuffer += e.key.toLocaleLowerCase();\n if (typeaheadTimeout) {\n clearTimeout(typeaheadTimeout);\n }\n typeaheadTimeout = setTimeout(() => {\n typeaheadBuffer = \"\";\n typeaheadTimeout = undefined;\n }, 500);\n\n const rows = Array.from(collection).filter((node) => !s.isDisabled(node.key));\n if (rows.length === 0) {\n return true;\n }\n\n const currentRowKey =\n isCell(focusedItem) && focusedItem.parentKey != null ? focusedItem.parentKey : focusedKey;\n const currentIndex = rows.findIndex((node) => node.key === currentRowKey);\n const orderedRows =\n currentIndex >= 0\n ? [...rows.slice(currentIndex + 1), ...rows.slice(0, currentIndex + 1)]\n : rows;\n const match = orderedRows.find((node) =>\n collection.getTextValue(node.key).toLocaleLowerCase().startsWith(typeaheadBuffer),\n );\n\n if (match) {\n e.preventDefault();\n setFocusedKey(match.key);\n }\n\n return true;\n };\n\n if (s.isKeyboardNavigationDisabled) {\n return;\n }\n\n const focusedKey = s.focusedKey;\n if (focusedKey == null) {\n // If nothing is focused, focus the first item\n if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\" || e.key === \"Home\" || e.key === \"End\") {\n const firstKey = collection.getFirstKey();\n if (firstKey != null) {\n e.preventDefault();\n setFocusedKey(firstKey);\n }\n }\n return;\n }\n\n const focusedItem = collection.getItem(focusedKey);\n if (!focusedItem) return;\n\n let nextKey: Key | null = null;\n\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault();\n // If focused on a cell, move to the same column in the next row\n if (isCell(focusedItem) && focusedItem.parentKey != null) {\n const nextRowKey = collection.getKeyAfter(focusedItem.parentKey);\n if (nextRowKey != null) {\n const cellIndex = focusedItem.index;\n const nextCell = getCellAtIndex(collection, nextRowKey, cellIndex);\n nextKey = nextCell?.key ?? nextRowKey;\n }\n } else {\n // Move to next row\n nextKey = collection.getKeyAfter(focusedKey);\n }\n break;\n }\n\n case \"ArrowUp\": {\n e.preventDefault();\n // If focused on a cell, move to the same column in the previous row\n if (isCell(focusedItem) && focusedItem.parentKey != null) {\n const prevRowKey = collection.getKeyBefore(focusedItem.parentKey);\n if (prevRowKey != null) {\n const cellIndex = focusedItem.index;\n const prevCell = getCellAtIndex(collection, prevRowKey, cellIndex);\n nextKey = prevCell?.key ?? prevRowKey;\n }\n } else {\n // Move to previous row\n nextKey = collection.getKeyBefore(focusedKey);\n }\n break;\n }\n\n case \"ArrowRight\": {\n e.preventDefault();\n const goNext = !isRTL;\n\n if (isRow(focusedItem)) {\n // If on a row, go to the first/last cell\n const cells = getChildCells(collection, focusedKey);\n if (cells.length > 0) {\n nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;\n }\n } else if (isCell(focusedItem) && focusedItem.parentKey != null) {\n // If on a cell, go to the next/prev cell\n const cells = getChildCells(collection, focusedItem.parentKey);\n const currentIndex = focusedItem.index;\n const targetIndex = goNext ? currentIndex + 1 : currentIndex - 1;\n\n if (targetIndex >= 0 && targetIndex < cells.length) {\n nextKey = cells[targetIndex].key;\n } else if (focusMode === \"row\") {\n // Wrap to row\n nextKey = focusedItem.parentKey;\n } else {\n // Wrap to first/last cell\n nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;\n }\n }\n break;\n }\n\n case \"ArrowLeft\": {\n e.preventDefault();\n const goNext = isRTL;\n\n if (isRow(focusedItem)) {\n // If on a row, go to the last/first cell\n const cells = getChildCells(collection, focusedKey);\n if (cells.length > 0) {\n nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;\n }\n } else if (isCell(focusedItem) && focusedItem.parentKey != null) {\n // If on a cell, go to the prev/next cell\n const cells = getChildCells(collection, focusedItem.parentKey);\n const currentIndex = focusedItem.index;\n const targetIndex = goNext ? currentIndex + 1 : currentIndex - 1;\n\n if (targetIndex >= 0 && targetIndex < cells.length) {\n nextKey = cells[targetIndex].key;\n } else if (focusMode === \"row\") {\n // Wrap to row\n nextKey = focusedItem.parentKey;\n } else {\n // Wrap to first/last cell\n nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;\n }\n }\n break;\n }\n\n case \"Home\": {\n e.preventDefault();\n if (e.ctrlKey) {\n // Ctrl+Home: Go to first row/cell\n const firstRowKey = collection.getFirstKey();\n if (firstRowKey != null) {\n if (isCell(focusedItem) || focusMode === \"cell\") {\n const cells = getChildCells(collection, firstRowKey);\n nextKey = cells[0]?.key ?? firstRowKey;\n } else {\n nextKey = firstRowKey;\n }\n }\n } else if (isCell(focusedItem) && focusedItem.parentKey != null) {\n // Home: Go to first cell in current row\n const cells = getChildCells(collection, focusedItem.parentKey);\n nextKey = cells[0]?.key ?? null;\n } else {\n // On row: go to first row\n nextKey = collection.getFirstKey();\n }\n break;\n }\n\n case \"End\": {\n e.preventDefault();\n if (e.ctrlKey) {\n // Ctrl+End: Go to last row/cell\n const lastRowKey = collection.getLastKey();\n if (lastRowKey != null) {\n if (isCell(focusedItem) || focusMode === \"cell\") {\n const cells = getChildCells(collection, lastRowKey);\n nextKey = cells[cells.length - 1]?.key ?? lastRowKey;\n } else {\n nextKey = lastRowKey;\n }\n }\n } else if (isCell(focusedItem) && focusedItem.parentKey != null) {\n // End: Go to last cell in current row\n const cells = getChildCells(collection, focusedItem.parentKey);\n nextKey = cells[cells.length - 1]?.key ?? null;\n } else {\n // On row: go to last row\n nextKey = collection.getLastKey();\n }\n break;\n }\n\n case \"PageDown\": {\n e.preventDefault();\n // Move down by roughly a page (using DOM measurements if available)\n const el = ref();\n if (el && el.clientHeight > 0) {\n const visibleHeight = el.clientHeight;\n let currentKey: Key | null = focusedKey;\n let traveled = 0;\n\n // If on a cell, start from the parent row\n if (isCell(focusedItem) && focusedItem.parentKey != null) {\n currentKey = focusedItem.parentKey;\n }\n\n // Move down until we've traveled approximately one page\n while (currentKey != null && traveled < visibleHeight) {\n const next = collection.getKeyAfter(currentKey);\n if (next == null) break;\n\n // Estimate row height (default to 40px if we can't measure)\n const rowElement = el.querySelector(`[data-key=\"${currentKey}\"]`);\n traveled += rowElement?.clientHeight ?? 40;\n currentKey = next;\n }\n\n if (currentKey != null) {\n // If we started on a cell, focus the same column in the new row\n if (isCell(focusedItem)) {\n const cellIndex = focusedItem.index;\n const targetCell = getCellAtIndex(collection, currentKey, cellIndex);\n nextKey = targetCell?.key ?? currentKey;\n } else {\n nextKey = currentKey;\n }\n }\n } else {\n // Fallback: move 10 rows\n let count = 10;\n let current: Key | null =\n isCell(focusedItem) && focusedItem.parentKey != null\n ? focusedItem.parentKey\n : focusedKey;\n while (count > 0 && current != null) {\n const next = collection.getKeyAfter(current);\n if (next == null) break;\n current = next;\n count--;\n }\n if (current != null && isCell(focusedItem)) {\n const targetCell = getCellAtIndex(collection, current, focusedItem.index);\n nextKey = targetCell?.key ?? current;\n } else {\n nextKey = current;\n }\n }\n break;\n }\n\n case \"PageUp\": {\n e.preventDefault();\n // Move up by roughly a page\n const el = ref();\n if (el && el.clientHeight > 0) {\n const visibleHeight = el.clientHeight;\n let currentKey: Key | null = focusedKey;\n let traveled = 0;\n\n // If on a cell, start from the parent row\n if (isCell(focusedItem) && focusedItem.parentKey != null) {\n currentKey = focusedItem.parentKey;\n }\n\n // Move up until we've traveled approximately one page\n while (currentKey != null && traveled < visibleHeight) {\n const prev = collection.getKeyBefore(currentKey);\n if (prev == null) break;\n\n const rowElement = el.querySelector(`[data-key=\"${currentKey}\"]`);\n traveled += rowElement?.clientHeight ?? 40;\n currentKey = prev;\n }\n\n if (currentKey != null) {\n if (isCell(focusedItem)) {\n const cellIndex = focusedItem.index;\n const targetCell = getCellAtIndex(collection, currentKey, cellIndex);\n nextKey = targetCell?.key ?? currentKey;\n } else {\n nextKey = currentKey;\n }\n }\n } else {\n // Fallback: move 10 rows\n let count = 10;\n let current: Key | null =\n isCell(focusedItem) && focusedItem.parentKey != null\n ? focusedItem.parentKey\n : focusedKey;\n while (count > 0 && current != null) {\n const prev = collection.getKeyBefore(current);\n if (prev == null) break;\n current = prev;\n count--;\n }\n if (current != null && isCell(focusedItem)) {\n const targetCell = getCellAtIndex(collection, current, focusedItem.index);\n nextKey = targetCell?.key ?? current;\n } else {\n nextKey = current;\n }\n }\n break;\n }\n\n case \"Escape\":\n if (p.escapeKeyBehavior !== \"none\") {\n s.clearSelection();\n }\n return;\n\n case \"a\":\n if (e.ctrlKey || e.metaKey) {\n e.preventDefault();\n if (s.selectionMode === \"multiple\") {\n s.selectAll();\n }\n }\n return;\n\n // NOTE: Space/Enter selection is intentionally NOT handled here. Upstream\n // useSelectableCollection has no ' '/Enter case — keyboard selection is owned\n // by the row (useSelectableItem, ported in createTableRow). Handling it here too\n // double-toggled the selection (row toggles on, grid toggles back off → no-op),\n // since the row handler does not stop propagation. Space/Enter fall through to\n // the type-ahead path below, which ignores a leading Space and bails on Enter.\n\n default:\n if (runTypeahead(focusedKey, focusedItem)) {\n return;\n }\n return;\n }\n\n if (nextKey != null) {\n setFocusedKey(nextKey);\n\n // Handle shift+arrow for range selection\n if (e.shiftKey && s.selectionMode === \"multiple\") {\n // For cells, select the parent row\n const focusedNode = collection.getItem(nextKey);\n const keyToSelect =\n focusedNode && isCell(focusedNode) && focusedNode.parentKey != null\n ? focusedNode.parentKey\n : nextKey;\n s.extendSelection(keyToSelect);\n }\n }\n };\n\n // Focus handling\n const onFocus = (e: FocusEvent) => {\n const s = state();\n const el = ref();\n\n if (!el?.contains(e.target as Element)) {\n return;\n }\n\n if (!s.isFocused) {\n s.setFocused(true);\n\n // If no key is focused, focus the first one\n if (s.focusedKey == null) {\n const firstKey = s.collection.getFirstKey();\n if (firstKey != null) {\n s.setFocusedKey(firstKey);\n }\n }\n }\n };\n\n const onBlur = (e: FocusEvent) => {\n const s = state();\n const el = ref();\n\n // Only blur if focus is leaving the table entirely\n if (el && !el.contains(e.relatedTarget as Element)) {\n s.setFocused(false);\n }\n };\n\n // Mirror React Aria's useSelectableCollection: once the roving tabindex for\n // the focused key has been committed to the DOM, move browser focus onto that\n // element from a post-commit effect — looking it up by its stable data-key\n // rather than by transient tabindex. Doing this imperatively during the key\n // handler (in a microtask) raced Solid's reconciliation and dropped focus to\n // <body>, so Space/Enter never reached the grid's selection handler.\n createEffect(() => {\n const s = state();\n const key = s.focusedKey;\n const el = ref();\n if (!el || key == null) {\n return;\n }\n\n // Only manage focus while it already lives inside the table — i.e. the user\n // is navigating with the keyboard. We gate on the *physical* position of\n // browser focus rather than the grid's logical `isFocused` signal: focus can\n // land directly on a row (a pointer click, or programmatic row focus) without\n // ever firing the grid's own non-bubbling focus handler, so `isFocused` stays\n // false even though the table genuinely holds focus. The contains() check is\n // also what keeps us from pulling focus back from elsewhere on the page when\n // the focused key changes from a background interaction.\n const active = document.activeElement;\n if (!active || (active !== el && !el.contains(active))) {\n return;\n }\n\n const target = el.querySelector<HTMLElement>(`[data-key=\"${key}\"]`);\n if (target && target !== active) {\n target.focus();\n\n // Reveal the newly focused row/cell when navigating with the keyboard,\n // mirroring useSelectableCollection. Pointer-driven focus changes should\n // not shift the scroll position under the user's finger.\n if (getInteractionModality() !== \"pointer\") {\n scrollIntoViewport(target, { containingElement: el });\n }\n }\n });\n\n // Warn if no label is provided\n createMemo(() => {\n const p = props();\n if (!p[\"aria-label\"] && !p[\"aria-labelledby\"]) {\n console.warn(\"Table: An aria-label or aria-labelledby prop is required for accessibility.\");\n }\n });\n\n // A sorted table exposes a persistent sort description on the grid (\"sorted by\n // column {name} in {direction} order\"), mirroring `useTable`'s\n // `useDescription(sortDescription)` — separate from the transient live-region\n // announcement above. `columnName` follows upstream exactly\n // (`columns.find(c => c.key === column)?.textValue ?? ''`) so a header with no\n // plain-text value yields an empty name, matching the S2 oracle.\n const sortDescription = () => {\n const s = state();\n const descriptor = s.sortDescriptor;\n const column = descriptor?.column;\n const direction = descriptor?.direction;\n if (!direction || column == null) {\n return undefined;\n }\n const columnName = s.collection.columns.find((c) => c.key === column)?.textValue ?? \"\";\n return `sorted by column ${columnName} in ${direction} order`;\n };\n const sortDescriptionProps = createDescription(sortDescription);\n\n const gridProps = createMemo(() => {\n const p = props();\n const s = state();\n\n const describedBy =\n [sortDescriptionProps[\"aria-describedby\"], p[\"aria-describedby\"]]\n .filter(Boolean)\n .join(\" \") || undefined;\n\n const baseProps: Record<string, unknown> = {\n role: \"grid\",\n id,\n \"aria-label\": p[\"aria-label\"],\n \"aria-labelledby\": p[\"aria-labelledby\"],\n \"aria-describedby\": describedBy,\n \"aria-multiselectable\": s.selectionMode === \"multiple\" ? \"true\" : undefined,\n // Keep the grid itself tabbable so keyboard users can enter\n // row/cell navigation without requiring a prior pointer interaction.\n tabIndex: 0,\n onKeyDown,\n onFocus,\n onBlur,\n };\n\n if (p.isVirtualized) {\n baseProps[\"aria-rowcount\"] = s.collection.rowCount;\n baseProps[\"aria-colcount\"] = s.collection.columnCount;\n }\n\n return baseProps as JSX.HTMLAttributes<HTMLTableElement>;\n });\n\n return {\n get gridProps() {\n return gridProps();\n },\n };\n}\n","/**\n * createTableHeaderRow - Provides accessibility for a table header row.\n * Based on @react-aria/table/useTableHeaderRow.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableHeaderRowProps, TableHeaderRowAria } from \"./types\";\n\n/**\n * Creates accessibility props for a table header row.\n */\nexport function createTableHeaderRow<T extends object>(\n props: Accessor<AriaTableHeaderRowProps>,\n _state: Accessor<TableState<T, TableCollection<T>>>,\n _ref: Accessor<HTMLTableRowElement | null>,\n): TableHeaderRowAria {\n const rowProps = createMemo(() => {\n const p = props();\n const node = p.node;\n\n const baseProps: Record<string, unknown> = {\n role: \"row\",\n };\n\n // Add aria-rowindex for virtualized tables\n if (p.isVirtualized && node.rowIndex != null) {\n baseProps[\"aria-rowindex\"] = node.rowIndex + 1; // 1-based\n }\n\n return baseProps as JSX.HTMLAttributes<HTMLTableRowElement>;\n });\n\n return {\n get rowProps() {\n return rowProps();\n },\n };\n}\n","/**\n * createTableColumnHeader - Provides accessibility for a table column header.\n * Based on @react-aria/table/useTableColumnHeader.\n */\n\nimport { createMemo, createSignal, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableColumnHeaderProps, TableColumnHeaderAria } from \"./types\";\nimport { getTableData } from \"./createTable\";\nimport { createDescription } from \"../utils/createDescription\";\n\n/**\n * Creates accessibility props for a table column header.\n */\nexport function createTableColumnHeader<T extends object>(\n props: Accessor<AriaTableColumnHeaderProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n _ref: Accessor<HTMLTableCellElement | null>,\n): TableColumnHeaderAria {\n const [isPressed, setIsPressed] = createSignal(false);\n let ignoreNextClick = false;\n let ignoreNextClickTimeout: ReturnType<typeof setTimeout> | undefined;\n\n const isFocused = createMemo(() => {\n const s = state();\n const p = props();\n return s.focusedKey === p.node.key;\n });\n\n // A sortable column header is described as \"sortable column\" — mirrors\n // `useTableColumnHeader`'s `useDescription(stringFormatter.format('sortable'))`.\n // Backed by a shared hidden element (ref-counted) and referenced via\n // aria-describedby.\n const sortDescriptionProps = createDescription(() =>\n props().allowsSorting ? \"sortable column\" : undefined,\n );\n\n const sortColumn = () => {\n const s = state();\n const p = props();\n\n if (p.allowsSorting) {\n s.sort(p.node.key);\n }\n };\n\n const clearPendingClickIgnore = () => {\n if (ignoreNextClickTimeout != null) {\n clearTimeout(ignoreNextClickTimeout);\n ignoreNextClickTimeout = undefined;\n }\n };\n\n const ignorePointerGeneratedClick = () => {\n clearPendingClickIgnore();\n ignoreNextClick = true;\n ignoreNextClickTimeout = setTimeout(() => {\n ignoreNextClick = false;\n ignoreNextClickTimeout = undefined;\n }, 0);\n };\n\n // Handle click for sorting. Pointer activation is handled on pointerup because\n // focusing the table header can re-render its child content before a native\n // click is dispatched.\n const onClick = () => {\n if (ignoreNextClick) {\n ignoreNextClick = false;\n clearPendingClickIgnore();\n return;\n }\n\n sortColumn();\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const p = props();\n\n if (\n p.allowsSorting &&\n (e.key === \"Enter\" || e.key === \" \" || e.key === \"Space\" || e.key === \"Spacebar\")\n ) {\n e.preventDefault();\n sortColumn();\n }\n };\n\n const onFocus = () => {\n const s = state();\n const p = props();\n s.setFocusedKey(p.node.key);\n };\n\n const onPointerDown = (e: PointerEvent) => {\n if (e.button !== 0) {\n return;\n }\n\n setIsPressed(true);\n };\n\n const onPointerUp = () => {\n if (isPressed()) {\n ignorePointerGeneratedClick();\n sortColumn();\n }\n\n setIsPressed(false);\n };\n\n const onPointerCancel = () => {\n setIsPressed(false);\n };\n\n const columnHeaderProps = createMemo(() => {\n const s = state();\n const p = props();\n const node = p.node;\n const tableData = getTableData(s);\n\n // Determine sort state\n let ariaSort: \"none\" | \"ascending\" | \"descending\" | undefined = undefined;\n if (p.allowsSorting) {\n const sortDescriptor = s.sortDescriptor;\n if (sortDescriptor?.column === node.key) {\n ariaSort = sortDescriptor.direction;\n } else {\n ariaSort = \"none\";\n }\n }\n\n const baseProps: Record<string, unknown> = {\n role: \"columnheader\",\n id: tableData ? `${tableData.tableId}-${node.key}` : undefined,\n \"aria-sort\": ariaSort,\n \"aria-describedby\": sortDescriptionProps[\"aria-describedby\"],\n tabIndex: isFocused() ? 0 : -1,\n onFocus,\n };\n\n // Add click handler if sortable\n if (p.allowsSorting) {\n baseProps.onClick = onClick;\n baseProps.onKeyDown = onKeyDown;\n baseProps.onPointerDown = onPointerDown;\n baseProps.onPointerUp = onPointerUp;\n baseProps.onPointerCancel = onPointerCancel;\n baseProps.onPointerLeave = onPointerCancel;\n baseProps.style = { cursor: \"pointer\" };\n }\n\n // Add aria-colindex for virtualized tables\n if (p.isVirtualized && node.column != null) {\n baseProps[\"aria-colindex\"] = node.column + 1; // 1-based\n }\n\n // Add colspan if present\n if (node.colspan != null && node.colspan > 1) {\n baseProps[\"aria-colspan\"] = node.colspan;\n baseProps.colSpan = node.colspan;\n }\n\n return baseProps as JSX.HTMLAttributes<HTMLTableCellElement>;\n });\n\n return {\n get columnHeaderProps() {\n return columnHeaderProps();\n },\n };\n}\n","/**\n * Table accessibility id helpers.\n * Port of @react-aria/table/utils (`getRowLabelledBy` / cell id derivation).\n */\n\nimport type {\n Key,\n GridNode,\n TableState,\n TableCollection,\n} from \"@proyecto-viviana/solid-stately\";\nimport { getTableData } from \"./createTable\";\n\n/**\n * A row is labelled by its row-header cells. Mirrors `@react-aria/table`'s\n * `getRowLabelledBy`, which joins `getCellId(state, rowKey, columnKey)` across\n * `collection.rowHeaderColumnKeys`. We resolve the actual rowheader cell node\n * and rebuild the exact id string `createTableCell` puts on the element\n * (`${tableId}-${parentKey}-${cellKey}`) so the reference always matches a real\n * element, regardless of the cell-key scheme.\n */\nexport function getRowLabelledBy<T extends object>(\n state: TableState<T, TableCollection<T>>,\n rowKey: Key,\n): string {\n const tableData = getTableData(state);\n const tableId = tableData?.tableId ?? \"table\";\n const collection = state.collection as TableCollection<T> & {\n getCell?: (rowKey: Key, columnKey: Key) => GridNode<T> | null;\n };\n\n return [...collection.rowHeaderColumnKeys]\n .map((columnKey) => {\n const cell = collection.getCell?.(rowKey, columnKey);\n return cell?.parentKey != null\n ? `${tableId}-${String(cell.parentKey)}-${String(cell.key)}`\n : null;\n })\n .filter((id): id is string => id != null)\n .join(\" \");\n}\n","/**\n * createTableRow - Provides accessibility for a table row.\n * Based on @react-aria/table/useTableRow.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type {\n Collection,\n Key,\n Selection,\n TableState,\n TableCollection,\n} from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableRowProps, TableRowAria, ExpandButtonProps } from \"./types\";\nimport { getTableData } from \"./createTable\";\nimport { getRowLabelledBy } from \"./utils\";\nimport { useLocale } from \"../i18n\";\nimport { createSelectableItem, type SelectableItemState } from \"../selection/createSelectableItem\";\nimport { mergeProps } from \"../utils/mergeProps\";\n\n/**\n * Arrow keys that expand/collapse a tree-grid row, mirroring `@react-aria/table`.\n * Direction is flipped under RTL.\n */\nconst EXPANSION_KEYS = {\n expand: { ltr: \"ArrowRight\", rtl: \"ArrowLeft\" },\n collapse: { ltr: \"ArrowLeft\", rtl: \"ArrowRight\" },\n} as const;\n\n/**\n * Creates accessibility props for a table row.\n */\nexport function createTableRow<T extends object>(\n props: Accessor<AriaTableRowProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n ref: Accessor<HTMLTableRowElement | null>,\n): TableRowAria {\n const locale = useLocale();\n\n // Tree-grid (expandable rows): only active when the collection has a tree column.\n const isTreeRow = createMemo(() => state().treeColumn != null);\n\n const hasChildRows = createMemo(() => props().node.isExpandable ?? false);\n\n const isExpanded = createMemo(() => {\n const s = state();\n if (s.treeColumn == null) return false;\n return s.expandedKeys === \"all\" || s.expandedKeys.has(props().node.key);\n });\n\n // aria-posinset / aria-setsize among same-level sibling rows.\n const siblingInfo = createMemo(() => {\n const s = state();\n const node = props().node;\n if (node.parentKey != null) {\n const parent = s.collection.getItem(node.parentKey);\n if (parent) {\n const siblings = parent.childNodes.filter((n) => n.type === \"item\");\n return { posinset: node.index + 1, setsize: siblings.length };\n }\n }\n const rootRows = s.collection.body.childNodes.filter((n) => n.type === \"item\");\n const rootIndex = rootRows.findIndex((n) => n.key === node.key);\n return {\n posinset: rootIndex >= 0 ? rootIndex + 1 : node.index + 1,\n setsize: rootRows.length,\n };\n });\n\n const isSelected = createMemo(() => {\n const s = state();\n const p = props();\n return s.isSelected(p.node.key);\n });\n\n const selectableState: SelectableItemState<T> = {\n collection: () => state().collection as unknown as Collection<T>,\n isFocused: () => state().isFocused,\n setFocused: (focused: boolean) => state().setFocused(focused),\n focusedKey: () => state().focusedKey,\n childFocusStrategy: () => state().childFocusStrategy,\n setFocusedKey: (key: Key | null, strategy) => state().setFocusedKey(key, strategy),\n selectionMode: () => state().selectionMode,\n selectionBehavior: () => state().selectionBehavior,\n disallowEmptySelection: () => state().disallowEmptySelection,\n selectedKeys: () => state().selectedKeys as Selection,\n disabledKeys: () => state().disabledKeys,\n disabledBehavior: () => state().disabledBehavior,\n isEmpty: () => {\n const keys = state().selectedKeys;\n return keys !== \"all\" && keys.size === 0;\n },\n isSelectAll: () => state().selectedKeys === \"all\",\n isSelected: (key: Key) => state().isSelected(key),\n isDisabled: (key: Key) => {\n const s = state();\n const item = s.collection.getItem(key);\n return (\n s.disabledBehavior === \"all\" &&\n s.isDisabled(key) &&\n item?.props?.disabledBehavior !== \"selection\"\n );\n },\n canSelectItem: (key: Key) => {\n const s = state();\n return s.selectionMode !== \"none\" && !s.isDisabled(key);\n },\n setSelectionBehavior: (behavior) => state().setSelectionBehavior(behavior),\n toggleSelection: (key: Key) => state().toggleSelection(key),\n replaceSelection: (key: Key) => state().replaceSelection(key),\n setSelectedKeys: (keys: Iterable<Key>) => state().setSelectedKeys(keys),\n selectAll: () => state().selectAll(),\n clearSelection: () => state().clearSelection(),\n toggleSelectAll: () => state().toggleSelectAll(),\n extendSelection: (toKey: Key, _collection: Collection<T>) => state().extendSelection(toKey),\n };\n\n const selectableItem = createSelectableItem<T>(\n () => {\n const s = state();\n const p = props();\n const tableData = getTableData(s);\n const onRowAction = tableData?.actions.onRowAction;\n const hasAction = !!p.onAction || !!onRowAction || !!p.href;\n\n return {\n key: p.node.key,\n id: `${tableData?.tableId ?? \"table\"}-row-${String(p.node.key)}`,\n isVirtualized: p.isVirtualized,\n shouldSelectOnPressUp: tableData?.shouldSelectOnPressUp ?? false,\n isDisabled: !!p.isDisabled || s.collection.size === 0,\n onAction: hasAction\n ? (event) => {\n p.onAction?.();\n onRowAction?.(p.node.key);\n if (p.href) {\n p.onLinkAction?.(event);\n }\n }\n : undefined,\n };\n },\n selectableState,\n ref,\n );\n\n const isDisabled = () => selectableItem.isDisabled();\n\n const onTreeGridKeyDown = (e: KeyboardEvent) => {\n const s = state();\n const p = props();\n\n if (isDisabled()) return;\n\n // Tree-grid expand/collapse with Left/Right arrows (flipped under RTL). Handled before\n // selection/navigation; stopping propagation prevents the grid's arrow navigation when\n // expansion consumes the key.\n if (s.treeColumn != null) {\n const direction = locale().direction === \"rtl\" ? \"rtl\" : \"ltr\";\n const key = p.node.key;\n const expanded = s.expandedKeys;\n if (\n e.key === EXPANSION_KEYS.expand[direction] &&\n s.focusedKey === key &&\n hasChildRows() &&\n expanded !== \"all\" &&\n !expanded.has(key)\n ) {\n s.toggleKey(key);\n e.stopPropagation();\n return;\n } else if (e.key === EXPANSION_KEYS.collapse[direction] && s.focusedKey === key) {\n if (expanded !== \"all\") {\n if (hasChildRows() && expanded.has(key)) {\n s.toggleKey(key);\n e.stopPropagation();\n return;\n } else if (!expanded.has(key) && p.node.parentKey != null && p.node.level > 0) {\n // Leaf or already-collapsed row: move focus to the parent row.\n s.setFocusedKey(p.node.parentKey);\n e.stopPropagation();\n return;\n }\n } else {\n s.toggleKey(key);\n e.stopPropagation();\n return;\n }\n }\n }\n };\n\n const rowProps = createMemo(() => {\n const s = state();\n const p = props();\n const node = p.node;\n\n const baseProps: Record<string, unknown> = {\n role: \"row\",\n \"aria-selected\": s.selectionMode !== \"none\" ? isSelected() : undefined,\n \"aria-disabled\": isDisabled() || undefined,\n };\n\n // A row is labelled by its row-header cell(s) — mirrors `useTableRow`'s\n // `'aria-labelledby': getRowLabelledBy(state, node.key)`. Without it the\n // browser falls back to concatenating every cell (incl. the selection\n // checkbox), so the row's accessible name reads \"Select Foo.pdf PDF …\".\n const labelledBy = getRowLabelledBy(s, node.key);\n if (labelledBy) {\n baseProps[\"aria-labelledby\"] = labelledBy;\n }\n\n // Tree-grid rows expose their nesting depth, position and expansion state.\n if (s.treeColumn != null) {\n const { posinset, setsize } = siblingInfo();\n baseProps[\"aria-expanded\"] = hasChildRows() ? isExpanded() : undefined;\n baseProps[\"aria-level\"] = node.level + 1; // 1-based\n baseProps[\"aria-posinset\"] = posinset;\n baseProps[\"aria-setsize\"] = setsize;\n baseProps.onKeyDown = onTreeGridKeyDown;\n }\n\n // Add aria-rowindex for virtualized tables. Tree grids omit it (matches upstream).\n if (p.isVirtualized && s.treeColumn == null && node.rowIndex != null) {\n baseProps[\"aria-rowindex\"] = node.rowIndex + 1; // 1-based\n }\n\n return mergeProps<JSX.HTMLAttributes<HTMLTableRowElement>>(\n selectableItem.itemProps as unknown as JSX.HTMLAttributes<HTMLTableRowElement>,\n baseProps,\n );\n });\n\n // Chevron button for expanding/collapsing a tree-grid row. Press-based so it flows through\n // our Button's `createPress`, and excluded from the tab order — reached via the row's\n // Left/Right arrow keys instead. Mirrors `@react-aria/table`'s `expandButtonProps`; whether a\n // chevron renders for a leaf row is the consumer's call (gate on `hasChildItems`), matching S2.\n const onExpandPress = () => {\n const s = state();\n const p = props();\n if (isDisabled()) return;\n s.toggleKey(p.node.key);\n s.setFocused(true);\n s.setFocusedKey(p.node.key);\n };\n\n const expandButtonProps = createMemo<ExpandButtonProps>(() => ({\n isDisabled: isDisabled(),\n onPress: onExpandPress,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n \"data-react-aria-prevent-focus\": true,\n \"aria-label\": isExpanded() ? \"Collapse\" : \"Expand\",\n }));\n\n return {\n get rowProps() {\n return rowProps();\n },\n get expandButtonProps() {\n return expandButtonProps();\n },\n get isSelected() {\n return isSelected();\n },\n get isDisabled() {\n return isDisabled();\n },\n get isPressed() {\n return selectableItem.isPressed();\n },\n get isExpanded() {\n return isExpanded();\n },\n get hasChildRows() {\n return hasChildRows();\n },\n };\n}\n","/**\n * createTableCell - Provides accessibility for a table cell.\n * Based on @react-aria/table/useTableCell.\n */\n\nimport { createMemo, createSignal, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableCellProps, TableCellAria } from \"./types\";\nimport { getTableData } from \"./createTable\";\n\n/**\n * Creates accessibility props for a table cell.\n */\nexport function createTableCell<T extends object>(\n props: Accessor<AriaTableCellProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n _ref: Accessor<HTMLTableCellElement | null>,\n): TableCellAria {\n const [isPressed, setIsPressed] = createSignal(false);\n\n const isDisabled = createMemo(() => {\n const s = state();\n const p = props();\n // Check if parent row is disabled\n const node = p.node;\n if (node.parentKey != null) {\n return s.isDisabled(node.parentKey);\n }\n return false;\n });\n\n const isFocused = createMemo(() => {\n const s = state();\n const p = props();\n return s.focusedKey === p.node.key;\n });\n\n // Handle click for cell actions\n const onClick = () => {\n const s = state();\n const p = props();\n\n if (isDisabled()) return;\n\n // Get table metadata for actions\n const tableData = getTableData(s);\n const onCellAction = tableData?.actions.onCellAction;\n\n // Call cell action handler\n if (onCellAction) {\n onCellAction(p.node.key);\n }\n\n if (p.onAction) {\n p.onAction();\n }\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const s = state();\n const p = props();\n\n if (isDisabled()) return;\n\n // Enter triggers cell action\n if (e.key === \"Enter\") {\n const tableData = getTableData(s);\n const onCellAction = tableData?.actions.onCellAction;\n\n if (onCellAction || p.onAction) {\n e.preventDefault();\n\n if (onCellAction) {\n onCellAction(p.node.key);\n }\n\n if (p.onAction) {\n p.onAction();\n }\n }\n }\n };\n\n const onFocus = () => {\n const s = state();\n const p = props();\n s.setFocusedKey(p.node.key);\n };\n\n const onPointerDown = () => {\n setIsPressed(true);\n };\n\n const onPointerUp = () => {\n setIsPressed(false);\n };\n\n const gridCellProps = createMemo(() => {\n const s = state();\n const p = props();\n const node = p.node;\n const tableData = getTableData(s);\n\n // Determine the role based on node type\n let role: string = \"gridcell\";\n if (node.type === \"rowheader\") {\n role = \"rowheader\";\n }\n\n const baseProps: Record<string, unknown> = {\n role,\n id:\n tableData && node.parentKey != null\n ? `${tableData.tableId}-${node.parentKey}-${node.key}`\n : undefined,\n \"aria-disabled\": isDisabled() || undefined,\n tabIndex: isFocused() ? 0 : -1,\n onClick,\n onKeyDown,\n onFocus,\n onPointerDown,\n onPointerUp,\n };\n\n // Add aria-colindex for virtualized tables\n if (p.isVirtualized && node.column != null) {\n baseProps[\"aria-colindex\"] = node.column + 1; // 1-based\n }\n\n // Add colspan if present\n if (node.colspan != null && node.colspan > 1) {\n baseProps[\"aria-colspan\"] = node.colspan;\n baseProps.colSpan = node.colspan;\n }\n\n return baseProps as JSX.HTMLAttributes<HTMLTableCellElement>;\n });\n\n return {\n get gridCellProps() {\n return gridCellProps();\n },\n get isPressed() {\n return isPressed();\n },\n };\n}\n","/**\n * createTableRowGroup - Provides accessibility for a table row group.\n * Based on @react-aria/grid/useTableRowGroup.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { AriaTableRowGroupProps, TableRowGroupAria } from \"./types\";\n\n/**\n * Creates accessibility props for a table row group (thead, tbody, tfoot).\n */\nexport function createTableRowGroup(props: Accessor<AriaTableRowGroupProps>): TableRowGroupAria {\n const rowGroupProps = createMemo(() => {\n // Access props for reactivity tracking, even though not currently used\n void props();\n\n const baseProps: Record<string, unknown> = {\n role: \"rowgroup\",\n };\n\n return baseProps as JSX.HTMLAttributes<HTMLTableSectionElement>;\n });\n\n return {\n get rowGroupProps() {\n return rowGroupProps();\n },\n };\n}\n","/**\n * createTableSelectionCheckbox - Provides accessibility for a table row selection checkbox.\n * Based on @react-aria/table/useTableSelectionCheckbox.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport { createId } from \"@proyecto-viviana/solid-stately\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria } from \"./types\";\nimport { getRowLabelledBy } from \"./utils\";\n\n/**\n * Creates accessibility props for a table row selection checkbox.\n */\nexport function createTableSelectionCheckbox<T extends object>(\n props: Accessor<AriaTableSelectionCheckboxProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n): TableSelectionCheckboxAria {\n const checkboxId = createId();\n\n const isSelected = createMemo(() => {\n const s = state();\n const p = props();\n return s.isSelected(p.key);\n });\n\n // Mirrors `useGridSelectionCheckbox`'s `!selectionManager.canSelectItem(key)`:\n // a row's checkbox is disabled when selection is off, the key is in\n // `disabledKeys`, or the row/item itself is disabled. This is broader than the\n // row's own focusability gate (which only disables under `disabledBehavior:\n // \"all\"`) — a row disabled via its `isDisabled` prop still cannot be selected,\n // so its checkbox is disabled regardless of `disabledBehavior`.\n //\n // `isRowDisabled` carries the render-time per-row `isDisabled` that this\n // data-driven port keeps on the row hook rather than the collection node\n // (surfaced via `TableRowContext`); the collection-node check below still\n // applies for any path that does populate `node.isDisabled`.\n const isDisabled = createMemo(() => {\n const s = state();\n const p = props();\n if (s.selectionMode === \"none\" || s.disabledKeys.has(p.key) || p.isRowDisabled) {\n return true;\n }\n const item = s.collection.getItem(p.key);\n return !item || !!item.isDisabled || !!item.props?.isDisabled;\n });\n\n const onChange = () => {\n const s = state();\n const p = props();\n if (!isDisabled()) {\n s.toggleSelection(p.key);\n }\n };\n\n const checkboxProps = createMemo(() => {\n const s = state();\n const p = props();\n\n const baseProps: Record<string, unknown> = {\n id: checkboxId,\n type: \"checkbox\",\n checked: isSelected(),\n disabled: isDisabled(),\n onChange,\n \"aria-label\": \"Select\",\n // Mirrors `useTableSelectionCheckbox`: the checkbox is labelled by its own\n // \"Select\" text plus the row's row-header cell(s), so screen readers read\n // \"Select Foo.pdf\" rather than a bare \"Select\".\n \"aria-labelledby\": `${checkboxId} ${getRowLabelledBy(s, p.key)}`,\n };\n\n return baseProps as JSX.InputHTMLAttributes<HTMLInputElement>;\n });\n\n return {\n get checkboxProps() {\n return checkboxProps();\n },\n };\n}\n","/**\n * createTableSelectAllCheckbox - Provides accessibility for a table select-all checkbox.\n * Based on @react-aria/table/useTableSelectAllCheckbox.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { TableSelectAllCheckboxAria } from \"./types\";\n\n/**\n * Creates accessibility props for a table select-all checkbox.\n */\nexport function createTableSelectAllCheckbox<T extends object>(\n state: Accessor<TableState<T, TableCollection<T>>>,\n): TableSelectAllCheckboxAria {\n const isSelectAll = createMemo(() => {\n const s = state();\n return s.selectedKeys === \"all\";\n });\n\n const isEmpty = createMemo(() => {\n const s = state();\n return s.collection.size === 0;\n });\n\n const isIndeterminate = createMemo(() => {\n const s = state();\n const selectedKeys = s.selectedKeys;\n if (selectedKeys === \"all\") return false;\n if (selectedKeys.size === 0) return false;\n return selectedKeys.size < s.collection.size;\n });\n\n const isDisabled = createMemo(() => {\n const s = state();\n return s.selectionMode !== \"multiple\" || isEmpty();\n });\n\n const onChange = () => {\n const s = state();\n if (!isDisabled()) {\n s.toggleSelectAll();\n }\n };\n\n const checkboxProps = createMemo(() => {\n const s = state();\n\n const baseProps: Record<string, unknown> = {\n type: \"checkbox\",\n checked: isSelectAll(),\n disabled: isDisabled(),\n onChange,\n \"aria-label\": s.selectionMode === \"single\" ? \"Select\" : \"Select All\",\n };\n\n if (isIndeterminate()) {\n baseProps[\"data-indeterminate\"] = \"true\";\n }\n\n return baseProps as JSX.InputHTMLAttributes<HTMLInputElement>;\n });\n\n return {\n get checkboxProps() {\n return checkboxProps();\n },\n get isIndeterminate() {\n return isIndeterminate();\n },\n };\n}\n","/**\n * ARIA hook for table column resize interactions.\n * Based on @react-aria/table/useTableColumnResize.\n *\n * Provides pointer-drag and keyboard-based column resizing with\n * correct ARIA attributes for screen readers.\n */\n\nimport { createSignal, createMemo, type Accessor, type JSX } from \"solid-js\";\nimport type { Key, TableColumnResizeState } from \"@proyecto-viviana/solid-stately\";\nimport { useLocale } from \"../i18n\";\n\nexport interface CreateTableColumnResizeProps {\n /** The column being resized. */\n column: { key: Key };\n /** Accessible label for the resizer. */\n \"aria-label\": string;\n /** Whether resizing is disabled. */\n isDisabled?: boolean;\n /** Called when a resize operation starts. */\n onResizeStart?: (widths: Map<Key, number>) => void;\n /** Called during resize with updated widths. */\n onResize?: (widths: Map<Key, number>) => void;\n /** Called when resize operation ends. */\n onResizeEnd?: (widths: Map<Key, number>) => void;\n}\n\nexport interface TableColumnResizeResult {\n /** Props for the visible resizer handle element (div). */\n resizerProps: JSX.HTMLAttributes<HTMLDivElement>;\n /** Props for the hidden range input (screen reader accessible). */\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n /** Whether this column is currently being resized. */\n isResizing: Accessor<boolean>;\n}\n\nconst KEYBOARD_STEP = 10; // px per arrow key press\n\n/**\n * Creates ARIA-compliant column resize behavior.\n *\n * Returns props for a visible drag handle (div) and a visually-hidden\n * range input that allows keyboard and screen-reader users to resize columns.\n */\nexport function createTableColumnResize(\n props: Accessor<CreateTableColumnResizeProps>,\n state: Accessor<TableColumnResizeState>,\n): TableColumnResizeResult {\n const getProps = () => props();\n const getState = () => state();\n const locale = useLocale();\n\n const [isPointerDragging, setIsPointerDragging] = createSignal(false);\n const [isKeyboardResizing, setIsKeyboardResizing] = createSignal(false);\n\n const isResizing = createMemo(() => getState().resizingColumn() === getProps().column.key);\n\n const isRtl = createMemo(() => {\n const l = locale();\n return l?.direction === \"rtl\";\n });\n\n // ---- Pointer (mouse/touch) drag ----\n\n let startX = 0;\n let startWidth = 0;\n\n const onPointerDown = (e: PointerEvent) => {\n if (getProps().isDisabled) return;\n e.preventDefault();\n e.stopPropagation();\n\n const key = getProps().column.key;\n startX = e.clientX;\n startWidth = getState().getColumnWidth(key);\n\n getState().startResize(key);\n getProps().onResizeStart?.(getState().columnWidths());\n setIsPointerDragging(true);\n\n const target = e.currentTarget as HTMLElement;\n target.setPointerCapture(e.pointerId);\n };\n\n const onPointerMove = (e: PointerEvent) => {\n if (!isPointerDragging()) return;\n e.preventDefault();\n\n const deltaX = e.clientX - startX;\n const direction = isRtl() ? -1 : 1;\n const newWidth = startWidth + deltaX * direction;\n\n const key = getProps().column.key;\n const widths = getState().updateResizedColumns(key, newWidth);\n getProps().onResize?.(widths);\n };\n\n const onPointerUp = (e: PointerEvent) => {\n if (!isPointerDragging()) return;\n e.preventDefault();\n setIsPointerDragging(false);\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n };\n\n // ---- Keyboard resize (on the hidden input) ----\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (getProps().isDisabled) return;\n\n const key = getProps().column.key;\n const rtlMul = isRtl() ? -1 : 1;\n\n switch (e.key) {\n case \"Enter\": {\n if (isKeyboardResizing()) {\n // End resize\n setIsKeyboardResizing(false);\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n } else {\n // Start resize\n setIsKeyboardResizing(true);\n getState().startResize(key);\n getProps().onResizeStart?.(getState().columnWidths());\n }\n e.preventDefault();\n break;\n }\n case \"Escape\": {\n if (isKeyboardResizing()) {\n setIsKeyboardResizing(false);\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n e.preventDefault();\n }\n break;\n }\n case \"Tab\": {\n if (isKeyboardResizing()) {\n setIsKeyboardResizing(false);\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n }\n // Let Tab propagate for focus management\n break;\n }\n case \"ArrowRight\": {\n if (isKeyboardResizing()) {\n const currentWidth = getState().getColumnWidth(key);\n const widths = getState().updateResizedColumns(\n key,\n currentWidth + KEYBOARD_STEP * rtlMul,\n );\n getProps().onResize?.(widths);\n e.preventDefault();\n }\n break;\n }\n case \"ArrowLeft\": {\n if (isKeyboardResizing()) {\n const currentWidth = getState().getColumnWidth(key);\n const widths = getState().updateResizedColumns(\n key,\n currentWidth - KEYBOARD_STEP * rtlMul,\n );\n getProps().onResize?.(widths);\n e.preventDefault();\n }\n break;\n }\n }\n };\n\n // Handle input change (from screen reader range slider)\n const onInputChange = (e: Event) => {\n const input = e.target as HTMLInputElement;\n const newWidth = parseFloat(input.value);\n if (isNaN(newWidth)) return;\n\n const key = getProps().column.key;\n if (!isResizing()) {\n getState().startResize(key);\n getProps().onResizeStart?.(getState().columnWidths());\n }\n\n const widths = getState().updateResizedColumns(key, newWidth);\n getProps().onResize?.(widths);\n\n // End immediately for discrete input changes\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n };\n\n // Visible resize handle props. The accessible resize control is the hidden\n // range input below, matching React Aria's ColumnResizer structure.\n const resizerProps: JSX.HTMLAttributes<HTMLDivElement> = {\n role: \"presentation\",\n tabIndex: -1,\n style: {\n \"touch-action\": \"none\",\n cursor: \"col-resize\",\n },\n onPointerDown,\n onPointerMove,\n onPointerUp,\n };\n\n // Visually hidden range input props\n const inputProps: JSX.InputHTMLAttributes<HTMLInputElement> = {\n get type() {\n return \"range\";\n },\n get tabIndex() {\n return getProps().isDisabled ? -1 : 0;\n },\n get disabled() {\n return getProps().isDisabled;\n },\n get \"aria-label\"() {\n return getProps()[\"aria-label\"];\n },\n get \"aria-orientation\"() {\n return \"horizontal\" as const;\n },\n get min() {\n return getState().getColumnMinWidth(getProps().column.key);\n },\n get max() {\n const maxW = getState().getColumnMaxWidth(getProps().column.key);\n return maxW === Infinity ? 9999 : maxW;\n },\n get value() {\n return getState().getColumnWidth(getProps().column.key);\n },\n style: {\n position: \"absolute\",\n width: \"1px\",\n height: \"1px\",\n padding: \"0\",\n margin: \"-1px\",\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n \"white-space\": \"nowrap\",\n \"border-width\": \"0\",\n },\n onKeyDown,\n onChange: onInputChange,\n };\n\n return {\n resizerProps,\n inputProps,\n isResizing,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAiBA,MAAM,2BAAW,IAAI,QAQnB;;;;AAKF,SAAgB,aAAgB,OAA0C;CACxE,OAAO,SAAS,IAAI,KAAK;AAC3B;;;;AAKA,SAAS,cAAiB,YAAgC,QAA4B;CAEpF,OAAO,CAAC,GADS,WAAW,YAAY,MACtB,CAAC,CAAC,CAAC,QAAQ,SAAS,KAAK,SAAS,UAAU,KAAK,SAAS,WAAW;AACzF;;;;AAKA,SAAS,eACP,YACA,QACA,OACoB;CAEpB,OADc,cAAc,YAAY,MAC7B,CAAC,CAAC,UAAU;AACzB;;;;AAKA,SAAS,OAAU,MAAmC;CACpD,OAAO,MAAM,SAAS,UAAU,MAAM,SAAS;AACjD;;;;AAKA,SAAS,MAAS,MAAmC;CACnD,OAAO,MAAM,SAAS;AACxB;;;;AAKA,SAAgB,YACd,OACA,OACA,KACW;CACX,MAAM,KAAK,SAAS,MAAM,CAAC,CAAC,EAAE;CAC9B,MAAM,SAAS,UAAU;CAGzB,IAAI,qBAAoF;CACxF,IAAI,gBAAgB;CACpB,IAAI,kBAAkB;CACtB,IAAI;CAGJ,MAAM,uBAAuB;EAC3B,MAAM,IAAI,MAAM;EAChB,MAAM,IAAI,MAAM;EAChB,SAAS,IAAI,GAAG;GACd,SAAS;GACT,SAAS;IACP,aAAa,EAAE;IACf,cAAc,EAAE;GAClB;GACA,uBAAuB,EAAE;GACzB,WAAW,EAAE;EACf,CAAC;CACH;CAGA,iBAAiB;EACf,eAAe;CACjB,CAAC;CAGD,aACE,SACQ,MAAM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EAC5D,SAAS,CAAC,CAAC,WAAW,MAAM;EAG5B,SAAS,CAAC,CAAC,UAAU;EACrB,SAAS,CAAC,CAAC,cAAc,SAAS,CAAC,CAAC,aAAa,CAAC;CACpD;CA0DA,OAAO;EACL,cAAA;GAtDA,MAAM;GACN,UAAU;GACV,OAAO;IACL,gBAAgB;IAChB,QAAQ;GACV;GACA;GACA;GACA;EA8CW;EACX,YAAA;GA1CA,IAAI,OAAO;IACT,OAAO;GACT;GACA,IAAI,WAAW;IACb,OAAO,SAAS,CAAC,CAAC,aAAa,KAAK;GACtC;GACA,IAAI,WAAW;IACb,OAAO,SAAS,CAAC,CAAC;GACpB;GACA,IAAI,eAAe;IACjB,OAAO,SAAS,CAAC,CAAC;GACpB;GACA,IAAI,qBAAqB;IACvB,OAAO;GACT;GACA,IAAI,MAAM;IACR,OAAO,SAAS,CAAC,CAAC,kBAAkB,SAAS,CAAC,CAAC,OAAO,GAAG;GAC3D;GACA,IAAI,MAAM;IACR,MAAM,OAAO,SAAS,CAAC,CAAC,kBAAkB,SAAS,CAAC,CAAC,OAAO,GAAG;IAC/D,OAAO,SAAS,WAAW,OAAO;GACpC;GACA,IAAI,QAAQ;IACV,OAAO,SAAS,CAAC,CAAC,eAAe,SAAS,CAAC,CAAC,OAAO,GAAG;GACxD;GACA,OAAO;IACL,UAAU;IACV,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,UAAU;IACV,MAAM;IACN,eAAe;IACf,gBAAgB;GAClB;GACA;GACA,UAAU;EAKD;EACT;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"table.js","names":["mergeProps"],"sources":["../../src/table/createTable.ts","../../src/table/createTableHeaderRow.ts","../../src/table/createTableColumnHeader.ts","../../src/table/utils.ts","../../src/table/createTableRow.ts","../../src/table/createTableCell.ts","../../src/table/createTableRowGroup.ts","../../src/table/createTableSelectionCheckbox.ts","../../src/table/createTableSelectAllCheckbox.ts","../../src/table/createTableColumnResize.ts"],"sourcesContent":["/**\n * createTable - Provides accessibility for a table component.\n * Based on @react-aria/table/useTable.\n */\n\nimport { createMemo, createEffect, on, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport { createId } from \"@proyecto-viviana/solid-stately\";\nimport type { TableState, TableCollection, Key, GridNode } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableProps, TableAria } from \"./types\";\nimport { useLocale } from \"../i18n\";\nimport { announce } from \"../live-announcer\";\nimport { createDescription } from \"../utils/createDescription\";\nimport { scrollIntoViewport } from \"../utils\";\nimport { getInteractionModality } from \"../interactions/createInteractionModality\";\n\n// Global map to store table metadata for child components\nconst tableMap = new WeakMap<\n object,\n {\n tableId: string;\n actions: { onRowAction?: (key: Key) => void; onCellAction?: (key: Key) => void };\n shouldSelectOnPressUp?: boolean;\n focusMode?: \"row\" | \"cell\";\n }\n>();\n\n/**\n * Get the table metadata for child components.\n */\nexport function getTableData<T>(state: TableState<T, TableCollection<T>>) {\n return tableMap.get(state);\n}\n\n/**\n * Helper to get cells from a row by iterating children\n */\nfunction getChildCells<T>(collection: TableCollection<T>, rowKey: Key): GridNode<T>[] {\n const children = collection.getChildren(rowKey);\n return [...children].filter((node) => node.type === \"cell\" || node.type === \"rowheader\");\n}\n\n/**\n * Helper to get cell at specific index in a row\n */\nfunction getCellAtIndex<T>(\n collection: TableCollection<T>,\n rowKey: Key,\n index: number,\n): GridNode<T> | null {\n const cells = getChildCells(collection, rowKey);\n return cells[index] ?? null;\n}\n\n/**\n * Helper to check if a node is a cell\n */\nfunction isCell<T>(node: GridNode<T> | null): boolean {\n return node?.type === \"cell\" || node?.type === \"rowheader\";\n}\n\n/**\n * Helper to check if a node is a row\n */\nfunction isRow<T>(node: GridNode<T> | null): boolean {\n return node?.type === \"item\";\n}\n\n/**\n * Creates accessibility props for a table component.\n */\nexport function createTable<T extends object>(\n props: Accessor<AriaTableProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n ref: Accessor<HTMLTableElement | null>,\n): TableAria {\n const id = createId(props().id);\n const locale = useLocale();\n\n // Track previous sort descriptor for announcements\n let prevSortDescriptor: { column: Key; direction: \"ascending\" | \"descending\" } | null = null;\n let isFirstRender = true;\n let typeaheadBuffer = \"\";\n let typeaheadTimeout: ReturnType<typeof setTimeout> | undefined;\n\n // Store metadata for child components\n const storeTableData = () => {\n const s = state();\n const p = props();\n tableMap.set(s, {\n tableId: id,\n actions: {\n onRowAction: p.onRowAction,\n onCellAction: p.onCellAction,\n },\n shouldSelectOnPressUp: p.shouldSelectOnPressUp,\n focusMode: p.focusMode,\n });\n };\n\n // Update table data whenever props/state changes\n createMemo(() => {\n storeTableData();\n });\n\n // Announce sort changes (only after initial render)\n createEffect(\n on(\n () => state().sortDescriptor,\n (sortDescriptor) => {\n if (isFirstRender) {\n isFirstRender = false;\n prevSortDescriptor = sortDescriptor;\n return;\n }\n\n if (\n sortDescriptor &&\n (sortDescriptor.column !== prevSortDescriptor?.column ||\n sortDescriptor.direction !== prevSortDescriptor?.direction)\n ) {\n const collection = state().collection;\n const column = collection.columns.find((c) => c.key === sortDescriptor.column);\n const columnName = column?.textValue ?? String(sortDescriptor.column);\n const directionText =\n sortDescriptor.direction === \"ascending\" ? \"ascending\" : \"descending\";\n\n announce(`Sorted by ${columnName}, ${directionText}`, \"assertive\", 500);\n }\n\n prevSortDescriptor = sortDescriptor;\n },\n ),\n );\n\n // Keyboard navigation handler with full 2D navigation\n const onKeyDown = (e: KeyboardEvent) => {\n const s = state();\n const collection = s.collection;\n const p = props();\n const focusMode = p.focusMode ?? \"row\";\n const isRTL = locale().direction === \"rtl\";\n const setFocusedKey = (key: Key) => {\n s.setFocusedKey(key);\n };\n const runTypeahead = (focusedKey: Key, focusedItem: GridNode<T>) => {\n if (e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) {\n return false;\n }\n\n // A leading Spacebar is a selection/action key, not the start of a type-ahead\n // search. Mirror upstream useTypeSelect (`search.length === 0 && character === ' '`)\n // and let it fall through so the focused row's own Space handler toggles selection.\n // Once a search is active, Space continues the query as normal.\n if (e.key === \" \" && typeaheadBuffer.length === 0) {\n return false;\n }\n\n typeaheadBuffer += e.key.toLocaleLowerCase();\n if (typeaheadTimeout) {\n clearTimeout(typeaheadTimeout);\n }\n typeaheadTimeout = setTimeout(() => {\n typeaheadBuffer = \"\";\n typeaheadTimeout = undefined;\n }, 500);\n\n const rows = Array.from(collection).filter((node) => !s.isDisabled(node.key));\n if (rows.length === 0) {\n return true;\n }\n\n const currentRowKey =\n isCell(focusedItem) && focusedItem.parentKey != null ? focusedItem.parentKey : focusedKey;\n const currentIndex = rows.findIndex((node) => node.key === currentRowKey);\n const orderedRows =\n currentIndex >= 0\n ? [...rows.slice(currentIndex + 1), ...rows.slice(0, currentIndex + 1)]\n : rows;\n const match = orderedRows.find((node) =>\n collection.getTextValue(node.key).toLocaleLowerCase().startsWith(typeaheadBuffer),\n );\n\n if (match) {\n e.preventDefault();\n setFocusedKey(match.key);\n }\n\n return true;\n };\n\n if (s.isKeyboardNavigationDisabled) {\n return;\n }\n\n const focusedKey = s.focusedKey;\n if (focusedKey == null) {\n // If nothing is focused, focus the first item\n if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\" || e.key === \"Home\" || e.key === \"End\") {\n const firstKey = collection.getFirstKey();\n if (firstKey != null) {\n e.preventDefault();\n setFocusedKey(firstKey);\n }\n }\n return;\n }\n\n const focusedItem = collection.getItem(focusedKey);\n if (!focusedItem) return;\n\n let nextKey: Key | null = null;\n\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault();\n // If focused on a cell, move to the same column in the next row\n if (isCell(focusedItem) && focusedItem.parentKey != null) {\n const nextRowKey = collection.getKeyAfter(focusedItem.parentKey);\n if (nextRowKey != null) {\n const cellIndex = focusedItem.index;\n const nextCell = getCellAtIndex(collection, nextRowKey, cellIndex);\n nextKey = nextCell?.key ?? nextRowKey;\n }\n } else {\n // Move to next row\n nextKey = collection.getKeyAfter(focusedKey);\n }\n break;\n }\n\n case \"ArrowUp\": {\n e.preventDefault();\n // If focused on a cell, move to the same column in the previous row\n if (isCell(focusedItem) && focusedItem.parentKey != null) {\n const prevRowKey = collection.getKeyBefore(focusedItem.parentKey);\n if (prevRowKey != null) {\n const cellIndex = focusedItem.index;\n const prevCell = getCellAtIndex(collection, prevRowKey, cellIndex);\n nextKey = prevCell?.key ?? prevRowKey;\n }\n } else {\n // Move to previous row\n nextKey = collection.getKeyBefore(focusedKey);\n }\n break;\n }\n\n case \"ArrowRight\": {\n e.preventDefault();\n const goNext = !isRTL;\n\n if (isRow(focusedItem)) {\n // If on a row, go to the first/last cell\n const cells = getChildCells(collection, focusedKey);\n if (cells.length > 0) {\n nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;\n }\n } else if (isCell(focusedItem) && focusedItem.parentKey != null) {\n // If on a cell, go to the next/prev cell\n const cells = getChildCells(collection, focusedItem.parentKey);\n const currentIndex = focusedItem.index;\n const targetIndex = goNext ? currentIndex + 1 : currentIndex - 1;\n\n if (targetIndex >= 0 && targetIndex < cells.length) {\n nextKey = cells[targetIndex].key;\n } else if (focusMode === \"row\") {\n // Wrap to row\n nextKey = focusedItem.parentKey;\n } else {\n // Wrap to first/last cell\n nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;\n }\n }\n break;\n }\n\n case \"ArrowLeft\": {\n e.preventDefault();\n const goNext = isRTL;\n\n if (isRow(focusedItem)) {\n // If on a row, go to the last/first cell\n const cells = getChildCells(collection, focusedKey);\n if (cells.length > 0) {\n nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;\n }\n } else if (isCell(focusedItem) && focusedItem.parentKey != null) {\n // If on a cell, go to the prev/next cell\n const cells = getChildCells(collection, focusedItem.parentKey);\n const currentIndex = focusedItem.index;\n const targetIndex = goNext ? currentIndex + 1 : currentIndex - 1;\n\n if (targetIndex >= 0 && targetIndex < cells.length) {\n nextKey = cells[targetIndex].key;\n } else if (focusMode === \"row\") {\n // Wrap to row\n nextKey = focusedItem.parentKey;\n } else {\n // Wrap to first/last cell\n nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;\n }\n }\n break;\n }\n\n case \"Home\": {\n e.preventDefault();\n if (e.ctrlKey) {\n // Ctrl+Home: Go to first row/cell\n const firstRowKey = collection.getFirstKey();\n if (firstRowKey != null) {\n if (isCell(focusedItem) || focusMode === \"cell\") {\n const cells = getChildCells(collection, firstRowKey);\n nextKey = cells[0]?.key ?? firstRowKey;\n } else {\n nextKey = firstRowKey;\n }\n }\n } else if (isCell(focusedItem) && focusedItem.parentKey != null) {\n // Home: Go to first cell in current row\n const cells = getChildCells(collection, focusedItem.parentKey);\n nextKey = cells[0]?.key ?? null;\n } else {\n // On row: go to first row\n nextKey = collection.getFirstKey();\n }\n break;\n }\n\n case \"End\": {\n e.preventDefault();\n if (e.ctrlKey) {\n // Ctrl+End: Go to last row/cell\n const lastRowKey = collection.getLastKey();\n if (lastRowKey != null) {\n if (isCell(focusedItem) || focusMode === \"cell\") {\n const cells = getChildCells(collection, lastRowKey);\n nextKey = cells[cells.length - 1]?.key ?? lastRowKey;\n } else {\n nextKey = lastRowKey;\n }\n }\n } else if (isCell(focusedItem) && focusedItem.parentKey != null) {\n // End: Go to last cell in current row\n const cells = getChildCells(collection, focusedItem.parentKey);\n nextKey = cells[cells.length - 1]?.key ?? null;\n } else {\n // On row: go to last row\n nextKey = collection.getLastKey();\n }\n break;\n }\n\n case \"PageDown\": {\n e.preventDefault();\n // Move down by roughly a page (using DOM measurements if available)\n const el = ref();\n if (el && el.clientHeight > 0) {\n const visibleHeight = el.clientHeight;\n let currentKey: Key | null = focusedKey;\n let traveled = 0;\n\n // If on a cell, start from the parent row\n if (isCell(focusedItem) && focusedItem.parentKey != null) {\n currentKey = focusedItem.parentKey;\n }\n\n // Move down until we've traveled approximately one page\n while (currentKey != null && traveled < visibleHeight) {\n const next = collection.getKeyAfter(currentKey);\n if (next == null) break;\n\n // Estimate row height (default to 40px if we can't measure)\n const rowElement = el.querySelector(`[data-key=\"${currentKey}\"]`);\n traveled += rowElement?.clientHeight ?? 40;\n currentKey = next;\n }\n\n if (currentKey != null) {\n // If we started on a cell, focus the same column in the new row\n if (isCell(focusedItem)) {\n const cellIndex = focusedItem.index;\n const targetCell = getCellAtIndex(collection, currentKey, cellIndex);\n nextKey = targetCell?.key ?? currentKey;\n } else {\n nextKey = currentKey;\n }\n }\n } else {\n // Fallback: move 10 rows\n let count = 10;\n let current: Key | null =\n isCell(focusedItem) && focusedItem.parentKey != null\n ? focusedItem.parentKey\n : focusedKey;\n while (count > 0 && current != null) {\n const next = collection.getKeyAfter(current);\n if (next == null) break;\n current = next;\n count--;\n }\n if (current != null && isCell(focusedItem)) {\n const targetCell = getCellAtIndex(collection, current, focusedItem.index);\n nextKey = targetCell?.key ?? current;\n } else {\n nextKey = current;\n }\n }\n break;\n }\n\n case \"PageUp\": {\n e.preventDefault();\n // Move up by roughly a page\n const el = ref();\n if (el && el.clientHeight > 0) {\n const visibleHeight = el.clientHeight;\n let currentKey: Key | null = focusedKey;\n let traveled = 0;\n\n // If on a cell, start from the parent row\n if (isCell(focusedItem) && focusedItem.parentKey != null) {\n currentKey = focusedItem.parentKey;\n }\n\n // Move up until we've traveled approximately one page\n while (currentKey != null && traveled < visibleHeight) {\n const prev = collection.getKeyBefore(currentKey);\n if (prev == null) break;\n\n const rowElement = el.querySelector(`[data-key=\"${currentKey}\"]`);\n traveled += rowElement?.clientHeight ?? 40;\n currentKey = prev;\n }\n\n if (currentKey != null) {\n if (isCell(focusedItem)) {\n const cellIndex = focusedItem.index;\n const targetCell = getCellAtIndex(collection, currentKey, cellIndex);\n nextKey = targetCell?.key ?? currentKey;\n } else {\n nextKey = currentKey;\n }\n }\n } else {\n // Fallback: move 10 rows\n let count = 10;\n let current: Key | null =\n isCell(focusedItem) && focusedItem.parentKey != null\n ? focusedItem.parentKey\n : focusedKey;\n while (count > 0 && current != null) {\n const prev = collection.getKeyBefore(current);\n if (prev == null) break;\n current = prev;\n count--;\n }\n if (current != null && isCell(focusedItem)) {\n const targetCell = getCellAtIndex(collection, current, focusedItem.index);\n nextKey = targetCell?.key ?? current;\n } else {\n nextKey = current;\n }\n }\n break;\n }\n\n case \"Escape\":\n if (p.escapeKeyBehavior !== \"none\") {\n s.clearSelection();\n }\n return;\n\n case \"a\":\n if (e.ctrlKey || e.metaKey) {\n e.preventDefault();\n if (s.selectionMode === \"multiple\") {\n s.selectAll();\n }\n }\n return;\n\n // NOTE: Space/Enter selection is intentionally NOT handled here. Upstream\n // useSelectableCollection has no ' '/Enter case — keyboard selection is owned\n // by the row (useSelectableItem, ported in createTableRow). Handling it here too\n // double-toggled the selection (row toggles on, grid toggles back off → no-op),\n // since the row handler does not stop propagation. Space/Enter fall through to\n // the type-ahead path below, which ignores a leading Space and bails on Enter.\n\n default:\n if (runTypeahead(focusedKey, focusedItem)) {\n return;\n }\n return;\n }\n\n if (nextKey != null) {\n setFocusedKey(nextKey);\n\n // Handle shift+arrow for range selection\n if (e.shiftKey && s.selectionMode === \"multiple\") {\n // For cells, select the parent row\n const focusedNode = collection.getItem(nextKey);\n const keyToSelect =\n focusedNode && isCell(focusedNode) && focusedNode.parentKey != null\n ? focusedNode.parentKey\n : nextKey;\n s.extendSelection(keyToSelect);\n }\n }\n };\n\n // Focus handling\n const onFocus = (e: FocusEvent) => {\n const s = state();\n const el = ref();\n\n if (!el?.contains(e.target as Element)) {\n return;\n }\n\n if (!s.isFocused) {\n s.setFocused(true);\n\n // If no key is focused, focus the first one\n if (s.focusedKey == null) {\n const firstKey = s.collection.getFirstKey();\n if (firstKey != null) {\n s.setFocusedKey(firstKey);\n }\n }\n }\n };\n\n const onBlur = (e: FocusEvent) => {\n const s = state();\n const el = ref();\n\n // Only blur if focus is leaving the table entirely\n if (el && !el.contains(e.relatedTarget as Element)) {\n s.setFocused(false);\n }\n };\n\n // Mirror React Aria's useSelectableCollection: once the roving tabindex for\n // the focused key has been committed to the DOM, move browser focus onto that\n // element from a post-commit effect — looking it up by its stable data-key\n // rather than by transient tabindex. Doing this imperatively during the key\n // handler (in a microtask) raced Solid's reconciliation and dropped focus to\n // <body>, so Space/Enter never reached the grid's selection handler.\n createEffect(() => {\n const s = state();\n const key = s.focusedKey;\n const el = ref();\n if (!el || key == null) {\n return;\n }\n\n // Only manage focus while it already lives inside the table — i.e. the user\n // is navigating with the keyboard. We gate on the *physical* position of\n // browser focus rather than the grid's logical `isFocused` signal: focus can\n // land directly on a row (a pointer click, or programmatic row focus) without\n // ever firing the grid's own non-bubbling focus handler, so `isFocused` stays\n // false even though the table genuinely holds focus. The contains() check is\n // also what keeps us from pulling focus back from elsewhere on the page when\n // the focused key changes from a background interaction.\n const active = document.activeElement;\n if (!active || (active !== el && !el.contains(active))) {\n return;\n }\n\n const target = el.querySelector<HTMLElement>(`[data-key=\"${key}\"]`);\n if (target && target !== active) {\n target.focus();\n\n // Reveal the newly focused row/cell when navigating with the keyboard,\n // mirroring useSelectableCollection. Pointer-driven focus changes should\n // not shift the scroll position under the user's finger.\n if (getInteractionModality() !== \"pointer\") {\n scrollIntoViewport(target, { containingElement: el });\n }\n }\n });\n\n // Warn if no label is provided\n createMemo(() => {\n const p = props();\n if (!p[\"aria-label\"] && !p[\"aria-labelledby\"]) {\n console.warn(\"Table: An aria-label or aria-labelledby prop is required for accessibility.\");\n }\n });\n\n // A sorted table exposes a persistent sort description on the grid (\"sorted by\n // column {name} in {direction} order\"), mirroring `useTable`'s\n // `useDescription(sortDescription)` — separate from the transient live-region\n // announcement above. `columnName` follows upstream exactly\n // (`columns.find(c => c.key === column)?.textValue ?? ''`) so a header with no\n // plain-text value yields an empty name, matching the S2 oracle.\n const sortDescription = () => {\n const s = state();\n const descriptor = s.sortDescriptor;\n const column = descriptor?.column;\n const direction = descriptor?.direction;\n if (!direction || column == null) {\n return undefined;\n }\n const columnName = s.collection.columns.find((c) => c.key === column)?.textValue ?? \"\";\n return `sorted by column ${columnName} in ${direction} order`;\n };\n const sortDescriptionProps = createDescription(sortDescription);\n\n const gridProps = createMemo(() => {\n const p = props();\n const s = state();\n\n const describedBy =\n [sortDescriptionProps[\"aria-describedby\"], p[\"aria-describedby\"]].filter(Boolean).join(\" \") ||\n undefined;\n\n const baseProps: Record<string, unknown> = {\n role: \"grid\",\n id,\n \"aria-label\": p[\"aria-label\"],\n \"aria-labelledby\": p[\"aria-labelledby\"],\n \"aria-describedby\": describedBy,\n \"aria-multiselectable\": s.selectionMode === \"multiple\" ? \"true\" : undefined,\n // Keep the grid itself tabbable so keyboard users can enter\n // row/cell navigation without requiring a prior pointer interaction.\n tabIndex: 0,\n onKeyDown,\n onFocus,\n onBlur,\n };\n\n if (p.isVirtualized) {\n baseProps[\"aria-rowcount\"] = s.collection.rowCount;\n baseProps[\"aria-colcount\"] = s.collection.columnCount;\n }\n\n return baseProps as JSX.HTMLAttributes<HTMLTableElement>;\n });\n\n return {\n get gridProps() {\n return gridProps();\n },\n };\n}\n","/**\n * createTableHeaderRow - Provides accessibility for a table header row.\n * Based on @react-aria/table/useTableHeaderRow.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableHeaderRowProps, TableHeaderRowAria } from \"./types\";\n\n/**\n * Creates accessibility props for a table header row.\n */\nexport function createTableHeaderRow<T extends object>(\n props: Accessor<AriaTableHeaderRowProps>,\n _state: Accessor<TableState<T, TableCollection<T>>>,\n _ref: Accessor<HTMLTableRowElement | null>,\n): TableHeaderRowAria {\n const rowProps = createMemo(() => {\n const p = props();\n const node = p.node;\n\n const baseProps: Record<string, unknown> = {\n role: \"row\",\n };\n\n // Add aria-rowindex for virtualized tables\n if (p.isVirtualized && node.rowIndex != null) {\n baseProps[\"aria-rowindex\"] = node.rowIndex + 1; // 1-based\n }\n\n return baseProps as JSX.HTMLAttributes<HTMLTableRowElement>;\n });\n\n return {\n get rowProps() {\n return rowProps();\n },\n };\n}\n","/**\n * createTableColumnHeader - Provides accessibility for a table column header.\n * Based on @react-aria/table/useTableColumnHeader.\n */\n\nimport { createMemo, createSignal, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableColumnHeaderProps, TableColumnHeaderAria } from \"./types\";\nimport { getTableData } from \"./createTable\";\nimport { createDescription } from \"../utils/createDescription\";\n\n/**\n * Creates accessibility props for a table column header.\n */\nexport function createTableColumnHeader<T extends object>(\n props: Accessor<AriaTableColumnHeaderProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n _ref: Accessor<HTMLTableCellElement | null>,\n): TableColumnHeaderAria {\n const [isPressed, setIsPressed] = createSignal(false);\n let ignoreNextClick = false;\n let ignoreNextClickTimeout: ReturnType<typeof setTimeout> | undefined;\n\n const isFocused = createMemo(() => {\n const s = state();\n const p = props();\n return s.focusedKey === p.node.key;\n });\n\n // A sortable column header is described as \"sortable column\" — mirrors\n // `useTableColumnHeader`'s `useDescription(stringFormatter.format('sortable'))`.\n // Backed by a shared hidden element (ref-counted) and referenced via\n // aria-describedby.\n const sortDescriptionProps = createDescription(() =>\n props().allowsSorting ? \"sortable column\" : undefined,\n );\n\n const sortColumn = () => {\n const s = state();\n const p = props();\n\n if (p.allowsSorting) {\n s.sort(p.node.key);\n }\n };\n\n const clearPendingClickIgnore = () => {\n if (ignoreNextClickTimeout != null) {\n clearTimeout(ignoreNextClickTimeout);\n ignoreNextClickTimeout = undefined;\n }\n };\n\n const ignorePointerGeneratedClick = () => {\n clearPendingClickIgnore();\n ignoreNextClick = true;\n ignoreNextClickTimeout = setTimeout(() => {\n ignoreNextClick = false;\n ignoreNextClickTimeout = undefined;\n }, 0);\n };\n\n // Handle click for sorting. Pointer activation is handled on pointerup because\n // focusing the table header can re-render its child content before a native\n // click is dispatched.\n const onClick = () => {\n if (ignoreNextClick) {\n ignoreNextClick = false;\n clearPendingClickIgnore();\n return;\n }\n\n sortColumn();\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const p = props();\n\n if (\n p.allowsSorting &&\n (e.key === \"Enter\" || e.key === \" \" || e.key === \"Space\" || e.key === \"Spacebar\")\n ) {\n e.preventDefault();\n sortColumn();\n }\n };\n\n const onFocus = () => {\n const s = state();\n const p = props();\n s.setFocusedKey(p.node.key);\n };\n\n const onPointerDown = (e: PointerEvent) => {\n if (e.button !== 0) {\n return;\n }\n\n setIsPressed(true);\n };\n\n const onPointerUp = () => {\n if (isPressed()) {\n ignorePointerGeneratedClick();\n sortColumn();\n }\n\n setIsPressed(false);\n };\n\n const onPointerCancel = () => {\n setIsPressed(false);\n };\n\n const columnHeaderProps = createMemo(() => {\n const s = state();\n const p = props();\n const node = p.node;\n const tableData = getTableData(s);\n\n // Determine sort state\n let ariaSort: \"none\" | \"ascending\" | \"descending\" | undefined = undefined;\n if (p.allowsSorting) {\n const sortDescriptor = s.sortDescriptor;\n if (sortDescriptor?.column === node.key) {\n ariaSort = sortDescriptor.direction;\n } else {\n ariaSort = \"none\";\n }\n }\n\n const baseProps: Record<string, unknown> = {\n role: \"columnheader\",\n id: tableData ? `${tableData.tableId}-${node.key}` : undefined,\n \"aria-sort\": ariaSort,\n \"aria-describedby\": sortDescriptionProps[\"aria-describedby\"],\n tabIndex: isFocused() ? 0 : -1,\n onFocus,\n };\n\n // Add click handler if sortable\n if (p.allowsSorting) {\n baseProps.onClick = onClick;\n baseProps.onKeyDown = onKeyDown;\n baseProps.onPointerDown = onPointerDown;\n baseProps.onPointerUp = onPointerUp;\n baseProps.onPointerCancel = onPointerCancel;\n baseProps.onPointerLeave = onPointerCancel;\n baseProps.style = { cursor: \"pointer\" };\n }\n\n // Add aria-colindex for virtualized tables\n if (p.isVirtualized && node.column != null) {\n baseProps[\"aria-colindex\"] = node.column + 1; // 1-based\n }\n\n // Add colspan if present\n if (node.colspan != null && node.colspan > 1) {\n baseProps[\"aria-colspan\"] = node.colspan;\n baseProps.colSpan = node.colspan;\n }\n\n return baseProps as JSX.HTMLAttributes<HTMLTableCellElement>;\n });\n\n return {\n get columnHeaderProps() {\n return columnHeaderProps();\n },\n };\n}\n","/**\n * Table accessibility id helpers.\n * Port of @react-aria/table/utils (`getRowLabelledBy` / cell id derivation).\n */\n\nimport type { Key, GridNode, TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport { getTableData } from \"./createTable\";\n\n/**\n * A row is labelled by its row-header cells. Mirrors `@react-aria/table`'s\n * `getRowLabelledBy`, which joins `getCellId(state, rowKey, columnKey)` across\n * `collection.rowHeaderColumnKeys`. We resolve the actual rowheader cell node\n * and rebuild the exact id string `createTableCell` puts on the element\n * (`${tableId}-${parentKey}-${cellKey}`) so the reference always matches a real\n * element, regardless of the cell-key scheme.\n */\nexport function getRowLabelledBy<T extends object>(\n state: TableState<T, TableCollection<T>>,\n rowKey: Key,\n): string {\n const tableData = getTableData(state);\n const tableId = tableData?.tableId ?? \"table\";\n const collection = state.collection as TableCollection<T> & {\n getCell?: (rowKey: Key, columnKey: Key) => GridNode<T> | null;\n };\n\n return [...collection.rowHeaderColumnKeys]\n .map((columnKey) => {\n const cell = collection.getCell?.(rowKey, columnKey);\n return cell?.parentKey != null\n ? `${tableId}-${String(cell.parentKey)}-${String(cell.key)}`\n : null;\n })\n .filter((id): id is string => id != null)\n .join(\" \");\n}\n","/**\n * createTableRow - Provides accessibility for a table row.\n * Based on @react-aria/table/useTableRow.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type {\n Collection,\n Key,\n Selection,\n TableState,\n TableCollection,\n} from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableRowProps, TableRowAria, ExpandButtonProps } from \"./types\";\nimport { getTableData } from \"./createTable\";\nimport { getRowLabelledBy } from \"./utils\";\nimport { useLocale } from \"../i18n\";\nimport { createSelectableItem, type SelectableItemState } from \"../selection/createSelectableItem\";\nimport { mergeProps } from \"../utils/mergeProps\";\n\n/**\n * Arrow keys that expand/collapse a tree-grid row, mirroring `@react-aria/table`.\n * Direction is flipped under RTL.\n */\nconst EXPANSION_KEYS = {\n expand: { ltr: \"ArrowRight\", rtl: \"ArrowLeft\" },\n collapse: { ltr: \"ArrowLeft\", rtl: \"ArrowRight\" },\n} as const;\n\n/**\n * Creates accessibility props for a table row.\n */\nexport function createTableRow<T extends object>(\n props: Accessor<AriaTableRowProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n ref: Accessor<HTMLTableRowElement | null>,\n): TableRowAria {\n const locale = useLocale();\n\n // Tree-grid (expandable rows): only active when the collection has a tree column.\n const isTreeRow = createMemo(() => state().treeColumn != null);\n\n const hasChildRows = createMemo(() => props().node.isExpandable ?? false);\n\n const isExpanded = createMemo(() => {\n const s = state();\n if (s.treeColumn == null) return false;\n return s.expandedKeys === \"all\" || s.expandedKeys.has(props().node.key);\n });\n\n // aria-posinset / aria-setsize among same-level sibling rows.\n const siblingInfo = createMemo(() => {\n const s = state();\n const node = props().node;\n if (node.parentKey != null) {\n const parent = s.collection.getItem(node.parentKey);\n if (parent) {\n const siblings = parent.childNodes.filter((n) => n.type === \"item\");\n return { posinset: node.index + 1, setsize: siblings.length };\n }\n }\n const rootRows = s.collection.body.childNodes.filter((n) => n.type === \"item\");\n const rootIndex = rootRows.findIndex((n) => n.key === node.key);\n return {\n posinset: rootIndex >= 0 ? rootIndex + 1 : node.index + 1,\n setsize: rootRows.length,\n };\n });\n\n const isSelected = createMemo(() => {\n const s = state();\n const p = props();\n return s.isSelected(p.node.key);\n });\n\n const selectableState: SelectableItemState<T> = {\n collection: () => state().collection as unknown as Collection<T>,\n isFocused: () => state().isFocused,\n setFocused: (focused: boolean) => state().setFocused(focused),\n focusedKey: () => state().focusedKey,\n childFocusStrategy: () => state().childFocusStrategy,\n setFocusedKey: (key: Key | null, strategy) => state().setFocusedKey(key, strategy),\n selectionMode: () => state().selectionMode,\n selectionBehavior: () => state().selectionBehavior,\n disallowEmptySelection: () => state().disallowEmptySelection,\n selectedKeys: () => state().selectedKeys as Selection,\n disabledKeys: () => state().disabledKeys,\n disabledBehavior: () => state().disabledBehavior,\n isEmpty: () => {\n const keys = state().selectedKeys;\n return keys !== \"all\" && keys.size === 0;\n },\n isSelectAll: () => state().selectedKeys === \"all\",\n isSelected: (key: Key) => state().isSelected(key),\n isDisabled: (key: Key) => {\n const s = state();\n const item = s.collection.getItem(key);\n return (\n s.disabledBehavior === \"all\" &&\n s.isDisabled(key) &&\n item?.props?.disabledBehavior !== \"selection\"\n );\n },\n canSelectItem: (key: Key) => {\n const s = state();\n return s.selectionMode !== \"none\" && !s.isDisabled(key);\n },\n setSelectionBehavior: (behavior) => state().setSelectionBehavior(behavior),\n toggleSelection: (key: Key) => state().toggleSelection(key),\n replaceSelection: (key: Key) => state().replaceSelection(key),\n setSelectedKeys: (keys: Iterable<Key>) => state().setSelectedKeys(keys),\n selectAll: () => state().selectAll(),\n clearSelection: () => state().clearSelection(),\n toggleSelectAll: () => state().toggleSelectAll(),\n extendSelection: (toKey: Key, _collection: Collection<T>) => state().extendSelection(toKey),\n };\n\n const selectableItem = createSelectableItem<T>(\n () => {\n const s = state();\n const p = props();\n const tableData = getTableData(s);\n const onRowAction = tableData?.actions.onRowAction;\n const hasAction = !!p.onAction || !!onRowAction || !!p.href;\n\n return {\n key: p.node.key,\n id: `${tableData?.tableId ?? \"table\"}-row-${String(p.node.key)}`,\n isVirtualized: p.isVirtualized,\n shouldSelectOnPressUp: tableData?.shouldSelectOnPressUp ?? false,\n isDisabled: !!p.isDisabled || s.collection.size === 0,\n onAction: hasAction\n ? (event) => {\n p.onAction?.();\n onRowAction?.(p.node.key);\n if (p.href) {\n p.onLinkAction?.(event);\n }\n }\n : undefined,\n };\n },\n selectableState,\n ref,\n );\n\n const isDisabled = () => selectableItem.isDisabled();\n\n const onTreeGridKeyDown = (e: KeyboardEvent) => {\n const s = state();\n const p = props();\n\n if (isDisabled()) return;\n\n // Tree-grid expand/collapse with Left/Right arrows (flipped under RTL). Handled before\n // selection/navigation; stopping propagation prevents the grid's arrow navigation when\n // expansion consumes the key.\n if (s.treeColumn != null) {\n const direction = locale().direction === \"rtl\" ? \"rtl\" : \"ltr\";\n const key = p.node.key;\n const expanded = s.expandedKeys;\n if (\n e.key === EXPANSION_KEYS.expand[direction] &&\n s.focusedKey === key &&\n hasChildRows() &&\n expanded !== \"all\" &&\n !expanded.has(key)\n ) {\n s.toggleKey(key);\n e.stopPropagation();\n return;\n } else if (e.key === EXPANSION_KEYS.collapse[direction] && s.focusedKey === key) {\n if (expanded !== \"all\") {\n if (hasChildRows() && expanded.has(key)) {\n s.toggleKey(key);\n e.stopPropagation();\n return;\n } else if (!expanded.has(key) && p.node.parentKey != null && p.node.level > 0) {\n // Leaf or already-collapsed row: move focus to the parent row.\n s.setFocusedKey(p.node.parentKey);\n e.stopPropagation();\n return;\n }\n } else {\n s.toggleKey(key);\n e.stopPropagation();\n return;\n }\n }\n }\n };\n\n const rowProps = createMemo(() => {\n const s = state();\n const p = props();\n const node = p.node;\n\n const baseProps: Record<string, unknown> = {\n role: \"row\",\n \"aria-selected\": s.selectionMode !== \"none\" ? isSelected() : undefined,\n \"aria-disabled\": isDisabled() || undefined,\n };\n\n // A row is labelled by its row-header cell(s) — mirrors `useTableRow`'s\n // `'aria-labelledby': getRowLabelledBy(state, node.key)`. Without it the\n // browser falls back to concatenating every cell (incl. the selection\n // checkbox), so the row's accessible name reads \"Select Foo.pdf PDF …\".\n const labelledBy = getRowLabelledBy(s, node.key);\n if (labelledBy) {\n baseProps[\"aria-labelledby\"] = labelledBy;\n }\n\n // Tree-grid rows expose their nesting depth, position and expansion state.\n if (s.treeColumn != null) {\n const { posinset, setsize } = siblingInfo();\n baseProps[\"aria-expanded\"] = hasChildRows() ? isExpanded() : undefined;\n baseProps[\"aria-level\"] = node.level + 1; // 1-based\n baseProps[\"aria-posinset\"] = posinset;\n baseProps[\"aria-setsize\"] = setsize;\n baseProps.onKeyDown = onTreeGridKeyDown;\n }\n\n // Add aria-rowindex for virtualized tables. Tree grids omit it (matches upstream).\n if (p.isVirtualized && s.treeColumn == null && node.rowIndex != null) {\n baseProps[\"aria-rowindex\"] = node.rowIndex + 1; // 1-based\n }\n\n return mergeProps<JSX.HTMLAttributes<HTMLTableRowElement>>(\n selectableItem.itemProps as unknown as JSX.HTMLAttributes<HTMLTableRowElement>,\n baseProps,\n );\n });\n\n // Chevron button for expanding/collapsing a tree-grid row. Press-based so it flows through\n // our Button's `createPress`, and excluded from the tab order — reached via the row's\n // Left/Right arrow keys instead. Mirrors `@react-aria/table`'s `expandButtonProps`; whether a\n // chevron renders for a leaf row is the consumer's call (gate on `hasChildItems`), matching S2.\n const onExpandPress = () => {\n const s = state();\n const p = props();\n if (isDisabled()) return;\n s.toggleKey(p.node.key);\n s.setFocused(true);\n s.setFocusedKey(p.node.key);\n };\n\n const expandButtonProps = createMemo<ExpandButtonProps>(() => ({\n isDisabled: isDisabled(),\n onPress: onExpandPress,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n \"data-react-aria-prevent-focus\": true,\n \"aria-label\": isExpanded() ? \"Collapse\" : \"Expand\",\n }));\n\n return {\n get rowProps() {\n return rowProps();\n },\n get expandButtonProps() {\n return expandButtonProps();\n },\n get isSelected() {\n return isSelected();\n },\n get isDisabled() {\n return isDisabled();\n },\n get isPressed() {\n return selectableItem.isPressed();\n },\n get isExpanded() {\n return isExpanded();\n },\n get hasChildRows() {\n return hasChildRows();\n },\n };\n}\n","/**\n * createTableCell - Provides accessibility for a table cell.\n * Based on @react-aria/table/useTableCell.\n */\n\nimport { createMemo, createSignal, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableCellProps, TableCellAria } from \"./types\";\nimport { getTableData } from \"./createTable\";\n\n/**\n * Creates accessibility props for a table cell.\n */\nexport function createTableCell<T extends object>(\n props: Accessor<AriaTableCellProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n _ref: Accessor<HTMLTableCellElement | null>,\n): TableCellAria {\n const [isPressed, setIsPressed] = createSignal(false);\n\n const isDisabled = createMemo(() => {\n const s = state();\n const p = props();\n // Check if parent row is disabled\n const node = p.node;\n if (node.parentKey != null) {\n return s.isDisabled(node.parentKey);\n }\n return false;\n });\n\n const isFocused = createMemo(() => {\n const s = state();\n const p = props();\n return s.focusedKey === p.node.key;\n });\n\n // Handle click for cell actions\n const onClick = () => {\n const s = state();\n const p = props();\n\n if (isDisabled()) return;\n\n // Get table metadata for actions\n const tableData = getTableData(s);\n const onCellAction = tableData?.actions.onCellAction;\n\n // Call cell action handler\n if (onCellAction) {\n onCellAction(p.node.key);\n }\n\n if (p.onAction) {\n p.onAction();\n }\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const s = state();\n const p = props();\n\n if (isDisabled()) return;\n\n // Enter triggers cell action\n if (e.key === \"Enter\") {\n const tableData = getTableData(s);\n const onCellAction = tableData?.actions.onCellAction;\n\n if (onCellAction || p.onAction) {\n e.preventDefault();\n\n if (onCellAction) {\n onCellAction(p.node.key);\n }\n\n if (p.onAction) {\n p.onAction();\n }\n }\n }\n };\n\n const onFocus = () => {\n const s = state();\n const p = props();\n s.setFocusedKey(p.node.key);\n };\n\n const onPointerDown = () => {\n setIsPressed(true);\n };\n\n const onPointerUp = () => {\n setIsPressed(false);\n };\n\n const gridCellProps = createMemo(() => {\n const s = state();\n const p = props();\n const node = p.node;\n const tableData = getTableData(s);\n\n // Determine the role based on node type\n let role: string = \"gridcell\";\n if (node.type === \"rowheader\") {\n role = \"rowheader\";\n }\n\n const baseProps: Record<string, unknown> = {\n role,\n id:\n tableData && node.parentKey != null\n ? `${tableData.tableId}-${node.parentKey}-${node.key}`\n : undefined,\n \"aria-disabled\": isDisabled() || undefined,\n tabIndex: isFocused() ? 0 : -1,\n onClick,\n onKeyDown,\n onFocus,\n onPointerDown,\n onPointerUp,\n };\n\n // Add aria-colindex for virtualized tables\n if (p.isVirtualized && node.column != null) {\n baseProps[\"aria-colindex\"] = node.column + 1; // 1-based\n }\n\n // Add colspan if present\n if (node.colspan != null && node.colspan > 1) {\n baseProps[\"aria-colspan\"] = node.colspan;\n baseProps.colSpan = node.colspan;\n }\n\n return baseProps as JSX.HTMLAttributes<HTMLTableCellElement>;\n });\n\n return {\n get gridCellProps() {\n return gridCellProps();\n },\n get isPressed() {\n return isPressed();\n },\n };\n}\n","/**\n * createTableRowGroup - Provides accessibility for a table row group.\n * Based on @react-aria/grid/useTableRowGroup.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { AriaTableRowGroupProps, TableRowGroupAria } from \"./types\";\n\n/**\n * Creates accessibility props for a table row group (thead, tbody, tfoot).\n */\nexport function createTableRowGroup(props: Accessor<AriaTableRowGroupProps>): TableRowGroupAria {\n const rowGroupProps = createMemo(() => {\n // Access props for reactivity tracking, even though not currently used\n void props();\n\n const baseProps: Record<string, unknown> = {\n role: \"rowgroup\",\n };\n\n return baseProps as JSX.HTMLAttributes<HTMLTableSectionElement>;\n });\n\n return {\n get rowGroupProps() {\n return rowGroupProps();\n },\n };\n}\n","/**\n * createTableSelectionCheckbox - Provides accessibility for a table row selection checkbox.\n * Based on @react-aria/table/useTableSelectionCheckbox.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport { createId } from \"@proyecto-viviana/solid-stately\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria } from \"./types\";\nimport { getRowLabelledBy } from \"./utils\";\n\n/**\n * Creates accessibility props for a table row selection checkbox.\n */\nexport function createTableSelectionCheckbox<T extends object>(\n props: Accessor<AriaTableSelectionCheckboxProps>,\n state: Accessor<TableState<T, TableCollection<T>>>,\n): TableSelectionCheckboxAria {\n const checkboxId = createId();\n\n const isSelected = createMemo(() => {\n const s = state();\n const p = props();\n return s.isSelected(p.key);\n });\n\n // Mirrors `useGridSelectionCheckbox`'s `!selectionManager.canSelectItem(key)`:\n // a row's checkbox is disabled when selection is off, the key is in\n // `disabledKeys`, or the row/item itself is disabled. This is broader than the\n // row's own focusability gate (which only disables under `disabledBehavior:\n // \"all\"`) — a row disabled via its `isDisabled` prop still cannot be selected,\n // so its checkbox is disabled regardless of `disabledBehavior`.\n //\n // `isRowDisabled` carries the render-time per-row `isDisabled` that this\n // data-driven port keeps on the row hook rather than the collection node\n // (surfaced via `TableRowContext`); the collection-node check below still\n // applies for any path that does populate `node.isDisabled`.\n const isDisabled = createMemo(() => {\n const s = state();\n const p = props();\n if (s.selectionMode === \"none\" || s.disabledKeys.has(p.key) || p.isRowDisabled) {\n return true;\n }\n const item = s.collection.getItem(p.key);\n return !item || !!item.isDisabled || !!item.props?.isDisabled;\n });\n\n const onChange = () => {\n const s = state();\n const p = props();\n if (!isDisabled()) {\n s.toggleSelection(p.key);\n }\n };\n\n const checkboxProps = createMemo(() => {\n const s = state();\n const p = props();\n\n const baseProps: Record<string, unknown> = {\n id: checkboxId,\n type: \"checkbox\",\n checked: isSelected(),\n disabled: isDisabled(),\n onChange,\n \"aria-label\": \"Select\",\n // Mirrors `useTableSelectionCheckbox`: the checkbox is labelled by its own\n // \"Select\" text plus the row's row-header cell(s), so screen readers read\n // \"Select Foo.pdf\" rather than a bare \"Select\".\n \"aria-labelledby\": `${checkboxId} ${getRowLabelledBy(s, p.key)}`,\n };\n\n return baseProps as JSX.InputHTMLAttributes<HTMLInputElement>;\n });\n\n return {\n get checkboxProps() {\n return checkboxProps();\n },\n };\n}\n","/**\n * createTableSelectAllCheckbox - Provides accessibility for a table select-all checkbox.\n * Based on @react-aria/table/useTableSelectAllCheckbox.\n */\n\nimport { createMemo, type Accessor } from \"solid-js\";\nimport type { JSX } from \"solid-js\";\nimport type { TableState, TableCollection } from \"@proyecto-viviana/solid-stately\";\nimport type { TableSelectAllCheckboxAria } from \"./types\";\n\n/**\n * Creates accessibility props for a table select-all checkbox.\n */\nexport function createTableSelectAllCheckbox<T extends object>(\n state: Accessor<TableState<T, TableCollection<T>>>,\n): TableSelectAllCheckboxAria {\n const isSelectAll = createMemo(() => {\n const s = state();\n return s.selectedKeys === \"all\";\n });\n\n const isEmpty = createMemo(() => {\n const s = state();\n return s.collection.size === 0;\n });\n\n const isIndeterminate = createMemo(() => {\n const s = state();\n const selectedKeys = s.selectedKeys;\n if (selectedKeys === \"all\") return false;\n if (selectedKeys.size === 0) return false;\n return selectedKeys.size < s.collection.size;\n });\n\n const isDisabled = createMemo(() => {\n const s = state();\n return s.selectionMode !== \"multiple\" || isEmpty();\n });\n\n const onChange = () => {\n const s = state();\n if (!isDisabled()) {\n s.toggleSelectAll();\n }\n };\n\n const checkboxProps = createMemo(() => {\n const s = state();\n\n const baseProps: Record<string, unknown> = {\n type: \"checkbox\",\n checked: isSelectAll(),\n disabled: isDisabled(),\n onChange,\n \"aria-label\": s.selectionMode === \"single\" ? \"Select\" : \"Select All\",\n };\n\n if (isIndeterminate()) {\n baseProps[\"data-indeterminate\"] = \"true\";\n }\n\n return baseProps as JSX.InputHTMLAttributes<HTMLInputElement>;\n });\n\n return {\n get checkboxProps() {\n return checkboxProps();\n },\n get isIndeterminate() {\n return isIndeterminate();\n },\n };\n}\n","/**\n * ARIA hook for table column resize interactions.\n * Based on @react-aria/table/useTableColumnResize.\n *\n * Provides pointer-drag and keyboard-based column resizing with\n * correct ARIA attributes for screen readers.\n */\n\nimport { createSignal, createMemo, type Accessor, type JSX } from \"solid-js\";\nimport type { Key, TableColumnResizeState } from \"@proyecto-viviana/solid-stately\";\nimport { useLocale } from \"../i18n\";\n\nexport interface CreateTableColumnResizeProps {\n /** The column being resized. */\n column: { key: Key };\n /** Accessible label for the resizer. */\n \"aria-label\": string;\n /** Whether resizing is disabled. */\n isDisabled?: boolean;\n /** Called when a resize operation starts. */\n onResizeStart?: (widths: Map<Key, number>) => void;\n /** Called during resize with updated widths. */\n onResize?: (widths: Map<Key, number>) => void;\n /** Called when resize operation ends. */\n onResizeEnd?: (widths: Map<Key, number>) => void;\n}\n\nexport interface TableColumnResizeResult {\n /** Props for the visible resizer handle element (div). */\n resizerProps: JSX.HTMLAttributes<HTMLDivElement>;\n /** Props for the hidden range input (screen reader accessible). */\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n /** Whether this column is currently being resized. */\n isResizing: Accessor<boolean>;\n}\n\nconst KEYBOARD_STEP = 10; // px per arrow key press\n\n/**\n * Creates ARIA-compliant column resize behavior.\n *\n * Returns props for a visible drag handle (div) and a visually-hidden\n * range input that allows keyboard and screen-reader users to resize columns.\n */\nexport function createTableColumnResize(\n props: Accessor<CreateTableColumnResizeProps>,\n state: Accessor<TableColumnResizeState>,\n): TableColumnResizeResult {\n const getProps = () => props();\n const getState = () => state();\n const locale = useLocale();\n\n const [isPointerDragging, setIsPointerDragging] = createSignal(false);\n const [isKeyboardResizing, setIsKeyboardResizing] = createSignal(false);\n\n const isResizing = createMemo(() => getState().resizingColumn() === getProps().column.key);\n\n const isRtl = createMemo(() => {\n const l = locale();\n return l?.direction === \"rtl\";\n });\n\n // ---- Pointer (mouse/touch) drag ----\n\n let startX = 0;\n let startWidth = 0;\n\n const onPointerDown = (e: PointerEvent) => {\n if (getProps().isDisabled) return;\n e.preventDefault();\n e.stopPropagation();\n\n const key = getProps().column.key;\n startX = e.clientX;\n startWidth = getState().getColumnWidth(key);\n\n getState().startResize(key);\n getProps().onResizeStart?.(getState().columnWidths());\n setIsPointerDragging(true);\n\n const target = e.currentTarget as HTMLElement;\n target.setPointerCapture(e.pointerId);\n };\n\n const onPointerMove = (e: PointerEvent) => {\n if (!isPointerDragging()) return;\n e.preventDefault();\n\n const deltaX = e.clientX - startX;\n const direction = isRtl() ? -1 : 1;\n const newWidth = startWidth + deltaX * direction;\n\n const key = getProps().column.key;\n const widths = getState().updateResizedColumns(key, newWidth);\n getProps().onResize?.(widths);\n };\n\n const onPointerUp = (e: PointerEvent) => {\n if (!isPointerDragging()) return;\n e.preventDefault();\n setIsPointerDragging(false);\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n };\n\n // ---- Keyboard resize (on the hidden input) ----\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (getProps().isDisabled) return;\n\n const key = getProps().column.key;\n const rtlMul = isRtl() ? -1 : 1;\n\n switch (e.key) {\n case \"Enter\": {\n if (isKeyboardResizing()) {\n // End resize\n setIsKeyboardResizing(false);\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n } else {\n // Start resize\n setIsKeyboardResizing(true);\n getState().startResize(key);\n getProps().onResizeStart?.(getState().columnWidths());\n }\n e.preventDefault();\n break;\n }\n case \"Escape\": {\n if (isKeyboardResizing()) {\n setIsKeyboardResizing(false);\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n e.preventDefault();\n }\n break;\n }\n case \"Tab\": {\n if (isKeyboardResizing()) {\n setIsKeyboardResizing(false);\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n }\n // Let Tab propagate for focus management\n break;\n }\n case \"ArrowRight\": {\n if (isKeyboardResizing()) {\n const currentWidth = getState().getColumnWidth(key);\n const widths = getState().updateResizedColumns(\n key,\n currentWidth + KEYBOARD_STEP * rtlMul,\n );\n getProps().onResize?.(widths);\n e.preventDefault();\n }\n break;\n }\n case \"ArrowLeft\": {\n if (isKeyboardResizing()) {\n const currentWidth = getState().getColumnWidth(key);\n const widths = getState().updateResizedColumns(\n key,\n currentWidth - KEYBOARD_STEP * rtlMul,\n );\n getProps().onResize?.(widths);\n e.preventDefault();\n }\n break;\n }\n }\n };\n\n // Handle input change (from screen reader range slider)\n const onInputChange = (e: Event) => {\n const input = e.target as HTMLInputElement;\n const newWidth = parseFloat(input.value);\n if (isNaN(newWidth)) return;\n\n const key = getProps().column.key;\n if (!isResizing()) {\n getState().startResize(key);\n getProps().onResizeStart?.(getState().columnWidths());\n }\n\n const widths = getState().updateResizedColumns(key, newWidth);\n getProps().onResize?.(widths);\n\n // End immediately for discrete input changes\n getState().endResize();\n getProps().onResizeEnd?.(getState().columnWidths());\n };\n\n // Visible resize handle props. The accessible resize control is the hidden\n // range input below, matching React Aria's ColumnResizer structure.\n const resizerProps: JSX.HTMLAttributes<HTMLDivElement> = {\n role: \"presentation\",\n tabIndex: -1,\n style: {\n \"touch-action\": \"none\",\n cursor: \"col-resize\",\n },\n onPointerDown,\n onPointerMove,\n onPointerUp,\n };\n\n // Visually hidden range input props\n const inputProps: JSX.InputHTMLAttributes<HTMLInputElement> = {\n get type() {\n return \"range\";\n },\n get tabIndex() {\n return getProps().isDisabled ? -1 : 0;\n },\n get disabled() {\n return getProps().isDisabled;\n },\n get \"aria-label\"() {\n return getProps()[\"aria-label\"];\n },\n get \"aria-orientation\"() {\n return \"horizontal\" as const;\n },\n get min() {\n return getState().getColumnMinWidth(getProps().column.key);\n },\n get max() {\n const maxW = getState().getColumnMaxWidth(getProps().column.key);\n return maxW === Infinity ? 9999 : maxW;\n },\n get value() {\n return getState().getColumnWidth(getProps().column.key);\n },\n style: {\n position: \"absolute\",\n width: \"1px\",\n height: \"1px\",\n padding: \"0\",\n margin: \"-1px\",\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n \"white-space\": \"nowrap\",\n \"border-width\": \"0\",\n },\n onKeyDown,\n onChange: onInputChange,\n };\n\n return {\n resizerProps,\n inputProps,\n isResizing,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAiBA,MAAM,2BAAW,IAAI,QAQnB;;;;AAKF,SAAgB,aAAgB,OAA0C;CACxE,OAAO,SAAS,IAAI,KAAK;AAC3B;;;;AAKA,SAAS,cAAiB,YAAgC,QAA4B;CAEpF,OAAO,CAAC,GADS,WAAW,YAAY,MACtB,CAAC,CAAC,CAAC,QAAQ,SAAS,KAAK,SAAS,UAAU,KAAK,SAAS,WAAW;AACzF;;;;AAKA,SAAS,eACP,YACA,QACA,OACoB;CAEpB,OADc,cAAc,YAAY,MAC7B,CAAC,CAAC,UAAU;AACzB;;;;AAKA,SAAS,OA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