@embedreach/components 0.2.47 → 0.2.49

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.
@@ -77646,23 +77646,20 @@ function Calendar({
77646
77646
  nav_button_next: "absolute right-1",
77647
77647
  table: "w-full border-collapse space-y-1",
77648
77648
  head_row: "flex",
77649
- head_cell: "text-muted-foreground! rounded-md w-8 font-normal text-[0.8rem]",
77649
+ head_cell: "text-[#6b7280] rounded-md w-8 font-normal text-[0.8rem]",
77650
77650
  row: "flex w-full mt-2",
77651
- cell: cn$1(
77652
- "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent! [&:has([aria-selected].day-outside)]:bg-accent/50! [&:has([aria-selected].day-range-end)]:rounded-r-md",
77653
- props2.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
77654
- ),
77651
+ cell: "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-[#f1f5f9] [&:has([aria-selected].day-outside)]:bg-[#f1f5f9]/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
77655
77652
  day: cn$1(
77656
77653
  buttonVariants({ variant: "ghost" }),
77657
77654
  "h-8 w-8 p-0 font-normal aria-selected:opacity-100"
77658
77655
  ),
77659
77656
  day_range_start: "day-range-start",
77660
77657
  day_range_end: "day-range-end",
77661
- day_selected: "bg-primary! text-primary-foreground! hover:bg-primary! hover:text-primary-foreground! focus:bg-primary! focus:text-primary-foreground!",
77662
- day_today: "bg-accent! text-accent-foreground!",
77663
- day_outside: "day-outside text-muted-foreground! aria-selected:bg-accent/50! aria-selected:text-muted-foreground!",
77664
- day_disabled: "text-muted-foreground! opacity-50",
77665
- day_range_middle: "aria-selected:bg-accent! aria-selected:text-accent-foreground!",
77658
+ day_selected: "!bg-black !text-gray-200 hover:!bg-black hover:!text-gray-200 focus:!bg-black focus:!text-black",
77659
+ day_today: "bg-gray-200 text-black",
77660
+ day_outside: "day-outside text-[#94a3b8] aria-selected:bg-[#f1f5f9]/50 aria-selected:text-[#94a3b8]",
77661
+ day_disabled: "text-[#94a3b8] opacity-50",
77662
+ day_range_middle: "aria-selected:bg-[#f1f5f9] aria-selected:text-black",
77666
77663
  day_hidden: "invisible",
77667
77664
  ...classNames
77668
77665
  },
@@ -77816,7 +77813,17 @@ const SetScheduleTime = ({ setScheduleTime, setTimezone, timezone, scheduleTime,
77816
77813
  today.setHours(0, 0, 0, 0);
77817
77814
  return date2 < today;
77818
77815
  },
77819
- initialFocus: true
77816
+ initialFocus: true,
77817
+ classNames: {
77818
+ cell: "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-[#f1f5f9] [&:has([aria-selected].day-outside)]:bg-[#f1f5f9]/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
77819
+ day_range_start: "day-range-start",
77820
+ day_range_end: "day-range-end",
77821
+ day_selected: "!bg-black !text-gray-200 hover:!bg-black hover:!text-gray-200 focus:!bg-black focus:!text-black",
77822
+ day_today: "bg-gray-200 text-black",
77823
+ day_outside: "day-outside text-[#94a3b8] aria-selected:bg-[#f1f5f9]/50 aria-selected:text-[#94a3b8]",
77824
+ day_disabled: "text-[#94a3b8] opacity-50",
77825
+ day_range_middle: "aria-selected:bg-[#f1f5f9] aria-selected:text-black"
77826
+ }
77820
77827
  }
77821
77828
  ) })
77822
77829
  ] }),
@@ -79443,7 +79450,8 @@ function MultiSelectDialog({
79443
79450
  searchPlaceholder = "Search items...",
79444
79451
  emptyMessage = "No items found",
79445
79452
  handleSearchInput,
79446
- extraCommandItems = []
79453
+ extraCommandItems = [],
79454
+ disabled = false
79447
79455
  }) {
79448
79456
  const [open, setOpen] = React.useState(false);
79449
79457
  const [searchQuery, setSearchQuery] = React.useState("");
@@ -79464,6 +79472,7 @@ function MultiSelectDialog({
79464
79472
  });
79465
79473
  }, [selectedValues, options]);
79466
79474
  const handleItemToggle = (optionValue) => {
79475
+ if (disabled) return;
79467
79476
  setTempSelected((prev) => {
79468
79477
  const isSelected = prev.includes(optionValue);
79469
79478
  if (isSelected) {
@@ -79477,6 +79486,7 @@ function MultiSelectDialog({
79477
79486
  });
79478
79487
  };
79479
79488
  const handleSelectAll = () => {
79489
+ if (disabled) return;
79480
79490
  const availableOptions = filteredOptions.filter(
79481
79491
  (option) => !tempSelected.includes(option.value)
79482
79492
  );
@@ -79484,20 +79494,24 @@ function MultiSelectDialog({
79484
79494
  setTempSelected((prev) => [...prev, ...toAdd.map((opt) => opt.value)]);
79485
79495
  };
79486
79496
  const handleDeselectAll = () => {
79497
+ if (disabled) return;
79487
79498
  const filteredValues = new Set(filteredOptions.map((option) => option.value));
79488
79499
  setTempSelected((prev) => prev.filter((item) => !filteredValues.has(item)));
79489
79500
  };
79490
79501
  const handleApply = () => {
79502
+ if (disabled) return;
79491
79503
  onValueChange(tempSelected);
79492
79504
  setSelectedValues(tempSelected);
79493
79505
  setOpen(false);
79494
79506
  };
79495
79507
  const handleCancel = () => {
79508
+ if (disabled) return;
79496
79509
  setTempSelected(selectedValues);
79497
79510
  setSearchQuery("");
79498
79511
  setOpen(false);
79499
79512
  };
79500
79513
  const handleSearchKeyDown = (e4) => {
79514
+ if (disabled) return;
79501
79515
  if (e4.key === "Enter" && searchQuery.trim() && handleSearchInput) {
79502
79516
  e4.preventDefault();
79503
79517
  handleSearchInput(searchQuery.trim());
@@ -79522,6 +79536,7 @@ function MultiSelectDialog({
79522
79536
  {
79523
79537
  variant: "outline",
79524
79538
  className: "w-full justify-between text-left font-normal h-9 p-3",
79539
+ disabled,
79525
79540
  children: [
79526
79541
  /* @__PURE__ */ jsx("div", { className: "flex flex-nowrap items-center gap-1 max-w-[70%]", children: selectedDisplay.length === 0 ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: placeholder }) : selectedDisplay.length <= 2 ? selectedDisplay.map((item) => /* @__PURE__ */ jsx(
79527
79542
  Badge,
@@ -79572,7 +79587,8 @@ function MultiSelectDialog({
79572
79587
  value: searchQuery,
79573
79588
  onChange: (e4) => setSearchQuery(e4.target.value),
79574
79589
  onKeyDown: handleSearchKeyDown,
79575
- className: "pl-10 h-11"
79590
+ className: "pl-10 h-11",
79591
+ disabled
79576
79592
  }
79577
79593
  ),
79578
79594
  handleSearchInput && searchQuery.trim() && /* @__PURE__ */ jsx("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ jsx(
@@ -79582,9 +79598,11 @@ function MultiSelectDialog({
79582
79598
  variant: "ghost",
79583
79599
  className: "h-6 w-6 p-0",
79584
79600
  onClick: () => {
79601
+ if (disabled) return;
79585
79602
  handleSearchInput(searchQuery.trim());
79586
79603
  setSearchQuery("");
79587
79604
  },
79605
+ disabled,
79588
79606
  children: /* @__PURE__ */ jsx(IconDefinitions.PlusIcon, { className: "h-3 w-3" })
79589
79607
  }
79590
79608
  ) })
@@ -79604,7 +79622,7 @@ function MultiSelectDialog({
79604
79622
  variant: "ghost",
79605
79623
  size: "sm",
79606
79624
  onClick: handleSelectAll,
79607
- disabled: !canSelectMore || filteredSelectedCount === filteredOptions.length,
79625
+ disabled: disabled || !canSelectMore || filteredSelectedCount === filteredOptions.length,
79608
79626
  className: "h-8 text-xs",
79609
79627
  children: "Select All"
79610
79628
  }
@@ -79615,7 +79633,7 @@ function MultiSelectDialog({
79615
79633
  variant: "ghost",
79616
79634
  size: "sm",
79617
79635
  onClick: handleDeselectAll,
79618
- disabled: filteredSelectedCount === 0,
79636
+ disabled: disabled || filteredSelectedCount === 0,
79619
79637
  className: "h-8 text-xs",
79620
79638
  children: "Clear All"
79621
79639
  }
@@ -79638,9 +79656,11 @@ function MultiSelectDialog({
79638
79656
  size: "sm",
79639
79657
  className: "mt-3",
79640
79658
  onClick: () => {
79659
+ if (disabled) return;
79641
79660
  handleSearchInput(searchQuery.trim());
79642
79661
  setSearchQuery("");
79643
79662
  },
79663
+ disabled,
79644
79664
  children: [
79645
79665
  /* @__PURE__ */ jsx(IconDefinitions.PlusIcon, { className: "h-3 w-3 mr-1" }),
79646
79666
  'Add "',
@@ -79651,7 +79671,7 @@ function MultiSelectDialog({
79651
79671
  )
79652
79672
  ] }) : filteredOptions.map((option) => {
79653
79673
  const isSelected = tempSelected.includes(option.value);
79654
- const isDisabled = !isSelected && !canSelectMore;
79674
+ const isDisabled = disabled || !isSelected && !canSelectMore;
79655
79675
  return /* @__PURE__ */ jsxs(
79656
79676
  CommandItem,
79657
79677
  {
@@ -79677,12 +79697,22 @@ function MultiSelectDialog({
79677
79697
  ] }) }) }),
79678
79698
  /* @__PURE__ */ jsx(Separator, {}),
79679
79699
  /* @__PURE__ */ jsx("div", { className: "p-6 pt-4", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
79680
- /* @__PURE__ */ jsx(Button$1, { variant: "outline", onClick: handleCancel, className: "flex-1", children: "Cancel" }),
79700
+ /* @__PURE__ */ jsx(
79701
+ Button$1,
79702
+ {
79703
+ variant: "outline",
79704
+ onClick: handleCancel,
79705
+ className: "flex-1",
79706
+ disabled,
79707
+ children: "Cancel"
79708
+ }
79709
+ ),
79681
79710
  /* @__PURE__ */ jsxs(
79682
79711
  Button$1,
79683
79712
  {
79684
79713
  onClick: handleApply,
79685
79714
  className: "flex-1 bg-primary hover:bg-primary/90",
79715
+ disabled,
79686
79716
  children: [
79687
79717
  "Apply (",
79688
79718
  selectedCount,