@matthiaskrijgsman/mat-ui 0.0.47 → 0.0.50

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.
package/dist/index.js CHANGED
@@ -1,44 +1,44 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as d, Fragment as ne } from "react/jsx-runtime";
3
- import * as k from "react";
4
- import { createContext as Qe, useContext as Ze, useEffect as j, useState as W, useRef as Ce, useCallback as Pe, useLayoutEffect as St, useMemo as se } from "react";
5
- import { AnimatePresence as De, motion as Y, animate as qt } from "motion/react";
6
- import { IconExclamationCircleFilled as et, IconEyeOff as Jt, IconEye as Yt, IconPaperclip as Qt, IconCircleCheckFilled as tt, IconX as de, IconCloudUpload as Zt, IconCheck as Dt, IconChevronDown as ve, IconBold as en, IconItalic as tn, IconUnderline as nn, IconList as Je, IconListNumbers as rn, IconLink as on, IconArrowBackUp as an, IconArrowForwardUp as ln, IconDots as sn, IconSearch as Fe, IconSearchOff as nt, IconInfoCircleFilled as cn, IconAlertTriangleFilled as dn, IconChevronRight as un, IconChevronUp as hn, IconSettings as mt, IconPlus as pt, IconTrash as fn, IconMailFilled as mn } from "@tabler/icons-react";
7
- import { FloatingPortal as Me, flip as rt, shift as ot, size as at, useFloating as lt, autoUpdate as it, useDismiss as zt, useInteractions as Ot, offset as pn, useListNavigation as gn, FloatingOverlay as Tt } from "@floating-ui/react";
8
- import { mergeRefs as vn } from "react-merge-refs";
9
- import { useDropzone as Pt } from "react-dropzone";
10
- import { LexicalComposer as bn } from "@lexical/react/LexicalComposer";
11
- import { RichTextPlugin as xn } from "@lexical/react/LexicalRichTextPlugin";
12
- import { ContentEditable as wn } from "@lexical/react/LexicalContentEditable";
13
- import { HistoryPlugin as Nn } from "@lexical/react/LexicalHistoryPlugin";
14
- import { ListPlugin as yn } from "@lexical/react/LexicalListPlugin";
15
- import { LinkPlugin as kn } from "@lexical/react/LexicalLinkPlugin";
16
- import { OnChangePlugin as Cn } from "@lexical/react/LexicalOnChangePlugin";
17
- import { AutoFocusPlugin as In } from "@lexical/react/LexicalAutoFocusPlugin";
18
- import { LexicalErrorBoundary as Rn } from "@lexical/react/LexicalErrorBoundary";
19
- import { HeadingNode as Sn, QuoteNode as Dn, $isHeadingNode as zn, $createHeadingNode as On } from "@lexical/rich-text";
20
- import { ListNode as Lt, ListItemNode as Tn, $isListNode as Pn, REMOVE_LIST_COMMAND as gt, INSERT_UNORDERED_LIST_COMMAND as Ln, INSERT_ORDERED_LIST_COMMAND as En } from "@lexical/list";
21
- import { LinkNode as Fn, $isLinkNode as vt, TOGGLE_LINK_COMMAND as bt } from "@lexical/link";
2
+ import { jsx as e, jsxs as d, Fragment as Q } from "react/jsx-runtime";
3
+ import * as C from "react";
4
+ import { createContext as Fe, useContext as Me, useEffect as j, useState as U, useRef as Ie, useCallback as be, useLayoutEffect as Ot, useMemo as se, useId as Zt } from "react";
5
+ import { AnimatePresence as Re, motion as Y, animate as en } from "motion/react";
6
+ import { IconExclamationCircleFilled as tt, IconEyeOff as tn, IconEye as nn, IconPaperclip as rn, IconCircleCheckFilled as nt, IconX as de, IconCloudUpload as on, IconChevronLeft as an, IconCheck as zt, IconChevronDown as xe, IconBold as ln, IconItalic as sn, IconUnderline as cn, IconList as Ze, IconListNumbers as dn, IconLink as un, IconArrowBackUp as hn, IconArrowForwardUp as fn, IconDots as mn, IconSearch as Be, IconSearchOff as rt, IconInfoCircleFilled as pn, IconAlertTriangleFilled as gn, IconChevronRight as ot, IconChevronUp as vn, IconSettings as pt, IconPlus as gt, IconTrash as bn, IconMailFilled as xn } from "@tabler/icons-react";
7
+ import { FloatingPortal as Ae, offset as Tt, flip as at, shift as lt, size as it, useFloatingNodeId as wn, useFloating as st, autoUpdate as ct, useDismiss as Pt, useInteractions as Lt, FloatingNode as Nn, useFloatingParentNodeId as yn, FloatingTree as kn, useListNavigation as Cn, FloatingOverlay as Et } from "@floating-ui/react";
8
+ import { mergeRefs as In } from "react-merge-refs";
9
+ import { useDropzone as Ft } from "react-dropzone";
10
+ import { LexicalComposer as Rn } from "@lexical/react/LexicalComposer";
11
+ import { RichTextPlugin as Sn } from "@lexical/react/LexicalRichTextPlugin";
12
+ import { ContentEditable as Dn } from "@lexical/react/LexicalContentEditable";
13
+ import { HistoryPlugin as On } from "@lexical/react/LexicalHistoryPlugin";
14
+ import { ListPlugin as zn } from "@lexical/react/LexicalListPlugin";
15
+ import { LinkPlugin as Tn } from "@lexical/react/LexicalLinkPlugin";
16
+ import { OnChangePlugin as Pn } from "@lexical/react/LexicalOnChangePlugin";
17
+ import { AutoFocusPlugin as Ln } from "@lexical/react/LexicalAutoFocusPlugin";
18
+ import { LexicalErrorBoundary as En } from "@lexical/react/LexicalErrorBoundary";
19
+ import { HeadingNode as Fn, QuoteNode as Mn, $isHeadingNode as Bn, $createHeadingNode as An } from "@lexical/rich-text";
20
+ import { ListNode as Mt, ListItemNode as Un, $isListNode as Wn, REMOVE_LIST_COMMAND as vt, INSERT_UNORDERED_LIST_COMMAND as $n, INSERT_ORDERED_LIST_COMMAND as Hn } from "@lexical/list";
21
+ import { LinkNode as _n, $isLinkNode as bt, TOGGLE_LINK_COMMAND as xt } from "@lexical/link";
22
22
  import { useLexicalComposerContext as ue } from "@lexical/react/LexicalComposerContext";
23
- import { CAN_UNDO_COMMAND as Mn, COMMAND_PRIORITY_LOW as Le, CAN_REDO_COMMAND as Bn, $getSelection as Et, $isRangeSelection as Ft, $createParagraphNode as An, FORMAT_TEXT_COMMAND as je, UNDO_COMMAND as Un, REDO_COMMAND as Wn, FOCUS_COMMAND as Hn, BLUR_COMMAND as $n } from "lexical";
24
- import { mergeRegister as Mt, $getNearestNodeOfType as _n } from "@lexical/utils";
25
- import { $setBlocksType as xt } from "@lexical/selection";
26
- const h = (...n) => n.filter(Boolean).join(" "), jn = [
23
+ import { CAN_UNDO_COMMAND as jn, COMMAND_PRIORITY_LOW as Le, CAN_REDO_COMMAND as Xn, $getSelection as Bt, $isRangeSelection as At, $createParagraphNode as Vn, FORMAT_TEXT_COMMAND as Ke, UNDO_COMMAND as Kn, REDO_COMMAND as Gn, FOCUS_COMMAND as qn, BLUR_COMMAND as Jn } from "lexical";
24
+ import { mergeRegister as Ut, $getNearestNodeOfType as Yn } from "@lexical/utils";
25
+ import { $setBlocksType as wt } from "@lexical/selection";
26
+ const u = (...t) => t.filter(Boolean).join(" "), Qn = [
27
27
  "polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)",
28
28
  "polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)",
29
29
  "polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)",
30
30
  "polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)",
31
31
  "polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"
32
- ], Se = (n) => {
32
+ ], Oe = (t) => {
33
33
  const {
34
- speed: t = 1,
34
+ speed: n = 1,
35
35
  className: l
36
- } = n, a = 1 / t, r = 2 / t;
37
- return /* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
36
+ } = t, a = 1 / n, r = 2 / n;
37
+ return /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ e(
38
38
  Y.div,
39
39
  {
40
40
  role: "status",
41
- className: h("relative rounded-full", l),
41
+ className: u("relative rounded-full", l),
42
42
  animate: { rotate: 360 },
43
43
  transition: { repeat: 1 / 0, ease: "linear", duration: a },
44
44
  children: /* @__PURE__ */ e(
@@ -50,7 +50,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
50
50
  borderStyle: "solid",
51
51
  borderWidth: 2
52
52
  },
53
- animate: { clipPath: jn },
53
+ animate: { clipPath: Qn },
54
54
  transition: {
55
55
  repeat: 1 / 0,
56
56
  ease: "linear",
@@ -61,11 +61,11 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
61
61
  )
62
62
  }
63
63
  ) });
64
- }, Q = {
64
+ }, Z = {
65
65
  sm: "h-[var(--control-size-sm-height)]",
66
66
  md: "h-[var(--control-size-md-height)]",
67
67
  lg: "h-[var(--control-size-lg-height)]"
68
- }, Bt = {
68
+ }, Wt = {
69
69
  sm: "min-h-[var(--control-size-sm-height)]",
70
70
  md: "min-h-[var(--control-size-md-height)]",
71
71
  lg: "min-h-[var(--control-size-lg-height)]"
@@ -73,11 +73,11 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
73
73
  sm: "text-[length:var(--control-size-sm-font-size)]",
74
74
  md: "text-[length:var(--control-size-md-font-size)]",
75
75
  lg: "text-[length:var(--control-size-lg-font-size)]"
76
- }, st = {
76
+ }, dt = {
77
77
  sm: "gap-[var(--control-size-sm-gap)]",
78
78
  md: "gap-[var(--control-size-md-gap)]",
79
79
  lg: "gap-[var(--control-size-lg-gap)]"
80
- }, ct = {
80
+ }, ut = {
81
81
  sm: "px-[var(--control-size-sm-px)]",
82
82
  md: "px-[var(--control-size-md-px)]",
83
83
  lg: "px-[var(--control-size-lg-px)]"
@@ -85,7 +85,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
85
85
  sm: "pl-[var(--control-size-sm-px)]",
86
86
  md: "pl-[var(--control-size-md-px)]",
87
87
  lg: "pl-[var(--control-size-lg-px)]"
88
- }, dt = {
88
+ }, ht = {
89
89
  sm: "pr-[var(--control-size-sm-px)]",
90
90
  md: "pr-[var(--control-size-md-px)]",
91
91
  lg: "pr-[var(--control-size-lg-px)]"
@@ -93,44 +93,44 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
93
93
  sm: "pr-[calc(var(--control-size-sm-px)+2rem)]",
94
94
  md: "pr-[calc(var(--control-size-md-px)+2rem)]",
95
95
  lg: "pr-[calc(var(--control-size-lg-px)+2rem)]"
96
- }, Be = {
96
+ }, Ue = {
97
97
  sm: "pr-[calc(var(--control-size-sm-px)+3.75rem)]",
98
98
  md: "pr-[calc(var(--control-size-md-px)+3.75rem)]",
99
99
  lg: "pr-[calc(var(--control-size-lg-px)+3.75rem)]"
100
- }, At = {
100
+ }, $t = {
101
101
  sm: "pl-[calc(var(--control-size-sm-icon-offset)+var(--control-size-sm-icon)+0.75rem)]",
102
102
  md: "pl-[calc(var(--control-size-md-icon-offset)+var(--control-size-md-icon)+0.75rem)]",
103
103
  lg: "pl-[calc(var(--control-size-lg-icon-offset)+var(--control-size-lg-icon)+0.75rem)]"
104
- }, Ut = {
104
+ }, Ht = {
105
105
  sm: "left-[var(--control-size-sm-icon-offset)]",
106
106
  md: "left-[var(--control-size-md-icon-offset)]",
107
107
  lg: "left-[var(--control-size-lg-icon-offset)]"
108
- }, Xn = {
108
+ }, Zn = {
109
109
  sm: "right-[var(--control-size-sm-px)]",
110
110
  md: "right-[var(--control-size-md-px)]",
111
111
  lg: "right-[var(--control-size-lg-px)]"
112
- }, ee = {
112
+ }, te = {
113
113
  sm: "h-[var(--control-size-sm-icon)] w-[var(--control-size-sm-icon)]",
114
114
  md: "h-[var(--control-size-md-icon)] w-[var(--control-size-md-icon)]",
115
115
  lg: "h-[var(--control-size-lg-icon)] w-[var(--control-size-lg-icon)]"
116
- }, Wt = {
116
+ }, _t = {
117
117
  sm: "h-[var(--control-size-sm-height)] w-[var(--control-size-sm-height)]",
118
118
  md: "h-[var(--control-size-md-height)] w-[var(--control-size-md-height)]",
119
119
  lg: "h-[var(--control-size-lg-height)] w-[var(--control-size-lg-height)]"
120
- }, Vn = `
120
+ }, er = `
121
121
  inline-flex flex-row items-center justify-center
122
122
  button-ring font-[number:var(--font-weight-button)] font-[family-name:var(--font-family-base)] ring-0 disabled:hover:ring-0 hover:ring-[length:var(--control-ring-width)] active:ring-[length:var(--control-ring-width-active)]
123
123
  rounded-[var(--border-radius-button)]
124
124
  cursor-pointer transition-all duration-[var(--control-transition-duration)] select-none focus:outline-none focus:ring-[length:var(--control-ring-width)]
125
125
  disabled:cursor-default
126
- `, Kn = {
126
+ `, tr = {
127
127
  primary: "border-[length:var(--border-width-input)] button-primary shadow-[var(--shadow-control)]",
128
128
  secondary: "border-[length:var(--border-width-input)] button-secondary shadow-[var(--shadow-control)]",
129
129
  tertiary: "border-[length:var(--border-width-input)] button-tertiary",
130
130
  white: "border-[length:var(--border-width-input)] button-white shadow-[var(--shadow-control)]",
131
131
  black: "border-[length:var(--border-width-input)] button-black shadow-[var(--shadow-control)]",
132
132
  transparent: "border-[length:var(--border-width-input)] button-transparent"
133
- }, Gn = k.forwardRef((n, t) => {
133
+ }, nr = C.forwardRef((t, n) => {
134
134
  const {
135
135
  variant: l = "white",
136
136
  size: a = "md",
@@ -139,135 +139,135 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
139
139
  loading: i = !1,
140
140
  Icon: s,
141
141
  IconRight: c,
142
- ...g
143
- } = n;
142
+ ...p
143
+ } = t;
144
144
  return /* @__PURE__ */ d(
145
145
  "button",
146
146
  {
147
- ref: t,
148
- className: h(
149
- Vn,
150
- Kn[l],
151
- Q[a],
152
- ct[a],
147
+ ref: n,
148
+ className: u(
149
+ er,
150
+ tr[l],
151
+ Z[a],
152
+ ut[a],
153
153
  G[a],
154
- st[a],
154
+ dt[a],
155
155
  r
156
156
  ),
157
- ...g,
157
+ ...p,
158
158
  children: [
159
- i && /* @__PURE__ */ e(Se, { className: h(ee[a]) }),
160
- !i && /* @__PURE__ */ d(ne, { children: [
161
- s && /* @__PURE__ */ e(s, { className: h(ee[a], "-ml-1") }),
159
+ i && /* @__PURE__ */ e(Oe, { className: u(te[a]) }),
160
+ !i && /* @__PURE__ */ d(Q, { children: [
161
+ s && /* @__PURE__ */ e(s, { className: u(te[a], "-ml-1") }),
162
162
  o,
163
- c && /* @__PURE__ */ e(c, { className: h(ee[a], "-mr-1") })
163
+ c && /* @__PURE__ */ e(c, { className: u(te[a], "-mr-1") })
164
164
  ] })
165
165
  ]
166
166
  }
167
167
  );
168
- }), qn = `
168
+ }), rr = `
169
169
  inline-flex flex-row items-center justify-center
170
170
  button-ring font-[number:var(--font-weight-button)] font-[family-name:var(--font-family-base)] ring-0 disabled:hover:ring-0 hover:ring-[length:var(--control-ring-width)] active:ring-[length:var(--control-ring-width-active)]
171
171
  rounded-[var(--border-radius-button)]
172
172
  cursor-pointer transition-all duration-[var(--control-transition-duration)] select-none focus:outline-none focus:ring-[length:var(--control-ring-width)]
173
173
  disabled:cursor-default
174
- `, Jn = {
174
+ `, or = {
175
175
  primary: "border-[length:var(--border-width-input)] button-primary shadow-[var(--shadow-control)]",
176
176
  secondary: "border-[length:var(--border-width-input)] button-secondary shadow-[var(--shadow-control)]",
177
177
  tertiary: "border-[length:var(--border-width-input)] button-tertiary",
178
178
  white: "border-[length:var(--border-width-input)] button-white shadow-[var(--shadow-control)]",
179
179
  black: "border-[length:var(--border-width-input)] button-black shadow-[var(--shadow-control)]",
180
180
  transparent: "border-[length:var(--border-width-input)] button-transparent"
181
- }, Ye = k.forwardRef((n, t) => {
181
+ }, et = C.forwardRef((t, n) => {
182
182
  const {
183
183
  variant: l = "white",
184
184
  size: a = "md",
185
185
  className: r,
186
186
  Icon: o,
187
187
  ...i
188
- } = n;
188
+ } = t;
189
189
  return /* @__PURE__ */ e(
190
190
  "button",
191
191
  {
192
- ref: t,
193
- className: h(
194
- qn,
195
- Jn[l],
196
- Wt[a],
192
+ ref: n,
193
+ className: u(
194
+ rr,
195
+ or[l],
196
+ _t[a],
197
197
  r
198
198
  ),
199
199
  ...i,
200
- children: /* @__PURE__ */ e(o, { className: ee[a] })
200
+ children: /* @__PURE__ */ e(o, { className: te[a] })
201
201
  }
202
202
  );
203
- }), Yn = `
203
+ }), ar = `
204
204
  inline-flex flex-row items-center justify-center
205
205
  button-ring font-[number:var(--font-weight-button)] font-[family-name:var(--font-family-base)] ring-0 disabled:hover:ring-0 hover:ring-[length:var(--control-ring-width)] active:ring-[length:var(--control-ring-width-active)] rounded-full cursor-pointer transition-all duration-[var(--control-transition-duration)] select-none focus:outline-none focus:ring-[length:var(--control-ring-width)]
206
206
  disabled:cursor-default
207
- `, Qn = {
207
+ `, lr = {
208
208
  primary: "border-[length:var(--border-width-input)] button-primary shadow-[var(--shadow-control)]",
209
209
  secondary: "border-[length:var(--border-width-input)] button-secondary shadow-[var(--shadow-control)]",
210
210
  tertiary: "border-[length:var(--border-width-input)] button-tertiary",
211
211
  white: "border-[length:var(--border-width-input)] button-white shadow-[var(--shadow-control)]",
212
212
  black: "border-[length:var(--border-width-input)] button-black shadow-[var(--shadow-control)]",
213
213
  transparent: "border-[length:var(--border-width-input)] button-transparent"
214
- }, Ht = k.forwardRef((n, t) => {
214
+ }, jt = C.forwardRef((t, n) => {
215
215
  const {
216
216
  variant: l = "white",
217
217
  size: a = "md",
218
218
  className: r,
219
219
  Icon: o,
220
220
  ...i
221
- } = n;
221
+ } = t;
222
222
  return /* @__PURE__ */ e(
223
223
  "button",
224
224
  {
225
- ref: t,
226
- className: h(
227
- Yn,
228
- Qn[l],
229
- Wt[a],
225
+ ref: n,
226
+ className: u(
227
+ ar,
228
+ lr[l],
229
+ _t[a],
230
230
  r
231
231
  ),
232
232
  ...i,
233
- children: /* @__PURE__ */ e(o, { className: ee[a] })
233
+ children: /* @__PURE__ */ e(o, { className: te[a] })
234
234
  }
235
235
  );
236
- }), Z = (n) => {
236
+ }), ee = (t) => {
237
237
  const {
238
- children: t
239
- } = n;
240
- return t ? /* @__PURE__ */ e("label", { className: "input-label font-[number:var(--font-weight-input-label)] mb-1", children: t }) : null;
241
- }, oe = () => /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(et, { className: "h-5 w-5 input-error-icon" }) }), q = Qe("md"), Zn = () => Ze(q), me = k.forwardRef((n, t) => {
238
+ children: n
239
+ } = t;
240
+ return n ? /* @__PURE__ */ e("label", { className: "input-label font-[number:var(--font-weight-input-label)] mb-1", children: n }) : null;
241
+ }, oe = () => /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(tt, { className: "h-5 w-5 input-error-icon" }) }), q = Fe("md"), ir = () => Me(q), me = C.forwardRef((t, n) => {
242
242
  const {
243
243
  children: l,
244
244
  className: a
245
- } = n, r = Zn();
245
+ } = t, r = ir();
246
246
  return /* @__PURE__ */ e(
247
247
  "div",
248
248
  {
249
- ref: t,
250
- className: h(
249
+ ref: n,
250
+ className: u(
251
251
  "absolute top-1/2 -translate-y-1/2 flex flex-row items-center gap-1 pointer-events-none",
252
- Xn[r],
252
+ Zn[r],
253
253
  a
254
254
  ),
255
255
  children: l
256
256
  }
257
257
  );
258
- }), V = (n) => {
258
+ }), V = (t) => {
259
259
  const {
260
- children: t
261
- } = n;
262
- return t ? /* @__PURE__ */ e("div", { className: "input-description text-[length:var(--font-size-description)] font-[number:var(--font-weight-input-description)] mt-2", children: t }) : null;
263
- }, K = (n) => {
260
+ children: n
261
+ } = t;
262
+ return n ? /* @__PURE__ */ e("div", { className: "input-description text-[length:var(--font-size-description)] font-[number:var(--font-weight-input-description)] mt-2", children: n }) : null;
263
+ }, K = (t) => {
264
264
  const {
265
- children: t
266
- } = n;
267
- return t ? /* @__PURE__ */ e("div", { className: "input-error-text text-[length:var(--font-size-error)] font-[number:var(--font-weight-input-error)] mt-2", children: t }) : null;
268
- }, $t = (n) => {
265
+ children: n
266
+ } = t;
267
+ return n ? /* @__PURE__ */ e("div", { className: "input-error-text text-[length:var(--font-size-error)] font-[number:var(--font-weight-input-error)] mt-2", children: n }) : null;
268
+ }, Xt = (t) => {
269
269
  const {
270
- className: t,
270
+ className: n,
271
271
  label: l,
272
272
  description: a,
273
273
  Icon: r,
@@ -275,31 +275,31 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
275
275
  buttonTray: i,
276
276
  size: s = "md",
277
277
  ...c
278
- } = n, g = !!o || !!i;
278
+ } = t, p = !!o || !!i;
279
279
  return /* @__PURE__ */ e(q.Provider, { value: s, children: /* @__PURE__ */ d(
280
280
  "div",
281
281
  {
282
- className: h(
282
+ className: u(
283
283
  "flex flex-col",
284
- t
284
+ n
285
285
  ),
286
286
  children: [
287
- /* @__PURE__ */ e(Z, { children: l }),
287
+ /* @__PURE__ */ e(ee, { children: l }),
288
288
  /* @__PURE__ */ d("div", { className: "flex flex-col relative", children: [
289
- r && /* @__PURE__ */ e(r, { className: h(
289
+ r && /* @__PURE__ */ e(r, { className: u(
290
290
  "input-icon absolute top-1/2 -translate-y-1/2",
291
- ee[s],
292
- Ut[s]
291
+ te[s],
292
+ Ht[s]
293
293
  ) }),
294
294
  /* @__PURE__ */ e(
295
295
  "input",
296
296
  {
297
- className: h(
297
+ className: u(
298
298
  "border-[length:var(--border-width-input)] input-base transition-all duration-[var(--control-transition-duration)] rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] ring-0 focus:ring-[length:var(--control-ring-width)] focus:outline-none font-[number:var(--font-weight-input-text)] font-[family-name:var(--font-family-base)]",
299
- Q[s],
299
+ Z[s],
300
300
  G[s],
301
- r ? At[s] : he[s],
302
- g ? fe[s] : dt[s],
301
+ r ? $t[s] : he[s],
302
+ p ? fe[s] : ht[s],
303
303
  o && "input-error"
304
304
  ),
305
305
  ...c
@@ -315,84 +315,84 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
315
315
  ]
316
316
  }
317
317
  ) });
318
- }, er = (n) => {
319
- const t = n.match(/^#?([0-9a-fA-F]{6})$/);
320
- if (!t) return null;
321
- const l = parseInt(t[1], 16);
318
+ }, sr = (t) => {
319
+ const n = t.match(/^#?([0-9a-fA-F]{6})$/);
320
+ if (!n) return null;
321
+ const l = parseInt(n[1], 16);
322
322
  return [(l >> 16 & 255) / 255, (l >> 8 & 255) / 255, (l & 255) / 255];
323
- }, tr = (n, t, l) => {
323
+ }, cr = (t, n, l) => {
324
324
  const a = (r) => Math.round(r * 255).toString(16).padStart(2, "0").toUpperCase();
325
- return "#" + a(n) + a(t) + a(l);
326
- }, nr = (n, t, l) => {
327
- const a = Math.max(n, t, l), r = Math.min(n, t, l), o = a - r;
325
+ return "#" + a(t) + a(n) + a(l);
326
+ }, dr = (t, n, l) => {
327
+ const a = Math.max(t, n, l), r = Math.min(t, n, l), o = a - r;
328
328
  let i = 0;
329
- return o !== 0 && (a === n ? i = ((t - l) / o + 6) % 6 : a === t ? i = (l - n) / o + 2 : i = (n - t) / o + 4, i *= 60), [i, a === 0 ? 0 : o / a, a];
330
- }, rr = (n, t, l) => {
331
- const a = l * t, r = n / 60, o = a * (1 - Math.abs(r % 2 - 1));
329
+ return o !== 0 && (a === t ? i = ((n - l) / o + 6) % 6 : a === n ? i = (l - t) / o + 2 : i = (t - n) / o + 4, i *= 60), [i, a === 0 ? 0 : o / a, a];
330
+ }, ur = (t, n, l) => {
331
+ const a = l * n, r = t / 60, o = a * (1 - Math.abs(r % 2 - 1));
332
332
  let i = 0, s = 0, c = 0;
333
333
  r < 1 ? (i = a, s = o) : r < 2 ? (i = o, s = a) : r < 3 ? (s = a, c = o) : r < 4 ? (s = o, c = a) : r < 5 ? (i = o, c = a) : (i = a, c = o);
334
- const g = l - a;
335
- return [i + g, s + g, c + g];
336
- }, Re = (n, t, l) => {
337
- const [a, r, o] = rr(n, t, l);
338
- return tr(a, r, o);
339
- }, wt = (n) => {
340
- const t = er(n);
341
- return t ? nr(t[0], t[1], t[2]) : null;
342
- }, or = (n) => {
343
- const t = n.trim();
344
- if (!t) return null;
345
- const l = t.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
334
+ const p = l - a;
335
+ return [i + p, s + p, c + p];
336
+ }, De = (t, n, l) => {
337
+ const [a, r, o] = ur(t, n, l);
338
+ return cr(a, r, o);
339
+ }, Nt = (t) => {
340
+ const n = sr(t);
341
+ return n ? dr(n[0], n[1], n[2]) : null;
342
+ }, hr = (t) => {
343
+ const n = t.trim();
344
+ if (!n) return null;
345
+ const l = n.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
346
346
  if (l) {
347
347
  let i = l[1];
348
348
  return i.length === 3 && (i = i.split("").map((s) => s + s).join("")), "#" + i.toUpperCase();
349
349
  }
350
350
  if (typeof document > "u") return null;
351
351
  const a = document.createElement("div");
352
- if (a.style.color = t, !a.style.color) return null;
352
+ if (a.style.color = n, !a.style.color) return null;
353
353
  document.body.appendChild(a);
354
354
  const r = getComputedStyle(a).color;
355
355
  document.body.removeChild(a);
356
356
  const o = r.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
357
357
  return o ? "#" + [o[1], o[2], o[3]].map((i) => parseInt(i, 10).toString(16).padStart(2, "0")).join("").toUpperCase() : null;
358
- }, Xe = (n) => {
359
- const t = k.useRef(null), [l, a] = k.useState(!1), r = (o) => {
360
- t.current = null, a(!1), o.currentTarget.releasePointerCapture?.(o.pointerId);
358
+ }, Ge = (t) => {
359
+ const n = C.useRef(null), [l, a] = C.useState(!1), r = (o) => {
360
+ n.current = null, a(!1), o.currentTarget.releasePointerCapture?.(o.pointerId);
361
361
  };
362
362
  return {
363
363
  isDragging: l,
364
364
  bind: {
365
365
  onPointerDown: (o) => {
366
366
  const i = o.currentTarget;
367
- t.current = i.getBoundingClientRect(), i.setPointerCapture?.(o.pointerId), a(!0), n(o.clientX, o.clientY, t.current);
367
+ n.current = i.getBoundingClientRect(), i.setPointerCapture?.(o.pointerId), a(!0), t(o.clientX, o.clientY, n.current);
368
368
  },
369
369
  onPointerMove: (o) => {
370
- t.current && n(o.clientX, o.clientY, t.current);
370
+ n.current && t(o.clientX, o.clientY, n.current);
371
371
  },
372
372
  onPointerUp: r,
373
373
  onPointerCancel: r
374
374
  }
375
375
  };
376
- }, ar = "flex flex-col dropdown-panel border-[length:var(--border-width-input)] mt-1 rounded-[var(--border-radius-dropdown)] shadow-[var(--shadow-dropdown)] overflow-y-auto relative space-y-1", lr = {
376
+ }, fr = "flex flex-col dropdown-panel border-[length:var(--border-width-input)] mt-1 rounded-[var(--border-radius-dropdown)] shadow-[var(--shadow-dropdown)] overflow-y-auto relative space-y-1", mr = {
377
377
  sm: "p-2",
378
378
  md: "p-3",
379
379
  lg: "p-4"
380
- }, be = (n) => {
380
+ }, pe = (t) => {
381
381
  const {
382
- className: t,
382
+ className: n,
383
383
  children: l,
384
384
  padding: a = "md",
385
385
  ...r
386
- } = n;
386
+ } = t;
387
387
  return /* @__PURE__ */ e(
388
388
  "div",
389
389
  {
390
- className: h(ar, lr[a], t),
390
+ className: u(fr, mr[a], n),
391
391
  ...r,
392
392
  children: l
393
393
  }
394
394
  );
395
- }, ir = {
395
+ }, pr = {
396
396
  top: "bottom center",
397
397
  "top-start": "bottom left",
398
398
  "top-end": "bottom right",
@@ -405,117 +405,121 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
405
405
  left: "right center",
406
406
  "left-start": "top right",
407
407
  "left-end": "bottom right"
408
- }, _t = k.memo(
409
- ({ open: n, children: t, className: l, floatingStyles: a, setFloating: r, placement: o, floatingProps: i }) => /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(De, { children: n && /* @__PURE__ */ e("div", { ref: r, style: a, className: "z-50", ...i, children: /* @__PURE__ */ e(
408
+ }, Vt = C.memo(
409
+ ({ open: t, children: n, className: l, floatingStyles: a, setFloating: r, placement: o, floatingProps: i }) => /* @__PURE__ */ e(Ae, { children: /* @__PURE__ */ e(Re, { children: t && /* @__PURE__ */ e("div", { ref: r, style: a, className: "z-50", ...i, children: /* @__PURE__ */ e(
410
410
  Y.div,
411
411
  {
412
412
  className: l,
413
- style: { transformOrigin: ir[o] },
413
+ style: { transformOrigin: pr[o] },
414
414
  initial: { opacity: 0, scale: 0.95 },
415
415
  animate: { opacity: 1, scale: 1 },
416
416
  exit: { opacity: 0, scale: 0.95 },
417
417
  transition: { duration: 0.1, ease: "easeInOut" },
418
- children: t
418
+ children: n
419
419
  }
420
420
  ) }) }) })
421
- ), ut = (n) => {
422
- const { placement: t = "bottom", open: l, onOpenChange: a, fullWidth: r, minWidth: o, maxWidth: i } = n, s = k.useMemo(() => [
423
- rt({ padding: 8 }),
424
- ot({ padding: 8 }),
425
- at({
426
- apply({ rects: u, elements: I }) {
427
- r && (I.floating.style.width = `${u.reference.width}px`), o && (I.floating.style.minWidth = `${o}px`), i && (I.floating.style.maxWidth = `${i}px`);
421
+ ), We = (t) => {
422
+ const { placement: n = "bottom", open: l, onOpenChange: a, fullWidth: r, minWidth: o, maxWidth: i, offset: s } = t, c = C.useMemo(() => [
423
+ ...s !== void 0 ? [Tt(s)] : [],
424
+ at({ padding: 8 }),
425
+ lt({ padding: 8 }),
426
+ it({
427
+ apply({ rects: b, elements: w }) {
428
+ r && (w.floating.style.width = `${b.reference.width}px`), o && (w.floating.style.minWidth = `${o}px`), i && (w.floating.style.maxWidth = `${i}px`);
428
429
  }
429
430
  })
430
- ], [r, i, o]), { refs: c, floatingStyles: g, context: R, placement: w } = lt({
431
- placement: t,
431
+ ], [r, i, o, s]), p = wn(), { refs: y, floatingStyles: x, context: f, placement: v } = st({
432
+ nodeId: p,
433
+ placement: n,
432
434
  open: l,
433
435
  onOpenChange: a,
434
- middleware: s,
435
- whileElementsMounted: it
436
- }), m = zt(R, {
436
+ middleware: c,
437
+ whileElementsMounted: ct
438
+ }), m = Pt(f, {
437
439
  enabled: !!a,
438
440
  outsidePress: !0,
439
441
  escapeKey: !1
440
- }), { getFloatingProps: v } = Ot([m]), f = k.useRef({
441
- floatingStyles: g,
442
- setFloating: c.setFloating,
443
- placement: t,
444
- getFloatingProps: v
442
+ }), { getFloatingProps: g } = Lt([m]), h = C.useRef({
443
+ floatingStyles: x,
444
+ setFloating: y.setFloating,
445
+ placement: n,
446
+ getFloatingProps: g,
447
+ nodeId: p
445
448
  });
446
- f.current = {
447
- floatingStyles: g,
448
- setFloating: c.setFloating,
449
- placement: w,
450
- getFloatingProps: v
449
+ h.current = {
450
+ floatingStyles: x,
451
+ setFloating: y.setFloating,
452
+ placement: v,
453
+ getFloatingProps: g,
454
+ nodeId: p
451
455
  };
452
- const p = k.useMemo(() => {
453
- const u = (I) => {
454
- const { floatingStyles: b, setFloating: N, placement: y, getFloatingProps: S } = f.current, { className: z, open: L, children: P } = I;
455
- return /* @__PURE__ */ e(
456
- _t,
456
+ const R = C.useMemo(() => {
457
+ const b = (w) => {
458
+ const { floatingStyles: k, setFloating: S, placement: z, getFloatingProps: L, nodeId: P } = h.current, { className: O, open: N, children: I } = w;
459
+ return /* @__PURE__ */ e(Nn, { id: P, children: /* @__PURE__ */ e(
460
+ Vt,
457
461
  {
458
- open: L,
459
- className: z,
460
- floatingStyles: b,
461
- setFloating: N,
462
- placement: y,
463
- floatingProps: S(),
464
- children: P
462
+ open: N,
463
+ className: O,
464
+ floatingStyles: k,
465
+ setFloating: S,
466
+ placement: z,
467
+ floatingProps: L(),
468
+ children: I
465
469
  }
466
- );
470
+ ) });
467
471
  };
468
- return k.memo(u);
472
+ return C.memo(b);
469
473
  }, []);
470
474
  return {
471
- anchorRef: c.setReference,
472
- Popover: p
475
+ anchorRef: y.setReference,
476
+ Popover: R
473
477
  };
474
- }, xe = (n, t) => {
478
+ }, we = (t, n) => {
475
479
  j(() => {
476
- if (!n) return;
480
+ if (!t) return;
477
481
  const l = (a) => {
478
- a.key === "Escape" && t();
482
+ a.key === "Escape" && n();
479
483
  };
480
484
  return document.addEventListener("keydown", l), () => {
481
485
  document.removeEventListener("keydown", l);
482
486
  };
483
- }, [n, t]);
484
- }, sr = "linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)", cr = "linear-gradient(to right, #fff, rgba(255,255,255,0))", dr = "linear-gradient(to top, #000, rgba(0,0,0,0))", Ve = "0 0 0 1px rgba(0,0,0,0.15)", ur = 14, hr = 28, fr = 6, mr = 8, Ke = { type: "spring", stiffness: 500, damping: 18, mass: 0.6 }, ye = (n) => {
485
- const t = n ? hr : ur, l = t / 2;
487
+ }, [t, n]);
488
+ }, gr = "linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)", vr = "linear-gradient(to right, #fff, rgba(255,255,255,0))", br = "linear-gradient(to top, #000, rgba(0,0,0,0))", qe = "0 0 0 1px rgba(0,0,0,0.15)", xr = 14, wr = 28, Nr = 6, yr = 8, Je = { type: "spring", stiffness: 500, damping: 18, mass: 0.6 }, ke = (t) => {
489
+ const n = t ? wr : xr, l = n / 2;
486
490
  return {
487
- width: t,
488
- height: t,
491
+ width: n,
492
+ height: n,
489
493
  marginLeft: -l,
490
494
  marginTop: -l,
491
- borderRadius: n ? mr : fr
495
+ borderRadius: t ? yr : Nr
492
496
  };
493
- }, Te = (n) => Math.max(0, Math.min(1, n)), Nt = (n, t) => {
494
- Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set?.call(n, t), n.dispatchEvent(new Event("input", { bubbles: !0 }));
495
- }, pr = ({ value: n, onChange: t }) => {
496
- const [l, a] = W(() => wt(n) ?? [0, 0, 1]), r = Ce(Re(l[0], l[1], l[2]));
497
+ }, Pe = (t) => Math.max(0, Math.min(1, t)), yt = (t, n) => {
498
+ Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set?.call(t, n), t.dispatchEvent(new Event("input", { bubbles: !0 }));
499
+ }, kr = ({ value: t, onChange: n }) => {
500
+ const [l, a] = U(() => Nt(t) ?? [0, 0, 1]), r = Ie(De(l[0], l[1], l[2]));
497
501
  j(() => {
498
- if ((n || "").toUpperCase() === r.current) return;
499
- const p = wt(n);
500
- p && a(p);
501
- }, [n]);
502
- const o = (p) => {
503
- a(p);
504
- const u = Re(p[0], p[1], p[2]);
505
- r.current = u, t(u);
506
- }, [i, s, c] = l, g = Re(i, 1, 1), R = Re(i, s, 1), w = Re(i, s, c), m = Xe((p, u, I) => {
507
- o([i, Te((p - I.left) / I.width), 1 - Te((u - I.top) / I.height)]);
508
- }), v = Xe((p, u, I) => {
509
- o([Te((p - I.left) / I.width) * 360, s, c]);
510
- }), f = Xe((p, u, I) => {
511
- o([i, s, Te((p - I.left) / I.width)]);
502
+ if ((t || "").toUpperCase() === r.current) return;
503
+ const g = Nt(t);
504
+ g && a(g);
505
+ }, [t]);
506
+ const o = (g) => {
507
+ a(g);
508
+ const h = De(g[0], g[1], g[2]);
509
+ r.current = h, n(h);
510
+ }, [i, s, c] = l, p = De(i, 1, 1), y = De(i, s, 1), x = De(i, s, c), f = Ge((g, h, R) => {
511
+ o([i, Pe((g - R.left) / R.width), 1 - Pe((h - R.top) / R.height)]);
512
+ }), v = Ge((g, h, R) => {
513
+ o([Pe((g - R.left) / R.width) * 360, s, c]);
514
+ }), m = Ge((g, h, R) => {
515
+ o([i, s, Pe((g - R.left) / R.width)]);
512
516
  });
513
517
  return /* @__PURE__ */ d(
514
518
  "div",
515
519
  {
516
520
  className: "flex flex-col gap-3",
517
521
  style: { width: 220, userSelect: "none" },
518
- onMouseDown: (p) => p.preventDefault(),
522
+ onMouseDown: (g) => g.preventDefault(),
519
523
  children: [
520
524
  /* @__PURE__ */ d(
521
525
  "div",
@@ -526,26 +530,26 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
526
530
  touchAction: "none",
527
531
  cursor: "crosshair"
528
532
  },
529
- ...m.bind,
533
+ ...f.bind,
530
534
  children: [
531
535
  /* @__PURE__ */ d(
532
536
  "div",
533
537
  {
534
538
  className: "absolute inset-0 rounded-[var(--border-radius-control-inner)] overflow-hidden border-[length:var(--border-width-input)] color-picker-surface",
535
- style: { backgroundColor: g },
539
+ style: { backgroundColor: p },
536
540
  children: [
537
541
  /* @__PURE__ */ e(
538
542
  "div",
539
543
  {
540
544
  className: "absolute inset-0 pointer-events-none",
541
- style: { background: cr }
545
+ style: { background: vr }
542
546
  }
543
547
  ),
544
548
  /* @__PURE__ */ e(
545
549
  "div",
546
550
  {
547
551
  className: "absolute inset-0 pointer-events-none",
548
- style: { background: dr }
552
+ style: { background: br }
549
553
  }
550
554
  )
551
555
  ]
@@ -558,12 +562,12 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
558
562
  style: {
559
563
  left: `${s * 100}%`,
560
564
  top: `${(1 - c) * 100}%`,
561
- boxShadow: Ve,
562
- backgroundColor: w
565
+ boxShadow: qe,
566
+ backgroundColor: x
563
567
  },
564
- initial: ye(!1),
565
- animate: ye(m.isDragging),
566
- transition: Ke
568
+ initial: ke(!1),
569
+ animate: ke(f.isDragging),
570
+ transition: Je
567
571
  }
568
572
  )
569
573
  ]
@@ -575,7 +579,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
575
579
  className: "relative w-full rounded-[var(--border-radius-control-inner)]",
576
580
  style: {
577
581
  height: 12,
578
- background: sr,
582
+ background: gr,
579
583
  touchAction: "none",
580
584
  cursor: "ew-resize"
581
585
  },
@@ -587,12 +591,12 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
587
591
  style: {
588
592
  top: "50%",
589
593
  left: `${i / 360 * 100}%`,
590
- backgroundColor: g,
591
- boxShadow: Ve
594
+ backgroundColor: p,
595
+ boxShadow: qe
592
596
  },
593
- initial: ye(!1),
594
- animate: ye(v.isDragging),
595
- transition: Ke
597
+ initial: ke(!1),
598
+ animate: ke(v.isDragging),
599
+ transition: Je
596
600
  }
597
601
  )
598
602
  }
@@ -603,11 +607,11 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
603
607
  className: "relative w-full rounded-[var(--border-radius-control-inner)]",
604
608
  style: {
605
609
  height: 12,
606
- background: `linear-gradient(to right, #000, ${R})`,
610
+ background: `linear-gradient(to right, #000, ${y})`,
607
611
  touchAction: "none",
608
612
  cursor: "ew-resize"
609
613
  },
610
- ...f.bind,
614
+ ...m.bind,
611
615
  children: /* @__PURE__ */ e(
612
616
  Y.div,
613
617
  {
@@ -615,12 +619,12 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
615
619
  style: {
616
620
  top: "50%",
617
621
  left: `${c * 100}%`,
618
- backgroundColor: w,
619
- boxShadow: Ve
622
+ backgroundColor: x,
623
+ boxShadow: qe
620
624
  },
621
- initial: ye(!1),
622
- animate: ye(f.isDragging),
623
- transition: Ke
625
+ initial: ke(!1),
626
+ animate: ke(m.isDragging),
627
+ transition: Je
624
628
  }
625
629
  )
626
630
  }
@@ -628,9 +632,9 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
628
632
  ]
629
633
  }
630
634
  );
631
- }, wo = (n) => {
635
+ }, To = (t) => {
632
636
  const {
633
- className: t,
637
+ className: n,
634
638
  label: l,
635
639
  description: a,
636
640
  error: r,
@@ -638,115 +642,115 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
638
642
  size: i = "md",
639
643
  value: s,
640
644
  defaultValue: c,
641
- onChange: g,
642
- onBlur: R,
643
- onFocus: w,
644
- ...m
645
- } = n, [v, f] = W(
645
+ onChange: p,
646
+ onBlur: y,
647
+ onFocus: x,
648
+ ...f
649
+ } = t, [v, m] = U(
646
650
  s != null ? String(s) : c != null ? String(c) : ""
647
- ), [p, u] = W(!1), I = Ce(null), b = s != null ? String(s) : v, N = b || "white";
648
- xe(p, () => u(!1));
649
- const { anchorRef: y, Popover: S } = ut({
651
+ ), [g, h] = U(!1), R = Ie(null), b = s != null ? String(s) : v, w = b || "white";
652
+ we(g, () => h(!1));
653
+ const { anchorRef: k, Popover: S } = We({
650
654
  placement: "bottom-start",
651
- open: p,
652
- onOpenChange: u
653
- }), z = (C) => {
654
- f(C.target.value), g?.(C);
655
- }, L = (C) => {
656
- u(!0), w?.(C);
657
- }, P = (C) => {
658
- const T = C.target.value, E = or(T);
659
- E && E !== T && I.current && Nt(I.current, E), u(!1), R?.(C);
660
- }, O = (C) => {
661
- I.current && Nt(I.current, C);
662
- }, x = !!r || !!o;
655
+ open: g,
656
+ onOpenChange: h
657
+ }), z = (I) => {
658
+ m(I.target.value), p?.(I);
659
+ }, L = (I) => {
660
+ h(!0), x?.(I);
661
+ }, P = (I) => {
662
+ const T = I.target.value, E = hr(T);
663
+ E && E !== T && R.current && yt(R.current, E), h(!1), y?.(I);
664
+ }, O = (I) => {
665
+ R.current && yt(R.current, I);
666
+ }, N = !!r || !!o;
663
667
  return /* @__PURE__ */ e(q.Provider, { value: i, children: /* @__PURE__ */ d(
664
668
  "div",
665
669
  {
666
- className: h(
670
+ className: u(
667
671
  "flex flex-col",
668
- t
672
+ n
669
673
  ),
670
674
  children: [
671
- /* @__PURE__ */ e(Z, { children: l }),
672
- /* @__PURE__ */ d("div", { className: "flex flex-col relative", ref: y, children: [
675
+ /* @__PURE__ */ e(ee, { children: l }),
676
+ /* @__PURE__ */ d("div", { className: "flex flex-col relative", ref: k, children: [
673
677
  /* @__PURE__ */ e(
674
678
  "div",
675
679
  {
676
- className: h(
680
+ className: u(
677
681
  "absolute top-1/2 -translate-y-1/2 rounded-[var(--border-radius-control-inner)] border-[length:var(--border-width-input)] color-swatch",
678
- ee[i],
679
- Ut[i]
682
+ te[i],
683
+ Ht[i]
680
684
  ),
681
- style: { backgroundColor: N }
685
+ style: { backgroundColor: w }
682
686
  }
683
687
  ),
684
688
  /* @__PURE__ */ e(
685
689
  "input",
686
690
  {
687
- ref: I,
688
- className: h(
691
+ ref: R,
692
+ className: u(
689
693
  "border-[length:var(--border-width-input)] input-base transition-all duration-[var(--control-transition-duration)] rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] ring-0 focus:ring-[length:var(--control-ring-width)] focus:outline-none font-[number:var(--font-weight-input-text)] font-[family-name:var(--font-family-base)]",
690
- Q[i],
694
+ Z[i],
691
695
  G[i],
692
- At[i],
693
- x ? fe[i] : dt[i],
696
+ $t[i],
697
+ N ? fe[i] : ht[i],
694
698
  r && "input-error"
695
699
  ),
696
700
  value: s ?? v,
697
701
  onChange: z,
698
702
  onFocus: L,
699
703
  onBlur: P,
700
- onClick: () => u(!0),
701
- ...m
704
+ onClick: () => h(!0),
705
+ ...f
702
706
  }
703
707
  ),
704
708
  /* @__PURE__ */ d(me, { children: [
705
709
  r && /* @__PURE__ */ e(oe, {}),
706
710
  o
707
711
  ] }),
708
- /* @__PURE__ */ e(S, { open: p, children: /* @__PURE__ */ e(be, { padding: "md", children: /* @__PURE__ */ e(pr, { value: b, onChange: O }) }) })
712
+ /* @__PURE__ */ e(S, { open: g, children: /* @__PURE__ */ e(pe, { padding: "md", children: /* @__PURE__ */ e(kr, { value: b, onChange: O }) }) })
709
713
  ] }),
710
714
  /* @__PURE__ */ e(V, { children: a }),
711
715
  /* @__PURE__ */ e(K, { children: r })
712
716
  ]
713
717
  }
714
718
  ) });
715
- }, te = (n) => {
719
+ }, ne = (t) => {
716
720
  const {
717
- onClick: t,
721
+ onClick: n,
718
722
  Icon: l
719
- } = n;
723
+ } = t;
720
724
  return /* @__PURE__ */ e(
721
725
  "div",
722
726
  {
723
- onClick: t,
724
- className: h(
727
+ onClick: n,
728
+ className: u(
725
729
  "h-6 w-6 select-none rounded-full p-0.5",
726
- t && "ring-0 transition-all duration-[var(--control-transition-duration)] input-icon-button-interactive active:ring-[length:var(--control-ring-width-active)] cursor-pointer hover:ring-[length:var(--control-ring-width)] group pointer-events-auto"
730
+ n && "ring-0 transition-all duration-[var(--control-transition-duration)] input-icon-button-interactive active:ring-[length:var(--control-ring-width-active)] cursor-pointer hover:ring-[length:var(--control-ring-width)] group pointer-events-auto"
727
731
  ),
728
- children: /* @__PURE__ */ e(l, { className: h("h-5 w-5 input-icon-button-icon", t && "group-active:scale-[0.8] transition-transform duration-[var(--control-transition-duration)] origin-center") })
732
+ children: /* @__PURE__ */ e(l, { className: u("h-5 w-5 input-icon-button-icon", n && "group-active:scale-[0.8] transition-transform duration-[var(--control-transition-duration)] origin-center") })
729
733
  }
730
734
  );
731
- }, No = (n) => {
735
+ }, Po = (t) => {
732
736
  const {
733
- type: t = "password",
737
+ type: n = "password",
734
738
  enableShowPasswordToggle: l = !0,
735
739
  ...a
736
- } = n, [r, o] = W(!1);
740
+ } = t, [r, o] = U(!1);
737
741
  return /* @__PURE__ */ e(
738
- $t,
742
+ Xt,
739
743
  {
740
- type: r ? "text" : t,
741
- buttonTray: l ? /* @__PURE__ */ e(te, { Icon: r ? Jt : Yt, onClick: () => {
744
+ type: r ? "text" : n,
745
+ buttonTray: l ? /* @__PURE__ */ e(ne, { Icon: r ? tn : nn, onClick: () => {
742
746
  o(!r);
743
747
  } }) : void 0,
744
748
  ...a
745
749
  }
746
750
  );
747
- }, yo = (n) => {
751
+ }, Lo = (t) => {
748
752
  const {
749
- className: t,
753
+ className: n,
750
754
  label: l,
751
755
  description: a,
752
756
  error: r,
@@ -754,54 +758,54 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
754
758
  autogrow: i = !1,
755
759
  maxRows: s,
756
760
  ref: c,
757
- onChange: g,
758
- ...R
759
- } = n, w = k.useRef(null), m = k.useCallback(() => {
760
- const f = w.current;
761
- if (!f) return;
762
- f.style.height = "auto";
763
- let p = f.scrollHeight;
761
+ onChange: p,
762
+ ...y
763
+ } = t, x = C.useRef(null), f = C.useCallback(() => {
764
+ const m = x.current;
765
+ if (!m) return;
766
+ m.style.height = "auto";
767
+ let g = m.scrollHeight;
764
768
  if (s) {
765
- const u = window.getComputedStyle(f), I = parseFloat(u.lineHeight), b = parseFloat(u.paddingTop), N = parseFloat(u.paddingBottom), y = parseFloat(u.borderTopWidth), S = parseFloat(u.borderBottomWidth), z = I * s + b + N + y + S;
766
- p = Math.min(f.scrollHeight, z);
769
+ const h = window.getComputedStyle(m), R = parseFloat(h.lineHeight), b = parseFloat(h.paddingTop), w = parseFloat(h.paddingBottom), k = parseFloat(h.borderTopWidth), S = parseFloat(h.borderBottomWidth), z = R * s + b + w + k + S;
770
+ g = Math.min(m.scrollHeight, z);
767
771
  }
768
- f.style.height = `${p}px`;
772
+ m.style.height = `${g}px`;
769
773
  }, [s]);
770
- k.useLayoutEffect(() => {
774
+ C.useLayoutEffect(() => {
771
775
  if (!i) {
772
- w.current && (w.current.style.height = "");
776
+ x.current && (x.current.style.height = "");
773
777
  return;
774
778
  }
775
- m();
776
- }, [i, m, n.value, n.defaultValue, o]);
777
- const v = (f) => {
778
- g?.(f), i && m();
779
+ f();
780
+ }, [i, f, t.value, t.defaultValue, o]);
781
+ const v = (m) => {
782
+ p?.(m), i && f();
779
783
  };
780
784
  return /* @__PURE__ */ e(q.Provider, { value: o, children: /* @__PURE__ */ d(
781
785
  "div",
782
786
  {
783
- className: h(
787
+ className: u(
784
788
  "flex flex-col",
785
- t
789
+ n
786
790
  ),
787
791
  children: [
788
- /* @__PURE__ */ e(Z, { children: l }),
792
+ /* @__PURE__ */ e(ee, { children: l }),
789
793
  /* @__PURE__ */ d("div", { className: "flex flex-col relative", children: [
790
794
  /* @__PURE__ */ e(
791
795
  "textarea",
792
796
  {
793
- ref: c ? vn([c, w]) : w,
797
+ ref: c ? In([c, x]) : x,
794
798
  onChange: v,
795
- className: h(
799
+ className: u(
796
800
  "py-2.5 border-[length:var(--border-width-input)] input-base transition-all duration-[var(--control-transition-duration)] rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] ring-0 focus:ring-[length:var(--control-ring-width)] focus:outline-none font-[number:var(--font-weight-input-text)] font-[family-name:var(--font-family-base)]",
797
- Bt[o],
801
+ Wt[o],
798
802
  G[o],
799
803
  he[o],
800
- r ? fe[o] : dt[o],
804
+ r ? fe[o] : ht[o],
801
805
  r && "input-error",
802
806
  i && (s ? "resize-none overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" : "resize-none overflow-hidden")
803
807
  ),
804
- ...R
808
+ ...y
805
809
  }
806
810
  ),
807
811
  /* @__PURE__ */ e(me, { className: "top-3.5 translate-y-0", children: r && /* @__PURE__ */ e(oe, {}) })
@@ -811,20 +815,20 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
811
815
  ]
812
816
  }
813
817
  ) });
814
- }, ko = (n) => {
818
+ }, Eo = (t) => {
815
819
  const {
816
- className: t,
820
+ className: n,
817
821
  label: l,
818
822
  description: a,
819
823
  error: r,
820
824
  ...o
821
- } = n;
825
+ } = t;
822
826
  return /* @__PURE__ */ d(
823
827
  "div",
824
828
  {
825
- className: h(
829
+ className: u(
826
830
  "flex flex-col",
827
- t
831
+ n
828
832
  ),
829
833
  children: [
830
834
  /* @__PURE__ */ d("div", { className: "flex flex-row gap-3", children: [
@@ -836,9 +840,9 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
836
840
  ...o
837
841
  }
838
842
  ),
839
- l && /* @__PURE__ */ e("label", { htmlFor: n.id, className: h(
843
+ l && /* @__PURE__ */ e("label", { htmlFor: t.id, className: u(
840
844
  "input-label font-[number:var(--font-weight-input-option-label)] mb-1",
841
- n.id && "cursor-pointer"
845
+ t.id && "cursor-pointer"
842
846
  ), children: l })
843
847
  ] }),
844
848
  /* @__PURE__ */ e(V, { children: a }),
@@ -846,20 +850,20 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
846
850
  ]
847
851
  }
848
852
  );
849
- }, Co = (n) => {
853
+ }, Fo = (t) => {
850
854
  const {
851
- className: t,
855
+ className: n,
852
856
  label: l,
853
857
  description: a,
854
858
  error: r,
855
859
  ...o
856
- } = n;
860
+ } = t;
857
861
  return /* @__PURE__ */ d(
858
862
  "div",
859
863
  {
860
- className: h(
864
+ className: u(
861
865
  "flex flex-col",
862
- t
866
+ n
863
867
  ),
864
868
  children: [
865
869
  /* @__PURE__ */ d("div", { className: "flex flex-row gap-3", children: [
@@ -872,17 +876,17 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
872
876
  ...o
873
877
  }
874
878
  ),
875
- /* @__PURE__ */ e("div", { className: h(
879
+ /* @__PURE__ */ e("div", { className: u(
876
880
  "rounded-full absolute border inset-0 pointer-events-none transition-colors duration-[var(--control-transition-duration)] ",
877
- n.checked ? "toggle-track-on" : "toggle-track-off"
878
- ), children: /* @__PURE__ */ e("div", { className: h(
881
+ t.checked ? "toggle-track-on" : "toggle-track-off"
882
+ ), children: /* @__PURE__ */ e("div", { className: u(
879
883
  "absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full toggle-thumb shadow-md transition-all duration-[var(--control-transition-duration)]",
880
- n.checked && "translate-x-3.5 "
884
+ t.checked && "translate-x-3.5 "
881
885
  ) }) })
882
886
  ] }),
883
- l && /* @__PURE__ */ e("label", { htmlFor: n.id, className: h(
887
+ l && /* @__PURE__ */ e("label", { htmlFor: t.id, className: u(
884
888
  "input-label font-[number:var(--font-weight-input-option-label)] mb-1",
885
- n.id && "cursor-pointer"
889
+ t.id && "cursor-pointer"
886
890
  ), children: l })
887
891
  ] }),
888
892
  /* @__PURE__ */ e(V, { children: a }),
@@ -890,20 +894,20 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
890
894
  ]
891
895
  }
892
896
  );
893
- }, Io = (n) => {
897
+ }, Mo = (t) => {
894
898
  const {
895
- className: t,
899
+ className: n,
896
900
  label: l,
897
901
  description: a,
898
902
  error: r,
899
903
  ...o
900
- } = n;
904
+ } = t;
901
905
  return /* @__PURE__ */ d(
902
906
  "div",
903
907
  {
904
- className: h(
908
+ className: u(
905
909
  "flex flex-col",
906
- t
910
+ n
907
911
  ),
908
912
  children: [
909
913
  /* @__PURE__ */ d("div", { className: "flex flex-row gap-3", children: [
@@ -915,9 +919,9 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
915
919
  ...o
916
920
  }
917
921
  ),
918
- l && /* @__PURE__ */ e("label", { htmlFor: n.id, className: h(
922
+ l && /* @__PURE__ */ e("label", { htmlFor: t.id, className: u(
919
923
  "input-label font-[number:var(--font-weight-input-option-label)] mb-1",
920
- n.id && "cursor-pointer"
924
+ t.id && "cursor-pointer"
921
925
  ), children: l })
922
926
  ] }),
923
927
  /* @__PURE__ */ e(V, { children: a }),
@@ -925,80 +929,80 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
925
929
  ]
926
930
  }
927
931
  );
928
- }, gr = {
932
+ }, Cr = {
929
933
  sm: "h-7",
930
934
  md: "h-8",
931
935
  lg: "h-10"
932
- }, vr = {
936
+ }, Ir = {
933
937
  sm: "px-2.5",
934
938
  md: "px-3",
935
939
  lg: "px-4"
936
- }, br = {
940
+ }, Rr = {
937
941
  sm: "text-xs",
938
942
  md: "text-sm",
939
943
  lg: "text-sm"
940
- }, Ro = (n) => {
944
+ }, Bo = (t) => {
941
945
  const {
942
- label: t,
946
+ label: n,
943
947
  description: l,
944
948
  error: a,
945
949
  placeholder: r = "No file chosen",
946
950
  buttonText: o = "Choose",
947
- Icon: i = Qt,
951
+ Icon: i = rn,
948
952
  size: s = "md",
949
953
  value: c,
950
- isUploaded: g = !1,
951
- isUploading: R = !1,
952
- onChange: w,
953
- onDropRejected: m,
954
+ isUploaded: p = !1,
955
+ isUploading: y = !1,
956
+ onChange: x,
957
+ onDropRejected: f,
954
958
  accept: v,
955
- maxSize: f,
956
- minSize: p,
957
- disabled: u = !1,
958
- className: I
959
- } = n, b = async (O) => {
960
- const [x] = O;
961
- x && await w?.(x);
959
+ maxSize: m,
960
+ minSize: g,
961
+ disabled: h = !1,
962
+ className: R
963
+ } = t, b = async (O) => {
964
+ const [N] = O;
965
+ N && await x?.(N);
962
966
  }, {
963
- getRootProps: N,
964
- getInputProps: y,
967
+ getRootProps: w,
968
+ getInputProps: k,
965
969
  open: S,
966
970
  isDragActive: z,
967
971
  isFocused: L
968
- } = Pt({
972
+ } = Ft({
969
973
  multiple: !1,
970
974
  accept: v,
971
- maxSize: f,
972
- minSize: p,
973
- disabled: u,
975
+ maxSize: m,
976
+ minSize: g,
977
+ disabled: h,
974
978
  onDrop: b,
975
- onDropRejected: m
979
+ onDropRejected: f
976
980
  }), P = c?.name;
977
- return /* @__PURE__ */ e(q.Provider, { value: s, children: /* @__PURE__ */ d("div", { className: h("flex flex-col", I), children: [
978
- /* @__PURE__ */ e(Z, { children: t }),
981
+ return /* @__PURE__ */ e(q.Provider, { value: s, children: /* @__PURE__ */ d("div", { className: u("flex flex-col", R), children: [
982
+ /* @__PURE__ */ e(ee, { children: n }),
979
983
  /* @__PURE__ */ d(
980
984
  "div",
981
985
  {
982
- ...N({
983
- className: h(
986
+ ...w({
987
+ className: u(
984
988
  "flex flex-row items-center",
985
989
  "border-[length:var(--border-width-input)] input-base rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] transition-all duration-[var(--control-transition-duration)]",
986
990
  "ring-0 focus:outline-none",
987
991
  (L || z) && "ring-[length:var(--control-ring-width)]",
988
992
  a && "input-error",
989
- u && "opacity-60 cursor-not-allowed",
990
- Q[s],
993
+ h && "opacity-60 cursor-not-allowed",
994
+ Z[s],
991
995
  he[s],
992
996
  "gap-3"
993
997
  )
994
998
  }),
995
999
  children: [
996
- /* @__PURE__ */ e("input", { ...y() }),
997
- /* @__PURE__ */ e(i, { className: h("input-icon shrink-0", ee[s]) }),
1000
+ /* @__PURE__ */ e("input", { ...k() }),
1001
+ /* @__PURE__ */ e(i, { className: u("input-icon shrink-0", te[s]) }),
998
1002
  /* @__PURE__ */ e(
999
1003
  "span",
1000
1004
  {
1001
- className: h(
1005
+ className: u(
1002
1006
  "flex-1 truncate",
1003
1007
  G[s],
1004
1008
  !P && "text-[var(--color-input-placeholder)]"
@@ -1007,26 +1011,26 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1007
1011
  }
1008
1012
  ),
1009
1013
  a && /* @__PURE__ */ e(oe, {}),
1010
- R && !a && /* @__PURE__ */ e("div", { className: "h-5 w-5 flex items-center justify-center", children: /* @__PURE__ */ e(Se, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) }),
1011
- g && !R && !a && /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(tt, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1014
+ y && !a && /* @__PURE__ */ e("div", { className: "h-5 w-5 flex items-center justify-center", children: /* @__PURE__ */ e(Oe, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) }),
1015
+ p && !y && !a && /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(nt, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1012
1016
  /* @__PURE__ */ e(
1013
1017
  "button",
1014
1018
  {
1015
1019
  type: "button",
1016
- disabled: u,
1020
+ disabled: h,
1017
1021
  onClick: (O) => {
1018
1022
  O.stopPropagation(), S();
1019
1023
  },
1020
- className: h(
1024
+ className: u(
1021
1025
  "inline-flex flex-row items-center justify-center shrink-0",
1022
1026
  "border-[length:var(--border-width-input)] button-white shadow-[var(--shadow-control)] rounded-[calc(var(--border-radius-button)-0.25rem)]",
1023
1027
  "font-[number:var(--font-weight-button)] font-[family-name:var(--font-family-base)] cursor-pointer select-none transition-all duration-[var(--control-transition-duration)]",
1024
1028
  "button-ring ring-0 hover:ring-[length:var(--control-ring-width)] active:ring-[length:var(--control-ring-width-active)] focus:outline-none focus:ring-[length:var(--control-ring-width)]",
1025
1029
  "disabled:cursor-default",
1026
1030
  "mr-1.5",
1027
- gr[s],
1028
- vr[s],
1029
- br[s]
1031
+ Cr[s],
1032
+ Ir[s],
1033
+ Rr[s]
1030
1034
  ),
1031
1035
  children: o
1032
1036
  }
@@ -1037,19 +1041,19 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1037
1041
  /* @__PURE__ */ e(V, { children: l }),
1038
1042
  /* @__PURE__ */ e(K, { children: a })
1039
1043
  ] }) });
1040
- }, xr = (n) => n < 1024 ? `${n} B` : n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} KB` : n < 1024 * 1024 * 1024 ? `${(n / (1024 * 1024)).toFixed(1)} MB` : `${(n / (1024 * 1024 * 1024)).toFixed(1)} GB`, wr = (n) => {
1044
+ }, Sr = (t) => t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : t < 1024 * 1024 * 1024 ? `${(t / (1024 * 1024)).toFixed(1)} MB` : `${(t / (1024 * 1024 * 1024)).toFixed(1)} GB`, Dr = (t) => {
1041
1045
  const {
1042
- file: t,
1046
+ file: n,
1043
1047
  isUploaded: l = !1,
1044
1048
  isUploading: a = !1,
1045
1049
  error: r,
1046
1050
  onRemove: o,
1047
1051
  className: i
1048
- } = n, s = a || l || !!r;
1052
+ } = t, s = a || l || !!r;
1049
1053
  return /* @__PURE__ */ d(
1050
1054
  "div",
1051
1055
  {
1052
- className: h(
1056
+ className: u(
1053
1057
  "flex flex-row items-center gap-3",
1054
1058
  "border-[length:var(--border-width-input)] input-base rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)]",
1055
1059
  "pl-4 pr-1 py-1",
@@ -1057,11 +1061,11 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1057
1061
  i
1058
1062
  ),
1059
1063
  children: [
1060
- s && /* @__PURE__ */ e("div", { className: "shrink-0 h-5 w-5 flex items-center justify-center", children: r ? /* @__PURE__ */ e(et, { className: "h-5 w-5 input-error-icon" }) : a ? /* @__PURE__ */ e(Se, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) : /* @__PURE__ */ e(tt, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1061
- /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 font-[number:var(--font-weight-input-option-label)] truncate", children: t.name }),
1062
- /* @__PURE__ */ e("div", { className: "shrink-0 text-sm text-[var(--color-input-description-text)]", children: xr(t.size) }),
1064
+ s && /* @__PURE__ */ e("div", { className: "shrink-0 h-5 w-5 flex items-center justify-center", children: r ? /* @__PURE__ */ e(tt, { className: "h-5 w-5 input-error-icon" }) : a ? /* @__PURE__ */ e(Oe, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) : /* @__PURE__ */ e(nt, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1065
+ /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 font-[number:var(--font-weight-input-option-label)] truncate", children: n.name }),
1066
+ /* @__PURE__ */ e("div", { className: "shrink-0 text-sm text-[var(--color-input-description-text)]", children: Sr(n.size) }),
1063
1067
  o && /* @__PURE__ */ e(
1064
- Ye,
1068
+ et,
1065
1069
  {
1066
1070
  variant: "transparent",
1067
1071
  size: "sm",
@@ -1074,33 +1078,33 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1074
1078
  ]
1075
1079
  }
1076
1080
  );
1077
- }, So = (n) => {
1081
+ }, Ao = (t) => {
1078
1082
  const {
1079
- label: t,
1083
+ label: n,
1080
1084
  description: l,
1081
1085
  error: a,
1082
1086
  title: r = "Drop files here",
1083
1087
  hint: o,
1084
- Icon: i = Zt,
1088
+ Icon: i = on,
1085
1089
  defaultFiles: s,
1086
1090
  onUpload: c,
1087
- onFileRemoved: g,
1088
- onDropRejected: R,
1089
- renderFileTile: w,
1090
- accept: m,
1091
+ onFileRemoved: p,
1092
+ onDropRejected: y,
1093
+ renderFileTile: x,
1094
+ accept: f,
1091
1095
  maxSize: v,
1092
- minSize: f,
1093
- maxFiles: p,
1094
- disabled: u = !1,
1095
- className: I
1096
- } = n, b = Ce(0), [N, y] = W(
1096
+ minSize: m,
1097
+ maxFiles: g,
1098
+ disabled: h = !1,
1099
+ className: R
1100
+ } = t, b = Ie(0), [w, k] = U(
1097
1101
  () => (s ?? []).map((T) => ({
1098
1102
  id: String(++b.current),
1099
1103
  file: T,
1100
1104
  status: "uploaded"
1101
1105
  }))
1102
1106
  ), S = (T, E) => {
1103
- y((_) => _.map(($) => $.id === T ? { ...$, ...E } : $));
1107
+ k((_) => _.map((H) => H.id === T ? { ...H, ...E } : H));
1104
1108
  }, z = (T) => {
1105
1109
  if (T.length === 0) return;
1106
1110
  const E = T.map((_) => ({
@@ -1108,46 +1112,46 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1108
1112
  file: _,
1109
1113
  status: c ? "uploading" : "idle"
1110
1114
  }));
1111
- if (y((_) => [..._, ...E]), !!c)
1115
+ if (k((_) => [..._, ...E]), !!c)
1112
1116
  for (const _ of E)
1113
- Promise.resolve().then(() => c(_.file)).then(() => S(_.id, { status: "uploaded" })).catch(($) => {
1117
+ Promise.resolve().then(() => c(_.file)).then(() => S(_.id, { status: "uploaded" })).catch((H) => {
1114
1118
  S(_.id, {
1115
1119
  status: "error",
1116
- error: $ instanceof Error ? $ : new Error(String($))
1120
+ error: H instanceof Error ? H : new Error(String(H))
1117
1121
  });
1118
1122
  });
1119
1123
  }, L = (T) => {
1120
- const E = N.find((_) => _.id === T);
1121
- y((_) => _.filter(($) => $.id !== T)), E && g?.(E.file);
1124
+ const E = w.find((_) => _.id === T);
1125
+ k((_) => _.filter((H) => H.id !== T)), E && p?.(E.file);
1122
1126
  }, {
1123
1127
  getRootProps: P,
1124
1128
  getInputProps: O,
1125
- isDragActive: x,
1126
- isFocused: C
1127
- } = Pt({
1129
+ isDragActive: N,
1130
+ isFocused: I
1131
+ } = Ft({
1128
1132
  multiple: !0,
1129
- accept: m,
1133
+ accept: f,
1130
1134
  maxSize: v,
1131
- minSize: f,
1132
- maxFiles: p,
1133
- disabled: u,
1135
+ minSize: m,
1136
+ maxFiles: g,
1137
+ disabled: h,
1134
1138
  onDrop: z,
1135
- onDropRejected: R
1139
+ onDropRejected: y
1136
1140
  });
1137
- return /* @__PURE__ */ d("div", { className: h("flex flex-col", I), children: [
1138
- /* @__PURE__ */ e(Z, { children: t }),
1141
+ return /* @__PURE__ */ d("div", { className: u("flex flex-col", R), children: [
1142
+ /* @__PURE__ */ e(ee, { children: n }),
1139
1143
  /* @__PURE__ */ d(
1140
1144
  "div",
1141
1145
  {
1142
1146
  ...P({
1143
- className: h(
1147
+ className: u(
1144
1148
  "flex flex-col items-center justify-center gap-1",
1145
1149
  "border-2 border-dashed input-base rounded-[var(--border-radius-input)] bg-transparent!",
1146
1150
  "py-10 px-6 cursor-pointer transition-all duration-[var(--control-transition-duration)]",
1147
1151
  "ring-0 focus:outline-none",
1148
- (C || x) && "ring-[length:var(--control-ring-width)]",
1152
+ (I || N) && "ring-[length:var(--control-ring-width)]",
1149
1153
  a && "input-error",
1150
- u && "opacity-60 cursor-not-allowed"
1154
+ h && "opacity-60 cursor-not-allowed"
1151
1155
  )
1152
1156
  }),
1153
1157
  children: [
@@ -1158,7 +1162,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1158
1162
  ]
1159
1163
  }
1160
1164
  ),
1161
- N.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 mt-3", children: N.map((T) => {
1165
+ w.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 mt-3", children: w.map((T) => {
1162
1166
  const E = {
1163
1167
  file: T.file,
1164
1168
  isUploading: T.status === "uploading",
@@ -1166,18 +1170,18 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1166
1170
  error: T.status === "error" ? T.error?.message : void 0,
1167
1171
  onRemove: () => L(T.id)
1168
1172
  };
1169
- return /* @__PURE__ */ e(k.Fragment, { children: w ? w(T.file, E) : /* @__PURE__ */ e(wr, { ...E }) }, T.id);
1173
+ return /* @__PURE__ */ e(C.Fragment, { children: x ? x(T.file, E) : /* @__PURE__ */ e(Dr, { ...E }) }, T.id);
1170
1174
  }) }),
1171
1175
  /* @__PURE__ */ e(V, { children: l }),
1172
1176
  /* @__PURE__ */ e(K, { children: a })
1173
1177
  ] });
1174
- }, Nr = [
1175
- Sn,
1176
- Dn,
1177
- Lt,
1178
- Tn,
1179
- Fn
1180
- ], yt = {
1178
+ }, Or = [
1179
+ Fn,
1180
+ Mn,
1181
+ Mt,
1182
+ Un,
1183
+ _n
1184
+ ], kt = {
1181
1185
  paragraph: "lexical-paragraph",
1182
1186
  heading: {
1183
1187
  h1: "lexical-h1",
@@ -1200,7 +1204,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1200
1204
  italic: "lexical-italic",
1201
1205
  underline: "lexical-underline"
1202
1206
  }
1203
- }, jt = {
1207
+ }, Kt = {
1204
1208
  isBold: !1,
1205
1209
  isItalic: !1,
1206
1210
  isUnderline: !1,
@@ -1210,66 +1214,55 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1210
1214
  blockType: "paragraph",
1211
1215
  canUndo: !1,
1212
1216
  canRedo: !1
1213
- }, Ae = Qe({
1214
- state: jt,
1217
+ }, $e = Fe({
1218
+ state: Kt,
1215
1219
  tone: "light",
1216
1220
  orientation: "horizontal"
1217
- }), we = () => Ze(Ae), Xt = () => {
1218
- const [n] = ue(), [t, l] = W(jt);
1221
+ }), Ne = () => Me($e), Gt = () => {
1222
+ const [t] = ue(), [n, l] = U(Kt);
1219
1223
  return j(() => {
1220
1224
  const a = () => {
1221
- n.getEditorState().read(() => {
1222
- const r = Et();
1223
- if (!Ft(r))
1225
+ t.getEditorState().read(() => {
1226
+ const r = Bt();
1227
+ if (!At(r))
1224
1228
  return;
1225
- const o = r.anchor.getNode(), i = _n(o, Lt), s = i && Pn(i) ? i.getListType() : null;
1229
+ const o = r.anchor.getNode(), i = Yn(o, Mt), s = i && Wn(i) ? i.getListType() : null;
1226
1230
  let c = "paragraph";
1227
1231
  if (!s) {
1228
1232
  const v = o.getKey() === "root" ? o : o.getTopLevelElementOrThrow();
1229
- zn(v) && (c = v.getTag());
1233
+ Bn(v) && (c = v.getTag());
1230
1234
  }
1231
- const g = r.hasFormat("bold"), R = r.hasFormat("italic"), w = r.hasFormat("underline"), m = vt(o.getParent()) || vt(o);
1235
+ const p = r.hasFormat("bold"), y = r.hasFormat("italic"), x = r.hasFormat("underline"), f = bt(o.getParent()) || bt(o);
1232
1236
  l((v) => ({
1233
1237
  ...v,
1234
- isBold: g,
1235
- isItalic: R,
1236
- isUnderline: w,
1237
- isLink: m,
1238
+ isBold: p,
1239
+ isItalic: y,
1240
+ isUnderline: x,
1241
+ isLink: f,
1238
1242
  isUnorderedList: s === "bullet",
1239
1243
  isOrderedList: s === "number",
1240
1244
  blockType: c
1241
1245
  }));
1242
1246
  });
1243
1247
  };
1244
- return Mt(
1245
- n.registerUpdateListener(() => a()),
1246
- n.registerCommand(
1247
- Mn,
1248
+ return Ut(
1249
+ t.registerUpdateListener(() => a()),
1250
+ t.registerCommand(
1251
+ jn,
1248
1252
  (r) => (l((o) => ({ ...o, canUndo: r })), !1),
1249
1253
  Le
1250
1254
  ),
1251
- n.registerCommand(
1252
- Bn,
1255
+ t.registerCommand(
1256
+ Xn,
1253
1257
  (r) => (l((o) => ({ ...o, canRedo: r })), !1),
1254
1258
  Le
1255
1259
  )
1256
1260
  );
1257
- }, [n]), t;
1258
- }, Vt = Qe(void 0), yr = () => ({
1259
- dismiss: Ze(Vt) || (() => {
1261
+ }, [t]), n;
1262
+ }, qt = Fe(void 0), zr = () => ({
1263
+ dismiss: Me(qt) || (() => {
1260
1264
  })
1261
- }), Ue = (n) => {
1262
- const { trigger: t, children: l, placement: a = "bottom-end", minWidth: r = 200, className: o } = n, [i, s] = W(!1), { Popover: c, anchorRef: g } = ut({
1263
- placement: a,
1264
- open: i,
1265
- onOpenChange: s,
1266
- minWidth: r
1267
- });
1268
- return /* @__PURE__ */ d(ne, { children: [
1269
- /* @__PURE__ */ e("div", { ref: g, className: o, onClick: () => s(!i), children: t }),
1270
- /* @__PURE__ */ e(c, { open: i, children: /* @__PURE__ */ e(be, { padding: "sm", children: /* @__PURE__ */ e(Vt.Provider, { value: () => s(!1), children: l }) }) })
1271
- ] });
1272
- }, kr = "inline-flex flex-row items-center gap-3 h-10 px-3 font-[number:var(--font-weight-dropdown-item)] font-[family-name:var(--font-family-base)] ring-0 dropdown-item rounded-[var(--border-radius-menu-item)] cursor-pointer transition-all duration-[var(--control-transition-duration)] select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", X = k.forwardRef((n, t) => {
1265
+ }), Tr = "inline-flex flex-row items-center gap-3 h-10 px-3 font-[number:var(--font-weight-dropdown-item)] font-[family-name:var(--font-family-base)] ring-0 dropdown-item rounded-[var(--border-radius-menu-item)] cursor-pointer transition-all duration-[var(--control-transition-duration)] select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", X = C.forwardRef((t, n) => {
1273
1266
  const {
1274
1267
  className: l,
1275
1268
  children: a,
@@ -1277,18 +1270,18 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1277
1270
  onClick: o,
1278
1271
  dismissOnClick: i = !0,
1279
1272
  ...s
1280
- } = n, { dismiss: c } = yr(), g = (R) => {
1281
- o && o(R), i && c();
1273
+ } = t, { dismiss: c } = zr(), p = (y) => {
1274
+ o && o(y), i && c();
1282
1275
  };
1283
1276
  return /* @__PURE__ */ d(
1284
1277
  "button",
1285
1278
  {
1286
- ref: t,
1287
- className: h(
1288
- kr,
1279
+ ref: n,
1280
+ className: u(
1281
+ Tr,
1289
1282
  l
1290
1283
  ),
1291
- onClick: g,
1284
+ onClick: p,
1292
1285
  ...s,
1293
1286
  children: [
1294
1287
  r && /* @__PURE__ */ e(r, { className: "h-5 w-5 shrink-0" }),
@@ -1296,21 +1289,73 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1296
1289
  ]
1297
1290
  }
1298
1291
  );
1299
- }), Ge = [
1292
+ }), Jt = Fe(void 0), Pr = () => Me(Jt) ?? {
1293
+ push: () => {
1294
+ },
1295
+ pop: () => {
1296
+ },
1297
+ reset: () => {
1298
+ },
1299
+ depth: 0
1300
+ }, Lr = {
1301
+ enter: (t) => ({ x: t >= 0 ? "35%" : "-35%", opacity: 0 }),
1302
+ center: { x: 0, opacity: 1 },
1303
+ exit: (t) => ({ x: t >= 0 ? "-35%" : "35%", opacity: 0 })
1304
+ }, Er = (t) => {
1305
+ const { open: n, children: l } = t, [a, r] = U([]), [o, i] = U(1);
1306
+ j(() => {
1307
+ n || r([]);
1308
+ }, [n]);
1309
+ const s = be((v) => {
1310
+ i(1), r((m) => [...m, v]);
1311
+ }, []), c = be(() => {
1312
+ i(-1), r((v) => v.slice(0, -1));
1313
+ }, []), p = be(() => {
1314
+ i(-1), r([]);
1315
+ }, []), y = a[a.length - 1], x = y ? y.id : "__root__", f = y ? y.content : l;
1316
+ return /* @__PURE__ */ e(Jt.Provider, { value: { push: s, pop: c, reset: p, depth: a.length }, children: /* @__PURE__ */ e("div", { className: "flex flex-col overflow-hidden", children: /* @__PURE__ */ e(Re, { initial: !1, mode: "wait", custom: o, children: /* @__PURE__ */ d(
1317
+ Y.div,
1318
+ {
1319
+ custom: o,
1320
+ variants: Lr,
1321
+ initial: "enter",
1322
+ animate: "center",
1323
+ exit: "exit",
1324
+ transition: { duration: 0.15, ease: "easeInOut" },
1325
+ className: "flex flex-col space-y-1",
1326
+ children: [
1327
+ y && /* @__PURE__ */ e(X, { dismissOnClick: !1, Icon: an, onClick: c, className: "mb-1", children: /* @__PURE__ */ e("span", { className: "flex-1 text-left font-[number:var(--font-weight-group-header)]", children: y.label }) }),
1328
+ f
1329
+ ]
1330
+ },
1331
+ x
1332
+ ) }) }) });
1333
+ }, Ct = (t) => {
1334
+ const { trigger: n, children: l, placement: a = "bottom-end", minWidth: r = 200, className: o } = t, [i, s] = U(!1), { Popover: c, anchorRef: p } = We({
1335
+ placement: a,
1336
+ open: i,
1337
+ onOpenChange: s,
1338
+ minWidth: r
1339
+ });
1340
+ return /* @__PURE__ */ d(Q, { children: [
1341
+ /* @__PURE__ */ e("div", { ref: p, className: o, onClick: () => s(!i), children: n }),
1342
+ /* @__PURE__ */ e(c, { open: i, children: /* @__PURE__ */ e(pe, { padding: "sm", children: /* @__PURE__ */ e(qt.Provider, { value: () => s(!1), children: /* @__PURE__ */ e(Er, { open: i, children: l }) }) }) })
1343
+ ] });
1344
+ }, He = (t) => yn() === null ? /* @__PURE__ */ e(kn, { children: /* @__PURE__ */ e(Ct, { ...t }) }) : /* @__PURE__ */ e(Ct, { ...t }), Ye = [
1300
1345
  { value: "paragraph", label: "Paragraph" },
1301
1346
  { value: "h1", label: "Heading 1" },
1302
1347
  { value: "h2", label: "Heading 2" },
1303
1348
  { value: "h3", label: "Heading 3" },
1304
1349
  { value: "h4", label: "Heading 4" }
1305
- ], Cr = () => {
1306
- const [n] = ue(), { state: t, tone: l } = we(), a = (o) => {
1307
- n.update(() => {
1308
- const i = Et();
1309
- Ft(i) && (o === "paragraph" ? xt(i, () => An()) : xt(i, () => On(o)));
1350
+ ], Fr = () => {
1351
+ const [t] = ue(), { state: n, tone: l } = Ne(), a = (o) => {
1352
+ t.update(() => {
1353
+ const i = Bt();
1354
+ At(i) && (o === "paragraph" ? wt(i, () => Vn()) : wt(i, () => An(o)));
1310
1355
  });
1311
- }, r = Ge.find((o) => o.value === t.blockType) ?? Ge[0];
1356
+ }, r = Ye.find((o) => o.value === n.blockType) ?? Ye[0];
1312
1357
  return /* @__PURE__ */ e(
1313
- Ue,
1358
+ He,
1314
1359
  {
1315
1360
  placement: "bottom-start",
1316
1361
  minWidth: 180,
@@ -1319,45 +1364,45 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1319
1364
  {
1320
1365
  type: "button",
1321
1366
  onMouseDown: (o) => o.preventDefault(),
1322
- className: h(
1367
+ className: u(
1323
1368
  "lexical-tb-btn h-8 px-2 gap-1 text-sm font-[number:var(--font-weight-input-option-label)]",
1324
1369
  l === "dark" ? "lexical-tb-btn-dark" : "lexical-tb-btn-light"
1325
1370
  ),
1326
1371
  children: [
1327
1372
  /* @__PURE__ */ e("span", { className: "break-all line-clamp-1", children: r.label }),
1328
- /* @__PURE__ */ e(ve, { className: "h-4 w-4 shrink-0" })
1373
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4 shrink-0" })
1329
1374
  ]
1330
1375
  }
1331
1376
  ),
1332
- children: Ge.map((o) => /* @__PURE__ */ e(
1377
+ children: Ye.map((o) => /* @__PURE__ */ e(
1333
1378
  X,
1334
1379
  {
1335
- Icon: o.value === t.blockType ? Dt : void 0,
1380
+ Icon: o.value === n.blockType ? zt : void 0,
1336
1381
  onClick: () => a(o.value),
1337
- className: o.value === t.blockType ? void 0 : "pl-11",
1382
+ className: o.value === n.blockType ? void 0 : "pl-11",
1338
1383
  children: o.label
1339
1384
  },
1340
1385
  o.value
1341
1386
  ))
1342
1387
  }
1343
1388
  );
1344
- }, Ir = {
1389
+ }, Mr = {
1345
1390
  light: "lexical-tb-btn-light",
1346
1391
  dark: "lexical-tb-btn-dark"
1347
- }, ce = k.forwardRef(
1348
- (n, t) => {
1349
- const { Icon: l, active: a = !1, tone: r = "light", className: o, onMouseDown: i, ...s } = n;
1392
+ }, ce = C.forwardRef(
1393
+ (t, n) => {
1394
+ const { Icon: l, active: a = !1, tone: r = "light", className: o, onMouseDown: i, ...s } = t;
1350
1395
  return /* @__PURE__ */ e(
1351
1396
  "button",
1352
1397
  {
1353
- ref: t,
1398
+ ref: n,
1354
1399
  type: "button",
1355
- onMouseDown: (g) => {
1356
- g.preventDefault(), i?.(g);
1400
+ onMouseDown: (p) => {
1401
+ p.preventDefault(), i?.(p);
1357
1402
  },
1358
- className: h(
1403
+ className: u(
1359
1404
  "lexical-tb-btn h-8 w-8",
1360
- Ir[r],
1405
+ Mr[r],
1361
1406
  a && "lexical-tb-btn-active",
1362
1407
  o
1363
1408
  ),
@@ -1366,59 +1411,59 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1366
1411
  }
1367
1412
  );
1368
1413
  }
1369
- ), Rr = () => {
1370
- const [n] = ue(), { state: t, tone: l } = we();
1371
- return /* @__PURE__ */ d(ne, { children: [
1414
+ ), Br = () => {
1415
+ const [t] = ue(), { state: n, tone: l } = Ne();
1416
+ return /* @__PURE__ */ d(Q, { children: [
1372
1417
  /* @__PURE__ */ e(
1373
1418
  ce,
1374
1419
  {
1375
- Icon: en,
1420
+ Icon: ln,
1376
1421
  tone: l,
1377
- active: t.isBold,
1422
+ active: n.isBold,
1378
1423
  "aria-label": "Bold",
1379
- onClick: () => n.dispatchCommand(je, "bold")
1424
+ onClick: () => t.dispatchCommand(Ke, "bold")
1380
1425
  }
1381
1426
  ),
1382
1427
  /* @__PURE__ */ e(
1383
1428
  ce,
1384
1429
  {
1385
- Icon: tn,
1430
+ Icon: sn,
1386
1431
  tone: l,
1387
- active: t.isItalic,
1432
+ active: n.isItalic,
1388
1433
  "aria-label": "Italic",
1389
- onClick: () => n.dispatchCommand(je, "italic")
1434
+ onClick: () => t.dispatchCommand(Ke, "italic")
1390
1435
  }
1391
1436
  ),
1392
1437
  /* @__PURE__ */ e(
1393
1438
  ce,
1394
1439
  {
1395
- Icon: nn,
1440
+ Icon: cn,
1396
1441
  tone: l,
1397
- active: t.isUnderline,
1442
+ active: n.isUnderline,
1398
1443
  "aria-label": "Underline",
1399
- onClick: () => n.dispatchCommand(je, "underline")
1444
+ onClick: () => t.dispatchCommand(Ke, "underline")
1400
1445
  }
1401
1446
  )
1402
1447
  ] });
1403
- }, Sr = () => {
1404
- const [n] = ue(), { state: t, tone: l } = we(), a = () => {
1405
- n.dispatchCommand(
1406
- t.isUnorderedList ? gt : Ln,
1448
+ }, Ar = () => {
1449
+ const [t] = ue(), { state: n, tone: l } = Ne(), a = () => {
1450
+ t.dispatchCommand(
1451
+ n.isUnorderedList ? vt : $n,
1407
1452
  void 0
1408
1453
  );
1409
1454
  }, r = () => {
1410
- n.dispatchCommand(
1411
- t.isOrderedList ? gt : En,
1455
+ t.dispatchCommand(
1456
+ n.isOrderedList ? vt : Hn,
1412
1457
  void 0
1413
1458
  );
1414
1459
  };
1415
- return /* @__PURE__ */ d(ne, { children: [
1460
+ return /* @__PURE__ */ d(Q, { children: [
1416
1461
  /* @__PURE__ */ e(
1417
1462
  ce,
1418
1463
  {
1419
- Icon: Je,
1464
+ Icon: Ze,
1420
1465
  tone: l,
1421
- active: t.isUnorderedList,
1466
+ active: n.isUnorderedList,
1422
1467
  "aria-label": "Bullet list",
1423
1468
  onClick: a
1424
1469
  }
@@ -1426,104 +1471,104 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1426
1471
  /* @__PURE__ */ e(
1427
1472
  ce,
1428
1473
  {
1429
- Icon: rn,
1474
+ Icon: dn,
1430
1475
  tone: l,
1431
- active: t.isOrderedList,
1476
+ active: n.isOrderedList,
1432
1477
  "aria-label": "Numbered list",
1433
1478
  onClick: r
1434
1479
  }
1435
1480
  )
1436
1481
  ] });
1437
- }, Dr = () => {
1438
- const [n] = ue(), { state: t, tone: l } = we(), a = () => {
1439
- if (t.isLink) {
1440
- n.dispatchCommand(bt, null);
1482
+ }, Ur = () => {
1483
+ const [t] = ue(), { state: n, tone: l } = Ne(), a = () => {
1484
+ if (n.isLink) {
1485
+ t.dispatchCommand(xt, null);
1441
1486
  return;
1442
1487
  }
1443
1488
  const r = window.prompt("Enter URL");
1444
- r && n.dispatchCommand(bt, r);
1489
+ r && t.dispatchCommand(xt, r);
1445
1490
  };
1446
1491
  return /* @__PURE__ */ e(
1447
1492
  ce,
1448
1493
  {
1449
- Icon: on,
1494
+ Icon: un,
1450
1495
  tone: l,
1451
- active: t.isLink,
1496
+ active: n.isLink,
1452
1497
  "aria-label": "Link",
1453
1498
  onClick: a
1454
1499
  }
1455
1500
  );
1456
- }, zr = () => {
1457
- const [n] = ue(), { state: t, tone: l } = we();
1458
- return /* @__PURE__ */ d(ne, { children: [
1501
+ }, Wr = () => {
1502
+ const [t] = ue(), { state: n, tone: l } = Ne();
1503
+ return /* @__PURE__ */ d(Q, { children: [
1459
1504
  /* @__PURE__ */ e(
1460
1505
  ce,
1461
1506
  {
1462
- Icon: an,
1507
+ Icon: hn,
1463
1508
  tone: l,
1464
- disabled: !t.canUndo,
1509
+ disabled: !n.canUndo,
1465
1510
  "aria-label": "Undo",
1466
- onClick: () => n.dispatchCommand(Un, void 0)
1511
+ onClick: () => t.dispatchCommand(Kn, void 0)
1467
1512
  }
1468
1513
  ),
1469
1514
  /* @__PURE__ */ e(
1470
1515
  ce,
1471
1516
  {
1472
- Icon: ln,
1517
+ Icon: fn,
1473
1518
  tone: l,
1474
- disabled: !t.canRedo,
1519
+ disabled: !n.canRedo,
1475
1520
  "aria-label": "Redo",
1476
- onClick: () => n.dispatchCommand(Wn, void 0)
1521
+ onClick: () => t.dispatchCommand(Gn, void 0)
1477
1522
  }
1478
1523
  )
1479
1524
  ] });
1480
- }, Or = {
1525
+ }, $r = {
1481
1526
  light: "lexical-tb-divider-light",
1482
1527
  dark: "lexical-tb-divider-dark"
1483
- }, qe = (n) => {
1484
- const { tone: t, className: l } = n, { tone: a, orientation: r } = we();
1528
+ }, Qe = (t) => {
1529
+ const { tone: n, className: l } = t, { tone: a, orientation: r } = Ne();
1485
1530
  return /* @__PURE__ */ e(
1486
1531
  "div",
1487
1532
  {
1488
- className: h(
1533
+ className: u(
1489
1534
  r === "vertical" ? "h-px w-full my-1" : "w-px h-5 my-auto mx-1",
1490
1535
  "shrink-0",
1491
- Or[t ?? a],
1536
+ $r[n ?? a],
1492
1537
  l
1493
1538
  )
1494
1539
  }
1495
1540
  );
1496
- }, kt = 4, Tr = 36, Kt = (n) => {
1497
- const t = [];
1498
- return k.Children.forEach(n, (l) => {
1499
- k.isValidElement(l) && l.type === k.Fragment ? t.push(...Kt(l.props.children)) : t.push(l);
1500
- }), t;
1501
- }, Gt = (n) => {
1502
- const { children: t } = n, { state: l, tone: a } = we(), r = Kt(t), o = Ce(null), i = Ce(null), [s, c] = W(r.length), g = Pe(() => {
1503
- const m = o.current, v = i.current;
1504
- if (!m || !v) return;
1505
- const f = m.clientWidth, p = Array.from(v.children).map((N) => N.offsetWidth);
1506
- if (p.reduce((N, y, S) => N + y + (S > 0 ? kt : 0), 0) <= f) {
1507
- c(p.length);
1541
+ }, It = 4, Hr = 36, Yt = (t) => {
1542
+ const n = [];
1543
+ return C.Children.forEach(t, (l) => {
1544
+ C.isValidElement(l) && l.type === C.Fragment ? n.push(...Yt(l.props.children)) : n.push(l);
1545
+ }), n;
1546
+ }, Qt = (t) => {
1547
+ const { children: n } = t, { state: l, tone: a } = Ne(), r = Yt(n), o = Ie(null), i = Ie(null), [s, c] = U(r.length), p = be(() => {
1548
+ const f = o.current, v = i.current;
1549
+ if (!f || !v) return;
1550
+ const m = f.clientWidth, g = Array.from(v.children).map((w) => w.offsetWidth);
1551
+ if (g.reduce((w, k, S) => w + k + (S > 0 ? It : 0), 0) <= m) {
1552
+ c(g.length);
1508
1553
  return;
1509
1554
  }
1510
- let I = 0, b = 0;
1511
- for (let N = 0; N < p.length; N++) {
1512
- const y = p[N] + (N > 0 ? kt : 0);
1513
- if (I + y + Tr > f) break;
1514
- I += y, b++;
1555
+ let R = 0, b = 0;
1556
+ for (let w = 0; w < g.length; w++) {
1557
+ const k = g[w] + (w > 0 ? It : 0);
1558
+ if (R + k + Hr > m) break;
1559
+ R += k, b++;
1515
1560
  }
1516
1561
  c(b);
1517
1562
  }, []);
1518
- St(() => {
1519
- g();
1563
+ Ot(() => {
1564
+ p();
1520
1565
  }), j(() => {
1521
- const m = o.current, v = i.current;
1522
- if (!m) return;
1523
- const f = new ResizeObserver(() => g());
1524
- return f.observe(m), v && f.observe(v), () => f.disconnect();
1525
- }, [g]);
1526
- const R = r.slice(0, s), w = r.slice(s);
1566
+ const f = o.current, v = i.current;
1567
+ if (!f) return;
1568
+ const m = new ResizeObserver(() => p());
1569
+ return m.observe(f), v && m.observe(v), () => m.disconnect();
1570
+ }, [p]);
1571
+ const y = r.slice(0, s), x = r.slice(s);
1527
1572
  return /* @__PURE__ */ d(
1528
1573
  "div",
1529
1574
  {
@@ -1536,12 +1581,12 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1536
1581
  ref: i,
1537
1582
  "aria-hidden": !0,
1538
1583
  className: "pointer-events-none invisible absolute left-0 top-0 flex flex-row items-center gap-1 w-max",
1539
- children: r.map((m, v) => /* @__PURE__ */ e("div", { className: "flex flex-row items-center", children: m }, v))
1584
+ children: r.map((f, v) => /* @__PURE__ */ e("div", { className: "flex flex-row items-center", children: f }, v))
1540
1585
  }
1541
1586
  ),
1542
- R.map((m, v) => /* @__PURE__ */ e(k.Fragment, { children: m }, v)),
1543
- w.length > 0 && /* @__PURE__ */ e(
1544
- Ue,
1587
+ y.map((f, v) => /* @__PURE__ */ e(C.Fragment, { children: f }, v)),
1588
+ x.length > 0 && /* @__PURE__ */ e(
1589
+ He,
1545
1590
  {
1546
1591
  placement: "bottom-end",
1547
1592
  minWidth: 0,
@@ -1550,20 +1595,20 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1550
1595
  {
1551
1596
  type: "button",
1552
1597
  "aria-label": "More",
1553
- onMouseDown: (m) => m.preventDefault(),
1554
- className: h(
1598
+ onMouseDown: (f) => f.preventDefault(),
1599
+ className: u(
1555
1600
  "lexical-tb-btn h-8 w-8 shrink-0",
1556
1601
  a === "dark" ? "lexical-tb-btn-dark" : "lexical-tb-btn-light"
1557
1602
  ),
1558
- children: /* @__PURE__ */ e(sn, { className: "h-[18px] w-[18px]" })
1603
+ children: /* @__PURE__ */ e(mn, { className: "h-[18px] w-[18px]" })
1559
1604
  }
1560
1605
  ),
1561
- children: /* @__PURE__ */ e(Ae.Provider, { value: { state: l, tone: "light", orientation: "vertical" }, children: /* @__PURE__ */ e(
1606
+ children: /* @__PURE__ */ e($e.Provider, { value: { state: l, tone: "light", orientation: "vertical" }, children: /* @__PURE__ */ e(
1562
1607
  "div",
1563
1608
  {
1564
1609
  className: "flex flex-col items-stretch gap-1",
1565
- onMouseDown: (m) => m.preventDefault(),
1566
- children: w.map((m, v) => /* @__PURE__ */ e(k.Fragment, { children: m }, v))
1610
+ onMouseDown: (f) => f.preventDefault(),
1611
+ children: x.map((f, v) => /* @__PURE__ */ e(C.Fragment, { children: f }, v))
1567
1612
  }
1568
1613
  ) })
1569
1614
  }
@@ -1571,55 +1616,55 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1571
1616
  ]
1572
1617
  }
1573
1618
  );
1574
- }, ht = () => /* @__PURE__ */ d(ne, { children: [
1575
- /* @__PURE__ */ e(Cr, {}),
1576
- /* @__PURE__ */ e(qe, {}),
1577
- /* @__PURE__ */ e(Rr, {}),
1578
- /* @__PURE__ */ e(qe, {}),
1579
- /* @__PURE__ */ e(Sr, {}),
1580
- /* @__PURE__ */ e(Dr, {}),
1581
- /* @__PURE__ */ e(qe, {}),
1582
- /* @__PURE__ */ e(zr, {})
1583
- ] }), Do = () => ht(), Pr = (n) => {
1584
- const { render: t, className: l } = n, [a] = ue(), r = Xt();
1585
- return /* @__PURE__ */ e(Ae.Provider, { value: { state: r, tone: "light" }, children: /* @__PURE__ */ e(
1619
+ }, ft = () => /* @__PURE__ */ d(Q, { children: [
1620
+ /* @__PURE__ */ e(Fr, {}),
1621
+ /* @__PURE__ */ e(Qe, {}),
1622
+ /* @__PURE__ */ e(Br, {}),
1623
+ /* @__PURE__ */ e(Qe, {}),
1624
+ /* @__PURE__ */ e(Ar, {}),
1625
+ /* @__PURE__ */ e(Ur, {}),
1626
+ /* @__PURE__ */ e(Qe, {}),
1627
+ /* @__PURE__ */ e(Wr, {})
1628
+ ] }), Uo = () => ft(), _r = (t) => {
1629
+ const { render: n, className: l } = t, [a] = ue(), r = Gt();
1630
+ return /* @__PURE__ */ e($e.Provider, { value: { state: r, tone: "light" }, children: /* @__PURE__ */ e(
1586
1631
  "div",
1587
1632
  {
1588
- className: h(
1633
+ className: u(
1589
1634
  "lexical-toolbar flex flex-row items-center p-1.5",
1590
1635
  l
1591
1636
  ),
1592
- children: /* @__PURE__ */ e(Gt, { children: t ? t({ editor: a, state: r, tone: "light" }) : ht() })
1637
+ children: /* @__PURE__ */ e(Qt, { children: n ? n({ editor: a, state: r, tone: "light" }) : ft() })
1593
1638
  }
1594
1639
  ) });
1595
- }, Lr = (n) => {
1596
- const { render: t } = n, [l] = ue(), a = Xt(), [r, o] = W(!1), { refs: i, floatingStyles: s } = lt({
1640
+ }, jr = (t) => {
1641
+ const { render: n } = t, [l] = ue(), a = Gt(), [r, o] = U(!1), { refs: i, floatingStyles: s } = st({
1597
1642
  placement: "top-start",
1598
1643
  strategy: "fixed",
1599
1644
  middleware: [
1600
- pn(8),
1601
- rt(),
1602
- ot({ padding: 8 }),
1603
- at({
1604
- apply({ rects: c, elements: g }) {
1605
- g.floating.style.width = `${c.reference.width}px`;
1645
+ Tt(8),
1646
+ at(),
1647
+ lt({ padding: 8 }),
1648
+ it({
1649
+ apply({ rects: c, elements: p }) {
1650
+ p.floating.style.width = `${c.reference.width}px`;
1606
1651
  }
1607
1652
  })
1608
1653
  ],
1609
- whileElementsMounted: it
1654
+ whileElementsMounted: ct
1610
1655
  });
1611
- return j(() => l.registerRootListener((c) => i.setReference(c ?? null)), [l, i]), j(() => Mt(
1656
+ return j(() => l.registerRootListener((c) => i.setReference(c ?? null)), [l, i]), j(() => Ut(
1612
1657
  l.registerCommand(
1613
- Hn,
1658
+ qn,
1614
1659
  () => (o(!0), !1),
1615
1660
  Le
1616
1661
  ),
1617
1662
  l.registerCommand(
1618
- $n,
1663
+ Jn,
1619
1664
  () => (o(!1), !1),
1620
1665
  Le
1621
1666
  )
1622
- ), [l]), /* @__PURE__ */ e(Ae.Provider, { value: { state: a, tone: "dark" }, children: /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(De, { children: r && /* @__PURE__ */ e("div", { ref: i.setFloating, style: s, className: "z-50", children: /* @__PURE__ */ e(
1667
+ ), [l]), /* @__PURE__ */ e($e.Provider, { value: { state: a, tone: "dark" }, children: /* @__PURE__ */ e(Ae, { children: /* @__PURE__ */ e(Re, { children: r && /* @__PURE__ */ e("div", { ref: i.setFloating, style: s, className: "z-50", children: /* @__PURE__ */ e(
1623
1668
  Y.div,
1624
1669
  {
1625
1670
  className: "lexical-floating-toolbar flex w-full flex-row items-center p-1 rounded-[var(--border-radius-dropdown)]",
@@ -1627,12 +1672,12 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1627
1672
  animate: { opacity: 1, y: 0 },
1628
1673
  exit: { opacity: 0, y: 4 },
1629
1674
  transition: { duration: 0.1, ease: "easeInOut" },
1630
- children: /* @__PURE__ */ e(Gt, { children: t ? t({ editor: l, state: a, tone: "dark" }) : ht() })
1675
+ children: /* @__PURE__ */ e(Qt, { children: n ? n({ editor: l, state: a, tone: "dark" }) : ft() })
1631
1676
  }
1632
1677
  ) }) }) }) });
1633
- }, zo = (n) => {
1678
+ }, Wo = (t) => {
1634
1679
  const {
1635
- label: t,
1680
+ label: n,
1636
1681
  description: l,
1637
1682
  error: a,
1638
1683
  placeholder: r,
@@ -1640,21 +1685,21 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1640
1685
  onChange: i,
1641
1686
  size: s = "md",
1642
1687
  toolbar: c = "static",
1643
- renderToolbar: g,
1644
- minRows: R = 4,
1645
- maxRows: w,
1646
- autogrow: m = !1,
1688
+ renderToolbar: p,
1689
+ minRows: y = 4,
1690
+ maxRows: x,
1691
+ autogrow: f = !1,
1647
1692
  namespace: v = "InputLexical",
1648
- nodes: f,
1649
- theme: p,
1650
- autoFocus: u = !1,
1651
- children: I,
1693
+ nodes: m,
1694
+ theme: g,
1695
+ autoFocus: h = !1,
1696
+ children: R,
1652
1697
  className: b
1653
- } = n, N = se(
1698
+ } = t, w = se(
1654
1699
  () => ({
1655
1700
  namespace: v,
1656
- theme: p ? { ...yt, ...p } : yt,
1657
- nodes: [...Nr, ...f ?? []],
1701
+ theme: g ? { ...kt, ...g } : kt,
1702
+ nodes: [...Or, ...m ?? []],
1658
1703
  editorState: o ?? null,
1659
1704
  onError: (O) => {
1660
1705
  throw O;
@@ -1663,30 +1708,30 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1663
1708
  // Lexical reads initialConfig once on mount; later prop changes are ignored by design.
1664
1709
  // eslint-disable-next-line react-hooks/exhaustive-deps
1665
1710
  []
1666
- ), y = Pe(
1711
+ ), k = be(
1667
1712
  (O) => {
1668
1713
  i?.(JSON.stringify(O.toJSON()));
1669
1714
  },
1670
1715
  [i]
1671
- ), S = G[s], z = !!a, L = (O) => `calc(${O} * 1lh + 1.5rem)`, P = m ? { minHeight: L(R), maxHeight: w ? L(w) : void 0 } : { height: L(R) };
1672
- return /* @__PURE__ */ e(q.Provider, { value: s, children: /* @__PURE__ */ d("div", { className: h("flex flex-col", b), children: [
1673
- /* @__PURE__ */ e(Z, { children: t }),
1674
- /* @__PURE__ */ e(bn, { initialConfig: N, children: /* @__PURE__ */ d(
1716
+ ), S = G[s], z = !!a, L = (O) => `calc(${O} * 1lh + 1.5rem)`, P = f ? { minHeight: L(y), maxHeight: x ? L(x) : void 0 } : { height: L(y) };
1717
+ return /* @__PURE__ */ e(q.Provider, { value: s, children: /* @__PURE__ */ d("div", { className: u("flex flex-col", b), children: [
1718
+ /* @__PURE__ */ e(ee, { children: n }),
1719
+ /* @__PURE__ */ e(Rn, { initialConfig: w, children: /* @__PURE__ */ d(
1675
1720
  "div",
1676
1721
  {
1677
- className: h(
1722
+ className: u(
1678
1723
  "relative flex flex-col border-[length:var(--border-width-input)] input-base rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] overflow-hidden transition-all duration-[var(--control-transition-duration)] ring-0 focus-within:ring-[length:var(--control-ring-width)] focus-within:outline-none font-[family-name:var(--font-family-base)]",
1679
1724
  z && "input-error"
1680
1725
  ),
1681
1726
  children: [
1682
- c === "static" && /* @__PURE__ */ e(Pr, { render: g }),
1727
+ c === "static" && /* @__PURE__ */ e(_r, { render: p }),
1683
1728
  /* @__PURE__ */ e("div", { className: "relative flex-1 min-h-0", children: /* @__PURE__ */ e(
1684
- xn,
1729
+ Sn,
1685
1730
  {
1686
1731
  contentEditable: /* @__PURE__ */ e(
1687
- wn,
1732
+ Dn,
1688
1733
  {
1689
- className: h(
1734
+ className: u(
1690
1735
  "lexical-content w-full outline-none px-3 py-3 leading-[1.55] overflow-y-auto mat-ui-hide-scrollbars",
1691
1736
  S
1692
1737
  ),
@@ -1695,7 +1740,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1695
1740
  placeholder: /* @__PURE__ */ e(
1696
1741
  "div",
1697
1742
  {
1698
- className: h(
1743
+ className: u(
1699
1744
  "lexical-placeholder pointer-events-none absolute left-3 top-3",
1700
1745
  S
1701
1746
  ),
@@ -1704,67 +1749,67 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1704
1749
  )
1705
1750
  }
1706
1751
  ),
1707
- ErrorBoundary: Rn
1752
+ ErrorBoundary: En
1708
1753
  }
1709
1754
  ) }),
1710
- /* @__PURE__ */ e(Nn, {}),
1711
- /* @__PURE__ */ e(yn, {}),
1712
- /* @__PURE__ */ e(kn, {}),
1713
- u && /* @__PURE__ */ e(In, {}),
1714
- i && /* @__PURE__ */ e(Cn, { onChange: y }),
1715
- I,
1716
- c === "floating" && /* @__PURE__ */ e(Lr, { render: g })
1755
+ /* @__PURE__ */ e(On, {}),
1756
+ /* @__PURE__ */ e(zn, {}),
1757
+ /* @__PURE__ */ e(Tn, {}),
1758
+ h && /* @__PURE__ */ e(Ln, {}),
1759
+ i && /* @__PURE__ */ e(Pn, { onChange: k }),
1760
+ R,
1761
+ c === "floating" && /* @__PURE__ */ e(jr, { render: p })
1717
1762
  ]
1718
1763
  }
1719
1764
  ) }),
1720
1765
  /* @__PURE__ */ e(V, { children: l }),
1721
1766
  /* @__PURE__ */ e(K, { children: a })
1722
1767
  ] }) });
1723
- }, Oo = (n) => {
1768
+ }, $o = (t) => {
1724
1769
  const {
1725
- className: t,
1770
+ className: n,
1726
1771
  label: l,
1727
1772
  description: a,
1728
1773
  options: r,
1729
1774
  error: o,
1730
1775
  size: i = "md",
1731
1776
  ...s
1732
- } = n;
1777
+ } = t;
1733
1778
  return /* @__PURE__ */ e(q.Provider, { value: i, children: /* @__PURE__ */ d(
1734
1779
  "div",
1735
1780
  {
1736
- className: h(
1781
+ className: u(
1737
1782
  "flex flex-col",
1738
- t
1783
+ n
1739
1784
  ),
1740
1785
  children: [
1741
- /* @__PURE__ */ e(Z, { children: l }),
1786
+ /* @__PURE__ */ e(ee, { children: l }),
1742
1787
  /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", children: [
1743
1788
  /* @__PURE__ */ e(
1744
1789
  "select",
1745
1790
  {
1746
- className: h(
1791
+ className: u(
1747
1792
  "appearance-none border-[length:var(--border-width-input)] input-base bg-none transition-all duration-[var(--control-transition-duration)] rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] ring-0 focus:ring-[length:var(--control-ring-width)] focus:outline-none font-[number:var(--font-weight-input-text)] font-[family-name:var(--font-family-base)]",
1748
- Q[i],
1793
+ Z[i],
1749
1794
  G[i],
1750
1795
  he[i],
1751
1796
  fe[i]
1752
1797
  ),
1753
1798
  ...s,
1754
- children: r && r.map((c, g) => /* @__PURE__ */ e(
1799
+ children: r && r.map((c, p) => /* @__PURE__ */ e(
1755
1800
  "option",
1756
1801
  {
1757
1802
  value: c.value,
1758
1803
  disabled: c.disabled,
1759
1804
  children: c.label
1760
1805
  },
1761
- g
1806
+ p
1762
1807
  ))
1763
1808
  }
1764
1809
  ),
1765
1810
  /* @__PURE__ */ d(me, { children: [
1766
1811
  o && /* @__PURE__ */ e(oe, {}),
1767
- /* @__PURE__ */ e(te, { Icon: ve })
1812
+ /* @__PURE__ */ e(ne, { Icon: xe })
1768
1813
  ] })
1769
1814
  ] }),
1770
1815
  /* @__PURE__ */ e(V, { children: a }),
@@ -1772,7 +1817,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1772
1817
  ]
1773
1818
  }
1774
1819
  ) });
1775
- }, We = k.forwardRef((n, t) => {
1820
+ }, _e = C.forwardRef((t, n) => {
1776
1821
  const {
1777
1822
  children: l,
1778
1823
  onClick: a,
@@ -1781,14 +1826,14 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1781
1826
  active: i = !1,
1782
1827
  className: s,
1783
1828
  ...c
1784
- } = n;
1829
+ } = t;
1785
1830
  return /* @__PURE__ */ d(
1786
1831
  "div",
1787
1832
  {
1788
- ref: t,
1833
+ ref: n,
1789
1834
  ...c,
1790
1835
  onClick: () => !o && a && a(),
1791
- className: h(
1836
+ className: u(
1792
1837
  "option-base px-4 py-2 rounded-[var(--border-radius-option)] cursor-pointer transition-all duration-[var(--control-transition-duration)] select-none flex flex-row gap-3 items-center",
1793
1838
  r && !o && "option-selected",
1794
1839
  i && !o && "option-active",
@@ -1797,40 +1842,40 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1797
1842
  ),
1798
1843
  children: [
1799
1844
  /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 break-all line-clamp-1", children: l }),
1800
- r && !o && /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(Dt, { className: "h-5 w-5" }) })
1845
+ r && !o && /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(zt, { className: "h-5 w-5" }) })
1801
1846
  ]
1802
1847
  }
1803
1848
  );
1804
- }), He = k.forwardRef((n, t) => {
1805
- const { children: l, className: a, ...r } = n;
1849
+ }), je = C.forwardRef((t, n) => {
1850
+ const { children: l, className: a, ...r } = t;
1806
1851
  return /* @__PURE__ */ e(
1807
1852
  "div",
1808
1853
  {
1809
- ref: t,
1854
+ ref: n,
1810
1855
  ...r,
1811
- className: h(
1856
+ className: u(
1812
1857
  "option-group-header px-4 pt-3 pb-1 text-xs font-[number:var(--font-weight-group-header)] uppercase tracking-wide select-none",
1813
1858
  a
1814
1859
  ),
1815
1860
  children: l
1816
1861
  }
1817
1862
  );
1818
- }), $e = k.forwardRef((n, t) => {
1819
- const { className: l, ...a } = n;
1863
+ }), Xe = C.forwardRef((t, n) => {
1864
+ const { className: l, ...a } = t;
1820
1865
  return /* @__PURE__ */ e(
1821
1866
  "div",
1822
1867
  {
1823
- ref: t,
1868
+ ref: n,
1824
1869
  ...a,
1825
- className: h(
1870
+ className: u(
1826
1871
  "option-divider my-1 h-px",
1827
1872
  l
1828
1873
  )
1829
1874
  }
1830
1875
  );
1831
- }), H = (n) => !("kind" in n), J = (n, t) => n === t ? !0 : n == null || t == null || typeof n != "object" || typeof t != "object" ? !1 : JSON.stringify(n) === JSON.stringify(t), _e = (n) => {
1876
+ }), $ = (t) => !("kind" in t), J = (t, n) => t === n ? !0 : t == null || n == null || typeof t != "object" || typeof n != "object" ? !1 : JSON.stringify(t) === JSON.stringify(n), Ve = (t) => {
1832
1877
  const {
1833
- placement: t = "bottom",
1878
+ placement: n = "bottom",
1834
1879
  fullWidth: l,
1835
1880
  minWidth: a,
1836
1881
  maxWidth: r,
@@ -1838,73 +1883,73 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1838
1883
  onOpenChange: i,
1839
1884
  listRef: s,
1840
1885
  activeIndex: c,
1841
- onNavigate: g,
1842
- loop: R = !0,
1843
- disabledIndices: w
1844
- } = n, m = k.useMemo(() => [
1845
- rt({ padding: 8 }),
1846
- ot({ padding: 8 }),
1847
- at({
1886
+ onNavigate: p,
1887
+ loop: y = !0,
1888
+ disabledIndices: x
1889
+ } = t, f = C.useMemo(() => [
1890
+ at({ padding: 8 }),
1891
+ lt({ padding: 8 }),
1892
+ it({
1848
1893
  apply({ rects: P, elements: O }) {
1849
1894
  l && (O.floating.style.width = `${P.reference.width}px`), a && (O.floating.style.minWidth = `${a}px`), r && (O.floating.style.maxWidth = `${r}px`);
1850
1895
  }
1851
1896
  })
1852
- ], [l, r, a]), { refs: v, floatingStyles: f, context: p, placement: u } = lt({
1853
- placement: t,
1897
+ ], [l, r, a]), { refs: v, floatingStyles: m, context: g, placement: h } = st({
1898
+ placement: n,
1854
1899
  open: o,
1855
1900
  onOpenChange: i,
1856
- middleware: m,
1857
- whileElementsMounted: it
1858
- }), I = gn(p, {
1901
+ middleware: f,
1902
+ whileElementsMounted: ct
1903
+ }), R = Cn(g, {
1859
1904
  listRef: s,
1860
1905
  activeIndex: c,
1861
- onNavigate: g,
1862
- loop: R,
1906
+ onNavigate: p,
1907
+ loop: y,
1863
1908
  virtual: !0,
1864
1909
  focusItemOnOpen: !1,
1865
- disabledIndices: w
1866
- }), b = zt(p, {
1910
+ disabledIndices: x
1911
+ }), b = Pt(g, {
1867
1912
  outsidePress: !0,
1868
1913
  escapeKey: !1
1869
- }), { getReferenceProps: N, getFloatingProps: y, getItemProps: S } = Ot([I, b]), z = k.useRef({
1870
- floatingStyles: f,
1914
+ }), { getReferenceProps: w, getFloatingProps: k, getItemProps: S } = Lt([R, b]), z = C.useRef({
1915
+ floatingStyles: m,
1871
1916
  setFloating: v.setFloating,
1872
- placement: t,
1873
- getFloatingProps: y
1917
+ placement: n,
1918
+ getFloatingProps: k
1874
1919
  });
1875
1920
  z.current = {
1876
- floatingStyles: f,
1921
+ floatingStyles: m,
1877
1922
  setFloating: v.setFloating,
1878
- placement: u,
1879
- getFloatingProps: y
1923
+ placement: h,
1924
+ getFloatingProps: k
1880
1925
  };
1881
- const L = k.useMemo(() => {
1926
+ const L = C.useMemo(() => {
1882
1927
  const P = (O) => {
1883
- const { floatingStyles: x, setFloating: C, placement: T, getFloatingProps: E } = z.current, { className: _, open: $, children: ae } = O;
1928
+ const { floatingStyles: N, setFloating: I, placement: T, getFloatingProps: E } = z.current, { className: _, open: H, children: ae } = O;
1884
1929
  return /* @__PURE__ */ e(
1885
- _t,
1930
+ Vt,
1886
1931
  {
1887
- open: $,
1932
+ open: H,
1888
1933
  className: _,
1889
- floatingStyles: x,
1890
- setFloating: C,
1934
+ floatingStyles: N,
1935
+ setFloating: I,
1891
1936
  placement: T,
1892
1937
  floatingProps: E(),
1893
1938
  children: ae
1894
1939
  }
1895
1940
  );
1896
1941
  };
1897
- return k.memo(P);
1942
+ return C.memo(P);
1898
1943
  }, []);
1899
1944
  return {
1900
1945
  anchorRef: v.setReference,
1901
1946
  Popover: L,
1902
- getReferenceProps: N,
1947
+ getReferenceProps: w,
1903
1948
  getItemProps: S
1904
1949
  };
1905
- }, Er = (n) => {
1950
+ }, Xr = (t) => {
1906
1951
  const {
1907
- className: t,
1952
+ className: n,
1908
1953
  label: l,
1909
1954
  description: a,
1910
1955
  options: r,
@@ -1912,133 +1957,133 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1912
1957
  value: i,
1913
1958
  placeholder: s,
1914
1959
  maxHeight: c = 300,
1915
- error: g,
1916
- size: R = "md",
1917
- disabled: w = !1,
1918
- clearable: m = !1
1919
- } = n, [v, f] = W(!1), [p, u] = W(null), I = k.useRef(null), b = k.useRef([]), N = r?.find((x) => H(x) && J(x.value, i)), y = se(
1920
- () => r.map((x, C) => !H(x) || x.disabled ? C : -1).filter((x) => x !== -1),
1960
+ error: p,
1961
+ size: y = "md",
1962
+ disabled: x = !1,
1963
+ clearable: f = !1
1964
+ } = t, [v, m] = U(!1), [g, h] = U(null), R = C.useRef(null), b = C.useRef([]), w = r?.find((N) => $(N) && J(N.value, i)), k = se(
1965
+ () => r.map((N, I) => !$(N) || N.disabled ? I : -1).filter((N) => N !== -1),
1921
1966
  [r]
1922
1967
  );
1923
- xe(v, () => f(!1)), j(() => {
1968
+ we(v, () => m(!1)), j(() => {
1924
1969
  if (v) {
1925
- I.current?.focus({ preventScroll: !0 });
1926
- const x = r.findIndex((C) => H(C) && J(C.value, i));
1927
- if (x >= 0)
1928
- u(x);
1970
+ R.current?.focus({ preventScroll: !0 });
1971
+ const N = r.findIndex((I) => $(I) && J(I.value, i));
1972
+ if (N >= 0)
1973
+ h(N);
1929
1974
  else {
1930
- const C = r.findIndex((T) => H(T) && !T.disabled);
1931
- u(C >= 0 ? C : null);
1975
+ const I = r.findIndex((T) => $(T) && !T.disabled);
1976
+ h(I >= 0 ? I : null);
1932
1977
  }
1933
1978
  } else
1934
- u(null);
1979
+ h(null);
1935
1980
  }, [v]);
1936
- const { anchorRef: S, Popover: z, getReferenceProps: L, getItemProps: P } = _e({
1981
+ const { anchorRef: S, Popover: z, getReferenceProps: L, getItemProps: P } = Ve({
1937
1982
  placement: "bottom",
1938
1983
  fullWidth: !0,
1939
1984
  minWidth: 200,
1940
1985
  open: v,
1941
- onOpenChange: f,
1986
+ onOpenChange: m,
1942
1987
  listRef: b,
1943
- activeIndex: p,
1944
- onNavigate: u,
1945
- disabledIndices: y
1946
- }), O = (x) => {
1947
- const C = r[x];
1948
- C && H(C) && !C.disabled && (o(C.value), f(!1));
1988
+ activeIndex: g,
1989
+ onNavigate: h,
1990
+ disabledIndices: k
1991
+ }), O = (N) => {
1992
+ const I = r[N];
1993
+ I && $(I) && !I.disabled && (o(I.value), m(!1));
1949
1994
  };
1950
- return /* @__PURE__ */ e(q.Provider, { value: R, children: /* @__PURE__ */ d(
1995
+ return /* @__PURE__ */ e(q.Provider, { value: y, children: /* @__PURE__ */ d(
1951
1996
  "div",
1952
1997
  {
1953
- className: h(
1998
+ className: u(
1954
1999
  "flex flex-col",
1955
- t
2000
+ n
1956
2001
  ),
1957
2002
  children: [
1958
- /* @__PURE__ */ e(Z, { children: l }),
2003
+ /* @__PURE__ */ e(ee, { children: l }),
1959
2004
  /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: S, children: [
1960
2005
  /* @__PURE__ */ d(
1961
2006
  "div",
1962
2007
  {
1963
2008
  ...L({
1964
- ref: I,
2009
+ ref: R,
1965
2010
  role: "button",
1966
- tabIndex: w ? -1 : 0,
1967
- "aria-disabled": w,
2011
+ tabIndex: x ? -1 : 0,
2012
+ "aria-disabled": x,
1968
2013
  onClick: () => {
1969
- w || f(!v);
2014
+ x || m(!v);
1970
2015
  },
1971
- onKeyDown: (x) => {
1972
- w || (x.key === " " ? (x.preventDefault(), f((C) => !C)) : x.key === "Enter" && (x.preventDefault(), v && p != null ? O(p) : f(!0)));
2016
+ onKeyDown: (N) => {
2017
+ x || (N.key === " " ? (N.preventDefault(), m((I) => !I)) : N.key === "Enter" && (N.preventDefault(), v && g != null ? O(g) : m(!0)));
1973
2018
  }
1974
2019
  }),
1975
- className: h(
2020
+ className: u(
1976
2021
  "flex flex-row items-center border-[length:var(--border-width-input)] select-trigger transition-all duration-[var(--control-transition-duration)] rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] ring-0 focus:ring-[length:var(--control-ring-width)] focus:outline-none select-none font-[number:var(--font-weight-input-text)] font-[family-name:var(--font-family-base)]",
1977
- Q[R],
1978
- G[R],
1979
- he[R],
1980
- m && i ? Be[R] : fe[R],
1981
- w ? "select-trigger-disabled" : g && "select-trigger-error",
1982
- !w && v && "ring-[length:var(--control-ring-width)]"
2022
+ Z[y],
2023
+ G[y],
2024
+ he[y],
2025
+ f && i ? Ue[y] : fe[y],
2026
+ x ? "select-trigger-disabled" : p && "select-trigger-error",
2027
+ !x && v && "ring-[length:var(--control-ring-width)]"
1983
2028
  ),
1984
2029
  children: [
1985
- N && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: N.label }),
1986
- !N && s && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: s })
2030
+ w && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: w.label }),
2031
+ !w && s && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: s })
1987
2032
  ]
1988
2033
  }
1989
2034
  ),
1990
2035
  /* @__PURE__ */ d(me, { children: [
1991
- !w && g && /* @__PURE__ */ e(oe, {}),
1992
- m && !!i && !w && /* @__PURE__ */ e(te, { Icon: de, onClick: () => o(null) }),
1993
- /* @__PURE__ */ e(te, { Icon: ve })
2036
+ !x && p && /* @__PURE__ */ e(oe, {}),
2037
+ f && !!i && !x && /* @__PURE__ */ e(ne, { Icon: de, onClick: () => o(null) }),
2038
+ /* @__PURE__ */ e(ne, { Icon: xe })
1994
2039
  ] }),
1995
- /* @__PURE__ */ e(z, { open: v, children: /* @__PURE__ */ e(be, { className: "!p-0", style: { maxHeight: c }, children: /* @__PURE__ */ e("div", { className: "flex flex-col p-2 gap-1", children: r.map((x, C) => {
1996
- if (!H(x))
1997
- return x.kind === "header" ? /* @__PURE__ */ e(
1998
- He,
2040
+ /* @__PURE__ */ e(z, { open: v, children: /* @__PURE__ */ e(pe, { className: "!p-0", style: { maxHeight: c }, children: /* @__PURE__ */ e("div", { className: "flex flex-col p-2 gap-1", children: r.map((N, I) => {
2041
+ if (!$(N))
2042
+ return N.kind === "header" ? /* @__PURE__ */ e(
2043
+ je,
1999
2044
  {
2000
2045
  ref: (E) => {
2001
- b.current[C] = E;
2046
+ b.current[I] = E;
2002
2047
  },
2003
- children: x.label
2048
+ children: N.label
2004
2049
  },
2005
- `header-${C}`
2050
+ `header-${I}`
2006
2051
  ) : /* @__PURE__ */ e(
2007
- $e,
2052
+ Xe,
2008
2053
  {
2009
2054
  ref: (E) => {
2010
- b.current[C] = E;
2055
+ b.current[I] = E;
2011
2056
  }
2012
2057
  },
2013
- `divider-${C}`
2058
+ `divider-${I}`
2014
2059
  );
2015
- const T = J(x.value, i);
2060
+ const T = J(N.value, i);
2016
2061
  return /* @__PURE__ */ e(
2017
- We,
2062
+ _e,
2018
2063
  {
2019
2064
  ...P({
2020
2065
  ref(E) {
2021
- b.current[C] = E;
2066
+ b.current[I] = E;
2022
2067
  }
2023
2068
  }),
2024
- onClick: () => O(C),
2069
+ onClick: () => O(I),
2025
2070
  selected: T,
2026
- active: p === C,
2027
- disabled: x.disabled,
2028
- children: x.label
2071
+ active: g === I,
2072
+ disabled: N.disabled,
2073
+ children: N.label
2029
2074
  },
2030
- `option-${C}`
2075
+ `option-${I}`
2031
2076
  );
2032
2077
  }) }) }) })
2033
2078
  ] }),
2034
2079
  /* @__PURE__ */ e(V, { children: a }),
2035
- /* @__PURE__ */ e(K, { children: g })
2080
+ /* @__PURE__ */ e(K, { children: p })
2036
2081
  ]
2037
2082
  }
2038
2083
  ) });
2039
- }, To = (n) => {
2084
+ }, Ho = (t) => {
2040
2085
  const {
2041
- className: t,
2086
+ className: n,
2042
2087
  label: l,
2043
2088
  description: a,
2044
2089
  options: r,
@@ -2046,57 +2091,57 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2046
2091
  onSearch: i,
2047
2092
  value: s,
2048
2093
  placeholder: c,
2049
- maxHeight: g = 300,
2050
- error: R,
2051
- size: w = "md",
2052
- disabled: m = !1,
2094
+ maxHeight: p = 300,
2095
+ error: y,
2096
+ size: x = "md",
2097
+ disabled: f = !1,
2053
2098
  clearable: v = !1
2054
- } = n, [f, p] = W(!1), [u, I] = W(r), [b, N] = W(""), [y, S] = W(null), z = k.useRef(null), L = k.useRef(null), P = k.useRef([]), O = r?.find((F) => H(F) && J(F.value, s)), x = se(() => b !== "" ? u : r, [b, u, r]), C = se(
2055
- () => x.map((F, U) => !H(F) || F.disabled ? U : -1).filter((F) => F !== -1),
2056
- [x]
2099
+ } = t, [m, g] = U(!1), [h, R] = U(r), [b, w] = U(""), [k, S] = U(null), z = C.useRef(null), L = C.useRef(null), P = C.useRef([]), O = r?.find((F) => $(F) && J(F.value, s)), N = se(() => b !== "" ? h : r, [b, h, r]), I = se(
2100
+ () => N.map((F, W) => !$(F) || F.disabled ? W : -1).filter((F) => F !== -1),
2101
+ [N]
2057
2102
  );
2058
- xe(f, () => p(!1)), j(() => {
2059
- I(i(b));
2103
+ we(m, () => g(!1)), j(() => {
2104
+ R(i(b));
2060
2105
  }, [b, r, i]), j(() => {
2061
- if (f) {
2106
+ if (m) {
2062
2107
  setTimeout(() => L.current?.focus(), 100);
2063
- const F = r.findIndex((U) => H(U) && J(U.value, s));
2108
+ const F = r.findIndex((W) => $(W) && J(W.value, s));
2064
2109
  if (F >= 0)
2065
2110
  S(F);
2066
2111
  else {
2067
- const U = r.findIndex((le) => H(le) && !le.disabled);
2068
- S(U >= 0 ? U : null);
2112
+ const W = r.findIndex((le) => $(le) && !le.disabled);
2113
+ S(W >= 0 ? W : null);
2069
2114
  }
2070
2115
  } else
2071
- S(null), N("");
2072
- }, [f]), j(() => {
2073
- if (!f) return;
2074
- const F = x.findIndex((U) => H(U) && !U.disabled);
2116
+ S(null), w("");
2117
+ }, [m]), j(() => {
2118
+ if (!m) return;
2119
+ const F = N.findIndex((W) => $(W) && !W.disabled);
2075
2120
  S(F >= 0 ? F : null);
2076
- }, [b, f, x]);
2077
- const { anchorRef: T, Popover: E, getReferenceProps: _, getItemProps: $ } = _e({
2121
+ }, [b, m, N]);
2122
+ const { anchorRef: T, Popover: E, getReferenceProps: _, getItemProps: H } = Ve({
2078
2123
  placement: "bottom",
2079
2124
  fullWidth: !0,
2080
2125
  minWidth: 200,
2081
- open: f,
2082
- onOpenChange: p,
2126
+ open: m,
2127
+ onOpenChange: g,
2083
2128
  listRef: P,
2084
- activeIndex: y,
2129
+ activeIndex: k,
2085
2130
  onNavigate: S,
2086
- disabledIndices: C
2131
+ disabledIndices: I
2087
2132
  }), ae = (F) => {
2088
- const U = x[F];
2089
- U && H(U) && !U.disabled && (o(U.value), p(!1));
2090
- }, Ne = x.some((F) => H(F));
2091
- return /* @__PURE__ */ e(q.Provider, { value: w, children: /* @__PURE__ */ d(
2133
+ const W = N[F];
2134
+ W && $(W) && !W.disabled && (o(W.value), g(!1));
2135
+ }, ye = N.some((F) => $(F));
2136
+ return /* @__PURE__ */ e(q.Provider, { value: x, children: /* @__PURE__ */ d(
2092
2137
  "div",
2093
2138
  {
2094
- className: h(
2139
+ className: u(
2095
2140
  "flex flex-col",
2096
- t
2141
+ n
2097
2142
  ),
2098
2143
  children: [
2099
- /* @__PURE__ */ e(Z, { children: l }),
2144
+ /* @__PURE__ */ e(ee, { children: l }),
2100
2145
  /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: T, children: [
2101
2146
  /* @__PURE__ */ d(
2102
2147
  "div",
@@ -2104,23 +2149,23 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2104
2149
  ..._({
2105
2150
  ref: z,
2106
2151
  role: "button",
2107
- tabIndex: m ? -1 : 0,
2108
- "aria-disabled": m,
2152
+ tabIndex: f ? -1 : 0,
2153
+ "aria-disabled": f,
2109
2154
  onClick: () => {
2110
- m || p(!f);
2155
+ f || g(!m);
2111
2156
  },
2112
2157
  onKeyDown: (F) => {
2113
- m || (F.key === " " ? (F.preventDefault(), p((U) => !U)) : F.key === "Enter" && !f && (F.preventDefault(), p(!0)));
2158
+ f || (F.key === " " ? (F.preventDefault(), g((W) => !W)) : F.key === "Enter" && !m && (F.preventDefault(), g(!0)));
2114
2159
  }
2115
2160
  }),
2116
- className: h(
2161
+ className: u(
2117
2162
  "flex flex-row items-center border-[length:var(--border-width-input)] select-trigger transition-all duration-[var(--control-transition-duration)] rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] ring-0 focus:ring-[length:var(--control-ring-width)] focus:outline-none select-none font-[number:var(--font-weight-input-text)] font-[family-name:var(--font-family-base)]",
2118
- Q[w],
2119
- G[w],
2120
- he[w],
2121
- v && s ? Be[w] : fe[w],
2122
- m ? "select-trigger-disabled" : R && "select-trigger-error",
2123
- !m && f && "ring-[length:var(--control-ring-width)]"
2163
+ Z[x],
2164
+ G[x],
2165
+ he[x],
2166
+ v && s ? Ue[x] : fe[x],
2167
+ f ? "select-trigger-disabled" : y && "select-trigger-error",
2168
+ !f && m && "ring-[length:var(--control-ring-width)]"
2124
2169
  ),
2125
2170
  children: [
2126
2171
  O && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: O.label }),
@@ -2129,11 +2174,11 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2129
2174
  }
2130
2175
  ),
2131
2176
  /* @__PURE__ */ d(me, { children: [
2132
- !m && R && /* @__PURE__ */ e(oe, {}),
2133
- v && !!s && !m && /* @__PURE__ */ e(te, { Icon: de, onClick: () => o(null) }),
2134
- /* @__PURE__ */ e(te, { Icon: ve })
2177
+ !f && y && /* @__PURE__ */ e(oe, {}),
2178
+ v && !!s && !f && /* @__PURE__ */ e(ne, { Icon: de, onClick: () => o(null) }),
2179
+ /* @__PURE__ */ e(ne, { Icon: xe })
2135
2180
  ] }),
2136
- /* @__PURE__ */ e(E, { open: f, children: /* @__PURE__ */ d(be, { className: "gap-0 !p-0", style: { maxHeight: g }, children: [
2181
+ /* @__PURE__ */ e(E, { open: m, children: /* @__PURE__ */ d(pe, { className: "gap-0 !p-0", style: { maxHeight: p }, children: [
2137
2182
  /* @__PURE__ */ d("div", { className: "sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm", children: [
2138
2183
  /* @__PURE__ */ e(
2139
2184
  "input",
@@ -2143,75 +2188,75 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2143
2188
  placeholder: "Search",
2144
2189
  value: b,
2145
2190
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-[var(--control-transition-duration)] focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2146
- onChange: (F) => N(F.target.value),
2191
+ onChange: (F) => w(F.target.value),
2147
2192
  onKeyDown: (F) => {
2148
- F.key === "Enter" && y != null && (F.preventDefault(), ae(y));
2193
+ F.key === "Enter" && k != null && (F.preventDefault(), ae(k));
2149
2194
  }
2150
2195
  }
2151
2196
  ),
2152
- /* @__PURE__ */ e(Fe, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2197
+ /* @__PURE__ */ e(Be, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2153
2198
  ] }),
2154
2199
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2155
- b !== "" && !Ne && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(nt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2156
- x.map((F, U) => {
2157
- if (!H(F))
2200
+ b !== "" && !ye && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(rt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2201
+ N.map((F, W) => {
2202
+ if (!$(F))
2158
2203
  return F.kind === "header" ? /* @__PURE__ */ e(
2159
- He,
2204
+ je,
2160
2205
  {
2161
2206
  ref: (re) => {
2162
- P.current[U] = re;
2207
+ P.current[W] = re;
2163
2208
  },
2164
2209
  children: F.label
2165
2210
  },
2166
- `header-${U}`
2211
+ `header-${W}`
2167
2212
  ) : /* @__PURE__ */ e(
2168
- $e,
2213
+ Xe,
2169
2214
  {
2170
2215
  ref: (re) => {
2171
- P.current[U] = re;
2216
+ P.current[W] = re;
2172
2217
  }
2173
2218
  },
2174
- `divider-${U}`
2219
+ `divider-${W}`
2175
2220
  );
2176
2221
  const le = J(F.value, s);
2177
2222
  return /* @__PURE__ */ e(
2178
- We,
2223
+ _e,
2179
2224
  {
2180
- ...$({
2225
+ ...H({
2181
2226
  ref(re) {
2182
- P.current[U] = re;
2227
+ P.current[W] = re;
2183
2228
  }
2184
2229
  }),
2185
- onClick: () => ae(U),
2230
+ onClick: () => ae(W),
2186
2231
  selected: le,
2187
- active: y === U,
2232
+ active: k === W,
2188
2233
  disabled: F.disabled,
2189
2234
  children: F.label
2190
2235
  },
2191
- `option-${U}`
2236
+ `option-${W}`
2192
2237
  );
2193
2238
  })
2194
2239
  ] })
2195
2240
  ] }) })
2196
2241
  ] }),
2197
2242
  /* @__PURE__ */ e(V, { children: a }),
2198
- /* @__PURE__ */ e(K, { children: R })
2243
+ /* @__PURE__ */ e(K, { children: y })
2199
2244
  ]
2200
2245
  }
2201
2246
  ) });
2202
- }, Fr = (n, t) => {
2203
- const [l, a] = W(n);
2247
+ }, Vr = (t, n) => {
2248
+ const [l, a] = U(t);
2204
2249
  return j(() => {
2205
2250
  const r = setTimeout(() => {
2206
- a(n);
2207
- }, t);
2251
+ a(t);
2252
+ }, n);
2208
2253
  return () => {
2209
2254
  clearTimeout(r);
2210
2255
  };
2211
- }, [n, t]), l;
2212
- }, Po = (n) => {
2256
+ }, [t, n]), l;
2257
+ }, _o = (t) => {
2213
2258
  const {
2214
- className: t,
2259
+ className: n,
2215
2260
  label: l,
2216
2261
  description: a,
2217
2262
  onChange: r,
@@ -2219,103 +2264,103 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2219
2264
  fetchOptionByValue: i,
2220
2265
  onSearchDebounceMs: s = 300,
2221
2266
  value: c,
2222
- placeholder: g,
2223
- maxHeight: R = 300,
2224
- error: w,
2225
- size: m = "md",
2267
+ placeholder: p,
2268
+ maxHeight: y = 300,
2269
+ error: x,
2270
+ size: f = "md",
2226
2271
  disabled: v = !1,
2227
- clearable: f = !1
2228
- } = n, [p, u] = W(!1), I = k.useRef(null), [b, N] = W(""), [y, S] = W([]), [z, L] = W(null), P = k.useRef(null), [O, x] = W(!1), [C, T] = W(!1), [E, _] = W(null), $ = k.useRef([]), ae = se(
2229
- () => y.map((B, A) => !H(B) || B.disabled ? A : -1).filter((B) => B !== -1),
2230
- [y]
2272
+ clearable: m = !1
2273
+ } = t, [g, h] = U(!1), R = C.useRef(null), [b, w] = U(""), [k, S] = U([]), [z, L] = U(null), P = C.useRef(null), [O, N] = U(!1), [I, T] = U(!1), [E, _] = U(null), H = C.useRef([]), ae = se(
2274
+ () => k.map((B, A) => !$(B) || B.disabled ? A : -1).filter((B) => B !== -1),
2275
+ [k]
2231
2276
  );
2232
- xe(p, () => u(!1));
2233
- const Ne = Fr(b, s);
2277
+ we(g, () => h(!1));
2278
+ const ye = Vr(b, s);
2234
2279
  j(() => {
2235
2280
  (async () => {
2236
- x(!0);
2237
- const A = await o(Ne);
2238
- S(A), x(!1);
2281
+ N(!0);
2282
+ const A = await o(ye);
2283
+ S(A), N(!1);
2239
2284
  })();
2240
- }, [Ne, o]), j(() => {
2285
+ }, [ye, o]), j(() => {
2241
2286
  if (c == null) {
2242
2287
  L(null);
2243
2288
  return;
2244
2289
  }
2245
- const B = y?.find((A) => H(A) && J(A.value, c));
2290
+ const B = k?.find((A) => $(A) && J(A.value, c));
2246
2291
  B ? L(B) : (async () => {
2247
2292
  T(!0);
2248
2293
  const ie = await i(c);
2249
2294
  L(ie), T(!1);
2250
2295
  })();
2251
- }, [i, y, c]), j(() => {
2252
- p ? setTimeout(() => P.current?.focus(), 100) : (_(null), N(""));
2253
- }, [p]), j(() => {
2254
- if (!p) return;
2255
- const B = y.findIndex((A) => H(A) && !A.disabled);
2296
+ }, [i, k, c]), j(() => {
2297
+ g ? setTimeout(() => P.current?.focus(), 100) : (_(null), w(""));
2298
+ }, [g]), j(() => {
2299
+ if (!g) return;
2300
+ const B = k.findIndex((A) => $(A) && !A.disabled);
2256
2301
  _(B >= 0 ? B : null);
2257
- }, [y, p]);
2258
- const { anchorRef: F, Popover: U, getReferenceProps: le, getItemProps: re } = _e({
2302
+ }, [k, g]);
2303
+ const { anchorRef: F, Popover: W, getReferenceProps: le, getItemProps: re } = Ve({
2259
2304
  placement: "bottom",
2260
2305
  fullWidth: !0,
2261
2306
  minWidth: 200,
2262
- open: p,
2263
- onOpenChange: u,
2264
- listRef: $,
2307
+ open: g,
2308
+ onOpenChange: h,
2309
+ listRef: H,
2265
2310
  activeIndex: E,
2266
2311
  onNavigate: _,
2267
2312
  disabledIndices: ae
2268
2313
  }), ze = (B) => {
2269
- const A = y[B];
2270
- A && H(A) && !A.disabled && (r(A.value), u(!1));
2271
- }, Oe = y.some((B) => H(B));
2272
- return /* @__PURE__ */ e(q.Provider, { value: m, children: /* @__PURE__ */ d(
2314
+ const A = k[B];
2315
+ A && $(A) && !A.disabled && (r(A.value), h(!1));
2316
+ }, Te = k.some((B) => $(B));
2317
+ return /* @__PURE__ */ e(q.Provider, { value: f, children: /* @__PURE__ */ d(
2273
2318
  "div",
2274
2319
  {
2275
- className: h(
2320
+ className: u(
2276
2321
  "flex flex-col",
2277
- t
2322
+ n
2278
2323
  ),
2279
2324
  children: [
2280
- /* @__PURE__ */ e(Z, { children: l }),
2325
+ /* @__PURE__ */ e(ee, { children: l }),
2281
2326
  /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: F, children: [
2282
2327
  /* @__PURE__ */ d(
2283
2328
  "div",
2284
2329
  {
2285
2330
  ...le({
2286
- ref: I,
2331
+ ref: R,
2287
2332
  role: "button",
2288
2333
  tabIndex: v ? -1 : 0,
2289
2334
  "aria-disabled": v,
2290
2335
  onClick: () => {
2291
- v || u(!p);
2336
+ v || h(!g);
2292
2337
  },
2293
2338
  onKeyDown: (B) => {
2294
- v || (B.key === " " ? (B.preventDefault(), u((A) => !A)) : B.key === "Enter" && !p && (B.preventDefault(), u(!0)));
2339
+ v || (B.key === " " ? (B.preventDefault(), h((A) => !A)) : B.key === "Enter" && !g && (B.preventDefault(), h(!0)));
2295
2340
  }
2296
2341
  }),
2297
- className: h(
2342
+ className: u(
2298
2343
  "flex flex-row items-center border-[length:var(--border-width-input)] select-trigger transition-all duration-[var(--control-transition-duration)] rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] ring-0 focus:ring-[length:var(--control-ring-width)] focus:outline-none select-none font-[number:var(--font-weight-input-text)] font-[family-name:var(--font-family-base)]",
2299
- Q[m],
2300
- G[m],
2301
- he[m],
2302
- f && c ? Be[m] : fe[m],
2303
- v ? "select-trigger-disabled" : w && "select-trigger-error",
2304
- !v && p && "ring-[length:var(--control-ring-width)]"
2344
+ Z[f],
2345
+ G[f],
2346
+ he[f],
2347
+ m && c ? Ue[f] : fe[f],
2348
+ v ? "select-trigger-disabled" : x && "select-trigger-error",
2349
+ !v && g && "ring-[length:var(--control-ring-width)]"
2305
2350
  ),
2306
2351
  children: [
2307
- !C && z && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: z.label }),
2308
- !C && !z && g && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: g }),
2309
- C && /* @__PURE__ */ e(Se, { className: "h-4 w-4 text-[var(--color-input-text)]" })
2352
+ !I && z && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: z.label }),
2353
+ !I && !z && p && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: p }),
2354
+ I && /* @__PURE__ */ e(Oe, { className: "h-4 w-4 text-[var(--color-input-text)]" })
2310
2355
  ]
2311
2356
  }
2312
2357
  ),
2313
2358
  /* @__PURE__ */ d(me, { children: [
2314
- !v && w && /* @__PURE__ */ e(oe, {}),
2315
- f && !!c && !v && /* @__PURE__ */ e(te, { Icon: de, onClick: () => r(null) }),
2316
- /* @__PURE__ */ e(te, { Icon: ve })
2359
+ !v && x && /* @__PURE__ */ e(oe, {}),
2360
+ m && !!c && !v && /* @__PURE__ */ e(ne, { Icon: de, onClick: () => r(null) }),
2361
+ /* @__PURE__ */ e(ne, { Icon: xe })
2317
2362
  ] }),
2318
- /* @__PURE__ */ e(U, { open: p, children: /* @__PURE__ */ d(be, { className: "gap-0 !p-0", style: { maxHeight: R }, children: [
2363
+ /* @__PURE__ */ e(W, { open: g, children: /* @__PURE__ */ d(pe, { className: "gap-0 !p-0", style: { maxHeight: y }, children: [
2319
2364
  /* @__PURE__ */ d("div", { className: "sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm", children: [
2320
2365
  /* @__PURE__ */ e(
2321
2366
  "input",
@@ -2325,44 +2370,44 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2325
2370
  placeholder: "Search",
2326
2371
  value: b,
2327
2372
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-[var(--control-transition-duration)] focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2328
- onChange: (B) => N(B.target.value),
2373
+ onChange: (B) => w(B.target.value),
2329
2374
  onKeyDown: (B) => {
2330
2375
  B.key === "Enter" && E != null && (B.preventDefault(), ze(E));
2331
2376
  }
2332
2377
  }
2333
2378
  ),
2334
- /* @__PURE__ */ e(Fe, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2379
+ /* @__PURE__ */ e(Be, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2335
2380
  ] }),
2336
2381
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2337
- !O && !Oe && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(nt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2338
- O && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Se, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2339
- !O && y.map((B, A) => {
2340
- if (!H(B))
2382
+ !O && !Te && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(rt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2383
+ O && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Oe, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2384
+ !O && k.map((B, A) => {
2385
+ if (!$(B))
2341
2386
  return B.kind === "header" ? /* @__PURE__ */ e(
2342
- He,
2387
+ je,
2343
2388
  {
2344
- ref: (pe) => {
2345
- $.current[A] = pe;
2389
+ ref: (ge) => {
2390
+ H.current[A] = ge;
2346
2391
  },
2347
2392
  children: B.label
2348
2393
  },
2349
2394
  `header-${A}`
2350
2395
  ) : /* @__PURE__ */ e(
2351
- $e,
2396
+ Xe,
2352
2397
  {
2353
- ref: (pe) => {
2354
- $.current[A] = pe;
2398
+ ref: (ge) => {
2399
+ H.current[A] = ge;
2355
2400
  }
2356
2401
  },
2357
2402
  `divider-${A}`
2358
2403
  );
2359
2404
  const ie = J(B.value, c);
2360
2405
  return /* @__PURE__ */ e(
2361
- We,
2406
+ _e,
2362
2407
  {
2363
2408
  ...re({
2364
- ref(pe) {
2365
- $.current[A] = pe;
2409
+ ref(ge) {
2410
+ H.current[A] = ge;
2366
2411
  }
2367
2412
  }),
2368
2413
  onClick: () => ze(A),
@@ -2378,11 +2423,11 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2378
2423
  ] }) })
2379
2424
  ] }),
2380
2425
  /* @__PURE__ */ e(V, { children: a }),
2381
- /* @__PURE__ */ e(K, { children: w })
2426
+ /* @__PURE__ */ e(K, { children: x })
2382
2427
  ]
2383
2428
  }
2384
2429
  ) });
2385
- }, Mr = {
2430
+ }, Kr = {
2386
2431
  red: "bg-red-100 text-red-700 ring-red-200 dark:bg-red-950 dark:text-red-300 dark:ring-red-800",
2387
2432
  orange: "bg-orange-100 text-orange-700 ring-orange-200 dark:bg-orange-950 dark:text-orange-300 dark:ring-orange-800",
2388
2433
  amber: "bg-amber-100 text-amber-700 ring-amber-200 dark:bg-amber-950 dark:text-amber-300 dark:ring-amber-800",
@@ -2407,7 +2452,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2407
2452
  stone: "bg-stone-100 text-stone-700 ring-stone-200 dark:bg-stone-950 dark:text-stone-300 dark:ring-stone-800",
2408
2453
  white: "bg-[var(--color-badge-white-bg)] text-[var(--color-badge-white-text)] ring-[var(--color-badge-white-ring)]",
2409
2454
  black: "bg-[var(--color-badge-black-bg)] text-[var(--color-badge-black-text)] ring-[var(--color-badge-black-ring)]"
2410
- }, Ee = k.forwardRef((n, t) => {
2455
+ }, Ee = C.forwardRef((t, n) => {
2411
2456
  const {
2412
2457
  className: l,
2413
2458
  children: a,
@@ -2415,15 +2460,15 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2415
2460
  showCloseIcon: o,
2416
2461
  Icon: i,
2417
2462
  color: s = "gray"
2418
- } = n, c = h(
2463
+ } = t, c = u(
2419
2464
  "inline-flex align-top items-center gap-2 px-3 h-7 rounded-[var(--border-radius-badge)] font-[number:var(--font-weight-badge)] font-[family-name:var(--font-family-base)]",
2420
- Mr[s],
2465
+ Kr[s],
2421
2466
  l
2422
2467
  );
2423
- return r ? /* @__PURE__ */ e("div", { ref: t, children: /* @__PURE__ */ d(
2468
+ return r ? /* @__PURE__ */ e("div", { ref: n, children: /* @__PURE__ */ d(
2424
2469
  "button",
2425
2470
  {
2426
- className: h("cursor-pointer ring-0 hover:ring-[length:var(--control-ring-width)] active:ring-[length:var(--control-ring-width-active)] transition-all duration-[var(--control-transition-duration-fast)] select-none focus:outline-none focus:ring-[length:var(--control-ring-width)]", c),
2471
+ className: u("cursor-pointer ring-0 hover:ring-[length:var(--control-ring-width)] active:ring-[length:var(--control-ring-width-active)] transition-all duration-[var(--control-transition-duration-fast)] select-none focus:outline-none focus:ring-[length:var(--control-ring-width)]", c),
2427
2472
  onClick: r,
2428
2473
  children: [
2429
2474
  i && /* @__PURE__ */ e(i, { className: "h-4 w-4 shrink-0" }),
@@ -2436,65 +2481,65 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2436
2481
  )
2437
2482
  ]
2438
2483
  }
2439
- ) }) : /* @__PURE__ */ d("div", { className: c, ref: t, children: [
2484
+ ) }) : /* @__PURE__ */ d("div", { className: c, ref: n, children: [
2440
2485
  i && /* @__PURE__ */ e(i, { className: "h-4 w-4 shrink-0" }),
2441
2486
  /* @__PURE__ */ e("div", { className: "break-all line-clamp-1 text-left", children: a })
2442
2487
  ] });
2443
2488
  });
2444
- function Br(n) {
2489
+ function Gr(t) {
2445
2490
  const {
2446
- enabled: t,
2491
+ enabled: n,
2447
2492
  triggerRef: l,
2448
2493
  measureRef: a,
2449
2494
  trayRef: r,
2450
2495
  itemCount: o,
2451
2496
  deps: i = [],
2452
2497
  gap: s = 4
2453
- } = n, [c, g] = W(0);
2454
- return St(() => {
2455
- if (!t) return;
2456
- const R = l.current, w = a.current;
2457
- if (!R || !w) return;
2458
- const m = () => {
2498
+ } = t, [c, p] = U(0);
2499
+ return Ot(() => {
2500
+ if (!n) return;
2501
+ const y = l.current, x = a.current;
2502
+ if (!y || !x) return;
2503
+ const f = () => {
2459
2504
  if (o === 0) {
2460
- g(0);
2505
+ p(0);
2461
2506
  return;
2462
2507
  }
2463
2508
  if (o === 1) {
2464
- g(1);
2509
+ p(1);
2465
2510
  return;
2466
2511
  }
2467
- const f = window.getComputedStyle(R), p = parseFloat(f.paddingLeft || "0"), u = R.getBoundingClientRect(), I = u.left + p;
2468
- let b = u.right - parseFloat(f.paddingRight || "0");
2469
- const N = r?.current;
2470
- if (N) {
2471
- const x = N.getBoundingClientRect();
2472
- x.width > 0 && (b = Math.min(b, x.left - s));
2512
+ const m = window.getComputedStyle(y), g = parseFloat(m.paddingLeft || "0"), h = y.getBoundingClientRect(), R = h.left + g;
2513
+ let b = h.right - parseFloat(m.paddingRight || "0");
2514
+ const w = r?.current;
2515
+ if (w) {
2516
+ const N = w.getBoundingClientRect();
2517
+ N.width > 0 && (b = Math.min(b, N.left - s));
2473
2518
  }
2474
- const y = Math.max(0, b - I), S = Array.from(w.children);
2519
+ const k = Math.max(0, b - R), S = Array.from(x.children);
2475
2520
  if (S.length < o + 1) return;
2476
2521
  let z = 0;
2477
- for (let x = 0; x < o; x++)
2478
- z += S[x].offsetWidth + (x > 0 ? s : 0);
2479
- if (z <= y) {
2480
- g(o);
2522
+ for (let N = 0; N < o; N++)
2523
+ z += S[N].offsetWidth + (N > 0 ? s : 0);
2524
+ if (z <= k) {
2525
+ p(o);
2481
2526
  return;
2482
2527
  }
2483
2528
  const L = S[o].offsetWidth;
2484
2529
  let P = 0, O = 0;
2485
- for (let x = 0; x < o; x++) {
2486
- const C = S[x].offsetWidth, T = P + C + (x > 0 ? s : 0);
2487
- if (T + L + s > y) break;
2530
+ for (let N = 0; N < o; N++) {
2531
+ const I = S[N].offsetWidth, T = P + I + (N > 0 ? s : 0);
2532
+ if (T + L + s > k) break;
2488
2533
  P = T, O++;
2489
2534
  }
2490
- g(Math.max(1, O));
2491
- }, v = new ResizeObserver(m);
2492
- return v.observe(R), r?.current && v.observe(r.current), m(), () => v.disconnect();
2493
- }, [t, o, ...i]), c;
2535
+ p(Math.max(1, O));
2536
+ }, v = new ResizeObserver(f);
2537
+ return v.observe(y), r?.current && v.observe(r.current), f(), () => v.disconnect();
2538
+ }, [n, o, ...i]), c;
2494
2539
  }
2495
- const Lo = (n) => {
2540
+ const jo = (t) => {
2496
2541
  const {
2497
- className: t,
2542
+ className: n,
2498
2543
  label: l,
2499
2544
  description: a,
2500
2545
  options: r,
@@ -2502,73 +2547,73 @@ const Lo = (n) => {
2502
2547
  onSearch: i,
2503
2548
  value: s,
2504
2549
  placeholder: c,
2505
- maxHeight: g = 300,
2506
- error: R,
2507
- size: w = "md",
2508
- singleLine: m = !1,
2550
+ maxHeight: p = 300,
2551
+ error: y,
2552
+ size: x = "md",
2553
+ singleLine: f = !1,
2509
2554
  color: v = "blue",
2510
- disabled: f = !1,
2511
- clearable: p = !1
2512
- } = n, [u, I] = W(!1), [b, N] = W(r), [y, S] = W(""), [z, L] = W(null), P = k.useRef(null), O = k.useRef(null), x = k.useRef([]), C = k.useRef(null), T = k.useRef(null), E = se(
2513
- () => s.map((D) => r.find((M) => H(M) && J(M.value, D))).filter((D) => D !== void 0),
2555
+ disabled: m = !1,
2556
+ clearable: g = !1
2557
+ } = t, [h, R] = U(!1), [b, w] = U(r), [k, S] = U(""), [z, L] = U(null), P = C.useRef(null), O = C.useRef(null), N = C.useRef([]), I = C.useRef(null), T = C.useRef(null), E = se(
2558
+ () => s.map((D) => r.find((M) => $(M) && J(M.value, D))).filter((D) => D !== void 0),
2514
2559
  [s, r]
2515
2560
  ), _ = (D) => {
2516
2561
  if (D === "") return r;
2517
2562
  const M = D.toLowerCase();
2518
- return r.filter((Ie) => H(Ie) && typeof Ie.label == "string" ? Ie.label.toLowerCase().includes(M) : !0);
2519
- }, $ = se(
2520
- () => y !== "" ? b : r,
2521
- [y, b, r]
2563
+ return r.filter((Se) => $(Se) && typeof Se.label == "string" ? Se.label.toLowerCase().includes(M) : !0);
2564
+ }, H = se(
2565
+ () => k !== "" ? b : r,
2566
+ [k, b, r]
2522
2567
  ), ae = se(
2523
- () => $.map((D, M) => !H(D) || D.disabled ? M : -1).filter((D) => D !== -1),
2524
- [$]
2568
+ () => H.map((D, M) => !$(D) || D.disabled ? M : -1).filter((D) => D !== -1),
2569
+ [H]
2525
2570
  );
2526
- xe(u, () => I(!1)), j(() => {
2527
- N((i ?? _)(y));
2528
- }, [y, r, i]), j(() => {
2529
- if (u) {
2571
+ we(h, () => R(!1)), j(() => {
2572
+ w((i ?? _)(k));
2573
+ }, [k, r, i]), j(() => {
2574
+ if (h) {
2530
2575
  setTimeout(() => O.current?.focus(), 100);
2531
- const D = r.findIndex((M) => H(M) && !M.disabled);
2576
+ const D = r.findIndex((M) => $(M) && !M.disabled);
2532
2577
  L(D >= 0 ? D : null);
2533
2578
  } else
2534
2579
  L(null), S("");
2535
- }, [u]), j(() => {
2536
- if (!u) return;
2537
- const D = $.findIndex((M) => H(M) && !M.disabled);
2580
+ }, [h]), j(() => {
2581
+ if (!h) return;
2582
+ const D = H.findIndex((M) => $(M) && !M.disabled);
2538
2583
  L(D >= 0 ? D : null);
2539
- }, [y, u, $]);
2540
- const Ne = Br({
2541
- enabled: m,
2584
+ }, [k, h, H]);
2585
+ const ye = Gr({
2586
+ enabled: f,
2542
2587
  triggerRef: P,
2543
- measureRef: C,
2588
+ measureRef: I,
2544
2589
  trayRef: T,
2545
2590
  itemCount: E.length,
2546
- deps: [E, R]
2547
- }), { anchorRef: F, Popover: U, getReferenceProps: le, getItemProps: re } = _e({
2591
+ deps: [E, y]
2592
+ }), { anchorRef: F, Popover: W, getReferenceProps: le, getItemProps: re } = Ve({
2548
2593
  placement: "bottom",
2549
2594
  fullWidth: !0,
2550
2595
  minWidth: 200,
2551
- open: u,
2552
- onOpenChange: I,
2553
- listRef: x,
2596
+ open: h,
2597
+ onOpenChange: R,
2598
+ listRef: N,
2554
2599
  activeIndex: z,
2555
2600
  onNavigate: L,
2556
2601
  disabledIndices: ae
2557
2602
  }), ze = (D) => {
2558
2603
  s.some((M) => J(M, D)) ? o(s.filter((M) => !J(M, D))) : o([...s, D]);
2559
- }, Oe = (D) => {
2560
- const M = $[D];
2561
- M && H(M) && !M.disabled && ze(M.value);
2562
- }, B = $.some((D) => H(D)), A = s.length > 0, ie = m ? Ne : E.length, pe = E.slice(0, ie), ft = E.length - ie;
2563
- return /* @__PURE__ */ e(q.Provider, { value: w, children: /* @__PURE__ */ d(
2604
+ }, Te = (D) => {
2605
+ const M = H[D];
2606
+ M && $(M) && !M.disabled && ze(M.value);
2607
+ }, B = H.some((D) => $(D)), A = s.length > 0, ie = f ? ye : E.length, ge = E.slice(0, ie), mt = E.length - ie;
2608
+ return /* @__PURE__ */ e(q.Provider, { value: x, children: /* @__PURE__ */ d(
2564
2609
  "div",
2565
2610
  {
2566
- className: h(
2611
+ className: u(
2567
2612
  "flex flex-col",
2568
- t
2613
+ n
2569
2614
  ),
2570
2615
  children: [
2571
- /* @__PURE__ */ e(Z, { children: l }),
2616
+ /* @__PURE__ */ e(ee, { children: l }),
2572
2617
  /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: F, children: [
2573
2618
  /* @__PURE__ */ d(
2574
2619
  "div",
@@ -2576,51 +2621,51 @@ const Lo = (n) => {
2576
2621
  ...le({
2577
2622
  ref: P,
2578
2623
  role: "button",
2579
- tabIndex: f ? -1 : 0,
2580
- "aria-disabled": f,
2624
+ tabIndex: m ? -1 : 0,
2625
+ "aria-disabled": m,
2581
2626
  onClick: () => {
2582
- f || I(!u);
2627
+ m || R(!h);
2583
2628
  },
2584
2629
  onKeyDown: (D) => {
2585
- f || (D.key === " " ? (D.preventDefault(), I((M) => !M)) : D.key === "Enter" && !u ? (D.preventDefault(), I(!0)) : D.key === "Backspace" && !u && A && (D.preventDefault(), o(s.slice(0, -1))));
2630
+ m || (D.key === " " ? (D.preventDefault(), R((M) => !M)) : D.key === "Enter" && !h ? (D.preventDefault(), R(!0)) : D.key === "Backspace" && !h && A && (D.preventDefault(), o(s.slice(0, -1))));
2586
2631
  }
2587
2632
  }),
2588
- className: h(
2633
+ className: u(
2589
2634
  "flex flex-row items-center gap-1 border-[length:var(--border-width-input)] select-trigger transition-all duration-[var(--control-transition-duration)] rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] ring-0 focus:ring-[length:var(--control-ring-width)] focus:outline-none select-none font-[number:var(--font-weight-input-text)] font-[family-name:var(--font-family-base)]",
2590
- m && h("flex-nowrap overflow-hidden", Q[w]),
2591
- !m && h("flex-wrap py-1.5", Bt[w]),
2592
- G[w],
2593
- he[w],
2594
- p && A ? Be[w] : fe[w],
2595
- f ? "select-trigger-disabled" : R && "select-trigger-error",
2596
- !f && u && "ring-[length:var(--control-ring-width)]"
2635
+ f && u("flex-nowrap overflow-hidden", Z[x]),
2636
+ !f && u("flex-wrap py-1.5", Wt[x]),
2637
+ G[x],
2638
+ he[x],
2639
+ g && A ? Ue[x] : fe[x],
2640
+ m ? "select-trigger-disabled" : y && "select-trigger-error",
2641
+ !m && h && "ring-[length:var(--control-ring-width)]"
2597
2642
  ),
2598
2643
  children: [
2599
- A && pe.map((D, M) => /* @__PURE__ */ e(
2644
+ A && ge.map((D, M) => /* @__PURE__ */ e(
2600
2645
  Ee,
2601
2646
  {
2602
2647
  color: v,
2603
- className: h(
2604
- m && ie > 1 && "shrink-0",
2605
- (!m || ie === 1) && "max-w-full min-w-0"
2648
+ className: u(
2649
+ f && ie > 1 && "shrink-0",
2650
+ (!f || ie === 1) && "max-w-full min-w-0"
2606
2651
  ),
2607
2652
  children: D.label
2608
2653
  },
2609
2654
  `badge-${M}`
2610
2655
  )),
2611
- A && ft > 0 && /* @__PURE__ */ d("span", { className: "shrink-0 text-sm font-[number:var(--font-weight-input-option-label)] select-placeholder px-1", children: [
2656
+ A && mt > 0 && /* @__PURE__ */ d("span", { className: "shrink-0 text-sm font-[number:var(--font-weight-input-option-label)] select-placeholder px-1", children: [
2612
2657
  "+",
2613
- ft,
2658
+ mt,
2614
2659
  " more"
2615
2660
  ] }),
2616
2661
  !A && c && /* @__PURE__ */ e("span", { className: "select-placeholder", children: c })
2617
2662
  ]
2618
2663
  }
2619
2664
  ),
2620
- m && /* @__PURE__ */ d(
2665
+ f && /* @__PURE__ */ d(
2621
2666
  "div",
2622
2667
  {
2623
- ref: C,
2668
+ ref: I,
2624
2669
  "aria-hidden": !0,
2625
2670
  className: "absolute top-0 left-0 invisible pointer-events-none flex flex-row flex-nowrap items-center gap-1 w-max",
2626
2671
  children: [
@@ -2634,11 +2679,11 @@ const Lo = (n) => {
2634
2679
  }
2635
2680
  ),
2636
2681
  /* @__PURE__ */ d(me, { ref: T, children: [
2637
- !f && R && /* @__PURE__ */ e(oe, {}),
2638
- p && A && !f && /* @__PURE__ */ e(te, { Icon: de, onClick: () => o([]) }),
2639
- /* @__PURE__ */ e(te, { Icon: ve })
2682
+ !m && y && /* @__PURE__ */ e(oe, {}),
2683
+ g && A && !m && /* @__PURE__ */ e(ne, { Icon: de, onClick: () => o([]) }),
2684
+ /* @__PURE__ */ e(ne, { Icon: xe })
2640
2685
  ] }),
2641
- /* @__PURE__ */ e(U, { open: u, children: /* @__PURE__ */ d(be, { className: "gap-0 !p-0", style: { maxHeight: g }, children: [
2686
+ /* @__PURE__ */ e(W, { open: h, children: /* @__PURE__ */ d(pe, { className: "gap-0 !p-0", style: { maxHeight: p }, children: [
2642
2687
  /* @__PURE__ */ d("div", { className: "sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm", children: [
2643
2688
  /* @__PURE__ */ e(
2644
2689
  "input",
@@ -2646,49 +2691,49 @@ const Lo = (n) => {
2646
2691
  ref: O,
2647
2692
  type: "text",
2648
2693
  placeholder: "Search",
2649
- value: y,
2694
+ value: k,
2650
2695
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-[var(--control-transition-duration)] focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2651
2696
  onChange: (D) => S(D.target.value),
2652
2697
  onKeyDown: (D) => {
2653
- D.key === "Enter" && z != null ? (D.preventDefault(), Oe(z)) : D.key === "Backspace" && y === "" && A && (D.preventDefault(), o(s.slice(0, -1)));
2698
+ D.key === "Enter" && z != null ? (D.preventDefault(), Te(z)) : D.key === "Backspace" && k === "" && A && (D.preventDefault(), o(s.slice(0, -1)));
2654
2699
  }
2655
2700
  }
2656
2701
  ),
2657
- /* @__PURE__ */ e(Fe, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2702
+ /* @__PURE__ */ e(Be, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2658
2703
  ] }),
2659
2704
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2660
- y !== "" && !B && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(nt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2661
- $.map((D, M) => {
2662
- if (!H(D))
2705
+ k !== "" && !B && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(rt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2706
+ H.map((D, M) => {
2707
+ if (!$(D))
2663
2708
  return D.kind === "header" ? /* @__PURE__ */ e(
2664
- He,
2709
+ je,
2665
2710
  {
2666
- ref: (ge) => {
2667
- x.current[M] = ge;
2711
+ ref: (ve) => {
2712
+ N.current[M] = ve;
2668
2713
  },
2669
2714
  children: D.label
2670
2715
  },
2671
2716
  `header-${M}`
2672
2717
  ) : /* @__PURE__ */ e(
2673
- $e,
2718
+ Xe,
2674
2719
  {
2675
- ref: (ge) => {
2676
- x.current[M] = ge;
2720
+ ref: (ve) => {
2721
+ N.current[M] = ve;
2677
2722
  }
2678
2723
  },
2679
2724
  `divider-${M}`
2680
2725
  );
2681
- const Ie = s.some((ge) => J(ge, D.value));
2726
+ const Se = s.some((ve) => J(ve, D.value));
2682
2727
  return /* @__PURE__ */ e(
2683
- We,
2728
+ _e,
2684
2729
  {
2685
2730
  ...re({
2686
- ref(ge) {
2687
- x.current[M] = ge;
2731
+ ref(ve) {
2732
+ N.current[M] = ve;
2688
2733
  }
2689
2734
  }),
2690
- onClick: () => Oe(M),
2691
- selected: Ie,
2735
+ onClick: () => Te(M),
2736
+ selected: Se,
2692
2737
  active: z === M,
2693
2738
  disabled: D.disabled,
2694
2739
  children: D.label
@@ -2700,21 +2745,21 @@ const Lo = (n) => {
2700
2745
  ] }) })
2701
2746
  ] }),
2702
2747
  /* @__PURE__ */ e(V, { children: a }),
2703
- /* @__PURE__ */ e(K, { children: R })
2748
+ /* @__PURE__ */ e(K, { children: y })
2704
2749
  ]
2705
2750
  }
2706
2751
  ) });
2707
- }, Eo = k.forwardRef((n, t) => {
2752
+ }, Xo = C.forwardRef((t, n) => {
2708
2753
  const {
2709
2754
  className: l,
2710
2755
  children: a,
2711
2756
  ...r
2712
- } = n;
2757
+ } = t;
2713
2758
  return /* @__PURE__ */ e(
2714
2759
  "div",
2715
2760
  {
2716
- ref: t,
2717
- className: h(
2761
+ ref: n,
2762
+ className: u(
2718
2763
  "flex flex-col gap-6 border-[length:var(--border-width-input)] panel-base rounded-[var(--border-radius-panel)] shadow-[var(--shadow-control)] px-6 py-6",
2719
2764
  l
2720
2765
  ),
@@ -2722,17 +2767,17 @@ const Lo = (n) => {
2722
2767
  children: a
2723
2768
  }
2724
2769
  );
2725
- }), Fo = k.forwardRef((n, t) => {
2770
+ }), Vo = C.forwardRef((t, n) => {
2726
2771
  const {
2727
2772
  className: l,
2728
2773
  children: a,
2729
2774
  ...r
2730
- } = n;
2775
+ } = t;
2731
2776
  return /* @__PURE__ */ e(
2732
2777
  "div",
2733
2778
  {
2734
- ref: t,
2735
- className: h(
2779
+ ref: n,
2780
+ className: u(
2736
2781
  "flex flex-col gap-1 border-[length:var(--border-width-input)] panel-base rounded-[var(--border-radius-panel)] shadow-[var(--shadow-control)] p-2",
2737
2782
  l
2738
2783
  ),
@@ -2740,76 +2785,76 @@ const Lo = (n) => {
2740
2785
  children: a
2741
2786
  }
2742
2787
  );
2743
- }), Ct = "input-description text-[length:var(--font-size-description)] font-[number:var(--font-weight-panel-field)]", Mo = (n) => {
2788
+ }), Rt = "input-description text-[length:var(--font-size-description)] font-[number:var(--font-weight-panel-field)]", Ko = (t) => {
2744
2789
  const {
2745
- className: t,
2790
+ className: n,
2746
2791
  label: l,
2747
2792
  children: a,
2748
2793
  orientation: r = "vertical",
2749
2794
  ...o
2750
- } = n;
2795
+ } = t;
2751
2796
  return r === "horizontal" ? /* @__PURE__ */ d(
2752
2797
  "div",
2753
2798
  {
2754
- className: h(
2799
+ className: u(
2755
2800
  "flex flex-row items-center gap-3 px-3 py-2",
2756
- t
2801
+ n
2757
2802
  ),
2758
2803
  ...o,
2759
2804
  children: [
2760
- /* @__PURE__ */ e("div", { className: h(Ct, "w-1/2 line-clamp-1 break-all"), children: l }),
2805
+ /* @__PURE__ */ e("div", { className: u(Rt, "w-1/2 line-clamp-1 break-all"), children: l }),
2761
2806
  /* @__PURE__ */ e("div", { className: "w-1/2 line-clamp-1 break-all", children: a })
2762
2807
  ]
2763
2808
  }
2764
2809
  ) : /* @__PURE__ */ d(
2765
2810
  "div",
2766
2811
  {
2767
- className: h(
2812
+ className: u(
2768
2813
  "flex flex-col gap-1 px-3 py-2",
2769
- t
2814
+ n
2770
2815
  ),
2771
2816
  ...o,
2772
2817
  children: [
2773
- l && /* @__PURE__ */ e("div", { className: Ct, children: l }),
2818
+ l && /* @__PURE__ */ e("div", { className: Rt, children: l }),
2774
2819
  /* @__PURE__ */ e("div", { children: a })
2775
2820
  ]
2776
2821
  }
2777
2822
  );
2778
- }, Ar = {
2779
- error: et,
2780
- warning: dn,
2781
- success: tt,
2782
- info: cn
2783
- }, Ur = {
2823
+ }, qr = {
2824
+ error: tt,
2825
+ warning: gn,
2826
+ success: nt,
2827
+ info: pn
2828
+ }, Jr = {
2784
2829
  error: "text-[var(--color-status-error)]",
2785
2830
  warning: "text-[var(--color-status-warning)]",
2786
2831
  success: "text-[var(--color-status-success)]",
2787
2832
  info: "text-[var(--color-status-info)]"
2788
- }, It = "inline-flex flex-row gap-3 items-center justify-between h-10 px-3 font-[number:var(--font-weight-panel-link)] font-[family-name:var(--font-family-base)] ring-0 dropdown-item rounded-[var(--border-radius-menu-item)] cursor-pointer transition-all duration-[var(--control-transition-duration)] select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", Bo = (n) => {
2833
+ }, St = "inline-flex flex-row gap-3 items-center justify-between h-10 px-3 font-[number:var(--font-weight-panel-link)] font-[family-name:var(--font-family-base)] ring-0 dropdown-item rounded-[var(--border-radius-menu-item)] cursor-pointer transition-all duration-[var(--control-transition-duration)] select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", Go = (t) => {
2789
2834
  const {
2790
- className: t,
2835
+ className: n,
2791
2836
  children: l,
2792
2837
  Icon: a,
2793
2838
  status: r,
2794
2839
  ...o
2795
- } = n, i = r ? Ar[r] : null, s = /* @__PURE__ */ d(ne, { children: [
2840
+ } = t, i = r ? qr[r] : null, s = /* @__PURE__ */ d(Q, { children: [
2796
2841
  /* @__PURE__ */ d("span", { className: "inline-flex flex-row items-center gap-3 min-w-0", children: [
2797
2842
  a && /* @__PURE__ */ e(a, { className: "h-5 w-5 shrink-0" }),
2798
2843
  /* @__PURE__ */ e("span", { className: "truncate", children: l })
2799
2844
  ] }),
2800
2845
  /* @__PURE__ */ d("span", { className: "inline-flex flex-row items-center gap-2 shrink-0", children: [
2801
- i && r && /* @__PURE__ */ e(i, { className: h("h-5 w-5", Ur[r]) }),
2802
- /* @__PURE__ */ e(un, { className: "h-5 w-5 text-[var(--color-input-icon-button-icon)]" })
2846
+ i && r && /* @__PURE__ */ e(i, { className: u("h-5 w-5", Jr[r]) }),
2847
+ /* @__PURE__ */ e(ot, { className: "h-5 w-5 text-[var(--color-input-icon-button-icon)]" })
2803
2848
  ] })
2804
2849
  ] });
2805
2850
  if (o.href !== void 0) {
2806
- const { href: c, ...g } = o;
2851
+ const { href: c, ...p } = o;
2807
2852
  return /* @__PURE__ */ e(
2808
2853
  "a",
2809
2854
  {
2810
2855
  href: c,
2811
- className: h(It, t),
2812
- ...g,
2856
+ className: u(St, n),
2857
+ ...p,
2813
2858
  children: s
2814
2859
  }
2815
2860
  );
@@ -2817,36 +2862,36 @@ const Lo = (n) => {
2817
2862
  return /* @__PURE__ */ e(
2818
2863
  "button",
2819
2864
  {
2820
- className: h(It, t),
2865
+ className: u(St, n),
2821
2866
  ...o,
2822
2867
  children: s
2823
2868
  }
2824
2869
  );
2825
- }, Ao = (n) => {
2870
+ }, qo = (t) => {
2826
2871
  const {
2827
- className: t,
2872
+ className: n,
2828
2873
  vertical: l = !1,
2829
2874
  ...a
2830
- } = n;
2875
+ } = t;
2831
2876
  return /* @__PURE__ */ e(
2832
2877
  "div",
2833
2878
  {
2834
- className: h(
2879
+ className: u(
2835
2880
  l ? "w-px h-full bg-[var(--color-divider)]" : "w-full h-px bg-[var(--color-divider)]",
2836
- t
2881
+ n
2837
2882
  ),
2838
2883
  ...a
2839
2884
  }
2840
2885
  );
2841
- }, Uo = (n) => {
2886
+ }, Jo = (t) => {
2842
2887
  const {
2843
- children: t,
2888
+ children: n,
2844
2889
  content: l,
2845
2890
  className: a,
2846
2891
  placement: r = "top",
2847
2892
  minWidth: o = 100,
2848
2893
  maxWidth: i = 200
2849
- } = n, [s, c] = W(!1), { anchorRef: g, Popover: R } = ut({
2894
+ } = t, [s, c] = U(!1), { anchorRef: p, Popover: y } = We({
2850
2895
  placement: r,
2851
2896
  minWidth: o,
2852
2897
  maxWidth: i
@@ -2854,19 +2899,19 @@ const Lo = (n) => {
2854
2899
  return /* @__PURE__ */ d(
2855
2900
  "span",
2856
2901
  {
2857
- ref: g,
2902
+ ref: p,
2858
2903
  className: a,
2859
2904
  onMouseEnter: () => c(!0),
2860
2905
  onMouseLeave: () => c(!1),
2861
2906
  children: [
2862
- t,
2863
- /* @__PURE__ */ e(R, { open: s, children: /* @__PURE__ */ e(be, { children: l }) })
2907
+ n,
2908
+ /* @__PURE__ */ e(y, { open: s, children: /* @__PURE__ */ e(pe, { children: l }) })
2864
2909
  ]
2865
2910
  }
2866
2911
  );
2867
- }, Wo = (n) => {
2912
+ }, Yo = (t) => {
2868
2913
  const {
2869
- open: t,
2914
+ open: n,
2870
2915
  onDismiss: l,
2871
2916
  enableDismissOnOutsideClick: a,
2872
2917
  enableDismissOnEscKey: r,
@@ -2874,9 +2919,9 @@ const Lo = (n) => {
2874
2919
  className: i,
2875
2920
  children: s,
2876
2921
  maxWidth: c = 600
2877
- } = n;
2878
- return xe(!!r && t, l || (() => {
2879
- })), /* @__PURE__ */ e(De, { children: t && /* @__PURE__ */ d(Me, { children: [
2922
+ } = t;
2923
+ return we(!!r && n, l || (() => {
2924
+ })), /* @__PURE__ */ e(Re, { children: n && /* @__PURE__ */ d(Ae, { children: [
2880
2925
  /* @__PURE__ */ e(
2881
2926
  Y.div,
2882
2927
  {
@@ -2887,7 +2932,7 @@ const Lo = (n) => {
2887
2932
  exit: { opacity: 0 },
2888
2933
  transition: { duration: 0.15, ease: "easeInOut" },
2889
2934
  children: /* @__PURE__ */ e(
2890
- Tt,
2935
+ Et,
2891
2936
  {
2892
2937
  className: "modal-overlay backdrop-blur-[1px]",
2893
2938
  onClick: a ? l : void 0,
@@ -2899,7 +2944,7 @@ const Lo = (n) => {
2899
2944
  /* @__PURE__ */ e("div", { className: "fixed inset-0 flex flex-col items-center pointer-events-none p-4 lg:p-12 overflow-y-auto z-50", children: /* @__PURE__ */ d(
2900
2945
  Y.div,
2901
2946
  {
2902
- className: h(
2947
+ className: u(
2903
2948
  "flex flex-col modal-content rounded-[var(--border-radius-panel)] shadow-[var(--shadow-overlay)] p-6 lg:p-12 pointer-events-auto w-full relative",
2904
2949
  i
2905
2950
  ),
@@ -2910,7 +2955,7 @@ const Lo = (n) => {
2910
2955
  transition: { duration: 0.15, ease: "easeInOut" },
2911
2956
  children: [
2912
2957
  o && /* @__PURE__ */ e(
2913
- Ht,
2958
+ jt,
2914
2959
  {
2915
2960
  Icon: de,
2916
2961
  className: "absolute top-4 right-4",
@@ -2924,9 +2969,9 @@ const Lo = (n) => {
2924
2969
  }
2925
2970
  ) })
2926
2971
  ] }) });
2927
- }, Ho = (n) => {
2972
+ }, Qo = (t) => {
2928
2973
  const {
2929
- open: t,
2974
+ open: n,
2930
2975
  onDismiss: l,
2931
2976
  enableDismissOnOutsideClick: a,
2932
2977
  enableDismissOnEscKey: r,
@@ -2934,9 +2979,9 @@ const Lo = (n) => {
2934
2979
  className: i,
2935
2980
  children: s,
2936
2981
  maxWidth: c = 480
2937
- } = n;
2938
- return xe(!!r && t, l || (() => {
2939
- })), /* @__PURE__ */ e(De, { children: t && /* @__PURE__ */ d(Me, { children: [
2982
+ } = t;
2983
+ return we(!!r && n, l || (() => {
2984
+ })), /* @__PURE__ */ e(Re, { children: n && /* @__PURE__ */ d(Ae, { children: [
2940
2985
  /* @__PURE__ */ e(
2941
2986
  Y.div,
2942
2987
  {
@@ -2947,7 +2992,7 @@ const Lo = (n) => {
2947
2992
  exit: { opacity: 0 },
2948
2993
  transition: { duration: 0.15, ease: "easeInOut" },
2949
2994
  children: /* @__PURE__ */ e(
2950
- Tt,
2995
+ Et,
2951
2996
  {
2952
2997
  className: "modal-overlay backdrop-blur-[1px]",
2953
2998
  onClick: a ? l : void 0,
@@ -2959,7 +3004,7 @@ const Lo = (n) => {
2959
3004
  /* @__PURE__ */ e("div", { className: "fixed inset-0 flex flex-row justify-end pointer-events-none z-50", children: /* @__PURE__ */ d(
2960
3005
  Y.div,
2961
3006
  {
2962
- className: h(
3007
+ className: u(
2963
3008
  "flex flex-col modal-content shadow-[var(--shadow-overlay)] p-6 lg:p-12 pointer-events-auto h-full w-full overflow-y-auto relative",
2964
3009
  i
2965
3010
  ),
@@ -2970,7 +3015,7 @@ const Lo = (n) => {
2970
3015
  transition: { duration: 0.25, ease: [0.32, 0.72, 0, 1] },
2971
3016
  children: [
2972
3017
  o && /* @__PURE__ */ e(
2973
- Ht,
3018
+ jt,
2974
3019
  {
2975
3020
  Icon: de,
2976
3021
  className: "absolute top-4 right-4",
@@ -2984,27 +3029,27 @@ const Lo = (n) => {
2984
3029
  }
2985
3030
  ) })
2986
3031
  ] }) });
2987
- }, Wr = (n) => {
3032
+ }, Yr = (t) => {
2988
3033
  const {
2989
- className: t,
3034
+ className: n,
2990
3035
  tabs: l,
2991
3036
  size: a = "md"
2992
- } = n;
2993
- return /* @__PURE__ */ e(q.Provider, { value: a, children: /* @__PURE__ */ e("div", { className: h(
3037
+ } = t;
3038
+ return /* @__PURE__ */ e(q.Provider, { value: a, children: /* @__PURE__ */ e("div", { className: u(
2994
3039
  "tab-container p-1 rounded-[var(--border-radius-tab)] inline-flex flex-row space-x-1 overflow-x-auto mat-ui-hide-scrollbars",
2995
- Q[a],
2996
- t
3040
+ Z[a],
3041
+ n
2997
3042
  ), children: l.map((r, o) => {
2998
- const i = h(
3043
+ const i = u(
2999
3044
  "shrink-0 h-full inline-flex flex-row items-center font-[number:var(--font-weight-tab)] font-[family-name:var(--font-family-base)] rounded-[var(--border-radius-tab)] cursor-pointer border border-transparent ring-0 tab-button transition-all duration-[var(--control-transition-duration)] select-none focus:outline-none focus:ring-0",
3000
- ct[a],
3045
+ ut[a],
3001
3046
  G[a],
3002
- st[a],
3047
+ dt[a],
3003
3048
  r.active && "tab-button-active shadow-[var(--shadow-control)]"
3004
- ), s = /* @__PURE__ */ d(ne, { children: [
3005
- r.Icon && /* @__PURE__ */ e(r.Icon, { className: h(ee[a], "shrink-0 -ml-1") }),
3049
+ ), s = /* @__PURE__ */ d(Q, { children: [
3050
+ r.Icon && /* @__PURE__ */ e(r.Icon, { className: u(te[a], "shrink-0 -ml-1") }),
3006
3051
  r.label,
3007
- r.count != null && /* @__PURE__ */ e("span", { className: h(
3052
+ r.count != null && /* @__PURE__ */ e("span", { className: u(
3008
3053
  "shrink-0 inline-flex items-center justify-center h-5 min-w-5 px-1.5 rounded-full font-[number:var(--font-weight-tab-count)] font-[family-name:var(--font-family-base)] text-[length:var(--font-size-tab-count)]",
3009
3054
  r.active ? "tab-button-count-active" : "tab-button-count"
3010
3055
  ), children: r.count })
@@ -3027,27 +3072,27 @@ const Lo = (n) => {
3027
3072
  o
3028
3073
  );
3029
3074
  }) }) });
3030
- }, $o = (n) => {
3075
+ }, Zo = (t) => {
3031
3076
  const {
3032
- className: t,
3077
+ className: n,
3033
3078
  tabs: l,
3034
3079
  size: a = "md"
3035
- } = n;
3036
- return /* @__PURE__ */ e(q.Provider, { value: a, children: /* @__PURE__ */ e("div", { className: h(
3080
+ } = t;
3081
+ return /* @__PURE__ */ e(q.Provider, { value: a, children: /* @__PURE__ */ e("div", { className: u(
3037
3082
  "tabs-container w-full flex flex-row border-b-[length:var(--border-width-input)] overflow-x-auto mat-ui-hide-scrollbars",
3038
- t
3083
+ n
3039
3084
  ), children: l.map((r, o) => {
3040
- const i = h(
3085
+ const i = u(
3041
3086
  "tabs-tab shrink-0 -mb-[var(--border-width-input)] inline-flex flex-row items-center font-[number:var(--font-weight-tabs)] font-[family-name:var(--font-family-base)] cursor-pointer border-b-[length:var(--border-width-tabs-indicator)] ring-0 transition-colors duration-[var(--control-transition-duration)] select-none focus:outline-none focus:ring-0",
3042
- Q[a],
3043
- ct[a],
3087
+ Z[a],
3088
+ ut[a],
3044
3089
  G[a],
3045
- st[a],
3090
+ dt[a],
3046
3091
  r.active ? "tabs-tab-active" : "border-transparent"
3047
- ), s = /* @__PURE__ */ d(ne, { children: [
3048
- r.Icon && /* @__PURE__ */ e(r.Icon, { className: h(ee[a], "shrink-0") }),
3092
+ ), s = /* @__PURE__ */ d(Q, { children: [
3093
+ r.Icon && /* @__PURE__ */ e(r.Icon, { className: u(te[a], "shrink-0") }),
3049
3094
  r.label,
3050
- r.count != null && /* @__PURE__ */ e("span", { className: h(
3095
+ r.count != null && /* @__PURE__ */ e("span", { className: u(
3051
3096
  "shrink-0 inline-flex items-center justify-center h-5 min-w-5 px-1.5 rounded-full font-[number:var(--font-weight-tab-count)] font-[family-name:var(--font-family-base)] text-[length:var(--font-size-tab-count)]",
3052
3097
  r.active ? "tabs-tab-count-active" : "tabs-tab-count"
3053
3098
  ), children: r.count })
@@ -3070,9 +3115,9 @@ const Lo = (n) => {
3070
3115
  o
3071
3116
  );
3072
3117
  }) }) });
3073
- }, _o = (n) => {
3118
+ }, ea = (t) => {
3074
3119
  const {
3075
- duration: t = 0.3,
3120
+ duration: n = 0.3,
3076
3121
  ease: l = "easeInOut",
3077
3122
  horizontal: a = !1,
3078
3123
  pauseOnScroll: r = !1,
@@ -3080,121 +3125,121 @@ const Lo = (n) => {
3080
3125
  onPinnedChange: i,
3081
3126
  children: s,
3082
3127
  className: c,
3083
- ...g
3084
- } = n, R = k.useRef(null), w = k.useRef(null), m = k.useRef(null), v = k.useRef(!0), f = k.useRef(!1), p = k.useRef(i);
3085
- return p.current = i, k.useEffect(() => {
3086
- const u = R.current, I = w.current;
3087
- if (!u || !I) return;
3128
+ ...p
3129
+ } = t, y = C.useRef(null), x = C.useRef(null), f = C.useRef(null), v = C.useRef(!0), m = C.useRef(!1), g = C.useRef(i);
3130
+ return g.current = i, C.useEffect(() => {
3131
+ const h = y.current, R = x.current;
3132
+ if (!h || !R) return;
3088
3133
  let b = !0;
3089
- const N = () => a ? u.scrollWidth - u.clientWidth : u.scrollHeight - u.clientHeight, y = () => a ? u.scrollLeft : u.scrollTop, S = (C) => {
3090
- a ? u.scrollLeft = C : u.scrollTop = C;
3091
- }, z = (C) => {
3092
- v.current !== C && (v.current = C, p.current?.(C));
3134
+ const w = () => a ? h.scrollWidth - h.clientWidth : h.scrollHeight - h.clientHeight, k = () => a ? h.scrollLeft : h.scrollTop, S = (I) => {
3135
+ a ? h.scrollLeft = I : h.scrollTop = I;
3136
+ }, z = (I) => {
3137
+ v.current !== I && (v.current = I, g.current?.(I));
3093
3138
  }, L = () => {
3094
3139
  if (r && !v.current) return;
3095
- const C = N(), T = y();
3096
- if (!(C <= 0 || Math.abs(C - T) < 1)) {
3140
+ const I = w(), T = k();
3141
+ if (!(I <= 0 || Math.abs(I - T) < 1)) {
3097
3142
  if (b) {
3098
- b = !1, f.current = !0, S(C), requestAnimationFrame(() => {
3099
- f.current = !1;
3143
+ b = !1, m.current = !0, S(I), requestAnimationFrame(() => {
3144
+ m.current = !1;
3100
3145
  });
3101
3146
  return;
3102
3147
  }
3103
- m.current?.stop(), f.current = !0, m.current = qt(T, C, {
3104
- duration: t,
3148
+ f.current?.stop(), m.current = !0, f.current = en(T, I, {
3149
+ duration: n,
3105
3150
  ease: l,
3106
3151
  onUpdate: S,
3107
3152
  onComplete: () => {
3108
3153
  requestAnimationFrame(() => {
3109
- f.current = !1;
3154
+ m.current = !1;
3110
3155
  });
3111
3156
  }
3112
3157
  });
3113
3158
  }
3114
3159
  }, P = new ResizeObserver(L);
3115
- P.observe(I);
3160
+ P.observe(R);
3116
3161
  const O = () => {
3117
- f.current || z(N() - y() <= o);
3118
- }, x = () => {
3119
- m.current?.stop(), f.current = !1;
3162
+ m.current || z(w() - k() <= o);
3163
+ }, N = () => {
3164
+ f.current?.stop(), m.current = !1;
3120
3165
  };
3121
- return r && (u.addEventListener("scroll", O, { passive: !0 }), u.addEventListener("wheel", x, { passive: !0 }), u.addEventListener("touchstart", x, { passive: !0 })), () => {
3122
- P.disconnect(), m.current?.stop(), r && (u.removeEventListener("scroll", O), u.removeEventListener("wheel", x), u.removeEventListener("touchstart", x));
3166
+ return r && (h.addEventListener("scroll", O, { passive: !0 }), h.addEventListener("wheel", N, { passive: !0 }), h.addEventListener("touchstart", N, { passive: !0 })), () => {
3167
+ P.disconnect(), f.current?.stop(), r && (h.removeEventListener("scroll", O), h.removeEventListener("wheel", N), h.removeEventListener("touchstart", N));
3123
3168
  };
3124
- }, [t, l, a, r, o]), /* @__PURE__ */ e(
3169
+ }, [n, l, a, r, o]), /* @__PURE__ */ e(
3125
3170
  "div",
3126
3171
  {
3127
- ref: R,
3128
- className: h(
3172
+ ref: y,
3173
+ className: u(
3129
3174
  "min-h-0 min-w-0",
3130
3175
  a ? "overflow-x-auto" : "overflow-y-auto",
3131
3176
  c
3132
3177
  ),
3133
- ...g,
3134
- children: /* @__PURE__ */ e("div", { ref: w, children: s })
3178
+ ...p,
3179
+ children: /* @__PURE__ */ e("div", { ref: x, children: s })
3135
3180
  }
3136
3181
  );
3137
3182
  };
3138
- function Hr(n) {
3183
+ function Qr(t) {
3139
3184
  const {
3140
- onDelta: t,
3185
+ onDelta: n,
3141
3186
  onDragStart: l,
3142
3187
  onDragEnd: a,
3143
3188
  disabled: r = !1,
3144
3189
  primaryButtonOnly: o = !0,
3145
3190
  preventScrollOnMove: i = !0
3146
- } = n, [s, c] = k.useState(!1), g = k.useRef(!1), R = k.useRef(0), w = k.useRef(0), m = k.useRef(0), v = k.useRef(null), f = k.useRef(null), p = k.useRef({ onDelta: t, onDragStart: l, onDragEnd: a, preventScrollOnMove: i });
3147
- k.useEffect(() => {
3148
- p.current = { onDelta: t, onDragStart: l, onDragEnd: a, preventScrollOnMove: i };
3191
+ } = t, [s, c] = C.useState(!1), p = C.useRef(!1), y = C.useRef(0), x = C.useRef(0), f = C.useRef(0), v = C.useRef(null), m = C.useRef(null), g = C.useRef({ onDelta: n, onDragStart: l, onDragEnd: a, preventScrollOnMove: i });
3192
+ C.useEffect(() => {
3193
+ g.current = { onDelta: n, onDragStart: l, onDragEnd: a, preventScrollOnMove: i };
3149
3194
  });
3150
- const u = k.useRef({}), I = k.useCallback((N) => {
3151
- if (!g.current) return;
3152
- const y = {
3153
- clientX: N ?? w.current,
3154
- startX: R.current,
3155
- totalDeltaX: m.current,
3195
+ const h = C.useRef({}), R = C.useCallback((w) => {
3196
+ if (!p.current) return;
3197
+ const k = {
3198
+ clientX: w ?? x.current,
3199
+ startX: y.current,
3200
+ totalDeltaX: f.current,
3156
3201
  target: v.current
3157
3202
  };
3158
- g.current = !1, c(!1);
3159
- const { move: S, up: z, keydown: L } = u.current;
3160
- S && window.removeEventListener("pointermove", S, !0), z && (window.removeEventListener("pointerup", z, !0), window.removeEventListener("pointercancel", z, !0)), L && window.removeEventListener("keydown", L, !0), u.current = {}, f.current != null && (cancelAnimationFrame(f.current), f.current = null), p.current.onDragEnd?.(y), v.current = null, m.current = 0;
3161
- }, []), b = k.useCallback((N) => {
3162
- if (r || o && N.button !== 0) return;
3163
- N.target.setPointerCapture?.(N.pointerId), R.current = N.clientX, w.current = N.clientX, m.current = 0, v.current = N.target, g.current = !0, c(!0);
3164
- const y = {
3165
- clientX: N.clientX,
3166
- startX: N.clientX,
3203
+ p.current = !1, c(!1);
3204
+ const { move: S, up: z, keydown: L } = h.current;
3205
+ S && window.removeEventListener("pointermove", S, !0), z && (window.removeEventListener("pointerup", z, !0), window.removeEventListener("pointercancel", z, !0)), L && window.removeEventListener("keydown", L, !0), h.current = {}, m.current != null && (cancelAnimationFrame(m.current), m.current = null), g.current.onDragEnd?.(k), v.current = null, f.current = 0;
3206
+ }, []), b = C.useCallback((w) => {
3207
+ if (r || o && w.button !== 0) return;
3208
+ w.target.setPointerCapture?.(w.pointerId), y.current = w.clientX, x.current = w.clientX, f.current = 0, v.current = w.target, p.current = !0, c(!0);
3209
+ const k = {
3210
+ clientX: w.clientX,
3211
+ startX: w.clientX,
3167
3212
  totalDeltaX: 0,
3168
- target: N.target
3213
+ target: w.target
3169
3214
  };
3170
- p.current.onDragStart?.(y);
3215
+ g.current.onDragStart?.(k);
3171
3216
  const S = (P) => {
3172
- g.current && f.current == null && (f.current = requestAnimationFrame(() => {
3173
- f.current = null;
3174
- const O = P.clientX, x = O - w.current;
3175
- if (x === 0) return;
3176
- w.current = O, m.current += x;
3177
- const C = {
3217
+ p.current && m.current == null && (m.current = requestAnimationFrame(() => {
3218
+ m.current = null;
3219
+ const O = P.clientX, N = O - x.current;
3220
+ if (N === 0) return;
3221
+ x.current = O, f.current += N;
3222
+ const I = {
3178
3223
  clientX: O,
3179
- startX: R.current,
3180
- totalDeltaX: m.current,
3224
+ startX: y.current,
3225
+ totalDeltaX: f.current,
3181
3226
  target: v.current
3182
3227
  };
3183
- p.current.preventScrollOnMove && P.preventDefault(), p.current.onDelta(x, C);
3228
+ g.current.preventScrollOnMove && P.preventDefault(), g.current.onDelta(N, I);
3184
3229
  }));
3185
3230
  }, z = (P) => {
3186
- I(P.clientX);
3231
+ R(P.clientX);
3187
3232
  }, L = (P) => {
3188
- P.key === "Escape" && (P.preventDefault(), I());
3233
+ P.key === "Escape" && (P.preventDefault(), R());
3189
3234
  };
3190
- u.current = { move: S, up: z, keydown: L }, window.addEventListener("pointermove", S, {
3235
+ h.current = { move: S, up: z, keydown: L }, window.addEventListener("pointermove", S, {
3191
3236
  passive: !i,
3192
3237
  capture: !0
3193
3238
  }), window.addEventListener("pointerup", z, { capture: !0 }), window.addEventListener("pointercancel", z, { capture: !0 }), window.addEventListener("keydown", L, !0);
3194
- }, [I, r, i, o]);
3195
- return k.useEffect(() => () => {
3196
- g.current && I();
3197
- }, [I]), {
3239
+ }, [R, r, i, o]);
3240
+ return C.useEffect(() => () => {
3241
+ p.current && R();
3242
+ }, [R]), {
3198
3243
  isDragging: s,
3199
3244
  bind: {
3200
3245
  onPointerDown: b,
@@ -3203,16 +3248,16 @@ function Hr(n) {
3203
3248
  }
3204
3249
  };
3205
3250
  }
3206
- const $r = (n) => {
3251
+ const Zr = (t) => {
3207
3252
  const {
3208
- column: t,
3253
+ column: n,
3209
3254
  width: l,
3210
3255
  height: a,
3211
3256
  onResize: r,
3212
3257
  sortDirection: o,
3213
3258
  onSortClick: i
3214
- } = n, s = !!t.sortable, { bind: c } = Hr({
3215
- onDelta: (g) => r(g)
3259
+ } = t, s = !!n.sortable, { bind: c } = Qr({
3260
+ onDelta: (p) => r(p)
3216
3261
  });
3217
3262
  return /* @__PURE__ */ d(
3218
3263
  "div",
@@ -3223,15 +3268,15 @@ const $r = (n) => {
3223
3268
  /* @__PURE__ */ d(
3224
3269
  "div",
3225
3270
  {
3226
- className: h(
3271
+ className: u(
3227
3272
  "flex-1 min-w-0 px-4 table-header-cell transition-colors duration-[var(--control-transition-duration-fast)] flex flex-row items-center gap-2",
3228
3273
  s && "cursor-pointer"
3229
3274
  ),
3230
3275
  onClick: s ? i : void 0,
3231
3276
  children: [
3232
- /* @__PURE__ */ e("span", { className: "truncate", children: t.header }),
3233
- s && o === "asc" && /* @__PURE__ */ e(hn, { className: "h-4 w-4 shrink-0" }),
3234
- s && o === "desc" && /* @__PURE__ */ e(ve, { className: "h-4 w-4 shrink-0" })
3277
+ /* @__PURE__ */ e("span", { className: "truncate", children: n.header }),
3278
+ s && o === "asc" && /* @__PURE__ */ e(vn, { className: "h-4 w-4 shrink-0" }),
3279
+ s && o === "desc" && /* @__PURE__ */ e(xe, { className: "h-4 w-4 shrink-0" })
3235
3280
  ]
3236
3281
  }
3237
3282
  ),
@@ -3251,14 +3296,14 @@ const $r = (n) => {
3251
3296
  ]
3252
3297
  }
3253
3298
  );
3254
- }, ke = 200, _r = 60, jr = (n) => {
3255
- const t = {};
3256
- for (const l of n)
3257
- t[l.id] = l.defaultWidth ?? ke;
3258
- return t;
3259
- }, Xr = (n) => {
3299
+ }, Ce = 200, eo = 60, to = (t) => {
3300
+ const n = {};
3301
+ for (const l of t)
3302
+ n[l.id] = l.defaultWidth ?? Ce;
3303
+ return n;
3304
+ }, no = (t) => {
3260
3305
  const {
3261
- columns: t,
3306
+ columns: n,
3262
3307
  rows: l,
3263
3308
  getRowId: a,
3264
3309
  onRowClick: r,
@@ -3266,24 +3311,24 @@ const $r = (n) => {
3266
3311
  onSortChange: i,
3267
3312
  className: s,
3268
3313
  rowHeight: c = 44,
3269
- headerHeight: g = 44,
3270
- emptyState: R
3271
- } = n, [w, m] = W(() => jr(t));
3314
+ headerHeight: p = 44,
3315
+ emptyState: y
3316
+ } = t, [x, f] = U(() => to(n));
3272
3317
  j(() => {
3273
- m((b) => {
3274
- const N = {};
3275
- let y = Object.keys(b).length !== t.length;
3276
- for (const S of t)
3277
- S.id in b ? N[S.id] = b[S.id] : (N[S.id] = S.defaultWidth ?? ke, y = !0);
3278
- return y ? N : b;
3318
+ f((b) => {
3319
+ const w = {};
3320
+ let k = Object.keys(b).length !== n.length;
3321
+ for (const S of n)
3322
+ S.id in b ? w[S.id] = b[S.id] : (w[S.id] = S.defaultWidth ?? Ce, k = !0);
3323
+ return k ? w : b;
3279
3324
  });
3280
- }, [t]);
3281
- const v = Pe((b, N, y) => {
3282
- m((S) => {
3283
- const z = S[b] ?? ke, L = Math.max(y, z + N);
3325
+ }, [n]);
3326
+ const v = be((b, w, k) => {
3327
+ f((S) => {
3328
+ const z = S[b] ?? Ce, L = Math.max(k, z + w);
3284
3329
  return L === z ? S : { ...S, [b]: L };
3285
3330
  });
3286
- }, []), f = Pe((b) => {
3331
+ }, []), m = be((b) => {
3287
3332
  if (i) {
3288
3333
  if (!o || o.columnId !== b) {
3289
3334
  i({ columnId: b, direction: "asc" });
@@ -3295,33 +3340,33 @@ const $r = (n) => {
3295
3340
  }
3296
3341
  i(null);
3297
3342
  }
3298
- }, [o, i]), p = t.reduce(
3299
- (b, N) => b + (w[N.id] ?? N.defaultWidth ?? ke),
3343
+ }, [o, i]), g = n.reduce(
3344
+ (b, w) => b + (x[w.id] ?? w.defaultWidth ?? Ce),
3300
3345
  0
3301
- ), u = Ce(null), I = (b) => {
3302
- u.current && (u.current.scrollLeft = b.currentTarget.scrollLeft);
3346
+ ), h = Ie(null), R = (b) => {
3347
+ h.current && (h.current.scrollLeft = b.currentTarget.scrollLeft);
3303
3348
  };
3304
- return /* @__PURE__ */ d("div", { className: h("flex flex-col h-full w-full", s), children: [
3349
+ return /* @__PURE__ */ d("div", { className: u("flex flex-col h-full w-full", s), children: [
3305
3350
  /* @__PURE__ */ e(
3306
3351
  "div",
3307
3352
  {
3308
- ref: u,
3353
+ ref: h,
3309
3354
  className: "overflow-hidden shrink-0 table-header-strip",
3310
- style: { height: g },
3355
+ style: { height: p },
3311
3356
  children: /* @__PURE__ */ e(
3312
3357
  "div",
3313
3358
  {
3314
3359
  className: "flex flex-row table-header font-[number:var(--font-weight-table-header)]",
3315
- style: { width: p, minWidth: "100%" },
3316
- children: t.map((b) => /* @__PURE__ */ e(
3317
- $r,
3360
+ style: { width: g, minWidth: "100%" },
3361
+ children: n.map((b) => /* @__PURE__ */ e(
3362
+ Zr,
3318
3363
  {
3319
3364
  column: b,
3320
- width: w[b.id] ?? b.defaultWidth ?? ke,
3321
- height: g,
3322
- onResize: (N) => v(b.id, N, b.minWidth ?? _r),
3365
+ width: x[b.id] ?? b.defaultWidth ?? Ce,
3366
+ height: p,
3367
+ onResize: (w) => v(b.id, w, b.minWidth ?? eo),
3323
3368
  sortDirection: o?.columnId === b.id ? o.direction : null,
3324
- onSortClick: () => f(b.id)
3369
+ onSortClick: () => m(b.id)
3325
3370
  },
3326
3371
  b.id
3327
3372
  ))
@@ -3333,57 +3378,89 @@ const $r = (n) => {
3333
3378
  "div",
3334
3379
  {
3335
3380
  className: "flex-1 overflow-auto",
3336
- onScroll: I,
3337
- children: l.length === 0 && R ? /* @__PURE__ */ e("div", { className: "flex h-full min-w-full items-center justify-center p-8", children: R }) : /* @__PURE__ */ e(
3381
+ onScroll: R,
3382
+ children: l.length === 0 && y ? /* @__PURE__ */ e("div", { className: "flex h-full min-w-full items-center justify-center p-8", children: y }) : /* @__PURE__ */ e(
3338
3383
  "div",
3339
3384
  {
3340
3385
  className: "flex flex-col",
3341
- style: { width: p, minWidth: "100%" },
3342
- children: l.map((b, N) => /* @__PURE__ */ e(
3386
+ style: { width: g, minWidth: "100%" },
3387
+ children: l.map((b, w) => /* @__PURE__ */ e(
3343
3388
  "div",
3344
3389
  {
3345
- className: h(
3390
+ className: u(
3346
3391
  "flex flex-row table-body-row transition-colors duration-[var(--control-transition-duration-fast)]",
3347
3392
  r && "cursor-pointer"
3348
3393
  ),
3349
- onClick: r ? () => r(b, N) : void 0,
3350
- children: t.map((y) => /* @__PURE__ */ e(
3394
+ onClick: r ? () => r(b, w) : void 0,
3395
+ children: n.map((k) => /* @__PURE__ */ e(
3351
3396
  "div",
3352
3397
  {
3353
3398
  className: "shrink-0 content-center px-4 relative",
3354
3399
  style: {
3355
- width: w[y.id] ?? y.defaultWidth ?? ke,
3400
+ width: x[k.id] ?? k.defaultWidth ?? Ce,
3356
3401
  height: c
3357
3402
  },
3358
- children: /* @__PURE__ */ e("div", { className: "break-all line-clamp-1 font-[number:var(--font-weight-table-cell)]", children: y.renderCell(b, N) })
3403
+ children: /* @__PURE__ */ e("div", { className: "break-all line-clamp-1 font-[number:var(--font-weight-table-cell)]", children: k.renderCell(b, w) })
3359
3404
  },
3360
- y.id
3405
+ k.id
3361
3406
  ))
3362
3407
  },
3363
- a(b, N)
3408
+ a(b, w)
3364
3409
  ))
3365
3410
  }
3366
3411
  )
3367
3412
  }
3368
3413
  )
3369
3414
  ] });
3370
- }, jo = (n) => {
3371
- const { Icon: t, title: l, description: a, children: r, className: o } = n;
3372
- return /* @__PURE__ */ d("div", { className: h("flex flex-col items-center gap-3 text-center", o), children: [
3373
- t && /* @__PURE__ */ e("div", { className: "flex h-14 w-14 items-center justify-center rounded-[var(--border-radius-panel)] bg-[var(--color-table-header-bg)]", children: /* @__PURE__ */ e(t, { className: "h-6 w-6 text-[var(--color-input-icon)]" }) }),
3415
+ }, ta = (t) => {
3416
+ const { Icon: n, title: l, description: a, children: r, className: o } = t;
3417
+ return /* @__PURE__ */ d("div", { className: u("flex flex-col items-center gap-3 text-center", o), children: [
3418
+ n && /* @__PURE__ */ e("div", { className: "flex h-14 w-14 items-center justify-center rounded-[var(--border-radius-panel)] bg-[var(--color-table-header-bg)]", children: /* @__PURE__ */ e(n, { className: "h-6 w-6 text-[var(--color-input-icon)]" }) }),
3374
3419
  (l || a) && /* @__PURE__ */ d("div", { className: "flex flex-col gap-1", children: [
3375
3420
  l && /* @__PURE__ */ e("div", { className: "font-[number:var(--font-weight-table-header)] text-[var(--color-input-text)]", children: l }),
3376
3421
  a && /* @__PURE__ */ e("div", { className: "text-sm text-[var(--color-input-description-text)]", children: a })
3377
3422
  ] }),
3378
3423
  r
3379
3424
  ] });
3380
- }, Rt = (n) => {
3381
- const { label: t, children: l, className: a } = n;
3382
- return /* @__PURE__ */ d("div", { className: h("flex flex-col dropdown-button-group", a), children: [
3383
- t && /* @__PURE__ */ e("div", { className: "mb-2 text-[length:var(--font-size-label)] dropdown-group-label font-[number:var(--font-weight-group-header)] px-3", children: t }),
3425
+ }, Dt = (t) => {
3426
+ const { label: n, children: l, className: a } = t;
3427
+ return /* @__PURE__ */ d("div", { className: u("flex flex-col dropdown-button-group", a), children: [
3428
+ n && /* @__PURE__ */ e("div", { className: "mb-2 text-[length:var(--font-size-label)] dropdown-group-label font-[number:var(--font-weight-group-header)] px-3", children: n }),
3384
3429
  l
3385
3430
  ] });
3386
- }, Vr = () => /* @__PURE__ */ e("div", {}), Kr = [
3431
+ }, na = (t) => {
3432
+ const { label: n, Icon: l, children: a, className: r } = t, { push: o } = Pr(), i = Zt();
3433
+ return /* @__PURE__ */ d(X, { dismissOnClick: !1, Icon: l, onClick: () => {
3434
+ o({ id: i, label: n, Icon: l, content: a });
3435
+ }, className: r, children: [
3436
+ /* @__PURE__ */ e("span", { className: "flex-1 text-left", children: n }),
3437
+ /* @__PURE__ */ e(ot, { className: "h-5 w-5 shrink-0 -mr-1 opacity-60" })
3438
+ ] });
3439
+ }, ra = (t) => {
3440
+ const { label: n, Icon: l, children: a, className: r, minWidth: o = 200 } = t, [i, s] = U(!1), { Popover: c, anchorRef: p } = We({
3441
+ placement: "right-start",
3442
+ open: i,
3443
+ onOpenChange: s,
3444
+ minWidth: o,
3445
+ offset: 4
3446
+ });
3447
+ return /* @__PURE__ */ d(Q, { children: [
3448
+ /* @__PURE__ */ e("div", { ref: p, className: "flex flex-col", children: /* @__PURE__ */ d(
3449
+ X,
3450
+ {
3451
+ dismissOnClick: !1,
3452
+ Icon: l,
3453
+ onClick: () => s((y) => !y),
3454
+ className: r,
3455
+ children: [
3456
+ /* @__PURE__ */ e("span", { className: "flex-1 text-left", children: n }),
3457
+ /* @__PURE__ */ e(ot, { className: "h-5 w-5 shrink-0 -mr-1 opacity-60" })
3458
+ ]
3459
+ }
3460
+ ) }),
3461
+ /* @__PURE__ */ e(c, { open: i, children: /* @__PURE__ */ e(pe, { padding: "sm", style: { marginTop: 0 }, children: a }) })
3462
+ ] });
3463
+ }, ro = () => /* @__PURE__ */ e("div", {}), oo = [
3387
3464
  { id: 1, email: "sarah.jennings@example.com", firstname: "Sarah", lastname: "Jennings", status: "active" },
3388
3465
  { id: 2, email: "liam.patel@outlook.com", firstname: "Liam", lastname: "Patel", status: "inactive" },
3389
3466
  { id: 3, email: "emily.wong@gmail.com", firstname: "Emily", lastname: "Wong", status: "active" },
@@ -3396,40 +3473,40 @@ const $r = (n) => {
3396
3473
  { id: 10, email: "jackson.rivera@outlook.com", firstname: "Jackson", lastname: "Rivera", status: "active" },
3397
3474
  { id: 11, email: "ava.sanders@example.com", firstname: "Ava", lastname: "Sanders", status: "active" },
3398
3475
  { id: 12, email: "logan.bennett@company.io", firstname: "Logan", lastname: "Bennett", status: "inactive" }
3399
- ], Gr = [
3400
- { id: "id", header: "ID", renderCell: (n) => n.id },
3476
+ ], ao = [
3477
+ { id: "id", header: "ID", renderCell: (t) => t.id },
3401
3478
  {
3402
3479
  id: "email",
3403
3480
  header: "Email",
3404
- renderCell: (n) => /* @__PURE__ */ e(Ee, { Icon: mn, onClick: () => {
3405
- }, children: n.email })
3481
+ renderCell: (t) => /* @__PURE__ */ e(Ee, { Icon: xn, onClick: () => {
3482
+ }, children: t.email })
3406
3483
  },
3407
- { id: "firstname", header: "First Name", renderCell: (n) => n.firstname },
3408
- { id: "lastname", header: "Last Name", renderCell: (n) => n.lastname },
3484
+ { id: "firstname", header: "First Name", renderCell: (t) => t.firstname },
3485
+ { id: "lastname", header: "Last Name", renderCell: (t) => t.lastname },
3409
3486
  {
3410
3487
  id: "status",
3411
3488
  header: "Status",
3412
- renderCell: () => /* @__PURE__ */ e(qr, {})
3489
+ renderCell: () => /* @__PURE__ */ e(lo, {})
3413
3490
  }
3414
- ], Xo = () => /* @__PURE__ */ d("div", { className: "flex flex-col gap-6", children: [
3491
+ ], oa = () => /* @__PURE__ */ d("div", { className: "flex flex-col gap-6", children: [
3415
3492
  /* @__PURE__ */ d("div", { className: "flex flex-row items-center justify-start gap-3", children: [
3416
- /* @__PURE__ */ e($t, { Icon: Fe, placeholder: "Search..." }),
3417
- /* @__PURE__ */ e(Ye, { Icon: mt }),
3418
- /* @__PURE__ */ e(Gn, { Icon: pt, children: "New" }),
3493
+ /* @__PURE__ */ e(Xt, { Icon: Be, placeholder: "Search..." }),
3494
+ /* @__PURE__ */ e(et, { Icon: pt }),
3495
+ /* @__PURE__ */ e(nr, { Icon: gt, children: "New" }),
3419
3496
  /* @__PURE__ */ d(
3420
- Ue,
3497
+ He,
3421
3498
  {
3422
- trigger: /* @__PURE__ */ e(Ye, { Icon: mt }),
3499
+ trigger: /* @__PURE__ */ e(et, { Icon: pt }),
3423
3500
  children: [
3424
- /* @__PURE__ */ e(X, { dismissOnClick: !1, Icon: pt, children: "Add new" }),
3425
- /* @__PURE__ */ e(X, { Icon: fn, children: "Remove" }),
3426
- /* @__PURE__ */ d(Rt, { label: "Test", className: "mt-2", children: [
3501
+ /* @__PURE__ */ e(X, { dismissOnClick: !1, Icon: gt, children: "Add new" }),
3502
+ /* @__PURE__ */ e(X, { Icon: bn, children: "Remove" }),
3503
+ /* @__PURE__ */ d(Dt, { label: "Test", className: "mt-2", children: [
3427
3504
  /* @__PURE__ */ e(X, { children: "Item 1" }),
3428
3505
  /* @__PURE__ */ e(X, { children: "Item 2" }),
3429
3506
  /* @__PURE__ */ e(X, { children: "Item 3" }),
3430
3507
  /* @__PURE__ */ e(X, { children: "Item 4" })
3431
3508
  ] }),
3432
- /* @__PURE__ */ d(Rt, { label: "Test", className: "mt-2", children: [
3509
+ /* @__PURE__ */ d(Dt, { label: "Test", className: "mt-2", children: [
3433
3510
  /* @__PURE__ */ e(X, { children: "Item 1" }),
3434
3511
  /* @__PURE__ */ e(X, { children: "Item 2" }),
3435
3512
  /* @__PURE__ */ e(X, { children: "Item 3" }),
@@ -3438,10 +3515,10 @@ const $r = (n) => {
3438
3515
  ]
3439
3516
  }
3440
3517
  ),
3441
- /* @__PURE__ */ e(Wr, { tabs: [
3518
+ /* @__PURE__ */ e(Yr, { tabs: [
3442
3519
  {
3443
3520
  label: "Tab 1",
3444
- Icon: Je,
3521
+ Icon: Ze,
3445
3522
  active: !0,
3446
3523
  onClick: () => {
3447
3524
  }
@@ -3454,31 +3531,31 @@ const $r = (n) => {
3454
3531
  },
3455
3532
  {
3456
3533
  label: "Tab 3",
3457
- Icon: Je,
3534
+ Icon: Ze,
3458
3535
  active: !1,
3459
3536
  onClick: () => {
3460
3537
  }
3461
3538
  }
3462
3539
  ] })
3463
3540
  ] }),
3464
- /* @__PURE__ */ e(Er, { options: [
3541
+ /* @__PURE__ */ e(Xr, { options: [
3465
3542
  { label: "Option 1", value: 1 },
3466
3543
  { label: "Option 2", value: 2 },
3467
3544
  { label: "Option 3", value: 3 }
3468
3545
  ], value: null, onChange: () => {
3469
3546
  } }),
3470
3547
  /* @__PURE__ */ e(
3471
- Xr,
3548
+ no,
3472
3549
  {
3473
3550
  className: "h-[300px] w-[300px]",
3474
- columns: Gr,
3475
- rows: Kr,
3476
- getRowId: (n) => n.id
3551
+ columns: ao,
3552
+ rows: oo,
3553
+ getRowId: (t) => t.id
3477
3554
  }
3478
3555
  ),
3479
- /* @__PURE__ */ e(Vr, {})
3480
- ] }), qr = () => /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ d(
3481
- Ue,
3556
+ /* @__PURE__ */ e(ro, {})
3557
+ ] }), lo = () => /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ d(
3558
+ He,
3482
3559
  {
3483
3560
  placement: "bottom-end",
3484
3561
  className: "inline-block",
@@ -3492,76 +3569,81 @@ const $r = (n) => {
3492
3569
  }
3493
3570
  ) });
3494
3571
  export {
3495
- _o as AutoScroll,
3572
+ ea as AutoScroll,
3496
3573
  Ee as Badge,
3497
- Mr as BadgeColor,
3498
- Gn as Button,
3499
- Ht as ButtonIconRound,
3500
- Ye as ButtonIconSquare,
3501
- Ao as Divider,
3574
+ Kr as BadgeColor,
3575
+ nr as Button,
3576
+ jt as ButtonIconRound,
3577
+ et as ButtonIconSquare,
3578
+ qo as Divider,
3502
3579
  X as DropdownButton,
3503
- Rt as DropdownButtonGroup,
3504
- Vt as DropdownDismissContext,
3505
- Ue as DropdownMenu,
3506
- be as DropdownPanel,
3507
- $t as Input,
3508
- Io as InputCheck,
3509
- wo as InputColor,
3580
+ Dt as DropdownButtonGroup,
3581
+ qt as DropdownDismissContext,
3582
+ na as DropdownDrilldown,
3583
+ Jt as DropdownDrilldownContext,
3584
+ He as DropdownMenu,
3585
+ Er as DropdownNavigator,
3586
+ pe as DropdownPanel,
3587
+ ra as DropdownSubMenu,
3588
+ Xt as Input,
3589
+ Mo as InputCheck,
3590
+ To as InputColor,
3510
3591
  V as InputDescription,
3511
3592
  K as InputError,
3512
3593
  oe as InputErrorIcon,
3513
- So as InputFileMultiple,
3514
- Ro as InputFileSingle,
3515
- te as InputIconButton,
3594
+ Ao as InputFileMultiple,
3595
+ Bo as InputFileSingle,
3596
+ ne as InputIconButton,
3516
3597
  me as InputIconButtonTray,
3517
- Z as InputLabel,
3518
- zo as InputLexical,
3519
- No as InputPassword,
3520
- ko as InputRadio,
3521
- Er as InputSelect,
3522
- $e as InputSelectDivider,
3523
- He as InputSelectGroupHeader,
3524
- Lo as InputSelectMultiple,
3525
- Oo as InputSelectNative,
3526
- We as InputSelectOption,
3527
- To as InputSelectSearchable,
3528
- Po as InputSelectSearchableAsync,
3529
- yo as InputTextArea,
3530
- Co as InputToggle,
3531
- Nr as LEXICAL_NODES,
3532
- Cr as LexicalBlockTypeSelect,
3533
- Do as LexicalDefaultToolbarContent,
3534
- Lr as LexicalFloatingToolbar,
3535
- Rr as LexicalFormatButtons,
3536
- zr as LexicalHistoryButtons,
3537
- Dr as LexicalLinkButton,
3538
- Sr as LexicalListButtons,
3539
- Pr as LexicalToolbar,
3598
+ ee as InputLabel,
3599
+ Wo as InputLexical,
3600
+ Po as InputPassword,
3601
+ Eo as InputRadio,
3602
+ Xr as InputSelect,
3603
+ Xe as InputSelectDivider,
3604
+ je as InputSelectGroupHeader,
3605
+ jo as InputSelectMultiple,
3606
+ $o as InputSelectNative,
3607
+ _e as InputSelectOption,
3608
+ Ho as InputSelectSearchable,
3609
+ _o as InputSelectSearchableAsync,
3610
+ Lo as InputTextArea,
3611
+ Fo as InputToggle,
3612
+ Or as LEXICAL_NODES,
3613
+ Fr as LexicalBlockTypeSelect,
3614
+ Uo as LexicalDefaultToolbarContent,
3615
+ jr as LexicalFloatingToolbar,
3616
+ Br as LexicalFormatButtons,
3617
+ Wr as LexicalHistoryButtons,
3618
+ Ur as LexicalLinkButton,
3619
+ Ar as LexicalListButtons,
3620
+ _r as LexicalToolbar,
3540
3621
  ce as LexicalToolbarButton,
3541
- qe as LexicalToolbarDivider,
3542
- Gt as LexicalToolbarItems,
3543
- Wo as Modal,
3544
- Eo as Panel,
3545
- Mo as PanelField,
3546
- Bo as PanelLink,
3547
- Fo as PanelStack,
3548
- _t as PopoverBase,
3549
- Ho as SidebarModal,
3550
- Se as Spinner,
3551
- Wr as TabButtons,
3552
- Xr as Table,
3553
- $r as TableColumnHead,
3554
- jo as TableEmpty,
3555
- $o as Tabs,
3556
- Xo as Test,
3557
- Uo as Tooltip,
3558
- wr as UploadFileTile,
3559
- H as isSelectOption,
3560
- yt as lexicalTheme,
3561
- yr as useDropdownDismiss,
3562
- we as useLexicalToolbar,
3563
- Xt as useLexicalToolbarState,
3564
- ut as usePopover,
3565
- _e as useSelectPopover
3622
+ Qe as LexicalToolbarDivider,
3623
+ Qt as LexicalToolbarItems,
3624
+ Yo as Modal,
3625
+ Xo as Panel,
3626
+ Ko as PanelField,
3627
+ Go as PanelLink,
3628
+ Vo as PanelStack,
3629
+ Vt as PopoverBase,
3630
+ Qo as SidebarModal,
3631
+ Oe as Spinner,
3632
+ Yr as TabButtons,
3633
+ no as Table,
3634
+ Zr as TableColumnHead,
3635
+ ta as TableEmpty,
3636
+ Zo as Tabs,
3637
+ oa as Test,
3638
+ Jo as Tooltip,
3639
+ Dr as UploadFileTile,
3640
+ $ as isSelectOption,
3641
+ kt as lexicalTheme,
3642
+ zr as useDropdownDismiss,
3643
+ Pr as useDropdownDrilldown,
3644
+ Ne as useLexicalToolbar,
3645
+ Gt as useLexicalToolbarState,
3646
+ We as usePopover,
3647
+ Ve as useSelectPopover
3566
3648
  };
3567
3649
  //# sourceMappingURL=index.js.map