@firecms/ui 3.0.0-canary.118 → 3.0.0-canary.119

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.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("@radix-ui/react-collapsible"), require("clsx"), require("tailwind-merge"), require("date-fns/locale"), require("react-datepicker"), require("@radix-ui/react-checkbox"), require("material-icons/iconfont/filled.css"), require("@radix-ui/react-dialog"), require("react-dropzone"), require("@radix-ui/react-label"), require("react-fast-compare"), require("markdown-it"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-menubar"), require("cmdk"), require("@radix-ui/react-radio-group"), require("@radix-ui/react-select"), require("@radix-ui/react-separator"), require("react-dom"), require("@radix-ui/react-tooltip"), require("@radix-ui/react-tabs"), require("@radix-ui/react-popover")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react", "@radix-ui/react-collapsible", "clsx", "tailwind-merge", "date-fns/locale", "react-datepicker", "@radix-ui/react-checkbox", "material-icons/iconfont/filled.css", "@radix-ui/react-dialog", "react-dropzone", "@radix-ui/react-label", "react-fast-compare", "markdown-it", "@radix-ui/react-dropdown-menu", "@radix-ui/react-menubar", "cmdk", "@radix-ui/react-radio-group", "@radix-ui/react-select", "@radix-ui/react-separator", "react-dom", "@radix-ui/react-tooltip", "@radix-ui/react-tabs", "@radix-ui/react-popover"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["FireCMS UI"] = {}, global.jsxRuntime, global.React, global.Collapsible, global.clsx, global.tailwindMerge, global.locales, global.DatePicker, global.CheckboxPrimitive, null, global.DialogPrimitive, global.reactDropzone, global.LabelPrimitive, global.equal, global.MarkdownIt, global.DropdownMenu, global.MenubarPrimitive, global.cmdk, global.RadioGroupPrimitive, global.SelectPrimitive, global.SeparatorPrimitive, global.ReactDOM, global.TooltipPrimitive, global.TabsPrimitive, global.PopoverPrimitive));
3
- })(this, function(exports2, jsxRuntime, React, Collapsible, clsx, tailwindMerge, locales, DatePicker, CheckboxPrimitive, filled_css, DialogPrimitive, reactDropzone, LabelPrimitive, equal, MarkdownIt, DropdownMenu, MenubarPrimitive, cmdk, RadioGroupPrimitive, SelectPrimitive, SeparatorPrimitive, ReactDOM, TooltipPrimitive, TabsPrimitive, PopoverPrimitive) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("@radix-ui/react-collapsible"), require("clsx"), require("tailwind-merge"), require("date-fns/locale"), require("react-datepicker"), require("@radix-ui/react-checkbox"), require("material-icons/iconfont/filled.css"), require("@radix-ui/react-dialog"), require("react-dropzone"), require("@radix-ui/react-label"), require("react-fast-compare"), require("markdown-it"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-menubar"), require("cmdk"), require("@radix-ui/react-popover"), require("@radix-ui/react-separator"), require("@radix-ui/react-radio-group"), require("@radix-ui/react-select"), require("react-dom"), require("@radix-ui/react-tooltip"), require("@radix-ui/react-tabs")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react", "@radix-ui/react-collapsible", "clsx", "tailwind-merge", "date-fns/locale", "react-datepicker", "@radix-ui/react-checkbox", "material-icons/iconfont/filled.css", "@radix-ui/react-dialog", "react-dropzone", "@radix-ui/react-label", "react-fast-compare", "markdown-it", "@radix-ui/react-dropdown-menu", "@radix-ui/react-menubar", "cmdk", "@radix-ui/react-popover", "@radix-ui/react-separator", "@radix-ui/react-radio-group", "@radix-ui/react-select", "react-dom", "@radix-ui/react-tooltip", "@radix-ui/react-tabs"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["FireCMS UI"] = {}, global.jsxRuntime, global.React, global.Collapsible, global.clsx, global.tailwindMerge, global.locales, global.DatePicker, global.CheckboxPrimitive, null, global.DialogPrimitive, global.reactDropzone, global.LabelPrimitive, global.equal, global.MarkdownIt, global.DropdownMenu, global.MenubarPrimitive, global.cmdk, global.PopoverPrimitive, global.SeparatorPrimitive, global.RadioGroupPrimitive, global.SelectPrimitive, global.ReactDOM, global.TooltipPrimitive, global.TabsPrimitive));
3
+ })(this, function(exports2, jsxRuntime, React, Collapsible, clsx, tailwindMerge, locales, DatePicker, CheckboxPrimitive, filled_css, DialogPrimitive, reactDropzone, LabelPrimitive, equal, MarkdownIt, DropdownMenu, MenubarPrimitive, cmdk, PopoverPrimitive, SeparatorPrimitive, RadioGroupPrimitive, SelectPrimitive, ReactDOM, TooltipPrimitive, TabsPrimitive) {
4
4
  "use strict";
5
5
  function _interopNamespaceDefault(e) {
6
6
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -26,13 +26,13 @@
26
26
  const LabelPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(LabelPrimitive);
27
27
  const DropdownMenu__namespace = /* @__PURE__ */ _interopNamespaceDefault(DropdownMenu);
28
28
  const MenubarPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(MenubarPrimitive);
29
+ const PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
30
+ const SeparatorPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SeparatorPrimitive);
29
31
  const RadioGroupPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadioGroupPrimitive);
30
32
  const SelectPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SelectPrimitive);
31
- const SeparatorPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SeparatorPrimitive);
32
33
  const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
33
34
  const TooltipPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TooltipPrimitive);
34
35
  const TabsPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TabsPrimitive);
35
- const PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
36
36
  const focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
37
37
  const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-slate-100 focus:dark:bg-gray-800 focus:dark:bg-opacity-60";
38
38
  const focusedClasses = "z-30 outline-none ring-2 ring-primary ring-opacity-75 ring-offset-2 ring-offset-transparent ";
@@ -14842,7 +14842,7 @@
14842
14842
  if (!open) {
14843
14843
  const timeout = setTimeout(() => {
14844
14844
  setDisplayed(false);
14845
- }, 250);
14845
+ }, 150);
14846
14846
  return () => clearTimeout(timeout);
14847
14847
  } else {
14848
14848
  setDisplayed(true);
@@ -15208,6 +15208,8 @@
15208
15208
  trigger,
15209
15209
  open,
15210
15210
  defaultOpen,
15211
+ side,
15212
+ align,
15211
15213
  onOpenChange,
15212
15214
  portalContainer
15213
15215
  }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
@@ -15225,7 +15227,15 @@
15225
15227
  children: trigger
15226
15228
  }
15227
15229
  ),
15228
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Content, { className: cls(paperMixin, "shadow py-2 z-30"), children }) })
15230
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
15231
+ DropdownMenu__namespace.Content,
15232
+ {
15233
+ side,
15234
+ align,
15235
+ className: cls(paperMixin, focusedDisabled, "shadow py-2 z-30"),
15236
+ children
15237
+ }
15238
+ ) })
15229
15239
  ]
15230
15240
  }
15231
15241
  ));
@@ -15517,7 +15527,6 @@
15517
15527
  disabled,
15518
15528
  renderValue,
15519
15529
  renderValues,
15520
- includeFocusOutline = true,
15521
15530
  containerClassName,
15522
15531
  className,
15523
15532
  children,
@@ -15616,38 +15625,46 @@
15616
15625
  ]
15617
15626
  }
15618
15627
  ),
15619
- /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { open: openInternal, onOpenChange: setOpenInternal, children: /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
15620
- MultiSelectContext.Provider,
15628
+ /* @__PURE__ */ jsxRuntime.jsx(
15629
+ DialogPrimitive__namespace.Root,
15621
15630
  {
15622
- value: {
15623
- fieldValue: value,
15624
- setInputValue,
15625
- onValueChangeInternal
15626
- },
15627
- children: /* @__PURE__ */ jsxRuntime.jsx(
15628
- "div",
15631
+ open: openInternal,
15632
+ modal: true,
15633
+ onOpenChange: setOpenInternal,
15634
+ children: /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
15635
+ MultiSelectContext.Provider,
15629
15636
  {
15630
- ref: listRef,
15631
- className: "z-50 absolute overflow-auto outline-none",
15632
- style: {
15633
- pointerEvents: openInternal ? "auto" : "none",
15634
- top: (usedBoundingRect?.top ?? 0) + (usedBoundingRect?.height ?? 0),
15635
- left: usedBoundingRect?.left,
15636
- // right: boundingRect?.right,
15637
- width: usedBoundingRect?.width,
15638
- maxHeight
15637
+ value: {
15638
+ fieldValue: value,
15639
+ setInputValue,
15640
+ onValueChangeInternal
15639
15641
  },
15640
15642
  children: /* @__PURE__ */ jsxRuntime.jsx(
15641
- cmdk.Command.Group,
15643
+ "div",
15642
15644
  {
15643
- className: "mt-2 text-slate-900 dark:text-white animate-in z-50 border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-800 p-2 rounded-lg shadow-lg flex flex-col outline-none w-full",
15644
- children
15645
+ ref: listRef,
15646
+ className: "z-50 absolute overflow-auto outline-none",
15647
+ style: {
15648
+ pointerEvents: openInternal ? "auto" : "none",
15649
+ top: (usedBoundingRect?.top ?? 0) + (usedBoundingRect?.height ?? 0),
15650
+ left: usedBoundingRect?.left,
15651
+ // right: boundingRect?.right,
15652
+ width: usedBoundingRect?.width,
15653
+ maxHeight
15654
+ },
15655
+ children: /* @__PURE__ */ jsxRuntime.jsx(
15656
+ cmdk.Command.Group,
15657
+ {
15658
+ className: "mt-2 text-slate-900 dark:text-white animate-in z-50 border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-800 p-2 rounded-lg shadow-lg flex flex-col outline-none w-full",
15659
+ children
15660
+ }
15661
+ )
15645
15662
  }
15646
15663
  )
15647
15664
  }
15648
- )
15665
+ ) })
15649
15666
  }
15650
- ) }) })
15667
+ )
15651
15668
  ]
15652
15669
  }
15653
15670
  )
@@ -15682,6 +15699,305 @@
15682
15699
  }
15683
15700
  );
15684
15701
  }
15702
+ function Separator({ orientation, decorative }) {
15703
+ if (orientation === "horizontal")
15704
+ return /* @__PURE__ */ jsxRuntime.jsx(
15705
+ SeparatorPrimitive__namespace.Root,
15706
+ {
15707
+ decorative,
15708
+ orientation: "horizontal",
15709
+ className: "dark:bg-opacity-50 bg-opacity-50 dark:bg-gray-600 bg-gray-300 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-[8px]"
15710
+ }
15711
+ );
15712
+ else
15713
+ return /* @__PURE__ */ jsxRuntime.jsx(
15714
+ SeparatorPrimitive__namespace.Root,
15715
+ {
15716
+ className: "dark:bg-opacity-50 bg-opacity-50 dark:bg-gray-600 bg-gray-300 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px mx-[8px]",
15717
+ decorative,
15718
+ orientation: "vertical"
15719
+ }
15720
+ );
15721
+ }
15722
+ const NewMultiSelect = React__namespace.forwardRef(
15723
+ ({
15724
+ size,
15725
+ options,
15726
+ onValueChange,
15727
+ invisible,
15728
+ disabled,
15729
+ variant,
15730
+ defaultValue = [],
15731
+ placeholder = "Select options",
15732
+ animation = 0,
15733
+ maxCount = 3,
15734
+ modalPopover = false,
15735
+ asChild = false,
15736
+ className,
15737
+ ...props
15738
+ }, ref) => {
15739
+ const [selectedValues, setSelectedValues] = React__namespace.useState(defaultValue);
15740
+ const [isPopoverOpen, setIsPopoverOpen] = React__namespace.useState(false);
15741
+ React__namespace.useEffect(() => {
15742
+ setSelectedValues(defaultValue);
15743
+ }, [defaultValue]);
15744
+ const handleInputKeyDown = (event) => {
15745
+ if (event.key === "Enter") {
15746
+ setIsPopoverOpen(true);
15747
+ } else if (event.key === "Backspace" && !event.currentTarget.value) {
15748
+ const newSelectedValues = [...selectedValues];
15749
+ newSelectedValues.pop();
15750
+ setSelectedValues(newSelectedValues);
15751
+ onValueChange(newSelectedValues);
15752
+ }
15753
+ };
15754
+ const toggleOption = (value) => {
15755
+ const newSelectedValues = selectedValues.includes(value) ? selectedValues.filter((v) => v !== value) : [...selectedValues, value];
15756
+ setSelectedValues(newSelectedValues);
15757
+ onValueChange(newSelectedValues);
15758
+ };
15759
+ const handleClear = () => {
15760
+ setSelectedValues([]);
15761
+ onValueChange([]);
15762
+ };
15763
+ const handleTogglePopover = () => {
15764
+ setIsPopoverOpen((prev) => !prev);
15765
+ };
15766
+ const clearExtraOptions = () => {
15767
+ const newSelectedValues = selectedValues.slice(0, maxCount);
15768
+ setSelectedValues(newSelectedValues);
15769
+ onValueChange(newSelectedValues);
15770
+ };
15771
+ const toggleAll = () => {
15772
+ if (selectedValues.length === options.length) {
15773
+ handleClear();
15774
+ } else {
15775
+ const allValues = options.map((option) => option.value);
15776
+ setSelectedValues(allValues);
15777
+ onValueChange(allValues);
15778
+ }
15779
+ };
15780
+ return /* @__PURE__ */ jsxRuntime.jsxs(
15781
+ PopoverPrimitive__namespace.Root,
15782
+ {
15783
+ open: isPopoverOpen,
15784
+ onOpenChange: setIsPopoverOpen,
15785
+ modal: modalPopover,
15786
+ children: [
15787
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
15788
+ "button",
15789
+ {
15790
+ ref,
15791
+ ...props,
15792
+ onClick: handleTogglePopover,
15793
+ className: cls(
15794
+ size === "small" ? "min-h-[42px]" : "min-h-[64px]",
15795
+ "select-none rounded-md text-sm",
15796
+ invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
15797
+ disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
15798
+ "relative flex items-center",
15799
+ className
15800
+ ),
15801
+ children: selectedValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center w-full", children: [
15802
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center", children: [
15803
+ selectedValues.slice(0, maxCount).map((value) => {
15804
+ const option = options.find((o) => o.value === value);
15805
+ return /* @__PURE__ */ jsxRuntime.jsxs(
15806
+ Chip,
15807
+ {
15808
+ className: cls(
15809
+ "m-1 transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300",
15810
+ {
15811
+ "border-foreground/10 text-foreground bg-card hover:bg-card/80": variant === "default",
15812
+ "border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80": variant === "secondary",
15813
+ "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80": variant === "destructive"
15814
+ }
15815
+ ),
15816
+ style: { animationDuration: `${animation}s` },
15817
+ children: [
15818
+ option?.label,
15819
+ /* @__PURE__ */ jsxRuntime.jsx(
15820
+ CloseIcon,
15821
+ {
15822
+ size: "smallest",
15823
+ onClick: (event) => {
15824
+ event.stopPropagation();
15825
+ toggleOption(value);
15826
+ }
15827
+ }
15828
+ )
15829
+ ]
15830
+ },
15831
+ value
15832
+ );
15833
+ }),
15834
+ selectedValues.length > maxCount && /* @__PURE__ */ jsxRuntime.jsxs(
15835
+ Chip,
15836
+ {
15837
+ className: cls(
15838
+ "bg-transparent text-foreground border-foreground/1 hover:bg-transparent",
15839
+ "m-1 transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300",
15840
+ {
15841
+ "border-foreground/10 text-foreground bg-card hover:bg-card/80": variant === "default",
15842
+ "border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80": variant === "secondary",
15843
+ "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80": variant === "destructive"
15844
+ }
15845
+ ),
15846
+ style: { animationDuration: `${animation}s` },
15847
+ children: [
15848
+ `+ ${selectedValues.length - maxCount} more`,
15849
+ /* @__PURE__ */ jsxRuntime.jsx(
15850
+ CloseIcon,
15851
+ {
15852
+ size: "smallest",
15853
+ onClick: (event) => {
15854
+ event.stopPropagation();
15855
+ clearExtraOptions();
15856
+ }
15857
+ }
15858
+ )
15859
+ ]
15860
+ }
15861
+ )
15862
+ ] }),
15863
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
15864
+ /* @__PURE__ */ jsxRuntime.jsx(
15865
+ CloseIcon,
15866
+ {
15867
+ size: "small",
15868
+ onClick: (event) => {
15869
+ event.stopPropagation();
15870
+ handleClear();
15871
+ }
15872
+ }
15873
+ ),
15874
+ /* @__PURE__ */ jsxRuntime.jsx(
15875
+ Separator,
15876
+ {
15877
+ orientation: "vertical"
15878
+ }
15879
+ ),
15880
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(
15881
+ ExpandMoreIcon,
15882
+ {
15883
+ size: "small",
15884
+ className: cls("transition", isPopoverOpen ? "rotate-180" : "")
15885
+ }
15886
+ ) })
15887
+ ] })
15888
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full mx-auto", children: [
15889
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground mx-3", children: placeholder }),
15890
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(
15891
+ ExpandMoreIcon,
15892
+ {
15893
+ size: "small",
15894
+ className: cls("transition", isPopoverOpen ? "rotate-180" : "")
15895
+ }
15896
+ ) })
15897
+ ] })
15898
+ }
15899
+ ) }),
15900
+ /* @__PURE__ */ jsxRuntime.jsx(
15901
+ PopoverPrimitive__namespace.Content,
15902
+ {
15903
+ className: cls("z-50 relative overflow-hidden border bg-white dark:bg-gray-900 p-2 rounded-lg", defaultBorderMixin),
15904
+ align: "start",
15905
+ onEscapeKeyDown: () => setIsPopoverOpen(false),
15906
+ children: /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
15907
+ /* @__PURE__ */ jsxRuntime.jsx(
15908
+ cmdk.Command.Input,
15909
+ {
15910
+ className: cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4"),
15911
+ placeholder: "Search...",
15912
+ onKeyDown: handleInputKeyDown
15913
+ }
15914
+ ),
15915
+ /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
15916
+ /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { children: "No results found." }),
15917
+ /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Group, { children: [
15918
+ /* @__PURE__ */ jsxRuntime.jsxs(
15919
+ cmdk.Command.Item,
15920
+ {
15921
+ onSelect: toggleAll,
15922
+ className: cls(
15923
+ // (fieldValue ?? []).includes(value) ? "bg-slate-200 dark:bg-slate-950" : "",
15924
+ "cursor-pointer",
15925
+ "flex flex-row items-center gap-2",
15926
+ "ring-offset-transparent",
15927
+ "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2",
15928
+ "aria-[selected=true]:bg-slate-100 aria-[selected=true]:dark:bg-slate-900",
15929
+ "cursor-pointer p-1 rounded aria-[selected=true]:bg-slate-100 aria-[selected=true]:dark:bg-slate-900",
15930
+ className
15931
+ ),
15932
+ children: [
15933
+ /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: selectedValues.length === options.length, size: "small" }),
15934
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "(Select All)" })
15935
+ ]
15936
+ },
15937
+ "all"
15938
+ ),
15939
+ options.map((option) => {
15940
+ const isSelected = selectedValues.includes(option.value);
15941
+ return /* @__PURE__ */ jsxRuntime.jsxs(
15942
+ cmdk.Command.Item,
15943
+ {
15944
+ onSelect: () => toggleOption(option.value),
15945
+ className: cls(
15946
+ // (fieldValue ?? []).includes(value) ? "bg-slate-200 dark:bg-slate-950" : "",
15947
+ "cursor-pointer",
15948
+ "flex flex-row items-center gap-2",
15949
+ "ring-offset-transparent",
15950
+ "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2",
15951
+ "aria-[selected=true]:bg-slate-100 aria-[selected=true]:dark:bg-slate-900",
15952
+ "cursor-pointer p-1 rounded aria-[selected=true]:bg-slate-100 aria-[selected=true]:dark:bg-slate-900",
15953
+ className
15954
+ ),
15955
+ children: [
15956
+ /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isSelected, size: "small" }),
15957
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: option.label })
15958
+ ]
15959
+ },
15960
+ option.value
15961
+ );
15962
+ })
15963
+ ] }),
15964
+ /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Separator, {}),
15965
+ /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Group, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
15966
+ selectedValues.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15967
+ /* @__PURE__ */ jsxRuntime.jsx(
15968
+ cmdk.Command.Item,
15969
+ {
15970
+ onSelect: handleClear,
15971
+ className: "flex-1 justify-center cursor-pointer",
15972
+ children: "Clear"
15973
+ }
15974
+ ),
15975
+ /* @__PURE__ */ jsxRuntime.jsx(
15976
+ Separator,
15977
+ {
15978
+ orientation: "vertical"
15979
+ }
15980
+ )
15981
+ ] }),
15982
+ /* @__PURE__ */ jsxRuntime.jsx(
15983
+ cmdk.Command.Item,
15984
+ {
15985
+ onSelect: () => setIsPopoverOpen(false),
15986
+ className: "flex-1 justify-center cursor-pointer max-w-full",
15987
+ children: "Close"
15988
+ }
15989
+ )
15990
+ ] }) })
15991
+ ] })
15992
+ ] })
15993
+ }
15994
+ )
15995
+ ]
15996
+ }
15997
+ );
15998
+ }
15999
+ );
16000
+ NewMultiSelect.displayName = "MultiSelect";
15685
16001
  function Paper({
15686
16002
  children,
15687
16003
  style,
@@ -15946,7 +16262,7 @@
15946
16262
  SelectPrimitive__namespace.Content,
15947
16263
  {
15948
16264
  position,
15949
- className: "z-50 relative overflow-hidden border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-800 p-2 rounded-lg shadow-lg",
16265
+ className: cls("z-50 relative overflow-hidden border bg-white dark:bg-gray-900 p-2 rounded-lg", defaultBorderMixin),
15950
16266
  children: /* @__PURE__ */ jsxRuntime.jsx(
15951
16267
  SelectPrimitive__namespace.Viewport,
15952
16268
  {
@@ -15981,8 +16297,8 @@
15981
16297
  "w-full",
15982
16298
  "relative flex items-center p-2 rounded-md text-sm text-slate-700 dark:text-slate-300",
15983
16299
  "focus:z-10",
15984
- "data-[state=checked]:bg-slate-100 data-[state=checked]:dark:bg-slate-900 focus:bg-slate-100 dark:focus:bg-slate-950",
15985
- "data-[state=checked]:focus:bg-slate-200 data-[state=checked]:dark:focus:bg-slate-950",
16300
+ "data-[state=checked]:bg-slate-100 data-[state=checked]:dark:bg-slate-800 focus:bg-slate-100 dark:focus:bg-gray-950",
16301
+ "data-[state=checked]:focus:bg-slate-200 data-[state=checked]:dark:focus:bg-gray-950",
15986
16302
  disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
15987
16303
  "[&>*]:w-full",
15988
16304
  "overflow-visible",
@@ -16022,26 +16338,6 @@
16022
16338
  children
16023
16339
  ] });
16024
16340
  }
16025
- function Separator({ orientation, decorative }) {
16026
- if (orientation === "horizontal")
16027
- return /* @__PURE__ */ jsxRuntime.jsx(
16028
- SeparatorPrimitive__namespace.Root,
16029
- {
16030
- decorative,
16031
- orientation: "horizontal",
16032
- className: "dark:bg-opacity-50 bg-opacity-50 dark:bg-gray-600 bg-gray-300 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-[8px]"
16033
- }
16034
- );
16035
- else
16036
- return /* @__PURE__ */ jsxRuntime.jsx(
16037
- SeparatorPrimitive__namespace.Root,
16038
- {
16039
- className: "dark:bg-opacity-50 bg-opacity-50 dark:bg-gray-600 bg-gray-300 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px mx-[8px]",
16040
- decorative,
16041
- orientation: "vertical"
16042
- }
16043
- );
16044
- }
16045
16341
  const Sheet = ({
16046
16342
  children,
16047
16343
  side = "right",
@@ -19001,6 +19297,7 @@
19001
19297
  exports2.NetworkWifiLockedIcon = NetworkWifiLockedIcon;
19002
19298
  exports2.NeurologyIcon = NeurologyIcon;
19003
19299
  exports2.NewLabelIcon = NewLabelIcon;
19300
+ exports2.NewMultiSelect = NewMultiSelect;
19004
19301
  exports2.NewReleasesIcon = NewReleasesIcon;
19005
19302
  exports2.NewWindowIcon = NewWindowIcon;
19006
19303
  exports2.NewsIcon = NewsIcon;