@brcarddev/frontend-commons 1.0.2
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/README.md +241 -0
- package/eslint.config.js +190 -0
- package/package.json +161 -0
- package/src/components/atoms/AudioPlayer/audio-player.stories.tsx +36 -0
- package/src/components/atoms/AudioPlayer/audio-player.test.tsx +20 -0
- package/src/components/atoms/AudioPlayer/audio-player.tsx +13 -0
- package/src/components/atoms/AudioPlayer/index.ts +1 -0
- package/src/components/atoms/Badge/badge.stories.tsx +80 -0
- package/src/components/atoms/Badge/badge.test.tsx +59 -0
- package/src/components/atoms/Badge/badge.tsx +47 -0
- package/src/components/atoms/Badge/index.ts +1 -0
- package/src/components/atoms/Box/box.stories.tsx +37 -0
- package/src/components/atoms/Box/box.test.tsx +47 -0
- package/src/components/atoms/Box/box.tsx +7 -0
- package/src/components/atoms/Box/index.ts +1 -0
- package/src/components/atoms/Button/button.stories.tsx +108 -0
- package/src/components/atoms/Button/button.test.tsx +54 -0
- package/src/components/atoms/Button/button.tsx +96 -0
- package/src/components/atoms/Button/index.ts +1 -0
- package/src/components/atoms/ButtonUpload/button-upload.stories.tsx +137 -0
- package/src/components/atoms/ButtonUpload/button-upload.tsx +304 -0
- package/src/components/atoms/ButtonUpload/index.ts +1 -0
- package/src/components/atoms/Calendar/calendar.stories.tsx +51 -0
- package/src/components/atoms/Calendar/calendar.test.tsx +41 -0
- package/src/components/atoms/Calendar/calendar.tsx +107 -0
- package/src/components/atoms/Calendar/index.ts +1 -0
- package/src/components/atoms/CheckIcon/check-icon.stories.tsx +38 -0
- package/src/components/atoms/CheckIcon/check-icon.test.tsx +270 -0
- package/src/components/atoms/CheckIcon/check-icon.tsx +141 -0
- package/src/components/atoms/CheckIcon/index.ts +1 -0
- package/src/components/atoms/Checkbox/checkbox.stories.tsx +133 -0
- package/src/components/atoms/Checkbox/checkbox.test.tsx +70 -0
- package/src/components/atoms/Checkbox/checkbox.tsx +31 -0
- package/src/components/atoms/Checkbox/index.ts +1 -0
- package/src/components/atoms/Flex/flex.stories.tsx +33 -0
- package/src/components/atoms/Flex/flex.test.tsx +47 -0
- package/src/components/atoms/Flex/flex.tsx +7 -0
- package/src/components/atoms/Flex/index.ts +1 -0
- package/src/components/atoms/Grid/grid.stories.tsx +33 -0
- package/src/components/atoms/Grid/grid.test.tsx +47 -0
- package/src/components/atoms/Grid/grid.tsx +7 -0
- package/src/components/atoms/Grid/index.ts +1 -0
- package/src/components/atoms/Icon/icon.stories.tsx +169 -0
- package/src/components/atoms/Icon/icon.test.tsx +272 -0
- package/src/components/atoms/Icon/icon.tsx +119 -0
- package/src/components/atoms/Icon/index.ts +1 -0
- package/src/components/atoms/Input/index.ts +1 -0
- package/src/components/atoms/Input/input.stories.tsx +704 -0
- package/src/components/atoms/Input/input.test.tsx +86 -0
- package/src/components/atoms/Input/input.tsx +161 -0
- package/src/components/atoms/InputMoney/index.ts +2 -0
- package/src/components/atoms/InputMoney/input-money.stories.tsx +240 -0
- package/src/components/atoms/InputMoney/input-money.test.tsx +98 -0
- package/src/components/atoms/InputMoney/input-money.tsx +254 -0
- package/src/components/atoms/InputPhone/index.ts +2 -0
- package/src/components/atoms/InputPhone/input-phone.stories.tsx +447 -0
- package/src/components/atoms/InputPhone/input-phone.test.tsx +148 -0
- package/src/components/atoms/InputPhone/input-phone.tsx +267 -0
- package/src/components/atoms/InputSearch/index.ts +2 -0
- package/src/components/atoms/InputSearch/input-search.stories.tsx +360 -0
- package/src/components/atoms/InputSearch/input-search.test.tsx +239 -0
- package/src/components/atoms/InputSearch/input-search.tsx +210 -0
- package/src/components/atoms/InputUpload/index.ts +1 -0
- package/src/components/atoms/InputUpload/input-upload.stories.tsx +229 -0
- package/src/components/atoms/InputUpload/input-upload.test.tsx +556 -0
- package/src/components/atoms/InputUpload/input-upload.tsx +434 -0
- package/src/components/atoms/InputWithButton/index.ts +2 -0
- package/src/components/atoms/InputWithButton/input-with-button.stories.tsx +503 -0
- package/src/components/atoms/InputWithButton/input-with-button.test.tsx +128 -0
- package/src/components/atoms/InputWithButton/input-with-button.tsx +170 -0
- package/src/components/atoms/Label/index.ts +1 -0
- package/src/components/atoms/Label/label.stories.tsx +90 -0
- package/src/components/atoms/Label/label.test.tsx +59 -0
- package/src/components/atoms/Label/label.tsx +43 -0
- package/src/components/atoms/Progress/index.ts +1 -0
- package/src/components/atoms/Progress/progress.stories.tsx +30 -0
- package/src/components/atoms/Progress/progress.test.tsx +63 -0
- package/src/components/atoms/Progress/progress.tsx +32 -0
- package/src/components/atoms/RenderCondition/index.ts +1 -0
- package/src/components/atoms/RenderCondition/render-condition.stories.tsx +28 -0
- package/src/components/atoms/RenderCondition/render-condition.test.tsx +27 -0
- package/src/components/atoms/RenderCondition/render-condition.tsx +9 -0
- package/src/components/atoms/RichTextEditor/index.ts +1 -0
- package/src/components/atoms/RichTextEditor/rich-text-editor.stories.tsx +214 -0
- package/src/components/atoms/RichTextEditor/rich-text-editor.test.tsx +442 -0
- package/src/components/atoms/RichTextEditor/rich-text-editor.tsx +202 -0
- package/src/components/atoms/Separator/index.ts +1 -0
- package/src/components/atoms/Separator/separator.stories.tsx +117 -0
- package/src/components/atoms/Separator/separator.test.tsx +50 -0
- package/src/components/atoms/Separator/separator.tsx +28 -0
- package/src/components/atoms/Skeleton/index.ts +1 -0
- package/src/components/atoms/Skeleton/skeleton.stories.tsx +84 -0
- package/src/components/atoms/Skeleton/skeleton.test.tsx +39 -0
- package/src/components/atoms/Skeleton/skeleton.tsx +14 -0
- package/src/components/atoms/Slider/index.ts +1 -0
- package/src/components/atoms/Slider/slider.stories.tsx +28 -0
- package/src/components/atoms/Slider/slider.test.tsx +90 -0
- package/src/components/atoms/Slider/slider.tsx +54 -0
- package/src/components/atoms/Sonner/index.ts +1 -0
- package/src/components/atoms/Sonner/sonner.css +39 -0
- package/src/components/atoms/Sonner/sonner.stories.tsx +261 -0
- package/src/components/atoms/Sonner/sonner.test.tsx +24 -0
- package/src/components/atoms/Sonner/sonner.tsx +13 -0
- package/src/components/atoms/Switch/index.ts +1 -0
- package/src/components/atoms/Switch/switch.stories.tsx +128 -0
- package/src/components/atoms/Switch/switch.test.tsx +70 -0
- package/src/components/atoms/Switch/switch.tsx +61 -0
- package/src/components/atoms/Textarea/index.ts +1 -0
- package/src/components/atoms/Textarea/textarea.stories.tsx +169 -0
- package/src/components/atoms/Textarea/textarea.test.tsx +56 -0
- package/src/components/atoms/Textarea/textarea.tsx +26 -0
- package/src/components/atoms/Toggle/index.ts +1 -0
- package/src/components/atoms/Toggle/toggle.stories.tsx +170 -0
- package/src/components/atoms/Toggle/toggle.test.tsx +62 -0
- package/src/components/atoms/Toggle/toggle.tsx +47 -0
- package/src/components/atoms/Typography/index.ts +1 -0
- package/src/components/atoms/Typography/typography.stories.tsx +95 -0
- package/src/components/atoms/Typography/typography.test.tsx +66 -0
- package/src/components/atoms/Typography/typography.tsx +63 -0
- package/src/components/atoms/UploadImageField/index.ts +1 -0
- package/src/components/atoms/UploadImageField/upload-image-field.stories.tsx +249 -0
- package/src/components/atoms/UploadImageField/upload-image-field.test.tsx +348 -0
- package/src/components/atoms/UploadImageField/upload-image-field.tsx +362 -0
- package/src/components/atoms/VideoPlayer/index.ts +1 -0
- package/src/components/atoms/VideoPlayer/video-player.stories.tsx +37 -0
- package/src/components/atoms/VideoPlayer/video-player.test.tsx +20 -0
- package/src/components/atoms/VideoPlayer/video-player.tsx +26 -0
- package/src/components/atoms/index.ts +31 -0
- package/src/components/icons/alert-circle.tsx +22 -0
- package/src/components/icons/align-center.tsx +22 -0
- package/src/components/icons/align-left.tsx +22 -0
- package/src/components/icons/annotation-dots.tsx +16 -0
- package/src/components/icons/annotation-question.tsx +15 -0
- package/src/components/icons/annotation.tsx +22 -0
- package/src/components/icons/announcement-01.tsx +15 -0
- package/src/components/icons/announcement-02.tsx +15 -0
- package/src/components/icons/apple-logo.tsx +9 -0
- package/src/components/icons/arrow-circle-broken-right.tsx +16 -0
- package/src/components/icons/arrow-down.tsx +9 -0
- package/src/components/icons/arrow-up.tsx +9 -0
- package/src/components/icons/at-sign.tsx +21 -0
- package/src/components/icons/award-01.tsx +15 -0
- package/src/components/icons/award-03.tsx +16 -0
- package/src/components/icons/bank-note-01.tsx +15 -0
- package/src/components/icons/bar-chart-square-02.tsx +9 -0
- package/src/components/icons/bell-01.tsx +9 -0
- package/src/components/icons/bell-04.tsx +16 -0
- package/src/components/icons/bold-01.tsx +22 -0
- package/src/components/icons/book-open-01.tsx +15 -0
- package/src/components/icons/brackets-ellipses.tsx +22 -0
- package/src/components/icons/briefcase-01.tsx +9 -0
- package/src/components/icons/brush-01.tsx +22 -0
- package/src/components/icons/building-02.tsx +9 -0
- package/src/components/icons/building-06.tsx +9 -0
- package/src/components/icons/calendar-minus-02.tsx +15 -0
- package/src/components/icons/calendar.tsx +9 -0
- package/src/components/icons/certificate-01.tsx +16 -0
- package/src/components/icons/chart-breakout-square.tsx +16 -0
- package/src/components/icons/check-circle-02.tsx +16 -0
- package/src/components/icons/check-circle.tsx +15 -0
- package/src/components/icons/check.tsx +21 -0
- package/src/components/icons/chevron-down-double.tsx +16 -0
- package/src/components/icons/chevron-down.tsx +9 -0
- package/src/components/icons/chevron-left-double.tsx +22 -0
- package/src/components/icons/chevron-left.tsx +16 -0
- package/src/components/icons/chevron-right-double.tsx +22 -0
- package/src/components/icons/chevron-right.tsx +16 -0
- package/src/components/icons/chevron-up-double.tsx +16 -0
- package/src/components/icons/clock-rewind.tsx +15 -0
- package/src/components/icons/clock-stopwatch.tsx +15 -0
- package/src/components/icons/coins-hand.tsx +15 -0
- package/src/components/icons/coins-stacked-01.tsx +15 -0
- package/src/components/icons/coins-stacked-02.tsx +15 -0
- package/src/components/icons/container.tsx +9 -0
- package/src/components/icons/copy-02.tsx +16 -0
- package/src/components/icons/copy-04.tsx +21 -0
- package/src/components/icons/corner-down-right.tsx +9 -0
- package/src/components/icons/countries/br.tsx +20 -0
- package/src/components/icons/countries/es.tsx +19 -0
- package/src/components/icons/countries/index.ts +3 -0
- package/src/components/icons/countries/us.tsx +21 -0
- package/src/components/icons/dataflow-03.tsx +15 -0
- package/src/components/icons/dotpoints-01.tsx +22 -0
- package/src/components/icons/dots-vertical.tsx +35 -0
- package/src/components/icons/download-03.tsx +16 -0
- package/src/components/icons/download-cloud-02.tsx +15 -0
- package/src/components/icons/drag.tsx +14 -0
- package/src/components/icons/dropper.tsx +21 -0
- package/src/components/icons/edit-01.tsx +15 -0
- package/src/components/icons/edit-02.tsx +9 -0
- package/src/components/icons/edit-03.tsx +23 -0
- package/src/components/icons/eye.tsx +22 -0
- package/src/components/icons/face-frown.tsx +15 -0
- package/src/components/icons/face-happy.tsx +15 -0
- package/src/components/icons/file-06.tsx +15 -0
- package/src/components/icons/file-attachment-04.tsx +15 -0
- package/src/components/icons/file-download-02.tsx +16 -0
- package/src/components/icons/file-plus-02.tsx +16 -0
- package/src/components/icons/file-search-01.tsx +22 -0
- package/src/components/icons/file-search-03.tsx +15 -0
- package/src/components/icons/filter-lines.tsx +21 -0
- package/src/components/icons/first-category.tsx +16 -0
- package/src/components/icons/first-stage.tsx +19 -0
- package/src/components/icons/folder.tsx +15 -0
- package/src/components/icons/google.tsx +12 -0
- package/src/components/icons/graduation-hat-02.tsx +15 -0
- package/src/components/icons/grid-01.tsx +36 -0
- package/src/components/icons/help-circle.tsx +16 -0
- package/src/components/icons/help-square.tsx +16 -0
- package/src/components/icons/home-line.tsx +21 -0
- package/src/components/icons/icons.stories.tsx +199 -0
- package/src/components/icons/index.ts +140 -0
- package/src/components/icons/info-circle.tsx +15 -0
- package/src/components/icons/italic-01.tsx +22 -0
- package/src/components/icons/last-category.tsx +11 -0
- package/src/components/icons/last-stage.tsx +19 -0
- package/src/components/icons/layout-alt-04.tsx +9 -0
- package/src/components/icons/lightbulb-02.tsx +16 -0
- package/src/components/icons/link-01.tsx +16 -0
- package/src/components/icons/link-broken-01.tsx +16 -0
- package/src/components/icons/linkedin-logo.tsx +17 -0
- package/src/components/icons/lock-01.tsx +21 -0
- package/src/components/icons/log-out-01.tsx +9 -0
- package/src/components/icons/mail-01.tsx +16 -0
- package/src/components/icons/marker-pin-02.tsx +10 -0
- package/src/components/icons/menu-01.tsx +9 -0
- package/src/components/icons/middle-category.tsx +10 -0
- package/src/components/icons/middle-stage.tsx +19 -0
- package/src/components/icons/ms-outlook.tsx +47 -0
- package/src/components/icons/paragraph-spacing.tsx +15 -0
- package/src/components/icons/phone-01.tsx +21 -0
- package/src/components/icons/pie-chart-02.tsx +22 -0
- package/src/components/icons/plus-circle.tsx +15 -0
- package/src/components/icons/portal-logo.tsx +76 -0
- package/src/components/icons/presentation-chart-02.tsx +14 -0
- package/src/components/icons/route.tsx +22 -0
- package/src/components/icons/save-01.tsx +15 -0
- package/src/components/icons/search-lg.tsx +15 -0
- package/src/components/icons/search-sm.tsx +9 -0
- package/src/components/icons/send-03.tsx +15 -0
- package/src/components/icons/settings-01.tsx +17 -0
- package/src/components/icons/settings-03.tsx +14 -0
- package/src/components/icons/share-05.tsx +15 -0
- package/src/components/icons/share-06.tsx +15 -0
- package/src/components/icons/slash-circle-01.tsx +9 -0
- package/src/components/icons/star-01.tsx +9 -0
- package/src/components/icons/step-icon-active.tsx +11 -0
- package/src/components/icons/step-icon-checked.tsx +10 -0
- package/src/components/icons/step-icon-default.tsx +11 -0
- package/src/components/icons/switch-horizontal-01.tsx +9 -0
- package/src/components/icons/table-01.tsx +15 -0
- package/src/components/icons/tag-01.tsx +15 -0
- package/src/components/icons/tag-03.tsx +15 -0
- package/src/components/icons/tool-02.tsx +14 -0
- package/src/components/icons/trash-01.tsx +15 -0
- package/src/components/icons/underline-01.tsx +22 -0
- package/src/components/icons/upload-cloud-02.tsx +15 -0
- package/src/components/icons/user-01.tsx +9 -0
- package/src/components/icons/user-03.tsx +9 -0
- package/src/components/icons/user-check-01.tsx +14 -0
- package/src/components/icons/user-circle.tsx +14 -0
- package/src/components/icons/user-edit.tsx +16 -0
- package/src/components/icons/user-minus-02.tsx +15 -0
- package/src/components/icons/user-plus-01.tsx +22 -0
- package/src/components/icons/user-plus-02.tsx +15 -0
- package/src/components/icons/user-square.tsx +16 -0
- package/src/components/icons/users-01.tsx +14 -0
- package/src/components/icons/users-plus-01.tsx +21 -0
- package/src/components/icons/users-plus.tsx +16 -0
- package/src/components/icons/vertical-drag.tsx +21 -0
- package/src/components/icons/x-circle.tsx +15 -0
- package/src/components/icons/x-close.tsx +9 -0
- package/src/components/icons/zap-fast.tsx +16 -0
- package/src/components/icons/zap.tsx +9 -0
- package/src/components/index.ts +4 -0
- package/src/components/molecules/Accordion/accordion.stories.tsx +81 -0
- package/src/components/molecules/Accordion/accordion.test.tsx +91 -0
- package/src/components/molecules/Accordion/accordion.tsx +65 -0
- package/src/components/molecules/Accordion/index.ts +1 -0
- package/src/components/molecules/Alert/alert.stories.tsx +75 -0
- package/src/components/molecules/Alert/alert.test.tsx +58 -0
- package/src/components/molecules/Alert/alert.tsx +67 -0
- package/src/components/molecules/Alert/index.ts +1 -0
- package/src/components/molecules/AlertDialog/alert-dialog.stories.tsx +55 -0
- package/src/components/molecules/AlertDialog/alert-dialog.test.tsx +34 -0
- package/src/components/molecules/AlertDialog/alert-dialog.tsx +172 -0
- package/src/components/molecules/AlertDialog/index.ts +1 -0
- package/src/components/molecules/Avatar/avatar.stories.tsx +98 -0
- package/src/components/molecules/Avatar/avatar.test.tsx +55 -0
- package/src/components/molecules/Avatar/avatar.tsx +55 -0
- package/src/components/molecules/Avatar/index.ts +1 -0
- package/src/components/molecules/Breadcrumb/breadcrumb.stories.tsx +125 -0
- package/src/components/molecules/Breadcrumb/breadcrumb.test.tsx +118 -0
- package/src/components/molecules/Breadcrumb/breadcrumb.tsx +120 -0
- package/src/components/molecules/Breadcrumb/index.ts +1 -0
- package/src/components/molecules/Card/card.stories.tsx +109 -0
- package/src/components/molecules/Card/card.test.tsx +103 -0
- package/src/components/molecules/Card/card.tsx +78 -0
- package/src/components/molecules/Card/index.ts +1 -0
- package/src/components/molecules/Collapsible/collapsible.stories.tsx +28 -0
- package/src/components/molecules/Collapsible/collapsible.test.tsx +36 -0
- package/src/components/molecules/Collapsible/collapsible.tsx +31 -0
- package/src/components/molecules/Collapsible/index.ts +1 -0
- package/src/components/molecules/ColorPicker/color-picker.stories.tsx +40 -0
- package/src/components/molecules/ColorPicker/color-picker.tsx +106 -0
- package/src/components/molecules/ColorPicker/index.ts +1 -0
- package/src/components/molecules/ColorScale/color-scale.stories.tsx +31 -0
- package/src/components/molecules/ColorScale/color-scale.tsx +74 -0
- package/src/components/molecules/ColorScale/index.ts +1 -0
- package/src/components/molecules/Command/command.stories.tsx +71 -0
- package/src/components/molecules/Command/command.test.tsx +50 -0
- package/src/components/molecules/Command/command.tsx +177 -0
- package/src/components/molecules/Command/index.ts +1 -0
- package/src/components/molecules/ContextMenu/context-menu.stories.tsx +69 -0
- package/src/components/molecules/ContextMenu/context-menu.test.tsx +25 -0
- package/src/components/molecules/ContextMenu/context-menu.tsx +259 -0
- package/src/components/molecules/ContextMenu/index.ts +1 -0
- package/src/components/molecules/DatePicker/date-picker.stories.tsx +204 -0
- package/src/components/molecules/DatePicker/date-picker.test.tsx +27 -0
- package/src/components/molecules/DatePicker/date-picker.tsx +486 -0
- package/src/components/molecules/DatePicker/index.ts +1 -0
- package/src/components/molecules/Dialog/dialog.stories.tsx +48 -0
- package/src/components/molecules/Dialog/dialog.test.tsx +51 -0
- package/src/components/molecules/Dialog/dialog.tsx +150 -0
- package/src/components/molecules/Dialog/index.ts +1 -0
- package/src/components/molecules/Drawer/drawer.stories.tsx +182 -0
- package/src/components/molecules/Drawer/drawer.test.tsx +100 -0
- package/src/components/molecules/Drawer/drawer.tsx +206 -0
- package/src/components/molecules/Drawer/index.ts +1 -0
- package/src/components/molecules/Dropdown/dropdown-async.stories.tsx +15 -0
- package/src/components/molecules/Dropdown/dropdown.stories.tsx +112 -0
- package/src/components/molecules/Dropdown/dropdown.test.tsx +128 -0
- package/src/components/molecules/Dropdown/dropdown.tsx +322 -0
- package/src/components/molecules/Dropdown/index.ts +1 -0
- package/src/components/molecules/DropdownMenu/dropdown-menu.stories.tsx +154 -0
- package/src/components/molecules/DropdownMenu/dropdown-menu.test.tsx +163 -0
- package/src/components/molecules/DropdownMenu/dropdown-menu.tsx +313 -0
- package/src/components/molecules/DropdownMenu/index.ts +1 -0
- package/src/components/molecules/HoverCard/hover-card.stories.tsx +48 -0
- package/src/components/molecules/HoverCard/hover-card.test.tsx +42 -0
- package/src/components/molecules/HoverCard/hover-card.tsx +44 -0
- package/src/components/molecules/HoverCard/index.ts +1 -0
- package/src/components/molecules/InputOTP/index.ts +1 -0
- package/src/components/molecules/InputOTP/input-otp.stories.tsx +52 -0
- package/src/components/molecules/InputOTP/input-otp.test.tsx +28 -0
- package/src/components/molecules/InputOTP/input-otp.tsx +76 -0
- package/src/components/molecules/Menubar/index.ts +1 -0
- package/src/components/molecules/Menubar/menubar.stories.tsx +113 -0
- package/src/components/molecules/Menubar/menubar.test.tsx +42 -0
- package/src/components/molecules/Menubar/menubar.tsx +314 -0
- package/src/components/molecules/NavigationMenu/index.ts +1 -0
- package/src/components/molecules/NavigationMenu/navigation-menu.stories.tsx +143 -0
- package/src/components/molecules/NavigationMenu/navigation-menu.test.tsx +69 -0
- package/src/components/molecules/NavigationMenu/navigation-menu.tsx +174 -0
- package/src/components/molecules/PDFViewer/index.ts +1 -0
- package/src/components/molecules/PDFViewer/pdf-viewer.stories.tsx +34 -0
- package/src/components/molecules/PDFViewer/pdf-viewer.test.tsx +26 -0
- package/src/components/molecules/PDFViewer/pdf-viewer.tsx +358 -0
- package/src/components/molecules/Pagination/index.ts +1 -0
- package/src/components/molecules/Pagination/pagination.stories.tsx +193 -0
- package/src/components/molecules/Pagination/pagination.test.tsx +448 -0
- package/src/components/molecules/Pagination/pagination.tsx +206 -0
- package/src/components/molecules/PaginationDotGroup/index.ts +1 -0
- package/src/components/molecules/PaginationDotGroup/pagination-dot-group.stories.tsx +211 -0
- package/src/components/molecules/PaginationDotGroup/pagination-dot-group.test.tsx +385 -0
- package/src/components/molecules/PaginationDotGroup/pagination-dot-group.tsx +119 -0
- package/src/components/molecules/Popover/index.ts +1 -0
- package/src/components/molecules/Popover/popover-menu.stories.tsx +27 -0
- package/src/components/molecules/Popover/popover.test.tsx +50 -0
- package/src/components/molecules/Popover/popover.tsx +38 -0
- package/src/components/molecules/ProgressSteps/index.ts +1 -0
- package/src/components/molecules/ProgressSteps/progress-steps.stories.tsx +36 -0
- package/src/components/molecules/ProgressSteps/progress-steps.test.tsx +470 -0
- package/src/components/molecules/ProgressSteps/progress-steps.tsx +140 -0
- package/src/components/molecules/RadioGroup/index.ts +1 -0
- package/src/components/molecules/RadioGroup/radio-group.stories.tsx +42 -0
- package/src/components/molecules/RadioGroup/radio-group.test.tsx +22 -0
- package/src/components/molecules/RadioGroup/radio-group.tsx +55 -0
- package/src/components/molecules/Resizable/index.ts +1 -0
- package/src/components/molecules/Resizable/resizable.stories.tsx +52 -0
- package/src/components/molecules/Resizable/resizable.test.tsx +22 -0
- package/src/components/molecules/Resizable/resizable.tsx +55 -0
- package/src/components/molecules/ScrollArea/index.ts +1 -0
- package/src/components/molecules/ScrollArea/scroll-area.stories.tsx +93 -0
- package/src/components/molecules/ScrollArea/scroll-area.test.tsx +28 -0
- package/src/components/molecules/ScrollArea/scroll-area.tsx +57 -0
- package/src/components/molecules/Select/index.ts +1 -0
- package/src/components/molecules/Select/select.stories.tsx +63 -0
- package/src/components/molecules/Select/select.test.tsx +80 -0
- package/src/components/molecules/Select/select.tsx +172 -0
- package/src/components/molecules/Sheet/index.ts +1 -0
- package/src/components/molecules/Sheet/sheet.stories.tsx +141 -0
- package/src/components/molecules/Sheet/sheet.test.tsx +70 -0
- package/src/components/molecules/Sheet/sheet.tsx +133 -0
- package/src/components/molecules/Tabs/index.ts +1 -0
- package/src/components/molecules/Tabs/tabs.stories.tsx +222 -0
- package/src/components/molecules/Tabs/tabs.test.tsx +113 -0
- package/src/components/molecules/Tabs/tabs.tsx +102 -0
- package/src/components/molecules/ToggleGroup/index.ts +1 -0
- package/src/components/molecules/ToggleGroup/toggle-group.stories.tsx +117 -0
- package/src/components/molecules/ToggleGroup/toggle-group.test.tsx +100 -0
- package/src/components/molecules/ToggleGroup/toggle-group.tsx +70 -0
- package/src/components/molecules/Tooltip/index.ts +1 -0
- package/src/components/molecules/Tooltip/tooltip.stories.tsx +133 -0
- package/src/components/molecules/Tooltip/tooltip.test.tsx +58 -0
- package/src/components/molecules/Tooltip/tooltip.tsx +58 -0
- package/src/components/molecules/index.ts +33 -0
- package/src/components/organisms/Carousel/carousel.stories.tsx +94 -0
- package/src/components/organisms/Carousel/carousel.test.tsx +24 -0
- package/src/components/organisms/Carousel/carousel.tsx +383 -0
- package/src/components/organisms/Carousel/index.ts +1 -0
- package/src/components/organisms/Chart/chart.stories.tsx +102 -0
- package/src/components/organisms/Chart/chart.test.tsx +105 -0
- package/src/components/organisms/Chart/chart.tsx +294 -0
- package/src/components/organisms/Chart/index.ts +1 -0
- package/src/components/organisms/FileUpload/FilePreview/file-preview.tsx +55 -0
- package/src/components/organisms/FileUpload/FilePreview/index.ts +1 -0
- package/src/components/organisms/FileUpload/file-upload.stories.tsx +20 -0
- package/src/components/organisms/FileUpload/file-upload.test.tsx +59 -0
- package/src/components/organisms/FileUpload/file-upload.tsx +175 -0
- package/src/components/organisms/FileUpload/file.d.ts +21 -0
- package/src/components/organisms/FileUpload/index.ts +1 -0
- package/src/components/organisms/Form/form.stories.tsx +155 -0
- package/src/components/organisms/Form/form.test.tsx +49 -0
- package/src/components/organisms/Form/form.tsx +133 -0
- package/src/components/organisms/Form/index.ts +1 -0
- package/src/components/organisms/Sidebar/index.ts +1 -0
- package/src/components/organisms/Sidebar/sidebar.stories.tsx +86 -0
- package/src/components/organisms/Sidebar/sidebar.test.tsx +101 -0
- package/src/components/organisms/Sidebar/sidebar.tsx +666 -0
- package/src/components/organisms/Table/index.ts +1 -0
- package/src/components/organisms/Table/table.stories.tsx +86 -0
- package/src/components/organisms/Table/table.test.tsx +42 -0
- package/src/components/organisms/Table/table.tsx +120 -0
- package/src/components/organisms/index.ts +6 -0
- package/src/constants/brazilian-states.ts +29 -0
- package/src/constants/index.ts +1 -0
- package/src/hooks/index.ts +10 -0
- package/src/hooks/useEditorActiveMarks.ts +63 -0
- package/src/hooks/useForm.ts +8 -0
- package/src/hooks/useFormContext.ts +7 -0
- package/src/hooks/useFormField.ts +41 -0
- package/src/hooks/useMobile.ts +61 -0
- package/src/hooks/useOnToggle.ts +28 -0
- package/src/hooks/usePDFNavigation.ts +41 -0
- package/src/hooks/usePDFZoom.ts +35 -0
- package/src/hooks/useSidebar.ts +23 -0
- package/src/hooks/useToast.tsx +63 -0
- package/src/index.css +73 -0
- package/src/main.ts +6 -0
- package/src/theme.css +388 -0
- package/src/utils/api/api.test.ts +64 -0
- package/src/utils/api/api.ts +34 -0
- package/src/utils/api/index.ts +1 -0
- package/src/utils/array/array.test.ts +160 -0
- package/src/utils/array/array.ts +43 -0
- package/src/utils/array/index.ts +1 -0
- package/src/utils/clipboard/clipboard.test.ts +218 -0
- package/src/utils/clipboard/clipboard.ts +40 -0
- package/src/utils/clipboard/index.ts +1 -0
- package/src/utils/cn/cn.test.ts +43 -0
- package/src/utils/cn/cn.ts +6 -0
- package/src/utils/cn/index.ts +1 -0
- package/src/utils/color-utils/color-utils.test.ts +46 -0
- package/src/utils/color-utils/color-utils.ts +97 -0
- package/src/utils/color-utils/index.ts +1 -0
- package/src/utils/countries/countries.ts +69 -0
- package/src/utils/countries/index.ts +1 -0
- package/src/utils/currency/currency.test.ts +114 -0
- package/src/utils/currency/currency.ts +134 -0
- package/src/utils/currency/index.ts +1 -0
- package/src/utils/date/date.test.ts +167 -0
- package/src/utils/date/date.ts +83 -0
- package/src/utils/date/index.ts +1 -0
- package/src/utils/file/file.ts +45 -0
- package/src/utils/file/index.ts +1 -0
- package/src/utils/get-initials/get-initials.test.ts +40 -0
- package/src/utils/get-initials/get-initials.ts +13 -0
- package/src/utils/get-initials/index.ts +1 -0
- package/src/utils/index.ts +14 -0
- package/src/utils/masks/index.ts +1 -0
- package/src/utils/masks/masks.ts +180 -0
- package/src/utils/render-highlighted-text/index.ts +1 -0
- package/src/utils/render-highlighted-text/render-highlighted-text.tsx +25 -0
- package/src/utils/string/index.ts +1 -0
- package/src/utils/string/string.test.ts +171 -0
- package/src/utils/string/string.ts +155 -0
- package/src/utils/video/index.ts +1 -0
- package/src/utils/video/video.ts +9 -0
- package/src/vite-env.d.ts +3 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { ChangeEvent, ComponentProps, forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { cn } from '@/utils/cn';
|
|
4
|
+
|
|
5
|
+
import { Box, Button, Flex, RenderCondition, Trash01, Typography, UploadCloud02 } from '@/components';
|
|
6
|
+
|
|
7
|
+
export interface UploadImageFieldProps extends Omit<ComponentProps<'input'>, 'onChange' | 'onError' | 'value' | 'placeholder'> {
|
|
8
|
+
buttonText?: string;
|
|
9
|
+
maxSize?: number;
|
|
10
|
+
maxSizeErrorMessage?: string;
|
|
11
|
+
acceptErrorMessage?: string;
|
|
12
|
+
onFileSelect?: (file: File | null, previewUrl?: string) => void;
|
|
13
|
+
onUploadComplete?: (url: string) => void;
|
|
14
|
+
onError?: (error: string) => void;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
error?: string;
|
|
17
|
+
value?: UploadValue;
|
|
18
|
+
onChange?: (value: UploadValue) => void;
|
|
19
|
+
uploadFunction?: (file: File) => Promise<string>;
|
|
20
|
+
helperText?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type UploadValue = File | string | null;
|
|
24
|
+
|
|
25
|
+
export const UploadImageField = forwardRef<HTMLInputElement, UploadImageFieldProps>(({
|
|
26
|
+
buttonText = 'Select image',
|
|
27
|
+
maxSize = 5,
|
|
28
|
+
maxSizeErrorMessage,
|
|
29
|
+
acceptErrorMessage,
|
|
30
|
+
onFileSelect,
|
|
31
|
+
onUploadComplete,
|
|
32
|
+
onError,
|
|
33
|
+
loading = false,
|
|
34
|
+
disabled = false,
|
|
35
|
+
error,
|
|
36
|
+
accept = 'image/*',
|
|
37
|
+
value,
|
|
38
|
+
onChange,
|
|
39
|
+
uploadFunction,
|
|
40
|
+
helperText,
|
|
41
|
+
...props
|
|
42
|
+
}, ref) => {
|
|
43
|
+
const [ previewUrl, setPreviewUrl ] = useState<string | null>(null);
|
|
44
|
+
const [ selectedFile, setSelectedFile ] = useState<File | null>(null);
|
|
45
|
+
const [ isUploading, setIsUploading ] = useState<boolean>(false);
|
|
46
|
+
const [ isDragOver, setIsDragOver ] = useState<boolean>(false);
|
|
47
|
+
const [ isHovered, setIsHovered ] = useState<boolean>(false);
|
|
48
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
49
|
+
const uploadButtonRef = useRef<HTMLButtonElement>(null);
|
|
50
|
+
|
|
51
|
+
const isUrl = typeof value === 'string' && value.length > 0;
|
|
52
|
+
const isFile = value instanceof File;
|
|
53
|
+
|
|
54
|
+
const shouldShowImagePreview = Boolean(previewUrl && (
|
|
55
|
+
isUrl ||
|
|
56
|
+
(selectedFile && selectedFile.type.startsWith('image/'))
|
|
57
|
+
));
|
|
58
|
+
|
|
59
|
+
const isLoading = loading || isUploading;
|
|
60
|
+
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (isUrl) {
|
|
63
|
+
setPreviewUrl(value);
|
|
64
|
+
setSelectedFile(null);
|
|
65
|
+
} else if (isFile) {
|
|
66
|
+
setSelectedFile(value);
|
|
67
|
+
|
|
68
|
+
if (value.type.startsWith('image/')) {
|
|
69
|
+
const url = URL.createObjectURL(value);
|
|
70
|
+
setPreviewUrl(url);
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
setSelectedFile(null);
|
|
74
|
+
setPreviewUrl(null);
|
|
75
|
+
}
|
|
76
|
+
}, [ value, isUrl, isFile ]);
|
|
77
|
+
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
return () => {
|
|
80
|
+
if (previewUrl && !isUrl) {
|
|
81
|
+
URL.revokeObjectURL(previewUrl);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}, [ previewUrl, isUrl ]);
|
|
85
|
+
|
|
86
|
+
const validateFile = useCallback((file: File): string | null => {
|
|
87
|
+
if (maxSize && file.size > maxSize * 1024 * 1024) {
|
|
88
|
+
return maxSizeErrorMessage || `Arquivo muito grande. Tamanho máximo: ${maxSize}MB`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (accept) {
|
|
92
|
+
const acceptedTypes = accept.split(',').map(type => type.trim());
|
|
93
|
+
const fileType = file.type;
|
|
94
|
+
const fileExtension = `.${file.name.split('.').pop()?.toLowerCase()}`;
|
|
95
|
+
|
|
96
|
+
const isValidType = acceptedTypes.some(type => {
|
|
97
|
+
if (type.startsWith('.')) {
|
|
98
|
+
return fileExtension === type.toLowerCase();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return fileType === type || fileType.startsWith(type.replace('*', ''));
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
if (!isValidType) {
|
|
105
|
+
return acceptErrorMessage || `Tipo de arquivo não suportado. Tipos aceitos: ${accept}`;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return null;
|
|
110
|
+
}, [ maxSize, accept, maxSizeErrorMessage, acceptErrorMessage ]);
|
|
111
|
+
|
|
112
|
+
const handleUpload = useCallback(async (file: File): Promise<string | null> => {
|
|
113
|
+
if (!uploadFunction) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
try {
|
|
118
|
+
setIsUploading(true);
|
|
119
|
+
const url = await uploadFunction(file);
|
|
120
|
+
onUploadComplete?.(url);
|
|
121
|
+
return url;
|
|
122
|
+
} catch (error) {
|
|
123
|
+
const errorMessage = error instanceof Error ? error.message : 'Erro ao fazer upload';
|
|
124
|
+
onError?.(errorMessage);
|
|
125
|
+
return null;
|
|
126
|
+
} finally {
|
|
127
|
+
setIsUploading(false);
|
|
128
|
+
}
|
|
129
|
+
}, [ uploadFunction, onUploadComplete, onError ]);
|
|
130
|
+
|
|
131
|
+
const handleFileSelect = useCallback(async (file: File | null) => {
|
|
132
|
+
if (disabled || isLoading) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (previewUrl && !isUrl) {
|
|
137
|
+
URL.revokeObjectURL(previewUrl);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (file) {
|
|
141
|
+
const validationError = validateFile(file);
|
|
142
|
+
|
|
143
|
+
if (validationError) {
|
|
144
|
+
onError?.(validationError);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
setSelectedFile(file);
|
|
149
|
+
|
|
150
|
+
if (file.type.startsWith('image/')) {
|
|
151
|
+
const localUrl = URL.createObjectURL(file);
|
|
152
|
+
setPreviewUrl(localUrl);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
onFileSelect?.(file, previewUrl || undefined);
|
|
156
|
+
onChange?.(file);
|
|
157
|
+
|
|
158
|
+
if (uploadFunction) {
|
|
159
|
+
const uploadedUrl = await handleUpload(file);
|
|
160
|
+
|
|
161
|
+
if (uploadedUrl) {
|
|
162
|
+
onChange?.(uploadedUrl);
|
|
163
|
+
setPreviewUrl(uploadedUrl);
|
|
164
|
+
setSelectedFile(null);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
setSelectedFile(null);
|
|
169
|
+
setPreviewUrl(null);
|
|
170
|
+
onFileSelect?.(null);
|
|
171
|
+
onChange?.(null);
|
|
172
|
+
|
|
173
|
+
if (inputRef.current) {
|
|
174
|
+
inputRef.current.value = '';
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}, [
|
|
178
|
+
previewUrl,
|
|
179
|
+
validateFile,
|
|
180
|
+
onFileSelect,
|
|
181
|
+
onError,
|
|
182
|
+
onChange,
|
|
183
|
+
uploadFunction,
|
|
184
|
+
handleUpload,
|
|
185
|
+
isUrl,
|
|
186
|
+
disabled,
|
|
187
|
+
isLoading,
|
|
188
|
+
]);
|
|
189
|
+
|
|
190
|
+
const handleInputChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {
|
|
191
|
+
if (disabled || isLoading) return;
|
|
192
|
+
|
|
193
|
+
const file = e.target.files?.[0] || null;
|
|
194
|
+
handleFileSelect(file);
|
|
195
|
+
}, [ handleFileSelect, disabled, isLoading ]);
|
|
196
|
+
|
|
197
|
+
const handleClick = useCallback(() => {
|
|
198
|
+
if (!disabled && !loading && !isUploading) {
|
|
199
|
+
inputRef.current?.click();
|
|
200
|
+
}
|
|
201
|
+
}, [ disabled, loading, isUploading ]);
|
|
202
|
+
|
|
203
|
+
const handleDragOver = useCallback((e: React.DragEvent) => {
|
|
204
|
+
e.preventDefault();
|
|
205
|
+
setIsDragOver(true);
|
|
206
|
+
}, []);
|
|
207
|
+
|
|
208
|
+
const handleDragLeave = useCallback((e: React.DragEvent) => {
|
|
209
|
+
e.preventDefault();
|
|
210
|
+
setIsDragOver(false);
|
|
211
|
+
}, []);
|
|
212
|
+
|
|
213
|
+
const handleDrop = useCallback((e: React.DragEvent) => {
|
|
214
|
+
e.preventDefault();
|
|
215
|
+
setIsDragOver(false);
|
|
216
|
+
|
|
217
|
+
if (disabled || loading || isUploading) return;
|
|
218
|
+
|
|
219
|
+
const { files } = e.dataTransfer;
|
|
220
|
+
|
|
221
|
+
if (files.length > 0) {
|
|
222
|
+
handleFileSelect(files[0]);
|
|
223
|
+
}
|
|
224
|
+
}, [ disabled, loading, isUploading, handleFileSelect ]);
|
|
225
|
+
|
|
226
|
+
const handleMouseEnter = useCallback(() => {
|
|
227
|
+
setIsHovered(true);
|
|
228
|
+
}, []);
|
|
229
|
+
|
|
230
|
+
const handleMouseLeave = useCallback(() => {
|
|
231
|
+
setIsHovered(false);
|
|
232
|
+
}, []);
|
|
233
|
+
|
|
234
|
+
const handleDelete = useCallback(() => {
|
|
235
|
+
setSelectedFile(null);
|
|
236
|
+
setPreviewUrl(null);
|
|
237
|
+
onFileSelect?.(null);
|
|
238
|
+
onChange?.(null);
|
|
239
|
+
|
|
240
|
+
if (inputRef.current) {
|
|
241
|
+
inputRef.current.value = '';
|
|
242
|
+
}
|
|
243
|
+
}, [ onFileSelect, onChange ]);
|
|
244
|
+
|
|
245
|
+
return (
|
|
246
|
+
<Box className='relative h-full'>
|
|
247
|
+
<Box
|
|
248
|
+
className={cn(
|
|
249
|
+
'w-full h-full rounded-xl border transition-all duration-200',
|
|
250
|
+
shouldShowImagePreview ? 'relative overflow-hidden' : 'px-6 py-4 flex flex-col items-center justify-center gap-4',
|
|
251
|
+
isDragOver && 'border-primary',
|
|
252
|
+
!shouldShowImagePreview && isDragOver && 'bg-brand-50',
|
|
253
|
+
error && 'border-error-500',
|
|
254
|
+
(disabled || isLoading) && 'opacity-50 cursor-not-allowed'
|
|
255
|
+
)}
|
|
256
|
+
onDragOver={handleDragOver}
|
|
257
|
+
onDragLeave={handleDragLeave}
|
|
258
|
+
onDrop={handleDrop}
|
|
259
|
+
onMouseEnter={shouldShowImagePreview ? handleMouseEnter : undefined}
|
|
260
|
+
onMouseLeave={shouldShowImagePreview ? handleMouseLeave : undefined}
|
|
261
|
+
>
|
|
262
|
+
<RenderCondition condition={shouldShowImagePreview}>
|
|
263
|
+
<img
|
|
264
|
+
src={previewUrl!}
|
|
265
|
+
alt="Image preview"
|
|
266
|
+
className={cn(
|
|
267
|
+
'w-full h-full object-cover transition-all duration-200',
|
|
268
|
+
isHovered && 'opacity-60 blur-sm'
|
|
269
|
+
)}
|
|
270
|
+
/>
|
|
271
|
+
</RenderCondition>
|
|
272
|
+
|
|
273
|
+
<RenderCondition condition={shouldShowImagePreview}>
|
|
274
|
+
<Flex
|
|
275
|
+
className={cn(
|
|
276
|
+
'absolute inset-0 items-center justify-center transition-opacity duration-200 gap-4',
|
|
277
|
+
isHovered ? 'opacity-100' : 'opacity-0'
|
|
278
|
+
)}
|
|
279
|
+
>
|
|
280
|
+
<Button
|
|
281
|
+
type='button'
|
|
282
|
+
variant='outline'
|
|
283
|
+
size='sm'
|
|
284
|
+
onClick={handleClick}
|
|
285
|
+
isLoading={isLoading}
|
|
286
|
+
disabled={disabled}
|
|
287
|
+
className="gap-2 bg-white/90 backdrop-blur-sm hover:bg-white"
|
|
288
|
+
ref={uploadButtonRef}
|
|
289
|
+
>
|
|
290
|
+
<RenderCondition condition={!isLoading}>
|
|
291
|
+
<UploadCloud02 className="size-5 text-gray-400" />
|
|
292
|
+
</RenderCondition>
|
|
293
|
+
{buttonText}
|
|
294
|
+
</Button>
|
|
295
|
+
|
|
296
|
+
<Button
|
|
297
|
+
type='button'
|
|
298
|
+
size='sm'
|
|
299
|
+
onClick={handleDelete}
|
|
300
|
+
disabled={disabled}
|
|
301
|
+
>
|
|
302
|
+
<Trash01 className="size-5" />
|
|
303
|
+
</Button>
|
|
304
|
+
</Flex>
|
|
305
|
+
</RenderCondition>
|
|
306
|
+
|
|
307
|
+
<RenderCondition condition={!shouldShowImagePreview}>
|
|
308
|
+
<Box className="text-center space-y-2">
|
|
309
|
+
<Button
|
|
310
|
+
type='button'
|
|
311
|
+
variant='outline'
|
|
312
|
+
size='sm'
|
|
313
|
+
onClick={handleClick}
|
|
314
|
+
isLoading={isLoading}
|
|
315
|
+
disabled={disabled}
|
|
316
|
+
className="gap-2"
|
|
317
|
+
ref={uploadButtonRef}
|
|
318
|
+
>
|
|
319
|
+
<RenderCondition condition={!isLoading}>
|
|
320
|
+
<UploadCloud02 className="size-5 text-gray-400" />
|
|
321
|
+
</RenderCondition>
|
|
322
|
+
{buttonText}
|
|
323
|
+
</Button>
|
|
324
|
+
</Box>
|
|
325
|
+
</RenderCondition>
|
|
326
|
+
|
|
327
|
+
<input
|
|
328
|
+
ref={(node) => {
|
|
329
|
+
if (typeof ref === 'function') {
|
|
330
|
+
ref(node);
|
|
331
|
+
} else if (ref) {
|
|
332
|
+
ref.current = node;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
inputRef.current = node;
|
|
336
|
+
}}
|
|
337
|
+
type="file"
|
|
338
|
+
className="hidden"
|
|
339
|
+
accept={accept}
|
|
340
|
+
disabled={disabled || isLoading}
|
|
341
|
+
onChange={handleInputChange}
|
|
342
|
+
onFocus={() => uploadButtonRef.current?.focus()}
|
|
343
|
+
{...props}
|
|
344
|
+
/>
|
|
345
|
+
</Box>
|
|
346
|
+
|
|
347
|
+
{error && (
|
|
348
|
+
<Typography className="text-red-500 text-sm mt-1.5">
|
|
349
|
+
{error}
|
|
350
|
+
</Typography>
|
|
351
|
+
)}
|
|
352
|
+
|
|
353
|
+
{helperText && !error && (
|
|
354
|
+
<Typography className="text-gray-600 text-sm mt-1.5">
|
|
355
|
+
{helperText}
|
|
356
|
+
</Typography>
|
|
357
|
+
)}
|
|
358
|
+
</Box>
|
|
359
|
+
);
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
UploadImageField.displayName = 'UploadImageField';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './video-player';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { VideoPlayer } from './video-player';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof VideoPlayer> = {
|
|
6
|
+
title: 'Components/Data Display/VideoPlayer',
|
|
7
|
+
component: VideoPlayer,
|
|
8
|
+
tags: [ 'autodocs' ],
|
|
9
|
+
argTypes: {
|
|
10
|
+
videoUrl: {
|
|
11
|
+
control: 'text',
|
|
12
|
+
description: 'The URL of the video to display',
|
|
13
|
+
},
|
|
14
|
+
className: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'The class name of the video player',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
parameters: {
|
|
20
|
+
docs: {
|
|
21
|
+
description: {
|
|
22
|
+
component: 'The VideoPlayer component displays a video.',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default meta;
|
|
29
|
+
|
|
30
|
+
type Story = StoryObj<typeof VideoPlayer>;
|
|
31
|
+
|
|
32
|
+
export const Default: Story = {
|
|
33
|
+
args: {
|
|
34
|
+
videoUrl: 'https://www.youtube.com/watch?v=yRYlMTFcKZA',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { composeStories } from '@storybook/react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { describe, expect, it } from 'vitest';
|
|
4
|
+
|
|
5
|
+
import * as stories from './video-player.stories';
|
|
6
|
+
|
|
7
|
+
const { Default } = composeStories(stories);
|
|
8
|
+
|
|
9
|
+
describe('<VideoPlayer />', () => {
|
|
10
|
+
it('should render the video player', () => {
|
|
11
|
+
render(<Default />);
|
|
12
|
+
|
|
13
|
+
expect(screen.getByTestId('video-player')).toBeInTheDocument();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('matches snapshot', () => {
|
|
17
|
+
const { container } = render(<Default />);
|
|
18
|
+
expect(container).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Box } from '@/components';
|
|
2
|
+
import { cn, getYouTubeEmbedUrl } from '@/utils';
|
|
3
|
+
|
|
4
|
+
export function VideoPlayer({ videoUrl, className }: { videoUrl: string, className?: string }) {
|
|
5
|
+
if (videoUrl.includes('youtube.com') || videoUrl.includes('youtu.be')) {
|
|
6
|
+
return (
|
|
7
|
+
<Box className={cn('relative w-full max-w-[1200px] aspect-video', className)} data-testid="video-player">
|
|
8
|
+
<iframe
|
|
9
|
+
src={getYouTubeEmbedUrl(videoUrl)}
|
|
10
|
+
className="w-full h-full rounded-lg"
|
|
11
|
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
12
|
+
allowFullScreen
|
|
13
|
+
/>
|
|
14
|
+
</Box>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<Box className={cn('relative w-full aspect-video', className)} data-testid="video-player">
|
|
20
|
+
<video controls className="w-full h-full rounded-lg">
|
|
21
|
+
<source src={videoUrl} type="video/mp4" />
|
|
22
|
+
Your browser does not support the video tag.
|
|
23
|
+
</video>
|
|
24
|
+
</Box>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from './AudioPlayer';
|
|
2
|
+
export * from './Badge';
|
|
3
|
+
export * from './Box';
|
|
4
|
+
export * from './Button';
|
|
5
|
+
export * from './ButtonUpload';
|
|
6
|
+
export * from './Calendar';
|
|
7
|
+
export * from './Checkbox';
|
|
8
|
+
export * from './CheckIcon';
|
|
9
|
+
export * from './Flex';
|
|
10
|
+
export * from './Grid';
|
|
11
|
+
export * from './Icon';
|
|
12
|
+
export * from './Input';
|
|
13
|
+
export * from './InputMoney';
|
|
14
|
+
export * from './InputPhone';
|
|
15
|
+
export * from './InputSearch';
|
|
16
|
+
export * from './InputUpload';
|
|
17
|
+
export * from './InputWithButton';
|
|
18
|
+
export * from './Label';
|
|
19
|
+
export * from './Progress';
|
|
20
|
+
export * from './RenderCondition';
|
|
21
|
+
export * from './RichTextEditor';
|
|
22
|
+
export * from './Separator';
|
|
23
|
+
export * from './Skeleton';
|
|
24
|
+
export * from './Slider';
|
|
25
|
+
export * from './Sonner';
|
|
26
|
+
export * from './Switch';
|
|
27
|
+
export * from './Textarea';
|
|
28
|
+
export * from './Toggle';
|
|
29
|
+
export * from './Typography';
|
|
30
|
+
export * from './UploadImageField';
|
|
31
|
+
export * from './VideoPlayer';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function AlertCircle({ ...props }: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
width="100%"
|
|
7
|
+
height="100%"
|
|
8
|
+
viewBox="0 0 24 24"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
d="M12 8V12M12 16H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
strokeWidth="2"
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
strokeLinejoin="round"
|
|
19
|
+
/>
|
|
20
|
+
</svg>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function AlignCenter(props: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
width="100%"
|
|
7
|
+
height="100%"
|
|
8
|
+
viewBox="0 0 24 24"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
d="M18 10H6M21 6H3M21 14H3M18 18H6"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
strokeWidth="2"
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
strokeLinejoin="round"
|
|
19
|
+
/>
|
|
20
|
+
</svg>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function AlignLeft(props: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
width="100%"
|
|
7
|
+
height="100%"
|
|
8
|
+
viewBox="0 0 24 24"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
d="M16 10H3M20 6H3M20 14H3M16 18H3"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
strokeWidth="2"
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
strokeLinejoin="round"
|
|
19
|
+
/>
|
|
20
|
+
</svg>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function AnnotationDots(props: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
width="100%"
|
|
7
|
+
height="100%"
|
|
8
|
+
viewBox="0 0 24 24"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<path d="M7.5 10.5H7.51M12 10.5H12.01M16.5 10.5H16.51M9.9 19.2L11.36 21.1467C11.5771 21.4362 11.6857 21.5809 11.8188 21.6327C11.9353 21.678 12.0647 21.678 12.1812 21.6327C12.3143 21.5809 12.4229 21.4362 12.64 21.1467L14.1 19.2C14.3931 18.8091 14.5397 18.6137 14.7185 18.4645C14.9569 18.2656 15.2383 18.1248 15.5405 18.0535C15.7671 18 16.0114 18 16.5 18C17.8978 18 18.5967 18 19.1481 17.7716C19.8831 17.4672 20.4672 16.8831 20.7716 16.1481C21 15.5967 21 14.8978 21 13.5V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V13.5C3 14.8978 3 15.5967 3.22836 16.1481C3.53284 16.8831 4.11687 17.4672 4.85195 17.7716C5.40326 18 6.10218 18 7.5 18C7.98858 18 8.23287 18 8.45951 18.0535C8.76169 18.1248 9.04312 18.2656 9.2815 18.4645C9.46028 18.6137 9.60685 18.8091 9.9 19.2ZM8 10.5C8 10.7761 7.77614 11 7.5 11C7.22386 11 7 10.7761 7 10.5C7 10.2239 7.22386 10 7.5 10C7.77614 10 8 10.2239 8 10.5ZM12.5 10.5C12.5 10.7761 12.2761 11 12 11C11.7239 11 11.5 10.7761 11.5 10.5C11.5 10.2239 11.7239 10 12 10C12.2761 10 12.5 10.2239 12.5 10.5ZM17 10.5C17 10.7761 16.7761 11 16.5 11C16.2239 11 16 10.7761 16 10.5C16 10.2239 16.2239 10 16.5 10C16.7761 10 17 10.2239 17 10.5Z" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
14
|
+
</svg>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function AnnotationQuestion(props: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
6
|
+
<path
|
|
7
|
+
d="M10 8.50224C10.1762 8.00136 10.524 7.579 10.9817 7.30998C11.4395 7.04095 11.9777 6.9426 12.501 7.03237C13.0243 7.12213 13.499 7.39421 13.8409 7.80041C14.1829 8.20661 14.37 8.72072 14.3692 9.25168C14.3692 10.7506 12.1209 11.5 12.1209 11.5M12.1499 14.5H12.1599M9.9 19.2L11.36 21.1467C11.5771 21.4362 11.6857 21.5809 11.8188 21.6327C11.9353 21.678 12.0647 21.678 12.1812 21.6327C12.3143 21.5809 12.4229 21.4362 12.64 21.1467L14.1 19.2C14.3931 18.8091 14.5397 18.6137 14.7185 18.4645C14.9569 18.2656 15.2383 18.1248 15.5405 18.0535C15.7671 18 16.0114 18 16.5 18C17.8978 18 18.5967 18 19.1481 17.7716C19.8831 17.4672 20.4672 16.8831 20.7716 16.1481C21 15.5967 21 14.8978 21 13.5V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V13.5C3 14.8978 3 15.5967 3.22836 16.1481C3.53284 16.8831 4.11687 17.4672 4.85195 17.7716C5.40326 18 6.10218 18 7.5 18C7.98858 18 8.23287 18 8.45951 18.0535C8.76169 18.1248 9.04312 18.2656 9.2815 18.4645C9.46028 18.6137 9.60685 18.8091 9.9 19.2Z"
|
|
8
|
+
stroke="currentColor"
|
|
9
|
+
strokeWidth="2"
|
|
10
|
+
strokeLinecap="round"
|
|
11
|
+
strokeLinejoin="round"
|
|
12
|
+
/>
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function Annotation(props: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
width="100%"
|
|
7
|
+
height="100%"
|
|
8
|
+
viewBox="0 0 24 24"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
d="M3 7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H16.2C17.8802 3 18.7202 3 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C21 5.27976 21 6.11984 21 7.8V13.5C21 14.8978 21 15.5967 20.7716 16.1481C20.4672 16.8831 19.8831 17.4672 19.1481 17.7716C18.5967 18 17.8978 18 16.5 18C16.0114 18 15.7671 18 15.5405 18.0535C15.2383 18.1248 14.9569 18.2656 14.7185 18.4645C14.5397 18.6137 14.3931 18.8091 14.1 19.2L12.64 21.1467C12.4229 21.4362 12.3143 21.5809 12.1812 21.6327C12.0647 21.678 11.9353 21.678 11.8188 21.6327C11.6857 21.5809 11.5771 21.4362 11.36 21.1467L9.9 19.2C9.60685 18.8091 9.46028 18.6137 9.2815 18.4645C9.04312 18.2656 8.76169 18.1248 8.45951 18.0535C8.23287 18 7.98858 18 7.5 18C6.10218 18 5.40326 18 4.85195 17.7716C4.11687 17.4672 3.53284 16.8831 3.22836 16.1481C3 15.5967 3 14.8978 3 13.5V7.8Z"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
strokeWidth="2"
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
strokeLinejoin="round"
|
|
19
|
+
/>
|
|
20
|
+
</svg>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function Announcement01(props: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
6
|
+
<path
|
|
7
|
+
d="M22 7.99992V11.9999M10.25 5.49991H6.8C5.11984 5.49991 4.27976 5.49991 3.63803 5.82689C3.07354 6.11451 2.6146 6.57345 2.32698 7.13794C2 7.77968 2 8.61976 2 10.2999L2 11.4999C2 12.4318 2 12.8977 2.15224 13.2653C2.35523 13.7553 2.74458 14.1447 3.23463 14.3477C3.60218 14.4999 4.06812 14.4999 5 14.4999V18.7499C5 18.9821 5 19.0982 5.00963 19.1959C5.10316 20.1455 5.85441 20.8968 6.80397 20.9903C6.90175 20.9999 7.01783 20.9999 7.25 20.9999C7.48217 20.9999 7.59826 20.9999 7.69604 20.9903C8.64559 20.8968 9.39685 20.1455 9.49037 19.1959C9.5 19.0982 9.5 18.9821 9.5 18.7499V14.4999H10.25C12.0164 14.4999 14.1772 15.4468 15.8443 16.3556C16.8168 16.8857 17.3031 17.1508 17.6216 17.1118C17.9169 17.0756 18.1402 16.943 18.3133 16.701C18.5 16.4401 18.5 15.9179 18.5 14.8736V5.1262C18.5 4.08191 18.5 3.55976 18.3133 3.2988C18.1402 3.05681 17.9169 2.92421 17.6216 2.88804C17.3031 2.84903 16.8168 3.11411 15.8443 3.64427C14.1772 4.55302 12.0164 5.49991 10.25 5.49991Z"
|
|
8
|
+
stroke="currentColor"
|
|
9
|
+
strokeWidth="2"
|
|
10
|
+
strokeLinecap="round"
|
|
11
|
+
strokeLinejoin="round"
|
|
12
|
+
/>
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function Announcement02(props: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg {...props} width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
<path
|
|
7
|
+
d="M4 13.9999L5.57465 20.2985C5.61893 20.4756 5.64107 20.5642 5.66727 20.6415C5.92317 21.397 6.60352 21.9282 7.39852 21.9933C7.4799 21.9999 7.5712 21.9999 7.75379 21.9999C7.98244 21.9999 8.09677 21.9999 8.19308 21.9906C9.145 21.8982 9.89834 21.1449 9.99066 20.193C10 20.0967 10 19.9823 10 19.7537V5.49991M18.5 13.4999C20.433 13.4999 22 11.9329 22 9.99991C22 8.06691 20.433 6.49991 18.5 6.49991M10.25 5.49991H6.5C4.01472 5.49991 2 7.51463 2 9.99991C2 12.4852 4.01472 14.4999 6.5 14.4999H10.25C12.0164 14.4999 14.1772 15.4468 15.8443 16.3556C16.8168 16.8857 17.3031 17.1508 17.6216 17.1118C17.9169 17.0756 18.1402 16.943 18.3133 16.701C18.5 16.4401 18.5 15.9179 18.5 14.8736V5.1262C18.5 4.08191 18.5 3.55976 18.3133 3.2988C18.1402 3.05681 17.9169 2.92421 17.6216 2.88804C17.3031 2.84903 16.8168 3.11411 15.8443 3.64427C14.1772 4.55302 12.0164 5.49991 10.25 5.49991Z"
|
|
8
|
+
stroke="currentColor"
|
|
9
|
+
strokeWidth="2"
|
|
10
|
+
strokeLinecap="round"
|
|
11
|
+
strokeLinejoin="round"
|
|
12
|
+
/>
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function AppleLogo(props: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg {...props} width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
<path d="M20.8426 17.1447C20.5099 17.9133 20.1161 18.6208 19.6598 19.2713C19.0378 20.158 18.5286 20.7719 18.1361 21.1127C17.5277 21.6722 16.8759 21.9587 16.1779 21.975C15.6768 21.975 15.0725 21.8324 14.3691 21.5432C13.6633 21.2553 13.0148 21.1127 12.4217 21.1127C11.7998 21.1127 11.1327 21.2553 10.4193 21.5432C9.70469 21.8324 9.12904 21.9832 8.68892 21.9981C8.01957 22.0266 7.35239 21.7319 6.68644 21.1127C6.26139 20.742 5.72974 20.1064 5.09285 19.2061C4.40951 18.2446 3.84772 17.1297 3.4076 15.8587C2.93624 14.4857 2.69995 13.1563 2.69995 11.8692C2.69995 10.3948 3.01853 9.12321 3.65665 8.0576C4.15815 7.20166 4.82533 6.52647 5.66035 6.03081C6.49537 5.53514 7.39761 5.28256 8.36925 5.2664C8.9009 5.2664 9.59809 5.43085 10.4645 5.75405C11.3284 6.07834 11.8832 6.24279 12.1264 6.24279C12.3082 6.24279 12.9245 6.0505 13.9692 5.66714C14.9571 5.31162 15.7909 5.16441 16.474 5.2224C18.3249 5.37178 19.7155 6.10142 20.6402 7.41595C18.9849 8.41896 18.166 9.82379 18.1823 11.626C18.1972 13.0297 18.7065 14.1979 19.7073 15.1254C20.1609 15.5558 20.6674 15.8885 21.231 16.1248C21.1087 16.4793 20.9797 16.8188 20.8426 17.1447ZM16.5975 0.440125C16.5975 1.54038 16.1956 2.56768 15.3944 3.51854C14.4275 4.64892 13.258 5.30211 11.9898 5.19904C11.9736 5.06705 11.9642 4.92812 11.9642 4.78214C11.9642 3.7259 12.424 2.59552 13.2406 1.67127C13.6483 1.20331 14.1667 0.814209 14.7955 0.503814C15.4229 0.19805 16.0163 0.0289566 16.5744 0C16.5907 0.147086 16.5975 0.294182 16.5975 0.440111V0.440125Z" fill="currentColor"/>
|
|
7
|
+
</svg>
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export function ArrowCircleBrokenRight(props: ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
width="100%"
|
|
7
|
+
height="100%"
|
|
8
|
+
viewBox="0 0 24 24"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<path d="M3.33789 7C5.06694 4.01099 8.29866 2 12.0001 2C17.5229 2 22.0001 6.47715 22.0001 12C22.0001 17.5228 17.5229 22 12.0001 22C8.29866 22 5.06694 19.989 3.33789 17M12 16L16 12M16 12L12 8M16 12H2" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
14
|
+
</svg>
|
|
15
|
+
);
|
|
16
|
+
}
|