@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
|
@@ -38,56 +38,56 @@ var BaseStyling = function BaseStyling(_ref) {
|
|
|
38
38
|
_ref$properties = _ref.properties,
|
|
39
39
|
properties = _ref$properties === void 0 ? {} : _ref$properties;
|
|
40
40
|
var defaultProperties = {
|
|
41
|
-
colorFocus:
|
|
42
|
-
colorPrimary:
|
|
43
|
-
colorSecondary:
|
|
44
|
-
colorTertiary:
|
|
45
|
-
defaultLineHeight:
|
|
46
|
-
buttonBorderRadius:
|
|
47
|
-
buttonBorderWidth:
|
|
48
|
-
buttonFontSize:
|
|
49
|
-
buttonBorderStyle:
|
|
50
|
-
buttonFillTextColor:
|
|
51
|
-
buttonFillBackgroundColor:
|
|
52
|
-
buttonOutlineHoverTextColor:
|
|
53
|
-
inputBorderColor:
|
|
54
|
-
inputBorderRadius:
|
|
55
|
-
inputBorderWidth:
|
|
56
|
-
inputBorderWidthFocus:
|
|
57
|
-
inputBorderStyle:
|
|
58
|
-
inputBackgroundColor:
|
|
59
|
-
modalShadowColor:
|
|
60
|
-
modalBackgroundColor:
|
|
61
|
-
modalHeaderBackgroundColor:
|
|
62
|
-
snackbarTextColor:
|
|
63
|
-
snackbarInfoBackgroundColor:
|
|
64
|
-
snackbarSuccessBackgroundColor:
|
|
65
|
-
snackbarErrorBackgroundColor:
|
|
66
|
-
snackbarBorderRadius:
|
|
67
|
-
dataGridRowBackgroundColor:
|
|
68
|
-
dataGridRowHoverBackgroundColor:
|
|
69
|
-
tabsBackgroundColor:
|
|
70
|
-
tabBorderWidth:
|
|
71
|
-
tabBorderStyle:
|
|
72
|
-
tablistBorderWidth:
|
|
73
|
-
tablistBorderStyle:
|
|
74
|
-
tablistBorderColor:
|
|
75
|
-
tabTextColor:
|
|
76
|
-
"default":
|
|
77
|
-
success:
|
|
78
|
-
error:
|
|
79
|
-
disabled:
|
|
80
|
-
greyedOut:
|
|
81
|
-
warning:
|
|
41
|
+
colorFocus: "#0085f2",
|
|
42
|
+
colorPrimary: "#9e006b",
|
|
43
|
+
colorSecondary: "#003b5e",
|
|
44
|
+
colorTertiary: "#ff1e4e",
|
|
45
|
+
defaultLineHeight: "26px",
|
|
46
|
+
buttonBorderRadius: "20px",
|
|
47
|
+
buttonBorderWidth: "2px",
|
|
48
|
+
buttonFontSize: "1rem",
|
|
49
|
+
buttonBorderStyle: "solid",
|
|
50
|
+
buttonFillTextColor: "#fff",
|
|
51
|
+
buttonFillBackgroundColor: "#fff",
|
|
52
|
+
buttonOutlineHoverTextColor: "#fff",
|
|
53
|
+
inputBorderColor: "#e9e9eb",
|
|
54
|
+
inputBorderRadius: "8px",
|
|
55
|
+
inputBorderWidth: "1px",
|
|
56
|
+
inputBorderWidthFocus: "2px",
|
|
57
|
+
inputBorderStyle: "solid",
|
|
58
|
+
inputBackgroundColor: "#fff",
|
|
59
|
+
modalShadowColor: "rgba(0, 0, 0, 0.16)",
|
|
60
|
+
modalBackgroundColor: "#f5f8f8",
|
|
61
|
+
modalHeaderBackgroundColor: "#fff",
|
|
62
|
+
snackbarTextColor: "#fff",
|
|
63
|
+
snackbarInfoBackgroundColor: "#003b5e",
|
|
64
|
+
snackbarSuccessBackgroundColor: "#008a28",
|
|
65
|
+
snackbarErrorBackgroundColor: "#d9291c",
|
|
66
|
+
snackbarBorderRadius: "8px",
|
|
67
|
+
dataGridRowBackgroundColor: "transparent",
|
|
68
|
+
dataGridRowHoverBackgroundColor: "#f5e6f0",
|
|
69
|
+
tabsBackgroundColor: "#FFF",
|
|
70
|
+
tabBorderWidth: "2px",
|
|
71
|
+
tabBorderStyle: "solid",
|
|
72
|
+
tablistBorderWidth: "1px",
|
|
73
|
+
tablistBorderStyle: "solid",
|
|
74
|
+
tablistBorderColor: "#C3C3C7",
|
|
75
|
+
tabTextColor: "#0f0f1e",
|
|
76
|
+
"default": "#0f0f1e",
|
|
77
|
+
success: "#008a28",
|
|
78
|
+
error: "#d9291c",
|
|
79
|
+
disabled: "#e9e9eb",
|
|
80
|
+
greyedOut: "#6f6f76",
|
|
81
|
+
warning: "#ff6105",
|
|
82
82
|
fontFamily: "'Red Hat Display', sans-serif",
|
|
83
83
|
fontFamilyCode: "'Red Hat Mono', sans-serif",
|
|
84
|
-
fontSize:
|
|
85
|
-
fontSizeH1:
|
|
86
|
-
fontSizeH2:
|
|
87
|
-
fontSizeH3:
|
|
88
|
-
fontSizeH4:
|
|
89
|
-
fontSizeSub:
|
|
90
|
-
fontSizeCode:
|
|
84
|
+
fontSize: "1rem",
|
|
85
|
+
fontSizeH1: "2.5rem",
|
|
86
|
+
fontSizeH2: "1.625rem",
|
|
87
|
+
fontSizeH3: "1.5rem",
|
|
88
|
+
fontSizeH4: "1.25rem",
|
|
89
|
+
fontSizeSub: ".75rem",
|
|
90
|
+
fontSizeCode: "1rem"
|
|
91
91
|
};
|
|
92
92
|
/** We need a loading state, because otherwise you see the colors flash from the default to the possible overridden ones. */
|
|
93
93
|
|
|
@@ -137,16 +137,16 @@ var _excluded$Y = ["children", "type", "className"];
|
|
|
137
137
|
var BaseButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
138
138
|
var children = _ref.children,
|
|
139
139
|
_ref$type = _ref.type,
|
|
140
|
-
type = _ref$type === void 0 ?
|
|
140
|
+
type = _ref$type === void 0 ? "button" : _ref$type,
|
|
141
141
|
className = _ref.className,
|
|
142
142
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$Y);
|
|
143
143
|
|
|
144
|
-
var validTypes = [
|
|
144
|
+
var validTypes = ["submit", "button", "reset"];
|
|
145
145
|
if (!validTypes.includes(type)) throw new Error("You have entered an invalid button type. Expected 'submit', 'button' or 'reset' got " + type);
|
|
146
146
|
return React.createElement("button", _extends({}, rest, {
|
|
147
147
|
ref: ref,
|
|
148
148
|
type: type,
|
|
149
|
-
className: modules_3484519b.button + " " + (className ? className :
|
|
149
|
+
className: modules_3484519b.button + " " + (className ? className : "")
|
|
150
150
|
}), children);
|
|
151
151
|
});
|
|
152
152
|
|
|
@@ -158,9 +158,9 @@ var _excluded$X = ["children", "variant", "color", "startIcon", "endIcon", "clas
|
|
|
158
158
|
var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
159
159
|
var children = _ref.children,
|
|
160
160
|
_ref$variant = _ref.variant,
|
|
161
|
-
variant = _ref$variant === void 0 ?
|
|
161
|
+
variant = _ref$variant === void 0 ? "fill" : _ref$variant,
|
|
162
162
|
_ref$color = _ref.color,
|
|
163
|
-
color = _ref$color === void 0 ?
|
|
163
|
+
color = _ref$color === void 0 ? "primary" : _ref$color,
|
|
164
164
|
_ref$startIcon = _ref.startIcon,
|
|
165
165
|
startIcon = _ref$startIcon === void 0 ? false : _ref$startIcon,
|
|
166
166
|
_ref$endIcon = _ref.endIcon,
|
|
@@ -171,15 +171,15 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
171
171
|
var additionalClasses = [];
|
|
172
172
|
|
|
173
173
|
if (startIcon || endIcon) {
|
|
174
|
-
additionalClasses.push(modules_79b43374[
|
|
174
|
+
additionalClasses.push(modules_79b43374["has-icon"]);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
if (startIcon) {
|
|
178
|
-
additionalClasses.push(modules_79b43374[
|
|
178
|
+
additionalClasses.push(modules_79b43374["start-icon"]);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
if (endIcon) {
|
|
182
|
-
additionalClasses.push(modules_79b43374[
|
|
182
|
+
additionalClasses.push(modules_79b43374["end-icon"]);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
if (className) {
|
|
@@ -188,7 +188,7 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
188
188
|
|
|
189
189
|
return React.createElement(BaseButton, _extends({}, rest, {
|
|
190
190
|
ref: ref,
|
|
191
|
-
className: modules_79b43374[color] + " " + modules_79b43374[variant] + " " + additionalClasses.join(
|
|
191
|
+
className: modules_79b43374[color] + " " + modules_79b43374[variant] + " " + additionalClasses.join(" ")
|
|
192
192
|
}), startIcon && React.createElement("i", null, startIcon, "\xA0"), React.createElement("span", null, children), endIcon && React.createElement("i", null, "\xA0", endIcon));
|
|
193
193
|
});
|
|
194
194
|
|
|
@@ -273,7 +273,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
273
273
|
style = _ref.style,
|
|
274
274
|
size = _ref.size,
|
|
275
275
|
_ref$tag = _ref.tag,
|
|
276
|
-
tag = _ref$tag === void 0 ?
|
|
276
|
+
tag = _ref$tag === void 0 ? "span" : _ref$tag,
|
|
277
277
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$W);
|
|
278
278
|
|
|
279
279
|
var Component = tag;
|
|
@@ -286,16 +286,16 @@ var Icon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
286
286
|
}),
|
|
287
287
|
"data-icon": true,
|
|
288
288
|
"aria-hidden": "true",
|
|
289
|
-
className: modules_c4937a59[
|
|
289
|
+
className: modules_c4937a59["icon"] + " " + modules_c4937a59["icon-" + icon] + " " + (className ? className : "")
|
|
290
290
|
}));
|
|
291
291
|
});
|
|
292
292
|
|
|
293
|
-
var css$T = ".
|
|
294
|
-
var modules_e6a5a2d0 = {"typography_style_h1":"
|
|
293
|
+
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}";
|
|
294
|
+
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"};
|
|
295
295
|
n(css$T,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
296
296
|
|
|
297
297
|
var defaultFactor = 0.25;
|
|
298
|
-
var defaultUnit =
|
|
298
|
+
var defaultUnit = "rem";
|
|
299
299
|
var spacingNumberRegex = /(\d+\.?\d*)+/g;
|
|
300
300
|
var useSpacing = function useSpacing(spacingProps, style) {
|
|
301
301
|
if (spacingProps) {
|
|
@@ -308,7 +308,7 @@ var useSpacing = function useSpacing(spacingProps, style) {
|
|
|
308
308
|
var cssSpacingValue = Array.from(matches).map(function (_ref2) {
|
|
309
309
|
var multiplierValue = _ref2[0];
|
|
310
310
|
return "" + Number(multiplierValue) * defaultFactor + defaultUnit;
|
|
311
|
-
}).join(
|
|
311
|
+
}).join(" ");
|
|
312
312
|
return _extends({}, prev, (_extends2 = {}, _extends2[spacing] = cssSpacingValue, _extends2));
|
|
313
313
|
}, style != null ? style : {});
|
|
314
314
|
}
|
|
@@ -317,7 +317,7 @@ var useSpacing = function useSpacing(spacingProps, style) {
|
|
|
317
317
|
};
|
|
318
318
|
|
|
319
319
|
var _excluded$V = ["children", "variant", "tag", "style", "spacing", "className"];
|
|
320
|
-
var validVariants = [
|
|
320
|
+
var validVariants = ["h1", "h2", "h3", "h4", "body", "body-bold", "sub-text", "code"];
|
|
321
321
|
var Typography = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
322
322
|
var children = _ref.children,
|
|
323
323
|
variant = _ref.variant,
|
|
@@ -325,7 +325,7 @@ var Typography = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
325
325
|
style = _ref.style,
|
|
326
326
|
spacing = _ref.spacing,
|
|
327
327
|
_ref$className = _ref.className,
|
|
328
|
-
className = _ref$className === void 0 ?
|
|
328
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
329
329
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$V);
|
|
330
330
|
|
|
331
331
|
if (!validVariants.includes(variant)) {
|
|
@@ -336,28 +336,28 @@ var Typography = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
336
336
|
|
|
337
337
|
if (!tag) {
|
|
338
338
|
switch (variant) {
|
|
339
|
-
case
|
|
340
|
-
case
|
|
341
|
-
case
|
|
342
|
-
case
|
|
343
|
-
case
|
|
339
|
+
case "h1":
|
|
340
|
+
case "h2":
|
|
341
|
+
case "h3":
|
|
342
|
+
case "h4":
|
|
343
|
+
case "code":
|
|
344
344
|
tag = variant;
|
|
345
345
|
break;
|
|
346
346
|
|
|
347
|
-
case
|
|
348
|
-
tag =
|
|
347
|
+
case "body":
|
|
348
|
+
tag = "p";
|
|
349
349
|
break;
|
|
350
350
|
|
|
351
|
-
case
|
|
352
|
-
tag =
|
|
351
|
+
case "body-bold":
|
|
352
|
+
tag = "p";
|
|
353
353
|
break;
|
|
354
354
|
|
|
355
|
-
case
|
|
356
|
-
tag =
|
|
355
|
+
case "sub-text":
|
|
356
|
+
tag = "span";
|
|
357
357
|
break;
|
|
358
358
|
|
|
359
359
|
default:
|
|
360
|
-
tag =
|
|
360
|
+
tag = "div";
|
|
361
361
|
break;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
@@ -366,7 +366,7 @@ var Typography = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
366
366
|
return React.createElement(TagName, _extends({}, rest, {
|
|
367
367
|
ref: ref,
|
|
368
368
|
style: styleWithSpacing,
|
|
369
|
-
className: modules_e6a5a2d0[
|
|
369
|
+
className: modules_e6a5a2d0["typography_style_" + variant] + " " + className
|
|
370
370
|
}), children);
|
|
371
371
|
});
|
|
372
372
|
|
|
@@ -377,9 +377,9 @@ n(css$S,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
|
377
377
|
var _excluded$U = ["children", "aria-label", "className"];
|
|
378
378
|
var Breadcrumbs = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
379
379
|
var children = _ref.children,
|
|
380
|
-
ariaLabel = _ref[
|
|
380
|
+
ariaLabel = _ref["aria-label"],
|
|
381
381
|
_ref$className = _ref.className,
|
|
382
|
-
className = _ref$className === void 0 ?
|
|
382
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
383
383
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$U);
|
|
384
384
|
|
|
385
385
|
var items = React.Children.map(children, function (child, index) {
|
|
@@ -390,7 +390,7 @@ var Breadcrumbs = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
390
390
|
key: child.key,
|
|
391
391
|
variant: "body",
|
|
392
392
|
tag: "span",
|
|
393
|
-
className: modules_a04642f2[
|
|
393
|
+
className: modules_a04642f2["last"],
|
|
394
394
|
"aria-current": "page"
|
|
395
395
|
}, child.props.children);
|
|
396
396
|
} else {
|
|
@@ -398,14 +398,14 @@ var Breadcrumbs = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
398
398
|
key: child.key
|
|
399
399
|
}, React.cloneElement(child), React.createElement(Icon, {
|
|
400
400
|
icon: Icons.ChevronRight,
|
|
401
|
-
className: modules_a04642f2[
|
|
401
|
+
className: modules_a04642f2["icon"]
|
|
402
402
|
}));
|
|
403
403
|
}
|
|
404
404
|
});
|
|
405
405
|
return React.createElement("nav", _extends({}, rest, {
|
|
406
406
|
ref: ref,
|
|
407
407
|
"aria-label": ariaLabel,
|
|
408
|
-
className: modules_a04642f2[
|
|
408
|
+
className: modules_a04642f2["breadcrumbs"] + " " + className
|
|
409
409
|
}), items);
|
|
410
410
|
});
|
|
411
411
|
|
|
@@ -413,12 +413,12 @@ var defaultConfigObject = {
|
|
|
413
413
|
relativeElement: undefined,
|
|
414
414
|
elementToBePositioned: undefined,
|
|
415
415
|
transformOrigin: {
|
|
416
|
-
horizontal:
|
|
417
|
-
vertical:
|
|
416
|
+
horizontal: "left",
|
|
417
|
+
vertical: "top"
|
|
418
418
|
},
|
|
419
419
|
placement: {
|
|
420
|
-
horizontal:
|
|
421
|
-
vertical:
|
|
420
|
+
horizontal: "left",
|
|
421
|
+
vertical: "top"
|
|
422
422
|
},
|
|
423
423
|
offset: {
|
|
424
424
|
top: 0,
|
|
@@ -427,6 +427,8 @@ var defaultConfigObject = {
|
|
|
427
427
|
left: 0
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain*/
|
|
431
|
+
|
|
430
432
|
var usePosition = function usePosition(providedConfigObject) {
|
|
431
433
|
if (providedConfigObject === void 0) {
|
|
432
434
|
providedConfigObject = defaultConfigObject;
|
|
@@ -449,8 +451,8 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
449
451
|
var _useState = useState({
|
|
450
452
|
left: 0,
|
|
451
453
|
top: 0,
|
|
452
|
-
right:
|
|
453
|
-
bottom:
|
|
454
|
+
right: "initial",
|
|
455
|
+
bottom: "initial"
|
|
454
456
|
}),
|
|
455
457
|
position = _useState[0],
|
|
456
458
|
setPosition = _useState[1];
|
|
@@ -458,23 +460,23 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
458
460
|
var _fixPossibleViewportOverflow = function _fixPossibleViewportOverflow(value, transformOrigin, requestedReturnValue, elDimensions) {
|
|
459
461
|
var returnValue = value;
|
|
460
462
|
|
|
461
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
463
|
+
if (transformOrigin[requestedReturnValue] === "left" && returnValue < 0 || transformOrigin[requestedReturnValue] === "top" && returnValue < 0 || transformOrigin[requestedReturnValue] === "center" && returnValue < 0 || transformOrigin[requestedReturnValue] === "bottom" && returnValue < 0) {
|
|
462
464
|
returnValue = 0;
|
|
463
465
|
}
|
|
464
466
|
|
|
465
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
467
|
+
if (transformOrigin[requestedReturnValue] === "left" && returnValue > window.innerWidth - elDimensions.width || transformOrigin[requestedReturnValue] === "center" && requestedReturnValue === "horizontal" && returnValue > window.innerWidth - elDimensions.width) {
|
|
466
468
|
returnValue = window.innerWidth - elDimensions.width;
|
|
467
469
|
}
|
|
468
470
|
|
|
469
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
471
|
+
if (transformOrigin[requestedReturnValue] === "top" && returnValue > window.innerHeight - elDimensions.height || transformOrigin[requestedReturnValue] === "center" && requestedReturnValue === "vertical" && returnValue > window.innerHeight - elDimensions.height) {
|
|
470
472
|
returnValue = window.innerHeight - elDimensions.height;
|
|
471
473
|
}
|
|
472
474
|
|
|
473
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
475
|
+
if (transformOrigin[requestedReturnValue] === "right" && returnValue > window.innerWidth - elDimensions.width) {
|
|
474
476
|
returnValue = window.innerWidth - elDimensions.width;
|
|
475
477
|
}
|
|
476
478
|
|
|
477
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
479
|
+
if (transformOrigin[requestedReturnValue] === "bottom" && returnValue > window.innerHeight - elDimensions.height) {
|
|
478
480
|
returnValue = window.innerHeight - elDimensions.height;
|
|
479
481
|
}
|
|
480
482
|
|
|
@@ -486,15 +488,15 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
486
488
|
|
|
487
489
|
var returnValue = value;
|
|
488
490
|
|
|
489
|
-
if (requestedReturnValue ===
|
|
490
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
491
|
+
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) {
|
|
492
|
+
if (transformOrigin[requestedReturnValue] === "left" || transformOrigin[requestedReturnValue] === "center") {
|
|
491
493
|
var _configObject$offset3, _configObject$offset4;
|
|
492
494
|
|
|
493
495
|
returnValue += (_configObject$offset3 = configObject.offset) == null ? void 0 : _configObject$offset3.left;
|
|
494
496
|
returnValue -= (_configObject$offset4 = configObject.offset) == null ? void 0 : _configObject$offset4.right;
|
|
495
497
|
}
|
|
496
498
|
|
|
497
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
499
|
+
if (transformOrigin[requestedReturnValue] === "right") {
|
|
498
500
|
var _configObject$offset5, _configObject$offset6;
|
|
499
501
|
|
|
500
502
|
returnValue -= (_configObject$offset5 = configObject.offset) == null ? void 0 : _configObject$offset5.left;
|
|
@@ -502,15 +504,15 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
502
504
|
}
|
|
503
505
|
}
|
|
504
506
|
|
|
505
|
-
if (requestedReturnValue ===
|
|
506
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
507
|
+
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) {
|
|
508
|
+
if (transformOrigin[requestedReturnValue] === "top" || transformOrigin[requestedReturnValue] === "center") {
|
|
507
509
|
var _configObject$offset9, _configObject$offset10;
|
|
508
510
|
|
|
509
511
|
returnValue += (_configObject$offset9 = configObject.offset) == null ? void 0 : _configObject$offset9.top;
|
|
510
512
|
returnValue -= (_configObject$offset10 = configObject.offset) == null ? void 0 : _configObject$offset10.bottom;
|
|
511
513
|
}
|
|
512
514
|
|
|
513
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
515
|
+
if (transformOrigin[requestedReturnValue] === "bottom") {
|
|
514
516
|
var _configObject$offset11, _configObject$offset12;
|
|
515
517
|
|
|
516
518
|
returnValue -= (_configObject$offset11 = configObject.offset) == null ? void 0 : _configObject$offset11.top;
|
|
@@ -524,12 +526,12 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
524
526
|
var _calculateInitialPlacementValue = function _calculateInitialPlacementValue(transformOrigin, requestedReturnValue, relEl, placementOriginDefinition, elDimensions) {
|
|
525
527
|
var value = 0;
|
|
526
528
|
|
|
527
|
-
if (transformOrigin[requestedReturnValue] ===
|
|
529
|
+
if (transformOrigin[requestedReturnValue] === "left" || transformOrigin[requestedReturnValue] === "top") {
|
|
528
530
|
value = relEl[placementOriginDefinition];
|
|
529
|
-
} else if (transformOrigin[requestedReturnValue] ===
|
|
530
|
-
value = relEl[placementOriginDefinition] - elDimensions[requestedReturnValue ===
|
|
531
|
-
} else if (transformOrigin[requestedReturnValue] ===
|
|
532
|
-
value = window[requestedReturnValue ===
|
|
531
|
+
} else if (transformOrigin[requestedReturnValue] === "center") {
|
|
532
|
+
value = relEl[placementOriginDefinition] - elDimensions[requestedReturnValue === "horizontal" ? "width" : "height"] / 2;
|
|
533
|
+
} else if (transformOrigin[requestedReturnValue] === "right" || transformOrigin[requestedReturnValue] === "bottom") {
|
|
534
|
+
value = window[requestedReturnValue === "horizontal" ? "innerWidth" : "innerHeight"] - relEl[placementOriginDefinition];
|
|
533
535
|
}
|
|
534
536
|
|
|
535
537
|
return value;
|
|
@@ -542,17 +544,17 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
542
544
|
|
|
543
545
|
|
|
544
546
|
var _determineCenteredPlacementOrigin = function _determineCenteredPlacementOrigin(requestedReturnValue) {
|
|
545
|
-
if (requestedReturnValue ===
|
|
546
|
-
return
|
|
547
|
-
} else if (requestedReturnValue ===
|
|
548
|
-
return
|
|
547
|
+
if (requestedReturnValue === "horizontal") {
|
|
548
|
+
return "centerh";
|
|
549
|
+
} else if (requestedReturnValue === "vertical") {
|
|
550
|
+
return "centerv";
|
|
549
551
|
}
|
|
550
552
|
|
|
551
553
|
throw new Error("the requested return value isn't \"vertical\" or \"horizontal\" " + requestedReturnValue + " was given.");
|
|
552
554
|
};
|
|
553
555
|
|
|
554
556
|
var _calculatePlacementValue = function _calculatePlacementValue(transformOrigin, placement, requestedReturnValue, relEl, elDimensions) {
|
|
555
|
-
var placementOriginDefinition = placement ===
|
|
557
|
+
var placementOriginDefinition = placement === "center" ? _determineCenteredPlacementOrigin(requestedReturnValue) : placement;
|
|
556
558
|
|
|
557
559
|
var value = _calculateInitialPlacementValue(transformOrigin, requestedReturnValue, relEl, placementOriginDefinition, elDimensions);
|
|
558
560
|
|
|
@@ -568,29 +570,29 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
568
570
|
|
|
569
571
|
var placementValue = _calculatePlacementValue(configObject.transformOrigin, configObject.placement[axis], axis, relEl, elDimensions);
|
|
570
572
|
|
|
571
|
-
var direction =
|
|
572
|
-
var oppositeDirection =
|
|
573
|
+
var direction = "left";
|
|
574
|
+
var oppositeDirection = "right";
|
|
573
575
|
|
|
574
|
-
if (axis ===
|
|
575
|
-
direction =
|
|
576
|
-
oppositeDirection =
|
|
577
|
-
} else if (axis ===
|
|
578
|
-
direction =
|
|
579
|
-
oppositeDirection =
|
|
576
|
+
if (axis === "horizontal" && ((_configObject$transfo = configObject.transformOrigin) == null ? void 0 : _configObject$transfo.horizontal) === "right") {
|
|
577
|
+
direction = "right";
|
|
578
|
+
oppositeDirection = "left";
|
|
579
|
+
} else if (axis === "horizontal") {
|
|
580
|
+
direction = "left";
|
|
581
|
+
oppositeDirection = "right";
|
|
580
582
|
}
|
|
581
583
|
|
|
582
|
-
if (axis ===
|
|
583
|
-
direction =
|
|
584
|
-
oppositeDirection =
|
|
585
|
-
} else if (axis ===
|
|
586
|
-
direction =
|
|
587
|
-
oppositeDirection =
|
|
584
|
+
if (axis === "vertical" && ((_configObject$transfo2 = configObject.transformOrigin) == null ? void 0 : _configObject$transfo2.vertical) === "bottom") {
|
|
585
|
+
direction = "bottom";
|
|
586
|
+
oppositeDirection = "top";
|
|
587
|
+
} else if (axis === "vertical") {
|
|
588
|
+
direction = "top";
|
|
589
|
+
oppositeDirection = "bottom";
|
|
588
590
|
}
|
|
589
591
|
|
|
590
592
|
setPosition(function (prevState) {
|
|
591
593
|
var _extends2;
|
|
592
594
|
|
|
593
|
-
return _extends({}, prevState, (_extends2 = {}, _extends2[direction] = placementValue, _extends2[oppositeDirection] =
|
|
595
|
+
return _extends({}, prevState, (_extends2 = {}, _extends2[direction] = placementValue, _extends2[oppositeDirection] = "initial", _extends2));
|
|
594
596
|
});
|
|
595
597
|
};
|
|
596
598
|
|
|
@@ -619,9 +621,9 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
619
621
|
y: relativeElRect.y
|
|
620
622
|
};
|
|
621
623
|
|
|
622
|
-
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions,
|
|
624
|
+
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions, "horizontal");
|
|
623
625
|
|
|
624
|
-
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions,
|
|
626
|
+
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions, "vertical");
|
|
625
627
|
};
|
|
626
628
|
|
|
627
629
|
return {
|
|
@@ -674,7 +676,7 @@ var Popover = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
674
676
|
ref: ref
|
|
675
677
|
}, rest), React.createElement("div", {
|
|
676
678
|
ref: elToBePositioned,
|
|
677
|
-
className: modules_ef8f756f.popover + " " + (className != null ? className :
|
|
679
|
+
className: modules_ef8f756f.popover + " " + (className != null ? className : "") + " " + (show ? modules_ef8f756f.show : ""),
|
|
678
680
|
style: {
|
|
679
681
|
top: top,
|
|
680
682
|
left: left,
|
|
@@ -696,9 +698,9 @@ var useBodyClick = function useBodyClick(checkFunction, callbackFunction, depend
|
|
|
696
698
|
}
|
|
697
699
|
|
|
698
700
|
useEffect(function () {
|
|
699
|
-
window.addEventListener(
|
|
701
|
+
window.addEventListener("click", bodyClickListener);
|
|
700
702
|
return function () {
|
|
701
|
-
window.removeEventListener(
|
|
703
|
+
window.removeEventListener("click", bodyClickListener);
|
|
702
704
|
};
|
|
703
705
|
}, [dependingStateVariable]);
|
|
704
706
|
};
|
|
@@ -714,8 +716,8 @@ var ContextMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
714
716
|
onClose = _ref.onClose,
|
|
715
717
|
_ref$placement = _ref.placement,
|
|
716
718
|
placement = _ref$placement === void 0 ? {
|
|
717
|
-
horizontal:
|
|
718
|
-
vertical:
|
|
719
|
+
horizontal: "right",
|
|
720
|
+
vertical: "top"
|
|
719
721
|
} : _ref$placement,
|
|
720
722
|
_ref$offset = _ref.offset,
|
|
721
723
|
offset = _ref$offset === void 0 ? {
|
|
@@ -726,8 +728,8 @@ var ContextMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
726
728
|
} : _ref$offset,
|
|
727
729
|
_ref$transformOrigin = _ref.transformOrigin,
|
|
728
730
|
transformOrigin = _ref$transformOrigin === void 0 ? {
|
|
729
|
-
horizontal:
|
|
730
|
-
vertical:
|
|
731
|
+
horizontal: "left",
|
|
732
|
+
vertical: "top"
|
|
731
733
|
} : _ref$transformOrigin,
|
|
732
734
|
_ref$domRoot = _ref.domRoot,
|
|
733
735
|
domRoot = _ref$domRoot === void 0 ? document.body : _ref$domRoot,
|
|
@@ -739,25 +741,29 @@ var ContextMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
739
741
|
showContextMenu = _useState[0],
|
|
740
742
|
setShowContextMenu = _useState[1];
|
|
741
743
|
|
|
742
|
-
var _useState2 = useState(
|
|
743
|
-
|
|
744
|
-
|
|
744
|
+
var _useState2 = useState(false),
|
|
745
|
+
hasBeenClosed = _useState2[0],
|
|
746
|
+
setHasBeenClosed = _useState2[1];
|
|
745
747
|
|
|
746
748
|
var _useState3 = useState(-1),
|
|
747
|
-
|
|
748
|
-
|
|
749
|
+
selectedContextMenuItem = _useState3[0],
|
|
750
|
+
setSelectedContextMenuItem = _useState3[1];
|
|
749
751
|
|
|
750
|
-
var _useState4 = useState(
|
|
751
|
-
|
|
752
|
-
|
|
752
|
+
var _useState4 = useState(-1),
|
|
753
|
+
focusedContextMenuItem = _useState4[0],
|
|
754
|
+
setFocusedContextMenuItem = _useState4[1];
|
|
755
|
+
|
|
756
|
+
var _useState5 = useState(false),
|
|
757
|
+
shouldClick = _useState5[0],
|
|
758
|
+
setShouldClick = _useState5[1];
|
|
753
759
|
/** 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. */
|
|
754
760
|
|
|
755
761
|
|
|
756
|
-
var
|
|
757
|
-
childrenCount =
|
|
762
|
+
var _useState6 = useState(React.Children.count(children)),
|
|
763
|
+
childrenCount = _useState6[0];
|
|
758
764
|
|
|
759
765
|
if (!id) {
|
|
760
|
-
throw new Error(
|
|
766
|
+
throw new Error("You need to provide an ID to the context menu");
|
|
761
767
|
}
|
|
762
768
|
|
|
763
769
|
var onArrowNavigation = function onArrowNavigation(event) {
|
|
@@ -765,14 +771,14 @@ var ContextMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
765
771
|
setFocusedContextMenuItem(selectedContextMenuItem);
|
|
766
772
|
}
|
|
767
773
|
|
|
768
|
-
var codesToPrevenDefault = [
|
|
774
|
+
var codesToPrevenDefault = ["ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Enter", "Space", "Escape", "End", "Home"];
|
|
769
775
|
|
|
770
776
|
if (codesToPrevenDefault.includes(event.code)) {
|
|
771
777
|
event.preventDefault();
|
|
772
778
|
}
|
|
773
779
|
|
|
774
780
|
switch (event.code) {
|
|
775
|
-
case
|
|
781
|
+
case "ArrowDown":
|
|
776
782
|
if (!showContextMenu) {
|
|
777
783
|
setShowContextMenu(true);
|
|
778
784
|
return;
|
|
@@ -783,14 +789,14 @@ var ContextMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
783
789
|
});
|
|
784
790
|
return;
|
|
785
791
|
|
|
786
|
-
case
|
|
792
|
+
case "ArrowUp":
|
|
787
793
|
setFocusedContextMenuItem(function (prevState) {
|
|
788
794
|
return prevState - 1 < 0 ? childrenCount - 1 : prevState - 1;
|
|
789
795
|
});
|
|
790
796
|
return;
|
|
791
797
|
|
|
792
|
-
case
|
|
793
|
-
case
|
|
798
|
+
case "Enter":
|
|
799
|
+
case "Space":
|
|
794
800
|
if (!showContextMenu) {
|
|
795
801
|
setShowContextMenu(true);
|
|
796
802
|
return;
|
|
@@ -801,23 +807,23 @@ var ContextMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
801
807
|
setShowContextMenu(false);
|
|
802
808
|
return;
|
|
803
809
|
|
|
804
|
-
case
|
|
805
|
-
case
|
|
810
|
+
case "Tab":
|
|
811
|
+
case "Escape":
|
|
806
812
|
setShowContextMenu(false);
|
|
807
813
|
return;
|
|
808
814
|
|
|
809
|
-
case
|
|
815
|
+
case "End":
|
|
810
816
|
setFocusedContextMenuItem(childrenCount - 1);
|
|
811
817
|
return;
|
|
812
818
|
|
|
813
|
-
case
|
|
819
|
+
case "Home":
|
|
814
820
|
setFocusedContextMenuItem(0);
|
|
815
821
|
return;
|
|
816
822
|
}
|
|
817
823
|
};
|
|
818
824
|
|
|
819
825
|
useBodyClick(function (event) {
|
|
820
|
-
return showContextMenu && anchorEl.current !== event.target;
|
|
826
|
+
return showContextMenu && anchorEl.current !== event.target && anchorEl.current !== event.target.parentElement;
|
|
821
827
|
}, function () {
|
|
822
828
|
setShowContextMenu(false);
|
|
823
829
|
}, showContextMenu);
|
|
@@ -826,17 +832,18 @@ var ContextMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
826
832
|
onShow && onShow();
|
|
827
833
|
} else {
|
|
828
834
|
onClose && onClose();
|
|
835
|
+
!hasBeenClosed && setHasBeenClosed(true);
|
|
829
836
|
setFocusedContextMenuItem(-1);
|
|
830
|
-
anchorEl.current && anchorEl.current.focus();
|
|
837
|
+
hasBeenClosed && anchorEl.current && anchorEl.current.focus();
|
|
831
838
|
}
|
|
832
839
|
}, [showContextMenu]);
|
|
833
840
|
|
|
834
841
|
var renderTrigger = function renderTrigger() {
|
|
835
842
|
return React.cloneElement(trigger, {
|
|
836
843
|
id: id,
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
844
|
+
"aria-haspopup": "true",
|
|
845
|
+
"aria-controls": id + "-menu",
|
|
846
|
+
"aria-expanded": showContextMenu,
|
|
840
847
|
onClick: function onClick() {
|
|
841
848
|
return setShowContextMenu(!showContextMenu);
|
|
842
849
|
},
|
|
@@ -867,7 +874,7 @@ var ContextMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
867
874
|
return React.createElement("div", _extends({}, rest, {
|
|
868
875
|
ref: ref,
|
|
869
876
|
onKeyDown: onArrowNavigation,
|
|
870
|
-
className: modules_846e6042[
|
|
877
|
+
className: modules_846e6042["context-menu"]
|
|
871
878
|
}), renderTrigger(), createPortal(React.createElement(Popover, {
|
|
872
879
|
placement: placement,
|
|
873
880
|
transformOrigin: transformOrigin,
|
|
@@ -875,7 +882,7 @@ var ContextMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
875
882
|
anchorEl: anchorEl,
|
|
876
883
|
show: showContextMenu
|
|
877
884
|
}, React.createElement("ul", {
|
|
878
|
-
className: modules_846e6042[
|
|
885
|
+
className: modules_846e6042["menu"],
|
|
879
886
|
id: id + "-menu",
|
|
880
887
|
"aria-describedby": id,
|
|
881
888
|
role: "menu"
|
|
@@ -886,7 +893,7 @@ var css$P = ".ContextMenuItem_module_contextMenuItem__612daeb6 {\n position: re
|
|
|
886
893
|
var modules_3e93850e = {"context-menu-item":"ContextMenuItem_module_contextMenuItem__612daeb6"};
|
|
887
894
|
n(css$P,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
888
895
|
|
|
889
|
-
var _excluded$R = ["children", "onClick", "onFocusChange", "onSelectedChange", "hasFocus", "isSelected", "childIndex", "contextMenuOpened", "shouldClick"];
|
|
896
|
+
var _excluded$R = ["children", "onClick", "onFocusChange", "onSelectedChange", "hasFocus", "isSelected", "childIndex", "contextMenuOpened", "shouldClick", "className"];
|
|
890
897
|
var ContextMenuItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
891
898
|
var children = _ref.children,
|
|
892
899
|
_onClick = _ref.onClick,
|
|
@@ -897,6 +904,7 @@ var ContextMenuItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
897
904
|
childIndex = _ref.childIndex,
|
|
898
905
|
contextMenuOpened = _ref.contextMenuOpened,
|
|
899
906
|
shouldClick = _ref.shouldClick,
|
|
907
|
+
className = _ref.className,
|
|
900
908
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$R);
|
|
901
909
|
|
|
902
910
|
var innerButtonRef = ref || createRef();
|
|
@@ -912,11 +920,14 @@ var ContextMenuItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
912
920
|
}
|
|
913
921
|
}, [hasFocus, innerButtonRef, contextMenuOpened]);
|
|
914
922
|
return React.createElement("li", {
|
|
915
|
-
role: "
|
|
916
|
-
className: modules_3e93850e[
|
|
917
|
-
}, React.createElement("button", _extends({
|
|
923
|
+
role: "none",
|
|
924
|
+
className: modules_3e93850e["context-menu-item"] + " " + (className != null ? className : "")
|
|
925
|
+
}, React.createElement("button", _extends({
|
|
926
|
+
role: "menuitem"
|
|
927
|
+
}, rest, {
|
|
918
928
|
ref: innerButtonRef,
|
|
919
929
|
"data-focus": hasFocus,
|
|
930
|
+
tabIndex: -1,
|
|
920
931
|
onClick: function onClick(event) {
|
|
921
932
|
_onClick && _onClick(event);
|
|
922
933
|
onSelectedChange && childIndex && onSelectedChange(childIndex);
|
|
@@ -936,13 +947,13 @@ var Link = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
936
947
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
937
948
|
to = _ref.to,
|
|
938
949
|
_ref$color = _ref.color,
|
|
939
|
-
color = _ref$color === void 0 ?
|
|
950
|
+
color = _ref$color === void 0 ? "primary" : _ref$color,
|
|
940
951
|
_ref$type = _ref.type,
|
|
941
|
-
type = _ref$type === void 0 ?
|
|
952
|
+
type = _ref$type === void 0 ? "internal" : _ref$type,
|
|
942
953
|
_ref$display = _ref.display,
|
|
943
|
-
display = _ref$display === void 0 ?
|
|
954
|
+
display = _ref$display === void 0 ? "link" : _ref$display,
|
|
944
955
|
_ref$buttonVariant = _ref.buttonVariant,
|
|
945
|
-
buttonVariant = _ref$buttonVariant === void 0 ?
|
|
956
|
+
buttonVariant = _ref$buttonVariant === void 0 ? "fill" : _ref$buttonVariant,
|
|
946
957
|
component = _ref.component,
|
|
947
958
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$Q);
|
|
948
959
|
|
|
@@ -951,25 +962,25 @@ var Link = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
951
962
|
return rest.target;
|
|
952
963
|
}
|
|
953
964
|
|
|
954
|
-
if (type ===
|
|
955
|
-
return
|
|
965
|
+
if (type === "external") {
|
|
966
|
+
return "_blank";
|
|
956
967
|
}
|
|
957
968
|
|
|
958
|
-
return
|
|
969
|
+
return "";
|
|
959
970
|
};
|
|
960
971
|
|
|
961
972
|
var classNames = [modules_e20967e9[color]];
|
|
962
|
-
display ===
|
|
963
|
-
display ===
|
|
964
|
-
disabled && classNames.push(modules_e20967e9[
|
|
973
|
+
display === "link" && classNames.push(modules_e20967e9["link"]);
|
|
974
|
+
display === "button" && classNames.push(modules_e20967e9["button"], modules_e20967e9[buttonVariant]);
|
|
975
|
+
disabled && classNames.push(modules_e20967e9["disabled"]);
|
|
965
976
|
className && classNames.push(className);
|
|
966
977
|
|
|
967
978
|
if (component) {
|
|
968
979
|
return React.createElement(component, _extends({}, rest, {
|
|
969
980
|
ref: ref,
|
|
970
981
|
to: to,
|
|
971
|
-
className: classNames.join(
|
|
972
|
-
|
|
982
|
+
className: classNames.join(" "),
|
|
983
|
+
"aria-disabled": disabled,
|
|
973
984
|
style: _extends({}, rest.style),
|
|
974
985
|
children: children
|
|
975
986
|
}));
|
|
@@ -977,10 +988,10 @@ var Link = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
977
988
|
|
|
978
989
|
return React.createElement("a", _extends({}, rest, {
|
|
979
990
|
ref: ref,
|
|
980
|
-
download: type ===
|
|
981
|
-
rel: type ===
|
|
991
|
+
download: type === "download",
|
|
992
|
+
rel: type === "external" ? "noopener noreferer" : undefined,
|
|
982
993
|
href: !disabled ? to : undefined,
|
|
983
|
-
className: classNames.join(
|
|
994
|
+
className: classNames.join(" "),
|
|
984
995
|
"aria-disabled": disabled,
|
|
985
996
|
target: determineTarget(),
|
|
986
997
|
style: _extends({}, rest.style)
|
|
@@ -999,11 +1010,11 @@ var _excluded$P = ["children", "color", "variant", "iconSize", "title", "classNa
|
|
|
999
1010
|
var IconButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1000
1011
|
var children = _ref.children,
|
|
1001
1012
|
_ref$color = _ref.color,
|
|
1002
|
-
color = _ref$color === void 0 ?
|
|
1013
|
+
color = _ref$color === void 0 ? "primary" : _ref$color,
|
|
1003
1014
|
_ref$variant = _ref.variant,
|
|
1004
|
-
variant = _ref$variant === void 0 ?
|
|
1015
|
+
variant = _ref$variant === void 0 ? "text" : _ref$variant,
|
|
1005
1016
|
_ref$iconSize = _ref.iconSize,
|
|
1006
|
-
iconSize = _ref$iconSize === void 0 ?
|
|
1017
|
+
iconSize = _ref$iconSize === void 0 ? "m" : _ref$iconSize,
|
|
1007
1018
|
title = _ref.title,
|
|
1008
1019
|
className = _ref.className,
|
|
1009
1020
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$P);
|
|
@@ -1012,7 +1023,7 @@ var IconButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1012
1023
|
console.error("Please make sure to specify a 'title' prop to your IconButton component! ");
|
|
1013
1024
|
}
|
|
1014
1025
|
|
|
1015
|
-
var iconButtonClasses = [modules_f7edfa2f[
|
|
1026
|
+
var iconButtonClasses = [modules_f7edfa2f["icon-button"], modules_f7edfa2f[variant], modules_f7edfa2f[color], modules_f7edfa2f["button-" + iconSize]];
|
|
1016
1027
|
|
|
1017
1028
|
if (className) {
|
|
1018
1029
|
iconButtonClasses.push(className);
|
|
@@ -1020,9 +1031,9 @@ var IconButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1020
1031
|
|
|
1021
1032
|
return React.createElement(BaseButton, _extends({}, rest, {
|
|
1022
1033
|
ref: ref,
|
|
1023
|
-
className: iconButtonClasses.join(
|
|
1034
|
+
className: iconButtonClasses.join(" ")
|
|
1024
1035
|
}), React.createElement(Fragment, null, children, React.createElement("span", {
|
|
1025
|
-
className: modules_35a251a6[
|
|
1036
|
+
className: modules_35a251a6["sr-only"]
|
|
1026
1037
|
}, title)));
|
|
1027
1038
|
});
|
|
1028
1039
|
|
|
@@ -1036,12 +1047,12 @@ var generateID = function generateID(length, stringToWeaveIn) {
|
|
|
1036
1047
|
}
|
|
1037
1048
|
|
|
1038
1049
|
/** We will make sure to mesh the generate id and name property together to basically create a unique ID */
|
|
1039
|
-
var hashCharacters = [
|
|
1040
|
-
var id =
|
|
1050
|
+
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"];
|
|
1051
|
+
var id = "";
|
|
1041
1052
|
/** Generate an id of x characters in length */
|
|
1042
1053
|
|
|
1043
1054
|
for (var i = 0; i < length && id.length < length; i++) {
|
|
1044
|
-
var stringCharacter = stringToWeaveIn && stringToWeaveIn[i] !== undefined && !/\s/.test(stringToWeaveIn[i]) ? stringToWeaveIn[i] :
|
|
1055
|
+
var stringCharacter = stringToWeaveIn && stringToWeaveIn[i] !== undefined && !/\s/.test(stringToWeaveIn[i]) ? stringToWeaveIn[i] : "";
|
|
1045
1056
|
id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];
|
|
1046
1057
|
}
|
|
1047
1058
|
|
|
@@ -1094,14 +1105,14 @@ var TabButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1094
1105
|
ref.current.focus();
|
|
1095
1106
|
}
|
|
1096
1107
|
}, [focussed]);
|
|
1097
|
-
var classNames = [modules_1ddb33b5[
|
|
1098
|
-
selected && classNames.push(modules_1ddb33b5[
|
|
1099
|
-
focussed && !selected && classNames.push(modules_1ddb33b5[
|
|
1108
|
+
var classNames = [modules_1ddb33b5["tabbutton"]];
|
|
1109
|
+
selected && classNames.push(modules_1ddb33b5["selected"]);
|
|
1110
|
+
focussed && !selected && classNames.push(modules_1ddb33b5["focussed"]);
|
|
1100
1111
|
className && classNames.push(className);
|
|
1101
1112
|
return React.createElement("button", _extends({}, rest, {
|
|
1102
1113
|
"aria-selected": selected,
|
|
1103
1114
|
key: tabId,
|
|
1104
|
-
className: classNames.join(
|
|
1115
|
+
className: classNames.join(" "),
|
|
1105
1116
|
ref: ref,
|
|
1106
1117
|
role: "tab",
|
|
1107
1118
|
tabIndex: selected ? 0 : -1,
|
|
@@ -1131,7 +1142,7 @@ var TabPanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1131
1142
|
return React.createElement("div", _extends({}, rest, {
|
|
1132
1143
|
ref: ref,
|
|
1133
1144
|
"aria-labelledby": tabId,
|
|
1134
|
-
className: modules_06ac598d[
|
|
1145
|
+
className: modules_06ac598d["tabpanel"] + " " + (selected ? modules_06ac598d["selected"] : "") + " " + (className != null ? className : ""),
|
|
1135
1146
|
id: tabPanelId,
|
|
1136
1147
|
role: "tabpanel",
|
|
1137
1148
|
tabIndex: 0,
|
|
@@ -1149,7 +1160,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
1149
1160
|
var children = _ref.children,
|
|
1150
1161
|
_ref$selected = _ref.selected,
|
|
1151
1162
|
selected = _ref$selected === void 0 ? 0 : _ref$selected,
|
|
1152
|
-
ariaLabel = _ref[
|
|
1163
|
+
ariaLabel = _ref["aria-label"],
|
|
1153
1164
|
onTabChange = _ref.onTabChange,
|
|
1154
1165
|
className = _ref.className,
|
|
1155
1166
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$M);
|
|
@@ -1212,24 +1223,24 @@ var Tabs = function Tabs(_ref) {
|
|
|
1212
1223
|
var currentFocussedTab = focussedTab === -1 ? selectedTab : focussedTab;
|
|
1213
1224
|
|
|
1214
1225
|
switch (e.code) {
|
|
1215
|
-
case
|
|
1226
|
+
case "ArrowLeft":
|
|
1216
1227
|
setFocussedTab(currentFocussedTab === min ? max : currentFocussedTab - 1);
|
|
1217
1228
|
break;
|
|
1218
1229
|
|
|
1219
|
-
case
|
|
1230
|
+
case "ArrowRight":
|
|
1220
1231
|
setFocussedTab(currentFocussedTab === max ? min : currentFocussedTab + 1);
|
|
1221
1232
|
break;
|
|
1222
1233
|
|
|
1223
|
-
case
|
|
1234
|
+
case "Home":
|
|
1224
1235
|
setFocussedTab(min);
|
|
1225
1236
|
break;
|
|
1226
1237
|
|
|
1227
|
-
case
|
|
1238
|
+
case "End":
|
|
1228
1239
|
setFocussedTab(max);
|
|
1229
1240
|
break;
|
|
1230
1241
|
|
|
1231
|
-
case
|
|
1232
|
-
case
|
|
1242
|
+
case "Space":
|
|
1243
|
+
case "Enter":
|
|
1233
1244
|
activateTab(currentFocussedTab);
|
|
1234
1245
|
break;
|
|
1235
1246
|
}
|
|
@@ -1270,17 +1281,17 @@ var Tabs = function Tabs(_ref) {
|
|
|
1270
1281
|
});
|
|
1271
1282
|
});
|
|
1272
1283
|
return React.createElement("div", _extends({}, rest, {
|
|
1273
|
-
className: modules_d0cc66ee[
|
|
1284
|
+
className: modules_d0cc66ee["tabs"] + " " + (className != null ? className : "")
|
|
1274
1285
|
}), React.createElement("div", {
|
|
1275
1286
|
role: "tablist",
|
|
1276
1287
|
onKeyDown: handleKeyDown,
|
|
1277
1288
|
onBlur: handleBlur,
|
|
1278
1289
|
"aria-label": ariaLabel,
|
|
1279
|
-
className: modules_d0cc66ee[
|
|
1290
|
+
className: modules_d0cc66ee["tablist"]
|
|
1280
1291
|
}, React.createElement("div", {
|
|
1281
|
-
className: modules_d0cc66ee[
|
|
1292
|
+
className: modules_d0cc66ee["tabdivider"]
|
|
1282
1293
|
}), tabButtons, React.createElement("div", {
|
|
1283
|
-
className: modules_d0cc66ee[
|
|
1294
|
+
className: modules_d0cc66ee["indicator"],
|
|
1284
1295
|
ref: indicatorRef,
|
|
1285
1296
|
"aria-hidden": "true",
|
|
1286
1297
|
tabIndex: -1,
|
|
@@ -1288,7 +1299,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
1288
1299
|
width: indicatorWidth
|
|
1289
1300
|
}, indicatorPosition)
|
|
1290
1301
|
})), React.createElement("div", {
|
|
1291
|
-
className: modules_d0cc66ee[
|
|
1302
|
+
className: modules_d0cc66ee["tabpanels"]
|
|
1292
1303
|
}, tabPanels));
|
|
1293
1304
|
};
|
|
1294
1305
|
|
|
@@ -1328,7 +1339,7 @@ var TextEllipsis = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1328
1339
|
return React.createElement("div", _extends({}, rest, {
|
|
1329
1340
|
onMouseEnter: onMouseEnter,
|
|
1330
1341
|
onMouseLeave: onMouseLeave,
|
|
1331
|
-
className: modules_46535846[
|
|
1342
|
+
className: modules_46535846["text-ellipsis"] + " " + (className != null ? className : ""),
|
|
1332
1343
|
ref: ref || textContainer
|
|
1333
1344
|
}), children, React.createElement(Popover, {
|
|
1334
1345
|
"aria-hidden": true,
|
|
@@ -1336,7 +1347,7 @@ var TextEllipsis = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1336
1347
|
show: showPopover,
|
|
1337
1348
|
role: "tooltip",
|
|
1338
1349
|
anchorEl: textContainer,
|
|
1339
|
-
className: modules_46535846.popover + " " + (popoverClassName != null ? popoverClassName :
|
|
1350
|
+
className: modules_46535846.popover + " " + (popoverClassName != null ? popoverClassName : "")
|
|
1340
1351
|
}, children));
|
|
1341
1352
|
});
|
|
1342
1353
|
|
|
@@ -1358,48 +1369,48 @@ var Tile = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1358
1369
|
tileDescriptionID = _useState[0];
|
|
1359
1370
|
|
|
1360
1371
|
if (!title) {
|
|
1361
|
-
throw new Error(
|
|
1372
|
+
throw new Error("Please make sure to pass a title prop to your Tile component.");
|
|
1362
1373
|
}
|
|
1363
1374
|
|
|
1364
1375
|
var statusMessage = function statusMessage() {
|
|
1365
1376
|
if (enabled) {
|
|
1366
|
-
return
|
|
1377
|
+
return "Status: enabled";
|
|
1367
1378
|
}
|
|
1368
1379
|
|
|
1369
|
-
return
|
|
1380
|
+
return "Status: disabled";
|
|
1370
1381
|
};
|
|
1371
1382
|
|
|
1372
1383
|
return React.createElement("article", _extends({}, rest, {
|
|
1373
1384
|
tabIndex: 0,
|
|
1374
1385
|
"aria-labelledby": tileDescriptionID,
|
|
1375
1386
|
ref: ref,
|
|
1376
|
-
className: modules_5f01ab30[
|
|
1387
|
+
className: modules_5f01ab30["tile"] + " " + (loading ? modules_5f01ab30["loading"] : "")
|
|
1377
1388
|
}), React.createElement("header", {
|
|
1378
1389
|
style: {
|
|
1379
|
-
justifyContent: enabled === undefined ?
|
|
1390
|
+
justifyContent: enabled === undefined ? "flex-end" : "space-between"
|
|
1380
1391
|
}
|
|
1381
1392
|
}, enabled === true && React.createElement(Icon, {
|
|
1382
1393
|
color: "var(--success)",
|
|
1383
1394
|
icon: Icons.Checkmark,
|
|
1384
|
-
className: modules_5f01ab30[
|
|
1395
|
+
className: modules_5f01ab30["icon"] + " " + (className != null ? className : "")
|
|
1385
1396
|
}), enabled === false && React.createElement(Icon, {
|
|
1386
1397
|
color: "var(--greyed-out)",
|
|
1387
1398
|
icon: Icons.Forbidden,
|
|
1388
|
-
className: modules_5f01ab30[
|
|
1399
|
+
className: modules_5f01ab30["icon"] + " " + (className != null ? className : "")
|
|
1389
1400
|
}), enabled !== undefined && React.createElement("span", {
|
|
1390
1401
|
id: tileDescriptionID,
|
|
1391
|
-
className: modules_35a251a6[
|
|
1402
|
+
className: modules_35a251a6["sr-only"]
|
|
1392
1403
|
}, title + ". " + statusMessage()), tileAction != null ? tileAction : null), React.createElement("div", {
|
|
1393
|
-
className: modules_5f01ab30[
|
|
1404
|
+
className: modules_5f01ab30["content"]
|
|
1394
1405
|
}, imageProps && imageProps.src.length > 0 && React.createElement("figure", {
|
|
1395
|
-
className: modules_5f01ab30[
|
|
1406
|
+
className: modules_5f01ab30["image"]
|
|
1396
1407
|
}, !loading && React.createElement("img", _extends({}, imageProps, {
|
|
1397
1408
|
alt: ""
|
|
1398
1409
|
}))), (!imageProps || imageProps.src.length === 0) && React.createElement(Icon, {
|
|
1399
|
-
className: modules_5f01ab30[
|
|
1410
|
+
className: modules_5f01ab30["placeholder"],
|
|
1400
1411
|
icon: Icons.Image
|
|
1401
1412
|
}), React.createElement("span", {
|
|
1402
|
-
className: modules_5f01ab30[
|
|
1413
|
+
className: modules_5f01ab30["title"]
|
|
1403
1414
|
}, title)));
|
|
1404
1415
|
});
|
|
1405
1416
|
|
|
@@ -1421,21 +1432,21 @@ var Tiles = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1421
1432
|
key: "placeholder1",
|
|
1422
1433
|
title: "placeholder",
|
|
1423
1434
|
imageProps: {
|
|
1424
|
-
src:
|
|
1435
|
+
src: "placeholder"
|
|
1425
1436
|
},
|
|
1426
1437
|
loading: true
|
|
1427
1438
|
}), React.createElement(Tile, {
|
|
1428
1439
|
key: "placeholder2",
|
|
1429
1440
|
title: "placeholder",
|
|
1430
1441
|
imageProps: {
|
|
1431
|
-
src:
|
|
1442
|
+
src: "placeholder"
|
|
1432
1443
|
},
|
|
1433
1444
|
loading: true
|
|
1434
1445
|
}), React.createElement(Tile, {
|
|
1435
1446
|
key: "placeholder3",
|
|
1436
1447
|
title: "placeholder",
|
|
1437
1448
|
imageProps: {
|
|
1438
|
-
src:
|
|
1449
|
+
src: "placeholder"
|
|
1439
1450
|
},
|
|
1440
1451
|
loading: true
|
|
1441
1452
|
})];
|
|
@@ -1446,7 +1457,7 @@ var Tiles = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1446
1457
|
|
|
1447
1458
|
return React.createElement("div", _extends({}, rest, {
|
|
1448
1459
|
ref: ref,
|
|
1449
|
-
className: modules_7b7db5f7[
|
|
1460
|
+
className: modules_7b7db5f7["tiles"] + " " + (className != null ? className : ""),
|
|
1450
1461
|
"aria-live": "polite",
|
|
1451
1462
|
"aria-busy": loading
|
|
1452
1463
|
}), renderChildren());
|
|
@@ -1459,8 +1470,8 @@ n(css$F,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
|
1459
1470
|
var _excluded$I = ["children", "className", "placement", "offset", "transformOrigin", "domRoot", "label"];
|
|
1460
1471
|
var defaultPosition = {
|
|
1461
1472
|
placement: {
|
|
1462
|
-
horizontal:
|
|
1463
|
-
vertical:
|
|
1473
|
+
horizontal: "right",
|
|
1474
|
+
vertical: "center"
|
|
1464
1475
|
},
|
|
1465
1476
|
offset: {
|
|
1466
1477
|
left: 16,
|
|
@@ -1469,8 +1480,8 @@ var defaultPosition = {
|
|
|
1469
1480
|
bottom: 0
|
|
1470
1481
|
},
|
|
1471
1482
|
transformOrigin: {
|
|
1472
|
-
horizontal:
|
|
1473
|
-
vertical:
|
|
1483
|
+
horizontal: "left",
|
|
1484
|
+
vertical: "center"
|
|
1474
1485
|
}
|
|
1475
1486
|
};
|
|
1476
1487
|
var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -1514,14 +1525,14 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1514
1525
|
if (!visible) return;
|
|
1515
1526
|
|
|
1516
1527
|
function escapePressHandler(event) {
|
|
1517
|
-
if (event.key ===
|
|
1528
|
+
if (event.key === "Escape") {
|
|
1518
1529
|
setVisible(false);
|
|
1519
1530
|
}
|
|
1520
1531
|
}
|
|
1521
1532
|
|
|
1522
|
-
document.addEventListener(
|
|
1533
|
+
document.addEventListener("keyup", escapePressHandler);
|
|
1523
1534
|
return function () {
|
|
1524
|
-
document.removeEventListener(
|
|
1535
|
+
document.removeEventListener("keyup", escapePressHandler);
|
|
1525
1536
|
};
|
|
1526
1537
|
}, [visible]);
|
|
1527
1538
|
useLayoutEffect(function () {
|
|
@@ -1537,14 +1548,14 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1537
1548
|
onBlur: function onBlur() {
|
|
1538
1549
|
return setVisible(false);
|
|
1539
1550
|
},
|
|
1540
|
-
|
|
1551
|
+
"aria-describedby": identifier,
|
|
1541
1552
|
tabIndex: 0,
|
|
1542
|
-
className: modules_16974fb0[
|
|
1553
|
+
className: modules_16974fb0["label"]
|
|
1543
1554
|
});
|
|
1544
1555
|
}
|
|
1545
1556
|
|
|
1546
1557
|
return React.createElement("span", {
|
|
1547
|
-
className: modules_16974fb0[
|
|
1558
|
+
className: modules_16974fb0["label"],
|
|
1548
1559
|
tabIndex: 0,
|
|
1549
1560
|
onFocus: function onFocus() {
|
|
1550
1561
|
return setVisible(true);
|
|
@@ -1558,9 +1569,9 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1558
1569
|
|
|
1559
1570
|
return React.createElement("div", _extends({}, rest, {
|
|
1560
1571
|
ref: ref,
|
|
1561
|
-
className: modules_16974fb0.wrapper + " " + (className != null ? className :
|
|
1572
|
+
className: modules_16974fb0.wrapper + " " + (className != null ? className : "")
|
|
1562
1573
|
}), renderChildren(), React.createElement("div", {
|
|
1563
|
-
className: "" + modules_16974fb0[
|
|
1574
|
+
className: "" + modules_16974fb0["tooltip-wrapper"]
|
|
1564
1575
|
}, React.createElement(Icon, {
|
|
1565
1576
|
ref: relativeElement,
|
|
1566
1577
|
tag: "div",
|
|
@@ -1582,7 +1593,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1582
1593
|
}),
|
|
1583
1594
|
"aria-hidden": !visible,
|
|
1584
1595
|
id: identifier,
|
|
1585
|
-
className: modules_16974fb0.tooltip + " " + (visible ? modules_16974fb0.visible :
|
|
1596
|
+
className: modules_16974fb0.tooltip + " " + (visible ? modules_16974fb0.visible : "")
|
|
1586
1597
|
}, children), domRoot)));
|
|
1587
1598
|
});
|
|
1588
1599
|
|
|
@@ -1593,17 +1604,17 @@ n(css$E,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
|
1593
1604
|
var _excluded$H = ["variant", "height", "width", "className", "style"];
|
|
1594
1605
|
var Skeleton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1595
1606
|
var _ref$variant = _ref.variant,
|
|
1596
|
-
variant = _ref$variant === void 0 ?
|
|
1607
|
+
variant = _ref$variant === void 0 ? "text" : _ref$variant,
|
|
1597
1608
|
height = _ref.height,
|
|
1598
1609
|
width = _ref.width,
|
|
1599
1610
|
className = _ref.className,
|
|
1600
1611
|
style = _ref.style,
|
|
1601
1612
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
1602
1613
|
|
|
1603
|
-
var classNames = [modules_1fe82d8f[
|
|
1604
|
-
!height && classNames.push(modules_1fe82d8f[
|
|
1605
|
-
variant ===
|
|
1606
|
-
variant ===
|
|
1614
|
+
var classNames = [modules_1fe82d8f["skeleton"]];
|
|
1615
|
+
!height && classNames.push(modules_1fe82d8f["no-height"]);
|
|
1616
|
+
variant === "text" && classNames.push(modules_1fe82d8f["text"]);
|
|
1617
|
+
variant === "circular" && classNames.push(modules_1fe82d8f["circular"]);
|
|
1607
1618
|
className && classNames.push(className);
|
|
1608
1619
|
return React.createElement("span", _extends({}, rest, {
|
|
1609
1620
|
"aria-busy": "true",
|
|
@@ -1613,7 +1624,7 @@ var Skeleton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1613
1624
|
width: width,
|
|
1614
1625
|
height: height
|
|
1615
1626
|
}),
|
|
1616
|
-
className: classNames.join(
|
|
1627
|
+
className: classNames.join(" ")
|
|
1617
1628
|
}));
|
|
1618
1629
|
});
|
|
1619
1630
|
|
|
@@ -1632,29 +1643,78 @@ var StatusIndicator = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1632
1643
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
1633
1644
|
|
|
1634
1645
|
return React.createElement("div", _extends({}, rest, {
|
|
1635
|
-
className: modules_372cb0bf[
|
|
1646
|
+
className: modules_372cb0bf["status-indicator"],
|
|
1636
1647
|
ref: ref
|
|
1637
1648
|
}), React.createElement("div", {
|
|
1638
|
-
className: modules_372cb0bf[
|
|
1649
|
+
className: modules_372cb0bf["status-badge"] + " " + modules_372cb0bf[status] + " " + ((_badgeProps$className = badgeProps == null ? void 0 : badgeProps.className) != null ? _badgeProps$className : "")
|
|
1639
1650
|
}), React.createElement(Typography, _extends({}, typographyProps, {
|
|
1640
1651
|
spacing: {
|
|
1641
|
-
margin:
|
|
1652
|
+
margin: "0"
|
|
1642
1653
|
},
|
|
1643
1654
|
variant: "body",
|
|
1644
1655
|
tag: "div"
|
|
1645
1656
|
}), (typographyProps == null ? void 0 : typographyProps.children) || children));
|
|
1646
1657
|
});
|
|
1647
1658
|
|
|
1648
|
-
var css$C = ".
|
|
1649
|
-
var modules_e3c5bce1 = {"pagination-wrapper":"
|
|
1659
|
+
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}";
|
|
1660
|
+
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"};
|
|
1650
1661
|
n(css$C,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1651
1662
|
|
|
1652
|
-
var css$B = ".
|
|
1653
|
-
var modules_23691de0 = {"input-wrapper":"
|
|
1663
|
+
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}";
|
|
1664
|
+
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"};
|
|
1654
1665
|
n(css$B,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1655
1666
|
|
|
1656
1667
|
var _excluded$F = ["error", "className", "name", "style", "wrapperProps", "type", "labeledBy", "prefix", "suffix", "disabled", "onFocus", "onBlur"];
|
|
1657
|
-
var dateTypes = [
|
|
1668
|
+
var dateTypes = ["date", "time", "datetime-local"];
|
|
1669
|
+
|
|
1670
|
+
var useErrorOffset = function useErrorOffset(suffix, errorIcon, inputWrapper, error, type, suffixContent) {
|
|
1671
|
+
if (suffixContent === void 0) {
|
|
1672
|
+
suffixContent = "";
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
var _useState = useState({}),
|
|
1676
|
+
errorOffset = _useState[0],
|
|
1677
|
+
setErrorOffset = _useState[1];
|
|
1678
|
+
|
|
1679
|
+
var _useState2 = useState(null),
|
|
1680
|
+
defaultErrorOffset = _useState2[0],
|
|
1681
|
+
setDefaultErrorOffset = _useState2[1];
|
|
1682
|
+
|
|
1683
|
+
var getErrorIconOffset = function getErrorIconOffset() {
|
|
1684
|
+
return parseFloat(getComputedStyle(errorIcon.current).right);
|
|
1685
|
+
};
|
|
1686
|
+
|
|
1687
|
+
var getInputPaddingRight = function getInputPaddingRight(input) {
|
|
1688
|
+
return dateTypes.includes(type) ? 0 : parseFloat(getComputedStyle(input).paddingRight);
|
|
1689
|
+
};
|
|
1690
|
+
|
|
1691
|
+
useEffect(function () {
|
|
1692
|
+
if (errorIcon.current && inputWrapper.current) {
|
|
1693
|
+
var defaultOffset = defaultErrorOffset;
|
|
1694
|
+
|
|
1695
|
+
if (!defaultOffset) {
|
|
1696
|
+
defaultOffset = getErrorIconOffset();
|
|
1697
|
+
setDefaultErrorOffset(defaultOffset);
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
if (suffix.current && suffixContent) {
|
|
1701
|
+
var inputPaddingRight = getInputPaddingRight(inputWrapper.current);
|
|
1702
|
+
var prefixDifference = suffix.current.offsetWidth + inputPaddingRight + defaultOffset;
|
|
1703
|
+
setErrorOffset({
|
|
1704
|
+
right: prefixDifference + "px"
|
|
1705
|
+
});
|
|
1706
|
+
} else {
|
|
1707
|
+
setErrorOffset({
|
|
1708
|
+
right: defaultOffset + "px"
|
|
1709
|
+
});
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
}, [suffix.current, errorIcon.current, inputWrapper.current, error, type, suffixContent]);
|
|
1713
|
+
return {
|
|
1714
|
+
errorOffset: errorOffset
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
|
|
1658
1718
|
var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1659
1719
|
var _ref$error = _ref.error,
|
|
1660
1720
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
@@ -1671,34 +1731,44 @@ var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1671
1731
|
_onBlur = _ref.onBlur,
|
|
1672
1732
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
1673
1733
|
|
|
1674
|
-
var
|
|
1675
|
-
focus =
|
|
1676
|
-
setFocus =
|
|
1734
|
+
var _useState3 = useState(false),
|
|
1735
|
+
focus = _useState3[0],
|
|
1736
|
+
setFocus = _useState3[1];
|
|
1737
|
+
|
|
1738
|
+
var inputWrapperRef = useRef(null);
|
|
1739
|
+
var errorIconRef = useRef(null);
|
|
1740
|
+
var suffixRef = useRef(null);
|
|
1741
|
+
|
|
1742
|
+
var _useErrorOffset = useErrorOffset(suffixRef, errorIconRef, inputWrapperRef, error, type, suffix),
|
|
1743
|
+
errorOffset = _useErrorOffset.errorOffset;
|
|
1677
1744
|
|
|
1678
1745
|
useEffect(function () {
|
|
1679
1746
|
if (name === undefined) {
|
|
1680
1747
|
throw new Error("Please give your <Input /> component a 'name' attribute");
|
|
1681
1748
|
}
|
|
1682
1749
|
}, []);
|
|
1683
|
-
var inputClassNames = [modules_23691de0[
|
|
1684
|
-
dateTypes.includes(type) && inputClassNames.push(modules_23691de0[
|
|
1750
|
+
var inputClassNames = [modules_23691de0["input"]];
|
|
1751
|
+
dateTypes.includes(type) && inputClassNames.push(modules_23691de0["remove-extra-indent"]);
|
|
1685
1752
|
className && inputClassNames.push(className);
|
|
1686
|
-
var iconClassNames = [modules_23691de0[
|
|
1687
|
-
dateTypes.includes(type) && iconClassNames.push(modules_23691de0[
|
|
1688
|
-
var wrapperClasses = [modules_23691de0[
|
|
1753
|
+
var iconClassNames = [modules_23691de0["warning"]];
|
|
1754
|
+
dateTypes.includes(type) && iconClassNames.push(modules_23691de0["extra-indent"]);
|
|
1755
|
+
var wrapperClasses = [modules_23691de0["input-wrapper"]];
|
|
1756
|
+
var outlineClasses = [modules_23691de0["outline"]];
|
|
1689
1757
|
(wrapperProps == null ? void 0 : wrapperProps.className) && wrapperClasses.push(wrapperProps.className);
|
|
1690
|
-
type ===
|
|
1691
|
-
prefix && wrapperClasses.push(modules_23691de0[
|
|
1692
|
-
suffix && wrapperClasses.push(modules_23691de0[
|
|
1693
|
-
disabled && wrapperClasses.push(modules_23691de0[
|
|
1694
|
-
error && wrapperClasses.push(modules_23691de0[
|
|
1695
|
-
focus && wrapperClasses.push(modules_23691de0[
|
|
1696
|
-
return React.createElement("div", _extends({
|
|
1758
|
+
type === "hidden" && wrapperClasses.push(modules_35a251a6["hidden"]);
|
|
1759
|
+
prefix && wrapperClasses.push(modules_23691de0["prefix"]);
|
|
1760
|
+
suffix && wrapperClasses.push(modules_23691de0["suffix"]);
|
|
1761
|
+
disabled && wrapperClasses.push(modules_23691de0["disabled"]) && outlineClasses.push(modules_23691de0["disabled"]);
|
|
1762
|
+
error && wrapperClasses.push(modules_23691de0["error"]) && outlineClasses.push(modules_23691de0["error"]);
|
|
1763
|
+
focus && wrapperClasses.push(modules_23691de0["focus"]) && outlineClasses.push(modules_23691de0["focus"]);
|
|
1764
|
+
return React.createElement("div", _extends({
|
|
1765
|
+
ref: inputWrapperRef
|
|
1766
|
+
}, wrapperProps, {
|
|
1697
1767
|
style: _extends({}, style),
|
|
1698
|
-
className: modules_23691de0[
|
|
1768
|
+
className: modules_23691de0["input-wrapper"] + " " + wrapperClasses.join(" ")
|
|
1699
1769
|
}), prefix && React.createElement("div", {
|
|
1700
1770
|
"data-prefix": true,
|
|
1701
|
-
className: modules_23691de0[
|
|
1771
|
+
className: modules_23691de0["prefix"]
|
|
1702
1772
|
}, React.createElement("span", null, prefix)), React.createElement("input", _extends({}, rest, {
|
|
1703
1773
|
ref: ref,
|
|
1704
1774
|
onFocus: function onFocus(event) {
|
|
@@ -1713,18 +1783,23 @@ var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1713
1783
|
type: type,
|
|
1714
1784
|
name: name,
|
|
1715
1785
|
disabled: disabled,
|
|
1716
|
-
className: inputClassNames.join(
|
|
1786
|
+
className: inputClassNames.join(" ")
|
|
1717
1787
|
})), suffix && React.createElement("div", {
|
|
1788
|
+
ref: suffixRef,
|
|
1718
1789
|
"data-suffix": true,
|
|
1719
|
-
className: modules_23691de0[
|
|
1790
|
+
className: modules_23691de0["suffix"]
|
|
1720
1791
|
}, React.createElement("span", null, suffix)), error && React.createElement(Icon, {
|
|
1721
|
-
|
|
1792
|
+
style: errorOffset,
|
|
1793
|
+
ref: errorIconRef,
|
|
1794
|
+
className: iconClassNames.join(" "),
|
|
1722
1795
|
icon: Icons.Error
|
|
1796
|
+
}), React.createElement("span", {
|
|
1797
|
+
className: outlineClasses.join(" ")
|
|
1723
1798
|
}));
|
|
1724
1799
|
});
|
|
1725
1800
|
|
|
1726
|
-
var css$A = ".
|
|
1727
|
-
var modules_7db85bb8 = {"sr-only":"
|
|
1801
|
+
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}";
|
|
1802
|
+
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"};
|
|
1728
1803
|
n(css$A,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1729
1804
|
|
|
1730
1805
|
var _excluded$E = ["children", "name", "disabled", "labeledBy", "placeholder", "describedBy", "searchPlaceholder", "searchInputProps", "selectButtonProps", "className", "error", "value", "clearLabel", "onChange", "onClear"];
|
|
@@ -1740,7 +1815,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1740
1815
|
placeholder = _ref.placeholder,
|
|
1741
1816
|
describedBy = _ref.describedBy,
|
|
1742
1817
|
_ref$searchPlaceholde = _ref.searchPlaceholder,
|
|
1743
|
-
searchPlaceholder = _ref$searchPlaceholde === void 0 ?
|
|
1818
|
+
searchPlaceholder = _ref$searchPlaceholde === void 0 ? "Search item" : _ref$searchPlaceholde,
|
|
1744
1819
|
searchInputProps = _ref.searchInputProps,
|
|
1745
1820
|
selectButtonProps = _ref.selectButtonProps,
|
|
1746
1821
|
className = _ref.className,
|
|
@@ -1748,7 +1823,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1748
1823
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
1749
1824
|
value = _ref.value,
|
|
1750
1825
|
_ref$clearLabel = _ref.clearLabel,
|
|
1751
|
-
clearLabel = _ref$clearLabel === void 0 ?
|
|
1826
|
+
clearLabel = _ref$clearLabel === void 0 ? "Clear selection" : _ref$clearLabel,
|
|
1752
1827
|
onChange = _ref.onChange,
|
|
1753
1828
|
onClear = _ref.onClear,
|
|
1754
1829
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
@@ -1762,11 +1837,11 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1762
1837
|
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.
|
|
1763
1838
|
|
|
1764
1839
|
|
|
1765
|
-
var _useState3 = useState(
|
|
1840
|
+
var _useState3 = useState(""),
|
|
1766
1841
|
filter = _useState3[0],
|
|
1767
1842
|
setFilter = _useState3[1];
|
|
1768
1843
|
|
|
1769
|
-
var _useState4 = useState(
|
|
1844
|
+
var _useState4 = useState(""),
|
|
1770
1845
|
display = _useState4[0],
|
|
1771
1846
|
setDisplay = _useState4[1];
|
|
1772
1847
|
|
|
@@ -1774,7 +1849,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1774
1849
|
listPosition = _useState5[0],
|
|
1775
1850
|
setListPosition = _useState5[1];
|
|
1776
1851
|
|
|
1777
|
-
var _useState6 = useState(
|
|
1852
|
+
var _useState6 = useState("none"),
|
|
1778
1853
|
optionsListMaxHeight = _useState6[0],
|
|
1779
1854
|
setOptionsListMaxHeight = _useState6[1];
|
|
1780
1855
|
|
|
@@ -1802,12 +1877,12 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1802
1877
|
var searchInputRef = useRef(null);
|
|
1803
1878
|
|
|
1804
1879
|
var onArrowNavigation = function onArrowNavigation(event) {
|
|
1805
|
-
var codesToPreventDefault = [
|
|
1806
|
-
var codesToPreventDefaultWhenSearching = [
|
|
1880
|
+
var codesToPreventDefault = ["ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Space", "Escape", "End", "Home"];
|
|
1881
|
+
var codesToPreventDefaultWhenSearching = ["ArrowDown", "ArrowUp", "Enter", "Escape"];
|
|
1807
1882
|
/** If the select is expanded, we also want to control the Tab key */
|
|
1808
1883
|
|
|
1809
1884
|
if (expanded) {
|
|
1810
|
-
codesToPreventDefault.push(
|
|
1885
|
+
codesToPreventDefault.push("Tab");
|
|
1811
1886
|
}
|
|
1812
1887
|
/** We will handle the way certain key strokes affect the Select, unless we're searching */
|
|
1813
1888
|
|
|
@@ -1822,26 +1897,26 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1822
1897
|
|
|
1823
1898
|
if (isSearching) {
|
|
1824
1899
|
switch (event.code) {
|
|
1825
|
-
case
|
|
1826
|
-
case
|
|
1900
|
+
case "ArrowDown":
|
|
1901
|
+
case "Enter":
|
|
1827
1902
|
setIsSearching(false);
|
|
1828
1903
|
setFocusedSelectItem(0);
|
|
1829
1904
|
return;
|
|
1830
1905
|
|
|
1831
|
-
case
|
|
1906
|
+
case "ArrowUp":
|
|
1832
1907
|
setIsSearching(false);
|
|
1833
1908
|
setFocusedSelectItem(childrenCount - 1);
|
|
1834
1909
|
return;
|
|
1835
1910
|
|
|
1836
|
-
case
|
|
1837
|
-
case
|
|
1911
|
+
case "Escape":
|
|
1912
|
+
case "Tab":
|
|
1838
1913
|
setIsSearching(false);
|
|
1839
1914
|
setExpanded(false);
|
|
1840
|
-
containerReference.current && containerReference.current.querySelector(
|
|
1915
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
1841
1916
|
}
|
|
1842
1917
|
} else {
|
|
1843
1918
|
switch (event.code) {
|
|
1844
|
-
case
|
|
1919
|
+
case "ArrowDown":
|
|
1845
1920
|
if (!expanded) {
|
|
1846
1921
|
setExpanded(true);
|
|
1847
1922
|
return;
|
|
@@ -1852,13 +1927,13 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1852
1927
|
});
|
|
1853
1928
|
return;
|
|
1854
1929
|
|
|
1855
|
-
case
|
|
1930
|
+
case "ArrowUp":
|
|
1856
1931
|
setFocusedSelectItem(function (prevState) {
|
|
1857
1932
|
return prevState - 1 < 0 ? childrenCount - 1 : prevState - 1;
|
|
1858
1933
|
});
|
|
1859
1934
|
return;
|
|
1860
1935
|
|
|
1861
|
-
case
|
|
1936
|
+
case "Space":
|
|
1862
1937
|
if (!expanded) {
|
|
1863
1938
|
setExpanded(true);
|
|
1864
1939
|
return;
|
|
@@ -1866,10 +1941,10 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1866
1941
|
|
|
1867
1942
|
setShouldClick(true);
|
|
1868
1943
|
setExpanded(false);
|
|
1869
|
-
containerReference.current && containerReference.current.querySelector(
|
|
1944
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
1870
1945
|
return;
|
|
1871
1946
|
|
|
1872
|
-
case
|
|
1947
|
+
case "Tab":
|
|
1873
1948
|
if (childrenCount >= renderSearchCondition && expanded) {
|
|
1874
1949
|
setIsSearching(true);
|
|
1875
1950
|
searchInputRef.current && searchInputRef.current.focus();
|
|
@@ -1879,19 +1954,19 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1879
1954
|
setExpanded(false);
|
|
1880
1955
|
return;
|
|
1881
1956
|
|
|
1882
|
-
case
|
|
1957
|
+
case "Escape":
|
|
1883
1958
|
if (expanded) {
|
|
1884
1959
|
setExpanded(false);
|
|
1885
|
-
containerReference.current && containerReference.current.querySelector(
|
|
1960
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
1886
1961
|
}
|
|
1887
1962
|
|
|
1888
1963
|
return;
|
|
1889
1964
|
|
|
1890
|
-
case
|
|
1965
|
+
case "End":
|
|
1891
1966
|
setFocusedSelectItem(childrenCount - 1);
|
|
1892
1967
|
return;
|
|
1893
1968
|
|
|
1894
|
-
case
|
|
1969
|
+
case "Home":
|
|
1895
1970
|
setFocusedSelectItem(0);
|
|
1896
1971
|
return;
|
|
1897
1972
|
}
|
|
@@ -1919,12 +1994,12 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1919
1994
|
|
|
1920
1995
|
var position = {
|
|
1921
1996
|
top: 0,
|
|
1922
|
-
bottom:
|
|
1997
|
+
bottom: "initial"
|
|
1923
1998
|
}; // Set the position of the select
|
|
1924
1999
|
|
|
1925
2000
|
if (spaceOnTopOfSelect > spaceOnBottomOfSelect) {
|
|
1926
2001
|
position = {
|
|
1927
|
-
top:
|
|
2002
|
+
top: "initial",
|
|
1928
2003
|
bottom: 0
|
|
1929
2004
|
};
|
|
1930
2005
|
}
|
|
@@ -1937,8 +2012,8 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1937
2012
|
var calculateOptionListMaxHeight = function calculateOptionListMaxHeight(position) {
|
|
1938
2013
|
// Calculate max height if there's more space below the select
|
|
1939
2014
|
var listHeight = optionListReference.current.getBoundingClientRect().height;
|
|
1940
|
-
var transformOrigin = position.top !==
|
|
1941
|
-
var availableSpace = transformOrigin ===
|
|
2015
|
+
var transformOrigin = position.top !== "initial" ? "top" : "bottom";
|
|
2016
|
+
var availableSpace = transformOrigin === "top" ? window.innerHeight - containerReference.current.getBoundingClientRect()[transformOrigin] - 16 : containerReference.current.getBoundingClientRect()[transformOrigin] - 16;
|
|
1942
2017
|
|
|
1943
2018
|
if (availableSpace < listHeight) {
|
|
1944
2019
|
setOptionsListMaxHeight(availableSpace + "px");
|
|
@@ -1946,20 +2021,20 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1946
2021
|
return;
|
|
1947
2022
|
}
|
|
1948
2023
|
|
|
1949
|
-
setOptionsListMaxHeight(
|
|
2024
|
+
setOptionsListMaxHeight("none");
|
|
1950
2025
|
setOpacity(100);
|
|
1951
2026
|
};
|
|
1952
2027
|
|
|
1953
2028
|
var onOptionChangeHandler = function onOptionChangeHandler(optionRef) {
|
|
1954
2029
|
if (nativeSelect.current && optionRef.current) {
|
|
1955
|
-
nativeSelect.current.value = optionRef.current.getAttribute(
|
|
1956
|
-
nativeSelect.current.dispatchEvent(new Event(
|
|
2030
|
+
nativeSelect.current.value = optionRef.current.getAttribute("data-value");
|
|
2031
|
+
nativeSelect.current.dispatchEvent(new Event("change", {
|
|
1957
2032
|
bubbles: true
|
|
1958
2033
|
}));
|
|
1959
2034
|
}
|
|
1960
2035
|
|
|
1961
2036
|
setExpanded(false);
|
|
1962
|
-
containerReference.current && containerReference.current.querySelector(
|
|
2037
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
1963
2038
|
};
|
|
1964
2039
|
/**
|
|
1965
2040
|
* @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.
|
|
@@ -1968,7 +2043,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1968
2043
|
|
|
1969
2044
|
|
|
1970
2045
|
var renderOptions = function renderOptions() {
|
|
1971
|
-
if (isSearching || filter !==
|
|
2046
|
+
if (isSearching || filter !== "") {
|
|
1972
2047
|
var filteredChildren = React.Children.toArray(children).filter(function (child) {
|
|
1973
2048
|
return child.props.children.toLowerCase().match(filter.toLowerCase()) !== null;
|
|
1974
2049
|
});
|
|
@@ -2011,9 +2086,9 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2011
2086
|
return setIsSearching(false);
|
|
2012
2087
|
},
|
|
2013
2088
|
onChange: filterResults,
|
|
2014
|
-
className: modules_7db85bb8[
|
|
2089
|
+
className: modules_7db85bb8["select-search"],
|
|
2015
2090
|
wrapperProps: {
|
|
2016
|
-
className: modules_7db85bb8[
|
|
2091
|
+
className: modules_7db85bb8["select-search-wrapper"] + " " + (searchInputProps == null ? void 0 : (_searchInputProps$wra = searchInputProps.wrapperProps) == null ? void 0 : _searchInputProps$wra.className)
|
|
2017
2092
|
},
|
|
2018
2093
|
type: "text",
|
|
2019
2094
|
name: "search-option",
|
|
@@ -2028,7 +2103,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2028
2103
|
var statusIcon = function statusIcon() {
|
|
2029
2104
|
if (error) {
|
|
2030
2105
|
return React.createElement(Icon, {
|
|
2031
|
-
className: modules_7db85bb8[
|
|
2106
|
+
className: modules_7db85bb8["warning"],
|
|
2032
2107
|
icon: Icons.Warning
|
|
2033
2108
|
});
|
|
2034
2109
|
}
|
|
@@ -2045,15 +2120,15 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2045
2120
|
onClear(e);
|
|
2046
2121
|
},
|
|
2047
2122
|
onKeyDown: function onKeyDown(e) {
|
|
2048
|
-
if (e.code ===
|
|
2123
|
+
if (e.code === "Enter" || e.code === "Space") {
|
|
2049
2124
|
e.preventDefault();
|
|
2050
2125
|
e.stopPropagation();
|
|
2051
2126
|
onClear(e);
|
|
2052
|
-
containerReference.current && containerReference.current.querySelector(
|
|
2127
|
+
containerReference.current && containerReference.current.querySelector("button").focus();
|
|
2053
2128
|
}
|
|
2054
2129
|
}
|
|
2055
2130
|
}, React.createElement("span", {
|
|
2056
|
-
className: modules_35a251a6[
|
|
2131
|
+
className: modules_35a251a6["sr-only"]
|
|
2057
2132
|
}, clearLabel), React.createElement(Icon, {
|
|
2058
2133
|
tag: "span",
|
|
2059
2134
|
icon: Icons.TimesThin
|
|
@@ -2074,12 +2149,12 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2074
2149
|
rePositionList();
|
|
2075
2150
|
}, [expanded]);
|
|
2076
2151
|
useBodyClick(function (event) {
|
|
2077
|
-
return !event.target.closest(
|
|
2152
|
+
return !event.target.closest(".custom-select") && expanded;
|
|
2078
2153
|
}, function () {
|
|
2079
|
-
setExpanded(
|
|
2154
|
+
setExpanded(false);
|
|
2080
2155
|
setListPosition({
|
|
2081
2156
|
top: 0,
|
|
2082
|
-
bottom:
|
|
2157
|
+
bottom: "initial"
|
|
2083
2158
|
});
|
|
2084
2159
|
setOpacity(0);
|
|
2085
2160
|
}, expanded);
|
|
@@ -2096,7 +2171,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2096
2171
|
ref: nativeSelect,
|
|
2097
2172
|
name: name,
|
|
2098
2173
|
onChange: nativeOnChangeHandler,
|
|
2099
|
-
className: modules_35a251a6[
|
|
2174
|
+
className: modules_35a251a6["sr-only"]
|
|
2100
2175
|
}), React.createElement("option", {
|
|
2101
2176
|
value: ""
|
|
2102
2177
|
}), React.Children.map(children, function (child) {
|
|
@@ -2106,14 +2181,14 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2106
2181
|
})), React.createElement("div", _extends({}, filterProps(rest, /^data-/), {
|
|
2107
2182
|
ref: containerReference,
|
|
2108
2183
|
onKeyDown: onArrowNavigation,
|
|
2109
|
-
className: "custom-select " + modules_7db85bb8.select + " " + additionalClasses.join(
|
|
2184
|
+
className: "custom-select " + modules_7db85bb8.select + " " + additionalClasses.join(" ") + " " + (className != null ? className : "")
|
|
2110
2185
|
}), React.createElement("button", _extends({}, selectButtonProps, {
|
|
2111
2186
|
onClick: function onClick() {
|
|
2112
2187
|
setExpanded(!expanded);
|
|
2113
2188
|
},
|
|
2114
2189
|
type: "button",
|
|
2115
2190
|
name: name,
|
|
2116
|
-
className: modules_7db85bb8[
|
|
2191
|
+
className: modules_7db85bb8["custom-select"] + " " + additionalClasses.join(" ") + " ",
|
|
2117
2192
|
disabled: disabled,
|
|
2118
2193
|
"aria-disabled": disabled,
|
|
2119
2194
|
"aria-invalid": error,
|
|
@@ -2123,23 +2198,24 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2123
2198
|
"aria-describedby": describedBy
|
|
2124
2199
|
}), React.createElement("div", {
|
|
2125
2200
|
"data-display": true,
|
|
2126
|
-
className: modules_7db85bb8[
|
|
2201
|
+
className: modules_7db85bb8["selected"]
|
|
2127
2202
|
}, !value && placeholder && React.createElement("span", {
|
|
2128
|
-
className: modules_7db85bb8[
|
|
2203
|
+
className: modules_7db85bb8["placeholder"]
|
|
2129
2204
|
}, placeholder), (value == null ? void 0 : value.length) > 0 && React.createElement("span", {
|
|
2130
2205
|
"data-display-inner": true
|
|
2131
2206
|
}, display)), React.createElement("div", {
|
|
2132
|
-
className: modules_7db85bb8[
|
|
2207
|
+
className: modules_7db85bb8["status"]
|
|
2133
2208
|
}, statusIcon(), React.createElement(Icon, {
|
|
2134
|
-
className: modules_7db85bb8[
|
|
2209
|
+
className: modules_7db85bb8["triangle-down"],
|
|
2135
2210
|
icon: Icons.TriangleDown
|
|
2136
2211
|
}))), React.createElement("div", {
|
|
2137
2212
|
ref: optionListReference,
|
|
2138
|
-
className: "list-wrapper " + modules_7db85bb8[
|
|
2213
|
+
className: "list-wrapper " + modules_7db85bb8["list-wrapper"],
|
|
2139
2214
|
style: _extends({
|
|
2140
|
-
display: expanded ?
|
|
2215
|
+
display: expanded ? "block" : "none",
|
|
2141
2216
|
opacity: opacity,
|
|
2142
|
-
maxHeight: optionsListMaxHeight
|
|
2217
|
+
maxHeight: optionsListMaxHeight,
|
|
2218
|
+
pointerEvents: expanded ? "auto" : "none"
|
|
2143
2219
|
}, listPosition)
|
|
2144
2220
|
}, Array.isArray(children) && children.length > renderSearchCondition && renderSearch(), React.createElement("ul", {
|
|
2145
2221
|
role: "listbox"
|
|
@@ -2183,10 +2259,10 @@ var Option = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2183
2259
|
return React.createElement("li", _extends({}, rest, {
|
|
2184
2260
|
ref: innerOptionRef,
|
|
2185
2261
|
"data-value": value,
|
|
2186
|
-
className: (isSelected ? modules_7db85bb8[
|
|
2262
|
+
className: (isSelected ? modules_7db85bb8["selected-option"] : "") + " " + (disabled ? modules_7db85bb8.disabled : "") + " " + (className != null ? className : ""),
|
|
2187
2263
|
onClick: onSelectHandler,
|
|
2188
2264
|
onKeyDownCapture: function onKeyDownCapture(event) {
|
|
2189
|
-
if (event.code ===
|
|
2265
|
+
if (event.code === "Enter") {
|
|
2190
2266
|
event.stopPropagation();
|
|
2191
2267
|
event.preventDefault();
|
|
2192
2268
|
onSelectHandler();
|
|
@@ -2212,7 +2288,7 @@ var Label = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2212
2288
|
|
|
2213
2289
|
return React.createElement("label", _extends({}, rest, {
|
|
2214
2290
|
ref: ref,
|
|
2215
|
-
className: (hidden ? modules_35a251a6[
|
|
2291
|
+
className: (hidden ? modules_35a251a6["sr-only"] : "") + " " + modules_aa63a669["label"] + " " + (className != null ? className : "")
|
|
2216
2292
|
}), children);
|
|
2217
2293
|
});
|
|
2218
2294
|
|
|
@@ -2240,7 +2316,7 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2240
2316
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
2241
2317
|
|
|
2242
2318
|
/** 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. */
|
|
2243
|
-
var _useState = useState((currentPage == null ? void 0 : currentPage.toString()) ||
|
|
2319
|
+
var _useState = useState((currentPage == null ? void 0 : currentPage.toString()) || "1"),
|
|
2244
2320
|
internalCurrentPage = _useState[0],
|
|
2245
2321
|
setInternalCurrentPage = _useState[1];
|
|
2246
2322
|
|
|
@@ -2255,7 +2331,7 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2255
2331
|
};
|
|
2256
2332
|
|
|
2257
2333
|
var onEnterListener = function onEnterListener(event) {
|
|
2258
|
-
if (event.code ===
|
|
2334
|
+
if (event.code === "Enter") {
|
|
2259
2335
|
onPageChange(Number(internalCurrentPage));
|
|
2260
2336
|
}
|
|
2261
2337
|
};
|
|
@@ -2264,15 +2340,15 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2264
2340
|
var amountOfPages = calculateAmountOfPages();
|
|
2265
2341
|
|
|
2266
2342
|
if (amountOfPages) {
|
|
2267
|
-
var splitCurrentPageTranslation = translate.currentPage.split(
|
|
2343
|
+
var splitCurrentPageTranslation = translate.currentPage.split(" ");
|
|
2268
2344
|
return splitCurrentPageTranslation.map(function (string) {
|
|
2269
|
-
if (string.includes(
|
|
2345
|
+
if (string.includes("%1")) {
|
|
2270
2346
|
return React.createElement(Fragment, {
|
|
2271
2347
|
key: string
|
|
2272
2348
|
}, React.createElement(Label, {
|
|
2273
2349
|
id: "current-value-input-label",
|
|
2274
2350
|
htmlFor: "current-value-input",
|
|
2275
|
-
className: modules_35a251a6[
|
|
2351
|
+
className: modules_35a251a6["sr-only"] + " " + modules_e3c5bce1["current-value-input-label"]
|
|
2276
2352
|
}, translate.currentPageLabel), React.createElement(Input, {
|
|
2277
2353
|
"aria-labelledby": "current-value-input-label",
|
|
2278
2354
|
key: "input",
|
|
@@ -2281,7 +2357,7 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2281
2357
|
size: currentPage == null ? void 0 : currentPage.toString().length,
|
|
2282
2358
|
max: calculateAmountOfPages(),
|
|
2283
2359
|
wrapperProps: {
|
|
2284
|
-
className: modules_e3c5bce1[
|
|
2360
|
+
className: modules_e3c5bce1["current-value-input"]
|
|
2285
2361
|
},
|
|
2286
2362
|
onKeyUp: onEnterListener,
|
|
2287
2363
|
onBlur: function onBlur(event) {
|
|
@@ -2292,14 +2368,14 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2292
2368
|
},
|
|
2293
2369
|
name: "current-value-input",
|
|
2294
2370
|
value: internalCurrentPage,
|
|
2295
|
-
className: modules_e3c5bce1[
|
|
2371
|
+
className: modules_e3c5bce1["form-element"] + " " + modules_e3c5bce1["current-page-input"]
|
|
2296
2372
|
}));
|
|
2297
2373
|
}
|
|
2298
2374
|
|
|
2299
|
-
if (string.includes(
|
|
2375
|
+
if (string.includes("%2")) {
|
|
2300
2376
|
return React.createElement("div", {
|
|
2301
2377
|
key: string
|
|
2302
|
-
}, React.createElement("strong", null, string.replace(
|
|
2378
|
+
}, React.createElement("strong", null, string.replace("%2", amountOfPages.toString())), "\xA0");
|
|
2303
2379
|
}
|
|
2304
2380
|
|
|
2305
2381
|
return React.createElement("div", {
|
|
@@ -2322,20 +2398,20 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2322
2398
|
|
|
2323
2399
|
return React.createElement("div", _extends({}, rest, {
|
|
2324
2400
|
ref: ref,
|
|
2325
|
-
className: modules_e3c5bce1[
|
|
2401
|
+
className: modules_e3c5bce1["pagination-wrapper"] + " " + (className ? className : "")
|
|
2326
2402
|
}), totalElements && React.createElement("div", {
|
|
2327
|
-
className: modules_e3c5bce1[
|
|
2403
|
+
className: modules_e3c5bce1["total"]
|
|
2328
2404
|
}, React.createElement("span", {
|
|
2329
2405
|
tabIndex: 0
|
|
2330
2406
|
}, translate.totalItems, ": ", React.createElement("span", null, totalElements))), React.createElement("div", {
|
|
2331
|
-
className: modules_e3c5bce1[
|
|
2407
|
+
className: modules_e3c5bce1["pagination"]
|
|
2332
2408
|
}, pageSize && React.createElement("div", {
|
|
2333
|
-
className: modules_e3c5bce1[
|
|
2409
|
+
className: modules_e3c5bce1["per-page"]
|
|
2334
2410
|
}, React.createElement(Label, {
|
|
2335
2411
|
id: "page-size-select-label"
|
|
2336
2412
|
}, translate.itemsPerPage), React.createElement(Select, {
|
|
2337
2413
|
labeledBy: "page-size-select-label",
|
|
2338
|
-
className: modules_e3c5bce1[
|
|
2414
|
+
className: modules_e3c5bce1["form-element"] + " " + modules_e3c5bce1["page-size-select"],
|
|
2339
2415
|
value: pageSize.toString(),
|
|
2340
2416
|
onChange: onPageSizeChangeHandler
|
|
2341
2417
|
}, React.createElement(Option, {
|
|
@@ -2345,7 +2421,7 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2345
2421
|
}, "25"), React.createElement(Option, {
|
|
2346
2422
|
value: "50"
|
|
2347
2423
|
}, "50"))), React.createElement(Fragment, null, !!(currentPage && currentPage > 2 || currentPage && currentPage > 1) && React.createElement("div", {
|
|
2348
|
-
className: modules_e3c5bce1[
|
|
2424
|
+
className: modules_e3c5bce1["previous"]
|
|
2349
2425
|
}, currentPage > 2 && React.createElement(IconButton, {
|
|
2350
2426
|
title: "first",
|
|
2351
2427
|
onClick: function onClick() {
|
|
@@ -2362,10 +2438,10 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2362
2438
|
"data-paginate": "previous"
|
|
2363
2439
|
}, React.createElement(Icon, {
|
|
2364
2440
|
icon: Icons.ChevronLeft
|
|
2365
|
-
}))), totalElements && calculateAmountOfPages() && React.createElement("div", {
|
|
2366
|
-
className: modules_e3c5bce1[
|
|
2441
|
+
}))), totalElements && !!calculateAmountOfPages() && React.createElement("div", {
|
|
2442
|
+
className: modules_e3c5bce1["page"]
|
|
2367
2443
|
}, renderCurrentPageTranslation()), React.createElement("div", {
|
|
2368
|
-
className: modules_e3c5bce1[
|
|
2444
|
+
className: modules_e3c5bce1["next"]
|
|
2369
2445
|
}, !!(currentPage !== undefined && currentPage < calculateAmountOfPages() || currentPage !== undefined && !totalElements) && React.createElement(IconButton, {
|
|
2370
2446
|
title: "next",
|
|
2371
2447
|
onClick: function onClick() {
|
|
@@ -2431,15 +2507,15 @@ var descriptionId = function descriptionId(id) {
|
|
|
2431
2507
|
};
|
|
2432
2508
|
|
|
2433
2509
|
var _excluded$A = ["id", "children", "open", "onClose", "className", "containerProps", "backdropProps", "labelledby", "describedby", "disableEscapeKeyDown", "disableBackdrop", "forceContainerOpen", "zIndex", "domRoot"];
|
|
2434
|
-
var SCROLL_PROPERTY_NAME =
|
|
2435
|
-
var SCROLL_PROPERTY_VALUE =
|
|
2510
|
+
var SCROLL_PROPERTY_NAME = "overflow";
|
|
2511
|
+
var SCROLL_PROPERTY_VALUE = "hidden";
|
|
2436
2512
|
var useSetBodyScroll = function useSetBodyScroll(open) {
|
|
2437
2513
|
var hideBodyScroll = function hideBodyScroll() {
|
|
2438
2514
|
document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;
|
|
2439
2515
|
};
|
|
2440
2516
|
|
|
2441
2517
|
var showBodyScroll = function showBodyScroll() {
|
|
2442
|
-
var allModalsClosed = document.querySelectorAll(
|
|
2518
|
+
var allModalsClosed = document.querySelectorAll("[role=dialog][data-hidden=false]").length === 0;
|
|
2443
2519
|
|
|
2444
2520
|
if (allModalsClosed) {
|
|
2445
2521
|
document.body.style.removeProperty(SCROLL_PROPERTY_NAME);
|
|
@@ -2462,7 +2538,7 @@ var BaseModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2462
2538
|
open = _ref.open,
|
|
2463
2539
|
onClose = _ref.onClose,
|
|
2464
2540
|
_ref$className = _ref.className,
|
|
2465
|
-
className = _ref$className === void 0 ?
|
|
2541
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
2466
2542
|
containerProps = _ref.containerProps,
|
|
2467
2543
|
backdropProps = _ref.backdropProps,
|
|
2468
2544
|
labelledby = _ref.labelledby,
|
|
@@ -2481,7 +2557,7 @@ var BaseModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2481
2557
|
useSetBodyScroll(open);
|
|
2482
2558
|
|
|
2483
2559
|
var handleEscKeyPress = function handleEscKeyPress(event) {
|
|
2484
|
-
if (!disableEscapeKeyDown && event.key ===
|
|
2560
|
+
if (!disableEscapeKeyDown && event.key === "Escape") {
|
|
2485
2561
|
event.stopPropagation();
|
|
2486
2562
|
onClose && onClose();
|
|
2487
2563
|
}
|
|
@@ -2494,7 +2570,7 @@ var BaseModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2494
2570
|
return createPortal(React.createElement("div", _extends({}, rest, {
|
|
2495
2571
|
ref: ref,
|
|
2496
2572
|
id: id,
|
|
2497
|
-
className: modules_cf1b230e[
|
|
2573
|
+
className: modules_cf1b230e["modal"] + " " + (open ? modules_cf1b230e["visible"] : "") + " " + className,
|
|
2498
2574
|
role: "dialog",
|
|
2499
2575
|
"aria-modal": "true",
|
|
2500
2576
|
"aria-labelledby": labelledby || labelId(id),
|
|
@@ -2507,7 +2583,7 @@ var BaseModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2507
2583
|
zIndex: zIndex
|
|
2508
2584
|
}
|
|
2509
2585
|
}), React.createElement("div", _extends({}, backdropProps, {
|
|
2510
|
-
className: modules_cf1b230e[
|
|
2586
|
+
className: modules_cf1b230e["backdrop"] + " " + ((_backdropProps$classN = backdropProps == null ? void 0 : backdropProps.className) != null ? _backdropProps$classN : ""),
|
|
2511
2587
|
onClick: handleBackdropClick
|
|
2512
2588
|
})), forceContainerOpen ? React.createElement("div", _extends({}, containerProps, {
|
|
2513
2589
|
"aria-hidden": !open,
|
|
@@ -2515,12 +2591,12 @@ var BaseModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2515
2591
|
style: {
|
|
2516
2592
|
zIndex: zIndex && zIndex + 1
|
|
2517
2593
|
},
|
|
2518
|
-
className: modules_cf1b230e[
|
|
2594
|
+
className: modules_cf1b230e["container"] + " " + ((_containerProps$class = containerProps == null ? void 0 : containerProps.className) != null ? _containerProps$class : "")
|
|
2519
2595
|
}), children) : open && React.createElement("div", _extends({}, containerProps, {
|
|
2520
2596
|
style: {
|
|
2521
2597
|
zIndex: zIndex && zIndex + 1
|
|
2522
2598
|
},
|
|
2523
|
-
className: modules_cf1b230e[
|
|
2599
|
+
className: modules_cf1b230e["container"] + " " + ((_containerProps$class2 = containerProps == null ? void 0 : containerProps.className) != null ? _containerProps$class2 : "")
|
|
2524
2600
|
}), children)), domRoot);
|
|
2525
2601
|
});
|
|
2526
2602
|
|
|
@@ -2557,7 +2633,7 @@ var BaseModalContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2557
2633
|
var id = _ref.id,
|
|
2558
2634
|
children = _ref.children,
|
|
2559
2635
|
_ref$className = _ref.className,
|
|
2560
|
-
className = _ref$className === void 0 ?
|
|
2636
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
2561
2637
|
_ref$disableAutoFocus = _ref.disableAutoFocus,
|
|
2562
2638
|
disableAutoFocus = _ref$disableAutoFocus === void 0 ? false : _ref$disableAutoFocus,
|
|
2563
2639
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
@@ -2579,7 +2655,7 @@ var BaseModalContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2579
2655
|
return React.createElement("div", _extends({}, rest, {
|
|
2580
2656
|
ref: ref || contentRef,
|
|
2581
2657
|
id: id,
|
|
2582
|
-
className: modules_cf7b8d60[
|
|
2658
|
+
className: modules_cf7b8d60["content"] + " " + className,
|
|
2583
2659
|
tabIndex: -1
|
|
2584
2660
|
}), children);
|
|
2585
2661
|
});
|
|
@@ -2592,12 +2668,12 @@ var _excluded$y = ["children", "className"];
|
|
|
2592
2668
|
var BaseModalActions = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
2593
2669
|
var children = _ref.children,
|
|
2594
2670
|
_ref$className = _ref.className,
|
|
2595
|
-
className = _ref$className === void 0 ?
|
|
2671
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
2596
2672
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
2597
2673
|
|
|
2598
2674
|
return React.createElement("footer", _extends({}, rest, {
|
|
2599
2675
|
ref: ref,
|
|
2600
|
-
className: modules_6b4a9db0[
|
|
2676
|
+
className: modules_6b4a9db0["actions"] + " " + className
|
|
2601
2677
|
}), children);
|
|
2602
2678
|
});
|
|
2603
2679
|
|
|
@@ -2613,7 +2689,7 @@ var DialogActions = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2613
2689
|
|
|
2614
2690
|
return React.createElement(BaseModalActions, _extends({}, rest, {
|
|
2615
2691
|
ref: ref,
|
|
2616
|
-
className: "" + modules_d87e2731[
|
|
2692
|
+
className: "" + modules_d87e2731["actions"] + (align === "left" ? " " + modules_d87e2731["left"] : "")
|
|
2617
2693
|
}), children);
|
|
2618
2694
|
});
|
|
2619
2695
|
|
|
@@ -2633,10 +2709,10 @@ var DialogTitle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2633
2709
|
|
|
2634
2710
|
return React.createElement("div", _extends({}, rest, {
|
|
2635
2711
|
ref: ref,
|
|
2636
|
-
className: modules_ff1bcd77[
|
|
2712
|
+
className: modules_ff1bcd77["header"]
|
|
2637
2713
|
}), React.createElement(Typography, {
|
|
2638
2714
|
id: id,
|
|
2639
|
-
className: modules_ff1bcd77[
|
|
2715
|
+
className: modules_ff1bcd77["title"],
|
|
2640
2716
|
tag: "h1",
|
|
2641
2717
|
variant: "h4"
|
|
2642
2718
|
}, title));
|
|
@@ -2681,7 +2757,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2681
2757
|
|
|
2682
2758
|
var onHiddenInputKeyPress = function onHiddenInputKeyPress(event) {
|
|
2683
2759
|
/** 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? */
|
|
2684
|
-
if (event.key ===
|
|
2760
|
+
if (event.key === "Enter") {
|
|
2685
2761
|
primaryAction.onClick();
|
|
2686
2762
|
}
|
|
2687
2763
|
};
|
|
@@ -2689,9 +2765,9 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2689
2765
|
return React.createElement(BaseModal, _extends({}, rest, {
|
|
2690
2766
|
ref: ref,
|
|
2691
2767
|
id: dialogId,
|
|
2692
|
-
className: modules_c8de1793[
|
|
2768
|
+
className: modules_c8de1793["dialog"],
|
|
2693
2769
|
containerProps: {
|
|
2694
|
-
className: modules_c8de1793[
|
|
2770
|
+
className: modules_c8de1793["container"]
|
|
2695
2771
|
},
|
|
2696
2772
|
open: open,
|
|
2697
2773
|
disableBackdrop: true,
|
|
@@ -2703,15 +2779,15 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2703
2779
|
title: title
|
|
2704
2780
|
}), React.createElement(BaseModalContent, {
|
|
2705
2781
|
id: descriptionId(dialogId),
|
|
2706
|
-
className: modules_c8de1793[
|
|
2782
|
+
className: modules_c8de1793["content"],
|
|
2707
2783
|
disableAutoFocus: true
|
|
2708
2784
|
}, children), React.createElement(DialogActions, {
|
|
2709
2785
|
align: alignActions
|
|
2710
|
-
}, alignActions ===
|
|
2786
|
+
}, alignActions === "left" ? [PrimaryButton, TertiaryButton] : [TertiaryButton, PrimaryButton]), React.createElement("input", {
|
|
2711
2787
|
autoFocus: true,
|
|
2712
2788
|
"aria-hidden": true,
|
|
2713
2789
|
style: {
|
|
2714
|
-
position:
|
|
2790
|
+
position: "absolute",
|
|
2715
2791
|
width: 0,
|
|
2716
2792
|
height: 0,
|
|
2717
2793
|
opacity: 0
|
|
@@ -2736,17 +2812,17 @@ var BaseModalHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2736
2812
|
|
|
2737
2813
|
return React.createElement("div", _extends({}, rest, {
|
|
2738
2814
|
ref: ref,
|
|
2739
|
-
className: modules_74d5dc9f[
|
|
2815
|
+
className: modules_74d5dc9f["header"]
|
|
2740
2816
|
}), React.createElement("div", {
|
|
2741
|
-
className: modules_74d5dc9f[
|
|
2817
|
+
className: modules_74d5dc9f["headline"]
|
|
2742
2818
|
}, React.createElement(Typography, {
|
|
2743
2819
|
id: id,
|
|
2744
|
-
className: modules_74d5dc9f[
|
|
2820
|
+
className: modules_74d5dc9f["title"],
|
|
2745
2821
|
tag: "h1",
|
|
2746
2822
|
variant: "h4"
|
|
2747
2823
|
}, title), React.createElement(IconButton, {
|
|
2748
2824
|
onClick: onClose,
|
|
2749
|
-
className: modules_74d5dc9f[
|
|
2825
|
+
className: modules_74d5dc9f["closeBtn"],
|
|
2750
2826
|
title: "close modal"
|
|
2751
2827
|
}, React.createElement(Icon, {
|
|
2752
2828
|
icon: Icons.Times
|
|
@@ -2842,29 +2918,33 @@ var SlideInModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2842
2918
|
open = _ref.open,
|
|
2843
2919
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
2844
2920
|
|
|
2845
|
-
var _useState = useState(
|
|
2921
|
+
var _useState = useState("hidden"),
|
|
2846
2922
|
classHideOnTransition = _useState[0],
|
|
2847
2923
|
setClassHideOnTransition = _useState[1];
|
|
2848
2924
|
|
|
2849
|
-
var
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2925
|
+
var containerRef = useRef(null);
|
|
2926
|
+
|
|
2927
|
+
var onTransitionEnd = function onTransitionEnd(e) {
|
|
2928
|
+
if (e.target === containerRef.current) {
|
|
2929
|
+
setClassHideOnTransition(function (prev) {
|
|
2930
|
+
return prev ? "" : "hidden";
|
|
2931
|
+
});
|
|
2932
|
+
}
|
|
2853
2933
|
};
|
|
2854
2934
|
|
|
2855
2935
|
return React.createElement(BaseModal, _extends({}, rest, {
|
|
2856
2936
|
id: id,
|
|
2857
2937
|
open: open,
|
|
2858
|
-
className: modules_0a5af5e0[
|
|
2938
|
+
className: modules_0a5af5e0["slide-in-modal"] + " " + (open ? modules_0a5af5e0["visible"] : "") + " " + (!open ? modules_0a5af5e0[classHideOnTransition] : ""),
|
|
2859
2939
|
containerProps: {
|
|
2860
|
-
className: modules_0a5af5e0[
|
|
2940
|
+
className: modules_0a5af5e0["container"]
|
|
2861
2941
|
},
|
|
2862
2942
|
backdropProps: {
|
|
2863
|
-
className: modules_0a5af5e0[
|
|
2943
|
+
className: modules_0a5af5e0["backdrop-slide"]
|
|
2864
2944
|
},
|
|
2865
2945
|
forceContainerOpen: true,
|
|
2866
2946
|
onTransitionEnd: onTransitionEnd,
|
|
2867
|
-
ref: ref
|
|
2947
|
+
ref: ref || containerRef
|
|
2868
2948
|
}), children);
|
|
2869
2949
|
});
|
|
2870
2950
|
|
|
@@ -2884,7 +2964,7 @@ var SnackbarContainer = function SnackbarContainer(_ref) {
|
|
|
2884
2964
|
style: {
|
|
2885
2965
|
zIndex: zIndex
|
|
2886
2966
|
},
|
|
2887
|
-
className: modules_531ab449[
|
|
2967
|
+
className: modules_531ab449["snackbars"] + " " + modules_531ab449[placement.horizontal] + " " + modules_531ab449[placement.vertical] + " " + (className != null ? className : "")
|
|
2888
2968
|
}), children);
|
|
2889
2969
|
};
|
|
2890
2970
|
|
|
@@ -2907,11 +2987,11 @@ var useAnimation = function useAnimation(callback) {
|
|
|
2907
2987
|
useEffect(function () {
|
|
2908
2988
|
var _animatedObjectRef$cu;
|
|
2909
2989
|
|
|
2910
|
-
(_animatedObjectRef$cu = animatedObjectRef.current) == null ? void 0 : _animatedObjectRef$cu.addEventListener(
|
|
2990
|
+
(_animatedObjectRef$cu = animatedObjectRef.current) == null ? void 0 : _animatedObjectRef$cu.addEventListener("animationend", onAnimationEnd);
|
|
2911
2991
|
return function () {
|
|
2912
2992
|
var _animatedObjectRef$cu2;
|
|
2913
2993
|
|
|
2914
|
-
return (_animatedObjectRef$cu2 = animatedObjectRef.current) == null ? void 0 : _animatedObjectRef$cu2.removeEventListener(
|
|
2994
|
+
return (_animatedObjectRef$cu2 = animatedObjectRef.current) == null ? void 0 : _animatedObjectRef$cu2.removeEventListener("animationend", onAnimationEnd);
|
|
2915
2995
|
};
|
|
2916
2996
|
}, [animationStarted]);
|
|
2917
2997
|
return {
|
|
@@ -2923,7 +3003,7 @@ var useAnimation = function useAnimation(callback) {
|
|
|
2923
3003
|
};
|
|
2924
3004
|
};
|
|
2925
3005
|
|
|
2926
|
-
var textColor =
|
|
3006
|
+
var textColor = "var(--snackbar-text-color)";
|
|
2927
3007
|
var SnackbarItem = function SnackbarItem(_ref) {
|
|
2928
3008
|
var id = _ref.id,
|
|
2929
3009
|
title = _ref.title,
|
|
@@ -2965,11 +3045,11 @@ var SnackbarItem = function SnackbarItem(_ref) {
|
|
|
2965
3045
|
};
|
|
2966
3046
|
|
|
2967
3047
|
var getVariantIcon = function getVariantIcon() {
|
|
2968
|
-
if (variant ===
|
|
3048
|
+
if (variant === "error") {
|
|
2969
3049
|
return Icons.Error;
|
|
2970
3050
|
}
|
|
2971
3051
|
|
|
2972
|
-
return variant ===
|
|
3052
|
+
return variant === "success" ? Icons.CheckmarkCircleBreakout : Icons.InfoCircle;
|
|
2973
3053
|
};
|
|
2974
3054
|
|
|
2975
3055
|
var actionButtons = actions.map(function (actionProp, index) {
|
|
@@ -2981,27 +3061,27 @@ var SnackbarItem = function SnackbarItem(_ref) {
|
|
|
2981
3061
|
actionProp.onClick && actionProp.onClick(e);
|
|
2982
3062
|
},
|
|
2983
3063
|
children: actionProp.label,
|
|
2984
|
-
className: modules_d6335ff6[
|
|
3064
|
+
className: modules_d6335ff6["action-button"]
|
|
2985
3065
|
}));
|
|
2986
3066
|
});
|
|
2987
3067
|
return React.createElement("div", {
|
|
2988
3068
|
ref: ref,
|
|
2989
|
-
className: modules_d6335ff6[
|
|
3069
|
+
className: modules_d6335ff6["snackbar"] + " " + modules_d6335ff6[variant] + " " + (animationStarted ? modules_35a251a6["slide-out"] : modules_35a251a6["slide-in"]),
|
|
2990
3070
|
onMouseEnter: onMouseEnter,
|
|
2991
3071
|
onMouseLeave: onMouseLeave
|
|
2992
3072
|
}, React.createElement(Icon, {
|
|
2993
3073
|
icon: getVariantIcon(),
|
|
2994
|
-
className: modules_d6335ff6[
|
|
3074
|
+
className: modules_d6335ff6["icon"]
|
|
2995
3075
|
}), React.createElement("div", {
|
|
2996
|
-
className: modules_d6335ff6[
|
|
3076
|
+
className: modules_d6335ff6["container"]
|
|
2997
3077
|
}, React.createElement("div", {
|
|
2998
|
-
className: modules_d6335ff6[
|
|
3078
|
+
className: modules_d6335ff6["headline"]
|
|
2999
3079
|
}, React.createElement(Typography, {
|
|
3000
|
-
className: modules_d6335ff6[
|
|
3080
|
+
className: modules_d6335ff6["title"],
|
|
3001
3081
|
variant: "h4",
|
|
3002
3082
|
tag: "span"
|
|
3003
3083
|
}, title), React.createElement(IconButton, {
|
|
3004
|
-
id: modules_d6335ff6[
|
|
3084
|
+
id: modules_d6335ff6["close-btn"],
|
|
3005
3085
|
onClick: function onClick() {
|
|
3006
3086
|
return startAnimation();
|
|
3007
3087
|
},
|
|
@@ -3010,22 +3090,22 @@ var SnackbarItem = function SnackbarItem(_ref) {
|
|
|
3010
3090
|
icon: Icons.Times,
|
|
3011
3091
|
color: textColor
|
|
3012
3092
|
}))), !!content && React.createElement(Typography, {
|
|
3013
|
-
className: modules_d6335ff6[
|
|
3093
|
+
className: modules_d6335ff6["content"],
|
|
3014
3094
|
variant: "body"
|
|
3015
3095
|
}, content), actionButtons.length > 0 && React.createElement("div", {
|
|
3016
|
-
className: modules_d6335ff6[
|
|
3096
|
+
className: modules_d6335ff6["actions"]
|
|
3017
3097
|
}, actionButtons)));
|
|
3018
3098
|
};
|
|
3019
3099
|
|
|
3020
3100
|
var SnackbarProvider = function SnackbarProvider(_temp) {
|
|
3021
3101
|
var _ref = _temp === void 0 ? {
|
|
3022
|
-
closeButtonTitle:
|
|
3102
|
+
closeButtonTitle: ""
|
|
3023
3103
|
} : _temp,
|
|
3024
3104
|
closeButtonTitle = _ref.closeButtonTitle,
|
|
3025
3105
|
_ref$placement = _ref.placement,
|
|
3026
3106
|
placement = _ref$placement === void 0 ? {
|
|
3027
|
-
vertical:
|
|
3028
|
-
horizontal:
|
|
3107
|
+
vertical: "bottom",
|
|
3108
|
+
horizontal: "center"
|
|
3029
3109
|
} : _ref$placement,
|
|
3030
3110
|
_ref$autoHideDuration = _ref.autoHideDuration,
|
|
3031
3111
|
autoHideDuration = _ref$autoHideDuration === void 0 ? {
|
|
@@ -3050,7 +3130,7 @@ var SnackbarProvider = function SnackbarProvider(_temp) {
|
|
|
3050
3130
|
};
|
|
3051
3131
|
|
|
3052
3132
|
var getDuration = function getDuration(variant, actions, content) {
|
|
3053
|
-
var hasError = variant ===
|
|
3133
|
+
var hasError = variant === "error";
|
|
3054
3134
|
var hasContentOrActions = content || actions;
|
|
3055
3135
|
|
|
3056
3136
|
if (hasError || hasContentOrActions) {
|
|
@@ -3067,7 +3147,7 @@ var SnackbarProvider = function SnackbarProvider(_temp) {
|
|
|
3067
3147
|
|
|
3068
3148
|
var _options = options,
|
|
3069
3149
|
_options$variant = _options.variant,
|
|
3070
|
-
variant = _options$variant === void 0 ?
|
|
3150
|
+
variant = _options$variant === void 0 ? "info" : _options$variant,
|
|
3071
3151
|
actions = _options.actions,
|
|
3072
3152
|
_options$duration = _options.duration,
|
|
3073
3153
|
duration = _options$duration === void 0 ? getDuration(variant, actions, content) : _options$duration;
|
|
@@ -3084,13 +3164,13 @@ var SnackbarProvider = function SnackbarProvider(_temp) {
|
|
|
3084
3164
|
|
|
3085
3165
|
var enqueueSuccessSnackbar = function enqueueSuccessSnackbar(title, content, options) {
|
|
3086
3166
|
enqueueSnackbar(title, content, _extends({}, options, {
|
|
3087
|
-
variant:
|
|
3167
|
+
variant: "success"
|
|
3088
3168
|
}));
|
|
3089
3169
|
};
|
|
3090
3170
|
|
|
3091
3171
|
var enqueueErrorSnackbar = function enqueueErrorSnackbar(title, content, options) {
|
|
3092
3172
|
enqueueSnackbar(title, content, _extends({}, options, {
|
|
3093
|
-
variant:
|
|
3173
|
+
variant: "error"
|
|
3094
3174
|
}));
|
|
3095
3175
|
};
|
|
3096
3176
|
|
|
@@ -3130,7 +3210,7 @@ var useFormSelector = function useFormSelector(configObject) {
|
|
|
3130
3210
|
var _useState = useState(generateID(15, configObject.name)),
|
|
3131
3211
|
identifier = _useState[0];
|
|
3132
3212
|
|
|
3133
|
-
var _useState2 = useState(
|
|
3213
|
+
var _useState2 = useState(""),
|
|
3134
3214
|
describedBy = _useState2[0],
|
|
3135
3215
|
setDescribedBy = _useState2[1];
|
|
3136
3216
|
|
|
@@ -3176,7 +3256,7 @@ var FormHelperText = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3176
3256
|
ref: ref,
|
|
3177
3257
|
variant: "sub-text",
|
|
3178
3258
|
tag: "div",
|
|
3179
|
-
className: modules_aa38270e[
|
|
3259
|
+
className: modules_aa38270e["form-helper-text"] + " " + (error ? modules_aa38270e.error : "") + " " + (className != null ? className : "")
|
|
3180
3260
|
}), children);
|
|
3181
3261
|
});
|
|
3182
3262
|
|
|
@@ -3205,15 +3285,15 @@ var FormSelectorWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3205
3285
|
var helperRef = (helperProps == null ? void 0 : helperProps.ref) || createRef();
|
|
3206
3286
|
return React.createElement("div", _extends({}, rest, {
|
|
3207
3287
|
ref: ref,
|
|
3208
|
-
className: (error ? modules_b6c89faa[
|
|
3288
|
+
className: (error ? modules_b6c89faa["error"] : "") + " " + (disabled ? modules_b6c89faa["disabled"] : "") + " " + (className != null ? className : "")
|
|
3209
3289
|
}), React.createElement("div", _extends({}, containerProps), children), (helperText || helperProps && helperProps.children) && (!error || parentErrorId || !errorMessage) && React.createElement(FormHelperText, _extends({}, helperProps, {
|
|
3210
3290
|
ref: helperRef,
|
|
3211
3291
|
id: "" + identifier,
|
|
3212
|
-
className: modules_b6c89faa[
|
|
3292
|
+
className: modules_b6c89faa["helper-text"] + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "") + " " + (error ? modules_b6c89faa["error"] : "")
|
|
3213
3293
|
}), helperProps && helperProps.children || helperText), errorMessage && !parentErrorId && error && React.createElement("span", {
|
|
3214
|
-
className: modules_b6c89faa[
|
|
3294
|
+
className: modules_b6c89faa["error-message"]
|
|
3215
3295
|
}, React.createElement(Icon, {
|
|
3216
|
-
className: modules_b6c89faa[
|
|
3296
|
+
className: modules_b6c89faa["error-icon"],
|
|
3217
3297
|
icon: Icons.Error
|
|
3218
3298
|
}), React.createElement("span", {
|
|
3219
3299
|
id: errorId
|
|
@@ -3225,7 +3305,7 @@ var _excluded$n = ["children", "name", "helperText", "helperProps", "indetermina
|
|
|
3225
3305
|
var isToggle = function isToggle(children) {
|
|
3226
3306
|
var _children$props;
|
|
3227
3307
|
|
|
3228
|
-
return children == null ? void 0 : (_children$props = children.props) == null ? void 0 : _children$props[
|
|
3308
|
+
return children == null ? void 0 : (_children$props = children.props) == null ? void 0 : _children$props["data-toggle"];
|
|
3229
3309
|
};
|
|
3230
3310
|
|
|
3231
3311
|
var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -3264,8 +3344,8 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3264
3344
|
throw new Error("Please pass a 'name' prop to your <Checkbox> component.");
|
|
3265
3345
|
}
|
|
3266
3346
|
|
|
3267
|
-
if (typeof children ===
|
|
3268
|
-
throw new Error(
|
|
3347
|
+
if (typeof children === "object" && !isToggle(children) && indeterminate === undefined) {
|
|
3348
|
+
throw new Error("If you have nested checkboxes you have to manage the indeterminate state by passing a boolean to the `indeterminate` prop.");
|
|
3269
3349
|
}
|
|
3270
3350
|
}, []);
|
|
3271
3351
|
|
|
@@ -3273,19 +3353,19 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3273
3353
|
if (label) {
|
|
3274
3354
|
return label;
|
|
3275
3355
|
} else if (children === undefined) {
|
|
3276
|
-
throw new Error(
|
|
3356
|
+
throw new Error("Please make sure to pass either a string or more Checkbox components as a child of your Checkbox component.");
|
|
3277
3357
|
}
|
|
3278
3358
|
|
|
3279
|
-
if (typeof children ===
|
|
3359
|
+
if (typeof children === "string") {
|
|
3280
3360
|
return children;
|
|
3281
3361
|
}
|
|
3282
3362
|
|
|
3283
|
-
throw new Error(
|
|
3363
|
+
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.");
|
|
3284
3364
|
};
|
|
3285
3365
|
|
|
3286
3366
|
var renderNestedCheckboxes = function renderNestedCheckboxes() {
|
|
3287
3367
|
return React.createElement("ul", {
|
|
3288
|
-
className: modules_6238daf1[
|
|
3368
|
+
className: modules_6238daf1["checkbox-list"]
|
|
3289
3369
|
}, React.Children.map(children, function (child) {
|
|
3290
3370
|
return React.createElement("li", null, React.createElement(Checkbox, _extends({}, child.props, {
|
|
3291
3371
|
parentHelperId: parentHelperId,
|
|
@@ -3308,13 +3388,13 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3308
3388
|
return React.Children.toArray(children).filter(isToggle);
|
|
3309
3389
|
};
|
|
3310
3390
|
|
|
3311
|
-
var iconClasses = [modules_6238daf1[
|
|
3391
|
+
var iconClasses = [modules_6238daf1["input"], disabled ? modules_6238daf1["disabled"] : ""];
|
|
3312
3392
|
/** Default return value is the default checkbox */
|
|
3313
3393
|
|
|
3314
3394
|
return React.createElement(FormSelectorWrapper, _extends({}, formSelectorWrapperProps, {
|
|
3315
|
-
className: modules_6238daf1[
|
|
3395
|
+
className: modules_6238daf1["checkbox-wrapper"] + " " + (className ? className : ""),
|
|
3316
3396
|
containerProps: {
|
|
3317
|
-
className: modules_6238daf1[
|
|
3397
|
+
className: modules_6238daf1["checkbox-container"]
|
|
3318
3398
|
},
|
|
3319
3399
|
helperText: helperText,
|
|
3320
3400
|
helperProps: helperProps,
|
|
@@ -3324,27 +3404,27 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3324
3404
|
error: error,
|
|
3325
3405
|
disabled: disabled,
|
|
3326
3406
|
identifier: identifier,
|
|
3327
|
-
nestedChildren: typeof children ===
|
|
3407
|
+
nestedChildren: typeof children === "object" && !isToggle(children) && renderNestedCheckboxes()
|
|
3328
3408
|
}), React.createElement("input", _extends({}, rest, {
|
|
3329
3409
|
ref: ref,
|
|
3330
3410
|
disabled: disabled,
|
|
3331
|
-
className: modules_6238daf1[
|
|
3411
|
+
className: modules_6238daf1["native-input"] + " " + (error ? modules_6238daf1["error"] : ""),
|
|
3332
3412
|
checked: checked,
|
|
3333
3413
|
onChange: onChangeHandler,
|
|
3334
3414
|
"aria-invalid": error,
|
|
3335
|
-
"aria-checked": indeterminate ?
|
|
3415
|
+
"aria-checked": indeterminate ? "mixed" : checked,
|
|
3336
3416
|
"aria-describedby": describedBy,
|
|
3337
3417
|
id: identifier + "-checkbox",
|
|
3338
3418
|
name: name,
|
|
3339
3419
|
type: "checkbox"
|
|
3340
3420
|
})), renderToggle(), indeterminate && React.createElement(Icon, {
|
|
3341
|
-
className: iconClasses.join(
|
|
3421
|
+
className: iconClasses.join(" "),
|
|
3342
3422
|
icon: Icons.MinusSquare
|
|
3343
3423
|
}), checked && !indeterminate && React.createElement(Icon, {
|
|
3344
|
-
className: iconClasses.join(
|
|
3424
|
+
className: iconClasses.join(" "),
|
|
3345
3425
|
icon: Icons.CheckmarkSquare
|
|
3346
3426
|
}), !checked && !indeterminate && React.createElement(Icon, {
|
|
3347
|
-
className: iconClasses.join(
|
|
3427
|
+
className: iconClasses.join(" "),
|
|
3348
3428
|
icon: Icons.Square
|
|
3349
3429
|
}), React.createElement("label", {
|
|
3350
3430
|
htmlFor: identifier + "-checkbox"
|
|
@@ -3399,7 +3479,7 @@ var Radio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3399
3479
|
|
|
3400
3480
|
var nativeEvent = event.nativeEvent || event;
|
|
3401
3481
|
var clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
3402
|
-
Object.defineProperty(clonedEvent,
|
|
3482
|
+
Object.defineProperty(clonedEvent, "target", {
|
|
3403
3483
|
writable: true,
|
|
3404
3484
|
value: {
|
|
3405
3485
|
value: value
|
|
@@ -3411,9 +3491,9 @@ var Radio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3411
3491
|
|
|
3412
3492
|
|
|
3413
3493
|
return React.createElement(FormSelectorWrapper, _extends({}, formSelectorWrapperProps, {
|
|
3414
|
-
className: modules_8fc278f9[
|
|
3494
|
+
className: modules_8fc278f9["radio-wrapper"] + " " + (className != null ? className : ""),
|
|
3415
3495
|
containerProps: {
|
|
3416
|
-
className: modules_8fc278f9[
|
|
3496
|
+
className: modules_8fc278f9["radio-container"]
|
|
3417
3497
|
},
|
|
3418
3498
|
helperText: helperText,
|
|
3419
3499
|
helperProps: helperProps,
|
|
@@ -3427,7 +3507,7 @@ var Radio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3427
3507
|
ref: ref,
|
|
3428
3508
|
disabled: disabled,
|
|
3429
3509
|
tabIndex: 0,
|
|
3430
|
-
className: modules_8fc278f9[
|
|
3510
|
+
className: modules_8fc278f9["native-input"] + " " + (error ? modules_8fc278f9["error"] : ""),
|
|
3431
3511
|
onChange: onChangeHandler,
|
|
3432
3512
|
checked: checked,
|
|
3433
3513
|
"aria-invalid": error ? true : false,
|
|
@@ -3438,10 +3518,10 @@ var Radio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3438
3518
|
id: identifier + "-radio",
|
|
3439
3519
|
type: "radio"
|
|
3440
3520
|
})), checked && React.createElement(Icon, {
|
|
3441
|
-
className: modules_8fc278f9[
|
|
3521
|
+
className: modules_8fc278f9["input"] + " " + (disabled ? modules_8fc278f9["disabled"] : ""),
|
|
3442
3522
|
icon: Icons.Radio
|
|
3443
3523
|
}), !checked && React.createElement(Icon, {
|
|
3444
|
-
className: modules_8fc278f9[
|
|
3524
|
+
className: modules_8fc278f9["input"] + " " + (disabled ? modules_8fc278f9["disabled"] : ""),
|
|
3445
3525
|
icon: Icons.Circle
|
|
3446
3526
|
}), React.createElement("label", {
|
|
3447
3527
|
onClick: onChangeHandler,
|
|
@@ -3449,13 +3529,13 @@ var Radio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3449
3529
|
}, children));
|
|
3450
3530
|
});
|
|
3451
3531
|
|
|
3452
|
-
var css$j = ".
|
|
3453
|
-
var modules_5a9ee489 = {"textarea-wrapper":"
|
|
3532
|
+
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}";
|
|
3533
|
+
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"};
|
|
3454
3534
|
n(css$j,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
3455
3535
|
|
|
3456
|
-
var _excluded$l = ["error", "disabled", "className", "rows", "wrapperProps", "errorProps"];
|
|
3536
|
+
var _excluded$l = ["error", "disabled", "className", "rows", "wrapperProps", "errorProps", "onFocus", "onBlur"];
|
|
3457
3537
|
var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3458
|
-
var
|
|
3538
|
+
var _errorProps$className;
|
|
3459
3539
|
|
|
3460
3540
|
var _ref$error = _ref.error,
|
|
3461
3541
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
@@ -3466,19 +3546,41 @@ var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3466
3546
|
rows = _ref$rows === void 0 ? 4 : _ref$rows,
|
|
3467
3547
|
wrapperProps = _ref.wrapperProps,
|
|
3468
3548
|
errorProps = _ref.errorProps,
|
|
3549
|
+
_onFocus = _ref.onFocus,
|
|
3550
|
+
_onBlur = _ref.onBlur,
|
|
3469
3551
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
3470
3552
|
|
|
3553
|
+
var _useState = useState(false),
|
|
3554
|
+
focus = _useState[0],
|
|
3555
|
+
setFocus = _useState[1];
|
|
3556
|
+
|
|
3557
|
+
var wrapperClasses = [modules_5a9ee489["textarea-wrapper"]];
|
|
3558
|
+
var outlineClasses = [modules_5a9ee489["outline"]];
|
|
3559
|
+
(wrapperProps == null ? void 0 : wrapperProps.className) && wrapperClasses.push(wrapperProps.className);
|
|
3560
|
+
disabled && wrapperClasses.push(modules_5a9ee489["disabled"]) && outlineClasses.push(modules_5a9ee489["disabled"]);
|
|
3561
|
+
error && wrapperClasses.push(modules_5a9ee489["error"]) && outlineClasses.push(modules_5a9ee489["error"]);
|
|
3562
|
+
focus && wrapperClasses.push(modules_5a9ee489["focus"]) && outlineClasses.push(modules_5a9ee489["focus"]);
|
|
3471
3563
|
return React.createElement("div", _extends({}, wrapperProps, {
|
|
3472
|
-
className:
|
|
3564
|
+
className: wrapperClasses.join(" ")
|
|
3473
3565
|
}), React.createElement("textarea", _extends({}, rest, {
|
|
3474
3566
|
ref: ref,
|
|
3475
3567
|
rows: rows,
|
|
3476
|
-
className: (error ? modules_5a9ee489[
|
|
3477
|
-
disabled: disabled
|
|
3568
|
+
className: (error ? modules_5a9ee489["error"] : "") + " " + modules_5a9ee489["textarea"] + " " + (className != null ? className : ""),
|
|
3569
|
+
disabled: disabled,
|
|
3570
|
+
onFocus: function onFocus(event) {
|
|
3571
|
+
setFocus(true);
|
|
3572
|
+
_onFocus && _onFocus(event);
|
|
3573
|
+
},
|
|
3574
|
+
onBlur: function onBlur(event) {
|
|
3575
|
+
setFocus(false);
|
|
3576
|
+
_onBlur && _onBlur(event);
|
|
3577
|
+
}
|
|
3478
3578
|
})), error && React.createElement(Icon, _extends({}, errorProps, {
|
|
3479
|
-
className: modules_5a9ee489[
|
|
3579
|
+
className: modules_5a9ee489["warning"] + " " + ((_errorProps$className = errorProps == null ? void 0 : errorProps.className) != null ? _errorProps$className : ""),
|
|
3480
3580
|
icon: Icons.Error
|
|
3481
|
-
}))
|
|
3581
|
+
})), React.createElement("span", {
|
|
3582
|
+
className: outlineClasses.join(" ")
|
|
3583
|
+
}));
|
|
3482
3584
|
});
|
|
3483
3585
|
|
|
3484
3586
|
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}";
|
|
@@ -3494,20 +3596,20 @@ var Toggle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3494
3596
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
3495
3597
|
|
|
3496
3598
|
return React.createElement("div", {
|
|
3497
|
-
className: modules_b5ebad0d[
|
|
3599
|
+
className: modules_b5ebad0d["toggle-wrapper"]
|
|
3498
3600
|
}, React.createElement(Checkbox, _extends({}, rest, {
|
|
3499
3601
|
ref: ref,
|
|
3500
3602
|
checked: checked,
|
|
3501
|
-
className: modules_b5ebad0d[
|
|
3603
|
+
className: modules_b5ebad0d["checkbox"],
|
|
3502
3604
|
helperProps: _extends({
|
|
3503
|
-
className: modules_b5ebad0d[
|
|
3605
|
+
className: modules_b5ebad0d["toggle-helper"]
|
|
3504
3606
|
}, helperProps),
|
|
3505
3607
|
disabled: disabled,
|
|
3506
3608
|
label: children
|
|
3507
3609
|
}), React.createElement("span", {
|
|
3508
3610
|
"data-toggle": true,
|
|
3509
3611
|
"aria-hidden": "true",
|
|
3510
|
-
className: modules_b5ebad0d[
|
|
3612
|
+
className: modules_b5ebad0d["toggle"] + " " + (checked ? modules_b5ebad0d["checked"] : "") + " " + (disabled ? modules_b5ebad0d["disabled"] : "") + " "
|
|
3511
3613
|
})));
|
|
3512
3614
|
});
|
|
3513
3615
|
|
|
@@ -3523,7 +3625,7 @@ var FormControl = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3523
3625
|
className = _ref.className,
|
|
3524
3626
|
grid = _ref.grid,
|
|
3525
3627
|
_ref$align = _ref.align,
|
|
3526
|
-
align = _ref$align === void 0 ?
|
|
3628
|
+
align = _ref$align === void 0 ? "center" : _ref$align,
|
|
3527
3629
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
3528
3630
|
|
|
3529
3631
|
var renderChildren = function renderChildren() {
|
|
@@ -3539,7 +3641,7 @@ var FormControl = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3539
3641
|
|
|
3540
3642
|
if (grid && grid > 1) {
|
|
3541
3643
|
return React.createElement("div", {
|
|
3542
|
-
className: modules_1d54e29e[
|
|
3644
|
+
className: modules_1d54e29e["col-" + grid] + " " + modules_1d54e29e.column
|
|
3543
3645
|
}, childElement);
|
|
3544
3646
|
}
|
|
3545
3647
|
|
|
@@ -3550,12 +3652,12 @@ var FormControl = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3550
3652
|
return React.createElement("div", _extends({}, rest, {
|
|
3551
3653
|
ref: ref,
|
|
3552
3654
|
"data-formcontrol": true,
|
|
3553
|
-
className: modules_1d54e29e[
|
|
3655
|
+
className: modules_1d54e29e["form-control"] + " " + (className ? className : "") + " " + (grid && grid > 1 ? modules_1d54e29e.grid + " " + modules_1d54e29e["grid-" + grid] : "") + " " + modules_1d54e29e[align]
|
|
3554
3656
|
}), renderChildren());
|
|
3555
3657
|
});
|
|
3556
3658
|
|
|
3557
|
-
var css$g = ".
|
|
3558
|
-
var modules_bc06a1ad = {"input-label":"
|
|
3659
|
+
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}";
|
|
3660
|
+
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"};
|
|
3559
3661
|
n(css$g,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
3560
3662
|
|
|
3561
3663
|
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}";
|
|
@@ -3571,7 +3673,7 @@ var FormGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3571
3673
|
errorId = _ref.errorId,
|
|
3572
3674
|
errorMessageIcon = _ref.errorMessageIcon,
|
|
3573
3675
|
_ref$errorMessageIcon = _ref.errorMessageIconPosition,
|
|
3574
|
-
errorMessageIconPosition = _ref$errorMessageIcon === void 0 ?
|
|
3676
|
+
errorMessageIconPosition = _ref$errorMessageIcon === void 0 ? "before" : _ref$errorMessageIcon,
|
|
3575
3677
|
helperText = _ref.helperText,
|
|
3576
3678
|
helperId = _ref.helperId,
|
|
3577
3679
|
helperProps = _ref.helperProps,
|
|
@@ -3580,31 +3682,31 @@ var FormGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3580
3682
|
|
|
3581
3683
|
return React.createElement("div", _extends({}, rest, {
|
|
3582
3684
|
ref: ref,
|
|
3583
|
-
className: modules_8377bc0c[
|
|
3685
|
+
className: modules_8377bc0c["form-group"] + " " + (error ? modules_8377bc0c.error : "") + " " + (className != null ? className : "")
|
|
3584
3686
|
}), children, (helperText || errorMessage && error) && React.createElement("div", {
|
|
3585
3687
|
style: {
|
|
3586
3688
|
marginLeft: helperIndent + "px"
|
|
3587
3689
|
},
|
|
3588
|
-
className: modules_8377bc0c[
|
|
3690
|
+
className: modules_8377bc0c["default-helper"] + " " + (helperProps != null && helperProps.className ? helperProps.className : "")
|
|
3589
3691
|
}, helperText && !error && React.createElement(FormHelperText, _extends({}, helperProps, {
|
|
3590
|
-
className:
|
|
3692
|
+
className: "",
|
|
3591
3693
|
id: helperId
|
|
3592
3694
|
}), helperProps && helperProps.children || helperText), error && errorMessage && React.createElement("span", {
|
|
3593
|
-
className: modules_8377bc0c[
|
|
3695
|
+
className: modules_8377bc0c["error-message"]
|
|
3594
3696
|
}, React.createElement("span", {
|
|
3595
3697
|
className: modules_8377bc0c.message,
|
|
3596
3698
|
id: errorId
|
|
3597
|
-
}, errorMessageIcon && errorMessageIconPosition ===
|
|
3598
|
-
className: modules_8377bc0c[
|
|
3699
|
+
}, errorMessageIcon && errorMessageIconPosition === "before" && React.createElement(Icon, {
|
|
3700
|
+
className: modules_8377bc0c["error-icon"] + " " + modules_8377bc0c["error-icon-before"],
|
|
3599
3701
|
icon: errorMessageIcon
|
|
3600
|
-
}), errorMessage, errorMessageIcon && errorMessageIconPosition ===
|
|
3601
|
-
className: modules_8377bc0c[
|
|
3702
|
+
}), errorMessage, errorMessageIcon && errorMessageIconPosition === "after" && React.createElement(Icon, {
|
|
3703
|
+
className: modules_8377bc0c["error-icon"] + " " + modules_8377bc0c["error-icon-after"],
|
|
3602
3704
|
icon: errorMessageIcon
|
|
3603
3705
|
})))));
|
|
3604
3706
|
});
|
|
3605
3707
|
|
|
3606
|
-
var css$e = ".
|
|
3607
|
-
var modules_e401a244 = {"floating-wrapper":"
|
|
3708
|
+
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}";
|
|
3709
|
+
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"};
|
|
3608
3710
|
n(css$e,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
3609
3711
|
|
|
3610
3712
|
var _excluded$h = ["children", "className", "error", "errorMessage", "errorId", "errorMessageIcon", "errorMessageIconPosition", "helperText", "helperId", "floatingLabel", "floatingLabelActive", "required", "helperProps", "helperIndent", "labelProps", "label", "disabled", "name", "innerClassName"];
|
|
@@ -3640,14 +3742,14 @@ var Wrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3640
3742
|
};
|
|
3641
3743
|
|
|
3642
3744
|
var labelClasses = [];
|
|
3643
|
-
floatingLabel && labelClasses.push(modules_e401a244[
|
|
3644
|
-
floatingLabel && floatingLabelActive && labelClasses.push(modules_e401a244[
|
|
3745
|
+
floatingLabel && labelClasses.push(modules_e401a244["floating-label"]);
|
|
3746
|
+
floatingLabel && floatingLabelActive && labelClasses.push(modules_e401a244["floating-label-active"]);
|
|
3645
3747
|
(labelProps == null ? void 0 : labelProps.className) && labelClasses.push(labelProps.className);
|
|
3646
|
-
required && labelClasses.push(modules_e401a244[
|
|
3647
|
-
error && labelClasses.push(modules_e401a244[
|
|
3748
|
+
required && labelClasses.push(modules_e401a244["required"]);
|
|
3749
|
+
error && labelClasses.push(modules_e401a244["error"]);
|
|
3648
3750
|
return React.createElement("div", _extends({}, rest, {
|
|
3649
3751
|
ref: ref,
|
|
3650
|
-
className: modules_e401a244.wrapper + " " + (className ? className :
|
|
3752
|
+
className: modules_e401a244.wrapper + " " + (className ? className : "")
|
|
3651
3753
|
}), React.createElement(FormGroup, {
|
|
3652
3754
|
error: error,
|
|
3653
3755
|
errorMessage: errorMessage,
|
|
@@ -3659,9 +3761,9 @@ var Wrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3659
3761
|
helperProps: helperProps,
|
|
3660
3762
|
helperIndent: helperIndent
|
|
3661
3763
|
}, React.createElement("div", {
|
|
3662
|
-
className: (floatingLabel ? modules_e401a244[
|
|
3764
|
+
className: (floatingLabel ? modules_e401a244["floating-wrapper"] : "") + " " + (innerClassName ? innerClassName : "")
|
|
3663
3765
|
}, label && React.createElement(Label, _extends({}, labelProps, {
|
|
3664
|
-
className: modules_e401a244.label + " " + labelClasses.join(
|
|
3766
|
+
className: modules_e401a244.label + " " + labelClasses.join(" "),
|
|
3665
3767
|
htmlFor: name
|
|
3666
3768
|
}), label), renderChildren())));
|
|
3667
3769
|
});
|
|
@@ -3685,14 +3787,14 @@ var useWrapper = function useWrapper(value, placeholder, type) {
|
|
|
3685
3787
|
setHasFocus = _useState5[1];
|
|
3686
3788
|
|
|
3687
3789
|
useEffect(function () {
|
|
3688
|
-
if (value != null && value.length && value.length > 0 || placeholder || type ===
|
|
3790
|
+
if (value != null && value.length && value.length > 0 || placeholder || type === "datetime-local" || type === "time" || type === "date") {
|
|
3689
3791
|
setFloatingLabelActive(true);
|
|
3690
3792
|
}
|
|
3691
3793
|
}, []);
|
|
3692
3794
|
useEffect(function () {
|
|
3693
3795
|
if (value != null && value.length && value.length > 0 || hasFocus) {
|
|
3694
3796
|
setFloatingLabelActive(true);
|
|
3695
|
-
} else if (!placeholder && !hasFocus && type !==
|
|
3797
|
+
} else if (!placeholder && !hasFocus && type !== "datetime-local" && type !== "time" && type !== "date") {
|
|
3696
3798
|
setFloatingLabelActive(false);
|
|
3697
3799
|
}
|
|
3698
3800
|
}, [value, placeholder, type, hasFocus]);
|
|
@@ -3709,7 +3811,7 @@ var useWrapper = function useWrapper(value, placeholder, type) {
|
|
|
3709
3811
|
|
|
3710
3812
|
var _excluded$g = ["type", "name", "inputProps", "helperText", "helperProps", "value", "className", "error", "onChange", "onBlur", "onFocus"];
|
|
3711
3813
|
|
|
3712
|
-
var useLabelOffset = function useLabelOffset(
|
|
3814
|
+
var useLabelOffset = function useLabelOffset(input, floatingLabelActive, prefix) {
|
|
3713
3815
|
var _useState = useState({}),
|
|
3714
3816
|
labelOffset = _useState[0],
|
|
3715
3817
|
setLabelOffset = _useState[1];
|
|
@@ -3721,17 +3823,18 @@ var useLabelOffset = function useLabelOffset(wrapper, input, floatingLabelActive
|
|
|
3721
3823
|
};
|
|
3722
3824
|
|
|
3723
3825
|
useEffect(function () {
|
|
3724
|
-
if (
|
|
3826
|
+
if (input.current && prefix) {
|
|
3725
3827
|
if (floatingLabelActive) {
|
|
3726
3828
|
resetLabelOffset();
|
|
3727
3829
|
} else {
|
|
3728
|
-
var
|
|
3830
|
+
var spacingBetweenPrefixAndInput = 4;
|
|
3831
|
+
var prefixDifference = getComputedStyle(input.current).paddingLeft + spacingBetweenPrefixAndInput;
|
|
3729
3832
|
setLabelOffset({
|
|
3730
3833
|
left: prefixDifference + "px"
|
|
3731
3834
|
});
|
|
3732
3835
|
}
|
|
3733
3836
|
}
|
|
3734
|
-
}, [
|
|
3837
|
+
}, [input.current, prefix, floatingLabelActive]);
|
|
3735
3838
|
return {
|
|
3736
3839
|
labelOffset: labelOffset
|
|
3737
3840
|
};
|
|
@@ -3766,22 +3869,21 @@ var InputWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3766
3869
|
prefix = _ref2.prefix,
|
|
3767
3870
|
suffix = _ref2.suffix;
|
|
3768
3871
|
|
|
3769
|
-
var wrapper = useRef(null);
|
|
3770
3872
|
var input = useRef(null);
|
|
3771
3873
|
var hasValueOrActiveFloatingLabel = !!value || floatingLabelActive;
|
|
3772
|
-
var labelClasses = [modules_bc06a1ad[
|
|
3874
|
+
var labelClasses = [modules_bc06a1ad["input-label"]];
|
|
3773
3875
|
|
|
3774
|
-
var _useLabelOffset = useLabelOffset(
|
|
3876
|
+
var _useLabelOffset = useLabelOffset(inputProps && inputProps.ref || input, floatingLabelActive, prefix),
|
|
3775
3877
|
labelOffset = _useLabelOffset.labelOffset;
|
|
3776
3878
|
|
|
3777
|
-
hasFocus && labelClasses.push(modules_bc06a1ad[
|
|
3879
|
+
hasFocus && labelClasses.push(modules_bc06a1ad["focus"]);
|
|
3778
3880
|
return React.createElement(Wrapper, _extends({}, rest, {
|
|
3779
|
-
ref: ref
|
|
3881
|
+
ref: ref,
|
|
3780
3882
|
name: name,
|
|
3781
|
-
className: modules_bc06a1ad[
|
|
3883
|
+
className: modules_bc06a1ad["input-wrapper"] + " " + (className != null ? className : ""),
|
|
3782
3884
|
labelProps: {
|
|
3783
3885
|
id: labelId,
|
|
3784
|
-
className: labelClasses.join(
|
|
3886
|
+
className: labelClasses.join(" "),
|
|
3785
3887
|
style: _extends({}, labelOffset)
|
|
3786
3888
|
},
|
|
3787
3889
|
floatingLabelActive: floatingLabelActive,
|
|
@@ -3790,14 +3892,14 @@ var InputWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3790
3892
|
helperId: helperId,
|
|
3791
3893
|
helperText: helperText,
|
|
3792
3894
|
helperProps: _extends({}, helperProps, {
|
|
3793
|
-
className: modules_bc06a1ad[
|
|
3895
|
+
className: modules_bc06a1ad["input-wrapper-helper"] + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "") + " "
|
|
3794
3896
|
}),
|
|
3795
3897
|
helperIndent: 20
|
|
3796
3898
|
}), React.createElement(Input, _extends({}, inputProps, {
|
|
3797
|
-
prefix: hasValueOrActiveFloatingLabel ? prefix :
|
|
3798
|
-
suffix: hasValueOrActiveFloatingLabel ? suffix :
|
|
3899
|
+
prefix: hasValueOrActiveFloatingLabel ? prefix : "",
|
|
3900
|
+
suffix: hasValueOrActiveFloatingLabel ? suffix : "",
|
|
3799
3901
|
wrapperProps: {
|
|
3800
|
-
className: (floatingLabelActive ? modules_bc06a1ad[
|
|
3902
|
+
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 : "")
|
|
3801
3903
|
},
|
|
3802
3904
|
ref: inputProps && inputProps.ref || input,
|
|
3803
3905
|
"aria-labelledby": labelId,
|
|
@@ -3813,9 +3915,9 @@ var InputWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3813
3915
|
|
|
3814
3916
|
_onBlur && _onBlur(e);
|
|
3815
3917
|
setHasFocus(false);
|
|
3816
|
-
e.target.value || e.target.placeholder || inputProps != null && (_inputProps$placehold = inputProps.placeholder) != null && _inputProps$placehold.length || type ===
|
|
3918
|
+
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);
|
|
3817
3919
|
},
|
|
3818
|
-
className: (floatingLabelActive ? modules_bc06a1ad[
|
|
3920
|
+
className: (floatingLabelActive ? modules_bc06a1ad["floating-label"] : "") + " " + ((_inputProps$className = inputProps == null ? void 0 : inputProps.className) != null ? _inputProps$className : ""),
|
|
3819
3921
|
name: name,
|
|
3820
3922
|
error: error,
|
|
3821
3923
|
id: name,
|
|
@@ -3855,10 +3957,10 @@ var SelectWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3855
3957
|
helperId: helperId,
|
|
3856
3958
|
labelProps: {
|
|
3857
3959
|
id: labelId,
|
|
3858
|
-
className: modules_ee83d198[
|
|
3960
|
+
className: modules_ee83d198["select-label"]
|
|
3859
3961
|
},
|
|
3860
3962
|
helperProps: _extends({}, helperProps, {
|
|
3861
|
-
className: modules_ee83d198[
|
|
3963
|
+
className: modules_ee83d198["select-helper-text"] + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "")
|
|
3862
3964
|
}),
|
|
3863
3965
|
error: error
|
|
3864
3966
|
}), React.createElement(Select, _extends({}, selectProps, {
|
|
@@ -3871,12 +3973,12 @@ var SelectWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3871
3973
|
_onClear && _onClear(e);
|
|
3872
3974
|
},
|
|
3873
3975
|
placeholder: placeholder,
|
|
3874
|
-
className: (floatingLabelActive ? modules_ee83d198[
|
|
3976
|
+
className: (floatingLabelActive ? modules_ee83d198["floating-label-active"] : "") + " " + ((_selectProps$classNam = selectProps == null ? void 0 : selectProps.className) != null ? _selectProps$classNam : "")
|
|
3875
3977
|
}), children));
|
|
3876
3978
|
});
|
|
3877
3979
|
|
|
3878
|
-
var css$c = ".
|
|
3879
|
-
var modules_3c8e9c33 = {"textarea-label":"
|
|
3980
|
+
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}";
|
|
3981
|
+
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"};
|
|
3880
3982
|
n(css$c,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
3881
3983
|
|
|
3882
3984
|
var _excluded$e = ["name", "error", "value", "label", "placeholder", "textareaProps", "helperProps", "onChange", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "disabled"];
|
|
@@ -3910,22 +4012,22 @@ var TextareaWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3910
4012
|
setHover = _useState[1];
|
|
3911
4013
|
|
|
3912
4014
|
var optionalClasses = [];
|
|
3913
|
-
hasFocus && optionalClasses.push(modules_3c8e9c33[
|
|
3914
|
-
hover && optionalClasses.push(modules_3c8e9c33[
|
|
3915
|
-
disabled && optionalClasses.push(modules_3c8e9c33[
|
|
3916
|
-
error && optionalClasses.push(modules_3c8e9c33[
|
|
4015
|
+
hasFocus && optionalClasses.push(modules_3c8e9c33["focus"]);
|
|
4016
|
+
hover && optionalClasses.push(modules_3c8e9c33["hover"]);
|
|
4017
|
+
disabled && optionalClasses.push(modules_3c8e9c33["disabled"]);
|
|
4018
|
+
error && optionalClasses.push(modules_3c8e9c33["error"]);
|
|
3917
4019
|
return React.createElement(Wrapper, _extends({}, rest, {
|
|
3918
4020
|
ref: ref,
|
|
3919
4021
|
disabled: disabled,
|
|
3920
4022
|
labelProps: {
|
|
3921
4023
|
id: labelId,
|
|
3922
|
-
className: modules_3c8e9c33[
|
|
4024
|
+
className: modules_3c8e9c33["textarea-label"] + " " + optionalClasses.join(" ")
|
|
3923
4025
|
},
|
|
3924
4026
|
name: name,
|
|
3925
4027
|
label: label,
|
|
3926
4028
|
helperId: helperId,
|
|
3927
4029
|
helperProps: _extends({}, helperProps, {
|
|
3928
|
-
className: modules_3c8e9c33[
|
|
4030
|
+
className: modules_3c8e9c33["textarea-helper-text"]
|
|
3929
4031
|
}),
|
|
3930
4032
|
error: error,
|
|
3931
4033
|
floatingLabelActive: floatingLabelActive,
|
|
@@ -3959,12 +4061,12 @@ var TextareaWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3959
4061
|
_onMouseLeave && _onMouseLeave(e);
|
|
3960
4062
|
setHover(false);
|
|
3961
4063
|
},
|
|
3962
|
-
className: modules_3c8e9c33[
|
|
4064
|
+
className: modules_3c8e9c33["textarea"] + " " + (error ? modules_3c8e9c33["error"] : ""),
|
|
3963
4065
|
wrapperProps: {
|
|
3964
|
-
className: modules_3c8e9c33[
|
|
4066
|
+
className: modules_3c8e9c33["textarea-wrapper"] + "} " + optionalClasses.join(" ")
|
|
3965
4067
|
},
|
|
3966
4068
|
errorProps: {
|
|
3967
|
-
className: modules_3c8e9c33[
|
|
4069
|
+
className: modules_3c8e9c33["error-icon"]
|
|
3968
4070
|
}
|
|
3969
4071
|
})));
|
|
3970
4072
|
});
|
|
@@ -3975,12 +4077,12 @@ var Fieldset = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3975
4077
|
className = _ref.className,
|
|
3976
4078
|
legend = _ref.legend,
|
|
3977
4079
|
_ref$legendStyle = _ref.legendStyle,
|
|
3978
|
-
legendStyle = _ref$legendStyle === void 0 ?
|
|
4080
|
+
legendStyle = _ref$legendStyle === void 0 ? "body" : _ref$legendStyle,
|
|
3979
4081
|
_ref$hideLegend = _ref.hideLegend,
|
|
3980
4082
|
hideLegend = _ref$hideLegend === void 0 ? false : _ref$hideLegend,
|
|
3981
4083
|
noBackground = _ref.noBackground,
|
|
3982
4084
|
_ref$background = _ref.background,
|
|
3983
|
-
background = _ref$background === void 0 ? noBackground ?
|
|
4085
|
+
background = _ref$background === void 0 ? noBackground ? "" : "#FFF" : _ref$background,
|
|
3984
4086
|
_ref$noPadding = _ref.noPadding,
|
|
3985
4087
|
noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
|
|
3986
4088
|
_ref$disabled = _ref.disabled,
|
|
@@ -4021,14 +4123,14 @@ var Fieldset = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4021
4123
|
style: _extends({
|
|
4022
4124
|
backgroundColor: background
|
|
4023
4125
|
}, rest.style),
|
|
4024
|
-
className: modules_76ea8ff8.fieldset + " " + (noPadding ? modules_76ea8ff8[
|
|
4126
|
+
className: modules_76ea8ff8.fieldset + " " + (noPadding ? modules_76ea8ff8["no-padding"] : "") + " " + (className != null ? className : "")
|
|
4025
4127
|
}), legend && React.createElement("legend", {
|
|
4026
|
-
className: modules_35a251a6[
|
|
4128
|
+
className: modules_35a251a6["sr-only"]
|
|
4027
4129
|
}, legend), legend && !hideLegend && React.createElement(Typography, {
|
|
4028
4130
|
variant: legendStyle,
|
|
4029
4131
|
tag: "span",
|
|
4030
4132
|
"aria-hidden": "true",
|
|
4031
|
-
className: modules_76ea8ff8[
|
|
4133
|
+
className: modules_76ea8ff8["legend"] + " " + (required ? modules_76ea8ff8["required"] : "") + " " + (error ? modules_76ea8ff8["error"] : "")
|
|
4032
4134
|
}, legend), renderChildren());
|
|
4033
4135
|
});
|
|
4034
4136
|
|
|
@@ -4043,7 +4145,7 @@ var Form = function Form(_ref) {
|
|
|
4043
4145
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
4044
4146
|
|
|
4045
4147
|
return React.createElement("form", _extends({
|
|
4046
|
-
className: modules_b9bf355c.form + " " + (className != null ? className :
|
|
4148
|
+
className: modules_b9bf355c.form + " " + (className != null ? className : "")
|
|
4047
4149
|
}, rest), children);
|
|
4048
4150
|
};
|
|
4049
4151
|
|
|
@@ -4100,7 +4202,7 @@ var RadioWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4100
4202
|
helperId: helperId,
|
|
4101
4203
|
helperText: helperText,
|
|
4102
4204
|
helperProps: _extends({}, helperProps, {
|
|
4103
|
-
className: modules_856c8e0e[
|
|
4205
|
+
className: modules_856c8e0e["radio-wrapper-helper"] + " " + (error ? modules_856c8e0e["radio-wrapper-error"] : "") + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "")
|
|
4104
4206
|
}),
|
|
4105
4207
|
error: error,
|
|
4106
4208
|
errorId: errorId,
|
|
@@ -4155,7 +4257,7 @@ var CheckboxWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4155
4257
|
helperId: helperId,
|
|
4156
4258
|
helperText: helperText,
|
|
4157
4259
|
helperProps: _extends({}, helperProps, {
|
|
4158
|
-
className: modules_8177141b[
|
|
4260
|
+
className: modules_8177141b["checkbox-wrapper-helper"] + " " + (error ? modules_8177141b["checkbox-wrapper-error"] : "") + " " + ((_helperProps$classNam = helperProps == null ? void 0 : helperProps.className) != null ? _helperProps$classNam : "")
|
|
4159
4261
|
}),
|
|
4160
4262
|
error: error,
|
|
4161
4263
|
errorMessageIcon: Icons.Error,
|
|
@@ -4165,7 +4267,7 @@ var CheckboxWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4165
4267
|
|
|
4166
4268
|
var setWizardState = function setWizardState(steps, mode, stepScreenReaderLabel) {
|
|
4167
4269
|
return {
|
|
4168
|
-
type:
|
|
4270
|
+
type: "SET_STATE",
|
|
4169
4271
|
payload: {
|
|
4170
4272
|
steps: steps,
|
|
4171
4273
|
mode: mode,
|
|
@@ -4176,17 +4278,17 @@ var setWizardState = function setWizardState(steps, mode, stepScreenReaderLabel)
|
|
|
4176
4278
|
|
|
4177
4279
|
var changeCurrentStepNo = function changeCurrentStepNo(currentStepNo) {
|
|
4178
4280
|
return {
|
|
4179
|
-
type:
|
|
4281
|
+
type: "CHANGE_CURRENT_STEP_NO",
|
|
4180
4282
|
payload: currentStepNo
|
|
4181
4283
|
};
|
|
4182
4284
|
};
|
|
4183
4285
|
|
|
4184
4286
|
var reducer = function reducer(state, action) {
|
|
4185
4287
|
switch (action.type) {
|
|
4186
|
-
case
|
|
4288
|
+
case "SET_STATE":
|
|
4187
4289
|
return _extends({}, state, action.payload);
|
|
4188
4290
|
|
|
4189
|
-
case
|
|
4291
|
+
case "CHANGE_CURRENT_STEP_NO":
|
|
4190
4292
|
return _extends({}, state, {
|
|
4191
4293
|
currentStepNo: action.payload
|
|
4192
4294
|
});
|
|
@@ -4316,10 +4418,10 @@ var WizardActions = function WizardActions(_ref) {
|
|
|
4316
4418
|
var hasNextStep = nextStepNo !== -1;
|
|
4317
4419
|
var previousStepNo = usePreviousStepNo(mode, currentStepNo, steps);
|
|
4318
4420
|
var hasPreviousStep = previousStepNo !== -1;
|
|
4319
|
-
var isLastStepOrEditMode = !hasNextStep || mode ===
|
|
4421
|
+
var isLastStepOrEditMode = !hasNextStep || mode === "edit";
|
|
4320
4422
|
|
|
4321
4423
|
var changeStepNo = function changeStepNo(direction) {
|
|
4322
|
-
if (direction ===
|
|
4424
|
+
if (direction === "forward") {
|
|
4323
4425
|
hasNextStep && dispatch(changeCurrentStepNo(nextStepNo));
|
|
4324
4426
|
} else {
|
|
4325
4427
|
hasPreviousStep && dispatch(changeCurrentStepNo(previousStepNo));
|
|
@@ -4327,12 +4429,12 @@ var WizardActions = function WizardActions(_ref) {
|
|
|
4327
4429
|
};
|
|
4328
4430
|
|
|
4329
4431
|
var onNextWrapper = function onNextWrapper() {
|
|
4330
|
-
onNext(currentStepNo) && changeStepNo(
|
|
4432
|
+
onNext(currentStepNo) && changeStepNo("forward");
|
|
4331
4433
|
};
|
|
4332
4434
|
|
|
4333
4435
|
var onPreviousWrapper = function onPreviousWrapper() {
|
|
4334
4436
|
onPrevious && onPrevious();
|
|
4335
|
-
changeStepNo(
|
|
4437
|
+
changeStepNo("backward");
|
|
4336
4438
|
};
|
|
4337
4439
|
|
|
4338
4440
|
var onSaveAndCloseWrapper = function onSaveAndCloseWrapper() {
|
|
@@ -4346,7 +4448,7 @@ var WizardActions = function WizardActions(_ref) {
|
|
|
4346
4448
|
variant: "outline",
|
|
4347
4449
|
onClick: onPreviousWrapper
|
|
4348
4450
|
}, previousButtonLabel), hasNextStep && React.createElement(Button, {
|
|
4349
|
-
variant: mode ===
|
|
4451
|
+
variant: mode === "edit" ? "outline" : "fill",
|
|
4350
4452
|
onClick: onNextWrapper
|
|
4351
4453
|
}, nextButtonLabel), isLastStepOrEditMode && React.createElement(Button, {
|
|
4352
4454
|
onClick: onSaveAndCloseWrapper
|
|
@@ -4369,54 +4471,54 @@ var BaseWizardSteps = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4369
4471
|
|
|
4370
4472
|
var getStepState = function getStepState(stepNo) {
|
|
4371
4473
|
if (currentStepNo === stepNo) {
|
|
4372
|
-
return
|
|
4474
|
+
return "current";
|
|
4373
4475
|
} else if (stepNo < currentStepNo) {
|
|
4374
|
-
return
|
|
4476
|
+
return "finished";
|
|
4375
4477
|
}
|
|
4376
4478
|
|
|
4377
|
-
return
|
|
4479
|
+
return "future";
|
|
4378
4480
|
};
|
|
4379
4481
|
|
|
4380
4482
|
var getStepContent = function getStepContent(stepState, index, disabled) {
|
|
4381
4483
|
var stepNumberString = String(index + 1);
|
|
4382
4484
|
|
|
4383
|
-
if (stepState ===
|
|
4485
|
+
if (stepState === "finished") {
|
|
4384
4486
|
return disabled ? null : React.createElement(Icon, {
|
|
4385
|
-
className: modules_b302f2c5[
|
|
4487
|
+
className: modules_b302f2c5["checkmark"],
|
|
4386
4488
|
icon: Icons.Checkmark
|
|
4387
4489
|
});
|
|
4388
4490
|
} else {
|
|
4389
4491
|
return React.createElement(Fragment, null, React.createElement("span", {
|
|
4390
|
-
className: modules_35a251a6[
|
|
4492
|
+
className: modules_35a251a6["sr-only"]
|
|
4391
4493
|
}, stepScreenReaderLabel, " "), stepNumberString);
|
|
4392
4494
|
}
|
|
4393
4495
|
};
|
|
4394
4496
|
|
|
4395
4497
|
var generatedSteps = steps.map(function (step, index) {
|
|
4396
4498
|
var stepState = getStepState(index);
|
|
4397
|
-
var disabledStyleClassName = step.disabled ? modules_b302f2c5[
|
|
4398
|
-
var clickableClassName = futureStepsClickable ? modules_b302f2c5[
|
|
4499
|
+
var disabledStyleClassName = step.disabled ? modules_b302f2c5["disabled"] : "";
|
|
4500
|
+
var clickableClassName = futureStepsClickable ? modules_b302f2c5["clickable"] : "";
|
|
4399
4501
|
return React.createElement("button", {
|
|
4400
|
-
key: step.label.toLowerCase().replace(/\s/,
|
|
4401
|
-
disabled: step.disabled || stepState ===
|
|
4402
|
-
"aria-current": stepState ===
|
|
4502
|
+
key: step.label.toLowerCase().replace(/\s/, "-"),
|
|
4503
|
+
disabled: step.disabled || stepState === "future" && !futureStepsClickable || stepState === "current",
|
|
4504
|
+
"aria-current": stepState === "current" ? "step" : undefined,
|
|
4403
4505
|
onClick: function onClick() {
|
|
4404
4506
|
return _onClick && _onClick(index);
|
|
4405
4507
|
},
|
|
4406
|
-
className: modules_b302f2c5[
|
|
4508
|
+
className: modules_b302f2c5["wizard-element"] + " " + modules_b302f2c5[stepState] + " " + clickableClassName + " " + disabledStyleClassName
|
|
4407
4509
|
}, React.createElement("div", {
|
|
4408
|
-
className: modules_b302f2c5[
|
|
4510
|
+
className: modules_b302f2c5["number-wrapper"]
|
|
4409
4511
|
}, React.createElement("span", {
|
|
4410
|
-
className: modules_b302f2c5[
|
|
4512
|
+
className: modules_b302f2c5["number"]
|
|
4411
4513
|
}, getStepContent(stepState, index, step.disabled))), React.createElement("div", {
|
|
4412
|
-
className: modules_b302f2c5[
|
|
4514
|
+
className: modules_b302f2c5["two-line-text-overflow"]
|
|
4413
4515
|
}, React.createElement("span", {
|
|
4414
|
-
className: modules_b302f2c5[
|
|
4516
|
+
className: modules_b302f2c5["label"]
|
|
4415
4517
|
}, step.label)));
|
|
4416
4518
|
});
|
|
4417
4519
|
return React.createElement("div", _extends({}, rest, {
|
|
4418
4520
|
ref: ref,
|
|
4419
|
-
className: modules_b302f2c5[
|
|
4521
|
+
className: modules_b302f2c5["wizard"]
|
|
4420
4522
|
}), generatedSteps);
|
|
4421
4523
|
});
|
|
4422
4524
|
|
|
@@ -4443,7 +4545,7 @@ var WizardSteps = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4443
4545
|
steps: steps,
|
|
4444
4546
|
currentStepNo: currentStepNo,
|
|
4445
4547
|
stepScreenReaderLabel: stepScreenReaderLabel,
|
|
4446
|
-
futureStepsClickable: mode ===
|
|
4548
|
+
futureStepsClickable: mode === "edit"
|
|
4447
4549
|
}));
|
|
4448
4550
|
});
|
|
4449
4551
|
|
|
@@ -4451,14 +4553,14 @@ var css$7 = ".DataGrid_module_gridWrapper__f048f02f {\n padding: 1rem 0;\n}\n\n
|
|
|
4451
4553
|
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"};
|
|
4452
4554
|
n(css$7,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
4453
4555
|
|
|
4454
|
-
var css$6 = ".
|
|
4455
|
-
var modules_4fa6e81a = {"header-cell":"
|
|
4556
|
+
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}";
|
|
4557
|
+
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"};
|
|
4456
4558
|
n(css$6,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
4457
4559
|
|
|
4458
4560
|
var _excluded$7 = ["headline", "name", "disableSorting", "activeSortDirection", "onSort"];
|
|
4459
4561
|
var ariaSortMapping = {
|
|
4460
|
-
ASC:
|
|
4461
|
-
DESC:
|
|
4562
|
+
ASC: "ascending",
|
|
4563
|
+
DESC: "descending"
|
|
4462
4564
|
};
|
|
4463
4565
|
var DataGridHeaderCell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
4464
4566
|
var headline = _ref.headline,
|
|
@@ -4474,28 +4576,28 @@ var DataGridHeaderCell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4474
4576
|
|
|
4475
4577
|
var sortingIndicator = function sortingIndicator() {
|
|
4476
4578
|
var getSortingIndicatorClasses = function getSortingIndicatorClasses(direction) {
|
|
4477
|
-
var sortingIndicatorClasses = [modules_4fa6e81a[
|
|
4478
|
-
activeSortDirection && sortingIndicatorClasses.push(activeSortDirection === direction ? modules_4fa6e81a[
|
|
4579
|
+
var sortingIndicatorClasses = [modules_4fa6e81a["indicator"]];
|
|
4580
|
+
activeSortDirection && sortingIndicatorClasses.push(activeSortDirection === direction ? modules_4fa6e81a["active"] : modules_4fa6e81a["hidden"]);
|
|
4479
4581
|
return sortingIndicatorClasses;
|
|
4480
4582
|
};
|
|
4481
4583
|
|
|
4482
4584
|
return React.createElement(Fragment, null, React.createElement(Icon, {
|
|
4483
|
-
className: getSortingIndicatorClasses(
|
|
4585
|
+
className: getSortingIndicatorClasses("ASC").join(" "),
|
|
4484
4586
|
icon: Icons.TriangleUp
|
|
4485
4587
|
}), React.createElement(Icon, {
|
|
4486
|
-
className: getSortingIndicatorClasses(
|
|
4588
|
+
className: getSortingIndicatorClasses("DESC").join(" "),
|
|
4487
4589
|
icon: Icons.TriangleDown
|
|
4488
4590
|
}));
|
|
4489
4591
|
};
|
|
4490
4592
|
|
|
4491
4593
|
var innerContent = React.createElement(Fragment, null, React.createElement("span", {
|
|
4492
|
-
className: modules_4fa6e81a[
|
|
4594
|
+
className: modules_4fa6e81a["headline"]
|
|
4493
4595
|
}, headline), !disableSorting && React.createElement("div", {
|
|
4494
|
-
className: modules_4fa6e81a[
|
|
4596
|
+
className: modules_4fa6e81a["sorting-indicator-container"]
|
|
4495
4597
|
}, sortingIndicator()));
|
|
4496
4598
|
return React.createElement("th", _extends({}, rest, {
|
|
4497
4599
|
ref: ref,
|
|
4498
|
-
className: modules_4fa6e81a[
|
|
4600
|
+
className: modules_4fa6e81a["header-cell"],
|
|
4499
4601
|
"aria-sort": activeSortDirection && ariaSortMapping[activeSortDirection]
|
|
4500
4602
|
}), disableSorting ? React.createElement("div", {
|
|
4501
4603
|
key: name
|
|
@@ -4505,12 +4607,12 @@ var DataGridHeaderCell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4505
4607
|
}, innerContent));
|
|
4506
4608
|
});
|
|
4507
4609
|
|
|
4508
|
-
var css$5 = ".
|
|
4509
|
-
var modules_bec66042 = {"thead":"
|
|
4610
|
+
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}";
|
|
4611
|
+
var modules_bec66042 = {"thead":"DataGridHeader_module_thead__8c44381b","row":"DataGridHeader_module_row__8c44381b","context-menu":"DataGridHeader_module_contextMenu__8c44381b"};
|
|
4510
4612
|
n(css$5,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
4511
4613
|
|
|
4512
4614
|
var _excluded$6 = ["initialSort", "onSort", "headers", "disableContextMenuColumn", "enableMultiSorting", "spacing"];
|
|
4513
|
-
var sortingStates = [undefined,
|
|
4615
|
+
var sortingStates = [undefined, "ASC", "DESC"];
|
|
4514
4616
|
var DataGridHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
4515
4617
|
var initialSort = _ref.initialSort,
|
|
4516
4618
|
onSort = _ref.onSort,
|
|
@@ -4590,15 +4692,15 @@ var DataGridHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4590
4692
|
});
|
|
4591
4693
|
return React.createElement("thead", _extends({}, rest, {
|
|
4592
4694
|
ref: ref,
|
|
4593
|
-
className: modules_bec66042[
|
|
4695
|
+
className: modules_bec66042["thead"]
|
|
4594
4696
|
}), React.createElement("tr", {
|
|
4595
|
-
className: modules_bec66042[
|
|
4697
|
+
className: modules_bec66042["row"]
|
|
4596
4698
|
}, headerCells, !disableContextMenuColumn && React.createElement("td", {
|
|
4597
4699
|
style: {
|
|
4598
4700
|
paddingRight: spacing == null ? void 0 : spacing.paddingRight
|
|
4599
4701
|
},
|
|
4600
4702
|
"aria-label": "context menu",
|
|
4601
|
-
className: modules_bec66042[
|
|
4703
|
+
className: modules_bec66042["context-menu"]
|
|
4602
4704
|
})));
|
|
4603
4705
|
});
|
|
4604
4706
|
|
|
@@ -4615,9 +4717,9 @@ var DataGridColumnsToggle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4615
4717
|
var open = _ref.open,
|
|
4616
4718
|
headers = _ref.headers,
|
|
4617
4719
|
_ref$titleLabel = _ref.titleLabel,
|
|
4618
|
-
titleLabel = _ref$titleLabel === void 0 ?
|
|
4720
|
+
titleLabel = _ref$titleLabel === void 0 ? "Show columns" : _ref$titleLabel,
|
|
4619
4721
|
_ref$closeButtonTitle = _ref.closeButtonTitle,
|
|
4620
|
-
closeButtonTitle = _ref$closeButtonTitle === void 0 ?
|
|
4722
|
+
closeButtonTitle = _ref$closeButtonTitle === void 0 ? "Close show columns dialog" : _ref$closeButtonTitle,
|
|
4621
4723
|
onClose = _ref.onClose,
|
|
4622
4724
|
onToggleClicked = _ref.onToggleClicked,
|
|
4623
4725
|
className = _ref.className,
|
|
@@ -4628,7 +4730,7 @@ var DataGridColumnsToggle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4628
4730
|
var _useState = useState(generateID()),
|
|
4629
4731
|
id = _useState[0];
|
|
4630
4732
|
|
|
4631
|
-
var labelledId = id +
|
|
4733
|
+
var labelledId = id + "_header";
|
|
4632
4734
|
var toggles = headers.map(function (item) {
|
|
4633
4735
|
return React.createElement(Toggle, {
|
|
4634
4736
|
key: item.name,
|
|
@@ -4646,29 +4748,29 @@ var DataGridColumnsToggle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4646
4748
|
|
|
4647
4749
|
return React.createElement(Popover, _extends({}, rest, {
|
|
4648
4750
|
ref: ref,
|
|
4649
|
-
className: modules_a68425a1[
|
|
4751
|
+
className: modules_a68425a1["popover"] + " " + className,
|
|
4650
4752
|
show: open,
|
|
4651
4753
|
role: "dialog",
|
|
4652
4754
|
"aria-modal": "true",
|
|
4653
4755
|
"aria-labelledby": labelledId
|
|
4654
4756
|
}), open && createPortal(React.createElement("div", {
|
|
4655
|
-
className: modules_a68425a1[
|
|
4757
|
+
className: modules_a68425a1["backdrop"],
|
|
4656
4758
|
onClick: handleBackdropClick
|
|
4657
4759
|
}), domRoot), open && React.createElement(Fragment, null, React.createElement("div", {
|
|
4658
|
-
className: modules_a68425a1[
|
|
4760
|
+
className: modules_a68425a1["header"]
|
|
4659
4761
|
}, React.createElement(Typography, {
|
|
4660
4762
|
id: labelledId,
|
|
4661
|
-
className: modules_a68425a1[
|
|
4763
|
+
className: modules_a68425a1["title"],
|
|
4662
4764
|
tag: "span",
|
|
4663
4765
|
variant: "h4"
|
|
4664
4766
|
}, titleLabel), React.createElement(IconButton, {
|
|
4665
4767
|
onClick: onClose,
|
|
4666
|
-
className: "" + modules_a68425a1[
|
|
4768
|
+
className: "" + modules_a68425a1["close-btn"],
|
|
4667
4769
|
title: closeButtonTitle
|
|
4668
4770
|
}, React.createElement(Icon, {
|
|
4669
4771
|
icon: Icons.Times
|
|
4670
4772
|
}))), React.createElement("div", {
|
|
4671
|
-
className: modules_a68425a1[
|
|
4773
|
+
className: modules_a68425a1["content"]
|
|
4672
4774
|
}, toggles)));
|
|
4673
4775
|
});
|
|
4674
4776
|
|
|
@@ -4699,9 +4801,9 @@ var DataGridActions = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4699
4801
|
var showColumnBtn = useRef(null);
|
|
4700
4802
|
return isHidden ? null : React.createElement("div", _extends({}, rest, {
|
|
4701
4803
|
ref: ref,
|
|
4702
|
-
className: modules_3f552d89[
|
|
4804
|
+
className: modules_3f552d89["actions"] + " " + (className != null ? className : "")
|
|
4703
4805
|
}), React.createElement("div", {
|
|
4704
|
-
className: modules_3f552d89[
|
|
4806
|
+
className: modules_3f552d89["left-actions"]
|
|
4705
4807
|
}, enableAddBtn && React.createElement(Button, _extends({
|
|
4706
4808
|
color: "primary",
|
|
4707
4809
|
startIcon: React.createElement(Icon, {
|
|
@@ -4712,7 +4814,7 @@ var DataGridActions = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4712
4814
|
variant: "outline",
|
|
4713
4815
|
children: "Add item"
|
|
4714
4816
|
}, addBtnProps))), React.createElement("div", {
|
|
4715
|
-
className: modules_3f552d89[
|
|
4817
|
+
className: modules_3f552d89["right-actions"]
|
|
4716
4818
|
}, enableColumnsBtn && React.createElement(Fragment, null, React.createElement(Button, _extends({
|
|
4717
4819
|
startIcon: React.createElement(Icon, {
|
|
4718
4820
|
icon: Icons.Change
|
|
@@ -4721,7 +4823,7 @@ var DataGridActions = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4721
4823
|
variant: "text",
|
|
4722
4824
|
children: "Columns"
|
|
4723
4825
|
}, columnsBtnProps, {
|
|
4724
|
-
className: modules_3f552d89[
|
|
4826
|
+
className: modules_3f552d89["desktop"] + " " + ((_columnsBtnProps$clas = columnsBtnProps == null ? void 0 : columnsBtnProps.className) != null ? _columnsBtnProps$clas : ""),
|
|
4725
4827
|
ref: showColumnBtn,
|
|
4726
4828
|
onClick: function onClick() {
|
|
4727
4829
|
return setShowColsPopover(true);
|
|
@@ -4732,7 +4834,7 @@ var DataGridActions = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4732
4834
|
onClick: function onClick() {
|
|
4733
4835
|
return setShowColsPopover(true);
|
|
4734
4836
|
},
|
|
4735
|
-
className: modules_3f552d89[
|
|
4837
|
+
className: modules_3f552d89["mobile"] + " " + ((_columnsBtnProps$clas2 = columnsBtnProps == null ? void 0 : columnsBtnProps.className) != null ? _columnsBtnProps$clas2 : "")
|
|
4736
4838
|
}), React.createElement(Icon, {
|
|
4737
4839
|
icon: Icons.Change
|
|
4738
4840
|
})), React.createElement(DataGridColumnsToggle, {
|
|
@@ -4752,11 +4854,11 @@ var DataGridActions = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4752
4854
|
variant: "text",
|
|
4753
4855
|
children: "Search"
|
|
4754
4856
|
}, searchBtnProps, {
|
|
4755
|
-
className: modules_3f552d89[
|
|
4857
|
+
className: modules_3f552d89["desktop"] + " " + ((_searchBtnProps$class = searchBtnProps == null ? void 0 : searchBtnProps.className) != null ? _searchBtnProps$class : "")
|
|
4756
4858
|
})), React.createElement(IconButton, _extends({
|
|
4757
4859
|
title: "Search"
|
|
4758
4860
|
}, searchBtnProps, {
|
|
4759
|
-
className: modules_3f552d89[
|
|
4861
|
+
className: modules_3f552d89["mobile"] + " " + ((_columnsBtnProps$clas3 = columnsBtnProps == null ? void 0 : columnsBtnProps.className) != null ? _columnsBtnProps$clas3 : "")
|
|
4760
4862
|
}), React.createElement(Icon, {
|
|
4761
4863
|
icon: Icons.TableSearch
|
|
4762
4864
|
})))));
|
|
@@ -4790,9 +4892,9 @@ var DataGridCell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4790
4892
|
return React.createElement("td", _extends({}, rest, {
|
|
4791
4893
|
ref: ref,
|
|
4792
4894
|
style: _extends({}, rest.style, cellStyle),
|
|
4793
|
-
className: modules_e636700c[
|
|
4895
|
+
className: modules_e636700c["cell"] + " " + (className != null ? className : "")
|
|
4794
4896
|
}), isLoading && React.createElement("div", {
|
|
4795
|
-
className: modules_e636700c[
|
|
4897
|
+
className: modules_e636700c["loading"],
|
|
4796
4898
|
"aria-busy": "true",
|
|
4797
4899
|
"aria-live": "polite"
|
|
4798
4900
|
}), !isLoading && React.createElement(Typography, {
|
|
@@ -4823,18 +4925,18 @@ var DataGridRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4823
4925
|
columnLength: headers == null ? void 0 : headers.length,
|
|
4824
4926
|
disableContextMenuColumn: disableContextMenuColumn
|
|
4825
4927
|
});
|
|
4826
|
-
var visible =
|
|
4928
|
+
var visible = headers && headers.length > index ? !headers[index].hidden : true;
|
|
4827
4929
|
return visible && cellWithSpacing;
|
|
4828
4930
|
}
|
|
4829
4931
|
|
|
4830
4932
|
return null;
|
|
4831
4933
|
});
|
|
4832
|
-
var classNames = [modules_fb55f208[
|
|
4934
|
+
var classNames = [modules_fb55f208["row"]];
|
|
4833
4935
|
className && classNames.push(className);
|
|
4834
|
-
isLoading && classNames.push(modules_fb55f208[
|
|
4936
|
+
isLoading && classNames.push(modules_fb55f208["loading"]);
|
|
4835
4937
|
return React.createElement("tr", _extends({}, rest, {
|
|
4836
4938
|
ref: ref,
|
|
4837
|
-
className: classNames.join(
|
|
4939
|
+
className: classNames.join(" ")
|
|
4838
4940
|
}), visibleCells);
|
|
4839
4941
|
});
|
|
4840
4942
|
|
|
@@ -4878,7 +4980,7 @@ var DataGridBodyInner = function DataGridBodyInner(_ref, ref) {
|
|
|
4878
4980
|
|
|
4879
4981
|
if (emptyData) {
|
|
4880
4982
|
return React.createElement("tr", null, React.createElement("td", {
|
|
4881
|
-
className: modules_532fe2cf[
|
|
4983
|
+
className: modules_532fe2cf["empty"],
|
|
4882
4984
|
colSpan: visibleColumns + (disableContextMenuColumn ? 0 : 1)
|
|
4883
4985
|
}, React.createElement(Typography, {
|
|
4884
4986
|
variant: "body",
|
|
@@ -4929,11 +5031,11 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
4929
5031
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
4930
5032
|
|
|
4931
5033
|
if (!headers) {
|
|
4932
|
-
throw new Error(
|
|
5034
|
+
throw new Error("Headers definition has to be provided");
|
|
4933
5035
|
}
|
|
4934
5036
|
|
|
4935
5037
|
if (!children) {
|
|
4936
|
-
throw new Error(
|
|
5038
|
+
throw new Error("DataGridBody should be provieded with a template how to render rows");
|
|
4937
5039
|
}
|
|
4938
5040
|
|
|
4939
5041
|
var _useState = useState(headers),
|
|
@@ -4954,7 +5056,7 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
4954
5056
|
};
|
|
4955
5057
|
|
|
4956
5058
|
if (styleWithSpacing != null && styleWithSpacing.padding) {
|
|
4957
|
-
var splitPaddings = styleWithSpacing.padding.toString().split(
|
|
5059
|
+
var splitPaddings = styleWithSpacing.padding.toString().split(" ");
|
|
4958
5060
|
var paddingLeftIndex = 0;
|
|
4959
5061
|
|
|
4960
5062
|
if (splitPaddings.length >= 2) {
|
|
@@ -4982,7 +5084,7 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
4982
5084
|
}
|
|
4983
5085
|
|
|
4984
5086
|
return React.createElement("div", _extends({}, rest, {
|
|
4985
|
-
className: modules_b8d590e8[
|
|
5087
|
+
className: modules_b8d590e8["grid-wrapper"],
|
|
4986
5088
|
ref: ref,
|
|
4987
5089
|
style: {
|
|
4988
5090
|
paddingTop: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingTop,
|
|
@@ -4996,9 +5098,9 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
4996
5098
|
headers: internalHeaders,
|
|
4997
5099
|
onColumnToggled: onColumnToggled
|
|
4998
5100
|
})), React.createElement("div", {
|
|
4999
|
-
className: modules_b8d590e8[
|
|
5101
|
+
className: modules_b8d590e8["table-wrapper"]
|
|
5000
5102
|
}, React.createElement("table", {
|
|
5001
|
-
className: modules_b8d590e8[
|
|
5103
|
+
className: modules_b8d590e8["table"]
|
|
5002
5104
|
}, React.createElement(DataGridHeader, {
|
|
5003
5105
|
headers: internalHeaders,
|
|
5004
5106
|
initialSort: initialSort,
|
|
@@ -5019,7 +5121,7 @@ var DataGridInner = function DataGridInner(_ref, ref) {
|
|
|
5019
5121
|
paddingLeft: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingLeft,
|
|
5020
5122
|
paddingRight: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingRight
|
|
5021
5123
|
}),
|
|
5022
|
-
className: modules_b8d590e8[
|
|
5124
|
+
className: modules_b8d590e8["pagination"] + " " + ((_paginationProps$clas = paginationProps.className) != null ? _paginationProps$clas : "")
|
|
5023
5125
|
})));
|
|
5024
5126
|
};
|
|
5025
5127
|
|