@soul-refiner/design-system 2.0.0-alpha.14 → 2.0.0-alpha.16
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/node_modules/style-inject/dist/style-inject.es.js +3 -1
- package/dist/src/common/colors.js +4 -1
- package/dist/src/common/date.js +9 -5
- package/dist/src/common/styles.js +19 -19
- package/dist/src/components/actions/button/button.js +45 -39
- package/dist/src/components/actions/dropdown/dropdown.js +41 -35
- package/dist/src/components/actions/rate/rate.js +21 -15
- package/dist/src/components/actions/switch/switch.js +16 -10
- package/dist/src/components/actions/toggle/toggle.js +19 -13
- package/dist/src/components/actions/upload/upload.js +37 -31
- package/dist/src/components/atoms/box/box.js +20 -13
- package/dist/src/components/atoms/hide/hide.js +9 -3
- package/dist/src/components/atoms/seconds_to_duration/seconds_to_duration.js +14 -8
- package/dist/src/components/atoms/time_ago/time_ago.js +9 -3
- package/dist/src/components/atoms/typography/display.js +12 -6
- package/dist/src/components/atoms/typography/heading.js +20 -14
- package/dist/src/components/atoms/typography/paragraph.js +17 -11
- package/dist/src/components/atoms/typography/typography.js +11 -9
- package/dist/src/components/card/action/action.js +29 -22
- package/dist/src/components/card/audio/audio.js +40 -33
- package/dist/src/components/card/card.js +26 -20
- package/dist/src/components/card/feature/feature.js +46 -39
- package/dist/src/components/card/meeting/meeting.js +59 -52
- package/dist/src/components/card/person/person.js +30 -23
- package/dist/src/components/card/price/price.js +39 -33
- package/dist/src/components/card/regular/regular.js +16 -9
- package/dist/src/components/card/styles.js +6 -4
- package/dist/src/components/card/video/video.js +40 -33
- package/dist/src/components/card/written/written.js +40 -33
- package/dist/src/components/custom/courses_selection/courses_selection.js +42 -35
- package/dist/src/components/custom/users_selection/users_selection.js +38 -31
- package/dist/src/components/editor/constants.js +178 -2
- package/dist/src/components/editor/context.js +12 -6
- package/dist/src/components/editor/editor.js +27 -21
- package/dist/src/components/editor/icons/border-all.js +10 -4
- package/dist/src/components/editor/icons/border-bottom.js +10 -4
- package/dist/src/components/editor/icons/border-left.js +10 -4
- package/dist/src/components/editor/icons/border-none.js +10 -4
- package/dist/src/components/editor/icons/border-right.js +10 -4
- package/dist/src/components/editor/icons/border-top.js +10 -4
- package/dist/src/components/editor/navbar/alignment_dropdown.js +35 -29
- package/dist/src/components/editor/navbar/button_modal.js +50 -44
- package/dist/src/components/editor/navbar/navbar.js +133 -126
- package/dist/src/components/editor/navbar/style_dropdown.js +26 -20
- package/dist/src/components/editor/plugins/blocks/blockquote.js +15 -9
- package/dist/src/components/editor/plugins/blocks/blocks.js +38 -36
- package/dist/src/components/editor/plugins/blocks/buttons.js +31 -24
- package/dist/src/components/editor/plugins/blocks/dropdown-menu.js +58 -31
- package/dist/src/components/editor/plugins/blocks/image.js +34 -28
- package/dist/src/components/editor/plugins/blocks/list.js +14 -8
- package/dist/src/components/editor/plugins/blocks/media-popover.js +31 -25
- package/dist/src/components/editor/plugins/blocks/plate-button.js +32 -9
- package/dist/src/components/editor/plugins/blocks/popover.js +38 -12
- package/dist/src/components/editor/plugins/blocks/qa.js +35 -28
- package/dist/src/components/editor/plugins/blocks/resizable.js +19 -11
- package/dist/src/components/editor/plugins/blocks/separator.js +28 -6
- package/dist/src/components/editor/plugins/blocks/table-cell.js +30 -23
- package/dist/src/components/editor/plugins/blocks/table-row.js +13 -7
- package/dist/src/components/editor/plugins/blocks/table.js +81 -73
- package/dist/src/components/editor/plugins/blocks/text.js +73 -54
- package/dist/src/components/editor/plugins/blocks/video.js +22 -15
- package/dist/src/components/editor/plugins/leafs/leafs.js +20 -18
- package/dist/src/components/editor/plugins/leafs/link.js +41 -34
- package/dist/src/components/editor/plugins/marks/marks.js +13 -11
- package/dist/src/components/editor/plugins/plate.js +37 -35
- package/dist/src/components/editor/plugins/utils/exitBreak.js +12 -10
- package/dist/src/components/editor/plugins/utils/resetBlockType.js +8 -6
- package/dist/src/components/editor/plugins/utils/selectOnBackspace.js +5 -3
- package/dist/src/components/editor/plugins/utils/softBreak.js +5 -3
- package/dist/src/components/editor/plugins/utils/utils.js +13 -11
- package/dist/src/components/editor/simple_editor/navbar.js +89 -83
- package/dist/src/components/editor/simple_editor/plugins.js +64 -62
- package/dist/src/components/editor/simple_editor/simple_editor.js +19 -13
- package/dist/src/components/editor/styles/menu_button.js +5 -3
- package/dist/src/components/feedback/animated_toast/animated_toast.js +18 -12
- package/dist/src/components/feedback/badge/badge.js +15 -9
- package/dist/src/components/feedback/banner/banner.js +31 -25
- package/dist/src/components/feedback/chip/chip.js +15 -9
- package/dist/src/components/feedback/loader/loader.js +14 -8
- package/dist/src/components/feedback/notification/notification.js +30 -24
- package/dist/src/components/feedback/progress/progress.js +34 -28
- package/dist/src/components/feedback/toast/toast.js +30 -24
- package/dist/src/components/feedback/tooltip/tooltip.js +15 -9
- package/dist/src/components/iconography/avatar/avatar.js +54 -47
- package/dist/src/components/iconography/avatar/icons/approved.js +12 -6
- package/dist/src/components/iconography/avatar/icons/busy.js +12 -6
- package/dist/src/components/iconography/avatar/icons/declined.js +12 -6
- package/dist/src/components/iconography/avatar/icons/default.js +11 -5
- package/dist/src/components/iconography/avatar/icons/focus.js +12 -6
- package/dist/src/components/iconography/avatar/icons/locked.js +12 -6
- package/dist/src/components/iconography/avatar/icons/offline.js +12 -6
- package/dist/src/components/iconography/avatar/icons/online.js +11 -5
- package/dist/src/components/iconography/avatar/icons/subscribed.js +18 -12
- package/dist/src/components/iconography/icon/icon.js +12 -6
- package/dist/src/components/input/calendar/calendar.js +55 -49
- package/dist/src/components/input/checkbox/checkbox.js +14 -8
- package/dist/src/components/input/date/date.js +72 -66
- package/dist/src/components/input/filter/filter.js +67 -61
- package/dist/src/components/input/filter/filter_option.js +24 -17
- package/dist/src/components/input/radio/radio.js +19 -13
- package/dist/src/components/input/search/search.js +26 -20
- package/dist/src/components/input/select/select.js +16 -10
- package/dist/src/components/input/text_area/text_area.js +27 -21
- package/dist/src/components/input/text_input/text_input.js +30 -24
- package/dist/src/components/input/time/time.js +18 -12
- package/dist/src/components/media/video/video.js +15 -7
- package/dist/src/components/media/video-player/playlist-item.js +30 -23
- package/dist/src/components/media/video-player/video.js +56 -48
- package/dist/src/components/navigation/breadcrumb/breadcrumb.js +29 -22
- package/dist/src/components/navigation/inner/inner.js +51 -44
- package/dist/src/components/navigation/tabs/tabs.js +20 -13
- package/dist/src/components/surfaces/accordion/accordion.js +26 -20
- package/dist/src/components/surfaces/calendar_date/calendar_date.js +26 -20
- package/dist/src/components/surfaces/carousel/card/card.js +21 -15
- package/dist/src/components/surfaces/comment/comment.js +82 -75
- package/dist/src/components/surfaces/comment/helpers.js +3 -1
- package/dist/src/components/surfaces/drawer/drawer.js +32 -26
- package/dist/src/components/surfaces/message/message.js +22 -16
- package/dist/src/components/surfaces/modal/modal.js +35 -29
- package/dist/src/components/surfaces/portal/portal.js +13 -6
- package/dist/src/components/surfaces/post/post.js +63 -55
- package/dist/src/components/table/table/table.js +26 -20
- package/dist/src/emoji/emojis.json.js +9 -1
- package/dist/src/icons/arrow/arrow_all.js +11 -5
- package/dist/src/icons/arrow/arrow_all_diagonal.js +11 -5
- package/dist/src/icons/arrow/arrow_both_downwards.js +11 -5
- package/dist/src/icons/arrow/arrow_both_upwards.js +11 -5
- package/dist/src/icons/arrow/arrow_circle_left.js +11 -5
- package/dist/src/icons/arrow/arrow_circle_left_double.js +11 -5
- package/dist/src/icons/arrow/arrow_circle_left_double_alert.js +13 -7
- package/dist/src/icons/arrow/arrow_circle_right.js +11 -5
- package/dist/src/icons/arrow/arrow_circle_right_double.js +11 -5
- package/dist/src/icons/arrow/arrow_circle_right_double_alert.js +11 -5
- package/dist/src/icons/arrow/arrow_diagonal_down_left.js +11 -5
- package/dist/src/icons/arrow/arrow_diagonal_down_left_circle.js +11 -5
- package/dist/src/icons/arrow/arrow_diagonal_down_right.js +11 -5
- package/dist/src/icons/arrow/arrow_diagonal_down_right_circle.js +11 -5
- package/dist/src/icons/arrow/arrow_diagonal_up_left.js +11 -5
- package/dist/src/icons/arrow/arrow_diagonal_up_left_circle.js +11 -5
- package/dist/src/icons/arrow/arrow_diagonal_up_right.js +11 -5
- package/dist/src/icons/arrow/arrow_diagonal_up_right_circle.js +11 -5
- package/dist/src/icons/arrow/arrow_down.js +11 -5
- package/dist/src/icons/arrow/arrow_down_bold.js +11 -5
- package/dist/src/icons/arrow/arrow_down_circle.js +11 -5
- package/dist/src/icons/arrow/arrow_left.js +11 -5
- package/dist/src/icons/arrow/arrow_left_bold.js +11 -5
- package/dist/src/icons/arrow/arrow_left_circle.js +11 -5
- package/dist/src/icons/arrow/arrow_left_curved.js +11 -5
- package/dist/src/icons/arrow/arrow_left_curved_circle.js +11 -5
- package/dist/src/icons/arrow/arrow_right.js +11 -5
- package/dist/src/icons/arrow/arrow_right_bold.js +11 -5
- package/dist/src/icons/arrow/arrow_right_circle.js +11 -5
- package/dist/src/icons/arrow/arrow_right_curved.js +11 -5
- package/dist/src/icons/arrow/arrow_right_curved_circle.js +11 -5
- package/dist/src/icons/arrow/arrow_up.js +11 -5
- package/dist/src/icons/arrow/arrow_up_bold.js +11 -5
- package/dist/src/icons/arrow/arrow_up_circle.js +11 -5
- package/dist/src/icons/arrow/chevron_down.js +11 -5
- package/dist/src/icons/arrow/chevron_down_circle.js +11 -5
- package/dist/src/icons/arrow/chevron_down_double.js +11 -5
- package/dist/src/icons/arrow/chevron_down_double_circle.js +11 -5
- package/dist/src/icons/arrow/chevron_left.js +11 -5
- package/dist/src/icons/arrow/chevron_left_circle.js +11 -5
- package/dist/src/icons/arrow/chevron_left_double.js +11 -5
- package/dist/src/icons/arrow/chevron_left_double_circle.js +11 -5
- package/dist/src/icons/arrow/chevron_right.js +11 -5
- package/dist/src/icons/arrow/chevron_right_circle.js +11 -5
- package/dist/src/icons/arrow/chevron_right_double.js +11 -5
- package/dist/src/icons/arrow/chevron_right_double_circle.js +11 -5
- package/dist/src/icons/arrow/chevron_scroll.js +11 -5
- package/dist/src/icons/arrow/chevron_up.js +11 -5
- package/dist/src/icons/arrow/chevron_up_circle.js +11 -5
- package/dist/src/icons/arrow/chevron_up_double.js +11 -5
- package/dist/src/icons/arrow/chevron_up_double_circle.js +11 -5
- package/dist/src/icons/arrow/forward_all.js +11 -5
- package/dist/src/icons/arrow/forward_all_bold.js +11 -5
- package/dist/src/icons/arrow/forward_bold.js +11 -5
- package/dist/src/icons/arrow/redo.js +11 -5
- package/dist/src/icons/arrow/redo_bold.js +11 -5
- package/dist/src/icons/arrow/reply.js +11 -5
- package/dist/src/icons/arrow/reply_all.js +11 -5
- package/dist/src/icons/arrow/reply_all_bold.js +11 -5
- package/dist/src/icons/arrow/reply_bold.js +11 -5
- package/dist/src/icons/arrow/undo.js +11 -5
- package/dist/src/icons/arrow/undo_bold.js +11 -5
- package/dist/src/icons/audio_video/drag_indicator.js +11 -5
- package/dist/src/icons/audio_video/eject.js +11 -5
- package/dist/src/icons/audio_video/equalizer.js +11 -5
- package/dist/src/icons/audio_video/fast_forward.js +11 -5
- package/dist/src/icons/audio_video/fast_forward_30.js +11 -5
- package/dist/src/icons/audio_video/fullscreen.js +11 -5
- package/dist/src/icons/audio_video/headphones.js +11 -5
- package/dist/src/icons/audio_video/library_add.js +11 -5
- package/dist/src/icons/audio_video/library_music.js +11 -5
- package/dist/src/icons/audio_video/microphone.js +11 -5
- package/dist/src/icons/audio_video/musical_note.js +11 -5
- package/dist/src/icons/audio_video/next.js +11 -5
- package/dist/src/icons/audio_video/pause.js +11 -5
- package/dist/src/icons/audio_video/pause_circle.js +11 -5
- package/dist/src/icons/audio_video/play.js +11 -5
- package/dist/src/icons/audio_video/play_circle.js +11 -5
- package/dist/src/icons/audio_video/play_display.js +11 -5
- package/dist/src/icons/audio_video/play_pause.js +11 -5
- package/dist/src/icons/audio_video/play_solid.js +11 -5
- package/dist/src/icons/audio_video/player_list.js +11 -5
- package/dist/src/icons/audio_video/player_list_add.js +11 -5
- package/dist/src/icons/audio_video/player_list_play.js +11 -5
- package/dist/src/icons/audio_video/previous.js +11 -5
- package/dist/src/icons/audio_video/radio.js +11 -5
- package/dist/src/icons/audio_video/record.js +11 -5
- package/dist/src/icons/audio_video/repeat.js +11 -5
- package/dist/src/icons/audio_video/rewind.js +11 -5
- package/dist/src/icons/audio_video/rewind_30.js +11 -5
- package/dist/src/icons/audio_video/shuffle.js +11 -5
- package/dist/src/icons/audio_video/sound_wave.js +11 -5
- package/dist/src/icons/audio_video/stop.js +11 -5
- package/dist/src/icons/audio_video/stop_circle.js +11 -5
- package/dist/src/icons/audio_video/subscriptions.js +11 -5
- package/dist/src/icons/audio_video/tuner.js +11 -5
- package/dist/src/icons/audio_video/volume.js +11 -5
- package/dist/src/icons/audio_video/volume_high.js +11 -5
- package/dist/src/icons/audio_video/volume_low.js +11 -5
- package/dist/src/icons/audio_video/volume_slash.js +11 -5
- package/dist/src/icons/basic/aa_sansserif.js +12 -6
- package/dist/src/icons/basic/aa_serif.js +12 -6
- package/dist/src/icons/basic/anchor.js +13 -7
- package/dist/src/icons/basic/bible.js +11 -5
- package/dist/src/icons/basic/bold.js +11 -5
- package/dist/src/icons/basic/book.js +11 -5
- package/dist/src/icons/basic/book_open.js +11 -5
- package/dist/src/icons/basic/bookmark.js +11 -5
- package/dist/src/icons/basic/bookmark_add.js +11 -5
- package/dist/src/icons/basic/bookmark_slash.js +11 -5
- package/dist/src/icons/basic/bookmarks.js +11 -5
- package/dist/src/icons/basic/books.js +14 -8
- package/dist/src/icons/basic/box.js +11 -5
- package/dist/src/icons/basic/briefcase.js +11 -5
- package/dist/src/icons/basic/browse_activity.js +11 -5
- package/dist/src/icons/basic/browser.js +11 -5
- package/dist/src/icons/basic/browser_slash.js +11 -5
- package/dist/src/icons/basic/calculator.js +11 -5
- package/dist/src/icons/basic/camera.js +11 -5
- package/dist/src/icons/basic/camera_add.js +11 -5
- package/dist/src/icons/basic/camera_slash.js +11 -5
- package/dist/src/icons/basic/checkmark.js +11 -5
- package/dist/src/icons/basic/checkmark_circle.js +13 -7
- package/dist/src/icons/basic/checkmark_filled.js +11 -5
- package/dist/src/icons/basic/checkmarks.js +11 -5
- package/dist/src/icons/basic/circle.js +11 -5
- package/dist/src/icons/basic/circle_slash.js +13 -7
- package/dist/src/icons/basic/clear_text_style.js +11 -5
- package/dist/src/icons/basic/close.js +11 -5
- package/dist/src/icons/basic/close_circle.js +11 -5
- package/dist/src/icons/basic/close_filled.js +11 -5
- package/dist/src/icons/basic/copy.js +11 -5
- package/dist/src/icons/basic/delete.js +11 -5
- package/dist/src/icons/basic/detail.js +11 -5
- package/dist/src/icons/basic/dot.js +11 -5
- package/dist/src/icons/basic/download.js +11 -5
- package/dist/src/icons/basic/download_arrow.js +11 -5
- package/dist/src/icons/basic/droplet.js +13 -7
- package/dist/src/icons/basic/ellipsis_horizontal.js +11 -5
- package/dist/src/icons/basic/ellipsis_horizontal_circle.js +11 -5
- package/dist/src/icons/basic/ellipsis_vertical.js +11 -5
- package/dist/src/icons/basic/ellipsis_vertical_circle.js +11 -5
- package/dist/src/icons/basic/eye.js +11 -5
- package/dist/src/icons/basic/eye_slash.js +11 -5
- package/dist/src/icons/basic/fingerprint.js +11 -5
- package/dist/src/icons/basic/flag.js +11 -5
- package/dist/src/icons/basic/flag_wave.js +11 -5
- package/dist/src/icons/basic/flag_wave_filled.js +11 -5
- package/dist/src/icons/basic/flame.js +11 -5
- package/dist/src/icons/basic/gauge.js +11 -5
- package/dist/src/icons/basic/glasses.js +11 -5
- package/dist/src/icons/basic/graduation_cap.js +11 -5
- package/dist/src/icons/basic/hashmark.js +11 -5
- package/dist/src/icons/basic/heart.js +11 -5
- package/dist/src/icons/basic/heart_slash.js +11 -5
- package/dist/src/icons/basic/highlighter.js +11 -5
- package/dist/src/icons/basic/home.js +11 -5
- package/dist/src/icons/basic/image.js +11 -5
- package/dist/src/icons/basic/inbox.js +11 -5
- package/dist/src/icons/basic/italic.js +11 -5
- package/dist/src/icons/basic/layers.js +11 -5
- package/dist/src/icons/basic/lightening.js +11 -5
- package/dist/src/icons/basic/lightening_slash.js +11 -5
- package/dist/src/icons/basic/link.js +11 -5
- package/dist/src/icons/basic/link_slash.js +11 -5
- package/dist/src/icons/basic/loudspeaker.js +11 -5
- package/dist/src/icons/basic/maximize.js +11 -5
- package/dist/src/icons/basic/menu.js +11 -5
- package/dist/src/icons/basic/menu_circle.js +11 -5
- package/dist/src/icons/basic/menu_dots.js +11 -5
- package/dist/src/icons/basic/microphone_slash.js +11 -5
- package/dist/src/icons/basic/minimize.js +11 -5
- package/dist/src/icons/basic/minus.js +11 -5
- package/dist/src/icons/basic/minus_circle.js +11 -5
- package/dist/src/icons/basic/move_item.js +11 -5
- package/dist/src/icons/basic/new.js +11 -5
- package/dist/src/icons/basic/newspaper.js +11 -5
- package/dist/src/icons/basic/node.js +11 -5
- package/dist/src/icons/basic/note_pad.js +12 -6
- package/dist/src/icons/basic/options.js +11 -5
- package/dist/src/icons/basic/paint_brush.js +11 -5
- package/dist/src/icons/basic/paperclip.js +11 -5
- package/dist/src/icons/basic/paperclip_slash.js +11 -5
- package/dist/src/icons/basic/pencil.js +11 -5
- package/dist/src/icons/basic/pencil_pad.js +11 -5
- package/dist/src/icons/basic/plus.js +11 -5
- package/dist/src/icons/basic/plus_circle.js +11 -5
- package/dist/src/icons/basic/presentation.js +11 -5
- package/dist/src/icons/basic/printer.js +11 -5
- package/dist/src/icons/basic/profile.js +11 -5
- package/dist/src/icons/basic/profile_check.js +11 -5
- package/dist/src/icons/basic/pulse.js +11 -5
- package/dist/src/icons/basic/qr_code.js +11 -5
- package/dist/src/icons/basic/resize.js +13 -7
- package/dist/src/icons/basic/scan.js +11 -5
- package/dist/src/icons/basic/scissors.js +11 -5
- package/dist/src/icons/basic/screenshot.js +11 -5
- package/dist/src/icons/basic/search.js +11 -5
- package/dist/src/icons/basic/select_item.js +12 -6
- package/dist/src/icons/basic/settings.js +11 -5
- package/dist/src/icons/basic/share.js +11 -5
- package/dist/src/icons/basic/share_external.js +11 -5
- package/dist/src/icons/basic/square.js +11 -5
- package/dist/src/icons/basic/star.js +11 -5
- package/dist/src/icons/basic/star_circle.js +11 -5
- package/dist/src/icons/basic/star_filled.js +11 -5
- package/dist/src/icons/basic/star_filled_half.js +11 -5
- package/dist/src/icons/basic/star_slash.js +11 -5
- package/dist/src/icons/basic/sticker.js +11 -5
- package/dist/src/icons/basic/strikethrough.js +11 -5
- package/dist/src/icons/basic/subtask.js +12 -6
- package/dist/src/icons/basic/tax.js +14 -8
- package/dist/src/icons/basic/text_bg_color.js +11 -5
- package/dist/src/icons/basic/text_color.js +11 -5
- package/dist/src/icons/basic/textbox.js +11 -5
- package/dist/src/icons/basic/thumbs_down.js +11 -5
- package/dist/src/icons/basic/thumbs_up.js +11 -5
- package/dist/src/icons/basic/thumbs_up_filled.js +11 -5
- package/dist/src/icons/basic/toggle_left.js +11 -5
- package/dist/src/icons/basic/toggle_right.js +11 -5
- package/dist/src/icons/basic/translate.js +11 -5
- package/dist/src/icons/basic/trash.js +11 -5
- package/dist/src/icons/basic/trash_slash.js +11 -5
- package/dist/src/icons/basic/underline.js +11 -5
- package/dist/src/icons/basic/upload.js +11 -5
- package/dist/src/icons/basic/video.js +11 -5
- package/dist/src/icons/basic/video_add.js +12 -6
- package/dist/src/icons/basic/video_slash.js +11 -5
- package/dist/src/icons/basic/wrench.js +11 -5
- package/dist/src/icons/basic/zoom_in.js +11 -5
- package/dist/src/icons/basic/zoom_out.js +11 -5
- package/dist/src/icons/data/bar_chart.js +11 -5
- package/dist/src/icons/data/bar_chart_downward.js +11 -5
- package/dist/src/icons/data/bar_chart_downward_outline.js +11 -5
- package/dist/src/icons/data/bar_chart_upward.js +11 -5
- package/dist/src/icons/data/bar_chart_upward_outline.js +11 -5
- package/dist/src/icons/data/candlestick_chart.js +11 -5
- package/dist/src/icons/data/four_circles.js +11 -5
- package/dist/src/icons/data/legend_toggle.js +11 -5
- package/dist/src/icons/data/line_chart.js +11 -5
- package/dist/src/icons/data/line_chart_area.js +11 -5
- package/dist/src/icons/data/line_chart_area_shaded.js +11 -5
- package/dist/src/icons/data/line_chart_double.js +11 -5
- package/dist/src/icons/data/line_chart_downward.js +11 -5
- package/dist/src/icons/data/line_chart_node.js +11 -5
- package/dist/src/icons/data/line_chart_outline.js +11 -5
- package/dist/src/icons/data/line_chart_search.js +11 -5
- package/dist/src/icons/data/line_chart_stars.js +11 -5
- package/dist/src/icons/data/line_chart_upward.js +11 -5
- package/dist/src/icons/data/pie_chart.js +12 -6
- package/dist/src/icons/data/tree.js +11 -5
- package/dist/src/icons/email/mail.js +11 -5
- package/dist/src/icons/email/mail_check.js +11 -5
- package/dist/src/icons/email/mail_minus.js +11 -5
- package/dist/src/icons/email/mail_send.js +11 -5
- package/dist/src/icons/email/send.js +11 -5
- package/dist/src/icons/email/send_close.js +11 -5
- package/dist/src/icons/email/send_schedule.js +11 -5
- package/dist/src/icons/email/send_text.js +11 -5
- package/dist/src/icons/emoji/emoji_add.js +11 -5
- package/dist/src/icons/emoji/laughing.js +11 -5
- package/dist/src/icons/emoji/neutral.js +11 -5
- package/dist/src/icons/emoji/sad.js +11 -5
- package/dist/src/icons/emoji/shocked.js +11 -5
- package/dist/src/icons/emoji/smile.js +11 -5
- package/dist/src/icons/file/clipboard.js +11 -5
- package/dist/src/icons/file/clipboard_check.js +11 -5
- package/dist/src/icons/file/clipboard_close.js +11 -5
- package/dist/src/icons/file/clipboard_minus.js +11 -5
- package/dist/src/icons/file/clipboard_plus.js +11 -5
- package/dist/src/icons/file/clipboard_text.js +11 -5
- package/dist/src/icons/file/file.js +11 -5
- package/dist/src/icons/file/file_add.js +11 -5
- package/dist/src/icons/file/file_check.js +11 -5
- package/dist/src/icons/file/file_close.js +11 -5
- package/dist/src/icons/file/file_code.js +11 -5
- package/dist/src/icons/file/file_download.js +11 -5
- package/dist/src/icons/file/file_draft.js +11 -5
- package/dist/src/icons/file/file_gear.js +12 -6
- package/dist/src/icons/file/file_minus.js +11 -5
- package/dist/src/icons/file/file_plus.js +11 -5
- package/dist/src/icons/file/file_scan.js +11 -5
- package/dist/src/icons/file/file_shred.js +11 -5
- package/dist/src/icons/file/file_text.js +11 -5
- package/dist/src/icons/file/file_upload.js +11 -5
- package/dist/src/icons/file/folder.js +11 -5
- package/dist/src/icons/file/folder_add.js +11 -5
- package/dist/src/icons/file/folder_arrow.js +11 -5
- package/dist/src/icons/file/folder_check.js +11 -5
- package/dist/src/icons/file/folder_close.js +11 -5
- package/dist/src/icons/file/folder_cloud.js +11 -5
- package/dist/src/icons/file/folder_gear.js +12 -6
- package/dist/src/icons/file/folder_minus.js +11 -5
- package/dist/src/icons/file/folder_music.js +11 -5
- package/dist/src/icons/file/folder_open.js +11 -5
- package/dist/src/icons/file/folder_plus.js +11 -5
- package/dist/src/icons/file/folder_zip.js +11 -5
- package/dist/src/icons/file/note.js +11 -5
- package/dist/src/icons/file/note_text.js +11 -5
- package/dist/src/icons/file/pdf.js +11 -5
- package/dist/src/icons/file/photo.js +11 -5
- package/dist/src/icons/finance/bitcoin.js +11 -5
- package/dist/src/icons/finance/coins.js +15 -9
- package/dist/src/icons/finance/credit_card.js +11 -5
- package/dist/src/icons/finance/credit_card_add.js +11 -5
- package/dist/src/icons/finance/credit_card_face.js +11 -5
- package/dist/src/icons/finance/credit_card_member.js +11 -5
- package/dist/src/icons/finance/credit_card_outcome.js +11 -5
- package/dist/src/icons/finance/credit_card_scan.js +11 -5
- package/dist/src/icons/finance/credit_card_share.js +11 -5
- package/dist/src/icons/finance/credit_card_slash.js +11 -5
- package/dist/src/icons/finance/currency_exchange.js +11 -5
- package/dist/src/icons/finance/dollar.js +11 -5
- package/dist/src/icons/finance/ethereum.js +11 -5
- package/dist/src/icons/finance/paypass.js +11 -5
- package/dist/src/icons/finance/strongbox.js +11 -5
- package/dist/src/icons/finance/wallet.js +11 -5
- package/dist/src/icons/index.js +1095 -545
- package/dist/src/icons/layout/block_align_bottom.js +11 -5
- package/dist/src/icons/layout/block_align_center.js +11 -5
- package/dist/src/icons/layout/block_align_left.js +11 -5
- package/dist/src/icons/layout/block_align_middle.js +11 -5
- package/dist/src/icons/layout/block_align_right.js +11 -5
- package/dist/src/icons/layout/block_align_top.js +11 -5
- package/dist/src/icons/layout/block_horizontal.js +11 -5
- package/dist/src/icons/layout/block_vertical.js +11 -5
- package/dist/src/icons/layout/edit_shape.js +11 -5
- package/dist/src/icons/layout/elements.js +11 -5
- package/dist/src/icons/layout/elements_add.js +11 -5
- package/dist/src/icons/layout/elements_filled.js +11 -5
- package/dist/src/icons/layout/elements_masonry.js +11 -5
- package/dist/src/icons/layout/frame.js +11 -5
- package/dist/src/icons/layout/frame_stack.js +11 -5
- package/dist/src/icons/layout/grid.js +11 -5
- package/dist/src/icons/layout/grid_column_three.js +11 -5
- package/dist/src/icons/layout/grid_column_two.js +11 -5
- package/dist/src/icons/layout/grid_dynamic.js +11 -5
- package/dist/src/icons/layout/grid_frame.js +11 -5
- package/dist/src/icons/layout/grid_row_three.js +11 -5
- package/dist/src/icons/layout/grid_row_two.js +11 -5
- package/dist/src/icons/layout/grid_six.js +11 -5
- package/dist/src/icons/layout/grid_small.js +11 -5
- package/dist/src/icons/layout/iframe.js +11 -5
- package/dist/src/icons/layout/kanban.js +11 -5
- package/dist/src/icons/layout/layout.js +11 -5
- package/dist/src/icons/layout/list.js +11 -5
- package/dist/src/icons/layout/list_filled.js +16 -10
- package/dist/src/icons/layout/padding.js +11 -5
- package/dist/src/icons/layout/page_break.js +11 -5
- package/dist/src/icons/layout/rotate_left.js +11 -5
- package/dist/src/icons/layout/rotate_right.js +11 -5
- package/dist/src/icons/layout/ruler.js +11 -5
- package/dist/src/icons/layout/segment.js +11 -5
- package/dist/src/icons/layout/select_area.js +11 -5
- package/dist/src/icons/layout/select_boundary.js +11 -5
- package/dist/src/icons/layout/sidebar_left.js +11 -5
- package/dist/src/icons/layout/sidebar_right.js +11 -5
- package/dist/src/icons/layout/slides.js +11 -5
- package/dist/src/icons/layout/slides_horizontal.js +11 -5
- package/dist/src/icons/layout/slides_vertical.js +16 -10
- package/dist/src/icons/layout/stack.js +11 -5
- package/dist/src/icons/layout/text.js +11 -5
- package/dist/src/icons/maps/atlas.js +11 -5
- package/dist/src/icons/maps/compass.js +11 -5
- package/dist/src/icons/maps/direction.js +11 -5
- package/dist/src/icons/maps/direction_angled.js +11 -5
- package/dist/src/icons/maps/globe.js +11 -5
- package/dist/src/icons/maps/globe_slash.js +11 -5
- package/dist/src/icons/maps/location.js +11 -5
- package/dist/src/icons/maps/location_slash.js +11 -5
- package/dist/src/icons/maps/map.js +11 -5
- package/dist/src/icons/maps/marker.js +11 -5
- package/dist/src/icons/maps/panorama.js +11 -5
- package/dist/src/icons/maps/pin.js +11 -5
- package/dist/src/icons/maps/pin_arrow.js +11 -5
- package/dist/src/icons/maps/pin_location.js +11 -5
- package/dist/src/icons/maps/pin_plus.js +11 -5
- package/dist/src/icons/maps/pin_question.js +11 -5
- package/dist/src/icons/maps/pin_slash.js +11 -5
- package/dist/src/icons/maps/push_pin.js +11 -5
- package/dist/src/icons/maps/push_pin_filled.js +11 -5
- package/dist/src/icons/maps/push_pin_slash.js +11 -5
- package/dist/src/icons/maps/radar.js +11 -5
- package/dist/src/icons/maps/route.js +11 -5
- package/dist/src/icons/message/bubble.js +11 -5
- package/dist/src/icons/message/bubble_question.js +11 -5
- package/dist/src/icons/message/comment.js +11 -5
- package/dist/src/icons/message/comment_add.js +11 -5
- package/dist/src/icons/message/comment_check.js +11 -5
- package/dist/src/icons/message/comment_close.js +11 -5
- package/dist/src/icons/message/comment_minus.js +11 -5
- package/dist/src/icons/message/comment_text.js +11 -5
- package/dist/src/icons/misc/advertisement.js +11 -5
- package/dist/src/icons/misc/atom.js +11 -5
- package/dist/src/icons/misc/bone.js +11 -5
- package/dist/src/icons/misc/brightness_high.js +11 -5
- package/dist/src/icons/misc/brightness_low.js +11 -5
- package/dist/src/icons/misc/contrast.js +11 -5
- package/dist/src/icons/misc/crosshairs.js +11 -5
- package/dist/src/icons/misc/crown.js +11 -5
- package/dist/src/icons/misc/footprint.js +11 -5
- package/dist/src/icons/misc/form.js +11 -5
- package/dist/src/icons/misc/funnel.js +11 -5
- package/dist/src/icons/misc/infinite.js +11 -5
- package/dist/src/icons/misc/insert_button.js +11 -5
- package/dist/src/icons/misc/light_bulb.js +11 -5
- package/dist/src/icons/misc/moon.js +11 -5
- package/dist/src/icons/misc/nut.js +11 -5
- package/dist/src/icons/misc/planet.js +11 -5
- package/dist/src/icons/misc/plus_thick.js +11 -5
- package/dist/src/icons/misc/pocket.js +11 -5
- package/dist/src/icons/misc/rocket.js +11 -5
- package/dist/src/icons/misc/soup.js +15 -9
- package/dist/src/icons/misc/sun.js +11 -5
- package/dist/src/icons/misc/toy_horse.js +11 -5
- package/dist/src/icons/misc/trophy.js +11 -5
- package/dist/src/icons/misc/watercloset.js +11 -5
- package/dist/src/icons/notifications/alert_circle.js +11 -5
- package/dist/src/icons/notifications/alert_octogon.js +11 -5
- package/dist/src/icons/notifications/alert_triangle.js +11 -5
- package/dist/src/icons/notifications/app_notification.js +11 -5
- package/dist/src/icons/notifications/bell.js +11 -5
- package/dist/src/icons/notifications/bell_alert.js +11 -5
- package/dist/src/icons/notifications/bell_checkmark.js +11 -5
- package/dist/src/icons/notifications/bell_minus.js +11 -5
- package/dist/src/icons/notifications/bell_plus.js +11 -5
- package/dist/src/icons/notifications/bell_ring.js +13 -7
- package/dist/src/icons/notifications/bell_slash.js +11 -5
- package/dist/src/icons/notifications/information.js +11 -5
- package/dist/src/icons/notifications/minus_octogon.js +11 -5
- package/dist/src/icons/notifications/question_circle.js +11 -5
- package/dist/src/icons/people/group.js +11 -5
- package/dist/src/icons/people/group_add.js +11 -5
- package/dist/src/icons/people/group_chat.js +13 -7
- package/dist/src/icons/people/group_remove.js +11 -5
- package/dist/src/icons/people/group_send.js +12 -6
- package/dist/src/icons/people/groups.js +11 -5
- package/dist/src/icons/people/person.js +11 -5
- package/dist/src/icons/people/person_add.js +11 -5
- package/dist/src/icons/people/person_checkmark.js +11 -5
- package/dist/src/icons/people/person_circle.js +13 -7
- package/dist/src/icons/people/person_close.js +13 -7
- package/dist/src/icons/people/person_remove.js +11 -5
- package/dist/src/icons/people/person_slash.js +13 -7
- package/dist/src/icons/phone/keypad.js +11 -5
- package/dist/src/icons/phone/phone.js +11 -5
- package/dist/src/icons/phone/phone_add.js +11 -5
- package/dist/src/icons/phone/phone_calling.js +11 -5
- package/dist/src/icons/phone/phone_check.js +11 -5
- package/dist/src/icons/phone/phone_close.js +11 -5
- package/dist/src/icons/phone/phone_decline.js +11 -5
- package/dist/src/icons/phone/phone_forwarded.js +11 -5
- package/dist/src/icons/phone/phone_hash.js +11 -5
- package/dist/src/icons/phone/phone_incoming.js +11 -5
- package/dist/src/icons/phone/phone_outgoing.js +11 -5
- package/dist/src/icons/phone/phone_pause.js +11 -5
- package/dist/src/icons/phone/phone_slash.js +11 -5
- package/dist/src/icons/phone/voicemail.js +11 -5
- package/dist/src/icons/security/key.js +11 -5
- package/dist/src/icons/security/key_slash.js +11 -5
- package/dist/src/icons/security/lock.js +11 -5
- package/dist/src/icons/security/lock_circle.js +11 -5
- package/dist/src/icons/security/lock_open.js +11 -5
- package/dist/src/icons/security/lock_slash.js +11 -5
- package/dist/src/icons/security/shield.js +11 -5
- package/dist/src/icons/security/shield_checkmark.js +11 -5
- package/dist/src/icons/security/shield_lock.js +11 -5
- package/dist/src/icons/security/shield_slash.js +11 -5
- package/dist/src/icons/security/verified.js +11 -5
- package/dist/src/icons/shopping/basket.js +11 -5
- package/dist/src/icons/shopping/cart.js +11 -5
- package/dist/src/icons/shopping/cart_filled.js +11 -5
- package/dist/src/icons/shopping/coupon.js +11 -5
- package/dist/src/icons/shopping/coupon_cut.js +11 -5
- package/dist/src/icons/shopping/delivery.js +11 -5
- package/dist/src/icons/shopping/discount.js +11 -5
- package/dist/src/icons/shopping/gift.js +11 -5
- package/dist/src/icons/shopping/gift_bag.js +11 -5
- package/dist/src/icons/shopping/inventory.js +11 -5
- package/dist/src/icons/shopping/point_of_sale.js +11 -5
- package/dist/src/icons/shopping/shirt.js +11 -5
- package/dist/src/icons/shopping/tag.js +11 -5
- package/dist/src/icons/shopping/tag_diagonal.js +11 -5
- package/dist/src/icons/shopping/tote.js +11 -5
- package/dist/src/icons/special/upload_audio.js +16 -10
- package/dist/src/icons/special/upload_file.js +11 -5
- package/dist/src/icons/special/upload_image.js +13 -7
- package/dist/src/icons/special/upload_video.js +14 -8
- package/dist/src/icons/symbols/at.js +11 -5
- package/dist/src/icons/symbols/cc.js +11 -5
- package/dist/src/icons/symbols/cmd.js +11 -5
- package/dist/src/icons/symbols/facebook.js +11 -5
- package/dist/src/icons/symbols/google.js +14 -8
- package/dist/src/icons/symbols/hash.js +11 -5
- package/dist/src/icons/symbols/instagram.js +23 -17
- package/dist/src/icons/symbols/messenger.js +17 -11
- package/dist/src/icons/symbols/twitter.js +11 -5
- package/dist/src/icons/technology/battery.js +11 -5
- package/dist/src/icons/technology/battery_100.js +11 -5
- package/dist/src/icons/technology/battery_20.js +11 -5
- package/dist/src/icons/technology/battery_40.js +11 -5
- package/dist/src/icons/technology/battery_60.js +11 -5
- package/dist/src/icons/technology/battery_80.js +11 -5
- package/dist/src/icons/technology/battery_charging.js +11 -5
- package/dist/src/icons/technology/battery_slash.js +11 -5
- package/dist/src/icons/technology/devices.js +11 -5
- package/dist/src/icons/technology/floppy_disk.js +11 -5
- package/dist/src/icons/technology/iphone.js +11 -5
- package/dist/src/icons/technology/laptop.js +11 -5
- package/dist/src/icons/technology/mobile.js +11 -5
- package/dist/src/icons/technology/monitor.js +11 -5
- package/dist/src/icons/technology/server.js +11 -5
- package/dist/src/icons/technology/sim_card.js +11 -5
- package/dist/src/icons/technology/usb_stick.js +11 -5
- package/dist/src/icons/text/align_center.js +11 -5
- package/dist/src/icons/text/align_justified.js +11 -5
- package/dist/src/icons/text/align_left.js +11 -5
- package/dist/src/icons/text/align_right.js +11 -5
- package/dist/src/icons/text/code_block.js +11 -5
- package/dist/src/icons/text/divider.js +11 -5
- package/dist/src/icons/text/footnote.js +13 -7
- package/dist/src/icons/text/indent_decrease.js +11 -5
- package/dist/src/icons/text/indent_increase.js +11 -5
- package/dist/src/icons/text/list_ordered.js +11 -5
- package/dist/src/icons/text/list_unordered.js +11 -5
- package/dist/src/icons/text/quote.js +11 -5
- package/dist/src/icons/text/table.js +11 -5
- package/dist/src/icons/time/alarm.js +11 -5
- package/dist/src/icons/time/alarm_checkmark.js +11 -5
- package/dist/src/icons/time/alarm_minus.js +11 -5
- package/dist/src/icons/time/alarm_plus.js +11 -5
- package/dist/src/icons/time/alarm_slash.js +11 -5
- package/dist/src/icons/time/alarm_snooze.js +11 -5
- package/dist/src/icons/time/calendar.js +11 -5
- package/dist/src/icons/time/calendar_add.js +11 -5
- package/dist/src/icons/time/calendar_checkmark.js +11 -5
- package/dist/src/icons/time/calendar_close.js +11 -5
- package/dist/src/icons/time/calendar_dates.js +11 -5
- package/dist/src/icons/time/calendar_minus.js +11 -5
- package/dist/src/icons/time/calendar_plus.js +11 -5
- package/dist/src/icons/time/calendar_scroll.js +13 -7
- package/dist/src/icons/time/clock.js +11 -5
- package/dist/src/icons/time/clock_history.js +11 -5
- package/dist/src/icons/time/stopwatch.js +11 -5
- package/dist/src/icons/time/timer.js +11 -5
- package/dist/src/icons/time/watch.js +11 -5
- package/dist/src/index.js +116 -57
- package/dist/src/styles/globals.css.js +5 -3
- package/dist/src/utils/date.js +14 -6
- package/dist/src/utils/function.js +3 -1
- package/package.json +1 -1
|
@@ -1,52 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var plate = require('@udecode/plate');
|
|
4
|
+
var text = require('./text.js');
|
|
5
|
+
var buttons = require('./buttons.js');
|
|
6
|
+
var qa = require('./qa.js');
|
|
7
|
+
var video = require('./video.js');
|
|
6
8
|
|
|
7
9
|
const blocks = [
|
|
8
|
-
createButtonsPlugin(),
|
|
9
|
-
createBlockquotePlugin(),
|
|
10
|
-
createCodeBlockPlugin(),
|
|
11
|
-
createHeadingPlugin(),
|
|
12
|
-
createHorizontalRulePlugin(),
|
|
13
|
-
createImagePlugin({
|
|
10
|
+
buttons.createButtonsPlugin(),
|
|
11
|
+
plate.createBlockquotePlugin(),
|
|
12
|
+
plate.createCodeBlockPlugin(),
|
|
13
|
+
plate.createHeadingPlugin(),
|
|
14
|
+
plate.createHorizontalRulePlugin(),
|
|
15
|
+
plate.createImagePlugin({
|
|
14
16
|
options: {
|
|
15
17
|
disableUploadInsert: true,
|
|
16
18
|
disableEmbedInsert: true,
|
|
17
19
|
},
|
|
18
20
|
}),
|
|
19
|
-
createQAPlugin(),
|
|
20
|
-
createTextIndentPlugin(),
|
|
21
|
-
createIndentListPlugin({
|
|
21
|
+
qa.createQAPlugin(),
|
|
22
|
+
plate.createTextIndentPlugin(),
|
|
23
|
+
plate.createIndentListPlugin({
|
|
22
24
|
inject: {
|
|
23
25
|
props: {
|
|
24
26
|
validTypes: [
|
|
25
|
-
ELEMENT_PARAGRAPH,
|
|
26
|
-
ELEMENT_H1,
|
|
27
|
-
ELEMENT_H2,
|
|
28
|
-
ELEMENT_H3,
|
|
29
|
-
ELEMENT_H4,
|
|
30
|
-
ELEMENT_H5,
|
|
31
|
-
ELEMENT_H6,
|
|
32
|
-
ELEMENT_OL,
|
|
33
|
-
ELEMENT_UL,
|
|
27
|
+
plate.ELEMENT_PARAGRAPH,
|
|
28
|
+
plate.ELEMENT_H1,
|
|
29
|
+
plate.ELEMENT_H2,
|
|
30
|
+
plate.ELEMENT_H3,
|
|
31
|
+
plate.ELEMENT_H4,
|
|
32
|
+
plate.ELEMENT_H5,
|
|
33
|
+
plate.ELEMENT_H6,
|
|
34
|
+
plate.ELEMENT_OL,
|
|
35
|
+
plate.ELEMENT_UL,
|
|
34
36
|
],
|
|
35
37
|
},
|
|
36
38
|
},
|
|
37
39
|
}),
|
|
38
|
-
createListPlugin(),
|
|
39
|
-
createMediaEmbedPlugin(),
|
|
40
|
-
createParagraphPlugin(),
|
|
41
|
-
createHOnePlugin(),
|
|
42
|
-
createHTwoPlugin(),
|
|
43
|
-
createHThreePlugin(),
|
|
44
|
-
createHFourPlugin(),
|
|
45
|
-
createHFivePlugin(),
|
|
46
|
-
createHSixPlugin(),
|
|
47
|
-
createResetNodePlugin(),
|
|
48
|
-
createTablePlugin(),
|
|
49
|
-
createVideoTitlePlugin(),
|
|
40
|
+
plate.createListPlugin(),
|
|
41
|
+
plate.createMediaEmbedPlugin(),
|
|
42
|
+
text.createParagraphPlugin(),
|
|
43
|
+
text.createHOnePlugin(),
|
|
44
|
+
text.createHTwoPlugin(),
|
|
45
|
+
text.createHThreePlugin(),
|
|
46
|
+
text.createHFourPlugin(),
|
|
47
|
+
text.createHFivePlugin(),
|
|
48
|
+
text.createHSixPlugin(),
|
|
49
|
+
plate.createResetNodePlugin(),
|
|
50
|
+
plate.createTablePlugin(),
|
|
51
|
+
video.createVideoTitlePlugin(),
|
|
50
52
|
];
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
exports.blocks = blocks;
|
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
import { styled } from 'styled-components';
|
|
3
|
-
import { someNode, getPluginType, getBlockAbove, isEditorReadOnly, PlateElement, createPluginFactory, ELEMENT_PARAGRAPH, setNodes } from '@udecode/plate';
|
|
4
|
-
import { Button as Button$1 } from '../../../actions/button/button.js';
|
|
5
|
-
import { ELEMENT_BUTTON, COLORS } from '../../constants.js';
|
|
1
|
+
'use strict';
|
|
6
2
|
|
|
7
|
-
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var styledComponents = require('styled-components');
|
|
5
|
+
var plate = require('@udecode/plate');
|
|
6
|
+
var button = require('../../../actions/button/button.js');
|
|
7
|
+
var constants = require('../../constants.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
|
+
|
|
13
|
+
const Button = React__default.default.forwardRef(({ children, editor, element, ...props }, ref) => {
|
|
8
14
|
const { buttonType, color } = element;
|
|
9
15
|
const pressed = !!editor?.selection &&
|
|
10
|
-
someNode(editor, {
|
|
11
|
-
match: { type: getPluginType(editor, ELEMENT_BUTTON) },
|
|
16
|
+
plate.someNode(editor, {
|
|
17
|
+
match: { type: plate.getPluginType(editor, constants.ELEMENT_BUTTON) },
|
|
12
18
|
});
|
|
13
|
-
const currBlock = getBlockAbove(editor, {
|
|
19
|
+
const currBlock = plate.getBlockAbove(editor, {
|
|
14
20
|
at: editor.selection?.focus,
|
|
15
21
|
match: {
|
|
16
|
-
type: getPluginType(editor, ELEMENT_BUTTON),
|
|
22
|
+
type: plate.getPluginType(editor, constants.ELEMENT_BUTTON),
|
|
17
23
|
buttonType: buttonType,
|
|
18
24
|
},
|
|
19
25
|
});
|
|
20
|
-
const editable = !isEditorReadOnly(editor);
|
|
26
|
+
const editable = !plate.isEditorReadOnly(editor);
|
|
21
27
|
const handleColorChange = (color) => {
|
|
22
28
|
if (currBlock) {
|
|
23
|
-
setNodes(editor, {
|
|
29
|
+
plate.setNodes(editor, {
|
|
24
30
|
color,
|
|
25
31
|
}, {
|
|
26
32
|
at: currBlock ? currBlock[1] : undefined,
|
|
27
33
|
});
|
|
28
34
|
}
|
|
29
35
|
};
|
|
30
|
-
const ColorMenu = () => !pressed || !editable ? null : (React__default.createElement(ColorMenuComponent, { contentEditable: false }, COLORS.map((color) => (React__default.createElement(ColorItem, { "$color": color, contentEditable: false, key: color, onClick: (event) => {
|
|
36
|
+
const ColorMenu = () => !pressed || !editable ? null : (React__default.default.createElement(ColorMenuComponent, { contentEditable: false }, constants.COLORS.map((color) => (React__default.default.createElement(ColorItem, { "$color": color, contentEditable: false, key: color, onClick: (event) => {
|
|
31
37
|
event.stopPropagation();
|
|
32
38
|
handleColorChange(color);
|
|
33
39
|
} })))));
|
|
34
|
-
return (React__default.createElement(PlateElement, { asChild: true, editor: editor, element: element, ref: ref, ...props },
|
|
35
|
-
React__default.createElement(React__default.Fragment, null,
|
|
36
|
-
React__default.createElement(ColorMenu, null),
|
|
37
|
-
React__default.createElement(Button
|
|
40
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, editor: editor, element: element, ref: ref, ...props },
|
|
41
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
42
|
+
React__default.default.createElement(ColorMenu, null),
|
|
43
|
+
React__default.default.createElement(button.Button, { size: "small", sx: `
|
|
38
44
|
margin-left: auto !important;
|
|
39
45
|
margin-right: auto !important;
|
|
40
46
|
background-color: ${color ? color : 'var(--color-blue-5)'} !important;
|
|
@@ -45,7 +51,7 @@ const Button = React__default.forwardRef(({ children, editor, element, ...props
|
|
|
45
51
|
}
|
|
46
52
|
` }, children))));
|
|
47
53
|
});
|
|
48
|
-
const ColorMenuComponent = styled.div `
|
|
54
|
+
const ColorMenuComponent = styledComponents.styled.div `
|
|
49
55
|
display: flex;
|
|
50
56
|
justify-content: center;
|
|
51
57
|
align-items: center;
|
|
@@ -59,26 +65,27 @@ const ColorMenuComponent = styled.div `
|
|
|
59
65
|
box-shadow: var(--elevation-1);
|
|
60
66
|
background-color: var(--color-white);
|
|
61
67
|
`;
|
|
62
|
-
const ColorItem = styled.div `
|
|
68
|
+
const ColorItem = styledComponents.styled.div `
|
|
63
69
|
width: 24px;
|
|
64
70
|
height: 24px;
|
|
65
71
|
border-radius: 50%;
|
|
66
72
|
background-color: ${({ $color }) => $color};
|
|
67
73
|
cursor: pointer;
|
|
68
74
|
`;
|
|
69
|
-
const createButtonsPlugin = createPluginFactory({
|
|
70
|
-
key: ELEMENT_BUTTON,
|
|
71
|
-
type: ELEMENT_BUTTON,
|
|
75
|
+
const createButtonsPlugin = plate.createPluginFactory({
|
|
76
|
+
key: constants.ELEMENT_BUTTON,
|
|
77
|
+
type: constants.ELEMENT_BUTTON,
|
|
72
78
|
isElement: true,
|
|
73
79
|
component: Button,
|
|
74
80
|
then: () => ({
|
|
75
81
|
inject: {
|
|
76
82
|
props: {
|
|
77
83
|
classNames: undefined,
|
|
78
|
-
validTypes: [ELEMENT_PARAGRAPH],
|
|
84
|
+
validTypes: [plate.ELEMENT_PARAGRAPH],
|
|
79
85
|
},
|
|
80
86
|
},
|
|
81
87
|
}),
|
|
82
88
|
});
|
|
83
89
|
|
|
84
|
-
|
|
90
|
+
exports.Button = Button;
|
|
91
|
+
exports.createButtonsPlugin = createButtonsPlugin;
|
|
@@ -1,51 +1,78 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
|
-
import { withRef, cn, withCn, withProps, withVariants, createPrimitiveElement } from '@udecode/cn';
|
|
5
|
-
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { ChevronRight } from '../../../../icons/arrow/chevron_right.js';
|
|
7
|
-
import { Checkmark } from '../../../../icons/basic/checkmark.js';
|
|
2
|
+
'use strict';
|
|
8
3
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
6
|
+
var cn = require('@udecode/cn');
|
|
7
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
8
|
+
var chevron_right = require('../../../../icons/arrow/chevron_right.js');
|
|
9
|
+
var checkmark = require('../../../../icons/basic/checkmark.js');
|
|
10
|
+
|
|
11
|
+
function _interopNamespaceCompat(e) {
|
|
12
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
30
|
+
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespaceCompat(DropdownMenuPrimitive);
|
|
31
|
+
|
|
32
|
+
const DropdownMenu = DropdownMenuPrimitive__namespace.Root;
|
|
33
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
34
|
+
const DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
35
|
+
cn.withRef(({ className, inset, children, ...props }, ref) => (React__namespace.createElement(DropdownMenuPrimitive__namespace.SubTrigger, { ref: ref, className: cn.cn('flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent', 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className), ...props },
|
|
13
36
|
children,
|
|
14
|
-
|
|
15
|
-
withCn(
|
|
16
|
-
const DropdownMenuContentVariants = withProps(
|
|
37
|
+
React__namespace.createElement(chevron_right.ChevronRight, { className: "ml-auto h-4 w-4" }))));
|
|
38
|
+
cn.withCn(DropdownMenuPrimitive__namespace.SubContent, 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2');
|
|
39
|
+
const DropdownMenuContentVariants = cn.withProps(DropdownMenuPrimitive__namespace.Content, {
|
|
17
40
|
sideOffset: 4,
|
|
18
|
-
className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2'),
|
|
41
|
+
className: cn.cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2'),
|
|
19
42
|
});
|
|
20
|
-
const DropdownMenuContent = withRef(({ ...props }, ref) => (
|
|
21
|
-
|
|
22
|
-
const menuItemVariants = cva(cn('relative flex h-9 cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors', 'focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50'), {
|
|
43
|
+
const DropdownMenuContent = cn.withRef(({ ...props }, ref) => (React__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, null,
|
|
44
|
+
React__namespace.createElement(DropdownMenuContentVariants, { ref: ref, ...props }))));
|
|
45
|
+
const menuItemVariants = classVarianceAuthority.cva(cn.cn('relative flex h-9 cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors', 'focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50'), {
|
|
23
46
|
variants: {
|
|
24
47
|
inset: {
|
|
25
48
|
true: 'pl-8',
|
|
26
49
|
},
|
|
27
50
|
},
|
|
28
51
|
});
|
|
29
|
-
withVariants(
|
|
30
|
-
const DropdownMenuCheckboxItem = withRef(({ className, children, ...props }, ref) => (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
52
|
+
cn.withVariants(DropdownMenuPrimitive__namespace.Item, menuItemVariants, ['inset']);
|
|
53
|
+
const DropdownMenuCheckboxItem = cn.withRef(({ className, children, ...props }, ref) => (React__namespace.createElement(DropdownMenuPrimitive__namespace.CheckboxItem, { ref: ref, className: cn.cn('relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', 'cursor-pointer', className), ...props },
|
|
54
|
+
React__namespace.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" },
|
|
55
|
+
React__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null,
|
|
56
|
+
React__namespace.createElement(checkmark.Checkmark, { className: "h-4 w-4" }))),
|
|
34
57
|
children)));
|
|
35
|
-
withRef(({ className, children, hideIcon, ...props }, ref) => (
|
|
36
|
-
!hideIcon && (
|
|
37
|
-
|
|
38
|
-
|
|
58
|
+
cn.withRef(({ className, children, hideIcon, ...props }, ref) => (React__namespace.createElement(DropdownMenuPrimitive__namespace.RadioItem, { ref: ref, className: cn.cn('relative flex select-none items-center rounded-sm pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', 'h-9 cursor-pointer px-2 data-[state=checked]:bg-accent data-[state=checked]:text-accent-foreground', className), ...props },
|
|
59
|
+
!hideIcon && (React__namespace.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" },
|
|
60
|
+
React__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null,
|
|
61
|
+
React__namespace.createElement(checkmark.Checkmark, { className: "h-4 w-4" })))),
|
|
39
62
|
children)));
|
|
40
|
-
const dropdownMenuLabelVariants = cva(cn('select-none px-2 py-1.5 text-sm font-semibold'), {
|
|
63
|
+
const dropdownMenuLabelVariants = classVarianceAuthority.cva(cn.cn('select-none px-2 py-1.5 text-sm font-semibold'), {
|
|
41
64
|
variants: {
|
|
42
65
|
inset: {
|
|
43
66
|
true: 'pl-8',
|
|
44
67
|
},
|
|
45
68
|
},
|
|
46
69
|
});
|
|
47
|
-
withVariants(
|
|
48
|
-
withCn(
|
|
49
|
-
withCn(createPrimitiveElement('span'), 'ml-auto text-xs tracking-widest opacity-60');
|
|
70
|
+
cn.withVariants(DropdownMenuPrimitive__namespace.Label, dropdownMenuLabelVariants, ['inset']);
|
|
71
|
+
cn.withCn(DropdownMenuPrimitive__namespace.Separator, '-mx-1 my-1 h-px bg-muted');
|
|
72
|
+
cn.withCn(cn.createPrimitiveElement('span'), 'ml-auto text-xs tracking-widest opacity-60');
|
|
50
73
|
|
|
51
|
-
|
|
74
|
+
exports.DropdownMenu = DropdownMenu;
|
|
75
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
76
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
77
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
78
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import { withRef, cn } from '@udecode/cn';
|
|
3
|
-
import { withHOC, PlateElement } from '@udecode/plate-common';
|
|
4
|
-
import { useMediaState, ELEMENT_IMAGE, Image } from '@udecode/plate-media';
|
|
5
|
-
import { ResizableProvider } from '@udecode/plate-resizable';
|
|
6
|
-
import { Resizable, ResizeHandle, mediaResizeHandleVariants } from './resizable.js';
|
|
7
|
-
import { EditorContext } from '../../context.js';
|
|
8
|
-
import { MediaPopover } from './media-popover.js';
|
|
1
|
+
'use strict';
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var cn = require('@udecode/cn');
|
|
5
|
+
var plateCommon = require('@udecode/plate-common');
|
|
6
|
+
var plateMedia = require('@udecode/plate-media');
|
|
7
|
+
var plateResizable = require('@udecode/plate-resizable');
|
|
8
|
+
var resizable = require('./resizable.js');
|
|
9
|
+
var context = require('../../context.js');
|
|
10
|
+
var mediaPopover = require('./media-popover.js');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
+
|
|
16
|
+
const ImageElement = plateCommon.withHOC(plateResizable.ResizableProvider, cn.withRef(({ className, children, element, nodeProps, ...props }, ref) => {
|
|
17
|
+
const { imageSrcLoader } = React__default.default.useContext(context.EditorContext);
|
|
18
|
+
const { readOnly, focused, selected, align = 'center' } = plateMedia.useMediaState();
|
|
13
19
|
const { id, url, ...restElement } = element;
|
|
14
|
-
const [src, setSrc] = React__default.useState(null);
|
|
15
|
-
React__default.useEffect(() => {
|
|
20
|
+
const [src, setSrc] = React__default.default.useState(null);
|
|
21
|
+
React__default.default.useEffect(() => {
|
|
16
22
|
(async () => {
|
|
17
23
|
if (!id || !imageSrcLoader)
|
|
18
24
|
return;
|
|
@@ -22,33 +28,33 @@ const ImageElement = withHOC(ResizableProvider, withRef(({ className, children,
|
|
|
22
28
|
})();
|
|
23
29
|
}, [id, imageSrcLoader]);
|
|
24
30
|
if (!src && !!url) {
|
|
25
|
-
return (React__default.createElement(MediaPopover, { pluginKey: ELEMENT_IMAGE },
|
|
26
|
-
React__default.createElement(PlateElement, { ref: ref, element: element, className: cn('py-2.5', className), ...props },
|
|
27
|
-
React__default.createElement("figure", { className: "group relative m-0", contentEditable: false },
|
|
28
|
-
React__default.createElement(Resizable, { align: align, options: {
|
|
31
|
+
return (React__default.default.createElement(mediaPopover.MediaPopover, { pluginKey: plateMedia.ELEMENT_IMAGE },
|
|
32
|
+
React__default.default.createElement(plateCommon.PlateElement, { ref: ref, element: element, className: cn.cn('py-2.5', className), ...props },
|
|
33
|
+
React__default.default.createElement("figure", { className: "group relative m-0", contentEditable: false },
|
|
34
|
+
React__default.default.createElement(resizable.Resizable, { align: align, options: {
|
|
29
35
|
align,
|
|
30
36
|
readOnly,
|
|
31
37
|
} },
|
|
32
|
-
React__default.createElement(ResizeHandle, { options: { direction: 'left' }, className: mediaResizeHandleVariants({ direction: 'left' }) }),
|
|
33
|
-
React__default.createElement(Image, { className: cn('block w-full max-w-full cursor-pointer object-cover px-0', 'rounded-sm', focused && selected && 'ring-2 ring-ring ring-offset-2'), alt: "", ...nodeProps }),
|
|
34
|
-
React__default.createElement(ResizeHandle, { options: { direction: 'right' }, className: mediaResizeHandleVariants({
|
|
38
|
+
React__default.default.createElement(resizable.ResizeHandle, { options: { direction: 'left' }, className: resizable.mediaResizeHandleVariants({ direction: 'left' }) }),
|
|
39
|
+
React__default.default.createElement(plateMedia.Image, { className: cn.cn('block w-full max-w-full cursor-pointer object-cover px-0', 'rounded-sm', focused && selected && 'ring-2 ring-ring ring-offset-2'), alt: "", ...nodeProps }),
|
|
40
|
+
React__default.default.createElement(resizable.ResizeHandle, { options: { direction: 'right' }, className: resizable.mediaResizeHandleVariants({
|
|
35
41
|
direction: 'right',
|
|
36
42
|
}) }))),
|
|
37
43
|
children)));
|
|
38
44
|
}
|
|
39
|
-
return (React__default.createElement(MediaPopover, { pluginKey: ELEMENT_IMAGE },
|
|
40
|
-
React__default.createElement(PlateElement, { ref: ref, className: cn('py-2.5', className), element: restElement, ...props },
|
|
41
|
-
!src ? null : (React__default.createElement("figure", { className: "group relative m-0", contentEditable: false },
|
|
42
|
-
React__default.createElement(Resizable, { align: align, options: {
|
|
45
|
+
return (React__default.default.createElement(mediaPopover.MediaPopover, { pluginKey: plateMedia.ELEMENT_IMAGE },
|
|
46
|
+
React__default.default.createElement(plateCommon.PlateElement, { ref: ref, className: cn.cn('py-2.5', className), element: restElement, ...props },
|
|
47
|
+
!src ? null : (React__default.default.createElement("figure", { className: "group relative m-0", contentEditable: false },
|
|
48
|
+
React__default.default.createElement(resizable.Resizable, { align: align, options: {
|
|
43
49
|
align,
|
|
44
50
|
readOnly,
|
|
45
51
|
} },
|
|
46
|
-
React__default.createElement(ResizeHandle, { options: { direction: 'left' }, className: mediaResizeHandleVariants({ direction: 'left' }) }),
|
|
47
|
-
React__default.createElement(Image, { className: cn('block w-full max-w-full cursor-pointer object-cover px-0', 'rounded-sm', focused && selected && 'ring-2 ring-ring ring-offset-2'), alt: "", ...nodeProps, src: src }),
|
|
48
|
-
React__default.createElement(ResizeHandle, { options: { direction: 'right' }, className: mediaResizeHandleVariants({
|
|
52
|
+
React__default.default.createElement(resizable.ResizeHandle, { options: { direction: 'left' }, className: resizable.mediaResizeHandleVariants({ direction: 'left' }) }),
|
|
53
|
+
React__default.default.createElement(plateMedia.Image, { className: cn.cn('block w-full max-w-full cursor-pointer object-cover px-0', 'rounded-sm', focused && selected && 'ring-2 ring-ring ring-offset-2'), alt: "", ...nodeProps, src: src }),
|
|
54
|
+
React__default.default.createElement(resizable.ResizeHandle, { options: { direction: 'right' }, className: resizable.mediaResizeHandleVariants({
|
|
49
55
|
direction: 'right',
|
|
50
56
|
}) })))),
|
|
51
57
|
children)));
|
|
52
58
|
}));
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
exports.ImageElement = ImageElement;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var plate = require('@udecode/plate');
|
|
5
|
+
var styledComponents = require('styled-components');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
4
10
|
|
|
5
11
|
const ListElement = ({ children, variant = 'ul', ...props }) => {
|
|
6
12
|
const Element = variant;
|
|
7
|
-
return (React__default.createElement(PlateElement, { asChild: true, ...props },
|
|
8
|
-
React__default.createElement(React__default.Fragment, null,
|
|
9
|
-
React__default.createElement(Element, null, React__default.Children.map(children, (child) => (React__default.createElement(Li, null, child)))))));
|
|
13
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ...props },
|
|
14
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
15
|
+
React__default.default.createElement(Element, null, React__default.default.Children.map(children, (child) => (React__default.default.createElement(Li, null, child)))))));
|
|
10
16
|
};
|
|
11
|
-
const Li = styled.li `
|
|
17
|
+
const Li = styledComponents.styled.li `
|
|
12
18
|
margin: 16px 0px;
|
|
13
19
|
padding-left: 8px;
|
|
14
20
|
|
|
@@ -17,4 +23,4 @@ const Li = styled.li `
|
|
|
17
23
|
}
|
|
18
24
|
`;
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
exports.ListElement = ListElement;
|
|
@@ -1,35 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var plateCommon = require('@udecode/plate-common');
|
|
5
|
+
var plateMedia = require('@udecode/plate-media');
|
|
6
|
+
var slateReact = require('slate-react');
|
|
7
|
+
var plateButton = require('./plate-button.js');
|
|
8
|
+
var popover = require('./popover.js');
|
|
9
|
+
var lucideReact = require('lucide-react');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
8
14
|
|
|
9
15
|
function MediaPopover({ children }) {
|
|
10
|
-
const readOnly = useReadOnly();
|
|
11
|
-
const selected = useSelected();
|
|
12
|
-
const selectionCollapsed = useEditorSelector((editor) => !isSelectionExpanded(editor), []);
|
|
16
|
+
const readOnly = slateReact.useReadOnly();
|
|
17
|
+
const selected = slateReact.useSelected();
|
|
18
|
+
const selectionCollapsed = plateCommon.useEditorSelector((editor) => !plateCommon.isSelectionExpanded(editor), []);
|
|
13
19
|
const isOpen = !readOnly && selected && selectionCollapsed;
|
|
14
|
-
const isEditing = useFloatingMediaSelectors().isEditing();
|
|
15
|
-
useEffect(() => {
|
|
20
|
+
const isEditing = plateMedia.useFloatingMediaSelectors().isEditing();
|
|
21
|
+
React.useEffect(() => {
|
|
16
22
|
if (!isOpen && isEditing) {
|
|
17
|
-
floatingMediaActions.isEditing(false);
|
|
23
|
+
plateMedia.floatingMediaActions.isEditing(false);
|
|
18
24
|
}
|
|
19
25
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
20
26
|
}, [isOpen]);
|
|
21
|
-
const element = useElement();
|
|
22
|
-
const { props: buttonProps } = useRemoveNodeButton({ element });
|
|
27
|
+
const element = plateCommon.useElement();
|
|
28
|
+
const { props: buttonProps } = plateCommon.useRemoveNodeButton({ element });
|
|
23
29
|
if (readOnly)
|
|
24
|
-
return React__default.createElement(React__default.Fragment, null, children);
|
|
25
|
-
return (React__default.createElement(Popover, { open: isOpen, modal: false },
|
|
26
|
-
React__default.createElement(PopoverAnchor, null, children),
|
|
27
|
-
React__default.createElement(PopoverContent, { className: "w-auto p-1", onOpenAutoFocus: (e) => e.preventDefault() }, isEditing ? (React__default.createElement("div", { className: "flex w-[330px] flex-col" },
|
|
28
|
-
React__default.createElement("div", { className: "flex items-center" },
|
|
29
|
-
React__default.createElement("div", { className: "flex items-center pl-3 text-muted-foreground" },
|
|
30
|
-
React__default.createElement(Link, { className: "h-4 w-4" }))))) : (React__default.createElement("div", { className: "box-content flex h-9 items-center gap-1" },
|
|
31
|
-
React__default.createElement(Button, { variant: "ghost", size: "sms", ...buttonProps },
|
|
32
|
-
React__default.createElement(Trash, { className: "h-4 w-4" })))))));
|
|
30
|
+
return React__default.default.createElement(React__default.default.Fragment, null, children);
|
|
31
|
+
return (React__default.default.createElement(popover.Popover, { open: isOpen, modal: false },
|
|
32
|
+
React__default.default.createElement(popover.PopoverAnchor, null, children),
|
|
33
|
+
React__default.default.createElement(popover.PopoverContent, { className: "w-auto p-1", onOpenAutoFocus: (e) => e.preventDefault() }, isEditing ? (React__default.default.createElement("div", { className: "flex w-[330px] flex-col" },
|
|
34
|
+
React__default.default.createElement("div", { className: "flex items-center" },
|
|
35
|
+
React__default.default.createElement("div", { className: "flex items-center pl-3 text-muted-foreground" },
|
|
36
|
+
React__default.default.createElement(lucideReact.Link, { className: "h-4 w-4" }))))) : (React__default.default.createElement("div", { className: "box-content flex h-9 items-center gap-1" },
|
|
37
|
+
React__default.default.createElement(plateButton.Button, { variant: "ghost", size: "sms", ...buttonProps },
|
|
38
|
+
React__default.default.createElement(lucideReact.Trash, { className: "h-4 w-4" })))))));
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
exports.MediaPopover = MediaPopover;
|
|
@@ -1,9 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
-
import { withRef, cn } from '@udecode/cn';
|
|
4
|
-
import { cva } from 'class-variance-authority';
|
|
1
|
+
'use strict';
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
5
|
+
var cn = require('@udecode/cn');
|
|
6
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
+
|
|
8
|
+
function _interopNamespaceCompat(e) {
|
|
9
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
27
|
+
|
|
28
|
+
const buttonVariants = classVarianceAuthority.cva('inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', {
|
|
7
29
|
variants: {
|
|
8
30
|
variant: {
|
|
9
31
|
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
@@ -32,9 +54,10 @@ const buttonVariants = cva('inline-flex items-center justify-center whitespace-n
|
|
|
32
54
|
size: 'default',
|
|
33
55
|
},
|
|
34
56
|
});
|
|
35
|
-
const Button = withRef(({ className, isMenu, variant, size, asChild = false, ...props }, ref) => {
|
|
36
|
-
const Comp = asChild ? Slot : 'button';
|
|
37
|
-
return (
|
|
57
|
+
const Button = cn.withRef(({ className, isMenu, variant, size, asChild = false, ...props }, ref) => {
|
|
58
|
+
const Comp = asChild ? reactSlot.Slot : 'button';
|
|
59
|
+
return (React__namespace.createElement(Comp, { className: cn.cn(buttonVariants({ isMenu, variant, size, className })), ref: ref, ...props }));
|
|
38
60
|
});
|
|
39
61
|
|
|
40
|
-
|
|
62
|
+
exports.Button = Button;
|
|
63
|
+
exports.buttonVariants = buttonVariants;
|
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
6
|
+
var cn = require('@udecode/cn');
|
|
7
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
8
|
+
|
|
9
|
+
function _interopNamespaceCompat(e) {
|
|
10
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
28
|
+
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespaceCompat(PopoverPrimitive);
|
|
29
|
+
|
|
30
|
+
const Popover = PopoverPrimitive__namespace.Root;
|
|
31
|
+
const PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
32
|
+
const popoverVariants = classVarianceAuthority.cva('w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 print:hidden');
|
|
33
|
+
const PopoverContent = cn.withRef(({ className, style, align = 'center', sideOffset = 4, ...props }, ref) => (React__namespace.createElement(PopoverPrimitive__namespace.Portal, null,
|
|
34
|
+
React__namespace.createElement(PopoverPrimitive__namespace.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn.cn(popoverVariants(), className), style: { zIndex: 1000, ...style }, ...props }))));
|
|
35
|
+
|
|
36
|
+
exports.Popover = Popover;
|
|
37
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
38
|
+
exports.PopoverContent = PopoverContent;
|
|
39
|
+
exports.popoverVariants = popoverVariants;
|