@onewelcome/react-lib-components 0.3.0 → 1.0.1
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/LICENSE +202 -21
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/Button/BaseButton.d.ts +1 -1
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/IconButton.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/ContextMenu/ContextMenuItem.d.ts +1 -1
- package/dist/DataGrid/DataGridActions/DataGridActions.d.ts +1 -1
- package/dist/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +1 -1
- package/dist/DataGrid/DataGridBody/DataGridCell.d.ts +1 -1
- package/dist/DataGrid/DataGridBody/DataGridRow.d.ts +1 -1
- package/dist/DataGrid/DataGridHeader/DataGridHeader.d.ts +1 -1
- package/dist/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +1 -1
- package/dist/Form/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Form/Fieldset/Fieldset.d.ts +1 -1
- package/dist/Form/FormControl/FormControl.d.ts +1 -1
- package/dist/Form/FormGroup/FormGroup.d.ts +1 -1
- package/dist/Form/FormHelperText/FormHelperText.d.ts +1 -1
- package/dist/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +1 -1
- package/dist/Form/Input/Input.d.ts +2 -3
- package/dist/Form/Label/Label.d.ts +1 -1
- package/dist/Form/Radio/Radio.d.ts +1 -1
- package/dist/Form/Select/Option.d.ts +1 -1
- package/dist/Form/Select/Select.d.ts +1 -2
- package/dist/Form/Select/Select.interfaces.d.ts +22 -0
- package/dist/Form/Select/SelectService.d.ts +12 -0
- package/dist/Form/Textarea/Textarea.d.ts +1 -1
- package/dist/Form/Toggle/Toggle.d.ts +1 -1
- package/dist/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +1 -1
- package/dist/Form/Wrapper/InputWrapper/InputWrapper.d.ts +1 -1
- package/dist/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +1 -1
- package/dist/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +1 -2
- package/dist/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +1 -1
- package/dist/Form/Wrapper/Wrapper/Wrapper.d.ts +1 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Link/Link.d.ts +3 -4
- package/dist/Notifications/BaseModal/BaseModal.d.ts +1 -1
- package/dist/Notifications/BaseModal/BaseModalActions/BaseModalActions.d.ts +2 -2
- package/dist/Notifications/BaseModal/BaseModalContent/BaseModalContent.d.ts +1 -1
- package/dist/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +2 -2
- package/dist/Notifications/Dialog/Dialog.d.ts +1 -1
- package/dist/Notifications/Dialog/DialogActions/DialogActions.d.ts +1 -1
- package/dist/Notifications/Dialog/DialogTitle/DialogTitle.d.ts +1 -1
- package/dist/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.d.ts +1 -1
- package/dist/Notifications/SlideInModal/SlideInModal.d.ts +1 -1
- package/dist/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +11 -0
- package/dist/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +3 -0
- package/dist/Notifications/Snackbar/useSnackbar.d.ts +5 -1
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/Popover/Popover.d.ts +1 -1
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/StatusIndicator/StatusIndicator.d.ts +1 -1
- package/dist/Tabs/TabButton.d.ts +1 -1
- package/dist/Tabs/TabPanel.d.ts +1 -1
- package/dist/TextEllipsis/TextEllipsis.d.ts +1 -1
- package/dist/Tiles/Tile.d.ts +1 -1
- package/dist/Tiles/Tiles.d.ts +1 -1
- package/dist/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +1 -2
- package/dist/Wizard/Wizard.d.ts +0 -1
- package/dist/Wizard/WizardSteps/WizardSteps.d.ts +1 -1
- package/dist/Wizard/wizardStateReducer.d.ts +1 -3
- package/dist/_BaseStyling_/BaseStyling.d.ts +10 -4
- package/dist/react-lib-components.cjs.development.js +1158 -1559
- 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 +1158 -1559
- package/dist/react-lib-components.esm.js.map +1 -1
- package/package.json +31 -24
- package/src/Breadcrumbs/Breadcrumbs.module.scss +16 -0
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +17 -1
- package/src/Breadcrumbs/Breadcrumbs.tsx +18 -2
- package/src/Button/BaseButton.module.scss +16 -0
- package/src/Button/BaseButton.test.tsx +16 -0
- package/src/Button/BaseButton.tsx +16 -0
- package/src/Button/Button.module.scss +16 -0
- package/src/Button/Button.test.tsx +16 -0
- package/src/Button/Button.tsx +16 -0
- package/src/Button/IconButton.module.scss +16 -0
- package/src/Button/IconButton.test.tsx +16 -0
- package/src/Button/IconButton.tsx +16 -0
- package/src/ContextMenu/ContextMenu.module.scss +16 -0
- package/src/ContextMenu/ContextMenu.test.tsx +16 -0
- package/src/ContextMenu/ContextMenu.tsx +16 -0
- package/src/ContextMenu/ContextMenuItem.module.scss +16 -0
- package/src/ContextMenu/ContextMenuItem.tsx +16 -0
- package/src/DataGrid/DataGrid.module.scss +16 -0
- package/src/DataGrid/DataGrid.test.tsx +16 -0
- package/src/DataGrid/DataGrid.tsx +16 -0
- package/src/DataGrid/DataGridActions/DataGridActions.module.scss +16 -0
- package/src/DataGrid/DataGridActions/DataGridActions.test.tsx +16 -0
- package/src/DataGrid/DataGridActions/DataGridActions.tsx +16 -0
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss +16 -0
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.test.tsx +16 -0
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx +16 -0
- package/src/DataGrid/DataGridBody/DataGridBody.module.scss +16 -0
- package/src/DataGrid/DataGridBody/DataGridBody.test.tsx +16 -0
- package/src/DataGrid/DataGridBody/DataGridBody.tsx +16 -0
- package/src/DataGrid/DataGridBody/DataGridCell.module.scss +16 -0
- package/src/DataGrid/DataGridBody/DataGridCell.test.tsx +16 -0
- package/src/DataGrid/DataGridBody/DataGridCell.tsx +16 -0
- package/src/DataGrid/DataGridBody/DataGridRow.module.scss +16 -0
- package/src/DataGrid/DataGridBody/DataGridRow.test.tsx +16 -0
- package/src/DataGrid/DataGridBody/DataGridRow.tsx +16 -0
- package/src/DataGrid/DataGridHeader/DataGridHeader.module.scss +17 -1
- package/src/DataGrid/DataGridHeader/DataGridHeader.test.tsx +16 -0
- package/src/DataGrid/DataGridHeader/DataGridHeader.tsx +16 -0
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +16 -0
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.test.tsx +16 -0
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx +16 -0
- package/src/DataGrid/datagrid.interfaces.ts +16 -0
- package/src/Form/Checkbox/Checkbox.module.scss +20 -6
- package/src/Form/Checkbox/Checkbox.test.tsx +16 -0
- package/src/Form/Checkbox/Checkbox.tsx +16 -0
- package/src/Form/Fieldset/Fieldset.module.scss +16 -0
- package/src/Form/Fieldset/Fieldset.test.tsx +16 -0
- package/src/Form/Fieldset/Fieldset.tsx +21 -3
- package/src/Form/Form.module.scss +16 -0
- package/src/Form/Form.test.tsx +16 -0
- package/src/Form/Form.tsx +16 -0
- package/src/Form/FormControl/FormControl.module.scss +16 -0
- package/src/Form/FormControl/FormControl.test.tsx +16 -0
- package/src/Form/FormControl/FormControl.tsx +16 -0
- package/src/Form/FormGroup/FormGroup.module.scss +16 -0
- package/src/Form/FormGroup/FormGroup.test.tsx +16 -0
- package/src/Form/FormGroup/FormGroup.tsx +17 -1
- package/src/Form/FormHelperText/FormHelperText.module.scss +16 -0
- package/src/Form/FormHelperText/FormHelperText.test.tsx +16 -0
- package/src/Form/FormHelperText/FormHelperText.tsx +16 -0
- package/src/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss +16 -0
- package/src/Form/FormSelectorWrapper/FormSelectorWrapper.test.tsx +16 -0
- package/src/Form/FormSelectorWrapper/FormSelectorWrapper.tsx +16 -0
- package/src/Form/Input/Input.module.scss +64 -5
- package/src/Form/Input/Input.test.tsx +16 -0
- package/src/Form/Input/Input.tsx +19 -57
- package/src/Form/Label/Label.module.scss +16 -0
- package/src/Form/Label/Label.test.tsx +16 -0
- package/src/Form/Label/Label.tsx +16 -0
- package/src/Form/Radio/Radio.module.scss +20 -6
- package/src/Form/Radio/Radio.test.tsx +16 -0
- package/src/Form/Radio/Radio.tsx +16 -0
- package/src/Form/Select/Option.test.tsx +16 -0
- package/src/Form/Select/Option.tsx +16 -0
- package/src/Form/Select/Select.interfaces.ts +39 -0
- package/src/Form/Select/Select.module.scss +28 -13
- package/src/Form/Select/Select.test.tsx +16 -57
- package/src/Form/Select/Select.tsx +36 -190
- package/src/Form/Select/SelectService.ts +204 -0
- package/src/Form/Textarea/Textarea.module.scss +16 -0
- package/src/Form/Textarea/Textarea.test.tsx +16 -0
- package/src/Form/Textarea/Textarea.tsx +16 -0
- package/src/Form/Toggle/Toggle.module.scss +17 -1
- package/src/Form/Toggle/Toggle.test.tsx +16 -0
- package/src/Form/Toggle/Toggle.tsx +16 -0
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss +16 -0
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.tsx +16 -0
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx +16 -0
- package/src/Form/Wrapper/InputWrapper/InputWrapper.module.scss +27 -3
- package/src/Form/Wrapper/InputWrapper/InputWrapper.test.tsx +16 -0
- package/src/Form/Wrapper/InputWrapper/InputWrapper.tsx +16 -0
- package/src/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss +16 -0
- package/src/Form/Wrapper/RadioWrapper/RadioWrapper.test.tsx +16 -0
- package/src/Form/Wrapper/RadioWrapper/RadioWrapper.tsx +16 -0
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss +16 -0
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.test.tsx +17 -19
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +17 -15
- package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +41 -33
- package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.test.tsx +16 -0
- package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx +23 -7
- package/src/Form/Wrapper/Wrapper/Wrapper.module.scss +37 -21
- package/src/Form/Wrapper/Wrapper/Wrapper.test.tsx +16 -0
- package/src/Form/Wrapper/Wrapper/Wrapper.tsx +16 -0
- package/src/Form/form.interfaces.ts +16 -0
- package/src/Icon/Icon.module.scss +16 -0
- package/src/Icon/Icon.test.tsx +16 -0
- package/src/Icon/Icon.tsx +16 -0
- package/src/Link/Link.module.scss +21 -5
- package/src/Link/Link.test.tsx +16 -0
- package/src/Link/Link.tsx +18 -8
- package/src/Notifications/BaseModal/BaseModal.module.scss +16 -0
- package/src/Notifications/BaseModal/BaseModal.test.tsx +16 -0
- package/src/Notifications/BaseModal/BaseModal.tsx +16 -0
- package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss +16 -0
- package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.test.tsx +16 -0
- package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx +20 -4
- package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss +16 -0
- package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.test.tsx +16 -0
- package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.tsx +16 -0
- package/src/Notifications/BaseModal/BaseModalContext.ts +16 -0
- package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss +16 -0
- package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.test.tsx +16 -0
- package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx +17 -1
- package/src/Notifications/Dialog/Dialog.module.scss +16 -0
- package/src/Notifications/Dialog/Dialog.test.tsx +18 -2
- package/src/Notifications/Dialog/Dialog.tsx +16 -0
- package/src/Notifications/Dialog/DialogActions/DialogActions.module.scss +16 -0
- package/src/Notifications/Dialog/DialogActions/DialogActions.test.tsx +16 -0
- package/src/Notifications/Dialog/DialogActions/DialogActions.tsx +17 -1
- package/src/Notifications/Dialog/DialogTitle/DialogTitle.module.scss +16 -0
- package/src/Notifications/Dialog/DialogTitle/DialogTitle.test.tsx +16 -0
- package/src/Notifications/Dialog/DialogTitle/DialogTitle.tsx +16 -0
- package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.test.tsx +16 -0
- package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +16 -0
- package/src/Notifications/DiscardChangesModal/DiscardChangesModal.test.tsx +16 -0
- package/src/Notifications/DiscardChangesModal/DiscardChangesModal.tsx +16 -0
- package/src/Notifications/Modal/Modal.tsx +16 -0
- package/src/Notifications/Modal/ModalActions/ModalActions.tsx +16 -0
- package/src/Notifications/Modal/ModalContent/ModalContent.tsx +16 -0
- package/src/Notifications/Modal/ModalHeader/ModalHeader.tsx +16 -0
- package/src/Notifications/SlideInModal/SlideInModal.module.scss +16 -0
- package/src/Notifications/SlideInModal/SlideInModal.test.tsx +16 -0
- package/src/Notifications/SlideInModal/SlideInModal.tsx +16 -0
- package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.scss +19 -0
- package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.tsx +16 -0
- package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +57 -2
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +18 -0
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.tsx +16 -0
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +34 -1
- package/src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.tsx +18 -2
- package/src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +38 -2
- package/src/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +22 -1
- package/src/Notifications/Snackbar/interfaces.ts +16 -0
- package/src/Notifications/Snackbar/useSnackbar.ts +25 -1
- package/src/Pagination/Pagination.module.scss +17 -1
- package/src/Pagination/Pagination.test.tsx +17 -1
- package/src/Pagination/Pagination.tsx +16 -0
- package/src/Popover/Popover.module.scss +17 -1
- package/src/Popover/Popover.test.tsx +16 -0
- package/src/Popover/Popover.tsx +22 -0
- package/src/Skeleton/Skeleton.module.scss +16 -0
- package/src/Skeleton/Skeleton.test.tsx +17 -1
- package/src/Skeleton/Skeleton.tsx +16 -0
- package/src/StatusIndicator/StatusIndicator.module.scss +16 -0
- package/src/StatusIndicator/StatusIndicator.test.tsx +16 -0
- package/src/StatusIndicator/StatusIndicator.tsx +16 -0
- package/src/Tabs/Tab.test.tsx +16 -0
- package/src/Tabs/Tab.tsx +16 -0
- package/src/Tabs/TabButton.module.scss +20 -0
- package/src/Tabs/TabButton.test.tsx +16 -0
- package/src/Tabs/TabButton.tsx +16 -0
- package/src/Tabs/TabPanel.module.scss +20 -0
- package/src/Tabs/TabPanel.test.tsx +16 -0
- package/src/Tabs/TabPanel.tsx +16 -0
- package/src/Tabs/Tabs.module.scss +18 -2
- package/src/Tabs/Tabs.test.tsx +16 -0
- package/src/Tabs/Tabs.tsx +17 -1
- package/src/TextEllipsis/TextEllipsis.module.scss +16 -0
- package/src/TextEllipsis/TextEllipsis.test.tsx +16 -0
- package/src/TextEllipsis/TextEllipsis.tsx +16 -0
- package/src/Tiles/Tile.module.scss +18 -2
- package/src/Tiles/Tile.test.tsx +16 -0
- package/src/Tiles/Tile.tsx +16 -0
- package/src/Tiles/Tiles.module.scss +16 -0
- package/src/Tiles/Tiles.test.tsx +16 -0
- package/src/Tiles/Tiles.tsx +16 -0
- package/src/Tooltip/Tooltip.module.scss +17 -1
- package/src/Tooltip/Tooltip.test.tsx +26 -0
- package/src/Tooltip/Tooltip.tsx +18 -1
- package/src/Typography/Typography.module.scss +16 -0
- package/src/Typography/Typography.test.tsx +16 -0
- package/src/Typography/Typography.tsx +16 -0
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.module.scss +19 -7
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.test.tsx +16 -1
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.tsx +18 -19
- package/src/Wizard/Wizard.test.tsx +16 -1
- package/src/Wizard/Wizard.tsx +23 -8
- package/src/Wizard/WizardActions/WizardActions.test.tsx +16 -1
- package/src/Wizard/WizardActions/WizardActions.tsx +16 -0
- package/src/Wizard/WizardStateProvider.tsx +16 -0
- package/src/Wizard/WizardSteps/WizardSteps.test.tsx +16 -1
- package/src/Wizard/WizardSteps/WizardSteps.tsx +17 -2
- package/src/Wizard/wizardStateReducer.ts +18 -8
- package/src/_BaseStyling_/BaseStyling.test.tsx +16 -0
- package/src/_BaseStyling_/BaseStyling.tsx +41 -16
- package/src/hooks/useAnimation.test.tsx +16 -0
- package/src/hooks/useAnimation.ts +16 -0
- package/src/hooks/useBodyClick.test.tsx +16 -0
- package/src/hooks/useBodyClick.ts +16 -0
- package/src/hooks/useFormSelector.test.ts +16 -0
- package/src/hooks/useFormSelector.ts +16 -0
- package/src/hooks/usePosition.test.tsx +16 -0
- package/src/hooks/usePosition.ts +16 -0
- package/src/hooks/useRepeater.test.tsx +16 -0
- package/src/hooks/useRepeater.ts +16 -0
- package/src/hooks/useScroll.test.tsx +16 -0
- package/src/hooks/useScroll.ts +16 -0
- package/src/hooks/useSpacing.test.ts +16 -0
- package/src/hooks/useSpacing.ts +16 -0
- package/src/hooks/useWrapper.test.ts +16 -0
- package/src/hooks/useWrapper.ts +16 -0
- package/src/index.ts +16 -0
- package/src/interfaces.ts +16 -0
- package/src/mixins.module.scss +22 -7
- package/src/readyclasses.module.scss +16 -0
- package/src/types.d.ts +16 -0
- package/src/util/helper.test.tsx +16 -0
- package/src/util/helper.tsx +16 -0
- package/src/Link/types.d.ts +0 -9
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { Fragment, useContext, useMemo } from "react";
|
|
2
18
|
import { Button } from "../../Button/Button";
|
|
3
19
|
import { Step } from "../BaseWizardSteps/BaseWizardSteps";
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { createContext, Dispatch, useReducer } from "react";
|
|
2
18
|
import { WizardActions, WizardStateType, reducer } from "./wizardStateReducer";
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { useReducer } from "react";
|
|
2
18
|
import { WizardSteps, Props } from "./WizardSteps";
|
|
3
19
|
import { getAllByRole, getByText, render } from "@testing-library/react";
|
|
@@ -22,7 +38,6 @@ const initWizardState: WizardStateType = {
|
|
|
22
38
|
}
|
|
23
39
|
],
|
|
24
40
|
currentStepNo: 1,
|
|
25
|
-
stepScreenReaderLabel: "Step",
|
|
26
41
|
mode: "add"
|
|
27
42
|
};
|
|
28
43
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { ComponentPropsWithRef, useContext } from "react";
|
|
2
18
|
import { WizardStateContext } from "../WizardStateProvider";
|
|
3
19
|
import { BaseWizardSteps } from "../BaseWizardSteps/BaseWizardSteps";
|
|
@@ -10,7 +26,7 @@ export interface Props extends ComponentPropsWithRef<"div"> {
|
|
|
10
26
|
export const WizardSteps = React.forwardRef<HTMLDivElement, Props>(
|
|
11
27
|
({ onStepClick, ...rest }: Props, ref) => {
|
|
12
28
|
const {
|
|
13
|
-
state: { currentStepNo, mode,
|
|
29
|
+
state: { currentStepNo, mode, steps },
|
|
14
30
|
dispatch
|
|
15
31
|
} = useContext(WizardStateContext);
|
|
16
32
|
|
|
@@ -25,7 +41,6 @@ export const WizardSteps = React.forwardRef<HTMLDivElement, Props>(
|
|
|
25
41
|
onClick={onClick}
|
|
26
42
|
steps={steps}
|
|
27
43
|
currentStepNo={currentStepNo}
|
|
28
|
-
stepScreenReaderLabel={stepScreenReaderLabel}
|
|
29
44
|
futureStepsClickable={mode === "edit"}
|
|
30
45
|
/>
|
|
31
46
|
);
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { Reducer } from "react";
|
|
2
18
|
import { Step } from "./BaseWizardSteps/BaseWizardSteps";
|
|
3
19
|
import { WizardMode } from "./Wizard";
|
|
@@ -6,7 +22,6 @@ type WizardStateType = {
|
|
|
6
22
|
steps: Step[];
|
|
7
23
|
currentStepNo: number;
|
|
8
24
|
mode: WizardMode;
|
|
9
|
-
stepScreenReaderLabel: string;
|
|
10
25
|
};
|
|
11
26
|
|
|
12
27
|
interface SetWizardStateAction {
|
|
@@ -14,7 +29,6 @@ interface SetWizardStateAction {
|
|
|
14
29
|
payload: {
|
|
15
30
|
steps: Step[];
|
|
16
31
|
mode: WizardMode;
|
|
17
|
-
stepScreenReaderLabel: string;
|
|
18
32
|
};
|
|
19
33
|
}
|
|
20
34
|
|
|
@@ -23,12 +37,8 @@ interface ChangeCurrentStepNoAction {
|
|
|
23
37
|
payload: number;
|
|
24
38
|
}
|
|
25
39
|
|
|
26
|
-
const setWizardState = (
|
|
27
|
-
|
|
28
|
-
mode: WizardMode,
|
|
29
|
-
stepScreenReaderLabel: string
|
|
30
|
-
): SetWizardStateAction => {
|
|
31
|
-
return { type: "SET_STATE", payload: { steps, mode, stepScreenReaderLabel } };
|
|
40
|
+
const setWizardState = (steps: Step[], mode: WizardMode): SetWizardStateAction => {
|
|
41
|
+
return { type: "SET_STATE", payload: { steps, mode } };
|
|
32
42
|
};
|
|
33
43
|
|
|
34
44
|
const changeCurrentStepNo = (currentStepNo: number): ChangeCurrentStepNoAction => {
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { Fragment } from "react";
|
|
2
18
|
import { BaseStyling } from "./BaseStyling";
|
|
3
19
|
import { Button } from "../Button/Button";
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* If you add more CSS variables, and they are a color, make sure to go into /.storybook/addon/src/components/PanelContent.tsx
|
|
19
|
+
* and make sure to add it to the shouldBeColorPicker array!
|
|
20
|
+
*/
|
|
21
|
+
|
|
1
22
|
import React, { Fragment, HTMLAttributes, ReactChild, useEffect, useState } from "react";
|
|
2
23
|
|
|
3
24
|
interface CSSProperties {
|
|
@@ -11,9 +32,8 @@ interface CSSProperties {
|
|
|
11
32
|
buttonFontSize?: string;
|
|
12
33
|
buttonBorderStyle?: string;
|
|
13
34
|
buttonFillTextColor?: string;
|
|
14
|
-
|
|
35
|
+
buttonFillHoverBackgroundColor?: string;
|
|
15
36
|
buttonOutlineHoverTextColor?: string;
|
|
16
|
-
inputBorderColor?: string;
|
|
17
37
|
inputBorderRadius?: string;
|
|
18
38
|
inputBorderWidth?: string;
|
|
19
39
|
inputBorderWidthFocus?: string;
|
|
@@ -30,8 +50,8 @@ interface CSSProperties {
|
|
|
30
50
|
dataGridRowBackgroundColor?: string;
|
|
31
51
|
dataGridRowHoverBackgroundColor?: string;
|
|
32
52
|
tabsBackgroundColor?: string;
|
|
33
|
-
|
|
34
|
-
|
|
53
|
+
tabActiveBorderHeight?: string;
|
|
54
|
+
tabActiveBorderColor?: string;
|
|
35
55
|
tablistBorderWidth?: string;
|
|
36
56
|
tablistBorderStyle?: string;
|
|
37
57
|
tablistBorderColor?: string;
|
|
@@ -41,7 +61,10 @@ interface CSSProperties {
|
|
|
41
61
|
error?: string;
|
|
42
62
|
disabled?: string;
|
|
43
63
|
greyedOut?: string;
|
|
64
|
+
lightGreyBorder?: string;
|
|
44
65
|
warning?: string;
|
|
66
|
+
light?: string;
|
|
67
|
+
grey?: string;
|
|
45
68
|
fontFamily?: string;
|
|
46
69
|
fontFamilyCode?: string;
|
|
47
70
|
fontSize?: string;
|
|
@@ -60,7 +83,7 @@ export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
|
60
83
|
|
|
61
84
|
export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
62
85
|
const defaultProperties: CSSProperties = {
|
|
63
|
-
colorFocus: "
|
|
86
|
+
colorFocus: "var(--color-primary)",
|
|
64
87
|
colorPrimary: "#9e006b",
|
|
65
88
|
colorSecondary: "#003b5e",
|
|
66
89
|
colorTertiary: "#ff1e4e",
|
|
@@ -69,28 +92,27 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
69
92
|
buttonBorderWidth: "2px",
|
|
70
93
|
buttonFontSize: "1rem",
|
|
71
94
|
buttonBorderStyle: "solid",
|
|
72
|
-
buttonFillTextColor: "
|
|
73
|
-
|
|
74
|
-
buttonOutlineHoverTextColor: "
|
|
75
|
-
inputBorderColor: "#e9e9eb",
|
|
95
|
+
buttonFillTextColor: "var(--light)",
|
|
96
|
+
buttonFillHoverBackgroundColor: "var(--light)",
|
|
97
|
+
buttonOutlineHoverTextColor: "var(--light)",
|
|
76
98
|
inputBorderRadius: "8px",
|
|
77
99
|
inputBorderWidth: "1px",
|
|
78
100
|
inputBorderWidthFocus: "2px",
|
|
79
101
|
inputBorderStyle: "solid",
|
|
80
|
-
inputBackgroundColor: "
|
|
102
|
+
inputBackgroundColor: "var(--light)",
|
|
81
103
|
modalShadowColor: "rgba(0, 0, 0, 0.16)",
|
|
82
104
|
modalBackgroundColor: "#f5f8f8",
|
|
83
|
-
modalHeaderBackgroundColor: "
|
|
84
|
-
snackbarTextColor: "
|
|
105
|
+
modalHeaderBackgroundColor: "var(--light)",
|
|
106
|
+
snackbarTextColor: "var(--light)",
|
|
85
107
|
snackbarInfoBackgroundColor: "#003b5e",
|
|
86
108
|
snackbarSuccessBackgroundColor: "#008a28",
|
|
87
109
|
snackbarErrorBackgroundColor: "#d9291c",
|
|
88
110
|
snackbarBorderRadius: "8px",
|
|
89
111
|
dataGridRowBackgroundColor: "transparent",
|
|
90
112
|
dataGridRowHoverBackgroundColor: "#f5e6f0",
|
|
91
|
-
tabsBackgroundColor: "
|
|
92
|
-
|
|
93
|
-
|
|
113
|
+
tabsBackgroundColor: "var(--light)",
|
|
114
|
+
tabActiveBorderHeight: "2px",
|
|
115
|
+
tabActiveBorderColor: "var(--color-primary)",
|
|
94
116
|
tablistBorderWidth: "1px",
|
|
95
117
|
tablistBorderStyle: "solid",
|
|
96
118
|
tablistBorderColor: "#C3C3C7",
|
|
@@ -100,9 +122,12 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
100
122
|
error: "#d9291c",
|
|
101
123
|
disabled: "#e9e9eb",
|
|
102
124
|
greyedOut: "#6f6f76",
|
|
125
|
+
lightGreyBorder: "#e9e9eb",
|
|
103
126
|
warning: "#ff6105",
|
|
127
|
+
light: "#FFF",
|
|
128
|
+
grey: "#c3c3c7",
|
|
104
129
|
fontFamily: "'Red Hat Display', sans-serif",
|
|
105
|
-
fontFamilyCode: "'Red Hat Mono',
|
|
130
|
+
fontFamilyCode: "'Red Hat Mono', monospace",
|
|
106
131
|
fontSize: "1rem",
|
|
107
132
|
fontSizeH1: "2.5rem",
|
|
108
133
|
fontSizeH2: "1.625rem",
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { Fragment } from "react";
|
|
2
18
|
import { render, fireEvent } from "@testing-library/react";
|
|
3
19
|
import userEvent from "@testing-library/user-event";
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { useEffect, useRef, useState } from "react";
|
|
2
18
|
|
|
3
19
|
export const useAnimation = <RefElement extends HTMLElement>(callback: () => void) => {
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { Fragment, useState } from "react";
|
|
2
18
|
import { useBodyClick } from "./useBodyClick";
|
|
3
19
|
import { render } from "@testing-library/react";
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { useEffect } from "react";
|
|
2
18
|
|
|
3
19
|
export const useBodyClick = (
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { useFormSelector } from "./useFormSelector";
|
|
2
18
|
import { renderHook } from "@testing-library/react-hooks";
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { useEffect, useState } from "react";
|
|
2
18
|
import { generateID } from "../util/helper";
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { Fragment, useRef } from "react";
|
|
2
18
|
import { render } from "@testing-library/react";
|
|
3
19
|
import { ConfigObject, usePosition } from "./usePosition";
|
package/src/hooks/usePosition.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { useState } from "react";
|
|
2
18
|
|
|
3
19
|
export interface ConfigObject {
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { Fragment, useEffect, useState } from "react";
|
|
2
18
|
import { useRepeater } from "./useRepeater";
|
|
3
19
|
import { render } from "@testing-library/react";
|
package/src/hooks/useRepeater.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { useEffect, useState } from "react";
|
|
2
18
|
import { generateID } from "../util/helper";
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React from "react";
|
|
2
18
|
import { fireEvent, render } from "@testing-library/react";
|
|
3
19
|
import { useScroll } from "./useScroll";
|
package/src/hooks/useScroll.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import React, { useLayoutEffect } from "react";
|
|
2
18
|
|
|
3
19
|
export const useScroll = (
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { useSpacing } from "./useSpacing";
|
|
2
18
|
|
|
3
19
|
describe("useSpacing should set propert padding and margin css properties", () => {
|
package/src/hooks/useSpacing.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { CSSProperties } from "react";
|
|
2
18
|
|
|
3
19
|
export type SpacingMultiplier = 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { renderHook, act } from "@testing-library/react-hooks";
|
|
2
18
|
import { useWrapper } from "./useWrapper";
|
|
3
19
|
|
package/src/hooks/useWrapper.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { useEffect, useState } from "react";
|
|
2
18
|
import { generateID } from "../util/helper";
|
|
3
19
|
import { Type as InputTypes } from "../Form/Input/Input";
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
/* Components */
|
|
2
18
|
export { BaseStyling } from "./_BaseStyling_/BaseStyling";
|
|
3
19
|
export { Button, Props as ButtonProps } from "./Button/Button";
|
package/src/interfaces.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
export type DataAttributeKey = `data-${string}`;
|
|
2
18
|
|
|
3
19
|
export interface KeyValuePair {
|