@proyecto-viviana/silapse 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +192 -0
  3. package/dist/accordion/index.d.ts +6 -0
  4. package/dist/accordion/index.d.ts.map +1 -0
  5. package/dist/actionbar/index.d.ts +34 -0
  6. package/dist/actionbar/index.d.ts.map +1 -0
  7. package/dist/actiongroup/index.d.ts +42 -0
  8. package/dist/actiongroup/index.d.ts.map +1 -0
  9. package/dist/alert/index.d.ts +13 -0
  10. package/dist/alert/index.d.ts.map +1 -0
  11. package/dist/autocomplete/index.d.ts +51 -0
  12. package/dist/autocomplete/index.d.ts.map +1 -0
  13. package/dist/avatar/index.d.ts +18 -0
  14. package/dist/avatar/index.d.ts.map +1 -0
  15. package/dist/badge/index.d.ts +12 -0
  16. package/dist/badge/index.d.ts.map +1 -0
  17. package/dist/breadcrumbs/index.d.ts +38 -0
  18. package/dist/breadcrumbs/index.d.ts.map +1 -0
  19. package/dist/button/ActionButton.d.ts +21 -0
  20. package/dist/button/ActionButton.d.ts.map +1 -0
  21. package/dist/button/Button.d.ts +19 -0
  22. package/dist/button/Button.d.ts.map +1 -0
  23. package/dist/button/ClearButton.d.ts +19 -0
  24. package/dist/button/ClearButton.d.ts.map +1 -0
  25. package/dist/button/FieldButton.d.ts +16 -0
  26. package/dist/button/FieldButton.d.ts.map +1 -0
  27. package/dist/button/LogicButton.d.ts +16 -0
  28. package/dist/button/LogicButton.d.ts.map +1 -0
  29. package/dist/button/ToggleButton.d.ts +19 -0
  30. package/dist/button/ToggleButton.d.ts.map +1 -0
  31. package/dist/button/index.d.ts +13 -0
  32. package/dist/button/index.d.ts.map +1 -0
  33. package/dist/button/types.d.ts +23 -0
  34. package/dist/button/types.d.ts.map +1 -0
  35. package/dist/buttongroup/index.d.ts +11 -0
  36. package/dist/buttongroup/index.d.ts.map +1 -0
  37. package/dist/calendar/DateField.d.ts +47 -0
  38. package/dist/calendar/DateField.d.ts.map +1 -0
  39. package/dist/calendar/DatePicker.d.ts +28 -0
  40. package/dist/calendar/DatePicker.d.ts.map +1 -0
  41. package/dist/calendar/DateRangePicker.d.ts +26 -0
  42. package/dist/calendar/DateRangePicker.d.ts.map +1 -0
  43. package/dist/calendar/RangeCalendar.d.ts +42 -0
  44. package/dist/calendar/RangeCalendar.d.ts.map +1 -0
  45. package/dist/calendar/TimeField.d.ts +44 -0
  46. package/dist/calendar/TimeField.d.ts.map +1 -0
  47. package/dist/calendar/index.d.ts +50 -0
  48. package/dist/calendar/index.d.ts.map +1 -0
  49. package/dist/card/index.d.ts +11 -0
  50. package/dist/card/index.d.ts.map +1 -0
  51. package/dist/checkbox/index.d.ts +43 -0
  52. package/dist/checkbox/index.d.ts.map +1 -0
  53. package/dist/color/ColorEditor.d.ts +17 -0
  54. package/dist/color/ColorEditor.d.ts.map +1 -0
  55. package/dist/color/ColorSwatchPicker.d.ts +36 -0
  56. package/dist/color/ColorSwatchPicker.d.ts.map +1 -0
  57. package/dist/color/index.d.ts +233 -0
  58. package/dist/color/index.d.ts.map +1 -0
  59. package/dist/combobox/index.d.ts +81 -0
  60. package/dist/combobox/index.d.ts.map +1 -0
  61. package/dist/components.css +1152 -0
  62. package/dist/contextualhelp/index.d.ts +18 -0
  63. package/dist/contextualhelp/index.d.ts.map +1 -0
  64. package/dist/custom/calendar-card/index.d.ts +12 -0
  65. package/dist/custom/calendar-card/index.d.ts.map +1 -0
  66. package/dist/custom/chip/index.d.ts +16 -0
  67. package/dist/custom/chip/index.d.ts.map +1 -0
  68. package/dist/custom/conversation/index.d.ts +32 -0
  69. package/dist/custom/conversation/index.d.ts.map +1 -0
  70. package/dist/custom/event-card/index.d.ts +30 -0
  71. package/dist/custom/event-card/index.d.ts.map +1 -0
  72. package/dist/custom/header/index.d.ts +16 -0
  73. package/dist/custom/header/index.d.ts.map +1 -0
  74. package/dist/custom/lateral-nav/index.d.ts +32 -0
  75. package/dist/custom/lateral-nav/index.d.ts.map +1 -0
  76. package/dist/custom/logo/index.d.ts +28 -0
  77. package/dist/custom/logo/index.d.ts.map +1 -0
  78. package/dist/custom/nav-header/index.d.ts +13 -0
  79. package/dist/custom/nav-header/index.d.ts.map +1 -0
  80. package/dist/custom/page-layout/index.d.ts +13 -0
  81. package/dist/custom/page-layout/index.d.ts.map +1 -0
  82. package/dist/custom/profile-card/index.d.ts +16 -0
  83. package/dist/custom/profile-card/index.d.ts.map +1 -0
  84. package/dist/custom/project-card/index.d.ts +24 -0
  85. package/dist/custom/project-card/index.d.ts.map +1 -0
  86. package/dist/custom/timeline-item/index.d.ts +28 -0
  87. package/dist/custom/timeline-item/index.d.ts.map +1 -0
  88. package/dist/datepicker/index.d.ts +10 -0
  89. package/dist/datepicker/index.d.ts.map +1 -0
  90. package/dist/dialog/AlertDialog.d.ts +41 -0
  91. package/dist/dialog/AlertDialog.d.ts.map +1 -0
  92. package/dist/dialog/Dialog.d.ts +62 -0
  93. package/dist/dialog/Dialog.d.ts.map +1 -0
  94. package/dist/dialog/index.d.ts +5 -0
  95. package/dist/dialog/index.d.ts.map +1 -0
  96. package/dist/disclosure/index.d.ts +84 -0
  97. package/dist/disclosure/index.d.ts.map +1 -0
  98. package/dist/divider/index.d.ts +6 -0
  99. package/dist/divider/index.d.ts.map +1 -0
  100. package/dist/dnd/index.d.ts +7 -0
  101. package/dist/dnd/index.d.ts.map +1 -0
  102. package/dist/dropzone/index.d.ts +13 -0
  103. package/dist/dropzone/index.d.ts.map +1 -0
  104. package/dist/filetrigger/index.d.ts +13 -0
  105. package/dist/filetrigger/index.d.ts.map +1 -0
  106. package/dist/form/Field.d.ts +35 -0
  107. package/dist/form/Field.d.ts.map +1 -0
  108. package/dist/form/HelpText.d.ts +23 -0
  109. package/dist/form/HelpText.d.ts.map +1 -0
  110. package/dist/form/index.d.ts +20 -0
  111. package/dist/form/index.d.ts.map +1 -0
  112. package/dist/gridlist/index.d.ts +92 -0
  113. package/dist/gridlist/index.d.ts.map +1 -0
  114. package/dist/icon/Illustration.d.ts +22 -0
  115. package/dist/icon/Illustration.d.ts.map +1 -0
  116. package/dist/icon/UIIcon.d.ts +24 -0
  117. package/dist/icon/UIIcon.d.ts.map +1 -0
  118. package/dist/icon/icons/GitHubIcon.d.ts +8 -0
  119. package/dist/icon/icons/GitHubIcon.d.ts.map +1 -0
  120. package/dist/icon/index.d.ts +40 -0
  121. package/dist/icon/index.d.ts.map +1 -0
  122. package/dist/illustratedmessage/index.d.ts +14 -0
  123. package/dist/illustratedmessage/index.d.ts.map +1 -0
  124. package/dist/image/index.d.ts +11 -0
  125. package/dist/image/index.d.ts.map +1 -0
  126. package/dist/index.d.ts +231 -0
  127. package/dist/index.d.ts.map +1 -0
  128. package/dist/index.js +10697 -0
  129. package/dist/index.js.map +1 -0
  130. package/dist/index.ssr.js +8944 -0
  131. package/dist/index.ssr.js.map +1 -0
  132. package/dist/inlinealert/index.d.ts +6 -0
  133. package/dist/inlinealert/index.d.ts.map +1 -0
  134. package/dist/label/index.d.ts +14 -0
  135. package/dist/label/index.d.ts.map +1 -0
  136. package/dist/labeledvalue/index.d.ts +25 -0
  137. package/dist/labeledvalue/index.d.ts.map +1 -0
  138. package/dist/landmark/index.d.ts +83 -0
  139. package/dist/landmark/index.d.ts.map +1 -0
  140. package/dist/layout/Flex.d.ts +29 -0
  141. package/dist/layout/Flex.d.ts.map +1 -0
  142. package/dist/layout/Grid.d.ts +37 -0
  143. package/dist/layout/Grid.d.ts.map +1 -0
  144. package/dist/layout/css-utils.d.ts +23 -0
  145. package/dist/layout/css-utils.d.ts.map +1 -0
  146. package/dist/layout/index.d.ts +11 -0
  147. package/dist/layout/index.d.ts.map +1 -0
  148. package/dist/link/index.d.ts +39 -0
  149. package/dist/link/index.d.ts.map +1 -0
  150. package/dist/list/index.d.ts +6 -0
  151. package/dist/list/index.d.ts.map +1 -0
  152. package/dist/listbox/index.d.ts +47 -0
  153. package/dist/listbox/index.d.ts.map +1 -0
  154. package/dist/menu/ActionMenu.d.ts +24 -0
  155. package/dist/menu/ActionMenu.d.ts.map +1 -0
  156. package/dist/menu/ContextualHelpTrigger.d.ts +36 -0
  157. package/dist/menu/ContextualHelpTrigger.d.ts.map +1 -0
  158. package/dist/menu/SubmenuTrigger.d.ts +14 -0
  159. package/dist/menu/SubmenuTrigger.d.ts.map +1 -0
  160. package/dist/menu/index.d.ts +80 -0
  161. package/dist/menu/index.d.ts.map +1 -0
  162. package/dist/meter/index.d.ts +51 -0
  163. package/dist/meter/index.d.ts.map +1 -0
  164. package/dist/numberfield/index.d.ts +32 -0
  165. package/dist/numberfield/index.d.ts.map +1 -0
  166. package/dist/overlays/Modal.d.ts +21 -0
  167. package/dist/overlays/Modal.d.ts.map +1 -0
  168. package/dist/overlays/OpenTransition.d.ts +46 -0
  169. package/dist/overlays/OpenTransition.d.ts.map +1 -0
  170. package/dist/overlays/Overlay.d.ts +21 -0
  171. package/dist/overlays/Overlay.d.ts.map +1 -0
  172. package/dist/overlays/Tray.d.ts +18 -0
  173. package/dist/overlays/Tray.d.ts.map +1 -0
  174. package/dist/overlays/index.d.ts +18 -0
  175. package/dist/overlays/index.d.ts.map +1 -0
  176. package/dist/picker/index.d.ts +6 -0
  177. package/dist/picker/index.d.ts.map +1 -0
  178. package/dist/popover/index.d.ts +86 -0
  179. package/dist/popover/index.d.ts.map +1 -0
  180. package/dist/progress/ProgressCircle.d.ts +31 -0
  181. package/dist/progress/ProgressCircle.d.ts.map +1 -0
  182. package/dist/progress/index.d.ts +8 -0
  183. package/dist/progress/index.d.ts.map +1 -0
  184. package/dist/progress-bar/index.d.ts +51 -0
  185. package/dist/progress-bar/index.d.ts.map +1 -0
  186. package/dist/provider/index.d.ts +77 -0
  187. package/dist/provider/index.d.ts.map +1 -0
  188. package/dist/radio/index.d.ts +39 -0
  189. package/dist/radio/index.d.ts.map +1 -0
  190. package/dist/searchfield/index.d.ts +29 -0
  191. package/dist/searchfield/index.d.ts.map +1 -0
  192. package/dist/select/index.d.ts +72 -0
  193. package/dist/select/index.d.ts.map +1 -0
  194. package/dist/separator/index.d.ts +38 -0
  195. package/dist/separator/index.d.ts.map +1 -0
  196. package/dist/shared-element/index.d.ts +10 -0
  197. package/dist/shared-element/index.d.ts.map +1 -0
  198. package/dist/slider/RangeSlider.d.ts +48 -0
  199. package/dist/slider/RangeSlider.d.ts.map +1 -0
  200. package/dist/slider/index.d.ts +32 -0
  201. package/dist/slider/index.d.ts.map +1 -0
  202. package/dist/statuslight/index.d.ts +22 -0
  203. package/dist/statuslight/index.d.ts.map +1 -0
  204. package/dist/steplist/index.d.ts +15 -0
  205. package/dist/steplist/index.d.ts.map +1 -0
  206. package/dist/story-utils/ErrorBoundary.d.ts +17 -0
  207. package/dist/story-utils/ErrorBoundary.d.ts.map +1 -0
  208. package/dist/story-utils/generatePowerset.d.ts +32 -0
  209. package/dist/story-utils/generatePowerset.d.ts.map +1 -0
  210. package/dist/story-utils/index.d.ts +9 -0
  211. package/dist/story-utils/index.d.ts.map +1 -0
  212. package/dist/style-macro-s1/index.d.ts +5 -0
  213. package/dist/style-macro-s1/index.d.ts.map +1 -0
  214. package/dist/styles.css +487 -0
  215. package/dist/switch/ToggleSwitch.d.ts +28 -0
  216. package/dist/switch/ToggleSwitch.d.ts.map +1 -0
  217. package/dist/switch/index.d.ts +26 -0
  218. package/dist/switch/index.d.ts.map +1 -0
  219. package/dist/table/index.d.ts +140 -0
  220. package/dist/table/index.d.ts.map +1 -0
  221. package/dist/tabs/index.d.ts +56 -0
  222. package/dist/tabs/index.d.ts.map +1 -0
  223. package/dist/tag/index.d.ts +6 -0
  224. package/dist/tag/index.d.ts.map +1 -0
  225. package/dist/tag-group/index.d.ts +84 -0
  226. package/dist/tag-group/index.d.ts.map +1 -0
  227. package/dist/text/Heading.d.ts +22 -0
  228. package/dist/text/Heading.d.ts.map +1 -0
  229. package/dist/text/Keyboard.d.ts +16 -0
  230. package/dist/text/Keyboard.d.ts.map +1 -0
  231. package/dist/text/index.d.ts +20 -0
  232. package/dist/text/index.d.ts.map +1 -0
  233. package/dist/textfield/TextArea.d.ts +30 -0
  234. package/dist/textfield/TextArea.d.ts.map +1 -0
  235. package/dist/textfield/index.d.ts +27 -0
  236. package/dist/textfield/index.d.ts.map +1 -0
  237. package/dist/theme/types.d.ts +10 -0
  238. package/dist/theme/types.d.ts.map +1 -0
  239. package/dist/theme-dark/index.d.ts +10 -0
  240. package/dist/theme-dark/index.d.ts.map +1 -0
  241. package/dist/theme-default/index.d.ts +8 -0
  242. package/dist/theme-default/index.d.ts.map +1 -0
  243. package/dist/theme-express/index.d.ts +5 -0
  244. package/dist/theme-express/index.d.ts.map +1 -0
  245. package/dist/theme-light/index.d.ts +10 -0
  246. package/dist/theme-light/index.d.ts.map +1 -0
  247. package/dist/theme.css +360 -0
  248. package/dist/toast/index.d.ts +101 -0
  249. package/dist/toast/index.d.ts.map +1 -0
  250. package/dist/toolbar/index.d.ts +42 -0
  251. package/dist/toolbar/index.d.ts.map +1 -0
  252. package/dist/tooltip/index.d.ts +78 -0
  253. package/dist/tooltip/index.d.ts.map +1 -0
  254. package/dist/tree/index.d.ts +99 -0
  255. package/dist/tree/index.d.ts.map +1 -0
  256. package/dist/view/Content.d.ts +37 -0
  257. package/dist/view/Content.d.ts.map +1 -0
  258. package/dist/view/index.d.ts +13 -0
  259. package/dist/view/index.d.ts.map +1 -0
  260. package/dist/well/index.d.ts +11 -0
  261. package/dist/well/index.d.ts.map +1 -0
  262. package/package.json +67 -0
  263. package/src/accordion/index.tsx +19 -0
  264. package/src/actionbar/index.tsx +92 -0
  265. package/src/actiongroup/index.tsx +110 -0
  266. package/src/alert/index.tsx +59 -0
  267. package/src/assets/favicon.png +0 -0
  268. package/src/assets/fire.gif +0 -0
  269. package/src/autocomplete/index.tsx +151 -0
  270. package/src/avatar/index.tsx +75 -0
  271. package/src/badge/index.tsx +43 -0
  272. package/src/breadcrumbs/index.tsx +212 -0
  273. package/src/button/ActionButton.tsx +80 -0
  274. package/src/button/Button.tsx +76 -0
  275. package/src/button/ClearButton.tsx +81 -0
  276. package/src/button/FieldButton.tsx +60 -0
  277. package/src/button/LogicButton.tsx +62 -0
  278. package/src/button/ToggleButton.tsx +77 -0
  279. package/src/button/index.ts +12 -0
  280. package/src/button/types.ts +24 -0
  281. package/src/buttongroup/index.tsx +25 -0
  282. package/src/calendar/DateField.tsx +208 -0
  283. package/src/calendar/DatePicker.tsx +257 -0
  284. package/src/calendar/DateRangePicker.tsx +254 -0
  285. package/src/calendar/RangeCalendar.tsx +238 -0
  286. package/src/calendar/TimeField.tsx +204 -0
  287. package/src/calendar/index.tsx +225 -0
  288. package/src/card/index.tsx +24 -0
  289. package/src/checkbox/index.tsx +259 -0
  290. package/src/color/ColorEditor.tsx +60 -0
  291. package/src/color/ColorSwatchPicker.tsx +169 -0
  292. package/src/color/index.tsx +725 -0
  293. package/src/combobox/index.tsx +398 -0
  294. package/src/components.css +1152 -0
  295. package/src/contextualhelp/index.tsx +42 -0
  296. package/src/custom/calendar-card/index.tsx +66 -0
  297. package/src/custom/chip/index.tsx +47 -0
  298. package/src/custom/conversation/index.tsx +107 -0
  299. package/src/custom/event-card/index.tsx +133 -0
  300. package/src/custom/header/index.tsx +33 -0
  301. package/src/custom/lateral-nav/index.tsx +88 -0
  302. package/src/custom/logo/index.tsx +58 -0
  303. package/src/custom/nav-header/index.tsx +45 -0
  304. package/src/custom/page-layout/index.tsx +29 -0
  305. package/src/custom/profile-card/index.tsx +64 -0
  306. package/src/custom/project-card/index.tsx +59 -0
  307. package/src/custom/timeline-item/index.tsx +105 -0
  308. package/src/datepicker/index.tsx +23 -0
  309. package/src/dialog/AlertDialog.tsx +140 -0
  310. package/src/dialog/Dialog.tsx +195 -0
  311. package/src/dialog/index.tsx +5 -0
  312. package/src/disclosure/index.tsx +310 -0
  313. package/src/divider/index.tsx +11 -0
  314. package/src/dnd/index.tsx +23 -0
  315. package/src/dropzone/index.tsx +48 -0
  316. package/src/filetrigger/index.tsx +28 -0
  317. package/src/form/Field.tsx +94 -0
  318. package/src/form/HelpText.tsx +48 -0
  319. package/src/form/index.tsx +48 -0
  320. package/src/gridlist/index.tsx +403 -0
  321. package/src/icon/Illustration.tsx +55 -0
  322. package/src/icon/UIIcon.tsx +59 -0
  323. package/src/icon/icons/GitHubIcon.tsx +22 -0
  324. package/src/icon/index.tsx +81 -0
  325. package/src/illustratedmessage/index.tsx +44 -0
  326. package/src/image/index.tsx +22 -0
  327. package/src/index.ts +666 -0
  328. package/src/inlinealert/index.tsx +10 -0
  329. package/src/label/index.tsx +36 -0
  330. package/src/labeledvalue/index.tsx +62 -0
  331. package/src/landmark/index.tsx +231 -0
  332. package/src/layout/Flex.tsx +94 -0
  333. package/src/layout/Grid.tsx +98 -0
  334. package/src/layout/css-utils.ts +31 -0
  335. package/src/layout/index.tsx +12 -0
  336. package/src/link/index.tsx +132 -0
  337. package/src/list/index.tsx +17 -0
  338. package/src/listbox/index.tsx +251 -0
  339. package/src/menu/ActionMenu.tsx +117 -0
  340. package/src/menu/ContextualHelpTrigger.tsx +122 -0
  341. package/src/menu/SubmenuTrigger.tsx +28 -0
  342. package/src/menu/index.tsx +309 -0
  343. package/src/meter/index.tsx +141 -0
  344. package/src/numberfield/index.tsx +282 -0
  345. package/src/overlays/Modal.tsx +64 -0
  346. package/src/overlays/OpenTransition.tsx +110 -0
  347. package/src/overlays/Overlay.tsx +47 -0
  348. package/src/overlays/Tray.tsx +48 -0
  349. package/src/overlays/index.tsx +55 -0
  350. package/src/picker/index.tsx +20 -0
  351. package/src/popover/index.tsx +261 -0
  352. package/src/progress/ProgressCircle.tsx +114 -0
  353. package/src/progress/index.tsx +14 -0
  354. package/src/progress-bar/index.tsx +144 -0
  355. package/src/provider/index.tsx +358 -0
  356. package/src/radio/index.tsx +192 -0
  357. package/src/searchfield/index.tsx +274 -0
  358. package/src/select/index.tsx +366 -0
  359. package/src/separator/index.tsx +110 -0
  360. package/src/shared-element/index.tsx +38 -0
  361. package/src/slider/RangeSlider.tsx +344 -0
  362. package/src/slider/index.tsx +232 -0
  363. package/src/statuslight/index.tsx +54 -0
  364. package/src/steplist/index.tsx +40 -0
  365. package/src/story-utils/ErrorBoundary.tsx +50 -0
  366. package/src/story-utils/generatePowerset.ts +63 -0
  367. package/src/story-utils/index.ts +13 -0
  368. package/src/style-macro-s1/index.ts +8 -0
  369. package/src/styles.css +487 -0
  370. package/src/switch/ToggleSwitch.tsx +114 -0
  371. package/src/switch/index.tsx +95 -0
  372. package/src/table/index.tsx +534 -0
  373. package/src/tabs/index.tsx +276 -0
  374. package/src/tag/index.tsx +12 -0
  375. package/src/tag-group/index.tsx +246 -0
  376. package/src/test-utils/index.ts +40 -0
  377. package/src/text/Heading.tsx +61 -0
  378. package/src/text/Keyboard.tsx +38 -0
  379. package/src/text/index.tsx +52 -0
  380. package/src/textfield/TextArea.tsx +193 -0
  381. package/src/textfield/index.tsx +191 -0
  382. package/src/theme/types.ts +10 -0
  383. package/src/theme-dark/index.ts +63 -0
  384. package/src/theme-default/index.ts +8 -0
  385. package/src/theme-express/index.ts +6 -0
  386. package/src/theme-light/index.ts +63 -0
  387. package/src/theme.css +360 -0
  388. package/src/toast/index.tsx +328 -0
  389. package/src/toolbar/index.tsx +110 -0
  390. package/src/tooltip/index.tsx +197 -0
  391. package/src/tree/index.tsx +496 -0
  392. package/src/view/Content.tsx +76 -0
  393. package/src/view/index.tsx +28 -0
  394. package/src/well/index.tsx +24 -0
@@ -0,0 +1,496 @@
1
+ /**
2
+ * Tree component for proyecto-viviana-silapse
3
+ *
4
+ * Styled tree component built on top of solidaria-components.
5
+ * Inspired by Spectrum 2's Tree component patterns.
6
+ *
7
+ * Tree displays hierarchical data with expandable/collapsible nodes,
8
+ * supporting keyboard navigation and selection.
9
+ */
10
+
11
+ import { type JSX, splitProps, createContext, createMemo, useContext, Show } from 'solid-js'
12
+ import {
13
+ Tree as HeadlessTree,
14
+ TreeItem as HeadlessTreeItem,
15
+ TreeExpandButton as HeadlessTreeExpandButton,
16
+ TreeSelectionCheckbox as HeadlessTreeSelectionCheckbox,
17
+ type TreeProps as HeadlessTreeProps,
18
+ type TreeItemProps as HeadlessTreeItemProps,
19
+ type TreeExpandButtonProps as HeadlessTreeExpandButtonProps,
20
+ type TreeRenderProps,
21
+ type TreeItemRenderProps,
22
+ type TreeRenderItemState,
23
+ } from '@proyecto-viviana/solidaria-components'
24
+ import type { Key, TreeItemData } from '@proyecto-viviana/solid-stately'
25
+ import { useProviderProps } from '../provider'
26
+
27
+ // ============================================
28
+ // SIZE CONTEXT
29
+ // ============================================
30
+
31
+ export type TreeSize = 'sm' | 'md' | 'lg'
32
+ export type TreeVariant = 'default' | 'bordered' | 'quiet'
33
+
34
+ interface TreeContextValue {
35
+ size: TreeSize
36
+ variant: TreeVariant
37
+ }
38
+
39
+ const TreeSizeContext = createContext<TreeContextValue>({ size: 'md', variant: 'default' })
40
+
41
+ // ============================================
42
+ // TYPES
43
+ // ============================================
44
+
45
+ export interface TreeProps<T extends object>
46
+ extends Omit<HeadlessTreeProps<T>, 'class' | 'style'> {
47
+ /** The size of the tree. */
48
+ size?: TreeSize
49
+ /** The visual variant of the tree. */
50
+ variant?: TreeVariant
51
+ /** Additional CSS class name. */
52
+ class?: string
53
+ /** Label for the tree. */
54
+ label?: string
55
+ /** Description for the tree. */
56
+ description?: string
57
+ }
58
+
59
+ export interface TreeItemProps<T extends object>
60
+ extends Omit<HeadlessTreeItemProps<T>, 'class' | 'style'> {
61
+ /** Additional CSS class name. */
62
+ class?: string
63
+ /** Optional description text. */
64
+ description?: string
65
+ /**
66
+ * Optional icon to display before the content.
67
+ * Use a function returning JSX for SSR compatibility: `icon={() => <FolderIcon />}`
68
+ */
69
+ icon?: () => JSX.Element
70
+ }
71
+
72
+ export interface TreeExpandButtonProps extends Omit<HeadlessTreeExpandButtonProps, 'class' | 'style'> {
73
+ /** Additional CSS class name. */
74
+ class?: string
75
+ }
76
+
77
+ // ============================================
78
+ // STYLES
79
+ // ============================================
80
+
81
+ const sizeStyles = {
82
+ sm: {
83
+ tree: 'text-sm',
84
+ item: 'py-1 px-2 gap-1',
85
+ indent: 16,
86
+ icon: 'h-4 w-4',
87
+ expandButton: 'h-4 w-4',
88
+ label: 'text-sm',
89
+ description: 'text-xs',
90
+ checkbox: 'w-4 h-4',
91
+ },
92
+ md: {
93
+ tree: 'text-base',
94
+ item: 'py-1.5 px-3 gap-2',
95
+ indent: 20,
96
+ icon: 'h-5 w-5',
97
+ expandButton: 'h-5 w-5',
98
+ label: 'text-base',
99
+ description: 'text-sm',
100
+ checkbox: 'w-5 h-5',
101
+ },
102
+ lg: {
103
+ tree: 'text-lg',
104
+ item: 'py-2 px-4 gap-2',
105
+ indent: 24,
106
+ icon: 'h-6 w-6',
107
+ expandButton: 'h-6 w-6',
108
+ label: 'text-lg',
109
+ description: 'text-base',
110
+ checkbox: 'w-6 h-6',
111
+ },
112
+ }
113
+
114
+ const variantStyles = {
115
+ default: {
116
+ tree: 'bg-bg-400 rounded-lg border border-bg-300 p-2',
117
+ item: 'rounded-md',
118
+ itemHover: 'hover:bg-bg-200/50',
119
+ itemSelected: 'bg-accent/10 text-accent',
120
+ },
121
+ bordered: {
122
+ tree: 'bg-bg-400 rounded-lg border-2 border-bg-400 p-2',
123
+ item: 'border-b border-bg-300/30 last:border-b-0',
124
+ itemHover: 'hover:bg-bg-200/50',
125
+ itemSelected: 'bg-accent/10 text-accent',
126
+ },
127
+ quiet: {
128
+ tree: 'bg-transparent',
129
+ item: 'rounded-md',
130
+ itemHover: 'hover:bg-bg-300/50',
131
+ itemSelected: 'bg-accent/10 text-accent',
132
+ },
133
+ }
134
+
135
+ // ============================================
136
+ // TREE COMPONENT
137
+ // ============================================
138
+
139
+ /**
140
+ * A tree displays hierarchical data with expandable/collapsible nodes,
141
+ * supporting keyboard navigation and selection.
142
+ *
143
+ * Built on solidaria-components Tree for full accessibility support.
144
+ *
145
+ * @example
146
+ * ```tsx
147
+ * const items = [
148
+ * {
149
+ * key: 'documents',
150
+ * value: { name: 'Documents' },
151
+ * children: [
152
+ * { key: 'doc1', value: { name: 'Report.pdf' } },
153
+ * { key: 'doc2', value: { name: 'Notes.txt' } },
154
+ * ],
155
+ * },
156
+ * {
157
+ * key: 'images',
158
+ * value: { name: 'Images' },
159
+ * children: [
160
+ * { key: 'img1', value: { name: 'Photo.jpg' } },
161
+ * ],
162
+ * },
163
+ * ]
164
+ *
165
+ * <Tree items={items} defaultExpandedKeys={['documents']}>
166
+ * {(item, state) => (
167
+ * <TreeItem id={item.key} icon={() => <FolderIcon />}>
168
+ * {item.value.name}
169
+ * </TreeItem>
170
+ * )}
171
+ * </Tree>
172
+ * ```
173
+ */
174
+ export function Tree<T extends object>(props: TreeProps<T>): JSX.Element {
175
+ const mergedProps = useProviderProps(props)
176
+ const [local, headlessProps] = splitProps(mergedProps, [
177
+ 'size',
178
+ 'variant',
179
+ 'class',
180
+ 'label',
181
+ 'description',
182
+ ])
183
+
184
+ const size = () => local.size ?? 'md'
185
+ const variant = () => local.variant ?? 'default'
186
+ const styles = () => sizeStyles[size()]
187
+ const variantStyle = () => variantStyles[variant()]
188
+ const customClass = local.class ?? ''
189
+
190
+ const getClassName = (renderProps: TreeRenderProps): string => {
191
+ const base = 'overflow-auto focus:outline-none'
192
+ const sizeClass = styles().tree
193
+ const variantClass = variantStyle().tree
194
+
195
+ let stateClass = ''
196
+ if (renderProps.isDisabled) {
197
+ stateClass = 'opacity-50'
198
+ }
199
+
200
+ const focusClass = renderProps.isFocusVisible
201
+ ? 'ring-2 ring-accent-300 ring-offset-2 ring-offset-bg-400'
202
+ : ''
203
+
204
+ return [base, sizeClass, variantClass, stateClass, focusClass, customClass]
205
+ .filter(Boolean)
206
+ .join(' ')
207
+ }
208
+
209
+ const defaultEmptyState = () => (
210
+ <div class="py-8 text-center text-primary-400">
211
+ <div class="flex flex-col items-center gap-2">
212
+ <EmptyTreeIcon class="w-12 h-12 text-primary-500" />
213
+ <span>No items</span>
214
+ </div>
215
+ </div>
216
+ )
217
+
218
+ const contextValue = createMemo(() => ({ size: size(), variant: variant() }))
219
+
220
+ return (
221
+ <TreeSizeContext.Provider value={contextValue()}>
222
+ <div class="flex flex-col gap-2">
223
+ <Show when={local.label}>
224
+ <label class={`text-primary-200 font-medium ${styles().label}`}>
225
+ {local.label}
226
+ </label>
227
+ </Show>
228
+ <HeadlessTree
229
+ {...headlessProps}
230
+ class={getClassName}
231
+ renderEmptyState={headlessProps.renderEmptyState ?? defaultEmptyState}
232
+ />
233
+ <Show when={local.description}>
234
+ <span class="text-primary-400 text-sm">{local.description}</span>
235
+ </Show>
236
+ </div>
237
+ </TreeSizeContext.Provider>
238
+ )
239
+ }
240
+
241
+ // ============================================
242
+ // TREE ITEM COMPONENT
243
+ // ============================================
244
+
245
+ /**
246
+ * An item in a tree.
247
+ */
248
+ export function TreeItem<T extends object>(props: TreeItemProps<T>): JSX.Element {
249
+ const [local, headlessProps] = splitProps(props, [
250
+ 'class',
251
+ 'description',
252
+ 'icon',
253
+ ])
254
+
255
+ const context = useContext(TreeSizeContext)
256
+ const sizeStyle = sizeStyles[context.size]
257
+ const variantStyle = variantStyles[context.variant]
258
+ const customClass = local.class ?? ''
259
+
260
+ const getClassName = (renderProps: TreeItemRenderProps): string => {
261
+ const base = 'flex items-center cursor-pointer transition-all duration-150 outline-none'
262
+ const sizeClass = sizeStyle.item
263
+ const variantClass = variantStyle.item
264
+
265
+ let stateClass = ''
266
+ if (renderProps.isDisabled) {
267
+ stateClass = 'opacity-50 cursor-not-allowed'
268
+ } else if (renderProps.isSelected) {
269
+ stateClass = variantStyle.itemSelected
270
+ } else if (renderProps.isHovered) {
271
+ stateClass = variantStyle.itemHover
272
+ }
273
+
274
+ let textClass = ''
275
+ if (!renderProps.isDisabled && !renderProps.isSelected) {
276
+ textClass = 'text-primary-200'
277
+ }
278
+
279
+ const focusClass = renderProps.isFocusVisible
280
+ ? 'ring-2 ring-inset ring-accent-300'
281
+ : ''
282
+
283
+ const pressedClass = renderProps.isPressed ? 'scale-[0.99]' : ''
284
+
285
+ return [base, sizeClass, variantClass, stateClass, textClass, focusClass, pressedClass, customClass]
286
+ .filter(Boolean)
287
+ .join(' ')
288
+ }
289
+
290
+ const getStyle = (renderProps: TreeItemRenderProps): JSX.CSSProperties => ({
291
+ 'padding-left': `${renderProps.level * sizeStyle.indent + 8}px`,
292
+ })
293
+
294
+ return (
295
+ <HeadlessTreeItem {...headlessProps} class={getClassName} style={getStyle}>
296
+ {(renderProps: TreeItemRenderProps) => (
297
+ <>
298
+ {/* Expand button */}
299
+ <TreeExpandButton class={`${sizeStyle.expandButton} shrink-0`} />
300
+
301
+ {/* Icon */}
302
+ <Show when={local.icon}>
303
+ <span class={`shrink-0 ${sizeStyle.icon}`}>
304
+ {local.icon!()}
305
+ </span>
306
+ </Show>
307
+
308
+ {/* Default folder/file icon if no custom icon */}
309
+ <Show when={!local.icon}>
310
+ {renderProps.isExpandable ? (
311
+ <FolderIcon class={`shrink-0 ${sizeStyle.icon} text-accent-300`} isOpen={renderProps.isExpanded} />
312
+ ) : (
313
+ <FileIcon class={`shrink-0 ${sizeStyle.icon} text-primary-400`} />
314
+ )}
315
+ </Show>
316
+
317
+ {/* Content */}
318
+ <div class="flex flex-col flex-1 min-w-0">
319
+ <span class="truncate">
320
+ {typeof props.children === 'function'
321
+ ? props.children(renderProps)
322
+ : props.children}
323
+ </span>
324
+ <Show when={local.description}>
325
+ <span class={`text-primary-400 truncate ${sizeStyle.description}`}>
326
+ {local.description}
327
+ </span>
328
+ </Show>
329
+ </div>
330
+
331
+ {/* Selection indicator */}
332
+ <Show when={renderProps.isSelected}>
333
+ <CheckIcon class={`shrink-0 ${sizeStyle.icon} text-accent`} />
334
+ </Show>
335
+ </>
336
+ )}
337
+ </HeadlessTreeItem>
338
+ )
339
+ }
340
+
341
+ // ============================================
342
+ // TREE EXPAND BUTTON COMPONENT
343
+ // ============================================
344
+
345
+ /**
346
+ * A button to expand/collapse a tree item.
347
+ */
348
+ export function TreeExpandButton(props: TreeExpandButtonProps): JSX.Element {
349
+ const [local, headlessProps] = splitProps(props, ['class'])
350
+ const context = useContext(TreeSizeContext)
351
+ const sizeStyle = sizeStyles[context.size]
352
+ const customClass = local.class ?? ''
353
+
354
+ const className = [
355
+ 'flex items-center justify-center transition-transform duration-150 text-primary-400 hover:text-primary-200',
356
+ customClass,
357
+ ]
358
+ .filter(Boolean)
359
+ .join(' ')
360
+
361
+ return (
362
+ <HeadlessTreeExpandButton
363
+ {...headlessProps}
364
+ class={className}
365
+ >
366
+ {props.children ?? (({ isExpanded }: { isExpanded: boolean }) => (
367
+ <ChevronIcon
368
+ class={`${sizeStyle.expandButton} transition-transform duration-150 ${
369
+ isExpanded ? 'rotate-90' : ''
370
+ }`}
371
+ />
372
+ ))}
373
+ </HeadlessTreeExpandButton>
374
+ )
375
+ }
376
+
377
+ // ============================================
378
+ // TREE SELECTION CHECKBOX COMPONENT
379
+ // ============================================
380
+
381
+ /**
382
+ * A styled checkbox for item selection in a tree.
383
+ */
384
+ export function TreeSelectionCheckbox(props: { itemKey: Key; class?: string }): JSX.Element {
385
+ const context = useContext(TreeSizeContext)
386
+ const sizeStyle = sizeStyles[context.size]
387
+ const className = `${sizeStyle.checkbox} rounded border-2 border-primary-500 bg-bg-400 text-accent cursor-pointer checked:bg-accent checked:border-accent focus:ring-2 focus:ring-accent-300 focus:ring-offset-1 focus:ring-offset-bg-400 ${props.class ?? ''}`
388
+
389
+ return (
390
+ <span class={className}>
391
+ <HeadlessTreeSelectionCheckbox itemKey={props.itemKey} />
392
+ </span>
393
+ )
394
+ }
395
+
396
+ // ============================================
397
+ // ICONS
398
+ // ============================================
399
+
400
+ function ChevronIcon(props: { class?: string }): JSX.Element {
401
+ return (
402
+ <svg
403
+ class={props.class}
404
+ fill="none"
405
+ viewBox="0 0 24 24"
406
+ stroke="currentColor"
407
+ stroke-width="2"
408
+ >
409
+ <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
410
+ </svg>
411
+ )
412
+ }
413
+
414
+ function FolderIcon(props: { class?: string; isOpen?: boolean }): JSX.Element {
415
+ return (
416
+ <svg
417
+ class={props.class}
418
+ fill="none"
419
+ viewBox="0 0 24 24"
420
+ stroke="currentColor"
421
+ stroke-width="1.5"
422
+ >
423
+ {props.isOpen ? (
424
+ <path
425
+ stroke-linecap="round"
426
+ stroke-linejoin="round"
427
+ d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 00-1.883 2.542l.857 6a2.25 2.25 0 002.227 1.932H19.05a2.25 2.25 0 002.227-1.932l.857-6a2.25 2.25 0 00-1.883-2.542m-16.5 0V6A2.25 2.25 0 016 3.75h3.879a1.5 1.5 0 011.06.44l2.122 2.12a1.5 1.5 0 001.06.44H18A2.25 2.25 0 0120.25 9v.776"
428
+ />
429
+ ) : (
430
+ <path
431
+ stroke-linecap="round"
432
+ stroke-linejoin="round"
433
+ d="M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"
434
+ />
435
+ )}
436
+ </svg>
437
+ )
438
+ }
439
+
440
+ function FileIcon(props: { class?: string }): JSX.Element {
441
+ return (
442
+ <svg
443
+ class={props.class}
444
+ fill="none"
445
+ viewBox="0 0 24 24"
446
+ stroke="currentColor"
447
+ stroke-width="1.5"
448
+ >
449
+ <path
450
+ stroke-linecap="round"
451
+ stroke-linejoin="round"
452
+ d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
453
+ />
454
+ </svg>
455
+ )
456
+ }
457
+
458
+ function CheckIcon(props: { class?: string }): JSX.Element {
459
+ return (
460
+ <svg
461
+ class={props.class}
462
+ fill="none"
463
+ viewBox="0 0 24 24"
464
+ stroke="currentColor"
465
+ stroke-width="2"
466
+ >
467
+ <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
468
+ </svg>
469
+ )
470
+ }
471
+
472
+ function EmptyTreeIcon(props: { class?: string }): JSX.Element {
473
+ return (
474
+ <svg
475
+ class={props.class}
476
+ fill="none"
477
+ viewBox="0 0 24 24"
478
+ stroke="currentColor"
479
+ stroke-width="1.5"
480
+ >
481
+ <path
482
+ stroke-linecap="round"
483
+ stroke-linejoin="round"
484
+ d="M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6z"
485
+ />
486
+ </svg>
487
+ )
488
+ }
489
+
490
+ // Attach sub-components for convenience
491
+ Tree.Item = TreeItem
492
+ Tree.ExpandButton = TreeExpandButton
493
+ Tree.SelectionCheckbox = TreeSelectionCheckbox
494
+
495
+ // Re-export types for convenience
496
+ export type { Key, TreeItemData, TreeRenderItemState }
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Content/Header/Footer view slot components for proyecto-viviana-silapse
3
+ *
4
+ * Simple styled slot components for composing dialog, card, and panel layouts.
5
+ */
6
+
7
+ import { type JSX, splitProps } from 'solid-js';
8
+
9
+ // ============================================
10
+ // CONTENT
11
+ // ============================================
12
+
13
+ export interface ContentProps {
14
+ /** Additional CSS class name. */
15
+ class?: string;
16
+ /** The content. */
17
+ children?: JSX.Element;
18
+ }
19
+
20
+ /**
21
+ * A content slot component for dialog or panel body.
22
+ */
23
+ export function Content(props: ContentProps): JSX.Element {
24
+ const [local, rest] = splitProps(props, ['class', 'children']);
25
+ return (
26
+ <div {...rest} class={`text-primary-200 text-sm ${local.class ?? ''}`}>
27
+ {local.children}
28
+ </div>
29
+ );
30
+ }
31
+
32
+ // ============================================
33
+ // HEADER
34
+ // ============================================
35
+
36
+ export interface ViewHeaderProps {
37
+ /** Additional CSS class name. */
38
+ class?: string;
39
+ /** The content. */
40
+ children?: JSX.Element;
41
+ }
42
+
43
+ /**
44
+ * A header slot component.
45
+ */
46
+ export function ViewHeader(props: ViewHeaderProps): JSX.Element {
47
+ const [local, rest] = splitProps(props, ['class', 'children']);
48
+ return (
49
+ <header {...rest} class={`text-primary-100 font-semibold text-lg pb-3 border-b border-primary-700 ${local.class ?? ''}`}>
50
+ {local.children}
51
+ </header>
52
+ );
53
+ }
54
+
55
+ // ============================================
56
+ // FOOTER
57
+ // ============================================
58
+
59
+ export interface ViewFooterProps {
60
+ /** Additional CSS class name. */
61
+ class?: string;
62
+ /** The content. */
63
+ children?: JSX.Element;
64
+ }
65
+
66
+ /**
67
+ * A footer slot component.
68
+ */
69
+ export function ViewFooter(props: ViewFooterProps): JSX.Element {
70
+ const [local, rest] = splitProps(props, ['class', 'children']);
71
+ return (
72
+ <footer {...rest} class={`pt-3 border-t border-primary-700 flex justify-end gap-3 ${local.class ?? ''}`}>
73
+ {local.children}
74
+ </footer>
75
+ );
76
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * View component for proyecto-viviana-silapse.
3
+ *
4
+ * Styling-only container primitive.
5
+ */
6
+
7
+ import { type JSX, splitProps } from 'solid-js';
8
+
9
+ export interface ViewProps extends JSX.HTMLAttributes<HTMLDivElement> {
10
+ class?: string;
11
+ }
12
+
13
+ export function View(props: ViewProps): JSX.Element {
14
+ const [local, domProps] = splitProps(props, ['class', 'children']);
15
+ return (
16
+ <div
17
+ {...domProps}
18
+ class={`vui-view ${local.class ?? ''}`}
19
+ >
20
+ {local.children}
21
+ </div>
22
+ );
23
+ }
24
+
25
+ // Sub-component re-exports
26
+ export { Content, ViewHeader, ViewFooter } from './Content';
27
+ export type { ContentProps, ViewHeaderProps, ViewFooterProps } from './Content';
28
+
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Well component for proyecto-viviana-silapse.
3
+ *
4
+ * Styling-only emphasized container primitive.
5
+ */
6
+
7
+ import { type JSX, splitProps } from 'solid-js';
8
+
9
+ export interface WellProps extends JSX.HTMLAttributes<HTMLDivElement> {
10
+ class?: string;
11
+ }
12
+
13
+ export function Well(props: WellProps): JSX.Element {
14
+ const [local, domProps] = splitProps(props, ['class', 'children']);
15
+ return (
16
+ <div
17
+ {...domProps}
18
+ class={`rounded-lg border border-primary-600 bg-bg-300 p-4 ${local.class ?? ''}`}
19
+ >
20
+ {local.children}
21
+ </div>
22
+ );
23
+ }
24
+