@soul-refiner/design-system 0.1.27 → 0.1.29
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/common/colors.js +135 -0
- package/dist/common/date.js +28 -0
- package/dist/common/index.js +3 -0
- package/dist/common/styles.js +63 -0
- package/dist/components/actions/button/button.js +233 -0
- package/dist/components/actions/button/button.stories.js +58 -0
- package/dist/components/actions/button/index.js +1 -0
- package/dist/components/actions/dropdown/dropdown.js +202 -0
- package/dist/components/actions/dropdown/dropdown.stories.js +99 -0
- package/dist/components/actions/dropdown/index.js +1 -0
- package/dist/components/actions/index.js +5 -0
- package/dist/components/actions/rate/index.js +1 -0
- package/dist/components/actions/rate/rate.js +45 -0
- package/dist/components/actions/rate/rate.stories.js +29 -0
- package/dist/components/actions/switch/index.js +1 -0
- package/dist/components/actions/switch/switch.js +71 -0
- package/dist/components/actions/switch/switch.stories.js +25 -0
- package/dist/components/actions/toggle/index.js +1 -0
- package/dist/components/actions/toggle/toggle.js +56 -0
- package/dist/components/actions/toggle/toggle.stories.js +20 -0
- package/dist/components/actions/upload/index.js +1 -0
- package/dist/components/actions/upload/upload.js +155 -0
- package/dist/components/actions/upload/upload.stories.js +58 -0
- package/dist/components/atoms/box/box.js +15 -0
- package/dist/components/atoms/box/box.stories.js +85 -0
- package/dist/components/atoms/box/index.js +1 -0
- package/dist/components/atoms/colors/colors.js +34 -0
- package/dist/components/atoms/colors/colors.stories.js +75 -0
- package/dist/components/atoms/colors/index.js +1 -0
- package/dist/components/atoms/index.js +2 -0
- package/dist/components/atoms/typography/display.js +9 -0
- package/dist/components/atoms/typography/heading.js +33 -0
- package/dist/components/atoms/typography/index.js +4 -0
- package/dist/components/atoms/typography/paragraph.js +16 -0
- package/dist/components/atoms/typography/typography.js +11 -0
- package/dist/components/atoms/typography/typography.stories.js +96 -0
- package/dist/components/card/action/action.js +51 -0
- package/dist/components/card/action/index.js +1 -0
- package/dist/components/card/audio/audio.js +100 -0
- package/dist/components/card/audio/index.js +1 -0
- package/dist/components/card/card.js +22 -0
- package/dist/components/card/card.stories.js +284 -0
- package/dist/components/card/feature/feature.js +168 -0
- package/dist/components/card/feature/index.js +1 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/card/person/index.js +1 -0
- package/dist/components/card/person/person.js +57 -0
- package/dist/components/card/price/index.js +1 -0
- package/dist/components/card/price/price.js +45 -0
- package/dist/components/card/regular/index.js +1 -0
- package/dist/components/card/regular/regular.js +30 -0
- package/dist/components/card/video/index.js +1 -0
- package/dist/components/card/video/video.js +92 -0
- package/dist/components/card/written/index.js +1 -0
- package/dist/components/card/written/written.js +101 -0
- package/dist/components/editor/constants.js +133 -0
- package/dist/components/editor/editor.js +73 -0
- package/dist/components/editor/editor.stories.js +16 -0
- package/dist/components/editor/index.js +1 -0
- package/dist/components/editor/navbar/alignment_dropdown.js +93 -0
- package/dist/components/editor/navbar/button_modal.js +55 -0
- package/dist/components/editor/navbar/index.js +1 -0
- package/dist/components/editor/navbar/navbar.js +205 -0
- package/dist/components/editor/navbar/style_dropdown.js +65 -0
- package/dist/components/editor/plate.js +27 -0
- package/dist/components/editor/plugins/blockquote.js +8 -0
- package/dist/components/editor/plugins/buttons.js +81 -0
- package/dist/components/editor/plugins/exitBreak.js +31 -0
- package/dist/components/editor/plugins/image.js +47 -0
- package/dist/components/editor/plugins/index.js +111 -0
- package/dist/components/editor/plugins/link.js +74 -0
- package/dist/components/editor/plugins/list.js +17 -0
- package/dist/components/editor/plugins/resetBlockType.js +22 -0
- package/dist/components/editor/plugins/selectOnBackspace.js +6 -0
- package/dist/components/editor/plugins/softBreak.js +14 -0
- package/dist/components/editor/plugins/text.js +81 -0
- package/dist/components/feedback/badge/badge.js +65 -0
- package/dist/components/feedback/badge/badge.stories.js +25 -0
- package/dist/components/feedback/badge/index.js +1 -0
- package/dist/components/feedback/banner/banner.js +76 -0
- package/dist/components/feedback/banner/banner.stories.js +33 -0
- package/dist/components/feedback/banner/index.js +1 -0
- package/dist/components/feedback/chip/chip.js +93 -0
- package/dist/components/feedback/chip/chip.stories.js +39 -0
- package/dist/components/feedback/chip/index.js +1 -0
- package/dist/components/feedback/index.js +7 -0
- package/dist/components/feedback/loader/index.js +1 -0
- package/dist/components/feedback/loader/loader.js +33 -0
- package/dist/components/feedback/loader/loader.stories.js +29 -0
- package/dist/components/feedback/notification/index.js +1 -0
- package/dist/components/feedback/notification/notification.js +71 -0
- package/dist/components/feedback/notification/notificition.stories.js +30 -0
- package/dist/components/feedback/progress/index.js +1 -0
- package/dist/components/feedback/progress/progress.js +86 -0
- package/dist/components/feedback/progress/progress.stories.js +32 -0
- package/dist/components/feedback/toast/index.js +1 -0
- package/dist/components/feedback/toast/toast.js +70 -0
- package/dist/components/feedback/toast/toast.stories.js +26 -0
- package/dist/components/feedback/tooltip/index.js +1 -0
- package/dist/components/feedback/tooltip/tooltip.js +25 -0
- package/dist/components/feedback/tooltip/tooltip.stories.js +43 -0
- package/dist/components/iconography/avatar/avatar.js +148 -0
- package/dist/components/iconography/avatar/avatar.stories.js +55 -0
- package/dist/components/iconography/avatar/icons/approved.js +5 -0
- package/dist/components/iconography/avatar/icons/busy.js +5 -0
- package/dist/components/iconography/avatar/icons/declined.js +5 -0
- package/dist/components/iconography/avatar/icons/default.js +3 -0
- package/dist/components/iconography/avatar/icons/focus.js +5 -0
- package/dist/components/iconography/avatar/icons/index.js +9 -0
- package/dist/components/iconography/avatar/icons/locked.js +5 -0
- package/dist/components/iconography/avatar/icons/offline.js +5 -0
- package/dist/components/iconography/avatar/icons/online.js +4 -0
- package/dist/components/iconography/avatar/icons/subscribed.js +9 -0
- package/dist/components/iconography/avatar/index.js +1 -0
- package/dist/components/iconography/icon/icon.js +9 -0
- package/dist/components/iconography/icon/icon.stories.js +113 -0
- package/dist/components/iconography/icon/index.js +1 -0
- package/dist/components/iconography/index.js +2 -0
- package/dist/components/index.js +9 -0
- package/dist/components/input/checkbox/checkbox.js +21 -0
- package/dist/components/input/checkbox/checkbox.stories.js +19 -0
- package/dist/components/input/checkbox/index.js +1 -0
- package/dist/components/input/date/date.js +516 -0
- package/dist/components/input/date/date.stories.js +30 -0
- package/dist/components/input/date/index.js +1 -0
- package/dist/components/input/filter/filter.js +194 -0
- package/dist/components/input/filter/filter.stories.js +30 -0
- package/dist/components/input/filter/index.js +1 -0
- package/dist/components/input/index.js +5 -0
- package/dist/components/input/radio/index.js +1 -0
- package/dist/components/input/radio/radio.js +77 -0
- package/dist/components/input/radio/radio.stories.js +34 -0
- package/dist/components/input/search/index.js +1 -0
- package/dist/components/input/search/search.js +136 -0
- package/dist/components/input/search/search.stories.js +50 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.js +105 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.stories.js +37 -0
- package/dist/components/navigation/breadcrumb/index.js +1 -0
- package/dist/components/navigation/index.js +2 -0
- package/dist/components/navigation/tabs/index.js +1 -0
- package/dist/components/navigation/tabs/tabs.js +144 -0
- package/dist/components/navigation/tabs/tabs.stories.js +88 -0
- package/dist/components/surfaces/accordion/accordion.js +45 -0
- package/dist/components/surfaces/accordion/accordion.stories.js +16 -0
- package/dist/components/surfaces/accordion/index.js +1 -0
- package/dist/components/surfaces/comment/comment.js +126 -0
- package/dist/components/surfaces/comment/comment.stories.js +82 -0
- package/dist/components/surfaces/comment/helpers.js +38 -0
- package/dist/components/surfaces/comment/index.js +1 -0
- package/dist/components/surfaces/drawer/drawer.js +124 -0
- package/dist/components/surfaces/drawer/drawer.stories.js +77 -0
- package/dist/components/surfaces/drawer/index.js +1 -0
- package/dist/components/surfaces/index.js +5 -0
- package/dist/components/surfaces/message/index.js +1 -0
- package/dist/components/surfaces/message/message.js +43 -0
- package/dist/components/surfaces/message/message.stories.js +71 -0
- package/dist/components/surfaces/modal/index.js +1 -0
- package/dist/components/surfaces/modal/modal.js +100 -0
- package/dist/components/surfaces/modal/modal.stories.js +18 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/table/index.js +1 -0
- package/dist/components/table/table/table.js +183 -0
- package/dist/components/table/table/table.stories.js +45 -0
- package/dist/emoji/emojis.json +17577 -0
- package/dist/icons/arrow/arrow_all.js +6 -0
- package/dist/icons/arrow/arrow_all_diagonal.js +6 -0
- package/dist/icons/arrow/arrow_both_downwards.js +6 -0
- package/dist/icons/arrow/arrow_both_upwards.js +6 -0
- package/dist/icons/arrow/arrow_circle_left.js +6 -0
- package/dist/icons/arrow/arrow_circle_left_double.js +6 -0
- package/dist/icons/arrow/arrow_circle_left_double_alert.js +8 -0
- package/dist/icons/arrow/arrow_circle_right.js +6 -0
- package/dist/icons/arrow/arrow_circle_right_double.js +6 -0
- package/dist/icons/arrow/arrow_circle_right_double_alert.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_down_left.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_down_left_circle.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_down_right.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_down_right_circle.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_up_left.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_up_left_circle.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_up_right.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_up_right_circle.js +6 -0
- package/dist/icons/arrow/arrow_down.js +6 -0
- package/dist/icons/arrow/arrow_down_bold.js +6 -0
- package/dist/icons/arrow/arrow_down_circle.js +6 -0
- package/dist/icons/arrow/arrow_left.js +6 -0
- package/dist/icons/arrow/arrow_left_bold.js +6 -0
- package/dist/icons/arrow/arrow_left_circle.js +6 -0
- package/dist/icons/arrow/arrow_left_curved.js +6 -0
- package/dist/icons/arrow/arrow_left_curved_circle.js +6 -0
- package/dist/icons/arrow/arrow_right.js +6 -0
- package/dist/icons/arrow/arrow_right_bold.js +6 -0
- package/dist/icons/arrow/arrow_right_circle.js +6 -0
- package/dist/icons/arrow/arrow_right_curved.js +6 -0
- package/dist/icons/arrow/arrow_right_curved_circle.js +6 -0
- package/dist/icons/arrow/arrow_up.js +6 -0
- package/dist/icons/arrow/arrow_up_bold.js +6 -0
- package/dist/icons/arrow/arrow_up_circle.js +6 -0
- package/dist/icons/arrow/chevron_down.js +6 -0
- package/dist/icons/arrow/chevron_down_circle.js +6 -0
- package/dist/icons/arrow/chevron_down_double.js +6 -0
- package/dist/icons/arrow/chevron_down_double_circle.js +6 -0
- package/dist/icons/arrow/chevron_left.js +6 -0
- package/dist/icons/arrow/chevron_left_circle.js +6 -0
- package/dist/icons/arrow/chevron_left_double.js +6 -0
- package/dist/icons/arrow/chevron_left_double_circle.js +6 -0
- package/dist/icons/arrow/chevron_right.js +6 -0
- package/dist/icons/arrow/chevron_right_circle.js +6 -0
- package/dist/icons/arrow/chevron_right_double.js +6 -0
- package/dist/icons/arrow/chevron_right_double_circle.js +6 -0
- package/dist/icons/arrow/chevron_scroll.js +6 -0
- package/dist/icons/arrow/chevron_up.js +6 -0
- package/dist/icons/arrow/chevron_up_circle.js +6 -0
- package/dist/icons/arrow/chevron_up_double.js +6 -0
- package/dist/icons/arrow/chevron_up_double_circle.js +6 -0
- package/dist/icons/arrow/forward_all.js +6 -0
- package/dist/icons/arrow/forward_all_bold.js +6 -0
- package/dist/icons/arrow/forward_bold.js +6 -0
- package/dist/icons/arrow/index.js +62 -0
- package/dist/icons/arrow/redo.js +6 -0
- package/dist/icons/arrow/redo_bold.js +6 -0
- package/dist/icons/arrow/reply.js +6 -0
- package/dist/icons/arrow/reply_all.js +6 -0
- package/dist/icons/arrow/reply_all_bold.js +6 -0
- package/dist/icons/arrow/reply_bold.js +6 -0
- package/dist/icons/arrow/undo.js +6 -0
- package/dist/icons/arrow/undo_bold.js +6 -0
- package/dist/icons/audio_video/drag_indicator.js +6 -0
- package/dist/icons/audio_video/eject.js +6 -0
- package/dist/icons/audio_video/equalizer.js +6 -0
- package/dist/icons/audio_video/fast_forward.js +6 -0
- package/dist/icons/audio_video/fast_forward_30.js +6 -0
- package/dist/icons/audio_video/fullscreen.js +6 -0
- package/dist/icons/audio_video/headphones.js +6 -0
- package/dist/icons/audio_video/index.js +38 -0
- package/dist/icons/audio_video/library_add.js +6 -0
- package/dist/icons/audio_video/library_delay.js +6 -0
- package/dist/icons/audio_video/library_music.js +6 -0
- package/dist/icons/audio_video/library_queue.js +6 -0
- package/dist/icons/audio_video/microphone.js +6 -0
- package/dist/icons/audio_video/musical_note.js +6 -0
- package/dist/icons/audio_video/next.js +6 -0
- package/dist/icons/audio_video/pause.js +6 -0
- package/dist/icons/audio_video/pause_circle.js +6 -0
- package/dist/icons/audio_video/play.js +6 -0
- package/dist/icons/audio_video/play_circle.js +6 -0
- package/dist/icons/audio_video/play_display.js +6 -0
- package/dist/icons/audio_video/play_pause.js +6 -0
- package/dist/icons/audio_video/play_solid.js +6 -0
- package/dist/icons/audio_video/player_list.js +6 -0
- package/dist/icons/audio_video/player_list_add.js +6 -0
- package/dist/icons/audio_video/player_list_play.js +6 -0
- package/dist/icons/audio_video/previous.js +6 -0
- package/dist/icons/audio_video/radio.js +6 -0
- package/dist/icons/audio_video/record.js +6 -0
- package/dist/icons/audio_video/repeat.js +6 -0
- package/dist/icons/audio_video/rewind.js +6 -0
- package/dist/icons/audio_video/rewind_30.js +6 -0
- package/dist/icons/audio_video/shuffle.js +6 -0
- package/dist/icons/audio_video/sound_wave.js +6 -0
- package/dist/icons/audio_video/stop.js +6 -0
- package/dist/icons/audio_video/stop_circle.js +6 -0
- package/dist/icons/audio_video/subscriptions.js +6 -0
- package/dist/icons/audio_video/tuner.js +6 -0
- package/dist/icons/audio_video/volume.js +6 -0
- package/dist/icons/audio_video/volume_high.js +6 -0
- package/dist/icons/audio_video/volume_low.js +6 -0
- package/dist/icons/audio_video/volume_slash.js +6 -0
- package/dist/icons/basic/aa_sansserif.js +7 -0
- package/dist/icons/basic/aa_serif.js +7 -0
- package/dist/icons/basic/anchor.js +8 -0
- package/dist/icons/basic/bible.js +6 -0
- package/dist/icons/basic/bold.js +6 -0
- package/dist/icons/basic/book.js +6 -0
- package/dist/icons/basic/book_open.js +6 -0
- package/dist/icons/basic/bookmark.js +6 -0
- package/dist/icons/basic/bookmark_add.js +6 -0
- package/dist/icons/basic/bookmark_slash.js +6 -0
- package/dist/icons/basic/bookmarks.js +6 -0
- package/dist/icons/basic/books.js +9 -0
- package/dist/icons/basic/box.js +6 -0
- package/dist/icons/basic/briefcase.js +6 -0
- package/dist/icons/basic/browse_activity.js +6 -0
- package/dist/icons/basic/browser.js +6 -0
- package/dist/icons/basic/browser_slash.js +6 -0
- package/dist/icons/basic/calculator.js +6 -0
- package/dist/icons/basic/camera.js +6 -0
- package/dist/icons/basic/camera_add.js +6 -0
- package/dist/icons/basic/camera_slash.js +6 -0
- package/dist/icons/basic/checkmark.js +6 -0
- package/dist/icons/basic/checkmark_circle.js +8 -0
- package/dist/icons/basic/checkmark_filled.js +6 -0
- package/dist/icons/basic/checkmarks.js +6 -0
- package/dist/icons/basic/circle.js +6 -0
- package/dist/icons/basic/circle_slash.js +8 -0
- package/dist/icons/basic/clear_text_style.js +6 -0
- package/dist/icons/basic/close.js +6 -0
- package/dist/icons/basic/close_circle.js +6 -0
- package/dist/icons/basic/close_filled.js +6 -0
- package/dist/icons/basic/copy.js +6 -0
- package/dist/icons/basic/delete.js +6 -0
- package/dist/icons/basic/detail.js +6 -0
- package/dist/icons/basic/dot.js +6 -0
- package/dist/icons/basic/download.js +6 -0
- package/dist/icons/basic/download_arrow.js +6 -0
- package/dist/icons/basic/droplet.js +8 -0
- package/dist/icons/basic/ellipsis_horizontal.js +6 -0
- package/dist/icons/basic/ellipsis_horizontal_circle.js +6 -0
- package/dist/icons/basic/ellipsis_vertical.js +6 -0
- package/dist/icons/basic/ellipsis_vertical_circle.js +6 -0
- package/dist/icons/basic/eye.js +6 -0
- package/dist/icons/basic/eye_slash.js +6 -0
- package/dist/icons/basic/fingerprint.js +6 -0
- package/dist/icons/basic/flag.js +6 -0
- package/dist/icons/basic/flag_wave.js +6 -0
- package/dist/icons/basic/flag_wave_filled.js +6 -0
- package/dist/icons/basic/flame.js +6 -0
- package/dist/icons/basic/gauge.js +6 -0
- package/dist/icons/basic/glasses.js +6 -0
- package/dist/icons/basic/graduation_cap.js +6 -0
- package/dist/icons/basic/hashmark.js +6 -0
- package/dist/icons/basic/heart.js +6 -0
- package/dist/icons/basic/heart_slash.js +6 -0
- package/dist/icons/basic/highlighter.js +6 -0
- package/dist/icons/basic/home.js +6 -0
- package/dist/icons/basic/image.js +6 -0
- package/dist/icons/basic/inbox.js +6 -0
- package/dist/icons/basic/index.js +128 -0
- package/dist/icons/basic/italic.js +6 -0
- package/dist/icons/basic/layers.js +6 -0
- package/dist/icons/basic/lightening.js +6 -0
- package/dist/icons/basic/lightening_slash.js +6 -0
- package/dist/icons/basic/link.js +6 -0
- package/dist/icons/basic/link_slash.js +6 -0
- package/dist/icons/basic/loudspeaker.js +6 -0
- package/dist/icons/basic/maximize.js +6 -0
- package/dist/icons/basic/menu.js +6 -0
- package/dist/icons/basic/menu_circle.js +6 -0
- package/dist/icons/basic/menu_dots.js +6 -0
- package/dist/icons/basic/microphone_slash.js +6 -0
- package/dist/icons/basic/minimize.js +6 -0
- package/dist/icons/basic/minus.js +6 -0
- package/dist/icons/basic/minus_circle.js +6 -0
- package/dist/icons/basic/move_item.js +6 -0
- package/dist/icons/basic/new.js +6 -0
- package/dist/icons/basic/newspaper.js +6 -0
- package/dist/icons/basic/note_pad.js +7 -0
- package/dist/icons/basic/options.js +6 -0
- package/dist/icons/basic/paint_brush.js +6 -0
- package/dist/icons/basic/paperclip.js +6 -0
- package/dist/icons/basic/paperclip_slash.js +6 -0
- package/dist/icons/basic/pencil.js +6 -0
- package/dist/icons/basic/pencil_pad.js +6 -0
- package/dist/icons/basic/plus.js +6 -0
- package/dist/icons/basic/plus_circle.js +6 -0
- package/dist/icons/basic/presentation.js +6 -0
- package/dist/icons/basic/printer.js +6 -0
- package/dist/icons/basic/profile.js +6 -0
- package/dist/icons/basic/pulse.js +6 -0
- package/dist/icons/basic/qr_code.js +6 -0
- package/dist/icons/basic/resize.js +8 -0
- package/dist/icons/basic/scan.js +6 -0
- package/dist/icons/basic/scissors.js +6 -0
- package/dist/icons/basic/screenshot.js +6 -0
- package/dist/icons/basic/search.js +6 -0
- package/dist/icons/basic/select_item.js +7 -0
- package/dist/icons/basic/settings.js +6 -0
- package/dist/icons/basic/share.js +6 -0
- package/dist/icons/basic/share_external.js +6 -0
- package/dist/icons/basic/square.js +6 -0
- package/dist/icons/basic/star.js +6 -0
- package/dist/icons/basic/star_circle.js +6 -0
- package/dist/icons/basic/star_filled.js +6 -0
- package/dist/icons/basic/star_filled_half.js +6 -0
- package/dist/icons/basic/star_slash.js +6 -0
- package/dist/icons/basic/sticker.js +6 -0
- package/dist/icons/basic/strikethrough.js +6 -0
- package/dist/icons/basic/subtask.js +7 -0
- package/dist/icons/basic/tax.js +9 -0
- package/dist/icons/basic/text_bg_color.js +6 -0
- package/dist/icons/basic/text_color.js +6 -0
- package/dist/icons/basic/textbox.js +6 -0
- package/dist/icons/basic/thumbs_down.js +6 -0
- package/dist/icons/basic/thumbs_up.js +6 -0
- package/dist/icons/basic/thumbs_up_filled.js +6 -0
- package/dist/icons/basic/toggle_left.js +6 -0
- package/dist/icons/basic/toggle_right.js +6 -0
- package/dist/icons/basic/translate.js +6 -0
- package/dist/icons/basic/trash.js +6 -0
- package/dist/icons/basic/trash_slash.js +6 -0
- package/dist/icons/basic/underline.js +6 -0
- package/dist/icons/basic/upload.js +6 -0
- package/dist/icons/basic/video.js +6 -0
- package/dist/icons/basic/video_add.js +7 -0
- package/dist/icons/basic/video_slash.js +6 -0
- package/dist/icons/basic/zoom_in.js +6 -0
- package/dist/icons/basic/zoom_out.js +6 -0
- package/dist/icons/data/bar_chart.js +6 -0
- package/dist/icons/data/bar_chart_downward.js +6 -0
- package/dist/icons/data/bar_chart_downward_outline.js +6 -0
- package/dist/icons/data/bar_chart_upward.js +6 -0
- package/dist/icons/data/bar_chart_upward_outline.js +6 -0
- package/dist/icons/data/candlestick_chart.js +6 -0
- package/dist/icons/data/four_circles.js +6 -0
- package/dist/icons/data/index.js +20 -0
- package/dist/icons/data/legend_toggle.js +6 -0
- package/dist/icons/data/line_chart.js +6 -0
- package/dist/icons/data/line_chart_area.js +6 -0
- package/dist/icons/data/line_chart_area_shaded.js +6 -0
- package/dist/icons/data/line_chart_double.js +6 -0
- package/dist/icons/data/line_chart_downward.js +6 -0
- package/dist/icons/data/line_chart_node.js +6 -0
- package/dist/icons/data/line_chart_outline.js +6 -0
- package/dist/icons/data/line_chart_search.js +6 -0
- package/dist/icons/data/line_chart_stars.js +6 -0
- package/dist/icons/data/line_chart_upward.js +6 -0
- package/dist/icons/data/pie_chart.js +7 -0
- package/dist/icons/data/tree.js +6 -0
- package/dist/icons/email/index.js +8 -0
- package/dist/icons/email/mail.js +6 -0
- package/dist/icons/email/mail_check.js +6 -0
- package/dist/icons/email/mail_minus.js +6 -0
- package/dist/icons/email/mail_send.js +6 -0
- package/dist/icons/email/send.js +6 -0
- package/dist/icons/email/send_close.js +6 -0
- package/dist/icons/email/send_schedule.js +6 -0
- package/dist/icons/email/send_text.js +6 -0
- package/dist/icons/file/clipboard.js +6 -0
- package/dist/icons/file/clipboard_check.js +6 -0
- package/dist/icons/file/clipboard_close.js +6 -0
- package/dist/icons/file/clipboard_minus.js +6 -0
- package/dist/icons/file/clipboard_plus.js +6 -0
- package/dist/icons/file/clipboard_text.js +6 -0
- package/dist/icons/file/file.js +6 -0
- package/dist/icons/file/file_add.js +6 -0
- package/dist/icons/file/file_check.js +6 -0
- package/dist/icons/file/file_close.js +6 -0
- package/dist/icons/file/file_code.js +6 -0
- package/dist/icons/file/file_download.js +6 -0
- package/dist/icons/file/file_draft.js +6 -0
- package/dist/icons/file/file_minus.js +6 -0
- package/dist/icons/file/file_plus.js +6 -0
- package/dist/icons/file/file_scan.js +6 -0
- package/dist/icons/file/file_shred.js +6 -0
- package/dist/icons/file/file_text.js +6 -0
- package/dist/icons/file/file_upload.js +6 -0
- package/dist/icons/file/folder.js +6 -0
- package/dist/icons/file/folder_add.js +6 -0
- package/dist/icons/file/folder_arrow.js +6 -0
- package/dist/icons/file/folder_check.js +6 -0
- package/dist/icons/file/folder_close.js +6 -0
- package/dist/icons/file/folder_cloud.js +6 -0
- package/dist/icons/file/folder_minus.js +6 -0
- package/dist/icons/file/folder_music.js +6 -0
- package/dist/icons/file/folder_open.js +6 -0
- package/dist/icons/file/folder_plus.js +6 -0
- package/dist/icons/file/folder_zip.js +6 -0
- package/dist/icons/file/index.js +34 -0
- package/dist/icons/file/note.js +6 -0
- package/dist/icons/file/note_text.js +6 -0
- package/dist/icons/file/pdf.js +6 -0
- package/dist/icons/file/photo.js +6 -0
- package/dist/icons/finance/bitcoin.js +6 -0
- package/dist/icons/finance/credit_card.js +6 -0
- package/dist/icons/finance/credit_card_add.js +6 -0
- package/dist/icons/finance/credit_card_face.js +6 -0
- package/dist/icons/finance/credit_card_outcome.js +6 -0
- package/dist/icons/finance/credit_card_scan.js +6 -0
- package/dist/icons/finance/credit_card_share.js +6 -0
- package/dist/icons/finance/credit_card_slash.js +6 -0
- package/dist/icons/finance/currency_exchange.js +6 -0
- package/dist/icons/finance/dollar.js +6 -0
- package/dist/icons/finance/ethereum.js +6 -0
- package/dist/icons/finance/index.js +14 -0
- package/dist/icons/finance/paypass.js +6 -0
- package/dist/icons/finance/strongbox.js +6 -0
- package/dist/icons/finance/wallet.js +6 -0
- package/dist/icons/index.js +21 -0
- package/dist/icons/layout/block_align_bottom.js +6 -0
- package/dist/icons/layout/block_align_center.js +6 -0
- package/dist/icons/layout/block_align_left.js +6 -0
- package/dist/icons/layout/block_align_middle.js +6 -0
- package/dist/icons/layout/block_align_right.js +6 -0
- package/dist/icons/layout/block_align_top.js +6 -0
- package/dist/icons/layout/block_horizontal.js +6 -0
- package/dist/icons/layout/block_vertical.js +6 -0
- package/dist/icons/layout/edit_shape.js +6 -0
- package/dist/icons/layout/elements.js +6 -0
- package/dist/icons/layout/elements_add.js +6 -0
- package/dist/icons/layout/elements_filled.js +6 -0
- package/dist/icons/layout/elements_masonry.js +6 -0
- package/dist/icons/layout/frame.js +6 -0
- package/dist/icons/layout/frame_stack.js +6 -0
- package/dist/icons/layout/grid.js +6 -0
- package/dist/icons/layout/grid_column_three.js +6 -0
- package/dist/icons/layout/grid_column_two.js +6 -0
- package/dist/icons/layout/grid_dynamic.js +6 -0
- package/dist/icons/layout/grid_frame.js +6 -0
- package/dist/icons/layout/grid_row_three.js +6 -0
- package/dist/icons/layout/grid_row_two.js +6 -0
- package/dist/icons/layout/grid_six.js +6 -0
- package/dist/icons/layout/grid_small.js +6 -0
- package/dist/icons/layout/iframe.js +6 -0
- package/dist/icons/layout/index.js +44 -0
- package/dist/icons/layout/kanban.js +6 -0
- package/dist/icons/layout/layout.js +6 -0
- package/dist/icons/layout/list.js +6 -0
- package/dist/icons/layout/list_filled.js +11 -0
- package/dist/icons/layout/padding.js +6 -0
- package/dist/icons/layout/page_break.js +6 -0
- package/dist/icons/layout/rotate_left.js +6 -0
- package/dist/icons/layout/rotate_right.js +6 -0
- package/dist/icons/layout/ruler.js +6 -0
- package/dist/icons/layout/segment.js +6 -0
- package/dist/icons/layout/select_area.js +6 -0
- package/dist/icons/layout/select_boundary.js +6 -0
- package/dist/icons/layout/sidebar_left.js +6 -0
- package/dist/icons/layout/sidebar_right.js +6 -0
- package/dist/icons/layout/slides.js +6 -0
- package/dist/icons/layout/slides_horizontal.js +6 -0
- package/dist/icons/layout/slides_vertical.js +11 -0
- package/dist/icons/layout/stack.js +6 -0
- package/dist/icons/layout/text.js +6 -0
- package/dist/icons/maps/atlas.js +6 -0
- package/dist/icons/maps/compass.js +6 -0
- package/dist/icons/maps/direction.js +6 -0
- package/dist/icons/maps/direction_angled.js +6 -0
- package/dist/icons/maps/globe.js +6 -0
- package/dist/icons/maps/globe_slash.js +6 -0
- package/dist/icons/maps/index.js +22 -0
- package/dist/icons/maps/location.js +6 -0
- package/dist/icons/maps/location_slash.js +6 -0
- package/dist/icons/maps/map.js +6 -0
- package/dist/icons/maps/marker.js +6 -0
- package/dist/icons/maps/panorama.js +6 -0
- package/dist/icons/maps/pin.js +6 -0
- package/dist/icons/maps/pin_arrow.js +6 -0
- package/dist/icons/maps/pin_location.js +6 -0
- package/dist/icons/maps/pin_plus.js +6 -0
- package/dist/icons/maps/pin_question.js +6 -0
- package/dist/icons/maps/pin_slash.js +6 -0
- package/dist/icons/maps/push_pin.js +6 -0
- package/dist/icons/maps/push_pin_filled.js +6 -0
- package/dist/icons/maps/push_pin_slash.js +6 -0
- package/dist/icons/maps/radar.js +6 -0
- package/dist/icons/maps/route.js +6 -0
- package/dist/icons/message/bubble.js +6 -0
- package/dist/icons/message/bubble_question.js +6 -0
- package/dist/icons/message/comment.js +6 -0
- package/dist/icons/message/comment_add.js +6 -0
- package/dist/icons/message/comment_check.js +6 -0
- package/dist/icons/message/comment_close.js +6 -0
- package/dist/icons/message/comment_minus.js +6 -0
- package/dist/icons/message/comment_text.js +6 -0
- package/dist/icons/message/index.js +8 -0
- package/dist/icons/misc/advertisement.js +6 -0
- package/dist/icons/misc/atom.js +6 -0
- package/dist/icons/misc/bone.js +6 -0
- package/dist/icons/misc/brightness_high.js +6 -0
- package/dist/icons/misc/brightness_low.js +6 -0
- package/dist/icons/misc/contrast.js +6 -0
- package/dist/icons/misc/crosshairs.js +6 -0
- package/dist/icons/misc/crown.js +6 -0
- package/dist/icons/misc/footprint.js +6 -0
- package/dist/icons/misc/form.js +6 -0
- package/dist/icons/misc/funnel.js +6 -0
- package/dist/icons/misc/index.js +25 -0
- package/dist/icons/misc/infinite.js +6 -0
- package/dist/icons/misc/insert_button.js +6 -0
- package/dist/icons/misc/light_bulb.js +6 -0
- package/dist/icons/misc/moon.js +6 -0
- package/dist/icons/misc/nut.js +6 -0
- package/dist/icons/misc/planet.js +6 -0
- package/dist/icons/misc/plus_thick.js +6 -0
- package/dist/icons/misc/pocket.js +6 -0
- package/dist/icons/misc/rocket.js +6 -0
- package/dist/icons/misc/soup.js +10 -0
- package/dist/icons/misc/sun.js +6 -0
- package/dist/icons/misc/toy_horse.js +6 -0
- package/dist/icons/misc/trophy.js +6 -0
- package/dist/icons/misc/watercloset.js +6 -0
- package/dist/icons/notifications/alert_circle.js +6 -0
- package/dist/icons/notifications/alert_octogon.js +6 -0
- package/dist/icons/notifications/alert_triangle.js +6 -0
- package/dist/icons/notifications/app_notification.js +6 -0
- package/dist/icons/notifications/bell.js +6 -0
- package/dist/icons/notifications/bell_alert.js +6 -0
- package/dist/icons/notifications/bell_checkmark.js +6 -0
- package/dist/icons/notifications/bell_minus.js +6 -0
- package/dist/icons/notifications/bell_plus.js +6 -0
- package/dist/icons/notifications/bell_ring.js +8 -0
- package/dist/icons/notifications/bell_slash.js +6 -0
- package/dist/icons/notifications/close_octogon.js +6 -0
- package/dist/icons/notifications/index.js +14 -0
- package/dist/icons/notifications/information.js +6 -0
- package/dist/icons/notifications/minus_octogon.js +6 -0
- package/dist/icons/notifications/question_circle.js +6 -0
- package/dist/icons/people/group.js +6 -0
- package/dist/icons/people/group_add.js +6 -0
- package/dist/icons/people/group_remove.js +6 -0
- package/dist/icons/people/groups.js +6 -0
- package/dist/icons/people/index.js +9 -0
- package/dist/icons/people/person.js +6 -0
- package/dist/icons/people/person_add.js +6 -0
- package/dist/icons/people/person_checkmark.js +6 -0
- package/dist/icons/people/person_circle.js +8 -0
- package/dist/icons/people/person_remove.js +6 -0
- package/dist/icons/phone/index.js +14 -0
- package/dist/icons/phone/keypad.js +6 -0
- package/dist/icons/phone/phone.js +6 -0
- package/dist/icons/phone/phone_add.js +6 -0
- package/dist/icons/phone/phone_calling.js +6 -0
- package/dist/icons/phone/phone_check.js +6 -0
- package/dist/icons/phone/phone_close.js +6 -0
- package/dist/icons/phone/phone_decline.js +6 -0
- package/dist/icons/phone/phone_end.js +6 -0
- package/dist/icons/phone/phone_forwarded.js +6 -0
- package/dist/icons/phone/phone_hash.js +6 -0
- package/dist/icons/phone/phone_incoming.js +6 -0
- package/dist/icons/phone/phone_missed.js +6 -0
- package/dist/icons/phone/phone_outgoing.js +6 -0
- package/dist/icons/phone/phone_pause.js +6 -0
- package/dist/icons/phone/phone_slash.js +6 -0
- package/dist/icons/phone/voicemail.js +6 -0
- package/dist/icons/security/index.js +11 -0
- package/dist/icons/security/key.js +6 -0
- package/dist/icons/security/key_slash.js +6 -0
- package/dist/icons/security/lock.js +6 -0
- package/dist/icons/security/lock_circle.js +6 -0
- package/dist/icons/security/lock_open.js +6 -0
- package/dist/icons/security/lock_slash.js +6 -0
- package/dist/icons/security/shield.js +6 -0
- package/dist/icons/security/shield_checkmark.js +6 -0
- package/dist/icons/security/shield_lock.js +6 -0
- package/dist/icons/security/shield_slash.js +6 -0
- package/dist/icons/security/verified.js +6 -0
- package/dist/icons/shopping/basket.js +6 -0
- package/dist/icons/shopping/cart.js +6 -0
- package/dist/icons/shopping/coupon.js +6 -0
- package/dist/icons/shopping/coupon_cut.js +6 -0
- package/dist/icons/shopping/delivery.js +6 -0
- package/dist/icons/shopping/discount.js +6 -0
- package/dist/icons/shopping/gift.js +6 -0
- package/dist/icons/shopping/gift_bag.js +6 -0
- package/dist/icons/shopping/index.js +14 -0
- package/dist/icons/shopping/inventory.js +6 -0
- package/dist/icons/shopping/point_of_sale.js +6 -0
- package/dist/icons/shopping/shirt.js +6 -0
- package/dist/icons/shopping/tag.js +6 -0
- package/dist/icons/shopping/tag_diagonal.js +6 -0
- package/dist/icons/shopping/tote.js +6 -0
- package/dist/icons/special/index.js +4 -0
- package/dist/icons/special/upload_audio.js +11 -0
- package/dist/icons/special/upload_file.js +6 -0
- package/dist/icons/special/upload_image.js +8 -0
- package/dist/icons/special/upload_video.js +9 -0
- package/dist/icons/symbols/at.js +6 -0
- package/dist/icons/symbols/cc.js +6 -0
- package/dist/icons/symbols/cmd.js +6 -0
- package/dist/icons/symbols/facebook.js +6 -0
- package/dist/icons/symbols/google.js +9 -0
- package/dist/icons/symbols/hash.js +6 -0
- package/dist/icons/symbols/index.js +9 -0
- package/dist/icons/symbols/instagram.js +18 -0
- package/dist/icons/symbols/messenger.js +12 -0
- package/dist/icons/symbols/twitter.js +6 -0
- package/dist/icons/technology/battery.js +6 -0
- package/dist/icons/technology/battery_100.js +6 -0
- package/dist/icons/technology/battery_20.js +6 -0
- package/dist/icons/technology/battery_40.js +6 -0
- package/dist/icons/technology/battery_60.js +6 -0
- package/dist/icons/technology/battery_80.js +6 -0
- package/dist/icons/technology/battery_charging.js +6 -0
- package/dist/icons/technology/battery_slash.js +6 -0
- package/dist/icons/technology/devices.js +6 -0
- package/dist/icons/technology/floppy_disk.js +6 -0
- package/dist/icons/technology/index.js +17 -0
- package/dist/icons/technology/iphone.js +6 -0
- package/dist/icons/technology/laptop.js +6 -0
- package/dist/icons/technology/mobile.js +6 -0
- package/dist/icons/technology/monitor.js +6 -0
- package/dist/icons/technology/server.js +6 -0
- package/dist/icons/technology/sim_card.js +6 -0
- package/dist/icons/technology/usb_stick.js +6 -0
- package/dist/icons/text/align_center.js +6 -0
- package/dist/icons/text/align_justified.js +6 -0
- package/dist/icons/text/align_left.js +6 -0
- package/dist/icons/text/align_right.js +6 -0
- package/dist/icons/text/indent_decrease.js +6 -0
- package/dist/icons/text/indent_increase.js +6 -0
- package/dist/icons/text/index.js +10 -0
- package/dist/icons/text/list_ordered.js +6 -0
- package/dist/icons/text/list_unordered.js +6 -0
- package/dist/icons/text/quote.js +6 -0
- package/dist/icons/text/table.js +6 -0
- package/dist/icons/time/alarm.js +6 -0
- package/dist/icons/time/alarm_checkmark.js +6 -0
- package/dist/icons/time/alarm_minus.js +6 -0
- package/dist/icons/time/alarm_plus.js +6 -0
- package/dist/icons/time/alarm_slash.js +6 -0
- package/dist/icons/time/alarm_snooze.js +6 -0
- package/dist/icons/time/calendar.js +6 -0
- package/dist/icons/time/calendar_add.js +6 -0
- package/dist/icons/time/calendar_checkmark.js +6 -0
- package/dist/icons/time/calendar_close.js +6 -0
- package/dist/icons/time/calendar_dates.js +6 -0
- package/dist/icons/time/calendar_minus.js +6 -0
- package/dist/icons/time/calendar_plus.js +6 -0
- package/dist/icons/time/calendar_scroll.js +8 -0
- package/dist/icons/time/clock.js +6 -0
- package/dist/icons/time/clock_history.js +6 -0
- package/dist/icons/time/index.js +19 -0
- package/dist/icons/time/stopwatch.js +6 -0
- package/dist/icons/time/timer.js +6 -0
- package/dist/icons/time/watch.js +6 -0
- package/dist/index.js +3 -0
- package/dist/types/attributes.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/utils/date.js +98 -0
- package/dist/utils/function.js +1 -0
- package/dist/utils/index.js +2 -0
- package/package.json +5 -4
- package/src/components/editor/editor.tsx +4 -0
- package/src/components/editor/plugins/text.tsx +16 -7
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { isBlockAboveEmpty, isSelectionAtBlockStart } from '@udecode/plate';
|
|
2
|
+
import { ELEMENT_BLOCKQUOTE, ELEMENT_PARAGRAPH, ELEMENT_TODO_LI, } from '../constants';
|
|
3
|
+
const resetBlockTypesCommonRule = {
|
|
4
|
+
types: [ELEMENT_BLOCKQUOTE, ELEMENT_TODO_LI],
|
|
5
|
+
defaultType: ELEMENT_PARAGRAPH,
|
|
6
|
+
};
|
|
7
|
+
export const resetBlockTypePlugin = {
|
|
8
|
+
options: {
|
|
9
|
+
rules: [
|
|
10
|
+
{
|
|
11
|
+
...resetBlockTypesCommonRule,
|
|
12
|
+
hotkey: 'Enter',
|
|
13
|
+
predicate: isBlockAboveEmpty,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
...resetBlockTypesCommonRule,
|
|
17
|
+
hotkey: 'Backspace',
|
|
18
|
+
predicate: isSelectionAtBlockStart,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ELEMENT_BLOCKQUOTE, ELEMENT_CODE_BLOCK, ELEMENT_TD, } from '@udecode/plate';
|
|
2
|
+
export const softBreakPlugin = {
|
|
3
|
+
options: {
|
|
4
|
+
rules: [
|
|
5
|
+
{ hotkey: 'shift+enter' },
|
|
6
|
+
{
|
|
7
|
+
hotkey: 'enter',
|
|
8
|
+
query: {
|
|
9
|
+
allow: [ELEMENT_CODE_BLOCK, ELEMENT_BLOCKQUOTE, ELEMENT_TD],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createPluginFactory, PlateElement, } from '@udecode/plate';
|
|
3
|
+
import { H, P } from 'components';
|
|
4
|
+
import * as Elements from '../constants';
|
|
5
|
+
export const ParagraphElement = React.forwardRef(({ children, ...props }, ref) => {
|
|
6
|
+
const textAlign = props?.style?.textAlign;
|
|
7
|
+
return (React.createElement(PlateElement, { asChild: true, ref: ref, ...props },
|
|
8
|
+
React.createElement(React.Fragment, null,
|
|
9
|
+
React.createElement(P, { as: "div", "$textAlign": textAlign }, children))));
|
|
10
|
+
});
|
|
11
|
+
export const createParagraphPlugin = createPluginFactory({
|
|
12
|
+
key: Elements.ELEMENT_PARAGRAPH,
|
|
13
|
+
type: Elements.ELEMENT_PARAGRAPH,
|
|
14
|
+
isElement: true,
|
|
15
|
+
});
|
|
16
|
+
export const HOneElement = React.forwardRef(({ children, ...props }, ref) => {
|
|
17
|
+
const textAlign = props?.style?.textAlign;
|
|
18
|
+
return (React.createElement(PlateElement, { asChild: true, ref: ref, ...props },
|
|
19
|
+
React.createElement(React.Fragment, null,
|
|
20
|
+
React.createElement(H.One, { "$textAlign": textAlign }, children))));
|
|
21
|
+
});
|
|
22
|
+
export const createHOnePlugin = createPluginFactory({
|
|
23
|
+
key: Elements.ELEMENT_H1,
|
|
24
|
+
type: Elements.ELEMENT_H1,
|
|
25
|
+
isElement: true,
|
|
26
|
+
});
|
|
27
|
+
export const HTwoElement = React.forwardRef(({ children, ...props }, ref) => {
|
|
28
|
+
const textAlign = props?.style?.textAlign;
|
|
29
|
+
return (React.createElement(PlateElement, { asChild: true, ref: ref, ...props },
|
|
30
|
+
React.createElement(React.Fragment, null,
|
|
31
|
+
React.createElement(H.Two, { "$textAlign": textAlign }, children))));
|
|
32
|
+
});
|
|
33
|
+
export const createHTwoPlugin = createPluginFactory({
|
|
34
|
+
key: Elements.ELEMENT_H2,
|
|
35
|
+
type: Elements.ELEMENT_H2,
|
|
36
|
+
isElement: true,
|
|
37
|
+
});
|
|
38
|
+
export const HThreeElement = React.forwardRef(({ children, ...props }, ref) => {
|
|
39
|
+
const textAlign = props?.style?.textAlign;
|
|
40
|
+
return (React.createElement(PlateElement, { asChild: true, ref: ref, ...props },
|
|
41
|
+
React.createElement(React.Fragment, null,
|
|
42
|
+
React.createElement(H.Three, { "$textAlign": textAlign }, children))));
|
|
43
|
+
});
|
|
44
|
+
export const createHThreePlugin = createPluginFactory({
|
|
45
|
+
key: Elements.ELEMENT_H3,
|
|
46
|
+
type: Elements.ELEMENT_H3,
|
|
47
|
+
isElement: true,
|
|
48
|
+
});
|
|
49
|
+
export const HFourElement = React.forwardRef(({ children, ...props }, ref) => {
|
|
50
|
+
const textAlign = props?.style?.textAlign;
|
|
51
|
+
return (React.createElement(PlateElement, { asChild: true, ref: ref, ...props },
|
|
52
|
+
React.createElement(React.Fragment, null,
|
|
53
|
+
React.createElement(H.Four, { "$textAlign": textAlign }, children))));
|
|
54
|
+
});
|
|
55
|
+
export const createHFourPlugin = createPluginFactory({
|
|
56
|
+
key: Elements.ELEMENT_H4,
|
|
57
|
+
type: Elements.ELEMENT_H4,
|
|
58
|
+
isElement: true,
|
|
59
|
+
});
|
|
60
|
+
export const HFiveElement = React.forwardRef(({ children, ...props }, ref) => {
|
|
61
|
+
const textAlign = props?.style?.textAlign;
|
|
62
|
+
return (React.createElement(PlateElement, { asChild: true, ref: ref, ...props },
|
|
63
|
+
React.createElement(React.Fragment, null,
|
|
64
|
+
React.createElement(H.Five, { "$textAlign": textAlign }, children))));
|
|
65
|
+
});
|
|
66
|
+
export const createHFivePlugin = createPluginFactory({
|
|
67
|
+
key: Elements.ELEMENT_H5,
|
|
68
|
+
type: Elements.ELEMENT_H5,
|
|
69
|
+
isElement: true,
|
|
70
|
+
});
|
|
71
|
+
export const HSixElement = React.forwardRef(({ children, ...props }, ref) => {
|
|
72
|
+
const textAlign = props?.style?.textAlign;
|
|
73
|
+
return (React.createElement(PlateElement, { asChild: true, ref: ref, ...props },
|
|
74
|
+
React.createElement(React.Fragment, null,
|
|
75
|
+
React.createElement(H.Six, { "$textAlign": textAlign }, children))));
|
|
76
|
+
});
|
|
77
|
+
export const createHSixPlugin = createPluginFactory({
|
|
78
|
+
key: Elements.ELEMENT_H6,
|
|
79
|
+
type: Elements.ELEMENT_H6,
|
|
80
|
+
isElement: true,
|
|
81
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Close } from 'icons';
|
|
4
|
+
const colorLookup = {
|
|
5
|
+
blue: {
|
|
6
|
+
primary: 'var(--color-hue-blue-1)',
|
|
7
|
+
secondary: 'var(--color-hue-blue-2)',
|
|
8
|
+
bg: 'var(--color-hue-blue-3)',
|
|
9
|
+
},
|
|
10
|
+
green: {
|
|
11
|
+
primary: 'var(--color-green-3)',
|
|
12
|
+
secondary: 'var(--color-green-8)',
|
|
13
|
+
bg: 'var(--color-green-10)',
|
|
14
|
+
},
|
|
15
|
+
orange: {
|
|
16
|
+
primary: 'var(--color-hue-orange-1)',
|
|
17
|
+
secondary: 'var(--color-hue-orange-2)',
|
|
18
|
+
bg: 'var(--color-hue-orange-3)',
|
|
19
|
+
},
|
|
20
|
+
purple: {
|
|
21
|
+
primary: 'var(--color-hue-purple-1)',
|
|
22
|
+
secondary: 'var(--color-hue-purple-2)',
|
|
23
|
+
bg: 'var(--color-hue-purple-3)',
|
|
24
|
+
},
|
|
25
|
+
red: {
|
|
26
|
+
primary: 'var(--color-red-4)',
|
|
27
|
+
secondary: 'var(--color-red-9)',
|
|
28
|
+
bg: 'var(--color-red-10)',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export const Badge = ({ children, color, dot, onDismiss }) => {
|
|
32
|
+
const bgColor = colorLookup[color].bg;
|
|
33
|
+
const textColor = colorLookup[color].primary;
|
|
34
|
+
const borderColor = colorLookup[color].secondary;
|
|
35
|
+
return (React.createElement(Component, { "$bgColor": bgColor, "$borderColor": borderColor, "$textColor": textColor },
|
|
36
|
+
dot && React.createElement(Dot, { "$secondaryColor": textColor }),
|
|
37
|
+
children,
|
|
38
|
+
onDismiss && React.createElement(Close, { size: 16 })));
|
|
39
|
+
};
|
|
40
|
+
const Component = styled.div `
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 8px;
|
|
44
|
+
padding: 1px 7px;
|
|
45
|
+
border-radius: 32px;
|
|
46
|
+
background-color: ${({ $bgColor }) => $bgColor};
|
|
47
|
+
color: ${({ $textColor }) => $textColor};
|
|
48
|
+
border: 1px solid ${({ $borderColor }) => $borderColor};
|
|
49
|
+
font-family: Inter;
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
font-weight: 500;
|
|
52
|
+
line-height: 16px;
|
|
53
|
+
user-select: none;
|
|
54
|
+
|
|
55
|
+
svg {
|
|
56
|
+
fill: currentColor;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
const Dot = styled.div `
|
|
61
|
+
width: 8px;
|
|
62
|
+
height: 8px;
|
|
63
|
+
border-radius: 50%;
|
|
64
|
+
background-color: ${({ $secondaryColor }) => $secondaryColor};
|
|
65
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Badge } from './badge';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Feedback/Badge',
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
// eslint-disable-next-line
|
|
10
|
+
const Story = ({ hasDismissFn,
|
|
11
|
+
// eslint-disable-next-line
|
|
12
|
+
onDismiss, ...args }) => (React.createElement(Badge, { onDismiss: hasDismissFn ? () => undefined : undefined, ...args }, "Badge"));
|
|
13
|
+
export const Default = Story.bind({});
|
|
14
|
+
Default.argTypes = {
|
|
15
|
+
color: {
|
|
16
|
+
options: ['blue', 'red', 'green', 'purple', 'orange'],
|
|
17
|
+
control: 'select',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
Default.args = {
|
|
21
|
+
color: 'blue',
|
|
22
|
+
hasDismissFn: true,
|
|
23
|
+
dot: true,
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge } from './badge';
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Styles } from 'common';
|
|
4
|
+
import { Box, Button, P } from 'components';
|
|
5
|
+
import { AlertCircle, AlertOctogon, AlertTriangle, Close, Information, } from 'icons';
|
|
6
|
+
export const Banner = ({ content, href, onClose, title, type, }) => {
|
|
7
|
+
const iconLookup = {
|
|
8
|
+
error: React.createElement(AlertOctogon, { size: 24 }),
|
|
9
|
+
info: React.createElement(Information, { size: 24 }),
|
|
10
|
+
success: React.createElement(AlertCircle, { size: 24 }),
|
|
11
|
+
warning: React.createElement(AlertTriangle, { size: 24 }),
|
|
12
|
+
};
|
|
13
|
+
return (React.createElement(Wrapper, { as: "output", "$align": "center", "$dir": "row", "$gap": 8, "$type": type },
|
|
14
|
+
iconLookup[type],
|
|
15
|
+
React.createElement(Box, { "$dir": "row", "$gap": 4, "$align": "center" },
|
|
16
|
+
React.createElement(P, { as: "span", "$semiBold": true }, title),
|
|
17
|
+
React.createElement(P, { as: "span" }, content),
|
|
18
|
+
React.createElement(P, { as: "a", href: href, "$color": "primary-blue-2" }, "Read more")),
|
|
19
|
+
React.createElement(Button, { icon: React.createElement(Close, { size: 24 }), onClick: onClose, type: "special" })));
|
|
20
|
+
};
|
|
21
|
+
const Wrapper = styled.output `
|
|
22
|
+
width: 100%;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
padding: 12px 16px;
|
|
25
|
+
display: flex;
|
|
26
|
+
background-color: ${({ $type }) => $type === 'error'
|
|
27
|
+
? 'var(--color-red-9)'
|
|
28
|
+
: $type === 'info'
|
|
29
|
+
? 'var(--color-blue-9)'
|
|
30
|
+
: $type === 'success'
|
|
31
|
+
? 'var(--color-green-9)'
|
|
32
|
+
: 'var(--color-orange-9)'};
|
|
33
|
+
border-bottom: 1px solid
|
|
34
|
+
${({ $type }) => $type === 'error'
|
|
35
|
+
? 'var(--color-red-4)'
|
|
36
|
+
: $type === 'info'
|
|
37
|
+
? 'var(--color-blue-4)'
|
|
38
|
+
: $type === 'success'
|
|
39
|
+
? 'var(--color-green-3)'
|
|
40
|
+
: 'var(--color-orange-5)'};
|
|
41
|
+
box-shadow: var(--elevation-2);
|
|
42
|
+
border-radius: var(--small);
|
|
43
|
+
|
|
44
|
+
& > svg {
|
|
45
|
+
fill: ${({ $type }) => $type === 'error'
|
|
46
|
+
? 'var(--color-red-4)'
|
|
47
|
+
: $type === 'info'
|
|
48
|
+
? 'var(--color-blue-4)'
|
|
49
|
+
: $type === 'success'
|
|
50
|
+
? 'var(--color-green-3)'
|
|
51
|
+
: 'var(--color-orange-5)'};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
a {
|
|
55
|
+
position: relative;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
|
|
58
|
+
&::after {
|
|
59
|
+
position: absolute;
|
|
60
|
+
content: '';
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 1px;
|
|
63
|
+
right: 0px;
|
|
64
|
+
left: 0px;
|
|
65
|
+
bottom: 0px;
|
|
66
|
+
background-color: var(--color-primary-blue-2);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
button {
|
|
71
|
+
padding: 0px;
|
|
72
|
+
margin-left: auto;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
${Styles.flex}
|
|
76
|
+
`;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Banner } from './banner';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Feedback/Banner',
|
|
5
|
+
};
|
|
6
|
+
const Story = (args) => React.createElement(Banner, { ...args });
|
|
7
|
+
export const Default = Story.bind({});
|
|
8
|
+
Default.argTypes = {
|
|
9
|
+
content: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
},
|
|
12
|
+
href: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
},
|
|
15
|
+
title: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
},
|
|
18
|
+
type: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
options: ['error', 'info', 'success', 'warning'],
|
|
21
|
+
control: 'select',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
Default.args = {
|
|
25
|
+
content: 'Notification message.',
|
|
26
|
+
href: '',
|
|
27
|
+
title: 'Notification title.',
|
|
28
|
+
type: 'success',
|
|
29
|
+
};
|
|
30
|
+
Default.parameters = {
|
|
31
|
+
layout: 'padded',
|
|
32
|
+
};
|
|
33
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Banner } from './banner';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Close } from 'icons';
|
|
4
|
+
const colorLookup = {
|
|
5
|
+
'primary-blue': {
|
|
6
|
+
primary: 'var(--color-primary-blue-2)',
|
|
7
|
+
secondary: 'var(--color-white)',
|
|
8
|
+
text: 'var(--color-white)',
|
|
9
|
+
},
|
|
10
|
+
blue: {
|
|
11
|
+
primary: 'var(--color-blue-9)',
|
|
12
|
+
secondary: 'var(--color-blue-5)',
|
|
13
|
+
text: 'var(--color-grey-4)',
|
|
14
|
+
},
|
|
15
|
+
green: {
|
|
16
|
+
primary: 'var(--color-green-9)',
|
|
17
|
+
secondary: 'var(--color-green-5)',
|
|
18
|
+
text: 'var(--color-grey-4)',
|
|
19
|
+
},
|
|
20
|
+
grey: {
|
|
21
|
+
primary: 'var(--color-grey-9)',
|
|
22
|
+
secondary: 'var(--color-grey-4)',
|
|
23
|
+
text: 'var(--color-grey-4)',
|
|
24
|
+
},
|
|
25
|
+
orange: {
|
|
26
|
+
primary: 'var(--color-orange-9)',
|
|
27
|
+
secondary: 'var(--color-orange-5)',
|
|
28
|
+
text: 'var(--color-grey-4)',
|
|
29
|
+
},
|
|
30
|
+
purple: {
|
|
31
|
+
primary: 'var(--color-purple-9)',
|
|
32
|
+
secondary: 'var(--color-purple-5)',
|
|
33
|
+
text: 'var(--color-grey-4)',
|
|
34
|
+
},
|
|
35
|
+
red: {
|
|
36
|
+
primary: 'var(--color-red-9)',
|
|
37
|
+
secondary: 'var(--color-red-5)',
|
|
38
|
+
text: 'var(--color-grey-4)',
|
|
39
|
+
},
|
|
40
|
+
turquoise: {
|
|
41
|
+
primary: 'var(--color-turquoise-9)',
|
|
42
|
+
secondary: 'var(--color-turquoise-5)',
|
|
43
|
+
text: 'var(--color-grey-4)',
|
|
44
|
+
},
|
|
45
|
+
yellow: {
|
|
46
|
+
primary: 'var(--color-yellow-9)',
|
|
47
|
+
secondary: 'var(--color-yellow-9)',
|
|
48
|
+
text: 'var(--color-grey-4)',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
export const Chip = ({ children, color, dot, onDismiss, size }) => {
|
|
52
|
+
const bgColor = colorLookup[color].primary;
|
|
53
|
+
const textColor = colorLookup[color].text;
|
|
54
|
+
const dotColor = colorLookup[color].secondary;
|
|
55
|
+
return (React.createElement(Component, { "$bgColor": bgColor, "$size": size, "$textColor": textColor },
|
|
56
|
+
dot && React.createElement(Dot, { "$secondaryColor": dotColor }),
|
|
57
|
+
children,
|
|
58
|
+
onDismiss && React.createElement(Close, { size: 16 })));
|
|
59
|
+
};
|
|
60
|
+
const Component = styled.div `
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 8px;
|
|
64
|
+
border-radius: 32px;
|
|
65
|
+
background-color: ${({ $bgColor }) => $bgColor};
|
|
66
|
+
color: ${({ $textColor }) => $textColor};
|
|
67
|
+
font-family: Inter;
|
|
68
|
+
user-select: none;
|
|
69
|
+
|
|
70
|
+
svg {
|
|
71
|
+
fill: currentColor;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
}
|
|
74
|
+
${({ $size }) => $size === 'small'
|
|
75
|
+
? // small
|
|
76
|
+
`
|
|
77
|
+
padding: 4px 16px;
|
|
78
|
+
font-size: 12px;
|
|
79
|
+
line-height: 16px;
|
|
80
|
+
font-weight: 500;`
|
|
81
|
+
: // large
|
|
82
|
+
`
|
|
83
|
+
padding: 8px 16px;
|
|
84
|
+
font-size: 14px;
|
|
85
|
+
line-height: 20px;
|
|
86
|
+
font-weight: 600;`}
|
|
87
|
+
`;
|
|
88
|
+
const Dot = styled.div `
|
|
89
|
+
width: 8px;
|
|
90
|
+
height: 8px;
|
|
91
|
+
border-radius: 50%;
|
|
92
|
+
background-color: ${({ $secondaryColor }) => $secondaryColor};
|
|
93
|
+
`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Chip } from './chip';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Feedback/Chip',
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
const Story = ({ hasDismissFn,
|
|
10
|
+
// eslint-disable-next-line
|
|
11
|
+
onDismiss, ...args }) => (React.createElement(Chip, { onDismiss: hasDismissFn ? () => undefined : undefined, ...args }, "Chips Name"));
|
|
12
|
+
export const Default = Story.bind({});
|
|
13
|
+
Default.argTypes = {
|
|
14
|
+
color: {
|
|
15
|
+
options: [
|
|
16
|
+
'grey',
|
|
17
|
+
'blue',
|
|
18
|
+
'red',
|
|
19
|
+
'green',
|
|
20
|
+
'turquoise',
|
|
21
|
+
'purple',
|
|
22
|
+
'yellow',
|
|
23
|
+
'orange',
|
|
24
|
+
'primary-blue',
|
|
25
|
+
],
|
|
26
|
+
control: 'select',
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
options: ['small', 'large'],
|
|
30
|
+
control: 'select',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
Default.args = {
|
|
34
|
+
color: 'blue',
|
|
35
|
+
hasDismissFn: true,
|
|
36
|
+
size: 'large',
|
|
37
|
+
dot: true,
|
|
38
|
+
};
|
|
39
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Chip } from './chip';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Badge } from './badge';
|
|
2
|
+
export { Banner } from './banner';
|
|
3
|
+
export { Loader } from './loader';
|
|
4
|
+
export { Notification } from './notification';
|
|
5
|
+
export { Progress } from './progress';
|
|
6
|
+
export { Toast } from './toast';
|
|
7
|
+
export { Tooltip } from './tooltip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Loader } from './loader';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled, { keyframes } from 'styled-components';
|
|
3
|
+
import { colorReference } from 'common';
|
|
4
|
+
export const Loader = ({ color = 'grey-1', inline, size = 16, sx, }) => {
|
|
5
|
+
let borderWidth = 3;
|
|
6
|
+
if (size > 96)
|
|
7
|
+
borderWidth = 10;
|
|
8
|
+
else if (size > 47)
|
|
9
|
+
borderWidth = 5;
|
|
10
|
+
else if (size > 23)
|
|
11
|
+
borderWidth = 4;
|
|
12
|
+
return (React.createElement(Component, { "$borderWidth": borderWidth, "$color": color, "$inline": !!inline, "$size": size, "$sx": sx }));
|
|
13
|
+
};
|
|
14
|
+
const spin = keyframes `
|
|
15
|
+
0% { transform: rotate(0deg); }
|
|
16
|
+
100% { transform: rotate(360deg); }
|
|
17
|
+
`;
|
|
18
|
+
const Component = styled.div `
|
|
19
|
+
border: 2px solid transparent;
|
|
20
|
+
border-radius: 50%;
|
|
21
|
+
animation: ${spin} 0.8s linear infinite;
|
|
22
|
+
|
|
23
|
+
border-width: ${({ $borderWidth }) => `${$borderWidth}px`};
|
|
24
|
+
border-color: ${({ $color }) => colorReference[$color]};
|
|
25
|
+
border-top-color: transparent;
|
|
26
|
+
|
|
27
|
+
${({ $size }) => `
|
|
28
|
+
height: ${$size}px;
|
|
29
|
+
width: ${$size}px;
|
|
30
|
+
`}
|
|
31
|
+
|
|
32
|
+
${({ $sx }) => ($sx ? $sx : '')};
|
|
33
|
+
`;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Loader } from './loader';
|
|
3
|
+
import { COLORS } from 'common';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Feedback/Loader',
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'centered',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
const Story = (args) => React.createElement(Loader, { ...args });
|
|
11
|
+
export const Default = Story.bind({});
|
|
12
|
+
Default.argTypes = {
|
|
13
|
+
size: {
|
|
14
|
+
type: 'number',
|
|
15
|
+
control: {
|
|
16
|
+
type: 'range',
|
|
17
|
+
min: 4,
|
|
18
|
+
max: 64,
|
|
19
|
+
step: 4,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
color: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
options: COLORS,
|
|
25
|
+
control: 'select',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
Default.args = {};
|
|
29
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Notification } from './notification';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Styles } from 'common';
|
|
4
|
+
import { Box, Button, P } from 'components';
|
|
5
|
+
import { AlertCircle, AlertOctogon, AlertTriangle, Close, Information, } from 'icons';
|
|
6
|
+
export const Notification = ({ content, href, onClose, sx, title, type, }) => {
|
|
7
|
+
const iconLookup = {
|
|
8
|
+
error: React.createElement(AlertOctogon, { size: 24 }),
|
|
9
|
+
info: React.createElement(Information, { size: 24 }),
|
|
10
|
+
success: React.createElement(AlertCircle, { size: 24 }),
|
|
11
|
+
warning: React.createElement(AlertTriangle, { size: 24 }),
|
|
12
|
+
};
|
|
13
|
+
return (React.createElement(Wrapper, { as: href ? 'a' : 'output', href: href, "$dir": "column", "$gap": 8, "$sx": sx, "$type": type },
|
|
14
|
+
React.createElement(Box, { "$dir": "row", "$gap": 8, "$flex": 1 },
|
|
15
|
+
iconLookup[type],
|
|
16
|
+
React.createElement(P, { as: "span", "$semiBold": true }, title),
|
|
17
|
+
React.createElement(Button, { icon: React.createElement(Close, { size: 24 }), onClick: onClose, sx: "margin-left: auto;", type: "special" })),
|
|
18
|
+
React.createElement(Box, { "$align": "center", "$dir": "row", "$gap": 4 },
|
|
19
|
+
React.createElement(P, { as: "span", sx: "padding-left: 32px;" }, content))));
|
|
20
|
+
};
|
|
21
|
+
const Wrapper = styled.output `
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
width: 100%;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
padding: 16px;
|
|
26
|
+
display: flex;
|
|
27
|
+
background-color: ${({ $type }) => $type === 'error'
|
|
28
|
+
? 'var(--color-red-9)'
|
|
29
|
+
: $type === 'info'
|
|
30
|
+
? 'var(--color-blue-9)'
|
|
31
|
+
: $type === 'success'
|
|
32
|
+
? 'var(--color-green-9)'
|
|
33
|
+
: 'var(--color-orange-9)'};
|
|
34
|
+
border: 1px solid
|
|
35
|
+
${({ $type }) => $type === 'error'
|
|
36
|
+
? 'var(--color-red-8)'
|
|
37
|
+
: $type === 'info'
|
|
38
|
+
? 'var(--color-blue-8)'
|
|
39
|
+
: $type === 'success'
|
|
40
|
+
? 'var(--color-green-8)'
|
|
41
|
+
: 'var(--color-orange-8)'};
|
|
42
|
+
box-shadow: var(--elevation-2);
|
|
43
|
+
border-radius: var(--small);
|
|
44
|
+
|
|
45
|
+
& > div > svg {
|
|
46
|
+
fill: ${({ $type }) => $type === 'error'
|
|
47
|
+
? 'var(--color-red-4)'
|
|
48
|
+
: $type === 'info'
|
|
49
|
+
? 'var(--color-blue-4)'
|
|
50
|
+
: $type === 'success'
|
|
51
|
+
? 'var(--color-green-3)'
|
|
52
|
+
: 'var(--color-orange-5)'};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
button > svg {
|
|
56
|
+
fill: unset;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
a {
|
|
60
|
+
position: relative;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
button {
|
|
65
|
+
padding: 0px;
|
|
66
|
+
margin-left: auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
${Styles.flex}
|
|
70
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
71
|
+
`;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Notification } from './notification';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Feedback/Notification',
|
|
5
|
+
};
|
|
6
|
+
const Story = (args) => (React.createElement(Notification, { sx: "max-width: 480px;", ...args }));
|
|
7
|
+
export const Default = Story.bind({});
|
|
8
|
+
Default.argTypes = {
|
|
9
|
+
content: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
},
|
|
12
|
+
href: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
},
|
|
15
|
+
title: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
},
|
|
18
|
+
type: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
options: ['error', 'info', 'success', 'warning'],
|
|
21
|
+
control: 'select',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
Default.args = {
|
|
25
|
+
content: 'Monotonectally syndicate multifunctional functionalities and low-risk high-yield infrastructures. Continually revolutionize functional channels after user-centric imperatives.',
|
|
26
|
+
href: '',
|
|
27
|
+
title: 'Notification title.',
|
|
28
|
+
type: 'success',
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Progress } from './progress';
|