@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/es/northlight.mjs
CHANGED
|
@@ -5371,16 +5371,24 @@ var __objRest$G = (source, exclude) => {
|
|
|
5371
5371
|
}
|
|
5372
5372
|
return target;
|
|
5373
5373
|
};
|
|
5374
|
-
function getComponents(
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$W({}, props), props.selectProps.customTag(props.data)) : /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$W({}, props)),
|
|
5374
|
+
function getComponents({
|
|
5375
|
+
defaultControl = true
|
|
5376
|
+
}) {
|
|
5377
|
+
const control = defaultControl ? {} : {
|
|
5379
5378
|
Control: (_a) => {
|
|
5380
|
-
var _b = _a, {
|
|
5379
|
+
var _b = _a, {
|
|
5380
|
+
children
|
|
5381
|
+
} = _b, props = __objRest$G(_b, [
|
|
5382
|
+
"children"
|
|
5383
|
+
]);
|
|
5381
5384
|
return props.selectProps.leftIcon ? /* @__PURE__ */ React.createElement(chakraComponents.Control, __spreadValues$W({}, props), /* @__PURE__ */ React.createElement(HStack, { w: "full", pl: "2" }, /* @__PURE__ */ React.createElement(Icon$1, { as: props.selectProps.leftIcon }), /* @__PURE__ */ React.createElement(HStack, { w: "full", justify: "space-between" }, children))) : /* @__PURE__ */ React.createElement(chakraComponents.Control, __spreadValues$W({}, props), children);
|
|
5382
5385
|
}
|
|
5383
5386
|
};
|
|
5387
|
+
return __spreadValues$W({
|
|
5388
|
+
DropdownIndicator: (props) => props.selectProps.icon ? /* @__PURE__ */ React.createElement(chakraComponents.DropdownIndicator, __spreadValues$W({}, props), /* @__PURE__ */ React.createElement(Icon$1, { as: props.selectProps.icon })) : /* @__PURE__ */ React.createElement(chakraComponents.DropdownIndicator, __spreadValues$W({}, props)),
|
|
5389
|
+
Option: (props) => props.selectProps.customOption ? /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$W({}, props), props.selectProps.customOption(props.data)) : /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$W({}, props)),
|
|
5390
|
+
MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$W({}, props), props.selectProps.customTag(props.data)) : /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$W({}, props))
|
|
5391
|
+
}, control);
|
|
5384
5392
|
}
|
|
5385
5393
|
|
|
5386
5394
|
var __defProp$V = Object.defineProperty;
|
|
@@ -5461,7 +5469,7 @@ const SearchBar = forwardRef$1(
|
|
|
5461
5469
|
isMulti,
|
|
5462
5470
|
value: is(Array, value) ? value : []
|
|
5463
5471
|
});
|
|
5464
|
-
const customComponents = getComponents();
|
|
5472
|
+
const customComponents = getComponents({ defaultControl: true });
|
|
5465
5473
|
const simpleFilter = (query) => filter(
|
|
5466
5474
|
(option) => test(new RegExp(toLower(query), "g"), toLower(option.label)),
|
|
5467
5475
|
defaultOptions
|
|
@@ -10958,7 +10966,7 @@ function Select(_a) {
|
|
|
10958
10966
|
isMulti,
|
|
10959
10967
|
value: is(Array, value) ? value : []
|
|
10960
10968
|
});
|
|
10961
|
-
const customComponents = getComponents();
|
|
10969
|
+
const customComponents = getComponents({ defaultControl: false });
|
|
10962
10970
|
const prevOptions = useRef(
|
|
10963
10971
|
options
|
|
10964
10972
|
);
|