@soul-refiner/design-system 1.6.1-alpha.3 → 1.6.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.d.ts +1 -1
- package/dist/common/colors.js +135 -0
- package/dist/common/date.js +28 -0
- package/dist/common/index.js +3 -0
- package/dist/common/styles.js +63 -0
- package/dist/components/actions/button/button.d.ts +1 -1
- package/dist/components/actions/button/button.js +280 -0
- package/dist/components/actions/button/index.js +1 -0
- package/dist/components/actions/dropdown/dropdown.js +227 -0
- package/dist/components/actions/dropdown/index.js +1 -0
- package/dist/components/actions/index.js +6 -0
- package/dist/components/actions/rate/index.js +1 -0
- package/dist/components/actions/rate/rate.js +46 -0
- package/dist/components/actions/switch/index.js +1 -0
- package/dist/components/actions/switch/switch.js +72 -0
- package/dist/components/actions/toggle/index.js +1 -0
- package/dist/components/actions/toggle/toggle.js +57 -0
- package/dist/components/actions/upload/index.js +1 -0
- package/dist/components/actions/upload/upload.js +156 -0
- package/dist/components/atoms/box/box.js +16 -0
- package/dist/components/atoms/box/index.js +1 -0
- package/dist/components/atoms/colors/colors.js +35 -0
- package/dist/components/atoms/colors/index.js +1 -0
- package/dist/components/atoms/hide/hide.js +9 -0
- package/dist/components/atoms/hide/index.js +1 -0
- package/dist/components/atoms/index.js +5 -0
- package/dist/components/atoms/seconds_to_duration/index.js +1 -0
- package/dist/components/atoms/seconds_to_duration/seconds_to_duration.js +27 -0
- package/dist/components/atoms/time_ago/index.js +1 -0
- package/dist/components/atoms/time_ago/time_ago.js +31 -0
- package/dist/components/atoms/typography/display.js +10 -0
- package/dist/components/atoms/typography/heading.js +35 -0
- package/dist/components/atoms/typography/index.js +4 -0
- package/dist/components/atoms/typography/paragraph.js +18 -0
- package/dist/components/atoms/typography/typography.js +12 -0
- package/dist/components/card/action/action.js +65 -0
- package/dist/components/card/action/index.js +1 -0
- package/dist/components/card/audio/audio.js +113 -0
- package/dist/components/card/audio/index.js +1 -0
- package/dist/components/card/card.js +25 -0
- package/dist/components/card/feature/feature.js +187 -0
- package/dist/components/card/feature/index.js +1 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/card/meeting/index.js +1 -0
- package/dist/components/card/meeting/meeting.js +130 -0
- package/dist/components/card/person/index.js +1 -0
- package/dist/components/card/person/person.js +68 -0
- package/dist/components/card/price/index.js +1 -0
- package/dist/components/card/price/price.js +75 -0
- package/dist/components/card/regular/index.js +1 -0
- package/dist/components/card/regular/regular.js +32 -0
- package/dist/components/card/video/index.js +1 -0
- package/dist/components/card/video/video.js +111 -0
- package/dist/components/card/written/index.js +1 -0
- package/dist/components/card/written/written.js +114 -0
- package/dist/components/custom/courses_selection/courses_selection.js +129 -0
- package/dist/components/custom/courses_selection/index.js +1 -0
- package/dist/components/custom/index.js +2 -0
- package/dist/components/custom/users_selection/index.js +1 -0
- package/dist/components/custom/users_selection/users_selection.js +120 -0
- package/dist/components/editor/constants.js +49 -0
- package/dist/components/editor/context.js +8 -0
- package/dist/components/editor/editor.js +102 -0
- package/dist/components/editor/icons/border-all.js +3 -0
- package/dist/components/editor/icons/border-bottom.js +3 -0
- package/dist/components/editor/icons/border-left.js +3 -0
- package/dist/components/editor/icons/border-none.js +3 -0
- package/dist/components/editor/icons/border-right.js +3 -0
- package/dist/components/editor/icons/border-top.js +3 -0
- package/dist/components/editor/icons/index.js +6 -0
- package/dist/components/editor/index.js +2 -0
- package/dist/components/editor/navbar/alignment_dropdown.js +97 -0
- package/dist/components/editor/navbar/button_modal.js +55 -0
- package/dist/components/editor/navbar/index.js +1 -0
- package/dist/components/editor/navbar/navbar.js +201 -0
- package/dist/components/editor/navbar/style_dropdown.js +65 -0
- package/dist/components/editor/plugins/blocks/blockquote.js +8 -0
- package/dist/components/editor/plugins/blocks/blocks.d.ts +1 -1
- package/dist/components/editor/plugins/blocks/blocks.js +50 -0
- package/dist/components/editor/plugins/blocks/buttons.js +81 -0
- package/dist/components/editor/plugins/blocks/dropdown-menu.js +62 -0
- package/dist/components/editor/plugins/blocks/image.js +36 -0
- package/dist/components/editor/plugins/blocks/index.js +1 -0
- package/dist/components/editor/plugins/blocks/list.js +17 -0
- package/dist/components/editor/plugins/blocks/media-popover.js +32 -0
- package/dist/components/editor/plugins/blocks/plate-button.d.ts +2 -2
- package/dist/components/editor/plugins/blocks/plate-button.js +37 -0
- package/dist/components/editor/plugins/blocks/popover.js +11 -0
- package/dist/components/editor/plugins/blocks/qa.js +45 -0
- package/dist/components/editor/plugins/blocks/resizable.d.ts +2 -2
- package/dist/components/editor/plugins/blocks/resizable.js +37 -0
- package/dist/components/editor/plugins/blocks/separator.js +19 -0
- package/dist/components/editor/plugins/blocks/table-cell.js +38 -0
- package/dist/components/editor/plugins/blocks/table-row.js +7 -0
- package/dist/components/editor/plugins/blocks/table.js +82 -0
- package/dist/components/editor/plugins/blocks/text.js +82 -0
- package/dist/components/editor/plugins/blocks/video.js +32 -0
- package/dist/components/editor/plugins/index.js +4 -0
- package/dist/components/editor/plugins/leafs/index.js +1 -0
- package/dist/components/editor/plugins/leafs/leafs.js +33 -0
- package/dist/components/editor/plugins/leafs/link.js +74 -0
- package/dist/components/editor/plugins/marks/index.js +1 -0
- package/dist/components/editor/plugins/marks/marks.js +12 -0
- package/dist/components/editor/plugins/plate.js +37 -0
- package/dist/components/editor/plugins/utils/exitBreak.js +31 -0
- package/dist/components/editor/plugins/utils/index.js +1 -0
- package/dist/components/editor/plugins/utils/resetBlockType.js +22 -0
- package/dist/components/editor/plugins/utils/selectOnBackspace.js +6 -0
- package/dist/components/editor/plugins/utils/softBreak.js +14 -0
- package/dist/components/editor/plugins/utils/utils.js +12 -0
- package/dist/components/editor/simple_editor/index.js +1 -0
- package/dist/components/editor/simple_editor/navbar.js +136 -0
- package/dist/components/editor/simple_editor/plugins.js +89 -0
- package/dist/components/editor/simple_editor/simple_editor.js +89 -0
- package/dist/components/feedback/animated_toast/animated_toast.js +55 -0
- package/dist/components/feedback/animated_toast/index.js +1 -0
- package/dist/components/feedback/badge/badge.js +66 -0
- package/dist/components/feedback/badge/index.js +1 -0
- package/dist/components/feedback/banner/banner.js +80 -0
- package/dist/components/feedback/banner/index.js +1 -0
- package/dist/components/feedback/chip/chip.js +94 -0
- package/dist/components/feedback/chip/index.js +1 -0
- package/dist/components/feedback/index.js +8 -0
- package/dist/components/feedback/loader/index.js +1 -0
- package/dist/components/feedback/loader/loader.js +34 -0
- package/dist/components/feedback/notification/index.js +1 -0
- package/dist/components/feedback/notification/notification.js +72 -0
- package/dist/components/feedback/progress/index.js +1 -0
- package/dist/components/feedback/progress/progress.js +87 -0
- package/dist/components/feedback/toast/index.js +1 -0
- package/dist/components/feedback/toast/toast.js +112 -0
- package/dist/components/feedback/tooltip/index.js +1 -0
- package/dist/components/feedback/tooltip/tooltip.js +26 -0
- package/dist/components/iconography/avatar/avatar.d.ts +1 -2
- package/dist/components/iconography/avatar/avatar.js +169 -0
- package/dist/components/iconography/avatar/icons/approved.js +5 -0
- package/dist/components/iconography/avatar/icons/busy.js +5 -0
- package/dist/components/iconography/avatar/icons/declined.js +5 -0
- package/dist/components/iconography/avatar/icons/default.js +4 -0
- package/dist/components/iconography/avatar/icons/focus.js +5 -0
- package/dist/components/iconography/avatar/icons/index.js +9 -0
- package/dist/components/iconography/avatar/icons/locked.js +5 -0
- package/dist/components/iconography/avatar/icons/offline.js +5 -0
- package/dist/components/iconography/avatar/icons/online.js +4 -0
- package/dist/components/iconography/avatar/icons/subscribed.js +9 -0
- package/dist/components/iconography/avatar/index.js +1 -0
- package/dist/components/iconography/icon/icon.js +10 -0
- package/dist/components/iconography/icon/index.js +1 -0
- package/dist/components/iconography/index.js +2 -0
- package/dist/components/index.js +12 -0
- package/dist/components/input/calendar/calendar.js +249 -0
- package/dist/components/input/calendar/index.js +1 -0
- package/dist/components/input/checkbox/checkbox.js +23 -0
- package/dist/components/input/checkbox/index.js +1 -0
- package/dist/components/input/date/date.js +517 -0
- package/dist/components/input/date/index.js +1 -0
- package/dist/components/input/filter/filter.js +304 -0
- package/dist/components/input/filter/filter_option.js +70 -0
- package/dist/components/input/filter/index.js +1 -0
- package/dist/components/input/index.js +10 -0
- package/dist/components/input/radio/index.js +1 -0
- package/dist/components/input/radio/radio.js +78 -0
- package/dist/components/input/search/index.js +1 -0
- package/dist/components/input/search/search.js +138 -0
- package/dist/components/input/select/index.js +1 -0
- package/dist/components/input/select/select.js +47 -0
- package/dist/components/input/text_area/index.js +1 -0
- package/dist/components/input/text_area/text_area.js +110 -0
- package/dist/components/input/text_input/index.js +1 -0
- package/dist/components/input/text_input/text_input.d.ts +0 -1
- package/dist/components/input/text_input/text_input.js +147 -0
- package/dist/components/input/time/index.js +1 -0
- package/dist/components/input/time/time.js +69 -0
- package/dist/components/media/common.js +1 -0
- package/dist/components/media/index.js +2 -0
- package/dist/components/media/video/index.js +1 -0
- package/dist/components/media/video/video.js +31 -0
- package/dist/components/media/video-player/index.js +1 -0
- package/dist/components/media/video-player/playlist-item.d.ts +2 -2
- package/dist/components/media/video-player/playlist-item.js +37 -0
- package/dist/components/media/video-player/video.d.ts +3 -13
- package/dist/components/media/video-player/video.js +178 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.js +109 -0
- package/dist/components/navigation/breadcrumb/index.js +1 -0
- package/dist/components/navigation/index.js +3 -0
- package/dist/components/navigation/inner/index.js +1 -0
- package/dist/components/navigation/inner/inner.js +185 -0
- package/dist/components/navigation/tabs/index.js +1 -0
- package/dist/components/navigation/tabs/tabs.js +150 -0
- package/dist/components/surfaces/accordion/accordion.js +47 -0
- package/dist/components/surfaces/accordion/index.js +1 -0
- package/dist/components/surfaces/calendar_date/calendar_date.js +45 -0
- package/dist/components/surfaces/calendar_date/index.js +1 -0
- package/dist/components/surfaces/carousel/card/card.js +96 -0
- package/dist/components/surfaces/carousel/card/index.js +1 -0
- package/dist/components/surfaces/carousel/index.js +1 -0
- package/dist/components/surfaces/comment/comment.js +188 -0
- package/dist/components/surfaces/comment/helpers.js +26 -0
- package/dist/components/surfaces/comment/index.js +1 -0
- package/dist/components/surfaces/drawer/drawer.js +130 -0
- package/dist/components/surfaces/drawer/index.js +1 -0
- package/dist/components/surfaces/index.js +9 -0
- package/dist/components/surfaces/message/index.js +1 -0
- package/dist/components/surfaces/message/message.js +44 -0
- package/dist/components/surfaces/modal/index.js +1 -0
- package/dist/components/surfaces/modal/modal.js +127 -0
- package/dist/components/surfaces/portal/index.js +1 -0
- package/dist/components/surfaces/portal/portal.js +26 -0
- package/dist/components/surfaces/post/index.js +1 -0
- package/dist/components/surfaces/post/post.js +129 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/table/index.js +1 -0
- package/dist/components/table/table/table.js +184 -0
- package/dist/emoji/emojis.json +17577 -0
- package/dist/icons/arrow/arrow_all.js +6 -0
- package/dist/icons/arrow/arrow_all_diagonal.js +6 -0
- package/dist/icons/arrow/arrow_both_downwards.js +6 -0
- package/dist/icons/arrow/arrow_both_upwards.js +6 -0
- package/dist/icons/arrow/arrow_circle_left.js +6 -0
- package/dist/icons/arrow/arrow_circle_left_double.js +6 -0
- package/dist/icons/arrow/arrow_circle_left_double_alert.js +8 -0
- package/dist/icons/arrow/arrow_circle_right.js +6 -0
- package/dist/icons/arrow/arrow_circle_right_double.js +6 -0
- package/dist/icons/arrow/arrow_circle_right_double_alert.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_down_left.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_down_left_circle.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_down_right.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_down_right_circle.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_up_left.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_up_left_circle.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_up_right.js +6 -0
- package/dist/icons/arrow/arrow_diagonal_up_right_circle.js +6 -0
- package/dist/icons/arrow/arrow_down.js +6 -0
- package/dist/icons/arrow/arrow_down_bold.js +6 -0
- package/dist/icons/arrow/arrow_down_circle.js +6 -0
- package/dist/icons/arrow/arrow_left.js +6 -0
- package/dist/icons/arrow/arrow_left_bold.js +6 -0
- package/dist/icons/arrow/arrow_left_circle.js +6 -0
- package/dist/icons/arrow/arrow_left_curved.js +6 -0
- package/dist/icons/arrow/arrow_left_curved_circle.js +6 -0
- package/dist/icons/arrow/arrow_right.js +6 -0
- package/dist/icons/arrow/arrow_right_bold.js +6 -0
- package/dist/icons/arrow/arrow_right_circle.js +6 -0
- package/dist/icons/arrow/arrow_right_curved.js +6 -0
- package/dist/icons/arrow/arrow_right_curved_circle.js +6 -0
- package/dist/icons/arrow/arrow_up.js +6 -0
- package/dist/icons/arrow/arrow_up_bold.js +6 -0
- package/dist/icons/arrow/arrow_up_circle.js +6 -0
- package/dist/icons/arrow/chevron_down.js +6 -0
- package/dist/icons/arrow/chevron_down_circle.js +6 -0
- package/dist/icons/arrow/chevron_down_double.js +6 -0
- package/dist/icons/arrow/chevron_down_double_circle.js +6 -0
- package/dist/icons/arrow/chevron_left.js +6 -0
- package/dist/icons/arrow/chevron_left_circle.js +6 -0
- package/dist/icons/arrow/chevron_left_double.js +6 -0
- package/dist/icons/arrow/chevron_left_double_circle.js +6 -0
- package/dist/icons/arrow/chevron_right.js +6 -0
- package/dist/icons/arrow/chevron_right_circle.js +6 -0
- package/dist/icons/arrow/chevron_right_double.js +6 -0
- package/dist/icons/arrow/chevron_right_double_circle.js +6 -0
- package/dist/icons/arrow/chevron_scroll.js +6 -0
- package/dist/icons/arrow/chevron_up.js +6 -0
- package/dist/icons/arrow/chevron_up_circle.js +6 -0
- package/dist/icons/arrow/chevron_up_double.js +6 -0
- package/dist/icons/arrow/chevron_up_double_circle.js +6 -0
- package/dist/icons/arrow/forward_all.js +6 -0
- package/dist/icons/arrow/forward_all_bold.js +6 -0
- package/dist/icons/arrow/forward_bold.js +6 -0
- package/dist/icons/arrow/index.js +62 -0
- package/dist/icons/arrow/redo.js +6 -0
- package/dist/icons/arrow/redo_bold.js +6 -0
- package/dist/icons/arrow/reply.js +6 -0
- package/dist/icons/arrow/reply_all.js +6 -0
- package/dist/icons/arrow/reply_all_bold.js +6 -0
- package/dist/icons/arrow/reply_bold.js +6 -0
- package/dist/icons/arrow/undo.js +6 -0
- package/dist/icons/arrow/undo_bold.js +6 -0
- package/dist/icons/audio_video/drag_indicator.js +6 -0
- package/dist/icons/audio_video/eject.js +6 -0
- package/dist/icons/audio_video/equalizer.js +6 -0
- package/dist/icons/audio_video/fast_forward.js +6 -0
- package/dist/icons/audio_video/fast_forward_30.js +6 -0
- package/dist/icons/audio_video/fullscreen.js +6 -0
- package/dist/icons/audio_video/headphones.js +6 -0
- package/dist/icons/audio_video/index.js +38 -0
- package/dist/icons/audio_video/library_add.js +6 -0
- package/dist/icons/audio_video/library_delay.js +6 -0
- package/dist/icons/audio_video/library_music.js +6 -0
- package/dist/icons/audio_video/library_queue.js +6 -0
- package/dist/icons/audio_video/microphone.js +6 -0
- package/dist/icons/audio_video/musical_note.js +6 -0
- package/dist/icons/audio_video/next.js +6 -0
- package/dist/icons/audio_video/pause.js +6 -0
- package/dist/icons/audio_video/pause_circle.js +6 -0
- package/dist/icons/audio_video/play.js +6 -0
- package/dist/icons/audio_video/play_circle.js +6 -0
- package/dist/icons/audio_video/play_display.js +6 -0
- package/dist/icons/audio_video/play_pause.js +6 -0
- package/dist/icons/audio_video/play_solid.js +6 -0
- package/dist/icons/audio_video/player_list.js +6 -0
- package/dist/icons/audio_video/player_list_add.js +6 -0
- package/dist/icons/audio_video/player_list_play.js +6 -0
- package/dist/icons/audio_video/previous.js +6 -0
- package/dist/icons/audio_video/radio.js +6 -0
- package/dist/icons/audio_video/record.js +6 -0
- package/dist/icons/audio_video/repeat.js +6 -0
- package/dist/icons/audio_video/rewind.js +6 -0
- package/dist/icons/audio_video/rewind_30.js +6 -0
- package/dist/icons/audio_video/shuffle.js +6 -0
- package/dist/icons/audio_video/sound_wave.js +6 -0
- package/dist/icons/audio_video/stop.js +6 -0
- package/dist/icons/audio_video/stop_circle.js +6 -0
- package/dist/icons/audio_video/subscriptions.js +6 -0
- package/dist/icons/audio_video/tuner.js +6 -0
- package/dist/icons/audio_video/volume.js +6 -0
- package/dist/icons/audio_video/volume_high.js +6 -0
- package/dist/icons/audio_video/volume_low.js +6 -0
- package/dist/icons/audio_video/volume_slash.js +6 -0
- package/dist/icons/basic/aa_sansserif.js +7 -0
- package/dist/icons/basic/aa_serif.js +7 -0
- package/dist/icons/basic/anchor.js +8 -0
- package/dist/icons/basic/bible.js +6 -0
- package/dist/icons/basic/bold.js +6 -0
- package/dist/icons/basic/book.js +6 -0
- package/dist/icons/basic/book_open.js +6 -0
- package/dist/icons/basic/bookmark.js +6 -0
- package/dist/icons/basic/bookmark_add.js +6 -0
- package/dist/icons/basic/bookmark_slash.js +6 -0
- package/dist/icons/basic/bookmarks.js +6 -0
- package/dist/icons/basic/books.js +9 -0
- package/dist/icons/basic/box.js +6 -0
- package/dist/icons/basic/briefcase.js +6 -0
- package/dist/icons/basic/browse_activity.js +6 -0
- package/dist/icons/basic/browser.js +6 -0
- package/dist/icons/basic/browser_slash.js +6 -0
- package/dist/icons/basic/calculator.js +6 -0
- package/dist/icons/basic/camera.js +6 -0
- package/dist/icons/basic/camera_add.js +6 -0
- package/dist/icons/basic/camera_slash.js +6 -0
- package/dist/icons/basic/checkmark.js +6 -0
- package/dist/icons/basic/checkmark_circle.js +8 -0
- package/dist/icons/basic/checkmark_filled.js +6 -0
- package/dist/icons/basic/checkmarks.js +6 -0
- package/dist/icons/basic/circle.js +6 -0
- package/dist/icons/basic/circle_slash.js +8 -0
- package/dist/icons/basic/clear_text_style.js +6 -0
- package/dist/icons/basic/close.js +6 -0
- package/dist/icons/basic/close_circle.js +6 -0
- package/dist/icons/basic/close_filled.js +6 -0
- package/dist/icons/basic/copy.js +6 -0
- package/dist/icons/basic/delete.js +6 -0
- package/dist/icons/basic/detail.js +6 -0
- package/dist/icons/basic/dot.js +6 -0
- package/dist/icons/basic/download.js +6 -0
- package/dist/icons/basic/download_arrow.js +6 -0
- package/dist/icons/basic/droplet.js +8 -0
- package/dist/icons/basic/ellipsis_horizontal.js +6 -0
- package/dist/icons/basic/ellipsis_horizontal_circle.js +6 -0
- package/dist/icons/basic/ellipsis_vertical.js +6 -0
- package/dist/icons/basic/ellipsis_vertical_circle.js +6 -0
- package/dist/icons/basic/eye.js +6 -0
- package/dist/icons/basic/eye_slash.js +6 -0
- package/dist/icons/basic/fingerprint.js +6 -0
- package/dist/icons/basic/flag.js +6 -0
- package/dist/icons/basic/flag_wave.js +6 -0
- package/dist/icons/basic/flag_wave_filled.js +6 -0
- package/dist/icons/basic/flame.js +6 -0
- package/dist/icons/basic/gauge.js +6 -0
- package/dist/icons/basic/glasses.js +6 -0
- package/dist/icons/basic/graduation_cap.js +6 -0
- package/dist/icons/basic/hashmark.js +6 -0
- package/dist/icons/basic/heart.js +6 -0
- package/dist/icons/basic/heart_slash.js +6 -0
- package/dist/icons/basic/highlighter.js +6 -0
- package/dist/icons/basic/home.js +6 -0
- package/dist/icons/basic/image.js +6 -0
- package/dist/icons/basic/inbox.js +6 -0
- package/dist/icons/basic/index.js +131 -0
- package/dist/icons/basic/italic.js +6 -0
- package/dist/icons/basic/layers.js +6 -0
- package/dist/icons/basic/lightening.js +6 -0
- package/dist/icons/basic/lightening_slash.js +6 -0
- package/dist/icons/basic/link.js +6 -0
- package/dist/icons/basic/link_slash.js +6 -0
- package/dist/icons/basic/loudspeaker.js +6 -0
- package/dist/icons/basic/maximize.js +6 -0
- package/dist/icons/basic/menu.js +6 -0
- package/dist/icons/basic/menu_circle.js +6 -0
- package/dist/icons/basic/menu_dots.js +6 -0
- package/dist/icons/basic/microphone_slash.js +6 -0
- package/dist/icons/basic/minimize.js +6 -0
- package/dist/icons/basic/minus.js +6 -0
- package/dist/icons/basic/minus_circle.js +6 -0
- package/dist/icons/basic/move_item.js +6 -0
- package/dist/icons/basic/new.js +6 -0
- package/dist/icons/basic/newspaper.js +6 -0
- package/dist/icons/basic/node.js +6 -0
- package/dist/icons/basic/note_pad.js +7 -0
- package/dist/icons/basic/options.js +6 -0
- package/dist/icons/basic/paint_brush.js +6 -0
- package/dist/icons/basic/paperclip.js +6 -0
- package/dist/icons/basic/paperclip_slash.js +6 -0
- package/dist/icons/basic/pencil.js +6 -0
- package/dist/icons/basic/pencil_pad.js +6 -0
- package/dist/icons/basic/plus.js +6 -0
- package/dist/icons/basic/plus_circle.js +6 -0
- package/dist/icons/basic/presentation.js +6 -0
- package/dist/icons/basic/printer.js +6 -0
- package/dist/icons/basic/profile.js +6 -0
- package/dist/icons/basic/profile_check.js +6 -0
- package/dist/icons/basic/pulse.js +6 -0
- package/dist/icons/basic/qr_code.js +6 -0
- package/dist/icons/basic/resize.js +8 -0
- package/dist/icons/basic/scan.js +6 -0
- package/dist/icons/basic/scissors.js +6 -0
- package/dist/icons/basic/screenshot.js +6 -0
- package/dist/icons/basic/search.js +6 -0
- package/dist/icons/basic/select_item.js +7 -0
- package/dist/icons/basic/settings.js +6 -0
- package/dist/icons/basic/share.js +6 -0
- package/dist/icons/basic/share_external.js +6 -0
- package/dist/icons/basic/square.js +6 -0
- package/dist/icons/basic/star.js +6 -0
- package/dist/icons/basic/star_circle.js +6 -0
- package/dist/icons/basic/star_filled.js +6 -0
- package/dist/icons/basic/star_filled_half.js +6 -0
- package/dist/icons/basic/star_slash.js +6 -0
- package/dist/icons/basic/sticker.js +6 -0
- package/dist/icons/basic/strikethrough.js +6 -0
- package/dist/icons/basic/subtask.js +7 -0
- package/dist/icons/basic/tax.js +9 -0
- package/dist/icons/basic/text_bg_color.js +6 -0
- package/dist/icons/basic/text_color.js +6 -0
- package/dist/icons/basic/textbox.js +6 -0
- package/dist/icons/basic/thumbs_down.js +6 -0
- package/dist/icons/basic/thumbs_up.js +6 -0
- package/dist/icons/basic/thumbs_up_filled.js +6 -0
- package/dist/icons/basic/toggle_left.js +6 -0
- package/dist/icons/basic/toggle_right.js +6 -0
- package/dist/icons/basic/translate.js +6 -0
- package/dist/icons/basic/trash.js +6 -0
- package/dist/icons/basic/trash_slash.js +6 -0
- package/dist/icons/basic/underline.js +6 -0
- package/dist/icons/basic/upload.js +6 -0
- package/dist/icons/basic/video.js +6 -0
- package/dist/icons/basic/video_add.js +7 -0
- package/dist/icons/basic/video_slash.js +6 -0
- package/dist/icons/basic/wrench.js +6 -0
- package/dist/icons/basic/zoom_in.js +6 -0
- package/dist/icons/basic/zoom_out.js +6 -0
- package/dist/icons/data/bar_chart.js +6 -0
- package/dist/icons/data/bar_chart_downward.js +6 -0
- package/dist/icons/data/bar_chart_downward_outline.js +6 -0
- package/dist/icons/data/bar_chart_upward.js +6 -0
- package/dist/icons/data/bar_chart_upward_outline.js +6 -0
- package/dist/icons/data/candlestick_chart.js +6 -0
- package/dist/icons/data/four_circles.js +6 -0
- package/dist/icons/data/index.js +20 -0
- package/dist/icons/data/legend_toggle.js +6 -0
- package/dist/icons/data/line_chart.js +6 -0
- package/dist/icons/data/line_chart_area.js +6 -0
- package/dist/icons/data/line_chart_area_shaded.js +6 -0
- package/dist/icons/data/line_chart_double.js +6 -0
- package/dist/icons/data/line_chart_downward.js +6 -0
- package/dist/icons/data/line_chart_node.js +6 -0
- package/dist/icons/data/line_chart_outline.js +6 -0
- package/dist/icons/data/line_chart_search.js +6 -0
- package/dist/icons/data/line_chart_stars.js +6 -0
- package/dist/icons/data/line_chart_upward.js +6 -0
- package/dist/icons/data/pie_chart.js +7 -0
- package/dist/icons/data/tree.js +6 -0
- package/dist/icons/email/index.js +8 -0
- package/dist/icons/email/mail.js +6 -0
- package/dist/icons/email/mail_check.js +6 -0
- package/dist/icons/email/mail_minus.js +6 -0
- package/dist/icons/email/mail_send.js +6 -0
- package/dist/icons/email/send.js +6 -0
- package/dist/icons/email/send_close.js +6 -0
- package/dist/icons/email/send_schedule.js +6 -0
- package/dist/icons/email/send_text.js +6 -0
- package/dist/icons/emoji/emoji_add.js +6 -0
- package/dist/icons/emoji/index.js +6 -0
- package/dist/icons/emoji/laughing.js +6 -0
- package/dist/icons/emoji/neutral.js +6 -0
- package/dist/icons/emoji/sad.js +6 -0
- package/dist/icons/emoji/shocked.js +6 -0
- package/dist/icons/emoji/smile.js +6 -0
- package/dist/icons/file/clipboard.js +6 -0
- package/dist/icons/file/clipboard_check.js +6 -0
- package/dist/icons/file/clipboard_close.js +6 -0
- package/dist/icons/file/clipboard_minus.js +6 -0
- package/dist/icons/file/clipboard_plus.js +6 -0
- package/dist/icons/file/clipboard_text.js +6 -0
- package/dist/icons/file/file.js +6 -0
- package/dist/icons/file/file_add.js +6 -0
- package/dist/icons/file/file_check.js +6 -0
- package/dist/icons/file/file_close.js +6 -0
- package/dist/icons/file/file_code.js +6 -0
- package/dist/icons/file/file_download.js +6 -0
- package/dist/icons/file/file_draft.js +6 -0
- package/dist/icons/file/file_gear.js +7 -0
- package/dist/icons/file/file_minus.js +6 -0
- package/dist/icons/file/file_plus.js +6 -0
- package/dist/icons/file/file_scan.js +6 -0
- package/dist/icons/file/file_shred.js +6 -0
- package/dist/icons/file/file_text.js +6 -0
- package/dist/icons/file/file_upload.js +6 -0
- package/dist/icons/file/folder.js +6 -0
- package/dist/icons/file/folder_add.js +6 -0
- package/dist/icons/file/folder_arrow.js +6 -0
- package/dist/icons/file/folder_check.js +6 -0
- package/dist/icons/file/folder_close.js +6 -0
- package/dist/icons/file/folder_cloud.js +6 -0
- package/dist/icons/file/folder_gear.js +7 -0
- package/dist/icons/file/folder_minus.js +6 -0
- package/dist/icons/file/folder_music.js +6 -0
- package/dist/icons/file/folder_open.js +6 -0
- package/dist/icons/file/folder_plus.js +6 -0
- package/dist/icons/file/folder_zip.js +6 -0
- package/dist/icons/file/index.js +36 -0
- package/dist/icons/file/note.js +6 -0
- package/dist/icons/file/note_text.js +6 -0
- package/dist/icons/file/pdf.js +6 -0
- package/dist/icons/file/photo.js +6 -0
- package/dist/icons/finance/bitcoin.js +6 -0
- package/dist/icons/finance/coins.js +10 -0
- package/dist/icons/finance/credit_card.js +6 -0
- package/dist/icons/finance/credit_card_add.js +6 -0
- package/dist/icons/finance/credit_card_face.js +6 -0
- package/dist/icons/finance/credit_card_member.js +6 -0
- package/dist/icons/finance/credit_card_outcome.js +6 -0
- package/dist/icons/finance/credit_card_scan.js +6 -0
- package/dist/icons/finance/credit_card_share.js +6 -0
- package/dist/icons/finance/credit_card_slash.js +6 -0
- package/dist/icons/finance/currency_exchange.js +6 -0
- package/dist/icons/finance/dollar.js +6 -0
- package/dist/icons/finance/ethereum.js +6 -0
- package/dist/icons/finance/index.js +16 -0
- package/dist/icons/finance/paypass.js +6 -0
- package/dist/icons/finance/strongbox.js +6 -0
- package/dist/icons/finance/wallet.js +6 -0
- package/dist/icons/index.js +22 -0
- package/dist/icons/layout/block_align_bottom.js +6 -0
- package/dist/icons/layout/block_align_center.js +6 -0
- package/dist/icons/layout/block_align_left.js +6 -0
- package/dist/icons/layout/block_align_middle.js +6 -0
- package/dist/icons/layout/block_align_right.js +6 -0
- package/dist/icons/layout/block_align_top.js +6 -0
- package/dist/icons/layout/block_horizontal.js +6 -0
- package/dist/icons/layout/block_vertical.js +6 -0
- package/dist/icons/layout/edit_shape.js +6 -0
- package/dist/icons/layout/elements.js +6 -0
- package/dist/icons/layout/elements_add.js +6 -0
- package/dist/icons/layout/elements_filled.js +6 -0
- package/dist/icons/layout/elements_masonry.js +6 -0
- package/dist/icons/layout/frame.js +6 -0
- package/dist/icons/layout/frame_stack.js +6 -0
- package/dist/icons/layout/grid.js +6 -0
- package/dist/icons/layout/grid_column_three.js +6 -0
- package/dist/icons/layout/grid_column_two.js +6 -0
- package/dist/icons/layout/grid_dynamic.js +6 -0
- package/dist/icons/layout/grid_frame.js +6 -0
- package/dist/icons/layout/grid_row_three.js +6 -0
- package/dist/icons/layout/grid_row_two.js +6 -0
- package/dist/icons/layout/grid_six.js +6 -0
- package/dist/icons/layout/grid_small.js +6 -0
- package/dist/icons/layout/iframe.js +6 -0
- package/dist/icons/layout/index.js +44 -0
- package/dist/icons/layout/kanban.js +6 -0
- package/dist/icons/layout/layout.js +6 -0
- package/dist/icons/layout/list.js +6 -0
- package/dist/icons/layout/list_filled.js +11 -0
- package/dist/icons/layout/padding.js +6 -0
- package/dist/icons/layout/page_break.js +6 -0
- package/dist/icons/layout/rotate_left.js +6 -0
- package/dist/icons/layout/rotate_right.js +6 -0
- package/dist/icons/layout/ruler.js +6 -0
- package/dist/icons/layout/segment.js +6 -0
- package/dist/icons/layout/select_area.js +6 -0
- package/dist/icons/layout/select_boundary.js +6 -0
- package/dist/icons/layout/sidebar_left.js +6 -0
- package/dist/icons/layout/sidebar_right.js +6 -0
- package/dist/icons/layout/slides.js +6 -0
- package/dist/icons/layout/slides_horizontal.js +6 -0
- package/dist/icons/layout/slides_vertical.js +11 -0
- package/dist/icons/layout/stack.js +6 -0
- package/dist/icons/layout/text.js +6 -0
- package/dist/icons/maps/atlas.js +6 -0
- package/dist/icons/maps/compass.js +6 -0
- package/dist/icons/maps/direction.js +6 -0
- package/dist/icons/maps/direction_angled.js +6 -0
- package/dist/icons/maps/globe.js +6 -0
- package/dist/icons/maps/globe_slash.js +6 -0
- package/dist/icons/maps/index.js +22 -0
- package/dist/icons/maps/location.js +6 -0
- package/dist/icons/maps/location_slash.js +6 -0
- package/dist/icons/maps/map.js +6 -0
- package/dist/icons/maps/marker.js +6 -0
- package/dist/icons/maps/panorama.js +6 -0
- package/dist/icons/maps/pin.js +6 -0
- package/dist/icons/maps/pin_arrow.js +6 -0
- package/dist/icons/maps/pin_location.js +6 -0
- package/dist/icons/maps/pin_plus.js +6 -0
- package/dist/icons/maps/pin_question.js +6 -0
- package/dist/icons/maps/pin_slash.js +6 -0
- package/dist/icons/maps/push_pin.js +6 -0
- package/dist/icons/maps/push_pin_filled.js +6 -0
- package/dist/icons/maps/push_pin_slash.js +6 -0
- package/dist/icons/maps/radar.js +6 -0
- package/dist/icons/maps/route.js +6 -0
- package/dist/icons/message/bubble.js +6 -0
- package/dist/icons/message/bubble_question.js +6 -0
- package/dist/icons/message/comment.js +6 -0
- package/dist/icons/message/comment_add.js +6 -0
- package/dist/icons/message/comment_check.js +6 -0
- package/dist/icons/message/comment_close.js +6 -0
- package/dist/icons/message/comment_minus.js +6 -0
- package/dist/icons/message/comment_text.js +6 -0
- package/dist/icons/message/index.js +8 -0
- package/dist/icons/misc/advertisement.js +6 -0
- package/dist/icons/misc/atom.js +6 -0
- package/dist/icons/misc/bone.js +6 -0
- package/dist/icons/misc/brightness_high.js +6 -0
- package/dist/icons/misc/brightness_low.js +6 -0
- package/dist/icons/misc/contrast.js +6 -0
- package/dist/icons/misc/crosshairs.js +6 -0
- package/dist/icons/misc/crown.js +6 -0
- package/dist/icons/misc/footprint.js +6 -0
- package/dist/icons/misc/form.js +6 -0
- package/dist/icons/misc/funnel.js +6 -0
- package/dist/icons/misc/index.js +25 -0
- package/dist/icons/misc/infinite.js +6 -0
- package/dist/icons/misc/insert_button.js +6 -0
- package/dist/icons/misc/light_bulb.js +6 -0
- package/dist/icons/misc/moon.js +6 -0
- package/dist/icons/misc/nut.js +6 -0
- package/dist/icons/misc/planet.js +6 -0
- package/dist/icons/misc/plus_thick.js +6 -0
- package/dist/icons/misc/pocket.js +6 -0
- package/dist/icons/misc/rocket.js +6 -0
- package/dist/icons/misc/soup.js +10 -0
- package/dist/icons/misc/sun.js +6 -0
- package/dist/icons/misc/toy_horse.js +6 -0
- package/dist/icons/misc/trophy.js +6 -0
- package/dist/icons/misc/watercloset.js +6 -0
- package/dist/icons/notifications/alert_circle.js +6 -0
- package/dist/icons/notifications/alert_octogon.js +6 -0
- package/dist/icons/notifications/alert_triangle.js +6 -0
- package/dist/icons/notifications/app_notification.js +6 -0
- package/dist/icons/notifications/bell.js +6 -0
- package/dist/icons/notifications/bell_alert.js +6 -0
- package/dist/icons/notifications/bell_checkmark.js +6 -0
- package/dist/icons/notifications/bell_minus.js +6 -0
- package/dist/icons/notifications/bell_plus.js +6 -0
- package/dist/icons/notifications/bell_ring.js +8 -0
- package/dist/icons/notifications/bell_slash.js +6 -0
- package/dist/icons/notifications/close_octogon.js +6 -0
- package/dist/icons/notifications/index.js +14 -0
- package/dist/icons/notifications/information.js +6 -0
- package/dist/icons/notifications/minus_octogon.js +6 -0
- package/dist/icons/notifications/question_circle.js +6 -0
- package/dist/icons/people/group.js +6 -0
- package/dist/icons/people/group_add.js +6 -0
- package/dist/icons/people/group_chat.js +8 -0
- package/dist/icons/people/group_remove.js +6 -0
- package/dist/icons/people/group_send.js +7 -0
- package/dist/icons/people/groups.js +6 -0
- package/dist/icons/people/index.js +13 -0
- package/dist/icons/people/person.js +6 -0
- package/dist/icons/people/person_add.js +6 -0
- package/dist/icons/people/person_checkmark.js +6 -0
- package/dist/icons/people/person_circle.js +8 -0
- package/dist/icons/people/person_close.js +8 -0
- package/dist/icons/people/person_remove.js +6 -0
- package/dist/icons/people/person_slash.js +8 -0
- package/dist/icons/phone/index.js +14 -0
- package/dist/icons/phone/keypad.js +6 -0
- package/dist/icons/phone/phone.js +6 -0
- package/dist/icons/phone/phone_add.js +6 -0
- package/dist/icons/phone/phone_calling.js +6 -0
- package/dist/icons/phone/phone_check.js +6 -0
- package/dist/icons/phone/phone_close.js +6 -0
- package/dist/icons/phone/phone_decline.js +6 -0
- package/dist/icons/phone/phone_end.js +6 -0
- package/dist/icons/phone/phone_forwarded.js +6 -0
- package/dist/icons/phone/phone_hash.js +6 -0
- package/dist/icons/phone/phone_incoming.js +6 -0
- package/dist/icons/phone/phone_missed.js +6 -0
- package/dist/icons/phone/phone_outgoing.js +6 -0
- package/dist/icons/phone/phone_pause.js +6 -0
- package/dist/icons/phone/phone_slash.js +6 -0
- package/dist/icons/phone/voicemail.js +6 -0
- package/dist/icons/security/index.js +11 -0
- package/dist/icons/security/key.js +6 -0
- package/dist/icons/security/key_slash.js +6 -0
- package/dist/icons/security/lock.js +6 -0
- package/dist/icons/security/lock_circle.js +6 -0
- package/dist/icons/security/lock_open.js +6 -0
- package/dist/icons/security/lock_slash.js +6 -0
- package/dist/icons/security/shield.js +6 -0
- package/dist/icons/security/shield_checkmark.js +6 -0
- package/dist/icons/security/shield_lock.js +6 -0
- package/dist/icons/security/shield_slash.js +6 -0
- package/dist/icons/security/verified.js +6 -0
- package/dist/icons/shopping/basket.js +6 -0
- package/dist/icons/shopping/cart.js +6 -0
- package/dist/icons/shopping/cart_filled.js +6 -0
- package/dist/icons/shopping/coupon.js +6 -0
- package/dist/icons/shopping/coupon_cut.js +6 -0
- package/dist/icons/shopping/delivery.js +6 -0
- package/dist/icons/shopping/discount.js +6 -0
- package/dist/icons/shopping/gift.js +6 -0
- package/dist/icons/shopping/gift_bag.js +6 -0
- package/dist/icons/shopping/index.js +15 -0
- package/dist/icons/shopping/inventory.js +6 -0
- package/dist/icons/shopping/point_of_sale.js +6 -0
- package/dist/icons/shopping/shirt.js +6 -0
- package/dist/icons/shopping/tag.js +6 -0
- package/dist/icons/shopping/tag_diagonal.js +6 -0
- package/dist/icons/shopping/tote.js +6 -0
- package/dist/icons/special/index.js +4 -0
- package/dist/icons/special/upload_audio.js +11 -0
- package/dist/icons/special/upload_file.js +6 -0
- package/dist/icons/special/upload_image.js +8 -0
- package/dist/icons/special/upload_video.js +9 -0
- package/dist/icons/symbols/at.js +6 -0
- package/dist/icons/symbols/cc.js +6 -0
- package/dist/icons/symbols/cmd.js +6 -0
- package/dist/icons/symbols/facebook.js +6 -0
- package/dist/icons/symbols/google.js +9 -0
- package/dist/icons/symbols/hash.js +6 -0
- package/dist/icons/symbols/index.js +9 -0
- package/dist/icons/symbols/instagram.js +18 -0
- package/dist/icons/symbols/messenger.js +12 -0
- package/dist/icons/symbols/twitter.js +6 -0
- package/dist/icons/technology/battery.js +6 -0
- package/dist/icons/technology/battery_100.js +6 -0
- package/dist/icons/technology/battery_20.js +6 -0
- package/dist/icons/technology/battery_40.js +6 -0
- package/dist/icons/technology/battery_60.js +6 -0
- package/dist/icons/technology/battery_80.js +6 -0
- package/dist/icons/technology/battery_charging.js +6 -0
- package/dist/icons/technology/battery_slash.js +6 -0
- package/dist/icons/technology/devices.js +6 -0
- package/dist/icons/technology/floppy_disk.js +6 -0
- package/dist/icons/technology/index.js +17 -0
- package/dist/icons/technology/iphone.js +6 -0
- package/dist/icons/technology/laptop.js +6 -0
- package/dist/icons/technology/mobile.js +6 -0
- package/dist/icons/technology/monitor.js +6 -0
- package/dist/icons/technology/server.js +6 -0
- package/dist/icons/technology/sim_card.js +6 -0
- package/dist/icons/technology/usb_stick.js +6 -0
- package/dist/icons/text/align_center.js +6 -0
- package/dist/icons/text/align_justified.js +6 -0
- package/dist/icons/text/align_left.js +6 -0
- package/dist/icons/text/align_right.js +6 -0
- package/dist/icons/text/code_block.js +6 -0
- package/dist/icons/text/divider.js +6 -0
- package/dist/icons/text/footnote.js +8 -0
- package/dist/icons/text/indent_decrease.js +6 -0
- package/dist/icons/text/indent_increase.js +6 -0
- package/dist/icons/text/index.js +13 -0
- package/dist/icons/text/list_ordered.js +6 -0
- package/dist/icons/text/list_unordered.js +6 -0
- package/dist/icons/text/quote.js +6 -0
- package/dist/icons/text/table.js +6 -0
- package/dist/icons/time/alarm.js +6 -0
- package/dist/icons/time/alarm_checkmark.js +6 -0
- package/dist/icons/time/alarm_minus.js +6 -0
- package/dist/icons/time/alarm_plus.js +6 -0
- package/dist/icons/time/alarm_slash.js +6 -0
- package/dist/icons/time/alarm_snooze.js +6 -0
- package/dist/icons/time/calendar.js +6 -0
- package/dist/icons/time/calendar_add.js +6 -0
- package/dist/icons/time/calendar_checkmark.js +6 -0
- package/dist/icons/time/calendar_close.js +6 -0
- package/dist/icons/time/calendar_dates.js +6 -0
- package/dist/icons/time/calendar_minus.js +6 -0
- package/dist/icons/time/calendar_plus.js +6 -0
- package/dist/icons/time/calendar_scroll.js +8 -0
- package/dist/icons/time/clock.js +6 -0
- package/dist/icons/time/clock_history.js +6 -0
- package/dist/icons/time/index.js +19 -0
- package/dist/icons/time/stopwatch.js +6 -0
- package/dist/icons/time/timer.js +6 -0
- package/dist/icons/time/watch.js +6 -0
- package/dist/index.js +5 -2
- package/dist/styles/output.css +1771 -0
- package/dist/types/attributes.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/utils/date.d.ts +1 -1
- package/dist/utils/date.js +98 -0
- package/dist/utils/function.js +1 -0
- package/dist/utils/index.js +2 -0
- package/package.json +2 -5
- package/dist/components/actions/dropdown/dropdown.stories.d.ts +0 -5
- package/dist/components/custom/courses_selection/courses_selection.stories.d.ts +0 -5
- package/dist/components/custom/users_selection/users_selection.stories.d.ts +0 -5
- package/dist/components/editor/editor.stories.d.ts +0 -6
- package/dist/components/iconography/avatar/avatar.stories.d.ts +0 -7
- package/dist/components/media/video-player/video.stories.d.ts +0 -6
- package/dist/main.js.LICENSE.txt +0 -90
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CoursesSelection } from './courses_selection';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UsersSelection } from './users_selection';
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { Button, P, Search, Checkbox, Box } from '../../';
|
|
6
|
+
export const UsersSelection = ({ closeOnBlur = true, disabled = false, offset = [0, 0], sx, containerSx, searchSx, users, label, title, userIsChecked, setUserIsChecked, icon, ...rest }) => {
|
|
7
|
+
const wrapperRef = React.useRef(null);
|
|
8
|
+
const [open, setOpen] = React.useState(false);
|
|
9
|
+
const [searchValue, setSearchValue] = React.useState('');
|
|
10
|
+
React.useEffect(() => {
|
|
11
|
+
if (disabled) {
|
|
12
|
+
setOpen(false);
|
|
13
|
+
}
|
|
14
|
+
}, [disabled]);
|
|
15
|
+
const handleOpen = () => {
|
|
16
|
+
if (disabled) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
setOpen((prev) => !prev);
|
|
20
|
+
};
|
|
21
|
+
const handleBlur = (event) => {
|
|
22
|
+
if (closeOnBlur &&
|
|
23
|
+
wrapperRef?.current &&
|
|
24
|
+
!wrapperRef?.current?.contains(event.relatedTarget)) {
|
|
25
|
+
setOpen(false);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const Icon = icon;
|
|
29
|
+
return (React.createElement(Wrapper, { "$sx": sx, tabIndex: 0, ref: wrapperRef, onBlurCapture: handleBlur, ...rest },
|
|
30
|
+
React.createElement(Button, { type: "dropdown", isDropdownOpen: open, onClick: handleOpen },
|
|
31
|
+
React.createElement(Icon, { size: 16, sx: "margin-right: 16px;" }),
|
|
32
|
+
label),
|
|
33
|
+
open && (React.createElement(Container, { "$offset": offset, "$sx": containerSx },
|
|
34
|
+
React.createElement(P, null, title),
|
|
35
|
+
React.createElement(Search, { onChange: (event) => setSearchValue(event.target.value), onClearText: () => setSearchValue(''), value: searchValue, size: "large", placeholder: "Search...", sx: `margin-top: 8px; margin-bottom: 8px; border-radius: 76px; ${searchSx}` }),
|
|
36
|
+
users
|
|
37
|
+
.filter((user) => searchValue
|
|
38
|
+
? user.fullName
|
|
39
|
+
.toLowerCase()
|
|
40
|
+
.includes(searchValue.toLowerCase())
|
|
41
|
+
: true)
|
|
42
|
+
.map((user) => (React.createElement(React.Fragment, { key: user.id },
|
|
43
|
+
React.createElement(OptionWrapper, { "$disabled": disabled, onClick: () => setUserIsChecked({
|
|
44
|
+
...userIsChecked,
|
|
45
|
+
[user.id]: !userIsChecked[user.id],
|
|
46
|
+
}) },
|
|
47
|
+
React.createElement(Box, { "$display": "flex", "$align": "center" },
|
|
48
|
+
React.createElement(StyledImage, { alt: "", height: 40, src: user.imageSrc, width: 40 }),
|
|
49
|
+
React.createElement(P, { "$color": 'grey-4', "$fontSize": 14, "$lineHeight": 20, "$mediumBold": true, "$textClampLines": 1 }, user.fullName),
|
|
50
|
+
React.createElement(Checkbox, { selected: userIsChecked[user.id], sx: "margin-left: auto;" }))),
|
|
51
|
+
React.createElement(Spacer, null))))))));
|
|
52
|
+
};
|
|
53
|
+
const Wrapper = styled.div `
|
|
54
|
+
position: relative;
|
|
55
|
+
display: block;
|
|
56
|
+
outline: none;
|
|
57
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
58
|
+
`;
|
|
59
|
+
const Container = styled.div `
|
|
60
|
+
min-width: 280px;
|
|
61
|
+
max-height: 600px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
background-color: var(--color-white);
|
|
65
|
+
position: absolute;
|
|
66
|
+
width: 100%;
|
|
67
|
+
outline: none;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
box-shadow: var(--elevation-2);
|
|
70
|
+
border-radius: 8px;
|
|
71
|
+
overflow: auto;
|
|
72
|
+
padding: 24px;
|
|
73
|
+
z-index: 2;
|
|
74
|
+
|
|
75
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
76
|
+
|
|
77
|
+
${({ $offset }) => $offset ? `transform: translate(${$offset[0]}px, ${$offset[1]}px);` : ''}
|
|
78
|
+
`;
|
|
79
|
+
const OptionWrapper = styled.div `
|
|
80
|
+
position: relative;
|
|
81
|
+
padding: 12px 16px;
|
|
82
|
+
user-select: none;
|
|
83
|
+
gap: 8px;
|
|
84
|
+
|
|
85
|
+
& > * {
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
${({ $disabled }) => {
|
|
90
|
+
if ($disabled) {
|
|
91
|
+
return `cursor: initial;
|
|
92
|
+
color: var(--color-grey-7);
|
|
93
|
+
background-color: var(--color-grey-10);`;
|
|
94
|
+
}
|
|
95
|
+
return `
|
|
96
|
+
&:hover {
|
|
97
|
+
background-color: var(--color-blue-10);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:active {
|
|
101
|
+
background-color: var(--color-grey-8);
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
}}
|
|
105
|
+
`;
|
|
106
|
+
const StyledImage = styled(Image) `
|
|
107
|
+
border-radius: 50%;
|
|
108
|
+
width: 40px;
|
|
109
|
+
height: 40px;
|
|
110
|
+
margin-right: 16px;
|
|
111
|
+
`;
|
|
112
|
+
const Spacer = styled.div `
|
|
113
|
+
width: 100%;
|
|
114
|
+
height: 1px;
|
|
115
|
+
background-color: var(--color-grey-8);
|
|
116
|
+
|
|
117
|
+
&:hover {
|
|
118
|
+
appearance: none;
|
|
119
|
+
}
|
|
120
|
+
`;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export { ELEMENT_BLOCKQUOTE, ELEMENT_CODE_LINE, ELEMENT_CODE_SYNTAX, ELEMENT_DEFAULT, ELEMENT_H1, ELEMENT_H2, ELEMENT_H3, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, ELEMENT_HR, ELEMENT_IMAGE, ELEMENT_LI, ELEMENT_LIC, ELEMENT_LINK, ELEMENT_MEDIA, ELEMENT_MEDIA_EMBED, ELEMENT_MENTION, ELEMENT_MENTION_INPUT, ELEMENT_OL, ELEMENT_PARAGRAPH, ELEMENT_TABLE, ELEMENT_TD, ELEMENT_TH, ELEMENT_TODO_LI, ELEMENT_TR, ELEMENT_UL, MARK_BG_COLOR, MARK_BOLD, MARK_CODE, MARK_COLOR, MARK_FONT_FAMILY, MARK_FONT_SIZE, MARK_FONT_WEIGHT, MARK_HIGHLIGHT, MARK_ITALIC, MARK_KBD, MARK_SEARCH_HIGHLIGHT, MARK_STRIKETHROUGH, MARK_SUBSCRIPT, MARK_SUPERSCRIPT, MARK_UNDERLINE, } from '@udecode/plate';
|
|
2
|
+
export const ELEMENT_BUTTON = 'button';
|
|
3
|
+
export const ELEMENT_PAYWALL = 'paywall';
|
|
4
|
+
export const ELEMENT_QA = 'q-n-a';
|
|
5
|
+
export const ELEMENT_VIDEO = 'video';
|
|
6
|
+
export const BUTTON_LINK = 'button-link';
|
|
7
|
+
export const BUTTON_SUBSCRIBE = 'button-subscribe';
|
|
8
|
+
export const COLORS = [
|
|
9
|
+
'var(--color-turquoise-5)',
|
|
10
|
+
'var(--color-green-5)',
|
|
11
|
+
'var(--color-blue-5)',
|
|
12
|
+
'var(--color-purple-5)',
|
|
13
|
+
'var(--color-yellow-5)',
|
|
14
|
+
'var(--color-orange-5)',
|
|
15
|
+
'var(--color-red-5)',
|
|
16
|
+
];
|
|
17
|
+
export const PLACEHOLDER = 'This is a placeholder';
|
|
18
|
+
export const DEFAULT_CONTENT = [
|
|
19
|
+
{
|
|
20
|
+
children: [
|
|
21
|
+
{
|
|
22
|
+
text: '',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
type: 'p',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
export const DEFAULT_Q_N_A = [
|
|
29
|
+
{
|
|
30
|
+
children: [
|
|
31
|
+
{
|
|
32
|
+
text: 'What is your question?',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
questionAnswerId: 'q-n-a-16d648b0-e7db-4365-af08-61833b59e29d',
|
|
36
|
+
type: ELEMENT_QA,
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
export const DEFAULT_IMAGE = [
|
|
40
|
+
{
|
|
41
|
+
type: 'img',
|
|
42
|
+
id: 1,
|
|
43
|
+
children: [
|
|
44
|
+
{
|
|
45
|
+
text: '',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const EditorContext = React.createContext({
|
|
3
|
+
commentInputLoader: () => React.createElement(React.Fragment, null),
|
|
4
|
+
commentLoader: () => React.createElement(React.Fragment, null),
|
|
5
|
+
handleVideoClick: () => undefined,
|
|
6
|
+
imageSrcLoader: async () => '',
|
|
7
|
+
videoTitleLoader: () => React.createElement(React.Fragment, null),
|
|
8
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { createPlugins, Plate, PlateContent } from '@udecode/plate';
|
|
5
|
+
import { PLACEHOLDER } from './constants';
|
|
6
|
+
import { EditorContext } from './context';
|
|
7
|
+
import { EditorBar } from './navbar';
|
|
8
|
+
import { plateUI } from './plugins/plate';
|
|
9
|
+
import { blocks, leafs, marks, utils } from './plugins';
|
|
10
|
+
const plugins = createPlugins([...blocks, ...leafs, ...marks, ...utils], {
|
|
11
|
+
components: plateUI,
|
|
12
|
+
});
|
|
13
|
+
export const Editor = ({ commentInputLoader, commentLoader, editable, handleVideoClick, imageSrcLoader, onChange, previousContent, videoTitleLoader, }) => {
|
|
14
|
+
return (React.createElement(EditorContext.Provider, { value: {
|
|
15
|
+
commentInputLoader,
|
|
16
|
+
commentLoader,
|
|
17
|
+
handleVideoClick,
|
|
18
|
+
imageSrcLoader,
|
|
19
|
+
videoTitleLoader,
|
|
20
|
+
} },
|
|
21
|
+
React.createElement(Plate, { id: "main", initialValue: previousContent, onChange: onChange, plugins: plugins },
|
|
22
|
+
React.createElement(Wrapper, null,
|
|
23
|
+
editable && React.createElement(EditorBar, null),
|
|
24
|
+
React.createElement(PlateContent, { id: "main", autoFocus: true, placeholder: PLACEHOLDER, readOnly: !editable, spellCheck: true, onContextMenu: (e) => e.preventDefault(), onCopy: () => {
|
|
25
|
+
if ('clipboard' in navigator) {
|
|
26
|
+
return navigator.clipboard.writeText('');
|
|
27
|
+
}
|
|
28
|
+
} })))));
|
|
29
|
+
};
|
|
30
|
+
const Wrapper = styled.div `
|
|
31
|
+
* {
|
|
32
|
+
font-family: var(--font-inter);
|
|
33
|
+
outline: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.slate-bold {
|
|
37
|
+
font-weight: 700;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.slate-italic {
|
|
41
|
+
font-style: italic;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.slate-strikethrough {
|
|
45
|
+
text-decoration: line-through;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.slate-underline {
|
|
49
|
+
text-decoration: underline;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
li {
|
|
53
|
+
color: var(--color-grey-3);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
ul {
|
|
57
|
+
padding-left: 24px;
|
|
58
|
+
|
|
59
|
+
li {
|
|
60
|
+
list-style-type: disc;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
ol {
|
|
65
|
+
padding-left: 24px;
|
|
66
|
+
|
|
67
|
+
li {
|
|
68
|
+
list-style-type: decimal;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
a {
|
|
73
|
+
text-decoration: underline;
|
|
74
|
+
color: var(--color-primary-blue-1);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.slate-code {
|
|
78
|
+
& > * {
|
|
79
|
+
font-family: 'Roboto Mono';
|
|
80
|
+
& > * {
|
|
81
|
+
font-family: 'Roboto Mono';
|
|
82
|
+
& > * {
|
|
83
|
+
font-family: 'Roboto Mono';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
background-color: var(--color-grey-9);
|
|
89
|
+
padding: 0.4em 0.4em;
|
|
90
|
+
font-size: 0.8em;
|
|
91
|
+
line-height: 0.8em;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
& > [data-slate-editor='true'] > * {
|
|
95
|
+
margin: 24px 0px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
position: relative;
|
|
99
|
+
padding: 24px;
|
|
100
|
+
max-width: 1200px;
|
|
101
|
+
margin: 98px auto 0px;
|
|
102
|
+
`;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const BorderAll = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
|
|
3
|
+
React.createElement("path", { d: "M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6zm10 13h5a1 1 0 0 0 1-1v-5h-6v6zm-2-6H5v5a1 1 0 0 0 1 1h5v-6zm2-2h6V6a1 1 0 0 0-1-1h-5v6zm-2-6H6a1 1 0 0 0-1 1v5h6V5z" })));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const BorderBottom = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
|
|
3
|
+
React.createElement("path", { d: "M13 5a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2h2zm-8 6a1 1 0 1 0-2 0v2a1 1 0 1 0 2 0v-2zm-2 7a1 1 0 1 1 2 0 1 1 0 0 0 1 1h12a1 1 0 0 0 1-1 1 1 0 1 1 2 0 3 3 0 0 1-3 3H6a3 3 0 0 1-3-3zm17-8a1 1 0 0 0-1 1v2a1 1 0 1 0 2 0v-2a1 1 0 0 0-1-1zM7 4a1 1 0 0 0-1-1 3 3 0 0 0-3 3 1 1 0 0 0 2 0 1 1 0 0 1 1-1 1 1 0 0 0 1-1zm11-1a1 1 0 1 0 0 2 1 1 0 0 1 1 1 1 1 0 1 0 2 0 3 3 0 0 0-3-3z" })));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const BorderLeft = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
|
|
3
|
+
React.createElement("path", { d: "M6 21a1 1 0 1 0 0-2 1 1 0 0 1-1-1V6a1 1 0 0 1 1-1 1 1 0 0 0 0-2 3 3 0 0 0-3 3v12a3 3 0 0 0 3 3zm7-16a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2h2zm6 6a1 1 0 1 1 2 0v2a1 1 0 1 1-2 0v-2zm-5 9a1 1 0 0 1-1 1h-2a1 1 0 1 1 0-2h2a1 1 0 0 1 1 1zm4-17a1 1 0 1 0 0 2 1 1 0 0 1 1 1 1 1 0 1 0 2 0 3 3 0 0 0-3-3zm-1 17a1 1 0 0 0 1 1 3 3 0 0 0 3-3 1 1 0 1 0-2 0 1 1 0 0 1-1 1 1 1 0 0 0-1 1z" })));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const BorderNone = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
|
|
3
|
+
React.createElement("path", { d: "M14 4a1 1 0 0 1-1 1h-2a1 1 0 1 1 0-2h2a1 1 0 0 1 1 1zm-9 7a1 1 0 1 0-2 0v2a1 1 0 1 0 2 0v-2zm14 0a1 1 0 1 1 2 0v2a1 1 0 1 1-2 0v-2zm-6 10a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2h2zM7 4a1 1 0 0 0-1-1 3 3 0 0 0-3 3 1 1 0 0 0 2 0 1 1 0 0 1 1-1 1 1 0 0 0 1-1zm11-1a1 1 0 1 0 0 2 1 1 0 0 1 1 1 1 1 0 1 0 2 0 3 3 0 0 0-3-3zM7 20a1 1 0 0 1-1 1 3 3 0 0 1-3-3 1 1 0 1 1 2 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1zm11 1a1 1 0 1 1 0-2 1 1 0 0 0 1-1 1 1 0 1 1 2 0 3 3 0 0 1-3 3z" })));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const BorderRight = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
|
|
3
|
+
React.createElement("path", { d: "M13 5a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2h2zm-8 6a1 1 0 1 0-2 0v2a1 1 0 1 0 2 0v-2zm9 9a1 1 0 0 1-1 1h-2a1 1 0 1 1 0-2h2a1 1 0 0 1 1 1zM6 3a1 1 0 0 1 0 2 1 1 0 0 0-1 1 1 1 0 0 1-2 0 3 3 0 0 1 3-3zm1 17a1 1 0 0 1-1 1 3 3 0 0 1-3-3 1 1 0 1 1 2 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1zm11 1a1 1 0 1 1 0-2 1 1 0 0 0 1-1V6a1 1 0 0 0-1-1 1 1 0 1 1 0-2 3 3 0 0 1 3 3v12a3 3 0 0 1-3 3z" })));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const BorderTop = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
|
|
3
|
+
React.createElement("path", { d: "M3 6a1 1 0 0 0 2 0 1 1 0 0 1 1-1h12a1 1 0 0 1 1 1 1 1 0 1 0 2 0 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3zm2 5a1 1 0 1 0-2 0v2a1 1 0 1 0 2 0v-2zm14 0a1 1 0 1 1 2 0v2a1 1 0 1 1-2 0v-2zm-5 9a1 1 0 0 1-1 1h-2a1 1 0 1 1 0-2h2a1 1 0 0 1 1 1zm-8 1a1 1 0 1 0 0-2 1 1 0 0 1-1-1 1 1 0 1 0-2 0 3 3 0 0 0 3 3zm11-1a1 1 0 0 0 1 1 3 3 0 0 0 3-3 1 1 0 1 0-2 0 1 1 0 0 1-1 1 1 1 0 0 0-1 1z" })));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BorderAll } from './border-all';
|
|
2
|
+
export { BorderBottom } from './border-bottom';
|
|
3
|
+
export { BorderLeft } from './border-left';
|
|
4
|
+
export { BorderNone } from './border-none';
|
|
5
|
+
export { BorderRight } from './border-right';
|
|
6
|
+
export { BorderTop } from './border-top';
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { setAlign } from '@udecode/plate';
|
|
3
|
+
import { useAlignDropdownMenu, useAlignDropdownMenuState, } from '@udecode/plate-alignment';
|
|
4
|
+
import { Dropdown } from '../../';
|
|
5
|
+
import { AlignCenter } from '../../../icons/text/align_center';
|
|
6
|
+
import { AlignJustified } from '../../../icons/text/align_justified';
|
|
7
|
+
import { AlignLeft } from '../../../icons/text/align_left';
|
|
8
|
+
import { AlignRight } from '../../../icons/text/align_right';
|
|
9
|
+
import { PlayerListPlay } from '../../../icons';
|
|
10
|
+
import { MenuButton } from './navbar';
|
|
11
|
+
const items = [
|
|
12
|
+
{
|
|
13
|
+
value: 'left',
|
|
14
|
+
icon: AlignLeft,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
value: 'center',
|
|
18
|
+
icon: AlignCenter,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
value: 'right',
|
|
22
|
+
icon: AlignRight,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: 'justify',
|
|
26
|
+
icon: AlignJustified,
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
export const AlignmentDropdown = ({ editorRef }) => {
|
|
30
|
+
const alignState = useAlignDropdownMenuState();
|
|
31
|
+
const { radioGroupProps } = useAlignDropdownMenu(alignState);
|
|
32
|
+
const current = radioGroupProps.value;
|
|
33
|
+
const IconValue = items.find((item) => item.value === radioGroupProps.value)?.icon ??
|
|
34
|
+
PlayerListPlay;
|
|
35
|
+
const handleAlign = (event) => {
|
|
36
|
+
const value = event.target?.getAttribute('data-value');
|
|
37
|
+
if (!value)
|
|
38
|
+
return;
|
|
39
|
+
setAlign(editorRef, {
|
|
40
|
+
value: value,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
return (React.createElement(Dropdown, { onChange: handleAlign, offset: [0, 0], options: [
|
|
44
|
+
{
|
|
45
|
+
icon: (React.createElement(MenuButton, { "$active": current === 'left' },
|
|
46
|
+
React.createElement(AlignLeft, { size: 24, color: "grey-5" }))),
|
|
47
|
+
sx: 'gap: 0px; padding: 4px;',
|
|
48
|
+
value: 'left',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
icon: (React.createElement(MenuButton, { "$active": current === 'center' },
|
|
52
|
+
React.createElement(AlignCenter, { size: 24, color: "grey-5" }))),
|
|
53
|
+
sx: 'gap: 0px; padding: 4px;',
|
|
54
|
+
value: 'center',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
icon: (React.createElement(MenuButton, { "$active": current === 'right' },
|
|
58
|
+
React.createElement(AlignRight, { size: 24, color: "grey-5" }))),
|
|
59
|
+
sx: 'gap: 0px; padding: 4px;',
|
|
60
|
+
value: 'right',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
icon: (React.createElement(MenuButton, { "$active": current === 'justify' },
|
|
64
|
+
React.createElement(AlignJustified, { size: 24, color: "grey-5" }))),
|
|
65
|
+
sx: 'gap: 0px; padding: 4px;',
|
|
66
|
+
value: 'justify',
|
|
67
|
+
},
|
|
68
|
+
], maintainState: false, trigger: React.createElement(IconValue, { size: 24, color: "grey-5" }) }));
|
|
69
|
+
};
|
|
70
|
+
// <AlignToolbarButton
|
|
71
|
+
// as="div"
|
|
72
|
+
// active={alignment === 'left' ? true : undefined}
|
|
73
|
+
// data-value="left"
|
|
74
|
+
// value="left"
|
|
75
|
+
// icon={<AlignLeft size={24} color="grey-5" />}
|
|
76
|
+
// />
|
|
77
|
+
// <AlignToolbarButton
|
|
78
|
+
// as="div"
|
|
79
|
+
// active={alignment === 'center' ? true : undefined}
|
|
80
|
+
// data-value="center"
|
|
81
|
+
// value="center"
|
|
82
|
+
// icon={<AlignCenter size={24} color="grey-5" />}
|
|
83
|
+
// />
|
|
84
|
+
// <AlignToolbarButton
|
|
85
|
+
// as="div"
|
|
86
|
+
// active={alignment === 'right' ? true : undefined}
|
|
87
|
+
// data-value="right"
|
|
88
|
+
// value="right"
|
|
89
|
+
// icon={<AlignRight size={24} color="grey-5" />}
|
|
90
|
+
// />
|
|
91
|
+
// <AlignToolbarButton
|
|
92
|
+
// as="div"
|
|
93
|
+
// active={alignment === 'justify' ? true : undefined}
|
|
94
|
+
// data-value="justify"
|
|
95
|
+
// value="justify"
|
|
96
|
+
// icon={<AlignJustified size={24} color="grey-5" />}
|
|
97
|
+
// />
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Box, Button, H, Modal, P, Radio } from '../../';
|
|
4
|
+
import { Close, InsertButton } from '../../../icons';
|
|
5
|
+
import { MenuButton } from './navbar';
|
|
6
|
+
import { BUTTON_LINK, BUTTON_SUBSCRIBE } from '../constants';
|
|
7
|
+
export const ButtonModal = ({ onButtonInsert }) => {
|
|
8
|
+
const [buttonType, setButtonType] = React.useState();
|
|
9
|
+
const handleButtonInsert = () => {
|
|
10
|
+
buttonType && onButtonInsert(buttonType);
|
|
11
|
+
setButtonType(undefined);
|
|
12
|
+
};
|
|
13
|
+
return (React.createElement(Modal, null,
|
|
14
|
+
React.createElement(Modal.Trigger, null,
|
|
15
|
+
React.createElement(MenuButton, null,
|
|
16
|
+
React.createElement(InsertButton, { size: 24, color: "grey-5" }))),
|
|
17
|
+
React.createElement(Modal.Content, { sx: "border-radius: 16px; max-width: 782px; width: 100%; margin: 24px; padding: 0px;" },
|
|
18
|
+
React.createElement(Box, { "$dir": "column" },
|
|
19
|
+
React.createElement(Box, { "$align": "center", "$justify": "space-between", sx: "padding: 24px; box-shadow: var(--elevation-2);" },
|
|
20
|
+
React.createElement(Box, { "$align": "center", "$gap": 32 },
|
|
21
|
+
React.createElement(IconWrapper, null,
|
|
22
|
+
React.createElement(InsertButton, { size: 24, color: "hue-blue-1" })),
|
|
23
|
+
React.createElement(H, { "$bold": true, "$color": "hue-blue-1", "$fontSize": 20, "$lineHeight": 28 }, "Insert Button")),
|
|
24
|
+
React.createElement(Close, { size: 24, sx: "&:hover { cursor: pointer; border-radius: 50%; background-color: var(--color-grey-9); }" })),
|
|
25
|
+
React.createElement(Box, { "$dir": "column", "$gap": 24, sx: "padding: 24px 48px 24px 24px;" },
|
|
26
|
+
React.createElement(ButtonItem, { active: buttonType === BUTTON_SUBSCRIBE, description: "A button encouraging the reader to purchase a paid subscription to your community", onClick: () => setButtonType(BUTTON_SUBSCRIBE), title: "Subscribe Now" },
|
|
27
|
+
React.createElement(Button, { size: "small", sx: "width: 130px;" }, "Subscribe")),
|
|
28
|
+
React.createElement(ButtonItem, { active: buttonType === BUTTON_LINK, description: "A button that links to a URL", onClick: () => setButtonType(BUTTON_LINK), title: "Link Button" },
|
|
29
|
+
React.createElement(Button, { size: "small", sx: "width: 130px;" }, "Link"))),
|
|
30
|
+
React.createElement(Box, { "$padding": 24, "$gap": 16, sx: "padding: 24px; background-color: var(--color-white); border-top: 1px solid var(--color-grey-8);" },
|
|
31
|
+
React.createElement(Modal.Dismiss, null,
|
|
32
|
+
React.createElement(Button, { size: "small", sx: "flex: 1;", type: "outlined", onClick: () => setButtonType(undefined) }, "Cancel")),
|
|
33
|
+
React.createElement(Modal.Dismiss, null,
|
|
34
|
+
React.createElement(Button, { size: "small", sx: "flex: 1;", onClick: handleButtonInsert }, "Confirm")))))));
|
|
35
|
+
};
|
|
36
|
+
const IconWrapper = styled.div `
|
|
37
|
+
height: 48px;
|
|
38
|
+
width: 48px;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
padding: 12px;
|
|
41
|
+
border-radius: 8px;
|
|
42
|
+
background-color: var(--color-hue-blue-2);
|
|
43
|
+
`;
|
|
44
|
+
const ButtonItem = ({ active, children, description, onClick, title, }) => (React.createElement(Box, { "$dir": "column", onClick: onClick, sx: "border-radius: 16px; box-shadow: var(--elevation-2); cursor: pointer;" },
|
|
45
|
+
React.createElement(Box, { sx: `
|
|
46
|
+
padding: 24px;
|
|
47
|
+
background-color: var(--color-blue-10);
|
|
48
|
+
border-radius: 8px 8px 0px 0px;
|
|
49
|
+
border-bottom: 1px solid var(--color-grey-9);
|
|
50
|
+
` },
|
|
51
|
+
React.createElement(Radio, { checked: !!active, sx: "align-items: flex-start;", value: title }),
|
|
52
|
+
React.createElement(Box, { "$dir": "column" },
|
|
53
|
+
React.createElement(P, { "$semiBold": true }, title),
|
|
54
|
+
React.createElement(P, null, description))),
|
|
55
|
+
React.createElement(Box, { "$align": "center", "$justify": "center", sx: "border-radius: 0px 0px 8px 8px; padding: 24px;" }, children)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EditorBar } from './navbar';
|