@onewelcome/react-lib-components 6.6.0 → 6.7.0
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/cjs/DataGrid/DataGrid.module.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.module.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow.module.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.module.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeaderCell.module.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.module.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.cjs.js.map +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.module.cjs.js +1 -1
- package/dist/cjs/Icon/Icon.cjs.js +1 -1
- package/dist/cjs/Icon/Icon.cjs.js.map +1 -1
- package/dist/cjs/Icon/Icon.module.cjs.js +1 -1
- package/dist/cjs/Layout/ContentHeader/ContentHeader.cjs.js +2 -0
- package/dist/cjs/Layout/ContentHeader/ContentHeader.cjs.js.map +1 -0
- package/dist/cjs/Layout/ContentHeader/ContentHeader.module.cjs.js +2 -0
- package/dist/cjs/Layout/ContentHeader/ContentHeader.module.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertProvider/AlertContext.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertProvider/AlertContext.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertProvider/AlertProvider.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertProvider/AlertProvider.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/useAlert.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/useAlert.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/interfaces.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/useSnackbar.cjs.js.map +1 -1
- package/dist/cjs/Pagination/Pagination.cjs.js +1 -1
- package/dist/cjs/Pagination/Pagination.cjs.js.map +1 -1
- package/dist/cjs/Pagination/Pagination.module.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/cjs/src/components/Form/FileUpload/FileItem/FileItem.d.ts +10 -0
- package/dist/cjs/src/components/Form/FileUpload/FileUpload.d.ts +3 -0
- package/dist/cjs/src/components/Icon/Icon.d.ts +5 -1
- package/dist/cjs/src/components/Layout/ContentHeader/ContentHeader.d.ts +10 -0
- package/dist/cjs/src/components/Layout/ContentHeader/ContentHeader.test.d.ts +1 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.d.ts +7 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.test.d.ts +1 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.d.ts +10 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.test.d.ts +1 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.d.ts +6 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertContainer/AlertContainer.d.ts +12 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertContainer/AlertContainer.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.d.ts +4 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertItem/AlertItem.d.ts +22 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertItem/AlertItem.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertContext.d.ts +13 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertProvider.d.ts +22 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertProvider.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Alert/useAlert.d.ts +7 -0
- package/dist/cjs/src/components/Notifications/Alert/useAlert.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +9 -0
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +6 -0
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +9 -0
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +9 -0
- package/dist/cjs/src/components/Notifications/Snackbar/interfaces.d.ts +18 -0
- package/dist/cjs/src/components/Notifications/Snackbar/useSnackbar.d.ts +3 -0
- package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +40 -0
- package/dist/cjs/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.d.ts +8 -0
- package/dist/cjs/src/index.cjs.js +1 -1
- package/dist/cjs/src/index.d.ts +15 -0
- package/dist/esm/DataGrid/DataGrid.module.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.module.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridRow.module.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.module.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.module.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileItem/FileItem.module.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.module.esm.js +1 -1
- package/dist/esm/Icon/Icon.esm.js +1 -1
- package/dist/esm/Icon/Icon.esm.js.map +1 -1
- package/dist/esm/Icon/Icon.module.esm.js +1 -1
- package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js +2 -0
- package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js.map +1 -0
- package/dist/esm/Layout/ContentHeader/ContentHeader.module.esm.js +2 -0
- package/dist/esm/Layout/ContentHeader/ContentHeader.module.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertProvider/AlertContext.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertProvider/AlertContext.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/useAlert.esm.js +2 -0
- package/dist/esm/Notifications/Alert/useAlert.esm.js.map +1 -0
- package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/interfaces.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/useSnackbar.esm.js.map +1 -1
- package/dist/esm/Pagination/Pagination.esm.js +1 -1
- package/dist/esm/Pagination/Pagination.esm.js.map +1 -1
- package/dist/esm/Pagination/Pagination.module.esm.js +1 -1
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js +1 -1
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
- package/dist/esm/src/components/Form/FileUpload/FileItem/FileItem.d.ts +10 -0
- package/dist/esm/src/components/Form/FileUpload/FileUpload.d.ts +3 -0
- package/dist/esm/src/components/Icon/Icon.d.ts +5 -1
- package/dist/esm/src/components/Layout/ContentHeader/ContentHeader.d.ts +10 -0
- package/dist/esm/src/components/Layout/ContentHeader/ContentHeader.test.d.ts +1 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.d.ts +7 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.test.d.ts +1 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.d.ts +10 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.test.d.ts +1 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.d.ts +6 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Alert/AlertContainer/AlertContainer.d.ts +12 -0
- package/dist/esm/src/components/Notifications/Alert/AlertContainer/AlertContainer.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.d.ts +4 -0
- package/dist/esm/src/components/Notifications/Alert/AlertItem/AlertItem.d.ts +22 -0
- package/dist/esm/src/components/Notifications/Alert/AlertItem/AlertItem.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertContext.d.ts +13 -0
- package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertProvider.d.ts +22 -0
- package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertProvider.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Alert/useAlert.d.ts +7 -0
- package/dist/esm/src/components/Notifications/Alert/useAlert.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +9 -0
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +6 -0
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +9 -0
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +9 -0
- package/dist/esm/src/components/Notifications/Snackbar/interfaces.d.ts +18 -0
- package/dist/esm/src/components/Notifications/Snackbar/useSnackbar.d.ts +3 -0
- package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +40 -0
- package/dist/esm/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.d.ts +8 -0
- package/dist/esm/src/index.d.ts +15 -0
- package/dist/esm/src/index.esm.js +1 -1
- package/package.json +1 -1
- package/src/components/DataGrid/DataGrid.module.scss +2 -2
- package/src/components/DataGrid/DataGridBody/DataGridCell.module.scss +7 -2
- package/src/components/DataGrid/DataGridBody/DataGridCell.tsx +1 -1
- package/src/components/DataGrid/DataGridBody/DataGridRow.module.scss +10 -0
- package/src/components/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +16 -16
- package/src/components/DataGrid/DataGridHeader/DataGridHeader.module.scss +0 -10
- package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +1 -1
- package/src/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +3 -3
- package/src/components/Form/FileUpload/FileItem/FileItem.module.scss +114 -3
- package/src/components/Form/FileUpload/FileItem/FileItem.tsx +154 -47
- package/src/components/Form/FileUpload/FileUpload.module.scss +73 -16
- package/src/components/Form/FileUpload/FileUpload.tsx +82 -53
- package/src/components/Form/FormSection/FormSection.module.scss +12 -0
- package/src/components/Icon/Icon.module.scss +16 -1
- package/src/components/Icon/Icon.tsx +5 -1
- package/src/components/Layout/ContentHeader/ContentHeader.module.scss +44 -0
- package/src/components/Layout/ContentHeader/ContentHeader.tsx +70 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss +12 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.tsx +53 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss +25 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.tsx +54 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss +39 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.tsx +34 -0
- package/src/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss +56 -0
- package/src/components/Notifications/Alert/AlertContainer/AlertContainer.tsx +52 -0
- package/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.ts +47 -0
- package/src/components/Notifications/Alert/AlertItem/AlertItem.module.scss +277 -0
- package/src/components/Notifications/Alert/AlertItem/AlertItem.tsx +214 -0
- package/src/components/Notifications/Alert/AlertProvider/AlertContext.ts +42 -0
- package/src/components/Notifications/Alert/AlertProvider/AlertProvider.tsx +173 -0
- package/src/components/Notifications/Alert/useAlert.ts +30 -0
- package/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +9 -0
- package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +6 -0
- package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +9 -0
- package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +9 -0
- package/src/components/Notifications/Snackbar/interfaces.ts +18 -0
- package/src/components/Notifications/Snackbar/useSnackbar.ts +3 -0
- package/src/components/Pagination/Pagination.module.scss +4 -6
- package/src/components/Pagination/Pagination.tsx +3 -1
- package/src/components/_BaseStyling_/BaseStyling.tsx +78 -1
- package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss +25 -0
- package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.tsx +47 -0
- package/src/font/icomoon.eot +0 -0
- package/src/font/icomoon.svg +3 -0
- package/src/font/icomoon.ttf +0 -0
- package/src/font/icomoon.woff +0 -0
- package/src/font/selection.json +1 -1
- package/src/index.ts +21 -0
- package/src/mixins.module.scss +7 -0
- package/src/variables.scss +1 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("../../Typography/Typography.cjs.js");var a=require("./ContentHeader.module.cjs.js");function r(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var l=r(e);const d=({title:e,children:r,buttons:d,collapsed:s,subtitle:u,...n})=>l["default"].createElement("div",{className:a["default"]["header-background-color"]},l["default"].createElement("div",{className:`${a["default"]["header"]} ${n.className} ${s?a["default"]["collapsed-header"]:""}`,...n},l["default"].createElement("div",null,l["default"].createElement(t.Typography,{className:a["default"]["header-text"],variant:"h1"},e),u&&l["default"].createElement(t.Typography,{className:`${a["default"]["header-subtitle"]} ${s?a["default"]["hide-text"]:""}`,variant:"h4"},u),l["default"].createElement(t.Typography,{className:`${s?a["default"]["hide-text"]:""}`,variant:"body",spacing:{margin:0}},r)),d&&l["default"].createElement("div",{className:a["default"]["buttons-wrapper"]},d)));const s=d;exports.ContentHeader=s;exports.ContentHeaderComponent=d;
|
|
2
|
+
//# sourceMappingURL=ContentHeader.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentHeader.cjs.js","sources":["../../../../../../src/components/Layout/ContentHeader/ContentHeader.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { HTMLAttributes, ReactElement } from \"react\";\nimport { Button, Props as ButtonProps } from \"../../Button/Button\";\nimport { Typography } from \"../../Typography/Typography\";\n\nimport classes from \"./ContentHeader.module.scss\";\n\nexport interface Props extends HTMLAttributes<HTMLDivElement> {\n title: string;\n subtitle?: string;\n buttons?: ReactElement<ButtonProps, typeof Button> | ReactElement<ButtonProps, typeof Button>[];\n collapsed?: boolean;\n}\n\nexport const ContentHeaderComponent = ({\n title,\n children,\n buttons,\n collapsed,\n subtitle,\n ...rest\n}: Props) => {\n return (\n <div className={classes[\"header-background-color\"]}>\n <div\n className={`${classes[\"header\"]} ${rest.className} ${collapsed ? classes[\"collapsed-header\"] : \"\"}`}\n {...rest}\n >\n <div>\n <Typography className={classes[\"header-text\"]} variant={\"h1\"}>\n {title}\n </Typography>\n {subtitle && (\n <Typography\n className={`${classes[\"header-subtitle\"]} ${collapsed ? classes[\"hide-text\"] : \"\"}`}\n variant={\"h4\"}\n >\n {subtitle}\n </Typography>\n )}\n <Typography\n className={`${collapsed ? classes[\"hide-text\"] : \"\"}`}\n variant={\"body\"}\n spacing={{ margin: 0 }}\n >\n {children}\n </Typography>\n </div>\n {buttons && <div className={classes[\"buttons-wrapper\"]}>{buttons}</div>}\n </div>\n </div>\n );\n};\n\nexport const ContentHeader = ContentHeaderComponent;\n"],"names":["ContentHeaderComponent","title","children","buttons","collapsed","subtitle","rest","React","createElement","className","classes","Typography","variant","spacing","margin","ContentHeader"],"mappings":"0RA6BaA,EAAyB,EACpCC,QACAC,WACAC,UACAC,YACAC,cACGC,KAGDC,EAAAA,WAAKC,cAAA,MAAA,CAAAC,UAAWC,EAAAA,WAAQ,4BACtBH,aACEC,cAAA,MAAA,CAAAC,UAAW,GAAGC,EAAO,WAAC,aAAaJ,EAAKG,aAAaL,EAAYM,EAAO,WAAC,oBAAsB,QAC3FJ,GAEJC,aAAAC,cAAA,MAAA,KACED,EAAAA,WAAAC,cAACG,aAAU,CAACF,UAAWC,EAAAA,WAAQ,eAAgBE,QAAS,MACrDX,GAEFI,GACCE,EAAAA,WAACC,cAAAG,EAAUA,YACTF,UAAW,GAAGC,aAAQ,sBAAsBN,EAAYM,EAAO,WAAC,aAAe,KAC/EE,QAAS,MAERP,GAGLE,aAAAC,cAACG,EAAAA,WAAU,CACTF,UAAW,GAAGL,EAAYM,EAAO,WAAC,aAAe,KACjDE,QAAS,OACTC,QAAS,CAAEC,OAAQ,IAElBZ,IAGJC,GAAWI,EAAA,WAAAC,cAAA,MAAA,CAAKC,UAAWC,EAAO,WAAC,oBAAqBP,KAM1D,MAAMY,EAAgBf"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("../../../lib/style-inject.js");var t=".ContentHeader-module_header__SHI6g{align-items:flex-end;display:flex;gap:2rem;justify-content:space-between;max-width:105rem;padding:2rem;-webkit-transition:.5s;transition:.5s;z-index:1}.ContentHeader-module_header__SHI6g.ContentHeader-module_collapsed-header__t56HO{padding:1rem 2rem;-webkit-transition:.5s;transition:.5s}.ContentHeader-module_header-background-color__gRMa4{background-color:var(--color-blue-grey25)}.ContentHeader-module_hide-text__Nd8MK{display:none}.ContentHeader-module_header-text__Y3kRu{color:var(--color-blue-grey900);font-weight:500;line-height:3.125rem;margin:0}.ContentHeader-module_header-subtitle__eVrKh{color:var(--color-blue-grey400);font-weight:500}.ContentHeader-module_buttons-wrapper__Zpf1e{display:flex;flex-shrink:0;gap:1rem;justify-content:flex-end}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbnRlbnRIZWFkZXIubW9kdWxlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsb0NBRUUsb0JBQXFCLENBRHJCLFlBQWEsQ0FHYixRQUFTLENBRFQsNkJBQThCLENBTTlCLGdCQUFpQixDQUpqQixZQUFhLENBRWIsc0JBQXdCLENBQ3hCLGNBQWdCLENBRmhCLFNBSUYsQ0FDQSxpRkFDRSxpQkFBNEIsQ0FDNUIsc0JBQXdCLENBQ3hCLGNBQ0YsQ0FDQSxxREFDRSx5Q0FDRixDQUVBLHVDQUNFLFlBQ0YsQ0FFQSx5Q0FHRSwrQkFBZ0MsQ0FEaEMsZUFBZ0IsQ0FFaEIsb0JBQXFCLENBSHJCLFFBSUYsQ0FFQSw2Q0FDRSwrQkFBZ0MsQ0FDaEMsZUFDRixDQUVBLDZDQUNFLFlBQWEsQ0FFYixhQUFjLENBQ2QsUUFBUyxDQUZULHdCQUdGIiwiZmlsZSI6IkNvbnRlbnRIZWFkZXIubW9kdWxlLnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuaGVhZGVyIHtcbiAgZGlzcGxheTogZmxleDtcbiAgYWxpZ24taXRlbXM6IGZsZXgtZW5kO1xuICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG4gIGdhcDogMnJlbTtcbiAgcGFkZGluZzogMnJlbTtcbiAgei1pbmRleDogMTtcbiAgLXdlYmtpdC10cmFuc2l0aW9uOiAwLjVzO1xuICB0cmFuc2l0aW9uOiAwLjVzO1xuICBtYXgtd2lkdGg6IDEwNXJlbTtcbn1cbi5oZWFkZXIuY29sbGFwc2VkLWhlYWRlciB7XG4gIHBhZGRpbmc6IDFyZW0gMnJlbSAxcmVtIDJyZW07XG4gIC13ZWJraXQtdHJhbnNpdGlvbjogMC41cztcbiAgdHJhbnNpdGlvbjogMC41cztcbn1cbi5oZWFkZXItYmFja2dyb3VuZC1jb2xvciB7XG4gIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWNvbG9yLWJsdWUtZ3JleTI1KTtcbn1cblxuLmhpZGUtdGV4dCB7XG4gIGRpc3BsYXk6IG5vbmU7XG59XG5cbi5oZWFkZXItdGV4dCB7XG4gIG1hcmdpbjogMDtcbiAgZm9udC13ZWlnaHQ6IDUwMDtcbiAgY29sb3I6IHZhcigtLWNvbG9yLWJsdWUtZ3JleTkwMCk7XG4gIGxpbmUtaGVpZ2h0OiAzLjEyNXJlbTtcbn1cblxuLmhlYWRlci1zdWJ0aXRsZSB7XG4gIGNvbG9yOiB2YXIoLS1jb2xvci1ibHVlLWdyZXk0MDApO1xuICBmb250LXdlaWdodDogNTAwO1xufVxuXG4uYnV0dG9ucy13cmFwcGVyIHtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBmbGV4LWVuZDtcbiAgZmxleC1zaHJpbms6IDA7XG4gIGdhcDogMXJlbTtcbn0iXX0= */";var d={header:"ContentHeader-module_header__SHI6g","collapsed-header":"ContentHeader-module_collapsed-header__t56HO","header-background-color":"ContentHeader-module_header-background-color__gRMa4","hide-text":"ContentHeader-module_hide-text__Nd8MK","header-text":"ContentHeader-module_header-text__Y3kRu","header-subtitle":"ContentHeader-module_header-subtitle__eVrKh","buttons-wrapper":"ContentHeader-module_buttons-wrapper__Zpf1e"};e["default"](t);exports["default"]=d;
|
|
2
|
+
//# sourceMappingURL=ContentHeader.module.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentHeader.module.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("./FormSection.module.cjs.js");var r=require("../../../../Typography/Typography.cjs.js");function a(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var o=a(e);const n=({header:e,subtext:a,children:n,...c},s)=>o["default"].createElement("div",{...c,className:t["default"]["section-wrapper"],ref:s},e&&o["default"].createElement("div",{className:t["default"]["section-header-wrapper"]},o["default"].createElement(r.Typography,{variant:"h4",className:t["default"]["section-header"],spacing:{marginBottom:0}},e),a&&o["default"].createElement(r.Typography,{variant:"sub-text",spacing:{marginBottom:0}},a)),n);const c=o["default"].forwardRef(n);exports.FormSection=c;exports.FormSectionComponent=n;
|
|
2
|
+
//# sourceMappingURL=FormSection.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSection.cjs.js","sources":["../../../../../../../../src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentPropsWithRef, ForwardRefRenderFunction } from \"react\";\nimport classes from \"./FormSection.module.scss\";\nimport { Typography } from \"../../../../Typography/Typography\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n header?: string;\n subtext?: string;\n}\n\nexport const FormSectionComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { header, subtext, children, ...rest },\n ref\n) => {\n return (\n <div {...rest} className={classes[\"section-wrapper\"]} ref={ref}>\n {header && (\n <div className={classes[\"section-header-wrapper\"]}>\n <Typography\n variant=\"h4\"\n className={classes[\"section-header\"]}\n spacing={{ marginBottom: 0 }}\n >\n {header}\n </Typography>\n {subtext && (\n <Typography variant=\"sub-text\" spacing={{ marginBottom: 0 }}>\n {subtext}\n </Typography>\n )}\n </div>\n )}\n {children}\n </div>\n );\n};\n\nexport const FormSection = React.forwardRef(FormSectionComponent);\n"],"names":["FormSectionComponent","header","subtext","children","rest","ref","React","createElement","className","classes","Typography","variant","spacing","marginBottom","FormSection","forwardRef"],"mappings":"wRAyBa,MAAAA,EAAwE,EACjFC,SAAQC,UAASC,cAAaC,GAChCC,IAGEC,aAAAC,cAAA,MAAA,IAASH,EAAMI,UAAWC,aAAQ,mBAAoBJ,IAAKA,GACxDJ,GACCK,EAAK,WAAAC,cAAA,MAAA,CAAAC,UAAWC,EAAAA,WAAQ,2BACtBH,EAAC,WAAAC,cAAAG,EAAUA,YACTC,QAAQ,KACRH,UAAWC,EAAAA,WAAQ,kBACnBG,QAAS,CAAEC,aAAc,IAExBZ,GAEFC,GACCI,EAAAA,WAACC,cAAAG,EAAAA,YAAWC,QAAQ,WAAWC,QAAS,CAAEC,aAAc,IACrDX,IAKRC,GAKM,MAAAW,EAAcR,EAAAA,WAAMS,WAAWf"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("../../../../../lib/style-inject.js");var o=".FormSection-module_section-wrapper__v-bSL{padding-bottom:4rem}.FormSection-module_section-header-wrapper__5rO0U{margin-bottom:1rem}.FormSection-module_section-header__O3ioL{color:var(--color-primary500);line-height:2rem}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZvcm1TZWN0aW9uLm1vZHVsZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDJDQUNFLG1CQUNGLENBRUEsa0RBQ0Usa0JBQ0YsQ0FFQSwwQ0FFRSw2QkFBOEIsQ0FEOUIsZ0JBRUYiLCJmaWxlIjoiRm9ybVNlY3Rpb24ubW9kdWxlLnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuc2VjdGlvbi13cmFwcGVyIHtcbiAgcGFkZGluZy1ib3R0b206IDRyZW07XG59XG5cbi5zZWN0aW9uLWhlYWRlci13cmFwcGVyIHtcbiAgbWFyZ2luLWJvdHRvbTogMXJlbTtcbn1cblxuLnNlY3Rpb24taGVhZGVyIHtcbiAgbGluZS1oZWlnaHQ6IDJyZW07XG4gIGNvbG9yOiB2YXIoLS1jb2xvci1wcmltYXJ5NTAwKTtcbn0iXX0= */";var i={"section-wrapper":"FormSection-module_section-wrapper__v-bSL","section-header-wrapper":"FormSection-module_section-header-wrapper__5rO0U","section-header":"FormSection-module_section-header__O3ioL"};e["default"](o);exports["default"]=i;
|
|
2
|
+
//# sourceMappingURL=FormSection.module.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSection.module.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("./FormStepper.module.cjs.js");var r=require("../../../../Stepper/Stepper.cjs.js");function o(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var n=o(e);const i=({steps:e,direction:o,textPosition:i,...c})=>{const s=e.map((e=>{const{targetScrollViewId:t,...r}=e;if(t&&!e.onClick)return{...r,onClick:()=>{var e;try{(e=document.getElementById(t))===null||e===void 0?void 0:e.scrollIntoView()}catch(e){throw new Error("Target element not found in the DOM.")}}};return e}));return n["default"].createElement("div",{className:t["default"]["stepper"]},n["default"].createElement(r.Stepper,{...c,steps:s,direction:o,textPosition:i}))};exports.FormStepper=i;
|
|
2
|
+
//# sourceMappingURL=FormStepper.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormStepper.cjs.js","sources":["../../../../../../../../src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport classes from \"./FormStepper.module.scss\";\nimport { Stepper, Props as StepperProps } from \"../../../../Stepper/Stepper\";\nimport { Props as StepProps } from \"../../../../Stepper/Step\";\n\nexport interface FormStepProps extends StepProps {\n targetScrollViewId?: string;\n}\n\nexport interface Props extends StepperProps {\n steps: FormStepProps[];\n}\n\nexport const FormStepper = ({ steps, direction, textPosition, ...rest }: Props) => {\n const stepper = steps.map(step => {\n const { targetScrollViewId, ...stepRest } = step;\n\n if (targetScrollViewId && !step.onClick) {\n return {\n ...stepRest,\n onClick: () => {\n try {\n document.getElementById(targetScrollViewId)?.scrollIntoView();\n } catch (e) {\n throw new Error(\"Target element not found in the DOM.\");\n }\n }\n };\n }\n return step;\n });\n\n return (\n <div className={classes[\"stepper\"]}>\n <Stepper {...rest} steps={stepper} direction={direction} textPosition={textPosition} />\n </div>\n );\n};\n"],"names":["FormStepper","steps","direction","textPosition","rest","stepper","map","step","targetScrollViewId","stepRest","onClick","_a","document","getElementById","scrollIntoView","e","Error","React","createElement","className","classes","Stepper"],"mappings":"kRA6Ba,MAAAA,EAAc,EAAGC,QAAOC,YAAWC,kBAAiBC,MAC/D,MAAMC,EAAUJ,EAAMK,KAAIC,IACxB,MAAMC,mBAAEA,KAAuBC,GAAaF,EAE5C,GAAIC,IAAuBD,EAAKG,QAC9B,MAAO,IACFD,EACHC,QAAS,WACP,KACEC,EAAAC,SAASC,eAAeL,MAAmB,MAAAG,SAAA,OAAA,EAAAA,EAAEG,gBAC9C,CAAC,MAAOC,GACP,MAAM,IAAIC,MAAM,uCACjB,IAIP,OAAOT,CAAI,IAGb,OACEU,EAAAA,WAAKC,cAAA,MAAA,CAAAC,UAAWC,EAAAA,WAAQ,YACtBH,EAAAA,WAAAC,cAACG,EAAAA,QAAY,IAAAjB,EAAMH,MAAOI,EAASH,UAAWA,EAAWC,aAAcA,IAEzE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var G=require("../../../../../lib/style-inject.js");var I=".FormStepper-module_stepper__9MUPE{position:sticky;top:0}.FormStepper-module_stepper__9MUPE>div:first-child{align-items:flex-start;height:auto;min-height:15rem}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZvcm1TdGVwcGVyLm1vZHVsZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWVBLG1DQUNFLGVBQWdCLENBQ2hCLEtBQ0YsQ0FDQSxtREFHRSxzQkFBdUIsQ0FGdkIsV0FBWSxDQUNaLGdCQUVGIiwiZmlsZSI6IkZvcm1TdGVwcGVyLm1vZHVsZS5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIENvcHlyaWdodCAyMDIyIE9uZVdlbGNvbWUgQi5WLlxuICpcbiAqICAgIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSBcIkxpY2Vuc2VcIik7XG4gKiAgICB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuXG4gKiAgICBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXRcbiAqXG4gKiAgICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wXG4gKlxuICogICAgVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZVxuICogICAgZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gXCJBUyBJU1wiIEJBU0lTLFxuICogICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuXG4gKiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kXG4gKiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS5cbiAqL1xuLnN0ZXBwZXIge1xuICBwb3NpdGlvbjogc3RpY2t5O1xuICB0b3A6IDA7XG59XG4uc3RlcHBlciA+IGRpdjpmaXJzdC1jaGlsZCB7XG4gIGhlaWdodDogYXV0bztcbiAgbWluLWhlaWdodDogMTVyZW07XG4gIGFsaWduLWl0ZW1zOiBmbGV4LXN0YXJ0O1xufSJdfQ== */";var g={stepper:"FormStepper-module_stepper__9MUPE"};G["default"](I);exports["default"]=g;
|
|
2
|
+
//# sourceMappingURL=FormStepper.module.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormStepper.module.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("./FormWithStepper.module.cjs.js");function r(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var a=r(e);const l=({children:e,stepper:r,...l})=>a["default"].createElement("div",{className:`${t["default"]["wrapper"]} ${l.className}`,...l},a["default"].createElement("div",{className:t["default"]["content"]},r,a["default"].createElement("div",{className:t["default"]["form-section"]},e)));exports.FormWithStepper=l;
|
|
2
|
+
//# sourceMappingURL=FormWithStepper.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormWithStepper.cjs.js","sources":["../../../../../../../src/components/Layout/FormPage/FormWithStepper/FormWithStepper.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { HTMLAttributes, ReactElement } from \"react\";\nimport { Props as FormStepperProps, FormStepper } from \"./FormStepper/FormStepper\";\nimport classes from \"./FormWithStepper.module.scss\";\n\nexport interface Props extends HTMLAttributes<HTMLDivElement> {\n stepper?: ReactElement<FormStepperProps, typeof FormStepper>;\n}\n\nexport const FormWithStepper = ({ children, stepper, ...rest }: Props) => {\n return (\n <div className={`${classes[\"wrapper\"]} ${rest.className}`} {...rest}>\n <div className={classes[\"content\"]}>\n {stepper}\n <div className={classes[\"form-section\"]}>{children}</div>\n </div>\n </div>\n );\n};\n"],"names":["FormWithStepper","children","stepper","rest","React","createElement","className","classes"],"mappings":"kOAwBO,MAAMA,EAAkB,EAAGC,WAAUC,aAAYC,KAEpDC,EAAA,WAAAC,cAAA,MAAA,CAAKC,UAAW,GAAGC,EAAAA,WAAQ,cAAcJ,EAAKG,eAAiBH,GAC7DC,EAAA,WAAAC,cAAA,MAAA,CAAKC,UAAWC,EAAAA,WAAQ,YACrBL,EACDE,aAAAC,cAAA,MAAA,CAAKC,UAAWC,aAAQ,iBAAkBN"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var l=require("../../../../lib/style-inject.js");var I=".FormWithStepper-module_wrapper__j1iyK{font-family:var(--font-family);margin:0 auto;position:relative}.FormWithStepper-module_wrapper__j1iyK .FormWithStepper-module_content__5EN-5{background-color:var(--color-white);display:flex;gap:3.5rem;height:calc(100vh - 13.25rem);overflow:auto;position:relative;scroll-behavior:smooth}.FormWithStepper-module_wrapper__j1iyK .FormWithStepper-module_content__5EN-5 .FormWithStepper-module_form-section__EVbON{display:flex;flex:0 0 72%;flex-direction:column}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZvcm1XaXRoU3RlcHBlci5tb2R1bGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlQSx1Q0FHRSw4QkFBK0IsQ0FEL0IsYUFBYyxDQURkLGlCQUdGLENBQ0EsOEVBSUUsbUNBQW9DLENBRnBDLFlBQWEsQ0FDYixVQUFXLENBRVgsNkJBQThCLENBQzlCLGFBQWMsQ0FMZCxpQkFBa0IsQ0FNbEIsc0JBQ0YsQ0FDQSwwSEFDRSxZQUFhLENBRWIsWUFBYSxDQURiLHFCQUVGIiwiZmlsZSI6IkZvcm1XaXRoU3RlcHBlci5tb2R1bGUuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBDb3B5cmlnaHQgMjAyMiBPbmVXZWxjb21lIEIuVi5cbiAqXG4gKiAgICBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpO1xuICogICAgeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLlxuICogICAgWW91IG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jdGlvbjogY29sdW1uO1xuICBmbGV4OiAwIDAgNzIlO1xufSJdfQ== */";var e={wrapper:"FormWithStepper-module_wrapper__j1iyK",content:"FormWithStepper-module_content__5EN-5","form-section":"FormWithStepper-module_form-section__EVbON"};l["default"](I);exports["default"]=e;
|
|
2
|
+
//# sourceMappingURL=FormWithStepper.module.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormWithStepper.module.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("./AlertContainer.module.cjs.js");var r=require("./useAlertContainerHeightAnimation.cjs.js");function n(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var a=n(e);const i=({placement:e,children:n,zIndex:i,className:l,...o})=>{const{height:s,justifyContent:u}=r.useAlertContainerHeightAnimation();const c=[t["default"]["alerts"],t["default"][e.horizontal],t["default"][e.vertical],l!==null&&l!==void 0?l:""];return a["default"].createElement("div",{...o,style:{zIndex:i,height:s,justifyContent:u},className:c.join(" ")},n)};exports.AlertContainer=i;
|
|
2
|
+
//# sourceMappingURL=AlertContainer.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertContainer.cjs.js","sources":["../../../../../../../src/components/Notifications/Alert/AlertContainer/AlertContainer.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport classes from \"./AlertContainer.module.scss\";\nimport { useAlertContainerHeightAnimation } from \"./useAlertContainerHeightAnimation\";\n\nexport interface Placement {\n vertical: \"top\" | \"bottom\";\n horizontal: \"start\" | \"center\" | \"end\";\n}\n\nexport interface Props {\n placement: Placement;\n children?: React.ReactNode;\n zIndex?: number;\n className?: string;\n}\n\nexport const AlertContainer = ({ placement, children, zIndex, className, ...rest }: Props) => {\n const { height, justifyContent } = useAlertContainerHeightAnimation();\n\n const containerClasses = [\n classes[\"alerts\"],\n classes[placement.horizontal],\n classes[placement.vertical],\n className ?? \"\"\n ];\n\n return (\n <div\n {...rest}\n style={{ zIndex, height, justifyContent }}\n className={containerClasses.join(\" \")}\n >\n {children}\n </div>\n );\n};\n"],"names":["AlertContainer","placement","children","zIndex","className","rest","height","justifyContent","useAlertContainerHeightAnimation","containerClasses","classes","horizontal","vertical","React","createElement","style","join"],"mappings":"4RAgCa,MAAAA,EAAiB,EAAGC,YAAWC,WAAUC,SAAQC,eAAcC,MAC1E,MAAMC,OAAEA,EAAMC,eAAEA,GAAmBC,EAAgCA,mCAEnE,MAAMC,EAAmB,CACvBC,EAAAA,WAAQ,UACRA,EAAO,WAACT,EAAUU,YAClBD,EAAO,WAACT,EAAUW,UAClBR,IAAA,MAAAA,SAAA,EAAAA,EAAa,IAGf,OACES,EAAAA,WACMC,cAAA,MAAA,IAAAT,EACJU,MAAO,CAAEZ,SAAQG,SAAQC,kBACzBH,UAAWK,EAAiBO,KAAK,MAEhCd,EAEH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("../../../../lib/style-inject.js");var i='/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.AlertContainer-module_sr-only__ZIhS-{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.AlertContainer-module_hidden__PI5rt{display:none}.AlertContainer-module_slide-in__pdLQV{animation:AlertContainer-module_slide-in__pdLQV .5s forwards}@media (prefers-reduced-motion:reduce){.AlertContainer-module_slide-in__pdLQV{animation-duration:.1ms}}.AlertContainer-module_slide-out__FE71u{animation:AlertContainer-module_slide-out__FE71u .5s forwards}@media (prefers-reduced-motion:reduce){.AlertContainer-module_slide-out__FE71u{animation-duration:.1ms}}@keyframes AlertContainer-module_slide-in__pdLQV{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes AlertContainer-module_slide-out__FE71u{0%{transform:translateY(0)}to{transform:translateY(100vh)}}\n/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.AlertContainer-module_alerts__CrOda{display:flex;flex-direction:column;position:fixed;transition-duration:.2s;transition-property:height;transition-timing-function:ease-in-out;width:100%;z-index:20}@media (prefers-reduced-motion:reduce){.AlertContainer-module_alerts__CrOda{transition-duration:.1ms}}.AlertContainer-module_alerts__CrOda.AlertContainer-module_bottom__icFQx{bottom:3.5rem}.AlertContainer-module_alerts__CrOda.AlertContainer-module_top__-GCBE{top:3.5rem}.AlertContainer-module_alerts__CrOda.AlertContainer-module_center__72xev,.AlertContainer-module_alerts__CrOda.AlertContainer-module_start__Ub-IS{left:0}.AlertContainer-module_alerts__CrOda.AlertContainer-module_end__lcB20{right:0}@media only screen and (min-width:37.5em){.AlertContainer-module_alerts__CrOda{width:auto}.AlertContainer-module_alerts__CrOda.AlertContainer-module_center__72xev{left:calc(50% - 18.75rem)}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFsZXJ0Q29udGFpbmVyLm1vZHVsZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBQ0Y7Ozs7Ozs7Ozs7Ozs7O0VBY0U7QUFDRjs7Ozs7Ozs7Ozs7Ozs7RUFjRSxDQUNGLHNDQU9FLGtCQUFzQixDQUN0QixRQUFTLENBTFQsVUFBVyxDQUVYLFdBQVksQ0FDWixlQUFnQixDQUZoQixTQUFVLENBSFYsaUJBQWtCLENBQ2xCLFNBT0YsQ0FFQSxxQ0FDRSxZQUNGLENBRUEsdUNBQ0UsNERBQ0YsQ0FDQSx1Q0FDRSx1Q0FDRSx1QkFDRixDQUNGLENBRUEsd0NBQ0UsNkRBQ0YsQ0FDQSx1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y2UpIHtcbiAgLmFsZXJ0cyB7XG4gICAgdHJhbnNpdGlvbi1kdXJhdGlvbjogMC4xbXM7XG4gIH1cbn1cbi5hbGVydHMuYm90dG9tIHtcbiAgYm90dG9tOiAzLjVyZW07XG59XG4uYWxlcnRzLnRvcCB7XG4gIHRvcDogMy41cmVtO1xufVxuLmFsZXJ0cy5zdGFydCB7XG4gIGxlZnQ6IDA7XG59XG4uYWxlcnRzLmNlbnRlciB7XG4gIGxlZnQ6IDA7XG59XG4uYWxlcnRzLmVuZCB7XG4gIHJpZ2h0OiAwO1xufVxuXG5AbWVkaWEgb25seSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDM3LjVlbSkge1xuICAuYWxlcnRzIHtcbiAgICB3aWR0aDogaW5pdGlhbDtcbiAgfVxuICAuYWxlcnRzLmNlbnRlciB7XG4gICAgbGVmdDogY2FsYyg1MCUgLSAxOC43NXJlbSk7XG4gIH1cbn0iXX0= */';var l={"sr-only":"AlertContainer-module_sr-only__ZIhS-",hidden:"AlertContainer-module_hidden__PI5rt","slide-in":"AlertContainer-module_slide-in__pdLQV","slide-out":"AlertContainer-module_slide-out__FE71u",alerts:"AlertContainer-module_alerts__CrOda",bottom:"AlertContainer-module_bottom__icFQx",top:"AlertContainer-module_top__-GCBE",start:"AlertContainer-module_start__Ub-IS",center:"AlertContainer-module_center__72xev",end:"AlertContainer-module_end__lcB20"};e["default"](i);exports["default"]=l;
|
|
2
|
+
//# sourceMappingURL=AlertContainer.module.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertContainer.module.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("../AlertProvider/AlertContext.cjs.js");function r(){const{alerts:r}=e.useContext(t["default"]);const[n,s]=e.useState(0);const[i,l]=e.useState("flex-start");const o=8;const u=r.length>=3;e.useEffect((()=>{const e=r.map((e=>{var t;return(t=e.height)!==null&&t!==void 0?t:0}));let t=e.reduce(((e,t)=>e+t),0);t+=(Math.min(r.length,3)-1)*o;if(u)setTimeout((()=>{l("flex-end")}),500);if(n>t&&i!=="flex-end")l("flex-end");else if(n<t&&i!=="flex-start")l("flex-start");s(t)}),[r]);return{height:n,justifyContent:i}}exports.useAlertContainerHeightAnimation=r;
|
|
2
|
+
//# sourceMappingURL=useAlertContainerHeightAnimation.cjs.js.map
|
package/dist/cjs/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlertContainerHeightAnimation.cjs.js","sources":["../../../../../../../src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useContext, useEffect, useState } from \"react\";\nimport AlertContext from \"../AlertProvider/AlertContext\";\n\nexport function useAlertContainerHeightAnimation() {\n const { alerts } = useContext(AlertContext);\n const [height, setHeight] = useState(0);\n const [justifyContent, setJustifyContent] = useState<\"flex-start\" | \"flex-end\">(\"flex-start\");\n const spaceBetweenAlerts = 8;\n const exceedsMaximumVisibleAlerts = alerts.length >= 3;\n\n useEffect(() => {\n const allHeights = alerts.map(alert => alert.height ?? 0);\n let totalHeight = allHeights.reduce((prev, curr) => prev + curr, 0);\n totalHeight += (Math.min(alerts.length, 3) - 1) * spaceBetweenAlerts;\n\n if (exceedsMaximumVisibleAlerts) {\n setTimeout(() => {\n setJustifyContent(\"flex-end\");\n }, 500);\n }\n if (height > totalHeight && justifyContent !== \"flex-end\") {\n setJustifyContent(\"flex-end\");\n } else if (height < totalHeight && justifyContent !== \"flex-start\") {\n setJustifyContent(\"flex-start\");\n }\n\n setHeight(totalHeight);\n }, [alerts]);\n\n return { height, justifyContent };\n}\n"],"names":["useAlertContainerHeightAnimation","alerts","useContext","AlertContext","height","setHeight","useState","justifyContent","setJustifyContent","spaceBetweenAlerts","exceedsMaximumVisibleAlerts","length","useEffect","allHeights","map","alert","_a","totalHeight","reduce","prev","curr","Math","min","setTimeout"],"mappings":"4JAmBgBA,IACd,MAAMC,OAAEA,GAAWC,EAAUA,WAACC,EAAY,YAC1C,MAAOC,EAAQC,GAAaC,EAAQA,SAAC,GACrC,MAAOC,EAAgBC,GAAqBF,EAAQA,SAA4B,cAChF,MAAMG,EAAqB,EAC3B,MAAMC,EAA8BT,EAAOU,QAAU,EAErDC,EAAAA,WAAU,KACR,MAAMC,EAAaZ,EAAOa,KAAIC,IAAQ,IAAAC,EAAC,OAAAA,EAAAD,EAAMX,UAAM,MAAAY,SAAA,EAAAA,EAAI,CAAC,IACxD,IAAIC,EAAcJ,EAAWK,QAAO,CAACC,EAAMC,IAASD,EAAOC,GAAM,GACjEH,IAAgBI,KAAKC,IAAIrB,EAAOU,OAAQ,GAAK,GAAKF,EAElD,GAAIC,EACFa,YAAW,KACTf,EAAkB,WAAW,GAC5B,KAEL,GAAIJ,EAASa,GAAeV,IAAmB,WAC7CC,EAAkB,iBACb,GAAIJ,EAASa,GAAeV,IAAmB,aACpDC,EAAkB,cAGpBH,EAAUY,EAAY,GACrB,CAAChB,IAEJ,MAAO,CAAEG,SAAQG,iBACnB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("../../../Button/IconButton.cjs.js");var r=require("../../../Icon/Icon.cjs.js");var n=require("./AlertItem.module.cjs.js");var a=require("../../../src/readyclasses.module.cjs.js");var o=require("../../../src/hooks/useAnimation.cjs.js");var l=require("../../../Typography/Typography.cjs.js");var s=require("../AlertProvider/AlertContext.cjs.js");function i(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var c=i(e);const u=(t,r)=>{const n=e.useContext(s["default"]);e.useEffect((()=>{if(t.current)n.setAlertHeight(r,t.current.getBoundingClientRect().height)}),[t.current])};let d=1;const f=({id:s,title:i,duration:f,variant:m="neutral",emphasis:v="low",content:p,className:h,actions:j=[],onClose:E,closeButtonTitle:g,wasShown:y})=>{const I=e.useRef();const b=()=>{E===null||E===void 0?void 0:E()};const{ref:A,animationStarted:C,startAnimation:N}=o.useAnimation(b);u(A,s);e.useEffect((()=>{var e,t,r,n;if(f&&f>0)I.current=setTimeout((()=>N()),f);if(A){(e=A.current)===null||e===void 0?void 0:e.addEventListener("focus",T);(t=A.current)===null||t===void 0?void 0:t.addEventListener("blur",q);(r=A.current)===null||r===void 0?void 0:r.addEventListener("mouseenter",T);(n=A.current)===null||n===void 0?void 0:n.addEventListener("mouseleave",q)}return()=>{I.current&&clearTimeout(I.current)}}),[]);const T=()=>{I.current&&clearTimeout(I.current)};const q=()=>{if(f&&f>0)I.current=setTimeout((()=>N()),f)};const k=()=>{if(m==="error")return r.Icons.ErrorAlt;if(m==="warning")return r.Icons.Warning;return m==="success"?r.Icons.CheckmarkCircleAlt:r.Icons.InfoCircle};const w=j.map((e=>c["default"].createElement("button",{key:`alert-action-button-${(d++).toString()}`,...e,onClick:t=>{var r;E===null||E===void 0?void 0:E();(r=e.onClick)===null||r===void 0?void 0:r.call(e,t)},className:n["default"]["action-button"]},e.label)));const B=()=>{const e=[n["default"]["alert"],n["default"][`${m}`],n["default"][`emph-${v}`]];if(C)e.push(a["default"]["slide-out"]);if(!C&&!y)e.push(a["default"]["slide-in"]);if(h)e.push(h);return e.join(" ")};const x=()=>{if(m==="error"&&(v==="medium"||v==="high"))return"assertive";return"polite"};const L=()=>{if(p)return p;return i};return c["default"].createElement("div",{["data-testid"]:"alert-container",ref:A,"aria-live":x(),className:B(),role:"alert"},c["default"].createElement("div",{className:n["default"]["outer-content-wrapper"]},c["default"].createElement(r.Icon,{icon:k(),className:n["default"]["icon"]}),c["default"].createElement("div",{className:n["default"]["content-wrapper"],role:"log"},!!i&&!!p&&c["default"].createElement(l.Typography,{["data-testid"]:"alert-title",className:n["default"]["title"],variant:"body-bold",tag:"span"},i),(!!p||!!i)&&c["default"].createElement(l.Typography,{["data-testid"]:"alert-content",className:n["default"]["content"],variant:"body"},L()))),w.length>0&&c["default"].createElement("div",{["data-testid"]:"alert-actions",className:n["default"]["actions"]},w),E&&c["default"].createElement(t.IconButton,{className:n["default"]["close-btn"],onClick:e=>{e.stopPropagation();N()},title:g,["data-testid"]:"alert-close"},c["default"].createElement(r.Icon,{icon:r.Icons.Times})))};exports.AlertItem=f;
|
|
2
|
+
//# sourceMappingURL=AlertItem.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertItem.cjs.js","sources":["../../../../../../../src/components/Notifications/Alert/AlertItem/AlertItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ButtonHTMLAttributes, useContext, useEffect, useRef } from \"react\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport classes from \"./AlertItem.module.scss\";\nimport readyclasses from \"../../../../readyclasses.module.scss\";\nimport { useAnimation } from \"../../../../hooks/useAnimation\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport AlertContext from \"../AlertProvider/AlertContext\";\n\nexport const EMPHASES = [\"low\", \"medium\", \"high\"] as const;\nexport type Emphasis = (typeof EMPHASES)[keyof typeof EMPHASES];\n\nexport const VARIANTS = [\"neutral\", \"informative\", \"success\", \"warning\", \"error\"] as const;\nexport type Variant = (typeof VARIANTS)[keyof typeof VARIANTS];\n\nexport type Actions = (ButtonHTMLAttributes<HTMLButtonElement> & { label: string })[];\n\nexport interface Props {\n id: string;\n title?: string;\n content?: string;\n duration?: number;\n emphasis?: Emphasis;\n variant?: Variant;\n className?: string;\n onClose?: () => void;\n closeButtonTitle?: string;\n actions?: Actions;\n wasShown?: boolean;\n}\n\nconst useRegisterAlertHeight = (\n singleAlertRef: React.RefObject<HTMLDivElement>,\n alertId: string\n) => {\n const ctx = useContext(AlertContext);\n\n useEffect(() => {\n if (singleAlertRef.current) {\n ctx.setAlertHeight(alertId, singleAlertRef.current.getBoundingClientRect().height);\n }\n }, [singleAlertRef.current]);\n};\n\nlet actionButtonKeyCounter = 1;\nexport const AlertItem = ({\n id,\n title,\n duration,\n variant = \"neutral\",\n emphasis = \"low\",\n content,\n className,\n actions = [],\n onClose,\n closeButtonTitle,\n wasShown\n}: Props) => {\n const timerHandler = useRef<ReturnType<typeof setTimeout>>();\n const onAnimationEnd = () => {\n onClose?.();\n };\n const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);\n\n useRegisterAlertHeight(ref, id);\n\n useEffect(() => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n if (ref) {\n ref.current?.addEventListener(\"focus\", onItemFocus);\n ref.current?.addEventListener(\"blur\", onItemBlur);\n ref.current?.addEventListener(\"mouseenter\", onItemFocus);\n ref.current?.addEventListener(\"mouseleave\", onItemBlur);\n }\n return () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n }, []);\n\n const onItemFocus = () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n\n const onItemBlur = () => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n };\n\n const getVariantIcon = () => {\n if (variant === \"error\") {\n return Icons.ErrorAlt;\n }\n\n if (variant === \"warning\") {\n return Icons.Warning;\n }\n\n return variant === \"success\" ? Icons.CheckmarkCircleAlt : Icons.InfoCircle;\n };\n\n const actionButtons = actions.map(actionProp => (\n <button\n key={`alert-action-button-${(actionButtonKeyCounter++).toString()}`}\n {...actionProp}\n onClick={e => {\n onClose?.();\n actionProp.onClick?.(e);\n }}\n className={classes[\"action-button\"]}\n >\n {actionProp.label}\n </button>\n ));\n\n const getAlertClasses = (): string => {\n const alertClasses = [classes[\"alert\"], classes[`${variant}`], classes[`emph-${emphasis}`]];\n if (animationStarted) {\n alertClasses.push(readyclasses[\"slide-out\"]);\n }\n if (!animationStarted && !wasShown) {\n alertClasses.push(readyclasses[\"slide-in\"]);\n }\n if (className) {\n alertClasses.push(className);\n }\n return alertClasses.join(\" \");\n };\n\n const getAria = () => {\n if (variant === \"error\" && (emphasis === \"medium\" || emphasis === \"high\")) {\n return \"assertive\";\n }\n return \"polite\";\n };\n\n const getContentOrTitle = () => {\n if (content) {\n return content;\n }\n return title;\n };\n\n return (\n <div\n {...{ [\"data-testid\"]: \"alert-container\" }}\n ref={ref}\n aria-live={getAria()}\n className={getAlertClasses()}\n role=\"alert\"\n >\n <div className={classes[\"outer-content-wrapper\"]}>\n <Icon icon={getVariantIcon()} className={classes[\"icon\"]} />\n <div className={classes[\"content-wrapper\"]} role=\"log\">\n {!!title && !!content && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-title\" }}\n className={classes[\"title\"]}\n variant=\"body-bold\"\n tag=\"span\"\n >\n {title}\n </Typography>\n )}\n {(!!content || !!title) && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-content\" }}\n className={classes[\"content\"]}\n variant=\"body\"\n >\n {getContentOrTitle()}\n </Typography>\n )}\n </div>\n </div>\n {actionButtons.length > 0 && (\n <div {...{ [\"data-testid\"]: \"alert-actions\" }} className={classes[\"actions\"]}>\n {actionButtons}\n </div>\n )}\n {onClose && (\n <IconButton\n className={classes[\"close-btn\"]}\n onClick={e => {\n e.stopPropagation();\n startAnimation();\n }}\n title={closeButtonTitle}\n {...{ [\"data-testid\"]: \"alert-close\" }}\n >\n <Icon icon={Icons.Times} />\n </IconButton>\n )}\n </div>\n );\n};\n"],"names":["useRegisterAlertHeight","singleAlertRef","alertId","ctx","useContext","AlertContext","useEffect","current","setAlertHeight","getBoundingClientRect","height","actionButtonKeyCounter","AlertItem","id","title","duration","variant","emphasis","content","className","actions","onClose","closeButtonTitle","wasShown","timerHandler","useRef","onAnimationEnd","ref","animationStarted","startAnimation","useAnimation","setTimeout","_a","addEventListener","onItemFocus","_b","onItemBlur","_c","_d","clearTimeout","getVariantIcon","Icons","ErrorAlt","Warning","CheckmarkCircleAlt","InfoCircle","actionButtons","map","actionProp","React","createElement","key","toString","onClick","e","call","classes","label","getAlertClasses","alertClasses","push","readyclasses","join","getAria","getContentOrTitle","role","Icon","icon","Typography","tag","length","IconButton","stopPropagation","Times"],"mappings":"whBA+CA,MAAMA,EAAyB,CAC7BC,EACAC,KAEA,MAAMC,EAAMC,aAAWC,EAAAA,YAEvBC,EAAAA,WAAU,KACR,GAAIL,EAAeM,QACjBJ,EAAIK,eAAeN,EAASD,EAAeM,QAAQE,wBAAwBC,OAC5E,GACA,CAACT,EAAeM,SAAS,EAG9B,IAAII,EAAyB,EACtB,MAAMC,EAAY,EACvBC,KACAC,QACAC,WACAC,UAAU,UACVC,WAAW,MACXC,UACAC,YACAC,UAAU,GACVC,UACAC,mBACAC,eAEA,MAAMC,EAAeC,EAAAA,SACrB,MAAMC,EAAiB,KACrBL,IAAA,MAAAA,SAAA,OAAA,EAAAA,GAAW,EAEb,MAAMM,IAAEA,EAAGC,iBAAEA,EAAgBC,eAAEA,GAAmBC,EAAAA,aAA6BJ,GAE/E1B,EAAuB2B,EAAKd,GAE5BP,EAAAA,WAAU,iBACR,GAAIS,GAAY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AAM1B,EAAAA,MAAMgC,SAIxB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("../../../../lib/style-inject.js");var t='/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.AlertItem-module_sr-only__cxghJ{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.AlertItem-module_hidden__yPZZM{display:none}.AlertItem-module_slide-in__F1DtT{animation:AlertItem-module_slide-in__F1DtT .5s forwards}@media (prefers-reduced-motion:reduce){.AlertItem-module_slide-in__F1DtT{animation-duration:.1ms}}.AlertItem-module_slide-out__vlaQ6{animation:AlertItem-module_slide-out__vlaQ6 .5s forwards}@media (prefers-reduced-motion:reduce){.AlertItem-module_slide-out__vlaQ6{animation-duration:.1ms}}@keyframes AlertItem-module_slide-in__F1DtT{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes AlertItem-module_slide-out__vlaQ6{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.AlertItem-module_alert__WQ-HV{align-items:center;border-radius:var(--alert-border-radius);box-sizing:border-box;display:flex;flex-grow:0;gap:.5rem;padding:1rem .875rem;width:100%}.AlertItem-module_alert__WQ-HV.AlertItem-module_neutral__LtaX9{background-color:var(--alert-neutral-background-color);border-radius:var(--alert-border-radius)}.AlertItem-module_alert__WQ-HV.AlertItem-module_neutral__LtaX9.AlertItem-module_emph-low__DKPM3{color:unset}.AlertItem-module_alert__WQ-HV.AlertItem-module_neutral__LtaX9.AlertItem-module_emph-medium__lR-BQ{border-color:var(--alert-neutral-inverted-color);border-style:none none none solid;border-width:var(--alert-border-width);padding-left:calc(1rem - var(--alert-border-width))}.AlertItem-module_alert__WQ-HV.AlertItem-module_neutral__LtaX9.AlertItem-module_emph-high__FZKQZ{background-color:var(--alert-neutral-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_neutral__LtaX9.AlertItem-module_emph-high__FZKQZ .AlertItem-module_action-button__Cm-fc,.AlertItem-module_alert__WQ-HV.AlertItem-module_neutral__LtaX9.AlertItem-module_emph-high__FZKQZ .AlertItem-module_close-btn__b5R8C,.AlertItem-module_alert__WQ-HV.AlertItem-module_neutral__LtaX9.AlertItem-module_emph-high__FZKQZ .AlertItem-module_content__IDTIH,.AlertItem-module_alert__WQ-HV.AlertItem-module_neutral__LtaX9.AlertItem-module_emph-high__FZKQZ .AlertItem-module_icon__oEHMw,.AlertItem-module_alert__WQ-HV.AlertItem-module_neutral__LtaX9.AlertItem-module_emph-high__FZKQZ .AlertItem-module_title__aMRg2{color:var(--alert-text-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_informative__K5pKS{background-color:var(--alert-info-background-color);border-radius:var(--alert-border-radius)}.AlertItem-module_alert__WQ-HV.AlertItem-module_informative__K5pKS.AlertItem-module_emph-low__DKPM3{color:unset}.AlertItem-module_alert__WQ-HV.AlertItem-module_informative__K5pKS.AlertItem-module_emph-medium__lR-BQ{border-color:var(--alert-info-inverted-color);border-style:none none none solid;border-width:var(--alert-border-width);padding-left:calc(1rem - var(--alert-border-width))}.AlertItem-module_alert__WQ-HV.AlertItem-module_informative__K5pKS.AlertItem-module_emph-high__FZKQZ{background-color:var(--alert-info-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_informative__K5pKS.AlertItem-module_emph-high__FZKQZ .AlertItem-module_action-button__Cm-fc,.AlertItem-module_alert__WQ-HV.AlertItem-module_informative__K5pKS.AlertItem-module_emph-high__FZKQZ .AlertItem-module_close-btn__b5R8C,.AlertItem-module_alert__WQ-HV.AlertItem-module_informative__K5pKS.AlertItem-module_emph-high__FZKQZ .AlertItem-module_content__IDTIH,.AlertItem-module_alert__WQ-HV.AlertItem-module_informative__K5pKS.AlertItem-module_emph-high__FZKQZ .AlertItem-module_icon__oEHMw,.AlertItem-module_alert__WQ-HV.AlertItem-module_informative__K5pKS.AlertItem-module_emph-high__FZKQZ .AlertItem-module_title__aMRg2{color:var(--alert-text-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj{background-color:var(--alert-success-background-color);border-radius:var(--alert-border-radius)}.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj.AlertItem-module_emph-low__DKPM3 .AlertItem-module_icon__oEHMw{color:var(--alert-success-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj.AlertItem-module_emph-medium__lR-BQ{border-color:var(--alert-success-inverted-color);border-style:none none none solid;border-width:var(--alert-border-width);padding-left:calc(1rem - var(--alert-border-width))}.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj.AlertItem-module_emph-medium__lR-BQ .AlertItem-module_icon__oEHMw{color:var(--alert-success-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj.AlertItem-module_emph-high__FZKQZ{background-color:var(--alert-success-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj.AlertItem-module_emph-high__FZKQZ .AlertItem-module_action-button__Cm-fc,.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj.AlertItem-module_emph-high__FZKQZ .AlertItem-module_close-btn__b5R8C,.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj.AlertItem-module_emph-high__FZKQZ .AlertItem-module_content__IDTIH,.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj.AlertItem-module_emph-high__FZKQZ .AlertItem-module_icon__oEHMw,.AlertItem-module_alert__WQ-HV.AlertItem-module_success__AuQnj.AlertItem-module_emph-high__FZKQZ .AlertItem-module_title__aMRg2{color:var(--alert-text-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis{background-color:var(--alert-warning-background-color);border-radius:var(--alert-border-radius)}.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis.AlertItem-module_emph-low__DKPM3 .AlertItem-module_icon__oEHMw{color:var(--alert-warning-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis.AlertItem-module_emph-medium__lR-BQ{border-color:var(--alert-warning-inverted-color);border-style:none none none solid;border-width:var(--alert-border-width);padding-left:calc(1rem - var(--alert-border-width))}.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis.AlertItem-module_emph-medium__lR-BQ .AlertItem-module_icon__oEHMw{color:var(--alert-warning-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis.AlertItem-module_emph-high__FZKQZ{background-color:var(--alert-warning-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis.AlertItem-module_emph-high__FZKQZ .AlertItem-module_action-button__Cm-fc,.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis.AlertItem-module_emph-high__FZKQZ .AlertItem-module_close-btn__b5R8C,.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis.AlertItem-module_emph-high__FZKQZ .AlertItem-module_content__IDTIH,.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis.AlertItem-module_emph-high__FZKQZ .AlertItem-module_icon__oEHMw,.AlertItem-module_alert__WQ-HV.AlertItem-module_warning__mPUis.AlertItem-module_emph-high__FZKQZ .AlertItem-module_title__aMRg2{color:var(--alert-text-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD{background-color:var(--alert-error-background-color);border-radius:var(--alert-border-radius)}.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD.AlertItem-module_emph-low__DKPM3 .AlertItem-module_icon__oEHMw{color:var(--alert-error-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD.AlertItem-module_emph-medium__lR-BQ{border-color:var(--alert-error-inverted-color);border-style:none none none solid;border-width:var(--alert-border-width);padding-left:calc(1rem - var(--alert-border-width))}.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD.AlertItem-module_emph-medium__lR-BQ .AlertItem-module_icon__oEHMw{color:var(--alert-error-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD.AlertItem-module_emph-high__FZKQZ{background-color:var(--alert-error-inverted-color)}.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD.AlertItem-module_emph-high__FZKQZ .AlertItem-module_action-button__Cm-fc,.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD.AlertItem-module_emph-high__FZKQZ .AlertItem-module_close-btn__b5R8C,.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD.AlertItem-module_emph-high__FZKQZ .AlertItem-module_content__IDTIH,.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD.AlertItem-module_emph-high__FZKQZ .AlertItem-module_icon__oEHMw,.AlertItem-module_alert__WQ-HV.AlertItem-module_error__grESD.AlertItem-module_emph-high__FZKQZ .AlertItem-module_title__aMRg2{color:var(--alert-text-inverted-color)}.AlertItem-module_alert__WQ-HV+.AlertItem-module_alert__WQ-HV{margin-top:.5rem}.AlertItem-module_alert__WQ-HV .AlertItem-module_close-btn__b5R8C{align-self:center;border:0;color:var(--alert-text-color);flex-shrink:0;height:2.5rem;margin:-.5rem 0;width:2.5rem}.AlertItem-module_alert__WQ-HV .AlertItem-module_close-btn__b5R8C span{font-size:.875rem}.AlertItem-module_alert__WQ-HV .AlertItem-module_close-btn__b5R8C:not(:disabled):focus,.AlertItem-module_alert__WQ-HV .AlertItem-module_close-btn__b5R8C:not(:disabled):hover{background-color:var(--color-black10)}.AlertItem-module_alert__WQ-HV .AlertItem-module_close-btn__b5R8C:not(:disabled):active{background-color:var(--color-black20)}.AlertItem-module_alert__WQ-HV .AlertItem-module_icon__oEHMw{align-items:center;align-self:flex-start;color:var(--alert-text-color);display:inline-flex;font-size:1rem;height:1.25rem}.AlertItem-module_alert__WQ-HV .AlertItem-module_title__aMRg2{color:var(--alert-text-color);display:block;flex:1;font-size:.875rem;line-height:1.25rem;margin-bottom:.25rem}.AlertItem-module_alert__WQ-HV .AlertItem-module_outer-content-wrapper__m6bQW{display:flex;flex-grow:1;gap:.5rem}.AlertItem-module_alert__WQ-HV .AlertItem-module_content-wrapper__ZWad6{flex-grow:1;padding-left:.125rem}.AlertItem-module_alert__WQ-HV .AlertItem-module_content__IDTIH{color:var(--alert-text-color);font-size:.875rem;line-height:1.25rem;margin-bottom:0}.AlertItem-module_alert__WQ-HV .AlertItem-module_actions__qqrs-{align-self:center;text-align:right}.AlertItem-module_alert__WQ-HV .AlertItem-module_action-button__Cm-fc{background-color:initial;border-color:#0000;border-radius:var(--button-border-radius);border-style:var(--button-border-style);border-width:var(--button-border-width);color:var(--alert-text-color);cursor:pointer;font-family:var(--font-family);font-size:.875rem;font-weight:400;line-height:var(--button-font-size);margin:-.5rem 0;padding:.625rem 1.25rem;transition:color,background-color,border-color .2s ease-in-out;white-space:nowrap}.AlertItem-module_alert__WQ-HV .AlertItem-module_action-button__Cm-fc:disabled{color:var(--greyed-out);cursor:not-allowed}.AlertItem-module_alert__WQ-HV .AlertItem-module_action-button__Cm-fc:focus-visible{border-radius:var(--focus-border-radius);outline:.125rem solid var(--color-focus);outline-offset:.125rem}.AlertItem-module_alert__WQ-HV .AlertItem-module_action-button__Cm-fc:not(:disabled):focus,.AlertItem-module_alert__WQ-HV .AlertItem-module_action-button__Cm-fc:not(:disabled):hover{background-color:var(--color-black10)}.AlertItem-module_alert__WQ-HV .AlertItem-module_action-button__Cm-fc:not(:disabled):active{background-color:var(--color-black20)}@media only screen and (min-width:37.5em){.AlertItem-module_alert__WQ-HV{min-width:25rem;width:min-content}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFsZXJ0SXRlbS5tb2R1bGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7RUFjRTtBQUNGOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBQ0Y7Ozs7Ozs7Ozs7Ozs7O0VBY0UsQ0FDRixpQ0FPRSxrQkFBc0IsQ0FDdEIsUUFBUyxDQUxULFVBQVcsQ0FFWCxXQUFZLENBQ1osZUFBZ0IsQ0FGaEIsU0FBVSxDQUhWLGlCQUFrQixDQUNsQixTQU9GLENBRUEsZ0NBQ0UsWUFDRixDQUVBLGtDQUNFLHVEQUNGLENBQ0EsdUNBQ0Usa0NBQ0UsdUJBQ0YsQ0FDRixDQUVBLG1DQUNFLHdEQUNGLENBQ0EsdUNBQ0UsbUNBQ0UsdUJBQ0YsQ0FDRixDQUVBLDRDQUNFLEdBQ0UsMkJBQ0YsQ0FDQSxHQUNFLHVCQUNGLENBQ0YsQ0FDQSw2Q0FDRSxHQUNFLHVCQUNGLENBQ0EsR0FDRSwyQkFDRixDQUNGLEN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1cbi5hbGVydCAuYWN0aW9uLWJ1dHRvbjpmb2N1cy12aXNpYmxlIHtcbiAgb3V0bGluZTogMC4xMjVyZW0gc29saWQgdmFyKC0tY29sb3ItZm9jdXMpO1xuICBvdXRsaW5lLW9mZnNldDogMC4xMjVyZW07XG4gIGJvcmRlci1yYWRpdXM6IHZhcigtLWZvY3VzLWJvcmRlci1yYWRpdXMpO1xufVxuLmFsZXJ0IC5hY3Rpb24tYnV0dG9uOm5vdCg6ZGlzYWJsZWQpOmhvdmVyLCAuYWxlcnQgLmFjdGlvbi1idXR0b246bm90KDpkaXNhYmxlZCk6Zm9jdXMge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1jb2xvci1ibGFjazEwKTtcbn1cbi5hbGVydCAuYWN0aW9uLWJ1dHRvbjpub3QoOmRpc2FibGVkKTphY3RpdmUge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1jb2xvci1ibGFjazIwKTtcbn1cblxuQG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAobWluLXdpZHRoOiAzNy41ZW0pIHtcbiAgLmFsZXJ0IHtcbiAgICB3aWR0aDogbWluLWNvbnRlbnQ7XG4gICAgbWluLXdpZHRoOiAyNXJlbTtcbiAgfVxufSJdfQ== */';var l={"sr-only":"AlertItem-module_sr-only__cxghJ",hidden:"AlertItem-module_hidden__yPZZM","slide-in":"AlertItem-module_slide-in__F1DtT","slide-out":"AlertItem-module_slide-out__vlaQ6",alert:"AlertItem-module_alert__WQ-HV",neutral:"AlertItem-module_neutral__LtaX9","emph-low":"AlertItem-module_emph-low__DKPM3","emph-medium":"AlertItem-module_emph-medium__lR-BQ","emph-high":"AlertItem-module_emph-high__FZKQZ",content:"AlertItem-module_content__IDTIH",title:"AlertItem-module_title__aMRg2","close-btn":"AlertItem-module_close-btn__b5R8C",icon:"AlertItem-module_icon__oEHMw","action-button":"AlertItem-module_action-button__Cm-fc",informative:"AlertItem-module_informative__K5pKS",success:"AlertItem-module_success__AuQnj",warning:"AlertItem-module_warning__mPUis",error:"AlertItem-module_error__grESD","outer-content-wrapper":"AlertItem-module_outer-content-wrapper__m6bQW","content-wrapper":"AlertItem-module_content-wrapper__ZWad6",actions:"AlertItem-module_actions__qqrs-"};e["default"](t);exports["default"]=l;
|
|
2
|
+
//# sourceMappingURL=AlertItem.module.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertItem.module.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");const u=e.createContext({enqueueAlert:e=>null,enqueueInfoAlert:e=>null,enqueueSuccessAlert:e=>null,enqueueErrorAlert:e=>null,enqueueWarningAlert:e=>null,setAlertHeight:(e,u)=>null,alerts:[]});exports["default"]=u;
|
|
2
|
+
//# sourceMappingURL=AlertContext.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertContext.cjs.js","sources":["../../../../../../../src/components/Notifications/Alert/AlertProvider/AlertContext.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AlertEntry } from \"./AlertProvider\";\nimport { createContext } from \"react\";\n\nexport type AlertQueue = Omit<AlertEntry, \"id\">;\n\nexport interface AlertContextValue {\n enqueueAlert: (entry: AlertQueue) => void;\n enqueueInfoAlert: (entry: AlertQueue) => void;\n enqueueSuccessAlert: (entry: AlertQueue) => void;\n enqueueWarningAlert: (entry: AlertQueue) => void;\n enqueueErrorAlert: (entry: AlertQueue) => void;\n setAlertHeight: (id: string, height: number) => void;\n alerts: AlertEntry[];\n}\n\nconst AlertContext = createContext<AlertContextValue>({\n enqueueAlert: entry => null,\n enqueueInfoAlert: entry => null,\n enqueueSuccessAlert: entry => null,\n enqueueErrorAlert: entry => null,\n enqueueWarningAlert: entry => null,\n setAlertHeight: (id, height) => null,\n alerts: []\n});\n\nexport default AlertContext;\n"],"names":["AlertContext","createContext","enqueueAlert","entry","enqueueInfoAlert","enqueueSuccessAlert","enqueueErrorAlert","enqueueWarningAlert","setAlertHeight","id","height","alerts"],"mappings":"6FA+BM,MAAAA,EAAeC,EAAAA,cAAiC,CACpDC,aAAcC,GAAS,KACvBC,iBAAkBD,GAAS,KAC3BE,oBAAqBF,GAAS,KAC9BG,kBAAmBH,GAAS,KAC5BI,oBAAqBJ,GAAS,KAC9BK,eAAgB,CAACC,EAAIC,IAAW,KAChCC,OAAQ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("react-dom");var r=require("../AlertContainer/AlertContainer.cjs.js");var o=require("../../../src/util/helper.cjs.js");var n=require("../AlertItem/AlertItem.cjs.js");var l=require("../../../src/hooks/useGetDomRoot.cjs.js");var s=require("./AlertContext.cjs.js");function u(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var a=u(e);const i=({closeButtonTitle:u,placement:i={vertical:"bottom",horizontal:"center"},autoHideDuration:c={long:8e3,short:4e3},stackSize:d=3,domRoot:v,children:f,className:m})=>{const[A,j]=e.useState([]);const q=e.useRef(null);const{root:h}=l.useGetDomRoot(v,q);const g=e=>{var t;if(e.variant==="error")return c.long;if((t=e.actions)===null||t===void 0?void 0:t.length)return c.long;return c.short};const p=(e,t)=>{var r,n;let l=u;if(e.closeButtonTitle)l=e.closeButtonTitle;return{...e,variant:t!==null&&t!==void 0?t:e.variant,id:o.generateID(15,(r=e.content)!==null&&r!==void 0?r:e.title),duration:(n=e.duration)!==null&&n!==void 0?n:g(e),closeButtonTitle:l}};const C=e=>{const t=p(e);j((e=>[...e,t]))};const E=e=>{const t=p(e,"informative");j((e=>[...e,t]))};const I=e=>{const t=p(e,"success");j((e=>[...e,t]))};const B=e=>{const t=p(e,"warning");j((e=>[...e,t]))};const D=e=>{const t=p(e,"error");j((e=>[...e,t]))};const P=(e,t)=>{const r=A.map((r=>{if(r.id!==e)return r;return{...r,height:t}}));j(r)};const R=e=>{j((t=>t.filter(((r,o)=>{if(o<d)t[o]={...t[o],wasShown:true};return r.id!==e}))))};const S=()=>A.slice(0,d).map((e=>a["default"].createElement(n.AlertItem,{...e,key:`${e.id}`,onClose:()=>{var t;R(e.id);(t=e.onClose)===null||t===void 0?void 0:t.call(e)}})));const T=e.useMemo((()=>({enqueueAlert:C,enqueueInfoAlert:E,enqueueSuccessAlert:I,enqueueErrorAlert:D,enqueueWarningAlert:B,setAlertHeight:P,alerts:A})),[C,E,I,D,B,P,A]);return a["default"].createElement(s["default"].Provider,{value:T},f,a["default"].createElement("div",{ref:q},t.createPortal(a["default"].createElement(r.AlertContainer,{placement:i,className:m},S()),h)))};exports.AlertProvider=i;
|
|
2
|
+
//# sourceMappingURL=AlertProvider.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertProvider.cjs.js","sources":["../../../../../../../src/components/Notifications/Alert/AlertProvider/AlertProvider.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ReactNode, useRef, useState, useMemo } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { Placement, AlertContainer } from \"../AlertContainer/AlertContainer\";\nimport { generateID } from \"../../../../util/helper\";\nimport { AlertItem, Props as AlertComponentProps, Variant } from \"../AlertItem/AlertItem\";\nimport { useGetDomRoot } from \"../../../../hooks/useGetDomRoot\";\nimport AlertContext, { AlertContextValue } from \"./AlertContext\";\n\n/** Short msg is when only title is provided. Long one when content or/and actions are provided (or type is error). */\ninterface Duration {\n long: number;\n short: number;\n}\n\nexport interface Props {\n closeButtonTitle: string;\n children?: ReactNode;\n placement?: Placement;\n stackSize?: number;\n domRoot?: HTMLElement;\n autoHideDuration?: Duration;\n className?: string;\n}\n\nexport type AlertEntry = AlertComponentProps & { height?: number };\n\nexport const AlertProvider = ({\n closeButtonTitle,\n placement = { vertical: \"bottom\", horizontal: \"center\" },\n autoHideDuration = { long: 8000, short: 4000 },\n stackSize = 3,\n domRoot,\n children,\n className\n}: Props) => {\n const [alertEntries, setAlertEntries] = useState<AlertEntry[]>([]);\n const wrappingDivRef = useRef(null);\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const getDuration = (entry: Omit<AlertEntry, \"id\">) => {\n if (entry.variant === \"error\") {\n return autoHideDuration.long;\n }\n if (entry.actions?.length) {\n return autoHideDuration.long;\n }\n return autoHideDuration.short;\n };\n\n const buildEntryWithVariant = (arg: Omit<AlertEntry, \"id\">, variant?: Variant): AlertEntry => {\n let closeTitle = closeButtonTitle;\n if (arg.closeButtonTitle) {\n closeTitle = arg.closeButtonTitle;\n }\n return {\n ...arg,\n variant: variant ?? arg.variant,\n id: generateID(15, arg.content ?? arg.title),\n duration: arg.duration ?? getDuration(arg),\n closeButtonTitle: closeTitle\n };\n };\n\n const enqueueAlert = (arg: Omit<AlertEntry, \"id\">) => {\n const newEntry = buildEntryWithVariant(arg);\n setAlertEntries(entries => [...entries, newEntry]);\n };\n\n const enqueueInfoAlert: AlertContextValue[\"enqueueInfoAlert\"] = arg => {\n const newEntry: AlertEntry = buildEntryWithVariant(arg, \"informative\");\n setAlertEntries(entries => [...entries, newEntry]);\n };\n\n const enqueueSuccessAlert: AlertContextValue[\"enqueueSuccessAlert\"] = arg => {\n const newEntry: AlertEntry = buildEntryWithVariant(arg, \"success\");\n setAlertEntries(entries => [...entries, newEntry]);\n };\n\n const enqueueWarningAlert: AlertContextValue[\"enqueueWarningAlert\"] = arg => {\n const newEntry: AlertEntry = buildEntryWithVariant(arg, \"warning\");\n setAlertEntries(entries => [...entries, newEntry]);\n };\n\n const enqueueErrorAlert: AlertContextValue[\"enqueueErrorAlert\"] = arg => {\n const newEntry: AlertEntry = buildEntryWithVariant(arg, \"error\");\n setAlertEntries(entries => [...entries, newEntry]);\n };\n\n const setAlertHeight = (id: string, height: number) => {\n const newAlertsState = alertEntries.map(alertEntry => {\n if (alertEntry.id !== id) {\n return alertEntry;\n }\n return { ...alertEntry, height };\n });\n setAlertEntries(newAlertsState);\n };\n\n const removeEntry = (entryId: string) => {\n setAlertEntries(entries => {\n return entries.filter((entry, idx) => {\n if (idx < stackSize) {\n entries[idx] = { ...entries[idx], wasShown: true };\n }\n return entry.id !== entryId;\n });\n });\n };\n\n const renderAlertList = (): ReactNode => {\n return alertEntries.slice(0, stackSize).map(entry => (\n <AlertItem\n {...entry}\n key={`${entry.id}`}\n onClose={() => {\n removeEntry(entry.id);\n entry.onClose?.();\n }}\n />\n ));\n };\n\n const contextValue = useMemo(\n () => ({\n enqueueAlert,\n enqueueInfoAlert,\n enqueueSuccessAlert,\n enqueueErrorAlert,\n enqueueWarningAlert,\n setAlertHeight,\n alerts: alertEntries\n }),\n [\n enqueueAlert,\n enqueueInfoAlert,\n enqueueSuccessAlert,\n enqueueErrorAlert,\n enqueueWarningAlert,\n setAlertHeight,\n alertEntries\n ]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n {children}\n <div ref={wrappingDivRef}>\n {createPortal(\n <AlertContainer placement={placement} className={className}>\n {renderAlertList()}\n </AlertContainer>,\n root\n )}\n </div>\n </AlertContext.Provider>\n );\n};\n"],"names":["AlertProvider","closeButtonTitle","placement","vertical","horizontal","autoHideDuration","long","short","stackSize","domRoot","children","className","alertEntries","setAlertEntries","useState","wrappingDivRef","useRef","root","useGetDomRoot","getDuration","entry","variant","actions","_a","length","buildEntryWithVariant","arg","closeTitle","id","generateID","content","title","duration","_b","enqueueAlert","newEntry","entries","enqueueInfoAlert","enqueueSuccessAlert","enqueueWarningAlert","enqueueErrorAlert","setAlertHeight","height","newAlertsState","map","alertEntry","removeEntry","entryId","filter","idx","wasShown","renderAlertList","slice","React","createElement","AlertItem","key","onClose","call","contextValue","useMemo","alerts","AlertContext","Provider","value","ref","createPortal","AlertContainer"],"mappings":"qcA0Ca,MAAAA,EAAgB,EAC3BC,mBACAC,YAAY,CAAEC,SAAU,SAAUC,WAAY,UAC9CC,mBAAmB,CAAEC,KAAM,IAAMC,MAAO,KACxCC,YAAY,EACZC,UACAC,WACAC,gBAEA,MAAOC,EAAcC,GAAmBC,EAAQA,SAAe,IAC/D,MAAMC,EAAiBC,SAAO,MAC9B,MAAMC,KAAEA,GAASC,EAAaA,cAACT,EAASM,GAExC,MAAMI,EAAeC,UACnB,GAAIA,EAAMC,UAAY,QACpB,OAAOhB,EAAiBC,KAE1B,MAAIc,EAAME,WAAS,MAAAC,SAAA,OAAA,EAAAA,EAAAC,OACjB,OAAOnB,EAAiBC,KAE1B,OAAOD,EAAiBE,KAAK,EAG/B,MAAMkB,EAAwB,CAACC,EAA6BL,aAC1D,IAAIM,EAAa1B,EACjB,GAAIyB,EAAIzB,iBACN0B,EAAaD,EAAIzB,iBAEnB,MAAO,IACFyB,EACHL,QAASA,IAAA,MAAAA,WAAAA,EAAWK,EAAIL,QACxBO,GAAIC,EAAAA,WAAW,IAAIN,EAAAG,EAAII,WAAO,MAAAP,SAAA,EAAAA,EAAIG,EAAIK,OACtCC,YAAUN,EAAIM,YAAY,MAAAC,SAAA,EAAAA,EAAAd,EAAYO,GACtCzB,iBAAkB0B,EACnB,E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,CACEsB,EACAG,EACAC,EACAE,EACAD,EACAE,EACA7B,IAIJ,OACEyC,EAAAA,yBAACS,EAAAA,WAAaC,SAAS,CAAAC,MAAOL,GAC3BjD,EACD2C,aAAKC,cAAA,MAAA,CAAAW,IAAKlD,GACPmD,EAAAA,aACCb,EAAA,WAAAC,cAACa,EAAAA,eAAc,CAACjE,UAAWA,EAAWS,UAAWA,GAC9CwC,KAEHlC,IAIN"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var r=require("./AlertProvider/AlertContext.cjs.js");const u=()=>{const u=e.useContext(r["default"]);return{enqueueAlert:u.enqueueAlert,enqueueInfoAlert:u.enqueueInfoAlert,enqueueSuccessAlert:u.enqueueSuccessAlert,enqueueWarningAlert:u.enqueueWarningAlert,enqueueErrorAlert:u.enqueueErrorAlert}};exports.useAlert=u;
|
|
2
|
+
//# sourceMappingURL=useAlert.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlert.cjs.js","sources":["../../../../../../src/components/Notifications/Alert/useAlert.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useContext } from \"react\";\nimport AlertContext from \"./AlertProvider/AlertContext\";\n\nexport const useAlert = () => {\n const ctx = useContext(AlertContext);\n\n return {\n enqueueAlert: ctx.enqueueAlert,\n enqueueInfoAlert: ctx.enqueueInfoAlert,\n enqueueSuccessAlert: ctx.enqueueSuccessAlert,\n enqueueWarningAlert: ctx.enqueueWarningAlert,\n enqueueErrorAlert: ctx.enqueueErrorAlert\n };\n};\n"],"names":["useAlert","ctx","useContext","AlertContext","enqueueAlert","enqueueInfoAlert","enqueueSuccessAlert","enqueueWarningAlert","enqueueErrorAlert"],"mappings":"kJAmBO,MAAMA,EAAW,KACtB,MAAMC,EAAMC,aAAWC,EAAAA,YAEvB,MAAO,CACLC,aAAcH,EAAIG,aAClBC,iBAAkBJ,EAAII,iBACtBC,oBAAqBL,EAAIK,oBACzBC,oBAAqBN,EAAIM,oBACzBC,kBAAmBP,EAAIO,kBACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnackbarContainer.cjs.js","sources":["../../../../../../../src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useContext, useEffect, useState } from \"react\";\nimport classes from \"./SnackbarContainer.module.scss\";\nimport { SnackbarContext } from \"../SnackbarProvider/SnackbarStateProvider\";\n\nexport interface Placement {\n vertical: \"top\" | \"bottom\";\n horizontal: \"start\" | \"center\" | \"end\";\n}\n\nexport interface Props {\n placement: Placement;\n children?: React.ReactNode;\n zIndex?: number;\n className?: string;\n}\n\nconst useSnackbarContainerHeightAnimation = () => {\n const { snackbars } = useContext(SnackbarContext);\n const [height, setHeight] = useState(0);\n const [justifyContent, setJustifyContent] = useState<\"flex-start\" | \"flex-end\">(\"flex-start\");\n const spaceBetweenSnackbars = 8;\n const exceedsMaximumVisibleSnackbars = snackbars.length >= 3;\n\n useEffect(() => {\n const allHeights = snackbars.map(snackbar => snackbar.height);\n\n let totalHeight = allHeights.reduce((prev, curr) => prev + curr, 0);\n\n totalHeight += (Math.min(snackbars.length, 3) - 1) * spaceBetweenSnackbars;\n\n /**\n * Once we reach the maximum amount of snackbars, they will start to disappear. We have to wait with reversing the justify-content until the last snackbar\n * has completed their animationIn. This is around 500ms. Then we want to reverse it, because otherwise whenever a snackbar disappears they shift up\n * and then down again, which looks really bad.\n * */\n if (exceedsMaximumVisibleSnackbars)\n setTimeout(() => {\n setJustifyContent(\"flex-end\");\n }, 500);\n\n if (height > totalHeight && justifyContent !== \"flex-end\") {\n setJustifyContent(\"flex-end\");\n } else if (height < totalHeight && justifyContent !== \"flex-start\") {\n setJustifyContent(\"flex-start\");\n }\n\n setHeight(totalHeight);\n }, [snackbars]);\n\n return { height, justifyContent };\n};\n\nexport const SnackbarContainer = ({ placement, children, zIndex, className, ...rest }: Props) => {\n const { height, justifyContent } = useSnackbarContainerHeightAnimation();\n\n return (\n <div\n {...rest}\n style={{ zIndex, height, justifyContent }}\n className={`${classes[\"snackbars\"]} ${classes[placement.horizontal]} ${\n classes[placement.vertical]\n } ${className ?? \"\"}`}\n >\n {children}\n </div>\n );\n};\n"],"names":["useSnackbarContainerHeightAnimation","snackbars","useContext","SnackbarContext","height","setHeight","useState","justifyContent","setJustifyContent","spaceBetweenSnackbars","exceedsMaximumVisibleSnackbars","length","useEffect","allHeights","map","snackbar","totalHeight","reduce","prev","curr","Math","min","setTimeout","SnackbarContainer","placement","children","zIndex","className","rest","React","style","classes","horizontal","vertical"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SnackbarContainer.cjs.js","sources":["../../../../../../../src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useContext, useEffect, useState } from \"react\";\nimport classes from \"./SnackbarContainer.module.scss\";\nimport { SnackbarContext } from \"../SnackbarProvider/SnackbarStateProvider\";\n\n/**\n * @deprecated\n */\nexport interface Placement {\n vertical: \"top\" | \"bottom\";\n horizontal: \"start\" | \"center\" | \"end\";\n}\n\n/**\n * @deprecated\n */\nexport interface Props {\n placement: Placement;\n children?: React.ReactNode;\n zIndex?: number;\n className?: string;\n}\n\nconst useSnackbarContainerHeightAnimation = () => {\n const { snackbars } = useContext(SnackbarContext);\n const [height, setHeight] = useState(0);\n const [justifyContent, setJustifyContent] = useState<\"flex-start\" | \"flex-end\">(\"flex-start\");\n const spaceBetweenSnackbars = 8;\n const exceedsMaximumVisibleSnackbars = snackbars.length >= 3;\n\n useEffect(() => {\n const allHeights = snackbars.map(snackbar => snackbar.height);\n\n let totalHeight = allHeights.reduce((prev, curr) => prev + curr, 0);\n\n totalHeight += (Math.min(snackbars.length, 3) - 1) * spaceBetweenSnackbars;\n\n /**\n * Once we reach the maximum amount of snackbars, they will start to disappear. We have to wait with reversing the justify-content until the last snackbar\n * has completed their animationIn. This is around 500ms. Then we want to reverse it, because otherwise whenever a snackbar disappears they shift up\n * and then down again, which looks really bad.\n * */\n if (exceedsMaximumVisibleSnackbars)\n setTimeout(() => {\n setJustifyContent(\"flex-end\");\n }, 500);\n\n if (height > totalHeight && justifyContent !== \"flex-end\") {\n setJustifyContent(\"flex-end\");\n } else if (height < totalHeight && justifyContent !== \"flex-start\") {\n setJustifyContent(\"flex-start\");\n }\n\n setHeight(totalHeight);\n }, [snackbars]);\n\n return { height, justifyContent };\n};\n\n/**\n * @deprecated\n */\nexport const SnackbarContainer = ({ placement, children, zIndex, className, ...rest }: Props) => {\n const { height, justifyContent } = useSnackbarContainerHeightAnimation();\n\n return (\n <div\n {...rest}\n style={{ zIndex, height, justifyContent }}\n className={`${classes[\"snackbars\"]} ${classes[placement.horizontal]} ${\n classes[placement.vertical]\n } ${className ?? \"\"}`}\n >\n {children}\n </div>\n );\n};\n"],"names":["useSnackbarContainerHeightAnimation","snackbars","useContext","SnackbarContext","height","setHeight","useState","justifyContent","setJustifyContent","spaceBetweenSnackbars","exceedsMaximumVisibleSnackbars","length","useEffect","allHeights","map","snackbar","totalHeight","reduce","prev","curr","Math","min","setTimeout","SnackbarContainer","placement","children","zIndex","className","rest","React","style","classes","horizontal","vertical"],"mappings":"sSAsCA,MAAMA,EAAsC,KAC1C,MAAMC,UAAEA,GAAcC,EAAUA,WAACC,EAAeA,iBAChD,MAAOC,EAAQC,GAAaC,EAAQA,SAAC,GACrC,MAAOC,EAAgBC,GAAqBF,EAAQA,SAA4B,cAChF,MAAMG,EAAwB,EAC9B,MAAMC,EAAiCT,EAAUU,QAAU,EAE3DC,EAAAA,WAAU,KACR,MAAMC,EAAaZ,EAAUa,KAAIC,GAAYA,EAASX,SAEtD,IAAIY,EAAcH,EAAWI,QAAO,CAACC,EAAMC,IAASD,EAAOC,GAAM,GAEjEH,IAAgBI,KAAKC,IAAIpB,EAAUU,OAAQ,GAAK,GAAKF,EAOrD,GAAIC,EACFY,YAAW,KACTd,EAAkB,WAAW,GAC5B,KAEL,GAAIJ,EAASY,GAAeT,IAAmB,WAC7CC,EAAkB,iBACb,GAAIJ,EAASY,GAAeT,IAAmB,aACpDC,EAAkB,cAGpBH,EAAUW,EAAY,GACrB,CAACf,IAEJ,MAAO,CAAEG,SAAQG,iBAAgB,EAMtB,MAAAgB,EAAoB,EAAGC,YAAWC,WAAUC,SAAQC,eAAcC,MAC7E,MAAMxB,OAAEA,EAAMG,eAAEA,GAAmBP,IAEnC,OACE6B,EAAAA,mCACMD,EACJE,MAAO,CAAEJ,SAAQtB,SAAQG,kBACzBoB,UAAW,GAAGI,EAAO,WAAC,gBAAgBA,EAAO,WAACP,EAAUQ,eACtDD,EAAO,WAACP,EAAUS,aAChBN,UAAAA,SAAS,EAATA,EAAa,MAEhBF,EAEH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnackbarItem.cjs.js","sources":["../../../../../../../src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useContext, useEffect, useRef } from \"react\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Variant, Actions } from \"../interfaces\";\nimport classes from \"./SnackbarItem.module.scss\";\nimport readyclasses from \"../../../../readyclasses.module.scss\";\nimport { useAnimation } from \"../../../../hooks/useAnimation\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport { SnackbarContext } from \"../SnackbarProvider/SnackbarStateProvider\";\n\nconst textColor = \"var(--snackbar-text-color)\";\n\nexport interface Props {\n id: string;\n title?: string;\n duration: number;\n variant: Variant;\n className?: string;\n onClose: (key: string) => void;\n closeButtonTitle: string;\n content?: string;\n actions?: Actions;\n}\n\nconst useRegisterSnackbarHeight = (\n singleSnackbarRef: React.RefObject<HTMLDivElement>,\n snackbarId: string\n) => {\n const ctx = useContext(SnackbarContext);\n\n useEffect(() => {\n if (singleSnackbarRef.current) {\n ctx.setSnackbarHeight(snackbarId, singleSnackbarRef.current.getBoundingClientRect().height);\n }\n }, [singleSnackbarRef.current]);\n};\n\nexport const SnackbarItem = ({\n id,\n title,\n duration,\n variant,\n content,\n className,\n actions = [],\n onClose,\n closeButtonTitle\n}: Props) => {\n const timerHandler = useRef<ReturnType<typeof setTimeout>>();\n const onAnimationEnd = () => onClose(id);\n const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);\n const hasOnlyTitle = !content && !!title;\n const renderTitle = title && !hasOnlyTitle;\n const renderContentOrTitleOnly = content || hasOnlyTitle;\n\n useRegisterSnackbarHeight(ref, id);\n\n useEffect(() => {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n return () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n }, []);\n\n const onMouseEnter = () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n\n const onMouseLeave = () => {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n };\n\n const getVariantIcon = () => {\n if (variant === \"error\") {\n return Icons.Error;\n }\n\n if (variant === \"warning\") {\n return Icons.Warning;\n }\n\n return variant === \"success\" ? Icons.CheckmarkCircleAlt : Icons.InfoCircle;\n };\n\n const actionButtons = actions.map((actionProp, index) => (\n <button\n key={index}\n {...actionProp}\n onClick={e => {\n onClose(id);\n actionProp.onClick?.(e);\n }}\n className={classes[\"action-button\"]}\n >\n {actionProp.label}\n </button>\n ));\n\n const snackbarClasses = [\n classes[\"snackbar\"],\n classes[variant],\n animationStarted ? readyclasses[\"slide-out\"] : readyclasses[\"slide-in\"],\n className ?? \"\"\n ].join(\" \");\n\n return (\n <div\n ref={ref}\n aria-live=\"polite\"\n className={snackbarClasses}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <div className={classes[\"outer-content-wrapper\"]}>\n <Icon icon={getVariantIcon()} className={classes[\"icon\"]} />\n <div className={classes[\"content-wrapper\"]}>\n {renderTitle && (\n <Typography className={classes[\"title\"]} variant=\"body-bold\" tag=\"span\">\n {title}\n </Typography>\n )}\n {renderContentOrTitleOnly && (\n <Typography className={classes[\"content\"]} variant=\"body\">\n {hasOnlyTitle ? title : content}\n </Typography>\n )}\n </div>\n </div>\n {actionButtons.length > 0 && <div className={classes[\"actions\"]}>{actionButtons}</div>}\n <IconButton\n id={classes[\"close-btn\"]}\n onClick={() => startAnimation()}\n title={closeButtonTitle}\n >\n <Icon icon={Icons.Times} color={textColor} />\n </IconButton>\n </div>\n );\n};\n"],"names":["textColor","useRegisterSnackbarHeight","singleSnackbarRef","snackbarId","ctx","useContext","SnackbarContext","useEffect","current","setSnackbarHeight","getBoundingClientRect","height","SnackbarItem","id","title","duration","variant","content","className","actions","onClose","closeButtonTitle","timerHandler","useRef","onAnimationEnd","ref","animationStarted","startAnimation","useAnimation","hasOnlyTitle","renderTitle","renderContentOrTitleOnly","setTimeout","clearTimeout","onMouseEnter","onMouseLeave","getVariantIcon","Icons","Error","Warning","CheckmarkCircleAlt","InfoCircle","actionButtons","map","actionProp","index","React","createElement","key","onClick","e","_a","call","classes","label","snackbarClasses","readyclasses","join","Icon","icon","Typography","tag","length","IconButton","Times","color"],"mappings":"uiBA0BA,MAAMA,EAAY,
|
|
1
|
+
{"version":3,"file":"SnackbarItem.cjs.js","sources":["../../../../../../../src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useContext, useEffect, useRef } from \"react\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Variant, Actions } from \"../interfaces\";\nimport classes from \"./SnackbarItem.module.scss\";\nimport readyclasses from \"../../../../readyclasses.module.scss\";\nimport { useAnimation } from \"../../../../hooks/useAnimation\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport { SnackbarContext } from \"../SnackbarProvider/SnackbarStateProvider\";\n\nconst textColor = \"var(--snackbar-text-color)\";\n\n/**\n * @deprecated\n */\nexport interface Props {\n id: string;\n title?: string;\n duration: number;\n variant: Variant;\n className?: string;\n onClose: (key: string) => void;\n closeButtonTitle: string;\n content?: string;\n actions?: Actions;\n}\n\nconst useRegisterSnackbarHeight = (\n singleSnackbarRef: React.RefObject<HTMLDivElement>,\n snackbarId: string\n) => {\n const ctx = useContext(SnackbarContext);\n\n useEffect(() => {\n if (singleSnackbarRef.current) {\n ctx.setSnackbarHeight(snackbarId, singleSnackbarRef.current.getBoundingClientRect().height);\n }\n }, [singleSnackbarRef.current]);\n};\n\n/**\n * @deprecated\n */\nexport const SnackbarItem = ({\n id,\n title,\n duration,\n variant,\n content,\n className,\n actions = [],\n onClose,\n closeButtonTitle\n}: Props) => {\n const timerHandler = useRef<ReturnType<typeof setTimeout>>();\n const onAnimationEnd = () => onClose(id);\n const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);\n const hasOnlyTitle = !content && !!title;\n const renderTitle = title && !hasOnlyTitle;\n const renderContentOrTitleOnly = content || hasOnlyTitle;\n\n useRegisterSnackbarHeight(ref, id);\n\n useEffect(() => {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n return () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n }, []);\n\n const onMouseEnter = () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n\n const onMouseLeave = () => {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n };\n\n const getVariantIcon = () => {\n if (variant === \"error\") {\n return Icons.Error;\n }\n\n if (variant === \"warning\") {\n return Icons.Warning;\n }\n\n return variant === \"success\" ? Icons.CheckmarkCircleAlt : Icons.InfoCircle;\n };\n\n const actionButtons = actions.map((actionProp, index) => (\n <button\n key={index}\n {...actionProp}\n onClick={e => {\n onClose(id);\n actionProp.onClick?.(e);\n }}\n className={classes[\"action-button\"]}\n >\n {actionProp.label}\n </button>\n ));\n\n const snackbarClasses = [\n classes[\"snackbar\"],\n classes[variant],\n animationStarted ? readyclasses[\"slide-out\"] : readyclasses[\"slide-in\"],\n className ?? \"\"\n ].join(\" \");\n\n return (\n <div\n ref={ref}\n aria-live=\"polite\"\n className={snackbarClasses}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <div className={classes[\"outer-content-wrapper\"]}>\n <Icon icon={getVariantIcon()} className={classes[\"icon\"]} />\n <div className={classes[\"content-wrapper\"]}>\n {renderTitle && (\n <Typography className={classes[\"title\"]} variant=\"body-bold\" tag=\"span\">\n {title}\n </Typography>\n )}\n {renderContentOrTitleOnly && (\n <Typography className={classes[\"content\"]} variant=\"body\">\n {hasOnlyTitle ? title : content}\n </Typography>\n )}\n </div>\n </div>\n {actionButtons.length > 0 && <div className={classes[\"actions\"]}>{actionButtons}</div>}\n <IconButton\n id={classes[\"close-btn\"]}\n onClick={() => startAnimation()}\n title={closeButtonTitle}\n >\n <Icon icon={Icons.Times} color={textColor} />\n </IconButton>\n </div>\n );\n};\n"],"names":["textColor","useRegisterSnackbarHeight","singleSnackbarRef","snackbarId","ctx","useContext","SnackbarContext","useEffect","current","setSnackbarHeight","getBoundingClientRect","height","SnackbarItem","id","title","duration","variant","content","className","actions","onClose","closeButtonTitle","timerHandler","useRef","onAnimationEnd","ref","animationStarted","startAnimation","useAnimation","hasOnlyTitle","renderTitle","renderContentOrTitleOnly","setTimeout","clearTimeout","onMouseEnter","onMouseLeave","getVariantIcon","Icons","Error","Warning","CheckmarkCircleAlt","InfoCircle","actionButtons","map","actionProp","index","React","createElement","key","onClick","e","_a","call","classes","label","snackbarClasses","readyclasses","join","Icon","icon","Typography","tag","length","IconButton","Times","color"],"mappings":"uiBA0BA,MAAMA,EAAY,6BAiBlB,MAAMC,EAA4B,CAChCC,EACAC,KAEA,MAAMC,EAAMC,aAAWC,EAAAA,iBAEvBC,EAAAA,WAAU,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,GACRU,EAAmB8B,EAAAA,WAAa,aAAeA,EAAAA,WAAa,YAC5DtC,IAAA,MAAAA,SAAA,EAAAA,EAAa,IACbuC,KAAK,KAEP,OACEX,EACE,WAAAC,cAAA,MAAA,CAAAtB,IAAKA,EAAG,YACE,SACVP,UAAWqC,EACXrB,aAAcA,EACdC,aAAcA,GAEdW,EAAA,WAAAC,cAAA,MAAA,CAAK7B,UAAWmC,EAAAA,WAAQ,0BACtBP,aAAAC,cAACW,EAAIA,KAAA,CAACC,KAAMvB,IAAkBlB,UAAWmC,EAAAA,WAAQ,UACjDP,EAAA,WAAAC,cAAA,MAAA,CAAK7B,UAAWmC,EAAAA,WAAQ,oBACrBvB,GACCgB,EAAAA,WAACC,cAAAa,EAAAA,YAAW1C,UAAWmC,EAAO,WAAC,SAAUrC,QAAQ,YAAY6C,IAAI,QAC9D/C,GAGJiB,GACCe,EAAC,WAAAC,cAAAa,EAAUA,WAAC,CAAA1C,UAAWmC,EAAAA,WAAQ,WAAYrC,QAAQ,QAChDa,EAAef,EAAQG,KAK/ByB,EAAcoB,OAAS,GAAKhB,EAAAA,WAAKC,cAAA,MAAA,CAAA7B,UAAWmC,EAAO,WAAC,YAAaX,GAClEI,EAAAA,WAAAC,cAACgB,aACC,CAAAlD,GAAIwC,EAAO,WAAC,aACZJ,QAAS,IAAMtB,IACfb,MAAOO,GAEPyB,EAAAA,WAAAC,cAACW,OAAI,CAACC,KAAMtB,EAAAA,MAAM2B,MAAOC,MAAOjE,KAGpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnackbarProvider.cjs.js","sources":["../../../../../../../src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ReactNode, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { SnackbarContextProvider } from \"./SnackbarStateProvider\";\nimport {\n Actions,\n EnqueueSnackbarProps,\n SnackbarOptionsProps,\n Variant,\n isNewEnqueueSnackbarInterface\n} from \"../interfaces\";\nimport { Placement, SnackbarContainer } from \"../SnackbarContainer/SnackbarContainer\";\nimport { generateID } from \"../../../../util/helper\";\nimport { SnackbarItem } from \"../SnackbarItem/SnackbarItem\";\nimport { useGetDomRoot } from \"../../../../hooks/useGetDomRoot\";\n\n/** Short msg is when only title is provided. Long one when content or/and actions are provided (or type is error). */\ninterface Duration {\n long: number;\n short: number;\n}\n\nexport interface Props {\n closeButtonTitle: string;\n children?: ReactNode;\n placement?: Placement;\n stackSize?: number;\n domRoot?: HTMLElement;\n autoHideDuration?: Duration;\n className?: string;\n}\n\nexport interface Item {\n id: string;\n title?: string;\n duration: number;\n className?: string;\n height: number;\n variant: Variant;\n content?: string;\n actions?: Actions;\n onClose?: () => void;\n}\n\nexport const SnackbarProvider = (\n {\n closeButtonTitle,\n placement = { vertical: \"bottom\", horizontal: \"center\" },\n autoHideDuration = { long: 8000, short: 4000 },\n stackSize = 3,\n domRoot,\n children,\n className\n }: Props = { closeButtonTitle: \"\" }\n) => {\n const [snackbars, setSnackbars] = useState<Item[]>([]);\n const wrappingDivRef = useRef(null);\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const addSnackbar = (item: Item) => {\n setSnackbars(items => [...items, item]);\n };\n\n const setSnackbarHeight = (id: string, height: number) => {\n const newSnackbarsState = snackbars.map(snackbar => {\n if (snackbar.id !== id) {\n return snackbar;\n }\n\n return { ...snackbar, height };\n });\n\n setSnackbars(newSnackbarsState);\n };\n\n const getDuration = (variant: Variant, actions?: Actions, content?: string) => {\n const hasError = variant === \"error\";\n const hasContentOrActions = content ?? actions;\n if (hasError || hasContentOrActions) {\n return autoHideDuration.long;\n }\n return autoHideDuration.short;\n };\n\n const enqueueSnackbar = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const newInterface = isNewEnqueueSnackbarInterface(propsOrTitle);\n const props = newInterface ? propsOrTitle : mapToNewInterface(propsOrTitle, content, options);\n const {\n variant = \"info\",\n actions,\n duration = getDuration(variant, actions, props.content),\n onClose\n } = props;\n const item: Item = {\n title: props.title,\n content: props.content,\n variant,\n className: props.className,\n actions,\n duration,\n height: 0,\n id: generateID(15, props.title),\n onClose\n };\n addSnackbar(item);\n };\n\n const mapToNewInterface = (\n title?: string,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): EnqueueSnackbarProps => {\n return {\n title,\n content,\n ...options\n };\n };\n\n const enqueueSuccessSnackbar = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const newInterface = isNewEnqueueSnackbarInterface(propsOrTitle);\n const props = newInterface ? propsOrTitle : mapToNewInterface(propsOrTitle, content, options);\n enqueueSnackbar({ ...props, variant: \"success\" });\n };\n\n const enqueueErrorSnackbar = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const newInterface = isNewEnqueueSnackbarInterface(propsOrTitle);\n const props = newInterface ? propsOrTitle : mapToNewInterface(propsOrTitle, content, options);\n enqueueSnackbar({ ...props, variant: \"error\" });\n };\n\n const enqueueWarningSnackbar = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const newInterface = isNewEnqueueSnackbarInterface(propsOrTitle);\n const props = newInterface ? propsOrTitle : mapToNewInterface(propsOrTitle, content, options);\n enqueueSnackbar({ ...props, variant: \"warning\" });\n };\n\n const onItemClosed = (id: string) => {\n setSnackbars(items => [...items].filter(item => item.id !== id));\n };\n\n const snackbarList = snackbars.map((item, index) =>\n index < stackSize ? (\n <SnackbarItem\n {...item}\n key={item.id}\n className={item.className}\n onClose={() => {\n onItemClosed(item.id);\n item.onClose?.();\n }}\n closeButtonTitle={closeButtonTitle}\n />\n ) : null\n );\n\n const snackbarPortal = createPortal(\n <SnackbarContainer placement={placement} className={className}>\n {snackbarList}\n </SnackbarContainer>,\n root\n );\n\n return (\n <SnackbarContextProvider\n initialState={{\n enqueueSnackbar,\n enqueueSuccessSnackbar,\n enqueueErrorSnackbar,\n enqueueWarningSnackbar,\n setSnackbarHeight,\n snackbars\n }}\n >\n {children}\n <div ref={wrappingDivRef}>{snackbarPortal}</div>\n </SnackbarContextProvider>\n );\n};\n"],"names":["SnackbarProvider","closeButtonTitle","placement","vertical","horizontal","autoHideDuration","long","short","stackSize","domRoot","children","className","snackbars","setSnackbars","useState","wrappingDivRef","useRef","root","useGetDomRoot","addSnackbar","item","items","setSnackbarHeight","id","height","newSnackbarsState","map","snackbar","getDuration","variant","actions","content","hasError","hasContentOrActions","enqueueSnackbar","propsOrTitle","options","newInterface","isNewEnqueueSnackbarInterface","props","mapToNewInterface","duration","onClose","title","generateID","enqueueSuccessSnackbar","enqueueErrorSnackbar","enqueueWarningSnackbar","onItemClosed","filter","snackbarList","index","React","createElement","SnackbarItem","key","_a","call","snackbarPortal","createPortal","SnackbarContainer","SnackbarContextProvider","initialState","ref"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SnackbarProvider.cjs.js","sources":["../../../../../../../src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ReactNode, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { SnackbarContextProvider } from \"./SnackbarStateProvider\";\nimport {\n Actions,\n EnqueueSnackbarProps,\n SnackbarOptionsProps,\n Variant,\n isNewEnqueueSnackbarInterface\n} from \"../interfaces\";\nimport { Placement, SnackbarContainer } from \"../SnackbarContainer/SnackbarContainer\";\nimport { generateID } from \"../../../../util/helper\";\nimport { SnackbarItem } from \"../SnackbarItem/SnackbarItem\";\nimport { useGetDomRoot } from \"../../../../hooks/useGetDomRoot\";\n\n/** Short msg is when only title is provided. Long one when content or/and actions are provided (or type is error). */\ninterface Duration {\n long: number;\n short: number;\n}\n\n/**\n * @deprecated\n */\nexport interface Props {\n closeButtonTitle: string;\n children?: ReactNode;\n placement?: Placement;\n stackSize?: number;\n domRoot?: HTMLElement;\n autoHideDuration?: Duration;\n className?: string;\n}\n\n/**\n * @deprecated\n */\nexport interface Item {\n id: string;\n title?: string;\n duration: number;\n className?: string;\n height: number;\n variant: Variant;\n content?: string;\n actions?: Actions;\n onClose?: () => void;\n}\n\n/**\n * @deprecated\n */\nexport const SnackbarProvider = (\n {\n closeButtonTitle,\n placement = { vertical: \"bottom\", horizontal: \"center\" },\n autoHideDuration = { long: 8000, short: 4000 },\n stackSize = 3,\n domRoot,\n children,\n className\n }: Props = { closeButtonTitle: \"\" }\n) => {\n const [snackbars, setSnackbars] = useState<Item[]>([]);\n const wrappingDivRef = useRef(null);\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const addSnackbar = (item: Item) => {\n setSnackbars(items => [...items, item]);\n };\n\n const setSnackbarHeight = (id: string, height: number) => {\n const newSnackbarsState = snackbars.map(snackbar => {\n if (snackbar.id !== id) {\n return snackbar;\n }\n\n return { ...snackbar, height };\n });\n\n setSnackbars(newSnackbarsState);\n };\n\n const getDuration = (variant: Variant, actions?: Actions, content?: string) => {\n const hasError = variant === \"error\";\n const hasContentOrActions = content ?? actions;\n if (hasError || hasContentOrActions) {\n return autoHideDuration.long;\n }\n return autoHideDuration.short;\n };\n\n const enqueueSnackbar = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const newInterface = isNewEnqueueSnackbarInterface(propsOrTitle);\n const props = newInterface ? propsOrTitle : mapToNewInterface(propsOrTitle, content, options);\n const {\n variant = \"info\",\n actions,\n duration = getDuration(variant, actions, props.content),\n onClose\n } = props;\n const item: Item = {\n title: props.title,\n content: props.content,\n variant,\n className: props.className,\n actions,\n duration,\n height: 0,\n id: generateID(15, props.title),\n onClose\n };\n addSnackbar(item);\n };\n\n const mapToNewInterface = (\n title?: string,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): EnqueueSnackbarProps => {\n return {\n title,\n content,\n ...options\n };\n };\n\n const enqueueSuccessSnackbar = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const newInterface = isNewEnqueueSnackbarInterface(propsOrTitle);\n const props = newInterface ? propsOrTitle : mapToNewInterface(propsOrTitle, content, options);\n enqueueSnackbar({ ...props, variant: \"success\" });\n };\n\n const enqueueErrorSnackbar = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const newInterface = isNewEnqueueSnackbarInterface(propsOrTitle);\n const props = newInterface ? propsOrTitle : mapToNewInterface(propsOrTitle, content, options);\n enqueueSnackbar({ ...props, variant: \"error\" });\n };\n\n const enqueueWarningSnackbar = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const newInterface = isNewEnqueueSnackbarInterface(propsOrTitle);\n const props = newInterface ? propsOrTitle : mapToNewInterface(propsOrTitle, content, options);\n enqueueSnackbar({ ...props, variant: \"warning\" });\n };\n\n const onItemClosed = (id: string) => {\n setSnackbars(items => [...items].filter(item => item.id !== id));\n };\n\n const snackbarList = snackbars.map((item, index) =>\n index < stackSize ? (\n <SnackbarItem\n {...item}\n key={item.id}\n className={item.className}\n onClose={() => {\n onItemClosed(item.id);\n item.onClose?.();\n }}\n closeButtonTitle={closeButtonTitle}\n />\n ) : null\n );\n\n const snackbarPortal = createPortal(\n <SnackbarContainer placement={placement} className={className}>\n {snackbarList}\n </SnackbarContainer>,\n root\n );\n\n return (\n <SnackbarContextProvider\n initialState={{\n enqueueSnackbar,\n enqueueSuccessSnackbar,\n enqueueErrorSnackbar,\n enqueueWarningSnackbar,\n setSnackbarHeight,\n snackbars\n }}\n >\n {children}\n <div ref={wrappingDivRef}>{snackbarPortal}</div>\n </SnackbarContextProvider>\n );\n};\n"],"names":["SnackbarProvider","closeButtonTitle","placement","vertical","horizontal","autoHideDuration","long","short","stackSize","domRoot","children","className","snackbars","setSnackbars","useState","wrappingDivRef","useRef","root","useGetDomRoot","addSnackbar","item","items","setSnackbarHeight","id","height","newSnackbarsState","map","snackbar","getDuration","variant","actions","content","hasError","hasContentOrActions","enqueueSnackbar","propsOrTitle","options","newInterface","isNewEnqueueSnackbarInterface","props","mapToNewInterface","duration","onClose","title","generateID","enqueueSuccessSnackbar","enqueueErrorSnackbar","enqueueWarningSnackbar","onItemClosed","filter","snackbarList","index","React","createElement","SnackbarItem","key","_a","call","snackbarPortal","createPortal","SnackbarContainer","SnackbarContextProvider","initialState","ref"],"mappings":"sgBAoEaA,EAAmB,EAE5BC,mBACAC,YAAY,CAAEC,SAAU,SAAUC,WAAY,UAC9CC,mBAAmB,CAAEC,KAAM,IAAMC,MAAO,KACxCC,YAAY,EACZC,UACAC,WACAC,aACS,CAAEV,iBAAkB,OAE/B,MAAOW,EAAWC,GAAgBC,EAAQA,SAAS,IACnD,MAAMC,EAAiBC,SAAO,MAC9B,MAAMC,KAAEA,GAASC,EAAaA,cAACT,EAAS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BH,GACnD,MAAMI,EAAQF,EAAeF,EAAeK,EAAkBL,EAAcJ,EAASK,GACrFF,EAAgB,IAAKK,EAAOV,QAAS,SAAU,EAGjD,MAAMkB,EAAyB,CAC7BZ,EACAJ,EACAK,EAAgC,CAAA,KAEhC,MAAMC,EAAeC,gCAA8BH,GACnD,MAAMI,EAAQF,EAAeF,EAAeK,EAAkBL,EAAcJ,EAASK,GACrFF,EAAgB,IAAKK,EAAOV,QAAS,WAAY,EAGnD,MAAMmB,EAAgBzB,IACpBV,GAAaQ,GAAS,IAAIA,GAAO4B,QAAO7B,GAAQA,EAAKG,KAAOA,KAAI,EAGlE,MAAM2B,EAAetC,EAAUc,KAAI,CAACN,EAAM+B,IACxCA,EAAQ3C,EACN4C,EAAAA,WAACC,cAAAC,EAAYA,iBACPlC,EACJmC,IAAKnC,EAAKG,GACVZ,UAAWS,EAAKT,UAChB+B,QAAS,WACPM,EAAa5B,EAAKG,KAClBiC,EAAApC,EAAKsB,WAAO,MAAAc,SAAA,OAAA,EAAAA,EAAAC,KAAArC,EAAI,EAElBnB,iBAAkBA,IAElB,OAGN,MAAMyD,EAAiBC,EAAYA,aACjCP,2BAACQ,EAAiBA,kBAAA,CAAC1D,UAAWA,EAAWS,UAAWA,GACjDuC,GAEHjC,GAGF,OACEmC,aAAAC,cAACQ,EAAuBA,wBAAA,CACtBC,aAAc,CACZ5B,kBACAW,yBACAC,uBACAC,yBACAzB,oBACAV,cAGDF,EACD0C,EAAK,WAAAC,cAAA,MAAA,CAAAU,IAAKhD,GAAiB2C,GAE7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnackbarStateProvider.cjs.js","sources":["../../../../../../../src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { createContext } from \"react\";\nimport { DeprecatedEnqueueSnackbarType } from \"../interfaces\";\nimport { Item } from \"./SnackbarProvider\";\n\ninterface SnackbarContextProps {\n enqueueSnackbar: DeprecatedEnqueueSnackbarType;\n enqueueSuccessSnackbar: DeprecatedEnqueueSnackbarType;\n enqueueWarningSnackbar: DeprecatedEnqueueSnackbarType;\n enqueueErrorSnackbar: DeprecatedEnqueueSnackbarType;\n setSnackbarHeight: (id: string, height: number) => void;\n snackbars: Item[];\n}\n\nconst SnackbarContext = createContext<SnackbarContextProps>({\n enqueueSnackbar: () => null,\n enqueueSuccessSnackbar: () => null,\n enqueueErrorSnackbar: () => null,\n enqueueWarningSnackbar: () => null,\n setSnackbarHeight: () => null,\n snackbars: []\n});\n\ninterface Props {\n initialState: SnackbarContextProps;\n children?: React.ReactNode;\n}\n\nconst SnackbarContextProvider = ({ children, initialState }: Props) => {\n return <SnackbarContext.Provider value={initialState}>{children}</SnackbarContext.Provider>;\n};\n\nexport { SnackbarContextProvider, SnackbarContext, SnackbarContextProps };\n"],"names":["SnackbarContext","createContext","enqueueSnackbar","enqueueSuccessSnackbar","enqueueErrorSnackbar","enqueueWarningSnackbar","setSnackbarHeight","snackbars","SnackbarContextProvider","children","initialState","React","createElement","Provider","value"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SnackbarStateProvider.cjs.js","sources":["../../../../../../../src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { createContext } from \"react\";\nimport { DeprecatedEnqueueSnackbarType } from \"../interfaces\";\nimport { Item } from \"./SnackbarProvider\";\n\n/**\n * @deprecated\n */\ninterface SnackbarContextProps {\n enqueueSnackbar: DeprecatedEnqueueSnackbarType;\n enqueueSuccessSnackbar: DeprecatedEnqueueSnackbarType;\n enqueueWarningSnackbar: DeprecatedEnqueueSnackbarType;\n enqueueErrorSnackbar: DeprecatedEnqueueSnackbarType;\n setSnackbarHeight: (id: string, height: number) => void;\n snackbars: Item[];\n}\n\n/**\n * @deprecated\n */\nconst SnackbarContext = createContext<SnackbarContextProps>({\n enqueueSnackbar: () => null,\n enqueueSuccessSnackbar: () => null,\n enqueueErrorSnackbar: () => null,\n enqueueWarningSnackbar: () => null,\n setSnackbarHeight: () => null,\n snackbars: []\n});\n\ninterface Props {\n initialState: SnackbarContextProps;\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated\n */\nconst SnackbarContextProvider = ({ children, initialState }: Props) => {\n return <SnackbarContext.Provider value={initialState}>{children}</SnackbarContext.Provider>;\n};\n\nexport { SnackbarContextProvider, SnackbarContext, SnackbarContextProps };\n"],"names":["SnackbarContext","createContext","enqueueSnackbar","enqueueSuccessSnackbar","enqueueErrorSnackbar","enqueueWarningSnackbar","setSnackbarHeight","snackbars","SnackbarContextProvider","children","initialState","React","createElement","Provider","value"],"mappings":"iLAmCM,MAAAA,EAAkBC,EAAAA,cAAoC,CAC1DC,gBAAiB,IAAM,KACvBC,uBAAwB,IAAM,KAC9BC,qBAAsB,IAAM,KAC5BC,uBAAwB,IAAM,KAC9BC,kBAAmB,IAAM,KACzBC,UAAW,KAWP,MAAAC,EAA0B,EAAGC,WAAUC,kBACpCC,EAAA,WAAAC,cAACZ,EAAgBa,SAAQ,CAACC,MAAOJ,GAAeD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.cjs.js","sources":["../../../../../../src/components/Notifications/Snackbar/interfaces.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ButtonHTMLAttributes } from \"react\";\n\nexport type Variant = \"info\" | \"success\" | \"error\" | \"warning\";\n\nexport type Actions = (ButtonHTMLAttributes<HTMLButtonElement> & { label: string })[];\n\nexport interface SnackbarOptionsProps {\n actions?: Actions;\n className?: string;\n variant?: Variant;\n duration?: number;\n onClose?: () => void;\n}\n\nexport interface EnqueueSnackbarProps extends SnackbarOptionsProps {\n title?: string;\n content?: string;\n}\n\nexport type DeprecatedEnqueueSnackbarType = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options?: SnackbarOptionsProps\n) => void;\n\nexport function isNewEnqueueSnackbarInterface(args: unknown): args is EnqueueSnackbarProps {\n return args !== null && typeof args === \"object\" && (\"title\" in args || \"content\" in args);\n}\n"],"names":["isNewEnqueueSnackbarInterface","args"],"mappings":"
|
|
1
|
+
{"version":3,"file":"interfaces.cjs.js","sources":["../../../../../../src/components/Notifications/Snackbar/interfaces.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ButtonHTMLAttributes } from \"react\";\n\n/**\n * @deprecated\n */\nexport type Variant = \"info\" | \"success\" | \"error\" | \"warning\";\n\n/**\n * @deprecated\n */\nexport type Actions = (ButtonHTMLAttributes<HTMLButtonElement> & { label: string })[];\n\n/**\n * @deprecated\n */\nexport interface SnackbarOptionsProps {\n actions?: Actions;\n className?: string;\n variant?: Variant;\n duration?: number;\n onClose?: () => void;\n}\n\n/**\n * @deprecated\n */\nexport interface EnqueueSnackbarProps extends SnackbarOptionsProps {\n title?: string;\n content?: string;\n}\n\n/**\n * @deprecated\n */\nexport type DeprecatedEnqueueSnackbarType = (\n propsOrTitle: EnqueueSnackbarProps | string | undefined,\n content?: string,\n options?: SnackbarOptionsProps\n) => void;\n\n/**\n * @deprecated\n */\nexport function isNewEnqueueSnackbarInterface(args: unknown): args is EnqueueSnackbarProps {\n return args !== null && typeof args === \"object\" && (\"title\" in args || \"content\" in args);\n}\n"],"names":["isNewEnqueueSnackbarInterface","args"],"mappings":"sEA2DM,SAAUA,EAA8BC,GAC5C,OAAOA,IAAS,aAAeA,IAAS,WAAa,UAAWA,GAAQ,YAAaA,EACvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSnackbar.cjs.js","sources":["../../../../../../src/components/Notifications/Snackbar/useSnackbar.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useContext } from \"react\";\nimport { SnackbarContext } from \"./SnackbarProvider/SnackbarStateProvider\";\n\nexport const useSnackbar = () => {\n const ctx = useContext(SnackbarContext);\n\n return {\n enqueueWarningSnackbar: ctx.enqueueWarningSnackbar,\n enqueueErrorSnackbar: ctx.enqueueErrorSnackbar,\n enqueueSuccessSnackbar: ctx.enqueueSuccessSnackbar,\n enqueueSnackbar: ctx.enqueueSnackbar\n };\n};\n"],"names":["useSnackbar","ctx","useContext","SnackbarContext","enqueueWarningSnackbar","enqueueErrorSnackbar","enqueueSuccessSnackbar","enqueueSnackbar"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSnackbar.cjs.js","sources":["../../../../../../src/components/Notifications/Snackbar/useSnackbar.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useContext } from \"react\";\nimport { SnackbarContext } from \"./SnackbarProvider/SnackbarStateProvider\";\n\n/**\n * @deprecated\n */\nexport const useSnackbar = () => {\n const ctx = useContext(SnackbarContext);\n\n return {\n enqueueWarningSnackbar: ctx.enqueueWarningSnackbar,\n enqueueErrorSnackbar: ctx.enqueueErrorSnackbar,\n enqueueSuccessSnackbar: ctx.enqueueSuccessSnackbar,\n enqueueSnackbar: ctx.enqueueSnackbar\n };\n};\n"],"names":["useSnackbar","ctx","useContext","SnackbarContext","enqueueWarningSnackbar","enqueueErrorSnackbar","enqueueSuccessSnackbar","enqueueSnackbar"],"mappings":"8JAsBO,MAAMA,EAAc,KACzB,MAAMC,EAAMC,aAAWC,EAAAA,iBAEvB,MAAO,CACLC,uBAAwBH,EAAIG,uBAC5BC,qBAAsBJ,EAAII,qBAC1BC,uBAAwBL,EAAIK,uBAC5BC,gBAAiBN,EAAIM,gBACtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("./Pagination.module.cjs.js");var a=require("../src/readyclasses.module.cjs.js");var l=require("../Button/IconButton.cjs.js");var n=require("../Icon/Icon.cjs.js");var r=require("../Form/Select/SingleSelect/Select.cjs.js");var c=require("../Form/Select/SingleSelect/Option.cjs.js");var u=require("../Form/Label/Label.cjs.js");function s(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var i=s(e);var o;(function(e){e["totalItems"]="items in total";e["itemsPerPage"]="Items per page";e["currentPage"]="of %1 pages";e["itemsPerPageLabel"]="Select how many items per page you want to see.";e["currentPageLabel"]="What page you are currently on."})(o||(o={}));const d=({totalElements:s,pageSize:d=10,translate:f=o,currentPage:m,className:p,onPageChange:g,onPageSizeChange:v,...E},b)=>{const I=()=>{if(!s)return 1;if(Math.ceil(s/d)<1)return 1;return Math.ceil(s/d)};const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("./Pagination.module.cjs.js");var a=require("../src/readyclasses.module.cjs.js");var l=require("../Button/IconButton.cjs.js");var n=require("../Icon/Icon.cjs.js");var r=require("../Form/Select/SingleSelect/Select.cjs.js");var c=require("../Form/Select/SingleSelect/Option.cjs.js");var u=require("../Form/Label/Label.cjs.js");function s(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var i=s(e);var o;(function(e){e["totalItems"]="items in total";e["itemsPerPage"]="Items per page";e["currentPage"]="of %1 pages";e["itemsPerPageLabel"]="Select how many items per page you want to see.";e["currentPageLabel"]="What page you are currently on."})(o||(o={}));const d=({totalElements:s,pageSize:d=10,translate:f=o,currentPage:m,className:p,onPageChange:g,onPageSizeChange:v,...E},b)=>{const I=()=>{if(!s)return 1;if(Math.ceil(s/d)<1)return 1;return Math.ceil(s/d)};const N=I();const[S,P]=e.useState(false);const h=e=>{const t=Number(e.target.value);P(true);v(t)};const j=e=>{g(e)};e.useEffect((()=>{S&&P(false)}),[S]);return i["default"].createElement("div",{...E,ref:b,className:`${t["default"]["pagination-wrapper"]} ${p!==null&&p!==void 0?p:""}`},i["default"].createElement("div",{className:t["default"]["left"]},d&&i["default"].createElement("div",{className:t["default"]["per-page"]},i["default"].createElement(u.Label,{id:"page-size-select-label",className:t["default"]["label"]},f.itemsPerPage),i["default"].createElement(r.Select,{labeledBy:"page-size-select-label",className:`${t["default"]["form-element"]} ${t["default"]["page-size-select"]}`,value:d.toString(),onChange:h},i["default"].createElement(c.Option,{value:"10"},"10"),i["default"].createElement(c.Option,{value:"25"},"25"),i["default"].createElement(c.Option,{value:"50"},"50"))),s&&i["default"].createElement("div",{className:t["default"]["total"]},i["default"].createElement("span",{tabIndex:0},s," ",f.totalItems))),i["default"].createElement("div",{className:t["default"]["pagination"]},i["default"].createElement(e.Fragment,null,s&&!!N&&i["default"].createElement("div",{className:t["default"]["page"]},i["default"].createElement(u.Label,{id:"current-value-input-label",htmlFor:"current-value-input",className:`${a["default"]["sr-only"]} ${t["default"]["current-value-select-label"]}`},f.currentPageLabel),i["default"].createElement(r.Select,{labeledBy:"current-value-input-label",key:"input",id:"current-value-input",size:m.toString().length,onChange:e=>j(Number(e.target.value)),name:"current-value-input",value:m.toString(),className:`${t["default"]["form-element"]} ${t["default"]["current-page-select"]}`,searchInputProps:{wrapperProps:{className:t["default"]["search-input-wrapper"]},reset:S,autoComplete:"off"}},Array.from(Array(N).keys()).map((e=>i["default"].createElement(c.Option,{key:e,value:(e+1).toString()},(e+1).toString())))),i["default"].createElement("span",{className:t["default"]["page-total"]},f.currentPage.replace("%1",Math.ceil(s/d).toString()))),!!m&&i["default"].createElement("div",{className:t["default"]["previous"]},i["default"].createElement(l.IconButton,{disabled:m<=1,title:"first",onClick:()=>j(1),"data-paginate":"first"},i["default"].createElement(n.Icon,{icon:n.Icons.NavigationFirst})),i["default"].createElement(l.IconButton,{disabled:m<=1,title:"previous",onClick:()=>j(m-1),"data-paginate":"previous"},i["default"].createElement(n.Icon,{icon:n.Icons.ChevronLeft}))),i["default"].createElement("div",{className:t["default"]["next"]},!!(m!==void 0||m!==void 0&&!s)&&i["default"].createElement(l.IconButton,{disabled:m>=N,title:"next",onClick:()=>j(m+1),"data-paginate":"next"},i["default"].createElement(n.Icon,{icon:n.Icons.ChevronRight})),!!(m&&s)&&i["default"].createElement(l.IconButton,{disabled:m>=N,title:"last",onClick:()=>j(Math.ceil(s/d)),"data-paginate":"last"},i["default"].createElement(n.Icon,{icon:n.Icons.NavigationLast}))))))};const f=i["default"].forwardRef(d);exports.Pagination=f;
|
|
2
2
|
//# sourceMappingURL=Pagination.cjs.js.map
|