tailwind-ux-kit 1.0.44 → 1.0.46

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.
@@ -0,0 +1,14 @@
1
+ import { default as React, ButtonHTMLAttributes, ReactNode } from 'react';
2
+ type Variant = "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "dark" | "light" | "link" | "outline-primary" | "outline-secondary" | "outline-success" | "outline-danger" | "outline-warning" | "outline-info" | "outline-dark" | "outline-light" | "soft-primary" | "soft-secondary" | "soft-success" | "soft-danger" | "soft-warning" | "soft-info" | "soft-dark" | "soft-light";
3
+ type Size = "xs" | "sm" | "md" | "lg" | "xl";
4
+ type Shape = "flat" | "rounded" | "pill" | "circle";
5
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
6
+ children: ReactNode;
7
+ variant?: Variant;
8
+ size?: Size;
9
+ shape?: Shape;
10
+ isLoading?: boolean;
11
+ className?: string;
12
+ }
13
+ declare const Button: React.FC<ButtonProps>;
14
+ export default Button;
package/lib/index.css ADDED
@@ -0,0 +1 @@
1
+ /*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.btn-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media (hover:hover){.btn-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.btn-outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.btn-outline-primary:hover{background-color:var(--color-blue-50,oklch(97% .014 254.604))}}.btn-soft-primary{background-color:var(--color-blue-100,oklch(93.2% .032 255.585));color:var(--color-blue-700,oklch(48.8% .243 264.376))}@media (hover:hover){.btn-soft-primary:hover{background-color:var(--color-blue-200,oklch(88.2% .059 254.128))}}.btn-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media (hover:hover){.btn-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.btn-outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.btn-outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.btn-soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media (hover:hover){.btn-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.btn-outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.btn-outline-danger:hover{background-color:var(--color-red-50,oklch(97.1% .013 17.38))}}.btn-soft-danger{background-color:var(--color-red-100,oklch(93.6% .032 17.717));color:var(--color-red-700,oklch(50.5% .213 27.518))}@media (hover:hover){.btn-soft-danger:hover{background-color:var(--color-red-200,oklch(88.5% .062 18.334))}}.btn-link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media (hover:hover){.btn-link:hover{text-decoration-line:underline}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { default as Input } from './components/Input';
2
2
  export { default as Select } from './components/Select';
3
- export { default as Button } from './components/Button';
3
+ export { default as Button } from './components/Button/Button';
4
4
  export { default as Dropdown } from './components/Dropdown';
5
5
  export { default as Tooltip } from './components/ToolTip';
6
6
  export { default as Badge } from './components/Badge';
@@ -0,0 +1 @@
1
+ /*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.btn-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media (hover:hover){.btn-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.btn-outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.btn-outline-primary:hover{background-color:var(--color-blue-50,oklch(97% .014 254.604))}}.btn-soft-primary{background-color:var(--color-blue-100,oklch(93.2% .032 255.585));color:var(--color-blue-700,oklch(48.8% .243 264.376))}@media (hover:hover){.btn-soft-primary:hover{background-color:var(--color-blue-200,oklch(88.2% .059 254.128))}}.btn-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media (hover:hover){.btn-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.btn-outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.btn-outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.btn-soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media (hover:hover){.btn-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.btn-outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.btn-outline-danger:hover{background-color:var(--color-red-50,oklch(97.1% .013 17.38))}}.btn-soft-danger{background-color:var(--color-red-100,oklch(93.6% .032 17.717));color:var(--color-red-700,oklch(50.5% .213 27.518))}@media (hover:hover){.btn-soft-danger:hover{background-color:var(--color-red-200,oklch(88.5% .062 18.334))}}.btn-link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media (hover:hover){.btn-link:hover{text-decoration-line:underline}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs as h, jsx as g } from "react/jsx-runtime";
2
+ import { jsxs as h, jsx as p } from "react/jsx-runtime";
3
3
  import P, { forwardRef as q, useState as L, useMemo as $, useId as se, useRef as M, useCallback as E, useEffect as A, createContext as X, useContext as Y } from "react";
4
4
  const H = {
5
5
  xs: "text-xs px-2 py-1",
@@ -38,7 +38,7 @@ const H = {
38
38
  label: t,
39
39
  id: r,
40
40
  inputSize: s = "md",
41
- shape: p = "rounded",
41
+ shape: g = "rounded",
42
42
  validate: f,
43
43
  onValidatedChange: c,
44
44
  className: a = "",
@@ -47,8 +47,8 @@ const H = {
47
47
  floatingLabelStyle: d,
48
48
  onChange: l,
49
49
  isValid: i,
50
- isInvalid: x,
51
- feedback: m,
50
+ isInvalid: m,
51
+ feedback: x,
52
52
  feedbackType: y = "invalid",
53
53
  ...w
54
54
  } = e, [S, N] = L("default"), O = P.useCallback(
@@ -57,29 +57,29 @@ const H = {
57
57
  N(I), c == null || c(z, I), l == null || l(z);
58
58
  },
59
59
  [f, c, l]
60
- ), v = $(() => r || (typeof t == "string" ? `input-${t.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [r, t]), b = !!d, C = H[s] || H.md, k = W[p] || W.flat, j = $(
61
- () => ie(S, i, x),
62
- [S, i, x]
60
+ ), v = $(() => r || (typeof t == "string" ? `input-${t.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [r, t]), b = !!d, C = H[s] || H.md, k = W[g] || W.flat, j = $(
61
+ () => ie(S, i, m),
62
+ [S, i, m]
63
63
  ), _ = $(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), B = $(() => u ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [u, o]);
64
64
  return /* @__PURE__ */ h("div", { className: `w-full relative ${b ? "z-0" : ""}`, children: [
65
- !b && t && /* @__PURE__ */ g(
65
+ !b && t && /* @__PURE__ */ p(
66
66
  "label",
67
67
  {
68
68
  htmlFor: v,
69
- className: `block mb-1 text-sm ${i ? "text-green-700 dark:text-green-500" : x ? "text-red-700 dark:text-red-500" : "text-gray-700"}`,
69
+ className: `block mb-1 text-sm ${i ? "text-green-700 dark:text-green-500" : m ? "text-red-700 dark:text-red-500" : "text-gray-700"}`,
70
70
  children: t
71
71
  }
72
72
  ),
73
73
  /* @__PURE__ */ h("div", { className: "relative w-full", children: [
74
- u && /* @__PURE__ */ g(
74
+ u && /* @__PURE__ */ p(
75
75
  "div",
76
76
  {
77
77
  className: `absolute inset-y-0 flex items-center ${_}`,
78
78
  "aria-hidden": "true",
79
- children: /* @__PURE__ */ g("span", { className: "text-gray-500", children: u })
79
+ children: /* @__PURE__ */ p("span", { className: "text-gray-500", children: u })
80
80
  }
81
81
  ),
82
- /* @__PURE__ */ g(
82
+ /* @__PURE__ */ p(
83
83
  "input",
84
84
  {
85
85
  ...w,
@@ -93,7 +93,7 @@ const H = {
93
93
  ${B} ${k} ${j} ${a}`
94
94
  }
95
95
  ),
96
- b && t && d && /* @__PURE__ */ g(
96
+ b && t && d && /* @__PURE__ */ p(
97
97
  "label",
98
98
  {
99
99
  htmlFor: v,
@@ -102,12 +102,12 @@ const H = {
102
102
  }
103
103
  )
104
104
  ] }),
105
- m && /* @__PURE__ */ g(
105
+ x && /* @__PURE__ */ p(
106
106
  "p",
107
107
  {
108
108
  className: `mt-1 text-xs ${y === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
109
109
  role: y === "invalid" ? "alert" : void 0,
110
- children: m
110
+ children: x
111
111
  }
112
112
  )
113
113
  ] });
@@ -126,11 +126,11 @@ const de = {
126
126
  filled: "rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",
127
127
  outlined: "rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",
128
128
  standard: "px-0 py-2.5 bg-transparent border-0 border-b-2"
129
- }, ge = {
129
+ }, pe = {
130
130
  filled: "absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",
131
131
  outlined: "absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",
132
132
  standard: "absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"
133
- }, pe = (e, n, t) => {
133
+ }, ge = (e, n, t) => {
134
134
  if (t)
135
135
  return "border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";
136
136
  if (n)
@@ -151,7 +151,7 @@ const de = {
151
151
  label: t,
152
152
  id: r,
153
153
  inputSize: s = "md",
154
- shape: p = "rounded",
154
+ shape: g = "rounded",
155
155
  validate: f,
156
156
  onValidatedChange: c,
157
157
  className: a = "",
@@ -160,33 +160,33 @@ const de = {
160
160
  floatingLabelStyle: d,
161
161
  onChange: l,
162
162
  isValid: i,
163
- isInvalid: x,
164
- feedback: m,
163
+ isInvalid: m,
164
+ feedback: x,
165
165
  feedbackType: y = "invalid",
166
166
  children: w,
167
167
  ...S
168
168
  } = e, [N, O] = L("default"), v = se(), b = $(() => r || (typeof t == "string" ? `select-${t.toLowerCase().replace(/\s+/g, "-")}` : v), [r, t, v]), C = (I) => {
169
169
  const oe = I.target.value, G = (f == null ? void 0 : f(oe)) ?? "default";
170
170
  O(G), c == null || c(I, G), l == null || l(I);
171
- }, k = !!d, j = de[s], _ = ue[p], B = pe(N, i, x);
171
+ }, k = !!d, j = de[s], _ = ue[g], B = ge(N, i, m);
172
172
  return /* @__PURE__ */ h("div", { className: `w-full relative ${k ? "z-0" : ""}`, children: [
173
- !k && t && /* @__PURE__ */ g(
173
+ !k && t && /* @__PURE__ */ p(
174
174
  "label",
175
175
  {
176
176
  htmlFor: b,
177
- className: `block mb-1 text-sm ${i ? "text-green-700" : x ? "text-red-700" : "text-gray-700"}`,
177
+ className: `block mb-1 text-sm ${i ? "text-green-700" : m ? "text-red-700" : "text-gray-700"}`,
178
178
  children: t
179
179
  }
180
180
  ),
181
181
  /* @__PURE__ */ h("div", { className: "relative w-full", children: [
182
- u && /* @__PURE__ */ g(
182
+ u && /* @__PURE__ */ p(
183
183
  "div",
184
184
  {
185
185
  className: `absolute inset-y-0 flex items-center ${o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
186
- children: /* @__PURE__ */ g("span", { className: "text-gray-500", children: u })
186
+ children: /* @__PURE__ */ p("span", { className: "text-gray-500", children: u })
187
187
  }
188
188
  ),
189
- /* @__PURE__ */ g(
189
+ /* @__PURE__ */ p(
190
190
  "select",
191
191
  {
192
192
  ...S,
@@ -200,44 +200,52 @@ const de = {
200
200
  children: w
201
201
  }
202
202
  ),
203
- k && t && d && /* @__PURE__ */ g(
203
+ k && t && d && /* @__PURE__ */ p(
204
204
  "label",
205
205
  {
206
206
  htmlFor: b,
207
- className: `ms-1 ${ge[d]} ${a}`,
207
+ className: `ms-1 ${pe[d]} ${a}`,
208
208
  children: t
209
209
  }
210
210
  )
211
211
  ] }),
212
- m && /* @__PURE__ */ g(
212
+ x && /* @__PURE__ */ p(
213
213
  "p",
214
214
  {
215
215
  className: `mt-1 text-xs ${y === "invalid" ? "text-red-600" : "text-green-600"}`,
216
- children: m
216
+ children: x
217
217
  }
218
218
  )
219
219
  ] });
220
220
  });
221
221
  be.displayName = "Select";
222
- const xe = {
223
- primary: "bg-blue-600 text-white hover:bg-blue-700",
224
- secondary: "bg-gray-600 text-white hover:bg-gray-700",
225
- success: "bg-green-600 text-white hover:bg-green-700",
226
- danger: "bg-red-600 text-white hover:bg-red-700",
227
- warning: "bg-yellow-500 text-white hover:bg-yellow-600",
228
- info: "bg-cyan-600 text-white hover:bg-cyan-700",
229
- dark: "bg-gray-900 text-white hover:bg-black",
230
- light: "bg-gray-100 text-black hover:bg-gray-200",
231
- link: "bg-transparent text-blue-600 hover:underline [&&]:p-0 [&&]:shadow-none",
232
- "outline-primary": "border border-blue-600 text-blue-600 hover:bg-blue-50",
233
- "outline-secondary": "border border-gray-600 text-gray-600 hover:bg-gray-50",
234
- "outline-success": "border border-green-600 text-green-600 hover:bg-green-50",
235
- "outline-danger": "border border-red-600 text-red-600 hover:bg-red-50",
236
- "outline-warning": "border border-yellow-500 text-yellow-600 hover:bg-yellow-50",
237
- "outline-info": "border border-cyan-600 text-cyan-600 hover:bg-cyan-50",
238
- "outline-dark": "border border-gray-900 text-gray-900 hover:bg-gray-100",
239
- "outline-light": "border border-gray-100 text-gray-500 hover:bg-gray-200"
240
- }, me = {
222
+ const me = {
223
+ primary: "btn-primary",
224
+ secondary: "btn-secondary",
225
+ success: "btn-success",
226
+ danger: "btn-danger",
227
+ warning: "btn-warning",
228
+ info: "btn-info",
229
+ dark: "btn-dark",
230
+ light: "btn-light",
231
+ link: "btn-link",
232
+ "outline-primary": "btn-outline-primary",
233
+ "outline-secondary": "btn-outline-secondary",
234
+ "outline-success": "btn-outline-success",
235
+ "outline-danger": "btn-outline-danger",
236
+ "outline-warning": "btn-outline-warning",
237
+ "outline-info": "btn-outline-info",
238
+ "outline-dark": "btn-outline-dark",
239
+ "outline-light": "btn-outline-light",
240
+ "soft-primary": "btn-soft-primary",
241
+ "soft-secondary": "btn-soft-secondary",
242
+ "soft-success": "btn-soft-success",
243
+ "soft-danger": "btn-soft-danger",
244
+ "soft-warning": "btn-soft-warning",
245
+ "soft-info": "btn-soft-info",
246
+ "soft-dark": "btn-soft-dark",
247
+ "soft-light": "btn-soft-light"
248
+ }, xe = {
241
249
  xs: "px-3 py-2 text-xs",
242
250
  sm: "px-3 py-2 text-sm",
243
251
  md: "px-5 py-2.5 text-sm",
@@ -254,19 +262,19 @@ const xe = {
254
262
  size: t = "md",
255
263
  type: r = "button",
256
264
  shape: s = "rounded",
257
- className: p = "",
265
+ className: g = "",
258
266
  isLoading: f = !1,
259
267
  disabled: c = !1,
260
268
  ...a
261
269
  }) => {
262
270
  const u = c || f, o = [
263
271
  "inline-flex items-center justify-center font-normal transition duration-150 cursor-pointer",
264
- xe[n],
265
- me[t],
272
+ me[n],
273
+ xe[t],
266
274
  he[s],
267
275
  s === "flat" ? "shadow-none" : "shadow-sm",
268
276
  u ? "opacity-50 cursor-not-allowed pointer-events-none" : "",
269
- p
277
+ g
270
278
  ].filter(Boolean).join(" ");
271
279
  return /* @__PURE__ */ h("button", { type: r, className: o, disabled: u, ...a, children: [
272
280
  f && /* @__PURE__ */ h(
@@ -279,14 +287,14 @@ const xe = {
279
287
  fill: "none",
280
288
  xmlns: "http://www.w3.org/2000/svg",
281
289
  children: [
282
- /* @__PURE__ */ g(
290
+ /* @__PURE__ */ p(
283
291
  "path",
284
292
  {
285
293
  d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
286
294
  fill: "currentColor"
287
295
  }
288
296
  ),
289
- /* @__PURE__ */ g(
297
+ /* @__PURE__ */ p(
290
298
  "path",
291
299
  {
292
300
  d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
@@ -303,7 +311,7 @@ const xe = {
303
311
  children: n,
304
312
  position: t = "right"
305
313
  }) => {
306
- const [r, s] = L(!1), [p, f] = L(!1), c = M(null), a = M(null), u = $(() => {
314
+ const [r, s] = L(!1), [g, f] = L(!1), c = M(null), a = M(null), u = $(() => {
307
315
  switch (t) {
308
316
  case "left":
309
317
  return "left-0";
@@ -314,13 +322,13 @@ const xe = {
314
322
  return "right-0";
315
323
  }
316
324
  }, [t]), o = E((i) => {
317
- const x = i.target;
318
- c.current && !c.current.contains(x) && a.current && !a.current.contains(x) && s(!1);
325
+ const m = i.target;
326
+ c.current && !c.current.contains(m) && a.current && !a.current.contains(m) && s(!1);
319
327
  }, []), d = E(() => {
320
328
  if (!a.current || !c.current) return;
321
- const i = a.current.getBoundingClientRect(), x = c.current.getBoundingClientRect(), m = window.innerHeight - i.bottom, y = i.top;
329
+ const i = a.current.getBoundingClientRect(), m = c.current.getBoundingClientRect(), x = window.innerHeight - i.bottom, y = i.top;
322
330
  f(
323
- m < x.height && y > x.height
331
+ x < m.height && y > m.height
324
332
  );
325
333
  }, []);
326
334
  A(() => {
@@ -331,13 +339,13 @@ const xe = {
331
339
  }, [r, d]), A(() => (document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o)), [o]);
332
340
  const l = E(() => s((i) => !i), []);
333
341
  return /* @__PURE__ */ h("div", { className: "relative flex items-center", children: [
334
- /* @__PURE__ */ g("button", { ref: a, onClick: l, children: e }),
335
- r && /* @__PURE__ */ g(
342
+ /* @__PURE__ */ p("button", { ref: a, onClick: l, children: e }),
343
+ r && /* @__PURE__ */ p(
336
344
  "div",
337
345
  {
338
346
  ref: c,
339
347
  className: `absolute z-10 bg-white rounded-sm shadow-md overflow-hidden
340
- ${p ? "bottom-full mb-2" : "top-full mt-2"}
348
+ ${g ? "bottom-full mb-2" : "top-full mt-2"}
341
349
  ${u}`,
342
350
  children: n
343
351
  }
@@ -349,7 +357,7 @@ const xe = {
349
357
  position: t = "top",
350
358
  className: r = "",
351
359
  tooltipClass: s = "",
352
- tooltipStyle: p = {}
360
+ tooltipStyle: g = {}
353
361
  }) => {
354
362
  const f = M(null), c = M(null);
355
363
  A(() => {
@@ -421,7 +429,7 @@ const xe = {
421
429
  };
422
430
  return /* @__PURE__ */ h("div", { ref: f, className: `relative inline-block ${r}`, children: [
423
431
  e,
424
- /* @__PURE__ */ g(
432
+ /* @__PURE__ */ p(
425
433
  "div",
426
434
  {
427
435
  ref: c,
@@ -429,7 +437,7 @@ const xe = {
429
437
  className: s,
430
438
  style: {
431
439
  ...a(t),
432
- ...p
440
+ ...g
433
441
  },
434
442
  children: n
435
443
  }
@@ -470,16 +478,16 @@ const xe = {
470
478
  size: t = "sm",
471
479
  shape: r = "rounded",
472
480
  icon: s,
473
- dismissible: p,
481
+ dismissible: g,
474
482
  onDismiss: f,
475
483
  className: c = "",
476
484
  ...a
477
485
  }) => {
478
486
  const u = !e && !!s, o = `inline-flex items-center font-medium ${ye[n] || ""} ${we[t] || ""} ${ve[r] || ""} ${u ? "justify-center p-2 w-8 h-8" : ""} ` + c;
479
487
  return /* @__PURE__ */ h("span", { className: o.trim(), ...a, children: [
480
- s && /* @__PURE__ */ g("span", { className: e ? "mr-1" : "", children: s }),
488
+ s && /* @__PURE__ */ p("span", { className: e ? "mr-1" : "", children: s }),
481
489
  e,
482
- p && /* @__PURE__ */ g(
490
+ g && /* @__PURE__ */ p(
483
491
  "button",
484
492
  {
485
493
  type: "button",
@@ -501,9 +509,9 @@ function Se(e, n) {
501
509
  if (e == null) return {};
502
510
  var t = Ne(e, n), r, s;
503
511
  if (Object.getOwnPropertySymbols) {
504
- var p = Object.getOwnPropertySymbols(e);
505
- for (s = 0; s < p.length; s++)
506
- r = p[s], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
512
+ var g = Object.getOwnPropertySymbols(e);
513
+ for (s = 0; s < g.length; s++)
514
+ r = g[s], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
507
515
  }
508
516
  return t;
509
517
  }
@@ -580,7 +588,7 @@ function Le(e) {
580
588
  var {
581
589
  attr: r,
582
590
  size: s,
583
- title: p
591
+ title: g
584
592
  } = e, f = Se(e, Ce), c = s || t.size || "1em", a;
585
593
  return t.className && (a = t.className), e.className && (a = (a ? a + " " : "") + e.className), /* @__PURE__ */ P.createElement("svg", D({
586
594
  stroke: "currentColor",
@@ -594,7 +602,7 @@ function Le(e) {
594
602
  height: c,
595
603
  width: c,
596
604
  xmlns: "http://www.w3.org/2000/svg"
597
- }), p && /* @__PURE__ */ P.createElement("title", null, p), e.children);
605
+ }), g && /* @__PURE__ */ P.createElement("title", null, g), e.children);
598
606
  };
599
607
  return K !== void 0 ? /* @__PURE__ */ P.createElement(K.Consumer, null, (t) => n(t)) : n(J);
600
608
  }
@@ -607,25 +615,25 @@ const Fe = ({
607
615
  className: t = "",
608
616
  tileClasses: r = "",
609
617
  open: s,
610
- onChange: p,
618
+ onChange: g,
611
619
  renderTitle: f,
612
620
  renderContent: c
613
621
  }) => {
614
622
  const [a, u] = L(/* @__PURE__ */ new Set()), o = $(() => s ? new Set(s) : a, [s, a]), d = E(
615
623
  (l) => {
616
624
  const i = new Set(o);
617
- i.has(l) ? i.delete(l) : (n || i.clear(), i.add(l)), s && p ? p(Array.from(i)) : u(i);
625
+ i.has(l) ? i.delete(l) : (n || i.clear(), i.add(l)), s && g ? g(Array.from(i)) : u(i);
618
626
  },
619
- [o, s, p, n]
627
+ [o, s, g, n]
620
628
  );
621
- return /* @__PURE__ */ g(
629
+ return /* @__PURE__ */ p(
622
630
  "div",
623
631
  {
624
632
  className: "accordion",
625
633
  role: "region",
626
634
  "aria-multiselectable": n,
627
635
  children: e.map((l) => {
628
- const i = o.has(l.id), x = `accordion-heading-${l.id}`, m = `accordion-panel-${l.id}`;
636
+ const i = o.has(l.id), m = `accordion-heading-${l.id}`, x = `accordion-panel-${l.id}`;
629
637
  return /* @__PURE__ */ h(
630
638
  "div",
631
639
  {
@@ -634,24 +642,24 @@ const Fe = ({
634
642
  /* @__PURE__ */ h(
635
643
  "button",
636
644
  {
637
- id: x,
645
+ id: m,
638
646
  type: "button",
639
647
  "aria-expanded": i,
640
- "aria-controls": m,
648
+ "aria-controls": x,
641
649
  onClick: () => d(l.id),
642
650
  className: `flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${r}`,
643
651
  children: [
644
652
  f ? f(l, i) : l.title,
645
- /* @__PURE__ */ g(Oe, {})
653
+ /* @__PURE__ */ p(Oe, {})
646
654
  ]
647
655
  }
648
656
  ),
649
- /* @__PURE__ */ g(
657
+ /* @__PURE__ */ p(
650
658
  "div",
651
659
  {
652
- id: m,
660
+ id: x,
653
661
  role: "region",
654
- "aria-labelledby": x,
662
+ "aria-labelledby": m,
655
663
  hidden: !i,
656
664
  className: "p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400",
657
665
  children: c ? c(l, i) : l.content
@@ -678,11 +686,11 @@ function Ze({
678
686
  children: t,
679
687
  standalone: r = !1,
680
688
  showFloatingClose: s = !1,
681
- containerClasses: p = "",
689
+ containerClasses: g = "",
682
690
  onClose: f,
683
691
  disableEscapeClose: c = !1
684
692
  }) {
685
- const a = ne(), u = te(), o = !r && !!a && !!u, [d, l] = L(!1), i = o ? a.isOpen(e) : d, x = o ? a.getModalData(e) : null, m = E(() => {
693
+ const a = ne(), u = te(), o = !r && !!a && !!u, [d, l] = L(!1), i = o ? a.isOpen(e) : d, m = o ? a.getModalData(e) : null, x = E(() => {
686
694
  o ? u.closeModal(e) : l(!1), f == null || f();
687
695
  }, [o, u, e, f]);
688
696
  return A(() => {
@@ -711,7 +719,7 @@ function Ze({
711
719
  b.shiftKey ? document.activeElement === k && (b.preventDefault(), j.focus()) : document.activeElement === j && (b.preventDefault(), k.focus());
712
720
  }
713
721
  }, v = (b) => {
714
- b.key === "Escape" && !c && m(), O(b);
722
+ b.key === "Escape" && !c && x(), O(b);
715
723
  };
716
724
  return i && (document.body.style.overflow = "hidden", setTimeout(() => {
717
725
  const b = N();
@@ -719,7 +727,7 @@ function Ze({
719
727
  }, 0), window.addEventListener("keydown", v)), () => {
720
728
  document.body.style.overflow = "", y && y.focus(), window.removeEventListener("keydown", v);
721
729
  };
722
- }, [i, c, m, e]), i ? /* @__PURE__ */ g(
730
+ }, [i, c, x, e]), i ? /* @__PURE__ */ p(
723
731
  "div",
724
732
  {
725
733
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
@@ -727,21 +735,21 @@ function Ze({
727
735
  children: /* @__PURE__ */ h(
728
736
  "div",
729
737
  {
730
- className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${p}`,
738
+ className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${g}`,
731
739
  children: [
732
740
  /* @__PURE__ */ h("div", { className: "flex justify-between items-center relative", children: [
733
- n && /* @__PURE__ */ g("h2", { className: "text-lg font-semibold", children: n }),
734
- s && /* @__PURE__ */ g(
741
+ n && /* @__PURE__ */ p("h2", { className: "text-lg font-semibold", children: n }),
742
+ s && /* @__PURE__ */ p(
735
743
  "button",
736
744
  {
737
- onClick: m,
745
+ onClick: x,
738
746
  className: "text-gray-500 hover:text-black absolute top-2 right-3 hover:bg-gray-200 rounded-full aspect-square w-8",
739
747
  "aria-label": "Close modal",
740
748
  children: "✕"
741
749
  }
742
750
  )
743
751
  ] }),
744
- /* @__PURE__ */ g("div", { className: "mt-3 text-sm text-gray-700", children: typeof t == "function" ? t({ modalData: x }) : t })
752
+ /* @__PURE__ */ p("div", { className: "mt-3 text-sm text-gray-700", children: typeof t == "function" ? t({ modalData: m }) : t })
745
753
  ]
746
754
  }
747
755
  )
@@ -751,7 +759,7 @@ function Ze({
751
759
  function Ge({
752
760
  children: e
753
761
  }) {
754
- const [n, t] = L({}), [r, s] = L({}), p = E((d, l) => {
762
+ const [n, t] = L({}), [r, s] = L({}), g = E((d, l) => {
755
763
  t((i) => ({ ...i, [d]: !0 })), l && s((i) => ({ ...i, [d]: l }));
756
764
  }, []), f = E((d) => {
757
765
  t((l) => ({ ...l, [d]: !1 })), s((l) => {
@@ -762,18 +770,18 @@ function Ge({
762
770
  (d) => r[d],
763
771
  [r]
764
772
  ), u = $(
765
- () => ({ openModal: p, closeModal: f }),
766
- [p, f]
773
+ () => ({ openModal: g, closeModal: f }),
774
+ [g, f]
767
775
  ), o = $(
768
776
  () => ({ isOpen: c, getModalData: a }),
769
777
  [c, a]
770
778
  );
771
- return /* @__PURE__ */ g(ee.Provider, { value: u, children: /* @__PURE__ */ g(re.Provider, { value: o, children: e }) });
779
+ return /* @__PURE__ */ p(ee.Provider, { value: u, children: /* @__PURE__ */ p(re.Provider, { value: o, children: e }) });
772
780
  }
773
781
  function He(e) {
774
782
  const { openModal: n, closeModal: t } = te(), { isOpen: r, getModalData: s } = ne();
775
783
  return {
776
- open: (p) => n(e, p),
784
+ open: (g) => n(e, g),
777
785
  close: () => t(e),
778
786
  isOpen: r(e),
779
787
  data: s(e)
@@ -801,35 +809,35 @@ const Ae = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
801
809
  }), Ue = () => {
802
810
  const [e, n] = L([]);
803
811
  A(() => {
804
- Pe((r, s, p, f) => {
812
+ Pe((r, s, g, f) => {
805
813
  const c = Ae();
806
814
  n((a) => [...a, { id: c, type: r, message: s, config: f }]), setTimeout(() => {
807
815
  n((a) => a.filter((u) => u.id !== c));
808
- }, p);
816
+ }, g);
809
817
  });
810
818
  }, []);
811
819
  const t = je();
812
- return /* @__PURE__ */ g("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((r) => {
813
- var a, u, o, d, l, i, x, m, y, w, S, N, O;
814
- const s = ((a = r.config) == null ? void 0 : a.icon) || ((u = t.icons) == null ? void 0 : u[r.type]) || ze(r.type), p = ((o = r.config) == null ? void 0 : o.bgColor) || ((l = (d = t.colors) == null ? void 0 : d[r.type]) == null ? void 0 : l.bg) || "bg-white dark:bg-gray-800", f = ((i = r.config) == null ? void 0 : i.textColor) || ((m = (x = t.colors) == null ? void 0 : x[r.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", c = ((y = r.config) == null ? void 0 : y.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
820
+ return /* @__PURE__ */ p("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((r) => {
821
+ var a, u, o, d, l, i, m, x, y, w, S, N, O;
822
+ const s = ((a = r.config) == null ? void 0 : a.icon) || ((u = t.icons) == null ? void 0 : u[r.type]) || ze(r.type), g = ((o = r.config) == null ? void 0 : o.bgColor) || ((l = (d = t.colors) == null ? void 0 : d[r.type]) == null ? void 0 : l.bg) || "bg-white dark:bg-gray-800", f = ((i = r.config) == null ? void 0 : i.textColor) || ((x = (m = t.colors) == null ? void 0 : m[r.type]) == null ? void 0 : x.text) || "text-gray-700 dark:text-gray-300", c = ((y = r.config) == null ? void 0 : y.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
815
823
  return /* @__PURE__ */ h(
816
824
  "div",
817
825
  {
818
- className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${p} ${f}`,
826
+ className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${g} ${f}`,
819
827
  children: [
820
- /* @__PURE__ */ g("div", { className: c, children: s }),
828
+ /* @__PURE__ */ p("div", { className: c, children: s }),
821
829
  /* @__PURE__ */ h("div", { className: "flex-1 me-3", children: [
822
- ((w = r.config) == null ? void 0 : w.title) && /* @__PURE__ */ g("div", { className: "font-semibold text-black", children: r.config.title }),
823
- ((S = r.config) == null ? void 0 : S.description) && /* @__PURE__ */ g("div", { className: "text-sm text-gray-500", children: r.config.description }),
824
- !((N = r.config) != null && N.title) && !((O = r.config) != null && O.description) && /* @__PURE__ */ g("div", { className: "text-sm", children: r.message })
830
+ ((w = r.config) == null ? void 0 : w.title) && /* @__PURE__ */ p("div", { className: "font-semibold text-black", children: r.config.title }),
831
+ ((S = r.config) == null ? void 0 : S.description) && /* @__PURE__ */ p("div", { className: "text-sm text-gray-500", children: r.config.description }),
832
+ !((N = r.config) != null && N.title) && !((O = r.config) != null && O.description) && /* @__PURE__ */ p("div", { className: "text-sm", children: r.message })
825
833
  ] }),
826
- /* @__PURE__ */ g(
834
+ /* @__PURE__ */ p(
827
835
  "button",
828
836
  {
829
837
  onClick: () => n((v) => v.filter((b) => b.id !== r.id)),
830
838
  className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
831
839
  "aria-label": "Close",
832
- children: /* @__PURE__ */ g(Ie, { size: 18 })
840
+ children: /* @__PURE__ */ p(Ie, { size: 18 })
833
841
  }
834
842
  )
835
843
  ]
@@ -1,9 +1,10 @@
1
- (function(h,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],o):(h=typeof globalThis<"u"?globalThis:h||self,o(h.TailwindUiKit={},h.jsxRuntime,h.React))})(this,function(h,o,s){"use strict";"use client";const F={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},Z={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},V={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},R={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},ee=(e,n,t)=>{if(t)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(n)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(e){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},G=s.forwardRef((e,n)=>{const{label:t,id:r,inputSize:a="md",shape:p="rounded",validate:b,onValidatedChange:u,className:i="",icon:g,iconPosition:l="left",floatingLabelStyle:f,onChange:c,isValid:d,isInvalid:y,feedback:m,feedbackType:w="invalid",...v}=e,[N,k]=s.useState("default"),$=s.useCallback(M=>{const B=M.target.value,O=(b==null?void 0:b(B))??"default";k(O),u==null||u(M,O),c==null||c(M)},[b,u,c]),C=s.useMemo(()=>r||(typeof t=="string"?`input-${t.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[r,t]),x=!!f,S=F[a]||F.md,E=Z[p]||Z.flat,L=s.useMemo(()=>ee(N,d,y),[N,d,y]),D=s.useMemo(()=>l==="start"||l==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[l]),_=s.useMemo(()=>g?l==="start"||l==="left"?"ps-10":"pe-10":"",[g,l]);return o.jsxs("div",{className:`w-full relative ${x?"z-0":""}`,children:[!x&&t&&o.jsx("label",{htmlFor:C,className:`block mb-1 text-sm ${d?"text-green-700 dark:text-green-500":y?"text-red-700 dark:text-red-500":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[g&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${D}`,"aria-hidden":"true",children:o.jsx("span",{className:"text-gray-500",children:g})}),o.jsx("input",{...v,id:C,ref:n,placeholder:x?" ":v.placeholder,onChange:$,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
2
- ${S}
3
- ${x&&f&&V[f]}
4
- ${_} ${E} ${L} ${i}`}),x&&t&&f&&o.jsx("label",{htmlFor:C,className:`ms-1 ${R[f]} ${i}`,children:t})]}),m&&o.jsx("p",{className:`mt-1 text-xs ${w==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:w==="invalid"?"alert":void 0,children:m})]})});G.displayName="Input";const te={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},re={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ne={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},oe={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},se=(e,n,t)=>{if(t)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(n)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const r="focus:ring focus:border";switch(e){case"error":return`${r}-red-500 border-red-500 bg-red-50`;case"warning":return`${r}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${r}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},q=s.forwardRef((e,n)=>{const{label:t,id:r,inputSize:a="md",shape:p="rounded",validate:b,onValidatedChange:u,className:i="",icon:g,iconPosition:l="left",floatingLabelStyle:f,onChange:c,isValid:d,isInvalid:y,feedback:m,feedbackType:w="invalid",children:v,...N}=e,[k,$]=s.useState("default"),C=s.useId(),x=s.useMemo(()=>r||(typeof t=="string"?`select-${t.toLowerCase().replace(/\s+/g,"-")}`:C),[r,t,C]),S=O=>{const ze=O.target.value,Q=(b==null?void 0:b(ze))??"default";$(Q),u==null||u(O,Q),c==null||c(O)},E=!!f,L=te[a],D=re[p],_=se(k,d,y),M=g&&(l==="start"||l==="left")?"ps-10":g?"pe-10":"",B=l==="start"||l==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return o.jsxs("div",{className:`w-full relative ${E?"z-0":""}`,children:[!E&&t&&o.jsx("label",{htmlFor:x,className:`block mb-1 text-sm ${d?"text-green-700":y?"text-red-700":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[g&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${B}`,children:o.jsx("span",{className:"text-gray-500",children:g})}),o.jsx("select",{...N,id:x,ref:n,onChange:S,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
1
+ (function(y,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],n):(y=typeof globalThis<"u"?globalThis:y||self,n(y.TailwindUiKit={},y.jsxRuntime,y.React))})(this,function(y,n,s){"use strict";"use client";var F=document.createElement("style");F.textContent=`/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.btn-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media (hover:hover){.btn-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.btn-outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.btn-outline-primary:hover{background-color:var(--color-blue-50,oklch(97% .014 254.604))}}.btn-soft-primary{background-color:var(--color-blue-100,oklch(93.2% .032 255.585));color:var(--color-blue-700,oklch(48.8% .243 264.376))}@media (hover:hover){.btn-soft-primary:hover{background-color:var(--color-blue-200,oklch(88.2% .059 254.128))}}.btn-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media (hover:hover){.btn-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.btn-outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.btn-outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.btn-soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media (hover:hover){.btn-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.btn-outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.btn-outline-danger:hover{background-color:var(--color-red-50,oklch(97.1% .013 17.38))}}.btn-soft-danger{background-color:var(--color-red-100,oklch(93.6% .032 17.717));color:var(--color-red-700,oklch(50.5% .213 27.518))}@media (hover:hover){.btn-soft-danger:hover{background-color:var(--color-red-200,oklch(88.5% .062 18.334))}}.btn-link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media (hover:hover){.btn-link:hover{text-decoration-line:underline}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
2
+ /*$vite$:1*/`,document.head.appendChild(F);const Z={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},G={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},R={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},ee={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},te=(e,o,t)=>{if(t)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(o)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(e){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},q=s.forwardRef((e,o)=>{const{label:t,id:r,inputSize:l="md",shape:g="rounded",validate:b,onValidatedChange:u,className:i="",icon:p,iconPosition:a="left",floatingLabelStyle:f,onChange:c,isValid:d,isInvalid:x,feedback:m,feedbackType:w="invalid",...v}=e,[S,N]=s.useState("default"),$=s.useCallback(M=>{const B=M.target.value,O=(b==null?void 0:b(B))??"default";N(O),u==null||u(M,O),c==null||c(M)},[b,u,c]),k=s.useMemo(()=>r||(typeof t=="string"?`input-${t.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[r,t]),h=!!f,C=Z[l]||Z.md,E=G[g]||G.flat,L=s.useMemo(()=>te(S,d,x),[S,d,x]),_=s.useMemo(()=>a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[a]),D=s.useMemo(()=>p?a==="start"||a==="left"?"ps-10":"pe-10":"",[p,a]);return n.jsxs("div",{className:`w-full relative ${h?"z-0":""}`,children:[!h&&t&&n.jsx("label",{htmlFor:k,className:`block mb-1 text-sm ${d?"text-green-700 dark:text-green-500":x?"text-red-700 dark:text-red-500":"text-gray-700"}`,children:t}),n.jsxs("div",{className:"relative w-full",children:[p&&n.jsx("div",{className:`absolute inset-y-0 flex items-center ${_}`,"aria-hidden":"true",children:n.jsx("span",{className:"text-gray-500",children:p})}),n.jsx("input",{...v,id:k,ref:o,placeholder:h?" ":v.placeholder,onChange:$,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
3
+ ${C}
4
+ ${h&&f&&R[f]}
5
+ ${D} ${E} ${L} ${i}`}),h&&t&&f&&n.jsx("label",{htmlFor:k,className:`ms-1 ${ee[f]} ${i}`,children:t})]}),m&&n.jsx("p",{className:`mt-1 text-xs ${w==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:w==="invalid"?"alert":void 0,children:m})]})});q.displayName="Input";const re={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},oe={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ne={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},se={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},ae=(e,o,t)=>{if(t)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(o)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const r="focus:ring focus:border";switch(e){case"error":return`${r}-red-500 border-red-500 bg-red-50`;case"warning":return`${r}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${r}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},H=s.forwardRef((e,o)=>{const{label:t,id:r,inputSize:l="md",shape:g="rounded",validate:b,onValidatedChange:u,className:i="",icon:p,iconPosition:a="left",floatingLabelStyle:f,onChange:c,isValid:d,isInvalid:x,feedback:m,feedbackType:w="invalid",children:v,...S}=e,[N,$]=s.useState("default"),k=s.useId(),h=s.useMemo(()=>r||(typeof t=="string"?`select-${t.toLowerCase().replace(/\s+/g,"-")}`:k),[r,t,k]),C=O=>{const _e=O.target.value,V=(b==null?void 0:b(_e))??"default";$(V),u==null||u(O,V),c==null||c(O)},E=!!f,L=re[l],_=oe[g],D=ae(N,d,x),M=p&&(a==="start"||a==="left")?"ps-10":p?"pe-10":"",B=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return n.jsxs("div",{className:`w-full relative ${E?"z-0":""}`,children:[!E&&t&&n.jsx("label",{htmlFor:h,className:`block mb-1 text-sm ${d?"text-green-700":x?"text-red-700":"text-gray-700"}`,children:t}),n.jsxs("div",{className:"relative w-full",children:[p&&n.jsx("div",{className:`absolute inset-y-0 flex items-center ${B}`,children:n.jsx("span",{className:"text-gray-500",children:p})}),n.jsx("select",{...S,id:h,ref:o,onChange:C,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
5
6
  ${L} ${M}
6
7
  ${E&&f&&ne[f]}
7
- ${D} ${_} ${i}`,children:v}),E&&t&&f&&o.jsx("label",{htmlFor:x,className:`ms-1 ${oe[f]} ${i}`,children:t})]}),m&&o.jsx("p",{className:`mt-1 text-xs ${w==="invalid"?"text-red-600":"text-green-600"}`,children:m})]})});q.displayName="Select";const le={primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-600 text-white hover:bg-gray-700",success:"bg-green-600 text-white hover:bg-green-700",danger:"bg-red-600 text-white hover:bg-red-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-cyan-600 text-white hover:bg-cyan-700",dark:"bg-gray-900 text-white hover:bg-black",light:"bg-gray-100 text-black hover:bg-gray-200",link:"bg-transparent text-blue-600 hover:underline [&&]:p-0 [&&]:shadow-none","outline-primary":"border border-blue-600 text-blue-600 hover:bg-blue-50","outline-secondary":"border border-gray-600 text-gray-600 hover:bg-gray-50","outline-success":"border border-green-600 text-green-600 hover:bg-green-50","outline-danger":"border border-red-600 text-red-600 hover:bg-red-50","outline-warning":"border border-yellow-500 text-yellow-600 hover:bg-yellow-50","outline-info":"border border-cyan-600 text-cyan-600 hover:bg-cyan-50","outline-dark":"border border-gray-900 text-gray-900 hover:bg-gray-100","outline-light":"border border-gray-100 text-gray-500 hover:bg-gray-200"},ae={xs:"px-3 py-2 text-xs",sm:"px-3 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},ie={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},ce=({children:e,variant:n="primary",size:t="md",type:r="button",shape:a="rounded",className:p="",isLoading:b=!1,disabled:u=!1,...i})=>{const g=u||b,l=["inline-flex items-center justify-center font-normal transition duration-150 cursor-pointer",le[n],ae[t],ie[a],a==="flat"?"shadow-none":"shadow-sm",g?"opacity-50 cursor-not-allowed pointer-events-none":"",p].filter(Boolean).join(" ");return o.jsxs("button",{type:r,className:l,disabled:g,...i,children:[b&&o.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 me-3 text-gray-200 animate-spin dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),o.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})]}),e]})},de=({label:e,children:n,position:t="right"})=>{const[r,a]=s.useState(!1),[p,b]=s.useState(!1),u=s.useRef(null),i=s.useRef(null),g=s.useMemo(()=>{switch(t){case"left":return"left-0";case"center":return"left-1/2 transform -translate-x-1/2";case"right":default:return"right-0"}},[t]),l=s.useCallback(d=>{const y=d.target;u.current&&!u.current.contains(y)&&i.current&&!i.current.contains(y)&&a(!1)},[]),f=s.useCallback(()=>{if(!i.current||!u.current)return;const d=i.current.getBoundingClientRect(),y=u.current.getBoundingClientRect(),m=window.innerHeight-d.bottom,w=d.top;b(m<y.height&&w>y.height)},[]);s.useEffect(()=>{if(r)return f(),window.addEventListener("resize",f),window.addEventListener("scroll",f,!0),()=>{window.removeEventListener("resize",f),window.removeEventListener("scroll",f,!0)}},[r,f]),s.useEffect(()=>(document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)),[l]);const c=s.useCallback(()=>a(d=>!d),[]);return o.jsxs("div",{className:"relative flex items-center",children:[o.jsx("button",{ref:i,onClick:c,children:e}),r&&o.jsx("div",{ref:u,className:`absolute z-10 bg-white rounded-sm shadow-md overflow-hidden
8
- ${p?"bottom-full mb-2":"top-full mt-2"}
9
- ${g}`,children:n})]})},ue=({children:e,content:n,position:t="top",className:r="",tooltipClass:a="",tooltipStyle:p={}})=>{const b=s.useRef(null),u=s.useRef(null);s.useEffect(()=>{const g=b.current,l=u.current;if(!g||!l)return;const f=()=>{l.style.opacity="1",l.style.visibility="visible"},c=()=>{l.style.opacity="0",l.style.visibility="hidden"};return g.addEventListener("mouseenter",f),g.addEventListener("mouseleave",c),()=>{g.removeEventListener("mouseenter",f),g.removeEventListener("mouseleave",c)}},[]);const i=g=>{const l={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(g){case"top":return{...l,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...l,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...l,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...l,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return l}};return o.jsxs("div",{ref:b,className:`relative inline-block ${r}`,children:[e,o.jsx("div",{ref:u,role:"tooltip",className:a,style:{...i(t),...p},children:n})]})},fe={primary:"bg-blue-500 text-white",secondary:"bg-gray-500 text-white",success:"bg-green-500 text-white",danger:"bg-red-500 text-white",warning:"bg-yellow-400 text-black",info:"bg-cyan-500 text-white",dark:"bg-black text-white",light:"bg-gray-100 text-gray-800",link:"bg-transparent text-blue-500 underline","outline-primary":"border border-blue-500 text-blue-500 bg-transparent","outline-secondary":"border border-gray-500 text-gray-500 bg-transparent","outline-success":"border border-green-500 text-green-500 bg-transparent","outline-danger":"border border-red-500 text-red-500 bg-transparent","outline-warning":"border border-yellow-400 text-yellow-500 bg-transparent","outline-info":"border border-cyan-500 text-cyan-500 bg-transparent","outline-dark":"border border-black text-black bg-transparent","outline-light":"border border-gray-100 text-gray-800 bg-transparent"},ge={xs:"text-xs px-2 py-0.5",sm:"text-sm px-2.5 py-0.5",md:"text-base px-3 py-1",lg:"text-lg px-3.5 py-1.5",xl:"text-xl px-4 py-2"},be={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},pe=({label:e,variant:n="primary",size:t="sm",shape:r="rounded",icon:a,dismissible:p,onDismiss:b,className:u="",...i})=>{const g=!e&&!!a,l=`inline-flex items-center font-medium ${fe[n]||""} ${ge[t]||""} ${be[r]||""} ${g?"justify-center p-2 w-8 h-8":""} `+u;return o.jsxs("span",{className:l.trim(),...i,children:[a&&o.jsx("span",{className:e?"mr-1":"",children:a}),e,p&&o.jsx("button",{type:"button",onClick:b,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};var H={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},K=s.createContext&&s.createContext(H),xe=["attr","size","title"];function he(e,n){if(e==null)return{};var t=ye(e,n),r,a;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(a=0;a<p.length;a++)r=p[a],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function ye(e,n){if(e==null)return{};var t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(n.indexOf(r)>=0)continue;t[r]=e[r]}return t}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},P.apply(this,arguments)}function U(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?U(Object(t),!0).forEach(function(r){me(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function me(e,n,t){return n=we(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function we(e){var n=ve(e,"string");return typeof n=="symbol"?n:n+""}function ve(e,n){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,n);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function W(e){return e&&e.map((n,t)=>s.createElement(n.tag,j({key:t},n.attr),W(n.child)))}function X(e){return n=>s.createElement(Ce,P({attr:j({},e.attr)},n),W(e.child))}function Ce(e){var n=t=>{var{attr:r,size:a,title:p}=e,b=he(e,xe),u=a||t.size||"1em",i;return t.className&&(i=t.className),e.className&&(i=(i?i+" ":"")+e.className),s.createElement("svg",P({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,b,{className:i,style:j(j({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),p&&s.createElement("title",null,p),e.children)};return K!==void 0?s.createElement(K.Consumer,null,t=>n(t)):n(H)}function Se(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(e)}const Ne=({items:e,allowMultipleOpen:n=!1,className:t="",tileClasses:r="",open:a,onChange:p,renderTitle:b,renderContent:u})=>{const[i,g]=s.useState(new Set),l=s.useMemo(()=>a?new Set(a):i,[a,i]),f=s.useCallback(c=>{const d=new Set(l);d.has(c)?d.delete(c):(n||d.clear(),d.add(c)),a&&p?p(Array.from(d)):g(d)},[l,a,p,n]);return o.jsx("div",{className:"accordion",role:"region","aria-multiselectable":n,children:e.map(c=>{const d=l.has(c.id),y=`accordion-heading-${c.id}`,m=`accordion-panel-${c.id}`;return o.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,children:[o.jsxs("button",{id:y,type:"button","aria-expanded":d,"aria-controls":m,onClick:()=>f(c.id),className:`flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${r}`,children:[b?b(c,d):c.title,o.jsx(Se,{})]}),o.jsx("div",{id:m,role:"region","aria-labelledby":y,hidden:!d,className:"p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400",children:u?u(c,d):c.content})]},c.id)})})},Y=s.createContext(null),I=()=>{const e=s.useContext(Y);if(!e)throw new Error("useModalActions must be used within a ModalActionProvider");return e},J=s.createContext(null),A=()=>s.useContext(J);function ke({id:e,title:n,children:t,standalone:r=!1,showFloatingClose:a=!1,containerClasses:p="",onClose:b,disableEscapeClose:u=!1}){const i=A(),g=I(),l=!r&&!!i&&!!g,[f,c]=s.useState(!1),d=l?i.isOpen(e):f,y=l?i.getModalData(e):null,m=s.useCallback(()=>{l?g.closeModal(e):c(!1),b==null||b()},[l,g,e,b]);return s.useEffect(()=>{const w=document.activeElement;console.log(e);const v=document.getElementById(e);console.log("modalEl=",v);const N=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],k=()=>{if(!v)return[];const x=v.querySelectorAll(N.join(","));return Array.from(x).filter(S=>S.offsetParent!==null)},$=x=>{if(x.key==="Tab"){const S=k();if(S.length===0)return;const E=S[0],L=S[S.length-1];x.shiftKey?document.activeElement===E&&(x.preventDefault(),L.focus()):document.activeElement===L&&(x.preventDefault(),E.focus())}},C=x=>{x.key==="Escape"&&!u&&m(),$(x)};return d&&(document.body.style.overflow="hidden",setTimeout(()=>{const x=k();x.length&&x[0].focus()},0),window.addEventListener("keydown",C)),()=>{document.body.style.overflow="",w&&w.focus(),window.removeEventListener("keydown",C)}},[d,u,m,e]),d?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",id:e,children:o.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${p}`,children:[o.jsxs("div",{className:"flex justify-between items-center relative",children:[n&&o.jsx("h2",{className:"text-lg font-semibold",children:n}),a&&o.jsx("button",{onClick:m,className:"text-gray-500 hover:text-black absolute top-2 right-3 hover:bg-gray-200 rounded-full aspect-square w-8","aria-label":"Close modal",children:"✕"})]}),o.jsx("div",{className:"mt-3 text-sm text-gray-700",children:typeof t=="function"?t({modalData:y}):t})]})}):null}function Ee({children:e}){const[n,t]=s.useState({}),[r,a]=s.useState({}),p=s.useCallback((f,c)=>{t(d=>({...d,[f]:!0})),c&&a(d=>({...d,[f]:c}))},[]),b=s.useCallback(f=>{t(c=>({...c,[f]:!1})),a(c=>{const d={...c};return delete d[f],d})},[]),u=s.useCallback(f=>!!n[f],[n]),i=s.useCallback(f=>r[f],[r]),g=s.useMemo(()=>({openModal:p,closeModal:b}),[p,b]),l=s.useMemo(()=>({isOpen:u,getModalData:i}),[u,i]);return o.jsx(Y.Provider,{value:g,children:o.jsx(J.Provider,{value:l,children:e})})}function $e(e){const{openModal:n,closeModal:t}=I(),{isOpen:r,getModalData:a}=A();return{open:p=>n(e,p),close:()=>t(e),isOpen:r(e),data:a(e)}}let T=null,z={};function Le(e){T=e}function Oe(e){z={...z,...e}}function Me(){return z}function Pe(e,n,t=3e3,r){T?T(e,n,t,r):console.warn("Toast system is not mounted")}function je(e){return X({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(e)}const Ie=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)}),Ae=()=>{const[e,n]=s.useState([]);s.useEffect(()=>{Le((r,a,p,b)=>{const u=Ie();n(i=>[...i,{id:u,type:r,message:a,config:b}]),setTimeout(()=>{n(i=>i.filter(g=>g.id!==u))},p)})},[]);const t=Me();return o.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:e.map(r=>{var i,g,l,f,c,d,y,m,w,v,N,k,$;const a=((i=r.config)==null?void 0:i.icon)||((g=t.icons)==null?void 0:g[r.type])||Te(r.type),p=((l=r.config)==null?void 0:l.bgColor)||((c=(f=t.colors)==null?void 0:f[r.type])==null?void 0:c.bg)||"bg-white dark:bg-gray-800",b=((d=r.config)==null?void 0:d.textColor)||((m=(y=t.colors)==null?void 0:y[r.type])==null?void 0:m.text)||"text-gray-700 dark:text-gray-300",u=((w=r.config)==null?void 0:w.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return o.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${p} ${b}`,children:[o.jsx("div",{className:u,children:a}),o.jsxs("div",{className:"flex-1 me-3",children:[((v=r.config)==null?void 0:v.title)&&o.jsx("div",{className:"font-semibold text-black",children:r.config.title}),((N=r.config)==null?void 0:N.description)&&o.jsx("div",{className:"text-sm text-gray-500",children:r.config.description}),!((k=r.config)!=null&&k.title)&&!(($=r.config)!=null&&$.description)&&o.jsx("div",{className:"text-sm",children:r.message})]}),o.jsx("button",{onClick:()=>n(C=>C.filter(x=>x.id!==r.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:o.jsx(je,{size:18})})]},r.id)})})};function Te(e){switch(e){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}h.Accordion=Ne,h.Badge=pe,h.Button=ce,h.Dropdown=de,h.Input=G,h.Modal=ke,h.ModalProvider=Ee,h.Select=q,h.Toast=Ae,h.Tooltip=ue,h.setToastDefaults=Oe,h.showToast=Pe,h.useModalActions=I,h.useModalInstance=$e,h.useModalState=A,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
8
+ ${_} ${D} ${i}`,children:v}),E&&t&&f&&n.jsx("label",{htmlFor:h,className:`ms-1 ${se[f]} ${i}`,children:t})]}),m&&n.jsx("p",{className:`mt-1 text-xs ${w==="invalid"?"text-red-600":"text-green-600"}`,children:m})]})});H.displayName="Select";const le={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},ie={xs:"px-3 py-2 text-xs",sm:"px-3 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},ce={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},de=({children:e,variant:o="primary",size:t="md",type:r="button",shape:l="rounded",className:g="",isLoading:b=!1,disabled:u=!1,...i})=>{const p=u||b,a=["inline-flex items-center justify-center font-normal transition duration-150 cursor-pointer",le[o],ie[t],ce[l],l==="flat"?"shadow-none":"shadow-sm",p?"opacity-50 cursor-not-allowed pointer-events-none":"",g].filter(Boolean).join(" ");return n.jsxs("button",{type:r,className:a,disabled:p,...i,children:[b&&n.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 me-3 text-gray-200 animate-spin dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),n.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})]}),e]})},ue=({label:e,children:o,position:t="right"})=>{const[r,l]=s.useState(!1),[g,b]=s.useState(!1),u=s.useRef(null),i=s.useRef(null),p=s.useMemo(()=>{switch(t){case"left":return"left-0";case"center":return"left-1/2 transform -translate-x-1/2";case"right":default:return"right-0"}},[t]),a=s.useCallback(d=>{const x=d.target;u.current&&!u.current.contains(x)&&i.current&&!i.current.contains(x)&&l(!1)},[]),f=s.useCallback(()=>{if(!i.current||!u.current)return;const d=i.current.getBoundingClientRect(),x=u.current.getBoundingClientRect(),m=window.innerHeight-d.bottom,w=d.top;b(m<x.height&&w>x.height)},[]);s.useEffect(()=>{if(r)return f(),window.addEventListener("resize",f),window.addEventListener("scroll",f,!0),()=>{window.removeEventListener("resize",f),window.removeEventListener("scroll",f,!0)}},[r,f]),s.useEffect(()=>(document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)),[a]);const c=s.useCallback(()=>l(d=>!d),[]);return n.jsxs("div",{className:"relative flex items-center",children:[n.jsx("button",{ref:i,onClick:c,children:e}),r&&n.jsx("div",{ref:u,className:`absolute z-10 bg-white rounded-sm shadow-md overflow-hidden
9
+ ${g?"bottom-full mb-2":"top-full mt-2"}
10
+ ${p}`,children:o})]})},fe=({children:e,content:o,position:t="top",className:r="",tooltipClass:l="",tooltipStyle:g={}})=>{const b=s.useRef(null),u=s.useRef(null);s.useEffect(()=>{const p=b.current,a=u.current;if(!p||!a)return;const f=()=>{a.style.opacity="1",a.style.visibility="visible"},c=()=>{a.style.opacity="0",a.style.visibility="hidden"};return p.addEventListener("mouseenter",f),p.addEventListener("mouseleave",c),()=>{p.removeEventListener("mouseenter",f),p.removeEventListener("mouseleave",c)}},[]);const i=p=>{const a={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(p){case"top":return{...a,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...a,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...a,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...a,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return a}};return n.jsxs("div",{ref:b,className:`relative inline-block ${r}`,children:[e,n.jsx("div",{ref:u,role:"tooltip",className:l,style:{...i(t),...g},children:o})]})},pe={primary:"bg-blue-500 text-white",secondary:"bg-gray-500 text-white",success:"bg-green-500 text-white",danger:"bg-red-500 text-white",warning:"bg-yellow-400 text-black",info:"bg-cyan-500 text-white",dark:"bg-black text-white",light:"bg-gray-100 text-gray-800",link:"bg-transparent text-blue-500 underline","outline-primary":"border border-blue-500 text-blue-500 bg-transparent","outline-secondary":"border border-gray-500 text-gray-500 bg-transparent","outline-success":"border border-green-500 text-green-500 bg-transparent","outline-danger":"border border-red-500 text-red-500 bg-transparent","outline-warning":"border border-yellow-400 text-yellow-500 bg-transparent","outline-info":"border border-cyan-500 text-cyan-500 bg-transparent","outline-dark":"border border-black text-black bg-transparent","outline-light":"border border-gray-100 text-gray-800 bg-transparent"},be={xs:"text-xs px-2 py-0.5",sm:"text-sm px-2.5 py-0.5",md:"text-base px-3 py-1",lg:"text-lg px-3.5 py-1.5",xl:"text-xl px-4 py-2"},ge={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},he=({label:e,variant:o="primary",size:t="sm",shape:r="rounded",icon:l,dismissible:g,onDismiss:b,className:u="",...i})=>{const p=!e&&!!l,a=`inline-flex items-center font-medium ${pe[o]||""} ${be[t]||""} ${ge[r]||""} ${p?"justify-center p-2 w-8 h-8":""} `+u;return n.jsxs("span",{className:a.trim(),...i,children:[l&&n.jsx("span",{className:e?"mr-1":"",children:l}),e,g&&n.jsx("button",{type:"button",onClick:b,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};var K={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},U=s.createContext&&s.createContext(K),ye=["attr","size","title"];function xe(e,o){if(e==null)return{};var t=me(e,o),r,l;if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(e);for(l=0;l<g.length;l++)r=g[l],!(o.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function me(e,o){if(e==null)return{};var t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(o.indexOf(r)>=0)continue;t[r]=e[r]}return t}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},P.apply(this,arguments)}function W(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,r)}return t}function j(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?arguments[o]:{};o%2?W(Object(t),!0).forEach(function(r){we(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function we(e,o,t){return o=ve(o),o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function ve(e){var o=ke(e,"string");return typeof o=="symbol"?o:o+""}function ke(e,o){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,o);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(e)}function X(e){return e&&e.map((o,t)=>s.createElement(o.tag,j({key:t},o.attr),X(o.child)))}function Y(e){return o=>s.createElement(Ce,P({attr:j({},e.attr)},o),X(e.child))}function Ce(e){var o=t=>{var{attr:r,size:l,title:g}=e,b=xe(e,ye),u=l||t.size||"1em",i;return t.className&&(i=t.className),e.className&&(i=(i?i+" ":"")+e.className),s.createElement("svg",P({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,b,{className:i,style:j(j({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),g&&s.createElement("title",null,g),e.children)};return U!==void 0?s.createElement(U.Consumer,null,t=>o(t)):o(K)}function Se(e){return Y({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(e)}const Ne=({items:e,allowMultipleOpen:o=!1,className:t="",tileClasses:r="",open:l,onChange:g,renderTitle:b,renderContent:u})=>{const[i,p]=s.useState(new Set),a=s.useMemo(()=>l?new Set(l):i,[l,i]),f=s.useCallback(c=>{const d=new Set(a);d.has(c)?d.delete(c):(o||d.clear(),d.add(c)),l&&g?g(Array.from(d)):p(d)},[a,l,g,o]);return n.jsx("div",{className:"accordion",role:"region","aria-multiselectable":o,children:e.map(c=>{const d=a.has(c.id),x=`accordion-heading-${c.id}`,m=`accordion-panel-${c.id}`;return n.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,children:[n.jsxs("button",{id:x,type:"button","aria-expanded":d,"aria-controls":m,onClick:()=>f(c.id),className:`flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${r}`,children:[b?b(c,d):c.title,n.jsx(Se,{})]}),n.jsx("div",{id:m,role:"region","aria-labelledby":x,hidden:!d,className:"p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400",children:u?u(c,d):c.content})]},c.id)})})},J=s.createContext(null),I=()=>{const e=s.useContext(J);if(!e)throw new Error("useModalActions must be used within a ModalActionProvider");return e},Q=s.createContext(null),T=()=>s.useContext(Q);function Ee({id:e,title:o,children:t,standalone:r=!1,showFloatingClose:l=!1,containerClasses:g="",onClose:b,disableEscapeClose:u=!1}){const i=T(),p=I(),a=!r&&!!i&&!!p,[f,c]=s.useState(!1),d=a?i.isOpen(e):f,x=a?i.getModalData(e):null,m=s.useCallback(()=>{a?p.closeModal(e):c(!1),b==null||b()},[a,p,e,b]);return s.useEffect(()=>{const w=document.activeElement;console.log(e);const v=document.getElementById(e);console.log("modalEl=",v);const S=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],N=()=>{if(!v)return[];const h=v.querySelectorAll(S.join(","));return Array.from(h).filter(C=>C.offsetParent!==null)},$=h=>{if(h.key==="Tab"){const C=N();if(C.length===0)return;const E=C[0],L=C[C.length-1];h.shiftKey?document.activeElement===E&&(h.preventDefault(),L.focus()):document.activeElement===L&&(h.preventDefault(),E.focus())}},k=h=>{h.key==="Escape"&&!u&&m(),$(h)};return d&&(document.body.style.overflow="hidden",setTimeout(()=>{const h=N();h.length&&h[0].focus()},0),window.addEventListener("keydown",k)),()=>{document.body.style.overflow="",w&&w.focus(),window.removeEventListener("keydown",k)}},[d,u,m,e]),d?n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",id:e,children:n.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${g}`,children:[n.jsxs("div",{className:"flex justify-between items-center relative",children:[o&&n.jsx("h2",{className:"text-lg font-semibold",children:o}),l&&n.jsx("button",{onClick:m,className:"text-gray-500 hover:text-black absolute top-2 right-3 hover:bg-gray-200 rounded-full aspect-square w-8","aria-label":"Close modal",children:"✕"})]}),n.jsx("div",{className:"mt-3 text-sm text-gray-700",children:typeof t=="function"?t({modalData:x}):t})]})}):null}function $e({children:e}){const[o,t]=s.useState({}),[r,l]=s.useState({}),g=s.useCallback((f,c)=>{t(d=>({...d,[f]:!0})),c&&l(d=>({...d,[f]:c}))},[]),b=s.useCallback(f=>{t(c=>({...c,[f]:!1})),l(c=>{const d={...c};return delete d[f],d})},[]),u=s.useCallback(f=>!!o[f],[o]),i=s.useCallback(f=>r[f],[r]),p=s.useMemo(()=>({openModal:g,closeModal:b}),[g,b]),a=s.useMemo(()=>({isOpen:u,getModalData:i}),[u,i]);return n.jsx(J.Provider,{value:p,children:n.jsx(Q.Provider,{value:a,children:e})})}function Le(e){const{openModal:o,closeModal:t}=I(),{isOpen:r,getModalData:l}=T();return{open:g=>o(e,g),close:()=>t(e),isOpen:r(e),data:l(e)}}let A=null,z={};function Oe(e){A=e}function Me(e){z={...z,...e}}function Pe(){return z}function je(e,o,t=3e3,r){A?A(e,o,t,r):console.warn("Toast system is not mounted")}function Ie(e){return Y({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(e)}const Te=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const o=Math.random()*16|0;return(e==="x"?o:o&3|8).toString(16)}),Ae=()=>{const[e,o]=s.useState([]);s.useEffect(()=>{Oe((r,l,g,b)=>{const u=Te();o(i=>[...i,{id:u,type:r,message:l,config:b}]),setTimeout(()=>{o(i=>i.filter(p=>p.id!==u))},g)})},[]);const t=Pe();return n.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:e.map(r=>{var i,p,a,f,c,d,x,m,w,v,S,N,$;const l=((i=r.config)==null?void 0:i.icon)||((p=t.icons)==null?void 0:p[r.type])||ze(r.type),g=((a=r.config)==null?void 0:a.bgColor)||((c=(f=t.colors)==null?void 0:f[r.type])==null?void 0:c.bg)||"bg-white dark:bg-gray-800",b=((d=r.config)==null?void 0:d.textColor)||((m=(x=t.colors)==null?void 0:x[r.type])==null?void 0:m.text)||"text-gray-700 dark:text-gray-300",u=((w=r.config)==null?void 0:w.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return n.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${g} ${b}`,children:[n.jsx("div",{className:u,children:l}),n.jsxs("div",{className:"flex-1 me-3",children:[((v=r.config)==null?void 0:v.title)&&n.jsx("div",{className:"font-semibold text-black",children:r.config.title}),((S=r.config)==null?void 0:S.description)&&n.jsx("div",{className:"text-sm text-gray-500",children:r.config.description}),!((N=r.config)!=null&&N.title)&&!(($=r.config)!=null&&$.description)&&n.jsx("div",{className:"text-sm",children:r.message})]}),n.jsx("button",{onClick:()=>o(k=>k.filter(h=>h.id!==r.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:n.jsx(Ie,{size:18})})]},r.id)})})};function ze(e){switch(e){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}y.Accordion=Ne,y.Badge=he,y.Button=de,y.Dropdown=ue,y.Input=q,y.Modal=Ee,y.ModalProvider=$e,y.Select=H,y.Toast=Ae,y.Tooltip=fe,y.setToastDefaults=Me,y.showToast=je,y.useModalActions=I,y.useModalInstance=Le,y.useModalState=T,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-ux-kit",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "main": "lib/tailwind-ux-kit.es.js",
5
5
  "module": "lib/tailwind-ux-kit.umd.js",
6
6
  "types": "lib/tailwind-ux-kit.es.d.ts",