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