@proyecto-viviana/solid-stately 0.1.5 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/{src → dist}/autocomplete/createAutocompleteState.d.ts +0 -1
  2. package/{src → dist}/autocomplete/index.d.ts +0 -1
  3. package/{src → dist}/calendar/createCalendarState.d.ts +0 -1
  4. package/{src → dist}/calendar/createDateFieldState.d.ts +0 -1
  5. package/{src → dist}/calendar/createRangeCalendarState.d.ts +0 -1
  6. package/{src → dist}/calendar/createTimeFieldState.d.ts +0 -1
  7. package/{src → dist}/calendar/index.d.ts +0 -1
  8. package/{src → dist}/checkbox/createCheckboxGroupState.d.ts +0 -1
  9. package/{src → dist}/checkbox/index.d.ts +0 -1
  10. package/{src → dist}/collections/ListCollection.d.ts +0 -1
  11. package/{src → dist}/collections/createListState.d.ts +0 -1
  12. package/{src → dist}/collections/createMenuState.d.ts +0 -1
  13. package/{src → dist}/collections/createSelectionState.d.ts +0 -1
  14. package/{src → dist}/collections/index.d.ts +0 -1
  15. package/{src → dist}/collections/types.d.ts +0 -1
  16. package/{src → dist}/color/Color.d.ts +0 -1
  17. package/{src → dist}/color/createColorAreaState.d.ts +0 -1
  18. package/{src → dist}/color/createColorFieldState.d.ts +0 -1
  19. package/{src → dist}/color/createColorSliderState.d.ts +0 -1
  20. package/{src → dist}/color/createColorWheelState.d.ts +0 -1
  21. package/{src → dist}/color/index.d.ts +0 -1
  22. package/{src → dist}/color/types.d.ts +0 -1
  23. package/{src → dist}/combobox/createComboBoxState.d.ts +0 -1
  24. package/{src → dist}/combobox/index.d.ts +0 -1
  25. package/{src → dist}/disclosure/createDisclosureState.d.ts +0 -1
  26. package/{src → dist}/disclosure/index.d.ts +0 -1
  27. package/{src → dist}/dnd/createDragState.d.ts +0 -1
  28. package/{src → dist}/dnd/createDraggableCollectionState.d.ts +0 -1
  29. package/{src → dist}/dnd/createDropState.d.ts +0 -1
  30. package/{src → dist}/dnd/createDroppableCollectionState.d.ts +0 -1
  31. package/{src → dist}/dnd/index.d.ts +0 -1
  32. package/{src → dist}/dnd/types.d.ts +0 -1
  33. package/{src → dist}/form/createFormValidationState.d.ts +0 -1
  34. package/{src → dist}/form/index.d.ts +0 -1
  35. package/{src → dist}/grid/createGridState.d.ts +0 -1
  36. package/{src → dist}/grid/index.d.ts +0 -1
  37. package/{src → dist}/grid/types.d.ts +0 -1
  38. package/dist/index.d.ts +25 -3363
  39. package/dist/index.js +2 -2
  40. package/dist/index.js.map +7 -1
  41. package/{src → dist}/numberfield/createNumberFieldState.d.ts +0 -1
  42. package/{src → dist}/numberfield/index.d.ts +0 -1
  43. package/{src → dist}/overlays/createOverlayTriggerState.d.ts +0 -1
  44. package/{src → dist}/overlays/index.d.ts +0 -1
  45. package/{src → dist}/radio/createRadioGroupState.d.ts +0 -1
  46. package/{src → dist}/radio/index.d.ts +0 -1
  47. package/{src → dist}/searchfield/createSearchFieldState.d.ts +0 -1
  48. package/{src → dist}/searchfield/index.d.ts +0 -1
  49. package/{src → dist}/select/createSelectState.d.ts +0 -1
  50. package/{src → dist}/select/index.d.ts +0 -1
  51. package/{src → dist}/slider/createSliderState.d.ts +0 -1
  52. package/{src → dist}/slider/index.d.ts +0 -1
  53. package/{src → dist}/ssr/index.d.ts +0 -1
  54. package/{src → dist}/table/TableCollection.d.ts +0 -1
  55. package/{src → dist}/table/createTableState.d.ts +0 -1
  56. package/{src → dist}/table/index.d.ts +0 -1
  57. package/{src → dist}/table/types.d.ts +0 -1
  58. package/{src → dist}/tabs/createTabListState.d.ts +0 -1
  59. package/{src → dist}/tabs/index.d.ts +0 -1
  60. package/{src → dist}/textfield/createTextFieldState.d.ts +0 -1
  61. package/{src → dist}/textfield/index.d.ts +0 -1
  62. package/{src → dist}/toast/createToastState.d.ts +0 -1
  63. package/{src → dist}/toast/index.d.ts +0 -1
  64. package/{src → dist}/toggle/createToggleState.d.ts +0 -1
  65. package/{src → dist}/toggle/index.d.ts +0 -1
  66. package/{src → dist}/tooltip/createTooltipTriggerState.d.ts +0 -1
  67. package/{src → dist}/tooltip/index.d.ts +0 -1
  68. package/{src → dist}/tree/TreeCollection.d.ts +0 -1
  69. package/{src → dist}/tree/createTreeState.d.ts +0 -1
  70. package/{src → dist}/tree/index.d.ts +0 -1
  71. package/{src → dist}/tree/types.d.ts +0 -1
  72. package/{src → dist}/utils/reactivity.d.ts +0 -1
  73. package/package.json +5 -7
  74. package/src/autocomplete/createAutocompleteState.d.ts.map +0 -1
  75. package/src/autocomplete/createAutocompleteState.ts +0 -90
  76. package/src/autocomplete/index.d.ts.map +0 -1
  77. package/src/autocomplete/index.ts +0 -5
  78. package/src/calendar/createCalendarState.d.ts.map +0 -1
  79. package/src/calendar/createCalendarState.ts +0 -461
  80. package/src/calendar/createDateFieldState.d.ts.map +0 -1
  81. package/src/calendar/createDateFieldState.ts +0 -562
  82. package/src/calendar/createRangeCalendarState.d.ts.map +0 -1
  83. package/src/calendar/createRangeCalendarState.ts +0 -535
  84. package/src/calendar/createTimeFieldState.d.ts.map +0 -1
  85. package/src/calendar/createTimeFieldState.ts +0 -483
  86. package/src/calendar/index.d.ts.map +0 -1
  87. package/src/calendar/index.ts +0 -81
  88. package/src/checkbox/createCheckboxGroupState.d.ts.map +0 -1
  89. package/src/checkbox/createCheckboxGroupState.ts +0 -193
  90. package/src/checkbox/index.d.ts.map +0 -1
  91. package/src/checkbox/index.ts +0 -5
  92. package/src/collections/ListCollection.d.ts.map +0 -1
  93. package/src/collections/ListCollection.ts +0 -146
  94. package/src/collections/createListState.d.ts.map +0 -1
  95. package/src/collections/createListState.ts +0 -264
  96. package/src/collections/createMenuState.d.ts.map +0 -1
  97. package/src/collections/createMenuState.ts +0 -106
  98. package/src/collections/createSelectionState.d.ts.map +0 -1
  99. package/src/collections/createSelectionState.ts +0 -336
  100. package/src/collections/index.d.ts.map +0 -1
  101. package/src/collections/index.ts +0 -46
  102. package/src/collections/types.d.ts.map +0 -1
  103. package/src/collections/types.ts +0 -169
  104. package/src/color/Color.d.ts.map +0 -1
  105. package/src/color/Color.ts +0 -951
  106. package/src/color/createColorAreaState.d.ts.map +0 -1
  107. package/src/color/createColorAreaState.ts +0 -293
  108. package/src/color/createColorFieldState.d.ts.map +0 -1
  109. package/src/color/createColorFieldState.ts +0 -292
  110. package/src/color/createColorSliderState.d.ts.map +0 -1
  111. package/src/color/createColorSliderState.ts +0 -241
  112. package/src/color/createColorWheelState.d.ts.map +0 -1
  113. package/src/color/createColorWheelState.ts +0 -211
  114. package/src/color/index.d.ts.map +0 -1
  115. package/src/color/index.ts +0 -47
  116. package/src/color/types.d.ts.map +0 -1
  117. package/src/color/types.ts +0 -127
  118. package/src/combobox/createComboBoxState.d.ts.map +0 -1
  119. package/src/combobox/createComboBoxState.ts +0 -703
  120. package/src/combobox/index.d.ts.map +0 -1
  121. package/src/combobox/index.ts +0 -13
  122. package/src/disclosure/createDisclosureState.d.ts.map +0 -1
  123. package/src/disclosure/createDisclosureState.ts +0 -193
  124. package/src/disclosure/index.d.ts.map +0 -1
  125. package/src/disclosure/index.ts +0 -9
  126. package/src/dnd/createDragState.d.ts.map +0 -1
  127. package/src/dnd/createDragState.ts +0 -153
  128. package/src/dnd/createDraggableCollectionState.d.ts.map +0 -1
  129. package/src/dnd/createDraggableCollectionState.ts +0 -165
  130. package/src/dnd/createDropState.d.ts.map +0 -1
  131. package/src/dnd/createDropState.ts +0 -212
  132. package/src/dnd/createDroppableCollectionState.d.ts.map +0 -1
  133. package/src/dnd/createDroppableCollectionState.ts +0 -357
  134. package/src/dnd/index.d.ts.map +0 -1
  135. package/src/dnd/index.ts +0 -76
  136. package/src/dnd/types.d.ts.map +0 -1
  137. package/src/dnd/types.ts +0 -317
  138. package/src/form/createFormValidationState.d.ts.map +0 -1
  139. package/src/form/createFormValidationState.ts +0 -389
  140. package/src/form/index.d.ts.map +0 -1
  141. package/src/form/index.ts +0 -15
  142. package/src/grid/createGridState.d.ts.map +0 -1
  143. package/src/grid/createGridState.ts +0 -327
  144. package/src/grid/index.d.ts.map +0 -1
  145. package/src/grid/index.ts +0 -13
  146. package/src/grid/types.d.ts.map +0 -1
  147. package/src/grid/types.ts +0 -179
  148. package/src/index.d.ts +0 -26
  149. package/src/index.d.ts.map +0 -1
  150. package/src/index.ts +0 -383
  151. package/src/numberfield/createNumberFieldState.d.ts.map +0 -1
  152. package/src/numberfield/createNumberFieldState.ts +0 -383
  153. package/src/numberfield/index.d.ts.map +0 -1
  154. package/src/numberfield/index.ts +0 -5
  155. package/src/overlays/createOverlayTriggerState.d.ts.map +0 -1
  156. package/src/overlays/createOverlayTriggerState.ts +0 -67
  157. package/src/overlays/index.d.ts.map +0 -1
  158. package/src/overlays/index.ts +0 -5
  159. package/src/radio/createRadioGroupState.d.ts.map +0 -1
  160. package/src/radio/createRadioGroupState.ts +0 -201
  161. package/src/radio/index.d.ts.map +0 -1
  162. package/src/radio/index.ts +0 -6
  163. package/src/searchfield/createSearchFieldState.d.ts.map +0 -1
  164. package/src/searchfield/createSearchFieldState.ts +0 -62
  165. package/src/searchfield/index.d.ts.map +0 -1
  166. package/src/searchfield/index.ts +0 -5
  167. package/src/select/createSelectState.d.ts.map +0 -1
  168. package/src/select/createSelectState.ts +0 -181
  169. package/src/select/index.d.ts.map +0 -1
  170. package/src/select/index.ts +0 -5
  171. package/src/slider/createSliderState.d.ts.map +0 -1
  172. package/src/slider/createSliderState.ts +0 -211
  173. package/src/slider/index.d.ts.map +0 -1
  174. package/src/slider/index.ts +0 -6
  175. package/src/ssr/index.d.ts.map +0 -1
  176. package/src/ssr/index.ts +0 -41
  177. package/src/table/TableCollection.d.ts.map +0 -1
  178. package/src/table/TableCollection.ts +0 -388
  179. package/src/table/createTableState.d.ts.map +0 -1
  180. package/src/table/createTableState.ts +0 -127
  181. package/src/table/index.d.ts.map +0 -1
  182. package/src/table/index.ts +0 -18
  183. package/src/table/types.d.ts.map +0 -1
  184. package/src/table/types.ts +0 -150
  185. package/src/tabs/createTabListState.d.ts.map +0 -1
  186. package/src/tabs/createTabListState.ts +0 -240
  187. package/src/tabs/index.d.ts.map +0 -1
  188. package/src/tabs/index.ts +0 -7
  189. package/src/textfield/createTextFieldState.d.ts.map +0 -1
  190. package/src/textfield/createTextFieldState.ts +0 -75
  191. package/src/textfield/index.d.ts.map +0 -1
  192. package/src/textfield/index.ts +0 -5
  193. package/src/toast/createToastState.d.ts.map +0 -1
  194. package/src/toast/createToastState.ts +0 -316
  195. package/src/toast/index.d.ts.map +0 -1
  196. package/src/toast/index.ts +0 -11
  197. package/src/toggle/createToggleState.d.ts.map +0 -1
  198. package/src/toggle/createToggleState.ts +0 -94
  199. package/src/toggle/index.d.ts.map +0 -1
  200. package/src/toggle/index.ts +0 -5
  201. package/src/tooltip/createTooltipTriggerState.d.ts.map +0 -1
  202. package/src/tooltip/createTooltipTriggerState.ts +0 -183
  203. package/src/tooltip/index.d.ts.map +0 -1
  204. package/src/tooltip/index.ts +0 -6
  205. package/src/tree/TreeCollection.d.ts.map +0 -1
  206. package/src/tree/TreeCollection.ts +0 -175
  207. package/src/tree/createTreeState.d.ts.map +0 -1
  208. package/src/tree/createTreeState.ts +0 -392
  209. package/src/tree/index.d.ts.map +0 -1
  210. package/src/tree/index.ts +0 -13
  211. package/src/tree/types.d.ts.map +0 -1
  212. package/src/tree/types.ts +0 -174
  213. package/src/utils/index.d.ts +0 -2
  214. package/src/utils/index.d.ts.map +0 -1
  215. package/src/utils/reactivity.d.ts.map +0 -1
  216. package/src/utils/reactivity.ts +0 -36
  217. /package/{src/utils/index.ts → dist/utils/index.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,aAAa,GACnB,MAAM,6BAA6B,CAAC"}
package/src/form/index.ts DELETED
@@ -1,15 +0,0 @@
1
- export {
2
- createFormValidationState,
3
- mergeValidation,
4
- FormValidationContext,
5
- privateValidationStateProp,
6
- VALID_VALIDITY_STATE,
7
- DEFAULT_VALIDATION_RESULT,
8
- type FormValidationState,
9
- type FormValidationProps,
10
- type ValidationResult,
11
- type ValidationErrors,
12
- type ValidationFunction,
13
- type ValidationBehavior,
14
- type ValidityState,
15
- } from './createFormValidationState';
@@ -1 +0,0 @@
1
- {"version":3,"file":"createGridState.d.ts","sourceRoot":"","sources":["createGridState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA8C,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AACrF,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,cAAc,EAEf,MAAM,SAAS,CAAC;AAGjB;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,cAAc,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,EAC/F,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GACxC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAuSjB"}
@@ -1,327 +0,0 @@
1
- /**
2
- * Grid state management for Table and GridList components.
3
- * Based on @react-stately/grid/useGridState.
4
- */
5
-
6
- import { createSignal, createEffect, createMemo, on, type Accessor } from 'solid-js';
7
- import type {
8
- GridState,
9
- GridStateOptions,
10
- GridCollection,
11
- GridNode,
12
- } from './types';
13
- import type { Key, FocusStrategy } from '../collections/types';
14
-
15
- /**
16
- * Creates state management for a grid component.
17
- * Handles row selection, focus management, and keyboard navigation state.
18
- */
19
- export function createGridState<T extends object, C extends GridCollection<T> = GridCollection<T>>(
20
- options: Accessor<GridStateOptions<T, C>>
21
- ): GridState<T, C> {
22
- const getOptions = () => options();
23
-
24
- // Disabled keys as a Set
25
- const disabledKeys = createMemo(() => {
26
- const keys = getOptions().disabledKeys;
27
- return keys ? new Set(keys) : new Set<Key>();
28
- });
29
-
30
- // Focus state
31
- const [isFocused, setIsFocused] = createSignal(false);
32
- const [focusedKey, setFocusedKeyInternal] = createSignal<Key | null>(null);
33
- const [childFocusStrategy, setChildFocusStrategy] = createSignal<FocusStrategy | null>(null);
34
- const [isKeyboardNavigationDisabled, setKeyboardNavigationDisabled] = createSignal(false);
35
-
36
- // Selection state
37
- const [internalSelectedKeys, setInternalSelectedKeys] = createSignal<'all' | Set<Key>>(
38
- getInitialSelection(getOptions().defaultSelectedKeys)
39
- );
40
- const [anchorKey, setAnchorKey] = createSignal<Key | null>(null);
41
-
42
- // Computed selection
43
- const selectedKeys = createMemo(() => {
44
- const opts = getOptions();
45
- if (opts.selectedKeys !== undefined) {
46
- return normalizeSelection(opts.selectedKeys);
47
- }
48
- return internalSelectedKeys();
49
- });
50
-
51
- const selectionMode = createMemo(() => getOptions().selectionMode ?? 'none');
52
- const selectionBehavior = createMemo(() => getOptions().selectionBehavior ?? 'toggle');
53
- const disallowEmptySelection = createMemo(() => getOptions().disallowEmptySelection ?? false);
54
-
55
- // Focus mode handling
56
- const focusMode = createMemo(() => getOptions().focusMode ?? 'row');
57
-
58
- // Set focused key with focus mode awareness
59
- const setFocusedKey = (key: Key | null, strategy: FocusStrategy = 'first') => {
60
- const opts = getOptions();
61
- const collection = opts.collection;
62
-
63
- // If focusMode is cell and an item is focused, focus a child cell instead
64
- if (focusMode() === 'cell' && key != null) {
65
- const item = collection.getItem(key);
66
- if (item?.type === 'item') {
67
- const children = [...collection.getChildren(key)];
68
- if (strategy === 'last') {
69
- key = children[children.length - 1]?.key ?? key;
70
- } else {
71
- key = children[0]?.key ?? key;
72
- }
73
- }
74
- }
75
-
76
- setFocusedKeyInternal(key);
77
- setChildFocusStrategy(strategy);
78
- };
79
-
80
- // Reset focused key if the item is deleted from the collection
81
- let cachedCollection: C | null = null;
82
-
83
- createEffect(
84
- on(
85
- () => getOptions().collection,
86
- (collection) => {
87
- const currentFocusedKey = focusedKey();
88
-
89
- if (currentFocusedKey != null && cachedCollection && !collection.getItem(currentFocusedKey)) {
90
- // The focused item was deleted, find a new one to focus
91
- const node = cachedCollection.getItem(currentFocusedKey);
92
- const parentNode =
93
- node?.parentKey != null &&
94
- (node.type === 'cell' || node.type === 'rowheader' || node.type === 'column')
95
- ? cachedCollection.getItem(node.parentKey)
96
- : node;
97
-
98
- if (!parentNode) {
99
- setFocusedKeyInternal(null);
100
- cachedCollection = collection;
101
- return;
102
- }
103
-
104
- const cachedRows = cachedCollection.rows;
105
- const rows = collection.rows;
106
- const diff = cachedRows.length - rows.length;
107
-
108
- let index = Math.min(
109
- diff > 1 ? Math.max(parentNode.index - diff + 1, 0) : parentNode.index,
110
- rows.length - 1
111
- );
112
-
113
- let newRow: GridNode<T> | null = null;
114
- while (index >= 0) {
115
- const row = rows[index];
116
- if (!disabledKeys().has(row.key) && row.type !== 'headerrow') {
117
- newRow = row;
118
- break;
119
- }
120
- // Find next, not disabled row
121
- if (index < rows.length - 1) {
122
- index++;
123
- } else {
124
- // Otherwise, find previous, not disabled row
125
- if (index > parentNode.index) {
126
- index = parentNode.index;
127
- }
128
- index--;
129
- }
130
- }
131
-
132
- if (newRow) {
133
- const childNodes = newRow.hasChildNodes ? [...collection.getChildren(newRow.key)] : [];
134
- const keyToFocus =
135
- newRow.hasChildNodes &&
136
- parentNode !== node &&
137
- node &&
138
- node.index < childNodes.length
139
- ? childNodes[node.index].key
140
- : newRow.key;
141
- setFocusedKeyInternal(keyToFocus);
142
- } else {
143
- setFocusedKeyInternal(null);
144
- }
145
- }
146
-
147
- cachedCollection = collection;
148
- }
149
- )
150
- );
151
-
152
- // Selection methods
153
- const isSelected = (key: Key): boolean => {
154
- const keys = selectedKeys();
155
- if (keys === 'all') return true;
156
- return keys.has(key);
157
- };
158
-
159
- const isDisabled = (key: Key): boolean => {
160
- return disabledKeys().has(key);
161
- };
162
-
163
- const updateSelection = (newSelection: 'all' | Set<Key>) => {
164
- const opts = getOptions();
165
-
166
- // Controlled mode
167
- if (opts.selectedKeys !== undefined) {
168
- opts.onSelectionChange?.(newSelection);
169
- return;
170
- }
171
-
172
- // Uncontrolled mode
173
- const current = internalSelectedKeys();
174
- const isDifferent =
175
- current === 'all' ||
176
- newSelection === 'all' ||
177
- current.size !== (newSelection as Set<Key>).size ||
178
- ![...current].every((k) => (newSelection as Set<Key>).has(k));
179
-
180
- if (isDifferent) {
181
- setInternalSelectedKeys(newSelection);
182
- opts.onSelectionChange?.(newSelection);
183
- }
184
- };
185
-
186
- const toggleSelection = (key: Key) => {
187
- if (isDisabled(key)) return;
188
- if (selectionMode() === 'none') return;
189
-
190
- const current = selectedKeys();
191
-
192
- if (selectionMode() === 'single') {
193
- if (isSelected(key) && !disallowEmptySelection()) {
194
- updateSelection(new Set());
195
- } else {
196
- updateSelection(new Set([key]));
197
- }
198
- return;
199
- }
200
-
201
- // Multiple selection
202
- if (current === 'all') {
203
- // Can't toggle when all selected without knowing all keys
204
- return;
205
- }
206
-
207
- const newSelection = new Set(current);
208
- if (newSelection.has(key)) {
209
- if (newSelection.size > 1 || !disallowEmptySelection()) {
210
- newSelection.delete(key);
211
- }
212
- } else {
213
- newSelection.add(key);
214
- }
215
-
216
- updateSelection(newSelection);
217
- setAnchorKey(key);
218
- };
219
-
220
- const replaceSelection = (key: Key) => {
221
- if (isDisabled(key)) return;
222
- if (selectionMode() === 'none') return;
223
-
224
- updateSelection(new Set([key]));
225
- setAnchorKey(key);
226
- };
227
-
228
- const extendSelection = (toKey: Key) => {
229
- if (isDisabled(toKey)) return;
230
- if (selectionMode() !== 'multiple') {
231
- replaceSelection(toKey);
232
- return;
233
- }
234
-
235
- const anchor = anchorKey();
236
- if (!anchor) {
237
- replaceSelection(toKey);
238
- return;
239
- }
240
-
241
- const collection = getOptions().collection;
242
- const rows = collection.rows.filter((r) => r.type === 'item');
243
- const keys = rows.map((r) => r.key);
244
- const anchorIndex = keys.indexOf(anchor);
245
- const toIndex = keys.indexOf(toKey);
246
-
247
- if (anchorIndex === -1 || toIndex === -1) {
248
- replaceSelection(toKey);
249
- return;
250
- }
251
-
252
- const start = Math.min(anchorIndex, toIndex);
253
- const end = Math.max(anchorIndex, toIndex);
254
- const rangeKeys = keys.slice(start, end + 1).filter((k) => !isDisabled(k));
255
-
256
- updateSelection(new Set(rangeKeys));
257
- };
258
-
259
- const selectAll = () => {
260
- if (selectionMode() !== 'multiple') return;
261
- updateSelection('all');
262
- };
263
-
264
- const clearSelection = () => {
265
- if (disallowEmptySelection()) return;
266
- updateSelection(new Set());
267
- };
268
-
269
- const toggleSelectAll = () => {
270
- if (selectionMode() !== 'multiple') return;
271
-
272
- if (selectedKeys() === 'all') {
273
- clearSelection();
274
- } else {
275
- selectAll();
276
- }
277
- };
278
-
279
- return {
280
- get collection() {
281
- return getOptions().collection;
282
- },
283
- get disabledKeys() {
284
- return disabledKeys();
285
- },
286
- get isKeyboardNavigationDisabled() {
287
- return isKeyboardNavigationDisabled();
288
- },
289
- get focusedKey() {
290
- return focusedKey();
291
- },
292
- get childFocusStrategy() {
293
- return childFocusStrategy();
294
- },
295
- get isFocused() {
296
- return isFocused();
297
- },
298
- get selectionMode() {
299
- return selectionMode();
300
- },
301
- get selectedKeys() {
302
- return selectedKeys();
303
- },
304
- isSelected,
305
- isDisabled,
306
- setFocusedKey,
307
- setFocused: setIsFocused,
308
- toggleSelection,
309
- replaceSelection,
310
- extendSelection,
311
- selectAll,
312
- clearSelection,
313
- toggleSelectAll,
314
- setKeyboardNavigationDisabled,
315
- };
316
- }
317
-
318
- // Helper functions
319
- function getInitialSelection(defaultKeys?: 'all' | Iterable<Key>): 'all' | Set<Key> {
320
- if (defaultKeys === undefined) return new Set();
321
- return normalizeSelection(defaultKeys);
322
- }
323
-
324
- function normalizeSelection(keys: 'all' | Iterable<Key>): 'all' | Set<Key> {
325
- if (keys === 'all') return 'all';
326
- return new Set(keys);
327
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,YAAY,GACb,MAAM,SAAS,CAAC"}
package/src/grid/index.ts DELETED
@@ -1,13 +0,0 @@
1
- /**
2
- * Grid state management module.
3
- * Provides state hooks for Table and GridList components.
4
- */
5
-
6
- export { createGridState } from './createGridState';
7
- export type {
8
- GridState,
9
- GridStateOptions,
10
- GridCollection,
11
- GridNode,
12
- GridNodeType,
13
- } from './types';
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,QAAQ,GACR,WAAW,GACX,WAAW,GACX,SAAS,GACT,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,GAAG,OAAO;IACnC,6BAA6B;IAC7B,IAAI,EAAE,YAAY,CAAC;IACnB,iCAAiC;IACjC,GAAG,EAAE,GAAG,CAAC;IACT,6CAA6C;IAC7C,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAChB,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,SAAS,CAAC,EAAE,GAAG,GAA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CAAC,CAAC;IAC7B,mCAAmC;IACnC,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC3B,sBAAsB;IACtB,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC/C,0BAA0B;IAC1B,iBAAiB,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACzC,6CAA6C;IAC7C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,4CAA4C;IAC5C,YAAY,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IACrC,4CAA4C;IAC5C,mBAAmB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC5C,qCAAqC;IACrC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;CACtD"}
package/src/grid/types.ts DELETED
@@ -1,179 +0,0 @@
1
- /**
2
- * Grid collection types for Table and GridList components.
3
- * Based on @react-types/grid.
4
- */
5
-
6
- import type { Key, FocusStrategy } from '../collections/types';
7
-
8
- /**
9
- * Represents the type of a grid node.
10
- */
11
- export type GridNodeType =
12
- | 'item' // A selectable row
13
- | 'cell' // A cell within a row
14
- | 'column' // A column header
15
- | 'rowheader' // A cell that acts as a row header
16
- | 'headerrow' // A header row container
17
- | 'section' // A section/group
18
- | 'placeholder'; // A placeholder (e.g., empty row)
19
-
20
- /**
21
- * Represents a node in a grid collection.
22
- */
23
- export interface GridNode<T = unknown> {
24
- /** The type of grid node. */
25
- type: GridNodeType;
26
- /** A unique key for the node. */
27
- key: Key;
28
- /** The original value/data for this node. */
29
- value: T | null;
30
- /** The text content for accessibility and typeahead. */
31
- textValue: string;
32
- /** The rendered content (JSX) - optional for programmatic nodes. */
33
- rendered?: unknown;
34
- /** The level of nesting (0 for top-level). */
35
- level: number;
36
- /** The index within the parent. */
37
- index: number;
38
- /** The key of the parent node, if any. */
39
- parentKey?: Key | null;
40
- /** Whether this node has child nodes. */
41
- hasChildNodes: boolean;
42
- /** Child nodes (cells for rows, rows for sections). */
43
- childNodes: GridNode<T>[];
44
- /** Whether this item is disabled. */
45
- isDisabled?: boolean;
46
- /** ARIA label for this node. */
47
- 'aria-label'?: string;
48
- /** Additional props for the node. */
49
- props?: Record<string, unknown>;
50
- /** Column index for cells. */
51
- column?: number;
52
- /** Column span for cells. */
53
- colspan?: number;
54
- /** Row index. */
55
- rowIndex?: number;
56
- /** Whether this row can be expanded (for tree grids). */
57
- isExpandable?: boolean;
58
- /** Whether this row is expanded. */
59
- isExpanded?: boolean;
60
- }
61
-
62
- /**
63
- * A collection of grid nodes with grid-specific navigation.
64
- */
65
- export interface GridCollection<T = unknown> {
66
- /** The number of items in the collection. */
67
- readonly size: number;
68
- /** All rows in the grid (including header rows). */
69
- readonly rows: GridNode<T>[];
70
- /** All column definitions. */
71
- readonly columns: GridNode<T>[];
72
- /** Number of header rows. */
73
- readonly headerRows: GridNode<T>[];
74
- /** Number of body rows (excluding headers). */
75
- readonly rowCount: number;
76
- /** Number of columns. */
77
- readonly columnCount: number;
78
-
79
- /** Get all keys in the collection. */
80
- getKeys(): Iterable<Key>;
81
-
82
- /** Get a node by its key. */
83
- getItem(key: Key): GridNode<T> | null;
84
-
85
- /** Get a node by index. */
86
- at(index: number): GridNode<T> | null;
87
-
88
- /** Get the key before the given key. */
89
- getKeyBefore(key: Key): Key | null;
90
-
91
- /** Get the key after the given key. */
92
- getKeyAfter(key: Key): Key | null;
93
-
94
- /** Get the first key in the collection. */
95
- getFirstKey(): Key | null;
96
-
97
- /** Get the last key in the collection. */
98
- getLastKey(): Key | null;
99
-
100
- /** Get the children of a node. */
101
- getChildren(key: Key): Iterable<GridNode<T>>;
102
-
103
- /** Get the text value for a key. */
104
- getTextValue(key: Key): string;
105
-
106
- /** Get a cell by row and column key. */
107
- getCell(rowKey: Key, columnKey: Key): GridNode<T> | null;
108
-
109
- /** Iterator over all nodes. */
110
- [Symbol.iterator](): Iterator<GridNode<T>>;
111
- }
112
-
113
- /**
114
- * State for a grid component.
115
- */
116
- export interface GridState<T, C extends GridCollection<T> = GridCollection<T>> {
117
- /** The grid collection. */
118
- readonly collection: C;
119
- /** Keys of disabled rows. */
120
- readonly disabledKeys: Set<Key>;
121
- /** Whether keyboard navigation is disabled. */
122
- readonly isKeyboardNavigationDisabled: boolean;
123
- /** Currently focused key. */
124
- readonly focusedKey: Key | null;
125
- /** Focus strategy for child focus. */
126
- readonly childFocusStrategy: FocusStrategy | null;
127
- /** Whether the grid is focused. */
128
- readonly isFocused: boolean;
129
- /** The selection mode. */
130
- readonly selectionMode: 'none' | 'single' | 'multiple';
131
- /** The currently selected keys. */
132
- readonly selectedKeys: 'all' | Set<Key>;
133
- /** Check if a key is selected. */
134
- isSelected(key: Key): boolean;
135
- /** Check if a key is disabled. */
136
- isDisabled(key: Key): boolean;
137
- /** Set the focused key. */
138
- setFocusedKey(key: Key | null, childFocusStrategy?: FocusStrategy): void;
139
- /** Set focused state. */
140
- setFocused(isFocused: boolean): void;
141
- /** Toggle selection for a key. */
142
- toggleSelection(key: Key): void;
143
- /** Replace selection with a key. */
144
- replaceSelection(key: Key): void;
145
- /** Extend selection to a key (shift-click). */
146
- extendSelection(toKey: Key): void;
147
- /** Select all rows. */
148
- selectAll(): void;
149
- /** Clear selection. */
150
- clearSelection(): void;
151
- /** Toggle select all. */
152
- toggleSelectAll(): void;
153
- /** Set keyboard navigation disabled. */
154
- setKeyboardNavigationDisabled(isDisabled: boolean): void;
155
- }
156
-
157
- /**
158
- * Options for creating grid state.
159
- */
160
- export interface GridStateOptions<T, C extends GridCollection<T> = GridCollection<T>> {
161
- /** The grid collection. */
162
- collection: C;
163
- /** Keys of disabled rows. */
164
- disabledKeys?: Iterable<Key>;
165
- /** Focus mode: 'row' or 'cell'. */
166
- focusMode?: 'row' | 'cell';
167
- /** Selection mode. */
168
- selectionMode?: 'none' | 'single' | 'multiple';
169
- /** Selection behavior. */
170
- selectionBehavior?: 'toggle' | 'replace';
171
- /** Whether empty selection is disallowed. */
172
- disallowEmptySelection?: boolean;
173
- /** Currently selected keys (controlled). */
174
- selectedKeys?: 'all' | Iterable<Key>;
175
- /** Default selected keys (uncontrolled). */
176
- defaultSelectedKeys?: 'all' | Iterable<Key>;
177
- /** Handler for selection changes. */
178
- onSelectionChange?: (keys: 'all' | Set<Key>) => void;
179
- }
package/src/index.d.ts DELETED
@@ -1,26 +0,0 @@
1
- export { createToggleState, type ToggleStateOptions, type ToggleState, } from './toggle';
2
- export { createAutocompleteState, type AutocompleteState, type AutocompleteStateOptions, } from './autocomplete';
3
- export { createTextFieldState, type TextFieldStateOptions, type TextFieldState, } from './textfield';
4
- export { createCheckboxGroupState, type CheckboxGroupProps, type CheckboxGroupState, } from './checkbox';
5
- export { createRadioGroupState, radioGroupSyncVersion, type RadioGroupProps, type RadioGroupState, } from './radio';
6
- export { createOverlayTriggerState, type OverlayTriggerProps, type OverlayTriggerState, } from './overlays';
7
- export { type Key, type SelectionMode, type SelectionBehavior, type Selection, type FocusStrategy, type DisabledBehavior, type CollectionNode, type Collection, type ItemProps, type SectionProps, type CollectionBase, type SingleSelection, type MultipleSelection, ListCollection, createListCollection, createSelectionState, type SelectionStateProps, type SelectionState, createListState, createSingleSelectListState, type ListStateProps, type ListState, type SingleSelectListStateProps, type SingleSelectListState, createMenuState, createMenuTriggerState, type MenuStateProps, type MenuState, type MenuTriggerStateProps, type MenuTriggerState, } from './collections';
8
- export { createSelectState, type SelectStateProps, type SelectState, } from './select';
9
- export { createComboBoxState, defaultContainsFilter, type ComboBoxState, type ComboBoxStateProps, type FilterFn, type MenuTriggerAction, } from './combobox';
10
- export { createTabListState, type TabListStateProps, type TabListState, type KeyboardActivation, type TabOrientation, } from './tabs';
11
- export { createNumberFieldState, type NumberFieldStateProps, type NumberFieldState, } from './numberfield';
12
- export { createSearchFieldState, type SearchFieldStateProps, type SearchFieldState, } from './searchfield';
13
- export { createSliderState, type SliderStateProps, type SliderState, type SliderOrientation, } from './slider';
14
- export { createTooltipTriggerState, resetTooltipState, type TooltipTriggerProps, type TooltipTriggerState, } from './tooltip';
15
- export { createToastState, createToastQueue, ToastQueue, Timer, type ToastOptions, type QueuedToast, type ToastQueueOptions, type ToastStateProps, type ToastState, } from './toast';
16
- export { createDisclosureState, createDisclosureGroupState, type DisclosureStateProps, type DisclosureState, type DisclosureGroupStateProps, type DisclosureGroupState, type Key as DisclosureKey, } from './disclosure';
17
- export { createCalendarState, type CalendarStateProps, type CalendarState, type ValidationState, createRangeCalendarState, type RangeCalendarStateProps, type RangeCalendarState, type DateRange, type RangeValue, createDateFieldState, type DateFieldStateProps, type DateFieldState, type DateSegment, type DateSegmentType, createTimeFieldState, type TimeFieldStateProps, type TimeFieldState, type TimeSegment, type TimeSegmentType, type TimeValue, type CalendarDate, type CalendarDateTime, type ZonedDateTime, type DateValue, type Time, today, now, getLocalTimeZone, parseDate, parseDateTime, parseTime, parseAbsolute, parseAbsoluteToLocal, parseZonedDateTime, toCalendarDate, toCalendarDateTime, toZoned, toTime, CalendarDateClass, CalendarDateTimeClass, ZonedDateTimeClass, TimeClass, DateFormatter, isSameDay, isSameMonth, isSameYear, isToday, isWeekend, startOfMonth, endOfMonth, startOfWeek, endOfWeek, startOfYear, endOfYear, getWeeksInMonth, getDayOfWeek, minDate, maxDate, } from './calendar';
18
- export { createGridState, type GridState, type GridStateOptions, type GridCollection, type GridNode, type GridNodeType, } from './grid';
19
- export { createTableState, TableCollection, createTableCollection, type TableState, type TableStateOptions, type ITableCollection, type SortDescriptor, type SortDirection, type Sortable, type ColumnDefinition, type RowDefinition, type TableCollectionOptions, } from './table';
20
- export { createTreeState, TreeCollection, createTreeCollection, type TreeState, type TreeStateOptions, type TreeCollectionInterface, type TreeNode, type TreeItemData, } from './tree';
21
- export { type Color, type ColorFormat, type ColorSpace, type ColorChannel, type ColorChannelRange, type ColorAxes, parseColor, normalizeColor, createRGBColor, createHSLColor, createHSBColor, createColorSliderState, type ColorSliderStateOptions, type ColorSliderState, createColorAreaState, type ColorAreaStateOptions, type ColorAreaState, createColorWheelState, type ColorWheelStateOptions, type ColorWheelState, createColorFieldState, type ColorFieldStateOptions, type ColorFieldState, } from './color';
22
- export { type DropOperation, type DragItem, type DragDropEvent, type DragStartEvent, type DragMoveEvent, type DragEndEvent, type DropEnterEvent, type DropMoveEvent, type DropActivateEvent, type DropExitEvent, type TextDropItem, type FileDropItem, type DirectoryDropItem, type DropItem, type DropEvent, type DropPosition, type RootDropTarget, type ItemDropTarget, type DropTarget, type DroppableCollectionEnterEvent, type DroppableCollectionMoveEvent, type DroppableCollectionActivateEvent, type DroppableCollectionExitEvent, type DroppableCollectionDropEvent, type DroppableCollectionInsertDropEvent, type DroppableCollectionRootDropEvent, type DroppableCollectionOnItemDropEvent, type DroppableCollectionReorderEvent, type DragTypes, type DropTargetDelegate, type DraggableCollectionStartEvent, type DraggableCollectionMoveEvent, type DraggableCollectionEndEvent, type DragPreviewRenderer, type DroppableCollectionUtilityOptions, type DroppableCollectionBaseProps, type DroppableCollectionProps, type DraggableCollectionProps, createDragState, type DragStateOptions, type DragState, createDropState, type DropStateOptions, type DropState, createDraggableCollectionState, type DraggableCollectionStateOptions, type DraggableCollectionState, createDroppableCollectionState, DIRECTORY_DRAG_TYPE, type DroppableCollectionStateOptions, type DroppableCollectionState, } from './dnd';
23
- export { createFormValidationState, mergeValidation, FormValidationContext, privateValidationStateProp, VALID_VALIDITY_STATE, DEFAULT_VALIDATION_RESULT, type FormValidationState, type FormValidationProps, type ValidationResult, type ValidationErrors, type ValidationFunction, type ValidationBehavior, type ValidityState, } from './form';
24
- export { createIsSSR, createId, canUseDOM, isServer } from './ssr';
25
- export { access, isAccessor, type MaybeAccessor, type MaybeAccessorValue } from './utils';
26
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iB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