@soul-refiner/design-system 2.0.1-alpha.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/colors.js +140 -1
- package/dist/common/date.js +34 -1
- package/dist/common/styles.js +62 -30
- package/dist/components/actions/button/button.js +111 -21
- package/dist/components/actions/dropdown/dropdown.js +176 -21
- package/dist/components/actions/rate/rate.js +55 -4
- package/dist/components/actions/switch/switch.js +39 -5
- package/dist/components/actions/toggle/toggle.js +33 -6
- package/dist/components/actions/upload/upload.js +167 -9
- package/dist/components/atoms/box/box.js +18 -4
- package/dist/components/atoms/hide/hide.js +18 -1
- package/dist/components/atoms/seconds_to_duration/seconds_to_duration.js +36 -1
- package/dist/components/atoms/time_ago/time_ago.js +39 -1
- package/dist/components/atoms/typography/display.js +18 -5
- package/dist/components/atoms/typography/heading.js +43 -6
- package/dist/components/atoms/typography/paragraph.js +20 -7
- package/dist/components/atoms/typography/typography.js +10 -3
- package/dist/components/card/action/action.js +41 -8
- package/dist/components/card/audio/audio.js +57 -7
- package/dist/components/card/card.js +33 -1
- package/dist/components/card/feature/feature.js +86 -14
- package/dist/components/card/meeting/meeting.js +102 -8
- package/dist/components/card/person/person.js +39 -6
- package/dist/components/card/price/price.js +49 -7
- package/dist/components/card/regular/regular.js +26 -5
- package/dist/components/card/styles.js +9 -2
- package/dist/components/card/video/video.js +57 -7
- package/dist/components/card/written/written.js +57 -7
- package/dist/components/custom/courses_selection/courses_selection.js +104 -12
- package/dist/components/custom/users_selection/users_selection.js +86 -12
- package/dist/components/editor/constants.js +195 -1
- package/dist/components/editor/context.js +17 -1
- package/dist/components/editor/editor.js +45 -5
- package/dist/components/editor/icons/border-all.js +12 -1
- package/dist/components/editor/icons/border-bottom.js +12 -1
- package/dist/components/editor/icons/border-left.js +12 -1
- package/dist/components/editor/icons/border-none.js +12 -1
- package/dist/components/editor/icons/border-right.js +12 -1
- package/dist/components/editor/icons/border-top.js +12 -1
- package/dist/components/editor/navbar/alignment_dropdown.js +106 -1
- package/dist/components/editor/navbar/button_modal.js +60 -3
- package/dist/components/editor/navbar/navbar.js +178 -7
- package/dist/components/editor/navbar/style_dropdown.js +74 -1
- package/dist/components/editor/plugins/blocks/blockquote.js +17 -1
- package/dist/components/editor/plugins/blocks/blocks.js +54 -1
- package/dist/components/editor/plugins/blocks/buttons.js +70 -8
- package/dist/components/editor/plugins/blocks/dropdown-menu.js +77 -1
- package/dist/components/editor/plugins/blocks/image.js +60 -1
- package/dist/components/editor/plugins/blocks/list.js +20 -2
- package/dist/components/editor/plugins/blocks/media-popover.js +41 -1
- package/dist/components/editor/plugins/blocks/plate-button.js +63 -1
- package/dist/components/editor/plugins/blocks/popover.js +38 -1
- package/dist/components/editor/plugins/blocks/qa.js +44 -3
- package/dist/components/editor/plugins/blocks/resizable.js +47 -1
- package/dist/components/editor/plugins/blocks/separator.js +43 -1
- package/dist/components/editor/plugins/blocks/table-cell.js +48 -1
- package/dist/components/editor/plugins/blocks/table-row.js +16 -1
- package/dist/components/editor/plugins/blocks/table.js +98 -1
- package/dist/components/editor/plugins/blocks/text.js +103 -1
- package/dist/components/editor/plugins/blocks/video.js +42 -1
- package/dist/components/editor/plugins/leafs/leafs.js +37 -1
- package/dist/components/editor/plugins/leafs/link.js +55 -4
- package/dist/components/editor/plugins/marks/marks.js +17 -1
- package/dist/components/editor/plugins/plate.js +43 -1
- package/dist/components/editor/plugins/utils/exitBreak.js +36 -1
- package/dist/components/editor/plugins/utils/resetBlockType.js +26 -1
- package/dist/components/editor/plugins/utils/selectOnBackspace.js +11 -1
- package/dist/components/editor/plugins/utils/softBreak.js +19 -1
- package/dist/components/editor/plugins/utils/utils.js +17 -1
- package/dist/components/editor/simple_editor/navbar.js +110 -4
- package/dist/components/editor/simple_editor/plugins.js +93 -1
- package/dist/components/editor/simple_editor/simple_editor.js +34 -3
- package/dist/components/editor/styles/menu_button.js +9 -3
- package/dist/components/feedback/animated_toast/animated_toast.js +32 -3
- package/dist/components/feedback/badge/badge.js +56 -7
- package/dist/components/feedback/banner/banner.js +60 -6
- package/dist/components/feedback/chip/chip.js +81 -8
- package/dist/components/feedback/loader/loader.js +33 -9
- package/dist/components/feedback/notification/notification.js +59 -6
- package/dist/components/feedback/progress/progress.js +76 -14
- package/dist/components/feedback/toast/toast.js +55 -7
- package/dist/components/feedback/tooltip/tooltip.js +34 -1
- package/dist/components/iconography/avatar/avatar.js +141 -22
- package/dist/components/iconography/avatar/icons/approved.js +14 -1
- package/dist/components/iconography/avatar/icons/busy.js +14 -1
- package/dist/components/iconography/avatar/icons/declined.js +14 -1
- package/dist/components/iconography/avatar/icons/default.js +13 -1
- package/dist/components/iconography/avatar/icons/focus.js +14 -1
- package/dist/components/iconography/avatar/icons/locked.js +14 -1
- package/dist/components/iconography/avatar/icons/offline.js +14 -1
- package/dist/components/iconography/avatar/icons/online.js +13 -1
- package/dist/components/iconography/avatar/icons/subscribed.js +18 -1
- package/dist/components/iconography/icon/icon.js +18 -3
- package/dist/components/input/calendar/calendar.js +139 -13
- package/dist/components/input/checkbox/checkbox.js +23 -5
- package/dist/components/input/date/date.js +241 -13
- package/dist/components/input/filter/filter.js +212 -13
- package/dist/components/input/filter/filter_option.js +50 -9
- package/dist/components/input/radio/radio.js +45 -7
- package/dist/components/input/search/search.js +83 -17
- package/dist/components/input/select/select.js +27 -6
- package/dist/components/input/text_area/text_area.js +60 -15
- package/dist/components/input/text_input/text_input.js +102 -21
- package/dist/components/input/time/time.js +47 -3
- package/dist/components/media/video/video.js +42 -1
- package/dist/components/media/video-player/playlist-item.js +37 -4
- package/dist/components/media/video-player/video.js +121 -13
- package/dist/components/navigation/breadcrumb/breadcrumb.js +66 -11
- package/dist/components/navigation/inner/inner.js +130 -14
- package/dist/components/navigation/tabs/tabs.js +101 -15
- package/dist/components/surfaces/accordion/accordion.js +46 -5
- package/dist/components/surfaces/calendar_date/calendar_date.js +39 -10
- package/dist/components/surfaces/carousel/card/card.js +55 -7
- package/dist/components/surfaces/comment/comment.js +152 -19
- package/dist/components/surfaces/comment/helpers.js +30 -1
- package/dist/components/surfaces/drawer/drawer.js +75 -7
- package/dist/components/surfaces/message/message.js +39 -4
- package/dist/components/surfaces/modal/modal.js +99 -8
- package/dist/components/surfaces/portal/portal.js +35 -1
- package/dist/components/surfaces/post/post.js +161 -19
- package/dist/components/table/table/table.js +120 -29
- package/dist/emoji/emojis.json.js +36331 -1
- package/dist/icons/arrow/arrow_all.js +15 -1
- package/dist/icons/arrow/arrow_all_diagonal.js +15 -1
- package/dist/icons/arrow/arrow_both_downwards.js +15 -1
- package/dist/icons/arrow/arrow_both_upwards.js +15 -1
- package/dist/icons/arrow/arrow_circle_left.js +15 -1
- package/dist/icons/arrow/arrow_circle_left_double.js +15 -1
- package/dist/icons/arrow/arrow_circle_left_double_alert.js +17 -1
- package/dist/icons/arrow/arrow_circle_right.js +15 -1
- package/dist/icons/arrow/arrow_circle_right_double.js +15 -1
- package/dist/icons/arrow/arrow_circle_right_double_alert.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_down_left.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_down_left_circle.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_down_right.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_down_right_circle.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_up_left.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_up_left_circle.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_up_right.js +15 -1
- package/dist/icons/arrow/arrow_diagonal_up_right_circle.js +15 -1
- package/dist/icons/arrow/arrow_down.js +15 -1
- package/dist/icons/arrow/arrow_down_bold.js +15 -1
- package/dist/icons/arrow/arrow_down_circle.js +15 -1
- package/dist/icons/arrow/arrow_left.js +15 -1
- package/dist/icons/arrow/arrow_left_bold.js +15 -1
- package/dist/icons/arrow/arrow_left_circle.js +15 -1
- package/dist/icons/arrow/arrow_left_curved.js +15 -1
- package/dist/icons/arrow/arrow_left_curved_circle.js +15 -1
- package/dist/icons/arrow/arrow_right.js +15 -1
- package/dist/icons/arrow/arrow_right_bold.js +15 -1
- package/dist/icons/arrow/arrow_right_circle.js +15 -1
- package/dist/icons/arrow/arrow_right_curved.js +15 -1
- package/dist/icons/arrow/arrow_right_curved_circle.js +15 -1
- package/dist/icons/arrow/arrow_up.js +15 -1
- package/dist/icons/arrow/arrow_up_bold.js +15 -1
- package/dist/icons/arrow/arrow_up_circle.js +15 -1
- package/dist/icons/arrow/chevron_down.js +15 -1
- package/dist/icons/arrow/chevron_down_circle.js +15 -1
- package/dist/icons/arrow/chevron_down_double.js +15 -1
- package/dist/icons/arrow/chevron_down_double_circle.js +15 -1
- package/dist/icons/arrow/chevron_left.js +15 -1
- package/dist/icons/arrow/chevron_left_circle.js +15 -1
- package/dist/icons/arrow/chevron_left_double.js +15 -1
- package/dist/icons/arrow/chevron_left_double_circle.js +15 -1
- package/dist/icons/arrow/chevron_right.js +15 -1
- package/dist/icons/arrow/chevron_right_circle.js +15 -1
- package/dist/icons/arrow/chevron_right_double.js +15 -1
- package/dist/icons/arrow/chevron_right_double_circle.js +15 -1
- package/dist/icons/arrow/chevron_scroll.js +15 -1
- package/dist/icons/arrow/chevron_up.js +15 -1
- package/dist/icons/arrow/chevron_up_circle.js +15 -1
- package/dist/icons/arrow/chevron_up_double.js +15 -1
- package/dist/icons/arrow/chevron_up_double_circle.js +15 -1
- package/dist/icons/arrow/forward_all.js +15 -1
- package/dist/icons/arrow/forward_all_bold.js +15 -1
- package/dist/icons/arrow/forward_bold.js +15 -1
- package/dist/icons/arrow/redo.js +15 -1
- package/dist/icons/arrow/redo_bold.js +15 -1
- package/dist/icons/arrow/reply.js +15 -1
- package/dist/icons/arrow/reply_all.js +15 -1
- package/dist/icons/arrow/reply_all_bold.js +15 -1
- package/dist/icons/arrow/reply_bold.js +15 -1
- package/dist/icons/arrow/undo.js +15 -1
- package/dist/icons/arrow/undo_bold.js +15 -1
- package/dist/icons/audio_video/drag_indicator.js +15 -1
- package/dist/icons/audio_video/eject.js +15 -1
- package/dist/icons/audio_video/equalizer.js +15 -1
- package/dist/icons/audio_video/fast_forward.js +15 -1
- package/dist/icons/audio_video/fast_forward_30.js +15 -1
- package/dist/icons/audio_video/fullscreen.js +15 -1
- package/dist/icons/audio_video/headphones.js +15 -1
- package/dist/icons/audio_video/library_add.js +15 -1
- package/dist/icons/audio_video/library_music.js +15 -1
- package/dist/icons/audio_video/microphone.js +15 -1
- package/dist/icons/audio_video/musical_note.js +15 -1
- package/dist/icons/audio_video/next.js +15 -1
- package/dist/icons/audio_video/pause.js +15 -1
- package/dist/icons/audio_video/pause_circle.js +15 -1
- package/dist/icons/audio_video/play.js +15 -1
- package/dist/icons/audio_video/play_circle.js +15 -1
- package/dist/icons/audio_video/play_display.js +15 -1
- package/dist/icons/audio_video/play_pause.js +15 -1
- package/dist/icons/audio_video/play_solid.js +15 -1
- package/dist/icons/audio_video/player_list.js +15 -1
- package/dist/icons/audio_video/player_list_add.js +15 -1
- package/dist/icons/audio_video/player_list_play.js +15 -1
- package/dist/icons/audio_video/previous.js +15 -1
- package/dist/icons/audio_video/radio.js +15 -1
- package/dist/icons/audio_video/record.js +15 -1
- package/dist/icons/audio_video/repeat.js +15 -1
- package/dist/icons/audio_video/rewind.js +15 -1
- package/dist/icons/audio_video/rewind_30.js +15 -1
- package/dist/icons/audio_video/shuffle.js +15 -1
- package/dist/icons/audio_video/sound_wave.js +15 -1
- package/dist/icons/audio_video/stop.js +15 -1
- package/dist/icons/audio_video/stop_circle.js +15 -1
- package/dist/icons/audio_video/subscriptions.js +15 -1
- package/dist/icons/audio_video/tuner.js +15 -1
- package/dist/icons/audio_video/volume.js +15 -1
- package/dist/icons/audio_video/volume_high.js +15 -1
- package/dist/icons/audio_video/volume_low.js +15 -1
- package/dist/icons/audio_video/volume_slash.js +15 -1
- package/dist/icons/basic/aa_sansserif.js +16 -1
- package/dist/icons/basic/aa_serif.js +16 -1
- package/dist/icons/basic/anchor.js +17 -1
- package/dist/icons/basic/bible.js +15 -1
- package/dist/icons/basic/bold.js +15 -1
- package/dist/icons/basic/book.js +15 -1
- package/dist/icons/basic/book_open.js +15 -1
- package/dist/icons/basic/bookmark.js +15 -1
- package/dist/icons/basic/bookmark_add.js +15 -1
- package/dist/icons/basic/bookmark_slash.js +15 -1
- package/dist/icons/basic/bookmarks.js +15 -1
- package/dist/icons/basic/books.js +18 -1
- package/dist/icons/basic/box.js +15 -1
- package/dist/icons/basic/briefcase.js +15 -1
- package/dist/icons/basic/browse_activity.js +15 -1
- package/dist/icons/basic/browser.js +15 -1
- package/dist/icons/basic/browser_slash.js +15 -1
- package/dist/icons/basic/calculator.js +15 -1
- package/dist/icons/basic/camera.js +15 -1
- package/dist/icons/basic/camera_add.js +15 -1
- package/dist/icons/basic/camera_slash.js +15 -1
- package/dist/icons/basic/checkmark.js +15 -1
- package/dist/icons/basic/checkmark_circle.js +17 -1
- package/dist/icons/basic/checkmark_filled.js +15 -1
- package/dist/icons/basic/checkmarks.js +15 -1
- package/dist/icons/basic/circle.js +15 -1
- package/dist/icons/basic/circle_slash.js +17 -1
- package/dist/icons/basic/clear_text_style.js +15 -1
- package/dist/icons/basic/close.js +15 -1
- package/dist/icons/basic/close_circle.js +15 -1
- package/dist/icons/basic/close_filled.js +15 -1
- package/dist/icons/basic/copy.js +15 -1
- package/dist/icons/basic/delete.js +15 -1
- package/dist/icons/basic/detail.js +15 -1
- package/dist/icons/basic/dot.js +15 -1
- package/dist/icons/basic/download.js +15 -1
- package/dist/icons/basic/download_arrow.js +15 -1
- package/dist/icons/basic/droplet.js +17 -1
- package/dist/icons/basic/ellipsis_horizontal.js +15 -1
- package/dist/icons/basic/ellipsis_horizontal_circle.js +15 -1
- package/dist/icons/basic/ellipsis_vertical.js +15 -1
- package/dist/icons/basic/ellipsis_vertical_circle.js +15 -1
- package/dist/icons/basic/eye.js +15 -1
- package/dist/icons/basic/eye_slash.js +15 -1
- package/dist/icons/basic/fingerprint.js +15 -1
- package/dist/icons/basic/flag.js +15 -1
- package/dist/icons/basic/flag_wave.js +15 -1
- package/dist/icons/basic/flag_wave_filled.js +15 -1
- package/dist/icons/basic/flame.js +15 -1
- package/dist/icons/basic/gauge.js +15 -1
- package/dist/icons/basic/glasses.js +15 -1
- package/dist/icons/basic/graduation_cap.js +15 -1
- package/dist/icons/basic/hashmark.js +15 -1
- package/dist/icons/basic/heart.js +15 -1
- package/dist/icons/basic/heart_slash.js +15 -1
- package/dist/icons/basic/highlighter.js +15 -1
- package/dist/icons/basic/home.js +15 -1
- package/dist/icons/basic/image.js +15 -1
- package/dist/icons/basic/inbox.js +15 -1
- package/dist/icons/basic/italic.js +15 -1
- package/dist/icons/basic/layers.js +15 -1
- package/dist/icons/basic/lightening.js +15 -1
- package/dist/icons/basic/lightening_slash.js +15 -1
- package/dist/icons/basic/link.js +15 -1
- package/dist/icons/basic/link_slash.js +15 -1
- package/dist/icons/basic/loudspeaker.js +15 -1
- package/dist/icons/basic/maximize.js +15 -1
- package/dist/icons/basic/menu.js +15 -1
- package/dist/icons/basic/menu_circle.js +15 -1
- package/dist/icons/basic/menu_dots.js +15 -1
- package/dist/icons/basic/microphone_slash.js +15 -1
- package/dist/icons/basic/minimize.js +15 -1
- package/dist/icons/basic/minus.js +15 -1
- package/dist/icons/basic/minus_circle.js +15 -1
- package/dist/icons/basic/move_item.js +15 -1
- package/dist/icons/basic/new.js +15 -1
- package/dist/icons/basic/newspaper.js +15 -1
- package/dist/icons/basic/node.js +15 -1
- package/dist/icons/basic/note_pad.js +16 -1
- package/dist/icons/basic/options.js +15 -1
- package/dist/icons/basic/paint_brush.js +15 -1
- package/dist/icons/basic/paperclip.js +15 -1
- package/dist/icons/basic/paperclip_slash.js +15 -1
- package/dist/icons/basic/pencil.js +15 -1
- package/dist/icons/basic/pencil_pad.js +15 -1
- package/dist/icons/basic/plus.js +15 -1
- package/dist/icons/basic/plus_circle.js +15 -1
- package/dist/icons/basic/presentation.js +15 -1
- package/dist/icons/basic/printer.js +15 -1
- package/dist/icons/basic/profile.js +15 -1
- package/dist/icons/basic/profile_check.js +15 -1
- package/dist/icons/basic/pulse.js +15 -1
- package/dist/icons/basic/qr_code.js +15 -1
- package/dist/icons/basic/resize.js +17 -1
- package/dist/icons/basic/scan.js +15 -1
- package/dist/icons/basic/scissors.js +15 -1
- package/dist/icons/basic/screenshot.js +15 -1
- package/dist/icons/basic/search.js +15 -1
- package/dist/icons/basic/select_item.js +16 -1
- package/dist/icons/basic/settings.js +15 -1
- package/dist/icons/basic/share.js +15 -1
- package/dist/icons/basic/share_external.js +15 -1
- package/dist/icons/basic/square.js +15 -1
- package/dist/icons/basic/star.js +15 -1
- package/dist/icons/basic/star_circle.js +15 -1
- package/dist/icons/basic/star_filled.js +15 -1
- package/dist/icons/basic/star_filled_half.js +15 -1
- package/dist/icons/basic/star_slash.js +15 -1
- package/dist/icons/basic/sticker.js +15 -1
- package/dist/icons/basic/strikethrough.js +15 -1
- package/dist/icons/basic/subtask.js +16 -1
- package/dist/icons/basic/tax.js +18 -1
- package/dist/icons/basic/text_bg_color.js +15 -1
- package/dist/icons/basic/text_color.js +15 -1
- package/dist/icons/basic/textbox.js +15 -1
- package/dist/icons/basic/thumbs_down.js +15 -1
- package/dist/icons/basic/thumbs_up.js +15 -1
- package/dist/icons/basic/thumbs_up_filled.js +15 -1
- package/dist/icons/basic/toggle_left.js +15 -1
- package/dist/icons/basic/toggle_right.js +15 -1
- package/dist/icons/basic/translate.js +15 -1
- package/dist/icons/basic/trash.js +15 -1
- package/dist/icons/basic/trash_slash.js +15 -1
- package/dist/icons/basic/underline.js +15 -1
- package/dist/icons/basic/upload.js +15 -1
- package/dist/icons/basic/video.js +15 -1
- package/dist/icons/basic/video_add.js +16 -1
- package/dist/icons/basic/video_slash.js +15 -1
- package/dist/icons/basic/wrench.js +15 -1
- package/dist/icons/basic/zoom_in.js +15 -1
- package/dist/icons/basic/zoom_out.js +15 -1
- package/dist/icons/data/bar_chart.js +15 -1
- package/dist/icons/data/bar_chart_downward.js +15 -1
- package/dist/icons/data/bar_chart_downward_outline.js +15 -1
- package/dist/icons/data/bar_chart_upward.js +15 -1
- package/dist/icons/data/bar_chart_upward_outline.js +15 -1
- package/dist/icons/data/candlestick_chart.js +15 -1
- package/dist/icons/data/four_circles.js +15 -1
- package/dist/icons/data/legend_toggle.js +15 -1
- package/dist/icons/data/line_chart.js +15 -1
- package/dist/icons/data/line_chart_area.js +15 -1
- package/dist/icons/data/line_chart_area_shaded.js +15 -1
- package/dist/icons/data/line_chart_double.js +15 -1
- package/dist/icons/data/line_chart_downward.js +15 -1
- package/dist/icons/data/line_chart_node.js +15 -1
- package/dist/icons/data/line_chart_outline.js +15 -1
- package/dist/icons/data/line_chart_search.js +15 -1
- package/dist/icons/data/line_chart_stars.js +15 -1
- package/dist/icons/data/line_chart_upward.js +15 -1
- package/dist/icons/data/pie_chart.js +16 -1
- package/dist/icons/data/tree.js +15 -1
- package/dist/icons/email/mail.js +15 -1
- package/dist/icons/email/mail_check.js +15 -1
- package/dist/icons/email/mail_minus.js +15 -1
- package/dist/icons/email/mail_send.js +15 -1
- package/dist/icons/email/send.js +15 -1
- package/dist/icons/email/send_close.js +15 -1
- package/dist/icons/email/send_schedule.js +15 -1
- package/dist/icons/email/send_text.js +15 -1
- package/dist/icons/emoji/emoji_add.js +15 -1
- package/dist/icons/emoji/laughing.js +15 -1
- package/dist/icons/emoji/neutral.js +15 -1
- package/dist/icons/emoji/sad.js +15 -1
- package/dist/icons/emoji/shocked.js +15 -1
- package/dist/icons/emoji/smile.js +15 -1
- package/dist/icons/file/clipboard.js +15 -1
- package/dist/icons/file/clipboard_check.js +15 -1
- package/dist/icons/file/clipboard_close.js +15 -1
- package/dist/icons/file/clipboard_minus.js +15 -1
- package/dist/icons/file/clipboard_plus.js +15 -1
- package/dist/icons/file/clipboard_text.js +15 -1
- package/dist/icons/file/file.js +15 -1
- package/dist/icons/file/file_add.js +15 -1
- package/dist/icons/file/file_check.js +15 -1
- package/dist/icons/file/file_close.js +15 -1
- package/dist/icons/file/file_code.js +15 -1
- package/dist/icons/file/file_download.js +15 -1
- package/dist/icons/file/file_draft.js +15 -1
- package/dist/icons/file/file_gear.js +16 -1
- package/dist/icons/file/file_minus.js +15 -1
- package/dist/icons/file/file_plus.js +15 -1
- package/dist/icons/file/file_scan.js +15 -1
- package/dist/icons/file/file_shred.js +15 -1
- package/dist/icons/file/file_text.js +15 -1
- package/dist/icons/file/file_upload.js +15 -1
- package/dist/icons/file/folder.js +15 -1
- package/dist/icons/file/folder_add.js +15 -1
- package/dist/icons/file/folder_arrow.js +15 -1
- package/dist/icons/file/folder_check.js +15 -1
- package/dist/icons/file/folder_close.js +15 -1
- package/dist/icons/file/folder_cloud.js +15 -1
- package/dist/icons/file/folder_gear.js +16 -1
- package/dist/icons/file/folder_minus.js +15 -1
- package/dist/icons/file/folder_music.js +15 -1
- package/dist/icons/file/folder_open.js +15 -1
- package/dist/icons/file/folder_plus.js +15 -1
- package/dist/icons/file/folder_zip.js +15 -1
- package/dist/icons/file/note.js +15 -1
- package/dist/icons/file/note_text.js +15 -1
- package/dist/icons/file/pdf.js +15 -1
- package/dist/icons/file/photo.js +15 -1
- package/dist/icons/finance/bitcoin.js +15 -1
- package/dist/icons/finance/coins.js +19 -1
- package/dist/icons/finance/credit_card.js +15 -1
- package/dist/icons/finance/credit_card_add.js +15 -1
- package/dist/icons/finance/credit_card_face.js +15 -1
- package/dist/icons/finance/credit_card_member.js +15 -1
- package/dist/icons/finance/credit_card_outcome.js +15 -1
- package/dist/icons/finance/credit_card_scan.js +15 -1
- package/dist/icons/finance/credit_card_share.js +15 -1
- package/dist/icons/finance/credit_card_slash.js +15 -1
- package/dist/icons/finance/currency_exchange.js +15 -1
- package/dist/icons/finance/dollar.js +15 -1
- package/dist/icons/finance/ethereum.js +15 -1
- package/dist/icons/finance/paypass.js +15 -1
- package/dist/icons/finance/strongbox.js +15 -1
- package/dist/icons/finance/wallet.js +15 -1
- package/dist/icons/index.js +1095 -1
- package/dist/icons/layout/block_align_bottom.js +15 -1
- package/dist/icons/layout/block_align_center.js +15 -1
- package/dist/icons/layout/block_align_left.js +15 -1
- package/dist/icons/layout/block_align_middle.js +15 -1
- package/dist/icons/layout/block_align_right.js +15 -1
- package/dist/icons/layout/block_align_top.js +15 -1
- package/dist/icons/layout/block_horizontal.js +15 -1
- package/dist/icons/layout/block_vertical.js +15 -1
- package/dist/icons/layout/edit_shape.js +15 -1
- package/dist/icons/layout/elements.js +15 -1
- package/dist/icons/layout/elements_add.js +15 -1
- package/dist/icons/layout/elements_filled.js +15 -1
- package/dist/icons/layout/elements_masonry.js +15 -1
- package/dist/icons/layout/frame.js +15 -1
- package/dist/icons/layout/frame_stack.js +15 -1
- package/dist/icons/layout/grid.js +15 -1
- package/dist/icons/layout/grid_column_three.js +15 -1
- package/dist/icons/layout/grid_column_two.js +15 -1
- package/dist/icons/layout/grid_dynamic.js +15 -1
- package/dist/icons/layout/grid_frame.js +15 -1
- package/dist/icons/layout/grid_row_three.js +15 -1
- package/dist/icons/layout/grid_row_two.js +15 -1
- package/dist/icons/layout/grid_six.js +15 -1
- package/dist/icons/layout/grid_small.js +15 -1
- package/dist/icons/layout/iframe.js +15 -1
- package/dist/icons/layout/kanban.js +15 -1
- package/dist/icons/layout/layout.js +15 -1
- package/dist/icons/layout/list.js +15 -1
- package/dist/icons/layout/list_filled.js +20 -1
- package/dist/icons/layout/padding.js +15 -1
- package/dist/icons/layout/page_break.js +15 -1
- package/dist/icons/layout/rotate_left.js +15 -1
- package/dist/icons/layout/rotate_right.js +15 -1
- package/dist/icons/layout/ruler.js +15 -1
- package/dist/icons/layout/segment.js +15 -1
- package/dist/icons/layout/select_area.js +15 -1
- package/dist/icons/layout/select_boundary.js +15 -1
- package/dist/icons/layout/sidebar_left.js +15 -1
- package/dist/icons/layout/sidebar_right.js +15 -1
- package/dist/icons/layout/slides.js +15 -1
- package/dist/icons/layout/slides_horizontal.js +15 -1
- package/dist/icons/layout/slides_vertical.js +20 -1
- package/dist/icons/layout/stack.js +15 -1
- package/dist/icons/layout/text.js +15 -1
- package/dist/icons/maps/atlas.js +15 -1
- package/dist/icons/maps/compass.js +15 -1
- package/dist/icons/maps/direction.js +15 -1
- package/dist/icons/maps/direction_angled.js +15 -1
- package/dist/icons/maps/globe.js +15 -1
- package/dist/icons/maps/globe_slash.js +15 -1
- package/dist/icons/maps/location.js +15 -1
- package/dist/icons/maps/location_slash.js +15 -1
- package/dist/icons/maps/map.js +15 -1
- package/dist/icons/maps/marker.js +15 -1
- package/dist/icons/maps/panorama.js +15 -1
- package/dist/icons/maps/pin.js +15 -1
- package/dist/icons/maps/pin_arrow.js +15 -1
- package/dist/icons/maps/pin_location.js +15 -1
- package/dist/icons/maps/pin_plus.js +15 -1
- package/dist/icons/maps/pin_question.js +15 -1
- package/dist/icons/maps/pin_slash.js +15 -1
- package/dist/icons/maps/push_pin.js +15 -1
- package/dist/icons/maps/push_pin_filled.js +15 -1
- package/dist/icons/maps/push_pin_slash.js +15 -1
- package/dist/icons/maps/radar.js +15 -1
- package/dist/icons/maps/route.js +15 -1
- package/dist/icons/message/bubble.js +15 -1
- package/dist/icons/message/bubble_question.js +15 -1
- package/dist/icons/message/comment.js +15 -1
- package/dist/icons/message/comment_add.js +15 -1
- package/dist/icons/message/comment_check.js +15 -1
- package/dist/icons/message/comment_close.js +15 -1
- package/dist/icons/message/comment_minus.js +15 -1
- package/dist/icons/message/comment_text.js +15 -1
- package/dist/icons/misc/advertisement.js +15 -1
- package/dist/icons/misc/atom.js +15 -1
- package/dist/icons/misc/bone.js +15 -1
- package/dist/icons/misc/brightness_high.js +15 -1
- package/dist/icons/misc/brightness_low.js +15 -1
- package/dist/icons/misc/contrast.js +15 -1
- package/dist/icons/misc/crosshairs.js +15 -1
- package/dist/icons/misc/crown.js +15 -1
- package/dist/icons/misc/footprint.js +15 -1
- package/dist/icons/misc/form.js +15 -1
- package/dist/icons/misc/funnel.js +15 -1
- package/dist/icons/misc/infinite.js +15 -1
- package/dist/icons/misc/insert_button.js +15 -1
- package/dist/icons/misc/light_bulb.js +15 -1
- package/dist/icons/misc/moon.js +15 -1
- package/dist/icons/misc/nut.js +15 -1
- package/dist/icons/misc/planet.js +15 -1
- package/dist/icons/misc/plus_thick.js +15 -1
- package/dist/icons/misc/pocket.js +15 -1
- package/dist/icons/misc/rocket.js +15 -1
- package/dist/icons/misc/soup.js +19 -1
- package/dist/icons/misc/sun.js +15 -1
- package/dist/icons/misc/toy_horse.js +15 -1
- package/dist/icons/misc/trophy.js +15 -1
- package/dist/icons/misc/watercloset.js +15 -1
- package/dist/icons/notifications/alert_circle.js +15 -1
- package/dist/icons/notifications/alert_octogon.js +15 -1
- package/dist/icons/notifications/alert_triangle.js +15 -1
- package/dist/icons/notifications/app_notification.js +15 -1
- package/dist/icons/notifications/bell.js +15 -1
- package/dist/icons/notifications/bell_alert.js +15 -1
- package/dist/icons/notifications/bell_checkmark.js +15 -1
- package/dist/icons/notifications/bell_minus.js +15 -1
- package/dist/icons/notifications/bell_plus.js +15 -1
- package/dist/icons/notifications/bell_ring.js +17 -1
- package/dist/icons/notifications/bell_slash.js +15 -1
- package/dist/icons/notifications/information.js +15 -1
- package/dist/icons/notifications/minus_octogon.js +15 -1
- package/dist/icons/notifications/question_circle.js +15 -1
- package/dist/icons/people/group.js +15 -1
- package/dist/icons/people/group_add.js +15 -1
- package/dist/icons/people/group_chat.js +17 -1
- package/dist/icons/people/group_remove.js +15 -1
- package/dist/icons/people/group_send.js +16 -1
- package/dist/icons/people/groups.js +15 -1
- package/dist/icons/people/person.js +15 -1
- package/dist/icons/people/person_add.js +15 -1
- package/dist/icons/people/person_checkmark.js +15 -1
- package/dist/icons/people/person_circle.js +17 -1
- package/dist/icons/people/person_close.js +17 -1
- package/dist/icons/people/person_remove.js +15 -1
- package/dist/icons/people/person_slash.js +17 -1
- package/dist/icons/phone/keypad.js +15 -1
- package/dist/icons/phone/phone.js +15 -1
- package/dist/icons/phone/phone_add.js +15 -1
- package/dist/icons/phone/phone_calling.js +15 -1
- package/dist/icons/phone/phone_check.js +15 -1
- package/dist/icons/phone/phone_close.js +15 -1
- package/dist/icons/phone/phone_decline.js +15 -1
- package/dist/icons/phone/phone_forwarded.js +15 -1
- package/dist/icons/phone/phone_hash.js +15 -1
- package/dist/icons/phone/phone_incoming.js +15 -1
- package/dist/icons/phone/phone_outgoing.js +15 -1
- package/dist/icons/phone/phone_pause.js +15 -1
- package/dist/icons/phone/phone_slash.js +15 -1
- package/dist/icons/phone/voicemail.js +15 -1
- package/dist/icons/security/key.js +15 -1
- package/dist/icons/security/key_slash.js +15 -1
- package/dist/icons/security/lock.js +15 -1
- package/dist/icons/security/lock_circle.js +15 -1
- package/dist/icons/security/lock_open.js +15 -1
- package/dist/icons/security/lock_slash.js +15 -1
- package/dist/icons/security/shield.js +15 -1
- package/dist/icons/security/shield_checkmark.js +15 -1
- package/dist/icons/security/shield_lock.js +15 -1
- package/dist/icons/security/shield_slash.js +15 -1
- package/dist/icons/security/verified.js +15 -1
- package/dist/icons/shopping/basket.js +15 -1
- package/dist/icons/shopping/cart.js +15 -1
- package/dist/icons/shopping/cart_filled.js +15 -1
- package/dist/icons/shopping/coupon.js +15 -1
- package/dist/icons/shopping/coupon_cut.js +15 -1
- package/dist/icons/shopping/delivery.js +15 -1
- package/dist/icons/shopping/discount.js +15 -1
- package/dist/icons/shopping/gift.js +15 -1
- package/dist/icons/shopping/gift_bag.js +15 -1
- package/dist/icons/shopping/inventory.js +15 -1
- package/dist/icons/shopping/point_of_sale.js +15 -1
- package/dist/icons/shopping/shirt.js +15 -1
- package/dist/icons/shopping/tag.js +15 -1
- package/dist/icons/shopping/tag_diagonal.js +15 -1
- package/dist/icons/shopping/tote.js +15 -1
- package/dist/icons/special/upload_audio.js +20 -1
- package/dist/icons/special/upload_file.js +15 -1
- package/dist/icons/special/upload_image.js +17 -1
- package/dist/icons/special/upload_video.js +18 -1
- package/dist/icons/symbols/at.js +15 -1
- package/dist/icons/symbols/cc.js +15 -1
- package/dist/icons/symbols/cmd.js +15 -1
- package/dist/icons/symbols/facebook.js +15 -1
- package/dist/icons/symbols/google.js +18 -1
- package/dist/icons/symbols/hash.js +15 -1
- package/dist/icons/symbols/instagram.js +27 -1
- package/dist/icons/symbols/messenger.js +21 -1
- package/dist/icons/symbols/twitter.js +15 -1
- package/dist/icons/technology/battery.js +15 -1
- package/dist/icons/technology/battery_100.js +15 -1
- package/dist/icons/technology/battery_20.js +15 -1
- package/dist/icons/technology/battery_40.js +15 -1
- package/dist/icons/technology/battery_60.js +15 -1
- package/dist/icons/technology/battery_80.js +15 -1
- package/dist/icons/technology/battery_charging.js +15 -1
- package/dist/icons/technology/battery_slash.js +15 -1
- package/dist/icons/technology/devices.js +15 -1
- package/dist/icons/technology/floppy_disk.js +15 -1
- package/dist/icons/technology/iphone.js +15 -1
- package/dist/icons/technology/laptop.js +15 -1
- package/dist/icons/technology/mobile.js +15 -1
- package/dist/icons/technology/monitor.js +15 -1
- package/dist/icons/technology/server.js +15 -1
- package/dist/icons/technology/sim_card.js +15 -1
- package/dist/icons/technology/usb_stick.js +15 -1
- package/dist/icons/text/align_center.js +15 -1
- package/dist/icons/text/align_justified.js +15 -1
- package/dist/icons/text/align_left.js +15 -1
- package/dist/icons/text/align_right.js +15 -1
- package/dist/icons/text/code_block.js +15 -1
- package/dist/icons/text/divider.js +15 -1
- package/dist/icons/text/footnote.js +17 -1
- package/dist/icons/text/indent_decrease.js +15 -1
- package/dist/icons/text/indent_increase.js +15 -1
- package/dist/icons/text/list_ordered.js +15 -1
- package/dist/icons/text/list_unordered.js +15 -1
- package/dist/icons/text/quote.js +15 -1
- package/dist/icons/text/table.js +15 -1
- package/dist/icons/time/alarm.js +15 -1
- package/dist/icons/time/alarm_checkmark.js +15 -1
- package/dist/icons/time/alarm_minus.js +15 -1
- package/dist/icons/time/alarm_plus.js +15 -1
- package/dist/icons/time/alarm_slash.js +15 -1
- package/dist/icons/time/alarm_snooze.js +15 -1
- package/dist/icons/time/calendar.js +15 -1
- package/dist/icons/time/calendar_add.js +15 -1
- package/dist/icons/time/calendar_checkmark.js +15 -1
- package/dist/icons/time/calendar_close.js +15 -1
- package/dist/icons/time/calendar_dates.js +15 -1
- package/dist/icons/time/calendar_minus.js +15 -1
- package/dist/icons/time/calendar_plus.js +15 -1
- package/dist/icons/time/calendar_scroll.js +17 -1
- package/dist/icons/time/clock.js +15 -1
- package/dist/icons/time/clock_history.js +15 -1
- package/dist/icons/time/stopwatch.js +15 -1
- package/dist/icons/time/timer.js +15 -1
- package/dist/icons/time/watch.js +15 -1
- package/dist/index.js +117 -1
- package/dist/utils/date.js +73 -1
- package/dist/utils/function.js +5 -1
- package/package.json +2 -4
- package/dist/styles/output.css +0 -1776
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var Link = require('next/link');
|
|
7
|
+
var paragraph = require('../../atoms/typography/paragraph.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
|
+
var Link__default = /*#__PURE__*/_interopDefaultCompat(Link);
|
|
13
|
+
|
|
14
|
+
const colorLookup = {
|
|
15
|
+
blue: {
|
|
16
|
+
bg: 'var(--color-hue-blue-2)',
|
|
17
|
+
icon: 'var(--color-hue-blue-1)',
|
|
18
|
+
},
|
|
19
|
+
green: {
|
|
20
|
+
bg: 'var(--color-green-8)',
|
|
21
|
+
icon: 'var(--color-green-2)',
|
|
22
|
+
},
|
|
23
|
+
grey: {
|
|
24
|
+
bg: 'var(--color-grey-9)',
|
|
25
|
+
icon: 'var(--color-grey-7)',
|
|
26
|
+
},
|
|
27
|
+
mint: {
|
|
28
|
+
bg: 'var(--color-hue-mint-2)',
|
|
29
|
+
icon: 'var(--color-hue-mint-1)',
|
|
30
|
+
},
|
|
31
|
+
ocean: {
|
|
32
|
+
bg: 'var(--color-hue-ocean-2)',
|
|
33
|
+
icon: 'var(--color-hue-ocean-1)',
|
|
34
|
+
},
|
|
35
|
+
orange: {
|
|
36
|
+
bg: 'var(--color-hue-orange-2)',
|
|
37
|
+
icon: 'var(--color-hue-orange-1)',
|
|
38
|
+
},
|
|
39
|
+
pink: {
|
|
40
|
+
bg: 'var(--color-hue-pink-2)',
|
|
41
|
+
icon: 'var(--color-hue-pink-1)',
|
|
42
|
+
},
|
|
43
|
+
purple: {
|
|
44
|
+
bg: 'var(--color-hue-purple-2)',
|
|
45
|
+
icon: 'var(--color-hue-purple-1)',
|
|
46
|
+
},
|
|
47
|
+
red: {
|
|
48
|
+
bg: 'var(--color-red-9)',
|
|
49
|
+
icon: 'var(--color-red-3)',
|
|
50
|
+
},
|
|
51
|
+
yellow: {
|
|
52
|
+
bg: 'var(--color-yellow-8)',
|
|
53
|
+
icon: 'var(--color-yellow-3)',
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
const Tabs = ({ activeIndex, items, onChange, size = 'large', sx, }) => {
|
|
57
|
+
const id = React__default.default.useId();
|
|
58
|
+
return (React__default.default.createElement(Wrapper, { "$sx": sx }, items.map((item, index) => (React__default.default.createElement(Item, { active: activeIndex === index, color: item?.color, disabled: item?.disabled, href: item?.href, icon: item?.icon, key: id + index.toString(36), label: item.label, onClick: () => onChange && onChange(index), size: size })))));
|
|
59
|
+
};
|
|
60
|
+
const Wrapper = styled.styled.div `
|
|
3
61
|
display: flex;
|
|
4
62
|
flex-flow: row nowrap;
|
|
5
63
|
align-items: flex-end;
|
|
@@ -12,8 +70,19 @@
|
|
|
12
70
|
text-decoration: none;
|
|
13
71
|
}
|
|
14
72
|
|
|
15
|
-
${({$sx
|
|
16
|
-
|
|
73
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
74
|
+
`;
|
|
75
|
+
const Item = ({ active, color, disabled, href, icon, label, onClick, size = 'large', }) => {
|
|
76
|
+
const inputColor = disabled ? 'grey' : color ? color : 'blue';
|
|
77
|
+
const iconColor = colorLookup[inputColor].icon;
|
|
78
|
+
const bgColor = colorLookup[inputColor].bg;
|
|
79
|
+
const fontSize = size === 'large' ? 16 : size === 'medium' ? 14 : 12;
|
|
80
|
+
const lineHeight = size === 'large' ? 24 : size === 'medium' ? 20 : 16;
|
|
81
|
+
return (React__default.default.createElement(Element, { onClick: !disabled && onClick ? onClick : undefined, href: href || '#', scroll: false, "$active": active, "$color": iconColor, "$disabled": disabled, "$hasIcon": !!icon, "$size": size },
|
|
82
|
+
icon && React__default.default.createElement(IconWrapper, { "$bg": bgColor }, icon),
|
|
83
|
+
React__default.default.createElement(paragraph.P, { "$fontSize": fontSize, "$lineHeight": lineHeight, "$semiBold": true }, label)));
|
|
84
|
+
};
|
|
85
|
+
const Element = styled.styled(Link__default.default) `
|
|
17
86
|
position: relative;
|
|
18
87
|
display: flex;
|
|
19
88
|
align-items: center;
|
|
@@ -21,20 +90,30 @@
|
|
|
21
90
|
cursor: pointer;
|
|
22
91
|
user-select: none;
|
|
23
92
|
|
|
24
|
-
${({$size
|
|
93
|
+
${({ $size, $hasIcon }) => $hasIcon
|
|
94
|
+
? 'padding: 16px 12px;'
|
|
95
|
+
: $size === 'small'
|
|
96
|
+
? 'padding: 10px 8px;'
|
|
97
|
+
: $size === 'medium'
|
|
98
|
+
? 'padding: 14px 10px;'
|
|
99
|
+
: 'padding: 22px 12px;'}
|
|
25
100
|
|
|
26
|
-
${({$hasIcon
|
|
101
|
+
${({ $hasIcon, $color, $disabled }) => $disabled
|
|
102
|
+
? `
|
|
27
103
|
cursor: initial;
|
|
28
|
-
|
|
104
|
+
`
|
|
105
|
+
: $hasIcon
|
|
106
|
+
? `
|
|
29
107
|
&:hover {
|
|
30
108
|
p {
|
|
31
|
-
color: ${
|
|
109
|
+
color: ${$color};
|
|
32
110
|
}
|
|
33
111
|
}
|
|
34
112
|
|
|
35
113
|
div > svg {
|
|
36
|
-
fill: ${
|
|
37
|
-
}
|
|
114
|
+
fill: ${$color};
|
|
115
|
+
}`
|
|
116
|
+
: `
|
|
38
117
|
&:hover {
|
|
39
118
|
background-color: var(--color-grey-10);
|
|
40
119
|
&:after {
|
|
@@ -53,7 +132,8 @@
|
|
|
53
132
|
background-color: var(--color-grey-9);
|
|
54
133
|
}`}
|
|
55
134
|
|
|
56
|
-
${({$active
|
|
135
|
+
${({ $active, $color, $hasIcon }) => $active
|
|
136
|
+
? `
|
|
57
137
|
&:after {
|
|
58
138
|
position: absolute;
|
|
59
139
|
content: '';
|
|
@@ -61,13 +141,19 @@
|
|
|
61
141
|
height: 3px;
|
|
62
142
|
bottom: 0px;
|
|
63
143
|
left: 0px;
|
|
64
|
-
background-color: ${
|
|
144
|
+
background-color: ${$hasIcon ? $color : 'var(--color-primary-blue-2)'} !important;
|
|
65
145
|
border-top-right-radius: 3px;
|
|
66
146
|
border-top-left-radius: 3px;
|
|
67
147
|
}
|
|
68
|
-
|
|
69
|
-
|
|
148
|
+
`
|
|
149
|
+
: ''}
|
|
150
|
+
`;
|
|
151
|
+
const IconWrapper = styled.styled.div `
|
|
70
152
|
padding: 8px;
|
|
71
153
|
border-radius: 8px;
|
|
72
|
-
background-color: ${({$bg
|
|
73
|
-
`;
|
|
154
|
+
background-color: ${({ $bg }) => $bg};
|
|
155
|
+
`;
|
|
156
|
+
Tabs.Item = Item;
|
|
157
|
+
Item.displayName = 'Tabs.Item';
|
|
158
|
+
|
|
159
|
+
exports.Tabs = Tabs;
|
|
@@ -1,7 +1,44 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var box = require('../../atoms/box/box.js');
|
|
7
|
+
var _function = require('../../../utils/function.js');
|
|
8
|
+
var chevron_down = require('../../../icons/arrow/chevron_down.js');
|
|
9
|
+
var chevron_up = require('../../../icons/arrow/chevron_up.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
|
+
|
|
15
|
+
const AccordionContext = React__default.default.createContext([-1, () => undefined]);
|
|
16
|
+
const Accordion = ({ children, sx }) => {
|
|
17
|
+
const [openIndex, setOpenIndex] = React__default.default.useState(-1);
|
|
18
|
+
const handleIndexChange = (index) => {
|
|
19
|
+
setOpenIndex((prev) => (prev === index ? -1 : index));
|
|
20
|
+
};
|
|
21
|
+
return (React__default.default.createElement(AccordionContext.Provider, { value: [openIndex, handleIndexChange] },
|
|
22
|
+
React__default.default.createElement(Wrapper, { "$sx": sx }, React__default.default.Children.map(children, (child, index) => {
|
|
23
|
+
if (React__default.default.isValidElement(child))
|
|
24
|
+
return React__default.default.cloneElement(child, { index });
|
|
25
|
+
return null;
|
|
26
|
+
}))));
|
|
27
|
+
};
|
|
28
|
+
const Wrapper = styled.styled.div `
|
|
29
|
+
${({ $sx }) => ($sx ? $sx : '')};
|
|
30
|
+
`;
|
|
31
|
+
const AccordionItem = ({ buttonSx, children, index, sx, trigger, }) => {
|
|
32
|
+
const [openIndex, setOpenIndex] = React__default.default.useContext(AccordionContext);
|
|
33
|
+
return (React__default.default.createElement(box.Box, { "$dir": "column" },
|
|
34
|
+
React__default.default.createElement(TriggerWrapper, { onClick: _function.callAll(
|
|
35
|
+
// eslint-disable-next-line
|
|
36
|
+
() => setOpenIndex(index), trigger?.props?.onClick), "$sx": buttonSx },
|
|
37
|
+
trigger,
|
|
38
|
+
openIndex === index ? React__default.default.createElement(chevron_up.ChevronUp, null) : React__default.default.createElement(chevron_down.ChevronDown, null)),
|
|
39
|
+
React__default.default.createElement(box.Box, { sx: openIndex === index ? sx : 'visibility: hidden; height: 0px;' }, children)));
|
|
40
|
+
};
|
|
41
|
+
const TriggerWrapper = styled.styled.button `
|
|
5
42
|
display: flex;
|
|
6
43
|
align-items: center;
|
|
7
44
|
justify-content: space-between;
|
|
@@ -11,5 +48,9 @@
|
|
|
11
48
|
outline: none;
|
|
12
49
|
background-color: transparent;
|
|
13
50
|
cursor: pointer;
|
|
14
|
-
${({$sx
|
|
15
|
-
`;
|
|
51
|
+
${({ $sx }) => ($sx ? $sx : '')};
|
|
52
|
+
`;
|
|
53
|
+
Accordion.Item = AccordionItem;
|
|
54
|
+
AccordionItem.displayName = 'Accordion.Item';
|
|
55
|
+
|
|
56
|
+
exports.Accordion = Accordion;
|
|
@@ -1,26 +1,55 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var heading = require('../../atoms/typography/heading.js');
|
|
7
|
+
var paragraph = require('../../atoms/typography/paragraph.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 CalendarDate = ({ monthAbbreviation, date, dayOfWeek, startTime, endTime, sx, size = 'large', }) => {
|
|
14
|
+
return (React__default.default.createElement(Container, { "$sx": sx },
|
|
15
|
+
React__default.default.createElement(CalendarContainer, { "$size": size },
|
|
16
|
+
React__default.default.createElement(MonthContainer, { "$size": size },
|
|
17
|
+
size === 'large' && (React__default.default.createElement(heading.H.Seven, { "$color": "white", "$textAlign": "center", "$semiBold": true }, monthAbbreviation)),
|
|
18
|
+
size === 'small' && (React__default.default.createElement(paragraph.P, { "$color": "white", "$textAlign": "center", "$fontSize": 14 }, monthAbbreviation))),
|
|
19
|
+
React__default.default.createElement(DateContainer, { "$size": size },
|
|
20
|
+
size === 'large' && (React__default.default.createElement(heading.H.One, { "$textAlign": "center", "$semiBold": true }, date)),
|
|
21
|
+
size === 'small' && (React__default.default.createElement(heading.H.Six, { "$color": "grey-2", "$textAlign": "center" }, date)))),
|
|
22
|
+
dayOfWeek && startTime && endTime && (React__default.default.createElement(TimeContainer, null,
|
|
23
|
+
React__default.default.createElement(paragraph.P, { as: "span", "$color": "red-5" }, `${dayOfWeek}, ${startTime} -> ${endTime}`)))));
|
|
24
|
+
};
|
|
25
|
+
const Container = styled.styled.div `
|
|
3
26
|
display: flex;
|
|
4
27
|
flex-direction: column;
|
|
5
28
|
align-items: center;
|
|
6
29
|
|
|
7
|
-
${({$sx
|
|
8
|
-
|
|
30
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
31
|
+
`;
|
|
32
|
+
const CalendarContainer = styled.styled.div `
|
|
9
33
|
display: flex;
|
|
10
34
|
flex-direction: column;
|
|
11
35
|
|
|
12
|
-
${({$size
|
|
13
|
-
|
|
36
|
+
${({ $size }) => ($size === 'large' ? 'width: 120px;' : 'width: 64px;')}
|
|
37
|
+
`;
|
|
38
|
+
const MonthContainer = styled.styled.div `
|
|
14
39
|
background-color: var(--color-red-5);
|
|
15
40
|
border-radius: 16px 16px 0 0;
|
|
16
41
|
|
|
17
|
-
${({$size
|
|
18
|
-
|
|
42
|
+
${({ $size }) => $size === 'large' ? 'padding: 8px 16px;' : 'padding: 2px 8px;'}
|
|
43
|
+
`;
|
|
44
|
+
const DateContainer = styled.styled.div `
|
|
19
45
|
background-color: white;
|
|
20
46
|
border-radius: 0 0 16px 16px;
|
|
21
47
|
box-shadow: var(--elevation-3);
|
|
22
48
|
|
|
23
|
-
${({$size
|
|
24
|
-
|
|
49
|
+
${({ $size }) => $size === 'large' ? 'padding: 8px 16px;' : 'padding: 2px 16px;'}
|
|
50
|
+
`;
|
|
51
|
+
const TimeContainer = styled.styled.div `
|
|
25
52
|
margin-top: 16px;
|
|
26
|
-
`;
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
exports.CalendarDate = CalendarDate;
|
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var chevron_left = require('../../../../icons/arrow/chevron_left.js');
|
|
7
|
+
var chevron_right = require('../../../../icons/arrow/chevron_right.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 DEFAULT_SCROLL_TRIGGER_DISTANCE = 11;
|
|
14
|
+
const DEFAULT_SCROLL_DISTANCE = 450;
|
|
15
|
+
const CardCarousel = ({ children, onScrollEnd, scrollTriggerDistance = DEFAULT_SCROLL_TRIGGER_DISTANCE, scrollDistance = DEFAULT_SCROLL_DISTANCE, sx, }) => {
|
|
16
|
+
const ref = React__default.default.useRef(null);
|
|
17
|
+
const handleScroll = (event) => {
|
|
18
|
+
const target = event.target;
|
|
19
|
+
const scrollDistance = target.scrollWidth - target.scrollLeft;
|
|
20
|
+
if (scrollDistance - target.clientWidth < scrollTriggerDistance &&
|
|
21
|
+
onScrollEnd) {
|
|
22
|
+
onScrollEnd();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const onNavigateRight = () => {
|
|
26
|
+
if (ref.current) {
|
|
27
|
+
const amount = ref.current.scrollLeft + scrollDistance;
|
|
28
|
+
ref.current.scrollLeft = amount;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const onNavigateLeft = () => {
|
|
32
|
+
if (ref.current) {
|
|
33
|
+
const amount = ref.current.scrollLeft - scrollDistance;
|
|
34
|
+
ref.current.scrollLeft = amount < 0 ? 0 : amount;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return (React__default.default.createElement(Wrapper, { "$sx": sx },
|
|
38
|
+
React__default.default.createElement(Button, { className: "carousel-navigation", onClick: onNavigateLeft, "$side": "left" },
|
|
39
|
+
React__default.default.createElement(chevron_left.ChevronLeft, { color: "white", size: 48 })),
|
|
40
|
+
React__default.default.createElement(Inner, { onScroll: handleScroll, ref: ref }, children),
|
|
41
|
+
React__default.default.createElement(Button, { className: "carousel-navigation", onClick: onNavigateRight, "$side": "right" },
|
|
42
|
+
React__default.default.createElement(chevron_right.ChevronRight, { color: "white", size: 48 }))));
|
|
43
|
+
};
|
|
44
|
+
const Wrapper = styled.styled.div `
|
|
3
45
|
position: relative;
|
|
4
46
|
height: 288px;
|
|
5
47
|
|
|
@@ -7,8 +49,9 @@
|
|
|
7
49
|
display: block;
|
|
8
50
|
}
|
|
9
51
|
|
|
10
|
-
${({$sx
|
|
11
|
-
|
|
52
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
53
|
+
`;
|
|
54
|
+
const Inner = styled.styled.div `
|
|
12
55
|
position: absolute;
|
|
13
56
|
width: 100%;
|
|
14
57
|
z-index: 0;
|
|
@@ -33,7 +76,8 @@
|
|
|
33
76
|
width: 0px;
|
|
34
77
|
height: 0px;
|
|
35
78
|
}
|
|
36
|
-
|
|
79
|
+
`;
|
|
80
|
+
const Button = styled.styled.button `
|
|
37
81
|
position: absolute;
|
|
38
82
|
z-index: 1;
|
|
39
83
|
top: 0px;
|
|
@@ -49,10 +93,14 @@
|
|
|
49
93
|
|
|
50
94
|
display: none;
|
|
51
95
|
|
|
52
|
-
${({$side
|
|
96
|
+
${({ $side }) => $side === 'left'
|
|
97
|
+
? `
|
|
53
98
|
left: 0px;
|
|
54
99
|
border-radius: 0px 16px 16px 0px;
|
|
55
|
-
|
|
100
|
+
`
|
|
101
|
+
: `
|
|
56
102
|
right: 0px;
|
|
57
103
|
border-radius: 16px 0px 0px 16px;`};
|
|
58
|
-
`;
|
|
104
|
+
`;
|
|
105
|
+
|
|
106
|
+
exports.CardCarousel = CardCarousel;
|
|
@@ -1,5 +1,122 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var Picker = require('@emoji-mart/react');
|
|
7
|
+
var avatar = require('../../iconography/avatar/avatar.js');
|
|
8
|
+
var box = require('../../atoms/box/box.js');
|
|
9
|
+
var paragraph = require('../../atoms/typography/paragraph.js');
|
|
10
|
+
require('../../input/checkbox/checkbox.js');
|
|
11
|
+
require('../../input/date/date.js');
|
|
12
|
+
require('../../input/filter/filter.js');
|
|
13
|
+
require('../../input/radio/radio.js');
|
|
14
|
+
require('../../input/search/search.js');
|
|
15
|
+
require('../../input/select/select.js');
|
|
16
|
+
require('../../input/text_area/text_area.js');
|
|
17
|
+
var text_input = require('../../input/text_input/text_input.js');
|
|
18
|
+
require('../../input/calendar/calendar.js');
|
|
19
|
+
require('../../input/time/time.js');
|
|
20
|
+
var button = require('../../actions/button/button.js');
|
|
21
|
+
var portal = require('../portal/portal.js');
|
|
22
|
+
var emojis = require('../../../emoji/emojis.json.js');
|
|
23
|
+
var styles = require('../../../common/styles.js');
|
|
24
|
+
var thumbs_up = require('../../../icons/basic/thumbs_up.js');
|
|
25
|
+
var comment = require('../../../icons/message/comment.js');
|
|
26
|
+
var helpers = require('./helpers.js');
|
|
27
|
+
|
|
28
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
29
|
+
|
|
30
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
31
|
+
var Picker__default = /*#__PURE__*/_interopDefaultCompat(Picker);
|
|
32
|
+
|
|
33
|
+
const MAX_REACTIONS_SHOWN = 5;
|
|
34
|
+
const Comment = ({ avatarTooltipContent, avatarTooltipSx, content, createdDate, hasMoreReplies, id, onComment, onReact, onShowReplies, reactionModal, reactions, replies, userImageUri, userName, userReactions, userProfileUri, }) => {
|
|
35
|
+
const [showPicker, setShowPicker] = React__default.default.useState(false);
|
|
36
|
+
const [pickerTriggerLoc, setPickerTriggerLoc] = React__default.default.useState({
|
|
37
|
+
x: 0,
|
|
38
|
+
y: 0,
|
|
39
|
+
});
|
|
40
|
+
const [pickerOrientation, setPickerOrientation] = React__default.default.useState('up');
|
|
41
|
+
const [toggleShowCommentInput, setShowCommentInput] = React__default.default.useState(false);
|
|
42
|
+
const [toggleShowReplies, setShowReplies] = React__default.default.useState(false);
|
|
43
|
+
const [comment$1, setComment] = React__default.default.useState('');
|
|
44
|
+
const _replies = React__default.default.Children.toArray(replies);
|
|
45
|
+
const handleCommentChange = (event) => {
|
|
46
|
+
setComment(event.target.value);
|
|
47
|
+
};
|
|
48
|
+
const handleCommentSubmit = (event) => {
|
|
49
|
+
event.stopPropagation();
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
onComment(comment$1);
|
|
52
|
+
setComment('');
|
|
53
|
+
};
|
|
54
|
+
const handleReaction = ({ native }) => {
|
|
55
|
+
onReact(native);
|
|
56
|
+
setShowPicker(false);
|
|
57
|
+
};
|
|
58
|
+
const handlePicker = (event) => {
|
|
59
|
+
event.stopPropagation();
|
|
60
|
+
setShowPicker((prev) => !prev);
|
|
61
|
+
setPickerTriggerLoc({ y: event.clientY, x: event.clientX });
|
|
62
|
+
setPickerOrientation(event.clientY > 400 ? 'up' : 'down');
|
|
63
|
+
};
|
|
64
|
+
const handlePickerBlur = () => setShowPicker(false);
|
|
65
|
+
const handleToggleCommentInput = () => setShowCommentInput((prev) => !prev);
|
|
66
|
+
const handleToggleReplies = () => {
|
|
67
|
+
onShowReplies && onShowReplies();
|
|
68
|
+
setShowReplies(true);
|
|
69
|
+
};
|
|
70
|
+
const createdTime = helpers.abbrTimeBeforeDate(createdDate);
|
|
71
|
+
const reactionElements = reactions &&
|
|
72
|
+
Object.entries(reactions)
|
|
73
|
+
.slice(0, MAX_REACTIONS_SHOWN)
|
|
74
|
+
.sort((a, b) => (a[1] < b[1] ? 1 : -1))
|
|
75
|
+
.map((reaction) => (React__default.default.createElement(Reaction, { key: id + reaction[0], onClick: () => onReact(reaction[0]), "$align": "center", "$dir": "row", "$gap": 5, "$userSelected": userReactions?.includes(reaction[0]) },
|
|
76
|
+
reaction[0],
|
|
77
|
+
React__default.default.createElement(paragraph.P, { "$bold": true, "$fontSize": 10, "$lineHeight": 14 }, reaction[1]))));
|
|
78
|
+
const hasReplies = !!_replies?.length && _replies.length > 0;
|
|
79
|
+
const replyElements = hasReplies &&
|
|
80
|
+
_replies.map((reply, index) => {
|
|
81
|
+
if (!React__default.default.isValidElement(reply))
|
|
82
|
+
return null;
|
|
83
|
+
const key = reply.props?.id;
|
|
84
|
+
const hasLine = index !== _replies.length - 1 || hasMoreReplies;
|
|
85
|
+
return (React__default.default.createElement(ReplyWrapper, { "$hasLine": hasLine, key: key },
|
|
86
|
+
reply,
|
|
87
|
+
React__default.default.createElement(ReplyIndicator, null)));
|
|
88
|
+
});
|
|
89
|
+
return (React__default.default.createElement(Wrapper, { id: id },
|
|
90
|
+
React__default.default.createElement(avatar.Avatar, { href: userProfileUri, image: userImageUri, size: 32, tooltipContent: avatarTooltipContent, tooltipSx: avatarTooltipSx }),
|
|
91
|
+
React__default.default.createElement(box.Box, { "$flex": 1, "$dir": "column" },
|
|
92
|
+
React__default.default.createElement(ContentWrapper, { "$hasReplies": hasReplies || !!hasMoreReplies },
|
|
93
|
+
React__default.default.createElement(CommentBox, null,
|
|
94
|
+
React__default.default.createElement(paragraph.P, { "$bold": true, "$color": "grey-2", "$fontSize": 14, "$lineHeight": 20 }, userName),
|
|
95
|
+
React__default.default.createElement(paragraph.P, { sx: "letter-spacing: -0.176px;" }, content)),
|
|
96
|
+
React__default.default.createElement(box.Box, { "$align": "flex-start", "$dir": "row", "$display": "flex", "$gap": 16, sx: "margin: 8px 0px; position: relative;" },
|
|
97
|
+
React__default.default.createElement(thumbs_up.ThumbsUp, { color: "primary-blue-2", onClick: handlePicker, size: 24, sx: "border-radius: 50%; cursor: pointer; flex-shrink: 0;" }),
|
|
98
|
+
React__default.default.createElement(comment.Comment, { color: "primary-blue-2", onClick: handleToggleCommentInput, size: 24, sx: "border-radius: 50%; cursor: pointer; flex-shrink: 0;" }),
|
|
99
|
+
React__default.default.createElement(paragraph.P, { "$color": "grey-7" }, "\u2022"),
|
|
100
|
+
React__default.default.createElement(paragraph.P, { "$color": "grey-4", "$fontSize": 12, "$lineHeight": 24, sx: "flex-shrink: 0;" }, createdTime),
|
|
101
|
+
React__default.default.createElement(box.Box, { "$display": "flex", "$flow": "row wrap", "$gap": 6, sx: "max-width: calc(100% - 190px); margin-left: auto;" },
|
|
102
|
+
reactionElements,
|
|
103
|
+
reactionModal),
|
|
104
|
+
showPicker && (React__default.default.createElement(portal.Portal, null,
|
|
105
|
+
React__default.default.createElement(PickerWrapper, { "$pickerOrientation": pickerOrientation, "$top": pickerTriggerLoc.y, "$left": pickerTriggerLoc.x },
|
|
106
|
+
React__default.default.createElement(Picker__default.default, { data: emojis.default, onEmojiSelect: handleReaction, onClickOutside: handlePickerBlur, maxFrequentRows: 1, navPosition: "none", previewPosition: "none", perLine: 9, theme: "auto" })))))),
|
|
107
|
+
hasReplies && toggleShowReplies && (React__default.default.createElement(RepliesWrapper, null, replyElements)),
|
|
108
|
+
!toggleShowReplies && !hasMoreReplies && hasReplies && (React__default.default.createElement(RepliesWrapper, null,
|
|
109
|
+
React__default.default.createElement(ReplyWrapper, { "$hasLine": false },
|
|
110
|
+
React__default.default.createElement(button.Button, { onClick: handleToggleReplies, size: "small", sx: "color: var(--color-grey-3);", type: "text" }, "show replies"),
|
|
111
|
+
React__default.default.createElement(ReplyIndicator, null)))),
|
|
112
|
+
hasMoreReplies && (React__default.default.createElement(RepliesWrapper, null,
|
|
113
|
+
React__default.default.createElement(ReplyWrapper, { "$hasLine": false },
|
|
114
|
+
React__default.default.createElement(button.Button, { onClick: handleToggleReplies, size: "small", sx: "color: var(--color-grey-3);", type: "text" }, "show more replies"),
|
|
115
|
+
React__default.default.createElement(ReplyIndicator, null)))),
|
|
116
|
+
toggleShowCommentInput && (React__default.default.createElement(CommentWrapper, { onSubmit: handleCommentSubmit },
|
|
117
|
+
React__default.default.createElement(text_input.TextInput, { bg: "var(--color-grey-10)", placeholder: "Write a reply", onChange: handleCommentChange, value: comment$1 }))))));
|
|
118
|
+
};
|
|
119
|
+
const Wrapper = styled.styled.div `
|
|
3
120
|
max-width: 700px;
|
|
4
121
|
display: flex;
|
|
5
122
|
flex-direction: row;
|
|
@@ -7,10 +124,12 @@
|
|
|
7
124
|
gap: 12px;
|
|
8
125
|
justify-content: space-between;
|
|
9
126
|
position: relative;
|
|
10
|
-
|
|
127
|
+
`;
|
|
128
|
+
const ContentWrapper = styled.styled.div `
|
|
11
129
|
display: flex;
|
|
12
130
|
flex-direction: column;
|
|
13
|
-
${({$hasReplies
|
|
131
|
+
${({ $hasReplies }) => $hasReplies
|
|
132
|
+
? `
|
|
14
133
|
position: relative;
|
|
15
134
|
|
|
16
135
|
&::before {
|
|
@@ -20,44 +139,55 @@
|
|
|
20
139
|
left: -28px;
|
|
21
140
|
height: calc(100% - 12px);
|
|
22
141
|
border-left: 2px solid var(--color-grey-9);
|
|
23
|
-
}
|
|
24
|
-
|
|
142
|
+
}`
|
|
143
|
+
: ''}
|
|
144
|
+
`;
|
|
145
|
+
const CommentBox = styled.styled.div `
|
|
25
146
|
padding: 16px;
|
|
26
147
|
display: flex;
|
|
27
148
|
flex-direction: column;
|
|
28
149
|
gap: 8px;
|
|
29
150
|
background-color: var(--color-grey-10);
|
|
30
151
|
border-radius: 16px;
|
|
31
|
-
|
|
152
|
+
`;
|
|
153
|
+
const PickerWrapper = styled.styled.div `
|
|
32
154
|
position: absolute;
|
|
33
155
|
z-index: 1000;
|
|
34
156
|
|
|
35
|
-
${({$pickerOrientation
|
|
36
|
-
top: ${({$top
|
|
37
|
-
left: ${({$left
|
|
38
|
-
|
|
157
|
+
${({ $pickerOrientation }) => $pickerOrientation === 'up' ? 'transform: translateY(-345px);' : ''}
|
|
158
|
+
top: ${({ $top }) => $top}px;
|
|
159
|
+
left: ${({ $left }) => $left}px;
|
|
160
|
+
`;
|
|
161
|
+
const Reaction = styled.styled.div `
|
|
39
162
|
${styles.Styles.flex}
|
|
40
163
|
display: flex;
|
|
41
164
|
padding: 2px 6px;
|
|
42
165
|
border-radius: 12px;
|
|
43
166
|
cursor: pointer;
|
|
44
|
-
${({$userSelected
|
|
167
|
+
${({ $userSelected }) => $userSelected
|
|
168
|
+
? `
|
|
45
169
|
background-color: var(--color-primary-blue-4);
|
|
46
170
|
border: 1px solid var(--color-primary-blue-3);
|
|
47
|
-
|
|
48
|
-
|
|
171
|
+
`
|
|
172
|
+
: ''}
|
|
173
|
+
`;
|
|
174
|
+
const RepliesWrapper = styled.styled.div `
|
|
49
175
|
padding-top: 12px;
|
|
50
|
-
|
|
176
|
+
`;
|
|
177
|
+
const ReplyWrapper = styled.styled.div `
|
|
51
178
|
position: relative;
|
|
52
|
-
${({$hasLine
|
|
179
|
+
${({ $hasLine }) => $hasLine
|
|
180
|
+
? `
|
|
53
181
|
&::before {
|
|
54
182
|
content: "";
|
|
55
183
|
position: absolute;
|
|
56
184
|
left: -28px;
|
|
57
185
|
height: 100%;
|
|
58
186
|
border-left: 2px solid var(--color-grey-9);
|
|
59
|
-
}
|
|
60
|
-
|
|
187
|
+
}`
|
|
188
|
+
: ''}
|
|
189
|
+
`;
|
|
190
|
+
const ReplyIndicator = styled.styled.div `
|
|
61
191
|
position: absolute;
|
|
62
192
|
top: -12px;
|
|
63
193
|
left: -28px;
|
|
@@ -67,7 +197,8 @@
|
|
|
67
197
|
border: 2px solid var(--color-grey-9);
|
|
68
198
|
border-top: none;
|
|
69
199
|
border-right: none;
|
|
70
|
-
|
|
200
|
+
`;
|
|
201
|
+
const CommentWrapper = styled.styled.form `
|
|
71
202
|
label {
|
|
72
203
|
margin-bottom: 16px;
|
|
73
204
|
}
|
|
@@ -75,4 +206,6 @@
|
|
|
75
206
|
box-shadow: var(--elevation-6);
|
|
76
207
|
border-radius: 16px;
|
|
77
208
|
}
|
|
78
|
-
`;
|
|
209
|
+
`;
|
|
210
|
+
|
|
211
|
+
exports.Comment = Comment;
|
|
@@ -1 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const abbrTimeBeforeDate = (date) => {
|
|
4
|
+
const now = new Date();
|
|
5
|
+
const diff = now.getTime() - date.getTime();
|
|
6
|
+
if (diff < 60000) {
|
|
7
|
+
// under 1 min
|
|
8
|
+
return 'Now';
|
|
9
|
+
}
|
|
10
|
+
else if (diff < 3600000) {
|
|
11
|
+
// under one hour
|
|
12
|
+
const minutes = Math.floor(diff / 60000);
|
|
13
|
+
return `${minutes}m`;
|
|
14
|
+
}
|
|
15
|
+
else if (diff < 86400000) {
|
|
16
|
+
// under one day
|
|
17
|
+
const hours = Math.floor(diff / 3600000);
|
|
18
|
+
return `${hours}h`;
|
|
19
|
+
}
|
|
20
|
+
else if (diff < 604800000) {
|
|
21
|
+
// under one week
|
|
22
|
+
const days = Math.floor(diff / 86400000);
|
|
23
|
+
return `${days}d`;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return `${Math.floor(diff / 604800000)}w`;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.abbrTimeBeforeDate = abbrTimeBeforeDate;
|