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