@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,301 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { Typography } from '@/components'
|
|
3
|
+
import { Avatar, AvatarBlock } from '@/components/Avatar'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/Avatar/AvatarBlock',
|
|
7
|
+
component: AvatarBlock,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Shows the last 3 users from the array of the users',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
argTypes: {
|
|
18
|
+
className: {
|
|
19
|
+
control: 'text',
|
|
20
|
+
description: 'Additional CSS classes for the container',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
} satisfies Meta<typeof AvatarBlock>
|
|
24
|
+
|
|
25
|
+
export default meta
|
|
26
|
+
type Story = StoryObj<typeof meta>
|
|
27
|
+
|
|
28
|
+
// Sample users data
|
|
29
|
+
const USERS = [
|
|
30
|
+
{
|
|
31
|
+
src: 'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80',
|
|
32
|
+
alt: 'Jane Doe',
|
|
33
|
+
userName: 'Jane Doe',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
src: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?&w=128&h=128&dpr=2&q=80',
|
|
37
|
+
alt: 'Charlie Brown',
|
|
38
|
+
userName: 'Charlie Brown',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
src: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?&w=128&h=128&dpr=2&q=80',
|
|
42
|
+
alt: 'Alex Johnson',
|
|
43
|
+
userName: 'Alex Johnson',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
src: 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?&w=128&h=128&dpr=2&q=80',
|
|
47
|
+
alt: 'Diana Clark',
|
|
48
|
+
userName: 'Diana Clark',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
src: 'https://images.unsplash.com/photo-1531746020798-e6953c6e8e04?&w=128&h=128&dpr=2&q=80',
|
|
52
|
+
alt: 'Fiona Anderson',
|
|
53
|
+
userName: 'Fiona Anderson',
|
|
54
|
+
},
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
// Default story - shows last 3 users
|
|
58
|
+
export const Default: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
users: USERS,
|
|
61
|
+
},
|
|
62
|
+
parameters: {
|
|
63
|
+
docs: {
|
|
64
|
+
description: {
|
|
65
|
+
story: 'Shows the last 3 users from the array',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export const FiveUsersPassedAsProps: Story = {
|
|
72
|
+
args: {
|
|
73
|
+
users: USERS,
|
|
74
|
+
},
|
|
75
|
+
parameters: {
|
|
76
|
+
docs: {
|
|
77
|
+
description: {
|
|
78
|
+
story: 'Despite having 5 users, only the last 3 are displayed',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const ExactlyThreeUsers: Story = {
|
|
85
|
+
args: {
|
|
86
|
+
users: USERS.slice(0, 3),
|
|
87
|
+
},
|
|
88
|
+
parameters: {
|
|
89
|
+
docs: {
|
|
90
|
+
description: {
|
|
91
|
+
story: 'When exactly 3 users are provided, all are shown',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export const TwoUsers: Story = {
|
|
98
|
+
args: {
|
|
99
|
+
users: USERS.slice(0, 2),
|
|
100
|
+
},
|
|
101
|
+
parameters: {
|
|
102
|
+
docs: {
|
|
103
|
+
description: {
|
|
104
|
+
story: 'When less than 3 users are provided, all are shown',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export const SingleUser: Story = {
|
|
111
|
+
args: {
|
|
112
|
+
users: [USERS[0]],
|
|
113
|
+
},
|
|
114
|
+
parameters: {
|
|
115
|
+
docs: {
|
|
116
|
+
description: {
|
|
117
|
+
story: 'Single user display',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export const EmptyUserArray: Story = {
|
|
124
|
+
args: {
|
|
125
|
+
users: [],
|
|
126
|
+
},
|
|
127
|
+
parameters: {
|
|
128
|
+
docs: {
|
|
129
|
+
description: {
|
|
130
|
+
story: 'Empty state when no users are provided',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export const WithoutImages: Story = {
|
|
137
|
+
args: {
|
|
138
|
+
users: [
|
|
139
|
+
{ userName: 'John Doe' },
|
|
140
|
+
{ userName: 'Sarah Smith' },
|
|
141
|
+
{ userName: 'Michael Brown' },
|
|
142
|
+
{ userName: 'Emma Wilson' },
|
|
143
|
+
{ userName: 'James Taylor' },
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
parameters: {
|
|
147
|
+
docs: {
|
|
148
|
+
description: {
|
|
149
|
+
story: 'Users without profile images show their initials as fallback',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export const Mixed: Story = {
|
|
156
|
+
args: {
|
|
157
|
+
users: [
|
|
158
|
+
{
|
|
159
|
+
src: 'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80',
|
|
160
|
+
alt: 'Jane Doe',
|
|
161
|
+
userName: 'Jane Doe',
|
|
162
|
+
},
|
|
163
|
+
{ userName: 'John Smith' },
|
|
164
|
+
{
|
|
165
|
+
src: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?&w=128&h=128&dpr=2&q=80',
|
|
166
|
+
alt: 'Alex Johnson',
|
|
167
|
+
userName: 'Alex Johnson',
|
|
168
|
+
},
|
|
169
|
+
{ userName: 'Sarah Williams' },
|
|
170
|
+
{
|
|
171
|
+
src: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?&w=128&h=128&dpr=2&q=80',
|
|
172
|
+
alt: 'Charlie Brown',
|
|
173
|
+
userName: 'Charlie Brown',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
parameters: {
|
|
178
|
+
docs: {
|
|
179
|
+
description: {
|
|
180
|
+
story: 'Mixed users - some with images, others showing initials',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export const WithCustomClass: Story = {
|
|
187
|
+
args: {
|
|
188
|
+
users: USERS,
|
|
189
|
+
className: 'custom-avatar-group',
|
|
190
|
+
},
|
|
191
|
+
parameters: {
|
|
192
|
+
docs: {
|
|
193
|
+
description: {
|
|
194
|
+
story: 'AvatarBlock with custom CSS class applied to the container',
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export const WithDelay: Story = {
|
|
201
|
+
args: {
|
|
202
|
+
users: USERS.map((user, index) => ({
|
|
203
|
+
...user,
|
|
204
|
+
delayMs: (index + 1) * 100, // increasing delay for each avatar
|
|
205
|
+
})),
|
|
206
|
+
},
|
|
207
|
+
parameters: {
|
|
208
|
+
docs: {
|
|
209
|
+
description: {
|
|
210
|
+
story: 'Each avatar has a different delay (100ms, 200ms, 300ms) before showing fallback',
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// Long names
|
|
217
|
+
export const LongNames: Story = {
|
|
218
|
+
args: {
|
|
219
|
+
users: [
|
|
220
|
+
{ userName: 'Christopher Alexander' },
|
|
221
|
+
{ userName: 'Elizabeth Catherine Bennett' },
|
|
222
|
+
{ userName: 'William Henry Harrison' },
|
|
223
|
+
{ userName: 'Alexandria Maria Rodriguez' },
|
|
224
|
+
{ userName: 'Jonathan David Williamson' },
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
parameters: {
|
|
228
|
+
docs: {
|
|
229
|
+
description: {
|
|
230
|
+
story: 'Users with long names - only first letter is shown',
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export const SpecialCharacters: Story = {
|
|
237
|
+
args: {
|
|
238
|
+
users: [
|
|
239
|
+
{ userName: 'José García' },
|
|
240
|
+
{ userName: 'Marie-Claire Dupont' },
|
|
241
|
+
{ userName: 'Łukasz Kowalski' },
|
|
242
|
+
{ userName: 'Müller-Schmidt' },
|
|
243
|
+
{ userName: 'Åsa Johansson' },
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
parameters: {
|
|
247
|
+
docs: {
|
|
248
|
+
description: {
|
|
249
|
+
story: 'Users with special characters in their names',
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export const Comparison: Story = {
|
|
256
|
+
args: {
|
|
257
|
+
users: USERS,
|
|
258
|
+
},
|
|
259
|
+
|
|
260
|
+
render: args => (
|
|
261
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem', maxWidth: '31.25rem' }}>
|
|
262
|
+
<div>
|
|
263
|
+
<Typography variant={'h3'} style={{ marginBottom: '0.625rem' }}>
|
|
264
|
+
All 5 Users (passed to component)
|
|
265
|
+
</Typography>
|
|
266
|
+
|
|
267
|
+
<div style={{ display: 'flex', gap: '0.5rem', flexWrap: 'wrap' }}>
|
|
268
|
+
{USERS.map((user, i) => (
|
|
269
|
+
<div
|
|
270
|
+
key={i}
|
|
271
|
+
style={{
|
|
272
|
+
display: 'flex',
|
|
273
|
+
flexDirection: 'column',
|
|
274
|
+
alignItems: 'center',
|
|
275
|
+
padding: '0.5rem',
|
|
276
|
+
background: 'var(--color-accent-300)',
|
|
277
|
+
borderRadius: '4px',
|
|
278
|
+
}}
|
|
279
|
+
>
|
|
280
|
+
<Avatar userName={user.userName} src={user.src} alt={user.alt} size={'xs'} />
|
|
281
|
+
<Typography variant={'caption1'} style={{ marginTop: '0.625rem' }}>
|
|
282
|
+
{user.userName}
|
|
283
|
+
</Typography>
|
|
284
|
+
</div>
|
|
285
|
+
))}
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
<Typography variant={'h3'} style={{ marginBottom: '0.625rem' }}>
|
|
289
|
+
Displayed (last 3 users only)
|
|
290
|
+
</Typography>
|
|
291
|
+
<AvatarBlock {...args} />
|
|
292
|
+
</div>
|
|
293
|
+
),
|
|
294
|
+
parameters: {
|
|
295
|
+
docs: {
|
|
296
|
+
description: {
|
|
297
|
+
story: 'Visual comparison showing all 5 users vs the 3 that are actually displayed',
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import { fn } from 'storybook/test'
|
|
4
|
+
import { MainAvatar } from '@/components/Avatar'
|
|
5
|
+
import { Button } from '@/components/Button'
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Components/Avatar/MainAvatar',
|
|
9
|
+
component: MainAvatar,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
argTypes: {
|
|
15
|
+
size: {
|
|
16
|
+
control: 'select',
|
|
17
|
+
options: ['xl', 'xxl'],
|
|
18
|
+
description: 'MainAvatar size',
|
|
19
|
+
},
|
|
20
|
+
src: {
|
|
21
|
+
control: 'text',
|
|
22
|
+
description: 'Image source URL',
|
|
23
|
+
},
|
|
24
|
+
alt: {
|
|
25
|
+
control: 'text',
|
|
26
|
+
description: 'Alternative text for image',
|
|
27
|
+
},
|
|
28
|
+
userName: {
|
|
29
|
+
control: 'text',
|
|
30
|
+
description: 'User name for fallback letter',
|
|
31
|
+
},
|
|
32
|
+
delayMs: {
|
|
33
|
+
control: 'number',
|
|
34
|
+
description: 'Delay in milliseconds before showing fallback',
|
|
35
|
+
},
|
|
36
|
+
showCloseButton: {
|
|
37
|
+
control: 'boolean',
|
|
38
|
+
description: 'Show close button',
|
|
39
|
+
},
|
|
40
|
+
onClose: {
|
|
41
|
+
action: 'onClose clicked',
|
|
42
|
+
description: 'Callback when close button is clicked',
|
|
43
|
+
},
|
|
44
|
+
className: {
|
|
45
|
+
control: 'text',
|
|
46
|
+
description: 'Additional CSS classes',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
args: {
|
|
50
|
+
onClose: fn(),
|
|
51
|
+
},
|
|
52
|
+
} satisfies Meta<typeof MainAvatar>
|
|
53
|
+
|
|
54
|
+
export default meta
|
|
55
|
+
type Story = StoryObj<typeof MainAvatar>
|
|
56
|
+
|
|
57
|
+
export const WithImage: Story = {
|
|
58
|
+
args: {
|
|
59
|
+
src: 'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80',
|
|
60
|
+
userName: 'Jane Doe',
|
|
61
|
+
alt: 'Jane Doe avatar',
|
|
62
|
+
size: 'xl',
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const WithFallback: Story = {
|
|
67
|
+
args: {
|
|
68
|
+
userName: 'Jane Smith',
|
|
69
|
+
size: 'xl',
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const Sizes: Story = {
|
|
74
|
+
render: () => (
|
|
75
|
+
<div style={{ display: 'flex', gap: '1rem', alignItems: 'center' }}>
|
|
76
|
+
<MainAvatar userName={'John Doe'} size={'xl'} showCloseButton />
|
|
77
|
+
<MainAvatar
|
|
78
|
+
src={'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80'}
|
|
79
|
+
userName={'Jane Doe'}
|
|
80
|
+
alt={'Jane Doe avatar'}
|
|
81
|
+
size={'xxl'}
|
|
82
|
+
showCloseButton
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
),
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const WithImageAndFallback: Story = {
|
|
89
|
+
args: {
|
|
90
|
+
src: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?&w=128&h=128&dpr=2&q=80',
|
|
91
|
+
userName: 'Alex Johnson',
|
|
92
|
+
size: 'xl',
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const BrokenImage: Story = {
|
|
97
|
+
args: {
|
|
98
|
+
src: 'https://invalid-url.com/image.jpg',
|
|
99
|
+
userName: 'Broken Image',
|
|
100
|
+
size: 'xl',
|
|
101
|
+
},
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const DelayedFallback: Story = {
|
|
105
|
+
args: {
|
|
106
|
+
src: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?&w=128&h=128&dpr=2&q=80',
|
|
107
|
+
userName: 'Delayed User',
|
|
108
|
+
delayMs: 2000,
|
|
109
|
+
size: 'xl',
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export const WithoutDelay: Story = {
|
|
114
|
+
args: {
|
|
115
|
+
userName: 'No Delay',
|
|
116
|
+
delayMs: 0,
|
|
117
|
+
size: 'xl',
|
|
118
|
+
},
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const EmptyName: Story = {
|
|
122
|
+
args: {
|
|
123
|
+
userName: '',
|
|
124
|
+
size: 'xl',
|
|
125
|
+
},
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export const Grid: Story = {
|
|
129
|
+
render: () => {
|
|
130
|
+
const users = [
|
|
131
|
+
{
|
|
132
|
+
name: 'Jane Doe',
|
|
133
|
+
src: 'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
src: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?&w=128&h=128&dpr=2&q=80',
|
|
137
|
+
showCloseButton: true,
|
|
138
|
+
onClose: () => alert('Close button clicked!'),
|
|
139
|
+
name: 'Alex Johnson',
|
|
140
|
+
},
|
|
141
|
+
{ name: 'Charlie Brown' },
|
|
142
|
+
{
|
|
143
|
+
src: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?&w=128&h=128&dpr=2&q=80',
|
|
144
|
+
name: 'Diana Clark',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'Edward Norton',
|
|
148
|
+
showCloseButton: true,
|
|
149
|
+
onClose: () => alert('Close button clicked!'),
|
|
150
|
+
},
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
155
|
+
{users.map((user, index) => (
|
|
156
|
+
<MainAvatar
|
|
157
|
+
key={index}
|
|
158
|
+
userName={user.name}
|
|
159
|
+
src={user.src}
|
|
160
|
+
showCloseButton={user.showCloseButton}
|
|
161
|
+
onClose={user.onClose}
|
|
162
|
+
size={'xl'}
|
|
163
|
+
/>
|
|
164
|
+
))}
|
|
165
|
+
</div>
|
|
166
|
+
)
|
|
167
|
+
},
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export const InteractiveDemo: Story = {
|
|
171
|
+
render: function InteractiveDemo() {
|
|
172
|
+
const [isVisible, setIsVisible] = useState(true)
|
|
173
|
+
|
|
174
|
+
return (
|
|
175
|
+
<>
|
|
176
|
+
{!isVisible ? (
|
|
177
|
+
<Button
|
|
178
|
+
onClick={() => {
|
|
179
|
+
setIsVisible(true)
|
|
180
|
+
}}
|
|
181
|
+
>
|
|
182
|
+
Reset Avatar
|
|
183
|
+
</Button>
|
|
184
|
+
) : (
|
|
185
|
+
<MainAvatar
|
|
186
|
+
userName={'Jane Doe'}
|
|
187
|
+
src={
|
|
188
|
+
'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80'
|
|
189
|
+
}
|
|
190
|
+
size={'xl'}
|
|
191
|
+
showCloseButton
|
|
192
|
+
onClose={() => {
|
|
193
|
+
setIsVisible(false)
|
|
194
|
+
}}
|
|
195
|
+
/>
|
|
196
|
+
)}
|
|
197
|
+
</>
|
|
198
|
+
)
|
|
199
|
+
},
|
|
200
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { FlagEng, FlagRus } from '@/assets'
|
|
3
|
+
import { Button } from '@/components/Button'
|
|
4
|
+
import { buttonMeta } from '@/storybook-utils'
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
...buttonMeta,
|
|
8
|
+
title: 'Components/Data Entry/Button',
|
|
9
|
+
component: Button,
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component:
|
|
14
|
+
"Accepts all props of the native button element. Uses React 19's ref prop forwarding, allowing refs to be passed directly to the underlying DOM element or component",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
} satisfies Meta<typeof Button>
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
type Story = StoryObj<typeof meta>
|
|
23
|
+
|
|
24
|
+
export const Primary: Story = {
|
|
25
|
+
args: {
|
|
26
|
+
children: 'Button',
|
|
27
|
+
disabled: false,
|
|
28
|
+
variant: 'primary',
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const Secondary: Story = {
|
|
33
|
+
args: {
|
|
34
|
+
children: 'Button',
|
|
35
|
+
disabled: false,
|
|
36
|
+
variant: 'secondary',
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const Outlined: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
children: 'Button',
|
|
43
|
+
disabled: false,
|
|
44
|
+
variant: 'outlined',
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const Text: Story = {
|
|
49
|
+
args: {
|
|
50
|
+
children: 'Button',
|
|
51
|
+
disabled: false,
|
|
52
|
+
variant: 'text',
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const PrimaryFullWidth: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
children: 'Button',
|
|
59
|
+
disabled: true,
|
|
60
|
+
variant: 'primary',
|
|
61
|
+
fullWidth: true,
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const SecondaryWithRuLang: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
children: (
|
|
68
|
+
<>
|
|
69
|
+
<FlagRus /> Russian
|
|
70
|
+
</>
|
|
71
|
+
),
|
|
72
|
+
disabled: false,
|
|
73
|
+
variant: 'secondary',
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const SecondaryWithEnLang: Story = {
|
|
78
|
+
args: {
|
|
79
|
+
children: (
|
|
80
|
+
<>
|
|
81
|
+
<FlagEng /> English
|
|
82
|
+
</>
|
|
83
|
+
),
|
|
84
|
+
disabled: false,
|
|
85
|
+
variant: 'secondary',
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const PrimaryAsLink: Story = {
|
|
90
|
+
args: {
|
|
91
|
+
as: 'a',
|
|
92
|
+
children: 'Link',
|
|
93
|
+
disabled: false,
|
|
94
|
+
href: 'https://google.com',
|
|
95
|
+
rel: 'noopener noreferrer',
|
|
96
|
+
target: '_blank',
|
|
97
|
+
variant: 'primary',
|
|
98
|
+
},
|
|
99
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { FlagEng, FlagRus } from '@/assets'
|
|
3
|
+
import { ButtonLegacy } from '@/components/Button'
|
|
4
|
+
import { buttonMeta } from '@/storybook-utils'
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
...buttonMeta,
|
|
8
|
+
title: 'Components/Data Entry/ButtonLegacy',
|
|
9
|
+
component: ButtonLegacy,
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component:
|
|
14
|
+
"Accepts all props of the native button element. Uses React's `forwardRef` API for ref forwarding, which is the standard approach for ref handling in React versions below 19",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
} satisfies Meta<typeof ButtonLegacy>
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
type Story = StoryObj<typeof meta>
|
|
23
|
+
|
|
24
|
+
export const Primary: Story = {
|
|
25
|
+
args: {
|
|
26
|
+
children: 'Button',
|
|
27
|
+
disabled: false,
|
|
28
|
+
variant: 'primary',
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const Secondary: Story = {
|
|
33
|
+
args: {
|
|
34
|
+
children: 'Button',
|
|
35
|
+
disabled: false,
|
|
36
|
+
variant: 'secondary',
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const Outlined: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
children: 'Button',
|
|
43
|
+
disabled: false,
|
|
44
|
+
variant: 'outlined',
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const Text: Story = {
|
|
49
|
+
args: {
|
|
50
|
+
children: 'Button',
|
|
51
|
+
disabled: false,
|
|
52
|
+
variant: 'text',
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const PrimaryFullWidth: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
children: 'Button',
|
|
59
|
+
disabled: true,
|
|
60
|
+
variant: 'primary',
|
|
61
|
+
fullWidth: true,
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const SecondaryWithRuLang: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
children: (
|
|
68
|
+
<>
|
|
69
|
+
<FlagRus /> Russian
|
|
70
|
+
</>
|
|
71
|
+
),
|
|
72
|
+
disabled: false,
|
|
73
|
+
variant: 'secondary',
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const SecondaryWithEnLang: Story = {
|
|
78
|
+
args: {
|
|
79
|
+
children: (
|
|
80
|
+
<>
|
|
81
|
+
<FlagEng /> English
|
|
82
|
+
</>
|
|
83
|
+
),
|
|
84
|
+
disabled: false,
|
|
85
|
+
variant: 'secondary',
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const PrimaryAsLink: Story = {
|
|
90
|
+
args: {
|
|
91
|
+
as: 'a',
|
|
92
|
+
children: 'Link',
|
|
93
|
+
disabled: false,
|
|
94
|
+
href: 'https://google.com',
|
|
95
|
+
rel: 'noopener noreferrer',
|
|
96
|
+
target: '_blank',
|
|
97
|
+
variant: 'primary',
|
|
98
|
+
},
|
|
99
|
+
}
|