@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,457 @@
|
|
|
1
|
+
@use '../../styles/mixins' as *;
|
|
2
|
+
@use '../../styles/typography' as *;
|
|
3
|
+
|
|
4
|
+
// Component styles
|
|
5
|
+
.testContainer {
|
|
6
|
+
min-height: 100vh;
|
|
7
|
+
background: #f5f5f5;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Test container mixin
|
|
11
|
+
.header {
|
|
12
|
+
padding: 2rem 0;
|
|
13
|
+
color: white;
|
|
14
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.container {
|
|
18
|
+
@include container;
|
|
19
|
+
|
|
20
|
+
padding: 2rem;
|
|
21
|
+
border-radius: 8px;
|
|
22
|
+
background: rgb(255 255 255 / 10%);
|
|
23
|
+
|
|
24
|
+
h1 {
|
|
25
|
+
margin: 0;
|
|
26
|
+
font-size: 2.5rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
p {
|
|
30
|
+
margin: 0.5rem 0 0;
|
|
31
|
+
opacity: 0.9;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Test content mixin
|
|
36
|
+
.main {
|
|
37
|
+
padding: 2rem 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.content {
|
|
41
|
+
@include content;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.testSection {
|
|
45
|
+
margin-bottom: 2rem;
|
|
46
|
+
padding: 2rem;
|
|
47
|
+
border-radius: 8px;
|
|
48
|
+
|
|
49
|
+
background: white;
|
|
50
|
+
box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
|
|
51
|
+
|
|
52
|
+
h2 {
|
|
53
|
+
margin-top: 0;
|
|
54
|
+
padding-bottom: 0.5rem;
|
|
55
|
+
border-bottom: 2px solid #667eea;
|
|
56
|
+
color: #333;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Breakpoint indicators
|
|
61
|
+
.breakpointIndicators {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-wrap: wrap;
|
|
64
|
+
gap: 1rem;
|
|
65
|
+
|
|
66
|
+
> div {
|
|
67
|
+
flex: 1;
|
|
68
|
+
|
|
69
|
+
min-width: 150px;
|
|
70
|
+
padding: 1rem;
|
|
71
|
+
border-radius: 4px;
|
|
72
|
+
|
|
73
|
+
font-weight: bold;
|
|
74
|
+
text-align: center;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.desktopIndicator {
|
|
79
|
+
color: white;
|
|
80
|
+
background: #4caf50;
|
|
81
|
+
|
|
82
|
+
@include media-desktop {
|
|
83
|
+
color: white;
|
|
84
|
+
background: #ff9800;
|
|
85
|
+
|
|
86
|
+
&::after {
|
|
87
|
+
content: ' (Active)';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tabletIndicator {
|
|
93
|
+
color: white;
|
|
94
|
+
background: #ff9800;
|
|
95
|
+
|
|
96
|
+
@include media-tablet {
|
|
97
|
+
color: white;
|
|
98
|
+
background: #2196f3;
|
|
99
|
+
|
|
100
|
+
&::after {
|
|
101
|
+
content: ' (Active)';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.mobileIndicator {
|
|
107
|
+
color: white;
|
|
108
|
+
background: #2196f3;
|
|
109
|
+
|
|
110
|
+
@include media-mobile {
|
|
111
|
+
color: white;
|
|
112
|
+
background: #f44336;
|
|
113
|
+
|
|
114
|
+
&::after {
|
|
115
|
+
content: ' (Active)';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Modal sizes preview
|
|
121
|
+
.modalSizes {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-wrap: wrap;
|
|
124
|
+
gap: 0.5rem;
|
|
125
|
+
margin: 1rem 0;
|
|
126
|
+
|
|
127
|
+
> div {
|
|
128
|
+
padding: 0.5rem 1rem;
|
|
129
|
+
border: 2px solid transparent;
|
|
130
|
+
border-radius: 4px;
|
|
131
|
+
|
|
132
|
+
font-size: 0.9rem;
|
|
133
|
+
|
|
134
|
+
background: #e0e0e0;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.modalXs {
|
|
139
|
+
width: $modal-width-xs;
|
|
140
|
+
border-color: #2196f3;
|
|
141
|
+
background: #e3f2fd;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.modalS {
|
|
145
|
+
width: $modal-width-s;
|
|
146
|
+
border-color: #4caf50;
|
|
147
|
+
background: #e8f5e9;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.modalM {
|
|
151
|
+
width: $modal-width-m;
|
|
152
|
+
border-color: #ff9800;
|
|
153
|
+
background: #fff3e0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.modalL {
|
|
157
|
+
width: $modal-width-l;
|
|
158
|
+
border-color: #f44336;
|
|
159
|
+
background: #fce4ec;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.modalXl {
|
|
163
|
+
width: $modal-width-xl;
|
|
164
|
+
border-color: #9c27b0;
|
|
165
|
+
background: #f3e5f5;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.openModalBtn {
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
|
|
171
|
+
padding: 0.75rem 1.5rem;
|
|
172
|
+
border: none;
|
|
173
|
+
border-radius: 4px;
|
|
174
|
+
|
|
175
|
+
font-size: 1rem;
|
|
176
|
+
color: white;
|
|
177
|
+
|
|
178
|
+
background: #667eea;
|
|
179
|
+
|
|
180
|
+
&:hover {
|
|
181
|
+
background: #764ba2;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// No-hover mixin test
|
|
186
|
+
.hoverTest {
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-wrap: wrap;
|
|
189
|
+
gap: 2rem;
|
|
190
|
+
margin-top: 1rem;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.hoverButton {
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
|
|
196
|
+
padding: 1rem 2rem;
|
|
197
|
+
border: none;
|
|
198
|
+
border-radius: 4px;
|
|
199
|
+
|
|
200
|
+
font-size: 1rem;
|
|
201
|
+
color: white;
|
|
202
|
+
|
|
203
|
+
background: #764ba2;
|
|
204
|
+
|
|
205
|
+
transition: all 0.3s;
|
|
206
|
+
|
|
207
|
+
&:hover {
|
|
208
|
+
transform: scale(1.05);
|
|
209
|
+
background: #667eea;
|
|
210
|
+
box-shadow: 0 4px 8px rgb(0 0 0 / 20%);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&:active {
|
|
214
|
+
transform: scale(0.95);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// No hover on touch devices
|
|
218
|
+
@include no-hover-mobile {
|
|
219
|
+
&:hover {
|
|
220
|
+
transform: none;
|
|
221
|
+
background: #764ba2;
|
|
222
|
+
box-shadow: none;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.hoverCard {
|
|
228
|
+
min-width: 200px;
|
|
229
|
+
padding: 2rem;
|
|
230
|
+
border-radius: 8px;
|
|
231
|
+
|
|
232
|
+
text-align: center;
|
|
233
|
+
|
|
234
|
+
background: #e0e0e0;
|
|
235
|
+
|
|
236
|
+
transition: all 0.3s;
|
|
237
|
+
|
|
238
|
+
&:hover {
|
|
239
|
+
transform: translateY(-5px);
|
|
240
|
+
color: white;
|
|
241
|
+
background: #667eea;
|
|
242
|
+
box-shadow: 0 8px 16px rgb(0 0 0 / 20%);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// No hover on touch devices
|
|
246
|
+
@include no-hover-mobile {
|
|
247
|
+
&:hover {
|
|
248
|
+
transform: none;
|
|
249
|
+
color: inherit;
|
|
250
|
+
background: #e0e0e0;
|
|
251
|
+
box-shadow: none;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Modal styles
|
|
257
|
+
.modalOverlay {
|
|
258
|
+
position: fixed;
|
|
259
|
+
z-index: 1000;
|
|
260
|
+
inset: 0;
|
|
261
|
+
|
|
262
|
+
display: flex;
|
|
263
|
+
align-items: center;
|
|
264
|
+
justify-content: center;
|
|
265
|
+
|
|
266
|
+
background: rgb(0 0 0 / 70%);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.modal {
|
|
270
|
+
position: relative;
|
|
271
|
+
|
|
272
|
+
overflow-y: auto;
|
|
273
|
+
|
|
274
|
+
// Responsive modal widths
|
|
275
|
+
width: $modal-width-m; // Default medium
|
|
276
|
+
max-height: 80vh;
|
|
277
|
+
padding: 2rem;
|
|
278
|
+
border-radius: 8px;
|
|
279
|
+
|
|
280
|
+
background: white;
|
|
281
|
+
|
|
282
|
+
@include media-desktop {
|
|
283
|
+
width: $modal-width-xl;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
@include media-tablet {
|
|
287
|
+
width: $modal-width-l;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
@include media-mobile {
|
|
291
|
+
width: $modal-width-s;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Individual width tests
|
|
295
|
+
.modalSizes {
|
|
296
|
+
display: flex;
|
|
297
|
+
flex-wrap: wrap;
|
|
298
|
+
gap: 0.5rem;
|
|
299
|
+
|
|
300
|
+
span {
|
|
301
|
+
padding: 0.25rem 0.5rem;
|
|
302
|
+
border-radius: 3px;
|
|
303
|
+
font-size: 0.8rem;
|
|
304
|
+
background: #f0f0f0;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.closeBtn {
|
|
310
|
+
cursor: pointer;
|
|
311
|
+
|
|
312
|
+
position: absolute;
|
|
313
|
+
top: 0.5rem;
|
|
314
|
+
right: 0.5rem;
|
|
315
|
+
|
|
316
|
+
padding: 0.5rem;
|
|
317
|
+
border: none;
|
|
318
|
+
|
|
319
|
+
font-size: 2rem;
|
|
320
|
+
line-height: 1;
|
|
321
|
+
color: #999;
|
|
322
|
+
|
|
323
|
+
background: none;
|
|
324
|
+
|
|
325
|
+
&:hover {
|
|
326
|
+
color: #333;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// Responsive adjustments for the component itself
|
|
331
|
+
@include media-tablet {
|
|
332
|
+
.container {
|
|
333
|
+
padding: 1rem;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.testSection {
|
|
337
|
+
padding: 1.5rem;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.breakpointIndicators {
|
|
341
|
+
> div {
|
|
342
|
+
min-width: 120px;
|
|
343
|
+
font-size: 0.9rem;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@include media-mobile {
|
|
349
|
+
.header h1 {
|
|
350
|
+
font-size: 1.8rem;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.testSection {
|
|
354
|
+
padding: 1rem;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.modalSizes {
|
|
358
|
+
> div {
|
|
359
|
+
padding: 0.25rem 0.5rem;
|
|
360
|
+
font-size: 0.8rem;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.hoverTest {
|
|
365
|
+
flex-direction: column;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// Flex
|
|
370
|
+
.utilityGrid {
|
|
371
|
+
display: grid;
|
|
372
|
+
gap: 2rem;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.flexBox {
|
|
376
|
+
@include flex(flex, center, center);
|
|
377
|
+
|
|
378
|
+
gap: 1rem;
|
|
379
|
+
padding: 1rem;
|
|
380
|
+
background: #eee;
|
|
381
|
+
|
|
382
|
+
div {
|
|
383
|
+
padding: 1rem;
|
|
384
|
+
color: white;
|
|
385
|
+
background: #667eea;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// width-height
|
|
390
|
+
.square {
|
|
391
|
+
@include width-height(120px);
|
|
392
|
+
|
|
393
|
+
display: flex;
|
|
394
|
+
align-items: center;
|
|
395
|
+
justify-content: center;
|
|
396
|
+
|
|
397
|
+
color: white;
|
|
398
|
+
|
|
399
|
+
background: #4caf50;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// top-left / top-right
|
|
403
|
+
.positionWrapper {
|
|
404
|
+
position: relative;
|
|
405
|
+
height: 120px;
|
|
406
|
+
background: #f3f3f3;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.topLeft {
|
|
410
|
+
@include top-left(10px);
|
|
411
|
+
|
|
412
|
+
position: absolute;
|
|
413
|
+
padding: 0.5rem;
|
|
414
|
+
color: white;
|
|
415
|
+
background: #2196f3;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.topRight {
|
|
419
|
+
@include top-right(10px);
|
|
420
|
+
|
|
421
|
+
position: absolute;
|
|
422
|
+
padding: 0.5rem;
|
|
423
|
+
color: white;
|
|
424
|
+
background: #f44336;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// Typography
|
|
428
|
+
.typographyExample {
|
|
429
|
+
@include typography(24px, 32px, 700);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// Transition-basic
|
|
433
|
+
.transitionBox {
|
|
434
|
+
padding: 1rem;
|
|
435
|
+
background: #ff9800;
|
|
436
|
+
|
|
437
|
+
@include transition-basic(background, transform);
|
|
438
|
+
|
|
439
|
+
&:hover {
|
|
440
|
+
transform: scale(1.05);
|
|
441
|
+
background: #4caf50;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// Prefix
|
|
446
|
+
.prefixBox {
|
|
447
|
+
padding: 1rem;
|
|
448
|
+
background: #ddd;
|
|
449
|
+
|
|
450
|
+
@include prefix(user-select, none, (webkit, moz, ms));
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// see in DevTools:
|
|
454
|
+
// -webkit-user-select: none;
|
|
455
|
+
// -moz-user-select: none;
|
|
456
|
+
// -ms-user-select: none;
|
|
457
|
+
// user-select: none;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import s from './TestMixins.module.scss'
|
|
3
|
+
|
|
4
|
+
export const TestMixins = () => {
|
|
5
|
+
const [isModalOpen, setIsModalOpen] = useState(false)
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<div className={s.testContainer}>
|
|
9
|
+
{/* Test container mixin */}
|
|
10
|
+
<header className={s.header}>
|
|
11
|
+
<div className={s.container}>
|
|
12
|
+
<h1>Testing All Mixins</h1>
|
|
13
|
+
<p>Resize your browser to see responsive behavior</p>
|
|
14
|
+
</div>
|
|
15
|
+
</header>
|
|
16
|
+
|
|
17
|
+
{/* Test content mixin */}
|
|
18
|
+
<main className={s.main}>
|
|
19
|
+
<div className={s.content}>
|
|
20
|
+
<section className={s.testSection}>
|
|
21
|
+
<h2>Responsive Breakpoints</h2>
|
|
22
|
+
<div className={s.breakpointIndicators}>
|
|
23
|
+
<div className={s.desktopIndicator}>Desktop (≥1280px)</div>
|
|
24
|
+
<div className={s.tabletIndicator}>Tablet (768-1279px)</div>
|
|
25
|
+
<div className={s.mobileIndicator}>Mobile (≤360px)</div>
|
|
26
|
+
</div>
|
|
27
|
+
</section>
|
|
28
|
+
|
|
29
|
+
{/* Test modal widths */}
|
|
30
|
+
<section className={s.testSection}>
|
|
31
|
+
<h2>Modal Widths</h2>
|
|
32
|
+
<div className={s.modalSizes}>
|
|
33
|
+
<div className={s.modalXs}>XS (366px)</div>
|
|
34
|
+
<div className={s.modalS}>S (378px)</div>
|
|
35
|
+
<div className={s.modalM}>M (492px)</div>
|
|
36
|
+
<div className={s.modalL}>L (644px)</div>
|
|
37
|
+
<div className={s.modalXl}>XL (972px)</div>
|
|
38
|
+
</div>
|
|
39
|
+
<button type={'button'} className={s.openModalBtn} onClick={() => setIsModalOpen(true)}>
|
|
40
|
+
Open Modal
|
|
41
|
+
</button>
|
|
42
|
+
</section>
|
|
43
|
+
|
|
44
|
+
{/* Test no-hover mixin */}
|
|
45
|
+
<section className={s.testSection}>
|
|
46
|
+
<h2>Hover & Touch Testing</h2>
|
|
47
|
+
<div className={s.hoverTest}>
|
|
48
|
+
<button type={'button'} className={s.hoverButton}>
|
|
49
|
+
Hover me (desktop) / Tap me (mobile)
|
|
50
|
+
</button>
|
|
51
|
+
<div className={s.hoverCard}>
|
|
52
|
+
<p>Hover effects change on touch devices</p>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</section>
|
|
56
|
+
|
|
57
|
+
{/* Test flex, width-height, top-left, top-right, Typography, prefix, transition-basic */}
|
|
58
|
+
<section className={s.testSection}>
|
|
59
|
+
<h2>Utility Mixins</h2>
|
|
60
|
+
|
|
61
|
+
<div className={s.utilityGrid}>
|
|
62
|
+
<div className={s.flexBox}>
|
|
63
|
+
<div>Flexbox</div>
|
|
64
|
+
<div>1</div>
|
|
65
|
+
<div>2</div>
|
|
66
|
+
<div>3</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div className={s.square}>width-height</div>
|
|
70
|
+
|
|
71
|
+
<div className={s.positionWrapper}>
|
|
72
|
+
<div className={s.topLeft}>Top Left</div>
|
|
73
|
+
<div className={s.topRight}>Top Right</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<p className={s.typographyExample}>Typography mixin example</p>
|
|
77
|
+
|
|
78
|
+
<div className={s.transitionBox}>Hover me (transition-basic mixin)</div>
|
|
79
|
+
|
|
80
|
+
<div className={s.prefixBox}>Prefix mixin</div>
|
|
81
|
+
</div>
|
|
82
|
+
</section>
|
|
83
|
+
</div>
|
|
84
|
+
</main>
|
|
85
|
+
|
|
86
|
+
{/* Modal with responsive widths */}
|
|
87
|
+
{isModalOpen && (
|
|
88
|
+
<div className={s.modalOverlay} onClick={() => setIsModalOpen(false)}>
|
|
89
|
+
<div className={s.modal} onClick={e => e.stopPropagation()}>
|
|
90
|
+
<button type={'button'} className={s.closeBtn} onClick={() => setIsModalOpen(false)}>
|
|
91
|
+
×
|
|
92
|
+
</button>
|
|
93
|
+
<h2>Responsive Modal</h2>
|
|
94
|
+
<p>Modal width changes based on screen size</p>
|
|
95
|
+
<div className={s.modalSizes}>
|
|
96
|
+
<span>XS: 366px</span>
|
|
97
|
+
<span>S: 378px</span>
|
|
98
|
+
<span>M: 492px</span>
|
|
99
|
+
<span>L: 644px</span>
|
|
100
|
+
<span>XL: 972px</span>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
)}
|
|
105
|
+
</div>
|
|
106
|
+
)
|
|
107
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TestMixins/TestMixins'
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useCallback, useEffect, type RefObject } from 'react'
|
|
2
|
+
import { getHorizontalMetrics } from '@/utils/getHorizontalMetrics'
|
|
3
|
+
import { getVerticalMetrics } from '@/utils/getVerticalMetrics'
|
|
4
|
+
|
|
5
|
+
type UseScrollThumbsParams = {
|
|
6
|
+
viewportRef: RefObject<HTMLDivElement | null>
|
|
7
|
+
contentRef: RefObject<HTMLDivElement | null>
|
|
8
|
+
verticalThumbRef: RefObject<HTMLDivElement | null>
|
|
9
|
+
horizontalThumbRef: RefObject<HTMLDivElement | null>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const useScrollThumbs = ({
|
|
13
|
+
viewportRef,
|
|
14
|
+
contentRef,
|
|
15
|
+
verticalThumbRef,
|
|
16
|
+
horizontalThumbRef,
|
|
17
|
+
}: UseScrollThumbsParams) => {
|
|
18
|
+
const updateThumbs = useCallback(() => {
|
|
19
|
+
const viewport = viewportRef.current
|
|
20
|
+
if (!viewport) return
|
|
21
|
+
|
|
22
|
+
const verticalMetrics = getVerticalMetrics(viewport)
|
|
23
|
+
if (verticalMetrics && verticalThumbRef.current) {
|
|
24
|
+
const { thumbHeight, maxThumbOffsetY, maxScrollOffsetY } = verticalMetrics
|
|
25
|
+
const thumbTop = (viewport.scrollTop / maxScrollOffsetY) * maxThumbOffsetY
|
|
26
|
+
|
|
27
|
+
verticalThumbRef.current.style.display = ''
|
|
28
|
+
verticalThumbRef.current.style.height = `${thumbHeight}px`
|
|
29
|
+
verticalThumbRef.current.style.transform = `translateY(${thumbTop}px)`
|
|
30
|
+
} else if (verticalThumbRef.current) {
|
|
31
|
+
verticalThumbRef.current.style.display = 'none'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const horizontalMetrics = getHorizontalMetrics(viewport)
|
|
35
|
+
if (horizontalMetrics && horizontalThumbRef.current) {
|
|
36
|
+
const { thumbWidth, maxThumbOffsetX, maxScrollOffsetX } = horizontalMetrics
|
|
37
|
+
const thumbLeft = (viewport.scrollLeft / maxScrollOffsetX) * maxThumbOffsetX
|
|
38
|
+
|
|
39
|
+
horizontalThumbRef.current.style.display = ''
|
|
40
|
+
horizontalThumbRef.current.style.width = `${thumbWidth}px`
|
|
41
|
+
horizontalThumbRef.current.style.transform = `translateX(${thumbLeft}px)`
|
|
42
|
+
} else if (horizontalThumbRef.current) {
|
|
43
|
+
horizontalThumbRef.current.style.display = 'none'
|
|
44
|
+
}
|
|
45
|
+
}, [viewportRef, verticalThumbRef, horizontalThumbRef])
|
|
46
|
+
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
const viewport = viewportRef.current
|
|
49
|
+
const observer = new ResizeObserver(() => {
|
|
50
|
+
updateThumbs()
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
if (contentRef.current) {
|
|
54
|
+
observer.observe(contentRef.current)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
updateThumbs()
|
|
58
|
+
viewport?.addEventListener('scroll', updateThumbs)
|
|
59
|
+
|
|
60
|
+
return () => {
|
|
61
|
+
viewport?.removeEventListener('scroll', updateThumbs)
|
|
62
|
+
observer.disconnect()
|
|
63
|
+
}
|
|
64
|
+
}, [updateThumbs, viewportRef, contentRef])
|
|
65
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { useRef, type RefObject } from 'react'
|
|
2
|
+
import { getHorizontalMetrics } from '@/utils/getHorizontalMetrics'
|
|
3
|
+
import { getVerticalMetrics } from '@/utils/getVerticalMetrics'
|
|
4
|
+
|
|
5
|
+
type DragStateY = {
|
|
6
|
+
startY: number
|
|
7
|
+
startScrollTop: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type DragStateX = {
|
|
11
|
+
startX: number
|
|
12
|
+
startScrollLeft: number
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type UseThumbDragParams = {
|
|
16
|
+
viewportRef: RefObject<HTMLDivElement | null>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const useThumbDrag = ({ viewportRef }: UseThumbDragParams) => {
|
|
20
|
+
const dragStartYRef = useRef<DragStateY | null>(null)
|
|
21
|
+
const dragStartXRef = useRef<DragStateX | null>(null)
|
|
22
|
+
|
|
23
|
+
const handleVerticalMouseDown = (event: React.MouseEvent<HTMLDivElement>) => {
|
|
24
|
+
event.preventDefault()
|
|
25
|
+
const viewport = viewportRef.current
|
|
26
|
+
if (!viewport) return
|
|
27
|
+
|
|
28
|
+
dragStartYRef.current = {
|
|
29
|
+
startY: event.clientY,
|
|
30
|
+
startScrollTop: viewport.scrollTop,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const handleMouseMove = (moveEvent: MouseEvent) => {
|
|
34
|
+
const dragStart = dragStartYRef.current
|
|
35
|
+
const metrics = getVerticalMetrics(viewport)
|
|
36
|
+
if (!dragStart || !metrics) return
|
|
37
|
+
|
|
38
|
+
const { maxThumbOffsetY, maxScrollOffsetY } = metrics
|
|
39
|
+
const deltaY = moveEvent.clientY - dragStart.startY
|
|
40
|
+
const scrollRatio = maxScrollOffsetY / maxThumbOffsetY
|
|
41
|
+
const newScrollTop = dragStart.startScrollTop + deltaY * scrollRatio
|
|
42
|
+
|
|
43
|
+
viewport.scrollTop = Math.max(0, Math.min(newScrollTop, maxScrollOffsetY))
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const handleMouseUp = () => {
|
|
47
|
+
dragStartYRef.current = null
|
|
48
|
+
document.removeEventListener('mousemove', handleMouseMove)
|
|
49
|
+
document.removeEventListener('mouseup', handleMouseUp)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
document.addEventListener('mousemove', handleMouseMove)
|
|
53
|
+
document.addEventListener('mouseup', handleMouseUp)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const handleHorizontalMouseDown = (event: React.MouseEvent<HTMLDivElement>) => {
|
|
57
|
+
event.preventDefault()
|
|
58
|
+
const viewport = viewportRef.current
|
|
59
|
+
if (!viewport) return
|
|
60
|
+
|
|
61
|
+
dragStartXRef.current = {
|
|
62
|
+
startX: event.clientX,
|
|
63
|
+
startScrollLeft: viewport.scrollLeft,
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const handleMouseMove = (moveEvent: MouseEvent) => {
|
|
67
|
+
const dragStart = dragStartXRef.current
|
|
68
|
+
const metrics = getHorizontalMetrics(viewport)
|
|
69
|
+
if (!dragStart || !metrics) return
|
|
70
|
+
|
|
71
|
+
const { maxThumbOffsetX, maxScrollOffsetX } = metrics
|
|
72
|
+
const deltaX = moveEvent.clientX - dragStart.startX
|
|
73
|
+
const scrollRatio = maxScrollOffsetX / maxThumbOffsetX
|
|
74
|
+
const newScrollLeft = dragStart.startScrollLeft + deltaX * scrollRatio
|
|
75
|
+
|
|
76
|
+
viewport.scrollLeft = Math.max(0, Math.min(newScrollLeft, maxScrollOffsetX))
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const handleMouseUp = () => {
|
|
80
|
+
dragStartXRef.current = null
|
|
81
|
+
document.removeEventListener('mousemove', handleMouseMove)
|
|
82
|
+
document.removeEventListener('mouseup', handleMouseUp)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
document.addEventListener('mousemove', handleMouseMove)
|
|
86
|
+
document.addEventListener('mouseup', handleMouseUp)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return { handleVerticalMouseDown, handleHorizontalMouseDown }
|
|
90
|
+
}
|