@algorithm-shift/design-system 1.2.56 → 1.2.57

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
@@ -27140,7 +27140,8 @@ var RadioInput = ({
27140
27140
  dataLabel,
27141
27141
  ...props
27142
27142
  }) => {
27143
- const options = (data || []).map((item) => ({
27143
+ const list = Array.isArray(data) ? data : [];
27144
+ const options = (list || []).map((item) => ({
27144
27145
  value: item[dataKey || "value"],
27145
27146
  label: item[dataLabel || "label"]
27146
27147
  }));
@@ -27182,8 +27183,9 @@ var MultiCheckbox = ({
27182
27183
  isEditable = true,
27183
27184
  isDisabled = false
27184
27185
  }) => {
27186
+ const list = Array.isArray(data) ? data : [];
27185
27187
  const [value, setValue] = useState2(propValue);
27186
- const options = (data || []).map((item) => ({
27188
+ const options = (list || []).map((item) => ({
27187
27189
  value: item[dataKey || "value"],
27188
27190
  label: item[dataLabel || "label"]
27189
27191
  }));
@@ -27441,7 +27443,7 @@ function SelectScrollDownButton({
27441
27443
  // src/components/Inputs/Dropdown/Dropdown.tsx
27442
27444
  import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
27443
27445
  var Dropdown = ({ className, style, ...props }) => {
27444
- const list = props.data || [];
27446
+ const list = Array.isArray(props?.data) ? props.data : [];
27445
27447
  const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
27446
27448
  const isEditable = props.isEditable ?? true;
27447
27449
  const isDisabled = props.isDisabled ?? false;