@candy.thieves/ui-kit-lumos 0.0.24 → 0.0.25
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/.github/pull_request_template.md +31 -0
- package/.github/workflows/deploy-storybook.yml +19 -0
- package/.github/workflows/publish.yml +33 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +3 -0
- package/.husky/pre-push +2 -0
- package/.husky/prepare-commit-msg +9 -0
- package/.prettierignore +5 -0
- package/.prettierrc.cjs +4 -0
- package/.storybook/main.d.ts +3 -0
- package/.storybook/main.ts +26 -0
- package/.storybook/manager.ts +6 -0
- package/.storybook/preview.d.ts +6 -0
- package/.storybook/preview.tsx +28 -0
- package/.storybook/theme.ts +17 -0
- package/.stylelintrc.cjs +3 -0
- package/AGENTS.md +80 -0
- package/agent-docs/architecture.md +31 -0
- package/agent-docs/execplans.md +33 -0
- package/agent-docs/frontend.md +99 -0
- package/commitlint.config.js +63 -0
- package/eslint.config.js +101 -0
- package/index.html +13 -0
- package/package.json +14 -8
- package/pnpm-workspace.yaml +4 -0
- package/src/assets/icons/ArrowBackOutline.tsx +33 -0
- package/src/assets/icons/ArrowForwardOutline.tsx +32 -0
- package/src/assets/icons/ArrowIosBack.tsx +32 -0
- package/src/assets/icons/ArrowIosBackOutline.tsx +32 -0
- package/src/assets/icons/ArrowIosDownOutline.tsx +34 -0
- package/src/assets/icons/ArrowIosForward.tsx +32 -0
- package/src/assets/icons/ArrowIosForwardOutline.tsx +32 -0
- package/src/assets/icons/ArrowIosUp.tsx +35 -0
- package/src/assets/icons/Block.tsx +31 -0
- package/src/assets/icons/BlockOutline.tsx +37 -0
- package/src/assets/icons/Bookmark.tsx +32 -0
- package/src/assets/icons/BookmarkOutline.tsx +32 -0
- package/src/assets/icons/Brave.tsx +26 -0
- package/src/assets/icons/Calendar.tsx +32 -0
- package/src/assets/icons/CalendarOutline.tsx +32 -0
- package/src/assets/icons/CheckmarkOutline.tsx +27 -0
- package/src/assets/icons/Close.tsx +27 -0
- package/src/assets/icons/CloseOutline.tsx +27 -0
- package/src/assets/icons/ColorPaletteOutline.tsx +36 -0
- package/src/assets/icons/Copy.tsx +32 -0
- package/src/assets/icons/CopyOutline.tsx +36 -0
- package/src/assets/icons/CreditCard.tsx +32 -0
- package/src/assets/icons/CreditCardOutline.tsx +32 -0
- package/src/assets/icons/DoneAllOutline.tsx +32 -0
- package/src/assets/icons/Edit.tsx +31 -0
- package/src/assets/icons/EditOutline.tsx +31 -0
- package/src/assets/icons/Email.tsx +32 -0
- package/src/assets/icons/EmailOutline.tsx +32 -0
- package/src/assets/icons/ErrorIcon.tsx +39 -0
- package/src/assets/icons/Expand.tsx +31 -0
- package/src/assets/icons/ExpandOutline.tsx +31 -0
- package/src/assets/icons/Explorer.tsx +26 -0
- package/src/assets/icons/Eye.tsx +32 -0
- package/src/assets/icons/EyeOff.tsx +36 -0
- package/src/assets/icons/EyeOffOutline.tsx +36 -0
- package/src/assets/icons/EyeOutline.tsx +34 -0
- package/src/assets/icons/Facebook.tsx +32 -0
- package/src/assets/icons/FileIcon.tsx +36 -0
- package/src/assets/icons/FillBell.tsx +48 -0
- package/src/assets/icons/Firefox.tsx +33 -0
- package/src/assets/icons/FlagEng.tsx +33 -0
- package/src/assets/icons/FlagRus.tsx +33 -0
- package/src/assets/icons/GithubRepo.tsx +32 -0
- package/src/assets/icons/Google.tsx +45 -0
- package/src/assets/icons/Heart.tsx +32 -0
- package/src/assets/icons/HeartOutline.tsx +32 -0
- package/src/assets/icons/Home.tsx +33 -0
- package/src/assets/icons/HomeOutline.tsx +27 -0
- package/src/assets/icons/Image.tsx +32 -0
- package/src/assets/icons/ImageOutline.tsx +32 -0
- package/src/assets/icons/Layers.tsx +41 -0
- package/src/assets/icons/LayersOutline.tsx +32 -0
- package/src/assets/icons/LogOut.tsx +31 -0
- package/src/assets/icons/LogOutOutline.tsx +31 -0
- package/src/assets/icons/Maximize.tsx +32 -0
- package/src/assets/icons/MaximizeOutline.tsx +34 -0
- package/src/assets/icons/MenuOutline.tsx +31 -0
- package/src/assets/icons/MessageCircle.tsx +32 -0
- package/src/assets/icons/MessageCircleOutline.tsx +36 -0
- package/src/assets/icons/Mic.tsx +32 -0
- package/src/assets/icons/MicOutline.tsx +36 -0
- package/src/assets/icons/MicrosoftEdge.tsx +112 -0
- package/src/assets/icons/MoreHorizontal.tsx +31 -0
- package/src/assets/icons/MoreHorizontalOutline.tsx +31 -0
- package/src/assets/icons/Opera.tsx +33 -0
- package/src/assets/icons/OutlineBell.tsx +72 -0
- package/src/assets/icons/Paid.tsx +37 -0
- package/src/assets/icons/PaperPlane.tsx +32 -0
- package/src/assets/icons/PaperPlaneOutline.tsx +32 -0
- package/src/assets/icons/PauseCircle.tsx +32 -0
- package/src/assets/icons/PauseCircleOutline.tsx +34 -0
- package/src/assets/icons/Paypal.tsx +72 -0
- package/src/assets/icons/Person.tsx +29 -0
- package/src/assets/icons/PersonAdd.tsx +31 -0
- package/src/assets/icons/PersonAddOutline.tsx +31 -0
- package/src/assets/icons/PersonOutline.tsx +31 -0
- package/src/assets/icons/PersonRemove.tsx +31 -0
- package/src/assets/icons/PersonRemoveOutline.tsx +31 -0
- package/src/assets/icons/Pin.tsx +32 -0
- package/src/assets/icons/PinOutline.tsx +34 -0
- package/src/assets/icons/PlayCircle.tsx +32 -0
- package/src/assets/icons/PlayCircleOutline.tsx +32 -0
- package/src/assets/icons/PlusCircle.tsx +32 -0
- package/src/assets/icons/PlusCircleOutline.tsx +30 -0
- package/src/assets/icons/PlusSquare.tsx +32 -0
- package/src/assets/icons/PlusSquareOutline.tsx +34 -0
- package/src/assets/icons/RadioButtonChecked.tsx +32 -0
- package/src/assets/icons/RadioButtonUnchecked.tsx +30 -0
- package/src/assets/icons/RecaptchaLogo.tsx +42 -0
- package/src/assets/icons/Safari.tsx +37 -0
- package/src/assets/icons/Search.tsx +32 -0
- package/src/assets/icons/SearchOutline.tsx +32 -0
- package/src/assets/icons/Sending.tsx +28 -0
- package/src/assets/icons/Settings.tsx +32 -0
- package/src/assets/icons/SettingsOutline.tsx +34 -0
- package/src/assets/icons/Stripe.tsx +40 -0
- package/src/assets/icons/Trash.tsx +32 -0
- package/src/assets/icons/TrashOutline.tsx +32 -0
- package/src/assets/icons/TrendingUp.tsx +32 -0
- package/src/assets/icons/TrendingUpOutline.tsx +32 -0
- package/src/assets/icons/UcBrowser.tsx +78 -0
- package/src/assets/icons/Yandex.tsx +36 -0
- package/src/assets/index.ts +104 -0
- package/src/assets/logo/Logo.tsx +55 -0
- package/src/components/Alert/Alert.module.scss +61 -0
- package/src/components/Alert/Alert.tsx +79 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/AudioPlayer/AudioPlayer.module.scss +74 -0
- package/src/components/AudioPlayer/AudioPlayer.tsx +119 -0
- package/src/components/AudioPlayer/index.ts +1 -0
- package/src/components/Avatar/Avatar.module.scss +151 -0
- package/src/components/Avatar/Avatar.tsx +36 -0
- package/src/components/Avatar/AvatarBlock.tsx +43 -0
- package/src/components/Avatar/MainAvatar.tsx +65 -0
- package/src/components/Avatar/index.ts +3 -0
- package/src/components/Button/Button.module.scss +143 -0
- package/src/components/Button/Button.tsx +48 -0
- package/src/components/Button/ButtonLegacy.tsx +94 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Cards/Cards.module.scss +11 -0
- package/src/components/Cards/Cards.tsx +21 -0
- package/src/components/Cards/index.ts +1 -0
- package/src/components/Carousel/Carousel.module.scss +97 -0
- package/src/components/Carousel/Carousel.tsx +64 -0
- package/src/components/Carousel/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.module.scss +76 -0
- package/src/components/Checkbox/Checkbox.tsx +48 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/CircularProgress/CircularProgress.module.scss +33 -0
- package/src/components/CircularProgress/CircularProgress.tsx +33 -0
- package/src/components/CircularProgress/index.ts +1 -0
- package/src/components/Input/Input.module.scss +105 -0
- package/src/components/Input/Input.tsx +79 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/LinearProgress/LinearProgress.module.scss +62 -0
- package/src/components/LinearProgress/LinearProgress.tsx +49 -0
- package/src/components/LinearProgress/index.ts +1 -0
- package/src/components/Menu/Menu.module.scss +48 -0
- package/src/components/Menu/Menu.tsx +51 -0
- package/src/components/Menu/index.ts +1 -0
- package/src/components/Message/AttachmentItem.tsx +19 -0
- package/src/components/Message/Message.module.scss +123 -0
- package/src/components/Message/Message.tsx +54 -0
- package/src/components/Message/MessageStatus.tsx +19 -0
- package/src/components/Message/ReplyPreview.tsx +19 -0
- package/src/components/Message/index.ts +2 -0
- package/src/components/Message/types.ts +49 -0
- package/src/components/Modal/Modal.module.scss +118 -0
- package/src/components/Modal/Modal.tsx +82 -0
- package/src/components/Modal/index.ts +1 -0
- package/src/components/PasswordInput/PasswordInput.module.scss +13 -0
- package/src/components/PasswordInput/PasswordInput.tsx +36 -0
- package/src/components/PasswordInput/index.ts +1 -0
- package/src/components/RadioGroup/RadioGroup.module.scss +95 -0
- package/src/components/RadioGroup/RadioGroup.tsx +64 -0
- package/src/components/RadioGroup/index.ts +1 -0
- package/src/components/ReadMore/ReadMore.module.scss +8 -0
- package/src/components/ReadMore/ReadMore.tsx +49 -0
- package/src/components/ReadMore/index.ts +1 -0
- package/src/components/Recaptcha/Recaptcha.module.scss +10 -0
- package/src/components/Recaptcha/Recaptcha.tsx +58 -0
- package/src/components/Recaptcha/index.ts +1 -0
- package/src/components/Scroll/Scroll.module.scss +58 -0
- package/src/components/Scroll/Scroll.tsx +47 -0
- package/src/components/Scroll/index.ts +1 -0
- package/src/components/SearchInput/SearchInput.tsx +17 -0
- package/src/components/SearchInput/index.ts +1 -0
- package/src/components/Select/Select.module.scss +160 -0
- package/src/components/Select/Select.tsx +262 -0
- package/src/components/Select/index.ts +1 -0
- package/src/components/Sidebar/Sidebar.module.scss +100 -0
- package/src/components/Sidebar/Sidebar.tsx +74 -0
- package/src/components/Sidebar/index.ts +1 -0
- package/src/components/Slider/Slider.module.scss +64 -0
- package/src/components/Slider/Slider.tsx +26 -0
- package/src/components/Slider/index.ts +1 -0
- package/src/components/Table/Table.module.scss +23 -0
- package/src/components/Table/Table.tsx +57 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/Tabs/Tabs.module.scss +78 -0
- package/src/components/Tabs/Tabs.tsx +57 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/TextArea/TextArea.module.scss +107 -0
- package/src/components/TextArea/TextArea.tsx +57 -0
- package/src/components/TextArea/index.ts +1 -0
- package/src/components/Tooltip/Tooltip.module.scss +11 -0
- package/src/components/Tooltip/Tooltip.tsx +43 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/Typography/Typography.module.scss +29 -0
- package/src/components/Typography/Typography.tsx +135 -0
- package/src/components/Typography/index.ts +1 -0
- package/src/components/index.ts +27 -0
- package/{dist/types/components/types/index.d.ts → src/components/types/index.ts} +1 -1
- package/src/components/types/scroll.types.ts +11 -0
- package/src/constants/constants.ts +22 -0
- package/src/constants/index.ts +1 -0
- package/src/demo/TestMixins/TestMixins.module.scss +457 -0
- package/src/demo/TestMixins/TestMixins.tsx +107 -0
- package/src/demo/index.ts +1 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useScrollThumbs.ts +65 -0
- package/src/hooks/useThumbDrag.ts +90 -0
- package/src/index.ts +9 -0
- package/src/stories/Configure.mdx +183 -0
- package/src/stories/assets/icons/ArrowBackOutline.stories.ts +40 -0
- package/src/stories/assets/icons/ArrowForwardOutline.stories.ts +40 -0
- package/src/stories/assets/icons/ArrowIosBack.stories.ts +40 -0
- package/src/stories/assets/icons/ArrowIosBackOutline.stories.ts +40 -0
- package/src/stories/assets/icons/ArrowIosDownOutline.stories.ts +40 -0
- package/src/stories/assets/icons/ArrowIosForward.stories.ts +40 -0
- package/src/stories/assets/icons/ArrowIosForwardOutline.stories.ts +40 -0
- package/src/stories/assets/icons/ArrowIosUp.stories.ts +38 -0
- package/src/stories/assets/icons/Block.stories.ts +39 -0
- package/src/stories/assets/icons/BlockOutline.stories.ts +39 -0
- package/src/stories/assets/icons/Bookmark.stories.ts +39 -0
- package/src/stories/assets/icons/BookmarkOutline.stories.ts +40 -0
- package/src/stories/assets/icons/Brave.stories.ts +48 -0
- package/src/stories/assets/icons/Calendar.stories.ts +40 -0
- package/src/stories/assets/icons/CalendarOutline.stories.ts +39 -0
- package/src/stories/assets/icons/CheckmarkOutline.stories.ts +40 -0
- package/src/stories/assets/icons/Close.stories.ts +40 -0
- package/src/stories/assets/icons/CloseOutline.stories.ts +40 -0
- package/src/stories/assets/icons/ColorPaletteOutline.stories.ts +39 -0
- package/src/stories/assets/icons/Copy.stories.ts +38 -0
- package/src/stories/assets/icons/CopyOutline.stories.ts +39 -0
- package/src/stories/assets/icons/CreditCard.stories.ts +38 -0
- package/src/stories/assets/icons/CreditCardOutline.stories.ts +39 -0
- package/src/stories/assets/icons/DoneAllOutline.stories.ts +38 -0
- package/src/stories/assets/icons/Edit.stories.ts +39 -0
- package/src/stories/assets/icons/EditOutline.stories.ts +38 -0
- package/src/stories/assets/icons/Email.stories.ts +39 -0
- package/src/stories/assets/icons/EmailOutline.stories.ts +38 -0
- package/src/stories/assets/icons/ErrorIcon.stories.ts +40 -0
- package/src/stories/assets/icons/Expand.stories.ts +39 -0
- package/src/stories/assets/icons/ExpandOutline.stories.ts +38 -0
- package/src/stories/assets/icons/Explorer.stories.ts +47 -0
- package/src/stories/assets/icons/Eye.stories.ts +39 -0
- package/src/stories/assets/icons/EyeOff.stories.ts +38 -0
- package/src/stories/assets/icons/EyeOffOutline.stories.ts +39 -0
- package/src/stories/assets/icons/EyeOutline.stories.ts +38 -0
- package/src/stories/assets/icons/Facebook.stories.ts +37 -0
- package/src/stories/assets/icons/FileIcon.stories.ts +40 -0
- package/src/stories/assets/icons/FillBell.stories.ts +40 -0
- package/src/stories/assets/icons/Firefox.stories.ts +48 -0
- package/src/stories/assets/icons/FlagEng.stories.ts +37 -0
- package/src/stories/assets/icons/FlagRus.stories.ts +37 -0
- package/src/stories/assets/icons/GithubRepo.stories.ts +38 -0
- package/src/stories/assets/icons/Google.stories.ts +38 -0
- package/src/stories/assets/icons/Heart.stories.ts +39 -0
- package/src/stories/assets/icons/HeartOutline.stories.ts +38 -0
- package/src/stories/assets/icons/Home.stories.ts +40 -0
- package/src/stories/assets/icons/HomeOutline.stories.ts +40 -0
- package/src/stories/assets/icons/Icon.module.scss +4 -0
- package/src/stories/assets/icons/ImageIcon.stories.ts +39 -0
- package/src/stories/assets/icons/ImageOutline.stories.ts +38 -0
- package/src/stories/assets/icons/Layers.stories.ts +39 -0
- package/src/stories/assets/icons/LayersOutline.stories.ts +38 -0
- package/src/stories/assets/icons/LogOut.stories.ts +40 -0
- package/src/stories/assets/icons/LogOutOutline.stories.ts +40 -0
- package/src/stories/assets/icons/Maximize.stories.ts +39 -0
- package/src/stories/assets/icons/MaximizeOutline.stories.ts +39 -0
- package/src/stories/assets/icons/MenuOutline.stories.ts +39 -0
- package/src/stories/assets/icons/MessageCircle.stories.ts +38 -0
- package/src/stories/assets/icons/MessageCircleOutline.stories.ts +39 -0
- package/src/stories/assets/icons/Mic.stories.ts +38 -0
- package/src/stories/assets/icons/MicOutline.stories.ts +39 -0
- package/src/stories/assets/icons/MicrosoftEdge.stories.ts +47 -0
- package/src/stories/assets/icons/MoreHorizontal.stories.ts +40 -0
- package/src/stories/assets/icons/MoreHorizontalOutline.stories.ts +38 -0
- package/src/stories/assets/icons/Opera.stories.ts +47 -0
- package/src/stories/assets/icons/OutlineBell.stories.ts +58 -0
- package/src/stories/assets/icons/Paid.stories.ts +38 -0
- package/src/stories/assets/icons/PaperPlane.stories.ts +40 -0
- package/src/stories/assets/icons/PaperPlaneOutline.stories.ts +38 -0
- package/src/stories/assets/icons/PauseCircle.stories.ts +39 -0
- package/src/stories/assets/icons/PauseCircleOutline.stories.ts +38 -0
- package/src/stories/assets/icons/Paypal.stories.ts +16 -0
- package/src/stories/assets/icons/Person.stories.ts +39 -0
- package/src/stories/assets/icons/PersonAdd.stories.ts +38 -0
- package/src/stories/assets/icons/PersonAddOutline.stories.ts +39 -0
- package/src/stories/assets/icons/PersonOutline.stories.ts +39 -0
- package/src/stories/assets/icons/PersonRemove.stories.ts +38 -0
- package/src/stories/assets/icons/PersonRemoveOutline.stories.ts +39 -0
- package/src/stories/assets/icons/Pin.stories.ts +38 -0
- package/src/stories/assets/icons/PinOutline.stories.ts +39 -0
- package/src/stories/assets/icons/PlayCircle.stories.ts +38 -0
- package/src/stories/assets/icons/PlayCircleOutline.stories.ts +39 -0
- package/src/stories/assets/icons/PlusCircle.stories.ts +38 -0
- package/src/stories/assets/icons/PlusCircleOutline.stories.ts +39 -0
- package/src/stories/assets/icons/PlusSquare.stories.ts +38 -0
- package/src/stories/assets/icons/PlusSquareOutline.stories.ts +39 -0
- package/src/stories/assets/icons/RadioButtonChecked.stories.ts +38 -0
- package/src/stories/assets/icons/RadioButtonUnchecked.stories.ts +39 -0
- package/src/stories/assets/icons/RecaptchaLogo.stories.ts +36 -0
- package/src/stories/assets/icons/Safari.stories.ts +47 -0
- package/src/stories/assets/icons/Search.stories.ts +39 -0
- package/src/stories/assets/icons/SearchOutline.stories.ts +40 -0
- package/src/stories/assets/icons/Sending.stories.ts +40 -0
- package/src/stories/assets/icons/Settings.stories.ts +39 -0
- package/src/stories/assets/icons/SettingsOutline.stories.ts +40 -0
- package/src/stories/assets/icons/Stripe.stories.ts +38 -0
- package/src/stories/assets/icons/Trash.stories.ts +39 -0
- package/src/stories/assets/icons/TrashOutline.stories.ts +38 -0
- package/src/stories/assets/icons/TrendingUp.stories.ts +39 -0
- package/src/stories/assets/icons/TrendingUpOutline.stories.ts +38 -0
- package/src/stories/assets/icons/UcBrowser.stories.ts +48 -0
- package/src/stories/assets/icons/Yandex.stories.ts +47 -0
- package/src/stories/assets/logo/Logo.stories.ts +22 -0
- package/src/stories/components/Alert/Alert.stories.tsx +94 -0
- package/src/stories/components/Avatar/Avatar.stories.tsx +151 -0
- package/src/stories/components/Avatar/AvatarBlock.stories.tsx +301 -0
- package/src/stories/components/Avatar/MainAvatar.stories.tsx +200 -0
- package/src/stories/components/Button/Button.stories.tsx +99 -0
- package/src/stories/components/Button/ButtonLegacy.stories.tsx +99 -0
- package/src/stories/components/Cards/Cards.stories.tsx +185 -0
- package/src/stories/components/Carousel/Carousel.stories.tsx +89 -0
- package/src/stories/components/Carousel/CarouselWrapper.module.scss +7 -0
- package/src/stories/components/CheckBox/CheckBox.stories.tsx +92 -0
- package/src/stories/components/CircularProgress/CircularProgress.stories.tsx +66 -0
- package/src/stories/components/Input/Input.stories.tsx +88 -0
- package/src/stories/components/LinearProgress/LinearProgress.stories.tsx +137 -0
- package/src/stories/components/Menu/Menu.stories.tsx +100 -0
- package/src/stories/components/Message/Message.stories.tsx +311 -0
- package/src/stories/components/Modal/Modal.stories.module.scss +157 -0
- package/src/stories/components/Modal/Modal.stories.tsx +514 -0
- package/src/stories/components/PasswordInput/PasswordInput.stories.tsx +71 -0
- package/src/stories/components/RadioGroup/RadioGroup.stories.tsx +141 -0
- package/src/stories/components/ReadMore/ReadMore.stories.tsx +42 -0
- package/src/stories/components/Recaptcha/Recaptcha.stories.tsx +29 -0
- package/src/stories/components/Scroll/Scroll.stories.tsx +128 -0
- package/src/stories/components/SearchInput/SearchInput.stories.tsx +76 -0
- package/src/stories/components/Select/Select.stories.module.scss +6 -0
- package/src/stories/components/Select/Select.stories.tsx +147 -0
- package/src/stories/components/Sidebar/Sidebar.stories.tsx +126 -0
- package/src/stories/components/Slider/Slider.stories.tsx +58 -0
- package/src/stories/components/Table/Table.stories.tsx +108 -0
- package/src/stories/components/Tabs/Tabs.stories.tsx +75 -0
- package/src/stories/components/TestMixins/TestMixins.stories.tsx +16 -0
- package/src/stories/components/TextArea/TextArea.stories.tsx +100 -0
- package/src/stories/components/Tooltip/Tooltip.stories.tsx +54 -0
- package/src/stories/components/Typography/Typography.stories.tsx +314 -0
- package/src/stories/constants.ts +45 -0
- package/src/stories/palette/ColorPalette.module.scss +61 -0
- package/src/stories/palette/ColorPalette.stories.tsx +76 -0
- package/src/storybook-utils/assets/coloredIconMeta.ts +31 -0
- package/src/storybook-utils/assets/iconMeta.ts +40 -0
- package/src/storybook-utils/assets/logoMeta.ts +33 -0
- package/src/storybook-utils/components/ButtonMeta.ts +33 -0
- package/src/storybook-utils/index.ts +4 -0
- package/src/styles/_boilerplate.scss +37 -0
- package/src/styles/_colors.scss +46 -0
- package/src/styles/_mixins.scss +154 -0
- package/src/styles/_typography.scss +152 -0
- package/src/styles/index.scss +4 -0
- package/src/types/index.ts +1 -0
- package/src/types/types.ts +5 -0
- package/src/utils/ColorIconBase.tsx +26 -0
- package/src/utils/ColorIconBaseSmall.tsx +30 -0
- package/src/utils/IconBase.tsx +43 -0
- package/src/utils/formatTime.ts +6 -0
- package/src/utils/getFirstLetterCapitalized.ts +2 -0
- package/src/utils/getHorizontalMetrics.ts +12 -0
- package/src/utils/getNavItemClickHandler.ts +17 -0
- package/src/utils/getVerticalMetrics.ts +12 -0
- package/src/utils/index.ts +8 -0
- package/src/utils/isAudioAttachment.ts +7 -0
- package/src/utils/isThemeColor.ts +4 -0
- package/src/utils/truncateText.ts +15 -0
- package/tsconfig.app.json +32 -0
- package/tsconfig.build.json +16 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +23 -0
- package/vite-env.d.ts +20 -0
- package/vite.config.ts +67 -0
- package/vitest.shims.d.ts +1 -0
- package/dist/index.css +0 -2
- package/dist/index.js +0 -5614
- package/dist/index.js.map +0 -1
- package/dist/types/assets/icons/ArrowBackOutline.d.ts +0 -3
- package/dist/types/assets/icons/ArrowForwardOutline.d.ts +0 -3
- package/dist/types/assets/icons/ArrowIosBack.d.ts +0 -3
- package/dist/types/assets/icons/ArrowIosBackOutline.d.ts +0 -3
- package/dist/types/assets/icons/ArrowIosDownOutline.d.ts +0 -3
- package/dist/types/assets/icons/ArrowIosForward.d.ts +0 -3
- package/dist/types/assets/icons/ArrowIosForwardOutline.d.ts +0 -3
- package/dist/types/assets/icons/ArrowIosUp.d.ts +0 -3
- package/dist/types/assets/icons/Block.d.ts +0 -3
- package/dist/types/assets/icons/BlockOutline.d.ts +0 -3
- package/dist/types/assets/icons/Bookmark.d.ts +0 -3
- package/dist/types/assets/icons/BookmarkOutline.d.ts +0 -3
- package/dist/types/assets/icons/Brave.d.ts +0 -3
- package/dist/types/assets/icons/Calendar.d.ts +0 -3
- package/dist/types/assets/icons/CalendarOutline.d.ts +0 -3
- package/dist/types/assets/icons/CheckmarkOutline.d.ts +0 -3
- package/dist/types/assets/icons/Close.d.ts +0 -3
- package/dist/types/assets/icons/CloseOutline.d.ts +0 -3
- package/dist/types/assets/icons/ColorPaletteOutline.d.ts +0 -3
- package/dist/types/assets/icons/Copy.d.ts +0 -3
- package/dist/types/assets/icons/CopyOutline.d.ts +0 -3
- package/dist/types/assets/icons/CreditCard.d.ts +0 -3
- package/dist/types/assets/icons/CreditCardOutline.d.ts +0 -3
- package/dist/types/assets/icons/DoneAllOutline.d.ts +0 -3
- package/dist/types/assets/icons/Edit.d.ts +0 -3
- package/dist/types/assets/icons/EditOutline.d.ts +0 -3
- package/dist/types/assets/icons/Email.d.ts +0 -3
- package/dist/types/assets/icons/EmailOutline.d.ts +0 -3
- package/dist/types/assets/icons/ErrorIcon.d.ts +0 -3
- package/dist/types/assets/icons/Expand.d.ts +0 -3
- package/dist/types/assets/icons/ExpandOutline.d.ts +0 -3
- package/dist/types/assets/icons/Explorer.d.ts +0 -3
- package/dist/types/assets/icons/Eye.d.ts +0 -3
- package/dist/types/assets/icons/EyeOff.d.ts +0 -3
- package/dist/types/assets/icons/EyeOffOutline.d.ts +0 -3
- package/dist/types/assets/icons/EyeOutline.d.ts +0 -3
- package/dist/types/assets/icons/Facebook.d.ts +0 -3
- package/dist/types/assets/icons/FileIcon.d.ts +0 -3
- package/dist/types/assets/icons/FillBell.d.ts +0 -3
- package/dist/types/assets/icons/Firefox.d.ts +0 -3
- package/dist/types/assets/icons/FlagEng.d.ts +0 -3
- package/dist/types/assets/icons/FlagRus.d.ts +0 -3
- package/dist/types/assets/icons/GithubRepo.d.ts +0 -3
- package/dist/types/assets/icons/Google.d.ts +0 -3
- package/dist/types/assets/icons/Heart.d.ts +0 -3
- package/dist/types/assets/icons/HeartOutline.d.ts +0 -3
- package/dist/types/assets/icons/Home.d.ts +0 -3
- package/dist/types/assets/icons/HomeOutline.d.ts +0 -3
- package/dist/types/assets/icons/Image.d.ts +0 -3
- package/dist/types/assets/icons/ImageOutline.d.ts +0 -3
- package/dist/types/assets/icons/Layers.d.ts +0 -3
- package/dist/types/assets/icons/LayersOutline.d.ts +0 -3
- package/dist/types/assets/icons/LogOut.d.ts +0 -3
- package/dist/types/assets/icons/LogOutOutline.d.ts +0 -3
- package/dist/types/assets/icons/Maximize.d.ts +0 -3
- package/dist/types/assets/icons/MaximizeOutline.d.ts +0 -3
- package/dist/types/assets/icons/MenuOutline.d.ts +0 -3
- package/dist/types/assets/icons/MessageCircle.d.ts +0 -3
- package/dist/types/assets/icons/MessageCircleOutline.d.ts +0 -3
- package/dist/types/assets/icons/Mic.d.ts +0 -3
- package/dist/types/assets/icons/MicOutline.d.ts +0 -3
- package/dist/types/assets/icons/MicrosoftEdge.d.ts +0 -3
- package/dist/types/assets/icons/MoreHorizontal.d.ts +0 -3
- package/dist/types/assets/icons/MoreHorizontalOutline.d.ts +0 -3
- package/dist/types/assets/icons/Opera.d.ts +0 -3
- package/dist/types/assets/icons/OutlineBell.d.ts +0 -8
- package/dist/types/assets/icons/Paid.d.ts +0 -3
- package/dist/types/assets/icons/PaperPlane.d.ts +0 -3
- package/dist/types/assets/icons/PaperPlaneOutline.d.ts +0 -3
- package/dist/types/assets/icons/PauseCircle.d.ts +0 -3
- package/dist/types/assets/icons/PauseCircleOutline.d.ts +0 -3
- package/dist/types/assets/icons/Paypal.d.ts +0 -3
- package/dist/types/assets/icons/Person.d.ts +0 -3
- package/dist/types/assets/icons/PersonAdd.d.ts +0 -3
- package/dist/types/assets/icons/PersonAddOutline.d.ts +0 -3
- package/dist/types/assets/icons/PersonOutline.d.ts +0 -3
- package/dist/types/assets/icons/PersonRemove.d.ts +0 -3
- package/dist/types/assets/icons/PersonRemoveOutline.d.ts +0 -3
- package/dist/types/assets/icons/Pin.d.ts +0 -3
- package/dist/types/assets/icons/PinOutline.d.ts +0 -3
- package/dist/types/assets/icons/PlayCircle.d.ts +0 -3
- package/dist/types/assets/icons/PlayCircleOutline.d.ts +0 -3
- package/dist/types/assets/icons/PlusCircle.d.ts +0 -3
- package/dist/types/assets/icons/PlusCircleOutline.d.ts +0 -3
- package/dist/types/assets/icons/PlusSquare.d.ts +0 -3
- package/dist/types/assets/icons/PlusSquareOutline.d.ts +0 -3
- package/dist/types/assets/icons/RadioButtonChecked.d.ts +0 -3
- package/dist/types/assets/icons/RadioButtonUnchecked.d.ts +0 -3
- package/dist/types/assets/icons/RecaptchaLogo.d.ts +0 -3
- package/dist/types/assets/icons/Safari.d.ts +0 -3
- package/dist/types/assets/icons/Search.d.ts +0 -3
- package/dist/types/assets/icons/SearchOutline.d.ts +0 -3
- package/dist/types/assets/icons/Sending.d.ts +0 -3
- package/dist/types/assets/icons/Settings.d.ts +0 -3
- package/dist/types/assets/icons/SettingsOutline.d.ts +0 -3
- package/dist/types/assets/icons/Stripe.d.ts +0 -3
- package/dist/types/assets/icons/Trash.d.ts +0 -3
- package/dist/types/assets/icons/TrashOutline.d.ts +0 -3
- package/dist/types/assets/icons/TrendingUp.d.ts +0 -3
- package/dist/types/assets/icons/TrendingUpOutline.d.ts +0 -3
- package/dist/types/assets/icons/UcBrowser.d.ts +0 -3
- package/dist/types/assets/icons/Yandex.d.ts +0 -3
- package/dist/types/assets/index.d.ts +0 -103
- package/dist/types/assets/logo/Logo.d.ts +0 -10
- package/dist/types/components/Alert/Alert.d.ts +0 -14
- package/dist/types/components/Alert/index.d.ts +0 -1
- package/dist/types/components/AudioPlayer/AudioPlayer.d.ts +0 -6
- package/dist/types/components/AudioPlayer/index.d.ts +0 -1
- package/dist/types/components/Avatar/Avatar.d.ts +0 -17
- package/dist/types/components/Avatar/AvatarBlock.d.ts +0 -15
- package/dist/types/components/Avatar/MainAvatar.d.ts +0 -20
- package/dist/types/components/Avatar/index.d.ts +0 -3
- package/dist/types/components/Button/Button.d.ts +0 -19
- package/dist/types/components/Button/ButtonLegacy.d.ts +0 -41
- package/dist/types/components/Button/index.d.ts +0 -2
- package/dist/types/components/Cards/Cards.d.ts +0 -7
- package/dist/types/components/Cards/index.d.ts +0 -1
- package/dist/types/components/Carousel/Carousel.d.ts +0 -5
- package/dist/types/components/Carousel/index.d.ts +0 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +0 -10
- package/dist/types/components/Checkbox/index.d.ts +0 -1
- package/dist/types/components/CircularProgress/CircularProgress.d.ts +0 -10
- package/dist/types/components/CircularProgress/index.d.ts +0 -1
- package/dist/types/components/Input/Input.d.ts +0 -13
- package/dist/types/components/Input/index.d.ts +0 -1
- package/dist/types/components/LinearProgress/LinearProgress.d.ts +0 -14
- package/dist/types/components/LinearProgress/index.d.ts +0 -1
- package/dist/types/components/Menu/Menu.d.ts +0 -14
- package/dist/types/components/Menu/index.d.ts +0 -1
- package/dist/types/components/Message/AttachmentItem.d.ts +0 -2
- package/dist/types/components/Message/Message.d.ts +0 -2
- package/dist/types/components/Message/MessageStatus.d.ts +0 -2
- package/dist/types/components/Message/ReplyPreview.d.ts +0 -2
- package/dist/types/components/Message/index.d.ts +0 -2
- package/dist/types/components/Message/types.d.ts +0 -40
- package/dist/types/components/Modal/Modal.d.ts +0 -25
- package/dist/types/components/Modal/index.d.ts +0 -1
- package/dist/types/components/PasswordInput/PasswordInput.d.ts +0 -6
- package/dist/types/components/PasswordInput/index.d.ts +0 -1
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +0 -15
- package/dist/types/components/RadioGroup/index.d.ts +0 -1
- package/dist/types/components/ReadMore/ReadMore.d.ts +0 -8
- package/dist/types/components/ReadMore/index.d.ts +0 -1
- package/dist/types/components/Recaptcha/Recaptcha.d.ts +0 -12
- package/dist/types/components/Recaptcha/index.d.ts +0 -1
- package/dist/types/components/Scroll/Scroll.d.ts +0 -6
- package/dist/types/components/Scroll/index.d.ts +0 -1
- package/dist/types/components/SearchInput/SearchInput.d.ts +0 -3
- package/dist/types/components/SearchInput/index.d.ts +0 -1
- package/dist/types/components/Select/Select.d.ts +0 -66
- package/dist/types/components/Select/index.d.ts +0 -1
- package/dist/types/components/Sidebar/Sidebar.d.ts +0 -18
- package/dist/types/components/Sidebar/index.d.ts +0 -1
- package/dist/types/components/Slider/Slider.d.ts +0 -4
- package/dist/types/components/Slider/index.d.ts +0 -1
- package/dist/types/components/Table/Table.d.ts +0 -6
- package/dist/types/components/Table/index.d.ts +0 -1
- package/dist/types/components/Tabs/Tabs.d.ts +0 -18
- package/dist/types/components/Tabs/index.d.ts +0 -1
- package/dist/types/components/TextArea/TextArea.d.ts +0 -11
- package/dist/types/components/TextArea/index.d.ts +0 -1
- package/dist/types/components/Tooltip/Tooltip.d.ts +0 -12
- package/dist/types/components/Tooltip/index.d.ts +0 -1
- package/dist/types/components/Typography/Typography.d.ts +0 -25
- package/dist/types/components/Typography/index.d.ts +0 -1
- package/dist/types/components/index.d.ts +0 -27
- package/dist/types/components/types/scroll.types.d.ts +0 -10
- package/dist/types/constants/constants.d.ts +0 -7
- package/dist/types/constants/index.d.ts +0 -1
- package/dist/types/demo/TestMixins/TestMixins.d.ts +0 -1
- package/dist/types/demo/index.d.ts +0 -1
- package/dist/types/hooks/index.d.ts +0 -2
- package/dist/types/hooks/useScrollThumbs.d.ts +0 -9
- package/dist/types/hooks/useThumbDrag.d.ts +0 -9
- package/dist/types/index.d.ts +0 -8
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/types/types.d.ts +0 -5
- package/dist/types/utils/ColorIconBase.d.ts +0 -7
- package/dist/types/utils/ColorIconBaseSmall.d.ts +0 -7
- package/dist/types/utils/IconBase.d.ts +0 -12
- package/dist/types/utils/formatTime.d.ts +0 -1
- package/dist/types/utils/getFirstLetterCapitalized.d.ts +0 -1
- package/dist/types/utils/getHorizontalMetrics.d.ts +0 -2
- package/dist/types/utils/getNavItemClickHandler.d.ts +0 -5
- package/dist/types/utils/getVerticalMetrics.d.ts +0 -2
- package/dist/types/utils/index.d.ts +0 -8
- package/dist/types/utils/isAudioAttachment.d.ts +0 -2
- package/dist/types/utils/isThemeColor.d.ts +0 -2
- package/dist/types/utils/truncateText.d.ts +0 -1
- /package/{dist → public}/favicon-dark-108.svg +0 -0
- /package/{dist → public}/favicon-dark-16.svg +0 -0
- /package/{dist → public}/favicon-dark-24.svg +0 -0
- /package/{dist → public}/favicon-dark-48.svg +0 -0
- /package/{dist → public}/favicon-dark-72.svg +0 -0
- /package/{dist → public}/favicon-light-108.svg +0 -0
- /package/{dist → public}/favicon-light-16.svg +0 -0
- /package/{dist → public}/favicon-light-24.svg +0 -0
- /package/{dist → public}/favicon-light-48.svg +0 -0
- /package/{dist → public}/favicon-light-72.svg +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
// accent
|
|
3
|
+
--color-accent-100: #73a5ff;
|
|
4
|
+
--color-accent-300: #4c8dff;
|
|
5
|
+
--color-accent-500: #397df6;
|
|
6
|
+
--color-accent-700: #2f68cc;
|
|
7
|
+
--color-accent-900: #234e99;
|
|
8
|
+
|
|
9
|
+
// success
|
|
10
|
+
--color-success-100: #80ffbf;
|
|
11
|
+
--color-success-300: #22e584;
|
|
12
|
+
--color-success-500: #14cc70;
|
|
13
|
+
--color-success-700: #0f9954;
|
|
14
|
+
--color-success-900: #0a6638;
|
|
15
|
+
|
|
16
|
+
// danger
|
|
17
|
+
--color-danger-100: #ff8099;
|
|
18
|
+
--color-danger-300: #f23d61;
|
|
19
|
+
--color-danger-500: #cc1439;
|
|
20
|
+
--color-danger-700: #990f2b;
|
|
21
|
+
--color-danger-900: #660a1d;
|
|
22
|
+
|
|
23
|
+
// warning
|
|
24
|
+
--color-warning-100: #ffd073;
|
|
25
|
+
--color-warning-300: #e5ac39;
|
|
26
|
+
--color-warning-500: #d99000;
|
|
27
|
+
--color-warning-700: #960;
|
|
28
|
+
--color-warning-900: #640;
|
|
29
|
+
|
|
30
|
+
// dark
|
|
31
|
+
--color-dark-100: #4c4c4c;
|
|
32
|
+
--color-dark-300: #333;
|
|
33
|
+
--color-dark-500: #171717;
|
|
34
|
+
--color-dark-700: #0d0d0d;
|
|
35
|
+
--color-dark-900: #000;
|
|
36
|
+
--color-secondary-active: #212121; // Used but is not in UI Palette
|
|
37
|
+
|
|
38
|
+
// light
|
|
39
|
+
--color-light-50: #fffefe;
|
|
40
|
+
--color-light-100: #fff;
|
|
41
|
+
--color-light-300: #f7fbff;
|
|
42
|
+
--color-light-500: #edf3fa;
|
|
43
|
+
--color-light-700: #d5dae0;
|
|
44
|
+
--color-light-900: #8d9094;
|
|
45
|
+
--color-neutral-dark-100: #d9d7d8; // Used but is not in UI Palette
|
|
46
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
|
|
3
|
+
$desktop-width: 1280px;
|
|
4
|
+
$tablet-width: 768px;
|
|
5
|
+
$mobile-width: 360px;
|
|
6
|
+
$container-width: 1156px;
|
|
7
|
+
$content-width: 972px;
|
|
8
|
+
$modal-width-xs: 366px;
|
|
9
|
+
$modal-width-s: 378px;
|
|
10
|
+
$modal-width-m: 492px;
|
|
11
|
+
$modal-width-l: 644px;
|
|
12
|
+
$modal-width-xl: 972px;
|
|
13
|
+
$container-padding-tablet: 30px;
|
|
14
|
+
$container-padding-mobile: 15px;
|
|
15
|
+
$container-carousel: 490px;
|
|
16
|
+
|
|
17
|
+
@mixin flex($display, $justify-content: none, $align-items: none) {
|
|
18
|
+
display: $display;
|
|
19
|
+
align-items: $align-items;
|
|
20
|
+
justify-content: $justify-content;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@mixin width-height($width, $height: $width) {
|
|
24
|
+
width: $width;
|
|
25
|
+
height: $height;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin top-left($top: none, $left: $top) {
|
|
29
|
+
top: $top;
|
|
30
|
+
left: $left;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@mixin top-right($top: none, $right: $top) {
|
|
34
|
+
top: $top;
|
|
35
|
+
right: $right;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* This mixin is for vendor prefixes.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* // Basic usage with multiple prefixes
|
|
43
|
+
* .element {
|
|
44
|
+
* @include prefix(transform, rotate(45deg), (webkit, moz, ms));
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* // Output:
|
|
48
|
+
* // .element {
|
|
49
|
+
* // -webkit-transform: rotate(45deg);
|
|
50
|
+
* // -moz-transform: rotate(45deg);
|
|
51
|
+
* // -ms-transform: rotate(45deg);
|
|
52
|
+
* // transform: rotate(45deg);
|
|
53
|
+
* // }
|
|
54
|
+
*/
|
|
55
|
+
@mixin prefix($property, $value, $prefixes: ()) {
|
|
56
|
+
@each $prefix in $prefixes {
|
|
57
|
+
#{'-' + $prefix + '-' + $property}: $value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#{$property}: $value;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@mixin transition-basic($properties...) {
|
|
64
|
+
$transitions: ();
|
|
65
|
+
|
|
66
|
+
@each $property in $properties {
|
|
67
|
+
$transitions: list.append(
|
|
68
|
+
$transitions,
|
|
69
|
+
$property var(--transition-duration-basic) var(--transition-function-basic),
|
|
70
|
+
comma
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
transition: $transitions;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@mixin media-desktop {
|
|
78
|
+
@media (max-width: $desktop-width) {
|
|
79
|
+
@content;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@mixin media-tablet {
|
|
84
|
+
@media (max-width: $tablet-width) {
|
|
85
|
+
@content;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@mixin media-mobile {
|
|
90
|
+
@media (max-width: $mobile-width) {
|
|
91
|
+
@content;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@mixin no-hover-mobile {
|
|
96
|
+
@media (hover: none) and (pointer: coarse) {
|
|
97
|
+
@content;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Creates a responsive container with centered content and responsive padding.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* // Basic usage:
|
|
106
|
+
* .container {
|
|
107
|
+
* @include container;
|
|
108
|
+
* }
|
|
109
|
+
*
|
|
110
|
+
* // Output:
|
|
111
|
+
* // .container {
|
|
112
|
+
* // max-width: 1156px;
|
|
113
|
+
* // margin: 0 auto;
|
|
114
|
+
* // }
|
|
115
|
+
* // @media (max-width: 768px) {
|
|
116
|
+
* // .container {
|
|
117
|
+
* // padding: 0 30px;
|
|
118
|
+
* // }
|
|
119
|
+
* // }
|
|
120
|
+
* // @media (max-width: 360px) {
|
|
121
|
+
* // .container {
|
|
122
|
+
* // padding: 0 15px;
|
|
123
|
+
* // }
|
|
124
|
+
* // }
|
|
125
|
+
*/
|
|
126
|
+
@mixin container($max-width: $container-width) {
|
|
127
|
+
max-width: $max-width;
|
|
128
|
+
margin: 0 auto;
|
|
129
|
+
|
|
130
|
+
@include media-tablet {
|
|
131
|
+
padding: 0 $container-padding-tablet;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@include media-mobile {
|
|
135
|
+
padding: 0 $container-padding-mobile;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Creates a responsive centered wrapper for content with a max-width.
|
|
141
|
+
*
|
|
142
|
+
* @mixin content
|
|
143
|
+
* @param {number} $max-width [$content-width] - The maximum width of the content
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* // Basic usage:
|
|
147
|
+
* article {
|
|
148
|
+
* @include container;
|
|
149
|
+
* }
|
|
150
|
+
*/
|
|
151
|
+
@mixin content($max-width: $content-width) {
|
|
152
|
+
max-width: $max-width;
|
|
153
|
+
margin: 0 auto;
|
|
154
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--font-family-primary: 'Inter Variable', sans-serif;
|
|
3
|
+
--font-family-secondary: 'Roboto Variable', sans-serif;
|
|
4
|
+
|
|
5
|
+
// line heights
|
|
6
|
+
--line-height-3xs: 112%;
|
|
7
|
+
--line-height-xxs: 116%;
|
|
8
|
+
--line-height-xs: 133%;
|
|
9
|
+
--line-height-s: 138%;
|
|
10
|
+
--line-height-m: 150%;
|
|
11
|
+
--line-height-l: 171%;
|
|
12
|
+
--line-height-xl: 180%;
|
|
13
|
+
|
|
14
|
+
// font sizes
|
|
15
|
+
--font-size-4xs: 0.375rem; // 6
|
|
16
|
+
--font-size-3xs: 0.5rem; // 8
|
|
17
|
+
--font-size-xxs: 0.625rem; // 10
|
|
18
|
+
--font-size-xs: 0.75rem; // 12
|
|
19
|
+
--font-size-s: 0.875rem; // 14
|
|
20
|
+
--font-size-m: 1rem; // 16
|
|
21
|
+
--font-size-l: 1.125rem; // 18
|
|
22
|
+
--font-size-xl: 1.25rem; // 20
|
|
23
|
+
--font-size-xxl: 1.625rem; // 26
|
|
24
|
+
|
|
25
|
+
// font weights
|
|
26
|
+
--font-weight-regular: 400;
|
|
27
|
+
--font-weight-medium: 500;
|
|
28
|
+
--font-weight-semi-bold: 600;
|
|
29
|
+
--font-weight-bold: 700;
|
|
30
|
+
|
|
31
|
+
// transition
|
|
32
|
+
--transition-duration-basic: 0.3s;
|
|
33
|
+
--transition-function-basic: ease;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@mixin typography($fontSize, $lineHeight, $fontWeight, $fontFamily: var(--font-family-primary)) {
|
|
37
|
+
margin: 0;
|
|
38
|
+
|
|
39
|
+
font-family: $fontFamily !important;
|
|
40
|
+
font-size: $fontSize !important;
|
|
41
|
+
font-weight: $fontWeight !important;
|
|
42
|
+
line-height: $lineHeight !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.typography-large {
|
|
46
|
+
@include typography(var(--font-size-xxl), var(--line-height-s), var(--font-weight-semi-bold));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.typography-h1 {
|
|
50
|
+
@include typography(var(--font-size-xl), var(--line-height-xl), var(--font-weight-bold));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.typography-h2 {
|
|
54
|
+
@include typography(var(--font-size-l), var(--line-height-xs), var(--font-weight-bold));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.typography-h3 {
|
|
58
|
+
@include typography(var(--font-size-m), var(--line-height-m), var(--font-weight-semi-bold));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// regular_text 16
|
|
62
|
+
.typography-subtitle1 {
|
|
63
|
+
@include typography(var(--font-size-m), var(--line-height-m), var(--font-weight-regular));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// bold_text 16
|
|
67
|
+
.typography-subtitle2 {
|
|
68
|
+
@include typography(var(--font-size-m), var(--line-height-m), var(--font-weight-bold));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// regular_text 14
|
|
72
|
+
.typography-body1 {
|
|
73
|
+
@include typography(var(--font-size-s), var(--line-height-l), var(--font-weight-regular));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// medium_text 14
|
|
77
|
+
.typography-body2 {
|
|
78
|
+
@include typography(var(--font-size-s), var(--line-height-l), var(--font-weight-medium));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// bold_text 14
|
|
82
|
+
.typography-body3 {
|
|
83
|
+
@include typography(var(--font-size-s), var(--line-height-l), var(--font-weight-bold));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// small_text
|
|
87
|
+
.typography-caption1 {
|
|
88
|
+
@include typography(var(--font-size-xs), var(--line-height-xs), var(--font-weight-regular));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// semi-bold small_text
|
|
92
|
+
.typography-caption2 {
|
|
93
|
+
@include typography(var(--font-size-xs), var(--line-height-xs), var(--font-weight-semi-bold));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// regular_link
|
|
97
|
+
.typography-link {
|
|
98
|
+
@include typography(var(--font-size-s), var(--line-height-l), var(--font-weight-regular));
|
|
99
|
+
|
|
100
|
+
text-decoration: underline;
|
|
101
|
+
text-decoration-skip-ink: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// small_link
|
|
105
|
+
.typography-subtitle-link {
|
|
106
|
+
@include typography(var(--font-size-s), var(--line-height-xs), var(--font-weight-regular));
|
|
107
|
+
|
|
108
|
+
text-decoration: underline;
|
|
109
|
+
text-decoration-skip-ink: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// The following is used in reCAPTCHA
|
|
113
|
+
.typography-caution {
|
|
114
|
+
@include typography(
|
|
115
|
+
var(--font-size-xs),
|
|
116
|
+
var(--line-height-xxs),
|
|
117
|
+
var(--font-weight-medium),
|
|
118
|
+
var(--font-family-secondary)
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Recaptcha - error
|
|
123
|
+
.typography-caution-error {
|
|
124
|
+
@include typography(
|
|
125
|
+
var(--font-size-xxs),
|
|
126
|
+
var(--line-height-xxs),
|
|
127
|
+
var(--font-weight-regular),
|
|
128
|
+
var(--font-family-secondary)
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
color: var(--color-danger-500) !important; // in Figma FF0000
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Recaptcha - signature
|
|
135
|
+
.typography-signature {
|
|
136
|
+
@include typography(
|
|
137
|
+
var(--font-size-3xs),
|
|
138
|
+
var(--line-height-3xs),
|
|
139
|
+
var(--font-weight-medium),
|
|
140
|
+
var(--font-family-secondary)
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Recaptcha - signature (legal)
|
|
145
|
+
.typography-signature-legal {
|
|
146
|
+
@include typography(
|
|
147
|
+
var(--font-size-4xs),
|
|
148
|
+
var(--line-height-xxs),
|
|
149
|
+
var(--font-weight-medium),
|
|
150
|
+
var(--font-family-secondary)
|
|
151
|
+
);
|
|
152
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types'
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type ProgressThemeColor = 'error' | 'inherit' | 'primary' | 'success' | 'warning'
|
|
2
|
+
export type ProgressSizeVariant = 'lg' | 'md' | 'sm'
|
|
3
|
+
export type AvatarSize = 'l' | 'm' | 's' | 'xs'
|
|
4
|
+
export type MainAvatarSize = 'xl' | 'xxl'
|
|
5
|
+
export type ModalSize = 'l' | 'm' | 's' | 'xl' | 'xs'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cloneElement, forwardRef, memo, type ReactElement, type Ref, type SVGProps } from 'react'
|
|
2
|
+
import type { IconProps } from '@/utils'
|
|
3
|
+
|
|
4
|
+
export type ColorIconProps = Omit<IconProps, 'backgroundColor' | 'color'>
|
|
5
|
+
|
|
6
|
+
type Props = ColorIconProps & {
|
|
7
|
+
icon: ReactElement<SVGProps<SVGSVGElement>>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const ColorIconBase = ({ icon, autoSize, size = 24, svgProps }: Props, ref: Ref<SVGSVGElement>) => {
|
|
11
|
+
const svgSize = autoSize ? '1em' : `${size}px`
|
|
12
|
+
|
|
13
|
+
return cloneElement(icon, {
|
|
14
|
+
ref,
|
|
15
|
+
width: svgSize,
|
|
16
|
+
height: svgSize,
|
|
17
|
+
...svgProps,
|
|
18
|
+
style: {
|
|
19
|
+
...svgProps?.style,
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const MemoizedIconBase = memo(forwardRef(ColorIconBase))
|
|
25
|
+
MemoizedIconBase.displayName = 'ColorIconBase'
|
|
26
|
+
export { MemoizedIconBase as ColorIconBase }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cloneElement, forwardRef, memo, type ReactElement, type Ref, type SVGProps } from 'react'
|
|
2
|
+
import type { IconProps } from '@/utils'
|
|
3
|
+
|
|
4
|
+
export type ColorIconProps = Omit<IconProps, 'backgroundColor' | 'color'>
|
|
5
|
+
|
|
6
|
+
type Props = ColorIconProps & {
|
|
7
|
+
icon: ReactElement<SVGProps<SVGSVGElement>>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const ColorIconBaseSmall = (
|
|
11
|
+
{ icon, autoSize, size = 24, svgProps }: Props,
|
|
12
|
+
ref: Ref<SVGSVGElement>
|
|
13
|
+
) => {
|
|
14
|
+
const svgWidthSize = autoSize ? '1em' : `${size}px`
|
|
15
|
+
const svgHeightSize = autoSize ? '1em' : `${size / 1.5}px`
|
|
16
|
+
|
|
17
|
+
return cloneElement(icon, {
|
|
18
|
+
ref,
|
|
19
|
+
width: svgWidthSize,
|
|
20
|
+
height: svgHeightSize,
|
|
21
|
+
...svgProps,
|
|
22
|
+
style: {
|
|
23
|
+
...svgProps?.style,
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const MemoizedIconBase = memo(forwardRef(ColorIconBaseSmall))
|
|
29
|
+
MemoizedIconBase.displayName = 'ColorIconBaseSmall'
|
|
30
|
+
export { MemoizedIconBase as ColorIconBaseSmall }
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cloneElement, forwardRef, memo, type ReactElement, type Ref, type SVGProps } from 'react'
|
|
2
|
+
|
|
3
|
+
export type IconProps = {
|
|
4
|
+
autoSize?: boolean
|
|
5
|
+
backgroundColor?: string
|
|
6
|
+
color?: string
|
|
7
|
+
size?: number
|
|
8
|
+
svgProps?: SVGProps<SVGSVGElement>
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type Props = IconProps & {
|
|
12
|
+
icon: ReactElement<SVGProps<SVGSVGElement>>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const IconBase = (
|
|
16
|
+
{
|
|
17
|
+
icon,
|
|
18
|
+
autoSize,
|
|
19
|
+
backgroundColor = 'transparent',
|
|
20
|
+
color = 'currentColor',
|
|
21
|
+
size = 24,
|
|
22
|
+
svgProps,
|
|
23
|
+
}: Props,
|
|
24
|
+
ref: Ref<SVGSVGElement>
|
|
25
|
+
) => {
|
|
26
|
+
const svgSize = autoSize ? '1em' : `${size}px`
|
|
27
|
+
|
|
28
|
+
return cloneElement(icon, {
|
|
29
|
+
ref,
|
|
30
|
+
width: svgSize,
|
|
31
|
+
height: svgSize,
|
|
32
|
+
fill: color,
|
|
33
|
+
...svgProps,
|
|
34
|
+
style: {
|
|
35
|
+
backgroundColor,
|
|
36
|
+
...svgProps?.style,
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const MemoizedIconBase = memo(forwardRef(IconBase))
|
|
42
|
+
MemoizedIconBase.displayName = 'IconBase'
|
|
43
|
+
export { MemoizedIconBase as IconBase }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HorizontalMetrics } from '@/components/types'
|
|
2
|
+
|
|
3
|
+
export const getHorizontalMetrics = (viewport: HTMLDivElement): HorizontalMetrics | null => {
|
|
4
|
+
const { clientWidth, scrollWidth } = viewport
|
|
5
|
+
if (scrollWidth <= clientWidth) return null
|
|
6
|
+
|
|
7
|
+
const thumbWidth = (clientWidth / scrollWidth) * clientWidth
|
|
8
|
+
const maxThumbOffsetX = clientWidth - thumbWidth
|
|
9
|
+
const maxScrollOffsetX = scrollWidth - clientWidth
|
|
10
|
+
|
|
11
|
+
return { thumbWidth, maxThumbOffsetX, maxScrollOffsetX }
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MouseEvent } from 'react'
|
|
2
|
+
|
|
3
|
+
const NON_NAVIGABLE_HREF = '#'
|
|
4
|
+
|
|
5
|
+
export const getNavItemClickHandler = (href: string | undefined, onSelect: () => void) => {
|
|
6
|
+
const hasRealHref = Boolean(href) && href !== NON_NAVIGABLE_HREF
|
|
7
|
+
|
|
8
|
+
const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {
|
|
9
|
+
if (!hasRealHref) {
|
|
10
|
+
event.preventDefault()
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
onSelect()
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return { handleClick, resolvedHref: href ?? NON_NAVIGABLE_HREF }
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { VerticalMetrics } from '@/components/types'
|
|
2
|
+
|
|
3
|
+
export const getVerticalMetrics = (viewport: HTMLDivElement): null | VerticalMetrics => {
|
|
4
|
+
const { clientHeight, scrollHeight } = viewport
|
|
5
|
+
if (scrollHeight <= clientHeight) return null
|
|
6
|
+
|
|
7
|
+
const thumbHeight = (clientHeight / scrollHeight) * clientHeight
|
|
8
|
+
const maxThumbOffsetY = clientHeight - thumbHeight
|
|
9
|
+
const maxScrollOffsetY = scrollHeight - clientHeight
|
|
10
|
+
|
|
11
|
+
return { thumbHeight, maxThumbOffsetY, maxScrollOffsetY }
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ColorIconBase, type ColorIconProps } from './ColorIconBase'
|
|
2
|
+
export { IconBase, type IconProps } from './IconBase'
|
|
3
|
+
export { ColorIconBaseSmall } from './ColorIconBaseSmall'
|
|
4
|
+
export { truncateText } from './truncateText'
|
|
5
|
+
export { isThemeColor } from './isThemeColor'
|
|
6
|
+
export { getFirstLetterCapitalized } from './getFirstLetterCapitalized'
|
|
7
|
+
export { isAudioAttachment } from './isAudioAttachment'
|
|
8
|
+
export { formatTime } from './formatTime'
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Attachment, AudioAttachment } from '@/components/Message/types'
|
|
2
|
+
|
|
3
|
+
export const isAudioAttachment = (
|
|
4
|
+
attachment: Attachment | AudioAttachment
|
|
5
|
+
): attachment is AudioAttachment => {
|
|
6
|
+
return attachment.type === 'audio' && 'component' in attachment
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const truncateText = (text: string, maxLength: number) => {
|
|
2
|
+
if (text.length <= maxLength) {
|
|
3
|
+
return text
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const slicedText = text.slice(0, maxLength)
|
|
7
|
+
|
|
8
|
+
const lastSpaceIndex = slicedText.lastIndexOf(' ')
|
|
9
|
+
|
|
10
|
+
if (lastSpaceIndex === -1) {
|
|
11
|
+
return `${slicedText}...`
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return `${slicedText.slice(0, lastSpaceIndex)}...`
|
|
15
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "es2023",
|
|
5
|
+
"lib": ["ES2023", "DOM"],
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"allowArbitraryExtensions": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": false,
|
|
13
|
+
"verbatimModuleSyntax": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"emitDeclarationOnly": true,
|
|
16
|
+
"declaration": true,
|
|
17
|
+
|
|
18
|
+
"jsx": "react-jsx",
|
|
19
|
+
"noImplicitAny": true,
|
|
20
|
+
|
|
21
|
+
/* Linting */
|
|
22
|
+
"noUnusedLocals": true,
|
|
23
|
+
"noUnusedParameters": true,
|
|
24
|
+
"erasableSyntaxOnly": true,
|
|
25
|
+
"noFallthroughCasesInSwitch": true,
|
|
26
|
+
"types": ["vite/client", "node"],
|
|
27
|
+
"paths": {
|
|
28
|
+
"@/*": ["./src/*"]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"include": ["src/**/*", "vite-env.d.ts"]
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.app.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": "src",
|
|
5
|
+
"outDir": "dist/types"
|
|
6
|
+
},
|
|
7
|
+
"exclude": [
|
|
8
|
+
"src/**/*.stories.ts",
|
|
9
|
+
"src/**/*.stories.tsx",
|
|
10
|
+
"src/**/*.test.ts",
|
|
11
|
+
"src/**/*.test.tsx",
|
|
12
|
+
"src/stories/**/*",
|
|
13
|
+
"src/storybook-utils/**/*",
|
|
14
|
+
"node_modules"
|
|
15
|
+
]
|
|
16
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "es2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"types": ["node"],
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"module": "nodenext",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
13
|
+
"moduleDetection": "force",
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
|
|
16
|
+
/* Linting */
|
|
17
|
+
"noUnusedLocals": true,
|
|
18
|
+
"noUnusedParameters": true,
|
|
19
|
+
"erasableSyntaxOnly": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true
|
|
21
|
+
},
|
|
22
|
+
"include": ["vite.config.ts", "package.json"]
|
|
23
|
+
}
|
package/vite-env.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.module.css' {
|
|
4
|
+
const classes: { [key: string]: string }
|
|
5
|
+
export default classes
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module '*.module.scss' {
|
|
9
|
+
const classes: { [key: string]: string }
|
|
10
|
+
export default classes
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare module '*.module.sass' {
|
|
14
|
+
const classes: { [key: string]: string }
|
|
15
|
+
export default classes
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare module '*.css'
|
|
19
|
+
declare module '*.scss'
|
|
20
|
+
declare module '*.sass'
|