@cascivo/react 1.0.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 +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 +772 -25
  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.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 -39
  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 -272
  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 -170
  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 -398
  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 -224
  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 -110
  293. package/dist/node/dropdown/dropdown.module.js +1 -9
  294. package/dist/node/editable/editable.js +1 -76
  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 -53
  301. package/dist/node/field/field.module.js +1 -7
  302. package/dist/node/file-uploader/file-uploader.js +1 -123
  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 -56
  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 -148
  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 -49
  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 -96
  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 -73
  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 -30
  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 -68
  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 -58
  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 -64
  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 -42
  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 -148
  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 -49
  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 -96
  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 -73
  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 -30
  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 -68
  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 -58
  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 -64
  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 -42
  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 +3 -3
  645. package/readme.body.md +3 -2
@@ -1,199 +1 @@
1
- "use client";
2
-
3
- import e from "./calendar.module.js";
4
- import { batch as t, cn as n, useControllableSignal as r, useSignal as i, useSignals as a } from "@cascivo/core";
5
- import { builtin as o, currentLocale as s, t as c } from "@cascivo/i18n";
6
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
- //#region ../components/src/calendar/calendar.tsx
8
- function d(e) {
9
- try {
10
- let t = new Intl.Locale(e).weekInfo;
11
- if (t) return t.firstDay % 7;
12
- } catch {}
13
- return 1;
14
- }
15
- function f(e, t, n) {
16
- let r = new Date(Date.UTC(e, t, 1)), i = new Date(Date.UTC(e, t + 1, 0)), a = (r.getUTCDay() - n + 7) % 7, o = [];
17
- for (let e = 0; e < a; e++) o.push(null);
18
- for (let n = 1; n <= i.getUTCDate(); n++) o.push(new Date(Date.UTC(e, t, n)));
19
- for (; o.length % 7 != 0;) o.push(null);
20
- let s = [];
21
- for (let e = 0; e < o.length; e += 7) s.push(o.slice(e, e + 7));
22
- return s;
23
- }
24
- function p(e) {
25
- return `${e.getUTCFullYear()}-${e.getUTCMonth()}-${e.getUTCDate()}`;
26
- }
27
- function m(e, t) {
28
- return !e || !t ? !1 : p(e) === p(t);
29
- }
30
- function h(e, t) {
31
- return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate() + t));
32
- }
33
- function g(e, t) {
34
- return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth() + t, e.getUTCDate()));
35
- }
36
- function _(e, t) {
37
- return h(e, -((e.getUTCDay() - t + 7) % 7));
38
- }
39
- function v(e, t, n) {
40
- if (t) {
41
- let n = new Date(Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()));
42
- if (e.getTime() < n.getTime()) return !0;
43
- }
44
- if (n) {
45
- let t = new Date(Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()));
46
- if (e.getTime() > t.getTime()) return !0;
47
- }
48
- return !1;
49
- }
50
- function y({ value: p, defaultValue: y, onValueChange: b, min: x, max: S, disabled: C, locale: w, size: T = "md", labels: E, className: D, isInRange: O, isRangeStart: k, isRangeEnd: A, onDayHover: j, month: M, year: N, onViewChange: P, hideNav: F = !1 }) {
51
- a();
52
- let I = w ?? s(), L = E?.previousMonth ?? c(o.calendar.previousMonth), R = E?.nextMonth ?? c(o.calendar.nextMonth), z = p === void 0 ? y ?? null : p, B = /* @__PURE__ */ new Date(), V = z ?? y ?? B, [H] = r({
53
- value: N,
54
- defaultValue: V.getUTCFullYear()
55
- }), [U] = r({
56
- value: M,
57
- defaultValue: V.getUTCMonth()
58
- }), W = i(V), G = d(I), K = f(H.value, U.value, G), q = new Intl.DateTimeFormat(I, { weekday: "short" }), J = Array.from({ length: 7 }, (e, t) => {
59
- let n = new Date(Date.UTC(2024, 0, 7 + G + t));
60
- return q.format(n);
61
- }), ee = new Intl.DateTimeFormat(I, {
62
- weekday: "long",
63
- year: "numeric",
64
- month: "long",
65
- day: "numeric"
66
- }), Y = new Intl.DateTimeFormat(I, {
67
- month: "long",
68
- year: "numeric"
69
- }).format(new Date(Date.UTC(H.value, U.value, 1))), X = (e) => v(e, x, S) || (C ? C(e) : !1), Z = M !== void 0 || N !== void 0, te = (e) => {
70
- Z ? W.value = e : t(() => {
71
- H.value = e.getUTCFullYear(), U.value = e.getUTCMonth(), W.value = e;
72
- }), P?.({
73
- month: e.getUTCMonth(),
74
- year: e.getUTCFullYear()
75
- });
76
- }, Q = (e) => {
77
- X(e) || b?.(e);
78
- }, $ = (e) => {
79
- let n = g(new Date(Date.UTC(H.value, U.value, 1)), e), r = n.getUTCMonth(), i = n.getUTCFullYear();
80
- Z || t(() => {
81
- U.value = r, H.value = i;
82
- }), P?.({
83
- month: r,
84
- year: i
85
- });
86
- };
87
- return /* @__PURE__ */ u("div", {
88
- className: n(e.calendar, D),
89
- "data-size": T,
90
- onMouseLeave: () => j?.(null),
91
- children: [/* @__PURE__ */ u("div", {
92
- className: e.header,
93
- children: [
94
- F ? /* @__PURE__ */ l("span", { className: e.navSpacer }) : /* @__PURE__ */ l("button", {
95
- type: "button",
96
- className: e.navButton,
97
- "aria-label": L,
98
- onClick: () => $(-1),
99
- children: "‹"
100
- }),
101
- /* @__PURE__ */ l("span", {
102
- className: e.monthLabel,
103
- "aria-live": "polite",
104
- children: Y
105
- }),
106
- F ? /* @__PURE__ */ l("span", { className: e.navSpacer }) : /* @__PURE__ */ l("button", {
107
- type: "button",
108
- className: e.navButton,
109
- "aria-label": R,
110
- onClick: () => $(1),
111
- children: "›"
112
- })
113
- ]
114
- }), /* @__PURE__ */ u("table", {
115
- role: "grid",
116
- "aria-label": Y,
117
- className: e.grid,
118
- onKeyDown: (e) => {
119
- let t = W.value, n;
120
- switch (e.key) {
121
- case "ArrowRight":
122
- n = h(t, 1);
123
- break;
124
- case "ArrowLeft":
125
- n = h(t, -1);
126
- break;
127
- case "ArrowDown":
128
- n = h(t, 7);
129
- break;
130
- case "ArrowUp":
131
- n = h(t, -7);
132
- break;
133
- case "Home":
134
- n = _(t, G);
135
- break;
136
- case "End":
137
- n = h(_(t, G), 6);
138
- break;
139
- case "PageUp":
140
- n = g(t, e.shiftKey ? -12 : -1);
141
- break;
142
- case "PageDown":
143
- n = g(t, e.shiftKey ? 12 : 1);
144
- break;
145
- case "Enter":
146
- case " ":
147
- e.preventDefault(), Q(t);
148
- return;
149
- default: return;
150
- }
151
- e.preventDefault(), te(n), j?.(n);
152
- },
153
- children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", {
154
- role: "row",
155
- children: J.map((t) => /* @__PURE__ */ l("th", {
156
- className: e.weekday,
157
- abbr: t,
158
- scope: "col",
159
- children: t
160
- }, t))
161
- }) }), /* @__PURE__ */ l("tbody", { children: K.map((t, n) => /* @__PURE__ */ l("tr", {
162
- role: "row",
163
- children: t.map((t, n) => {
164
- if (!t) return /* @__PURE__ */ l("td", {
165
- role: "gridcell",
166
- className: e.empty
167
- }, n);
168
- let r = m(t, z), i = m(t, B), a = m(t, W.value), o = X(t), s = O ? O(t) : !1, c = k ? k(t) : !1, u = A ? A(t) : !1;
169
- return /* @__PURE__ */ l("td", {
170
- role: "gridcell",
171
- className: e.cell,
172
- "aria-selected": r,
173
- children: /* @__PURE__ */ l("button", {
174
- type: "button",
175
- className: e.day,
176
- tabIndex: a ? 0 : -1,
177
- "aria-label": ee.format(t),
178
- "aria-current": i ? "date" : void 0,
179
- "aria-disabled": o || void 0,
180
- "data-selected": r || void 0,
181
- "data-today": i || void 0,
182
- "data-in-range": s || void 0,
183
- "data-range-start": c || void 0,
184
- "data-range-end": u || void 0,
185
- onClick: () => Q(t),
186
- onFocus: () => {
187
- W.value = t;
188
- },
189
- onMouseEnter: () => j?.(t),
190
- children: t.getUTCDate()
191
- })
192
- }, n);
193
- })
194
- }, n)) })]
195
- })]
196
- });
197
- }
198
- //#endregion
199
- export { y as Calendar };
1
+ "use client";import{addDays as e,dayKey as t,getMonthGrid as n,getWeekStart as r,isoWeek as i,localToday as a,moveByDays as o,moveByMonths as s,outOfRange as ee,sameDay as c,startOfWeek as l,viewStepBlocked as u}from"./calendar-date.js";import d from"./calendar.module.js";import{useRef as f}from"react";import{batch as p,cn as te,focusElement as ne,useSignal as m,useSignalEffect as re,useSignals as ie}from"@cascivo/core";import{builtin as h,currentLocale as ae,t as g}from"@cascivo/i18n";import{jsx as _,jsxs as v}from"react/jsx-runtime";function y({value:y,defaultValue:b,onValueChange:x,min:S,max:C,disabled:w,locale:oe,size:se=`md`,labels:T,className:ce,ariaLabel:le,label:ue,isInRange:de,isRangeStart:E,isRangeEnd:fe,onDayHover:D,month:O,year:k,onViewChange:A,hideNav:j=!1,showToday:pe=!1,showWeekNumbers:M=!1}){ie();let N=oe??ae(),P=f(null),me=T?.previousMonth??g(h.calendar.previousMonth),he=T?.nextMonth??g(h.calendar.nextMonth),F=T?.today??g(h.calendar.today),I=T?.weekNumber??g(h.calendar.weekNumber),L=y===void 0?b??null:y,R=a(),z=L??b??R,B=m(z.getUTCFullYear()),V=m(z.getUTCMonth()),H=m(z),U=m(null),W=O!==void 0||k!==void 0;k!==void 0&&B.peek()!==k&&(B.value=k),O!==void 0&&V.peek()!==O&&(V.value=O);let G=f(L?t(L):null),K=L?t(L):null;K!==G.current&&(G.current=K,L&&!W&&p(()=>{B.value=L.getUTCFullYear(),V.value=L.getUTCMonth(),H.value=L}));let q=r(N),ge=n(B.value,V.value,q),_e=new Intl.DateTimeFormat(N,{weekday:`short`}),ve=Array.from({length:7},(e,t)=>{let n=new Date(Date.UTC(2024,0,7+q+t));return _e.format(n)}),ye=new Intl.DateTimeFormat(N,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`}),J=new Intl.DateTimeFormat(N,{month:`long`,year:`numeric`}).format(new Date(Date.UTC(B.value,V.value,1))),Y=e=>ee(e,S,C)||(w?w(e):!1),X={min:S,max:C,isDisabled:w},Z=e=>{let n=e.getUTCMonth()!==V.peek()||e.getUTCFullYear()!==B.peek();W?H.value=e:p(()=>{B.value=e.getUTCFullYear(),V.value=e.getUTCMonth(),H.value=e}),U.value=t(e),n&&A?.({month:e.getUTCMonth(),year:e.getUTCFullYear()})};re(()=>{let e=U.value;if(!e)return;let t=setTimeout(()=>{U.value=null,ne(P.current?.querySelector(`[data-day="${e}"]`)??null)},0);return()=>clearTimeout(t)});let Q=e=>{Y(e)||(H.value=e,x?.(e))},$=e=>{let t=B.peek(),n=V.peek();if(u(t,n,e,S,C))return;let r=((n+e)%12+12)%12,i=t+Math.floor((n+e)/12);W||p(()=>{V.value=r,B.value=i}),A?.({month:r,year:i})},be=()=>{Y(R)||Z(R)},xe=t=>{let n=H.value,r;switch(t.key){case`ArrowRight`:r=o(n,1,X);break;case`ArrowLeft`:r=o(n,-1,X);break;case`ArrowDown`:r=o(n,7,X);break;case`ArrowUp`:r=o(n,-7,X);break;case`Home`:{let e=l(n,q);r=Y(e)?o(e,1,X):e;break}case`End`:{let t=e(l(n,q),6);r=Y(t)?o(t,-1,X):t;break}case`PageUp`:r=s(n,t.shiftKey?-12:-1,X);break;case`PageDown`:r=s(n,t.shiftKey?12:1,X);break;case`Enter`:case` `:t.preventDefault(),Q(n);return;default:return}t.preventDefault(),r&&(Z(r),D?.(r))},Se=u(B.value,V.value,-1,S,C),Ce=u(B.value,V.value,1,S,C);return v(`div`,{className:te(d.calendar,ce),"data-size":se,onMouseLeave:()=>D?.(null),children:[v(`div`,{className:d.header,children:[j?_(`span`,{className:d.navSpacer}):_(`button`,{type:`button`,className:d.navButton,"aria-label":me,disabled:Se,onClick:()=>$(-1),children:_(`span`,{"aria-hidden":`true`,children:`‹`})}),_(`span`,{className:d.monthLabel,children:J}),j?_(`span`,{className:d.navSpacer}):_(`button`,{type:`button`,className:d.navButton,"aria-label":he,disabled:Ce,onClick:()=>$(1),children:_(`span`,{"aria-hidden":`true`,children:`›`})})]}),v(`table`,{ref:P,role:`grid`,"aria-label":le??ue??J,className:d.grid,onKeyDown:xe,children:[_(`thead`,{children:v(`tr`,{role:`row`,children:[M&&_(`th`,{className:d.weekday,scope:`col`,children:_(`span`,{className:d.srOnly,children:I})}),ve.map(e=>_(`th`,{className:d.weekday,abbr:e,scope:`col`,children:e},e))]})}),_(`tbody`,{children:ge.map((e,n)=>{let r=e.find(Boolean);return v(`tr`,{role:`row`,children:[M&&_(`th`,{scope:`row`,className:d.weekNumber,children:r?i(r):``}),e.map((e,n)=>{if(!e)return _(`td`,{role:`gridcell`,className:d.empty},n);let r=c(e,L),i=c(e,R),a=c(e,H.value),o=Y(e);return _(`td`,{role:`gridcell`,className:d.cell,children:_(`button`,{type:`button`,className:d.day,"data-day":t(e),tabIndex:a?0:-1,"aria-label":ye.format(e),"aria-selected":r||void 0,"aria-current":i?`date`:void 0,"aria-disabled":o||void 0,"data-selected":r||void 0,"data-today":i||void 0,"data-in-range":(de?.(e)??!1)||void 0,"data-range-start":(E?.(e)??!1)||void 0,"data-range-end":(fe?.(e)??!1)||void 0,onClick:()=>Q(e),onFocus:()=>{H.value=e},onMouseEnter:()=>D?.(e),children:e.getUTCDate()})},n)})]},n)})})]}),pe&&_(`div`,{className:d.footer,children:_(`button`,{type:`button`,className:d.todayButton,disabled:Y(R),onClick:be,children:F})}),_(`span`,{className:d.srOnly,role:`status`,"aria-live":`polite`,children:J})]})}export{y as Calendar};
@@ -1,15 +1,2 @@
1
1
  import './calendar.css';
2
- var e = {
3
- calendar: "_calendar_7pqxh_2",
4
- header: "_header_7pqxh_33",
5
- monthLabel: "_monthLabel_7pqxh_40",
6
- navButton: "_navButton_7pqxh_46",
7
- navSpacer: "_navSpacer_7pqxh_69",
8
- grid: "_grid_7pqxh_74",
9
- weekday: "_weekday_7pqxh_79",
10
- cell: "_cell_7pqxh_88",
11
- empty: "_empty_7pqxh_99",
12
- day: "_day_7pqxh_104"
13
- };
14
- //#endregion
15
- export { e as default };
2
+ var e={calendar:`_calendar_7zg07_2`,header:`_header_7zg07_33`,monthLabel:`_monthLabel_7zg07_40`,navButton:`_navButton_7zg07_46`,navSpacer:`_navSpacer_7zg07_69`,grid:`_grid_7zg07_74`,weekday:`_weekday_7zg07_79`,cell:`_cell_7zg07_88`,empty:`_empty_7zg07_99`,day:`_day_7zg07_104`,srOnly:`_srOnly_7zg07_143`,weekNumber:`_weekNumber_7zg07_155`,footer:`_footer_7zg07_163`,todayButton:`_todayButton_7zg07_170`};export{e as default};
package/dist/card/card.js CHANGED
@@ -1,53 +1 @@
1
- import e from "./card.module.js";
2
- import { cn as t } from "@cascivo/core/pure";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- //#region ../components/src/card/card.tsx
5
- function i({ variant: r = "default", padding: i = "md", className: a, children: o, ...s }) {
6
- return /* @__PURE__ */ n("div", {
7
- "data-variant": r,
8
- "data-padding": i,
9
- className: t(e.card, a),
10
- ...s,
11
- children: o
12
- });
13
- }
14
- function a({ actions: i, className: a, children: o, ...s }) {
15
- return i === void 0 ? /* @__PURE__ */ n("div", {
16
- className: t(e.header, a),
17
- ...s,
18
- children: o
19
- }) : /* @__PURE__ */ r("div", {
20
- className: t(e.header, e.headerRow, a),
21
- ...s,
22
- children: [/* @__PURE__ */ n("div", {
23
- className: e.headerMain,
24
- children: o
25
- }), /* @__PURE__ */ n("div", {
26
- className: e.headerActions,
27
- children: i
28
- })]
29
- });
30
- }
31
- function o({ className: r, children: i, ...a }) {
32
- return /* @__PURE__ */ n("h3", {
33
- className: t(e.title, r),
34
- ...a,
35
- children: i
36
- });
37
- }
38
- function s({ className: r, children: i, ...a }) {
39
- return /* @__PURE__ */ n("div", {
40
- className: t(e.content, r),
41
- ...a,
42
- children: i
43
- });
44
- }
45
- function c({ className: r, children: i, ...a }) {
46
- return /* @__PURE__ */ n("div", {
47
- className: t(e.footer, r),
48
- ...a,
49
- children: i
50
- });
51
- }
52
- //#endregion
53
- export { i as Card, s as CardContent, c as CardFooter, a as CardHeader, o as CardTitle };
1
+ import e from"./card.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({variant:r=`default`,padding:i=`md`,className:a,children:o,...s}){return n(`div`,{"data-cascivo-card":``,"data-variant":r,"data-padding":i,className:t(e.card,a),...s,children:o})}function a({actions:i,className:a,children:o,...s}){return i===void 0?n(`div`,{className:t(e.header,a),...s,children:o}):r(`div`,{className:t(e.header,e.headerRow,a),...s,children:[n(`div`,{className:e.headerMain,children:o}),n(`div`,{className:e.headerActions,children:i})]})}function o({className:r,children:i,...a}){return n(`h3`,{className:t(e.title,r),...a,children:i})}function s({className:r,children:i,...a}){return n(`div`,{className:t(e.content,r),...a,children:i})}function c({className:r,children:i,...a}){return n(`div`,{className:t(e.footer,r),...a,children:i})}export{i as Card,s as CardContent,c as CardFooter,a as CardHeader,o as CardTitle};
@@ -1,13 +1,2 @@
1
1
  import './card.css';
2
- var e = {
3
- card: "_card_ipz9f_2",
4
- header: "_header_ipz9f_19",
5
- content: "_content_ipz9f_19",
6
- footer: "_footer_ipz9f_19",
7
- headerRow: "_headerRow_ipz9f_74",
8
- headerMain: "_headerMain_ipz9f_82",
9
- headerActions: "_headerActions_ipz9f_89",
10
- title: "_title_ipz9f_97"
11
- };
12
- //#endregion
13
- export { e as default };
2
+ var e={card:`_card_ipz9f_2`,header:`_header_ipz9f_19`,content:`_content_ipz9f_19`,footer:`_footer_ipz9f_19`,headerRow:`_headerRow_ipz9f_74`,headerMain:`_headerMain_ipz9f_82`,headerActions:`_headerActions_ipz9f_89`,title:`_title_ipz9f_97`};export{e as default};
@@ -1 +1 @@
1
- @layer cascivo.component{._carousel_1dvrl_2{gap:var(--cascivo-space-3);flex-direction:column;inline-size:100%;display:flex}._viewport_1dvrl_9{align-items:center;display:flex;position:relative}._track_1dvrl_15{scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:var(--cascivo-radius-md);inline-size:100%;display:flex;overflow-x:auto}._track_1dvrl_15::-webkit-scrollbar{display:none}._slide_1dvrl_28{scroll-snap-align:center;scroll-snap-stop:always;flex:0 0 100%;inline-size:100%}._nav_1dvrl_35{z-index:1;block-size:2.25rem;inline-size:2.25rem;color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-full);box-shadow:var(--cascivo-shadow-sm);cursor:pointer;justify-content:center;align-items:center;display:inline-flex;position:absolute}._nav_1dvrl_35:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._nav_1dvrl_35:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._nav_1dvrl_35:disabled{opacity:.4;cursor:not-allowed}._prev_1dvrl_65{inset-inline-start:var(--cascivo-space-2)}._next_1dvrl_69{inset-inline-end:var(--cascivo-space-2)}._dots_1dvrl_73{justify-content:center;align-items:center;gap:var(--cascivo-space-2);display:flex}._dot_1dvrl_73{border-radius:var(--cascivo-radius-full);background-color:var(--cascivo-color-border-strong);cursor:pointer;block-size:.625rem;inline-size:.625rem;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out);border:none;padding:0}._dot_1dvrl_73[data-active]{background-color:var(--cascivo-color-accent)}._dot_1dvrl_73:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}}@media (prefers-reduced-motion:reduce){._track_1dvrl_15{scroll-behavior:auto}}@media (forced-colors:active){._nav_1dvrl_35:focus-visible,._dot_1dvrl_73:focus-visible{outline-offset:2px;outline:2px solid highlight}._dot_1dvrl_73[data-active]{background-color:highlight}}
1
+ @layer cascivo.component{._carousel_1j5w5_2{gap:var(--cascivo-space-3);flex-direction:column;inline-size:100%;display:flex}._viewport_1j5w5_9{align-items:center;display:flex;position:relative}._track_1j5w5_15{scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:var(--cascivo-radius-md);inline-size:100%;display:flex;overflow-x:auto}._track_1j5w5_15::-webkit-scrollbar{display:none}._slide_1j5w5_28{scroll-snap-align:center;scroll-snap-stop:always;flex:0 0 100%;inline-size:100%}._nav_1j5w5_35{z-index:1;block-size:2.25rem;inline-size:2.25rem;color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-full);box-shadow:var(--cascivo-shadow-sm);cursor:pointer;justify-content:center;align-items:center;display:inline-flex;position:absolute}._nav_1j5w5_35:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._nav_1j5w5_35:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._nav_1j5w5_35:disabled{opacity:.4;cursor:not-allowed}._prev_1j5w5_65{inset-inline-start:var(--cascivo-space-2)}._next_1j5w5_69{inset-inline-end:var(--cascivo-space-2)}._controls_1j5w5_73{justify-content:center;align-items:center;gap:var(--cascivo-space-3);display:flex}._dots_1j5w5_80{justify-content:center;align-items:center;gap:var(--cascivo-space-2);display:flex}._chevron_1j5w5_87{border-block-end:2px solid;border-inline-end:2px solid;block-size:.5rem;inline-size:.5rem}._chevronPrev_1j5w5_94{translate:.1rem;rotate:135deg}._chevronNext_1j5w5_99{translate:-.1rem;rotate:-45deg}._playPause_1j5w5_104{min-block-size:1.75rem;min-inline-size:1.75rem;color:var(--cascivo-color-text);border-radius:var(--cascivo-radius-full);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}._playPause_1j5w5_104:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._playGlyph_1j5w5_123,._pauseGlyph_1j5w5_124{background-color:currentColor;block-size:.75rem;inline-size:.75rem;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._playGlyph_1j5w5_123{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E")}._pauseGlyph_1j5w5_124{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 5h4v14H6zM14 5h4v14h-4z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 5h4v14H6zM14 5h4v14h-4z'/%3E%3C/svg%3E")}._dot_1j5w5_80{border-radius:var(--cascivo-radius-full);background-color:var(--cascivo-color-border-strong);cursor:pointer;block-size:.625rem;inline-size:.625rem;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out);border:none;padding:0}._dot_1j5w5_80[data-active]{background-color:var(--cascivo-color-accent)}._dot_1j5w5_80:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._dot_1j5w5_80:after{content:"";inline-size:var(--cascivo-target-min,1.5rem);block-size:var(--cascivo-target-min,1.5rem);position:absolute;inset:50% auto auto 50%;translate:-50% -50%}._dot_1j5w5_80{position:relative}@media (pointer:coarse){._nav_1j5w5_35,._playPause_1j5w5_104{min-inline-size:var(--cascivo-target-min-coarse,2.75rem);min-block-size:var(--cascivo-target-min-coarse,2.75rem)}._dot_1j5w5_80:after{inline-size:var(--cascivo-target-min-coarse,2.75rem);block-size:var(--cascivo-target-min-coarse,2.75rem)}}}@media (prefers-reduced-motion:reduce){._track_1j5w5_15{scroll-behavior:auto}}@media (forced-colors:active){._nav_1j5w5_35:focus-visible,._dot_1j5w5_80:focus-visible{outline-offset:2px;outline:2px solid highlight}._dot_1j5w5_80[data-active]{background-color:highlight}}
@@ -1,138 +1 @@
1
- "use client";
2
-
3
- import e from "./carousel.module.js";
4
- import { useId as t, useRef as n } from "react";
5
- import { cn as r, useControllableSignal as i, useRovingFocus as a, useSignalEffect 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/carousel/carousel.tsx
9
- function f(e, t) {
10
- return t || (e == null ? [] : Array.isArray(e) ? e : [e]);
11
- }
12
- function p({ children: p, slides: m, index: h, defaultIndex: g, onIndexChange: _, loop: v = !1, className: y, labels: b }) {
13
- s();
14
- let x = t(), S = f(p, m), C = S.length, [w, T] = i({
15
- value: h,
16
- defaultValue: g ?? 0,
17
- onChange: _
18
- }), E = n(null), D = n([]), O = n(!1), { getItemProps: k, setActiveIndex: A } = a({
19
- orientation: "horizontal",
20
- loop: v
21
- });
22
- o(() => {
23
- let e = E.current;
24
- if (!e) return;
25
- let t = () => {
26
- if (O.current) return;
27
- let t = Math.round(e.scrollLeft / e.clientWidth);
28
- t !== w.value && T(t);
29
- };
30
- return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
31
- });
32
- let j = (e) => {
33
- if (C === 0) return;
34
- let t = e;
35
- t < 0 && (t = v ? C - 1 : 0), t >= C && (t = v ? 0 : C - 1);
36
- let n = E.current;
37
- n && typeof n.scrollTo == "function" && (O.current = !0, n.scrollTo({
38
- left: t * n.clientWidth,
39
- behavior: "smooth"
40
- }), window.setTimeout(() => {
41
- O.current = !1;
42
- }, 400)), T(t), A(t);
43
- }, M = b?.region ?? l(c.carousel.region), N = b?.previous ?? l(c.carousel.previous), P = b?.next ?? l(c.carousel.next);
44
- return /* @__PURE__ */ d("section", {
45
- className: r(e.carousel, y),
46
- "aria-roledescription": "carousel",
47
- "aria-label": M,
48
- children: [/* @__PURE__ */ d("div", {
49
- className: e.viewport,
50
- children: [
51
- /* @__PURE__ */ u("button", {
52
- type: "button",
53
- className: r(e.nav, e.prev),
54
- "aria-label": N,
55
- "aria-controls": `${x}-track`,
56
- disabled: !v && w.value <= 0,
57
- onClick: () => j(w.value - 1),
58
- children: /* @__PURE__ */ u("svg", {
59
- width: "20",
60
- height: "20",
61
- viewBox: "0 0 24 24",
62
- fill: "none",
63
- "aria-hidden": "true",
64
- children: /* @__PURE__ */ u("path", {
65
- d: "m15 18-6-6 6-6",
66
- stroke: "currentColor",
67
- strokeWidth: "2",
68
- strokeLinecap: "round",
69
- strokeLinejoin: "round"
70
- })
71
- })
72
- }),
73
- /* @__PURE__ */ u("div", {
74
- ref: E,
75
- id: `${x}-track`,
76
- className: e.track,
77
- children: S.map((t, n) => /* @__PURE__ */ u("div", {
78
- ref: (e) => {
79
- D.current[n] = e;
80
- },
81
- className: e.slide,
82
- role: "group",
83
- "aria-roledescription": "slide",
84
- "aria-label": l(c.carousel.slide, {
85
- n: n + 1,
86
- total: C
87
- }),
88
- "aria-hidden": n !== w.value || void 0,
89
- children: t
90
- }, n))
91
- }),
92
- /* @__PURE__ */ u("button", {
93
- type: "button",
94
- className: r(e.nav, e.next),
95
- "aria-label": P,
96
- "aria-controls": `${x}-track`,
97
- disabled: !v && w.value >= C - 1,
98
- onClick: () => j(w.value + 1),
99
- children: /* @__PURE__ */ u("svg", {
100
- width: "20",
101
- height: "20",
102
- viewBox: "0 0 24 24",
103
- fill: "none",
104
- "aria-hidden": "true",
105
- children: /* @__PURE__ */ u("path", {
106
- d: "m9 18 6-6-6-6",
107
- stroke: "currentColor",
108
- strokeWidth: "2",
109
- strokeLinecap: "round",
110
- strokeLinejoin: "round"
111
- })
112
- })
113
- })
114
- ]
115
- }), /* @__PURE__ */ u("div", {
116
- className: e.dots,
117
- role: "group",
118
- "aria-label": M,
119
- children: S.map((t, n) => {
120
- let r = k(n);
121
- return /* @__PURE__ */ u("button", {
122
- ref: r.ref,
123
- type: "button",
124
- className: e.dot,
125
- "aria-label": l(c.carousel.goTo, { n: n + 1 }),
126
- "aria-current": n === w.value || void 0,
127
- "data-active": n === w.value || void 0,
128
- tabIndex: r.tabIndex,
129
- onKeyDown: r.onKeyDown,
130
- onFocus: r.onFocus,
131
- onClick: () => j(n)
132
- }, n);
133
- })
134
- })]
135
- });
136
- }
137
- //#endregion
138
- export { p as Carousel };
1
+ "use client";import e from"./carousel.module.js";import{Children as t,useId as n,useRef as r}from"react";import{cn as i,useControllableSignal as a,useMediaQuery as o,useRovingFocus as s,useSignal as c,useSignalEffect as l,useSignals as u}from"@cascivo/core";import{builtin as d,t as f}from"@cascivo/i18n";import{jsx as p,jsxs as m}from"react/jsx-runtime";function h(e,n){return n||t.toArray(e)}function g({children:t,slides:g,index:_,defaultIndex:v,onIndexChange:y,loop:b=!1,autoplay:x,className:S,labels:C}){u();let w=n(),T=h(t,g),E=T.length,[D,O]=a({value:_,defaultValue:v??0,onChange:y}),k=r(null),A=r(!1),j=o(`(prefers-reduced-motion: reduce)`),{getItemProps:M,setActiveIndex:N}=s({orientation:`horizontal`,loop:b});l(()=>{let e=k.current;if(!e)return;let t=()=>{if(A.current||e.clientWidth===0)return;let t=Math.round(e.scrollLeft/e.clientWidth);t!==D.value&&O(t)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)});let P=e=>{if(E===0)return;let t=e;t<0&&(t=b?E-1:0),t>=E&&(t=b?0:E-1);let n=k.current;n&&typeof n.scrollTo==`function`&&n.clientWidth>0&&(A.current=!0,n.scrollTo({left:t*n.clientWidth,behavior:j.value?`auto`:`smooth`}),window.setTimeout(()=>{A.current=!1},400)),O(t),N(t)};l(()=>{N(D.value)});let F=c(x!==void 0&&x>0),I=c(!1);l(()=>{if(!x||x<=0||!F.value||I.value||j.value)return;let e=window.setInterval(()=>{let e=D.peek()+1;P(e>=E?0:e)},x);return()=>window.clearInterval(e)}),l(()=>{if(typeof document>`u`)return;let e=()=>{I.value=document.hidden};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)});let L=C?.region??f(d.carousel.region),R=C?.previous??f(d.carousel.previous),z=C?.next??f(d.carousel.next),B=C?.play??f(d.carousel.play),V=C?.pause??f(d.carousel.pause),H=!!(x&&x>0);return m(`section`,{className:i(e.carousel,S),"aria-roledescription":`carousel`,"aria-label":L,onMouseEnter:()=>{H&&(I.value=!0)},onMouseLeave:()=>{H&&(I.value=!1)},onFocusCapture:()=>{H&&(I.value=!0)},onBlurCapture:e=>{H&&!e.currentTarget.contains(e.relatedTarget)&&(I.value=!1)},children:[m(`div`,{className:e.viewport,children:[p(`button`,{type:`button`,className:i(e.nav,e.prev),"aria-label":R,"aria-controls":`${w}-track`,disabled:!b&&D.value<=0,onClick:()=>P(D.value-1),children:p(`span`,{className:i(e.chevron,e.chevronPrev),"aria-hidden":`true`})}),p(`div`,{ref:k,id:`${w}-track`,className:e.track,"aria-live":H&&F.value&&!I.value?`off`:`polite`,children:T.map((t,n)=>p(`div`,{className:e.slide,role:`group`,"aria-roledescription":`slide`,"aria-label":f(d.carousel.slide,{n:n+1,total:E}),inert:n===D.value?void 0:!0,children:t},n))}),p(`button`,{type:`button`,className:i(e.nav,e.next),"aria-label":z,"aria-controls":`${w}-track`,disabled:!b&&D.value>=E-1,onClick:()=>P(D.value+1),children:p(`span`,{className:i(e.chevron,e.chevronNext),"aria-hidden":`true`})})]}),m(`div`,{className:e.controls,children:[H&&p(`button`,{type:`button`,className:e.playPause,"aria-label":F.value?V:B,onClick:()=>{F.value=!F.value},children:p(`span`,{className:F.value?e.pauseGlyph:e.playGlyph,"aria-hidden":`true`})}),p(`div`,{className:e.dots,role:`group`,"aria-label":f(d.carousel.choose),children:T.map((t,n)=>{let r=M(n);return p(`button`,{ref:r.ref,type:`button`,className:e.dot,"aria-label":f(d.carousel.goTo,{n:n+1}),"aria-current":n===D.value||void 0,"data-active":n===D.value||void 0,tabIndex:r.tabIndex,onKeyDown:r.onKeyDown,onFocus:()=>{r.onFocus?.(),n!==D.value&&P(n)},onClick:()=>P(n)},n)})})]})]})}export{g as Carousel};
@@ -1,14 +1,2 @@
1
1
  import './carousel.css';
2
- var e = {
3
- carousel: "_carousel_1dvrl_2",
4
- viewport: "_viewport_1dvrl_9",
5
- track: "_track_1dvrl_15",
6
- slide: "_slide_1dvrl_28",
7
- nav: "_nav_1dvrl_35",
8
- prev: "_prev_1dvrl_65",
9
- next: "_next_1dvrl_69",
10
- dots: "_dots_1dvrl_73",
11
- dot: "_dot_1dvrl_73"
12
- };
13
- //#endregion
14
- export { e as default };
2
+ var e={carousel:`_carousel_1j5w5_2`,viewport:`_viewport_1j5w5_9`,track:`_track_1j5w5_15`,slide:`_slide_1j5w5_28`,nav:`_nav_1j5w5_35`,prev:`_prev_1j5w5_65`,next:`_next_1j5w5_69`,controls:`_controls_1j5w5_73`,dots:`_dots_1j5w5_80`,chevron:`_chevron_1j5w5_87`,chevronPrev:`_chevronPrev_1j5w5_94`,chevronNext:`_chevronNext_1j5w5_99`,playPause:`_playPause_1j5w5_104`,playGlyph:`_playGlyph_1j5w5_123`,pauseGlyph:`_pauseGlyph_1j5w5_124`,dot:`_dot_1j5w5_80`};export{e as default};
@@ -1,31 +1 @@
1
- import e from "./chat-bubble.module.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- //#region ../components/src/chat-bubble/chat-bubble.tsx
4
- function r({ children: r, side: i = "start", avatar: a, name: o, time: s, className: c }) {
5
- return /* @__PURE__ */ n("div", {
6
- className: [e.bubble, c].filter(Boolean).join(" "),
7
- "data-side": i,
8
- children: [a && /* @__PURE__ */ t("div", {
9
- className: e.avatar,
10
- "aria-hidden": "true",
11
- children: a
12
- }), /* @__PURE__ */ n("div", {
13
- className: e.content,
14
- children: [(o || s) && /* @__PURE__ */ n("div", {
15
- className: e.meta,
16
- children: [o && /* @__PURE__ */ t("span", {
17
- className: e.name,
18
- children: o
19
- }), s && /* @__PURE__ */ t("time", {
20
- className: e.time,
21
- children: s
22
- })]
23
- }), /* @__PURE__ */ t("div", {
24
- className: e.body,
25
- children: r
26
- })]
27
- })]
28
- });
29
- }
30
- //#endregion
31
- export { r as ChatBubble };
1
+ import e from"./chat-bubble.module.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({children:r,side:i=`start`,avatar:a,name:o,time:s,className:c}){return n(`div`,{className:[e.bubble,c].filter(Boolean).join(` `),"data-side":i,children:[a&&t(`div`,{className:e.avatar,"aria-hidden":`true`,children:a}),n(`div`,{className:e.content,children:[(o||s)&&n(`div`,{className:e.meta,children:[o&&t(`span`,{className:e.name,children:o}),s&&t(`time`,{className:e.time,children:s})]}),t(`div`,{className:e.body,children:r})]})]})}export{r as ChatBubble};
@@ -1,12 +1,2 @@
1
1
  import './chat-bubble.css';
2
- var e = {
3
- bubble: "_bubble_ykkyv_2",
4
- avatar: "_avatar_ykkyv_18",
5
- content: "_content_ykkyv_23",
6
- meta: "_meta_ykkyv_32",
7
- name: "_name_ykkyv_40",
8
- time: "_time_ykkyv_44",
9
- body: "_body_ykkyv_48"
10
- };
11
- //#endregion
12
- export { e as default };
2
+ var e={bubble:`_bubble_ykkyv_2`,avatar:`_avatar_ykkyv_18`,content:`_content_ykkyv_23`,meta:`_meta_ykkyv_32`,name:`_name_ykkyv_40`,time:`_time_ykkyv_44`,body:`_body_ykkyv_48`};export{e as default};
@@ -1,39 +1 @@
1
- "use client";
2
-
3
- import e from "./checkbox.module.js";
4
- import { forwardRef as t, useRef as n } from "react";
5
- import { cn as r, composeRefs as i, useEffectPropSignal as a, useSignalEffect as o } from "@cascivo/core";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
- //#region ../components/src/checkbox/checkbox.tsx
8
- var l = t(function({ label: t, indeterminate: l = !1, ariaLabel: u, className: d, id: f, disabled: p, ...m }, h) {
9
- let g = n(null), _ = a(l);
10
- o(() => {
11
- g.current && (g.current.indeterminate = _.value);
12
- });
13
- let v = f ?? (t ? `cascade-checkbox-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0);
14
- return /* @__PURE__ */ c("label", {
15
- className: r(e.wrapper, d),
16
- "data-disabled": p || void 0,
17
- children: [
18
- /* @__PURE__ */ s("input", {
19
- ref: i(h, g),
20
- id: v,
21
- type: "checkbox",
22
- className: e.input,
23
- disabled: p,
24
- ...m,
25
- "aria-label": m["aria-label"] ?? u
26
- }),
27
- /* @__PURE__ */ s("span", {
28
- className: e.control,
29
- "aria-hidden": "true"
30
- }),
31
- t && /* @__PURE__ */ s("span", {
32
- className: e.label,
33
- children: t
34
- })
35
- ]
36
- });
37
- });
38
- //#endregion
39
- export { l as Checkbox };
1
+ "use client";import e from"./checkbox.module.js";import{forwardRef as t,useRef as n}from"react";import{cn as r,composeRefs as i,useEffectPropSignal as a,useSignalEffect as o}from"@cascivo/core";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=t(function({label:t,indeterminate:l=!1,ariaLabel:u,className:d,id:f,disabled:p,...m},h){let g=n(null),_=a(l);o(()=>{g.current&&(g.current.indeterminate=_.value)});let v=f??(t?`cascade-checkbox-${t.toLowerCase().replace(/\s+/g,`-`)}`:void 0);return c(`label`,{className:r(e.wrapper,d),"data-disabled":p||void 0,children:[s(`input`,{ref:i(h,g),id:v,type:`checkbox`,className:e.input,disabled:p,...m,"aria-label":m[`aria-label`]??u}),s(`span`,{className:e.control,"aria-hidden":`true`}),t&&s(`span`,{className:e.label,children:t})]})});export{l as Checkbox};
@@ -1,9 +1,2 @@
1
1
  import './checkbox.css';
2
- var e = {
3
- wrapper: "_wrapper_4zlmw_2",
4
- input: "_input_4zlmw_15",
5
- control: "_control_4zlmw_28",
6
- label: "_label_4zlmw_78"
7
- };
8
- //#endregion
9
- export { e as default };
2
+ var e={wrapper:`_wrapper_4zlmw_2`,input:`_input_4zlmw_15`,control:`_control_4zlmw_28`,label:`_label_4zlmw_78`};export{e as default};
@@ -1 +1 @@
1
- @layer cascivo.component{._card_102u6_2{gap:var(--cascivo-space-3);padding:var(--cascivo-space-4);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-bg);cursor:pointer;align-items:flex-start;transition:border-color .12s,background-color .12s;display:flex}._card_102u6_2:hover:not([data-disabled]){border-color:var(--cascivo-color-border-strong)}._card_102u6_2:has(input:checked){border-color:var(--cascivo-color-accent);background:color-mix(in oklch, var(--cascivo-color-accent) 4%, var(--cascivo-color-bg))}._card_102u6_2:has(input:focus-visible){box-shadow:var(--cascivo-focus-ring)}._card_102u6_2[data-disabled]{opacity:.5;cursor:not-allowed}._input_102u6_34{clip-path:inset(50%);white-space:nowrap;block-size:1px;inline-size:1px;position:absolute;overflow:hidden}._glyph_102u6_43{border:1px solid var(--cascivo-color-border-strong);border-radius:var(--cascivo-radius-indicator);color:#0000;flex:none;place-items:center;block-size:1rem;inline-size:1rem;margin-block-start:2px;transition:all .12s;display:grid}._card_102u6_2:has(input:checked) ._glyph_102u6_43{border-color:var(--cascivo-color-accent);background:var(--cascivo-color-accent);color:var(--cascivo-color-accent-foreground,oklch(100% 0 0))}._check_102u6_62{block-size:.75rem;inline-size:.75rem}._body_102u6_67{gap:var(--cascivo-space-1);flex-direction:column;display:flex}._title_102u6_73{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text)}._description_102u6_79{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle)}}
1
+ @layer cascivo.component{._card_x2x8f_2{gap:var(--cascivo-space-3);padding:var(--cascivo-space-4);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-bg);cursor:pointer;transition:border-color var(--cascivo-duration-100) ease, background-color var(--cascivo-duration-100) ease;align-items:flex-start;display:flex}._card_x2x8f_2:hover:not([data-disabled]){border-color:var(--cascivo-color-border-strong)}._card_x2x8f_2:has(input:checked){border-color:var(--cascivo-color-accent);background:color-mix(in oklch, var(--cascivo-color-accent) 4%, var(--cascivo-color-bg))}._card_x2x8f_2:has(input:focus-visible){box-shadow:var(--cascivo-focus-ring)}._card_x2x8f_2[data-disabled]{opacity:.5;cursor:not-allowed}._input_x2x8f_34{clip-path:inset(50%);white-space:nowrap;block-size:1px;inline-size:1px;position:absolute;overflow:hidden}._glyph_x2x8f_43{border:1px solid var(--cascivo-color-border-strong);border-radius:var(--cascivo-radius-indicator);color:#0000;block-size:1rem;inline-size:1rem;transition:all var(--cascivo-duration-100) ease;flex:none;place-items:center;margin-block-start:2px;display:grid}._card_x2x8f_2:has(input:checked) ._glyph_x2x8f_43{border-color:var(--cascivo-color-accent);background:var(--cascivo-color-accent);color:var(--cascivo-color-accent-foreground,oklch(100% 0 0))}._check_x2x8f_62{block-size:.75rem;inline-size:.75rem}._body_x2x8f_67{gap:var(--cascivo-space-1);flex-direction:column;display:flex}._title_x2x8f_73{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text)}._description_x2x8f_79{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle)}}
@@ -1,50 +1 @@
1
- "use client";
2
-
3
- import e from "./checkbox-card.module.js";
4
- import { forwardRef as t } from "react";
5
- import { cn as n } from "@cascivo/core";
6
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
7
- //#region ../components/src/checkbox-card/checkbox-card.tsx
8
- var a = t(function({ title: t, description: a, checked: o, defaultChecked: s, disabled: c, onCheckedChange: l, className: u, ...d }, f) {
9
- return /* @__PURE__ */ i("label", {
10
- className: n(e.card, u),
11
- "data-disabled": c || void 0,
12
- children: [
13
- /* @__PURE__ */ r("input", {
14
- type: "checkbox",
15
- className: e.input,
16
- disabled: c,
17
- ...o === void 0 ? { defaultChecked: s } : { checked: o },
18
- onChange: (e) => l?.(e.currentTarget.checked),
19
- ref: f,
20
- ...d
21
- }),
22
- /* @__PURE__ */ r("span", {
23
- className: e.glyph,
24
- "aria-hidden": "true",
25
- children: /* @__PURE__ */ r("svg", {
26
- viewBox: "0 0 12 12",
27
- className: e.check,
28
- children: /* @__PURE__ */ r("path", {
29
- d: "M2.5 6.5 5 9l4.5-5.5",
30
- fill: "none",
31
- stroke: "currentColor",
32
- strokeWidth: "1.5"
33
- })
34
- })
35
- }),
36
- /* @__PURE__ */ i("span", {
37
- className: e.body,
38
- children: [/* @__PURE__ */ r("span", {
39
- className: e.title,
40
- children: t
41
- }), a && /* @__PURE__ */ r("span", {
42
- className: e.description,
43
- children: a
44
- })]
45
- })
46
- ]
47
- });
48
- });
49
- //#endregion
50
- export { a as CheckboxCard };
1
+ "use client";import e from"./checkbox-card.module.js";import{forwardRef as t}from"react";import{cn as n}from"@cascivo/core";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({title:t,description:a,checked:o,defaultChecked:s,disabled:c,onCheckedChange:l,className:u,...d},f){return i(`label`,{className:n(e.card,u),"data-disabled":c||void 0,children:[r(`input`,{type:`checkbox`,className:e.input,disabled:c,...o===void 0?{defaultChecked:s}:{checked:o},onChange:e=>l?.(e.currentTarget.checked),ref:f,...d}),r(`span`,{className:e.glyph,"aria-hidden":`true`,children:r(`svg`,{viewBox:`0 0 12 12`,className:e.check,children:r(`path`,{d:`M2.5 6.5 5 9l4.5-5.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`})})}),i(`span`,{className:e.body,children:[r(`span`,{className:e.title,children:t}),a&&r(`span`,{className:e.description,children:a})]})]})});export{a as CheckboxCard};
@@ -1,12 +1,2 @@
1
1
  import './checkbox-card.css';
2
- var e = {
3
- card: "_card_102u6_2",
4
- input: "_input_102u6_34",
5
- glyph: "_glyph_102u6_43",
6
- check: "_check_102u6_62",
7
- body: "_body_102u6_67",
8
- title: "_title_102u6_73",
9
- description: "_description_102u6_79"
10
- };
11
- //#endregion
12
- export { e as default };
2
+ var e={card:`_card_x2x8f_2`,input:`_input_x2x8f_34`,glyph:`_glyph_x2x8f_43`,check:`_check_x2x8f_62`,body:`_body_x2x8f_67`,title:`_title_x2x8f_73`,description:`_description_x2x8f_79`};export{e as default};