@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,58 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { Slider } from '@/components/Slider'
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Slider> = {
|
|
5
|
+
title: 'Components/Slider',
|
|
6
|
+
component: Slider,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default meta
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<typeof Slider>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
defaultValue: [50],
|
|
17
|
+
max: 100,
|
|
18
|
+
step: 1,
|
|
19
|
+
'aria-label': 'Slider',
|
|
20
|
+
},
|
|
21
|
+
render: args => (
|
|
22
|
+
<div style={{ width: 300, padding: '2rem', background: '#FFF' }}>
|
|
23
|
+
<Slider {...args} />
|
|
24
|
+
</div>
|
|
25
|
+
),
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const Disabled: Story = {
|
|
29
|
+
args: {
|
|
30
|
+
defaultValue: [30],
|
|
31
|
+
max: 100,
|
|
32
|
+
step: 1,
|
|
33
|
+
disabled: true,
|
|
34
|
+
},
|
|
35
|
+
render: args => (
|
|
36
|
+
<div style={{ width: 300, padding: '2rem', background: '#FFF' }}>
|
|
37
|
+
<Slider {...args} />
|
|
38
|
+
</div>
|
|
39
|
+
),
|
|
40
|
+
}
|
|
41
|
+
export const WithHandleChange: Story = {
|
|
42
|
+
args: {
|
|
43
|
+
defaultValue: [30],
|
|
44
|
+
max: 100,
|
|
45
|
+
step: 1,
|
|
46
|
+
},
|
|
47
|
+
render: args => {
|
|
48
|
+
const handleChange = (newValue: number[]) => {
|
|
49
|
+
console.log('Current value:', newValue[0])
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div style={{ width: 300, padding: '2rem', background: '#FFF' }}>
|
|
54
|
+
<Slider {...args} onValueChange={handleChange} />
|
|
55
|
+
</div>
|
|
56
|
+
)
|
|
57
|
+
},
|
|
58
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from '@/components'
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Table',
|
|
6
|
+
component: Table,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: `
|
|
12
|
+
A composable table component based on native HTML table elements.
|
|
13
|
+
|
|
14
|
+
The component consists of several building blocks:
|
|
15
|
+
|
|
16
|
+
- **Table** — root table element
|
|
17
|
+
- **TableHead** — table header section
|
|
18
|
+
- **TableBody** — table body section
|
|
19
|
+
- **TableRow** — table row
|
|
20
|
+
- **TableHeaderCell** — header cell
|
|
21
|
+
- **TableCell** — regular table cell
|
|
22
|
+
|
|
23
|
+
The component supports all native HTML table attributes and allows rendering any React content inside cells.
|
|
24
|
+
`,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
} satisfies Meta<typeof Table>
|
|
29
|
+
|
|
30
|
+
export default meta
|
|
31
|
+
|
|
32
|
+
type Story = StoryObj<typeof meta>
|
|
33
|
+
|
|
34
|
+
const users = [
|
|
35
|
+
{
|
|
36
|
+
id: 1,
|
|
37
|
+
name: 'John Doe',
|
|
38
|
+
email: 'john.doe@example.com',
|
|
39
|
+
role: 'Admin',
|
|
40
|
+
status: 'Active',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 2,
|
|
44
|
+
name: 'Jane Smith',
|
|
45
|
+
email: 'jane.smith@example.com',
|
|
46
|
+
role: 'Editor',
|
|
47
|
+
status: 'Active',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 3,
|
|
51
|
+
name: 'Alex Johnson',
|
|
52
|
+
email: 'alex.johnson@example.com',
|
|
53
|
+
role: 'User',
|
|
54
|
+
status: 'Inactive',
|
|
55
|
+
},
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
export const Default: Story = {
|
|
59
|
+
render: () => (
|
|
60
|
+
<Table>
|
|
61
|
+
<TableHead>
|
|
62
|
+
<TableRow>
|
|
63
|
+
<TableHeaderCell>Name</TableHeaderCell>
|
|
64
|
+
<TableHeaderCell>Email</TableHeaderCell>
|
|
65
|
+
<TableHeaderCell>Role</TableHeaderCell>
|
|
66
|
+
</TableRow>
|
|
67
|
+
</TableHead>
|
|
68
|
+
|
|
69
|
+
<TableBody>
|
|
70
|
+
{users.map(user => (
|
|
71
|
+
<TableRow key={user.id}>
|
|
72
|
+
<TableCell>{user.name}</TableCell>
|
|
73
|
+
<TableCell>{user.email}</TableCell>
|
|
74
|
+
<TableCell>{user.role}</TableCell>
|
|
75
|
+
</TableRow>
|
|
76
|
+
))}
|
|
77
|
+
</TableBody>
|
|
78
|
+
</Table>
|
|
79
|
+
),
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const WithMoreColumns: Story = {
|
|
83
|
+
render: () => (
|
|
84
|
+
<Table>
|
|
85
|
+
<TableHead>
|
|
86
|
+
<TableRow>
|
|
87
|
+
<TableHeaderCell>Name</TableHeaderCell>
|
|
88
|
+
<TableHeaderCell>Email</TableHeaderCell>
|
|
89
|
+
<TableHeaderCell>Role</TableHeaderCell>
|
|
90
|
+
<TableHeaderCell>Status</TableHeaderCell>
|
|
91
|
+
<TableHeaderCell>Last Login</TableHeaderCell>
|
|
92
|
+
</TableRow>
|
|
93
|
+
</TableHead>
|
|
94
|
+
|
|
95
|
+
<TableBody>
|
|
96
|
+
{users.map(user => (
|
|
97
|
+
<TableRow key={user.id}>
|
|
98
|
+
<TableCell>{user.name}</TableCell>
|
|
99
|
+
<TableCell>{user.email}</TableCell>
|
|
100
|
+
<TableCell>{user.role}</TableCell>
|
|
101
|
+
<TableCell>{user.status}</TableCell>
|
|
102
|
+
<TableCell>Today, 12:30</TableCell>
|
|
103
|
+
</TableRow>
|
|
104
|
+
))}
|
|
105
|
+
</TableBody>
|
|
106
|
+
</Table>
|
|
107
|
+
),
|
|
108
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { Tabs } from '@/components/Tabs'
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Tabs',
|
|
6
|
+
component: Tabs,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
backgrounds: {
|
|
11
|
+
default: 'dark',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
tabs: {
|
|
16
|
+
control: false,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
} satisfies Meta<typeof Tabs>
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
|
|
23
|
+
type Story = StoryObj<typeof meta>
|
|
24
|
+
|
|
25
|
+
const baseTabs = [
|
|
26
|
+
{
|
|
27
|
+
value: 'tab1',
|
|
28
|
+
label: 'General',
|
|
29
|
+
content: 'General content',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: 'tab2',
|
|
33
|
+
label: 'Devices',
|
|
34
|
+
content: 'Devices content',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: 'tab3',
|
|
38
|
+
label: 'Payments',
|
|
39
|
+
content: 'Payments content',
|
|
40
|
+
},
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
const createTabs = (disabledTabs: string[] = []) =>
|
|
44
|
+
baseTabs.map(tab => ({
|
|
45
|
+
...tab,
|
|
46
|
+
disabled: disabledTabs.includes(tab.value),
|
|
47
|
+
}))
|
|
48
|
+
|
|
49
|
+
export const Default: Story = {
|
|
50
|
+
args: {
|
|
51
|
+
tabs: createTabs(),
|
|
52
|
+
defaultValue: 'tab1',
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const SecondActive: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
tabs: createTabs(),
|
|
59
|
+
defaultValue: 'tab2',
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const Disabled: Story = {
|
|
64
|
+
args: {
|
|
65
|
+
tabs: createTabs(['tab2']),
|
|
66
|
+
defaultValue: 'tab1',
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const AllDisabled: Story = {
|
|
71
|
+
args: {
|
|
72
|
+
tabs: createTabs(['tab1', 'tab2', 'tab3']),
|
|
73
|
+
defaultValue: 'tab1',
|
|
74
|
+
},
|
|
75
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { TestMixins } from '@/demo'
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Styles/TestMixins',
|
|
6
|
+
component: TestMixins,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen',
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof TestMixins>
|
|
11
|
+
|
|
12
|
+
export default meta
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof meta>
|
|
15
|
+
|
|
16
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { userEvent, within } from 'storybook/test'
|
|
3
|
+
import { TextArea } from '@/components/TextArea'
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof TextArea> = {
|
|
6
|
+
title: 'Components/TextArea',
|
|
7
|
+
component: TextArea,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
backgrounds: {
|
|
11
|
+
default: 'dark',
|
|
12
|
+
},
|
|
13
|
+
layout: 'centered',
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
|
|
19
|
+
type Story = StoryObj<typeof TextArea>
|
|
20
|
+
|
|
21
|
+
export const Default: Story = {
|
|
22
|
+
args: {
|
|
23
|
+
label: 'Text-area',
|
|
24
|
+
placeholder: 'Enter text...',
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const FocusWithTyping: Story = {
|
|
29
|
+
args: {
|
|
30
|
+
label: 'Typing text (Mouse Focus)',
|
|
31
|
+
placeholder: 'Text has been entered here...',
|
|
32
|
+
},
|
|
33
|
+
play: async ({ canvasElement }) => {
|
|
34
|
+
const canvas = within(canvasElement)
|
|
35
|
+
const textarea = canvas.getByRole('textbox')
|
|
36
|
+
await userEvent.type(textarea, 'Hello, I am typing text!')
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const FocusViaKeyboard: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
label: 'Keyboard Focus (Tab)',
|
|
43
|
+
placeholder: 'Press Tab to see the blue border',
|
|
44
|
+
},
|
|
45
|
+
play: async () => {
|
|
46
|
+
await userEvent.tab()
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const ErrorState: Story = {
|
|
51
|
+
args: {
|
|
52
|
+
label: 'Error State',
|
|
53
|
+
placeholder: 'Text with error',
|
|
54
|
+
error: 'This field is required',
|
|
55
|
+
defaultValue: 'Invalid text',
|
|
56
|
+
},
|
|
57
|
+
play: async ({ canvasElement }) => {
|
|
58
|
+
const canvas = within(canvasElement)
|
|
59
|
+
const textarea = canvas.getByRole('textbox')
|
|
60
|
+
await userEvent.click(textarea)
|
|
61
|
+
await userEvent.hover(textarea)
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const Disabled: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
label: 'Disabled',
|
|
68
|
+
placeholder: 'Unavailable for input',
|
|
69
|
+
disabled: true,
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const WithValue: Story = {
|
|
74
|
+
args: {
|
|
75
|
+
label: 'With Value (No Focus)',
|
|
76
|
+
defaultValue: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
|
|
77
|
+
},
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const WithScrollbar: Story = {
|
|
81
|
+
args: {
|
|
82
|
+
label: 'Description',
|
|
83
|
+
placeholder: 'Enter a long text...',
|
|
84
|
+
rows: 5,
|
|
85
|
+
defaultValue: `Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
86
|
+
|
|
87
|
+
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
88
|
+
|
|
89
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
90
|
+
|
|
91
|
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
92
|
+
|
|
93
|
+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.`,
|
|
94
|
+
},
|
|
95
|
+
render: args => (
|
|
96
|
+
<div>
|
|
97
|
+
<TextArea {...args} />
|
|
98
|
+
</div>
|
|
99
|
+
),
|
|
100
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import type { TooltipProps } from '@/components/Tooltip/Tooltip'
|
|
3
|
+
import { Tooltip } from '@/components/Tooltip'
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Tooltip> = {
|
|
6
|
+
title: 'Components/Tooltip',
|
|
7
|
+
component: Tooltip,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
delayDuration: {
|
|
11
|
+
control: { type: 'number' },
|
|
12
|
+
description: 'The delay before the tooltip appears, in milliseconds',
|
|
13
|
+
defaultValue: 200,
|
|
14
|
+
},
|
|
15
|
+
sideOffset: {
|
|
16
|
+
control: { type: 'number' },
|
|
17
|
+
description: 'The distance between the tooltip content and the trigger element',
|
|
18
|
+
defaultValue: 8,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default meta
|
|
24
|
+
type Story = StoryObj<typeof Tooltip>
|
|
25
|
+
|
|
26
|
+
export const Default: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
delayDuration: 200,
|
|
29
|
+
sideOffset: 8,
|
|
30
|
+
children: (
|
|
31
|
+
<button type={'button'} style={{ padding: '0.5rem 1rem', cursor: 'pointer' }}>
|
|
32
|
+
Hover over me
|
|
33
|
+
</button>
|
|
34
|
+
),
|
|
35
|
+
|
|
36
|
+
content: (
|
|
37
|
+
<div>
|
|
38
|
+
<div className={'typography-h3'} style={{ marginBottom: '0.5rem' }}>
|
|
39
|
+
Remember!
|
|
40
|
+
</div>
|
|
41
|
+
<div className={'typography-body1'}>
|
|
42
|
+
Clicking [ Log Out ] should redirect you to the Sign In page
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
),
|
|
46
|
+
} as TooltipProps,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const SimpleText: Story = {
|
|
50
|
+
args: {
|
|
51
|
+
children: <span>ℹ️ Подсказка</span>,
|
|
52
|
+
content: 'This is a simple helper text for the user.',
|
|
53
|
+
} as TooltipProps,
|
|
54
|
+
}
|