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