@algorithm-shift/design-system 1.2.75 → 1.2.76

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.mjs CHANGED
@@ -28503,6 +28503,8 @@ var MultiSelect = ({
28503
28503
  disabled,
28504
28504
  searchable = true,
28505
28505
  className = "",
28506
+ dataKey = "value",
28507
+ dataLabel = "label",
28506
28508
  ...props
28507
28509
  }) => {
28508
28510
  const [open, setOpen] = React7.useState(false);
@@ -28520,6 +28522,10 @@ var MultiSelect = ({
28520
28522
  () => data.filter((opt) => value.includes(opt.value)).map((opt) => opt.label),
28521
28523
  [data, value]
28522
28524
  );
28525
+ const options = data.map((item) => ({
28526
+ value: item[dataKey],
28527
+ label: item[dataLabel]
28528
+ }));
28523
28529
  return /* @__PURE__ */ jsxs28(Popover, { open, onOpenChange: setOpen, children: [
28524
28530
  /* @__PURE__ */ jsx48(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs28(
28525
28531
  Button,
@@ -28548,7 +28554,7 @@ var MultiSelect = ({
28548
28554
  searchable && /* @__PURE__ */ jsx48(CommandInput, { placeholder: "Search..." }),
28549
28555
  /* @__PURE__ */ jsxs28(CommandList, { children: [
28550
28556
  /* @__PURE__ */ jsx48(CommandEmpty, { children: "No options found." }),
28551
- /* @__PURE__ */ jsx48(CommandGroup, { children: data.map((opt) => {
28557
+ /* @__PURE__ */ jsx48(CommandGroup, { children: options.map((opt) => {
28552
28558
  const isSelected = value.includes(opt.value);
28553
28559
  return /* @__PURE__ */ jsx48(
28554
28560
  "div",