@northlight/ui 2.24.0 → 2.24.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.d.ts +3 -4
- package/dist/es/northlight.js +5 -3
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +5 -3
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +2 -2
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +3 -3
package/dist/es/northlight.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ import { Props as Props$1 } from 'react-input-mask';
|
|
|
32
32
|
import { NumericFormatProps } from 'react-number-format';
|
|
33
33
|
import { Schema } from 'joi';
|
|
34
34
|
import { UseClickableProps } from '@chakra-ui/clickable';
|
|
35
|
-
import { Option as Option$1 } from '@northlight/ui';
|
|
36
35
|
import { Variant } from 'chakra-react-select/dist/types/types';
|
|
37
36
|
import * as _react_types_shared from '@react-types/shared';
|
|
38
37
|
import * as _react_aria_focus from '@react-aria/focus';
|
|
@@ -4135,7 +4134,7 @@ interface StepStackProps extends StackProps {
|
|
|
4135
4134
|
*/
|
|
4136
4135
|
declare const StepStack: ({ children, spacing, rowHeight, stepCircleAlignment, stepCircleMarginTopPx, ...rest }: StepStackProps) => JSX.Element;
|
|
4137
4136
|
|
|
4138
|
-
interface CreationOption extends Option
|
|
4137
|
+
interface CreationOption extends Option {
|
|
4139
4138
|
isCreation: boolean;
|
|
4140
4139
|
}
|
|
4141
4140
|
interface CreatableSelectDropdownProps {
|
|
@@ -4143,12 +4142,12 @@ interface CreatableSelectDropdownProps {
|
|
|
4143
4142
|
* An array of "Option" objects that represents the initial options available in the dropdown.
|
|
4144
4143
|
* Each "Option" object must have a "label" and a "value" property (both strings).
|
|
4145
4144
|
*/
|
|
4146
|
-
standardOptions: Option
|
|
4145
|
+
standardOptions: Option[];
|
|
4147
4146
|
/**
|
|
4148
4147
|
* A callback function that is called whenever the selected option changes.
|
|
4149
4148
|
* This function receives the newly selected "Option" object as its only argument.
|
|
4150
4149
|
*/
|
|
4151
|
-
onOptionChange: (option: Option
|
|
4150
|
+
onOptionChange: (option: Option) => void;
|
|
4152
4151
|
/**
|
|
4153
4152
|
* Optional placeholder text displayed when no option is selected and the dropdown is not focused.
|
|
4154
4153
|
* Defaults to 'Select or create...' if not provided.
|
package/dist/es/northlight.js
CHANGED
|
@@ -12236,6 +12236,7 @@ const Select = forwardRef$1((_a, ref) => {
|
|
|
12236
12236
|
"data-testid": testId,
|
|
12237
12237
|
customOption = null,
|
|
12238
12238
|
customTag = null,
|
|
12239
|
+
isClearable = false,
|
|
12239
12240
|
value,
|
|
12240
12241
|
icon
|
|
12241
12242
|
} = _b, rest = __objRest$l(_b, [
|
|
@@ -12249,6 +12250,7 @@ const Select = forwardRef$1((_a, ref) => {
|
|
|
12249
12250
|
"data-testid",
|
|
12250
12251
|
"customOption",
|
|
12251
12252
|
"customTag",
|
|
12253
|
+
"isClearable",
|
|
12252
12254
|
"value",
|
|
12253
12255
|
"icon"
|
|
12254
12256
|
]);
|
|
@@ -12280,7 +12282,7 @@ const Select = forwardRef$1((_a, ref) => {
|
|
|
12280
12282
|
useBasicStyles: true,
|
|
12281
12283
|
closeMenuOnSelect: !isMulti,
|
|
12282
12284
|
hideSelectedOptions: false,
|
|
12283
|
-
isClearable
|
|
12285
|
+
isClearable,
|
|
12284
12286
|
onChange: handleChange,
|
|
12285
12287
|
selectedOptionStyle: "check",
|
|
12286
12288
|
chakraStyles: customSelectStyles,
|
|
@@ -13811,7 +13813,7 @@ var __objRest = (source, exclude) => {
|
|
|
13811
13813
|
const customComponents = {
|
|
13812
13814
|
Option: (_a) => {
|
|
13813
13815
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
13814
|
-
return /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$1({}, props), /* @__PURE__ */ React.createElement(React.Fragment, null, props.data.isCreation ? /* @__PURE__ */ React.createElement(Flex, { mr: 3, width: 1.5, mb: 0.5, justifyContent: "center", alignItems: "center" }, /* @__PURE__ */ React.createElement(Icon$
|
|
13816
|
+
return /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$1({}, props), /* @__PURE__ */ React.createElement(React.Fragment, null, props.data.isCreation ? /* @__PURE__ */ React.createElement(Flex, { mr: 3, width: 1.5, mb: 0.5, justifyContent: "center", alignItems: "center" }, /* @__PURE__ */ React.createElement(Icon$1, { mb: "4px", as: PlusSolid, color: "brand" })) : /* @__PURE__ */ React.createElement(Box, { mr: 3, width: 1.5 }), children));
|
|
13815
13817
|
}
|
|
13816
13818
|
};
|
|
13817
13819
|
|
|
@@ -13899,7 +13901,7 @@ const CreatableSelectDropdown = ({
|
|
|
13899
13901
|
const combinedOptions = [...standardOptions, ...createdOptions];
|
|
13900
13902
|
const customOptions = [
|
|
13901
13903
|
__spreadProps(__spreadValues({}, creationOption), {
|
|
13902
|
-
icon: /* @__PURE__ */ React.createElement(Icon$
|
|
13904
|
+
icon: /* @__PURE__ */ React.createElement(Icon$1, { as: PlusSolid, color: "brand" })
|
|
13903
13905
|
}),
|
|
13904
13906
|
...combinedOptions
|
|
13905
13907
|
];
|