cekat-ui 1.0.7 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/components/Avatar/Avatar.d.ts +6 -0
  2. package/dist/components/Avatar/AvatarIcons.d.ts +8 -0
  3. package/dist/components/Avatar/avatar.styles.d.ts +12 -0
  4. package/dist/components/Avatar/avatar.types.d.ts +16 -0
  5. package/dist/components/Avatar/index.d.ts +3 -0
  6. package/dist/components/AvatarGroup/AvatarGroup.d.ts +6 -0
  7. package/dist/components/AvatarGroup/avatargroup.styles.d.ts +8 -0
  8. package/dist/components/AvatarGroup/avatargroup.types.d.ts +16 -0
  9. package/dist/components/AvatarGroup/index.d.ts +3 -0
  10. package/dist/components/AvatarLabelGroup/AvatarLabelGroup.d.ts +6 -0
  11. package/dist/components/AvatarLabelGroup/avatarlabelgroup.styles.d.ts +5 -0
  12. package/dist/components/AvatarLabelGroup/avatarlabelgroup.types.d.ts +14 -0
  13. package/dist/components/AvatarLabelGroup/index.d.ts +3 -0
  14. package/dist/components/AvatarProfilePhoto/AvatarProfilePhoto.d.ts +6 -0
  15. package/dist/components/AvatarProfilePhoto/avatarprofilephoto.styles.d.ts +10 -0
  16. package/dist/components/AvatarProfilePhoto/avatarprofilephoto.types.d.ts +12 -0
  17. package/dist/components/AvatarProfilePhoto/index.d.ts +3 -0
  18. package/dist/components/Badge/Badge.d.ts +6 -0
  19. package/dist/components/Badge/badge.styles.d.ts +20 -0
  20. package/dist/components/Badge/badge.types.d.ts +23 -0
  21. package/dist/components/Badge/index.d.ts +3 -0
  22. package/dist/components/BadgeGroup/BadgeGroup.d.ts +6 -0
  23. package/dist/components/BadgeGroup/badgegroup.styles.d.ts +28 -0
  24. package/dist/components/BadgeGroup/badgegroup.types.d.ts +19 -0
  25. package/dist/components/BadgeGroup/index.d.ts +3 -0
  26. package/dist/components/Button/Button.d.ts +1 -2
  27. package/dist/components/Button/button.styles.d.ts +2 -1
  28. package/dist/components/Button/button.types.d.ts +7 -6
  29. package/dist/components/Checkbox/checkbox.types.d.ts +3 -1
  30. package/dist/components/Dropdown/Dropdown.d.ts +2 -0
  31. package/dist/components/Dropdown/dropdown.styles.d.ts +19 -0
  32. package/dist/components/Dropdown/dropdown.types.d.ts +44 -0
  33. package/dist/components/Dropdown/index.d.ts +3 -0
  34. package/dist/components/Input/CardNumberInput.d.ts +19 -0
  35. package/dist/components/Input/Input.d.ts +2 -0
  36. package/dist/components/Input/InputCounter.d.ts +18 -0
  37. package/dist/components/Input/InputPrefix.d.ts +4 -0
  38. package/dist/components/Input/InputSuffix.d.ts +4 -0
  39. package/dist/components/Input/PhoneInput.d.ts +18 -0
  40. package/dist/components/Input/SaleAmountInput.d.ts +20 -0
  41. package/dist/components/Input/index.d.ts +13 -0
  42. package/dist/components/Input/input.styles.d.ts +36 -0
  43. package/dist/components/Input/input.types.d.ts +39 -0
  44. package/dist/components/InputDropdown/InputDropdown.d.ts +2 -0
  45. package/dist/components/InputDropdown/index.d.ts +3 -0
  46. package/dist/components/InputDropdown/inputDropdown.styles.d.ts +15 -0
  47. package/dist/components/InputDropdown/inputDropdown.types.d.ts +45 -0
  48. package/dist/components/Loading/Loading.d.ts +6 -0
  49. package/dist/components/Loading/LoadingSpinner.d.ts +9 -0
  50. package/dist/components/Loading/index.d.ts +3 -0
  51. package/dist/components/Loading/loading.styles.d.ts +6 -0
  52. package/dist/components/Loading/loading.types.d.ts +10 -0
  53. package/dist/components/MultiSelectInput/MultiSelectInput.d.ts +24 -0
  54. package/dist/components/MultiSelectInput/index.d.ts +1 -0
  55. package/dist/components/MultiSelectInput/multiSelectInput.styles.d.ts +17 -0
  56. package/dist/components/Radio/radio.types.d.ts +3 -1
  57. package/dist/components/Tab/Tab.d.ts +6 -0
  58. package/dist/components/Tab/TabList.d.ts +6 -0
  59. package/dist/components/Tab/index.d.ts +4 -0
  60. package/dist/components/Tab/tab.styles.d.ts +15 -0
  61. package/dist/components/Tab/tab.types.d.ts +24 -0
  62. package/dist/components/Tag/Tag.d.ts +6 -0
  63. package/dist/components/Tag/index.d.ts +3 -0
  64. package/dist/components/Tag/tag.styles.d.ts +19 -0
  65. package/dist/components/Tag/tag.types.d.ts +21 -0
  66. package/dist/components/Textarea/Textarea.d.ts +4 -0
  67. package/dist/components/Textarea/index.d.ts +3 -0
  68. package/dist/components/Textarea/textarea.styles.d.ts +14 -0
  69. package/dist/components/Textarea/textarea.types.d.ts +17 -0
  70. package/dist/components/Toggle/toggle.styles.d.ts +2 -1
  71. package/dist/components/Toggle/toggle.types.d.ts +5 -1
  72. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  73. package/dist/components/Tooltip/tooltip.styles.d.ts +2 -0
  74. package/dist/components/Tooltip/tooltip.types.d.ts +1 -0
  75. package/dist/components/WebsiteCopyInput/WebsiteCopyInput.d.ts +19 -0
  76. package/dist/components/WebsiteCopyInput/index.d.ts +1 -0
  77. package/dist/components/WebsiteCopyInput/websiteCopyInput.styles.d.ts +25 -0
  78. package/dist/components/WebsiteInput/WebsiteInput.d.ts +18 -0
  79. package/dist/components/WebsiteInput/index.d.ts +1 -0
  80. package/dist/components/WebsiteInput/websiteInput.styles.d.ts +24 -0
  81. package/dist/index.d.ts +16 -0
  82. package/dist/index.es.js +3023 -321
  83. package/dist/index.umd.js +1 -1
  84. package/dist/style.css +2131 -327
  85. package/dist/utils/color.d.ts +4 -0
  86. package/package.json +9 -7
  87. package/tailwind.preset.cjs +317 -0
package/dist/index.es.js CHANGED
@@ -1,164 +1,237 @@
1
- import * as s from "react";
2
- import E from "react";
3
- import { createPortal as z } from "react-dom";
4
- function R(t) {
5
- var r, e, i = "";
6
- if (typeof t == "string" || typeof t == "number") i += t;
1
+ import * as e from "react";
2
+ import d, { forwardRef as pe, createElement as M, useId as ge, useState as be } from "react";
3
+ import { createPortal as fe } from "react-dom";
4
+ function J(t) {
5
+ var s, r, l = "";
6
+ if (typeof t == "string" || typeof t == "number") l += t;
7
7
  else if (typeof t == "object") if (Array.isArray(t)) {
8
- var o = t.length;
9
- for (r = 0; r < o; r++) t[r] && (e = R(t[r])) && (i && (i += " "), i += e);
10
- } else for (e in t) t[e] && (i && (i += " "), i += e);
11
- return i;
8
+ var i = t.length;
9
+ for (s = 0; s < i; s++) t[s] && (r = J(t[s])) && (l && (l += " "), l += r);
10
+ } else for (r in t) t[r] && (l && (l += " "), l += r);
11
+ return l;
12
12
  }
13
13
  function g() {
14
- for (var t, r, e = 0, i = "", o = arguments.length; e < o; e++) (t = arguments[e]) && (r = R(t)) && (i && (i += " "), i += r);
15
- return i;
14
+ for (var t, s, r = 0, l = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (s = J(t)) && (l && (l += " "), l += s);
15
+ return l;
16
16
  }
17
- const V = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, j = g, h = (t, r) => (e) => {
18
- var i;
19
- if (r?.variants == null) return j(t, e?.class, e?.className);
20
- const { variants: o, defaultVariants: a } = r, b = Object.keys(o).map((n) => {
21
- const l = e?.[n], m = a?.[n];
22
- if (l === null) return null;
23
- const f = V(l) || V(m);
24
- return o[n][f];
25
- }), d = e && Object.entries(e).reduce((n, l) => {
26
- let [m, f] = l;
27
- return f === void 0 || (n[m] = f), n;
28
- }, {}), u = r == null || (i = r.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((n, l) => {
29
- let { class: m, className: f, ...v } = l;
30
- return Object.entries(v).every((k) => {
31
- let [p, x] = k;
32
- return Array.isArray(x) ? x.includes({
17
+ const H = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, F = g, b = (t, s) => (r) => {
18
+ var l;
19
+ if (s?.variants == null) return F(t, r?.class, r?.className);
20
+ const { variants: i, defaultVariants: a } = s, c = Object.keys(i).map((o) => {
21
+ const m = r?.[o], p = a?.[o];
22
+ if (m === null) return null;
23
+ const f = H(m) || H(p);
24
+ return i[o][f];
25
+ }), n = r && Object.entries(r).reduce((o, m) => {
26
+ let [p, f] = m;
27
+ return f === void 0 || (o[p] = f), o;
28
+ }, {}), u = s == null || (l = s.compoundVariants) === null || l === void 0 ? void 0 : l.reduce((o, m) => {
29
+ let { class: p, className: f, ...h } = m;
30
+ return Object.entries(h).every((E) => {
31
+ let [w, k] = E;
32
+ return Array.isArray(k) ? k.includes({
33
33
  ...a,
34
- ...d
35
- }[p]) : {
34
+ ...n
35
+ }[w]) : {
36
36
  ...a,
37
- ...d
38
- }[p] === x;
37
+ ...n
38
+ }[w] === k;
39
39
  }) ? [
40
- ...n,
41
- m,
40
+ ...o,
41
+ p,
42
42
  f
43
- ] : n;
43
+ ] : o;
44
44
  }, []);
45
- return j(t, b, u, e?.class, e?.className);
46
- }, F = h(["inline-flex items-center justify-center font-bold", "transition-colors duration-150", "focus-visible:outline-none", "disabled:cursor-not-allowed"], {
47
- variants: {
48
- size: {
49
- sm: "h-[36px] px-4 gap-1 rounded-lg text-sm",
50
- md: "h-[44px] px-4 gap-2 rounded-lg text-sm",
51
- lg: "h-[52px] px-5 gap-2 rounded-[10px] text-body-sm",
52
- xl: "h-[60px] px-6 gap-2 rounded-[10px] text-body-lg",
53
- "2xl": "h-[68px] px-6 gap-2 rounded-[10px] text-body-lg"
54
- },
55
- tone: {
56
- primary: "",
57
- destructive: ""
58
- },
59
- variant: {
60
- solid: ["text-white", "disabled:bg-light-100 disabled:text-light-400"],
61
- outline: ["bg-white border", "disabled:bg-white disabled:text-light-400 disabled:border-light-200"],
62
- ghost: ["bg-white", "disabled:text-light-400"],
63
- "outline-primary": [
64
- "bg-white border border-primary-500 text-primary-500",
65
- "hover:bg-primary-100 hover:border-primary-300 hover:text-primary-800",
66
- "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
67
- "disabled:bg-white disabled:text-light-400 disabled:border-light-200"
68
- ],
69
- "ghost-primary": [
70
- "bg-white text-primary-500",
71
- "hover:bg-primary-50 hover:text-primary-800",
72
- "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
73
- "disabled:text-light-400"
74
- ],
75
- plain: ["bg-transparent !rounded-md", "disabled:text-light-400 h-auto !px-2"],
76
- "plain-black": ["bg-transparent !rounded-md", "disabled:text-light-400 h-auto !px-2 "]
77
- }
78
- },
79
- compoundVariants: [
80
- /* ================= PRIMARY ================= */
81
- {
82
- tone: "primary",
83
- variant: "solid",
84
- class: ["bg-primary-500", "hover:bg-primary-800", "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")
85
- },
86
- {
87
- tone: "primary",
88
- variant: "outline",
89
- class: ["border-light-200 text-light-900", "hover:bg-light-50", "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")
90
- },
91
- {
92
- tone: "primary",
93
- variant: "ghost",
94
- class: ["text-light-800", "hover:bg-light-50", "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")
95
- },
96
- {
97
- tone: "primary",
98
- variant: "plain",
99
- class: ["text-primary-500", "hover:text-primary-800 hover:bg-transparent", "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")
45
+ return F(t, c, u, r?.class, r?.className);
46
+ }, he = b(
47
+ [
48
+ "inline-flex items-center justify-center font-bold",
49
+ "transition-colors duration-150",
50
+ "focus-visible:outline-none",
51
+ "disabled:cursor-not-allowed"
52
+ ],
53
+ {
54
+ variants: {
55
+ size: {
56
+ xs: "py-1 px-2 gap-1 rounded-md text-caption-sm",
57
+ sm: "h-[36px] px-4 gap-1 rounded-lg text-caption-sm",
58
+ md: "h-[44px] px-4 gap-2 rounded-lg text-sm",
59
+ lg: "h-[52px] px-5 gap-2 rounded-[10px] text-body-sm",
60
+ xl: "h-[60px] px-6 gap-2 rounded-[10px] text-body-lg",
61
+ "2xl": "h-[68px] px-6 gap-2 rounded-[10px] text-body-lg"
62
+ },
63
+ tone: {
64
+ primary: "",
65
+ destructive: ""
66
+ },
67
+ iconOnly: {
68
+ true: "!p-0",
69
+ false: ""
70
+ },
71
+ variant: {
72
+ solid: ["text-white", "disabled:bg-light-100 disabled:text-light-400"],
73
+ outline: [
74
+ "bg-white border",
75
+ "disabled:bg-white disabled:text-light-400 disabled:border-light-200"
76
+ ],
77
+ ghost: ["bg-transparent", "disabled:text-light-400"],
78
+ "outline-primary": [
79
+ "bg-white border border-primary-500 text-primary-500",
80
+ "hover:bg-primary-100 hover:border-primary-300 hover:text-primary-800",
81
+ "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
82
+ "disabled:bg-white disabled:text-light-400 disabled:border-light-200"
83
+ ],
84
+ "ghost-primary": [
85
+ "bg-transparent text-primary-500",
86
+ "hover:bg-primary-50 hover:text-primary-800",
87
+ "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
88
+ "disabled:text-light-400"
89
+ ],
90
+ plain: [
91
+ "bg-transparent !rounded-md",
92
+ "disabled:text-light-400 h-auto !px-2"
93
+ ],
94
+ "plain-black": [
95
+ "bg-transparent !rounded-md",
96
+ "disabled:text-light-400 h-auto !px-2 "
97
+ ]
98
+ }
100
99
  },
101
- {
100
+ compoundVariants: [
101
+ /* ================= PRIMARY ================= */
102
+ {
103
+ tone: "primary",
104
+ variant: "solid",
105
+ class: [
106
+ "bg-primary-500",
107
+ "hover:bg-primary-800",
108
+ "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
109
+ ].join(" ")
110
+ },
111
+ {
112
+ tone: "primary",
113
+ variant: "outline",
114
+ class: [
115
+ "border-light-200 text-light-900",
116
+ "hover:bg-light-50",
117
+ "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
118
+ ].join(" ")
119
+ },
120
+ {
121
+ tone: "primary",
122
+ variant: "ghost",
123
+ class: [
124
+ "text-light-800",
125
+ "hover:bg-light-50 hover:text-light-900",
126
+ "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
127
+ ].join(" ")
128
+ },
129
+ {
130
+ tone: "primary",
131
+ variant: "plain",
132
+ class: [
133
+ "text-primary-500",
134
+ "hover:text-primary-800 hover:bg-transparent",
135
+ "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"
136
+ ].join(" ")
137
+ },
138
+ {
139
+ tone: "primary",
140
+ variant: "plain-black",
141
+ class: [
142
+ "text-light-800",
143
+ "hover:text-light-900 hover:bg-transparent",
144
+ "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"
145
+ ].join(" ")
146
+ },
147
+ /* ================= DESTRUCTIVE ================= */
148
+ {
149
+ tone: "destructive",
150
+ variant: "solid",
151
+ class: [
152
+ "bg-error-500 text-white",
153
+ "hover:bg-error-800",
154
+ "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
155
+ "disabled:bg-light-100"
156
+ ].join(" ")
157
+ },
158
+ {
159
+ tone: "destructive",
160
+ variant: "outline",
161
+ class: [
162
+ "border-error-500 text-error-500",
163
+ "hover:border-error-300 hover:bg-error-100 hover:text-error-800",
164
+ "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
165
+ ].join(" ")
166
+ },
167
+ {
168
+ tone: "destructive",
169
+ variant: "ghost",
170
+ class: [
171
+ "text-error-500",
172
+ "hover:bg-error-50 hover:text-error-800",
173
+ "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
174
+ "disabled:bg-white disabled:text-light-400"
175
+ ].join(" ")
176
+ },
177
+ {
178
+ tone: "destructive",
179
+ variant: "plain",
180
+ class: [
181
+ "text-error-500",
182
+ "hover:text-error-800 hover:bg-transparent",
183
+ "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2"
184
+ ].join(" ")
185
+ },
186
+ /* ================= ICON ONLY (square) ================= */
187
+ { size: "xs", iconOnly: !0, class: "!w-[26px] !h-[26px]" },
188
+ { size: "sm", iconOnly: !0, class: "!w-[36px] !h-[36px]" },
189
+ { size: "md", iconOnly: !0, class: "!w-[44px] !h-[44px]" },
190
+ { size: "lg", iconOnly: !0, class: "!w-[52px] !h-[52px]" },
191
+ { size: "xl", iconOnly: !0, class: "!w-[60px] !h-[60px]" },
192
+ { size: "2xl", iconOnly: !0, class: "!w-[68px] !h-[68px]" }
193
+ ],
194
+ defaultVariants: {
195
+ size: "md",
102
196
  tone: "primary",
103
- variant: "plain-black",
104
- class: ["text-light-900", "hover:text-light-900 hover:bg-transparent", "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")
105
- },
106
- /* ================= DESTRUCTIVE ================= */
107
- {
108
- tone: "destructive",
109
197
  variant: "solid",
110
- class: [
111
- "bg-error-500 text-white",
112
- "hover:bg-error-800",
113
- "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
114
- "disabled:bg-light-100"
115
- ].join(" ")
116
- },
117
- {
118
- tone: "destructive",
119
- variant: "outline",
120
- class: [
121
- "border-error-500 text-error-500",
122
- "hover:border-error-300 hover:bg-error-50 hover:text-error-800",
123
- "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
124
- ].join(" ")
125
- },
126
- {
127
- tone: "destructive",
128
- variant: "ghost",
129
- class: [
130
- "text-error-500",
131
- "hover:bg-error-50 hover:text-error-800",
132
- "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
133
- "disabled:bg-white disabled:text-light-400"
134
- ].join(" ")
135
- },
136
- {
137
- tone: "destructive",
138
- variant: "plain",
139
- class: ["text-error-500", "hover:text-error-800 hover:bg-transparent", "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2"].join(" ")
198
+ iconOnly: !1
140
199
  }
141
- ],
142
- defaultVariants: {
143
- size: "md",
144
- tone: "primary",
145
- variant: "solid"
146
200
  }
147
- }), I = ({ children: t, className: r, tone: e, variant: i, size: o, ...a }) => /* @__PURE__ */ E.createElement("button", { className: g(F({ tone: e, variant: i, size: o }), r), ...a }, t), B = ({ children: t }) => /* @__PURE__ */ E.createElement("span", { className: "flex items-center" }, t), D = ({ children: t }) => /* @__PURE__ */ E.createElement("span", { className: "whitespace-nowrap" }, t), S = I;
148
- S.Icon = B;
149
- S.Text = D;
150
- const O = h(
201
+ ), xe = ({
202
+ children: t,
203
+ className: s,
204
+ tone: r,
205
+ variant: l,
206
+ size: i,
207
+ iconOnly: a,
208
+ ...c
209
+ }) => /* @__PURE__ */ d.createElement(
210
+ "button",
211
+ {
212
+ className: g(
213
+ he({ tone: r, variant: l, size: i, iconOnly: a }),
214
+ s
215
+ ),
216
+ ...c
217
+ },
218
+ t
219
+ ), ve = ({ children: t }) => /* @__PURE__ */ d.createElement("span", { className: "flex items-center" }, t), ye = ({ children: t }) => /* @__PURE__ */ d.createElement("span", { className: "whitespace-nowrap" }, t), Y = xe;
220
+ Y.Icon = ve;
221
+ Y.Text = ye;
222
+ const we = b(
151
223
  [
152
224
  "inline-flex items-center justify-center",
153
- "border-2 transition-colors duration-150",
154
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400"
225
+ "border transition-colors duration-150",
226
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
155
227
  ],
156
228
  {
157
229
  variants: {
158
230
  size: {
159
- sm: "h-5 w-5 rounded-[4px]",
160
- md: "h-6 w-6 rounded-[6px]",
161
- lg: "h-8 w-8 rounded-[8px]"
231
+ sm: "h-4 w-4 rounded-[4px]",
232
+ md: "h-5 w-5 rounded-[6px]",
233
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
234
+ lg: "h-5 w-5 rounded-[6px]"
162
235
  },
163
236
  checked: {
164
237
  true: "",
@@ -173,16 +246,16 @@ const O = h(
173
246
  {
174
247
  checked: !1,
175
248
  disabled: !1,
176
- className: "bg-white border-[#D0D5DD]"
249
+ className: "bg-white border-light-200 hover:border-light-400"
177
250
  },
178
251
  {
179
252
  checked: !0,
180
253
  disabled: !1,
181
- className: "bg-primary-500 border-primary-500 text-white"
254
+ className: "bg-primary-500 border-primary-500 text-white hover:bg-primary-800 hover:border-primary-800"
182
255
  },
183
256
  {
184
257
  disabled: !0,
185
- className: "bg-[#F2F4F7] border-[#E4E7EC] text-white"
258
+ className: "bg-light-100 border-light-200 text-white"
186
259
  }
187
260
  ],
188
261
  defaultVariants: {
@@ -191,48 +264,49 @@ const O = h(
191
264
  disabled: !1
192
265
  }
193
266
  }
194
- ), _ = {
267
+ ), Ee = {
195
268
  sm: { width: 12, height: 9 },
196
269
  md: { width: 14, height: 10 },
197
- lg: { width: 18, height: 14 }
198
- }, G = s.forwardRef(
270
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
271
+ lg: { width: 14, height: 10 }
272
+ }, Ne = e.forwardRef(
199
273
  ({
200
274
  id: t,
201
- checked: r,
202
- indeterminate: e = !1,
203
- disabled: i,
204
- size: o = "md",
275
+ checked: s,
276
+ indeterminate: r = !1,
277
+ disabled: l,
278
+ size: i = "md",
205
279
  onCheckedChange: a,
206
- className: b
207
- }, d) => {
280
+ className: c
281
+ }, n) => {
208
282
  const u = () => {
209
- i || a?.(!r);
210
- }, n = _[o], l = i ? "text-white/80" : "text-current";
211
- return /* @__PURE__ */ s.createElement(
283
+ l || a?.(!s);
284
+ }, o = Ee[i], m = l ? "text-white/80" : "text-current";
285
+ return /* @__PURE__ */ e.createElement(
212
286
  "button",
213
287
  {
214
288
  id: t,
215
- ref: d,
289
+ ref: n,
216
290
  type: "button",
217
291
  role: "checkbox",
218
- "aria-checked": e ? "mixed" : r,
219
- disabled: i,
292
+ "aria-checked": r ? "mixed" : s,
293
+ disabled: l,
220
294
  onClick: u,
221
295
  className: g(
222
- O({ size: o, checked: r, disabled: i }),
223
- b
296
+ we({ size: i, checked: s, disabled: l }),
297
+ c
224
298
  )
225
299
  },
226
- r && !e && /* @__PURE__ */ s.createElement(
300
+ s && !r && /* @__PURE__ */ e.createElement(
227
301
  "svg",
228
302
  {
229
- width: n.width,
230
- height: n.height,
303
+ width: o.width,
304
+ height: o.height,
231
305
  viewBox: "0 0 14 10",
232
306
  fill: "none",
233
- className: l
307
+ className: m
234
308
  },
235
- /* @__PURE__ */ s.createElement(
309
+ /* @__PURE__ */ e.createElement(
236
310
  "path",
237
311
  {
238
312
  d: "M1 5L5 9L13 1",
@@ -243,56 +317,56 @@ const O = h(
243
317
  }
244
318
  )
245
319
  ),
246
- e && /* @__PURE__ */ s.createElement(
320
+ r && /* @__PURE__ */ e.createElement(
247
321
  "span",
248
322
  {
249
323
  className: g(
250
- l,
324
+ m,
251
325
  "bg-current rounded-sm",
252
- o === "sm" && "h-0.5 w-3",
253
- o === "md" && "h-0.5 w-4",
254
- o === "lg" && "h-0.5 w-5"
326
+ i === "sm" && "h-0.5 w-3",
327
+ (i === "md" || i === "lg") && "h-0.5 w-4"
255
328
  )
256
329
  }
257
330
  )
258
331
  );
259
332
  }
260
333
  );
261
- G.displayName = "Checkbox";
262
- const T = s.createContext(null), Q = ({
334
+ Ne.displayName = "Checkbox";
335
+ const ee = e.createContext(null), $r = ({
263
336
  value: t,
264
- defaultValue: r,
265
- onValueChange: e,
266
- children: i,
267
- className: o
337
+ defaultValue: s,
338
+ onValueChange: r,
339
+ children: l,
340
+ className: i
268
341
  }) => {
269
- const [a, b] = s.useState(r), d = t ?? a, u = (n) => {
270
- b(n), e?.(n);
342
+ const [a, c] = e.useState(s), n = t ?? a, u = (o) => {
343
+ c(o), r?.(o);
271
344
  };
272
- return /* @__PURE__ */ s.createElement(
273
- T.Provider,
345
+ return /* @__PURE__ */ e.createElement(
346
+ ee.Provider,
274
347
  {
275
- value: { value: d, onValueChange: u }
348
+ value: { value: n, onValueChange: u }
276
349
  },
277
- /* @__PURE__ */ s.createElement("div", { role: "radiogroup", className: o }, i)
350
+ /* @__PURE__ */ e.createElement("div", { role: "radiogroup", className: i }, l)
278
351
  );
279
- }, A = () => {
280
- const t = s.useContext(T);
352
+ }, ke = () => {
353
+ const t = e.useContext(ee);
281
354
  if (!t)
282
355
  throw new Error("RadioGroupItem must be used within RadioGroup");
283
356
  return t;
284
- }, L = h(
357
+ }, Se = b(
285
358
  [
286
359
  "relative inline-flex items-center justify-center",
287
- "border-2 rounded-full transition-colors duration-150",
288
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400"
360
+ "border rounded-full transition-colors duration-150",
361
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
289
362
  ],
290
363
  {
291
364
  variants: {
292
365
  size: {
293
- sm: "h-5 w-5",
294
- md: "h-6 w-6",
295
- lg: "h-8 w-8"
366
+ sm: "h-4 w-4",
367
+ md: "h-5 w-5",
368
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
369
+ lg: "h-5 w-5"
296
370
  },
297
371
  checked: {
298
372
  true: "",
@@ -307,16 +381,16 @@ const T = s.createContext(null), Q = ({
307
381
  {
308
382
  checked: !1,
309
383
  disabled: !1,
310
- className: "border-[#D0D5DD] bg-white"
384
+ className: "border-light-200 bg-white hover:border-light-400"
311
385
  },
312
386
  {
313
387
  checked: !0,
314
388
  disabled: !1,
315
- className: "border-primary-500 bg-primary-500"
389
+ className: "border-primary-500 bg-primary-500 hover:bg-primary-800 hover:border-primary-800"
316
390
  },
317
391
  {
318
392
  disabled: !0,
319
- className: "border-[#E4E7EC] bg-[#F2F4F7]"
393
+ className: "border-light-200 bg-light-100"
320
394
  }
321
395
  ],
322
396
  defaultVariants: {
@@ -325,14 +399,15 @@ const T = s.createContext(null), Q = ({
325
399
  disabled: !1
326
400
  }
327
401
  }
328
- ), P = h(
402
+ ), Ce = b(
329
403
  ["rounded-full bg-white transition-all"],
330
404
  {
331
405
  variants: {
332
406
  size: {
333
- sm: "h-2 w-2",
334
- md: "h-2.5 w-2.5",
335
- lg: "h-3 w-3"
407
+ sm: "h-1.5 w-1.5",
408
+ md: "h-2 w-2",
409
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
410
+ lg: "h-2 w-2"
336
411
  },
337
412
  checked: {
338
413
  true: "scale-100",
@@ -344,9 +419,9 @@ const T = s.createContext(null), Q = ({
344
419
  checked: !1
345
420
  }
346
421
  }
347
- ), M = s.forwardRef(({ id: t, value: r, disabled: e, size: i = "md", className: o }, a) => {
348
- const { value: b, onValueChange: d } = A(), u = b === r;
349
- return /* @__PURE__ */ s.createElement(
422
+ ), ze = e.forwardRef(({ id: t, value: s, disabled: r, size: l = "md", className: i }, a) => {
423
+ const { value: c, onValueChange: n } = ke(), u = c === s;
424
+ return /* @__PURE__ */ e.createElement(
350
425
  "button",
351
426
  {
352
427
  ref: a,
@@ -354,125 +429,153 @@ const T = s.createContext(null), Q = ({
354
429
  type: "button",
355
430
  role: "radio",
356
431
  "aria-checked": u,
357
- disabled: e,
432
+ disabled: r,
358
433
  onClick: () => {
359
- e || d?.(r);
434
+ r || n?.(s);
360
435
  },
361
436
  className: g(
362
- L({ size: i, checked: u, disabled: e }),
363
- o
437
+ Se({ size: l, checked: u, disabled: r }),
438
+ i
364
439
  )
365
440
  },
366
- /* @__PURE__ */ s.createElement(
441
+ /* @__PURE__ */ e.createElement(
367
442
  "span",
368
443
  {
369
- className: P({
370
- size: i,
444
+ className: Ce({
445
+ size: l,
371
446
  checked: u
372
447
  })
373
448
  }
374
449
  )
375
450
  );
376
451
  });
377
- M.displayName = "RadioGroupItem";
378
- const W = h(
379
- "relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors duration-200 focus-visible:outline-none",
452
+ ze.displayName = "RadioGroupItem";
453
+ const Le = b(
454
+ [
455
+ "inline-flex items-center shrink-0 rounded-full p-[2px]",
456
+ "transition-colors duration-200",
457
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
458
+ ],
380
459
  {
381
460
  variants: {
382
461
  size: {
383
- sm: "h-6 w-10",
384
- md: "h-8 w-14",
385
- lg: "h-10 w-[72px]"
462
+ sm: "h-5 w-9",
463
+ md: "h-6 w-11",
464
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
465
+ lg: "h-6 w-11"
386
466
  },
387
467
  checked: {
388
- true: "bg-primary-500",
389
- false: "bg-[#e4e7ec]"
468
+ true: "justify-end",
469
+ false: "justify-start"
390
470
  },
391
471
  disabled: {
392
- true: "cursor-not-allowed opacity-60"
393
- }
394
- },
395
- defaultVariants: {
396
- size: "md",
397
- checked: !1
398
- }
399
- }
400
- ), K = h(
401
- "absolute top-1 left-1 rounded-full bg-white transition-transform duration-200 shadow",
402
- {
403
- variants: {
404
- size: {
405
- sm: "h-4 w-4",
406
- md: "h-6 w-6",
407
- lg: "h-8 w-8"
472
+ true: "cursor-not-allowed",
473
+ false: "cursor-pointer"
408
474
  },
409
- checked: {
410
- true: "",
411
- false: ""
475
+ variant: {
476
+ default: "",
477
+ success: ""
412
478
  }
413
479
  },
414
480
  compoundVariants: [
415
481
  {
416
- size: "sm",
417
- checked: !0,
418
- className: "translate-x-4"
482
+ checked: !1,
483
+ disabled: !1,
484
+ className: "bg-light-200"
419
485
  },
420
486
  {
421
- size: "md",
422
487
  checked: !0,
423
- className: "translate-x-6"
488
+ disabled: !1,
489
+ variant: "default",
490
+ className: "bg-primary-500 hover:bg-primary-800"
424
491
  },
425
492
  {
426
- size: "lg",
427
493
  checked: !0,
428
- className: "translate-x-8"
494
+ disabled: !1,
495
+ variant: "success",
496
+ className: "bg-success-500 hover:bg-success-800"
497
+ },
498
+ {
499
+ disabled: !0,
500
+ className: "bg-light-100"
501
+ },
502
+ {
503
+ variant: "default",
504
+ className: "focus-visible:ring-primary-400"
505
+ },
506
+ {
507
+ variant: "success",
508
+ className: "focus-visible:ring-success-500"
429
509
  }
430
510
  ],
431
511
  defaultVariants: {
432
512
  size: "md",
433
- checked: !1
513
+ checked: !1,
514
+ disabled: !1,
515
+ variant: "default"
516
+ }
517
+ }
518
+ ), Be = b(
519
+ "rounded-full shrink-0 shadow-[0_1px_3px_0_rgba(16,24,40,0.10),0_1px_2px_0_rgba(16,24,40,0.06)]",
520
+ {
521
+ variants: {
522
+ size: {
523
+ sm: "h-4 w-4",
524
+ md: "h-5 w-5",
525
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
526
+ lg: "h-5 w-5"
527
+ },
528
+ disabled: {
529
+ true: "bg-light-50",
530
+ false: "bg-white"
531
+ }
532
+ },
533
+ defaultVariants: {
534
+ size: "md",
535
+ disabled: !1
434
536
  }
435
537
  }
436
- ), U = s.forwardRef(
538
+ ), Te = e.forwardRef(
437
539
  ({
438
540
  checked: t = !1,
439
- size: r = "md",
440
- disabled: e,
541
+ size: s = "md",
542
+ variant: r = "default",
543
+ disabled: l,
441
544
  onCheckedChange: i,
442
- className: o
443
- }, a) => /* @__PURE__ */ s.createElement(
545
+ className: a
546
+ }, c) => /* @__PURE__ */ e.createElement(
444
547
  "button",
445
548
  {
446
- ref: a,
549
+ ref: c,
447
550
  type: "button",
448
551
  role: "switch",
449
552
  "aria-checked": t,
450
- disabled: e,
553
+ disabled: l,
451
554
  onClick: () => {
452
- e || i?.(!t);
555
+ l || i?.(!t);
453
556
  },
454
557
  className: g(
455
- W({ size: r, checked: t, disabled: e }),
456
- o
558
+ Le({ size: s, checked: t, disabled: l, variant: r }),
559
+ a
457
560
  )
458
561
  },
459
- /* @__PURE__ */ s.createElement(
562
+ /* @__PURE__ */ e.createElement(
460
563
  "span",
461
564
  {
462
- className: K({
463
- size: r,
464
- checked: t
565
+ className: Be({
566
+ size: s,
567
+ disabled: l
465
568
  })
466
569
  }
467
570
  )
468
571
  )
469
572
  );
470
- U.displayName = "Toggle";
471
- const Z = h(
573
+ Te.displayName = "Toggle";
574
+ const Ve = b(
472
575
  [
473
- "relative rounded-xl px-4 py-2 text-sm text-white",
474
- "bg-[#020b1c]",
475
- "shadow-[0_10px_30px_rgba(2,8,23,0.25)]",
576
+ "relative rounded-lg text-caption-sm font-semibold text-white",
577
+ "bg-primary-900",
578
+ "shadow-lg",
476
579
  "pointer-events-none",
477
580
  "select-none"
478
581
  ],
@@ -483,110 +586,2709 @@ const Z = h(
483
586
  bottom: "",
484
587
  left: "",
485
588
  right: ""
589
+ },
590
+ hasSupportingText: {
591
+ true: "p-3",
592
+ false: "px-3 py-2"
486
593
  }
487
594
  },
488
595
  defaultVariants: {
489
- side: "top"
596
+ side: "top",
597
+ hasSupportingText: !1
490
598
  }
491
599
  }
492
- ), $ = h(
493
- [
494
- "absolute w-2 h-2 rotate-45",
495
- "bg-[#020b1c]"
496
- ],
497
- {
498
- variants: {
499
- side: {
500
- top: "bottom-[-4px] left-1/2 -translate-x-1/2",
501
- bottom: "top-[-4px] left-1/2 -translate-x-1/2",
502
- left: "right-[-4px] top-1/2 -translate-y-1/2",
503
- right: "left-[-4px] top-1/2 -translate-y-1/2"
504
- }
505
- },
506
- defaultVariants: {
507
- side: "top"
600
+ ), je = "mt-1 font-medium text-light-100", Ie = b(["absolute"], {
601
+ variants: {
602
+ side: {
603
+ top: [
604
+ "bottom-[-6px] left-1/2 -translate-x-1/2",
605
+ "border-x-8 border-x-transparent border-t-[6px] border-t-primary-900"
606
+ ],
607
+ bottom: [
608
+ "top-[-6px] left-1/2 -translate-x-1/2",
609
+ "border-x-8 border-x-transparent border-b-[6px] border-b-primary-900"
610
+ ],
611
+ left: [
612
+ "right-[-6px] top-1/2 -translate-y-1/2",
613
+ "border-y-8 border-y-transparent border-l-[6px] border-l-primary-900"
614
+ ],
615
+ right: [
616
+ "left-[-6px] top-1/2 -translate-y-1/2",
617
+ "border-y-8 border-y-transparent border-r-[6px] border-r-primary-900"
618
+ ]
508
619
  }
620
+ },
621
+ defaultVariants: {
622
+ side: "top"
509
623
  }
510
- ), N = 12, q = ({
624
+ }), O = 12, Oe = ({
511
625
  content: t,
626
+ supportingText: s,
512
627
  side: r = "top",
513
- open: e,
628
+ open: l,
514
629
  defaultOpen: i = !1,
515
- disabled: o = !1,
516
- delay: a = 0,
517
- className: b,
518
- children: d
630
+ disabled: a = !1,
631
+ delay: c = 0,
632
+ className: n,
633
+ children: u
519
634
  }) => {
520
- const [u, n] = s.useState(i), [l, m] = s.useState(null), f = s.useRef(null), v = s.useRef(null), k = () => {
521
- if (o || !f.current) return;
522
- const c = f.current.getBoundingClientRect();
523
- let y = 0, w = 0;
635
+ const [o, m] = e.useState(i), [p, f] = e.useState(null), h = e.useRef(null), E = e.useRef(null), w = () => {
636
+ if (a || !h.current) return;
637
+ const x = h.current.getBoundingClientRect();
638
+ let N = 0, C = 0;
524
639
  switch (r) {
525
640
  case "top":
526
- y = c.top - N, w = c.left + c.width / 2;
641
+ N = x.top - O, C = x.left + x.width / 2;
527
642
  break;
528
643
  case "bottom":
529
- y = c.bottom + N, w = c.left + c.width / 2;
644
+ N = x.bottom + O, C = x.left + x.width / 2;
530
645
  break;
531
646
  case "left":
532
- y = c.top + c.height / 2, w = c.left - N;
647
+ N = x.top + x.height / 2, C = x.left - O;
533
648
  break;
534
649
  case "right":
535
- y = c.top + c.height / 2, w = c.right + N;
650
+ N = x.top + x.height / 2, C = x.right + O;
536
651
  break;
537
652
  }
538
- const C = () => {
539
- m({ top: y, left: w }), n(!0);
653
+ const L = () => {
654
+ f({ top: N, left: C }), m(!0);
540
655
  };
541
- a > 0 ? v.current = window.setTimeout(C, a) : C();
542
- }, p = () => {
543
- v.current && (clearTimeout(v.current), v.current = null), n(!1);
544
- }, x = e ?? u;
545
- return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(
656
+ c > 0 ? E.current = window.setTimeout(L, c) : L();
657
+ }, k = () => {
658
+ E.current && (clearTimeout(E.current), E.current = null), m(!1);
659
+ }, y = l ?? o;
660
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
546
661
  "span",
547
662
  {
548
- ref: f,
663
+ ref: h,
549
664
  className: "inline-flex",
550
- onMouseEnter: k,
551
- onMouseLeave: p,
552
- onFocus: k,
553
- onBlur: p,
665
+ onMouseEnter: w,
666
+ onMouseLeave: k,
667
+ onFocus: w,
668
+ onBlur: k,
554
669
  tabIndex: 0
555
670
  },
556
- d
557
- ), x && l && z(
558
- /* @__PURE__ */ s.createElement(
671
+ u
672
+ ), y && p && fe(
673
+ /* @__PURE__ */ e.createElement(
559
674
  "div",
560
675
  {
561
676
  role: "tooltip",
562
677
  className: "fixed z-[9999] pointer-events-none",
563
678
  style: {
564
- top: l.top,
565
- left: l.left,
679
+ top: p.top,
680
+ left: p.left,
566
681
  transform: r === "top" ? "translate(-50%, -100%)" : r === "bottom" ? "translate(-50%, 0)" : r === "left" ? "translate(-100%, -50%)" : "translate(0, -50%)"
567
682
  }
568
683
  },
569
- /* @__PURE__ */ s.createElement(
684
+ /* @__PURE__ */ e.createElement(
570
685
  "div",
571
686
  {
572
687
  className: g(
573
- Z({ side: r }),
574
- b
688
+ Ve({
689
+ side: r,
690
+ hasSupportingText: !!s
691
+ }),
692
+ n
575
693
  )
576
694
  },
577
695
  t,
578
- /* @__PURE__ */ s.createElement("span", { className: $({ side: r }) })
696
+ s && /* @__PURE__ */ e.createElement("p", { className: je }, s),
697
+ /* @__PURE__ */ e.createElement("span", { className: Ie({ side: r }) })
579
698
  )
580
699
  ),
581
700
  document.body
582
701
  ));
583
702
  };
584
- q.displayName = "Tooltip";
703
+ Oe.displayName = "Tooltip";
704
+ const _e = {
705
+ brand: {
706
+ bg: "bg-primary-50",
707
+ border: "border-primary-300",
708
+ text: "text-primary-700"
709
+ },
710
+ gray: {
711
+ bg: "bg-white",
712
+ border: "border-light-200",
713
+ text: "text-light-800"
714
+ },
715
+ error: {
716
+ bg: "bg-error-50",
717
+ border: "border-error-200",
718
+ text: "text-error-700"
719
+ },
720
+ warning: {
721
+ bg: "bg-warning-50",
722
+ border: "border-warning-200",
723
+ text: "text-warning-700"
724
+ },
725
+ success: {
726
+ bg: "bg-success-50",
727
+ border: "border-success-200",
728
+ text: "text-success-700"
729
+ },
730
+ "blue-gray": {
731
+ bg: "bg-blue-gray-50",
732
+ border: "border-blue-gray-200",
733
+ text: "text-blue-gray-700"
734
+ },
735
+ "blue-light": {
736
+ bg: "bg-blue-light-50",
737
+ border: "border-blue-light-200",
738
+ text: "text-blue-light-700"
739
+ },
740
+ indigo: {
741
+ bg: "bg-indigo-50",
742
+ border: "border-indigo-200",
743
+ text: "text-indigo-700"
744
+ },
745
+ purple: {
746
+ bg: "bg-purple-50",
747
+ border: "border-purple-200",
748
+ text: "text-purple-700"
749
+ },
750
+ blue: {
751
+ bg: "bg-blue-50",
752
+ border: "border-blue-200",
753
+ text: "text-blue-700"
754
+ },
755
+ pink: {
756
+ bg: "bg-pink-50",
757
+ border: "border-pink-200",
758
+ text: "text-pink-700"
759
+ },
760
+ orange: {
761
+ bg: "bg-orange-50",
762
+ border: "border-orange-200",
763
+ text: "text-orange-700"
764
+ }
765
+ }, $e = b(
766
+ [
767
+ "inline-flex items-center gap-1 border",
768
+ "font-medium transition-colors duration-150",
769
+ "select-none"
770
+ ],
771
+ {
772
+ variants: {
773
+ size: {
774
+ sm: "text-caption-sm py-[3px]",
775
+ md: "text-caption-lg py-[2px]",
776
+ lg: "text-caption-lg py-1"
777
+ },
778
+ shape: {
779
+ rounded: "rounded-md",
780
+ pill: "rounded-full"
781
+ },
782
+ hasLeading: {
783
+ true: "",
784
+ false: ""
785
+ },
786
+ hasTrailing: {
787
+ true: "",
788
+ false: ""
789
+ },
790
+ interactive: {
791
+ true: "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
792
+ false: ""
793
+ },
794
+ disabled: {
795
+ true: "cursor-not-allowed opacity-60",
796
+ false: ""
797
+ }
798
+ },
799
+ compoundVariants: [
800
+ { size: "sm", hasLeading: !1, className: "pl-2" },
801
+ { size: "sm", hasLeading: !0, className: "pl-1" },
802
+ { size: "sm", hasTrailing: !1, className: "pr-2" },
803
+ { size: "sm", hasTrailing: !0, className: "pr-1" },
804
+ { size: "md", hasLeading: !1, className: "pl-[9px]" },
805
+ { size: "md", hasLeading: !0, className: "pl-1" },
806
+ { size: "md", hasTrailing: !1, className: "pr-[9px]" },
807
+ { size: "md", hasTrailing: !0, className: "pr-1" },
808
+ { size: "lg", hasLeading: !1, className: "pl-2.5" },
809
+ { size: "lg", hasLeading: !0, className: "pl-1.5" },
810
+ { size: "lg", hasTrailing: !1, className: "pr-2.5" },
811
+ { size: "lg", hasTrailing: !0, className: "pr-1.5" }
812
+ ],
813
+ defaultVariants: {
814
+ size: "sm",
815
+ shape: "rounded",
816
+ hasLeading: !1,
817
+ hasTrailing: !1,
818
+ interactive: !1,
819
+ disabled: !1
820
+ }
821
+ }
822
+ ), We = b(
823
+ ["shrink-0 rounded border bg-white transition-colors duration-150 size-3.5"],
824
+ {
825
+ variants: {
826
+ checked: {
827
+ true: "bg-primary-500 border-primary-500",
828
+ false: ""
829
+ }
830
+ },
831
+ defaultVariants: {
832
+ checked: !1
833
+ }
834
+ }
835
+ ), Re = "shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800", Me = "shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400", te = /^#([0-9a-f]{6})$/i, re = (t) => te.test(t.trim()), se = (t, s) => {
836
+ const r = te.exec(t.trim());
837
+ if (!r) return;
838
+ const l = parseInt(r[1], 16), i = l >> 16 & 255, a = l >> 8 & 255, c = l & 255;
839
+ return `rgba(${i}, ${a}, ${c}, ${s})`;
840
+ }, ae = ({
841
+ children: t,
842
+ size: s = "sm",
843
+ shape: r = "rounded",
844
+ icon: l,
845
+ checked: i,
846
+ onCheckedChange: a,
847
+ onClose: c,
848
+ count: n,
849
+ disabled: u = !1,
850
+ className: o,
851
+ color: m = "gray",
852
+ customColor: p
853
+ }) => {
854
+ const f = a !== void 0, h = i !== void 0 || !!l, E = !!c || n !== void 0, w = _e[m], k = !!(p && re(p)), y = k ? {
855
+ borderColor: p,
856
+ backgroundColor: se(p, 0.12),
857
+ color: p
858
+ } : void 0, x = () => {
859
+ u || a?.(!i);
860
+ }, N = (C) => {
861
+ !f || u || (C.key === "Enter" || C.key === " ") && (C.preventDefault(), x());
862
+ };
863
+ return /* @__PURE__ */ e.createElement(
864
+ "div",
865
+ {
866
+ role: f ? "checkbox" : void 0,
867
+ "aria-checked": f ? !!i : void 0,
868
+ "aria-disabled": u || void 0,
869
+ tabIndex: f && !u ? 0 : void 0,
870
+ onClick: f ? x : void 0,
871
+ onKeyDown: N,
872
+ style: y,
873
+ className: g(
874
+ $e({
875
+ size: s,
876
+ shape: r,
877
+ hasLeading: h,
878
+ hasTrailing: E,
879
+ interactive: f,
880
+ disabled: u
881
+ }),
882
+ !k && w.bg,
883
+ !k && w.border,
884
+ !k && w.text,
885
+ o
886
+ )
887
+ },
888
+ i !== void 0 && /* @__PURE__ */ e.createElement(
889
+ "span",
890
+ {
891
+ className: g(
892
+ We({ checked: i }),
893
+ !i && !k && w.border
894
+ ),
895
+ style: !i && k ? { borderColor: p } : void 0
896
+ },
897
+ i && /* @__PURE__ */ e.createElement(
898
+ "svg",
899
+ {
900
+ viewBox: "0 0 14 10",
901
+ fill: "none",
902
+ className: "size-full text-white"
903
+ },
904
+ /* @__PURE__ */ e.createElement(
905
+ "path",
906
+ {
907
+ d: "M1 5L5 9L13 1",
908
+ stroke: "currentColor",
909
+ strokeWidth: "2",
910
+ strokeLinecap: "round",
911
+ strokeLinejoin: "round"
912
+ }
913
+ )
914
+ )
915
+ ),
916
+ l,
917
+ /* @__PURE__ */ e.createElement("span", { className: "whitespace-nowrap" }, t),
918
+ n !== void 0 && /* @__PURE__ */ e.createElement("span", { className: Re }, n),
919
+ c && /* @__PURE__ */ e.createElement(
920
+ "button",
921
+ {
922
+ type: "button",
923
+ "aria-label": "Remove",
924
+ disabled: u,
925
+ onClick: (C) => {
926
+ C.stopPropagation(), c();
927
+ },
928
+ className: Me
929
+ },
930
+ /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 10 10", fill: "none", className: "size-2.5" }, /* @__PURE__ */ e.createElement(
931
+ "path",
932
+ {
933
+ d: "M1 1L9 9M9 1L1 9",
934
+ stroke: "currentColor",
935
+ strokeWidth: "1.5",
936
+ strokeLinecap: "round"
937
+ }
938
+ ))
939
+ )
940
+ );
941
+ };
942
+ ae.displayName = "Tag";
943
+ const Ae = {
944
+ brand: {
945
+ solidBg: "bg-primary-50",
946
+ solidBorder: "border-primary-300",
947
+ solidText: "text-primary-500",
948
+ outlineBorder: "border-primary-500",
949
+ outlineText: "text-primary-700"
950
+ },
951
+ gray: {
952
+ solidBg: "bg-light-50",
953
+ solidBorder: "border-light-200",
954
+ solidText: "text-light-700",
955
+ outlineBorder: "border-light-600",
956
+ outlineText: "text-light-700"
957
+ },
958
+ error: {
959
+ solidBg: "bg-error-50",
960
+ solidBorder: "border-error-200",
961
+ solidText: "text-error-700",
962
+ outlineBorder: "border-error-600",
963
+ outlineText: "text-error-700"
964
+ },
965
+ warning: {
966
+ solidBg: "bg-warning-50",
967
+ solidBorder: "border-warning-200",
968
+ solidText: "text-warning-700",
969
+ outlineBorder: "border-warning-600",
970
+ outlineText: "text-warning-700"
971
+ },
972
+ success: {
973
+ solidBg: "bg-success-50",
974
+ solidBorder: "border-success-200",
975
+ solidText: "text-success-700",
976
+ outlineBorder: "border-success-600",
977
+ outlineText: "text-success-700"
978
+ },
979
+ "blue-gray": {
980
+ solidBg: "bg-blue-gray-50",
981
+ solidBorder: "border-blue-gray-200",
982
+ solidText: "text-blue-gray-700",
983
+ outlineBorder: "border-blue-gray-600",
984
+ outlineText: "text-blue-gray-700"
985
+ },
986
+ "blue-light": {
987
+ solidBg: "bg-blue-light-50",
988
+ solidBorder: "border-blue-light-200",
989
+ solidText: "text-blue-light-700",
990
+ outlineBorder: "border-blue-light-600",
991
+ outlineText: "text-blue-light-700"
992
+ },
993
+ indigo: {
994
+ solidBg: "bg-indigo-50",
995
+ solidBorder: "border-indigo-200",
996
+ solidText: "text-indigo-700",
997
+ outlineBorder: "border-indigo-600",
998
+ outlineText: "text-indigo-700"
999
+ },
1000
+ purple: {
1001
+ solidBg: "bg-purple-50",
1002
+ solidBorder: "border-purple-200",
1003
+ solidText: "text-purple-700",
1004
+ outlineBorder: "border-purple-600",
1005
+ outlineText: "text-purple-700"
1006
+ },
1007
+ blue: {
1008
+ solidBg: "bg-blue-50",
1009
+ solidBorder: "border-blue-200",
1010
+ solidText: "text-blue-700",
1011
+ outlineBorder: "border-blue-600",
1012
+ outlineText: "text-blue-700"
1013
+ },
1014
+ pink: {
1015
+ solidBg: "bg-pink-50",
1016
+ solidBorder: "border-pink-200",
1017
+ solidText: "text-pink-700",
1018
+ outlineBorder: "border-pink-600",
1019
+ outlineText: "text-pink-700"
1020
+ },
1021
+ orange: {
1022
+ solidBg: "bg-orange-50",
1023
+ solidBorder: "border-orange-200",
1024
+ solidText: "text-orange-700",
1025
+ outlineBorder: "border-orange-600",
1026
+ outlineText: "text-orange-700"
1027
+ }
1028
+ }, Pe = b(
1029
+ [
1030
+ "inline-flex items-center gap-1 border font-medium",
1031
+ "transition-colors duration-150"
1032
+ ],
1033
+ {
1034
+ variants: {
1035
+ size: {
1036
+ sm: "text-caption-sm py-0.5",
1037
+ md: "text-caption-lg py-0.5",
1038
+ lg: "text-caption-lg py-1"
1039
+ },
1040
+ shape: {
1041
+ pill: "rounded-full",
1042
+ badge: ""
1043
+ },
1044
+ modern: {
1045
+ true: "rounded-md shadow-xs",
1046
+ false: ""
1047
+ },
1048
+ hasLeading: {
1049
+ true: "",
1050
+ false: ""
1051
+ },
1052
+ hasTrailing: {
1053
+ true: "",
1054
+ false: ""
1055
+ },
1056
+ iconOnly: {
1057
+ true: "p-[5px]",
1058
+ false: ""
1059
+ },
1060
+ interactive: {
1061
+ true: "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
1062
+ false: ""
1063
+ },
1064
+ disabled: {
1065
+ true: "cursor-not-allowed opacity-60",
1066
+ false: ""
1067
+ }
1068
+ },
1069
+ compoundVariants: [
1070
+ // shape=badge radius (only applies when not overridden by `modern`)
1071
+ { shape: "badge", size: "sm", modern: !1, className: "rounded-md" },
1072
+ { shape: "badge", size: "md", modern: !1, className: "rounded-md" },
1073
+ { shape: "badge", size: "lg", modern: !1, className: "rounded-lg" },
1074
+ // horizontal padding (skipped entirely when iconOnly)
1075
+ {
1076
+ size: "sm",
1077
+ shape: "pill",
1078
+ iconOnly: !1,
1079
+ hasLeading: !1,
1080
+ className: "pl-2"
1081
+ },
1082
+ {
1083
+ size: "sm",
1084
+ shape: "badge",
1085
+ iconOnly: !1,
1086
+ hasLeading: !1,
1087
+ className: "pl-1.5"
1088
+ },
1089
+ { size: "sm", iconOnly: !1, hasLeading: !0, className: "pl-1" },
1090
+ {
1091
+ size: "sm",
1092
+ iconOnly: !1,
1093
+ hasTrailing: !1,
1094
+ className: "pr-2"
1095
+ },
1096
+ { size: "sm", iconOnly: !1, hasTrailing: !0, className: "pr-1" },
1097
+ {
1098
+ size: "md",
1099
+ iconOnly: !1,
1100
+ hasLeading: !1,
1101
+ className: "pl-2.5"
1102
+ },
1103
+ { size: "md", iconOnly: !1, hasLeading: !0, className: "pl-1" },
1104
+ {
1105
+ size: "md",
1106
+ iconOnly: !1,
1107
+ hasTrailing: !1,
1108
+ className: "pr-2.5"
1109
+ },
1110
+ { size: "md", iconOnly: !1, hasTrailing: !0, className: "pr-1" },
1111
+ {
1112
+ size: "lg",
1113
+ shape: "pill",
1114
+ iconOnly: !1,
1115
+ hasLeading: !1,
1116
+ className: "pl-3"
1117
+ },
1118
+ {
1119
+ size: "lg",
1120
+ shape: "badge",
1121
+ iconOnly: !1,
1122
+ hasLeading: !1,
1123
+ className: "pl-2.5"
1124
+ },
1125
+ { size: "lg", iconOnly: !1, hasLeading: !0, className: "pl-1.5" },
1126
+ {
1127
+ size: "lg",
1128
+ shape: "pill",
1129
+ iconOnly: !1,
1130
+ hasTrailing: !1,
1131
+ className: "pr-3"
1132
+ },
1133
+ {
1134
+ size: "lg",
1135
+ shape: "badge",
1136
+ iconOnly: !1,
1137
+ hasTrailing: !1,
1138
+ className: "pr-2.5"
1139
+ },
1140
+ { size: "lg", iconOnly: !1, hasTrailing: !0, className: "pr-1.5" }
1141
+ ],
1142
+ defaultVariants: {
1143
+ size: "sm",
1144
+ shape: "pill",
1145
+ modern: !1,
1146
+ hasLeading: !1,
1147
+ hasTrailing: !1,
1148
+ iconOnly: !1,
1149
+ interactive: !1,
1150
+ disabled: !1
1151
+ }
1152
+ }
1153
+ ), De = "size-4 shrink-0 rounded border bg-white", Ge = "shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400", He = ({
1154
+ children: t,
1155
+ size: s = "sm",
1156
+ shape: r = "pill",
1157
+ variant: l = "solid",
1158
+ color: i = "brand",
1159
+ customColor: a,
1160
+ modern: c = !1,
1161
+ icon: n,
1162
+ trailingIcon: u,
1163
+ checked: o,
1164
+ onCheckedChange: m,
1165
+ onClose: p,
1166
+ iconOnly: f = !1,
1167
+ disabled: h = !1,
1168
+ className: E
1169
+ }) => {
1170
+ const w = m !== void 0, k = o !== void 0 || !!n, y = !!p || !!u, x = Ae[i], N = !!(a && re(a)), C = N ? {
1171
+ borderColor: a,
1172
+ color: a,
1173
+ backgroundColor: l === "outline" ? "transparent" : se(a, 0.1)
1174
+ } : void 0, L = () => {
1175
+ h || m?.(!o);
1176
+ }, S = (z) => {
1177
+ !w || h || (z.key === "Enter" || z.key === " ") && (z.preventDefault(), L());
1178
+ };
1179
+ return /* @__PURE__ */ e.createElement(
1180
+ "div",
1181
+ {
1182
+ role: w ? "checkbox" : void 0,
1183
+ "aria-checked": w ? !!o : void 0,
1184
+ "aria-disabled": h || void 0,
1185
+ tabIndex: w && !h ? 0 : void 0,
1186
+ onClick: w ? L : void 0,
1187
+ onKeyDown: S,
1188
+ style: C,
1189
+ className: g(
1190
+ Pe({
1191
+ size: s,
1192
+ shape: r,
1193
+ modern: c,
1194
+ hasLeading: k,
1195
+ hasTrailing: y,
1196
+ iconOnly: f,
1197
+ interactive: w,
1198
+ disabled: h
1199
+ }),
1200
+ !N && (l === "outline" ? g("bg-transparent", x.outlineBorder, x.outlineText) : g(x.solidBg, x.solidBorder, x.solidText)),
1201
+ E
1202
+ )
1203
+ },
1204
+ o !== void 0 && /* @__PURE__ */ e.createElement(
1205
+ "span",
1206
+ {
1207
+ className: g(
1208
+ De,
1209
+ o ? "bg-primary-500 border-primary-500" : !N && x.solidBorder
1210
+ ),
1211
+ style: !o && N ? { borderColor: a } : void 0
1212
+ },
1213
+ o && /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 14 10", fill: "none", className: "size-full text-white" }, /* @__PURE__ */ e.createElement(
1214
+ "path",
1215
+ {
1216
+ d: "M1 5L5 9L13 1",
1217
+ stroke: "currentColor",
1218
+ strokeWidth: "2",
1219
+ strokeLinecap: "round",
1220
+ strokeLinejoin: "round"
1221
+ }
1222
+ ))
1223
+ ),
1224
+ n,
1225
+ !f && /* @__PURE__ */ e.createElement("span", { className: "whitespace-nowrap" }, t),
1226
+ u,
1227
+ p && /* @__PURE__ */ e.createElement(
1228
+ "button",
1229
+ {
1230
+ type: "button",
1231
+ "aria-label": "Remove",
1232
+ disabled: h,
1233
+ onClick: (z) => {
1234
+ z.stopPropagation(), p();
1235
+ },
1236
+ className: Ge
1237
+ },
1238
+ /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 10 10", fill: "none", className: "size-2.5" }, /* @__PURE__ */ e.createElement(
1239
+ "path",
1240
+ {
1241
+ d: "M1 1L9 9M9 1L1 9",
1242
+ stroke: "currentColor",
1243
+ strokeWidth: "1.5",
1244
+ strokeLinecap: "round"
1245
+ }
1246
+ ))
1247
+ )
1248
+ );
1249
+ };
1250
+ He.displayName = "Badge";
1251
+ const Fe = {
1252
+ brand: {
1253
+ bg50: "bg-primary-50",
1254
+ hoverBg100: "hover:bg-primary-100",
1255
+ border200: "border-primary-200",
1256
+ border500: "border-primary-500",
1257
+ text500: "text-primary-500"
1258
+ },
1259
+ gray: {
1260
+ bg50: "bg-light-50",
1261
+ hoverBg100: "hover:bg-light-100",
1262
+ border200: "border-light-200",
1263
+ border500: "border-light-500",
1264
+ text500: "text-light-500"
1265
+ },
1266
+ error: {
1267
+ bg50: "bg-error-50",
1268
+ hoverBg100: "hover:bg-error-100",
1269
+ border200: "border-error-200",
1270
+ border500: "border-error-500",
1271
+ text500: "text-error-500"
1272
+ },
1273
+ warning: {
1274
+ bg50: "bg-warning-50",
1275
+ hoverBg100: "hover:bg-warning-100",
1276
+ border200: "border-warning-200",
1277
+ border500: "border-warning-500",
1278
+ text500: "text-warning-500"
1279
+ },
1280
+ success: {
1281
+ bg50: "bg-success-50",
1282
+ hoverBg100: "hover:bg-success-100",
1283
+ border200: "border-success-200",
1284
+ border500: "border-success-500",
1285
+ text500: "text-success-500"
1286
+ }
1287
+ }, Ke = {
1288
+ md: {
1289
+ outerPad: { leading: "pl-1 pr-2.5 py-1", trailing: "pl-3 pr-1 py-1" },
1290
+ gap: "gap-2",
1291
+ chipPad: "px-2 py-0.5",
1292
+ text: "text-caption-lg"
1293
+ },
1294
+ lg: {
1295
+ outerPad: { leading: "pl-1.5 pr-3 py-1.5", trailing: "pl-3 pr-1.5 py-1.5" },
1296
+ gap: "gap-2",
1297
+ chipPad: "px-2.5 py-[3px]",
1298
+ text: "text-body-sm"
1299
+ }
1300
+ }, Ze = ({
1301
+ badgeLabel: t,
1302
+ children: s,
1303
+ size: r = "md",
1304
+ theme: l = "light",
1305
+ color: i = "brand",
1306
+ badgePosition: a = "leading",
1307
+ icon: c,
1308
+ onClick: n,
1309
+ className: u
1310
+ }) => {
1311
+ const o = Fe[i], m = Ke[r], p = l === "modern", f = l === "outline", h = g(
1312
+ "inline-flex items-center border transition-colors duration-150",
1313
+ m.gap,
1314
+ m.outerPad[a],
1315
+ p ? "rounded-lg bg-light-50 border-light-200 shadow-xs" : f ? g("rounded-full bg-white border-[1.5px]", o.border500) : g("rounded-full", o.bg50, o.border200, o.hoverBg100),
1316
+ n && "cursor-pointer",
1317
+ u
1318
+ ), E = g(
1319
+ "inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",
1320
+ m.chipPad,
1321
+ m.text,
1322
+ p ? "rounded-md bg-white border-light-200 text-light-800" : f ? g("rounded-full bg-white border-[1.5px]", o.border500, o.text500) : g("rounded-full bg-white", o.border200, o.text500)
1323
+ ), w = g(
1324
+ "inline-flex items-center gap-1 font-medium",
1325
+ m.text,
1326
+ p ? "text-light-800" : o.text500
1327
+ ), k = /* @__PURE__ */ e.createElement("span", { className: E }, p && /* @__PURE__ */ e.createElement("span", { className: "size-2 shrink-0 rounded-full bg-light-400" }), t);
1328
+ return /* @__PURE__ */ e.createElement(
1329
+ "div",
1330
+ {
1331
+ role: n ? "button" : void 0,
1332
+ tabIndex: n ? 0 : void 0,
1333
+ onClick: n,
1334
+ className: h
1335
+ },
1336
+ a === "leading" && k,
1337
+ /* @__PURE__ */ e.createElement("span", { className: w }, s, c),
1338
+ a === "trailing" && k
1339
+ );
1340
+ };
1341
+ Ze.displayName = "BadgeGroup";
1342
+ const Ue = ({ size: t }) => {
1343
+ const s = t * 0.09, r = (t - s) / 2, l = 2 * Math.PI * r;
1344
+ return /* @__PURE__ */ e.createElement(
1345
+ "svg",
1346
+ {
1347
+ width: t,
1348
+ height: t,
1349
+ viewBox: `0 0 ${t} ${t}`,
1350
+ fill: "none",
1351
+ className: "animate-spin"
1352
+ },
1353
+ /* @__PURE__ */ e.createElement(
1354
+ "circle",
1355
+ {
1356
+ cx: t / 2,
1357
+ cy: t / 2,
1358
+ r,
1359
+ strokeWidth: s,
1360
+ className: "stroke-light-100"
1361
+ }
1362
+ ),
1363
+ /* @__PURE__ */ e.createElement(
1364
+ "circle",
1365
+ {
1366
+ cx: t / 2,
1367
+ cy: t / 2,
1368
+ r,
1369
+ strokeWidth: s,
1370
+ strokeLinecap: "round",
1371
+ strokeDasharray: `${l * 0.25} ${l}`,
1372
+ className: "stroke-primary-600"
1373
+ }
1374
+ )
1375
+ );
1376
+ }, qe = ({ size: t }) => {
1377
+ const s = e.useId(), r = t * 0.125, l = (t - r) / 2, i = 2 * Math.PI * l;
1378
+ return /* @__PURE__ */ e.createElement(
1379
+ "svg",
1380
+ {
1381
+ width: t,
1382
+ height: t,
1383
+ viewBox: `0 0 ${t} ${t}`,
1384
+ fill: "none",
1385
+ className: "animate-spin text-primary-600"
1386
+ },
1387
+ /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("linearGradient", { id: s, x1: "100%", y1: "0%", x2: "0%", y2: "100%" }, /* @__PURE__ */ e.createElement("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "1" }), /* @__PURE__ */ e.createElement("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" }))),
1388
+ /* @__PURE__ */ e.createElement(
1389
+ "circle",
1390
+ {
1391
+ cx: t / 2,
1392
+ cy: t / 2,
1393
+ r: l,
1394
+ strokeWidth: r,
1395
+ className: "stroke-light-100"
1396
+ }
1397
+ ),
1398
+ /* @__PURE__ */ e.createElement(
1399
+ "circle",
1400
+ {
1401
+ cx: t / 2,
1402
+ cy: t / 2,
1403
+ r: l,
1404
+ strokeWidth: r,
1405
+ strokeLinecap: "round",
1406
+ stroke: `url(#${s})`,
1407
+ strokeDasharray: `${i * 0.75} ${i}`
1408
+ }
1409
+ )
1410
+ );
1411
+ }, Qe = ({ size: t }) => {
1412
+ const r = Math.max(t * 0.1, 3), l = (t - r) / 2;
1413
+ return /* @__PURE__ */ e.createElement(
1414
+ "div",
1415
+ {
1416
+ className: "relative animate-spin",
1417
+ style: { width: t, height: t }
1418
+ },
1419
+ Array.from({ length: 12 }).map((i, a) => {
1420
+ const c = 30 * a, n = 0.15 + 0.85 * a / 11;
1421
+ return /* @__PURE__ */ e.createElement(
1422
+ "span",
1423
+ {
1424
+ key: a,
1425
+ className: "absolute rounded-full bg-primary-600 top-1/2 left-1/2",
1426
+ style: {
1427
+ width: r,
1428
+ height: r,
1429
+ opacity: n,
1430
+ marginTop: -r / 2,
1431
+ marginLeft: -r / 2,
1432
+ transform: `rotate(${c}deg) translate(${l}px) rotate(${-c}deg)`
1433
+ }
1434
+ }
1435
+ );
1436
+ })
1437
+ );
1438
+ }, Xe = {
1439
+ sm: { box: 32, gapClass: "gap-4", textClass: "text-caption-lg" },
1440
+ md: { box: 48, gapClass: "gap-4", textClass: "text-caption-lg" },
1441
+ lg: { box: 56, gapClass: "gap-4", textClass: "text-body-lg" },
1442
+ xl: { box: 64, gapClass: "gap-5", textClass: "text-body-lg" }
1443
+ }, Je = ({
1444
+ size: t = "sm",
1445
+ style: s = "line-simple",
1446
+ supportingText: r = !0,
1447
+ label: l = "Loading...",
1448
+ className: i
1449
+ }) => {
1450
+ const { box: a, gapClass: c, textClass: n } = Xe[t];
1451
+ return /* @__PURE__ */ e.createElement(
1452
+ "div",
1453
+ {
1454
+ role: "status",
1455
+ "aria-label": typeof l == "string" ? l : "Loading",
1456
+ className: g("inline-flex flex-col items-center", c, i)
1457
+ },
1458
+ s === "line-simple" && /* @__PURE__ */ e.createElement(Ue, { size: a }),
1459
+ s === "line-spinner" && /* @__PURE__ */ e.createElement(qe, { size: a }),
1460
+ s === "dot-circle" && /* @__PURE__ */ e.createElement(Qe, { size: a }),
1461
+ r && /* @__PURE__ */ e.createElement(
1462
+ "p",
1463
+ {
1464
+ className: g(
1465
+ "font-medium text-light-700 whitespace-nowrap",
1466
+ n
1467
+ )
1468
+ },
1469
+ l
1470
+ )
1471
+ );
1472
+ };
1473
+ Je.displayName = "Loading";
1474
+ const le = ({
1475
+ className: t,
1476
+ style: s
1477
+ }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: t, style: s }, /* @__PURE__ */ e.createElement(
1478
+ "path",
1479
+ {
1480
+ d: "M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z",
1481
+ stroke: "currentColor",
1482
+ strokeWidth: "1.75"
1483
+ }
1484
+ ), /* @__PURE__ */ e.createElement(
1485
+ "path",
1486
+ {
1487
+ d: "M3.75 20.25a8.25 8.25 0 0 1 16.5 0",
1488
+ stroke: "currentColor",
1489
+ strokeWidth: "1.75",
1490
+ strokeLinecap: "round"
1491
+ }
1492
+ )), ie = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement("circle", { cx: "10", cy: "10", r: "9", className: "fill-primary-500 stroke-white", strokeWidth: "1.5" }), /* @__PURE__ */ e.createElement(
1493
+ "path",
1494
+ {
1495
+ d: "M6 10.2 8.6 12.8 14 7",
1496
+ stroke: "white",
1497
+ strokeWidth: "1.75",
1498
+ strokeLinecap: "round",
1499
+ strokeLinejoin: "round"
1500
+ }
1501
+ )), Ye = {
1502
+ xs: { box: 24, borderWidth: "0.5px", statusSize: 6, badgeSize: 10, textClass: "text-caption-sm" },
1503
+ sm: { box: 32, borderWidth: "0.5px", statusSize: 8, badgeSize: 12, textClass: "text-caption-lg" },
1504
+ md: { box: 40, borderWidth: "0.75px", statusSize: 10, badgeSize: 14, textClass: "text-body-sm" },
1505
+ lg: { box: 48, borderWidth: "0.75px", statusSize: 12, badgeSize: 16, textClass: "text-body-lg" },
1506
+ xl: { box: 56, borderWidth: "0.75px", statusSize: 14, badgeSize: 18, textClass: "text-h6" },
1507
+ "2xl": { box: 64, borderWidth: "0.75px", statusSize: 16, badgeSize: 20, textClass: "text-h5 leading-7" }
1508
+ }, et = "#17B26A", _ = ({
1509
+ src: t,
1510
+ alt: s,
1511
+ initials: r,
1512
+ size: l = "md",
1513
+ status: i = "none",
1514
+ statusIcon: a,
1515
+ contrastBorder: c = !0,
1516
+ className: n
1517
+ }) => {
1518
+ const { box: u, borderWidth: o, statusSize: m, badgeSize: p, textClass: f } = Ye[l], h = t ? "image" : r !== void 0 ? "initials" : "placeholder";
1519
+ return /* @__PURE__ */ e.createElement(
1520
+ "div",
1521
+ {
1522
+ className: g("relative inline-block shrink-0 rounded-full", n),
1523
+ style: { width: u, height: u }
1524
+ },
1525
+ h === "image" && /* @__PURE__ */ e.createElement(
1526
+ "img",
1527
+ {
1528
+ src: t,
1529
+ alt: s ?? "",
1530
+ className: "absolute inset-0 size-full rounded-full object-cover"
1531
+ }
1532
+ ),
1533
+ h === "placeholder" && /* @__PURE__ */ e.createElement("div", { className: "absolute inset-0 flex items-center justify-center rounded-full bg-light-50" }, /* @__PURE__ */ e.createElement(
1534
+ le,
1535
+ {
1536
+ className: "text-light-300",
1537
+ style: { width: u * 0.55, height: u * 0.55 }
1538
+ }
1539
+ )),
1540
+ h === "initials" && /* @__PURE__ */ e.createElement(
1541
+ "div",
1542
+ {
1543
+ className: g(
1544
+ "absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",
1545
+ f
1546
+ )
1547
+ },
1548
+ r
1549
+ ),
1550
+ c && /* @__PURE__ */ e.createElement(
1551
+ "div",
1552
+ {
1553
+ className: "pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",
1554
+ style: { borderWidth: o, borderStyle: "solid" }
1555
+ }
1556
+ ),
1557
+ i === "online" && /* @__PURE__ */ e.createElement(
1558
+ "span",
1559
+ {
1560
+ className: "absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",
1561
+ style: {
1562
+ width: m,
1563
+ height: m,
1564
+ backgroundColor: et
1565
+ }
1566
+ }
1567
+ ),
1568
+ i === "company" && /* @__PURE__ */ e.createElement(
1569
+ "div",
1570
+ {
1571
+ className: "absolute bottom-0 right-0 flex items-center justify-center overflow-hidden rounded-full border-[1.5px] border-white bg-white",
1572
+ style: { width: p, height: p }
1573
+ },
1574
+ a
1575
+ ),
1576
+ i === "verified" && /* @__PURE__ */ e.createElement(
1577
+ "div",
1578
+ {
1579
+ className: "absolute bottom-0 right-0",
1580
+ style: { width: p, height: p }
1581
+ },
1582
+ /* @__PURE__ */ e.createElement(ie, { className: "size-full" })
1583
+ )
1584
+ );
1585
+ };
1586
+ _.displayName = "Avatar";
1587
+ const tt = {
1588
+ xs: { box: 24, overlap: -4, contrastBorderWidth: "0.5px", plusIconSize: 16, textClass: "text-caption-sm" },
1589
+ sm: { box: 32, overlap: -8, contrastBorderWidth: "0.5px", plusIconSize: 16, textClass: "text-caption-lg" },
1590
+ md: { box: 40, overlap: -12, contrastBorderWidth: "0.75px", plusIconSize: 20, textClass: "text-body-sm" }
1591
+ }, rt = ({
1592
+ avatars: t,
1593
+ max: s,
1594
+ size: r = "xs",
1595
+ onAdd: l,
1596
+ className: i
1597
+ }) => {
1598
+ const { box: a, overlap: c, contrastBorderWidth: n, textClass: u } = tt[r], o = s ? t.slice(0, s) : t, m = s && t.length > s ? t.length - s : 0;
1599
+ return /* @__PURE__ */ e.createElement("div", { className: g("inline-flex items-start gap-2", i) }, /* @__PURE__ */ e.createElement("div", { className: "flex items-start" }, o.map((p, f) => /* @__PURE__ */ e.createElement(
1600
+ "div",
1601
+ {
1602
+ key: f,
1603
+ className: "relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",
1604
+ style: { width: a, height: a, marginRight: c }
1605
+ },
1606
+ p.src ? /* @__PURE__ */ e.createElement(
1607
+ "img",
1608
+ {
1609
+ src: p.src,
1610
+ alt: p.alt ?? "",
1611
+ className: "size-full object-cover"
1612
+ }
1613
+ ) : /* @__PURE__ */ e.createElement("div", { className: "flex size-full items-center justify-center bg-light-50 font-semibold text-light-500" }, p.initials),
1614
+ /* @__PURE__ */ e.createElement(
1615
+ "div",
1616
+ {
1617
+ className: "pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",
1618
+ style: { borderWidth: n, borderStyle: "solid" }
1619
+ }
1620
+ )
1621
+ )), m > 0 && /* @__PURE__ */ e.createElement(
1622
+ "div",
1623
+ {
1624
+ className: "relative flex shrink-0 items-center justify-center rounded-full border-2 border-white bg-light-100",
1625
+ style: { width: a, height: a }
1626
+ },
1627
+ /* @__PURE__ */ e.createElement("span", { className: g("font-semibold text-light-600", u) }, "+", m)
1628
+ )), l && /* @__PURE__ */ e.createElement(
1629
+ "button",
1630
+ {
1631
+ type: "button",
1632
+ onClick: l,
1633
+ "aria-label": "Add",
1634
+ className: "flex shrink-0 items-center justify-center rounded-full border border-dashed border-light-300 bg-white text-light-500 hover:bg-light-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2",
1635
+ style: { width: a, height: a }
1636
+ },
1637
+ /* @__PURE__ */ e.createElement(
1638
+ "svg",
1639
+ {
1640
+ width: a * 0.4,
1641
+ height: a * 0.4,
1642
+ viewBox: "0 0 20 20",
1643
+ fill: "none"
1644
+ },
1645
+ /* @__PURE__ */ e.createElement(
1646
+ "path",
1647
+ {
1648
+ d: "M10 4v12M4 10h12",
1649
+ stroke: "currentColor",
1650
+ strokeWidth: "1.75",
1651
+ strokeLinecap: "round"
1652
+ }
1653
+ )
1654
+ )
1655
+ ));
1656
+ };
1657
+ rt.displayName = "AvatarGroup";
1658
+ const st = {
1659
+ xs: { nameClass: "text-caption-sm", subtitleClass: "text-caption-sm" },
1660
+ sm: { nameClass: "text-caption-lg", subtitleClass: "text-caption-sm" },
1661
+ md: { nameClass: "text-caption-lg", subtitleClass: "text-caption-lg" },
1662
+ lg: { nameClass: "text-body-sm", subtitleClass: "text-body-sm" },
1663
+ xl: { nameClass: "text-body-lg", subtitleClass: "text-body-sm" }
1664
+ }, at = ({
1665
+ name: t,
1666
+ subtitle: s,
1667
+ src: r,
1668
+ initials: l,
1669
+ size: i = "xs",
1670
+ status: a = "none",
1671
+ statusIcon: c,
1672
+ className: n
1673
+ }) => {
1674
+ const { nameClass: u, subtitleClass: o } = st[i];
1675
+ return /* @__PURE__ */ e.createElement("div", { className: g("inline-flex items-center gap-2", n) }, /* @__PURE__ */ e.createElement(
1676
+ _,
1677
+ {
1678
+ src: r,
1679
+ initials: l,
1680
+ size: i,
1681
+ status: a,
1682
+ statusIcon: c
1683
+ }
1684
+ ), /* @__PURE__ */ e.createElement("div", { className: "flex flex-col items-start whitespace-nowrap" }, /* @__PURE__ */ e.createElement("span", { className: g("font-bold text-light-800", u) }, t), s && /* @__PURE__ */ e.createElement("span", { className: g("font-normal text-light-700", o) }, s)));
1685
+ };
1686
+ at.displayName = "AvatarLabelGroup";
1687
+ const lt = {
1688
+ sm: {
1689
+ box: 72,
1690
+ ringWidth: 3,
1691
+ shadowClass: "shadow-md",
1692
+ iconSize: 36,
1693
+ textClass: "text-h4",
1694
+ verifiedSize: 20,
1695
+ verifiedOffset: 0
1696
+ },
1697
+ md: {
1698
+ box: 96,
1699
+ ringWidth: 4,
1700
+ shadowClass: "shadow-lg",
1701
+ iconSize: 48,
1702
+ textClass: "text-h3",
1703
+ verifiedSize: 24,
1704
+ verifiedOffset: 0
1705
+ },
1706
+ lg: {
1707
+ box: 160,
1708
+ ringWidth: 4,
1709
+ shadowClass: "shadow-lg",
1710
+ iconSize: 80,
1711
+ textClass: "text-h1",
1712
+ verifiedSize: 32,
1713
+ verifiedOffset: 4
1714
+ }
1715
+ }, it = ({
1716
+ src: t,
1717
+ alt: s,
1718
+ initials: r,
1719
+ size: l = "sm",
1720
+ verified: i = !0,
1721
+ contrastBorder: a = !0,
1722
+ className: c
1723
+ }) => {
1724
+ const {
1725
+ box: n,
1726
+ ringWidth: u,
1727
+ shadowClass: o,
1728
+ iconSize: m,
1729
+ textClass: p,
1730
+ verifiedSize: f,
1731
+ verifiedOffset: h
1732
+ } = lt[l], E = t ? "image" : r !== void 0 ? "initials" : "placeholder";
1733
+ return /* @__PURE__ */ e.createElement(
1734
+ "div",
1735
+ {
1736
+ className: g("relative rounded-full", c),
1737
+ style: { width: n, height: n }
1738
+ },
1739
+ /* @__PURE__ */ e.createElement(
1740
+ "div",
1741
+ {
1742
+ className: g(
1743
+ "absolute inset-0 overflow-hidden rounded-full border-white",
1744
+ o,
1745
+ E !== "image" && "bg-light-100"
1746
+ ),
1747
+ style: { borderWidth: u, borderStyle: "solid" }
1748
+ },
1749
+ E === "image" && /* @__PURE__ */ e.createElement(
1750
+ "img",
1751
+ {
1752
+ src: t,
1753
+ alt: s ?? "",
1754
+ className: "absolute inset-0 size-full rounded-full object-cover"
1755
+ }
1756
+ ),
1757
+ a && /* @__PURE__ */ e.createElement("div", { className: "pointer-events-none absolute inset-0 rounded-full border border-black/[0.08]" }),
1758
+ E === "placeholder" && /* @__PURE__ */ e.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ e.createElement(
1759
+ le,
1760
+ {
1761
+ className: "text-light-300",
1762
+ style: { width: m, height: m }
1763
+ }
1764
+ )),
1765
+ E === "initials" && /* @__PURE__ */ e.createElement(
1766
+ "div",
1767
+ {
1768
+ className: g(
1769
+ "absolute inset-0 flex items-center justify-center font-semibold text-light-500",
1770
+ p
1771
+ )
1772
+ },
1773
+ r
1774
+ )
1775
+ ),
1776
+ i && /* @__PURE__ */ e.createElement(
1777
+ "div",
1778
+ {
1779
+ className: "absolute",
1780
+ style: {
1781
+ width: f,
1782
+ height: f,
1783
+ bottom: h,
1784
+ right: h
1785
+ }
1786
+ },
1787
+ /* @__PURE__ */ e.createElement(ie, { className: "size-full" })
1788
+ )
1789
+ );
1790
+ };
1791
+ it.displayName = "AvatarProfilePhoto";
1792
+ const nt = {
1793
+ "button-gray": { sm: "h-9 px-3 py-2 text-sm gap-2", md: "h-11 px-3 py-2 text-base gap-2" },
1794
+ "button-white": { sm: "h-9 px-3 py-2 text-sm gap-2", md: "h-11 px-3 py-2 text-base gap-2" },
1795
+ "button-primary": { sm: "h-9 px-3 py-2 text-sm gap-2", md: "h-11 px-3 py-2 text-base gap-2" },
1796
+ underline: { sm: "h-8 px-1 pb-3 text-sm gap-2", md: "h-9 px-1 pb-3 text-base gap-2" },
1797
+ "underline-filled": { sm: "h-11 p-3 text-sm gap-2", md: "h-12 p-3 text-base gap-2" },
1798
+ line: { sm: "h-9 px-3 py-2 text-sm gap-2", md: "h-11 px-3.5 py-2.5 text-base gap-2" }
1799
+ }, ot = {
1800
+ "button-gray": "rounded-md",
1801
+ "button-white": "rounded-md",
1802
+ "button-primary": "rounded-md",
1803
+ underline: "rounded-none",
1804
+ "underline-filled": "rounded-none",
1805
+ line: "rounded-none"
1806
+ }, ct = {
1807
+ "button-gray": {
1808
+ active: "bg-light-50 text-light-700",
1809
+ inactive: "bg-transparent text-light-500",
1810
+ hoverInactive: "hover:bg-light-50 hover:text-light-700",
1811
+ hasFocusRing: !0
1812
+ },
1813
+ "button-white": {
1814
+ active: "bg-white text-light-700 shadow-sm",
1815
+ inactive: "bg-transparent text-light-500",
1816
+ hoverInactive: "hover:bg-white hover:text-light-700 hover:shadow-sm",
1817
+ hasFocusRing: !0
1818
+ },
1819
+ "button-primary": {
1820
+ active: "bg-primary-50 text-primary-700",
1821
+ inactive: "bg-transparent text-light-500",
1822
+ hoverInactive: "hover:bg-primary-50 hover:text-primary-700",
1823
+ hasFocusRing: !0
1824
+ },
1825
+ underline: {
1826
+ active: "border-b-2 border-primary-500 text-primary-700",
1827
+ inactive: "border-b-2 border-transparent text-light-500",
1828
+ hoverInactive: "hover:border-primary-500 hover:text-primary-700",
1829
+ hasFocusRing: !1
1830
+ },
1831
+ "underline-filled": {
1832
+ active: "bg-primary-50 border-b-2 border-primary-500 text-primary-700",
1833
+ inactive: "bg-transparent border-b-2 border-transparent text-light-500",
1834
+ hoverInactive: "hover:bg-primary-50 hover:border-primary-500 hover:text-primary-700",
1835
+ hasFocusRing: !1
1836
+ },
1837
+ line: {
1838
+ active: "bg-transparent border-l-2 border-primary-500 text-primary-700",
1839
+ inactive: "bg-transparent border-l-2 border-transparent text-light-500",
1840
+ hoverInactive: "hover:border-primary-500 hover:text-primary-700",
1841
+ hasFocusRing: !0
1842
+ }
1843
+ }, dt = "inline-flex items-center justify-center rounded-full border border-light-200 bg-light-50 px-2 py-0.5 text-caption-sm font-medium text-light-700", ut = {
1844
+ "button-gray": { gapClass: "gap-1", hasHairline: !1 },
1845
+ "button-white": { gapClass: "gap-1", hasHairline: !1 },
1846
+ "button-primary": { gapClass: "gap-1", hasHairline: !1 },
1847
+ underline: { gapClass: "gap-3", hasHairline: !0 },
1848
+ "underline-filled": { gapClass: "gap-3", hasHairline: !0 },
1849
+ line: { gapClass: "gap-1", hasHairline: !1 }
1850
+ }, mt = ({
1851
+ children: t,
1852
+ variant: s = "button-primary",
1853
+ size: r = "sm",
1854
+ active: l = !1,
1855
+ fullWidth: i = !1,
1856
+ count: a,
1857
+ disabled: c = !1,
1858
+ onClick: n,
1859
+ className: u
1860
+ }) => {
1861
+ const o = ct[s];
1862
+ return /* @__PURE__ */ e.createElement(
1863
+ "button",
1864
+ {
1865
+ type: "button",
1866
+ role: "tab",
1867
+ "aria-selected": l,
1868
+ disabled: c,
1869
+ onClick: n,
1870
+ className: g(
1871
+ "inline-flex items-center justify-center font-semibold transition-colors duration-150",
1872
+ nt[s][r],
1873
+ ot[s],
1874
+ l ? o.active : o.inactive,
1875
+ !l && !c && o.hoverInactive,
1876
+ o.hasFocusRing && "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
1877
+ i && "w-full",
1878
+ c ? "cursor-not-allowed opacity-60" : "cursor-pointer",
1879
+ u
1880
+ )
1881
+ },
1882
+ /* @__PURE__ */ e.createElement("span", { className: "whitespace-nowrap" }, t),
1883
+ a !== void 0 && /* @__PURE__ */ e.createElement("span", { className: dt }, a)
1884
+ );
1885
+ };
1886
+ mt.displayName = "Tab";
1887
+ const pt = ({
1888
+ children: t,
1889
+ variant: s = "button-primary",
1890
+ orientation: r = "horizontal",
1891
+ boxed: l = !1,
1892
+ className: i
1893
+ }) => {
1894
+ const { gapClass: a, hasHairline: c } = ut[s];
1895
+ return /* @__PURE__ */ e.createElement(
1896
+ "div",
1897
+ {
1898
+ role: "tablist",
1899
+ "aria-orientation": r,
1900
+ className: g(
1901
+ "inline-flex",
1902
+ r === "vertical" ? "flex-col items-stretch" : "flex-row items-center",
1903
+ a,
1904
+ l && "rounded-lg border border-light-200 bg-light-50 p-1",
1905
+ c && r === "horizontal" && !l && "border-b border-light-200",
1906
+ i
1907
+ )
1908
+ },
1909
+ t
1910
+ );
1911
+ };
1912
+ pt.displayName = "TabList";
1913
+ const gt = b("flex flex-col gap-1 w-full max-w-[320px]", {
1914
+ variants: {
1915
+ size: {
1916
+ xs: "text-caption-sm",
1917
+ sm: "text-caption-lg",
1918
+ md: "text-sm"
1919
+ }
1920
+ },
1921
+ defaultVariants: {
1922
+ size: "md"
1923
+ }
1924
+ }), bt = b("flex items-center gap-1 font-bold text-sm", {
1925
+ variants: {
1926
+ error: {
1927
+ true: "",
1928
+ false: "text-light-800"
1929
+ }
1930
+ },
1931
+ defaultVariants: {
1932
+ error: !1
1933
+ }
1934
+ }), ft = b(
1935
+ [
1936
+ "flex items-center w-full border",
1937
+ "bg-white transition-[border-color,border-width]"
1938
+ ],
1939
+ {
1940
+ variants: {
1941
+ size: {
1942
+ xs: "h-7 px-2 gap-1 rounded text-caption-sm",
1943
+ sm: "h-9 px-3 gap-2 rounded-lg",
1944
+ md: "h-11 px-3 gap-2 rounded-lg"
1945
+ },
1946
+ error: {
1947
+ true: [
1948
+ "border-error-200",
1949
+ "focus-within:border-2 focus-within:border-error-500"
1950
+ ],
1951
+ false: [
1952
+ "border-light-200",
1953
+ "focus-within:border-2 focus-within:border-primary-500"
1954
+ ]
1955
+ },
1956
+ disabled: {
1957
+ true: "bg-light-100 text-light-400 cursor-not-allowed",
1958
+ false: ""
1959
+ }
1960
+ },
1961
+ defaultVariants: {
1962
+ size: "md",
1963
+ error: !1,
1964
+ disabled: !1
1965
+ }
1966
+ }
1967
+ ), ht = b(
1968
+ [
1969
+ "flex-1 bg-transparent outline-none text-light-900",
1970
+ "placeholder:text-light-500",
1971
+ "disabled:text-light-400 disabled:cursor-not-allowed"
1972
+ ],
1973
+ {
1974
+ variants: {
1975
+ size: {
1976
+ xs: "text-caption-sm",
1977
+ sm: "text-caption-lg",
1978
+ md: "text-body-sm"
1979
+ },
1980
+ error: {
1981
+ true: "",
1982
+ false: "text-light-900"
1983
+ }
1984
+ },
1985
+ defaultVariants: {
1986
+ size: "md",
1987
+ error: !1
1988
+ }
1989
+ }
1990
+ ), xt = b("text-caption-lg", {
1991
+ variants: {
1992
+ error: {
1993
+ true: "text-error-500",
1994
+ false: "text-light-700"
1995
+ }
1996
+ }
1997
+ }), vt = b(
1998
+ "flex items-stretch w-full bg-white border overflow-hidden transition-[border-color,border-width]",
1999
+ {
2000
+ variants: {
2001
+ size: {
2002
+ xs: "rounded",
2003
+ sm: "rounded-lg",
2004
+ md: "rounded-lg"
2005
+ },
2006
+ error: {
2007
+ true: [
2008
+ "border-error-200",
2009
+ "focus-within:border-2 focus-within:border-error-500"
2010
+ ],
2011
+ false: [
2012
+ "border-light-200",
2013
+ "focus-within:border-2 focus-within:border-primary-500"
2014
+ ]
2015
+ },
2016
+ disabled: {
2017
+ true: "bg-light-100",
2018
+ false: ""
2019
+ }
2020
+ },
2021
+ defaultVariants: { size: "md", error: !1, disabled: !1 }
2022
+ }
2023
+ ), yt = b("flex flex-1 items-center min-w-0", {
2024
+ variants: {
2025
+ size: {
2026
+ xs: "gap-1 px-2 py-1",
2027
+ sm: "gap-2 px-3 py-2",
2028
+ md: "gap-2 px-3 py-2"
2029
+ },
2030
+ disabled: {
2031
+ true: "text-light-400 cursor-not-allowed",
2032
+ false: ""
2033
+ }
2034
+ },
2035
+ defaultVariants: { size: "md", disabled: !1 }
2036
+ }), wt = b("flex items-center text-light-700 whitespace-nowrap border-r border-light-200", {
2037
+ variants: {
2038
+ size: {
2039
+ xs: "px-2 text-caption-sm",
2040
+ sm: "px-3 text-caption-lg",
2041
+ md: "px-3 text-body-sm"
2042
+ }
2043
+ },
2044
+ defaultVariants: { size: "md" }
2045
+ }), K = b(
2046
+ [
2047
+ "flex items-center gap-1 shrink-0 bg-transparent p-0 text-light-800 cursor-pointer",
2048
+ "hover:bg-transparent hover:text-light-900",
2049
+ "disabled:cursor-not-allowed disabled:text-light-400"
2050
+ ],
2051
+ {
2052
+ variants: {
2053
+ size: {
2054
+ xs: "text-caption-sm",
2055
+ sm: "text-caption-lg",
2056
+ md: "text-body-sm"
2057
+ }
2058
+ },
2059
+ defaultVariants: { size: "md" }
2060
+ }
2061
+ ), Et = b(
2062
+ "flex shrink-0 items-center justify-center gap-1 w-[92px] border-l border-light-200 bg-white font-semibold text-light-800 hover:bg-light-50 disabled:cursor-not-allowed disabled:text-light-400",
2063
+ {
2064
+ variants: {
2065
+ size: {
2066
+ xs: "text-caption-sm",
2067
+ sm: "text-caption-lg",
2068
+ md: "text-body-sm"
2069
+ }
2070
+ },
2071
+ defaultVariants: { size: "md" }
2072
+ }
2073
+ ), Z = ({ className: t }) => /* @__PURE__ */ d.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ d.createElement(
2074
+ "path",
2075
+ {
2076
+ d: "M5 7.5L10 12.5L15 7.5",
2077
+ stroke: "currentColor",
2078
+ strokeWidth: "1.67",
2079
+ strokeLinecap: "round",
2080
+ strokeLinejoin: "round"
2081
+ }
2082
+ )), Nt = {
2083
+ xs: "h-7",
2084
+ // 18px (caption-sm) + 8 + 2 = 28px
2085
+ sm: "h-[30px]",
2086
+ // 20px (caption-lg) + 8 + 2 = 30px
2087
+ md: "h-[34px]"
2088
+ // 24px (body-sm) + 8 + 2 = 34px
2089
+ }, kt = ({ size: t, error: s, disabled: r }) => g(
2090
+ "flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",
2091
+ Nt[t],
2092
+ s ? "border-error-200 focus-within:border-2 focus-within:border-error-500" : "border-light-200 focus-within:border-2 focus-within:border-primary-500",
2093
+ r && "bg-light-100 text-light-400 cursor-not-allowed"
2094
+ ), St = ({ error: t }) => g("flex items-center gap-1 text-caption-sm font-semibold", t ? "" : "text-light-800"), Ct = "flex flex-col w-full max-w-[320px]";
2095
+ function j({
2096
+ label: t,
2097
+ required: s,
2098
+ hint: r,
2099
+ rightIcon: l,
2100
+ size: i = "md",
2101
+ error: a = !1,
2102
+ disabled: c = !1,
2103
+ compact: n = !1,
2104
+ hideCalendarIcon: u = !1,
2105
+ type: o,
2106
+ prefix: m,
2107
+ suffix: p,
2108
+ leadingAddon: f,
2109
+ leadingDropdown: h,
2110
+ trailingDropdown: E,
2111
+ trailingButton: w,
2112
+ maxLength: k,
2113
+ value: y,
2114
+ className: x,
2115
+ wrapperClassName: N,
2116
+ ...C
2117
+ }) {
2118
+ const L = !!(f || w), S = /* @__PURE__ */ d.createElement(d.Fragment, null, h && /* @__PURE__ */ d.createElement(
2119
+ "button",
2120
+ {
2121
+ type: "button",
2122
+ onClick: h.onClick,
2123
+ disabled: h.disabled || c,
2124
+ className: K({ size: i })
2125
+ },
2126
+ /* @__PURE__ */ d.createElement("span", null, h.value),
2127
+ /* @__PURE__ */ d.createElement(Z, { className: "size-5 text-light-500" })
2128
+ ), m && /* @__PURE__ */ d.createElement("div", { className: "flex items-center" }, m), /* @__PURE__ */ d.createElement(
2129
+ "input",
2130
+ {
2131
+ ...C,
2132
+ type: o,
2133
+ disabled: c,
2134
+ maxLength: k,
2135
+ value: y,
2136
+ className: g(
2137
+ ht({ size: i, error: a }),
2138
+ "h-full",
2139
+ u && "[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",
2140
+ o === "date" && "[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",
2141
+ x
2142
+ )
2143
+ }
2144
+ ), (l || p) && /* @__PURE__ */ d.createElement("div", { className: "flex h-full items-center gap-2" }, l && /* @__PURE__ */ d.createElement("div", { className: "flex h-full items-center pb-0.5 text-light-400 hover:text-light-600" }, l), p && /* @__PURE__ */ d.createElement("div", { className: "flex h-full items-center gap-1 leading-none text-light-700" }, p)), E && /* @__PURE__ */ d.createElement(
2145
+ "button",
2146
+ {
2147
+ type: "button",
2148
+ onClick: E.onClick,
2149
+ disabled: E.disabled || c,
2150
+ className: K({ size: i })
2151
+ },
2152
+ /* @__PURE__ */ d.createElement("span", null, E.value),
2153
+ /* @__PURE__ */ d.createElement(Z, { className: "size-5 text-light-500" })
2154
+ ));
2155
+ return /* @__PURE__ */ d.createElement("div", { className: g(n ? Ct : gt({ size: i }), N) }, t && /* @__PURE__ */ d.createElement("label", { className: n ? St({ error: a }) : bt({ error: a }) }, t, s && /* @__PURE__ */ d.createElement("span", { className: "text-error-400" }, "*")), L ? /* @__PURE__ */ d.createElement("div", { className: vt({ size: i, error: a, disabled: c }) }, f && /* @__PURE__ */ d.createElement("div", { className: wt({ size: i }) }, f), /* @__PURE__ */ d.createElement("div", { className: yt({ size: i, disabled: c }) }, S), w && /* @__PURE__ */ d.createElement(
2156
+ "button",
2157
+ {
2158
+ type: "button",
2159
+ onClick: w.onClick,
2160
+ disabled: w.disabled || c,
2161
+ className: Et({ size: i })
2162
+ },
2163
+ w.icon,
2164
+ /* @__PURE__ */ d.createElement("span", null, w.label)
2165
+ )) : /* @__PURE__ */ d.createElement("div", { className: n ? kt({ size: i, error: a, disabled: c }) : ft({ size: i, error: a, disabled: c }) }, S), k && typeof y == "string" && /* @__PURE__ */ d.createElement("div", { className: "text-right text-xs text-light-400" }, y.length, "/", k), r && /* @__PURE__ */ d.createElement("p", { className: xt({ error: a }) }, r));
2166
+ }
2167
+ function zt({ children: t }) {
2168
+ return /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-light-500" }, t);
2169
+ }
2170
+ function Lt({ children: t }) {
2171
+ return /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-light-500" }, t);
2172
+ }
2173
+ var Bt = {
2174
+ outline: {
2175
+ xmlns: "http://www.w3.org/2000/svg",
2176
+ width: 24,
2177
+ height: 24,
2178
+ viewBox: "0 0 24 24",
2179
+ fill: "none",
2180
+ stroke: "currentColor",
2181
+ strokeWidth: 2,
2182
+ strokeLinecap: "round",
2183
+ strokeLinejoin: "round"
2184
+ },
2185
+ filled: {
2186
+ xmlns: "http://www.w3.org/2000/svg",
2187
+ width: 24,
2188
+ height: 24,
2189
+ viewBox: "0 0 24 24",
2190
+ fill: "currentColor",
2191
+ stroke: "none"
2192
+ }
2193
+ };
2194
+ const Tt = (t, s, r, l) => {
2195
+ const i = pe(
2196
+ ({ color: a = "currentColor", size: c = 24, stroke: n = 2, title: u, className: o, children: m, ...p }, f) => M(
2197
+ "svg",
2198
+ {
2199
+ ref: f,
2200
+ ...Bt[t],
2201
+ width: c,
2202
+ height: c,
2203
+ className: ["tabler-icon", `tabler-icon-${s}`, o].join(" "),
2204
+ strokeWidth: n,
2205
+ stroke: a,
2206
+ ...p
2207
+ },
2208
+ [
2209
+ u && M("title", { key: "svg-title" }, u),
2210
+ ...l.map(([h, E]) => M(h, E)),
2211
+ ...Array.isArray(m) ? m : [m]
2212
+ ]
2213
+ )
2214
+ );
2215
+ return i.displayName = `${r}`, i;
2216
+ };
2217
+ const Vt = [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]], ne = Tt("outline", "chevron-down", "ChevronDown", Vt);
2218
+ function Wr({
2219
+ size: t = "md",
2220
+ label: s,
2221
+ required: r,
2222
+ hint: l,
2223
+ error: i,
2224
+ disabled: a,
2225
+ placeholder: c = "+1 (555) 000-0000",
2226
+ rightIcon: n,
2227
+ value: u,
2228
+ onChange: o,
2229
+ className: m,
2230
+ wrapperClassName: p
2231
+ }) {
2232
+ return /* @__PURE__ */ d.createElement(
2233
+ j,
2234
+ {
2235
+ size: t,
2236
+ label: s,
2237
+ required: r,
2238
+ hint: l,
2239
+ error: i,
2240
+ disabled: a,
2241
+ placeholder: c,
2242
+ rightIcon: n,
2243
+ value: u,
2244
+ onChange: o,
2245
+ className: m,
2246
+ wrapperClassName: p,
2247
+ prefix: /* @__PURE__ */ d.createElement("div", { className: "flex items-center gap-1 pr-2 text-sm text-light-700" }, /* @__PURE__ */ d.createElement("span", null, "US"), /* @__PURE__ */ d.createElement(ne, { size: 14 }))
2248
+ }
2249
+ );
2250
+ }
2251
+ function Rr({
2252
+ size: t = "md",
2253
+ label: s,
2254
+ required: r,
2255
+ hint: l,
2256
+ error: i,
2257
+ disabled: a,
2258
+ value: c,
2259
+ placeholder: n = "1,000.00",
2260
+ currency: u = "USD",
2261
+ onCurrencyChange: o,
2262
+ rightIcon: m,
2263
+ onChange: p,
2264
+ className: f,
2265
+ wrapperClassName: h
2266
+ }) {
2267
+ return /* @__PURE__ */ d.createElement(
2268
+ j,
2269
+ {
2270
+ size: t,
2271
+ label: s,
2272
+ required: r,
2273
+ hint: l,
2274
+ error: i,
2275
+ disabled: a,
2276
+ value: c,
2277
+ placeholder: n,
2278
+ rightIcon: m,
2279
+ onChange: p,
2280
+ className: f,
2281
+ wrapperClassName: h,
2282
+ prefix: /* @__PURE__ */ d.createElement("span", { className: "select-none text-sm text-light-700" }, "$"),
2283
+ suffix: /* @__PURE__ */ d.createElement(
2284
+ "button",
2285
+ {
2286
+ type: "button",
2287
+ disabled: a,
2288
+ onClick: o,
2289
+ className: "flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"
2290
+ },
2291
+ u,
2292
+ /* @__PURE__ */ d.createElement(ne, { size: 14 })
2293
+ )
2294
+ }
2295
+ );
2296
+ }
2297
+ function Mr({
2298
+ size: t = "md",
2299
+ label: s,
2300
+ required: r,
2301
+ hint: l,
2302
+ disabled: i,
2303
+ error: a,
2304
+ className: c,
2305
+ wrapperClassName: n,
2306
+ value: u,
2307
+ maxLength: o,
2308
+ placeholder: m,
2309
+ onChange: p
2310
+ }) {
2311
+ const f = u.length > o, h = a || f;
2312
+ return /* @__PURE__ */ d.createElement(
2313
+ j,
2314
+ {
2315
+ size: t,
2316
+ label: s,
2317
+ required: r,
2318
+ disabled: i,
2319
+ error: h,
2320
+ value: u,
2321
+ placeholder: m,
2322
+ onChange: p,
2323
+ className: c,
2324
+ wrapperClassName: n,
2325
+ hint: l,
2326
+ suffix: /* @__PURE__ */ d.createElement(
2327
+ "span",
2328
+ {
2329
+ className: g(
2330
+ "text-caption-lg",
2331
+ f ? "text-error-600" : "text-light-400"
2332
+ )
2333
+ },
2334
+ u.length,
2335
+ "/",
2336
+ o
2337
+ )
2338
+ }
2339
+ );
2340
+ }
2341
+ function Ar({
2342
+ size: t = "md",
2343
+ label: s = "Card number",
2344
+ required: r,
2345
+ hint: l,
2346
+ error: i,
2347
+ disabled: a,
2348
+ placeholder: c = "Card number",
2349
+ value: n,
2350
+ onChange: u,
2351
+ rightIcon: o,
2352
+ prefix: m,
2353
+ className: p,
2354
+ wrapperClassName: f
2355
+ }) {
2356
+ return /* @__PURE__ */ d.createElement(
2357
+ j,
2358
+ {
2359
+ size: t,
2360
+ label: s,
2361
+ required: r,
2362
+ hint: l,
2363
+ error: i,
2364
+ disabled: a,
2365
+ placeholder: c,
2366
+ value: n,
2367
+ onChange: u,
2368
+ rightIcon: o,
2369
+ className: p,
2370
+ wrapperClassName: f,
2371
+ prefix: m ?? /* @__PURE__ */ d.createElement(
2372
+ "img",
2373
+ {
2374
+ src: "/stories/assets/mastercard.png",
2375
+ alt: "mastercard",
2376
+ className: "h-4 w-6 object-contain"
2377
+ }
2378
+ ),
2379
+ inputMode: "numeric",
2380
+ autoComplete: "cc-number"
2381
+ }
2382
+ );
2383
+ }
2384
+ const oe = j;
2385
+ oe.Prefix = zt;
2386
+ oe.Suffix = Lt;
2387
+ const jt = "flex flex-col gap-1 w-full max-w-[320px]", It = b("flex items-center gap-1 font-bold text-sm", {
2388
+ variants: {
2389
+ error: {
2390
+ true: "",
2391
+ false: "text-light-800"
2392
+ }
2393
+ },
2394
+ defaultVariants: {
2395
+ error: !1
2396
+ }
2397
+ }), Ot = b(
2398
+ [
2399
+ "flex w-full gap-2 border rounded-lg p-3 bg-white",
2400
+ "transition-[border-color,border-width]"
2401
+ ],
2402
+ {
2403
+ variants: {
2404
+ error: {
2405
+ true: [
2406
+ "border-error-200",
2407
+ "focus-within:border-2 focus-within:border-error-500"
2408
+ ],
2409
+ false: [
2410
+ "border-light-200",
2411
+ "focus-within:border-2 focus-within:border-primary-500"
2412
+ ]
2413
+ },
2414
+ disabled: {
2415
+ true: "bg-light-100 cursor-not-allowed",
2416
+ false: ""
2417
+ }
2418
+ },
2419
+ defaultVariants: {
2420
+ error: !1,
2421
+ disabled: !1
2422
+ }
2423
+ }
2424
+ ), _t = b(
2425
+ [
2426
+ "flex-1 min-h-[132px] bg-transparent outline-none text-caption-lg text-light-900",
2427
+ "placeholder:text-light-500",
2428
+ "disabled:text-light-400 disabled:cursor-not-allowed disabled:resize-none"
2429
+ ],
2430
+ {
2431
+ variants: {
2432
+ resizable: {
2433
+ true: "resize-y",
2434
+ false: "resize-none"
2435
+ }
2436
+ },
2437
+ defaultVariants: {
2438
+ resizable: !0
2439
+ }
2440
+ }
2441
+ ), $t = b("text-caption-lg", {
2442
+ variants: {
2443
+ error: {
2444
+ true: "text-error-500",
2445
+ false: "text-light-700"
2446
+ }
2447
+ },
2448
+ defaultVariants: {
2449
+ error: !1
2450
+ }
2451
+ }), Wt = ({ error: t, disabled: s }) => g(
2452
+ "flex w-full gap-2 rounded-lg border bg-white p-2 transition-[border-color,border-width]",
2453
+ t ? "border-error-200 focus-within:border-2 focus-within:border-error-500" : "border-light-200 focus-within:border-2 focus-within:border-primary-500",
2454
+ s && "bg-light-100 cursor-not-allowed"
2455
+ ), Rt = ({ error: t }) => g("flex items-center gap-1 text-caption-sm font-semibold", t ? "" : "text-light-800"), Mt = (t) => g("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900", "placeholder:text-light-500", t ? "resize-y" : "resize-none"), At = "flex flex-col w-full max-w-[320px]", Pt = e.forwardRef(
2456
+ ({
2457
+ label: t,
2458
+ required: s,
2459
+ hint: r,
2460
+ helpIcon: l,
2461
+ error: i = !1,
2462
+ disabled: a = !1,
2463
+ resizable: c = !0,
2464
+ compact: n = !1,
2465
+ rows: u,
2466
+ style: o,
2467
+ className: m,
2468
+ wrapperClassName: p,
2469
+ ...f
2470
+ }, h) => {
2471
+ const E = u ? { minHeight: `${u * 20}px` } : void 0;
2472
+ return /* @__PURE__ */ e.createElement("div", { className: g(n ? At : jt, p) }, t && /* @__PURE__ */ e.createElement("label", { className: n ? Rt({ error: i }) : It({ error: i }) }, t, s && /* @__PURE__ */ e.createElement("span", { className: "text-error-400" }, "*"), l), /* @__PURE__ */ e.createElement("div", { className: n ? Wt({ error: i, disabled: a }) : Ot({ error: i, disabled: a }) }, /* @__PURE__ */ e.createElement(
2473
+ "textarea",
2474
+ {
2475
+ ref: h,
2476
+ disabled: a,
2477
+ rows: u,
2478
+ style: { ...E, ...o },
2479
+ className: g(
2480
+ n ? Mt(c && !a) : _t({ resizable: c && !a }),
2481
+ m
2482
+ ),
2483
+ ...f
2484
+ }
2485
+ )), r && /* @__PURE__ */ e.createElement("p", { className: $t({ error: i }) }, r));
2486
+ }
2487
+ );
2488
+ Pt.displayName = "Textarea";
2489
+ const Dt = b("flex w-[320px] flex-col gap-1"), Gt = b("flex items-center gap-1 text-sm font-bold", {
2490
+ variants: {
2491
+ error: {
2492
+ true: "text-error-600",
2493
+ false: "text-light-800"
2494
+ }
2495
+ }
2496
+ }), Ht = b(["flex items-center", "rounded-lg border bg-white", "overflow-hidden", "transition-colors"], {
2497
+ variants: {
2498
+ size: {
2499
+ sm: "h-9 px-2",
2500
+ md: "h-11 px-3"
2501
+ },
2502
+ error: {
2503
+ true: "border-error-300 focus-within:ring-2 focus-within:ring-error-500",
2504
+ false: "border-light-200 focus-within:ring-2 focus-within:ring-primary-500"
2505
+ },
2506
+ disabled: {
2507
+ true: "bg-light-100 cursor-not-allowed",
2508
+ false: ""
2509
+ }
2510
+ },
2511
+ defaultVariants: {
2512
+ size: "md",
2513
+ error: !1,
2514
+ disabled: !1
2515
+ }
2516
+ }), Ft = b(["flex items-center gap-1", "overflow-x-auto overflow-y-hidden", "whitespace-nowrap", "scrollbar-hide", "flex-1"]), Kt = b("flex shrink-0 items-center gap-1 rounded-md bg-white border border-light-200 px-2 py-1 text-caption-lg text-light-800"), Zt = b(["min-w-[120px]", "bg-transparent outline-none", "text-light-900 placeholder:text-light-500"], {
2517
+ variants: {
2518
+ disabled: {
2519
+ true: "cursor-not-allowed text-light-400",
2520
+ false: ""
2521
+ }
2522
+ }
2523
+ }), Ut = b("text-caption-lg", {
2524
+ variants: {
2525
+ error: {
2526
+ true: "text-error-600",
2527
+ false: "text-light-700"
2528
+ }
2529
+ }
2530
+ });
2531
+ function Pr({
2532
+ size: t = "md",
2533
+ label: s,
2534
+ required: r,
2535
+ hint: l,
2536
+ error: i = !1,
2537
+ disabled: a = !1,
2538
+ placeholder: c = "Add items",
2539
+ rightIcon: n,
2540
+ className: u,
2541
+ wrapperClassName: o,
2542
+ options: m,
2543
+ value: p = [],
2544
+ onChange: f
2545
+ }) {
2546
+ const h = ge(), [E, w] = be(""), k = (x) => {
2547
+ const N = m.find((C) => C.label === x);
2548
+ N && (p.some((C) => C.id === N.id) || (f?.([...p, N]), w("")));
2549
+ }, y = (x) => {
2550
+ f?.(p.filter((N) => N.id !== x));
2551
+ };
2552
+ return /* @__PURE__ */ d.createElement("div", { className: g(Dt(), o) }, s && /* @__PURE__ */ d.createElement("label", { className: Gt({ error: i }) }, s, r && /* @__PURE__ */ d.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ d.createElement("div", { className: Ht({ size: t, error: i, disabled: a }) }, /* @__PURE__ */ d.createElement("div", { className: Ft() }, p.map((x) => /* @__PURE__ */ d.createElement("span", { key: x.id, className: Kt() }, x.avatar && /* @__PURE__ */ d.createElement(
2553
+ "img",
2554
+ {
2555
+ src: x.avatar,
2556
+ alt: x.label,
2557
+ className: "h-4 w-4 rounded-full"
2558
+ }
2559
+ ), x.label, !a && /* @__PURE__ */ d.createElement(
2560
+ "button",
2561
+ {
2562
+ type: "button",
2563
+ onClick: () => y(x.id),
2564
+ className: "ml-1 text-light-500 hover:text-light-700"
2565
+ },
2566
+ "×"
2567
+ ))), /* @__PURE__ */ d.createElement(
2568
+ "input",
2569
+ {
2570
+ list: h,
2571
+ value: E,
2572
+ onChange: (x) => {
2573
+ w(x.target.value), k(x.target.value);
2574
+ },
2575
+ placeholder: p.length === 0 ? c : "",
2576
+ disabled: a,
2577
+ className: g(Zt({ disabled: a }), u)
2578
+ }
2579
+ ), /* @__PURE__ */ d.createElement("datalist", { id: h }, m.map((x) => /* @__PURE__ */ d.createElement("option", { key: x.id, value: x.label })))), n && /* @__PURE__ */ d.createElement("div", { className: "ml-2 flex shrink-0 items-center text-light-400" }, n)), l && /* @__PURE__ */ d.createElement("p", { className: Ut({ error: i }) }, l));
2580
+ }
2581
+ const qt = b("flex w-[320px] flex-col gap-1"), Qt = b("flex items-center gap-1 font-bold text-sm", {
2582
+ variants: {
2583
+ error: {
2584
+ true: "",
2585
+ false: "text-light-800"
2586
+ }
2587
+ }
2588
+ }), Xt = b("flex items-stretch rounded-lg border bg-white transition-colors", {
2589
+ variants: {
2590
+ error: {
2591
+ true: "",
2592
+ false: "border-light-200"
2593
+ },
2594
+ disabled: {
2595
+ true: "bg-light-100",
2596
+ false: ""
2597
+ }
2598
+ }
2599
+ }), Jt = b("flex items-center px-3 text-sm text-light-500 rounded-l-lg select-none", {
2600
+ variants: {
2601
+ size: {
2602
+ sm: "h-9",
2603
+ md: "h-11"
2604
+ },
2605
+ disabled: {
2606
+ true: "bg-light-100",
2607
+ false: "bg-white"
2608
+ }
2609
+ }
2610
+ }), Yt = "w-px bg-light-200", er = b(["flex flex-1 items-center gap-2 px-3 rounded-r-lg", "transition-shadow", "focus-within:ring-2 focus-within:ring-offset-0"], {
2611
+ variants: {
2612
+ size: {
2613
+ sm: "h-9",
2614
+ md: "h-11"
2615
+ },
2616
+ error: {
2617
+ true: "border border-error-200 focus-within:ring-error-500",
2618
+ false: "focus-within:ring-primary-500"
2619
+ },
2620
+ disabled: {
2621
+ true: "cursor-not-allowed",
2622
+ false: ""
2623
+ }
2624
+ }
2625
+ }), tr = b("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500", {
2626
+ variants: {
2627
+ disabled: {
2628
+ true: "text-light-400 cursor-not-allowed",
2629
+ false: ""
2630
+ }
2631
+ }
2632
+ }), rr = b("text-caption-lg", {
2633
+ variants: {
2634
+ error: {
2635
+ true: "text-error-600",
2636
+ false: "text-light-700"
2637
+ }
2638
+ }
2639
+ });
2640
+ function Dr({
2641
+ size: t = "md",
2642
+ label: s,
2643
+ required: r,
2644
+ hint: l,
2645
+ error: i = !1,
2646
+ disabled: a = !1,
2647
+ placeholder: c = "www.cekat.ai",
2648
+ value: n,
2649
+ rightIcon: u,
2650
+ onChange: o,
2651
+ className: m,
2652
+ wrapperClassName: p
2653
+ }) {
2654
+ return /* @__PURE__ */ d.createElement("div", { className: g(qt(), p) }, s && /* @__PURE__ */ d.createElement("label", { className: Qt({ error: i }) }, s, r && /* @__PURE__ */ d.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ d.createElement("div", { className: Xt({ error: i, disabled: a }) }, /* @__PURE__ */ d.createElement("div", { className: Jt({ size: t }) }, "http://"), /* @__PURE__ */ d.createElement("div", { className: Yt }), /* @__PURE__ */ d.createElement("div", { className: er({ size: t, error: i, disabled: a }) }, /* @__PURE__ */ d.createElement(
2655
+ "input",
2656
+ {
2657
+ value: n,
2658
+ onChange: o,
2659
+ placeholder: c,
2660
+ disabled: a,
2661
+ className: g(tr({ disabled: a }), m)
2662
+ }
2663
+ ), u && /* @__PURE__ */ d.createElement("div", { className: "flex items-center text-light-400" }, u))), l && /* @__PURE__ */ d.createElement("p", { className: rr({ error: i }) }, l));
2664
+ }
2665
+ const sr = b("flex w-[320px] flex-col gap-1"), ar = b("flex items-center gap-1 font-bold text-sm", {
2666
+ variants: {
2667
+ error: {
2668
+ true: "text-error-600",
2669
+ false: "text-light-800"
2670
+ }
2671
+ }
2672
+ }), lr = b("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors", {
2673
+ variants: {
2674
+ disabled: {
2675
+ true: "bg-light-100",
2676
+ false: ""
2677
+ }
2678
+ }
2679
+ }), ir = b(["flex flex-1 items-center gap-2 px-3 rounded-l-lg", "transition-shadow", "focus-within:ring-2 focus-within:ring-offset-0"], {
2680
+ variants: {
2681
+ size: {
2682
+ sm: "h-9",
2683
+ md: "h-11"
2684
+ },
2685
+ error: {
2686
+ true: "border border-error-200 focus-within:ring-error-500",
2687
+ false: "focus-within:ring-primary-500"
2688
+ },
2689
+ disabled: {
2690
+ true: "cursor-not-allowed",
2691
+ false: ""
2692
+ }
2693
+ }
2694
+ }), nr = b("w-px transition-colors", {
2695
+ variants: {
2696
+ error: {
2697
+ true: "focus:bg-error-200 group-focus-within:bg-error-500",
2698
+ false: "focus:bg-light-200 group-focus-within:bg-primary-500"
2699
+ }
2700
+ }
2701
+ }), or = b("flex items-center gap-1 px-3 text-sm text-light-700 rounded-r-lg select-none", {
2702
+ variants: {
2703
+ size: {
2704
+ sm: "h-9",
2705
+ md: "h-11"
2706
+ },
2707
+ disabled: {
2708
+ true: "bg-white",
2709
+ false: "bg-white"
2710
+ }
2711
+ }
2712
+ }), cr = b("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500", {
2713
+ variants: {
2714
+ disabled: {
2715
+ true: "text-light-400 cursor-not-allowed",
2716
+ false: ""
2717
+ }
2718
+ }
2719
+ }), dr = b("text-caption-lg", {
2720
+ variants: {
2721
+ error: {
2722
+ true: "text-error-600",
2723
+ false: "text-light-700"
2724
+ }
2725
+ }
2726
+ });
2727
+ function Gr({
2728
+ size: t = "md",
2729
+ label: s,
2730
+ required: r,
2731
+ hint: l,
2732
+ error: i = !1,
2733
+ disabled: a = !1,
2734
+ placeholder: c = "www.cekat.ai",
2735
+ value: n,
2736
+ rightIcon: u,
2737
+ suffix: o,
2738
+ onChange: m,
2739
+ className: p,
2740
+ wrapperClassName: f
2741
+ }) {
2742
+ return /* @__PURE__ */ d.createElement("div", { className: g(sr(), f) }, s && /* @__PURE__ */ d.createElement("label", { className: ar({ error: i }) }, s, r && /* @__PURE__ */ d.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ d.createElement("div", { className: lr({ disabled: a }) }, /* @__PURE__ */ d.createElement("div", { className: ir({ size: t, error: i, disabled: a }) }, /* @__PURE__ */ d.createElement(
2743
+ "input",
2744
+ {
2745
+ value: n,
2746
+ onChange: m,
2747
+ placeholder: c,
2748
+ disabled: a,
2749
+ className: g(cr({ disabled: a }), p)
2750
+ }
2751
+ ), u && /* @__PURE__ */ d.createElement("div", { className: "text-light-400" }, u)), /* @__PURE__ */ d.createElement("div", { className: nr({ error: i }) }), /* @__PURE__ */ d.createElement("div", { className: or({ size: t, disabled: a }) }, o)), l && /* @__PURE__ */ d.createElement("p", { className: dr({ error: i }) }, l));
2752
+ }
2753
+ const ur = b("flex w-full max-w-[320px] flex-col gap-1"), mr = b(
2754
+ "flex items-center gap-1 text-sm font-bold text-light-800"
2755
+ ), U = b(
2756
+ [
2757
+ "flex w-full items-center border bg-white text-left",
2758
+ "transition-[border-color,border-width]"
2759
+ ],
2760
+ {
2761
+ variants: {
2762
+ size: {
2763
+ xs: "h-7 gap-1 rounded px-2 text-caption-sm",
2764
+ sm: "h-9 gap-2 rounded-lg px-3 text-caption-lg",
2765
+ md: "h-11 gap-2 rounded-lg px-3 text-body-sm"
2766
+ },
2767
+ open: {
2768
+ true: "border-2 border-primary-500",
2769
+ false: "border-light-200 focus-within:border-2 focus-within:border-primary-500"
2770
+ },
2771
+ disabled: {
2772
+ true: "cursor-not-allowed bg-light-100",
2773
+ false: "cursor-pointer"
2774
+ }
2775
+ },
2776
+ defaultVariants: { size: "md", open: !1, disabled: !1 }
2777
+ }
2778
+ ), pr = b(
2779
+ [
2780
+ "absolute left-0 top-full z-10 mt-2 w-full overflow-y-auto",
2781
+ "rounded-lg border border-light-200 bg-white py-1",
2782
+ "shadow-[0_12px_16px_-4px_rgba(16,24,40,0.08),0_4px_6px_-2px_rgba(16,24,40,0.03)]"
2783
+ ],
2784
+ {
2785
+ variants: {
2786
+ size: {
2787
+ xs: "max-h-52",
2788
+ sm: "max-h-64",
2789
+ md: "max-h-80"
2790
+ }
2791
+ },
2792
+ defaultVariants: { size: "md" }
2793
+ }
2794
+ ), q = b(
2795
+ "flex w-full items-center rounded-md text-left",
2796
+ {
2797
+ variants: {
2798
+ size: {
2799
+ xs: "gap-1 px-2 py-1 text-caption-sm",
2800
+ sm: "gap-2 px-3 py-1.5 text-caption-lg",
2801
+ md: "gap-2 py-2.5 pl-4 pr-2.5 text-body-sm"
2802
+ },
2803
+ disabled: {
2804
+ true: "cursor-not-allowed text-light-400",
2805
+ false: "cursor-pointer hover:bg-light-50"
2806
+ }
2807
+ },
2808
+ defaultVariants: { size: "md", disabled: !1 }
2809
+ }
2810
+ ), gr = b("text-caption-lg text-light-700"), br = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
2811
+ "path",
2812
+ {
2813
+ d: "M5 7.5L10 12.5L15 7.5",
2814
+ stroke: "currentColor",
2815
+ strokeWidth: "1.67",
2816
+ strokeLinecap: "round",
2817
+ strokeLinejoin: "round"
2818
+ }
2819
+ )), fr = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
2820
+ "path",
2821
+ {
2822
+ d: "M17.5 17.5L14.1 14.1M16 9.25C16 12.98 12.98 16 9.25 16C5.52 16 2.5 12.98 2.5 9.25C2.5 5.52 5.52 2.5 9.25 2.5C12.98 2.5 16 5.52 16 9.25Z",
2823
+ stroke: "currentColor",
2824
+ strokeWidth: "1.67",
2825
+ strokeLinecap: "round",
2826
+ strokeLinejoin: "round"
2827
+ }
2828
+ )), hr = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
2829
+ "path",
2830
+ {
2831
+ d: "M16.67 5L7.5 14.17L3.33 10",
2832
+ stroke: "currentColor",
2833
+ strokeWidth: "1.67",
2834
+ strokeLinecap: "round",
2835
+ strokeLinejoin: "round"
2836
+ }
2837
+ )), A = {
2838
+ xs: "size-4",
2839
+ sm: "size-5",
2840
+ md: "size-6"
2841
+ }, Q = {
2842
+ xs: "size-4",
2843
+ sm: "size-5",
2844
+ md: "size-5"
2845
+ }, xr = {
2846
+ xs: "text-caption-sm",
2847
+ sm: "text-caption-lg",
2848
+ md: "text-body-sm"
2849
+ }, vr = {
2850
+ xs: "h-7",
2851
+ sm: "h-[30px]",
2852
+ md: "h-[34px]"
2853
+ }, X = ({ size: t, open: s, disabled: r }) => g(
2854
+ "flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",
2855
+ xr[t],
2856
+ vr[t],
2857
+ s ? "border-2 border-primary-500" : "border-light-200 focus-within:border-2 focus-within:border-primary-500",
2858
+ r ? "cursor-not-allowed bg-light-100" : "cursor-pointer"
2859
+ ), yr = () => "flex items-center gap-1 text-caption-sm font-semibold text-light-800", wr = "flex w-full max-w-[320px] flex-col";
2860
+ function Hr({
2861
+ size: t = "md",
2862
+ type: s = "default",
2863
+ label: r,
2864
+ required: l,
2865
+ helpIcon: i,
2866
+ hint: a,
2867
+ placeholder: c = "Select option",
2868
+ disabled: n = !1,
2869
+ compact: u = !1,
2870
+ leadingIcon: o,
2871
+ options: m,
2872
+ value: p = null,
2873
+ onChange: f,
2874
+ values: h = [],
2875
+ onValuesChange: E,
2876
+ className: w,
2877
+ wrapperClassName: k
2878
+ }) {
2879
+ const [y, x] = e.useState(!1), [N, C] = e.useState(""), L = e.useRef(null), S = e.useRef(null), z = s === "tags", V = s === "search" || z, T = m.find((v) => v.id === p) ?? null, $ = m.filter((v) => h.includes(v.id)), W = N ? m.filter(
2880
+ (v) => `${v.label} ${v.supportingText ?? ""}`.toLowerCase().includes(N.toLowerCase())
2881
+ ) : m, I = () => {
2882
+ x(!1), C("");
2883
+ };
2884
+ e.useEffect(() => {
2885
+ if (!y) return;
2886
+ const v = (B) => {
2887
+ L.current?.contains(B.target) || I();
2888
+ };
2889
+ return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
2890
+ }, [y]), e.useEffect(() => {
2891
+ y && V && S.current?.focus();
2892
+ }, [y, V]);
2893
+ const P = () => {
2894
+ n || (y ? I() : x(!0));
2895
+ }, R = (v) => {
2896
+ v.disabled || (z ? (E?.(
2897
+ h.includes(v.id) ? h.filter((B) => B !== v.id) : [...h, v.id]
2898
+ ), C(""), S.current?.focus()) : (f?.(v), I()));
2899
+ }, ce = (v) => {
2900
+ if (v.key === "Enter") {
2901
+ v.preventDefault();
2902
+ const B = W.find((me) => !me.disabled);
2903
+ y && B && R(B);
2904
+ } else v.key === "Backspace" && z && !N && h.length ? E?.(h.slice(0, -1)) : y || x(!0);
2905
+ }, D = (v) => v.avatar ? /* @__PURE__ */ e.createElement(
2906
+ "img",
2907
+ {
2908
+ src: v.avatar,
2909
+ alt: "",
2910
+ className: g(A[t], "shrink-0 rounded-full object-cover")
2911
+ }
2912
+ ) : v.icon ? /* @__PURE__ */ e.createElement(
2913
+ "span",
2914
+ {
2915
+ className: g(
2916
+ A[t],
2917
+ "flex shrink-0 items-center justify-center",
2918
+ n ? "text-light-400" : "text-light-500"
2919
+ )
2920
+ },
2921
+ v.icon
2922
+ ) : v.dot ? /* @__PURE__ */ e.createElement(
2923
+ "span",
2924
+ {
2925
+ className: "size-2 shrink-0 rounded-full",
2926
+ style: { backgroundColor: n ? "#d0d5dd" : v.dot }
2927
+ }
2928
+ ) : null, de = T ? D(T) : o ? /* @__PURE__ */ e.createElement(
2929
+ "span",
2930
+ {
2931
+ className: g(
2932
+ A[t],
2933
+ "flex shrink-0 items-center justify-center",
2934
+ n ? "text-light-400" : "text-light-500"
2935
+ )
2936
+ },
2937
+ o
2938
+ ) : null, G = T ? /* @__PURE__ */ e.createElement("span", { className: "flex min-w-0 items-center gap-2 whitespace-nowrap" }, /* @__PURE__ */ e.createElement(
2939
+ "span",
2940
+ {
2941
+ className: g(
2942
+ "truncate font-medium",
2943
+ n ? "text-light-400" : "text-light-800"
2944
+ )
2945
+ },
2946
+ T.label
2947
+ ), T.supportingText && /* @__PURE__ */ e.createElement("span", { className: n ? "text-light-400" : "text-light-700" }, T.supportingText)) : /* @__PURE__ */ e.createElement("span", { className: n ? "text-light-400" : "text-light-500" }, c), ue = y && /* @__PURE__ */ e.createElement("div", { role: "listbox", className: pr({ size: t }) }, W.length === 0 && /* @__PURE__ */ e.createElement("div", { className: g(q({ size: t }), "mx-1 w-auto text-light-500 hover:bg-transparent") }, "No options found"), W.map((v) => {
2948
+ const B = z ? h.includes(v.id) : v.id === p;
2949
+ return /* @__PURE__ */ e.createElement("div", { key: v.id, className: "px-1 py-0.5" }, /* @__PURE__ */ e.createElement(
2950
+ "button",
2951
+ {
2952
+ type: "button",
2953
+ role: "option",
2954
+ "aria-selected": B,
2955
+ disabled: v.disabled,
2956
+ onClick: () => R(v),
2957
+ className: q({ size: t, disabled: v.disabled })
2958
+ },
2959
+ D(v),
2960
+ /* @__PURE__ */ e.createElement("span", { className: "flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap" }, /* @__PURE__ */ e.createElement(
2961
+ "span",
2962
+ {
2963
+ className: g(
2964
+ "truncate font-medium",
2965
+ v.disabled ? "text-light-400" : "text-light-900"
2966
+ )
2967
+ },
2968
+ v.label
2969
+ ), v.supportingText && /* @__PURE__ */ e.createElement(
2970
+ "span",
2971
+ {
2972
+ className: v.disabled ? "text-light-400" : "text-light-700"
2973
+ },
2974
+ v.supportingText
2975
+ )),
2976
+ B && /* @__PURE__ */ e.createElement(hr, { className: "ml-auto size-5 shrink-0 text-primary-500" })
2977
+ ));
2978
+ }));
2979
+ return /* @__PURE__ */ e.createElement("div", { ref: L, className: g(u ? wr : ur(), k) }, r && /* @__PURE__ */ e.createElement("label", { className: u ? yr() : mr() }, r, l && /* @__PURE__ */ e.createElement("span", { className: "text-error-400" }, "*"), i), /* @__PURE__ */ e.createElement(
2980
+ "div",
2981
+ {
2982
+ className: "relative",
2983
+ onKeyDown: (v) => {
2984
+ v.key === "Escape" && I();
2985
+ }
2986
+ },
2987
+ s === "default" ? /* @__PURE__ */ e.createElement(
2988
+ "button",
2989
+ {
2990
+ type: "button",
2991
+ "aria-haspopup": "listbox",
2992
+ "aria-expanded": y,
2993
+ disabled: n,
2994
+ onClick: P,
2995
+ className: g(u ? X({ size: t, open: y, disabled: n }) : U({ size: t, open: y, disabled: n }), w)
2996
+ },
2997
+ de,
2998
+ /* @__PURE__ */ e.createElement("span", { className: "flex min-w-0 flex-1 items-center" }, G),
2999
+ /* @__PURE__ */ e.createElement(
3000
+ br,
3001
+ {
3002
+ className: g(Q[t], "shrink-0 text-light-500")
3003
+ }
3004
+ )
3005
+ ) : /* @__PURE__ */ e.createElement(
3006
+ "div",
3007
+ {
3008
+ role: "combobox",
3009
+ "aria-haspopup": "listbox",
3010
+ "aria-expanded": y,
3011
+ onClick: P,
3012
+ className: g(u ? X({ size: t, open: y, disabled: n }) : U({ size: t, open: y, disabled: n }), w)
3013
+ },
3014
+ /* @__PURE__ */ e.createElement(
3015
+ fr,
3016
+ {
3017
+ className: g(
3018
+ Q[t],
3019
+ "shrink-0",
3020
+ n ? "text-light-400" : "text-light-500"
3021
+ )
3022
+ }
3023
+ ),
3024
+ z && $.length > 0 && /* @__PURE__ */ e.createElement("div", { className: "flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide" }, $.map((v) => /* @__PURE__ */ e.createElement(
3025
+ ae,
3026
+ {
3027
+ key: v.id,
3028
+ size: "sm",
3029
+ disabled: n,
3030
+ icon: v.avatar ? /* @__PURE__ */ e.createElement(
3031
+ "img",
3032
+ {
3033
+ src: v.avatar,
3034
+ alt: "",
3035
+ className: "size-4 shrink-0 rounded-full object-cover"
3036
+ }
3037
+ ) : void 0,
3038
+ onClose: () => R(v)
3039
+ },
3040
+ v.label
3041
+ ))),
3042
+ !z && !y && T ? /* @__PURE__ */ e.createElement("span", { className: "flex min-w-0 flex-1 items-center" }, G) : /* @__PURE__ */ e.createElement(
3043
+ "input",
3044
+ {
3045
+ ref: S,
3046
+ value: N,
3047
+ disabled: n,
3048
+ placeholder: z && $.length > 0 ? "" : c,
3049
+ onChange: (v) => {
3050
+ C(v.target.value), y || x(!0);
3051
+ },
3052
+ onKeyDown: ce,
3053
+ className: "min-w-8 flex-1 bg-transparent text-light-900 outline-none placeholder:text-light-500 disabled:cursor-not-allowed disabled:placeholder:text-light-400"
3054
+ }
3055
+ )
3056
+ ),
3057
+ ue
3058
+ ), a && /* @__PURE__ */ e.createElement("p", { className: gr() }, a));
3059
+ }
3060
+ const Er = b(
3061
+ [
3062
+ "inline-flex items-center justify-center gap-1 shrink-0",
3063
+ "rounded-md border border-light-200 bg-white px-2 py-1",
3064
+ "font-bold text-caption-sm text-light-900",
3065
+ "transition-shadow"
3066
+ ],
3067
+ {
3068
+ variants: {
3069
+ open: {
3070
+ true: "shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",
3071
+ false: ""
3072
+ },
3073
+ disabled: {
3074
+ true: "cursor-not-allowed opacity-50",
3075
+ false: "cursor-pointer"
3076
+ }
3077
+ },
3078
+ defaultVariants: { open: !1, disabled: !1 }
3079
+ }
3080
+ ), Nr = b(
3081
+ "flex size-5 shrink-0 items-center justify-center text-light-500",
3082
+ {
3083
+ variants: {
3084
+ disabled: {
3085
+ true: "cursor-not-allowed opacity-50",
3086
+ false: "cursor-pointer hover:text-light-700"
3087
+ }
3088
+ },
3089
+ defaultVariants: { disabled: !1 }
3090
+ }
3091
+ ), kr = b(
3092
+ "rounded-full transition-shadow",
3093
+ {
3094
+ variants: {
3095
+ open: {
3096
+ true: "shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",
3097
+ false: ""
3098
+ },
3099
+ disabled: {
3100
+ true: "cursor-not-allowed opacity-50",
3101
+ false: "cursor-pointer"
3102
+ }
3103
+ },
3104
+ defaultVariants: { open: !1, disabled: !1 }
3105
+ }
3106
+ ), Sr = b([
3107
+ "absolute top-full z-10 mt-2 flex w-60 flex-col overflow-clip",
3108
+ "rounded-lg border border-light-200 bg-white",
3109
+ "shadow-[0px_12px_16px_-4px_rgba(16,24,40,0.08),0px_4px_6px_-2px_rgba(16,24,40,0.03)]"
3110
+ ]), Cr = b(
3111
+ "flex w-full flex-col items-start border-b border-light-200 px-4 py-3"
3112
+ ), zr = b(
3113
+ "flex w-full flex-col items-start overflow-y-auto py-1"
3114
+ ), Lr = b(
3115
+ [
3116
+ "mx-1 flex w-[calc(100%-8px)] items-center gap-3 rounded-md px-4 py-2.5",
3117
+ "text-left font-bold text-caption-lg"
3118
+ ],
3119
+ {
3120
+ variants: {
3121
+ disabled: {
3122
+ true: "cursor-not-allowed text-light-400",
3123
+ false: "cursor-pointer text-light-800 hover:bg-light-50"
3124
+ }
3125
+ },
3126
+ defaultVariants: { disabled: !1 }
3127
+ }
3128
+ ), Br = b(
3129
+ "ml-auto shrink-0 font-normal text-caption-sm text-light-500"
3130
+ ), Tr = b("my-1 h-px w-full bg-light-200"), Vr = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 18 18", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
3131
+ "path",
3132
+ {
3133
+ d: "M4.5 6.75L9 11.25L13.5 6.75",
3134
+ stroke: "currentColor",
3135
+ strokeWidth: "1.67",
3136
+ strokeLinecap: "round",
3137
+ strokeLinejoin: "round"
3138
+ }
3139
+ )), jr = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 18 18", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
3140
+ "path",
3141
+ {
3142
+ d: "M13.5 11.25L9 6.75L4.5 11.25",
3143
+ stroke: "currentColor",
3144
+ strokeWidth: "1.67",
3145
+ strokeLinecap: "round",
3146
+ strokeLinejoin: "round"
3147
+ }
3148
+ )), Ir = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
3149
+ "path",
3150
+ {
3151
+ d: "M10 10.83a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67ZM10 5a.83.83 0 1 0 0-1.67A.83.83 0 0 0 10 5ZM10 16.67a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67Z",
3152
+ stroke: "currentColor",
3153
+ strokeWidth: "1.67",
3154
+ strokeLinecap: "round",
3155
+ strokeLinejoin: "round"
3156
+ }
3157
+ ));
3158
+ function Fr({
3159
+ trigger: t = "button",
3160
+ label: s = "Account",
3161
+ icon: r,
3162
+ avatarSrc: l,
3163
+ avatarInitials: i,
3164
+ header: a,
3165
+ items: c,
3166
+ open: n,
3167
+ defaultOpen: u = !1,
3168
+ onOpenChange: o,
3169
+ disabled: m = !1,
3170
+ align: p = "end",
3171
+ className: f,
3172
+ menuClassName: h
3173
+ }) {
3174
+ const [E, w] = e.useState(u), k = n !== void 0, y = k ? n : E, x = e.useRef(null), N = (S) => {
3175
+ k || w(S), o?.(S);
3176
+ };
3177
+ e.useEffect(() => {
3178
+ if (!y) return;
3179
+ const S = (V) => {
3180
+ x.current?.contains(V.target) || N(!1);
3181
+ }, z = (V) => {
3182
+ V.key === "Escape" && N(!1);
3183
+ };
3184
+ return document.addEventListener("mousedown", S), document.addEventListener("keydown", z), () => {
3185
+ document.removeEventListener("mousedown", S), document.removeEventListener("keydown", z);
3186
+ };
3187
+ }, [y]);
3188
+ const C = () => {
3189
+ m || N(!y);
3190
+ }, L = (S) => {
3191
+ S.disabled || (S.onClick?.(), N(!1));
3192
+ };
3193
+ return /* @__PURE__ */ e.createElement("div", { ref: x, className: g("relative inline-block", f) }, t === "button" && /* @__PURE__ */ e.createElement(
3194
+ "button",
3195
+ {
3196
+ type: "button",
3197
+ "aria-haspopup": "menu",
3198
+ "aria-expanded": y,
3199
+ disabled: m,
3200
+ onClick: C,
3201
+ className: Er({ open: y, disabled: m })
3202
+ },
3203
+ /* @__PURE__ */ e.createElement("span", null, s),
3204
+ y ? /* @__PURE__ */ e.createElement(jr, { className: "size-[18px]" }) : /* @__PURE__ */ e.createElement(Vr, { className: "size-[18px]" })
3205
+ ), t === "icon" && /* @__PURE__ */ e.createElement(
3206
+ "button",
3207
+ {
3208
+ type: "button",
3209
+ "aria-haspopup": "menu",
3210
+ "aria-expanded": y,
3211
+ "aria-label": s,
3212
+ disabled: m,
3213
+ onClick: C,
3214
+ className: Nr({ disabled: m })
3215
+ },
3216
+ r ?? /* @__PURE__ */ e.createElement(Ir, { className: "size-5" })
3217
+ ), t === "avatar" && /* @__PURE__ */ e.createElement(
3218
+ "button",
3219
+ {
3220
+ type: "button",
3221
+ "aria-haspopup": "menu",
3222
+ "aria-expanded": y,
3223
+ "aria-label": s,
3224
+ disabled: m,
3225
+ onClick: C,
3226
+ className: kr({ open: y, disabled: m })
3227
+ },
3228
+ /* @__PURE__ */ e.createElement(_, { src: l, initials: i, size: "md", status: "online" })
3229
+ ), y && /* @__PURE__ */ e.createElement(
3230
+ "div",
3231
+ {
3232
+ role: "menu",
3233
+ className: g(
3234
+ Sr(),
3235
+ p === "end" ? "right-0" : "left-0",
3236
+ h
3237
+ )
3238
+ },
3239
+ a && /* @__PURE__ */ e.createElement("div", { className: Cr() }, /* @__PURE__ */ e.createElement("div", { className: "flex w-full items-center gap-3" }, /* @__PURE__ */ e.createElement(
3240
+ _,
3241
+ {
3242
+ src: a.avatarSrc,
3243
+ initials: a.avatarInitials,
3244
+ size: "md",
3245
+ status: a.status ?? "online"
3246
+ }
3247
+ ), /* @__PURE__ */ e.createElement("div", { className: "flex min-w-0 flex-1 flex-col items-start text-left" }, /* @__PURE__ */ e.createElement("span", { className: "w-full truncate text-sm font-bold text-light-800" }, a.name), a.subtitle && /* @__PURE__ */ e.createElement("span", { className: "w-full truncate text-caption-lg font-normal text-light-700" }, a.subtitle)))),
3248
+ /* @__PURE__ */ e.createElement("div", { className: zr() }, c.map(
3249
+ (S) => S.divider ? /* @__PURE__ */ e.createElement("div", { key: S.id, role: "separator", className: Tr() }) : /* @__PURE__ */ e.createElement(
3250
+ "button",
3251
+ {
3252
+ key: S.id,
3253
+ type: "button",
3254
+ role: "menuitem",
3255
+ disabled: S.disabled,
3256
+ onClick: () => L(S),
3257
+ className: Lr({ disabled: S.disabled })
3258
+ },
3259
+ S.icon && /* @__PURE__ */ e.createElement("span", { className: "flex size-4 shrink-0 items-center justify-center" }, S.icon),
3260
+ /* @__PURE__ */ e.createElement("span", { className: "flex-1 truncate" }, S.label),
3261
+ S.shortcut && /* @__PURE__ */ e.createElement("span", { className: Br() }, S.shortcut)
3262
+ )
3263
+ ))
3264
+ ));
3265
+ }
585
3266
  export {
586
- S as Button,
587
- G as Checkbox,
588
- Q as RadioGroup,
589
- M as RadioGroupItem,
590
- U as Toggle,
591
- q as Tooltip
3267
+ _ as Avatar,
3268
+ rt as AvatarGroup,
3269
+ at as AvatarLabelGroup,
3270
+ it as AvatarProfilePhoto,
3271
+ He as Badge,
3272
+ Ze as BadgeGroup,
3273
+ Y as Button,
3274
+ Ar as CardNumberInput,
3275
+ Ne as Checkbox,
3276
+ Fr as Dropdown,
3277
+ oe as Input,
3278
+ Mr as InputCounter,
3279
+ Hr as InputDropdown,
3280
+ Je as Loading,
3281
+ Pr as MultiSelectInput,
3282
+ Wr as PhoneInput,
3283
+ $r as RadioGroup,
3284
+ ze as RadioGroupItem,
3285
+ Rr as SaleAmountInput,
3286
+ mt as Tab,
3287
+ pt as TabList,
3288
+ ae as Tag,
3289
+ Pt as Textarea,
3290
+ Te as Toggle,
3291
+ Oe as Tooltip,
3292
+ Gr as WebsiteCopyInput,
3293
+ Dr as WebsiteInput
592
3294
  };