@newtonschool/grauity 0.0.13 → 0.1.10
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/README.md +138 -9
- package/dist/fonts/grauity-icons.eot +0 -0
- package/dist/fonts/grauity-icons.ttf +0 -0
- package/dist/fonts/grauity-icons.woff +0 -0
- package/dist/fonts/grauity-icons.woff2 +0 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useClickAway.d.ts +15 -0
- package/dist/hooks/useClickAway.d.ts.map +1 -0
- package/dist/hooks/useDisableBodyScroll.d.ts +7 -0
- package/dist/hooks/useDisableBodyScroll.d.ts.map +1 -0
- package/dist/hooks/useKeyboardEvent.d.ts +17 -0
- package/dist/hooks/useKeyboardEvent.d.ts.map +1 -0
- package/dist/index.d.ts +830 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.cjs.map +1 -1
- package/dist/main.css +10 -1
- package/dist/main.css.map +1 -1
- package/dist/module.css +10 -1
- package/dist/module.css.map +1 -1
- package/dist/module.mjs +1 -1
- package/dist/module.mjs.map +1 -1
- package/dist/stories/atoms/Colors/FoundationColors.stories.d.ts +7 -0
- package/dist/stories/atoms/Colors/FoundationColors.stories.d.ts.map +1 -0
- package/dist/stories/atoms/Colors/index.stories.d.ts +18 -0
- package/dist/stories/atoms/Colors/index.stories.d.ts.map +1 -0
- package/dist/stories/atoms/CornerRadius/index.stories.d.ts +7 -0
- package/dist/stories/atoms/CornerRadius/index.stories.d.ts.map +1 -0
- package/dist/stories/atoms/Spacing/index.stories.d.ts +7 -0
- package/dist/stories/atoms/Spacing/index.stories.d.ts.map +1 -0
- package/dist/stories/decorators/withEnableBodyScroll.d.ts +8 -0
- package/dist/stories/decorators/withEnableBodyScroll.d.ts.map +1 -0
- package/dist/stories/decorators/withInlineContainer.d.ts +15 -0
- package/dist/stories/decorators/withInlineContainer.d.ts.map +1 -0
- package/dist/stories/elements/Alert/Gallery.stories.d.ts +30 -0
- package/dist/stories/elements/Alert/Gallery.stories.d.ts.map +1 -0
- package/dist/stories/elements/Alert/index.stories.d.ts +30 -0
- package/dist/stories/elements/Alert/index.stories.d.ts.map +1 -0
- package/dist/stories/elements/AlertBanner/Gallery.stories.d.ts +33 -0
- package/dist/stories/elements/AlertBanner/Gallery.stories.d.ts.map +1 -0
- package/dist/stories/elements/AlertBanner/index.stories.d.ts +30 -0
- package/dist/stories/elements/AlertBanner/index.stories.d.ts.map +1 -0
- package/dist/stories/elements/Button/Gallery.stories.d.ts +10 -0
- package/dist/stories/elements/Button/Gallery.stories.d.ts.map +1 -0
- package/dist/stories/elements/Button/index.stories.d.ts +9 -0
- package/dist/stories/elements/Button/index.stories.d.ts.map +1 -0
- package/dist/stories/elements/Icon/index.stories.d.ts +14 -0
- package/dist/stories/elements/Icon/index.stories.d.ts.map +1 -0
- package/dist/stories/elements/IconButton/Gallery.stories.d.ts +10 -0
- package/dist/stories/elements/IconButton/Gallery.stories.d.ts.map +1 -0
- package/dist/stories/elements/IconButton/index.stories.d.ts +9 -0
- package/dist/stories/elements/IconButton/index.stories.d.ts.map +1 -0
- package/dist/stories/elements/Modal/ConfirmationDialog.source.d.ts +3 -0
- package/dist/stories/elements/Modal/ConfirmationDialog.source.d.ts.map +1 -0
- package/dist/stories/elements/Modal/ConfirmationDialog.stories.d.ts +43 -0
- package/dist/stories/elements/Modal/ConfirmationDialog.stories.d.ts.map +1 -0
- package/dist/stories/elements/Modal/ConfirmationDialogWithTrigger.stories.d.ts +42 -0
- package/dist/stories/elements/Modal/ConfirmationDialogWithTrigger.stories.d.ts.map +1 -0
- package/dist/stories/elements/Modal/MultiStepModal.stories.d.ts +46 -0
- package/dist/stories/elements/Modal/MultiStepModal.stories.d.ts.map +1 -0
- package/dist/stories/elements/Modal/index.stories.d.ts +32 -0
- package/dist/stories/elements/Modal/index.stories.d.ts.map +1 -0
- package/dist/stories/elements/Modal/multiStepArgs.d.ts +4 -0
- package/dist/stories/elements/Modal/multiStepArgs.d.ts.map +1 -0
- package/dist/stories/elements/Modal/singleStepArgs.d.ts +4 -0
- package/dist/stories/elements/Modal/singleStepArgs.d.ts.map +1 -0
- package/dist/stories/elements/Table/Manual.source.d.ts +3 -0
- package/dist/stories/elements/Table/Manual.source.d.ts.map +1 -0
- package/dist/stories/elements/Table/Manual.stories.d.ts +54 -0
- package/dist/stories/elements/Table/Manual.stories.d.ts.map +1 -0
- package/dist/stories/elements/Table/ManualColumnNesting.source.d.ts +3 -0
- package/dist/stories/elements/Table/ManualColumnNesting.source.d.ts.map +1 -0
- package/dist/stories/elements/Table/ManualColumnNesting.stories.d.ts +53 -0
- package/dist/stories/elements/Table/ManualColumnNesting.stories.d.ts.map +1 -0
- package/dist/stories/elements/Table/index.stories.d.ts +46 -0
- package/dist/stories/elements/Table/index.stories.d.ts.map +1 -0
- package/dist/stories/elements/Table/simpleArgs.d.ts +4 -0
- package/dist/stories/elements/Table/simpleArgs.d.ts.map +1 -0
- package/dist/stories/elements/Typography/TypographyGallery.stories.d.ts +29 -0
- package/dist/stories/elements/Typography/TypographyGallery.stories.d.ts.map +1 -0
- package/dist/stories/elements/Typography/index.stories.d.ts +28 -0
- package/dist/stories/elements/Typography/index.stories.d.ts.map +1 -0
- package/dist/stories/helper-components/ColorRenderer/index.d.ts +15 -0
- package/dist/stories/helper-components/ColorRenderer/index.d.ts.map +1 -0
- package/dist/stories/helper-components/DocPageWithPlayground.d.ts +12 -0
- package/dist/stories/helper-components/DocPageWithPlayground.d.ts.map +1 -0
- package/dist/stories/helper-components/TokenBlock/index.d.ts +21 -0
- package/dist/stories/helper-components/TokenBlock/index.d.ts.map +1 -0
- package/dist/stories/helper-components/TokenBlock/index.styles.d.ts +4 -0
- package/dist/stories/helper-components/TokenBlock/index.styles.d.ts.map +1 -0
- package/dist/stories/utils/index.d.ts +82 -0
- package/dist/stories/utils/index.d.ts.map +1 -0
- package/dist/ui/core/colors/colorTypes.d.ts +1 -0
- package/dist/ui/core/colors/colorTypes.d.ts.map +1 -0
- package/dist/ui/core/colors/index.d.ts +1 -0
- package/dist/ui/core/colors/index.d.ts.map +1 -0
- package/dist/ui/core/icons/iconTags.d.ts.map +1 -0
- package/dist/ui/core/icons/iconTypes.d.ts.map +1 -0
- package/dist/{core → ui/core}/icons/index.d.ts +1 -1
- package/dist/ui/core/icons/index.d.ts.map +1 -0
- package/dist/ui/core/index.d.ts +7 -0
- package/dist/ui/core/index.d.ts.map +1 -0
- package/dist/ui/core/miscellaneous-choices/index.d.ts.map +1 -0
- package/dist/ui/core/miscellaneous-choices/miscellaneousTypes.d.ts.map +1 -0
- package/dist/ui/core/sizes/index.d.ts.map +1 -0
- package/dist/ui/core/sizes/sizeTypes.d.ts +3 -0
- package/dist/ui/core/sizes/sizeTypes.d.ts.map +1 -0
- package/dist/ui/elements/Alert/Alert.d.ts +8 -0
- package/dist/ui/elements/Alert/Alert.d.ts.map +1 -0
- package/dist/ui/elements/Alert/Alert.styles.d.ts +7 -0
- package/dist/ui/elements/Alert/Alert.styles.d.ts.map +1 -0
- package/dist/ui/elements/Alert/Alert.test.d.ts +2 -0
- package/dist/ui/elements/Alert/Alert.test.d.ts.map +1 -0
- package/dist/ui/elements/Alert/constants.d.ts +140 -0
- package/dist/ui/elements/Alert/constants.d.ts.map +1 -0
- package/dist/ui/elements/Alert/index.d.ts +7 -0
- package/dist/ui/elements/Alert/index.d.ts.map +1 -0
- package/dist/ui/elements/Alert/types.d.ts +125 -0
- package/dist/ui/elements/Alert/types.d.ts.map +1 -0
- package/dist/ui/elements/Alert/utils.d.ts +1 -0
- package/dist/ui/elements/Alert/utils.d.ts.map +1 -0
- package/dist/ui/elements/AlertBanner/AlertBanner.d.ts +9 -0
- package/dist/ui/elements/AlertBanner/AlertBanner.d.ts.map +1 -0
- package/dist/ui/elements/AlertBanner/AlertBanner.styles.d.ts +4 -0
- package/dist/ui/elements/AlertBanner/AlertBanner.styles.d.ts.map +1 -0
- package/dist/ui/elements/AlertBanner/AlertBanner.test.d.ts +2 -0
- package/dist/ui/elements/AlertBanner/AlertBanner.test.d.ts.map +1 -0
- package/dist/ui/elements/AlertBanner/constants.d.ts +140 -0
- package/dist/ui/elements/AlertBanner/constants.d.ts.map +1 -0
- package/dist/ui/elements/AlertBanner/index.d.ts +7 -0
- package/dist/ui/elements/AlertBanner/index.d.ts.map +1 -0
- package/dist/ui/elements/AlertBanner/types.d.ts +111 -0
- package/dist/ui/elements/AlertBanner/types.d.ts.map +1 -0
- package/dist/ui/elements/AlertBanner/utils.d.ts +105 -0
- package/dist/ui/elements/AlertBanner/utils.d.ts.map +1 -0
- package/dist/ui/elements/Button/Button.d.ts +11 -0
- package/dist/ui/elements/Button/Button.d.ts.map +1 -0
- package/dist/ui/elements/Button/Button.styles.d.ts +4 -0
- package/dist/ui/elements/Button/Button.styles.d.ts.map +1 -0
- package/dist/ui/elements/Button/Button.test.d.ts +2 -0
- package/dist/ui/elements/Button/Button.test.d.ts.map +1 -0
- package/dist/ui/elements/Button/ButtonGroup.d.ts +11 -0
- package/dist/ui/elements/Button/ButtonGroup.d.ts.map +1 -0
- package/dist/ui/elements/Button/ButtonGroup.styles.d.ts +2 -0
- package/dist/ui/elements/Button/ButtonGroup.styles.d.ts.map +1 -0
- package/dist/ui/elements/Button/IconButton.d.ts +8 -0
- package/dist/ui/elements/Button/IconButton.d.ts.map +1 -0
- package/dist/ui/elements/Button/IconButton.test.d.ts +2 -0
- package/dist/ui/elements/Button/IconButton.test.d.ts.map +1 -0
- package/dist/ui/elements/Button/constants.d.ts +54 -0
- package/dist/ui/elements/Button/constants.d.ts.map +1 -0
- package/dist/ui/elements/Button/index.d.ts +9 -0
- package/dist/ui/elements/Button/index.d.ts.map +1 -0
- package/dist/ui/elements/Button/types.d.ts +226 -0
- package/dist/ui/elements/Button/types.d.ts.map +1 -0
- package/dist/ui/elements/Button/utils.d.ts +1 -0
- package/dist/ui/elements/Button/utils.d.ts.map +1 -0
- package/dist/ui/elements/Icon/Icon.d.ts +48 -0
- package/dist/ui/elements/Icon/Icon.d.ts.map +1 -0
- package/dist/ui/elements/Icon/Icon.styles.d.ts +5 -0
- package/dist/ui/elements/Icon/Icon.styles.d.ts.map +1 -0
- package/dist/ui/elements/Icon/index.d.ts +3 -0
- package/dist/ui/elements/Icon/index.d.ts.map +1 -0
- package/dist/ui/elements/Icon/types.d.ts +74 -0
- package/dist/ui/elements/Icon/types.d.ts.map +1 -0
- package/dist/ui/elements/Modal/ConfirmationDialog/index.d.ts +43 -0
- package/dist/ui/elements/Modal/ConfirmationDialog/index.d.ts.map +1 -0
- package/dist/ui/elements/Modal/ConfirmationDialog/index.test.d.ts +2 -0
- package/dist/ui/elements/Modal/ConfirmationDialog/index.test.d.ts.map +1 -0
- package/dist/ui/elements/Modal/Modal.d.ts +21 -0
- package/dist/ui/elements/Modal/Modal.d.ts.map +1 -0
- package/dist/ui/elements/Modal/Modal.styles.d.ts +18 -0
- package/dist/ui/elements/Modal/Modal.styles.d.ts.map +1 -0
- package/dist/ui/elements/Modal/Modal.test.d.ts +2 -0
- package/dist/ui/elements/Modal/Modal.test.d.ts.map +1 -0
- package/dist/ui/elements/Modal/MultiStepModal/index.d.ts +46 -0
- package/dist/ui/elements/Modal/MultiStepModal/index.d.ts.map +1 -0
- package/dist/ui/elements/Modal/MultiStepModal/index.test.d.ts +2 -0
- package/dist/ui/elements/Modal/MultiStepModal/index.test.d.ts.map +1 -0
- package/dist/ui/elements/Modal/constants.d.ts +1 -0
- package/dist/ui/elements/Modal/constants.d.ts.map +1 -0
- package/dist/ui/elements/Modal/index.d.ts +5 -0
- package/dist/ui/elements/Modal/index.d.ts.map +1 -0
- package/dist/ui/elements/Modal/types.d.ts +312 -0
- package/dist/ui/elements/Modal/types.d.ts.map +1 -0
- package/dist/ui/elements/Modal/utils.d.ts +1 -0
- package/dist/ui/elements/Modal/utils.d.ts.map +1 -0
- package/dist/ui/elements/Table/Table.d.ts +47 -0
- package/dist/ui/elements/Table/Table.d.ts.map +1 -0
- package/dist/ui/elements/Table/Table.styles.d.ts +8 -0
- package/dist/ui/elements/Table/Table.styles.d.ts.map +1 -0
- package/dist/ui/elements/Table/Table.test.d.ts +2 -0
- package/dist/ui/elements/Table/Table.test.d.ts.map +1 -0
- package/dist/ui/elements/Table/constants.d.ts +1 -0
- package/dist/ui/elements/Table/constants.d.ts.map +1 -0
- package/dist/ui/elements/Table/index.d.ts +3 -0
- package/dist/ui/elements/Table/index.d.ts.map +1 -0
- package/dist/ui/elements/Table/types.d.ts +223 -0
- package/dist/ui/elements/Table/types.d.ts.map +1 -0
- package/dist/ui/elements/Table/utils.d.ts +1 -0
- package/dist/ui/elements/Table/utils.d.ts.map +1 -0
- package/dist/ui/elements/Typography/Typography.d.ts +36 -0
- package/dist/ui/elements/Typography/Typography.d.ts.map +1 -0
- package/dist/ui/elements/Typography/Typography.styles.d.ts +6 -0
- package/dist/ui/elements/Typography/Typography.styles.d.ts.map +1 -0
- package/dist/ui/elements/Typography/constants.d.ts +22 -0
- package/dist/ui/elements/Typography/constants.d.ts.map +1 -0
- package/dist/ui/elements/Typography/index.d.ts +5 -0
- package/dist/ui/elements/Typography/index.d.ts.map +1 -0
- package/dist/ui/elements/Typography/types.d.ts +50 -0
- package/dist/ui/elements/Typography/types.d.ts.map +1 -0
- package/dist/ui/elements/Typography/utils.d.ts +2 -0
- package/dist/ui/elements/Typography/utils.d.ts.map +1 -0
- package/dist/ui/helpers/classNameBuilders.d.ts.map +1 -0
- package/dist/ui/helpers/index.d.ts +3 -0
- package/dist/ui/helpers/index.d.ts.map +1 -0
- package/dist/ui/index.d.ts +11 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/{init → ui/init}/GrauityInit.d.ts +15 -3
- package/dist/ui/init/GrauityInit.d.ts.map +1 -0
- package/dist/ui/init/index.d.ts.map +1 -0
- package/dist/ui/themes/GlobalStyle.d.ts +5 -0
- package/dist/ui/themes/GlobalStyle.d.ts.map +1 -0
- package/dist/ui/themes/ThemeContext.d.ts +24 -0
- package/dist/ui/themes/ThemeContext.d.ts.map +1 -0
- package/dist/ui/themes/constants.d.ts +6 -0
- package/dist/ui/themes/constants.d.ts.map +1 -0
- package/dist/ui/themes/darkThemeConstants.d.ts +70 -0
- package/dist/ui/themes/darkThemeConstants.d.ts.map +1 -0
- package/dist/ui/themes/lightThemeConstants.d.ts +70 -0
- package/dist/ui/themes/lightThemeConstants.d.ts.map +1 -0
- package/dist/ui/themes/tokens.d.ts +1 -0
- package/dist/ui/themes/tokens.d.ts.map +1 -0
- package/dist/ui/themes/types.d.ts +73 -0
- package/dist/ui/themes/types.d.ts.map +1 -0
- package/package.json +53 -28
- package/ui/core/colors/colorTypes.ts +2 -20
- package/ui/core/colors/index.ts +23 -23
- package/ui/core/icons/index.ts +1 -3
- package/ui/core/index.ts +7 -10
- package/ui/core/sizes/sizeTypes.ts +1 -0
- package/ui/css/fonts.scss +0 -8
- package/ui/css/index.scss +0 -8
- package/ui/css/reset.scss +2 -5
- package/ui/elements/Alert/Alert.styles.ts +66 -0
- package/ui/elements/Alert/Alert.test.tsx +81 -0
- package/ui/elements/Alert/Alert.tsx +153 -0
- package/ui/elements/Alert/constants.ts +169 -0
- package/ui/elements/Alert/index.ts +6 -0
- package/ui/elements/Alert/types.ts +150 -0
- package/ui/elements/AlertBanner/AlertBanner.styles.ts +35 -0
- package/ui/elements/AlertBanner/AlertBanner.test.tsx +70 -0
- package/ui/elements/AlertBanner/AlertBanner.tsx +137 -0
- package/ui/elements/AlertBanner/constants.ts +179 -0
- package/ui/elements/AlertBanner/index.ts +6 -0
- package/ui/elements/AlertBanner/types.ts +133 -0
- package/ui/elements/AlertBanner/utils.ts +52 -0
- package/ui/elements/Button/Button.styles.ts +88 -0
- package/ui/elements/Button/Button.test.tsx +78 -0
- package/ui/elements/Button/Button.tsx +134 -0
- package/ui/elements/Button/ButtonGroup.styles.ts +7 -0
- package/ui/elements/Button/ButtonGroup.tsx +21 -0
- package/ui/elements/Button/IconButton.test.tsx +39 -0
- package/ui/elements/Button/IconButton.tsx +118 -0
- package/ui/elements/Button/constants.ts +304 -0
- package/ui/elements/Button/index.ts +8 -0
- package/ui/elements/Button/types.ts +282 -0
- package/ui/elements/Button/utils.ts +0 -0
- package/ui/elements/Icon/Icon.styles.ts +98 -0
- package/ui/elements/Icon/Icon.tsx +17 -107
- package/ui/elements/Icon/index.ts +1 -2
- package/ui/elements/Icon/types.ts +96 -0
- package/ui/elements/Modal/ConfirmationDialog/index.test.tsx +116 -0
- package/ui/elements/Modal/ConfirmationDialog/index.tsx +151 -0
- package/ui/elements/Modal/Modal.styles.ts +230 -0
- package/ui/elements/Modal/Modal.test.tsx +117 -0
- package/ui/elements/Modal/Modal.tsx +179 -0
- package/ui/elements/Modal/MultiStepModal/index.test.tsx +116 -0
- package/ui/elements/Modal/MultiStepModal/index.tsx +184 -0
- package/ui/elements/Modal/constants.ts +0 -0
- package/ui/elements/Modal/index.ts +4 -0
- package/ui/elements/Modal/types.ts +379 -0
- package/ui/elements/Modal/utils.tsx +0 -0
- package/ui/elements/Table/Table.styles.ts +178 -0
- package/ui/elements/Table/Table.test.tsx +72 -0
- package/ui/elements/Table/Table.tsx +118 -0
- package/ui/elements/Table/constants.ts +0 -0
- package/ui/elements/Table/index.ts +2 -0
- package/ui/elements/Table/types.ts +270 -0
- package/ui/elements/Table/utils.ts +0 -0
- package/ui/elements/Typography/Typography.styles.ts +29 -0
- package/ui/elements/Typography/Typography.tsx +70 -0
- package/ui/elements/Typography/constants.ts +292 -0
- package/ui/elements/Typography/index.ts +9 -0
- package/ui/elements/Typography/types.ts +116 -0
- package/ui/elements/Typography/utils.ts +11 -0
- package/ui/fonts/grauity-icons.eot +0 -0
- package/ui/fonts/grauity-icons.ttf +0 -0
- package/ui/fonts/grauity-icons.woff +0 -0
- package/ui/fonts/grauity-icons.woff2 +0 -0
- package/ui/helpers/index.ts +1 -7
- package/ui/index.ts +42 -3
- package/ui/init/GrauityInit.tsx +30 -7
- package/ui/init/index.ts +0 -1
- package/ui/themes/GlobalStyle.ts +273 -0
- package/ui/themes/ThemeContext.tsx +140 -0
- package/ui/themes/constants.ts +8 -0
- package/ui/themes/darkThemeConstants.ts +73 -0
- package/ui/themes/lightThemeConstants.ts +73 -0
- package/ui/themes/tokens.ts +0 -0
- package/ui/themes/types.ts +77 -0
- package/dist/core/colors/colorTypes.d.ts +0 -3
- package/dist/core/colors/colorTypes.d.ts.map +0 -1
- package/dist/core/colors/index.d.ts +0 -14
- package/dist/core/colors/index.d.ts.map +0 -1
- package/dist/core/icons/iconTags.d.ts.map +0 -1
- package/dist/core/icons/iconTypes.d.ts.map +0 -1
- package/dist/core/icons/index.d.ts.map +0 -1
- package/dist/core/index.d.ts +0 -9
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/miscellaneous-choices/index.d.ts.map +0 -1
- package/dist/core/miscellaneous-choices/miscellaneousTypes.d.ts.map +0 -1
- package/dist/core/sizes/index.d.ts.map +0 -1
- package/dist/core/sizes/sizeTypes.d.ts +0 -3
- package/dist/core/sizes/sizeTypes.d.ts.map +0 -1
- package/dist/elements/Icon/Icon.d.ts +0 -115
- package/dist/elements/Icon/Icon.d.ts.map +0 -1
- package/dist/elements/Icon/index.d.ts +0 -3
- package/dist/elements/Icon/index.d.ts.map +0 -1
- package/dist/elements/index.d.ts +0 -3
- package/dist/elements/index.d.ts.map +0 -1
- package/dist/helpers/classNameBuilders.d.ts.map +0 -1
- package/dist/helpers/getElementTypeFromProps.d.ts +0 -14
- package/dist/helpers/getElementTypeFromProps.d.ts.map +0 -1
- package/dist/helpers/index.d.ts +0 -4
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/init/GrauityInit.d.ts.map +0 -1
- package/dist/init/index.d.ts.map +0 -1
- package/ui/css/colors.scss +0 -131
- package/ui/css/icons.scss +0 -92
- package/ui/elements/index.ts +0 -2
- package/ui/helpers/getElementTypeFromProps.ts +0 -32
- /package/dist/{core → ui/core}/icons/iconTags.d.ts +0 -0
- /package/dist/{core → ui/core}/icons/iconTypes.d.ts +0 -0
- /package/dist/{core → ui/core}/miscellaneous-choices/index.d.ts +0 -0
- /package/dist/{core → ui/core}/miscellaneous-choices/miscellaneousTypes.d.ts +0 -0
- /package/dist/{core → ui/core}/sizes/index.d.ts +0 -0
- /package/dist/{helpers → ui/helpers}/classNameBuilders.d.ts +0 -0
- /package/dist/{init → ui/init}/index.d.ts +0 -0
- /package/ui/{css/sizes.scss → elements/Alert/utils.ts} +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { grauityIconName } from '../../core';
|
|
3
|
+
import { ButtonProps } from '../Button';
|
|
4
|
+
export type AlertType = 'default' | 'outlined' | 'filled';
|
|
5
|
+
export type AlertVariant = 'primary' | 'success' | 'warning' | 'error' | 'default';
|
|
6
|
+
export interface AlertProps {
|
|
7
|
+
/**
|
|
8
|
+
* Type of the alert
|
|
9
|
+
*
|
|
10
|
+
* Available choices: `'default'`, `'outlined'`, `'filled'`
|
|
11
|
+
*
|
|
12
|
+
* Default: `'default'`
|
|
13
|
+
* */
|
|
14
|
+
type?: AlertType;
|
|
15
|
+
/**
|
|
16
|
+
* Variant of the alert
|
|
17
|
+
*
|
|
18
|
+
* Available choices: `'primary'`, `'secondary'`, `'tertiary'`, `'success'`, `'danger'`, `'warning'`
|
|
19
|
+
*
|
|
20
|
+
* Default: `'primary'`
|
|
21
|
+
* */
|
|
22
|
+
variant?: AlertVariant;
|
|
23
|
+
/**
|
|
24
|
+
* Alert icon, used to override the default icons used in the alert
|
|
25
|
+
*
|
|
26
|
+
* Use value `auto` to automatically select the icon based on the variant (error vs checkmark icon)
|
|
27
|
+
*
|
|
28
|
+
* Default: `null`
|
|
29
|
+
* */
|
|
30
|
+
icon?: grauityIconName | 'auto';
|
|
31
|
+
/**
|
|
32
|
+
* Alert title
|
|
33
|
+
* */
|
|
34
|
+
title?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Alert description
|
|
37
|
+
* */
|
|
38
|
+
description?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Alert top position, useful for fixed positioning
|
|
41
|
+
*
|
|
42
|
+
* Default: `null`
|
|
43
|
+
* */
|
|
44
|
+
top?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Alert bottom position, useful for fixed positioning
|
|
47
|
+
*
|
|
48
|
+
* Default: `null`
|
|
49
|
+
* */
|
|
50
|
+
bottom?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Alert left position, useful for fixed positioning
|
|
53
|
+
*
|
|
54
|
+
* Default: `null`
|
|
55
|
+
* */
|
|
56
|
+
left?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Alert right position, useful for fixed positioning
|
|
59
|
+
*
|
|
60
|
+
* Default: `null`
|
|
61
|
+
* */
|
|
62
|
+
right?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Alert position, useful for fixed positioning
|
|
65
|
+
*
|
|
66
|
+
* Default: `'static'`
|
|
67
|
+
* */
|
|
68
|
+
position?: 'static' | 'fixed' | 'absolute' | 'relative';
|
|
69
|
+
/**
|
|
70
|
+
* Alert close button click handler
|
|
71
|
+
* */
|
|
72
|
+
onClose?: () => void;
|
|
73
|
+
/**
|
|
74
|
+
* Show close button
|
|
75
|
+
*
|
|
76
|
+
* Default: `false`
|
|
77
|
+
* */
|
|
78
|
+
showCloseButton?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Alert action buttons.
|
|
81
|
+
*
|
|
82
|
+
* Type: ButtonProps[]
|
|
83
|
+
* */
|
|
84
|
+
actionButtons?: ButtonProps[];
|
|
85
|
+
/**
|
|
86
|
+
* Show action buttons inline
|
|
87
|
+
*
|
|
88
|
+
* Default: `false`
|
|
89
|
+
* */
|
|
90
|
+
inlineButtons?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Maximum width of the alert
|
|
93
|
+
*
|
|
94
|
+
* Default: `'440px'`
|
|
95
|
+
* */
|
|
96
|
+
maxWidth?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface AlertContainerProps {
|
|
99
|
+
position: string;
|
|
100
|
+
top: string;
|
|
101
|
+
bottom: string;
|
|
102
|
+
left: string;
|
|
103
|
+
right: string;
|
|
104
|
+
backgroundColor: string;
|
|
105
|
+
borderColor: string;
|
|
106
|
+
ref: React.Ref<HTMLDivElement>;
|
|
107
|
+
role: string;
|
|
108
|
+
children: React.ReactNode;
|
|
109
|
+
maxWidth: string;
|
|
110
|
+
}
|
|
111
|
+
export interface AlertBodyProps {
|
|
112
|
+
inlineButtons: boolean;
|
|
113
|
+
children: React.ReactNode;
|
|
114
|
+
}
|
|
115
|
+
export interface AlertTitleProps {
|
|
116
|
+
textColor: string;
|
|
117
|
+
children: React.ReactNode;
|
|
118
|
+
id: string;
|
|
119
|
+
}
|
|
120
|
+
export interface AlertDescriptionProps {
|
|
121
|
+
textColor: string;
|
|
122
|
+
children: React.ReactNode;
|
|
123
|
+
id?: string;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Alert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE1D,MAAM,MAAM,YAAY,GAClB,SAAS,GACT,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,CAAC;AAEhB,MAAM,WAAW,UAAU;IACvB;;;;;;SAMK;IACL,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;;SAMK;IACL,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB;;;;;;SAMK;IACL,IAAI,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;IAEhC;;SAEK;IACL,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB;;SAEK;IACL,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;;SAIK;IACL,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;SAIK;IACL,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;SAIK;IACL,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;SAIK;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;SAIK;IACL,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;IAExD;;SAEK;IACL,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;SAIK;IACL,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;SAIK;IACL,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;IAE9B;;;;SAIK;IACL,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;SAIK;IACL,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Alert/utils.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AlertBannerProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* An alert banner is a component that is used to typically display
|
|
5
|
+
* important messages to the user. It is normally shown at the top of the page.
|
|
6
|
+
*/
|
|
7
|
+
declare const AlertBanner: React.ForwardRefExoticComponent<AlertBannerProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default AlertBanner;
|
|
9
|
+
//# sourceMappingURL=AlertBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertBanner.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAW1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAO3C;;;GAGG;AACH,QAAA,MAAM,WAAW,yFA6EhB,CAAC;AAoCF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AlertBannerContainerProps } from './types';
|
|
2
|
+
export declare const StyledAlertBannerContainer: import("styled-components").StyledComponent<string, any, AlertBannerContainerProps, never>;
|
|
3
|
+
export declare const StyledAlertBannerContent: import("styled-components").StyledComponent<string, any, any, never>;
|
|
4
|
+
//# sourceMappingURL=AlertBanner.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertBanner.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/AlertBanner.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,0BAA0B,4FAkBtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,sEAUpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertBanner.test.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/AlertBanner.test.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { grauityIconName } from '../../core';
|
|
2
|
+
import { BUTTON_VARIANTS_ENUM } from '../Button';
|
|
3
|
+
export declare enum ALERT_BANNER_TYPES_ENUM {
|
|
4
|
+
DEFAULT = "default",
|
|
5
|
+
OUTLINED = "outlined",
|
|
6
|
+
FILLED = "filled"
|
|
7
|
+
}
|
|
8
|
+
export declare enum ALERT_BANNER_VARIANTS_ENUM {
|
|
9
|
+
PRIMARY = "primary",
|
|
10
|
+
SUCCESS = "success",
|
|
11
|
+
WARNING = "warning",
|
|
12
|
+
ERROR = "error",
|
|
13
|
+
DEFAULT = "default"
|
|
14
|
+
}
|
|
15
|
+
export declare const ERRONEOUS_ALERT_BANNER_VARIANTS: ALERT_BANNER_VARIANTS_ENUM[];
|
|
16
|
+
export declare const ALERT_BANNER_VARIANTS: ALERT_BANNER_VARIANTS_ENUM[];
|
|
17
|
+
export declare const ALERT_BANNER_TYPES: ALERT_BANNER_TYPES_ENUM[];
|
|
18
|
+
export declare const DEFAULT_ALERT_VARIANT_ICON_MAPPING: Record<ALERT_BANNER_VARIANTS_ENUM, grauityIconName>;
|
|
19
|
+
export declare const ALERT_BANNER_COLOR_MAPPINGS: {
|
|
20
|
+
default: {
|
|
21
|
+
primary: {
|
|
22
|
+
iconColor: string;
|
|
23
|
+
textColor: string;
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
borderColor: string;
|
|
26
|
+
};
|
|
27
|
+
success: {
|
|
28
|
+
iconColor: string;
|
|
29
|
+
textColor: string;
|
|
30
|
+
backgroundColor: string;
|
|
31
|
+
borderColor: string;
|
|
32
|
+
};
|
|
33
|
+
warning: {
|
|
34
|
+
iconColor: string;
|
|
35
|
+
textColor: string;
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
borderColor: string;
|
|
38
|
+
};
|
|
39
|
+
error: {
|
|
40
|
+
iconColor: string;
|
|
41
|
+
textColor: string;
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
borderColor: string;
|
|
44
|
+
};
|
|
45
|
+
default: {
|
|
46
|
+
iconColor: string;
|
|
47
|
+
textColor: string;
|
|
48
|
+
backgroundColor: string;
|
|
49
|
+
borderColor: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
outlined: {
|
|
53
|
+
primary: {
|
|
54
|
+
iconColor: string;
|
|
55
|
+
textColor: string;
|
|
56
|
+
backgroundColor: string;
|
|
57
|
+
borderColor: string;
|
|
58
|
+
};
|
|
59
|
+
success: {
|
|
60
|
+
iconColor: string;
|
|
61
|
+
textColor: string;
|
|
62
|
+
backgroundColor: string;
|
|
63
|
+
borderColor: string;
|
|
64
|
+
};
|
|
65
|
+
warning: {
|
|
66
|
+
iconColor: string;
|
|
67
|
+
textColor: string;
|
|
68
|
+
backgroundColor: string;
|
|
69
|
+
borderColor: string;
|
|
70
|
+
};
|
|
71
|
+
error: {
|
|
72
|
+
iconColor: string;
|
|
73
|
+
textColor: string;
|
|
74
|
+
backgroundColor: string;
|
|
75
|
+
borderColor: string;
|
|
76
|
+
};
|
|
77
|
+
default: {
|
|
78
|
+
iconColor: string;
|
|
79
|
+
textColor: string;
|
|
80
|
+
backgroundColor: string;
|
|
81
|
+
borderColor: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
filled: {
|
|
85
|
+
primary: {
|
|
86
|
+
iconColor: string;
|
|
87
|
+
textColor: string;
|
|
88
|
+
backgroundColor: string;
|
|
89
|
+
borderColor: string;
|
|
90
|
+
};
|
|
91
|
+
success: {
|
|
92
|
+
iconColor: string;
|
|
93
|
+
textColor: string;
|
|
94
|
+
backgroundColor: string;
|
|
95
|
+
borderColor: string;
|
|
96
|
+
};
|
|
97
|
+
warning: {
|
|
98
|
+
iconColor: string;
|
|
99
|
+
textColor: string;
|
|
100
|
+
backgroundColor: string;
|
|
101
|
+
borderColor: string;
|
|
102
|
+
};
|
|
103
|
+
error: {
|
|
104
|
+
iconColor: string;
|
|
105
|
+
textColor: string;
|
|
106
|
+
backgroundColor: string;
|
|
107
|
+
borderColor: string;
|
|
108
|
+
};
|
|
109
|
+
default: {
|
|
110
|
+
iconColor: string;
|
|
111
|
+
textColor: string;
|
|
112
|
+
backgroundColor: string;
|
|
113
|
+
borderColor: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
export declare const ALERT_BANNER_TYPE_AND_VARIANT_TO_BUTTON_VARIANT_MAPPING: {
|
|
118
|
+
default: {
|
|
119
|
+
primary: BUTTON_VARIANTS_ENUM;
|
|
120
|
+
success: BUTTON_VARIANTS_ENUM;
|
|
121
|
+
warning: BUTTON_VARIANTS_ENUM;
|
|
122
|
+
error: BUTTON_VARIANTS_ENUM;
|
|
123
|
+
default: BUTTON_VARIANTS_ENUM;
|
|
124
|
+
};
|
|
125
|
+
outlined: {
|
|
126
|
+
primary: BUTTON_VARIANTS_ENUM;
|
|
127
|
+
success: BUTTON_VARIANTS_ENUM;
|
|
128
|
+
warning: BUTTON_VARIANTS_ENUM;
|
|
129
|
+
error: BUTTON_VARIANTS_ENUM;
|
|
130
|
+
default: BUTTON_VARIANTS_ENUM;
|
|
131
|
+
};
|
|
132
|
+
filled: {
|
|
133
|
+
primary: BUTTON_VARIANTS_ENUM;
|
|
134
|
+
success: BUTTON_VARIANTS_ENUM;
|
|
135
|
+
warning: BUTTON_VARIANTS_ENUM;
|
|
136
|
+
error: BUTTON_VARIANTS_ENUM;
|
|
137
|
+
default: BUTTON_VARIANTS_ENUM;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,oBAAY,uBAAuB;IAC/B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;CACpB;AAED,oBAAY,0BAA0B;IAClC,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;CACtB;AAED,eAAO,MAAM,+BAA+B,8BAG3C,CAAC;AAEF,eAAO,MAAM,qBAAqB,8BAMjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,2BAI9B,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,MAAM,CACnD,0BAA0B,EAC1B,eAAe,CAOlB,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGvC,CAAC;AAEF,eAAO,MAAM,uDAAuD;;;;;;;;;;;;;;;;;;;;;;CAgCnE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default } from './AlertBanner';
|
|
2
|
+
export { ALERT_BANNER_VARIANTS_ENUM } from './constants';
|
|
3
|
+
export { ALERT_BANNER_VARIANTS } from './constants';
|
|
4
|
+
export { ALERT_BANNER_TYPES_ENUM } from './constants';
|
|
5
|
+
export { ALERT_BANNER_TYPES } from './constants';
|
|
6
|
+
export type { AlertBannerProps } from './types';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { grauityIconName } from '../../core';
|
|
3
|
+
import { ButtonProps } from '../Button';
|
|
4
|
+
export type AlertBannerType = 'default' | 'outlined' | 'filled';
|
|
5
|
+
export type AlertBannerVariant = 'primary' | 'success' | 'warning' | 'error' | 'default';
|
|
6
|
+
export interface AlertBannerProps {
|
|
7
|
+
/**
|
|
8
|
+
* Type of the alert banner
|
|
9
|
+
*
|
|
10
|
+
* Available choices: `'default'`, `'outlined'`, `'filled'`
|
|
11
|
+
*
|
|
12
|
+
* Default: `'default'`
|
|
13
|
+
* */
|
|
14
|
+
type?: AlertBannerType;
|
|
15
|
+
/**
|
|
16
|
+
* Variant of the alert banner
|
|
17
|
+
*
|
|
18
|
+
* Available choices: `'primary'`, `'secondary'`, `'tertiary'`, `'success'`, `'danger'`, `'warning'`
|
|
19
|
+
*
|
|
20
|
+
* Default: `'primary'`
|
|
21
|
+
* */
|
|
22
|
+
variant?: AlertBannerVariant;
|
|
23
|
+
/**
|
|
24
|
+
* Alert banner padding
|
|
25
|
+
*
|
|
26
|
+
* Default: `'var(--spacing-8px, 8px)'`
|
|
27
|
+
* */
|
|
28
|
+
padding?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Alert banner icon, used to override the default icons used in the alert banner
|
|
31
|
+
*
|
|
32
|
+
* Use value `auto` to automatically select the icon based on the variant (error vs checkmark icon)
|
|
33
|
+
*
|
|
34
|
+
* Default: `null`
|
|
35
|
+
* */
|
|
36
|
+
icon?: grauityIconName | 'auto';
|
|
37
|
+
/**
|
|
38
|
+
* Alert banner top position, useful for fixed positioning
|
|
39
|
+
*
|
|
40
|
+
* Default: `null`
|
|
41
|
+
* */
|
|
42
|
+
top?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Alert banner bottom position, useful for fixed positioning
|
|
45
|
+
*
|
|
46
|
+
* Default: `null`
|
|
47
|
+
* */
|
|
48
|
+
bottom?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Alert banner left position, useful for fixed positioning
|
|
51
|
+
*
|
|
52
|
+
* Default: `null`
|
|
53
|
+
* */
|
|
54
|
+
left?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Alert banner right position, useful for fixed positioning
|
|
57
|
+
*
|
|
58
|
+
* Default: `null`
|
|
59
|
+
* */
|
|
60
|
+
right?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Alert banner position, useful for fixed positioning
|
|
63
|
+
*
|
|
64
|
+
* Default: `'static'`
|
|
65
|
+
* */
|
|
66
|
+
position?: 'static' | 'fixed' | 'absolute' | 'relative';
|
|
67
|
+
/**
|
|
68
|
+
* Alert banner content
|
|
69
|
+
* */
|
|
70
|
+
children: React.ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* Alert banner content justify content
|
|
73
|
+
*
|
|
74
|
+
* Default: `'center'`
|
|
75
|
+
* */
|
|
76
|
+
justifyContent?: 'center' | 'space-between' | 'space-around';
|
|
77
|
+
/**
|
|
78
|
+
* Alert banner close button click handler
|
|
79
|
+
* */
|
|
80
|
+
onClose?: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* Show close button
|
|
83
|
+
*
|
|
84
|
+
* Default: `false`
|
|
85
|
+
* */
|
|
86
|
+
showCloseButton?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Alert banner action buttons.
|
|
89
|
+
*
|
|
90
|
+
* Type: ButtonProps[]
|
|
91
|
+
* */
|
|
92
|
+
actionButtons?: ButtonProps[];
|
|
93
|
+
}
|
|
94
|
+
export interface AlertBannerContainerProps {
|
|
95
|
+
type: AlertBannerType;
|
|
96
|
+
variant: AlertBannerVariant;
|
|
97
|
+
justifyContent: string;
|
|
98
|
+
padding: string;
|
|
99
|
+
top: string;
|
|
100
|
+
bottom: string;
|
|
101
|
+
left: string;
|
|
102
|
+
right: string;
|
|
103
|
+
position: string;
|
|
104
|
+
textColor: string;
|
|
105
|
+
backgroundColor: string;
|
|
106
|
+
borderColor: string;
|
|
107
|
+
children: React.ReactNode;
|
|
108
|
+
ref: React.Ref<HTMLDivElement>;
|
|
109
|
+
role: string;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GACxB,SAAS,GACT,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,CAAC;AAEhB,MAAM,WAAW,gBAAgB;IAC7B;;;;;;SAMK;IACL,IAAI,CAAC,EAAE,eAAe,CAAC;IAEvB;;;;;;SAMK;IACL,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAE7B;;;;SAIK;IACL,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;SAMK;IACL,IAAI,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;IAEhC;;;;SAIK;IACL,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;SAIK;IACL,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;SAIK;IACL,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;SAIK;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;SAIK;IACL,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;IAExD;;SAEK;IACL,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;;;SAIK;IACL,cAAc,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,cAAc,CAAC;IAE7D;;SAEK;IACL,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;SAIK;IACL,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;SAIK;IACL,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { AlertProps, AlertType, AlertVariant } from '../Alert/types';
|
|
2
|
+
import { AlertBannerProps, AlertBannerType, AlertBannerVariant } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Get alert banner icon name based on variant and icon prop
|
|
5
|
+
*
|
|
6
|
+
* If icon prop is set to 'auto', the icon will be selected based on the variant
|
|
7
|
+
*
|
|
8
|
+
* @param icon - Alert banner icon prop
|
|
9
|
+
* @param variant - Alert banner variant
|
|
10
|
+
* @returns Alert banner icon name
|
|
11
|
+
*/
|
|
12
|
+
export declare const getAlertIconName: (icon: AlertBannerProps['icon'] | AlertProps['icon'], variant: AlertBannerVariant | AlertVariant) => import("../../core").grauityIconName;
|
|
13
|
+
/**
|
|
14
|
+
* Get alert banner colors based on variant and type
|
|
15
|
+
*
|
|
16
|
+
* @param variant - Alert banner variant
|
|
17
|
+
* @param type - Alert banner type
|
|
18
|
+
* @returns Alert banner colors
|
|
19
|
+
*/
|
|
20
|
+
export declare const getAlertBannerColors: (variant: AlertBannerVariant | AlertVariant, type: AlertBannerType | AlertType) => {
|
|
21
|
+
iconColor: string;
|
|
22
|
+
textColor: string;
|
|
23
|
+
backgroundColor: string;
|
|
24
|
+
borderColor: string;
|
|
25
|
+
} | {
|
|
26
|
+
iconColor: string;
|
|
27
|
+
textColor: string;
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
borderColor: string;
|
|
30
|
+
} | {
|
|
31
|
+
iconColor: string;
|
|
32
|
+
textColor: string;
|
|
33
|
+
backgroundColor: string;
|
|
34
|
+
borderColor: string;
|
|
35
|
+
} | {
|
|
36
|
+
iconColor: string;
|
|
37
|
+
textColor: string;
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
borderColor: string;
|
|
40
|
+
} | {
|
|
41
|
+
iconColor: string;
|
|
42
|
+
textColor: string;
|
|
43
|
+
backgroundColor: string;
|
|
44
|
+
borderColor: string;
|
|
45
|
+
} | {
|
|
46
|
+
iconColor: string;
|
|
47
|
+
textColor: string;
|
|
48
|
+
backgroundColor: string;
|
|
49
|
+
borderColor: string;
|
|
50
|
+
} | {
|
|
51
|
+
iconColor: string;
|
|
52
|
+
textColor: string;
|
|
53
|
+
backgroundColor: string;
|
|
54
|
+
borderColor: string;
|
|
55
|
+
} | {
|
|
56
|
+
iconColor: string;
|
|
57
|
+
textColor: string;
|
|
58
|
+
backgroundColor: string;
|
|
59
|
+
borderColor: string;
|
|
60
|
+
} | {
|
|
61
|
+
iconColor: string;
|
|
62
|
+
textColor: string;
|
|
63
|
+
backgroundColor: string;
|
|
64
|
+
borderColor: string;
|
|
65
|
+
} | {
|
|
66
|
+
iconColor: string;
|
|
67
|
+
textColor: string;
|
|
68
|
+
backgroundColor: string;
|
|
69
|
+
borderColor: string;
|
|
70
|
+
} | {
|
|
71
|
+
iconColor: string;
|
|
72
|
+
textColor: string;
|
|
73
|
+
backgroundColor: string;
|
|
74
|
+
borderColor: string;
|
|
75
|
+
} | {
|
|
76
|
+
iconColor: string;
|
|
77
|
+
textColor: string;
|
|
78
|
+
backgroundColor: string;
|
|
79
|
+
borderColor: string;
|
|
80
|
+
} | {
|
|
81
|
+
iconColor: string;
|
|
82
|
+
textColor: string;
|
|
83
|
+
backgroundColor: string;
|
|
84
|
+
borderColor: string;
|
|
85
|
+
} | {
|
|
86
|
+
iconColor: string;
|
|
87
|
+
textColor: string;
|
|
88
|
+
backgroundColor: string;
|
|
89
|
+
borderColor: string;
|
|
90
|
+
} | {
|
|
91
|
+
iconColor: string;
|
|
92
|
+
textColor: string;
|
|
93
|
+
backgroundColor: string;
|
|
94
|
+
borderColor: string;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Get button variant based on alert banner variant and type.
|
|
98
|
+
* Useful for showing correct variant for close button.
|
|
99
|
+
*
|
|
100
|
+
* @param variant - Alert banner variant
|
|
101
|
+
* @param type - Alert banner type
|
|
102
|
+
* @returns Button variant
|
|
103
|
+
*/
|
|
104
|
+
export declare const getButtonVariantFromAlertBannerTypeVariant: (variant: AlertBannerVariant | AlertVariant, type: AlertBannerType | AlertType) => import("../Button").BUTTON_VARIANTS_ENUM;
|
|
105
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAMrE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEhF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,SACnB,gBAAgB,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,WAC1C,kBAAkB,GAAG,YAAY,yCAO7C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,YACpB,kBAAkB,GAAG,YAAY,QACpC,eAAe,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACU,CAAC;AAEhD;;;;;;;GAOG;AACH,eAAO,MAAM,0CAA0C,YAC1C,kBAAkB,GAAG,YAAY,QACpC,eAAe,GAAG,SAAS,6CACsC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A Button is a component that is used to trigger an action.
|
|
5
|
+
* It can contain text and an icon, or only text.
|
|
6
|
+
*
|
|
7
|
+
* To create an icon button, checkout the IconButton component.
|
|
8
|
+
*/
|
|
9
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export default Button;
|
|
11
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;;GAKG;AACH,QAAA,MAAM,MAAM,uFAwEX,CAAC;AA0CF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ButtonComponentProps, ButtonContentProps } from './types';
|
|
2
|
+
export declare const StyledButton: import("styled-components").StyledComponent<string, any, ButtonComponentProps, never>;
|
|
3
|
+
export declare const StyledButtonContent: import("styled-components").StyledComponent<string, any, ButtonContentProps, never>;
|
|
4
|
+
//# sourceMappingURL=Button.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/Button.styles.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,YAAY,uFAoExB,CAAC;AAEF,eAAO,MAAM,mBAAmB,qFAQ/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.test.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/Button.test.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { ButtonGroupProps } from './types';
|
|
3
|
+
declare const ButtonGroup: {
|
|
4
|
+
({ children }: ButtonGroupProps): JSX.Element;
|
|
5
|
+
defaultProps: ButtonGroupProps;
|
|
6
|
+
propTypes: {
|
|
7
|
+
children: PropTypes.Requireable<any>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default ButtonGroup;
|
|
11
|
+
//# sourceMappingURL=ButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,WAAW;mBAAgB,gBAAgB;;;;;CAIhD,CAAC;AAUF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroup.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/ButtonGroup.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,qEAI7B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconButtonProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* An IconButton is a button that contains an icon.
|
|
5
|
+
*/
|
|
6
|
+
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export default IconButton;
|
|
8
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/IconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C;;GAEG;AACH,QAAA,MAAM,UAAU,2FAmEf,CAAC;AAsCF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.test.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/IconButton.test.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|