@cascivo/react 1.0.0 → 1.2.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 (646) hide show
  1. package/README.md +5 -4
  2. package/dist/accordion/accordion.js +1 -114
  3. package/dist/accordion/accordion.module.js +1 -10
  4. package/dist/action-sheet/action-sheet.css +1 -1
  5. package/dist/action-sheet/action-sheet.js +1 -91
  6. package/dist/action-sheet/action-sheet.module.js +1 -12
  7. package/dist/alert/alert.js +1 -55
  8. package/dist/alert/alert.module.js +1 -11
  9. package/dist/alert-dialog/alert-dialog.css +1 -1
  10. package/dist/alert-dialog/alert-dialog.js +1 -66
  11. package/dist/alert-dialog/alert-dialog.module.js +1 -11
  12. package/dist/app-shell/app-shell.css +1 -1
  13. package/dist/app-shell/app-shell.js +1 -85
  14. package/dist/app-shell/app-shell.module.js +1 -12
  15. package/dist/aspect-ratio/aspect-ratio.js +1 -20
  16. package/dist/aspect-ratio/aspect-ratio.module.js +1 -6
  17. package/dist/avatar/avatar.js +1 -57
  18. package/dist/avatar/avatar.module.js +1 -8
  19. package/dist/avatar-group/avatar-group.js +1 -24
  20. package/dist/avatar-group/avatar-group.module.js +1 -6
  21. package/dist/badge/badge.js +1 -22
  22. package/dist/badge/badge.module.js +1 -3
  23. package/dist/blockquote/blockquote.js +1 -16
  24. package/dist/blockquote/blockquote.module.js +1 -6
  25. package/dist/bottom-sheet/bottom-sheet.js +1 -111
  26. package/dist/bottom-sheet/bottom-sheet.module.js +1 -14
  27. package/dist/brand/logo/logo.css +1 -0
  28. package/dist/brand/logo/logo.js +1 -0
  29. package/dist/brand/logo/logo.module.js +2 -0
  30. package/dist/breadcrumb/breadcrumb.js +1 -28
  31. package/dist/breadcrumb/breadcrumb.module.js +1 -3
  32. package/dist/button/button.css +1 -1
  33. package/dist/button/button.js +1 -35
  34. package/dist/button/button.module.js +1 -6
  35. package/dist/button-group/button-group.js +1 -39
  36. package/dist/button-group/button-group.module.js +1 -3
  37. package/dist/calendar/calendar-date.js +1 -0
  38. package/dist/calendar/calendar.css +1 -1
  39. package/dist/calendar/calendar.js +1 -199
  40. package/dist/calendar/calendar.module.js +1 -14
  41. package/dist/card/card.js +1 -53
  42. package/dist/card/card.module.js +1 -12
  43. package/dist/carousel/carousel.css +1 -1
  44. package/dist/carousel/carousel.js +1 -138
  45. package/dist/carousel/carousel.module.js +1 -13
  46. package/dist/chat-bubble/chat-bubble.js +1 -31
  47. package/dist/chat-bubble/chat-bubble.module.js +1 -11
  48. package/dist/checkbox/checkbox.js +1 -39
  49. package/dist/checkbox/checkbox.module.js +1 -8
  50. package/dist/checkbox-card/checkbox-card.css +1 -1
  51. package/dist/checkbox-card/checkbox-card.js +1 -50
  52. package/dist/checkbox-card/checkbox-card.module.js +1 -11
  53. package/dist/code/code.js +1 -14
  54. package/dist/code/code.module.js +1 -3
  55. package/dist/code-snippet/code-snippet.js +2 -121
  56. package/dist/code-snippet/code-snippet.module.js +1 -17
  57. package/dist/code-snippet/highlight.js +1 -67
  58. package/dist/collapsible/collapsible.js +1 -47
  59. package/dist/collapsible/collapsible.module.js +1 -7
  60. package/dist/color-picker/color-picker.css +1 -1
  61. package/dist/color-picker/color-picker.js +1 -272
  62. package/dist/color-picker/color-picker.module.js +1 -18
  63. package/dist/color-picker/color.js +1 -0
  64. package/dist/combobox/combobox.css +1 -1
  65. package/dist/combobox/combobox.js +1 -170
  66. package/dist/combobox/combobox.module.js +1 -19
  67. package/dist/combobox/list-nav.js +1 -0
  68. package/dist/combobox/option-list.js +1 -0
  69. package/dist/command-menu/command-menu.js +1 -421
  70. package/dist/command-menu/command-menu.module.js +1 -34
  71. package/dist/comparison/comparison.js +1 -69
  72. package/dist/comparison/comparison.module.js +1 -9
  73. package/dist/contained-list/contained-list.js +1 -41
  74. package/dist/contained-list/contained-list.module.js +1 -11
  75. package/dist/context-menu/context-menu.js +1 -93
  76. package/dist/context-menu/context-menu.module.js +1 -7
  77. package/dist/copy-button/copy-button.js +1 -60
  78. package/dist/copy-button/copy-button.module.js +1 -6
  79. package/dist/data-list/data-list.js +1 -25
  80. package/dist/data-list/data-list.module.js +1 -8
  81. package/dist/data-table/column-filter.js +1 -0
  82. package/dist/data-table/column-layout.js +1 -0
  83. package/dist/data-table/data-table.css +1 -1
  84. package/dist/data-table/data-table.js +1 -398
  85. package/dist/data-table/data-table.module.js +1 -33
  86. package/dist/data-table/grid-keys.js +1 -0
  87. package/dist/data-table/row-group.js +1 -0
  88. package/dist/data-table/row-search.js +1 -0
  89. package/dist/data-table/row-sort.js +1 -0
  90. package/dist/data-table/to-csv.js +3 -0
  91. package/dist/data-table/virtual-window.js +1 -0
  92. package/dist/date-picker/date-picker.css +1 -1
  93. package/dist/date-picker/date-picker.js +1 -224
  94. package/dist/date-picker/date-picker.module.js +1 -23
  95. package/dist/date-picker/parse-date.js +1 -0
  96. package/dist/date-range-picker/date-range-picker.js +1 -196
  97. package/dist/date-range-picker/date-range-picker.module.js +1 -18
  98. package/dist/dock/dock.css +1 -1
  99. package/dist/dock/dock.js +1 -34
  100. package/dist/dock/dock.module.js +1 -8
  101. package/dist/drawer/drawer.js +1 -96
  102. package/dist/drawer/drawer.module.js +1 -13
  103. package/dist/dropdown/dropdown.css +1 -1
  104. package/dist/dropdown/dropdown.js +1 -110
  105. package/dist/dropdown/dropdown.module.js +1 -9
  106. package/dist/editable/editable.js +1 -76
  107. package/dist/editable/editable.module.js +1 -11
  108. package/dist/empty-state/empty-state.js +1 -32
  109. package/dist/empty-state/empty-state.module.js +1 -9
  110. package/dist/fab/fab.css +1 -1
  111. package/dist/fab/fab.js +1 -93
  112. package/dist/fab/fab.module.js +1 -12
  113. package/dist/field/field.css +1 -1
  114. package/dist/field/field.js +1 -53
  115. package/dist/field/field.module.js +1 -7
  116. package/dist/file-uploader/file-uploader.css +1 -1
  117. package/dist/file-uploader/file-uploader.js +1 -123
  118. package/dist/file-uploader/file-uploader.module.js +1 -18
  119. package/dist/filter/filter.css +1 -1
  120. package/dist/filter/filter.js +1 -35
  121. package/dist/filter/filter.module.js +1 -6
  122. package/dist/form/form.js +1 -95
  123. package/dist/form/form.module.js +1 -3
  124. package/dist/header/header.js +1 -44
  125. package/dist/header/header.module.js +1 -11
  126. package/dist/header-panel/header-panel.js +1 -72
  127. package/dist/header-panel/header-panel.module.js +1 -9
  128. package/dist/heading/heading.css +1 -1
  129. package/dist/heading/heading.js +1 -22
  130. package/dist/heading/heading.module.js +1 -3
  131. package/dist/hover-card/hover-card.css +1 -1
  132. package/dist/hover-card/hover-card.js +1 -84
  133. package/dist/hover-card/hover-card.module.js +1 -6
  134. package/dist/icon-button/icon-button.js +1 -19
  135. package/dist/icon-button/icon-button.module.js +1 -3
  136. package/dist/image/image.css +1 -1
  137. package/dist/image/image.js +1 -64
  138. package/dist/image/image.module.js +1 -9
  139. package/dist/index.d.ts +1521 -38
  140. package/dist/indicator/indicator.js +1 -16
  141. package/dist/indicator/indicator.module.js +1 -6
  142. package/dist/infinite-scroll/infinite-scroll.js +1 -49
  143. package/dist/infinite-scroll/infinite-scroll.module.js +1 -7
  144. package/dist/inline-loading/inline-loading.js +1 -74
  145. package/dist/inline-loading/inline-loading.module.js +1 -9
  146. package/dist/input/input.css +1 -1
  147. package/dist/input/input.js +1 -56
  148. package/dist/input/input.module.js +1 -9
  149. package/dist/input-group/input-group.css +1 -1
  150. package/dist/input-group/input-group.js +1 -39
  151. package/dist/input-group/input-group.module.js +1 -9
  152. package/dist/item/item.js +1 -50
  153. package/dist/item/item.module.js +1 -10
  154. package/dist/join/join.js +1 -12
  155. package/dist/join/join.module.js +1 -3
  156. package/dist/kbd/kbd.js +1 -14
  157. package/dist/kbd/kbd.module.js +1 -3
  158. package/dist/label/label.js +1 -23
  159. package/dist/label/label.module.js +1 -7
  160. package/dist/large-title-header/large-title-header.js +1 -38
  161. package/dist/large-title-header/large-title-header.module.js +1 -12
  162. package/dist/layouts/src/auto-grid/auto-grid.js +1 -17
  163. package/dist/layouts/src/auto-grid/auto-grid.module.js +1 -4
  164. package/dist/layouts/src/center/center.js +1 -16
  165. package/dist/layouts/src/center/center.module.js +1 -3
  166. package/dist/layouts/src/columns/columns.js +1 -21
  167. package/dist/layouts/src/columns/columns.module.js +1 -6
  168. package/dist/layouts/src/flex/flex.css +1 -1
  169. package/dist/layouts/src/flex/flex.js +1 -20
  170. package/dist/layouts/src/flex/flex.module.js +1 -3
  171. package/dist/layouts/src/grid/grid.css +1 -1
  172. package/dist/layouts/src/grid/grid.js +1 -55
  173. package/dist/layouts/src/grid/grid.module.js +1 -7
  174. package/dist/layouts/src/page-header/page-header.js +1 -31
  175. package/dist/layouts/src/page-header/page-header.module.js +1 -10
  176. package/dist/layouts/src/spacer/spacer.js +1 -17
  177. package/dist/layouts/src/spacer/spacer.module.js +1 -3
  178. package/dist/link/link.css +1 -1
  179. package/dist/link/link.js +1 -22
  180. package/dist/link/link.module.js +1 -3
  181. package/dist/list/list.js +1 -21
  182. package/dist/list/list.module.js +1 -6
  183. package/dist/log-viewer/log-viewer.css +1 -1
  184. package/dist/log-viewer/log-viewer.js +2 -184
  185. package/dist/log-viewer/log-viewer.module.js +1 -16
  186. package/dist/menu/menu.js +1 -126
  187. package/dist/menu/menu.module.js +1 -8
  188. package/dist/menu-button/menu-button.js +1 -92
  189. package/dist/menu-button/menu-button.module.js +1 -8
  190. package/dist/menubar/menubar.js +1 -103
  191. package/dist/menubar/menubar.module.js +1 -8
  192. package/dist/modal/modal.css +1 -1
  193. package/dist/modal/modal.js +1 -76
  194. package/dist/modal/modal.module.js +1 -12
  195. package/dist/multi-select/list-nav.js +1 -0
  196. package/dist/multi-select/multi-select.css +1 -1
  197. package/dist/multi-select/multi-select.js +1 -106
  198. package/dist/multi-select/multi-select.module.js +1 -15
  199. package/dist/multi-select/option-list.js +1 -0
  200. package/dist/native-select/native-select.css +1 -1
  201. package/dist/native-select/native-select.js +1 -37
  202. package/dist/native-select/native-select.module.js +1 -7
  203. package/dist/navigation-menu/navigation-menu.js +1 -99
  204. package/dist/navigation-menu/navigation-menu.module.js +1 -10
  205. package/dist/node/accordion/accordion.js +1 -114
  206. package/dist/node/accordion/accordion.module.js +1 -10
  207. package/dist/node/action-sheet/action-sheet.js +1 -91
  208. package/dist/node/action-sheet/action-sheet.module.js +1 -12
  209. package/dist/node/alert/alert.js +1 -55
  210. package/dist/node/alert/alert.module.js +1 -11
  211. package/dist/node/alert-dialog/alert-dialog.js +1 -66
  212. package/dist/node/alert-dialog/alert-dialog.module.js +1 -11
  213. package/dist/node/app-shell/app-shell.js +1 -85
  214. package/dist/node/app-shell/app-shell.module.js +1 -12
  215. package/dist/node/aspect-ratio/aspect-ratio.js +1 -20
  216. package/dist/node/aspect-ratio/aspect-ratio.module.js +1 -6
  217. package/dist/node/avatar/avatar.js +1 -57
  218. package/dist/node/avatar/avatar.module.js +1 -8
  219. package/dist/node/avatar-group/avatar-group.js +1 -24
  220. package/dist/node/avatar-group/avatar-group.module.js +1 -6
  221. package/dist/node/badge/badge.js +1 -22
  222. package/dist/node/badge/badge.module.js +1 -3
  223. package/dist/node/blockquote/blockquote.js +1 -16
  224. package/dist/node/blockquote/blockquote.module.js +1 -6
  225. package/dist/node/bottom-sheet/bottom-sheet.js +1 -111
  226. package/dist/node/bottom-sheet/bottom-sheet.module.js +1 -14
  227. package/dist/node/brand/logo/logo.js +1 -0
  228. package/dist/node/brand/logo/logo.module.js +1 -0
  229. package/dist/node/breadcrumb/breadcrumb.js +1 -28
  230. package/dist/node/breadcrumb/breadcrumb.module.js +1 -3
  231. package/dist/node/button/button.js +1 -35
  232. package/dist/node/button/button.module.js +1 -6
  233. package/dist/node/button-group/button-group.js +1 -39
  234. package/dist/node/button-group/button-group.module.js +1 -3
  235. package/dist/node/calendar/calendar-date.js +1 -0
  236. package/dist/node/calendar/calendar.js +1 -199
  237. package/dist/node/calendar/calendar.module.js +1 -14
  238. package/dist/node/card/card.js +1 -53
  239. package/dist/node/card/card.module.js +1 -12
  240. package/dist/node/carousel/carousel.js +1 -138
  241. package/dist/node/carousel/carousel.module.js +1 -13
  242. package/dist/node/chat-bubble/chat-bubble.js +1 -31
  243. package/dist/node/chat-bubble/chat-bubble.module.js +1 -11
  244. package/dist/node/checkbox/checkbox.js +1 -39
  245. package/dist/node/checkbox/checkbox.module.js +1 -8
  246. package/dist/node/checkbox-card/checkbox-card.js +1 -50
  247. package/dist/node/checkbox-card/checkbox-card.module.js +1 -11
  248. package/dist/node/code/code.js +1 -14
  249. package/dist/node/code/code.module.js +1 -3
  250. package/dist/node/code-snippet/code-snippet.js +2 -121
  251. package/dist/node/code-snippet/code-snippet.module.js +1 -17
  252. package/dist/node/code-snippet/highlight.js +1 -67
  253. package/dist/node/collapsible/collapsible.js +1 -47
  254. package/dist/node/collapsible/collapsible.module.js +1 -7
  255. package/dist/node/color-picker/color-picker.js +1 -272
  256. package/dist/node/color-picker/color-picker.module.js +1 -18
  257. package/dist/node/color-picker/color.js +1 -0
  258. package/dist/node/combobox/combobox.js +1 -170
  259. package/dist/node/combobox/combobox.module.js +1 -19
  260. package/dist/node/combobox/list-nav.js +1 -0
  261. package/dist/node/combobox/option-list.js +1 -0
  262. package/dist/node/command-menu/command-menu.js +1 -421
  263. package/dist/node/command-menu/command-menu.module.js +1 -34
  264. package/dist/node/comparison/comparison.js +1 -69
  265. package/dist/node/comparison/comparison.module.js +1 -9
  266. package/dist/node/contained-list/contained-list.js +1 -41
  267. package/dist/node/contained-list/contained-list.module.js +1 -11
  268. package/dist/node/context-menu/context-menu.js +1 -93
  269. package/dist/node/context-menu/context-menu.module.js +1 -7
  270. package/dist/node/copy-button/copy-button.js +1 -60
  271. package/dist/node/copy-button/copy-button.module.js +1 -6
  272. package/dist/node/data-list/data-list.js +1 -25
  273. package/dist/node/data-list/data-list.module.js +1 -8
  274. package/dist/node/data-table/column-filter.js +1 -0
  275. package/dist/node/data-table/column-layout.js +1 -0
  276. package/dist/node/data-table/data-table.js +1 -398
  277. package/dist/node/data-table/data-table.module.js +1 -33
  278. package/dist/node/data-table/grid-keys.js +1 -0
  279. package/dist/node/data-table/row-group.js +1 -0
  280. package/dist/node/data-table/row-search.js +1 -0
  281. package/dist/node/data-table/row-sort.js +1 -0
  282. package/dist/node/data-table/to-csv.js +3 -0
  283. package/dist/node/data-table/virtual-window.js +1 -0
  284. package/dist/node/date-picker/date-picker.js +1 -224
  285. package/dist/node/date-picker/date-picker.module.js +1 -23
  286. package/dist/node/date-picker/parse-date.js +1 -0
  287. package/dist/node/date-range-picker/date-range-picker.js +1 -196
  288. package/dist/node/date-range-picker/date-range-picker.module.js +1 -18
  289. package/dist/node/dock/dock.js +1 -34
  290. package/dist/node/dock/dock.module.js +1 -8
  291. package/dist/node/drawer/drawer.js +1 -96
  292. package/dist/node/drawer/drawer.module.js +1 -13
  293. package/dist/node/dropdown/dropdown.js +1 -110
  294. package/dist/node/dropdown/dropdown.module.js +1 -9
  295. package/dist/node/editable/editable.js +1 -76
  296. package/dist/node/editable/editable.module.js +1 -11
  297. package/dist/node/empty-state/empty-state.js +1 -32
  298. package/dist/node/empty-state/empty-state.module.js +1 -9
  299. package/dist/node/fab/fab.js +1 -93
  300. package/dist/node/fab/fab.module.js +1 -12
  301. package/dist/node/field/field.js +1 -53
  302. package/dist/node/field/field.module.js +1 -7
  303. package/dist/node/file-uploader/file-uploader.js +1 -123
  304. package/dist/node/file-uploader/file-uploader.module.js +1 -18
  305. package/dist/node/filter/filter.js +1 -35
  306. package/dist/node/filter/filter.module.js +1 -6
  307. package/dist/node/form/form.js +1 -95
  308. package/dist/node/form/form.module.js +1 -3
  309. package/dist/node/header/header.js +1 -44
  310. package/dist/node/header/header.module.js +1 -11
  311. package/dist/node/header-panel/header-panel.js +1 -72
  312. package/dist/node/header-panel/header-panel.module.js +1 -9
  313. package/dist/node/heading/heading.js +1 -22
  314. package/dist/node/heading/heading.module.js +1 -3
  315. package/dist/node/hover-card/hover-card.js +1 -84
  316. package/dist/node/hover-card/hover-card.module.js +1 -6
  317. package/dist/node/icon-button/icon-button.js +1 -19
  318. package/dist/node/icon-button/icon-button.module.js +1 -3
  319. package/dist/node/image/image.js +1 -64
  320. package/dist/node/image/image.module.js +1 -9
  321. package/dist/node/indicator/indicator.js +1 -16
  322. package/dist/node/indicator/indicator.module.js +1 -6
  323. package/dist/node/infinite-scroll/infinite-scroll.js +1 -49
  324. package/dist/node/infinite-scroll/infinite-scroll.module.js +1 -7
  325. package/dist/node/inline-loading/inline-loading.js +1 -74
  326. package/dist/node/inline-loading/inline-loading.module.js +1 -9
  327. package/dist/node/input/input.js +1 -56
  328. package/dist/node/input/input.module.js +1 -9
  329. package/dist/node/input-group/input-group.js +1 -39
  330. package/dist/node/input-group/input-group.module.js +1 -9
  331. package/dist/node/item/item.js +1 -50
  332. package/dist/node/item/item.module.js +1 -10
  333. package/dist/node/join/join.js +1 -12
  334. package/dist/node/join/join.module.js +1 -3
  335. package/dist/node/kbd/kbd.js +1 -14
  336. package/dist/node/kbd/kbd.module.js +1 -3
  337. package/dist/node/label/label.js +1 -23
  338. package/dist/node/label/label.module.js +1 -7
  339. package/dist/node/large-title-header/large-title-header.js +1 -38
  340. package/dist/node/large-title-header/large-title-header.module.js +1 -12
  341. package/dist/node/layouts/src/auto-grid/auto-grid.js +1 -17
  342. package/dist/node/layouts/src/auto-grid/auto-grid.module.js +1 -4
  343. package/dist/node/layouts/src/center/center.js +1 -16
  344. package/dist/node/layouts/src/center/center.module.js +1 -3
  345. package/dist/node/layouts/src/columns/columns.js +1 -21
  346. package/dist/node/layouts/src/columns/columns.module.js +1 -6
  347. package/dist/node/layouts/src/flex/flex.js +1 -20
  348. package/dist/node/layouts/src/flex/flex.module.js +1 -3
  349. package/dist/node/layouts/src/grid/grid.js +1 -55
  350. package/dist/node/layouts/src/grid/grid.module.js +1 -7
  351. package/dist/node/layouts/src/page-header/page-header.js +1 -31
  352. package/dist/node/layouts/src/page-header/page-header.module.js +1 -10
  353. package/dist/node/layouts/src/spacer/spacer.js +1 -17
  354. package/dist/node/layouts/src/spacer/spacer.module.js +1 -3
  355. package/dist/node/link/link.js +1 -22
  356. package/dist/node/link/link.module.js +1 -3
  357. package/dist/node/list/list.js +1 -21
  358. package/dist/node/list/list.module.js +1 -6
  359. package/dist/node/log-viewer/log-viewer.js +2 -184
  360. package/dist/node/log-viewer/log-viewer.module.js +1 -16
  361. package/dist/node/menu/menu.js +1 -126
  362. package/dist/node/menu/menu.module.js +1 -8
  363. package/dist/node/menu-button/menu-button.js +1 -92
  364. package/dist/node/menu-button/menu-button.module.js +1 -8
  365. package/dist/node/menubar/menubar.js +1 -103
  366. package/dist/node/menubar/menubar.module.js +1 -8
  367. package/dist/node/modal/modal.js +1 -76
  368. package/dist/node/modal/modal.module.js +1 -12
  369. package/dist/node/multi-select/list-nav.js +1 -0
  370. package/dist/node/multi-select/multi-select.js +1 -106
  371. package/dist/node/multi-select/multi-select.module.js +1 -15
  372. package/dist/node/multi-select/option-list.js +1 -0
  373. package/dist/node/native-select/native-select.js +1 -37
  374. package/dist/node/native-select/native-select.module.js +1 -7
  375. package/dist/node/navigation-menu/navigation-menu.js +1 -99
  376. package/dist/node/navigation-menu/navigation-menu.module.js +1 -10
  377. package/dist/node/notification/notification.js +1 -140
  378. package/dist/node/notification/notification.module.js +1 -11
  379. package/dist/node/number-input/number-input.js +1 -148
  380. package/dist/node/number-input/number-input.module.js +1 -12
  381. package/dist/node/otp-input/otp-input.js +1 -70
  382. package/dist/node/otp-input/otp-input.module.js +1 -6
  383. package/dist/node/overflow-menu/overflow-menu.js +1 -70
  384. package/dist/node/overflow-menu/overflow-menu.module.js +1 -7
  385. package/dist/node/pagination/pagination.js +1 -92
  386. package/dist/node/pagination/pagination.module.js +1 -11
  387. package/dist/node/password-input/password-input.js +1 -81
  388. package/dist/node/password-input/password-input.module.js +1 -11
  389. package/dist/node/popover/popover.js +1 -51
  390. package/dist/node/popover/popover.module.js +1 -6
  391. package/dist/node/popover/use-popover.js +1 -55
  392. package/dist/node/progress/progress.js +1 -16
  393. package/dist/node/progress/progress.module.js +1 -6
  394. package/dist/node/progress-bar/progress-bar.js +1 -42
  395. package/dist/node/progress-bar/progress-bar.module.js +1 -11
  396. package/dist/node/progress-circle/progress-circle.js +1 -46
  397. package/dist/node/progress-circle/progress-circle.module.js +1 -9
  398. package/dist/node/progress-indicator/progress-indicator.js +1 -34
  399. package/dist/node/progress-indicator/progress-indicator.module.js +1 -10
  400. package/dist/node/prose/prose.js +1 -13
  401. package/dist/node/prose/prose.module.js +1 -3
  402. package/dist/node/pull-to-refresh/pull-to-refresh.js +1 -82
  403. package/dist/node/pull-to-refresh/pull-to-refresh.module.js +1 -9
  404. package/dist/node/qr-code/encode.js +1 -583
  405. package/dist/node/qr-code/qr-code.js +1 -41
  406. package/dist/node/qr-code/qr-code.module.js +1 -6
  407. package/dist/node/radial-progress/radial-progress.js +1 -27
  408. package/dist/node/radial-progress/radial-progress.module.js +1 -6
  409. package/dist/node/radio/radio.js +1 -49
  410. package/dist/node/radio/radio.module.js +1 -9
  411. package/dist/node/radio-card/radio-card.js +1 -64
  412. package/dist/node/radio-card/radio-card.module.js +1 -11
  413. package/dist/node/rating-group/rating-group.js +1 -37
  414. package/dist/node/rating-group/rating-group.module.js +1 -6
  415. package/dist/node/react/src/index.js +1 -141
  416. package/dist/node/relative-time/relative-time.js +1 -66
  417. package/dist/node/relative-time/relative-time.module.js +1 -3
  418. package/dist/node/reorder-list/reorder-list.js +1 -143
  419. package/dist/node/reorder-list/reorder-list.module.js +1 -11
  420. package/dist/node/resizable/resizable.js +1 -80
  421. package/dist/node/resizable/resizable.module.js +1 -8
  422. package/dist/node/scroll-area/scroll-area.js +1 -38
  423. package/dist/node/scroll-area/scroll-area.module.js +1 -3
  424. package/dist/node/search/search.js +1 -96
  425. package/dist/node/search/search.module.js +1 -9
  426. package/dist/node/segmented-control/segmented-control.js +1 -43
  427. package/dist/node/segmented-control/segmented-control.module.js +1 -6
  428. package/dist/node/select/select.js +1 -73
  429. package/dist/node/select/select.module.js +1 -11
  430. package/dist/node/separator/separator.js +1 -19
  431. package/dist/node/separator/separator.module.js +1 -3
  432. package/dist/node/sheet/sheet.js +1 -49
  433. package/dist/node/sheet/sheet.module.js +1 -9
  434. package/dist/node/shell-header/shell-header.js +1 -169
  435. package/dist/node/shell-header/shell-header.module.js +1 -24
  436. package/dist/node/side-nav/side-nav.js +1 -334
  437. package/dist/node/side-nav/side-nav.module.js +1 -31
  438. package/dist/node/skeleton/skeleton.js +1 -23
  439. package/dist/node/skeleton/skeleton.module.js +1 -7
  440. package/dist/node/skip-nav/skip-nav.js +1 -28
  441. package/dist/node/skip-nav/skip-nav.module.js +1 -3
  442. package/dist/node/slider/slider.js +1 -30
  443. package/dist/node/slider/slider.module.js +1 -7
  444. package/dist/node/spinner/spinner.js +1 -18
  445. package/dist/node/spinner/spinner.module.js +1 -6
  446. package/dist/node/stack/stack.js +1 -17
  447. package/dist/node/stack/stack.module.js +1 -6
  448. package/dist/node/stat/stat.js +1 -41
  449. package/dist/node/stat/stat.module.js +1 -11
  450. package/dist/node/status/status.js +1 -25
  451. package/dist/node/status/status.module.js +1 -7
  452. package/dist/node/steps/steps.js +1 -35
  453. package/dist/node/steps/steps.module.js +1 -8
  454. package/dist/node/structured-list/structured-list.js +1 -102
  455. package/dist/node/structured-list/structured-list.module.js +1 -12
  456. package/dist/node/swap/swap.js +1 -36
  457. package/dist/node/swap/swap.module.js +1 -7
  458. package/dist/node/swipe-item/swipe-item.js +1 -62
  459. package/dist/node/swipe-item/swipe-item.module.js +1 -12
  460. package/dist/node/switcher/switcher.js +1 -32
  461. package/dist/node/switcher/switcher.module.js +1 -8
  462. package/dist/node/tabs/tabs.js +1 -98
  463. package/dist/node/tabs/tabs.module.js +1 -8
  464. package/dist/node/tag/tag.js +1 -33
  465. package/dist/node/tag/tag.module.js +1 -6
  466. package/dist/node/tags-input/tags-input.js +1 -68
  467. package/dist/node/tags-input/tags-input.module.js +1 -8
  468. package/dist/node/text/text.js +1 -16
  469. package/dist/node/text/text.module.js +1 -3
  470. package/dist/node/textarea/textarea.js +1 -58
  471. package/dist/node/textarea/textarea.module.js +1 -9
  472. package/dist/node/tile/tile.js +1 -39
  473. package/dist/node/tile/tile.module.js +1 -7
  474. package/dist/node/time-picker/time-picker.js +1 -64
  475. package/dist/node/time-picker/time-picker.module.js +1 -9
  476. package/dist/node/timeline/timeline.js +1 -55
  477. package/dist/node/timeline/timeline.module.js +1 -11
  478. package/dist/node/toast/toast.js +1 -85
  479. package/dist/node/toast/toast.module.js +1 -11
  480. package/dist/node/toc/toc.js +1 -43
  481. package/dist/node/toc/toc.module.js +1 -3
  482. package/dist/node/toc/use-toc-from-region.js +1 -18
  483. package/dist/node/toggle/toggle.js +1 -42
  484. package/dist/node/toggle/toggle.module.js +1 -8
  485. package/dist/node/toggle-group/toggle-group.js +1 -55
  486. package/dist/node/toggle-group/toggle-group.module.js +1 -6
  487. package/dist/node/toggletip/toggletip.js +1 -49
  488. package/dist/node/toggletip/toggletip.module.js +1 -7
  489. package/dist/node/tooltip/tooltip.js +1 -58
  490. package/dist/node/tooltip/tooltip.module.js +1 -6
  491. package/dist/node/tree-view/tree-view.js +1 -201
  492. package/dist/node/tree-view/tree-view.module.js +1 -13
  493. package/dist/node/user/user.js +1 -35
  494. package/dist/node/user/user.module.js +1 -9
  495. package/dist/node/virtual-list/virtual-list.js +1 -40
  496. package/dist/node/virtual-list/virtual-list.module.js +1 -7
  497. package/dist/node/visually-hidden/visually-hidden.js +1 -2
  498. package/dist/node/wheel-picker/wheel-picker.js +1 -84
  499. package/dist/node/wheel-picker/wheel-picker.module.js +1 -8
  500. package/dist/notification/notification.js +1 -140
  501. package/dist/notification/notification.module.js +1 -11
  502. package/dist/number-input/number-input.js +1 -148
  503. package/dist/number-input/number-input.module.js +1 -12
  504. package/dist/otp-input/otp-input.js +1 -70
  505. package/dist/otp-input/otp-input.module.js +1 -6
  506. package/dist/overflow-menu/overflow-menu.js +1 -70
  507. package/dist/overflow-menu/overflow-menu.module.js +1 -7
  508. package/dist/pagination/pagination.js +1 -92
  509. package/dist/pagination/pagination.module.js +1 -11
  510. package/dist/password-input/password-input.js +1 -81
  511. package/dist/password-input/password-input.module.js +1 -11
  512. package/dist/popover/popover.js +1 -51
  513. package/dist/popover/popover.module.js +1 -6
  514. package/dist/popover/use-popover.js +1 -55
  515. package/dist/progress/progress.css +1 -1
  516. package/dist/progress/progress.js +1 -16
  517. package/dist/progress/progress.module.js +1 -6
  518. package/dist/progress-bar/progress-bar.css +1 -1
  519. package/dist/progress-bar/progress-bar.js +1 -42
  520. package/dist/progress-bar/progress-bar.module.js +1 -11
  521. package/dist/progress-circle/progress-circle.js +1 -46
  522. package/dist/progress-circle/progress-circle.module.js +1 -9
  523. package/dist/progress-indicator/progress-indicator.css +1 -1
  524. package/dist/progress-indicator/progress-indicator.js +1 -34
  525. package/dist/progress-indicator/progress-indicator.module.js +1 -10
  526. package/dist/prose/prose.css +1 -1
  527. package/dist/prose/prose.js +1 -13
  528. package/dist/prose/prose.module.js +1 -3
  529. package/dist/pull-to-refresh/pull-to-refresh.js +1 -82
  530. package/dist/pull-to-refresh/pull-to-refresh.module.js +1 -9
  531. package/dist/qr-code/encode.js +1 -583
  532. package/dist/qr-code/qr-code.js +1 -41
  533. package/dist/qr-code/qr-code.module.js +1 -6
  534. package/dist/radial-progress/radial-progress.js +1 -27
  535. package/dist/radial-progress/radial-progress.module.js +1 -6
  536. package/dist/radio/radio.js +1 -49
  537. package/dist/radio/radio.module.js +1 -9
  538. package/dist/radio-card/radio-card.css +1 -1
  539. package/dist/radio-card/radio-card.js +1 -64
  540. package/dist/radio-card/radio-card.module.js +1 -11
  541. package/dist/rating-group/rating-group.js +1 -37
  542. package/dist/rating-group/rating-group.module.js +1 -6
  543. package/dist/react/src/index.js +1 -141
  544. package/dist/relative-time/relative-time.js +1 -66
  545. package/dist/relative-time/relative-time.module.js +1 -3
  546. package/dist/reorder-list/reorder-list.css +1 -1
  547. package/dist/reorder-list/reorder-list.js +1 -143
  548. package/dist/reorder-list/reorder-list.module.js +1 -11
  549. package/dist/resizable/resizable.js +1 -80
  550. package/dist/resizable/resizable.module.js +1 -8
  551. package/dist/scroll-area/scroll-area.css +1 -1
  552. package/dist/scroll-area/scroll-area.js +1 -38
  553. package/dist/scroll-area/scroll-area.module.js +1 -3
  554. package/dist/search/search.js +1 -96
  555. package/dist/search/search.module.js +1 -9
  556. package/dist/segmented-control/segmented-control.js +1 -43
  557. package/dist/segmented-control/segmented-control.module.js +1 -6
  558. package/dist/select/select.js +1 -73
  559. package/dist/select/select.module.js +1 -11
  560. package/dist/separator/separator.js +1 -19
  561. package/dist/separator/separator.module.js +1 -3
  562. package/dist/sheet/sheet.js +1 -49
  563. package/dist/sheet/sheet.module.js +1 -9
  564. package/dist/shell-header/shell-header.css +1 -1
  565. package/dist/shell-header/shell-header.js +1 -169
  566. package/dist/shell-header/shell-header.module.js +1 -24
  567. package/dist/side-nav/side-nav.css +1 -1
  568. package/dist/side-nav/side-nav.js +1 -334
  569. package/dist/side-nav/side-nav.module.js +1 -31
  570. package/dist/skeleton/skeleton.css +1 -1
  571. package/dist/skeleton/skeleton.js +1 -23
  572. package/dist/skeleton/skeleton.module.js +1 -7
  573. package/dist/skip-nav/skip-nav.js +1 -28
  574. package/dist/skip-nav/skip-nav.module.js +1 -3
  575. package/dist/slider/slider.js +1 -30
  576. package/dist/slider/slider.module.js +1 -7
  577. package/dist/spinner/spinner.css +1 -1
  578. package/dist/spinner/spinner.js +1 -18
  579. package/dist/spinner/spinner.module.js +1 -6
  580. package/dist/stack/stack.js +1 -17
  581. package/dist/stack/stack.module.js +1 -6
  582. package/dist/stat/stat.js +1 -41
  583. package/dist/stat/stat.module.js +1 -11
  584. package/dist/status/status.css +1 -1
  585. package/dist/status/status.js +1 -25
  586. package/dist/status/status.module.js +1 -7
  587. package/dist/steps/steps.css +1 -1
  588. package/dist/steps/steps.js +1 -35
  589. package/dist/steps/steps.module.js +1 -8
  590. package/dist/structured-list/structured-list.js +1 -102
  591. package/dist/structured-list/structured-list.module.js +1 -12
  592. package/dist/styles.css +401 -55
  593. package/dist/swap/swap.css +1 -1
  594. package/dist/swap/swap.js +1 -36
  595. package/dist/swap/swap.module.js +1 -7
  596. package/dist/swipe-item/swipe-item.js +1 -62
  597. package/dist/swipe-item/swipe-item.module.js +1 -12
  598. package/dist/switcher/switcher.js +1 -32
  599. package/dist/switcher/switcher.module.js +1 -8
  600. package/dist/tabs/tabs.js +1 -98
  601. package/dist/tabs/tabs.module.js +1 -8
  602. package/dist/tag/tag.js +1 -33
  603. package/dist/tag/tag.module.js +1 -6
  604. package/dist/tags-input/tags-input.js +1 -68
  605. package/dist/tags-input/tags-input.module.js +1 -8
  606. package/dist/text/text.css +1 -1
  607. package/dist/text/text.js +1 -16
  608. package/dist/text/text.module.js +1 -3
  609. package/dist/textarea/textarea.css +1 -1
  610. package/dist/textarea/textarea.js +1 -58
  611. package/dist/textarea/textarea.module.js +1 -9
  612. package/dist/tile/tile.css +1 -1
  613. package/dist/tile/tile.js +1 -39
  614. package/dist/tile/tile.module.js +1 -7
  615. package/dist/time-picker/time-picker.js +1 -64
  616. package/dist/time-picker/time-picker.module.js +1 -9
  617. package/dist/timeline/timeline.js +1 -55
  618. package/dist/timeline/timeline.module.js +1 -11
  619. package/dist/toast/toast.css +1 -1
  620. package/dist/toast/toast.js +1 -85
  621. package/dist/toast/toast.module.js +1 -11
  622. package/dist/toc/toc.css +1 -1
  623. package/dist/toc/toc.js +1 -43
  624. package/dist/toc/toc.module.js +1 -3
  625. package/dist/toc/use-toc-from-region.js +1 -18
  626. package/dist/toggle/toggle.js +1 -42
  627. package/dist/toggle/toggle.module.js +1 -8
  628. package/dist/toggle-group/toggle-group.js +1 -55
  629. package/dist/toggle-group/toggle-group.module.js +1 -6
  630. package/dist/toggletip/toggletip.js +1 -49
  631. package/dist/toggletip/toggletip.module.js +1 -7
  632. package/dist/tooltip/tooltip.css +1 -1
  633. package/dist/tooltip/tooltip.js +1 -58
  634. package/dist/tooltip/tooltip.module.js +1 -6
  635. package/dist/tree-view/tree-view.css +1 -1
  636. package/dist/tree-view/tree-view.js +1 -201
  637. package/dist/tree-view/tree-view.module.js +1 -13
  638. package/dist/user/user.js +1 -35
  639. package/dist/user/user.module.js +1 -9
  640. package/dist/virtual-list/virtual-list.js +1 -40
  641. package/dist/virtual-list/virtual-list.module.js +1 -7
  642. package/dist/visually-hidden/visually-hidden.js +1 -2
  643. package/dist/wheel-picker/wheel-picker.js +1 -84
  644. package/dist/wheel-picker/wheel-picker.module.js +1 -8
  645. package/package.json +4 -4
  646. package/readme.body.md +3 -2
@@ -1,33 +1 @@
1
- "use client";
2
-
3
- import e from "./tag.module.js";
4
- import { cn as t, normalizeTone as n, useSignals as r } from "@cascivo/core";
5
- import { builtin as i, t as a } from "@cascivo/i18n";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- //#region ../components/src/tag/tag.tsx
8
- var c = {
9
- neutral: "default",
10
- info: "info",
11
- success: "success",
12
- warning: "warning",
13
- danger: "error"
14
- };
15
- function l({ variant: l = "default", size: u = "md", onDismiss: d, dismissLabel: f, className: p, children: m, ...h }) {
16
- r();
17
- let g = f ?? a(i.tag.dismiss);
18
- return /* @__PURE__ */ s("span", {
19
- "data-variant": c[n(l)] ?? l,
20
- "data-size": u,
21
- className: t(e.tag, p),
22
- ...h,
23
- children: [m, d && /* @__PURE__ */ o("button", {
24
- type: "button",
25
- className: e.dismiss,
26
- "aria-label": g,
27
- onClick: d,
28
- children: "✕"
29
- })]
30
- });
31
- }
32
- //#endregion
33
- export { l as Tag };
1
+ "use client";import e from"./tag.module.js";import{cn as t,normalizeTone as n,useSignals as r}from"@cascivo/core";import{builtin as i,t as a}from"@cascivo/i18n";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c={neutral:`default`,info:`info`,success:`success`,warning:`warning`,danger:`error`};function Tag({variant:l=`default`,size:u=`md`,onDismiss:d,dismissLabel:f,className:p,children:m,...h}){r();let g=f??a(i.tag.dismiss);return s(`span`,{"data-variant":c[n(l)]??l,"data-size":u,className:t(e.tag,p),...h,children:[m,d&&o(`button`,{type:`button`,className:e.dismiss,"aria-label":g,onClick:d,children:`✕`})]})}export{Tag};
@@ -1,6 +1 @@
1
- var e = {
2
- tag: "_tag_1idve_2",
3
- dismiss: "_dismiss_1idve_57"
4
- };
5
- //#endregion
6
- export { e as default };
1
+ var e={tag:`_tag_1idve_2`,dismiss:`_dismiss_1idve_57`};export{e as default};
@@ -1,68 +1 @@
1
- "use client";
2
-
3
- import e from "./tags-input.module.js";
4
- import { useRef as t } from "react";
5
- import { cn as n, focusElement as r, useSignal as i, useSignals as a } from "@cascivo/core";
6
- import { builtin as o, t as s } from "@cascivo/i18n";
7
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
- //#region ../components/src/tags-input/tags-input.tsx
9
- function u({ value: u, onValueChange: d, placeholder: f, validate: p, max: m, disabled: h = !1, className: g, id: _, ariaLabel: v, label: y, "aria-labelledby": b, "aria-describedby": x, "aria-invalid": S, ...C }) {
10
- a();
11
- let w = i(""), T = t(null), E = v ?? y ?? (b === void 0 ? s(o.tagsInput.label) : void 0);
12
- function D(e) {
13
- let t = e.trim();
14
- t && (m !== void 0 && u.length >= m || u.includes(t) || p && !p(t) || (d([...u, t]), w.value = ""));
15
- }
16
- function O(e) {
17
- d(u.filter((t, n) => n !== e));
18
- }
19
- let k = f ?? s(o.tagsInput.placeholder);
20
- return /* @__PURE__ */ l("div", {
21
- className: n(e.wrapper, g),
22
- "data-disabled": h ? "" : void 0,
23
- onClick: () => r(T.current),
24
- ...C,
25
- children: [u.map((t, n) => {
26
- let r = p ? !p(t) : !1;
27
- return /* @__PURE__ */ l("span", {
28
- className: e.tag,
29
- "data-state": r ? "invalid" : void 0,
30
- children: [t, /* @__PURE__ */ c("button", {
31
- type: "button",
32
- className: e.dismiss,
33
- "aria-label": s(o.tagsInput.remove, { tag: t }),
34
- disabled: h,
35
- onClick: (e) => {
36
- e.stopPropagation(), O(n);
37
- },
38
- children: /* @__PURE__ */ c("span", {
39
- "aria-hidden": "true",
40
- children: "×"
41
- })
42
- })]
43
- }, n);
44
- }), /* @__PURE__ */ c("input", {
45
- ref: T,
46
- className: e.input,
47
- value: w.value,
48
- id: _,
49
- "aria-labelledby": b,
50
- "aria-describedby": x,
51
- "aria-invalid": S,
52
- "aria-label": E,
53
- placeholder: u.length === 0 ? k : void 0,
54
- disabled: h,
55
- onChange: (e) => {
56
- w.value = e.currentTarget.value;
57
- },
58
- onKeyDown: (e) => {
59
- e.key === "Enter" || e.key === "," ? (e.preventDefault(), D(w.value)) : e.key === "Backspace" && !w.value && O(u.length - 1);
60
- },
61
- onBlur: () => {
62
- w.value && D(w.value);
63
- }
64
- })]
65
- });
66
- }
67
- //#endregion
68
- export { u as TagsInput };
1
+ "use client";import e from"./tags-input.module.js";import{useRef as t}from"react";import{cn as n,focusElement as r,useSignal as i,useSignals as a}from"@cascivo/core";import{builtin as o,t as s}from"@cascivo/i18n";import{jsx as c,jsxs as l}from"react/jsx-runtime";function TagsInput({value:u,onValueChange:d,placeholder:f,validate:p,max:m,disabled:h=!1,className:g,id:_,ariaLabel:v,label:y,"aria-labelledby":b,"aria-describedby":x,"aria-invalid":S,...C}){a();let w=i(``),T=t(null),E=v??y??(b===void 0?s(o.tagsInput.label):void 0);function addTag(e){let t=e.trim();t&&(m!==void 0&&u.length>=m||u.includes(t)||p&&!p(t)||(d([...u,t]),w.value=``))}function removeTag(e){d(u.filter((t,n)=>n!==e))}let D=f??s(o.tagsInput.placeholder);return l(`div`,{className:n(e.wrapper,g),"data-disabled":h?``:void 0,onClick:()=>r(T.current),...C,children:[u.map((t,n)=>{let r=p?!p(t):!1;return l(`span`,{className:e.tag,"data-state":r?`invalid`:void 0,children:[t,c(`button`,{type:`button`,className:e.dismiss,"aria-label":s(o.tagsInput.remove,{tag:t}),disabled:h,onClick:e=>{e.stopPropagation(),removeTag(n)},children:c(`span`,{"aria-hidden":`true`,children:`×`})})]},n)}),c(`input`,{ref:T,className:e.input,value:w.value,id:_,"aria-labelledby":b,"aria-describedby":x,"aria-invalid":S,"aria-label":E,placeholder:u.length===0?D:void 0,disabled:h,onChange:e=>{w.value=e.currentTarget.value},onKeyDown:e=>{e.key===`Enter`||e.key===`,`?(e.preventDefault(),addTag(w.value)):e.key===`Backspace`&&!w.value&&removeTag(u.length-1)},onBlur:()=>{w.value&&addTag(w.value)}})]})}export{TagsInput};
@@ -1,8 +1 @@
1
- var e = {
2
- wrapper: "_wrapper_1w754_2",
3
- tag: "_tag_1w754_32",
4
- dismiss: "_dismiss_1w754_59",
5
- input: "_input_1w754_89"
6
- };
7
- //#endregion
8
- export { e as default };
1
+ var e={wrapper:`_wrapper_1w754_2`,tag:`_tag_1w754_32`,dismiss:`_dismiss_1w754_59`,input:`_input_1w754_89`};export{e as default};
@@ -1,16 +1 @@
1
- import e from "./text.module.js";
2
- import { cn as t } from "@cascivo/core/pure";
3
- import { jsx as n } from "react/jsx-runtime";
4
- //#region ../components/src/text/text.tsx
5
- function r({ as: r = "p", size: i = "md", weight: a = "normal", muted: o = !1, className: s, children: c, ...l }) {
6
- return /* @__PURE__ */ n(r, {
7
- "data-size": i,
8
- "data-weight": a,
9
- "data-muted": o ? "" : void 0,
10
- className: t(e.text, s),
11
- ...l,
12
- children: c
13
- });
14
- }
15
- //#endregion
16
- export { r as Text };
1
+ import e from"./text.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n}from"react/jsx-runtime";function Text({as:r=`p`,size:i=`md`,weight:a=`normal`,muted:o=!1,className:s,children:c,...l}){return n(r,{"data-size":i,"data-weight":a,"data-muted":o?``:void 0,className:t(e.text,s),...l,children:c})}export{Text};
@@ -1,3 +1 @@
1
- var e = { text: "_text_18h86_2" };
2
- //#endregion
3
- export { e as default };
1
+ var e={text:`_text_1ewix_2`};export{e as default};
@@ -1,58 +1 @@
1
- "use client";
2
-
3
- import e from "./textarea.module.js";
4
- import { forwardRef as t } from "react";
5
- import { cn as n, createMachine as r, useMachine as i } from "@cascivo/core";
6
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
- //#region ../components/src/textarea/textarea.tsx
8
- var s = r({
9
- initial: "idle",
10
- states: {
11
- idle: { on: { FOCUS: "focused" } },
12
- focused: { on: { BLUR: "idle" } }
13
- }
14
- }), c = t(function({ label: t, hint: r, error: c, resize: l = "vertical", rows: u = 4, ariaLabel: d, className: f, id: p, onFocus: m, onBlur: h, ...g }, _) {
15
- let [v, y] = i(s), b = p ?? (t ? `cascade-textarea-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0);
16
- return /* @__PURE__ */ o("div", {
17
- className: n(e.wrapper, f),
18
- "data-state": c ? "error" : v.value,
19
- "data-resize": l,
20
- children: [
21
- t && /* @__PURE__ */ a("label", {
22
- className: e.label,
23
- htmlFor: b,
24
- children: t
25
- }),
26
- /* @__PURE__ */ a("textarea", {
27
- ref: _,
28
- id: b,
29
- rows: u,
30
- "aria-multiline": "true",
31
- className: e.textarea,
32
- "aria-invalid": c ? !0 : void 0,
33
- "aria-describedby": c ? `${b}-error` : r ? `${b}-hint` : void 0,
34
- onFocus: (e) => {
35
- y("FOCUS"), m?.(e);
36
- },
37
- onBlur: (e) => {
38
- y("BLUR"), h?.(e);
39
- },
40
- ...g,
41
- "aria-label": g["aria-label"] ?? d
42
- }),
43
- c && /* @__PURE__ */ a("span", {
44
- id: `${b}-error`,
45
- className: e.error,
46
- role: "alert",
47
- children: c
48
- }),
49
- !c && r && /* @__PURE__ */ a("span", {
50
- id: `${b}-hint`,
51
- className: e.hint,
52
- children: r
53
- })
54
- ]
55
- });
56
- });
57
- //#endregion
58
- export { c as Textarea };
1
+ "use client";import e from"./textarea.module.js";import{forwardRef as t}from"react";import{cn as n,createMachine as r,useMachine as i}from"@cascivo/core";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=r({initial:`idle`,states:{idle:{on:{FOCUS:`focused`}},focused:{on:{BLUR:`idle`}}}}),c=t(function({label:t,hint:r,error:c,resize:l=`vertical`,autosize:u=!1,rows:d=4,ariaLabel:f,className:p,id:m,onFocus:h,onBlur:g,..._},v){let[y,b]=i(s),x=m??(t?`cascade-textarea-${t.toLowerCase().replace(/\s+/g,`-`)}`:void 0);return o(`div`,{className:n(e.wrapper,p),"data-state":c?`error`:y.value,"data-resize":l,"data-autosize":u?``:void 0,style:u?{"--_rows":String(d)}:void 0,children:[t&&a(`label`,{className:e.label,htmlFor:x,children:t}),a(`textarea`,{ref:v,id:x,rows:d,"aria-multiline":`true`,className:e.textarea,"aria-invalid":c?!0:void 0,"aria-describedby":c?`${x}-error`:r?`${x}-hint`:void 0,onFocus:e=>{b(`FOCUS`),h?.(e)},onBlur:e=>{b(`BLUR`),g?.(e)},..._,"aria-label":_[`aria-label`]??f}),c&&a(`span`,{id:`${x}-error`,className:e.error,role:`alert`,children:c}),!c&&r&&a(`span`,{id:`${x}-hint`,className:e.hint,children:r})]})});export{c as Textarea};
@@ -1,9 +1 @@
1
- var e = {
2
- wrapper: "_wrapper_xbrwe_2",
3
- textarea: "_textarea_xbrwe_7",
4
- label: "_label_xbrwe_18",
5
- error: "_error_xbrwe_71",
6
- hint: "_hint_xbrwe_78"
7
- };
8
- //#endregion
9
- export { e as default };
1
+ var e={wrapper:`_wrapper_1lzlk_2`,textarea:`_textarea_1lzlk_7`,label:`_label_1lzlk_47`,error:`_error_1lzlk_100`,hint:`_hint_1lzlk_107`};export{e as default};
@@ -1,39 +1 @@
1
- "use client";
2
-
3
- import e from "./tile.module.js";
4
- import { Slot as t, cn as n, useControllableSignal as r, useSignals as i } from "@cascivo/core";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
- //#region ../components/src/tile/tile.tsx
7
- function s({ value: s, selected: c, defaultSelected: l, onSelect: u, selectable: d = "single", disabled: f, icon: p, asChild: m, children: h, className: g }) {
8
- i();
9
- let [_, v] = r({
10
- value: c,
11
- defaultValue: l ?? !1,
12
- onChange: () => u?.(s)
13
- }), y = () => {
14
- f || v(d === "multi" ? !_.value : !0);
15
- };
16
- return /* @__PURE__ */ o(m ? t : "div", {
17
- role: d === "multi" ? "checkbox" : "radio",
18
- "aria-checked": _.value,
19
- "aria-disabled": f || void 0,
20
- tabIndex: f ? -1 : 0,
21
- "data-selected": _.value || void 0,
22
- "data-disabled": f || void 0,
23
- className: n(e.tile, g),
24
- onClick: y,
25
- onKeyDown: (e) => {
26
- (e.key === " " || e.key === "Enter") && (e.preventDefault(), y());
27
- },
28
- children: [p && /* @__PURE__ */ a("span", {
29
- className: e.icon,
30
- "aria-hidden": "true",
31
- children: p
32
- }), /* @__PURE__ */ a("span", {
33
- className: e.body,
34
- children: h
35
- })]
36
- });
37
- }
38
- //#endregion
39
- export { s as Tile };
1
+ "use client";import e from"./tile.module.js";import{Slot as t,cn as n,useControllableSignal as r,useSignals as i}from"@cascivo/core";import{jsx as a,jsxs as o}from"react/jsx-runtime";function Tile({value:s,selected:c,defaultSelected:l,onSelect:u,selectable:d=`single`,disabled:f,icon:p,asChild:m,children:h,className:g}){i();let[_,v]=r({value:c,defaultValue:l??!1,onChange:()=>u?.(s)}),toggle=()=>{f||v(d===`multi`?!_.value:!0)};return o(m?t:`div`,{role:d===`multi`?`checkbox`:`radio`,"aria-checked":_.value,"aria-disabled":f||void 0,tabIndex:f?-1:0,"data-selected":_.value||void 0,"data-disabled":f||void 0,className:n(e.tile,g),onClick:toggle,onKeyDown:e=>{(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),toggle())},children:[p&&a(`span`,{className:e.icon,"aria-hidden":`true`,children:p}),a(`span`,{className:e.body,children:h})]})}export{Tile};
@@ -1,7 +1 @@
1
- var e = {
2
- tile: "_tile_cxt7m_2",
3
- icon: "_icon_cxt7m_38",
4
- body: "_body_cxt7m_51"
5
- };
6
- //#endregion
7
- export { e as default };
1
+ var e={tile:`_tile_1j8fr_2`,icon:`_icon_1j8fr_51`,body:`_body_1j8fr_64`};export{e as default};
@@ -1,64 +1 @@
1
- "use client";
2
-
3
- import e from "./time-picker.module.js";
4
- import { forwardRef as t } from "react";
5
- import { cn as n, createMachine as r, useMachine as i, useSignals as a } from "@cascivo/core";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- //#region ../components/src/time-picker/time-picker.tsx
8
- var c = r({
9
- initial: "idle",
10
- states: {
11
- idle: { on: { FOCUS: "focused" } },
12
- focused: { on: { BLUR: "idle" } }
13
- }
14
- }), l = t(function({ value: t, defaultValue: r, onValueChange: l, min: u, max: d, step: f, label: p, hint: m, error: h, size: g = "md", className: _, id: v, onFocus: y, onBlur: b, ariaLabel: x, ...S }, C) {
15
- a();
16
- let [w, T] = i(c), E = v ?? (p ? `cascade-time-picker-${p.toLowerCase().replace(/\s+/g, "-")}` : void 0);
17
- return /* @__PURE__ */ s("div", {
18
- className: n(e.wrapper, _),
19
- "data-state": h ? "error" : w.value,
20
- "data-size": g,
21
- children: [
22
- p && /* @__PURE__ */ o("label", {
23
- className: e.label,
24
- htmlFor: E,
25
- children: p
26
- }),
27
- /* @__PURE__ */ o("input", {
28
- id: E,
29
- type: "time",
30
- className: e.input,
31
- value: t,
32
- defaultValue: r,
33
- min: u,
34
- max: d,
35
- step: f,
36
- "aria-invalid": h ? !0 : void 0,
37
- "aria-describedby": h ? `${E}-error` : m ? `${E}-hint` : void 0,
38
- onChange: (e) => l?.(e.target.value),
39
- onFocus: (e) => {
40
- T("FOCUS"), y?.(e);
41
- },
42
- onBlur: (e) => {
43
- T("BLUR"), b?.(e);
44
- },
45
- ref: C,
46
- ...S,
47
- "aria-label": S["aria-label"] ?? x
48
- }),
49
- h && /* @__PURE__ */ o("span", {
50
- id: `${E}-error`,
51
- className: e.error,
52
- role: "alert",
53
- children: h
54
- }),
55
- !h && m && /* @__PURE__ */ o("span", {
56
- id: `${E}-hint`,
57
- className: e.hint,
58
- children: m
59
- })
60
- ]
61
- });
62
- });
63
- //#endregion
64
- export { l as TimePicker };
1
+ "use client";import e from"./time-picker.module.js";import{forwardRef as t}from"react";import{cn as n,createMachine as r,useMachine as i,useSignals as a}from"@cascivo/core";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=r({initial:`idle`,states:{idle:{on:{FOCUS:`focused`}},focused:{on:{BLUR:`idle`}}}}),l=t(function({value:t,defaultValue:r,onValueChange:l,min:u,max:d,step:f,label:p,hint:m,error:h,size:g=`md`,className:_,id:v,onFocus:y,onBlur:b,ariaLabel:x,...S},C){a();let[w,T]=i(c),E=v??(p?`cascade-time-picker-${p.toLowerCase().replace(/\s+/g,`-`)}`:void 0);return s(`div`,{className:n(e.wrapper,_),"data-state":h?`error`:w.value,"data-size":g,children:[p&&o(`label`,{className:e.label,htmlFor:E,children:p}),o(`input`,{id:E,type:`time`,className:e.input,value:t,defaultValue:r,min:u,max:d,step:f,"aria-invalid":h?!0:void 0,"aria-describedby":h?`${E}-error`:m?`${E}-hint`:void 0,onChange:e=>l?.(e.target.value),onFocus:e=>{T(`FOCUS`),y?.(e)},onBlur:e=>{T(`BLUR`),b?.(e)},ref:C,...S,"aria-label":S[`aria-label`]??x}),h&&o(`span`,{id:`${E}-error`,className:e.error,role:`alert`,children:h}),!h&&m&&o(`span`,{id:`${E}-hint`,className:e.hint,children:m})]})});export{l as TimePicker};
@@ -1,9 +1 @@
1
- var e = {
2
- wrapper: "_wrapper_gwf19_2",
3
- label: "_label_gwf19_29",
4
- input: "_input_gwf19_36",
5
- error: "_error_gwf19_70",
6
- hint: "_hint_gwf19_75"
7
- };
8
- //#endregion
9
- export { e as default };
1
+ var e={wrapper:`_wrapper_gwf19_2`,label:`_label_gwf19_29`,input:`_input_gwf19_36`,error:`_error_gwf19_70`,hint:`_hint_gwf19_75`};export{e as default};
@@ -1,55 +1 @@
1
- import e from "./timeline.module.js";
2
- import { cn as t, normalizeProgress as n, normalizeTone as r } from "@cascivo/core/pure";
3
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
- //#region ../components/src/timeline/timeline.tsx
5
- var o = {
6
- pending: "upcoming",
7
- active: "current",
8
- complete: "complete",
9
- error: "error"
10
- }, s = {
11
- neutral: "neutral",
12
- info: "info",
13
- success: "success",
14
- warning: "warning",
15
- danger: "danger"
16
- };
17
- function c({ items: c, orientation: l = "vertical", className: u, ...d }) {
18
- return /* @__PURE__ */ i("ol", {
19
- "data-orientation": l,
20
- className: t(e.list, u),
21
- ...d,
22
- children: c.map((t) => {
23
- let c = n(t.status ?? "pending");
24
- return /* @__PURE__ */ a("li", {
25
- "data-status": o[c] ?? "upcoming",
26
- "data-tone": t.tone ? s[r(t.tone)] ?? t.tone : void 0,
27
- "aria-current": c === "active" ? "step" : void 0,
28
- className: e.item,
29
- children: [/* @__PURE__ */ i("span", {
30
- className: e.marker,
31
- "aria-hidden": "true",
32
- children: t.icon ?? (c === "error" ? "✕" : null)
33
- }), /* @__PURE__ */ a("div", {
34
- className: e.content,
35
- children: [
36
- /* @__PURE__ */ i("div", {
37
- className: e.title,
38
- children: t.title
39
- }),
40
- t.time ? /* @__PURE__ */ i("time", {
41
- className: e.time,
42
- children: t.time
43
- }) : null,
44
- t.description ? /* @__PURE__ */ i("div", {
45
- className: e.description,
46
- children: t.description
47
- }) : null
48
- ]
49
- })]
50
- }, t.id);
51
- })
52
- });
53
- }
54
- //#endregion
55
- export { c as Timeline };
1
+ import e from"./timeline.module.js";import{cn as t,normalizeProgress as n,normalizeTone as r}from"@cascivo/core/pure";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o={pending:`upcoming`,active:`current`,complete:`complete`,error:`error`},s={neutral:`neutral`,info:`info`,success:`success`,warning:`warning`,danger:`danger`};function Timeline({items:c,orientation:l=`vertical`,className:u,...d}){return i(`ol`,{"data-orientation":l,className:t(e.list,u),...d,children:c.map(t=>{let c=n(t.status??`pending`);return a(`li`,{"data-status":o[c]??`upcoming`,"data-tone":t.tone?s[r(t.tone)]??t.tone:void 0,"aria-current":c===`active`?`step`:void 0,className:e.item,children:[i(`span`,{className:e.marker,"aria-hidden":`true`,children:t.icon??(c===`error`?`✕`:null)}),a(`div`,{className:e.content,children:[i(`div`,{className:e.title,children:t.title}),t.time?i(`time`,{className:e.time,children:t.time}):null,t.description?i(`div`,{className:e.description,children:t.description}):null]})]},t.id)})})}export{Timeline};
@@ -1,11 +1 @@
1
- var e = {
2
- list: "_list_4utvf_2",
3
- item: "_item_4utvf_21",
4
- marker: "_marker_4utvf_63",
5
- content: "_content_4utvf_137",
6
- title: "_title_4utvf_144",
7
- time: "_time_4utvf_151",
8
- description: "_description_4utvf_156"
9
- };
10
- //#endregion
11
- export { e as default };
1
+ var e={list:`_list_4utvf_2`,item:`_item_4utvf_21`,marker:`_marker_4utvf_63`,content:`_content_4utvf_137`,title:`_title_4utvf_144`,time:`_time_4utvf_151`,description:`_description_4utvf_156`};export{e as default};
@@ -1,85 +1 @@
1
- "use client";
2
-
3
- import e from "./toast.module.js";
4
- import { useRef as t } from "react";
5
- import { createMachine as n, signal as r, useMachine as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
6
- import { builtin as s, t as c } from "@cascivo/i18n";
7
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
8
- //#region ../components/src/toast/toast.tsx
9
- var f = 5e3, p = 160, m = 0, h = r([]);
10
- function g(e) {
11
- h.value = [...h.value, {
12
- id: m++,
13
- ...e
14
- }];
15
- }
16
- function _(e) {
17
- h.value = h.value.filter((t) => t.id !== e);
18
- }
19
- function v({ children: t }) {
20
- o();
21
- let n = h.value.slice(-3);
22
- return /* @__PURE__ */ d(l, { children: [t, /* @__PURE__ */ u("div", {
23
- className: e.viewport,
24
- role: "region",
25
- "aria-label": c(s.toast.region),
26
- children: n.map((e) => /* @__PURE__ */ u(b, {
27
- toast: e,
28
- onDismiss: () => _(e.id)
29
- }, e.id))
30
- })] });
31
- }
32
- var y = n({
33
- initial: "visible",
34
- states: {
35
- visible: { on: { DISMISS: "dismissing" } },
36
- dismissing: { on: { END: "gone" } }
37
- }
38
- });
39
- function b({ toast: n, onDismiss: r }) {
40
- o();
41
- let [l, m] = i(y), h = t(r);
42
- h.current = r;
43
- let g = n.duration ?? f, _ = n.variant === "destructive";
44
- return a(() => {
45
- let e = l.value;
46
- if (e === "visible") {
47
- let e = setTimeout(() => m("DISMISS"), g);
48
- return () => clearTimeout(e);
49
- }
50
- if (e === "dismissing") {
51
- let e = setTimeout(() => h.current(), p);
52
- return () => clearTimeout(e);
53
- }
54
- }), /* @__PURE__ */ d("div", {
55
- role: _ ? "alert" : "status",
56
- "aria-live": _ ? "assertive" : "polite",
57
- "data-variant": n.variant ?? "default",
58
- "data-state": l.value,
59
- className: e.toast,
60
- children: [/* @__PURE__ */ d("div", {
61
- className: e.body,
62
- children: [/* @__PURE__ */ u("div", {
63
- className: e.title,
64
- children: n.title
65
- }), n.description && /* @__PURE__ */ u("div", {
66
- className: e.description,
67
- children: n.description
68
- })]
69
- }), /* @__PURE__ */ u("button", {
70
- type: "button",
71
- className: e.close,
72
- "aria-label": c(s.toast.dismiss),
73
- onClick: () => m("DISMISS"),
74
- children: "✕"
75
- })]
76
- });
77
- }
78
- function x() {
79
- return { toast: g };
80
- }
81
- function S() {
82
- h.value = [];
83
- }
84
- //#endregion
85
- export { v as ToastProvider, S as dismissAllToasts, x as useToast };
1
+ "use client";import e from"./toast.module.js";import{useRef as t}from"react";import{createMachine as n,signal as r,useMachine as i,useSignalEffect as a,useSignals as o}from"@cascivo/core";import{builtin as s,t as c}from"@cascivo/i18n";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f=5e3,p=160,m=0,h=r([]);function enqueue(e){h.value=[...h.value,{id:m++,...e}]}function dequeue(e){h.value=h.value.filter(t=>t.id!==e)}function ToastProvider({children:t}){o();let n=h.value.slice(-3);return d(l,{children:[t,u(`div`,{className:e.viewport,role:`region`,"aria-label":c(s.toast.region),children:n.map(e=>u(ToastItem,{toast:e,onDismiss:()=>dequeue(e.id)},e.id))})]})}var g=n({initial:`visible`,states:{visible:{on:{DISMISS:`dismissing`}},dismissing:{on:{END:`gone`}}}});function ToastItem({toast:n,onDismiss:r}){o();let[l,m]=i(g),h=t(r);h.current=r;let _=n.duration??f,v=n.variant===`destructive`;return a(()=>{let e=l.value;if(e===`visible`){let e=setTimeout(()=>m(`DISMISS`),_);return()=>clearTimeout(e)}if(e===`dismissing`){let e=setTimeout(()=>h.current(),p);return()=>clearTimeout(e)}}),d(`div`,{role:v?`alert`:`status`,"aria-live":v?`assertive`:`polite`,"data-variant":n.variant??`default`,"data-state":l.value,className:e.toast,children:[d(`div`,{className:e.body,children:[u(`div`,{className:e.title,children:n.title}),n.description&&u(`div`,{className:e.description,children:n.description})]}),u(`button`,{type:`button`,className:e.close,"aria-label":c(s.toast.dismiss),onClick:()=>m(`DISMISS`),children:`✕`})]})}function useToast(){return{toast:enqueue}}function dismissAllToasts(){h.value=[]}export{ToastProvider,dismissAllToasts,useToast};
@@ -1,11 +1 @@
1
- var e = {
2
- viewport: "_viewport_cshyp_2",
3
- toast: "_toast_cshyp_23",
4
- icon: "_icon_cshyp_62",
5
- title: "_title_cshyp_63",
6
- body: "_body_cshyp_92",
7
- description: "_description_cshyp_108",
8
- close: "_close_cshyp_115"
9
- };
10
- //#endregion
11
- export { e as default };
1
+ var e={viewport:`_viewport_1gnpp_2`,toast:`_toast_1gnpp_24`,icon:`_icon_1gnpp_63`,title:`_title_1gnpp_64`,body:`_body_1gnpp_93`,description:`_description_1gnpp_109`,close:`_close_1gnpp_116`};export{e as default};
@@ -1,43 +1 @@
1
- "use client";
2
-
3
- import e from "./toc.module.js";
4
- import { useRef as t } from "react";
5
- import { cn as n, useControllableSignal as r, useSignalEffect as i, useSignals as a } from "@cascivo/core";
6
- import { builtin as o, t as s } from "@cascivo/i18n";
7
- import { jsx as c } from "react/jsx-runtime";
8
- //#region ../components/src/toc/toc.tsx
9
- function l({ items: l, activeId: u, onActiveChange: d, labels: f, className: p }) {
10
- a();
11
- let m = u !== void 0, [h] = r({
12
- value: u,
13
- defaultValue: l[0]?.id ?? ""
14
- }), g = t(d);
15
- return g.current = d, i(() => {
16
- if (m || typeof document > "u" || typeof IntersectionObserver > "u") return;
17
- let e = l.map((e) => document.getElementById(e.id)).filter((e) => e !== null);
18
- if (e.length === 0) return;
19
- let t = /* @__PURE__ */ new Set(), n = new IntersectionObserver((e) => {
20
- for (let n of e) n.isIntersecting ? t.add(n.target.id) : t.delete(n.target.id);
21
- let n = l.find((e) => t.has(e.id));
22
- n && n.id !== h.value && (h.value = n.id, g.current?.(n.id));
23
- }, {
24
- rootMargin: "0px 0px -70% 0px",
25
- threshold: 0
26
- });
27
- for (let t of e) n.observe(t);
28
- return () => n.disconnect();
29
- }), /* @__PURE__ */ c("nav", {
30
- "aria-label": f?.nav ?? s(o.toc.nav),
31
- className: n(e.toc, p),
32
- children: /* @__PURE__ */ c("ol", { children: l.map((e) => /* @__PURE__ */ c("li", {
33
- style: { "--toc-level": e.level ?? 2 },
34
- children: /* @__PURE__ */ c("a", {
35
- href: `#${e.id}`,
36
- "aria-current": e.id === h.value ? "location" : void 0,
37
- children: e.label
38
- })
39
- }, e.id)) })
40
- });
41
- }
42
- //#endregion
43
- export { l as Toc };
1
+ "use client";import e from"./toc.module.js";import{useRef as t}from"react";import{cn as n,useControllableSignal as r,useSignalEffect as i,useSignals as a}from"@cascivo/core";import{builtin as o,t as s}from"@cascivo/i18n";import{jsx as c}from"react/jsx-runtime";function Toc({items:l,activeId:u,onActiveChange:d,labels:f,className:p}){a();let m=u!==void 0,[h]=r({value:u,defaultValue:l[0]?.id??``}),g=t(d);return g.current=d,i(()=>{if(m||typeof document>`u`||typeof IntersectionObserver>`u`)return;let e=l.map(e=>document.getElementById(e.id)).filter(e=>e!==null);if(e.length===0)return;let t=new Set,n=new IntersectionObserver(e=>{for(let n of e)n.isIntersecting?t.add(n.target.id):t.delete(n.target.id);let n=l.find(e=>t.has(e.id));n&&n.id!==h.value&&(h.value=n.id,g.current?.(n.id))},{rootMargin:`0px 0px -70% 0px`,threshold:0});for(let t of e)n.observe(t);return()=>n.disconnect()}),c(`nav`,{"aria-label":f?.nav??s(o.toc.nav),className:n(e.toc,p),children:c(`ol`,{children:l.map(e=>c(`li`,{style:{"--toc-level":e.level??2},children:c(`a`,{href:`#${e.id}`,"aria-current":e.id===h.value?`location`:void 0,children:e.label})},e.id))})})}export{Toc};
@@ -1,3 +1 @@
1
- var e = { toc: "_toc_1w9fk_2" };
2
- //#endregion
3
- export { e as default };
1
+ var e={toc:`_toc_1jgqp_2`};export{e as default};
@@ -1,18 +1 @@
1
- "use client";
2
-
3
- import { useSignal as e, useSignalEffect as t, useSignals as n } from "@cascivo/core";
4
- //#region ../components/src/toc/use-toc-from-region.ts
5
- function r(r, i = {}) {
6
- n();
7
- let a = i.selector ?? "h2, h3, h4", o = e([]);
8
- return t(() => {
9
- let e = r.current;
10
- e && (o.value = Array.from(e.querySelectorAll(a)).filter((e) => e.id !== "").map((e) => ({
11
- id: e.id,
12
- label: e.textContent?.trim() ?? "",
13
- level: Number(e.tagName.slice(1)) || 2
14
- })));
15
- }), o;
16
- }
17
- //#endregion
18
- export { r as useTocFromRegion };
1
+ "use client";import{useSignal as e,useSignalEffect as t,useSignals as n}from"@cascivo/core";function useTocFromRegion(r,i={}){n();let a=i.selector??`h2, h3, h4`,o=e([]);return t(()=>{let e=r.current;e&&(o.value=Array.from(e.querySelectorAll(a)).filter(e=>e.id!==``).map(e=>({id:e.id,label:e.textContent?.trim()??``,level:Number(e.tagName.slice(1))||2})))}),o}export{useTocFromRegion};
@@ -1,42 +1 @@
1
- "use client";
2
-
3
- import e from "./toggle.module.js";
4
- import { forwardRef as t } from "react";
5
- import { cn as n, createMachine as r, useMachine as i, useSignals as a } from "@cascivo/core";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- //#region ../components/src/toggle/toggle.tsx
8
- var c = t(function({ checked: t, defaultChecked: c = !1, onValueChange: l, label: u, size: d = "md", className: f, disabled: p, ariaLabel: m, ...h }, g) {
9
- a();
10
- let [_, v] = i(r({
11
- initial: c ? "on" : "off",
12
- states: {
13
- off: { on: { TOGGLE: "on" } },
14
- on: { on: { TOGGLE: "off" } }
15
- }
16
- })), y = t !== void 0, b = y ? t : _.value === "on";
17
- return /* @__PURE__ */ s("button", {
18
- type: "button",
19
- role: "switch",
20
- "aria-checked": b,
21
- "data-state": b ? "on" : "off",
22
- "data-size": d,
23
- disabled: p,
24
- className: n(e.toggle, f),
25
- onClick: () => {
26
- y || v("TOGGLE"), l?.(!b);
27
- },
28
- ref: g,
29
- ...h,
30
- "aria-label": h["aria-label"] ?? m,
31
- children: [/* @__PURE__ */ o("span", {
32
- className: e.track,
33
- "aria-hidden": "true",
34
- children: /* @__PURE__ */ o("span", { className: e.thumb })
35
- }), u && /* @__PURE__ */ o("span", {
36
- className: e.label,
37
- children: u
38
- })]
39
- });
40
- });
41
- //#endregion
42
- export { c as Toggle };
1
+ "use client";import e from"./toggle.module.js";import{forwardRef as t}from"react";import{cn as n,createMachine as r,useMachine as i,useSignals as a}from"@cascivo/core";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=t(function({checked:t,defaultChecked:c=!1,onValueChange:l,label:u,size:d=`md`,className:f,disabled:p,ariaLabel:m,...h},g){a();let[_,v]=i(r({initial:c?`on`:`off`,states:{off:{on:{TOGGLE:`on`}},on:{on:{TOGGLE:`off`}}}})),y=t!==void 0,b=y?t:_.value===`on`;return s(`button`,{type:`button`,role:`switch`,"aria-checked":b,"data-state":b?`on`:`off`,"data-size":d,disabled:p,className:n(e.toggle,f),onClick:()=>{y||v(`TOGGLE`),l?.(!b)},ref:g,...h,"aria-label":h[`aria-label`]??m,children:[o(`span`,{className:e.track,"aria-hidden":`true`,children:o(`span`,{className:e.thumb})}),u&&o(`span`,{className:e.label,children:u})]})});export{c as Toggle};
@@ -1,8 +1 @@
1
- var e = {
2
- toggle: "_toggle_1vvuo_2",
3
- track: "_track_1vvuo_33",
4
- thumb: "_thumb_1vvuo_53",
5
- label: "_label_1vvuo_66"
6
- };
7
- //#endregion
8
- export { e as default };
1
+ var e={toggle:`_toggle_1vvuo_2`,track:`_track_1vvuo_33`,thumb:`_thumb_1vvuo_53`,label:`_label_1vvuo_66`};export{e as default};