@cascivo/react 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (646) hide show
  1. package/README.md +5 -4
  2. package/dist/accordion/accordion.js +1 -114
  3. package/dist/accordion/accordion.module.js +1 -10
  4. package/dist/action-sheet/action-sheet.css +1 -1
  5. package/dist/action-sheet/action-sheet.js +1 -91
  6. package/dist/action-sheet/action-sheet.module.js +1 -12
  7. package/dist/alert/alert.js +1 -55
  8. package/dist/alert/alert.module.js +1 -11
  9. package/dist/alert-dialog/alert-dialog.css +1 -1
  10. package/dist/alert-dialog/alert-dialog.js +1 -66
  11. package/dist/alert-dialog/alert-dialog.module.js +1 -11
  12. package/dist/app-shell/app-shell.css +1 -1
  13. package/dist/app-shell/app-shell.js +1 -85
  14. package/dist/app-shell/app-shell.module.js +1 -12
  15. package/dist/aspect-ratio/aspect-ratio.js +1 -20
  16. package/dist/aspect-ratio/aspect-ratio.module.js +1 -6
  17. package/dist/avatar/avatar.js +1 -57
  18. package/dist/avatar/avatar.module.js +1 -8
  19. package/dist/avatar-group/avatar-group.js +1 -24
  20. package/dist/avatar-group/avatar-group.module.js +1 -6
  21. package/dist/badge/badge.js +1 -22
  22. package/dist/badge/badge.module.js +1 -3
  23. package/dist/blockquote/blockquote.js +1 -16
  24. package/dist/blockquote/blockquote.module.js +1 -6
  25. package/dist/bottom-sheet/bottom-sheet.js +1 -111
  26. package/dist/bottom-sheet/bottom-sheet.module.js +1 -14
  27. package/dist/brand/logo/logo.css +1 -0
  28. package/dist/brand/logo/logo.js +1 -0
  29. package/dist/brand/logo/logo.module.js +2 -0
  30. package/dist/breadcrumb/breadcrumb.js +1 -28
  31. package/dist/breadcrumb/breadcrumb.module.js +1 -3
  32. package/dist/button/button.css +1 -1
  33. package/dist/button/button.js +1 -35
  34. package/dist/button/button.module.js +1 -6
  35. package/dist/button-group/button-group.js +1 -39
  36. package/dist/button-group/button-group.module.js +1 -3
  37. package/dist/calendar/calendar-date.js +1 -0
  38. package/dist/calendar/calendar.css +1 -1
  39. package/dist/calendar/calendar.js +1 -199
  40. package/dist/calendar/calendar.module.js +1 -14
  41. package/dist/card/card.js +1 -53
  42. package/dist/card/card.module.js +1 -12
  43. package/dist/carousel/carousel.css +1 -1
  44. package/dist/carousel/carousel.js +1 -138
  45. package/dist/carousel/carousel.module.js +1 -13
  46. package/dist/chat-bubble/chat-bubble.js +1 -31
  47. package/dist/chat-bubble/chat-bubble.module.js +1 -11
  48. package/dist/checkbox/checkbox.js +1 -39
  49. package/dist/checkbox/checkbox.module.js +1 -8
  50. package/dist/checkbox-card/checkbox-card.css +1 -1
  51. package/dist/checkbox-card/checkbox-card.js +1 -50
  52. package/dist/checkbox-card/checkbox-card.module.js +1 -11
  53. package/dist/code/code.js +1 -14
  54. package/dist/code/code.module.js +1 -3
  55. package/dist/code-snippet/code-snippet.js +2 -121
  56. package/dist/code-snippet/code-snippet.module.js +1 -17
  57. package/dist/code-snippet/highlight.js +1 -67
  58. package/dist/collapsible/collapsible.js +1 -47
  59. package/dist/collapsible/collapsible.module.js +1 -7
  60. package/dist/color-picker/color-picker.css +1 -1
  61. package/dist/color-picker/color-picker.js +1 -272
  62. package/dist/color-picker/color-picker.module.js +1 -18
  63. package/dist/color-picker/color.js +1 -0
  64. package/dist/combobox/combobox.css +1 -1
  65. package/dist/combobox/combobox.js +1 -170
  66. package/dist/combobox/combobox.module.js +1 -19
  67. package/dist/combobox/list-nav.js +1 -0
  68. package/dist/combobox/option-list.js +1 -0
  69. package/dist/command-menu/command-menu.js +1 -421
  70. package/dist/command-menu/command-menu.module.js +1 -34
  71. package/dist/comparison/comparison.js +1 -69
  72. package/dist/comparison/comparison.module.js +1 -9
  73. package/dist/contained-list/contained-list.js +1 -41
  74. package/dist/contained-list/contained-list.module.js +1 -11
  75. package/dist/context-menu/context-menu.js +1 -93
  76. package/dist/context-menu/context-menu.module.js +1 -7
  77. package/dist/copy-button/copy-button.js +1 -60
  78. package/dist/copy-button/copy-button.module.js +1 -6
  79. package/dist/data-list/data-list.js +1 -25
  80. package/dist/data-list/data-list.module.js +1 -8
  81. package/dist/data-table/column-filter.js +1 -0
  82. package/dist/data-table/column-layout.js +1 -0
  83. package/dist/data-table/data-table.css +1 -1
  84. package/dist/data-table/data-table.js +1 -398
  85. package/dist/data-table/data-table.module.js +1 -33
  86. package/dist/data-table/grid-keys.js +1 -0
  87. package/dist/data-table/row-group.js +1 -0
  88. package/dist/data-table/row-search.js +1 -0
  89. package/dist/data-table/row-sort.js +1 -0
  90. package/dist/data-table/to-csv.js +3 -0
  91. package/dist/data-table/virtual-window.js +1 -0
  92. package/dist/date-picker/date-picker.css +1 -1
  93. package/dist/date-picker/date-picker.js +1 -224
  94. package/dist/date-picker/date-picker.module.js +1 -23
  95. package/dist/date-picker/parse-date.js +1 -0
  96. package/dist/date-range-picker/date-range-picker.js +1 -196
  97. package/dist/date-range-picker/date-range-picker.module.js +1 -18
  98. package/dist/dock/dock.css +1 -1
  99. package/dist/dock/dock.js +1 -34
  100. package/dist/dock/dock.module.js +1 -8
  101. package/dist/drawer/drawer.js +1 -96
  102. package/dist/drawer/drawer.module.js +1 -13
  103. package/dist/dropdown/dropdown.css +1 -1
  104. package/dist/dropdown/dropdown.js +1 -110
  105. package/dist/dropdown/dropdown.module.js +1 -9
  106. package/dist/editable/editable.js +1 -76
  107. package/dist/editable/editable.module.js +1 -11
  108. package/dist/empty-state/empty-state.js +1 -32
  109. package/dist/empty-state/empty-state.module.js +1 -9
  110. package/dist/fab/fab.css +1 -1
  111. package/dist/fab/fab.js +1 -93
  112. package/dist/fab/fab.module.js +1 -12
  113. package/dist/field/field.css +1 -1
  114. package/dist/field/field.js +1 -53
  115. package/dist/field/field.module.js +1 -7
  116. package/dist/file-uploader/file-uploader.css +1 -1
  117. package/dist/file-uploader/file-uploader.js +1 -123
  118. package/dist/file-uploader/file-uploader.module.js +1 -18
  119. package/dist/filter/filter.css +1 -1
  120. package/dist/filter/filter.js +1 -35
  121. package/dist/filter/filter.module.js +1 -6
  122. package/dist/form/form.js +1 -95
  123. package/dist/form/form.module.js +1 -3
  124. package/dist/header/header.js +1 -44
  125. package/dist/header/header.module.js +1 -11
  126. package/dist/header-panel/header-panel.js +1 -72
  127. package/dist/header-panel/header-panel.module.js +1 -9
  128. package/dist/heading/heading.css +1 -1
  129. package/dist/heading/heading.js +1 -22
  130. package/dist/heading/heading.module.js +1 -3
  131. package/dist/hover-card/hover-card.css +1 -1
  132. package/dist/hover-card/hover-card.js +1 -84
  133. package/dist/hover-card/hover-card.module.js +1 -6
  134. package/dist/icon-button/icon-button.js +1 -19
  135. package/dist/icon-button/icon-button.module.js +1 -3
  136. package/dist/image/image.css +1 -1
  137. package/dist/image/image.js +1 -64
  138. package/dist/image/image.module.js +1 -9
  139. package/dist/index.d.ts +1521 -38
  140. package/dist/indicator/indicator.js +1 -16
  141. package/dist/indicator/indicator.module.js +1 -6
  142. package/dist/infinite-scroll/infinite-scroll.js +1 -49
  143. package/dist/infinite-scroll/infinite-scroll.module.js +1 -7
  144. package/dist/inline-loading/inline-loading.js +1 -74
  145. package/dist/inline-loading/inline-loading.module.js +1 -9
  146. package/dist/input/input.css +1 -1
  147. package/dist/input/input.js +1 -56
  148. package/dist/input/input.module.js +1 -9
  149. package/dist/input-group/input-group.css +1 -1
  150. package/dist/input-group/input-group.js +1 -39
  151. package/dist/input-group/input-group.module.js +1 -9
  152. package/dist/item/item.js +1 -50
  153. package/dist/item/item.module.js +1 -10
  154. package/dist/join/join.js +1 -12
  155. package/dist/join/join.module.js +1 -3
  156. package/dist/kbd/kbd.js +1 -14
  157. package/dist/kbd/kbd.module.js +1 -3
  158. package/dist/label/label.js +1 -23
  159. package/dist/label/label.module.js +1 -7
  160. package/dist/large-title-header/large-title-header.js +1 -38
  161. package/dist/large-title-header/large-title-header.module.js +1 -12
  162. package/dist/layouts/src/auto-grid/auto-grid.js +1 -17
  163. package/dist/layouts/src/auto-grid/auto-grid.module.js +1 -4
  164. package/dist/layouts/src/center/center.js +1 -16
  165. package/dist/layouts/src/center/center.module.js +1 -3
  166. package/dist/layouts/src/columns/columns.js +1 -21
  167. package/dist/layouts/src/columns/columns.module.js +1 -6
  168. package/dist/layouts/src/flex/flex.css +1 -1
  169. package/dist/layouts/src/flex/flex.js +1 -20
  170. package/dist/layouts/src/flex/flex.module.js +1 -3
  171. package/dist/layouts/src/grid/grid.css +1 -1
  172. package/dist/layouts/src/grid/grid.js +1 -55
  173. package/dist/layouts/src/grid/grid.module.js +1 -7
  174. package/dist/layouts/src/page-header/page-header.js +1 -31
  175. package/dist/layouts/src/page-header/page-header.module.js +1 -10
  176. package/dist/layouts/src/spacer/spacer.js +1 -17
  177. package/dist/layouts/src/spacer/spacer.module.js +1 -3
  178. package/dist/link/link.css +1 -1
  179. package/dist/link/link.js +1 -22
  180. package/dist/link/link.module.js +1 -3
  181. package/dist/list/list.js +1 -21
  182. package/dist/list/list.module.js +1 -6
  183. package/dist/log-viewer/log-viewer.css +1 -1
  184. package/dist/log-viewer/log-viewer.js +2 -184
  185. package/dist/log-viewer/log-viewer.module.js +1 -16
  186. package/dist/menu/menu.js +1 -126
  187. package/dist/menu/menu.module.js +1 -8
  188. package/dist/menu-button/menu-button.js +1 -92
  189. package/dist/menu-button/menu-button.module.js +1 -8
  190. package/dist/menubar/menubar.js +1 -103
  191. package/dist/menubar/menubar.module.js +1 -8
  192. package/dist/modal/modal.css +1 -1
  193. package/dist/modal/modal.js +1 -76
  194. package/dist/modal/modal.module.js +1 -12
  195. package/dist/multi-select/list-nav.js +1 -0
  196. package/dist/multi-select/multi-select.css +1 -1
  197. package/dist/multi-select/multi-select.js +1 -106
  198. package/dist/multi-select/multi-select.module.js +1 -15
  199. package/dist/multi-select/option-list.js +1 -0
  200. package/dist/native-select/native-select.css +1 -1
  201. package/dist/native-select/native-select.js +1 -37
  202. package/dist/native-select/native-select.module.js +1 -7
  203. package/dist/navigation-menu/navigation-menu.js +1 -99
  204. package/dist/navigation-menu/navigation-menu.module.js +1 -10
  205. package/dist/node/accordion/accordion.js +1 -114
  206. package/dist/node/accordion/accordion.module.js +1 -10
  207. package/dist/node/action-sheet/action-sheet.js +1 -91
  208. package/dist/node/action-sheet/action-sheet.module.js +1 -12
  209. package/dist/node/alert/alert.js +1 -55
  210. package/dist/node/alert/alert.module.js +1 -11
  211. package/dist/node/alert-dialog/alert-dialog.js +1 -66
  212. package/dist/node/alert-dialog/alert-dialog.module.js +1 -11
  213. package/dist/node/app-shell/app-shell.js +1 -85
  214. package/dist/node/app-shell/app-shell.module.js +1 -12
  215. package/dist/node/aspect-ratio/aspect-ratio.js +1 -20
  216. package/dist/node/aspect-ratio/aspect-ratio.module.js +1 -6
  217. package/dist/node/avatar/avatar.js +1 -57
  218. package/dist/node/avatar/avatar.module.js +1 -8
  219. package/dist/node/avatar-group/avatar-group.js +1 -24
  220. package/dist/node/avatar-group/avatar-group.module.js +1 -6
  221. package/dist/node/badge/badge.js +1 -22
  222. package/dist/node/badge/badge.module.js +1 -3
  223. package/dist/node/blockquote/blockquote.js +1 -16
  224. package/dist/node/blockquote/blockquote.module.js +1 -6
  225. package/dist/node/bottom-sheet/bottom-sheet.js +1 -111
  226. package/dist/node/bottom-sheet/bottom-sheet.module.js +1 -14
  227. package/dist/node/brand/logo/logo.js +1 -0
  228. package/dist/node/brand/logo/logo.module.js +1 -0
  229. package/dist/node/breadcrumb/breadcrumb.js +1 -28
  230. package/dist/node/breadcrumb/breadcrumb.module.js +1 -3
  231. package/dist/node/button/button.js +1 -35
  232. package/dist/node/button/button.module.js +1 -6
  233. package/dist/node/button-group/button-group.js +1 -39
  234. package/dist/node/button-group/button-group.module.js +1 -3
  235. package/dist/node/calendar/calendar-date.js +1 -0
  236. package/dist/node/calendar/calendar.js +1 -199
  237. package/dist/node/calendar/calendar.module.js +1 -14
  238. package/dist/node/card/card.js +1 -53
  239. package/dist/node/card/card.module.js +1 -12
  240. package/dist/node/carousel/carousel.js +1 -138
  241. package/dist/node/carousel/carousel.module.js +1 -13
  242. package/dist/node/chat-bubble/chat-bubble.js +1 -31
  243. package/dist/node/chat-bubble/chat-bubble.module.js +1 -11
  244. package/dist/node/checkbox/checkbox.js +1 -39
  245. package/dist/node/checkbox/checkbox.module.js +1 -8
  246. package/dist/node/checkbox-card/checkbox-card.js +1 -50
  247. package/dist/node/checkbox-card/checkbox-card.module.js +1 -11
  248. package/dist/node/code/code.js +1 -14
  249. package/dist/node/code/code.module.js +1 -3
  250. package/dist/node/code-snippet/code-snippet.js +2 -121
  251. package/dist/node/code-snippet/code-snippet.module.js +1 -17
  252. package/dist/node/code-snippet/highlight.js +1 -67
  253. package/dist/node/collapsible/collapsible.js +1 -47
  254. package/dist/node/collapsible/collapsible.module.js +1 -7
  255. package/dist/node/color-picker/color-picker.js +1 -272
  256. package/dist/node/color-picker/color-picker.module.js +1 -18
  257. package/dist/node/color-picker/color.js +1 -0
  258. package/dist/node/combobox/combobox.js +1 -170
  259. package/dist/node/combobox/combobox.module.js +1 -19
  260. package/dist/node/combobox/list-nav.js +1 -0
  261. package/dist/node/combobox/option-list.js +1 -0
  262. package/dist/node/command-menu/command-menu.js +1 -421
  263. package/dist/node/command-menu/command-menu.module.js +1 -34
  264. package/dist/node/comparison/comparison.js +1 -69
  265. package/dist/node/comparison/comparison.module.js +1 -9
  266. package/dist/node/contained-list/contained-list.js +1 -41
  267. package/dist/node/contained-list/contained-list.module.js +1 -11
  268. package/dist/node/context-menu/context-menu.js +1 -93
  269. package/dist/node/context-menu/context-menu.module.js +1 -7
  270. package/dist/node/copy-button/copy-button.js +1 -60
  271. package/dist/node/copy-button/copy-button.module.js +1 -6
  272. package/dist/node/data-list/data-list.js +1 -25
  273. package/dist/node/data-list/data-list.module.js +1 -8
  274. package/dist/node/data-table/column-filter.js +1 -0
  275. package/dist/node/data-table/column-layout.js +1 -0
  276. package/dist/node/data-table/data-table.js +1 -398
  277. package/dist/node/data-table/data-table.module.js +1 -33
  278. package/dist/node/data-table/grid-keys.js +1 -0
  279. package/dist/node/data-table/row-group.js +1 -0
  280. package/dist/node/data-table/row-search.js +1 -0
  281. package/dist/node/data-table/row-sort.js +1 -0
  282. package/dist/node/data-table/to-csv.js +3 -0
  283. package/dist/node/data-table/virtual-window.js +1 -0
  284. package/dist/node/date-picker/date-picker.js +1 -224
  285. package/dist/node/date-picker/date-picker.module.js +1 -23
  286. package/dist/node/date-picker/parse-date.js +1 -0
  287. package/dist/node/date-range-picker/date-range-picker.js +1 -196
  288. package/dist/node/date-range-picker/date-range-picker.module.js +1 -18
  289. package/dist/node/dock/dock.js +1 -34
  290. package/dist/node/dock/dock.module.js +1 -8
  291. package/dist/node/drawer/drawer.js +1 -96
  292. package/dist/node/drawer/drawer.module.js +1 -13
  293. package/dist/node/dropdown/dropdown.js +1 -110
  294. package/dist/node/dropdown/dropdown.module.js +1 -9
  295. package/dist/node/editable/editable.js +1 -76
  296. package/dist/node/editable/editable.module.js +1 -11
  297. package/dist/node/empty-state/empty-state.js +1 -32
  298. package/dist/node/empty-state/empty-state.module.js +1 -9
  299. package/dist/node/fab/fab.js +1 -93
  300. package/dist/node/fab/fab.module.js +1 -12
  301. package/dist/node/field/field.js +1 -53
  302. package/dist/node/field/field.module.js +1 -7
  303. package/dist/node/file-uploader/file-uploader.js +1 -123
  304. package/dist/node/file-uploader/file-uploader.module.js +1 -18
  305. package/dist/node/filter/filter.js +1 -35
  306. package/dist/node/filter/filter.module.js +1 -6
  307. package/dist/node/form/form.js +1 -95
  308. package/dist/node/form/form.module.js +1 -3
  309. package/dist/node/header/header.js +1 -44
  310. package/dist/node/header/header.module.js +1 -11
  311. package/dist/node/header-panel/header-panel.js +1 -72
  312. package/dist/node/header-panel/header-panel.module.js +1 -9
  313. package/dist/node/heading/heading.js +1 -22
  314. package/dist/node/heading/heading.module.js +1 -3
  315. package/dist/node/hover-card/hover-card.js +1 -84
  316. package/dist/node/hover-card/hover-card.module.js +1 -6
  317. package/dist/node/icon-button/icon-button.js +1 -19
  318. package/dist/node/icon-button/icon-button.module.js +1 -3
  319. package/dist/node/image/image.js +1 -64
  320. package/dist/node/image/image.module.js +1 -9
  321. package/dist/node/indicator/indicator.js +1 -16
  322. package/dist/node/indicator/indicator.module.js +1 -6
  323. package/dist/node/infinite-scroll/infinite-scroll.js +1 -49
  324. package/dist/node/infinite-scroll/infinite-scroll.module.js +1 -7
  325. package/dist/node/inline-loading/inline-loading.js +1 -74
  326. package/dist/node/inline-loading/inline-loading.module.js +1 -9
  327. package/dist/node/input/input.js +1 -56
  328. package/dist/node/input/input.module.js +1 -9
  329. package/dist/node/input-group/input-group.js +1 -39
  330. package/dist/node/input-group/input-group.module.js +1 -9
  331. package/dist/node/item/item.js +1 -50
  332. package/dist/node/item/item.module.js +1 -10
  333. package/dist/node/join/join.js +1 -12
  334. package/dist/node/join/join.module.js +1 -3
  335. package/dist/node/kbd/kbd.js +1 -14
  336. package/dist/node/kbd/kbd.module.js +1 -3
  337. package/dist/node/label/label.js +1 -23
  338. package/dist/node/label/label.module.js +1 -7
  339. package/dist/node/large-title-header/large-title-header.js +1 -38
  340. package/dist/node/large-title-header/large-title-header.module.js +1 -12
  341. package/dist/node/layouts/src/auto-grid/auto-grid.js +1 -17
  342. package/dist/node/layouts/src/auto-grid/auto-grid.module.js +1 -4
  343. package/dist/node/layouts/src/center/center.js +1 -16
  344. package/dist/node/layouts/src/center/center.module.js +1 -3
  345. package/dist/node/layouts/src/columns/columns.js +1 -21
  346. package/dist/node/layouts/src/columns/columns.module.js +1 -6
  347. package/dist/node/layouts/src/flex/flex.js +1 -20
  348. package/dist/node/layouts/src/flex/flex.module.js +1 -3
  349. package/dist/node/layouts/src/grid/grid.js +1 -55
  350. package/dist/node/layouts/src/grid/grid.module.js +1 -7
  351. package/dist/node/layouts/src/page-header/page-header.js +1 -31
  352. package/dist/node/layouts/src/page-header/page-header.module.js +1 -10
  353. package/dist/node/layouts/src/spacer/spacer.js +1 -17
  354. package/dist/node/layouts/src/spacer/spacer.module.js +1 -3
  355. package/dist/node/link/link.js +1 -22
  356. package/dist/node/link/link.module.js +1 -3
  357. package/dist/node/list/list.js +1 -21
  358. package/dist/node/list/list.module.js +1 -6
  359. package/dist/node/log-viewer/log-viewer.js +2 -184
  360. package/dist/node/log-viewer/log-viewer.module.js +1 -16
  361. package/dist/node/menu/menu.js +1 -126
  362. package/dist/node/menu/menu.module.js +1 -8
  363. package/dist/node/menu-button/menu-button.js +1 -92
  364. package/dist/node/menu-button/menu-button.module.js +1 -8
  365. package/dist/node/menubar/menubar.js +1 -103
  366. package/dist/node/menubar/menubar.module.js +1 -8
  367. package/dist/node/modal/modal.js +1 -76
  368. package/dist/node/modal/modal.module.js +1 -12
  369. package/dist/node/multi-select/list-nav.js +1 -0
  370. package/dist/node/multi-select/multi-select.js +1 -106
  371. package/dist/node/multi-select/multi-select.module.js +1 -15
  372. package/dist/node/multi-select/option-list.js +1 -0
  373. package/dist/node/native-select/native-select.js +1 -37
  374. package/dist/node/native-select/native-select.module.js +1 -7
  375. package/dist/node/navigation-menu/navigation-menu.js +1 -99
  376. package/dist/node/navigation-menu/navigation-menu.module.js +1 -10
  377. package/dist/node/notification/notification.js +1 -140
  378. package/dist/node/notification/notification.module.js +1 -11
  379. package/dist/node/number-input/number-input.js +1 -148
  380. package/dist/node/number-input/number-input.module.js +1 -12
  381. package/dist/node/otp-input/otp-input.js +1 -70
  382. package/dist/node/otp-input/otp-input.module.js +1 -6
  383. package/dist/node/overflow-menu/overflow-menu.js +1 -70
  384. package/dist/node/overflow-menu/overflow-menu.module.js +1 -7
  385. package/dist/node/pagination/pagination.js +1 -92
  386. package/dist/node/pagination/pagination.module.js +1 -11
  387. package/dist/node/password-input/password-input.js +1 -81
  388. package/dist/node/password-input/password-input.module.js +1 -11
  389. package/dist/node/popover/popover.js +1 -51
  390. package/dist/node/popover/popover.module.js +1 -6
  391. package/dist/node/popover/use-popover.js +1 -55
  392. package/dist/node/progress/progress.js +1 -16
  393. package/dist/node/progress/progress.module.js +1 -6
  394. package/dist/node/progress-bar/progress-bar.js +1 -42
  395. package/dist/node/progress-bar/progress-bar.module.js +1 -11
  396. package/dist/node/progress-circle/progress-circle.js +1 -46
  397. package/dist/node/progress-circle/progress-circle.module.js +1 -9
  398. package/dist/node/progress-indicator/progress-indicator.js +1 -34
  399. package/dist/node/progress-indicator/progress-indicator.module.js +1 -10
  400. package/dist/node/prose/prose.js +1 -13
  401. package/dist/node/prose/prose.module.js +1 -3
  402. package/dist/node/pull-to-refresh/pull-to-refresh.js +1 -82
  403. package/dist/node/pull-to-refresh/pull-to-refresh.module.js +1 -9
  404. package/dist/node/qr-code/encode.js +1 -583
  405. package/dist/node/qr-code/qr-code.js +1 -41
  406. package/dist/node/qr-code/qr-code.module.js +1 -6
  407. package/dist/node/radial-progress/radial-progress.js +1 -27
  408. package/dist/node/radial-progress/radial-progress.module.js +1 -6
  409. package/dist/node/radio/radio.js +1 -49
  410. package/dist/node/radio/radio.module.js +1 -9
  411. package/dist/node/radio-card/radio-card.js +1 -64
  412. package/dist/node/radio-card/radio-card.module.js +1 -11
  413. package/dist/node/rating-group/rating-group.js +1 -37
  414. package/dist/node/rating-group/rating-group.module.js +1 -6
  415. package/dist/node/react/src/index.js +1 -141
  416. package/dist/node/relative-time/relative-time.js +1 -66
  417. package/dist/node/relative-time/relative-time.module.js +1 -3
  418. package/dist/node/reorder-list/reorder-list.js +1 -143
  419. package/dist/node/reorder-list/reorder-list.module.js +1 -11
  420. package/dist/node/resizable/resizable.js +1 -80
  421. package/dist/node/resizable/resizable.module.js +1 -8
  422. package/dist/node/scroll-area/scroll-area.js +1 -38
  423. package/dist/node/scroll-area/scroll-area.module.js +1 -3
  424. package/dist/node/search/search.js +1 -96
  425. package/dist/node/search/search.module.js +1 -9
  426. package/dist/node/segmented-control/segmented-control.js +1 -43
  427. package/dist/node/segmented-control/segmented-control.module.js +1 -6
  428. package/dist/node/select/select.js +1 -73
  429. package/dist/node/select/select.module.js +1 -11
  430. package/dist/node/separator/separator.js +1 -19
  431. package/dist/node/separator/separator.module.js +1 -3
  432. package/dist/node/sheet/sheet.js +1 -49
  433. package/dist/node/sheet/sheet.module.js +1 -9
  434. package/dist/node/shell-header/shell-header.js +1 -169
  435. package/dist/node/shell-header/shell-header.module.js +1 -24
  436. package/dist/node/side-nav/side-nav.js +1 -334
  437. package/dist/node/side-nav/side-nav.module.js +1 -31
  438. package/dist/node/skeleton/skeleton.js +1 -23
  439. package/dist/node/skeleton/skeleton.module.js +1 -7
  440. package/dist/node/skip-nav/skip-nav.js +1 -28
  441. package/dist/node/skip-nav/skip-nav.module.js +1 -3
  442. package/dist/node/slider/slider.js +1 -30
  443. package/dist/node/slider/slider.module.js +1 -7
  444. package/dist/node/spinner/spinner.js +1 -18
  445. package/dist/node/spinner/spinner.module.js +1 -6
  446. package/dist/node/stack/stack.js +1 -17
  447. package/dist/node/stack/stack.module.js +1 -6
  448. package/dist/node/stat/stat.js +1 -41
  449. package/dist/node/stat/stat.module.js +1 -11
  450. package/dist/node/status/status.js +1 -25
  451. package/dist/node/status/status.module.js +1 -7
  452. package/dist/node/steps/steps.js +1 -35
  453. package/dist/node/steps/steps.module.js +1 -8
  454. package/dist/node/structured-list/structured-list.js +1 -102
  455. package/dist/node/structured-list/structured-list.module.js +1 -12
  456. package/dist/node/swap/swap.js +1 -36
  457. package/dist/node/swap/swap.module.js +1 -7
  458. package/dist/node/swipe-item/swipe-item.js +1 -62
  459. package/dist/node/swipe-item/swipe-item.module.js +1 -12
  460. package/dist/node/switcher/switcher.js +1 -32
  461. package/dist/node/switcher/switcher.module.js +1 -8
  462. package/dist/node/tabs/tabs.js +1 -98
  463. package/dist/node/tabs/tabs.module.js +1 -8
  464. package/dist/node/tag/tag.js +1 -33
  465. package/dist/node/tag/tag.module.js +1 -6
  466. package/dist/node/tags-input/tags-input.js +1 -68
  467. package/dist/node/tags-input/tags-input.module.js +1 -8
  468. package/dist/node/text/text.js +1 -16
  469. package/dist/node/text/text.module.js +1 -3
  470. package/dist/node/textarea/textarea.js +1 -58
  471. package/dist/node/textarea/textarea.module.js +1 -9
  472. package/dist/node/tile/tile.js +1 -39
  473. package/dist/node/tile/tile.module.js +1 -7
  474. package/dist/node/time-picker/time-picker.js +1 -64
  475. package/dist/node/time-picker/time-picker.module.js +1 -9
  476. package/dist/node/timeline/timeline.js +1 -55
  477. package/dist/node/timeline/timeline.module.js +1 -11
  478. package/dist/node/toast/toast.js +1 -85
  479. package/dist/node/toast/toast.module.js +1 -11
  480. package/dist/node/toc/toc.js +1 -43
  481. package/dist/node/toc/toc.module.js +1 -3
  482. package/dist/node/toc/use-toc-from-region.js +1 -18
  483. package/dist/node/toggle/toggle.js +1 -42
  484. package/dist/node/toggle/toggle.module.js +1 -8
  485. package/dist/node/toggle-group/toggle-group.js +1 -55
  486. package/dist/node/toggle-group/toggle-group.module.js +1 -6
  487. package/dist/node/toggletip/toggletip.js +1 -49
  488. package/dist/node/toggletip/toggletip.module.js +1 -7
  489. package/dist/node/tooltip/tooltip.js +1 -58
  490. package/dist/node/tooltip/tooltip.module.js +1 -6
  491. package/dist/node/tree-view/tree-view.js +1 -201
  492. package/dist/node/tree-view/tree-view.module.js +1 -13
  493. package/dist/node/user/user.js +1 -35
  494. package/dist/node/user/user.module.js +1 -9
  495. package/dist/node/virtual-list/virtual-list.js +1 -40
  496. package/dist/node/virtual-list/virtual-list.module.js +1 -7
  497. package/dist/node/visually-hidden/visually-hidden.js +1 -2
  498. package/dist/node/wheel-picker/wheel-picker.js +1 -84
  499. package/dist/node/wheel-picker/wheel-picker.module.js +1 -8
  500. package/dist/notification/notification.js +1 -140
  501. package/dist/notification/notification.module.js +1 -11
  502. package/dist/number-input/number-input.js +1 -148
  503. package/dist/number-input/number-input.module.js +1 -12
  504. package/dist/otp-input/otp-input.js +1 -70
  505. package/dist/otp-input/otp-input.module.js +1 -6
  506. package/dist/overflow-menu/overflow-menu.js +1 -70
  507. package/dist/overflow-menu/overflow-menu.module.js +1 -7
  508. package/dist/pagination/pagination.js +1 -92
  509. package/dist/pagination/pagination.module.js +1 -11
  510. package/dist/password-input/password-input.js +1 -81
  511. package/dist/password-input/password-input.module.js +1 -11
  512. package/dist/popover/popover.js +1 -51
  513. package/dist/popover/popover.module.js +1 -6
  514. package/dist/popover/use-popover.js +1 -55
  515. package/dist/progress/progress.css +1 -1
  516. package/dist/progress/progress.js +1 -16
  517. package/dist/progress/progress.module.js +1 -6
  518. package/dist/progress-bar/progress-bar.css +1 -1
  519. package/dist/progress-bar/progress-bar.js +1 -42
  520. package/dist/progress-bar/progress-bar.module.js +1 -11
  521. package/dist/progress-circle/progress-circle.js +1 -46
  522. package/dist/progress-circle/progress-circle.module.js +1 -9
  523. package/dist/progress-indicator/progress-indicator.css +1 -1
  524. package/dist/progress-indicator/progress-indicator.js +1 -34
  525. package/dist/progress-indicator/progress-indicator.module.js +1 -10
  526. package/dist/prose/prose.css +1 -1
  527. package/dist/prose/prose.js +1 -13
  528. package/dist/prose/prose.module.js +1 -3
  529. package/dist/pull-to-refresh/pull-to-refresh.js +1 -82
  530. package/dist/pull-to-refresh/pull-to-refresh.module.js +1 -9
  531. package/dist/qr-code/encode.js +1 -583
  532. package/dist/qr-code/qr-code.js +1 -41
  533. package/dist/qr-code/qr-code.module.js +1 -6
  534. package/dist/radial-progress/radial-progress.js +1 -27
  535. package/dist/radial-progress/radial-progress.module.js +1 -6
  536. package/dist/radio/radio.js +1 -49
  537. package/dist/radio/radio.module.js +1 -9
  538. package/dist/radio-card/radio-card.css +1 -1
  539. package/dist/radio-card/radio-card.js +1 -64
  540. package/dist/radio-card/radio-card.module.js +1 -11
  541. package/dist/rating-group/rating-group.js +1 -37
  542. package/dist/rating-group/rating-group.module.js +1 -6
  543. package/dist/react/src/index.js +1 -141
  544. package/dist/relative-time/relative-time.js +1 -66
  545. package/dist/relative-time/relative-time.module.js +1 -3
  546. package/dist/reorder-list/reorder-list.css +1 -1
  547. package/dist/reorder-list/reorder-list.js +1 -143
  548. package/dist/reorder-list/reorder-list.module.js +1 -11
  549. package/dist/resizable/resizable.js +1 -80
  550. package/dist/resizable/resizable.module.js +1 -8
  551. package/dist/scroll-area/scroll-area.css +1 -1
  552. package/dist/scroll-area/scroll-area.js +1 -38
  553. package/dist/scroll-area/scroll-area.module.js +1 -3
  554. package/dist/search/search.js +1 -96
  555. package/dist/search/search.module.js +1 -9
  556. package/dist/segmented-control/segmented-control.js +1 -43
  557. package/dist/segmented-control/segmented-control.module.js +1 -6
  558. package/dist/select/select.js +1 -73
  559. package/dist/select/select.module.js +1 -11
  560. package/dist/separator/separator.js +1 -19
  561. package/dist/separator/separator.module.js +1 -3
  562. package/dist/sheet/sheet.js +1 -49
  563. package/dist/sheet/sheet.module.js +1 -9
  564. package/dist/shell-header/shell-header.css +1 -1
  565. package/dist/shell-header/shell-header.js +1 -169
  566. package/dist/shell-header/shell-header.module.js +1 -24
  567. package/dist/side-nav/side-nav.css +1 -1
  568. package/dist/side-nav/side-nav.js +1 -334
  569. package/dist/side-nav/side-nav.module.js +1 -31
  570. package/dist/skeleton/skeleton.css +1 -1
  571. package/dist/skeleton/skeleton.js +1 -23
  572. package/dist/skeleton/skeleton.module.js +1 -7
  573. package/dist/skip-nav/skip-nav.js +1 -28
  574. package/dist/skip-nav/skip-nav.module.js +1 -3
  575. package/dist/slider/slider.js +1 -30
  576. package/dist/slider/slider.module.js +1 -7
  577. package/dist/spinner/spinner.css +1 -1
  578. package/dist/spinner/spinner.js +1 -18
  579. package/dist/spinner/spinner.module.js +1 -6
  580. package/dist/stack/stack.js +1 -17
  581. package/dist/stack/stack.module.js +1 -6
  582. package/dist/stat/stat.js +1 -41
  583. package/dist/stat/stat.module.js +1 -11
  584. package/dist/status/status.css +1 -1
  585. package/dist/status/status.js +1 -25
  586. package/dist/status/status.module.js +1 -7
  587. package/dist/steps/steps.css +1 -1
  588. package/dist/steps/steps.js +1 -35
  589. package/dist/steps/steps.module.js +1 -8
  590. package/dist/structured-list/structured-list.js +1 -102
  591. package/dist/structured-list/structured-list.module.js +1 -12
  592. package/dist/styles.css +401 -55
  593. package/dist/swap/swap.css +1 -1
  594. package/dist/swap/swap.js +1 -36
  595. package/dist/swap/swap.module.js +1 -7
  596. package/dist/swipe-item/swipe-item.js +1 -62
  597. package/dist/swipe-item/swipe-item.module.js +1 -12
  598. package/dist/switcher/switcher.js +1 -32
  599. package/dist/switcher/switcher.module.js +1 -8
  600. package/dist/tabs/tabs.js +1 -98
  601. package/dist/tabs/tabs.module.js +1 -8
  602. package/dist/tag/tag.js +1 -33
  603. package/dist/tag/tag.module.js +1 -6
  604. package/dist/tags-input/tags-input.js +1 -68
  605. package/dist/tags-input/tags-input.module.js +1 -8
  606. package/dist/text/text.css +1 -1
  607. package/dist/text/text.js +1 -16
  608. package/dist/text/text.module.js +1 -3
  609. package/dist/textarea/textarea.css +1 -1
  610. package/dist/textarea/textarea.js +1 -58
  611. package/dist/textarea/textarea.module.js +1 -9
  612. package/dist/tile/tile.css +1 -1
  613. package/dist/tile/tile.js +1 -39
  614. package/dist/tile/tile.module.js +1 -7
  615. package/dist/time-picker/time-picker.js +1 -64
  616. package/dist/time-picker/time-picker.module.js +1 -9
  617. package/dist/timeline/timeline.js +1 -55
  618. package/dist/timeline/timeline.module.js +1 -11
  619. package/dist/toast/toast.css +1 -1
  620. package/dist/toast/toast.js +1 -85
  621. package/dist/toast/toast.module.js +1 -11
  622. package/dist/toc/toc.css +1 -1
  623. package/dist/toc/toc.js +1 -43
  624. package/dist/toc/toc.module.js +1 -3
  625. package/dist/toc/use-toc-from-region.js +1 -18
  626. package/dist/toggle/toggle.js +1 -42
  627. package/dist/toggle/toggle.module.js +1 -8
  628. package/dist/toggle-group/toggle-group.js +1 -55
  629. package/dist/toggle-group/toggle-group.module.js +1 -6
  630. package/dist/toggletip/toggletip.js +1 -49
  631. package/dist/toggletip/toggletip.module.js +1 -7
  632. package/dist/tooltip/tooltip.css +1 -1
  633. package/dist/tooltip/tooltip.js +1 -58
  634. package/dist/tooltip/tooltip.module.js +1 -6
  635. package/dist/tree-view/tree-view.css +1 -1
  636. package/dist/tree-view/tree-view.js +1 -201
  637. package/dist/tree-view/tree-view.module.js +1 -13
  638. package/dist/user/user.js +1 -35
  639. package/dist/user/user.module.js +1 -9
  640. package/dist/virtual-list/virtual-list.js +1 -40
  641. package/dist/virtual-list/virtual-list.module.js +1 -7
  642. package/dist/visually-hidden/visually-hidden.js +1 -2
  643. package/dist/wheel-picker/wheel-picker.js +1 -84
  644. package/dist/wheel-picker/wheel-picker.module.js +1 -8
  645. package/package.json +4 -4
  646. package/readme.body.md +3 -2
@@ -1,95 +1 @@
1
- "use client";
2
-
3
- import e from "./form.module.js";
4
- import { batch as t, cn as n, signal as r, useSignal as i, useSignals as a } from "@cascivo/core";
5
- import { jsx as o } from "react/jsx-runtime";
6
- //#region ../components/src/form/form.tsx
7
- function s(e) {
8
- let t = e[0];
9
- return t === void 0 ? "" : String(typeof t == "string" || typeof t == "number" ? t : t.key);
10
- }
11
- async function c(e, t) {
12
- let n = await e["~standard"].validate(t);
13
- if (!("issues" in n) || n.issues === void 0) return {};
14
- let r = {};
15
- for (let e of n.issues) {
16
- let t = e.path && e.path.length > 0 ? s(e.path) : "";
17
- t && !(t in r) && (r[t] = e.message);
18
- }
19
- return r;
20
- }
21
- function l(e) {
22
- let n = r({ ...e.initialValues }), i = r({}), a = r({}), o = r(!1), s = async (t) => {
23
- let n = {};
24
- return e.schema && (n = await c(e.schema, t)), Object.keys(n).length === 0 && e.validate && (n = await e.validate(t)), n;
25
- }, l = 0, u = (t, r) => {
26
- if (n.value = {
27
- ...n.value,
28
- [t]: r
29
- }, !e.validateOnChange) return;
30
- let a = ++l;
31
- s(n.value).then((e) => {
32
- if (a !== l) return;
33
- let n = { ...i.value }, r = e[t];
34
- r === void 0 ? delete n[t] : n[t] = r, i.value = n;
35
- });
36
- };
37
- return {
38
- values: n,
39
- errors: i,
40
- touched: a,
41
- submitting: o,
42
- setValue: u,
43
- field(e) {
44
- return {
45
- get value() {
46
- return n.value[e];
47
- },
48
- onChange: (t) => u(e, t),
49
- onBlur: () => {
50
- a.value = {
51
- ...a.value,
52
- [e]: !0
53
- };
54
- },
55
- get error() {
56
- return i.value[e];
57
- }
58
- };
59
- },
60
- async submit(r) {
61
- o.value = !0;
62
- try {
63
- let o = await s(n.value), c = Object.fromEntries(Object.keys(e.initialValues).map((e) => [e, !0]));
64
- t(() => {
65
- i.value = o, a.value = c;
66
- }), Object.keys(o).length === 0 && await r(n.value);
67
- } finally {
68
- o.value = !1;
69
- }
70
- },
71
- reset() {
72
- t(() => {
73
- n.value = { ...e.initialValues }, i.value = {}, a.value = {};
74
- });
75
- }
76
- };
77
- }
78
- function u(e) {
79
- a();
80
- let t = i(null);
81
- return t.peek() === null && (t.value = l(e)), t.peek();
82
- }
83
- function d({ form: t, onValid: r, children: i, className: a, ...s }) {
84
- return /* @__PURE__ */ o("form", {
85
- noValidate: !0,
86
- className: n(e.form, a),
87
- onSubmit: (e) => {
88
- e.preventDefault(), t.submit(r);
89
- },
90
- ...s,
91
- children: i
92
- });
93
- }
94
- //#endregion
95
- export { d as Form, l as createForm, u as useForm };
1
+ "use client";import e from"./form.module.js";import{batch as t,cn as n,signal as r,useSignal as i,useSignals as a}from"@cascivo/core";import{jsx as o}from"react/jsx-runtime";function pathHead(e){let t=e[0];return t===void 0?``:String(typeof t==`string`||typeof t==`number`?t:t.key)}async function runSchema(e,t){let n=await e[`~standard`].validate(t);if(!(`issues`in n)||n.issues===void 0)return{};let r={};for(let e of n.issues){let t=e.path&&e.path.length>0?pathHead(e.path):``;t&&!(t in r)&&(r[t]=e.message)}return r}function createForm(e){let n=r({...e.initialValues}),i=r({}),a=r({}),o=r(!1),validateValues=async t=>{let n={};return e.schema&&(n=await runSchema(e.schema,t)),Object.keys(n).length===0&&e.validate&&(n=await e.validate(t)),n},s=0,setValue=(t,r)=>{if(n.value={...n.value,[t]:r},!e.validateOnChange)return;let a=++s;validateValues(n.value).then(e=>{if(a!==s)return;let n={...i.value},r=e[t];r===void 0?delete n[t]:n[t]=r,i.value=n})};return{values:n,errors:i,touched:a,submitting:o,setValue,field(e){return{get value(){return n.value[e]},onChange:t=>setValue(e,t),onBlur:()=>{a.value={...a.value,[e]:!0}},get error(){return i.value[e]}}},async submit(r){o.value=!0;try{let o=await validateValues(n.value),s=Object.fromEntries(Object.keys(e.initialValues).map(e=>[e,!0]));t(()=>{i.value=o,a.value=s}),Object.keys(o).length===0&&await r(n.value)}finally{o.value=!1}},reset(){t(()=>{n.value={...e.initialValues},i.value={},a.value={}})}}}function useForm(e){a();let t=i(null);return t.peek()===null&&(t.value=createForm(e)),t.peek()}function Form({form:t,onValid:r,children:i,className:a,...s}){return o(`form`,{noValidate:!0,className:n(e.form,a),onSubmit:e=>{e.preventDefault(),t.submit(r)},...s,children:i})}export{Form,createForm,useForm};
@@ -1,3 +1 @@
1
- var e = { form: "_form_1mtxl_2" };
2
- //#endregion
3
- export { e as default };
1
+ var e={form:`_form_1mtxl_2`};export{e as default};
@@ -1,44 +1 @@
1
- "use client";
2
-
3
- import e from "./header.module.js";
4
- import { cn as t, getLinkComponent as n, useSignals as r } from "@cascivo/core";
5
- import { builtin as i, t as a } from "@cascivo/i18n";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- //#region ../components/src/header/header.tsx
8
- function c({ brand: c, links: l, actions: u, sticky: d = !1, labels: f, className: p, ...m }) {
9
- r();
10
- let h = n(), g = f?.nav ?? a(i.header.nav);
11
- return /* @__PURE__ */ s("header", {
12
- role: "banner",
13
- "data-sticky": d || void 0,
14
- className: t(e.header, p),
15
- ...m,
16
- children: [
17
- c && /* @__PURE__ */ o("div", {
18
- className: e.brand,
19
- children: c
20
- }),
21
- l && l.length > 0 && /* @__PURE__ */ o("nav", {
22
- "aria-label": g,
23
- className: e.nav,
24
- children: /* @__PURE__ */ o("ul", {
25
- className: e.list,
26
- children: l.map((t, n) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(h, {
27
- href: t.href,
28
- "aria-current": t.active ? "page" : void 0,
29
- "data-state": t.active ? "active" : void 0,
30
- className: e.link,
31
- children: t.label
32
- }) }, t.id ?? `${n}-${t.href}`))
33
- })
34
- }),
35
- /* @__PURE__ */ o("div", { className: e.spacer }),
36
- u && /* @__PURE__ */ o("div", {
37
- className: e.actions,
38
- children: u
39
- })
40
- ]
41
- });
42
- }
43
- //#endregion
44
- export { c as Header };
1
+ "use client";import e from"./header.module.js";import{cn as t,getLinkComponent as n,useSignals as r}from"@cascivo/core";import{builtin as i,t as a}from"@cascivo/i18n";import{jsx as o,jsxs as s}from"react/jsx-runtime";function Header({brand:c,links:l,actions:u,sticky:d=!1,labels:f,className:p,...m}){r();let h=n(),g=f?.nav??a(i.header.nav);return s(`header`,{role:`banner`,"data-sticky":d||void 0,className:t(e.header,p),...m,children:[c&&o(`div`,{className:e.brand,children:c}),l&&l.length>0&&o(`nav`,{"aria-label":g,className:e.nav,children:o(`ul`,{className:e.list,children:l.map((t,n)=>o(`li`,{children:o(h,{href:t.href,"aria-current":t.active?`page`:void 0,"data-state":t.active?`active`:void 0,className:e.link,children:t.label})},t.id??`${n}-${t.href}`))})}),o(`div`,{className:e.spacer}),u&&o(`div`,{className:e.actions,children:u})]})}export{Header};
@@ -1,11 +1 @@
1
- var e = {
2
- header: "_header_1n9di_2",
3
- brand: "_brand_1n9di_20",
4
- nav: "_nav_1n9di_35",
5
- list: "_list_1n9di_39",
6
- link: "_link_1n9di_48",
7
- spacer: "_spacer_1n9di_80",
8
- actions: "_actions_1n9di_84"
9
- };
10
- //#endregion
11
- export { e as default };
1
+ var e={header:`_header_1n9di_2`,brand:`_brand_1n9di_20`,nav:`_nav_1n9di_35`,list:`_list_1n9di_39`,link:`_link_1n9di_48`,spacer:`_spacer_1n9di_80`,actions:`_actions_1n9di_84`};export{e as default};
@@ -1,72 +1 @@
1
- "use client";
2
-
3
- import e from "./header-panel.module.js";
4
- import { useRef as t } from "react";
5
- import { cn as n, focusElement as r, useEffectPropSignal as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
6
- import { builtin as s, t as c } from "@cascivo/i18n";
7
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
- //#region ../components/src/header-panel/header-panel.tsx
9
- function d({ open: d, onClose: f, label: p, children: m, labels: h, className: g }) {
10
- o();
11
- let _ = t(null), v = t(null), y = i(d), b = t(f);
12
- return b.current = f, a(() => {
13
- let e = _.current;
14
- if (e) if (y.value) {
15
- v.current = document.activeElement;
16
- try {
17
- e.showPopover();
18
- } catch {}
19
- e.focus();
20
- } else {
21
- try {
22
- e.hidePopover();
23
- } catch {}
24
- r(v.current), v.current = null;
25
- }
26
- }), a(() => {
27
- let e = _.current;
28
- if (!e) return;
29
- let t = (e) => {
30
- let t = "newState" in e ? e.newState === "closed" : !0;
31
- y.peek() && t && b.current();
32
- };
33
- return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
34
- }), /* @__PURE__ */ u("div", {
35
- ref: _,
36
- popover: "auto",
37
- role: "region",
38
- "aria-label": p,
39
- tabIndex: -1,
40
- "data-state": d ? "open" : "closed",
41
- className: n(e.panel, g),
42
- children: [/* @__PURE__ */ u("div", {
43
- className: e.header,
44
- children: [/* @__PURE__ */ l("span", {
45
- className: e.title,
46
- children: p
47
- }), /* @__PURE__ */ l("button", {
48
- type: "button",
49
- "aria-label": h?.close ?? c(s.headerPanel.close),
50
- className: e.close,
51
- onClick: () => b.current(),
52
- children: /* @__PURE__ */ l("svg", {
53
- viewBox: "0 0 16 16",
54
- width: "14",
55
- height: "14",
56
- "aria-hidden": "true",
57
- children: /* @__PURE__ */ l("path", {
58
- d: "M4 4l8 8M12 4l-8 8",
59
- stroke: "currentColor",
60
- strokeWidth: "1.5",
61
- strokeLinecap: "round"
62
- })
63
- })
64
- })]
65
- }), /* @__PURE__ */ l("div", {
66
- className: e.body,
67
- children: m
68
- })]
69
- });
70
- }
71
- //#endregion
72
- export { d as HeaderPanel };
1
+ "use client";import e from"./header-panel.module.js";import{useRef as t}from"react";import{cn as n,focusElement as r,useEffectPropSignal as i,useSignalEffect as a,useSignals as o}from"@cascivo/core";import{builtin as s,t as c}from"@cascivo/i18n";import{jsx as l,jsxs as u}from"react/jsx-runtime";function HeaderPanel({open:d,onClose:f,label:p,children:m,labels:h,className:g}){o();let _=t(null),v=t(null),y=i(d),b=t(f);return b.current=f,a(()=>{let e=_.current;if(e)if(y.value){v.current=document.activeElement;try{e.showPopover()}catch{}e.focus()}else{try{e.hidePopover()}catch{}r(v.current),v.current=null}}),a(()=>{let e=_.current;if(!e)return;let handler=e=>{let t=`newState`in e?e.newState===`closed`:!0;y.peek()&&t&&b.current()};return e.addEventListener(`toggle`,handler),()=>e.removeEventListener(`toggle`,handler)}),u(`div`,{ref:_,popover:`auto`,role:`region`,"aria-label":p,tabIndex:-1,"data-state":d?`open`:`closed`,className:n(e.panel,g),children:[u(`div`,{className:e.header,children:[l(`span`,{className:e.title,children:p}),l(`button`,{type:`button`,"aria-label":h?.close??c(s.headerPanel.close),className:e.close,onClick:()=>b.current(),children:l(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,"aria-hidden":`true`,children:l(`path`,{d:`M4 4l8 8M12 4l-8 8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})})})]}),l(`div`,{className:e.body,children:m})]})}export{HeaderPanel};
@@ -1,9 +1 @@
1
- var e = {
2
- panel: "_panel_gsmp3_2",
3
- header: "_header_gsmp3_41",
4
- title: "_title_gsmp3_50",
5
- close: "_close_gsmp3_57",
6
- body: "_body_gsmp3_80"
7
- };
8
- //#endregion
9
- export { e as default };
1
+ var e={panel:`_panel_gsmp3_2`,header:`_header_gsmp3_41`,title:`_title_gsmp3_50`,close:`_close_gsmp3_57`,body:`_body_gsmp3_80`};export{e as default};
@@ -1,22 +1 @@
1
- import e from "./heading.module.js";
2
- import { cn as t } from "@cascivo/core/pure";
3
- import { jsx as n } from "react/jsx-runtime";
4
- //#region ../components/src/heading/heading.tsx
5
- var r = {
6
- 1: "2xl",
7
- 2: "xl",
8
- 3: "lg",
9
- 4: "md",
10
- 5: "sm",
11
- 6: "sm"
12
- };
13
- function i({ level: i = 2, size: a, className: o, children: s, ...c }) {
14
- return /* @__PURE__ */ n(`h${i}`, {
15
- "data-size": a ?? r[i],
16
- className: t(e.heading, o),
17
- ...c,
18
- children: s
19
- });
20
- }
21
- //#endregion
22
- export { i as Heading };
1
+ import e from"./heading.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n}from"react/jsx-runtime";var r={1:`2xl`,2:`xl`,3:`lg`,4:`md`,5:`sm`,6:`sm`};function Heading({level:i=2,size:a,className:o,children:s,...c}){return n(`h${i}`,{"data-size":a??r[i],className:t(e.heading,o),...c,children:s})}export{Heading};
@@ -1,3 +1 @@
1
- var e = { heading: "_heading_1mlcc_2" };
2
- //#endregion
3
- export { e as default };
1
+ var e={heading:`_heading_1osin_2`};export{e as default};
@@ -1,84 +1 @@
1
- "use client";
2
-
3
- import { usePopover as e } from "../popover/use-popover.js";
4
- import t from "./hover-card.module.js";
5
- import { createContext as n, useRef as r } from "react";
6
- import { useSignalEffect as i, useSignals as a } from "@cascivo/core";
7
- import { jsx as o } from "react/jsx-runtime";
8
- //#region ../components/src/hover-card/hover-card.tsx
9
- var s = n(null);
10
- function c({ children: t, openDelay: n = 300, closeDelay: a = 100 }) {
11
- let c = e(), l = r(void 0), u = r(void 0), d = r(n);
12
- d.current = n;
13
- let f = r(a);
14
- f.current = a;
15
- let p = {
16
- ...c,
17
- open: () => {
18
- clearTimeout(u.current), l.current = setTimeout(() => {
19
- c.isOpen.value = !0;
20
- }, d.current);
21
- },
22
- close: () => {
23
- clearTimeout(l.current), u.current = setTimeout(() => {
24
- c.isOpen.value = !1;
25
- }, f.current);
26
- }
27
- };
28
- return i(() => () => {
29
- clearTimeout(l.current), clearTimeout(u.current);
30
- }), /* @__PURE__ */ o(s.Provider, {
31
- value: p,
32
- children: t
33
- });
34
- }
35
- function l({ ctx: e, children: n }) {
36
- a();
37
- let { triggerRef: r, anchorName: i, open: s, close: c } = e;
38
- return /* @__PURE__ */ o("span", {
39
- ref: r,
40
- style: { anchorName: i },
41
- onMouseEnter: s,
42
- onMouseLeave: c,
43
- onFocus: s,
44
- onBlur: c,
45
- className: t.trigger,
46
- children: n
47
- });
48
- }
49
- function u({ children: e }) {
50
- return /* @__PURE__ */ o(s.Consumer, { children: (t) => {
51
- if (!t) throw Error("HoverCardTrigger must be inside <HoverCard>");
52
- return /* @__PURE__ */ o(l, {
53
- ctx: t,
54
- children: e
55
- });
56
- } });
57
- }
58
- function d({ ctx: e, children: n, className: r }) {
59
- a();
60
- let { popoverRef: i, anchorName: s, isOpen: c, open: l, close: u } = e;
61
- return /* @__PURE__ */ o("div", {
62
- ref: i,
63
- popover: "auto",
64
- role: "complementary",
65
- "data-state": c.value ? "open" : "closed",
66
- style: { positionAnchor: s },
67
- onMouseEnter: l,
68
- onMouseLeave: u,
69
- className: [t.content, r].filter(Boolean).join(" "),
70
- children: n
71
- });
72
- }
73
- function f({ children: e, className: t }) {
74
- return /* @__PURE__ */ o(s.Consumer, { children: (n) => {
75
- if (!n) throw Error("HoverCardContent must be inside <HoverCard>");
76
- return /* @__PURE__ */ o(d, {
77
- ctx: n,
78
- ...t !== void 0 && { className: t },
79
- children: e
80
- });
81
- } });
82
- }
83
- //#endregion
84
- export { c as HoverCard, f as HoverCardContent, u as HoverCardTrigger };
1
+ "use client";import{usePopover as e}from"../popover/use-popover.js";import t from"./hover-card.module.js";import{createContext as n,useRef as r}from"react";import{useSignalEffect as i,useSignals as a}from"@cascivo/core";import{jsx as o}from"react/jsx-runtime";var s=n(null);function HoverCard({children:t,openDelay:n=300,closeDelay:a=100}){let c=e(),l=r(void 0),u=r(void 0),d=r(n);d.current=n;let f=r(a);f.current=a;let p={...c,open:()=>{clearTimeout(u.current),l.current=setTimeout(()=>{c.isOpen.value=!0},d.current)},close:()=>{clearTimeout(l.current),u.current=setTimeout(()=>{c.isOpen.value=!1},f.current)}};return i(()=>()=>{clearTimeout(l.current),clearTimeout(u.current)}),o(s.Provider,{value:p,children:t})}function HoverCardTriggerInner({ctx:e,children:n}){a();let{triggerRef:r,anchorName:i,open:s,close:c}=e;return o(`span`,{ref:r,style:{anchorName:i},onMouseEnter:s,onMouseLeave:c,onFocus:s,onBlur:c,className:t.trigger,children:n})}function HoverCardTrigger({children:e}){return o(s.Consumer,{children:t=>{if(!t)throw Error(`HoverCardTrigger must be inside <HoverCard>`);return o(HoverCardTriggerInner,{ctx:t,children:e})}})}function HoverCardContentInner({ctx:e,children:n,className:r}){a();let{popoverRef:i,anchorName:s,isOpen:c,open:l,close:u}=e;return o(`div`,{ref:i,popover:`auto`,role:`complementary`,"data-state":c.value?`open`:`closed`,style:{positionAnchor:s},onMouseEnter:l,onMouseLeave:u,className:[t.content,r].filter(Boolean).join(` `),children:n})}function HoverCardContent({children:e,className:t}){return o(s.Consumer,{children:n=>{if(!n)throw Error(`HoverCardContent must be inside <HoverCard>`);return o(HoverCardContentInner,{ctx:n,...t!==void 0&&{className:t},children:e})}})}export{HoverCard,HoverCardContent,HoverCardTrigger};
@@ -1,6 +1 @@
1
- var e = {
2
- trigger: "_trigger_p0sib_2",
3
- content: "_content_p0sib_7"
4
- };
5
- //#endregion
6
- export { e as default };
1
+ var e={trigger:`_trigger_1nu6v_2`,content:`_content_1nu6v_7`};export{e as default};
@@ -1,19 +1 @@
1
- import e from "./icon-button.module.js";
2
- import { Slot as t, cn as n } from "@cascivo/core/pure";
3
- import { forwardRef as r } from "react";
4
- import { jsx as i } from "react/jsx-runtime";
5
- //#region ../components/src/icon-button/icon-button.tsx
6
- var a = r(function({ label: r, ariaLabel: a, icon: o, size: s = "md", variant: c = "ghost", asChild: l = !1, className: u, children: d, ...f }, p) {
7
- return /* @__PURE__ */ i(l ? t : "button", {
8
- type: l ? void 0 : "button",
9
- "aria-label": r ?? a,
10
- "data-size": s,
11
- "data-variant": c,
12
- className: n(e.iconButton, u),
13
- ref: p,
14
- ...f,
15
- children: d ?? o
16
- });
17
- });
18
- //#endregion
19
- export { a as IconButton };
1
+ import e from"./icon-button.module.js";import{Slot as t,cn as n}from"@cascivo/core/pure";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=r(function({label:r,ariaLabel:a,icon:o,size:s=`md`,variant:c=`ghost`,asChild:l=!1,className:u,children:d,...f},p){return i(l?t:`button`,{type:l?void 0:`button`,"aria-label":r??a,"data-size":s,"data-variant":c,className:n(e.iconButton,u),ref:p,...f,children:d??o})});export{a as IconButton};
@@ -1,3 +1 @@
1
- var e = { iconButton: "_iconButton_1f9hf_2" };
2
- //#endregion
3
- export { e as default };
1
+ var e={iconButton:`_iconButton_1f9hf_2`};export{e as default};
@@ -1,64 +1 @@
1
- "use client";
2
-
3
- import e from "./image.module.js";
4
- import { cn as t, createMachine as n, useMachine as r, useSignals as i } from "@cascivo/core";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
- //#region ../components/src/image/image.tsx
7
- var s = n({
8
- initial: "loading",
9
- states: {
10
- loading: { on: {
11
- LOADED: "loaded",
12
- ERROR: "error"
13
- } },
14
- loaded: {},
15
- error: {}
16
- }
17
- });
18
- function c({ src: n, alt: c = "", fallbackSrc: l, width: u, height: d, radius: f = "md", zoom: p = !1, removeWrapper: m = !1, isBlurred: h = !1, className: g, style: _, ...v }) {
19
- i();
20
- let [y, b] = r(s), x = y.value === "error", S = x && !l, C = x && l ? l : n, w = {
21
- ...u !== void 0 && { inlineSize: u },
22
- ...d !== void 0 && { blockSize: d }
23
- };
24
- return m ? /* @__PURE__ */ a("img", {
25
- className: t(e.image, g),
26
- src: C,
27
- alt: c,
28
- onLoad: () => b("LOADED"),
29
- onError: () => b("ERROR"),
30
- style: {
31
- ...w,
32
- ..._
33
- },
34
- ...v
35
- }) : /* @__PURE__ */ o("span", {
36
- "data-state": y.value,
37
- "data-radius": f,
38
- "data-zoom": p || void 0,
39
- "data-blurred": h || void 0,
40
- className: t(e.wrapper, g),
41
- style: {
42
- ...w,
43
- ..._
44
- },
45
- role: S ? "img" : void 0,
46
- "aria-label": S ? c : void 0,
47
- children: [y.value === "loading" && /* @__PURE__ */ a("span", {
48
- className: e.placeholder,
49
- "aria-hidden": "true"
50
- }), S ? /* @__PURE__ */ a("span", {
51
- className: e.fallback,
52
- "aria-hidden": "true"
53
- }) : /* @__PURE__ */ a("img", {
54
- className: e.image,
55
- src: C,
56
- alt: c,
57
- onLoad: () => b("LOADED"),
58
- onError: () => b("ERROR"),
59
- ...v
60
- })]
61
- });
62
- }
63
- //#endregion
64
- export { c as Image };
1
+ "use client";import e from"./image.module.js";import{cn as t,createMachine as n,useMachine as r,useSignals as i}from"@cascivo/core";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=n({initial:`loading`,states:{loading:{on:{LOADED:`loaded`,ERROR:`error`}},loaded:{},error:{}}});function Image({src:n,alt:c=``,fallbackSrc:l,width:u,height:d,radius:f=`md`,zoom:p=!1,removeWrapper:m=!1,isBlurred:h=!1,className:g,style:_,...v}){i();let[y,b]=r(s),x=y.value===`error`,S=x&&!l,C=x&&l?l:n,w={...u!==void 0&&{inlineSize:u},...d!==void 0&&{blockSize:d}};return m?a(`img`,{className:t(e.image,g),src:C,alt:c,onLoad:()=>b(`LOADED`),onError:()=>b(`ERROR`),style:{...w,..._},...v}):o(`span`,{"data-state":y.value,"data-radius":f,"data-zoom":p||void 0,"data-blurred":h||void 0,className:t(e.wrapper,g),style:{...w,..._},role:S?`img`:void 0,"aria-label":S?c:void 0,children:[y.value===`loading`&&a(`span`,{className:e.placeholder,"aria-hidden":`true`}),S?a(`span`,{className:e.fallback,"aria-hidden":`true`}):a(`img`,{className:e.image,src:C,alt:c,onLoad:()=>b(`LOADED`),onError:()=>b(`ERROR`),...v})]})}export{Image};
@@ -1,9 +1 @@
1
- var e = {
2
- wrapper: "_wrapper_1cf1d_2",
3
- image: "_image_1cf1d_28",
4
- placeholder: "_placeholder_1cf1d_47",
5
- "cascade-image-shimmer": "_cascade-image-shimmer_1cf1d_1",
6
- fallback: "_fallback_1cf1d_66"
7
- };
8
- //#endregion
9
- export { e as default };
1
+ var e={wrapper:`_wrapper_192mo_2`,image:`_image_192mo_28`,placeholder:`_placeholder_192mo_47`,fallback:`_fallback_192mo_82`};export{e as default};
@@ -1,16 +1 @@
1
- import e from "./indicator.module.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- //#region ../components/src/indicator/indicator.tsx
4
- function r({ children: r, overlay: i, placement: a = "top-end", className: o }) {
5
- return /* @__PURE__ */ n("div", {
6
- className: [e.indicator, o].filter(Boolean).join(" "),
7
- "data-placement": a,
8
- children: [r, /* @__PURE__ */ t("div", {
9
- className: e.overlay,
10
- "aria-hidden": !0,
11
- children: i
12
- })]
13
- });
14
- }
15
- //#endregion
16
- export { r as Indicator };
1
+ import e from"./indicator.module.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function Indicator({children:r,overlay:i,placement:a=`top-end`,className:o}){return n(`div`,{className:[e.indicator,o].filter(Boolean).join(` `),"data-placement":a,children:[r,t(`div`,{className:e.overlay,"aria-hidden":!0,children:i})]})}export{Indicator};
@@ -1,6 +1 @@
1
- var e = {
2
- indicator: "_indicator_12iz3_2",
3
- overlay: "_overlay_12iz3_7"
4
- };
5
- //#endregion
6
- export { e as default };
1
+ var e={indicator:`_indicator_12iz3_2`,overlay:`_overlay_12iz3_7`};export{e as default};
@@ -1,49 +1 @@
1
- "use client";
2
-
3
- import { Spinner as e } from "../spinner/spinner.js";
4
- import t from "./infinite-scroll.module.js";
5
- import { useRef as n } from "react";
6
- import { cn as r, useSignal as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
7
- import { builtin as s, t as c } from "@cascivo/i18n";
8
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
- //#region ../components/src/infinite-scroll/infinite-scroll.tsx
10
- function d({ onLoadMore: d, disabled: f = !1, rootMargin: p = "200px", labels: m, className: h }) {
11
- o();
12
- let g = n(null), _ = i(!1), v = n(d);
13
- v.current = d;
14
- let y = n(f);
15
- y.current = f;
16
- let b = () => {
17
- _.value || y.current || (_.value = !0, Promise.resolve(v.current()).then(() => {
18
- _.value = !1;
19
- }, () => {
20
- _.value = !1;
21
- }));
22
- }, x = n(b);
23
- return x.current = b, a(() => {
24
- let e = g.current;
25
- if (!e || f || typeof IntersectionObserver > "u") return;
26
- let t = new IntersectionObserver((e) => {
27
- e.some((e) => e.isIntersecting) && x.current();
28
- }, { rootMargin: p });
29
- return t.observe(e), () => t.disconnect();
30
- }), f ? null : /* @__PURE__ */ l("div", {
31
- ref: g,
32
- className: r(t.root, h),
33
- children: _.value ? /* @__PURE__ */ u("span", {
34
- className: t.status,
35
- role: "status",
36
- children: [/* @__PURE__ */ l(e, {
37
- size: "sm",
38
- "aria-hidden": "true"
39
- }), m?.loading ?? c(s.infiniteScroll.loading)]
40
- }) : /* @__PURE__ */ l("button", {
41
- type: "button",
42
- className: t.button,
43
- onClick: b,
44
- children: m?.loadMore ?? c(s.infiniteScroll.loadMore)
45
- })
46
- });
47
- }
48
- //#endregion
49
- export { d as InfiniteScroll };
1
+ "use client";import{Spinner as e}from"../spinner/spinner.js";import t from"./infinite-scroll.module.js";import{useRef as n}from"react";import{cn as r,useSignal as i,useSignalEffect as a,useSignals as o}from"@cascivo/core";import{builtin as s,t as c}from"@cascivo/i18n";import{jsx as l,jsxs as u}from"react/jsx-runtime";function InfiniteScroll({onLoadMore:d,disabled:f=!1,rootMargin:p=`200px`,labels:m,className:h}){o();let g=n(null),_=i(!1),v=n(d);v.current=d;let y=n(f);y.current=f;let load=()=>{_.value||y.current||(_.value=!0,Promise.resolve(v.current()).then(()=>{_.value=!1},()=>{_.value=!1}))},b=n(load);return b.current=load,a(()=>{let e=g.current;if(!e||f||typeof IntersectionObserver>`u`)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&b.current()},{rootMargin:p});return t.observe(e),()=>t.disconnect()}),f?null:l(`div`,{ref:g,className:r(t.root,h),children:_.value?u(`span`,{className:t.status,role:`status`,children:[l(e,{size:`sm`,"aria-hidden":`true`}),m?.loading??c(s.infiniteScroll.loading)]}):l(`button`,{type:`button`,className:t.button,onClick:load,children:m?.loadMore??c(s.infiniteScroll.loadMore)})})}export{InfiniteScroll};
@@ -1,7 +1 @@
1
- var e = {
2
- root: "_root_50go8_2",
3
- status: "_status_50go8_9",
4
- button: "_button_50go8_17"
5
- };
6
- //#endregion
7
- export { e as default };
1
+ var e={root:`_root_50go8_2`,status:`_status_50go8_9`,button:`_button_50go8_17`};export{e as default};
@@ -1,74 +1 @@
1
- import { Spinner as e } from "../spinner/spinner.js";
2
- import t from "./inline-loading.module.js";
3
- import { cn as n } from "@cascivo/core/pure";
4
- import { builtin as r, t as i } from "@cascivo/i18n";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
- //#region ../components/src/inline-loading/inline-loading.tsx
7
- function s(e, t) {
8
- switch (e) {
9
- case "active": return t?.active ?? i(r.inlineLoading.active);
10
- case "finished": return t?.finished ?? i(r.inlineLoading.finished);
11
- case "error": return t?.error ?? i(r.inlineLoading.error);
12
- default: return "";
13
- }
14
- }
15
- function c({ status: n }) {
16
- return n === "active" ? /* @__PURE__ */ a(e, {
17
- size: "sm",
18
- className: t.spinner
19
- }) : n === "finished" ? /* @__PURE__ */ a("svg", {
20
- className: t.icon,
21
- viewBox: "0 0 16 16",
22
- width: "16",
23
- height: "16",
24
- fill: "none",
25
- "aria-hidden": "true",
26
- children: /* @__PURE__ */ a("path", {
27
- d: "M3.5 8.5l3 3 6-7",
28
- stroke: "currentColor",
29
- strokeWidth: "1.75",
30
- strokeLinecap: "round",
31
- strokeLinejoin: "round"
32
- })
33
- }) : n === "error" ? /* @__PURE__ */ o("svg", {
34
- className: t.icon,
35
- viewBox: "0 0 16 16",
36
- width: "16",
37
- height: "16",
38
- fill: "none",
39
- "aria-hidden": "true",
40
- children: [/* @__PURE__ */ a("path", {
41
- d: "M8 4.5v4M8 11h.01",
42
- stroke: "currentColor",
43
- strokeWidth: "1.75",
44
- strokeLinecap: "round",
45
- strokeLinejoin: "round"
46
- }), /* @__PURE__ */ a("circle", {
47
- cx: "8",
48
- cy: "8",
49
- r: "6.25",
50
- stroke: "currentColor",
51
- strokeWidth: "1.5"
52
- })]
53
- }) : null;
54
- }
55
- function l({ status: e, label: r, labels: i, className: l, ...u }) {
56
- let d = r ?? s(e, i);
57
- return /* @__PURE__ */ o("div", {
58
- role: "status",
59
- "aria-live": "polite",
60
- "data-status": e,
61
- className: n(t["inline-loading"], l),
62
- ...u,
63
- children: [/* @__PURE__ */ a("span", {
64
- className: t.indicator,
65
- "aria-hidden": "true",
66
- children: /* @__PURE__ */ a(c, { status: e })
67
- }), d && /* @__PURE__ */ a("span", {
68
- className: t.label,
69
- children: d
70
- })]
71
- });
72
- }
73
- //#endregion
74
- export { l as InlineLoading };
1
+ import{Spinner as e}from"../spinner/spinner.js";import t from"./inline-loading.module.js";import{cn as n}from"@cascivo/core/pure";import{builtin as r,t as i}from"@cascivo/i18n";import{jsx as a,jsxs as o}from"react/jsx-runtime";function defaultLabel(e,t){switch(e){case`active`:return t?.active??i(r.inlineLoading.active);case`finished`:return t?.finished??i(r.inlineLoading.finished);case`error`:return t?.error??i(r.inlineLoading.error);default:return``}}function StatusIcon({status:n}){return n===`active`?a(e,{size:`sm`,className:t.spinner}):n===`finished`?a(`svg`,{className:t.icon,viewBox:`0 0 16 16`,width:`16`,height:`16`,fill:`none`,"aria-hidden":`true`,children:a(`path`,{d:`M3.5 8.5l3 3 6-7`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`})}):n===`error`?o(`svg`,{className:t.icon,viewBox:`0 0 16 16`,width:`16`,height:`16`,fill:`none`,"aria-hidden":`true`,children:[a(`path`,{d:`M8 4.5v4M8 11h.01`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`}),a(`circle`,{cx:`8`,cy:`8`,r:`6.25`,stroke:`currentColor`,strokeWidth:`1.5`})]}):null}function InlineLoading({status:e,label:r,labels:i,className:s,...c}){let l=r??defaultLabel(e,i);return o(`div`,{role:`status`,"aria-live":`polite`,"data-status":e,className:n(t[`inline-loading`],s),...c,children:[a(`span`,{className:t.indicator,"aria-hidden":`true`,children:a(StatusIcon,{status:e})}),l&&a(`span`,{className:t.label,children:l})]})}export{InlineLoading};
@@ -1,9 +1 @@
1
- var e = {
2
- "inline-loading": "_inline-loading_h27o5_2",
3
- indicator: "_indicator_h27o5_20",
4
- spinner: "_spinner_h27o5_29",
5
- icon: "_icon_h27o5_33",
6
- label: "_label_h27o5_46"
7
- };
8
- //#endregion
9
- export { e as default };
1
+ var e={"inline-loading":`_inline-loading_h27o5_2`,indicator:`_indicator_h27o5_20`,spinner:`_spinner_h27o5_29`,icon:`_icon_h27o5_33`,label:`_label_h27o5_46`};export{e as default};