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