@proyecto-viviana/ui 0.6.1 → 0.6.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.
Files changed (301) hide show
  1. package/README.md +14 -16
  2. package/dist/_chunk/LinkButton.js +9 -9
  3. package/dist/_chunk/LinkButton.js.map +1 -1
  4. package/dist/_chunk/LinkButton.jsx +9 -9
  5. package/dist/_chunk/LinkButton.jsx.map +1 -1
  6. package/dist/_chunk/RangeCalendar.js +7 -7
  7. package/dist/_chunk/RangeCalendar.js.map +1 -1
  8. package/dist/_chunk/RangeCalendar.jsx +7 -7
  9. package/dist/_chunk/RangeCalendar.jsx.map +1 -1
  10. package/dist/_chunk/Tabs.js +2 -2
  11. package/dist/_chunk/Tabs.jsx +2 -2
  12. package/dist/_chunk/breadcrumbs.js +2 -2
  13. package/dist/_chunk/breadcrumbs.js.map +1 -1
  14. package/dist/_chunk/breadcrumbs.jsx +2 -2
  15. package/dist/_chunk/breadcrumbs.jsx.map +1 -1
  16. package/dist/_chunk/button.js +3 -3
  17. package/dist/_chunk/button.jsx +3 -3
  18. package/dist/_chunk/color.js +4 -4
  19. package/dist/_chunk/color.jsx +4 -4
  20. package/dist/_chunk/form.js +5 -7
  21. package/dist/_chunk/form.js.map +1 -1
  22. package/dist/_chunk/form.jsx +5 -8
  23. package/dist/_chunk/form.jsx.map +1 -1
  24. package/dist/_chunk/layout.js +5 -1
  25. package/dist/_chunk/layout.js.map +1 -1
  26. package/dist/_chunk/layout.jsx +5 -1
  27. package/dist/_chunk/layout.jsx.map +1 -1
  28. package/dist/_chunk/list.js +4 -4
  29. package/dist/_chunk/list.jsx +4 -4
  30. package/dist/_chunk/menu.js +1 -1
  31. package/dist/_chunk/menu.js.map +1 -1
  32. package/dist/_chunk/menu.jsx +1 -1
  33. package/dist/_chunk/menu.jsx.map +1 -1
  34. package/dist/_chunk/numberfield.js +2 -2
  35. package/dist/_chunk/numberfield.jsx +2 -2
  36. package/dist/_chunk/s2-action-button-styles.js +8 -8
  37. package/dist/_chunk/s2-action-button-styles.js.map +1 -1
  38. package/dist/_chunk/s2-action-button-styles.jsx +8 -8
  39. package/dist/_chunk/s2-action-button-styles.jsx.map +1 -1
  40. package/dist/_chunk/s2-menu-styles.js +1 -1
  41. package/dist/_chunk/s2-menu-styles.jsx +1 -1
  42. package/dist/_chunk/slider.js +6 -6
  43. package/dist/_chunk/slider.jsx +6 -6
  44. package/dist/_chunk/switch.js +2 -2
  45. package/dist/_chunk/switch.jsx +2 -2
  46. package/dist/_chunk/table.js +3 -3
  47. package/dist/_chunk/table.js.map +1 -1
  48. package/dist/_chunk/table.jsx +3 -3
  49. package/dist/_chunk/table.jsx.map +1 -1
  50. package/dist/_chunk/text.js +1 -1
  51. package/dist/_chunk/text.jsx +1 -1
  52. package/dist/_chunk/textfield.js +4 -4
  53. package/dist/_chunk/textfield.jsx +4 -4
  54. package/dist/_chunk/toast.js +3 -3
  55. package/dist/_chunk/toast.jsx +3 -3
  56. package/dist/actiongroup/index.js +2 -2
  57. package/dist/actiongroup/index.jsx +2 -2
  58. package/dist/badge/index.js +6 -6
  59. package/dist/badge/index.jsx +6 -6
  60. package/dist/breadcrumbs/index.d.ts.map +1 -1
  61. package/dist/calendar/DateField.d.ts.map +1 -1
  62. package/dist/calendar/DateField.js +2 -2
  63. package/dist/calendar/DateField.js.map +1 -1
  64. package/dist/calendar/DateField.jsx +2 -2
  65. package/dist/calendar/DateField.jsx.map +1 -1
  66. package/dist/calendar/DatePicker.d.ts.map +1 -1
  67. package/dist/calendar/DatePicker.js +2 -2
  68. package/dist/calendar/DatePicker.js.map +1 -1
  69. package/dist/calendar/DatePicker.jsx +2 -2
  70. package/dist/calendar/DatePicker.jsx.map +1 -1
  71. package/dist/calendar/DateRangePicker.js +2 -2
  72. package/dist/calendar/DateRangePicker.jsx +2 -2
  73. package/dist/calendar/RangeCalendar.d.ts.map +1 -1
  74. package/dist/calendar/TimeField.d.ts.map +1 -1
  75. package/dist/calendar/TimeField.js +2 -2
  76. package/dist/calendar/TimeField.js.map +1 -1
  77. package/dist/calendar/TimeField.jsx +2 -2
  78. package/dist/calendar/TimeField.jsx.map +1 -1
  79. package/dist/calendar/index.js +5 -5
  80. package/dist/calendar/index.js.map +1 -1
  81. package/dist/calendar/index.jsx +5 -5
  82. package/dist/calendar/index.jsx.map +1 -1
  83. package/dist/checkbox/index.js +3 -3
  84. package/dist/checkbox/index.jsx +3 -3
  85. package/dist/combobox/index.js +2 -2
  86. package/dist/combobox/index.jsx +2 -2
  87. package/dist/dropzone/index.js +1 -1
  88. package/dist/dropzone/index.jsx +1 -1
  89. package/dist/font-faces.css +13 -6
  90. package/dist/form/index.d.ts.map +1 -1
  91. package/dist/icon/pixel-icons/PixelChartIcon.d.ts.map +1 -1
  92. package/dist/icon/pixel-icons/PixelChartIcon.js.map +1 -1
  93. package/dist/icon/pixel-icons/PixelChartIcon.jsx.map +1 -1
  94. package/dist/icon/pixel-icons/PixelCheckIcon.d.ts.map +1 -1
  95. package/dist/icon/pixel-icons/PixelCheckIcon.js.map +1 -1
  96. package/dist/icon/pixel-icons/PixelCheckIcon.jsx.map +1 -1
  97. package/dist/icon/pixel-icons/PixelChevronDownIcon.d.ts.map +1 -1
  98. package/dist/icon/pixel-icons/PixelChevronDownIcon.js.map +1 -1
  99. package/dist/icon/pixel-icons/PixelChevronDownIcon.jsx.map +1 -1
  100. package/dist/icon/pixel-icons/PixelChevronRightIcon.d.ts.map +1 -1
  101. package/dist/icon/pixel-icons/PixelChevronRightIcon.js.map +1 -1
  102. package/dist/icon/pixel-icons/PixelChevronRightIcon.jsx.map +1 -1
  103. package/dist/icon/pixel-icons/PixelClockIcon.d.ts.map +1 -1
  104. package/dist/icon/pixel-icons/PixelClockIcon.js.map +1 -1
  105. package/dist/icon/pixel-icons/PixelClockIcon.jsx.map +1 -1
  106. package/dist/icon/pixel-icons/PixelCodeIcon.d.ts.map +1 -1
  107. package/dist/icon/pixel-icons/PixelCodeIcon.js.map +1 -1
  108. package/dist/icon/pixel-icons/PixelCodeIcon.jsx.map +1 -1
  109. package/dist/icon/pixel-icons/PixelCommunityIcon.d.ts.map +1 -1
  110. package/dist/icon/pixel-icons/PixelCommunityIcon.js.map +1 -1
  111. package/dist/icon/pixel-icons/PixelCommunityIcon.jsx.map +1 -1
  112. package/dist/icon/pixel-icons/PixelCubeIcon.d.ts.map +1 -1
  113. package/dist/icon/pixel-icons/PixelCubeIcon.js.map +1 -1
  114. package/dist/icon/pixel-icons/PixelCubeIcon.jsx.map +1 -1
  115. package/dist/icon/pixel-icons/PixelFlameIcon.d.ts.map +1 -1
  116. package/dist/icon/pixel-icons/PixelFlameIcon.js.map +1 -1
  117. package/dist/icon/pixel-icons/PixelFlameIcon.jsx.map +1 -1
  118. package/dist/icon/pixel-icons/PixelHomeIcon.d.ts.map +1 -1
  119. package/dist/icon/pixel-icons/PixelHomeIcon.js.map +1 -1
  120. package/dist/icon/pixel-icons/PixelHomeIcon.jsx.map +1 -1
  121. package/dist/icon/pixel-icons/PixelLayoutIcon.d.ts.map +1 -1
  122. package/dist/icon/pixel-icons/PixelLayoutIcon.js.map +1 -1
  123. package/dist/icon/pixel-icons/PixelLayoutIcon.jsx.map +1 -1
  124. package/dist/icon/pixel-icons/PixelMessageIcon.d.ts.map +1 -1
  125. package/dist/icon/pixel-icons/PixelMessageIcon.js.map +1 -1
  126. package/dist/icon/pixel-icons/PixelMessageIcon.jsx.map +1 -1
  127. package/dist/icon/pixel-icons/PixelNavCommunityIcon.d.ts.map +1 -1
  128. package/dist/icon/pixel-icons/PixelNavCommunityIcon.js.map +1 -1
  129. package/dist/icon/pixel-icons/PixelNavCommunityIcon.jsx.map +1 -1
  130. package/dist/icon/pixel-icons/PixelNavExploreIcon.d.ts.map +1 -1
  131. package/dist/icon/pixel-icons/PixelNavExploreIcon.js.map +1 -1
  132. package/dist/icon/pixel-icons/PixelNavExploreIcon.jsx.map +1 -1
  133. package/dist/icon/pixel-icons/PixelNavLiveIcon.d.ts.map +1 -1
  134. package/dist/icon/pixel-icons/PixelNavLiveIcon.js.map +1 -1
  135. package/dist/icon/pixel-icons/PixelNavLiveIcon.jsx.map +1 -1
  136. package/dist/icon/pixel-icons/PixelNavPathwaysIcon.d.ts.map +1 -1
  137. package/dist/icon/pixel-icons/PixelNavPathwaysIcon.js.map +1 -1
  138. package/dist/icon/pixel-icons/PixelNavPathwaysIcon.jsx.map +1 -1
  139. package/dist/icon/pixel-icons/PixelNavPlaygroundIcon.d.ts.map +1 -1
  140. package/dist/icon/pixel-icons/PixelNavPlaygroundIcon.js.map +1 -1
  141. package/dist/icon/pixel-icons/PixelNavPlaygroundIcon.jsx.map +1 -1
  142. package/dist/icon/pixel-icons/PixelNavProjectsIcon.d.ts.map +1 -1
  143. package/dist/icon/pixel-icons/PixelNavProjectsIcon.js.map +1 -1
  144. package/dist/icon/pixel-icons/PixelNavProjectsIcon.jsx.map +1 -1
  145. package/dist/icon/pixel-icons/PixelNavReferenceIcon.d.ts.map +1 -1
  146. package/dist/icon/pixel-icons/PixelNavReferenceIcon.js.map +1 -1
  147. package/dist/icon/pixel-icons/PixelNavReferenceIcon.jsx.map +1 -1
  148. package/dist/icon/pixel-icons/PixelNavSettingsIcon.d.ts.map +1 -1
  149. package/dist/icon/pixel-icons/PixelNavSettingsIcon.js.map +1 -1
  150. package/dist/icon/pixel-icons/PixelNavSettingsIcon.jsx.map +1 -1
  151. package/dist/icon/pixel-icons/PixelNavTopicsIcon.d.ts.map +1 -1
  152. package/dist/icon/pixel-icons/PixelNavTopicsIcon.js.map +1 -1
  153. package/dist/icon/pixel-icons/PixelNavTopicsIcon.jsx.map +1 -1
  154. package/dist/icon/pixel-icons/PixelNotificationIcon.d.ts.map +1 -1
  155. package/dist/icon/pixel-icons/PixelNotificationIcon.js.map +1 -1
  156. package/dist/icon/pixel-icons/PixelNotificationIcon.jsx.map +1 -1
  157. package/dist/icon/pixel-icons/PixelPathwaysIcon.d.ts.map +1 -1
  158. package/dist/icon/pixel-icons/PixelPathwaysIcon.js.map +1 -1
  159. package/dist/icon/pixel-icons/PixelPathwaysIcon.jsx.map +1 -1
  160. package/dist/icon/pixel-icons/PixelPlayIcon.d.ts.map +1 -1
  161. package/dist/icon/pixel-icons/PixelPlayIcon.js.map +1 -1
  162. package/dist/icon/pixel-icons/PixelPlayIcon.jsx.map +1 -1
  163. package/dist/icon/pixel-icons/PixelSearchIcon.d.ts.map +1 -1
  164. package/dist/icon/pixel-icons/PixelSearchIcon.js.map +1 -1
  165. package/dist/icon/pixel-icons/PixelSearchIcon.jsx.map +1 -1
  166. package/dist/icon/pixel-icons/PixelSettingsIcon.d.ts.map +1 -1
  167. package/dist/icon/pixel-icons/PixelSettingsIcon.js.map +1 -1
  168. package/dist/icon/pixel-icons/PixelSettingsIcon.jsx.map +1 -1
  169. package/dist/icon/pixel-icons/PixelSparkleIcon.d.ts.map +1 -1
  170. package/dist/icon/pixel-icons/PixelSparkleIcon.js.map +1 -1
  171. package/dist/icon/pixel-icons/PixelSparkleIcon.jsx.map +1 -1
  172. package/dist/icon/pixel-icons/PixelTopicsIcon.d.ts.map +1 -1
  173. package/dist/icon/pixel-icons/PixelTopicsIcon.js.map +1 -1
  174. package/dist/icon/pixel-icons/PixelTopicsIcon.jsx.map +1 -1
  175. package/dist/icon/pixel-icons/PixelUserIcon.d.ts.map +1 -1
  176. package/dist/icon/pixel-icons/PixelUserIcon.js.map +1 -1
  177. package/dist/icon/pixel-icons/PixelUserIcon.jsx.map +1 -1
  178. package/dist/icon/pixel-icons/PixelZapIcon.d.ts.map +1 -1
  179. package/dist/icon/pixel-icons/PixelZapIcon.js.map +1 -1
  180. package/dist/icon/pixel-icons/PixelZapIcon.jsx.map +1 -1
  181. package/dist/inlinealert/index.js +6 -6
  182. package/dist/inlinealert/index.jsx +6 -6
  183. package/dist/labeledvalue/index.js +1 -1
  184. package/dist/labeledvalue/index.jsx +1 -1
  185. package/dist/layout/Flex.d.ts +2 -0
  186. package/dist/layout/Flex.d.ts.map +1 -1
  187. package/dist/link/index.d.ts.map +1 -1
  188. package/dist/link/index.js +1 -4
  189. package/dist/link/index.js.map +1 -1
  190. package/dist/link/index.jsx +1 -4
  191. package/dist/link/index.jsx.map +1 -1
  192. package/dist/listbox/index.js +3 -3
  193. package/dist/listbox/index.jsx +4 -4
  194. package/dist/menu/index.d.ts.map +1 -1
  195. package/dist/meter/index.d.ts.map +1 -1
  196. package/dist/meter/index.js +2 -2
  197. package/dist/meter/index.js.map +1 -1
  198. package/dist/meter/index.jsx +2 -2
  199. package/dist/meter/index.jsx.map +1 -1
  200. package/dist/notificationbadge/index.js +1 -1
  201. package/dist/notificationbadge/index.jsx +1 -1
  202. package/dist/picker/index.js +3 -3
  203. package/dist/picker/index.jsx +3 -3
  204. package/dist/popover/index.js +1 -1
  205. package/dist/popover/index.jsx +1 -1
  206. package/dist/progress/ProgressCircle.js +2 -2
  207. package/dist/progress/ProgressCircle.js.map +1 -1
  208. package/dist/progress/ProgressCircle.jsx +2 -2
  209. package/dist/progress/ProgressCircle.jsx.map +1 -1
  210. package/dist/progress-bar/index.js +4 -4
  211. package/dist/progress-bar/index.jsx +4 -4
  212. package/dist/radio/index.js +2 -2
  213. package/dist/radio/index.jsx +2 -2
  214. package/dist/searchfield/index.js +2 -2
  215. package/dist/searchfield/index.jsx +2 -2
  216. package/dist/segmentedcontrol/index.js +2 -5
  217. package/dist/segmentedcontrol/index.js.map +1 -1
  218. package/dist/segmentedcontrol/index.jsx +2 -5
  219. package/dist/segmentedcontrol/index.jsx.map +1 -1
  220. package/dist/select/index.js +3 -3
  221. package/dist/select/index.jsx +3 -3
  222. package/dist/selectboxgroup/index.js +1 -1
  223. package/dist/selectboxgroup/index.jsx +1 -1
  224. package/dist/statuslight/index.js +1 -1
  225. package/dist/statuslight/index.jsx +1 -1
  226. package/dist/steplist/index.js +5 -5
  227. package/dist/steplist/index.jsx +5 -5
  228. package/dist/style/glasselated-ramps.d.ts.map +1 -1
  229. package/dist/style/index.js +18 -9
  230. package/dist/style/index.js.map +1 -1
  231. package/dist/style/spectrum-theme.d.ts +7 -7
  232. package/dist/style/spectrum-theme.d.ts.map +1 -1
  233. package/dist/styles.css +1 -1
  234. package/dist/table/index.d.ts.map +1 -1
  235. package/dist/tag-group/index.js +10 -10
  236. package/dist/tag-group/index.js.map +1 -1
  237. package/dist/tag-group/index.jsx +10 -10
  238. package/dist/tag-group/index.jsx.map +1 -1
  239. package/dist/toolbar/index.d.ts.map +1 -1
  240. package/dist/toolbar/index.js.map +1 -1
  241. package/dist/toolbar/index.jsx.map +1 -1
  242. package/dist/tree/index.d.ts.map +1 -1
  243. package/dist/tree/index.js +5 -5
  244. package/dist/tree/index.js.map +1 -1
  245. package/dist/tree/index.jsx +5 -5
  246. package/dist/tree/index.jsx.map +1 -1
  247. package/dist/viviana-tokens.css +39 -12
  248. package/package.json +18 -5
  249. package/src/breadcrumbs/index.tsx +14 -7
  250. package/src/button/s2-action-button-styles.ts +8 -8
  251. package/src/button/s2-button-styles.ts +8 -8
  252. package/src/calendar/DateField.tsx +2 -6
  253. package/src/calendar/DatePicker.tsx +8 -1
  254. package/src/calendar/RangeCalendar.tsx +13 -7
  255. package/src/calendar/TimeField.tsx +2 -6
  256. package/src/calendar/index.tsx +4 -4
  257. package/src/font-faces.css +13 -6
  258. package/src/form/index.tsx +5 -6
  259. package/src/icon/pixel-icons/PixelChartIcon.tsx +4 -1
  260. package/src/icon/pixel-icons/PixelCheckIcon.tsx +4 -1
  261. package/src/icon/pixel-icons/PixelChevronDownIcon.tsx +4 -1
  262. package/src/icon/pixel-icons/PixelChevronRightIcon.tsx +4 -1
  263. package/src/icon/pixel-icons/PixelClockIcon.tsx +4 -1
  264. package/src/icon/pixel-icons/PixelCodeIcon.tsx +4 -1
  265. package/src/icon/pixel-icons/PixelCommunityIcon.tsx +4 -1
  266. package/src/icon/pixel-icons/PixelCubeIcon.tsx +4 -1
  267. package/src/icon/pixel-icons/PixelFlameIcon.tsx +4 -1
  268. package/src/icon/pixel-icons/PixelHomeIcon.tsx +4 -1
  269. package/src/icon/pixel-icons/PixelLayoutIcon.tsx +4 -1
  270. package/src/icon/pixel-icons/PixelMessageIcon.tsx +4 -1
  271. package/src/icon/pixel-icons/PixelNavCommunityIcon.tsx +4 -1
  272. package/src/icon/pixel-icons/PixelNavExploreIcon.tsx +4 -1
  273. package/src/icon/pixel-icons/PixelNavLiveIcon.tsx +4 -1
  274. package/src/icon/pixel-icons/PixelNavPathwaysIcon.tsx +4 -1
  275. package/src/icon/pixel-icons/PixelNavPlaygroundIcon.tsx +4 -1
  276. package/src/icon/pixel-icons/PixelNavProjectsIcon.tsx +4 -1
  277. package/src/icon/pixel-icons/PixelNavReferenceIcon.tsx +4 -1
  278. package/src/icon/pixel-icons/PixelNavSettingsIcon.tsx +4 -1
  279. package/src/icon/pixel-icons/PixelNavTopicsIcon.tsx +4 -1
  280. package/src/icon/pixel-icons/PixelNotificationIcon.tsx +4 -1
  281. package/src/icon/pixel-icons/PixelPathwaysIcon.tsx +4 -1
  282. package/src/icon/pixel-icons/PixelPlayIcon.tsx +4 -1
  283. package/src/icon/pixel-icons/PixelSearchIcon.tsx +4 -1
  284. package/src/icon/pixel-icons/PixelSettingsIcon.tsx +4 -1
  285. package/src/icon/pixel-icons/PixelSparkleIcon.tsx +4 -1
  286. package/src/icon/pixel-icons/PixelTopicsIcon.tsx +4 -1
  287. package/src/icon/pixel-icons/PixelUserIcon.tsx +4 -1
  288. package/src/icon/pixel-icons/PixelZapIcon.tsx +4 -1
  289. package/src/layout/Flex.tsx +7 -0
  290. package/src/link/index.tsx +3 -1
  291. package/src/menu/index.tsx +1 -3
  292. package/src/meter/index.tsx +1 -3
  293. package/src/progress/ProgressCircle.tsx +1 -1
  294. package/src/segmentedcontrol/index.tsx +6 -6
  295. package/src/style/glasselated-ramps.ts +37 -33
  296. package/src/style/spectrum-theme.ts +22 -17
  297. package/src/table/index.tsx +1 -3
  298. package/src/tag-group/index.tsx +8 -8
  299. package/src/toolbar/index.tsx +4 -1
  300. package/src/tree/index.tsx +3 -11
  301. package/src/viviana-tokens.css +39 -12
@@ -1 +1 @@
1
- {"version":3,"file":"index.jsx","names":[],"sources":["../../src/tree/index.tsx"],"sourcesContent":["import {\n children as resolveChildren,\n createContext,\n createEffect,\n createMemo,\n createSignal,\n mergeProps,\n onCleanup,\n splitProps,\n useContext,\n type JSX,\n} from \"solid-js\";\nimport {\n Tree as HeadlessTree,\n TreeItem as HeadlessTreeItem,\n TreeItemContent as HeadlessTreeItemContent,\n TreeExpandButton as HeadlessTreeExpandButton,\n TreeSelectionCheckbox as HeadlessTreeSelectionCheckbox,\n TreeLoadMoreItem as HeadlessTreeLoadMoreItem,\n TreeStateContext as HeadlessTreeStateContext,\n TreeItemContext as HeadlessTreeItemContext,\n type TreeProps as HeadlessTreeProps,\n type TreeItemProps as HeadlessTreeItemProps,\n type TreeItemContentProps as HeadlessTreeItemContentProps,\n type TreeItemContentRenderProps as HeadlessTreeItemContentRenderProps,\n type TreeExpandButtonProps as HeadlessTreeExpandButtonProps,\n type TreeRenderProps,\n type TreeItemRenderProps,\n type TreeRenderItemState,\n} from \"@proyecto-viviana/solidaria-components\";\nimport type { Key, TreeItemData } from \"@proyecto-viviana/solid-stately\";\nimport { ActionButtonGroupContext } from \"../button/group-context\";\nimport {\n getSlottedContextProps,\n mergeContextRefs,\n mergeContextStyles,\n mergeContextUnsafeStyle,\n type RefLike,\n type SpectrumContextValue,\n} from \"../button/spectrum-context\";\nimport { IconContext } from \"../icon\";\nimport Checkmark from \"../icon/ui-icons/Checkmark\";\nimport Chevron from \"../icon/ui-icons/Chevron\";\nimport { ActionMenuContext } from \"../menu/ActionMenu\";\nimport { ProgressCircle } from \"../progress/ProgressCircle\";\nimport { useProviderProps } from \"../provider\";\nimport type { StyleString } from \"../style\";\nimport {\n baseColor,\n colorMix,\n focusRing,\n fontRelative,\n space,\n style,\n} from \"../style\" with { type: \"macro\" };\nimport { mergeStyles } from \"../style/runtime\";\nimport { edgeToText } from \"../style/spectrum-theme\" with { type: \"macro\" };\nimport type { UnsafeClassName } from \"../s2-internal/style-utils\";\nimport {\n controlFont,\n getAllowedOverrides,\n} from \"../s2-internal/style-utils\" with { type: \"macro\" };\nimport { Text, TextContext } from \"../text\";\n\nexport type TreeSelectionStyle = \"checkbox\" | \"highlight\";\nexport type TreeLoadingState =\n | \"idle\"\n | \"loading\"\n | \"loadingMore\"\n | \"sorting\"\n | \"filtering\"\n | \"error\";\n\nexport interface TreeProps<T extends object> extends Omit<\n HeadlessTreeProps<T>,\n \"class\" | \"style\" | \"children\" | \"items\" | \"selectionBehavior\" | \"isLoading\" | \"slot\" | \"ref\"\n> {\n /** TreeView content. Use a render function with `items` for S2 dynamic collections. */\n children: JSX.Element | ((item: TreeItemData<T>, state: TreeRenderItemState) => JSX.Element);\n /** Dynamic hierarchical items. Supports either `id` or `key`, matching React Spectrum examples. */\n items?: TreeItemData<T>[];\n /** Whether selection is shown with checkboxes or highlighted rows. @default 'checkbox' */\n selectionStyle?: TreeSelectionStyle;\n /** Loading state forwarded to load-more behavior. */\n loadingState?: TreeLoadingState;\n /** Provides an action bar when items are selected. */\n renderActionBar?: (selectedKeys: \"all\" | Set<Key>) => JSX.Element;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: UnsafeClassName | string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n /** Slot name when used in a Spectrum context. */\n slot?: string | null;\n /** Ref for the tree root element. */\n ref?: RefLike<HTMLDivElement>;\n /** Legacy label helper. Prefer aria-label or aria-labelledby. */\n label?: JSX.Element;\n /** Legacy description helper. */\n description?: JSX.Element;\n}\n\nexport interface TreeItemProps<T extends object> extends Omit<\n HeadlessTreeItemProps<T>,\n \"class\" | \"style\" | \"children\" | \"ref\"\n> {\n /** The unique id of the TreeViewItem. */\n id: Key;\n /** TreeViewItem content. Text-only children are wrapped in the S2 label slot. */\n children?: JSX.Element | ((renderProps: TreeItemRenderProps) => JSX.Element);\n /** Whether this item is disabled. Dynamic collections should prefer item data `isDisabled`. */\n isDisabled?: boolean;\n /** Whether this item has children that may not be loaded yet. */\n hasChildItems?: boolean;\n /** Link target metadata. */\n href?: HeadlessTreeItemProps<T>[\"href\"];\n target?: HeadlessTreeItemProps<T>[\"target\"];\n download?: HeadlessTreeItemProps<T>[\"download\"];\n rel?: HeadlessTreeItemProps<T>[\"rel\"];\n hrefLang?: HeadlessTreeItemProps<T>[\"hrefLang\"];\n ping?: HeadlessTreeItemProps<T>[\"ping\"];\n referrerPolicy?: HeadlessTreeItemProps<T>[\"referrerPolicy\"];\n routerOptions?: HeadlessTreeItemProps<T>[\"routerOptions\"];\n /** Optional description text. Prefer `<Text slot=\"description\">`. */\n description?: JSX.Element;\n /** Optional icon helper retained from the older Tree API. Prefer an icon child. */\n icon?: () => JSX.Element;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: UnsafeClassName | string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n /** Ref for the rendered row element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport interface TreeExpandButtonProps extends Omit<\n HeadlessTreeExpandButtonProps,\n \"class\" | \"style\"\n> {\n /** Additional CSS class name. Use only as a last resort. */\n class?: string;\n /** Additional inline styles. Use only as a last resort. */\n style?: JSX.CSSProperties;\n}\n\nexport interface TreeItemContentProps extends Omit<\n HeadlessTreeItemContentProps,\n \"class\" | \"style\"\n> {\n /** Additional CSS class name. Use only as a last resort. */\n class?: string;\n /** Additional inline styles. Use only as a last resort. */\n style?: JSX.CSSProperties;\n}\n\nexport interface TreeLoadMoreItemProps {\n onLoadMore: () => void | Promise<void>;\n isLoading?: boolean;\n loadingState?: TreeLoadingState;\n level?: number;\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\ntype StaticTreeItem = {\n id: Key;\n textValue?: string;\n isDisabled?: boolean;\n hasChildItems?: boolean;\n props: TreeItemProps<object>;\n};\n\ntype ItemRegistration = {\n id: Key;\n textValue?: string;\n isDisabled?: boolean;\n hasChildItems?: boolean;\n props?: TreeItemProps<object>;\n};\n\ninterface StaticCollectionContextValue {\n mode: \"static\" | \"dynamic\";\n registerItem(item: ItemRegistration): void;\n unregisterItem(id: Key): void;\n}\n\ninterface TreeViewContextValue {\n selectionStyle: TreeSelectionStyle;\n}\n\nexport const TreeViewContext = createContext<SpectrumContextValue<TreeProps<object>>>(null);\nconst InternalTreeViewContext = createContext<TreeViewContextValue>({\n selectionStyle: \"checkbox\",\n});\nconst StaticTreeCollectionContext = createContext<StaticCollectionContextValue | null>(null);\n\nconst treeViewWrapper = style(\n {\n minHeight: 0,\n minWidth: 200,\n display: \"flex\",\n flexDirection: \"column\",\n isolation: \"isolate\",\n position: \"relative\",\n overflow: \"clip\",\n },\n getAllowedOverrides({ height: true }),\n);\n\nconst treeView = style<TreeRenderProps & { isActionBar?: boolean }>(\n {\n ...focusRing(),\n outlineOffset: -2,\n outlineStyle: \"none\",\n userSelect: \"none\",\n minHeight: 0,\n minWidth: 0,\n width: \"full\",\n height: {\n isActionBar: \"full\",\n },\n boxSizing: \"border-box\",\n overflow: \"auto\",\n fontSize: controlFont(),\n backgroundColor: \"transparent\",\n borderWidth: 0,\n disableTapHighlight: true,\n },\n getAllowedOverrides({ height: true }),\n);\n\nconst legacyLabel = style({\n font: controlFont(),\n fontWeight: \"medium\",\n color: baseColor(\"neutral\"),\n marginBottom: 4,\n});\n\nconst legacyDescription = style({\n font: \"body-sm\",\n color: baseColor(\"neutral-subdued\"),\n marginTop: 4,\n});\n\nconst emptyState = style({\n minHeight: 112,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"neutral\",\n font: \"body-sm\",\n});\n\nconst selectedBackground = colorMix(\"gray-25\", \"gray-900\", 7);\nconst selectedActiveBackground = colorMix(\"gray-25\", \"gray-900\", 10);\n\ntype TreeRowLayerProps = Partial<TreeItemRenderProps> & {\n isLink?: boolean;\n selectionStyle?: TreeSelectionStyle;\n};\n\nconst treeViewItem = style<TreeRowLayerProps>({\n outlineStyle: \"none\",\n position: \"relative\",\n borderRadius: \"row\",\n gridColumnStart: 1,\n gridColumnEnd: -1,\n display: \"grid\",\n gridTemplateAreas: [\n \". checkbox level-padding expand-button icon label actions actionmenu\",\n \". checkbox level-padding expand-button icon description actions actionmenu\",\n ],\n gridTemplateColumns: [\n edgeToText(40),\n \"auto\",\n \"auto\",\n \"auto\",\n \"auto\",\n \"minmax(0,1fr)\",\n \"minmax(0,auto)\",\n \"auto\",\n ],\n gridTemplateRows: \"1fr auto\",\n alignItems: \"baseline\",\n rowGap: {\n \":has([slot=description])\": space(1),\n },\n columnGap: 0,\n paddingX: 0,\n minHeight: 40,\n paddingY: 0,\n boxSizing: \"border-box\",\n textDecoration: \"none\",\n color: {\n default: baseColor(\"neutral-subdued\"),\n isSelected: baseColor(\"neutral\"),\n isDisabled: {\n default: \"disabled\",\n forcedColors: \"GrayText\",\n },\n forcedColors: \"ButtonText\",\n selectionStyle: {\n highlight: {\n isSelected: {\n forcedColors: \"HighlightText\",\n },\n },\n },\n },\n backgroundColor: \"transparent\",\n cursor: {\n default: \"default\",\n isLink: \"pointer\",\n isDisabled: \"not-allowed\",\n },\n transition: \"default\",\n forcedColorAdjust: \"none\",\n});\n\nconst treeViewRowBackground = style<TreeRowLayerProps>({\n position: \"absolute\",\n zIndex: -1,\n inset: 0,\n backgroundColor: {\n default: \"gray-25\",\n isHovered: {\n default: \"gray-900/5\",\n selectionStyle: {\n checkbox: selectedBackground,\n },\n },\n isPressed: {\n default: \"gray-900/10\",\n selectionStyle: {\n checkbox: selectedActiveBackground,\n },\n },\n isSelected: {\n selectionStyle: {\n checkbox: {\n default: selectedBackground,\n isHovered: selectedActiveBackground,\n isPressed: selectedActiveBackground,\n isFocusVisible: selectedActiveBackground,\n },\n highlight: {\n default: colorMix(\"gray-25\", \"blue-900\", 10),\n isHovered: colorMix(\"gray-25\", \"blue-900\", 15),\n isPressed: colorMix(\"gray-25\", \"blue-900\", 15),\n },\n },\n },\n forcedColors: {\n default: \"Background\",\n selectionStyle: {\n highlight: {\n isSelected: \"Highlight\",\n },\n },\n },\n },\n borderRadius: \"row\",\n});\n\nconst treeViewRowFocusRing = style<TreeRowLayerProps>({\n ...focusRing(),\n outlineOffset: -2,\n outlineWidth: {\n default: 2,\n forcedColors: \"[3px]\",\n },\n outlineColor: {\n default: \"focus-ring\",\n forcedColors: {\n default: \"Highlight\",\n selectionStyle: {\n highlight: \"ButtonBorder\",\n },\n },\n },\n position: \"absolute\",\n inset: 0,\n borderRadius: \"default\",\n zIndex: 1,\n pointerEvents: \"none\",\n});\n\nconst treeViewItemCell = style({\n display: \"contents\",\n});\n\nconst treeLevelPadding = style({\n gridArea: \"level-padding\",\n alignSelf: \"stretch\",\n width: \"[calc(var(--tree-item-level, 0) * var(--tree-indent, 16px))]\",\n});\n\nconst treeExpandButton = style<TreeRowLayerProps>({\n gridArea: \"expand-button\",\n alignSelf: \"center\",\n justifySelf: \"center\",\n size: 40,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 0,\n backgroundColor: \"transparent\",\n color: {\n default: \"inherit\",\n isDisabled: {\n default: \"disabled\",\n forcedColors: \"GrayText\",\n },\n },\n borderRadius: \"default\",\n visibility: {\n default: \"hidden\",\n isExpandable: \"visible\",\n },\n cursor: {\n default: \"default\",\n isDisabled: \"not-allowed\",\n },\n disableTapHighlight: true,\n});\n\nconst treeExpandIcon = style<TreeRowLayerProps>({\n rotate: {\n isExpanded: 90,\n },\n transition: \"default\",\n \"--iconPrimary\": {\n type: \"fill\",\n value: \"currentColor\",\n },\n});\n\nconst treeCheckbox = style({\n gridArea: \"checkbox\",\n gridRowEnd: \"span 2\",\n alignSelf: \"center\",\n justifySelf: \"center\",\n marginEnd: 8,\n position: \"relative\",\n width: 16,\n height: 16,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n});\n\nconst treeCheckboxInput = style({\n position: \"absolute\",\n inset: 0,\n margin: 0,\n opacity: 0,\n cursor: \"inherit\",\n});\n\nconst treeCheckboxBox = style<TreeRowLayerProps>({\n ...focusRing(),\n size: 16,\n pointerEvents: \"none\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderRadius: \"row\",\n boxSizing: \"border-box\",\n backgroundColor: {\n default: \"gray-25\",\n isSelected: baseColor(\"neutral\"),\n isDisabled: \"disabled\",\n },\n borderColor: {\n default: baseColor(\"gray-800\"),\n isSelected: \"transparent\",\n isDisabled: \"disabled\",\n },\n});\n\nconst treeCheckboxIcon = style({\n pointerEvents: \"none\",\n \"--iconPrimary\": {\n type: \"fill\",\n value: {\n default: \"gray-25\",\n forcedColors: \"HighlightText\",\n },\n },\n});\n\nconst treeSlotIcon = style({\n gridArea: \"icon\",\n gridRowEnd: \"span 2\",\n display: \"block\",\n size: fontRelative(20),\n alignSelf: \"center\",\n marginEnd: \"text-to-visual\",\n \"--iconPrimary\": {\n type: \"fill\",\n value: \"currentColor\",\n },\n});\n\nconst treeLabel = style<TreeRowLayerProps>({\n gridArea: \"label\",\n minWidth: 0,\n alignSelf: \"center\",\n font: controlFont(),\n color: \"inherit\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n});\n\nconst treeDescription = style<TreeRowLayerProps>({\n gridArea: \"description\",\n minWidth: 0,\n alignSelf: \"center\",\n font: \"ui-sm\",\n color: {\n default: baseColor(\"neutral-subdued\"),\n isDisabled: {\n default: \"disabled\",\n forcedColors: \"GrayText\",\n },\n },\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n});\n\nconst treeActions = style({\n gridArea: \"actions\",\n gridRowEnd: \"span 2\",\n alignSelf: \"center\",\n justifySelf: \"end\",\n marginStart: \"text-to-visual\",\n});\n\nconst treeActionMenu = style({\n gridArea: \"actionmenu\",\n gridRowEnd: \"span 2\",\n alignSelf: \"center\",\n});\n\nconst treeLoadMore = style({\n minHeight: 32,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"neutral-subdued\",\n});\n\nfunction replaceManagedClass(element: Element, dataAttribute: string, nextClass: string): void {\n const previousClass = element.getAttribute(dataAttribute);\n\n for (const className of previousClass?.split(/\\s+/).filter(Boolean) ?? []) {\n element.classList.remove(className);\n }\n\n for (const className of nextClass.split(/\\s+/).filter(Boolean)) {\n element.classList.add(className);\n }\n\n element.setAttribute(dataAttribute, nextClass);\n}\n\nfunction applyItemSlotClasses(\n root: HTMLElement | undefined,\n renderProps: TreeItemRenderProps,\n context: TreeViewContextValue,\n): void {\n if (!root) {\n return;\n }\n\n const state = {\n ...renderProps,\n selectionStyle: context.selectionStyle,\n };\n\n const gridCell = root.querySelector('[role=\"gridcell\"]');\n if (gridCell) {\n replaceManagedClass(gridCell, \"data-s2-treeview-cell-class\", treeViewItemCell);\n }\n\n for (const element of Array.from(\n root.querySelectorAll('[slot=\"label\"], [data-slot=\"label\"], [data-rsp-slot=\"label\"]'),\n )) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeLabel(state));\n element.setAttribute(\"data-rsp-slot\", \"label\");\n }\n\n for (const element of Array.from(\n root.querySelectorAll(\n '[slot=\"description\"], [data-slot=\"description\"], [data-rsp-slot=\"description\"]',\n ),\n )) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeDescription(state));\n element.setAttribute(\"data-rsp-slot\", \"description\");\n }\n\n for (const element of Array.from(root.querySelectorAll('[slot=\"icon\"], [data-slot=\"icon\"]'))) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeSlotIcon);\n element.setAttribute(\"data-rsp-slot\", \"icon\");\n }\n\n for (const element of Array.from(root.querySelectorAll('[slot=\"actions\"]'))) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeActions);\n element.setAttribute(\"data-rsp-slot\", \"actions\");\n }\n\n for (const element of Array.from(root.querySelectorAll('[slot=\"actionmenu\"]'))) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeActionMenu);\n element.setAttribute(\"data-rsp-slot\", \"actionmenu\");\n }\n}\n\nfunction selectedKeySet(keys: \"all\" | Iterable<Key> | undefined): \"all\" | Set<Key> {\n if (keys === \"all\") {\n return \"all\";\n }\n\n return new Set(keys ?? []);\n}\n\nfunction getItemKey<T extends object>(item: TreeItemData<T>, index: number): Key {\n return item.id ?? item.key ?? index;\n}\n\nfunction isTextOnlyChildren(value: unknown): boolean {\n if (typeof value === \"string\" || typeof value === \"number\") {\n return true;\n }\n\n return Array.isArray(value) && value.every(isTextOnlyChildren);\n}\n\nfunction treeItemFromStatic(item: StaticTreeItem): TreeItemData<object> {\n return {\n id: item.id,\n key: item.id,\n value: item.props as object,\n textValue: item.textValue ?? String(item.id),\n isDisabled: item.isDisabled,\n hasChildItems: item.hasChildItems,\n };\n}\n\nfunction mergeRegisteredTreeItems<T extends object>(\n items: TreeItemData<T>[],\n registeredItems: Map<Key, ItemRegistration>,\n): TreeItemData<T>[] {\n return items.map((item, index) => {\n const key = getItemKey(item, index);\n const registered = registeredItems.get(key);\n const children = item.children\n ? mergeRegisteredTreeItems(item.children as TreeItemData<T>[], registeredItems)\n : item.children;\n\n if (!registered) {\n return children === item.children ? item : { ...item, children };\n }\n\n return {\n ...item,\n id: item.id ?? key,\n key: item.key ?? key,\n isDisabled: item.isDisabled ?? registered.isDisabled,\n hasChildItems: item.hasChildItems ?? registered.hasChildItems,\n children,\n };\n });\n}\n\nexport function Tree<T extends object>(props: TreeProps<T>): JSX.Element {\n const providerProps = useProviderProps(props);\n const contextProps = getSlottedContextProps(\n useContext(TreeViewContext) as SpectrumContextValue<TreeProps<T>>,\n props.slot,\n );\n const mergedProps = mergeProps(providerProps, contextProps ?? {}, props) as TreeProps<T>;\n const [local, headlessProps] = splitProps(mergedProps, [\n \"children\",\n \"items\",\n \"selectionStyle\",\n \"loadingState\",\n \"renderActionBar\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"slot\",\n \"ref\",\n \"label\",\n \"description\",\n \"hasMore\",\n \"onLoadMore\",\n ]);\n const selectionStyle = (): TreeSelectionStyle => local.selectionStyle ?? \"checkbox\";\n const isLoading = () => local.loadingState === \"loading\" || local.loadingState === \"loadingMore\";\n const [staticItems, setStaticItems] = createSignal<StaticTreeItem[]>([]);\n const [registrationVersion, setRegistrationVersion] = createSignal(0);\n const registeredItems = new Map<Key, ItemRegistration>();\n const usesStaticChildren = () => local.items == null;\n const syncRegisteredItems = () => {\n setStaticItems(\n Array.from(registeredItems.values())\n .filter((item) => item.props)\n .map((item) => ({\n id: item.id,\n textValue: item.textValue,\n isDisabled: item.isDisabled,\n hasChildItems: item.hasChildItems,\n props: item.props!,\n })),\n );\n setRegistrationVersion((version) => version + 1);\n };\n const registrationContext: StaticCollectionContextValue = {\n get mode() {\n return usesStaticChildren() ? \"static\" : \"dynamic\";\n },\n registerItem(item) {\n const previous = registeredItems.get(item.id);\n if (\n previous &&\n previous.textValue === item.textValue &&\n previous.isDisabled === item.isDisabled &&\n previous.hasChildItems === item.hasChildItems &&\n previous.props === item.props\n ) {\n return;\n }\n\n registeredItems.set(item.id, item);\n syncRegisteredItems();\n },\n unregisterItem(id) {\n if (registeredItems.delete(id)) {\n syncRegisteredItems();\n }\n },\n };\n const treeContext = createMemo<TreeViewContextValue>(() => ({\n selectionStyle: selectionStyle(),\n }));\n const mergedStyles = () => mergeContextStyles(contextProps?.styles, props.styles);\n const mergedUnsafeStyle = () =>\n mergeContextUnsafeStyle(contextProps?.UNSAFE_style, props.UNSAFE_style);\n const assignRootRef = mergeContextRefs(\n (contextProps as { ref?: RefLike<HTMLDivElement> } | null)?.ref,\n props.ref,\n );\n const collectionItems = createMemo(() => {\n registrationVersion();\n if (usesStaticChildren()) {\n return staticItems().map(treeItemFromStatic) as TreeItemData<T>[];\n }\n\n return (local.items ?? []) as TreeItemData<T>[];\n });\n const collectionItemsWithDisabled = createMemo(() =>\n mergeRegisteredTreeItems(collectionItems(), registeredItems),\n );\n const [actionSelectedKeys, setActionSelectedKeys] = createSignal<\"all\" | Set<Key>>(\n selectedKeySet(headlessProps.selectedKeys ?? headlessProps.defaultSelectedKeys),\n );\n createEffect(() => {\n setActionSelectedKeys(\n selectedKeySet(headlessProps.selectedKeys ?? headlessProps.defaultSelectedKeys),\n );\n });\n const onSelectionChange = (keys: \"all\" | Set<Key>) => {\n setActionSelectedKeys(keys === \"all\" ? \"all\" : new Set(keys));\n headlessProps.onSelectionChange?.(keys);\n };\n const className = (renderProps: TreeRenderProps): string =>\n [\n contextProps?.UNSAFE_className,\n props.UNSAFE_className,\n props.class,\n mergeStyles(\n treeView({ ...renderProps, isActionBar: !!local.renderActionBar }),\n mergedStyles(),\n ),\n ]\n .filter(Boolean)\n .join(\" \");\n const renderEmptyState = () => (\n <div class={emptyState}>{headlessProps.renderEmptyState?.() ?? \"No items\"}</div>\n );\n const renderItem = (item: TreeItemData<T>, state: TreeRenderItemState) =>\n usesStaticChildren() ? (\n <TreeItem {...((item.value ?? item) as TreeItemProps<T>)} />\n ) : typeof local.children === \"function\" ? (\n local.children(item, state)\n ) : null;\n const renderRegistrationItems = (items: TreeItemData<T>[], level = 0): JSX.Element[] => {\n const rendered: JSX.Element[] = [];\n const renderChild = local.children;\n\n if (typeof renderChild !== \"function\") {\n return rendered;\n }\n\n for (const item of items) {\n const isExpandable = Boolean(item.children?.length || item.hasChildItems);\n rendered.push(\n renderChild(item, {\n isExpanded: false,\n isExpandable,\n level,\n }),\n );\n\n if (item.children?.length) {\n rendered.push(...renderRegistrationItems(item.children as TreeItemData<T>[], level + 1));\n }\n }\n\n return rendered;\n };\n const registrationChildren = () => {\n if (usesStaticChildren()) {\n const resolved = resolveChildren(() => local.children as JSX.Element);\n return resolved();\n }\n\n if (typeof local.children !== \"function\") {\n return null;\n }\n\n return renderRegistrationItems(local.items ?? []);\n };\n const loadMoreContent = () => (\n <div class={treeLoadMore} data-rsp-slot=\"load-more\">\n {isLoading() ? <ProgressCircle isIndeterminate size=\"S\" aria-label=\"Loading more\" /> : null}\n </div>\n );\n\n // One return shape, always framed — load-bearing for hydration (caught by\n // Tree.hydrate.test.tsx): never build two eager JSX branches and return one.\n // Client JSX consts are real DOM nodes, so an unused detached wrapper\n // embedding `collection` MOVES the just-claimed server nodes into itself and\n // the returned branch hydrates empty. SSR output is unaffected (strings\n // don't move), which is why only the live page lost the tree. A single\n // always-framed shape leaves exactly one construction path; without chrome\n // the wrapper is `display: contents`, so layout is untouched.\n // (A Tree hydration abort that once looked like a return-shape problem was\n // actually a repeated `local.children` read in ResolvedItemContent /\n // TreeItemContent — see the read-once comments there.)\n const collection = () => (\n <InternalTreeViewContext.Provider value={treeContext()}>\n <div hidden inert aria-hidden=\"true\" style={{ display: \"none\" }}>\n <StaticTreeCollectionContext.Provider value={registrationContext}>\n {registrationChildren()}\n </StaticTreeCollectionContext.Provider>\n </div>\n <HeadlessTree\n {...headlessProps}\n ref={(element: HTMLDivElement) => assignRootRef(element)}\n items={collectionItemsWithDisabled() ?? []}\n selectionBehavior={selectionStyle() === \"highlight\" ? \"replace\" : \"toggle\"}\n onSelectionChange={onSelectionChange}\n isLoading={isLoading()}\n hasMore={local.hasMore ?? !!local.onLoadMore}\n onLoadMore={local.onLoadMore}\n loadingState={local.loadingState}\n renderLoadMoreItem={loadMoreContent}\n renderEmptyState={renderEmptyState}\n slot={local.slot ?? undefined}\n class={className}\n style={mergedUnsafeStyle()}\n data-tree-view=\"\"\n data-selection-style={selectionStyle()}\n data-loading-state={local.loadingState ?? undefined}\n >\n {(item: TreeItemData<T>, state: TreeRenderItemState) => renderItem(item, state)}\n </HeadlessTree>\n </InternalTreeViewContext.Provider>\n );\n\n const hasChrome = () => Boolean(local.label || local.description || local.renderActionBar);\n\n return (\n <div\n class={hasChrome() ? treeViewWrapper(null, mergedStyles()) : undefined}\n style={hasChrome() ? mergedUnsafeStyle() : { display: \"contents\" }}\n >\n {local.label ? <div class={legacyLabel({})}>{local.label}</div> : null}\n {collection()}\n {local.description ? <div class={legacyDescription({})}>{local.description}</div> : null}\n {local.renderActionBar ? local.renderActionBar(actionSelectedKeys()) : null}\n </div>\n );\n}\n\nexport function TreeItem<T extends object>(props: TreeItemProps<T>): JSX.Element {\n const context = useContext(InternalTreeViewContext);\n const staticCollection = useContext(StaticTreeCollectionContext);\n const collectionState = useContext(HeadlessTreeStateContext);\n const [local, headlessProps] = splitProps(props, [\n \"children\",\n \"isDisabled\",\n \"hasChildItems\",\n \"href\",\n \"target\",\n \"download\",\n \"rel\",\n \"hrefLang\",\n \"ping\",\n \"referrerPolicy\",\n \"routerOptions\",\n \"description\",\n \"icon\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"ref\",\n ]);\n\n createEffect(() => {\n if (!staticCollection) {\n return;\n }\n\n staticCollection.registerItem({\n id: props.id,\n textValue: headlessProps.textValue ?? headlessProps[\"aria-label\"],\n isDisabled: !!local.isDisabled,\n hasChildItems: !!local.hasChildItems,\n props: staticCollection.mode === \"static\" ? (props as TreeItemProps<object>) : undefined,\n });\n });\n\n onCleanup(() => {\n staticCollection?.unregisterItem(props.id);\n });\n\n if (staticCollection) {\n return null;\n }\n\n let itemElement: HTMLElement | undefined;\n const assignItemRef = mergeContextRefs(local.ref, (element: HTMLElement) => {\n itemElement = element;\n });\n const getRowLayerProps = (renderProps: TreeItemRenderProps): TreeRowLayerProps => ({\n ...renderProps,\n selectionStyle: context.selectionStyle,\n isLink: !!local.href,\n });\n const getClassName = (renderProps: TreeItemRenderProps): string =>\n [\n local.UNSAFE_className,\n local.class,\n mergeStyles(\n treeViewItem({\n ...getRowLayerProps(renderProps),\n isLink: !!local.href,\n }),\n local.styles,\n ),\n ]\n .filter(Boolean)\n .join(\" \");\n const getStyle = (renderProps: TreeItemRenderProps): JSX.CSSProperties => ({\n \"--tree-item-level\": String(renderProps.level),\n \"--tree-indent\": \"16px\",\n ...local.UNSAFE_style,\n });\n const textContext = (renderProps: TreeItemRenderProps) => ({\n slots: {\n default: {\n slot: \"label\",\n styles: () => treeLabel(getRowLayerProps(renderProps)),\n },\n label: {\n slot: \"label\",\n styles: () => treeLabel(getRowLayerProps(renderProps)),\n },\n description: {\n slot: \"description\",\n styles: () => treeDescription(getRowLayerProps(renderProps)),\n },\n },\n });\n const shouldShowCheckbox = (renderProps: TreeItemRenderProps) =>\n renderProps.selectionMode !== \"none\" &&\n renderProps.selectionBehavior === \"toggle\" &&\n !renderProps.isDisabled;\n\n function ItemChildren(renderProps: TreeItemRenderProps) {\n createEffect(() => applyItemSlotClasses(itemElement, renderProps, context));\n\n function ResolvedItemContent() {\n const resolvedChildren = resolveChildren(() => {\n // Read `local.children` once — a repeated props-children read re-instantiates child\n // components on the server only, desynchronizing Solid's hydration keys and aborting\n // hydration for the whole route. See Tab's ResolvedTabContent for the full note.\n const rawChildren = local.children;\n return typeof rawChildren === \"function\" ? rawChildren(renderProps) : rawChildren;\n });\n const childrenValue = () => resolvedChildren();\n const isTextOnly = () => isTextOnlyChildren(childrenValue());\n\n return (\n <>\n {isTextOnly() ? (\n <TreeItemContent>\n <Text slot=\"label\">{childrenValue()}</Text>\n {local.description ? <Text slot=\"description\">{local.description}</Text> : null}\n </TreeItemContent>\n ) : (\n childrenValue()\n )}\n {!isTextOnly() && local.description ? (\n <Text slot=\"description\">{local.description}</Text>\n ) : null}\n </>\n );\n }\n\n return (\n <TextContext.Provider value={textContext(renderProps) as SpectrumContextValue<any>}>\n <IconContext.Provider\n value={{\n slot: \"icon\",\n styles: treeSlotIcon,\n }}\n >\n <ActionButtonGroupContext.Provider\n value={{\n slot: \"actions\",\n size: \"S\",\n styles: treeActions,\n }}\n >\n <ActionMenuContext.Provider\n value={{\n slot: \"actionmenu\",\n size: \"S\",\n menuSize: \"S\",\n styles: treeActionMenu,\n }}\n >\n {shouldShowCheckbox(renderProps) ? (\n <TreeSelectionCheckbox itemKey={props.id} renderProps={renderProps} />\n ) : null}\n <div\n class={treeViewRowBackground(getRowLayerProps(renderProps))}\n aria-hidden=\"true\"\n />\n {renderProps.isFocusVisible ? (\n <div\n class={treeViewRowFocusRing(getRowLayerProps(renderProps))}\n aria-hidden=\"true\"\n />\n ) : null}\n <span class={treeLevelPadding} aria-hidden=\"true\" />\n <TreeExpandButton renderProps={renderProps} />\n {local.icon ? (\n <span slot=\"icon\" class={treeSlotIcon} data-rsp-slot=\"icon\">\n {local.icon()}\n </span>\n ) : null}\n <ResolvedItemContent />\n </ActionMenuContext.Provider>\n </ActionButtonGroupContext.Provider>\n </IconContext.Provider>\n </TextContext.Provider>\n );\n }\n\n return (\n <HeadlessTreeItem\n {...headlessProps}\n ref={(element) => assignItemRef(element)}\n hasChildItems={local.hasChildItems}\n isDisabled={local.isDisabled}\n href={local.href}\n target={local.target}\n download={local.download}\n rel={local.rel}\n hrefLang={local.hrefLang}\n ping={local.ping}\n referrerPolicy={local.referrerPolicy}\n routerOptions={local.routerOptions}\n class={getClassName}\n style={getStyle}\n data-tree-view-item=\"\"\n data-disabled={local.isDisabled || undefined}\n data-href={local.href || undefined}\n data-target={local.target || undefined}\n data-has-child-items={local.hasChildItems || undefined}\n >\n {(renderProps: TreeItemRenderProps) => <ItemChildren {...renderProps} />}\n </HeadlessTreeItem>\n );\n}\n\nexport function TreeItemContent(props: TreeItemContentProps): JSX.Element {\n const [local, headlessProps] = splitProps(props, [\"children\", \"class\", \"style\"]);\n\n return (\n <HeadlessTreeItemContent {...headlessProps}>\n {(renderProps: HeadlessTreeItemContentRenderProps) => {\n const content = () => {\n // Read `local.children` once — a repeated props-children read re-instantiates child\n // components on the server only, desynchronizing Solid's hydration keys and aborting\n // hydration for the whole route. See Tab's ResolvedTabContent for the full note.\n const rawChildren = local.children;\n return typeof rawChildren === \"function\" ? rawChildren(renderProps) : rawChildren;\n };\n return (\n <span\n class={[treeViewItemCell, local.class].filter(Boolean).join(\" \")}\n style={local.style}\n >\n {content()}\n </span>\n );\n }}\n </HeadlessTreeItemContent>\n );\n}\n\nexport function TreeExpandButton(\n props: TreeExpandButtonProps & { renderProps?: TreeItemRenderProps },\n): JSX.Element {\n const [local, headlessProps] = splitProps(props, [\"class\", \"style\", \"children\", \"renderProps\"]);\n const itemContext = useContext(HeadlessTreeItemContext);\n const isExpandable = () => Boolean(itemContext?.isExpandable ?? local.renderProps?.isExpandable);\n const renderState = () => ({\n ...(local.renderProps ?? {}),\n isExpandable: isExpandable(),\n isExpanded: Boolean(itemContext?.isExpanded ?? local.renderProps?.isExpanded),\n });\n const className = () => [treeExpandButton(renderState()), local.class].filter(Boolean).join(\" \");\n const stopPlaceholderExpansion = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n if (!isExpandable()) {\n return (\n <button\n {...headlessProps}\n type=\"button\"\n tabIndex={-1}\n class={className()}\n style={local.style}\n aria-label=\"Expand\"\n onClick={stopPlaceholderExpansion}\n onPointerDown={stopPlaceholderExpansion}\n onPointerUp={stopPlaceholderExpansion}\n onMouseDown={stopPlaceholderExpansion}\n onMouseUp={stopPlaceholderExpansion}\n data-rsp-slot=\"expand-button\"\n >\n {(() => {\n // Read `local.children` once — a repeated props-children read re-instantiates child\n // components on the server only, desynchronizing Solid's hydration keys and aborting\n // hydration for the whole route. See Tab's ResolvedTabContent for the full note.\n const rawChildren = local.children;\n return typeof rawChildren === \"function\"\n ? rawChildren(renderState())\n : (rawChildren ?? (\n <Chevron\n size=\"S\"\n class={treeExpandIcon({ ...renderState(), isExpanded: false })}\n />\n ));\n })()}\n </button>\n );\n }\n\n return (\n <HeadlessTreeExpandButton\n {...headlessProps}\n class={className()}\n style={local.style}\n data-rsp-slot=\"expand-button\"\n >\n {local.children ??\n (({ isExpanded }: { isExpanded: boolean }) => (\n <Chevron\n size=\"S\"\n class={treeExpandIcon({ ...renderState(), isExpanded })}\n />\n ))}\n </HeadlessTreeExpandButton>\n );\n}\n\nexport function TreeSelectionCheckbox(props: {\n itemKey: Key;\n renderProps?: TreeItemRenderProps;\n class?: string;\n style?: JSX.CSSProperties;\n excludeFromTabOrder?: boolean;\n \"aria-label\"?: string;\n}): JSX.Element {\n const state = useContext(HeadlessTreeStateContext);\n const isSelected = () => Boolean(state?.isSelected?.(props.itemKey));\n const renderProps = createMemo<TreeRowLayerProps>(() => ({\n isSelected: props.renderProps?.isSelected ?? isSelected(),\n isFocused: props.renderProps?.isFocused ?? false,\n isFocusVisible: props.renderProps?.isFocusVisible ?? false,\n isPressed: props.renderProps?.isPressed ?? false,\n isHovered: props.renderProps?.isHovered ?? false,\n isDisabled: props.renderProps?.isDisabled ?? false,\n isExpanded: props.renderProps?.isExpanded ?? false,\n isExpandable: props.renderProps?.isExpandable ?? false,\n level: props.renderProps?.level ?? 0,\n selectionStyle: \"checkbox\",\n }));\n\n return (\n <span\n class={[treeCheckbox, props.class].filter(Boolean).join(\" \")}\n style={props.style}\n data-rsp-slot=\"selection-indicator\"\n >\n <HeadlessTreeSelectionCheckbox\n itemKey={props.itemKey}\n class={treeCheckboxInput}\n excludeFromTabOrder={props.excludeFromTabOrder}\n aria-label={props[\"aria-label\"] ?? \"Select\"}\n />\n <span class={treeCheckboxBox(renderProps())}>\n {renderProps().isSelected ? (\n <Checkmark size=\"XS\" class={treeCheckboxIcon} />\n ) : null}\n </span>\n </span>\n );\n}\n\nexport function TreeLoadMoreItem(props: TreeLoadMoreItemProps): JSX.Element {\n const staticCollection = useContext(StaticTreeCollectionContext);\n const isLoading = () =>\n props.isLoading || props.loadingState === \"loading\" || props.loadingState === \"loadingMore\";\n\n if (staticCollection) {\n return null;\n }\n\n return (\n <HeadlessTreeLoadMoreItem\n onLoadMore={props.onLoadMore}\n isLoading={isLoading()}\n loadingState={props.loadingState}\n level={props.level}\n class={[\"\", props.class].filter(Boolean).join(\" \")}\n style={props.style}\n >\n <div class={treeLoadMore} data-rsp-slot=\"load-more\">\n {props.children ??\n (isLoading() ? (\n <ProgressCircle isIndeterminate size=\"S\" aria-label=\"Loading more\" />\n ) : null)}\n </div>\n </HeadlessTreeLoadMoreItem>\n );\n}\n\nTree.Item = TreeItem;\nTree.Content = TreeItemContent;\nTree.ExpandButton = TreeExpandButton;\nTree.SelectionCheckbox = TreeSelectionCheckbox;\nTree.LoadMoreItem = TreeLoadMoreItem;\n\nexport const TreeView = Tree;\nexport const TreeViewItem = TreeItem;\nexport const TreeViewItemContent = TreeItemContent;\nexport const TreeViewLoadMoreItem = TreeLoadMoreItem;\nexport { Collection } from \"@proyecto-viviana/solidaria-components\";\nexport { Text } from \"../text\";\n\nexport type { Key, TreeItemData, TreeRenderItemState };\n"],"mappings":";;;;;;;;;;;;;AA4FA,MAAE,kBAAmB,cAAa,IAAA;AAClC,MAAM,0BAA0B,cAAmC,EACjE,gBAAc,WAChB,CAAC;AACD,MAAM,8BAAgB,cAAA,IAAA;AACtB,MAAM,kBAAiB,SAAK,UAAU,OAAA,WAAA;CACpC,IAAM,QAAQ;CACZ,IAAE,YAAa;CACjB,IAAM,WAAM;CACV,IAAE,WAAO;CACX,IAAA,UAAc,OAAI,aAAO,EAAA,EAAA,SAAA,qFAAA;CAC3B,KAAA,IAAA,KAAA,SAAA;;EAEO,IAAA,EAAA,OAAU,KAAA,WAAgB;EAC/B,IAAA,EAAA,OAAA,MAAwB,WAAA;EAClB,SAAK,EAAM;CACjB;CACE,IAAE,CAAG,WAAW,SAAO;CACvB,IAAE,CAAG,UAAA,SAAA;CACL,SAAE;CACJ,SAAW;CACT,SAAS;CACX,IAAA,CAAA,UAAa,SAAO;CAClB,SAAS;CACX,SAAA;CACE,OAAO;AACX;AACA,MAAE,WAAS,SAAA,UAAyB,OAAO,WAAE;CAC3C,IAAA,QAAW;CACX,IAAM,YAAA;CACN,IAAA,WAAW;C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,MAAA,SAAA,OAAA,mBAAA,qBAAA,MAAA,qBAAA,YAAA,MAAA,iBAAA,YAAA;MACH,CAAA,KAAA,OAAA,gBAAA,YAAA,CAAA,GAAA;;MAEM,EAAC,KAAA;IACL,EAAA;AACF;AACA,SAAgB,iBAAiB,OAAsC;CACrE,MAAM,mBAAc,WAAW,2BAAwB;CACvD,MAAM,kBAAkB,MAAG,aAAQ,MAAa,iBAAgB,aAAM,MAAa,iBAAa;CAChG,IAAM,kBACA,OAAM;CAEV,OAAA,CAAA,mBAAiC,YAAa,MAAM,YAAY,WAAE,UAAW,GAAA,cAAA,MAAA,cAAA,OAAA,MAAA,OAAA,OAAA,CAC7E,IACI,MAAA,KACN,EAAA,OAAM,OAAA,EAAA,KAAA,GAAA,GAAyB,OAAG,MAAO,OAAU;MACjD,CAAA,IAAM,OAAA,cAAgB,0BAAA;SACjB,MAAC,aAAiB,UAAA,IAAA,CAAA,eAAA,gBAAA,SAAA,+BAAA,MAAA;MACxB,EAAA,IAAA;;AAEH;AACA,KAAI,OAAO;AACX,KAAK,UAAE;AACP,KAAK,eAAO;AACZ,KAAK,oBAAe;AACpB,KAAK,eAAe;AACpB,MAAa,WAAW;AACxB,MAAa,eAAa;AAC1B,MAAa,sBAAa;AAC1B,MAAQ,uBAAS"}
1
+ {"version":3,"file":"index.jsx","names":[],"sources":["../../src/tree/index.tsx"],"sourcesContent":["import {\n children as resolveChildren,\n createContext,\n createEffect,\n createMemo,\n createSignal,\n mergeProps,\n onCleanup,\n splitProps,\n useContext,\n type JSX,\n} from \"solid-js\";\nimport {\n Tree as HeadlessTree,\n TreeItem as HeadlessTreeItem,\n TreeItemContent as HeadlessTreeItemContent,\n TreeExpandButton as HeadlessTreeExpandButton,\n TreeSelectionCheckbox as HeadlessTreeSelectionCheckbox,\n TreeLoadMoreItem as HeadlessTreeLoadMoreItem,\n TreeStateContext as HeadlessTreeStateContext,\n TreeItemContext as HeadlessTreeItemContext,\n type TreeProps as HeadlessTreeProps,\n type TreeItemProps as HeadlessTreeItemProps,\n type TreeItemContentProps as HeadlessTreeItemContentProps,\n type TreeItemContentRenderProps as HeadlessTreeItemContentRenderProps,\n type TreeExpandButtonProps as HeadlessTreeExpandButtonProps,\n type TreeRenderProps,\n type TreeItemRenderProps,\n type TreeRenderItemState,\n} from \"@proyecto-viviana/solidaria-components\";\nimport type { Key, TreeItemData } from \"@proyecto-viviana/solid-stately\";\nimport { ActionButtonGroupContext } from \"../button/group-context\";\nimport {\n getSlottedContextProps,\n mergeContextRefs,\n mergeContextStyles,\n mergeContextUnsafeStyle,\n type RefLike,\n type SpectrumContextValue,\n} from \"../button/spectrum-context\";\nimport { IconContext } from \"../icon\";\nimport Checkmark from \"../icon/ui-icons/Checkmark\";\nimport Chevron from \"../icon/ui-icons/Chevron\";\nimport { ActionMenuContext } from \"../menu/ActionMenu\";\nimport { ProgressCircle } from \"../progress/ProgressCircle\";\nimport { useProviderProps } from \"../provider\";\nimport type { StyleString } from \"../style\";\nimport {\n baseColor,\n colorMix,\n focusRing,\n fontRelative,\n space,\n style,\n} from \"../style\" with { type: \"macro\" };\nimport { mergeStyles } from \"../style/runtime\";\nimport { edgeToText } from \"../style/spectrum-theme\" with { type: \"macro\" };\nimport type { UnsafeClassName } from \"../s2-internal/style-utils\";\nimport {\n controlFont,\n getAllowedOverrides,\n} from \"../s2-internal/style-utils\" with { type: \"macro\" };\nimport { Text, TextContext } from \"../text\";\n\nexport type TreeSelectionStyle = \"checkbox\" | \"highlight\";\nexport type TreeLoadingState =\n | \"idle\"\n | \"loading\"\n | \"loadingMore\"\n | \"sorting\"\n | \"filtering\"\n | \"error\";\n\nexport interface TreeProps<T extends object> extends Omit<\n HeadlessTreeProps<T>,\n \"class\" | \"style\" | \"children\" | \"items\" | \"selectionBehavior\" | \"isLoading\" | \"slot\" | \"ref\"\n> {\n /** TreeView content. Use a render function with `items` for S2 dynamic collections. */\n children: JSX.Element | ((item: TreeItemData<T>, state: TreeRenderItemState) => JSX.Element);\n /** Dynamic hierarchical items. Supports either `id` or `key`, matching React Spectrum examples. */\n items?: TreeItemData<T>[];\n /** Whether selection is shown with checkboxes or highlighted rows. @default 'checkbox' */\n selectionStyle?: TreeSelectionStyle;\n /** Loading state forwarded to load-more behavior. */\n loadingState?: TreeLoadingState;\n /** Provides an action bar when items are selected. */\n renderActionBar?: (selectedKeys: \"all\" | Set<Key>) => JSX.Element;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: UnsafeClassName | string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n /** Slot name when used in a Spectrum context. */\n slot?: string | null;\n /** Ref for the tree root element. */\n ref?: RefLike<HTMLDivElement>;\n /** Legacy label helper. Prefer aria-label or aria-labelledby. */\n label?: JSX.Element;\n /** Legacy description helper. */\n description?: JSX.Element;\n}\n\nexport interface TreeItemProps<T extends object> extends Omit<\n HeadlessTreeItemProps<T>,\n \"class\" | \"style\" | \"children\" | \"ref\"\n> {\n /** The unique id of the TreeViewItem. */\n id: Key;\n /** TreeViewItem content. Text-only children are wrapped in the S2 label slot. */\n children?: JSX.Element | ((renderProps: TreeItemRenderProps) => JSX.Element);\n /** Whether this item is disabled. Dynamic collections should prefer item data `isDisabled`. */\n isDisabled?: boolean;\n /** Whether this item has children that may not be loaded yet. */\n hasChildItems?: boolean;\n /** Link target metadata. */\n href?: HeadlessTreeItemProps<T>[\"href\"];\n target?: HeadlessTreeItemProps<T>[\"target\"];\n download?: HeadlessTreeItemProps<T>[\"download\"];\n rel?: HeadlessTreeItemProps<T>[\"rel\"];\n hrefLang?: HeadlessTreeItemProps<T>[\"hrefLang\"];\n ping?: HeadlessTreeItemProps<T>[\"ping\"];\n referrerPolicy?: HeadlessTreeItemProps<T>[\"referrerPolicy\"];\n routerOptions?: HeadlessTreeItemProps<T>[\"routerOptions\"];\n /** Optional description text. Prefer `<Text slot=\"description\">`. */\n description?: JSX.Element;\n /** Optional icon helper retained from the older Tree API. Prefer an icon child. */\n icon?: () => JSX.Element;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: UnsafeClassName | string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n /** Ref for the rendered row element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport interface TreeExpandButtonProps extends Omit<\n HeadlessTreeExpandButtonProps,\n \"class\" | \"style\"\n> {\n /** Additional CSS class name. Use only as a last resort. */\n class?: string;\n /** Additional inline styles. Use only as a last resort. */\n style?: JSX.CSSProperties;\n}\n\nexport interface TreeItemContentProps extends Omit<\n HeadlessTreeItemContentProps,\n \"class\" | \"style\"\n> {\n /** Additional CSS class name. Use only as a last resort. */\n class?: string;\n /** Additional inline styles. Use only as a last resort. */\n style?: JSX.CSSProperties;\n}\n\nexport interface TreeLoadMoreItemProps {\n onLoadMore: () => void | Promise<void>;\n isLoading?: boolean;\n loadingState?: TreeLoadingState;\n level?: number;\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\ntype StaticTreeItem = {\n id: Key;\n textValue?: string;\n isDisabled?: boolean;\n hasChildItems?: boolean;\n props: TreeItemProps<object>;\n};\n\ntype ItemRegistration = {\n id: Key;\n textValue?: string;\n isDisabled?: boolean;\n hasChildItems?: boolean;\n props?: TreeItemProps<object>;\n};\n\ninterface StaticCollectionContextValue {\n mode: \"static\" | \"dynamic\";\n registerItem(item: ItemRegistration): void;\n unregisterItem(id: Key): void;\n}\n\ninterface TreeViewContextValue {\n selectionStyle: TreeSelectionStyle;\n}\n\nexport const TreeViewContext = createContext<SpectrumContextValue<TreeProps<object>>>(null);\nconst InternalTreeViewContext = createContext<TreeViewContextValue>({\n selectionStyle: \"checkbox\",\n});\nconst StaticTreeCollectionContext = createContext<StaticCollectionContextValue | null>(null);\n\nconst treeViewWrapper = style(\n {\n minHeight: 0,\n minWidth: 200,\n display: \"flex\",\n flexDirection: \"column\",\n isolation: \"isolate\",\n position: \"relative\",\n overflow: \"clip\",\n },\n getAllowedOverrides({ height: true }),\n);\n\nconst treeView = style<TreeRenderProps & { isActionBar?: boolean }>(\n {\n ...focusRing(),\n outlineOffset: -2,\n outlineStyle: \"none\",\n userSelect: \"none\",\n minHeight: 0,\n minWidth: 0,\n width: \"full\",\n height: {\n isActionBar: \"full\",\n },\n boxSizing: \"border-box\",\n overflow: \"auto\",\n fontSize: controlFont(),\n backgroundColor: \"transparent\",\n borderWidth: 0,\n disableTapHighlight: true,\n },\n getAllowedOverrides({ height: true }),\n);\n\nconst legacyLabel = style({\n font: controlFont(),\n fontWeight: \"medium\",\n color: baseColor(\"neutral\"),\n marginBottom: 4,\n});\n\nconst legacyDescription = style({\n font: \"body-sm\",\n color: baseColor(\"neutral-subdued\"),\n marginTop: 4,\n});\n\nconst emptyState = style({\n minHeight: 112,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"neutral\",\n font: \"body-sm\",\n});\n\nconst selectedBackground = colorMix(\"gray-25\", \"gray-900\", 7);\nconst selectedActiveBackground = colorMix(\"gray-25\", \"gray-900\", 10);\n\ntype TreeRowLayerProps = Partial<TreeItemRenderProps> & {\n isLink?: boolean;\n selectionStyle?: TreeSelectionStyle;\n};\n\nconst treeViewItem = style<TreeRowLayerProps>({\n outlineStyle: \"none\",\n position: \"relative\",\n borderRadius: \"row\",\n gridColumnStart: 1,\n gridColumnEnd: -1,\n display: \"grid\",\n gridTemplateAreas: [\n \". checkbox level-padding expand-button icon label actions actionmenu\",\n \". checkbox level-padding expand-button icon description actions actionmenu\",\n ],\n gridTemplateColumns: [\n edgeToText(40),\n \"auto\",\n \"auto\",\n \"auto\",\n \"auto\",\n \"minmax(0,1fr)\",\n \"minmax(0,auto)\",\n \"auto\",\n ],\n gridTemplateRows: \"1fr auto\",\n alignItems: \"baseline\",\n rowGap: {\n \":has([slot=description])\": space(1),\n },\n columnGap: 0,\n paddingX: 0,\n minHeight: 40,\n paddingY: 0,\n boxSizing: \"border-box\",\n textDecoration: \"none\",\n color: {\n default: baseColor(\"neutral-subdued\"),\n isSelected: baseColor(\"neutral\"),\n isDisabled: {\n default: \"disabled\",\n forcedColors: \"GrayText\",\n },\n forcedColors: \"ButtonText\",\n selectionStyle: {\n highlight: {\n isSelected: {\n forcedColors: \"HighlightText\",\n },\n },\n },\n },\n backgroundColor: \"transparent\",\n cursor: {\n default: \"default\",\n isLink: \"pointer\",\n isDisabled: \"not-allowed\",\n },\n transition: \"default\",\n forcedColorAdjust: \"none\",\n});\n\nconst treeViewRowBackground = style<TreeRowLayerProps>({\n position: \"absolute\",\n zIndex: -1,\n inset: 0,\n backgroundColor: {\n default: \"gray-25\",\n isHovered: {\n default: \"gray-900/5\",\n selectionStyle: {\n checkbox: selectedBackground,\n },\n },\n isPressed: {\n default: \"gray-900/10\",\n selectionStyle: {\n checkbox: selectedActiveBackground,\n },\n },\n isSelected: {\n selectionStyle: {\n checkbox: {\n default: selectedBackground,\n isHovered: selectedActiveBackground,\n isPressed: selectedActiveBackground,\n isFocusVisible: selectedActiveBackground,\n },\n highlight: {\n default: colorMix(\"gray-25\", \"blue-900\", 10),\n isHovered: colorMix(\"gray-25\", \"blue-900\", 15),\n isPressed: colorMix(\"gray-25\", \"blue-900\", 15),\n },\n },\n },\n forcedColors: {\n default: \"Background\",\n selectionStyle: {\n highlight: {\n isSelected: \"Highlight\",\n },\n },\n },\n },\n borderRadius: \"row\",\n});\n\nconst treeViewRowFocusRing = style<TreeRowLayerProps>({\n ...focusRing(),\n outlineOffset: -2,\n outlineWidth: {\n default: 2,\n forcedColors: \"[3px]\",\n },\n outlineColor: {\n default: \"focus-ring\",\n forcedColors: {\n default: \"Highlight\",\n selectionStyle: {\n highlight: \"ButtonBorder\",\n },\n },\n },\n position: \"absolute\",\n inset: 0,\n borderRadius: \"default\",\n zIndex: 1,\n pointerEvents: \"none\",\n});\n\nconst treeViewItemCell = style({\n display: \"contents\",\n});\n\nconst treeLevelPadding = style({\n gridArea: \"level-padding\",\n alignSelf: \"stretch\",\n width: \"[calc(var(--tree-item-level, 0) * var(--tree-indent, 16px))]\",\n});\n\nconst treeExpandButton = style<TreeRowLayerProps>({\n gridArea: \"expand-button\",\n alignSelf: \"center\",\n justifySelf: \"center\",\n size: 40,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 0,\n backgroundColor: \"transparent\",\n color: {\n default: \"inherit\",\n isDisabled: {\n default: \"disabled\",\n forcedColors: \"GrayText\",\n },\n },\n borderRadius: \"default\",\n visibility: {\n default: \"hidden\",\n isExpandable: \"visible\",\n },\n cursor: {\n default: \"default\",\n isDisabled: \"not-allowed\",\n },\n disableTapHighlight: true,\n});\n\nconst treeExpandIcon = style<TreeRowLayerProps>({\n rotate: {\n isExpanded: 90,\n },\n transition: \"default\",\n \"--iconPrimary\": {\n type: \"fill\",\n value: \"currentColor\",\n },\n});\n\nconst treeCheckbox = style({\n gridArea: \"checkbox\",\n gridRowEnd: \"span 2\",\n alignSelf: \"center\",\n justifySelf: \"center\",\n marginEnd: 8,\n position: \"relative\",\n width: 16,\n height: 16,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n});\n\nconst treeCheckboxInput = style({\n position: \"absolute\",\n inset: 0,\n margin: 0,\n opacity: 0,\n cursor: \"inherit\",\n});\n\nconst treeCheckboxBox = style<TreeRowLayerProps>({\n ...focusRing(),\n size: 16,\n pointerEvents: \"none\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderRadius: \"row\",\n boxSizing: \"border-box\",\n backgroundColor: {\n default: \"gray-25\",\n isSelected: baseColor(\"neutral\"),\n isDisabled: \"disabled\",\n },\n borderColor: {\n default: baseColor(\"gray-800\"),\n isSelected: \"transparent\",\n isDisabled: \"disabled\",\n },\n});\n\nconst treeCheckboxIcon = style({\n pointerEvents: \"none\",\n \"--iconPrimary\": {\n type: \"fill\",\n value: {\n default: \"gray-25\",\n forcedColors: \"HighlightText\",\n },\n },\n});\n\nconst treeSlotIcon = style({\n gridArea: \"icon\",\n gridRowEnd: \"span 2\",\n display: \"block\",\n size: fontRelative(20),\n alignSelf: \"center\",\n marginEnd: \"text-to-visual\",\n \"--iconPrimary\": {\n type: \"fill\",\n value: \"currentColor\",\n },\n});\n\nconst treeLabel = style<TreeRowLayerProps>({\n gridArea: \"label\",\n minWidth: 0,\n alignSelf: \"center\",\n font: controlFont(),\n color: \"inherit\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n});\n\nconst treeDescription = style<TreeRowLayerProps>({\n gridArea: \"description\",\n minWidth: 0,\n alignSelf: \"center\",\n font: \"ui-sm\",\n color: {\n default: baseColor(\"neutral-subdued\"),\n isDisabled: {\n default: \"disabled\",\n forcedColors: \"GrayText\",\n },\n },\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n});\n\nconst treeActions = style({\n gridArea: \"actions\",\n gridRowEnd: \"span 2\",\n alignSelf: \"center\",\n justifySelf: \"end\",\n marginStart: \"text-to-visual\",\n});\n\nconst treeActionMenu = style({\n gridArea: \"actionmenu\",\n gridRowEnd: \"span 2\",\n alignSelf: \"center\",\n});\n\nconst treeLoadMore = style({\n minHeight: 32,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"neutral-subdued\",\n});\n\nfunction replaceManagedClass(element: Element, dataAttribute: string, nextClass: string): void {\n const previousClass = element.getAttribute(dataAttribute);\n\n for (const className of previousClass?.split(/\\s+/).filter(Boolean) ?? []) {\n element.classList.remove(className);\n }\n\n for (const className of nextClass.split(/\\s+/).filter(Boolean)) {\n element.classList.add(className);\n }\n\n element.setAttribute(dataAttribute, nextClass);\n}\n\nfunction applyItemSlotClasses(\n root: HTMLElement | undefined,\n renderProps: TreeItemRenderProps,\n context: TreeViewContextValue,\n): void {\n if (!root) {\n return;\n }\n\n const state = {\n ...renderProps,\n selectionStyle: context.selectionStyle,\n };\n\n const gridCell = root.querySelector('[role=\"gridcell\"]');\n if (gridCell) {\n replaceManagedClass(gridCell, \"data-s2-treeview-cell-class\", treeViewItemCell);\n }\n\n for (const element of Array.from(\n root.querySelectorAll('[slot=\"label\"], [data-slot=\"label\"], [data-rsp-slot=\"label\"]'),\n )) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeLabel(state));\n element.setAttribute(\"data-rsp-slot\", \"label\");\n }\n\n for (const element of Array.from(\n root.querySelectorAll(\n '[slot=\"description\"], [data-slot=\"description\"], [data-rsp-slot=\"description\"]',\n ),\n )) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeDescription(state));\n element.setAttribute(\"data-rsp-slot\", \"description\");\n }\n\n for (const element of Array.from(root.querySelectorAll('[slot=\"icon\"], [data-slot=\"icon\"]'))) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeSlotIcon);\n element.setAttribute(\"data-rsp-slot\", \"icon\");\n }\n\n for (const element of Array.from(root.querySelectorAll('[slot=\"actions\"]'))) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeActions);\n element.setAttribute(\"data-rsp-slot\", \"actions\");\n }\n\n for (const element of Array.from(root.querySelectorAll('[slot=\"actionmenu\"]'))) {\n replaceManagedClass(element, \"data-s2-treeview-slot-class\", treeActionMenu);\n element.setAttribute(\"data-rsp-slot\", \"actionmenu\");\n }\n}\n\nfunction selectedKeySet(keys: \"all\" | Iterable<Key> | undefined): \"all\" | Set<Key> {\n if (keys === \"all\") {\n return \"all\";\n }\n\n return new Set(keys ?? []);\n}\n\nfunction getItemKey<T extends object>(item: TreeItemData<T>, index: number): Key {\n return item.id ?? item.key ?? index;\n}\n\nfunction isTextOnlyChildren(value: unknown): boolean {\n if (typeof value === \"string\" || typeof value === \"number\") {\n return true;\n }\n\n return Array.isArray(value) && value.every(isTextOnlyChildren);\n}\n\nfunction treeItemFromStatic(item: StaticTreeItem): TreeItemData<object> {\n return {\n id: item.id,\n key: item.id,\n value: item.props as object,\n textValue: item.textValue ?? String(item.id),\n isDisabled: item.isDisabled,\n hasChildItems: item.hasChildItems,\n };\n}\n\nfunction mergeRegisteredTreeItems<T extends object>(\n items: TreeItemData<T>[],\n registeredItems: Map<Key, ItemRegistration>,\n): TreeItemData<T>[] {\n return items.map((item, index) => {\n const key = getItemKey(item, index);\n const registered = registeredItems.get(key);\n const children = item.children\n ? mergeRegisteredTreeItems(item.children as TreeItemData<T>[], registeredItems)\n : item.children;\n\n if (!registered) {\n return children === item.children ? item : { ...item, children };\n }\n\n return {\n ...item,\n id: item.id ?? key,\n key: item.key ?? key,\n isDisabled: item.isDisabled ?? registered.isDisabled,\n hasChildItems: item.hasChildItems ?? registered.hasChildItems,\n children,\n };\n });\n}\n\nexport function Tree<T extends object>(props: TreeProps<T>): JSX.Element {\n const providerProps = useProviderProps(props);\n const contextProps = getSlottedContextProps(\n useContext(TreeViewContext) as SpectrumContextValue<TreeProps<T>>,\n props.slot,\n );\n const mergedProps = mergeProps(providerProps, contextProps ?? {}, props) as TreeProps<T>;\n const [local, headlessProps] = splitProps(mergedProps, [\n \"children\",\n \"items\",\n \"selectionStyle\",\n \"loadingState\",\n \"renderActionBar\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"slot\",\n \"ref\",\n \"label\",\n \"description\",\n \"hasMore\",\n \"onLoadMore\",\n ]);\n const selectionStyle = (): TreeSelectionStyle => local.selectionStyle ?? \"checkbox\";\n const isLoading = () => local.loadingState === \"loading\" || local.loadingState === \"loadingMore\";\n const [staticItems, setStaticItems] = createSignal<StaticTreeItem[]>([]);\n const [registrationVersion, setRegistrationVersion] = createSignal(0);\n const registeredItems = new Map<Key, ItemRegistration>();\n const usesStaticChildren = () => local.items == null;\n const syncRegisteredItems = () => {\n setStaticItems(\n Array.from(registeredItems.values())\n .filter((item) => item.props)\n .map((item) => ({\n id: item.id,\n textValue: item.textValue,\n isDisabled: item.isDisabled,\n hasChildItems: item.hasChildItems,\n props: item.props!,\n })),\n );\n setRegistrationVersion((version) => version + 1);\n };\n const registrationContext: StaticCollectionContextValue = {\n get mode() {\n return usesStaticChildren() ? \"static\" : \"dynamic\";\n },\n registerItem(item) {\n const previous = registeredItems.get(item.id);\n if (\n previous &&\n previous.textValue === item.textValue &&\n previous.isDisabled === item.isDisabled &&\n previous.hasChildItems === item.hasChildItems &&\n previous.props === item.props\n ) {\n return;\n }\n\n registeredItems.set(item.id, item);\n syncRegisteredItems();\n },\n unregisterItem(id) {\n if (registeredItems.delete(id)) {\n syncRegisteredItems();\n }\n },\n };\n const treeContext = createMemo<TreeViewContextValue>(() => ({\n selectionStyle: selectionStyle(),\n }));\n const mergedStyles = () => mergeContextStyles(contextProps?.styles, props.styles);\n const mergedUnsafeStyle = () =>\n mergeContextUnsafeStyle(contextProps?.UNSAFE_style, props.UNSAFE_style);\n const assignRootRef = mergeContextRefs(\n (contextProps as { ref?: RefLike<HTMLDivElement> } | null)?.ref,\n props.ref,\n );\n const collectionItems = createMemo(() => {\n registrationVersion();\n if (usesStaticChildren()) {\n return staticItems().map(treeItemFromStatic) as TreeItemData<T>[];\n }\n\n return (local.items ?? []) as TreeItemData<T>[];\n });\n const collectionItemsWithDisabled = createMemo(() =>\n mergeRegisteredTreeItems(collectionItems(), registeredItems),\n );\n const [actionSelectedKeys, setActionSelectedKeys] = createSignal<\"all\" | Set<Key>>(\n selectedKeySet(headlessProps.selectedKeys ?? headlessProps.defaultSelectedKeys),\n );\n createEffect(() => {\n setActionSelectedKeys(\n selectedKeySet(headlessProps.selectedKeys ?? headlessProps.defaultSelectedKeys),\n );\n });\n const onSelectionChange = (keys: \"all\" | Set<Key>) => {\n setActionSelectedKeys(keys === \"all\" ? \"all\" : new Set(keys));\n headlessProps.onSelectionChange?.(keys);\n };\n const className = (renderProps: TreeRenderProps): string =>\n [\n contextProps?.UNSAFE_className,\n props.UNSAFE_className,\n props.class,\n mergeStyles(\n treeView({ ...renderProps, isActionBar: !!local.renderActionBar }),\n mergedStyles(),\n ),\n ]\n .filter(Boolean)\n .join(\" \");\n const renderEmptyState = () => (\n <div class={emptyState}>{headlessProps.renderEmptyState?.() ?? \"No items\"}</div>\n );\n const renderItem = (item: TreeItemData<T>, state: TreeRenderItemState) =>\n usesStaticChildren() ? (\n <TreeItem {...((item.value ?? item) as TreeItemProps<T>)} />\n ) : typeof local.children === \"function\" ? (\n local.children(item, state)\n ) : null;\n const renderRegistrationItems = (items: TreeItemData<T>[], level = 0): JSX.Element[] => {\n const rendered: JSX.Element[] = [];\n const renderChild = local.children;\n\n if (typeof renderChild !== \"function\") {\n return rendered;\n }\n\n for (const item of items) {\n const isExpandable = Boolean(item.children?.length || item.hasChildItems);\n rendered.push(\n renderChild(item, {\n isExpanded: false,\n isExpandable,\n level,\n }),\n );\n\n if (item.children?.length) {\n rendered.push(...renderRegistrationItems(item.children as TreeItemData<T>[], level + 1));\n }\n }\n\n return rendered;\n };\n const registrationChildren = () => {\n if (usesStaticChildren()) {\n const resolved = resolveChildren(() => local.children as JSX.Element);\n return resolved();\n }\n\n if (typeof local.children !== \"function\") {\n return null;\n }\n\n return renderRegistrationItems(local.items ?? []);\n };\n const loadMoreContent = () => (\n <div class={treeLoadMore} data-rsp-slot=\"load-more\">\n {isLoading() ? <ProgressCircle isIndeterminate size=\"S\" aria-label=\"Loading more\" /> : null}\n </div>\n );\n\n // One return shape, always framed — load-bearing for hydration (caught by\n // Tree.hydrate.test.tsx): never build two eager JSX branches and return one.\n // Client JSX consts are real DOM nodes, so an unused detached wrapper\n // embedding `collection` MOVES the just-claimed server nodes into itself and\n // the returned branch hydrates empty. SSR output is unaffected (strings\n // don't move), which is why only the live page lost the tree. A single\n // always-framed shape leaves exactly one construction path; without chrome\n // the wrapper is `display: contents`, so layout is untouched.\n // (A Tree hydration abort that once looked like a return-shape problem was\n // actually a repeated `local.children` read in ResolvedItemContent /\n // TreeItemContent — see the read-once comments there.)\n const collection = () => (\n <InternalTreeViewContext.Provider value={treeContext()}>\n <div hidden inert aria-hidden=\"true\" style={{ display: \"none\" }}>\n <StaticTreeCollectionContext.Provider value={registrationContext}>\n {registrationChildren()}\n </StaticTreeCollectionContext.Provider>\n </div>\n <HeadlessTree\n {...headlessProps}\n ref={(element: HTMLDivElement) => assignRootRef(element)}\n items={collectionItemsWithDisabled() ?? []}\n selectionBehavior={selectionStyle() === \"highlight\" ? \"replace\" : \"toggle\"}\n onSelectionChange={onSelectionChange}\n isLoading={isLoading()}\n hasMore={local.hasMore ?? !!local.onLoadMore}\n onLoadMore={local.onLoadMore}\n loadingState={local.loadingState}\n renderLoadMoreItem={loadMoreContent}\n renderEmptyState={renderEmptyState}\n slot={local.slot ?? undefined}\n class={className}\n style={mergedUnsafeStyle()}\n data-tree-view=\"\"\n data-selection-style={selectionStyle()}\n data-loading-state={local.loadingState ?? undefined}\n >\n {(item: TreeItemData<T>, state: TreeRenderItemState) => renderItem(item, state)}\n </HeadlessTree>\n </InternalTreeViewContext.Provider>\n );\n\n const hasChrome = () => Boolean(local.label || local.description || local.renderActionBar);\n\n return (\n <div\n class={hasChrome() ? treeViewWrapper(null, mergedStyles()) : undefined}\n style={hasChrome() ? mergedUnsafeStyle() : { display: \"contents\" }}\n >\n {local.label ? <div class={legacyLabel({})}>{local.label}</div> : null}\n {collection()}\n {local.description ? <div class={legacyDescription({})}>{local.description}</div> : null}\n {local.renderActionBar ? local.renderActionBar(actionSelectedKeys()) : null}\n </div>\n );\n}\n\nexport function TreeItem<T extends object>(props: TreeItemProps<T>): JSX.Element {\n const context = useContext(InternalTreeViewContext);\n const staticCollection = useContext(StaticTreeCollectionContext);\n const collectionState = useContext(HeadlessTreeStateContext);\n const [local, headlessProps] = splitProps(props, [\n \"children\",\n \"isDisabled\",\n \"hasChildItems\",\n \"href\",\n \"target\",\n \"download\",\n \"rel\",\n \"hrefLang\",\n \"ping\",\n \"referrerPolicy\",\n \"routerOptions\",\n \"description\",\n \"icon\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"ref\",\n ]);\n\n createEffect(() => {\n if (!staticCollection) {\n return;\n }\n\n staticCollection.registerItem({\n id: props.id,\n textValue: headlessProps.textValue ?? headlessProps[\"aria-label\"],\n isDisabled: !!local.isDisabled,\n hasChildItems: !!local.hasChildItems,\n props: staticCollection.mode === \"static\" ? (props as TreeItemProps<object>) : undefined,\n });\n });\n\n onCleanup(() => {\n staticCollection?.unregisterItem(props.id);\n });\n\n if (staticCollection) {\n return null;\n }\n\n let itemElement: HTMLElement | undefined;\n const assignItemRef = mergeContextRefs(local.ref, (element: HTMLElement) => {\n itemElement = element;\n });\n const getRowLayerProps = (renderProps: TreeItemRenderProps): TreeRowLayerProps => ({\n ...renderProps,\n selectionStyle: context.selectionStyle,\n isLink: !!local.href,\n });\n const getClassName = (renderProps: TreeItemRenderProps): string =>\n [\n local.UNSAFE_className,\n local.class,\n mergeStyles(\n treeViewItem({\n ...getRowLayerProps(renderProps),\n isLink: !!local.href,\n }),\n local.styles,\n ),\n ]\n .filter(Boolean)\n .join(\" \");\n const getStyle = (renderProps: TreeItemRenderProps): JSX.CSSProperties => ({\n \"--tree-item-level\": String(renderProps.level),\n \"--tree-indent\": \"16px\",\n ...local.UNSAFE_style,\n });\n const textContext = (renderProps: TreeItemRenderProps) => ({\n slots: {\n default: {\n slot: \"label\",\n styles: () => treeLabel(getRowLayerProps(renderProps)),\n },\n label: {\n slot: \"label\",\n styles: () => treeLabel(getRowLayerProps(renderProps)),\n },\n description: {\n slot: \"description\",\n styles: () => treeDescription(getRowLayerProps(renderProps)),\n },\n },\n });\n const shouldShowCheckbox = (renderProps: TreeItemRenderProps) =>\n renderProps.selectionMode !== \"none\" &&\n renderProps.selectionBehavior === \"toggle\" &&\n !renderProps.isDisabled;\n\n function ItemChildren(renderProps: TreeItemRenderProps) {\n createEffect(() => applyItemSlotClasses(itemElement, renderProps, context));\n\n function ResolvedItemContent() {\n const resolvedChildren = resolveChildren(() => {\n // Read `local.children` once — a repeated props-children read re-instantiates child\n // components on the server only, desynchronizing Solid's hydration keys and aborting\n // hydration for the whole route. See Tab's ResolvedTabContent for the full note.\n const rawChildren = local.children;\n return typeof rawChildren === \"function\" ? rawChildren(renderProps) : rawChildren;\n });\n const childrenValue = () => resolvedChildren();\n const isTextOnly = () => isTextOnlyChildren(childrenValue());\n\n return (\n <>\n {isTextOnly() ? (\n <TreeItemContent>\n <Text slot=\"label\">{childrenValue()}</Text>\n {local.description ? <Text slot=\"description\">{local.description}</Text> : null}\n </TreeItemContent>\n ) : (\n childrenValue()\n )}\n {!isTextOnly() && local.description ? (\n <Text slot=\"description\">{local.description}</Text>\n ) : null}\n </>\n );\n }\n\n return (\n <TextContext.Provider value={textContext(renderProps) as SpectrumContextValue<any>}>\n <IconContext.Provider\n value={{\n slot: \"icon\",\n styles: treeSlotIcon,\n }}\n >\n <ActionButtonGroupContext.Provider\n value={{\n slot: \"actions\",\n size: \"S\",\n styles: treeActions,\n }}\n >\n <ActionMenuContext.Provider\n value={{\n slot: \"actionmenu\",\n size: \"S\",\n menuSize: \"S\",\n styles: treeActionMenu,\n }}\n >\n {shouldShowCheckbox(renderProps) ? (\n <TreeSelectionCheckbox itemKey={props.id} renderProps={renderProps} />\n ) : null}\n <div\n class={treeViewRowBackground(getRowLayerProps(renderProps))}\n aria-hidden=\"true\"\n />\n {renderProps.isFocusVisible ? (\n <div\n class={treeViewRowFocusRing(getRowLayerProps(renderProps))}\n aria-hidden=\"true\"\n />\n ) : null}\n <span class={treeLevelPadding} aria-hidden=\"true\" />\n <TreeExpandButton renderProps={renderProps} />\n {local.icon ? (\n <span slot=\"icon\" class={treeSlotIcon} data-rsp-slot=\"icon\">\n {local.icon()}\n </span>\n ) : null}\n <ResolvedItemContent />\n </ActionMenuContext.Provider>\n </ActionButtonGroupContext.Provider>\n </IconContext.Provider>\n </TextContext.Provider>\n );\n }\n\n return (\n <HeadlessTreeItem\n {...headlessProps}\n ref={(element) => assignItemRef(element)}\n hasChildItems={local.hasChildItems}\n isDisabled={local.isDisabled}\n href={local.href}\n target={local.target}\n download={local.download}\n rel={local.rel}\n hrefLang={local.hrefLang}\n ping={local.ping}\n referrerPolicy={local.referrerPolicy}\n routerOptions={local.routerOptions}\n class={getClassName}\n style={getStyle}\n data-tree-view-item=\"\"\n data-disabled={local.isDisabled || undefined}\n data-href={local.href || undefined}\n data-target={local.target || undefined}\n data-has-child-items={local.hasChildItems || undefined}\n >\n {(renderProps: TreeItemRenderProps) => <ItemChildren {...renderProps} />}\n </HeadlessTreeItem>\n );\n}\n\nexport function TreeItemContent(props: TreeItemContentProps): JSX.Element {\n const [local, headlessProps] = splitProps(props, [\"children\", \"class\", \"style\"]);\n\n return (\n <HeadlessTreeItemContent {...headlessProps}>\n {(renderProps: HeadlessTreeItemContentRenderProps) => {\n const content = () => {\n // Read `local.children` once — a repeated props-children read re-instantiates child\n // components on the server only, desynchronizing Solid's hydration keys and aborting\n // hydration for the whole route. See Tab's ResolvedTabContent for the full note.\n const rawChildren = local.children;\n return typeof rawChildren === \"function\" ? rawChildren(renderProps) : rawChildren;\n };\n return (\n <span\n class={[treeViewItemCell, local.class].filter(Boolean).join(\" \")}\n style={local.style}\n >\n {content()}\n </span>\n );\n }}\n </HeadlessTreeItemContent>\n );\n}\n\nexport function TreeExpandButton(\n props: TreeExpandButtonProps & { renderProps?: TreeItemRenderProps },\n): JSX.Element {\n const [local, headlessProps] = splitProps(props, [\"class\", \"style\", \"children\", \"renderProps\"]);\n const itemContext = useContext(HeadlessTreeItemContext);\n const isExpandable = () => Boolean(itemContext?.isExpandable ?? local.renderProps?.isExpandable);\n const renderState = () => ({\n ...(local.renderProps ?? {}),\n isExpandable: isExpandable(),\n isExpanded: Boolean(itemContext?.isExpanded ?? local.renderProps?.isExpanded),\n });\n const className = () => [treeExpandButton(renderState()), local.class].filter(Boolean).join(\" \");\n const stopPlaceholderExpansion = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n if (!isExpandable()) {\n return (\n <button\n {...headlessProps}\n type=\"button\"\n tabIndex={-1}\n class={className()}\n style={local.style}\n aria-label=\"Expand\"\n onClick={stopPlaceholderExpansion}\n onPointerDown={stopPlaceholderExpansion}\n onPointerUp={stopPlaceholderExpansion}\n onMouseDown={stopPlaceholderExpansion}\n onMouseUp={stopPlaceholderExpansion}\n data-rsp-slot=\"expand-button\"\n >\n {(() => {\n // Read `local.children` once — a repeated props-children read re-instantiates child\n // components on the server only, desynchronizing Solid's hydration keys and aborting\n // hydration for the whole route. See Tab's ResolvedTabContent for the full note.\n const rawChildren = local.children;\n return typeof rawChildren === \"function\"\n ? rawChildren(renderState())\n : (rawChildren ?? (\n <Chevron size=\"S\" class={treeExpandIcon({ ...renderState(), isExpanded: false })} />\n ));\n })()}\n </button>\n );\n }\n\n return (\n <HeadlessTreeExpandButton\n {...headlessProps}\n class={className()}\n style={local.style}\n data-rsp-slot=\"expand-button\"\n >\n {local.children ??\n (({ isExpanded }: { isExpanded: boolean }) => (\n <Chevron size=\"S\" class={treeExpandIcon({ ...renderState(), isExpanded })} />\n ))}\n </HeadlessTreeExpandButton>\n );\n}\n\nexport function TreeSelectionCheckbox(props: {\n itemKey: Key;\n renderProps?: TreeItemRenderProps;\n class?: string;\n style?: JSX.CSSProperties;\n excludeFromTabOrder?: boolean;\n \"aria-label\"?: string;\n}): JSX.Element {\n const state = useContext(HeadlessTreeStateContext);\n const isSelected = () => Boolean(state?.isSelected?.(props.itemKey));\n const renderProps = createMemo<TreeRowLayerProps>(() => ({\n isSelected: props.renderProps?.isSelected ?? isSelected(),\n isFocused: props.renderProps?.isFocused ?? false,\n isFocusVisible: props.renderProps?.isFocusVisible ?? false,\n isPressed: props.renderProps?.isPressed ?? false,\n isHovered: props.renderProps?.isHovered ?? false,\n isDisabled: props.renderProps?.isDisabled ?? false,\n isExpanded: props.renderProps?.isExpanded ?? false,\n isExpandable: props.renderProps?.isExpandable ?? false,\n level: props.renderProps?.level ?? 0,\n selectionStyle: \"checkbox\",\n }));\n\n return (\n <span\n class={[treeCheckbox, props.class].filter(Boolean).join(\" \")}\n style={props.style}\n data-rsp-slot=\"selection-indicator\"\n >\n <HeadlessTreeSelectionCheckbox\n itemKey={props.itemKey}\n class={treeCheckboxInput}\n excludeFromTabOrder={props.excludeFromTabOrder}\n aria-label={props[\"aria-label\"] ?? \"Select\"}\n />\n <span class={treeCheckboxBox(renderProps())}>\n {renderProps().isSelected ? <Checkmark size=\"XS\" class={treeCheckboxIcon} /> : null}\n </span>\n </span>\n );\n}\n\nexport function TreeLoadMoreItem(props: TreeLoadMoreItemProps): JSX.Element {\n const staticCollection = useContext(StaticTreeCollectionContext);\n const isLoading = () =>\n props.isLoading || props.loadingState === \"loading\" || props.loadingState === \"loadingMore\";\n\n if (staticCollection) {\n return null;\n }\n\n return (\n <HeadlessTreeLoadMoreItem\n onLoadMore={props.onLoadMore}\n isLoading={isLoading()}\n loadingState={props.loadingState}\n level={props.level}\n class={[\"\", props.class].filter(Boolean).join(\" \")}\n style={props.style}\n >\n <div class={treeLoadMore} data-rsp-slot=\"load-more\">\n {props.children ??\n (isLoading() ? (\n <ProgressCircle isIndeterminate size=\"S\" aria-label=\"Loading more\" />\n ) : null)}\n </div>\n </HeadlessTreeLoadMoreItem>\n );\n}\n\nTree.Item = TreeItem;\nTree.Content = TreeItemContent;\nTree.ExpandButton = TreeExpandButton;\nTree.SelectionCheckbox = TreeSelectionCheckbox;\nTree.LoadMoreItem = TreeLoadMoreItem;\n\nexport const TreeView = Tree;\nexport const TreeViewItem = TreeItem;\nexport const TreeViewItemContent = TreeItemContent;\nexport const TreeViewLoadMoreItem = TreeLoadMoreItem;\nexport { Collection } from \"@proyecto-viviana/solidaria-components\";\nexport { Text } from \"../text\";\n\nexport type { Key, TreeItemData, TreeRenderItemState };\n"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AA;SACjB,MAAC,aAAiB,UAAA,IAAA,CAAA,eAAA,gBAAA,SAAA,+BAAA,MAAA;MACxB,EAAA,IAAA;;AAEH;AACA,KAAI,OAAO;AACX,KAAK,UAAE;AACP,KAAK,eAAO;AACZ,KAAK,oBAAe;AACpB,KAAK,eAAe;AACpB,MAAa,WAAW;AACxB,MAAa,eAAa;AAC1B,MAAa,sBAAa;AAC1B,MAAQ,uBAAS"}
@@ -228,7 +228,8 @@
228
228
  * Keep both in step with the `edgeGlassShadow` / `edgeGlassSurfaceShadow`
229
229
  * fallbacks in style/spectrum-theme.ts. */
230
230
  --edge-glass: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
231
- --edge-glass-surface: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.09);
231
+ --edge-glass-surface:
232
+ inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.09);
232
233
 
233
234
  /* ── Shadow + glow family (glow follows the accent, never the chrome) ── */
234
235
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.4);
@@ -270,11 +271,15 @@
270
271
  --slate-100: rgba(255, 255, 255, 0.06);
271
272
  --white: #ffffff;
272
273
 
273
- /* Text */
274
+ /* Text — see the light block for why the two ink roles below are pinned to
275
+ WCAG AA rather than to a ramp rung. Dark's binding surface is the opaque
276
+ `--surface-raised` #333a44, not the near-black app background: #9aa0a8 read
277
+ 7.4:1 on the app and 4.36:1 there, and #55a6f6 4.47:1. Both now clear 4.5:1
278
+ on the raised panel and sit comfortably above 6:1 everywhere else. */
274
279
  --text-primary: #f2f3f5;
275
- --text-secondary: #9aa0a8;
280
+ --text-secondary: #a0a6ae;
276
281
  --text-tertiary: #6e747c;
277
- --text-link: #55a6f6;
282
+ --text-link: #5faaf7;
278
283
  --text-on-accent: #ffffff;
279
284
 
280
285
  /* Terminal wells — matte / opaque, NEVER glass */
@@ -293,9 +298,15 @@
293
298
  --well-tutor-ink: #eaf2fb;
294
299
  --btn-secondary-bg: var(--surface-raised);
295
300
 
296
- /* Accents (app) — live pulse · create CTA · interactive fill */
301
+ /* Accents (app) — live pulse · create CTA · interactive fill
302
+ The fill is damped in dark (a filled accent button is a large area of
303
+ colour) but it still carries white label text: #407fc1 gave 4.18:1, just
304
+ under AA, so it steps down to #3670ae for 5.14:1 while staying above the
305
+ 3:1 non-text floor against the app, panel and card surfaces it sits on.
306
+ Kept in lockstep with blue-700's dark column in style/glasselated-ramps.ts,
307
+ which is the same fill for macro-styled components. */
297
308
  --accent-live: #ff6b35;
298
- --interactive-fill: #407fc1;
309
+ --interactive-fill: #3670ae;
299
310
  --accent-create-bg: rgb(255 222 129);
300
311
  --accent-create-border: rgb(255 222 129);
301
312
  --accent-create-ink: #3a2e00;
@@ -530,7 +541,8 @@
530
541
  * declared anyway so a surface never inherits the night value across a scheme
531
542
  * boundary. */
532
543
  --edge-glass: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
533
- --edge-glass-surface: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
544
+ --edge-glass-surface:
545
+ inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
534
546
  --shadow-card: 0 2px 8px rgba(99, 115, 139, 0.08), 0 8px 24px rgba(99, 115, 139, 0.1);
535
547
  --shadow-panel: 0 12px 40px rgba(99, 115, 139, 0.14);
536
548
  --shadow-float: 0 16px 48px rgba(99, 115, 139, 0.22);
@@ -570,11 +582,22 @@
570
582
  --slate-100: #eaeff6;
571
583
  --white: #ffffff;
572
584
 
573
- /* Text */
585
+ /* Text
586
+ `--text-secondary` and `--text-link` are pinned to WCAG AA (4.5:1), not to
587
+ the nearest ramp rung, and that is why neither is an alias any more:
588
+ - `--slate-500` #64748b reads 3.67-4.38:1 across our light surfaces, so
589
+ the secondary ink steps one notch darker than the slate ramp. The rung
590
+ itself is unchanged — it is a palette entry, this is an ink role.
591
+ - `--text-link` was `var(--blue-500)`, i.e. the same #2e90fa as
592
+ `--accent-primary` (2.50-3.24:1). Accent-as-ink and accent-as-decoration
593
+ cannot share one value at AA, so the ink takes `--blue-700` and
594
+ `--accent-primary` keeps #2e90fa for glows, rings, borders and dots.
595
+ Worst case measured over every surface a docs page composites: secondary
596
+ 4.65:1 on the accent-tinted chip, link 4.73:1 on the same. */
574
597
  --text-primary: var(--slate-900);
575
- --text-secondary: var(--slate-500);
598
+ --text-secondary: #556478;
576
599
  --text-tertiary: var(--slate-400);
577
- --text-link: var(--blue-500);
600
+ --text-link: var(--blue-700);
578
601
  --text-on-accent: var(--white);
579
602
 
580
603
  /* Terminal wells — matte, darker channel ink for daylight legibility */
@@ -593,9 +616,13 @@
593
616
  --well-tutor-ink: var(--text-primary);
594
617
  --btn-secondary-bg: #e9eff6;
595
618
 
596
- /* Accents (app) */
619
+ /* Accents (app)
620
+ `--interactive-fill` is the accent used as a FILL under `--text-on-accent`,
621
+ so it answers to 4.5:1 with white the way `--accent-primary` never has to.
622
+ It was `var(--accent-primary)`; white on #2e90fa is 3.24:1, the graphical
623
+ floor only, which is fine for an icon mask and wrong for a button label. */
597
624
  --accent-live: #ff6b35;
598
- --interactive-fill: var(--accent-primary);
625
+ --interactive-fill: var(--blue-700);
599
626
  --accent-create-bg: #ffedb0;
600
627
  --accent-create-border: #f5d88a;
601
628
  --accent-create-ink: #7a5600;
package/package.json CHANGED
@@ -1,7 +1,20 @@
1
1
  {
2
2
  "name": "@proyecto-viviana/ui",
3
- "version": "0.6.1",
4
- "description": "Viviana design system. A reskinned fork of @proyecto-viviana/solid-spectrum: the styled top layer is duplicated and remapped to the Viviana v2 (Glasselated) register, over the shared solidaria headless stack.",
3
+ "version": "0.6.3",
4
+ "description": "The Viviana design system for SolidJS: accessible, themeable components on a headless ARIA foundation",
5
+ "keywords": [
6
+ "a11y",
7
+ "accessibility",
8
+ "aria",
9
+ "components",
10
+ "design-system",
11
+ "solid",
12
+ "solidjs",
13
+ "ui",
14
+ "viviana"
15
+ ],
16
+ "homepage": "https://ui.proyectoviviana.org",
17
+ "bugs": "https://github.com/proyecto-viviana/ui/issues",
5
18
  "license": "MIT",
6
19
  "repository": {
7
20
  "type": "git",
@@ -249,9 +262,9 @@
249
262
  "@adobe/spectrum-tokens": "14.0.0",
250
263
  "@parcel/macros": "^2.16.4",
251
264
  "csstype": "^3.2.3",
252
- "@proyecto-viviana/solid-stately": "0.5.0",
253
- "@proyecto-viviana/solidaria": "0.4.2",
254
- "@proyecto-viviana/solidaria-components": "0.5.0"
265
+ "@proyecto-viviana/solid-stately": "0.5.1",
266
+ "@proyecto-viviana/solidaria-components": "0.5.1",
267
+ "@proyecto-viviana/solidaria": "0.4.3"
255
268
  },
256
269
  "devDependencies": {
257
270
  "solid-js": "^1.9.11",
@@ -315,9 +315,9 @@ function renderBreadcrumbs<T>(props: BreadcrumbsProps<T>, disposeRoot: () => voi
315
315
  return;
316
316
  }
317
317
 
318
- const hiddenItems = Array.from(
319
- measureRoot.querySelectorAll("[data-hidden-breadcrumb]"),
320
- ).filter((element): element is HTMLElement => element instanceof HTMLElement);
318
+ const hiddenItems = Array.from(measureRoot.querySelectorAll("[data-hidden-breadcrumb]")).filter(
319
+ (element): element is HTMLElement => element instanceof HTMLElement,
320
+ );
321
321
  const folder =
322
322
  measurementMenuButton ??
323
323
  (measureRoot.querySelector("[data-hidden-breadcrumb-menu-button]") as HTMLElement | null);
@@ -679,12 +679,19 @@ function renderBreadcrumbs<T>(props: BreadcrumbsProps<T>, disposeRoot: () => voi
679
679
  <For each={allItems()}>
680
680
  {(item, index) => {
681
681
  const isLast = () => index() === allItems().length - 1;
682
- const itemKey = () =>
683
- local.getKey?.(item) ?? defaultItemKey(item, index());
682
+ const itemKey = () => local.getKey?.(item) ?? defaultItemKey(item, index());
684
683
  return (
685
- <div data-hidden-breadcrumb style={{ display: "inline-flex", "align-items": "center" }}>
684
+ <div
685
+ data-hidden-breadcrumb
686
+ style={{ display: "inline-flex", "align-items": "center" }}
687
+ >
686
688
  <HeadlessBreadcrumbItemContext.Provider
687
- value={{ get itemKey() { return itemKey(); }, isLast }}
689
+ value={{
690
+ get itemKey() {
691
+ return itemKey();
692
+ },
693
+ isLast,
694
+ }}
688
695
  >
689
696
  {renderDynamicItem(item)}
690
697
  </HeadlessBreadcrumbItemContext.Provider>
@@ -128,10 +128,10 @@ export const s2ActionButton = style<S2ActionButtonStyleProps>(
128
128
  isSelected: {
129
129
  default: baseColor("neutral"),
130
130
  isEmphasized: {
131
- default: lightDark("accent-900", "accent-700"),
132
- isHovered: lightDark("accent-1000", "accent-800"),
133
- isPressed: lightDark("accent-1000", "accent-800"),
134
- isFocusVisible: lightDark("accent-1000", "accent-800"),
131
+ default: "interactive-fill",
132
+ isHovered: lightDark("accent-1000", "accent-600"),
133
+ isPressed: lightDark("accent-1000", "accent-600"),
134
+ isFocusVisible: lightDark("accent-1000", "accent-600"),
135
135
  },
136
136
  isDisabled: {
137
137
  default: "gray-100",
@@ -205,10 +205,10 @@ export const s2ActionButton = style<S2ActionButtonStyleProps>(
205
205
  isSelected: {
206
206
  default: baseColor("gray-800"),
207
207
  isEmphasized: {
208
- default: lightDark("accent-900", "accent-700"),
209
- isHovered: lightDark("accent-1000", "accent-800"),
210
- isPressed: lightDark("accent-1000", "accent-800"),
211
- isFocusVisible: lightDark("accent-1000", "accent-800"),
208
+ default: "interactive-fill",
209
+ isHovered: lightDark("accent-1000", "accent-600"),
210
+ isPressed: lightDark("accent-1000", "accent-600"),
211
+ isFocusVisible: lightDark("accent-1000", "accent-600"),
212
212
  },
213
213
  },
214
214
  isDisabled: {
@@ -135,10 +135,10 @@ export const s2Button = style<S2ButtonStyleProps>(
135
135
  secondary: "border-subtle",
136
136
  create: "create-border",
137
137
  accent: {
138
- default: lightDark("accent-900", "accent-700"),
139
- isHovered: lightDark("accent-1000", "accent-800"),
140
- isPressed: lightDark("accent-1000", "accent-800"),
141
- isFocusVisible: lightDark("accent-1000", "accent-800"),
138
+ default: "interactive-fill",
139
+ isHovered: lightDark("accent-1000", "accent-600"),
140
+ isPressed: lightDark("accent-1000", "accent-600"),
141
+ isFocusVisible: lightDark("accent-1000", "accent-600"),
142
142
  },
143
143
  negative: {
144
144
  default: lightDark("negative-900", "negative-700"),
@@ -208,10 +208,10 @@ export const s2Button = style<S2ButtonStyleProps>(
208
208
  isFocusVisible: "gray-200",
209
209
  },
210
210
  accent: {
211
- default: lightDark("accent-900", "accent-700"),
212
- isHovered: lightDark("accent-1000", "accent-800"),
213
- isPressed: lightDark("accent-1000", "accent-800"),
214
- isFocusVisible: lightDark("accent-1000", "accent-800"),
211
+ default: "interactive-fill",
212
+ isHovered: lightDark("accent-1000", "accent-600"),
213
+ isPressed: lightDark("accent-1000", "accent-600"),
214
+ isFocusVisible: lightDark("accent-1000", "accent-600"),
215
215
  },
216
216
  negative: {
217
217
  default: lightDark("negative-900", "negative-700"),
@@ -345,13 +345,9 @@ function DateFieldContent(props: {
345
345
  // compose focus-visible from the global interaction modality — exactly how
346
346
  // createFocusRing derives `isFocusVisible = isFocused && focusVisibleFlag`.
347
347
  const [isFocusWithin, setIsFocusWithin] = createSignal(false);
348
- const [isFocusVisibleModality, setIsFocusVisibleModality] = createSignal(
349
- isGlobalFocusVisible(),
350
- );
348
+ const [isFocusVisibleModality, setIsFocusVisibleModality] = createSignal(isGlobalFocusVisible());
351
349
  createEffect(() => {
352
- const cleanup = createFocusVisibleListener((visible) =>
353
- setIsFocusVisibleModality(visible),
354
- );
350
+ const cleanup = createFocusVisibleListener((visible) => setIsFocusVisibleModality(visible));
355
351
  onCleanup(cleanup);
356
352
  });
357
353
  const isFocusVisibleWithin = () => isFocusWithin() && isFocusVisibleModality();
@@ -716,7 +716,14 @@ export function DatePicker<T extends DateValue = CalendarDate>(
716
716
  <DatePickerButton
717
717
  ref={setButtonEl}
718
718
  class={({ isDisabled, isOpen, isHovered, isPressed, isFocusVisible }) =>
719
- calendarButton({ isDisabled, isOpen, isHovered, isPressed, isFocusVisible, size: size() })
719
+ calendarButton({
720
+ isDisabled,
721
+ isOpen,
722
+ isHovered,
723
+ isPressed,
724
+ isFocusVisible,
725
+ size: size(),
726
+ })
720
727
  }
721
728
  style={pressScale(buttonEl)}
722
729
  >
@@ -25,7 +25,13 @@ import {
25
25
  import { useLocale } from "@proyecto-viviana/solidaria";
26
26
  import { DateFormatter, type RangeCalendarStateProps } from "@proyecto-viviana/solid-stately";
27
27
  import type { StyleString } from "../style";
28
- import { baseColor, focusRing, lightDark, setColorScheme, style } from "../style" with { type: "macro" };
28
+ import {
29
+ baseColor,
30
+ focusRing,
31
+ lightDark,
32
+ setColorScheme,
33
+ style,
34
+ } from "../style" with { type: "macro" };
29
35
  import ChevronLeftIcon from "../icon/s2wf-icons/ChevronLeftIcon";
30
36
  import ChevronRightIcon from "../icon/s2wf-icons/ChevronRightIcon";
31
37
  import { pressScale } from "../pressScale";
@@ -370,9 +376,9 @@ const rangeCalendarCellInner = style<{
370
376
  },
371
377
  },
372
378
  isSelectionStart: {
373
- default: lightDark("accent-900", "accent-700"),
374
- isHovered: lightDark("accent-1000", "accent-800"),
375
- isPressed: lightDark("accent-1000", "accent-800"),
379
+ default: "interactive-fill",
380
+ isHovered: lightDark("accent-1000", "accent-600"),
381
+ isPressed: lightDark("accent-1000", "accent-600"),
376
382
  isDisabled: "transparent",
377
383
  isInvalid: {
378
384
  default: lightDark("negative-900", "negative-700"),
@@ -384,9 +390,9 @@ const rangeCalendarCellInner = style<{
384
390
  },
385
391
  },
386
392
  isSelectionEnd: {
387
- default: lightDark("accent-900", "accent-700"),
388
- isHovered: lightDark("accent-1000", "accent-800"),
389
- isPressed: lightDark("accent-1000", "accent-800"),
393
+ default: "interactive-fill",
394
+ isHovered: lightDark("accent-1000", "accent-600"),
395
+ isPressed: lightDark("accent-1000", "accent-600"),
390
396
  isDisabled: "transparent",
391
397
  isInvalid: {
392
398
  default: lightDark("negative-900", "negative-700"),
@@ -339,13 +339,9 @@ function TimeFieldContent(props: {
339
339
  // and compose focus-visible from the global interaction modality — exactly how
340
340
  // createFocusRing derives `isFocusVisible = isFocused && focusVisibleFlag`.
341
341
  const [isFocusWithin, setIsFocusWithin] = createSignal(false);
342
- const [isFocusVisibleModality, setIsFocusVisibleModality] = createSignal(
343
- isGlobalFocusVisible(),
344
- );
342
+ const [isFocusVisibleModality, setIsFocusVisibleModality] = createSignal(isGlobalFocusVisible());
345
343
  createEffect(() => {
346
- const cleanup = createFocusVisibleListener((visible) =>
347
- setIsFocusVisibleModality(visible),
348
- );
344
+ const cleanup = createFocusVisibleListener((visible) => setIsFocusVisibleModality(visible));
349
345
  onCleanup(cleanup);
350
346
  });
351
347
  const isFocusVisibleWithin = () => isFocusWithin() && isFocusVisibleModality();