@sarunyu/system-one 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +426 -290
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +427 -291
- package/dist/index.js.map +1 -1
- package/dist/src/components/chip.d.ts +13 -0
- package/dist/src/components/chip.d.ts.map +1 -0
- package/dist/src/components/date-input.d.ts.map +1 -1
- package/dist/src/components/dropdown-multiple.d.ts.map +1 -1
- package/dist/src/components/dropdown.d.ts.map +1 -1
- package/dist/src/components/input.d.ts.map +1 -1
- package/dist/src/components/option-list.d.ts.map +1 -1
- package/dist/src/components/search-input.d.ts.map +1 -1
- package/dist/src/components/tab.d.ts +5 -0
- package/dist/src/components/tab.d.ts.map +1 -1
- package/dist/src/components/tag.d.ts +21 -0
- package/dist/src/components/tag.d.ts.map +1 -0
- package/dist/src/components/textarea.d.ts.map +1 -1
- package/dist/src/components/time-input.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -4
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,6 @@ const tailwindMerge = require("tailwind-merge");
|
|
|
7
7
|
const react = require("@phosphor-icons/react");
|
|
8
8
|
const reactDayPicker = require("react-day-picker");
|
|
9
9
|
const Popover = require("@radix-ui/react-popover");
|
|
10
|
-
const lucideReact = require("lucide-react");
|
|
11
10
|
const vaul = require("vaul");
|
|
12
11
|
function _interopNamespaceDefault(e) {
|
|
13
12
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -31,54 +30,69 @@ function cn(...inputs) {
|
|
|
31
30
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
32
31
|
}
|
|
33
32
|
const labelIconSizeClass = {
|
|
34
|
-
xs: "
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
xs: "h-4 w-4",
|
|
34
|
+
// 16px
|
|
35
|
+
sm: "h-4.5 w-4.5",
|
|
36
|
+
// ~18px
|
|
37
|
+
md: "h-4.5 w-4.5",
|
|
38
|
+
lg: "h-5 w-5",
|
|
39
|
+
// 20px
|
|
40
|
+
xl: "h-5 w-5"
|
|
39
41
|
};
|
|
40
42
|
const gapClass = {
|
|
41
|
-
xs: "gap-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
xs: "gap-0.5",
|
|
44
|
+
// 2px
|
|
45
|
+
sm: "gap-0.5",
|
|
46
|
+
md: "gap-0.5",
|
|
47
|
+
lg: "gap-1",
|
|
48
|
+
// 4px
|
|
49
|
+
xl: "gap-1"
|
|
46
50
|
};
|
|
47
51
|
const textSizeClass = {
|
|
48
|
-
xs: "text-
|
|
49
|
-
sm: "text-
|
|
50
|
-
md: "text-
|
|
51
|
-
lg: "text-
|
|
52
|
-
xl: "text-
|
|
52
|
+
xs: "text-xs leading-4",
|
|
53
|
+
sm: "text-sm leading-5",
|
|
54
|
+
md: "text-sm leading-5",
|
|
55
|
+
lg: "text-sm leading-5",
|
|
56
|
+
xl: "text-sm leading-5"
|
|
53
57
|
};
|
|
54
58
|
const roundedLabelClass = {
|
|
55
|
-
xs: "rounded
|
|
56
|
-
sm: "rounded-
|
|
57
|
-
md: "rounded-
|
|
58
|
-
lg: "rounded-
|
|
59
|
-
xl: "rounded-
|
|
59
|
+
xs: "rounded",
|
|
60
|
+
sm: "rounded-md",
|
|
61
|
+
md: "rounded-md",
|
|
62
|
+
lg: "rounded-lg",
|
|
63
|
+
xl: "rounded-lg"
|
|
60
64
|
};
|
|
61
65
|
function getPaddingClasses(size, hasLeft, hasRight) {
|
|
62
66
|
const pyMap = {
|
|
63
|
-
xs: "py-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
xs: "py-1",
|
|
68
|
+
// 4px
|
|
69
|
+
sm: "py-1",
|
|
70
|
+
// 4px
|
|
71
|
+
md: "py-1.5",
|
|
72
|
+
// 6px
|
|
73
|
+
lg: "py-2",
|
|
74
|
+
// 8px
|
|
75
|
+
xl: "py-2.5"
|
|
76
|
+
// 10px
|
|
68
77
|
};
|
|
69
78
|
const pxMap = {
|
|
70
|
-
xs: { l: "pl-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
xs: { l: "pl-1.5", r: "pr-1.5" },
|
|
80
|
+
// 6px
|
|
81
|
+
sm: { l: "pl-2", r: "pr-2" },
|
|
82
|
+
// 8px
|
|
83
|
+
md: { l: "pl-2.5", r: "pr-2.5" },
|
|
84
|
+
// 10px
|
|
85
|
+
lg: { l: "pl-3.5", r: "pr-3.5" },
|
|
86
|
+
// 14px
|
|
87
|
+
xl: { l: "pl-4", r: "pr-4" }
|
|
88
|
+
// 16px
|
|
75
89
|
};
|
|
76
90
|
const reducedMap = {
|
|
77
|
-
xs: { l: "pl-
|
|
78
|
-
sm: { l: "pl-
|
|
79
|
-
md: { l: "pl-
|
|
80
|
-
lg: { l: "pl-
|
|
81
|
-
xl: { l: "pl-
|
|
91
|
+
xs: { l: "pl-1.5", r: "pr-1.5" },
|
|
92
|
+
sm: { l: "pl-1.5", r: "pr-1.5" },
|
|
93
|
+
md: { l: "pl-2", r: "pr-2" },
|
|
94
|
+
lg: { l: "pl-2.5", r: "pr-2.5" },
|
|
95
|
+
xl: { l: "pl-3", r: "pr-3" }
|
|
82
96
|
};
|
|
83
97
|
return [
|
|
84
98
|
hasLeft ? reducedMap[size].l : pxMap[size].l,
|
|
@@ -87,11 +101,11 @@ function getPaddingClasses(size, hasLeft, hasRight) {
|
|
|
87
101
|
];
|
|
88
102
|
}
|
|
89
103
|
const iconSizeSpec = {
|
|
90
|
-
"icon-xs": { btn: "
|
|
91
|
-
"icon-sm": { btn: "
|
|
92
|
-
"icon-md": { btn: "
|
|
93
|
-
"icon-lg": { btn: "
|
|
94
|
-
"icon-xl": { btn: "
|
|
104
|
+
"icon-xs": { btn: "h-6 w-6", icon: 16, rounded: "rounded" },
|
|
105
|
+
"icon-sm": { btn: "h-7 w-7", icon: 18, rounded: "rounded-md" },
|
|
106
|
+
"icon-md": { btn: "h-8 w-8", icon: 18, rounded: "rounded-md" },
|
|
107
|
+
"icon-lg": { btn: "h-9 w-9", icon: 20, rounded: "rounded-lg" },
|
|
108
|
+
"icon-xl": { btn: "h-10 w-10", icon: 20, rounded: "rounded-lg" }
|
|
95
109
|
};
|
|
96
110
|
function getVariantClasses(variant, isDisabled) {
|
|
97
111
|
if (isDisabled) {
|
|
@@ -100,14 +114,14 @@ function getVariantClasses(variant, isDisabled) {
|
|
|
100
114
|
return "bg-disabled-bg text-disabled cursor-not-allowed";
|
|
101
115
|
}
|
|
102
116
|
if (variant === "outline")
|
|
103
|
-
return "bg-
|
|
117
|
+
return "bg-background text-primary-action border border-border hover:bg-hover-bg active:bg-disabled-bg";
|
|
104
118
|
if (variant === "plain")
|
|
105
119
|
return "bg-transparent text-primary-action hover:bg-hover-bg active:bg-disabled-bg";
|
|
106
120
|
if (variant === "outline-black")
|
|
107
|
-
return "bg-
|
|
121
|
+
return "bg-background text-foreground border border-border hover:bg-hover-bg";
|
|
108
122
|
if (variant === "plain-black")
|
|
109
123
|
return "bg-transparent text-foreground hover:bg-hover-bg";
|
|
110
|
-
return "bg-primary-action text-
|
|
124
|
+
return "bg-primary-action text-on-primary-action hover:bg-primary-action-hover active:bg-primary-action-active";
|
|
111
125
|
}
|
|
112
126
|
const Button = React.forwardRef(function Button2({
|
|
113
127
|
size = "md",
|
|
@@ -143,7 +157,7 @@ const Button = React.forwardRef(function Button2({
|
|
|
143
157
|
} : onPointerLeave;
|
|
144
158
|
const variantClasses = getVariantClasses(variant, isDisabled);
|
|
145
159
|
const cursorClass = isDisabled ? "cursor-not-allowed" : "cursor-pointer";
|
|
146
|
-
const baseClasses = "inline-flex items-center justify-center font-
|
|
160
|
+
const baseClasses = "inline-flex items-center justify-center font-medium whitespace-nowrap transition-colors duration-150 select-none";
|
|
147
161
|
if (isIconOnly) {
|
|
148
162
|
const spec = iconSizeSpec[size];
|
|
149
163
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -277,8 +291,8 @@ const Card = React.forwardRef(function Card2({
|
|
|
277
291
|
className
|
|
278
292
|
}, ref) {
|
|
279
293
|
const widthClass = variant === "desktop" ? "w-[308px]" : variant === "tablet" ? "w-[224px]" : "w-[163px]";
|
|
280
|
-
const padding = variant === "desktop" ? "p-
|
|
281
|
-
const titleGap = variant === "desktop" ? "gap-
|
|
294
|
+
const padding = variant === "desktop" ? "p-4" : variant === "tablet" ? "p-3" : "p-2.5";
|
|
295
|
+
const titleGap = variant === "desktop" ? "gap-1.5" : "gap-1";
|
|
282
296
|
const bannerClass = variant === "desktop" ? "h-[173px]" : "aspect-video w-full";
|
|
283
297
|
const tag = tagConfig[tagStatus];
|
|
284
298
|
const bannerSrc = image ?? imgBanner;
|
|
@@ -288,7 +302,7 @@ const Card = React.forwardRef(function Card2({
|
|
|
288
302
|
ref,
|
|
289
303
|
className: cn(
|
|
290
304
|
"flex min-h-[120px] flex-col items-start overflow-clip rounded-[8px]",
|
|
291
|
-
"shadow-
|
|
305
|
+
"shadow-card",
|
|
292
306
|
widthClass,
|
|
293
307
|
className
|
|
294
308
|
),
|
|
@@ -322,49 +336,49 @@ const Card = React.forwardRef(function Card2({
|
|
|
322
336
|
}
|
|
323
337
|
)
|
|
324
338
|
] }),
|
|
325
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full shrink-0 bg-
|
|
326
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full flex-col items-start gap-
|
|
339
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full shrink-0 bg-card", padding), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex w-full flex-col items-start", titleGap), children: [
|
|
340
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full flex-col items-start gap-1", children: [
|
|
327
341
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
328
342
|
"p",
|
|
329
343
|
{
|
|
330
344
|
className: cn(
|
|
331
|
-
"line-clamp-2 w-full overflow-hidden text-ellipsis text-
|
|
345
|
+
"line-clamp-2 w-full overflow-hidden text-ellipsis text-sm leading-5 text-foreground"
|
|
332
346
|
),
|
|
333
347
|
children: title
|
|
334
348
|
}
|
|
335
349
|
),
|
|
336
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-
|
|
337
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[22px] shrink-0 items-center gap-
|
|
350
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-2", children: [
|
|
351
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[22px] shrink-0 items-center gap-1", children: [
|
|
338
352
|
/* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, {}),
|
|
339
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-nowrap text-
|
|
353
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-nowrap text-xs leading-4 text-accent-orange", children: date })
|
|
340
354
|
] }),
|
|
341
355
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-[14px] w-px shrink-0 bg-border" }),
|
|
342
356
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
343
357
|
"p",
|
|
344
358
|
{
|
|
345
359
|
className: cn(
|
|
346
|
-
"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-
|
|
360
|
+
"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-xs leading-4 text-subtle-text"
|
|
347
361
|
),
|
|
348
362
|
children: time
|
|
349
363
|
}
|
|
350
364
|
)
|
|
351
365
|
] }),
|
|
352
|
-
showLocation && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[22px] w-full items-center gap-
|
|
366
|
+
showLocation && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[22px] w-full items-center gap-1", children: [
|
|
353
367
|
/* @__PURE__ */ jsxRuntime.jsx(LocationIcon, {}),
|
|
354
368
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
355
369
|
"p",
|
|
356
370
|
{
|
|
357
371
|
className: cn(
|
|
358
|
-
"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-
|
|
372
|
+
"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-xs leading-4 text-subtle-text"
|
|
359
373
|
),
|
|
360
374
|
children: location
|
|
361
375
|
}
|
|
362
376
|
)
|
|
363
377
|
] }),
|
|
364
|
-
showAudience && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[22px] w-full items-center gap-
|
|
378
|
+
showAudience && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[22px] w-full items-center gap-1", children: [
|
|
365
379
|
/* @__PURE__ */ jsxRuntime.jsx(AudienceIcon, {}),
|
|
366
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "shrink-0 whitespace-nowrap text-
|
|
367
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "shrink-0 whitespace-nowrap text-
|
|
380
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "shrink-0 whitespace-nowrap text-xs leading-4 text-subtle-text", children: "ผู้เข้าร่วม" }),
|
|
381
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "shrink-0 whitespace-nowrap text-xs leading-4 text-primary-action", children: count })
|
|
368
382
|
] })
|
|
369
383
|
] }),
|
|
370
384
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -581,7 +595,7 @@ function CustomCaption({
|
|
|
581
595
|
type: "button",
|
|
582
596
|
className: NAV_BTN_CLASS,
|
|
583
597
|
onClick: () => setYearRangeStart((s) => s - 12),
|
|
584
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
598
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretLeft, { size: 16, className: "text-primary-action" })
|
|
585
599
|
}
|
|
586
600
|
);
|
|
587
601
|
rightNav = /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -590,7 +604,7 @@ function CustomCaption({
|
|
|
590
604
|
type: "button",
|
|
591
605
|
className: NAV_BTN_CLASS,
|
|
592
606
|
onClick: () => setYearRangeStart((s) => s + 12),
|
|
593
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
607
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretRight, { size: 16, className: "text-primary-action" })
|
|
594
608
|
}
|
|
595
609
|
);
|
|
596
610
|
} else if (view === "months") {
|
|
@@ -600,7 +614,7 @@ function CustomCaption({
|
|
|
600
614
|
type: "button",
|
|
601
615
|
className: NAV_BTN_CLASS,
|
|
602
616
|
onClick: () => setPickerYear((y) => y - 1),
|
|
603
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
617
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretLeft, { size: 16, className: "text-primary-action" })
|
|
604
618
|
}
|
|
605
619
|
);
|
|
606
620
|
rightNav = /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -609,7 +623,7 @@ function CustomCaption({
|
|
|
609
623
|
type: "button",
|
|
610
624
|
className: NAV_BTN_CLASS,
|
|
611
625
|
onClick: () => setPickerYear((y) => y + 1),
|
|
612
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
626
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretRight, { size: 16, className: "text-primary-action" })
|
|
613
627
|
}
|
|
614
628
|
);
|
|
615
629
|
} else if (isDrawerRange) {
|
|
@@ -620,7 +634,7 @@ function CustomCaption({
|
|
|
620
634
|
type: "button",
|
|
621
635
|
className: NAV_BTN_CLASS,
|
|
622
636
|
onClick: handlePrevYear,
|
|
623
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
637
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretDoubleLeft, { size: 16, className: "text-primary-action" })
|
|
624
638
|
}
|
|
625
639
|
),
|
|
626
640
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -629,7 +643,7 @@ function CustomCaption({
|
|
|
629
643
|
type: "button",
|
|
630
644
|
className: NAV_BTN_CLASS,
|
|
631
645
|
onClick: () => previousMonth && goToMonth(previousMonth),
|
|
632
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
646
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretLeft, { size: 16, className: "text-primary-action" })
|
|
633
647
|
}
|
|
634
648
|
)
|
|
635
649
|
] });
|
|
@@ -640,7 +654,7 @@ function CustomCaption({
|
|
|
640
654
|
type: "button",
|
|
641
655
|
className: NAV_BTN_CLASS,
|
|
642
656
|
onClick: () => nextMonth && goToMonth(nextMonth),
|
|
643
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
657
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretRight, { size: 16, className: "text-primary-action" })
|
|
644
658
|
}
|
|
645
659
|
),
|
|
646
660
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -649,7 +663,7 @@ function CustomCaption({
|
|
|
649
663
|
type: "button",
|
|
650
664
|
className: NAV_BTN_CLASS,
|
|
651
665
|
onClick: handleNextYear,
|
|
652
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
666
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretDoubleRight, { size: 16, className: "text-primary-action" })
|
|
653
667
|
}
|
|
654
668
|
)
|
|
655
669
|
] });
|
|
@@ -663,7 +677,7 @@ function CustomCaption({
|
|
|
663
677
|
className: NAV_BTN_CLASS,
|
|
664
678
|
onClick: handlePrevYear,
|
|
665
679
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
666
|
-
|
|
680
|
+
react.CaretDoubleLeft,
|
|
667
681
|
{
|
|
668
682
|
size: 16,
|
|
669
683
|
className: "text-primary-action"
|
|
@@ -677,7 +691,7 @@ function CustomCaption({
|
|
|
677
691
|
type: "button",
|
|
678
692
|
className: NAV_BTN_CLASS,
|
|
679
693
|
onClick: () => previousMonth && goToMonth(previousMonth),
|
|
680
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
694
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretLeft, { size: 16, className: "text-primary-action" })
|
|
681
695
|
}
|
|
682
696
|
)
|
|
683
697
|
] });
|
|
@@ -691,7 +705,7 @@ function CustomCaption({
|
|
|
691
705
|
className: NAV_BTN_CLASS,
|
|
692
706
|
onClick: () => nextMonth && goToMonth(nextMonth),
|
|
693
707
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
694
|
-
|
|
708
|
+
react.CaretRight,
|
|
695
709
|
{
|
|
696
710
|
size: 16,
|
|
697
711
|
className: "text-primary-action"
|
|
@@ -706,7 +720,7 @@ function CustomCaption({
|
|
|
706
720
|
className: NAV_BTN_CLASS,
|
|
707
721
|
onClick: handleNextYear,
|
|
708
722
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
709
|
-
|
|
723
|
+
react.CaretDoubleRight,
|
|
710
724
|
{
|
|
711
725
|
size: 16,
|
|
712
726
|
className: "text-primary-action"
|
|
@@ -720,7 +734,7 @@ function CustomCaption({
|
|
|
720
734
|
const now = /* @__PURE__ */ new Date();
|
|
721
735
|
const gridBtnClass = (active, isToday, isItemDisabled = false) => cn(
|
|
722
736
|
"py-[10px] text-[13px] rounded-[6px] border-0 outline-none transition-colors",
|
|
723
|
-
isItemDisabled ? "bg-disabled-bg text-disabled cursor-not-allowed" : active ? "bg-primary-action text-
|
|
737
|
+
isItemDisabled ? "bg-disabled-bg text-disabled cursor-not-allowed" : active ? "bg-primary-action text-on-primary-action cursor-pointer" : isToday ? "bg-primary-action-muted text-primary-action cursor-pointer" : "bg-transparent text-foreground hover:bg-disabled-bg cursor-pointer"
|
|
724
738
|
);
|
|
725
739
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
726
740
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-1 mb-2", children: [
|
|
@@ -739,7 +753,7 @@ function CustomCaption({
|
|
|
739
753
|
view === "months" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
740
754
|
"div",
|
|
741
755
|
{
|
|
742
|
-
className: "absolute left-0 right-0 z-10 bg-
|
|
756
|
+
className: "absolute left-0 right-0 z-10 bg-background grid grid-cols-3 gap-1 p-2 content-center",
|
|
743
757
|
style: { top: "42px", bottom: "0" },
|
|
744
758
|
children: THAI_MONTHS_SHORT.map((name, i) => {
|
|
745
759
|
const isCurrent = pickerYear === displayMonth.getFullYear() && i === displayMonth.getMonth();
|
|
@@ -763,7 +777,7 @@ function CustomCaption({
|
|
|
763
777
|
view === "years" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
764
778
|
"div",
|
|
765
779
|
{
|
|
766
|
-
className: "absolute left-0 right-0 z-10 bg-
|
|
780
|
+
className: "absolute left-0 right-0 z-10 bg-background grid grid-cols-3 gap-1 p-2 content-center",
|
|
767
781
|
style: { top: "42px", bottom: "0" },
|
|
768
782
|
children: Array.from({ length: 12 }, (_, i) => {
|
|
769
783
|
const year = yearRangeStart + i;
|
|
@@ -828,9 +842,9 @@ const DAY_PICKER_CLASSES = {
|
|
|
828
842
|
"hover:bg-disabled-bg transition-colors duration-100",
|
|
829
843
|
"outline-none aria-selected:opacity-100 p-0"
|
|
830
844
|
),
|
|
831
|
-
day_range_start: "day-range-start !bg-primary-action !text-
|
|
832
|
-
day_range_end: "day-range-end !bg-primary-action !text-
|
|
833
|
-
day_selected: "!bg-primary-action text-
|
|
845
|
+
day_range_start: "day-range-start !bg-primary-action !text-on-primary-action !rounded-l-[6px] !rounded-r-none",
|
|
846
|
+
day_range_end: "day-range-end !bg-primary-action !text-on-primary-action !rounded-r-[6px] !rounded-l-none",
|
|
847
|
+
day_selected: "!bg-primary-action text-on-primary-action hover:!bg-primary-action focus:!bg-primary-action rounded-[6px]",
|
|
834
848
|
day_today: "[&:not([aria-selected=true])]:!bg-primary-action-light [&:not([aria-selected=true])]:text-foreground rounded-[6px]",
|
|
835
849
|
day_outside: "day-outside text-disabled opacity-50 aria-selected:bg-transparent aria-selected:opacity-30",
|
|
836
850
|
day_disabled: "text-disabled opacity-50 cursor-not-allowed",
|
|
@@ -1131,7 +1145,7 @@ const DateInput = React.forwardRef(
|
|
|
1131
1145
|
const isError = state === "error";
|
|
1132
1146
|
const isFocus = state === "focus";
|
|
1133
1147
|
const isFilled = mode === "single" ? Boolean(currentDate) : Boolean(currentRange == null ? void 0 : currentRange.from);
|
|
1134
|
-
const bgClass = isDisabled ? "bg-disabled-bg" : "bg-
|
|
1148
|
+
const bgClass = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
1135
1149
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
1136
1150
|
const valueColor = isDisabled ? "var(--disabled)" : "var(--foreground)";
|
|
1137
1151
|
const iconColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
@@ -1195,30 +1209,37 @@ const DateInput = React.forwardRef(
|
|
|
1195
1209
|
const valueRow = mode === "single" && currentDate ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1196
1210
|
"p",
|
|
1197
1211
|
{
|
|
1198
|
-
className: "leading-[20px] not-italic relative
|
|
1212
|
+
className: "leading-[20px] not-italic relative text-[16px] w-full min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
1199
1213
|
style: { color: valueColor },
|
|
1200
1214
|
children: formatThaiDate(currentDate)
|
|
1201
1215
|
}
|
|
1202
|
-
) : mode === "range" && (currentRange == null ? void 0 : currentRange.from) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-[8px] items-center relative
|
|
1216
|
+
) : mode === "range" && (currentRange == null ? void 0 : currentRange.from) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-[8px] items-center relative w-full min-w-0", children: [
|
|
1203
1217
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1204
1218
|
"p",
|
|
1205
1219
|
{
|
|
1206
|
-
className: "leading-[20px] not-italic relative
|
|
1220
|
+
className: "leading-[20px] not-italic relative text-[16px] min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
1207
1221
|
style: { color: valueColor },
|
|
1208
1222
|
children: formatThaiDate(currentRange.from)
|
|
1209
1223
|
}
|
|
1210
1224
|
),
|
|
1211
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1225
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1226
|
+
react.Minus,
|
|
1227
|
+
{
|
|
1228
|
+
size: 20,
|
|
1229
|
+
color: minusColor,
|
|
1230
|
+
className: "shrink-0"
|
|
1231
|
+
}
|
|
1232
|
+
),
|
|
1212
1233
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1213
1234
|
"p",
|
|
1214
1235
|
{
|
|
1215
|
-
className: "leading-[20px] not-italic relative
|
|
1236
|
+
className: "leading-[20px] not-italic relative text-[16px] min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
1216
1237
|
style: { color: valueColor },
|
|
1217
1238
|
children: currentRange.to ? formatThaiDate(currentRange.to) : "..."
|
|
1218
1239
|
}
|
|
1219
1240
|
)
|
|
1220
1241
|
] }) : null;
|
|
1221
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "content-stretch flex flex-1 flex-col items-center justify-center min-h-px min-w-
|
|
1242
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "content-stretch flex flex-1 flex-col items-center justify-center min-h-px min-w-0 overflow-hidden relative w-full", children: [
|
|
1222
1243
|
floatingLabel,
|
|
1223
1244
|
valueRow
|
|
1224
1245
|
] });
|
|
@@ -1278,13 +1299,13 @@ const DateInput = React.forwardRef(
|
|
|
1278
1299
|
)
|
|
1279
1300
|
] });
|
|
1280
1301
|
const triggerBaseClasses = cn(
|
|
1281
|
-
"relative flex gap-
|
|
1302
|
+
"relative flex gap-2 items-center rounded-lg min-w-0",
|
|
1282
1303
|
bgClass,
|
|
1283
|
-
"px-
|
|
1284
|
-
isFilled ? "py-
|
|
1304
|
+
"px-3.5",
|
|
1305
|
+
isFilled ? "py-1.5" : "py-3",
|
|
1285
1306
|
"w-full"
|
|
1286
1307
|
);
|
|
1287
|
-
const belowMessage = showBelow && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start px-
|
|
1308
|
+
const belowMessage = showBelow && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start px-1 text-xs leading-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1288
1309
|
"span",
|
|
1289
1310
|
{
|
|
1290
1311
|
className: "flex-1 min-w-0",
|
|
@@ -1369,7 +1390,10 @@ const DateInput = React.forwardRef(
|
|
|
1369
1390
|
{
|
|
1370
1391
|
type: "button",
|
|
1371
1392
|
disabled: isDisabled,
|
|
1372
|
-
className: cn(
|
|
1393
|
+
className: cn(
|
|
1394
|
+
triggerBaseClasses,
|
|
1395
|
+
"text-left cursor-pointer disabled:cursor-default"
|
|
1396
|
+
),
|
|
1373
1397
|
children: triggerInner
|
|
1374
1398
|
}
|
|
1375
1399
|
);
|
|
@@ -1410,9 +1434,9 @@ const DateInput = React.forwardRef(
|
|
|
1410
1434
|
{
|
|
1411
1435
|
align: "start",
|
|
1412
1436
|
sideOffset: 4,
|
|
1413
|
-
className: "z-50 rounded-[8px] bg-
|
|
1437
|
+
className: "z-50 rounded-[8px] bg-popover p-3 outline-none text-popover-foreground",
|
|
1414
1438
|
style: {
|
|
1415
|
-
boxShadow: "
|
|
1439
|
+
boxShadow: "var(--elevation-popover)",
|
|
1416
1440
|
border: "1px solid var(--border)"
|
|
1417
1441
|
},
|
|
1418
1442
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
@@ -1432,12 +1456,6 @@ const DateInput = React.forwardRef(
|
|
|
1432
1456
|
}
|
|
1433
1457
|
);
|
|
1434
1458
|
DateInput.displayName = "DateInput";
|
|
1435
|
-
function ChevronDownIcon$1({ className }) {
|
|
1436
|
-
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 9L11 13L15 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1437
|
-
}
|
|
1438
|
-
function ChevronUpIcon$1({ className }) {
|
|
1439
|
-
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 13L11 9L15 13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1440
|
-
}
|
|
1441
1459
|
const Dropdown = React.forwardRef(
|
|
1442
1460
|
({
|
|
1443
1461
|
placeholder = "Text label",
|
|
@@ -1465,7 +1483,7 @@ const Dropdown = React.forwardRef(
|
|
|
1465
1483
|
const state = forceState ?? (open ? "focus" : "default");
|
|
1466
1484
|
const isError = state === "error";
|
|
1467
1485
|
const isFocus = state === "focus";
|
|
1468
|
-
const bg = isDisabled ? "bg-disabled-bg" : "bg-
|
|
1486
|
+
const bg = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
1469
1487
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
1470
1488
|
const filledColor = isDisabled ? "var(--disabled)" : "var(--foreground)";
|
|
1471
1489
|
const caretClassName = isDisabled ? "text-disabled" : "text-muted-foreground";
|
|
@@ -1526,17 +1544,17 @@ const Dropdown = React.forwardRef(
|
|
|
1526
1544
|
if (typeof ref === "function") ref(node);
|
|
1527
1545
|
else if (ref) ref.current = node;
|
|
1528
1546
|
},
|
|
1529
|
-
className: cn("flex flex-col gap-
|
|
1547
|
+
className: cn("flex flex-col gap-1 w-full", className),
|
|
1530
1548
|
children: [
|
|
1531
|
-
label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative shrink-0 w-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start px-
|
|
1549
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative shrink-0 w-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start px-1 w-full", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "leading-5 not-italic relative shrink-0 text-foreground text-sm font-bold whitespace-nowrap", children: label }) }) }),
|
|
1532
1550
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1533
1551
|
"div",
|
|
1534
1552
|
{
|
|
1535
1553
|
onClick: handleToggle,
|
|
1536
1554
|
className: cn(
|
|
1537
|
-
"relative flex gap-
|
|
1555
|
+
"relative flex gap-2 items-center rounded-lg px-3.5",
|
|
1538
1556
|
bg,
|
|
1539
|
-
hasExternalLabel ? "h-[38px]" : isFilled && !open ? "py-
|
|
1557
|
+
hasExternalLabel ? "h-[38px]" : isFilled && !open ? "py-1.5" : "p-3.5",
|
|
1540
1558
|
!isDisabled && !forceState && "cursor-pointer"
|
|
1541
1559
|
),
|
|
1542
1560
|
children: [
|
|
@@ -1561,7 +1579,7 @@ const Dropdown = React.forwardRef(
|
|
|
1561
1579
|
onChange: (e) => setSearch(e.target.value),
|
|
1562
1580
|
onKeyDown: handleInputKeyDown,
|
|
1563
1581
|
placeholder: isFilled ? selectedLabel : placeholder + (required ? " *" : ""),
|
|
1564
|
-
className: "flex-1 min-w-0 min-h-[1px] text-
|
|
1582
|
+
className: "flex-1 min-w-0 min-h-[1px] text-sm leading-5 not-italic bg-transparent outline-none border-none p-0 m-0 placeholder:text-disabled",
|
|
1565
1583
|
style: {
|
|
1566
1584
|
color: filledColor,
|
|
1567
1585
|
caretColor: "var(--caret-color)"
|
|
@@ -1612,7 +1630,7 @@ const Dropdown = React.forwardRef(
|
|
|
1612
1630
|
onChange: (e) => setSearch(e.target.value),
|
|
1613
1631
|
onKeyDown: handleInputKeyDown,
|
|
1614
1632
|
placeholder: placeholder + (required ? " *" : ""),
|
|
1615
|
-
className: "flex-1 min-w-0 min-h-[1px] text-
|
|
1633
|
+
className: "flex-1 min-w-0 min-h-[1px] text-base leading-5 not-italic bg-transparent outline-none border-none p-0 m-0 placeholder:text-muted-foreground",
|
|
1616
1634
|
style: {
|
|
1617
1635
|
color: "var(--foreground)",
|
|
1618
1636
|
caretColor: "var(--caret-color)"
|
|
@@ -1628,7 +1646,7 @@ const Dropdown = React.forwardRef(
|
|
|
1628
1646
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1629
1647
|
"p",
|
|
1630
1648
|
{
|
|
1631
|
-
className: "flex-1 min-w-0 min-h-[1px] leading-
|
|
1649
|
+
className: "flex-1 min-w-0 min-h-[1px] leading-5 not-italic text-sm overflow-hidden text-ellipsis whitespace-nowrap",
|
|
1632
1650
|
style: { color: filledColor },
|
|
1633
1651
|
children: [
|
|
1634
1652
|
selectedLabel,
|
|
@@ -1642,7 +1660,7 @@ const Dropdown = React.forwardRef(
|
|
|
1642
1660
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1643
1661
|
"p",
|
|
1644
1662
|
{
|
|
1645
|
-
className: "shrink-0 w-full leading-
|
|
1663
|
+
className: "shrink-0 w-full leading-4 not-italic text-xs",
|
|
1646
1664
|
style: { color: labelColor },
|
|
1647
1665
|
children: [
|
|
1648
1666
|
placeholder,
|
|
@@ -1653,7 +1671,7 @@ const Dropdown = React.forwardRef(
|
|
|
1653
1671
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1654
1672
|
"p",
|
|
1655
1673
|
{
|
|
1656
|
-
className: "w-full leading-
|
|
1674
|
+
className: "w-full leading-5 not-italic text-sm min-w-0 min-h-[1px]",
|
|
1657
1675
|
style: { color: filledColor },
|
|
1658
1676
|
children: selectedLabel
|
|
1659
1677
|
}
|
|
@@ -1666,7 +1684,7 @@ const Dropdown = React.forwardRef(
|
|
|
1666
1684
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1667
1685
|
"p",
|
|
1668
1686
|
{
|
|
1669
|
-
className: "leading-
|
|
1687
|
+
className: "leading-5 not-italic text-base whitespace-nowrap",
|
|
1670
1688
|
style: { color: labelColor },
|
|
1671
1689
|
children: placeholder
|
|
1672
1690
|
}
|
|
@@ -1674,7 +1692,7 @@ const Dropdown = React.forwardRef(
|
|
|
1674
1692
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1675
1693
|
"p",
|
|
1676
1694
|
{
|
|
1677
|
-
className: "leading-
|
|
1695
|
+
className: "leading-4 not-italic text-xs w-[7px]",
|
|
1678
1696
|
style: { color: isDisabled ? "var(--disabled)" : "var(--error-dark)" },
|
|
1679
1697
|
children: "*"
|
|
1680
1698
|
}
|
|
@@ -1682,13 +1700,13 @@ const Dropdown = React.forwardRef(
|
|
|
1682
1700
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1683
1701
|
"p",
|
|
1684
1702
|
{
|
|
1685
|
-
className: "flex-1 min-w-0 min-h-[1px] text-
|
|
1703
|
+
className: "flex-1 min-w-0 min-h-[1px] text-base leading-5 not-italic overflow-hidden text-ellipsis whitespace-nowrap",
|
|
1686
1704
|
style: { color: labelColor },
|
|
1687
1705
|
children: placeholder
|
|
1688
1706
|
}
|
|
1689
1707
|
)
|
|
1690
1708
|
),
|
|
1691
|
-
isFocus ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1709
|
+
isFocus ? /* @__PURE__ */ jsxRuntime.jsx(react.CaretUp, { size: 22, className: cn("shrink-0", caretClassName) }) : /* @__PURE__ */ jsxRuntime.jsx(react.CaretDown, { size: 22, className: cn("shrink-0", caretClassName) })
|
|
1692
1710
|
]
|
|
1693
1711
|
}
|
|
1694
1712
|
),
|
|
@@ -1696,11 +1714,11 @@ const Dropdown = React.forwardRef(
|
|
|
1696
1714
|
"div",
|
|
1697
1715
|
{
|
|
1698
1716
|
className: cn(
|
|
1699
|
-
"relative bg-
|
|
1717
|
+
"relative bg-popover rounded-lg overflow-clip p-2 z-20 flex flex-col items-start text-popover-foreground",
|
|
1700
1718
|
filteredOptions.length > 10 && "overflow-y-auto"
|
|
1701
1719
|
),
|
|
1702
1720
|
style: {
|
|
1703
|
-
boxShadow: "
|
|
1721
|
+
boxShadow: "var(--elevation-popover)",
|
|
1704
1722
|
...filteredOptions.length > 10 ? { maxHeight: 10 * 48 + 16 } : {}
|
|
1705
1723
|
},
|
|
1706
1724
|
children: filteredOptions.length > 0 ? filteredOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1709,13 +1727,13 @@ const Dropdown = React.forwardRef(
|
|
|
1709
1727
|
onClick: () => handleSelect(opt.value),
|
|
1710
1728
|
className: cn(
|
|
1711
1729
|
"w-full shrink-0 rounded-[4px] cursor-pointer transition-colors duration-100",
|
|
1712
|
-
opt.value === currentValue ? "bg-primary-action-light" : "bg-
|
|
1730
|
+
opt.value === currentValue ? "bg-primary-action-light" : "bg-popover hover:bg-disabled-bg"
|
|
1713
1731
|
),
|
|
1714
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center p-
|
|
1732
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center p-3.5 relative w-full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1715
1733
|
"p",
|
|
1716
1734
|
{
|
|
1717
1735
|
className: cn(
|
|
1718
|
-
"flex-1 min-w-0 min-h-[1px] leading-
|
|
1736
|
+
"flex-1 min-w-0 min-h-[1px] leading-5 not-italic overflow-hidden text-sm text-ellipsis whitespace-nowrap",
|
|
1719
1737
|
opt.value === currentValue ? "text-primary-action" : "text-foreground"
|
|
1720
1738
|
),
|
|
1721
1739
|
children: opt.label
|
|
@@ -1723,7 +1741,7 @@ const Dropdown = React.forwardRef(
|
|
|
1723
1741
|
) }) })
|
|
1724
1742
|
},
|
|
1725
1743
|
opt.value
|
|
1726
|
-
)) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full shrink-0 bg-
|
|
1744
|
+
)) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full shrink-0 bg-popover", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center p-[14px] relative w-full", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "flex-1 min-w-0 min-h-[1px] leading-[20px] not-italic text-[14px] text-disabled", children: "No results found" }) }) }) })
|
|
1727
1745
|
}
|
|
1728
1746
|
),
|
|
1729
1747
|
showBelow && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start px-[4px] text-[12px] leading-[16px]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 min-w-0", style: { color: leftColor }, children: leftText }) })
|
|
@@ -1735,34 +1753,6 @@ const Dropdown = React.forwardRef(
|
|
|
1735
1753
|
Dropdown.displayName = "Dropdown";
|
|
1736
1754
|
const TAG_GAP = 4;
|
|
1737
1755
|
const MAX_COMPONENT_WIDTH = 343;
|
|
1738
|
-
function ChevronDownIcon({ className }) {
|
|
1739
|
-
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 9L11 13L15 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1740
|
-
}
|
|
1741
|
-
function ChevronUpIcon({ className }) {
|
|
1742
|
-
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 13L11 9L15 13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1743
|
-
}
|
|
1744
|
-
function XIcon({ color = "var(--muted-foreground)" }) {
|
|
1745
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1746
|
-
"svg",
|
|
1747
|
-
{
|
|
1748
|
-
width: "12",
|
|
1749
|
-
height: "12",
|
|
1750
|
-
viewBox: "0 0 12 12",
|
|
1751
|
-
fill: "none",
|
|
1752
|
-
className: "shrink-0",
|
|
1753
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1754
|
-
"path",
|
|
1755
|
-
{
|
|
1756
|
-
d: "M9 3L3 9M3 3L9 9",
|
|
1757
|
-
stroke: color,
|
|
1758
|
-
strokeWidth: "1.5",
|
|
1759
|
-
strokeLinecap: "round",
|
|
1760
|
-
strokeLinejoin: "round"
|
|
1761
|
-
}
|
|
1762
|
-
)
|
|
1763
|
-
}
|
|
1764
|
-
);
|
|
1765
|
-
}
|
|
1766
1756
|
function RemovableTag({
|
|
1767
1757
|
label,
|
|
1768
1758
|
disabled,
|
|
@@ -1796,8 +1786,16 @@ function RemovableTag({
|
|
|
1796
1786
|
e.stopPropagation();
|
|
1797
1787
|
onRemove();
|
|
1798
1788
|
},
|
|
1799
|
-
className: "absolute right-[4px] top-1/2 -translate-y-1/2 flex items-center justify-center rounded-[2px] p-[1px] cursor-pointer opacity-0 group-hover:opacity-100 transition-all duration-150 bg-
|
|
1800
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1789
|
+
className: "absolute right-[4px] top-1/2 -translate-y-1/2 flex items-center justify-center rounded-[2px] p-[1px] cursor-pointer opacity-0 group-hover:opacity-100 transition-all duration-150 bg-surface-clear-hover",
|
|
1790
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1791
|
+
react.X,
|
|
1792
|
+
{
|
|
1793
|
+
size: 12,
|
|
1794
|
+
weight: "bold",
|
|
1795
|
+
color: iconColor,
|
|
1796
|
+
className: "shrink-0"
|
|
1797
|
+
}
|
|
1798
|
+
)
|
|
1801
1799
|
}
|
|
1802
1800
|
)
|
|
1803
1801
|
]
|
|
@@ -1830,7 +1828,7 @@ function OverflowBadge({
|
|
|
1830
1828
|
count,
|
|
1831
1829
|
disabled
|
|
1832
1830
|
}) {
|
|
1833
|
-
const bg = disabled ? "bg-
|
|
1831
|
+
const bg = disabled ? "bg-surface-chip-disabled" : "bg-selected-bg";
|
|
1834
1832
|
const textColor = disabled ? "var(--disabled)" : "var(--primary-action)";
|
|
1835
1833
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1836
1834
|
"div",
|
|
@@ -1853,28 +1851,6 @@ function OverflowBadge({
|
|
|
1853
1851
|
}
|
|
1854
1852
|
);
|
|
1855
1853
|
}
|
|
1856
|
-
function CheckIcon$1(props) {
|
|
1857
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1858
|
-
"svg",
|
|
1859
|
-
{
|
|
1860
|
-
width: "10",
|
|
1861
|
-
height: "8",
|
|
1862
|
-
viewBox: "0 0 10 8",
|
|
1863
|
-
fill: "none",
|
|
1864
|
-
...props,
|
|
1865
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1866
|
-
"path",
|
|
1867
|
-
{
|
|
1868
|
-
d: "M1 4L3.5 6.5L9 1",
|
|
1869
|
-
stroke: "currentColor",
|
|
1870
|
-
strokeWidth: "1.5",
|
|
1871
|
-
strokeLinecap: "round",
|
|
1872
|
-
strokeLinejoin: "round"
|
|
1873
|
-
}
|
|
1874
|
-
)
|
|
1875
|
-
}
|
|
1876
|
-
);
|
|
1877
|
-
}
|
|
1878
1854
|
function useChipLayout(selectedOptions, measureRef, containerRef) {
|
|
1879
1855
|
const [layout, setLayout] = React.useState({
|
|
1880
1856
|
visibleCount: selectedOptions.length,
|
|
@@ -1963,7 +1939,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
1963
1939
|
const state = forceState ?? (open ? "focus" : "default");
|
|
1964
1940
|
const isError = state === "error";
|
|
1965
1941
|
const isFocus = state === "focus";
|
|
1966
|
-
const bg = isDisabled ? "bg-disabled-bg" : "bg-
|
|
1942
|
+
const bg = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
1967
1943
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
1968
1944
|
const caretColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
1969
1945
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
@@ -2045,7 +2021,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2045
2021
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2046
2022
|
"p",
|
|
2047
2023
|
{
|
|
2048
|
-
className: "shrink-0 leading-
|
|
2024
|
+
className: "shrink-0 leading-4 not-italic text-xs",
|
|
2049
2025
|
style: { color: labelColor },
|
|
2050
2026
|
children: placeholder
|
|
2051
2027
|
}
|
|
@@ -2063,7 +2039,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2063
2039
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2064
2040
|
"p",
|
|
2065
2041
|
{
|
|
2066
|
-
className: "shrink-0 w-full leading-
|
|
2042
|
+
className: "shrink-0 w-full leading-4 not-italic text-xs",
|
|
2067
2043
|
style: { color: labelColor },
|
|
2068
2044
|
children: placeholder
|
|
2069
2045
|
}
|
|
@@ -2072,7 +2048,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2072
2048
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2073
2049
|
"p",
|
|
2074
2050
|
{
|
|
2075
|
-
className: "leading-
|
|
2051
|
+
className: "leading-5 not-italic text-base whitespace-nowrap",
|
|
2076
2052
|
style: { color: labelColor },
|
|
2077
2053
|
children: placeholder
|
|
2078
2054
|
}
|
|
@@ -2080,7 +2056,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2080
2056
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2081
2057
|
"p",
|
|
2082
2058
|
{
|
|
2083
|
-
className: "leading-
|
|
2059
|
+
className: "leading-4 not-italic text-xs w-[7px]",
|
|
2084
2060
|
style: { color: isDisabled ? "var(--disabled)" : "var(--error-dark)" },
|
|
2085
2061
|
children: "*"
|
|
2086
2062
|
}
|
|
@@ -2088,7 +2064,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2088
2064
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2089
2065
|
"p",
|
|
2090
2066
|
{
|
|
2091
|
-
className: "flex-1 min-w-0 min-h-[1px] text-
|
|
2067
|
+
className: "flex-1 min-w-0 min-h-[1px] text-base leading-5 not-italic overflow-hidden text-ellipsis whitespace-nowrap py-[7px]",
|
|
2092
2068
|
style: { color: labelColor },
|
|
2093
2069
|
children: placeholder
|
|
2094
2070
|
}
|
|
@@ -2098,7 +2074,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2098
2074
|
{
|
|
2099
2075
|
ref: measureRef,
|
|
2100
2076
|
"aria-hidden": true,
|
|
2101
|
-
className: "absolute flex gap-
|
|
2077
|
+
className: "absolute flex gap-1 items-center pointer-events-none",
|
|
2102
2078
|
style: {
|
|
2103
2079
|
visibility: "hidden",
|
|
2104
2080
|
top: 0,
|
|
@@ -2241,8 +2217,8 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2241
2217
|
className: cn(
|
|
2242
2218
|
"relative flex gap-[8px] items-center rounded-[8px]",
|
|
2243
2219
|
bg,
|
|
2244
|
-
"px-
|
|
2245
|
-
hasExternalLabel ? "h-
|
|
2220
|
+
"px-3.5",
|
|
2221
|
+
hasExternalLabel ? "h-10" : "py-1 min-h-12",
|
|
2246
2222
|
!isDisabled && !isStatic && "cursor-pointer"
|
|
2247
2223
|
),
|
|
2248
2224
|
children: [
|
|
@@ -2272,16 +2248,16 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2272
2248
|
)
|
|
2273
2249
|
}
|
|
2274
2250
|
),
|
|
2275
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", style: { color: caretColor }, children: isFocus ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2251
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", style: { color: caretColor }, children: isFocus ? /* @__PURE__ */ jsxRuntime.jsx(react.CaretUp, { size: 22 }) : /* @__PURE__ */ jsxRuntime.jsx(react.CaretDown, { size: 22 }) })
|
|
2276
2252
|
]
|
|
2277
2253
|
}
|
|
2278
2254
|
),
|
|
2279
2255
|
open && !isStatic && options.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2280
2256
|
"div",
|
|
2281
2257
|
{
|
|
2282
|
-
className: "relative bg-
|
|
2258
|
+
className: "relative bg-popover rounded-[8px] overflow-clip p-[8px] z-20 flex flex-col items-start text-popover-foreground",
|
|
2283
2259
|
style: {
|
|
2284
|
-
boxShadow: "
|
|
2260
|
+
boxShadow: "var(--elevation-popover)"
|
|
2285
2261
|
},
|
|
2286
2262
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2287
2263
|
"div",
|
|
@@ -2304,7 +2280,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2304
2280
|
},
|
|
2305
2281
|
className: cn(
|
|
2306
2282
|
"w-full shrink-0 rounded-[4px] cursor-pointer transition-colors duration-100",
|
|
2307
|
-
isSelected ? "bg-primary-action-light" : "bg-
|
|
2283
|
+
isSelected ? "bg-primary-action-light" : "bg-popover hover:bg-disabled-bg"
|
|
2308
2284
|
),
|
|
2309
2285
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[8px] p-[14px] relative w-full", children: [
|
|
2310
2286
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2324,14 +2300,21 @@ const DropdownMultiple = React.forwardRef(
|
|
|
2324
2300
|
"shrink-0 w-[16px] h-[16px] rounded-[3px] flex items-center justify-center transition-colors duration-100",
|
|
2325
2301
|
"bg-transparent"
|
|
2326
2302
|
),
|
|
2327
|
-
children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2303
|
+
children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2304
|
+
react.Check,
|
|
2305
|
+
{
|
|
2306
|
+
size: 12,
|
|
2307
|
+
weight: "bold",
|
|
2308
|
+
className: "text-primary-action"
|
|
2309
|
+
}
|
|
2310
|
+
)
|
|
2328
2311
|
}
|
|
2329
2312
|
)
|
|
2330
2313
|
] }) })
|
|
2331
2314
|
},
|
|
2332
2315
|
opt.value
|
|
2333
2316
|
);
|
|
2334
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full shrink-0 bg-
|
|
2317
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full shrink-0 bg-popover", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center p-[14px] relative w-full", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "flex-1 min-w-0 min-h-[1px] leading-[20px] not-italic text-[14px] text-disabled", children: "No results found" }) }) }) })
|
|
2335
2318
|
}
|
|
2336
2319
|
)
|
|
2337
2320
|
}
|
|
@@ -2368,6 +2351,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
2368
2351
|
onFocus: onFocusProp,
|
|
2369
2352
|
onBlur: onBlurProp,
|
|
2370
2353
|
disabled: _disabledProp,
|
|
2354
|
+
maxLength: maxLengthProp,
|
|
2371
2355
|
...inputRest
|
|
2372
2356
|
}, ref) {
|
|
2373
2357
|
const [focused, setFocused] = React.useState(false);
|
|
@@ -2379,7 +2363,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
2379
2363
|
const isError = state === "error";
|
|
2380
2364
|
const isFocus = state === "focus";
|
|
2381
2365
|
const isFilled = currentValue.length > 0;
|
|
2382
|
-
const bg = isDisabled ? "bg-disabled-bg" : "bg-
|
|
2366
|
+
const bg = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
2383
2367
|
const floatLabel = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2384
2368
|
const filledValue = isDisabled ? "var(--disabled)" : "var(--foreground)";
|
|
2385
2369
|
const unitColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
@@ -2387,14 +2371,19 @@ const Input = React.forwardRef(function Input2({
|
|
|
2387
2371
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
2388
2372
|
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--destructive)" : isFocus ? "var(--primary-action)" : "var(--border)";
|
|
2389
2373
|
const hasRight = Boolean(rightIcon) || Boolean(unit);
|
|
2390
|
-
const padding = isFilled ? "px-[14px] py-[6px]" : hasRight ? "px-[14px] py-[
|
|
2374
|
+
const padding = isFilled ? "px-[14px] py-[6px]" : hasRight ? "px-[14px] py-[14px]" : "p-[14px]";
|
|
2391
2375
|
const charCount = currentValue.length;
|
|
2392
2376
|
const showBelow = isError || Boolean(helperText) || showCount;
|
|
2393
2377
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
2394
2378
|
const leftColor = isError ? "var(--destructive)" : "var(--muted-foreground)";
|
|
2395
2379
|
const handleChange = (e) => {
|
|
2396
|
-
if (
|
|
2397
|
-
|
|
2380
|
+
if (isDisabled) return;
|
|
2381
|
+
let next = e.target.value;
|
|
2382
|
+
if (showCount && maxCount >= 0 && next.length > maxCount) {
|
|
2383
|
+
next = next.slice(0, maxCount);
|
|
2384
|
+
}
|
|
2385
|
+
if (!controlled) setInternalValue(next);
|
|
2386
|
+
onChange == null ? void 0 : onChange(next);
|
|
2398
2387
|
};
|
|
2399
2388
|
const handleFocus = (e) => {
|
|
2400
2389
|
onFocusProp == null ? void 0 : onFocusProp(e);
|
|
@@ -2408,12 +2397,12 @@ const Input = React.forwardRef(function Input2({
|
|
|
2408
2397
|
const inputCaretStyle = {
|
|
2409
2398
|
caretColor: "var(--caret-color)"
|
|
2410
2399
|
};
|
|
2411
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-col gap-
|
|
2400
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-col gap-1 w-full", className), children: [
|
|
2412
2401
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2413
2402
|
"div",
|
|
2414
2403
|
{
|
|
2415
2404
|
className: cn(
|
|
2416
|
-
"relative rounded-
|
|
2405
|
+
"relative rounded-lg",
|
|
2417
2406
|
padding,
|
|
2418
2407
|
bg,
|
|
2419
2408
|
containerFlex
|
|
@@ -2444,14 +2433,15 @@ const Input = React.forwardRef(function Input2({
|
|
|
2444
2433
|
{
|
|
2445
2434
|
className: cn(
|
|
2446
2435
|
"shrink-0 w-full not-italic",
|
|
2447
|
-
isFilled ? "leading-
|
|
2436
|
+
isFilled ? "leading-4 text-xs" : "text-base leading-5 pointer-events-none"
|
|
2448
2437
|
),
|
|
2449
2438
|
style: { color: floatLabel },
|
|
2450
2439
|
children: [
|
|
2451
2440
|
placeholder,
|
|
2452
|
-
required &&
|
|
2441
|
+
required && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2453
2442
|
"span",
|
|
2454
2443
|
{
|
|
2444
|
+
className: "text-xs leading-4",
|
|
2455
2445
|
style: {
|
|
2456
2446
|
color: isDisabled ? "var(--disabled)" : "var(--error-dark)"
|
|
2457
2447
|
},
|
|
@@ -2461,7 +2451,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
2461
2451
|
]
|
|
2462
2452
|
}
|
|
2463
2453
|
),
|
|
2464
|
-
|
|
2454
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2465
2455
|
"input",
|
|
2466
2456
|
{
|
|
2467
2457
|
...inputRest,
|
|
@@ -2471,10 +2461,14 @@ const Input = React.forwardRef(function Input2({
|
|
|
2471
2461
|
onFocus: handleFocus,
|
|
2472
2462
|
onBlur: handleBlur,
|
|
2473
2463
|
disabled: isDisabled,
|
|
2464
|
+
maxLength: showCount ? maxCount : maxLengthProp,
|
|
2474
2465
|
"aria-label": placeholder,
|
|
2475
2466
|
className: cn(
|
|
2476
2467
|
"w-full bg-transparent outline-none border-none min-w-0",
|
|
2477
|
-
isFilled ? "leading-
|
|
2468
|
+
isFilled ? "leading-5 not-italic text-sm p-0 m-0" : cn(
|
|
2469
|
+
"absolute inset-0 h-full text-base",
|
|
2470
|
+
isDisabled ? "cursor-not-allowed" : "cursor-text"
|
|
2471
|
+
)
|
|
2478
2472
|
),
|
|
2479
2473
|
style: isFilled ? { ...inputStyleProp, color: filledValue, ...inputCaretStyle } : {
|
|
2480
2474
|
...inputStyleProp,
|
|
@@ -2502,7 +2496,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
2502
2496
|
"p",
|
|
2503
2497
|
{
|
|
2504
2498
|
className: cn(
|
|
2505
|
-
"shrink-0 whitespace-nowrap text-[16px]",
|
|
2499
|
+
"shrink-0 whitespace-nowrap text-[16px] leading-[20px]",
|
|
2506
2500
|
!isFilled && "relative"
|
|
2507
2501
|
),
|
|
2508
2502
|
style: {
|
|
@@ -2516,7 +2510,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
2516
2510
|
]
|
|
2517
2511
|
}
|
|
2518
2512
|
),
|
|
2519
|
-
showBelow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-
|
|
2513
|
+
showBelow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 px-1 text-xs leading-4", children: [
|
|
2520
2514
|
leftText ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 min-w-0", style: { color: leftColor }, children: leftText }) : showCount && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1" }),
|
|
2521
2515
|
showCount && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2522
2516
|
"span",
|
|
@@ -2534,28 +2528,6 @@ const Input = React.forwardRef(function Input2({
|
|
|
2534
2528
|
] });
|
|
2535
2529
|
});
|
|
2536
2530
|
Input.displayName = "Input";
|
|
2537
|
-
function CheckIcon(props) {
|
|
2538
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2539
|
-
"svg",
|
|
2540
|
-
{
|
|
2541
|
-
width: "16",
|
|
2542
|
-
height: "11",
|
|
2543
|
-
viewBox: "0 0 16 11",
|
|
2544
|
-
fill: "none",
|
|
2545
|
-
...props,
|
|
2546
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2547
|
-
"path",
|
|
2548
|
-
{
|
|
2549
|
-
d: "M1 5.5L5.5 10L15 1",
|
|
2550
|
-
stroke: "currentColor",
|
|
2551
|
-
strokeWidth: "1.5",
|
|
2552
|
-
strokeLinecap: "round",
|
|
2553
|
-
strokeLinejoin: "round"
|
|
2554
|
-
}
|
|
2555
|
-
)
|
|
2556
|
-
}
|
|
2557
|
-
);
|
|
2558
|
-
}
|
|
2559
2531
|
const OptionList = React.forwardRef(
|
|
2560
2532
|
function OptionList2({
|
|
2561
2533
|
options,
|
|
@@ -2584,17 +2556,17 @@ const OptionList = React.forwardRef(
|
|
|
2584
2556
|
{
|
|
2585
2557
|
ref,
|
|
2586
2558
|
className: cn(
|
|
2587
|
-
"flex flex-col items-start overflow-clip rounded-
|
|
2559
|
+
"flex flex-col items-start overflow-clip rounded-lg bg-popover px-2 py-2 text-popover-foreground",
|
|
2588
2560
|
className
|
|
2589
2561
|
),
|
|
2590
2562
|
style: {
|
|
2591
|
-
boxShadow: "
|
|
2563
|
+
boxShadow: "var(--elevation-popover)",
|
|
2592
2564
|
...isScrollable ? { maxHeight, overflowY: "auto" } : {}
|
|
2593
2565
|
},
|
|
2594
2566
|
children: options.length > 0 ? options.map((opt) => {
|
|
2595
2567
|
const selected = isSelected(opt.value);
|
|
2596
2568
|
const disabled = opt.disabled === true;
|
|
2597
|
-
const rowBg = disabled ? "bg-disabled-bg" : selected ? "bg-selected-bg" : "bg-
|
|
2569
|
+
const rowBg = disabled ? "bg-disabled-bg" : selected ? "bg-selected-bg" : "bg-popover hover:bg-selected-bg";
|
|
2598
2570
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2599
2571
|
"div",
|
|
2600
2572
|
{
|
|
@@ -2604,11 +2576,11 @@ const OptionList = React.forwardRef(
|
|
|
2604
2576
|
rowBg,
|
|
2605
2577
|
disabled ? "cursor-default" : "cursor-pointer"
|
|
2606
2578
|
),
|
|
2607
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-
|
|
2579
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-2 p-3.5", children: [
|
|
2608
2580
|
opt.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2609
2581
|
"span",
|
|
2610
2582
|
{
|
|
2611
|
-
className: "flex
|
|
2583
|
+
className: "flex h-5 w-5 shrink-0 items-center justify-center overflow-clip",
|
|
2612
2584
|
style: {
|
|
2613
2585
|
color: disabled ? "var(--disabled)" : "var(--muted-foreground)"
|
|
2614
2586
|
},
|
|
@@ -2618,19 +2590,26 @@ const OptionList = React.forwardRef(
|
|
|
2618
2590
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2619
2591
|
"p",
|
|
2620
2592
|
{
|
|
2621
|
-
className: "min-h-[1px] min-w-0 flex-1 overflow-hidden text-
|
|
2593
|
+
className: "min-h-[1px] min-w-0 flex-1 overflow-hidden text-sm leading-5 text-ellipsis whitespace-nowrap not-italic",
|
|
2622
2594
|
style: {
|
|
2623
2595
|
color: disabled ? "var(--disabled)" : "var(--foreground)"
|
|
2624
2596
|
},
|
|
2625
2597
|
children: opt.label
|
|
2626
2598
|
}
|
|
2627
2599
|
),
|
|
2628
|
-
selected && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex
|
|
2600
|
+
selected && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2601
|
+
react.Check,
|
|
2602
|
+
{
|
|
2603
|
+
size: 16,
|
|
2604
|
+
weight: "bold",
|
|
2605
|
+
className: "text-primary-action"
|
|
2606
|
+
}
|
|
2607
|
+
) })
|
|
2629
2608
|
] })
|
|
2630
2609
|
},
|
|
2631
2610
|
opt.value
|
|
2632
2611
|
);
|
|
2633
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full shrink-0 bg-
|
|
2612
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full shrink-0 bg-popover", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full items-center p-3.5", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "min-h-[1px] min-w-0 flex-1 text-sm leading-5 not-italic text-disabled", children: emptyText }) }) })
|
|
2634
2613
|
}
|
|
2635
2614
|
);
|
|
2636
2615
|
}
|
|
@@ -2652,8 +2631,8 @@ const SearchInput = React.forwardRef(
|
|
|
2652
2631
|
const currentValue = controlled ? value : internalValue;
|
|
2653
2632
|
const isFilled = currentValue.length > 0;
|
|
2654
2633
|
const iconSize = size === "lg" ? 24 : 22;
|
|
2655
|
-
const minHeight = size === "sm" ? "
|
|
2656
|
-
const padding = size === "sm" ? "px-
|
|
2634
|
+
const minHeight = size === "sm" ? "h-[38px]" : "";
|
|
2635
|
+
const padding = size === "sm" ? "px-3.5 py-2" : "px-3.5 py-3";
|
|
2657
2636
|
const borderInset = focused ? "-1px" : "0px";
|
|
2658
2637
|
const borderRad = focused ? "9px" : "8px";
|
|
2659
2638
|
const borderColor = focused ? "var(--primary-action)" : "var(--border)";
|
|
@@ -2673,7 +2652,7 @@ const SearchInput = React.forwardRef(
|
|
|
2673
2652
|
{
|
|
2674
2653
|
ref,
|
|
2675
2654
|
className: cn(
|
|
2676
|
-
"relative flex cursor-text items-center gap-
|
|
2655
|
+
"relative flex cursor-text items-center gap-2 rounded-lg bg-background",
|
|
2677
2656
|
padding,
|
|
2678
2657
|
minHeight,
|
|
2679
2658
|
className
|
|
@@ -2699,7 +2678,7 @@ const SearchInput = React.forwardRef(
|
|
|
2699
2678
|
react.MagnifyingGlass,
|
|
2700
2679
|
{
|
|
2701
2680
|
size: iconSize,
|
|
2702
|
-
color: "var(--muted-foreground)",
|
|
2681
|
+
color: focused ? "var(--subtle-text)" : "var(--muted-foreground)",
|
|
2703
2682
|
weight: "regular"
|
|
2704
2683
|
}
|
|
2705
2684
|
) }),
|
|
@@ -2707,7 +2686,7 @@ const SearchInput = React.forwardRef(
|
|
|
2707
2686
|
!isFilled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2708
2687
|
"p",
|
|
2709
2688
|
{
|
|
2710
|
-
className: "pointer-events-none absolute inset-0 flex items-center text-
|
|
2689
|
+
className: "pointer-events-none absolute inset-0 flex items-center text-base leading-5 not-italic",
|
|
2711
2690
|
style: { color: "var(--muted-foreground)" },
|
|
2712
2691
|
children: placeholder
|
|
2713
2692
|
}
|
|
@@ -2722,7 +2701,7 @@ const SearchInput = React.forwardRef(
|
|
|
2722
2701
|
onChange: (e) => handleChange(e.target.value),
|
|
2723
2702
|
onFocus: () => setFocused(true),
|
|
2724
2703
|
onBlur: () => setFocused(false),
|
|
2725
|
-
className: "m-0 w-full border-none bg-transparent p-0 text-
|
|
2704
|
+
className: "m-0 w-full border-none bg-transparent p-0 text-base leading-5 outline-none",
|
|
2726
2705
|
style: {
|
|
2727
2706
|
color: isFilled ? "var(--foreground)" : "transparent",
|
|
2728
2707
|
caretColor: "var(--caret-color)"
|
|
@@ -2756,33 +2735,50 @@ const SearchInput = React.forwardRef(
|
|
|
2756
2735
|
SearchInput.displayName = "SearchInput";
|
|
2757
2736
|
const sizeClasses = {
|
|
2758
2737
|
lg: {
|
|
2759
|
-
pad: "px-
|
|
2760
|
-
text: "text-
|
|
2761
|
-
leading: "leading-
|
|
2762
|
-
font: "font-bold"
|
|
2738
|
+
pad: "px-3 py-2.5",
|
|
2739
|
+
text: "text-sm",
|
|
2740
|
+
leading: "leading-5",
|
|
2741
|
+
font: "font-bold",
|
|
2742
|
+
gap: "gap-1.5",
|
|
2743
|
+
iconSize: "h-5 w-5",
|
|
2744
|
+
badgeClass: "min-w-[18px] px-[5.5px] text-[length:var(--text-xs)] leading-[var(--leading-4)]"
|
|
2763
2745
|
},
|
|
2764
2746
|
md: {
|
|
2765
|
-
pad: "px-
|
|
2766
|
-
text: "text-
|
|
2767
|
-
leading: "leading-
|
|
2768
|
-
font: "font-bold"
|
|
2747
|
+
pad: "px-2.5 py-2",
|
|
2748
|
+
text: "text-sm",
|
|
2749
|
+
leading: "leading-5",
|
|
2750
|
+
font: "font-bold",
|
|
2751
|
+
gap: "gap-1.5",
|
|
2752
|
+
iconSize: "h-[18px] w-[18px]",
|
|
2753
|
+
badgeClass: "min-w-[18px] px-[5.5px] text-[length:var(--text-xs)] leading-[var(--leading-4)]"
|
|
2769
2754
|
},
|
|
2770
2755
|
sm: {
|
|
2771
|
-
pad: "px-
|
|
2772
|
-
text: "text-
|
|
2773
|
-
leading: "leading-
|
|
2774
|
-
font: "font-semibold"
|
|
2756
|
+
pad: "px-2 py-1.5",
|
|
2757
|
+
text: "text-xs",
|
|
2758
|
+
leading: "leading-4",
|
|
2759
|
+
font: "font-semibold",
|
|
2760
|
+
gap: "gap-1",
|
|
2761
|
+
iconSize: "h-4 w-4",
|
|
2762
|
+
badgeClass: "min-h-[14px] px-1 text-[length:var(--text-xxs)] leading-[var(--leading-3)]"
|
|
2775
2763
|
}
|
|
2776
2764
|
};
|
|
2765
|
+
function DefaultTabIcon({ className }) {
|
|
2766
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Circle, { "aria-hidden": "true", weight: "regular", className: cn("shrink-0", className) });
|
|
2767
|
+
}
|
|
2777
2768
|
const Tab = React.forwardRef(function Tab2({
|
|
2778
2769
|
title = "Tab",
|
|
2779
2770
|
size = "md",
|
|
2780
2771
|
active = false,
|
|
2781
2772
|
disabled = false,
|
|
2782
2773
|
onClick,
|
|
2783
|
-
className
|
|
2774
|
+
className,
|
|
2775
|
+
icon,
|
|
2776
|
+
notification
|
|
2784
2777
|
}, ref) {
|
|
2785
2778
|
const s = sizeClasses[size];
|
|
2779
|
+
const hasIcon = Boolean(icon);
|
|
2780
|
+
const hasNotification = notification !== void 0 && notification !== null;
|
|
2781
|
+
const renderedIcon = icon === true ? /* @__PURE__ */ jsxRuntime.jsx(DefaultTabIcon, { className: s.iconSize }) : icon;
|
|
2786
2782
|
const textColor = disabled ? "text-disabled" : active ? "text-primary-action" : "text-muted-foreground";
|
|
2787
2783
|
const borderColor = active && !disabled ? "border-primary-action" : "border-border";
|
|
2788
2784
|
const cursor = disabled ? "cursor-not-allowed" : "cursor-pointer";
|
|
@@ -2796,8 +2792,9 @@ const Tab = React.forwardRef(function Tab2({
|
|
|
2796
2792
|
"aria-disabled": disabled,
|
|
2797
2793
|
onClick: !disabled ? onClick : void 0,
|
|
2798
2794
|
className: cn(
|
|
2799
|
-
"relative flex min-w-[80px] select-none items-center justify-center bg-
|
|
2795
|
+
"relative flex min-w-[80px] select-none items-center justify-center bg-background transition-colors duration-150",
|
|
2800
2796
|
s.pad,
|
|
2797
|
+
(hasIcon || hasNotification) && s.gap,
|
|
2801
2798
|
cursor,
|
|
2802
2799
|
hoverBg,
|
|
2803
2800
|
className
|
|
@@ -2813,11 +2810,24 @@ const Tab = React.forwardRef(function Tab2({
|
|
|
2813
2810
|
)
|
|
2814
2811
|
}
|
|
2815
2812
|
),
|
|
2813
|
+
hasIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2814
|
+
"span",
|
|
2815
|
+
{
|
|
2816
|
+
"aria-hidden": "true",
|
|
2817
|
+
className: cn(
|
|
2818
|
+
"relative shrink-0",
|
|
2819
|
+
s.iconSize,
|
|
2820
|
+
disabled ? "text-disabled" : active ? "text-primary-action" : "text-muted-foreground"
|
|
2821
|
+
),
|
|
2822
|
+
children: renderedIcon
|
|
2823
|
+
}
|
|
2824
|
+
),
|
|
2816
2825
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2817
2826
|
"span",
|
|
2818
2827
|
{
|
|
2819
2828
|
className: cn(
|
|
2820
2829
|
"relative overflow-hidden text-ellipsis whitespace-nowrap text-center",
|
|
2830
|
+
hasIcon && hasNotification && "flex-1 min-w-px",
|
|
2821
2831
|
s.text,
|
|
2822
2832
|
s.leading,
|
|
2823
2833
|
s.font,
|
|
@@ -2825,6 +2835,16 @@ const Tab = React.forwardRef(function Tab2({
|
|
|
2825
2835
|
),
|
|
2826
2836
|
children: title
|
|
2827
2837
|
}
|
|
2838
|
+
),
|
|
2839
|
+
hasNotification && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2840
|
+
"span",
|
|
2841
|
+
{
|
|
2842
|
+
className: cn(
|
|
2843
|
+
"relative flex shrink-0 items-center justify-center rounded-[60px] bg-visual-red-default text-center font-normal text-on-visual-red",
|
|
2844
|
+
s.badgeClass
|
|
2845
|
+
),
|
|
2846
|
+
children: notification
|
|
2847
|
+
}
|
|
2828
2848
|
)
|
|
2829
2849
|
]
|
|
2830
2850
|
}
|
|
@@ -2840,6 +2860,8 @@ const TabGroup = React.forwardRef(
|
|
|
2840
2860
|
size,
|
|
2841
2861
|
active: item.id === activeId,
|
|
2842
2862
|
disabled: item.disabled,
|
|
2863
|
+
icon: item.icon,
|
|
2864
|
+
notification: item.notification,
|
|
2843
2865
|
onClick: () => onChange == null ? void 0 : onChange(item.id)
|
|
2844
2866
|
},
|
|
2845
2867
|
item.id
|
|
@@ -2847,6 +2869,112 @@ const TabGroup = React.forwardRef(
|
|
|
2847
2869
|
}
|
|
2848
2870
|
);
|
|
2849
2871
|
TabGroup.displayName = "TabGroup";
|
|
2872
|
+
const sizeStyles = {
|
|
2873
|
+
large: {
|
|
2874
|
+
container: "px-2 py-1",
|
|
2875
|
+
text: "text-xs leading-4",
|
|
2876
|
+
closeIcon: "h-4 w-4",
|
|
2877
|
+
closeButton: "h-4 w-4"
|
|
2878
|
+
},
|
|
2879
|
+
small: {
|
|
2880
|
+
container: "px-1 py-0.5",
|
|
2881
|
+
text: "text-xxs leading-3",
|
|
2882
|
+
closeIcon: "h-3.5 w-3.5",
|
|
2883
|
+
closeButton: "h-3.5 w-3.5"
|
|
2884
|
+
}
|
|
2885
|
+
};
|
|
2886
|
+
const variantStyles = {
|
|
2887
|
+
blue: {
|
|
2888
|
+
bg: "bg-[var(--fill-blue-50)]",
|
|
2889
|
+
text: "text-[var(--fill-blue-700)]"
|
|
2890
|
+
},
|
|
2891
|
+
green: {
|
|
2892
|
+
bg: "bg-[var(--fill-green-100)]",
|
|
2893
|
+
text: "text-[var(--fill-green-600)]"
|
|
2894
|
+
},
|
|
2895
|
+
yellow: {
|
|
2896
|
+
bg: "bg-[var(--fill-yellow-100)]",
|
|
2897
|
+
text: "text-[var(--fill-yellow-600)]"
|
|
2898
|
+
},
|
|
2899
|
+
red: {
|
|
2900
|
+
bg: "bg-[var(--fill-red-100)]",
|
|
2901
|
+
text: "text-[var(--fill-red-600)]"
|
|
2902
|
+
},
|
|
2903
|
+
gray: {
|
|
2904
|
+
bg: "bg-[var(--fill-gray-100)]",
|
|
2905
|
+
text: "text-subtle-text"
|
|
2906
|
+
},
|
|
2907
|
+
lime: {
|
|
2908
|
+
bg: "bg-[var(--fill-lime-100)]",
|
|
2909
|
+
text: "text-[var(--fill-lime-600)]"
|
|
2910
|
+
}
|
|
2911
|
+
};
|
|
2912
|
+
function CircleIcon({ disabled }) {
|
|
2913
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2914
|
+
react.Circle,
|
|
2915
|
+
{
|
|
2916
|
+
"aria-hidden": "true",
|
|
2917
|
+
weight: "regular",
|
|
2918
|
+
className: "h-3.5 w-3.5 shrink-0",
|
|
2919
|
+
color: disabled ? "var(--disabled)" : "var(--subtle-text)"
|
|
2920
|
+
}
|
|
2921
|
+
);
|
|
2922
|
+
}
|
|
2923
|
+
function CloseIcon({ disabled, className }) {
|
|
2924
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2925
|
+
react.X,
|
|
2926
|
+
{
|
|
2927
|
+
"aria-hidden": "true",
|
|
2928
|
+
weight: "regular",
|
|
2929
|
+
className: cn("shrink-0", className),
|
|
2930
|
+
color: disabled ? "var(--disabled)" : "var(--subtle-text)"
|
|
2931
|
+
}
|
|
2932
|
+
);
|
|
2933
|
+
}
|
|
2934
|
+
const Tag = React.forwardRef(function Tag2({
|
|
2935
|
+
text = "Tag",
|
|
2936
|
+
size = "large",
|
|
2937
|
+
state = "default",
|
|
2938
|
+
variant = "gray",
|
|
2939
|
+
icon = false,
|
|
2940
|
+
close = false,
|
|
2941
|
+
className
|
|
2942
|
+
}, ref) {
|
|
2943
|
+
const isDisabled = state === "disabled";
|
|
2944
|
+
const s = sizeStyles[size];
|
|
2945
|
+
const v = variantStyles[variant];
|
|
2946
|
+
const bgClass = state === "disabled" ? "bg-disabled-bg" : state === "hover" ? "bg-hover-bg" : v.bg;
|
|
2947
|
+
const textClass = isDisabled ? "text-disabled" : v.text;
|
|
2948
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2949
|
+
"div",
|
|
2950
|
+
{
|
|
2951
|
+
ref,
|
|
2952
|
+
className: cn(
|
|
2953
|
+
"inline-flex items-center justify-center rounded-[4px]",
|
|
2954
|
+
(icon || close) && "gap-[2px]",
|
|
2955
|
+
s.container,
|
|
2956
|
+
bgClass,
|
|
2957
|
+
className
|
|
2958
|
+
),
|
|
2959
|
+
children: [
|
|
2960
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, { disabled: isDisabled }),
|
|
2961
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("whitespace-nowrap font-normal", s.text, textClass), children: text }),
|
|
2962
|
+
close && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2963
|
+
"span",
|
|
2964
|
+
{
|
|
2965
|
+
className: cn(
|
|
2966
|
+
"inline-flex items-center justify-center rounded-[2px] transition-colors",
|
|
2967
|
+
s.closeButton,
|
|
2968
|
+
!isDisabled && "cursor-pointer hover:bg-black/10"
|
|
2969
|
+
),
|
|
2970
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, { disabled: isDisabled, className: s.closeIcon })
|
|
2971
|
+
}
|
|
2972
|
+
)
|
|
2973
|
+
]
|
|
2974
|
+
}
|
|
2975
|
+
);
|
|
2976
|
+
});
|
|
2977
|
+
Tag.displayName = "Tag";
|
|
2850
2978
|
const TextArea = React.forwardRef(
|
|
2851
2979
|
function TextArea2({
|
|
2852
2980
|
placeholder = "Text label",
|
|
@@ -2889,13 +3017,13 @@ const TextArea = React.forwardRef(
|
|
|
2889
3017
|
if (!controlled) setInternalValue(newValue);
|
|
2890
3018
|
onChange == null ? void 0 : onChange(newValue);
|
|
2891
3019
|
};
|
|
2892
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex w-full flex-col gap-
|
|
3020
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex w-full flex-col gap-1", className), children: [
|
|
2893
3021
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2894
3022
|
"div",
|
|
2895
3023
|
{
|
|
2896
3024
|
className: cn(
|
|
2897
|
-
"relative h-[116px] rounded-
|
|
2898
|
-
isDisabled ? "bg-disabled-bg" : "bg-
|
|
3025
|
+
"relative h-[116px] rounded-lg",
|
|
3026
|
+
isDisabled ? "bg-disabled-bg" : "bg-background"
|
|
2899
3027
|
),
|
|
2900
3028
|
children: [
|
|
2901
3029
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2906,13 +3034,27 @@ const TextArea = React.forwardRef(
|
|
|
2906
3034
|
style: { inset: borderInset, borderRadius: borderRad, borderColor }
|
|
2907
3035
|
}
|
|
2908
3036
|
),
|
|
2909
|
-
isFilled ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full w-full flex-col
|
|
2910
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3037
|
+
isFilled ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full w-full flex-col px-3.5 pt-3.5 pb-1.5", children: [
|
|
3038
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2911
3039
|
"p",
|
|
2912
3040
|
{
|
|
2913
|
-
className: "w-full shrink-0 text-
|
|
3041
|
+
className: "w-full shrink-0 text-xs leading-4 not-italic",
|
|
2914
3042
|
style: { color: floatLabel },
|
|
2915
|
-
children:
|
|
3043
|
+
children: [
|
|
3044
|
+
placeholder,
|
|
3045
|
+
required && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3046
|
+
"span",
|
|
3047
|
+
{
|
|
3048
|
+
style: {
|
|
3049
|
+
color: isDisabled ? "var(--disabled)" : "var(--error-dark)"
|
|
3050
|
+
},
|
|
3051
|
+
children: [
|
|
3052
|
+
" ",
|
|
3053
|
+
"*"
|
|
3054
|
+
]
|
|
3055
|
+
}
|
|
3056
|
+
)
|
|
3057
|
+
]
|
|
2916
3058
|
}
|
|
2917
3059
|
),
|
|
2918
3060
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2935,7 +3077,7 @@ const TextArea = React.forwardRef(
|
|
|
2935
3077
|
rows,
|
|
2936
3078
|
"aria-label": placeholder,
|
|
2937
3079
|
className: cn(
|
|
2938
|
-
"m-0 min-w-0 flex-1 resize-none border-none bg-transparent p-0 text-
|
|
3080
|
+
"m-0 min-h-0 min-w-0 w-full flex-1 resize-none border-none bg-transparent p-0 text-sm leading-5 not-italic outline-none"
|
|
2939
3081
|
),
|
|
2940
3082
|
style: {
|
|
2941
3083
|
...textareaProps.style,
|
|
@@ -2944,11 +3086,11 @@ const TextArea = React.forwardRef(
|
|
|
2944
3086
|
}
|
|
2945
3087
|
}
|
|
2946
3088
|
)
|
|
2947
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex size-full items-start p-
|
|
3089
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex size-full items-start p-3.5", children: [
|
|
2948
3090
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2949
3091
|
"p",
|
|
2950
3092
|
{
|
|
2951
|
-
className: "pointer-events-none relative h-full min-h-[1px] min-w-0 flex-1 text-
|
|
3093
|
+
className: "pointer-events-none relative h-full min-h-[1px] min-w-0 flex-1 text-base leading-5 not-italic",
|
|
2952
3094
|
style: { color: floatLabel },
|
|
2953
3095
|
children: [
|
|
2954
3096
|
placeholder,
|
|
@@ -2985,7 +3127,7 @@ const TextArea = React.forwardRef(
|
|
|
2985
3127
|
},
|
|
2986
3128
|
rows,
|
|
2987
3129
|
className: cn(
|
|
2988
|
-
"absolute inset-0 h-full w-full cursor-text resize-none border-none bg-transparent text-
|
|
3130
|
+
"absolute inset-0 h-full w-full cursor-text resize-none border-none bg-transparent text-base outline-none"
|
|
2989
3131
|
),
|
|
2990
3132
|
style: {
|
|
2991
3133
|
...textareaProps.style,
|
|
@@ -3000,27 +3142,21 @@ const TextArea = React.forwardRef(
|
|
|
3000
3142
|
]
|
|
3001
3143
|
}
|
|
3002
3144
|
),
|
|
3003
|
-
showBelow && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3004
|
-
"
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
]
|
|
3019
|
-
}
|
|
3020
|
-
)
|
|
3021
|
-
]
|
|
3022
|
-
}
|
|
3023
|
-
)
|
|
3145
|
+
showBelow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 px-1 text-xs leading-4", children: [
|
|
3146
|
+
leftText ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1", style: { color: leftColor }, children: leftText }) : showCount && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1" }),
|
|
3147
|
+
showCount && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3148
|
+
"span",
|
|
3149
|
+
{
|
|
3150
|
+
className: "shrink-0 whitespace-nowrap text-right",
|
|
3151
|
+
style: { color: countColor },
|
|
3152
|
+
children: [
|
|
3153
|
+
charCount,
|
|
3154
|
+
"/",
|
|
3155
|
+
maxCount
|
|
3156
|
+
]
|
|
3157
|
+
}
|
|
3158
|
+
)
|
|
3159
|
+
] })
|
|
3024
3160
|
] });
|
|
3025
3161
|
}
|
|
3026
3162
|
);
|
|
@@ -3200,7 +3336,7 @@ function RangeSlotPicker({
|
|
|
3200
3336
|
className: "leading-[22px] relative shrink-0 text-[14px] text-center whitespace-nowrap",
|
|
3201
3337
|
style: {
|
|
3202
3338
|
fontVariationSettings: "'wdth' 100",
|
|
3203
|
-
color: isSelected ? "
|
|
3339
|
+
color: isSelected ? "var(--on-primary-action)" : "var(--foreground)"
|
|
3204
3340
|
},
|
|
3205
3341
|
children: slot.label
|
|
3206
3342
|
}
|
|
@@ -3344,7 +3480,7 @@ const TimeInput = React.forwardRef(
|
|
|
3344
3480
|
const isError = state === "error";
|
|
3345
3481
|
const isFocus = state === "focus";
|
|
3346
3482
|
const isFilled = mode === "single" ? Boolean(currentValue) : true;
|
|
3347
|
-
const bgClass = isDisabled ? "bg-disabled-bg" : "bg-
|
|
3483
|
+
const bgClass = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
3348
3484
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
3349
3485
|
const valueColor = isDisabled ? "var(--disabled)" : "var(--foreground)";
|
|
3350
3486
|
const iconColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
@@ -3425,8 +3561,7 @@ const TimeInput = React.forwardRef(
|
|
|
3425
3561
|
react.Minus,
|
|
3426
3562
|
{
|
|
3427
3563
|
size: 20,
|
|
3428
|
-
color: minusColor
|
|
3429
|
-
weight: "bold"
|
|
3564
|
+
color: minusColor
|
|
3430
3565
|
}
|
|
3431
3566
|
),
|
|
3432
3567
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3473,9 +3608,9 @@ const TimeInput = React.forwardRef(
|
|
|
3473
3608
|
);
|
|
3474
3609
|
};
|
|
3475
3610
|
const isTriggerFilled = isFilled && (mode === "range" || currentValue);
|
|
3476
|
-
const triggerPadding = isTriggerFilled ? "py-
|
|
3611
|
+
const triggerPadding = isTriggerFilled ? "py-1.5" : "py-3";
|
|
3477
3612
|
const triggerBase = cn(
|
|
3478
|
-
"relative flex gap-
|
|
3613
|
+
"relative flex gap-2 items-center rounded-lg px-3.5 w-full",
|
|
3479
3614
|
bgClass,
|
|
3480
3615
|
triggerPadding
|
|
3481
3616
|
);
|
|
@@ -3511,7 +3646,7 @@ const TimeInput = React.forwardRef(
|
|
|
3511
3646
|
}
|
|
3512
3647
|
)
|
|
3513
3648
|
] });
|
|
3514
|
-
const belowMsg = showBelow && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start px-
|
|
3649
|
+
const belowMsg = showBelow && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start px-1 text-xs leading-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3515
3650
|
"span",
|
|
3516
3651
|
{
|
|
3517
3652
|
className: "flex-1 min-w-0",
|
|
@@ -3633,10 +3768,10 @@ const TimeInput = React.forwardRef(
|
|
|
3633
3768
|
{
|
|
3634
3769
|
align: "start",
|
|
3635
3770
|
sideOffset: 4,
|
|
3636
|
-
className: "z-50 rounded-[8px] bg-
|
|
3771
|
+
className: "z-50 rounded-[8px] bg-popover p-3 outline-none max-w-[340px] text-popover-foreground",
|
|
3637
3772
|
style: {
|
|
3638
|
-
boxShadow: "
|
|
3639
|
-
border: "1px solid
|
|
3773
|
+
boxShadow: "var(--elevation-popover)",
|
|
3774
|
+
border: "1px solid var(--border)",
|
|
3640
3775
|
minWidth: mode === "single" ? 327 : void 0
|
|
3641
3776
|
},
|
|
3642
3777
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
@@ -3666,6 +3801,7 @@ exports.OptionList = OptionList;
|
|
|
3666
3801
|
exports.SearchInput = SearchInput;
|
|
3667
3802
|
exports.Tab = Tab;
|
|
3668
3803
|
exports.TabGroup = TabGroup;
|
|
3804
|
+
exports.Tag = Tag;
|
|
3669
3805
|
exports.TextArea = TextArea;
|
|
3670
3806
|
exports.TimeInput = TimeInput;
|
|
3671
3807
|
exports.cn = cn;
|