@bzync/rui 0.0.5 → 0.0.9

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 (240) hide show
  1. package/README.md +476 -57
  2. package/dist/autocomplete-D6z5B-WU.cjs +1 -0
  3. package/dist/{autocomplete-BgKbj6M4.js → autocomplete-bgySuP8X.js} +149 -142
  4. package/dist/calendar-CQumLNgS.cjs +1 -0
  5. package/dist/{calendar-j2_zvum1.js → calendar-nkYCMEy3.js} +9 -9
  6. package/dist/charts-Cot5lCgC.cjs +1 -0
  7. package/dist/{charts-CxEy2c3M.js → charts-Dscl6UC3.js} +122 -145
  8. package/dist/cn-B6R3HKzx.cjs +1 -0
  9. package/dist/{cn-DpgY2leY.js → cn-BJyZJP-y.js} +389 -389
  10. package/dist/{component-styles-Bgy44fc8.js → component-styles-C2CbHEEA.js} +2 -2
  11. package/dist/component-styles-DY4wigiq.cjs +1 -0
  12. package/dist/components/accordion.cjs +1 -1
  13. package/dist/components/accordion.js +2 -2
  14. package/dist/components/alert.cjs +1 -1
  15. package/dist/components/alert.js +3 -3
  16. package/dist/components/aspect-ratio.cjs +1 -1
  17. package/dist/components/aspect-ratio.js +1 -1
  18. package/dist/components/auth-backdrop.cjs +1 -1
  19. package/dist/components/auth-backdrop.d.ts +4 -1
  20. package/dist/components/auth-backdrop.js +12 -8
  21. package/dist/components/autocomplete/dropdown.d.ts +4 -1
  22. package/dist/components/autocomplete/multi-trigger.d.ts +3 -1
  23. package/dist/components/autocomplete/single-trigger.d.ts +3 -1
  24. package/dist/components/autocomplete/types.d.ts +15 -0
  25. package/dist/components/autocomplete.cjs +1 -1
  26. package/dist/components/autocomplete.js +1 -1
  27. package/dist/components/avatar-group.cjs +1 -1
  28. package/dist/components/avatar-group.js +1 -1
  29. package/dist/components/avatar.cjs +1 -1
  30. package/dist/components/avatar.js +2 -2
  31. package/dist/components/badge.cjs +1 -1
  32. package/dist/components/badge.js +1 -1
  33. package/dist/components/billing-interval-toggle.cjs +1 -1
  34. package/dist/components/billing-interval-toggle.d.ts +4 -6
  35. package/dist/components/billing-interval-toggle.js +26 -19
  36. package/dist/components/blockquote.cjs +1 -1
  37. package/dist/components/blockquote.js +3 -3
  38. package/dist/components/breadcrumb.cjs +1 -1
  39. package/dist/components/breadcrumb.js +2 -2
  40. package/dist/components/button-group.cjs +1 -1
  41. package/dist/components/button-group.js +1 -1
  42. package/dist/components/button.cjs +1 -1
  43. package/dist/components/button.d.ts +2 -0
  44. package/dist/components/button.js +79 -36
  45. package/dist/components/calendar.cjs +1 -1
  46. package/dist/components/calendar.js +1 -1
  47. package/dist/components/callout.cjs +1 -1
  48. package/dist/components/callout.js +14 -14
  49. package/dist/components/card.cjs +1 -1
  50. package/dist/components/card.js +1 -1
  51. package/dist/components/charts/shared.d.ts +15 -0
  52. package/dist/components/charts.cjs +1 -1
  53. package/dist/components/charts.js +1 -1
  54. package/dist/components/checkbox.cjs +1 -1
  55. package/dist/components/checkbox.js +3 -3
  56. package/dist/components/code.cjs +3 -3
  57. package/dist/components/code.js +4 -4
  58. package/dist/components/command.cjs +1 -1
  59. package/dist/components/command.d.ts +8 -1
  60. package/dist/components/command.js +84 -83
  61. package/dist/components/confirm-dialog.cjs +1 -1
  62. package/dist/components/confirm-dialog.d.ts +8 -1
  63. package/dist/components/confirm-dialog.js +37 -31
  64. package/dist/components/copy-button.cjs +1 -1
  65. package/dist/components/copy-button.js +3 -2
  66. package/dist/components/currency.cjs +1 -1
  67. package/dist/components/currency.js +1 -1
  68. package/dist/components/datatable/types.d.ts +4 -0
  69. package/dist/components/datatable.cjs +1 -1
  70. package/dist/components/datatable.d.ts +1 -5
  71. package/dist/components/datatable.js +1 -1
  72. package/dist/components/datepicker.cjs +1 -1
  73. package/dist/components/datepicker.d.ts +3 -3
  74. package/dist/components/datepicker.js +234 -105
  75. package/dist/components/description-list.cjs +1 -1
  76. package/dist/components/description-list.js +1 -1
  77. package/dist/components/divider.cjs +1 -1
  78. package/dist/components/divider.js +1 -1
  79. package/dist/components/drawer.cjs +1 -1
  80. package/dist/components/drawer.d.ts +6 -1
  81. package/dist/components/drawer.js +128 -2
  82. package/dist/components/dropdown-menu-panel.cjs +1 -0
  83. package/dist/components/dropdown-menu-panel.d.ts +24 -0
  84. package/dist/components/dropdown-menu-panel.js +84 -0
  85. package/dist/components/dropdown-menu.cjs +1 -1
  86. package/dist/components/dropdown-menu.d.ts +5 -1
  87. package/dist/components/dropdown-menu.js +38 -93
  88. package/dist/components/empty-state.cjs +1 -1
  89. package/dist/components/empty-state.d.ts +5 -1
  90. package/dist/components/empty-state.js +9 -9
  91. package/dist/components/error-state.cjs +1 -1
  92. package/dist/components/error-state.js +2 -2
  93. package/dist/components/file-upload.cjs +1 -1
  94. package/dist/components/file-upload.js +4 -4
  95. package/dist/components/form-field.cjs +1 -1
  96. package/dist/components/form-field.d.ts +9 -0
  97. package/dist/components/form-field.js +49 -14
  98. package/dist/components/info-button.cjs +1 -1
  99. package/dist/components/info-button.d.ts +5 -3
  100. package/dist/components/info-button.js +33 -29
  101. package/dist/components/input.cjs +1 -1
  102. package/dist/components/input.js +3 -3
  103. package/dist/components/kbd.cjs +1 -1
  104. package/dist/components/kbd.js +1 -1
  105. package/dist/components/label.cjs +1 -1
  106. package/dist/components/label.js +2 -2
  107. package/dist/components/layout.cjs +1 -1
  108. package/dist/components/layout.js +1 -1
  109. package/dist/components/link.cjs +1 -1
  110. package/dist/components/link.js +1 -1
  111. package/dist/components/list.cjs +1 -1
  112. package/dist/components/list.js +1 -1
  113. package/dist/components/modal.cjs +1 -1
  114. package/dist/components/modal.d.ts +8 -1
  115. package/dist/components/modal.js +74 -120
  116. package/dist/components/navigation.cjs +1 -1
  117. package/dist/components/navigation.js +2 -2
  118. package/dist/components/number-input.cjs +1 -1
  119. package/dist/components/number-input.js +3 -3
  120. package/dist/components/otp-input.cjs +1 -1
  121. package/dist/components/otp-input.js +2 -2
  122. package/dist/components/overlay.cjs +1 -0
  123. package/dist/components/overlay.d.ts +52 -0
  124. package/dist/components/overlay.js +87 -0
  125. package/dist/components/pagination.cjs +1 -1
  126. package/dist/components/pagination.js +2 -2
  127. package/dist/components/popover.cjs +1 -1
  128. package/dist/components/popover.d.ts +2 -1
  129. package/dist/components/popover.js +41 -40
  130. package/dist/components/progressbar.cjs +1 -1
  131. package/dist/components/progressbar.js +1 -1
  132. package/dist/components/radio.cjs +1 -1
  133. package/dist/components/radio.js +3 -3
  134. package/dist/components/rating.cjs +1 -1
  135. package/dist/components/rating.js +3 -3
  136. package/dist/components/richtext.cjs +1 -1
  137. package/dist/components/richtext.js +45 -18
  138. package/dist/components/scroll-area.cjs +1 -1
  139. package/dist/components/scroll-area.js +3 -3
  140. package/dist/components/select/option-list.d.ts +3 -1
  141. package/dist/components/select/types.d.ts +4 -0
  142. package/dist/components/select.cjs +1 -1
  143. package/dist/components/select.js +1 -1
  144. package/dist/components/seo.cjs +1 -1
  145. package/dist/components/seo.js +1 -1
  146. package/dist/components/separator.cjs +1 -1
  147. package/dist/components/separator.js +1 -1
  148. package/dist/components/skeleton.cjs +1 -1
  149. package/dist/components/skeleton.d.ts +14 -1
  150. package/dist/components/skeleton.js +56 -4
  151. package/dist/components/slider.cjs +1 -1
  152. package/dist/components/slider.js +2 -2
  153. package/dist/components/slot.cjs +1 -0
  154. package/dist/components/slot.d.ts +12 -0
  155. package/dist/components/slot.js +16 -0
  156. package/dist/components/snackbar-viewport.cjs +1 -0
  157. package/dist/components/snackbar-viewport.d.ts +27 -0
  158. package/dist/components/snackbar-viewport.js +181 -0
  159. package/dist/components/snackbar.cjs +1 -1
  160. package/dist/components/snackbar.d.ts +5 -1
  161. package/dist/components/snackbar.js +36 -200
  162. package/dist/components/spinner.cjs +1 -1
  163. package/dist/components/spinner.js +1 -1
  164. package/dist/components/stat.cjs +1 -1
  165. package/dist/components/stat.js +1 -1
  166. package/dist/components/status-dot.cjs +1 -1
  167. package/dist/components/status-dot.js +1 -1
  168. package/dist/components/stepper.cjs +1 -1
  169. package/dist/components/stepper.js +5 -5
  170. package/dist/components/switch.cjs +1 -1
  171. package/dist/components/switch.js +37 -43
  172. package/dist/components/table.cjs +1 -1
  173. package/dist/components/table.js +1 -1
  174. package/dist/components/tabs.cjs +1 -1
  175. package/dist/components/tabs.d.ts +6 -4
  176. package/dist/components/tabs.js +51 -81
  177. package/dist/components/tag.cjs +1 -1
  178. package/dist/components/tag.js +1 -1
  179. package/dist/components/terminal.cjs +1 -1
  180. package/dist/components/terminal.js +1 -1
  181. package/dist/components/textarea.cjs +1 -1
  182. package/dist/components/textarea.js +3 -3
  183. package/dist/components/theme-provider.cjs +1 -1
  184. package/dist/components/theme-provider.js +1 -1
  185. package/dist/components/theme-toggle.cjs +1 -1
  186. package/dist/components/theme-toggle.js +27 -3
  187. package/dist/components/time-picker.cjs +1 -1
  188. package/dist/components/time-picker.d.ts +2 -0
  189. package/dist/components/time-picker.js +206 -148
  190. package/dist/components/timeline.cjs +1 -1
  191. package/dist/components/timeline.js +1 -1
  192. package/dist/components/toggle.cjs +1 -1
  193. package/dist/components/toggle.js +2 -2
  194. package/dist/components/tooltip.cjs +1 -1
  195. package/dist/components/tooltip.d.ts +2 -1
  196. package/dist/components/tooltip.js +37 -36
  197. package/dist/components/tree.cjs +1 -1
  198. package/dist/components/tree.js +1 -1
  199. package/dist/components/typography.cjs +1 -1
  200. package/dist/components/typography.d.ts +2 -3
  201. package/dist/components/typography.js +37 -24
  202. package/dist/components/visually-hidden.cjs +1 -0
  203. package/dist/components/visually-hidden.d.ts +16 -0
  204. package/dist/components/visually-hidden.js +13 -0
  205. package/dist/{datatable-yBN4M3UV.js → datatable-BJoZMrKI.js} +6 -6
  206. package/dist/datatable-t0U7t_xh.cjs +1 -0
  207. package/dist/icons-Dfetr1L2.cjs +1 -0
  208. package/dist/icons-Dk7VZ4Ph.js +51 -0
  209. package/dist/index.cjs +1 -1
  210. package/dist/index.d.ts +4 -0
  211. package/dist/index.js +126 -99
  212. package/dist/lib/cn.d.ts +13 -1
  213. package/dist/lib/component-styles.d.ts +14 -2
  214. package/dist/lib/icons.d.ts +12 -0
  215. package/dist/lib/motion.d.ts +58 -0
  216. package/dist/motion-B2shivEB.cjs +1 -0
  217. package/dist/motion-gnRzFS5f.js +62 -0
  218. package/dist/select-ByjnuEcE.cjs +1 -0
  219. package/dist/{select-ClWrcj3R.js → select-CiMzLhUK.js} +128 -122
  220. package/dist/styles.css +1 -1
  221. package/dist/{terminal-CpraMs50.cjs → terminal-1U0ftG3i.cjs} +2 -2
  222. package/dist/{terminal-BOR2cFi1.js → terminal-VXdxVoAv.js} +4 -4
  223. package/dist/use-focus-trap-CPLT49gN.cjs +1 -0
  224. package/dist/use-focus-trap-CS6BXJAB.js +77 -0
  225. package/dist/{utils-CQ8pvCtk.js → utils-DEw5mQrH.js} +1 -1
  226. package/dist/{utils-DOFJTw8o.cjs → utils-MnnCTelh.cjs} +1 -1
  227. package/package.json +56 -9
  228. package/dist/autocomplete-Bk4pRQ2R.cjs +0 -1
  229. package/dist/calendar-CUXpVrVE.cjs +0 -1
  230. package/dist/charts-UDqS1BH1.cjs +0 -1
  231. package/dist/cn-BdjraxxU.cjs +0 -1
  232. package/dist/component-styles-DOUctc8_.cjs +0 -1
  233. package/dist/createLucideIcon-DDY8HuQR.js +0 -42
  234. package/dist/createLucideIcon-b_X_3fj-.cjs +0 -1
  235. package/dist/datatable-rzDgQ3r6.cjs +0 -1
  236. package/dist/drawer-CTeBsYrO.cjs +0 -1
  237. package/dist/drawer-ixuzyLVS.js +0 -189
  238. package/dist/select-BFwx--uK.cjs +0 -1
  239. package/dist/theme-toggle-Bb0BYo51.js +0 -71
  240. package/dist/theme-toggle-Cld8tktJ.cjs +0 -1
@@ -1,10 +1,11 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
3
- import { AnimatePresence as t, motion as n } from "framer-motion";
4
- import { cloneElement as r, isValidElement as i, useEffect as a, useId as o, useRef as s, useState as c } from "react";
5
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
+ import { n as t } from "../motion-gnRzFS5f.js";
4
+ import { AnimatePresence as n, motion as r } from "framer-motion";
5
+ import { cloneElement as i, isValidElement as a, useEffect as o, useId as s, useRef as c, useState as l } from "react";
6
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
7
  //#region src/components/popover.tsx
7
- var d = {
8
+ var f = {
8
9
  top: {
9
10
  container: "bottom-full mb-2",
10
11
  initial: { y: 4 }
@@ -21,7 +22,7 @@ var d = {
21
22
  container: "left-full ml-2",
22
23
  initial: { x: -4 }
23
24
  }
24
- }, f = {
25
+ }, p = {
25
26
  top: {
26
27
  start: "left-0",
27
28
  center: "left-1/2 -translate-x-1/2",
@@ -43,51 +44,51 @@ var d = {
43
44
  end: "bottom-0"
44
45
  }
45
46
  };
46
- function p({ trigger: p, children: m, side: h = "bottom", align: g = "start", className: _, open: v, onOpenChange: y, ariaLabel: b = "Popover" }) {
47
- let [x, S] = c(!1), C = v ?? x, w = s(null), T = o();
48
- function E() {
49
- let e = !C;
50
- v === void 0 && S(e), y?.(e);
47
+ function m({ trigger: m, children: h, side: g = "bottom", align: _ = "start", className: v, wrapperClassName: y, open: b, onOpenChange: x, ariaLabel: S = "Popover" }) {
48
+ let [C, w] = l(!1), T = b ?? C, E = c(null), D = s();
49
+ function O() {
50
+ let e = !T;
51
+ b === void 0 && w(e), x?.(e);
51
52
  }
52
- function D() {
53
- v === void 0 && S(!1), y?.(!1);
53
+ function k() {
54
+ b === void 0 && w(!1), x?.(!1);
54
55
  }
55
- a(() => {
56
+ o(() => {
56
57
  function e(e) {
57
- w.current?.contains(e.target) || D();
58
+ E.current?.contains(e.target) || k();
58
59
  }
59
60
  function t(e) {
60
- e.key === "Escape" && C && (e.preventDefault(), D(), w.current?.querySelector("[aria-haspopup=\"dialog\"]")?.focus());
61
+ e.key === "Escape" && T && (e.preventDefault(), k(), E.current?.querySelector("[aria-haspopup=\"dialog\"]")?.focus());
61
62
  }
62
63
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
63
64
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
64
65
  };
65
- }, [T, C]);
66
- let { container: O, initial: k } = d[h], A = f[h][g], j = i(p) ? r(p, {
66
+ }, [D, T]);
67
+ let { container: A, initial: j } = f[g], M = p[g][_], N = a(m) ? i(m, {
67
68
  "aria-haspopup": "dialog",
68
- "aria-expanded": C,
69
- "aria-controls": T,
69
+ "aria-expanded": T,
70
+ "aria-controls": D,
70
71
  onClick: (e) => {
71
- p.props.onClick?.(e), e.defaultPrevented || E();
72
+ m.props.onClick?.(e), e.defaultPrevented || O();
72
73
  }
73
- }) : /* @__PURE__ */ l("button", {
74
+ }) : /* @__PURE__ */ u("button", {
74
75
  type: "button",
75
76
  "aria-haspopup": "dialog",
76
- "aria-expanded": C,
77
- "aria-controls": T,
78
- onClick: E,
79
- children: p
77
+ "aria-expanded": T,
78
+ "aria-controls": D,
79
+ onClick: O,
80
+ children: m
80
81
  });
81
- return /* @__PURE__ */ u("div", {
82
- ref: w,
83
- className: "relative inline-flex",
84
- children: [j, /* @__PURE__ */ l(t, { children: C && /* @__PURE__ */ l(n.div, {
85
- id: T,
82
+ return /* @__PURE__ */ d("div", {
83
+ ref: E,
84
+ className: e("relative inline-flex", y),
85
+ children: [N, /* @__PURE__ */ u(n, { children: T && /* @__PURE__ */ u(r.div, {
86
+ id: D,
86
87
  role: "dialog",
87
- "aria-label": b,
88
+ "aria-label": S,
88
89
  initial: {
89
90
  opacity: 0,
90
- ...k
91
+ ...j
91
92
  },
92
93
  animate: {
93
94
  opacity: 1,
@@ -96,20 +97,20 @@ function p({ trigger: p, children: m, side: h = "bottom", align: g = "start", cl
96
97
  },
97
98
  exit: {
98
99
  opacity: 0,
99
- ...k
100
+ ...j
100
101
  },
101
- transition: { duration: .13 },
102
- className: e("absolute z-50 min-w-[180px] rounded-[var(--radius-lg)] border border-border bg-surface-raised shadow-floating", O, A, _),
103
- children: m
102
+ transition: t.fade,
103
+ className: e("absolute z-50 min-w-[180px] rounded-[var(--radius-lg)] border border-border bg-surface-raised shadow-floating", A, M, v),
104
+ children: h
104
105
  }) })]
105
106
  });
106
107
  }
107
- function m({ className: t, children: n, ...r }) {
108
- return /* @__PURE__ */ l("div", {
108
+ function h({ className: t, children: n, ...r }) {
109
+ return /* @__PURE__ */ u("div", {
109
110
  className: e("p-3", t),
110
111
  ...r,
111
112
  children: n
112
113
  });
113
114
  }
114
115
  //#endregion
115
- export { p as Popover, m as PopoverContent };
116
+ export { m as Popover, h as PopoverContent };
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("framer-motion"),n=require("react/jsx-runtime");var r={default:`bg-black/6 dark:bg-white/6`,success:`bg-emerald-500/10`,warning:`bg-amber-500/10`,error:`bg-red-500/10`,info:`bg-sky-500/10`},i={default:`bg-accent-500`,success:`bg-emerald-500`,warning:`bg-amber-500`,error:`bg-red-500`,info:`bg-sky-500`},a={default:`text-accent-400`,success:`text-emerald-400`,warning:`text-amber-400`,error:`text-red-400`,info:`text-sky-400`},o={xs:`h-1`,sm:`h-1.5`,md:`h-2`,lg:`h-3`};function s({value:s=0,variant:c=`default`,size:l=`md`,label:u,showValue:d=!1,indeterminate:f=!1,steps:p,animated:m=!0,className:h,...g}){let _=Math.min(100,Math.max(0,s)),v=u!==void 0||d;if(p!==void 0&&p>0){let s=Math.round(_/100*p);return(0,n.jsxs)(`div`,{className:e.t(`flex flex-col gap-1.5`,h),...g,children:[v&&(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[u&&(0,n.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:u}),d&&(0,n.jsxs)(`span`,{className:e.t(`text-xs font-medium tabular-nums ml-auto`,a[c]),children:[s,`/`,p]})]}),(0,n.jsx)(`div`,{className:`flex gap-1`,children:Array.from({length:p}).map((a,u)=>(0,n.jsx)(t.motion.div,{className:e.t(`flex-1 rounded-full`,o[l],u<s?i[c]:r[c]),initial:m?{opacity:.4}:void 0,animate:m?{opacity:1}:void 0,transition:{delay:u*.04,duration:.2}},u))})]})}return(0,n.jsxs)(`div`,{className:e.t(`flex flex-col gap-1.5`,h),...g,children:[v&&(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[u&&(0,n.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:u}),d&&!f&&(0,n.jsxs)(`span`,{className:e.t(`text-xs font-medium tabular-nums ml-auto`,a[c]),children:[_,`%`]})]}),(0,n.jsx)(`div`,{role:`progressbar`,"aria-valuenow":f?void 0:_,"aria-valuemin":0,"aria-valuemax":100,className:e.t(`w-full overflow-hidden rounded-full`,o[l],r[c]),children:f?(0,n.jsx)(t.motion.div,{className:e.t(`h-full w-1/3 rounded-full`,i[c]),animate:{x:[`-100%`,`400%`]},transition:{duration:1.4,repeat:1/0,ease:`easeInOut`}}):(0,n.jsx)(t.motion.div,{className:e.t(`h-full rounded-full`,i[c]),initial:m?{width:0}:{width:`${_}%`},animate:{width:`${_}%`},transition:{duration:.5,ease:[.25,.46,.45,.94]}})})]})}exports.Progressbar=s;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");let t=require("framer-motion"),n=require("react/jsx-runtime");var r={default:`bg-black/6 dark:bg-white/6`,success:`bg-emerald-500/10`,warning:`bg-amber-500/10`,error:`bg-red-500/10`,info:`bg-sky-500/10`},i={default:`bg-accent-500`,success:`bg-emerald-500`,warning:`bg-amber-500`,error:`bg-red-500`,info:`bg-sky-500`},a={default:`text-accent-400`,success:`text-emerald-400`,warning:`text-amber-400`,error:`text-red-400`,info:`text-sky-400`},o={xs:`h-1`,sm:`h-1.5`,md:`h-2`,lg:`h-3`};function s({value:s=0,variant:c=`default`,size:l=`md`,label:u,showValue:d=!1,indeterminate:f=!1,steps:p,animated:m=!0,className:h,...g}){let _=Math.min(100,Math.max(0,s)),v=u!==void 0||d;if(p!==void 0&&p>0){let s=Math.round(_/100*p);return(0,n.jsxs)(`div`,{className:e.t(`flex flex-col gap-1.5`,h),...g,children:[v&&(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[u&&(0,n.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:u}),d&&(0,n.jsxs)(`span`,{className:e.t(`text-xs font-medium tabular-nums ml-auto`,a[c]),children:[s,`/`,p]})]}),(0,n.jsx)(`div`,{className:`flex gap-1`,children:Array.from({length:p}).map((a,u)=>(0,n.jsx)(t.motion.div,{className:e.t(`flex-1 rounded-full`,o[l],u<s?i[c]:r[c]),initial:m?{opacity:.4}:void 0,animate:m?{opacity:1}:void 0,transition:{delay:u*.04,duration:.2}},u))})]})}return(0,n.jsxs)(`div`,{className:e.t(`flex flex-col gap-1.5`,h),...g,children:[v&&(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[u&&(0,n.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:u}),d&&!f&&(0,n.jsxs)(`span`,{className:e.t(`text-xs font-medium tabular-nums ml-auto`,a[c]),children:[_,`%`]})]}),(0,n.jsx)(`div`,{role:`progressbar`,"aria-valuenow":f?void 0:_,"aria-valuemin":0,"aria-valuemax":100,className:e.t(`w-full overflow-hidden rounded-full`,o[l],r[c]),children:f?(0,n.jsx)(t.motion.div,{className:e.t(`h-full w-1/3 rounded-full`,i[c]),animate:{x:[`-100%`,`400%`]},transition:{duration:1.4,repeat:1/0,ease:`easeInOut`}}):(0,n.jsx)(t.motion.div,{className:e.t(`h-full rounded-full`,i[c]),initial:m?{width:0}:{width:`${_}%`},animate:{width:`${_}%`},transition:{duration:.5,ease:[.25,.46,.45,.94]}})})]})}exports.Progressbar=s;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
3
  import { motion as t } from "framer-motion";
4
4
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
5
  //#region src/components/progressbar.tsx
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs"),t=require("../component-styles-DOUctc8_.cjs");let n=require("framer-motion"),r=require("react"),i=require("react/jsx-runtime");var a=(0,r.createContext)(null);function o(){let e=(0,r.useContext)(a);if(!e)throw Error(`Radio must be inside <RadioGroup>`);return e}function s({name:n,value:o,onChange:s,disabled:c,label:l,hint:u,error:d,orientation:f=`vertical`,className:p,children:m}){let h=(0,r.useId)(),g=n??h,_=`${g}-label`,v=`${g}-message`;return(0,i.jsxs)(`div`,{className:e.t(t.o,p),children:[l&&(0,i.jsx)(`p`,{id:_,className:`text-xs font-semibold leading-5 text-foreground`,children:l}),(0,i.jsx)(a.Provider,{value:{name:g,value:o,onChange:s,disabled:c},children:(0,i.jsx)(`div`,{role:`radiogroup`,"aria-labelledby":l?_:void 0,"aria-invalid":d?!0:void 0,"aria-describedby":d||u?v:void 0,className:e.t(`flex gap-2`,f===`vertical`?`flex-col`:`flex-row flex-wrap`),children:m})}),d&&(0,i.jsx)(`p`,{id:v,"aria-live":`polite`,className:`text-xs leading-5 text-destructive`,children:d}),u&&!d&&(0,i.jsx)(`p`,{id:v,className:`text-xs leading-5 text-muted-foreground`,children:u})]})}function c({value:t,label:a,description:s,disabled:c,className:l}){let{name:u,value:d,onChange:f,disabled:p}=o(),m=(0,r.useId)(),h=d===t,g=c??p;return(0,i.jsxs)(`label`,{htmlFor:m,className:e.t(`flex items-start gap-2.5 cursor-pointer`,g&&`cursor-not-allowed opacity-50`,l),children:[(0,i.jsxs)(`div`,{className:`relative mt-0.5 shrink-0 w-4 h-4`,children:[(0,i.jsx)(`input`,{type:`radio`,id:m,name:u,value:t,checked:h,disabled:g,onChange:()=>f(t),className:`peer absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed`}),(0,i.jsx)(`div`,{className:e.t(`w-4 h-4 rounded-full border-2 flex items-center justify-center transition-colors duration-[120ms] peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg`,h?`bg-primary border-primary`:`bg-transparent border-black/25 dark:border-white/25`),children:h&&(0,i.jsx)(n.motion.span,{initial:{scale:0},animate:{scale:1},transition:{type:`spring`,stiffness:600,damping:30},className:`w-1.5 h-1.5 rounded-full bg-white`})})]}),(a||s)&&(0,i.jsxs)(`div`,{className:`min-w-0`,children:[a&&(0,i.jsx)(`p`,{className:`text-sm font-medium text-foreground leading-snug`,children:a}),s&&(0,i.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:s})]})]})}exports.Radio=c,exports.RadioGroup=s;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs"),t=require("../component-styles-DY4wigiq.cjs");let n=require("framer-motion"),r=require("react"),i=require("react/jsx-runtime");var a=(0,r.createContext)(null);function o(){let e=(0,r.useContext)(a);if(!e)throw Error(`Radio must be inside <RadioGroup>`);return e}function s({name:n,value:o,onChange:s,disabled:c,label:l,hint:u,error:d,orientation:f=`vertical`,className:p,children:m}){let h=(0,r.useId)(),g=n??h,_=`${g}-label`,v=`${g}-message`;return(0,i.jsxs)(`div`,{className:e.t(t.o,p),children:[l&&(0,i.jsx)(`p`,{id:_,className:`text-xs font-semibold leading-5 text-foreground`,children:l}),(0,i.jsx)(a.Provider,{value:{name:g,value:o,onChange:s,disabled:c},children:(0,i.jsx)(`div`,{role:`radiogroup`,"aria-labelledby":l?_:void 0,"aria-invalid":d?!0:void 0,"aria-describedby":d||u?v:void 0,className:e.t(`flex gap-2`,f===`vertical`?`flex-col`:`flex-row flex-wrap`),children:m})}),d&&(0,i.jsx)(`p`,{id:v,"aria-live":`polite`,className:`text-xs leading-5 text-destructive`,children:d}),u&&!d&&(0,i.jsx)(`p`,{id:v,className:`text-xs leading-5 text-muted-foreground`,children:u})]})}function c({value:t,label:a,description:s,disabled:c,className:l}){let{name:u,value:d,onChange:f,disabled:p}=o(),m=(0,r.useId)(),h=d===t,g=c??p;return(0,i.jsxs)(`label`,{htmlFor:m,className:e.t(`flex items-start gap-2.5 cursor-pointer`,g&&`cursor-not-allowed opacity-50`,l),children:[(0,i.jsxs)(`div`,{className:`relative mt-0.5 shrink-0 w-4 h-4`,children:[(0,i.jsx)(`input`,{type:`radio`,id:m,name:u,value:t,checked:h,disabled:g,onChange:()=>f(t),className:`peer absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed`}),(0,i.jsx)(`div`,{className:e.t(`w-4 h-4 rounded-full border-2 flex items-center justify-center transition-colors duration-[120ms] peer-focus-visible:ring-[3px] peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg`,h?`bg-primary border-primary`:`bg-transparent border-black/25 dark:border-white/25`),children:h&&(0,i.jsx)(n.motion.span,{initial:{scale:0},animate:{scale:1},transition:{type:`spring`,stiffness:600,damping:30},className:`w-1.5 h-1.5 rounded-full bg-white`})})]}),(a||s)&&(0,i.jsxs)(`div`,{className:`min-w-0`,children:[a&&(0,i.jsx)(`p`,{className:`text-sm font-medium text-foreground leading-snug`,children:a}),s&&(0,i.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:s})]})]})}exports.Radio=c,exports.RadioGroup=s;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
3
- import { o as t } from "../component-styles-Bgy44fc8.js";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
+ import { o as t } from "../component-styles-C2CbHEEA.js";
4
4
  import { motion as n } from "framer-motion";
5
5
  import { createContext as r, useContext as i, useId as a } from "react";
6
6
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
@@ -68,7 +68,7 @@ function d({ value: t, label: r, description: i, disabled: c, className: u }) {
68
68
  onChange: () => p(t),
69
69
  className: "peer absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed"
70
70
  }), /* @__PURE__ */ o("div", {
71
- className: e("w-4 h-4 rounded-full border-2 flex items-center justify-center transition-colors duration-[120ms] peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg", g ? "bg-primary border-primary" : "bg-transparent border-black/25 dark:border-white/25"),
71
+ className: e("w-4 h-4 rounded-full border-2 flex items-center justify-center transition-colors duration-[120ms] peer-focus-visible:ring-[3px] peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg", g ? "bg-primary border-primary" : "bg-transparent border-black/25 dark:border-white/25"),
72
72
  children: g && /* @__PURE__ */ o(n.span, {
73
73
  initial: { scale: 0 },
74
74
  animate: { scale: 1 },
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs"),t=require("../component-styles-DOUctc8_.cjs");let n=require("react"),r=require("react/jsx-runtime");var i={sm:`size-4`,md:`size-5`,lg:`size-6`},a={sm:`size-8`,md:`size-9`,lg:`size-10`},o=(0,n.forwardRef)(({label:o,value:s,defaultValue:c=0,onValueChange:l,max:u=5,name:d,size:f=`md`,readOnly:p=!1,showLabel:m=!0,showValue:h=!1,disabled:g,className:_,...v},y)=>{let b=(0,n.useId)(),x=d??b,S=Number.isFinite(u)?Math.max(1,Math.floor(u)):5,C=e=>Number.isFinite(e)?Math.max(0,Math.min(S,e)):0,[w,T]=(0,n.useState)(()=>C(c)),E=C(s??w);function D(e){g||p||(s===void 0&&T(e),l?.(e))}return(0,r.jsxs)(`fieldset`,{ref:y,role:`radiogroup`,"aria-readonly":p||void 0,disabled:g,className:e.t(`min-w-0`,_),...v,children:[(0,r.jsx)(`legend`,{className:e.t(t.a,!m&&`sr-only`),children:o}),(0,r.jsxs)(`div`,{className:`mt-1 flex w-fit max-w-full items-center overflow-x-auto overscroll-x-contain py-1 scrollbar-none`,children:[Array.from({length:S},(t,n)=>{let o=n+1,s=o<=E;return(0,r.jsxs)(`label`,{className:e.t(`relative inline-flex shrink-0 items-center justify-center rounded-sm`,a[f],g?`cursor-not-allowed opacity-40`:p?`cursor-default`:`cursor-pointer`),children:[(0,r.jsx)(`input`,{type:`radio`,name:x,value:o,checked:E===o,disabled:g,readOnly:p,"aria-label":`${o} ${o===1?`star`:`stars`}`,onChange:()=>D(o),className:`peer sr-only`}),(0,r.jsx)(`span`,{className:`block rounded-sm peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg`,children:(0,r.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,className:e.t(i[f],`transition-colors`,s?`fill-warning text-warning`:`fill-transparent text-border-strong`,!g&&!p&&`hover:text-warning`),children:(0,r.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.75`,strokeLinejoin:`round`,d:`m12 2.8 2.75 5.57 6.15.9-4.45 4.33 1.05 6.12L12 16.83l-5.5 2.89 1.05-6.12L3.1 9.27l6.15-.9L12 2.8Z`})})})]},o)}),h&&(0,r.jsxs)(`output`,{className:`ml-2 text-xs tabular-nums text-muted-foreground`,"aria-live":`polite`,children:[E,`/`,S]})]})]})});o.displayName=`Rating`,exports.Rating=o;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs"),t=require("../component-styles-DY4wigiq.cjs");let n=require("react"),r=require("react/jsx-runtime");var i={sm:`size-4`,md:`size-5`,lg:`size-6`},a={sm:`size-8`,md:`size-9`,lg:`size-10`},o=(0,n.forwardRef)(({label:o,value:s,defaultValue:c=0,onValueChange:l,max:u=5,name:d,size:f=`md`,readOnly:p=!1,showLabel:m=!0,showValue:h=!1,disabled:g,className:_,...v},y)=>{let b=(0,n.useId)(),x=d??b,S=Number.isFinite(u)?Math.max(1,Math.floor(u)):5,C=e=>Number.isFinite(e)?Math.max(0,Math.min(S,e)):0,[w,T]=(0,n.useState)(()=>C(c)),E=C(s??w);function D(e){g||p||(s===void 0&&T(e),l?.(e))}return(0,r.jsxs)(`fieldset`,{ref:y,role:`radiogroup`,"aria-readonly":p||void 0,disabled:g,className:e.t(`min-w-0`,_),...v,children:[(0,r.jsx)(`legend`,{className:e.t(t.a,!m&&`sr-only`),children:o}),(0,r.jsxs)(`div`,{className:`mt-1 flex w-fit max-w-full items-center overflow-x-auto overscroll-x-contain py-1 scrollbar-none`,children:[Array.from({length:S},(t,n)=>{let o=n+1,s=o<=E;return(0,r.jsxs)(`label`,{className:e.t(`relative inline-flex shrink-0 items-center justify-center rounded-sm`,a[f],g?`cursor-not-allowed opacity-40`:p?`cursor-default`:`cursor-pointer`),children:[(0,r.jsx)(`input`,{type:`radio`,name:x,value:o,checked:E===o,disabled:g,readOnly:p,"aria-label":`${o} ${o===1?`star`:`stars`}`,onChange:()=>D(o),className:`peer sr-only`}),(0,r.jsx)(`span`,{className:`block rounded-sm peer-focus-visible:ring-[3px] peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg`,children:(0,r.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,className:e.t(i[f],`transition-colors`,s?`fill-warning text-warning`:`fill-transparent text-border-strong`,!g&&!p&&`hover:text-warning`),children:(0,r.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.75`,strokeLinejoin:`round`,d:`m12 2.8 2.75 5.57 6.15.9-4.45 4.33 1.05 6.12L12 16.83l-5.5 2.89 1.05-6.12L3.1 9.27l6.15-.9L12 2.8Z`})})})]},o)}),h&&(0,r.jsxs)(`output`,{className:`ml-2 text-xs tabular-nums text-muted-foreground`,"aria-live":`polite`,children:[E,`/`,S]})]})]})});o.displayName=`Rating`,exports.Rating=o;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
3
- import { a as t } from "../component-styles-Bgy44fc8.js";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
+ import { a as t } from "../component-styles-C2CbHEEA.js";
4
4
  import { forwardRef as n, useId as r, useState as i } from "react";
5
5
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
6
  //#region src/components/rating.tsx
@@ -44,7 +44,7 @@ var s = {
44
44
  onChange: () => k(r),
45
45
  className: "peer sr-only"
46
46
  }), /* @__PURE__ */ a("span", {
47
- className: "block rounded-sm peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg",
47
+ className: "block rounded-sm peer-focus-visible:ring-[3px] peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg",
48
48
  children: /* @__PURE__ */ a("svg", {
49
49
  viewBox: "0 0 24 24",
50
50
  "aria-hidden": "true",
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react"),n=require("react/jsx-runtime");function r({onClick:t,title:r,active:i,children:a}){return(0,n.jsx)(`button`,{type:`button`,title:r,onMouseDown:e=>{e.preventDefault(),t()},className:e.t(`h-7 w-7 flex items-center justify-center rounded-md text-sm transition-colors`,i?`bg-black/10 dark:bg-white/15 text-gray-900 dark:text-white`:`text-slate-500 dark:text-slate-400 hover:text-gray-900 dark:hover:text-white hover:bg-black/6 dark:hover:bg-white/8`),children:a})}function i(){return(0,n.jsx)(`div`,{className:`w-px h-5 bg-black/10 dark:bg-white/10 mx-0.5`})}function a(e){if(typeof document>`u`)return e;let t=document.createElement(`template`);t.innerHTML=e,t.content.querySelectorAll(`script, style, iframe, object, embed, link, meta`).forEach(e=>e.remove());let n=document.createTreeWalker(t.content,NodeFilter.SHOW_ELEMENT);for(;n.nextNode();){let e=n.currentNode;for(let t of Array.from(e.attributes)){let n=t.name.toLowerCase(),r=t.value.trim().toLowerCase();(n.startsWith(`on`)||r.startsWith(`javascript:`))&&e.removeAttribute(t.name)}}let r=t.innerHTML;return r=r.replace(/\son\w+\s*=\s*(['"])[^'"]*\1/gi,``),r}function o(e,t){return t?typeof t==`function`?t(e):a(e):e}function s({value:a=``,onChange:s,placeholder:c=`Start typing…`,className:l,minHeight:u=160,sanitize:d=!1}){let f=(0,t.useRef)(null),p=(0,t.useRef)(a);(0,t.useEffect)(()=>{let e=o(a,d);f.current&&f.current.innerHTML!==e&&(f.current.innerHTML=e,p.current=e)},[a,d]);let m=(0,t.useCallback)(()=>{let e=f.current?.innerHTML??``,t=d?o(e,d):e;t!==p.current&&(p.current=t,s?.(t))},[s,d]);function h(e,t){try{document.execCommand(e,!1,t)}catch{}f.current?.focus(),m()}function g(e){try{return document.queryCommandState(e)}catch{return!1}}return(0,n.jsxs)(`div`,{className:e.t(`rounded-xl overflow-hidden border border-black/10 dark:border-white/10 bg-white dark:bg-navy-900 focus-within:ring-1 focus-within:ring-blue-500/40 focus-within:border-accent-500/30 transition-all`,l),children:[(0,n.jsxs)(`div`,{className:`flex flex-wrap items-center gap-0.5 px-2 py-2 border-b border-black/[0.07] dark:border-white/[0.07] bg-black/2 dark:bg-white/2`,children:[(0,n.jsx)(r,{title:`Bold (⌘B)`,onClick:()=>h(`bold`),active:g(`bold`),children:(0,n.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,n.jsx)(`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`})})}),(0,n.jsx)(r,{title:`Italic (⌘I)`,onClick:()=>h(`italic`),active:g(`italic`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`line`,{x1:`19`,y1:`4`,x2:`10`,y2:`4`}),(0,n.jsx)(`line`,{x1:`14`,y1:`20`,x2:`5`,y2:`20`}),(0,n.jsx)(`line`,{x1:`15`,y1:`4`,x2:`9`,y2:`20`})]})}),(0,n.jsx)(r,{title:`Underline (⌘U)`,onClick:()=>h(`underline`),active:g(`underline`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`}),(0,n.jsx)(`line`,{x1:`4`,y1:`20`,x2:`20`,y2:`20`})]})}),(0,n.jsx)(r,{title:`Strikethrough`,onClick:()=>h(`strikeThrough`),active:g(`strikeThrough`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4M14 12a4 4 0 0 1 0 8H6`}),(0,n.jsx)(`line`,{x1:`4`,y1:`12`,x2:`20`,y2:`12`})]})}),(0,n.jsx)(i,{}),(0,n.jsx)(r,{title:`Heading 1`,onClick:()=>h(`formatBlock`,`<h1>`),children:(0,n.jsx)(`span`,{className:`text-[11px] font-bold`,children:`H1`})}),(0,n.jsx)(r,{title:`Heading 2`,onClick:()=>h(`formatBlock`,`<h2>`),children:(0,n.jsx)(`span`,{className:`text-[11px] font-bold`,children:`H2`})}),(0,n.jsx)(r,{title:`Paragraph`,onClick:()=>h(`formatBlock`,`<p>`),children:(0,n.jsx)(`span`,{className:`text-[11px] font-medium`,children:`P`})}),(0,n.jsx)(i,{}),(0,n.jsx)(r,{title:`Bullet list`,onClick:()=>h(`insertUnorderedList`),active:g(`insertUnorderedList`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`line`,{x1:`9`,y1:`6`,x2:`20`,y2:`6`}),(0,n.jsx)(`line`,{x1:`9`,y1:`12`,x2:`20`,y2:`12`}),(0,n.jsx)(`line`,{x1:`9`,y1:`18`,x2:`20`,y2:`18`}),(0,n.jsx)(`circle`,{cx:`4`,cy:`6`,r:`1.5`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`4`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`4`,cy:`18`,r:`1.5`,fill:`currentColor`,stroke:`none`})]})}),(0,n.jsx)(r,{title:`Ordered list`,onClick:()=>h(`insertOrderedList`),active:g(`insertOrderedList`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`line`,{x1:`10`,y1:`6`,x2:`21`,y2:`6`}),(0,n.jsx)(`line`,{x1:`10`,y1:`12`,x2:`21`,y2:`12`}),(0,n.jsx)(`line`,{x1:`10`,y1:`18`,x2:`21`,y2:`18`}),(0,n.jsx)(`path`,{d:`M4 6h1v4`}),(0,n.jsx)(`path`,{d:`M4 10h2`}),(0,n.jsx)(`path`,{d:`M6 18H4c0-1 2-2 2-3s-1-1.5-2-1`})]})}),(0,n.jsx)(r,{title:`Blockquote`,onClick:()=>h(`formatBlock`,`<blockquote>`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z`}),(0,n.jsx)(`path`,{d:`M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z`})]})}),(0,n.jsx)(i,{}),(0,n.jsx)(r,{title:`Undo (⌘Z)`,onClick:()=>h(`undo`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M3 7v6h6`}),(0,n.jsx)(`path`,{d:`M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13`})]})}),(0,n.jsx)(r,{title:`Redo (⌘⇧Z)`,onClick:()=>h(`redo`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M21 7v6h-6`}),(0,n.jsx)(`path`,{d:`M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7`})]})}),(0,n.jsx)(r,{title:`Clear formatting`,onClick:()=>h(`removeFormat`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M4 7V4h16v3`}),(0,n.jsx)(`path`,{d:`M5 20h6`}),(0,n.jsx)(`path`,{d:`M13 4 8 20`}),(0,n.jsx)(`line`,{x1:`3`,y1:`3`,x2:`21`,y2:`21`})]})})]}),(0,n.jsxs)(`div`,{className:`relative`,children:[(0,n.jsx)(`div`,{ref:f,contentEditable:!0,suppressContentEditableWarning:!0,onInput:m,onBlur:m,style:{minHeight:u},className:e.t(`px-4 py-3 text-sm text-slate-800 dark:text-slate-200 focus:outline-none`,`prose prose-sm max-w-none`,`[&_h1]:text-xl [&_h1]:font-bold [&_h1]:mb-2 [&_h1]:text-gray-900 dark:[&_h1]:text-white`,`[&_h2]:text-lg [&_h2]:font-semibold [&_h2]:mb-1.5 [&_h2]:text-gray-900 dark:[&_h2]:text-white`,`[&_p]:mb-2 [&_ul]:list-disc [&_ul]:pl-5 [&_ul]:mb-2 [&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:mb-2`,`[&_blockquote]:border-l-2 [&_blockquote]:border-accent-400 [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground [&_blockquote]:italic`)}),!a&&(0,n.jsx)(`div`,{className:`pointer-events-none absolute top-3 left-4 text-sm text-slate-400 dark:text-slate-600 select-none`,"aria-hidden":!0,children:c})]})]})}exports.RichTextEditor=s;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");let t=require("react"),n=require("react/jsx-runtime");function r({onClick:t,title:r,active:i,children:a}){return(0,n.jsx)(`button`,{type:`button`,title:r,onMouseDown:e=>{e.preventDefault(),t()},className:e.t(`h-7 w-7 flex items-center justify-center rounded-md text-sm transition-colors`,i?`bg-black/10 dark:bg-white/15 text-foreground`:`text-slate-500 dark:text-slate-400 hover:text-foreground hover:bg-black/6 dark:hover:bg-white/8`),children:a})}function i(){return(0,n.jsx)(`div`,{className:`w-px h-5 bg-black/10 dark:bg-white/10 mx-0.5`})}var a=new Set([`href`,`src`,`xlink:href`,`action`,`formaction`,`poster`,`background`,`cite`,`data`,`ping`,`srcset`]),o=new Set([`http`,`https`,`mailto`,`tel`,`ftp`,`sms`]);function s(e){let t=e.replace(/[\u0000-\u0020\u007f-\u00a0]/g,``).toLowerCase(),n=/^([a-z][a-z0-9+.-]*):/.exec(t);return n?!o.has(n[1]):!1}function c(e){if(typeof document>`u`)return e;let t=document.createElement(`template`);t.innerHTML=e,t.content.querySelectorAll(`script, style, iframe, object, embed, link, meta, base, form`).forEach(e=>e.remove());let n=document.createTreeWalker(t.content,NodeFilter.SHOW_ELEMENT);for(;n.nextNode();){let e=n.currentNode;for(let t of Array.from(e.attributes)){let n=t.name.toLowerCase();if(n.startsWith(`on`)){e.removeAttribute(t.name);continue}a.has(n)&&s(t.value)&&e.removeAttribute(t.name)}}return t.innerHTML}function l(e,t){return t?typeof t==`function`?t(e):c(e):e}function u({value:a=``,onChange:o,placeholder:s=`Start typing…`,className:c,minHeight:u=160,sanitize:d=!1}){let f=(0,t.useRef)(null),p=(0,t.useRef)(a);(0,t.useEffect)(()=>{let e=l(a,d);f.current&&f.current.innerHTML!==e&&(f.current.innerHTML=e,p.current=e)},[a,d]);let m=(0,t.useCallback)(()=>{let e=f.current?.innerHTML??``,t=d?l(e,d):e;t!==p.current&&(p.current=t,o?.(t))},[o,d]);function h(e,t){try{document.execCommand(e,!1,t)}catch{}f.current?.focus(),m()}function g(e){try{return document.queryCommandState(e)}catch{return!1}}return(0,n.jsxs)(`div`,{className:e.t(`rounded-xl overflow-hidden border border-black/10 dark:border-white/10 bg-white dark:bg-navy-900 focus-within:ring-1 focus-within:ring-blue-500/40 focus-within:border-accent-500/30 transition-all`,c),children:[(0,n.jsxs)(`div`,{className:`flex flex-wrap items-center gap-0.5 px-2 py-2 border-b border-black/[0.07] dark:border-white/[0.07] bg-black/2 dark:bg-white/2`,children:[(0,n.jsx)(r,{title:`Bold (⌘B)`,onClick:()=>h(`bold`),active:g(`bold`),children:(0,n.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,n.jsx)(`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`})})}),(0,n.jsx)(r,{title:`Italic (⌘I)`,onClick:()=>h(`italic`),active:g(`italic`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`line`,{x1:`19`,y1:`4`,x2:`10`,y2:`4`}),(0,n.jsx)(`line`,{x1:`14`,y1:`20`,x2:`5`,y2:`20`}),(0,n.jsx)(`line`,{x1:`15`,y1:`4`,x2:`9`,y2:`20`})]})}),(0,n.jsx)(r,{title:`Underline (⌘U)`,onClick:()=>h(`underline`),active:g(`underline`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`}),(0,n.jsx)(`line`,{x1:`4`,y1:`20`,x2:`20`,y2:`20`})]})}),(0,n.jsx)(r,{title:`Strikethrough`,onClick:()=>h(`strikeThrough`),active:g(`strikeThrough`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4M14 12a4 4 0 0 1 0 8H6`}),(0,n.jsx)(`line`,{x1:`4`,y1:`12`,x2:`20`,y2:`12`})]})}),(0,n.jsx)(i,{}),(0,n.jsx)(r,{title:`Heading 1`,onClick:()=>h(`formatBlock`,`<h1>`),children:(0,n.jsx)(`span`,{className:`text-[11px] font-bold`,children:`H1`})}),(0,n.jsx)(r,{title:`Heading 2`,onClick:()=>h(`formatBlock`,`<h2>`),children:(0,n.jsx)(`span`,{className:`text-[11px] font-bold`,children:`H2`})}),(0,n.jsx)(r,{title:`Paragraph`,onClick:()=>h(`formatBlock`,`<p>`),children:(0,n.jsx)(`span`,{className:`text-[11px] font-medium`,children:`P`})}),(0,n.jsx)(i,{}),(0,n.jsx)(r,{title:`Bullet list`,onClick:()=>h(`insertUnorderedList`),active:g(`insertUnorderedList`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`line`,{x1:`9`,y1:`6`,x2:`20`,y2:`6`}),(0,n.jsx)(`line`,{x1:`9`,y1:`12`,x2:`20`,y2:`12`}),(0,n.jsx)(`line`,{x1:`9`,y1:`18`,x2:`20`,y2:`18`}),(0,n.jsx)(`circle`,{cx:`4`,cy:`6`,r:`1.5`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`4`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`4`,cy:`18`,r:`1.5`,fill:`currentColor`,stroke:`none`})]})}),(0,n.jsx)(r,{title:`Ordered list`,onClick:()=>h(`insertOrderedList`),active:g(`insertOrderedList`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`line`,{x1:`10`,y1:`6`,x2:`21`,y2:`6`}),(0,n.jsx)(`line`,{x1:`10`,y1:`12`,x2:`21`,y2:`12`}),(0,n.jsx)(`line`,{x1:`10`,y1:`18`,x2:`21`,y2:`18`}),(0,n.jsx)(`path`,{d:`M4 6h1v4`}),(0,n.jsx)(`path`,{d:`M4 10h2`}),(0,n.jsx)(`path`,{d:`M6 18H4c0-1 2-2 2-3s-1-1.5-2-1`})]})}),(0,n.jsx)(r,{title:`Blockquote`,onClick:()=>h(`formatBlock`,`<blockquote>`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z`}),(0,n.jsx)(`path`,{d:`M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z`})]})}),(0,n.jsx)(i,{}),(0,n.jsx)(r,{title:`Undo (⌘Z)`,onClick:()=>h(`undo`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M3 7v6h6`}),(0,n.jsx)(`path`,{d:`M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13`})]})}),(0,n.jsx)(r,{title:`Redo (⌘⇧Z)`,onClick:()=>h(`redo`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M21 7v6h-6`}),(0,n.jsx)(`path`,{d:`M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7`})]})}),(0,n.jsx)(r,{title:`Clear formatting`,onClick:()=>h(`removeFormat`),children:(0,n.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,n.jsx)(`path`,{d:`M4 7V4h16v3`}),(0,n.jsx)(`path`,{d:`M5 20h6`}),(0,n.jsx)(`path`,{d:`M13 4 8 20`}),(0,n.jsx)(`line`,{x1:`3`,y1:`3`,x2:`21`,y2:`21`})]})})]}),(0,n.jsxs)(`div`,{className:`relative`,children:[(0,n.jsx)(`div`,{ref:f,contentEditable:!0,suppressContentEditableWarning:!0,onInput:m,onBlur:m,style:{minHeight:u},className:e.t(`px-4 py-3 text-sm text-slate-800 dark:text-slate-200 focus:outline-none`,`prose prose-sm max-w-none`,`[&_h1]:text-xl [&_h1]:font-bold [&_h1]:mb-2 [&_h1]:text-gray-900 dark:[&_h1]:text-white`,`[&_h2]:text-lg [&_h2]:font-semibold [&_h2]:mb-1.5 [&_h2]:text-gray-900 dark:[&_h2]:text-white`,`[&_p]:mb-2 [&_ul]:list-disc [&_ul]:pl-5 [&_ul]:mb-2 [&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:mb-2`,`[&_blockquote]:border-l-2 [&_blockquote]:border-accent-400 [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground [&_blockquote]:italic`)}),!a&&(0,n.jsx)(`div`,{className:`pointer-events-none absolute top-3 left-4 text-sm text-slate-400 dark:text-slate-600 select-none`,"aria-hidden":!0,children:s})]})]})}exports.RichTextEditor=u;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
3
  import { useCallback as t, useEffect as n, useRef as r } from "react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  //#region src/components/richtext.tsx
@@ -10,41 +10,68 @@ function o({ onClick: t, title: n, active: r, children: a }) {
10
10
  onMouseDown: (e) => {
11
11
  e.preventDefault(), t();
12
12
  },
13
- className: e("h-7 w-7 flex items-center justify-center rounded-md text-sm transition-colors", r ? "bg-black/10 dark:bg-white/15 text-gray-900 dark:text-white" : "text-slate-500 dark:text-slate-400 hover:text-gray-900 dark:hover:text-white hover:bg-black/6 dark:hover:bg-white/8"),
13
+ className: e("h-7 w-7 flex items-center justify-center rounded-md text-sm transition-colors", r ? "bg-black/10 dark:bg-white/15 text-foreground" : "text-slate-500 dark:text-slate-400 hover:text-foreground hover:bg-black/6 dark:hover:bg-white/8"),
14
14
  children: a
15
15
  });
16
16
  }
17
17
  function s() {
18
18
  return /* @__PURE__ */ i("div", { className: "w-px h-5 bg-black/10 dark:bg-white/10 mx-0.5" });
19
19
  }
20
- function c(e) {
20
+ var c = /* @__PURE__ */ new Set([
21
+ "href",
22
+ "src",
23
+ "xlink:href",
24
+ "action",
25
+ "formaction",
26
+ "poster",
27
+ "background",
28
+ "cite",
29
+ "data",
30
+ "ping",
31
+ "srcset"
32
+ ]), l = /* @__PURE__ */ new Set([
33
+ "http",
34
+ "https",
35
+ "mailto",
36
+ "tel",
37
+ "ftp",
38
+ "sms"
39
+ ]);
40
+ function u(e) {
41
+ let t = e.replace(/[\u0000-\u0020\u007f-\u00a0]/g, "").toLowerCase(), n = /^([a-z][a-z0-9+.-]*):/.exec(t);
42
+ return n ? !l.has(n[1]) : !1;
43
+ }
44
+ function d(e) {
21
45
  if (typeof document > "u") return e;
22
46
  let t = document.createElement("template");
23
- t.innerHTML = e, t.content.querySelectorAll("script, style, iframe, object, embed, link, meta").forEach((e) => e.remove());
47
+ t.innerHTML = e, t.content.querySelectorAll("script, style, iframe, object, embed, link, meta, base, form").forEach((e) => e.remove());
24
48
  let n = document.createTreeWalker(t.content, NodeFilter.SHOW_ELEMENT);
25
49
  for (; n.nextNode();) {
26
50
  let e = n.currentNode;
27
51
  for (let t of Array.from(e.attributes)) {
28
- let n = t.name.toLowerCase(), r = t.value.trim().toLowerCase();
29
- (n.startsWith("on") || r.startsWith("javascript:")) && e.removeAttribute(t.name);
52
+ let n = t.name.toLowerCase();
53
+ if (n.startsWith("on")) {
54
+ e.removeAttribute(t.name);
55
+ continue;
56
+ }
57
+ c.has(n) && u(t.value) && e.removeAttribute(t.name);
30
58
  }
31
59
  }
32
- let r = t.innerHTML;
33
- return r = r.replace(/\son\w+\s*=\s*(['"])[^'"]*\1/gi, ""), r;
60
+ return t.innerHTML;
34
61
  }
35
- function l(e, t) {
36
- return t ? typeof t == "function" ? t(e) : c(e) : e;
62
+ function f(e, t) {
63
+ return t ? typeof t == "function" ? t(e) : d(e) : e;
37
64
  }
38
- function u({ value: c = "", onChange: u, placeholder: d = "Start typing…", className: f, minHeight: p = 160, sanitize: m = !1 }) {
65
+ function p({ value: c = "", onChange: l, placeholder: u = "Start typing…", className: d, minHeight: p = 160, sanitize: m = !1 }) {
39
66
  let h = r(null), g = r(c);
40
67
  n(() => {
41
- let e = l(c, m);
68
+ let e = f(c, m);
42
69
  h.current && h.current.innerHTML !== e && (h.current.innerHTML = e, g.current = e);
43
70
  }, [c, m]);
44
71
  let _ = t(() => {
45
- let e = h.current?.innerHTML ?? "", t = m ? l(e, m) : e;
46
- t !== g.current && (g.current = t, u?.(t));
47
- }, [u, m]);
72
+ let e = h.current?.innerHTML ?? "", t = m ? f(e, m) : e;
73
+ t !== g.current && (g.current = t, l?.(t));
74
+ }, [l, m]);
48
75
  function v(e, t) {
49
76
  try {
50
77
  document.execCommand(e, !1, t);
@@ -59,7 +86,7 @@ function u({ value: c = "", onChange: u, placeholder: d = "Start typing…", cla
59
86
  }
60
87
  }
61
88
  return /* @__PURE__ */ a("div", {
62
- className: e("rounded-xl overflow-hidden border border-black/10 dark:border-white/10 bg-white dark:bg-navy-900 focus-within:ring-1 focus-within:ring-blue-500/40 focus-within:border-accent-500/30 transition-all", f),
89
+ className: e("rounded-xl overflow-hidden border border-black/10 dark:border-white/10 bg-white dark:bg-navy-900 focus-within:ring-1 focus-within:ring-blue-500/40 focus-within:border-accent-500/30 transition-all", d),
63
90
  children: [/* @__PURE__ */ a("div", {
64
91
  className: "flex flex-wrap items-center gap-0.5 px-2 py-2 border-b border-black/[0.07] dark:border-white/[0.07] bg-black/2 dark:bg-white/2",
65
92
  children: [
@@ -361,10 +388,10 @@ function u({ value: c = "", onChange: u, placeholder: d = "Start typing…", cla
361
388
  }), !c && /* @__PURE__ */ i("div", {
362
389
  className: "pointer-events-none absolute top-3 left-4 text-sm text-slate-400 dark:text-slate-600 select-none",
363
390
  "aria-hidden": !0,
364
- children: d
391
+ children: u
365
392
  })]
366
393
  })]
367
394
  });
368
395
  }
369
396
  //#endregion
370
- export { u as RichTextEditor };
397
+ export { p as RichTextEditor };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");require("../component-styles-DOUctc8_.cjs");let t=require("react"),n=require("react/jsx-runtime");var r={vertical:`overflow-y-auto overflow-x-hidden`,horizontal:`overflow-x-auto overflow-y-hidden`,both:`overflow-auto`},i=(0,t.forwardRef)(({orientation:t=`vertical`,hideScrollbar:i=!1,keyboardNavigable:a=!0,className:o,tabIndex:s,...c},l)=>(0,n.jsx)(`div`,{ref:l,"data-orientation":t,tabIndex:s??(a?0:void 0),className:e.t(`relative overscroll-contain rounded-[var(--radius-sm)]`,a&&`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg`,r[t],i&&`scrollbar-none`,o),...c}));i.displayName=`ScrollArea`,exports.ScrollArea=i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");require("../component-styles-DY4wigiq.cjs");let t=require("react"),n=require("react/jsx-runtime");var r={vertical:`overflow-y-auto overflow-x-hidden`,horizontal:`overflow-x-auto overflow-y-hidden`,both:`overflow-auto`},i=(0,t.forwardRef)(({orientation:t=`vertical`,hideScrollbar:i=!1,keyboardNavigable:a=!0,className:o,tabIndex:s,...c},l)=>(0,n.jsx)(`div`,{ref:l,"data-orientation":t,tabIndex:s??(a?0:void 0),className:e.t(`relative overscroll-contain rounded-[var(--radius-sm)]`,a&&`focus-ring`,r[t],i&&`scrollbar-none`,o),...c}));i.displayName=`ScrollArea`,exports.ScrollArea=i;
@@ -1,5 +1,5 @@
1
- import { t as e } from "../cn-DpgY2leY.js";
2
- import "../component-styles-Bgy44fc8.js";
1
+ import { t as e } from "../cn-BJyZJP-y.js";
2
+ import "../component-styles-C2CbHEEA.js";
3
3
  import { forwardRef as t } from "react";
4
4
  import { jsx as n } from "react/jsx-runtime";
5
5
  //#region src/components/scroll-area.tsx
@@ -11,7 +11,7 @@ var r = {
11
11
  ref: l,
12
12
  "data-orientation": t,
13
13
  tabIndex: s ?? (a ? 0 : void 0),
14
- className: e("relative overscroll-contain rounded-[var(--radius-sm)]", a && "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg", r[t], i && "scrollbar-none", o),
14
+ className: e("relative overscroll-contain rounded-[var(--radius-sm)]", a && "focus-ring", r[t], i && "scrollbar-none", o),
15
15
  ...c
16
16
  }));
17
17
  i.displayName = "ScrollArea";
@@ -1,5 +1,5 @@
1
1
  import { FlatOption, MenuPos, SelectItem, SelectOption, SelectOptionColor } from './types';
2
- export declare function OptionList({ listId, listRef, open, pos, options, flat, activeIdx, setActiveIdx, isSelected, onSelect, colorDot, multiselectable, className, }: {
2
+ export declare function OptionList({ listId, listRef, open, pos, options, flat, activeIdx, setActiveIdx, isSelected, onSelect, colorDot, multiselectable, className, optionClassName, groupLabelClassName, }: {
3
3
  listId: string;
4
4
  listRef: React.RefObject<HTMLUListElement | null>;
5
5
  open: boolean;
@@ -13,4 +13,6 @@ export declare function OptionList({ listId, listRef, open, pos, options, flat,
13
13
  colorDot: Record<SelectOptionColor, string>;
14
14
  multiselectable?: boolean;
15
15
  className?: string;
16
+ optionClassName?: string;
17
+ groupLabelClassName?: string;
16
18
  }): import('react').ReactPortal | null;
@@ -26,6 +26,10 @@ export interface SelectPropsBase {
26
26
  wrapperClassName?: string;
27
27
  triggerClassName?: string;
28
28
  listClassName?: string;
29
+ labelClassName?: string;
30
+ messageClassName?: string;
31
+ optionClassName?: string;
32
+ groupLabelClassName?: string;
29
33
  id?: string;
30
34
  unstyled?: boolean;
31
35
  }
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../select-BFwx--uK.cjs");exports.Select=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../select-ByjnuEcE.cjs");exports.Select=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../select-ClWrcj3R.js";
1
+ import { t as e } from "../select-CiMzLhUK.js";
2
2
  export { e as Select };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react/jsx-runtime");function n({alt:n,loading:r=`lazy`,decoding:i=`async`,className:a,width:o,height:s,style:c,...l}){return(!n||n.trim()===``)&&console.warn(`[rtui SeoImage] alt text is required for SEO and accessibility. Provide a descriptive alt.`),(0,t.jsx)(`img`,{alt:n,loading:r,decoding:i,width:o,height:s,className:e.t(o&&s?`h-auto`:void 0,a),style:o&&s?{aspectRatio:`${o}/${s}`,...c}:c,...l})}function r({data:e,id:n}){let r=Array.isArray(e)?e:[e];return(0,t.jsx)(t.Fragment,{children:r.map((e,i)=>(0,t.jsx)(`script`,{id:n&&r.length===1?n:void 0,type:`application/ld+json`,dangerouslySetInnerHTML:{__html:JSON.stringify(e).replace(/</g,`\\u003c`)}},n?`${n}-${i}`:i))})}function i({items:e,id:n=`breadcrumb-jsonld`}){let i={"@context":`https://schema.org`,"@type":`BreadcrumbList`,itemListElement:e.map((e,t)=>({"@type":`ListItem`,position:t+1,name:e.name,...e.item?{item:e.item}:{}}))};return(0,t.jsx)(r,{data:i,id:n})}function a({headline:e,description:n,url:i,image:a,authorName:o,datePublished:s,dateModified:c,id:l=`article-jsonld`}){let u={"@context":`https://schema.org`,"@type":`Article`,headline:e,...n?{description:n}:{},...i?{url:i}:{},...a?{image:a}:{},...o?{author:{"@type":`Person`,name:o}}:{},...s?{datePublished:s}:{},...c?{dateModified:c}:{}};return(0,t.jsx)(r,{data:u,id:l})}exports.ArticleJsonLd=a,exports.BreadcrumbJsonLd=i,exports.SeoImage=n,exports.StructuredData=r;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");let t=require("react/jsx-runtime");function n({alt:n,loading:r=`lazy`,decoding:i=`async`,className:a,width:o,height:s,style:c,...l}){return(!n||n.trim()===``)&&console.warn(`[rtui SeoImage] alt text is required for SEO and accessibility. Provide a descriptive alt.`),(0,t.jsx)(`img`,{alt:n,loading:r,decoding:i,width:o,height:s,className:e.t(o&&s?`h-auto`:void 0,a),style:o&&s?{aspectRatio:`${o}/${s}`,...c}:c,...l})}function r({data:e,id:n}){let r=Array.isArray(e)?e:[e];return(0,t.jsx)(t.Fragment,{children:r.map((e,i)=>(0,t.jsx)(`script`,{id:n&&r.length===1?n:void 0,type:`application/ld+json`,dangerouslySetInnerHTML:{__html:JSON.stringify(e).replace(/</g,`\\u003c`)}},n?`${n}-${i}`:i))})}function i({items:e,id:n=`breadcrumb-jsonld`}){let i={"@context":`https://schema.org`,"@type":`BreadcrumbList`,itemListElement:e.map((e,t)=>({"@type":`ListItem`,position:t+1,name:e.name,...e.item?{item:e.item}:{}}))};return(0,t.jsx)(r,{data:i,id:n})}function a({headline:e,description:n,url:i,image:a,authorName:o,datePublished:s,dateModified:c,id:l=`article-jsonld`}){let u={"@context":`https://schema.org`,"@type":`Article`,headline:e,...n?{description:n}:{},...i?{url:i}:{},...a?{image:a}:{},...o?{author:{"@type":`Person`,name:o}}:{},...s?{datePublished:s}:{},...c?{dateModified:c}:{}};return(0,t.jsx)(r,{data:u,id:l})}exports.ArticleJsonLd=a,exports.BreadcrumbJsonLd=i,exports.SeoImage=n,exports.StructuredData=r;
@@ -1,4 +1,4 @@
1
- import { t as e } from "../cn-DpgY2leY.js";
1
+ import { t as e } from "../cn-BJyZJP-y.js";
2
2
  import { Fragment as t, jsx as n } from "react/jsx-runtime";
3
3
  //#region src/components/seo.tsx
4
4
  function r({ alt: t, loading: r = "lazy", decoding: i = "async", className: a, width: o, height: s, style: c, ...l }) {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react/jsx-runtime");function n({orientation:n=`horizontal`,label:r,className:i,...a}){return n===`vertical`?(0,t.jsx)(`div`,{className:e.t(`w-px self-stretch bg-black/8 dark:bg-white/8`,i),...a}):r?(0,t.jsxs)(`div`,{className:e.t(`flex items-center gap-3`,i),...a,children:[(0,t.jsx)(`div`,{className:`flex-1 h-px bg-black/8 dark:bg-white/8`}),(0,t.jsx)(`span`,{className:`text-xs text-slate-500 font-medium shrink-0`,children:r}),(0,t.jsx)(`div`,{className:`flex-1 h-px bg-black/8 dark:bg-white/8`})]}):(0,t.jsx)(`div`,{className:e.t(`h-px w-full bg-black/8 dark:bg-white/8`,i),...a})}exports.Separator=n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");let t=require("react/jsx-runtime");function n({orientation:n=`horizontal`,label:r,className:i,...a}){return n===`vertical`?(0,t.jsx)(`div`,{className:e.t(`w-px self-stretch bg-black/8 dark:bg-white/8`,i),...a}):r?(0,t.jsxs)(`div`,{className:e.t(`flex items-center gap-3`,i),...a,children:[(0,t.jsx)(`div`,{className:`flex-1 h-px bg-black/8 dark:bg-white/8`}),(0,t.jsx)(`span`,{className:`text-xs text-slate-500 font-medium shrink-0`,children:r}),(0,t.jsx)(`div`,{className:`flex-1 h-px bg-black/8 dark:bg-white/8`})]}):(0,t.jsx)(`div`,{className:e.t(`h-px w-full bg-black/8 dark:bg-white/8`,i),...a})}exports.Separator=n;
@@ -1,4 +1,4 @@
1
- import { t as e } from "../cn-DpgY2leY.js";
1
+ import { t as e } from "../cn-BJyZJP-y.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  //#region src/components/separator.tsx
4
4
  function r({ orientation: r = "horizontal", label: i, className: a, ...o }) {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react/jsx-runtime");var n={sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,full:`rounded-full`};function r({className:r,width:i,height:a,rounded:o=`md`,style:s,...c}){return(0,t.jsx)(`div`,{className:e.t(`animate-pulse bg-muted`,n[o],r),style:{width:i,height:a,...s},"aria-hidden":`true`,...c})}function i({lines:n=3,className:i,lastLineWidth:a=`60%`}){return(0,t.jsx)(`div`,{className:e.t(`space-y-2`,i),"aria-hidden":`true`,children:Array.from({length:n}).map((e,i)=>(0,t.jsx)(r,{height:14,width:i===n-1?a:`100%`},i))})}var a={sm:32,md:36,lg:44};function o({size:e=`md`,className:n}){let i=a[e];return(0,t.jsx)(r,{width:i,height:i,rounded:`full`,className:n})}function s({lines:n=3,hasAvatar:i=!1,hasFooter:a=!1,className:s}){return(0,t.jsxs)(`div`,{className:e.t(`rounded-[var(--radius-lg)] border border-border bg-surface`,s),"aria-hidden":`true`,children:[(0,t.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-border px-5 py-4`,children:[i&&(0,t.jsx)(o,{}),(0,t.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,t.jsx)(r,{height:14,width:`40%`}),(0,t.jsx)(r,{height:11,width:`25%`})]})]}),(0,t.jsx)(`div`,{className:`px-5 py-4 space-y-2.5`,children:Array.from({length:n}).map((e,i)=>(0,t.jsx)(r,{height:13,width:i===n-1?`65%`:`100%`},i))}),a&&(0,t.jsxs)(`div`,{className:`flex items-center gap-2 border-t border-border px-5 py-3.5`,children:[(0,t.jsx)(r,{height:28,width:72,rounded:`lg`}),(0,t.jsx)(r,{height:28,width:72,rounded:`lg`})]})]})}function c({hasBreadcrumb:n=!0,hasAction:i=!0,className:a}){return(0,t.jsxs)(`div`,{className:e.t(`w-full px-4 py-3 sm:px-6 sm:py-4`,`bg-surface/90`,`border-b border-border`,`sticky top-0 z-30`,a),"aria-hidden":`true`,children:[n&&(0,t.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-2.5`,children:[(0,t.jsx)(r,{height:10,width:72}),(0,t.jsx)(r,{height:10,width:6,rounded:`full`}),(0,t.jsx)(r,{height:10,width:52})]}),(0,t.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,t.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,t.jsx)(r,{height:18,width:148}),(0,t.jsx)(r,{height:11,width:196})]}),i&&(0,t.jsx)(r,{height:30,width:100,rounded:`lg`})]})]})}function l({rows:n=5,cols:i=4,className:a}){return(0,t.jsxs)(`div`,{className:e.t(`overflow-hidden rounded-[var(--radius-lg)] border border-border`,a),"aria-hidden":`true`,children:[(0,t.jsx)(`div`,{className:`flex items-center gap-4 border-b border-border bg-surface-muted px-4 py-3`,children:Array.from({length:i}).map((e,n)=>(0,t.jsx)(r,{height:11,width:`${50+n*13%50}px`},n))}),Array.from({length:n}).map((e,n)=>(0,t.jsx)(`div`,{className:`flex items-center gap-4 border-b border-border px-4 py-3 last:border-none`,children:Array.from({length:i}).map((e,i)=>(0,t.jsx)(r,{height:13,width:`${55+(n+i)*11%45}%`},i))},n))]})}exports.Skeleton=r,exports.SkeletonAvatar=o,exports.SkeletonCard=s,exports.SkeletonTable=l,exports.SkeletonText=i,exports.SkeletonTopbar=c;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");let t=require("react/jsx-runtime");var n={sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,full:`rounded-full`};function r({className:r,width:i,height:a,rounded:o=`md`,style:s,...c}){return(0,t.jsx)(`div`,{className:e.t(`animate-pulse bg-muted`,n[o],r),style:{width:i,height:a,...s},"aria-hidden":`true`,...c})}function i({lines:n=3,className:i,lastLineWidth:a=`60%`}){return(0,t.jsx)(`div`,{className:e.t(`space-y-2`,i),"aria-hidden":`true`,children:Array.from({length:n}).map((e,i)=>(0,t.jsx)(r,{height:14,width:i===n-1?a:`100%`},i))})}var a={sm:32,md:36,lg:44};function o({size:e=`md`,className:n}){let i=a[e];return(0,t.jsx)(r,{width:i,height:i,rounded:`full`,className:n})}function s({lines:n=3,hasAvatar:i=!1,hasFooter:a=!1,className:s}){return(0,t.jsxs)(`div`,{className:e.t(`rounded-[var(--radius-lg)] border border-border bg-surface`,s),"aria-hidden":`true`,children:[(0,t.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-border px-5 py-4`,children:[i&&(0,t.jsx)(o,{}),(0,t.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,t.jsx)(r,{height:14,width:`40%`}),(0,t.jsx)(r,{height:11,width:`25%`})]})]}),(0,t.jsx)(`div`,{className:`px-5 py-4 space-y-2.5`,children:Array.from({length:n}).map((e,i)=>(0,t.jsx)(r,{height:13,width:i===n-1?`65%`:`100%`},i))}),a&&(0,t.jsxs)(`div`,{className:`flex items-center gap-2 border-t border-border px-5 py-3.5`,children:[(0,t.jsx)(r,{height:28,width:72,rounded:`lg`}),(0,t.jsx)(r,{height:28,width:72,rounded:`lg`})]})]})}function c({hasBreadcrumb:n=!0,hasAction:i=!0,className:a}){return(0,t.jsxs)(`div`,{className:e.t(`w-full px-4 py-3 sm:px-6 sm:py-4`,`bg-surface/90`,`border-b border-border`,`sticky top-0 z-30`,a),"aria-hidden":`true`,children:[n&&(0,t.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-2.5`,children:[(0,t.jsx)(r,{height:10,width:72}),(0,t.jsx)(r,{height:10,width:6,rounded:`full`}),(0,t.jsx)(r,{height:10,width:52})]}),(0,t.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,t.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,t.jsx)(r,{height:18,width:148}),(0,t.jsx)(r,{height:11,width:196})]}),i&&(0,t.jsx)(r,{height:30,width:100,rounded:`lg`})]})]})}function l({rows:n=5,cols:i=4,density:a=`comfortable`,className:o}){return(0,t.jsxs)(`div`,{"data-density":a,className:e.t(`overflow-hidden rounded-[var(--radius-lg)] border border-border`,o),"aria-hidden":`true`,children:[(0,t.jsx)(`div`,{className:`flex items-center gap-4 border-b border-border bg-surface-muted px-4 py-3`,children:Array.from({length:i}).map((e,n)=>(0,t.jsx)(r,{height:11,width:`${50+n*13%50}px`},n))}),Array.from({length:n}).map((e,n)=>(0,t.jsx)(`div`,{className:`flex items-center gap-4 border-b border-border px-4 py-3 last:border-none`,children:Array.from({length:i}).map((e,i)=>(0,t.jsx)(r,{height:13,width:`${55+(n+i)*11%45}%`},i))},n))]})}function u({items:n=4,hasAvatar:i=!1,density:a=`comfortable`,className:s}){let c=a===`compact`?`py-2`:`py-3`;return(0,t.jsx)(`div`,{className:e.t(`divide-y divide-border rounded-[var(--radius-lg)] border border-border bg-surface`,s),"aria-hidden":`true`,children:Array.from({length:n}).map((n,a)=>(0,t.jsxs)(`div`,{className:e.t(`flex items-center gap-3 px-4`,c),children:[i&&(0,t.jsx)(o,{size:`sm`}),(0,t.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,t.jsx)(r,{height:12,width:`${60+a*7%30}%`}),(0,t.jsx)(r,{height:10,width:`${40+a*11%30}%`})]}),(0,t.jsx)(r,{height:20,width:48,rounded:`full`})]},a))})}function d({count:n=3,className:i}){return(0,t.jsx)(`div`,{className:e.t(`grid gap-4`,n===2?`grid-cols-2`:n===4?`grid-cols-4`:`grid-cols-3`,i),"aria-hidden":`true`,children:Array.from({length:n}).map((e,n)=>(0,t.jsxs)(`div`,{className:`rounded-[var(--radius-lg)] border border-border bg-surface p-4 space-y-3`,children:[(0,t.jsx)(r,{height:10,width:64}),(0,t.jsx)(r,{height:20,width:96}),(0,t.jsx)(r,{height:10,width:120})]},n))})}exports.Skeleton=r,exports.SkeletonAvatar=o,exports.SkeletonCard=s,exports.SkeletonList=u,exports.SkeletonStat=d,exports.SkeletonTable=l,exports.SkeletonText=i,exports.SkeletonTopbar=c;
@@ -32,6 +32,19 @@ export declare function SkeletonTopbar({ hasBreadcrumb, hasAction, className, }:
32
32
  export interface SkeletonTableProps {
33
33
  rows?: number;
34
34
  cols?: number;
35
+ density?: "compact" | "comfortable";
35
36
  className?: string;
36
37
  }
37
- export declare function SkeletonTable({ rows, cols, className, }: SkeletonTableProps): import("react").JSX.Element;
38
+ export declare function SkeletonTable({ rows, cols, density, className, }: SkeletonTableProps): import("react").JSX.Element;
39
+ export interface SkeletonListProps {
40
+ items?: number;
41
+ hasAvatar?: boolean;
42
+ density?: "compact" | "comfortable";
43
+ className?: string;
44
+ }
45
+ export declare function SkeletonList({ items, hasAvatar, density, className, }: SkeletonListProps): import("react").JSX.Element;
46
+ export interface SkeletonStatProps {
47
+ count?: number;
48
+ className?: string;
49
+ }
50
+ export declare function SkeletonStat({ count, className }: SkeletonStatProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { t as e } from "../cn-DpgY2leY.js";
1
+ import { t as e } from "../cn-BJyZJP-y.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  //#region src/components/skeleton.tsx
4
4
  var r = {
@@ -123,9 +123,10 @@ function l({ hasBreadcrumb: r = !0, hasAction: a = !0, className: o }) {
123
123
  })]
124
124
  });
125
125
  }
126
- function u({ rows: r = 5, cols: a = 4, className: o }) {
126
+ function u({ rows: r = 5, cols: a = 4, density: o = "comfortable", className: s }) {
127
127
  return /* @__PURE__ */ n("div", {
128
- className: e("overflow-hidden rounded-[var(--radius-lg)] border border-border", o),
128
+ "data-density": o,
129
+ className: e("overflow-hidden rounded-[var(--radius-lg)] border border-border", s),
129
130
  "aria-hidden": "true",
130
131
  children: [/* @__PURE__ */ t("div", {
131
132
  className: "flex items-center gap-4 border-b border-border bg-surface-muted px-4 py-3",
@@ -142,5 +143,56 @@ function u({ rows: r = 5, cols: a = 4, className: o }) {
142
143
  }, n))]
143
144
  });
144
145
  }
146
+ function d({ items: r = 4, hasAvatar: a = !1, density: o = "comfortable", className: c }) {
147
+ let l = o === "compact" ? "py-2" : "py-3";
148
+ return /* @__PURE__ */ t("div", {
149
+ className: e("divide-y divide-border rounded-[var(--radius-lg)] border border-border bg-surface", c),
150
+ "aria-hidden": "true",
151
+ children: Array.from({ length: r }).map((r, o) => /* @__PURE__ */ n("div", {
152
+ className: e("flex items-center gap-3 px-4", l),
153
+ children: [
154
+ a && /* @__PURE__ */ t(s, { size: "sm" }),
155
+ /* @__PURE__ */ n("div", {
156
+ className: "flex-1 space-y-1.5",
157
+ children: [/* @__PURE__ */ t(i, {
158
+ height: 12,
159
+ width: `${60 + o * 7 % 30}%`
160
+ }), /* @__PURE__ */ t(i, {
161
+ height: 10,
162
+ width: `${40 + o * 11 % 30}%`
163
+ })]
164
+ }),
165
+ /* @__PURE__ */ t(i, {
166
+ height: 20,
167
+ width: 48,
168
+ rounded: "full"
169
+ })
170
+ ]
171
+ }, o))
172
+ });
173
+ }
174
+ function f({ count: r = 3, className: a }) {
175
+ return /* @__PURE__ */ t("div", {
176
+ className: e("grid gap-4", r === 2 ? "grid-cols-2" : r === 4 ? "grid-cols-4" : "grid-cols-3", a),
177
+ "aria-hidden": "true",
178
+ children: Array.from({ length: r }).map((e, r) => /* @__PURE__ */ n("div", {
179
+ className: "rounded-[var(--radius-lg)] border border-border bg-surface p-4 space-y-3",
180
+ children: [
181
+ /* @__PURE__ */ t(i, {
182
+ height: 10,
183
+ width: 64
184
+ }),
185
+ /* @__PURE__ */ t(i, {
186
+ height: 20,
187
+ width: 96
188
+ }),
189
+ /* @__PURE__ */ t(i, {
190
+ height: 10,
191
+ width: 120
192
+ })
193
+ ]
194
+ }, r))
195
+ });
196
+ }
145
197
  //#endregion
146
- export { i as Skeleton, s as SkeletonAvatar, c as SkeletonCard, u as SkeletonTable, a as SkeletonText, l as SkeletonTopbar };
198
+ export { i as Skeleton, s as SkeletonAvatar, c as SkeletonCard, d as SkeletonList, f as SkeletonStat, u as SkeletonTable, a as SkeletonText, l as SkeletonTopbar };
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs"),t=require("../component-styles-DOUctc8_.cjs");let n=require("react"),r=require("react/jsx-runtime");var i=(0,n.forwardRef)(({className:i,label:a,hint:o,error:s,showValue:c=!0,formatValue:l,min:u=0,max:d=100,step:f=1,value:p,defaultValue:m,onChange:h,disabled:g,id:_,...v},y)=>{let b=(0,n.useId)(),x=_??b,S=`${x}-message`,[C,w]=(0,n.useState)(Number(p??m??u));(0,n.useEffect)(()=>{p!==void 0&&w(Number(p))},[p]);let T=Number(p??C),E=d===u?0:Math.min(100,Math.max(0,(T-u)/(d-u)*100)),D=l?l(T):String(T);return(0,r.jsxs)(`div`,{className:e.t(t.o,i),children:[(a||c)&&(0,r.jsxs)(`div`,{className:`flex items-center justify-between`,children:[a&&(0,r.jsx)(`label`,{htmlFor:x,className:`text-xs font-semibold leading-5 text-foreground`,children:a}),c&&(0,r.jsx)(`output`,{htmlFor:x,className:`text-sm font-medium tabular-nums text-foreground`,children:D})]}),(0,r.jsxs)(`div`,{className:`relative flex items-center h-5`,children:[(0,r.jsx)(`div`,{className:`absolute inset-x-0 h-1.5 rounded-full bg-muted`,children:(0,r.jsx)(`div`,{className:`absolute left-0 top-0 h-full rounded-full bg-accent-500`,style:{width:`${E}%`}})}),(0,r.jsx)(`input`,{ref:y,type:`range`,id:x,min:u,max:d,step:f,value:T,disabled:g,"aria-invalid":s?!0:void 0,"aria-describedby":s||o?S:void 0,"aria-valuetext":D,onChange:e=>{let t=Number(e.target.value);p===void 0&&w(t),h?.(e)},className:e.t(`relative w-full appearance-none bg-transparent cursor-pointer`,`focus-visible:outline-none focus-visible:[&::-webkit-slider-thumb]:ring-4 focus-visible:[&::-webkit-slider-thumb]:ring-focus-ring/25`,`disabled:cursor-not-allowed disabled:opacity-50`,`[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4`,`[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white`,`[&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-accent-500`,`[&::-webkit-slider-thumb]:shadow-sm`,`[&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:rounded-full`,`[&::-moz-range-thumb]:bg-white [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-accent-500`,`[&::-moz-range-thumb]:shadow-md`),...v})]}),s&&(0,r.jsx)(`p`,{id:S,"aria-live":`polite`,className:`text-xs leading-5 text-destructive`,children:s}),o&&!s&&(0,r.jsx)(`p`,{id:S,className:`text-xs leading-5 text-muted-foreground`,children:o})]})});i.displayName=`Slider`,exports.Slider=i;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs"),t=require("../component-styles-DY4wigiq.cjs");let n=require("react"),r=require("react/jsx-runtime");var i=(0,n.forwardRef)(({className:i,label:a,hint:o,error:s,showValue:c=!0,formatValue:l,min:u=0,max:d=100,step:f=1,value:p,defaultValue:m,onChange:h,disabled:g,id:_,...v},y)=>{let b=(0,n.useId)(),x=_??b,S=`${x}-message`,[C,w]=(0,n.useState)(Number(p??m??u));(0,n.useEffect)(()=>{p!==void 0&&w(Number(p))},[p]);let T=Number(p??C),E=d===u?0:Math.min(100,Math.max(0,(T-u)/(d-u)*100)),D=l?l(T):String(T);return(0,r.jsxs)(`div`,{className:e.t(t.o,i),children:[(a||c)&&(0,r.jsxs)(`div`,{className:`flex items-center justify-between`,children:[a&&(0,r.jsx)(`label`,{htmlFor:x,className:`text-xs font-semibold leading-5 text-foreground`,children:a}),c&&(0,r.jsx)(`output`,{htmlFor:x,className:`text-sm font-medium tabular-nums text-foreground`,children:D})]}),(0,r.jsxs)(`div`,{className:`relative flex items-center h-5`,children:[(0,r.jsx)(`div`,{className:`absolute inset-x-0 h-1.5 rounded-full bg-muted`,children:(0,r.jsx)(`div`,{className:`absolute left-0 top-0 h-full rounded-full bg-accent-500`,style:{width:`${E}%`}})}),(0,r.jsx)(`input`,{ref:y,type:`range`,id:x,min:u,max:d,step:f,value:T,disabled:g,"aria-invalid":s?!0:void 0,"aria-describedby":s||o?S:void 0,"aria-valuetext":D,onChange:e=>{let t=Number(e.target.value);p===void 0&&w(t),h?.(e)},className:e.t(`relative w-full appearance-none bg-transparent cursor-pointer`,`focus-visible:outline-none focus-visible:[&::-webkit-slider-thumb]:ring-4 focus-visible:[&::-webkit-slider-thumb]:ring-focus-ring/25`,`disabled:cursor-not-allowed disabled:opacity-50`,`[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4`,`[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white`,`[&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-accent-500`,`[&::-webkit-slider-thumb]:shadow-sm`,`[&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:rounded-full`,`[&::-moz-range-thumb]:bg-white [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-accent-500`,`[&::-moz-range-thumb]:shadow-md`),...v})]}),s&&(0,r.jsx)(`p`,{id:S,"aria-live":`polite`,className:`text-xs leading-5 text-destructive`,children:s}),o&&!s&&(0,r.jsx)(`p`,{id:S,className:`text-xs leading-5 text-muted-foreground`,children:o})]})});i.displayName=`Slider`,exports.Slider=i;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
3
- import { o as t } from "../component-styles-Bgy44fc8.js";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
+ import { o as t } from "../component-styles-C2CbHEEA.js";
4
4
  import { forwardRef as n, useEffect as r, useId as i, useState as a } from "react";
5
5
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
6
  //#region src/components/slider.tsx
@@ -0,0 +1 @@
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");let t=require("react");var n=(0,t.forwardRef)(({children:n,...r},i)=>{if(!(0,t.isValidElement)(n))return null;let a=n.props,o=e.t(a.className,r.className),s={...a,...r,className:o||void 0};return i&&(s.ref=i),(0,t.cloneElement)(n,s)});n.displayName=`Slot`,exports.Slot=n;