@candy.thieves/ui-kit-lumos 0.0.25 → 0.0.26
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/dist/index.css +2 -0
- package/dist/index.js +4676 -0
- package/dist/index.js.map +1 -0
- package/dist/types/assets/icons/ArrowBackOutline.d.ts +3 -0
- package/dist/types/assets/icons/ArrowForwardOutline.d.ts +3 -0
- package/dist/types/assets/icons/ArrowIosBack.d.ts +3 -0
- package/dist/types/assets/icons/ArrowIosBackOutline.d.ts +3 -0
- package/dist/types/assets/icons/ArrowIosDownOutline.d.ts +3 -0
- package/dist/types/assets/icons/ArrowIosForward.d.ts +3 -0
- package/dist/types/assets/icons/ArrowIosForwardOutline.d.ts +3 -0
- package/dist/types/assets/icons/ArrowIosUp.d.ts +3 -0
- package/dist/types/assets/icons/Block.d.ts +3 -0
- package/dist/types/assets/icons/BlockOutline.d.ts +3 -0
- package/dist/types/assets/icons/Bookmark.d.ts +3 -0
- package/dist/types/assets/icons/BookmarkOutline.d.ts +3 -0
- package/dist/types/assets/icons/Brave.d.ts +3 -0
- package/dist/types/assets/icons/Calendar.d.ts +3 -0
- package/dist/types/assets/icons/CalendarOutline.d.ts +3 -0
- package/dist/types/assets/icons/CheckmarkOutline.d.ts +3 -0
- package/dist/types/assets/icons/Close.d.ts +3 -0
- package/dist/types/assets/icons/CloseOutline.d.ts +3 -0
- package/dist/types/assets/icons/ColorPaletteOutline.d.ts +3 -0
- package/dist/types/assets/icons/Copy.d.ts +3 -0
- package/dist/types/assets/icons/CopyOutline.d.ts +3 -0
- package/dist/types/assets/icons/CreditCard.d.ts +3 -0
- package/dist/types/assets/icons/CreditCardOutline.d.ts +3 -0
- package/dist/types/assets/icons/DoneAllOutline.d.ts +3 -0
- package/dist/types/assets/icons/Edit.d.ts +3 -0
- package/dist/types/assets/icons/EditOutline.d.ts +3 -0
- package/dist/types/assets/icons/Email.d.ts +3 -0
- package/dist/types/assets/icons/EmailOutline.d.ts +3 -0
- package/dist/types/assets/icons/ErrorIcon.d.ts +3 -0
- package/dist/types/assets/icons/Expand.d.ts +3 -0
- package/dist/types/assets/icons/ExpandOutline.d.ts +3 -0
- package/dist/types/assets/icons/Explorer.d.ts +3 -0
- package/dist/types/assets/icons/Eye.d.ts +3 -0
- package/dist/types/assets/icons/EyeOff.d.ts +3 -0
- package/dist/types/assets/icons/EyeOffOutline.d.ts +3 -0
- package/dist/types/assets/icons/EyeOutline.d.ts +3 -0
- package/dist/types/assets/icons/Facebook.d.ts +3 -0
- package/dist/types/assets/icons/FileIcon.d.ts +3 -0
- package/dist/types/assets/icons/FillBell.d.ts +3 -0
- package/dist/types/assets/icons/Firefox.d.ts +3 -0
- package/dist/types/assets/icons/FlagEng.d.ts +3 -0
- package/dist/types/assets/icons/FlagRus.d.ts +3 -0
- package/dist/types/assets/icons/GithubRepo.d.ts +3 -0
- package/dist/types/assets/icons/Google.d.ts +3 -0
- package/dist/types/assets/icons/Heart.d.ts +3 -0
- package/dist/types/assets/icons/HeartOutline.d.ts +3 -0
- package/dist/types/assets/icons/Home.d.ts +3 -0
- package/dist/types/assets/icons/HomeOutline.d.ts +3 -0
- package/dist/types/assets/icons/Image.d.ts +3 -0
- package/dist/types/assets/icons/ImageOutline.d.ts +3 -0
- package/dist/types/assets/icons/Layers.d.ts +3 -0
- package/dist/types/assets/icons/LayersOutline.d.ts +3 -0
- package/dist/types/assets/icons/LogOut.d.ts +3 -0
- package/dist/types/assets/icons/LogOutOutline.d.ts +3 -0
- package/dist/types/assets/icons/Maximize.d.ts +3 -0
- package/dist/types/assets/icons/MaximizeOutline.d.ts +3 -0
- package/dist/types/assets/icons/MenuOutline.d.ts +3 -0
- package/dist/types/assets/icons/MessageCircle.d.ts +3 -0
- package/dist/types/assets/icons/MessageCircleOutline.d.ts +3 -0
- package/dist/types/assets/icons/Mic.d.ts +3 -0
- package/dist/types/assets/icons/MicOutline.d.ts +3 -0
- package/dist/types/assets/icons/MicrosoftEdge.d.ts +3 -0
- package/dist/types/assets/icons/MoreHorizontal.d.ts +3 -0
- package/dist/types/assets/icons/MoreHorizontalOutline.d.ts +3 -0
- package/dist/types/assets/icons/Opera.d.ts +3 -0
- package/dist/types/assets/icons/OutlineBell.d.ts +8 -0
- package/dist/types/assets/icons/Paid.d.ts +3 -0
- package/dist/types/assets/icons/PaperPlane.d.ts +3 -0
- package/dist/types/assets/icons/PaperPlaneOutline.d.ts +3 -0
- package/dist/types/assets/icons/PauseCircle.d.ts +3 -0
- package/dist/types/assets/icons/PauseCircleOutline.d.ts +3 -0
- package/dist/types/assets/icons/Paypal.d.ts +3 -0
- package/dist/types/assets/icons/Person.d.ts +3 -0
- package/dist/types/assets/icons/PersonAdd.d.ts +3 -0
- package/dist/types/assets/icons/PersonAddOutline.d.ts +3 -0
- package/dist/types/assets/icons/PersonOutline.d.ts +3 -0
- package/dist/types/assets/icons/PersonRemove.d.ts +3 -0
- package/dist/types/assets/icons/PersonRemoveOutline.d.ts +3 -0
- package/dist/types/assets/icons/Pin.d.ts +3 -0
- package/dist/types/assets/icons/PinOutline.d.ts +3 -0
- package/dist/types/assets/icons/PlayCircle.d.ts +3 -0
- package/dist/types/assets/icons/PlayCircleOutline.d.ts +3 -0
- package/dist/types/assets/icons/PlusCircle.d.ts +3 -0
- package/dist/types/assets/icons/PlusCircleOutline.d.ts +3 -0
- package/dist/types/assets/icons/PlusSquare.d.ts +3 -0
- package/dist/types/assets/icons/PlusSquareOutline.d.ts +3 -0
- package/dist/types/assets/icons/RadioButtonChecked.d.ts +3 -0
- package/dist/types/assets/icons/RadioButtonUnchecked.d.ts +3 -0
- package/dist/types/assets/icons/RecaptchaLogo.d.ts +3 -0
- package/dist/types/assets/icons/Safari.d.ts +3 -0
- package/dist/types/assets/icons/Search.d.ts +3 -0
- package/dist/types/assets/icons/SearchOutline.d.ts +3 -0
- package/dist/types/assets/icons/Sending.d.ts +3 -0
- package/dist/types/assets/icons/Settings.d.ts +3 -0
- package/dist/types/assets/icons/SettingsOutline.d.ts +3 -0
- package/dist/types/assets/icons/Stripe.d.ts +3 -0
- package/dist/types/assets/icons/Trash.d.ts +3 -0
- package/dist/types/assets/icons/TrashOutline.d.ts +3 -0
- package/dist/types/assets/icons/TrendingUp.d.ts +3 -0
- package/dist/types/assets/icons/TrendingUpOutline.d.ts +3 -0
- package/dist/types/assets/icons/UcBrowser.d.ts +3 -0
- package/dist/types/assets/icons/Yandex.d.ts +3 -0
- package/dist/types/assets/index.d.ts +103 -0
- package/dist/types/assets/logo/Logo.d.ts +10 -0
- package/dist/types/components/Alert/Alert.d.ts +14 -0
- package/dist/types/components/Alert/index.d.ts +1 -0
- package/dist/types/components/AudioPlayer/AudioPlayer.d.ts +6 -0
- package/dist/types/components/AudioPlayer/index.d.ts +1 -0
- package/dist/types/components/Avatar/Avatar.d.ts +17 -0
- package/dist/types/components/Avatar/AvatarBlock.d.ts +15 -0
- package/dist/types/components/Avatar/MainAvatar.d.ts +20 -0
- package/dist/types/components/Avatar/index.d.ts +3 -0
- package/dist/types/components/Button/Button.d.ts +19 -0
- package/dist/types/components/Button/ButtonLegacy.d.ts +41 -0
- package/dist/types/components/Button/index.d.ts +2 -0
- package/dist/types/components/Cards/Cards.d.ts +7 -0
- package/dist/types/components/Cards/index.d.ts +1 -0
- package/dist/types/components/Carousel/Carousel.d.ts +5 -0
- package/dist/types/components/Carousel/index.d.ts +1 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/types/components/Checkbox/index.d.ts +1 -0
- package/dist/types/components/CircularProgress/CircularProgress.d.ts +10 -0
- package/dist/types/components/CircularProgress/index.d.ts +1 -0
- package/dist/types/components/Input/Input.d.ts +13 -0
- package/dist/types/components/Input/index.d.ts +1 -0
- package/dist/types/components/LinearProgress/LinearProgress.d.ts +14 -0
- package/dist/types/components/LinearProgress/index.d.ts +1 -0
- package/dist/types/components/Menu/Menu.d.ts +14 -0
- package/dist/types/components/Menu/index.d.ts +1 -0
- package/dist/types/components/Message/AttachmentItem.d.ts +2 -0
- package/dist/types/components/Message/Message.d.ts +2 -0
- package/dist/types/components/Message/MessageStatus.d.ts +2 -0
- package/dist/types/components/Message/ReplyPreview.d.ts +2 -0
- package/dist/types/components/Message/index.d.ts +2 -0
- package/dist/types/components/Message/types.d.ts +40 -0
- package/dist/types/components/Modal/Modal.d.ts +25 -0
- package/dist/types/components/Modal/index.d.ts +1 -0
- package/dist/types/components/PasswordInput/PasswordInput.d.ts +6 -0
- package/dist/types/components/PasswordInput/index.d.ts +1 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +15 -0
- package/dist/types/components/RadioGroup/index.d.ts +1 -0
- package/dist/types/components/ReadMore/ReadMore.d.ts +8 -0
- package/dist/types/components/ReadMore/index.d.ts +1 -0
- package/dist/types/components/Recaptcha/Recaptcha.d.ts +12 -0
- package/dist/types/components/Recaptcha/index.d.ts +1 -0
- package/dist/types/components/Scroll/Scroll.d.ts +6 -0
- package/dist/types/components/Scroll/index.d.ts +1 -0
- package/dist/types/components/SearchInput/SearchInput.d.ts +3 -0
- package/dist/types/components/SearchInput/index.d.ts +1 -0
- package/dist/types/components/Select/Select.d.ts +66 -0
- package/dist/types/components/Select/index.d.ts +1 -0
- package/dist/types/components/Sidebar/Sidebar.d.ts +18 -0
- package/dist/types/components/Sidebar/index.d.ts +1 -0
- package/dist/types/components/Slider/Slider.d.ts +4 -0
- package/dist/types/components/Slider/index.d.ts +1 -0
- package/dist/types/components/Table/Table.d.ts +6 -0
- package/dist/types/components/Table/index.d.ts +1 -0
- package/dist/types/components/Tabs/Tabs.d.ts +18 -0
- package/dist/types/components/Tabs/index.d.ts +1 -0
- package/dist/types/components/TextArea/TextArea.d.ts +11 -0
- package/dist/types/components/TextArea/index.d.ts +1 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +12 -0
- package/dist/types/components/Tooltip/index.d.ts +1 -0
- package/dist/types/components/Typography/Typography.d.ts +25 -0
- package/dist/types/components/Typography/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +26 -0
- package/{src/components/types/index.ts → dist/types/components/types/index.d.ts} +1 -1
- package/dist/types/components/types/scroll.types.d.ts +10 -0
- package/dist/types/constants/constants.d.ts +7 -0
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/demo/TestMixins/TestMixins.d.ts +1 -0
- package/dist/types/demo/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useScrollThumbs.d.ts +9 -0
- package/dist/types/hooks/useThumbDrag.d.ts +9 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/types.d.ts +5 -0
- package/dist/types/utils/ColorIconBase.d.ts +7 -0
- package/dist/types/utils/ColorIconBaseSmall.d.ts +7 -0
- package/dist/types/utils/IconBase.d.ts +12 -0
- package/dist/types/utils/formatTime.d.ts +1 -0
- package/dist/types/utils/getFirstLetterCapitalized.d.ts +1 -0
- package/dist/types/utils/getHorizontalMetrics.d.ts +2 -0
- package/dist/types/utils/getNavItemClickHandler.d.ts +5 -0
- package/dist/types/utils/getVerticalMetrics.d.ts +2 -0
- package/dist/types/utils/index.d.ts +8 -0
- package/dist/types/utils/isAudioAttachment.d.ts +2 -0
- package/dist/types/utils/isThemeColor.d.ts +2 -0
- package/dist/types/utils/truncateText.d.ts +1 -0
- package/package.json +8 -14
- package/.github/pull_request_template.md +0 -31
- package/.github/workflows/deploy-storybook.yml +0 -19
- package/.github/workflows/publish.yml +0 -33
- package/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -3
- package/.husky/pre-push +0 -2
- package/.husky/prepare-commit-msg +0 -9
- package/.prettierignore +0 -5
- package/.prettierrc.cjs +0 -4
- package/.storybook/main.d.ts +0 -3
- package/.storybook/main.ts +0 -26
- package/.storybook/manager.ts +0 -6
- package/.storybook/preview.d.ts +0 -6
- package/.storybook/preview.tsx +0 -28
- package/.storybook/theme.ts +0 -17
- package/.stylelintrc.cjs +0 -3
- package/AGENTS.md +0 -80
- package/agent-docs/architecture.md +0 -31
- package/agent-docs/execplans.md +0 -33
- package/agent-docs/frontend.md +0 -99
- package/commitlint.config.js +0 -63
- package/eslint.config.js +0 -101
- package/index.html +0 -13
- package/pnpm-workspace.yaml +0 -4
- package/src/assets/icons/ArrowBackOutline.tsx +0 -33
- package/src/assets/icons/ArrowForwardOutline.tsx +0 -32
- package/src/assets/icons/ArrowIosBack.tsx +0 -32
- package/src/assets/icons/ArrowIosBackOutline.tsx +0 -32
- package/src/assets/icons/ArrowIosDownOutline.tsx +0 -34
- package/src/assets/icons/ArrowIosForward.tsx +0 -32
- package/src/assets/icons/ArrowIosForwardOutline.tsx +0 -32
- package/src/assets/icons/ArrowIosUp.tsx +0 -35
- package/src/assets/icons/Block.tsx +0 -31
- package/src/assets/icons/BlockOutline.tsx +0 -37
- package/src/assets/icons/Bookmark.tsx +0 -32
- package/src/assets/icons/BookmarkOutline.tsx +0 -32
- package/src/assets/icons/Brave.tsx +0 -26
- package/src/assets/icons/Calendar.tsx +0 -32
- package/src/assets/icons/CalendarOutline.tsx +0 -32
- package/src/assets/icons/CheckmarkOutline.tsx +0 -27
- package/src/assets/icons/Close.tsx +0 -27
- package/src/assets/icons/CloseOutline.tsx +0 -27
- package/src/assets/icons/ColorPaletteOutline.tsx +0 -36
- package/src/assets/icons/Copy.tsx +0 -32
- package/src/assets/icons/CopyOutline.tsx +0 -36
- package/src/assets/icons/CreditCard.tsx +0 -32
- package/src/assets/icons/CreditCardOutline.tsx +0 -32
- package/src/assets/icons/DoneAllOutline.tsx +0 -32
- package/src/assets/icons/Edit.tsx +0 -31
- package/src/assets/icons/EditOutline.tsx +0 -31
- package/src/assets/icons/Email.tsx +0 -32
- package/src/assets/icons/EmailOutline.tsx +0 -32
- package/src/assets/icons/ErrorIcon.tsx +0 -39
- package/src/assets/icons/Expand.tsx +0 -31
- package/src/assets/icons/ExpandOutline.tsx +0 -31
- package/src/assets/icons/Explorer.tsx +0 -26
- package/src/assets/icons/Eye.tsx +0 -32
- package/src/assets/icons/EyeOff.tsx +0 -36
- package/src/assets/icons/EyeOffOutline.tsx +0 -36
- package/src/assets/icons/EyeOutline.tsx +0 -34
- package/src/assets/icons/Facebook.tsx +0 -32
- package/src/assets/icons/FileIcon.tsx +0 -36
- package/src/assets/icons/FillBell.tsx +0 -48
- package/src/assets/icons/Firefox.tsx +0 -33
- package/src/assets/icons/FlagEng.tsx +0 -33
- package/src/assets/icons/FlagRus.tsx +0 -33
- package/src/assets/icons/GithubRepo.tsx +0 -32
- package/src/assets/icons/Google.tsx +0 -45
- package/src/assets/icons/Heart.tsx +0 -32
- package/src/assets/icons/HeartOutline.tsx +0 -32
- package/src/assets/icons/Home.tsx +0 -33
- package/src/assets/icons/HomeOutline.tsx +0 -27
- package/src/assets/icons/Image.tsx +0 -32
- package/src/assets/icons/ImageOutline.tsx +0 -32
- package/src/assets/icons/Layers.tsx +0 -41
- package/src/assets/icons/LayersOutline.tsx +0 -32
- package/src/assets/icons/LogOut.tsx +0 -31
- package/src/assets/icons/LogOutOutline.tsx +0 -31
- package/src/assets/icons/Maximize.tsx +0 -32
- package/src/assets/icons/MaximizeOutline.tsx +0 -34
- package/src/assets/icons/MenuOutline.tsx +0 -31
- package/src/assets/icons/MessageCircle.tsx +0 -32
- package/src/assets/icons/MessageCircleOutline.tsx +0 -36
- package/src/assets/icons/Mic.tsx +0 -32
- package/src/assets/icons/MicOutline.tsx +0 -36
- package/src/assets/icons/MicrosoftEdge.tsx +0 -112
- package/src/assets/icons/MoreHorizontal.tsx +0 -31
- package/src/assets/icons/MoreHorizontalOutline.tsx +0 -31
- package/src/assets/icons/Opera.tsx +0 -33
- package/src/assets/icons/OutlineBell.tsx +0 -72
- package/src/assets/icons/Paid.tsx +0 -37
- package/src/assets/icons/PaperPlane.tsx +0 -32
- package/src/assets/icons/PaperPlaneOutline.tsx +0 -32
- package/src/assets/icons/PauseCircle.tsx +0 -32
- package/src/assets/icons/PauseCircleOutline.tsx +0 -34
- package/src/assets/icons/Paypal.tsx +0 -72
- package/src/assets/icons/Person.tsx +0 -29
- package/src/assets/icons/PersonAdd.tsx +0 -31
- package/src/assets/icons/PersonAddOutline.tsx +0 -31
- package/src/assets/icons/PersonOutline.tsx +0 -31
- package/src/assets/icons/PersonRemove.tsx +0 -31
- package/src/assets/icons/PersonRemoveOutline.tsx +0 -31
- package/src/assets/icons/Pin.tsx +0 -32
- package/src/assets/icons/PinOutline.tsx +0 -34
- package/src/assets/icons/PlayCircle.tsx +0 -32
- package/src/assets/icons/PlayCircleOutline.tsx +0 -32
- package/src/assets/icons/PlusCircle.tsx +0 -32
- package/src/assets/icons/PlusCircleOutline.tsx +0 -30
- package/src/assets/icons/PlusSquare.tsx +0 -32
- package/src/assets/icons/PlusSquareOutline.tsx +0 -34
- package/src/assets/icons/RadioButtonChecked.tsx +0 -32
- package/src/assets/icons/RadioButtonUnchecked.tsx +0 -30
- package/src/assets/icons/RecaptchaLogo.tsx +0 -42
- package/src/assets/icons/Safari.tsx +0 -37
- package/src/assets/icons/Search.tsx +0 -32
- package/src/assets/icons/SearchOutline.tsx +0 -32
- package/src/assets/icons/Sending.tsx +0 -28
- package/src/assets/icons/Settings.tsx +0 -32
- package/src/assets/icons/SettingsOutline.tsx +0 -34
- package/src/assets/icons/Stripe.tsx +0 -40
- package/src/assets/icons/Trash.tsx +0 -32
- package/src/assets/icons/TrashOutline.tsx +0 -32
- package/src/assets/icons/TrendingUp.tsx +0 -32
- package/src/assets/icons/TrendingUpOutline.tsx +0 -32
- package/src/assets/icons/UcBrowser.tsx +0 -78
- package/src/assets/icons/Yandex.tsx +0 -36
- package/src/assets/index.ts +0 -104
- package/src/assets/logo/Logo.tsx +0 -55
- package/src/components/Alert/Alert.module.scss +0 -61
- package/src/components/Alert/Alert.tsx +0 -79
- package/src/components/Alert/index.ts +0 -1
- package/src/components/AudioPlayer/AudioPlayer.module.scss +0 -74
- package/src/components/AudioPlayer/AudioPlayer.tsx +0 -119
- package/src/components/AudioPlayer/index.ts +0 -1
- package/src/components/Avatar/Avatar.module.scss +0 -151
- package/src/components/Avatar/Avatar.tsx +0 -36
- package/src/components/Avatar/AvatarBlock.tsx +0 -43
- package/src/components/Avatar/MainAvatar.tsx +0 -65
- package/src/components/Avatar/index.ts +0 -3
- package/src/components/Button/Button.module.scss +0 -143
- package/src/components/Button/Button.tsx +0 -48
- package/src/components/Button/ButtonLegacy.tsx +0 -94
- package/src/components/Button/index.ts +0 -2
- package/src/components/Cards/Cards.module.scss +0 -11
- package/src/components/Cards/Cards.tsx +0 -21
- package/src/components/Cards/index.ts +0 -1
- package/src/components/Carousel/Carousel.module.scss +0 -97
- package/src/components/Carousel/Carousel.tsx +0 -64
- package/src/components/Carousel/index.ts +0 -1
- package/src/components/Checkbox/Checkbox.module.scss +0 -76
- package/src/components/Checkbox/Checkbox.tsx +0 -48
- package/src/components/Checkbox/index.ts +0 -1
- package/src/components/CircularProgress/CircularProgress.module.scss +0 -33
- package/src/components/CircularProgress/CircularProgress.tsx +0 -33
- package/src/components/CircularProgress/index.ts +0 -1
- package/src/components/Input/Input.module.scss +0 -105
- package/src/components/Input/Input.tsx +0 -79
- package/src/components/Input/index.ts +0 -1
- package/src/components/LinearProgress/LinearProgress.module.scss +0 -62
- package/src/components/LinearProgress/LinearProgress.tsx +0 -49
- package/src/components/LinearProgress/index.ts +0 -1
- package/src/components/Menu/Menu.module.scss +0 -48
- package/src/components/Menu/Menu.tsx +0 -51
- package/src/components/Menu/index.ts +0 -1
- package/src/components/Message/AttachmentItem.tsx +0 -19
- package/src/components/Message/Message.module.scss +0 -123
- package/src/components/Message/Message.tsx +0 -54
- package/src/components/Message/MessageStatus.tsx +0 -19
- package/src/components/Message/ReplyPreview.tsx +0 -19
- package/src/components/Message/index.ts +0 -2
- package/src/components/Message/types.ts +0 -49
- package/src/components/Modal/Modal.module.scss +0 -118
- package/src/components/Modal/Modal.tsx +0 -82
- package/src/components/Modal/index.ts +0 -1
- package/src/components/PasswordInput/PasswordInput.module.scss +0 -13
- package/src/components/PasswordInput/PasswordInput.tsx +0 -36
- package/src/components/PasswordInput/index.ts +0 -1
- package/src/components/RadioGroup/RadioGroup.module.scss +0 -95
- package/src/components/RadioGroup/RadioGroup.tsx +0 -64
- package/src/components/RadioGroup/index.ts +0 -1
- package/src/components/ReadMore/ReadMore.module.scss +0 -8
- package/src/components/ReadMore/ReadMore.tsx +0 -49
- package/src/components/ReadMore/index.ts +0 -1
- package/src/components/Recaptcha/Recaptcha.module.scss +0 -10
- package/src/components/Recaptcha/Recaptcha.tsx +0 -58
- package/src/components/Recaptcha/index.ts +0 -1
- package/src/components/Scroll/Scroll.module.scss +0 -58
- package/src/components/Scroll/Scroll.tsx +0 -47
- package/src/components/Scroll/index.ts +0 -1
- package/src/components/SearchInput/SearchInput.tsx +0 -17
- package/src/components/SearchInput/index.ts +0 -1
- package/src/components/Select/Select.module.scss +0 -160
- package/src/components/Select/Select.tsx +0 -262
- package/src/components/Select/index.ts +0 -1
- package/src/components/Sidebar/Sidebar.module.scss +0 -100
- package/src/components/Sidebar/Sidebar.tsx +0 -74
- package/src/components/Sidebar/index.ts +0 -1
- package/src/components/Slider/Slider.module.scss +0 -64
- package/src/components/Slider/Slider.tsx +0 -26
- package/src/components/Slider/index.ts +0 -1
- package/src/components/Table/Table.module.scss +0 -23
- package/src/components/Table/Table.tsx +0 -57
- package/src/components/Table/index.ts +0 -1
- package/src/components/Tabs/Tabs.module.scss +0 -78
- package/src/components/Tabs/Tabs.tsx +0 -57
- package/src/components/Tabs/index.ts +0 -1
- package/src/components/TextArea/TextArea.module.scss +0 -107
- package/src/components/TextArea/TextArea.tsx +0 -57
- package/src/components/TextArea/index.ts +0 -1
- package/src/components/Tooltip/Tooltip.module.scss +0 -11
- package/src/components/Tooltip/Tooltip.tsx +0 -43
- package/src/components/Tooltip/index.ts +0 -1
- package/src/components/Typography/Typography.module.scss +0 -29
- package/src/components/Typography/Typography.tsx +0 -135
- package/src/components/Typography/index.ts +0 -1
- package/src/components/index.ts +0 -27
- package/src/components/types/scroll.types.ts +0 -11
- package/src/constants/constants.ts +0 -22
- package/src/constants/index.ts +0 -1
- package/src/demo/TestMixins/TestMixins.module.scss +0 -457
- package/src/demo/TestMixins/TestMixins.tsx +0 -107
- package/src/demo/index.ts +0 -1
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useScrollThumbs.ts +0 -65
- package/src/hooks/useThumbDrag.ts +0 -90
- package/src/index.ts +0 -9
- package/src/stories/Configure.mdx +0 -183
- package/src/stories/assets/icons/ArrowBackOutline.stories.ts +0 -40
- package/src/stories/assets/icons/ArrowForwardOutline.stories.ts +0 -40
- package/src/stories/assets/icons/ArrowIosBack.stories.ts +0 -40
- package/src/stories/assets/icons/ArrowIosBackOutline.stories.ts +0 -40
- package/src/stories/assets/icons/ArrowIosDownOutline.stories.ts +0 -40
- package/src/stories/assets/icons/ArrowIosForward.stories.ts +0 -40
- package/src/stories/assets/icons/ArrowIosForwardOutline.stories.ts +0 -40
- package/src/stories/assets/icons/ArrowIosUp.stories.ts +0 -38
- package/src/stories/assets/icons/Block.stories.ts +0 -39
- package/src/stories/assets/icons/BlockOutline.stories.ts +0 -39
- package/src/stories/assets/icons/Bookmark.stories.ts +0 -39
- package/src/stories/assets/icons/BookmarkOutline.stories.ts +0 -40
- package/src/stories/assets/icons/Brave.stories.ts +0 -48
- package/src/stories/assets/icons/Calendar.stories.ts +0 -40
- package/src/stories/assets/icons/CalendarOutline.stories.ts +0 -39
- package/src/stories/assets/icons/CheckmarkOutline.stories.ts +0 -40
- package/src/stories/assets/icons/Close.stories.ts +0 -40
- package/src/stories/assets/icons/CloseOutline.stories.ts +0 -40
- package/src/stories/assets/icons/ColorPaletteOutline.stories.ts +0 -39
- package/src/stories/assets/icons/Copy.stories.ts +0 -38
- package/src/stories/assets/icons/CopyOutline.stories.ts +0 -39
- package/src/stories/assets/icons/CreditCard.stories.ts +0 -38
- package/src/stories/assets/icons/CreditCardOutline.stories.ts +0 -39
- package/src/stories/assets/icons/DoneAllOutline.stories.ts +0 -38
- package/src/stories/assets/icons/Edit.stories.ts +0 -39
- package/src/stories/assets/icons/EditOutline.stories.ts +0 -38
- package/src/stories/assets/icons/Email.stories.ts +0 -39
- package/src/stories/assets/icons/EmailOutline.stories.ts +0 -38
- package/src/stories/assets/icons/ErrorIcon.stories.ts +0 -40
- package/src/stories/assets/icons/Expand.stories.ts +0 -39
- package/src/stories/assets/icons/ExpandOutline.stories.ts +0 -38
- package/src/stories/assets/icons/Explorer.stories.ts +0 -47
- package/src/stories/assets/icons/Eye.stories.ts +0 -39
- package/src/stories/assets/icons/EyeOff.stories.ts +0 -38
- package/src/stories/assets/icons/EyeOffOutline.stories.ts +0 -39
- package/src/stories/assets/icons/EyeOutline.stories.ts +0 -38
- package/src/stories/assets/icons/Facebook.stories.ts +0 -37
- package/src/stories/assets/icons/FileIcon.stories.ts +0 -40
- package/src/stories/assets/icons/FillBell.stories.ts +0 -40
- package/src/stories/assets/icons/Firefox.stories.ts +0 -48
- package/src/stories/assets/icons/FlagEng.stories.ts +0 -37
- package/src/stories/assets/icons/FlagRus.stories.ts +0 -37
- package/src/stories/assets/icons/GithubRepo.stories.ts +0 -38
- package/src/stories/assets/icons/Google.stories.ts +0 -38
- package/src/stories/assets/icons/Heart.stories.ts +0 -39
- package/src/stories/assets/icons/HeartOutline.stories.ts +0 -38
- package/src/stories/assets/icons/Home.stories.ts +0 -40
- package/src/stories/assets/icons/HomeOutline.stories.ts +0 -40
- package/src/stories/assets/icons/Icon.module.scss +0 -4
- package/src/stories/assets/icons/ImageIcon.stories.ts +0 -39
- package/src/stories/assets/icons/ImageOutline.stories.ts +0 -38
- package/src/stories/assets/icons/Layers.stories.ts +0 -39
- package/src/stories/assets/icons/LayersOutline.stories.ts +0 -38
- package/src/stories/assets/icons/LogOut.stories.ts +0 -40
- package/src/stories/assets/icons/LogOutOutline.stories.ts +0 -40
- package/src/stories/assets/icons/Maximize.stories.ts +0 -39
- package/src/stories/assets/icons/MaximizeOutline.stories.ts +0 -39
- package/src/stories/assets/icons/MenuOutline.stories.ts +0 -39
- package/src/stories/assets/icons/MessageCircle.stories.ts +0 -38
- package/src/stories/assets/icons/MessageCircleOutline.stories.ts +0 -39
- package/src/stories/assets/icons/Mic.stories.ts +0 -38
- package/src/stories/assets/icons/MicOutline.stories.ts +0 -39
- package/src/stories/assets/icons/MicrosoftEdge.stories.ts +0 -47
- package/src/stories/assets/icons/MoreHorizontal.stories.ts +0 -40
- package/src/stories/assets/icons/MoreHorizontalOutline.stories.ts +0 -38
- package/src/stories/assets/icons/Opera.stories.ts +0 -47
- package/src/stories/assets/icons/OutlineBell.stories.ts +0 -58
- package/src/stories/assets/icons/Paid.stories.ts +0 -38
- package/src/stories/assets/icons/PaperPlane.stories.ts +0 -40
- package/src/stories/assets/icons/PaperPlaneOutline.stories.ts +0 -38
- package/src/stories/assets/icons/PauseCircle.stories.ts +0 -39
- package/src/stories/assets/icons/PauseCircleOutline.stories.ts +0 -38
- package/src/stories/assets/icons/Paypal.stories.ts +0 -16
- package/src/stories/assets/icons/Person.stories.ts +0 -39
- package/src/stories/assets/icons/PersonAdd.stories.ts +0 -38
- package/src/stories/assets/icons/PersonAddOutline.stories.ts +0 -39
- package/src/stories/assets/icons/PersonOutline.stories.ts +0 -39
- package/src/stories/assets/icons/PersonRemove.stories.ts +0 -38
- package/src/stories/assets/icons/PersonRemoveOutline.stories.ts +0 -39
- package/src/stories/assets/icons/Pin.stories.ts +0 -38
- package/src/stories/assets/icons/PinOutline.stories.ts +0 -39
- package/src/stories/assets/icons/PlayCircle.stories.ts +0 -38
- package/src/stories/assets/icons/PlayCircleOutline.stories.ts +0 -39
- package/src/stories/assets/icons/PlusCircle.stories.ts +0 -38
- package/src/stories/assets/icons/PlusCircleOutline.stories.ts +0 -39
- package/src/stories/assets/icons/PlusSquare.stories.ts +0 -38
- package/src/stories/assets/icons/PlusSquareOutline.stories.ts +0 -39
- package/src/stories/assets/icons/RadioButtonChecked.stories.ts +0 -38
- package/src/stories/assets/icons/RadioButtonUnchecked.stories.ts +0 -39
- package/src/stories/assets/icons/RecaptchaLogo.stories.ts +0 -36
- package/src/stories/assets/icons/Safari.stories.ts +0 -47
- package/src/stories/assets/icons/Search.stories.ts +0 -39
- package/src/stories/assets/icons/SearchOutline.stories.ts +0 -40
- package/src/stories/assets/icons/Sending.stories.ts +0 -40
- package/src/stories/assets/icons/Settings.stories.ts +0 -39
- package/src/stories/assets/icons/SettingsOutline.stories.ts +0 -40
- package/src/stories/assets/icons/Stripe.stories.ts +0 -38
- package/src/stories/assets/icons/Trash.stories.ts +0 -39
- package/src/stories/assets/icons/TrashOutline.stories.ts +0 -38
- package/src/stories/assets/icons/TrendingUp.stories.ts +0 -39
- package/src/stories/assets/icons/TrendingUpOutline.stories.ts +0 -38
- package/src/stories/assets/icons/UcBrowser.stories.ts +0 -48
- package/src/stories/assets/icons/Yandex.stories.ts +0 -47
- package/src/stories/assets/logo/Logo.stories.ts +0 -22
- package/src/stories/components/Alert/Alert.stories.tsx +0 -94
- package/src/stories/components/Avatar/Avatar.stories.tsx +0 -151
- package/src/stories/components/Avatar/AvatarBlock.stories.tsx +0 -301
- package/src/stories/components/Avatar/MainAvatar.stories.tsx +0 -200
- package/src/stories/components/Button/Button.stories.tsx +0 -99
- package/src/stories/components/Button/ButtonLegacy.stories.tsx +0 -99
- package/src/stories/components/Cards/Cards.stories.tsx +0 -185
- package/src/stories/components/Carousel/Carousel.stories.tsx +0 -89
- package/src/stories/components/Carousel/CarouselWrapper.module.scss +0 -7
- package/src/stories/components/CheckBox/CheckBox.stories.tsx +0 -92
- package/src/stories/components/CircularProgress/CircularProgress.stories.tsx +0 -66
- package/src/stories/components/Input/Input.stories.tsx +0 -88
- package/src/stories/components/LinearProgress/LinearProgress.stories.tsx +0 -137
- package/src/stories/components/Menu/Menu.stories.tsx +0 -100
- package/src/stories/components/Message/Message.stories.tsx +0 -311
- package/src/stories/components/Modal/Modal.stories.module.scss +0 -157
- package/src/stories/components/Modal/Modal.stories.tsx +0 -514
- package/src/stories/components/PasswordInput/PasswordInput.stories.tsx +0 -71
- package/src/stories/components/RadioGroup/RadioGroup.stories.tsx +0 -141
- package/src/stories/components/ReadMore/ReadMore.stories.tsx +0 -42
- package/src/stories/components/Recaptcha/Recaptcha.stories.tsx +0 -29
- package/src/stories/components/Scroll/Scroll.stories.tsx +0 -128
- package/src/stories/components/SearchInput/SearchInput.stories.tsx +0 -76
- package/src/stories/components/Select/Select.stories.module.scss +0 -6
- package/src/stories/components/Select/Select.stories.tsx +0 -147
- package/src/stories/components/Sidebar/Sidebar.stories.tsx +0 -126
- package/src/stories/components/Slider/Slider.stories.tsx +0 -58
- package/src/stories/components/Table/Table.stories.tsx +0 -108
- package/src/stories/components/Tabs/Tabs.stories.tsx +0 -75
- package/src/stories/components/TestMixins/TestMixins.stories.tsx +0 -16
- package/src/stories/components/TextArea/TextArea.stories.tsx +0 -100
- package/src/stories/components/Tooltip/Tooltip.stories.tsx +0 -54
- package/src/stories/components/Typography/Typography.stories.tsx +0 -314
- package/src/stories/constants.ts +0 -45
- package/src/stories/palette/ColorPalette.module.scss +0 -61
- package/src/stories/palette/ColorPalette.stories.tsx +0 -76
- package/src/storybook-utils/assets/coloredIconMeta.ts +0 -31
- package/src/storybook-utils/assets/iconMeta.ts +0 -40
- package/src/storybook-utils/assets/logoMeta.ts +0 -33
- package/src/storybook-utils/components/ButtonMeta.ts +0 -33
- package/src/storybook-utils/index.ts +0 -4
- package/src/styles/_boilerplate.scss +0 -37
- package/src/styles/_colors.scss +0 -46
- package/src/styles/_mixins.scss +0 -154
- package/src/styles/_typography.scss +0 -152
- package/src/styles/index.scss +0 -4
- package/src/types/index.ts +0 -1
- package/src/types/types.ts +0 -5
- package/src/utils/ColorIconBase.tsx +0 -26
- package/src/utils/ColorIconBaseSmall.tsx +0 -30
- package/src/utils/IconBase.tsx +0 -43
- package/src/utils/formatTime.ts +0 -6
- package/src/utils/getFirstLetterCapitalized.ts +0 -2
- package/src/utils/getHorizontalMetrics.ts +0 -12
- package/src/utils/getNavItemClickHandler.ts +0 -17
- package/src/utils/getVerticalMetrics.ts +0 -12
- package/src/utils/index.ts +0 -8
- package/src/utils/isAudioAttachment.ts +0 -7
- package/src/utils/isThemeColor.ts +0 -4
- package/src/utils/truncateText.ts +0 -15
- package/tsconfig.app.json +0 -32
- package/tsconfig.build.json +0 -16
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -23
- package/vite-env.d.ts +0 -20
- package/vite.config.ts +0 -67
- package/vitest.shims.d.ts +0 -1
- /package/{public → dist}/favicon-dark-108.svg +0 -0
- /package/{public → dist}/favicon-dark-16.svg +0 -0
- /package/{public → dist}/favicon-dark-24.svg +0 -0
- /package/{public → dist}/favicon-dark-48.svg +0 -0
- /package/{public → dist}/favicon-dark-72.svg +0 -0
- /package/{public → dist}/favicon-light-108.svg +0 -0
- /package/{public → dist}/favicon-light-16.svg +0 -0
- /package/{public → dist}/favicon-light-24.svg +0 -0
- /package/{public → dist}/favicon-light-48.svg +0 -0
- /package/{public → dist}/favicon-light-72.svg +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { forwardRef, type SVGProps } from 'react'
|
|
4
|
-
import { IconBase, type IconProps } from '@/utils'
|
|
5
|
-
|
|
6
|
-
const TrendingUpSvg = (props: SVGProps<SVGSVGElement>) => {
|
|
7
|
-
const { fill } = props
|
|
8
|
-
return (
|
|
9
|
-
<svg xmlns={'http://www.w3.org/2000/svg'} viewBox={'0 0 24 24'} fill={'none'} {...props}>
|
|
10
|
-
<g clipPath={'url(#trending-up)'}>
|
|
11
|
-
<path
|
|
12
|
-
fill={fill}
|
|
13
|
-
d={
|
|
14
|
-
'M21 7v-.21l-.05-.17-.09-.14-.14-.17-.12-.07-.19-.1h-.2A1 1 0 0 0 20 6h-5a1 1 0 1 0 0 2h2.83l-4 4.71-4.32-2.57a1 1 0 0 0-1.28.22l-5 6a1 1 0 1 0 1.54 1.28l4.45-5.34 4.27 2.56a1 1 0 0 0 1.27-.21L19 9.7V12a1 1 0 1 0 2 0z'
|
|
15
|
-
}
|
|
16
|
-
/>
|
|
17
|
-
</g>
|
|
18
|
-
<defs>
|
|
19
|
-
<clipPath id={'trending-up'}>
|
|
20
|
-
<path fill={'var(--color-light-100)'} d={'M0 0h24v24H0z'} />
|
|
21
|
-
</clipPath>
|
|
22
|
-
</defs>
|
|
23
|
-
</svg>
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const TrendingUp = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
|
|
28
|
-
<IconBase ref={ref} icon={<TrendingUpSvg />} {...props} />
|
|
29
|
-
))
|
|
30
|
-
|
|
31
|
-
TrendingUp.displayName = 'TrendingUp'
|
|
32
|
-
export { TrendingUp }
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { forwardRef, type SVGProps } from 'react'
|
|
4
|
-
import { IconBase, type IconProps } from '@/utils'
|
|
5
|
-
|
|
6
|
-
const TrendingUpOutlineSvg = (props: SVGProps<SVGSVGElement>) => {
|
|
7
|
-
const { fill } = props
|
|
8
|
-
return (
|
|
9
|
-
<svg xmlns={'http://www.w3.org/2000/svg'} viewBox={'0 0 24 24'} fill={'none'} {...props}>
|
|
10
|
-
<g clipPath={'url(#trending-up-outline)'}>
|
|
11
|
-
<path
|
|
12
|
-
fill={fill}
|
|
13
|
-
d={
|
|
14
|
-
'M21 7v-.4l-.1-.1-.2-.2h-.1l-.2-.2h-.2L20 6h-5a1 1 0 1 0 0 2h2.8l-4 4.7-4.3-2.6a1 1 0 0 0-1.3.3l-5 6a1 1 0 1 0 1.6 1.2l4.4-5.3 4.3 2.6a1 1 0 0 0 1.3-.2l4.2-5V12a1 1 0 1 0 2 0z'
|
|
15
|
-
}
|
|
16
|
-
/>
|
|
17
|
-
</g>
|
|
18
|
-
<defs>
|
|
19
|
-
<clipPath id={'trending-up-outline'}>
|
|
20
|
-
<path fill={'var(--color-light-100)'} d={'M0 0h24v24H0z'} />
|
|
21
|
-
</clipPath>
|
|
22
|
-
</defs>
|
|
23
|
-
</svg>
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const TrendingUpOutline = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
|
|
28
|
-
<IconBase ref={ref} icon={<TrendingUpOutlineSvg />} {...props} />
|
|
29
|
-
))
|
|
30
|
-
|
|
31
|
-
TrendingUpOutline.displayName = 'TrendingUpOutline'
|
|
32
|
-
export { TrendingUpOutline }
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { forwardRef, type SVGProps } from 'react'
|
|
4
|
-
import { IconBase, type IconProps } from '@/utils'
|
|
5
|
-
|
|
6
|
-
const UcBrowserSvg = (props: SVGProps<SVGSVGElement>) => {
|
|
7
|
-
const { fill } = props
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<svg xmlns={'http://www.w3.org/2000/svg'} viewBox={'0 0 36 36'} fill={'none'} {...props}>
|
|
11
|
-
<path
|
|
12
|
-
fill={fill}
|
|
13
|
-
stroke={fill}
|
|
14
|
-
strokeLinecap={'round'}
|
|
15
|
-
strokeLinejoin={'round'}
|
|
16
|
-
d={'M15.5 32c3.59 0 6.5-2.46 6.5-5.5S19.09 21 15.5 21 9 23.46 9 26.5s2.91 5.5 6.5 5.5'}
|
|
17
|
-
/>
|
|
18
|
-
<path
|
|
19
|
-
fill={fill}
|
|
20
|
-
d={
|
|
21
|
-
'M22.04 28.94s4.49-.83 4.49 2.93H12.39a8.4 8.4 0 0 1-6.2-14.04C8.8 14.95 10 13.93 10 11.55s-2.96-3.85-6-2c2.6-4.54 4.68-5.43 8.92-5.43s6.23 3.54 6.23 6.63c0 6.14-9.9 6.67-9.9 15.69'
|
|
22
|
-
}
|
|
23
|
-
/>
|
|
24
|
-
<path
|
|
25
|
-
stroke={fill}
|
|
26
|
-
strokeLinecap={'round'}
|
|
27
|
-
strokeLinejoin={'round'}
|
|
28
|
-
d={
|
|
29
|
-
'M22.04 28.94s4.49-.83 4.49 2.93H12.39a8.4 8.4 0 0 1-6.2-14.04C8.8 14.95 10 13.93 10 11.55s-2.96-3.85-6-2c2.6-4.54 4.68-5.43 8.92-5.43s6.23 3.54 6.23 6.63c0 6.14-9.9 6.67-9.9 15.69'
|
|
30
|
-
}
|
|
31
|
-
/>
|
|
32
|
-
<path fill={fill} d={'M22.04 28.94a6.85 6.85 0 0 0-11.68-7.14'} />
|
|
33
|
-
<path
|
|
34
|
-
stroke={fill}
|
|
35
|
-
strokeLinecap={'round'}
|
|
36
|
-
strokeLinejoin={'round'}
|
|
37
|
-
d={'M22.04 28.94a6.85 6.85 0 0 0-11.68-7.14'}
|
|
38
|
-
/>
|
|
39
|
-
<path
|
|
40
|
-
fill={fill}
|
|
41
|
-
stroke={fill}
|
|
42
|
-
strokeLinecap={'round'}
|
|
43
|
-
strokeLinejoin={'round'}
|
|
44
|
-
d={
|
|
45
|
-
'M13.6 19.14c3.96-2.78 9.44-1.67 12.93 1.64 4.02-.7 5.47 1.77 5.47 1.77-1.7-.14-3.77.49-5.14 1-.88.34-1.87.1-2.5-.59-2.7-2.97-6.85-5.69-10.75-3.82'
|
|
46
|
-
}
|
|
47
|
-
/>
|
|
48
|
-
<path
|
|
49
|
-
fill={fill}
|
|
50
|
-
d={
|
|
51
|
-
'M17.24 17.68s2.09-2.15 6.72-4.63c-.17-2.25-.06-3.1 1.06-3.8 2 .5 2.39 2.87 2.39 2.87 3.67 1.24 5.12 6.23 3.76 6.94-1.37.7-5.81.19-8.52-.74'
|
|
52
|
-
}
|
|
53
|
-
/>
|
|
54
|
-
<path
|
|
55
|
-
stroke={fill}
|
|
56
|
-
strokeLinecap={'round'}
|
|
57
|
-
strokeLinejoin={'round'}
|
|
58
|
-
d={
|
|
59
|
-
'M17.24 17.68s2.09-2.15 6.72-4.63c-.17-2.25-.06-3.1 1.06-3.8 2 .5 2.39 2.87 2.39 2.87 3.67 1.24 5.12 6.23 3.76 6.94-1.37.7-5.81.19-8.52-.74'
|
|
60
|
-
}
|
|
61
|
-
/>
|
|
62
|
-
<path
|
|
63
|
-
fill={fill}
|
|
64
|
-
stroke={fill}
|
|
65
|
-
strokeLinecap={'round'}
|
|
66
|
-
strokeLinejoin={'round'}
|
|
67
|
-
d={'M14.69 28.4a1.97 1.97 0 1 0 0-3.93 1.97 1.97 0 0 0 0 3.94'}
|
|
68
|
-
/>
|
|
69
|
-
</svg>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const UcBrowser = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
|
|
74
|
-
<IconBase ref={ref} icon={<UcBrowserSvg />} {...props} />
|
|
75
|
-
))
|
|
76
|
-
|
|
77
|
-
UcBrowser.displayName = 'UcBrowser'
|
|
78
|
-
export { UcBrowser }
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { forwardRef, type SVGProps } from 'react'
|
|
4
|
-
import { IconBase, type IconProps } from '@/utils'
|
|
5
|
-
|
|
6
|
-
const YandexSvg = (props: SVGProps<SVGSVGElement>) => {
|
|
7
|
-
return (
|
|
8
|
-
<svg xmlns={'http://www.w3.org/2000/svg'} viewBox={'0 0 36 36'} fill={'none'} {...props}>
|
|
9
|
-
<g clipPath={'url(#yandex-icon)'}>
|
|
10
|
-
<path
|
|
11
|
-
stroke={'#f8604a'}
|
|
12
|
-
strokeWidth={2}
|
|
13
|
-
d={'M18 35c9.389 0 17-7.611 17-17S27.389 1 18 1 1 8.611 1 18s7.611 17 17 17Z'}
|
|
14
|
-
/>
|
|
15
|
-
<path
|
|
16
|
-
fill={'#f8604a'}
|
|
17
|
-
d={
|
|
18
|
-
'm9.637 7.131-3.181 3.181 9.3 9.301V30.67h4.5V19.6l9.289-9.288-3.182-3.182L18 15.494 9.637 7.131Z'
|
|
19
|
-
}
|
|
20
|
-
/>
|
|
21
|
-
</g>
|
|
22
|
-
<defs>
|
|
23
|
-
<clipPath id={'yandex-icon'}>
|
|
24
|
-
<path fill={'var(--color-light-100)'} d={'M0 0h36v36H0z'} />
|
|
25
|
-
</clipPath>
|
|
26
|
-
</defs>
|
|
27
|
-
</svg>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const Yandex = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
|
|
32
|
-
<IconBase ref={ref} icon={<YandexSvg />} {...props} />
|
|
33
|
-
))
|
|
34
|
-
|
|
35
|
-
Yandex.displayName = 'Yandex'
|
|
36
|
-
export { Yandex }
|
package/src/assets/index.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
export { CheckmarkOutline } from './icons/CheckmarkOutline'
|
|
2
|
-
export { FillBell } from './icons/FillBell'
|
|
3
|
-
export { Close } from './icons/Close'
|
|
4
|
-
export { CloseOutline } from './icons/CloseOutline'
|
|
5
|
-
export { Home } from './icons/Home'
|
|
6
|
-
export { HomeOutline } from './icons/HomeOutline'
|
|
7
|
-
export { OutlineBell } from './icons/OutlineBell'
|
|
8
|
-
export { FlagEng } from './icons/FlagEng'
|
|
9
|
-
export { FlagRus } from './icons/FlagRus'
|
|
10
|
-
export { PlusSquareOutline } from './icons/PlusSquareOutline'
|
|
11
|
-
export { PlusSquare } from './icons/PlusSquare'
|
|
12
|
-
export { Person } from './icons/Person'
|
|
13
|
-
export { PersonOutline } from './icons/PersonOutline'
|
|
14
|
-
export { TrendingUp } from './icons/TrendingUp'
|
|
15
|
-
export { TrendingUpOutline } from './icons/TrendingUpOutline'
|
|
16
|
-
export { Bookmark } from './icons/Bookmark'
|
|
17
|
-
export { BookmarkOutline } from './icons/BookmarkOutline'
|
|
18
|
-
export { ArrowForwardOutline } from './icons/ArrowForwardOutline'
|
|
19
|
-
export { ArrowBackOutline } from './icons/ArrowBackOutline'
|
|
20
|
-
export { DoneAllOutline } from './icons/DoneAllOutline'
|
|
21
|
-
export { LogOut } from './icons/LogOut'
|
|
22
|
-
export { LogOutOutline } from './icons/LogOutOutline'
|
|
23
|
-
export { Calendar } from './icons/Calendar'
|
|
24
|
-
export { CalendarOutline } from './icons/CalendarOutline'
|
|
25
|
-
export { ArrowIosUp } from './icons/ArrowIosUp'
|
|
26
|
-
export { ArrowIosDownOutline } from './icons/ArrowIosDownOutline'
|
|
27
|
-
export { RadioButtonChecked } from './icons/RadioButtonChecked'
|
|
28
|
-
export { RadioButtonUnchecked } from './icons/RadioButtonUnchecked'
|
|
29
|
-
export { PauseCircle } from './icons/PauseCircle'
|
|
30
|
-
export { PauseCircleOutline } from './icons/PauseCircleOutline'
|
|
31
|
-
export { PlayCircle } from './icons/PlayCircle'
|
|
32
|
-
export { PlayCircleOutline } from './icons/PlayCircleOutline'
|
|
33
|
-
export { ColorPaletteOutline } from './icons/ColorPaletteOutline'
|
|
34
|
-
export { ArrowIosBack } from './icons/ArrowIosBack'
|
|
35
|
-
export { ArrowIosBackOutline } from './icons/ArrowIosBackOutline'
|
|
36
|
-
export { ArrowIosForward } from './icons/ArrowIosForward'
|
|
37
|
-
export { ArrowIosForwardOutline } from './icons/ArrowIosForwardOutline'
|
|
38
|
-
export { Expand } from './icons/Expand'
|
|
39
|
-
export { ExpandOutline } from './icons/ExpandOutline'
|
|
40
|
-
export { MenuOutline } from './icons/MenuOutline'
|
|
41
|
-
export { PlusCircle } from './icons/PlusCircle'
|
|
42
|
-
export { PlusCircleOutline } from './icons/PlusCircleOutline'
|
|
43
|
-
export { ImageIcon } from './icons/Image'
|
|
44
|
-
export { ImageOutline } from './icons/ImageOutline'
|
|
45
|
-
export { Search } from './icons/Search'
|
|
46
|
-
export { SearchOutline } from './icons/SearchOutline'
|
|
47
|
-
export { Block } from './icons/Block'
|
|
48
|
-
export { BlockOutline } from './icons/BlockOutline'
|
|
49
|
-
export { Settings } from './icons/Settings'
|
|
50
|
-
export { SettingsOutline } from './icons/SettingsOutline'
|
|
51
|
-
export { Layers } from './icons/Layers'
|
|
52
|
-
export { LayersOutline } from './icons/LayersOutline'
|
|
53
|
-
export { GithubRepo } from './icons/GithubRepo'
|
|
54
|
-
export { EyeOff } from './icons/EyeOff'
|
|
55
|
-
export { EyeOffOutline } from './icons/EyeOffOutline'
|
|
56
|
-
export { Eye } from './icons/Eye'
|
|
57
|
-
export { EyeOutline } from './icons/EyeOutline'
|
|
58
|
-
export { PaperPlane } from './icons/PaperPlane'
|
|
59
|
-
export { PaperPlaneOutline } from './icons/PaperPlaneOutline'
|
|
60
|
-
export { MoreHorizontal } from './icons/MoreHorizontal'
|
|
61
|
-
export { MoreHorizontalOutline } from './icons/MoreHorizontalOutline'
|
|
62
|
-
export { MessageCircle } from './icons/MessageCircle'
|
|
63
|
-
export { MessageCircleOutline } from './icons/MessageCircleOutline'
|
|
64
|
-
export { PersonRemove } from './icons/PersonRemove'
|
|
65
|
-
export { PersonRemoveOutline } from './icons/PersonRemoveOutline'
|
|
66
|
-
export { PersonAdd } from './icons/PersonAdd'
|
|
67
|
-
export { PersonAddOutline } from './icons/PersonAddOutline'
|
|
68
|
-
export { Mic } from './icons/Mic'
|
|
69
|
-
export { MicOutline } from './icons/MicOutline'
|
|
70
|
-
export { Copy } from './icons/Copy'
|
|
71
|
-
export { CopyOutline } from './icons/CopyOutline'
|
|
72
|
-
export { CreditCard } from './icons/CreditCard'
|
|
73
|
-
export { CreditCardOutline } from './icons/CreditCardOutline'
|
|
74
|
-
export { Edit } from './icons/Edit'
|
|
75
|
-
export { EditOutline } from './icons/EditOutline'
|
|
76
|
-
export { Email } from './icons/Email'
|
|
77
|
-
export { EmailOutline } from './icons/EmailOutline'
|
|
78
|
-
export { Heart } from './icons/Heart'
|
|
79
|
-
export { HeartOutline } from './icons/HeartOutline'
|
|
80
|
-
export { Maximize } from './icons/Maximize'
|
|
81
|
-
export { MaximizeOutline } from './icons/MaximizeOutline'
|
|
82
|
-
export { Pin } from './icons/Pin'
|
|
83
|
-
export { PinOutline } from './icons/PinOutline'
|
|
84
|
-
export { Trash } from './icons/Trash'
|
|
85
|
-
export { TrashOutline } from './icons/TrashOutline'
|
|
86
|
-
export { Stripe } from './icons/Stripe'
|
|
87
|
-
export { RecaptchaLogo } from './icons/RecaptchaLogo'
|
|
88
|
-
export { Paypal } from './icons/Paypal'
|
|
89
|
-
export { Paid } from './icons/Paid'
|
|
90
|
-
export { Google } from './icons/Google'
|
|
91
|
-
export { Facebook } from './icons/Facebook'
|
|
92
|
-
export { Brave } from './icons/Brave'
|
|
93
|
-
export { Explorer } from './icons/Explorer'
|
|
94
|
-
export { Firefox } from './icons/Firefox'
|
|
95
|
-
export { MicrosoftEdge } from './icons/MicrosoftEdge'
|
|
96
|
-
export { Opera } from './icons/Opera'
|
|
97
|
-
export { Safari } from './icons/Safari'
|
|
98
|
-
export { UcBrowser } from './icons/UcBrowser'
|
|
99
|
-
export { Yandex } from './icons/Yandex'
|
|
100
|
-
export { Sending } from './icons/Sending'
|
|
101
|
-
export { ErrorIcon } from './icons/ErrorIcon'
|
|
102
|
-
export { FileIcon } from './icons/FileIcon'
|
|
103
|
-
// Logo asset
|
|
104
|
-
export { Logo } from './logo/Logo'
|
package/src/assets/logo/Logo.tsx
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { forwardRef, memo, type Ref, type SVGProps } from 'react'
|
|
4
|
-
|
|
5
|
-
type LogoSize = 'l' | 'm' | 's' | 'xl' | 'xs'
|
|
6
|
-
type LogoTheme = 'day' | 'night'
|
|
7
|
-
|
|
8
|
-
export type LogoProps = {
|
|
9
|
-
size?: LogoSize
|
|
10
|
-
theme?: LogoTheme
|
|
11
|
-
svgProps?: SVGProps<SVGSVGElement>
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const sizeMap: Record<LogoSize, number> = {
|
|
15
|
-
xs: 16,
|
|
16
|
-
s: 24,
|
|
17
|
-
m: 48,
|
|
18
|
-
l: 72,
|
|
19
|
-
xl: 108,
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const SvgComponent = (
|
|
23
|
-
{ size = 's', theme = 'day', svgProps }: LogoProps,
|
|
24
|
-
ref: Ref<SVGSVGElement>
|
|
25
|
-
) => {
|
|
26
|
-
const selectedSize = sizeMap[size]
|
|
27
|
-
const fillSvg = theme === 'day' ? 'var(--color-dark-300)' : 'var(--color-light-100)'
|
|
28
|
-
const strokeSvg = theme === 'day' ? 'var(--color-light-100)' : 'var(--color-dark-300)'
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<svg
|
|
32
|
-
xmlns={'http://www.w3.org/2000/svg'}
|
|
33
|
-
width={selectedSize}
|
|
34
|
-
height={selectedSize}
|
|
35
|
-
viewBox={'0 0 108 108'}
|
|
36
|
-
fill={'none'}
|
|
37
|
-
ref={ref}
|
|
38
|
-
{...svgProps}
|
|
39
|
-
>
|
|
40
|
-
<rect width={108} height={108} fill={fillSvg} rx={15} />
|
|
41
|
-
<circle
|
|
42
|
-
cx={54}
|
|
43
|
-
cy={54}
|
|
44
|
-
r={25}
|
|
45
|
-
fill={'var(--color-accent-300)'}
|
|
46
|
-
stroke={strokeSvg}
|
|
47
|
-
strokeWidth={10}
|
|
48
|
-
/>
|
|
49
|
-
</svg>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const ForwardRef = forwardRef(SvgComponent)
|
|
54
|
-
export const Logo = memo(ForwardRef)
|
|
55
|
-
Logo.displayName = 'Logo'
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
@use '@/styles/mixins' as *;
|
|
2
|
-
|
|
3
|
-
.root {
|
|
4
|
-
@include flex(flex, space-between, flex-start);
|
|
5
|
-
|
|
6
|
-
gap: 1.5rem;
|
|
7
|
-
|
|
8
|
-
width: 100%;
|
|
9
|
-
max-width: 24rem;
|
|
10
|
-
padding: 0.75rem 1.5rem;
|
|
11
|
-
border: 1px solid transparent;
|
|
12
|
-
border-radius: 0.125rem;
|
|
13
|
-
|
|
14
|
-
&.error {
|
|
15
|
-
border-color: var(--color-danger-500);
|
|
16
|
-
color: var(--color-light-100);
|
|
17
|
-
background-color: var(--color-danger-900);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&.success {
|
|
21
|
-
border-color: var(--color-success-500);
|
|
22
|
-
color: var(--color-light-100);
|
|
23
|
-
background-color: var(--color-success-900);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&.warning {
|
|
27
|
-
border-color: var(--color-warning-500);
|
|
28
|
-
color: var(--color-light-100);
|
|
29
|
-
background-color: var(--color-warning-900);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.content {
|
|
34
|
-
@include flex(flex, null, center);
|
|
35
|
-
|
|
36
|
-
flex-wrap: wrap;
|
|
37
|
-
gap: 0.25rem;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.title {
|
|
41
|
-
white-space: nowrap;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.closeBtn {
|
|
45
|
-
@include flex(flex, center, center);
|
|
46
|
-
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
|
|
49
|
-
flex-shrink: 0;
|
|
50
|
-
|
|
51
|
-
padding: 0;
|
|
52
|
-
border: none;
|
|
53
|
-
|
|
54
|
-
color: inherit;
|
|
55
|
-
|
|
56
|
-
background: transparent;
|
|
57
|
-
|
|
58
|
-
svg {
|
|
59
|
-
pointer-events: none;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import type { ComponentPropsWithoutRef } from 'react'
|
|
4
|
-
import clsx from 'clsx'
|
|
5
|
-
import { CloseOutline } from '@/assets'
|
|
6
|
-
import { Button, Typography } from '@/components'
|
|
7
|
-
import s from './Alert.module.scss'
|
|
8
|
-
|
|
9
|
-
export type FieldError = {
|
|
10
|
-
field: string
|
|
11
|
-
message: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type AlertVariant = 'error' | 'success' | 'warning'
|
|
15
|
-
|
|
16
|
-
export interface AlertProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
17
|
-
children?: string
|
|
18
|
-
errors?: FieldError[]
|
|
19
|
-
onClose?: () => void
|
|
20
|
-
title?: string
|
|
21
|
-
variant?: AlertVariant
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const Alert = ({
|
|
25
|
-
className,
|
|
26
|
-
onClose,
|
|
27
|
-
title,
|
|
28
|
-
children,
|
|
29
|
-
errors,
|
|
30
|
-
variant = 'success',
|
|
31
|
-
...props
|
|
32
|
-
}: AlertProps) => {
|
|
33
|
-
const isFieldErrors = Array.isArray(errors) && errors.length > 0
|
|
34
|
-
const isStringContent = typeof children === 'string' && children.trim().length > 0
|
|
35
|
-
|
|
36
|
-
if (!title && !isStringContent && !isFieldErrors) return null
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<div
|
|
40
|
-
className={clsx(s.root, s[variant], className)}
|
|
41
|
-
role={variant === 'error' ? 'alert' : 'status'}
|
|
42
|
-
{...props}
|
|
43
|
-
>
|
|
44
|
-
<div className={s.content}>
|
|
45
|
-
{title && (
|
|
46
|
-
<Typography className={s.title} variant={'subtitle2'}>
|
|
47
|
-
{title}
|
|
48
|
-
</Typography>
|
|
49
|
-
)}
|
|
50
|
-
|
|
51
|
-
{isStringContent && <Typography variant={'subtitle1'}>{children}</Typography>}
|
|
52
|
-
|
|
53
|
-
{isFieldErrors && (
|
|
54
|
-
<ul className={s.errorList}>
|
|
55
|
-
{errors.map((err, index) => (
|
|
56
|
-
<li key={`${err.field}-${index}`}>
|
|
57
|
-
<Typography variant={'subtitle1'}>
|
|
58
|
-
<b className={s.errorField}>{err.field}:</b> <span>{err.message}</span>
|
|
59
|
-
</Typography>
|
|
60
|
-
</li>
|
|
61
|
-
))}
|
|
62
|
-
</ul>
|
|
63
|
-
)}
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
{onClose && (
|
|
67
|
-
<Button
|
|
68
|
-
as={'button'}
|
|
69
|
-
type={'button'}
|
|
70
|
-
aria-label={'Close'}
|
|
71
|
-
className={s.closeBtn}
|
|
72
|
-
onClick={onClose}
|
|
73
|
-
>
|
|
74
|
-
<CloseOutline />
|
|
75
|
-
</Button>
|
|
76
|
-
)}
|
|
77
|
-
</div>
|
|
78
|
-
)
|
|
79
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Alert'
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
@use '@/styles/mixins' as *;
|
|
2
|
-
|
|
3
|
-
.audio {
|
|
4
|
-
@include flex(flex, none, center);
|
|
5
|
-
|
|
6
|
-
gap: 0.75rem;
|
|
7
|
-
width: 100%;
|
|
8
|
-
padding: 0.25rem 0;
|
|
9
|
-
border-radius: 0.5rem;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.playButton {
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
|
|
15
|
-
flex-shrink: 0;
|
|
16
|
-
|
|
17
|
-
padding: 0;
|
|
18
|
-
border: none;
|
|
19
|
-
border-radius: 50%;
|
|
20
|
-
|
|
21
|
-
background-color: transparent;
|
|
22
|
-
|
|
23
|
-
@include flex(flex, center, center);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.content {
|
|
27
|
-
flex: 1;
|
|
28
|
-
|
|
29
|
-
@include flex(flex, none, none);
|
|
30
|
-
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
gap: 0.375rem;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.waveform {
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
|
|
38
|
-
display: flex;
|
|
39
|
-
gap: 1px;
|
|
40
|
-
align-items: center;
|
|
41
|
-
|
|
42
|
-
height: 1.5rem;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.bar {
|
|
46
|
-
width: 2px;
|
|
47
|
-
border-radius: 1px;
|
|
48
|
-
background: var(--color-accent-100);
|
|
49
|
-
|
|
50
|
-
@include transition-basic(background);
|
|
51
|
-
|
|
52
|
-
@include media-tablet {
|
|
53
|
-
width: 1px;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.played {
|
|
58
|
-
background: var(--color-light-100);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.footer {
|
|
62
|
-
@include flex(flex, flex-start, center);
|
|
63
|
-
|
|
64
|
-
height: 1.5rem;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.currentTime {
|
|
68
|
-
width: 1.75rem;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.divider {
|
|
72
|
-
margin-right: 0.25rem;
|
|
73
|
-
color: var(--color-accent-100);
|
|
74
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import clsx from 'clsx'
|
|
4
|
-
import { useRef, useState } from 'react'
|
|
5
|
-
import { PauseCircle, PlayCircle } from '@/assets'
|
|
6
|
-
import { Typography } from '@/components'
|
|
7
|
-
import { Button } from '@/components/Button'
|
|
8
|
-
import { WAVE_FORM } from '@/constants'
|
|
9
|
-
import { formatTime } from '@/utils'
|
|
10
|
-
import s from './AudioPlayer.module.scss'
|
|
11
|
-
|
|
12
|
-
export type AudioPlayerProps = {
|
|
13
|
-
src: string
|
|
14
|
-
className?: string
|
|
15
|
-
waveform: number[]
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const AudioPlayer = ({ src, waveform = WAVE_FORM, className }: AudioPlayerProps) => {
|
|
19
|
-
const audioRef = useRef<HTMLAudioElement>(null)
|
|
20
|
-
|
|
21
|
-
const [isPlaying, setIsPlaying] = useState(false)
|
|
22
|
-
const [progress, setProgress] = useState(0)
|
|
23
|
-
const [currentTime, setCurrentTime] = useState(0)
|
|
24
|
-
const [duration, setDuration] = useState(0)
|
|
25
|
-
|
|
26
|
-
const playedBars = Math.floor(progress * waveform.length)
|
|
27
|
-
|
|
28
|
-
const togglePlay = async () => {
|
|
29
|
-
if (!audioRef.current) return
|
|
30
|
-
|
|
31
|
-
if (isPlaying) {
|
|
32
|
-
audioRef.current.pause()
|
|
33
|
-
} else {
|
|
34
|
-
await audioRef.current.play()
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
setIsPlaying(!isPlaying)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const handleTimeUpdate = () => {
|
|
41
|
-
if (!audioRef.current) return
|
|
42
|
-
|
|
43
|
-
setCurrentTime(audioRef.current.currentTime)
|
|
44
|
-
setProgress(audioRef.current.currentTime / audioRef.current.duration)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const handleLoaded = () => {
|
|
48
|
-
if (!audioRef.current) return
|
|
49
|
-
|
|
50
|
-
setDuration(audioRef.current.duration)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const handleEnded = () => {
|
|
54
|
-
setIsPlaying(false)
|
|
55
|
-
setProgress(0)
|
|
56
|
-
setCurrentTime(0)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const seek = (e: React.MouseEvent<HTMLDivElement>) => {
|
|
60
|
-
if (!audioRef.current) return
|
|
61
|
-
|
|
62
|
-
const rect = e.currentTarget.getBoundingClientRect()
|
|
63
|
-
const x = e.clientX - rect.left
|
|
64
|
-
const percent = x / rect.width
|
|
65
|
-
|
|
66
|
-
audioRef.current.currentTime = percent * duration
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<div className={clsx(s.audio, className)}>
|
|
71
|
-
<audio
|
|
72
|
-
ref={audioRef}
|
|
73
|
-
src={src}
|
|
74
|
-
preload={'auto'}
|
|
75
|
-
onLoadedMetadata={handleLoaded}
|
|
76
|
-
onTimeUpdate={handleTimeUpdate}
|
|
77
|
-
onEnded={handleEnded}
|
|
78
|
-
/>
|
|
79
|
-
|
|
80
|
-
<Button className={s.playButton} onClick={togglePlay}>
|
|
81
|
-
{isPlaying ? (
|
|
82
|
-
<PauseCircle color={'var(--color-light-100)'} size={48} />
|
|
83
|
-
) : (
|
|
84
|
-
<PlayCircle color={'var(--color-light-100)'} size={48} />
|
|
85
|
-
)}
|
|
86
|
-
</Button>
|
|
87
|
-
|
|
88
|
-
<div className={s.content}>
|
|
89
|
-
<div className={s.waveform} onClick={seek}>
|
|
90
|
-
{waveform.map((height, index) => (
|
|
91
|
-
<span
|
|
92
|
-
key={index}
|
|
93
|
-
className={clsx(s.bar, index <= playedBars && s.played)}
|
|
94
|
-
style={{ height }}
|
|
95
|
-
/>
|
|
96
|
-
))}
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
<div className={s.footer}>
|
|
100
|
-
{isPlaying && (
|
|
101
|
-
<>
|
|
102
|
-
<Typography
|
|
103
|
-
color={'var(--color-accent-100)'}
|
|
104
|
-
variant={'caption1'}
|
|
105
|
-
className={s.currentTime}
|
|
106
|
-
>
|
|
107
|
-
{formatTime(currentTime)}
|
|
108
|
-
</Typography>
|
|
109
|
-
<span className={s.divider}>/</span>
|
|
110
|
-
</>
|
|
111
|
-
)}
|
|
112
|
-
<Typography color={'var(--color-accent-100)'} variant={'caption1'}>
|
|
113
|
-
{formatTime(duration)}
|
|
114
|
-
</Typography>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
)
|
|
119
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './AudioPlayer'
|