@herca/r-kit 0.0.20 → 0.0.22

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.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-9",
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("div", { className: "relative", children: weeks.map((week, weekIndex) => {
10298
- const segments = getWeekEventSegments({
10299
- week,
10300
- events
10301
- });
10302
- const columnEventCount = Array(7).fill(0);
10303
- segments.forEach((seg) => {
10304
- for (let i = 0; i < seg.span; i++) {
10305
- const colIndex = seg.startCol + i;
10306
- if (colIndex >= 0 && colIndex < 7) {
10307
- columnEventCount[colIndex]++;
10308
- }
10309
- }
10310
- });
10311
- return /* @__PURE__ */ jsxs42(
10312
- "div",
10313
- {
10314
- className: clsx5(
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
- segments.length > 0 && /* @__PURE__ */ jsxs42("div", { className: "absolute inset-x-0 bottom-2 grid grid-cols-7 gap-0.5", children: [
10346
- segments.slice(0, isMobile ? 1 : 2).map((seg, index) => /* @__PURE__ */ jsx310(
10347
- EventBar,
10348
- {
10349
- segment: seg,
10350
- showTooltip: showCalendarTooltip
10351
- },
10352
- index
10353
- )),
10354
- /* @__PURE__ */ jsx310(ButtonMore, { segments })
10355
- ] })
10356
- ]
10357
- },
10358
- weekIndex
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: "t3",
10568
+ sm: "t2",
10559
10569
  md: "t2",
10560
10570
  lg: "t1"
10561
10571
  };
@@ -10563,39 +10573,76 @@ function DaysOfWeek({
10563
10573
  daysOfWeek,
10564
10574
  size = "md",
10565
10575
  wrapperClassName,
10566
- variant = "default"
10576
+ variant = "default",
10577
+ type = "month",
10578
+ renderItem
10567
10579
  }) {
10568
- return /* @__PURE__ */ jsx313(
10580
+ return /* @__PURE__ */ jsxs44(
10569
10581
  "div",
10570
10582
  {
10571
10583
  className: clsx6(
10572
10584
  "grid justify-items-center",
10573
10585
  variant === "compact" && "calendar-cols mb-3 gap-x-1 *:text-center!",
10574
- variant === "default" && "w-full grid-cols-7 bg-gray-100 *:p-3 *:w-full *:text-start! *:border-r *:border-gray-300 *:last:border-r-0",
10586
+ variant === "default" && "w-full bg-gray-100 *:p-3 *:w-full *:text-start! *:border-r *:border-gray-300 *:last:border-r-0",
10587
+ //prettier-ignore
10588
+ variant === "default" && type === "month" && "grid-cols-7",
10589
+ variant === "default" && type === "week" && "grid-cols-[60px_1fr_1fr_1fr_1fr_1fr_1fr_1fr]",
10575
10590
  //prettier-ignore
10576
10591
  wrapperClassName
10577
10592
  ),
10578
- children: daysOfWeek.map((day) => /* @__PURE__ */ jsx313(
10579
- Text,
10580
- {
10581
- as: "h5",
10582
- weight: variant === "compact" ? "medium" : "semibold",
10583
- value: day,
10584
- className: clsx6(
10585
- variant === "compact" && "text-gray-600!",
10586
- variant === "default" && "text-gray-900! uppercase"
10587
- ),
10588
- variant: variant === "compact" ? day_of_week_size[size] : "t1"
10589
- },
10590
- day
10591
- ))
10593
+ children: [
10594
+ type === "week" && variant === "default" && renderItem === void 0 && /* @__PURE__ */ jsxs44(Fragment7, { children: [
10595
+ /* @__PURE__ */ jsx313("div", {}),
10596
+ daysOfWeek.map((day) => /* @__PURE__ */ jsx313(Text, { as: "h5", value: day, variant: "t1" }, day))
10597
+ ] }),
10598
+ type === "month" && renderItem === void 0 && daysOfWeek.map((day) => /* @__PURE__ */ jsx313(
10599
+ Text,
10600
+ {
10601
+ as: "h5",
10602
+ weight: variant === "compact" ? "medium" : "semibold",
10603
+ value: day,
10604
+ className: clsx6(
10605
+ variant === "compact" && "text-gray-600!",
10606
+ variant === "default" && "text-gray-900! uppercase"
10607
+ ),
10608
+ variant: variant === "compact" ? day_of_week_size[size] : "t1"
10609
+ },
10610
+ day
10611
+ ))
10612
+ ]
10592
10613
  }
10593
10614
  );
10594
10615
  }
10595
10616
 
10596
10617
  // src/components/calendar/calendar.tsx
10597
10618
  import clsx7 from "clsx";
10598
- import { Fragment as Fragment7, jsx as jsx314, jsxs as jsxs44 } from "react/jsx-runtime";
10619
+
10620
+ // src/components/calendar/constants.tsx
10621
+ var typeOptions = [
10622
+ {
10623
+ label: "Year",
10624
+ value: "year"
10625
+ },
10626
+ {
10627
+ label: "Month",
10628
+ value: "month"
10629
+ },
10630
+ {
10631
+ label: "Week",
10632
+ value: "week"
10633
+ },
10634
+ {
10635
+ label: "Day",
10636
+ value: "day"
10637
+ },
10638
+ {
10639
+ label: "Agenda",
10640
+ value: "agenda"
10641
+ }
10642
+ ];
10643
+
10644
+ // src/components/calendar/calendar.tsx
10645
+ import { Fragment as Fragment8, jsx as jsx314, jsxs as jsxs45 } from "react/jsx-runtime";
10599
10646
  var days = ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"];
10600
10647
  var month = [
10601
10648
  "Januari",
@@ -10646,6 +10693,14 @@ var Calendar2 = ({
10646
10693
  const [selectedTypeIndex, setSelectedTypeIndex] = useState10(
10647
10694
  null
10648
10695
  );
10696
+ const [currentWeekStart, setCurrentWeekStart] = useState10(() => {
10697
+ const today = /* @__PURE__ */ new Date();
10698
+ const day = today.getDay();
10699
+ const start = new Date(today);
10700
+ start.setDate(today.getDate() - day);
10701
+ start.setHours(0, 0, 0, 0);
10702
+ return start;
10703
+ });
10649
10704
  const calendarDays = getCalendarDays({ currentMonth, currentYear });
10650
10705
  const calendarHelpers = createCalendarHelpers({
10651
10706
  disabledDates,
@@ -10674,6 +10729,24 @@ var Calendar2 = ({
10674
10729
  }
10675
10730
  onChange?.(day.fullDate);
10676
10731
  };
10732
+ const getWeekDaysLabel = (weekStart) => {
10733
+ return Array.from({ length: 7 }, (_, i) => {
10734
+ const d = new Date(weekStart);
10735
+ d.setDate(weekStart.getDate() + i);
10736
+ const dayName = daysOfWeek[d.getDay()];
10737
+ const date = d.getDate();
10738
+ return `${dayName} ${date}`;
10739
+ });
10740
+ };
10741
+ const changeWeek = (delta) => {
10742
+ setCurrentWeekStart((prev) => {
10743
+ const next = new Date(prev);
10744
+ next.setDate(prev.getDate() + delta * 7);
10745
+ setCurrentMonth(next.getMonth());
10746
+ setCurrentYear(next.getFullYear());
10747
+ return next;
10748
+ });
10749
+ };
10677
10750
  const changeMonth = (delta) => {
10678
10751
  let newMonth = currentMonth + delta;
10679
10752
  let newYear = currentYear;
@@ -10687,28 +10760,22 @@ var Calendar2 = ({
10687
10760
  setCurrentMonth(newMonth);
10688
10761
  setCurrentYear(newYear);
10689
10762
  };
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"
10763
+ const handleNavigationDefault = (type2, action) => {
10764
+ if (type2 === "month") {
10765
+ if (action === "next") {
10766
+ return changeMonth(-1);
10767
+ } else {
10768
+ return changeMonth(1);
10769
+ }
10710
10770
  }
10711
- ];
10771
+ if (type2 === "week") {
10772
+ if (action === "next") {
10773
+ return changeWeek(1);
10774
+ } else {
10775
+ return changeWeek(-1);
10776
+ }
10777
+ }
10778
+ };
10712
10779
  useEffect7(() => {
10713
10780
  if (value !== void 0) {
10714
10781
  setCurrentMonth(
@@ -10724,28 +10791,26 @@ var Calendar2 = ({
10724
10791
  setSelectedType(type);
10725
10792
  }
10726
10793
  }, [type]);
10727
- return /* @__PURE__ */ jsxs44("div", { className: clsx7(variant === "default" && "flex flex-col gap-2"), children: [
10728
- variant === "default" && /* @__PURE__ */ jsxs44("div", { className: "flex items-center justify-between", children: [
10729
- /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-6", children: [
10730
- /* @__PURE__ */ jsxs44("div", { className: "*:cursor-pointer", children: [
10731
- /* @__PURE__ */ jsx314("button", { onClick: () => changeMonth(-1), children: /* @__PURE__ */ jsx314(
10732
- Icon_default,
10794
+ return /* @__PURE__ */ jsxs45("div", { className: clsx7(variant === "default" && "flex flex-col gap-2"), children: [
10795
+ variant === "default" && /* @__PURE__ */ jsxs45("div", { className: "flex items-center justify-between", children: [
10796
+ /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-6", children: [
10797
+ /* @__PURE__ */ jsxs45("div", { className: "*:cursor-pointer", children: [
10798
+ /* @__PURE__ */ jsx314(
10799
+ ButtonNavigation,
10733
10800
  {
10734
- name: "angle-left-small",
10735
- size: 30,
10736
- className: "text-gray-900"
10801
+ onClick: () => handleNavigationDefault(selectedType, "prev"),
10802
+ type: "prev"
10737
10803
  }
10738
- ) }),
10739
- /* @__PURE__ */ jsx314("button", { onClick: () => changeMonth(1), children: /* @__PURE__ */ jsx314(
10740
- Icon_default,
10804
+ ),
10805
+ /* @__PURE__ */ jsx314(
10806
+ ButtonNavigation,
10741
10807
  {
10742
- name: "angle-right-small",
10743
- size: 30,
10744
- className: "text-gray-900"
10808
+ onClick: () => handleNavigationDefault(selectedType, "next"),
10809
+ type: "next"
10745
10810
  }
10746
- ) })
10811
+ )
10747
10812
  ] }),
10748
- /* @__PURE__ */ jsxs44(
10813
+ /* @__PURE__ */ jsxs45(
10749
10814
  Text,
10750
10815
  {
10751
10816
  variant: "h4",
@@ -10759,7 +10824,7 @@ var Calendar2 = ({
10759
10824
  }
10760
10825
  )
10761
10826
  ] }),
10762
- /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
10827
+ /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2", children: [
10763
10828
  /* @__PURE__ */ jsx314(
10764
10829
  Button,
10765
10830
  {
@@ -10767,11 +10832,12 @@ var Calendar2 = ({
10767
10832
  color: "gray",
10768
10833
  variant: "outline",
10769
10834
  className: "capitalize",
10835
+ onClick: () => setCurrentMonth((/* @__PURE__ */ new Date()).getMonth()),
10770
10836
  children: "Today"
10771
10837
  }
10772
10838
  ),
10773
- /* @__PURE__ */ jsxs44(Dropdown, { children: [
10774
- /* @__PURE__ */ jsx314(DropdownTrigger, { children: /* @__PURE__ */ jsxs44(
10839
+ /* @__PURE__ */ jsxs45(Dropdown, { children: [
10840
+ /* @__PURE__ */ jsx314(DropdownTrigger, { children: /* @__PURE__ */ jsxs45(
10775
10841
  Button,
10776
10842
  {
10777
10843
  size: "sm",
@@ -10810,7 +10876,7 @@ var Calendar2 = ({
10810
10876
  ] })
10811
10877
  ] })
10812
10878
  ] }),
10813
- /* @__PURE__ */ jsxs44(
10879
+ /* @__PURE__ */ jsxs45(
10814
10880
  "div",
10815
10881
  {
10816
10882
  className: cn(
@@ -10822,6 +10888,16 @@ var Calendar2 = ({
10822
10888
  wrapperClassname
10823
10889
  ),
10824
10890
  children: [
10891
+ selectedType === "week" && /* @__PURE__ */ jsx314("div", { children: /* @__PURE__ */ jsx314(
10892
+ DaysOfWeek,
10893
+ {
10894
+ type: "week",
10895
+ size,
10896
+ variant,
10897
+ daysOfWeek: getWeekDaysLabel(currentWeekStart),
10898
+ wrapperClassName: weekWrapperClassname
10899
+ }
10900
+ ) }),
10825
10901
  type === "year" && /* @__PURE__ */ jsx314("div", { className: "grid w-full grid-cols-3", children: /* @__PURE__ */ jsx314(
10826
10902
  CalendarGrid,
10827
10903
  {
@@ -10837,7 +10913,7 @@ var Calendar2 = ({
10837
10913
  showCalendarTooltip
10838
10914
  }
10839
10915
  ) }),
10840
- selectedType === "month" && /* @__PURE__ */ jsxs44(Fragment7, { children: [
10916
+ selectedType === "month" && /* @__PURE__ */ jsxs45(Fragment8, { children: [
10841
10917
  showHeader && variant === "compact" && /* @__PURE__ */ jsx314(
10842
10918
  CalendarHeader,
10843
10919
  {
@@ -10882,6 +10958,19 @@ var Calendar2 = ({
10882
10958
  )
10883
10959
  ] });
10884
10960
  };
10961
+ var ButtonNavigation = ({
10962
+ onClick,
10963
+ type
10964
+ }) => {
10965
+ return /* @__PURE__ */ jsx314("button", { onClick, children: /* @__PURE__ */ jsx314(
10966
+ Icon_default,
10967
+ {
10968
+ name: type === "next" ? "angle-right-small" : "angle-left-small",
10969
+ size: 30,
10970
+ className: "text-gray-900"
10971
+ }
10972
+ ) });
10973
+ };
10885
10974
 
10886
10975
  // src/components/date-picker/helpers.ts
10887
10976
  var monthsShort = [
@@ -10991,7 +11080,7 @@ var parseMonthName = (monthStr) => {
10991
11080
 
10992
11081
  // src/components/date-picker/date-picker.tsx
10993
11082
  import clsx8 from "clsx";
10994
- import { jsx as jsx315, jsxs as jsxs45 } from "react/jsx-runtime";
11083
+ import { jsx as jsx315, jsxs as jsxs46 } from "react/jsx-runtime";
10995
11084
  var DatePicker = ({
10996
11085
  format = "DD-MM-YYYY",
10997
11086
  mode = "single",
@@ -11240,7 +11329,7 @@ var DatePicker = ({
11240
11329
  {
11241
11330
  ref: containerRef,
11242
11331
  className: clsx8("relative flex max-w-sm flex-col", containerClassName),
11243
- children: /* @__PURE__ */ jsxs45(
11332
+ children: /* @__PURE__ */ jsxs46(
11244
11333
  Dropdown,
11245
11334
  {
11246
11335
  open: isCalendarShow,
@@ -11284,8 +11373,8 @@ var DatePicker = ({
11284
11373
  value: selectedDate,
11285
11374
  ...calendarProps
11286
11375
  }
11287
- ) : /* @__PURE__ */ jsxs45("div", { className: "flex", children: [
11288
- showController && /* @__PURE__ */ jsxs45("div", { className: "flex flex-col items-start gap-2 border-r border-gray-400 px-3 py-6.5", children: [
11376
+ ) : /* @__PURE__ */ jsxs46("div", { className: "flex", children: [
11377
+ showController && /* @__PURE__ */ jsxs46("div", { className: "flex flex-col items-start gap-2 border-r border-gray-400 px-3 py-6.5", children: [
11289
11378
  /* @__PURE__ */ jsx315(
11290
11379
  ChipGroup,
11291
11380
  {
@@ -11375,8 +11464,8 @@ var DatePicker = ({
11375
11464
  }
11376
11465
  )
11377
11466
  ] }),
11378
- /* @__PURE__ */ jsxs45("div", { className: "flex flex-col", children: [
11379
- /* @__PURE__ */ jsxs45(
11467
+ /* @__PURE__ */ jsxs46("div", { className: "flex flex-col", children: [
11468
+ /* @__PURE__ */ jsxs46(
11380
11469
  "div",
11381
11470
  {
11382
11471
  className: cn("flex", isMobile ? "flex-col" : "flex-row"),
@@ -11416,8 +11505,8 @@ var DatePicker = ({
11416
11505
  ]
11417
11506
  }
11418
11507
  ),
11419
- /* @__PURE__ */ jsxs45("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: [
11420
- /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2", children: [
11508
+ /* @__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: [
11509
+ /* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-2", children: [
11421
11510
  /* @__PURE__ */ jsx315(
11422
11511
  Input,
11423
11512
  {
@@ -11443,7 +11532,7 @@ var DatePicker = ({
11443
11532
  }
11444
11533
  )
11445
11534
  ] }),
11446
- /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2", children: [
11535
+ /* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-2", children: [
11447
11536
  /* @__PURE__ */ jsx315(
11448
11537
  Button,
11449
11538
  {
@@ -11562,7 +11651,7 @@ var SwitchThumbVariants = cva10(
11562
11651
  );
11563
11652
 
11564
11653
  // src/components/switch/switch.tsx
11565
- import { jsx as jsx317, jsxs as jsxs46 } from "react/jsx-runtime";
11654
+ import { jsx as jsx317, jsxs as jsxs47 } from "react/jsx-runtime";
11566
11655
  var BaseSwitch = ({
11567
11656
  id: providedId,
11568
11657
  checked,
@@ -11589,7 +11678,7 @@ var BaseSwitch = ({
11589
11678
  }
11590
11679
  onCheckedChange?.(newChecked);
11591
11680
  };
11592
- return /* @__PURE__ */ jsxs46(
11681
+ return /* @__PURE__ */ jsxs47(
11593
11682
  "button",
11594
11683
  {
11595
11684
  type: "button",
@@ -11648,7 +11737,7 @@ var Switch = ({
11648
11737
  md: "text-xs",
11649
11738
  lg: "text-base"
11650
11739
  };
11651
- return /* @__PURE__ */ jsx317(FormField, { hint, errorMessages, className, children: /* @__PURE__ */ jsxs46(
11740
+ return /* @__PURE__ */ jsx317(FormField, { hint, errorMessages, className, children: /* @__PURE__ */ jsxs47(
11652
11741
  "div",
11653
11742
  {
11654
11743
  className: cn(
@@ -11701,7 +11790,7 @@ var ToastVariants = cva11("", {
11701
11790
  });
11702
11791
 
11703
11792
  // src/components/toast/toast-card.tsx
11704
- import { jsx as jsx318, jsxs as jsxs47 } from "react/jsx-runtime";
11793
+ import { jsx as jsx318, jsxs as jsxs48 } from "react/jsx-runtime";
11705
11794
  function ToastCard({
11706
11795
  color = "secondary",
11707
11796
  description = "Toast Description",
@@ -11720,7 +11809,7 @@ function ToastCard({
11720
11809
  if (color2 === "secondary" && variant === "outline") return "secondary";
11721
11810
  return color2;
11722
11811
  };
11723
- return /* @__PURE__ */ jsxs47(
11812
+ return /* @__PURE__ */ jsxs48(
11724
11813
  "div",
11725
11814
  {
11726
11815
  className: clsx9(
@@ -11732,7 +11821,7 @@ function ToastCard({
11732
11821
  ToastVariants({ bg: color })
11733
11822
  ),
11734
11823
  children: [
11735
- /* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-2", children: [
11824
+ /* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-2", children: [
11736
11825
  icon && /* @__PURE__ */ jsx318(
11737
11826
  Icon_default,
11738
11827
  {
@@ -11745,7 +11834,7 @@ function ToastCard({
11745
11834
  )
11746
11835
  }
11747
11836
  ),
11748
- /* @__PURE__ */ jsxs47(
11837
+ /* @__PURE__ */ jsxs48(
11749
11838
  "div",
11750
11839
  {
11751
11840
  className: clsx9(
@@ -11761,7 +11850,7 @@ function ToastCard({
11761
11850
  }
11762
11851
  )
11763
11852
  ] }),
11764
- /* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-2", children: [
11853
+ /* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-2", children: [
11765
11854
  onClickAction && /* @__PURE__ */ jsx318(
11766
11855
  Button,
11767
11856
  {
@@ -11825,7 +11914,7 @@ function ToastItem({
11825
11914
  }
11826
11915
 
11827
11916
  // src/components/toast/toast-provider.tsx
11828
- import { jsx as jsx320, jsxs as jsxs48 } from "react/jsx-runtime";
11917
+ import { jsx as jsx320, jsxs as jsxs49 } from "react/jsx-runtime";
11829
11918
  function ToastProvider({
11830
11919
  children,
11831
11920
  position = "top-right"
@@ -11838,7 +11927,7 @@ function ToastProvider({
11838
11927
  const id = crypto.randomUUID();
11839
11928
  setToasts((t) => [...t, { ...props, id }]);
11840
11929
  }, []);
11841
- return /* @__PURE__ */ jsxs48(ToastContext.Provider, { value: { show }, children: [
11930
+ return /* @__PURE__ */ jsxs49(ToastContext.Provider, { value: { show }, children: [
11842
11931
  children,
11843
11932
  /* @__PURE__ */ jsx320(
11844
11933
  "div",
@@ -11883,7 +11972,7 @@ import React293, {
11883
11972
  } from "react";
11884
11973
 
11885
11974
  // src/components/loading/rounded-spinner.tsx
11886
- import { jsx as jsx321, jsxs as jsxs49 } from "react/jsx-runtime";
11975
+ import { jsx as jsx321, jsxs as jsxs50 } from "react/jsx-runtime";
11887
11976
  var COLOR_MAP = {
11888
11977
  primary: { bg: "stroke-primary-1000/30", fg: "stroke-primary-1000" },
11889
11978
  secondary: { bg: "stroke-white/30", fg: "stroke-white" },
@@ -11905,7 +11994,7 @@ function RoundedSpinner({
11905
11994
  const inner = size - stroke;
11906
11995
  const offset = stroke / 2;
11907
11996
  const variant = COLOR_MAP[color];
11908
- return /* @__PURE__ */ jsx321("div", { style: { width: size, height: size, display: "inline-block" }, children: /* @__PURE__ */ jsxs49(
11997
+ return /* @__PURE__ */ jsx321("div", { style: { width: size, height: size, display: "inline-block" }, children: /* @__PURE__ */ jsxs50(
11909
11998
  "svg",
11910
11999
  {
11911
12000
  width: size,
@@ -11957,7 +12046,7 @@ function RoundedSpinner({
11957
12046
 
11958
12047
  // src/components/select/select.tsx
11959
12048
  import clsx11 from "clsx";
11960
- import { jsx as jsx322, jsxs as jsxs50 } from "react/jsx-runtime";
12049
+ import { jsx as jsx322, jsxs as jsxs51 } from "react/jsx-runtime";
11961
12050
  var Select = ({
11962
12051
  options = [],
11963
12052
  value = null,
@@ -12100,16 +12189,17 @@ var Select = ({
12100
12189
  }
12101
12190
  }, [isOpen, isSearchable]);
12102
12191
  const getDisplayValue = () => {
12103
- if (value !== null || value !== void 0 || isMulti && asArray(value).length === 0) {
12192
+ const isEmpty = value == null || isMulti && asArray(value).length === 0;
12193
+ if (isEmpty) {
12104
12194
  return /* @__PURE__ */ jsx322("span", { className: "text-gray-500", children: placeholder });
12105
12195
  }
12106
12196
  if (isMulti) {
12107
- return /* @__PURE__ */ jsx322("div", { className: "flex flex-wrap gap-1", children: asArray(value).map((item) => /* @__PURE__ */ jsxs50(
12197
+ return /* @__PURE__ */ jsx322("div", { className: "flex flex-wrap gap-1", children: asArray(value).map((item) => /* @__PURE__ */ jsxs51(
12108
12198
  "div",
12109
12199
  {
12110
12200
  className: "border-primary-200 flex items-center gap-1 rounded border bg-white px-2 py-0.5 text-xs text-gray-900",
12111
12201
  children: [
12112
- renderValue !== void 0 ? renderValue?.(item) : item.label,
12202
+ renderValue !== void 0 && renderValue !== null ? renderValue?.(item) : item.label,
12113
12203
  /* @__PURE__ */ jsx322(
12114
12204
  "button",
12115
12205
  {
@@ -12123,7 +12213,7 @@ var Select = ({
12123
12213
  item.value
12124
12214
  )) });
12125
12215
  }
12126
- return renderValue !== void 0 ? renderValue?.(value) : value.label;
12216
+ return renderValue !== void 0 && renderValue !== null ? renderValue?.(value) : value.label;
12127
12217
  };
12128
12218
  const showClearButton = isClearable && (isMulti && asArray(value).length > 0 || !isMulti && value !== null);
12129
12219
  const hasError = fieldHasError(errorMessages);
@@ -12134,7 +12224,7 @@ var Select = ({
12134
12224
  errorMessages,
12135
12225
  description,
12136
12226
  hint,
12137
- children: /* @__PURE__ */ jsxs50(
12227
+ children: /* @__PURE__ */ jsxs51(
12138
12228
  "div",
12139
12229
  {
12140
12230
  ref: containerRef,
@@ -12142,7 +12232,7 @@ var Select = ({
12142
12232
  onKeyDown: handleKeyDown2,
12143
12233
  tabIndex: -1,
12144
12234
  children: [
12145
- /* @__PURE__ */ jsxs50(
12235
+ /* @__PURE__ */ jsxs51(
12146
12236
  "div",
12147
12237
  {
12148
12238
  "aria-selected": isOpen,
@@ -12156,7 +12246,7 @@ var Select = ({
12156
12246
  tabIndex: isDisabled ? -1 : 0,
12157
12247
  children: [
12158
12248
  /* @__PURE__ */ jsx322("div", { className: "flex-1 overflow-hidden text-xs font-medium text-gray-900", children: getDisplayValue() }),
12159
- /* @__PURE__ */ jsxs50("div", { className: "ml-2 flex items-center gap-1", children: [
12249
+ /* @__PURE__ */ jsxs51("div", { className: "ml-2 flex items-center gap-1", children: [
12160
12250
  showClearButton && /* @__PURE__ */ jsx322(
12161
12251
  "button",
12162
12252
  {
@@ -12178,7 +12268,7 @@ var Select = ({
12178
12268
  ]
12179
12269
  }
12180
12270
  ),
12181
- isOpen && /* @__PURE__ */ jsxs50(
12271
+ isOpen && /* @__PURE__ */ jsxs51(
12182
12272
  "div",
12183
12273
  {
12184
12274
  className: cn(
@@ -12186,7 +12276,7 @@ var Select = ({
12186
12276
  "border-gray-200"
12187
12277
  ),
12188
12278
  children: [
12189
- isSearchable && /* @__PURE__ */ jsxs50("div", { className: "flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3.5 py-2.5", children: [
12279
+ 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
12280
  /* @__PURE__ */ jsx322(Icon_default, { name: "search", size: 20, className: "text-gray-400" }),
12191
12281
  /* @__PURE__ */ jsx322(
12192
12282
  "input",
@@ -12201,7 +12291,7 @@ var Select = ({
12201
12291
  }
12202
12292
  )
12203
12293
  ] }),
12204
- /* @__PURE__ */ jsxs50(
12294
+ /* @__PURE__ */ jsxs51(
12205
12295
  "div",
12206
12296
  {
12207
12297
  className: "max-h-62.5 space-y-2 overflow-y-auto focus:outline-none",
@@ -12224,7 +12314,7 @@ var Select = ({
12224
12314
  highlighted && "bg-primary-100",
12225
12315
  selected ? "bg-primary-50 border-primary-300" : "hover:bg-gray-50"
12226
12316
  ),
12227
- children: /* @__PURE__ */ jsx322("div", { className: "flex-1", children: renderOption !== void 0 ? renderOption?.(option, { selected }) : /* @__PURE__ */ jsx322("div", { className: cn(selected && "font-medium"), children: option.label }) })
12317
+ children: /* @__PURE__ */ jsx322("div", { className: "flex-1", children: renderOption !== void 0 && renderOption !== null ? renderOption?.(option, { selected }) : /* @__PURE__ */ jsx322("div", { className: cn(selected && "font-medium"), children: option.label }) })
12228
12318
  },
12229
12319
  option.value
12230
12320
  );
@@ -12259,7 +12349,7 @@ import {
12259
12349
  useRef as useRef7,
12260
12350
  useEffect as useEffect11
12261
12351
  } from "react";
12262
- import { jsx as jsx323, jsxs as jsxs51 } from "react/jsx-runtime";
12352
+ import { jsx as jsx323, jsxs as jsxs52 } from "react/jsx-runtime";
12263
12353
  var TabsContext = createContext5(void 0);
12264
12354
  var useTabsContext = () => {
12265
12355
  const context = useContext5(TabsContext);
@@ -12349,7 +12439,7 @@ var TabsList = ({ className, children }) => {
12349
12439
  clearTimeout(timer);
12350
12440
  };
12351
12441
  }, [value, orientation, isInitialized]);
12352
- return /* @__PURE__ */ jsxs51(
12442
+ return /* @__PURE__ */ jsxs52(
12353
12443
  "div",
12354
12444
  {
12355
12445
  ref: listRef,