@candy.thieves/ui-kit-lumos 0.0.23 → 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,23 @@
|
|
|
1
|
+
.table {
|
|
2
|
+
border-collapse: collapse;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.head {
|
|
7
|
+
background-color: var(--color-dark-500);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.row {
|
|
11
|
+
border-bottom: 1px solid var(--color-dark-500);
|
|
12
|
+
|
|
13
|
+
&:last-child {
|
|
14
|
+
border-bottom: none;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.headerCell,
|
|
19
|
+
.cell {
|
|
20
|
+
padding: 0.75rem 1.5rem;
|
|
21
|
+
text-align: left;
|
|
22
|
+
vertical-align: middle;
|
|
23
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import type { ComponentPropsWithoutRef } from 'react'
|
|
4
|
+
import clsx from 'clsx'
|
|
5
|
+
import { forwardRef } from 'react'
|
|
6
|
+
import { Typography } from '@/components'
|
|
7
|
+
import s from './Table.module.scss'
|
|
8
|
+
|
|
9
|
+
export const Table = forwardRef<HTMLTableElement, ComponentPropsWithoutRef<'table'>>(
|
|
10
|
+
({ className, ...props }, ref) => (
|
|
11
|
+
<table ref={ref} className={clsx(s.table, className)} {...props} />
|
|
12
|
+
)
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
Table.displayName = 'Table'
|
|
16
|
+
|
|
17
|
+
export const TableHead = forwardRef<HTMLTableSectionElement, ComponentPropsWithoutRef<'thead'>>(
|
|
18
|
+
({ className, ...props }, ref) => (
|
|
19
|
+
<thead ref={ref} className={clsx(s.head, className)} {...props} />
|
|
20
|
+
)
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
TableHead.displayName = 'TableHead'
|
|
24
|
+
|
|
25
|
+
export const TableBody = forwardRef<HTMLTableSectionElement, ComponentPropsWithoutRef<'tbody'>>(
|
|
26
|
+
({ className, ...props }, ref) => (
|
|
27
|
+
<tbody ref={ref} className={clsx(s.body, className)} {...props} />
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
TableBody.displayName = 'TableBody'
|
|
32
|
+
|
|
33
|
+
export const TableRow = forwardRef<HTMLTableRowElement, ComponentPropsWithoutRef<'tr'>>(
|
|
34
|
+
({ className, ...props }, ref) => <tr ref={ref} className={clsx(s.row, className)} {...props} />
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
TableRow.displayName = 'TableRow'
|
|
38
|
+
|
|
39
|
+
export const TableHeaderCell = forwardRef<HTMLTableCellElement, ComponentPropsWithoutRef<'th'>>(
|
|
40
|
+
({ className, children, ...props }, ref) => (
|
|
41
|
+
<th ref={ref} className={clsx(s.headerCell, className)} {...props}>
|
|
42
|
+
<Typography variant={'body3'}>{children}</Typography>
|
|
43
|
+
</th>
|
|
44
|
+
)
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
TableHeaderCell.displayName = 'TableHeaderCell'
|
|
48
|
+
|
|
49
|
+
export const TableCell = forwardRef<HTMLTableCellElement, ComponentPropsWithoutRef<'td'>>(
|
|
50
|
+
({ className, children, ...props }, ref) => (
|
|
51
|
+
<td ref={ref} className={clsx(s.cell, className)} {...props}>
|
|
52
|
+
<Typography variant={'body1'}>{children}</Typography>
|
|
53
|
+
</td>
|
|
54
|
+
)
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
TableCell.displayName = 'TableCell'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Table'
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@use '@/styles/mixins' as *;
|
|
2
|
+
|
|
3
|
+
.list {
|
|
4
|
+
@include flex(flex);
|
|
5
|
+
|
|
6
|
+
width: 100%;
|
|
7
|
+
border-bottom: 2px solid var(--color-dark-100);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.trigger {
|
|
11
|
+
all: unset;
|
|
12
|
+
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
user-select: none;
|
|
15
|
+
|
|
16
|
+
position: relative;
|
|
17
|
+
|
|
18
|
+
flex: 1;
|
|
19
|
+
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
height: 36px;
|
|
22
|
+
padding: 0 1rem;
|
|
23
|
+
border-radius: 2px;
|
|
24
|
+
|
|
25
|
+
color: var(--color-dark-100);
|
|
26
|
+
|
|
27
|
+
&::after {
|
|
28
|
+
content: '';
|
|
29
|
+
|
|
30
|
+
position: absolute;
|
|
31
|
+
right: 0;
|
|
32
|
+
bottom: -2px;
|
|
33
|
+
left: 0;
|
|
34
|
+
|
|
35
|
+
height: 2px;
|
|
36
|
+
|
|
37
|
+
background: transparent;
|
|
38
|
+
|
|
39
|
+
@include transition-basic(background-color);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:hover:not(:disabled) {
|
|
43
|
+
background: var(--color-dark-500);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:focus-visible {
|
|
47
|
+
z-index: 2;
|
|
48
|
+
outline: none;
|
|
49
|
+
box-shadow: 0 0 0 2px var(--color-accent-500);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:disabled {
|
|
53
|
+
cursor: default;
|
|
54
|
+
color: var(--color-dark-100);
|
|
55
|
+
opacity: 0.5;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:active:not(:disabled) {
|
|
59
|
+
background: var(--color-dark-300);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&[data-state='active'] {
|
|
63
|
+
color: var(--color-accent-500);
|
|
64
|
+
background: transparent;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&[data-state='active']::after {
|
|
68
|
+
background: var(--color-accent-500);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:disabled::after {
|
|
72
|
+
background: transparent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@include flex(flex, center, center);
|
|
76
|
+
|
|
77
|
+
@include transition-basic(background-color, color);
|
|
78
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs'
|
|
4
|
+
import clsx from 'clsx'
|
|
5
|
+
import { forwardRef, type ComponentPropsWithoutRef, type ComponentRef, type ReactNode } from 'react'
|
|
6
|
+
import s from './Tabs.module.scss'
|
|
7
|
+
|
|
8
|
+
export type Tab = {
|
|
9
|
+
value: string
|
|
10
|
+
label: string
|
|
11
|
+
content: ReactNode
|
|
12
|
+
disabled?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type TabsProps = Omit<
|
|
16
|
+
ComponentPropsWithoutRef<typeof TabsPrimitive.Root>,
|
|
17
|
+
'defaultValue' | 'onValueChange'
|
|
18
|
+
> & {
|
|
19
|
+
tabs: Tab[]
|
|
20
|
+
defaultValue?: string
|
|
21
|
+
onValueChange?: (value: string) => void
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const Tabs = forwardRef<ComponentRef<typeof TabsPrimitive.Root>, TabsProps>(
|
|
25
|
+
({ tabs, defaultValue, onValueChange, className, ...props }, ref) => {
|
|
26
|
+
return (
|
|
27
|
+
<TabsPrimitive.Root
|
|
28
|
+
ref={ref}
|
|
29
|
+
defaultValue={defaultValue ?? tabs[0]?.value}
|
|
30
|
+
onValueChange={onValueChange}
|
|
31
|
+
className={clsx(className)}
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
<TabsPrimitive.List className={s.list} loop>
|
|
35
|
+
{tabs.map(tab => (
|
|
36
|
+
<TabsPrimitive.Trigger
|
|
37
|
+
key={tab.value}
|
|
38
|
+
value={tab.value}
|
|
39
|
+
disabled={tab.disabled}
|
|
40
|
+
className={clsx(s.trigger, 'typography-h3')}
|
|
41
|
+
>
|
|
42
|
+
{tab.label}
|
|
43
|
+
</TabsPrimitive.Trigger>
|
|
44
|
+
))}
|
|
45
|
+
</TabsPrimitive.List>
|
|
46
|
+
|
|
47
|
+
{tabs.map(tab => (
|
|
48
|
+
<TabsPrimitive.Content key={tab.value} value={tab.value}>
|
|
49
|
+
{tab.content}
|
|
50
|
+
</TabsPrimitive.Content>
|
|
51
|
+
))}
|
|
52
|
+
</TabsPrimitive.Root>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
Tabs.displayName = 'Tabs'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tabs'
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
@use '@/styles/mixins' as *;
|
|
2
|
+
|
|
3
|
+
.container {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.label {
|
|
10
|
+
margin-bottom: 0.25rem;
|
|
11
|
+
color: var(--color-light-900);
|
|
12
|
+
|
|
13
|
+
.container:has(.textarea:disabled) & {
|
|
14
|
+
color: var(--color-dark-100);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.textarea {
|
|
19
|
+
cursor: text;
|
|
20
|
+
resize: none;
|
|
21
|
+
scrollbar-color: var(--color-dark-300) transparent;
|
|
22
|
+
scrollbar-width: thin;
|
|
23
|
+
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
|
|
26
|
+
@include width-height(100%);
|
|
27
|
+
|
|
28
|
+
min-height: 5.25rem;
|
|
29
|
+
padding: 0.75rem 1rem;
|
|
30
|
+
border: 1px solid var(--color-dark-100);
|
|
31
|
+
border-radius: 2px;
|
|
32
|
+
|
|
33
|
+
font: inherit;
|
|
34
|
+
color: var(--color-light-100);
|
|
35
|
+
overflow-wrap: break-word;
|
|
36
|
+
|
|
37
|
+
background-color: var(--color-dark-500);
|
|
38
|
+
outline: none;
|
|
39
|
+
|
|
40
|
+
&::-webkit-scrollbar {
|
|
41
|
+
@include width-height(0.25rem);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&::-webkit-scrollbar-track {
|
|
45
|
+
background: transparent;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&::-webkit-scrollbar-thumb {
|
|
49
|
+
border-radius: 0.9rem;
|
|
50
|
+
background: var(--color-dark-300);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&::placeholder {
|
|
54
|
+
color: var(--color-light-900);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:hover:not(:disabled, :focus, :focus-visible) {
|
|
58
|
+
border-color: var(--color-dark-100);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:focus:not(:focus-visible, :disabled) {
|
|
62
|
+
border-color: var(--color-light-100);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:focus-visible:not(:disabled):placeholder-shown {
|
|
66
|
+
box-shadow: 0 0 0 2px var(--color-accent-700);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&:focus-visible:not(:disabled, :placeholder-shown) {
|
|
70
|
+
border-color: var(--color-light-100);
|
|
71
|
+
box-shadow: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:disabled {
|
|
75
|
+
cursor: not-allowed;
|
|
76
|
+
border-color: var(--color-dark-100);
|
|
77
|
+
color: var(--color-dark-100);
|
|
78
|
+
background-color: var(--color-dark-500);
|
|
79
|
+
|
|
80
|
+
&::placeholder {
|
|
81
|
+
color: var(--color-dark-100);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@include transition-basic(border-color, box-shadow, color);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.activeState {
|
|
89
|
+
.textarea {
|
|
90
|
+
border-color: var(--color-light-100);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.errorState {
|
|
95
|
+
.textarea,
|
|
96
|
+
.textarea:hover,
|
|
97
|
+
.textarea:focus,
|
|
98
|
+
.textarea:focus-visible {
|
|
99
|
+
border-color: var(--color-danger-500) !important;
|
|
100
|
+
box-shadow: none !important;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.errorMessage {
|
|
104
|
+
margin-top: 0.25rem;
|
|
105
|
+
color: var(--color-danger-500);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { clsx } from 'clsx'
|
|
4
|
+
import { type ComponentPropsWithoutRef, forwardRef, type ComponentRef, useId } from 'react'
|
|
5
|
+
import { Typography } from '@/components'
|
|
6
|
+
import s from './TextArea.module.scss'
|
|
7
|
+
|
|
8
|
+
export type TextAreaProps = {
|
|
9
|
+
label?: string
|
|
10
|
+
error?: string
|
|
11
|
+
resize?: 'both' | 'horizontal' | 'none' | 'vertical'
|
|
12
|
+
} & ComponentPropsWithoutRef<'textarea'>
|
|
13
|
+
|
|
14
|
+
export const TextArea = forwardRef<ComponentRef<'textarea'>, TextAreaProps>(
|
|
15
|
+
({ label, error, className, disabled, id, ...props }, ref) => {
|
|
16
|
+
const generatedId = useId()
|
|
17
|
+
const textareaId = id ?? generatedId
|
|
18
|
+
const errorId = `${textareaId}-error`
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div
|
|
22
|
+
className={clsx(s.container, {
|
|
23
|
+
[s.errorState]: !!error,
|
|
24
|
+
})}
|
|
25
|
+
>
|
|
26
|
+
{label && (
|
|
27
|
+
<label htmlFor={textareaId} className={clsx('typography-body1', s.label)}>
|
|
28
|
+
{label}
|
|
29
|
+
</label>
|
|
30
|
+
)}
|
|
31
|
+
|
|
32
|
+
<textarea
|
|
33
|
+
id={textareaId}
|
|
34
|
+
ref={ref}
|
|
35
|
+
disabled={disabled}
|
|
36
|
+
aria-invalid={!!error}
|
|
37
|
+
aria-describedby={error ? errorId : undefined}
|
|
38
|
+
className={clsx(s.textarea, 'typography-subtitle1', className)}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
{error && (
|
|
43
|
+
<Typography
|
|
44
|
+
variant={'body1'}
|
|
45
|
+
color={'var(--color-danger-500)'}
|
|
46
|
+
id={errorId}
|
|
47
|
+
className={s.errorMessage}
|
|
48
|
+
>
|
|
49
|
+
{error}
|
|
50
|
+
</Typography>
|
|
51
|
+
)}
|
|
52
|
+
</div>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
TextArea.displayName = 'TextArea'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextArea'
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import type { ComponentRef, ComponentPropsWithoutRef, ReactNode } from 'react'
|
|
4
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip'
|
|
5
|
+
import clsx from 'clsx'
|
|
6
|
+
import { forwardRef } from 'react'
|
|
7
|
+
import s from './Tooltip.module.scss'
|
|
8
|
+
|
|
9
|
+
export type TooltipProps = Omit<
|
|
10
|
+
ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>,
|
|
11
|
+
'children'
|
|
12
|
+
> & {
|
|
13
|
+
children: ReactNode
|
|
14
|
+
content?: ReactNode
|
|
15
|
+
delayDuration?: ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>['delayDuration']
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const Tooltip = forwardRef<ComponentRef<typeof TooltipPrimitive.Content>, TooltipProps>(
|
|
19
|
+
({ children, content, delayDuration = 200, className, sideOffset = 8, ...props }, ref) => {
|
|
20
|
+
if (!content) return <>{children}</>
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<TooltipPrimitive.Provider delayDuration={delayDuration}>
|
|
24
|
+
<TooltipPrimitive.Root>
|
|
25
|
+
<TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>
|
|
26
|
+
|
|
27
|
+
<TooltipPrimitive.Portal>
|
|
28
|
+
<TooltipPrimitive.Content
|
|
29
|
+
ref={ref}
|
|
30
|
+
sideOffset={sideOffset}
|
|
31
|
+
className={clsx(s.content, className)}
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
{content}
|
|
35
|
+
</TooltipPrimitive.Content>
|
|
36
|
+
</TooltipPrimitive.Portal>
|
|
37
|
+
</TooltipPrimitive.Root>
|
|
38
|
+
</TooltipPrimitive.Provider>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
Tooltip.displayName = 'Tooltip'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tooltip'
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.typography {
|
|
2
|
+
font-style: normal;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.align-left {
|
|
6
|
+
text-align: left;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.align-center {
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.align-right {
|
|
14
|
+
text-align: right;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.align-justify {
|
|
18
|
+
text-align: justify;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.noWrap {
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
text-overflow: ellipsis;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.gutterBottom {
|
|
28
|
+
margin-bottom: 0.35em;
|
|
29
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import type { ComponentPropsWithRef, CSSProperties, ElementType, ReactNode } from 'react'
|
|
4
|
+
import clsx from 'clsx'
|
|
5
|
+
import s from './Typography.module.scss'
|
|
6
|
+
|
|
7
|
+
export type TypographyVariant =
|
|
8
|
+
| 'body1'
|
|
9
|
+
| 'body2'
|
|
10
|
+
| 'body3'
|
|
11
|
+
| 'caption1'
|
|
12
|
+
| 'caption2'
|
|
13
|
+
| 'caution'
|
|
14
|
+
| 'caution-error'
|
|
15
|
+
| 'h1'
|
|
16
|
+
| 'h2'
|
|
17
|
+
| 'h3'
|
|
18
|
+
| 'large'
|
|
19
|
+
| 'link'
|
|
20
|
+
| 'signature'
|
|
21
|
+
| 'signature-legal'
|
|
22
|
+
| 'subtitle1'
|
|
23
|
+
| 'subtitle2'
|
|
24
|
+
| 'subtitle-link'
|
|
25
|
+
|
|
26
|
+
export type TypographyAlign = 'center' | 'justify' | 'left' | 'right'
|
|
27
|
+
|
|
28
|
+
export type MarginProps = {
|
|
29
|
+
mt?: CSSProperties['marginTop']
|
|
30
|
+
mb?: CSSProperties['marginBottom']
|
|
31
|
+
ml?: CSSProperties['marginLeft']
|
|
32
|
+
mr?: CSSProperties['marginRight']
|
|
33
|
+
mx?: CSSProperties['marginLeft']
|
|
34
|
+
my?: CSSProperties['marginTop']
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const tagMapping: Record<TypographyVariant, ElementType> = {
|
|
38
|
+
large: 'h1',
|
|
39
|
+
h1: 'h1',
|
|
40
|
+
h2: 'h2',
|
|
41
|
+
h3: 'h3',
|
|
42
|
+
subtitle1: 'h4',
|
|
43
|
+
subtitle2: 'h5',
|
|
44
|
+
body1: 'p',
|
|
45
|
+
body2: 'p',
|
|
46
|
+
body3: 'p',
|
|
47
|
+
caption1: 'span',
|
|
48
|
+
caption2: 'span',
|
|
49
|
+
link: 'a',
|
|
50
|
+
'subtitle-link': 'a',
|
|
51
|
+
// The following is used in reCAPTCHA
|
|
52
|
+
caution: 'div',
|
|
53
|
+
'caution-error': 'div',
|
|
54
|
+
signature: 'span',
|
|
55
|
+
'signature-legal': 'span',
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type TypographyProps<T extends ElementType = 'div'> = {
|
|
59
|
+
variant?: TypographyVariant
|
|
60
|
+
children: ReactNode
|
|
61
|
+
color?: CSSProperties['color']
|
|
62
|
+
className?: string
|
|
63
|
+
style?: CSSProperties
|
|
64
|
+
noWrap?: boolean
|
|
65
|
+
gutterBottom?: boolean
|
|
66
|
+
align?: TypographyAlign
|
|
67
|
+
href?: string
|
|
68
|
+
target?: '_blank' | '_parent' | '_self' | '_top'
|
|
69
|
+
rel?: string
|
|
70
|
+
} & MarginProps &
|
|
71
|
+
Omit<
|
|
72
|
+
ComponentPropsWithRef<T>,
|
|
73
|
+
| 'align'
|
|
74
|
+
| 'color'
|
|
75
|
+
| 'gutterBottom'
|
|
76
|
+
| 'href'
|
|
77
|
+
| 'noWrap'
|
|
78
|
+
| 'rel'
|
|
79
|
+
| 'style'
|
|
80
|
+
| 'target'
|
|
81
|
+
| keyof MarginProps
|
|
82
|
+
>
|
|
83
|
+
|
|
84
|
+
export const Typography = <C extends ElementType = 'div'>(props: TypographyProps<C>) => {
|
|
85
|
+
const {
|
|
86
|
+
ref,
|
|
87
|
+
children,
|
|
88
|
+
variant = 'body1',
|
|
89
|
+
color,
|
|
90
|
+
className,
|
|
91
|
+
style,
|
|
92
|
+
noWrap,
|
|
93
|
+
mb,
|
|
94
|
+
ml,
|
|
95
|
+
mr,
|
|
96
|
+
mt,
|
|
97
|
+
mx,
|
|
98
|
+
my,
|
|
99
|
+
gutterBottom,
|
|
100
|
+
align,
|
|
101
|
+
href,
|
|
102
|
+
target,
|
|
103
|
+
rel,
|
|
104
|
+
...rest
|
|
105
|
+
} = props
|
|
106
|
+
|
|
107
|
+
const Component = tagMapping[variant] || 'div'
|
|
108
|
+
|
|
109
|
+
const classes = clsx(
|
|
110
|
+
s.typography,
|
|
111
|
+
`typography-${variant}`,
|
|
112
|
+
align && s[`align-${align}`],
|
|
113
|
+
noWrap && s.noWrap,
|
|
114
|
+
gutterBottom && s.gutterBottom,
|
|
115
|
+
className
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
const isLink = variant === 'link' || variant === 'subtitle-link' || Component === 'a'
|
|
119
|
+
const linkProps = isLink ? { href, target, rel } : {}
|
|
120
|
+
|
|
121
|
+
const styles = {
|
|
122
|
+
marginLeft: mx ?? ml ?? 0,
|
|
123
|
+
marginRight: mx ?? mr ?? 0,
|
|
124
|
+
marginTop: my ?? mt ?? 0,
|
|
125
|
+
marginBottom: my ?? mb ?? 0,
|
|
126
|
+
color: color ?? 'inherit',
|
|
127
|
+
...style,
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return (
|
|
131
|
+
<Component ref={ref} className={classes} style={styles} {...linkProps} {...rest}>
|
|
132
|
+
{children}
|
|
133
|
+
</Component>
|
|
134
|
+
)
|
|
135
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Typography'
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from './Alert'
|
|
2
|
+
export * from './AudioPlayer'
|
|
3
|
+
export * from './Avatar'
|
|
4
|
+
export * from './Button'
|
|
5
|
+
export * from './Cards'
|
|
6
|
+
export * from './Carousel'
|
|
7
|
+
export * from './Checkbox'
|
|
8
|
+
export * from './CircularProgress'
|
|
9
|
+
export * from './Input'
|
|
10
|
+
export * from './LinearProgress'
|
|
11
|
+
export * from './Menu'
|
|
12
|
+
export * from './Message'
|
|
13
|
+
export * from './Modal'
|
|
14
|
+
export * from './PasswordInput'
|
|
15
|
+
export * from './RadioGroup'
|
|
16
|
+
export * from './ReadMore'
|
|
17
|
+
export * from './Recaptcha'
|
|
18
|
+
export * from './Scroll'
|
|
19
|
+
export * from './SearchInput'
|
|
20
|
+
export * from './Select'
|
|
21
|
+
export * from './Sidebar'
|
|
22
|
+
export * from './Slider'
|
|
23
|
+
export * from './Table'
|
|
24
|
+
export * from './Tabs'
|
|
25
|
+
export * from './TextArea'
|
|
26
|
+
export * from './Tooltip'
|
|
27
|
+
export * from './Typography'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { VerticalMetrics, HorizontalMetrics } from './scroll.types.ts'
|
|
1
|
+
export type { VerticalMetrics, HorizontalMetrics } from './scroll.types.ts'
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ProgressThemeColor } from '@/types'
|
|
2
|
+
|
|
3
|
+
export const COLOR_MAP: Record<ProgressThemeColor, string> = {
|
|
4
|
+
error: 'var(--color-danger-500)',
|
|
5
|
+
inherit: 'currentColor',
|
|
6
|
+
primary: 'var(--color-accent-500)',
|
|
7
|
+
success: 'var(--color-success-500)',
|
|
8
|
+
warning: 'var(--color-warning-500)',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Temporary mocked waveform (pass extracted waveform via Web Audio API to AudioPlayer waveform prop - 81)
|
|
12
|
+
export const WAVE_FORM = [
|
|
13
|
+
8, 11, 15, 13, 10, 17, 22, 18, 14, 11, 20, 24, 16, 12, 9, 15, 21, 27, 18, 13, 10, 16, 23, 19, 14,
|
|
14
|
+
11, 18, 26, 22, 16, 12, 9, 14, 20, 28, 24, 17, 13, 10, 16, 22, 19, 14, 11, 18, 24, 20, 15, 12, 9,
|
|
15
|
+
13, 19, 26, 22, 16, 12, 10, 15, 21, 25, 18, 14, 11, 17, 23, 20, 15, 12, 10, 14, 19, 24, 21, 16,
|
|
16
|
+
13, 11, 16, 20, 17, 13, 10,
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
export const TAB_INDEX = {
|
|
20
|
+
ENABLED: 0,
|
|
21
|
+
DISABLED: -1,
|
|
22
|
+
} as const
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './constants'
|