@nulogy/components 8.0.0 → 8.1.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/main.js +6 -30
- package/dist/main.module.js +6 -30
- package/dist/src/Select/Select.d.ts +34 -33
- package/dist/src/Select/Select.story.d.ts +1 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -23328,7 +23328,6 @@
|
|
|
23328
23328
|
required = _a.required,
|
|
23329
23329
|
requirementText = _a.requirementText,
|
|
23330
23330
|
helpText = _a.helpText,
|
|
23331
|
-
noOptionsMessage = _a.noOptionsMessage,
|
|
23332
23331
|
disabled = _a.disabled,
|
|
23333
23332
|
errorMessage = _a.errorMessage,
|
|
23334
23333
|
errorList = _a.errorList,
|
|
@@ -23337,27 +23336,16 @@
|
|
|
23337
23336
|
id = _a.id,
|
|
23338
23337
|
initialIsOpen = _a.initialIsOpen,
|
|
23339
23338
|
maxHeight = _a.maxHeight,
|
|
23340
|
-
menuPosition = _a.menuPosition,
|
|
23341
23339
|
multiselect = _a.multiselect,
|
|
23342
|
-
name = _a.name,
|
|
23343
23340
|
onChange = _a.onChange,
|
|
23344
23341
|
placeholder = _a.placeholder,
|
|
23345
23342
|
value = _a.value,
|
|
23346
23343
|
defaultValue = _a.defaultValue,
|
|
23347
|
-
className = _a.className,
|
|
23348
|
-
classNamePrefix = _a.classNamePrefix,
|
|
23349
|
-
onBlur = _a.onBlur,
|
|
23350
|
-
menuIsOpen = _a.menuIsOpen,
|
|
23351
|
-
onMenuOpen = _a.onMenuOpen,
|
|
23352
|
-
onMenuClose = _a.onMenuClose,
|
|
23353
|
-
onInputChange = _a.onInputChange,
|
|
23354
23344
|
components = _a.components,
|
|
23355
23345
|
ariaLabel = _a["aria-label"],
|
|
23356
23346
|
_a$windowThreshold = _a.windowThreshold,
|
|
23357
23347
|
windowThreshold = _a$windowThreshold === void 0 ? 300 : _a$windowThreshold,
|
|
23358
|
-
|
|
23359
|
-
closeMenuOnSelect = _a.closeMenuOnSelect,
|
|
23360
|
-
props = __rest(_a, ["autocomplete", "options", "labelText", "required", "requirementText", "helpText", "noOptionsMessage", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "menuPosition", "multiselect", "name", "onChange", "placeholder", "value", "defaultValue", "className", "classNamePrefix", "onBlur", "menuIsOpen", "onMenuOpen", "onMenuClose", "onInputChange", "components", "aria-label", "windowThreshold", "filterOption", "closeMenuOnSelect"]);
|
|
23348
|
+
props = __rest(_a, ["autocomplete", "options", "labelText", "required", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "multiselect", "onChange", "placeholder", "value", "defaultValue", "components", "aria-label", "windowThreshold"]);
|
|
23361
23349
|
|
|
23362
23350
|
var _useTranslation = useTranslation(),
|
|
23363
23351
|
t = _useTranslation.t;
|
|
@@ -23371,14 +23359,9 @@
|
|
|
23371
23359
|
labelText: labelText,
|
|
23372
23360
|
requirementText: requirementText,
|
|
23373
23361
|
helpText: helpText
|
|
23374
|
-
}, /*#__PURE__*/React__default['default'].createElement(WindowedSelect__default['default'], {
|
|
23362
|
+
}, /*#__PURE__*/React__default['default'].createElement(WindowedSelect__default['default'], Object.assign({
|
|
23375
23363
|
ref: ref,
|
|
23376
|
-
className: className,
|
|
23377
|
-
classNamePrefix: classNamePrefix,
|
|
23378
|
-
noOptionsMessage: noOptionsMessage,
|
|
23379
23364
|
placeholder: placeholder || t("select ..."),
|
|
23380
|
-
options: options,
|
|
23381
|
-
labelText: labelText,
|
|
23382
23365
|
windowThreshold: windowThreshold,
|
|
23383
23366
|
styles: customStyles({
|
|
23384
23367
|
theme: themeContext,
|
|
@@ -23392,19 +23375,12 @@
|
|
|
23392
23375
|
"aria-invalid": error,
|
|
23393
23376
|
defaultMenuIsOpen: initialIsOpen,
|
|
23394
23377
|
inputId: id,
|
|
23395
|
-
onBlur: onBlur,
|
|
23396
23378
|
onChange: onChange && function (option) {
|
|
23397
23379
|
return onChange(extractValue(option, multiselect));
|
|
23398
23380
|
},
|
|
23399
23381
|
defaultValue: getReactSelectValue(options, defaultValue),
|
|
23400
23382
|
value: getReactSelectValue(options, value),
|
|
23401
|
-
name: name,
|
|
23402
23383
|
isMulti: multiselect,
|
|
23403
|
-
menuIsOpen: menuIsOpen,
|
|
23404
|
-
onMenuOpen: onMenuOpen,
|
|
23405
|
-
onMenuClose: onMenuClose,
|
|
23406
|
-
menuPosition: menuPosition,
|
|
23407
|
-
onInputChange: onInputChange,
|
|
23408
23384
|
theme: themeContext,
|
|
23409
23385
|
components: Object.assign({
|
|
23410
23386
|
Option: SelectOption,
|
|
@@ -23417,9 +23393,9 @@
|
|
|
23417
23393
|
Input: SelectInput
|
|
23418
23394
|
}, components),
|
|
23419
23395
|
"aria-label": ariaLabel,
|
|
23420
|
-
|
|
23421
|
-
|
|
23422
|
-
}), /*#__PURE__*/React__default['default'].createElement(InlineValidation, {
|
|
23396
|
+
options: options,
|
|
23397
|
+
labelText: labelText
|
|
23398
|
+
}, props)), /*#__PURE__*/React__default['default'].createElement(InlineValidation, {
|
|
23423
23399
|
mt: "x1",
|
|
23424
23400
|
errorMessage: errorMessage,
|
|
23425
23401
|
errorList: errorList
|
|
@@ -43618,7 +43594,7 @@
|
|
|
43618
43594
|
color: theme.colors[color] || color,
|
|
43619
43595
|
background: "none",
|
|
43620
43596
|
border: "none",
|
|
43621
|
-
padding:
|
|
43597
|
+
padding: theme.space.x1,
|
|
43622
43598
|
marginLeft: theme.space.x1,
|
|
43623
43599
|
borderRadius: theme.radii.medium,
|
|
43624
43600
|
transition: ".2s",
|
package/dist/main.module.js
CHANGED
|
@@ -23302,7 +23302,6 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23302
23302
|
required = _a.required,
|
|
23303
23303
|
requirementText = _a.requirementText,
|
|
23304
23304
|
helpText = _a.helpText,
|
|
23305
|
-
noOptionsMessage = _a.noOptionsMessage,
|
|
23306
23305
|
disabled = _a.disabled,
|
|
23307
23306
|
errorMessage = _a.errorMessage,
|
|
23308
23307
|
errorList = _a.errorList,
|
|
@@ -23311,27 +23310,16 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23311
23310
|
id = _a.id,
|
|
23312
23311
|
initialIsOpen = _a.initialIsOpen,
|
|
23313
23312
|
maxHeight = _a.maxHeight,
|
|
23314
|
-
menuPosition = _a.menuPosition,
|
|
23315
23313
|
multiselect = _a.multiselect,
|
|
23316
|
-
name = _a.name,
|
|
23317
23314
|
onChange = _a.onChange,
|
|
23318
23315
|
placeholder = _a.placeholder,
|
|
23319
23316
|
value = _a.value,
|
|
23320
23317
|
defaultValue = _a.defaultValue,
|
|
23321
|
-
className = _a.className,
|
|
23322
|
-
classNamePrefix = _a.classNamePrefix,
|
|
23323
|
-
onBlur = _a.onBlur,
|
|
23324
|
-
menuIsOpen = _a.menuIsOpen,
|
|
23325
|
-
onMenuOpen = _a.onMenuOpen,
|
|
23326
|
-
onMenuClose = _a.onMenuClose,
|
|
23327
|
-
onInputChange = _a.onInputChange,
|
|
23328
23318
|
components = _a.components,
|
|
23329
23319
|
ariaLabel = _a["aria-label"],
|
|
23330
23320
|
_a$windowThreshold = _a.windowThreshold,
|
|
23331
23321
|
windowThreshold = _a$windowThreshold === void 0 ? 300 : _a$windowThreshold,
|
|
23332
|
-
|
|
23333
|
-
closeMenuOnSelect = _a.closeMenuOnSelect,
|
|
23334
|
-
props = __rest(_a, ["autocomplete", "options", "labelText", "required", "requirementText", "helpText", "noOptionsMessage", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "menuPosition", "multiselect", "name", "onChange", "placeholder", "value", "defaultValue", "className", "classNamePrefix", "onBlur", "menuIsOpen", "onMenuOpen", "onMenuClose", "onInputChange", "components", "aria-label", "windowThreshold", "filterOption", "closeMenuOnSelect"]);
|
|
23322
|
+
props = __rest(_a, ["autocomplete", "options", "labelText", "required", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "multiselect", "onChange", "placeholder", "value", "defaultValue", "components", "aria-label", "windowThreshold"]);
|
|
23335
23323
|
|
|
23336
23324
|
var _useTranslation = useTranslation(),
|
|
23337
23325
|
t = _useTranslation.t;
|
|
@@ -23345,14 +23333,9 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23345
23333
|
labelText: labelText,
|
|
23346
23334
|
requirementText: requirementText,
|
|
23347
23335
|
helpText: helpText
|
|
23348
|
-
}, /*#__PURE__*/React__default.createElement(WindowedSelect, {
|
|
23336
|
+
}, /*#__PURE__*/React__default.createElement(WindowedSelect, Object.assign({
|
|
23349
23337
|
ref: ref,
|
|
23350
|
-
className: className,
|
|
23351
|
-
classNamePrefix: classNamePrefix,
|
|
23352
|
-
noOptionsMessage: noOptionsMessage,
|
|
23353
23338
|
placeholder: placeholder || t("select ..."),
|
|
23354
|
-
options: options,
|
|
23355
|
-
labelText: labelText,
|
|
23356
23339
|
windowThreshold: windowThreshold,
|
|
23357
23340
|
styles: customStyles({
|
|
23358
23341
|
theme: themeContext,
|
|
@@ -23366,19 +23349,12 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23366
23349
|
"aria-invalid": error,
|
|
23367
23350
|
defaultMenuIsOpen: initialIsOpen,
|
|
23368
23351
|
inputId: id,
|
|
23369
|
-
onBlur: onBlur,
|
|
23370
23352
|
onChange: onChange && function (option) {
|
|
23371
23353
|
return onChange(extractValue(option, multiselect));
|
|
23372
23354
|
},
|
|
23373
23355
|
defaultValue: getReactSelectValue(options, defaultValue),
|
|
23374
23356
|
value: getReactSelectValue(options, value),
|
|
23375
|
-
name: name,
|
|
23376
23357
|
isMulti: multiselect,
|
|
23377
|
-
menuIsOpen: menuIsOpen,
|
|
23378
|
-
onMenuOpen: onMenuOpen,
|
|
23379
|
-
onMenuClose: onMenuClose,
|
|
23380
|
-
menuPosition: menuPosition,
|
|
23381
|
-
onInputChange: onInputChange,
|
|
23382
23358
|
theme: themeContext,
|
|
23383
23359
|
components: Object.assign({
|
|
23384
23360
|
Option: SelectOption,
|
|
@@ -23391,9 +23367,9 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23391
23367
|
Input: SelectInput
|
|
23392
23368
|
}, components),
|
|
23393
23369
|
"aria-label": ariaLabel,
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
}), /*#__PURE__*/React__default.createElement(InlineValidation, {
|
|
23370
|
+
options: options,
|
|
23371
|
+
labelText: labelText
|
|
23372
|
+
}, props)), /*#__PURE__*/React__default.createElement(InlineValidation, {
|
|
23397
23373
|
mt: "x1",
|
|
23398
23374
|
errorMessage: errorMessage,
|
|
23399
23375
|
errorList: errorList
|
|
@@ -43592,7 +43568,7 @@ var MobileMenuTrigger = styled.button.withConfig({
|
|
|
43592
43568
|
color: theme.colors[color] || color,
|
|
43593
43569
|
background: "none",
|
|
43594
43570
|
border: "none",
|
|
43595
|
-
padding:
|
|
43571
|
+
padding: theme.space.x1,
|
|
43596
43572
|
marginLeft: theme.space.x1,
|
|
43597
43573
|
borderRadius: theme.radii.medium,
|
|
43598
43574
|
transition: ".2s",
|
|
@@ -1,36 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const SelectDefaultProps: {
|
|
3
|
-
autocomplete: boolean;
|
|
4
|
-
disabled: any;
|
|
5
|
-
defaultValue: any;
|
|
6
|
-
error: any;
|
|
7
|
-
errorMessage: any;
|
|
8
|
-
errorList: any;
|
|
9
|
-
labelText: any;
|
|
10
|
-
helpText: any;
|
|
11
|
-
noOptionsMessage: any;
|
|
12
|
-
requirementText: any;
|
|
13
|
-
id: any;
|
|
14
|
-
initialIsOpen: any;
|
|
15
|
-
maxHeight: string;
|
|
16
|
-
menuPosition: string;
|
|
17
|
-
multiselect: boolean;
|
|
18
|
-
name: any;
|
|
19
|
-
onBlur: any;
|
|
20
|
-
onChange: any;
|
|
21
|
-
placeholder: any;
|
|
22
|
-
required: boolean;
|
|
23
|
-
value: any;
|
|
24
|
-
className: any;
|
|
25
|
-
classNamePrefix: string;
|
|
26
|
-
menuIsOpen: any;
|
|
27
|
-
onMenuOpen: any;
|
|
28
|
-
onMenuClose: any;
|
|
29
|
-
onInputChange: any;
|
|
30
|
-
components: any;
|
|
31
|
-
closeMenuOnSelect: boolean;
|
|
32
|
-
};
|
|
33
|
-
export declare const getOption: (options: any, value: any) => any;
|
|
34
2
|
export declare type SelectProps = {
|
|
35
3
|
options?: any[];
|
|
36
4
|
windowThreshold?: number;
|
|
@@ -65,6 +33,39 @@ export declare type SelectProps = {
|
|
|
65
33
|
components?: any;
|
|
66
34
|
closeMenuOnSelect?: boolean;
|
|
67
35
|
"aria-label"?: string;
|
|
36
|
+
[key: string]: any;
|
|
68
37
|
};
|
|
69
|
-
declare const
|
|
38
|
+
export declare const SelectDefaultProps: {
|
|
39
|
+
autocomplete: boolean;
|
|
40
|
+
disabled: any;
|
|
41
|
+
defaultValue: any;
|
|
42
|
+
error: any;
|
|
43
|
+
errorMessage: any;
|
|
44
|
+
errorList: any;
|
|
45
|
+
labelText: any;
|
|
46
|
+
helpText: any;
|
|
47
|
+
noOptionsMessage: any;
|
|
48
|
+
requirementText: any;
|
|
49
|
+
id: any;
|
|
50
|
+
initialIsOpen: any;
|
|
51
|
+
maxHeight: string;
|
|
52
|
+
menuPosition: string;
|
|
53
|
+
multiselect: boolean;
|
|
54
|
+
name: any;
|
|
55
|
+
onBlur: any;
|
|
56
|
+
onChange: any;
|
|
57
|
+
placeholder: any;
|
|
58
|
+
required: boolean;
|
|
59
|
+
value: any;
|
|
60
|
+
className: any;
|
|
61
|
+
classNamePrefix: string;
|
|
62
|
+
menuIsOpen: any;
|
|
63
|
+
onMenuOpen: any;
|
|
64
|
+
onMenuClose: any;
|
|
65
|
+
onInputChange: any;
|
|
66
|
+
components: any;
|
|
67
|
+
closeMenuOnSelect: boolean;
|
|
68
|
+
};
|
|
69
|
+
export declare const getOption: (options: any, value: any) => any;
|
|
70
|
+
declare const ReactSelect: React.ForwardRefExoticComponent<Pick<SelectProps, React.ReactText> & React.RefAttributes<unknown>>;
|
|
70
71
|
export default ReactSelect;
|