@northlight/ui 2.9.1 → 2.9.2
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/umd/northlight.js
CHANGED
|
@@ -5336,16 +5336,24 @@
|
|
|
5336
5336
|
}
|
|
5337
5337
|
return target;
|
|
5338
5338
|
};
|
|
5339
|
-
function getComponents(
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.MultiValueContainer, __spreadValues$W({}, props), props.selectProps.customTag(props.data)) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.MultiValueContainer, __spreadValues$W({}, props)),
|
|
5339
|
+
function getComponents({
|
|
5340
|
+
defaultControl = true
|
|
5341
|
+
}) {
|
|
5342
|
+
const control = defaultControl ? {} : {
|
|
5344
5343
|
Control: (_a) => {
|
|
5345
|
-
var _b = _a, {
|
|
5344
|
+
var _b = _a, {
|
|
5345
|
+
children
|
|
5346
|
+
} = _b, props = __objRest$G(_b, [
|
|
5347
|
+
"children"
|
|
5348
|
+
]);
|
|
5346
5349
|
return props.selectProps.leftIcon ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$W({}, props), /* @__PURE__ */ React.createElement(react.HStack, { w: "full", pl: "2" }, /* @__PURE__ */ React.createElement(Icon$1, { as: props.selectProps.leftIcon }), /* @__PURE__ */ React.createElement(react.HStack, { w: "full", justify: "space-between" }, children))) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$W({}, props), children);
|
|
5347
5350
|
}
|
|
5348
5351
|
};
|
|
5352
|
+
return __spreadValues$W({
|
|
5353
|
+
DropdownIndicator: (props) => props.selectProps.icon ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.DropdownIndicator, __spreadValues$W({}, props), /* @__PURE__ */ React.createElement(Icon$1, { as: props.selectProps.icon })) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.DropdownIndicator, __spreadValues$W({}, props)),
|
|
5354
|
+
Option: (props) => props.selectProps.customOption ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Option, __spreadValues$W({}, props), props.selectProps.customOption(props.data)) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Option, __spreadValues$W({}, props)),
|
|
5355
|
+
MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.MultiValueContainer, __spreadValues$W({}, props), props.selectProps.customTag(props.data)) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.MultiValueContainer, __spreadValues$W({}, props))
|
|
5356
|
+
}, control);
|
|
5349
5357
|
}
|
|
5350
5358
|
|
|
5351
5359
|
var __defProp$V = Object.defineProperty;
|
|
@@ -5426,7 +5434,7 @@
|
|
|
5426
5434
|
isMulti,
|
|
5427
5435
|
value: ramda.is(Array, value) ? value : []
|
|
5428
5436
|
});
|
|
5429
|
-
const customComponents = getComponents();
|
|
5437
|
+
const customComponents = getComponents({ defaultControl: true });
|
|
5430
5438
|
const simpleFilter = (query) => ramda.filter(
|
|
5431
5439
|
(option) => ramda.test(new RegExp(ramda.toLower(query), "g"), ramda.toLower(option.label)),
|
|
5432
5440
|
defaultOptions
|
|
@@ -10923,7 +10931,7 @@
|
|
|
10923
10931
|
isMulti,
|
|
10924
10932
|
value: ramda.is(Array, value) ? value : []
|
|
10925
10933
|
});
|
|
10926
|
-
const customComponents = getComponents();
|
|
10934
|
+
const customComponents = getComponents({ defaultControl: false });
|
|
10927
10935
|
const prevOptions = React.useRef(
|
|
10928
10936
|
options
|
|
10929
10937
|
);
|