@soul-refiner/design-system 2.0.0-alpha.26 → 2.0.0-alpha.28
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 +140 -0
- package/dist/common/date.js +34 -0
- package/dist/common/styles.js +66 -0
- package/dist/components/actions/button/button.js +330 -0
- package/dist/components/actions/dropdown/dropdown.js +237 -0
- package/dist/components/actions/rate/rate.js +56 -0
- package/dist/components/actions/switch/switch.js +81 -0
- package/dist/components/actions/toggle/toggle.js +67 -0
- package/dist/components/actions/upload/upload.js +170 -0
- package/dist/components/atoms/box/box.js +26 -0
- package/dist/components/atoms/hide/hide.js +18 -0
- package/dist/components/atoms/seconds_to_duration/seconds_to_duration.js +36 -0
- package/dist/components/atoms/time_ago/time_ago.js +40 -0
- package/dist/components/atoms/typography/display.js +19 -0
- package/dist/components/atoms/typography/heading.js +44 -0
- package/dist/components/atoms/typography/paragraph.js +27 -0
- package/dist/components/atoms/typography/typography.js +17 -0
- package/dist/components/card/action/action.js +84 -0
- package/dist/components/card/audio/audio.js +143 -0
- package/dist/components/card/card.js +34 -0
- package/dist/components/card/feature/feature.js +204 -0
- package/dist/components/card/meeting/meeting.js +152 -0
- package/dist/components/card/person/person.js +83 -0
- package/dist/components/card/price/price.js +89 -0
- package/dist/components/card/regular/regular.js +43 -0
- package/dist/components/card/styles.js +16 -0
- package/dist/components/card/video/video.js +140 -0
- package/dist/components/card/written/written.js +143 -0
- package/dist/components/custom/courses_selection/courses_selection.js +143 -0
- package/dist/components/custom/users_selection/users_selection.js +134 -0
- package/dist/components/editor/constants.js +195 -0
- package/dist/components/editor/context.js +17 -0
- package/dist/components/editor/editor.js +114 -0
- package/dist/components/editor/icons/border-all.js +12 -0
- package/dist/components/editor/icons/border-bottom.js +12 -0
- package/dist/components/editor/icons/border-left.js +12 -0
- package/dist/components/editor/icons/border-none.js +12 -0
- package/dist/components/editor/icons/border-right.js +12 -0
- package/dist/components/editor/icons/border-top.js +12 -0
- package/dist/components/editor/navbar/alignment_dropdown.js +106 -0
- package/dist/components/editor/navbar/button_modal.js +70 -0
- package/dist/components/editor/navbar/navbar.js +225 -0
- package/dist/components/editor/navbar/style_dropdown.js +74 -0
- package/dist/components/editor/plugins/blocks/blockquote.js +17 -0
- package/dist/components/editor/plugins/blocks/blocks.js +54 -0
- package/dist/components/editor/plugins/blocks/buttons.js +91 -0
- package/dist/components/editor/plugins/blocks/dropdown-menu.js +78 -0
- package/dist/components/editor/plugins/blocks/image.js +60 -0
- package/dist/components/editor/plugins/blocks/list.js +26 -0
- package/dist/components/editor/plugins/blocks/media-popover.js +41 -0
- package/dist/components/editor/plugins/blocks/plate-button.js +63 -0
- package/dist/components/editor/plugins/blocks/popover.js +39 -0
- package/dist/components/editor/plugins/blocks/qa.js +55 -0
- package/dist/components/editor/plugins/blocks/resizable.js +48 -0
- package/dist/components/editor/plugins/blocks/separator.js +44 -0
- package/dist/components/editor/plugins/blocks/table-cell.js +48 -0
- package/dist/components/editor/plugins/blocks/table-row.js +16 -0
- package/dist/components/editor/plugins/blocks/table.js +98 -0
- package/dist/components/editor/plugins/blocks/text.js +103 -0
- package/dist/components/editor/plugins/blocks/video.js +42 -0
- package/dist/components/editor/plugins/leafs/leafs.js +37 -0
- package/dist/components/editor/plugins/leafs/link.js +86 -0
- package/dist/components/editor/plugins/marks/marks.js +17 -0
- package/dist/components/editor/plugins/plate.js +43 -0
- package/dist/components/editor/plugins/utils/exitBreak.js +36 -0
- package/dist/components/editor/plugins/utils/resetBlockType.js +26 -0
- package/dist/components/editor/plugins/utils/selectOnBackspace.js +11 -0
- package/dist/components/editor/plugins/utils/softBreak.js +19 -0
- package/dist/components/editor/plugins/utils/utils.js +17 -0
- package/dist/components/editor/simple_editor/navbar.js +128 -0
- package/dist/components/editor/simple_editor/plugins.js +93 -0
- package/dist/components/editor/simple_editor/simple_editor.js +98 -0
- package/dist/components/editor/styles/menu_button.js +36 -0
- package/dist/components/feedback/animated_toast/animated_toast.js +64 -0
- package/dist/components/feedback/badge/badge.js +75 -0
- package/dist/components/feedback/banner/banner.js +95 -0
- package/dist/components/feedback/chip/chip.js +103 -0
- package/dist/components/feedback/loader/loader.js +44 -0
- package/dist/components/feedback/notification/notification.js +87 -0
- package/dist/components/feedback/progress/progress.js +101 -0
- package/dist/components/feedback/toast/toast.js +126 -0
- package/dist/components/feedback/tooltip/tooltip.js +35 -0
- package/dist/components/iconography/avatar/avatar.js +190 -0
- package/dist/components/iconography/avatar/icons/approved.js +14 -0
- package/dist/components/iconography/avatar/icons/busy.js +14 -0
- package/dist/components/iconography/avatar/icons/declined.js +14 -0
- package/dist/components/iconography/avatar/icons/default.js +13 -0
- package/dist/components/iconography/avatar/icons/focus.js +14 -0
- package/dist/components/iconography/avatar/icons/locked.js +14 -0
- package/dist/components/iconography/avatar/icons/offline.js +14 -0
- package/dist/components/iconography/avatar/icons/online.js +13 -0
- package/dist/components/iconography/avatar/icons/subscribed.js +18 -0
- package/dist/components/iconography/icon/icon.js +19 -0
- package/dist/components/input/calendar/calendar.js +267 -0
- package/dist/components/input/checkbox/checkbox.js +32 -0
- package/dist/components/input/date/date.js +529 -0
- package/dist/components/input/filter/filter.js +332 -0
- package/dist/components/input/filter/filter_option.js +82 -0
- package/dist/components/input/radio/radio.js +92 -0
- package/dist/components/input/search/search.js +148 -0
- package/dist/components/input/select/select.js +56 -0
- package/dist/components/input/text_area/text_area.js +120 -0
- package/dist/components/input/text_input/text_input.js +157 -0
- package/dist/components/input/time/time.js +80 -0
- package/dist/components/media/video/video.js +42 -0
- package/dist/components/media/video-player/playlist-item.js +48 -0
- package/dist/components/media/video-player/video.js +210 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.js +119 -0
- package/dist/components/navigation/inner/inner.js +199 -0
- package/dist/components/navigation/tabs/tabs.js +159 -0
- package/dist/components/surfaces/accordion/accordion.js +56 -0
- package/dist/components/surfaces/calendar_date/calendar_date.js +55 -0
- package/dist/components/surfaces/carousel/card/card.js +106 -0
- package/dist/components/surfaces/comment/comment.js +210 -0
- package/dist/components/surfaces/comment/helpers.js +30 -0
- package/dist/components/surfaces/drawer/drawer.js +140 -0
- package/dist/components/surfaces/message/message.js +56 -0
- package/dist/components/surfaces/modal/modal.js +135 -0
- package/dist/components/surfaces/portal/portal.js +36 -0
- package/dist/components/surfaces/post/post.js +246 -0
- package/dist/components/table/table/table.js +192 -0
- package/dist/icons/arrow/arrow_all.js +15 -0
- package/dist/icons/arrow/arrow_all_diagonal.js +15 -0
- package/dist/icons/arrow/arrow_both_downwards.js +15 -0
- package/dist/icons/arrow/arrow_both_upwards.js +15 -0
- package/dist/icons/arrow/arrow_circle_left.js +15 -0
- package/dist/icons/arrow/arrow_circle_left_double.js +15 -0
- package/dist/icons/arrow/arrow_circle_left_double_alert.js +17 -0
- package/dist/icons/arrow/arrow_circle_right.js +15 -0
- package/dist/icons/arrow/arrow_circle_right_double.js +15 -0
- package/dist/icons/arrow/arrow_circle_right_double_alert.js +15 -0
- package/dist/icons/arrow/arrow_diagonal_down_left.js +15 -0
- package/dist/icons/arrow/arrow_diagonal_down_left_circle.js +15 -0
- package/dist/icons/arrow/arrow_diagonal_down_right.js +15 -0
- package/dist/icons/arrow/arrow_diagonal_down_right_circle.js +15 -0
- package/dist/icons/arrow/arrow_diagonal_up_left.js +15 -0
- package/dist/icons/arrow/arrow_diagonal_up_left_circle.js +15 -0
- package/dist/icons/arrow/arrow_diagonal_up_right.js +15 -0
- package/dist/icons/arrow/arrow_diagonal_up_right_circle.js +15 -0
- package/dist/icons/arrow/arrow_down.js +15 -0
- package/dist/icons/arrow/arrow_down_bold.js +15 -0
- package/dist/icons/arrow/arrow_down_circle.js +15 -0
- package/dist/icons/arrow/arrow_left.js +15 -0
- package/dist/icons/arrow/arrow_left_bold.js +15 -0
- package/dist/icons/arrow/arrow_left_circle.js +15 -0
- package/dist/icons/arrow/arrow_left_curved.js +15 -0
- package/dist/icons/arrow/arrow_left_curved_circle.js +15 -0
- package/dist/icons/arrow/arrow_right.js +15 -0
- package/dist/icons/arrow/arrow_right_bold.js +15 -0
- package/dist/icons/arrow/arrow_right_circle.js +15 -0
- package/dist/icons/arrow/arrow_right_curved.js +15 -0
- package/dist/icons/arrow/arrow_right_curved_circle.js +15 -0
- package/dist/icons/arrow/arrow_up.js +15 -0
- package/dist/icons/arrow/arrow_up_bold.js +15 -0
- package/dist/icons/arrow/arrow_up_circle.js +15 -0
- package/dist/icons/arrow/chevron_down.js +15 -0
- package/dist/icons/arrow/chevron_down_circle.js +15 -0
- package/dist/icons/arrow/chevron_down_double.js +15 -0
- package/dist/icons/arrow/chevron_down_double_circle.js +15 -0
- package/dist/icons/arrow/chevron_left.js +15 -0
- package/dist/icons/arrow/chevron_left_circle.js +15 -0
- package/dist/icons/arrow/chevron_left_double.js +15 -0
- package/dist/icons/arrow/chevron_left_double_circle.js +15 -0
- package/dist/icons/arrow/chevron_right.js +15 -0
- package/dist/icons/arrow/chevron_right_circle.js +15 -0
- package/dist/icons/arrow/chevron_right_double.js +15 -0
- package/dist/icons/arrow/chevron_right_double_circle.js +15 -0
- package/dist/icons/arrow/chevron_scroll.js +15 -0
- package/dist/icons/arrow/chevron_up.js +15 -0
- package/dist/icons/arrow/chevron_up_circle.js +15 -0
- package/dist/icons/arrow/chevron_up_double.js +15 -0
- package/dist/icons/arrow/chevron_up_double_circle.js +15 -0
- package/dist/icons/arrow/forward_all.js +15 -0
- package/dist/icons/arrow/forward_all_bold.js +15 -0
- package/dist/icons/arrow/forward_bold.js +15 -0
- package/dist/icons/arrow/redo.js +15 -0
- package/dist/icons/arrow/redo_bold.js +15 -0
- package/dist/icons/arrow/reply.js +15 -0
- package/dist/icons/arrow/reply_all.js +15 -0
- package/dist/icons/arrow/reply_all_bold.js +15 -0
- package/dist/icons/arrow/reply_bold.js +15 -0
- package/dist/icons/arrow/undo.js +15 -0
- package/dist/icons/arrow/undo_bold.js +15 -0
- package/dist/icons/audio_video/drag_indicator.js +15 -0
- package/dist/icons/audio_video/eject.js +15 -0
- package/dist/icons/audio_video/equalizer.js +15 -0
- package/dist/icons/audio_video/fast_forward.js +15 -0
- package/dist/icons/audio_video/fast_forward_30.js +15 -0
- package/dist/icons/audio_video/fullscreen.js +15 -0
- package/dist/icons/audio_video/headphones.js +15 -0
- package/dist/icons/audio_video/library_add.js +15 -0
- package/dist/icons/audio_video/library_music.js +15 -0
- package/dist/icons/audio_video/microphone.js +15 -0
- package/dist/icons/audio_video/musical_note.js +15 -0
- package/dist/icons/audio_video/next.js +15 -0
- package/dist/icons/audio_video/pause.js +15 -0
- package/dist/icons/audio_video/pause_circle.js +15 -0
- package/dist/icons/audio_video/play.js +15 -0
- package/dist/icons/audio_video/play_circle.js +15 -0
- package/dist/icons/audio_video/play_display.js +15 -0
- package/dist/icons/audio_video/play_pause.js +15 -0
- package/dist/icons/audio_video/play_solid.js +15 -0
- package/dist/icons/audio_video/player_list.js +15 -0
- package/dist/icons/audio_video/player_list_add.js +15 -0
- package/dist/icons/audio_video/player_list_play.js +15 -0
- package/dist/icons/audio_video/previous.js +15 -0
- package/dist/icons/audio_video/radio.js +15 -0
- package/dist/icons/audio_video/record.js +15 -0
- package/dist/icons/audio_video/repeat.js +15 -0
- package/dist/icons/audio_video/rewind.js +15 -0
- package/dist/icons/audio_video/rewind_30.js +15 -0
- package/dist/icons/audio_video/shuffle.js +15 -0
- package/dist/icons/audio_video/sound_wave.js +15 -0
- package/dist/icons/audio_video/stop.js +15 -0
- package/dist/icons/audio_video/stop_circle.js +15 -0
- package/dist/icons/audio_video/subscriptions.js +15 -0
- package/dist/icons/audio_video/tuner.js +15 -0
- package/dist/icons/audio_video/volume.js +15 -0
- package/dist/icons/audio_video/volume_high.js +15 -0
- package/dist/icons/audio_video/volume_low.js +15 -0
- package/dist/icons/audio_video/volume_slash.js +15 -0
- package/dist/icons/basic/aa_sansserif.js +16 -0
- package/dist/icons/basic/aa_serif.js +16 -0
- package/dist/icons/basic/anchor.js +17 -0
- package/dist/icons/basic/bible.js +15 -0
- package/dist/icons/basic/bold.js +15 -0
- package/dist/icons/basic/book.js +15 -0
- package/dist/icons/basic/book_open.js +15 -0
- package/dist/icons/basic/bookmark.js +15 -0
- package/dist/icons/basic/bookmark_add.js +15 -0
- package/dist/icons/basic/bookmark_slash.js +15 -0
- package/dist/icons/basic/bookmarks.js +15 -0
- package/dist/icons/basic/books.js +18 -0
- package/dist/icons/basic/box.js +15 -0
- package/dist/icons/basic/briefcase.js +15 -0
- package/dist/icons/basic/browse_activity.js +15 -0
- package/dist/icons/basic/browser.js +15 -0
- package/dist/icons/basic/browser_slash.js +15 -0
- package/dist/icons/basic/calculator.js +15 -0
- package/dist/icons/basic/camera.js +15 -0
- package/dist/icons/basic/camera_add.js +15 -0
- package/dist/icons/basic/camera_slash.js +15 -0
- package/dist/icons/basic/checkmark.js +15 -0
- package/dist/icons/basic/checkmark_circle.js +17 -0
- package/dist/icons/basic/checkmark_filled.js +15 -0
- package/dist/icons/basic/checkmarks.js +15 -0
- package/dist/icons/basic/circle.js +15 -0
- package/dist/icons/basic/circle_slash.js +17 -0
- package/dist/icons/basic/clear_text_style.js +15 -0
- package/dist/icons/basic/close.js +15 -0
- package/dist/icons/basic/close_circle.js +15 -0
- package/dist/icons/basic/close_filled.js +15 -0
- package/dist/icons/basic/copy.js +15 -0
- package/dist/icons/basic/delete.js +15 -0
- package/dist/icons/basic/detail.js +15 -0
- package/dist/icons/basic/dot.js +15 -0
- package/dist/icons/basic/download.js +15 -0
- package/dist/icons/basic/download_arrow.js +15 -0
- package/dist/icons/basic/droplet.js +17 -0
- package/dist/icons/basic/ellipsis_horizontal.js +15 -0
- package/dist/icons/basic/ellipsis_horizontal_circle.js +15 -0
- package/dist/icons/basic/ellipsis_vertical.js +15 -0
- package/dist/icons/basic/ellipsis_vertical_circle.js +15 -0
- package/dist/icons/basic/eye.js +15 -0
- package/dist/icons/basic/eye_slash.js +15 -0
- package/dist/icons/basic/fingerprint.js +15 -0
- package/dist/icons/basic/flag.js +15 -0
- package/dist/icons/basic/flag_wave.js +15 -0
- package/dist/icons/basic/flag_wave_filled.js +15 -0
- package/dist/icons/basic/flame.js +15 -0
- package/dist/icons/basic/gauge.js +15 -0
- package/dist/icons/basic/glasses.js +15 -0
- package/dist/icons/basic/graduation_cap.js +15 -0
- package/dist/icons/basic/hashmark.js +15 -0
- package/dist/icons/basic/heart.js +15 -0
- package/dist/icons/basic/heart_slash.js +15 -0
- package/dist/icons/basic/highlighter.js +15 -0
- package/dist/icons/basic/home.js +15 -0
- package/dist/icons/basic/image.js +15 -0
- package/dist/icons/basic/inbox.js +15 -0
- package/dist/icons/basic/italic.js +15 -0
- package/dist/icons/basic/layers.js +15 -0
- package/dist/icons/basic/lightening.js +15 -0
- package/dist/icons/basic/lightening_slash.js +15 -0
- package/dist/icons/basic/link.js +15 -0
- package/dist/icons/basic/link_slash.js +15 -0
- package/dist/icons/basic/loudspeaker.js +15 -0
- package/dist/icons/basic/maximize.js +15 -0
- package/dist/icons/basic/menu.js +15 -0
- package/dist/icons/basic/menu_circle.js +15 -0
- package/dist/icons/basic/menu_dots.js +15 -0
- package/dist/icons/basic/microphone_slash.js +15 -0
- package/dist/icons/basic/minimize.js +15 -0
- package/dist/icons/basic/minus.js +15 -0
- package/dist/icons/basic/minus_circle.js +15 -0
- package/dist/icons/basic/move_item.js +15 -0
- package/dist/icons/basic/new.js +15 -0
- package/dist/icons/basic/newspaper.js +15 -0
- package/dist/icons/basic/node.js +15 -0
- package/dist/icons/basic/note_pad.js +16 -0
- package/dist/icons/basic/options.js +15 -0
- package/dist/icons/basic/paint_brush.js +15 -0
- package/dist/icons/basic/paperclip.js +15 -0
- package/dist/icons/basic/paperclip_slash.js +15 -0
- package/dist/icons/basic/pencil.js +15 -0
- package/dist/icons/basic/pencil_pad.js +15 -0
- package/dist/icons/basic/plus.js +15 -0
- package/dist/icons/basic/plus_circle.js +15 -0
- package/dist/icons/basic/presentation.js +15 -0
- package/dist/icons/basic/printer.js +15 -0
- package/dist/icons/basic/profile.js +15 -0
- package/dist/icons/basic/profile_check.js +15 -0
- package/dist/icons/basic/pulse.js +15 -0
- package/dist/icons/basic/qr_code.js +15 -0
- package/dist/icons/basic/resize.js +17 -0
- package/dist/icons/basic/scan.js +15 -0
- package/dist/icons/basic/scissors.js +15 -0
- package/dist/icons/basic/screenshot.js +15 -0
- package/dist/icons/basic/search.js +15 -0
- package/dist/icons/basic/select_item.js +16 -0
- package/dist/icons/basic/settings.js +15 -0
- package/dist/icons/basic/share.js +15 -0
- package/dist/icons/basic/share_external.js +15 -0
- package/dist/icons/basic/square.js +15 -0
- package/dist/icons/basic/star.js +15 -0
- package/dist/icons/basic/star_circle.js +15 -0
- package/dist/icons/basic/star_filled.js +15 -0
- package/dist/icons/basic/star_filled_half.js +15 -0
- package/dist/icons/basic/star_slash.js +15 -0
- package/dist/icons/basic/sticker.js +15 -0
- package/dist/icons/basic/strikethrough.js +15 -0
- package/dist/icons/basic/subtask.js +16 -0
- package/dist/icons/basic/tax.js +18 -0
- package/dist/icons/basic/text_bg_color.js +15 -0
- package/dist/icons/basic/text_color.js +15 -0
- package/dist/icons/basic/textbox.js +15 -0
- package/dist/icons/basic/thumbs_down.js +15 -0
- package/dist/icons/basic/thumbs_up.js +15 -0
- package/dist/icons/basic/thumbs_up_filled.js +15 -0
- package/dist/icons/basic/toggle_left.js +15 -0
- package/dist/icons/basic/toggle_right.js +15 -0
- package/dist/icons/basic/translate.js +15 -0
- package/dist/icons/basic/trash.js +15 -0
- package/dist/icons/basic/trash_slash.js +15 -0
- package/dist/icons/basic/underline.js +15 -0
- package/dist/icons/basic/upload.js +15 -0
- package/dist/icons/basic/video.js +15 -0
- package/dist/icons/basic/video_add.js +16 -0
- package/dist/icons/basic/video_slash.js +15 -0
- package/dist/icons/basic/wrench.js +15 -0
- package/dist/icons/basic/zoom_in.js +15 -0
- package/dist/icons/basic/zoom_out.js +15 -0
- package/dist/icons/data/bar_chart.js +15 -0
- package/dist/icons/data/bar_chart_downward.js +15 -0
- package/dist/icons/data/bar_chart_downward_outline.js +15 -0
- package/dist/icons/data/bar_chart_upward.js +15 -0
- package/dist/icons/data/bar_chart_upward_outline.js +15 -0
- package/dist/icons/data/candlestick_chart.js +15 -0
- package/dist/icons/data/four_circles.js +15 -0
- package/dist/icons/data/legend_toggle.js +15 -0
- package/dist/icons/data/line_chart.js +15 -0
- package/dist/icons/data/line_chart_area.js +15 -0
- package/dist/icons/data/line_chart_area_shaded.js +15 -0
- package/dist/icons/data/line_chart_double.js +15 -0
- package/dist/icons/data/line_chart_downward.js +15 -0
- package/dist/icons/data/line_chart_node.js +15 -0
- package/dist/icons/data/line_chart_outline.js +15 -0
- package/dist/icons/data/line_chart_search.js +15 -0
- package/dist/icons/data/line_chart_stars.js +15 -0
- package/dist/icons/data/line_chart_upward.js +15 -0
- package/dist/icons/data/pie_chart.js +16 -0
- package/dist/icons/data/tree.js +15 -0
- package/dist/icons/email/mail.js +15 -0
- package/dist/icons/email/mail_check.js +15 -0
- package/dist/icons/email/mail_minus.js +15 -0
- package/dist/icons/email/mail_send.js +15 -0
- package/dist/icons/email/send.js +15 -0
- package/dist/icons/email/send_close.js +15 -0
- package/dist/icons/email/send_schedule.js +15 -0
- package/dist/icons/email/send_text.js +15 -0
- package/dist/icons/emoji/emoji_add.js +15 -0
- package/dist/icons/emoji/laughing.js +15 -0
- package/dist/icons/emoji/neutral.js +15 -0
- package/dist/icons/emoji/sad.js +15 -0
- package/dist/icons/emoji/shocked.js +15 -0
- package/dist/icons/emoji/smile.js +15 -0
- package/dist/icons/file/clipboard.js +15 -0
- package/dist/icons/file/clipboard_check.js +15 -0
- package/dist/icons/file/clipboard_close.js +15 -0
- package/dist/icons/file/clipboard_minus.js +15 -0
- package/dist/icons/file/clipboard_plus.js +15 -0
- package/dist/icons/file/clipboard_text.js +15 -0
- package/dist/icons/file/file.js +15 -0
- package/dist/icons/file/file_add.js +15 -0
- package/dist/icons/file/file_check.js +15 -0
- package/dist/icons/file/file_close.js +15 -0
- package/dist/icons/file/file_code.js +15 -0
- package/dist/icons/file/file_download.js +15 -0
- package/dist/icons/file/file_draft.js +15 -0
- package/dist/icons/file/file_gear.js +16 -0
- package/dist/icons/file/file_minus.js +15 -0
- package/dist/icons/file/file_plus.js +15 -0
- package/dist/icons/file/file_scan.js +15 -0
- package/dist/icons/file/file_shred.js +15 -0
- package/dist/icons/file/file_text.js +15 -0
- package/dist/icons/file/file_upload.js +15 -0
- package/dist/icons/file/folder.js +15 -0
- package/dist/icons/file/folder_add.js +15 -0
- package/dist/icons/file/folder_arrow.js +15 -0
- package/dist/icons/file/folder_check.js +15 -0
- package/dist/icons/file/folder_close.js +15 -0
- package/dist/icons/file/folder_cloud.js +15 -0
- package/dist/icons/file/folder_gear.js +16 -0
- package/dist/icons/file/folder_minus.js +15 -0
- package/dist/icons/file/folder_music.js +15 -0
- package/dist/icons/file/folder_open.js +15 -0
- package/dist/icons/file/folder_plus.js +15 -0
- package/dist/icons/file/folder_zip.js +15 -0
- package/dist/icons/file/note.js +15 -0
- package/dist/icons/file/note_text.js +15 -0
- package/dist/icons/file/pdf.js +15 -0
- package/dist/icons/file/photo.js +15 -0
- package/dist/icons/finance/bitcoin.js +15 -0
- package/dist/icons/finance/coins.js +19 -0
- package/dist/icons/finance/credit_card.js +15 -0
- package/dist/icons/finance/credit_card_add.js +15 -0
- package/dist/icons/finance/credit_card_face.js +15 -0
- package/dist/icons/finance/credit_card_member.js +15 -0
- package/dist/icons/finance/credit_card_outcome.js +15 -0
- package/dist/icons/finance/credit_card_scan.js +15 -0
- package/dist/icons/finance/credit_card_share.js +15 -0
- package/dist/icons/finance/credit_card_slash.js +15 -0
- package/dist/icons/finance/currency_exchange.js +15 -0
- package/dist/icons/finance/dollar.js +15 -0
- package/dist/icons/finance/ethereum.js +15 -0
- package/dist/icons/finance/paypass.js +15 -0
- package/dist/icons/finance/strongbox.js +15 -0
- package/dist/icons/finance/wallet.js +15 -0
- package/dist/icons/index.js +1095 -0
- package/dist/icons/layout/block_align_bottom.js +15 -0
- package/dist/icons/layout/block_align_center.js +15 -0
- package/dist/icons/layout/block_align_left.js +15 -0
- package/dist/icons/layout/block_align_middle.js +15 -0
- package/dist/icons/layout/block_align_right.js +15 -0
- package/dist/icons/layout/block_align_top.js +15 -0
- package/dist/icons/layout/block_horizontal.js +15 -0
- package/dist/icons/layout/block_vertical.js +15 -0
- package/dist/icons/layout/edit_shape.js +15 -0
- package/dist/icons/layout/elements.js +15 -0
- package/dist/icons/layout/elements_add.js +15 -0
- package/dist/icons/layout/elements_filled.js +15 -0
- package/dist/icons/layout/elements_masonry.js +15 -0
- package/dist/icons/layout/frame.js +15 -0
- package/dist/icons/layout/frame_stack.js +15 -0
- package/dist/icons/layout/grid.js +15 -0
- package/dist/icons/layout/grid_column_three.js +15 -0
- package/dist/icons/layout/grid_column_two.js +15 -0
- package/dist/icons/layout/grid_dynamic.js +15 -0
- package/dist/icons/layout/grid_frame.js +15 -0
- package/dist/icons/layout/grid_row_three.js +15 -0
- package/dist/icons/layout/grid_row_two.js +15 -0
- package/dist/icons/layout/grid_six.js +15 -0
- package/dist/icons/layout/grid_small.js +15 -0
- package/dist/icons/layout/iframe.js +15 -0
- package/dist/icons/layout/kanban.js +15 -0
- package/dist/icons/layout/layout.js +15 -0
- package/dist/icons/layout/list.js +15 -0
- package/dist/icons/layout/list_filled.js +20 -0
- package/dist/icons/layout/padding.js +15 -0
- package/dist/icons/layout/page_break.js +15 -0
- package/dist/icons/layout/rotate_left.js +15 -0
- package/dist/icons/layout/rotate_right.js +15 -0
- package/dist/icons/layout/ruler.js +15 -0
- package/dist/icons/layout/segment.js +15 -0
- package/dist/icons/layout/select_area.js +15 -0
- package/dist/icons/layout/select_boundary.js +15 -0
- package/dist/icons/layout/sidebar_left.js +15 -0
- package/dist/icons/layout/sidebar_right.js +15 -0
- package/dist/icons/layout/slides.js +15 -0
- package/dist/icons/layout/slides_horizontal.js +15 -0
- package/dist/icons/layout/slides_vertical.js +20 -0
- package/dist/icons/layout/stack.js +15 -0
- package/dist/icons/layout/text.js +15 -0
- package/dist/icons/maps/atlas.js +15 -0
- package/dist/icons/maps/compass.js +15 -0
- package/dist/icons/maps/direction.js +15 -0
- package/dist/icons/maps/direction_angled.js +15 -0
- package/dist/icons/maps/globe.js +15 -0
- package/dist/icons/maps/globe_slash.js +15 -0
- package/dist/icons/maps/location.js +15 -0
- package/dist/icons/maps/location_slash.js +15 -0
- package/dist/icons/maps/map.js +15 -0
- package/dist/icons/maps/marker.js +15 -0
- package/dist/icons/maps/panorama.js +15 -0
- package/dist/icons/maps/pin.js +15 -0
- package/dist/icons/maps/pin_arrow.js +15 -0
- package/dist/icons/maps/pin_location.js +15 -0
- package/dist/icons/maps/pin_plus.js +15 -0
- package/dist/icons/maps/pin_question.js +15 -0
- package/dist/icons/maps/pin_slash.js +15 -0
- package/dist/icons/maps/push_pin.js +15 -0
- package/dist/icons/maps/push_pin_filled.js +15 -0
- package/dist/icons/maps/push_pin_slash.js +15 -0
- package/dist/icons/maps/radar.js +15 -0
- package/dist/icons/maps/route.js +15 -0
- package/dist/icons/message/bubble.js +15 -0
- package/dist/icons/message/bubble_question.js +15 -0
- package/dist/icons/message/comment.js +15 -0
- package/dist/icons/message/comment_add.js +15 -0
- package/dist/icons/message/comment_check.js +15 -0
- package/dist/icons/message/comment_close.js +15 -0
- package/dist/icons/message/comment_minus.js +15 -0
- package/dist/icons/message/comment_text.js +15 -0
- package/dist/icons/misc/advertisement.js +15 -0
- package/dist/icons/misc/atom.js +15 -0
- package/dist/icons/misc/bone.js +15 -0
- package/dist/icons/misc/brightness_high.js +15 -0
- package/dist/icons/misc/brightness_low.js +15 -0
- package/dist/icons/misc/contrast.js +15 -0
- package/dist/icons/misc/crosshairs.js +15 -0
- package/dist/icons/misc/crown.js +15 -0
- package/dist/icons/misc/footprint.js +15 -0
- package/dist/icons/misc/form.js +15 -0
- package/dist/icons/misc/funnel.js +15 -0
- package/dist/icons/misc/infinite.js +15 -0
- package/dist/icons/misc/insert_button.js +15 -0
- package/dist/icons/misc/light_bulb.js +15 -0
- package/dist/icons/misc/moon.js +15 -0
- package/dist/icons/misc/nut.js +15 -0
- package/dist/icons/misc/planet.js +15 -0
- package/dist/icons/misc/plus_thick.js +15 -0
- package/dist/icons/misc/pocket.js +15 -0
- package/dist/icons/misc/rocket.js +15 -0
- package/dist/icons/misc/soup.js +19 -0
- package/dist/icons/misc/sun.js +15 -0
- package/dist/icons/misc/toy_horse.js +15 -0
- package/dist/icons/misc/trophy.js +15 -0
- package/dist/icons/misc/watercloset.js +15 -0
- package/dist/icons/notifications/alert_circle.js +15 -0
- package/dist/icons/notifications/alert_octogon.js +15 -0
- package/dist/icons/notifications/alert_triangle.js +15 -0
- package/dist/icons/notifications/app_notification.js +15 -0
- package/dist/icons/notifications/bell.js +15 -0
- package/dist/icons/notifications/bell_alert.js +15 -0
- package/dist/icons/notifications/bell_checkmark.js +15 -0
- package/dist/icons/notifications/bell_minus.js +15 -0
- package/dist/icons/notifications/bell_plus.js +15 -0
- package/dist/icons/notifications/bell_ring.js +17 -0
- package/dist/icons/notifications/bell_slash.js +15 -0
- package/dist/icons/notifications/information.js +15 -0
- package/dist/icons/notifications/minus_octogon.js +15 -0
- package/dist/icons/notifications/question_circle.js +15 -0
- package/dist/icons/people/group.js +15 -0
- package/dist/icons/people/group_add.js +15 -0
- package/dist/icons/people/group_chat.js +17 -0
- package/dist/icons/people/group_remove.js +15 -0
- package/dist/icons/people/group_send.js +16 -0
- package/dist/icons/people/groups.js +15 -0
- package/dist/icons/people/person.js +15 -0
- package/dist/icons/people/person_add.js +15 -0
- package/dist/icons/people/person_checkmark.js +15 -0
- package/dist/icons/people/person_circle.js +17 -0
- package/dist/icons/people/person_close.js +17 -0
- package/dist/icons/people/person_remove.js +15 -0
- package/dist/icons/people/person_slash.js +17 -0
- package/dist/icons/phone/keypad.js +15 -0
- package/dist/icons/phone/phone.js +15 -0
- package/dist/icons/phone/phone_add.js +15 -0
- package/dist/icons/phone/phone_calling.js +15 -0
- package/dist/icons/phone/phone_check.js +15 -0
- package/dist/icons/phone/phone_close.js +15 -0
- package/dist/icons/phone/phone_decline.js +15 -0
- package/dist/icons/phone/phone_forwarded.js +15 -0
- package/dist/icons/phone/phone_hash.js +15 -0
- package/dist/icons/phone/phone_incoming.js +15 -0
- package/dist/icons/phone/phone_outgoing.js +15 -0
- package/dist/icons/phone/phone_pause.js +15 -0
- package/dist/icons/phone/phone_slash.js +15 -0
- package/dist/icons/phone/voicemail.js +15 -0
- package/dist/icons/security/key.js +15 -0
- package/dist/icons/security/key_slash.js +15 -0
- package/dist/icons/security/lock.js +15 -0
- package/dist/icons/security/lock_circle.js +15 -0
- package/dist/icons/security/lock_open.js +15 -0
- package/dist/icons/security/lock_slash.js +15 -0
- package/dist/icons/security/shield.js +15 -0
- package/dist/icons/security/shield_checkmark.js +15 -0
- package/dist/icons/security/shield_lock.js +15 -0
- package/dist/icons/security/shield_slash.js +15 -0
- package/dist/icons/security/verified.js +15 -0
- package/dist/icons/shopping/basket.js +15 -0
- package/dist/icons/shopping/cart.js +15 -0
- package/dist/icons/shopping/cart_filled.js +15 -0
- package/dist/icons/shopping/coupon.js +15 -0
- package/dist/icons/shopping/coupon_cut.js +15 -0
- package/dist/icons/shopping/delivery.js +15 -0
- package/dist/icons/shopping/discount.js +15 -0
- package/dist/icons/shopping/gift.js +15 -0
- package/dist/icons/shopping/gift_bag.js +15 -0
- package/dist/icons/shopping/inventory.js +15 -0
- package/dist/icons/shopping/point_of_sale.js +15 -0
- package/dist/icons/shopping/shirt.js +15 -0
- package/dist/icons/shopping/tag.js +15 -0
- package/dist/icons/shopping/tag_diagonal.js +15 -0
- package/dist/icons/shopping/tote.js +15 -0
- package/dist/icons/special/upload_audio.js +20 -0
- package/dist/icons/special/upload_file.js +15 -0
- package/dist/icons/special/upload_image.js +17 -0
- package/dist/icons/special/upload_video.js +18 -0
- package/dist/icons/symbols/at.js +15 -0
- package/dist/icons/symbols/cc.js +15 -0
- package/dist/icons/symbols/cmd.js +15 -0
- package/dist/icons/symbols/facebook.js +15 -0
- package/dist/icons/symbols/google.js +18 -0
- package/dist/icons/symbols/hash.js +15 -0
- package/dist/icons/symbols/instagram.js +27 -0
- package/dist/icons/symbols/messenger.js +21 -0
- package/dist/icons/symbols/twitter.js +15 -0
- package/dist/icons/technology/battery.js +15 -0
- package/dist/icons/technology/battery_100.js +15 -0
- package/dist/icons/technology/battery_20.js +15 -0
- package/dist/icons/technology/battery_40.js +15 -0
- package/dist/icons/technology/battery_60.js +15 -0
- package/dist/icons/technology/battery_80.js +15 -0
- package/dist/icons/technology/battery_charging.js +15 -0
- package/dist/icons/technology/battery_slash.js +15 -0
- package/dist/icons/technology/devices.js +15 -0
- package/dist/icons/technology/floppy_disk.js +15 -0
- package/dist/icons/technology/iphone.js +15 -0
- package/dist/icons/technology/laptop.js +15 -0
- package/dist/icons/technology/mobile.js +15 -0
- package/dist/icons/technology/monitor.js +15 -0
- package/dist/icons/technology/server.js +15 -0
- package/dist/icons/technology/sim_card.js +15 -0
- package/dist/icons/technology/usb_stick.js +15 -0
- package/dist/icons/text/align_center.js +15 -0
- package/dist/icons/text/align_justified.js +15 -0
- package/dist/icons/text/align_left.js +15 -0
- package/dist/icons/text/align_right.js +15 -0
- package/dist/icons/text/code_block.js +15 -0
- package/dist/icons/text/divider.js +15 -0
- package/dist/icons/text/footnote.js +17 -0
- package/dist/icons/text/indent_decrease.js +15 -0
- package/dist/icons/text/indent_increase.js +15 -0
- package/dist/icons/text/list_ordered.js +15 -0
- package/dist/icons/text/list_unordered.js +15 -0
- package/dist/icons/text/quote.js +15 -0
- package/dist/icons/text/table.js +15 -0
- package/dist/icons/time/alarm.js +15 -0
- package/dist/icons/time/alarm_checkmark.js +15 -0
- package/dist/icons/time/alarm_minus.js +15 -0
- package/dist/icons/time/alarm_plus.js +15 -0
- package/dist/icons/time/alarm_slash.js +15 -0
- package/dist/icons/time/alarm_snooze.js +15 -0
- package/dist/icons/time/calendar.js +15 -0
- package/dist/icons/time/calendar_add.js +15 -0
- package/dist/icons/time/calendar_checkmark.js +15 -0
- package/dist/icons/time/calendar_close.js +15 -0
- package/dist/icons/time/calendar_dates.js +15 -0
- package/dist/icons/time/calendar_minus.js +15 -0
- package/dist/icons/time/calendar_plus.js +15 -0
- package/dist/icons/time/calendar_scroll.js +17 -0
- package/dist/icons/time/clock.js +15 -0
- package/dist/icons/time/clock_history.js +15 -0
- package/dist/icons/time/stopwatch.js +15 -0
- package/dist/icons/time/timer.js +15 -0
- package/dist/icons/time/watch.js +15 -0
- package/dist/index.js +112 -11878
- package/dist/utils/date.js +73 -0
- package/dist/utils/function.js +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var plate = require('@udecode/plate');
|
|
5
|
+
var paragraph = require('../../../atoms/typography/paragraph.js');
|
|
6
|
+
var heading = require('../../../atoms/typography/heading.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
|
|
12
|
+
const ParagraphElement = React__default.default.forwardRef(({ children, ...props }, ref) => {
|
|
13
|
+
const textAlign = props?.style?.textAlign;
|
|
14
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ref: ref, ...props },
|
|
15
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
16
|
+
React__default.default.createElement(paragraph.P, { as: "div", "$textAlign": textAlign }, children))));
|
|
17
|
+
});
|
|
18
|
+
const createParagraphPlugin = plate.createPluginFactory({
|
|
19
|
+
key: plate.ELEMENT_PARAGRAPH,
|
|
20
|
+
type: plate.ELEMENT_PARAGRAPH,
|
|
21
|
+
isElement: true,
|
|
22
|
+
});
|
|
23
|
+
const HOneElement = React__default.default.forwardRef(({ children, ...props }, ref) => {
|
|
24
|
+
const textAlign = props?.style?.textAlign;
|
|
25
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ref: ref, ...props },
|
|
26
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
27
|
+
React__default.default.createElement(heading.H.One, { "$textAlign": textAlign }, children))));
|
|
28
|
+
});
|
|
29
|
+
const createHOnePlugin = plate.createPluginFactory({
|
|
30
|
+
key: plate.ELEMENT_H1,
|
|
31
|
+
type: plate.ELEMENT_H1,
|
|
32
|
+
isElement: true,
|
|
33
|
+
});
|
|
34
|
+
const HTwoElement = React__default.default.forwardRef(({ children, ...props }, ref) => {
|
|
35
|
+
const textAlign = props?.style?.textAlign;
|
|
36
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ref: ref, ...props },
|
|
37
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
38
|
+
React__default.default.createElement(heading.H.Two, { "$textAlign": textAlign }, children))));
|
|
39
|
+
});
|
|
40
|
+
const createHTwoPlugin = plate.createPluginFactory({
|
|
41
|
+
key: plate.ELEMENT_H2,
|
|
42
|
+
type: plate.ELEMENT_H2,
|
|
43
|
+
isElement: true,
|
|
44
|
+
});
|
|
45
|
+
const HThreeElement = React__default.default.forwardRef(({ children, ...props }, ref) => {
|
|
46
|
+
const textAlign = props?.style?.textAlign;
|
|
47
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ref: ref, ...props },
|
|
48
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
49
|
+
React__default.default.createElement(heading.H.Three, { "$textAlign": textAlign }, children))));
|
|
50
|
+
});
|
|
51
|
+
const createHThreePlugin = plate.createPluginFactory({
|
|
52
|
+
key: plate.ELEMENT_H3,
|
|
53
|
+
type: plate.ELEMENT_H3,
|
|
54
|
+
isElement: true,
|
|
55
|
+
});
|
|
56
|
+
const HFourElement = React__default.default.forwardRef(({ children, ...props }, ref) => {
|
|
57
|
+
const textAlign = props?.style?.textAlign;
|
|
58
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ref: ref, ...props },
|
|
59
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
60
|
+
React__default.default.createElement(heading.H.Four, { "$textAlign": textAlign }, children))));
|
|
61
|
+
});
|
|
62
|
+
const createHFourPlugin = plate.createPluginFactory({
|
|
63
|
+
key: plate.ELEMENT_H4,
|
|
64
|
+
type: plate.ELEMENT_H4,
|
|
65
|
+
isElement: true,
|
|
66
|
+
});
|
|
67
|
+
const HFiveElement = React__default.default.forwardRef(({ children, ...props }, ref) => {
|
|
68
|
+
const textAlign = props?.style?.textAlign;
|
|
69
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ref: ref, ...props },
|
|
70
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
71
|
+
React__default.default.createElement(heading.H.Five, { "$textAlign": textAlign }, children))));
|
|
72
|
+
});
|
|
73
|
+
const createHFivePlugin = plate.createPluginFactory({
|
|
74
|
+
key: plate.ELEMENT_H5,
|
|
75
|
+
type: plate.ELEMENT_H5,
|
|
76
|
+
isElement: true,
|
|
77
|
+
});
|
|
78
|
+
const HSixElement = React__default.default.forwardRef(({ children, ...props }, ref) => {
|
|
79
|
+
const textAlign = props?.style?.textAlign;
|
|
80
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ref: ref, ...props },
|
|
81
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
82
|
+
React__default.default.createElement(heading.H.Six, { "$textAlign": textAlign }, children))));
|
|
83
|
+
});
|
|
84
|
+
const createHSixPlugin = plate.createPluginFactory({
|
|
85
|
+
key: plate.ELEMENT_H6,
|
|
86
|
+
type: plate.ELEMENT_H6,
|
|
87
|
+
isElement: true,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
exports.HFiveElement = HFiveElement;
|
|
91
|
+
exports.HFourElement = HFourElement;
|
|
92
|
+
exports.HOneElement = HOneElement;
|
|
93
|
+
exports.HSixElement = HSixElement;
|
|
94
|
+
exports.HThreeElement = HThreeElement;
|
|
95
|
+
exports.HTwoElement = HTwoElement;
|
|
96
|
+
exports.ParagraphElement = ParagraphElement;
|
|
97
|
+
exports.createHFivePlugin = createHFivePlugin;
|
|
98
|
+
exports.createHFourPlugin = createHFourPlugin;
|
|
99
|
+
exports.createHOnePlugin = createHOnePlugin;
|
|
100
|
+
exports.createHSixPlugin = createHSixPlugin;
|
|
101
|
+
exports.createHThreePlugin = createHThreePlugin;
|
|
102
|
+
exports.createHTwoPlugin = createHTwoPlugin;
|
|
103
|
+
exports.createParagraphPlugin = createParagraphPlugin;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var plate = require('@udecode/plate');
|
|
5
|
+
var constants = require('../../constants.js');
|
|
6
|
+
var context = require('../../context.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
|
|
12
|
+
const VideoTitleElement = React__default.default.forwardRef(function VideoTitle({ editor, element, ...props }, ref) {
|
|
13
|
+
const editable = !plate.isEditorReadOnly(editor);
|
|
14
|
+
const { id } = element;
|
|
15
|
+
const { handleVideoClick, videoTitleLoader: VideoTitle } = React__default.default.useContext(context.EditorContext);
|
|
16
|
+
const handleClick = () => {
|
|
17
|
+
if (handleVideoClick && !editable) {
|
|
18
|
+
handleVideoClick(id);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, editor: editor, element: element, ref: ref, ...props },
|
|
22
|
+
React__default.default.createElement("div", { contentEditable: false, onClick: handleClick, style: { cursor: editable ? 'initial' : 'pointer' } },
|
|
23
|
+
React__default.default.createElement(VideoTitle, { courseMediaId: id }))));
|
|
24
|
+
});
|
|
25
|
+
const createVideoTitlePlugin = plate.createPluginFactory({
|
|
26
|
+
key: constants.ELEMENT_VIDEO,
|
|
27
|
+
type: constants.ELEMENT_VIDEO,
|
|
28
|
+
isElement: true,
|
|
29
|
+
isVoid: true,
|
|
30
|
+
component: VideoTitleElement,
|
|
31
|
+
then: () => ({
|
|
32
|
+
inject: {
|
|
33
|
+
props: {
|
|
34
|
+
classNames: undefined,
|
|
35
|
+
validTypes: [plate.ELEMENT_H2],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
exports.VideoTitleElement = VideoTitleElement;
|
|
42
|
+
exports.createVideoTitlePlugin = createVideoTitlePlugin;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var plate = require('@udecode/plate');
|
|
4
|
+
var plateLink = require('@udecode/plate-link');
|
|
5
|
+
var link = require('./link.js');
|
|
6
|
+
|
|
7
|
+
const leafs = [
|
|
8
|
+
plate.createAlignPlugin({
|
|
9
|
+
inject: {
|
|
10
|
+
props: {
|
|
11
|
+
validTypes: [
|
|
12
|
+
plate.ELEMENT_PARAGRAPH,
|
|
13
|
+
plate.ELEMENT_H1,
|
|
14
|
+
plate.ELEMENT_H2,
|
|
15
|
+
plate.ELEMENT_H3,
|
|
16
|
+
plate.ELEMENT_H4,
|
|
17
|
+
plate.ELEMENT_H5,
|
|
18
|
+
plate.ELEMENT_H6,
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}),
|
|
23
|
+
plate.createIndentPlugin({
|
|
24
|
+
inject: {
|
|
25
|
+
props: {
|
|
26
|
+
validTypes: [plate.ELEMENT_PARAGRAPH, plate.ELEMENT_H1],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
plate.createLineHeightPlugin(),
|
|
31
|
+
plate.createCodePlugin(),
|
|
32
|
+
plateLink.createLinkPlugin({
|
|
33
|
+
renderBeforeEditable: link.LinkFloatingMenu,
|
|
34
|
+
}),
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
exports.leafs = leafs;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var styled = require('styled-components');
|
|
5
|
+
var plate = require('@udecode/plate');
|
|
6
|
+
var box = require('../../../atoms/box/box.js');
|
|
7
|
+
var aa_sansserif = require('../../../../icons/basic/aa_sansserif.js');
|
|
8
|
+
var link = require('../../../../icons/basic/link.js');
|
|
9
|
+
var upload = require('../../../../icons/basic/upload.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
|
+
|
|
15
|
+
const LinkElement = React__default.default.forwardRef(({ children, ...props }, ref) => {
|
|
16
|
+
const { props: linkProps } = plate.useLink({ element: props.element });
|
|
17
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ref: ref, ...linkProps, ...props },
|
|
18
|
+
React__default.default.createElement("a", null, children)));
|
|
19
|
+
});
|
|
20
|
+
const LinkFloatingMenu = ({ readOnly }) => {
|
|
21
|
+
const isEditing = plate.useFloatingLinkSelectors().isEditing();
|
|
22
|
+
const state = plate.useFloatingLinkInsertState();
|
|
23
|
+
const { props: insertProps, ref: insertRef, textInputProps, } = plate.useFloatingLinkInsert(state);
|
|
24
|
+
const editState = plate.useFloatingLinkEditState();
|
|
25
|
+
const { props: editProps, ref: editRef, editButtonProps, } = plate.useFloatingLinkEdit(editState);
|
|
26
|
+
if (readOnly)
|
|
27
|
+
return null;
|
|
28
|
+
const input = (React__default.default.createElement(box.Box, { "$dir": "column", sx: `
|
|
29
|
+
background-color: var(--color-white);
|
|
30
|
+
gap: 16px;
|
|
31
|
+
padding: 16px;
|
|
32
|
+
border-radius: 16px;
|
|
33
|
+
box-shadow: var(--elevation-2);
|
|
34
|
+
` },
|
|
35
|
+
React__default.default.createElement(box.Box, { "$align": "center", "$justify": "center", "$gap": 8 },
|
|
36
|
+
React__default.default.createElement(box.Box, { "$align": "center", "$justify": "center" },
|
|
37
|
+
React__default.default.createElement(link.Link, null)),
|
|
38
|
+
React__default.default.createElement(plate.FloatingLinkUrlInput, { style: {
|
|
39
|
+
border: 'none',
|
|
40
|
+
outline: 'none',
|
|
41
|
+
padding: '8px 12px',
|
|
42
|
+
}, placeholder: "Paste link" })),
|
|
43
|
+
React__default.default.createElement(box.Box, { "$align": "center", "$justify": "center", "$gap": 8 },
|
|
44
|
+
React__default.default.createElement(box.Box, { "$align": "center", "$justify": "center" },
|
|
45
|
+
React__default.default.createElement(aa_sansserif.AASansSerif, null)),
|
|
46
|
+
React__default.default.createElement(Input, { placeholder: "Text to display", ...textInputProps }))));
|
|
47
|
+
const editContent = isEditing ? (input) : (React__default.default.createElement(box.Box, { "$align": "center", "$justify": "center", sx: `
|
|
48
|
+
box-sizing: box-content;
|
|
49
|
+
background-color: var(--color-white);
|
|
50
|
+
gap: 8px;
|
|
51
|
+
padding: 16px;
|
|
52
|
+
border-radius: 16px;
|
|
53
|
+
box-shadow: var(--elevation-2);
|
|
54
|
+
|
|
55
|
+
a,
|
|
56
|
+
button {
|
|
57
|
+
padding: 8px 12px;
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
outline: none;
|
|
60
|
+
border: none;
|
|
61
|
+
border-radius: 8px;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
width: max-content;
|
|
64
|
+
font-size: 16px;
|
|
65
|
+
line-height: 16px;
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
background-color: var(--color-grey-9);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
`, "$gap": 8 },
|
|
72
|
+
React__default.default.createElement("button", { type: "button", ...editButtonProps }, "Edit link"),
|
|
73
|
+
React__default.default.createElement(plate.LinkOpenButton, null,
|
|
74
|
+
React__default.default.createElement(upload.Upload, null))));
|
|
75
|
+
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
76
|
+
React__default.default.createElement("div", { ref: insertRef, ...insertProps }, input),
|
|
77
|
+
React__default.default.createElement("div", { ref: editRef, ...editProps }, editContent)));
|
|
78
|
+
};
|
|
79
|
+
const Input = styled.styled.input `
|
|
80
|
+
border: none;
|
|
81
|
+
outline: none;
|
|
82
|
+
padding: 8px 12px;
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
exports.LinkElement = LinkElement;
|
|
86
|
+
exports.LinkFloatingMenu = LinkFloatingMenu;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var plate = require('@udecode/plate');
|
|
4
|
+
|
|
5
|
+
const marks = [
|
|
6
|
+
plate.createBoldPlugin(),
|
|
7
|
+
plate.createFontBackgroundColorPlugin(),
|
|
8
|
+
plate.createFontSizePlugin(),
|
|
9
|
+
plate.createFontFamilyPlugin(),
|
|
10
|
+
plate.createItalicPlugin(),
|
|
11
|
+
plate.createStrikethroughPlugin(),
|
|
12
|
+
plate.createSubscriptPlugin(),
|
|
13
|
+
plate.createSuperscriptPlugin(),
|
|
14
|
+
plate.createUnderlinePlugin(),
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
exports.marks = marks;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var cn = require('@udecode/cn');
|
|
4
|
+
var plateCommon = require('@udecode/plate-common');
|
|
5
|
+
var link = require('./leafs/link.js');
|
|
6
|
+
var constants = require('../constants.js');
|
|
7
|
+
var blockquote = require('./blocks/blockquote.js');
|
|
8
|
+
var buttons = require('./blocks/buttons.js');
|
|
9
|
+
var image = require('./blocks/image.js');
|
|
10
|
+
var list = require('./blocks/list.js');
|
|
11
|
+
var table = require('./blocks/table.js');
|
|
12
|
+
var tableCell = require('./blocks/table-cell.js');
|
|
13
|
+
var tableRow = require('./blocks/table-row.js');
|
|
14
|
+
var text = require('./blocks/text.js');
|
|
15
|
+
var plate = require('@udecode/plate');
|
|
16
|
+
|
|
17
|
+
const plateUI = {
|
|
18
|
+
[plate.ELEMENT_PARAGRAPH]: text.ParagraphElement,
|
|
19
|
+
[plate.ELEMENT_H1]: text.HOneElement,
|
|
20
|
+
[plate.ELEMENT_H2]: text.HTwoElement,
|
|
21
|
+
[plate.ELEMENT_H3]: text.HThreeElement,
|
|
22
|
+
[plate.ELEMENT_H4]: text.HFourElement,
|
|
23
|
+
[plate.ELEMENT_H5]: text.HFiveElement,
|
|
24
|
+
[plate.ELEMENT_H6]: text.HSixElement,
|
|
25
|
+
[plate.ELEMENT_BLOCKQUOTE]: blockquote.BlockquoteElement,
|
|
26
|
+
[plate.ELEMENT_LINK]: link.LinkElement,
|
|
27
|
+
[plate.ELEMENT_OL]: cn.withProps(list.ListElement, {
|
|
28
|
+
variant: plate.ELEMENT_OL,
|
|
29
|
+
}),
|
|
30
|
+
[plate.ELEMENT_UL]: cn.withProps(list.ListElement, {
|
|
31
|
+
variant: plate.ELEMENT_UL,
|
|
32
|
+
}),
|
|
33
|
+
[plate.ELEMENT_IMAGE]: image.ImageElement,
|
|
34
|
+
[constants.ELEMENT_BUTTON]: buttons.Button,
|
|
35
|
+
[plate.ELEMENT_TABLE]: table.TableElement,
|
|
36
|
+
[plate.ELEMENT_TD]: tableCell.TableCellElement,
|
|
37
|
+
[plate.ELEMENT_TH]: tableCell.TableCellHeaderElement,
|
|
38
|
+
[plate.ELEMENT_TR]: tableRow.TableRowElement,
|
|
39
|
+
[plate.MARK_SUBSCRIPT]: cn.withProps(plateCommon.PlateLeaf, { as: 'sub' }),
|
|
40
|
+
[plate.MARK_SUPERSCRIPT]: cn.withProps(plateCommon.PlateLeaf, { as: 'sup' }),
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
exports.plateUI = plateUI;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var plate = require('@udecode/plate');
|
|
4
|
+
var constants = require('../../constants.js');
|
|
5
|
+
|
|
6
|
+
const exitBreakPlugin = {
|
|
7
|
+
options: {
|
|
8
|
+
rules: [
|
|
9
|
+
{
|
|
10
|
+
hotkey: 'mod+enter',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
hotkey: 'mod+shift+enter',
|
|
14
|
+
before: true,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
hotkey: 'enter',
|
|
18
|
+
query: {
|
|
19
|
+
start: true,
|
|
20
|
+
end: true,
|
|
21
|
+
allow: [
|
|
22
|
+
plate.ELEMENT_BLOCKQUOTE,
|
|
23
|
+
constants.ELEMENT_BUTTON,
|
|
24
|
+
plate.ELEMENT_MEDIA,
|
|
25
|
+
plate.ELEMENT_MEDIA_EMBED,
|
|
26
|
+
plate.ELEMENT_OL,
|
|
27
|
+
plate.ELEMENT_UL,
|
|
28
|
+
...plate.KEYS_HEADING,
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.exitBreakPlugin = exitBreakPlugin;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var plate = require('@udecode/plate');
|
|
4
|
+
|
|
5
|
+
const resetBlockTypesCommonRule = {
|
|
6
|
+
types: [plate.ELEMENT_BLOCKQUOTE, plate.ELEMENT_TODO_LI],
|
|
7
|
+
defaultType: plate.ELEMENT_PARAGRAPH,
|
|
8
|
+
};
|
|
9
|
+
const resetBlockTypePlugin = {
|
|
10
|
+
options: {
|
|
11
|
+
rules: [
|
|
12
|
+
{
|
|
13
|
+
...resetBlockTypesCommonRule,
|
|
14
|
+
hotkey: 'Enter',
|
|
15
|
+
predicate: plate.isBlockAboveEmpty,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
...resetBlockTypesCommonRule,
|
|
19
|
+
hotkey: 'Backspace',
|
|
20
|
+
predicate: plate.isSelectionAtBlockStart,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.resetBlockTypePlugin = resetBlockTypePlugin;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var plate = require('@udecode/plate');
|
|
4
|
+
|
|
5
|
+
const softBreakPlugin = {
|
|
6
|
+
options: {
|
|
7
|
+
rules: [
|
|
8
|
+
{ hotkey: 'shift+enter' },
|
|
9
|
+
{
|
|
10
|
+
hotkey: 'enter',
|
|
11
|
+
query: {
|
|
12
|
+
allow: [plate.ELEMENT_CODE_BLOCK, plate.ELEMENT_BLOCKQUOTE, plate.ELEMENT_TD],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.softBreakPlugin = softBreakPlugin;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var plate = require('@udecode/plate');
|
|
4
|
+
var exitBreak = require('./exitBreak.js');
|
|
5
|
+
var resetBlockType = require('./resetBlockType.js');
|
|
6
|
+
var selectOnBackspace = require('./selectOnBackspace.js');
|
|
7
|
+
var softBreak = require('./softBreak.js');
|
|
8
|
+
|
|
9
|
+
const utils = [
|
|
10
|
+
plate.createExitBreakPlugin(exitBreak.exitBreakPlugin),
|
|
11
|
+
plate.createHistoryPlugin(),
|
|
12
|
+
plate.createResetNodePlugin(resetBlockType.resetBlockTypePlugin),
|
|
13
|
+
plate.createSelectOnBackspacePlugin(selectOnBackspace.selectOnBackspace),
|
|
14
|
+
plate.createSoftBreakPlugin(softBreak.softBreakPlugin),
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
exports.utils = utils;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var styled = require('styled-components');
|
|
5
|
+
var plate = require('@udecode/plate');
|
|
6
|
+
var tooltip = require('../../feedback/tooltip/tooltip.js');
|
|
7
|
+
var alignment_dropdown = require('../navbar/alignment_dropdown.js');
|
|
8
|
+
var style_dropdown = require('../navbar/style_dropdown.js');
|
|
9
|
+
var bold = require('../../../icons/basic/bold.js');
|
|
10
|
+
var image = require('../../../icons/basic/image.js');
|
|
11
|
+
var italic = require('../../../icons/basic/italic.js');
|
|
12
|
+
var link = require('../../../icons/basic/link.js');
|
|
13
|
+
var list_ordered = require('../../../icons/text/list_ordered.js');
|
|
14
|
+
var list_unordered = require('../../../icons/text/list_unordered.js');
|
|
15
|
+
var redo = require('../../../icons/arrow/redo.js');
|
|
16
|
+
var underline = require('../../../icons/basic/underline.js');
|
|
17
|
+
var undo = require('../../../icons/arrow/undo.js');
|
|
18
|
+
var menu_button = require('../styles/menu_button.js');
|
|
19
|
+
|
|
20
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
21
|
+
|
|
22
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
23
|
+
|
|
24
|
+
const EditorBar = ({ handleUploadImage }) => {
|
|
25
|
+
const editorRef = plate.useEditorRef('main');
|
|
26
|
+
const imageRef = React__default.default.useRef(null);
|
|
27
|
+
const boldState = plate.useMarkToolbarButtonState({ nodeType: plate.MARK_BOLD });
|
|
28
|
+
const { props: { pressed: currBold, onClick: handleBold }, } = plate.useMarkToolbarButton(boldState);
|
|
29
|
+
const italicState = plate.useMarkToolbarButtonState({ nodeType: plate.MARK_ITALIC });
|
|
30
|
+
const { props: { pressed: currItalic, onClick: handleItalic }, } = plate.useMarkToolbarButton(italicState);
|
|
31
|
+
const underlineState = plate.useMarkToolbarButtonState({
|
|
32
|
+
nodeType: plate.MARK_UNDERLINE,
|
|
33
|
+
});
|
|
34
|
+
const { props: { pressed: currUnderline, onClick: handleUnderline }, } = plate.useMarkToolbarButton(underlineState);
|
|
35
|
+
const linkState = plate.useLinkToolbarButtonState();
|
|
36
|
+
const { props: { pressed: currLink, onClick: handleLink }, } = plate.useLinkToolbarButton(linkState);
|
|
37
|
+
const orderedListState = plate.useListToolbarButtonState({ nodeType: plate.ELEMENT_OL });
|
|
38
|
+
const { props: { pressed: currOrderedList, onClick: handleOrderedList }, } = plate.useListToolbarButton(orderedListState);
|
|
39
|
+
const unorderedListState = plate.useListToolbarButtonState({
|
|
40
|
+
nodeType: plate.ELEMENT_UL,
|
|
41
|
+
});
|
|
42
|
+
const { props: { pressed: currUnorderedList, onClick: handleUnorderedList }, } = plate.useListToolbarButton(unorderedListState);
|
|
43
|
+
const handleImageChange = async () => {
|
|
44
|
+
const files = imageRef.current?.files;
|
|
45
|
+
if (!files)
|
|
46
|
+
return;
|
|
47
|
+
const imageurl = await handleUploadImage(files);
|
|
48
|
+
if (imageurl) {
|
|
49
|
+
plate.insertImage(editorRef, imageurl);
|
|
50
|
+
plate.insertNode(editorRef, {
|
|
51
|
+
type: plate.ELEMENT_PARAGRAPH,
|
|
52
|
+
children: [{ text: ' ' }],
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const handleRedo = () => editorRef.redo();
|
|
57
|
+
const handleUndo = () => editorRef.undo();
|
|
58
|
+
return (React__default.default.createElement(Menu, { "aria-label": "editor-navigation" },
|
|
59
|
+
React__default.default.createElement(MenuSection, null,
|
|
60
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Undo", place: "top" },
|
|
61
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": false, onClick: handleUndo },
|
|
62
|
+
React__default.default.createElement(undo.Undo, { size: 24, color: "grey-5" }))),
|
|
63
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Redo", place: "top" },
|
|
64
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": false, onClick: handleRedo },
|
|
65
|
+
React__default.default.createElement(redo.Redo, { size: 24, color: "grey-5" })))),
|
|
66
|
+
React__default.default.createElement(Divider, null),
|
|
67
|
+
React__default.default.createElement(MenuSection, null,
|
|
68
|
+
React__default.default.createElement(style_dropdown.StyleDropdown, { editorRef: editorRef })),
|
|
69
|
+
React__default.default.createElement(Divider, null),
|
|
70
|
+
React__default.default.createElement(MenuSection, null,
|
|
71
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": false, as: "div" },
|
|
72
|
+
React__default.default.createElement(alignment_dropdown.AlignmentDropdown, { editorRef: editorRef }))),
|
|
73
|
+
React__default.default.createElement(Divider, null),
|
|
74
|
+
React__default.default.createElement(MenuSection, null,
|
|
75
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Bold", place: "top" },
|
|
76
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": currBold, onClick: handleBold },
|
|
77
|
+
React__default.default.createElement(bold.Bold, { size: 24, color: "grey-5" }))),
|
|
78
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Italic", place: "top" },
|
|
79
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": currItalic, onClick: handleItalic },
|
|
80
|
+
React__default.default.createElement(italic.Italic, { size: 24, color: "grey-5" }))),
|
|
81
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Underline", place: "top" },
|
|
82
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": currUnderline, onClick: handleUnderline },
|
|
83
|
+
React__default.default.createElement(underline.Underline, { size: 24, color: "grey-5" })))),
|
|
84
|
+
React__default.default.createElement(Divider, null),
|
|
85
|
+
React__default.default.createElement(MenuSection, null,
|
|
86
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Link", place: "top" },
|
|
87
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": currLink, onClick: handleLink },
|
|
88
|
+
React__default.default.createElement(link.Link, { size: 24, color: "grey-5" }))),
|
|
89
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Image", place: "top" },
|
|
90
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": false, as: "label", onChange: handleImageChange },
|
|
91
|
+
React__default.default.createElement("div", null,
|
|
92
|
+
React__default.default.createElement("input", { accept: "image/*", ref: imageRef, style: { display: 'none' }, type: "file" }),
|
|
93
|
+
React__default.default.createElement(image.Image, { size: 24, color: "grey-5" }))))),
|
|
94
|
+
React__default.default.createElement(Divider, null),
|
|
95
|
+
React__default.default.createElement(MenuSection, null,
|
|
96
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Unordered List", place: "top" },
|
|
97
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": currUnorderedList, onClick: handleUnorderedList },
|
|
98
|
+
React__default.default.createElement(list_unordered.ListUnordered, { size: 24, color: "grey-5" }))),
|
|
99
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Ordered List", place: "top" },
|
|
100
|
+
React__default.default.createElement(menu_button.MenuButton, { "$active": currOrderedList, onClick: handleOrderedList },
|
|
101
|
+
React__default.default.createElement(list_ordered.ListOrdered, { size: 24, color: "grey-5" }))))));
|
|
102
|
+
};
|
|
103
|
+
const Menu = styled.styled.nav `
|
|
104
|
+
display: flex;
|
|
105
|
+
gap: 12px;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
max-width: 1200px;
|
|
108
|
+
margin: 0;
|
|
109
|
+
padding: 14px 24px;
|
|
110
|
+
background-color: var(--color-white);
|
|
111
|
+
box-sizing: border-box;
|
|
112
|
+
border-radius: 8px 8px 0px 0px;
|
|
113
|
+
box-shadow: var(--elevation-1);
|
|
114
|
+
`;
|
|
115
|
+
const MenuSection = styled.styled.div `
|
|
116
|
+
display: flex;
|
|
117
|
+
gap: 16px;
|
|
118
|
+
align-items: center;
|
|
119
|
+
width: fit-content;
|
|
120
|
+
flex-shrink: 0;
|
|
121
|
+
`;
|
|
122
|
+
const Divider = styled.styled.div `
|
|
123
|
+
width: 1px;
|
|
124
|
+
height: 28px;
|
|
125
|
+
background-color: var(--color-grey-9);
|
|
126
|
+
`;
|
|
127
|
+
|
|
128
|
+
exports.EditorBar = EditorBar;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var plate = require('@udecode/plate');
|
|
4
|
+
var text = require('../plugins/blocks/text.js');
|
|
5
|
+
var link = require('../plugins/leafs/link.js');
|
|
6
|
+
var plate$1 = require('../plugins/plate.js');
|
|
7
|
+
var exitBreak = require('../plugins/utils/exitBreak.js');
|
|
8
|
+
var resetBlockType = require('../plugins/utils/resetBlockType.js');
|
|
9
|
+
var selectOnBackspace = require('../plugins/utils/selectOnBackspace.js');
|
|
10
|
+
var softBreak = require('../plugins/utils/softBreak.js');
|
|
11
|
+
|
|
12
|
+
const plugins = plate.createPlugins([
|
|
13
|
+
plate.createHeadingPlugin(),
|
|
14
|
+
plate.createImagePlugin({
|
|
15
|
+
options: {
|
|
16
|
+
disableUploadInsert: true,
|
|
17
|
+
disableEmbedInsert: true,
|
|
18
|
+
},
|
|
19
|
+
}),
|
|
20
|
+
plate.createTextIndentPlugin(),
|
|
21
|
+
plate.createIndentListPlugin({
|
|
22
|
+
inject: {
|
|
23
|
+
props: {
|
|
24
|
+
validTypes: [
|
|
25
|
+
plate.ELEMENT_PARAGRAPH,
|
|
26
|
+
plate.ELEMENT_H1,
|
|
27
|
+
plate.ELEMENT_H2,
|
|
28
|
+
plate.ELEMENT_H3,
|
|
29
|
+
plate.ELEMENT_H4,
|
|
30
|
+
plate.ELEMENT_H5,
|
|
31
|
+
plate.ELEMENT_H6,
|
|
32
|
+
plate.ELEMENT_OL,
|
|
33
|
+
plate.ELEMENT_UL,
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
}),
|
|
38
|
+
plate.createListPlugin(),
|
|
39
|
+
plate.createMediaEmbedPlugin(),
|
|
40
|
+
plate.createParagraphPlugin(),
|
|
41
|
+
text.createHOnePlugin(),
|
|
42
|
+
text.createHTwoPlugin(),
|
|
43
|
+
text.createHThreePlugin(),
|
|
44
|
+
text.createHFourPlugin(),
|
|
45
|
+
text.createHFivePlugin(),
|
|
46
|
+
text.createHSixPlugin(),
|
|
47
|
+
plate.createResetNodePlugin(),
|
|
48
|
+
plate.createBoldPlugin(),
|
|
49
|
+
plate.createCodePlugin(),
|
|
50
|
+
plate.createFontBackgroundColorPlugin(),
|
|
51
|
+
plate.createFontSizePlugin(),
|
|
52
|
+
plate.createFontFamilyPlugin(),
|
|
53
|
+
plate.createItalicPlugin(),
|
|
54
|
+
plate.createStrikethroughPlugin(),
|
|
55
|
+
plate.createSubscriptPlugin(),
|
|
56
|
+
plate.createSuperscriptPlugin(),
|
|
57
|
+
plate.createUnderlinePlugin(),
|
|
58
|
+
plate.createAlignPlugin({
|
|
59
|
+
inject: {
|
|
60
|
+
props: {
|
|
61
|
+
validTypes: [
|
|
62
|
+
plate.ELEMENT_PARAGRAPH,
|
|
63
|
+
plate.ELEMENT_H1,
|
|
64
|
+
plate.ELEMENT_H2,
|
|
65
|
+
plate.ELEMENT_H3,
|
|
66
|
+
plate.ELEMENT_H4,
|
|
67
|
+
plate.ELEMENT_H5,
|
|
68
|
+
plate.ELEMENT_H6,
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
73
|
+
plate.createIndentPlugin({
|
|
74
|
+
inject: {
|
|
75
|
+
props: {
|
|
76
|
+
validTypes: [plate.ELEMENT_PARAGRAPH, plate.ELEMENT_H1],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
}),
|
|
80
|
+
plate.createLineHeightPlugin(),
|
|
81
|
+
plate.createLinkPlugin({
|
|
82
|
+
renderAfterEditable: link.LinkFloatingMenu,
|
|
83
|
+
}),
|
|
84
|
+
plate.createExitBreakPlugin(exitBreak.exitBreakPlugin),
|
|
85
|
+
plate.createHistoryPlugin(),
|
|
86
|
+
plate.createResetNodePlugin(resetBlockType.resetBlockTypePlugin),
|
|
87
|
+
plate.createSelectOnBackspacePlugin(selectOnBackspace.selectOnBackspace),
|
|
88
|
+
plate.createSoftBreakPlugin(softBreak.softBreakPlugin),
|
|
89
|
+
], {
|
|
90
|
+
components: plate$1.plateUI,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
exports.plugins = plugins;
|