@teja-app/ui 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert/Alert.d.ts +13 -0
- package/dist/components/Alert/Alert.d.ts.map +1 -0
- package/dist/components/Alert/Alert.types.d.ts +17 -0
- package/dist/components/Alert/Alert.types.d.ts.map +1 -0
- package/dist/components/Alert/index.d.ts +3 -0
- package/dist/components/Alert/index.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +13 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.types.d.ts +18 -0
- package/dist/components/Avatar/Avatar.types.d.ts.map +1 -0
- package/dist/components/Avatar/index.d.ts +3 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.types.d.ts +2 -0
- package/dist/components/Badge/Badge.types.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.types.d.ts +2 -0
- package/dist/components/Card/Card.types.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.types.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.d.ts +1 -1
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.types.d.ts +2 -0
- package/dist/components/Combobox/Combobox.types.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.types.d.ts +2 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.types.d.ts.map +1 -1
- package/dist/components/DateInput/DateInput.d.ts +13 -0
- package/dist/components/DateInput/DateInput.d.ts.map +1 -0
- package/dist/components/DateInput/DateInput.types.d.ts +16 -0
- package/dist/components/DateInput/DateInput.types.d.ts.map +1 -0
- package/dist/components/DateInput/index.d.ts +3 -0
- package/dist/components/DateInput/index.d.ts.map +1 -0
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.types.d.ts +2 -0
- package/dist/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
- package/dist/components/EmptyState/EmptyState.types.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.types.d.ts +2 -0
- package/dist/components/Input/Input.types.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.types.d.ts +2 -0
- package/dist/components/Modal/Modal.types.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.types.d.ts +2 -0
- package/dist/components/MultiSelect/MultiSelect.types.d.ts.map +1 -1
- package/dist/components/OTPInput/OTPInput.d.ts +22 -0
- package/dist/components/OTPInput/OTPInput.d.ts.map +1 -0
- package/dist/components/OTPInput/OTPInput.types.d.ts +19 -0
- package/dist/components/OTPInput/OTPInput.types.d.ts.map +1 -0
- package/dist/components/OTPInput/index.d.ts +3 -0
- package/dist/components/OTPInput/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.types.d.ts +2 -0
- package/dist/components/Pagination/Pagination.types.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.types.d.ts +2 -0
- package/dist/components/PasswordInput/PasswordInput.types.d.ts.map +1 -1
- package/dist/components/PillSelector/PillSelector.d.ts +16 -0
- package/dist/components/PillSelector/PillSelector.d.ts.map +1 -0
- package/dist/components/PillSelector/PillSelector.types.d.ts +29 -0
- package/dist/components/PillSelector/PillSelector.types.d.ts.map +1 -0
- package/dist/components/PillSelector/index.d.ts +3 -0
- package/dist/components/PillSelector/index.d.ts.map +1 -0
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Radio/Radio.types.d.ts +4 -0
- package/dist/components/Radio/Radio.types.d.ts.map +1 -1
- package/dist/components/Radio/RadioGroup.d.ts +1 -1
- package/dist/components/Radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.types.d.ts +2 -0
- package/dist/components/Select/Select.types.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.types.d.ts +4 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem.d.ts +1 -1
- package/dist/components/Sidebar/SidebarItem.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.types.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.types.d.ts +2 -0
- package/dist/components/Spinner/Spinner.types.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +2 -2
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.types.d.ts +4 -0
- package/dist/components/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.types.d.ts +2 -0
- package/dist/components/Textarea/Textarea.types.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts +1 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.types.d.ts +2 -0
- package/dist/components/Toggle/Toggle.types.d.ts.map +1 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.cjs +738 -98
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +738 -98
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ function _interopNamespaceDefault(e2) {
|
|
|
23
23
|
}
|
|
24
24
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
25
25
|
const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
|
|
26
|
-
const variantStyles$
|
|
26
|
+
const variantStyles$5 = {
|
|
27
27
|
primary: [
|
|
28
28
|
// Light mode
|
|
29
29
|
"bg-primary-800 text-white border border-gold-500/40",
|
|
@@ -63,7 +63,7 @@ const variantStyles$4 = {
|
|
|
63
63
|
"dark:focus:ring-error/30"
|
|
64
64
|
].join(" ")
|
|
65
65
|
};
|
|
66
|
-
const sizeStyles$
|
|
66
|
+
const sizeStyles$d = {
|
|
67
67
|
sm: "px-3 py-1.5 text-sm h-8",
|
|
68
68
|
md: "px-4 py-2 text-base h-10",
|
|
69
69
|
lg: "px-6 py-3 text-lg h-12"
|
|
@@ -93,9 +93,9 @@ const Button = React.forwardRef(
|
|
|
93
93
|
"dark:focus:ring-offset-primary-900",
|
|
94
94
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
95
95
|
// Variant styles
|
|
96
|
-
variantStyles$
|
|
96
|
+
variantStyles$5[variant],
|
|
97
97
|
// Size styles
|
|
98
|
-
sizeStyles$
|
|
98
|
+
sizeStyles$d[size2],
|
|
99
99
|
// Width styles
|
|
100
100
|
fullWidth && "w-full",
|
|
101
101
|
// Custom className (allows override)
|
|
@@ -146,7 +146,7 @@ const Button = React.forwardRef(
|
|
|
146
146
|
}
|
|
147
147
|
);
|
|
148
148
|
Button.displayName = "Button";
|
|
149
|
-
const sizeStyles$
|
|
149
|
+
const sizeStyles$c = {
|
|
150
150
|
xs: "h-3 w-3",
|
|
151
151
|
// 12px
|
|
152
152
|
sm: "h-4 w-4",
|
|
@@ -168,6 +168,7 @@ const Spinner = React.forwardRef(
|
|
|
168
168
|
color = "current",
|
|
169
169
|
label = "Loading",
|
|
170
170
|
className,
|
|
171
|
+
testId,
|
|
171
172
|
...props
|
|
172
173
|
}, ref) => {
|
|
173
174
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -176,7 +177,7 @@ const Spinner = React.forwardRef(
|
|
|
176
177
|
ref,
|
|
177
178
|
className: utils_index.cn(
|
|
178
179
|
"animate-spin",
|
|
179
|
-
sizeStyles$
|
|
180
|
+
sizeStyles$c[size2],
|
|
180
181
|
colorStyles[color],
|
|
181
182
|
className
|
|
182
183
|
),
|
|
@@ -185,6 +186,7 @@ const Spinner = React.forwardRef(
|
|
|
185
186
|
xmlns: "http://www.w3.org/2000/svg",
|
|
186
187
|
role: "status",
|
|
187
188
|
"aria-label": label,
|
|
189
|
+
"data-testid": testId,
|
|
188
190
|
...props,
|
|
189
191
|
children: [
|
|
190
192
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -225,18 +227,20 @@ const Input = React.forwardRef(
|
|
|
225
227
|
required,
|
|
226
228
|
disabled,
|
|
227
229
|
isLoading = false,
|
|
230
|
+
testId,
|
|
228
231
|
...props
|
|
229
232
|
}, ref) => {
|
|
230
233
|
const inputId = id || label?.toLowerCase().replace(/\s+/g, "-");
|
|
231
234
|
const hasError = !!error2;
|
|
232
235
|
const errorId = hasError ? `${inputId}-error` : void 0;
|
|
233
236
|
const showRightIcon = rightIcon || isLoading;
|
|
234
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto"), children: [
|
|
237
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto"), "data-testid": testId, children: [
|
|
235
238
|
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
236
239
|
"label",
|
|
237
240
|
{
|
|
238
241
|
htmlFor: inputId,
|
|
239
242
|
className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
|
|
243
|
+
"data-testid": testId ? `${testId}-label` : void 0,
|
|
240
244
|
children: [
|
|
241
245
|
label,
|
|
242
246
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
|
|
@@ -244,7 +248,14 @@ const Input = React.forwardRef(
|
|
|
244
248
|
}
|
|
245
249
|
),
|
|
246
250
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
247
|
-
leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
251
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
252
|
+
"div",
|
|
253
|
+
{
|
|
254
|
+
className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-primary-400 dark:text-primary-500",
|
|
255
|
+
"data-testid": testId ? `${testId}-left-icon` : void 0,
|
|
256
|
+
children: leftIcon
|
|
257
|
+
}
|
|
258
|
+
),
|
|
248
259
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
249
260
|
"input",
|
|
250
261
|
{
|
|
@@ -255,6 +266,7 @@ const Input = React.forwardRef(
|
|
|
255
266
|
"aria-label": !label ? props.placeholder || "Input" : void 0,
|
|
256
267
|
"aria-invalid": hasError ? "true" : void 0,
|
|
257
268
|
"aria-describedby": errorId,
|
|
269
|
+
"data-testid": testId ? `${testId}-input` : void 0,
|
|
258
270
|
className: utils_index.cn(
|
|
259
271
|
// Base styles - Light mode
|
|
260
272
|
"block w-full rounded-md border bg-white px-4 py-2.5 text-sm text-primary-900",
|
|
@@ -277,13 +289,21 @@ const Input = React.forwardRef(
|
|
|
277
289
|
...props
|
|
278
290
|
}
|
|
279
291
|
),
|
|
280
|
-
showRightIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
292
|
+
showRightIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-primary-400 dark:text-primary-500",
|
|
296
|
+
"data-testid": testId ? `${testId}-right-icon` : void 0,
|
|
297
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }) : rightIcon
|
|
298
|
+
}
|
|
299
|
+
)
|
|
281
300
|
] }),
|
|
282
301
|
(error2 || helperText) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
283
302
|
"p",
|
|
284
303
|
{
|
|
285
304
|
id: errorId,
|
|
286
305
|
role: hasError ? "alert" : void 0,
|
|
306
|
+
"data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
|
|
287
307
|
className: utils_index.cn(
|
|
288
308
|
"mt-1.5 text-sm",
|
|
289
309
|
hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
|
|
@@ -363,7 +383,7 @@ function getPasswordStrength(password) {
|
|
|
363
383
|
}
|
|
364
384
|
}
|
|
365
385
|
const PasswordInput = React.forwardRef(
|
|
366
|
-
({ showStrengthIndicator = false, value, className, ...props }, ref) => {
|
|
386
|
+
({ showStrengthIndicator = false, value, className, testId, ...props }, ref) => {
|
|
367
387
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
368
388
|
const togglePasswordVisibility = () => {
|
|
369
389
|
setShowPassword((prev) => !prev);
|
|
@@ -382,10 +402,11 @@ const PasswordInput = React.forwardRef(
|
|
|
382
402
|
"dark:text-primary-500 dark:hover:text-primary-300"
|
|
383
403
|
),
|
|
384
404
|
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
405
|
+
"data-testid": testId ? `${testId}-toggle-button` : void 0,
|
|
385
406
|
children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(EyeSlashIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(EyeIcon, {})
|
|
386
407
|
}
|
|
387
408
|
);
|
|
388
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn("w-full", className), children: [
|
|
409
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn("w-full", className), "data-testid": testId, children: [
|
|
389
410
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
390
411
|
Input,
|
|
391
412
|
{
|
|
@@ -393,7 +414,8 @@ const PasswordInput = React.forwardRef(
|
|
|
393
414
|
ref,
|
|
394
415
|
type: showPassword ? "text" : "password",
|
|
395
416
|
value,
|
|
396
|
-
rightIcon: toggleButton
|
|
417
|
+
rightIcon: toggleButton,
|
|
418
|
+
testId: testId ? `${testId}-input` : void 0
|
|
397
419
|
}
|
|
398
420
|
),
|
|
399
421
|
showStrengthIndicator && passwordValue && strength && strength.label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2", children: [
|
|
@@ -442,6 +464,7 @@ const Textarea = React.forwardRef(
|
|
|
442
464
|
defaultValue,
|
|
443
465
|
onChange,
|
|
444
466
|
isLoading = false,
|
|
467
|
+
testId,
|
|
445
468
|
...props
|
|
446
469
|
}, ref) => {
|
|
447
470
|
const textareaId = id || label?.toLowerCase().replace(/\s+/g, "-");
|
|
@@ -482,12 +505,13 @@ const Textarea = React.forwardRef(
|
|
|
482
505
|
adjustHeight();
|
|
483
506
|
}
|
|
484
507
|
}, [autoResize, adjustHeight, value, defaultValue]);
|
|
485
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto"), children: [
|
|
508
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto"), "data-testid": testId, children: [
|
|
486
509
|
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
487
510
|
"label",
|
|
488
511
|
{
|
|
489
512
|
htmlFor: textareaId,
|
|
490
513
|
className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
|
|
514
|
+
"data-testid": testId ? `${testId}-label` : void 0,
|
|
491
515
|
children: [
|
|
492
516
|
label,
|
|
493
517
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
|
|
@@ -510,6 +534,7 @@ const Textarea = React.forwardRef(
|
|
|
510
534
|
"aria-invalid": hasError ? "true" : void 0,
|
|
511
535
|
"aria-describedby": errorId,
|
|
512
536
|
onChange: handleChange,
|
|
537
|
+
"data-testid": testId ? `${testId}-textarea` : void 0,
|
|
513
538
|
className: utils_index.cn(
|
|
514
539
|
// Base styles - Light mode
|
|
515
540
|
"block w-full rounded-md border bg-white px-4 py-2.5 text-sm text-primary-900",
|
|
@@ -540,6 +565,7 @@ const Textarea = React.forwardRef(
|
|
|
540
565
|
{
|
|
541
566
|
id: errorId,
|
|
542
567
|
role: hasError ? "alert" : void 0,
|
|
568
|
+
"data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
|
|
543
569
|
className: utils_index.cn(
|
|
544
570
|
"text-sm",
|
|
545
571
|
hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
|
|
@@ -7241,18 +7267,20 @@ function Select({
|
|
|
7241
7267
|
className,
|
|
7242
7268
|
isLoading = false,
|
|
7243
7269
|
loadingText = "Loading...",
|
|
7244
|
-
placement = "bottom"
|
|
7270
|
+
placement = "bottom",
|
|
7271
|
+
testId
|
|
7245
7272
|
}) {
|
|
7246
7273
|
const selectedOption = options.find((opt) => opt.value === value);
|
|
7247
7274
|
const hasError = !!error2;
|
|
7248
7275
|
const isDisabled = disabled || isLoading;
|
|
7249
7276
|
const labelId = React.useId();
|
|
7250
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), children: [
|
|
7277
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), "data-testid": testId, children: [
|
|
7251
7278
|
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7252
7279
|
"label",
|
|
7253
7280
|
{
|
|
7254
7281
|
id: labelId,
|
|
7255
7282
|
className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
|
|
7283
|
+
"data-testid": testId ? `${testId}-label` : void 0,
|
|
7256
7284
|
children: [
|
|
7257
7285
|
label,
|
|
7258
7286
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
|
|
@@ -7265,6 +7293,7 @@ function Select({
|
|
|
7265
7293
|
{
|
|
7266
7294
|
"aria-label": !label ? placeholder : void 0,
|
|
7267
7295
|
"aria-labelledby": label ? labelId : void 0,
|
|
7296
|
+
"data-testid": testId ? `${testId}-button` : void 0,
|
|
7268
7297
|
className: utils_index.cn(
|
|
7269
7298
|
// Base styles - Light mode
|
|
7270
7299
|
"relative w-full rounded-md border bg-white px-4 py-2.5 text-left text-sm",
|
|
@@ -7322,11 +7351,13 @@ function Select({
|
|
|
7322
7351
|
"absolute z-dropdown max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-primary-800 dark:ring-primary-700",
|
|
7323
7352
|
placement === "top" ? "bottom-full mb-1" : "top-full mt-1"
|
|
7324
7353
|
),
|
|
7325
|
-
|
|
7354
|
+
"data-testid": testId ? `${testId}-options` : void 0,
|
|
7355
|
+
children: options.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7326
7356
|
It,
|
|
7327
7357
|
{
|
|
7328
7358
|
disabled: option.disabled,
|
|
7329
7359
|
value: option.value,
|
|
7360
|
+
"data-testid": testId ? `${testId}-option-${index2}` : void 0,
|
|
7330
7361
|
className: ({ active, selected }) => utils_index.cn(
|
|
7331
7362
|
"relative cursor-pointer select-none py-2.5 pl-10 pr-4",
|
|
7332
7363
|
// Light mode
|
|
@@ -7368,6 +7399,7 @@ function Select({
|
|
|
7368
7399
|
"p",
|
|
7369
7400
|
{
|
|
7370
7401
|
role: hasError ? "alert" : void 0,
|
|
7402
|
+
"data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
|
|
7371
7403
|
className: utils_index.cn(
|
|
7372
7404
|
"mt-1.5 text-sm",
|
|
7373
7405
|
hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
|
|
@@ -7397,7 +7429,7 @@ const CloseIcon$2 = () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
7397
7429
|
)
|
|
7398
7430
|
}
|
|
7399
7431
|
);
|
|
7400
|
-
const sizeStyles$
|
|
7432
|
+
const sizeStyles$b = {
|
|
7401
7433
|
sm: "max-w-[400px]",
|
|
7402
7434
|
md: "max-w-[560px]",
|
|
7403
7435
|
lg: "max-w-[720px]"
|
|
@@ -7413,7 +7445,8 @@ function Modal({
|
|
|
7413
7445
|
footer,
|
|
7414
7446
|
closeOnOverlay = true,
|
|
7415
7447
|
className,
|
|
7416
|
-
isLoading = false
|
|
7448
|
+
isLoading = false,
|
|
7449
|
+
testId
|
|
7417
7450
|
}) {
|
|
7418
7451
|
const handleClose = closeOnOverlay ? onClose : () => {
|
|
7419
7452
|
};
|
|
@@ -7428,7 +7461,7 @@ function Modal({
|
|
|
7428
7461
|
leave: "ease-in duration-100",
|
|
7429
7462
|
leaveFrom: "opacity-100",
|
|
7430
7463
|
leaveTo: "opacity-0",
|
|
7431
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm" })
|
|
7464
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm", "data-testid": testId ? `${testId}-overlay` : void 0 })
|
|
7432
7465
|
}
|
|
7433
7466
|
),
|
|
7434
7467
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 flex items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7450,9 +7483,10 @@ function Modal({
|
|
|
7450
7483
|
"bg-white border border-primary-200",
|
|
7451
7484
|
// Dark mode
|
|
7452
7485
|
"dark:bg-primary-800 dark:border-primary-700",
|
|
7453
|
-
sizeStyles$
|
|
7486
|
+
sizeStyles$b[size2],
|
|
7454
7487
|
className
|
|
7455
7488
|
),
|
|
7489
|
+
"data-testid": testId,
|
|
7456
7490
|
children: [
|
|
7457
7491
|
(title || showCloseButton) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7458
7492
|
"div",
|
|
@@ -7461,6 +7495,7 @@ function Modal({
|
|
|
7461
7495
|
"flex items-start justify-between px-6 py-4",
|
|
7462
7496
|
(children || footer) && "border-b border-primary-200 dark:border-primary-700"
|
|
7463
7497
|
),
|
|
7498
|
+
"data-testid": testId ? `${testId}-header` : void 0,
|
|
7464
7499
|
children: [
|
|
7465
7500
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
7466
7501
|
title && /* @__PURE__ */ jsxRuntime.jsx(Qe, { className: "text-lg font-semibold text-primary-900 dark:text-white", children: title }),
|
|
@@ -7479,13 +7514,14 @@ function Modal({
|
|
|
7479
7514
|
"focus:outline-none focus:ring-2 focus:ring-gold-500/20",
|
|
7480
7515
|
"transition-colors"
|
|
7481
7516
|
),
|
|
7517
|
+
"data-testid": testId ? `${testId}-close-button` : void 0,
|
|
7482
7518
|
children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon$2, {})
|
|
7483
7519
|
}
|
|
7484
7520
|
)
|
|
7485
7521
|
]
|
|
7486
7522
|
}
|
|
7487
7523
|
),
|
|
7488
|
-
children && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative px-6 py-4 text-primary-700 dark:text-primary-300", children: [
|
|
7524
|
+
children && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative px-6 py-4 text-primary-700 dark:text-primary-300", "data-testid": testId ? `${testId}-body` : void 0, children: [
|
|
7489
7525
|
children,
|
|
7490
7526
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-white/60 dark:bg-primary-800/60", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "md", color: "primary" }) })
|
|
7491
7527
|
] }),
|
|
@@ -7498,6 +7534,7 @@ function Modal({
|
|
|
7498
7534
|
"bg-primary-50 dark:bg-primary-900/50",
|
|
7499
7535
|
"rounded-b-lg"
|
|
7500
7536
|
),
|
|
7537
|
+
"data-testid": testId ? `${testId}-footer` : void 0,
|
|
7501
7538
|
children: footer
|
|
7502
7539
|
}
|
|
7503
7540
|
)
|
|
@@ -7528,7 +7565,7 @@ const CloseIcon$1 = () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
7528
7565
|
)
|
|
7529
7566
|
}
|
|
7530
7567
|
);
|
|
7531
|
-
const sizeStyles$
|
|
7568
|
+
const sizeStyles$a = {
|
|
7532
7569
|
sm: "max-w-[400px]",
|
|
7533
7570
|
md: "max-w-[560px]",
|
|
7534
7571
|
lg: "max-w-[720px]"
|
|
@@ -7542,7 +7579,8 @@ function Drawer({
|
|
|
7542
7579
|
showCloseButton = true,
|
|
7543
7580
|
footer,
|
|
7544
7581
|
className,
|
|
7545
|
-
isLoading = false
|
|
7582
|
+
isLoading = false,
|
|
7583
|
+
testId
|
|
7546
7584
|
}) {
|
|
7547
7585
|
return /* @__PURE__ */ jsxRuntime.jsx(Ke$2, { show: isOpen, as: React.Fragment, children: /* @__PURE__ */ jsxRuntime.jsxs(ht$1, { className: "relative z-50", onClose, children: [
|
|
7548
7586
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7555,7 +7593,7 @@ function Drawer({
|
|
|
7555
7593
|
leave: "ease-in duration-200",
|
|
7556
7594
|
leaveFrom: "opacity-100",
|
|
7557
7595
|
leaveTo: "opacity-0",
|
|
7558
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm" })
|
|
7596
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm", "data-testid": testId ? `${testId}-overlay` : void 0 })
|
|
7559
7597
|
}
|
|
7560
7598
|
),
|
|
7561
7599
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7577,9 +7615,10 @@ function Drawer({
|
|
|
7577
7615
|
"bg-white border-l border-primary-200",
|
|
7578
7616
|
// Dark mode
|
|
7579
7617
|
"dark:bg-primary-800 dark:border-primary-700",
|
|
7580
|
-
sizeStyles$
|
|
7618
|
+
sizeStyles$a[size2],
|
|
7581
7619
|
className
|
|
7582
7620
|
),
|
|
7621
|
+
"data-testid": testId,
|
|
7583
7622
|
children: [
|
|
7584
7623
|
(title || showCloseButton) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7585
7624
|
"div",
|
|
@@ -7603,13 +7642,14 @@ function Drawer({
|
|
|
7603
7642
|
"focus:outline-none focus:ring-2 focus:ring-gold-500/20",
|
|
7604
7643
|
"transition-colors"
|
|
7605
7644
|
),
|
|
7645
|
+
"data-testid": testId ? `${testId}-close-button` : void 0,
|
|
7606
7646
|
children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon$1, {})
|
|
7607
7647
|
}
|
|
7608
7648
|
)
|
|
7609
7649
|
]
|
|
7610
7650
|
}
|
|
7611
7651
|
),
|
|
7612
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 overflow-y-auto px-6 py-4 text-primary-700 dark:text-primary-300", children: [
|
|
7652
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 overflow-y-auto px-6 py-4 text-primary-700 dark:text-primary-300", "data-testid": testId ? `${testId}-content` : void 0, children: [
|
|
7613
7653
|
children,
|
|
7614
7654
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-white/60 dark:bg-primary-800/60", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "md", color: "primary" }) })
|
|
7615
7655
|
] }),
|
|
@@ -7647,7 +7687,8 @@ function ConfirmDialog({
|
|
|
7647
7687
|
variant = "neutral",
|
|
7648
7688
|
cancelText = "Cancel",
|
|
7649
7689
|
confirmText = "Confirm",
|
|
7650
|
-
loading = false
|
|
7690
|
+
loading = false,
|
|
7691
|
+
testId
|
|
7651
7692
|
}) {
|
|
7652
7693
|
const buttonVariant = variantToButton[variant];
|
|
7653
7694
|
const handleConfirm = () => {
|
|
@@ -7663,6 +7704,7 @@ function ConfirmDialog({
|
|
|
7663
7704
|
size: "sm",
|
|
7664
7705
|
showCloseButton: false,
|
|
7665
7706
|
closeOnOverlay: !loading,
|
|
7707
|
+
testId,
|
|
7666
7708
|
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-3", children: [
|
|
7667
7709
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7668
7710
|
Button,
|
|
@@ -7670,6 +7712,7 @@ function ConfirmDialog({
|
|
|
7670
7712
|
variant: "secondary",
|
|
7671
7713
|
onClick: onClose,
|
|
7672
7714
|
disabled: loading,
|
|
7715
|
+
"data-testid": testId ? `${testId}-cancel-button` : void 0,
|
|
7673
7716
|
children: cancelText
|
|
7674
7717
|
}
|
|
7675
7718
|
),
|
|
@@ -7679,6 +7722,7 @@ function ConfirmDialog({
|
|
|
7679
7722
|
variant: buttonVariant,
|
|
7680
7723
|
onClick: handleConfirm,
|
|
7681
7724
|
disabled: loading,
|
|
7725
|
+
"data-testid": testId ? `${testId}-confirm-button` : void 0,
|
|
7682
7726
|
children: loading ? "Loading..." : confirmText
|
|
7683
7727
|
}
|
|
7684
7728
|
)
|
|
@@ -7693,7 +7737,7 @@ const paddingStyles = {
|
|
|
7693
7737
|
md: "p-6",
|
|
7694
7738
|
lg: "p-8"
|
|
7695
7739
|
};
|
|
7696
|
-
const variantStyles$
|
|
7740
|
+
const variantStyles$4 = {
|
|
7697
7741
|
default: [
|
|
7698
7742
|
"shadow-sm border border-primary-200",
|
|
7699
7743
|
"dark:border-primary-700"
|
|
@@ -7718,6 +7762,7 @@ const Card = React.forwardRef(
|
|
|
7718
7762
|
hoverable = false,
|
|
7719
7763
|
children,
|
|
7720
7764
|
className,
|
|
7765
|
+
testId,
|
|
7721
7766
|
...props
|
|
7722
7767
|
}, ref) => {
|
|
7723
7768
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7734,7 +7779,7 @@ const Card = React.forwardRef(
|
|
|
7734
7779
|
// Padding
|
|
7735
7780
|
paddingStyles[padding],
|
|
7736
7781
|
// Variant
|
|
7737
|
-
variantStyles$
|
|
7782
|
+
variantStyles$4[variant],
|
|
7738
7783
|
// Hover effect
|
|
7739
7784
|
hoverable && [
|
|
7740
7785
|
"cursor-pointer",
|
|
@@ -7743,6 +7788,7 @@ const Card = React.forwardRef(
|
|
|
7743
7788
|
],
|
|
7744
7789
|
className
|
|
7745
7790
|
),
|
|
7791
|
+
"data-testid": testId,
|
|
7746
7792
|
...props,
|
|
7747
7793
|
children
|
|
7748
7794
|
}
|
|
@@ -7750,7 +7796,7 @@ const Card = React.forwardRef(
|
|
|
7750
7796
|
}
|
|
7751
7797
|
);
|
|
7752
7798
|
Card.displayName = "Card";
|
|
7753
|
-
const sizeStyles$
|
|
7799
|
+
const sizeStyles$9 = {
|
|
7754
7800
|
sm: "h-4 w-4",
|
|
7755
7801
|
md: "h-5 w-5",
|
|
7756
7802
|
lg: "h-6 w-6"
|
|
@@ -7772,6 +7818,7 @@ const Checkbox = React.forwardRef(
|
|
|
7772
7818
|
indeterminate = false,
|
|
7773
7819
|
className,
|
|
7774
7820
|
id,
|
|
7821
|
+
testId,
|
|
7775
7822
|
...props
|
|
7776
7823
|
}, forwardedRef) => {
|
|
7777
7824
|
const checkboxId = id || label?.toLowerCase().replace(/\s+/g, "-");
|
|
@@ -7798,7 +7845,7 @@ const Checkbox = React.forwardRef(
|
|
|
7798
7845
|
const handleChange = (e2) => {
|
|
7799
7846
|
onChange?.(e2.target.checked);
|
|
7800
7847
|
};
|
|
7801
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
7848
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, "data-testid": testId, children: [
|
|
7802
7849
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7803
7850
|
"label",
|
|
7804
7851
|
{
|
|
@@ -7807,6 +7854,7 @@ const Checkbox = React.forwardRef(
|
|
|
7807
7854
|
"inline-flex items-center gap-2",
|
|
7808
7855
|
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
7809
7856
|
),
|
|
7857
|
+
"data-testid": testId ? `${testId}-label` : void 0,
|
|
7810
7858
|
children: [
|
|
7811
7859
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7812
7860
|
"input",
|
|
@@ -7819,8 +7867,9 @@ const Checkbox = React.forwardRef(
|
|
|
7819
7867
|
"aria-invalid": hasError ? "true" : void 0,
|
|
7820
7868
|
"aria-describedby": errorId,
|
|
7821
7869
|
onChange: handleChange,
|
|
7870
|
+
"data-testid": testId ? `${testId}-checkbox` : void 0,
|
|
7822
7871
|
className: utils_index.cn(
|
|
7823
|
-
sizeStyles$
|
|
7872
|
+
sizeStyles$9[size2],
|
|
7824
7873
|
"rounded border transition-colors",
|
|
7825
7874
|
"focus:ring-2 focus:ring-offset-0",
|
|
7826
7875
|
"disabled:cursor-not-allowed",
|
|
@@ -7863,6 +7912,7 @@ const Checkbox = React.forwardRef(
|
|
|
7863
7912
|
{
|
|
7864
7913
|
id: errorId,
|
|
7865
7914
|
role: hasError ? "alert" : void 0,
|
|
7915
|
+
"data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
|
|
7866
7916
|
className: utils_index.cn(
|
|
7867
7917
|
"mt-1 text-sm",
|
|
7868
7918
|
hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
|
|
@@ -7874,7 +7924,7 @@ const Checkbox = React.forwardRef(
|
|
|
7874
7924
|
}
|
|
7875
7925
|
);
|
|
7876
7926
|
Checkbox.displayName = "Checkbox";
|
|
7877
|
-
const sizeStyles$
|
|
7927
|
+
const sizeStyles$8 = {
|
|
7878
7928
|
sm: "h-4 w-4",
|
|
7879
7929
|
md: "h-5 w-5",
|
|
7880
7930
|
lg: "h-6 w-6"
|
|
@@ -7892,6 +7942,7 @@ const Radio = React.forwardRef(
|
|
|
7892
7942
|
error: error2 = false,
|
|
7893
7943
|
className,
|
|
7894
7944
|
id,
|
|
7945
|
+
testId,
|
|
7895
7946
|
...props
|
|
7896
7947
|
}, ref) => {
|
|
7897
7948
|
const radioId = id || (label ? `${props.name}-${label.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
@@ -7904,6 +7955,7 @@ const Radio = React.forwardRef(
|
|
|
7904
7955
|
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
7905
7956
|
className
|
|
7906
7957
|
),
|
|
7958
|
+
"data-testid": testId,
|
|
7907
7959
|
children: [
|
|
7908
7960
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7909
7961
|
"input",
|
|
@@ -7912,8 +7964,9 @@ const Radio = React.forwardRef(
|
|
|
7912
7964
|
type: "radio",
|
|
7913
7965
|
id: radioId,
|
|
7914
7966
|
disabled,
|
|
7967
|
+
"data-testid": testId ? `${testId}-radio` : void 0,
|
|
7915
7968
|
className: utils_index.cn(
|
|
7916
|
-
sizeStyles$
|
|
7969
|
+
sizeStyles$8[size2],
|
|
7917
7970
|
"border transition-colors",
|
|
7918
7971
|
"focus:ring-2 focus:ring-offset-0",
|
|
7919
7972
|
"disabled:cursor-not-allowed",
|
|
@@ -7943,6 +7996,7 @@ const Radio = React.forwardRef(
|
|
|
7943
7996
|
"text-primary-700 dark:text-primary-200",
|
|
7944
7997
|
error2 && "text-error"
|
|
7945
7998
|
),
|
|
7999
|
+
"data-testid": testId ? `${testId}-label` : void 0,
|
|
7946
8000
|
children: label
|
|
7947
8001
|
}
|
|
7948
8002
|
)
|
|
@@ -7964,7 +8018,8 @@ function RadioGroup({
|
|
|
7964
8018
|
disabled = false,
|
|
7965
8019
|
orientation = "vertical",
|
|
7966
8020
|
className,
|
|
7967
|
-
isLoading = false
|
|
8021
|
+
isLoading = false,
|
|
8022
|
+
testId
|
|
7968
8023
|
}) {
|
|
7969
8024
|
const hasError = !!error2;
|
|
7970
8025
|
const groupId = `${name}-group`;
|
|
@@ -7972,7 +8027,7 @@ function RadioGroup({
|
|
|
7972
8027
|
const handleChange = (e2) => {
|
|
7973
8028
|
onChange?.(e2.target.value);
|
|
7974
8029
|
};
|
|
7975
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className, role: "radiogroup", "aria-labelledby": label ? groupId : void 0, children: [
|
|
8030
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className, role: "radiogroup", "aria-labelledby": label ? groupId : void 0, "data-testid": testId, children: [
|
|
7976
8031
|
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7977
8032
|
"legend",
|
|
7978
8033
|
{
|
|
@@ -7990,7 +8045,7 @@ function RadioGroup({
|
|
|
7990
8045
|
className: utils_index.cn(
|
|
7991
8046
|
orientation === "vertical" ? "space-y-2" : "flex flex-wrap gap-4"
|
|
7992
8047
|
),
|
|
7993
|
-
children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8048
|
+
children: options.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7994
8049
|
Radio,
|
|
7995
8050
|
{
|
|
7996
8051
|
name,
|
|
@@ -8000,7 +8055,8 @@ function RadioGroup({
|
|
|
8000
8055
|
disabled: isDisabled || option.disabled,
|
|
8001
8056
|
error: hasError,
|
|
8002
8057
|
checked: value === option.value,
|
|
8003
|
-
onChange: handleChange
|
|
8058
|
+
onChange: handleChange,
|
|
8059
|
+
testId: testId ? `${testId}-option-${index2}` : void 0
|
|
8004
8060
|
},
|
|
8005
8061
|
option.value
|
|
8006
8062
|
))
|
|
@@ -8010,6 +8066,7 @@ function RadioGroup({
|
|
|
8010
8066
|
"p",
|
|
8011
8067
|
{
|
|
8012
8068
|
role: hasError ? "alert" : void 0,
|
|
8069
|
+
"data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
|
|
8013
8070
|
className: utils_index.cn(
|
|
8014
8071
|
"mt-2 text-sm",
|
|
8015
8072
|
hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
|
|
@@ -8020,7 +8077,7 @@ function RadioGroup({
|
|
|
8020
8077
|
] });
|
|
8021
8078
|
}
|
|
8022
8079
|
RadioGroup.displayName = "RadioGroup";
|
|
8023
|
-
const sizeStyles$
|
|
8080
|
+
const sizeStyles$7 = {
|
|
8024
8081
|
sm: {
|
|
8025
8082
|
switch: "h-5 w-9",
|
|
8026
8083
|
dot: "h-3 w-3",
|
|
@@ -8045,11 +8102,12 @@ function Toggle({
|
|
|
8045
8102
|
disabled = false,
|
|
8046
8103
|
size: size2 = "md",
|
|
8047
8104
|
className,
|
|
8048
|
-
isLoading = false
|
|
8105
|
+
isLoading = false,
|
|
8106
|
+
testId
|
|
8049
8107
|
}) {
|
|
8050
|
-
const currentSize = sizeStyles$
|
|
8108
|
+
const currentSize = sizeStyles$7[size2];
|
|
8051
8109
|
const isDisabled = disabled || isLoading;
|
|
8052
|
-
return /* @__PURE__ */ jsxRuntime.jsx(W, { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
8110
|
+
return /* @__PURE__ */ jsxRuntime.jsx(W, { className, "data-testid": testId, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
8053
8111
|
(label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 mr-4", children: [
|
|
8054
8112
|
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8055
8113
|
Z,
|
|
@@ -8071,6 +8129,7 @@ function Toggle({
|
|
|
8071
8129
|
disabled: isDisabled,
|
|
8072
8130
|
onChange,
|
|
8073
8131
|
"aria-label": !label ? "Toggle" : void 0,
|
|
8132
|
+
"data-testid": testId ? `${testId}-toggle` : void 0,
|
|
8074
8133
|
className: utils_index.cn(
|
|
8075
8134
|
currentSize.switch,
|
|
8076
8135
|
"relative inline-flex shrink-0 cursor-pointer rounded-full",
|
|
@@ -8156,7 +8215,8 @@ function Combobox({
|
|
|
8156
8215
|
isLoading = false,
|
|
8157
8216
|
loadingText = "Loading...",
|
|
8158
8217
|
emptyText = "No results found",
|
|
8159
|
-
onSearch
|
|
8218
|
+
onSearch,
|
|
8219
|
+
testId
|
|
8160
8220
|
}) {
|
|
8161
8221
|
const [query, setQuery] = React.useState("");
|
|
8162
8222
|
const hasError = !!error2;
|
|
@@ -8176,12 +8236,13 @@ function Combobox({
|
|
|
8176
8236
|
onChange?.(newValue);
|
|
8177
8237
|
setQuery("");
|
|
8178
8238
|
};
|
|
8179
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), children: [
|
|
8239
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), "data-testid": testId, children: [
|
|
8180
8240
|
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8181
8241
|
"label",
|
|
8182
8242
|
{
|
|
8183
8243
|
id: labelId,
|
|
8184
8244
|
className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
|
|
8245
|
+
"data-testid": testId ? `${testId}-label` : void 0,
|
|
8185
8246
|
children: [
|
|
8186
8247
|
label,
|
|
8187
8248
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
|
|
@@ -8208,6 +8269,7 @@ function Combobox({
|
|
|
8208
8269
|
onSearch?.(newQuery);
|
|
8209
8270
|
},
|
|
8210
8271
|
placeholder,
|
|
8272
|
+
"data-testid": testId ? `${testId}-input` : void 0,
|
|
8211
8273
|
className: utils_index.cn(
|
|
8212
8274
|
// Base styles - Light mode
|
|
8213
8275
|
"w-full rounded-md border bg-white px-4 py-2.5 pr-10 text-sm text-primary-900",
|
|
@@ -8241,30 +8303,38 @@ function Combobox({
|
|
|
8241
8303
|
leaveFrom: "opacity-100",
|
|
8242
8304
|
leaveTo: "opacity-0",
|
|
8243
8305
|
afterLeave: () => setQuery(""),
|
|
8244
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8245
|
-
|
|
8246
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: loadingText })
|
|
8247
|
-
] }) : filteredOptions.length === 0 && query !== "" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative cursor-default select-none px-4 py-2.5 text-primary-500 dark:text-primary-400", children: emptyText }) : filteredOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8248
|
-
Ho,
|
|
8306
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8307
|
+
Uo,
|
|
8249
8308
|
{
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8309
|
+
className: "absolute z-dropdown mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-primary-800 dark:ring-primary-700",
|
|
8310
|
+
"data-testid": testId ? `${testId}-options` : void 0,
|
|
8311
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 px-4 py-2.5 text-primary-500 dark:text-primary-400", children: [
|
|
8312
|
+
/* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }),
|
|
8313
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: loadingText })
|
|
8314
|
+
] }) : filteredOptions.length === 0 && query !== "" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative cursor-default select-none px-4 py-2.5 text-primary-500 dark:text-primary-400", children: emptyText }) : filteredOptions.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8315
|
+
Ho,
|
|
8316
|
+
{
|
|
8317
|
+
value: option.value,
|
|
8318
|
+
disabled: option.disabled,
|
|
8319
|
+
"data-testid": testId ? `${testId}-option-${index2}` : void 0,
|
|
8320
|
+
className: ({ active, selected }) => utils_index.cn(
|
|
8321
|
+
"relative cursor-pointer select-none py-2.5 pl-10 pr-4",
|
|
8322
|
+
// Light mode
|
|
8323
|
+
active ? "bg-gold-50 text-primary-900" : "text-primary-900",
|
|
8324
|
+
// Dark mode
|
|
8325
|
+
active ? "dark:bg-primary-700 dark:text-primary-100" : "dark:text-primary-200",
|
|
8326
|
+
option.disabled && "cursor-not-allowed opacity-50",
|
|
8327
|
+
selected && "font-medium"
|
|
8328
|
+
),
|
|
8329
|
+
children: ({ selected }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8330
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate", children: option.label }),
|
|
8331
|
+
selected && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-gold-600 dark:text-gold-400", children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, {}) })
|
|
8332
|
+
] })
|
|
8333
|
+
},
|
|
8334
|
+
option.value
|
|
8335
|
+
))
|
|
8336
|
+
}
|
|
8337
|
+
)
|
|
8268
8338
|
}
|
|
8269
8339
|
)
|
|
8270
8340
|
] })
|
|
@@ -8274,6 +8344,7 @@ function Combobox({
|
|
|
8274
8344
|
"p",
|
|
8275
8345
|
{
|
|
8276
8346
|
role: hasError ? "alert" : void 0,
|
|
8347
|
+
"data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
|
|
8277
8348
|
className: utils_index.cn(
|
|
8278
8349
|
"mt-1.5 text-sm",
|
|
8279
8350
|
hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
|
|
@@ -8284,7 +8355,7 @@ function Combobox({
|
|
|
8284
8355
|
] });
|
|
8285
8356
|
}
|
|
8286
8357
|
Combobox.displayName = "Combobox";
|
|
8287
|
-
const variantStyles$
|
|
8358
|
+
const variantStyles$3 = {
|
|
8288
8359
|
default: utils_index.cn(
|
|
8289
8360
|
"bg-primary-100 text-primary-700 border-primary-200",
|
|
8290
8361
|
"dark:bg-primary-800 dark:text-primary-200 dark:border-primary-700"
|
|
@@ -8310,23 +8381,24 @@ const variantStyles$2 = {
|
|
|
8310
8381
|
"dark:bg-gold-900/50 dark:text-gold-300 dark:border-gold-700"
|
|
8311
8382
|
)
|
|
8312
8383
|
};
|
|
8313
|
-
const sizeStyles$
|
|
8384
|
+
const sizeStyles$6 = {
|
|
8314
8385
|
sm: "px-2 py-0.5 text-xs",
|
|
8315
8386
|
md: "px-2.5 py-1 text-sm",
|
|
8316
8387
|
lg: "px-3 py-1.5 text-base"
|
|
8317
8388
|
};
|
|
8318
8389
|
const Badge = React.forwardRef(
|
|
8319
|
-
({ variant = "default", size: size2 = "md", children, className, ...props }, ref) => {
|
|
8390
|
+
({ variant = "default", size: size2 = "md", children, className, testId, ...props }, ref) => {
|
|
8320
8391
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8321
8392
|
"span",
|
|
8322
8393
|
{
|
|
8323
8394
|
ref,
|
|
8324
8395
|
className: utils_index.cn(
|
|
8325
8396
|
"inline-flex items-center justify-center font-medium rounded-full border",
|
|
8326
|
-
variantStyles$
|
|
8327
|
-
sizeStyles$
|
|
8397
|
+
variantStyles$3[variant],
|
|
8398
|
+
sizeStyles$6[size2],
|
|
8328
8399
|
className
|
|
8329
8400
|
),
|
|
8401
|
+
"data-testid": testId,
|
|
8330
8402
|
...props,
|
|
8331
8403
|
children
|
|
8332
8404
|
}
|
|
@@ -8482,7 +8554,7 @@ const TableCell = React.forwardRef(
|
|
|
8482
8554
|
}
|
|
8483
8555
|
);
|
|
8484
8556
|
TableCell.displayName = "TableCell";
|
|
8485
|
-
const sizeStyles$
|
|
8557
|
+
const sizeStyles$5 = {
|
|
8486
8558
|
sm: "px-3 py-1.5 text-sm",
|
|
8487
8559
|
md: "px-4 py-2 text-sm",
|
|
8488
8560
|
lg: "px-5 py-2.5 text-base"
|
|
@@ -8496,6 +8568,7 @@ function Tabs({
|
|
|
8496
8568
|
size: size2 = "md",
|
|
8497
8569
|
className,
|
|
8498
8570
|
"aria-label": ariaLabel = "Navigation tabs",
|
|
8571
|
+
testId,
|
|
8499
8572
|
...props
|
|
8500
8573
|
}) {
|
|
8501
8574
|
const selectedIndex = React.useMemo(
|
|
@@ -8523,15 +8596,17 @@ function Tabs({
|
|
|
8523
8596
|
fullWidth && "w-full",
|
|
8524
8597
|
className
|
|
8525
8598
|
),
|
|
8599
|
+
"data-testid": testId,
|
|
8526
8600
|
...props,
|
|
8527
|
-
children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8601
|
+
children: tabs.map((tab, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8528
8602
|
dt,
|
|
8529
8603
|
{
|
|
8530
8604
|
disabled: tab.disabled,
|
|
8605
|
+
"data-testid": testId ? `${testId}-tab-${index2}` : void 0,
|
|
8531
8606
|
className: ({ selected }) => utils_index.cn(
|
|
8532
8607
|
"relative outline-none transition-colors duration-normal",
|
|
8533
8608
|
"focus-visible:ring-2 focus-visible:ring-gold-500/50",
|
|
8534
|
-
sizeStyles$
|
|
8609
|
+
sizeStyles$5[size2],
|
|
8535
8610
|
fullWidth && "flex-1",
|
|
8536
8611
|
// Default variant styles
|
|
8537
8612
|
variant === "default" && [
|
|
@@ -8574,6 +8649,7 @@ function TabContentPanels({
|
|
|
8574
8649
|
children,
|
|
8575
8650
|
className,
|
|
8576
8651
|
isLoading = false,
|
|
8652
|
+
testId,
|
|
8577
8653
|
...props
|
|
8578
8654
|
}) {
|
|
8579
8655
|
const activeContent = activeTab && children[activeTab];
|
|
@@ -8582,6 +8658,7 @@ function TabContentPanels({
|
|
|
8582
8658
|
{
|
|
8583
8659
|
role: "tabpanel",
|
|
8584
8660
|
className: utils_index.cn("relative mt-4", className),
|
|
8661
|
+
"data-testid": testId,
|
|
8585
8662
|
...props,
|
|
8586
8663
|
children: [
|
|
8587
8664
|
activeContent,
|
|
@@ -8646,6 +8723,7 @@ const Breadcrumbs = React.forwardRef(
|
|
|
8646
8723
|
maxItems = 0,
|
|
8647
8724
|
renderLink,
|
|
8648
8725
|
className,
|
|
8726
|
+
testId,
|
|
8649
8727
|
...props
|
|
8650
8728
|
}, ref) => {
|
|
8651
8729
|
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
@@ -8697,12 +8775,20 @@ const Breadcrumbs = React.forwardRef(
|
|
|
8697
8775
|
ref,
|
|
8698
8776
|
"aria-label": "Breadcrumb",
|
|
8699
8777
|
className: utils_index.cn("text-sm", className),
|
|
8778
|
+
"data-testid": testId,
|
|
8700
8779
|
...props,
|
|
8701
8780
|
children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center flex-wrap gap-1", children: displayItems.map((item, index2) => {
|
|
8702
8781
|
const isLast = index2 === displayItems.length - 1;
|
|
8703
8782
|
const showEllipsis = shouldCollapse && index2 === 0;
|
|
8704
8783
|
return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
8705
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8784
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8785
|
+
"li",
|
|
8786
|
+
{
|
|
8787
|
+
className: "inline-flex items-center",
|
|
8788
|
+
"data-testid": testId ? `${testId}-item-${index2}` : void 0,
|
|
8789
|
+
children: renderItem(item, index2, isLast)
|
|
8790
|
+
}
|
|
8791
|
+
),
|
|
8706
8792
|
showEllipsis && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8707
8793
|
/* @__PURE__ */ jsxRuntime.jsx("li", { className: "inline-flex items-center", "aria-hidden": "true", children: separatorElement }),
|
|
8708
8794
|
/* @__PURE__ */ jsxRuntime.jsx("li", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(EllipsisButton, { onClick: () => setIsExpanded(true) }) })
|
|
@@ -8715,7 +8801,7 @@ const Breadcrumbs = React.forwardRef(
|
|
|
8715
8801
|
}
|
|
8716
8802
|
);
|
|
8717
8803
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
8718
|
-
const variantStyles$
|
|
8804
|
+
const variantStyles$2 = {
|
|
8719
8805
|
text: "rounded",
|
|
8720
8806
|
circular: "rounded-full",
|
|
8721
8807
|
rectangular: "rounded-md"
|
|
@@ -8730,6 +8816,7 @@ const Skeleton = React.forwardRef(
|
|
|
8730
8816
|
label = "Loading...",
|
|
8731
8817
|
className,
|
|
8732
8818
|
style,
|
|
8819
|
+
testId,
|
|
8733
8820
|
...props
|
|
8734
8821
|
}, ref) => {
|
|
8735
8822
|
const widthValue = typeof width === "number" ? `${width}px` : width;
|
|
@@ -8744,6 +8831,7 @@ const Skeleton = React.forwardRef(
|
|
|
8744
8831
|
role: "status",
|
|
8745
8832
|
"aria-label": label,
|
|
8746
8833
|
"aria-busy": "true",
|
|
8834
|
+
"data-testid": testId,
|
|
8747
8835
|
...props,
|
|
8748
8836
|
children: [
|
|
8749
8837
|
Array.from({ length: lines }).map((_2, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8751,7 +8839,7 @@ const Skeleton = React.forwardRef(
|
|
|
8751
8839
|
{
|
|
8752
8840
|
className: utils_index.cn(
|
|
8753
8841
|
"bg-primary-200 dark:bg-primary-700",
|
|
8754
|
-
variantStyles$
|
|
8842
|
+
variantStyles$2[variant],
|
|
8755
8843
|
animate && "animate-pulse"
|
|
8756
8844
|
),
|
|
8757
8845
|
style: {
|
|
@@ -8773,7 +8861,7 @@ const Skeleton = React.forwardRef(
|
|
|
8773
8861
|
ref,
|
|
8774
8862
|
className: utils_index.cn(
|
|
8775
8863
|
"bg-primary-200 dark:bg-primary-700",
|
|
8776
|
-
variantStyles$
|
|
8864
|
+
variantStyles$2[variant],
|
|
8777
8865
|
animate && "animate-pulse",
|
|
8778
8866
|
className
|
|
8779
8867
|
),
|
|
@@ -8785,6 +8873,7 @@ const Skeleton = React.forwardRef(
|
|
|
8785
8873
|
role: "status",
|
|
8786
8874
|
"aria-label": label,
|
|
8787
8875
|
"aria-busy": "true",
|
|
8876
|
+
"data-testid": testId,
|
|
8788
8877
|
...props,
|
|
8789
8878
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: label })
|
|
8790
8879
|
}
|
|
@@ -8792,7 +8881,7 @@ const Skeleton = React.forwardRef(
|
|
|
8792
8881
|
}
|
|
8793
8882
|
);
|
|
8794
8883
|
Skeleton.displayName = "Skeleton";
|
|
8795
|
-
const defaultIcons = {
|
|
8884
|
+
const defaultIcons$1 = {
|
|
8796
8885
|
"no-data": /* @__PURE__ */ jsxRuntime.jsx(
|
|
8797
8886
|
"svg",
|
|
8798
8887
|
{
|
|
@@ -8851,7 +8940,7 @@ const defaultIcons = {
|
|
|
8851
8940
|
}
|
|
8852
8941
|
)
|
|
8853
8942
|
};
|
|
8854
|
-
const sizeStyles$
|
|
8943
|
+
const sizeStyles$4 = {
|
|
8855
8944
|
sm: {
|
|
8856
8945
|
container: "py-6 px-4",
|
|
8857
8946
|
icon: "w-10 h-10",
|
|
@@ -8885,9 +8974,10 @@ const EmptyState = React.forwardRef(
|
|
|
8885
8974
|
action,
|
|
8886
8975
|
size: size2 = "md",
|
|
8887
8976
|
className,
|
|
8977
|
+
testId,
|
|
8888
8978
|
...props
|
|
8889
8979
|
}, ref) => {
|
|
8890
|
-
const styles = sizeStyles$
|
|
8980
|
+
const styles = sizeStyles$4[size2];
|
|
8891
8981
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8892
8982
|
"div",
|
|
8893
8983
|
{
|
|
@@ -8897,9 +8987,17 @@ const EmptyState = React.forwardRef(
|
|
|
8897
8987
|
styles.container,
|
|
8898
8988
|
className
|
|
8899
8989
|
),
|
|
8990
|
+
"data-testid": testId,
|
|
8900
8991
|
...props,
|
|
8901
8992
|
children: [
|
|
8902
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8993
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8994
|
+
"div",
|
|
8995
|
+
{
|
|
8996
|
+
className: utils_index.cn(styles.icon, typeColors[type], "mb-4"),
|
|
8997
|
+
"data-testid": testId ? `${testId}-icon` : void 0,
|
|
8998
|
+
children: icon || defaultIcons$1[type]
|
|
8999
|
+
}
|
|
9000
|
+
),
|
|
8903
9001
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8904
9002
|
"h3",
|
|
8905
9003
|
{
|
|
@@ -8908,6 +9006,7 @@ const EmptyState = React.forwardRef(
|
|
|
8908
9006
|
"text-primary-900 dark:text-primary-100",
|
|
8909
9007
|
"mb-1"
|
|
8910
9008
|
),
|
|
9009
|
+
"data-testid": testId ? `${testId}-title` : void 0,
|
|
8911
9010
|
children: title
|
|
8912
9011
|
}
|
|
8913
9012
|
),
|
|
@@ -8919,10 +9018,11 @@ const EmptyState = React.forwardRef(
|
|
|
8919
9018
|
"text-primary-500 dark:text-primary-400",
|
|
8920
9019
|
"max-w-sm mb-4"
|
|
8921
9020
|
),
|
|
9021
|
+
"data-testid": testId ? `${testId}-description` : void 0,
|
|
8922
9022
|
children: description
|
|
8923
9023
|
}
|
|
8924
9024
|
),
|
|
8925
|
-
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: action })
|
|
9025
|
+
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", "data-testid": testId ? `${testId}-action` : void 0, children: action })
|
|
8926
9026
|
]
|
|
8927
9027
|
}
|
|
8928
9028
|
);
|
|
@@ -8931,7 +9031,7 @@ const EmptyState = React.forwardRef(
|
|
|
8931
9031
|
EmptyState.displayName = "EmptyState";
|
|
8932
9032
|
const ChevronLeftIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) });
|
|
8933
9033
|
const ChevronRightIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) });
|
|
8934
|
-
const sizeStyles$
|
|
9034
|
+
const sizeStyles$3 = {
|
|
8935
9035
|
sm: { button: "h-8 min-w-8 px-2 text-sm", text: "text-sm" },
|
|
8936
9036
|
md: { button: "h-10 min-w-10 px-3 text-sm", text: "text-sm" }
|
|
8937
9037
|
};
|
|
@@ -8978,10 +9078,11 @@ function Pagination({
|
|
|
8978
9078
|
totalItems,
|
|
8979
9079
|
disabled = false,
|
|
8980
9080
|
size: size2 = "md",
|
|
8981
|
-
className
|
|
9081
|
+
className,
|
|
9082
|
+
testId
|
|
8982
9083
|
}) {
|
|
8983
9084
|
const pageSizeId = React.useId();
|
|
8984
|
-
const currentSize = sizeStyles$
|
|
9085
|
+
const currentSize = sizeStyles$3[size2];
|
|
8985
9086
|
const canGoPrevious = currentPage > 1;
|
|
8986
9087
|
const canGoNext = currentPage < totalPages;
|
|
8987
9088
|
const pageNumbers = React.useMemo(
|
|
@@ -9011,13 +9112,14 @@ function Pagination({
|
|
|
9011
9112
|
};
|
|
9012
9113
|
if (variant === "load-more") {
|
|
9013
9114
|
if (!canGoNext) return null;
|
|
9014
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("flex justify-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9115
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("flex justify-center", className), "data-testid": testId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9015
9116
|
Button,
|
|
9016
9117
|
{
|
|
9017
9118
|
variant: "secondary",
|
|
9018
9119
|
size: size2 === "sm" ? "sm" : "md",
|
|
9019
9120
|
onClick: handleNext,
|
|
9020
9121
|
disabled,
|
|
9122
|
+
"data-testid": testId ? `${testId}-load-more` : void 0,
|
|
9021
9123
|
children: "Load more"
|
|
9022
9124
|
}
|
|
9023
9125
|
) });
|
|
@@ -9028,6 +9130,7 @@ function Pagination({
|
|
|
9028
9130
|
{
|
|
9029
9131
|
"aria-label": "Pagination",
|
|
9030
9132
|
className: utils_index.cn("flex items-center justify-between gap-4", className),
|
|
9133
|
+
"data-testid": testId,
|
|
9031
9134
|
children: [
|
|
9032
9135
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9033
9136
|
Button,
|
|
@@ -9037,6 +9140,7 @@ function Pagination({
|
|
|
9037
9140
|
onClick: handlePrevious,
|
|
9038
9141
|
disabled: disabled || !canGoPrevious,
|
|
9039
9142
|
"aria-label": "Previous page",
|
|
9143
|
+
"data-testid": testId ? `${testId}-prev` : void 0,
|
|
9040
9144
|
children: [
|
|
9041
9145
|
/* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, {}),
|
|
9042
9146
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: "Previous" })
|
|
@@ -9057,6 +9161,7 @@ function Pagination({
|
|
|
9057
9161
|
onClick: handleNext,
|
|
9058
9162
|
disabled: disabled || !canGoNext,
|
|
9059
9163
|
"aria-label": "Next page",
|
|
9164
|
+
"data-testid": testId ? `${testId}-next` : void 0,
|
|
9060
9165
|
children: [
|
|
9061
9166
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: "Next" }),
|
|
9062
9167
|
/* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, {})
|
|
@@ -9072,6 +9177,7 @@ function Pagination({
|
|
|
9072
9177
|
{
|
|
9073
9178
|
"aria-label": "Pagination",
|
|
9074
9179
|
className: utils_index.cn("flex items-center justify-between gap-4", className),
|
|
9180
|
+
"data-testid": testId,
|
|
9075
9181
|
children: [
|
|
9076
9182
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
9077
9183
|
itemsRange && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: utils_index.cn("text-primary-600 dark:text-primary-400", currentSize.text), children: [
|
|
@@ -9118,6 +9224,7 @@ function Pagination({
|
|
|
9118
9224
|
onClick: handlePrevious,
|
|
9119
9225
|
disabled: disabled || !canGoPrevious,
|
|
9120
9226
|
"aria-label": "Previous page",
|
|
9227
|
+
"data-testid": testId ? `${testId}-prev` : void 0,
|
|
9121
9228
|
className: utils_index.cn(
|
|
9122
9229
|
"inline-flex items-center justify-center rounded-md",
|
|
9123
9230
|
"border border-primary-300 dark:border-primary-600",
|
|
@@ -9152,6 +9259,7 @@ function Pagination({
|
|
|
9152
9259
|
disabled,
|
|
9153
9260
|
"aria-label": `Page ${page}`,
|
|
9154
9261
|
"aria-current": page === currentPage ? "page" : void 0,
|
|
9262
|
+
"data-testid": testId ? `${testId}-page-${page}` : void 0,
|
|
9155
9263
|
className: utils_index.cn(
|
|
9156
9264
|
"inline-flex items-center justify-center rounded-md",
|
|
9157
9265
|
"border transition-colors",
|
|
@@ -9180,6 +9288,7 @@ function Pagination({
|
|
|
9180
9288
|
onClick: handleNext,
|
|
9181
9289
|
disabled: disabled || !canGoNext,
|
|
9182
9290
|
"aria-label": "Next page",
|
|
9291
|
+
"data-testid": testId ? `${testId}-next` : void 0,
|
|
9183
9292
|
className: utils_index.cn(
|
|
9184
9293
|
"inline-flex items-center justify-center rounded-md",
|
|
9185
9294
|
"border border-primary-300 dark:border-primary-600",
|
|
@@ -9247,7 +9356,8 @@ function MultiSelect({
|
|
|
9247
9356
|
required = false,
|
|
9248
9357
|
disabled = false,
|
|
9249
9358
|
fullWidth = false,
|
|
9250
|
-
className
|
|
9359
|
+
className,
|
|
9360
|
+
testId
|
|
9251
9361
|
}) {
|
|
9252
9362
|
const [query, setQuery] = React.useState("");
|
|
9253
9363
|
const searchInputRef = React.useRef(null);
|
|
@@ -9303,12 +9413,13 @@ function MultiSelect({
|
|
|
9303
9413
|
};
|
|
9304
9414
|
const displayedChips = selectedOptions.slice(0, maxDisplayedItems);
|
|
9305
9415
|
const hiddenCount = selectedOptions.length - maxDisplayedItems;
|
|
9306
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), children: [
|
|
9416
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), "data-testid": testId, children: [
|
|
9307
9417
|
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9308
9418
|
"label",
|
|
9309
9419
|
{
|
|
9310
9420
|
id: labelId,
|
|
9311
9421
|
className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
|
|
9422
|
+
"data-testid": testId ? `${testId}-label` : void 0,
|
|
9312
9423
|
children: [
|
|
9313
9424
|
label,
|
|
9314
9425
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
|
|
@@ -9336,7 +9447,7 @@ function MultiSelect({
|
|
|
9336
9447
|
hasError ? "border-error focus-within:border-error focus-within:ring-2 focus-within:ring-error/20" : "border-primary-300 dark:border-primary-600 focus-within:border-gold-500 focus-within:ring-2 focus-within:ring-gold-500/20"
|
|
9337
9448
|
),
|
|
9338
9449
|
children: [
|
|
9339
|
-
displayedChips.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9450
|
+
displayedChips.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9340
9451
|
"span",
|
|
9341
9452
|
{
|
|
9342
9453
|
className: utils_index.cn(
|
|
@@ -9344,6 +9455,7 @@ function MultiSelect({
|
|
|
9344
9455
|
"bg-primary-100 dark:bg-primary-700",
|
|
9345
9456
|
"text-sm text-primary-700 dark:text-primary-200"
|
|
9346
9457
|
),
|
|
9458
|
+
"data-testid": testId ? `${testId}-chip-${index2}` : void 0,
|
|
9347
9459
|
children: [
|
|
9348
9460
|
option.label,
|
|
9349
9461
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9404,6 +9516,7 @@ function MultiSelect({
|
|
|
9404
9516
|
{
|
|
9405
9517
|
static: true,
|
|
9406
9518
|
className: "absolute z-dropdown mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-primary-800 dark:ring-primary-700",
|
|
9519
|
+
"data-testid": testId ? `${testId}-options` : void 0,
|
|
9407
9520
|
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 px-4 py-2.5 text-primary-500 dark:text-primary-400", children: [
|
|
9408
9521
|
/* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }),
|
|
9409
9522
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: loadingText })
|
|
@@ -9419,6 +9532,7 @@ function MultiSelect({
|
|
|
9419
9532
|
value: query,
|
|
9420
9533
|
onChange: handleSearchChange,
|
|
9421
9534
|
placeholder: "Search...",
|
|
9535
|
+
"data-testid": testId ? `${testId}-input` : void 0,
|
|
9422
9536
|
className: utils_index.cn(
|
|
9423
9537
|
"w-full rounded border border-primary-300 px-2 py-1 text-sm",
|
|
9424
9538
|
"bg-white dark:bg-primary-900",
|
|
@@ -9460,11 +9574,12 @@ function MultiSelect({
|
|
|
9460
9574
|
]
|
|
9461
9575
|
}
|
|
9462
9576
|
),
|
|
9463
|
-
filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-2.5 text-primary-500 dark:text-primary-400", children: emptyText }) : filteredOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9577
|
+
filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-2.5 text-primary-500 dark:text-primary-400", children: emptyText }) : filteredOptions.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9464
9578
|
It,
|
|
9465
9579
|
{
|
|
9466
9580
|
value: option.value,
|
|
9467
9581
|
disabled: option.disabled,
|
|
9582
|
+
"data-testid": testId ? `${testId}-option-${index2}` : void 0,
|
|
9468
9583
|
className: ({ active }) => utils_index.cn(
|
|
9469
9584
|
"flex cursor-pointer items-center gap-2 px-4 py-2.5",
|
|
9470
9585
|
active && "bg-primary-50 dark:bg-primary-700",
|
|
@@ -9498,6 +9613,7 @@ function MultiSelect({
|
|
|
9498
9613
|
"p",
|
|
9499
9614
|
{
|
|
9500
9615
|
role: hasError ? "alert" : void 0,
|
|
9616
|
+
"data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
|
|
9501
9617
|
className: utils_index.cn(
|
|
9502
9618
|
"mt-1.5 text-sm",
|
|
9503
9619
|
hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
|
|
@@ -9528,7 +9644,7 @@ function isItemActive(currentPath, href, matcher = "exact") {
|
|
|
9528
9644
|
return false;
|
|
9529
9645
|
}
|
|
9530
9646
|
}
|
|
9531
|
-
const sizeStyles = {
|
|
9647
|
+
const sizeStyles$2 = {
|
|
9532
9648
|
sm: "px-2 py-1.5 text-xs gap-2",
|
|
9533
9649
|
md: "px-3 py-2.5 text-sm gap-3",
|
|
9534
9650
|
lg: "px-4 py-3 text-base gap-3"
|
|
@@ -9566,6 +9682,7 @@ function SidebarItem({
|
|
|
9566
9682
|
onNavigate,
|
|
9567
9683
|
LinkComponent,
|
|
9568
9684
|
className,
|
|
9685
|
+
testId,
|
|
9569
9686
|
...props
|
|
9570
9687
|
}) {
|
|
9571
9688
|
if (!shouldShowItem(item)) {
|
|
@@ -9612,6 +9729,7 @@ function SidebarItem({
|
|
|
9612
9729
|
disabled: item.disabled,
|
|
9613
9730
|
"aria-label": item["aria-label"] || item.label,
|
|
9614
9731
|
title: collapsed ? item.label : void 0,
|
|
9732
|
+
"data-testid": testId,
|
|
9615
9733
|
className: utils_index.cn(
|
|
9616
9734
|
// Base styles
|
|
9617
9735
|
"flex w-full items-center rounded-lg font-medium",
|
|
@@ -9619,7 +9737,7 @@ function SidebarItem({
|
|
|
9619
9737
|
"focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:ring-offset-2",
|
|
9620
9738
|
"dark:focus:ring-offset-primary-900",
|
|
9621
9739
|
// Size styles
|
|
9622
|
-
sizeStyles[size2],
|
|
9740
|
+
sizeStyles$2[size2],
|
|
9623
9741
|
// State styles
|
|
9624
9742
|
item.disabled && "opacity-50 cursor-not-allowed",
|
|
9625
9743
|
!item.disabled && !isActive && [
|
|
@@ -9644,6 +9762,7 @@ function SidebarItem({
|
|
|
9644
9762
|
{
|
|
9645
9763
|
to: item.href,
|
|
9646
9764
|
onClick: handleClick,
|
|
9765
|
+
"data-testid": testId,
|
|
9647
9766
|
className: utils_index.cn(
|
|
9648
9767
|
// Base styles
|
|
9649
9768
|
"flex items-center rounded-lg font-medium",
|
|
@@ -9651,7 +9770,7 @@ function SidebarItem({
|
|
|
9651
9770
|
"focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:ring-offset-2",
|
|
9652
9771
|
"dark:focus:ring-offset-primary-900",
|
|
9653
9772
|
// Size styles
|
|
9654
|
-
sizeStyles[size2],
|
|
9773
|
+
sizeStyles$2[size2],
|
|
9655
9774
|
// State styles
|
|
9656
9775
|
item.disabled && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
9657
9776
|
!item.disabled && !isActive && [
|
|
@@ -9752,7 +9871,7 @@ const SidebarDivider = React.forwardRef(
|
|
|
9752
9871
|
}
|
|
9753
9872
|
);
|
|
9754
9873
|
SidebarDivider.displayName = "SidebarDivider";
|
|
9755
|
-
const variantStyles = {
|
|
9874
|
+
const variantStyles$1 = {
|
|
9756
9875
|
default: [
|
|
9757
9876
|
"bg-white border-r border-gold-500/40",
|
|
9758
9877
|
"dark:bg-primary-900 dark:border-gold-500/20"
|
|
@@ -9781,6 +9900,7 @@ const Sidebar = React.forwardRef(
|
|
|
9781
9900
|
collapsedWidth = "4rem",
|
|
9782
9901
|
className,
|
|
9783
9902
|
"aria-label": ariaLabel = "Main navigation",
|
|
9903
|
+
testId,
|
|
9784
9904
|
...props
|
|
9785
9905
|
}, ref) => {
|
|
9786
9906
|
React.useEffect(() => {
|
|
@@ -9888,6 +10008,7 @@ const Sidebar = React.forwardRef(
|
|
|
9888
10008
|
"focus:outline-none focus:ring-2 focus:ring-primary-500/20"
|
|
9889
10009
|
),
|
|
9890
10010
|
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
10011
|
+
"data-testid": testId ? `${testId}-toggle` : void 0,
|
|
9891
10012
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9892
10013
|
"svg",
|
|
9893
10014
|
{
|
|
@@ -9919,7 +10040,8 @@ const Sidebar = React.forwardRef(
|
|
|
9919
10040
|
{
|
|
9920
10041
|
className: "fixed inset-0 z-40 bg-black/20 lg:hidden",
|
|
9921
10042
|
onClick: handleOverlayClick,
|
|
9922
|
-
"aria-hidden": "true"
|
|
10043
|
+
"aria-hidden": "true",
|
|
10044
|
+
"data-testid": testId ? `${testId}-overlay` : void 0
|
|
9923
10045
|
}
|
|
9924
10046
|
),
|
|
9925
10047
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9935,11 +10057,12 @@ const Sidebar = React.forwardRef(
|
|
|
9935
10057
|
// Mobile styles
|
|
9936
10058
|
isOpen ? "translate-x-0" : "-translate-x-full",
|
|
9937
10059
|
// Variant styles
|
|
9938
|
-
variantStyles[variant],
|
|
10060
|
+
variantStyles$1[variant],
|
|
9939
10061
|
className
|
|
9940
10062
|
),
|
|
9941
10063
|
style: { width: sidebarWidth },
|
|
9942
10064
|
"aria-label": ariaLabel,
|
|
10065
|
+
"data-testid": testId,
|
|
9943
10066
|
...props,
|
|
9944
10067
|
children: sidebarContent
|
|
9945
10068
|
}
|
|
@@ -9948,6 +10071,518 @@ const Sidebar = React.forwardRef(
|
|
|
9948
10071
|
}
|
|
9949
10072
|
);
|
|
9950
10073
|
Sidebar.displayName = "Sidebar";
|
|
10074
|
+
const CheckCircleIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) });
|
|
10075
|
+
const XCircleIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) });
|
|
10076
|
+
const ExclamationCircleIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" }) });
|
|
10077
|
+
const InformationCircleIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" }) });
|
|
10078
|
+
const XMarkIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) });
|
|
10079
|
+
const defaultIcons = {
|
|
10080
|
+
success: /* @__PURE__ */ jsxRuntime.jsx(CheckCircleIcon, {}),
|
|
10081
|
+
error: /* @__PURE__ */ jsxRuntime.jsx(XCircleIcon, {}),
|
|
10082
|
+
warning: /* @__PURE__ */ jsxRuntime.jsx(ExclamationCircleIcon, {}),
|
|
10083
|
+
info: /* @__PURE__ */ jsxRuntime.jsx(InformationCircleIcon, {})
|
|
10084
|
+
};
|
|
10085
|
+
const variantStyles = {
|
|
10086
|
+
success: {
|
|
10087
|
+
container: utils_index.cn(
|
|
10088
|
+
"bg-success-light border-success/20 text-[#166534]",
|
|
10089
|
+
"dark:bg-success/10 dark:border-success/30 dark:text-[#86efac]"
|
|
10090
|
+
),
|
|
10091
|
+
icon: "text-success dark:text-[#4ade80]",
|
|
10092
|
+
title: "text-[#14532d] dark:text-[#bbf7d0]"
|
|
10093
|
+
},
|
|
10094
|
+
error: {
|
|
10095
|
+
container: utils_index.cn(
|
|
10096
|
+
"bg-error-light border-error/20 text-[#991b1b]",
|
|
10097
|
+
"dark:bg-error/10 dark:border-error/30 dark:text-[#fca5a5]"
|
|
10098
|
+
),
|
|
10099
|
+
icon: "text-error dark:text-[#f87171]",
|
|
10100
|
+
title: "text-[#7f1d1d] dark:text-[#fecaca]"
|
|
10101
|
+
},
|
|
10102
|
+
warning: {
|
|
10103
|
+
container: utils_index.cn(
|
|
10104
|
+
"bg-warning-light border-warning/20 text-[#854d0e]",
|
|
10105
|
+
"dark:bg-warning/10 dark:border-warning/30 dark:text-[#fde047]"
|
|
10106
|
+
),
|
|
10107
|
+
icon: "text-warning dark:text-[#facc15]",
|
|
10108
|
+
title: "text-[#713f12] dark:text-[#fef08a]"
|
|
10109
|
+
},
|
|
10110
|
+
info: {
|
|
10111
|
+
container: utils_index.cn(
|
|
10112
|
+
"bg-info-light border-info/20 text-[#1e40af]",
|
|
10113
|
+
"dark:bg-info/10 dark:border-info/30 dark:text-[#93c5fd]"
|
|
10114
|
+
),
|
|
10115
|
+
icon: "text-info dark:text-[#60a5fa]",
|
|
10116
|
+
title: "text-[#1e3a8a] dark:text-[#bfdbfe]"
|
|
10117
|
+
}
|
|
10118
|
+
};
|
|
10119
|
+
const Alert = React.forwardRef(
|
|
10120
|
+
({ variant = "info", title, message, icon, onClose, className, testId, ...props }, ref) => {
|
|
10121
|
+
const styles = variantStyles[variant];
|
|
10122
|
+
const displayIcon = icon === null ? null : icon ?? defaultIcons[variant];
|
|
10123
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10124
|
+
"div",
|
|
10125
|
+
{
|
|
10126
|
+
ref,
|
|
10127
|
+
role: "alert",
|
|
10128
|
+
className: utils_index.cn(
|
|
10129
|
+
"rounded-lg border p-4",
|
|
10130
|
+
styles.container,
|
|
10131
|
+
className
|
|
10132
|
+
),
|
|
10133
|
+
"data-testid": testId,
|
|
10134
|
+
...props,
|
|
10135
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start", children: [
|
|
10136
|
+
displayIcon !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10137
|
+
"div",
|
|
10138
|
+
{
|
|
10139
|
+
className: utils_index.cn("flex-shrink-0", styles.icon),
|
|
10140
|
+
"aria-hidden": "true",
|
|
10141
|
+
"data-testid": testId ? `${testId}-icon` : void 0,
|
|
10142
|
+
children: displayIcon
|
|
10143
|
+
}
|
|
10144
|
+
),
|
|
10145
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn("flex-1", displayIcon !== null && "ml-3"), children: [
|
|
10146
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: utils_index.cn("text-sm font-medium", styles.title), children: title }),
|
|
10147
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("text-sm", title && "mt-1"), children: message })
|
|
10148
|
+
] }),
|
|
10149
|
+
onClose && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-3 flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10150
|
+
"button",
|
|
10151
|
+
{
|
|
10152
|
+
type: "button",
|
|
10153
|
+
onClick: onClose,
|
|
10154
|
+
className: utils_index.cn(
|
|
10155
|
+
"inline-flex rounded-md p-1.5",
|
|
10156
|
+
"hover:opacity-75 focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
10157
|
+
"focus:ring-current/20",
|
|
10158
|
+
"dark:focus:ring-offset-primary-900"
|
|
10159
|
+
),
|
|
10160
|
+
"data-testid": testId ? `${testId}-close-button` : void 0,
|
|
10161
|
+
children: [
|
|
10162
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Dismiss" }),
|
|
10163
|
+
/* @__PURE__ */ jsxRuntime.jsx(XMarkIcon, {})
|
|
10164
|
+
]
|
|
10165
|
+
}
|
|
10166
|
+
) })
|
|
10167
|
+
] })
|
|
10168
|
+
}
|
|
10169
|
+
);
|
|
10170
|
+
}
|
|
10171
|
+
);
|
|
10172
|
+
Alert.displayName = "Alert";
|
|
10173
|
+
const sizeStyles$1 = {
|
|
10174
|
+
xs: { container: "w-6 h-6", text: "text-xs", status: "w-2 h-2 border" },
|
|
10175
|
+
sm: { container: "w-8 h-8", text: "text-sm", status: "w-2.5 h-2.5 border" },
|
|
10176
|
+
md: { container: "w-10 h-10", text: "text-base", status: "w-3 h-3 border-2" },
|
|
10177
|
+
lg: { container: "w-12 h-12", text: "text-lg", status: "w-3.5 h-3.5 border-2" },
|
|
10178
|
+
xl: { container: "w-16 h-16", text: "text-2xl", status: "w-4 h-4 border-2" }
|
|
10179
|
+
};
|
|
10180
|
+
const statusStyles = {
|
|
10181
|
+
online: "bg-success",
|
|
10182
|
+
offline: "bg-primary-400 dark:bg-primary-500",
|
|
10183
|
+
away: "bg-warning",
|
|
10184
|
+
busy: "bg-error"
|
|
10185
|
+
};
|
|
10186
|
+
const Avatar = React.forwardRef(
|
|
10187
|
+
({ name, src, size: size2 = "md", alt, status, className, testId, ...props }, ref) => {
|
|
10188
|
+
const getInitials = (fullName) => {
|
|
10189
|
+
const names = fullName.trim().split(" ");
|
|
10190
|
+
if (names.length === 1) {
|
|
10191
|
+
return names[0]?.charAt(0).toUpperCase() || "";
|
|
10192
|
+
}
|
|
10193
|
+
const firstName = names[0];
|
|
10194
|
+
const lastName = names[names.length - 1];
|
|
10195
|
+
return ((firstName?.charAt(0) || "") + (lastName?.charAt(0) || "")).toUpperCase();
|
|
10196
|
+
};
|
|
10197
|
+
const initials = getInitials(name);
|
|
10198
|
+
const styles = sizeStyles$1[size2];
|
|
10199
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10200
|
+
"div",
|
|
10201
|
+
{
|
|
10202
|
+
ref,
|
|
10203
|
+
className: utils_index.cn(
|
|
10204
|
+
"relative inline-flex items-center justify-center",
|
|
10205
|
+
"rounded-full font-medium",
|
|
10206
|
+
// Light mode
|
|
10207
|
+
"bg-gold-500 text-white",
|
|
10208
|
+
// Dark mode
|
|
10209
|
+
"dark:bg-gold-600 dark:text-white",
|
|
10210
|
+
styles.container,
|
|
10211
|
+
className
|
|
10212
|
+
),
|
|
10213
|
+
"data-testid": testId,
|
|
10214
|
+
...props,
|
|
10215
|
+
children: [
|
|
10216
|
+
src ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10217
|
+
"img",
|
|
10218
|
+
{
|
|
10219
|
+
src,
|
|
10220
|
+
alt: alt || `${name}'s avatar`,
|
|
10221
|
+
className: "w-full h-full rounded-full object-cover",
|
|
10222
|
+
"data-testid": testId ? `${testId}-image` : void 0
|
|
10223
|
+
}
|
|
10224
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.text, children: initials }),
|
|
10225
|
+
status && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10226
|
+
"span",
|
|
10227
|
+
{
|
|
10228
|
+
role: "status",
|
|
10229
|
+
className: utils_index.cn(
|
|
10230
|
+
"absolute bottom-0 right-0 rounded-full",
|
|
10231
|
+
"border-white dark:border-primary-900",
|
|
10232
|
+
styles.status,
|
|
10233
|
+
statusStyles[status]
|
|
10234
|
+
),
|
|
10235
|
+
"aria-label": `Status: ${status}`,
|
|
10236
|
+
"data-testid": testId ? `${testId}-status` : void 0
|
|
10237
|
+
}
|
|
10238
|
+
)
|
|
10239
|
+
]
|
|
10240
|
+
}
|
|
10241
|
+
);
|
|
10242
|
+
}
|
|
10243
|
+
);
|
|
10244
|
+
Avatar.displayName = "Avatar";
|
|
10245
|
+
const OTPInput = ({
|
|
10246
|
+
length = 6,
|
|
10247
|
+
value,
|
|
10248
|
+
onChange,
|
|
10249
|
+
error: error2,
|
|
10250
|
+
disabled = false,
|
|
10251
|
+
autoFocus = false,
|
|
10252
|
+
label = "One-time password",
|
|
10253
|
+
className
|
|
10254
|
+
}) => {
|
|
10255
|
+
const inputRefs = React.useRef([]);
|
|
10256
|
+
const digits = value.split("").slice(0, length);
|
|
10257
|
+
while (digits.length < length) {
|
|
10258
|
+
digits.push("");
|
|
10259
|
+
}
|
|
10260
|
+
const focusInput = React.useCallback((index2) => {
|
|
10261
|
+
const input = inputRefs.current[index2];
|
|
10262
|
+
if (input) {
|
|
10263
|
+
input.focus();
|
|
10264
|
+
input.select();
|
|
10265
|
+
}
|
|
10266
|
+
}, []);
|
|
10267
|
+
const handleChange = React.useCallback(
|
|
10268
|
+
(index2, event_) => {
|
|
10269
|
+
const newValue = event_.target.value;
|
|
10270
|
+
if (!/^\d*$/.test(newValue)) return;
|
|
10271
|
+
const digit = newValue.slice(-1);
|
|
10272
|
+
const newDigits = [...digits];
|
|
10273
|
+
newDigits[index2] = digit;
|
|
10274
|
+
const newOtp = newDigits.join("");
|
|
10275
|
+
onChange(newOtp);
|
|
10276
|
+
if (digit && index2 < length - 1) {
|
|
10277
|
+
focusInput(index2 + 1);
|
|
10278
|
+
}
|
|
10279
|
+
},
|
|
10280
|
+
[digits, length, onChange, focusInput]
|
|
10281
|
+
);
|
|
10282
|
+
const handleKeyDown = React.useCallback(
|
|
10283
|
+
(index2, event_) => {
|
|
10284
|
+
switch (event_.key) {
|
|
10285
|
+
case "Backspace":
|
|
10286
|
+
if (!digits[index2] && index2 > 0) {
|
|
10287
|
+
event_.preventDefault();
|
|
10288
|
+
const newDigits = [...digits];
|
|
10289
|
+
newDigits[index2 - 1] = "";
|
|
10290
|
+
onChange(newDigits.join(""));
|
|
10291
|
+
focusInput(index2 - 1);
|
|
10292
|
+
} else if (digits[index2]) {
|
|
10293
|
+
const newDigits = [...digits];
|
|
10294
|
+
newDigits[index2] = "";
|
|
10295
|
+
onChange(newDigits.join(""));
|
|
10296
|
+
}
|
|
10297
|
+
break;
|
|
10298
|
+
case "ArrowLeft":
|
|
10299
|
+
event_.preventDefault();
|
|
10300
|
+
if (index2 > 0) {
|
|
10301
|
+
focusInput(index2 - 1);
|
|
10302
|
+
}
|
|
10303
|
+
break;
|
|
10304
|
+
case "ArrowRight":
|
|
10305
|
+
event_.preventDefault();
|
|
10306
|
+
if (index2 < length - 1) {
|
|
10307
|
+
focusInput(index2 + 1);
|
|
10308
|
+
}
|
|
10309
|
+
break;
|
|
10310
|
+
case "Delete": {
|
|
10311
|
+
event_.preventDefault();
|
|
10312
|
+
const newDigits = [...digits];
|
|
10313
|
+
newDigits[index2] = "";
|
|
10314
|
+
onChange(newDigits.join(""));
|
|
10315
|
+
break;
|
|
10316
|
+
}
|
|
10317
|
+
}
|
|
10318
|
+
},
|
|
10319
|
+
[digits, length, onChange, focusInput]
|
|
10320
|
+
);
|
|
10321
|
+
const handlePaste = React.useCallback(
|
|
10322
|
+
(event_) => {
|
|
10323
|
+
event_.preventDefault();
|
|
10324
|
+
const pastedData = event_.clipboardData.getData("text");
|
|
10325
|
+
const pastedDigits = pastedData.replace(/\D/g, "").slice(0, length);
|
|
10326
|
+
if (pastedDigits) {
|
|
10327
|
+
onChange(pastedDigits);
|
|
10328
|
+
const focusIndex = Math.min(pastedDigits.length, length - 1);
|
|
10329
|
+
focusInput(focusIndex);
|
|
10330
|
+
}
|
|
10331
|
+
},
|
|
10332
|
+
[length, onChange, focusInput]
|
|
10333
|
+
);
|
|
10334
|
+
const errorId = error2 ? "otp-input-error" : void 0;
|
|
10335
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn("w-full", className), "data-testid": "otp-input", children: [
|
|
10336
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10337
|
+
"div",
|
|
10338
|
+
{
|
|
10339
|
+
role: "group",
|
|
10340
|
+
"aria-label": label,
|
|
10341
|
+
"aria-describedby": errorId,
|
|
10342
|
+
className: "flex justify-center gap-2 sm:gap-3",
|
|
10343
|
+
children: digits.map((digit, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10344
|
+
"input",
|
|
10345
|
+
{
|
|
10346
|
+
ref: (element) => {
|
|
10347
|
+
inputRefs.current[index2] = element;
|
|
10348
|
+
},
|
|
10349
|
+
type: "text",
|
|
10350
|
+
inputMode: "numeric",
|
|
10351
|
+
pattern: "\\d*",
|
|
10352
|
+
maxLength: 1,
|
|
10353
|
+
value: digit,
|
|
10354
|
+
disabled,
|
|
10355
|
+
autoFocus: autoFocus && index2 === 0,
|
|
10356
|
+
"aria-label": `Digit ${index2 + 1} of ${length}`,
|
|
10357
|
+
"aria-invalid": !!error2,
|
|
10358
|
+
"data-testid": `otp-input-digit-${index2}`,
|
|
10359
|
+
className: utils_index.cn(
|
|
10360
|
+
"w-10 h-12 sm:w-12 sm:h-14",
|
|
10361
|
+
"text-center text-xl sm:text-2xl font-semibold",
|
|
10362
|
+
"border-2 rounded-lg",
|
|
10363
|
+
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500",
|
|
10364
|
+
"transition-colors duration-200",
|
|
10365
|
+
// Light mode
|
|
10366
|
+
error2 ? "border-error bg-error-light" : "border-primary-300 bg-white",
|
|
10367
|
+
// Dark mode
|
|
10368
|
+
error2 ? "dark:border-error dark:bg-error/10" : "dark:border-primary-600 dark:bg-primary-900 dark:text-white",
|
|
10369
|
+
"dark:focus:ring-primary-400 dark:focus:border-primary-400",
|
|
10370
|
+
disabled && "bg-primary-100 cursor-not-allowed opacity-50 dark:bg-primary-800"
|
|
10371
|
+
),
|
|
10372
|
+
onChange: (event_) => handleChange(index2, event_),
|
|
10373
|
+
onKeyDown: (event_) => handleKeyDown(index2, event_),
|
|
10374
|
+
onPaste: handlePaste,
|
|
10375
|
+
onFocus: (event_) => event_.target.select()
|
|
10376
|
+
},
|
|
10377
|
+
index2
|
|
10378
|
+
))
|
|
10379
|
+
}
|
|
10380
|
+
),
|
|
10381
|
+
error2 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10382
|
+
"p",
|
|
10383
|
+
{
|
|
10384
|
+
id: errorId,
|
|
10385
|
+
role: "alert",
|
|
10386
|
+
"aria-live": "assertive",
|
|
10387
|
+
"data-testid": "otp-input-error",
|
|
10388
|
+
className: utils_index.cn(
|
|
10389
|
+
"mt-2 text-sm text-center",
|
|
10390
|
+
"text-error dark:text-[#fca5a5]"
|
|
10391
|
+
),
|
|
10392
|
+
children: error2
|
|
10393
|
+
}
|
|
10394
|
+
)
|
|
10395
|
+
] });
|
|
10396
|
+
};
|
|
10397
|
+
const DateInput = React.forwardRef(
|
|
10398
|
+
({
|
|
10399
|
+
value,
|
|
10400
|
+
onChange,
|
|
10401
|
+
label,
|
|
10402
|
+
error: error2,
|
|
10403
|
+
helperText,
|
|
10404
|
+
fullWidth = false,
|
|
10405
|
+
disabled = false,
|
|
10406
|
+
className,
|
|
10407
|
+
id,
|
|
10408
|
+
required,
|
|
10409
|
+
min: min2,
|
|
10410
|
+
max: max2,
|
|
10411
|
+
...props
|
|
10412
|
+
}, ref) => {
|
|
10413
|
+
const inputId = id || label?.toLowerCase().replace(/\s+/g, "-");
|
|
10414
|
+
const hasError = !!error2;
|
|
10415
|
+
const errorId = hasError ? `${inputId}-error` : void 0;
|
|
10416
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto"), children: [
|
|
10417
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10418
|
+
"label",
|
|
10419
|
+
{
|
|
10420
|
+
htmlFor: inputId,
|
|
10421
|
+
className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
|
|
10422
|
+
children: [
|
|
10423
|
+
label,
|
|
10424
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
|
|
10425
|
+
]
|
|
10426
|
+
}
|
|
10427
|
+
),
|
|
10428
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10429
|
+
"input",
|
|
10430
|
+
{
|
|
10431
|
+
ref,
|
|
10432
|
+
type: "date",
|
|
10433
|
+
id: inputId,
|
|
10434
|
+
"data-testid": "date-input",
|
|
10435
|
+
value: value || "",
|
|
10436
|
+
onChange: (event_) => onChange(event_.target.value || null),
|
|
10437
|
+
disabled,
|
|
10438
|
+
required,
|
|
10439
|
+
min: min2,
|
|
10440
|
+
max: max2,
|
|
10441
|
+
"aria-label": label ? void 0 : "Select date",
|
|
10442
|
+
"aria-invalid": hasError ? "true" : void 0,
|
|
10443
|
+
"aria-describedby": errorId,
|
|
10444
|
+
className: utils_index.cn(
|
|
10445
|
+
// Base styles - Light mode
|
|
10446
|
+
"block w-full rounded-md border bg-white px-4 py-2.5 text-sm text-primary-900",
|
|
10447
|
+
"transition-colors duration-normal",
|
|
10448
|
+
"focus:outline-none focus:ring-2",
|
|
10449
|
+
"disabled:cursor-not-allowed disabled:bg-primary-50 disabled:text-primary-500",
|
|
10450
|
+
// Base styles - Dark mode
|
|
10451
|
+
"dark:bg-primary-800 dark:text-primary-100",
|
|
10452
|
+
"dark:disabled:bg-primary-900 dark:disabled:text-primary-600",
|
|
10453
|
+
// Border and focus styles
|
|
10454
|
+
hasError ? "border-error focus:border-error focus:ring-error/20 dark:border-error/70 dark:focus:ring-error/30" : "border-primary-300 focus:border-gold-500 focus:ring-gold-500/20 dark:border-primary-600 dark:focus:border-gold-400 dark:focus:ring-gold-400/30",
|
|
10455
|
+
// Custom className
|
|
10456
|
+
className
|
|
10457
|
+
),
|
|
10458
|
+
...props
|
|
10459
|
+
}
|
|
10460
|
+
),
|
|
10461
|
+
(error2 || helperText) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10462
|
+
"p",
|
|
10463
|
+
{
|
|
10464
|
+
id: errorId,
|
|
10465
|
+
role: hasError ? "alert" : void 0,
|
|
10466
|
+
className: utils_index.cn(
|
|
10467
|
+
"mt-1.5 text-sm",
|
|
10468
|
+
hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
|
|
10469
|
+
),
|
|
10470
|
+
children: error2 || helperText
|
|
10471
|
+
}
|
|
10472
|
+
)
|
|
10473
|
+
] });
|
|
10474
|
+
}
|
|
10475
|
+
);
|
|
10476
|
+
DateInput.displayName = "DateInput";
|
|
10477
|
+
const sizeStyles = {
|
|
10478
|
+
sm: "px-2.5 py-1 text-xs gap-1",
|
|
10479
|
+
md: "px-3 py-1.5 text-sm gap-1.5",
|
|
10480
|
+
lg: "px-4 py-2 text-base gap-2"
|
|
10481
|
+
};
|
|
10482
|
+
const checkmarkSize = {
|
|
10483
|
+
sm: "w-3 h-3",
|
|
10484
|
+
md: "w-4 h-4",
|
|
10485
|
+
lg: "w-5 h-5"
|
|
10486
|
+
};
|
|
10487
|
+
const PillSelector = React.forwardRef(
|
|
10488
|
+
({
|
|
10489
|
+
options,
|
|
10490
|
+
selected,
|
|
10491
|
+
onChange,
|
|
10492
|
+
multiple = true,
|
|
10493
|
+
size: size2 = "md",
|
|
10494
|
+
label,
|
|
10495
|
+
fullWidth = false,
|
|
10496
|
+
disabled = false,
|
|
10497
|
+
className,
|
|
10498
|
+
...props
|
|
10499
|
+
}, ref) => {
|
|
10500
|
+
const handleClick = (value) => {
|
|
10501
|
+
if (disabled) return;
|
|
10502
|
+
if (multiple) {
|
|
10503
|
+
if (selected.includes(value)) {
|
|
10504
|
+
onChange(selected.filter((v2) => v2 !== value));
|
|
10505
|
+
} else {
|
|
10506
|
+
onChange([...selected, value]);
|
|
10507
|
+
}
|
|
10508
|
+
} else {
|
|
10509
|
+
onChange([value]);
|
|
10510
|
+
}
|
|
10511
|
+
};
|
|
10512
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10513
|
+
"div",
|
|
10514
|
+
{
|
|
10515
|
+
ref,
|
|
10516
|
+
className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className),
|
|
10517
|
+
...props,
|
|
10518
|
+
children: [
|
|
10519
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white", children: label }),
|
|
10520
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", role: "group", "aria-label": label, children: options.map((option) => {
|
|
10521
|
+
const isSelected = selected.includes(option.value);
|
|
10522
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10523
|
+
"button",
|
|
10524
|
+
{
|
|
10525
|
+
type: "button",
|
|
10526
|
+
disabled,
|
|
10527
|
+
"aria-pressed": isSelected,
|
|
10528
|
+
onClick: () => handleClick(option.value),
|
|
10529
|
+
className: utils_index.cn(
|
|
10530
|
+
"inline-flex items-center justify-center rounded-full border font-medium",
|
|
10531
|
+
"transition-colors duration-normal",
|
|
10532
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-1",
|
|
10533
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
10534
|
+
sizeStyles[size2],
|
|
10535
|
+
isSelected ? utils_index.cn(
|
|
10536
|
+
// Light mode - selected
|
|
10537
|
+
"border-primary-700 bg-primary-700 text-white",
|
|
10538
|
+
"hover:bg-primary-800 hover:border-primary-800",
|
|
10539
|
+
"focus:ring-primary-500/30",
|
|
10540
|
+
// Dark mode - selected
|
|
10541
|
+
"dark:border-gold-500 dark:bg-gold-500 dark:text-primary-900",
|
|
10542
|
+
"dark:hover:bg-gold-400 dark:hover:border-gold-400",
|
|
10543
|
+
"dark:focus:ring-gold-400/30"
|
|
10544
|
+
) : utils_index.cn(
|
|
10545
|
+
// Light mode - unselected
|
|
10546
|
+
"border-primary-300 bg-white text-primary-700",
|
|
10547
|
+
"hover:border-primary-400 hover:bg-primary-50",
|
|
10548
|
+
"focus:ring-primary-500/20",
|
|
10549
|
+
// Dark mode - unselected
|
|
10550
|
+
"dark:border-primary-600 dark:bg-primary-800 dark:text-primary-200",
|
|
10551
|
+
"dark:hover:border-primary-500 dark:hover:bg-primary-700",
|
|
10552
|
+
"dark:focus:ring-primary-400/20"
|
|
10553
|
+
)
|
|
10554
|
+
),
|
|
10555
|
+
children: [
|
|
10556
|
+
isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10557
|
+
"svg",
|
|
10558
|
+
{
|
|
10559
|
+
className: checkmarkSize[size2],
|
|
10560
|
+
fill: "currentColor",
|
|
10561
|
+
viewBox: "0 0 20 20",
|
|
10562
|
+
"aria-hidden": "true",
|
|
10563
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10564
|
+
"path",
|
|
10565
|
+
{
|
|
10566
|
+
fillRule: "evenodd",
|
|
10567
|
+
clipRule: "evenodd",
|
|
10568
|
+
d: "M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z"
|
|
10569
|
+
}
|
|
10570
|
+
)
|
|
10571
|
+
}
|
|
10572
|
+
),
|
|
10573
|
+
option.icon,
|
|
10574
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: option.label })
|
|
10575
|
+
]
|
|
10576
|
+
},
|
|
10577
|
+
option.value
|
|
10578
|
+
);
|
|
10579
|
+
}) })
|
|
10580
|
+
]
|
|
10581
|
+
}
|
|
10582
|
+
);
|
|
10583
|
+
}
|
|
10584
|
+
);
|
|
10585
|
+
PillSelector.displayName = "PillSelector";
|
|
9951
10586
|
exports.useDebounce = useSidebar.useDebounce;
|
|
9952
10587
|
exports.useDebouncedCallback = useSidebar.useDebouncedCallback;
|
|
9953
10588
|
exports.useDebouncedCallbackWithControl = useSidebar.useDebouncedCallbackWithControl;
|
|
@@ -9955,6 +10590,8 @@ exports.useSelection = useSidebar.useSelection;
|
|
|
9955
10590
|
exports.useSidebar = useSidebar.useSidebar;
|
|
9956
10591
|
exports.useTable = useSidebar.useTable;
|
|
9957
10592
|
exports.cn = utils_index.cn;
|
|
10593
|
+
exports.Alert = Alert;
|
|
10594
|
+
exports.Avatar = Avatar;
|
|
9958
10595
|
exports.Badge = Badge;
|
|
9959
10596
|
exports.Breadcrumbs = Breadcrumbs;
|
|
9960
10597
|
exports.Button = Button;
|
|
@@ -9962,13 +10599,16 @@ exports.Card = Card;
|
|
|
9962
10599
|
exports.Checkbox = Checkbox;
|
|
9963
10600
|
exports.Combobox = Combobox;
|
|
9964
10601
|
exports.ConfirmDialog = ConfirmDialog;
|
|
10602
|
+
exports.DateInput = DateInput;
|
|
9965
10603
|
exports.Drawer = Drawer;
|
|
9966
10604
|
exports.EmptyState = EmptyState;
|
|
9967
10605
|
exports.Input = Input;
|
|
9968
10606
|
exports.Modal = Modal;
|
|
9969
10607
|
exports.MultiSelect = MultiSelect;
|
|
10608
|
+
exports.OTPInput = OTPInput;
|
|
9970
10609
|
exports.Pagination = Pagination;
|
|
9971
10610
|
exports.PasswordInput = PasswordInput;
|
|
10611
|
+
exports.PillSelector = PillSelector;
|
|
9972
10612
|
exports.Radio = Radio;
|
|
9973
10613
|
exports.RadioGroup = RadioGroup;
|
|
9974
10614
|
exports.Select = Select;
|