@hazelcast/ui 1.0.1-next.9 → 1.2.0
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/lib/Alert.d.ts +3 -2
- package/lib/Alert.js +23 -23
- package/lib/Alert.js.map +1 -1
- package/lib/Alert.module.scss +14 -6
- package/lib/AutocompleteField.d.ts +2 -1
- package/lib/AutocompleteField.js +41 -19
- package/lib/AutocompleteField.js.map +1 -1
- package/lib/AutocompleteField.module.scss +2 -4
- package/lib/AutocompleteFieldFormik.d.ts +2 -1
- package/lib/AutocompleteFieldFormik.js +11 -5
- package/lib/AutocompleteFieldFormik.js.map +1 -1
- package/lib/Button.d.ts +80 -41
- package/lib/Button.js +42 -13
- package/lib/Button.js.map +1 -1
- package/lib/Button.module.scss +119 -87
- package/lib/Calendar/Calendar.d.ts +1 -1
- package/lib/Calendar/Calendar.js +6 -1
- package/lib/Calendar/Calendar.js.map +1 -1
- package/lib/Calendar/Calendar.module.scss +132 -124
- package/lib/Calendar/components/CalendarTime.js +1 -1
- package/lib/Calendar/components/CalendarTime.js.map +1 -1
- package/lib/Card.d.ts +1 -0
- package/lib/Card.js +4 -3
- package/lib/Card.js.map +1 -1
- package/lib/Card.module.scss +15 -3
- package/lib/Checkbox.js +4 -3
- package/lib/Checkbox.js.map +1 -1
- package/lib/Checkbox.module.scss +15 -6
- package/lib/CheckboxFormik.d.ts +2 -1
- package/lib/CheckboxFormik.js +9 -4
- package/lib/CheckboxFormik.js.map +1 -1
- package/lib/CodeEditor.d.ts +3 -2
- package/lib/CodeEditor.js +3 -2
- package/lib/CodeEditor.js.map +1 -1
- package/lib/EmptyState.d.ts +6 -4
- package/lib/EmptyState.js +4 -6
- package/lib/EmptyState.js.map +1 -1
- package/lib/EmptyState.module.scss +0 -1
- package/lib/Error.d.ts +1 -0
- package/lib/Error.js +2 -1
- package/lib/Error.js.map +1 -1
- package/lib/FieldHeader.d.ts +20 -0
- package/lib/FieldHeader.js +15 -0
- package/lib/FieldHeader.js.map +1 -0
- package/lib/FieldHeader.module.scss +20 -0
- package/lib/Icon.d.ts +2 -2
- package/lib/IconButton.d.ts +13 -3
- package/lib/IconButton.js +2 -2
- package/lib/IconButton.js.map +1 -1
- package/lib/InteractiveList.d.ts +2 -1
- package/lib/InteractiveList.js.map +1 -1
- package/lib/Link.js +2 -3
- package/lib/Link.js.map +1 -1
- package/lib/Link.module.scss +6 -0
- package/lib/Loader.module.scss +3 -1
- package/lib/Modal.d.ts +2 -0
- package/lib/Modal.js +2 -2
- package/lib/Modal.js.map +1 -1
- package/lib/NumberField.js +11 -5
- package/lib/NumberField.js.map +1 -1
- package/lib/NumberFieldFormik.d.ts +2 -1
- package/lib/NumberFieldFormik.js +7 -4
- package/lib/NumberFieldFormik.js.map +1 -1
- package/lib/Overlay.d.ts +2 -1
- package/lib/Overlay.js +7 -5
- package/lib/Overlay.js.map +1 -1
- package/lib/Overlay.module.scss +16 -3
- package/lib/Pagination.d.ts +0 -4
- package/lib/Pagination.js +19 -17
- package/lib/Pagination.js.map +1 -1
- package/lib/Pagination.module.scss +6 -4
- package/lib/PasswordFieldFormik.d.ts +2 -1
- package/lib/PasswordFieldFormik.js +9 -4
- package/lib/PasswordFieldFormik.js.map +1 -1
- package/lib/Popover.d.ts +1 -0
- package/lib/Popover.js +2 -0
- package/lib/Popover.js.map +1 -0
- package/lib/RadioGroup.js +4 -3
- package/lib/RadioGroup.js.map +1 -1
- package/lib/RadioGroup.module.scss +2 -4
- package/lib/RadioGroupFormik.d.ts +2 -1
- package/lib/RadioGroupFormik.js +9 -4
- package/lib/RadioGroupFormik.js.map +1 -1
- package/lib/SegmentedControl.d.ts +8 -8
- package/lib/SegmentedControl.js.map +1 -1
- package/lib/SegmentedControl.module.scss +4 -2
- package/lib/SegmentedControlFormik.d.ts +4 -4
- package/lib/SegmentedControlFormik.js.map +1 -1
- package/lib/Select/CheckableSelectField.d.ts +31 -0
- package/lib/Select/CheckableSelectField.js +89 -0
- package/lib/Select/CheckableSelectField.js.map +1 -0
- package/lib/Select/CheckableSelectField.module.scss +79 -0
- package/lib/Select/CheckableSelectFieldFormik.d.ts +10 -0
- package/lib/Select/CheckableSelectFieldFormik.js +19 -0
- package/lib/Select/CheckableSelectFieldFormik.js.map +1 -0
- package/lib/Select/Common.d.ts +9 -0
- package/lib/Select/Common.js +37 -0
- package/lib/Select/Common.js.map +1 -0
- package/lib/Select/Common.module.scss +54 -0
- package/lib/Select/MultiSelectField.d.ts +28 -0
- package/lib/Select/MultiSelectField.js +111 -0
- package/lib/Select/MultiSelectField.js.map +1 -0
- package/lib/Select/MultiSelectField.module.scss +72 -0
- package/lib/Select/MultiSelectFieldFormik.d.ts +10 -0
- package/lib/Select/MultiSelectFieldFormik.js +19 -0
- package/lib/Select/MultiSelectFieldFormik.js.map +1 -0
- package/lib/Select/SelectField.d.ts +42 -0
- package/lib/Select/SelectField.js +87 -0
- package/lib/Select/SelectField.js.map +1 -0
- package/lib/Select/SelectField.module.scss +191 -0
- package/lib/Select/SelectFieldFormik.d.ts +10 -0
- package/lib/Select/SelectFieldFormik.js +19 -0
- package/lib/Select/SelectFieldFormik.js.map +1 -0
- package/lib/Select/helpers.d.ts +11 -0
- package/lib/Select/helpers.js +29 -0
- package/lib/Select/helpers.js.map +1 -0
- package/lib/Select/index.d.ts +7 -0
- package/lib/Select/index.js +8 -0
- package/lib/Select/index.js.map +1 -0
- package/lib/SimpleTable.d.ts +11 -0
- package/lib/SimpleTable.js +26 -0
- package/lib/SimpleTable.js.map +1 -0
- package/lib/SimpleTable.module.scss +28 -0
- package/lib/Slider.d.ts +6 -5
- package/lib/Slider.js +35 -17
- package/lib/Slider.js.map +1 -1
- package/lib/Slider.module.scss +8 -8
- package/lib/Table/Cell.module.scss +11 -4
- package/lib/Table/EnhancedRenderers.d.ts +0 -7
- package/lib/Table/EnhancedRenderers.js +3 -14
- package/lib/Table/EnhancedRenderers.js.map +1 -1
- package/lib/Table/Header.js +9 -3
- package/lib/Table/Header.js.map +1 -1
- package/lib/Table/Header.module.scss +26 -35
- package/lib/Table/Row.js +2 -3
- package/lib/Table/Row.js.map +1 -1
- package/lib/Table/Row.module.scss +4 -10
- package/lib/Table/Table.d.ts +11 -4
- package/lib/Table/Table.js +70 -29
- package/lib/Table/Table.js.map +1 -1
- package/lib/Table/Table.module.scss +5 -5
- package/lib/Tabs/Tab.d.ts +9 -1
- package/lib/Tabs/Tab.js +5 -2
- package/lib/Tabs/Tab.js.map +1 -1
- package/lib/Tabs/Tab.module.scss +4 -0
- package/lib/TextArea.d.ts +4 -5
- package/lib/TextArea.js +7 -7
- package/lib/TextArea.js.map +1 -1
- package/lib/TextArea.module.scss +6 -4
- package/lib/TextField.d.ts +4 -7
- package/lib/TextField.js +9 -8
- package/lib/TextField.js.map +1 -1
- package/lib/TextField.module.scss +4 -18
- package/lib/TextFieldFormik.d.ts +4 -2
- package/lib/TextFieldFormik.js +15 -4
- package/lib/TextFieldFormik.js.map +1 -1
- package/lib/TimeField.d.ts +2 -11
- package/lib/TimeField.js +7 -6
- package/lib/TimeField.js.map +1 -1
- package/lib/TimeField.module.scss +6 -6
- package/lib/Toggle.js +4 -3
- package/lib/Toggle.js.map +1 -1
- package/lib/Toggle.module.scss +15 -14
- package/lib/Tooltip.d.ts +7 -1
- package/lib/Tooltip.js +38 -23
- package/lib/Tooltip.js.map +1 -1
- package/lib/Tooltip.module.scss +10 -5
- package/lib/TruncatedText.d.ts +1 -1
- package/lib/TruncatedText.js +1 -1
- package/lib/TruncatedText.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/usePrevious.d.ts +1 -0
- package/lib/hooks/usePrevious.js +9 -0
- package/lib/hooks/usePrevious.js.map +1 -0
- package/lib/hooks/useTableCustomizableColumns.d.ts +9 -0
- package/lib/hooks/useTableCustomizableColumns.js +23 -0
- package/lib/hooks/useTableCustomizableColumns.js.map +1 -0
- package/lib/index.d.ts +4 -2
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/package.json +13 -13
- package/styles/constants/_sizes.scss +7 -6
- package/styles/constants/_typography.scss +3 -3
- package/styles/fonts.css +29 -65
- package/styles/helpers/_a11y.scss +4 -0
- package/styles/helpers/_error.scss +17 -0
- package/styles/helpers/_index.scss +1 -0
- package/lib/Calendar/components/CalendarHeader.tsx +0 -45
- package/lib/Calendar/components/CalendarInput.tsx +0 -50
- package/lib/Calendar/components/CalendarTime.tsx +0 -116
- package/lib/Calendar/helpers/consts.ts +0 -99
- package/lib/SelectField.d.ts +0 -81
- package/lib/SelectField.js +0 -196
- package/lib/SelectField.js.map +0 -1
- package/lib/SelectField.module.scss +0 -251
- package/lib/SelectFieldFormik.d.ts +0 -20
- package/lib/SelectFieldFormik.js +0 -19
- package/lib/SelectFieldFormik.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hazelcast/ui",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Hazelcast design system components",
|
|
5
5
|
"author": "",
|
|
6
6
|
"homepage": "https://github.com/hazelcast/frontend-shared#readme",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"url": "https://github.com/hazelcast/frontend-shared/issues"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@codemirror/basic-setup": "0.
|
|
47
|
-
"@codemirror/
|
|
48
|
-
"@codemirror/
|
|
49
|
-
"@
|
|
50
|
-
"@hazelcast/
|
|
51
|
-
"@hazelcast/services": "^1.0.2",
|
|
46
|
+
"@codemirror/basic-setup": "0.19.0",
|
|
47
|
+
"@codemirror/stream-parser": "0.19.2",
|
|
48
|
+
"@codemirror/view": "0.19.9",
|
|
49
|
+
"@hazelcast/helpers": "1.0.1-next.46",
|
|
50
|
+
"@hazelcast/services": "^1.2.0",
|
|
52
51
|
"@headlessui/react": "^1.2.0",
|
|
53
52
|
"@icons-pack/react-simple-icons": "^3.13.0",
|
|
54
53
|
"@popperjs/core": "^2.5.3",
|
|
54
|
+
"@types/react-modal": "3.12.1",
|
|
55
55
|
"@types/react-select": "3.0.26",
|
|
56
56
|
"@types/react-table": "^7.0.28",
|
|
57
57
|
"classnames": "^2.2.6",
|
|
@@ -72,10 +72,11 @@
|
|
|
72
72
|
"use-deep-compare": "^1.1.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@
|
|
75
|
+
"@codemirror/legacy-modes": "0.19.0",
|
|
76
|
+
"@hazelcast/test-helpers": "^1.2.0",
|
|
76
77
|
"@storybook/addon-docs": "6.1.21",
|
|
77
78
|
"@storybook/addons": "6.1.21",
|
|
78
|
-
"@storybook/preset-scss": "^1.0.
|
|
79
|
+
"@storybook/preset-scss": "^1.0.3",
|
|
79
80
|
"@storybook/react": "6.1.21",
|
|
80
81
|
"@storybook/theming": "6.1.21",
|
|
81
82
|
"@types/classnames": "^2.2.10",
|
|
@@ -84,7 +85,6 @@
|
|
|
84
85
|
"@types/react": "^16.14.4",
|
|
85
86
|
"@types/react-datepicker": "^3.1.3",
|
|
86
87
|
"@types/react-dom": "^16.9.11",
|
|
87
|
-
"@types/react-modal": "^3.10.6",
|
|
88
88
|
"doiuse": "^4.2.0",
|
|
89
89
|
"enzyme": "^3.11.0",
|
|
90
90
|
"enzyme-adapter-react-16": "^1.15.5",
|
|
@@ -92,19 +92,19 @@
|
|
|
92
92
|
"postcss": "^8.1.1",
|
|
93
93
|
"postcss-cli": "^8.1.0",
|
|
94
94
|
"postcss-reporter": "^7.0.1",
|
|
95
|
-
"postcss-scss": "^3.0.
|
|
95
|
+
"postcss-scss": "^3.0.5",
|
|
96
96
|
"react": "^16.14.0",
|
|
97
97
|
"react-dom": "^16.14.0",
|
|
98
98
|
"storybook-addon-designs": "5.4.2",
|
|
99
99
|
"stylelint": "^13.7.2",
|
|
100
100
|
"stylelint-config-prettier": "^8.0.2",
|
|
101
101
|
"stylelint-config-standard": "^20.0.0",
|
|
102
|
-
"stylelint-scss": "^3.
|
|
102
|
+
"stylelint-scss": "^3.19.0",
|
|
103
103
|
"yup": "^0.32.9"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": "^16.14.0",
|
|
107
107
|
"react-dom": "^16.14.0"
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "46315e51c611ac84d5b786d497c6d03e12a73333"
|
|
110
110
|
}
|
|
@@ -8,7 +8,7 @@ $grid: 0.25rem !default;
|
|
|
8
8
|
$alertWidth: 350px !default;
|
|
9
9
|
|
|
10
10
|
$borderRadius: $grid * 1.25 !default;
|
|
11
|
-
$borderRadiusButtonSmall: $grid *
|
|
11
|
+
$borderRadiusButtonSmall: $grid * 5 !default;
|
|
12
12
|
|
|
13
13
|
$borderRadiusToast: 37px !default;
|
|
14
14
|
|
|
@@ -20,7 +20,7 @@ $borderRadiusTimeField: 3px !default;
|
|
|
20
20
|
$separatorWidth: 1px !default;
|
|
21
21
|
|
|
22
22
|
$borderWidth: 1px !default;
|
|
23
|
-
$borderWidthButton:
|
|
23
|
+
$borderWidthButton: 1px !default;
|
|
24
24
|
|
|
25
25
|
$outlineWidth: 2px !default;
|
|
26
26
|
|
|
@@ -74,13 +74,14 @@ $sliderThumbShadowSize: 1px;
|
|
|
74
74
|
$sliderThumbShadowBlur: $grid;
|
|
75
75
|
$sliderFillBorderSize: 1px;
|
|
76
76
|
|
|
77
|
-
$emptyStateMaxWidth: 960px !important;
|
|
78
77
|
$emptyStateButtonMinWidthNormal: 120px !default;
|
|
79
78
|
$emptyStateButtonMinWidthLarge: 140px !default;
|
|
80
79
|
|
|
81
80
|
$borderRadiusNotification: 3px;
|
|
82
81
|
|
|
83
82
|
// Table column widths
|
|
84
|
-
$tableColumnMinWidth:
|
|
85
|
-
$tableColumnWidth:
|
|
86
|
-
$tableColumnMaxWidth:
|
|
83
|
+
$tableColumnMinWidth: 60;
|
|
84
|
+
$tableColumnWidth: 170;
|
|
85
|
+
$tableColumnMaxWidth: 600;
|
|
86
|
+
|
|
87
|
+
$errorHeight: $grid * 4.75;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
$fontFamilyHeading: '
|
|
1
|
+
$fontFamilyHeading: 'Roboto', 'Helvetica', 'Arial', sans-serif !default;
|
|
2
2
|
$fontWeightHeadingLight: 300 !default;
|
|
3
3
|
$fontWeightHeadingRegular: 400 !default;
|
|
4
4
|
$fontWeightHeadingBold: 500 !default;
|
|
5
5
|
|
|
6
|
-
$fontFamilyText: '
|
|
6
|
+
$fontFamilyText: 'Roboto', 'Helvetica', 'Arial', sans-serif !default;
|
|
7
7
|
$fontWeightTextLight: 300 !default;
|
|
8
8
|
$fontWeightTextRegular: 400 !default;
|
|
9
|
-
$fontWeightTextBold:
|
|
9
|
+
$fontWeightTextBold: 500 !default;
|
|
10
10
|
|
|
11
11
|
// https://www.figma.com/file/8mVm6LTbp2Z0RaWWjTZoft/%F0%9F%90%9DHIVE?node-id=0%3A136
|
|
12
12
|
$fontSizeH1: 2rem !default;
|
package/styles/fonts.css
CHANGED
|
@@ -1,77 +1,41 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
/* ubuntu-300 - latin */
|
|
1
|
+
/* roboto-300 - latin */
|
|
4
2
|
@font-face {
|
|
5
|
-
font-family: '
|
|
3
|
+
font-family: 'Roboto';
|
|
6
4
|
font-style: normal;
|
|
7
5
|
font-weight: 300;
|
|
8
|
-
src: url('../
|
|
9
|
-
src: local('
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/* ubuntu-regular - latin */
|
|
16
|
-
@font-face {
|
|
17
|
-
font-family: 'Ubuntu';
|
|
18
|
-
font-style: normal;
|
|
19
|
-
font-weight: 400;
|
|
20
|
-
src: url('../assets/ubuntu-v15-latin-regular.eot'); /* IE9 Compat Modes */
|
|
21
|
-
src: local('Ubuntu Regular'), local('Ubuntu-Regular'), url('../assets/ubuntu-v15-latin-regular.eot?#iefix') format('embedded-opentype'),
|
|
22
|
-
/* IE6-IE8 */ url('../assets/ubuntu-v15-latin-regular.woff2') format('woff2'),
|
|
23
|
-
/* Super Modern Browsers */ url('../assets/ubuntu-v15-latin-regular.woff') format('woff'),
|
|
24
|
-
/* Modern Browsers */ url('../assets/ubuntu-v15-latin-regular.ttf') format('truetype'),
|
|
25
|
-
/* Safari, Android, iOS */ url('../assets/ubuntu-v15-latin-regular.svg#Ubuntu') format('svg'); /* Legacy iOS */
|
|
26
|
-
}
|
|
27
|
-
/* ubuntu-500 - latin */
|
|
28
|
-
@font-face {
|
|
29
|
-
font-family: 'Ubuntu';
|
|
30
|
-
font-style: normal;
|
|
31
|
-
font-weight: 500;
|
|
32
|
-
src: url('../assets/ubuntu-v15-latin-500.eot'); /* IE9 Compat Modes */
|
|
33
|
-
src: local('Ubuntu Medium'), local('Ubuntu-Medium'), url('../assets/ubuntu-v15-latin-500.eot?#iefix') format('embedded-opentype'),
|
|
34
|
-
/* IE6-IE8 */ url('../assets/ubuntu-v15-latin-500.woff2') format('woff2'),
|
|
35
|
-
/* Super Modern Browsers */ url('../assets/ubuntu-v15-latin-500.woff') format('woff'),
|
|
36
|
-
/* Modern Browsers */ url('../assets/ubuntu-v15-latin-500.ttf') format('truetype'),
|
|
37
|
-
/* Safari, Android, iOS */ url('../assets/ubuntu-v15-latin-500.svg#Ubuntu') format('svg'); /* Legacy iOS */
|
|
6
|
+
src: url('../fonts/roboto-v27-latin-300.eot'); /* IE9 Compat Modes */
|
|
7
|
+
src: local(''),
|
|
8
|
+
url('../fonts/roboto-v27-latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
|
9
|
+
url('../fonts/roboto-v27-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
|
|
10
|
+
url('../fonts/roboto-v27-latin-300.woff') format('woff'), /* Modern Browsers */
|
|
11
|
+
url('../fonts/roboto-v27-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */
|
|
12
|
+
url('../fonts/roboto-v27-latin-300.svg#Roboto') format('svg'); /* Legacy iOS */
|
|
38
13
|
}
|
|
39
14
|
|
|
40
|
-
/*
|
|
15
|
+
/* roboto-regular - latin */
|
|
41
16
|
@font-face {
|
|
42
|
-
font-family: '
|
|
43
|
-
font-style: normal;
|
|
44
|
-
font-weight: 300;
|
|
45
|
-
src: url('../assets/open-sans-v18-latin-300.eot'); /* IE9 Compat Modes */
|
|
46
|
-
src: local('Open Sans Light'), local('OpenSans-Light'), url('../assets/open-sans-v18-latin-300.eot?#iefix') format('embedded-opentype'),
|
|
47
|
-
/* IE6-IE8 */ url('../assets/open-sans-v18-latin-300.woff2') format('woff2'),
|
|
48
|
-
/* Super Modern Browsers */ url('../assets/open-sans-v18-latin-300.woff') format('woff'),
|
|
49
|
-
/* Modern Browsers */ url('../assets/open-sans-v18-latin-300.ttf') format('truetype'),
|
|
50
|
-
/* Safari, Android, iOS */ url('../assets/open-sans-v18-latin-300.svg#OpenSans') format('svg'); /* Legacy iOS */
|
|
51
|
-
}
|
|
52
|
-
/* open-sans-regular - latin */
|
|
53
|
-
@font-face {
|
|
54
|
-
font-family: 'Open Sans';
|
|
17
|
+
font-family: 'Roboto';
|
|
55
18
|
font-style: normal;
|
|
56
19
|
font-weight: 400;
|
|
57
|
-
src: url('../
|
|
58
|
-
src: local('
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
20
|
+
src: url('../fonts/roboto-v27-latin-regular.eot'); /* IE9 Compat Modes */
|
|
21
|
+
src: local(''),
|
|
22
|
+
url('../fonts/roboto-v27-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
|
23
|
+
url('../fonts/roboto-v27-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
|
|
24
|
+
url('../fonts/roboto-v27-latin-regular.woff') format('woff'), /* Modern Browsers */
|
|
25
|
+
url('../fonts/roboto-v27-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
|
26
|
+
url('../fonts/roboto-v27-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
|
|
64
27
|
}
|
|
65
|
-
|
|
28
|
+
|
|
29
|
+
/* roboto-500 - latin */
|
|
66
30
|
@font-face {
|
|
67
|
-
font-family: '
|
|
31
|
+
font-family: 'Roboto';
|
|
68
32
|
font-style: normal;
|
|
69
|
-
font-weight:
|
|
70
|
-
src: url('../
|
|
71
|
-
src: local('
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
src: url('../fonts/roboto-v27-latin-500.eot'); /* IE9 Compat Modes */
|
|
35
|
+
src: local(''),
|
|
36
|
+
url('../fonts/roboto-v27-latin-500.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
|
37
|
+
url('../fonts/roboto-v27-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
|
|
38
|
+
url('../fonts/roboto-v27-latin-500.woff') format('woff'), /* Modern Browsers */
|
|
39
|
+
url('../fonts/roboto-v27-latin-500.ttf') format('truetype'), /* Safari, Android, iOS */
|
|
40
|
+
url('../fonts/roboto-v27-latin-500.svg#Roboto') format('svg'); /* Legacy iOS */
|
|
77
41
|
}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
box-shadow: inset 0 0 0 c.$outlineWidth c.$colorAccessibilityOutline;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
@mixin outlineAround {
|
|
8
|
+
box-shadow: 0 0 0 c.$outlineWidth c.$colorAccessibilityOutline;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
@mixin outlineFormField {
|
|
8
12
|
border-color: c.$colorAccessibilityOutline;
|
|
9
13
|
// Border is also colored with the a11y color. We need to make the total visible outline width c.$outlineWidth, including the border
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@use '../constants' as c;
|
|
2
|
+
|
|
3
|
+
@mixin withError {
|
|
4
|
+
.withError {
|
|
5
|
+
position: relative;
|
|
6
|
+
padding-bottom: c.$errorHeight;
|
|
7
|
+
|
|
8
|
+
.errorContainer {
|
|
9
|
+
position: absolute;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
height: c.$errorHeight;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react'
|
|
2
|
-
import { ReactDatePickerProps } from 'react-datepicker'
|
|
3
|
-
import { ChevronLeft, ChevronRight } from 'react-feather'
|
|
4
|
-
import { format } from 'date-fns'
|
|
5
|
-
|
|
6
|
-
import { IconButton } from '../../IconButton'
|
|
7
|
-
|
|
8
|
-
import styles from '../Calendar.module.scss'
|
|
9
|
-
import styleConsts from '../../../styles/constants/export.module.scss'
|
|
10
|
-
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
|
-
type ExtractFnArgumentType<T> = T extends (arg: infer U) => any ? U : never
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
* Note:
|
|
16
|
-
* react-datepicker does expose header props type as "renderCustomHeader", however the property is defined
|
|
17
|
-
* as a render-prop.
|
|
18
|
-
* This way we can pick the argument type from the render function and convert the property
|
|
19
|
-
* to use a regular component, rather than a render-prop.
|
|
20
|
-
*
|
|
21
|
-
* There is no significant benefit other than readability.
|
|
22
|
-
*/
|
|
23
|
-
export type CalendarHeaderProps = ExtractFnArgumentType<ReactDatePickerProps['renderCustomHeader']>
|
|
24
|
-
|
|
25
|
-
export const CalendarHeader: FC<CalendarHeaderProps> = ({ date, decreaseMonth, increaseMonth }) => {
|
|
26
|
-
return (
|
|
27
|
-
<div data-test="date-picker-header" className={styles.headerContainer}>
|
|
28
|
-
<IconButton
|
|
29
|
-
data-test="date-picker-header-icon-previous"
|
|
30
|
-
icon={ChevronLeft}
|
|
31
|
-
ariaLabel="Previous month"
|
|
32
|
-
iconColor={styleConsts.colorPrimary}
|
|
33
|
-
onClick={decreaseMonth}
|
|
34
|
-
/>
|
|
35
|
-
<div className={styles.headerMonthAndYear}>{format(date, 'MMMM y')}</div>
|
|
36
|
-
<IconButton
|
|
37
|
-
data-test="date-picker-header-icon-next"
|
|
38
|
-
icon={ChevronRight}
|
|
39
|
-
ariaLabel="Next month"
|
|
40
|
-
iconColor={styleConsts.colorPrimary}
|
|
41
|
-
onClick={increaseMonth}
|
|
42
|
-
/>
|
|
43
|
-
</div>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React, { FC, ChangeEvent, InputHTMLAttributes, forwardRef } from 'react'
|
|
2
|
-
import { Calendar } from 'react-feather'
|
|
3
|
-
|
|
4
|
-
import { TextField } from '../../TextField'
|
|
5
|
-
import { CalendarSize } from '../Calendar'
|
|
6
|
-
|
|
7
|
-
export type CalendarInputInternalProps = {
|
|
8
|
-
onChange: (e: ChangeEvent<HTMLInputElement>) => void
|
|
9
|
-
} & CalendarInputExtraProps &
|
|
10
|
-
Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'>
|
|
11
|
-
|
|
12
|
-
export const CalendarInputInternal: FC<CalendarInputInternalProps> = ({ className, value, onChange, label, textFieldSize, ...props }) => (
|
|
13
|
-
<TextField<'text'>
|
|
14
|
-
{...props}
|
|
15
|
-
size={textFieldSize}
|
|
16
|
-
data-test="calendar-input"
|
|
17
|
-
value={value?.toString()}
|
|
18
|
-
onChange={onChange}
|
|
19
|
-
inputContainerClassName={className}
|
|
20
|
-
type="text"
|
|
21
|
-
name="calendar-input"
|
|
22
|
-
label={label}
|
|
23
|
-
inputTrailingIcon={Calendar}
|
|
24
|
-
inputTrailingIconLabel="Calendar Icon"
|
|
25
|
-
/>
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
export type CalendarInputExtraProps = {
|
|
29
|
-
label: string
|
|
30
|
-
textFieldSize?: CalendarSize
|
|
31
|
-
className?: string
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/*
|
|
35
|
-
* Note:
|
|
36
|
-
* The types are not available, the element is internally instantiated via React.cloneElement
|
|
37
|
-
* We need to accept the props as unknown and cast them in place
|
|
38
|
-
* Otherwise "Calendar.customInput" would require us to pass them explicitly
|
|
39
|
-
*/
|
|
40
|
-
export type CalendarInputProps = unknown & CalendarInputExtraProps
|
|
41
|
-
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43
|
-
export const CalendarInput: FC<CalendarInputProps> = forwardRef((props, ref) => {
|
|
44
|
-
// Note: Cast the "unknown" props to the actual type
|
|
45
|
-
const propsTyped = props as CalendarInputInternalProps
|
|
46
|
-
|
|
47
|
-
return <CalendarInputInternal {...propsTyped} />
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
CalendarInput.displayName = 'CalendarInput'
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import React, { ChangeEvent, FC, useCallback, useEffect, useState } from 'react'
|
|
2
|
-
import { format, parse } from 'date-fns'
|
|
3
|
-
|
|
4
|
-
import { Button } from '../../Button'
|
|
5
|
-
import { timePoints } from '../helpers/consts'
|
|
6
|
-
import { TimeField } from '../../TimeField'
|
|
7
|
-
|
|
8
|
-
import styles from './CalendarTime.module.scss'
|
|
9
|
-
|
|
10
|
-
// Note: AM/PM 1-12 hours time
|
|
11
|
-
const DATE_FORMAT = 'hh:mm a'
|
|
12
|
-
// Note: 0-23 hours time
|
|
13
|
-
const DATE_FORMAT_NO_MERIDIEM = 'HH:mm'
|
|
14
|
-
|
|
15
|
-
export type CalendarTimeInternalProps = {
|
|
16
|
-
date: Date
|
|
17
|
-
onChange: (timeString: string) => void
|
|
18
|
-
value: string
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const CalendarTimeInternal: FC<CalendarTimeInternalProps> = ({ date, value, onChange }) => {
|
|
22
|
-
const [time, setTime] = useState(value)
|
|
23
|
-
const [timeInputError, setTimeInputError] = useState<string | undefined>()
|
|
24
|
-
|
|
25
|
-
/*
|
|
26
|
-
* Note:
|
|
27
|
-
* We cannot override how react-datepicker handles time values.
|
|
28
|
-
* It always expects format of "xx:xx" to parse the hours and minutes from. (See Source 2. link below)
|
|
29
|
-
*
|
|
30
|
-
* This is not an issue for majority of browsers, however as for IE11, where <input type="time" />
|
|
31
|
-
* fall back to <input type="text" />, this becomes an issue.
|
|
32
|
-
*
|
|
33
|
-
* Furthermore, the package even does not handle potential thrown error by date-fns' parse.
|
|
34
|
-
* Even the live demos do crash on an input like "10:10q" (See source 1. link below).
|
|
35
|
-
*
|
|
36
|
-
* For this reasons we need to provide our own wrapper around the functionality to achieve 2 things:
|
|
37
|
-
* - Provide IE11 with a proper fallback
|
|
38
|
-
* - Prevent the invalid input value crash
|
|
39
|
-
* - Provide the user with an input error in case the value is invalid
|
|
40
|
-
*
|
|
41
|
-
* Source(1): https://reactdatepicker.com/#example-custom-time-input
|
|
42
|
-
* Source(2): https://github.com/Hacker0x01/react-datepicker/blob/master/src/inputTime.jsx#L32
|
|
43
|
-
*/
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
setTime(value)
|
|
46
|
-
}, [value])
|
|
47
|
-
|
|
48
|
-
const handleTimeInputChange = useCallback(
|
|
49
|
-
({ target: { value } }: ChangeEvent<HTMLInputElement>) => {
|
|
50
|
-
setTime(value)
|
|
51
|
-
const parsedDate = parse(value, DATE_FORMAT_NO_MERIDIEM, date)
|
|
52
|
-
|
|
53
|
-
if (!isNaN(parsedDate.valueOf())) {
|
|
54
|
-
setTimeInputError(undefined)
|
|
55
|
-
onChange(value)
|
|
56
|
-
} else {
|
|
57
|
-
setTimeInputError('Invalid time')
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
[onChange, date],
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
const handleDateClick = useCallback(
|
|
64
|
-
(dp) => () => {
|
|
65
|
-
// Note: Input time (derived from timePoints) is in 'DATE_FORMAT'
|
|
66
|
-
const parsedDate = parse(dp, DATE_FORMAT, date)
|
|
67
|
-
// Note: Output time, that we feed back to 'react-datetime' is in 'DATE_FORMAT_NO_MERIDIEM' format
|
|
68
|
-
const timeStringWithoutAm = format(parsedDate, DATE_FORMAT_NO_MERIDIEM)
|
|
69
|
-
onChange(timeStringWithoutAm)
|
|
70
|
-
},
|
|
71
|
-
[onChange, date],
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<div data-test="calendar-time" className={styles.container}>
|
|
76
|
-
<div data-test="calendar-time-header" className={styles.header}>
|
|
77
|
-
<TimeField
|
|
78
|
-
ariaLabel="Time Input"
|
|
79
|
-
error={timeInputError}
|
|
80
|
-
className={styles.input}
|
|
81
|
-
name="time"
|
|
82
|
-
value={time.toString()}
|
|
83
|
-
onChange={handleTimeInputChange}
|
|
84
|
-
/>
|
|
85
|
-
</div>
|
|
86
|
-
<div data-test="calendar-time-timePoints" className={styles.timePoints}>
|
|
87
|
-
{timePoints.map((tP) => (
|
|
88
|
-
<Button
|
|
89
|
-
className={styles.timePoint}
|
|
90
|
-
bodyClassName={styles.timePointBody}
|
|
91
|
-
key={tP}
|
|
92
|
-
kind="transparent"
|
|
93
|
-
onClick={handleDateClick(tP)}
|
|
94
|
-
>
|
|
95
|
-
{tP}
|
|
96
|
-
</Button>
|
|
97
|
-
))}
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/*
|
|
104
|
-
* Note:
|
|
105
|
-
* The types are not available, the element is internally instantiated via React.cloneElement
|
|
106
|
-
* We need to accept the props as unknown and cast them in place
|
|
107
|
-
* Otherwise "Calendar.customTimeInput" would require us to pass them explicitly
|
|
108
|
-
*/
|
|
109
|
-
export type CalendarTimeProps = unknown
|
|
110
|
-
|
|
111
|
-
export const CalendarTime: FC<CalendarTimeProps> = (props) => {
|
|
112
|
-
// Note: Cast the "unknown" props to the actual type
|
|
113
|
-
const propsTyped = props as CalendarTimeInternalProps
|
|
114
|
-
|
|
115
|
-
return <CalendarTimeInternal {...propsTyped} />
|
|
116
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
export const timePoints = [
|
|
2
|
-
// Source: https://simple.wikipedia.org/wiki/12-hour_clock
|
|
3
|
-
'12:00 AM',
|
|
4
|
-
'12:15 AM',
|
|
5
|
-
'12:30 AM',
|
|
6
|
-
'12:45 AM',
|
|
7
|
-
'01:00 AM',
|
|
8
|
-
'01:15 AM',
|
|
9
|
-
'01:30 AM',
|
|
10
|
-
'01:45 AM',
|
|
11
|
-
'02:00 AM',
|
|
12
|
-
'02:15 AM',
|
|
13
|
-
'02:30 AM',
|
|
14
|
-
'02:45 AM',
|
|
15
|
-
'03:00 AM',
|
|
16
|
-
'03:15 AM',
|
|
17
|
-
'03:30 AM',
|
|
18
|
-
'03:45 AM',
|
|
19
|
-
'04:00 AM',
|
|
20
|
-
'04:15 AM',
|
|
21
|
-
'04:30 AM',
|
|
22
|
-
'04:45 AM',
|
|
23
|
-
'05:00 AM',
|
|
24
|
-
'05:15 AM',
|
|
25
|
-
'05:30 AM',
|
|
26
|
-
'05:45 AM',
|
|
27
|
-
'06:00 AM',
|
|
28
|
-
'06:15 AM',
|
|
29
|
-
'06:30 AM',
|
|
30
|
-
'06:45 AM',
|
|
31
|
-
'07:00 AM',
|
|
32
|
-
'07:15 AM',
|
|
33
|
-
'07:30 AM',
|
|
34
|
-
'07:45 AM',
|
|
35
|
-
'08:00 AM',
|
|
36
|
-
'08:15 AM',
|
|
37
|
-
'08:30 AM',
|
|
38
|
-
'08:45 AM',
|
|
39
|
-
'09:00 AM',
|
|
40
|
-
'09:15 AM',
|
|
41
|
-
'09:30 AM',
|
|
42
|
-
'09:45 AM',
|
|
43
|
-
'10:00 AM',
|
|
44
|
-
'10:15 AM',
|
|
45
|
-
'10:30 AM',
|
|
46
|
-
'10:45 AM',
|
|
47
|
-
'11:00 AM',
|
|
48
|
-
'11:15 AM',
|
|
49
|
-
'11:30 AM',
|
|
50
|
-
'11:45 AM',
|
|
51
|
-
'12:00 PM',
|
|
52
|
-
'12:15 PM',
|
|
53
|
-
'12:30 PM',
|
|
54
|
-
'12:45 PM',
|
|
55
|
-
'01:00 PM',
|
|
56
|
-
'01:15 PM',
|
|
57
|
-
'01:30 PM',
|
|
58
|
-
'01:45 PM',
|
|
59
|
-
'02:00 PM',
|
|
60
|
-
'02:15 PM',
|
|
61
|
-
'02:30 PM',
|
|
62
|
-
'02:45 PM',
|
|
63
|
-
'03:00 PM',
|
|
64
|
-
'03:15 PM',
|
|
65
|
-
'03:30 PM',
|
|
66
|
-
'03:45 PM',
|
|
67
|
-
'04:00 PM',
|
|
68
|
-
'04:15 PM',
|
|
69
|
-
'04:30 PM',
|
|
70
|
-
'04:45 PM',
|
|
71
|
-
'05:00 PM',
|
|
72
|
-
'05:15 PM',
|
|
73
|
-
'05:30 PM',
|
|
74
|
-
'05:45 PM',
|
|
75
|
-
'06:00 PM',
|
|
76
|
-
'06:15 PM',
|
|
77
|
-
'06:30 PM',
|
|
78
|
-
'06:45 PM',
|
|
79
|
-
'07:00 PM',
|
|
80
|
-
'07:15 PM',
|
|
81
|
-
'07:30 PM',
|
|
82
|
-
'07:45 PM',
|
|
83
|
-
'08:00 PM',
|
|
84
|
-
'08:15 PM',
|
|
85
|
-
'08:30 PM',
|
|
86
|
-
'08:45 PM',
|
|
87
|
-
'09:00 PM',
|
|
88
|
-
'09:15 PM',
|
|
89
|
-
'09:30 PM',
|
|
90
|
-
'09:45 PM',
|
|
91
|
-
'10:00 PM',
|
|
92
|
-
'10:15 PM',
|
|
93
|
-
'10:30 PM',
|
|
94
|
-
'10:45 PM',
|
|
95
|
-
'11:00 PM',
|
|
96
|
-
'11:15 PM',
|
|
97
|
-
'11:30 PM',
|
|
98
|
-
'11:45 PM',
|
|
99
|
-
]
|
package/lib/SelectField.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { DataTestProp } from '@hazelcast/helpers';
|
|
2
|
-
import React, { FocusEvent, InputHTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { GroupedOptionsType, Props as ReactSelectProps, OptionsType } from 'react-select';
|
|
4
|
-
import { HelpProps } from './Help';
|
|
5
|
-
import { IconProps } from './Icon';
|
|
6
|
-
export declare type SelectFieldOption<V> = {
|
|
7
|
-
label: string;
|
|
8
|
-
value: V;
|
|
9
|
-
};
|
|
10
|
-
declare type RenderMenuFooterFunction = () => ReactNode;
|
|
11
|
-
interface SelectFieldOptionsMap<V> {
|
|
12
|
-
[key: string]: SelectFieldOption<V>;
|
|
13
|
-
}
|
|
14
|
-
export declare type SelectFieldCoreStaticProps = {
|
|
15
|
-
name: string;
|
|
16
|
-
onBlur?: (e: FocusEvent<HTMLElement>) => void;
|
|
17
|
-
error?: string;
|
|
18
|
-
};
|
|
19
|
-
export declare type SelectFieldCoreDynamicProps<V> = {
|
|
20
|
-
isClearable: true;
|
|
21
|
-
isMulti?: false;
|
|
22
|
-
value: V | null;
|
|
23
|
-
onChange: (newValue: V | null) => void;
|
|
24
|
-
} | {
|
|
25
|
-
isClearable?: false;
|
|
26
|
-
isMulti?: false;
|
|
27
|
-
value: V;
|
|
28
|
-
onChange: (newValue: V) => void;
|
|
29
|
-
} | {
|
|
30
|
-
isMulti: true;
|
|
31
|
-
value: V[];
|
|
32
|
-
onChange: (newValue: V[]) => void;
|
|
33
|
-
};
|
|
34
|
-
declare type SelectFieldCreatableProps<V> = V extends string ? {
|
|
35
|
-
isCreatable?: boolean;
|
|
36
|
-
} : {
|
|
37
|
-
isCreatable?: false;
|
|
38
|
-
};
|
|
39
|
-
export declare type SelectFieldIconLeftProps = {
|
|
40
|
-
iconLeft: IconProps['icon'];
|
|
41
|
-
iconLeftAriaLabel: string;
|
|
42
|
-
iconLeftClassName?: string;
|
|
43
|
-
iconLeftContainerClassName?: string;
|
|
44
|
-
} | {
|
|
45
|
-
iconLeft?: never;
|
|
46
|
-
iconLeftAriaLabel?: never;
|
|
47
|
-
iconLeftClassName?: never;
|
|
48
|
-
iconLeftContainerClassName?: never;
|
|
49
|
-
};
|
|
50
|
-
export declare type SelectFieldExtraProps<V> = {
|
|
51
|
-
isCreatable?: boolean;
|
|
52
|
-
isClearable?: boolean;
|
|
53
|
-
options: GroupedOptionsType<SelectFieldOption<V>> | OptionsType<SelectFieldOption<V>>;
|
|
54
|
-
label: string;
|
|
55
|
-
showAriaLabel?: boolean;
|
|
56
|
-
helperText?: HelpProps['helperText'];
|
|
57
|
-
className?: string;
|
|
58
|
-
placeholder?: string;
|
|
59
|
-
labelClassName?: string;
|
|
60
|
-
errorClassName?: string;
|
|
61
|
-
menuPortalTarget?: 'body' | 'self' | HTMLElement | null;
|
|
62
|
-
formatGroupLabel?: ReactSelectProps<SelectFieldOption<V>>['formatGroupLabel'];
|
|
63
|
-
formatOptionLabel?: ReactSelectProps<SelectFieldOption<V>>['formatOptionLabel'];
|
|
64
|
-
renderMenuFooter?: RenderMenuFooterFunction;
|
|
65
|
-
styles?: ReactSelectProps<SelectFieldOption<V>>['styles'];
|
|
66
|
-
} & DataTestProp & Pick<InputHTMLAttributes<HTMLElement>, 'autoFocus' | 'disabled' | 'required' | 'placeholder'> & Pick<ReactSelectProps, 'isSearchable' | 'menuIsOpen' | 'menuPlacement' | 'noOptionsMessage' | 'inputValue'> & SelectFieldIconLeftProps;
|
|
67
|
-
export declare type SelectProps<V> = SelectFieldCoreStaticProps & SelectFieldCoreDynamicProps<V> & SelectFieldExtraProps<V> & SelectFieldCreatableProps<V>;
|
|
68
|
-
declare type GetSelectedOptionFromValueProps<V> = {
|
|
69
|
-
value: V | V[] | null;
|
|
70
|
-
optionsMap: SelectFieldOptionsMap<V>;
|
|
71
|
-
isMulti: boolean;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Transforms the value passed to our Select component so that it's in a format as underlying react-select expects
|
|
75
|
-
* @param value - single value or an array of values
|
|
76
|
-
* @param optionsMap - an object where option values are mapped to react-select expected objects
|
|
77
|
-
* @param isMulti - boolean indicating whether we're in a multiple mode or not
|
|
78
|
-
*/
|
|
79
|
-
export declare function getSelectedOptionFromValue<V extends string | number>({ value, optionsMap, isMulti, }: GetSelectedOptionFromValueProps<V>): SelectFieldOption<V> | SelectFieldOption<V>[] | null;
|
|
80
|
-
export declare const SelectField: <V extends React.ReactText = string>({ "data-test": dataTest, className, disabled, error, errorClassName, helperText, isClearable, isCreatable, isMulti, isSearchable, label, labelClassName, showAriaLabel, menuPortalTarget, menuPlacement, name, onChange, options, placeholder, required, value, formatGroupLabel, formatOptionLabel, renderMenuFooter, ...iconAndRest }: SelectProps<V>) => React.ReactElement<SelectProps<V>, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
81
|
-
export {};
|