@proyecto-viviana/solid-stately 0.5.0 → 0.6.0-rc.0

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 (414) hide show
  1. package/LICENSE-APACHE-2.0 +201 -0
  2. package/NOTICE +91 -0
  3. package/dist/autocomplete/createAutocompleteState.d.ts +2 -1
  4. package/dist/autocomplete/createAutocompleteState.d.ts.map +1 -0
  5. package/dist/autocomplete/index.d.ts +1 -0
  6. package/dist/autocomplete/index.d.ts.map +1 -0
  7. package/dist/calendar/IncompleteDate.d.ts +2 -1
  8. package/dist/calendar/IncompleteDate.d.ts.map +1 -0
  9. package/dist/calendar/createCalendarState.d.ts +7 -8
  10. package/dist/calendar/createCalendarState.d.ts.map +1 -0
  11. package/dist/calendar/createDateFieldState.d.ts +4 -20
  12. package/dist/calendar/createDateFieldState.d.ts.map +1 -0
  13. package/dist/calendar/createDatePickerState.d.ts +2 -7
  14. package/dist/calendar/createDatePickerState.d.ts.map +1 -0
  15. package/dist/calendar/createRangeCalendarState.d.ts +7 -7
  16. package/dist/calendar/createRangeCalendarState.d.ts.map +1 -0
  17. package/dist/calendar/createTimeFieldState.d.ts +4 -23
  18. package/dist/calendar/createTimeFieldState.d.ts.map +1 -0
  19. package/dist/calendar/index.d.ts +1 -0
  20. package/dist/calendar/index.d.ts.map +1 -0
  21. package/dist/calendar/intl/index.d.ts +1 -0
  22. package/dist/calendar/intl/index.d.ts.map +1 -0
  23. package/dist/checkbox/createCheckboxGroupState.d.ts +1 -0
  24. package/dist/checkbox/createCheckboxGroupState.d.ts.map +1 -0
  25. package/dist/checkbox/index.d.ts +1 -0
  26. package/dist/checkbox/index.d.ts.map +1 -0
  27. package/dist/collections/ListCollection.d.ts +5 -0
  28. package/dist/collections/ListCollection.d.ts.map +1 -0
  29. package/dist/collections/createListState.d.ts +2 -6
  30. package/dist/collections/createListState.d.ts.map +1 -0
  31. package/dist/collections/createMenuState.d.ts +30 -13
  32. package/dist/collections/createMenuState.d.ts.map +1 -0
  33. package/dist/collections/createSelectionState.d.ts +2 -5
  34. package/dist/collections/createSelectionState.d.ts.map +1 -0
  35. package/dist/collections/getChildNodes.d.ts +6 -3
  36. package/dist/collections/getChildNodes.d.ts.map +1 -0
  37. package/dist/collections/index.d.ts +2 -1
  38. package/dist/collections/index.d.ts.map +1 -0
  39. package/dist/collections/types.d.ts +36 -2
  40. package/dist/collections/types.d.ts.map +1 -0
  41. package/dist/color/Color.d.ts +7 -1
  42. package/dist/color/Color.d.ts.map +1 -0
  43. package/dist/color/createColorAreaState.d.ts +2 -5
  44. package/dist/color/createColorAreaState.d.ts.map +1 -0
  45. package/dist/color/createColorFieldState.d.ts +2 -5
  46. package/dist/color/createColorFieldState.d.ts.map +1 -0
  47. package/dist/color/createColorSliderState.d.ts +2 -5
  48. package/dist/color/createColorSliderState.d.ts.map +1 -0
  49. package/dist/color/createColorWheelState.d.ts +2 -5
  50. package/dist/color/createColorWheelState.d.ts.map +1 -0
  51. package/dist/color/getColorChannels.d.ts +3 -0
  52. package/dist/color/getColorChannels.d.ts.map +1 -0
  53. package/dist/color/index.d.ts +2 -1
  54. package/dist/color/index.d.ts.map +1 -0
  55. package/dist/color/intl/index.d.ts +1 -0
  56. package/dist/color/intl/index.d.ts.map +1 -0
  57. package/dist/color/types.d.ts +2 -1
  58. package/dist/color/types.d.ts.map +1 -0
  59. package/dist/combobox/createComboBoxState.d.ts +4 -8
  60. package/dist/combobox/createComboBoxState.d.ts.map +1 -0
  61. package/dist/combobox/index.d.ts +1 -0
  62. package/dist/combobox/index.d.ts.map +1 -0
  63. package/dist/data/createAsyncList.d.ts +1 -7
  64. package/dist/data/createAsyncList.d.ts.map +1 -0
  65. package/dist/data/createListData.d.ts +1 -6
  66. package/dist/data/createListData.d.ts.map +1 -0
  67. package/dist/data/createTreeData.d.ts +1 -6
  68. package/dist/data/createTreeData.d.ts.map +1 -0
  69. package/dist/data/index.d.ts +1 -0
  70. package/dist/data/index.d.ts.map +1 -0
  71. package/dist/datepicker/index.d.ts +1 -0
  72. package/dist/datepicker/index.d.ts.map +1 -0
  73. package/dist/disclosure/createDisclosureState.d.ts +2 -5
  74. package/dist/disclosure/createDisclosureState.d.ts.map +1 -0
  75. package/dist/disclosure/index.d.ts +1 -0
  76. package/dist/disclosure/index.d.ts.map +1 -0
  77. package/dist/dnd/createDragState.d.ts +2 -6
  78. package/dist/dnd/createDragState.d.ts.map +1 -0
  79. package/dist/dnd/createDraggableCollectionState.d.ts +39 -10
  80. package/dist/dnd/createDraggableCollectionState.d.ts.map +1 -0
  81. package/dist/dnd/createDropState.d.ts +2 -6
  82. package/dist/dnd/createDropState.d.ts.map +1 -0
  83. package/dist/dnd/createDroppableCollectionState.d.ts +28 -11
  84. package/dist/dnd/createDroppableCollectionState.d.ts.map +1 -0
  85. package/dist/dnd/index.d.ts +3 -2
  86. package/dist/dnd/index.d.ts.map +1 -0
  87. package/dist/dnd/types.d.ts +17 -0
  88. package/dist/dnd/types.d.ts.map +1 -0
  89. package/dist/flags/flags.d.ts +5 -0
  90. package/dist/flags/flags.d.ts.map +1 -0
  91. package/dist/form/createFormValidationState.d.ts +2 -9
  92. package/{src → dist}/form/createFormValidationState.d.ts.map +1 -1
  93. package/dist/form/index.d.ts +1 -0
  94. package/dist/form/index.d.ts.map +1 -0
  95. package/dist/grid/createGridState.d.ts +3 -2
  96. package/dist/grid/createGridState.d.ts.map +1 -0
  97. package/dist/grid/index.d.ts +1 -0
  98. package/dist/grid/index.d.ts.map +1 -0
  99. package/dist/grid/types.d.ts +23 -1
  100. package/dist/grid/types.d.ts.map +1 -0
  101. package/dist/index.d.ts +4 -2
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +3016 -1579
  104. package/dist/index.js.map +1 -1
  105. package/dist/menu/index.d.ts +2 -1
  106. package/dist/menu/index.d.ts.map +1 -0
  107. package/dist/numberfield/createNumberFieldState.d.ts +31 -6
  108. package/dist/numberfield/createNumberFieldState.d.ts.map +1 -0
  109. package/dist/numberfield/index.d.ts +1 -0
  110. package/dist/numberfield/index.d.ts.map +1 -0
  111. package/dist/overlays/createOverlayTriggerState.d.ts +12 -1
  112. package/dist/overlays/createOverlayTriggerState.d.ts.map +1 -0
  113. package/dist/overlays/index.d.ts +1 -0
  114. package/dist/overlays/index.d.ts.map +1 -0
  115. package/dist/private/flags/flags.js +26 -0
  116. package/dist/private/flags/flags.js.map +1 -0
  117. package/dist/radio/createRadioGroupState.d.ts +1 -0
  118. package/dist/radio/createRadioGroupState.d.ts.map +1 -0
  119. package/dist/radio/index.d.ts +1 -0
  120. package/dist/radio/index.d.ts.map +1 -0
  121. package/dist/searchfield/createSearchFieldState.d.ts +2 -5
  122. package/dist/searchfield/createSearchFieldState.d.ts.map +1 -0
  123. package/dist/searchfield/index.d.ts +1 -0
  124. package/dist/searchfield/index.d.ts.map +1 -0
  125. package/dist/select/createSelectState.d.ts +17 -6
  126. package/dist/select/createSelectState.d.ts.map +1 -0
  127. package/dist/select/index.d.ts +1 -0
  128. package/dist/select/index.d.ts.map +1 -0
  129. package/dist/selection/Selection.d.ts +2 -1
  130. package/dist/selection/Selection.d.ts.map +1 -0
  131. package/dist/selection/SelectionManager.d.ts +1 -19
  132. package/dist/selection/SelectionManager.d.ts.map +1 -0
  133. package/dist/selection/createMultipleSelectionState.d.ts +2 -13
  134. package/dist/selection/createMultipleSelectionState.d.ts.map +1 -0
  135. package/dist/selection/index.d.ts +1 -0
  136. package/dist/selection/index.d.ts.map +1 -0
  137. package/dist/slider/createSliderState.d.ts +2 -5
  138. package/dist/slider/createSliderState.d.ts.map +1 -0
  139. package/dist/slider/index.d.ts +1 -0
  140. package/dist/slider/index.d.ts.map +1 -0
  141. package/dist/ssr/index.d.ts +2 -7
  142. package/dist/ssr/index.d.ts.map +1 -0
  143. package/dist/steplist/createStepListState.d.ts +2 -5
  144. package/dist/steplist/createStepListState.d.ts.map +1 -0
  145. package/dist/steplist/index.d.ts +1 -0
  146. package/dist/steplist/index.d.ts.map +1 -0
  147. package/dist/table/TableCollection.d.ts +1 -0
  148. package/dist/table/TableCollection.d.ts.map +1 -0
  149. package/dist/table/createTableColumnResizeState.d.ts +2 -9
  150. package/dist/table/createTableColumnResizeState.d.ts.map +1 -0
  151. package/dist/table/createTableState.d.ts +2 -5
  152. package/dist/table/createTableState.d.ts.map +1 -0
  153. package/dist/table/createTreeGridState.d.ts +2 -8
  154. package/dist/table/createTreeGridState.d.ts.map +1 -0
  155. package/dist/table/index.d.ts +1 -0
  156. package/dist/table/index.d.ts.map +1 -0
  157. package/dist/table/types.d.ts +35 -1
  158. package/dist/table/types.d.ts.map +1 -0
  159. package/dist/tabs/createTabListState.d.ts +2 -5
  160. package/dist/tabs/createTabListState.d.ts.map +1 -0
  161. package/dist/tabs/index.d.ts +1 -0
  162. package/dist/tabs/index.d.ts.map +1 -0
  163. package/dist/textfield/createTextFieldState.d.ts +1 -0
  164. package/dist/textfield/createTextFieldState.d.ts.map +1 -0
  165. package/dist/textfield/index.d.ts +1 -0
  166. package/dist/textfield/index.d.ts.map +1 -0
  167. package/dist/toast/createToastState.d.ts +2 -5
  168. package/dist/toast/createToastState.d.ts.map +1 -0
  169. package/dist/toast/index.d.ts +1 -0
  170. package/dist/toast/index.d.ts.map +1 -0
  171. package/dist/toggle/createToggleGroupState.d.ts +1 -0
  172. package/dist/toggle/createToggleGroupState.d.ts.map +1 -0
  173. package/dist/toggle/createToggleState.d.ts +1 -0
  174. package/dist/toggle/createToggleState.d.ts.map +1 -0
  175. package/dist/toggle/index.d.ts +1 -0
  176. package/dist/toggle/index.d.ts.map +1 -0
  177. package/dist/tokenfield/TokenFieldValue.d.ts +72 -0
  178. package/dist/tokenfield/TokenFieldValue.d.ts.map +1 -0
  179. package/dist/tokenfield/createTokenFieldState.d.ts +33 -0
  180. package/dist/tokenfield/createTokenFieldState.d.ts.map +1 -0
  181. package/dist/tokenfield/index.d.ts +3 -0
  182. package/dist/tokenfield/index.d.ts.map +1 -0
  183. package/dist/tooltip/createTooltipTriggerState.d.ts +9 -8
  184. package/dist/tooltip/createTooltipTriggerState.d.ts.map +1 -0
  185. package/dist/tooltip/index.d.ts +1 -0
  186. package/dist/tooltip/index.d.ts.map +1 -0
  187. package/dist/tree/TreeCollection.d.ts +1 -0
  188. package/dist/tree/TreeCollection.d.ts.map +1 -0
  189. package/dist/tree/createTreeState.d.ts +2 -7
  190. package/{src → dist}/tree/createTreeState.d.ts.map +1 -1
  191. package/dist/tree/index.d.ts +1 -0
  192. package/dist/tree/index.d.ts.map +1 -0
  193. package/dist/tree/types.d.ts +19 -1
  194. package/dist/tree/types.d.ts.map +1 -0
  195. package/dist/utils/index.d.ts +3 -1
  196. package/dist/utils/index.d.ts.map +1 -0
  197. package/dist/utils/owner.d.ts +9 -0
  198. package/dist/utils/owner.d.ts.map +1 -0
  199. package/dist/utils/reactivity.d.ts +19 -0
  200. package/dist/utils/reactivity.d.ts.map +1 -0
  201. package/package.json +23 -9
  202. package/src/autocomplete/createAutocompleteState.ts +18 -4
  203. package/src/calendar/IncompleteDate.ts +15 -1
  204. package/src/calendar/createCalendarState.ts +194 -79
  205. package/src/calendar/createDateFieldState.ts +60 -42
  206. package/src/calendar/createDatePickerState.ts +32 -14
  207. package/src/calendar/createRangeCalendarState.ts +136 -74
  208. package/src/calendar/createTimeFieldState.ts +25 -6
  209. package/src/calendar/intl/index.ts +205 -142
  210. package/src/checkbox/createCheckboxGroupState.ts +29 -13
  211. package/src/collections/ListCollection.ts +31 -0
  212. package/src/collections/createListState.ts +23 -6
  213. package/src/collections/createMenuState.ts +59 -14
  214. package/src/collections/createSelectionState.ts +32 -12
  215. package/src/collections/getChildNodes.ts +20 -3
  216. package/src/collections/index.ts +2 -0
  217. package/src/collections/types.ts +35 -2
  218. package/src/color/Color.ts +66 -29
  219. package/src/color/createColorAreaState.ts +29 -4
  220. package/src/color/createColorFieldState.ts +37 -11
  221. package/src/color/createColorSliderState.ts +36 -7
  222. package/src/color/createColorWheelState.ts +20 -4
  223. package/src/color/getColorChannels.ts +16 -0
  224. package/src/color/index.ts +1 -0
  225. package/src/color/intl/index.ts +890 -855
  226. package/src/color/types.ts +1 -1
  227. package/src/combobox/createComboBoxState.ts +178 -195
  228. package/src/data/createAsyncList.ts +22 -2
  229. package/src/data/createListData.ts +19 -2
  230. package/src/data/createTreeData.ts +19 -3
  231. package/src/disclosure/createDisclosureState.ts +40 -19
  232. package/src/dnd/createDragState.ts +22 -4
  233. package/src/dnd/createDraggableCollectionState.ts +137 -10
  234. package/src/dnd/createDropState.ts +21 -3
  235. package/src/dnd/createDroppableCollectionState.ts +117 -11
  236. package/src/dnd/index.ts +4 -0
  237. package/src/dnd/types.ts +16 -0
  238. package/src/flags/flags.ts +25 -0
  239. package/src/form/createFormValidationState.ts +54 -36
  240. package/src/grid/createGridState.ts +187 -109
  241. package/src/grid/types.ts +22 -1
  242. package/src/index.ts +15 -0
  243. package/src/menu/index.ts +2 -0
  244. package/src/numberfield/createNumberFieldState.ts +153 -66
  245. package/src/overlays/createOverlayTriggerState.ts +31 -4
  246. package/src/radio/createRadioGroupState.ts +19 -5
  247. package/src/searchfield/createSearchFieldState.ts +18 -3
  248. package/src/select/createSelectState.ts +73 -8
  249. package/src/selection/Selection.ts +15 -1
  250. package/src/selection/SelectionManager.ts +14 -0
  251. package/src/selection/createMultipleSelectionState.ts +44 -25
  252. package/src/slider/createSliderState.ts +20 -5
  253. package/src/ssr/index.ts +27 -4
  254. package/src/steplist/createStepListState.ts +38 -17
  255. package/src/table/TableCollection.ts +14 -0
  256. package/src/table/createTableColumnResizeState.ts +20 -3
  257. package/src/table/createTableState.ts +22 -1
  258. package/src/table/createTreeGridState.ts +21 -4
  259. package/src/table/types.ts +36 -3
  260. package/src/tabs/createTabListState.ts +77 -34
  261. package/src/textfield/createTextFieldState.ts +17 -3
  262. package/src/toast/createToastState.ts +28 -3
  263. package/src/toggle/createToggleGroupState.ts +20 -5
  264. package/src/toggle/createToggleState.ts +19 -4
  265. package/src/tokenfield/TokenFieldValue.ts +440 -0
  266. package/src/tokenfield/createTokenFieldState.ts +88 -0
  267. package/src/tokenfield/index.ts +14 -0
  268. package/src/tooltip/createTooltipTriggerState.ts +49 -13
  269. package/src/tree/TreeCollection.ts +14 -0
  270. package/src/tree/createTreeState.ts +62 -35
  271. package/src/tree/types.ts +18 -1
  272. package/src/utils/index.ts +9 -1
  273. package/src/utils/owner.ts +20 -0
  274. package/src/utils/reactivity.ts +45 -1
  275. package/src/autocomplete/createAutocompleteState.d.ts +0 -48
  276. package/src/autocomplete/createAutocompleteState.d.ts.map +0 -1
  277. package/src/autocomplete/index.d.ts +0 -6
  278. package/src/autocomplete/index.d.ts.map +0 -1
  279. package/src/calendar/createCalendarState.d.ts +0 -152
  280. package/src/calendar/createCalendarState.d.ts.map +0 -1
  281. package/src/calendar/createDateFieldState.d.ts +0 -145
  282. package/src/calendar/createDateFieldState.d.ts.map +0 -1
  283. package/src/calendar/createRangeCalendarState.d.ts +0 -171
  284. package/src/calendar/createRangeCalendarState.d.ts.map +0 -1
  285. package/src/calendar/createTimeFieldState.d.ts +0 -97
  286. package/src/calendar/createTimeFieldState.d.ts.map +0 -1
  287. package/src/calendar/index.d.ts +0 -80
  288. package/src/calendar/index.d.ts.map +0 -1
  289. package/src/checkbox/createCheckboxGroupState.d.ts +0 -73
  290. package/src/checkbox/createCheckboxGroupState.d.ts.map +0 -1
  291. package/src/checkbox/index.d.ts +0 -6
  292. package/src/checkbox/index.d.ts.map +0 -1
  293. package/src/collections/ListCollection.d.ts +0 -40
  294. package/src/collections/ListCollection.d.ts.map +0 -1
  295. package/src/collections/createListState.d.ts +0 -94
  296. package/src/collections/createListState.d.ts.map +0 -1
  297. package/src/collections/createMenuState.d.ts +0 -55
  298. package/src/collections/createMenuState.d.ts.map +0 -1
  299. package/src/collections/createSelectionState.d.ts +0 -89
  300. package/src/collections/createSelectionState.d.ts.map +0 -1
  301. package/src/collections/index.d.ts +0 -38
  302. package/src/collections/index.d.ts.map +0 -1
  303. package/src/collections/types.d.ts +0 -147
  304. package/src/collections/types.d.ts.map +0 -1
  305. package/src/color/Color.d.ts +0 -43
  306. package/src/color/Color.d.ts.map +0 -1
  307. package/src/color/createColorAreaState.d.ts +0 -78
  308. package/src/color/createColorAreaState.d.ts.map +0 -1
  309. package/src/color/createColorFieldState.d.ts +0 -57
  310. package/src/color/createColorFieldState.d.ts.map +0 -1
  311. package/src/color/createColorSliderState.d.ts +0 -69
  312. package/src/color/createColorSliderState.d.ts.map +0 -1
  313. package/src/color/createColorWheelState.d.ts +0 -53
  314. package/src/color/createColorWheelState.d.ts.map +0 -1
  315. package/src/color/index.d.ts +0 -39
  316. package/src/color/index.d.ts.map +0 -1
  317. package/src/color/types.d.ts +0 -111
  318. package/src/color/types.d.ts.map +0 -1
  319. package/src/combobox/createComboBoxState.d.ts +0 -127
  320. package/src/combobox/createComboBoxState.d.ts.map +0 -1
  321. package/src/combobox/index.d.ts +0 -13
  322. package/src/combobox/index.d.ts.map +0 -1
  323. package/src/disclosure/createDisclosureState.d.ts +0 -68
  324. package/src/disclosure/createDisclosureState.d.ts.map +0 -1
  325. package/src/disclosure/index.d.ts +0 -10
  326. package/src/disclosure/index.d.ts.map +0 -1
  327. package/src/dnd/createDragState.d.ts +0 -68
  328. package/src/dnd/createDragState.d.ts.map +0 -1
  329. package/src/dnd/createDraggableCollectionState.d.ts +0 -68
  330. package/src/dnd/createDraggableCollectionState.d.ts.map +0 -1
  331. package/src/dnd/createDropState.d.ts +0 -80
  332. package/src/dnd/createDropState.d.ts.map +0 -1
  333. package/src/dnd/createDroppableCollectionState.d.ts +0 -107
  334. package/src/dnd/createDroppableCollectionState.d.ts.map +0 -1
  335. package/src/dnd/index.d.ts +0 -60
  336. package/src/dnd/index.d.ts.map +0 -1
  337. package/src/dnd/types.d.ts +0 -277
  338. package/src/dnd/types.d.ts.map +0 -1
  339. package/src/form/createFormValidationState.d.ts +0 -102
  340. package/src/form/index.d.ts +0 -16
  341. package/src/form/index.d.ts.map +0 -1
  342. package/src/grid/createGridState.d.ts +0 -15
  343. package/src/grid/createGridState.d.ts.map +0 -1
  344. package/src/grid/index.d.ts +0 -7
  345. package/src/grid/index.d.ts.map +0 -1
  346. package/src/grid/types.d.ts +0 -163
  347. package/src/grid/types.d.ts.map +0 -1
  348. package/src/index.d.ts +0 -311
  349. package/src/index.d.ts.map +0 -1
  350. package/src/numberfield/createNumberFieldState.d.ts +0 -67
  351. package/src/numberfield/createNumberFieldState.d.ts.map +0 -1
  352. package/src/numberfield/index.d.ts +0 -6
  353. package/src/numberfield/index.d.ts.map +0 -1
  354. package/src/overlays/createOverlayTriggerState.d.ts +0 -34
  355. package/src/overlays/createOverlayTriggerState.d.ts.map +0 -1
  356. package/src/overlays/index.d.ts +0 -6
  357. package/src/overlays/index.d.ts.map +0 -1
  358. package/src/radio/createRadioGroupState.d.ts +0 -79
  359. package/src/radio/createRadioGroupState.d.ts.map +0 -1
  360. package/src/radio/index.d.ts +0 -7
  361. package/src/radio/index.d.ts.map +0 -1
  362. package/src/searchfield/createSearchFieldState.d.ts +0 -27
  363. package/src/searchfield/createSearchFieldState.d.ts.map +0 -1
  364. package/src/searchfield/index.d.ts +0 -3
  365. package/src/searchfield/index.d.ts.map +0 -1
  366. package/src/select/createSelectState.d.ts +0 -75
  367. package/src/select/createSelectState.d.ts.map +0 -1
  368. package/src/select/index.d.ts +0 -2
  369. package/src/select/index.d.ts.map +0 -1
  370. package/src/slider/createSliderState.d.ts +0 -72
  371. package/src/slider/createSliderState.d.ts.map +0 -1
  372. package/src/slider/index.d.ts +0 -3
  373. package/src/slider/index.d.ts.map +0 -1
  374. package/src/ssr/index.d.ts +0 -28
  375. package/src/ssr/index.d.ts.map +0 -1
  376. package/src/table/TableCollection.d.ts +0 -54
  377. package/src/table/TableCollection.d.ts.map +0 -1
  378. package/src/table/createTableState.d.ts +0 -15
  379. package/src/table/createTableState.d.ts.map +0 -1
  380. package/src/table/index.d.ts +0 -18
  381. package/src/table/index.d.ts.map +0 -1
  382. package/src/table/types.d.ts +0 -145
  383. package/src/table/types.d.ts.map +0 -1
  384. package/src/tabs/createTabListState.d.ts +0 -70
  385. package/src/tabs/createTabListState.d.ts.map +0 -1
  386. package/src/tabs/index.d.ts +0 -8
  387. package/src/tabs/index.d.ts.map +0 -1
  388. package/src/textfield/createTextFieldState.d.ts +0 -32
  389. package/src/textfield/createTextFieldState.d.ts.map +0 -1
  390. package/src/textfield/index.d.ts +0 -6
  391. package/src/textfield/index.d.ts.map +0 -1
  392. package/src/toast/createToastState.d.ts +0 -129
  393. package/src/toast/createToastState.d.ts.map +0 -1
  394. package/src/toast/index.d.ts +0 -12
  395. package/src/toast/index.d.ts.map +0 -1
  396. package/src/toggle/createToggleState.d.ts +0 -34
  397. package/src/toggle/createToggleState.d.ts.map +0 -1
  398. package/src/toggle/index.d.ts +0 -2
  399. package/src/toggle/index.d.ts.map +0 -1
  400. package/src/tooltip/createTooltipTriggerState.d.ts +0 -39
  401. package/src/tooltip/createTooltipTriggerState.d.ts.map +0 -1
  402. package/src/tooltip/index.d.ts +0 -7
  403. package/src/tooltip/index.d.ts.map +0 -1
  404. package/src/tree/TreeCollection.d.ts +0 -43
  405. package/src/tree/TreeCollection.d.ts.map +0 -1
  406. package/src/tree/createTreeState.d.ts +0 -17
  407. package/src/tree/index.d.ts +0 -13
  408. package/src/tree/index.d.ts.map +0 -1
  409. package/src/tree/types.d.ts +0 -162
  410. package/src/tree/types.d.ts.map +0 -1
  411. package/src/utils/index.d.ts +0 -2
  412. package/src/utils/index.d.ts.map +0 -1
  413. package/src/utils/reactivity.d.ts +0 -28
  414. package/src/utils/reactivity.d.ts.map +0 -1
@@ -1,15 +1,35 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/select/useSelectState.ts
14
+
1
15
  /**
2
16
  * State management for select components.
3
17
  * Based on @react-stately/select useSelectState.
4
18
  */
5
19
 
6
- import { createSignal, createMemo, type Accessor } from "solid-js";
7
- import { access, type MaybeAccessor } from "../utils";
20
+ import { createMemo } from "solid-js";
21
+ import type { Accessor } from "solid-js";
22
+ import { createInternalSignal, access, type MaybeAccessor } from "../utils";
8
23
  import { createListState } from "../collections/createListState";
9
24
  import { createOverlayTriggerState } from "../overlays";
10
25
  import type { Key, CollectionNode, Collection } from "../collections/types";
11
26
  import type { SelectionMode, Selection } from "../collections/types";
12
27
  import type { SelectionManager } from "../selection/SelectionManager";
28
+ import {
29
+ createFormValidationState,
30
+ type FormValidationState,
31
+ type ValidationFunction,
32
+ } from "../form";
13
33
 
14
34
  export interface SelectStateProps<T = unknown> {
15
35
  /** The items to display in the select. */
@@ -46,9 +66,22 @@ export interface SelectStateProps<T = unknown> {
46
66
  isDisabled?: boolean;
47
67
  /** Whether the select is required. */
48
68
  isRequired?: boolean;
69
+ /** Whether the select is invalid (controlled). */
70
+ isInvalid?: boolean;
71
+ /** @deprecated Use isInvalid instead. */
72
+ validationState?: "valid" | "invalid";
73
+ /** Custom validation function. */
74
+ validate?: ValidationFunction<Key | null | Selection>;
75
+ /**
76
+ * Whether to use native HTML form validation or ARIA validation semantics.
77
+ * @default "native"
78
+ */
79
+ validationBehavior?: "aria" | "native";
80
+ /** Field name(s) for server error lookup. */
81
+ name?: string | string[];
49
82
  }
50
83
 
51
- export interface SelectState<T = unknown> {
84
+ export interface SelectState<T = unknown> extends FormValidationState {
52
85
  /** The collection of items. */
53
86
  readonly collection: Accessor<Collection<T>>;
54
87
  /**
@@ -120,10 +153,10 @@ export function createSelectState<T = unknown>(
120
153
  // Track selected key
121
154
  const isControlledSingle = () => getProps().selectedKey !== undefined;
122
155
  const isControlledMultiple = () => getProps().selectedKeys !== undefined;
123
- const [internalSelectedKey, setInternalSelectedKey] = createSignal<Key | null>(
156
+ const [internalSelectedKey, setInternalSelectedKey] = createInternalSignal<Key | null>(
124
157
  getProps().defaultSelectedKey ?? null,
125
158
  );
126
- const [internalSelectedKeys, setInternalSelectedKeys] = createSignal<Selection>(
159
+ const [internalSelectedKeys, setInternalSelectedKeys] = createInternalSignal<Selection>(
127
160
  getProps().defaultSelectedKeys === "all"
128
161
  ? "all"
129
162
  : new Set(getProps().defaultSelectedKeys ?? []),
@@ -193,6 +226,27 @@ export function createSelectState<T = unknown>(
193
226
  setSelectedKey(key);
194
227
  };
195
228
 
229
+ const validation = createFormValidationState({
230
+ get value() {
231
+ return selectionMode() === "multiple" ? selectedKeys() : selectedKey();
232
+ },
233
+ get isInvalid() {
234
+ return getProps().isInvalid;
235
+ },
236
+ get validationState() {
237
+ return getProps().validationState;
238
+ },
239
+ get validate() {
240
+ return getProps().validate;
241
+ },
242
+ get name() {
243
+ return getProps().name;
244
+ },
245
+ get validationBehavior() {
246
+ return getProps().validationBehavior ?? "native";
247
+ },
248
+ });
249
+
196
250
  // Create list state with select selection mode
197
251
  const listState = createListState<T>({
198
252
  get items() {
@@ -213,7 +267,12 @@ export function createSelectState<T = unknown>(
213
267
  get selectionMode() {
214
268
  return selectionMode();
215
269
  },
216
- disallowEmptySelection: true,
270
+ // Upstream only requires a value in single-selection mode. Multiple
271
+ // selection must permit toggling the last selected option off.
272
+ get disallowEmptySelection() {
273
+ return selectionMode() === "single";
274
+ },
275
+ allowDuplicateSelectionEvents: true,
217
276
  get selectedKeys() {
218
277
  const keys = selectedKeys();
219
278
  if (keys === "all") return "all";
@@ -228,6 +287,7 @@ export function createSelectState<T = unknown>(
228
287
  if (keys !== "all") {
229
288
  getProps().onSelectionChange?.(keys.size > 0 ? Array.from(keys)[0] : null);
230
289
  }
290
+ validation.commitValidation();
231
291
  return;
232
292
  }
233
293
 
@@ -235,8 +295,8 @@ export function createSelectState<T = unknown>(
235
295
  if (keys === "all") return;
236
296
  const key = keys.size > 0 ? Array.from(keys)[0] : null;
237
297
  setSelectedKey(key);
238
- // Close the dropdown after selection in single mode
239
298
  overlayState.close();
299
+ validation.commitValidation();
240
300
  },
241
301
  });
242
302
 
@@ -244,7 +304,7 @@ export function createSelectState<T = unknown>(
244
304
  // focus-within state on the selection manager — upstream useSelectState keeps
245
305
  // these apart with a dedicated useState. Sharing the manager's signal makes
246
306
  // trigger focus re-arm the item roving-focus effect and steal focus back.
247
- const [isFocused, setFocused] = createSignal(false);
307
+ const [isFocused, setFocused] = createInternalSignal(false);
248
308
 
249
309
  // Get the selected item from the collection (memoized)
250
310
  const selectedItem: Accessor<CollectionNode<T> | null> = createMemo(() => {
@@ -268,6 +328,11 @@ export function createSelectState<T = unknown>(
268
328
  });
269
329
 
270
330
  return {
331
+ realtimeValidation: validation.realtimeValidation,
332
+ displayValidation: validation.displayValidation,
333
+ updateValidation: validation.updateValidation,
334
+ resetValidation: validation.resetValidation,
335
+ commitValidation: validation.commitValidation,
271
336
  // Collection
272
337
  collection: listState.collection,
273
338
  selectionManager: listState.selectionManager,
@@ -1,8 +1,22 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/selection/Selection.ts
14
+
1
15
  /**
2
16
  * A Selection is a special Set containing Keys, which also has an anchor
3
17
  * and current selected key for use when range selecting.
4
18
  *
5
- * Based on @react-stately/selection.
19
+ * Ported from packages/react-stately/src/selection/Selection.ts.
6
20
  */
7
21
 
8
22
  import type { Key } from "../collections/types";
@@ -1,3 +1,17 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/selection/SelectionManager.ts
14
+
1
15
  /**
2
16
  * An interface for reading and updating multiple selection state.
3
17
  *
@@ -1,18 +1,31 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/selection/useMultipleSelectionState.ts
14
+
1
15
  /**
2
16
  * Raw multiple-selection + focus state for a collection.
3
17
  *
4
18
  * The lower of the two selection layers ported from upstream
5
- * (`@react-stately/selection`'s `useMultipleSelectionState`): it owns the
19
+ * (`packages/react-stately/src/selection/useMultipleSelectionState.ts`): it owns the
6
20
  * selected keys, focus, selection behavior, and disabled keys, but is NOT
7
21
  * collection-aware. The collection-aware operations (toggle, extend, select
8
22
  * all, range, etc.) live in {@link SelectionManager}, which is built on top of
9
23
  * this state.
10
- *
11
- * Based on @react-stately/selection.
12
24
  */
13
25
 
14
- import { createSignal, createMemo, createComputed, untrack, type Accessor } from "solid-js";
15
- import { access, type MaybeAccessor } from "../utils";
26
+ import { createMemo, createEffect } from "solid-js";
27
+ import type { Accessor } from "solid-js";
28
+ import { access, createInternalSignal, readNow, type MaybeAccessor } from "../utils";
16
29
  import type { SelectionStateProps } from "../collections/createSelectionState";
17
30
  import type {
18
31
  DisabledBehavior,
@@ -105,16 +118,18 @@ export function createMultipleSelectionState(
105
118
 
106
119
  // Focus is a plain signal in Solid; upstream needs a ref + state pair only
107
120
  // because React requires both a synchronous read and a re-render trigger.
108
- const [isFocused, setIsFocused] = createSignal(false);
109
- const [focusedKey, setFocusedKeySignal] = createSignal<Key | null>(null);
110
- const [childFocusStrategy, setChildFocusStrategy] = createSignal<FocusStrategy | null>(null);
121
+ const [isFocused, setIsFocused] = createInternalSignal(false);
122
+ const [focusedKey, setFocusedKeySignal] = createInternalSignal<Key | null>(null);
123
+ const [childFocusStrategy, setChildFocusStrategy] = createInternalSignal<FocusStrategy | null>(
124
+ null,
125
+ );
111
126
 
112
127
  const defaultSelectedKeys = convertSelection(
113
128
  getProps().defaultSelectedKeys,
114
129
  new SelectionClass(),
115
130
  );
116
131
  const [uncontrolledSelectedKeys, setUncontrolledSelectedKeys] =
117
- createSignal<Selection>(defaultSelectedKeys);
132
+ createInternalSignal<Selection>(defaultSelectedKeys);
118
133
 
119
134
  const selectedKeys = createMemo<Selection>(() => {
120
135
  const p = getProps();
@@ -130,27 +145,28 @@ export function createMultipleSelectionState(
130
145
  const selectionBehaviorProp = (): SelectionBehavior => getProps().selectionBehavior ?? "toggle";
131
146
 
132
147
  const [selectionBehavior, setSelectionBehaviorState] =
133
- createSignal<SelectionBehavior>(selectionBehaviorProp());
148
+ createInternalSignal<SelectionBehavior>(selectionBehaviorProp());
134
149
 
135
150
  // If the selectionBehavior prop is 'replace' but the current state is 'toggle'
136
151
  // (e.g. due to a long press to enter selection mode on touch) and the
137
152
  // selection becomes empty, reset the behavior back to 'replace'.
138
- createComputed(() => {
139
- const keys = selectedKeys();
140
- if (
141
- selectionBehaviorProp() === "replace" &&
142
- untrack(selectionBehavior) === "toggle" &&
143
- typeof keys === "object" &&
144
- keys.size === 0
145
- ) {
146
- setSelectionBehaviorState("replace");
147
- }
148
- });
153
+ createEffect(
154
+ () => ({ keys: selectedKeys(), prop: selectionBehaviorProp() }),
155
+ ({ keys, prop }) => {
156
+ if (
157
+ prop === "replace" &&
158
+ selectionBehavior() === "toggle" &&
159
+ typeof keys === "object" &&
160
+ keys.size === 0
161
+ ) {
162
+ setSelectionBehaviorState("replace");
163
+ }
164
+ },
165
+ );
149
166
 
150
167
  // If the selectionBehavior prop changes, sync it into state.
151
168
  let lastSelectionBehavior = selectionBehaviorProp();
152
- createComputed(() => {
153
- const prop = selectionBehaviorProp();
169
+ createEffect(selectionBehaviorProp, (prop) => {
154
170
  if (prop !== lastSelectionBehavior) {
155
171
  setSelectionBehaviorState(prop);
156
172
  lastSelectionBehavior = prop;
@@ -169,9 +185,12 @@ export function createMultipleSelectionState(
169
185
  getProps().onSelectionChange?.(keys);
170
186
  };
171
187
 
188
+ const liveSelectedKeys = (): Selection =>
189
+ getProps().selectedKeys !== undefined ? selectedKeys() : readNow(uncontrolledSelectedKeys);
190
+
172
191
  const setSelectedKeys = (keys: Selection) => {
173
192
  const p = getProps();
174
- const current = selectedKeys();
193
+ const current = liveSelectedKeys();
175
194
  const shouldUpdate =
176
195
  p.allowDuplicateSelectionEvents ||
177
196
  keys === "all" ||
@@ -227,7 +246,7 @@ export function createMultipleSelectionState(
227
246
  setChildFocusStrategy(strategy);
228
247
  },
229
248
  get selectedKeys() {
230
- return selectedKeys();
249
+ return liveSelectedKeys();
231
250
  },
232
251
  get lastSelectionEvent() {
233
252
  return lastSelectionEvent;
@@ -1,10 +1,25 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/slider/useSliderState.ts
14
+
1
15
  /**
2
16
  * Creates state for a slider component.
3
17
  * Based on @react-stately/slider useSliderState.
4
18
  */
5
19
 
6
- import { type Accessor, createSignal, createMemo } from "solid-js";
7
- import { access, type MaybeAccessor } from "../utils";
20
+ import { createMemo } from "solid-js";
21
+ import type { Accessor } from "solid-js";
22
+ import { createInternalSignal, access, type MaybeAccessor } from "../utils";
8
23
 
9
24
  export type SliderOrientation = "horizontal" | "vertical";
10
25
 
@@ -119,7 +134,7 @@ export function createSliderState(props: MaybeAccessor<SliderStateProps>): Slide
119
134
  const isControlled = () => getProps().value !== undefined;
120
135
 
121
136
  // Internal signal for uncontrolled mode
122
- const [internalValue, setInternalValue] = createSignal(
137
+ const [internalValue, setInternalValue] = createInternalSignal(
123
138
  snapToStep(
124
139
  initialProps.defaultValue ?? initialMinValue,
125
140
  initialMinValue,
@@ -129,8 +144,8 @@ export function createSliderState(props: MaybeAccessor<SliderStateProps>): Slide
129
144
  );
130
145
 
131
146
  // Dragging and focus state
132
- const [isDragging, setIsDragging] = createSignal(false);
133
- const [isFocused, setIsFocused] = createSignal(false);
147
+ const [isDragging, setIsDragging] = createInternalSignal(false);
148
+ const [isFocused, setIsFocused] = createInternalSignal(false);
134
149
 
135
150
  // Current value accessor
136
151
  const value = createMemo(() => {
package/src/ssr/index.ts CHANGED
@@ -1,15 +1,34 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/ssr/SSRProvider.tsx
14
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/utils/useId.ts
15
+
1
16
  /**
2
17
  * SSR utilities for Solid Stately
3
18
  *
4
19
  * SolidJS has built-in SSR support with `isServer` and `createUniqueId()`.
5
- * These utilities provide a consistent API matching React-Stately's patterns.
20
+ * These utilities provide a consistent port of the upstream SSR API.
21
+ *
22
+ * Ported from:
23
+ * - packages/react-aria/src/ssr/SSRProvider.tsx
24
+ * - packages/react-aria/src/utils/useId.ts
6
25
  */
7
26
 
8
27
  import { createUniqueId } from "solid-js";
9
- import { isServer as _isServer } from "solid-js/web";
28
+ import { isServer as _isServer } from "@solidjs/web";
10
29
 
11
30
  /**
12
- * Re-export isServer from solid-js/web for convenience.
31
+ * Re-export isServer from @solidjs/web for convenience.
13
32
  */
14
33
  export const isServer = _isServer;
15
34
 
@@ -28,10 +47,14 @@ export function createIsSSR(): boolean {
28
47
  * @param defaultId - Optional default ID to use instead of generating one.
29
48
  */
30
49
  export function createId(defaultId?: string): string {
50
+ // Generate first, choose second, like upstream `useId`: `createUniqueId` is
51
+ // order-dependent in both of its branches, so returning early on `defaultId`
52
+ // would shift every later id in the same render or hydration pass.
53
+ const uniqueId = createUniqueId();
31
54
  if (defaultId) {
32
55
  return defaultId;
33
56
  }
34
- return `solid-stately-${createUniqueId()}`;
57
+ return `solid-stately-${uniqueId}`;
35
58
  }
36
59
 
37
60
  /**
@@ -1,9 +1,28 @@
1
+ /*
2
+ * Copyright 2023 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/steplist/useStepListState.ts
14
+
1
15
  /**
2
16
  * State management for step list components.
3
17
  * Tracks selected step, completion status, and selectability.
18
+ *
19
+ * Ported from packages/react-stately/src/steplist/useStepListState.ts.
4
20
  */
5
21
 
6
- import { createEffect, createMemo, createSignal, type Accessor } from "solid-js";
22
+ import { createEffect, createMemo } from "solid-js";
23
+ import type { Accessor } from "solid-js";
24
+ import { createInternalSignal } from "../utils";
25
+
7
26
  import type { Key } from "../collections/types";
8
27
 
9
28
  export interface StepListStateProps {
@@ -64,9 +83,8 @@ export function createStepListState(props: StepListStateProps): StepListState {
64
83
  const isReadOnly: Accessor<boolean> = () => props.isReadOnly ?? false;
65
84
 
66
85
  // Last completed step signal (uncontrolled)
67
- const [lastCompletedStepInternal, setLastCompletedStepInternal] = createSignal<Key | null>(
68
- props.defaultLastCompletedStep ?? null,
69
- );
86
+ const [lastCompletedStepInternal, setLastCompletedStepInternal] =
87
+ createInternalSignal<Key | null>(props.defaultLastCompletedStep ?? null);
70
88
 
71
89
  const lastCompletedStep: Accessor<Key | null> = () => {
72
90
  if (props.lastCompletedStep !== undefined) {
@@ -144,7 +162,7 @@ export function createStepListState(props: StepListStateProps): StepListState {
144
162
  };
145
163
 
146
164
  // Selected key signal (uncontrolled)
147
- const [selectedKeyInternal, setSelectedKeyInternal] = createSignal<Key | null>(
165
+ const [selectedKeyInternal, setSelectedKeyInternal] = createInternalSignal<Key | null>(
148
166
  props.defaultSelectedKey ?? findDefaultSelectedKey(),
149
167
  );
150
168
 
@@ -187,18 +205,21 @@ export function createStepListState(props: StepListStateProps): StepListState {
187
205
  // lastCompleted index), advancing `lastCompletedStep` to `selectedIdx - 1`
188
206
  // marks every intermediate step complete. This runs regardless of
189
207
  // `isDisabled` / `isReadOnly`, exactly as upstream (the effect is ungated).
190
- createEffect(() => {
191
- const selKey = selectedKey();
192
- if (selKey === null) return;
193
- const selIdx = indexMap().get(selKey);
194
- if (selIdx === undefined || selIdx <= 0) return;
195
- const completed = lastCompletedStep();
196
- const lcs = completed !== null ? (indexMap().get(completed) ?? -1) : -1;
197
- if (selIdx > lcs + 1) {
198
- const prevKey = items()[selIdx - 1]?.key;
199
- if (prevKey !== undefined) setLastCompletedStep(prevKey);
200
- }
201
- });
208
+ createEffect(
209
+ () => {
210
+ const selKey = selectedKey();
211
+ if (selKey === null) return null;
212
+ const selIdx = indexMap().get(selKey);
213
+ if (selIdx === undefined || selIdx <= 0) return null;
214
+ const completed = lastCompletedStep();
215
+ const lcs = completed !== null ? (indexMap().get(completed) ?? -1) : -1;
216
+ if (selIdx <= lcs + 1) return null;
217
+ return items()[selIdx - 1]?.key;
218
+ },
219
+ (prevKey) => {
220
+ if (prevKey !== undefined && prevKey !== null) setLastCompletedStep(prevKey);
221
+ },
222
+ );
202
223
 
203
224
  return {
204
225
  selectedKey,
@@ -1,3 +1,17 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/table/TableCollection.ts
14
+
1
15
  /**
2
16
  * TableCollection - A collection class for table data.
3
17
  * Based on @react-stately/table/TableCollection.
@@ -1,3 +1,17 @@
1
+ /*
2
+ * Copyright 2022 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/table/useTableColumnResizeState.ts
14
+
1
15
  /**
2
16
  * Table column resize state management.
3
17
  * Based on @react-stately/table/useTableColumnResizeState.
@@ -7,7 +21,10 @@
7
21
  * width distribution and clamping.
8
22
  */
9
23
 
10
- import { createSignal, createMemo, type Accessor } from "solid-js";
24
+ import { createMemo } from "solid-js";
25
+ import type { Accessor } from "solid-js";
26
+ import { createInternalSignal } from "../utils";
27
+
11
28
  import type { Key } from "../collections/types";
12
29
 
13
30
  /** Column size: a number (px) or a string ('100px', '50%', '1fr'). */
@@ -154,8 +171,8 @@ export function createTableColumnResizeState(
154
171
  );
155
172
 
156
173
  // User-overridden widths (set during/after resize)
157
- const [overrides, setOverrides] = createSignal<Map<Key, number>>(new Map());
158
- const [resizingColumn, setResizingColumn] = createSignal<Key | null>(null);
174
+ const [overrides, setOverrides] = createInternalSignal<Map<Key, number>>(new Map());
175
+ const [resizingColumn, setResizingColumn] = createInternalSignal<Key | null>(null);
159
176
 
160
177
  // Computed widths: initial merged with overrides
161
178
  const columnWidths = createMemo(() => {
@@ -1,9 +1,24 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/table/useTableState.ts
14
+
1
15
  /**
2
16
  * Table state management for Table components.
3
17
  * Based on @react-stately/table/useTableState.
4
18
  */
5
19
 
6
- import { createMemo, type Accessor } from "solid-js";
20
+ import { createMemo } from "solid-js";
21
+ import type { Accessor } from "solid-js";
7
22
  import { createGridState } from "../grid/createGridState";
8
23
  import type { Key } from "../collections/types";
9
24
  import type {
@@ -111,6 +126,12 @@ export function createTableState<
111
126
  get selectedKeys() {
112
127
  return gridState.selectedKeys;
113
128
  },
129
+ get isEmpty() {
130
+ return gridState.isEmpty;
131
+ },
132
+ get isSelectAll() {
133
+ return gridState.isSelectAll;
134
+ },
114
135
 
115
136
  // Grid state methods
116
137
  isSelected: gridState.isSelected,
@@ -1,3 +1,17 @@
1
+ /*
2
+ * Copyright 2023 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/table/useTreeGridState.ts
14
+
1
15
  /**
2
16
  * Tree grid state management for expandable Table rows.
3
17
  * Based on @react-stately/table/useTreeGridState (the `UNSTABLE_` tree-grid feature).
@@ -6,7 +20,10 @@
6
20
  * collection from it, and layers the expansion API on top of {@link createTableState}.
7
21
  */
8
22
 
9
- import { createMemo, createSignal, type Accessor } from "solid-js";
23
+ import { createMemo } from "solid-js";
24
+ import type { Accessor } from "solid-js";
25
+ import { createInternalSignal } from "../utils";
26
+
10
27
  import { createTableState } from "./createTableState";
11
28
  import { createTableCollection, TableCollection } from "./TableCollection";
12
29
  import type { Key } from "../collections/types";
@@ -24,17 +41,17 @@ export function createTreeGridState<
24
41
 
25
42
  // Expanded keys: controlled via `UNSTABLE_expandedKeys`, otherwise the internal signal
26
43
  // seeded from `UNSTABLE_defaultExpandedKeys`.
27
- const [internalExpandedKeys, setInternalExpandedKeys] = createSignal<"all" | Set<Key>>(
44
+ const [internalExpandedKeys, setInternalExpandedKeys] = createInternalSignal<"all" | Set<Key>>(
28
45
  getInitialExpanded(getOptions().UNSTABLE_defaultExpandedKeys),
29
46
  );
30
47
 
31
- const expandedKeys = createMemo<"all" | Set<Key>>(() => {
48
+ const expandedKeys = (): "all" | Set<Key> => {
32
49
  const controlled = getOptions().UNSTABLE_expandedKeys;
33
50
  if (controlled !== undefined) {
34
51
  return convertExpanded(controlled);
35
52
  }
36
53
  return internalExpandedKeys();
37
- });
54
+ };
38
55
 
39
56
  // Rebuild the tree collection whenever the expanded keys (or the data) change.
40
57
  const collection = createMemo(