@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,25 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
import { PlateElement, createPluginFactory } from '@udecode/plate';
|
|
3
|
-
import { styled } from 'styled-components';
|
|
4
|
-
import { ELEMENT_QA } from '../../constants.js';
|
|
5
|
-
import { EditorContext } from '../../context.js';
|
|
6
|
-
import { Button } from '../../../actions/button/button.js';
|
|
7
|
-
import { Box } from '../../../atoms/box/box.js';
|
|
8
|
-
import { HideButRender } from '../../../atoms/hide/hide.js';
|
|
9
|
-
import { H } from '../../../atoms/typography/heading.js';
|
|
10
|
-
import { ChevronDown } from '../../../../icons/arrow/chevron_down.js';
|
|
11
|
-
import { ChevronUp } from '../../../../icons/arrow/chevron_up.js';
|
|
1
|
+
'use strict';
|
|
12
2
|
|
|
13
|
-
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var plate = require('@udecode/plate');
|
|
5
|
+
var styledComponents = require('styled-components');
|
|
6
|
+
var constants = require('../../constants.js');
|
|
7
|
+
var context = require('../../context.js');
|
|
8
|
+
var button = require('../../../actions/button/button.js');
|
|
9
|
+
var box = require('../../../atoms/box/box.js');
|
|
10
|
+
var hide = require('../../../atoms/hide/hide.js');
|
|
11
|
+
var heading = require('../../../atoms/typography/heading.js');
|
|
12
|
+
var chevron_down = require('../../../../icons/arrow/chevron_down.js');
|
|
13
|
+
var chevron_up = require('../../../../icons/arrow/chevron_up.js');
|
|
14
|
+
|
|
15
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
16
|
+
|
|
17
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
|
+
|
|
19
|
+
const QuestionAnswerElement = React__default.default.forwardRef(({ children, element, ...props }, ref) => {
|
|
14
20
|
const { questionAnswerId } = element;
|
|
15
|
-
const { commentInputLoader: CommentInput, commentLoader: Comments } = React__default.useContext(EditorContext);
|
|
16
|
-
const [showAnswers, setShowAnswers] = React__default.useState(false);
|
|
17
|
-
return (React__default.createElement(PlateElement, { asChild: true, element: element, ref: ref, ...props },
|
|
18
|
-
React__default.createElement(React__default.Fragment, null,
|
|
19
|
-
React__default.createElement(Question, null,
|
|
20
|
-
React__default.createElement(H, { as: "p", "$fontSize": 18, "$lineHeight": 26, "$mediumBold": true }, children)),
|
|
21
|
-
React__default.createElement(Box, { "$dir": "column", "$gap": 24, "$padding": 24, ...{ contentEditable: false } },
|
|
22
|
-
React__default.createElement(Button, { as: "div", icon: showAnswers ? (React__default.createElement(ChevronUp, { color: "grey-3" })) : (React__default.createElement(ChevronDown, { color: "grey-3" })), onClick: () => setShowAnswers((prev) => !prev), size: "small", sx: `
|
|
21
|
+
const { commentInputLoader: CommentInput, commentLoader: Comments } = React__default.default.useContext(context.EditorContext);
|
|
22
|
+
const [showAnswers, setShowAnswers] = React__default.default.useState(false);
|
|
23
|
+
return (React__default.default.createElement(plate.PlateElement, { asChild: true, element: element, ref: ref, ...props },
|
|
24
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
25
|
+
React__default.default.createElement(Question, null,
|
|
26
|
+
React__default.default.createElement(heading.H, { as: "p", "$fontSize": 18, "$lineHeight": 26, "$mediumBold": true }, children)),
|
|
27
|
+
React__default.default.createElement(box.Box, { "$dir": "column", "$gap": 24, "$padding": 24, ...{ contentEditable: false } },
|
|
28
|
+
React__default.default.createElement(button.Button, { as: "div", icon: showAnswers ? (React__default.default.createElement(chevron_up.ChevronUp, { color: "grey-3" })) : (React__default.default.createElement(chevron_down.ChevronDown, { color: "grey-3" })), onClick: () => setShowAnswers((prev) => !prev), size: "small", sx: `
|
|
23
29
|
width: fit-content;
|
|
24
30
|
flex-direction: row-reverse;
|
|
25
31
|
color: var(--color-grey-5);
|
|
@@ -27,22 +33,23 @@ const QuestionAnswerElement = React__default.forwardRef(({ children, element, ..
|
|
|
27
33
|
fill: var(--color-grey-3);
|
|
28
34
|
}
|
|
29
35
|
`, type: "text", ...{ contentEditable: false } }, showAnswers ? 'Hide answers' : 'Show answers'),
|
|
30
|
-
React__default.createElement(HideButRender, { show: showAnswers },
|
|
31
|
-
React__default.createElement(Comments, { questionAnswerId: questionAnswerId })),
|
|
32
|
-
React__default.createElement(CommentInput, { questionAnswerId: questionAnswerId, onComment: () => setShowAnswers(true) })))));
|
|
36
|
+
React__default.default.createElement(hide.HideButRender, { show: showAnswers },
|
|
37
|
+
React__default.default.createElement(Comments, { questionAnswerId: questionAnswerId })),
|
|
38
|
+
React__default.default.createElement(CommentInput, { questionAnswerId: questionAnswerId, onComment: () => setShowAnswers(true) })))));
|
|
33
39
|
});
|
|
34
|
-
const Question = styled.div `
|
|
40
|
+
const Question = styledComponents.styled.div `
|
|
35
41
|
margin-bottom: 8px;
|
|
36
42
|
padding: 16px;
|
|
37
43
|
border-left: 8px solid var(--color-hue-blue-1);
|
|
38
44
|
border-radius: 8px;
|
|
39
45
|
background-color: var(--color-hue-blue-3);
|
|
40
46
|
`;
|
|
41
|
-
const createQAPlugin = createPluginFactory({
|
|
42
|
-
key: ELEMENT_QA,
|
|
43
|
-
type: ELEMENT_QA,
|
|
47
|
+
const createQAPlugin = plate.createPluginFactory({
|
|
48
|
+
key: constants.ELEMENT_QA,
|
|
49
|
+
type: constants.ELEMENT_QA,
|
|
44
50
|
isElement: true,
|
|
45
51
|
component: QuestionAnswerElement,
|
|
46
52
|
});
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
exports.QuestionAnswerElement = QuestionAnswerElement;
|
|
55
|
+
exports.createQAPlugin = createQAPlugin;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { cn, withVariants, withRef } from '@udecode/cn';
|
|
4
|
-
import { ResizeHandle as ResizeHandle$1, Resizable as Resizable$1 } from '@udecode/plate-resizable';
|
|
5
|
-
import { cva } from 'class-variance-authority';
|
|
2
|
+
'use strict';
|
|
6
3
|
|
|
7
|
-
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var cn = require('@udecode/cn');
|
|
6
|
+
var plateResizable = require('@udecode/plate-resizable');
|
|
7
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
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 mediaResizeHandleVariants = classVarianceAuthority.cva(cn.cn('top-0 flex w-6 select-none flex-col justify-center', "after:flex after:h-16 after:w-[3px] after:rounded-[6px] after:bg-ring after:opacity-0 after:content-['_'] group-hover:after:opacity-100"), {
|
|
8
14
|
variants: {
|
|
9
15
|
direction: {
|
|
10
16
|
left: '-left-3 -ml-3 pl-3',
|
|
@@ -12,7 +18,7 @@ const mediaResizeHandleVariants = cva(cn('top-0 flex w-6 select-none flex-col ju
|
|
|
12
18
|
},
|
|
13
19
|
},
|
|
14
20
|
});
|
|
15
|
-
const resizeHandleVariants = cva(cn('absolute z-40'), {
|
|
21
|
+
const resizeHandleVariants = classVarianceAuthority.cva(cn.cn('absolute z-40'), {
|
|
16
22
|
variants: {
|
|
17
23
|
direction: {
|
|
18
24
|
left: 'h-full cursor-col-resize',
|
|
@@ -22,9 +28,9 @@ const resizeHandleVariants = cva(cn('absolute z-40'), {
|
|
|
22
28
|
},
|
|
23
29
|
},
|
|
24
30
|
});
|
|
25
|
-
const ResizeHandleVariants = withVariants(ResizeHandle
|
|
26
|
-
const ResizeHandle = withRef((props, ref) => (React__default.createElement(ResizeHandleVariants, { ref: ref, direction: props.options?.direction, ...props })));
|
|
27
|
-
const resizableVariants = cva('', {
|
|
31
|
+
const ResizeHandleVariants = cn.withVariants(plateResizable.ResizeHandle, resizeHandleVariants, ['direction']);
|
|
32
|
+
const ResizeHandle = cn.withRef((props, ref) => (React__default.default.createElement(ResizeHandleVariants, { ref: ref, direction: props.options?.direction, ...props })));
|
|
33
|
+
const resizableVariants = classVarianceAuthority.cva('', {
|
|
28
34
|
variants: {
|
|
29
35
|
align: {
|
|
30
36
|
left: 'mr-auto',
|
|
@@ -33,8 +39,10 @@ const resizableVariants = cva('', {
|
|
|
33
39
|
},
|
|
34
40
|
},
|
|
35
41
|
});
|
|
36
|
-
const Resizable = withVariants(Resizable
|
|
42
|
+
const Resizable = cn.withVariants(plateResizable.Resizable, resizableVariants, [
|
|
37
43
|
'align',
|
|
38
44
|
]);
|
|
39
45
|
|
|
40
|
-
|
|
46
|
+
exports.Resizable = Resizable;
|
|
47
|
+
exports.ResizeHandle = ResizeHandle;
|
|
48
|
+
exports.mediaResizeHandleVariants = mediaResizeHandleVariants;
|
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { withVariants, withProps } from '@udecode/cn';
|
|
4
|
-
import { cva } from 'class-variance-authority';
|
|
2
|
+
'use strict';
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
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 SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespaceCompat(SeparatorPrimitive);
|
|
27
|
+
|
|
28
|
+
const separatorVariants = classVarianceAuthority.cva('shrink-0 bg-border', {
|
|
7
29
|
variants: {
|
|
8
30
|
orientation: {
|
|
9
31
|
horizontal: 'h-[1px] w-full',
|
|
@@ -14,9 +36,9 @@ const separatorVariants = cva('shrink-0 bg-border', {
|
|
|
14
36
|
orientation: 'horizontal',
|
|
15
37
|
},
|
|
16
38
|
});
|
|
17
|
-
const Separator = withVariants(withProps(
|
|
39
|
+
const Separator = cn.withVariants(cn.withProps(SeparatorPrimitive__namespace.Root, {
|
|
18
40
|
orientation: 'horizontal',
|
|
19
41
|
decorative: true,
|
|
20
42
|
}), separatorVariants);
|
|
21
43
|
|
|
22
|
-
|
|
44
|
+
exports.Separator = Separator;
|
|
@@ -1,41 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
import { withRef, cn, withProps } from '@udecode/cn';
|
|
3
|
-
import { PlateElement } from '@udecode/plate-common';
|
|
4
|
-
import { useTableCellElementState, useTableCellElement, useTableCellElementResizableState, useTableCellElementResizable } from '@udecode/plate-table';
|
|
5
|
-
import { ResizeHandle } from './resizable.js';
|
|
1
|
+
'use strict';
|
|
6
2
|
|
|
7
|
-
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var cn = require('@udecode/cn');
|
|
5
|
+
var plateCommon = require('@udecode/plate-common');
|
|
6
|
+
var plateTable = require('@udecode/plate-table');
|
|
7
|
+
var resizable = require('./resizable.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 TableCellElement = cn.withRef(({ children, className, style, hideBorder, isHeader, ...props }, ref) => {
|
|
8
14
|
const { element } = props;
|
|
9
|
-
const { colIndex, rowIndex, readOnly, selected, hovered, hoveredLeft, rowSize, borders, isSelectingCell, colSpan, } = useTableCellElementState();
|
|
10
|
-
const { props: cellProps } = useTableCellElement({ element: props.element });
|
|
11
|
-
const resizableState = useTableCellElementResizableState({
|
|
15
|
+
const { colIndex, rowIndex, readOnly, selected, hovered, hoveredLeft, rowSize, borders, isSelectingCell, colSpan, } = plateTable.useTableCellElementState();
|
|
16
|
+
const { props: cellProps } = plateTable.useTableCellElement({ element: props.element });
|
|
17
|
+
const resizableState = plateTable.useTableCellElementResizableState({
|
|
12
18
|
colIndex,
|
|
13
19
|
rowIndex,
|
|
14
20
|
colSpan,
|
|
15
21
|
});
|
|
16
|
-
const { rightProps, bottomProps, leftProps, hiddenLeft } = useTableCellElementResizable(resizableState);
|
|
22
|
+
const { rightProps, bottomProps, leftProps, hiddenLeft } = plateTable.useTableCellElementResizable(resizableState);
|
|
17
23
|
const Cell = isHeader ? 'th' : 'td';
|
|
18
|
-
return (React__default.createElement(PlateElement, { ref: ref, asChild: true, className: cn('relative h-full overflow-visible border-none bg-background p-0', hideBorder && 'before:border-none', element.background ? 'bg-[--cellBackground]' : 'bg-background', !hideBorder &&
|
|
19
|
-
cn(isHeader && 'text-left [&_>_*]:m-0', 'before:h-full before:w-full', selected && 'before:z-10 before:bg-muted', "before:absolute before:box-border before:select-none before:content-['']", borders &&
|
|
20
|
-
cn(borders.bottom?.size &&
|
|
24
|
+
return (React__default.default.createElement(plateCommon.PlateElement, { ref: ref, asChild: true, className: cn.cn('relative h-full overflow-visible border-none bg-background p-0', hideBorder && 'before:border-none', element.background ? 'bg-[--cellBackground]' : 'bg-background', !hideBorder &&
|
|
25
|
+
cn.cn(isHeader && 'text-left [&_>_*]:m-0', 'before:h-full before:w-full', selected && 'before:z-10 before:bg-muted', "before:absolute before:box-border before:select-none before:content-['']", borders &&
|
|
26
|
+
cn.cn(borders.bottom?.size &&
|
|
21
27
|
`before:border-b before:border-b-border`, borders.right?.size && `before:border-r before:border-r-border`, borders.left?.size && `before:border-l before:border-l-border`, borders.top?.size && `before:border-t before:border-t-border`)), className), ...cellProps, ...props, style: {
|
|
22
28
|
'--cellBackground': element.background,
|
|
23
29
|
...style,
|
|
24
30
|
} },
|
|
25
|
-
React__default.createElement(Cell, null,
|
|
26
|
-
React__default.createElement("div", { className: "relative z-20 box-border h-full px-3 py-2", style: {
|
|
31
|
+
React__default.default.createElement(Cell, null,
|
|
32
|
+
React__default.default.createElement("div", { className: "relative z-20 box-border h-full px-3 py-2", style: {
|
|
27
33
|
minHeight: rowSize,
|
|
28
34
|
} }, children),
|
|
29
|
-
!isSelectingCell && (React__default.createElement("div", { className: "group absolute top-0 h-full w-full select-none", contentEditable: false, suppressContentEditableWarning: true }, !readOnly && (React__default.createElement(React__default.Fragment, null,
|
|
30
|
-
React__default.createElement(ResizeHandle, { ...rightProps, className: "-top-3 right-[-5px] w-[10px]" }),
|
|
31
|
-
React__default.createElement(ResizeHandle, { ...bottomProps, className: "bottom-[-5px] h-[10px]" }),
|
|
32
|
-
!hiddenLeft && (React__default.createElement(ResizeHandle, { ...leftProps, className: "-top-3 left-[-5px] w-[10px]" })),
|
|
33
|
-
hovered && (React__default.createElement("div", { className: cn('absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring', 'right-[-1.5px]') })),
|
|
34
|
-
hoveredLeft && (React__default.createElement("div", { className: cn('absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring', 'left-[-1.5px]') })))))))));
|
|
35
|
+
!isSelectingCell && (React__default.default.createElement("div", { className: "group absolute top-0 h-full w-full select-none", contentEditable: false, suppressContentEditableWarning: true }, !readOnly && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
36
|
+
React__default.default.createElement(resizable.ResizeHandle, { ...rightProps, className: "-top-3 right-[-5px] w-[10px]" }),
|
|
37
|
+
React__default.default.createElement(resizable.ResizeHandle, { ...bottomProps, className: "bottom-[-5px] h-[10px]" }),
|
|
38
|
+
!hiddenLeft && (React__default.default.createElement(resizable.ResizeHandle, { ...leftProps, className: "-top-3 left-[-5px] w-[10px]" })),
|
|
39
|
+
hovered && (React__default.default.createElement("div", { className: cn.cn('absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring', 'right-[-1.5px]') })),
|
|
40
|
+
hoveredLeft && (React__default.default.createElement("div", { className: cn.cn('absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring', 'left-[-1.5px]') })))))))));
|
|
35
41
|
});
|
|
36
42
|
TableCellElement.displayName = 'TableCellElement';
|
|
37
|
-
const TableCellHeaderElement = withProps(TableCellElement, {
|
|
43
|
+
const TableCellHeaderElement = cn.withProps(TableCellElement, {
|
|
38
44
|
isHeader: true,
|
|
39
45
|
});
|
|
40
46
|
|
|
41
|
-
|
|
47
|
+
exports.TableCellElement = TableCellElement;
|
|
48
|
+
exports.TableCellHeaderElement = TableCellHeaderElement;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import { withRef, cn } from '@udecode/cn';
|
|
3
|
-
import { PlateElement } from '@udecode/plate-common';
|
|
1
|
+
'use strict';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var cn = require('@udecode/cn');
|
|
5
|
+
var plateCommon = require('@udecode/plate-common');
|
|
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 TableRowElement = cn.withRef(({ hideBorder, children, ...props }, ref) => {
|
|
12
|
+
return (React__default.default.createElement(plateCommon.PlateElement, { asChild: true, ref: ref, className: cn.cn('h-full', hideBorder && 'border-none'), ...props },
|
|
13
|
+
React__default.default.createElement("tr", null, children)));
|
|
8
14
|
});
|
|
9
15
|
|
|
10
|
-
|
|
16
|
+
exports.TableRowElement = TableRowElement;
|
|
@@ -1,90 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
import { withRef, cn } from '@udecode/cn';
|
|
3
|
-
import { useElement, useRemoveNodeButton, useEditorSelector, isSelectionExpanded, useEditorRef, withHOC, PlateElement } from '@udecode/plate-common';
|
|
4
|
-
import { useTableBordersDropdownMenuContentState, useTableMergeState, mergeTableCells, unmergeTableCells, TableProvider, useTableElementState, useTableElement } from '@udecode/plate-table';
|
|
5
|
-
import { useReadOnly, useSelected } from 'slate-react';
|
|
6
|
-
import { PopoverAnchor } from '@radix-ui/react-popover';
|
|
7
|
-
import { Combine, Ungroup, Trash } from 'lucide-react';
|
|
8
|
-
import { Button } from './plate-button.js';
|
|
9
|
-
import { DropdownMenuContent, DropdownMenuCheckboxItem, DropdownMenu, DropdownMenuTrigger, DropdownMenuPortal } from './dropdown-menu.js';
|
|
10
|
-
import { Popover, PopoverContent, popoverVariants } from './popover.js';
|
|
11
|
-
import { Separator } from './separator.js';
|
|
12
|
-
import { BorderAll } from '../../icons/border-all.js';
|
|
13
|
-
import { BorderBottom } from '../../icons/border-bottom.js';
|
|
14
|
-
import { BorderLeft } from '../../icons/border-left.js';
|
|
15
|
-
import { BorderNone } from '../../icons/border-none.js';
|
|
16
|
-
import { BorderRight } from '../../icons/border-right.js';
|
|
17
|
-
import { BorderTop } from '../../icons/border-top.js';
|
|
1
|
+
'use strict';
|
|
18
2
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var cn = require('@udecode/cn');
|
|
5
|
+
var plateCommon = require('@udecode/plate-common');
|
|
6
|
+
var plateTable = require('@udecode/plate-table');
|
|
7
|
+
var slateReact = require('slate-react');
|
|
8
|
+
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
9
|
+
var lucideReact = require('lucide-react');
|
|
10
|
+
var plateButton = require('./plate-button.js');
|
|
11
|
+
var dropdownMenu = require('./dropdown-menu.js');
|
|
12
|
+
var popover = require('./popover.js');
|
|
13
|
+
var separator = require('./separator.js');
|
|
14
|
+
var borderAll = require('../../icons/border-all.js');
|
|
15
|
+
var borderBottom = require('../../icons/border-bottom.js');
|
|
16
|
+
var borderLeft = require('../../icons/border-left.js');
|
|
17
|
+
var borderNone = require('../../icons/border-none.js');
|
|
18
|
+
var borderRight = require('../../icons/border-right.js');
|
|
19
|
+
var borderTop = require('../../icons/border-top.js');
|
|
20
|
+
|
|
21
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
22
|
+
|
|
23
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
24
|
+
|
|
25
|
+
const TableBordersDropdownMenuContent = cn.withRef((props, ref) => {
|
|
26
|
+
const { getOnSelectTableBorder, hasOuterBorders, hasBottomBorder, hasLeftBorder, hasNoBorders, hasRightBorder, hasTopBorder, } = plateTable.useTableBordersDropdownMenuContentState();
|
|
27
|
+
return (React__default.default.createElement(dropdownMenu.DropdownMenuContent, { ref: ref, className: cn.cn('min-w-[220px]'), side: "right", align: "start", sideOffset: 0, ...props },
|
|
28
|
+
React__default.default.createElement(dropdownMenu.DropdownMenuCheckboxItem, { checked: hasBottomBorder, onCheckedChange: getOnSelectTableBorder('bottom') },
|
|
29
|
+
React__default.default.createElement(borderBottom.BorderBottom, { className: "mr-2 h-4 w-4" }),
|
|
30
|
+
React__default.default.createElement("div", null, "Bottom Border")),
|
|
31
|
+
React__default.default.createElement(dropdownMenu.DropdownMenuCheckboxItem, { checked: hasTopBorder, onCheckedChange: getOnSelectTableBorder('top') },
|
|
32
|
+
React__default.default.createElement(borderTop.BorderTop, { className: "mr-2 h-4 w-4" }),
|
|
33
|
+
React__default.default.createElement("div", null, "Top Border")),
|
|
34
|
+
React__default.default.createElement(dropdownMenu.DropdownMenuCheckboxItem, { checked: hasLeftBorder, onCheckedChange: getOnSelectTableBorder('left') },
|
|
35
|
+
React__default.default.createElement(borderLeft.BorderLeft, { className: "mr-2 h-4 w-4" }),
|
|
36
|
+
React__default.default.createElement("div", null, "Left Border")),
|
|
37
|
+
React__default.default.createElement(dropdownMenu.DropdownMenuCheckboxItem, { checked: hasRightBorder, onCheckedChange: getOnSelectTableBorder('right') },
|
|
38
|
+
React__default.default.createElement(borderRight.BorderRight, { className: "mr-2 h-4 w-4" }),
|
|
39
|
+
React__default.default.createElement("div", null, "Right Border")),
|
|
40
|
+
React__default.default.createElement(separator.Separator, null),
|
|
41
|
+
React__default.default.createElement(dropdownMenu.DropdownMenuCheckboxItem, { checked: hasNoBorders, onCheckedChange: getOnSelectTableBorder('none') },
|
|
42
|
+
React__default.default.createElement(borderNone.BorderNone, { className: "mr-2 h-4 w-4" }),
|
|
43
|
+
React__default.default.createElement("div", null, "No Border")),
|
|
44
|
+
React__default.default.createElement(dropdownMenu.DropdownMenuCheckboxItem, { checked: hasOuterBorders, onCheckedChange: getOnSelectTableBorder('outer') },
|
|
45
|
+
React__default.default.createElement(borderAll.BorderAll, { className: "mr-2 h-4 w-4" }),
|
|
46
|
+
React__default.default.createElement("div", null, "Outside Borders"))));
|
|
41
47
|
});
|
|
42
|
-
const TableFloatingToolbar = withRef(({ children, ...props }, ref) => {
|
|
43
|
-
const element = useElement();
|
|
44
|
-
const { props: buttonProps } = useRemoveNodeButton({ element });
|
|
45
|
-
const selectionCollapsed = useEditorSelector((editor) => !isSelectionExpanded(editor), []);
|
|
46
|
-
const readOnly = useReadOnly();
|
|
47
|
-
const selected = useSelected();
|
|
48
|
-
const editor = useEditorRef();
|
|
48
|
+
const TableFloatingToolbar = cn.withRef(({ children, ...props }, ref) => {
|
|
49
|
+
const element = plateCommon.useElement();
|
|
50
|
+
const { props: buttonProps } = plateCommon.useRemoveNodeButton({ element });
|
|
51
|
+
const selectionCollapsed = plateCommon.useEditorSelector((editor) => !plateCommon.isSelectionExpanded(editor), []);
|
|
52
|
+
const readOnly = slateReact.useReadOnly();
|
|
53
|
+
const selected = slateReact.useSelected();
|
|
54
|
+
const editor = plateCommon.useEditorRef();
|
|
49
55
|
const collapsed = !readOnly && selected && selectionCollapsed;
|
|
50
56
|
const open = !readOnly && selected;
|
|
51
|
-
const { canMerge, canUnmerge } = useTableMergeState();
|
|
52
|
-
const mergeContent = canMerge && (React__default.createElement(Button, { contentEditable: false, variant: "ghost", isMenu: true, onClick: () => mergeTableCells(editor) },
|
|
53
|
-
React__default.createElement(Combine, { className: "mr-2 h-4 w-4" }),
|
|
57
|
+
const { canMerge, canUnmerge } = plateTable.useTableMergeState();
|
|
58
|
+
const mergeContent = canMerge && (React__default.default.createElement(plateButton.Button, { contentEditable: false, variant: "ghost", isMenu: true, onClick: () => plateTable.mergeTableCells(editor) },
|
|
59
|
+
React__default.default.createElement(lucideReact.Combine, { className: "mr-2 h-4 w-4" }),
|
|
54
60
|
"Merge"));
|
|
55
|
-
const unmergeButton = canUnmerge && (React__default.createElement(Button, { contentEditable: false, variant: "ghost", isMenu: true, onClick: () => unmergeTableCells(editor) },
|
|
56
|
-
React__default.createElement(Ungroup, { className: "mr-2 h-4 w-4" }),
|
|
61
|
+
const unmergeButton = canUnmerge && (React__default.default.createElement(plateButton.Button, { contentEditable: false, variant: "ghost", isMenu: true, onClick: () => plateTable.unmergeTableCells(editor) },
|
|
62
|
+
React__default.default.createElement(lucideReact.Ungroup, { className: "mr-2 h-4 w-4" }),
|
|
57
63
|
"Unmerge"));
|
|
58
|
-
const bordersContent = collapsed && (React__default.createElement(React__default.Fragment, null,
|
|
59
|
-
React__default.createElement(DropdownMenu, { modal: false },
|
|
60
|
-
React__default.createElement(DropdownMenuTrigger, { asChild: true },
|
|
61
|
-
React__default.createElement(Button, { variant: "ghost", isMenu: true },
|
|
62
|
-
React__default.createElement(BorderAll, { className: "mr-2 h-4 w-4" }),
|
|
64
|
+
const bordersContent = collapsed && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
65
|
+
React__default.default.createElement(dropdownMenu.DropdownMenu, { modal: false },
|
|
66
|
+
React__default.default.createElement(dropdownMenu.DropdownMenuTrigger, { asChild: true },
|
|
67
|
+
React__default.default.createElement(plateButton.Button, { variant: "ghost", isMenu: true },
|
|
68
|
+
React__default.default.createElement(borderAll.BorderAll, { className: "mr-2 h-4 w-4" }),
|
|
63
69
|
"Borders")),
|
|
64
|
-
React__default.createElement(DropdownMenuPortal, null,
|
|
65
|
-
React__default.createElement(TableBordersDropdownMenuContent, null))),
|
|
66
|
-
React__default.createElement(Button, { contentEditable: false, variant: "ghost", isMenu: true, ...buttonProps },
|
|
67
|
-
React__default.createElement(Trash, { className: "mr-2 h-4 w-4" }),
|
|
70
|
+
React__default.default.createElement(dropdownMenu.DropdownMenuPortal, null,
|
|
71
|
+
React__default.default.createElement(TableBordersDropdownMenuContent, null))),
|
|
72
|
+
React__default.default.createElement(plateButton.Button, { contentEditable: false, variant: "ghost", isMenu: true, ...buttonProps },
|
|
73
|
+
React__default.default.createElement(lucideReact.Trash, { className: "mr-2 h-4 w-4" }),
|
|
68
74
|
"Delete")));
|
|
69
|
-
return (React__default.createElement(Popover, { open: open, modal: false },
|
|
70
|
-
React__default.createElement(PopoverAnchor, { asChild: true }, children),
|
|
71
|
-
(canMerge || canUnmerge || collapsed) && (React__default.createElement(PopoverContent, { ref: ref, className: cn(popoverVariants(), 'flex w-[220px] flex-col gap-1 p-1'), onOpenAutoFocus: (e) => e.preventDefault(), ...props },
|
|
75
|
+
return (React__default.default.createElement(popover.Popover, { open: open, modal: false },
|
|
76
|
+
React__default.default.createElement(PopoverPrimitive.PopoverAnchor, { asChild: true }, children),
|
|
77
|
+
(canMerge || canUnmerge || collapsed) && (React__default.default.createElement(popover.PopoverContent, { ref: ref, className: cn.cn(popover.popoverVariants(), 'flex w-[220px] flex-col gap-1 p-1'), onOpenAutoFocus: (e) => e.preventDefault(), ...props },
|
|
72
78
|
unmergeButton,
|
|
73
79
|
mergeContent,
|
|
74
80
|
bordersContent))));
|
|
75
81
|
});
|
|
76
|
-
const TableElement = withHOC(TableProvider, withRef(({ className, children, ...props }, ref) => {
|
|
77
|
-
const { colSizes, isSelectingCell, minColumnWidth, marginLeft } = useTableElementState();
|
|
78
|
-
const { props: tableProps, colGroupProps } = useTableElement();
|
|
79
|
-
return (React__default.createElement(TableFloatingToolbar, null,
|
|
80
|
-
React__default.createElement("div", { style: { paddingLeft: marginLeft } },
|
|
81
|
-
React__default.createElement(PlateElement, { ref: ref, asChild: true, className: cn('my-4 ml-px mr-0 table h-px w-full table-fixed border-collapse', isSelectingCell && '[&_*::selection]:bg-none', className), ...tableProps, ...props },
|
|
82
|
-
React__default.createElement("table", null,
|
|
83
|
-
React__default.createElement("colgroup", { ...colGroupProps }, colSizes.map((width, index) => (React__default.createElement("col", { key: index, style: {
|
|
82
|
+
const TableElement = plateCommon.withHOC(plateTable.TableProvider, cn.withRef(({ className, children, ...props }, ref) => {
|
|
83
|
+
const { colSizes, isSelectingCell, minColumnWidth, marginLeft } = plateTable.useTableElementState();
|
|
84
|
+
const { props: tableProps, colGroupProps } = plateTable.useTableElement();
|
|
85
|
+
return (React__default.default.createElement(TableFloatingToolbar, null,
|
|
86
|
+
React__default.default.createElement("div", { style: { paddingLeft: marginLeft } },
|
|
87
|
+
React__default.default.createElement(plateCommon.PlateElement, { ref: ref, asChild: true, className: cn.cn('my-4 ml-px mr-0 table h-px w-full table-fixed border-collapse', isSelectingCell && '[&_*::selection]:bg-none', className), ...tableProps, ...props },
|
|
88
|
+
React__default.default.createElement("table", null,
|
|
89
|
+
React__default.default.createElement("colgroup", { ...colGroupProps }, colSizes.map((width, index) => (React__default.default.createElement("col", { key: index, style: {
|
|
84
90
|
minWidth: minColumnWidth,
|
|
85
91
|
width: width || undefined,
|
|
86
92
|
} })))),
|
|
87
|
-
React__default.createElement("tbody", { className: "min-w-full" }, children))))));
|
|
93
|
+
React__default.default.createElement("tbody", { className: "min-w-full" }, children))))));
|
|
88
94
|
}));
|
|
89
95
|
|
|
90
|
-
|
|
96
|
+
exports.TableBordersDropdownMenuContent = TableBordersDropdownMenuContent;
|
|
97
|
+
exports.TableElement = TableElement;
|
|
98
|
+
exports.TableFloatingToolbar = TableFloatingToolbar;
|