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