@tempots/beatui 0.94.0 → 1.0.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 (279) hide show
  1. package/dist/ar-CuI1Jgt6.cjs +1 -0
  2. package/dist/{ar-8Cko5i-Z.js → ar-DaKbK_t8.js} +88 -11
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/{auth-divider-Rt0WDKAe.js → auth-divider-BQIhr3-R.js} +99 -98
  6. package/dist/auth-divider-DvnUModP.cjs +1 -0
  7. package/dist/beatui.css +1628 -541
  8. package/dist/beatui.tailwind.css +1629 -542
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +9 -9
  11. package/dist/codehighlight/index.cjs.js +22 -0
  12. package/dist/codehighlight/index.es.js +76 -0
  13. package/dist/colors-B-p6IzX9.cjs +1 -0
  14. package/dist/{colors-BY0Ja_bf.js → colors-DwufPN8S.js} +18 -18
  15. package/dist/{de-Bt-d2iKj.js → de-3MTPDS1i.js} +83 -6
  16. package/dist/de-DthHehbh.cjs +1 -0
  17. package/dist/{deep-merge-CoLO4id0.js → deep-merge-BzIheQtH.js} +511 -517
  18. package/dist/deep-merge-EkjEgK0N.cjs +1 -0
  19. package/dist/{duration-input-47x7nbGh.cjs → duration-input-ClgYjeBa.cjs} +1 -1
  20. package/dist/{duration-input-DrVonjKK.js → duration-input-DGzmIImj.js} +5 -5
  21. package/dist/{editor-toolbar-group-CzdBZ1yr.js → editor-toolbar-group-Crlu1QJw.js} +3 -3
  22. package/dist/{editor-toolbar-group-DhKJdqER.cjs → editor-toolbar-group-mkL4QozO.cjs} +1 -1
  23. package/dist/es-B6GJLk9h.cjs +1 -0
  24. package/dist/{es-2llfNFX2.js → es-DwMUvBeU.js} +95 -18
  25. package/dist/{fa-CQVIBjKP.js → fa-0rvQiKrJ.js} +88 -11
  26. package/dist/fa-BwgP93iV.cjs +1 -0
  27. package/dist/{fr-CC3smTlW.js → fr-B4i6NzLl.js} +87 -10
  28. package/dist/fr-CQzk5zqY.cjs +1 -0
  29. package/dist/{he-CZilsN75.js → he-C71n-hsn.js} +88 -11
  30. package/dist/he-DcxxvRfs.cjs +1 -0
  31. package/dist/hi-D-KHVWg4.cjs +1 -0
  32. package/dist/{hi-CAZjwGv-.js → hi-xmrXpeVU.js} +88 -11
  33. package/dist/index-B5MAsOC-.cjs +1 -0
  34. package/dist/{index-B8cqD9ny.js → index-C3o9GSH6.js} +106 -105
  35. package/dist/index.cjs.js +4 -4
  36. package/dist/index.es.js +8055 -5285
  37. package/dist/input-container-BvEcp7FU.js +275 -0
  38. package/dist/input-container-Di1YvVB_.cjs +1 -0
  39. package/dist/{it-D6RXFIL6.js → it-CDZTtOBC.js} +84 -7
  40. package/dist/it-D344Dutu.cjs +1 -0
  41. package/dist/ja-BNgnDZ27.cjs +1 -0
  42. package/dist/{ja-D7zsz4Ij.js → ja-Zz1LzidW.js} +92 -15
  43. package/dist/json-schema/index.cjs.js +1 -1
  44. package/dist/json-schema/index.es.js +261 -257
  45. package/dist/json-schema-display/index.cjs.js +1 -1
  46. package/dist/json-schema-display/index.es.js +2 -2
  47. package/dist/json-structure/index.cjs.js +1 -1
  48. package/dist/json-structure/index.es.js +132 -133
  49. package/dist/{ko-taN2Npr4.js → ko-9laUsZDL.js} +91 -14
  50. package/dist/ko-D-WJ9NK7.cjs +1 -0
  51. package/dist/lexical/index.cjs.js +2 -39
  52. package/dist/lexical/index.es.js +2102 -20521
  53. package/dist/markdown/index.cjs.js +1 -1
  54. package/dist/markdown/index.es.js +41 -4
  55. package/dist/{menu-CV85y3Xf.js → menu-B8yoDMRS.js} +23 -23
  56. package/dist/menu-B92oSDct.cjs +1 -0
  57. package/dist/modal-BT0jjDqX.cjs +1 -0
  58. package/dist/{modal-ZitwUeXx.js → modal-DBguyX-b.js} +9 -9
  59. package/dist/monaco/index.cjs.js +2 -2
  60. package/dist/monaco/index.es.js +7 -7
  61. package/dist/nl-CrqUlFie.cjs +1 -0
  62. package/dist/{nl-CRC6r4Q4.js → nl-Dcll9fVA.js} +87 -10
  63. package/dist/{notice-E_p2hg1G.js → notice-E19wu9lA.js} +51 -51
  64. package/dist/notice-_9XhdrFw.cjs +1 -0
  65. package/dist/oneof-branch-detection-J_DYEEcD.js +1077 -0
  66. package/dist/oneof-branch-detection-ZUBZ6hqy.cjs +1 -0
  67. package/dist/pl-9UksIrvX.cjs +1 -0
  68. package/dist/{pl-C6qNs0Lq.js → pl-Dm9N9Gbr.js} +84 -7
  69. package/dist/prosemirror/index.cjs.js +3 -1
  70. package/dist/prosemirror/index.es.js +636 -4
  71. package/dist/{pt-CcWPLqBh.js → pt-CFi5cn0k.js} +89 -12
  72. package/dist/pt-_kfdzwqi.cjs +1 -0
  73. package/dist/{ru-Dt9-9m0E.js → ru-CEhZUw8R.js} +92 -15
  74. package/dist/ru-CW1WNNlr.cjs +1 -0
  75. package/dist/stack-BLMteGTn.js +15 -0
  76. package/dist/stack-dwLevGa2.cjs +1 -0
  77. package/dist/tailwind/preset.cjs.js +1 -1
  78. package/dist/tailwind/preset.es.js +2 -2
  79. package/dist/tailwind/vite-plugin.cjs.js +1 -1
  80. package/dist/tailwind/vite-plugin.es.js +1 -1
  81. package/dist/text-input-DfqXolVe.js +55 -0
  82. package/dist/text-input-X_q01NsY.cjs +1 -0
  83. package/dist/toolbar-DY0ax2Qd.js +130 -0
  84. package/dist/toolbar-DoKdYXIL.cjs +1 -0
  85. package/dist/tr-B6GIRegf.cjs +1 -0
  86. package/dist/{tr-CDTWeRY0.js → tr-ZmnVDhLP.js} +83 -6
  87. package/dist/{translations-NBY7SubC.js → translations-A4kR7CW8.js} +1 -1
  88. package/dist/{translations-CiBhB2FV.js → translations-B1_yyDUK.js} +185 -106
  89. package/dist/{translations-BdCtLBZt.cjs → translations-C81buKAw.cjs} +1 -1
  90. package/dist/translations-Dbx7L7Q1.cjs +1 -0
  91. package/dist/types/beatui-i18n/default.d.ts +72 -0
  92. package/dist/types/beatui-i18n/locales/en.d.ts +72 -0
  93. package/dist/types/beatui-i18n/translations.d.ts +72 -0
  94. package/dist/types/codehighlight/code-highlight.d.ts +21 -0
  95. package/dist/types/codehighlight/index.d.ts +14 -0
  96. package/dist/types/components/button/toggle-button.d.ts +4 -4
  97. package/dist/types/components/data/avatar.d.ts +3 -1
  98. package/dist/types/components/data/badge.d.ts +10 -18
  99. package/dist/types/components/data/column-filter-panel.d.ts +31 -0
  100. package/dist/types/components/data/column-filter.d.ts +110 -0
  101. package/dist/types/components/data/column-header-menu.d.ts +42 -0
  102. package/dist/types/components/data/data-source.d.ts +190 -0
  103. package/dist/types/components/data/data-table-body.d.ts +12 -0
  104. package/dist/types/components/data/data-table-column-toggle.d.ts +4 -0
  105. package/dist/types/components/data/data-table-context.d.ts +53 -0
  106. package/dist/types/components/data/data-table-header.d.ts +6 -0
  107. package/dist/types/components/data/data-table-resolve.d.ts +26 -0
  108. package/dist/types/components/data/data-table-types.d.ts +201 -0
  109. package/dist/types/components/data/data-table.d.ts +38 -0
  110. package/dist/types/components/data/data-toolbar.d.ts +44 -0
  111. package/dist/types/components/data/date-picker-shared.d.ts +55 -0
  112. package/dist/types/components/data/date-picker.d.ts +58 -0
  113. package/dist/types/components/data/date-range-picker.d.ts +56 -0
  114. package/dist/types/components/data/filter.d.ts +268 -0
  115. package/dist/types/components/data/index.d.ts +13 -4
  116. package/dist/types/components/data/indicator.d.ts +41 -0
  117. package/dist/types/components/data/progress-bar.d.ts +2 -2
  118. package/dist/types/components/data/selection-checkbox.d.ts +63 -0
  119. package/dist/types/components/data/skeleton.d.ts +1 -1
  120. package/dist/types/components/data/sortable-header.d.ts +55 -0
  121. package/dist/types/components/data/unstyled-drop-zone.d.ts +2 -2
  122. package/dist/types/components/form/control/control.d.ts +9 -9
  123. package/dist/types/components/form/input/advanced-slider.d.ts +6 -6
  124. package/dist/types/components/form/input/appearance-selector.d.ts +9 -2
  125. package/dist/types/components/form/input/checkbox-input.d.ts +6 -7
  126. package/dist/types/components/form/input/color-input.d.ts +1 -1
  127. package/dist/types/components/form/input/color-swatch-input.d.ts +3 -3
  128. package/dist/types/components/form/input/combobox-input.d.ts +5 -5
  129. package/dist/types/components/form/input/combobox-tags-input.d.ts +5 -5
  130. package/dist/types/components/form/input/create-nullable-string-input.d.ts +2 -2
  131. package/dist/types/components/form/input/date-input.d.ts +4 -4
  132. package/dist/types/components/form/input/dropdown-input.d.ts +5 -5
  133. package/dist/types/components/form/input/editable-text.d.ts +2 -2
  134. package/dist/types/components/form/input/email-input.d.ts +4 -4
  135. package/dist/types/components/form/input/index.d.ts +1 -0
  136. package/dist/types/components/form/input/input-container.d.ts +1 -1
  137. package/dist/types/components/form/input/input-options.d.ts +28 -1
  138. package/dist/types/components/form/input/mask-input.d.ts +8 -2
  139. package/dist/types/components/form/input/native-select.d.ts +3 -3
  140. package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
  141. package/dist/types/components/form/input/nullable-email-input.d.ts +3 -3
  142. package/dist/types/components/form/input/nullable-rating-input.d.ts +8 -8
  143. package/dist/types/components/form/input/nullable-uuid-input.d.ts +4 -4
  144. package/dist/types/components/form/input/number-input.d.ts +3 -3
  145. package/dist/types/components/form/input/otp-input.d.ts +12 -12
  146. package/dist/types/components/form/input/rating-input.d.ts +7 -8
  147. package/dist/types/components/form/input/select-tags-input.d.ts +5 -5
  148. package/dist/types/components/form/input/switch.d.ts +2 -2
  149. package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +82 -0
  150. package/dist/types/components/form/input/uuid-input.d.ts +2 -2
  151. package/dist/types/components/json-structure/controls/uuid-control.d.ts +1 -1
  152. package/dist/types/components/layout/card.d.ts +66 -0
  153. package/dist/types/components/layout/collapse.d.ts +2 -2
  154. package/dist/types/components/layout/flex.d.ts +26 -0
  155. package/dist/types/components/layout/index.d.ts +1 -0
  156. package/dist/types/components/lexical/floating/slash-command-palette.d.ts +2 -2
  157. package/dist/types/components/lexical/toolbar/toolbar-registry.d.ts +2 -1
  158. package/dist/types/components/media/pdf-page-viewer.d.ts +8 -5
  159. package/dist/types/components/misc/index.d.ts +1 -0
  160. package/dist/types/components/misc/loading-overlay.d.ts +29 -0
  161. package/dist/types/components/misc/notice.d.ts +4 -4
  162. package/dist/types/components/misc/notification-provider.d.ts +9 -3
  163. package/dist/types/components/misc/notification.d.ts +9 -9
  164. package/dist/types/components/navigation/breadcrumbs.d.ts +1 -1
  165. package/dist/types/components/navigation/menu.d.ts +6 -6
  166. package/dist/types/components/navigation/pagination.d.ts +17 -4
  167. package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +2 -2
  168. package/dist/types/components/navigation/tabs/tabs.d.ts +17 -8
  169. package/dist/types/components/navigation/toolbar/toolbar.d.ts +12 -6
  170. package/dist/types/components/overlay/announcement-bar.d.ts +12 -4
  171. package/dist/types/components/overlay/dialogs.d.ts +2 -2
  172. package/dist/types/components/overlay/modal.d.ts +9 -2
  173. package/dist/types/components/overlay/tooltip.d.ts +6 -6
  174. package/dist/types/components/theme/types.d.ts +15 -4
  175. package/dist/types/lexical/index.d.ts +2 -2
  176. package/dist/types/lexical/plugins/index.d.ts +1 -1
  177. package/dist/types/lexical/plugins/slash-commands.d.ts +1 -1
  178. package/dist/types/lexical/plugins/text.d.ts +5 -0
  179. package/dist/types/lexical/types.d.ts +126 -5
  180. package/dist/types/lexical-i18n/default.d.ts +1 -0
  181. package/dist/types/lexical-i18n/locales/ar.d.ts +1 -0
  182. package/dist/types/lexical-i18n/locales/de.d.ts +1 -0
  183. package/dist/types/lexical-i18n/locales/en.d.ts +1 -0
  184. package/dist/types/lexical-i18n/locales/es.d.ts +1 -0
  185. package/dist/types/lexical-i18n/locales/fa.d.ts +1 -0
  186. package/dist/types/lexical-i18n/locales/fr.d.ts +1 -0
  187. package/dist/types/lexical-i18n/locales/he.d.ts +1 -0
  188. package/dist/types/lexical-i18n/locales/hi.d.ts +1 -0
  189. package/dist/types/lexical-i18n/locales/it.d.ts +1 -0
  190. package/dist/types/lexical-i18n/locales/ja.d.ts +1 -0
  191. package/dist/types/lexical-i18n/locales/ko.d.ts +1 -0
  192. package/dist/types/lexical-i18n/locales/nl.d.ts +1 -0
  193. package/dist/types/lexical-i18n/locales/pl.d.ts +1 -0
  194. package/dist/types/lexical-i18n/locales/pt.d.ts +1 -0
  195. package/dist/types/lexical-i18n/locales/ru.d.ts +1 -0
  196. package/dist/types/lexical-i18n/locales/tr.d.ts +1 -0
  197. package/dist/types/lexical-i18n/locales/ur.d.ts +1 -0
  198. package/dist/types/lexical-i18n/locales/vi.d.ts +1 -0
  199. package/dist/types/lexical-i18n/locales/zh.d.ts +1 -0
  200. package/dist/types/tokens/z-index.d.ts +18 -18
  201. package/dist/types/utils/use-animated-toggle.d.ts +12 -4
  202. package/dist/ur-CtFl_tz6.cjs +1 -0
  203. package/dist/{ur-CLrK5FPQ.js → ur-yYgj3NmT.js} +88 -11
  204. package/dist/use-animated-toggle-C3asw_Sg.js +207 -0
  205. package/dist/use-animated-toggle-cKcuItmz.cjs +1 -0
  206. package/dist/use-form-CaW192gw.cjs +2 -0
  207. package/dist/{use-form-BQRVnIp9.js → use-form-Dn6v2tEh.js} +153 -152
  208. package/dist/utils-DmEuG3Np.cjs +1 -0
  209. package/dist/utils-vUtP6iPG.js +165 -0
  210. package/dist/{vi-B1_QDUQJ.js → vi-D5u4CLQO.js} +89 -12
  211. package/dist/vi-DyCZSpsk.cjs +1 -0
  212. package/dist/widget-customization-DgW1SXN6.cjs +1 -0
  213. package/dist/{widget-customization-C-fSx3RB.js → widget-customization-Dkx7kNSe.js} +413 -398
  214. package/dist/{zh-rDtQ92Pp.js → zh-B0kwMMer.js} +91 -14
  215. package/dist/zh-C3ZxMQKb.cjs +1 -0
  216. package/package.json +209 -38
  217. package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -1
  218. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  219. package/dist/ar-D2DjoXta.cjs +0 -1
  220. package/dist/auth-divider-C3E16pml.cjs +0 -1
  221. package/dist/colors-BI0YhONJ.cjs +0 -1
  222. package/dist/de-Cdf3432J.cjs +0 -1
  223. package/dist/deep-merge-Blrucd-E.cjs +0 -1
  224. package/dist/es-6fFPkKHL.cjs +0 -1
  225. package/dist/fa-GXyNzAXz.cjs +0 -1
  226. package/dist/fr-C6EYTwSH.cjs +0 -1
  227. package/dist/he-CJUgxvi8.cjs +0 -1
  228. package/dist/hi-DqIR4VtX.cjs +0 -1
  229. package/dist/hls.light.min-C6xKDzRR.cjs +0 -27
  230. package/dist/hls.light.min-hEMf_E8u.js +0 -8311
  231. package/dist/index-1JaBwDB-.js +0 -921
  232. package/dist/index-B-cwxUsP.cjs +0 -1
  233. package/dist/index-BFzxpY7y.js +0 -68
  234. package/dist/index-BOC0cVoY.cjs +0 -36
  235. package/dist/index-CN10Cyqr.cjs +0 -1
  236. package/dist/index-CTcbhnPw.cjs +0 -4
  237. package/dist/index-DF7RFzD9.cjs +0 -1
  238. package/dist/index-DJ9YIJcG.js +0 -14308
  239. package/dist/index-DfPkCwdC.js +0 -2709
  240. package/dist/input-container-9r1F3KuX.js +0 -263
  241. package/dist/input-container-DiYEl_y8.cjs +0 -1
  242. package/dist/it-BvHsJ7fH.cjs +0 -1
  243. package/dist/ja-B2gP7OHY.cjs +0 -1
  244. package/dist/ko-BddhddIA.cjs +0 -1
  245. package/dist/menu-De_-sGeb.cjs +0 -1
  246. package/dist/modal-DUlqGUW7.cjs +0 -1
  247. package/dist/nl-COrtZUnH.cjs +0 -1
  248. package/dist/notice-DAVOTnfA.cjs +0 -1
  249. package/dist/oneof-branch-detection-D6Xa8qNR.cjs +0 -8
  250. package/dist/oneof-branch-detection-DCPwyutI.js +0 -6290
  251. package/dist/pl-BHI4zBgV.cjs +0 -1
  252. package/dist/pt-BGzC9MhU.cjs +0 -1
  253. package/dist/ru-CXeFbIPb.cjs +0 -1
  254. package/dist/stack-4VUGISn6.cjs +0 -1
  255. package/dist/stack-Bm-UZosx.js +0 -879
  256. package/dist/string-B9vVyfq3.cjs +0 -1
  257. package/dist/string-DYyMxBl-.js +0 -19
  258. package/dist/text-input-BgPx8BbG.js +0 -45
  259. package/dist/text-input-DUnhBUd6.cjs +0 -1
  260. package/dist/timer-BJHOsuS6.cjs +0 -1
  261. package/dist/timer-Rd2sKnvH.js +0 -65
  262. package/dist/toolbar-DKOh_gbA.js +0 -118
  263. package/dist/toolbar-Dkc2y1dI.cjs +0 -1
  264. package/dist/tr-CdOtQAtA.cjs +0 -1
  265. package/dist/translations-Cy9hoMGV.cjs +0 -1
  266. package/dist/types/components/data/calendar-shared.d.ts +0 -59
  267. package/dist/types/components/data/calendar.d.ts +0 -107
  268. package/dist/types/components/data/icon-badge.d.ts +0 -14
  269. package/dist/types/components/data/range-calendar.d.ts +0 -104
  270. package/dist/types/components/data/tag.d.ts +0 -51
  271. package/dist/ur-C7itXvnC.cjs +0 -1
  272. package/dist/use-animated-toggle-C7PTmnZi.js +0 -195
  273. package/dist/use-animated-toggle-DrqK7nUS.cjs +0 -1
  274. package/dist/use-form-DTyNw0kM.cjs +0 -2
  275. package/dist/utils-DEbsp9Q9.js +0 -129
  276. package/dist/utils-DIUEhA-Z.cjs +0 -1
  277. package/dist/vi-CQrUWB3y.cjs +0 -1
  278. package/dist/widget-customization-xEBfEPhQ.cjs +0 -1
  279. package/dist/zh-DWswYYTS.cjs +0 -1
@@ -1,112 +1,10 @@
1
- import { Use as q, coalesce as G, aria as V, attr as c, on as E, html as m, Value as C, Empty as T, computedOf as k, When as A, dataAttr as P, TextNode as J, prop as w, Fragment as $, emitValueAsNumber as Q, emitValue as X } from "@tempots/dom";
2
- import { B as Y, I as z } from "./translations-CiBhB2FV.js";
3
- import { B as Z, I as ee } from "./input-container-9r1F3KuX.js";
4
- import { M as te, L as se, i as g } from "./stack-Bm-UZosx.js";
1
+ import { computedOf as k, html as m, attr as c, Value as C, Empty as T, When as A, dataAttr as P, aria as x, Use as q, coalesce as G, on as E, TextNode as J, prop as w, Fragment as $, emitValueAsNumber as Q, emitValue as X } from "@tempots/dom";
2
+ import { B as Y, I as L } from "./translations-B1_yyDUK.js";
3
+ import { B as Z, I as ee } from "./input-container-BvEcp7FU.js";
4
+ import { L as te, M as se } from "./stack-BLMteGTn.js";
5
5
  import { s as j } from "./session-id-3KiilioY.js";
6
- const S = (s, e) => s === e || s !== s && e !== e;
7
- function we({
8
- size: s = "sm",
9
- icon: e = "line-md:close",
10
- disabled: t,
11
- roundedness: n = "full",
12
- color: i = "base",
13
- onClick: o,
14
- label: a
15
- }, ...r) {
16
- return q(Y, (l) => {
17
- const d = G(a, l.$.closeModal);
18
- return Z(
19
- {
20
- variant: "text",
21
- size: s,
22
- roundedness: n,
23
- disabled: t,
24
- color: i,
25
- onClick: o
26
- },
27
- c.title(d),
28
- V.label(d),
29
- ...r,
30
- z({ icon: e, size: s ?? "sm" })
31
- );
32
- });
33
- }
34
- const De = (s) => {
35
- const {
36
- value: e,
37
- onBlur: t,
38
- onChange: n,
39
- onInput: i,
40
- placeholder: o,
41
- disabled: a,
42
- id: r,
43
- checkedIcon: l,
44
- uncheckedIcon: d,
45
- iconSize: u = "lg"
46
- } = s, p = r ?? j("checkbox"), v = `${p}-label`, y = () => {
47
- if (C.get(a ?? !1)) return;
48
- const h = C.get(e);
49
- n?.(!h), i?.(!h);
50
- }, f = (h) => {
51
- C.get(a ?? !1) || (h.key === " " || h.key === "Enter") && (h.preventDefault(), y());
52
- };
53
- return ee(
54
- {
55
- baseContainer: !0,
56
- growInput: !1,
57
- ...s,
58
- input: m.span(
59
- c.class("bc-checkbox-input"),
60
- m.span(
61
- c.class("bc-checkbox-input__checkbox"),
62
- c.class(
63
- C.map(
64
- e,
65
- (h) => h ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
66
- )
67
- ),
68
- c.class(
69
- C.map(
70
- a ?? !1,
71
- (h) => h ? "bc-checkbox-input__checkbox--disabled" : ""
72
- )
73
- ),
74
- c.id(p),
75
- c.role("checkbox"),
76
- c.tabindex(
77
- C.map(
78
- a ?? !1,
79
- (h) => h ? -1 : 0
80
- )
81
- ),
82
- V.checked(e),
83
- V.disabled(a),
84
- o != null ? V.labelledby(v) : T,
85
- E.keydown(f),
86
- t != null ? E.blur(t) : T,
87
- z({
88
- icon: k(
89
- e,
90
- l,
91
- d
92
- )(
93
- (h, D, I) => h ? D ?? "akar-icons/check-box-fill" : I ?? "akar-icons/box"
94
- ),
95
- accessibility: "decorative",
96
- size: u
97
- })
98
- ),
99
- o != null ? m.label(
100
- c.class("bc-checkbox-input__label"),
101
- c.id(v),
102
- c.for(p),
103
- te(o)
104
- ) : T
105
- )
106
- },
107
- E.click(y)
108
- );
109
- }, ne = m.span(
6
+ import { Validation as g, strictEqual as V } from "@tempots/std";
7
+ const ne = m.span(
110
8
  c.class("bc-input-wrapper__required"),
111
9
  " *"
112
10
  );
@@ -122,7 +20,7 @@ function ae(s, e) {
122
20
  if (s === "horizontal-fixed" && e != null)
123
21
  return `--input-wrapper-label-width: ${e}`;
124
22
  }
125
- const L = ({
23
+ const z = ({
126
24
  fullWidth: s = !1,
127
25
  required: e,
128
26
  label: t,
@@ -137,7 +35,7 @@ const L = ({
137
35
  layout: p,
138
36
  labelWidth: v
139
37
  }, ...y) => {
140
- const f = d ?? r != null, h = u ?? !1, D = p ?? "vertical", I = j("input-wrapper"), x = o ? `${I}-description` : void 0, O = r != null ? `${I}-error` : void 0, H = k(D)((b) => b !== "vertical"), K = k(
38
+ const f = d ?? r != null, h = u ?? !1, D = p ?? "vertical", I = j("input-wrapper"), S = o ? `${I}-description` : void 0, O = r != null ? `${I}-error` : void 0, H = k(D)((b) => b !== "vertical"), K = k(
141
39
  D,
142
40
  v ?? void 0
143
41
  )((b, M) => ae(b, M));
@@ -183,22 +81,23 @@ const L = ({
183
81
  c.class(
184
82
  "bc-input-wrapper__description bc-input-wrapper__description--under-label"
185
83
  ),
186
- c.id(x),
84
+ c.id(S),
187
85
  o
188
86
  )
189
87
  )
190
88
  ),
191
- i != null ? se(i) : T,
89
+ i != null ? te(i) : T,
192
90
  n
193
91
  ) : T,
194
92
  m.div(
195
93
  c.class("bc-input-wrapper__content"),
196
94
  // Add data attributes to help inputs inherit accessibility information
197
- [x, O].filter(Boolean).length > 0 ? P.describedby(
198
- [x, O].filter(Boolean).join(" ")
95
+ [S, O].filter(Boolean).length > 0 ? P(
96
+ "describedby",
97
+ [S, O].filter(Boolean).join(" ")
199
98
  ) : T,
200
- e ? P.required("true") : T,
201
- A(f, () => P.invalid("true")),
99
+ e ? P("required", "true") : T,
100
+ A(f, () => P("invalid", "true")),
202
101
  a
203
102
  ),
204
103
  // Show description at bottom only when not horizontal
@@ -206,7 +105,7 @@ const L = ({
206
105
  k(H, o)((b, M) => !b && M != null),
207
106
  () => m.div(
208
107
  c.class("bc-input-wrapper__description"),
209
- c.id(x),
108
+ c.id(S),
210
109
  o
211
110
  )
212
111
  ),
@@ -215,7 +114,7 @@ const L = ({
215
114
  () => m.div(
216
115
  c.class("bc-input-wrapper__error"),
217
116
  c.id(O),
218
- V.live("polite"),
117
+ x.live("polite"),
219
118
  // Announce errors to screen readers
220
119
  c.role("alert"),
221
120
  // Mark as alert for immediate attention
@@ -224,6 +123,109 @@ const L = ({
224
123
  ),
225
124
  ...y
226
125
  );
126
+ };
127
+ function De({
128
+ size: s = "sm",
129
+ icon: e = "line-md:close",
130
+ disabled: t,
131
+ roundedness: n = "full",
132
+ color: i = "base",
133
+ onClick: o,
134
+ label: a
135
+ }, ...r) {
136
+ return q(Y, (l) => {
137
+ const d = G(a, l.$.closeModal);
138
+ return Z(
139
+ {
140
+ variant: "text",
141
+ size: s,
142
+ roundedness: n,
143
+ disabled: t,
144
+ color: i,
145
+ onClick: o
146
+ },
147
+ c.title(d),
148
+ x.label(d),
149
+ ...r,
150
+ L({ icon: e, size: s ?? "sm" })
151
+ );
152
+ });
153
+ }
154
+ const Ce = (s) => {
155
+ const {
156
+ value: e,
157
+ onBlur: t,
158
+ onChange: n,
159
+ onInput: i,
160
+ placeholder: o,
161
+ disabled: a,
162
+ id: r,
163
+ activeIcon: l,
164
+ inactiveIcon: d,
165
+ size: u = "md"
166
+ } = s, p = r ?? j("checkbox"), v = `${p}-label`, y = () => {
167
+ if (C.get(a ?? !1)) return;
168
+ const h = C.get(e);
169
+ n?.(!h), i?.(!h);
170
+ }, f = (h) => {
171
+ C.get(a ?? !1) || (h.key === " " || h.key === "Enter") && (h.preventDefault(), y());
172
+ };
173
+ return ee(
174
+ {
175
+ baseContainer: !0,
176
+ growInput: !1,
177
+ ...s,
178
+ input: m.span(
179
+ c.class("bc-checkbox-input"),
180
+ m.span(
181
+ c.class("bc-checkbox-input__checkbox"),
182
+ c.class(
183
+ C.map(
184
+ e,
185
+ (h) => h ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
186
+ )
187
+ ),
188
+ c.class(
189
+ C.map(
190
+ a ?? !1,
191
+ (h) => h ? "bc-checkbox-input__checkbox--disabled" : ""
192
+ )
193
+ ),
194
+ c.id(p),
195
+ c.role("checkbox"),
196
+ c.tabindex(
197
+ C.map(
198
+ a ?? !1,
199
+ (h) => h ? -1 : 0
200
+ )
201
+ ),
202
+ x.checked(e),
203
+ x.disabled(a),
204
+ o != null ? x.labelledby(v) : T,
205
+ E.keydown(f),
206
+ t != null ? E.blur(t) : T,
207
+ L({
208
+ icon: k(
209
+ e,
210
+ l,
211
+ d
212
+ )(
213
+ (h, D, I) => h ? D ?? "ri:checkbox-fill" : I ?? "mdi:checkbox-blank-outline"
214
+ ),
215
+ accessibility: "decorative",
216
+ size: u
217
+ })
218
+ ),
219
+ o != null ? m.label(
220
+ c.class("bc-checkbox-input__label"),
221
+ c.id(v),
222
+ c.for(p),
223
+ se(o)
224
+ ) : T
225
+ )
226
+ },
227
+ E.click(y)
228
+ );
227
229
  }, oe = (
228
230
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
229
231
  ((s, e) => () => {
@@ -246,9 +248,9 @@ function W(s, e) {
246
248
  onBlur: oe(t, n)
247
249
  });
248
250
  }
249
- function Ce(s, { id: e, labelFor: t, ...n }, ...i) {
251
+ function Te(s, { id: e, labelFor: t, ...n }, ...i) {
250
252
  const o = e ?? n.controller.name ?? j("control"), a = t ?? o;
251
- return L(
253
+ return z(
252
254
  {
253
255
  ...n,
254
256
  hasError: n.controller.errorVisible,
@@ -270,13 +272,13 @@ function le(s, e) {
270
272
  controller: a
271
273
  });
272
274
  }
273
- function Te(s, {
275
+ function _e(s, {
274
276
  id: e,
275
277
  labelFor: t,
276
278
  ...n
277
279
  }, ...i) {
278
280
  const o = e ?? n.controller.name ?? j("control");
279
- return L(
281
+ return z(
280
282
  {
281
283
  ...n,
282
284
  labelFor: t ?? o,
@@ -288,7 +290,7 @@ function Te(s, {
288
290
  ...i
289
291
  );
290
292
  }
291
- function _e(s) {
293
+ function Ie(s) {
292
294
  return s.split(".").map((t) => {
293
295
  const n = t.match(/^\[(\d+)\]$/);
294
296
  return n ? Number(n[1]) : t;
@@ -305,7 +307,7 @@ function he(s) {
305
307
  ...t.map(ce)
306
308
  ].join("");
307
309
  }
308
- const Ie = {
310
+ const Me = {
309
311
  /** A valid validation result */
310
312
  valid: g.valid,
311
313
  /**
@@ -384,7 +386,7 @@ class _ {
384
386
  * @param parent - Parent context with disabled state and optional validation mode
385
387
  * @param equals - Equality function for dirty tracking (defaults to strictEqual)
386
388
  */
387
- constructor(e, t, n, i, o, a = S) {
389
+ constructor(e, t, n, i, o, a = V) {
388
390
  this.path = e, this.change = t, this.signal = n, this.status = i, this.#s = a, this.#t.set(n.value), this.error = i.map(
389
391
  (r) => r?.type === "invalid" ? r.error?.message : void 0
390
392
  ), this.hasError = this.error.map((r) => r != null), this.touched = this.#e.touched, o.validationMode ? this.errorVisible = k(
@@ -482,7 +484,7 @@ class _ {
482
484
  * @param equals - Equality function for array comparison (defaults to strictEqual)
483
485
  * @returns An ArrayController instance
484
486
  */
485
- array = (e = S) => new de(
487
+ array = (e = V) => new de(
486
488
  this.path,
487
489
  this.change,
488
490
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -497,7 +499,7 @@ class _ {
497
499
  * @param equals - Equality function for object comparison (defaults to strictEqual)
498
500
  * @returns An ObjectController instance
499
501
  */
500
- object = (e = S) => new ue(
502
+ object = (e = V) => new ue(
501
503
  this.path,
502
504
  this.change,
503
505
  this.signal,
@@ -525,7 +527,7 @@ class _ {
525
527
  * )
526
528
  * ```
527
529
  */
528
- transform = (e, t, n = [], i = S) => new _(
530
+ transform = (e, t, n = [], i = V) => new _(
529
531
  [...this.path, ...n],
530
532
  (o) => this.change(t(o)),
531
533
  this.signal.map(e, i),
@@ -545,7 +547,7 @@ class _ {
545
547
  * @param equals - Equality function for the transformed type
546
548
  * @returns A new Controller instance managing the async-transformed value
547
549
  */
548
- asyncTransform = (e, t, n, i = [], o = S) => new _(
550
+ asyncTransform = (e, t, n, i = [], o = V) => new _(
549
551
  [...this.path, ...i],
550
552
  (a) => {
551
553
  t(a).then((r) => this.change(r));
@@ -921,7 +923,7 @@ function be({
921
923
  disabled: l,
922
924
  validationMode: d
923
925
  },
924
- n ?? S
926
+ n ?? V
925
927
  );
926
928
  return f.onDispose(() => {
927
929
  l.dispose(), a.dispose(), r.dispose(), d.dispose(), p && clearTimeout(p);
@@ -930,7 +932,7 @@ function be({
930
932
  function R(s) {
931
933
  return $(c.disabled(s.disabled), c.name(s.name));
932
934
  }
933
- function Me(s, {
935
+ function Ee(s, {
934
936
  triggerOn: e = "change"
935
937
  } = {}) {
936
938
  return $(
@@ -939,7 +941,7 @@ function Me(s, {
939
941
  (e === "input" ? E.input : E.change)(X(s.change))
940
942
  );
941
943
  }
942
- function Ee(s, {
944
+ function Ve(s, {
943
945
  triggerOn: e = "change"
944
946
  } = {}) {
945
947
  return $(
@@ -953,7 +955,7 @@ function Ee(s, {
953
955
  function N(s) {
954
956
  return s.issues != null ? g.invalid(fe(s.issues)) : g.valid;
955
957
  }
956
- async function Se({
958
+ async function xe({
957
959
  task: s,
958
960
  errorMessage: e,
959
961
  errorPath: t = ["root"],
@@ -983,7 +985,7 @@ function U(s, e) {
983
985
  }
984
986
  };
985
987
  }
986
- function Ve({
988
+ function Se({
987
989
  initialValue: s = {},
988
990
  schema: e,
989
991
  onSubmit: t = async () => g.valid,
@@ -1020,30 +1022,29 @@ function Ve({
1020
1022
  export {
1021
1023
  de as A,
1022
1024
  W as B,
1023
- we as C,
1024
- L as I,
1025
- Te as M,
1026
- S as O,
1025
+ De as C,
1026
+ z as I,
1027
+ _e as M,
1028
+ ue as O,
1027
1029
  ne as R,
1028
- De as a,
1029
- Ce as b,
1030
+ Ce as a,
1031
+ Te as b,
1030
1032
  F as c,
1031
1033
  _ as d,
1032
1034
  B as e,
1033
- ue as f,
1034
- be as g,
1035
- le as h,
1036
- Ie as i,
1037
- R as j,
1035
+ be as f,
1036
+ le as g,
1037
+ Me as h,
1038
+ R as i,
1039
+ Ve as j,
1038
1040
  Ee as k,
1039
- Me as l,
1041
+ fe as l,
1040
1042
  oe as m,
1041
- fe as n,
1042
- pe as o,
1043
- _e as p,
1044
- he as q,
1043
+ pe as n,
1044
+ he as o,
1045
+ Ie as p,
1045
1046
  N as s,
1046
- Se as t,
1047
- Ve as u,
1047
+ xe as t,
1048
+ Se as u,
1048
1049
  ce as w
1049
1050
  };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("@tempots/dom");function i(r,e,t){const s=["bc-card"];return r!=="default"&&s.push(`bc-card--${r}`),e!=="md"&&s.push(`bc-card--padding-${e}`),t!=="lg"&&s.push(`bc-card--rounded-${t}`),s.join(" ")}function d({variant:r="default",size:e="md",roundedness:t="lg"}={},...s){return u.html.div(u.attr.class(u.computedOf(r,e,t)((o,a,n)=>i(o??"default",a??"md",n??"lg"))),...s)}function g({class:r}={},...e){return u.html.div(u.attr.class(r!=null?u.Value.map(r,t=>`bc-card__header ${t}`):"bc-card__header"),...e)}function p({class:r}={},...e){return u.html.div(u.attr.class(r!=null?u.Value.map(r,t=>`bc-card__body ${t}`):"bc-card__body"),...e)}function f({class:r}={},...e){return u.html.div(u.attr.class(r!=null?u.Value.map(r,t=>`bc-card__footer ${t}`):"bc-card__footer"),...e)}function y({src:r,alt:e,height:t}){return u.html.img(u.attr.class("bc-card__cover-image"),u.attr.src(r),e!=null?u.attr.alt(e):null,t!=null?u.style.height(t):null)}const c=["description","comment","notes","text"];function b(r){if(typeof r=="boolean")return c;const e=r["x:ui"];return e&&Array.isArray(e.textAreaTriggers)?[...c,...e.textAreaTriggers]:c}function l(r){if(typeof r=="boolean")return;const e=r["x:ui"];if(e!=null&&(typeof e=="string"||typeof e=="object"&&e!==null))return e}function h(r,e){if(typeof r=="boolean")return;const t=l(r);if(typeof t=="object"&&typeof t.widget=="string")return{widget:t.widget,source:"explicit-widget",options:t};const s=typeof t=="string"?t:typeof t=="object"&&typeof t.format=="string"?t.format:void 0;if(s)return{widget:s,source:"explicit-format",options:typeof t=="object"?t:void 0};if(typeof r.format=="string")return{widget:{datetime:"date-time",base64:"binary",bytes:"binary",iri:"uri","iri-reference":"uri-reference","idn-hostname":"hostname"}[r.format]||r.format,source:"schema-format"};if(r.contentMediaType==="text/markdown")return{widget:"markdown",source:"schema-media"};if(r.contentMediaType!=null||r.contentEncoding==="base64")return{widget:"binary",source:"schema-media",options:{mediaType:r.contentMediaType,encoding:r.contentEncoding}};if(r.enum!=null)return{widget:"enum",source:"constraints"};if(r.const!=null)return{widget:"const",source:"constraints"};if((r.type==="number"||r.type==="integer"||Array.isArray(r.type)&&r.type.some(a=>a==="number"||a==="integer"))&&r.minimum!=null&&r.maximum!=null)return r.maximum-r.minimum<=5&&r.minimum>=0&&r.minimum<=1&&(r.multipleOf==null||r.multipleOf>=1)?{widget:"rating",source:"constraints",options:{max:r.maximum}}:{widget:"slider",source:"constraints",options:{min:r.minimum,max:r.maximum,step:r.multipleOf}};if(r.type==="string"){if(r.minLength!=null&&r.minLength>20||r.maxLength!=null&&r.maxLength>100)return{widget:"textarea",source:"heuristics"};if(e){const a=e.toLowerCase();if(a.includes("password")||a.includes("secret"))return{widget:"password",source:"heuristics"};if(a.includes("email"))return{widget:"email",source:"heuristics"};if(a.includes("url")||a.includes("link"))return{widget:"url",source:"heuristics"};if(a.includes("color"))return{widget:"color",source:"heuristics"};if(b(r).some(m=>a.includes(m.toLowerCase())))return{widget:"textarea",source:"heuristics"}}}}exports.Card=d;exports.CardBody=p;exports.CardCoverImage=y;exports.CardFooter=f;exports.CardHeader=g;exports.getXUIConfig=l;exports.resolveWidget=h;
@@ -0,0 +1,165 @@
1
+ import { html as c, attr as a, computedOf as g, Value as n, style as d } from "@tempots/dom";
2
+ function p(r, e, t) {
3
+ const u = ["bc-card"];
4
+ return r !== "default" && u.push(`bc-card--${r}`), e !== "md" && u.push(`bc-card--padding-${e}`), t !== "lg" && u.push(`bc-card--rounded-${t}`), u.join(" ");
5
+ }
6
+ function x({ variant: r = "default", size: e = "md", roundedness: t = "lg" } = {}, ...u) {
7
+ return c.div(
8
+ a.class(
9
+ g(
10
+ r,
11
+ e,
12
+ t
13
+ )(
14
+ (m, s, l) => p(
15
+ m ?? "default",
16
+ s ?? "md",
17
+ l ?? "lg"
18
+ )
19
+ )
20
+ ),
21
+ ...u
22
+ );
23
+ }
24
+ function w({ class: r } = {}, ...e) {
25
+ return c.div(
26
+ a.class(
27
+ r != null ? n.map(r, (t) => `bc-card__header ${t}`) : "bc-card__header"
28
+ ),
29
+ ...e
30
+ );
31
+ }
32
+ function h({ class: r } = {}, ...e) {
33
+ return c.div(
34
+ a.class(
35
+ r != null ? n.map(r, (t) => `bc-card__body ${t}`) : "bc-card__body"
36
+ ),
37
+ ...e
38
+ );
39
+ }
40
+ function _({ class: r } = {}, ...e) {
41
+ return c.div(
42
+ a.class(
43
+ r != null ? n.map(r, (t) => `bc-card__footer ${t}`) : "bc-card__footer"
44
+ ),
45
+ ...e
46
+ );
47
+ }
48
+ function v({ src: r, alt: e, height: t }) {
49
+ return c.img(
50
+ a.class("bc-card__cover-image"),
51
+ a.src(r),
52
+ e != null ? a.alt(e) : null,
53
+ t != null ? d.height(t) : null
54
+ );
55
+ }
56
+ const o = ["description", "comment", "notes", "text"];
57
+ function f(r) {
58
+ if (typeof r == "boolean") return o;
59
+ const e = r["x:ui"];
60
+ return e && Array.isArray(e.textAreaTriggers) ? [...o, ...e.textAreaTriggers] : o;
61
+ }
62
+ function y(r) {
63
+ if (typeof r == "boolean") return;
64
+ const e = r["x:ui"];
65
+ if (e != null && (typeof e == "string" || typeof e == "object" && e !== null))
66
+ return e;
67
+ }
68
+ function C(r, e) {
69
+ if (typeof r == "boolean") return;
70
+ const t = y(r);
71
+ if (typeof t == "object" && typeof t.widget == "string")
72
+ return {
73
+ widget: t.widget,
74
+ source: "explicit-widget",
75
+ options: t
76
+ };
77
+ const u = typeof t == "string" ? t : typeof t == "object" && typeof t.format == "string" ? t.format : void 0;
78
+ if (u)
79
+ return {
80
+ widget: u,
81
+ source: "explicit-format",
82
+ options: typeof t == "object" ? t : void 0
83
+ };
84
+ if (typeof r.format == "string")
85
+ return {
86
+ widget: {
87
+ datetime: "date-time",
88
+ base64: "binary",
89
+ bytes: "binary",
90
+ iri: "uri",
91
+ "iri-reference": "uri-reference",
92
+ "idn-hostname": "hostname"
93
+ }[r.format] || r.format,
94
+ source: "schema-format"
95
+ };
96
+ if (r.contentMediaType === "text/markdown")
97
+ return {
98
+ widget: "markdown",
99
+ source: "schema-media"
100
+ };
101
+ if (r.contentMediaType != null || r.contentEncoding === "base64")
102
+ return {
103
+ widget: "binary",
104
+ source: "schema-media",
105
+ options: {
106
+ mediaType: r.contentMediaType,
107
+ encoding: r.contentEncoding
108
+ }
109
+ };
110
+ if (r.enum != null)
111
+ return {
112
+ widget: "enum",
113
+ source: "constraints"
114
+ };
115
+ if (r.const != null)
116
+ return {
117
+ widget: "const",
118
+ source: "constraints"
119
+ };
120
+ if ((r.type === "number" || r.type === "integer" || Array.isArray(r.type) && r.type.some((s) => s === "number" || s === "integer")) && r.minimum != null && r.maximum != null)
121
+ return r.maximum - r.minimum <= 5 && r.minimum >= 0 && r.minimum <= 1 && (r.multipleOf == null || r.multipleOf >= 1) ? {
122
+ widget: "rating",
123
+ source: "constraints",
124
+ options: { max: r.maximum }
125
+ } : {
126
+ widget: "slider",
127
+ source: "constraints",
128
+ options: {
129
+ min: r.minimum,
130
+ max: r.maximum,
131
+ step: r.multipleOf
132
+ }
133
+ };
134
+ if (r.type === "string") {
135
+ if (r.minLength != null && r.minLength > 20 || r.maxLength != null && r.maxLength > 100)
136
+ return {
137
+ widget: "textarea",
138
+ source: "heuristics"
139
+ };
140
+ if (e) {
141
+ const s = e.toLowerCase();
142
+ if (s.includes("password") || s.includes("secret"))
143
+ return { widget: "password", source: "heuristics" };
144
+ if (s.includes("email"))
145
+ return { widget: "email", source: "heuristics" };
146
+ if (s.includes("url") || s.includes("link"))
147
+ return { widget: "url", source: "heuristics" };
148
+ if (s.includes("color"))
149
+ return { widget: "color", source: "heuristics" };
150
+ if (f(r).some(
151
+ (i) => s.includes(i.toLowerCase())
152
+ ))
153
+ return { widget: "textarea", source: "heuristics" };
154
+ }
155
+ }
156
+ }
157
+ export {
158
+ x as C,
159
+ h as a,
160
+ v as b,
161
+ _ as c,
162
+ w as d,
163
+ y as g,
164
+ C as r
165
+ };