@a-little-world/little-world-design-system 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +7 -0
- package/.storybook/main.ts +36 -0
- package/.storybook/preview-head.html +6 -0
- package/.storybook/preview.ts +15 -0
- package/.turbo/turbo-build.log +14 -0
- package/CHANGELOG.md +398 -0
- package/LICENSE +21 -0
- package/README.md +180 -0
- package/__mocks__/focus-trap-react.tsx +1 -0
- package/__mocks__/svg.tsx +6 -0
- package/dist/cjs/components/Accordion/Accordion.d.ts +15 -0
- package/dist/cjs/components/Accordion/Accordion.js +20 -0
- package/dist/cjs/components/Accordion/styles.d.ts +18 -0
- package/dist/cjs/components/Accordion/styles.js +100 -0
- package/dist/cjs/components/Button/Button.d.ts +9 -0
- package/dist/cjs/components/Button/Button.js +17 -0
- package/dist/cjs/components/Button/styles.d.ts +16 -0
- package/dist/cjs/components/Button/styles.js +313 -0
- package/dist/cjs/components/Card/Card.d.ts +11 -0
- package/dist/cjs/components/Card/Card.js +108 -0
- package/dist/cjs/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/cjs/components/Checkbox/Checkbox.js +24 -0
- package/dist/cjs/components/Checkbox/styles.d.ts +27 -0
- package/dist/cjs/components/Checkbox/styles.js +108 -0
- package/dist/cjs/components/CheckboxGrid/CheckboxGrid.d.ts +22 -0
- package/dist/cjs/components/CheckboxGrid/CheckboxGrid.js +73 -0
- package/dist/cjs/components/CheckboxGrid/styles.d.ts +64 -0
- package/dist/cjs/components/CheckboxGrid/styles.js +137 -0
- package/dist/cjs/components/Dropdown/Dropdown.d.ts +25 -0
- package/dist/cjs/components/Dropdown/Dropdown.js +70 -0
- package/dist/cjs/components/Dropdown/styles.d.ts +15 -0
- package/dist/cjs/components/Dropdown/styles.js +145 -0
- package/dist/cjs/components/Icon/Icon.d.ts +10 -0
- package/dist/cjs/components/Icon/Icon.js +82 -0
- package/dist/cjs/components/Icon/IconGradient.d.ts +4 -0
- package/dist/cjs/components/Icon/IconGradient.js +29 -0
- package/dist/cjs/components/Icon/createIconComponent.d.ts +10 -0
- package/dist/cjs/components/Icon/createIconComponent.js +31 -0
- package/dist/cjs/components/Icon/getDefaultIconProps.d.ts +2 -0
- package/dist/cjs/components/Icon/getDefaultIconProps.js +15 -0
- package/dist/cjs/components/Icon/index.d.ts +553 -0
- package/dist/cjs/components/Icon/index.js +342 -0
- package/dist/cjs/components/Illustrations/Illustration.d.ts +3 -0
- package/dist/cjs/components/Illustrations/Illustration.js +12 -0
- package/dist/cjs/components/Illustrations/createIllustrationComponent.d.ts +10 -0
- package/dist/cjs/components/Illustrations/createIllustrationComponent.js +23 -0
- package/dist/cjs/components/Illustrations/index.d.ts +152 -0
- package/dist/cjs/components/Illustrations/index.js +81 -0
- package/dist/cjs/components/InputError/InputError.d.ts +15 -0
- package/dist/cjs/components/InputError/InputError.js +79 -0
- package/dist/cjs/components/Label/Label.d.ts +10 -0
- package/dist/cjs/components/Label/Label.js +68 -0
- package/dist/cjs/components/Link/Link.d.ts +6 -0
- package/dist/cjs/components/Link/Link.js +48 -0
- package/dist/cjs/components/Link/styles.d.ts +22 -0
- package/dist/cjs/components/Link/styles.js +99 -0
- package/dist/cjs/components/Loading/Loading.d.ts +10 -0
- package/dist/cjs/components/Loading/Loading.js +27 -0
- package/dist/cjs/components/Loading/LoadingLogo.d.ts +8 -0
- package/dist/cjs/components/Loading/LoadingLogo.js +31 -0
- package/dist/cjs/components/Loading/styles.d.ts +15 -0
- package/dist/cjs/components/Loading/styles.js +107 -0
- package/dist/cjs/components/Modal/Modal.d.ts +20 -0
- package/dist/cjs/components/Modal/Modal.js +95 -0
- package/dist/cjs/components/Modal/styles.d.ts +4 -0
- package/dist/cjs/components/Modal/styles.js +102 -0
- package/dist/cjs/components/MultiCheckbox/MultiCheckbox.d.ts +15 -0
- package/dist/cjs/components/MultiCheckbox/MultiCheckbox.js +61 -0
- package/dist/cjs/components/MultiCheckbox/styles.d.ts +1 -0
- package/dist/cjs/components/MultiCheckbox/styles.js +15 -0
- package/dist/cjs/components/MultiDropdown/MultiDropdown.d.ts +28 -0
- package/dist/cjs/components/MultiDropdown/MultiDropdown.js +124 -0
- package/dist/cjs/components/MultiDropdown/styles.d.ts +7 -0
- package/dist/cjs/components/MultiDropdown/styles.js +44 -0
- package/dist/cjs/components/MultiSelection/MultiSelection.d.ts +16 -0
- package/dist/cjs/components/MultiSelection/MultiSelection.js +62 -0
- package/dist/cjs/components/MultiSelection/styles.d.ts +9 -0
- package/dist/cjs/components/MultiSelection/styles.js +99 -0
- package/dist/cjs/components/NavigationMenu/NavigationMenu.d.ts +35 -0
- package/dist/cjs/components/NavigationMenu/NavigationMenu.js +85 -0
- package/dist/cjs/components/NavigationMenu/styles.d.ts +81 -0
- package/dist/cjs/components/NavigationMenu/styles.js +296 -0
- package/dist/cjs/components/Popover/InfoPopover.d.ts +8 -0
- package/dist/cjs/components/Popover/InfoPopover.js +46 -0
- package/dist/cjs/components/Popover/Popover.d.ts +16 -0
- package/dist/cjs/components/Popover/Popover.js +61 -0
- package/dist/cjs/components/Popover/styles.d.ts +14 -0
- package/dist/cjs/components/Popover/styles.js +116 -0
- package/dist/cjs/components/ProgressBar/ProgressBar.d.ts +8 -0
- package/dist/cjs/components/ProgressBar/ProgressBar.js +85 -0
- package/dist/cjs/components/RadioGroup/RadioGroup.d.ts +16 -0
- package/dist/cjs/components/RadioGroup/RadioGroup.js +24 -0
- package/dist/cjs/components/RadioGroup/styles.d.ts +12 -0
- package/dist/cjs/components/RadioGroup/styles.js +126 -0
- package/dist/cjs/components/Separator/Separator.d.ts +11 -0
- package/dist/cjs/components/Separator/Separator.js +61 -0
- package/dist/cjs/components/Separator/styles.d.ts +6 -0
- package/dist/cjs/components/Separator/styles.js +57 -0
- package/dist/cjs/components/Slider/Slider.d.ts +12 -0
- package/dist/cjs/components/Slider/Slider.js +17 -0
- package/dist/cjs/components/Slider/styles.d.ts +6 -0
- package/dist/cjs/components/Slider/styles.js +57 -0
- package/dist/cjs/components/StarRating/StarRating.d.ts +22 -0
- package/dist/cjs/components/StarRating/StarRating.js +143 -0
- package/dist/cjs/components/StarRating/styles.d.ts +35 -0
- package/dist/cjs/components/StarRating/styles.js +104 -0
- package/dist/cjs/components/StatusMessage/StatusMessage.d.ts +4 -0
- package/dist/cjs/components/StatusMessage/StatusMessage.js +112 -0
- package/dist/cjs/components/Switch/Switch.d.ts +15 -0
- package/dist/cjs/components/Switch/Switch.js +19 -0
- package/dist/cjs/components/Switch/styles.d.ts +14 -0
- package/dist/cjs/components/Switch/styles.js +99 -0
- package/dist/cjs/components/Tags/Tags.d.ts +15 -0
- package/dist/cjs/components/Tags/Tags.js +17 -0
- package/dist/cjs/components/Tags/styles.d.ts +19 -0
- package/dist/cjs/components/Tags/styles.js +119 -0
- package/dist/cjs/components/Text/Text.d.ts +11 -0
- package/dist/cjs/components/Text/Text.js +13 -0
- package/dist/cjs/components/Text/styles.d.ts +8 -0
- package/dist/cjs/components/Text/styles.js +98 -0
- package/dist/cjs/components/Text/types.d.ts +8 -0
- package/dist/cjs/components/Text/types.js +2 -0
- package/dist/cjs/components/TextArea/TextArea.d.ts +19 -0
- package/dist/cjs/components/TextArea/TextArea.js +84 -0
- package/dist/cjs/components/TextArea/styles.d.ts +22 -0
- package/dist/cjs/components/TextArea/styles.js +81 -0
- package/dist/cjs/components/TextContent/TextContent.d.ts +28 -0
- package/dist/cjs/components/TextContent/TextContent.js +46 -0
- package/dist/cjs/components/TextContent/styles.d.ts +24 -0
- package/dist/cjs/components/TextContent/styles.js +75 -0
- package/dist/cjs/components/TextInput/TextInput.d.ts +8 -0
- package/dist/cjs/components/TextInput/TextInput.js +49 -0
- package/dist/cjs/components/TextInput/styles.d.ts +18 -0
- package/dist/cjs/components/TextInput/styles.js +150 -0
- package/dist/cjs/components/Toast/Toast.d.ts +5 -0
- package/dist/cjs/components/Toast/Toast.js +90 -0
- package/dist/cjs/components/Toast/styles.d.ts +27 -0
- package/dist/cjs/components/Toast/styles.js +164 -0
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +9 -0
- package/dist/cjs/components/Tooltip/Tooltip.js +55 -0
- package/dist/cjs/components/Tooltip/styles.d.ts +2 -0
- package/dist/cjs/components/Tooltip/styles.js +24 -0
- package/dist/cjs/components/Widget/AttachmentWidget.d.ts +18 -0
- package/dist/cjs/components/Widget/AttachmentWidget.js +124 -0
- package/dist/cjs/components/Widget/CallWidget.d.ts +11 -0
- package/dist/cjs/components/Widget/CallWidget.js +84 -0
- package/dist/cjs/components/Widget/Widget.d.ts +26 -0
- package/dist/cjs/components/Widget/Widget.js +87 -0
- package/dist/cjs/globalStyles.d.ts +5 -0
- package/dist/cjs/globalStyles.js +66 -0
- package/dist/cjs/hooks/useAutosizeTextArea.d.ts +2 -0
- package/dist/cjs/hooks/useAutosizeTextArea.js +14 -0
- package/dist/cjs/index.d.ts +51 -0
- package/dist/cjs/index.js +139 -0
- package/dist/cjs/storybook/BreakpointDocumentation.d.ts +3 -0
- package/dist/cjs/storybook/BreakpointDocumentation.js +139 -0
- package/dist/cjs/storybook/Components.d.ts +2 -0
- package/dist/cjs/storybook/Components.js +30 -0
- package/dist/cjs/storybook/Documentation.d.ts +5 -0
- package/dist/cjs/storybook/Documentation.js +67 -0
- package/dist/cjs/storybook/RadiusDocumentation.d.ts +3 -0
- package/dist/cjs/storybook/RadiusDocumentation.js +150 -0
- package/dist/cjs/storybook/SpacingDocumentation.d.ts +3 -0
- package/dist/cjs/storybook/SpacingDocumentation.js +146 -0
- package/dist/cjs/theme/index.d.ts +17 -0
- package/dist/cjs/theme/index.js +90 -0
- package/dist/cjs/utils/animations.d.ts +12 -0
- package/dist/cjs/utils/animations.js +120 -0
- package/dist/cjs/utils/createReactSvg.d.ts +3 -0
- package/dist/cjs/utils/createReactSvg.js +77 -0
- package/dist/cjs/utils/parser.d.ts +12 -0
- package/dist/cjs/utils/parser.js +200 -0
- package/dist/cjs/utils/replaceUrlsWithAnchors.d.ts +6 -0
- package/dist/cjs/utils/replaceUrlsWithAnchors.js +32 -0
- package/dist/cjs/utils/status.d.ts +6 -0
- package/dist/cjs/utils/status.js +54 -0
- package/dist/cjs/utils/styles.d.ts +1 -0
- package/dist/cjs/utils/styles.js +5 -0
- package/dist/cjs/utils/types.d.ts +1 -0
- package/dist/cjs/utils/types.js +2 -0
- package/dist/esm/components/Accordion/Accordion.d.ts +15 -0
- package/dist/esm/components/Accordion/Accordion.js +14 -0
- package/dist/esm/components/Accordion/styles.d.ts +18 -0
- package/dist/esm/components/Accordion/styles.js +61 -0
- package/dist/esm/components/Button/Button.d.ts +9 -0
- package/dist/esm/components/Button/Button.js +10 -0
- package/dist/esm/components/Button/styles.d.ts +16 -0
- package/dist/esm/components/Button/styles.js +277 -0
- package/dist/esm/components/Card/Card.d.ts +11 -0
- package/dist/esm/components/Card/Card.js +66 -0
- package/dist/esm/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/esm/components/Checkbox/Checkbox.js +17 -0
- package/dist/esm/components/Checkbox/styles.d.ts +27 -0
- package/dist/esm/components/Checkbox/styles.js +69 -0
- package/dist/esm/components/CheckboxGrid/CheckboxGrid.d.ts +22 -0
- package/dist/esm/components/CheckboxGrid/CheckboxGrid.js +35 -0
- package/dist/esm/components/CheckboxGrid/styles.d.ts +64 -0
- package/dist/esm/components/CheckboxGrid/styles.js +98 -0
- package/dist/esm/components/Dropdown/Dropdown.d.ts +25 -0
- package/dist/esm/components/Dropdown/Dropdown.js +32 -0
- package/dist/esm/components/Dropdown/styles.d.ts +15 -0
- package/dist/esm/components/Dropdown/styles.js +106 -0
- package/dist/esm/components/Icon/Icon.d.ts +10 -0
- package/dist/esm/components/Icon/Icon.js +42 -0
- package/dist/esm/components/Icon/IconGradient.d.ts +4 -0
- package/dist/esm/components/Icon/IconGradient.js +24 -0
- package/dist/esm/components/Icon/createIconComponent.d.ts +10 -0
- package/dist/esm/components/Icon/createIconComponent.js +24 -0
- package/dist/esm/components/Icon/getDefaultIconProps.d.ts +2 -0
- package/dist/esm/components/Icon/getDefaultIconProps.js +11 -0
- package/dist/esm/components/Icon/index.d.ts +553 -0
- package/dist/esm/components/Icon/index.js +338 -0
- package/dist/esm/components/Illustrations/Illustration.d.ts +3 -0
- package/dist/esm/components/Illustrations/Illustration.js +5 -0
- package/dist/esm/components/Illustrations/createIllustrationComponent.d.ts +10 -0
- package/dist/esm/components/Illustrations/createIllustrationComponent.js +16 -0
- package/dist/esm/components/Illustrations/index.d.ts +152 -0
- package/dist/esm/components/Illustrations/index.js +78 -0
- package/dist/esm/components/InputError/InputError.d.ts +15 -0
- package/dist/esm/components/InputError/InputError.js +40 -0
- package/dist/esm/components/Label/Label.d.ts +10 -0
- package/dist/esm/components/Label/Label.js +30 -0
- package/dist/esm/components/Link/Link.d.ts +6 -0
- package/dist/esm/components/Link/Link.js +13 -0
- package/dist/esm/components/Link/styles.d.ts +22 -0
- package/dist/esm/components/Link/styles.js +63 -0
- package/dist/esm/components/Loading/Loading.d.ts +10 -0
- package/dist/esm/components/Loading/Loading.js +21 -0
- package/dist/esm/components/Loading/LoadingLogo.d.ts +8 -0
- package/dist/esm/components/Loading/LoadingLogo.js +26 -0
- package/dist/esm/components/Loading/styles.d.ts +15 -0
- package/dist/esm/components/Loading/styles.js +71 -0
- package/dist/esm/components/Modal/Modal.d.ts +20 -0
- package/dist/esm/components/Modal/Modal.js +59 -0
- package/dist/esm/components/Modal/styles.d.ts +4 -0
- package/dist/esm/components/Modal/styles.js +63 -0
- package/dist/esm/components/MultiCheckbox/MultiCheckbox.d.ts +15 -0
- package/dist/esm/components/MultiCheckbox/MultiCheckbox.js +23 -0
- package/dist/esm/components/MultiCheckbox/styles.d.ts +1 -0
- package/dist/esm/components/MultiCheckbox/styles.js +9 -0
- package/dist/esm/components/MultiDropdown/MultiDropdown.d.ts +28 -0
- package/dist/esm/components/MultiDropdown/MultiDropdown.js +86 -0
- package/dist/esm/components/MultiDropdown/styles.d.ts +7 -0
- package/dist/esm/components/MultiDropdown/styles.js +38 -0
- package/dist/esm/components/MultiSelection/MultiSelection.d.ts +16 -0
- package/dist/esm/components/MultiSelection/MultiSelection.js +24 -0
- package/dist/esm/components/MultiSelection/styles.d.ts +9 -0
- package/dist/esm/components/MultiSelection/styles.js +63 -0
- package/dist/esm/components/NavigationMenu/NavigationMenu.d.ts +35 -0
- package/dist/esm/components/NavigationMenu/NavigationMenu.js +40 -0
- package/dist/esm/components/NavigationMenu/styles.d.ts +81 -0
- package/dist/esm/components/NavigationMenu/styles.js +257 -0
- package/dist/esm/components/Popover/InfoPopover.d.ts +8 -0
- package/dist/esm/components/Popover/InfoPopover.js +8 -0
- package/dist/esm/components/Popover/Popover.d.ts +16 -0
- package/dist/esm/components/Popover/Popover.js +22 -0
- package/dist/esm/components/Popover/styles.d.ts +14 -0
- package/dist/esm/components/Popover/styles.js +80 -0
- package/dist/esm/components/ProgressBar/ProgressBar.d.ts +8 -0
- package/dist/esm/components/ProgressBar/ProgressBar.js +47 -0
- package/dist/esm/components/RadioGroup/RadioGroup.d.ts +16 -0
- package/dist/esm/components/RadioGroup/RadioGroup.js +19 -0
- package/dist/esm/components/RadioGroup/styles.d.ts +12 -0
- package/dist/esm/components/RadioGroup/styles.js +90 -0
- package/dist/esm/components/Separator/Separator.d.ts +11 -0
- package/dist/esm/components/Separator/Separator.js +23 -0
- package/dist/esm/components/Separator/styles.d.ts +6 -0
- package/dist/esm/components/Separator/styles.js +51 -0
- package/dist/esm/components/Slider/Slider.d.ts +12 -0
- package/dist/esm/components/Slider/Slider.js +12 -0
- package/dist/esm/components/Slider/styles.d.ts +6 -0
- package/dist/esm/components/Slider/styles.js +51 -0
- package/dist/esm/components/StarRating/StarRating.d.ts +22 -0
- package/dist/esm/components/StarRating/StarRating.js +107 -0
- package/dist/esm/components/StarRating/styles.d.ts +35 -0
- package/dist/esm/components/StarRating/styles.js +65 -0
- package/dist/esm/components/StatusMessage/StatusMessage.d.ts +4 -0
- package/dist/esm/components/StatusMessage/StatusMessage.js +74 -0
- package/dist/esm/components/Switch/Switch.d.ts +15 -0
- package/dist/esm/components/Switch/Switch.js +14 -0
- package/dist/esm/components/Switch/styles.d.ts +14 -0
- package/dist/esm/components/Switch/styles.js +63 -0
- package/dist/esm/components/Tags/Tags.d.ts +15 -0
- package/dist/esm/components/Tags/Tags.js +10 -0
- package/dist/esm/components/Tags/styles.d.ts +19 -0
- package/dist/esm/components/Tags/styles.js +80 -0
- package/dist/esm/components/Text/Text.d.ts +11 -0
- package/dist/esm/components/Text/Text.js +8 -0
- package/dist/esm/components/Text/styles.d.ts +8 -0
- package/dist/esm/components/Text/styles.js +62 -0
- package/dist/esm/components/Text/types.d.ts +8 -0
- package/dist/esm/components/Text/types.js +1 -0
- package/dist/esm/components/TextArea/TextArea.d.ts +19 -0
- package/dist/esm/components/TextArea/TextArea.js +45 -0
- package/dist/esm/components/TextArea/styles.d.ts +22 -0
- package/dist/esm/components/TextArea/styles.js +42 -0
- package/dist/esm/components/TextContent/TextContent.d.ts +28 -0
- package/dist/esm/components/TextContent/TextContent.js +40 -0
- package/dist/esm/components/TextContent/styles.d.ts +24 -0
- package/dist/esm/components/TextContent/styles.js +36 -0
- package/dist/esm/components/TextInput/TextInput.d.ts +8 -0
- package/dist/esm/components/TextInput/TextInput.js +42 -0
- package/dist/esm/components/TextInput/styles.d.ts +18 -0
- package/dist/esm/components/TextInput/styles.js +111 -0
- package/dist/esm/components/Toast/Toast.d.ts +5 -0
- package/dist/esm/components/Toast/Toast.js +54 -0
- package/dist/esm/components/Toast/styles.d.ts +27 -0
- package/dist/esm/components/Toast/styles.js +125 -0
- package/dist/esm/components/Tooltip/Tooltip.d.ts +9 -0
- package/dist/esm/components/Tooltip/Tooltip.js +16 -0
- package/dist/esm/components/Tooltip/styles.d.ts +2 -0
- package/dist/esm/components/Tooltip/styles.js +18 -0
- package/dist/esm/components/Widget/AttachmentWidget.d.ts +18 -0
- package/dist/esm/components/Widget/AttachmentWidget.js +85 -0
- package/dist/esm/components/Widget/CallWidget.d.ts +11 -0
- package/dist/esm/components/Widget/CallWidget.js +46 -0
- package/dist/esm/components/Widget/Widget.d.ts +26 -0
- package/dist/esm/components/Widget/Widget.js +46 -0
- package/dist/esm/globalStyles.d.ts +5 -0
- package/dist/esm/globalStyles.js +64 -0
- package/dist/esm/hooks/useAutosizeTextArea.d.ts +2 -0
- package/dist/esm/hooks/useAutosizeTextArea.js +12 -0
- package/dist/esm/index.d.ts +51 -0
- package/dist/esm/index.js +45 -0
- package/dist/esm/storybook/BreakpointDocumentation.d.ts +3 -0
- package/dist/esm/storybook/BreakpointDocumentation.js +101 -0
- package/dist/esm/storybook/Components.d.ts +2 -0
- package/dist/esm/storybook/Components.js +23 -0
- package/dist/esm/storybook/Documentation.d.ts +5 -0
- package/dist/esm/storybook/Documentation.js +62 -0
- package/dist/esm/storybook/RadiusDocumentation.d.ts +3 -0
- package/dist/esm/storybook/RadiusDocumentation.js +112 -0
- package/dist/esm/storybook/SpacingDocumentation.d.ts +3 -0
- package/dist/esm/storybook/SpacingDocumentation.js +108 -0
- package/dist/esm/theme/index.d.ts +17 -0
- package/dist/esm/theme/index.js +53 -0
- package/dist/esm/utils/animations.d.ts +12 -0
- package/dist/esm/utils/animations.js +117 -0
- package/dist/esm/utils/createReactSvg.d.ts +3 -0
- package/dist/esm/utils/createReactSvg.js +70 -0
- package/dist/esm/utils/parser.d.ts +12 -0
- package/dist/esm/utils/parser.js +195 -0
- package/dist/esm/utils/replaceUrlsWithAnchors.d.ts +6 -0
- package/dist/esm/utils/replaceUrlsWithAnchors.js +29 -0
- package/dist/esm/utils/status.d.ts +6 -0
- package/dist/esm/utils/status.js +49 -0
- package/dist/esm/utils/styles.d.ts +1 -0
- package/dist/esm/utils/styles.js +1 -0
- package/dist/esm/utils/types.d.ts +1 -0
- package/dist/esm/utils/types.js +1 -0
- package/jest.config.ts +30 -0
- package/package.json +98 -0
- package/src/components/Accordion/Accordion.stories.tsx +66 -0
- package/src/components/Accordion/Accordion.tsx +59 -0
- package/src/components/Accordion/styles.tsx +68 -0
- package/src/components/Button/Button.stories.tsx +119 -0
- package/src/components/Button/Button.tsx +59 -0
- package/src/components/Button/styles.tsx +313 -0
- package/src/components/Card/Card.stories.tsx +22 -0
- package/src/components/Card/Card.tsx +125 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +11 -0
- package/src/components/Checkbox/Checkbox.tsx +112 -0
- package/src/components/Checkbox/styles.tsx +96 -0
- package/src/components/CheckboxGrid/CheckboxGrid.stories.tsx +49 -0
- package/src/components/CheckboxGrid/CheckboxGrid.tsx +126 -0
- package/src/components/CheckboxGrid/styles.tsx +122 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +59 -0
- package/src/components/Dropdown/Dropdown.tsx +128 -0
- package/src/components/Dropdown/styles.tsx +120 -0
- package/src/components/Icon/Icon.stories.tsx +44 -0
- package/src/components/Icon/Icon.test.tsx +20 -0
- package/src/components/Icon/Icon.tsx +88 -0
- package/src/components/Icon/IconDocs.mdx +22 -0
- package/src/components/Icon/IconGradient.tsx +70 -0
- package/src/components/Icon/createIconComponent.tsx +63 -0
- package/src/components/Icon/getDefaultIconProps.ts +23 -0
- package/src/components/Icon/index.ts +499 -0
- package/src/components/Illustrations/Illustration.tsx +18 -0
- package/src/components/Illustrations/Illustrations.stories.tsx +53 -0
- package/src/components/Illustrations/createIllustrationComponent.tsx +39 -0
- package/src/components/Illustrations/index.ts +118 -0
- package/src/components/InputError/InputError.tsx +86 -0
- package/src/components/Label/Label.stories.tsx +18 -0
- package/src/components/Label/Label.tsx +76 -0
- package/src/components/Link/Link.stories.tsx +14 -0
- package/src/components/Link/Link.test.tsx +27 -0
- package/src/components/Link/Link.tsx +68 -0
- package/src/components/Link/styles.tsx +86 -0
- package/src/components/Loading/Loading.stories.tsx +26 -0
- package/src/components/Loading/Loading.tsx +65 -0
- package/src/components/Loading/LoadingLogo.tsx +141 -0
- package/src/components/Loading/styles.ts +95 -0
- package/src/components/Modal/Modal.stories.tsx +52 -0
- package/src/components/Modal/Modal.test.tsx +98 -0
- package/src/components/Modal/Modal.tsx +115 -0
- package/src/components/Modal/ModalDocs.mdx +21 -0
- package/src/components/Modal/styles.tsx +67 -0
- package/src/components/MultiCheckbox/MultiCheckbox.stories.tsx +24 -0
- package/src/components/MultiCheckbox/MultiCheckbox.tsx +73 -0
- package/src/components/MultiCheckbox/styles.tsx +10 -0
- package/src/components/MultiDropdown/MultiDropdown.stories.tsx +105 -0
- package/src/components/MultiDropdown/MultiDropdown.tsx +247 -0
- package/src/components/MultiDropdown/styles.tsx +45 -0
- package/src/components/MultiSelection/MultiSelection.stories.tsx +19 -0
- package/src/components/MultiSelection/MultiSelection.tsx +74 -0
- package/src/components/MultiSelection/styles.tsx +78 -0
- package/src/components/NavigationMenu/NavigationMenu.stories.tsx +108 -0
- package/src/components/NavigationMenu/NavigationMenu.tsx +151 -0
- package/src/components/NavigationMenu/styles.tsx +293 -0
- package/src/components/Popover/InfoPopover.tsx +40 -0
- package/src/components/Popover/Popover.stories.tsx +85 -0
- package/src/components/Popover/Popover.tsx +68 -0
- package/src/components/Popover/styles.tsx +109 -0
- package/src/components/ProgressBar/ProgressBar.stories.tsx +15 -0
- package/src/components/ProgressBar/ProgressBar.tsx +76 -0
- package/src/components/RadioGroup/RadioGroup.stories.tsx +42 -0
- package/src/components/RadioGroup/RadioGroup.tsx +91 -0
- package/src/components/RadioGroup/styles.tsx +100 -0
- package/src/components/Separator/Separator.stories.tsx +27 -0
- package/src/components/Separator/Separator.tsx +52 -0
- package/src/components/Separator/styles.tsx +57 -0
- package/src/components/Slider/Slider.stories.tsx +27 -0
- package/src/components/Slider/Slider.tsx +61 -0
- package/src/components/Slider/styles.tsx +57 -0
- package/src/components/StarRating/StarRating.stories.tsx +20 -0
- package/src/components/StarRating/StarRating.tsx +212 -0
- package/src/components/StarRating/styles.ts +76 -0
- package/src/components/StatusMessage/StatusMessage.stories.tsx +44 -0
- package/src/components/StatusMessage/StatusMessage.tsx +110 -0
- package/src/components/Switch/Switch.stories.tsx +12 -0
- package/src/components/Switch/Switch.tsx +83 -0
- package/src/components/Switch/styles.tsx +75 -0
- package/src/components/Tags/Tags.stories.tsx +44 -0
- package/src/components/Tags/Tags.tsx +68 -0
- package/src/components/Tags/styles.tsx +89 -0
- package/src/components/Text/Text.stories.tsx +288 -0
- package/src/components/Text/Text.tsx +58 -0
- package/src/components/Text/styles.tsx +75 -0
- package/src/components/Text/types.ts +9 -0
- package/src/components/Text/typography.mdx +91 -0
- package/src/components/TextArea/TextArea.stories.tsx +26 -0
- package/src/components/TextArea/TextArea.tsx +117 -0
- package/src/components/TextArea/styles.tsx +58 -0
- package/src/components/TextContent/TextContent.stories.tsx +54 -0
- package/src/components/TextContent/TextContent.tsx +154 -0
- package/src/components/TextContent/styles.tsx +47 -0
- package/src/components/TextInput/TextInput.stories.tsx +43 -0
- package/src/components/TextInput/TextInput.tsx +146 -0
- package/src/components/TextInput/styles.tsx +129 -0
- package/src/components/Toast/Toast.stories.tsx +55 -0
- package/src/components/Toast/Toast.tsx +139 -0
- package/src/components/Toast/styles.tsx +142 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +31 -0
- package/src/components/Tooltip/Tooltip.tsx +48 -0
- package/src/components/Tooltip/styles.tsx +20 -0
- package/src/components/Widget/AttachmentWidget.stories.tsx +14 -0
- package/src/components/Widget/AttachmentWidget.tsx +142 -0
- package/src/components/Widget/CallWidget.stories.tsx +38 -0
- package/src/components/Widget/CallWidget.tsx +114 -0
- package/src/components/Widget/Widget.stories.tsx +10 -0
- package/src/components/Widget/Widget.tsx +104 -0
- package/src/globalStyles.ts +68 -0
- package/src/hooks/useAutosizeTextArea.tsx +19 -0
- package/src/index.ts +107 -0
- package/src/setupTests.ts +8 -0
- package/src/storybook/BreakpointDocumentation.tsx +126 -0
- package/src/storybook/Components.tsx +29 -0
- package/src/storybook/Documentation.tsx +86 -0
- package/src/storybook/RadiusDocumentation.tsx +133 -0
- package/src/storybook/SpacingDocumentation.tsx +131 -0
- package/src/storybook/breakpoints.mdx +83 -0
- package/src/storybook/colors.mdx +118 -0
- package/src/storybook/radius.mdx +48 -0
- package/src/storybook/spacing.mdx +45 -0
- package/src/testUtils.tsx +49 -0
- package/src/theme/index.tsx +98 -0
- package/src/utils/animations.ts +129 -0
- package/src/utils/createReactSvg.tsx +140 -0
- package/src/utils/parser.mdx +41 -0
- package/src/utils/parser.test.tsx +542 -0
- package/src/utils/parser.tsx +333 -0
- package/src/utils/replaceUrlsWithAnchors.test.ts +42 -0
- package/src/utils/replaceUrlsWithAnchors.ts +32 -0
- package/src/utils/status.tsx +85 -0
- package/src/utils/styles.ts +1 -0
- package/src/utils/types.ts +1 -0
- package/tsconfig.json +34 -0
- package/tsconfig.test.json +16 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled, { useTheme } from 'styled-components';
|
|
4
|
+
|
|
5
|
+
import Text from '../components/Text/Text';
|
|
6
|
+
|
|
7
|
+
const Container = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: ${({ theme }) => theme.spacing.large};
|
|
11
|
+
max-width: 800px;
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const BreakpointItem = styled.div`
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: ${({ theme }) => theme.spacing.medium};
|
|
18
|
+
padding: ${({ theme }) => theme.spacing.small};
|
|
19
|
+
border: 1px solid ${({ theme }) => theme.color.border.subtle};
|
|
20
|
+
border-radius: ${({ theme }) => theme.radius.small};
|
|
21
|
+
background: ${({ theme }) => theme.color.surface.primary};
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
const BreakpointVisual = styled.div<{ $width: string }>`
|
|
25
|
+
width: ${({ $width }) => $width};
|
|
26
|
+
height: 60px;
|
|
27
|
+
background: ${({ theme }) => theme.color.surface.bold};
|
|
28
|
+
border-radius: ${({ theme }) => theme.radius.xxsmall};
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
border: 2px solid ${({ theme }) => theme.color.border.contrast};
|
|
33
|
+
position: relative;
|
|
34
|
+
min-width: 80px;
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const BreakpointInfo = styled.div`
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: ${({ theme }) => theme.spacing.xxxsmall};
|
|
41
|
+
flex: 1;
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
const BreakpointLabel = styled.div`
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
color: ${({ theme }) => theme.color.text.heading};
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
const BreakpointValue = styled.div`
|
|
50
|
+
color: ${({ theme }) => theme.color.text.secondary};
|
|
51
|
+
font-family: monospace;
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
const BreakpointDescription = styled.div`
|
|
55
|
+
color: ${({ theme }) => theme.color.text.tertiary};
|
|
56
|
+
font-size: 0.875rem;
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
const BreakpointSection = () => {
|
|
60
|
+
const theme = useTheme();
|
|
61
|
+
const breakpointTokens = [
|
|
62
|
+
{
|
|
63
|
+
key: 'xsmall',
|
|
64
|
+
value: theme.breakpoints.xsmall,
|
|
65
|
+
description: '360px - Mobile devices in portrait mode',
|
|
66
|
+
useCase: 'Small mobile screens',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
key: 'small',
|
|
70
|
+
value: theme.breakpoints.small,
|
|
71
|
+
description: '500px - Small tablets and large mobile devices',
|
|
72
|
+
useCase: 'Large mobile and small tablets',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: 'medium',
|
|
76
|
+
value: theme.breakpoints.medium,
|
|
77
|
+
description: '700px - Tablets and small laptops',
|
|
78
|
+
useCase: 'Tablets and small laptops',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: 'large',
|
|
82
|
+
value: theme.breakpoints.large,
|
|
83
|
+
description: '900px - Desktop screens and large tablets',
|
|
84
|
+
useCase: 'Desktop screens',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: 'xlarge',
|
|
88
|
+
value: theme.breakpoints.xlarge,
|
|
89
|
+
description: '1200px - Large desktop screens',
|
|
90
|
+
useCase: 'Large desktop screens',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
key: 'xxlarge',
|
|
94
|
+
value: theme.breakpoints.xxlarge,
|
|
95
|
+
description: '1600px - Extra large screens and high-resolution displays',
|
|
96
|
+
useCase: 'Extra large screens',
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<Container>
|
|
102
|
+
{breakpointTokens.map(({ key, value, description, useCase }) => (
|
|
103
|
+
<BreakpointItem key={key}>
|
|
104
|
+
<BreakpointVisual $width={value}>
|
|
105
|
+
<Text type="Body6" style={{ color: 'white', fontSize: '10px' }}>
|
|
106
|
+
{value}
|
|
107
|
+
</Text>
|
|
108
|
+
</BreakpointVisual>
|
|
109
|
+
<BreakpointInfo>
|
|
110
|
+
<BreakpointLabel>
|
|
111
|
+
<Text type="Body4">{key}</Text>
|
|
112
|
+
</BreakpointLabel>
|
|
113
|
+
<BreakpointValue>
|
|
114
|
+
<Text type="Body6">{description}</Text>
|
|
115
|
+
</BreakpointValue>
|
|
116
|
+
<BreakpointDescription>
|
|
117
|
+
<Text type="Body6">{useCase}</Text>
|
|
118
|
+
</BreakpointDescription>
|
|
119
|
+
</BreakpointInfo>
|
|
120
|
+
</BreakpointItem>
|
|
121
|
+
))}
|
|
122
|
+
</Container>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export default BreakpointSection;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
const Item = styled.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: ${({ theme }) => theme.spacing.xxxsmall};
|
|
8
|
+
margin-bottom: ${({ theme }) => theme.spacing.small};
|
|
9
|
+
color: ${({ theme }) => theme.color.text.primary};
|
|
10
|
+
|
|
11
|
+
> * {
|
|
12
|
+
margin: 0px !important;
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
const Details = styled.div`
|
|
17
|
+
font-family: 'Signika Negative', sans-serif;
|
|
18
|
+
-webkit-font-smoothing: antialiased;
|
|
19
|
+
-moz-osx-font-smoothing: grayscale;
|
|
20
|
+
margin: 0;
|
|
21
|
+
line-height: 1.5;
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export const TypographyItem = ({ item, details }: any) => (
|
|
25
|
+
<Item>
|
|
26
|
+
{item}
|
|
27
|
+
<Details>{details}</Details>
|
|
28
|
+
</Item>
|
|
29
|
+
);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
|
|
5
|
+
import Text from '../components/Text/Text';
|
|
6
|
+
import { tokensPixelated } from '@a-little-world/little-world-design-system-core';
|
|
7
|
+
|
|
8
|
+
const Container = styled.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const Panel = styled.div<{ isLight?: boolean }>`
|
|
15
|
+
background: ${({ isLight }) => (isLight ? '#FFFFFF' : '#000000')};
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: ${tokensPixelated.spacing.small};
|
|
19
|
+
align-items: ${({ isLight }) => (isLight ? 'flex-end' : 'flex-start')};
|
|
20
|
+
padding: ${({ isLight }) =>
|
|
21
|
+
isLight
|
|
22
|
+
? `${tokensPixelated.spacing.large} 0 ${tokensPixelated.spacing.large}
|
|
23
|
+
${tokensPixelated.spacing.large}`
|
|
24
|
+
: `${tokensPixelated.spacing.large} ${tokensPixelated.spacing.large}
|
|
25
|
+
${tokensPixelated.spacing.large} 0`};
|
|
26
|
+
width: 100%;
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
const Entry = styled.div<{ isLight?: boolean }>`
|
|
30
|
+
color: ${({ isLight }) => (isLight ? '#000' : '#FFF')};
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
margin-bottom: ${tokensPixelated.spacing.small};
|
|
35
|
+
gap: ${tokensPixelated.spacing.small};
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
const Example = styled.div<{ $background: string }>`
|
|
39
|
+
background: ${({ $background }) => $background};
|
|
40
|
+
width: 200px;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
height: 48px;
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
const ColorSection = ({ section }: { section: string }) => {
|
|
48
|
+
const lightSection = tokensPixelated.color.theme.light[section];
|
|
49
|
+
const darkSection = tokensPixelated.color.theme.dark[section];
|
|
50
|
+
|
|
51
|
+
// Check if sections exist
|
|
52
|
+
if (!lightSection || !darkSection) {
|
|
53
|
+
console.warn(`Color section "${section}" not found in tokens`);
|
|
54
|
+
return (
|
|
55
|
+
<Container>
|
|
56
|
+
<Text>Color section "{section}" not found</Text>
|
|
57
|
+
</Container>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const light = Object.entries(lightSection);
|
|
62
|
+
const dark = Object.entries(darkSection);
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<Container>
|
|
66
|
+
<Panel isLight>
|
|
67
|
+
{light.map(([key, value]) => (
|
|
68
|
+
<Entry key={key} isLight>
|
|
69
|
+
<Text>{key}</Text>
|
|
70
|
+
<Example $background={value as string}>{value}</Example>
|
|
71
|
+
</Entry>
|
|
72
|
+
))}
|
|
73
|
+
</Panel>
|
|
74
|
+
<Panel>
|
|
75
|
+
{dark.map(([key, value]) => (
|
|
76
|
+
<Entry key={key}>
|
|
77
|
+
<Example $background={value}>{value}</Example>
|
|
78
|
+
<Text>{key}</Text>
|
|
79
|
+
</Entry>
|
|
80
|
+
))}
|
|
81
|
+
</Panel>
|
|
82
|
+
</Container>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export default ColorSection;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled, { useTheme } from 'styled-components';
|
|
4
|
+
|
|
5
|
+
import Text from '../components/Text/Text';
|
|
6
|
+
|
|
7
|
+
const Container = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: ${({ theme }) => theme.spacing.large};
|
|
11
|
+
max-width: 800px;
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const RadiusItem = styled.div`
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: ${({ theme }) => theme.spacing.medium};
|
|
18
|
+
padding: ${({ theme }) => theme.spacing.small};
|
|
19
|
+
border: 1px solid ${({ theme }) => theme.color.border.subtle};
|
|
20
|
+
border-radius: ${({ theme }) => theme.radius.small};
|
|
21
|
+
background: ${({ theme }) => theme.color.surface.primary};
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
const RadiusVisual = styled.div<{ $radius: string }>`
|
|
25
|
+
width: 120px;
|
|
26
|
+
height: 80px;
|
|
27
|
+
background: ${({ theme }) => theme.color.surface.bold};
|
|
28
|
+
border-radius: ${({ $radius }) => $radius};
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
border: 2px solid ${({ theme }) => theme.color.border.contrast};
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
const RadiusInfo = styled.div`
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: ${({ theme }) => theme.spacing.xxxsmall};
|
|
39
|
+
flex: 1;
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
const RadiusLabel = styled.div`
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
color: ${({ theme }) => theme.color.text.heading};
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
const RadiusValue = styled.div`
|
|
48
|
+
color: ${({ theme }) => theme.color.text.secondary};
|
|
49
|
+
font-family: monospace;
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
const RadiusSection = () => {
|
|
53
|
+
const theme = useTheme();
|
|
54
|
+
const radiusTokens = [
|
|
55
|
+
{
|
|
56
|
+
key: 'xxxsmall',
|
|
57
|
+
value: theme.radius.xxxsmall,
|
|
58
|
+
description: '4px - Subtle rounding',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: 'xxsmall',
|
|
62
|
+
value: theme.radius.xxsmall,
|
|
63
|
+
description: '8px - Standard rounding',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: 'xsmall',
|
|
67
|
+
value: theme.radius.xsmall,
|
|
68
|
+
description: '12px - Comfortable rounding',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'small',
|
|
72
|
+
value: theme.radius.small,
|
|
73
|
+
description: '16px - Noticeable rounding',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
key: 'medium',
|
|
77
|
+
value: theme.radius.medium,
|
|
78
|
+
description: '20px - Prominent rounding',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: 'large',
|
|
82
|
+
value: theme.radius.large,
|
|
83
|
+
description: '24px - Generous rounding',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
key: 'xlarge',
|
|
87
|
+
value: theme.radius.xlarge,
|
|
88
|
+
description: '32px - Substantial rounding',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
key: 'xxlarge',
|
|
92
|
+
value: theme.radius.xxlarge,
|
|
93
|
+
description: '40px - Maximum rounding',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
key: 'massive',
|
|
97
|
+
value: theme.radius.massive,
|
|
98
|
+
description: '100px - Dramatic rounding',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: 'half',
|
|
102
|
+
value: theme.radius.half,
|
|
103
|
+
description: '50% - Circular elements',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
key: 'full',
|
|
107
|
+
value: theme.radius.full,
|
|
108
|
+
description: '100% - Fully rounded',
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<Container>
|
|
114
|
+
{radiusTokens.map(({ key, value, description }) => (
|
|
115
|
+
<RadiusItem key={key}>
|
|
116
|
+
<RadiusVisual $radius={value}>
|
|
117
|
+
<Text type="Body4">{value}</Text>
|
|
118
|
+
</RadiusVisual>
|
|
119
|
+
<RadiusInfo>
|
|
120
|
+
<RadiusLabel>
|
|
121
|
+
<Text type="Body4">{key}</Text>
|
|
122
|
+
</RadiusLabel>
|
|
123
|
+
<RadiusValue>
|
|
124
|
+
<Text type="Body6">{description}</Text>
|
|
125
|
+
</RadiusValue>
|
|
126
|
+
</RadiusInfo>
|
|
127
|
+
</RadiusItem>
|
|
128
|
+
))}
|
|
129
|
+
</Container>
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export default RadiusSection;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled, { useTheme } from 'styled-components';
|
|
4
|
+
|
|
5
|
+
import Text from '../components/Text/Text';
|
|
6
|
+
|
|
7
|
+
const Container = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: ${({ theme }) => theme.spacing.large};
|
|
11
|
+
max-width: 800px;
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const SpacingItem = styled.div`
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: ${({ theme }) => theme.spacing.medium};
|
|
18
|
+
padding: ${({ theme }) => theme.spacing.small};
|
|
19
|
+
border: 1px solid ${({ theme }) => theme.color.border.subtle};
|
|
20
|
+
border-radius: ${({ theme }) => theme.radius.small};
|
|
21
|
+
background: ${({ theme }) => theme.color.surface.primary};
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
const SpacingVisual = styled.div<{ $size: string }>`
|
|
25
|
+
width: 200px;
|
|
26
|
+
height: 24px;
|
|
27
|
+
background: ${({ theme }) => theme.color.surface.bold};
|
|
28
|
+
border-radius: ${({ theme }) => theme.radius.xxsmall};
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
min-width: 60px;
|
|
33
|
+
padding: ${({ $size }) => $size};
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
const SpacingInfo = styled.div`
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: ${({ theme }) => theme.spacing.xxxsmall};
|
|
40
|
+
flex: 1;
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
const SpacingLabel = styled.div`
|
|
44
|
+
font-weight: bold;
|
|
45
|
+
color: ${({ theme }) => theme.color.text.heading};
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
const SpacingValue = styled.div`
|
|
49
|
+
color: ${({ theme }) => theme.color.text.secondary};
|
|
50
|
+
font-family: monospace;
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
const SpacingSection = () => {
|
|
54
|
+
const theme = useTheme();
|
|
55
|
+
const spacingTokens = [
|
|
56
|
+
{
|
|
57
|
+
key: 'xxxxsmall',
|
|
58
|
+
value: theme.spacing.xxxxsmall,
|
|
59
|
+
description: '2px - Minimal spacing',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: 'xxxsmall',
|
|
63
|
+
value: theme.spacing.xxxsmall,
|
|
64
|
+
description: '4px - Tight spacing',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
key: 'xxsmall',
|
|
68
|
+
value: theme.spacing.xxsmall,
|
|
69
|
+
description: '8px - Standard spacing',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: 'xsmall',
|
|
73
|
+
value: theme.spacing.xsmall,
|
|
74
|
+
description: '12px - Comfortable spacing',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
key: 'small',
|
|
78
|
+
value: theme.spacing.small,
|
|
79
|
+
description: '16px - Standard section spacing',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
key: 'medium',
|
|
83
|
+
value: theme.spacing.medium,
|
|
84
|
+
description: '24px - Breathing room',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: 'large',
|
|
88
|
+
value: theme.spacing.large,
|
|
89
|
+
description: '32px - Generous spacing',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
key: 'xlarge',
|
|
93
|
+
value: theme.spacing.xlarge,
|
|
94
|
+
description: '40px - Substantial spacing',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
key: 'xxlarge',
|
|
98
|
+
value: theme.spacing.xxlarge,
|
|
99
|
+
description: '64px - Maximum spacing',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
key: 'massive',
|
|
103
|
+
value: theme.spacing.massive,
|
|
104
|
+
description: '120px - Dramatic spacing',
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<Container>
|
|
110
|
+
{spacingTokens.map(({ key, value, description }) => (
|
|
111
|
+
<SpacingItem key={key}>
|
|
112
|
+
<SpacingVisual $size={value}>
|
|
113
|
+
<Text type="Body4" style={{ color: 'white' }}>
|
|
114
|
+
{value}
|
|
115
|
+
</Text>
|
|
116
|
+
</SpacingVisual>
|
|
117
|
+
<SpacingInfo>
|
|
118
|
+
<SpacingLabel>
|
|
119
|
+
<Text type="Body4">{key}</Text>
|
|
120
|
+
</SpacingLabel>
|
|
121
|
+
<SpacingValue>
|
|
122
|
+
<Text type="Body6">{description}</Text>
|
|
123
|
+
</SpacingValue>
|
|
124
|
+
</SpacingInfo>
|
|
125
|
+
</SpacingItem>
|
|
126
|
+
))}
|
|
127
|
+
</Container>
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export default SpacingSection;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Meta, Unstyled } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import { CustomThemeProvider } from '../theme';
|
|
3
|
+
|
|
4
|
+
import BreakpointSection from './BreakpointDocumentation';
|
|
5
|
+
|
|
6
|
+
<Meta title="Foundations/Breakpoints" />
|
|
7
|
+
|
|
8
|
+
<CustomThemeProvider>
|
|
9
|
+
# Breakpoints System
|
|
10
|
+
|
|
11
|
+
The breakpoints system defines responsive design breakpoints used throughout the Little World Design System. These breakpoints ensure consistent responsive behavior across all components and layouts.
|
|
12
|
+
|
|
13
|
+
## Breakpoint Tokens
|
|
14
|
+
|
|
15
|
+
<Unstyled>
|
|
16
|
+
<BreakpointSection />
|
|
17
|
+
</Unstyled>
|
|
18
|
+
|
|
19
|
+
## Usage Guidelines
|
|
20
|
+
|
|
21
|
+
- **xsmall (360px)**: Mobile devices in portrait mode
|
|
22
|
+
- **small (500px)**: Small tablets and large mobile devices
|
|
23
|
+
- **medium (700px)**: Tablets and small laptops
|
|
24
|
+
- **large (900px)**: Desktop screens and large tablets
|
|
25
|
+
- **xlarge (1200px)**: Large desktop screens
|
|
26
|
+
- **xxlarge (1600px)**: Extra large screens and high-resolution displays
|
|
27
|
+
|
|
28
|
+
## Implementation
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
// Use breakpoints in styled-components
|
|
32
|
+
const ResponsiveContainer = styled.div`
|
|
33
|
+
padding: ${({ theme }) => theme.spacing.small};
|
|
34
|
+
|
|
35
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.medium}) {
|
|
36
|
+
padding: ${({ theme }) => theme.spacing.large};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.large}) {
|
|
40
|
+
padding: ${({ theme }) => theme.spacing.xlarge};
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Responsive Design Best Practices
|
|
46
|
+
|
|
47
|
+
1. **Mobile First**: Start with mobile styles and enhance for larger screens
|
|
48
|
+
2. **Consistent Breakpoints**: Always use the defined breakpoint tokens
|
|
49
|
+
3. **Content Priority**: Ensure important content is accessible on all screen sizes
|
|
50
|
+
4. **Touch Targets**: Maintain minimum 44px touch targets on mobile
|
|
51
|
+
5. **Performance**: Optimize images and assets for different screen densities
|
|
52
|
+
|
|
53
|
+
## Common Patterns
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
// Responsive typography
|
|
57
|
+
const ResponsiveText = styled(Text)`
|
|
58
|
+
font-size: 1rem; // Mobile default
|
|
59
|
+
|
|
60
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.medium}) {
|
|
61
|
+
font-size: 1.25rem;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.large}) {
|
|
65
|
+
font-size: 1.5rem;
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
// Responsive layout
|
|
70
|
+
const Grid = styled.div`
|
|
71
|
+
display: grid;
|
|
72
|
+
grid-template-columns: 1fr; // Single column on mobile
|
|
73
|
+
|
|
74
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.medium}) {
|
|
75
|
+
grid-template-columns: repeat(2, 1fr); // Two columns on tablet
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.large}) {
|
|
79
|
+
grid-template-columns: repeat(3, 1fr); // Three columns on desktop
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
```
|
|
83
|
+
</CustomThemeProvider>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Meta, Unstyled } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import { CustomThemeProvider } from '../theme';
|
|
3
|
+
|
|
4
|
+
import ColorSection from './Documentation';
|
|
5
|
+
|
|
6
|
+
<Meta title="Foundations/Color System" />
|
|
7
|
+
|
|
8
|
+
<CustomThemeProvider>
|
|
9
|
+
# Color System
|
|
10
|
+
|
|
11
|
+
All the colors of our app to support theming and complex UI components.
|
|
12
|
+
The color palette for the Little World Design System is defined by four overarching goals:
|
|
13
|
+
|
|
14
|
+
**Comprehensive**
|
|
15
|
+
The color system supports theming, data visualization, accent colors, and complex user interfaces.
|
|
16
|
+
|
|
17
|
+
**Accessible**
|
|
18
|
+
The color system provides sufficient contrast ratio and adheres to Web Content Accessibility Guidelines where possible.
|
|
19
|
+
|
|
20
|
+
**Consistent**
|
|
21
|
+
The color system enables a consistent appearance across varied products and platforms.
|
|
22
|
+
|
|
23
|
+
**Scalable**
|
|
24
|
+
The color system can be extended with minimal disruption to existing implementations.
|
|
25
|
+
|
|
26
|
+
The LW Design System utilises color tokens, which allows a designer or developer to understand how or when to apply our palette and the options available. They are used to bridge the gap between naming and use.
|
|
27
|
+
Color tokens are semantically named styled labels.
|
|
28
|
+
Currently we have two themes, light and dark, so each color token is assigned two color values.
|
|
29
|
+
|
|
30
|
+
After the theme value, comes the label that represents the UI element that the color is for. The next is the role of that color or it's emphasis.
|
|
31
|
+
|
|
32
|
+
## Text Colors
|
|
33
|
+
### Usage Guidelines
|
|
34
|
+
- **Primary**: Main text content
|
|
35
|
+
- **Secondary**: Supporting text and descriptions
|
|
36
|
+
- **Tertiary**: Muted text and placeholders
|
|
37
|
+
- **Quaternary**: Very subtle text
|
|
38
|
+
- **Title**: Page and section titles
|
|
39
|
+
- **Heading**: Component headings
|
|
40
|
+
- **Link**: Interactive text links
|
|
41
|
+
- **Button**: Text on button backgrounds
|
|
42
|
+
- **Control**: Form control labels
|
|
43
|
+
- **Error**: Error messages and validation
|
|
44
|
+
- **Success**: Success messages and confirmations
|
|
45
|
+
- **Accent**: Highlighted or emphasized text
|
|
46
|
+
- **Highlight**: Important or featured text
|
|
47
|
+
- **Bold**: Strong emphasis text
|
|
48
|
+
- **Disabled**: Inactive or disabled text
|
|
49
|
+
- **Reversed**: Text on dark backgrounds
|
|
50
|
+
|
|
51
|
+
<Unstyled>
|
|
52
|
+
<ColorSection section="text" />
|
|
53
|
+
</Unstyled>
|
|
54
|
+
|
|
55
|
+
## Surface Colors
|
|
56
|
+
### Usage Guidelines
|
|
57
|
+
- **Background**: Main page background
|
|
58
|
+
- **Primary**: Primary content areas
|
|
59
|
+
- **Secondary**: Secondary content areas
|
|
60
|
+
- **Tertiary**: Tertiary content areas
|
|
61
|
+
- **Quaternary**: Quaternary content areas
|
|
62
|
+
- **Contrast**: High contrast surfaces
|
|
63
|
+
- **Bold**: Prominent surfaces
|
|
64
|
+
- **Selected**: Selected or active states
|
|
65
|
+
- **Subtle**: Subtle background variations
|
|
66
|
+
- **Accent**: Accent color surfaces
|
|
67
|
+
- **Message**: Message and notification backgrounds
|
|
68
|
+
- **Indicator**: Status indicators
|
|
69
|
+
- **Highlight**: Highlighted content areas
|
|
70
|
+
- **Disabled**: Disabled or inactive surfaces
|
|
71
|
+
- **Error**: Error state backgrounds
|
|
72
|
+
- **Success**: Success state backgrounds
|
|
73
|
+
- **On**: Active or enabled states
|
|
74
|
+
|
|
75
|
+
<Unstyled>
|
|
76
|
+
<ColorSection section="surface" />
|
|
77
|
+
</Unstyled>
|
|
78
|
+
|
|
79
|
+
## Border Colors
|
|
80
|
+
### Usage Guidelines
|
|
81
|
+
- **Minimal**: Very subtle borders
|
|
82
|
+
- **Subtle**: Standard subtle borders
|
|
83
|
+
- **Moderate**: Medium strength borders
|
|
84
|
+
- **Accent**: Accent color borders
|
|
85
|
+
- **Bold**: Strong borders
|
|
86
|
+
- **Selected**: Selected state borders
|
|
87
|
+
- **Contrast**: High contrast borders
|
|
88
|
+
- **Reversed**: Borders on dark backgrounds
|
|
89
|
+
- **Error**: Error state borders
|
|
90
|
+
- **Success**: Success state borders
|
|
91
|
+
- **Disabled**: Disabled state borders
|
|
92
|
+
|
|
93
|
+
<Unstyled>
|
|
94
|
+
<ColorSection section="border" />
|
|
95
|
+
</Unstyled>
|
|
96
|
+
|
|
97
|
+
## Status Colors
|
|
98
|
+
### Usage Guidelines
|
|
99
|
+
- **Info**: Informational messages
|
|
100
|
+
- **Warning**: Warning messages
|
|
101
|
+
- **Error**: Error messages
|
|
102
|
+
- **Success**: Success messages
|
|
103
|
+
|
|
104
|
+
<Unstyled>
|
|
105
|
+
<ColorSection section="status" />
|
|
106
|
+
</Unstyled>
|
|
107
|
+
|
|
108
|
+
## Implementation
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
// Use color tokens in styled-components
|
|
112
|
+
const Card = styled.div`
|
|
113
|
+
background: ${({ theme }) => theme.color.surface.primary};
|
|
114
|
+
color: ${({ theme }) => theme.color.text.primary};
|
|
115
|
+
border: 1px solid ${({ theme }) => theme.color.border.subtle};
|
|
116
|
+
`;
|
|
117
|
+
```
|
|
118
|
+
</CustomThemeProvider>
|