@mailstep/design-system 0.2.0-beta.0 → 0.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Blocks/CornerDialog/CornerDialog.d.ts +2 -0
- package/Blocks/CornerDialog/CornerDialog.js +18 -0
- package/Blocks/CornerDialog/index.d.ts +3 -0
- package/Blocks/CornerDialog/index.js +2 -0
- package/Blocks/CornerDialog/stories/CornerDialog.stories.d.ts +14 -0
- package/Blocks/CornerDialog/stories/CornerDialog.stories.js +50 -0
- package/Blocks/CornerDialog/styles.d.ts +12 -0
- package/Blocks/CornerDialog/styles.js +21 -0
- package/Blocks/CornerDialog/types.d.ts +16 -0
- package/Blocks/CornerDialog/types.js +1 -0
- package/Blocks/CornerDialog/utils.d.ts +3 -0
- package/Blocks/CornerDialog/utils.js +12 -0
- package/Blocks/ImageList/ImageList.d.ts +3 -0
- package/Blocks/ImageList/ImageList.js +29 -0
- package/Blocks/ImageList/components/AddPhoto/index.d.ts +7 -0
- package/Blocks/ImageList/components/AddPhoto/index.js +63 -0
- package/Blocks/ImageList/components/AddPhoto/styles.d.ts +2 -0
- package/Blocks/ImageList/components/AddPhoto/styles.js +8 -0
- package/Blocks/ImageList/components/CloseButton/index.d.ts +6 -0
- package/Blocks/ImageList/components/CloseButton/index.js +7 -0
- package/Blocks/ImageList/components/CloseButton/styles.d.ts +1 -0
- package/Blocks/ImageList/components/CloseButton/styles.js +7 -0
- package/Blocks/ImageList/components/ImageElement/index.d.ts +9 -0
- package/Blocks/ImageList/components/ImageElement/index.js +11 -0
- package/Blocks/ImageList/components/ImageElement/styles.d.ts +2 -0
- package/Blocks/ImageList/components/ImageElement/styles.js +8 -0
- package/Blocks/ImageList/components/ImageTag/index.d.ts +6 -0
- package/Blocks/ImageList/components/ImageTag/index.js +9 -0
- package/Blocks/ImageList/components/ImageTag/styles.d.ts +1 -0
- package/Blocks/ImageList/components/ImageTag/styles.js +7 -0
- package/Blocks/ImageList/index.d.ts +5 -0
- package/Blocks/ImageList/index.js +2 -0
- package/Blocks/ImageList/styles.d.ts +1 -0
- package/Blocks/ImageList/styles.js +7 -0
- package/Blocks/ImageList/types.d.ts +12 -0
- package/Blocks/ImageList/types.js +1 -0
- package/Blocks/LightBox/LightBox.d.ts +3 -0
- package/Blocks/LightBox/LightBox.js +15 -0
- package/Blocks/LightBox/hooks/useLightBox.d.ts +2 -0
- package/Blocks/LightBox/hooks/useLightBox.js +17 -0
- package/Blocks/LightBox/index.d.ts +4 -0
- package/Blocks/LightBox/index.js +3 -0
- package/Blocks/LightBox/styles.d.ts +3 -0
- package/Blocks/LightBox/styles.js +9 -0
- package/Blocks/LightBox/types.d.ts +24 -0
- package/Blocks/LightBox/types.js +1 -0
- package/Blocks/Modal/Modal.d.ts +3 -0
- package/Blocks/Modal/Modal.js +35 -0
- package/Blocks/Modal/hooks/useClickOutside.d.ts +3 -0
- package/Blocks/Modal/hooks/useClickOutside.js +30 -0
- package/Blocks/Modal/hooks/useModal.d.ts +2 -0
- package/Blocks/Modal/hooks/useModal.js +15 -0
- package/Blocks/Modal/index.d.ts +5 -0
- package/Blocks/Modal/index.js +4 -0
- package/Blocks/Modal/stories/Modal.stories.d.ts +26 -0
- package/Blocks/Modal/stories/Modal.stories.js +146 -0
- package/Blocks/Modal/styles.d.ts +22 -0
- package/Blocks/Modal/styles.js +45 -0
- package/Blocks/Modal/types.d.ts +45 -0
- package/Blocks/Modal/types.js +1 -0
- package/Blocks/Modal/utils.d.ts +3 -0
- package/Blocks/Modal/utils.js +11 -0
- package/Blocks/Tabs/TabContent.d.ts +2 -0
- package/Blocks/Tabs/TabContent.js +4 -0
- package/Blocks/Tabs/Tabs.d.ts +2 -0
- package/Blocks/Tabs/Tabs.js +19 -0
- package/Blocks/Tabs/hooks/useTabs.d.ts +2 -0
- package/Blocks/Tabs/hooks/useTabs.js +10 -0
- package/Blocks/Tabs/index.d.ts +5 -0
- package/Blocks/Tabs/index.js +4 -0
- package/Blocks/Tabs/stories/Tabs.stories.d.ts +13 -0
- package/Blocks/Tabs/stories/Tabs.stories.js +44 -0
- package/Blocks/Tabs/styles.d.ts +8 -0
- package/Blocks/Tabs/styles.js +15 -0
- package/Blocks/Tabs/types.d.ts +27 -0
- package/Blocks/Tabs/types.js +1 -0
- package/Elements/Alert/Alert.d.ts +3 -0
- package/Elements/Alert/Alert.js +32 -0
- package/Elements/Alert/index.d.ts +3 -0
- package/Elements/Alert/index.js +3 -0
- package/Elements/Alert/stories/Alert.stories.d.ts +17 -0
- package/Elements/Alert/stories/Alert.stories.js +73 -0
- package/Elements/Alert/styles.d.ts +44 -0
- package/Elements/Alert/styles.js +33 -0
- package/Elements/Alert/types.d.ts +18 -0
- package/Elements/Alert/types.js +1 -0
- package/Elements/Avatar/Avatar.d.ts +2 -0
- package/Elements/Avatar/Avatar.js +37 -0
- package/Elements/Avatar/index.d.ts +3 -0
- package/Elements/Avatar/index.js +3 -0
- package/Elements/Avatar/stories/Avatar.stories.d.ts +12 -0
- package/Elements/Avatar/stories/Avatar.stories.js +20 -0
- package/Elements/Avatar/types.d.ts +8 -0
- package/Elements/Avatar/types.js +1 -0
- package/Elements/Badge/Badge.d.ts +12 -0
- package/Elements/Badge/Badge.js +40 -0
- package/Elements/Badge/index.d.ts +3 -0
- package/Elements/Badge/index.js +3 -0
- package/Elements/Badge/stories/Badge.stories.d.ts +12 -0
- package/Elements/Badge/stories/Badge.stories.js +24 -0
- package/Elements/BorderedBox/BorderedBox.d.ts +3 -0
- package/Elements/BorderedBox/BorderedBox.js +35 -0
- package/Elements/BorderedBox/index.d.ts +3 -0
- package/Elements/BorderedBox/index.js +3 -0
- package/Elements/BorderedBox/stories/BorderedBox.stories.d.ts +11 -0
- package/Elements/BorderedBox/stories/BorderedBox.stories.js +13 -0
- package/Elements/BorderedBox/types.d.ts +6 -0
- package/Elements/BorderedBox/types.js +1 -0
- package/Elements/Button/Button.d.ts +3 -0
- package/Elements/Button/Button.js +30 -0
- package/Elements/Button/index.d.ts +5 -0
- package/Elements/Button/index.js +3 -0
- package/Elements/Button/stories/Button.stories.d.ts +20 -0
- package/Elements/Button/stories/Button.stories.js +70 -0
- package/Elements/Button/styles.d.ts +19 -0
- package/Elements/Button/styles.js +48 -0
- package/Elements/Button/types.d.ts +22 -0
- package/Elements/Button/types.js +1 -0
- package/Elements/Card/Card.d.ts +6 -0
- package/Elements/Card/Card.js +45 -0
- package/Elements/Card/index.d.ts +3 -0
- package/Elements/Card/index.js +3 -0
- package/Elements/Card/stories/Card.stories.d.ts +15 -0
- package/Elements/Card/stories/Card.stories.js +43 -0
- package/Elements/Card/stories/CardComponent.stories.d.ts +12 -0
- package/Elements/Card/stories/CardComponent.stories.js +27 -0
- package/Elements/Card/styles.d.ts +14 -0
- package/Elements/Card/styles.js +34 -0
- package/Elements/Card/types.d.ts +21 -0
- package/Elements/Card/types.js +1 -0
- package/Elements/Dropdown/Dropdown.d.ts +3 -0
- package/Elements/Dropdown/Dropdown.js +28 -0
- package/Elements/Dropdown/index.d.ts +3 -0
- package/Elements/Dropdown/index.js +3 -0
- package/Elements/Dropdown/stories/Dropdown.stories.d.ts +11 -0
- package/Elements/Dropdown/stories/Dropdown.stories.js +14 -0
- package/Elements/Dropdown/types.d.ts +10 -0
- package/Elements/Dropdown/types.js +1 -0
- package/Elements/ErrorMessage/ErrorMessage.d.ts +3 -0
- package/Elements/ErrorMessage/ErrorMessage.js +17 -0
- package/Elements/ErrorMessage/index.d.ts +3 -0
- package/Elements/ErrorMessage/index.js +3 -0
- package/Elements/ErrorMessage/stories/ErrorMessage.stories.d.ts +12 -0
- package/Elements/ErrorMessage/stories/ErrorMessage.stories.js +19 -0
- package/Elements/ErrorMessage/types.d.ts +5 -0
- package/Elements/ErrorMessage/types.js +1 -0
- package/Elements/Icon/BadgeIcon.d.ts +6 -0
- package/Elements/Icon/BadgeIcon.js +51 -0
- package/Elements/Icon/Icon.d.ts +8 -0
- package/Elements/Icon/Icon.js +245 -0
- package/Elements/Icon/icons/Complaint.d.ts +3 -0
- package/Elements/Icon/icons/Complaint.js +13 -0
- package/Elements/Icon/icons/Expeditions.d.ts +3 -0
- package/Elements/Icon/icons/Expeditions.js +13 -0
- package/Elements/Icon/icons/FlagCZ.d.ts +3 -0
- package/Elements/Icon/icons/FlagCZ.js +13 -0
- package/Elements/Icon/icons/FlagUSA.d.ts +3 -0
- package/Elements/Icon/icons/FlagUSA.js +13 -0
- package/Elements/Icon/icons/HamburgerMenu.d.ts +3 -0
- package/Elements/Icon/icons/HamburgerMenu.js +13 -0
- package/Elements/Icon/icons/HelpCircle1.d.ts +3 -0
- package/Elements/Icon/icons/HelpCircle1.js +13 -0
- package/Elements/Icon/icons/Income.d.ts +3 -0
- package/Elements/Icon/icons/Income.js +13 -0
- package/Elements/Icon/icons/Inventory.d.ts +3 -0
- package/Elements/Icon/icons/Inventory.js +13 -0
- package/Elements/Icon/icons/MenuItems.d.ts +3 -0
- package/Elements/Icon/icons/MenuItems.js +13 -0
- package/Elements/Icon/icons/MobileCancel.d.ts +3 -0
- package/Elements/Icon/icons/MobileCancel.js +13 -0
- package/Elements/Icon/icons/Notification2.d.ts +3 -0
- package/Elements/Icon/icons/Notification2.js +13 -0
- package/Elements/Icon/icons/Plus1.d.ts +3 -0
- package/Elements/Icon/icons/Plus1.js +13 -0
- package/Elements/Icon/icons/Products.d.ts +3 -0
- package/Elements/Icon/icons/Products.js +13 -0
- package/Elements/Icon/icons/Profile.d.ts +3 -0
- package/Elements/Icon/icons/Profile.js +13 -0
- package/Elements/Icon/icons/Return.d.ts +3 -0
- package/Elements/Icon/icons/Return.js +13 -0
- package/Elements/Icon/icons/Settings2.d.ts +3 -0
- package/Elements/Icon/icons/Settings2.js +13 -0
- package/Elements/Icon/icons/Transfer.d.ts +3 -0
- package/Elements/Icon/icons/Transfer.js +13 -0
- package/Elements/Icon/icons/index.d.ts +17 -0
- package/Elements/Icon/icons/index.js +17 -0
- package/Elements/Icon/index.d.ts +6 -0
- package/Elements/Icon/index.js +5 -0
- package/Elements/Icon/stories/BadgeIcon.stories.d.ts +24 -0
- package/Elements/Icon/stories/BadgeIcon.stories.js +18 -0
- package/Elements/Icon/stories/Icon.stories.d.ts +16 -0
- package/Elements/Icon/stories/Icon.stories.js +48 -0
- package/Elements/Icon/types.d.ts +22 -0
- package/Elements/Icon/types.js +1 -0
- package/Elements/Image/Image.d.ts +3 -0
- package/Elements/Image/Image.js +26 -0
- package/Elements/Image/index.d.ts +3 -0
- package/Elements/Image/index.js +3 -0
- package/Elements/Image/stories/Image.stories.d.ts +14 -0
- package/Elements/Image/stories/Image.stories.js +36 -0
- package/Elements/Image/types.d.ts +18 -0
- package/Elements/Image/types.js +1 -0
- package/Elements/Label/Label.d.ts +6 -0
- package/Elements/Label/Label.js +17 -0
- package/Elements/Label/index.d.ts +3 -0
- package/Elements/Label/index.js +3 -0
- package/Elements/Label/stories/Label.stories.d.ts +13 -0
- package/Elements/Label/stories/Label.stories.js +20 -0
- package/Elements/Line/Line.d.ts +3 -0
- package/Elements/Line/Line.js +25 -0
- package/Elements/Line/index.d.ts +3 -0
- package/Elements/Line/index.js +3 -0
- package/Elements/Line/stories/Line.stories.d.ts +16 -0
- package/Elements/Line/stories/Line.stories.js +41 -0
- package/Elements/Line/types.d.ts +12 -0
- package/Elements/Line/types.js +1 -0
- package/Elements/Link/Link.d.ts +29 -0
- package/Elements/Link/Link.js +56 -0
- package/Elements/Link/index.d.ts +3 -0
- package/Elements/Link/index.js +3 -0
- package/Elements/Link/stories/Link.stories.d.ts +42 -0
- package/Elements/Link/stories/Link.stories.js +63 -0
- package/Elements/Logo/Logo.d.ts +3 -0
- package/Elements/Logo/Logo.js +84 -0
- package/Elements/Logo/index.d.ts +3 -0
- package/Elements/Logo/index.js +3 -0
- package/Elements/Logo/stories/Logo.stories.d.ts +34 -0
- package/Elements/Logo/stories/Logo.stories.js +112 -0
- package/Elements/Logo/types.d.ts +10 -0
- package/Elements/Logo/types.js +1 -0
- package/Elements/Pagination/Pagination.d.ts +8 -0
- package/Elements/Pagination/Pagination.js +35 -0
- package/Elements/Pagination/index.d.ts +3 -0
- package/Elements/Pagination/index.js +3 -0
- package/Elements/Pagination/stories/Pagination.stories.d.ts +12 -0
- package/Elements/Pagination/stories/Pagination.stories.js +22 -0
- package/Elements/Pagination/styled.d.ts +15 -0
- package/Elements/Pagination/styled.js +26 -0
- package/Elements/Paragraph/Paragraph.d.ts +2 -0
- package/Elements/Paragraph/Paragraph.js +3 -0
- package/Elements/Paragraph/index.d.ts +3 -0
- package/Elements/Paragraph/index.js +3 -0
- package/Elements/Paragraph/stories/Paragraph.stories.d.ts +17 -0
- package/Elements/Paragraph/stories/Paragraph.stories.js +34 -0
- package/Elements/Portal/index.d.ts +5 -0
- package/Elements/Portal/index.js +14 -0
- package/Elements/ProgressBar/ProgressBar.d.ts +9 -0
- package/Elements/ProgressBar/ProgressBar.js +9 -0
- package/Elements/ProgressBar/index.d.ts +3 -0
- package/Elements/ProgressBar/index.js +3 -0
- package/Elements/ProgressBar/stories/ProgressBar.stories.d.ts +18 -0
- package/Elements/ProgressBar/stories/ProgressBar.stories.js +27 -0
- package/Elements/ProgressBar/styles.d.ts +9 -0
- package/Elements/ProgressBar/styles.js +19 -0
- package/Elements/SimpleLink/SimpleLink.d.ts +19 -0
- package/Elements/SimpleLink/SimpleLink.js +17 -0
- package/Elements/SimpleLink/index.d.ts +3 -0
- package/Elements/SimpleLink/index.js +3 -0
- package/Elements/SpaceAround/SpaceAround.d.ts +3 -0
- package/Elements/SpaceAround/SpaceAround.js +54 -0
- package/Elements/SpaceAround/index.d.ts +4 -0
- package/Elements/SpaceAround/index.js +3 -0
- package/Elements/SpaceAround/stories/SpaceAround.stories.d.ts +12 -0
- package/Elements/SpaceAround/stories/SpaceAround.stories.js +22 -0
- package/Elements/SpaceAround/types.d.ts +14 -0
- package/Elements/SpaceAround/types.js +1 -0
- package/Elements/Spinner/Spinner.d.ts +14 -0
- package/Elements/Spinner/Spinner.js +28 -0
- package/Elements/Spinner/index.d.ts +3 -0
- package/Elements/Spinner/index.js +3 -0
- package/Elements/Spinner/stories/Spinner.stories.d.ts +19 -0
- package/Elements/Spinner/stories/Spinner.stories.js +56 -0
- package/Elements/Spinner/styles.d.ts +4 -0
- package/Elements/Spinner/styles.js +20 -0
- package/Elements/Spinner/types.d.ts +7 -0
- package/Elements/Spinner/types.js +1 -0
- package/Elements/Tag/Tag.d.ts +3 -0
- package/Elements/Tag/Tag.js +59 -0
- package/Elements/Tag/index.d.ts +4 -0
- package/Elements/Tag/index.js +4 -0
- package/Elements/Tag/palletes.d.ts +5 -0
- package/Elements/Tag/palletes.js +10 -0
- package/Elements/Tag/stories/Tag.stories.d.ts +19 -0
- package/Elements/Tag/stories/Tag.stories.js +72 -0
- package/Elements/Tag/stories/components/predefinedTags.d.ts +2 -0
- package/Elements/Tag/stories/components/predefinedTags.js +8 -0
- package/Elements/Tag/types.d.ts +17 -0
- package/Elements/Tag/types.js +1 -0
- package/Elements/Text/Text.d.ts +3 -0
- package/Elements/Text/Text.js +15 -0
- package/Elements/Text/index.d.ts +3 -0
- package/Elements/Text/index.js +2 -0
- package/Elements/Text/stories/Text.stories.d.ts +16 -0
- package/Elements/Text/stories/Text.stories.js +43 -0
- package/Elements/Text/types.d.ts +13 -0
- package/Elements/Text/types.js +1 -0
- package/Elements/Toast/Toast.d.ts +11 -0
- package/Elements/Toast/Toast.js +24 -0
- package/Elements/Toast/index.d.ts +4 -0
- package/Elements/Toast/index.js +3 -0
- package/Elements/Toggle/Toggle.d.ts +3 -0
- package/Elements/Toggle/Toggle.js +52 -0
- package/Elements/Toggle/index.d.ts +3 -0
- package/Elements/Toggle/index.js +3 -0
- package/Elements/Toggle/stories/Toggle.stories.d.ts +14 -0
- package/Elements/Toggle/stories/Toggle.stories.js +33 -0
- package/Elements/Toggle/types.d.ts +21 -0
- package/Elements/Toggle/types.js +1 -0
- package/Elements/Typography/Typography.d.ts +117 -0
- package/Elements/Typography/Typography.js +41 -0
- package/Elements/Typography/index.d.ts +3 -0
- package/Elements/Typography/index.js +3 -0
- package/Elements/Typography/stories/Typography.stories.d.ts +20 -0
- package/Elements/Typography/stories/Typography.stories.js +20 -0
- package/Forms/Checkbox/Checkbox.d.ts +4 -0
- package/Forms/Checkbox/Checkbox.js +11 -0
- package/Forms/Checkbox/index.d.ts +3 -0
- package/Forms/Checkbox/index.js +3 -0
- package/Forms/Checkbox/stories/Checkbox.stories.d.ts +14 -0
- package/Forms/Checkbox/stories/Checkbox.stories.js +35 -0
- package/Forms/Checkbox/styles.d.ts +11 -0
- package/Forms/Checkbox/styles.js +26 -0
- package/Forms/Checkbox/types.d.ts +16 -0
- package/Forms/Checkbox/types.js +1 -0
- package/Forms/Input/Input.d.ts +2 -0
- package/Forms/Input/Input.js +60 -0
- package/Forms/Input/index.d.ts +5 -0
- package/Forms/Input/index.js +3 -0
- package/Forms/Input/stories/Input.stories.d.ts +17 -0
- package/Forms/Input/stories/Input.stories.js +71 -0
- package/Forms/Input/styles.d.ts +31 -0
- package/Forms/Input/styles.js +57 -0
- package/Forms/Input/types.d.ts +49 -0
- package/Forms/Input/types.js +1 -0
- package/Forms/RadioButton/RadioButton.d.ts +3 -0
- package/Forms/RadioButton/RadioButton.js +29 -0
- package/Forms/RadioButton/index.d.ts +3 -0
- package/Forms/RadioButton/index.js +3 -0
- package/Forms/RadioButton/stories/RadioButton.stories.d.ts +14 -0
- package/Forms/RadioButton/stories/RadioButton.stories.js +38 -0
- package/Forms/RadioButton/styles.d.ts +10 -0
- package/Forms/RadioButton/styles.js +15 -0
- package/Forms/RadioButton/types.d.ts +12 -0
- package/Forms/RadioButton/types.js +1 -0
- package/ThemeProvider/ThemeProvider.d.ts +3 -0
- package/ThemeProvider/ThemeProvider.js +8 -0
- package/ThemeProvider/index.d.ts +5 -0
- package/ThemeProvider/index.js +5 -0
- package/ThemeProvider/themes/default.d.ts +142 -0
- package/ThemeProvider/themes/default.js +144 -0
- package/ThemeProvider/themes/index.d.ts +351 -0
- package/ThemeProvider/themes/index.js +9 -0
- package/ThemeProvider/themes/light.d.ts +3 -0
- package/ThemeProvider/themes/light.js +7 -0
- package/ThemeProvider/themes/mailwise.d.ts +207 -0
- package/ThemeProvider/themes/mailwise.js +214 -0
- package/ThemeProvider/types.d.ts +50 -0
- package/ThemeProvider/types.js +1 -0
- package/index.d.ts +71 -0
- package/index.es.js +17500 -0
- package/index.js +71 -0
- package/index.umd.js +2427 -0
- package/package.json +1 -5
- package/style.css +1 -0
- package/utils/CreateRgba/createRgba.d.ts +3 -0
- package/utils/CreateRgba/createRgba.js +16 -0
- package/utils/CreateRgba/types.d.ts +1 -0
- package/utils/CreateRgba/types.js +1 -0
- package/utils/KeyPress/KeyPress.d.ts +3 -0
- package/utils/KeyPress/KeyPress.js +17 -0
- package/utils/KeyPress/KeyPress.stories.d.ts +10 -0
- package/utils/KeyPress/KeyPress.stories.js +18 -0
- package/utils/KeyPress/index.d.ts +2 -0
- package/utils/KeyPress/index.js +2 -0
- package/utils/KeyPress/types.d.ts +6 -0
- package/utils/KeyPress/types.js +1 -0
- package/utils/index.d.ts +8 -0
- package/utils/index.js +7 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled, { keyframes, css } from '@xstyled/styled-components';
|
|
6
|
+
import { th } from '@xstyled/styled-components';
|
|
7
|
+
import { createRgba } from '../../utils';
|
|
8
|
+
export var StyledProgressBar = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n width: 100%;\n min-width: 250px;\n height: ", ";\n color: ", ";\n background-color: ", ";\n justify-content: center;\n border: slim;\n border-color: ", ";\n border-radius: md;\n overflow: hidden;\n"], ["\n position: relative;\n display: flex;\n width: 100%;\n min-width: 250px;\n height: ", ";\n color: ", ";\n background-color: ", ";\n justify-content: center;\n border: slim;\n border-color: ", ";\n border-radius: md;\n overflow: hidden;\n"])), function (props) { return (props.variant === 'thin' ? "12px" : "35px"); }, th('colors.white'), function (props) {
|
|
9
|
+
return props.status === 'finished' ? createRgba(props.theme.colors.success, 0.4) : "".concat(th('colors.red1'));
|
|
10
|
+
}, function (props) { return (props.status === 'finished' ? "".concat(th('colors.success')) : "".concat(th('colors.red1'))); });
|
|
11
|
+
var slide = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n0%{\n background-position-x: 0%;\n}\n100% {\n background-position-x: 500px;\n}\n"], ["\n0%{\n background-position-x: 0%;\n}\n100% {\n background-position-x: 500px;\n}\n"])));
|
|
12
|
+
var StyledStatusFinished = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background: repeating-linear-gradient(\n -45deg,\n ", ",\n ", " 10px,\n ", " 10px,\n ", " 22.1px\n );\n background-size: 4000px 50px;\n"], ["\n background: repeating-linear-gradient(\n -45deg,\n ", ",\n ", " 10px,\n ", " 10px,\n ", " 22.1px\n );\n background-size: 4000px 50px;\n"])), function (props) { return createRgba(props.theme.colors.success, 0.4); }, function (props) { return createRgba(props.theme.colors.success, 0.4); }, th('colors.success'), th('colors.success'));
|
|
13
|
+
var StyledStatusLoading = css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: repeating-linear-gradient(\n -45deg,\n ", ",\n ", " 10px,\n ", " 10px,\n ", " 22.1px\n );\n background-size: 4000px 50px;\n"], ["\n background: repeating-linear-gradient(\n -45deg,\n ", ",\n ", " 10px,\n ", " 10px,\n ", " 22.1px\n );\n background-size: 4000px 50px;\n"])), th('colors.red1'), th('colors.red1'), th('colors.red1'), th('colors.red1'));
|
|
14
|
+
var StyledStatusError = css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: repeating-linear-gradient(\n -45deg,\n ", ",\n ", " 10px,\n ", " 10px,\n ", " 22.1px\n );\n background-size: 4000px 50px;\n"], ["\n background: repeating-linear-gradient(\n -45deg,\n ", ",\n ", " 10px,\n ", " 10px,\n ", " 22.1px\n );\n background-size: 4000px 50px;\n"])), th('colors.red1'), th('colors.red1'), th('colors.red1'), th('colors.red1'));
|
|
15
|
+
export var Progress = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: ", ";\n height: 35px;\n animation: ", " 20s linear infinite;\n transition: width 500ms;\n ", "\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: ", ";\n height: 35px;\n animation: ", " 20s linear infinite;\n transition: width 500ms;\n ", "\n"])), function (props) { return "".concat(props.progress, "%"); }, slide, function (props) {
|
|
16
|
+
return props.status === 'finished' ? StyledStatusFinished : props.status === 'error' ? StyledStatusError : StyledStatusLoading;
|
|
17
|
+
});
|
|
18
|
+
export var ProgressDescription = styled.span(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: relative;\n align-self: center;\n"], ["\n position: relative;\n align-self: center;\n"])));
|
|
19
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link as ReactLink } from 'react-router-dom';
|
|
3
|
+
export type ToObjectType = {
|
|
4
|
+
pathname?: string;
|
|
5
|
+
search?: string;
|
|
6
|
+
hash?: string;
|
|
7
|
+
state?: object;
|
|
8
|
+
};
|
|
9
|
+
export type Props = {
|
|
10
|
+
as?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
to?: string | ToObjectType | Function;
|
|
13
|
+
target?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
onClick?: Function;
|
|
16
|
+
$decorate?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare const StyledLink: import("styled-components").StyledComponent<typeof ReactLink, import("@xstyled/system").Theme, Props, never>;
|
|
19
|
+
export default StyledLink;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { Link as ReactLink } from 'react-router-dom';
|
|
6
|
+
import styled, { css } from '@xstyled/styled-components';
|
|
7
|
+
var StyledLink = styled(ReactLink)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: inherit;\n cursor: pointer;\n\n :visited {\n color: inherit;\n }\n :hover {\n color: inherit;\n }\n :active {\n color: inherit;\n }\n :focus {\n outline: none;\n }\n\n ", "\n\n ", "\n"], ["\n color: inherit;\n cursor: pointer;\n\n :visited {\n color: inherit;\n }\n :hover {\n color: inherit;\n }\n :active {\n color: inherit;\n }\n :focus {\n outline: none;\n }\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
8
|
+
var disabled = _a.disabled;
|
|
9
|
+
return disabled
|
|
10
|
+
? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n pointer-events: none;\n opacity: 0.5;\n "], ["\n pointer-events: none;\n opacity: 0.5;\n "]))) : null;
|
|
11
|
+
}, function (_a) {
|
|
12
|
+
var $decorate = _a.$decorate;
|
|
13
|
+
return $decorate
|
|
14
|
+
? css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-decoration: underline;\n "], ["\n text-decoration: underline;\n "]))) : null;
|
|
15
|
+
});
|
|
16
|
+
export default StyledLink;
|
|
17
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
+
import styled, { x, css, useTheme } from '@xstyled/styled-components';
|
|
29
|
+
import { th } from '@xstyled/styled-components';
|
|
30
|
+
var Wrapper = styled(x.div)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", ";\n position: relative;\n box-sizing: border-box;\n ", ";\n ", ";\n"], ["\n width: ", ";\n position: relative;\n box-sizing: border-box;\n ", ";\n ", ";\n"])), function (_a) {
|
|
31
|
+
var $marginLeft = _a.$marginLeft, $marginRight = _a.$marginRight;
|
|
32
|
+
return "calc(100% - ".concat($marginLeft || '0px', " - ").concat($marginRight || '0px', ")");
|
|
33
|
+
}, function (_a) {
|
|
34
|
+
var $spaceAround = _a.$spaceAround;
|
|
35
|
+
return $spaceAround
|
|
36
|
+
? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n "], ["\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n "])), $spaceAround === true || typeof ($spaceAround === null || $spaceAround === void 0 ? void 0 : $spaceAround.marginTop) === 'undefined' ? 1 : $spaceAround.marginTop, $spaceAround === true || typeof ($spaceAround === null || $spaceAround === void 0 ? void 0 : $spaceAround.marginRight) === 'undefined'
|
|
37
|
+
? 1
|
|
38
|
+
: $spaceAround.marginRight, $spaceAround === true || typeof ($spaceAround === null || $spaceAround === void 0 ? void 0 : $spaceAround.marginBottom) === 'undefined'
|
|
39
|
+
? 2
|
|
40
|
+
: $spaceAround.marginBottom, $spaceAround === true || typeof ($spaceAround === null || $spaceAround === void 0 ? void 0 : $spaceAround.marginLeft) === 'undefined' ? 0 : $spaceAround.marginLeft) : '';
|
|
41
|
+
}, function (_a) {
|
|
42
|
+
var $spaceBetween = _a.$spaceBetween;
|
|
43
|
+
return $spaceBetween
|
|
44
|
+
? css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n "], ["\n display: flex;\n justify-content: space-between;\n "]))) : '';
|
|
45
|
+
});
|
|
46
|
+
var SpaceAroundWrap = function (_a) {
|
|
47
|
+
var children = _a.children, _b = _a.spaceBetween, spaceBetween = _b === void 0 ? false : _b, _c = _a.spaceAround, spaceAround = _c === void 0 ? true : _c, rest = __rest(_a, ["children", "spaceBetween", "spaceAround"]);
|
|
48
|
+
var theme = useTheme();
|
|
49
|
+
var themeMarginLeft = typeof spaceAround !== 'boolean' && (spaceAround === null || spaceAround === void 0 ? void 0 : spaceAround.marginLeft) ? th.space(spaceAround === null || spaceAround === void 0 ? void 0 : spaceAround.marginLeft)({ theme: theme }) : 0;
|
|
50
|
+
var themeMarginRight = typeof spaceAround !== 'boolean' && (spaceAround === null || spaceAround === void 0 ? void 0 : spaceAround.marginRight) ? th.space(spaceAround === null || spaceAround === void 0 ? void 0 : spaceAround.marginRight)({ theme: theme }) : 0;
|
|
51
|
+
return (_jsx(Wrapper, __assign({ "$spaceAround": spaceAround, "$spaceBetween": spaceBetween, "$marginRight": themeMarginRight, "$marginLeft": themeMarginLeft }, rest, { children: children })));
|
|
52
|
+
};
|
|
53
|
+
export default SpaceAroundWrap;
|
|
54
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ children, spaceBetween, spaceAround, ...rest }: import("../types").Props) => JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
argTypes: {};
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
export declare const ManyPages: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SpaceAroundWrap } from '../';
|
|
2
|
+
var meta = {
|
|
3
|
+
title: 'Elements/SpaceAround',
|
|
4
|
+
component: SpaceAroundWrap,
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
argTypes: {},
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export var Default = {
|
|
10
|
+
args: {
|
|
11
|
+
children: 'This is a content',
|
|
12
|
+
spaceBetween: false,
|
|
13
|
+
spaceAround: true,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export var ManyPages = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'This is a content',
|
|
19
|
+
spaceBetween: true,
|
|
20
|
+
spaceAround: false,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type SpaceAroundProps = {
|
|
3
|
+
marginTop?: number;
|
|
4
|
+
marginRight?: number;
|
|
5
|
+
marginBottom?: number;
|
|
6
|
+
marginLeft?: number;
|
|
7
|
+
};
|
|
8
|
+
export type SpaceAround = boolean | SpaceAroundProps;
|
|
9
|
+
export type Props = {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
spaceAround?: SpaceAround;
|
|
12
|
+
className?: string;
|
|
13
|
+
spaceBetween?: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ISpinner } from './types';
|
|
2
|
+
export declare const appearanceToColorMap: {
|
|
3
|
+
error: string;
|
|
4
|
+
concept: string;
|
|
5
|
+
done: string;
|
|
6
|
+
info: string;
|
|
7
|
+
processing: string;
|
|
8
|
+
success: string;
|
|
9
|
+
warning: string;
|
|
10
|
+
waiting: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const appearanceToFontColorMap: Record<string, string>;
|
|
13
|
+
export declare const Spinner: ISpinner;
|
|
14
|
+
export default Spinner;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Svg, Circle } from './styles';
|
|
3
|
+
export var appearanceToColorMap = {
|
|
4
|
+
error: 'red1',
|
|
5
|
+
concept: 'bgLightGray1',
|
|
6
|
+
done: 'darkGreen',
|
|
7
|
+
info: 'lightGray6',
|
|
8
|
+
processing: 'blue2',
|
|
9
|
+
success: 'green',
|
|
10
|
+
warning: 'yellow1',
|
|
11
|
+
waiting: 'gray1',
|
|
12
|
+
};
|
|
13
|
+
export var appearanceToFontColorMap = {
|
|
14
|
+
error: 'white',
|
|
15
|
+
concept: 'blue2',
|
|
16
|
+
done: 'white',
|
|
17
|
+
info: 'blue2',
|
|
18
|
+
processing: 'white',
|
|
19
|
+
success: 'white',
|
|
20
|
+
warning: 'blue2',
|
|
21
|
+
waiting: 'white',
|
|
22
|
+
};
|
|
23
|
+
export var Spinner = function (_a) {
|
|
24
|
+
var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, appearance = _a.appearance;
|
|
25
|
+
var color = appearance ? appearanceToFontColorMap[appearance] : 'blue2';
|
|
26
|
+
return (_jsx(Svg, { viewBox: "22 22 44 44", "$variant": variant, children: _jsx(Circle, { cx: "44", cy: "44", r: "20.2", fill: "none", strokeWidth: "3.6", color: color }) }));
|
|
27
|
+
};
|
|
28
|
+
export default Spinner;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("../types").ISpinner;
|
|
5
|
+
tags: string[];
|
|
6
|
+
argTypes: {};
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
export declare const Sm: Story;
|
|
12
|
+
export declare const AppearanceConcept: Story;
|
|
13
|
+
export declare const AppearanceDone: Story;
|
|
14
|
+
export declare const AppearanceError: Story;
|
|
15
|
+
export declare const AppearanceInfo: Story;
|
|
16
|
+
export declare const AppearanceProcessing: Story;
|
|
17
|
+
export declare const AppearanceSuccess: Story;
|
|
18
|
+
export declare const AppearanceWarning: Story;
|
|
19
|
+
export declare const AppearanceWaiting: Story;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Spinner } from '../';
|
|
2
|
+
var meta = {
|
|
3
|
+
title: 'Elements/Spinner',
|
|
4
|
+
component: Spinner,
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
argTypes: {},
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export var Default = {
|
|
10
|
+
args: {},
|
|
11
|
+
};
|
|
12
|
+
export var Sm = {
|
|
13
|
+
args: {
|
|
14
|
+
variant: 'sm',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export var AppearanceConcept = {
|
|
18
|
+
args: {
|
|
19
|
+
appearance: 'concept',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
export var AppearanceDone = {
|
|
23
|
+
args: {
|
|
24
|
+
appearance: 'done',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
export var AppearanceError = {
|
|
28
|
+
args: {
|
|
29
|
+
appearance: 'error',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export var AppearanceInfo = {
|
|
33
|
+
args: {
|
|
34
|
+
appearance: 'info',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export var AppearanceProcessing = {
|
|
38
|
+
args: {
|
|
39
|
+
appearance: 'processing',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export var AppearanceSuccess = {
|
|
43
|
+
args: {
|
|
44
|
+
appearance: 'success',
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
export var AppearanceWarning = {
|
|
48
|
+
args: {
|
|
49
|
+
appearance: 'warning',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
export var AppearanceWaiting = {
|
|
53
|
+
args: {
|
|
54
|
+
appearance: 'waiting',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const Svg: import("styled-components").StyledComponent<"svg", import("@xstyled/system").Theme, {
|
|
2
|
+
$variant: 'default' | 'sm';
|
|
3
|
+
}, never>;
|
|
4
|
+
export declare const Circle: import("styled-components").StyledComponent<"circle", import("@xstyled/system").Theme, {}, never>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled, { th } from '@xstyled/styled-components';
|
|
6
|
+
import { keyframes } from 'styled-components';
|
|
7
|
+
var KeyframesCircularDash = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0px;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"], ["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0px;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])));
|
|
8
|
+
var KeyframesCircularRotate = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n 100% {\n transform: rotate(360deg);\n }\n"], ["\n 100% {\n transform: rotate(360deg);\n }\n"])));
|
|
9
|
+
export var Svg = styled.svg(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", "px;\n height: ", "px;\n animation: ", " 1.4s linear infinite;\n"], ["\n width: ", "px;\n height: ", "px;\n animation: ", " 1.4s linear infinite;\n"])), function (_a) {
|
|
10
|
+
var $variant = _a.$variant;
|
|
11
|
+
return ($variant === 'sm' ? '16' : '40');
|
|
12
|
+
}, function (_a) {
|
|
13
|
+
var $variant = _a.$variant;
|
|
14
|
+
return ($variant === 'sm' ? '16' : '40');
|
|
15
|
+
}, KeyframesCircularRotate);
|
|
16
|
+
export var Circle = styled.circle(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n animation: ", " 1.4s ease-in-out infinite;\n stroke-dasharray: 80px, 200px;\n stroke-dashoffset: 0px;\n stroke: ", ";\n"], ["\n animation: ", " 1.4s ease-in-out infinite;\n stroke-dasharray: 80px, 200px;\n stroke-dashoffset: 0px;\n stroke: ", ";\n"])), KeyframesCircularDash, function (_a) {
|
|
17
|
+
var color = _a.color;
|
|
18
|
+
return (color ? th.color(color) : th.color('blue2'));
|
|
19
|
+
});
|
|
20
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type AppearanceType = 'concept' | 'done' | 'error' | 'info' | 'processing' | 'success' | 'warning' | 'waiting';
|
|
3
|
+
export interface SpinnerProps {
|
|
4
|
+
variant?: 'default' | 'sm';
|
|
5
|
+
appearance?: AppearanceType;
|
|
6
|
+
}
|
|
7
|
+
export type ISpinner = (props: SpinnerProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled, { th } from '@xstyled/styled-components';
|
|
6
|
+
var fontSizeMap = {
|
|
7
|
+
small: '14px',
|
|
8
|
+
medium: '16px',
|
|
9
|
+
big: '20px',
|
|
10
|
+
};
|
|
11
|
+
var paddingMap = {
|
|
12
|
+
small: '2px 8px',
|
|
13
|
+
medium: '7px 10px',
|
|
14
|
+
big: '12px 12px',
|
|
15
|
+
};
|
|
16
|
+
var borderRadiusMap = {
|
|
17
|
+
small: '6px',
|
|
18
|
+
medium: '20px',
|
|
19
|
+
big: '20px',
|
|
20
|
+
};
|
|
21
|
+
var getTextColor = function (isNotSelected, textColor) {
|
|
22
|
+
if (textColor) {
|
|
23
|
+
return th.color(textColor);
|
|
24
|
+
}
|
|
25
|
+
return isNotSelected ? th.color('blue2') : 'white';
|
|
26
|
+
};
|
|
27
|
+
var getBgColor = function (color) {
|
|
28
|
+
return color ? th.color(color) : 'rgba(157, 163, 169, 0.2)';
|
|
29
|
+
};
|
|
30
|
+
export var Tag = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n margin-right: 10px;\n color: ", ";\n width: fit-content;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n text-align: center;\n white-space: nowrap;\n display: flex;\n align-items: center;\n font-size: 14px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n & span {\n &:first-letter {\n text-transform: uppercase;\n }\n }\n}\n"], ["\n background-color: ", ";\n margin-right: 10px;\n color: ", ";\n width: fit-content;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n text-align: center;\n white-space: nowrap;\n display: flex;\n align-items: center;\n font-size: 14px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n & span {\n &:first-letter {\n text-transform: uppercase;\n }\n }\n}\n"])), function (_a) {
|
|
31
|
+
var color = _a.color;
|
|
32
|
+
return getBgColor(color);
|
|
33
|
+
}, function (_a) {
|
|
34
|
+
var isNotSelected = _a.isNotSelected, textColor = _a.textColor;
|
|
35
|
+
return getTextColor(isNotSelected, textColor);
|
|
36
|
+
}, function (_a) {
|
|
37
|
+
var size = _a.size;
|
|
38
|
+
return "border-radius: ".concat(borderRadiusMap[size || 'medium']);
|
|
39
|
+
}, function (_a) {
|
|
40
|
+
var size = _a.size;
|
|
41
|
+
return "font-size: ".concat(fontSizeMap[size || 'medium']);
|
|
42
|
+
}, function (_a) {
|
|
43
|
+
var size = _a.size;
|
|
44
|
+
return "padding: ".concat(paddingMap[size || 'medium']);
|
|
45
|
+
}, function (_a) {
|
|
46
|
+
var border = _a.border;
|
|
47
|
+
return border && 'border: 1px solid rgba(0, 0, 0, 0.65);';
|
|
48
|
+
}, function (_a) {
|
|
49
|
+
var opacity = _a.opacity;
|
|
50
|
+
return opacity && 'opacity: 0.7';
|
|
51
|
+
}, function (_a) {
|
|
52
|
+
var pointer = _a.pointer;
|
|
53
|
+
return pointer && 'cursor: pointer;';
|
|
54
|
+
}, function (_a) {
|
|
55
|
+
var hover = _a.hover;
|
|
56
|
+
return hover && '&: hover { opacity: 0.7}';
|
|
57
|
+
});
|
|
58
|
+
export default Tag;
|
|
59
|
+
var templateObject_1;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [string, string]: [background, text]
|
|
3
|
+
*/
|
|
4
|
+
export var palletes = {
|
|
5
|
+
greenWhite: { color: 'green60', textColor: 'white' },
|
|
6
|
+
blueBlue: { color: 'blue20', textColor: 'blue80' },
|
|
7
|
+
magentaWhite: { color: 'magenta60', textColor: 'white' },
|
|
8
|
+
magentaMagenta: { color: 'magenta20', textColor: 'magenta80' },
|
|
9
|
+
tealTeal: { color: 'teal20', textColor: 'teal90' },
|
|
10
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, import("../types").Props, never>;
|
|
5
|
+
tags: string[];
|
|
6
|
+
argTypes: {};
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const AllPalletes: Story;
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
export declare const RedTag: Story;
|
|
13
|
+
export declare const NotSelected: Story;
|
|
14
|
+
export declare const Pointer: Story;
|
|
15
|
+
export declare const Hover: Story;
|
|
16
|
+
export declare const Opacity: Story;
|
|
17
|
+
export declare const Border: Story;
|
|
18
|
+
export declare const Small: Story;
|
|
19
|
+
export declare const Big: Story;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import PredefinedTags from './components/predefinedTags';
|
|
2
|
+
import { Tag } from '../';
|
|
3
|
+
var meta = {
|
|
4
|
+
title: 'Elements/Tag',
|
|
5
|
+
component: Tag,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {},
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export var AllPalletes = {
|
|
11
|
+
decorators: [PredefinedTags],
|
|
12
|
+
};
|
|
13
|
+
export var Default = {
|
|
14
|
+
args: {
|
|
15
|
+
children: 'Label',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export var RedTag = {
|
|
19
|
+
args: {
|
|
20
|
+
color: 'red1',
|
|
21
|
+
children: 'This tag has color red1',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export var NotSelected = {
|
|
25
|
+
args: {
|
|
26
|
+
isNotSelected: true,
|
|
27
|
+
children: 'This tag is not selected',
|
|
28
|
+
color: 'red1',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export var Pointer = {
|
|
32
|
+
args: {
|
|
33
|
+
pointer: true,
|
|
34
|
+
children: 'This tag has pointer',
|
|
35
|
+
color: 'red1',
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
export var Hover = {
|
|
39
|
+
args: {
|
|
40
|
+
hover: true,
|
|
41
|
+
children: 'This tag has hover effect',
|
|
42
|
+
color: 'red1',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
export var Opacity = {
|
|
46
|
+
args: {
|
|
47
|
+
opacity: true,
|
|
48
|
+
children: 'This tag has opacity 0.7',
|
|
49
|
+
color: 'red1',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
export var Border = {
|
|
53
|
+
args: {
|
|
54
|
+
border: true,
|
|
55
|
+
children: 'This tag has border',
|
|
56
|
+
color: 'red1',
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
export var Small = {
|
|
60
|
+
args: {
|
|
61
|
+
children: 'Small',
|
|
62
|
+
color: 'teal60',
|
|
63
|
+
size: 'small',
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
export var Big = {
|
|
67
|
+
args: {
|
|
68
|
+
children: 'Big',
|
|
69
|
+
color: 'teal60',
|
|
70
|
+
size: 'big',
|
|
71
|
+
},
|
|
72
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { x } from '@xstyled/styled-components';
|
|
3
|
+
import { Tag } from '../../';
|
|
4
|
+
import { palletes } from '../../palletes';
|
|
5
|
+
var PredefinedTags = function () {
|
|
6
|
+
return (_jsx(x.div, { display: "flex", flexWrap: "wrap", fontFamily: "monospace", children: Object.keys(palletes).map(function (pallete, i) { return (_jsx(Tag, { color: palletes[pallete].color, textColor: palletes[pallete].textColor, children: pallete })); }) }));
|
|
7
|
+
};
|
|
8
|
+
export default PredefinedTags;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type Props = {
|
|
3
|
+
color?: string;
|
|
4
|
+
textColor?: string;
|
|
5
|
+
isNotSelected?: boolean;
|
|
6
|
+
pointer?: boolean;
|
|
7
|
+
hover?: boolean;
|
|
8
|
+
opacity?: boolean;
|
|
9
|
+
border?: boolean;
|
|
10
|
+
size?: 'small' | 'medium' | 'big';
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export type Pallete = {
|
|
15
|
+
color: string;
|
|
16
|
+
textColor: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { x } from '@xstyled/styled-components';
|
|
14
|
+
var Text = function (props) { return _jsx(x.div, __assign({ as: "span" }, props)); };
|
|
15
|
+
export default Text;
|