@northlight/ui 2.25.1 → 2.26.1
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.d.ts +9 -4
- package/dist/es/northlight.js +112 -96
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +115 -95
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +2 -2
package/dist/umd/northlight.cjs
CHANGED
|
@@ -3997,91 +3997,94 @@
|
|
|
3997
3997
|
radii: borderRadius,
|
|
3998
3998
|
borders: borderWidth,
|
|
3999
3999
|
opacity
|
|
4000
|
-
}, isReadOnly }) =>
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
minWidth: sizing["44"],
|
|
4006
|
-
paddingInlineStart: spacing["padding-inline"].input.default,
|
|
4007
|
-
paddingInlineEnd: spacing["padding-inline"].input.default,
|
|
4008
|
-
WebkitPaddingStart: spacing["padding-inline"].input.default,
|
|
4009
|
-
WebkitPaddingEnd: spacing["padding-inline"].input.default,
|
|
4010
|
-
color: color.text.default,
|
|
4011
|
-
bg: color.background.input["outline-default"],
|
|
4012
|
-
borderWidth: borderWidth.input.default,
|
|
4013
|
-
borderColor: color.border.input.default,
|
|
4014
|
-
paddingRight: spacing.paddingRight["number-input"].field,
|
|
4015
|
-
_hover: {
|
|
4016
|
-
bg: color.background.input["outline-hover"],
|
|
4017
|
-
borderColor: color.border.input["default-hover"]
|
|
4018
|
-
},
|
|
4019
|
-
_focusVisible: {
|
|
4020
|
-
bg: color.background.input["outline-focus"],
|
|
4021
|
-
borderColor: color.border.input.focus,
|
|
4022
|
-
boxShadow: `0 0 0 1px ${color.border.textarea.focus}`
|
|
4023
|
-
},
|
|
4024
|
-
_invalid: {
|
|
4025
|
-
bg: color.background.input["outline-error"],
|
|
4026
|
-
borderColor: color.border.input.error,
|
|
4027
|
-
boxShadow: `0 0 0 1px ${color.border.input.error}`
|
|
4028
|
-
},
|
|
4029
|
-
_disabled: {
|
|
4030
|
-
bg: color.background.input["outline-disabled"],
|
|
4031
|
-
opacity: opacity.input.disabled,
|
|
4032
|
-
borderColor: color.border.input.disabled
|
|
4000
|
+
}, isReadOnly, minWidth, minW }) => {
|
|
4001
|
+
var _a;
|
|
4002
|
+
return {
|
|
4003
|
+
root: {
|
|
4004
|
+
borderRadius: borderRadius.input.outline
|
|
4033
4005
|
},
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
width: "auto",
|
|
4046
|
-
paddingRight: spacing.paddingRight["number-input"].stepper
|
|
4047
|
-
},
|
|
4048
|
-
stepper: {
|
|
4049
|
-
_first: {
|
|
4050
|
-
border: "none",
|
|
4051
|
-
borderTopRightRadius: borderRadius["input-stepper"].default,
|
|
4052
|
-
borderRadius: borderRadius["input-stepper"].default,
|
|
4053
|
-
bg: color.background["input-stepper"].default,
|
|
4054
|
-
opacity: isReadOnly ? opacity.input.disabled : "auto",
|
|
4006
|
+
field: {
|
|
4007
|
+
minWidth: (_a = minWidth != null ? minWidth : minW) != null ? _a : sizing["44"],
|
|
4008
|
+
paddingInlineStart: spacing["padding-inline"].input.default,
|
|
4009
|
+
paddingInlineEnd: spacing["padding-inline"].input.default,
|
|
4010
|
+
WebkitPaddingStart: spacing["padding-inline"].input.default,
|
|
4011
|
+
WebkitPaddingEnd: spacing["padding-inline"].input.default,
|
|
4012
|
+
color: color.text.default,
|
|
4013
|
+
bg: color.background.input["outline-default"],
|
|
4014
|
+
borderWidth: borderWidth.input.default,
|
|
4015
|
+
borderColor: color.border.input.default,
|
|
4016
|
+
paddingRight: spacing.paddingRight["number-input"].field,
|
|
4055
4017
|
_hover: {
|
|
4056
|
-
bg:
|
|
4018
|
+
bg: color.background.input["outline-hover"],
|
|
4019
|
+
borderColor: color.border.input["default-hover"]
|
|
4057
4020
|
},
|
|
4058
|
-
|
|
4059
|
-
bg: color.background["
|
|
4021
|
+
_focusVisible: {
|
|
4022
|
+
bg: color.background.input["outline-focus"],
|
|
4023
|
+
borderColor: color.border.input.focus,
|
|
4024
|
+
boxShadow: `0 0 0 1px ${color.border.textarea.focus}`
|
|
4025
|
+
},
|
|
4026
|
+
_invalid: {
|
|
4027
|
+
bg: color.background.input["outline-error"],
|
|
4028
|
+
borderColor: color.border.input.error,
|
|
4029
|
+
boxShadow: `0 0 0 1px ${color.border.input.error}`
|
|
4060
4030
|
},
|
|
4061
4031
|
_disabled: {
|
|
4062
|
-
bg: color.background["
|
|
4063
|
-
|
|
4032
|
+
bg: color.background.input["outline-disabled"],
|
|
4033
|
+
opacity: opacity.input.disabled,
|
|
4034
|
+
borderColor: color.border.input.disabled
|
|
4035
|
+
},
|
|
4036
|
+
_readOnly: {
|
|
4037
|
+
_focusVisible: {
|
|
4038
|
+
borderColor: color.border.input.readonly,
|
|
4039
|
+
boxShadow: "none"
|
|
4040
|
+
},
|
|
4041
|
+
_hover: {
|
|
4042
|
+
borderColor: color.border.input.readonly
|
|
4043
|
+
}
|
|
4064
4044
|
}
|
|
4065
4045
|
},
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4046
|
+
stepperGroup: {
|
|
4047
|
+
width: "auto",
|
|
4048
|
+
paddingRight: spacing.paddingRight["number-input"].stepper
|
|
4049
|
+
},
|
|
4050
|
+
stepper: {
|
|
4051
|
+
_first: {
|
|
4052
|
+
border: "none",
|
|
4053
|
+
borderTopRightRadius: borderRadius["input-stepper"].default,
|
|
4054
|
+
borderRadius: borderRadius["input-stepper"].default,
|
|
4055
|
+
bg: color.background["input-stepper"].default,
|
|
4056
|
+
opacity: isReadOnly ? opacity.input.disabled : "auto",
|
|
4057
|
+
_hover: {
|
|
4058
|
+
bg: isReadOnly ? "none" : color.background["input-stepper"].hover
|
|
4059
|
+
},
|
|
4060
|
+
_active: {
|
|
4061
|
+
bg: color.background["input-stepper"].active
|
|
4062
|
+
},
|
|
4063
|
+
_disabled: {
|
|
4064
|
+
bg: color.background["input-stepper"].disabled,
|
|
4065
|
+
color: color.icon["input-stepper"].disabled
|
|
4066
|
+
}
|
|
4077
4067
|
},
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4068
|
+
_last: {
|
|
4069
|
+
border: "none",
|
|
4070
|
+
bg: color.background["input-stepper"].default,
|
|
4071
|
+
borderBottomRightRadius: borderRadius["input-stepper"].default,
|
|
4072
|
+
borderRadius: borderRadius["input-stepper"].default,
|
|
4073
|
+
opacity: isReadOnly ? opacity.input.disabled : "auto",
|
|
4074
|
+
_hover: {
|
|
4075
|
+
bg: isReadOnly ? "none" : color.background["input-stepper"].hover
|
|
4076
|
+
},
|
|
4077
|
+
_active: {
|
|
4078
|
+
bg: color.background["input-stepper"].active
|
|
4079
|
+
},
|
|
4080
|
+
_disabled: {
|
|
4081
|
+
bg: color.background["input-stepper"].disabled,
|
|
4082
|
+
color: color.icon["input-stepper"].disabled
|
|
4083
|
+
}
|
|
4081
4084
|
}
|
|
4082
4085
|
}
|
|
4083
|
-
}
|
|
4084
|
-
}
|
|
4086
|
+
};
|
|
4087
|
+
}
|
|
4085
4088
|
};
|
|
4086
4089
|
|
|
4087
4090
|
const NotificationIconButton$1 = {
|
|
@@ -8913,17 +8916,24 @@
|
|
|
8913
8916
|
}
|
|
8914
8917
|
return target;
|
|
8915
8918
|
};
|
|
8916
|
-
function getComponents() {
|
|
8917
|
-
return
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8919
|
+
function getComponents(components) {
|
|
8920
|
+
return ramda.merge(
|
|
8921
|
+
{
|
|
8922
|
+
Menu: (props) => /* @__PURE__ */ React.createElement(react.Box, { "data-testid": "select-menu-wrapper-test-id" }, /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Menu, __spreadValues$12({}, props), props.children)),
|
|
8923
|
+
DropdownIndicator: (props) => props.selectProps.icon ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.DropdownIndicator, __spreadValues$12({}, props), /* @__PURE__ */ React.createElement(Icon$1, { as: props.selectProps.icon })) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.DropdownIndicator, __spreadValues$12({}, props)),
|
|
8924
|
+
Option: (props) => props.selectProps.customOption ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Option, __spreadValues$12({}, props), props.selectProps.customOption(props.data)) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Option, __spreadValues$12({}, props)),
|
|
8925
|
+
MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.MultiValueContainer, __spreadValues$12({}, props), props.selectProps.customTag(props.data)) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.MultiValueContainer, __spreadValues$12({}, props)),
|
|
8926
|
+
Control: (_a) => {
|
|
8927
|
+
var _b = _a, {
|
|
8928
|
+
children
|
|
8929
|
+
} = _b, props = __objRest$R(_b, [
|
|
8930
|
+
"children"
|
|
8931
|
+
]);
|
|
8932
|
+
return props.selectProps.leftComponent ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$12({}, props), /* @__PURE__ */ React.createElement(react.HStack, { w: "full", pl: "2" }, props.selectProps.leftComponent, /* @__PURE__ */ React.createElement(react.HStack, { w: "full", justify: "space-between" }, children))) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$12({}, props), children);
|
|
8933
|
+
}
|
|
8934
|
+
},
|
|
8935
|
+
components || {}
|
|
8936
|
+
);
|
|
8927
8937
|
}
|
|
8928
8938
|
|
|
8929
8939
|
var __defProp$11 = Object.defineProperty;
|
|
@@ -12252,7 +12262,8 @@
|
|
|
12252
12262
|
customTag = null,
|
|
12253
12263
|
isClearable = false,
|
|
12254
12264
|
value,
|
|
12255
|
-
icon
|
|
12265
|
+
icon,
|
|
12266
|
+
components
|
|
12256
12267
|
} = _b, rest = __objRest$l(_b, [
|
|
12257
12268
|
"options",
|
|
12258
12269
|
"isMulti",
|
|
@@ -12266,7 +12277,8 @@
|
|
|
12266
12277
|
"customTag",
|
|
12267
12278
|
"isClearable",
|
|
12268
12279
|
"value",
|
|
12269
|
-
"icon"
|
|
12280
|
+
"icon",
|
|
12281
|
+
"components"
|
|
12270
12282
|
]);
|
|
12271
12283
|
const handleChange = useSelectCallbacks({
|
|
12272
12284
|
onChange,
|
|
@@ -12276,7 +12288,7 @@
|
|
|
12276
12288
|
value: ramda.is(Array, value) ? value : []
|
|
12277
12289
|
});
|
|
12278
12290
|
const customComponents = React.useMemo(
|
|
12279
|
-
() => getComponents(),
|
|
12291
|
+
() => getComponents(components),
|
|
12280
12292
|
[]
|
|
12281
12293
|
);
|
|
12282
12294
|
const prevOptions = React.useRef(
|
|
@@ -13866,18 +13878,22 @@
|
|
|
13866
13878
|
onOptionChange,
|
|
13867
13879
|
width = "100%",
|
|
13868
13880
|
variant = "outline",
|
|
13869
|
-
|
|
13881
|
+
defaultValue,
|
|
13882
|
+
value,
|
|
13870
13883
|
menuPlacement = "bottom"
|
|
13871
13884
|
}) => {
|
|
13872
13885
|
const initialSelectedOption = React.useMemo(
|
|
13873
13886
|
() => {
|
|
13874
|
-
var _a;
|
|
13875
|
-
if (ramda.isNil(
|
|
13876
|
-
return null;
|
|
13887
|
+
var _a, _b;
|
|
13888
|
+
if (!ramda.isNil(value)) {
|
|
13889
|
+
return (_a = standardOptions.find((option) => option.value === value)) != null ? _a : null;
|
|
13890
|
+
}
|
|
13891
|
+
if (!ramda.isNil(defaultValue)) {
|
|
13892
|
+
return (_b = standardOptions.find((option) => option.value === defaultValue)) != null ? _b : null;
|
|
13877
13893
|
}
|
|
13878
|
-
return
|
|
13894
|
+
return null;
|
|
13879
13895
|
},
|
|
13880
|
-
[]
|
|
13896
|
+
[value]
|
|
13881
13897
|
);
|
|
13882
13898
|
const [selectedOption, setSelectedOption] = React.useState(initialSelectedOption);
|
|
13883
13899
|
const [newOptionText, setNewOptionText] = React.useState("");
|
|
@@ -14641,6 +14657,10 @@
|
|
|
14641
14657
|
enumerable: true,
|
|
14642
14658
|
get: function () { return chakraReactSelect.CreatableSelect; }
|
|
14643
14659
|
});
|
|
14660
|
+
Object.defineProperty(exports, 'selectChakraComponents', {
|
|
14661
|
+
enumerable: true,
|
|
14662
|
+
get: function () { return chakraReactSelect.chakraComponents; }
|
|
14663
|
+
});
|
|
14644
14664
|
Object.defineProperty(exports, 'useController', {
|
|
14645
14665
|
enumerable: true,
|
|
14646
14666
|
get: function () { return reactHookForm.useController; }
|