@soul-refiner/design-system 2.0.1-alpha.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/colors.js +140 -1
- package/dist/common/date.js +34 -1
- package/dist/common/styles.js +62 -30
- package/dist/components/actions/button/button.js +111 -21
- package/dist/components/actions/dropdown/dropdown.js +176 -21
- package/dist/components/actions/rate/rate.js +55 -4
- package/dist/components/actions/switch/switch.js +39 -5
- package/dist/components/actions/toggle/toggle.js +33 -6
- package/dist/components/actions/upload/upload.js +167 -9
- package/dist/components/atoms/box/box.js +18 -4
- package/dist/components/atoms/hide/hide.js +18 -1
- package/dist/components/atoms/seconds_to_duration/seconds_to_duration.js +36 -1
- package/dist/components/atoms/time_ago/time_ago.js +39 -1
- package/dist/components/atoms/typography/display.js +18 -5
- package/dist/components/atoms/typography/heading.js +43 -6
- package/dist/components/atoms/typography/paragraph.js +20 -7
- package/dist/components/atoms/typography/typography.js +10 -3
- package/dist/components/card/action/action.js +41 -8
- package/dist/components/card/audio/audio.js +57 -7
- package/dist/components/card/card.js +33 -1
- package/dist/components/card/feature/feature.js +86 -14
- package/dist/components/card/meeting/meeting.js +102 -8
- package/dist/components/card/person/person.js +39 -6
- package/dist/components/card/price/price.js +49 -7
- package/dist/components/card/regular/regular.js +26 -5
- package/dist/components/card/styles.js +9 -2
- package/dist/components/card/video/video.js +57 -7
- package/dist/components/card/written/written.js +57 -7
- package/dist/components/custom/courses_selection/courses_selection.js +104 -12
- package/dist/components/custom/users_selection/users_selection.js +86 -12
- package/dist/components/editor/constants.js +195 -1
- package/dist/components/editor/context.js +17 -1
- package/dist/components/editor/editor.js +45 -5
- package/dist/components/editor/icons/border-all.js +12 -1
- package/dist/components/editor/icons/border-bottom.js +12 -1
- package/dist/components/editor/icons/border-left.js +12 -1
- package/dist/components/editor/icons/border-none.js +12 -1
- package/dist/components/editor/icons/border-right.js +12 -1
- package/dist/components/editor/icons/border-top.js +12 -1
- package/dist/components/editor/navbar/alignment_dropdown.js +106 -1
- package/dist/components/editor/navbar/button_modal.js +60 -3
- package/dist/components/editor/navbar/navbar.js +178 -7
- package/dist/components/editor/navbar/style_dropdown.js +74 -1
- package/dist/components/editor/plugins/blocks/blockquote.js +17 -1
- package/dist/components/editor/plugins/blocks/blocks.js +54 -1
- package/dist/components/editor/plugins/blocks/buttons.js +70 -8
- package/dist/components/editor/plugins/blocks/dropdown-menu.js +77 -1
- package/dist/components/editor/plugins/blocks/image.js +60 -1
- package/dist/components/editor/plugins/blocks/list.js +20 -2
- package/dist/components/editor/plugins/blocks/media-popover.js +41 -1
- package/dist/components/editor/plugins/blocks/plate-button.js +63 -1
- package/dist/components/editor/plugins/blocks/popover.js +38 -1
- package/dist/components/editor/plugins/blocks/qa.js +44 -3
- package/dist/components/editor/plugins/blocks/resizable.js +47 -1
- package/dist/components/editor/plugins/blocks/separator.js +43 -1
- package/dist/components/editor/plugins/blocks/table-cell.js +48 -1
- package/dist/components/editor/plugins/blocks/table-row.js +16 -1
- package/dist/components/editor/plugins/blocks/table.js +98 -1
- package/dist/components/editor/plugins/blocks/text.js +103 -1
- package/dist/components/editor/plugins/blocks/video.js +42 -1
- package/dist/components/editor/plugins/leafs/leafs.js +37 -1
- package/dist/components/editor/plugins/leafs/link.js +55 -4
- package/dist/components/editor/plugins/marks/marks.js +17 -1
- package/dist/components/editor/plugins/plate.js +43 -1
- package/dist/components/editor/plugins/utils/exitBreak.js +36 -1
- package/dist/components/editor/plugins/utils/resetBlockType.js +26 -1
- package/dist/components/editor/plugins/utils/selectOnBackspace.js +11 -1
- package/dist/components/editor/plugins/utils/softBreak.js +19 -1
- package/dist/components/editor/plugins/utils/utils.js +17 -1
- package/dist/components/editor/simple_editor/navbar.js +110 -4
- package/dist/components/editor/simple_editor/plugins.js +93 -1
- package/dist/components/editor/simple_editor/simple_editor.js +34 -3
- package/dist/components/editor/styles/menu_button.js +9 -3
- package/dist/components/feedback/animated_toast/animated_toast.js +32 -3
- package/dist/components/feedback/badge/badge.js +56 -7
- package/dist/components/feedback/banner/banner.js +60 -6
- package/dist/components/feedback/chip/chip.js +81 -8
- package/dist/components/feedback/loader/loader.js +33 -9
- package/dist/components/feedback/notification/notification.js +59 -6
- package/dist/components/feedback/progress/progress.js +76 -14
- package/dist/components/feedback/toast/toast.js +55 -7
- package/dist/components/feedback/tooltip/tooltip.js +34 -1
- package/dist/components/iconography/avatar/avatar.js +141 -22
- package/dist/components/iconography/avatar/icons/approved.js +14 -1
- package/dist/components/iconography/avatar/icons/busy.js +14 -1
- package/dist/components/iconography/avatar/icons/declined.js +14 -1
- package/dist/components/iconography/avatar/icons/default.js +13 -1
- package/dist/components/iconography/avatar/icons/focus.js +14 -1
- package/dist/components/iconography/avatar/icons/locked.js +14 -1
- package/dist/components/iconography/avatar/icons/offline.js +14 -1
- package/dist/components/iconography/avatar/icons/online.js +13 -1
- package/dist/components/iconography/avatar/icons/subscribed.js +18 -1
- package/dist/components/iconography/icon/icon.js +18 -3
- package/dist/components/input/calendar/calendar.js +139 -13
- package/dist/components/input/checkbox/checkbox.js +23 -5
- package/dist/components/input/date/date.js +241 -13
- package/dist/components/input/filter/filter.js +212 -13
- package/dist/components/input/filter/filter_option.js +50 -9
- package/dist/components/input/radio/radio.js +45 -7
- package/dist/components/input/search/search.js +83 -17
- package/dist/components/input/select/select.js +27 -6
- package/dist/components/input/text_area/text_area.js +60 -15
- package/dist/components/input/text_input/text_input.js +102 -21
- package/dist/components/input/time/time.js +47 -3
- package/dist/components/media/video/video.js +42 -1
- package/dist/components/media/video-player/playlist-item.js +37 -4
- package/dist/components/media/video-player/video.js +121 -13
- package/dist/components/navigation/breadcrumb/breadcrumb.js +66 -11
- package/dist/components/navigation/inner/inner.js +130 -14
- package/dist/components/navigation/tabs/tabs.js +101 -15
- package/dist/components/surfaces/accordion/accordion.js +46 -5
- package/dist/components/surfaces/calendar_date/calendar_date.js +39 -10
- package/dist/components/surfaces/carousel/card/card.js +55 -7
- package/dist/components/surfaces/comment/comment.js +152 -19
- package/dist/components/surfaces/comment/helpers.js +30 -1
- package/dist/components/surfaces/drawer/drawer.js +75 -7
- package/dist/components/surfaces/message/message.js +39 -4
- package/dist/components/surfaces/modal/modal.js +99 -8
- package/dist/components/surfaces/portal/portal.js +35 -1
- package/dist/components/surfaces/post/post.js +161 -19
- package/dist/components/table/table/table.js +120 -29
- package/dist/emoji/emojis.json.js +36331 -1
- package/dist/icons/arrow/arrow_all.js +15 -1
- package/dist/icons/arrow/arrow_all_diagonal.js +15 -1
- package/dist/icons/arrow/arrow_both_downwards.js +15 -1
- package/dist/icons/arrow/arrow_both_upwards.js +15 -1
- package/dist/icons/arrow/arrow_circle_left.js +15 -1
- package/dist/icons/arrow/arrow_circle_left_double.js +15 -1
- package/dist/icons/arrow/arrow_circle_left_double_alert.js +17 -1
- package/dist/icons/arrow/arrow_circle_right.js +15 -1
- package/dist/icons/arrow/arrow_circle_right_double.js +15 -1
- package/dist/icons/arrow/arrow_circle_right_double_alert.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_down_left.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_down_left_circle.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_down_right.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_down_right_circle.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_up_left.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_up_left_circle.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_up_right.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_up_right_circle.js +15 -1
- package/dist/icons/arrow/arrow_down.js +15 -1
- package/dist/icons/arrow/arrow_down_bold.js +15 -1
- package/dist/icons/arrow/arrow_down_circle.js +15 -1
- package/dist/icons/arrow/arrow_left.js +15 -1
- package/dist/icons/arrow/arrow_left_bold.js +15 -1
- package/dist/icons/arrow/arrow_left_circle.js +15 -1
- package/dist/icons/arrow/arrow_left_curved.js +15 -1
- package/dist/icons/arrow/arrow_left_curved_circle.js +15 -1
- package/dist/icons/arrow/arrow_right.js +15 -1
- package/dist/icons/arrow/arrow_right_bold.js +15 -1
- package/dist/icons/arrow/arrow_right_circle.js +15 -1
- package/dist/icons/arrow/arrow_right_curved.js +15 -1
- package/dist/icons/arrow/arrow_right_curved_circle.js +15 -1
- package/dist/icons/arrow/arrow_up.js +15 -1
- package/dist/icons/arrow/arrow_up_bold.js +15 -1
- package/dist/icons/arrow/arrow_up_circle.js +15 -1
- package/dist/icons/arrow/chevron_down.js +15 -1
- package/dist/icons/arrow/chevron_down_circle.js +15 -1
- package/dist/icons/arrow/chevron_down_double.js +15 -1
- package/dist/icons/arrow/chevron_down_double_circle.js +15 -1
- package/dist/icons/arrow/chevron_left.js +15 -1
- package/dist/icons/arrow/chevron_left_circle.js +15 -1
- package/dist/icons/arrow/chevron_left_double.js +15 -1
- package/dist/icons/arrow/chevron_left_double_circle.js +15 -1
- package/dist/icons/arrow/chevron_right.js +15 -1
- package/dist/icons/arrow/chevron_right_circle.js +15 -1
- package/dist/icons/arrow/chevron_right_double.js +15 -1
- package/dist/icons/arrow/chevron_right_double_circle.js +15 -1
- package/dist/icons/arrow/chevron_scroll.js +15 -1
- package/dist/icons/arrow/chevron_up.js +15 -1
- package/dist/icons/arrow/chevron_up_circle.js +15 -1
- package/dist/icons/arrow/chevron_up_double.js +15 -1
- package/dist/icons/arrow/chevron_up_double_circle.js +15 -1
- package/dist/icons/arrow/forward_all.js +15 -1
- package/dist/icons/arrow/forward_all_bold.js +15 -1
- package/dist/icons/arrow/forward_bold.js +15 -1
- package/dist/icons/arrow/redo.js +15 -1
- package/dist/icons/arrow/redo_bold.js +15 -1
- package/dist/icons/arrow/reply.js +15 -1
- package/dist/icons/arrow/reply_all.js +15 -1
- package/dist/icons/arrow/reply_all_bold.js +15 -1
- package/dist/icons/arrow/reply_bold.js +15 -1
- package/dist/icons/arrow/undo.js +15 -1
- package/dist/icons/arrow/undo_bold.js +15 -1
- package/dist/icons/audio_video/drag_indicator.js +15 -1
- package/dist/icons/audio_video/eject.js +15 -1
- package/dist/icons/audio_video/equalizer.js +15 -1
- package/dist/icons/audio_video/fast_forward.js +15 -1
- package/dist/icons/audio_video/fast_forward_30.js +15 -1
- package/dist/icons/audio_video/fullscreen.js +15 -1
- package/dist/icons/audio_video/headphones.js +15 -1
- package/dist/icons/audio_video/library_add.js +15 -1
- package/dist/icons/audio_video/library_music.js +15 -1
- package/dist/icons/audio_video/microphone.js +15 -1
- package/dist/icons/audio_video/musical_note.js +15 -1
- package/dist/icons/audio_video/next.js +15 -1
- package/dist/icons/audio_video/pause.js +15 -1
- package/dist/icons/audio_video/pause_circle.js +15 -1
- package/dist/icons/audio_video/play.js +15 -1
- package/dist/icons/audio_video/play_circle.js +15 -1
- package/dist/icons/audio_video/play_display.js +15 -1
- package/dist/icons/audio_video/play_pause.js +15 -1
- package/dist/icons/audio_video/play_solid.js +15 -1
- package/dist/icons/audio_video/player_list.js +15 -1
- package/dist/icons/audio_video/player_list_add.js +15 -1
- package/dist/icons/audio_video/player_list_play.js +15 -1
- package/dist/icons/audio_video/previous.js +15 -1
- package/dist/icons/audio_video/radio.js +15 -1
- package/dist/icons/audio_video/record.js +15 -1
- package/dist/icons/audio_video/repeat.js +15 -1
- package/dist/icons/audio_video/rewind.js +15 -1
- package/dist/icons/audio_video/rewind_30.js +15 -1
- package/dist/icons/audio_video/shuffle.js +15 -1
- package/dist/icons/audio_video/sound_wave.js +15 -1
- package/dist/icons/audio_video/stop.js +15 -1
- package/dist/icons/audio_video/stop_circle.js +15 -1
- package/dist/icons/audio_video/subscriptions.js +15 -1
- package/dist/icons/audio_video/tuner.js +15 -1
- package/dist/icons/audio_video/volume.js +15 -1
- package/dist/icons/audio_video/volume_high.js +15 -1
- package/dist/icons/audio_video/volume_low.js +15 -1
- package/dist/icons/audio_video/volume_slash.js +15 -1
- package/dist/icons/basic/aa_sansserif.js +16 -1
- package/dist/icons/basic/aa_serif.js +16 -1
- package/dist/icons/basic/anchor.js +17 -1
- package/dist/icons/basic/bible.js +15 -1
- package/dist/icons/basic/bold.js +15 -1
- package/dist/icons/basic/book.js +15 -1
- package/dist/icons/basic/book_open.js +15 -1
- package/dist/icons/basic/bookmark.js +15 -1
- package/dist/icons/basic/bookmark_add.js +15 -1
- package/dist/icons/basic/bookmark_slash.js +15 -1
- package/dist/icons/basic/bookmarks.js +15 -1
- package/dist/icons/basic/books.js +18 -1
- package/dist/icons/basic/box.js +15 -1
- package/dist/icons/basic/briefcase.js +15 -1
- package/dist/icons/basic/browse_activity.js +15 -1
- package/dist/icons/basic/browser.js +15 -1
- package/dist/icons/basic/browser_slash.js +15 -1
- package/dist/icons/basic/calculator.js +15 -1
- package/dist/icons/basic/camera.js +15 -1
- package/dist/icons/basic/camera_add.js +15 -1
- package/dist/icons/basic/camera_slash.js +15 -1
- package/dist/icons/basic/checkmark.js +15 -1
- package/dist/icons/basic/checkmark_circle.js +17 -1
- package/dist/icons/basic/checkmark_filled.js +15 -1
- package/dist/icons/basic/checkmarks.js +15 -1
- package/dist/icons/basic/circle.js +15 -1
- package/dist/icons/basic/circle_slash.js +17 -1
- package/dist/icons/basic/clear_text_style.js +15 -1
- package/dist/icons/basic/close.js +15 -1
- package/dist/icons/basic/close_circle.js +15 -1
- package/dist/icons/basic/close_filled.js +15 -1
- package/dist/icons/basic/copy.js +15 -1
- package/dist/icons/basic/delete.js +15 -1
- package/dist/icons/basic/detail.js +15 -1
- package/dist/icons/basic/dot.js +15 -1
- package/dist/icons/basic/download.js +15 -1
- package/dist/icons/basic/download_arrow.js +15 -1
- package/dist/icons/basic/droplet.js +17 -1
- package/dist/icons/basic/ellipsis_horizontal.js +15 -1
- package/dist/icons/basic/ellipsis_horizontal_circle.js +15 -1
- package/dist/icons/basic/ellipsis_vertical.js +15 -1
- package/dist/icons/basic/ellipsis_vertical_circle.js +15 -1
- package/dist/icons/basic/eye.js +15 -1
- package/dist/icons/basic/eye_slash.js +15 -1
- package/dist/icons/basic/fingerprint.js +15 -1
- package/dist/icons/basic/flag.js +15 -1
- package/dist/icons/basic/flag_wave.js +15 -1
- package/dist/icons/basic/flag_wave_filled.js +15 -1
- package/dist/icons/basic/flame.js +15 -1
- package/dist/icons/basic/gauge.js +15 -1
- package/dist/icons/basic/glasses.js +15 -1
- package/dist/icons/basic/graduation_cap.js +15 -1
- package/dist/icons/basic/hashmark.js +15 -1
- package/dist/icons/basic/heart.js +15 -1
- package/dist/icons/basic/heart_slash.js +15 -1
- package/dist/icons/basic/highlighter.js +15 -1
- package/dist/icons/basic/home.js +15 -1
- package/dist/icons/basic/image.js +15 -1
- package/dist/icons/basic/inbox.js +15 -1
- package/dist/icons/basic/italic.js +15 -1
- package/dist/icons/basic/layers.js +15 -1
- package/dist/icons/basic/lightening.js +15 -1
- package/dist/icons/basic/lightening_slash.js +15 -1
- package/dist/icons/basic/link.js +15 -1
- package/dist/icons/basic/link_slash.js +15 -1
- package/dist/icons/basic/loudspeaker.js +15 -1
- package/dist/icons/basic/maximize.js +15 -1
- package/dist/icons/basic/menu.js +15 -1
- package/dist/icons/basic/menu_circle.js +15 -1
- package/dist/icons/basic/menu_dots.js +15 -1
- package/dist/icons/basic/microphone_slash.js +15 -1
- package/dist/icons/basic/minimize.js +15 -1
- package/dist/icons/basic/minus.js +15 -1
- package/dist/icons/basic/minus_circle.js +15 -1
- package/dist/icons/basic/move_item.js +15 -1
- package/dist/icons/basic/new.js +15 -1
- package/dist/icons/basic/newspaper.js +15 -1
- package/dist/icons/basic/node.js +15 -1
- package/dist/icons/basic/note_pad.js +16 -1
- package/dist/icons/basic/options.js +15 -1
- package/dist/icons/basic/paint_brush.js +15 -1
- package/dist/icons/basic/paperclip.js +15 -1
- package/dist/icons/basic/paperclip_slash.js +15 -1
- package/dist/icons/basic/pencil.js +15 -1
- package/dist/icons/basic/pencil_pad.js +15 -1
- package/dist/icons/basic/plus.js +15 -1
- package/dist/icons/basic/plus_circle.js +15 -1
- package/dist/icons/basic/presentation.js +15 -1
- package/dist/icons/basic/printer.js +15 -1
- package/dist/icons/basic/profile.js +15 -1
- package/dist/icons/basic/profile_check.js +15 -1
- package/dist/icons/basic/pulse.js +15 -1
- package/dist/icons/basic/qr_code.js +15 -1
- package/dist/icons/basic/resize.js +17 -1
- package/dist/icons/basic/scan.js +15 -1
- package/dist/icons/basic/scissors.js +15 -1
- package/dist/icons/basic/screenshot.js +15 -1
- package/dist/icons/basic/search.js +15 -1
- package/dist/icons/basic/select_item.js +16 -1
- package/dist/icons/basic/settings.js +15 -1
- package/dist/icons/basic/share.js +15 -1
- package/dist/icons/basic/share_external.js +15 -1
- package/dist/icons/basic/square.js +15 -1
- package/dist/icons/basic/star.js +15 -1
- package/dist/icons/basic/star_circle.js +15 -1
- package/dist/icons/basic/star_filled.js +15 -1
- package/dist/icons/basic/star_filled_half.js +15 -1
- package/dist/icons/basic/star_slash.js +15 -1
- package/dist/icons/basic/sticker.js +15 -1
- package/dist/icons/basic/strikethrough.js +15 -1
- package/dist/icons/basic/subtask.js +16 -1
- package/dist/icons/basic/tax.js +18 -1
- package/dist/icons/basic/text_bg_color.js +15 -1
- package/dist/icons/basic/text_color.js +15 -1
- package/dist/icons/basic/textbox.js +15 -1
- package/dist/icons/basic/thumbs_down.js +15 -1
- package/dist/icons/basic/thumbs_up.js +15 -1
- package/dist/icons/basic/thumbs_up_filled.js +15 -1
- package/dist/icons/basic/toggle_left.js +15 -1
- package/dist/icons/basic/toggle_right.js +15 -1
- package/dist/icons/basic/translate.js +15 -1
- package/dist/icons/basic/trash.js +15 -1
- package/dist/icons/basic/trash_slash.js +15 -1
- package/dist/icons/basic/underline.js +15 -1
- package/dist/icons/basic/upload.js +15 -1
- package/dist/icons/basic/video.js +15 -1
- package/dist/icons/basic/video_add.js +16 -1
- package/dist/icons/basic/video_slash.js +15 -1
- package/dist/icons/basic/wrench.js +15 -1
- package/dist/icons/basic/zoom_in.js +15 -1
- package/dist/icons/basic/zoom_out.js +15 -1
- package/dist/icons/data/bar_chart.js +15 -1
- package/dist/icons/data/bar_chart_downward.js +15 -1
- package/dist/icons/data/bar_chart_downward_outline.js +15 -1
- package/dist/icons/data/bar_chart_upward.js +15 -1
- package/dist/icons/data/bar_chart_upward_outline.js +15 -1
- package/dist/icons/data/candlestick_chart.js +15 -1
- package/dist/icons/data/four_circles.js +15 -1
- package/dist/icons/data/legend_toggle.js +15 -1
- package/dist/icons/data/line_chart.js +15 -1
- package/dist/icons/data/line_chart_area.js +15 -1
- package/dist/icons/data/line_chart_area_shaded.js +15 -1
- package/dist/icons/data/line_chart_double.js +15 -1
- package/dist/icons/data/line_chart_downward.js +15 -1
- package/dist/icons/data/line_chart_node.js +15 -1
- package/dist/icons/data/line_chart_outline.js +15 -1
- package/dist/icons/data/line_chart_search.js +15 -1
- package/dist/icons/data/line_chart_stars.js +15 -1
- package/dist/icons/data/line_chart_upward.js +15 -1
- package/dist/icons/data/pie_chart.js +16 -1
- package/dist/icons/data/tree.js +15 -1
- package/dist/icons/email/mail.js +15 -1
- package/dist/icons/email/mail_check.js +15 -1
- package/dist/icons/email/mail_minus.js +15 -1
- package/dist/icons/email/mail_send.js +15 -1
- package/dist/icons/email/send.js +15 -1
- package/dist/icons/email/send_close.js +15 -1
- package/dist/icons/email/send_schedule.js +15 -1
- package/dist/icons/email/send_text.js +15 -1
- package/dist/icons/emoji/emoji_add.js +15 -1
- package/dist/icons/emoji/laughing.js +15 -1
- package/dist/icons/emoji/neutral.js +15 -1
- package/dist/icons/emoji/sad.js +15 -1
- package/dist/icons/emoji/shocked.js +15 -1
- package/dist/icons/emoji/smile.js +15 -1
- package/dist/icons/file/clipboard.js +15 -1
- package/dist/icons/file/clipboard_check.js +15 -1
- package/dist/icons/file/clipboard_close.js +15 -1
- package/dist/icons/file/clipboard_minus.js +15 -1
- package/dist/icons/file/clipboard_plus.js +15 -1
- package/dist/icons/file/clipboard_text.js +15 -1
- package/dist/icons/file/file.js +15 -1
- package/dist/icons/file/file_add.js +15 -1
- package/dist/icons/file/file_check.js +15 -1
- package/dist/icons/file/file_close.js +15 -1
- package/dist/icons/file/file_code.js +15 -1
- package/dist/icons/file/file_download.js +15 -1
- package/dist/icons/file/file_draft.js +15 -1
- package/dist/icons/file/file_gear.js +16 -1
- package/dist/icons/file/file_minus.js +15 -1
- package/dist/icons/file/file_plus.js +15 -1
- package/dist/icons/file/file_scan.js +15 -1
- package/dist/icons/file/file_shred.js +15 -1
- package/dist/icons/file/file_text.js +15 -1
- package/dist/icons/file/file_upload.js +15 -1
- package/dist/icons/file/folder.js +15 -1
- package/dist/icons/file/folder_add.js +15 -1
- package/dist/icons/file/folder_arrow.js +15 -1
- package/dist/icons/file/folder_check.js +15 -1
- package/dist/icons/file/folder_close.js +15 -1
- package/dist/icons/file/folder_cloud.js +15 -1
- package/dist/icons/file/folder_gear.js +16 -1
- package/dist/icons/file/folder_minus.js +15 -1
- package/dist/icons/file/folder_music.js +15 -1
- package/dist/icons/file/folder_open.js +15 -1
- package/dist/icons/file/folder_plus.js +15 -1
- package/dist/icons/file/folder_zip.js +15 -1
- package/dist/icons/file/note.js +15 -1
- package/dist/icons/file/note_text.js +15 -1
- package/dist/icons/file/pdf.js +15 -1
- package/dist/icons/file/photo.js +15 -1
- package/dist/icons/finance/bitcoin.js +15 -1
- package/dist/icons/finance/coins.js +19 -1
- package/dist/icons/finance/credit_card.js +15 -1
- package/dist/icons/finance/credit_card_add.js +15 -1
- package/dist/icons/finance/credit_card_face.js +15 -1
- package/dist/icons/finance/credit_card_member.js +15 -1
- package/dist/icons/finance/credit_card_outcome.js +15 -1
- package/dist/icons/finance/credit_card_scan.js +15 -1
- package/dist/icons/finance/credit_card_share.js +15 -1
- package/dist/icons/finance/credit_card_slash.js +15 -1
- package/dist/icons/finance/currency_exchange.js +15 -1
- package/dist/icons/finance/dollar.js +15 -1
- package/dist/icons/finance/ethereum.js +15 -1
- package/dist/icons/finance/paypass.js +15 -1
- package/dist/icons/finance/strongbox.js +15 -1
- package/dist/icons/finance/wallet.js +15 -1
- package/dist/icons/index.js +1095 -1
- package/dist/icons/layout/block_align_bottom.js +15 -1
- package/dist/icons/layout/block_align_center.js +15 -1
- package/dist/icons/layout/block_align_left.js +15 -1
- package/dist/icons/layout/block_align_middle.js +15 -1
- package/dist/icons/layout/block_align_right.js +15 -1
- package/dist/icons/layout/block_align_top.js +15 -1
- package/dist/icons/layout/block_horizontal.js +15 -1
- package/dist/icons/layout/block_vertical.js +15 -1
- package/dist/icons/layout/edit_shape.js +15 -1
- package/dist/icons/layout/elements.js +15 -1
- package/dist/icons/layout/elements_add.js +15 -1
- package/dist/icons/layout/elements_filled.js +15 -1
- package/dist/icons/layout/elements_masonry.js +15 -1
- package/dist/icons/layout/frame.js +15 -1
- package/dist/icons/layout/frame_stack.js +15 -1
- package/dist/icons/layout/grid.js +15 -1
- package/dist/icons/layout/grid_column_three.js +15 -1
- package/dist/icons/layout/grid_column_two.js +15 -1
- package/dist/icons/layout/grid_dynamic.js +15 -1
- package/dist/icons/layout/grid_frame.js +15 -1
- package/dist/icons/layout/grid_row_three.js +15 -1
- package/dist/icons/layout/grid_row_two.js +15 -1
- package/dist/icons/layout/grid_six.js +15 -1
- package/dist/icons/layout/grid_small.js +15 -1
- package/dist/icons/layout/iframe.js +15 -1
- package/dist/icons/layout/kanban.js +15 -1
- package/dist/icons/layout/layout.js +15 -1
- package/dist/icons/layout/list.js +15 -1
- package/dist/icons/layout/list_filled.js +20 -1
- package/dist/icons/layout/padding.js +15 -1
- package/dist/icons/layout/page_break.js +15 -1
- package/dist/icons/layout/rotate_left.js +15 -1
- package/dist/icons/layout/rotate_right.js +15 -1
- package/dist/icons/layout/ruler.js +15 -1
- package/dist/icons/layout/segment.js +15 -1
- package/dist/icons/layout/select_area.js +15 -1
- package/dist/icons/layout/select_boundary.js +15 -1
- package/dist/icons/layout/sidebar_left.js +15 -1
- package/dist/icons/layout/sidebar_right.js +15 -1
- package/dist/icons/layout/slides.js +15 -1
- package/dist/icons/layout/slides_horizontal.js +15 -1
- package/dist/icons/layout/slides_vertical.js +20 -1
- package/dist/icons/layout/stack.js +15 -1
- package/dist/icons/layout/text.js +15 -1
- package/dist/icons/maps/atlas.js +15 -1
- package/dist/icons/maps/compass.js +15 -1
- package/dist/icons/maps/direction.js +15 -1
- package/dist/icons/maps/direction_angled.js +15 -1
- package/dist/icons/maps/globe.js +15 -1
- package/dist/icons/maps/globe_slash.js +15 -1
- package/dist/icons/maps/location.js +15 -1
- package/dist/icons/maps/location_slash.js +15 -1
- package/dist/icons/maps/map.js +15 -1
- package/dist/icons/maps/marker.js +15 -1
- package/dist/icons/maps/panorama.js +15 -1
- package/dist/icons/maps/pin.js +15 -1
- package/dist/icons/maps/pin_arrow.js +15 -1
- package/dist/icons/maps/pin_location.js +15 -1
- package/dist/icons/maps/pin_plus.js +15 -1
- package/dist/icons/maps/pin_question.js +15 -1
- package/dist/icons/maps/pin_slash.js +15 -1
- package/dist/icons/maps/push_pin.js +15 -1
- package/dist/icons/maps/push_pin_filled.js +15 -1
- package/dist/icons/maps/push_pin_slash.js +15 -1
- package/dist/icons/maps/radar.js +15 -1
- package/dist/icons/maps/route.js +15 -1
- package/dist/icons/message/bubble.js +15 -1
- package/dist/icons/message/bubble_question.js +15 -1
- package/dist/icons/message/comment.js +15 -1
- package/dist/icons/message/comment_add.js +15 -1
- package/dist/icons/message/comment_check.js +15 -1
- package/dist/icons/message/comment_close.js +15 -1
- package/dist/icons/message/comment_minus.js +15 -1
- package/dist/icons/message/comment_text.js +15 -1
- package/dist/icons/misc/advertisement.js +15 -1
- package/dist/icons/misc/atom.js +15 -1
- package/dist/icons/misc/bone.js +15 -1
- package/dist/icons/misc/brightness_high.js +15 -1
- package/dist/icons/misc/brightness_low.js +15 -1
- package/dist/icons/misc/contrast.js +15 -1
- package/dist/icons/misc/crosshairs.js +15 -1
- package/dist/icons/misc/crown.js +15 -1
- package/dist/icons/misc/footprint.js +15 -1
- package/dist/icons/misc/form.js +15 -1
- package/dist/icons/misc/funnel.js +15 -1
- package/dist/icons/misc/infinite.js +15 -1
- package/dist/icons/misc/insert_button.js +15 -1
- package/dist/icons/misc/light_bulb.js +15 -1
- package/dist/icons/misc/moon.js +15 -1
- package/dist/icons/misc/nut.js +15 -1
- package/dist/icons/misc/planet.js +15 -1
- package/dist/icons/misc/plus_thick.js +15 -1
- package/dist/icons/misc/pocket.js +15 -1
- package/dist/icons/misc/rocket.js +15 -1
- package/dist/icons/misc/soup.js +19 -1
- package/dist/icons/misc/sun.js +15 -1
- package/dist/icons/misc/toy_horse.js +15 -1
- package/dist/icons/misc/trophy.js +15 -1
- package/dist/icons/misc/watercloset.js +15 -1
- package/dist/icons/notifications/alert_circle.js +15 -1
- package/dist/icons/notifications/alert_octogon.js +15 -1
- package/dist/icons/notifications/alert_triangle.js +15 -1
- package/dist/icons/notifications/app_notification.js +15 -1
- package/dist/icons/notifications/bell.js +15 -1
- package/dist/icons/notifications/bell_alert.js +15 -1
- package/dist/icons/notifications/bell_checkmark.js +15 -1
- package/dist/icons/notifications/bell_minus.js +15 -1
- package/dist/icons/notifications/bell_plus.js +15 -1
- package/dist/icons/notifications/bell_ring.js +17 -1
- package/dist/icons/notifications/bell_slash.js +15 -1
- package/dist/icons/notifications/information.js +15 -1
- package/dist/icons/notifications/minus_octogon.js +15 -1
- package/dist/icons/notifications/question_circle.js +15 -1
- package/dist/icons/people/group.js +15 -1
- package/dist/icons/people/group_add.js +15 -1
- package/dist/icons/people/group_chat.js +17 -1
- package/dist/icons/people/group_remove.js +15 -1
- package/dist/icons/people/group_send.js +16 -1
- package/dist/icons/people/groups.js +15 -1
- package/dist/icons/people/person.js +15 -1
- package/dist/icons/people/person_add.js +15 -1
- package/dist/icons/people/person_checkmark.js +15 -1
- package/dist/icons/people/person_circle.js +17 -1
- package/dist/icons/people/person_close.js +17 -1
- package/dist/icons/people/person_remove.js +15 -1
- package/dist/icons/people/person_slash.js +17 -1
- package/dist/icons/phone/keypad.js +15 -1
- package/dist/icons/phone/phone.js +15 -1
- package/dist/icons/phone/phone_add.js +15 -1
- package/dist/icons/phone/phone_calling.js +15 -1
- package/dist/icons/phone/phone_check.js +15 -1
- package/dist/icons/phone/phone_close.js +15 -1
- package/dist/icons/phone/phone_decline.js +15 -1
- package/dist/icons/phone/phone_forwarded.js +15 -1
- package/dist/icons/phone/phone_hash.js +15 -1
- package/dist/icons/phone/phone_incoming.js +15 -1
- package/dist/icons/phone/phone_outgoing.js +15 -1
- package/dist/icons/phone/phone_pause.js +15 -1
- package/dist/icons/phone/phone_slash.js +15 -1
- package/dist/icons/phone/voicemail.js +15 -1
- package/dist/icons/security/key.js +15 -1
- package/dist/icons/security/key_slash.js +15 -1
- package/dist/icons/security/lock.js +15 -1
- package/dist/icons/security/lock_circle.js +15 -1
- package/dist/icons/security/lock_open.js +15 -1
- package/dist/icons/security/lock_slash.js +15 -1
- package/dist/icons/security/shield.js +15 -1
- package/dist/icons/security/shield_checkmark.js +15 -1
- package/dist/icons/security/shield_lock.js +15 -1
- package/dist/icons/security/shield_slash.js +15 -1
- package/dist/icons/security/verified.js +15 -1
- package/dist/icons/shopping/basket.js +15 -1
- package/dist/icons/shopping/cart.js +15 -1
- package/dist/icons/shopping/cart_filled.js +15 -1
- package/dist/icons/shopping/coupon.js +15 -1
- package/dist/icons/shopping/coupon_cut.js +15 -1
- package/dist/icons/shopping/delivery.js +15 -1
- package/dist/icons/shopping/discount.js +15 -1
- package/dist/icons/shopping/gift.js +15 -1
- package/dist/icons/shopping/gift_bag.js +15 -1
- package/dist/icons/shopping/inventory.js +15 -1
- package/dist/icons/shopping/point_of_sale.js +15 -1
- package/dist/icons/shopping/shirt.js +15 -1
- package/dist/icons/shopping/tag.js +15 -1
- package/dist/icons/shopping/tag_diagonal.js +15 -1
- package/dist/icons/shopping/tote.js +15 -1
- package/dist/icons/special/upload_audio.js +20 -1
- package/dist/icons/special/upload_file.js +15 -1
- package/dist/icons/special/upload_image.js +17 -1
- package/dist/icons/special/upload_video.js +18 -1
- package/dist/icons/symbols/at.js +15 -1
- package/dist/icons/symbols/cc.js +15 -1
- package/dist/icons/symbols/cmd.js +15 -1
- package/dist/icons/symbols/facebook.js +15 -1
- package/dist/icons/symbols/google.js +18 -1
- package/dist/icons/symbols/hash.js +15 -1
- package/dist/icons/symbols/instagram.js +27 -1
- package/dist/icons/symbols/messenger.js +21 -1
- package/dist/icons/symbols/twitter.js +15 -1
- package/dist/icons/technology/battery.js +15 -1
- package/dist/icons/technology/battery_100.js +15 -1
- package/dist/icons/technology/battery_20.js +15 -1
- package/dist/icons/technology/battery_40.js +15 -1
- package/dist/icons/technology/battery_60.js +15 -1
- package/dist/icons/technology/battery_80.js +15 -1
- package/dist/icons/technology/battery_charging.js +15 -1
- package/dist/icons/technology/battery_slash.js +15 -1
- package/dist/icons/technology/devices.js +15 -1
- package/dist/icons/technology/floppy_disk.js +15 -1
- package/dist/icons/technology/iphone.js +15 -1
- package/dist/icons/technology/laptop.js +15 -1
- package/dist/icons/technology/mobile.js +15 -1
- package/dist/icons/technology/monitor.js +15 -1
- package/dist/icons/technology/server.js +15 -1
- package/dist/icons/technology/sim_card.js +15 -1
- package/dist/icons/technology/usb_stick.js +15 -1
- package/dist/icons/text/align_center.js +15 -1
- package/dist/icons/text/align_justified.js +15 -1
- package/dist/icons/text/align_left.js +15 -1
- package/dist/icons/text/align_right.js +15 -1
- package/dist/icons/text/code_block.js +15 -1
- package/dist/icons/text/divider.js +15 -1
- package/dist/icons/text/footnote.js +17 -1
- package/dist/icons/text/indent_decrease.js +15 -1
- package/dist/icons/text/indent_increase.js +15 -1
- package/dist/icons/text/list_ordered.js +15 -1
- package/dist/icons/text/list_unordered.js +15 -1
- package/dist/icons/text/quote.js +15 -1
- package/dist/icons/text/table.js +15 -1
- package/dist/icons/time/alarm.js +15 -1
- package/dist/icons/time/alarm_checkmark.js +15 -1
- package/dist/icons/time/alarm_minus.js +15 -1
- package/dist/icons/time/alarm_plus.js +15 -1
- package/dist/icons/time/alarm_slash.js +15 -1
- package/dist/icons/time/alarm_snooze.js +15 -1
- package/dist/icons/time/calendar.js +15 -1
- package/dist/icons/time/calendar_add.js +15 -1
- package/dist/icons/time/calendar_checkmark.js +15 -1
- package/dist/icons/time/calendar_close.js +15 -1
- package/dist/icons/time/calendar_dates.js +15 -1
- package/dist/icons/time/calendar_minus.js +15 -1
- package/dist/icons/time/calendar_plus.js +15 -1
- package/dist/icons/time/calendar_scroll.js +17 -1
- package/dist/icons/time/clock.js +15 -1
- package/dist/icons/time/clock_history.js +15 -1
- package/dist/icons/time/stopwatch.js +15 -1
- package/dist/icons/time/timer.js +15 -1
- package/dist/icons/time/watch.js +15 -1
- package/dist/index.js +117 -1
- package/dist/utils/date.js +73 -1
- package/dist/utils/function.js +5 -1
- package/package.json +2 -4
- package/dist/styles/output.css +0 -1776
|
@@ -1,10 +1,175 @@
|
|
|
1
|
-
|
|
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 bold = require('../../../icons/basic/bold.js');
|
|
8
|
+
var file_code = require('../../../icons/file/file_code.js');
|
|
9
|
+
var grid = require('../../../icons/layout/grid.js');
|
|
10
|
+
var headphones = require('../../../icons/audio_video/headphones.js');
|
|
11
|
+
var image = require('../../../icons/basic/image.js');
|
|
12
|
+
var italic = require('../../../icons/basic/italic.js');
|
|
13
|
+
var link = require('../../../icons/basic/link.js');
|
|
14
|
+
var list_ordered = require('../../../icons/text/list_ordered.js');
|
|
15
|
+
var list_unordered = require('../../../icons/text/list_unordered.js');
|
|
16
|
+
var quote = require('../../../icons/text/quote.js');
|
|
17
|
+
var redo = require('../../../icons/arrow/redo.js');
|
|
18
|
+
var strikethrough = require('../../../icons/basic/strikethrough.js');
|
|
19
|
+
var underline = require('../../../icons/basic/underline.js');
|
|
20
|
+
var undo = require('../../../icons/arrow/undo.js');
|
|
21
|
+
var video = require('../../../icons/basic/video.js');
|
|
22
|
+
var constants = require('../constants.js');
|
|
23
|
+
var style_dropdown = require('./style_dropdown.js');
|
|
24
|
+
var alignment_dropdown = require('./alignment_dropdown.js');
|
|
25
|
+
var button_modal = require('./button_modal.js');
|
|
26
|
+
|
|
27
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
28
|
+
|
|
29
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
30
|
+
|
|
31
|
+
const EditorBar = () => {
|
|
32
|
+
const editorRef = plate.useEditorRef('main');
|
|
33
|
+
const stateEditor = plate.useEditorState();
|
|
34
|
+
const audioRef = React__default.default.useRef(null);
|
|
35
|
+
const imageRef = React__default.default.useRef(null);
|
|
36
|
+
const videoRef = React__default.default.useRef(null);
|
|
37
|
+
const boldState = plate.useMarkToolbarButtonState({ nodeType: plate.MARK_BOLD });
|
|
38
|
+
const { props: { pressed: currBold, onClick: handleBold }, } = plate.useMarkToolbarButton(boldState);
|
|
39
|
+
const italicState = plate.useMarkToolbarButtonState({ nodeType: plate.MARK_ITALIC });
|
|
40
|
+
const { props: { pressed: currItalic, onClick: handleItalic }, } = plate.useMarkToolbarButton(italicState);
|
|
41
|
+
const strikethroughState = plate.useMarkToolbarButtonState({
|
|
42
|
+
nodeType: plate.MARK_STRIKETHROUGH,
|
|
43
|
+
});
|
|
44
|
+
const { props: { pressed: currStrikethrough, onClick: handleStrikethrough }, } = plate.useMarkToolbarButton(strikethroughState);
|
|
45
|
+
const underlineState = plate.useMarkToolbarButtonState({
|
|
46
|
+
nodeType: plate.MARK_UNDERLINE,
|
|
47
|
+
});
|
|
48
|
+
const { props: { pressed: currUnderline, onClick: handleUnderline }, } = plate.useMarkToolbarButton(underlineState);
|
|
49
|
+
const inlineCodeState = plate.useMarkToolbarButtonState({ nodeType: plate.MARK_CODE });
|
|
50
|
+
const { props: { pressed: currInlineCode, onClick: handleInlineCode }, } = plate.useMarkToolbarButton(inlineCodeState);
|
|
51
|
+
const linkState = plate.useLinkToolbarButtonState();
|
|
52
|
+
const { props: { pressed: currLink, onClick: handleLink }, } = plate.useLinkToolbarButton(linkState);
|
|
53
|
+
const orderedListState = plate.useListToolbarButtonState({ nodeType: plate.ELEMENT_OL });
|
|
54
|
+
const { props: { pressed: currOrderedList, onClick: handleOrderedList }, } = plate.useListToolbarButton(orderedListState);
|
|
55
|
+
const unorderedListState = plate.useListToolbarButtonState({
|
|
56
|
+
nodeType: plate.ELEMENT_UL,
|
|
57
|
+
});
|
|
58
|
+
const { props: { pressed: currUnorderedList, onClick: handleUnorderedList }, } = plate.useListToolbarButton(unorderedListState);
|
|
59
|
+
const handleAudioChange = async (event) => {
|
|
60
|
+
const file = event.target?.files?.[0];
|
|
61
|
+
if (!file)
|
|
62
|
+
return;
|
|
63
|
+
/**
|
|
64
|
+
* TODO: Insert audio component
|
|
65
|
+
*/
|
|
66
|
+
};
|
|
67
|
+
const handleBlockquote = () => {
|
|
68
|
+
plate.toggleNodeType(stateEditor, { activeType: plate.ELEMENT_BLOCKQUOTE });
|
|
69
|
+
};
|
|
70
|
+
const handleButton = (type) => {
|
|
71
|
+
plate.insertNodes(editorRef, [
|
|
72
|
+
{
|
|
73
|
+
type: plate.getPluginType(editorRef, constants.ELEMENT_BUTTON),
|
|
74
|
+
buttonType: type,
|
|
75
|
+
children: [
|
|
76
|
+
{
|
|
77
|
+
text: 'Subscribe',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
]);
|
|
82
|
+
};
|
|
83
|
+
const handleRedo = () => editorRef.redo();
|
|
84
|
+
const handleUndo = () => editorRef.undo();
|
|
85
|
+
const handleVideoChange = async () => {
|
|
86
|
+
const files = videoRef.current?.files;
|
|
87
|
+
if (!files)
|
|
88
|
+
return;
|
|
89
|
+
/**
|
|
90
|
+
* TODO: Insert video component
|
|
91
|
+
*/
|
|
92
|
+
};
|
|
93
|
+
return (React__default.default.createElement(Wrapper, null,
|
|
94
|
+
React__default.default.createElement(Menu, { "aria-label": "editor-navigation" },
|
|
95
|
+
React__default.default.createElement(MenuSection, null,
|
|
96
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Undo", place: "top" },
|
|
97
|
+
React__default.default.createElement(MenuButton, { "$active": false, onClick: handleUndo },
|
|
98
|
+
React__default.default.createElement(undo.Undo, { size: 24, color: "grey-5" }))),
|
|
99
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Redo", place: "top" },
|
|
100
|
+
React__default.default.createElement(MenuButton, { "$active": false, onClick: handleRedo },
|
|
101
|
+
React__default.default.createElement(redo.Redo, { size: 24, color: "grey-5" })))),
|
|
102
|
+
React__default.default.createElement(Divider, null),
|
|
103
|
+
React__default.default.createElement(MenuSection, null,
|
|
104
|
+
React__default.default.createElement(style_dropdown.StyleDropdown, { editorRef: editorRef })),
|
|
105
|
+
React__default.default.createElement(Divider, null),
|
|
106
|
+
React__default.default.createElement(MenuSection, null,
|
|
107
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Bold", place: "top" },
|
|
108
|
+
React__default.default.createElement(MenuButton, { "$active": currBold, onClick: handleBold },
|
|
109
|
+
React__default.default.createElement(bold.Bold, { size: 24, color: "grey-5" }))),
|
|
110
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Italic", place: "top" },
|
|
111
|
+
React__default.default.createElement(MenuButton, { "$active": currItalic, onClick: handleItalic },
|
|
112
|
+
React__default.default.createElement(italic.Italic, { size: 24, color: "grey-5" }))),
|
|
113
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Underline", place: "top" },
|
|
114
|
+
React__default.default.createElement(MenuButton, { "$active": currUnderline, onClick: handleUnderline },
|
|
115
|
+
React__default.default.createElement(underline.Underline, { size: 24, color: "grey-5" }))),
|
|
116
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Strikethrough", place: "top" },
|
|
117
|
+
React__default.default.createElement(MenuButton, { "$active": currStrikethrough, onClick: handleStrikethrough },
|
|
118
|
+
React__default.default.createElement(strikethrough.Strikethrough, { size: 24, color: "grey-5" }))),
|
|
119
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Inline code", place: "top" },
|
|
120
|
+
React__default.default.createElement(MenuButton, { "$active": currInlineCode, onClick: handleInlineCode },
|
|
121
|
+
React__default.default.createElement(file_code.FileCode, { size: 24, color: "grey-5" })))),
|
|
122
|
+
React__default.default.createElement(Divider, null),
|
|
123
|
+
React__default.default.createElement(MenuSection, null,
|
|
124
|
+
React__default.default.createElement(MenuButton, { "$active": false, as: "div" },
|
|
125
|
+
React__default.default.createElement(alignment_dropdown.AlignmentDropdown, { editorRef: editorRef }))),
|
|
126
|
+
React__default.default.createElement(Divider, null),
|
|
127
|
+
React__default.default.createElement(MenuSection, null,
|
|
128
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Link", place: "top" },
|
|
129
|
+
React__default.default.createElement(MenuButton, { "$active": currLink, onClick: handleLink },
|
|
130
|
+
React__default.default.createElement(link.Link, { size: 24, color: "grey-5" }))),
|
|
131
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Image", place: "top" },
|
|
132
|
+
React__default.default.createElement(MenuButton, { "$active": false, as: "label" },
|
|
133
|
+
React__default.default.createElement("div", null,
|
|
134
|
+
React__default.default.createElement("input", { accept: "image/*", ref: imageRef, style: { display: 'none' }, type: "file" }),
|
|
135
|
+
React__default.default.createElement(image.Image, { size: 24, color: "grey-5" })))),
|
|
136
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Video", place: "top" },
|
|
137
|
+
React__default.default.createElement(MenuButton, { "$active": false, as: "label", onChange: handleVideoChange },
|
|
138
|
+
React__default.default.createElement("div", { onClick: () => videoRef.current?.click() },
|
|
139
|
+
React__default.default.createElement("input", { accept: "video/*", ref: videoRef, style: { display: 'none' }, type: "file" }),
|
|
140
|
+
React__default.default.createElement(video.Video, { size: 24, color: "grey-5" })))),
|
|
141
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Audio", place: "top" },
|
|
142
|
+
React__default.default.createElement(MenuButton, { "$active": false, as: "label", onChange: handleAudioChange },
|
|
143
|
+
React__default.default.createElement("div", { onClick: () => audioRef.current?.click() },
|
|
144
|
+
React__default.default.createElement("input", { accept: "audio/*", ref: audioRef, style: { display: 'none' }, type: "file" }),
|
|
145
|
+
React__default.default.createElement(headphones.Headphones, { size: 24, color: "grey-5" })))),
|
|
146
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Blockquote", place: "top" },
|
|
147
|
+
React__default.default.createElement(MenuButton, { "$active": false, onClick: handleBlockquote },
|
|
148
|
+
React__default.default.createElement(quote.Quote, { size: 24, color: "grey-5" }))),
|
|
149
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Add a button", place: "top" },
|
|
150
|
+
React__default.default.createElement(button_modal.ButtonModal, { onButtonInsert: handleButton }))),
|
|
151
|
+
React__default.default.createElement(Divider, null),
|
|
152
|
+
React__default.default.createElement(MenuSection, null,
|
|
153
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Unordered List", place: "top" },
|
|
154
|
+
React__default.default.createElement(MenuButton, { "$active": currUnorderedList, onClick: handleUnorderedList },
|
|
155
|
+
React__default.default.createElement(list_unordered.ListUnordered, { size: 24, color: "grey-5" }))),
|
|
156
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Ordered List", place: "top" },
|
|
157
|
+
React__default.default.createElement(MenuButton, { "$active": currOrderedList, onClick: handleOrderedList },
|
|
158
|
+
React__default.default.createElement(list_ordered.ListOrdered, { size: 24, color: "grey-5" }))),
|
|
159
|
+
React__default.default.createElement(tooltip.Tooltip, { content: "Add a button", place: "top" },
|
|
160
|
+
React__default.default.createElement(MenuButton, { "$active": currOrderedList, onClick: () => {
|
|
161
|
+
plate.insertTable(editorRef);
|
|
162
|
+
} },
|
|
163
|
+
React__default.default.createElement(grid.Grid, { size: 24, color: "grey-5" })))))));
|
|
164
|
+
};
|
|
165
|
+
const Wrapper = styled.styled.div `
|
|
2
166
|
position: sticky;
|
|
3
167
|
z-index: 2;
|
|
4
168
|
left: 0;
|
|
5
169
|
right: 0;
|
|
6
170
|
top: 0;
|
|
7
|
-
|
|
171
|
+
`;
|
|
172
|
+
const Menu = styled.styled.nav `
|
|
8
173
|
display: flex;
|
|
9
174
|
gap: 12px;
|
|
10
175
|
justify-content: center;
|
|
@@ -13,13 +178,15 @@
|
|
|
13
178
|
margin: 0 auto;
|
|
14
179
|
padding: 14px 24px;
|
|
15
180
|
background-color: var(--color-white);
|
|
16
|
-
|
|
181
|
+
`;
|
|
182
|
+
const MenuSection = styled.styled.div `
|
|
17
183
|
display: flex;
|
|
18
184
|
gap: 16px;
|
|
19
185
|
align-items: center;
|
|
20
186
|
width: fit-content;
|
|
21
187
|
flex-shrink: 0;
|
|
22
|
-
|
|
188
|
+
`;
|
|
189
|
+
const MenuButton = styled.styled.button `
|
|
23
190
|
padding: 2px;
|
|
24
191
|
border: none;
|
|
25
192
|
outline: none;
|
|
@@ -46,9 +213,13 @@
|
|
|
46
213
|
}
|
|
47
214
|
}
|
|
48
215
|
|
|
49
|
-
background-color: ${({$active
|
|
50
|
-
|
|
216
|
+
background-color: ${({ $active }) => $active ? 'var(--color-grey-9)' : 'transparent'};
|
|
217
|
+
`;
|
|
218
|
+
const Divider = styled.styled.div `
|
|
51
219
|
width: 1px;
|
|
52
220
|
height: 28px;
|
|
53
221
|
background-color: var(--color-grey-9);
|
|
54
|
-
`;
|
|
222
|
+
`;
|
|
223
|
+
|
|
224
|
+
exports.EditorBar = EditorBar;
|
|
225
|
+
exports.MenuButton = MenuButton;
|
|
@@ -1 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var plate = require('@udecode/plate');
|
|
5
|
+
var button = require('../../actions/button/button.js');
|
|
6
|
+
var dropdown = require('../../actions/dropdown/dropdown.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 items = [
|
|
13
|
+
{
|
|
14
|
+
value: plate.ELEMENT_PARAGRAPH,
|
|
15
|
+
label: 'Paragraph',
|
|
16
|
+
description: 'Paragraph',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
value: plate.ELEMENT_H1,
|
|
20
|
+
label: 'Heading 1',
|
|
21
|
+
description: 'Heading 1',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
value: plate.ELEMENT_H2,
|
|
25
|
+
label: 'Heading 2',
|
|
26
|
+
description: 'Heading 2',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: plate.ELEMENT_H3,
|
|
30
|
+
label: 'Heading 3',
|
|
31
|
+
description: 'Heading 3',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
value: plate.ELEMENT_H4,
|
|
35
|
+
label: 'Heading 4',
|
|
36
|
+
description: 'Heading 4',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: plate.ELEMENT_H5,
|
|
40
|
+
label: 'Heading 5',
|
|
41
|
+
description: 'Heading 5',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
value: plate.ELEMENT_H6,
|
|
45
|
+
label: 'Heading 6',
|
|
46
|
+
description: 'Heading 6',
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
// eslint-disable-next-line
|
|
50
|
+
const defaultItem = items.find((item) => item.value === plate.ELEMENT_PARAGRAPH);
|
|
51
|
+
const StyleDropdown = ({ editorRef }) => {
|
|
52
|
+
let value = plate.ELEMENT_PARAGRAPH;
|
|
53
|
+
const handleChange = (event) => {
|
|
54
|
+
const value = event.target.getAttribute('data-value');
|
|
55
|
+
if (!value)
|
|
56
|
+
return;
|
|
57
|
+
plate.toggleNodeType(editorRef, { activeType: value });
|
|
58
|
+
};
|
|
59
|
+
if (plate.isCollapsed(editorRef?.selection)) {
|
|
60
|
+
const entry = plate.findNode(editorRef, {
|
|
61
|
+
match: (n) => plate.isBlock(editorRef, n),
|
|
62
|
+
});
|
|
63
|
+
if (entry) {
|
|
64
|
+
value =
|
|
65
|
+
items.find((item) => item.value === entry[0].type)?.value ??
|
|
66
|
+
plate.ELEMENT_PARAGRAPH;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const selectedItem = items.find((item) => item.value === value) ?? defaultItem;
|
|
70
|
+
const { label: selectedItemLabel } = selectedItem;
|
|
71
|
+
return (React__default.default.createElement(dropdown.Dropdown, { maintainState: false, onChange: handleChange, options: items, trigger: React__default.default.createElement(button.Button, { type: "special", size: "small", sx: "padding: 1px 4px; & > * { color: var(--color-grey-5); }" }, selectedItemLabel) }));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
exports.StyleDropdown = StyleDropdown;
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var plate = require('@udecode/plate');
|
|
5
|
+
var paragraph = require('../../../atoms/typography/paragraph.js');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
|
|
11
|
+
const BlockquoteElement = React__default.default.forwardRef(({ children, ...props }, ref) => {
|
|
12
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, ref: ref, ...props },
|
|
13
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
14
|
+
React__default.default.createElement(paragraph.P, { as: "blockquote", sx: "padding-left: 16px; border-left: 1px solid var(--color-grey-8);" }, children))));
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
exports.BlockquoteElement = BlockquoteElement;
|
|
@@ -1 +1,54 @@
|
|
|
1
|
-
|
|
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');
|
|
8
|
+
|
|
9
|
+
const blocks = [
|
|
10
|
+
buttons.createButtonsPlugin(),
|
|
11
|
+
plate.createBlockquotePlugin(),
|
|
12
|
+
plate.createCodeBlockPlugin(),
|
|
13
|
+
plate.createHeadingPlugin(),
|
|
14
|
+
plate.createHorizontalRulePlugin(),
|
|
15
|
+
plate.createImagePlugin({
|
|
16
|
+
options: {
|
|
17
|
+
disableUploadInsert: true,
|
|
18
|
+
disableEmbedInsert: true,
|
|
19
|
+
},
|
|
20
|
+
}),
|
|
21
|
+
qa.createQAPlugin(),
|
|
22
|
+
plate.createTextIndentPlugin(),
|
|
23
|
+
plate.createIndentListPlugin({
|
|
24
|
+
inject: {
|
|
25
|
+
props: {
|
|
26
|
+
validTypes: [
|
|
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,
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
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(),
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
exports.blocks = blocks;
|
|
@@ -1,13 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var styled = 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) => {
|
|
14
|
+
const { buttonType, color } = element;
|
|
15
|
+
const pressed = !!editor?.selection &&
|
|
16
|
+
plate.someNode(editor, {
|
|
17
|
+
match: { type: plate.getPluginType(editor, constants.ELEMENT_BUTTON) },
|
|
18
|
+
});
|
|
19
|
+
const currBlock = plate.getBlockAbove(editor, {
|
|
20
|
+
at: editor.selection?.focus,
|
|
21
|
+
match: {
|
|
22
|
+
type: plate.getPluginType(editor, constants.ELEMENT_BUTTON),
|
|
23
|
+
buttonType: buttonType,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
const editable = !plate.isEditorReadOnly(editor);
|
|
27
|
+
const handleColorChange = (color) => {
|
|
28
|
+
if (currBlock) {
|
|
29
|
+
plate.setNodes(editor, {
|
|
30
|
+
color,
|
|
31
|
+
}, {
|
|
32
|
+
at: currBlock ? currBlock[1] : undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
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) => {
|
|
37
|
+
event.stopPropagation();
|
|
38
|
+
handleColorChange(color);
|
|
39
|
+
} })))));
|
|
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: `
|
|
2
44
|
margin-left: auto !important;
|
|
3
45
|
margin-right: auto !important;
|
|
4
|
-
background-color: ${
|
|
5
|
-
border-color: ${
|
|
46
|
+
background-color: ${color ? color : 'var(--color-blue-5)'} !important;
|
|
47
|
+
border-color: ${color ? color : 'var(--color-blue-5)'} !important;
|
|
6
48
|
&:hover {
|
|
7
|
-
background-color: ${
|
|
49
|
+
background-color: ${color ? color : 'var(--color-blue-5)'} !important;
|
|
8
50
|
filter: brightness(85%);
|
|
9
51
|
}
|
|
10
|
-
`},
|
|
52
|
+
` }, children))));
|
|
53
|
+
});
|
|
54
|
+
const ColorMenuComponent = styled.styled.div `
|
|
11
55
|
display: flex;
|
|
12
56
|
justify-content: center;
|
|
13
57
|
align-items: center;
|
|
@@ -20,10 +64,28 @@
|
|
|
20
64
|
padding: 8px 16px;
|
|
21
65
|
box-shadow: var(--elevation-1);
|
|
22
66
|
background-color: var(--color-white);
|
|
23
|
-
|
|
67
|
+
`;
|
|
68
|
+
const ColorItem = styled.styled.div `
|
|
24
69
|
width: 24px;
|
|
25
70
|
height: 24px;
|
|
26
71
|
border-radius: 50%;
|
|
27
|
-
background-color: ${({$color
|
|
72
|
+
background-color: ${({ $color }) => $color};
|
|
28
73
|
cursor: pointer;
|
|
29
|
-
|
|
74
|
+
`;
|
|
75
|
+
const createButtonsPlugin = plate.createPluginFactory({
|
|
76
|
+
key: constants.ELEMENT_BUTTON,
|
|
77
|
+
type: constants.ELEMENT_BUTTON,
|
|
78
|
+
isElement: true,
|
|
79
|
+
component: Button,
|
|
80
|
+
then: () => ({
|
|
81
|
+
inject: {
|
|
82
|
+
props: {
|
|
83
|
+
classNames: undefined,
|
|
84
|
+
validTypes: [plate.ELEMENT_PARAGRAPH],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
}),
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
exports.Button = Button;
|
|
91
|
+
exports.createButtonsPlugin = createButtonsPlugin;
|
|
@@ -1,2 +1,78 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
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 },
|
|
36
|
+
children,
|
|
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, {
|
|
40
|
+
sideOffset: 4,
|
|
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'),
|
|
42
|
+
});
|
|
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'), {
|
|
46
|
+
variants: {
|
|
47
|
+
inset: {
|
|
48
|
+
true: 'pl-8',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
});
|
|
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" }))),
|
|
57
|
+
children)));
|
|
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" })))),
|
|
62
|
+
children)));
|
|
63
|
+
const dropdownMenuLabelVariants = classVarianceAuthority.cva(cn.cn('select-none px-2 py-1.5 text-sm font-semibold'), {
|
|
64
|
+
variants: {
|
|
65
|
+
inset: {
|
|
66
|
+
true: 'pl-8',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
});
|
|
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');
|
|
73
|
+
|
|
74
|
+
exports.DropdownMenu = DropdownMenu;
|
|
75
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
76
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
77
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
78
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|