@herca/r-kit 0.0.20 → 0.0.21
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/clients.cjs +153 -120
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.js +196 -163
- package/dist/clients.js.map +1 -1
- package/package.json +1 -1
package/dist/clients.js
CHANGED
|
@@ -10082,7 +10082,7 @@ function createDateStyleHelpers({
|
|
|
10082
10082
|
// src/components/calendar/partials/calendar-day-item.tsx
|
|
10083
10083
|
import { jsx as jsx308, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
10084
10084
|
var date_size_map = {
|
|
10085
|
-
md: "size-
|
|
10085
|
+
md: "size-7.5",
|
|
10086
10086
|
sm: "size-6",
|
|
10087
10087
|
lg: "size-9"
|
|
10088
10088
|
};
|
|
@@ -10294,70 +10294,80 @@ function CalendarGrid({
|
|
|
10294
10294
|
{ length: Math.ceil(days2.length / 7) },
|
|
10295
10295
|
(_, i) => days2.slice(i * 7, i * 7 + 7)
|
|
10296
10296
|
);
|
|
10297
|
-
return /* @__PURE__ */ jsx310(
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
const
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
}
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
"relative",
|
|
10316
|
-
variant === "default" && "border-b border-gray-300 last:border-b-0!",
|
|
10317
|
-
//prettier-ignore
|
|
10318
|
-
className
|
|
10319
|
-
),
|
|
10320
|
-
children: [
|
|
10321
|
-
/* @__PURE__ */ jsx310(
|
|
10322
|
-
"div",
|
|
10323
|
-
{
|
|
10324
|
-
className: clsx5(
|
|
10325
|
-
"grid w-full grid-cols-7",
|
|
10326
|
-
variant === "default" && "*:border-r *:border-gray-300 [&>*:nth-last-child(1)]:border-r-0"
|
|
10327
|
-
//prettier-ignore
|
|
10328
|
-
),
|
|
10329
|
-
children: week.map((day, dayIndex) => /* @__PURE__ */ jsx310(
|
|
10330
|
-
CalendarDayItem,
|
|
10331
|
-
{
|
|
10332
|
-
day,
|
|
10333
|
-
helpers,
|
|
10334
|
-
size,
|
|
10335
|
-
mode,
|
|
10336
|
-
styleConfig,
|
|
10337
|
-
onClick,
|
|
10338
|
-
variant,
|
|
10339
|
-
events
|
|
10340
|
-
},
|
|
10341
|
-
dayIndex
|
|
10342
|
-
))
|
|
10297
|
+
return /* @__PURE__ */ jsx310(
|
|
10298
|
+
"div",
|
|
10299
|
+
{
|
|
10300
|
+
className: clsx5(
|
|
10301
|
+
"relative",
|
|
10302
|
+
variant === "compact" && size === "sm" && "space-y-1"
|
|
10303
|
+
),
|
|
10304
|
+
children: weeks.map((week, weekIndex) => {
|
|
10305
|
+
const segments = getWeekEventSegments({
|
|
10306
|
+
week,
|
|
10307
|
+
events
|
|
10308
|
+
});
|
|
10309
|
+
const columnEventCount = Array(7).fill(0);
|
|
10310
|
+
segments.forEach((seg) => {
|
|
10311
|
+
for (let i = 0; i < seg.span; i++) {
|
|
10312
|
+
const colIndex = seg.startCol + i;
|
|
10313
|
+
if (colIndex >= 0 && colIndex < 7) {
|
|
10314
|
+
columnEventCount[colIndex]++;
|
|
10343
10315
|
}
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10316
|
+
}
|
|
10317
|
+
});
|
|
10318
|
+
return /* @__PURE__ */ jsxs42(
|
|
10319
|
+
"div",
|
|
10320
|
+
{
|
|
10321
|
+
className: clsx5(
|
|
10322
|
+
"relative",
|
|
10323
|
+
variant === "default" && "border-b border-gray-300 last:border-b-0!",
|
|
10324
|
+
//prettier-ignore
|
|
10325
|
+
className
|
|
10326
|
+
),
|
|
10327
|
+
children: [
|
|
10328
|
+
/* @__PURE__ */ jsx310(
|
|
10329
|
+
"div",
|
|
10330
|
+
{
|
|
10331
|
+
className: clsx5(
|
|
10332
|
+
"grid w-full grid-cols-7",
|
|
10333
|
+
variant === "default" && "*:border-r *:border-gray-300 [&>*:nth-last-child(1)]:border-r-0",
|
|
10334
|
+
//prettier-ignore
|
|
10335
|
+
variant === "compact" && "place-items-center"
|
|
10336
|
+
),
|
|
10337
|
+
children: week.map((day, dayIndex) => /* @__PURE__ */ jsx310(
|
|
10338
|
+
CalendarDayItem,
|
|
10339
|
+
{
|
|
10340
|
+
day,
|
|
10341
|
+
helpers,
|
|
10342
|
+
size,
|
|
10343
|
+
mode,
|
|
10344
|
+
styleConfig,
|
|
10345
|
+
onClick,
|
|
10346
|
+
variant,
|
|
10347
|
+
events
|
|
10348
|
+
},
|
|
10349
|
+
dayIndex
|
|
10350
|
+
))
|
|
10351
|
+
}
|
|
10352
|
+
),
|
|
10353
|
+
segments.length > 0 && /* @__PURE__ */ jsxs42("div", { className: "absolute inset-x-0 bottom-2 grid grid-cols-7 gap-0.5", children: [
|
|
10354
|
+
segments.slice(0, isMobile ? 1 : 2).map((seg, index) => /* @__PURE__ */ jsx310(
|
|
10355
|
+
EventBar,
|
|
10356
|
+
{
|
|
10357
|
+
segment: seg,
|
|
10358
|
+
showTooltip: showCalendarTooltip
|
|
10359
|
+
},
|
|
10360
|
+
index
|
|
10361
|
+
)),
|
|
10362
|
+
/* @__PURE__ */ jsx310(ButtonMore, { segments })
|
|
10363
|
+
] })
|
|
10364
|
+
]
|
|
10365
|
+
},
|
|
10366
|
+
weekIndex
|
|
10367
|
+
);
|
|
10368
|
+
})
|
|
10369
|
+
}
|
|
10370
|
+
);
|
|
10361
10371
|
}
|
|
10362
10372
|
|
|
10363
10373
|
// src/components/calendar/partials/calendar-header.tsx
|
|
@@ -10553,9 +10563,9 @@ function NavigatorButton({
|
|
|
10553
10563
|
|
|
10554
10564
|
// src/components/calendar/partials/days-of-week.tsx
|
|
10555
10565
|
import clsx6 from "clsx";
|
|
10556
|
-
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
10566
|
+
import { Fragment as Fragment7, jsx as jsx313, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
10557
10567
|
var day_of_week_size = {
|
|
10558
|
-
sm: "
|
|
10568
|
+
sm: "t2",
|
|
10559
10569
|
md: "t2",
|
|
10560
10570
|
lg: "t1"
|
|
10561
10571
|
};
|
|
@@ -10563,39 +10573,75 @@ function DaysOfWeek({
|
|
|
10563
10573
|
daysOfWeek,
|
|
10564
10574
|
size = "md",
|
|
10565
10575
|
wrapperClassName,
|
|
10566
|
-
variant = "default"
|
|
10576
|
+
variant = "default",
|
|
10577
|
+
type = "month"
|
|
10567
10578
|
}) {
|
|
10568
|
-
return /* @__PURE__ */
|
|
10579
|
+
return /* @__PURE__ */ jsxs44(
|
|
10569
10580
|
"div",
|
|
10570
10581
|
{
|
|
10571
10582
|
className: clsx6(
|
|
10572
10583
|
"grid justify-items-center",
|
|
10573
10584
|
variant === "compact" && "calendar-cols mb-3 gap-x-1 *:text-center!",
|
|
10574
|
-
variant === "default" && "w-full
|
|
10585
|
+
variant === "default" && "w-full bg-gray-100 *:p-3 *:w-full *:text-start! *:border-r *:border-gray-300 *:last:border-r-0",
|
|
10586
|
+
//prettier-ignore
|
|
10587
|
+
variant === "default" && type === "month" && "grid-cols-7",
|
|
10588
|
+
variant === "default" && type === "week" && "grid-cols-[60px_1fr_1fr_1fr_1fr_1fr_1fr_1fr]",
|
|
10575
10589
|
//prettier-ignore
|
|
10576
10590
|
wrapperClassName
|
|
10577
10591
|
),
|
|
10578
|
-
children:
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
as: "h5",
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
+
children: [
|
|
10593
|
+
type === "week" && variant === "default" && /* @__PURE__ */ jsxs44(Fragment7, { children: [
|
|
10594
|
+
/* @__PURE__ */ jsx313("div", {}),
|
|
10595
|
+
daysOfWeek.map((day) => /* @__PURE__ */ jsx313(Text, { as: "h5", value: day, variant: "t1" }, day))
|
|
10596
|
+
] }),
|
|
10597
|
+
type === "month" && daysOfWeek.map((day) => /* @__PURE__ */ jsx313(
|
|
10598
|
+
Text,
|
|
10599
|
+
{
|
|
10600
|
+
as: "h5",
|
|
10601
|
+
weight: variant === "compact" ? "medium" : "semibold",
|
|
10602
|
+
value: day,
|
|
10603
|
+
className: clsx6(
|
|
10604
|
+
variant === "compact" && "text-gray-600!",
|
|
10605
|
+
variant === "default" && "text-gray-900! uppercase"
|
|
10606
|
+
),
|
|
10607
|
+
variant: variant === "compact" ? day_of_week_size[size] : "t1"
|
|
10608
|
+
},
|
|
10609
|
+
day
|
|
10610
|
+
))
|
|
10611
|
+
]
|
|
10592
10612
|
}
|
|
10593
10613
|
);
|
|
10594
10614
|
}
|
|
10595
10615
|
|
|
10596
10616
|
// src/components/calendar/calendar.tsx
|
|
10597
10617
|
import clsx7 from "clsx";
|
|
10598
|
-
|
|
10618
|
+
|
|
10619
|
+
// src/components/calendar/constants.tsx
|
|
10620
|
+
var typeOptions = [
|
|
10621
|
+
{
|
|
10622
|
+
label: "Year",
|
|
10623
|
+
value: "year"
|
|
10624
|
+
},
|
|
10625
|
+
{
|
|
10626
|
+
label: "Month",
|
|
10627
|
+
value: "month"
|
|
10628
|
+
},
|
|
10629
|
+
{
|
|
10630
|
+
label: "Week",
|
|
10631
|
+
value: "week"
|
|
10632
|
+
},
|
|
10633
|
+
{
|
|
10634
|
+
label: "Day",
|
|
10635
|
+
value: "day"
|
|
10636
|
+
},
|
|
10637
|
+
{
|
|
10638
|
+
label: "Agenda",
|
|
10639
|
+
value: "agenda"
|
|
10640
|
+
}
|
|
10641
|
+
];
|
|
10642
|
+
|
|
10643
|
+
// src/components/calendar/calendar.tsx
|
|
10644
|
+
import { Fragment as Fragment8, jsx as jsx314, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
10599
10645
|
var days = ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"];
|
|
10600
10646
|
var month = [
|
|
10601
10647
|
"Januari",
|
|
@@ -10687,28 +10733,6 @@ var Calendar2 = ({
|
|
|
10687
10733
|
setCurrentMonth(newMonth);
|
|
10688
10734
|
setCurrentYear(newYear);
|
|
10689
10735
|
};
|
|
10690
|
-
const typeOptions = [
|
|
10691
|
-
{
|
|
10692
|
-
label: "Year",
|
|
10693
|
-
value: "year"
|
|
10694
|
-
},
|
|
10695
|
-
{
|
|
10696
|
-
label: "Month",
|
|
10697
|
-
value: "month"
|
|
10698
|
-
},
|
|
10699
|
-
{
|
|
10700
|
-
label: "Week",
|
|
10701
|
-
value: "week"
|
|
10702
|
-
},
|
|
10703
|
-
{
|
|
10704
|
-
label: "Day",
|
|
10705
|
-
value: "day"
|
|
10706
|
-
},
|
|
10707
|
-
{
|
|
10708
|
-
label: "Agenda",
|
|
10709
|
-
value: "agenda"
|
|
10710
|
-
}
|
|
10711
|
-
];
|
|
10712
10736
|
useEffect7(() => {
|
|
10713
10737
|
if (value !== void 0) {
|
|
10714
10738
|
setCurrentMonth(
|
|
@@ -10724,28 +10748,14 @@ var Calendar2 = ({
|
|
|
10724
10748
|
setSelectedType(type);
|
|
10725
10749
|
}
|
|
10726
10750
|
}, [type]);
|
|
10727
|
-
return /* @__PURE__ */
|
|
10728
|
-
variant === "default" && /* @__PURE__ */
|
|
10729
|
-
/* @__PURE__ */
|
|
10730
|
-
/* @__PURE__ */
|
|
10731
|
-
/* @__PURE__ */ jsx314(
|
|
10732
|
-
|
|
10733
|
-
{
|
|
10734
|
-
name: "angle-left-small",
|
|
10735
|
-
size: 30,
|
|
10736
|
-
className: "text-gray-900"
|
|
10737
|
-
}
|
|
10738
|
-
) }),
|
|
10739
|
-
/* @__PURE__ */ jsx314("button", { onClick: () => changeMonth(1), children: /* @__PURE__ */ jsx314(
|
|
10740
|
-
Icon_default,
|
|
10741
|
-
{
|
|
10742
|
-
name: "angle-right-small",
|
|
10743
|
-
size: 30,
|
|
10744
|
-
className: "text-gray-900"
|
|
10745
|
-
}
|
|
10746
|
-
) })
|
|
10751
|
+
return /* @__PURE__ */ jsxs45("div", { className: clsx7(variant === "default" && "flex flex-col gap-2"), children: [
|
|
10752
|
+
variant === "default" && /* @__PURE__ */ jsxs45("div", { className: "flex items-center justify-between", children: [
|
|
10753
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-6", children: [
|
|
10754
|
+
/* @__PURE__ */ jsxs45("div", { className: "*:cursor-pointer", children: [
|
|
10755
|
+
/* @__PURE__ */ jsx314(ButtonNavigation, { onClick: () => changeMonth(-1), type: "prev" }),
|
|
10756
|
+
/* @__PURE__ */ jsx314(ButtonNavigation, { onClick: () => changeMonth(1), type: "next" })
|
|
10747
10757
|
] }),
|
|
10748
|
-
/* @__PURE__ */
|
|
10758
|
+
/* @__PURE__ */ jsxs45(
|
|
10749
10759
|
Text,
|
|
10750
10760
|
{
|
|
10751
10761
|
variant: "h4",
|
|
@@ -10759,7 +10769,7 @@ var Calendar2 = ({
|
|
|
10759
10769
|
}
|
|
10760
10770
|
)
|
|
10761
10771
|
] }),
|
|
10762
|
-
/* @__PURE__ */
|
|
10772
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2", children: [
|
|
10763
10773
|
/* @__PURE__ */ jsx314(
|
|
10764
10774
|
Button,
|
|
10765
10775
|
{
|
|
@@ -10770,8 +10780,8 @@ var Calendar2 = ({
|
|
|
10770
10780
|
children: "Today"
|
|
10771
10781
|
}
|
|
10772
10782
|
),
|
|
10773
|
-
/* @__PURE__ */
|
|
10774
|
-
/* @__PURE__ */ jsx314(DropdownTrigger, { children: /* @__PURE__ */
|
|
10783
|
+
/* @__PURE__ */ jsxs45(Dropdown, { children: [
|
|
10784
|
+
/* @__PURE__ */ jsx314(DropdownTrigger, { children: /* @__PURE__ */ jsxs45(
|
|
10775
10785
|
Button,
|
|
10776
10786
|
{
|
|
10777
10787
|
size: "sm",
|
|
@@ -10810,7 +10820,7 @@ var Calendar2 = ({
|
|
|
10810
10820
|
] })
|
|
10811
10821
|
] })
|
|
10812
10822
|
] }),
|
|
10813
|
-
/* @__PURE__ */
|
|
10823
|
+
/* @__PURE__ */ jsxs45(
|
|
10814
10824
|
"div",
|
|
10815
10825
|
{
|
|
10816
10826
|
className: cn(
|
|
@@ -10822,6 +10832,16 @@ var Calendar2 = ({
|
|
|
10822
10832
|
wrapperClassname
|
|
10823
10833
|
),
|
|
10824
10834
|
children: [
|
|
10835
|
+
selectedType === "week" && /* @__PURE__ */ jsx314("div", { children: /* @__PURE__ */ jsx314(
|
|
10836
|
+
DaysOfWeek,
|
|
10837
|
+
{
|
|
10838
|
+
type: "week",
|
|
10839
|
+
size,
|
|
10840
|
+
variant,
|
|
10841
|
+
daysOfWeek,
|
|
10842
|
+
wrapperClassName: weekWrapperClassname
|
|
10843
|
+
}
|
|
10844
|
+
) }),
|
|
10825
10845
|
type === "year" && /* @__PURE__ */ jsx314("div", { className: "grid w-full grid-cols-3", children: /* @__PURE__ */ jsx314(
|
|
10826
10846
|
CalendarGrid,
|
|
10827
10847
|
{
|
|
@@ -10837,7 +10857,7 @@ var Calendar2 = ({
|
|
|
10837
10857
|
showCalendarTooltip
|
|
10838
10858
|
}
|
|
10839
10859
|
) }),
|
|
10840
|
-
selectedType === "month" && /* @__PURE__ */
|
|
10860
|
+
selectedType === "month" && /* @__PURE__ */ jsxs45(Fragment8, { children: [
|
|
10841
10861
|
showHeader && variant === "compact" && /* @__PURE__ */ jsx314(
|
|
10842
10862
|
CalendarHeader,
|
|
10843
10863
|
{
|
|
@@ -10882,6 +10902,19 @@ var Calendar2 = ({
|
|
|
10882
10902
|
)
|
|
10883
10903
|
] });
|
|
10884
10904
|
};
|
|
10905
|
+
var ButtonNavigation = ({
|
|
10906
|
+
onClick,
|
|
10907
|
+
type
|
|
10908
|
+
}) => {
|
|
10909
|
+
return /* @__PURE__ */ jsx314("button", { onClick, children: /* @__PURE__ */ jsx314(
|
|
10910
|
+
Icon_default,
|
|
10911
|
+
{
|
|
10912
|
+
name: type === "next" ? "angle-right-small" : "angle-left-small",
|
|
10913
|
+
size: 30,
|
|
10914
|
+
className: "text-gray-900"
|
|
10915
|
+
}
|
|
10916
|
+
) });
|
|
10917
|
+
};
|
|
10885
10918
|
|
|
10886
10919
|
// src/components/date-picker/helpers.ts
|
|
10887
10920
|
var monthsShort = [
|
|
@@ -10991,7 +11024,7 @@ var parseMonthName = (monthStr) => {
|
|
|
10991
11024
|
|
|
10992
11025
|
// src/components/date-picker/date-picker.tsx
|
|
10993
11026
|
import clsx8 from "clsx";
|
|
10994
|
-
import { jsx as jsx315, jsxs as
|
|
11027
|
+
import { jsx as jsx315, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
10995
11028
|
var DatePicker = ({
|
|
10996
11029
|
format = "DD-MM-YYYY",
|
|
10997
11030
|
mode = "single",
|
|
@@ -11240,7 +11273,7 @@ var DatePicker = ({
|
|
|
11240
11273
|
{
|
|
11241
11274
|
ref: containerRef,
|
|
11242
11275
|
className: clsx8("relative flex max-w-sm flex-col", containerClassName),
|
|
11243
|
-
children: /* @__PURE__ */
|
|
11276
|
+
children: /* @__PURE__ */ jsxs46(
|
|
11244
11277
|
Dropdown,
|
|
11245
11278
|
{
|
|
11246
11279
|
open: isCalendarShow,
|
|
@@ -11284,8 +11317,8 @@ var DatePicker = ({
|
|
|
11284
11317
|
value: selectedDate,
|
|
11285
11318
|
...calendarProps
|
|
11286
11319
|
}
|
|
11287
|
-
) : /* @__PURE__ */
|
|
11288
|
-
showController && /* @__PURE__ */
|
|
11320
|
+
) : /* @__PURE__ */ jsxs46("div", { className: "flex", children: [
|
|
11321
|
+
showController && /* @__PURE__ */ jsxs46("div", { className: "flex flex-col items-start gap-2 border-r border-gray-400 px-3 py-6.5", children: [
|
|
11289
11322
|
/* @__PURE__ */ jsx315(
|
|
11290
11323
|
ChipGroup,
|
|
11291
11324
|
{
|
|
@@ -11375,8 +11408,8 @@ var DatePicker = ({
|
|
|
11375
11408
|
}
|
|
11376
11409
|
)
|
|
11377
11410
|
] }),
|
|
11378
|
-
/* @__PURE__ */
|
|
11379
|
-
/* @__PURE__ */
|
|
11411
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col", children: [
|
|
11412
|
+
/* @__PURE__ */ jsxs46(
|
|
11380
11413
|
"div",
|
|
11381
11414
|
{
|
|
11382
11415
|
className: cn("flex", isMobile ? "flex-col" : "flex-row"),
|
|
@@ -11416,8 +11449,8 @@ var DatePicker = ({
|
|
|
11416
11449
|
]
|
|
11417
11450
|
}
|
|
11418
11451
|
),
|
|
11419
|
-
/* @__PURE__ */
|
|
11420
|
-
/* @__PURE__ */
|
|
11452
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col items-end justify-between gap-2 border-t border-gray-300 px-4 py-3 md:flex-row md:items-center", children: [
|
|
11453
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-2", children: [
|
|
11421
11454
|
/* @__PURE__ */ jsx315(
|
|
11422
11455
|
Input,
|
|
11423
11456
|
{
|
|
@@ -11443,7 +11476,7 @@ var DatePicker = ({
|
|
|
11443
11476
|
}
|
|
11444
11477
|
)
|
|
11445
11478
|
] }),
|
|
11446
|
-
/* @__PURE__ */
|
|
11479
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-2", children: [
|
|
11447
11480
|
/* @__PURE__ */ jsx315(
|
|
11448
11481
|
Button,
|
|
11449
11482
|
{
|
|
@@ -11562,7 +11595,7 @@ var SwitchThumbVariants = cva10(
|
|
|
11562
11595
|
);
|
|
11563
11596
|
|
|
11564
11597
|
// src/components/switch/switch.tsx
|
|
11565
|
-
import { jsx as jsx317, jsxs as
|
|
11598
|
+
import { jsx as jsx317, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
11566
11599
|
var BaseSwitch = ({
|
|
11567
11600
|
id: providedId,
|
|
11568
11601
|
checked,
|
|
@@ -11589,7 +11622,7 @@ var BaseSwitch = ({
|
|
|
11589
11622
|
}
|
|
11590
11623
|
onCheckedChange?.(newChecked);
|
|
11591
11624
|
};
|
|
11592
|
-
return /* @__PURE__ */
|
|
11625
|
+
return /* @__PURE__ */ jsxs47(
|
|
11593
11626
|
"button",
|
|
11594
11627
|
{
|
|
11595
11628
|
type: "button",
|
|
@@ -11648,7 +11681,7 @@ var Switch = ({
|
|
|
11648
11681
|
md: "text-xs",
|
|
11649
11682
|
lg: "text-base"
|
|
11650
11683
|
};
|
|
11651
|
-
return /* @__PURE__ */ jsx317(FormField, { hint, errorMessages, className, children: /* @__PURE__ */
|
|
11684
|
+
return /* @__PURE__ */ jsx317(FormField, { hint, errorMessages, className, children: /* @__PURE__ */ jsxs47(
|
|
11652
11685
|
"div",
|
|
11653
11686
|
{
|
|
11654
11687
|
className: cn(
|
|
@@ -11701,7 +11734,7 @@ var ToastVariants = cva11("", {
|
|
|
11701
11734
|
});
|
|
11702
11735
|
|
|
11703
11736
|
// src/components/toast/toast-card.tsx
|
|
11704
|
-
import { jsx as jsx318, jsxs as
|
|
11737
|
+
import { jsx as jsx318, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
11705
11738
|
function ToastCard({
|
|
11706
11739
|
color = "secondary",
|
|
11707
11740
|
description = "Toast Description",
|
|
@@ -11720,7 +11753,7 @@ function ToastCard({
|
|
|
11720
11753
|
if (color2 === "secondary" && variant === "outline") return "secondary";
|
|
11721
11754
|
return color2;
|
|
11722
11755
|
};
|
|
11723
|
-
return /* @__PURE__ */
|
|
11756
|
+
return /* @__PURE__ */ jsxs48(
|
|
11724
11757
|
"div",
|
|
11725
11758
|
{
|
|
11726
11759
|
className: clsx9(
|
|
@@ -11732,7 +11765,7 @@ function ToastCard({
|
|
|
11732
11765
|
ToastVariants({ bg: color })
|
|
11733
11766
|
),
|
|
11734
11767
|
children: [
|
|
11735
|
-
/* @__PURE__ */
|
|
11768
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-2", children: [
|
|
11736
11769
|
icon && /* @__PURE__ */ jsx318(
|
|
11737
11770
|
Icon_default,
|
|
11738
11771
|
{
|
|
@@ -11745,7 +11778,7 @@ function ToastCard({
|
|
|
11745
11778
|
)
|
|
11746
11779
|
}
|
|
11747
11780
|
),
|
|
11748
|
-
/* @__PURE__ */
|
|
11781
|
+
/* @__PURE__ */ jsxs48(
|
|
11749
11782
|
"div",
|
|
11750
11783
|
{
|
|
11751
11784
|
className: clsx9(
|
|
@@ -11761,7 +11794,7 @@ function ToastCard({
|
|
|
11761
11794
|
}
|
|
11762
11795
|
)
|
|
11763
11796
|
] }),
|
|
11764
|
-
/* @__PURE__ */
|
|
11797
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-2", children: [
|
|
11765
11798
|
onClickAction && /* @__PURE__ */ jsx318(
|
|
11766
11799
|
Button,
|
|
11767
11800
|
{
|
|
@@ -11825,7 +11858,7 @@ function ToastItem({
|
|
|
11825
11858
|
}
|
|
11826
11859
|
|
|
11827
11860
|
// src/components/toast/toast-provider.tsx
|
|
11828
|
-
import { jsx as jsx320, jsxs as
|
|
11861
|
+
import { jsx as jsx320, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
11829
11862
|
function ToastProvider({
|
|
11830
11863
|
children,
|
|
11831
11864
|
position = "top-right"
|
|
@@ -11838,7 +11871,7 @@ function ToastProvider({
|
|
|
11838
11871
|
const id = crypto.randomUUID();
|
|
11839
11872
|
setToasts((t) => [...t, { ...props, id }]);
|
|
11840
11873
|
}, []);
|
|
11841
|
-
return /* @__PURE__ */
|
|
11874
|
+
return /* @__PURE__ */ jsxs49(ToastContext.Provider, { value: { show }, children: [
|
|
11842
11875
|
children,
|
|
11843
11876
|
/* @__PURE__ */ jsx320(
|
|
11844
11877
|
"div",
|
|
@@ -11883,7 +11916,7 @@ import React293, {
|
|
|
11883
11916
|
} from "react";
|
|
11884
11917
|
|
|
11885
11918
|
// src/components/loading/rounded-spinner.tsx
|
|
11886
|
-
import { jsx as jsx321, jsxs as
|
|
11919
|
+
import { jsx as jsx321, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
11887
11920
|
var COLOR_MAP = {
|
|
11888
11921
|
primary: { bg: "stroke-primary-1000/30", fg: "stroke-primary-1000" },
|
|
11889
11922
|
secondary: { bg: "stroke-white/30", fg: "stroke-white" },
|
|
@@ -11905,7 +11938,7 @@ function RoundedSpinner({
|
|
|
11905
11938
|
const inner = size - stroke;
|
|
11906
11939
|
const offset = stroke / 2;
|
|
11907
11940
|
const variant = COLOR_MAP[color];
|
|
11908
|
-
return /* @__PURE__ */ jsx321("div", { style: { width: size, height: size, display: "inline-block" }, children: /* @__PURE__ */
|
|
11941
|
+
return /* @__PURE__ */ jsx321("div", { style: { width: size, height: size, display: "inline-block" }, children: /* @__PURE__ */ jsxs50(
|
|
11909
11942
|
"svg",
|
|
11910
11943
|
{
|
|
11911
11944
|
width: size,
|
|
@@ -11957,7 +11990,7 @@ function RoundedSpinner({
|
|
|
11957
11990
|
|
|
11958
11991
|
// src/components/select/select.tsx
|
|
11959
11992
|
import clsx11 from "clsx";
|
|
11960
|
-
import { jsx as jsx322, jsxs as
|
|
11993
|
+
import { jsx as jsx322, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
11961
11994
|
var Select = ({
|
|
11962
11995
|
options = [],
|
|
11963
11996
|
value = null,
|
|
@@ -12104,7 +12137,7 @@ var Select = ({
|
|
|
12104
12137
|
return /* @__PURE__ */ jsx322("span", { className: "text-gray-500", children: placeholder });
|
|
12105
12138
|
}
|
|
12106
12139
|
if (isMulti) {
|
|
12107
|
-
return /* @__PURE__ */ jsx322("div", { className: "flex flex-wrap gap-1", children: asArray(value).map((item) => /* @__PURE__ */
|
|
12140
|
+
return /* @__PURE__ */ jsx322("div", { className: "flex flex-wrap gap-1", children: asArray(value).map((item) => /* @__PURE__ */ jsxs51(
|
|
12108
12141
|
"div",
|
|
12109
12142
|
{
|
|
12110
12143
|
className: "border-primary-200 flex items-center gap-1 rounded border bg-white px-2 py-0.5 text-xs text-gray-900",
|
|
@@ -12134,7 +12167,7 @@ var Select = ({
|
|
|
12134
12167
|
errorMessages,
|
|
12135
12168
|
description,
|
|
12136
12169
|
hint,
|
|
12137
|
-
children: /* @__PURE__ */
|
|
12170
|
+
children: /* @__PURE__ */ jsxs51(
|
|
12138
12171
|
"div",
|
|
12139
12172
|
{
|
|
12140
12173
|
ref: containerRef,
|
|
@@ -12142,7 +12175,7 @@ var Select = ({
|
|
|
12142
12175
|
onKeyDown: handleKeyDown2,
|
|
12143
12176
|
tabIndex: -1,
|
|
12144
12177
|
children: [
|
|
12145
|
-
/* @__PURE__ */
|
|
12178
|
+
/* @__PURE__ */ jsxs51(
|
|
12146
12179
|
"div",
|
|
12147
12180
|
{
|
|
12148
12181
|
"aria-selected": isOpen,
|
|
@@ -12156,7 +12189,7 @@ var Select = ({
|
|
|
12156
12189
|
tabIndex: isDisabled ? -1 : 0,
|
|
12157
12190
|
children: [
|
|
12158
12191
|
/* @__PURE__ */ jsx322("div", { className: "flex-1 overflow-hidden text-xs font-medium text-gray-900", children: getDisplayValue() }),
|
|
12159
|
-
/* @__PURE__ */
|
|
12192
|
+
/* @__PURE__ */ jsxs51("div", { className: "ml-2 flex items-center gap-1", children: [
|
|
12160
12193
|
showClearButton && /* @__PURE__ */ jsx322(
|
|
12161
12194
|
"button",
|
|
12162
12195
|
{
|
|
@@ -12178,7 +12211,7 @@ var Select = ({
|
|
|
12178
12211
|
]
|
|
12179
12212
|
}
|
|
12180
12213
|
),
|
|
12181
|
-
isOpen && /* @__PURE__ */
|
|
12214
|
+
isOpen && /* @__PURE__ */ jsxs51(
|
|
12182
12215
|
"div",
|
|
12183
12216
|
{
|
|
12184
12217
|
className: cn(
|
|
@@ -12186,7 +12219,7 @@ var Select = ({
|
|
|
12186
12219
|
"border-gray-200"
|
|
12187
12220
|
),
|
|
12188
12221
|
children: [
|
|
12189
|
-
isSearchable && /* @__PURE__ */
|
|
12222
|
+
isSearchable && /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3.5 py-2.5", children: [
|
|
12190
12223
|
/* @__PURE__ */ jsx322(Icon_default, { name: "search", size: 20, className: "text-gray-400" }),
|
|
12191
12224
|
/* @__PURE__ */ jsx322(
|
|
12192
12225
|
"input",
|
|
@@ -12201,7 +12234,7 @@ var Select = ({
|
|
|
12201
12234
|
}
|
|
12202
12235
|
)
|
|
12203
12236
|
] }),
|
|
12204
|
-
/* @__PURE__ */
|
|
12237
|
+
/* @__PURE__ */ jsxs51(
|
|
12205
12238
|
"div",
|
|
12206
12239
|
{
|
|
12207
12240
|
className: "max-h-62.5 space-y-2 overflow-y-auto focus:outline-none",
|
|
@@ -12259,7 +12292,7 @@ import {
|
|
|
12259
12292
|
useRef as useRef7,
|
|
12260
12293
|
useEffect as useEffect11
|
|
12261
12294
|
} from "react";
|
|
12262
|
-
import { jsx as jsx323, jsxs as
|
|
12295
|
+
import { jsx as jsx323, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
12263
12296
|
var TabsContext = createContext5(void 0);
|
|
12264
12297
|
var useTabsContext = () => {
|
|
12265
12298
|
const context = useContext5(TabsContext);
|
|
@@ -12349,7 +12382,7 @@ var TabsList = ({ className, children }) => {
|
|
|
12349
12382
|
clearTimeout(timer);
|
|
12350
12383
|
};
|
|
12351
12384
|
}, [value, orientation, isInitialized]);
|
|
12352
|
-
return /* @__PURE__ */
|
|
12385
|
+
return /* @__PURE__ */ jsxs52(
|
|
12353
12386
|
"div",
|
|
12354
12387
|
{
|
|
12355
12388
|
ref: listRef,
|