@cascivo/react 0.18.0 → 1.1.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 (645) hide show
  1. package/README.md +9 -7
  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 -38
  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 -268
  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 -165
  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 -371
  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 -219
  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 -107
  105. package/dist/dropdown/dropdown.module.js +1 -9
  106. package/dist/editable/editable.js +1 -67
  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 -46
  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 -122
  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 +2084 -120
  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 -55
  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.js +1 -20
  169. package/dist/layouts/src/flex/flex.module.js +1 -3
  170. package/dist/layouts/src/grid/grid.css +1 -1
  171. package/dist/layouts/src/grid/grid.js +1 -55
  172. package/dist/layouts/src/grid/grid.module.js +1 -7
  173. package/dist/layouts/src/page-header/page-header.js +1 -31
  174. package/dist/layouts/src/page-header/page-header.module.js +1 -10
  175. package/dist/layouts/src/spacer/spacer.js +1 -17
  176. package/dist/layouts/src/spacer/spacer.module.js +1 -3
  177. package/dist/link/link.css +1 -1
  178. package/dist/link/link.js +1 -22
  179. package/dist/link/link.module.js +1 -3
  180. package/dist/list/list.js +1 -21
  181. package/dist/list/list.module.js +1 -6
  182. package/dist/log-viewer/log-viewer.css +1 -1
  183. package/dist/log-viewer/log-viewer.js +2 -184
  184. package/dist/log-viewer/log-viewer.module.js +1 -16
  185. package/dist/menu/menu.js +1 -126
  186. package/dist/menu/menu.module.js +1 -8
  187. package/dist/menu-button/menu-button.js +1 -92
  188. package/dist/menu-button/menu-button.module.js +1 -8
  189. package/dist/menubar/menubar.js +1 -103
  190. package/dist/menubar/menubar.module.js +1 -8
  191. package/dist/modal/modal.css +1 -1
  192. package/dist/modal/modal.js +1 -76
  193. package/dist/modal/modal.module.js +1 -12
  194. package/dist/multi-select/list-nav.js +1 -0
  195. package/dist/multi-select/multi-select.css +1 -1
  196. package/dist/multi-select/multi-select.js +1 -106
  197. package/dist/multi-select/multi-select.module.js +1 -15
  198. package/dist/multi-select/option-list.js +1 -0
  199. package/dist/native-select/native-select.css +1 -1
  200. package/dist/native-select/native-select.js +1 -37
  201. package/dist/native-select/native-select.module.js +1 -7
  202. package/dist/navigation-menu/navigation-menu.js +1 -99
  203. package/dist/navigation-menu/navigation-menu.module.js +1 -10
  204. package/dist/node/accordion/accordion.js +1 -114
  205. package/dist/node/accordion/accordion.module.js +1 -10
  206. package/dist/node/action-sheet/action-sheet.js +1 -91
  207. package/dist/node/action-sheet/action-sheet.module.js +1 -12
  208. package/dist/node/alert/alert.js +1 -55
  209. package/dist/node/alert/alert.module.js +1 -11
  210. package/dist/node/alert-dialog/alert-dialog.js +1 -66
  211. package/dist/node/alert-dialog/alert-dialog.module.js +1 -11
  212. package/dist/node/app-shell/app-shell.js +1 -85
  213. package/dist/node/app-shell/app-shell.module.js +1 -12
  214. package/dist/node/aspect-ratio/aspect-ratio.js +1 -20
  215. package/dist/node/aspect-ratio/aspect-ratio.module.js +1 -6
  216. package/dist/node/avatar/avatar.js +1 -57
  217. package/dist/node/avatar/avatar.module.js +1 -8
  218. package/dist/node/avatar-group/avatar-group.js +1 -24
  219. package/dist/node/avatar-group/avatar-group.module.js +1 -6
  220. package/dist/node/badge/badge.js +1 -22
  221. package/dist/node/badge/badge.module.js +1 -3
  222. package/dist/node/blockquote/blockquote.js +1 -16
  223. package/dist/node/blockquote/blockquote.module.js +1 -6
  224. package/dist/node/bottom-sheet/bottom-sheet.js +1 -111
  225. package/dist/node/bottom-sheet/bottom-sheet.module.js +1 -14
  226. package/dist/node/brand/logo/logo.js +1 -0
  227. package/dist/node/brand/logo/logo.module.js +1 -0
  228. package/dist/node/breadcrumb/breadcrumb.js +1 -28
  229. package/dist/node/breadcrumb/breadcrumb.module.js +1 -3
  230. package/dist/node/button/button.js +1 -35
  231. package/dist/node/button/button.module.js +1 -6
  232. package/dist/node/button-group/button-group.js +1 -39
  233. package/dist/node/button-group/button-group.module.js +1 -3
  234. package/dist/node/calendar/calendar-date.js +1 -0
  235. package/dist/node/calendar/calendar.js +1 -199
  236. package/dist/node/calendar/calendar.module.js +1 -14
  237. package/dist/node/card/card.js +1 -53
  238. package/dist/node/card/card.module.js +1 -12
  239. package/dist/node/carousel/carousel.js +1 -138
  240. package/dist/node/carousel/carousel.module.js +1 -13
  241. package/dist/node/chat-bubble/chat-bubble.js +1 -31
  242. package/dist/node/chat-bubble/chat-bubble.module.js +1 -11
  243. package/dist/node/checkbox/checkbox.js +1 -38
  244. package/dist/node/checkbox/checkbox.module.js +1 -8
  245. package/dist/node/checkbox-card/checkbox-card.js +1 -50
  246. package/dist/node/checkbox-card/checkbox-card.module.js +1 -11
  247. package/dist/node/code/code.js +1 -14
  248. package/dist/node/code/code.module.js +1 -3
  249. package/dist/node/code-snippet/code-snippet.js +2 -121
  250. package/dist/node/code-snippet/code-snippet.module.js +1 -17
  251. package/dist/node/code-snippet/highlight.js +1 -67
  252. package/dist/node/collapsible/collapsible.js +1 -47
  253. package/dist/node/collapsible/collapsible.module.js +1 -7
  254. package/dist/node/color-picker/color-picker.js +1 -268
  255. package/dist/node/color-picker/color-picker.module.js +1 -18
  256. package/dist/node/color-picker/color.js +1 -0
  257. package/dist/node/combobox/combobox.js +1 -165
  258. package/dist/node/combobox/combobox.module.js +1 -19
  259. package/dist/node/combobox/list-nav.js +1 -0
  260. package/dist/node/combobox/option-list.js +1 -0
  261. package/dist/node/command-menu/command-menu.js +1 -421
  262. package/dist/node/command-menu/command-menu.module.js +1 -34
  263. package/dist/node/comparison/comparison.js +1 -69
  264. package/dist/node/comparison/comparison.module.js +1 -9
  265. package/dist/node/contained-list/contained-list.js +1 -41
  266. package/dist/node/contained-list/contained-list.module.js +1 -11
  267. package/dist/node/context-menu/context-menu.js +1 -93
  268. package/dist/node/context-menu/context-menu.module.js +1 -7
  269. package/dist/node/copy-button/copy-button.js +1 -60
  270. package/dist/node/copy-button/copy-button.module.js +1 -6
  271. package/dist/node/data-list/data-list.js +1 -25
  272. package/dist/node/data-list/data-list.module.js +1 -8
  273. package/dist/node/data-table/column-filter.js +1 -0
  274. package/dist/node/data-table/column-layout.js +1 -0
  275. package/dist/node/data-table/data-table.js +1 -371
  276. package/dist/node/data-table/data-table.module.js +1 -33
  277. package/dist/node/data-table/grid-keys.js +1 -0
  278. package/dist/node/data-table/row-group.js +1 -0
  279. package/dist/node/data-table/row-search.js +1 -0
  280. package/dist/node/data-table/row-sort.js +1 -0
  281. package/dist/node/data-table/to-csv.js +3 -0
  282. package/dist/node/data-table/virtual-window.js +1 -0
  283. package/dist/node/date-picker/date-picker.js +1 -219
  284. package/dist/node/date-picker/date-picker.module.js +1 -23
  285. package/dist/node/date-picker/parse-date.js +1 -0
  286. package/dist/node/date-range-picker/date-range-picker.js +1 -196
  287. package/dist/node/date-range-picker/date-range-picker.module.js +1 -18
  288. package/dist/node/dock/dock.js +1 -34
  289. package/dist/node/dock/dock.module.js +1 -8
  290. package/dist/node/drawer/drawer.js +1 -96
  291. package/dist/node/drawer/drawer.module.js +1 -13
  292. package/dist/node/dropdown/dropdown.js +1 -107
  293. package/dist/node/dropdown/dropdown.module.js +1 -9
  294. package/dist/node/editable/editable.js +1 -67
  295. package/dist/node/editable/editable.module.js +1 -11
  296. package/dist/node/empty-state/empty-state.js +1 -32
  297. package/dist/node/empty-state/empty-state.module.js +1 -9
  298. package/dist/node/fab/fab.js +1 -93
  299. package/dist/node/fab/fab.module.js +1 -12
  300. package/dist/node/field/field.js +1 -46
  301. package/dist/node/field/field.module.js +1 -7
  302. package/dist/node/file-uploader/file-uploader.js +1 -122
  303. package/dist/node/file-uploader/file-uploader.module.js +1 -18
  304. package/dist/node/filter/filter.js +1 -35
  305. package/dist/node/filter/filter.module.js +1 -6
  306. package/dist/node/form/form.js +1 -95
  307. package/dist/node/form/form.module.js +1 -3
  308. package/dist/node/header/header.js +1 -44
  309. package/dist/node/header/header.module.js +1 -11
  310. package/dist/node/header-panel/header-panel.js +1 -72
  311. package/dist/node/header-panel/header-panel.module.js +1 -9
  312. package/dist/node/heading/heading.js +1 -22
  313. package/dist/node/heading/heading.module.js +1 -3
  314. package/dist/node/hover-card/hover-card.js +1 -84
  315. package/dist/node/hover-card/hover-card.module.js +1 -6
  316. package/dist/node/icon-button/icon-button.js +1 -19
  317. package/dist/node/icon-button/icon-button.module.js +1 -3
  318. package/dist/node/image/image.js +1 -64
  319. package/dist/node/image/image.module.js +1 -9
  320. package/dist/node/indicator/indicator.js +1 -16
  321. package/dist/node/indicator/indicator.module.js +1 -6
  322. package/dist/node/infinite-scroll/infinite-scroll.js +1 -49
  323. package/dist/node/infinite-scroll/infinite-scroll.module.js +1 -7
  324. package/dist/node/inline-loading/inline-loading.js +1 -74
  325. package/dist/node/inline-loading/inline-loading.module.js +1 -9
  326. package/dist/node/input/input.js +1 -55
  327. package/dist/node/input/input.module.js +1 -9
  328. package/dist/node/input-group/input-group.js +1 -39
  329. package/dist/node/input-group/input-group.module.js +1 -9
  330. package/dist/node/item/item.js +1 -50
  331. package/dist/node/item/item.module.js +1 -10
  332. package/dist/node/join/join.js +1 -12
  333. package/dist/node/join/join.module.js +1 -3
  334. package/dist/node/kbd/kbd.js +1 -14
  335. package/dist/node/kbd/kbd.module.js +1 -3
  336. package/dist/node/label/label.js +1 -23
  337. package/dist/node/label/label.module.js +1 -7
  338. package/dist/node/large-title-header/large-title-header.js +1 -38
  339. package/dist/node/large-title-header/large-title-header.module.js +1 -12
  340. package/dist/node/layouts/src/auto-grid/auto-grid.js +1 -17
  341. package/dist/node/layouts/src/auto-grid/auto-grid.module.js +1 -4
  342. package/dist/node/layouts/src/center/center.js +1 -16
  343. package/dist/node/layouts/src/center/center.module.js +1 -3
  344. package/dist/node/layouts/src/columns/columns.js +1 -21
  345. package/dist/node/layouts/src/columns/columns.module.js +1 -6
  346. package/dist/node/layouts/src/flex/flex.js +1 -20
  347. package/dist/node/layouts/src/flex/flex.module.js +1 -3
  348. package/dist/node/layouts/src/grid/grid.js +1 -55
  349. package/dist/node/layouts/src/grid/grid.module.js +1 -7
  350. package/dist/node/layouts/src/page-header/page-header.js +1 -31
  351. package/dist/node/layouts/src/page-header/page-header.module.js +1 -10
  352. package/dist/node/layouts/src/spacer/spacer.js +1 -17
  353. package/dist/node/layouts/src/spacer/spacer.module.js +1 -3
  354. package/dist/node/link/link.js +1 -22
  355. package/dist/node/link/link.module.js +1 -3
  356. package/dist/node/list/list.js +1 -21
  357. package/dist/node/list/list.module.js +1 -6
  358. package/dist/node/log-viewer/log-viewer.js +2 -184
  359. package/dist/node/log-viewer/log-viewer.module.js +1 -16
  360. package/dist/node/menu/menu.js +1 -126
  361. package/dist/node/menu/menu.module.js +1 -8
  362. package/dist/node/menu-button/menu-button.js +1 -92
  363. package/dist/node/menu-button/menu-button.module.js +1 -8
  364. package/dist/node/menubar/menubar.js +1 -103
  365. package/dist/node/menubar/menubar.module.js +1 -8
  366. package/dist/node/modal/modal.js +1 -76
  367. package/dist/node/modal/modal.module.js +1 -12
  368. package/dist/node/multi-select/list-nav.js +1 -0
  369. package/dist/node/multi-select/multi-select.js +1 -106
  370. package/dist/node/multi-select/multi-select.module.js +1 -15
  371. package/dist/node/multi-select/option-list.js +1 -0
  372. package/dist/node/native-select/native-select.js +1 -37
  373. package/dist/node/native-select/native-select.module.js +1 -7
  374. package/dist/node/navigation-menu/navigation-menu.js +1 -99
  375. package/dist/node/navigation-menu/navigation-menu.module.js +1 -10
  376. package/dist/node/notification/notification.js +1 -140
  377. package/dist/node/notification/notification.module.js +1 -11
  378. package/dist/node/number-input/number-input.js +1 -147
  379. package/dist/node/number-input/number-input.module.js +1 -12
  380. package/dist/node/otp-input/otp-input.js +1 -70
  381. package/dist/node/otp-input/otp-input.module.js +1 -6
  382. package/dist/node/overflow-menu/overflow-menu.js +1 -70
  383. package/dist/node/overflow-menu/overflow-menu.module.js +1 -7
  384. package/dist/node/pagination/pagination.js +1 -92
  385. package/dist/node/pagination/pagination.module.js +1 -11
  386. package/dist/node/password-input/password-input.js +1 -81
  387. package/dist/node/password-input/password-input.module.js +1 -11
  388. package/dist/node/popover/popover.js +1 -51
  389. package/dist/node/popover/popover.module.js +1 -6
  390. package/dist/node/popover/use-popover.js +1 -55
  391. package/dist/node/progress/progress.js +1 -16
  392. package/dist/node/progress/progress.module.js +1 -6
  393. package/dist/node/progress-bar/progress-bar.js +1 -42
  394. package/dist/node/progress-bar/progress-bar.module.js +1 -11
  395. package/dist/node/progress-circle/progress-circle.js +1 -46
  396. package/dist/node/progress-circle/progress-circle.module.js +1 -9
  397. package/dist/node/progress-indicator/progress-indicator.js +1 -34
  398. package/dist/node/progress-indicator/progress-indicator.module.js +1 -10
  399. package/dist/node/prose/prose.js +1 -13
  400. package/dist/node/prose/prose.module.js +1 -3
  401. package/dist/node/pull-to-refresh/pull-to-refresh.js +1 -82
  402. package/dist/node/pull-to-refresh/pull-to-refresh.module.js +1 -9
  403. package/dist/node/qr-code/encode.js +1 -583
  404. package/dist/node/qr-code/qr-code.js +1 -41
  405. package/dist/node/qr-code/qr-code.module.js +1 -6
  406. package/dist/node/radial-progress/radial-progress.js +1 -27
  407. package/dist/node/radial-progress/radial-progress.module.js +1 -6
  408. package/dist/node/radio/radio.js +1 -48
  409. package/dist/node/radio/radio.module.js +1 -9
  410. package/dist/node/radio-card/radio-card.js +1 -64
  411. package/dist/node/radio-card/radio-card.module.js +1 -11
  412. package/dist/node/rating-group/rating-group.js +1 -37
  413. package/dist/node/rating-group/rating-group.module.js +1 -6
  414. package/dist/node/react/src/index.js +1 -141
  415. package/dist/node/relative-time/relative-time.js +1 -66
  416. package/dist/node/relative-time/relative-time.module.js +1 -3
  417. package/dist/node/reorder-list/reorder-list.js +1 -143
  418. package/dist/node/reorder-list/reorder-list.module.js +1 -11
  419. package/dist/node/resizable/resizable.js +1 -80
  420. package/dist/node/resizable/resizable.module.js +1 -8
  421. package/dist/node/scroll-area/scroll-area.js +1 -38
  422. package/dist/node/scroll-area/scroll-area.module.js +1 -3
  423. package/dist/node/search/search.js +1 -92
  424. package/dist/node/search/search.module.js +1 -9
  425. package/dist/node/segmented-control/segmented-control.js +1 -43
  426. package/dist/node/segmented-control/segmented-control.module.js +1 -6
  427. package/dist/node/select/select.js +1 -72
  428. package/dist/node/select/select.module.js +1 -11
  429. package/dist/node/separator/separator.js +1 -19
  430. package/dist/node/separator/separator.module.js +1 -3
  431. package/dist/node/sheet/sheet.js +1 -49
  432. package/dist/node/sheet/sheet.module.js +1 -9
  433. package/dist/node/shell-header/shell-header.js +1 -169
  434. package/dist/node/shell-header/shell-header.module.js +1 -24
  435. package/dist/node/side-nav/side-nav.js +1 -334
  436. package/dist/node/side-nav/side-nav.module.js +1 -31
  437. package/dist/node/skeleton/skeleton.js +1 -23
  438. package/dist/node/skeleton/skeleton.module.js +1 -7
  439. package/dist/node/skip-nav/skip-nav.js +1 -28
  440. package/dist/node/skip-nav/skip-nav.module.js +1 -3
  441. package/dist/node/slider/slider.js +1 -29
  442. package/dist/node/slider/slider.module.js +1 -7
  443. package/dist/node/spinner/spinner.js +1 -18
  444. package/dist/node/spinner/spinner.module.js +1 -6
  445. package/dist/node/stack/stack.js +1 -17
  446. package/dist/node/stack/stack.module.js +1 -6
  447. package/dist/node/stat/stat.js +1 -41
  448. package/dist/node/stat/stat.module.js +1 -11
  449. package/dist/node/status/status.js +1 -25
  450. package/dist/node/status/status.module.js +1 -7
  451. package/dist/node/steps/steps.js +1 -35
  452. package/dist/node/steps/steps.module.js +1 -8
  453. package/dist/node/structured-list/structured-list.js +1 -102
  454. package/dist/node/structured-list/structured-list.module.js +1 -12
  455. package/dist/node/swap/swap.js +1 -36
  456. package/dist/node/swap/swap.module.js +1 -7
  457. package/dist/node/swipe-item/swipe-item.js +1 -62
  458. package/dist/node/swipe-item/swipe-item.module.js +1 -12
  459. package/dist/node/switcher/switcher.js +1 -32
  460. package/dist/node/switcher/switcher.module.js +1 -8
  461. package/dist/node/tabs/tabs.js +1 -98
  462. package/dist/node/tabs/tabs.module.js +1 -8
  463. package/dist/node/tag/tag.js +1 -33
  464. package/dist/node/tag/tag.module.js +1 -6
  465. package/dist/node/tags-input/tags-input.js +1 -64
  466. package/dist/node/tags-input/tags-input.module.js +1 -8
  467. package/dist/node/text/text.js +1 -16
  468. package/dist/node/text/text.module.js +1 -3
  469. package/dist/node/textarea/textarea.js +1 -57
  470. package/dist/node/textarea/textarea.module.js +1 -9
  471. package/dist/node/tile/tile.js +1 -39
  472. package/dist/node/tile/tile.module.js +1 -7
  473. package/dist/node/time-picker/time-picker.js +1 -63
  474. package/dist/node/time-picker/time-picker.module.js +1 -9
  475. package/dist/node/timeline/timeline.js +1 -55
  476. package/dist/node/timeline/timeline.module.js +1 -11
  477. package/dist/node/toast/toast.js +1 -85
  478. package/dist/node/toast/toast.module.js +1 -11
  479. package/dist/node/toc/toc.js +1 -43
  480. package/dist/node/toc/toc.module.js +1 -3
  481. package/dist/node/toc/use-toc-from-region.js +1 -18
  482. package/dist/node/toggle/toggle.js +1 -41
  483. package/dist/node/toggle/toggle.module.js +1 -8
  484. package/dist/node/toggle-group/toggle-group.js +1 -55
  485. package/dist/node/toggle-group/toggle-group.module.js +1 -6
  486. package/dist/node/toggletip/toggletip.js +1 -49
  487. package/dist/node/toggletip/toggletip.module.js +1 -7
  488. package/dist/node/tooltip/tooltip.js +1 -58
  489. package/dist/node/tooltip/tooltip.module.js +1 -6
  490. package/dist/node/tree-view/tree-view.js +1 -201
  491. package/dist/node/tree-view/tree-view.module.js +1 -13
  492. package/dist/node/user/user.js +1 -35
  493. package/dist/node/user/user.module.js +1 -9
  494. package/dist/node/virtual-list/virtual-list.js +1 -40
  495. package/dist/node/virtual-list/virtual-list.module.js +1 -7
  496. package/dist/node/visually-hidden/visually-hidden.js +1 -2
  497. package/dist/node/wheel-picker/wheel-picker.js +1 -84
  498. package/dist/node/wheel-picker/wheel-picker.module.js +1 -8
  499. package/dist/notification/notification.js +1 -140
  500. package/dist/notification/notification.module.js +1 -11
  501. package/dist/number-input/number-input.js +1 -147
  502. package/dist/number-input/number-input.module.js +1 -12
  503. package/dist/otp-input/otp-input.js +1 -70
  504. package/dist/otp-input/otp-input.module.js +1 -6
  505. package/dist/overflow-menu/overflow-menu.js +1 -70
  506. package/dist/overflow-menu/overflow-menu.module.js +1 -7
  507. package/dist/pagination/pagination.js +1 -92
  508. package/dist/pagination/pagination.module.js +1 -11
  509. package/dist/password-input/password-input.js +1 -81
  510. package/dist/password-input/password-input.module.js +1 -11
  511. package/dist/popover/popover.js +1 -51
  512. package/dist/popover/popover.module.js +1 -6
  513. package/dist/popover/use-popover.js +1 -55
  514. package/dist/progress/progress.css +1 -1
  515. package/dist/progress/progress.js +1 -16
  516. package/dist/progress/progress.module.js +1 -6
  517. package/dist/progress-bar/progress-bar.css +1 -1
  518. package/dist/progress-bar/progress-bar.js +1 -42
  519. package/dist/progress-bar/progress-bar.module.js +1 -11
  520. package/dist/progress-circle/progress-circle.js +1 -46
  521. package/dist/progress-circle/progress-circle.module.js +1 -9
  522. package/dist/progress-indicator/progress-indicator.css +1 -1
  523. package/dist/progress-indicator/progress-indicator.js +1 -34
  524. package/dist/progress-indicator/progress-indicator.module.js +1 -10
  525. package/dist/prose/prose.css +1 -1
  526. package/dist/prose/prose.js +1 -13
  527. package/dist/prose/prose.module.js +1 -3
  528. package/dist/pull-to-refresh/pull-to-refresh.js +1 -82
  529. package/dist/pull-to-refresh/pull-to-refresh.module.js +1 -9
  530. package/dist/qr-code/encode.js +1 -583
  531. package/dist/qr-code/qr-code.js +1 -41
  532. package/dist/qr-code/qr-code.module.js +1 -6
  533. package/dist/radial-progress/radial-progress.js +1 -27
  534. package/dist/radial-progress/radial-progress.module.js +1 -6
  535. package/dist/radio/radio.js +1 -48
  536. package/dist/radio/radio.module.js +1 -9
  537. package/dist/radio-card/radio-card.css +1 -1
  538. package/dist/radio-card/radio-card.js +1 -64
  539. package/dist/radio-card/radio-card.module.js +1 -11
  540. package/dist/rating-group/rating-group.js +1 -37
  541. package/dist/rating-group/rating-group.module.js +1 -6
  542. package/dist/react/src/index.js +1 -141
  543. package/dist/relative-time/relative-time.js +1 -66
  544. package/dist/relative-time/relative-time.module.js +1 -3
  545. package/dist/reorder-list/reorder-list.css +1 -1
  546. package/dist/reorder-list/reorder-list.js +1 -143
  547. package/dist/reorder-list/reorder-list.module.js +1 -11
  548. package/dist/resizable/resizable.js +1 -80
  549. package/dist/resizable/resizable.module.js +1 -8
  550. package/dist/scroll-area/scroll-area.css +1 -1
  551. package/dist/scroll-area/scroll-area.js +1 -38
  552. package/dist/scroll-area/scroll-area.module.js +1 -3
  553. package/dist/search/search.js +1 -92
  554. package/dist/search/search.module.js +1 -9
  555. package/dist/segmented-control/segmented-control.js +1 -43
  556. package/dist/segmented-control/segmented-control.module.js +1 -6
  557. package/dist/select/select.js +1 -72
  558. package/dist/select/select.module.js +1 -11
  559. package/dist/separator/separator.js +1 -19
  560. package/dist/separator/separator.module.js +1 -3
  561. package/dist/sheet/sheet.js +1 -49
  562. package/dist/sheet/sheet.module.js +1 -9
  563. package/dist/shell-header/shell-header.css +1 -1
  564. package/dist/shell-header/shell-header.js +1 -169
  565. package/dist/shell-header/shell-header.module.js +1 -24
  566. package/dist/side-nav/side-nav.css +1 -1
  567. package/dist/side-nav/side-nav.js +1 -334
  568. package/dist/side-nav/side-nav.module.js +1 -31
  569. package/dist/skeleton/skeleton.css +1 -1
  570. package/dist/skeleton/skeleton.js +1 -23
  571. package/dist/skeleton/skeleton.module.js +1 -7
  572. package/dist/skip-nav/skip-nav.js +1 -28
  573. package/dist/skip-nav/skip-nav.module.js +1 -3
  574. package/dist/slider/slider.js +1 -29
  575. package/dist/slider/slider.module.js +1 -7
  576. package/dist/spinner/spinner.css +1 -1
  577. package/dist/spinner/spinner.js +1 -18
  578. package/dist/spinner/spinner.module.js +1 -6
  579. package/dist/stack/stack.js +1 -17
  580. package/dist/stack/stack.module.js +1 -6
  581. package/dist/stat/stat.js +1 -41
  582. package/dist/stat/stat.module.js +1 -11
  583. package/dist/status/status.css +1 -1
  584. package/dist/status/status.js +1 -25
  585. package/dist/status/status.module.js +1 -7
  586. package/dist/steps/steps.css +1 -1
  587. package/dist/steps/steps.js +1 -35
  588. package/dist/steps/steps.module.js +1 -8
  589. package/dist/structured-list/structured-list.js +1 -102
  590. package/dist/structured-list/structured-list.module.js +1 -12
  591. package/dist/styles.css +395 -53
  592. package/dist/swap/swap.css +1 -1
  593. package/dist/swap/swap.js +1 -36
  594. package/dist/swap/swap.module.js +1 -7
  595. package/dist/swipe-item/swipe-item.js +1 -62
  596. package/dist/swipe-item/swipe-item.module.js +1 -12
  597. package/dist/switcher/switcher.js +1 -32
  598. package/dist/switcher/switcher.module.js +1 -8
  599. package/dist/tabs/tabs.js +1 -98
  600. package/dist/tabs/tabs.module.js +1 -8
  601. package/dist/tag/tag.js +1 -33
  602. package/dist/tag/tag.module.js +1 -6
  603. package/dist/tags-input/tags-input.js +1 -64
  604. package/dist/tags-input/tags-input.module.js +1 -8
  605. package/dist/text/text.css +1 -1
  606. package/dist/text/text.js +1 -16
  607. package/dist/text/text.module.js +1 -3
  608. package/dist/textarea/textarea.css +1 -1
  609. package/dist/textarea/textarea.js +1 -57
  610. package/dist/textarea/textarea.module.js +1 -9
  611. package/dist/tile/tile.css +1 -1
  612. package/dist/tile/tile.js +1 -39
  613. package/dist/tile/tile.module.js +1 -7
  614. package/dist/time-picker/time-picker.js +1 -63
  615. package/dist/time-picker/time-picker.module.js +1 -9
  616. package/dist/timeline/timeline.js +1 -55
  617. package/dist/timeline/timeline.module.js +1 -11
  618. package/dist/toast/toast.css +1 -1
  619. package/dist/toast/toast.js +1 -85
  620. package/dist/toast/toast.module.js +1 -11
  621. package/dist/toc/toc.css +1 -1
  622. package/dist/toc/toc.js +1 -43
  623. package/dist/toc/toc.module.js +1 -3
  624. package/dist/toc/use-toc-from-region.js +1 -18
  625. package/dist/toggle/toggle.js +1 -41
  626. package/dist/toggle/toggle.module.js +1 -8
  627. package/dist/toggle-group/toggle-group.js +1 -55
  628. package/dist/toggle-group/toggle-group.module.js +1 -6
  629. package/dist/toggletip/toggletip.js +1 -49
  630. package/dist/toggletip/toggletip.module.js +1 -7
  631. package/dist/tooltip/tooltip.css +1 -1
  632. package/dist/tooltip/tooltip.js +1 -58
  633. package/dist/tooltip/tooltip.module.js +1 -6
  634. package/dist/tree-view/tree-view.css +1 -1
  635. package/dist/tree-view/tree-view.js +1 -201
  636. package/dist/tree-view/tree-view.module.js +1 -13
  637. package/dist/user/user.js +1 -35
  638. package/dist/user/user.module.js +1 -9
  639. package/dist/virtual-list/virtual-list.js +1 -40
  640. package/dist/virtual-list/virtual-list.module.js +1 -7
  641. package/dist/visually-hidden/visually-hidden.js +1 -2
  642. package/dist/wheel-picker/wheel-picker.js +1 -84
  643. package/dist/wheel-picker/wheel-picker.module.js +1 -8
  644. package/package.json +4 -4
  645. package/readme.body.md +7 -5
@@ -1,57 +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, className: d, id: f, onFocus: p, onBlur: m, ...h }, g) {
15
- let [_, v] = i(s), y = f ?? (t ? `cascade-textarea-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0);
16
- return /* @__PURE__ */ o("div", {
17
- className: n(e.wrapper, d),
18
- "data-state": c ? "error" : _.value,
19
- "data-resize": l,
20
- children: [
21
- t && /* @__PURE__ */ a("label", {
22
- className: e.label,
23
- htmlFor: y,
24
- children: t
25
- }),
26
- /* @__PURE__ */ a("textarea", {
27
- ref: g,
28
- id: y,
29
- rows: u,
30
- "aria-multiline": "true",
31
- className: e.textarea,
32
- "aria-invalid": c ? !0 : void 0,
33
- "aria-describedby": c ? `${y}-error` : r ? `${y}-hint` : void 0,
34
- onFocus: (e) => {
35
- v("FOCUS"), p?.(e);
36
- },
37
- onBlur: (e) => {
38
- v("BLUR"), m?.(e);
39
- },
40
- ...h
41
- }),
42
- c && /* @__PURE__ */ a("span", {
43
- id: `${y}-error`,
44
- className: e.error,
45
- role: "alert",
46
- children: c
47
- }),
48
- !c && r && /* @__PURE__ */ a("span", {
49
- id: `${y}-hint`,
50
- className: e.hint,
51
- children: r
52
- })
53
- ]
54
- });
55
- });
56
- //#endregion
57
- 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 s({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)}),y=()=>{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:y,onKeyDown:e=>{(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),y())},children:[p&&a(`span`,{className:e.icon,"aria-hidden":`true`,children:p}),a(`span`,{className:e.body,children:h})]})}export{s as 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,63 +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, onChange: u, min: d, max: f, step: p, label: m, hint: h, error: g, size: _ = "md", className: v, id: y, onFocus: b, onBlur: x, ...S }, C) {
15
- a();
16
- let [w, T] = i(c), E = y ?? (m ? `cascade-time-picker-${m.toLowerCase().replace(/\s+/g, "-")}` : void 0);
17
- return /* @__PURE__ */ s("div", {
18
- className: n(e.wrapper, v),
19
- "data-state": g ? "error" : w.value,
20
- "data-size": _,
21
- children: [
22
- m && /* @__PURE__ */ o("label", {
23
- className: e.label,
24
- htmlFor: E,
25
- children: m
26
- }),
27
- /* @__PURE__ */ o("input", {
28
- id: E,
29
- type: "time",
30
- className: e.input,
31
- value: t,
32
- defaultValue: r,
33
- min: d,
34
- max: f,
35
- step: p,
36
- "aria-invalid": g ? !0 : void 0,
37
- "aria-describedby": g ? `${E}-error` : h ? `${E}-hint` : void 0,
38
- onChange: (e) => (l ?? u)?.(e.target.value),
39
- onFocus: (e) => {
40
- T("FOCUS"), b?.(e);
41
- },
42
- onBlur: (e) => {
43
- T("BLUR"), x?.(e);
44
- },
45
- ref: C,
46
- ...S
47
- }),
48
- g && /* @__PURE__ */ o("span", {
49
- id: `${E}-error`,
50
- className: e.error,
51
- role: "alert",
52
- children: g
53
- }),
54
- !g && h && /* @__PURE__ */ o("span", {
55
- id: `${E}-hint`,
56
- className: e.hint,
57
- children: h
58
- })
59
- ]
60
- });
61
- });
62
- //#endregion
63
- 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 c({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{c as 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 g(e){h.value=[...h.value,{id:m++,...e}]}function _(e){h.value=h.value.filter(t=>t.id!==e)}function v({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(b,{toast:e,onDismiss:()=>_(e.id)},e.id))})]})}var y=n({initial:`visible`,states:{visible:{on:{DISMISS:`dismissing`}},dismissing:{on:{END:`gone`}}}});function b({toast:n,onDismiss:r}){o();let[l,m]=i(y),h=t(r);h.current=r;let g=n.duration??f,_=n.variant===`destructive`;return a(()=>{let e=l.value;if(e===`visible`){let e=setTimeout(()=>m(`DISMISS`),g);return()=>clearTimeout(e)}if(e===`dismissing`){let e=setTimeout(()=>h.current(),p);return()=>clearTimeout(e)}}),d(`div`,{role:_?`alert`:`status`,"aria-live":_?`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 x(){return{toast:g}}function S(){h.value=[]}export{v as ToastProvider,S as dismissAllToasts,x as 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 l({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{l as 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 r(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{r as useTocFromRegion};
@@ -1,41 +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, onChange: u, label: d, size: f = "md", className: p, disabled: 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": f,
23
- disabled: m,
24
- className: n(e.toggle, p),
25
- onClick: () => {
26
- y || v("TOGGLE"), (l ?? u)?.(!b);
27
- },
28
- ref: g,
29
- ...h,
30
- children: [/* @__PURE__ */ o("span", {
31
- className: e.track,
32
- "aria-hidden": "true",
33
- children: /* @__PURE__ */ o("span", { className: e.thumb })
34
- }), d && /* @__PURE__ */ o("span", {
35
- className: e.label,
36
- children: d
37
- })]
38
- });
39
- });
40
- //#endregion
41
- 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};
@@ -1,55 +1 @@
1
- "use client";
2
-
3
- import e from "./toggle-group.module.js";
4
- import { forwardRef as t } from "react";
5
- import { cn as n, useControllableSignal as r, useRovingFocus 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-group/toggle-group.tsx
8
- function c(e, t) {
9
- return Array.isArray(e) ? e.includes(t) : e === t;
10
- }
11
- var l = t(function({ type: t, value: l, defaultValue: u, onValueChange: d, items: f, orientation: p = "horizontal", size: m = "md", disabled: h = !1, className: g, ..._ }, v) {
12
- a();
13
- let [y, b] = r({
14
- value: l,
15
- defaultValue: u ?? (t === "multiple" ? [] : ""),
16
- onChange: d
17
- }), x = i({
18
- orientation: p,
19
- loop: !0
20
- }), S = (e) => {
21
- let n = y.value;
22
- if (t === "multiple") {
23
- let t = Array.isArray(n) ? n : [];
24
- b(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
25
- } else b(n === e ? "" : e);
26
- };
27
- return /* @__PURE__ */ o("div", {
28
- role: t === "single" ? "radiogroup" : "group",
29
- "data-orientation": p,
30
- "data-size": m,
31
- className: n(e.toggleGroup, g),
32
- ref: v,
33
- ..._,
34
- children: f.map((n, r) => {
35
- let i = c(y.value, n.value), a = h || n.disabled, { ref: l, ...u } = x.getItemProps(r);
36
- return /* @__PURE__ */ s("button", {
37
- type: "button",
38
- ...t === "single" ? {
39
- role: "radio",
40
- "aria-checked": i
41
- } : { "aria-pressed": i },
42
- ...u,
43
- ref: l,
44
- "data-state": i ? "on" : "off",
45
- disabled: a,
46
- "aria-label": n.icon && !n.label ? n.value : void 0,
47
- className: e.item,
48
- onClick: () => S(n.value),
49
- children: [n.icon, n.label && /* @__PURE__ */ o("span", { children: n.label })]
50
- }, n.value);
51
- })
52
- });
53
- });
54
- //#endregion
55
- export { l as ToggleGroup };
1
+ "use client";import e from"./toggle-group.module.js";import{forwardRef as t}from"react";import{cn as n,useControllableSignal as r,useRovingFocus as i,useSignals as a}from"@cascivo/core";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c(e,t){return Array.isArray(e)?e.includes(t):e===t}var l=t(function({type:t,value:l,defaultValue:u,onValueChange:d,items:f,orientation:p=`horizontal`,size:m=`md`,disabled:h=!1,className:g,..._},v){a();let[y,b]=r({value:l,defaultValue:u??(t===`multiple`?[]:``),onChange:d}),x=i({orientation:p,loop:!0}),S=e=>{let n=y.value;if(t===`multiple`){let t=Array.isArray(n)?n:[];b(t.includes(e)?t.filter(t=>t!==e):[...t,e])}else b(n===e?``:e)};return o(`div`,{role:t===`single`?`radiogroup`:`group`,"data-orientation":p,"data-size":m,className:n(e.toggleGroup,g),ref:v,..._,children:f.map((n,r)=>{let i=c(y.value,n.value),a=h||n.disabled,{ref:l,...u}=x.getItemProps(r);return s(`button`,{type:`button`,...t===`single`?{role:`radio`,"aria-checked":i}:{"aria-pressed":i},...u,ref:l,"data-state":i?`on`:`off`,disabled:a,"aria-label":n.icon&&!n.label?n.value:void 0,className:e.item,onClick:()=>S(n.value),children:[n.icon,n.label&&o(`span`,{children:n.label})]},n.value)})})});export{l as ToggleGroup};
@@ -1,6 +1 @@
1
- var e = {
2
- toggleGroup: "_toggleGroup_s4o5x_2",
3
- item: "_item_s4o5x_33"
4
- };
5
- //#endregion
6
- export { e as default };
1
+ var e={toggleGroup:`_toggleGroup_s4o5x_2`,item:`_item_s4o5x_33`};export{e as default};
@@ -1,49 +1 @@
1
- "use client";
2
-
3
- import e from "./toggletip.module.js";
4
- import { useId as t, useRef as n } from "react";
5
- import { DismissableLayer as r, cn as i, useAnchorPosition as a, useControllableSignal as o, useSignals as s } from "@cascivo/core";
6
- import { builtin as c, t as l } from "@cascivo/i18n";
7
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
- //#region ../components/src/toggletip/toggletip.tsx
9
- function f({ trigger: f, children: p, placement: m = "top", defaultOpen: h = !1, open: g, onOpenChange: _, labels: v, className: y }) {
10
- s();
11
- let [b, x] = o({
12
- ...g !== void 0 && { value: g },
13
- defaultValue: h,
14
- ..._ && { onChange: _ }
15
- }), S = n(null), C = n(null), w = t(), { anchorStyle: T, floatingStyle: E } = a({
16
- anchorRef: S,
17
- floatingRef: C,
18
- placement: m,
19
- enabled: b
20
- });
21
- return /* @__PURE__ */ d("span", {
22
- className: i(e.root, y),
23
- children: [/* @__PURE__ */ u("button", {
24
- ref: S,
25
- type: "button",
26
- className: e.trigger,
27
- "aria-expanded": b.value,
28
- "aria-controls": w,
29
- "aria-label": v?.label ?? l(c.toggletip.label),
30
- style: T,
31
- onClick: () => x(!b.value),
32
- children: f
33
- }), b.value ? /* @__PURE__ */ u(r, {
34
- onDismiss: () => x(!1),
35
- children: /* @__PURE__ */ u("div", {
36
- ref: C,
37
- id: w,
38
- role: "status",
39
- "data-state": "open",
40
- "data-placement": m,
41
- className: e.bubble,
42
- style: E,
43
- children: p
44
- })
45
- }) : null]
46
- });
47
- }
48
- //#endregion
49
- export { f as Toggletip };
1
+ "use client";import e from"./toggletip.module.js";import{useId as t,useRef as n}from"react";import{DismissableLayer as r,cn as i,useAnchorPosition as a,useControllableSignal as o,useSignals as s}from"@cascivo/core";import{builtin as c,t as l}from"@cascivo/i18n";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f({trigger:f,children:p,placement:m=`top`,defaultOpen:h=!1,open:g,onOpenChange:_,labels:v,className:y}){s();let[b,x]=o({...g!==void 0&&{value:g},defaultValue:h,..._&&{onChange:_}}),S=n(null),C=n(null),w=t(),{anchorStyle:T,floatingStyle:E}=a({anchorRef:S,floatingRef:C,placement:m,enabled:b});return d(`span`,{className:i(e.root,y),children:[u(`button`,{ref:S,type:`button`,className:e.trigger,"aria-expanded":b.value,"aria-controls":w,"aria-label":v?.label??l(c.toggletip.label),style:T,onClick:()=>x(!b.value),children:f}),b.value?u(r,{onDismiss:()=>x(!1),children:u(`div`,{ref:C,id:w,role:`status`,"data-state":`open`,"data-placement":m,className:e.bubble,style:E,children:p})}):null]})}export{f as Toggletip};
@@ -1,7 +1 @@
1
- var e = {
2
- root: "_root_1t09l_2",
3
- trigger: "_trigger_1t09l_7",
4
- bubble: "_bubble_1t09l_28"
5
- };
6
- //#endregion
7
- export { e as default };
1
+ var e={root:`_root_1t09l_2`,trigger:`_trigger_1t09l_7`,bubble:`_bubble_1t09l_28`};export{e as default};