@soul-refiner/design-system 1.7.22 → 2.0.0-alpha.0
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/components/editor/plugins/blocks/plate-button.d.ts +2 -2
- package/dist/components/editor/plugins/blocks/separator.d.ts +1 -1
- package/dist/components/iconography/icon/icon.d.ts +1 -1
- package/dist/components/navigation/inner/inner.d.ts +2 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.js +48151 -5
- package/package.json +15 -14
- package/dist/common/colors.js +0 -135
- package/dist/common/date.js +0 -28
- package/dist/common/index.js +0 -3
- package/dist/common/styles.js +0 -63
- package/dist/components/actions/button/button.js +0 -318
- package/dist/components/actions/button/index.js +0 -1
- package/dist/components/actions/dropdown/dropdown.js +0 -227
- package/dist/components/actions/dropdown/index.js +0 -1
- package/dist/components/actions/index.js +0 -6
- package/dist/components/actions/rate/index.js +0 -1
- package/dist/components/actions/rate/rate.js +0 -47
- package/dist/components/actions/switch/index.js +0 -1
- package/dist/components/actions/switch/switch.js +0 -72
- package/dist/components/actions/toggle/index.js +0 -1
- package/dist/components/actions/toggle/toggle.js +0 -57
- package/dist/components/actions/upload/index.js +0 -1
- package/dist/components/actions/upload/upload.js +0 -156
- package/dist/components/atoms/box/box.js +0 -16
- package/dist/components/atoms/box/index.js +0 -1
- package/dist/components/atoms/colors/colors.js +0 -35
- package/dist/components/atoms/colors/index.js +0 -1
- package/dist/components/atoms/hide/hide.js +0 -9
- package/dist/components/atoms/hide/index.js +0 -1
- package/dist/components/atoms/index.js +0 -5
- package/dist/components/atoms/seconds_to_duration/index.js +0 -1
- package/dist/components/atoms/seconds_to_duration/seconds_to_duration.js +0 -27
- package/dist/components/atoms/time_ago/index.js +0 -1
- package/dist/components/atoms/time_ago/time_ago.js +0 -31
- package/dist/components/atoms/typography/display.js +0 -10
- package/dist/components/atoms/typography/heading.js +0 -35
- package/dist/components/atoms/typography/index.js +0 -4
- package/dist/components/atoms/typography/paragraph.js +0 -18
- package/dist/components/atoms/typography/typography.js +0 -12
- package/dist/components/card/action/action.js +0 -72
- package/dist/components/card/action/index.js +0 -1
- package/dist/components/card/audio/audio.js +0 -130
- package/dist/components/card/audio/index.js +0 -1
- package/dist/components/card/card.js +0 -35
- package/dist/components/card/feature/feature.js +0 -188
- package/dist/components/card/feature/index.js +0 -1
- package/dist/components/card/index.js +0 -1
- package/dist/components/card/meeting/index.js +0 -1
- package/dist/components/card/meeting/meeting.js +0 -130
- package/dist/components/card/person/index.js +0 -1
- package/dist/components/card/person/person.js +0 -69
- package/dist/components/card/price/index.js +0 -1
- package/dist/components/card/price/price.js +0 -75
- package/dist/components/card/regular/index.js +0 -1
- package/dist/components/card/regular/regular.js +0 -33
- package/dist/components/card/video/index.js +0 -1
- package/dist/components/card/video/video.js +0 -127
- package/dist/components/card/written/index.js +0 -1
- package/dist/components/card/written/written.js +0 -130
- package/dist/components/custom/courses_selection/courses_selection.js +0 -127
- package/dist/components/custom/courses_selection/index.js +0 -1
- package/dist/components/custom/index.js +0 -2
- package/dist/components/custom/users_selection/index.js +0 -1
- package/dist/components/custom/users_selection/users_selection.js +0 -120
- package/dist/components/editor/constants.js +0 -49
- package/dist/components/editor/context.js +0 -8
- package/dist/components/editor/editor.js +0 -102
- package/dist/components/editor/icons/border-all.js +0 -3
- package/dist/components/editor/icons/border-bottom.js +0 -3
- package/dist/components/editor/icons/border-left.js +0 -3
- package/dist/components/editor/icons/border-none.js +0 -3
- package/dist/components/editor/icons/border-right.js +0 -3
- package/dist/components/editor/icons/border-top.js +0 -3
- package/dist/components/editor/icons/index.js +0 -6
- package/dist/components/editor/index.js +0 -2
- package/dist/components/editor/navbar/alignment_dropdown.js +0 -97
- package/dist/components/editor/navbar/button_modal.js +0 -55
- package/dist/components/editor/navbar/index.js +0 -1
- package/dist/components/editor/navbar/navbar.js +0 -201
- package/dist/components/editor/navbar/style_dropdown.js +0 -65
- package/dist/components/editor/plugins/blocks/blockquote.js +0 -8
- package/dist/components/editor/plugins/blocks/blocks.js +0 -50
- package/dist/components/editor/plugins/blocks/buttons.js +0 -81
- package/dist/components/editor/plugins/blocks/dropdown-menu.js +0 -62
- package/dist/components/editor/plugins/blocks/image.js +0 -51
- package/dist/components/editor/plugins/blocks/index.js +0 -1
- package/dist/components/editor/plugins/blocks/list.js +0 -17
- package/dist/components/editor/plugins/blocks/media-popover.js +0 -32
- package/dist/components/editor/plugins/blocks/plate-button.js +0 -37
- package/dist/components/editor/plugins/blocks/popover.js +0 -11
- package/dist/components/editor/plugins/blocks/qa.js +0 -45
- package/dist/components/editor/plugins/blocks/resizable.js +0 -37
- package/dist/components/editor/plugins/blocks/separator.js +0 -19
- package/dist/components/editor/plugins/blocks/table-cell.js +0 -38
- package/dist/components/editor/plugins/blocks/table-row.js +0 -7
- package/dist/components/editor/plugins/blocks/table.js +0 -82
- package/dist/components/editor/plugins/blocks/text.js +0 -82
- package/dist/components/editor/plugins/blocks/video.js +0 -32
- package/dist/components/editor/plugins/index.js +0 -4
- package/dist/components/editor/plugins/leafs/index.js +0 -1
- package/dist/components/editor/plugins/leafs/leafs.js +0 -33
- package/dist/components/editor/plugins/leafs/link.js +0 -74
- package/dist/components/editor/plugins/marks/index.js +0 -1
- package/dist/components/editor/plugins/marks/marks.js +0 -12
- package/dist/components/editor/plugins/plate.js +0 -37
- package/dist/components/editor/plugins/utils/exitBreak.js +0 -31
- package/dist/components/editor/plugins/utils/index.js +0 -1
- package/dist/components/editor/plugins/utils/resetBlockType.js +0 -22
- package/dist/components/editor/plugins/utils/selectOnBackspace.js +0 -6
- package/dist/components/editor/plugins/utils/softBreak.js +0 -14
- package/dist/components/editor/plugins/utils/utils.js +0 -12
- package/dist/components/editor/simple_editor/index.js +0 -1
- package/dist/components/editor/simple_editor/navbar.js +0 -140
- package/dist/components/editor/simple_editor/plugins.js +0 -89
- package/dist/components/editor/simple_editor/simple_editor.js +0 -89
- package/dist/components/feedback/animated_toast/animated_toast.js +0 -55
- package/dist/components/feedback/animated_toast/index.js +0 -1
- package/dist/components/feedback/badge/badge.js +0 -66
- package/dist/components/feedback/badge/index.js +0 -1
- package/dist/components/feedback/banner/banner.js +0 -80
- package/dist/components/feedback/banner/index.js +0 -1
- package/dist/components/feedback/chip/chip.js +0 -94
- package/dist/components/feedback/chip/index.js +0 -1
- package/dist/components/feedback/index.js +0 -8
- package/dist/components/feedback/loader/index.js +0 -1
- package/dist/components/feedback/loader/loader.js +0 -34
- package/dist/components/feedback/notification/index.js +0 -1
- package/dist/components/feedback/notification/notification.js +0 -72
- package/dist/components/feedback/progress/index.js +0 -1
- package/dist/components/feedback/progress/progress.js +0 -87
- package/dist/components/feedback/toast/index.js +0 -1
- package/dist/components/feedback/toast/toast.js +0 -112
- package/dist/components/feedback/tooltip/index.js +0 -1
- package/dist/components/feedback/tooltip/tooltip.js +0 -26
- package/dist/components/iconography/avatar/avatar.js +0 -171
- package/dist/components/iconography/avatar/icons/approved.js +0 -5
- package/dist/components/iconography/avatar/icons/busy.js +0 -5
- package/dist/components/iconography/avatar/icons/declined.js +0 -5
- package/dist/components/iconography/avatar/icons/default.js +0 -4
- package/dist/components/iconography/avatar/icons/focus.js +0 -5
- package/dist/components/iconography/avatar/icons/index.js +0 -9
- package/dist/components/iconography/avatar/icons/locked.js +0 -5
- package/dist/components/iconography/avatar/icons/offline.js +0 -5
- package/dist/components/iconography/avatar/icons/online.js +0 -4
- package/dist/components/iconography/avatar/icons/subscribed.js +0 -9
- package/dist/components/iconography/avatar/index.js +0 -1
- package/dist/components/iconography/icon/icon.js +0 -10
- package/dist/components/iconography/icon/index.js +0 -1
- package/dist/components/iconography/index.js +0 -2
- package/dist/components/index.js +0 -12
- package/dist/components/input/calendar/calendar.js +0 -255
- package/dist/components/input/calendar/index.js +0 -1
- package/dist/components/input/checkbox/checkbox.js +0 -23
- package/dist/components/input/checkbox/index.js +0 -1
- package/dist/components/input/date/date.js +0 -517
- package/dist/components/input/date/index.js +0 -1
- package/dist/components/input/filter/filter.js +0 -319
- package/dist/components/input/filter/filter_option.js +0 -70
- package/dist/components/input/filter/index.js +0 -1
- package/dist/components/input/index.js +0 -10
- package/dist/components/input/radio/index.js +0 -1
- package/dist/components/input/radio/radio.js +0 -83
- package/dist/components/input/search/index.js +0 -1
- package/dist/components/input/search/search.js +0 -138
- package/dist/components/input/select/index.js +0 -1
- package/dist/components/input/select/select.js +0 -47
- package/dist/components/input/text_area/index.js +0 -1
- package/dist/components/input/text_area/text_area.js +0 -110
- package/dist/components/input/text_input/index.js +0 -1
- package/dist/components/input/text_input/text_input.js +0 -147
- package/dist/components/input/time/index.js +0 -1
- package/dist/components/input/time/time.js +0 -71
- package/dist/components/media/common.js +0 -1
- package/dist/components/media/index.js +0 -2
- package/dist/components/media/video/index.js +0 -1
- package/dist/components/media/video/video.js +0 -31
- package/dist/components/media/video-player/index.js +0 -1
- package/dist/components/media/video-player/playlist-item.js +0 -37
- package/dist/components/media/video-player/video.js +0 -197
- package/dist/components/navigation/breadcrumb/breadcrumb.js +0 -109
- package/dist/components/navigation/breadcrumb/index.js +0 -1
- package/dist/components/navigation/index.js +0 -3
- package/dist/components/navigation/inner/index.js +0 -1
- package/dist/components/navigation/inner/inner.js +0 -187
- package/dist/components/navigation/tabs/index.js +0 -1
- package/dist/components/navigation/tabs/tabs.js +0 -150
- package/dist/components/surfaces/accordion/accordion.js +0 -47
- package/dist/components/surfaces/accordion/index.js +0 -1
- package/dist/components/surfaces/calendar_date/calendar_date.js +0 -45
- package/dist/components/surfaces/calendar_date/index.js +0 -1
- package/dist/components/surfaces/carousel/card/card.js +0 -96
- package/dist/components/surfaces/carousel/card/index.js +0 -1
- package/dist/components/surfaces/carousel/index.js +0 -1
- package/dist/components/surfaces/comment/comment.js +0 -188
- package/dist/components/surfaces/comment/helpers.js +0 -26
- package/dist/components/surfaces/comment/index.js +0 -1
- package/dist/components/surfaces/drawer/drawer.js +0 -130
- package/dist/components/surfaces/drawer/index.js +0 -1
- package/dist/components/surfaces/index.js +0 -9
- package/dist/components/surfaces/message/index.js +0 -1
- package/dist/components/surfaces/message/message.js +0 -44
- package/dist/components/surfaces/modal/index.js +0 -1
- package/dist/components/surfaces/modal/modal.js +0 -127
- package/dist/components/surfaces/portal/index.js +0 -1
- package/dist/components/surfaces/portal/portal.js +0 -26
- package/dist/components/surfaces/post/index.js +0 -1
- package/dist/components/surfaces/post/post.js +0 -230
- package/dist/components/table/index.js +0 -1
- package/dist/components/table/table/index.js +0 -1
- package/dist/components/table/table/table.js +0 -184
- package/dist/emoji/emojis.json +0 -17577
- package/dist/icons/arrow/arrow_all.js +0 -6
- package/dist/icons/arrow/arrow_all_diagonal.js +0 -6
- package/dist/icons/arrow/arrow_both_downwards.js +0 -6
- package/dist/icons/arrow/arrow_both_upwards.js +0 -6
- package/dist/icons/arrow/arrow_circle_left.js +0 -6
- package/dist/icons/arrow/arrow_circle_left_double.js +0 -6
- package/dist/icons/arrow/arrow_circle_left_double_alert.js +0 -8
- package/dist/icons/arrow/arrow_circle_right.js +0 -6
- package/dist/icons/arrow/arrow_circle_right_double.js +0 -6
- package/dist/icons/arrow/arrow_circle_right_double_alert.js +0 -6
- package/dist/icons/arrow/arrow_diagonal_down_left.js +0 -6
- package/dist/icons/arrow/arrow_diagonal_down_left_circle.js +0 -6
- package/dist/icons/arrow/arrow_diagonal_down_right.js +0 -6
- package/dist/icons/arrow/arrow_diagonal_down_right_circle.js +0 -6
- package/dist/icons/arrow/arrow_diagonal_up_left.js +0 -6
- package/dist/icons/arrow/arrow_diagonal_up_left_circle.js +0 -6
- package/dist/icons/arrow/arrow_diagonal_up_right.js +0 -6
- package/dist/icons/arrow/arrow_diagonal_up_right_circle.js +0 -6
- package/dist/icons/arrow/arrow_down.js +0 -6
- package/dist/icons/arrow/arrow_down_bold.js +0 -6
- package/dist/icons/arrow/arrow_down_circle.js +0 -6
- package/dist/icons/arrow/arrow_left.js +0 -6
- package/dist/icons/arrow/arrow_left_bold.js +0 -6
- package/dist/icons/arrow/arrow_left_circle.js +0 -6
- package/dist/icons/arrow/arrow_left_curved.js +0 -6
- package/dist/icons/arrow/arrow_left_curved_circle.js +0 -6
- package/dist/icons/arrow/arrow_right.js +0 -6
- package/dist/icons/arrow/arrow_right_bold.js +0 -6
- package/dist/icons/arrow/arrow_right_circle.js +0 -6
- package/dist/icons/arrow/arrow_right_curved.js +0 -6
- package/dist/icons/arrow/arrow_right_curved_circle.js +0 -6
- package/dist/icons/arrow/arrow_up.js +0 -6
- package/dist/icons/arrow/arrow_up_bold.js +0 -6
- package/dist/icons/arrow/arrow_up_circle.js +0 -6
- package/dist/icons/arrow/chevron_down.js +0 -6
- package/dist/icons/arrow/chevron_down_circle.js +0 -6
- package/dist/icons/arrow/chevron_down_double.js +0 -6
- package/dist/icons/arrow/chevron_down_double_circle.js +0 -6
- package/dist/icons/arrow/chevron_left.js +0 -6
- package/dist/icons/arrow/chevron_left_circle.js +0 -6
- package/dist/icons/arrow/chevron_left_double.js +0 -6
- package/dist/icons/arrow/chevron_left_double_circle.js +0 -6
- package/dist/icons/arrow/chevron_right.js +0 -6
- package/dist/icons/arrow/chevron_right_circle.js +0 -6
- package/dist/icons/arrow/chevron_right_double.js +0 -6
- package/dist/icons/arrow/chevron_right_double_circle.js +0 -6
- package/dist/icons/arrow/chevron_scroll.js +0 -6
- package/dist/icons/arrow/chevron_up.js +0 -6
- package/dist/icons/arrow/chevron_up_circle.js +0 -6
- package/dist/icons/arrow/chevron_up_double.js +0 -6
- package/dist/icons/arrow/chevron_up_double_circle.js +0 -6
- package/dist/icons/arrow/forward_all.js +0 -6
- package/dist/icons/arrow/forward_all_bold.js +0 -6
- package/dist/icons/arrow/forward_bold.js +0 -6
- package/dist/icons/arrow/index.js +0 -62
- package/dist/icons/arrow/redo.js +0 -6
- package/dist/icons/arrow/redo_bold.js +0 -6
- package/dist/icons/arrow/reply.js +0 -6
- package/dist/icons/arrow/reply_all.js +0 -6
- package/dist/icons/arrow/reply_all_bold.js +0 -6
- package/dist/icons/arrow/reply_bold.js +0 -6
- package/dist/icons/arrow/undo.js +0 -6
- package/dist/icons/arrow/undo_bold.js +0 -6
- package/dist/icons/audio_video/drag_indicator.js +0 -6
- package/dist/icons/audio_video/eject.js +0 -6
- package/dist/icons/audio_video/equalizer.js +0 -6
- package/dist/icons/audio_video/fast_forward.js +0 -6
- package/dist/icons/audio_video/fast_forward_30.js +0 -6
- package/dist/icons/audio_video/fullscreen.js +0 -6
- package/dist/icons/audio_video/headphones.js +0 -6
- package/dist/icons/audio_video/index.js +0 -38
- package/dist/icons/audio_video/library_add.js +0 -6
- package/dist/icons/audio_video/library_delay.js +0 -6
- package/dist/icons/audio_video/library_music.js +0 -6
- package/dist/icons/audio_video/library_queue.js +0 -6
- package/dist/icons/audio_video/microphone.js +0 -6
- package/dist/icons/audio_video/musical_note.js +0 -6
- package/dist/icons/audio_video/next.js +0 -6
- package/dist/icons/audio_video/pause.js +0 -6
- package/dist/icons/audio_video/pause_circle.js +0 -6
- package/dist/icons/audio_video/play.js +0 -6
- package/dist/icons/audio_video/play_circle.js +0 -6
- package/dist/icons/audio_video/play_display.js +0 -6
- package/dist/icons/audio_video/play_pause.js +0 -6
- package/dist/icons/audio_video/play_solid.js +0 -6
- package/dist/icons/audio_video/player_list.js +0 -6
- package/dist/icons/audio_video/player_list_add.js +0 -6
- package/dist/icons/audio_video/player_list_play.js +0 -6
- package/dist/icons/audio_video/previous.js +0 -6
- package/dist/icons/audio_video/radio.js +0 -6
- package/dist/icons/audio_video/record.js +0 -6
- package/dist/icons/audio_video/repeat.js +0 -6
- package/dist/icons/audio_video/rewind.js +0 -6
- package/dist/icons/audio_video/rewind_30.js +0 -6
- package/dist/icons/audio_video/shuffle.js +0 -6
- package/dist/icons/audio_video/sound_wave.js +0 -6
- package/dist/icons/audio_video/stop.js +0 -6
- package/dist/icons/audio_video/stop_circle.js +0 -6
- package/dist/icons/audio_video/subscriptions.js +0 -6
- package/dist/icons/audio_video/tuner.js +0 -6
- package/dist/icons/audio_video/volume.js +0 -6
- package/dist/icons/audio_video/volume_high.js +0 -6
- package/dist/icons/audio_video/volume_low.js +0 -6
- package/dist/icons/audio_video/volume_slash.js +0 -6
- package/dist/icons/basic/aa_sansserif.js +0 -7
- package/dist/icons/basic/aa_serif.js +0 -7
- package/dist/icons/basic/anchor.js +0 -8
- package/dist/icons/basic/bible.js +0 -6
- package/dist/icons/basic/bold.js +0 -6
- package/dist/icons/basic/book.js +0 -6
- package/dist/icons/basic/book_open.js +0 -6
- package/dist/icons/basic/bookmark.js +0 -6
- package/dist/icons/basic/bookmark_add.js +0 -6
- package/dist/icons/basic/bookmark_slash.js +0 -6
- package/dist/icons/basic/bookmarks.js +0 -6
- package/dist/icons/basic/books.js +0 -9
- package/dist/icons/basic/box.js +0 -6
- package/dist/icons/basic/briefcase.js +0 -6
- package/dist/icons/basic/browse_activity.js +0 -6
- package/dist/icons/basic/browser.js +0 -6
- package/dist/icons/basic/browser_slash.js +0 -6
- package/dist/icons/basic/calculator.js +0 -6
- package/dist/icons/basic/camera.js +0 -6
- package/dist/icons/basic/camera_add.js +0 -6
- package/dist/icons/basic/camera_slash.js +0 -6
- package/dist/icons/basic/checkmark.js +0 -6
- package/dist/icons/basic/checkmark_circle.js +0 -8
- package/dist/icons/basic/checkmark_filled.js +0 -6
- package/dist/icons/basic/checkmarks.js +0 -6
- package/dist/icons/basic/circle.js +0 -6
- package/dist/icons/basic/circle_slash.js +0 -8
- package/dist/icons/basic/clear_text_style.js +0 -6
- package/dist/icons/basic/close.js +0 -6
- package/dist/icons/basic/close_circle.js +0 -6
- package/dist/icons/basic/close_filled.js +0 -6
- package/dist/icons/basic/copy.js +0 -6
- package/dist/icons/basic/delete.js +0 -6
- package/dist/icons/basic/detail.js +0 -6
- package/dist/icons/basic/dot.js +0 -6
- package/dist/icons/basic/download.js +0 -6
- package/dist/icons/basic/download_arrow.js +0 -6
- package/dist/icons/basic/droplet.js +0 -8
- package/dist/icons/basic/ellipsis_horizontal.js +0 -6
- package/dist/icons/basic/ellipsis_horizontal_circle.js +0 -6
- package/dist/icons/basic/ellipsis_vertical.js +0 -6
- package/dist/icons/basic/ellipsis_vertical_circle.js +0 -6
- package/dist/icons/basic/eye.js +0 -6
- package/dist/icons/basic/eye_slash.js +0 -6
- package/dist/icons/basic/fingerprint.js +0 -6
- package/dist/icons/basic/flag.js +0 -6
- package/dist/icons/basic/flag_wave.js +0 -6
- package/dist/icons/basic/flag_wave_filled.js +0 -6
- package/dist/icons/basic/flame.js +0 -6
- package/dist/icons/basic/gauge.js +0 -6
- package/dist/icons/basic/glasses.js +0 -6
- package/dist/icons/basic/graduation_cap.js +0 -6
- package/dist/icons/basic/hashmark.js +0 -6
- package/dist/icons/basic/heart.js +0 -6
- package/dist/icons/basic/heart_slash.js +0 -6
- package/dist/icons/basic/highlighter.js +0 -6
- package/dist/icons/basic/home.js +0 -6
- package/dist/icons/basic/image.js +0 -6
- package/dist/icons/basic/inbox.js +0 -6
- package/dist/icons/basic/index.js +0 -131
- package/dist/icons/basic/italic.js +0 -6
- package/dist/icons/basic/layers.js +0 -6
- package/dist/icons/basic/lightening.js +0 -6
- package/dist/icons/basic/lightening_slash.js +0 -6
- package/dist/icons/basic/link.js +0 -6
- package/dist/icons/basic/link_slash.js +0 -6
- package/dist/icons/basic/loudspeaker.js +0 -6
- package/dist/icons/basic/maximize.js +0 -6
- package/dist/icons/basic/menu.js +0 -6
- package/dist/icons/basic/menu_circle.js +0 -6
- package/dist/icons/basic/menu_dots.js +0 -6
- package/dist/icons/basic/microphone_slash.js +0 -6
- package/dist/icons/basic/minimize.js +0 -6
- package/dist/icons/basic/minus.js +0 -6
- package/dist/icons/basic/minus_circle.js +0 -6
- package/dist/icons/basic/move_item.js +0 -6
- package/dist/icons/basic/new.js +0 -6
- package/dist/icons/basic/newspaper.js +0 -6
- package/dist/icons/basic/node.js +0 -6
- package/dist/icons/basic/note_pad.js +0 -7
- package/dist/icons/basic/options.js +0 -6
- package/dist/icons/basic/paint_brush.js +0 -6
- package/dist/icons/basic/paperclip.js +0 -6
- package/dist/icons/basic/paperclip_slash.js +0 -6
- package/dist/icons/basic/pencil.js +0 -6
- package/dist/icons/basic/pencil_pad.js +0 -6
- package/dist/icons/basic/plus.js +0 -6
- package/dist/icons/basic/plus_circle.js +0 -6
- package/dist/icons/basic/presentation.js +0 -6
- package/dist/icons/basic/printer.js +0 -6
- package/dist/icons/basic/profile.js +0 -6
- package/dist/icons/basic/profile_check.js +0 -6
- package/dist/icons/basic/pulse.js +0 -6
- package/dist/icons/basic/qr_code.js +0 -6
- package/dist/icons/basic/resize.js +0 -8
- package/dist/icons/basic/scan.js +0 -6
- package/dist/icons/basic/scissors.js +0 -6
- package/dist/icons/basic/screenshot.js +0 -6
- package/dist/icons/basic/search.js +0 -6
- package/dist/icons/basic/select_item.js +0 -7
- package/dist/icons/basic/settings.js +0 -6
- package/dist/icons/basic/share.js +0 -6
- package/dist/icons/basic/share_external.js +0 -6
- package/dist/icons/basic/square.js +0 -6
- package/dist/icons/basic/star.js +0 -6
- package/dist/icons/basic/star_circle.js +0 -6
- package/dist/icons/basic/star_filled.js +0 -6
- package/dist/icons/basic/star_filled_half.js +0 -6
- package/dist/icons/basic/star_slash.js +0 -6
- package/dist/icons/basic/sticker.js +0 -6
- package/dist/icons/basic/strikethrough.js +0 -6
- package/dist/icons/basic/subtask.js +0 -7
- package/dist/icons/basic/tax.js +0 -9
- package/dist/icons/basic/text_bg_color.js +0 -6
- package/dist/icons/basic/text_color.js +0 -6
- package/dist/icons/basic/textbox.js +0 -6
- package/dist/icons/basic/thumbs_down.js +0 -6
- package/dist/icons/basic/thumbs_up.js +0 -6
- package/dist/icons/basic/thumbs_up_filled.js +0 -6
- package/dist/icons/basic/toggle_left.js +0 -6
- package/dist/icons/basic/toggle_right.js +0 -6
- package/dist/icons/basic/translate.js +0 -6
- package/dist/icons/basic/trash.js +0 -6
- package/dist/icons/basic/trash_slash.js +0 -6
- package/dist/icons/basic/underline.js +0 -6
- package/dist/icons/basic/upload.js +0 -6
- package/dist/icons/basic/video.js +0 -6
- package/dist/icons/basic/video_add.js +0 -7
- package/dist/icons/basic/video_slash.js +0 -6
- package/dist/icons/basic/wrench.js +0 -6
- package/dist/icons/basic/zoom_in.js +0 -6
- package/dist/icons/basic/zoom_out.js +0 -6
- package/dist/icons/data/bar_chart.js +0 -6
- package/dist/icons/data/bar_chart_downward.js +0 -6
- package/dist/icons/data/bar_chart_downward_outline.js +0 -6
- package/dist/icons/data/bar_chart_upward.js +0 -6
- package/dist/icons/data/bar_chart_upward_outline.js +0 -6
- package/dist/icons/data/candlestick_chart.js +0 -6
- package/dist/icons/data/four_circles.js +0 -6
- package/dist/icons/data/index.js +0 -20
- package/dist/icons/data/legend_toggle.js +0 -6
- package/dist/icons/data/line_chart.js +0 -6
- package/dist/icons/data/line_chart_area.js +0 -6
- package/dist/icons/data/line_chart_area_shaded.js +0 -6
- package/dist/icons/data/line_chart_double.js +0 -6
- package/dist/icons/data/line_chart_downward.js +0 -6
- package/dist/icons/data/line_chart_node.js +0 -6
- package/dist/icons/data/line_chart_outline.js +0 -6
- package/dist/icons/data/line_chart_search.js +0 -6
- package/dist/icons/data/line_chart_stars.js +0 -6
- package/dist/icons/data/line_chart_upward.js +0 -6
- package/dist/icons/data/pie_chart.js +0 -7
- package/dist/icons/data/tree.js +0 -6
- package/dist/icons/email/index.js +0 -8
- package/dist/icons/email/mail.js +0 -6
- package/dist/icons/email/mail_check.js +0 -6
- package/dist/icons/email/mail_minus.js +0 -6
- package/dist/icons/email/mail_send.js +0 -6
- package/dist/icons/email/send.js +0 -6
- package/dist/icons/email/send_close.js +0 -6
- package/dist/icons/email/send_schedule.js +0 -6
- package/dist/icons/email/send_text.js +0 -6
- package/dist/icons/emoji/emoji_add.js +0 -6
- package/dist/icons/emoji/index.js +0 -6
- package/dist/icons/emoji/laughing.js +0 -6
- package/dist/icons/emoji/neutral.js +0 -6
- package/dist/icons/emoji/sad.js +0 -6
- package/dist/icons/emoji/shocked.js +0 -6
- package/dist/icons/emoji/smile.js +0 -6
- package/dist/icons/file/clipboard.js +0 -6
- package/dist/icons/file/clipboard_check.js +0 -6
- package/dist/icons/file/clipboard_close.js +0 -6
- package/dist/icons/file/clipboard_minus.js +0 -6
- package/dist/icons/file/clipboard_plus.js +0 -6
- package/dist/icons/file/clipboard_text.js +0 -6
- package/dist/icons/file/file.js +0 -6
- package/dist/icons/file/file_add.js +0 -6
- package/dist/icons/file/file_check.js +0 -6
- package/dist/icons/file/file_close.js +0 -6
- package/dist/icons/file/file_code.js +0 -6
- package/dist/icons/file/file_download.js +0 -6
- package/dist/icons/file/file_draft.js +0 -6
- package/dist/icons/file/file_gear.js +0 -7
- package/dist/icons/file/file_minus.js +0 -6
- package/dist/icons/file/file_plus.js +0 -6
- package/dist/icons/file/file_scan.js +0 -6
- package/dist/icons/file/file_shred.js +0 -6
- package/dist/icons/file/file_text.js +0 -6
- package/dist/icons/file/file_upload.js +0 -6
- package/dist/icons/file/folder.js +0 -6
- package/dist/icons/file/folder_add.js +0 -6
- package/dist/icons/file/folder_arrow.js +0 -6
- package/dist/icons/file/folder_check.js +0 -6
- package/dist/icons/file/folder_close.js +0 -6
- package/dist/icons/file/folder_cloud.js +0 -6
- package/dist/icons/file/folder_gear.js +0 -7
- package/dist/icons/file/folder_minus.js +0 -6
- package/dist/icons/file/folder_music.js +0 -6
- package/dist/icons/file/folder_open.js +0 -6
- package/dist/icons/file/folder_plus.js +0 -6
- package/dist/icons/file/folder_zip.js +0 -6
- package/dist/icons/file/index.js +0 -36
- package/dist/icons/file/note.js +0 -6
- package/dist/icons/file/note_text.js +0 -6
- package/dist/icons/file/pdf.js +0 -6
- package/dist/icons/file/photo.js +0 -6
- package/dist/icons/finance/bitcoin.js +0 -6
- package/dist/icons/finance/coins.js +0 -10
- package/dist/icons/finance/credit_card.js +0 -6
- package/dist/icons/finance/credit_card_add.js +0 -6
- package/dist/icons/finance/credit_card_face.js +0 -6
- package/dist/icons/finance/credit_card_member.js +0 -6
- package/dist/icons/finance/credit_card_outcome.js +0 -6
- package/dist/icons/finance/credit_card_scan.js +0 -6
- package/dist/icons/finance/credit_card_share.js +0 -6
- package/dist/icons/finance/credit_card_slash.js +0 -6
- package/dist/icons/finance/currency_exchange.js +0 -6
- package/dist/icons/finance/dollar.js +0 -6
- package/dist/icons/finance/ethereum.js +0 -6
- package/dist/icons/finance/index.js +0 -16
- package/dist/icons/finance/paypass.js +0 -6
- package/dist/icons/finance/strongbox.js +0 -6
- package/dist/icons/finance/wallet.js +0 -6
- package/dist/icons/index.js +0 -22
- package/dist/icons/layout/block_align_bottom.js +0 -6
- package/dist/icons/layout/block_align_center.js +0 -6
- package/dist/icons/layout/block_align_left.js +0 -6
- package/dist/icons/layout/block_align_middle.js +0 -6
- package/dist/icons/layout/block_align_right.js +0 -6
- package/dist/icons/layout/block_align_top.js +0 -6
- package/dist/icons/layout/block_horizontal.js +0 -6
- package/dist/icons/layout/block_vertical.js +0 -6
- package/dist/icons/layout/edit_shape.js +0 -6
- package/dist/icons/layout/elements.js +0 -6
- package/dist/icons/layout/elements_add.js +0 -6
- package/dist/icons/layout/elements_filled.js +0 -6
- package/dist/icons/layout/elements_masonry.js +0 -6
- package/dist/icons/layout/frame.js +0 -6
- package/dist/icons/layout/frame_stack.js +0 -6
- package/dist/icons/layout/grid.js +0 -6
- package/dist/icons/layout/grid_column_three.js +0 -6
- package/dist/icons/layout/grid_column_two.js +0 -6
- package/dist/icons/layout/grid_dynamic.js +0 -6
- package/dist/icons/layout/grid_frame.js +0 -6
- package/dist/icons/layout/grid_row_three.js +0 -6
- package/dist/icons/layout/grid_row_two.js +0 -6
- package/dist/icons/layout/grid_six.js +0 -6
- package/dist/icons/layout/grid_small.js +0 -6
- package/dist/icons/layout/iframe.js +0 -6
- package/dist/icons/layout/index.js +0 -44
- package/dist/icons/layout/kanban.js +0 -6
- package/dist/icons/layout/layout.js +0 -6
- package/dist/icons/layout/list.js +0 -6
- package/dist/icons/layout/list_filled.js +0 -11
- package/dist/icons/layout/padding.js +0 -6
- package/dist/icons/layout/page_break.js +0 -6
- package/dist/icons/layout/rotate_left.js +0 -6
- package/dist/icons/layout/rotate_right.js +0 -6
- package/dist/icons/layout/ruler.js +0 -6
- package/dist/icons/layout/segment.js +0 -6
- package/dist/icons/layout/select_area.js +0 -6
- package/dist/icons/layout/select_boundary.js +0 -6
- package/dist/icons/layout/sidebar_left.js +0 -6
- package/dist/icons/layout/sidebar_right.js +0 -6
- package/dist/icons/layout/slides.js +0 -6
- package/dist/icons/layout/slides_horizontal.js +0 -6
- package/dist/icons/layout/slides_vertical.js +0 -11
- package/dist/icons/layout/stack.js +0 -6
- package/dist/icons/layout/text.js +0 -6
- package/dist/icons/maps/atlas.js +0 -6
- package/dist/icons/maps/compass.js +0 -6
- package/dist/icons/maps/direction.js +0 -6
- package/dist/icons/maps/direction_angled.js +0 -6
- package/dist/icons/maps/globe.js +0 -6
- package/dist/icons/maps/globe_slash.js +0 -6
- package/dist/icons/maps/index.js +0 -22
- package/dist/icons/maps/location.js +0 -6
- package/dist/icons/maps/location_slash.js +0 -6
- package/dist/icons/maps/map.js +0 -6
- package/dist/icons/maps/marker.js +0 -6
- package/dist/icons/maps/panorama.js +0 -6
- package/dist/icons/maps/pin.js +0 -6
- package/dist/icons/maps/pin_arrow.js +0 -6
- package/dist/icons/maps/pin_location.js +0 -6
- package/dist/icons/maps/pin_plus.js +0 -6
- package/dist/icons/maps/pin_question.js +0 -6
- package/dist/icons/maps/pin_slash.js +0 -6
- package/dist/icons/maps/push_pin.js +0 -6
- package/dist/icons/maps/push_pin_filled.js +0 -6
- package/dist/icons/maps/push_pin_slash.js +0 -6
- package/dist/icons/maps/radar.js +0 -6
- package/dist/icons/maps/route.js +0 -6
- package/dist/icons/message/bubble.js +0 -6
- package/dist/icons/message/bubble_question.js +0 -6
- package/dist/icons/message/comment.js +0 -6
- package/dist/icons/message/comment_add.js +0 -6
- package/dist/icons/message/comment_check.js +0 -6
- package/dist/icons/message/comment_close.js +0 -6
- package/dist/icons/message/comment_minus.js +0 -6
- package/dist/icons/message/comment_text.js +0 -6
- package/dist/icons/message/index.js +0 -8
- package/dist/icons/misc/advertisement.js +0 -6
- package/dist/icons/misc/atom.js +0 -6
- package/dist/icons/misc/bone.js +0 -6
- package/dist/icons/misc/brightness_high.js +0 -6
- package/dist/icons/misc/brightness_low.js +0 -6
- package/dist/icons/misc/contrast.js +0 -6
- package/dist/icons/misc/crosshairs.js +0 -6
- package/dist/icons/misc/crown.js +0 -6
- package/dist/icons/misc/footprint.js +0 -6
- package/dist/icons/misc/form.js +0 -6
- package/dist/icons/misc/funnel.js +0 -6
- package/dist/icons/misc/index.js +0 -25
- package/dist/icons/misc/infinite.js +0 -6
- package/dist/icons/misc/insert_button.js +0 -6
- package/dist/icons/misc/light_bulb.js +0 -6
- package/dist/icons/misc/moon.js +0 -6
- package/dist/icons/misc/nut.js +0 -6
- package/dist/icons/misc/planet.js +0 -6
- package/dist/icons/misc/plus_thick.js +0 -6
- package/dist/icons/misc/pocket.js +0 -6
- package/dist/icons/misc/rocket.js +0 -6
- package/dist/icons/misc/soup.js +0 -10
- package/dist/icons/misc/sun.js +0 -6
- package/dist/icons/misc/toy_horse.js +0 -6
- package/dist/icons/misc/trophy.js +0 -6
- package/dist/icons/misc/watercloset.js +0 -6
- package/dist/icons/notifications/alert_circle.js +0 -6
- package/dist/icons/notifications/alert_octogon.js +0 -6
- package/dist/icons/notifications/alert_triangle.js +0 -6
- package/dist/icons/notifications/app_notification.js +0 -6
- package/dist/icons/notifications/bell.js +0 -6
- package/dist/icons/notifications/bell_alert.js +0 -6
- package/dist/icons/notifications/bell_checkmark.js +0 -6
- package/dist/icons/notifications/bell_minus.js +0 -6
- package/dist/icons/notifications/bell_plus.js +0 -6
- package/dist/icons/notifications/bell_ring.js +0 -8
- package/dist/icons/notifications/bell_slash.js +0 -6
- package/dist/icons/notifications/close_octogon.js +0 -6
- package/dist/icons/notifications/index.js +0 -14
- package/dist/icons/notifications/information.js +0 -6
- package/dist/icons/notifications/minus_octogon.js +0 -6
- package/dist/icons/notifications/question_circle.js +0 -6
- package/dist/icons/people/group.js +0 -6
- package/dist/icons/people/group_add.js +0 -6
- package/dist/icons/people/group_chat.js +0 -8
- package/dist/icons/people/group_remove.js +0 -6
- package/dist/icons/people/group_send.js +0 -7
- package/dist/icons/people/groups.js +0 -6
- package/dist/icons/people/index.js +0 -13
- package/dist/icons/people/person.js +0 -6
- package/dist/icons/people/person_add.js +0 -6
- package/dist/icons/people/person_checkmark.js +0 -6
- package/dist/icons/people/person_circle.js +0 -8
- package/dist/icons/people/person_close.js +0 -8
- package/dist/icons/people/person_remove.js +0 -6
- package/dist/icons/people/person_slash.js +0 -8
- package/dist/icons/phone/index.js +0 -14
- package/dist/icons/phone/keypad.js +0 -6
- package/dist/icons/phone/phone.js +0 -6
- package/dist/icons/phone/phone_add.js +0 -6
- package/dist/icons/phone/phone_calling.js +0 -6
- package/dist/icons/phone/phone_check.js +0 -6
- package/dist/icons/phone/phone_close.js +0 -6
- package/dist/icons/phone/phone_decline.js +0 -6
- package/dist/icons/phone/phone_end.js +0 -6
- package/dist/icons/phone/phone_forwarded.js +0 -6
- package/dist/icons/phone/phone_hash.js +0 -6
- package/dist/icons/phone/phone_incoming.js +0 -6
- package/dist/icons/phone/phone_missed.js +0 -6
- package/dist/icons/phone/phone_outgoing.js +0 -6
- package/dist/icons/phone/phone_pause.js +0 -6
- package/dist/icons/phone/phone_slash.js +0 -6
- package/dist/icons/phone/voicemail.js +0 -6
- package/dist/icons/security/index.js +0 -11
- package/dist/icons/security/key.js +0 -6
- package/dist/icons/security/key_slash.js +0 -6
- package/dist/icons/security/lock.js +0 -6
- package/dist/icons/security/lock_circle.js +0 -6
- package/dist/icons/security/lock_open.js +0 -6
- package/dist/icons/security/lock_slash.js +0 -6
- package/dist/icons/security/shield.js +0 -6
- package/dist/icons/security/shield_checkmark.js +0 -6
- package/dist/icons/security/shield_lock.js +0 -6
- package/dist/icons/security/shield_slash.js +0 -6
- package/dist/icons/security/verified.js +0 -6
- package/dist/icons/shopping/basket.js +0 -6
- package/dist/icons/shopping/cart.js +0 -6
- package/dist/icons/shopping/cart_filled.js +0 -6
- package/dist/icons/shopping/coupon.js +0 -6
- package/dist/icons/shopping/coupon_cut.js +0 -6
- package/dist/icons/shopping/delivery.js +0 -6
- package/dist/icons/shopping/discount.js +0 -6
- package/dist/icons/shopping/gift.js +0 -6
- package/dist/icons/shopping/gift_bag.js +0 -6
- package/dist/icons/shopping/index.js +0 -15
- package/dist/icons/shopping/inventory.js +0 -6
- package/dist/icons/shopping/point_of_sale.js +0 -6
- package/dist/icons/shopping/shirt.js +0 -6
- package/dist/icons/shopping/tag.js +0 -6
- package/dist/icons/shopping/tag_diagonal.js +0 -6
- package/dist/icons/shopping/tote.js +0 -6
- package/dist/icons/special/index.js +0 -4
- package/dist/icons/special/upload_audio.js +0 -11
- package/dist/icons/special/upload_file.js +0 -6
- package/dist/icons/special/upload_image.js +0 -8
- package/dist/icons/special/upload_video.js +0 -9
- package/dist/icons/symbols/at.js +0 -6
- package/dist/icons/symbols/cc.js +0 -6
- package/dist/icons/symbols/cmd.js +0 -6
- package/dist/icons/symbols/facebook.js +0 -6
- package/dist/icons/symbols/google.js +0 -9
- package/dist/icons/symbols/hash.js +0 -6
- package/dist/icons/symbols/index.js +0 -9
- package/dist/icons/symbols/instagram.js +0 -18
- package/dist/icons/symbols/messenger.js +0 -12
- package/dist/icons/symbols/twitter.js +0 -6
- package/dist/icons/technology/battery.js +0 -6
- package/dist/icons/technology/battery_100.js +0 -6
- package/dist/icons/technology/battery_20.js +0 -6
- package/dist/icons/technology/battery_40.js +0 -6
- package/dist/icons/technology/battery_60.js +0 -6
- package/dist/icons/technology/battery_80.js +0 -6
- package/dist/icons/technology/battery_charging.js +0 -6
- package/dist/icons/technology/battery_slash.js +0 -6
- package/dist/icons/technology/devices.js +0 -6
- package/dist/icons/technology/floppy_disk.js +0 -6
- package/dist/icons/technology/index.js +0 -17
- package/dist/icons/technology/iphone.js +0 -6
- package/dist/icons/technology/laptop.js +0 -6
- package/dist/icons/technology/mobile.js +0 -6
- package/dist/icons/technology/monitor.js +0 -6
- package/dist/icons/technology/server.js +0 -6
- package/dist/icons/technology/sim_card.js +0 -6
- package/dist/icons/technology/usb_stick.js +0 -6
- package/dist/icons/text/align_center.js +0 -6
- package/dist/icons/text/align_justified.js +0 -6
- package/dist/icons/text/align_left.js +0 -6
- package/dist/icons/text/align_right.js +0 -6
- package/dist/icons/text/code_block.js +0 -6
- package/dist/icons/text/divider.js +0 -6
- package/dist/icons/text/footnote.js +0 -8
- package/dist/icons/text/indent_decrease.js +0 -6
- package/dist/icons/text/indent_increase.js +0 -6
- package/dist/icons/text/index.js +0 -13
- package/dist/icons/text/list_ordered.js +0 -6
- package/dist/icons/text/list_unordered.js +0 -6
- package/dist/icons/text/quote.js +0 -6
- package/dist/icons/text/table.js +0 -6
- package/dist/icons/time/alarm.js +0 -6
- package/dist/icons/time/alarm_checkmark.js +0 -6
- package/dist/icons/time/alarm_minus.js +0 -6
- package/dist/icons/time/alarm_plus.js +0 -6
- package/dist/icons/time/alarm_slash.js +0 -6
- package/dist/icons/time/alarm_snooze.js +0 -6
- package/dist/icons/time/calendar.js +0 -6
- package/dist/icons/time/calendar_add.js +0 -6
- package/dist/icons/time/calendar_checkmark.js +0 -6
- package/dist/icons/time/calendar_close.js +0 -6
- package/dist/icons/time/calendar_dates.js +0 -6
- package/dist/icons/time/calendar_minus.js +0 -6
- package/dist/icons/time/calendar_plus.js +0 -6
- package/dist/icons/time/calendar_scroll.js +0 -8
- package/dist/icons/time/clock.js +0 -6
- package/dist/icons/time/clock_history.js +0 -6
- package/dist/icons/time/index.js +0 -19
- package/dist/icons/time/stopwatch.js +0 -6
- package/dist/icons/time/timer.js +0 -6
- package/dist/icons/time/watch.js +0 -6
- package/dist/styles/output.css +0 -1771
- package/dist/types/attributes.js +0 -1
- package/dist/types/index.js +0 -1
- package/dist/utils/date.js +0 -98
- package/dist/utils/function.js +0 -1
- package/dist/utils/index.js +0 -2
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { insertImage, insertNode, useLinkToolbarButton, useLinkToolbarButtonState, useListToolbarButton, useListToolbarButtonState, useMarkToolbarButton, useMarkToolbarButtonState, useEditorRef, ELEMENT_PARAGRAPH, } from '@udecode/plate';
|
|
4
|
-
import { Tooltip } from '../../';
|
|
5
|
-
import { AlignmentDropdown } from '../navbar/alignment_dropdown';
|
|
6
|
-
import { StyleDropdown } from '../navbar/style_dropdown';
|
|
7
|
-
import { Bold, Image, Italic, Link, ListOrdered, ListUnordered, Redo, Underline, Undo, } from '../../../icons';
|
|
8
|
-
import { ELEMENT_OL, ELEMENT_UL, MARK_BOLD, MARK_ITALIC, MARK_UNDERLINE, } from '../constants';
|
|
9
|
-
export const EditorBar = ({ handleUploadImage }) => {
|
|
10
|
-
const editorRef = useEditorRef('main');
|
|
11
|
-
const imageRef = React.useRef(null);
|
|
12
|
-
const boldState = useMarkToolbarButtonState({ nodeType: MARK_BOLD });
|
|
13
|
-
const { props: { pressed: currBold, onClick: handleBold }, } = useMarkToolbarButton(boldState);
|
|
14
|
-
const italicState = useMarkToolbarButtonState({ nodeType: MARK_ITALIC });
|
|
15
|
-
const { props: { pressed: currItalic, onClick: handleItalic }, } = useMarkToolbarButton(italicState);
|
|
16
|
-
const underlineState = useMarkToolbarButtonState({
|
|
17
|
-
nodeType: MARK_UNDERLINE,
|
|
18
|
-
});
|
|
19
|
-
const { props: { pressed: currUnderline, onClick: handleUnderline }, } = useMarkToolbarButton(underlineState);
|
|
20
|
-
const linkState = useLinkToolbarButtonState();
|
|
21
|
-
const { props: { pressed: currLink, onClick: handleLink }, } = useLinkToolbarButton(linkState);
|
|
22
|
-
const orderedListState = useListToolbarButtonState({ nodeType: ELEMENT_OL });
|
|
23
|
-
const { props: { pressed: currOrderedList, onClick: handleOrderedList }, } = useListToolbarButton(orderedListState);
|
|
24
|
-
const unorderedListState = useListToolbarButtonState({
|
|
25
|
-
nodeType: ELEMENT_UL,
|
|
26
|
-
});
|
|
27
|
-
const { props: { pressed: currUnorderedList, onClick: handleUnorderedList }, } = useListToolbarButton(unorderedListState);
|
|
28
|
-
const handleImageChange = async () => {
|
|
29
|
-
const files = imageRef.current?.files;
|
|
30
|
-
if (!files)
|
|
31
|
-
return;
|
|
32
|
-
const imageurl = await handleUploadImage(files);
|
|
33
|
-
if (imageurl) {
|
|
34
|
-
insertImage(editorRef, imageurl);
|
|
35
|
-
insertNode(editorRef, {
|
|
36
|
-
type: ELEMENT_PARAGRAPH,
|
|
37
|
-
children: [{ text: ' ' }],
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const handleRedo = () => editorRef.redo();
|
|
42
|
-
const handleUndo = () => editorRef.undo();
|
|
43
|
-
return (React.createElement(Menu, { "aria-label": "editor-navigation" },
|
|
44
|
-
React.createElement(MenuSection, null,
|
|
45
|
-
React.createElement(Tooltip, { content: "Undo", place: "top" },
|
|
46
|
-
React.createElement(MenuButton, { "$active": false, onClick: handleUndo },
|
|
47
|
-
React.createElement(Undo, { size: 24, color: "grey-5" }))),
|
|
48
|
-
React.createElement(Tooltip, { content: "Redo", place: "top" },
|
|
49
|
-
React.createElement(MenuButton, { "$active": false, onClick: handleRedo },
|
|
50
|
-
React.createElement(Redo, { size: 24, color: "grey-5" })))),
|
|
51
|
-
React.createElement(Divider, null),
|
|
52
|
-
React.createElement(MenuSection, null,
|
|
53
|
-
React.createElement(StyleDropdown, { editorRef: editorRef })),
|
|
54
|
-
React.createElement(Divider, null),
|
|
55
|
-
React.createElement(MenuSection, null,
|
|
56
|
-
React.createElement(MenuButton, { "$active": false, as: "div" },
|
|
57
|
-
React.createElement(AlignmentDropdown, { editorRef: editorRef }))),
|
|
58
|
-
React.createElement(Divider, null),
|
|
59
|
-
React.createElement(MenuSection, null,
|
|
60
|
-
React.createElement(Tooltip, { content: "Bold", place: "top" },
|
|
61
|
-
React.createElement(MenuButton, { "$active": currBold, onClick: handleBold },
|
|
62
|
-
React.createElement(Bold, { size: 24, color: "grey-5" }))),
|
|
63
|
-
React.createElement(Tooltip, { content: "Italic", place: "top" },
|
|
64
|
-
React.createElement(MenuButton, { "$active": currItalic, onClick: handleItalic },
|
|
65
|
-
React.createElement(Italic, { size: 24, color: "grey-5" }))),
|
|
66
|
-
React.createElement(Tooltip, { content: "Underline", place: "top" },
|
|
67
|
-
React.createElement(MenuButton, { "$active": currUnderline, onClick: handleUnderline },
|
|
68
|
-
React.createElement(Underline, { size: 24, color: "grey-5" })))),
|
|
69
|
-
React.createElement(Divider, null),
|
|
70
|
-
React.createElement(MenuSection, null,
|
|
71
|
-
React.createElement(Tooltip, { content: "Link", place: "top" },
|
|
72
|
-
React.createElement(MenuButton, { "$active": currLink, onClick: handleLink },
|
|
73
|
-
React.createElement(Link, { size: 24, color: "grey-5" }))),
|
|
74
|
-
React.createElement(Tooltip, { content: "Image", place: "top" },
|
|
75
|
-
React.createElement(MenuButton, { "$active": false, as: "label", onChange: handleImageChange },
|
|
76
|
-
React.createElement("div", null,
|
|
77
|
-
React.createElement("input", { accept: "image/*", ref: imageRef, style: { display: 'none' }, type: "file" }),
|
|
78
|
-
React.createElement(Image, { size: 24, color: "grey-5" }))))),
|
|
79
|
-
React.createElement(Divider, null),
|
|
80
|
-
React.createElement(MenuSection, null,
|
|
81
|
-
React.createElement(Tooltip, { content: "Unordered List", place: "top" },
|
|
82
|
-
React.createElement(MenuButton, { "$active": currUnorderedList, onClick: handleUnorderedList },
|
|
83
|
-
React.createElement(ListUnordered, { size: 24, color: "grey-5" }))),
|
|
84
|
-
React.createElement(Tooltip, { content: "Ordered List", place: "top" },
|
|
85
|
-
React.createElement(MenuButton, { "$active": currOrderedList, onClick: handleOrderedList },
|
|
86
|
-
React.createElement(ListOrdered, { size: 24, color: "grey-5" }))))));
|
|
87
|
-
};
|
|
88
|
-
const Menu = styled.nav `
|
|
89
|
-
display: flex;
|
|
90
|
-
gap: 12px;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
max-width: 1200px;
|
|
93
|
-
margin: 0;
|
|
94
|
-
padding: 14px 24px;
|
|
95
|
-
background-color: var(--color-white);
|
|
96
|
-
box-sizing: border-box;
|
|
97
|
-
border-radius: 8px 8px 0px 0px;
|
|
98
|
-
box-shadow: var(--elevation-1);
|
|
99
|
-
`;
|
|
100
|
-
const MenuSection = styled.div `
|
|
101
|
-
display: flex;
|
|
102
|
-
gap: 16px;
|
|
103
|
-
align-items: center;
|
|
104
|
-
width: fit-content;
|
|
105
|
-
flex-shrink: 0;
|
|
106
|
-
`;
|
|
107
|
-
export const MenuButton = styled.button `
|
|
108
|
-
padding: 2px;
|
|
109
|
-
border: none;
|
|
110
|
-
outline: none;
|
|
111
|
-
cursor: pointer;
|
|
112
|
-
box-sizing: border-box;
|
|
113
|
-
height: 28px;
|
|
114
|
-
width: 28px;
|
|
115
|
-
border-radius: 2px;
|
|
116
|
-
|
|
117
|
-
&:hover:not(:disabled) {
|
|
118
|
-
padding: 1px;
|
|
119
|
-
border: 1px solid var(--color-grey-8);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&:active:not(:disabled) {
|
|
123
|
-
background-color: var(--color-grey-9);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&:disabled {
|
|
127
|
-
background-color: var(--color-white) !important;
|
|
128
|
-
cursor: initial;
|
|
129
|
-
svg {
|
|
130
|
-
fill: var(--color-grey-7) !important;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
background-color: ${({ $active }) => $active ? 'var(--color-grey-9)' : 'transparent'};
|
|
135
|
-
`;
|
|
136
|
-
const Divider = styled.div `
|
|
137
|
-
width: 1px;
|
|
138
|
-
height: 28px;
|
|
139
|
-
background-color: var(--color-grey-9);
|
|
140
|
-
`;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { createPlugins, createHeadingPlugin, createIndentListPlugin, createImagePlugin, createTextIndentPlugin, createListPlugin, createMediaEmbedPlugin, createResetNodePlugin, createBoldPlugin, createCodePlugin, createFontBackgroundColorPlugin, createFontSizePlugin, createFontFamilyPlugin, createItalicPlugin, createStrikethroughPlugin, createSubscriptPlugin, createSuperscriptPlugin, createUnderlinePlugin, createAlignPlugin, createIndentPlugin, createLineHeightPlugin, createLinkPlugin, createExitBreakPlugin, createHistoryPlugin, createSelectOnBackspacePlugin, createSoftBreakPlugin, } from '@udecode/plate';
|
|
2
|
-
import { createParagraphPlugin, createHOnePlugin, createHTwoPlugin, createHThreePlugin, createHFourPlugin, createHFivePlugin, createHSixPlugin, } from '../plugins/blocks/text';
|
|
3
|
-
import { ELEMENT_PARAGRAPH, ELEMENT_H1, ELEMENT_H2, ELEMENT_H3, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, ELEMENT_OL, ELEMENT_UL, } from '../constants';
|
|
4
|
-
import { exitBreakPlugin } from '../plugins/utils/exitBreak';
|
|
5
|
-
import { LinkFloatingMenu } from '../plugins/leafs/link';
|
|
6
|
-
import { resetBlockTypePlugin } from '../plugins/utils/resetBlockType';
|
|
7
|
-
import { selectOnBackspace } from '../plugins/utils/selectOnBackspace';
|
|
8
|
-
import { softBreakPlugin } from '../plugins/utils/softBreak';
|
|
9
|
-
import { plateUI } from '../plugins/plate';
|
|
10
|
-
export const plugins = createPlugins([
|
|
11
|
-
createHeadingPlugin(),
|
|
12
|
-
createImagePlugin({
|
|
13
|
-
options: {
|
|
14
|
-
disableUploadInsert: true,
|
|
15
|
-
disableEmbedInsert: true,
|
|
16
|
-
},
|
|
17
|
-
}),
|
|
18
|
-
createTextIndentPlugin(),
|
|
19
|
-
createIndentListPlugin({
|
|
20
|
-
inject: {
|
|
21
|
-
props: {
|
|
22
|
-
validTypes: [
|
|
23
|
-
ELEMENT_PARAGRAPH,
|
|
24
|
-
ELEMENT_H1,
|
|
25
|
-
ELEMENT_H2,
|
|
26
|
-
ELEMENT_H3,
|
|
27
|
-
ELEMENT_H4,
|
|
28
|
-
ELEMENT_H5,
|
|
29
|
-
ELEMENT_H6,
|
|
30
|
-
ELEMENT_OL,
|
|
31
|
-
ELEMENT_UL,
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
}),
|
|
36
|
-
createListPlugin(),
|
|
37
|
-
createMediaEmbedPlugin(),
|
|
38
|
-
createParagraphPlugin(),
|
|
39
|
-
createHOnePlugin(),
|
|
40
|
-
createHTwoPlugin(),
|
|
41
|
-
createHThreePlugin(),
|
|
42
|
-
createHFourPlugin(),
|
|
43
|
-
createHFivePlugin(),
|
|
44
|
-
createHSixPlugin(),
|
|
45
|
-
createResetNodePlugin(),
|
|
46
|
-
createBoldPlugin(),
|
|
47
|
-
createCodePlugin(),
|
|
48
|
-
createFontBackgroundColorPlugin(),
|
|
49
|
-
createFontSizePlugin(),
|
|
50
|
-
createFontFamilyPlugin(),
|
|
51
|
-
createItalicPlugin(),
|
|
52
|
-
createStrikethroughPlugin(),
|
|
53
|
-
createSubscriptPlugin(),
|
|
54
|
-
createSuperscriptPlugin(),
|
|
55
|
-
createUnderlinePlugin(),
|
|
56
|
-
createAlignPlugin({
|
|
57
|
-
inject: {
|
|
58
|
-
props: {
|
|
59
|
-
validTypes: [
|
|
60
|
-
ELEMENT_PARAGRAPH,
|
|
61
|
-
ELEMENT_H1,
|
|
62
|
-
ELEMENT_H2,
|
|
63
|
-
ELEMENT_H3,
|
|
64
|
-
ELEMENT_H4,
|
|
65
|
-
ELEMENT_H5,
|
|
66
|
-
ELEMENT_H6,
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
}),
|
|
71
|
-
createIndentPlugin({
|
|
72
|
-
inject: {
|
|
73
|
-
props: {
|
|
74
|
-
validTypes: [ELEMENT_PARAGRAPH, ELEMENT_H1],
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
}),
|
|
78
|
-
createLineHeightPlugin(),
|
|
79
|
-
createLinkPlugin({
|
|
80
|
-
renderAfterEditable: LinkFloatingMenu,
|
|
81
|
-
}),
|
|
82
|
-
createExitBreakPlugin(exitBreakPlugin),
|
|
83
|
-
createHistoryPlugin(),
|
|
84
|
-
createResetNodePlugin(resetBlockTypePlugin),
|
|
85
|
-
createSelectOnBackspacePlugin(selectOnBackspace),
|
|
86
|
-
createSoftBreakPlugin(softBreakPlugin),
|
|
87
|
-
], {
|
|
88
|
-
components: plateUI,
|
|
89
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { Plate, PlateContent } from '@udecode/plate';
|
|
5
|
-
import { plugins } from './plugins';
|
|
6
|
-
import { EditorBar } from './navbar';
|
|
7
|
-
export const SimpleEditor = ({ editable, handleUploadImage, onChange, placeholder = '', previousContent = [
|
|
8
|
-
{
|
|
9
|
-
type: 'p',
|
|
10
|
-
children: [
|
|
11
|
-
{
|
|
12
|
-
text: '',
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
], }) => {
|
|
17
|
-
return (React.createElement(Plate, { id: "main", initialValue: previousContent, onChange: onChange, plugins: plugins },
|
|
18
|
-
React.createElement(Wrapper, null,
|
|
19
|
-
editable && React.createElement(EditorBar, { handleUploadImage: handleUploadImage }),
|
|
20
|
-
React.createElement(InnerWrapper, null,
|
|
21
|
-
React.createElement(PlateContent, { id: "main", autoFocus: true, placeholder: placeholder, readOnly: !editable, spellCheck: true })))));
|
|
22
|
-
};
|
|
23
|
-
const InnerWrapper = styled.div `
|
|
24
|
-
& > div {
|
|
25
|
-
padding: 24px;
|
|
26
|
-
min-height: 224px;
|
|
27
|
-
box-sizing: border-box;
|
|
28
|
-
|
|
29
|
-
& > div {
|
|
30
|
-
margin: 24px 0px;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
const Wrapper = styled.div `
|
|
35
|
-
position: relative;
|
|
36
|
-
max-width: 1200px;
|
|
37
|
-
width: 100%;
|
|
38
|
-
min-height: 224px;
|
|
39
|
-
border: 1px solid var(--color-grey-8);
|
|
40
|
-
border-radius: 8px;
|
|
41
|
-
background-color: var(--color-white);
|
|
42
|
-
|
|
43
|
-
* {
|
|
44
|
-
font-family: var(--font-inter);
|
|
45
|
-
outline: none;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.slate-bold {
|
|
49
|
-
font-weight: 700;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.slate-italic {
|
|
53
|
-
font-style: italic;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.slate-strikethrough {
|
|
57
|
-
text-decoration: line-through;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.slate-underline {
|
|
61
|
-
text-decoration: underline;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
li {
|
|
65
|
-
margin: 8px 0px;
|
|
66
|
-
color: var(--color-grey-3);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.slate-code {
|
|
70
|
-
& > * {
|
|
71
|
-
font-family: 'Roboto Mono';
|
|
72
|
-
& > * {
|
|
73
|
-
font-family: 'Roboto Mono';
|
|
74
|
-
& > * {
|
|
75
|
-
font-family: 'Roboto Mono';
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
background-color: var(--color-grey-9);
|
|
81
|
-
padding: 0.4em 0.4em;
|
|
82
|
-
font-size: 0.8em;
|
|
83
|
-
line-height: 0.8em;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
& > [data-slate-editor='true'] > * {
|
|
87
|
-
margin: 24px 0px;
|
|
88
|
-
}
|
|
89
|
-
`;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { styled } from 'styled-components';
|
|
4
|
-
import { Toast } from '../toast';
|
|
5
|
-
export const AnimatedToast = ({ message, type, onClose, animationDuration = 4, }) => {
|
|
6
|
-
const [toastIsClosed, setToastIsClosed] = React.useState(false);
|
|
7
|
-
const timer = React.useRef(null);
|
|
8
|
-
React.useEffect(() => {
|
|
9
|
-
timer.current = setTimeout(() => {
|
|
10
|
-
setToastIsClosed(true);
|
|
11
|
-
!!onClose && onClose();
|
|
12
|
-
}, animationDuration * 1000);
|
|
13
|
-
return () => {
|
|
14
|
-
clearTimeout(timer.current);
|
|
15
|
-
};
|
|
16
|
-
}, [animationDuration, onClose]);
|
|
17
|
-
return (React.createElement(Container, null,
|
|
18
|
-
React.createElement(ToastAnimation, { className: `${toastIsClosed ? 'toast-closed' : ''}` },
|
|
19
|
-
React.createElement(Toast, { content: message, type: type, isAnimated: true, animationDuration: animationDuration }))));
|
|
20
|
-
};
|
|
21
|
-
const Container = styled.div `
|
|
22
|
-
position: fixed;
|
|
23
|
-
z-index: 9999;
|
|
24
|
-
bottom: 16px;
|
|
25
|
-
right: 16px;
|
|
26
|
-
`;
|
|
27
|
-
const ToastAnimation = styled.div `
|
|
28
|
-
animation: slide-in 0.4s ease-in-out forwards;
|
|
29
|
-
|
|
30
|
-
&.toast-closed {
|
|
31
|
-
animation: slide-out 0.4s ease-in-out forwards;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@keyframes slide-out {
|
|
35
|
-
0% {
|
|
36
|
-
opacity: 1;
|
|
37
|
-
transform: translateX(0%);
|
|
38
|
-
}
|
|
39
|
-
100% {
|
|
40
|
-
opacity: 0;
|
|
41
|
-
transform: translateX(100%);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@keyframes slide-in {
|
|
46
|
-
0% {
|
|
47
|
-
opacity: 0;
|
|
48
|
-
transform: translateX(100%);
|
|
49
|
-
}
|
|
50
|
-
100% {
|
|
51
|
-
opacity: 1;
|
|
52
|
-
transform: translateX(0%);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AnimatedToast } from './animated_toast';
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { Close } from '../../../icons';
|
|
5
|
-
const colorLookup = {
|
|
6
|
-
blue: {
|
|
7
|
-
primary: 'var(--color-hue-blue-1)',
|
|
8
|
-
secondary: 'var(--color-hue-blue-2)',
|
|
9
|
-
bg: 'var(--color-hue-blue-3)',
|
|
10
|
-
},
|
|
11
|
-
green: {
|
|
12
|
-
primary: 'var(--color-green-3)',
|
|
13
|
-
secondary: 'var(--color-green-8)',
|
|
14
|
-
bg: 'var(--color-green-10)',
|
|
15
|
-
},
|
|
16
|
-
orange: {
|
|
17
|
-
primary: 'var(--color-hue-orange-1)',
|
|
18
|
-
secondary: 'var(--color-hue-orange-2)',
|
|
19
|
-
bg: 'var(--color-hue-orange-3)',
|
|
20
|
-
},
|
|
21
|
-
purple: {
|
|
22
|
-
primary: 'var(--color-hue-purple-1)',
|
|
23
|
-
secondary: 'var(--color-hue-purple-2)',
|
|
24
|
-
bg: 'var(--color-hue-purple-3)',
|
|
25
|
-
},
|
|
26
|
-
red: {
|
|
27
|
-
primary: 'var(--color-red-4)',
|
|
28
|
-
secondary: 'var(--color-red-9)',
|
|
29
|
-
bg: 'var(--color-red-10)',
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
export const Badge = ({ children, color, dot, onDismiss }) => {
|
|
33
|
-
const bgColor = colorLookup[color].bg;
|
|
34
|
-
const textColor = colorLookup[color].primary;
|
|
35
|
-
const borderColor = colorLookup[color].secondary;
|
|
36
|
-
return (React.createElement(Component, { "$bgColor": bgColor, "$borderColor": borderColor, "$textColor": textColor },
|
|
37
|
-
dot && React.createElement(Dot, { "$secondaryColor": textColor }),
|
|
38
|
-
children,
|
|
39
|
-
onDismiss && React.createElement(Close, { size: 16 })));
|
|
40
|
-
};
|
|
41
|
-
const Component = styled.div `
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
gap: 8px;
|
|
45
|
-
padding: 1px 7px;
|
|
46
|
-
border-radius: 32px;
|
|
47
|
-
background-color: ${({ $bgColor }) => $bgColor};
|
|
48
|
-
color: ${({ $textColor }) => $textColor};
|
|
49
|
-
border: 1px solid ${({ $borderColor }) => $borderColor};
|
|
50
|
-
font-family: var(--font-inter);
|
|
51
|
-
font-size: 12px;
|
|
52
|
-
font-weight: 500;
|
|
53
|
-
line-height: 16px;
|
|
54
|
-
user-select: none;
|
|
55
|
-
|
|
56
|
-
svg {
|
|
57
|
-
fill: currentColor;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
`;
|
|
61
|
-
const Dot = styled.div `
|
|
62
|
-
width: 8px;
|
|
63
|
-
height: 8px;
|
|
64
|
-
border-radius: 50%;
|
|
65
|
-
background-color: ${({ $secondaryColor }) => $secondaryColor};
|
|
66
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Badge } from './badge';
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { Styles } from '../../../common';
|
|
5
|
-
import { Box, Button, P } from '../../';
|
|
6
|
-
import { AlertCircle, AlertOctogon, AlertTriangle, Close, Information, } from '../../../icons';
|
|
7
|
-
export const Banner = ({ content, href, onClose, title, type, setContentInNewLine = false, additionalContent, sx, }) => {
|
|
8
|
-
const iconLookup = {
|
|
9
|
-
error: React.createElement(AlertOctogon, { size: 24 }),
|
|
10
|
-
info: React.createElement(Information, { size: 24 }),
|
|
11
|
-
success: React.createElement(AlertCircle, { size: 24 }),
|
|
12
|
-
warning: React.createElement(AlertTriangle, { size: 24 }),
|
|
13
|
-
};
|
|
14
|
-
return (React.createElement(Wrapper, { as: "output", "$dir": "row", "$gap": 8, "$type": type, "$sx": sx },
|
|
15
|
-
iconLookup[type],
|
|
16
|
-
React.createElement(Box, { "$dir": setContentInNewLine ? 'column' : 'row', "$gap": 4 },
|
|
17
|
-
React.createElement(P, { as: "span", "$semiBold": true }, title),
|
|
18
|
-
React.createElement(P, { as: "span", sx: setContentInNewLine ? 'margin-top: 12px;' : '' }, content),
|
|
19
|
-
additionalContent && React.createElement(P, { as: "span" }, additionalContent),
|
|
20
|
-
href && (React.createElement(P, { as: "a", href: href, "$color": "primary-blue-2" }, "Read more"))),
|
|
21
|
-
onClose && (React.createElement(Button, { icon: React.createElement(Close, { size: 24 }), onClick: onClose, type: "special" }))));
|
|
22
|
-
};
|
|
23
|
-
const Wrapper = styled.output `
|
|
24
|
-
width: 100%;
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
padding: 12px 16px;
|
|
27
|
-
display: flex;
|
|
28
|
-
background-color: ${({ $type }) => $type === 'error'
|
|
29
|
-
? 'var(--color-red-9)'
|
|
30
|
-
: $type === 'info'
|
|
31
|
-
? 'var(--color-blue-9)'
|
|
32
|
-
: $type === 'success'
|
|
33
|
-
? 'var(--color-green-9)'
|
|
34
|
-
: 'var(--color-orange-9)'};
|
|
35
|
-
border-bottom: 1px solid
|
|
36
|
-
${({ $type }) => $type === 'error'
|
|
37
|
-
? 'var(--color-red-4)'
|
|
38
|
-
: $type === 'info'
|
|
39
|
-
? 'var(--color-blue-4)'
|
|
40
|
-
: $type === 'success'
|
|
41
|
-
? 'var(--color-green-3)'
|
|
42
|
-
: 'var(--color-orange-5)'};
|
|
43
|
-
box-shadow: var(--elevation-2);
|
|
44
|
-
border-radius: var(--small);
|
|
45
|
-
|
|
46
|
-
& > svg {
|
|
47
|
-
fill: ${({ $type }) => $type === 'error'
|
|
48
|
-
? 'var(--color-red-4)'
|
|
49
|
-
: $type === 'info'
|
|
50
|
-
? 'var(--color-blue-4)'
|
|
51
|
-
: $type === 'success'
|
|
52
|
-
? 'var(--color-green-3)'
|
|
53
|
-
: 'var(--color-orange-5)'};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
a {
|
|
57
|
-
position: relative;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
|
|
60
|
-
&::after {
|
|
61
|
-
position: absolute;
|
|
62
|
-
content: '';
|
|
63
|
-
width: 100%;
|
|
64
|
-
height: 1px;
|
|
65
|
-
right: 0px;
|
|
66
|
-
left: 0px;
|
|
67
|
-
bottom: 0px;
|
|
68
|
-
background-color: var(--color-primary-blue-2);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
button {
|
|
73
|
-
padding: 0px;
|
|
74
|
-
margin-left: auto;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
${Styles.flex}
|
|
78
|
-
|
|
79
|
-
${({ $sx }) => ($sx ? $sx : '')}
|
|
80
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Banner } from './banner';
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { Close } from '../../../icons';
|
|
5
|
-
const colorLookup = {
|
|
6
|
-
'primary-blue': {
|
|
7
|
-
primary: 'var(--color-primary-blue-2)',
|
|
8
|
-
secondary: 'var(--color-white)',
|
|
9
|
-
text: 'var(--color-white)',
|
|
10
|
-
},
|
|
11
|
-
blue: {
|
|
12
|
-
primary: 'var(--color-blue-9)',
|
|
13
|
-
secondary: 'var(--color-blue-5)',
|
|
14
|
-
text: 'var(--color-grey-4)',
|
|
15
|
-
},
|
|
16
|
-
green: {
|
|
17
|
-
primary: 'var(--color-green-9)',
|
|
18
|
-
secondary: 'var(--color-green-5)',
|
|
19
|
-
text: 'var(--color-grey-4)',
|
|
20
|
-
},
|
|
21
|
-
grey: {
|
|
22
|
-
primary: 'var(--color-grey-9)',
|
|
23
|
-
secondary: 'var(--color-grey-4)',
|
|
24
|
-
text: 'var(--color-grey-4)',
|
|
25
|
-
},
|
|
26
|
-
orange: {
|
|
27
|
-
primary: 'var(--color-orange-9)',
|
|
28
|
-
secondary: 'var(--color-orange-5)',
|
|
29
|
-
text: 'var(--color-grey-4)',
|
|
30
|
-
},
|
|
31
|
-
purple: {
|
|
32
|
-
primary: 'var(--color-purple-9)',
|
|
33
|
-
secondary: 'var(--color-purple-5)',
|
|
34
|
-
text: 'var(--color-grey-4)',
|
|
35
|
-
},
|
|
36
|
-
red: {
|
|
37
|
-
primary: 'var(--color-red-9)',
|
|
38
|
-
secondary: 'var(--color-red-5)',
|
|
39
|
-
text: 'var(--color-grey-4)',
|
|
40
|
-
},
|
|
41
|
-
turquoise: {
|
|
42
|
-
primary: 'var(--color-turquoise-9)',
|
|
43
|
-
secondary: 'var(--color-turquoise-5)',
|
|
44
|
-
text: 'var(--color-grey-4)',
|
|
45
|
-
},
|
|
46
|
-
yellow: {
|
|
47
|
-
primary: 'var(--color-yellow-9)',
|
|
48
|
-
secondary: 'var(--color-yellow-9)',
|
|
49
|
-
text: 'var(--color-grey-4)',
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
export const Chip = ({ children, color, dot, onDismiss, size }) => {
|
|
53
|
-
const bgColor = colorLookup[color].primary;
|
|
54
|
-
const textColor = colorLookup[color].text;
|
|
55
|
-
const dotColor = colorLookup[color].secondary;
|
|
56
|
-
return (React.createElement(Component, { "$bgColor": bgColor, "$size": size, "$textColor": textColor },
|
|
57
|
-
dot && React.createElement(Dot, { "$secondaryColor": dotColor }),
|
|
58
|
-
children,
|
|
59
|
-
onDismiss && React.createElement(Close, { size: 16, onClick: onDismiss })));
|
|
60
|
-
};
|
|
61
|
-
const Component = styled.div `
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
gap: 8px;
|
|
65
|
-
border-radius: 32px;
|
|
66
|
-
background-color: ${({ $bgColor }) => $bgColor};
|
|
67
|
-
color: ${({ $textColor }) => $textColor};
|
|
68
|
-
font-family: var(--font-inter);
|
|
69
|
-
user-select: none;
|
|
70
|
-
|
|
71
|
-
svg {
|
|
72
|
-
fill: currentColor;
|
|
73
|
-
cursor: pointer;
|
|
74
|
-
}
|
|
75
|
-
${({ $size }) => $size === 'small'
|
|
76
|
-
? // small
|
|
77
|
-
`
|
|
78
|
-
padding: 4px 16px;
|
|
79
|
-
font-size: 12px;
|
|
80
|
-
line-height: 16px;
|
|
81
|
-
font-weight: 500;`
|
|
82
|
-
: // large
|
|
83
|
-
`
|
|
84
|
-
padding: 8px 16px;
|
|
85
|
-
font-size: 14px;
|
|
86
|
-
line-height: 20px;
|
|
87
|
-
font-weight: 600;`}
|
|
88
|
-
`;
|
|
89
|
-
const Dot = styled.div `
|
|
90
|
-
width: 8px;
|
|
91
|
-
height: 8px;
|
|
92
|
-
border-radius: 50%;
|
|
93
|
-
background-color: ${({ $secondaryColor }) => $secondaryColor};
|
|
94
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Chip } from './chip';
|
|
@@ -1,8 +0,0 @@
|
|
|
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';
|
|
8
|
-
export { AnimatedToast } from './animated_toast';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Loader } from './loader';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styled, { keyframes } from 'styled-components';
|
|
4
|
-
import { colorReference } from '../../../common';
|
|
5
|
-
export const Loader = ({ color = 'grey-1', inline, size = 16, sx, }) => {
|
|
6
|
-
let borderWidth = 3;
|
|
7
|
-
if (size > 96)
|
|
8
|
-
borderWidth = 10;
|
|
9
|
-
else if (size > 47)
|
|
10
|
-
borderWidth = 5;
|
|
11
|
-
else if (size > 23)
|
|
12
|
-
borderWidth = 4;
|
|
13
|
-
return (React.createElement(Component, { "$borderWidth": borderWidth, "$color": color, "$inline": !!inline, "$size": size, "$sx": sx }));
|
|
14
|
-
};
|
|
15
|
-
const spin = keyframes `
|
|
16
|
-
0% { transform: rotate(0deg); }
|
|
17
|
-
100% { transform: rotate(360deg); }
|
|
18
|
-
`;
|
|
19
|
-
const Component = styled.div `
|
|
20
|
-
border: 2px solid transparent;
|
|
21
|
-
border-radius: 50%;
|
|
22
|
-
animation: ${spin} 0.8s linear infinite;
|
|
23
|
-
|
|
24
|
-
border-width: ${({ $borderWidth }) => `${$borderWidth}px`};
|
|
25
|
-
border-color: ${({ $color }) => colorReference[$color]};
|
|
26
|
-
border-top-color: transparent;
|
|
27
|
-
|
|
28
|
-
${({ $size }) => `
|
|
29
|
-
height: ${$size}px;
|
|
30
|
-
width: ${$size}px;
|
|
31
|
-
`}
|
|
32
|
-
|
|
33
|
-
${({ $sx }) => ($sx ? $sx : '')};
|
|
34
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Notification } from './notification';
|