@onewelcome/react-lib-components 0.2.1 → 0.2.4
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/Breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/dist/Button/BaseButton.d.ts +4 -4
- package/dist/Button/Button.d.ts +3 -3
- package/dist/Button/IconButton.d.ts +4 -4
- package/dist/ContextMenu/ContextMenu.d.ts +5 -5
- package/dist/ContextMenu/ContextMenuItem.d.ts +2 -2
- package/dist/DataGrid/DataGrid.d.ts +6 -6
- package/dist/DataGrid/DataGridActions/DataGridActions.d.ts +4 -4
- package/dist/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +3 -3
- package/dist/DataGrid/DataGridBody/DataGridBody.d.ts +3 -3
- package/dist/DataGrid/DataGridBody/DataGridCell.d.ts +2 -2
- package/dist/DataGrid/DataGridBody/DataGridRow.d.ts +3 -3
- package/dist/DataGrid/DataGridHeader/DataGridHeader.d.ts +3 -3
- package/dist/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +3 -3
- package/dist/DataGrid/datagrid.interfaces.d.ts +1 -1
- package/dist/Form/Checkbox/Checkbox.d.ts +5 -5
- package/dist/Form/Fieldset/Fieldset.d.ts +3 -3
- package/dist/Form/Form.d.ts +1 -1
- package/dist/Form/FormControl/FormControl.d.ts +3 -3
- package/dist/Form/FormGroup/FormGroup.d.ts +5 -5
- package/dist/Form/FormHelperText/FormHelperText.d.ts +3 -3
- package/dist/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +6 -6
- package/dist/Form/Input/Input.d.ts +5 -5
- package/dist/Form/Label/Label.d.ts +2 -2
- package/dist/Form/Radio/Radio.d.ts +5 -5
- package/dist/Form/Select/Option.d.ts +2 -2
- package/dist/Form/Select/Select.d.ts +5 -5
- package/dist/Form/Textarea/Textarea.d.ts +6 -6
- package/dist/Form/Toggle/Toggle.d.ts +3 -3
- package/dist/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/InputWrapper/InputWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/Wrapper/Wrapper.d.ts +6 -6
- package/dist/Form/form.interfaces.d.ts +2 -2
- package/dist/Icon/Icon.d.ts +3 -3
- package/dist/Link/Link.d.ts +7 -7
- package/dist/Notifications/BaseModal/BaseModal.d.ts +4 -4
- package/dist/Notifications/BaseModal/BaseModalActions/BaseModalActions.d.ts +2 -2
- package/dist/Notifications/BaseModal/BaseModalContent/BaseModalContent.d.ts +2 -2
- package/dist/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +2 -2
- package/dist/Notifications/Dialog/Dialog.d.ts +5 -5
- package/dist/Notifications/Dialog/DialogActions/DialogActions.d.ts +3 -3
- package/dist/Notifications/Dialog/DialogTitle/DialogTitle.d.ts +2 -2
- package/dist/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.d.ts +3 -3
- package/dist/Notifications/DiscardChangesModal/DiscardChangesModal.d.ts +7 -7
- package/dist/Notifications/Modal/Modal.d.ts +1 -1
- package/dist/Notifications/Modal/ModalActions/ModalActions.d.ts +1 -1
- package/dist/Notifications/Modal/ModalContent/ModalContent.d.ts +1 -1
- package/dist/Notifications/Modal/ModalHeader/ModalHeader.d.ts +1 -1
- package/dist/Notifications/SlideInModal/SlideInModal.d.ts +3 -3
- package/dist/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +3 -3
- package/dist/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +2 -2
- package/dist/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +3 -3
- package/dist/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +2 -2
- package/dist/Notifications/Snackbar/interfaces.d.ts +2 -2
- package/dist/Pagination/Pagination.d.ts +3 -3
- package/dist/Popover/Popover.d.ts +3 -3
- package/dist/Skeleton/Skeleton.d.ts +3 -3
- package/dist/StatusIndicator/StatusIndicator.d.ts +5 -5
- package/dist/Tabs/Tab.d.ts +1 -1
- package/dist/Tabs/TabButton.d.ts +2 -2
- package/dist/Tabs/TabPanel.d.ts +2 -2
- package/dist/Tabs/Tabs.d.ts +4 -4
- package/dist/TextEllipsis/TextEllipsis.d.ts +2 -2
- package/dist/Tiles/Tile.d.ts +5 -5
- package/dist/Tiles/Tiles.d.ts +2 -2
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/Typography/Typography.d.ts +3 -3
- package/dist/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +2 -2
- package/dist/Wizard/Wizard.d.ts +3 -3
- package/dist/Wizard/WizardActions/WizardActions.d.ts +2 -2
- package/dist/Wizard/WizardStateProvider.d.ts +2 -2
- package/dist/Wizard/WizardSteps/WizardSteps.d.ts +2 -2
- package/dist/Wizard/wizardStateReducer.d.ts +5 -5
- package/dist/_BaseStyling_/BaseStyling.d.ts +1 -1
- package/dist/hooks/usePosition.d.ts +5 -5
- package/dist/hooks/useRepeater.d.ts +1 -1
- package/dist/hooks/useScroll.d.ts +1 -1
- package/dist/hooks/useSpacing.d.ts +1 -1
- package/dist/hooks/useWrapper.d.ts +1 -1
- package/dist/index.d.ts +55 -55
- package/dist/interfaces.d.ts +1 -1
- package/dist/react-lib-components.cjs.development.js +683 -581
- package/dist/react-lib-components.cjs.development.js.map +1 -1
- package/dist/react-lib-components.cjs.production.min.js +1 -1
- package/dist/react-lib-components.cjs.production.min.js.map +1 -1
- package/dist/react-lib-components.esm.js +683 -581
- package/dist/react-lib-components.esm.js.map +1 -1
- package/package.json +27 -16
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +15 -15
- package/src/Breadcrumbs/Breadcrumbs.tsx +11 -11
- package/src/Button/BaseButton.module.scss +1 -1
- package/src/Button/BaseButton.test.tsx +27 -27
- package/src/Button/BaseButton.tsx +8 -8
- package/src/Button/Button.module.scss +5 -5
- package/src/Button/Button.test.tsx +39 -39
- package/src/Button/Button.tsx +10 -10
- package/src/Button/IconButton.module.scss +5 -5
- package/src/Button/IconButton.test.tsx +29 -29
- package/src/Button/IconButton.tsx +11 -11
- package/src/ContextMenu/ContextMenu.test.tsx +97 -76
- package/src/ContextMenu/ContextMenu.tsx +48 -42
- package/src/ContextMenu/ContextMenuItem.module.scss +1 -1
- package/src/ContextMenu/ContextMenuItem.tsx +8 -5
- package/src/DataGrid/DataGrid.test.tsx +193 -193
- package/src/DataGrid/DataGrid.tsx +26 -26
- package/src/DataGrid/DataGridActions/DataGridActions.test.tsx +63 -63
- package/src/DataGrid/DataGridActions/DataGridActions.tsx +15 -15
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss +1 -1
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.test.tsx +21 -21
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx +20 -20
- package/src/DataGrid/DataGridBody/DataGridBody.test.tsx +40 -40
- package/src/DataGrid/DataGridBody/DataGridBody.tsx +10 -10
- package/src/DataGrid/DataGridBody/DataGridCell.module.scss +1 -1
- package/src/DataGrid/DataGridBody/DataGridCell.test.tsx +25 -25
- package/src/DataGrid/DataGridBody/DataGridCell.tsx +6 -6
- package/src/DataGrid/DataGridBody/DataGridRow.test.tsx +38 -38
- package/src/DataGrid/DataGridBody/DataGridRow.tsx +9 -9
- package/src/DataGrid/DataGridHeader/DataGridHeader.module.scss +1 -2
- package/src/DataGrid/DataGridHeader/DataGridHeader.test.tsx +119 -119
- package/src/DataGrid/DataGridHeader/DataGridHeader.tsx +13 -13
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +2 -0
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.test.tsx +51 -51
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx +14 -14
- package/src/DataGrid/datagrid.interfaces.ts +1 -1
- package/src/Form/Checkbox/Checkbox.test.tsx +74 -74
- package/src/Form/Checkbox/Checkbox.tsx +27 -27
- package/src/Form/Fieldset/Fieldset.module.scss +1 -1
- package/src/Form/Fieldset/Fieldset.test.tsx +35 -35
- package/src/Form/Fieldset/Fieldset.tsx +27 -27
- package/src/Form/Form.test.tsx +18 -18
- package/src/Form/Form.tsx +3 -3
- package/src/Form/FormControl/FormControl.test.tsx +22 -22
- package/src/Form/FormControl/FormControl.tsx +10 -10
- package/src/Form/FormGroup/FormGroup.test.tsx +37 -37
- package/src/Form/FormGroup/FormGroup.tsx +16 -16
- package/src/Form/FormHelperText/FormHelperText.test.tsx +18 -18
- package/src/Form/FormHelperText/FormHelperText.tsx +7 -7
- package/src/Form/FormSelectorWrapper/FormSelectorWrapper.test.tsx +15 -15
- package/src/Form/FormSelectorWrapper/FormSelectorWrapper.tsx +14 -14
- package/src/Form/Input/Input.module.scss +20 -44
- package/src/Form/Input/Input.test.tsx +121 -73
- package/src/Form/Input/Input.tsx +96 -35
- package/src/Form/Label/Label.test.tsx +13 -13
- package/src/Form/Label/Label.tsx +6 -6
- package/src/Form/Radio/Radio.test.tsx +35 -35
- package/src/Form/Radio/Radio.tsx +17 -17
- package/src/Form/Select/Option.test.tsx +10 -10
- package/src/Form/Select/Option.tsx +8 -8
- package/src/Form/Select/Select.module.scss +7 -9
- package/src/Form/Select/Select.test.tsx +144 -141
- package/src/Form/Select/Select.tsx +79 -78
- package/src/Form/Textarea/Textarea.module.scss +8 -18
- package/src/Form/Textarea/Textarea.test.tsx +27 -27
- package/src/Form/Textarea/Textarea.tsx +33 -13
- package/src/Form/Toggle/Toggle.module.scss +1 -1
- package/src/Form/Toggle/Toggle.test.tsx +22 -22
- package/src/Form/Toggle/Toggle.tsx +10 -10
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.tsx +39 -39
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx +12 -12
- package/src/Form/Wrapper/InputWrapper/InputWrapper.module.scss +2 -8
- package/src/Form/Wrapper/InputWrapper/InputWrapper.test.tsx +55 -55
- package/src/Form/Wrapper/InputWrapper/InputWrapper.tsx +30 -35
- package/src/Form/Wrapper/RadioWrapper/RadioWrapper.test.tsx +35 -35
- package/src/Form/Wrapper/RadioWrapper/RadioWrapper.tsx +12 -12
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.test.tsx +55 -55
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +12 -12
- package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +2 -11
- package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.test.tsx +50 -50
- package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx +22 -22
- package/src/Form/Wrapper/Wrapper/Wrapper.module.scss +2 -2
- package/src/Form/Wrapper/Wrapper/Wrapper.test.tsx +11 -11
- package/src/Form/Wrapper/Wrapper/Wrapper.tsx +17 -17
- package/src/Form/form.interfaces.ts +2 -2
- package/src/Icon/Icon.module.scss +71 -71
- package/src/Icon/Icon.test.tsx +18 -18
- package/src/Icon/Icon.tsx +70 -70
- package/src/Link/Link.module.scss +5 -5
- package/src/Link/Link.test.tsx +76 -76
- package/src/Link/Link.tsx +27 -27
- package/src/Link/types.d.ts +2 -2
- package/src/Notifications/BaseModal/BaseModal.module.scss +1 -1
- package/src/Notifications/BaseModal/BaseModal.test.tsx +53 -53
- package/src/Notifications/BaseModal/BaseModal.tsx +16 -16
- package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.test.tsx +13 -13
- package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx +5 -5
- package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.test.tsx +16 -16
- package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.tsx +5 -5
- package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.test.tsx +19 -19
- package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx +10 -10
- package/src/Notifications/Dialog/Dialog.test.tsx +35 -35
- package/src/Notifications/Dialog/Dialog.tsx +19 -19
- package/src/Notifications/Dialog/DialogActions/DialogActions.test.tsx +14 -14
- package/src/Notifications/Dialog/DialogActions/DialogActions.tsx +6 -6
- package/src/Notifications/Dialog/DialogTitle/DialogTitle.test.tsx +12 -12
- package/src/Notifications/Dialog/DialogTitle/DialogTitle.tsx +6 -6
- package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.test.tsx +20 -20
- package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +7 -7
- package/src/Notifications/DiscardChangesModal/DiscardChangesModal.test.tsx +36 -36
- package/src/Notifications/DiscardChangesModal/DiscardChangesModal.tsx +8 -8
- package/src/Notifications/Modal/Modal.test.tsx +6 -6
- package/src/Notifications/Modal/Modal.tsx +1 -1
- package/src/Notifications/Modal/ModalActions/ModalActions.tsx +2 -2
- package/src/Notifications/Modal/ModalContent/ModalContent.tsx +2 -2
- package/src/Notifications/Modal/ModalHeader/ModalHeader.tsx +2 -2
- package/src/Notifications/SlideInModal/SlideInModal.test.tsx +16 -16
- package/src/Notifications/SlideInModal/SlideInModal.tsx +16 -11
- package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.tsx +16 -16
- package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +6 -6
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +2 -2
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.tsx +17 -17
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +23 -23
- package/src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.tsx +32 -32
- package/src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +18 -18
- package/src/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +3 -3
- package/src/Notifications/Snackbar/interfaces.ts +2 -2
- package/src/Notifications/Snackbar/useSnackbar.ts +2 -2
- package/src/Pagination/Pagination.module.scss +2 -0
- package/src/Pagination/Pagination.test.tsx +47 -47
- package/src/Pagination/Pagination.tsx +35 -35
- package/src/Popover/Popover.test.tsx +19 -19
- package/src/Popover/Popover.tsx +7 -7
- package/src/Skeleton/Skeleton.module.scss +2 -2
- package/src/Skeleton/Skeleton.test.tsx +29 -29
- package/src/Skeleton/Skeleton.tsx +10 -10
- package/src/StatusIndicator/StatusIndicator.test.tsx +38 -38
- package/src/StatusIndicator/StatusIndicator.tsx +9 -9
- package/src/Tabs/Tab.test.tsx +13 -13
- package/src/Tabs/Tab.tsx +1 -1
- package/src/Tabs/TabButton.test.tsx +28 -28
- package/src/Tabs/TabButton.tsx +7 -7
- package/src/Tabs/TabPanel.test.tsx +30 -30
- package/src/Tabs/TabPanel.tsx +4 -4
- package/src/Tabs/Tabs.test.tsx +93 -93
- package/src/Tabs/Tabs.tsx +25 -25
- package/src/TextEllipsis/TextEllipsis.test.tsx +22 -22
- package/src/TextEllipsis/TextEllipsis.tsx +6 -6
- package/src/Tiles/Tile.module.scss +1 -1
- package/src/Tiles/Tile.test.tsx +42 -42
- package/src/Tiles/Tile.tsx +22 -22
- package/src/Tiles/Tiles.test.tsx +30 -30
- package/src/Tiles/Tiles.tsx +9 -9
- package/src/Tooltip/Tooltip.test.tsx +35 -35
- package/src/Tooltip/Tooltip.tsx +21 -21
- package/src/Typography/Typography.module.scss +1 -1
- package/src/Typography/Typography.test.tsx +49 -49
- package/src/Typography/Typography.tsx +42 -42
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.module.scss +1 -1
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.test.tsx +26 -26
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.tsx +24 -24
- package/src/Wizard/Wizard.test.tsx +56 -56
- package/src/Wizard/Wizard.tsx +6 -6
- package/src/Wizard/WizardActions/WizardActions.test.tsx +34 -34
- package/src/Wizard/WizardActions/WizardActions.tsx +14 -14
- package/src/Wizard/WizardStateProvider.tsx +3 -3
- package/src/Wizard/WizardSteps/WizardSteps.test.tsx +27 -27
- package/src/Wizard/WizardSteps/WizardSteps.tsx +7 -7
- package/src/Wizard/wizardStateReducer.ts +9 -9
- package/src/_BaseStyling_/BaseStyling.test.tsx +14 -14
- package/src/_BaseStyling_/BaseStyling.tsx +50 -50
- package/src/hooks/useAnimation.test.tsx +12 -12
- package/src/hooks/useAnimation.ts +4 -4
- package/src/hooks/useBodyClick.test.tsx +8 -8
- package/src/hooks/useBodyClick.ts +3 -3
- package/src/hooks/useFormSelector.test.ts +17 -17
- package/src/hooks/useFormSelector.ts +4 -4
- package/src/hooks/usePosition.test.tsx +215 -215
- package/src/hooks/usePosition.ts +73 -72
- package/src/hooks/useRepeater.test.tsx +26 -26
- package/src/hooks/useRepeater.ts +5 -5
- package/src/hooks/useScroll.test.tsx +5 -5
- package/src/hooks/useScroll.ts +3 -3
- package/src/hooks/useSpacing.test.ts +40 -40
- package/src/hooks/useSpacing.ts +3 -3
- package/src/hooks/useWrapper.test.ts +12 -12
- package/src/hooks/useWrapper.ts +10 -10
- package/src/index.ts +67 -67
- package/src/interfaces.ts +1 -1
- package/src/mixins.module.scss +76 -27
- package/src/types.d.ts +1 -1
- package/src/util/helper.test.tsx +25 -25
- package/src/util/helper.tsx +64 -64
|
@@ -46,56 +46,56 @@ var BaseStyling = function BaseStyling(_ref) {
|
|
|
46
46
|
_ref$properties = _ref.properties,
|
|
47
47
|
properties = _ref$properties === void 0 ? {} : _ref$properties;
|
|
48
48
|
var defaultProperties = {
|
|
49
|
-
colorFocus:
|
|
50
|
-
colorPrimary:
|
|
51
|
-
colorSecondary:
|
|
52
|
-
colorTertiary:
|
|
53
|
-
defaultLineHeight:
|
|
54
|
-
buttonBorderRadius:
|
|
55
|
-
buttonBorderWidth:
|
|
56
|
-
buttonFontSize:
|
|
57
|
-
buttonBorderStyle:
|
|
58
|
-
buttonFillTextColor:
|
|
59
|
-
buttonFillBackgroundColor:
|
|
60
|
-
buttonOutlineHoverTextColor:
|
|
61
|
-
inputBorderColor:
|
|
62
|
-
inputBorderRadius:
|
|
63
|
-
inputBorderWidth:
|
|
64
|
-
inputBorderWidthFocus:
|
|
65
|
-
inputBorderStyle:
|
|
66
|
-
inputBackgroundColor:
|
|
67
|
-
modalShadowColor:
|
|
68
|
-
modalBackgroundColor:
|
|
69
|
-
modalHeaderBackgroundColor:
|
|
70
|
-
snackbarTextColor:
|
|
71
|
-
snackbarInfoBackgroundColor:
|
|
72
|
-
snackbarSuccessBackgroundColor:
|
|
73
|
-
snackbarErrorBackgroundColor:
|
|
74
|
-
snackbarBorderRadius:
|
|
75
|
-
dataGridRowBackgroundColor:
|
|
76
|
-
dataGridRowHoverBackgroundColor:
|
|
77
|
-
tabsBackgroundColor:
|
|
78
|
-
tabBorderWidth:
|
|
79
|
-
tabBorderStyle:
|
|
80
|
-
tablistBorderWidth:
|
|
81
|
-
tablistBorderStyle:
|
|
82
|
-
tablistBorderColor:
|
|
83
|
-
tabTextColor:
|
|
84
|
-
"default":
|
|
85
|
-
success:
|
|
86
|
-
error:
|
|
87
|
-
disabled:
|
|
88
|
-
greyedOut:
|
|
89
|
-
warning:
|
|
49
|
+
colorFocus: "#0085f2",
|
|
50
|
+
colorPrimary: "#9e006b",
|
|
51
|
+
colorSecondary: "#003b5e",
|
|
52
|
+
colorTertiary: "#ff1e4e",
|
|
53
|
+
defaultLineHeight: "26px",
|
|
54
|
+
buttonBorderRadius: "20px",
|
|
55
|
+
buttonBorderWidth: "2px",
|
|
56
|
+
buttonFontSize: "1rem",
|
|
57
|
+
buttonBorderStyle: "solid",
|
|
58
|
+
buttonFillTextColor: "#fff",
|
|
59
|
+
buttonFillBackgroundColor: "#fff",
|
|
60
|
+
buttonOutlineHoverTextColor: "#fff",
|
|
61
|
+
inputBorderColor: "#e9e9eb",
|
|
62
|
+
inputBorderRadius: "8px",
|
|
63
|
+
inputBorderWidth: "1px",
|
|
64
|
+
inputBorderWidthFocus: "2px",
|
|
65
|
+
inputBorderStyle: "solid",
|
|
66
|
+
inputBackgroundColor: "#fff",
|
|
67
|
+
modalShadowColor: "rgba(0, 0, 0, 0.16)",
|
|
68
|
+
modalBackgroundColor: "#f5f8f8",
|
|
69
|
+
modalHeaderBackgroundColor: "#fff",
|
|
70
|
+
snackbarTextColor: "#fff",
|
|
71
|
+
snackbarInfoBackgroundColor: "#003b5e",
|
|
72
|
+
snackbarSuccessBackgroundColor: "#008a28",
|
|
73
|
+
snackbarErrorBackgroundColor: "#d9291c",
|
|
74
|
+
snackbarBorderRadius: "8px",
|
|
75
|
+
dataGridRowBackgroundColor: "transparent",
|
|
76
|
+
dataGridRowHoverBackgroundColor: "#f5e6f0",
|
|
77
|
+
tabsBackgroundColor: "#FFF",
|
|
78
|
+
tabBorderWidth: "2px",
|
|
79
|
+
tabBorderStyle: "solid",
|
|
80
|
+
tablistBorderWidth: "1px",
|
|
81
|
+
tablistBorderStyle: "solid",
|
|
82
|
+
tablistBorderColor: "#C3C3C7",
|
|
83
|
+
tabTextColor: "#0f0f1e",
|
|
84
|
+
"default": "#0f0f1e",
|
|
85
|
+
success: "#008a28",
|
|
86
|
+
error: "#d9291c",
|
|
87
|
+
disabled: "#e9e9eb",
|
|
88
|
+
greyedOut: "#6f6f76",
|
|
89
|
+
warning: "#ff6105",
|
|
90
90
|
fontFamily: "'Red Hat Display', sans-serif",
|
|
91
91
|
fontFamilyCode: "'Red Hat Mono', sans-serif",
|
|
92
|
-
fontSize:
|
|
93
|
-
fontSizeH1:
|
|
94
|
-
fontSizeH2:
|
|
95
|
-
fontSizeH3:
|
|
96
|
-
fontSizeH4:
|
|
97
|
-
fontSizeSub:
|
|
98
|
-
fontSizeCode:
|
|
92
|
+
fontSize: "1rem",
|
|
93
|
+
fontSizeH1: "2.5rem",
|
|
94
|
+
fontSizeH2: "1.625rem",
|
|
95
|
+
fontSizeH3: "1.5rem",
|
|
96
|
+
fontSizeH4: "1.25rem",
|
|
97
|
+
fontSizeSub: ".75rem",
|
|
98
|
+
fontSizeCode: "1rem"
|
|
99
99
|
};
|
|
100
100
|
/** We need a loading state, because otherwise you see the colors flash from the default to the possible overridden ones. */
|
|
101
101
|
|
|
@@ -145,16 +145,16 @@ var _excluded$Y = ["children", "type", "className"];
|
|
|
145
145
|
var BaseButton = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
146
146
|
var children = _ref.children,
|
|
147
147
|
_ref$type = _ref.type,
|
|
148
|
-
type = _ref$type === void 0 ?
|
|
148
|
+
type = _ref$type === void 0 ? "button" : _ref$type,
|
|
149
149
|
className = _ref.className,
|
|
150
150
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$Y);
|
|
151
151
|
|
|
152
|
-
var validTypes = [
|
|
152
|
+
var validTypes = ["submit", "button", "reset"];
|
|
153
153
|
if (!validTypes.includes(type)) throw new Error("You have entered an invalid button type. Expected 'submit', 'button' or 'reset' got " + type);
|
|
154
154
|
return React__default["default"].createElement("button", _extends({}, rest, {
|
|
155
155
|
ref: ref,
|
|
156
156
|
type: type,
|
|
157
|
-
className: modules_3484519b.button + " " + (className ? className :
|
|
157
|
+
className: modules_3484519b.button + " " + (className ? className : "")
|
|
158
158
|
}), children);
|
|
159
159
|
});
|
|
160
160
|
|
|
@@ -166,9 +166,9 @@ var _excluded$X = ["children", "variant", "color", "startIcon", "endIcon", "clas
|
|
|
166
166
|
var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
167
167
|
var children = _ref.children,
|
|
168
168
|
_ref$variant = _ref.variant,
|
|
169
|
-
variant = _ref$variant === void 0 ?
|
|
169
|
+
variant = _ref$variant === void 0 ? "fill" : _ref$variant,
|
|
170
170
|
_ref$color = _ref.color,
|
|
171
|
-
color = _ref$color === void 0 ?
|
|
171
|
+
color = _ref$color === void 0 ? "primary" : _ref$color,
|
|
172
172
|
_ref$startIcon = _ref.startIcon,
|
|
173
173
|
startIcon = _ref$startIcon === void 0 ? false : _ref$startIcon,
|
|
174
174
|
_ref$endIcon = _ref.endIcon,
|
|
@@ -179,15 +179,15 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
179
179
|
var additionalClasses = [];
|
|
180
180
|
|
|
181
181
|
if (startIcon || endIcon) {
|
|
182
|
-
additionalClasses.push(modules_79b43374[
|
|
182
|
+
additionalClasses.push(modules_79b43374["has-icon"]);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
if (startIcon) {
|
|
186
|
-
additionalClasses.push(modules_79b43374[
|
|
186
|
+
additionalClasses.push(modules_79b43374["start-icon"]);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
if (endIcon) {
|
|
190
|
-
additionalClasses.push(modules_79b43374[
|
|
190
|
+
additionalClasses.push(modules_79b43374["end-icon"]);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
if (className) {
|
|
@@ -196,7 +196,7 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
196
196
|
|
|
197
197
|
return React__default["default"].createElement(BaseButton, _extends({}, rest, {
|
|
198
198
|
ref: ref,
|
|
199
|
-
className: modules_79b43374[color] + " " + modules_79b43374[variant] + " " + additionalClasses.join(
|
|
199
|
+
className: modules_79b43374[color] + " " + modules_79b43374[variant] + " " + additionalClasses.join(" ")
|
|
200
200
|
}), startIcon && React__default["default"].createElement("i", null, startIcon, "\xA0"), React__default["default"].createElement("span", null, children), endIcon && React__default["default"].createElement("i", null, "\xA0", endIcon));
|
|
201
201
|
});
|
|
202
202
|
|
|
@@ -281,7 +281,7 @@ var Icon = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref
|
|
|
281
281
|
style = _ref.style,
|
|
282
282
|
size = _ref.size,
|
|
283
283
|
_ref$tag = _ref.tag,
|
|
284
|
-
tag = _ref$tag === void 0 ?
|
|
284
|
+
tag = _ref$tag === void 0 ? "span" : _ref$tag,
|
|
285
285
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$W);
|
|
286
286
|
|
|
287
287
|
var Component = tag;
|
|
@@ -294,16 +294,16 @@ var Icon = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref
|
|
|
294
294
|
}),
|
|
295
295
|
"data-icon": true,
|
|
296
296
|
"aria-hidden": "true",
|
|
297
|
-
className: modules_c4937a59[
|
|
297
|
+
className: modules_c4937a59["icon"] + " " + modules_c4937a59["icon-" + icon] + " " + (className ? className : "")
|
|
298
298
|
}));
|
|
299
299
|
});
|
|
300
300
|
|
|
301
|
-
var css$T = ".
|
|
302
|
-
var modules_e6a5a2d0 = {"typography_style_h1":"
|
|
301
|
+
var css$T = ".Typography_module_typography_style_h1__c956bd00 {\n font-family: var(--font-family);\n font-size: var(--font-size-h1);\n font-style: normal;\n font-variant: normal;\n line-height: 1.2;\n font-weight: 700;\n text-transform: none;\n letter-spacing: 0;\n color: var(--default);\n margin: 0 0 1rem 0;\n}\n.Typography_module_typography_style_h2__c956bd00 {\n font-family: var(--font-family);\n font-size: var(--font-size-h2);\n font-style: normal;\n font-variant: normal;\n line-height: 1.42857;\n font-weight: 700;\n text-transform: none;\n letter-spacing: 0;\n color: var(--default);\n margin: 0 0 1rem 0;\n}\n.Typography_module_typography_style_h3__c956bd00 {\n font-family: var(--font-family);\n font-size: var(--font-size-h3);\n font-style: normal;\n font-variant: normal;\n line-height: 1.16666;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n color: var(--default);\n margin: 0 0 1rem 0;\n}\n.Typography_module_typography_style_h4__c956bd00 {\n font-family: var(--font-family);\n font-size: var(--font-size-h4);\n font-style: normal;\n font-variant: normal;\n line-height: 1.2;\n font-weight: 700;\n text-transform: none;\n letter-spacing: 0;\n color: var(--default);\n margin: 0 0 1rem 0;\n}\n.Typography_module_typography_style_body__c956bd00 {\n font-family: var(--font-family);\n font-size: var(--font-size);\n font-style: normal;\n font-variant: normal;\n line-height: 1.5;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n color: var(--default);\n margin: 0 0 1rem 0;\n}\n.Typography_module_typography_style_bodyBold__c956bd00 {\n font-family: var(--font-family);\n font-size: var(--font-size);\n font-style: normal;\n font-variant: normal;\n line-height: 1.5;\n font-weight: 700;\n text-transform: none;\n letter-spacing: 0;\n color: var(--default);\n margin: 0 0 1rem 0;\n}\n.Typography_module_typography_style_subText__c956bd00 {\n font-family: var(--font-family);\n font-size: var(--font-size-sub);\n font-style: normal;\n font-variant: normal;\n line-height: 1.333;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n color: var(--default);\n margin: 0 0 1rem 0;\n}\n.Typography_module_typography_style_code__c956bd00 {\n font-family: var(--font-family-code);\n font-size: var(--font-size-code);\n font-style: normal;\n font-variant: normal;\n line-height: 1.5;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n color: var(--default);\n margin: 0 0 1rem 0;\n}";
|
|
302
|
+
var modules_e6a5a2d0 = {"typography_style_h1":"Typography_module_typography_style_h1__c956bd00","typography_style_h2":"Typography_module_typography_style_h2__c956bd00","typography_style_h3":"Typography_module_typography_style_h3__c956bd00","typography_style_h4":"Typography_module_typography_style_h4__c956bd00","typography_style_body":"Typography_module_typography_style_body__c956bd00","typography_style_body-bold":"Typography_module_typography_style_bodyBold__c956bd00","typography_style_sub-text":"Typography_module_typography_style_subText__c956bd00","typography_style_code":"Typography_module_typography_style_code__c956bd00"};
|
|
303
303
|
n(css$T,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
304
304
|
|
|
305
305
|
var defaultFactor = 0.25;
|
|
306
|
-
var defaultUnit =
|
|
306
|
+
var defaultUnit = "rem";
|
|
307
307
|
var spacingNumberRegex = /(\d+\.?\d*)+/g;
|
|
308
308
|
var useSpacing = function useSpacing(spacingProps, style) {
|
|
309
309
|
if (spacingProps) {
|
|
@@ -316,7 +316,7 @@ var useSpacing = function useSpacing(spacingProps, style) {
|
|
|
316
316
|
var cssSpacingValue = Array.from(matches).map(function (_ref2) {
|
|
317
317
|
var multiplierValue = _ref2[0];
|
|
318
318
|
return "" + Number(multiplierValue) * defaultFactor + defaultUnit;
|
|
319
|
-
}).join(
|
|
319
|
+
}).join(" ");
|
|
320
320
|
return _extends({}, prev, (_extends2 = {}, _extends2[spacing] = cssSpacingValue, _extends2));
|
|
321
321
|
}, style != null ? style : {});
|
|
322
322
|
}
|
|
@@ -325,7 +325,7 @@ var useSpacing = function useSpacing(spacingProps, style) {
|
|
|
325
325
|
};
|
|
326
326
|
|
|
327
327
|
var _excluded$V = ["children", "variant", "tag", "style", "spacing", "className"];
|
|
328
|
-
var validVariants = [
|
|
328
|
+
var validVariants = ["h1", "h2", "h3", "h4", "body", "body-bold", "sub-text", "code"];
|
|
329
329
|
var Typography = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
330
330
|
var children = _ref.children,
|
|
331
331
|
variant = _ref.variant,
|
|
@@ -333,7 +333,7 @@ var Typography = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
333
333
|
style = _ref.style,
|
|
334
334
|
spacing = _ref.spacing,
|
|
335
335
|
_ref$className = _ref.className,
|
|
336
|
-
className = _ref$className === void 0 ?
|
|
336
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
337
337
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$V);
|
|
338
338
|
|
|
339
339
|
if (!validVariants.includes(variant)) {
|
|
@@ -344,28 +344,28 @@ var Typography = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
344
344
|
|
|
345
345
|
if (!tag) {
|
|
346
346
|
switch (variant) {
|
|
347
|
-
case
|
|
348
|
-
case
|
|
349
|
-
case
|
|
350
|
-
case
|
|
351
|
-
case
|
|
347
|
+
case "h1":
|
|
348
|
+
case "h2":
|
|
349
|
+
case "h3":
|
|
350
|
+
case "h4":
|
|
351
|
+
case "code":
|
|
352
352
|
tag = variant;
|
|
353
353
|
break;
|
|
354
354
|
|
|
355
|
-
case
|
|
356
|
-
tag =
|
|
355
|
+
case "body":
|
|
356
|
+
tag = "p";
|
|
357
357
|
break;
|
|
358
358
|
|
|
359
|
-
case
|
|
360
|
-
tag =
|
|
359
|
+
case "body-bold":
|
|
360
|
+
tag = "p";
|
|
361
361
|
break;
|
|
362
362
|
|
|
363
|
-
case
|
|
364
|
-
tag =
|
|
363
|
+
case "sub-text":
|
|
364
|
+
tag = "span";
|
|
365
365
|
break;
|
|
366
366
|
|
|
367
367
|
default:
|
|
368
|
-
tag =
|
|
368
|
+
tag = "div";
|
|
369
369
|
break;
|
|
370
370
|
}
|
|
371
371
|
}
|
|
@@ -374,7 +374,7 @@ var Typography = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
374
374
|
return React__default["default"].createElement(TagName, _extends({}, rest, {
|
|
375
375
|
ref: ref,
|
|
376
376
|
style: styleWithSpacing,
|
|
377
|
-
className: modules_e6a5a2d0[
|
|
377
|
+
className: modules_e6a5a2d0["typography_style_" + variant] + " " + className
|
|
378
378
|
}), children);
|
|
379
379
|
});
|
|
380
380
|
|
|
@@ -385,9 +385,9 @@ n(css$S,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
|
385
385
|
var _excluded$U = ["children", "aria-label", "className"];
|
|
386
386
|
var Breadcrumbs = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
387
387
|
var children = _ref.children,
|
|
388
|
-
ariaLabel = _ref[
|
|
388
|
+
ariaLabel = _ref["aria-label"],
|
|
389
389
|
_ref$className = _ref.className,
|
|
390
|
-
className = _ref$className === void 0 ?
|
|
390
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
391
391
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$U);
|
|
392
392
|
|
|
393
393
|
var items = React__default["default"].Children.map(children, function (child, index) {
|
|
@@ -398,7 +398,7 @@ var Breadcrumbs = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
398
398
|
key: child.key,
|
|
399
399
|
variant: "body",
|
|
400
400
|
tag: "span",
|
|
401
|
-
className: modules_a04642f2[
|
|
401
|
+
className: modules_a04642f2["last"],
|
|
402
402
|
"aria-current": "page"
|
|
403
403
|
}, child.props.children);
|
|
404
404
|
} else {
|
|
@@ -406,14 +406,14 @@ var Breadcrumbs = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
406
406
|
key: child.key
|
|
407
407
|
}, React__default["default"].cloneElement(child), React__default["default"].createElement(Icon, {
|
|
408
408
|
icon: exports.Icons.ChevronRight,
|
|
409
|
-
className: modules_a04642f2[
|
|
409
|
+
className: modules_a04642f2["icon"]
|
|
410
410
|
}));
|
|
411
411
|
}
|
|
412
412
|
});
|
|
413
413
|
return React__default["default"].createElement("nav", _extends({}, rest, {
|
|
414
414
|
ref: ref,
|
|
415
415
|
"aria-label": ariaLabel,
|
|
416
|
-
className: modules_a04642f2[
|
|
416
|
+
className: modules_a04642f2["breadcrumbs"] + " " + className
|
|
417
417
|
}), items);
|
|
418
418
|
});
|
|
419
419
|
|
|
@@ -421,12 +421,12 @@ var defaultConfigObject = {
|
|
|
421
421
|
relativeElement: undefined,
|
|
422
422
|
elementToBePositioned: undefined,
|
|
423
423
|
transformOrigin: {
|
|
424
|
-
horizontal:
|
|
425
|
-
vertical:
|
|
424
|
+
horizontal: "left",
|
|
425
|
+
vertical: "top"
|
|
426
426
|
},
|
|
427
427
|
placement: {
|
|
428
|
-
horizontal:
|
|
429
|
-
vertical:
|
|
428
|
+
horizontal: "left",
|
|
429
|
+
vertical: "top"
|
|
430
430
|
},
|
|
431
431
|
offset: {
|
|
432
432
|
top: 0,
|
|
@@ -435,6 +435,8 @@ var defaultConfigObject = {
|
|
|
435
435
|
left: 0
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain*/
|
|
439
|
+
|
|
438
440
|
var usePosition = function usePosition(providedConfigObject) {
|
|
439
441
|
if (providedConfigObject === void 0) {
|
|
440
442
|
providedConfigObject = defaultConfigObject;
|
|
@@ -457,8 +459,8 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
457
459
|
var _useState = React.useState({
|
|
458
460
|
left: 0,
|
|
459
461
|
top: 0,
|
|
460
|
-
right:
|
|
461
|
-
bottom:
|
|
462
|
+
right: "initial",
|
|
463
|
+
bottom: "initial"
|
|
462
464
|
}),
|
|
463
465
|
position = _useState[0],
|
|
464
466
|
setPosition = _useState[1];
|
|
@@ -466,23 +468,23 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
466
468
|
var _fixPossibleViewportOverflow = function _fixPossibleViewportOverflow(value, transformOrigin, requestedReturnValue, elDimensions) {
|
|
467
469
|
var returnValue = value;
|
|
468
470
|
|
|
469
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
471
|
+
if (transformOrigin[requestedReturnValue] === "left" && returnValue < 0 || transformOrigin[requestedReturnValue] === "top" && returnValue < 0 || transformOrigin[requestedReturnValue] === "center" && returnValue < 0 || transformOrigin[requestedReturnValue] === "bottom" && returnValue < 0) {
|
|
470
472
|
returnValue = 0;
|
|
471
473
|
}
|
|
472
474
|
|
|
473
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
475
|
+
if (transformOrigin[requestedReturnValue] === "left" && returnValue > window.innerWidth - elDimensions.width || transformOrigin[requestedReturnValue] === "center" && requestedReturnValue === "horizontal" && returnValue > window.innerWidth - elDimensions.width) {
|
|
474
476
|
returnValue = window.innerWidth - elDimensions.width;
|
|
475
477
|
}
|
|
476
478
|
|
|
477
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
479
|
+
if (transformOrigin[requestedReturnValue] === "top" && returnValue > window.innerHeight - elDimensions.height || transformOrigin[requestedReturnValue] === "center" && requestedReturnValue === "vertical" && returnValue > window.innerHeight - elDimensions.height) {
|
|
478
480
|
returnValue = window.innerHeight - elDimensions.height;
|
|
479
481
|
}
|
|
480
482
|
|
|
481
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
483
|
+
if (transformOrigin[requestedReturnValue] === "right" && returnValue > window.innerWidth - elDimensions.width) {
|
|
482
484
|
returnValue = window.innerWidth - elDimensions.width;
|
|
483
485
|
}
|
|
484
486
|
|
|
485
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
487
|
+
if (transformOrigin[requestedReturnValue] === "bottom" && returnValue > window.innerHeight - elDimensions.height) {
|
|
486
488
|
returnValue = window.innerHeight - elDimensions.height;
|
|
487
489
|
}
|
|
488
490
|
|
|
@@ -494,15 +496,15 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
494
496
|
|
|
495
497
|
var returnValue = value;
|
|
496
498
|
|
|
497
|
-
if (requestedReturnValue ===
|
|
498
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
499
|
+
if (requestedReturnValue === "horizontal" && ((_configObject$offset = configObject.offset) == null ? void 0 : _configObject$offset.left) !== 0 || requestedReturnValue === "horizontal" && ((_configObject$offset2 = configObject.offset) == null ? void 0 : _configObject$offset2.right) !== 0) {
|
|
500
|
+
if (transformOrigin[requestedReturnValue] === "left" || transformOrigin[requestedReturnValue] === "center") {
|
|
499
501
|
var _configObject$offset3, _configObject$offset4;
|
|
500
502
|
|
|
501
503
|
returnValue += (_configObject$offset3 = configObject.offset) == null ? void 0 : _configObject$offset3.left;
|
|
502
504
|
returnValue -= (_configObject$offset4 = configObject.offset) == null ? void 0 : _configObject$offset4.right;
|
|
503
505
|
}
|
|
504
506
|
|
|
505
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
507
|
+
if (transformOrigin[requestedReturnValue] === "right") {
|
|
506
508
|
var _configObject$offset5, _configObject$offset6;
|
|
507
509
|
|
|
508
510
|
returnValue -= (_configObject$offset5 = configObject.offset) == null ? void 0 : _configObject$offset5.left;
|
|
@@ -510,15 +512,15 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
510
512
|
}
|
|
511
513
|
}
|
|
512
514
|
|
|
513
|
-
if (requestedReturnValue ===
|
|
514
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
515
|
+
if (requestedReturnValue === "vertical" && ((_configObject$offset7 = configObject.offset) == null ? void 0 : _configObject$offset7.top) !== 0 || requestedReturnValue === "vertical" && ((_configObject$offset8 = configObject.offset) == null ? void 0 : _configObject$offset8.bottom) !== 0) {
|
|
516
|
+
if (transformOrigin[requestedReturnValue] === "top" || transformOrigin[requestedReturnValue] === "center") {
|
|
515
517
|
var _configObject$offset9, _configObject$offset10;
|
|
516
518
|
|
|
517
519
|
returnValue += (_configObject$offset9 = configObject.offset) == null ? void 0 : _configObject$offset9.top;
|
|
518
520
|
returnValue -= (_configObject$offset10 = configObject.offset) == null ? void 0 : _configObject$offset10.bottom;
|
|
519
521
|
}
|
|
520
522
|
|
|
521
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
523
|
+
if (transformOrigin[requestedReturnValue] === "bottom") {
|
|
522
524
|
var _configObject$offset11, _configObject$offset12;
|
|
523
525
|
|
|
524
526
|
returnValue -= (_configObject$offset11 = configObject.offset) == null ? void 0 : _configObject$offset11.top;
|
|
@@ -532,12 +534,12 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
532
534
|
var _calculateInitialPlacementValue = function _calculateInitialPlacementValue(transformOrigin, requestedReturnValue, relEl, placementOriginDefinition, elDimensions) {
|
|
533
535
|
var value = 0;
|
|
534
536
|
|
|
535
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
537
|
+
if (transformOrigin[requestedReturnValue] === "left" || transformOrigin[requestedReturnValue] === "top") {
|
|
536
538
|
value = relEl[placementOriginDefinition];
|
|
537
|
-
} else if (transformOrigin[requestedReturnValue] ===
|
|
538
|
-
value = relEl[placementOriginDefinition] - elDimensions[requestedReturnValue ===
|
|
539
|
-
} else if (transformOrigin[requestedReturnValue] ===
|
|
540
|
-
value = window[requestedReturnValue ===
|
|
539
|
+
} else if (transformOrigin[requestedReturnValue] === "center") {
|
|
540
|
+
value = relEl[placementOriginDefinition] - elDimensions[requestedReturnValue === "horizontal" ? "width" : "height"] / 2;
|
|
541
|
+
} else if (transformOrigin[requestedReturnValue] === "right" || transformOrigin[requestedReturnValue] === "bottom") {
|
|
542
|
+
value = window[requestedReturnValue === "horizontal" ? "innerWidth" : "innerHeight"] - relEl[placementOriginDefinition];
|
|
541
543
|
}
|
|
542
544
|
|
|
543
545
|
return value;
|
|
@@ -550,17 +552,17 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
550
552
|
|
|
551
553
|
|
|
552
554
|
var _determineCenteredPlacementOrigin = function _determineCenteredPlacementOrigin(requestedReturnValue) {
|
|
553
|
-
if (requestedReturnValue ===
|
|
554
|
-
return
|
|
555
|
-
} else if (requestedReturnValue ===
|
|
556
|
-
return
|
|
555
|
+
if (requestedReturnValue === "horizontal") {
|
|
556
|
+
return "centerh";
|
|
557
|
+
} else if (requestedReturnValue === "vertical") {
|
|
558
|
+
return "centerv";
|
|
557
559
|
}
|
|
558
560
|
|
|
559
561
|
throw new Error("the requested return value isn't \"vertical\" or \"horizontal\" " + requestedReturnValue + " was given.");
|
|
560
562
|
};
|
|
561
563
|
|
|
562
564
|
var _calculatePlacementValue = function _calculatePlacementValue(transformOrigin, placement, requestedReturnValue, relEl, elDimensions) {
|
|
563
|
-
var placementOriginDefinition = placement ===
|
|
565
|
+
var placementOriginDefinition = placement === "center" ? _determineCenteredPlacementOrigin(requestedReturnValue) : placement;
|
|
564
566
|
|
|
565
567
|
var value = _calculateInitialPlacementValue(transformOrigin, requestedReturnValue, relEl, placementOriginDefinition, elDimensions);
|
|
566
568
|
|
|
@@ -576,29 +578,29 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
576
578
|
|
|
577
579
|
var placementValue = _calculatePlacementValue(configObject.transformOrigin, configObject.placement[axis], axis, relEl, elDimensions);
|
|
578
580
|
|
|
579
|
-
var direction =
|
|
580
|
-
var oppositeDirection =
|
|
581
|
+
var direction = "left";
|
|
582
|
+
var oppositeDirection = "right";
|
|
581
583
|
|
|
582
|
-
if (axis ===
|
|
583
|
-
direction =
|
|
584
|
-
oppositeDirection =
|
|
585
|
-
} else if (axis ===
|
|
586
|
-
direction =
|
|
587
|
-
oppositeDirection =
|
|
584
|
+
if (axis === "horizontal" && ((_configObject$transfo = configObject.transformOrigin) == null ? void 0 : _configObject$transfo.horizontal) === "right") {
|
|
585
|
+
direction = "right";
|
|
586
|
+
oppositeDirection = "left";
|
|
587
|
+
} else if (axis === "horizontal") {
|
|
588
|
+
direction = "left";
|
|
589
|
+
oppositeDirection = "right";
|
|
588
590
|
}
|
|
589
591
|
|
|
590
|
-
if (axis ===
|
|
591
|
-
direction =
|
|
592
|
-
oppositeDirection =
|
|
593
|
-
} else if (axis ===
|
|
594
|
-
direction =
|
|
595
|
-
oppositeDirection =
|
|
592
|
+
if (axis === "vertical" && ((_configObject$transfo2 = configObject.transformOrigin) == null ? void 0 : _configObject$transfo2.vertical) === "bottom") {
|
|
593
|
+
direction = "bottom";
|
|
594
|
+
oppositeDirection = "top";
|
|
595
|
+
} else if (axis === "vertical") {
|
|
596
|
+
direction = "top";
|
|
597
|
+
oppositeDirection = "bottom";
|
|
596
598
|
}
|
|
597
599
|
|
|
598
600
|
setPosition(function (prevState) {
|
|
599
601
|
var _extends2;
|
|
600
602
|
|
|
601
|
-
return _extends({}, prevState, (_extends2 = {}, _extends2[direction] = placementValue, _extends2[oppositeDirection] =
|
|
603
|
+
return _extends({}, prevState, (_extends2 = {}, _extends2[direction] = placementValue, _extends2[oppositeDirection] = "initial", _extends2));
|
|
602
604
|
});
|
|
603
605
|
};
|
|
604
606
|
|
|
@@ -627,9 +629,9 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
627
629
|
y: relativeElRect.y
|
|
628
630
|
};
|
|
629
631
|
|
|
630
|
-
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions,
|
|
632
|
+
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions, "horizontal");
|
|
631
633
|
|
|
632
|
-
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions,
|
|
634
|
+
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions, "vertical");
|
|
633
635
|
};
|
|
634
636
|
|
|
635
637
|
return {
|
|
@@ -682,7 +684,7 @@ var Popover = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
682
684
|
ref: ref
|
|
683
685
|
}, rest), React__default["default"].createElement("div", {
|
|
684
686
|
ref: elToBePositioned,
|
|
685
|
-
className: modules_ef8f756f.popover + " " + (className != null ? className :
|
|
687
|
+
className: modules_ef8f756f.popover + " " + (className != null ? className : "") + " " + (show ? modules_ef8f756f.show : ""),
|
|
686
688
|
style: {
|
|
687
689
|
top: top,
|
|
688
690
|
left: left,
|
|
@@ -704,9 +706,9 @@ var useBodyClick = function useBodyClick(checkFunction, callbackFunction, depend
|
|
|
704
706
|
}
|
|
705
707
|
|
|
706
708
|
React.useEffect(function () {
|
|
707
|
-
window.addEventListener(
|
|
709
|
+
window.addEventListener("click", bodyClickListener);
|
|
708
710
|
return function () {
|
|
709
|
-
window.removeEventListener(
|
|
711
|
+
window.removeEventListener("click", bodyClickListener);
|
|
710
712
|
};
|
|
711
713
|
}, [dependingStateVariable]);
|
|
712
714
|
};
|
|
@@ -722,8 +724,8 @@ var ContextMenu = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
722
724
|
onClose = _ref.onClose,
|
|
723
725
|
_ref$placement = _ref.placement,
|
|
724
726
|
placement = _ref$placement === void 0 ? {
|
|
725
|
-
horizontal:
|
|
726
|
-
vertical:
|
|
727
|
+
horizontal: "right",
|
|
728
|
+
vertical: "top"
|
|
727
729
|
} : _ref$placement,
|
|
728
730
|
_ref$offset = _ref.offset,
|
|
729
731
|
offset = _ref$offset === void 0 ? {
|
|
@@ -734,8 +736,8 @@ var ContextMenu = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
734
736
|
} : _ref$offset,
|
|
735
737
|
_ref$transformOrigin = _ref.transformOrigin,
|
|
736
738
|
transformOrigin = _ref$transformOrigin === void 0 ? {
|
|
737
|
-
horizontal:
|
|
738
|
-
vertical:
|
|
739
|
+
horizontal: "left",
|
|
740
|
+
vertical: "top"
|
|
739
741
|
} : _ref$transformOrigin,
|
|
740
742
|
_ref$domRoot = _ref.domRoot,
|
|
741
743
|
domRoot = _ref$domRoot === void 0 ? document.body : _ref$domRoot,
|
|
@@ -747,25 +749,29 @@ var ContextMenu = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
747
749
|
showContextMenu = _useState[0],
|
|
748
750
|
setShowContextMenu = _useState[1];
|
|
749
751
|
|
|
750
|
-
var _useState2 = React.useState(
|
|
751
|
-
|
|
752
|
-
|
|
752
|
+
var _useState2 = React.useState(false),
|
|
753
|
+
hasBeenClosed = _useState2[0],
|
|
754
|
+
setHasBeenClosed = _useState2[1];
|
|
753
755
|
|
|
754
756
|
var _useState3 = React.useState(-1),
|
|
755
|
-
|
|
756
|
-
|
|
757
|
+
selectedContextMenuItem = _useState3[0],
|
|
758
|
+
setSelectedContextMenuItem = _useState3[1];
|
|
757
759
|
|
|
758
|
-
var _useState4 = React.useState(
|
|
759
|
-
|
|
760
|
-
|
|
760
|
+
var _useState4 = React.useState(-1),
|
|
761
|
+
focusedContextMenuItem = _useState4[0],
|
|
762
|
+
setFocusedContextMenuItem = _useState4[1];
|
|
763
|
+
|
|
764
|
+
var _useState5 = React.useState(false),
|
|
765
|
+
shouldClick = _useState5[0],
|
|
766
|
+
setShouldClick = _useState5[1];
|
|
761
767
|
/** We need this, because whenever we use the arrow keys to select the contextmenu item, and we focus the currently selected item it fires the "click" listener in ContextMenuItem component. Instead, we only want this to fire if we press "enter" or "spacebar" so we set this to true whenever that is the case, and back to false when it has been executed. */
|
|
762
768
|
|
|
763
769
|
|
|
764
|
-
var
|
|
765
|
-
childrenCount =
|
|
770
|
+
var _useState6 = React.useState(React__default["default"].Children.count(children)),
|
|
771
|
+
childrenCount = _useState6[0];
|
|
766
772
|
|
|
767
773
|
if (!id) {
|
|
768
|
-
throw new Error(
|
|
774
|
+
throw new Error("You need to provide an ID to the context menu");
|
|
769
775
|
}
|
|
770
776
|
|
|
771
777
|
var onArrowNavigation = function onArrowNavigation(event) {
|
|
@@ -773,14 +779,14 @@ var ContextMenu = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
773
779
|
setFocusedContextMenuItem(selectedContextMenuItem);
|
|
774
780
|
}
|
|
775
781
|
|
|
776
|
-
var codesToPrevenDefault = [
|
|
782
|
+
var codesToPrevenDefault = ["ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Enter", "Space", "Escape", "End", "Home"];
|
|
777
783
|
|
|
778
784
|
if (codesToPrevenDefault.includes(event.code)) {
|
|
779
785
|
event.preventDefault();
|
|
780
786
|
}
|
|
781
787
|
|
|
782
788
|
switch (event.code) {
|
|
783
|
-
case
|
|
789
|
+
case "ArrowDown":
|
|
784
790
|
if (!showContextMenu) {
|
|
785
791
|
setShowContextMenu(true);
|
|
786
792
|
return;
|
|
@@ -791,14 +797,14 @@ var ContextMenu = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
791
797
|
});
|
|
792
798
|
return;
|
|
793
799
|
|
|
794
|
-
case
|
|
800
|
+
case "ArrowUp":
|
|
795
801
|
setFocusedContextMenuItem(function (prevState) {
|
|
796
802
|
return prevState - 1 < 0 ? childrenCount - 1 : prevState - 1;
|
|
797
803
|
});
|
|
798
804
|
return;
|
|
799
805
|
|
|
800
|
-
case
|
|
801
|
-
case
|
|
806
|
+
case "Enter":
|
|
807
|
+
case "Space":
|
|
802
808
|
if (!showContextMenu) {
|
|
803
809
|
setShowContextMenu(true);
|
|
804
810
|
return;
|
|
@@ -809,23 +815,23 @@ var ContextMenu = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
809
815
|
setShowContextMenu(false);
|
|
810
816
|
return;
|
|
811
817
|
|
|
812
|
-
case
|
|
813
|
-
case
|
|
818
|
+
case "Tab":
|
|
819
|
+
case "Escape":
|
|
814
820
|
setShowContextMenu(false);
|
|
815
821
|
return;
|
|
816
822
|
|
|
817
|
-
case
|
|
823
|
+
case "End":
|
|
818
824
|
setFocusedContextMenuItem(childrenCount - 1);
|
|
819
825
|
return;
|
|
820
826
|
|
|
821
|
-
case
|
|
827
|
+
case "Home":
|
|
822
828
|
setFocusedContextMenuItem(0);
|
|
823
829
|
return;
|
|
824
830
|
}
|
|
825
831
|
};
|
|
826
832
|
|
|
827
833
|
useBodyClick(function (event) {
|
|
828
|
-
return showContextMenu && anchorEl.current !== event.target;
|
|
834
|
+
return showContextMenu && anchorEl.current !== event.target && anchorEl.current !== event.target.parentElement;
|
|
829
835
|
}, function () {
|
|
830
836
|
setShowContextMenu(false);
|
|
831
837
|
}, showContextMenu);
|
|
@@ -834,17 +840,18 @@ var ContextMenu = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
834
840
|
onShow && onShow();
|
|
835
841
|
} else {
|
|
836
842
|
onClose && onClose();
|
|
843
|
+
!hasBeenClosed && setHasBeenClosed(true);
|
|
837
844
|
setFocusedContextMenuItem(-1);
|
|
838
|
-
anchorEl.current && anchorEl.current.focus();
|
|
845
|
+
hasBeenClosed && anchorEl.current && anchorEl.current.focus();
|
|
839
846
|
}
|
|
840
847
|
}, [showContextMenu]);
|
|
841
848
|
|
|
842
849
|
var renderTrigger = function renderTrigger() {
|
|
843
850
|
return React__default["default"].cloneElement(trigger, {
|
|
844
851
|
id: id,
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
852
|
+
"aria-haspopup": "true",
|
|
853
|
+
"aria-controls": id + "-menu",
|
|
854
|
+
"aria-expanded": showContextMenu,
|
|
848
855
|
onClick: function onClick() {
|
|
849
856
|
return setShowContextMenu(!showContextMenu);
|
|
850
857
|
},
|
|
@@ -875,7 +882,7 @@ var ContextMenu = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
875
882
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
876
883
|
ref: ref,
|
|
877
884
|
onKeyDown: onArrowNavigation,
|
|
878
|
-
className: modules_846e6042[
|
|
885
|
+
className: modules_846e6042["context-menu"]
|
|
879
886
|
}), renderTrigger(), reactDom.createPortal(React__default["default"].createElement(Popover, {
|
|
880
887
|
placement: placement,
|
|
881
888
|
transformOrigin: transformOrigin,
|
|
@@ -883,7 +890,7 @@ var ContextMenu = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
883
890
|
anchorEl: anchorEl,
|
|
884
891
|
show: showContextMenu
|
|
885
892
|
}, React__default["default"].createElement("ul", {
|
|
886
|
-
className: modules_846e6042[
|
|
893
|
+
className: modules_846e6042["menu"],
|
|
887
894
|
id: id + "-menu",
|
|
888
895
|
"aria-describedby": id,
|
|
889
896
|
role: "menu"
|
|
@@ -894,7 +901,7 @@ var css$P = ".ContextMenuItem_module_contextMenuItem__612daeb6 {\n position: re
|
|
|
894
901
|
var modules_3e93850e = {"context-menu-item":"ContextMenuItem_module_contextMenuItem__612daeb6"};
|
|
895
902
|
n(css$P,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
896
903
|
|
|
897
|
-
var _excluded$R = ["children", "onClick", "onFocusChange", "onSelectedChange", "hasFocus", "isSelected", "childIndex", "contextMenuOpened", "shouldClick"];
|
|
904
|
+
var _excluded$R = ["children", "onClick", "onFocusChange", "onSelectedChange", "hasFocus", "isSelected", "childIndex", "contextMenuOpened", "shouldClick", "className"];
|
|
898
905
|
var ContextMenuItem = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
899
906
|
var children = _ref.children,
|
|
900
907
|
_onClick = _ref.onClick,
|
|
@@ -905,6 +912,7 @@ var ContextMenuItem = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
905
912
|
childIndex = _ref.childIndex,
|
|
906
913
|
contextMenuOpened = _ref.contextMenuOpened,
|
|
907
914
|
shouldClick = _ref.shouldClick,
|
|
915
|
+
className = _ref.className,
|
|
908
916
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$R);
|
|
909
917
|
|
|
910
918
|
var innerButtonRef = ref || React.createRef();
|
|
@@ -920,11 +928,14 @@ var ContextMenuItem = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
920
928
|
}
|
|
921
929
|
}, [hasFocus, innerButtonRef, contextMenuOpened]);
|
|
922
930
|
return React__default["default"].createElement("li", {
|
|
923
|
-
role: "
|
|
924
|
-
className: modules_3e93850e[
|
|
925
|
-
}, React__default["default"].createElement("button", _extends({
|
|
931
|
+
role: "none",
|
|
932
|
+
className: modules_3e93850e["context-menu-item"] + " " + (className != null ? className : "")
|
|
933
|
+
}, React__default["default"].createElement("button", _extends({
|
|
934
|
+
role: "menuitem"
|
|
935
|
+
}, rest, {
|
|
926
936
|
ref: innerButtonRef,
|
|
927
937
|
"data-focus": hasFocus,
|
|
938
|
+
tabIndex: -1,
|
|
928
939
|
onClick: function onClick(event) {
|
|
929
940
|
_onClick && _onClick(event);
|
|
930
941
|
onSelectedChange && childIndex && onSelectedChange(childIndex);
|
|
@@ -944,13 +955,13 @@ var Link = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref
|
|
|
944
955
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
945
956
|
to = _ref.to,
|
|
946
957
|
_ref$color = _ref.color,
|
|
947
|
-
color = _ref$color === void 0 ?
|
|
958
|
+
color = _ref$color === void 0 ? "primary" : _ref$color,
|
|
948
959
|
_ref$type = _ref.type,
|
|
949
|
-
type = _ref$type === void 0 ?
|
|
960
|
+
type = _ref$type === void 0 ? "internal" : _ref$type,
|
|
950
961
|
_ref$display = _ref.display,
|
|
951
|
-
display = _ref$display === void 0 ?
|
|
962
|
+
display = _ref$display === void 0 ? "link" : _ref$display,
|
|
952
963
|
_ref$buttonVariant = _ref.buttonVariant,
|
|
953
|
-
buttonVariant = _ref$buttonVariant === void 0 ?
|
|
964
|
+
buttonVariant = _ref$buttonVariant === void 0 ? "fill" : _ref$buttonVariant,
|
|
954
965
|
component = _ref.component,
|
|
955
966
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$Q);
|
|
956
967
|
|
|
@@ -959,25 +970,25 @@ var Link = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref
|
|
|
959
970
|
return rest.target;
|
|
960
971
|
}
|
|
961
972
|
|
|
962
|
-
if (type ===
|
|
963
|
-
return
|
|
973
|
+
if (type === "external") {
|
|
974
|
+
return "_blank";
|
|
964
975
|
}
|
|
965
976
|
|
|
966
|
-
return
|
|
977
|
+
return "";
|
|
967
978
|
};
|
|
968
979
|
|
|
969
980
|
var classNames = [modules_e20967e9[color]];
|
|
970
|
-
display ===
|
|
971
|
-
display ===
|
|
972
|
-
disabled && classNames.push(modules_e20967e9[
|
|
981
|
+
display === "link" && classNames.push(modules_e20967e9["link"]);
|
|
982
|
+
display === "button" && classNames.push(modules_e20967e9["button"], modules_e20967e9[buttonVariant]);
|
|
983
|
+
disabled && classNames.push(modules_e20967e9["disabled"]);
|
|
973
984
|
className && classNames.push(className);
|
|
974
985
|
|
|
975
986
|
if (component) {
|
|
976
987
|
return React__default["default"].createElement(component, _extends({}, rest, {
|
|
977
988
|
ref: ref,
|
|
978
989
|
to: to,
|
|
979
|
-
className: classNames.join(
|
|
980
|
-
|
|
990
|
+
className: classNames.join(" "),
|
|
991
|
+
"aria-disabled": disabled,
|
|
981
992
|
style: _extends({}, rest.style),
|
|
982
993
|
children: children
|
|
983
994
|
}));
|
|
@@ -985,10 +996,10 @@ var Link = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref
|
|
|
985
996
|
|
|
986
997
|
return React__default["default"].createElement("a", _extends({}, rest, {
|
|
987
998
|
ref: ref,
|
|
988
|
-
download: type ===
|
|
989
|
-
rel: type ===
|
|
999
|
+
download: type === "download",
|
|
1000
|
+
rel: type === "external" ? "noopener noreferer" : undefined,
|
|
990
1001
|
href: !disabled ? to : undefined,
|
|
991
|
-
className: classNames.join(
|
|
1002
|
+
className: classNames.join(" "),
|
|
992
1003
|
"aria-disabled": disabled,
|
|
993
1004
|
target: determineTarget(),
|
|
994
1005
|
style: _extends({}, rest.style)
|
|
@@ -1007,11 +1018,11 @@ var _excluded$P = ["children", "color", "variant", "iconSize", "title", "classNa
|
|
|
1007
1018
|
var IconButton = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
1008
1019
|
var children = _ref.children,
|
|
1009
1020
|
_ref$color = _ref.color,
|
|
1010
|
-
color = _ref$color === void 0 ?
|
|
1021
|
+
color = _ref$color === void 0 ? "primary" : _ref$color,
|
|
1011
1022
|
_ref$variant = _ref.variant,
|
|
1012
|
-
variant = _ref$variant === void 0 ?
|
|
1023
|
+
variant = _ref$variant === void 0 ? "text" : _ref$variant,
|
|
1013
1024
|
_ref$iconSize = _ref.iconSize,
|
|
1014
|
-
iconSize = _ref$iconSize === void 0 ?
|
|
1025
|
+
iconSize = _ref$iconSize === void 0 ? "m" : _ref$iconSize,
|
|
1015
1026
|
title = _ref.title,
|
|
1016
1027
|
className = _ref.className,
|
|
1017
1028
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$P);
|
|
@@ -1020,7 +1031,7 @@ var IconButton = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
1020
1031
|
console.error("Please make sure to specify a 'title' prop to your IconButton component! ");
|
|
1021
1032
|
}
|
|
1022
1033
|
|
|
1023
|
-
var iconButtonClasses = [modules_f7edfa2f[
|
|
1034
|
+
var iconButtonClasses = [modules_f7edfa2f["icon-button"], modules_f7edfa2f[variant], modules_f7edfa2f[color], modules_f7edfa2f["button-" + iconSize]];
|
|
1024
1035
|
|
|
1025
1036
|
if (className) {
|
|
1026
1037
|
iconButtonClasses.push(className);
|
|
@@ -1028,9 +1039,9 @@ var IconButton = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
1028
1039
|
|
|
1029
1040
|
return React__default["default"].createElement(BaseButton, _extends({}, rest, {
|
|
1030
1041
|
ref: ref,
|
|
1031
|
-
className: iconButtonClasses.join(
|
|
1042
|
+
className: iconButtonClasses.join(" ")
|
|
1032
1043
|
}), React__default["default"].createElement(React.Fragment, null, children, React__default["default"].createElement("span", {
|
|
1033
|
-
className: modules_35a251a6[
|
|
1044
|
+
className: modules_35a251a6["sr-only"]
|
|
1034
1045
|
}, title)));
|
|
1035
1046
|
});
|
|
1036
1047
|
|
|
@@ -1044,12 +1055,12 @@ var generateID = function generateID(length, stringToWeaveIn) {
|
|
|
1044
1055
|
}
|
|
1045
1056
|
|
|
1046
1057
|
/** We will make sure to mesh the generate id and name property together to basically create a unique ID */
|
|
1047
|
-
var hashCharacters = [
|
|
1048
|
-
var id =
|
|
1058
|
+
var hashCharacters = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
|
|
1059
|
+
var id = "";
|
|
1049
1060
|
/** Generate an id of x characters in length */
|
|
1050
1061
|
|
|
1051
1062
|
for (var i = 0; i < length && id.length < length; i++) {
|
|
1052
|
-
var stringCharacter = stringToWeaveIn && stringToWeaveIn[i] !== undefined && !/\s/.test(stringToWeaveIn[i]) ? stringToWeaveIn[i] :
|
|
1063
|
+
var stringCharacter = stringToWeaveIn && stringToWeaveIn[i] !== undefined && !/\s/.test(stringToWeaveIn[i]) ? stringToWeaveIn[i] : "";
|
|
1053
1064
|
id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];
|
|
1054
1065
|
}
|
|
1055
1066
|
|
|
@@ -1102,14 +1113,14 @@ var TabButton = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
1102
1113
|
ref.current.focus();
|
|
1103
1114
|
}
|
|
1104
1115
|
}, [focussed]);
|
|
1105
|
-
var classNames = [modules_1ddb33b5[
|
|
1106
|
-
selected && classNames.push(modules_1ddb33b5[
|
|
1107
|
-
focussed && !selected && classNames.push(modules_1ddb33b5[
|
|
1116
|
+
var classNames = [modules_1ddb33b5["tabbutton"]];
|
|
1117
|
+
selected && classNames.push(modules_1ddb33b5["selected"]);
|
|
1118
|
+
focussed && !selected && classNames.push(modules_1ddb33b5["focussed"]);
|
|
1108
1119
|
className && classNames.push(className);
|
|
1109
1120
|
return React__default["default"].createElement("button", _extends({}, rest, {
|
|
1110
1121
|
"aria-selected": selected,
|
|
1111
1122
|
key: tabId,
|
|
1112
|
-
className: classNames.join(
|
|
1123
|
+
className: classNames.join(" "),
|
|
1113
1124
|
ref: ref,
|
|
1114
1125
|
role: "tab",
|
|
1115
1126
|
tabIndex: selected ? 0 : -1,
|
|
@@ -1139,7 +1150,7 @@ var TabPanel = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
1139
1150
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
1140
1151
|
ref: ref,
|
|
1141
1152
|
"aria-labelledby": tabId,
|
|
1142
|
-
className: modules_06ac598d[
|
|
1153
|
+
className: modules_06ac598d["tabpanel"] + " " + (selected ? modules_06ac598d["selected"] : "") + " " + (className != null ? className : ""),
|
|
1143
1154
|
id: tabPanelId,
|
|
1144
1155
|
role: "tabpanel",
|
|
1145
1156
|
tabIndex: 0,
|
|
@@ -1157,7 +1168,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
1157
1168
|
var children = _ref.children,
|
|
1158
1169
|
_ref$selected = _ref.selected,
|
|
1159
1170
|
selected = _ref$selected === void 0 ? 0 : _ref$selected,
|
|
1160
|
-
ariaLabel = _ref[
|
|
1171
|
+
ariaLabel = _ref["aria-label"],
|
|
1161
1172
|
onTabChange = _ref.onTabChange,
|
|
1162
1173
|
className = _ref.className,
|
|
1163
1174
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$M);
|
|
@@ -1220,24 +1231,24 @@ var Tabs = function Tabs(_ref) {
|
|
|
1220
1231
|
var currentFocussedTab = focussedTab === -1 ? selectedTab : focussedTab;
|
|
1221
1232
|
|
|
1222
1233
|
switch (e.code) {
|
|
1223
|
-
case
|
|
1234
|
+
case "ArrowLeft":
|
|
1224
1235
|
setFocussedTab(currentFocussedTab === min ? max : currentFocussedTab - 1);
|
|
1225
1236
|
break;
|
|
1226
1237
|
|
|
1227
|
-
case
|
|
1238
|
+
case "ArrowRight":
|
|
1228
1239
|
setFocussedTab(currentFocussedTab === max ? min : currentFocussedTab + 1);
|
|
1229
1240
|
break;
|
|
1230
1241
|
|
|
1231
|
-
case
|
|
1242
|
+
case "Home":
|
|
1232
1243
|
setFocussedTab(min);
|
|
1233
1244
|
break;
|
|
1234
1245
|
|
|
1235
|
-
case
|
|
1246
|
+
case "End":
|
|
1236
1247
|
setFocussedTab(max);
|
|
1237
1248
|
break;
|
|
1238
1249
|
|
|
1239
|
-
case
|
|
1240
|
-
case
|
|
1250
|
+
case "Space":
|
|
1251
|
+
case "Enter":
|
|
1241
1252
|
activateTab(currentFocussedTab);
|
|
1242
1253
|
break;
|
|
1243
1254
|
}
|
|
@@ -1278,17 +1289,17 @@ var Tabs = function Tabs(_ref) {
|
|
|
1278
1289
|
});
|
|
1279
1290
|
});
|
|
1280
1291
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
1281
|
-
className: modules_d0cc66ee[
|
|
1292
|
+
className: modules_d0cc66ee["tabs"] + " " + (className != null ? className : "")
|
|
1282
1293
|
}), React__default["default"].createElement("div", {
|
|
1283
1294
|
role: "tablist",
|
|
1284
1295
|
onKeyDown: handleKeyDown,
|
|
1285
1296
|
onBlur: handleBlur,
|
|
1286
1297
|
"aria-label": ariaLabel,
|
|
1287
|
-
className: modules_d0cc66ee[
|
|
1298
|
+
className: modules_d0cc66ee["tablist"]
|
|
1288
1299
|
}, React__default["default"].createElement("div", {
|
|
1289
|
-
className: modules_d0cc66ee[
|
|
1300
|
+
className: modules_d0cc66ee["tabdivider"]
|
|
1290
1301
|
}), tabButtons, React__default["default"].createElement("div", {
|
|
1291
|
-
className: modules_d0cc66ee[
|
|
1302
|
+
className: modules_d0cc66ee["indicator"],
|
|
1292
1303
|
ref: indicatorRef,
|
|
1293
1304
|
"aria-hidden": "true",
|
|
1294
1305
|
tabIndex: -1,
|
|
@@ -1296,7 +1307,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
1296
1307
|
width: indicatorWidth
|
|
1297
1308
|
}, indicatorPosition)
|
|
1298
1309
|
})), React__default["default"].createElement("div", {
|
|
1299
|
-
className: modules_d0cc66ee[
|
|
1310
|
+
className: modules_d0cc66ee["tabpanels"]
|
|
1300
1311
|
}, tabPanels));
|
|
1301
1312
|
};
|
|
1302
1313
|
|
|
@@ -1336,7 +1347,7 @@ var TextEllipsis = /*#__PURE__*/React__default["default"].forwardRef(function (_
|
|
|
1336
1347
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
1337
1348
|
onMouseEnter: onMouseEnter,
|
|
1338
1349
|
onMouseLeave: onMouseLeave,
|
|
1339
|
-
className: modules_46535846[
|
|
1350
|
+
className: modules_46535846["text-ellipsis"] + " " + (className != null ? className : ""),
|
|
1340
1351
|
ref: ref || textContainer
|
|
1341
1352
|
}), children, React__default["default"].createElement(Popover, {
|
|
1342
1353
|
"aria-hidden": true,
|
|
@@ -1344,7 +1355,7 @@ var TextEllipsis = /*#__PURE__*/React__default["default"].forwardRef(function (_
|
|
|
1344
1355
|
show: showPopover,
|
|
1345
1356
|
role: "tooltip",
|
|
1346
1357
|
anchorEl: textContainer,
|
|
1347
|
-
className: modules_46535846.popover + " " + (popoverClassName != null ? popoverClassName :
|
|
1358
|
+
className: modules_46535846.popover + " " + (popoverClassName != null ? popoverClassName : "")
|
|
1348
1359
|
}, children));
|
|
1349
1360
|
});
|
|
1350
1361
|
|
|
@@ -1366,48 +1377,48 @@ var Tile = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref
|
|
|
1366
1377
|
tileDescriptionID = _useState[0];
|
|
1367
1378
|
|
|
1368
1379
|
if (!title) {
|
|
1369
|
-
throw new Error(
|
|
1380
|
+
throw new Error("Please make sure to pass a title prop to your Tile component.");
|
|
1370
1381
|
}
|
|
1371
1382
|
|
|
1372
1383
|
var statusMessage = function statusMessage() {
|
|
1373
1384
|
if (enabled) {
|
|
1374
|
-
return
|
|
1385
|
+
return "Status: enabled";
|
|
1375
1386
|
}
|
|
1376
1387
|
|
|
1377
|
-
return
|
|
1388
|
+
return "Status: disabled";
|
|
1378
1389
|
};
|
|
1379
1390
|
|
|
1380
1391
|
return React__default["default"].createElement("article", _extends({}, rest, {
|
|
1381
1392
|
tabIndex: 0,
|
|
1382
1393
|
"aria-labelledby": tileDescriptionID,
|
|
1383
1394
|
ref: ref,
|
|
1384
|
-
className: modules_5f01ab30[
|
|
1395
|
+
className: modules_5f01ab30["tile"] + " " + (loading ? modules_5f01ab30["loading"] : "")
|
|
1385
1396
|
}), React__default["default"].createElement("header", {
|
|
1386
1397
|
style: {
|
|
1387
|
-
justifyContent: enabled === undefined ?
|
|
1398
|
+
justifyContent: enabled === undefined ? "flex-end" : "space-between"
|
|
1388
1399
|
}
|
|
1389
1400
|
}, enabled === true && React__default["default"].createElement(Icon, {
|
|
1390
1401
|
color: "var(--success)",
|
|
1391
1402
|
icon: exports.Icons.Checkmark,
|
|
1392
|
-
className: modules_5f01ab30[
|
|
1403
|
+
className: modules_5f01ab30["icon"] + " " + (className != null ? className : "")
|
|
1393
1404
|
}), enabled === false && React__default["default"].createElement(Icon, {
|
|
1394
1405
|
color: "var(--greyed-out)",
|
|
1395
1406
|
icon: exports.Icons.Forbidden,
|
|
1396
|
-
className: modules_5f01ab30[
|
|
1407
|
+
className: modules_5f01ab30["icon"] + " " + (className != null ? className : "")
|
|
1397
1408
|
}), enabled !== undefined && React__default["default"].createElement("span", {
|
|
1398
1409
|
id: tileDescriptionID,
|
|
1399
|
-
className: modules_35a251a6[
|
|
1410
|
+
className: modules_35a251a6["sr-only"]
|
|
1400
1411
|
}, title + ". " + statusMessage()), tileAction != null ? tileAction : null), React__default["default"].createElement("div", {
|
|
1401
|
-
className: modules_5f01ab30[
|
|
1412
|
+
className: modules_5f01ab30["content"]
|
|
1402
1413
|
}, imageProps && imageProps.src.length > 0 && React__default["default"].createElement("figure", {
|
|
1403
|
-
className: modules_5f01ab30[
|
|
1414
|
+
className: modules_5f01ab30["image"]
|
|
1404
1415
|
}, !loading && React__default["default"].createElement("img", _extends({}, imageProps, {
|
|
1405
1416
|
alt: ""
|
|
1406
1417
|
}))), (!imageProps || imageProps.src.length === 0) && React__default["default"].createElement(Icon, {
|
|
1407
|
-
className: modules_5f01ab30[
|
|
1418
|
+
className: modules_5f01ab30["placeholder"],
|
|
1408
1419
|
icon: exports.Icons.Image
|
|
1409
1420
|
}), React__default["default"].createElement("span", {
|
|
1410
|
-
className: modules_5f01ab30[
|
|
1421
|
+
className: modules_5f01ab30["title"]
|
|
1411
1422
|
}, title)));
|
|
1412
1423
|
});
|
|
1413
1424
|
|
|
@@ -1429,21 +1440,21 @@ var Tiles = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
1429
1440
|
key: "placeholder1",
|
|
1430
1441
|
title: "placeholder",
|
|
1431
1442
|
imageProps: {
|
|
1432
|
-
src:
|
|
1443
|
+
src: "placeholder"
|
|
1433
1444
|
},
|
|
1434
1445
|
loading: true
|
|
1435
1446
|
}), React__default["default"].createElement(Tile, {
|
|
1436
1447
|
key: "placeholder2",
|
|
1437
1448
|
title: "placeholder",
|
|
1438
1449
|
imageProps: {
|
|
1439
|
-
src:
|
|
1450
|
+
src: "placeholder"
|
|
1440
1451
|
},
|
|
1441
1452
|
loading: true
|
|
1442
1453
|
}), React__default["default"].createElement(Tile, {
|
|
1443
1454
|
key: "placeholder3",
|
|
1444
1455
|
title: "placeholder",
|
|
1445
1456
|
imageProps: {
|
|
1446
|
-
src:
|
|
1457
|
+
src: "placeholder"
|
|
1447
1458
|
},
|
|
1448
1459
|
loading: true
|
|
1449
1460
|
})];
|
|
@@ -1454,7 +1465,7 @@ var Tiles = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
1454
1465
|
|
|
1455
1466
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
1456
1467
|
ref: ref,
|
|
1457
|
-
className: modules_7b7db5f7[
|
|
1468
|
+
className: modules_7b7db5f7["tiles"] + " " + (className != null ? className : ""),
|
|
1458
1469
|
"aria-live": "polite",
|
|
1459
1470
|
"aria-busy": loading
|
|
1460
1471
|
}), renderChildren());
|
|
@@ -1467,8 +1478,8 @@ n(css$F,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
|
1467
1478
|
var _excluded$I = ["children", "className", "placement", "offset", "transformOrigin", "domRoot", "label"];
|
|
1468
1479
|
var defaultPosition = {
|
|
1469
1480
|
placement: {
|
|
1470
|
-
horizontal:
|
|
1471
|
-
vertical:
|
|
1481
|
+
horizontal: "right",
|
|
1482
|
+
vertical: "center"
|
|
1472
1483
|
},
|
|
1473
1484
|
offset: {
|
|
1474
1485
|
left: 16,
|
|
@@ -1477,8 +1488,8 @@ var defaultPosition = {
|
|
|
1477
1488
|
bottom: 0
|
|
1478
1489
|
},
|
|
1479
1490
|
transformOrigin: {
|
|
1480
|
-
horizontal:
|
|
1481
|
-
vertical:
|
|
1491
|
+
horizontal: "left",
|
|
1492
|
+
vertical: "center"
|
|
1482
1493
|
}
|
|
1483
1494
|
};
|
|
1484
1495
|
var Tooltip = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
@@ -1522,14 +1533,14 @@ var Tooltip = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
1522
1533
|
if (!visible) return;
|
|
1523
1534
|
|
|
1524
1535
|
function escapePressHandler(event) {
|
|
1525
|
-
if (event.key ===
|
|
1536
|
+
if (event.key === "Escape") {
|
|
1526
1537
|
setVisible(false);
|
|
1527
1538
|
}
|
|
1528
1539
|
}
|
|
1529
1540
|
|
|
1530
|
-
document.addEventListener(
|
|
1541
|
+
document.addEventListener("keyup", escapePressHandler);
|
|
1531
1542
|
return function () {
|
|
1532
|
-
document.removeEventListener(
|
|
1543
|
+
document.removeEventListener("keyup", escapePressHandler);
|
|
1533
1544
|
};
|
|
1534
1545
|
}, [visible]);
|
|
1535
1546
|
React.useLayoutEffect(function () {
|
|
@@ -1545,14 +1556,14 @@ var Tooltip = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
1545
1556
|
onBlur: function onBlur() {
|
|
1546
1557
|
return setVisible(false);
|
|
1547
1558
|
},
|
|
1548
|
-
|
|
1559
|
+
"aria-describedby": identifier,
|
|
1549
1560
|
tabIndex: 0,
|
|
1550
|
-
className: modules_16974fb0[
|
|
1561
|
+
className: modules_16974fb0["label"]
|
|
1551
1562
|
});
|
|
1552
1563
|
}
|
|
1553
1564
|
|
|
1554
1565
|
return React__default["default"].createElement("span", {
|
|
1555
|
-
className: modules_16974fb0[
|
|
1566
|
+
className: modules_16974fb0["label"],
|
|
1556
1567
|
tabIndex: 0,
|
|
1557
1568
|
onFocus: function onFocus() {
|
|
1558
1569
|
return setVisible(true);
|
|
@@ -1566,9 +1577,9 @@ var Tooltip = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
1566
1577
|
|
|
1567
1578
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
1568
1579
|
ref: ref,
|
|
1569
|
-
className: modules_16974fb0.wrapper + " " + (className != null ? className :
|
|
1580
|
+
className: modules_16974fb0.wrapper + " " + (className != null ? className : "")
|
|
1570
1581
|
}), renderChildren(), React__default["default"].createElement("div", {
|
|
1571
|
-
className: "" + modules_16974fb0[
|
|
1582
|
+
className: "" + modules_16974fb0["tooltip-wrapper"]
|
|
1572
1583
|
}, React__default["default"].createElement(Icon, {
|
|
1573
1584
|
ref: relativeElement,
|
|
1574
1585
|
tag: "div",
|
|
@@ -1590,7 +1601,7 @@ var Tooltip = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
1590
1601
|
}),
|
|
1591
1602
|
"aria-hidden": !visible,
|
|
1592
1603
|
id: identifier,
|
|
1593
|
-
className: modules_16974fb0.tooltip + " " + (visible ? modules_16974fb0.visible :
|
|
1604
|
+
className: modules_16974fb0.tooltip + " " + (visible ? modules_16974fb0.visible : "")
|
|
1594
1605
|
}, children), domRoot)));
|
|
1595
1606
|
});
|
|
1596
1607
|
|
|
@@ -1601,17 +1612,17 @@ n(css$E,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
|
1601
1612
|
var _excluded$H = ["variant", "height", "width", "className", "style"];
|
|
1602
1613
|
var Skeleton = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
1603
1614
|
var _ref$variant = _ref.variant,
|
|
1604
|
-
variant = _ref$variant === void 0 ?
|
|
1615
|
+
variant = _ref$variant === void 0 ? "text" : _ref$variant,
|
|
1605
1616
|
height = _ref.height,
|
|
1606
1617
|
width = _ref.width,
|
|
1607
1618
|
className = _ref.className,
|
|
1608
1619
|
style = _ref.style,
|
|
1609
1620
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
1610
1621
|
|
|
1611
|
-
var classNames = [modules_1fe82d8f[
|
|
1612
|
-
!height && classNames.push(modules_1fe82d8f[
|
|
1613
|
-
variant ===
|
|
1614
|
-
variant ===
|
|
1622
|
+
var classNames = [modules_1fe82d8f["skeleton"]];
|
|
1623
|
+
!height && classNames.push(modules_1fe82d8f["no-height"]);
|
|
1624
|
+
variant === "text" && classNames.push(modules_1fe82d8f["text"]);
|
|
1625
|
+
variant === "circular" && classNames.push(modules_1fe82d8f["circular"]);
|
|
1615
1626
|
className && classNames.push(className);
|
|
1616
1627
|
return React__default["default"].createElement("span", _extends({}, rest, {
|
|
1617
1628
|
"aria-busy": "true",
|
|
@@ -1621,7 +1632,7 @@ var Skeleton = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
1621
1632
|
width: width,
|
|
1622
1633
|
height: height
|
|
1623
1634
|
}),
|
|
1624
|
-
className: classNames.join(
|
|
1635
|
+
className: classNames.join(" ")
|
|
1625
1636
|
}));
|
|
1626
1637
|
});
|
|
1627
1638
|
|
|
@@ -1640,29 +1651,78 @@ var StatusIndicator = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
1640
1651
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
1641
1652
|
|
|
1642
1653
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
1643
|
-
className: modules_372cb0bf[
|
|
1654
|
+
className: modules_372cb0bf["status-indicator"],
|
|
1644
1655
|
ref: ref
|
|
1645
1656
|
}), React__default["default"].createElement("div", {
|
|
1646
|
-
className: modules_372cb0bf[
|
|
1657
|
+
className: modules_372cb0bf["status-badge"] + " " + modules_372cb0bf[status] + " " + ((_badgeProps$className = badgeProps == null ? void 0 : badgeProps.className) != null ? _badgeProps$className : "")
|
|
1647
1658
|
}), React__default["default"].createElement(Typography, _extends({}, typographyProps, {
|
|
1648
1659
|
spacing: {
|
|
1649
|
-
margin:
|
|
1660
|
+
margin: "0"
|
|
1650
1661
|
},
|
|
1651
1662
|
variant: "body",
|
|
1652
1663
|
tag: "div"
|
|
1653
1664
|
}), (typographyProps == null ? void 0 : typographyProps.children) || children));
|
|
1654
1665
|
});
|
|
1655
1666
|
|
|
1656
|
-
var css$C = ".
|
|
1657
|
-
var modules_e3c5bce1 = {"pagination-wrapper":"
|
|
1667
|
+
var css$C = ".Pagination_module_paginationWrapper__fb0017ac {\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--greyed-out);\n display: flex;\n flex-direction: column;\n}\n.Pagination_module_paginationWrapper__fb0017ac label {\n margin-bottom: 0;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_formElement__fb0017ac {\n height: 2.5rem;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_formElement__fb0017ac button {\n min-height: 2.5rem;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_total__fb0017ac {\n flex: 1 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_total__fb0017ac span > span {\n font-weight: 700;\n font-family: var(--font-family);\n font-size: var(--font-size);\n margin-left: 0.25rem;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac {\n flex: 1 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 1rem;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac .Pagination_module_previous__fb0017ac,\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac .Pagination_module_next__fb0017ac {\n display: flex;\n align-items: center;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac .Pagination_module_previous__fb0017ac button,\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac .Pagination_module_next__fb0017ac button {\n margin: 0.25rem;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac .Pagination_module_previous__fb0017ac button span:before,\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac .Pagination_module_next__fb0017ac button span:before {\n font-size: 0.75rem;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_perPage__fb0017ac {\n display: none;\n align-items: center;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_page__fb0017ac {\n display: flex;\n align-items: center;\n flex-basis: min-content;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pageSizeSelect__fb0017ac {\n border-color: #fff;\n margin: 0 0.25rem;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pageSizeSelect__fb0017ac button {\n min-width: 3.4375rem;\n padding: 0;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pageSizeSelect__fb0017ac button div[data-display] {\n left: 0.5rem;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pageSizeSelect__fb0017ac button div:not([data-display]) {\n right: 0.5rem;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_currentValueInput__fb0017ac {\n margin: 0 0.25rem 0 0;\n padding: 0;\n height: auto;\n}\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_currentValueInput__fb0017ac input {\n border-radius: var(--input-border-radius);\n padding: 0 1rem;\n width: auto;\n text-align: center;\n}\n\n@media screen and (min-width: 30em) {\n .Pagination_module_paginationWrapper__fb0017ac {\n flex-direction: row;\n }\n .Pagination_module_paginationWrapper__fb0017ac .Pagination_module_total__fb0017ac {\n justify-content: flex-start;\n }\n .Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac {\n margin-top: 0;\n justify-content: flex-end;\n }\n .Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac .Pagination_module_previous__fb0017ac button,\n.Pagination_module_paginationWrapper__fb0017ac .Pagination_module_pagination__fb0017ac .Pagination_module_next__fb0017ac button {\n margin: 0 0.5rem;\n }\n}\n@media screen and (min-width: 48em) {\n .Pagination_module_paginationWrapper__fb0017ac .Pagination_module_perPage__fb0017ac {\n display: flex;\n margin-right: 0.5rem;\n }\n}";
|
|
1668
|
+
var modules_e3c5bce1 = {"pagination-wrapper":"Pagination_module_paginationWrapper__fb0017ac","form-element":"Pagination_module_formElement__fb0017ac","total":"Pagination_module_total__fb0017ac","pagination":"Pagination_module_pagination__fb0017ac","previous":"Pagination_module_previous__fb0017ac","next":"Pagination_module_next__fb0017ac","per-page":"Pagination_module_perPage__fb0017ac","page":"Pagination_module_page__fb0017ac","page-size-select":"Pagination_module_pageSizeSelect__fb0017ac","current-value-input":"Pagination_module_currentValueInput__fb0017ac"};
|
|
1658
1669
|
n(css$C,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1659
1670
|
|
|
1660
|
-
var css$B = ".
|
|
1661
|
-
var modules_23691de0 = {"input-wrapper":"
|
|
1671
|
+
var css$B = ".Input_module_srOnly__765c4484 {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.Input_module_hidden__765c4484 {\n display: none;\n}\n\n.Input_module_slideIn__765c4484 {\n animation: Input_module_slideIn__765c4484 0.5s forwards;\n}\n\n.Input_module_slideOut__765c4484 {\n animation: Input_module_slideOut__765c4484 0.5s forwards;\n}\n\n@keyframes Input_module_slideIn__765c4484 {\n 0% {\n transform: translateY(100vh);\n }\n 100% {\n transform: translateY(0%);\n }\n}\n@keyframes Input_module_slideOut__765c4484 {\n 0% {\n transform: translateY(0%);\n }\n 100% {\n transform: translateY(100vh);\n }\n}\n.Input_module_inputWrapper__765c4484 {\n position: relative;\n display: flex;\n align-items: center;\n height: 4rem;\n border: 0;\n border-radius: var(--input-border-radius);\n background-color: var(--input-background-color);\n padding: 0 1.25rem;\n transition: all 0.2s ease-in-out;\n}\n.Input_module_inputWrapper__765c4484:hover .Input_module_outline__765c4484 {\n border-color: var(--default);\n}\n.Input_module_inputWrapper__765c4484 .Input_module_outline__765c4484.Input_module_disabled__765c4484 {\n border-color: #fff;\n}\n.Input_module_inputWrapper__765c4484 .Input_module_outline__765c4484.Input_module_error__765c4484 {\n border-color: var(--error);\n}\n.Input_module_inputWrapper__765c4484 .Input_module_outline__765c4484.Input_module_focus__765c4484 {\n border-width: var(--input-border-width-focus);\n}\n.Input_module_inputWrapper__765c4484 .Input_module_outline__765c4484.Input_module_focus__765c4484:not(.Input_module_error__765c4484) {\n border-color: var(--color-primary);\n}\n\n.Input_module_input__765c4484 {\n padding: 0;\n height: 4rem;\n color: var(--greyed-out);\n font-size: var(--font-size);\n font-family: var(--font-family);\n width: 100%;\n box-sizing: border-box;\n border: 0;\n border-radius: var(--input-border-radius);\n}\n.Input_module_input__765c4484:disabled {\n background-color: var(--disabled);\n cursor: not-allowed;\n}\n.Input_module_input__765c4484:focus:not(:disabled) {\n outline: none;\n}\n\n.Input_module_outline__765c4484 {\n pointer-events: none;\n position: absolute;\n margin: 0;\n padding: 0;\n inset: 0;\n border-color: var(--input-border-color);\n border-style: var(--input-border-style);\n border-width: var(--input-border-width);\n border-radius: var(--input-border-radius);\n transition: all 0.2s ease-in-out;\n}\n\n.Input_module_error__765c4484 input {\n color: var(--error);\n padding-right: 3.5rem;\n}\n.Input_module_error__765c4484 input.Input_module_removeExtraIndent__765c4484 {\n padding-right: 0rem;\n}\n\n.Input_module_warning__765c4484 {\n color: var(--error);\n position: absolute;\n height: 100%;\n width: 1.25rem;\n right: 1.25rem;\n top: 0px;\n font-size: 1.125rem;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.Input_module_warning__765c4484:before {\n height: 1.3125rem;\n}\n.Input_module_warning__765c4484.Input_module_extraIndent__765c4484 {\n right: 3.75rem;\n}\n\n.Input_module_inputWrapper__765c4484 [data-prefix],\n.Input_module_inputWrapper__765c4484 [data-suffix] {\n transition: all 0.2s ease-in-out;\n display: block;\n z-index: 1;\n}";
|
|
1672
|
+
var modules_23691de0 = {"sr-only":"Input_module_srOnly__765c4484","hidden":"Input_module_hidden__765c4484","slide-in":"Input_module_slideIn__765c4484","slide-out":"Input_module_slideOut__765c4484","input-wrapper":"Input_module_inputWrapper__765c4484","outline":"Input_module_outline__765c4484","disabled":"Input_module_disabled__765c4484","error":"Input_module_error__765c4484","focus":"Input_module_focus__765c4484","input":"Input_module_input__765c4484","remove-extra-indent":"Input_module_removeExtraIndent__765c4484","warning":"Input_module_warning__765c4484","extra-indent":"Input_module_extraIndent__765c4484"};
|
|
1662
1673
|
n(css$B,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1663
1674
|
|
|
1664
1675
|
var _excluded$F = ["error", "className", "name", "style", "wrapperProps", "type", "labeledBy", "prefix", "suffix", "disabled", "onFocus", "onBlur"];
|
|
1665
|
-
var dateTypes = [
|
|
1676
|
+
var dateTypes = ["date", "time", "datetime-local"];
|
|
1677
|
+
|
|
1678
|
+
var useErrorOffset = function useErrorOffset(suffix, errorIcon, inputWrapper, error, type, suffixContent) {
|
|
1679
|
+
if (suffixContent === void 0) {
|
|
1680
|
+
suffixContent = "";
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
var _useState = React.useState({}),
|
|
1684
|
+
errorOffset = _useState[0],
|
|
1685
|
+
setErrorOffset = _useState[1];
|
|
1686
|
+
|
|
1687
|
+
var _useState2 = React.useState(null),
|
|
1688
|
+
defaultErrorOffset = _useState2[0],
|
|
1689
|
+
setDefaultErrorOffset = _useState2[1];
|
|
1690
|
+
|
|
1691
|
+
var getErrorIconOffset = function getErrorIconOffset() {
|
|
1692
|
+
return parseFloat(getComputedStyle(errorIcon.current).right);
|
|
1693
|
+
};
|
|
1694
|
+
|
|
1695
|
+
var getInputPaddingRight = function getInputPaddingRight(input) {
|
|
1696
|
+
return dateTypes.includes(type) ? 0 : parseFloat(getComputedStyle(input).paddingRight);
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1699
|
+
React.useEffect(function () {
|
|
1700
|
+
if (errorIcon.current && inputWrapper.current) {
|
|
1701
|
+
var defaultOffset = defaultErrorOffset;
|
|
1702
|
+
|
|
1703
|
+
if (!defaultOffset) {
|
|
1704
|
+
defaultOffset = getErrorIconOffset();
|
|
1705
|
+
setDefaultErrorOffset(defaultOffset);
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
if (suffix.current && suffixContent) {
|
|
1709
|
+
var inputPaddingRight = getInputPaddingRight(inputWrapper.current);
|
|
1710
|
+
var prefixDifference = suffix.current.offsetWidth + inputPaddingRight + defaultOffset;
|
|
1711
|
+
setErrorOffset({
|
|
1712
|
+
right: prefixDifference + "px"
|
|
1713
|
+
});
|
|
1714
|
+
} else {
|
|
1715
|
+
setErrorOffset({
|
|
1716
|
+
right: defaultOffset + "px"
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
}, [suffix.current, errorIcon.current, inputWrapper.current, error, type, suffixContent]);
|
|
1721
|
+
return {
|
|
1722
|
+
errorOffset: errorOffset
|
|
1723
|
+
};
|
|
1724
|
+
};
|
|
1725
|
+
|
|
1666
1726
|
var Input = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
1667
1727
|
var _ref$error = _ref.error,
|
|
1668
1728
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
@@ -1679,34 +1739,44 @@ var Input = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
1679
1739
|
_onBlur = _ref.onBlur,
|
|
1680
1740
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
1681
1741
|
|
|
1682
|
-
var
|
|
1683
|
-
focus =
|
|
1684
|
-
setFocus =
|
|
1742
|
+
var _useState3 = React.useState(false),
|
|
1743
|
+
focus = _useState3[0],
|
|
1744
|
+
setFocus = _useState3[1];
|
|
1745
|
+
|
|
1746
|
+
var inputWrapperRef = React.useRef(null);
|
|
1747
|
+
var errorIconRef = React.useRef(null);
|
|
1748
|
+
var suffixRef = React.useRef(null);
|
|
1749
|
+
|
|
1750
|
+
var _useErrorOffset = useErrorOffset(suffixRef, errorIconRef, inputWrapperRef, error, type, suffix),
|
|
1751
|
+
errorOffset = _useErrorOffset.errorOffset;
|
|
1685
1752
|
|
|
1686
1753
|
React.useEffect(function () {
|
|
1687
1754
|
if (name === undefined) {
|
|
1688
1755
|
throw new Error("Please give your <Input /> component a 'name' attribute");
|
|
1689
1756
|
}
|
|
1690
1757
|
}, []);
|
|
1691
|
-
var inputClassNames = [modules_23691de0[
|
|
1692
|
-
dateTypes.includes(type) && inputClassNames.push(modules_23691de0[
|
|
1758
|
+
var inputClassNames = [modules_23691de0["input"]];
|
|
1759
|
+
dateTypes.includes(type) && inputClassNames.push(modules_23691de0["remove-extra-indent"]);
|
|
1693
1760
|
className && inputClassNames.push(className);
|
|
1694
|
-
var iconClassNames = [modules_23691de0[
|
|
1695
|
-
dateTypes.includes(type) && iconClassNames.push(modules_23691de0[
|
|
1696
|
-
var wrapperClasses = [modules_23691de0[
|
|
1761
|
+
var iconClassNames = [modules_23691de0["warning"]];
|
|
1762
|
+
dateTypes.includes(type) && iconClassNames.push(modules_23691de0["extra-indent"]);
|
|
1763
|
+
var wrapperClasses = [modules_23691de0["input-wrapper"]];
|
|
1764
|
+
var outlineClasses = [modules_23691de0["outline"]];
|
|
1697
1765
|
(wrapperProps == null ? void 0 : wrapperProps.className) && wrapperClasses.push(wrapperProps.className);
|
|
1698
|
-
type ===
|
|
1699
|
-
prefix && wrapperClasses.push(modules_23691de0[
|
|
1700
|
-
suffix && wrapperClasses.push(modules_23691de0[
|
|
1701
|
-
disabled && wrapperClasses.push(modules_23691de0[
|
|
1702
|
-
error && wrapperClasses.push(modules_23691de0[
|
|
1703
|
-
focus && wrapperClasses.push(modules_23691de0[
|
|
1704
|
-
return React__default["default"].createElement("div", _extends({
|
|
1766
|
+
type === "hidden" && wrapperClasses.push(modules_35a251a6["hidden"]);
|
|
1767
|
+
prefix && wrapperClasses.push(modules_23691de0["prefix"]);
|
|
1768
|
+
suffix && wrapperClasses.push(modules_23691de0["suffix"]);
|
|
1769
|
+
disabled && wrapperClasses.push(modules_23691de0["disabled"]) && outlineClasses.push(modules_23691de0["disabled"]);
|
|
1770
|
+
error && wrapperClasses.push(modules_23691de0["error"]) && outlineClasses.push(modules_23691de0["error"]);
|
|
1771
|
+
focus && wrapperClasses.push(modules_23691de0["focus"]) && outlineClasses.push(modules_23691de0["focus"]);
|
|
1772
|
+
return React__default["default"].createElement("div", _extends({
|
|
1773
|
+
ref: inputWrapperRef
|
|
1774
|
+
}, wrapperProps, {
|
|
1705
1775
|
style: _extends({}, style),
|
|
1706
|
-
className: modules_23691de0[
|
|
1776
|
+
className: modules_23691de0["input-wrapper"] + " " + wrapperClasses.join(" ")
|
|
1707
1777
|
}), prefix && React__default["default"].createElement("div", {
|
|
1708
1778
|
"data-prefix": true,
|
|
1709
|
-
className: modules_23691de0[
|
|
1779
|
+
className: modules_23691de0["prefix"]
|
|
1710
1780
|
}, React__default["default"].createElement("span", null, prefix)), React__default["default"].createElement("input", _extends({}, rest, {
|
|
1711
1781
|
ref: ref,
|
|
1712
1782
|
onFocus: function onFocus(event) {
|
|
@@ -1721,18 +1791,23 @@ var Input = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
1721
1791
|
type: type,
|
|
1722
1792
|
name: name,
|
|
1723
1793
|
disabled: disabled,
|
|
1724
|
-
className: inputClassNames.join(
|
|
1794
|
+
className: inputClassNames.join(" ")
|
|
1725
1795
|
})), suffix && React__default["default"].createElement("div", {
|
|
1796
|
+
ref: suffixRef,
|
|
1726
1797
|
"data-suffix": true,
|
|
1727
|
-
className: modules_23691de0[
|
|
1798
|
+
className: modules_23691de0["suffix"]
|
|
1728
1799
|
}, React__default["default"].createElement("span", null, suffix)), error && React__default["default"].createElement(Icon, {
|
|
1729
|
-
|
|
1800
|
+
style: errorOffset,
|
|
1801
|
+
ref: errorIconRef,
|
|
1802
|
+
className: iconClassNames.join(" "),
|
|
1730
1803
|
icon: exports.Icons.Error
|
|
1804
|
+
}), React__default["default"].createElement("span", {
|
|
1805
|
+
className: outlineClasses.join(" ")
|
|
1731
1806
|
}));
|
|
1732
1807
|
});
|
|
1733
1808
|
|
|
1734
|
-
var css$A = ".
|
|
1735
|
-
var modules_7db85bb8 = {"sr-only":"
|
|
1809
|
+
var css$A = ".Select_module_srOnly__cca1abf5 {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.Select_module_hidden__cca1abf5 {\n display: none;\n}\n\n.Select_module_slideIn__cca1abf5 {\n animation: Select_module_slideIn__cca1abf5 0.5s forwards;\n}\n\n.Select_module_slideOut__cca1abf5 {\n animation: Select_module_slideOut__cca1abf5 0.5s forwards;\n}\n\n@keyframes Select_module_slideIn__cca1abf5 {\n 0% {\n transform: translateY(100vh);\n }\n 100% {\n transform: translateY(0%);\n }\n}\n@keyframes Select_module_slideOut__cca1abf5 {\n 0% {\n transform: translateY(0%);\n }\n 100% {\n transform: translateY(100vh);\n }\n}\n.Select_module_select__cca1abf5 {\n position: relative;\n box-sizing: border-box;\n transition: all 0.2s ease-in-out;\n border: 0;\n border-radius: var(--input-border-radius);\n background-color: var(--input-background-color);\n font-size: var(--font-size);\n}\n.Select_module_select__cca1abf5 [data-display] {\n color: var(--greyed-out);\n}\n.Select_module_select__cca1abf5.Select_module_expanded__cca1abf5 {\n border: var(--input-border-width) solid transparent;\n}\n.Select_module_select__cca1abf5.Select_module_expanded__cca1abf5 .Select_module_listWrapper__cca1abf5 {\n background: #fff;\n}\n.Select_module_select__cca1abf5:not(.Select_module_expanded__cca1abf5) button:focus-visible:not(.Select_module_error__cca1abf5) {\n border: var(--input-border-width-focus) solid var(--color-primary);\n padding: 0 calc(1.25rem - var(--input-border-width-focus) + var(--input-border-width));\n}\n.Select_module_select__cca1abf5:hover:not(.Select_module_disabled__cca1abf5):not(.Select_module_expanded__cca1abf5):not(.Select_module_error__cca1abf5) button {\n border-color: var(--default);\n border-width: var(--input-border-width);\n}\n.Select_module_select__cca1abf5 .Select_module_customSelect__cca1abf5 {\n position: relative;\n width: 100%;\n min-height: calc(4rem - 2 * var(--input-border-width));\n border: 0;\n padding: 0 1.25rem;\n background-color: transparent;\n border-color: var(--input-border-color);\n border-style: var(--input-border-style);\n border-width: var(--input-border-width);\n border-radius: var(--input-border-radius);\n font-size: var(--font-size);\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n}\n.Select_module_select__cca1abf5 .Select_module_customSelect__cca1abf5:focus-visible {\n outline: 0;\n}\n.Select_module_select__cca1abf5 .Select_module_customSelect__cca1abf5.Select_module_error__cca1abf5 {\n border-color: var(--error);\n color: var(--error);\n}\n.Select_module_select__cca1abf5 .Select_module_customSelect__cca1abf5.Select_module_error__cca1abf5:focus-visible {\n border-width: var(--input-border-width-focus);\n}\n.Select_module_select__cca1abf5 .Select_module_listWrapper__cca1abf5 {\n border-color: var(--input-border-color);\n border-style: var(--input-border-style);\n border-width: var(--input-border-width);\n border-radius: var(--input-border-radius);\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.29);\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n width: 100%;\n overflow: auto;\n}\n.Select_module_select__cca1abf5 ul {\n box-sizing: border-box;\n padding: 0.25rem 0;\n width: 100%;\n margin: 0;\n list-style: none;\n background-color: #fff;\n border-radius: var(--input-border-radius);\n color: var(--default);\n text-align: left;\n max-height: 21.25rem;\n}\n.Select_module_select__cca1abf5 ul li {\n padding: 0.5rem 1rem;\n font-size: var(--font-size);\n margin: 0;\n position: relative;\n line-height: 1;\n cursor: pointer;\n}\n.Select_module_select__cca1abf5 ul li:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n background-color: transparent;\n width: 100%;\n height: 100%;\n opacity: 0.05;\n}\n.Select_module_select__cca1abf5 ul li:focus-visible {\n outline: 1px solid var(--color-primary);\n outline-offset: -1px;\n}\n.Select_module_select__cca1abf5 ul li:hover:after {\n background-color: var(--color-primary);\n}\n.Select_module_select__cca1abf5 ul li.Select_module_disabled__cca1abf5 {\n color: var(--greyed-out);\n background-color: var(--disabled);\n pointer-events: none;\n}\n\n.Select_module_selectedOption__cca1abf5:before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n background-color: var(--color-primary);\n width: 100%;\n height: 100%;\n opacity: 0.1;\n}\n\n.Select_module_selected__cca1abf5 {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n}\n\n.Select_module_status__cca1abf5 {\n position: absolute;\n top: 50%;\n right: 1.625rem;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n}\n.Select_module_status__cca1abf5 .Select_module_warning__cca1abf5 {\n color: var(--error);\n font-size: 1.25rem;\n}\n.Select_module_status__cca1abf5 .Select_module_triangleDown__cca1abf5 {\n color: var(--default);\n font-size: 0.625rem;\n}\n.Select_module_status__cca1abf5 * + * {\n margin-left: 1.25rem;\n}\n\n.Select_module_placeholder__cca1abf5 {\n color: var(--greyed-out);\n}\n\n.Select_module_selectSearchWrapper__cca1abf5 + ul {\n border-radius: 0 0 var(--input-border-radius) var(--input-border-radius);\n}\n\n.Select_module_selectSearch__cca1abf5 {\n width: 100%;\n box-sizing: border-box;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.Select_module_disabled__cca1abf5 {\n cursor: not-allowed;\n color: var(--greyed-out);\n background-color: var(--disabled);\n}\n.Select_module_disabled__cca1abf5 > * {\n pointer-events: none;\n}";
|
|
1810
|
+
var modules_7db85bb8 = {"sr-only":"Select_module_srOnly__cca1abf5","hidden":"Select_module_hidden__cca1abf5","slide-in":"Select_module_slideIn__cca1abf5","slide-out":"Select_module_slideOut__cca1abf5","select":"Select_module_select__cca1abf5","expanded":"Select_module_expanded__cca1abf5","list-wrapper":"Select_module_listWrapper__cca1abf5","error":"Select_module_error__cca1abf5","disabled":"Select_module_disabled__cca1abf5","custom-select":"Select_module_customSelect__cca1abf5","selected-option":"Select_module_selectedOption__cca1abf5","selected":"Select_module_selected__cca1abf5","status":"Select_module_status__cca1abf5","warning":"Select_module_warning__cca1abf5","triangle-down":"Select_module_triangleDown__cca1abf5","placeholder":"Select_module_placeholder__cca1abf5","select-search-wrapper":"Select_module_selectSearchWrapper__cca1abf5","select-search":"Select_module_selectSearch__cca1abf5"};
|
|
1736
1811
|
n(css$A,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1737
1812
|
|
|
1738
1813
|
var _excluded$E = ["children", "name", "disabled", "labeledBy", "placeholder", "describedBy", "searchPlaceholder", "searchInputProps", "selectButtonProps", "className", "error", "value", "clearLabel", "onChange", "onClear"];
|
|
@@ -1748,7 +1823,7 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1748
1823
|
placeholder = _ref.placeholder,
|
|
1749
1824
|
describedBy = _ref.describedBy,
|
|
1750
1825
|
_ref$searchPlaceholde = _ref.searchPlaceholder,
|
|
1751
|
-
searchPlaceholder = _ref$searchPlaceholde === void 0 ?
|
|
1826
|
+
searchPlaceholder = _ref$searchPlaceholde === void 0 ? "Search item" : _ref$searchPlaceholde,
|
|
1752
1827
|
searchInputProps = _ref.searchInputProps,
|
|
1753
1828
|
selectButtonProps = _ref.selectButtonProps,
|
|
1754
1829
|
className = _ref.className,
|
|
@@ -1756,7 +1831,7 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1756
1831
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
1757
1832
|
value = _ref.value,
|
|
1758
1833
|
_ref$clearLabel = _ref.clearLabel,
|
|
1759
|
-
clearLabel = _ref$clearLabel === void 0 ?
|
|
1834
|
+
clearLabel = _ref$clearLabel === void 0 ? "Clear selection" : _ref$clearLabel,
|
|
1760
1835
|
onChange = _ref.onChange,
|
|
1761
1836
|
onClear = _ref.onClear,
|
|
1762
1837
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
@@ -1770,11 +1845,11 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1770
1845
|
setOpacity = _useState2[1]; // We set opacity because other wise if we calculate the max height you see the list full height for a split second and then it shortens.
|
|
1771
1846
|
|
|
1772
1847
|
|
|
1773
|
-
var _useState3 = React.useState(
|
|
1848
|
+
var _useState3 = React.useState(""),
|
|
1774
1849
|
filter = _useState3[0],
|
|
1775
1850
|
setFilter = _useState3[1];
|
|
1776
1851
|
|
|
1777
|
-
var _useState4 = React.useState(
|
|
1852
|
+
var _useState4 = React.useState(""),
|
|
1778
1853
|
display = _useState4[0],
|
|
1779
1854
|
setDisplay = _useState4[1];
|
|
1780
1855
|
|
|
@@ -1782,7 +1857,7 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1782
1857
|
listPosition = _useState5[0],
|
|
1783
1858
|
setListPosition = _useState5[1];
|
|
1784
1859
|
|
|
1785
|
-
var _useState6 = React.useState(
|
|
1860
|
+
var _useState6 = React.useState("none"),
|
|
1786
1861
|
optionsListMaxHeight = _useState6[0],
|
|
1787
1862
|
setOptionsListMaxHeight = _useState6[1];
|
|
1788
1863
|
|
|
@@ -1810,12 +1885,12 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1810
1885
|
var searchInputRef = React.useRef(null);
|
|
1811
1886
|
|
|
1812
1887
|
var onArrowNavigation = function onArrowNavigation(event) {
|
|
1813
|
-
var codesToPreventDefault = [
|
|
1814
|
-
var codesToPreventDefaultWhenSearching = [
|
|
1888
|
+
var codesToPreventDefault = ["ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Space", "Escape", "End", "Home"];
|
|
1889
|
+
var codesToPreventDefaultWhenSearching = ["ArrowDown", "ArrowUp", "Enter", "Escape"];
|
|
1815
1890
|
/** If the select is expanded, we also want to control the Tab key */
|
|
1816
1891
|
|
|
1817
1892
|
if (expanded) {
|
|
1818
|
-
codesToPreventDefault.push(
|
|
1893
|
+
codesToPreventDefault.push("Tab");
|
|
1819
1894
|
}
|
|
1820
1895
|
/** We will handle the way certain key strokes affect the Select, unless we're searching */
|
|
1821
1896
|
|
|
@@ -1830,26 +1905,26 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1830
1905
|
|
|
1831
1906
|
if (isSearching) {
|
|
1832
1907
|
switch (event.code) {
|
|
1833
|
-
case
|
|
1834
|
-
case
|
|
1908
|
+
case "ArrowDown":
|
|
1909
|
+
case "Enter":
|
|
1835
1910
|
setIsSearching(false);
|
|
1836
1911
|
setFocusedSelectItem(0);
|
|
1837
1912
|
return;
|
|
1838
1913
|
|
|
1839
|
-
case
|
|
1914
|
+
case "ArrowUp":
|
|
1840
1915
|
setIsSearching(false);
|
|
1841
1916
|
setFocusedSelectItem(childrenCount - 1);
|
|
1842
1917
|
return;
|
|
1843
1918
|
|
|
1844
|
-
case
|
|
1845
|
-
case
|
|
1919
|
+
case "Escape":
|
|
1920
|
+
case "Tab":
|
|
1846
1921
|
setIsSearching(false);
|
|
1847
1922
|
setExpanded(false);
|
|
1848
|
-
containerReference.current && containerReference.current.querySelector(
|
|
1923
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
1849
1924
|
}
|
|
1850
1925
|
} else {
|
|
1851
1926
|
switch (event.code) {
|
|
1852
|
-
case
|
|
1927
|
+
case "ArrowDown":
|
|
1853
1928
|
if (!expanded) {
|
|
1854
1929
|
setExpanded(true);
|
|
1855
1930
|
return;
|
|
@@ -1860,13 +1935,13 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1860
1935
|
});
|
|
1861
1936
|
return;
|
|
1862
1937
|
|
|
1863
|
-
case
|
|
1938
|
+
case "ArrowUp":
|
|
1864
1939
|
setFocusedSelectItem(function (prevState) {
|
|
1865
1940
|
return prevState - 1 < 0 ? childrenCount - 1 : prevState - 1;
|
|
1866
1941
|
});
|
|
1867
1942
|
return;
|
|
1868
1943
|
|
|
1869
|
-
case
|
|
1944
|
+
case "Space":
|
|
1870
1945
|
if (!expanded) {
|
|
1871
1946
|
setExpanded(true);
|
|
1872
1947
|
return;
|
|
@@ -1874,10 +1949,10 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1874
1949
|
|
|
1875
1950
|
setShouldClick(true);
|
|
1876
1951
|
setExpanded(false);
|
|
1877
|
-
containerReference.current && containerReference.current.querySelector(
|
|
1952
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
1878
1953
|
return;
|
|
1879
1954
|
|
|
1880
|
-
case
|
|
1955
|
+
case "Tab":
|
|
1881
1956
|
if (childrenCount >= renderSearchCondition && expanded) {
|
|
1882
1957
|
setIsSearching(true);
|
|
1883
1958
|
searchInputRef.current && searchInputRef.current.focus();
|
|
@@ -1887,19 +1962,19 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1887
1962
|
setExpanded(false);
|
|
1888
1963
|
return;
|
|
1889
1964
|
|
|
1890
|
-
case
|
|
1965
|
+
case "Escape":
|
|
1891
1966
|
if (expanded) {
|
|
1892
1967
|
setExpanded(false);
|
|
1893
|
-
containerReference.current && containerReference.current.querySelector(
|
|
1968
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
1894
1969
|
}
|
|
1895
1970
|
|
|
1896
1971
|
return;
|
|
1897
1972
|
|
|
1898
|
-
case
|
|
1973
|
+
case "End":
|
|
1899
1974
|
setFocusedSelectItem(childrenCount - 1);
|
|
1900
1975
|
return;
|
|
1901
1976
|
|
|
1902
|
-
case
|
|
1977
|
+
case "Home":
|
|
1903
1978
|
setFocusedSelectItem(0);
|
|
1904
1979
|
return;
|
|
1905
1980
|
}
|
|
@@ -1927,12 +2002,12 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1927
2002
|
|
|
1928
2003
|
var position = {
|
|
1929
2004
|
top: 0,
|
|
1930
|
-
bottom:
|
|
2005
|
+
bottom: "initial"
|
|
1931
2006
|
}; // Set the position of the select
|
|
1932
2007
|
|
|
1933
2008
|
if (spaceOnTopOfSelect > spaceOnBottomOfSelect) {
|
|
1934
2009
|
position = {
|
|
1935
|
-
top:
|
|
2010
|
+
top: "initial",
|
|
1936
2011
|
bottom: 0
|
|
1937
2012
|
};
|
|
1938
2013
|
}
|
|
@@ -1945,8 +2020,8 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1945
2020
|
var calculateOptionListMaxHeight = function calculateOptionListMaxHeight(position) {
|
|
1946
2021
|
// Calculate max height if there's more space below the select
|
|
1947
2022
|
var listHeight = optionListReference.current.getBoundingClientRect().height;
|
|
1948
|
-
var transformOrigin = position.top !==
|
|
1949
|
-
var availableSpace = transformOrigin ===
|
|
2023
|
+
var transformOrigin = position.top !== "initial" ? "top" : "bottom";
|
|
2024
|
+
var availableSpace = transformOrigin === "top" ? window.innerHeight - containerReference.current.getBoundingClientRect()[transformOrigin] - 16 : containerReference.current.getBoundingClientRect()[transformOrigin] - 16;
|
|
1950
2025
|
|
|
1951
2026
|
if (availableSpace < listHeight) {
|
|
1952
2027
|
setOptionsListMaxHeight(availableSpace + "px");
|
|
@@ -1954,20 +2029,20 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1954
2029
|
return;
|
|
1955
2030
|
}
|
|
1956
2031
|
|
|
1957
|
-
setOptionsListMaxHeight(
|
|
2032
|
+
setOptionsListMaxHeight("none");
|
|
1958
2033
|
setOpacity(100);
|
|
1959
2034
|
};
|
|
1960
2035
|
|
|
1961
2036
|
var onOptionChangeHandler = function onOptionChangeHandler(optionRef) {
|
|
1962
2037
|
if (nativeSelect.current && optionRef.current) {
|
|
1963
|
-
nativeSelect.current.value = optionRef.current.getAttribute(
|
|
1964
|
-
nativeSelect.current.dispatchEvent(new Event(
|
|
2038
|
+
nativeSelect.current.value = optionRef.current.getAttribute("data-value");
|
|
2039
|
+
nativeSelect.current.dispatchEvent(new Event("change", {
|
|
1965
2040
|
bubbles: true
|
|
1966
2041
|
}));
|
|
1967
2042
|
}
|
|
1968
2043
|
|
|
1969
2044
|
setExpanded(false);
|
|
1970
|
-
containerReference.current && containerReference.current.querySelector(
|
|
2045
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
1971
2046
|
};
|
|
1972
2047
|
/**
|
|
1973
2048
|
* @description We have to modify the children (Option component) to have a additional props that allows us to keep track of which one is selected and focused at all times and if a filter is active.
|
|
@@ -1976,7 +2051,7 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
1976
2051
|
|
|
1977
2052
|
|
|
1978
2053
|
var renderOptions = function renderOptions() {
|
|
1979
|
-
if (isSearching || filter !==
|
|
2054
|
+
if (isSearching || filter !== "") {
|
|
1980
2055
|
var filteredChildren = React__default["default"].Children.toArray(children).filter(function (child) {
|
|
1981
2056
|
return child.props.children.toLowerCase().match(filter.toLowerCase()) !== null;
|
|
1982
2057
|
});
|
|
@@ -2019,9 +2094,9 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2019
2094
|
return setIsSearching(false);
|
|
2020
2095
|
},
|
|
2021
2096
|
onChange: filterResults,
|
|
2022
|
-
className: modules_7db85bb8[
|
|
2097
|
+
className: modules_7db85bb8["select-search"],
|
|
2023
2098
|
wrapperProps: {
|
|
2024
|
-
className: modules_7db85bb8[
|
|
2099
|
+
className: modules_7db85bb8["select-search-wrapper"] + " " + (searchInputProps == null ? void 0 : (_searchInputProps$wra = searchInputProps.wrapperProps) == null ? void 0 : _searchInputProps$wra.className)
|
|
2025
2100
|
},
|
|
2026
2101
|
type: "text",
|
|
2027
2102
|
name: "search-option",
|
|
@@ -2036,7 +2111,7 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2036
2111
|
var statusIcon = function statusIcon() {
|
|
2037
2112
|
if (error) {
|
|
2038
2113
|
return React__default["default"].createElement(Icon, {
|
|
2039
|
-
className: modules_7db85bb8[
|
|
2114
|
+
className: modules_7db85bb8["warning"],
|
|
2040
2115
|
icon: exports.Icons.Warning
|
|
2041
2116
|
});
|
|
2042
2117
|
}
|
|
@@ -2053,15 +2128,15 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2053
2128
|
onClear(e);
|
|
2054
2129
|
},
|
|
2055
2130
|
onKeyDown: function onKeyDown(e) {
|
|
2056
|
-
if (e.code ===
|
|
2131
|
+
if (e.code === "Enter" || e.code === "Space") {
|
|
2057
2132
|
e.preventDefault();
|
|
2058
2133
|
e.stopPropagation();
|
|
2059
2134
|
onClear(e);
|
|
2060
|
-
containerReference.current && containerReference.current.querySelector(
|
|
2135
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
2061
2136
|
}
|
|
2062
2137
|
}
|
|
2063
2138
|
}, React__default["default"].createElement("span", {
|
|
2064
|
-
className: modules_35a251a6[
|
|
2139
|
+
className: modules_35a251a6["sr-only"]
|
|
2065
2140
|
}, clearLabel), React__default["default"].createElement(Icon, {
|
|
2066
2141
|
tag: "span",
|
|
2067
2142
|
icon: exports.Icons.TimesThin
|
|
@@ -2082,12 +2157,12 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2082
2157
|
rePositionList();
|
|
2083
2158
|
}, [expanded]);
|
|
2084
2159
|
useBodyClick(function (event) {
|
|
2085
|
-
return !event.target.closest(
|
|
2160
|
+
return !event.target.closest(".custom-select") && expanded;
|
|
2086
2161
|
}, function () {
|
|
2087
|
-
setExpanded(
|
|
2162
|
+
setExpanded(false);
|
|
2088
2163
|
setListPosition({
|
|
2089
2164
|
top: 0,
|
|
2090
|
-
bottom:
|
|
2165
|
+
bottom: "initial"
|
|
2091
2166
|
});
|
|
2092
2167
|
setOpacity(0);
|
|
2093
2168
|
}, expanded);
|
|
@@ -2104,7 +2179,7 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2104
2179
|
ref: nativeSelect,
|
|
2105
2180
|
name: name,
|
|
2106
2181
|
onChange: nativeOnChangeHandler,
|
|
2107
|
-
className: modules_35a251a6[
|
|
2182
|
+
className: modules_35a251a6["sr-only"]
|
|
2108
2183
|
}), React__default["default"].createElement("option", {
|
|
2109
2184
|
value: ""
|
|
2110
2185
|
}), React__default["default"].Children.map(children, function (child) {
|
|
@@ -2114,14 +2189,14 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2114
2189
|
})), React__default["default"].createElement("div", _extends({}, filterProps(rest, /^data-/), {
|
|
2115
2190
|
ref: containerReference,
|
|
2116
2191
|
onKeyDown: onArrowNavigation,
|
|
2117
|
-
className: "custom-select " + modules_7db85bb8.select + " " + additionalClasses.join(
|
|
2192
|
+
className: "custom-select " + modules_7db85bb8.select + " " + additionalClasses.join(" ") + " " + (className != null ? className : "")
|
|
2118
2193
|
}), React__default["default"].createElement("button", _extends({}, selectButtonProps, {
|
|
2119
2194
|
onClick: function onClick() {
|
|
2120
2195
|
setExpanded(!expanded);
|
|
2121
2196
|
},
|
|
2122
2197
|
type: "button",
|
|
2123
2198
|
name: name,
|
|
2124
|
-
className: modules_7db85bb8[
|
|
2199
|
+
className: modules_7db85bb8["custom-select"] + " " + additionalClasses.join(" ") + " ",
|
|
2125
2200
|
disabled: disabled,
|
|
2126
2201
|
"aria-disabled": disabled,
|
|
2127
2202
|
"aria-invalid": error,
|
|
@@ -2131,23 +2206,24 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2131
2206
|
"aria-describedby": describedBy
|
|
2132
2207
|
}), React__default["default"].createElement("div", {
|
|
2133
2208
|
"data-display": true,
|
|
2134
|
-
className: modules_7db85bb8[
|
|
2209
|
+
className: modules_7db85bb8["selected"]
|
|
2135
2210
|
}, !value && placeholder && React__default["default"].createElement("span", {
|
|
2136
|
-
className: modules_7db85bb8[
|
|
2211
|
+
className: modules_7db85bb8["placeholder"]
|
|
2137
2212
|
}, placeholder), (value == null ? void 0 : value.length) > 0 && React__default["default"].createElement("span", {
|
|
2138
2213
|
"data-display-inner": true
|
|
2139
2214
|
}, display)), React__default["default"].createElement("div", {
|
|
2140
|
-
className: modules_7db85bb8[
|
|
2215
|
+
className: modules_7db85bb8["status"]
|
|
2141
2216
|
}, statusIcon(), React__default["default"].createElement(Icon, {
|
|
2142
|
-
className: modules_7db85bb8[
|
|
2217
|
+
className: modules_7db85bb8["triangle-down"],
|
|
2143
2218
|
icon: exports.Icons.TriangleDown
|
|
2144
2219
|
}))), React__default["default"].createElement("div", {
|
|
2145
2220
|
ref: optionListReference,
|
|
2146
|
-
className: "list-wrapper " + modules_7db85bb8[
|
|
2221
|
+
className: "list-wrapper " + modules_7db85bb8["list-wrapper"],
|
|
2147
2222
|
style: _extends({
|
|
2148
|
-
display: expanded ?
|
|
2223
|
+
display: expanded ? "block" : "none",
|
|
2149
2224
|
opacity: opacity,
|
|
2150
|
-
maxHeight: optionsListMaxHeight
|
|
2225
|
+
maxHeight: optionsListMaxHeight,
|
|
2226
|
+
pointerEvents: expanded ? "auto" : "none"
|
|
2151
2227
|
}, listPosition)
|
|
2152
2228
|
}, Array.isArray(children) && children.length > renderSearchCondition && renderSearch(), React__default["default"].createElement("ul", {
|
|
2153
2229
|
role: "listbox"
|
|
@@ -2191,10 +2267,10 @@ var Option = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2191
2267
|
return React__default["default"].createElement("li", _extends({}, rest, {
|
|
2192
2268
|
ref: innerOptionRef,
|
|
2193
2269
|
"data-value": value,
|
|
2194
|
-
className: (isSelected ? modules_7db85bb8[
|
|
2270
|
+
className: (isSelected ? modules_7db85bb8["selected-option"] : "") + " " + (disabled ? modules_7db85bb8.disabled : "") + " " + (className != null ? className : ""),
|
|
2195
2271
|
onClick: onSelectHandler,
|
|
2196
2272
|
onKeyDownCapture: function onKeyDownCapture(event) {
|
|
2197
|
-
if (event.code ===
|
|
2273
|
+
if (event.code === "Enter") {
|
|
2198
2274
|
event.stopPropagation();
|
|
2199
2275
|
event.preventDefault();
|
|
2200
2276
|
onSelectHandler();
|
|
@@ -2220,7 +2296,7 @@ var Label = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
2220
2296
|
|
|
2221
2297
|
return React__default["default"].createElement("label", _extends({}, rest, {
|
|
2222
2298
|
ref: ref,
|
|
2223
|
-
className: (hidden ? modules_35a251a6[
|
|
2299
|
+
className: (hidden ? modules_35a251a6["sr-only"] : "") + " " + modules_aa63a669["label"] + " " + (className != null ? className : "")
|
|
2224
2300
|
}), children);
|
|
2225
2301
|
});
|
|
2226
2302
|
|
|
@@ -2248,7 +2324,7 @@ var Pagination = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
2248
2324
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
2249
2325
|
|
|
2250
2326
|
/** We use an internal state variable, because we don't want to fire onCurrentPageChange whenever onChange fires on the input. Rather, only when the Enter key is pressed. */
|
|
2251
|
-
var _useState = React.useState((currentPage == null ? void 0 : currentPage.toString()) ||
|
|
2327
|
+
var _useState = React.useState((currentPage == null ? void 0 : currentPage.toString()) || "1"),
|
|
2252
2328
|
internalCurrentPage = _useState[0],
|
|
2253
2329
|
setInternalCurrentPage = _useState[1];
|
|
2254
2330
|
|
|
@@ -2263,7 +2339,7 @@ var Pagination = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
2263
2339
|
};
|
|
2264
2340
|
|
|
2265
2341
|
var onEnterListener = function onEnterListener(event) {
|
|
2266
|
-
if (event.code ===
|
|
2342
|
+
if (event.code === "Enter") {
|
|
2267
2343
|
onPageChange(Number(internalCurrentPage));
|
|
2268
2344
|
}
|
|
2269
2345
|
};
|
|
@@ -2272,15 +2348,15 @@ var Pagination = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
2272
2348
|
var amountOfPages = calculateAmountOfPages();
|
|
2273
2349
|
|
|
2274
2350
|
if (amountOfPages) {
|
|
2275
|
-
var splitCurrentPageTranslation = translate.currentPage.split(
|
|
2351
|
+
var splitCurrentPageTranslation = translate.currentPage.split(" ");
|
|
2276
2352
|
return splitCurrentPageTranslation.map(function (string) {
|
|
2277
|
-
if (string.includes(
|
|
2353
|
+
if (string.includes("%1")) {
|
|
2278
2354
|
return React__default["default"].createElement(React.Fragment, {
|
|
2279
2355
|
key: string
|
|
2280
2356
|
}, React__default["default"].createElement(Label, {
|
|
2281
2357
|
id: "current-value-input-label",
|
|
2282
2358
|
htmlFor: "current-value-input",
|
|
2283
|
-
className: modules_35a251a6[
|
|
2359
|
+
className: modules_35a251a6["sr-only"] + " " + modules_e3c5bce1["current-value-input-label"]
|
|
2284
2360
|
}, translate.currentPageLabel), React__default["default"].createElement(Input, {
|
|
2285
2361
|
"aria-labelledby": "current-value-input-label",
|
|
2286
2362
|
key: "input",
|
|
@@ -2289,7 +2365,7 @@ var Pagination = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
2289
2365
|
size: currentPage == null ? void 0 : currentPage.toString().length,
|
|
2290
2366
|
max: calculateAmountOfPages(),
|
|
2291
2367
|
wrapperProps: {
|
|
2292
|
-
className: modules_e3c5bce1[
|
|
2368
|
+
className: modules_e3c5bce1["current-value-input"]
|
|
2293
2369
|
},
|
|
2294
2370
|
onKeyUp: onEnterListener,
|
|
2295
2371
|
onBlur: function onBlur(event) {
|
|
@@ -2300,14 +2376,14 @@ var Pagination = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
2300
2376
|
},
|
|
2301
2377
|
name: "current-value-input",
|
|
2302
2378
|
value: internalCurrentPage,
|
|
2303
|
-
className: modules_e3c5bce1[
|
|
2379
|
+
className: modules_e3c5bce1["form-element"] + " " + modules_e3c5bce1["current-page-input"]
|
|
2304
2380
|
}));
|
|
2305
2381
|
}
|
|
2306
2382
|
|
|
2307
|
-
if (string.includes(
|
|
2383
|
+
if (string.includes("%2")) {
|
|
2308
2384
|
return React__default["default"].createElement("div", {
|
|
2309
2385
|
key: string
|
|
2310
|
-
}, React__default["default"].createElement("strong", null, string.replace(
|
|
2386
|
+
}, React__default["default"].createElement("strong", null, string.replace("%2", amountOfPages.toString())), "\xA0");
|
|
2311
2387
|
}
|
|
2312
2388
|
|
|
2313
2389
|
return React__default["default"].createElement("div", {
|
|
@@ -2330,20 +2406,20 @@ var Pagination = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
2330
2406
|
|
|
2331
2407
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
2332
2408
|
ref: ref,
|
|
2333
|
-
className: modules_e3c5bce1[
|
|
2409
|
+
className: modules_e3c5bce1["pagination-wrapper"] + " " + (className ? className : "")
|
|
2334
2410
|
}), totalElements && React__default["default"].createElement("div", {
|
|
2335
|
-
className: modules_e3c5bce1[
|
|
2411
|
+
className: modules_e3c5bce1["total"]
|
|
2336
2412
|
}, React__default["default"].createElement("span", {
|
|
2337
2413
|
tabIndex: 0
|
|
2338
2414
|
}, translate.totalItems, ": ", React__default["default"].createElement("span", null, totalElements))), React__default["default"].createElement("div", {
|
|
2339
|
-
className: modules_e3c5bce1[
|
|
2415
|
+
className: modules_e3c5bce1["pagination"]
|
|
2340
2416
|
}, pageSize && React__default["default"].createElement("div", {
|
|
2341
|
-
className: modules_e3c5bce1[
|
|
2417
|
+
className: modules_e3c5bce1["per-page"]
|
|
2342
2418
|
}, React__default["default"].createElement(Label, {
|
|
2343
2419
|
id: "page-size-select-label"
|
|
2344
2420
|
}, translate.itemsPerPage), React__default["default"].createElement(Select, {
|
|
2345
2421
|
labeledBy: "page-size-select-label",
|
|
2346
|
-
className: modules_e3c5bce1[
|
|
2422
|
+
className: modules_e3c5bce1["form-element"] + " " + modules_e3c5bce1["page-size-select"],
|
|
2347
2423
|
value: pageSize.toString(),
|
|
2348
2424
|
onChange: onPageSizeChangeHandler
|
|
2349
2425
|
}, React__default["default"].createElement(Option, {
|
|
@@ -2353,7 +2429,7 @@ var Pagination = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
2353
2429
|
}, "25"), React__default["default"].createElement(Option, {
|
|
2354
2430
|
value: "50"
|
|
2355
2431
|
}, "50"))), React__default["default"].createElement(React.Fragment, null, !!(currentPage && currentPage > 2 || currentPage && currentPage > 1) && React__default["default"].createElement("div", {
|
|
2356
|
-
className: modules_e3c5bce1[
|
|
2432
|
+
className: modules_e3c5bce1["previous"]
|
|
2357
2433
|
}, currentPage > 2 && React__default["default"].createElement(IconButton, {
|
|
2358
2434
|
title: "first",
|
|
2359
2435
|
onClick: function onClick() {
|
|
@@ -2370,10 +2446,10 @@ var Pagination = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
2370
2446
|
"data-paginate": "previous"
|
|
2371
2447
|
}, React__default["default"].createElement(Icon, {
|
|
2372
2448
|
icon: exports.Icons.ChevronLeft
|
|
2373
|
-
}))), totalElements && calculateAmountOfPages() && React__default["default"].createElement("div", {
|
|
2374
|
-
className: modules_e3c5bce1[
|
|
2449
|
+
}))), totalElements && !!calculateAmountOfPages() && React__default["default"].createElement("div", {
|
|
2450
|
+
className: modules_e3c5bce1["page"]
|
|
2375
2451
|
}, renderCurrentPageTranslation()), React__default["default"].createElement("div", {
|
|
2376
|
-
className: modules_e3c5bce1[
|
|
2452
|
+
className: modules_e3c5bce1["next"]
|
|
2377
2453
|
}, !!(currentPage !== undefined && currentPage < calculateAmountOfPages() || currentPage !== undefined && !totalElements) && React__default["default"].createElement(IconButton, {
|
|
2378
2454
|
title: "next",
|
|
2379
2455
|
onClick: function onClick() {
|
|
@@ -2439,15 +2515,15 @@ var descriptionId = function descriptionId(id) {
|
|
|
2439
2515
|
};
|
|
2440
2516
|
|
|
2441
2517
|
var _excluded$A = ["id", "children", "open", "onClose", "className", "containerProps", "backdropProps", "labelledby", "describedby", "disableEscapeKeyDown", "disableBackdrop", "forceContainerOpen", "zIndex", "domRoot"];
|
|
2442
|
-
var SCROLL_PROPERTY_NAME =
|
|
2443
|
-
var SCROLL_PROPERTY_VALUE =
|
|
2518
|
+
var SCROLL_PROPERTY_NAME = "overflow";
|
|
2519
|
+
var SCROLL_PROPERTY_VALUE = "hidden";
|
|
2444
2520
|
var useSetBodyScroll = function useSetBodyScroll(open) {
|
|
2445
2521
|
var hideBodyScroll = function hideBodyScroll() {
|
|
2446
2522
|
document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;
|
|
2447
2523
|
};
|
|
2448
2524
|
|
|
2449
2525
|
var showBodyScroll = function showBodyScroll() {
|
|
2450
|
-
var allModalsClosed = document.querySelectorAll(
|
|
2526
|
+
var allModalsClosed = document.querySelectorAll("[role=dialog][data-hidden=false]").length === 0;
|
|
2451
2527
|
|
|
2452
2528
|
if (allModalsClosed) {
|
|
2453
2529
|
document.body.style.removeProperty(SCROLL_PROPERTY_NAME);
|
|
@@ -2470,7 +2546,7 @@ var BaseModal = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
2470
2546
|
open = _ref.open,
|
|
2471
2547
|
onClose = _ref.onClose,
|
|
2472
2548
|
_ref$className = _ref.className,
|
|
2473
|
-
className = _ref$className === void 0 ?
|
|
2549
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
2474
2550
|
containerProps = _ref.containerProps,
|
|
2475
2551
|
backdropProps = _ref.backdropProps,
|
|
2476
2552
|
labelledby = _ref.labelledby,
|
|
@@ -2489,7 +2565,7 @@ var BaseModal = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
2489
2565
|
useSetBodyScroll(open);
|
|
2490
2566
|
|
|
2491
2567
|
var handleEscKeyPress = function handleEscKeyPress(event) {
|
|
2492
|
-
if (!disableEscapeKeyDown && event.key ===
|
|
2568
|
+
if (!disableEscapeKeyDown && event.key === "Escape") {
|
|
2493
2569
|
event.stopPropagation();
|
|
2494
2570
|
onClose && onClose();
|
|
2495
2571
|
}
|
|
@@ -2502,7 +2578,7 @@ var BaseModal = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
2502
2578
|
return reactDom.createPortal(React__default["default"].createElement("div", _extends({}, rest, {
|
|
2503
2579
|
ref: ref,
|
|
2504
2580
|
id: id,
|
|
2505
|
-
className: modules_cf1b230e[
|
|
2581
|
+
className: modules_cf1b230e["modal"] + " " + (open ? modules_cf1b230e["visible"] : "") + " " + className,
|
|
2506
2582
|
role: "dialog",
|
|
2507
2583
|
"aria-modal": "true",
|
|
2508
2584
|
"aria-labelledby": labelledby || labelId(id),
|
|
@@ -2515,7 +2591,7 @@ var BaseModal = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
2515
2591
|
zIndex: zIndex
|
|
2516
2592
|
}
|
|
2517
2593
|
}), React__default["default"].createElement("div", _extends({}, backdropProps, {
|
|
2518
|
-
className: modules_cf1b230e[
|
|
2594
|
+
className: modules_cf1b230e["backdrop"] + " " + ((_backdropProps$classN = backdropProps == null ? void 0 : backdropProps.className) != null ? _backdropProps$classN : ""),
|
|
2519
2595
|
onClick: handleBackdropClick
|
|
2520
2596
|
})), forceContainerOpen ? React__default["default"].createElement("div", _extends({}, containerProps, {
|
|
2521
2597
|
"aria-hidden": !open,
|
|
@@ -2523,12 +2599,12 @@ var BaseModal = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
2523
2599
|
style: {
|
|
2524
2600
|
zIndex: zIndex && zIndex + 1
|
|
2525
2601
|
},
|
|
2526
|
-
className: modules_cf1b230e[
|
|
2602
|
+
className: modules_cf1b230e["container"] + " " + ((_containerProps$class = containerProps == null ? void 0 : containerProps.className) != null ? _containerProps$class : "")
|
|
2527
2603
|
}), children) : open && React__default["default"].createElement("div", _extends({}, containerProps, {
|
|
2528
2604
|
style: {
|
|
2529
2605
|
zIndex: zIndex && zIndex + 1
|
|
2530
2606
|
},
|
|
2531
|
-
className: modules_cf1b230e[
|
|
2607
|
+
className: modules_cf1b230e["container"] + " " + ((_containerProps$class2 = containerProps == null ? void 0 : containerProps.className) != null ? _containerProps$class2 : "")
|
|
2532
2608
|
}), children)), domRoot);
|
|
2533
2609
|
});
|
|
2534
2610
|
|
|
@@ -2565,7 +2641,7 @@ var BaseModalContent = /*#__PURE__*/React__default["default"].forwardRef(functio
|
|
|
2565
2641
|
var id = _ref.id,
|
|
2566
2642
|
children = _ref.children,
|
|
2567
2643
|
_ref$className = _ref.className,
|
|
2568
|
-
className = _ref$className === void 0 ?
|
|
2644
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
2569
2645
|
_ref$disableAutoFocus = _ref.disableAutoFocus,
|
|
2570
2646
|
disableAutoFocus = _ref$disableAutoFocus === void 0 ? false : _ref$disableAutoFocus,
|
|
2571
2647
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
@@ -2587,7 +2663,7 @@ var BaseModalContent = /*#__PURE__*/React__default["default"].forwardRef(functio
|
|
|
2587
2663
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
2588
2664
|
ref: ref || contentRef,
|
|
2589
2665
|
id: id,
|
|
2590
|
-
className: modules_cf7b8d60[
|
|
2666
|
+
className: modules_cf7b8d60["content"] + " " + className,
|
|
2591
2667
|
tabIndex: -1
|
|
2592
2668
|
}), children);
|
|
2593
2669
|
});
|
|
@@ -2600,12 +2676,12 @@ var _excluded$y = ["children", "className"];
|
|
|
2600
2676
|
var BaseModalActions = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
2601
2677
|
var children = _ref.children,
|
|
2602
2678
|
_ref$className = _ref.className,
|
|
2603
|
-
className = _ref$className === void 0 ?
|
|
2679
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
2604
2680
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
2605
2681
|
|
|
2606
2682
|
return React__default["default"].createElement("footer", _extends({}, rest, {
|
|
2607
2683
|
ref: ref,
|
|
2608
|
-
className: modules_6b4a9db0[
|
|
2684
|
+
className: modules_6b4a9db0["actions"] + " " + className
|
|
2609
2685
|
}), children);
|
|
2610
2686
|
});
|
|
2611
2687
|
|
|
@@ -2621,7 +2697,7 @@ var DialogActions = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
|
2621
2697
|
|
|
2622
2698
|
return React__default["default"].createElement(BaseModalActions, _extends({}, rest, {
|
|
2623
2699
|
ref: ref,
|
|
2624
|
-
className: "" + modules_d87e2731[
|
|
2700
|
+
className: "" + modules_d87e2731["actions"] + (align === "left" ? " " + modules_d87e2731["left"] : "")
|
|
2625
2701
|
}), children);
|
|
2626
2702
|
});
|
|
2627
2703
|
|
|
@@ -2641,10 +2717,10 @@ var DialogTitle = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
2641
2717
|
|
|
2642
2718
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
2643
2719
|
ref: ref,
|
|
2644
|
-
className: modules_ff1bcd77[
|
|
2720
|
+
className: modules_ff1bcd77["header"]
|
|
2645
2721
|
}), React__default["default"].createElement(Typography, {
|
|
2646
2722
|
id: id,
|
|
2647
|
-
className: modules_ff1bcd77[
|
|
2723
|
+
className: modules_ff1bcd77["title"],
|
|
2648
2724
|
tag: "h1",
|
|
2649
2725
|
variant: "h4"
|
|
2650
2726
|
}, title));
|
|
@@ -2689,7 +2765,7 @@ var Dialog = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2689
2765
|
|
|
2690
2766
|
var onHiddenInputKeyPress = function onHiddenInputKeyPress(event) {
|
|
2691
2767
|
/** It has to be here because then we will need to check if user doesn't click tab to select action button and want to do another action then primary one? */
|
|
2692
|
-
if (event.key ===
|
|
2768
|
+
if (event.key === "Enter") {
|
|
2693
2769
|
primaryAction.onClick();
|
|
2694
2770
|
}
|
|
2695
2771
|
};
|
|
@@ -2697,9 +2773,9 @@ var Dialog = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2697
2773
|
return React__default["default"].createElement(BaseModal, _extends({}, rest, {
|
|
2698
2774
|
ref: ref,
|
|
2699
2775
|
id: dialogId,
|
|
2700
|
-
className: modules_c8de1793[
|
|
2776
|
+
className: modules_c8de1793["dialog"],
|
|
2701
2777
|
containerProps: {
|
|
2702
|
-
className: modules_c8de1793[
|
|
2778
|
+
className: modules_c8de1793["container"]
|
|
2703
2779
|
},
|
|
2704
2780
|
open: open,
|
|
2705
2781
|
disableBackdrop: true,
|
|
@@ -2711,15 +2787,15 @@ var Dialog = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
2711
2787
|
title: title
|
|
2712
2788
|
}), React__default["default"].createElement(BaseModalContent, {
|
|
2713
2789
|
id: descriptionId(dialogId),
|
|
2714
|
-
className: modules_c8de1793[
|
|
2790
|
+
className: modules_c8de1793["content"],
|
|
2715
2791
|
disableAutoFocus: true
|
|
2716
2792
|
}, children), React__default["default"].createElement(DialogActions, {
|
|
2717
2793
|
align: alignActions
|
|
2718
|
-
}, alignActions ===
|
|
2794
|
+
}, alignActions === "left" ? [PrimaryButton, TertiaryButton] : [TertiaryButton, PrimaryButton]), React__default["default"].createElement("input", {
|
|
2719
2795
|
autoFocus: true,
|
|
2720
2796
|
"aria-hidden": true,
|
|
2721
2797
|
style: {
|
|
2722
|
-
position:
|
|
2798
|
+
position: "absolute",
|
|
2723
2799
|
width: 0,
|
|
2724
2800
|
height: 0,
|
|
2725
2801
|
opacity: 0
|
|
@@ -2744,17 +2820,17 @@ var BaseModalHeader = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
2744
2820
|
|
|
2745
2821
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
2746
2822
|
ref: ref,
|
|
2747
|
-
className: modules_74d5dc9f[
|
|
2823
|
+
className: modules_74d5dc9f["header"]
|
|
2748
2824
|
}), React__default["default"].createElement("div", {
|
|
2749
|
-
className: modules_74d5dc9f[
|
|
2825
|
+
className: modules_74d5dc9f["headline"]
|
|
2750
2826
|
}, React__default["default"].createElement(Typography, {
|
|
2751
2827
|
id: id,
|
|
2752
|
-
className: modules_74d5dc9f[
|
|
2828
|
+
className: modules_74d5dc9f["title"],
|
|
2753
2829
|
tag: "h1",
|
|
2754
2830
|
variant: "h4"
|
|
2755
2831
|
}, title), React__default["default"].createElement(IconButton, {
|
|
2756
2832
|
onClick: onClose,
|
|
2757
|
-
className: modules_74d5dc9f[
|
|
2833
|
+
className: modules_74d5dc9f["closeBtn"],
|
|
2758
2834
|
title: "close modal"
|
|
2759
2835
|
}, React__default["default"].createElement(Icon, {
|
|
2760
2836
|
icon: exports.Icons.Times
|
|
@@ -2850,29 +2926,33 @@ var SlideInModal = /*#__PURE__*/React__default["default"].forwardRef(function (_
|
|
|
2850
2926
|
open = _ref.open,
|
|
2851
2927
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
2852
2928
|
|
|
2853
|
-
var _useState = React.useState(
|
|
2929
|
+
var _useState = React.useState("hidden"),
|
|
2854
2930
|
classHideOnTransition = _useState[0],
|
|
2855
2931
|
setClassHideOnTransition = _useState[1];
|
|
2856
2932
|
|
|
2857
|
-
var
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2933
|
+
var containerRef = React.useRef(null);
|
|
2934
|
+
|
|
2935
|
+
var onTransitionEnd = function onTransitionEnd(e) {
|
|
2936
|
+
if (e.target === containerRef.current) {
|
|
2937
|
+
setClassHideOnTransition(function (prev) {
|
|
2938
|
+
return prev ? "" : "hidden";
|
|
2939
|
+
});
|
|
2940
|
+
}
|
|
2861
2941
|
};
|
|
2862
2942
|
|
|
2863
2943
|
return React__default["default"].createElement(BaseModal, _extends({}, rest, {
|
|
2864
2944
|
id: id,
|
|
2865
2945
|
open: open,
|
|
2866
|
-
className: modules_0a5af5e0[
|
|
2946
|
+
className: modules_0a5af5e0["slide-in-modal"] + " " + (open ? modules_0a5af5e0["visible"] : "") + " " + (!open ? modules_0a5af5e0[classHideOnTransition] : ""),
|
|
2867
2947
|
containerProps: {
|
|
2868
|
-
className: modules_0a5af5e0[
|
|
2948
|
+
className: modules_0a5af5e0["container"]
|
|
2869
2949
|
},
|
|
2870
2950
|
backdropProps: {
|
|
2871
|
-
className: modules_0a5af5e0[
|
|
2951
|
+
className: modules_0a5af5e0["backdrop-slide"]
|
|
2872
2952
|
},
|
|
2873
2953
|
forceContainerOpen: true,
|
|
2874
2954
|
onTransitionEnd: onTransitionEnd,
|
|
2875
|
-
ref: ref
|
|
2955
|
+
ref: ref || containerRef
|
|
2876
2956
|
}), children);
|
|
2877
2957
|
});
|
|
2878
2958
|
|
|
@@ -2892,7 +2972,7 @@ var SnackbarContainer = function SnackbarContainer(_ref) {
|
|
|
2892
2972
|
style: {
|
|
2893
2973
|
zIndex: zIndex
|
|
2894
2974
|
},
|
|
2895
|
-
className: modules_531ab449[
|
|
2975
|
+
className: modules_531ab449["snackbars"] + " " + modules_531ab449[placement.horizontal] + " " + modules_531ab449[placement.vertical] + " " + (className != null ? className : "")
|
|
2896
2976
|
}), children);
|
|
2897
2977
|
};
|
|
2898
2978
|
|
|
@@ -2915,11 +2995,11 @@ var useAnimation = function useAnimation(callback) {
|
|
|
2915
2995
|
React.useEffect(function () {
|
|
2916
2996
|
var _animatedObjectRef$cu;
|
|
2917
2997
|
|
|
2918
|
-
(_animatedObjectRef$cu = animatedObjectRef.current) == null ? void 0 : _animatedObjectRef$cu.addEventListener(
|
|
2998
|
+
(_animatedObjectRef$cu = animatedObjectRef.current) == null ? void 0 : _animatedObjectRef$cu.addEventListener("animationend", onAnimationEnd);
|
|
2919
2999
|
return function () {
|
|
2920
3000
|
var _animatedObjectRef$cu2;
|
|
2921
3001
|
|
|
2922
|
-
return (_animatedObjectRef$cu2 = animatedObjectRef.current) == null ? void 0 : _animatedObjectRef$cu2.removeEventListener(
|
|
3002
|
+
return (_animatedObjectRef$cu2 = animatedObjectRef.current) == null ? void 0 : _animatedObjectRef$cu2.removeEventListener("animationend", onAnimationEnd);
|
|
2923
3003
|
};
|
|
2924
3004
|
}, [animationStarted]);
|
|
2925
3005
|
return {
|
|
@@ -2931,7 +3011,7 @@ var useAnimation = function useAnimation(callback) {
|
|
|
2931
3011
|
};
|
|
2932
3012
|
};
|
|
2933
3013
|
|
|
2934
|
-
var textColor =
|
|
3014
|
+
var textColor = "var(--snackbar-text-color)";
|
|
2935
3015
|
var SnackbarItem = function SnackbarItem(_ref) {
|
|
2936
3016
|
var id = _ref.id,
|
|
2937
3017
|
title = _ref.title,
|
|
@@ -2973,11 +3053,11 @@ var SnackbarItem = function SnackbarItem(_ref) {
|
|
|
2973
3053
|
};
|
|
2974
3054
|
|
|
2975
3055
|
var getVariantIcon = function getVariantIcon() {
|
|
2976
|
-
if (variant ===
|
|
3056
|
+
if (variant === "error") {
|
|
2977
3057
|
return exports.Icons.Error;
|
|
2978
3058
|
}
|
|
2979
3059
|
|
|
2980
|
-
return variant ===
|
|
3060
|
+
return variant === "success" ? exports.Icons.CheckmarkCircleBreakout : exports.Icons.InfoCircle;
|
|
2981
3061
|
};
|
|
2982
3062
|
|
|
2983
3063
|
var actionButtons = actions.map(function (actionProp, index) {
|
|
@@ -2989,27 +3069,27 @@ var SnackbarItem = function SnackbarItem(_ref) {
|
|
|
2989
3069
|
actionProp.onClick && actionProp.onClick(e);
|
|
2990
3070
|
},
|
|
2991
3071
|
children: actionProp.label,
|
|
2992
|
-
className: modules_d6335ff6[
|
|
3072
|
+
className: modules_d6335ff6["action-button"]
|
|
2993
3073
|
}));
|
|
2994
3074
|
});
|
|
2995
3075
|
return React__default["default"].createElement("div", {
|
|
2996
3076
|
ref: ref,
|
|
2997
|
-
className: modules_d6335ff6[
|
|
3077
|
+
className: modules_d6335ff6["snackbar"] + " " + modules_d6335ff6[variant] + " " + (animationStarted ? modules_35a251a6["slide-out"] : modules_35a251a6["slide-in"]),
|
|
2998
3078
|
onMouseEnter: onMouseEnter,
|
|
2999
3079
|
onMouseLeave: onMouseLeave
|
|
3000
3080
|
}, React__default["default"].createElement(Icon, {
|
|
3001
3081
|
icon: getVariantIcon(),
|
|
3002
|
-
className: modules_d6335ff6[
|
|
3082
|
+
className: modules_d6335ff6["icon"]
|
|
3003
3083
|
}), React__default["default"].createElement("div", {
|
|
3004
|
-
className: modules_d6335ff6[
|
|
3084
|
+
className: modules_d6335ff6["container"]
|
|
3005
3085
|
}, React__default["default"].createElement("div", {
|
|
3006
|
-
className: modules_d6335ff6[
|
|
3086
|
+
className: modules_d6335ff6["headline"]
|
|
3007
3087
|
}, React__default["default"].createElement(Typography, {
|
|
3008
|
-
className: modules_d6335ff6[
|
|
3088
|
+
className: modules_d6335ff6["title"],
|
|
3009
3089
|
variant: "h4",
|
|
3010
3090
|
tag: "span"
|
|
3011
3091
|
}, title), React__default["default"].createElement(IconButton, {
|
|
3012
|
-
id: modules_d6335ff6[
|
|
3092
|
+
id: modules_d6335ff6["close-btn"],
|
|
3013
3093
|
onClick: function onClick() {
|
|
3014
3094
|
return startAnimation();
|
|
3015
3095
|
},
|
|
@@ -3018,22 +3098,22 @@ var SnackbarItem = function SnackbarItem(_ref) {
|
|
|
3018
3098
|
icon: exports.Icons.Times,
|
|
3019
3099
|
color: textColor
|
|
3020
3100
|
}))), !!content && React__default["default"].createElement(Typography, {
|
|
3021
|
-
className: modules_d6335ff6[
|
|
3101
|
+
className: modules_d6335ff6["content"],
|
|
3022
3102
|
variant: "body"
|
|
3023
3103
|
}, content), actionButtons.length > 0 && React__default["default"].createElement("div", {
|
|
3024
|
-
className: modules_d6335ff6[
|
|
3104
|
+
className: modules_d6335ff6["actions"]
|
|
3025
3105
|
}, actionButtons)));
|
|
3026
3106
|
};
|
|
3027
3107
|
|
|
3028
3108
|
var SnackbarProvider = function SnackbarProvider(_temp) {
|
|
3029
3109
|
var _ref = _temp === void 0 ? {
|
|
3030
|
-
closeButtonTitle:
|
|
3110
|
+
closeButtonTitle: ""
|
|
3031
3111
|
} : _temp,
|
|
3032
3112
|
closeButtonTitle = _ref.closeButtonTitle,
|
|
3033
3113
|
_ref$placement = _ref.placement,
|
|
3034
3114
|
placement = _ref$placement === void 0 ? {
|
|
3035
|
-
vertical:
|
|
3036
|
-
horizontal:
|
|
3115
|
+
vertical: "bottom",
|
|
3116
|
+
horizontal: "center"
|
|
3037
3117
|
} : _ref$placement,
|
|
3038
3118
|
_ref$autoHideDuration = _ref.autoHideDuration,
|
|
3039
3119
|
autoHideDuration = _ref$autoHideDuration === void 0 ? {
|
|
@@ -3058,7 +3138,7 @@ var SnackbarProvider = function SnackbarProvider(_temp) {
|
|
|
3058
3138
|
};
|
|
3059
3139
|
|
|
3060
3140
|
var getDuration = function getDuration(variant, actions, content) {
|
|
3061
|
-
var hasError = variant ===
|
|
3141
|
+
var hasError = variant === "error";
|
|
3062
3142
|
var hasContentOrActions = content || actions;
|
|
3063
3143
|
|
|
3064
3144
|
if (hasError || hasContentOrActions) {
|
|
@@ -3075,7 +3155,7 @@ var SnackbarProvider = function SnackbarProvider(_temp) {
|
|
|
3075
3155
|
|
|
3076
3156
|
var _options = options,
|
|
3077
3157
|
_options$variant = _options.variant,
|
|
3078
|
-
variant = _options$variant === void 0 ?
|
|
3158
|
+
variant = _options$variant === void 0 ? "info" : _options$variant,
|
|
3079
3159
|
actions = _options.actions,
|
|
3080
3160
|
_options$duration = _options.duration,
|
|
3081
3161
|
duration = _options$duration === void 0 ? getDuration(variant, actions, content) : _options$duration;
|
|
@@ -3092,13 +3172,13 @@ var SnackbarProvider = function SnackbarProvider(_temp) {
|
|
|
3092
3172
|
|
|
3093
3173
|
var enqueueSuccessSnackbar = function enqueueSuccessSnackbar(title, content, options) {
|
|
3094
3174
|
enqueueSnackbar(title, content, _extends({}, options, {
|
|
3095
|
-
variant:
|
|
3175
|
+
variant: "success"
|
|
3096
3176
|
}));
|
|
3097
3177
|
};
|
|
3098
3178
|
|
|
3099
3179
|
var enqueueErrorSnackbar = function enqueueErrorSnackbar(title, content, options) {
|
|
3100
3180
|
enqueueSnackbar(title, content, _extends({}, options, {
|
|
3101
|
-
variant:
|
|
3181
|
+
variant: "error"
|
|
3102
3182
|
}));
|
|
3103
3183
|
};
|
|
3104
3184
|
|
|
@@ -3138,7 +3218,7 @@ var useFormSelector = function useFormSelector(configObject) {
|
|
|
3138
3218
|
var _useState = React.useState(generateID(15, configObject.name)),
|
|
3139
3219
|
identifier = _useState[0];
|
|
3140
3220
|
|
|
3141
|
-
var _useState2 = React.useState(
|
|
3221
|
+
var _useState2 = React.useState(""),
|
|
3142
3222
|
describedBy = _useState2[0],
|
|
3143
3223
|
setDescribedBy = _useState2[1];
|
|
3144
3224
|
|
|
@@ -3184,7 +3264,7 @@ var FormHelperText = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
3184
3264
|
ref: ref,
|
|
3185
3265
|
variant: "sub-text",
|
|
3186
3266
|
tag: "div",
|
|
3187
|
-
className: modules_aa38270e[
|
|
3267
|
+
className: modules_aa38270e["form-helper-text"] + " " + (error ? modules_aa38270e.error : "") + " " + (className != null ? className : "")
|
|
3188
3268
|
}), children);
|
|
3189
3269
|
});
|
|
3190
3270
|
|
|
@@ -3213,15 +3293,15 @@ var FormSelectorWrapper = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
|
3213
3293
|
var helperRef = (helperProps == null ? void 0 : helperProps.ref) || React.createRef();
|
|
3214
3294
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
3215
3295
|
ref: ref,
|
|
3216
|
-
className: (error ? modules_b6c89faa[
|
|
3296
|
+
className: (error ? modules_b6c89faa["error"] : "") + " " + (disabled ? modules_b6c89faa["disabled"] : "") + " " + (className != null ? className : "")
|
|
3217
3297
|
}), React__default["default"].createElement("div", _extends({}, containerProps), children), (helperText || helperProps && helperProps.children) && (!error || parentErrorId || !errorMessage) && React__default["default"].createElement(FormHelperText, _extends({}, helperProps, {
|
|
3218
3298
|
ref: helperRef,
|
|
3219
3299
|
id: "" + identifier,
|
|
3220
|
-
className: modules_b6c89faa[
|
|
3300
|
+
className: modules_b6c89faa["helper-text"] + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "") + " " + (error ? modules_b6c89faa["error"] : "")
|
|
3221
3301
|
}), helperProps && helperProps.children || helperText), errorMessage && !parentErrorId && error && React__default["default"].createElement("span", {
|
|
3222
|
-
className: modules_b6c89faa[
|
|
3302
|
+
className: modules_b6c89faa["error-message"]
|
|
3223
3303
|
}, React__default["default"].createElement(Icon, {
|
|
3224
|
-
className: modules_b6c89faa[
|
|
3304
|
+
className: modules_b6c89faa["error-icon"],
|
|
3225
3305
|
icon: exports.Icons.Error
|
|
3226
3306
|
}), React__default["default"].createElement("span", {
|
|
3227
3307
|
id: errorId
|
|
@@ -3233,7 +3313,7 @@ var _excluded$n = ["children", "name", "helperText", "helperProps", "indetermina
|
|
|
3233
3313
|
var isToggle = function isToggle(children) {
|
|
3234
3314
|
var _children$props;
|
|
3235
3315
|
|
|
3236
|
-
return children == null ? void 0 : (_children$props = children.props) == null ? void 0 : _children$props[
|
|
3316
|
+
return children == null ? void 0 : (_children$props = children.props) == null ? void 0 : _children$props["data-toggle"];
|
|
3237
3317
|
};
|
|
3238
3318
|
|
|
3239
3319
|
var Checkbox = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
@@ -3272,8 +3352,8 @@ var Checkbox = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
3272
3352
|
throw new Error("Please pass a 'name' prop to your <Checkbox> component.");
|
|
3273
3353
|
}
|
|
3274
3354
|
|
|
3275
|
-
if (typeof children ===
|
|
3276
|
-
throw new Error(
|
|
3355
|
+
if (typeof children === "object" && !isToggle(children) && indeterminate === undefined) {
|
|
3356
|
+
throw new Error("If you have nested checkboxes you have to manage the indeterminate state by passing a boolean to the `indeterminate` prop.");
|
|
3277
3357
|
}
|
|
3278
3358
|
}, []);
|
|
3279
3359
|
|
|
@@ -3281,19 +3361,19 @@ var Checkbox = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
3281
3361
|
if (label) {
|
|
3282
3362
|
return label;
|
|
3283
3363
|
} else if (children === undefined) {
|
|
3284
|
-
throw new Error(
|
|
3364
|
+
throw new Error("Please make sure to pass either a string or more Checkbox components as a child of your Checkbox component.");
|
|
3285
3365
|
}
|
|
3286
3366
|
|
|
3287
|
-
if (typeof children ===
|
|
3367
|
+
if (typeof children === "string") {
|
|
3288
3368
|
return children;
|
|
3289
3369
|
}
|
|
3290
3370
|
|
|
3291
|
-
throw new Error(
|
|
3371
|
+
throw new Error("If you pass Checkboxes as a child component (to create nested checkbox tree) you need to pass a label to the parent checkbox.");
|
|
3292
3372
|
};
|
|
3293
3373
|
|
|
3294
3374
|
var renderNestedCheckboxes = function renderNestedCheckboxes() {
|
|
3295
3375
|
return React__default["default"].createElement("ul", {
|
|
3296
|
-
className: modules_6238daf1[
|
|
3376
|
+
className: modules_6238daf1["checkbox-list"]
|
|
3297
3377
|
}, React__default["default"].Children.map(children, function (child) {
|
|
3298
3378
|
return React__default["default"].createElement("li", null, React__default["default"].createElement(Checkbox, _extends({}, child.props, {
|
|
3299
3379
|
parentHelperId: parentHelperId,
|
|
@@ -3316,13 +3396,13 @@ var Checkbox = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
3316
3396
|
return React__default["default"].Children.toArray(children).filter(isToggle);
|
|
3317
3397
|
};
|
|
3318
3398
|
|
|
3319
|
-
var iconClasses = [modules_6238daf1[
|
|
3399
|
+
var iconClasses = [modules_6238daf1["input"], disabled ? modules_6238daf1["disabled"] : ""];
|
|
3320
3400
|
/** Default return value is the default checkbox */
|
|
3321
3401
|
|
|
3322
3402
|
return React__default["default"].createElement(FormSelectorWrapper, _extends({}, formSelectorWrapperProps, {
|
|
3323
|
-
className: modules_6238daf1[
|
|
3403
|
+
className: modules_6238daf1["checkbox-wrapper"] + " " + (className ? className : ""),
|
|
3324
3404
|
containerProps: {
|
|
3325
|
-
className: modules_6238daf1[
|
|
3405
|
+
className: modules_6238daf1["checkbox-container"]
|
|
3326
3406
|
},
|
|
3327
3407
|
helperText: helperText,
|
|
3328
3408
|
helperProps: helperProps,
|
|
@@ -3332,27 +3412,27 @@ var Checkbox = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
3332
3412
|
error: error,
|
|
3333
3413
|
disabled: disabled,
|
|
3334
3414
|
identifier: identifier,
|
|
3335
|
-
nestedChildren: typeof children ===
|
|
3415
|
+
nestedChildren: typeof children === "object" && !isToggle(children) && renderNestedCheckboxes()
|
|
3336
3416
|
}), React__default["default"].createElement("input", _extends({}, rest, {
|
|
3337
3417
|
ref: ref,
|
|
3338
3418
|
disabled: disabled,
|
|
3339
|
-
className: modules_6238daf1[
|
|
3419
|
+
className: modules_6238daf1["native-input"] + " " + (error ? modules_6238daf1["error"] : ""),
|
|
3340
3420
|
checked: checked,
|
|
3341
3421
|
onChange: onChangeHandler,
|
|
3342
3422
|
"aria-invalid": error,
|
|
3343
|
-
"aria-checked": indeterminate ?
|
|
3423
|
+
"aria-checked": indeterminate ? "mixed" : checked,
|
|
3344
3424
|
"aria-describedby": describedBy,
|
|
3345
3425
|
id: identifier + "-checkbox",
|
|
3346
3426
|
name: name,
|
|
3347
3427
|
type: "checkbox"
|
|
3348
3428
|
})), renderToggle(), indeterminate && React__default["default"].createElement(Icon, {
|
|
3349
|
-
className: iconClasses.join(
|
|
3429
|
+
className: iconClasses.join(" "),
|
|
3350
3430
|
icon: exports.Icons.MinusSquare
|
|
3351
3431
|
}), checked && !indeterminate && React__default["default"].createElement(Icon, {
|
|
3352
|
-
className: iconClasses.join(
|
|
3432
|
+
className: iconClasses.join(" "),
|
|
3353
3433
|
icon: exports.Icons.CheckmarkSquare
|
|
3354
3434
|
}), !checked && !indeterminate && React__default["default"].createElement(Icon, {
|
|
3355
|
-
className: iconClasses.join(
|
|
3435
|
+
className: iconClasses.join(" "),
|
|
3356
3436
|
icon: exports.Icons.Square
|
|
3357
3437
|
}), React__default["default"].createElement("label", {
|
|
3358
3438
|
htmlFor: identifier + "-checkbox"
|
|
@@ -3407,7 +3487,7 @@ var Radio = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
3407
3487
|
|
|
3408
3488
|
var nativeEvent = event.nativeEvent || event;
|
|
3409
3489
|
var clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
3410
|
-
Object.defineProperty(clonedEvent,
|
|
3490
|
+
Object.defineProperty(clonedEvent, "target", {
|
|
3411
3491
|
writable: true,
|
|
3412
3492
|
value: {
|
|
3413
3493
|
value: value
|
|
@@ -3419,9 +3499,9 @@ var Radio = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
3419
3499
|
|
|
3420
3500
|
|
|
3421
3501
|
return React__default["default"].createElement(FormSelectorWrapper, _extends({}, formSelectorWrapperProps, {
|
|
3422
|
-
className: modules_8fc278f9[
|
|
3502
|
+
className: modules_8fc278f9["radio-wrapper"] + " " + (className != null ? className : ""),
|
|
3423
3503
|
containerProps: {
|
|
3424
|
-
className: modules_8fc278f9[
|
|
3504
|
+
className: modules_8fc278f9["radio-container"]
|
|
3425
3505
|
},
|
|
3426
3506
|
helperText: helperText,
|
|
3427
3507
|
helperProps: helperProps,
|
|
@@ -3435,7 +3515,7 @@ var Radio = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
3435
3515
|
ref: ref,
|
|
3436
3516
|
disabled: disabled,
|
|
3437
3517
|
tabIndex: 0,
|
|
3438
|
-
className: modules_8fc278f9[
|
|
3518
|
+
className: modules_8fc278f9["native-input"] + " " + (error ? modules_8fc278f9["error"] : ""),
|
|
3439
3519
|
onChange: onChangeHandler,
|
|
3440
3520
|
checked: checked,
|
|
3441
3521
|
"aria-invalid": error ? true : false,
|
|
@@ -3446,10 +3526,10 @@ var Radio = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
3446
3526
|
id: identifier + "-radio",
|
|
3447
3527
|
type: "radio"
|
|
3448
3528
|
})), checked && React__default["default"].createElement(Icon, {
|
|
3449
|
-
className: modules_8fc278f9[
|
|
3529
|
+
className: modules_8fc278f9["input"] + " " + (disabled ? modules_8fc278f9["disabled"] : ""),
|
|
3450
3530
|
icon: exports.Icons.Radio
|
|
3451
3531
|
}), !checked && React__default["default"].createElement(Icon, {
|
|
3452
|
-
className: modules_8fc278f9[
|
|
3532
|
+
className: modules_8fc278f9["input"] + " " + (disabled ? modules_8fc278f9["disabled"] : ""),
|
|
3453
3533
|
icon: exports.Icons.Circle
|
|
3454
3534
|
}), React__default["default"].createElement("label", {
|
|
3455
3535
|
onClick: onChangeHandler,
|
|
@@ -3457,13 +3537,13 @@ var Radio = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
3457
3537
|
}, children));
|
|
3458
3538
|
});
|
|
3459
3539
|
|
|
3460
|
-
var css$j = ".
|
|
3461
|
-
var modules_5a9ee489 = {"textarea-wrapper":"
|
|
3540
|
+
var css$j = ".Textarea_module_srOnly__aa539557 {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.Textarea_module_hidden__aa539557 {\n display: none;\n}\n\n.Textarea_module_slideIn__aa539557 {\n animation: Textarea_module_slideIn__aa539557 0.5s forwards;\n}\n\n.Textarea_module_slideOut__aa539557 {\n animation: Textarea_module_slideOut__aa539557 0.5s forwards;\n}\n\n@keyframes Textarea_module_slideIn__aa539557 {\n 0% {\n transform: translateY(100vh);\n }\n 100% {\n transform: translateY(0%);\n }\n}\n@keyframes Textarea_module_slideOut__aa539557 {\n 0% {\n transform: translateY(0%);\n }\n 100% {\n transform: translateY(100vh);\n }\n}\n.Textarea_module_textareaWrapper__aa539557 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n}\n.Textarea_module_textareaWrapper__aa539557:hover .Textarea_module_outline__aa539557 {\n border-color: var(--default);\n}\n.Textarea_module_textareaWrapper__aa539557 .Textarea_module_outline__aa539557.Textarea_module_disabled__aa539557 {\n border-color: #fff;\n}\n.Textarea_module_textareaWrapper__aa539557 .Textarea_module_outline__aa539557.Textarea_module_error__aa539557 {\n border-color: var(--error);\n}\n.Textarea_module_textareaWrapper__aa539557 .Textarea_module_outline__aa539557.Textarea_module_focus__aa539557 {\n border-width: var(--input-border-width-focus);\n}\n.Textarea_module_textareaWrapper__aa539557 .Textarea_module_outline__aa539557.Textarea_module_focus__aa539557:not(.Textarea_module_error__aa539557) {\n border-color: var(--color-primary);\n}\n\n.Textarea_module_textarea__aa539557 {\n padding: 0.75rem 3.75rem 0.75rem 1.25rem;\n box-sizing: border-box;\n border: 0;\n border-radius: var(--input-border-radius);\n transition: all 0.2s ease-in-out;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--greyed-out);\n width: 100%;\n vertical-align: top;\n resize: vertical;\n}\n.Textarea_module_textarea__aa539557:disabled {\n background-color: var(--disabled);\n cursor: not-allowed;\n}\n.Textarea_module_textarea__aa539557:focus:not(:disabled) {\n outline: none;\n}\n\n.Textarea_module_outline__aa539557 {\n pointer-events: none;\n position: absolute;\n margin: 0;\n padding: 0;\n inset: 0;\n border-color: var(--input-border-color);\n border-style: var(--input-border-style);\n border-width: var(--input-border-width);\n border-radius: var(--input-border-radius);\n transition: all 0.2s ease-in-out;\n}\n\n.Textarea_module_error__aa539557 {\n border-color: var(--error);\n color: var(--error);\n}\n\n.Textarea_module_warning__aa539557 {\n color: var(--error);\n position: absolute;\n right: 1.25rem;\n top: 0.75rem;\n font-size: 1.25rem;\n}";
|
|
3541
|
+
var modules_5a9ee489 = {"sr-only":"Textarea_module_srOnly__aa539557","hidden":"Textarea_module_hidden__aa539557","slide-in":"Textarea_module_slideIn__aa539557","slide-out":"Textarea_module_slideOut__aa539557","textarea-wrapper":"Textarea_module_textareaWrapper__aa539557","outline":"Textarea_module_outline__aa539557","disabled":"Textarea_module_disabled__aa539557","error":"Textarea_module_error__aa539557","focus":"Textarea_module_focus__aa539557","textarea":"Textarea_module_textarea__aa539557","warning":"Textarea_module_warning__aa539557"};
|
|
3462
3542
|
n(css$j,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
3463
3543
|
|
|
3464
|
-
var _excluded$l = ["error", "disabled", "className", "rows", "wrapperProps", "errorProps"];
|
|
3544
|
+
var _excluded$l = ["error", "disabled", "className", "rows", "wrapperProps", "errorProps", "onFocus", "onBlur"];
|
|
3465
3545
|
var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
3466
|
-
var
|
|
3546
|
+
var _errorProps$className;
|
|
3467
3547
|
|
|
3468
3548
|
var _ref$error = _ref.error,
|
|
3469
3549
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
@@ -3474,19 +3554,41 @@ var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
3474
3554
|
rows = _ref$rows === void 0 ? 4 : _ref$rows,
|
|
3475
3555
|
wrapperProps = _ref.wrapperProps,
|
|
3476
3556
|
errorProps = _ref.errorProps,
|
|
3557
|
+
_onFocus = _ref.onFocus,
|
|
3558
|
+
_onBlur = _ref.onBlur,
|
|
3477
3559
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
3478
3560
|
|
|
3561
|
+
var _useState = React.useState(false),
|
|
3562
|
+
focus = _useState[0],
|
|
3563
|
+
setFocus = _useState[1];
|
|
3564
|
+
|
|
3565
|
+
var wrapperClasses = [modules_5a9ee489["textarea-wrapper"]];
|
|
3566
|
+
var outlineClasses = [modules_5a9ee489["outline"]];
|
|
3567
|
+
(wrapperProps == null ? void 0 : wrapperProps.className) && wrapperClasses.push(wrapperProps.className);
|
|
3568
|
+
disabled && wrapperClasses.push(modules_5a9ee489["disabled"]) && outlineClasses.push(modules_5a9ee489["disabled"]);
|
|
3569
|
+
error && wrapperClasses.push(modules_5a9ee489["error"]) && outlineClasses.push(modules_5a9ee489["error"]);
|
|
3570
|
+
focus && wrapperClasses.push(modules_5a9ee489["focus"]) && outlineClasses.push(modules_5a9ee489["focus"]);
|
|
3479
3571
|
return React__default["default"].createElement("div", _extends({}, wrapperProps, {
|
|
3480
|
-
className:
|
|
3572
|
+
className: wrapperClasses.join(" ")
|
|
3481
3573
|
}), React__default["default"].createElement("textarea", _extends({}, rest, {
|
|
3482
3574
|
ref: ref,
|
|
3483
3575
|
rows: rows,
|
|
3484
|
-
className: (error ? modules_5a9ee489[
|
|
3485
|
-
disabled: disabled
|
|
3576
|
+
className: (error ? modules_5a9ee489["error"] : "") + " " + modules_5a9ee489["textarea"] + " " + (className != null ? className : ""),
|
|
3577
|
+
disabled: disabled,
|
|
3578
|
+
onFocus: function onFocus(event) {
|
|
3579
|
+
setFocus(true);
|
|
3580
|
+
_onFocus && _onFocus(event);
|
|
3581
|
+
},
|
|
3582
|
+
onBlur: function onBlur(event) {
|
|
3583
|
+
setFocus(false);
|
|
3584
|
+
_onBlur && _onBlur(event);
|
|
3585
|
+
}
|
|
3486
3586
|
})), error && React__default["default"].createElement(Icon, _extends({}, errorProps, {
|
|
3487
|
-
className: modules_5a9ee489[
|
|
3587
|
+
className: modules_5a9ee489["warning"] + " " + ((_errorProps$className = errorProps == null ? void 0 : errorProps.className) != null ? _errorProps$className : ""),
|
|
3488
3588
|
icon: exports.Icons.Error
|
|
3489
|
-
}))
|
|
3589
|
+
})), React__default["default"].createElement("span", {
|
|
3590
|
+
className: outlineClasses.join(" ")
|
|
3591
|
+
}));
|
|
3490
3592
|
});
|
|
3491
3593
|
|
|
3492
3594
|
var css$i = ".Toggle_module_toggleWrapper__59f0ddfa {\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.Toggle_module_toggle__59f0ddfa {\n width: 2rem;\n min-width: 2rem;\n height: 1.25rem;\n background-color: var(--default);\n border-radius: 2.5rem;\n position: relative;\n transition: background-color 0.2s ease-in-out;\n display: block;\n pointer-events: none;\n}\n.Toggle_module_toggle__59f0ddfa.Toggle_module_disabled__59f0ddfa {\n opacity: 0.25;\n cursor: not-allowed;\n}\n.Toggle_module_toggle__59f0ddfa:before {\n content: \"\";\n width: 1rem;\n height: 1rem;\n border-radius: 50%;\n display: block;\n background-color: #fff;\n position: absolute;\n top: 50%;\n transform: translateY(-50%) translateX(0);\n left: 0.125rem;\n transition: transform 0.2s ease-in-out;\n}\n.Toggle_module_toggle__59f0ddfa.Toggle_module_checked__59f0ddfa {\n background-color: var(--color-primary);\n}\n.Toggle_module_toggle__59f0ddfa.Toggle_module_checked__59f0ddfa:before {\n transform: translateY(-50%) translateX(calc(100% - 0.25rem));\n}\n\n.Toggle_module_toggleHelper__59f0ddfa {\n margin-left: 2.5rem;\n}\n\n.Toggle_module_checkbox__59f0ddfa {\n z-index: 10;\n position: static;\n}\n.Toggle_module_checkbox__59f0ddfa input {\n width: 2rem;\n}\n.Toggle_module_checkbox__59f0ddfa input ~ [data-icon][aria-hidden] {\n display: none;\n}\n.Toggle_module_checkbox__59f0ddfa input:focus-visible + * {\n border-radius: 2.5rem;\n}";
|
|
@@ -3502,20 +3604,20 @@ var Toggle = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
3502
3604
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
3503
3605
|
|
|
3504
3606
|
return React__default["default"].createElement("div", {
|
|
3505
|
-
className: modules_b5ebad0d[
|
|
3607
|
+
className: modules_b5ebad0d["toggle-wrapper"]
|
|
3506
3608
|
}, React__default["default"].createElement(Checkbox, _extends({}, rest, {
|
|
3507
3609
|
ref: ref,
|
|
3508
3610
|
checked: checked,
|
|
3509
|
-
className: modules_b5ebad0d[
|
|
3611
|
+
className: modules_b5ebad0d["checkbox"],
|
|
3510
3612
|
helperProps: _extends({
|
|
3511
|
-
className: modules_b5ebad0d[
|
|
3613
|
+
className: modules_b5ebad0d["toggle-helper"]
|
|
3512
3614
|
}, helperProps),
|
|
3513
3615
|
disabled: disabled,
|
|
3514
3616
|
label: children
|
|
3515
3617
|
}), React__default["default"].createElement("span", {
|
|
3516
3618
|
"data-toggle": true,
|
|
3517
3619
|
"aria-hidden": "true",
|
|
3518
|
-
className: modules_b5ebad0d[
|
|
3620
|
+
className: modules_b5ebad0d["toggle"] + " " + (checked ? modules_b5ebad0d["checked"] : "") + " " + (disabled ? modules_b5ebad0d["disabled"] : "") + " "
|
|
3519
3621
|
})));
|
|
3520
3622
|
});
|
|
3521
3623
|
|
|
@@ -3531,7 +3633,7 @@ var FormControl = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
3531
3633
|
className = _ref.className,
|
|
3532
3634
|
grid = _ref.grid,
|
|
3533
3635
|
_ref$align = _ref.align,
|
|
3534
|
-
align = _ref$align === void 0 ?
|
|
3636
|
+
align = _ref$align === void 0 ? "center" : _ref$align,
|
|
3535
3637
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
3536
3638
|
|
|
3537
3639
|
var renderChildren = function renderChildren() {
|
|
@@ -3547,7 +3649,7 @@ var FormControl = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
3547
3649
|
|
|
3548
3650
|
if (grid && grid > 1) {
|
|
3549
3651
|
return React__default["default"].createElement("div", {
|
|
3550
|
-
className: modules_1d54e29e[
|
|
3652
|
+
className: modules_1d54e29e["col-" + grid] + " " + modules_1d54e29e.column
|
|
3551
3653
|
}, childElement);
|
|
3552
3654
|
}
|
|
3553
3655
|
|
|
@@ -3558,12 +3660,12 @@ var FormControl = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
3558
3660
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
3559
3661
|
ref: ref,
|
|
3560
3662
|
"data-formcontrol": true,
|
|
3561
|
-
className: modules_1d54e29e[
|
|
3663
|
+
className: modules_1d54e29e["form-control"] + " " + (className ? className : "") + " " + (grid && grid > 1 ? modules_1d54e29e.grid + " " + modules_1d54e29e["grid-" + grid] : "") + " " + modules_1d54e29e[align]
|
|
3562
3664
|
}), renderChildren());
|
|
3563
3665
|
});
|
|
3564
3666
|
|
|
3565
|
-
var css$g = ".
|
|
3566
|
-
var modules_bc06a1ad = {"input-label":"
|
|
3667
|
+
var css$g = ".InputWrapper_module_srOnly__e331d9b4 {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.InputWrapper_module_hidden__e331d9b4 {\n display: none;\n}\n\n.InputWrapper_module_slideIn__e331d9b4 {\n animation: InputWrapper_module_slideIn__e331d9b4 0.5s forwards;\n}\n\n.InputWrapper_module_slideOut__e331d9b4 {\n animation: InputWrapper_module_slideOut__e331d9b4 0.5s forwards;\n}\n\n@keyframes InputWrapper_module_slideIn__e331d9b4 {\n 0% {\n transform: translateY(100vh);\n }\n 100% {\n transform: translateY(0%);\n }\n}\n@keyframes InputWrapper_module_slideOut__e331d9b4 {\n 0% {\n transform: translateY(0%);\n }\n 100% {\n transform: translateY(100vh);\n }\n}\nlabel.InputWrapper_module_inputLabel__e331d9b4.InputWrapper_module_focus__e331d9b4 {\n color: var(--color-primary);\n}\n\ninput.InputWrapper_module_floatingLabel__e331d9b4 {\n padding-top: 0.625rem;\n}\n\n.InputWrapper_module_inputWrapperHelper__e331d9b4 {\n margin-top: 0.25rem;\n}\n\n.InputWrapper_module_inputWrapper__e331d9b4 [data-icon]:before {\n transition: 0.2s ease-in-out;\n transform: translateY(0px);\n font-size: 1.125rem;\n}\n\n.InputWrapper_module_inputWrapper__e331d9b4 .InputWrapper_module_floatingLabelActive__e331d9b4 [data-icon]:before {\n transform: translateY(5px);\n}\n\n.InputWrapper_module_inputWrapper__e331d9b4 [data-prefix],\n.InputWrapper_module_inputWrapper__e331d9b4 [data-suffix] {\n transform: translateY(-0.125rem);\n}\n\n.InputWrapper_module_floatingLabelActive__e331d9b4 [data-prefix],\n.InputWrapper_module_floatingLabelActive__e331d9b4 [data-suffix] {\n padding-top: 0.5rem;\n transform: translateY(0);\n}";
|
|
3668
|
+
var modules_bc06a1ad = {"sr-only":"InputWrapper_module_srOnly__e331d9b4","hidden":"InputWrapper_module_hidden__e331d9b4","slide-in":"InputWrapper_module_slideIn__e331d9b4","slide-out":"InputWrapper_module_slideOut__e331d9b4","input-label":"InputWrapper_module_inputLabel__e331d9b4","focus":"InputWrapper_module_focus__e331d9b4","floating-label":"InputWrapper_module_floatingLabel__e331d9b4","input-wrapper-helper":"InputWrapper_module_inputWrapperHelper__e331d9b4","input-wrapper":"InputWrapper_module_inputWrapper__e331d9b4","floating-label-active":"InputWrapper_module_floatingLabelActive__e331d9b4"};
|
|
3567
3669
|
n(css$g,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
3568
3670
|
|
|
3569
3671
|
var css$f = ".FormGroup_module_formGroup__65001d8c {\n position: relative;\n}\n\n.FormGroup_module_error__65001d8c {\n color: var(--error);\n}\n\n.FormGroup_module_errorMessage__65001d8c {\n display: flex;\n align-items: flex-end;\n}\n\n.FormGroup_module_errorIcon__65001d8c {\n margin-right: 0.5rem;\n font-size: 1.25rem;\n}\n.FormGroup_module_errorIconBefore__65001d8c {\n margin-right: 0.5rem;\n}\n.FormGroup_module_errorIconAfter__65001d8c {\n margin-left: 0.5rem;\n}\n\n.FormGroup_module_defaultHelper__65001d8c {\n font-size: 0.75rem;\n}";
|
|
@@ -3579,7 +3681,7 @@ var FormGroup = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
3579
3681
|
errorId = _ref.errorId,
|
|
3580
3682
|
errorMessageIcon = _ref.errorMessageIcon,
|
|
3581
3683
|
_ref$errorMessageIcon = _ref.errorMessageIconPosition,
|
|
3582
|
-
errorMessageIconPosition = _ref$errorMessageIcon === void 0 ?
|
|
3684
|
+
errorMessageIconPosition = _ref$errorMessageIcon === void 0 ? "before" : _ref$errorMessageIcon,
|
|
3583
3685
|
helperText = _ref.helperText,
|
|
3584
3686
|
helperId = _ref.helperId,
|
|
3585
3687
|
helperProps = _ref.helperProps,
|
|
@@ -3588,31 +3690,31 @@ var FormGroup = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
3588
3690
|
|
|
3589
3691
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
3590
3692
|
ref: ref,
|
|
3591
|
-
className: modules_8377bc0c[
|
|
3693
|
+
className: modules_8377bc0c["form-group"] + " " + (error ? modules_8377bc0c.error : "") + " " + (className != null ? className : "")
|
|
3592
3694
|
}), children, (helperText || errorMessage && error) && React__default["default"].createElement("div", {
|
|
3593
3695
|
style: {
|
|
3594
3696
|
marginLeft: helperIndent + "px"
|
|
3595
3697
|
},
|
|
3596
|
-
className: modules_8377bc0c[
|
|
3698
|
+
className: modules_8377bc0c["default-helper"] + " " + (helperProps != null && helperProps.className ? helperProps.className : "")
|
|
3597
3699
|
}, helperText && !error && React__default["default"].createElement(FormHelperText, _extends({}, helperProps, {
|
|
3598
|
-
className:
|
|
3700
|
+
className: "",
|
|
3599
3701
|
id: helperId
|
|
3600
3702
|
}), helperProps && helperProps.children || helperText), error && errorMessage && React__default["default"].createElement("span", {
|
|
3601
|
-
className: modules_8377bc0c[
|
|
3703
|
+
className: modules_8377bc0c["error-message"]
|
|
3602
3704
|
}, React__default["default"].createElement("span", {
|
|
3603
3705
|
className: modules_8377bc0c.message,
|
|
3604
3706
|
id: errorId
|
|
3605
|
-
}, errorMessageIcon && errorMessageIconPosition ===
|
|
3606
|
-
className: modules_8377bc0c[
|
|
3707
|
+
}, errorMessageIcon && errorMessageIconPosition === "before" && React__default["default"].createElement(Icon, {
|
|
3708
|
+
className: modules_8377bc0c["error-icon"] + " " + modules_8377bc0c["error-icon-before"],
|
|
3607
3709
|
icon: errorMessageIcon
|
|
3608
|
-
}), errorMessage, errorMessageIcon && errorMessageIconPosition ===
|
|
3609
|
-
className: modules_8377bc0c[
|
|
3710
|
+
}), errorMessage, errorMessageIcon && errorMessageIconPosition === "after" && React__default["default"].createElement(Icon, {
|
|
3711
|
+
className: modules_8377bc0c["error-icon"] + " " + modules_8377bc0c["error-icon-after"],
|
|
3610
3712
|
icon: errorMessageIcon
|
|
3611
3713
|
})))));
|
|
3612
3714
|
});
|
|
3613
3715
|
|
|
3614
|
-
var css$e = ".
|
|
3615
|
-
var modules_e401a244 = {"floating-wrapper":"
|
|
3716
|
+
var css$e = ".Wrapper_module_floatingWrapper__7d8bd865 {\n position: relative;\n}\n\n.Wrapper_module_floatingLabel__7d8bd865 {\n font-family: var(--font-family);\n font-size: 1rem;\n position: absolute;\n z-index: 1;\n top: 1.3125rem;\n left: 1.25rem;\n transform-origin: left top;\n transition: all 0.2s ease-in-out;\n pointer-events: none;\n}\n.Wrapper_module_floatingLabel__7d8bd865.Wrapper_module_floatingLabelActive__7d8bd865 {\n font-size: 0.75rem;\n transform: translateY(-0.75rem);\n color: var(--default);\n}\n.Wrapper_module_floatingLabel__7d8bd865.Wrapper_module_error__7d8bd865 {\n color: var(--error);\n}\n\n.Wrapper_module_wrapper__7d8bd865 + fieldset,\n.Wrapper_module_wrapper__7d8bd865 + .Wrapper_module_wrapper__7d8bd865 {\n margin-top: 1rem;\n}\n\n.Wrapper_module_required__7d8bd865:after {\n content: \" *\";\n}";
|
|
3717
|
+
var modules_e401a244 = {"floating-wrapper":"Wrapper_module_floatingWrapper__7d8bd865","floating-label":"Wrapper_module_floatingLabel__7d8bd865","floating-label-active":"Wrapper_module_floatingLabelActive__7d8bd865","error":"Wrapper_module_error__7d8bd865","wrapper":"Wrapper_module_wrapper__7d8bd865","required":"Wrapper_module_required__7d8bd865"};
|
|
3616
3718
|
n(css$e,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
3617
3719
|
|
|
3618
3720
|
var _excluded$h = ["children", "className", "error", "errorMessage", "errorId", "errorMessageIcon", "errorMessageIconPosition", "helperText", "helperId", "floatingLabel", "floatingLabelActive", "required", "helperProps", "helperIndent", "labelProps", "label", "disabled", "name", "innerClassName"];
|
|
@@ -3648,14 +3750,14 @@ var Wrapper = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
3648
3750
|
};
|
|
3649
3751
|
|
|
3650
3752
|
var labelClasses = [];
|
|
3651
|
-
floatingLabel && labelClasses.push(modules_e401a244[
|
|
3652
|
-
floatingLabel && floatingLabelActive && labelClasses.push(modules_e401a244[
|
|
3753
|
+
floatingLabel && labelClasses.push(modules_e401a244["floating-label"]);
|
|
3754
|
+
floatingLabel && floatingLabelActive && labelClasses.push(modules_e401a244["floating-label-active"]);
|
|
3653
3755
|
(labelProps == null ? void 0 : labelProps.className) && labelClasses.push(labelProps.className);
|
|
3654
|
-
required && labelClasses.push(modules_e401a244[
|
|
3655
|
-
error && labelClasses.push(modules_e401a244[
|
|
3756
|
+
required && labelClasses.push(modules_e401a244["required"]);
|
|
3757
|
+
error && labelClasses.push(modules_e401a244["error"]);
|
|
3656
3758
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
3657
3759
|
ref: ref,
|
|
3658
|
-
className: modules_e401a244.wrapper + " " + (className ? className :
|
|
3760
|
+
className: modules_e401a244.wrapper + " " + (className ? className : "")
|
|
3659
3761
|
}), React__default["default"].createElement(FormGroup, {
|
|
3660
3762
|
error: error,
|
|
3661
3763
|
errorMessage: errorMessage,
|
|
@@ -3667,9 +3769,9 @@ var Wrapper = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
3667
3769
|
helperProps: helperProps,
|
|
3668
3770
|
helperIndent: helperIndent
|
|
3669
3771
|
}, React__default["default"].createElement("div", {
|
|
3670
|
-
className: (floatingLabel ? modules_e401a244[
|
|
3772
|
+
className: (floatingLabel ? modules_e401a244["floating-wrapper"] : "") + " " + (innerClassName ? innerClassName : "")
|
|
3671
3773
|
}, label && React__default["default"].createElement(Label, _extends({}, labelProps, {
|
|
3672
|
-
className: modules_e401a244.label + " " + labelClasses.join(
|
|
3774
|
+
className: modules_e401a244.label + " " + labelClasses.join(" "),
|
|
3673
3775
|
htmlFor: name
|
|
3674
3776
|
}), label), renderChildren())));
|
|
3675
3777
|
});
|
|
@@ -3693,14 +3795,14 @@ var useWrapper = function useWrapper(value, placeholder, type) {
|
|
|
3693
3795
|
setHasFocus = _useState5[1];
|
|
3694
3796
|
|
|
3695
3797
|
React.useEffect(function () {
|
|
3696
|
-
if (value != null && value.length && value.length > 0 || placeholder || type ===
|
|
3798
|
+
if (value != null && value.length && value.length > 0 || placeholder || type === "datetime-local" || type === "time" || type === "date") {
|
|
3697
3799
|
setFloatingLabelActive(true);
|
|
3698
3800
|
}
|
|
3699
3801
|
}, []);
|
|
3700
3802
|
React.useEffect(function () {
|
|
3701
3803
|
if (value != null && value.length && value.length > 0 || hasFocus) {
|
|
3702
3804
|
setFloatingLabelActive(true);
|
|
3703
|
-
} else if (!placeholder && !hasFocus && type !==
|
|
3805
|
+
} else if (!placeholder && !hasFocus && type !== "datetime-local" && type !== "time" && type !== "date") {
|
|
3704
3806
|
setFloatingLabelActive(false);
|
|
3705
3807
|
}
|
|
3706
3808
|
}, [value, placeholder, type, hasFocus]);
|
|
@@ -3717,7 +3819,7 @@ var useWrapper = function useWrapper(value, placeholder, type) {
|
|
|
3717
3819
|
|
|
3718
3820
|
var _excluded$g = ["type", "name", "inputProps", "helperText", "helperProps", "value", "className", "error", "onChange", "onBlur", "onFocus"];
|
|
3719
3821
|
|
|
3720
|
-
var useLabelOffset = function useLabelOffset(
|
|
3822
|
+
var useLabelOffset = function useLabelOffset(input, floatingLabelActive, prefix) {
|
|
3721
3823
|
var _useState = React.useState({}),
|
|
3722
3824
|
labelOffset = _useState[0],
|
|
3723
3825
|
setLabelOffset = _useState[1];
|
|
@@ -3729,17 +3831,18 @@ var useLabelOffset = function useLabelOffset(wrapper, input, floatingLabelActive
|
|
|
3729
3831
|
};
|
|
3730
3832
|
|
|
3731
3833
|
React.useEffect(function () {
|
|
3732
|
-
if (
|
|
3834
|
+
if (input.current && prefix) {
|
|
3733
3835
|
if (floatingLabelActive) {
|
|
3734
3836
|
resetLabelOffset();
|
|
3735
3837
|
} else {
|
|
3736
|
-
var
|
|
3838
|
+
var spacingBetweenPrefixAndInput = 4;
|
|
3839
|
+
var prefixDifference = getComputedStyle(input.current).paddingLeft + spacingBetweenPrefixAndInput;
|
|
3737
3840
|
setLabelOffset({
|
|
3738
3841
|
left: prefixDifference + "px"
|
|
3739
3842
|
});
|
|
3740
3843
|
}
|
|
3741
3844
|
}
|
|
3742
|
-
}, [
|
|
3845
|
+
}, [input.current, prefix, floatingLabelActive]);
|
|
3743
3846
|
return {
|
|
3744
3847
|
labelOffset: labelOffset
|
|
3745
3848
|
};
|
|
@@ -3774,22 +3877,21 @@ var InputWrapper = /*#__PURE__*/React__default["default"].forwardRef(function (_
|
|
|
3774
3877
|
prefix = _ref2.prefix,
|
|
3775
3878
|
suffix = _ref2.suffix;
|
|
3776
3879
|
|
|
3777
|
-
var wrapper = React.useRef(null);
|
|
3778
3880
|
var input = React.useRef(null);
|
|
3779
3881
|
var hasValueOrActiveFloatingLabel = !!value || floatingLabelActive;
|
|
3780
|
-
var labelClasses = [modules_bc06a1ad[
|
|
3882
|
+
var labelClasses = [modules_bc06a1ad["input-label"]];
|
|
3781
3883
|
|
|
3782
|
-
var _useLabelOffset = useLabelOffset(
|
|
3884
|
+
var _useLabelOffset = useLabelOffset(inputProps && inputProps.ref || input, floatingLabelActive, prefix),
|
|
3783
3885
|
labelOffset = _useLabelOffset.labelOffset;
|
|
3784
3886
|
|
|
3785
|
-
hasFocus && labelClasses.push(modules_bc06a1ad[
|
|
3887
|
+
hasFocus && labelClasses.push(modules_bc06a1ad["focus"]);
|
|
3786
3888
|
return React__default["default"].createElement(Wrapper, _extends({}, rest, {
|
|
3787
|
-
ref: ref
|
|
3889
|
+
ref: ref,
|
|
3788
3890
|
name: name,
|
|
3789
|
-
className: modules_bc06a1ad[
|
|
3891
|
+
className: modules_bc06a1ad["input-wrapper"] + " " + (className != null ? className : ""),
|
|
3790
3892
|
labelProps: {
|
|
3791
3893
|
id: labelId,
|
|
3792
|
-
className: labelClasses.join(
|
|
3894
|
+
className: labelClasses.join(" "),
|
|
3793
3895
|
style: _extends({}, labelOffset)
|
|
3794
3896
|
},
|
|
3795
3897
|
floatingLabelActive: floatingLabelActive,
|
|
@@ -3798,14 +3900,14 @@ var InputWrapper = /*#__PURE__*/React__default["default"].forwardRef(function (_
|
|
|
3798
3900
|
helperId: helperId,
|
|
3799
3901
|
helperText: helperText,
|
|
3800
3902
|
helperProps: _extends({}, helperProps, {
|
|
3801
|
-
className: modules_bc06a1ad[
|
|
3903
|
+
className: modules_bc06a1ad["input-wrapper-helper"] + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "") + " "
|
|
3802
3904
|
}),
|
|
3803
3905
|
helperIndent: 20
|
|
3804
3906
|
}), React__default["default"].createElement(Input, _extends({}, inputProps, {
|
|
3805
|
-
prefix: hasValueOrActiveFloatingLabel ? prefix :
|
|
3806
|
-
suffix: hasValueOrActiveFloatingLabel ? suffix :
|
|
3907
|
+
prefix: hasValueOrActiveFloatingLabel ? prefix : "",
|
|
3908
|
+
suffix: hasValueOrActiveFloatingLabel ? suffix : "",
|
|
3807
3909
|
wrapperProps: {
|
|
3808
|
-
className: (floatingLabelActive ? modules_bc06a1ad[
|
|
3910
|
+
className: (floatingLabelActive ? modules_bc06a1ad["floating-label-active"] : "") + " " + ((_inputProps$wrapperPr = inputProps == null ? void 0 : (_inputProps$wrapperPr2 = inputProps.wrapperProps) == null ? void 0 : _inputProps$wrapperPr2.className) != null ? _inputProps$wrapperPr : "")
|
|
3809
3911
|
},
|
|
3810
3912
|
ref: inputProps && inputProps.ref || input,
|
|
3811
3913
|
"aria-labelledby": labelId,
|
|
@@ -3821,9 +3923,9 @@ var InputWrapper = /*#__PURE__*/React__default["default"].forwardRef(function (_
|
|
|
3821
3923
|
|
|
3822
3924
|
_onBlur && _onBlur(e);
|
|
3823
3925
|
setHasFocus(false);
|
|
3824
|
-
e.target.value || e.target.placeholder || inputProps != null && (_inputProps$placehold = inputProps.placeholder) != null && _inputProps$placehold.length || type ===
|
|
3926
|
+
e.target.value || e.target.placeholder || inputProps != null && (_inputProps$placehold = inputProps.placeholder) != null && _inputProps$placehold.length || type === "datetime-local" || type === "time" || type === "date" ? setFloatingLabelActive(true) : setFloatingLabelActive(false);
|
|
3825
3927
|
},
|
|
3826
|
-
className: (floatingLabelActive ? modules_bc06a1ad[
|
|
3928
|
+
className: (floatingLabelActive ? modules_bc06a1ad["floating-label"] : "") + " " + ((_inputProps$className = inputProps == null ? void 0 : inputProps.className) != null ? _inputProps$className : ""),
|
|
3827
3929
|
name: name,
|
|
3828
3930
|
error: error,
|
|
3829
3931
|
id: name,
|
|
@@ -3863,10 +3965,10 @@ var SelectWrapper = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
|
3863
3965
|
helperId: helperId,
|
|
3864
3966
|
labelProps: {
|
|
3865
3967
|
id: labelId,
|
|
3866
|
-
className: modules_ee83d198[
|
|
3968
|
+
className: modules_ee83d198["select-label"]
|
|
3867
3969
|
},
|
|
3868
3970
|
helperProps: _extends({}, helperProps, {
|
|
3869
|
-
className: modules_ee83d198[
|
|
3971
|
+
className: modules_ee83d198["select-helper-text"] + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "")
|
|
3870
3972
|
}),
|
|
3871
3973
|
error: error
|
|
3872
3974
|
}), React__default["default"].createElement(Select, _extends({}, selectProps, {
|
|
@@ -3879,12 +3981,12 @@ var SelectWrapper = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
|
3879
3981
|
_onClear && _onClear(e);
|
|
3880
3982
|
},
|
|
3881
3983
|
placeholder: placeholder,
|
|
3882
|
-
className: (floatingLabelActive ? modules_ee83d198[
|
|
3984
|
+
className: (floatingLabelActive ? modules_ee83d198["floating-label-active"] : "") + " " + ((_selectProps$classNam = selectProps == null ? void 0 : selectProps.className) != null ? _selectProps$classNam : "")
|
|
3883
3985
|
}), children));
|
|
3884
3986
|
});
|
|
3885
3987
|
|
|
3886
|
-
var css$c = ".
|
|
3887
|
-
var modules_3c8e9c33 = {"textarea-label":"
|
|
3988
|
+
var css$c = ".TextareaWrapper_module_srOnly__7bfa5c10 {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.TextareaWrapper_module_hidden__7bfa5c10 {\n display: none;\n}\n\n.TextareaWrapper_module_slideIn__7bfa5c10 {\n animation: TextareaWrapper_module_slideIn__7bfa5c10 0.5s forwards;\n}\n\n.TextareaWrapper_module_slideOut__7bfa5c10 {\n animation: TextareaWrapper_module_slideOut__7bfa5c10 0.5s forwards;\n}\n\n@keyframes TextareaWrapper_module_slideIn__7bfa5c10 {\n 0% {\n transform: translateY(100vh);\n }\n 100% {\n transform: translateY(0%);\n }\n}\n@keyframes TextareaWrapper_module_slideOut__7bfa5c10 {\n 0% {\n transform: translateY(0%);\n }\n 100% {\n transform: translateY(100vh);\n }\n}\nlabel.TextareaWrapper_module_textareaLabel__7bfa5c10.TextareaWrapper_module_focus__7bfa5c10 {\n color: var(--color-primary);\n}\n\n.TextareaWrapper_module_textarea__7bfa5c10 {\n padding-top: 1.625rem;\n}\n.TextareaWrapper_module_textarea__7bfa5c10:active:not(:disabled) {\n border-color: var(--color-primary);\n}\n.TextareaWrapper_module_textarea__7bfa5c10:hover:not(:disabled):not(.TextareaWrapper_module_error__7bfa5c10) {\n border-color: var(--default);\n}\n.TextareaWrapper_module_textarea__7bfa5c10:focus:not(:disabled) {\n outline: none;\n}\n\n.TextareaWrapper_module_textareaHelperText__7bfa5c10 {\n margin-top: 0.25rem;\n margin-left: 1.25rem;\n}\n\n.TextareaWrapper_module_textareaWrapper__7bfa5c10 {\n padding-top: 1.75rem;\n padding-right: 3.75rem;\n padding-bottom: 0.75rem;\n border-color: var(--input-border-color);\n border-style: var(--input-border-style);\n border-width: var(--input-border-width);\n border-radius: var(--input-border-radius);\n}\n.TextareaWrapper_module_textareaWrapper__7bfa5c10.TextareaWrapper_module_error__7bfa5c10 {\n border-color: var(--error);\n}\n.TextareaWrapper_module_textareaWrapper__7bfa5c10.TextareaWrapper_module_hover__7bfa5c10 {\n border-color: var(--default);\n}\n.TextareaWrapper_module_textareaWrapper__7bfa5c10.TextareaWrapper_module_focus__7bfa5c10 {\n border-color: var(--color-primary);\n}\n.TextareaWrapper_module_textareaWrapper__7bfa5c10.TextareaWrapper_module_disabled__7bfa5c10 {\n color: var(--greyed-out);\n background-color: var(--disabled);\n border-color: #fff;\n cursor: not-allowed;\n}\n\n.TextareaWrapper_module_errorIcon__7bfa5c10 {\n top: 1.75rem;\n}";
|
|
3989
|
+
var modules_3c8e9c33 = {"sr-only":"TextareaWrapper_module_srOnly__7bfa5c10","hidden":"TextareaWrapper_module_hidden__7bfa5c10","slide-in":"TextareaWrapper_module_slideIn__7bfa5c10","slide-out":"TextareaWrapper_module_slideOut__7bfa5c10","textarea-label":"TextareaWrapper_module_textareaLabel__7bfa5c10","focus":"TextareaWrapper_module_focus__7bfa5c10","textarea":"TextareaWrapper_module_textarea__7bfa5c10","error":"TextareaWrapper_module_error__7bfa5c10","textarea-helper-text":"TextareaWrapper_module_textareaHelperText__7bfa5c10","textarea-wrapper":"TextareaWrapper_module_textareaWrapper__7bfa5c10","hover":"TextareaWrapper_module_hover__7bfa5c10","disabled":"TextareaWrapper_module_disabled__7bfa5c10","error-icon":"TextareaWrapper_module_errorIcon__7bfa5c10"};
|
|
3888
3990
|
n(css$c,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
3889
3991
|
|
|
3890
3992
|
var _excluded$e = ["name", "error", "value", "label", "placeholder", "textareaProps", "helperProps", "onChange", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "disabled"];
|
|
@@ -3918,22 +4020,22 @@ var TextareaWrapper = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
3918
4020
|
setHover = _useState[1];
|
|
3919
4021
|
|
|
3920
4022
|
var optionalClasses = [];
|
|
3921
|
-
hasFocus && optionalClasses.push(modules_3c8e9c33[
|
|
3922
|
-
hover && optionalClasses.push(modules_3c8e9c33[
|
|
3923
|
-
disabled && optionalClasses.push(modules_3c8e9c33[
|
|
3924
|
-
error && optionalClasses.push(modules_3c8e9c33[
|
|
4023
|
+
hasFocus && optionalClasses.push(modules_3c8e9c33["focus"]);
|
|
4024
|
+
hover && optionalClasses.push(modules_3c8e9c33["hover"]);
|
|
4025
|
+
disabled && optionalClasses.push(modules_3c8e9c33["disabled"]);
|
|
4026
|
+
error && optionalClasses.push(modules_3c8e9c33["error"]);
|
|
3925
4027
|
return React__default["default"].createElement(Wrapper, _extends({}, rest, {
|
|
3926
4028
|
ref: ref,
|
|
3927
4029
|
disabled: disabled,
|
|
3928
4030
|
labelProps: {
|
|
3929
4031
|
id: labelId,
|
|
3930
|
-
className: modules_3c8e9c33[
|
|
4032
|
+
className: modules_3c8e9c33["textarea-label"] + " " + optionalClasses.join(" ")
|
|
3931
4033
|
},
|
|
3932
4034
|
name: name,
|
|
3933
4035
|
label: label,
|
|
3934
4036
|
helperId: helperId,
|
|
3935
4037
|
helperProps: _extends({}, helperProps, {
|
|
3936
|
-
className: modules_3c8e9c33[
|
|
4038
|
+
className: modules_3c8e9c33["textarea-helper-text"]
|
|
3937
4039
|
}),
|
|
3938
4040
|
error: error,
|
|
3939
4041
|
floatingLabelActive: floatingLabelActive,
|
|
@@ -3967,12 +4069,12 @@ var TextareaWrapper = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
3967
4069
|
_onMouseLeave && _onMouseLeave(e);
|
|
3968
4070
|
setHover(false);
|
|
3969
4071
|
},
|
|
3970
|
-
className: modules_3c8e9c33[
|
|
4072
|
+
className: modules_3c8e9c33["textarea"] + " " + (error ? modules_3c8e9c33["error"] : ""),
|
|
3971
4073
|
wrapperProps: {
|
|
3972
|
-
className: modules_3c8e9c33[
|
|
4074
|
+
className: modules_3c8e9c33["textarea-wrapper"] + "} " + optionalClasses.join(" ")
|
|
3973
4075
|
},
|
|
3974
4076
|
errorProps: {
|
|
3975
|
-
className: modules_3c8e9c33[
|
|
4077
|
+
className: modules_3c8e9c33["error-icon"]
|
|
3976
4078
|
}
|
|
3977
4079
|
})));
|
|
3978
4080
|
});
|
|
@@ -3983,12 +4085,12 @@ var Fieldset = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
3983
4085
|
className = _ref.className,
|
|
3984
4086
|
legend = _ref.legend,
|
|
3985
4087
|
_ref$legendStyle = _ref.legendStyle,
|
|
3986
|
-
legendStyle = _ref$legendStyle === void 0 ?
|
|
4088
|
+
legendStyle = _ref$legendStyle === void 0 ? "body" : _ref$legendStyle,
|
|
3987
4089
|
_ref$hideLegend = _ref.hideLegend,
|
|
3988
4090
|
hideLegend = _ref$hideLegend === void 0 ? false : _ref$hideLegend,
|
|
3989
4091
|
noBackground = _ref.noBackground,
|
|
3990
4092
|
_ref$background = _ref.background,
|
|
3991
|
-
background = _ref$background === void 0 ? noBackground ?
|
|
4093
|
+
background = _ref$background === void 0 ? noBackground ? "" : "#FFF" : _ref$background,
|
|
3992
4094
|
_ref$noPadding = _ref.noPadding,
|
|
3993
4095
|
noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
|
|
3994
4096
|
_ref$disabled = _ref.disabled,
|
|
@@ -4029,14 +4131,14 @@ var Fieldset = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
4029
4131
|
style: _extends({
|
|
4030
4132
|
backgroundColor: background
|
|
4031
4133
|
}, rest.style),
|
|
4032
|
-
className: modules_76ea8ff8.fieldset + " " + (noPadding ? modules_76ea8ff8[
|
|
4134
|
+
className: modules_76ea8ff8.fieldset + " " + (noPadding ? modules_76ea8ff8["no-padding"] : "") + " " + (className != null ? className : "")
|
|
4033
4135
|
}), legend && React__default["default"].createElement("legend", {
|
|
4034
|
-
className: modules_35a251a6[
|
|
4136
|
+
className: modules_35a251a6["sr-only"]
|
|
4035
4137
|
}, legend), legend && !hideLegend && React__default["default"].createElement(Typography, {
|
|
4036
4138
|
variant: legendStyle,
|
|
4037
4139
|
tag: "span",
|
|
4038
4140
|
"aria-hidden": "true",
|
|
4039
|
-
className: modules_76ea8ff8[
|
|
4141
|
+
className: modules_76ea8ff8["legend"] + " " + (required ? modules_76ea8ff8["required"] : "") + " " + (error ? modules_76ea8ff8["error"] : "")
|
|
4040
4142
|
}, legend), renderChildren());
|
|
4041
4143
|
});
|
|
4042
4144
|
|
|
@@ -4051,7 +4153,7 @@ var Form = function Form(_ref) {
|
|
|
4051
4153
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
4052
4154
|
|
|
4053
4155
|
return React__default["default"].createElement("form", _extends({
|
|
4054
|
-
className: modules_b9bf355c.form + " " + (className != null ? className :
|
|
4156
|
+
className: modules_b9bf355c.form + " " + (className != null ? className : "")
|
|
4055
4157
|
}, rest), children);
|
|
4056
4158
|
};
|
|
4057
4159
|
|
|
@@ -4108,7 +4210,7 @@ var RadioWrapper = /*#__PURE__*/React__default["default"].forwardRef(function (_
|
|
|
4108
4210
|
helperId: helperId,
|
|
4109
4211
|
helperText: helperText,
|
|
4110
4212
|
helperProps: _extends({}, helperProps, {
|
|
4111
|
-
className: modules_856c8e0e[
|
|
4213
|
+
className: modules_856c8e0e["radio-wrapper-helper"] + " " + (error ? modules_856c8e0e["radio-wrapper-error"] : "") + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "")
|
|
4112
4214
|
}),
|
|
4113
4215
|
error: error,
|
|
4114
4216
|
errorId: errorId,
|
|
@@ -4163,7 +4265,7 @@ var CheckboxWrapper = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
4163
4265
|
helperId: helperId,
|
|
4164
4266
|
helperText: helperText,
|
|
4165
4267
|
helperProps: _extends({}, helperProps, {
|
|
4166
|
-
className: modules_8177141b[
|
|
4268
|
+
className: modules_8177141b["checkbox-wrapper-helper"] + " " + (error ? modules_8177141b["checkbox-wrapper-error"] : "") + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "")
|
|
4167
4269
|
}),
|
|
4168
4270
|
error: error,
|
|
4169
4271
|
errorMessageIcon: exports.Icons.Error,
|
|
@@ -4173,7 +4275,7 @@ var CheckboxWrapper = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
4173
4275
|
|
|
4174
4276
|
var setWizardState = function setWizardState(steps, mode, stepScreenReaderLabel) {
|
|
4175
4277
|
return {
|
|
4176
|
-
type:
|
|
4278
|
+
type: "SET_STATE",
|
|
4177
4279
|
payload: {
|
|
4178
4280
|
steps: steps,
|
|
4179
4281
|
mode: mode,
|
|
@@ -4184,17 +4286,17 @@ var setWizardState = function setWizardState(steps, mode, stepScreenReaderLabel)
|
|
|
4184
4286
|
|
|
4185
4287
|
var changeCurrentStepNo = function changeCurrentStepNo(currentStepNo) {
|
|
4186
4288
|
return {
|
|
4187
|
-
type:
|
|
4289
|
+
type: "CHANGE_CURRENT_STEP_NO",
|
|
4188
4290
|
payload: currentStepNo
|
|
4189
4291
|
};
|
|
4190
4292
|
};
|
|
4191
4293
|
|
|
4192
4294
|
var reducer = function reducer(state, action) {
|
|
4193
4295
|
switch (action.type) {
|
|
4194
|
-
case
|
|
4296
|
+
case "SET_STATE":
|
|
4195
4297
|
return _extends({}, state, action.payload);
|
|
4196
4298
|
|
|
4197
|
-
case
|
|
4299
|
+
case "CHANGE_CURRENT_STEP_NO":
|
|
4198
4300
|
return _extends({}, state, {
|
|
4199
4301
|
currentStepNo: action.payload
|
|
4200
4302
|
});
|
|
@@ -4324,10 +4426,10 @@ var WizardActions = function WizardActions(_ref) {
|
|
|
4324
4426
|
var hasNextStep = nextStepNo !== -1;
|
|
4325
4427
|
var previousStepNo = usePreviousStepNo(mode, currentStepNo, steps);
|
|
4326
4428
|
var hasPreviousStep = previousStepNo !== -1;
|
|
4327
|
-
var isLastStepOrEditMode = !hasNextStep || mode ===
|
|
4429
|
+
var isLastStepOrEditMode = !hasNextStep || mode === "edit";
|
|
4328
4430
|
|
|
4329
4431
|
var changeStepNo = function changeStepNo(direction) {
|
|
4330
|
-
if (direction ===
|
|
4432
|
+
if (direction === "forward") {
|
|
4331
4433
|
hasNextStep && dispatch(changeCurrentStepNo(nextStepNo));
|
|
4332
4434
|
} else {
|
|
4333
4435
|
hasPreviousStep && dispatch(changeCurrentStepNo(previousStepNo));
|
|
@@ -4335,12 +4437,12 @@ var WizardActions = function WizardActions(_ref) {
|
|
|
4335
4437
|
};
|
|
4336
4438
|
|
|
4337
4439
|
var onNextWrapper = function onNextWrapper() {
|
|
4338
|
-
onNext(currentStepNo) && changeStepNo(
|
|
4440
|
+
onNext(currentStepNo) && changeStepNo("forward");
|
|
4339
4441
|
};
|
|
4340
4442
|
|
|
4341
4443
|
var onPreviousWrapper = function onPreviousWrapper() {
|
|
4342
4444
|
onPrevious && onPrevious();
|
|
4343
|
-
changeStepNo(
|
|
4445
|
+
changeStepNo("backward");
|
|
4344
4446
|
};
|
|
4345
4447
|
|
|
4346
4448
|
var onSaveAndCloseWrapper = function onSaveAndCloseWrapper() {
|
|
@@ -4354,7 +4456,7 @@ var WizardActions = function WizardActions(_ref) {
|
|
|
4354
4456
|
variant: "outline",
|
|
4355
4457
|
onClick: onPreviousWrapper
|
|
4356
4458
|
}, previousButtonLabel), hasNextStep && React__default["default"].createElement(Button, {
|
|
4357
|
-
variant: mode ===
|
|
4459
|
+
variant: mode === "edit" ? "outline" : "fill",
|
|
4358
4460
|
onClick: onNextWrapper
|
|
4359
4461
|
}, nextButtonLabel), isLastStepOrEditMode && React__default["default"].createElement(Button, {
|
|
4360
4462
|
onClick: onSaveAndCloseWrapper
|
|
@@ -4377,54 +4479,54 @@ var BaseWizardSteps = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
4377
4479
|
|
|
4378
4480
|
var getStepState = function getStepState(stepNo) {
|
|
4379
4481
|
if (currentStepNo === stepNo) {
|
|
4380
|
-
return
|
|
4482
|
+
return "current";
|
|
4381
4483
|
} else if (stepNo < currentStepNo) {
|
|
4382
|
-
return
|
|
4484
|
+
return "finished";
|
|
4383
4485
|
}
|
|
4384
4486
|
|
|
4385
|
-
return
|
|
4487
|
+
return "future";
|
|
4386
4488
|
};
|
|
4387
4489
|
|
|
4388
4490
|
var getStepContent = function getStepContent(stepState, index, disabled) {
|
|
4389
4491
|
var stepNumberString = String(index + 1);
|
|
4390
4492
|
|
|
4391
|
-
if (stepState ===
|
|
4493
|
+
if (stepState === "finished") {
|
|
4392
4494
|
return disabled ? null : React__default["default"].createElement(Icon, {
|
|
4393
|
-
className: modules_b302f2c5[
|
|
4495
|
+
className: modules_b302f2c5["checkmark"],
|
|
4394
4496
|
icon: exports.Icons.Checkmark
|
|
4395
4497
|
});
|
|
4396
4498
|
} else {
|
|
4397
4499
|
return React__default["default"].createElement(React.Fragment, null, React__default["default"].createElement("span", {
|
|
4398
|
-
className: modules_35a251a6[
|
|
4500
|
+
className: modules_35a251a6["sr-only"]
|
|
4399
4501
|
}, stepScreenReaderLabel, " "), stepNumberString);
|
|
4400
4502
|
}
|
|
4401
4503
|
};
|
|
4402
4504
|
|
|
4403
4505
|
var generatedSteps = steps.map(function (step, index) {
|
|
4404
4506
|
var stepState = getStepState(index);
|
|
4405
|
-
var disabledStyleClassName = step.disabled ? modules_b302f2c5[
|
|
4406
|
-
var clickableClassName = futureStepsClickable ? modules_b302f2c5[
|
|
4507
|
+
var disabledStyleClassName = step.disabled ? modules_b302f2c5["disabled"] : "";
|
|
4508
|
+
var clickableClassName = futureStepsClickable ? modules_b302f2c5["clickable"] : "";
|
|
4407
4509
|
return React__default["default"].createElement("button", {
|
|
4408
|
-
key: step.label.toLowerCase().replace(/\s/,
|
|
4409
|
-
disabled: step.disabled || stepState ===
|
|
4410
|
-
"aria-current": stepState ===
|
|
4510
|
+
key: step.label.toLowerCase().replace(/\s/, "-"),
|
|
4511
|
+
disabled: step.disabled || stepState === "future" && !futureStepsClickable || stepState === "current",
|
|
4512
|
+
"aria-current": stepState === "current" ? "step" : undefined,
|
|
4411
4513
|
onClick: function onClick() {
|
|
4412
4514
|
return _onClick && _onClick(index);
|
|
4413
4515
|
},
|
|
4414
|
-
className: modules_b302f2c5[
|
|
4516
|
+
className: modules_b302f2c5["wizard-element"] + " " + modules_b302f2c5[stepState] + " " + clickableClassName + " " + disabledStyleClassName
|
|
4415
4517
|
}, React__default["default"].createElement("div", {
|
|
4416
|
-
className: modules_b302f2c5[
|
|
4518
|
+
className: modules_b302f2c5["number-wrapper"]
|
|
4417
4519
|
}, React__default["default"].createElement("span", {
|
|
4418
|
-
className: modules_b302f2c5[
|
|
4520
|
+
className: modules_b302f2c5["number"]
|
|
4419
4521
|
}, getStepContent(stepState, index, step.disabled))), React__default["default"].createElement("div", {
|
|
4420
|
-
className: modules_b302f2c5[
|
|
4522
|
+
className: modules_b302f2c5["two-line-text-overflow"]
|
|
4421
4523
|
}, React__default["default"].createElement("span", {
|
|
4422
|
-
className: modules_b302f2c5[
|
|
4524
|
+
className: modules_b302f2c5["label"]
|
|
4423
4525
|
}, step.label)));
|
|
4424
4526
|
});
|
|
4425
4527
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
4426
4528
|
ref: ref,
|
|
4427
|
-
className: modules_b302f2c5[
|
|
4529
|
+
className: modules_b302f2c5["wizard"]
|
|
4428
4530
|
}), generatedSteps);
|
|
4429
4531
|
});
|
|
4430
4532
|
|
|
@@ -4451,7 +4553,7 @@ var WizardSteps = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
4451
4553
|
steps: steps,
|
|
4452
4554
|
currentStepNo: currentStepNo,
|
|
4453
4555
|
stepScreenReaderLabel: stepScreenReaderLabel,
|
|
4454
|
-
futureStepsClickable: mode ===
|
|
4556
|
+
futureStepsClickable: mode === "edit"
|
|
4455
4557
|
}));
|
|
4456
4558
|
});
|
|
4457
4559
|
|
|
@@ -4459,14 +4561,14 @@ var css$7 = ".DataGrid_module_gridWrapper__f048f02f {\n padding: 1rem 0;\n}\n\n
|
|
|
4459
4561
|
var modules_b8d590e8 = {"grid-wrapper":"DataGrid_module_gridWrapper__f048f02f","table-wrapper":"DataGrid_module_tableWrapper__f048f02f","table":"DataGrid_module_table__f048f02f","pagination":"DataGrid_module_pagination__f048f02f"};
|
|
4460
4562
|
n(css$7,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
4461
4563
|
|
|
4462
|
-
var css$6 = ".
|
|
4463
|
-
var modules_4fa6e81a = {"header-cell":"
|
|
4564
|
+
var css$6 = ".DataGridHeaderCell_module_headerCell__24249a03 {\n font-weight: normal;\n text-align: left;\n padding: 0 0.625rem;\n}\n.DataGridHeaderCell_module_headerCell__24249a03:first-child {\n padding-left: 1rem;\n}\n.DataGridHeaderCell_module_headerCell__24249a03:last-child {\n padding-right: 1rem;\n}\n.DataGridHeaderCell_module_headerCell__24249a03 > * {\n display: inline-flex;\n}\n.DataGridHeaderCell_module_headerCell__24249a03 > button {\n padding: 0;\n margin: 0;\n border: 0;\n background: none;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n}\n\n.DataGridHeaderCell_module_headline__24249a03 {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1.5;\n font-weight: 700;\n color: var(--default);\n}\n\n.DataGridHeaderCell_module_sortingIndicatorContainer__24249a03 {\n display: flex;\n flex-direction: column;\n padding-left: 0.5rem;\n justify-content: center;\n}\n.DataGridHeaderCell_module_sortingIndicatorContainer__24249a03 > * {\n font-size: 0.625rem;\n}\n.DataGridHeaderCell_module_sortingIndicatorContainer__24249a03 .DataGridHeaderCell_module_indicator__24249a03 {\n color: var(--greyed-out);\n}\n.DataGridHeaderCell_module_sortingIndicatorContainer__24249a03 .DataGridHeaderCell_module_indicator__24249a03.DataGridHeaderCell_module_active__24249a03 {\n color: var(--color-primary);\n}\n.DataGridHeaderCell_module_sortingIndicatorContainer__24249a03 .DataGridHeaderCell_module_indicator__24249a03.DataGridHeaderCell_module_hidden__24249a03 {\n visibility: hidden;\n}\n\n@media only screen and (min-width: 50em) {\n .DataGridHeaderCell_module_headerCell__24249a03:first-child {\n padding-left: 1.25rem;\n }\n .DataGridHeaderCell_module_headerCell__24249a03:last-child {\n padding-right: 1.25rem;\n }\n}";
|
|
4565
|
+
var modules_4fa6e81a = {"header-cell":"DataGridHeaderCell_module_headerCell__24249a03","headline":"DataGridHeaderCell_module_headline__24249a03","sorting-indicator-container":"DataGridHeaderCell_module_sortingIndicatorContainer__24249a03","indicator":"DataGridHeaderCell_module_indicator__24249a03","active":"DataGridHeaderCell_module_active__24249a03","hidden":"DataGridHeaderCell_module_hidden__24249a03"};
|
|
4464
4566
|
n(css$6,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
4465
4567
|
|
|
4466
4568
|
var _excluded$7 = ["headline", "name", "disableSorting", "activeSortDirection", "onSort"];
|
|
4467
4569
|
var ariaSortMapping = {
|
|
4468
|
-
ASC:
|
|
4469
|
-
DESC:
|
|
4570
|
+
ASC: "ascending",
|
|
4571
|
+
DESC: "descending"
|
|
4470
4572
|
};
|
|
4471
4573
|
var DataGridHeaderCell = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
4472
4574
|
var headline = _ref.headline,
|
|
@@ -4482,28 +4584,28 @@ var DataGridHeaderCell = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
|
4482
4584
|
|
|
4483
4585
|
var sortingIndicator = function sortingIndicator() {
|
|
4484
4586
|
var getSortingIndicatorClasses = function getSortingIndicatorClasses(direction) {
|
|
4485
|
-
var sortingIndicatorClasses = [modules_4fa6e81a[
|
|
4486
|
-
activeSortDirection && sortingIndicatorClasses.push(activeSortDirection === direction ? modules_4fa6e81a[
|
|
4587
|
+
var sortingIndicatorClasses = [modules_4fa6e81a["indicator"]];
|
|
4588
|
+
activeSortDirection && sortingIndicatorClasses.push(activeSortDirection === direction ? modules_4fa6e81a["active"] : modules_4fa6e81a["hidden"]);
|
|
4487
4589
|
return sortingIndicatorClasses;
|
|
4488
4590
|
};
|
|
4489
4591
|
|
|
4490
4592
|
return React__default["default"].createElement(React.Fragment, null, React__default["default"].createElement(Icon, {
|
|
4491
|
-
className: getSortingIndicatorClasses(
|
|
4593
|
+
className: getSortingIndicatorClasses("ASC").join(" "),
|
|
4492
4594
|
icon: exports.Icons.TriangleUp
|
|
4493
4595
|
}), React__default["default"].createElement(Icon, {
|
|
4494
|
-
className: getSortingIndicatorClasses(
|
|
4596
|
+
className: getSortingIndicatorClasses("DESC").join(" "),
|
|
4495
4597
|
icon: exports.Icons.TriangleDown
|
|
4496
4598
|
}));
|
|
4497
4599
|
};
|
|
4498
4600
|
|
|
4499
4601
|
var innerContent = React__default["default"].createElement(React.Fragment, null, React__default["default"].createElement("span", {
|
|
4500
|
-
className: modules_4fa6e81a[
|
|
4602
|
+
className: modules_4fa6e81a["headline"]
|
|
4501
4603
|
}, headline), !disableSorting && React__default["default"].createElement("div", {
|
|
4502
|
-
className: modules_4fa6e81a[
|
|
4604
|
+
className: modules_4fa6e81a["sorting-indicator-container"]
|
|
4503
4605
|
}, sortingIndicator()));
|
|
4504
4606
|
return React__default["default"].createElement("th", _extends({}, rest, {
|
|
4505
4607
|
ref: ref,
|
|
4506
|
-
className: modules_4fa6e81a[
|
|
4608
|
+
className: modules_4fa6e81a["header-cell"],
|
|
4507
4609
|
"aria-sort": activeSortDirection && ariaSortMapping[activeSortDirection]
|
|
4508
4610
|
}), disableSorting ? React__default["default"].createElement("div", {
|
|
4509
4611
|
key: name
|
|
@@ -4513,12 +4615,12 @@ var DataGridHeaderCell = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
|
4513
4615
|
}, innerContent));
|
|
4514
4616
|
});
|
|
4515
4617
|
|
|
4516
|
-
var css$5 = ".
|
|
4517
|
-
var modules_bec66042 = {"thead":"
|
|
4618
|
+
var css$5 = ".DataGridHeader_module_thead__8c44381b::after {\n content: \"\";\n position: absolute;\n width: calc(100% - 2rem);\n left: 1rem;\n border-bottom: 1px solid #c3c3c7;\n}\n\n.DataGridHeader_module_row__8c44381b {\n height: 2.5rem;\n}\n\n.DataGridHeader_module_contextMenu__8c44381b {\n width: 4.125rem;\n box-sizing: border-box;\n}\n\n@media only screen and (min-width: 50em) {\n .DataGridHeader_module_thead__8c44381b::after {\n width: calc(100% - 2.5rem);\n left: 1.25rem;\n }\n}";
|
|
4619
|
+
var modules_bec66042 = {"thead":"DataGridHeader_module_thead__8c44381b","row":"DataGridHeader_module_row__8c44381b","context-menu":"DataGridHeader_module_contextMenu__8c44381b"};
|
|
4518
4620
|
n(css$5,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
4519
4621
|
|
|
4520
4622
|
var _excluded$6 = ["initialSort", "onSort", "headers", "disableContextMenuColumn", "enableMultiSorting", "spacing"];
|
|
4521
|
-
var sortingStates = [undefined,
|
|
4623
|
+
var sortingStates = [undefined, "ASC", "DESC"];
|
|
4522
4624
|
var DataGridHeader = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
4523
4625
|
var initialSort = _ref.initialSort,
|
|
4524
4626
|
onSort = _ref.onSort,
|
|
@@ -4598,15 +4700,15 @@ var DataGridHeader = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
4598
4700
|
});
|
|
4599
4701
|
return React__default["default"].createElement("thead", _extends({}, rest, {
|
|
4600
4702
|
ref: ref,
|
|
4601
|
-
className: modules_bec66042[
|
|
4703
|
+
className: modules_bec66042["thead"]
|
|
4602
4704
|
}), React__default["default"].createElement("tr", {
|
|
4603
|
-
className: modules_bec66042[
|
|
4705
|
+
className: modules_bec66042["row"]
|
|
4604
4706
|
}, headerCells, !disableContextMenuColumn && React__default["default"].createElement("td", {
|
|
4605
4707
|
style: {
|
|
4606
4708
|
paddingRight: spacing == null ? void 0 : spacing.paddingRight
|
|
4607
4709
|
},
|
|
4608
4710
|
"aria-label": "context menu",
|
|
4609
|
-
className: modules_bec66042[
|
|
4711
|
+
className: modules_bec66042["context-menu"]
|
|
4610
4712
|
})));
|
|
4611
4713
|
});
|
|
4612
4714
|
|
|
@@ -4623,9 +4725,9 @@ var DataGridColumnsToggle = /*#__PURE__*/React__default["default"].forwardRef(fu
|
|
|
4623
4725
|
var open = _ref.open,
|
|
4624
4726
|
headers = _ref.headers,
|
|
4625
4727
|
_ref$titleLabel = _ref.titleLabel,
|
|
4626
|
-
titleLabel = _ref$titleLabel === void 0 ?
|
|
4728
|
+
titleLabel = _ref$titleLabel === void 0 ? "Show columns" : _ref$titleLabel,
|
|
4627
4729
|
_ref$closeButtonTitle = _ref.closeButtonTitle,
|
|
4628
|
-
closeButtonTitle = _ref$closeButtonTitle === void 0 ?
|
|
4730
|
+
closeButtonTitle = _ref$closeButtonTitle === void 0 ? "Close show columns dialog" : _ref$closeButtonTitle,
|
|
4629
4731
|
onClose = _ref.onClose,
|
|
4630
4732
|
onToggleClicked = _ref.onToggleClicked,
|
|
4631
4733
|
className = _ref.className,
|
|
@@ -4636,7 +4738,7 @@ var DataGridColumnsToggle = /*#__PURE__*/React__default["default"].forwardRef(fu
|
|
|
4636
4738
|
var _useState = React.useState(generateID()),
|
|
4637
4739
|
id = _useState[0];
|
|
4638
4740
|
|
|
4639
|
-
var labelledId = id +
|
|
4741
|
+
var labelledId = id + "_header";
|
|
4640
4742
|
var toggles = headers.map(function (item) {
|
|
4641
4743
|
return React__default["default"].createElement(Toggle, {
|
|
4642
4744
|
key: item.name,
|
|
@@ -4654,29 +4756,29 @@ var DataGridColumnsToggle = /*#__PURE__*/React__default["default"].forwardRef(fu
|
|
|
4654
4756
|
|
|
4655
4757
|
return React__default["default"].createElement(Popover, _extends({}, rest, {
|
|
4656
4758
|
ref: ref,
|
|
4657
|
-
className: modules_a68425a1[
|
|
4759
|
+
className: modules_a68425a1["popover"] + " " + className,
|
|
4658
4760
|
show: open,
|
|
4659
4761
|
role: "dialog",
|
|
4660
4762
|
"aria-modal": "true",
|
|
4661
4763
|
"aria-labelledby": labelledId
|
|
4662
4764
|
}), open && reactDom.createPortal(React__default["default"].createElement("div", {
|
|
4663
|
-
className: modules_a68425a1[
|
|
4765
|
+
className: modules_a68425a1["backdrop"],
|
|
4664
4766
|
onClick: handleBackdropClick
|
|
4665
4767
|
}), domRoot), open && React__default["default"].createElement(React.Fragment, null, React__default["default"].createElement("div", {
|
|
4666
|
-
className: modules_a68425a1[
|
|
4768
|
+
className: modules_a68425a1["header"]
|
|
4667
4769
|
}, React__default["default"].createElement(Typography, {
|
|
4668
4770
|
id: labelledId,
|
|
4669
|
-
className: modules_a68425a1[
|
|
4771
|
+
className: modules_a68425a1["title"],
|
|
4670
4772
|
tag: "span",
|
|
4671
4773
|
variant: "h4"
|
|
4672
4774
|
}, titleLabel), React__default["default"].createElement(IconButton, {
|
|
4673
4775
|
onClick: onClose,
|
|
4674
|
-
className: "" + modules_a68425a1[
|
|
4776
|
+
className: "" + modules_a68425a1["close-btn"],
|
|
4675
4777
|
title: closeButtonTitle
|
|
4676
4778
|
}, React__default["default"].createElement(Icon, {
|
|
4677
4779
|
icon: exports.Icons.Times
|
|
4678
4780
|
}))), React__default["default"].createElement("div", {
|
|
4679
|
-
className: modules_a68425a1[
|
|
4781
|
+
className: modules_a68425a1["content"]
|
|
4680
4782
|
}, toggles)));
|
|
4681
4783
|
});
|
|
4682
4784
|
|
|
@@ -4707,9 +4809,9 @@ var DataGridActions = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
4707
4809
|
var showColumnBtn = React.useRef(null);
|
|
4708
4810
|
return isHidden ? null : React__default["default"].createElement("div", _extends({}, rest, {
|
|
4709
4811
|
ref: ref,
|
|
4710
|
-
className: modules_3f552d89[
|
|
4812
|
+
className: modules_3f552d89["actions"] + " " + (className != null ? className : "")
|
|
4711
4813
|
}), React__default["default"].createElement("div", {
|
|
4712
|
-
className: modules_3f552d89[
|
|
4814
|
+
className: modules_3f552d89["left-actions"]
|
|
4713
4815
|
}, enableAddBtn && React__default["default"].createElement(Button, _extends({
|
|
4714
4816
|
color: "primary",
|
|
4715
4817
|
startIcon: React__default["default"].createElement(Icon, {
|
|
@@ -4720,7 +4822,7 @@ var DataGridActions = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
4720
4822
|
variant: "outline",
|
|
4721
4823
|
children: "Add item"
|
|
4722
4824
|
}, addBtnProps))), React__default["default"].createElement("div", {
|
|
4723
|
-
className: modules_3f552d89[
|
|
4825
|
+
className: modules_3f552d89["right-actions"]
|
|
4724
4826
|
}, enableColumnsBtn && React__default["default"].createElement(React.Fragment, null, React__default["default"].createElement(Button, _extends({
|
|
4725
4827
|
startIcon: React__default["default"].createElement(Icon, {
|
|
4726
4828
|
icon: exports.Icons.Change
|
|
@@ -4729,7 +4831,7 @@ var DataGridActions = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
4729
4831
|
variant: "text",
|
|
4730
4832
|
children: "Columns"
|
|
4731
4833
|
}, columnsBtnProps, {
|
|
4732
|
-
className: modules_3f552d89[
|
|
4834
|
+
className: modules_3f552d89["desktop"] + " " + ((_columnsBtnProps$clas = columnsBtnProps == null ? void 0 : columnsBtnProps.className) != null ? _columnsBtnProps$clas : ""),
|
|
4733
4835
|
ref: showColumnBtn,
|
|
4734
4836
|
onClick: function onClick() {
|
|
4735
4837
|
return setShowColsPopover(true);
|
|
@@ -4740,7 +4842,7 @@ var DataGridActions = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
4740
4842
|
onClick: function onClick() {
|
|
4741
4843
|
return setShowColsPopover(true);
|
|
4742
4844
|
},
|
|
4743
|
-
className: modules_3f552d89[
|
|
4845
|
+
className: modules_3f552d89["mobile"] + " " + ((_columnsBtnProps$clas2 = columnsBtnProps == null ? void 0 : columnsBtnProps.className) != null ? _columnsBtnProps$clas2 : "")
|
|
4744
4846
|
}), React__default["default"].createElement(Icon, {
|
|
4745
4847
|
icon: exports.Icons.Change
|
|
4746
4848
|
})), React__default["default"].createElement(DataGridColumnsToggle, {
|
|
@@ -4760,11 +4862,11 @@ var DataGridActions = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
4760
4862
|
variant: "text",
|
|
4761
4863
|
children: "Search"
|
|
4762
4864
|
}, searchBtnProps, {
|
|
4763
|
-
className: modules_3f552d89[
|
|
4865
|
+
className: modules_3f552d89["desktop"] + " " + ((_searchBtnProps$class = searchBtnProps == null ? void 0 : searchBtnProps.className) != null ? _searchBtnProps$class : "")
|
|
4764
4866
|
})), React__default["default"].createElement(IconButton, _extends({
|
|
4765
4867
|
title: "Search"
|
|
4766
4868
|
}, searchBtnProps, {
|
|
4767
|
-
className: modules_3f552d89[
|
|
4869
|
+
className: modules_3f552d89["mobile"] + " " + ((_columnsBtnProps$clas3 = columnsBtnProps == null ? void 0 : columnsBtnProps.className) != null ? _columnsBtnProps$clas3 : "")
|
|
4768
4870
|
}), React__default["default"].createElement(Icon, {
|
|
4769
4871
|
icon: exports.Icons.TableSearch
|
|
4770
4872
|
})))));
|
|
@@ -4798,9 +4900,9 @@ var DataGridCell = /*#__PURE__*/React__default["default"].forwardRef(function (_
|
|
|
4798
4900
|
return React__default["default"].createElement("td", _extends({}, rest, {
|
|
4799
4901
|
ref: ref,
|
|
4800
4902
|
style: _extends({}, rest.style, cellStyle),
|
|
4801
|
-
className: modules_e636700c[
|
|
4903
|
+
className: modules_e636700c["cell"] + " " + (className != null ? className : "")
|
|
4802
4904
|
}), isLoading && React__default["default"].createElement("div", {
|
|
4803
|
-
className: modules_e636700c[
|
|
4905
|
+
className: modules_e636700c["loading"],
|
|
4804
4906
|
"aria-busy": "true",
|
|
4805
4907
|
"aria-live": "polite"
|
|
4806
4908
|
}), !isLoading && React__default["default"].createElement(Typography, {
|
|
@@ -4831,18 +4933,18 @@ var DataGridRow = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
4831
4933
|
columnLength: headers == null ? void 0 : headers.length,
|
|
4832
4934
|
disableContextMenuColumn: disableContextMenuColumn
|
|
4833
4935
|
});
|
|
4834
|
-
var visible =
|
|
4936
|
+
var visible = headers && headers.length > index ? !headers[index].hidden : true;
|
|
4835
4937
|
return visible && cellWithSpacing;
|
|
4836
4938
|
}
|
|
4837
4939
|
|
|
4838
4940
|
return null;
|
|
4839
4941
|
});
|
|
4840
|
-
var classNames = [modules_fb55f208[
|
|
4942
|
+
var classNames = [modules_fb55f208["row"]];
|
|
4841
4943
|
className && classNames.push(className);
|
|
4842
|
-
isLoading && classNames.push(modules_fb55f208[
|
|
4944
|
+
isLoading && classNames.push(modules_fb55f208["loading"]);
|
|
4843
4945
|
return React__default["default"].createElement("tr", _extends({}, rest, {
|
|
4844
4946
|
ref: ref,
|
|
4845
|
-
className: classNames.join(
|
|
4947
|
+
className: classNames.join(" ")
|
|
4846
4948
|
}), visibleCells);
|
|
4847
4949
|
});
|
|
4848
4950
|
|
|
@@ -4886,7 +4988,7 @@ var DataGridBodyInner = function DataGridBodyInner(_ref, ref) {
|
|
|
4886
4988
|
|
|
4887
4989
|
if (emptyData) {
|
|
4888
4990
|
return React__default["default"].createElement("tr", null, React__default["default"].createElement("td", {
|
|
4889
|
-
className: modules_532fe2cf[
|
|
4991
|
+
className: modules_532fe2cf["empty"],
|
|
4890
4992
|
colSpan: visibleColumns + (disableContextMenuColumn ? 0 : 1)
|
|
4891
4993
|
}, React__default["default"].createElement(Typography, {
|
|
4892
4994
|
variant: "body",
|
|
@@ -4937,11 +5039,11 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
4937
5039
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
4938
5040
|
|
|
4939
5041
|
if (!headers) {
|
|
4940
|
-
throw new Error(
|
|
5042
|
+
throw new Error("Headers definition has to be provided");
|
|
4941
5043
|
}
|
|
4942
5044
|
|
|
4943
5045
|
if (!children) {
|
|
4944
|
-
throw new Error(
|
|
5046
|
+
throw new Error("DataGridBody should be provieded with a template how to render rows");
|
|
4945
5047
|
}
|
|
4946
5048
|
|
|
4947
5049
|
var _useState = React.useState(headers),
|
|
@@ -4962,7 +5064,7 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
4962
5064
|
};
|
|
4963
5065
|
|
|
4964
5066
|
if (styleWithSpacing != null && styleWithSpacing.padding) {
|
|
4965
|
-
var splitPaddings = styleWithSpacing.padding.toString().split(
|
|
5067
|
+
var splitPaddings = styleWithSpacing.padding.toString().split(" ");
|
|
4966
5068
|
var paddingLeftIndex = 0;
|
|
4967
5069
|
|
|
4968
5070
|
if (splitPaddings.length >= 2) {
|
|
@@ -4990,7 +5092,7 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
4990
5092
|
}
|
|
4991
5093
|
|
|
4992
5094
|
return React__default["default"].createElement("div", _extends({}, rest, {
|
|
4993
|
-
className: modules_b8d590e8[
|
|
5095
|
+
className: modules_b8d590e8["grid-wrapper"],
|
|
4994
5096
|
ref: ref,
|
|
4995
5097
|
style: {
|
|
4996
5098
|
paddingTop: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingTop,
|
|
@@ -5004,9 +5106,9 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
5004
5106
|
headers: internalHeaders,
|
|
5005
5107
|
onColumnToggled: onColumnToggled
|
|
5006
5108
|
})), React__default["default"].createElement("div", {
|
|
5007
|
-
className: modules_b8d590e8[
|
|
5109
|
+
className: modules_b8d590e8["table-wrapper"]
|
|
5008
5110
|
}, React__default["default"].createElement("table", {
|
|
5009
|
-
className: modules_b8d590e8[
|
|
5111
|
+
className: modules_b8d590e8["table"]
|
|
5010
5112
|
}, React__default["default"].createElement(DataGridHeader, {
|
|
5011
5113
|
headers: internalHeaders,
|
|
5012
5114
|
initialSort: initialSort,
|
|
@@ -5027,7 +5129,7 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
5027
5129
|
paddingLeft: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingLeft,
|
|
5028
5130
|
paddingRight: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingRight
|
|
5029
5131
|
}),
|
|
5030
|
-
className: modules_b8d590e8[
|
|
5132
|
+
className: modules_b8d590e8["pagination"] + " " + ((_paginationProps$clas = paginationProps.className) != null ? _paginationProps$clas : "")
|
|
5031
5133
|
})));
|
|
5032
5134
|
};
|
|
5033
5135
|
|