@luscii-healthtech/web-ui 55.2.9 → 55.2.10

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.
@@ -4635,6 +4635,13 @@ function generateCustomStyles(hasError) {
4635
4635
  menu: (baseStyles) => Object.assign(Object.assign({}, baseStyles), { zIndex: 20 })
4636
4636
  };
4637
4637
  }
4638
+ function getDataAttributes(selectProps) {
4639
+ return Object.fromEntries(Object.entries(selectProps).filter(([prop]) => prop.includes("data-")));
4640
+ }
4641
+ const CustomContainer = (_a) => {
4642
+ var { children } = _a, containerProps = __rest(_a, ["children"]);
4643
+ return jsxRuntime.jsx(ReactSelect.components.SelectContainer, Object.assign({}, containerProps, { innerProps: Object.assign(Object.assign({}, containerProps.innerProps), getDataAttributes(containerProps.selectProps)), children }));
4644
+ };
4638
4645
  const Select = React__namespace.default.forwardRef((_a, innerRef) => {
4639
4646
  var _b, _c;
4640
4647
  var { isError = false, styles, options, onChange, value, width = "full", isMulti, className, skipValueProcessing, isCreatable = false, onCreateOption, formatCreateLabel } = _a, otherProps = __rest(_a, ["isError", "styles", "options", "onChange", "value", "width", "isMulti", "className", "skipValueProcessing", "isCreatable", "onCreateOption", "formatCreateLabel"]);
@@ -4664,19 +4671,6 @@ const Select = React__namespace.default.forwardRef((_a, innerRef) => {
4664
4671
  const flatmappedOptions = !options ? [] : isOptionsGrouped ? options.flatMap((g) => g.options) : options;
4665
4672
  const onChangeWrapped = !onChange ? void 0 : isMulti ? (val, a) => onChange(val.map((v) => v.value), a) : (val, a) => onChange(val === null || val === void 0 ? void 0 : val.value, a);
4666
4673
  const valueWrapped = !value || !options ? value : isMulti ? flatmappedOptions.filter((o) => value.includes(o.value)) : flatmappedOptions.find((o) => o.value === value);
4667
- const getDataAttributes = () => {
4668
- const dataProps = {};
4669
- for (const prop in otherProps) {
4670
- if (prop.includes("data-")) {
4671
- dataProps[prop] = otherProps[prop];
4672
- }
4673
- }
4674
- return dataProps;
4675
- };
4676
- const CustomContainer = (_a2) => {
4677
- var { children } = _a2, commonProps2 = __rest(_a2, ["children"]);
4678
- return jsxRuntime.jsx(ReactSelect.components.SelectContainer, Object.assign({}, commonProps2, { innerProps: Object.assign({}, commonProps2.innerProps, Object.assign({}, getDataAttributes())), children }));
4679
- };
4680
4674
  const commonProps = Object.assign(Object.assign({}, otherProps), {
4681
4675
  ref: mergedRef,
4682
4676
  styles: mergedStyles,