@soul-refiner/design-system 2.0.4 → 2.1.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 +1 -140
- package/dist/common/date.js +1 -34
- package/dist/common/styles.js +30 -62
- package/dist/components/actions/button/button.js +21 -111
- package/dist/components/actions/dropdown/dropdown.js +21 -176
- package/dist/components/actions/rate/rate.js +4 -55
- package/dist/components/actions/switch/switch.js +5 -39
- package/dist/components/actions/toggle/toggle.js +6 -33
- package/dist/components/actions/upload/upload.js +9 -167
- package/dist/components/atoms/box/box.js +4 -18
- package/dist/components/atoms/hide/hide.js +1 -18
- package/dist/components/atoms/seconds_to_duration/seconds_to_duration.js +1 -36
- package/dist/components/atoms/time_ago/time_ago.js +1 -39
- package/dist/components/atoms/typography/display.js +5 -18
- package/dist/components/atoms/typography/heading.js +6 -43
- package/dist/components/atoms/typography/paragraph.js +7 -20
- package/dist/components/atoms/typography/typography.js +3 -10
- package/dist/components/card/action/action.js +8 -41
- package/dist/components/card/audio/audio.js +7 -57
- package/dist/components/card/card.js +1 -33
- package/dist/components/card/feature/feature.js +14 -86
- package/dist/components/card/meeting/meeting.js +8 -102
- package/dist/components/card/person/person.js +6 -39
- package/dist/components/card/price/price.js +7 -49
- package/dist/components/card/regular/regular.js +5 -26
- package/dist/components/card/styles.js +2 -9
- package/dist/components/card/video/video.js +7 -57
- package/dist/components/card/written/written.js +7 -57
- package/dist/components/custom/courses_selection/courses_selection.js +12 -104
- package/dist/components/custom/users_selection/users_selection.js +12 -86
- package/dist/components/editor/constants.js +1 -195
- package/dist/components/editor/context.js +1 -17
- package/dist/components/editor/editor.js +2 -42
- package/dist/components/editor/icons/border-all.js +1 -12
- package/dist/components/editor/icons/border-bottom.js +1 -12
- package/dist/components/editor/icons/border-left.js +1 -12
- package/dist/components/editor/icons/border-none.js +1 -12
- package/dist/components/editor/icons/border-right.js +1 -12
- package/dist/components/editor/icons/border-top.js +1 -12
- package/dist/components/editor/navbar/alignment_dropdown.js +1 -106
- package/dist/components/editor/navbar/button_modal.js +3 -60
- package/dist/components/editor/navbar/navbar.js +7 -178
- package/dist/components/editor/navbar/style_dropdown.js +1 -74
- package/dist/components/editor/plugins/blocks/blockquote.js +1 -17
- package/dist/components/editor/plugins/blocks/blocks.js +1 -54
- package/dist/components/editor/plugins/blocks/buttons.js +8 -70
- package/dist/components/editor/plugins/blocks/dropdown-menu.js +1 -77
- package/dist/components/editor/plugins/blocks/image.js +1 -60
- package/dist/components/editor/plugins/blocks/list.js +2 -20
- package/dist/components/editor/plugins/blocks/media-popover.js +1 -41
- package/dist/components/editor/plugins/blocks/plate-button.js +1 -63
- package/dist/components/editor/plugins/blocks/popover.js +1 -38
- package/dist/components/editor/plugins/blocks/qa.js +3 -44
- package/dist/components/editor/plugins/blocks/resizable.js +1 -47
- package/dist/components/editor/plugins/blocks/separator.js +1 -43
- package/dist/components/editor/plugins/blocks/table-cell.js +1 -48
- package/dist/components/editor/plugins/blocks/table-row.js +1 -16
- package/dist/components/editor/plugins/blocks/table.js +1 -98
- package/dist/components/editor/plugins/blocks/text.js +1 -103
- package/dist/components/editor/plugins/blocks/video.js +1 -42
- package/dist/components/editor/plugins/leafs/leafs.js +1 -37
- package/dist/components/editor/plugins/leafs/link.js +4 -55
- package/dist/components/editor/plugins/marks/marks.js +1 -17
- package/dist/components/editor/plugins/plate.js +1 -43
- package/dist/components/editor/plugins/utils/exitBreak.js +1 -36
- package/dist/components/editor/plugins/utils/resetBlockType.js +1 -26
- package/dist/components/editor/plugins/utils/selectOnBackspace.js +1 -11
- package/dist/components/editor/plugins/utils/softBreak.js +1 -19
- package/dist/components/editor/plugins/utils/utils.js +1 -17
- package/dist/components/editor/simple_editor/navbar.js +4 -110
- package/dist/components/editor/simple_editor/plugins.js +1 -93
- package/dist/components/editor/simple_editor/simple_editor.js +3 -34
- package/dist/components/editor/styles/menu_button.js +3 -9
- package/dist/components/feedback/animated_toast/animated_toast.js +3 -32
- package/dist/components/feedback/badge/badge.js +7 -56
- package/dist/components/feedback/banner/banner.js +6 -60
- package/dist/components/feedback/chip/chip.js +8 -81
- package/dist/components/feedback/loader/loader.js +9 -33
- package/dist/components/feedback/notification/notification.js +6 -59
- package/dist/components/feedback/progress/progress.js +14 -76
- package/dist/components/feedback/toast/toast.js +7 -55
- package/dist/components/feedback/tooltip/tooltip.js +1 -34
- package/dist/components/iconography/avatar/avatar.js +22 -141
- package/dist/components/iconography/avatar/icons/approved.js +1 -14
- package/dist/components/iconography/avatar/icons/busy.js +1 -14
- package/dist/components/iconography/avatar/icons/declined.js +1 -14
- package/dist/components/iconography/avatar/icons/default.js +1 -13
- package/dist/components/iconography/avatar/icons/focus.js +1 -14
- package/dist/components/iconography/avatar/icons/locked.js +1 -14
- package/dist/components/iconography/avatar/icons/offline.js +1 -14
- package/dist/components/iconography/avatar/icons/online.js +1 -13
- package/dist/components/iconography/avatar/icons/subscribed.js +1 -18
- package/dist/components/iconography/icon/icon.js +3 -18
- package/dist/components/input/calendar/calendar.js +13 -139
- package/dist/components/input/checkbox/checkbox.js +5 -23
- package/dist/components/input/date/date.js +13 -241
- package/dist/components/input/filter/filter.js +13 -212
- package/dist/components/input/filter/filter_option.js +9 -50
- package/dist/components/input/radio/radio.js +7 -45
- package/dist/components/input/search/search.js +17 -83
- package/dist/components/input/select/select.js +6 -27
- package/dist/components/input/text_area/text_area.js +15 -60
- package/dist/components/input/text_input/text_input.js +21 -102
- package/dist/components/input/time/time.js +3 -47
- package/dist/components/media/video/video.js +1 -42
- package/dist/components/media/video-player/playlist-item.js +4 -37
- package/dist/components/media/video-player/video.js +13 -121
- package/dist/components/navigation/breadcrumb/breadcrumb.js +11 -66
- package/dist/components/navigation/inner/inner.js +14 -130
- package/dist/components/navigation/tabs/tabs.js +15 -101
- package/dist/components/surfaces/accordion/accordion.js +5 -46
- package/dist/components/surfaces/calendar_date/calendar_date.js +10 -39
- package/dist/components/surfaces/carousel/card/card.js +7 -55
- package/dist/components/surfaces/comment/comment.js +19 -152
- package/dist/components/surfaces/comment/helpers.js +1 -30
- package/dist/components/surfaces/discuss_post/discuss_post.js +2 -0
- package/dist/components/surfaces/drawer/drawer.js +7 -75
- package/dist/components/surfaces/message/message.js +4 -39
- package/dist/components/surfaces/modal/modal.js +8 -99
- package/dist/components/surfaces/portal/portal.js +1 -35
- package/dist/components/surfaces/post/post.js +19 -161
- package/dist/components/table/table/table.js +29 -120
- package/dist/emoji/emojis.json.js +1 -36331
- package/dist/icons/arrow/arrow_all.js +1 -15
- package/dist/icons/arrow/arrow_all_diagonal.js +1 -15
- package/dist/icons/arrow/arrow_both_downwards.js +1 -15
- package/dist/icons/arrow/arrow_both_upwards.js +1 -15
- package/dist/icons/arrow/arrow_circle_left.js +1 -15
- package/dist/icons/arrow/arrow_circle_left_double.js +1 -15
- package/dist/icons/arrow/arrow_circle_left_double_alert.js +1 -17
- package/dist/icons/arrow/arrow_circle_right.js +1 -15
- package/dist/icons/arrow/arrow_circle_right_double.js +1 -15
- package/dist/icons/arrow/arrow_circle_right_double_alert.js +1 -15
- package/dist/icons/arrow/arrow_diagonal_down_left.js +1 -15
- package/dist/icons/arrow/arrow_diagonal_down_left_circle.js +1 -15
- package/dist/icons/arrow/arrow_diagonal_down_right.js +1 -15
- package/dist/icons/arrow/arrow_diagonal_down_right_circle.js +1 -15
- package/dist/icons/arrow/arrow_diagonal_up_left.js +1 -15
- package/dist/icons/arrow/arrow_diagonal_up_left_circle.js +1 -15
- package/dist/icons/arrow/arrow_diagonal_up_right.js +1 -15
- package/dist/icons/arrow/arrow_diagonal_up_right_circle.js +1 -15
- package/dist/icons/arrow/arrow_down.js +1 -15
- package/dist/icons/arrow/arrow_down_bold.js +1 -15
- package/dist/icons/arrow/arrow_down_circle.js +1 -15
- package/dist/icons/arrow/arrow_left.js +1 -15
- package/dist/icons/arrow/arrow_left_bold.js +1 -15
- package/dist/icons/arrow/arrow_left_circle.js +1 -15
- package/dist/icons/arrow/arrow_left_curved.js +1 -15
- package/dist/icons/arrow/arrow_left_curved_circle.js +1 -15
- package/dist/icons/arrow/arrow_right.js +1 -15
- package/dist/icons/arrow/arrow_right_bold.js +1 -15
- package/dist/icons/arrow/arrow_right_circle.js +1 -15
- package/dist/icons/arrow/arrow_right_curved.js +1 -15
- package/dist/icons/arrow/arrow_right_curved_circle.js +1 -15
- package/dist/icons/arrow/arrow_up.js +1 -15
- package/dist/icons/arrow/arrow_up_bold.js +1 -15
- package/dist/icons/arrow/arrow_up_circle.js +1 -15
- package/dist/icons/arrow/chevron_down.js +1 -15
- package/dist/icons/arrow/chevron_down_circle.js +1 -15
- package/dist/icons/arrow/chevron_down_double.js +1 -15
- package/dist/icons/arrow/chevron_down_double_circle.js +1 -15
- package/dist/icons/arrow/chevron_left.js +1 -15
- package/dist/icons/arrow/chevron_left_circle.js +1 -15
- package/dist/icons/arrow/chevron_left_double.js +1 -15
- package/dist/icons/arrow/chevron_left_double_circle.js +1 -15
- package/dist/icons/arrow/chevron_right.js +1 -15
- package/dist/icons/arrow/chevron_right_circle.js +1 -15
- package/dist/icons/arrow/chevron_right_double.js +1 -15
- package/dist/icons/arrow/chevron_right_double_circle.js +1 -15
- package/dist/icons/arrow/chevron_scroll.js +1 -15
- package/dist/icons/arrow/chevron_up.js +1 -15
- package/dist/icons/arrow/chevron_up_circle.js +1 -15
- package/dist/icons/arrow/chevron_up_double.js +1 -15
- package/dist/icons/arrow/chevron_up_double_circle.js +1 -15
- package/dist/icons/arrow/forward_all.js +1 -15
- package/dist/icons/arrow/forward_all_bold.js +1 -15
- package/dist/icons/arrow/forward_bold.js +1 -15
- package/dist/icons/arrow/redo.js +1 -15
- package/dist/icons/arrow/redo_bold.js +1 -15
- package/dist/icons/arrow/reply.js +1 -15
- package/dist/icons/arrow/reply_all.js +1 -15
- package/dist/icons/arrow/reply_all_bold.js +1 -15
- package/dist/icons/arrow/reply_bold.js +1 -15
- package/dist/icons/arrow/undo.js +1 -15
- package/dist/icons/arrow/undo_bold.js +1 -15
- package/dist/icons/audio_video/drag_indicator.js +1 -15
- package/dist/icons/audio_video/eject.js +1 -15
- package/dist/icons/audio_video/equalizer.js +1 -15
- package/dist/icons/audio_video/fast_forward.js +1 -15
- package/dist/icons/audio_video/fast_forward_30.js +1 -15
- package/dist/icons/audio_video/fullscreen.js +1 -15
- package/dist/icons/audio_video/headphones.js +1 -15
- package/dist/icons/audio_video/library_add.js +1 -15
- package/dist/icons/audio_video/library_music.js +1 -15
- package/dist/icons/audio_video/microphone.js +1 -15
- package/dist/icons/audio_video/musical_note.js +1 -15
- package/dist/icons/audio_video/next.js +1 -15
- package/dist/icons/audio_video/pause.js +1 -15
- package/dist/icons/audio_video/pause_circle.js +1 -15
- package/dist/icons/audio_video/play.js +1 -15
- package/dist/icons/audio_video/play_circle.js +1 -15
- package/dist/icons/audio_video/play_display.js +1 -15
- package/dist/icons/audio_video/play_pause.js +1 -15
- package/dist/icons/audio_video/play_solid.js +1 -15
- package/dist/icons/audio_video/player_list.js +1 -15
- package/dist/icons/audio_video/player_list_add.js +1 -15
- package/dist/icons/audio_video/player_list_play.js +1 -15
- package/dist/icons/audio_video/previous.js +1 -15
- package/dist/icons/audio_video/radio.js +1 -15
- package/dist/icons/audio_video/record.js +1 -15
- package/dist/icons/audio_video/repeat.js +1 -15
- package/dist/icons/audio_video/rewind.js +1 -15
- package/dist/icons/audio_video/rewind_30.js +1 -15
- package/dist/icons/audio_video/shuffle.js +1 -15
- package/dist/icons/audio_video/sound_wave.js +1 -15
- package/dist/icons/audio_video/stop.js +1 -15
- package/dist/icons/audio_video/stop_circle.js +1 -15
- package/dist/icons/audio_video/subscriptions.js +1 -15
- package/dist/icons/audio_video/tuner.js +1 -15
- package/dist/icons/audio_video/volume.js +1 -15
- package/dist/icons/audio_video/volume_high.js +1 -15
- package/dist/icons/audio_video/volume_low.js +1 -15
- package/dist/icons/audio_video/volume_slash.js +1 -15
- package/dist/icons/basic/aa_sansserif.js +1 -16
- package/dist/icons/basic/aa_serif.js +1 -16
- package/dist/icons/basic/anchor.js +1 -17
- package/dist/icons/basic/bible.js +1 -15
- package/dist/icons/basic/bold.js +1 -15
- package/dist/icons/basic/book.js +1 -15
- package/dist/icons/basic/book_open.js +1 -15
- package/dist/icons/basic/bookmark.js +1 -15
- package/dist/icons/basic/bookmark_add.js +1 -15
- package/dist/icons/basic/bookmark_slash.js +1 -15
- package/dist/icons/basic/bookmarks.js +1 -15
- package/dist/icons/basic/books.js +1 -18
- package/dist/icons/basic/box.js +1 -15
- package/dist/icons/basic/briefcase.js +1 -15
- package/dist/icons/basic/browse_activity.js +1 -15
- package/dist/icons/basic/browser.js +1 -15
- package/dist/icons/basic/browser_slash.js +1 -15
- package/dist/icons/basic/calculator.js +1 -15
- package/dist/icons/basic/camera.js +1 -15
- package/dist/icons/basic/camera_add.js +1 -15
- package/dist/icons/basic/camera_slash.js +1 -15
- package/dist/icons/basic/checkmark.js +1 -15
- package/dist/icons/basic/checkmark_circle.js +1 -17
- package/dist/icons/basic/checkmark_filled.js +1 -15
- package/dist/icons/basic/checkmarks.js +1 -15
- package/dist/icons/basic/circle.js +1 -15
- package/dist/icons/basic/circle_slash.js +1 -17
- package/dist/icons/basic/clear_text_style.js +1 -15
- package/dist/icons/basic/close.js +1 -15
- package/dist/icons/basic/close_circle.js +1 -15
- package/dist/icons/basic/close_filled.js +1 -15
- package/dist/icons/basic/copy.js +1 -15
- package/dist/icons/basic/delete.js +1 -15
- package/dist/icons/basic/detail.js +1 -15
- package/dist/icons/basic/dot.js +1 -15
- package/dist/icons/basic/download.js +1 -15
- package/dist/icons/basic/download_arrow.js +1 -15
- package/dist/icons/basic/droplet.js +1 -17
- package/dist/icons/basic/ellipsis_horizontal.js +1 -15
- package/dist/icons/basic/ellipsis_horizontal_circle.js +1 -15
- package/dist/icons/basic/ellipsis_vertical.js +1 -15
- package/dist/icons/basic/ellipsis_vertical_circle.js +1 -15
- package/dist/icons/basic/eye.js +1 -15
- package/dist/icons/basic/eye_slash.js +1 -15
- package/dist/icons/basic/fingerprint.js +1 -15
- package/dist/icons/basic/flag.js +1 -15
- package/dist/icons/basic/flag_wave.js +1 -15
- package/dist/icons/basic/flag_wave_filled.js +1 -15
- package/dist/icons/basic/flame.js +1 -15
- package/dist/icons/basic/gauge.js +1 -15
- package/dist/icons/basic/glasses.js +1 -15
- package/dist/icons/basic/graduation_cap.js +1 -15
- package/dist/icons/basic/hashmark.js +1 -15
- package/dist/icons/basic/heart.js +1 -15
- package/dist/icons/basic/heart_slash.js +1 -15
- package/dist/icons/basic/highlighter.js +1 -15
- package/dist/icons/basic/home.js +1 -15
- package/dist/icons/basic/image.js +1 -15
- package/dist/icons/basic/inbox.js +1 -15
- package/dist/icons/basic/italic.js +1 -15
- package/dist/icons/basic/layers.js +1 -15
- package/dist/icons/basic/lightening.js +1 -15
- package/dist/icons/basic/lightening_slash.js +1 -15
- package/dist/icons/basic/link.js +1 -15
- package/dist/icons/basic/link_slash.js +1 -15
- package/dist/icons/basic/loudspeaker.js +1 -15
- package/dist/icons/basic/maximize.js +1 -15
- package/dist/icons/basic/menu.js +1 -15
- package/dist/icons/basic/menu_circle.js +1 -15
- package/dist/icons/basic/menu_dots.js +1 -15
- package/dist/icons/basic/microphone_slash.js +1 -15
- package/dist/icons/basic/minimize.js +1 -15
- package/dist/icons/basic/minus.js +1 -15
- package/dist/icons/basic/minus_circle.js +1 -15
- package/dist/icons/basic/move_item.js +1 -15
- package/dist/icons/basic/new.js +1 -15
- package/dist/icons/basic/newspaper.js +1 -15
- package/dist/icons/basic/node.js +1 -15
- package/dist/icons/basic/note_pad.js +1 -16
- package/dist/icons/basic/options.js +1 -15
- package/dist/icons/basic/paint_brush.js +1 -15
- package/dist/icons/basic/paperclip.js +1 -15
- package/dist/icons/basic/paperclip_slash.js +1 -15
- package/dist/icons/basic/pencil.js +1 -15
- package/dist/icons/basic/pencil_pad.js +1 -15
- package/dist/icons/basic/plus.js +1 -15
- package/dist/icons/basic/plus_circle.js +1 -15
- package/dist/icons/basic/presentation.js +1 -15
- package/dist/icons/basic/printer.js +1 -15
- package/dist/icons/basic/profile.js +1 -15
- package/dist/icons/basic/profile_check.js +1 -15
- package/dist/icons/basic/pulse.js +1 -15
- package/dist/icons/basic/qr_code.js +1 -15
- package/dist/icons/basic/resize.js +1 -17
- package/dist/icons/basic/scan.js +1 -15
- package/dist/icons/basic/scissors.js +1 -15
- package/dist/icons/basic/screenshot.js +1 -15
- package/dist/icons/basic/search.js +1 -15
- package/dist/icons/basic/select_item.js +1 -16
- package/dist/icons/basic/settings.js +1 -15
- package/dist/icons/basic/share.js +1 -15
- package/dist/icons/basic/share_external.js +1 -15
- package/dist/icons/basic/square.js +1 -15
- package/dist/icons/basic/star.js +1 -15
- package/dist/icons/basic/star_circle.js +1 -15
- package/dist/icons/basic/star_filled.js +1 -15
- package/dist/icons/basic/star_filled_half.js +1 -15
- package/dist/icons/basic/star_slash.js +1 -15
- package/dist/icons/basic/sticker.js +1 -15
- package/dist/icons/basic/strikethrough.js +1 -15
- package/dist/icons/basic/subtask.js +1 -16
- package/dist/icons/basic/tax.js +1 -18
- package/dist/icons/basic/text_bg_color.js +1 -15
- package/dist/icons/basic/text_color.js +1 -15
- package/dist/icons/basic/textbox.js +1 -15
- package/dist/icons/basic/thumbs_down.js +1 -15
- package/dist/icons/basic/thumbs_up.js +1 -15
- package/dist/icons/basic/thumbs_up_filled.js +1 -15
- package/dist/icons/basic/toggle_left.js +1 -15
- package/dist/icons/basic/toggle_right.js +1 -15
- package/dist/icons/basic/translate.js +1 -15
- package/dist/icons/basic/trash.js +1 -15
- package/dist/icons/basic/trash_slash.js +1 -15
- package/dist/icons/basic/underline.js +1 -15
- package/dist/icons/basic/upload.js +1 -15
- package/dist/icons/basic/video.js +1 -15
- package/dist/icons/basic/video_add.js +1 -16
- package/dist/icons/basic/video_slash.js +1 -15
- package/dist/icons/basic/wrench.js +1 -15
- package/dist/icons/basic/zoom_in.js +1 -15
- package/dist/icons/basic/zoom_out.js +1 -15
- package/dist/icons/data/bar_chart.js +1 -15
- package/dist/icons/data/bar_chart_downward.js +1 -15
- package/dist/icons/data/bar_chart_downward_outline.js +1 -15
- package/dist/icons/data/bar_chart_upward.js +1 -15
- package/dist/icons/data/bar_chart_upward_outline.js +1 -15
- package/dist/icons/data/candlestick_chart.js +1 -15
- package/dist/icons/data/four_circles.js +1 -15
- package/dist/icons/data/legend_toggle.js +1 -15
- package/dist/icons/data/line_chart.js +1 -15
- package/dist/icons/data/line_chart_area.js +1 -15
- package/dist/icons/data/line_chart_area_shaded.js +1 -15
- package/dist/icons/data/line_chart_double.js +1 -15
- package/dist/icons/data/line_chart_downward.js +1 -15
- package/dist/icons/data/line_chart_node.js +1 -15
- package/dist/icons/data/line_chart_outline.js +1 -15
- package/dist/icons/data/line_chart_search.js +1 -15
- package/dist/icons/data/line_chart_stars.js +1 -15
- package/dist/icons/data/line_chart_upward.js +1 -15
- package/dist/icons/data/pie_chart.js +1 -16
- package/dist/icons/data/tree.js +1 -15
- package/dist/icons/email/mail.js +1 -15
- package/dist/icons/email/mail_check.js +1 -15
- package/dist/icons/email/mail_minus.js +1 -15
- package/dist/icons/email/mail_send.js +1 -15
- package/dist/icons/email/send.js +1 -15
- package/dist/icons/email/send_close.js +1 -15
- package/dist/icons/email/send_schedule.js +1 -15
- package/dist/icons/email/send_text.js +1 -15
- package/dist/icons/emoji/emoji_add.js +1 -15
- package/dist/icons/emoji/laughing.js +1 -15
- package/dist/icons/emoji/neutral.js +1 -15
- package/dist/icons/emoji/sad.js +1 -15
- package/dist/icons/emoji/shocked.js +1 -15
- package/dist/icons/emoji/smile.js +1 -15
- package/dist/icons/file/clipboard.js +1 -15
- package/dist/icons/file/clipboard_check.js +1 -15
- package/dist/icons/file/clipboard_close.js +1 -15
- package/dist/icons/file/clipboard_minus.js +1 -15
- package/dist/icons/file/clipboard_plus.js +1 -15
- package/dist/icons/file/clipboard_text.js +1 -15
- package/dist/icons/file/file.js +1 -15
- package/dist/icons/file/file_add.js +1 -15
- package/dist/icons/file/file_check.js +1 -15
- package/dist/icons/file/file_close.js +1 -15
- package/dist/icons/file/file_code.js +1 -15
- package/dist/icons/file/file_download.js +1 -15
- package/dist/icons/file/file_draft.js +1 -15
- package/dist/icons/file/file_gear.js +1 -16
- package/dist/icons/file/file_minus.js +1 -15
- package/dist/icons/file/file_plus.js +1 -15
- package/dist/icons/file/file_scan.js +1 -15
- package/dist/icons/file/file_shred.js +1 -15
- package/dist/icons/file/file_text.js +1 -15
- package/dist/icons/file/file_upload.js +1 -15
- package/dist/icons/file/folder.js +1 -15
- package/dist/icons/file/folder_add.js +1 -15
- package/dist/icons/file/folder_arrow.js +1 -15
- package/dist/icons/file/folder_check.js +1 -15
- package/dist/icons/file/folder_close.js +1 -15
- package/dist/icons/file/folder_cloud.js +1 -15
- package/dist/icons/file/folder_gear.js +1 -16
- package/dist/icons/file/folder_minus.js +1 -15
- package/dist/icons/file/folder_music.js +1 -15
- package/dist/icons/file/folder_open.js +1 -15
- package/dist/icons/file/folder_plus.js +1 -15
- package/dist/icons/file/folder_zip.js +1 -15
- package/dist/icons/file/note.js +1 -15
- package/dist/icons/file/note_text.js +1 -15
- package/dist/icons/file/pdf.js +1 -15
- package/dist/icons/file/photo.js +1 -15
- package/dist/icons/finance/bitcoin.js +1 -15
- package/dist/icons/finance/coins.js +1 -19
- package/dist/icons/finance/credit_card.js +1 -15
- package/dist/icons/finance/credit_card_add.js +1 -15
- package/dist/icons/finance/credit_card_face.js +1 -15
- package/dist/icons/finance/credit_card_member.js +1 -15
- package/dist/icons/finance/credit_card_outcome.js +1 -15
- package/dist/icons/finance/credit_card_scan.js +1 -15
- package/dist/icons/finance/credit_card_share.js +1 -15
- package/dist/icons/finance/credit_card_slash.js +1 -15
- package/dist/icons/finance/currency_exchange.js +1 -15
- package/dist/icons/finance/dollar.js +1 -15
- package/dist/icons/finance/ethereum.js +1 -15
- package/dist/icons/finance/paypass.js +1 -15
- package/dist/icons/finance/strongbox.js +1 -15
- package/dist/icons/finance/wallet.js +1 -15
- package/dist/icons/index.js +1 -1095
- package/dist/icons/layout/block_align_bottom.js +1 -15
- package/dist/icons/layout/block_align_center.js +1 -15
- package/dist/icons/layout/block_align_left.js +1 -15
- package/dist/icons/layout/block_align_middle.js +1 -15
- package/dist/icons/layout/block_align_right.js +1 -15
- package/dist/icons/layout/block_align_top.js +1 -15
- package/dist/icons/layout/block_horizontal.js +1 -15
- package/dist/icons/layout/block_vertical.js +1 -15
- package/dist/icons/layout/edit_shape.js +1 -15
- package/dist/icons/layout/elements.js +1 -15
- package/dist/icons/layout/elements_add.js +1 -15
- package/dist/icons/layout/elements_filled.js +1 -15
- package/dist/icons/layout/elements_masonry.js +1 -15
- package/dist/icons/layout/frame.js +1 -15
- package/dist/icons/layout/frame_stack.js +1 -15
- package/dist/icons/layout/grid.js +1 -15
- package/dist/icons/layout/grid_column_three.js +1 -15
- package/dist/icons/layout/grid_column_two.js +1 -15
- package/dist/icons/layout/grid_dynamic.js +1 -15
- package/dist/icons/layout/grid_frame.js +1 -15
- package/dist/icons/layout/grid_row_three.js +1 -15
- package/dist/icons/layout/grid_row_two.js +1 -15
- package/dist/icons/layout/grid_six.js +1 -15
- package/dist/icons/layout/grid_small.js +1 -15
- package/dist/icons/layout/iframe.js +1 -15
- package/dist/icons/layout/kanban.js +1 -15
- package/dist/icons/layout/layout.js +1 -15
- package/dist/icons/layout/list.js +1 -15
- package/dist/icons/layout/list_filled.js +1 -20
- package/dist/icons/layout/padding.js +1 -15
- package/dist/icons/layout/page_break.js +1 -15
- package/dist/icons/layout/rotate_left.js +1 -15
- package/dist/icons/layout/rotate_right.js +1 -15
- package/dist/icons/layout/ruler.js +1 -15
- package/dist/icons/layout/segment.js +1 -15
- package/dist/icons/layout/select_area.js +1 -15
- package/dist/icons/layout/select_boundary.js +1 -15
- package/dist/icons/layout/sidebar_left.js +1 -15
- package/dist/icons/layout/sidebar_right.js +1 -15
- package/dist/icons/layout/slides.js +1 -15
- package/dist/icons/layout/slides_horizontal.js +1 -15
- package/dist/icons/layout/slides_vertical.js +1 -20
- package/dist/icons/layout/stack.js +1 -15
- package/dist/icons/layout/text.js +1 -15
- package/dist/icons/maps/atlas.js +1 -15
- package/dist/icons/maps/compass.js +1 -15
- package/dist/icons/maps/direction.js +1 -15
- package/dist/icons/maps/direction_angled.js +1 -15
- package/dist/icons/maps/globe.js +1 -15
- package/dist/icons/maps/globe_slash.js +1 -15
- package/dist/icons/maps/location.js +1 -15
- package/dist/icons/maps/location_slash.js +1 -15
- package/dist/icons/maps/map.js +1 -15
- package/dist/icons/maps/marker.js +1 -15
- package/dist/icons/maps/panorama.js +1 -15
- package/dist/icons/maps/pin.js +1 -15
- package/dist/icons/maps/pin_arrow.js +1 -15
- package/dist/icons/maps/pin_location.js +1 -15
- package/dist/icons/maps/pin_plus.js +1 -15
- package/dist/icons/maps/pin_question.js +1 -15
- package/dist/icons/maps/pin_slash.js +1 -15
- package/dist/icons/maps/push_pin.js +1 -15
- package/dist/icons/maps/push_pin_filled.js +1 -15
- package/dist/icons/maps/push_pin_slash.js +1 -15
- package/dist/icons/maps/radar.js +1 -15
- package/dist/icons/maps/route.js +1 -15
- package/dist/icons/message/bubble.js +1 -15
- package/dist/icons/message/bubble_question.js +1 -15
- package/dist/icons/message/comment.js +1 -15
- package/dist/icons/message/comment_add.js +1 -15
- package/dist/icons/message/comment_check.js +1 -15
- package/dist/icons/message/comment_close.js +1 -15
- package/dist/icons/message/comment_minus.js +1 -15
- package/dist/icons/message/comment_text.js +1 -15
- package/dist/icons/misc/advertisement.js +1 -15
- package/dist/icons/misc/atom.js +1 -15
- package/dist/icons/misc/bone.js +1 -15
- package/dist/icons/misc/brightness_high.js +1 -15
- package/dist/icons/misc/brightness_low.js +1 -15
- package/dist/icons/misc/contrast.js +1 -15
- package/dist/icons/misc/crosshairs.js +1 -15
- package/dist/icons/misc/crown.js +1 -15
- package/dist/icons/misc/footprint.js +1 -15
- package/dist/icons/misc/form.js +1 -15
- package/dist/icons/misc/funnel.js +1 -15
- package/dist/icons/misc/infinite.js +1 -15
- package/dist/icons/misc/insert_button.js +1 -15
- package/dist/icons/misc/light_bulb.js +1 -15
- package/dist/icons/misc/moon.js +1 -15
- package/dist/icons/misc/nut.js +1 -15
- package/dist/icons/misc/planet.js +1 -15
- package/dist/icons/misc/plus_thick.js +1 -15
- package/dist/icons/misc/pocket.js +1 -15
- package/dist/icons/misc/rocket.js +1 -15
- package/dist/icons/misc/soup.js +1 -19
- package/dist/icons/misc/sun.js +1 -15
- package/dist/icons/misc/toy_horse.js +1 -15
- package/dist/icons/misc/trophy.js +1 -15
- package/dist/icons/misc/watercloset.js +1 -15
- package/dist/icons/notifications/alert_circle.js +1 -15
- package/dist/icons/notifications/alert_octogon.js +1 -15
- package/dist/icons/notifications/alert_triangle.js +1 -15
- package/dist/icons/notifications/app_notification.js +1 -15
- package/dist/icons/notifications/bell.js +1 -15
- package/dist/icons/notifications/bell_alert.js +1 -15
- package/dist/icons/notifications/bell_checkmark.js +1 -15
- package/dist/icons/notifications/bell_minus.js +1 -15
- package/dist/icons/notifications/bell_plus.js +1 -15
- package/dist/icons/notifications/bell_ring.js +1 -17
- package/dist/icons/notifications/bell_slash.js +1 -15
- package/dist/icons/notifications/information.js +1 -15
- package/dist/icons/notifications/minus_octogon.js +1 -15
- package/dist/icons/notifications/question_circle.js +1 -15
- package/dist/icons/people/group.js +1 -15
- package/dist/icons/people/group_add.js +1 -15
- package/dist/icons/people/group_chat.js +1 -17
- package/dist/icons/people/group_remove.js +1 -15
- package/dist/icons/people/group_send.js +1 -16
- package/dist/icons/people/groups.js +1 -15
- package/dist/icons/people/person.js +1 -15
- package/dist/icons/people/person_add.js +1 -15
- package/dist/icons/people/person_checkmark.js +1 -15
- package/dist/icons/people/person_circle.js +1 -17
- package/dist/icons/people/person_close.js +1 -17
- package/dist/icons/people/person_remove.js +1 -15
- package/dist/icons/people/person_slash.js +1 -17
- package/dist/icons/phone/keypad.js +1 -15
- package/dist/icons/phone/phone.js +1 -15
- package/dist/icons/phone/phone_add.js +1 -15
- package/dist/icons/phone/phone_calling.js +1 -15
- package/dist/icons/phone/phone_check.js +1 -15
- package/dist/icons/phone/phone_close.js +1 -15
- package/dist/icons/phone/phone_decline.js +1 -15
- package/dist/icons/phone/phone_forwarded.js +1 -15
- package/dist/icons/phone/phone_hash.js +1 -15
- package/dist/icons/phone/phone_incoming.js +1 -15
- package/dist/icons/phone/phone_outgoing.js +1 -15
- package/dist/icons/phone/phone_pause.js +1 -15
- package/dist/icons/phone/phone_slash.js +1 -15
- package/dist/icons/phone/voicemail.js +1 -15
- package/dist/icons/security/key.js +1 -15
- package/dist/icons/security/key_slash.js +1 -15
- package/dist/icons/security/lock.js +1 -15
- package/dist/icons/security/lock_circle.js +1 -15
- package/dist/icons/security/lock_open.js +1 -15
- package/dist/icons/security/lock_slash.js +1 -15
- package/dist/icons/security/shield.js +1 -15
- package/dist/icons/security/shield_checkmark.js +1 -15
- package/dist/icons/security/shield_lock.js +1 -15
- package/dist/icons/security/shield_slash.js +1 -15
- package/dist/icons/security/verified.js +1 -15
- package/dist/icons/shopping/basket.js +1 -15
- package/dist/icons/shopping/cart.js +1 -15
- package/dist/icons/shopping/cart_filled.js +1 -15
- package/dist/icons/shopping/coupon.js +1 -15
- package/dist/icons/shopping/coupon_cut.js +1 -15
- package/dist/icons/shopping/delivery.js +1 -15
- package/dist/icons/shopping/discount.js +1 -15
- package/dist/icons/shopping/gift.js +1 -15
- package/dist/icons/shopping/gift_bag.js +1 -15
- package/dist/icons/shopping/inventory.js +1 -15
- package/dist/icons/shopping/point_of_sale.js +1 -15
- package/dist/icons/shopping/shirt.js +1 -15
- package/dist/icons/shopping/tag.js +1 -15
- package/dist/icons/shopping/tag_diagonal.js +1 -15
- package/dist/icons/shopping/tote.js +1 -15
- package/dist/icons/special/upload_audio.js +1 -20
- package/dist/icons/special/upload_file.js +1 -15
- package/dist/icons/special/upload_image.js +1 -17
- package/dist/icons/special/upload_video.js +1 -18
- package/dist/icons/symbols/at.js +1 -15
- package/dist/icons/symbols/cc.js +1 -15
- package/dist/icons/symbols/cmd.js +1 -15
- package/dist/icons/symbols/facebook.js +1 -15
- package/dist/icons/symbols/google.js +1 -18
- package/dist/icons/symbols/hash.js +1 -15
- package/dist/icons/symbols/instagram.js +1 -27
- package/dist/icons/symbols/messenger.js +1 -21
- package/dist/icons/symbols/twitter.js +1 -15
- package/dist/icons/technology/battery.js +1 -15
- package/dist/icons/technology/battery_100.js +1 -15
- package/dist/icons/technology/battery_20.js +1 -15
- package/dist/icons/technology/battery_40.js +1 -15
- package/dist/icons/technology/battery_60.js +1 -15
- package/dist/icons/technology/battery_80.js +1 -15
- package/dist/icons/technology/battery_charging.js +1 -15
- package/dist/icons/technology/battery_slash.js +1 -15
- package/dist/icons/technology/devices.js +1 -15
- package/dist/icons/technology/floppy_disk.js +1 -15
- package/dist/icons/technology/iphone.js +1 -15
- package/dist/icons/technology/laptop.js +1 -15
- package/dist/icons/technology/mobile.js +1 -15
- package/dist/icons/technology/monitor.js +1 -15
- package/dist/icons/technology/server.js +1 -15
- package/dist/icons/technology/sim_card.js +1 -15
- package/dist/icons/technology/usb_stick.js +1 -15
- package/dist/icons/text/align_center.js +1 -15
- package/dist/icons/text/align_justified.js +1 -15
- package/dist/icons/text/align_left.js +1 -15
- package/dist/icons/text/align_right.js +1 -15
- package/dist/icons/text/code_block.js +1 -15
- package/dist/icons/text/divider.js +1 -15
- package/dist/icons/text/footnote.js +1 -17
- package/dist/icons/text/indent_decrease.js +1 -15
- package/dist/icons/text/indent_increase.js +1 -15
- package/dist/icons/text/list_ordered.js +1 -15
- package/dist/icons/text/list_unordered.js +1 -15
- package/dist/icons/text/quote.js +1 -15
- package/dist/icons/text/table.js +1 -15
- package/dist/icons/time/alarm.js +1 -15
- package/dist/icons/time/alarm_checkmark.js +1 -15
- package/dist/icons/time/alarm_minus.js +1 -15
- package/dist/icons/time/alarm_plus.js +1 -15
- package/dist/icons/time/alarm_slash.js +1 -15
- package/dist/icons/time/alarm_snooze.js +1 -15
- package/dist/icons/time/calendar.js +1 -15
- package/dist/icons/time/calendar_add.js +1 -15
- package/dist/icons/time/calendar_checkmark.js +1 -15
- package/dist/icons/time/calendar_close.js +1 -15
- package/dist/icons/time/calendar_dates.js +1 -15
- package/dist/icons/time/calendar_minus.js +1 -15
- package/dist/icons/time/calendar_plus.js +1 -15
- package/dist/icons/time/calendar_scroll.js +1 -17
- package/dist/icons/time/clock.js +1 -15
- package/dist/icons/time/clock_history.js +1 -15
- package/dist/icons/time/stopwatch.js +1 -15
- package/dist/icons/time/timer.js +1 -15
- package/dist/icons/time/watch.js +1 -15
- package/dist/index.js +1 -117
- package/dist/src/components/surfaces/discuss_post/discuss_post.d.ts +4 -0
- package/dist/src/components/surfaces/discuss_post/index.d.ts +2 -0
- package/dist/src/components/surfaces/index.d.ts +2 -0
- package/dist/styles/output.css +1776 -0
- package/dist/utils/date.js +1 -73
- package/dist/utils/function.js +1 -5
- package/package.json +4 -3
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
|
|
5
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
6
|
-
|
|
7
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
8
|
-
|
|
9
|
-
const Subscribed = () => (React__default.default.createElement("svg", { fill: "none", viewBox: "0 0 20 20" },
|
|
10
|
-
React__default.default.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M19.088 9.994a9.088 9.088 0 1 1-18.176 0 9.088 9.088 0 0 1 18.176 0Z", clipRule: "evenodd" }),
|
|
11
|
-
React__default.default.createElement("path", { fill: "url(#a)", d: "M17.088 9.994a7.088 7.088 0 1 1-14.176 0 7.088 7.088 0 0 1 14.176 0Z" }),
|
|
12
|
-
React__default.default.createElement("path", { fill: "#fff", d: "M9.25 5h1.5v.936c.338.048.648.134.927.26.458.202.813.485 1.067.847.255.362.386.781.394 1.258h-1.665a.976.976 0 0 0-.413-.734c-.244-.175-.575-.262-.992-.262-.283 0-.523.039-.718.117a1.01 1.01 0 0 0-.45.316.748.748 0 0 0-.152.461.645.645 0 0 0 .092.375c.07.107.165.2.285.278.12.075.26.141.418.199.157.054.326.101.505.14l.738.172c.359.078.688.183.988.313.299.13.559.29.778.48a2.003 2.003 0 0 1 .698 1.559c-.003.49-.131.914-.385 1.273-.252.357-.615.634-1.091.832-.302.125-.643.21-1.024.255V15h-1.5v-.942a4.002 4.002 0 0 1-.923-.242c-.49-.198-.872-.49-1.148-.879-.273-.39-.416-.873-.429-1.449h1.681c.019.269.098.492.237.672.142.177.33.311.566.402.238.089.507.133.806.133.294 0 .55-.041.767-.125.219-.083.389-.199.509-.347a.79.79 0 0 0 .18-.512c0-.18-.054-.33-.164-.453a1.248 1.248 0 0 0-.473-.313 4.908 4.908 0 0 0-.759-.234l-.894-.219c-.693-.164-1.24-.42-1.641-.77-.402-.348-.601-.818-.598-1.41-.003-.484.13-.907.397-1.269.27-.362.64-.645 1.111-.848.242-.104.5-.181.775-.232V5Z" }),
|
|
13
|
-
React__default.default.createElement("defs", null,
|
|
14
|
-
React__default.default.createElement("radialGradient", { id: "a", cx: "0", cy: "0", r: "1", gradientTransform: "rotate(-49.924 18.2 -.497) scale(14.7338 19.4196)", gradientUnits: "userSpaceOnUse" },
|
|
15
|
-
React__default.default.createElement("stop", { stopColor: "#09B3A1" }),
|
|
16
|
-
React__default.default.createElement("stop", { offset: "1", stopColor: "#3AC15E" })))));
|
|
17
|
-
|
|
18
|
-
exports.Subscribed = Subscribed;
|
|
1
|
+
"use strict";var React=require("react");function _interopDefaultCompat(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var React__default=_interopDefaultCompat(React);const Subscribed=()=>React__default.default.createElement("svg",{fill:"none",viewBox:"0 0 20 20"},React__default.default.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M19.088 9.994a9.088 9.088 0 1 1-18.176 0 9.088 9.088 0 0 1 18.176 0Z",clipRule:"evenodd"}),React__default.default.createElement("path",{fill:"url(#a)",d:"M17.088 9.994a7.088 7.088 0 1 1-14.176 0 7.088 7.088 0 0 1 14.176 0Z"}),React__default.default.createElement("path",{fill:"#fff",d:"M9.25 5h1.5v.936c.338.048.648.134.927.26.458.202.813.485 1.067.847.255.362.386.781.394 1.258h-1.665a.976.976 0 0 0-.413-.734c-.244-.175-.575-.262-.992-.262-.283 0-.523.039-.718.117a1.01 1.01 0 0 0-.45.316.748.748 0 0 0-.152.461.645.645 0 0 0 .092.375c.07.107.165.2.285.278.12.075.26.141.418.199.157.054.326.101.505.14l.738.172c.359.078.688.183.988.313.299.13.559.29.778.48a2.003 2.003 0 0 1 .698 1.559c-.003.49-.131.914-.385 1.273-.252.357-.615.634-1.091.832-.302.125-.643.21-1.024.255V15h-1.5v-.942a4.002 4.002 0 0 1-.923-.242c-.49-.198-.872-.49-1.148-.879-.273-.39-.416-.873-.429-1.449h1.681c.019.269.098.492.237.672.142.177.33.311.566.402.238.089.507.133.806.133.294 0 .55-.041.767-.125.219-.083.389-.199.509-.347a.79.79 0 0 0 .18-.512c0-.18-.054-.33-.164-.453a1.248 1.248 0 0 0-.473-.313 4.908 4.908 0 0 0-.759-.234l-.894-.219c-.693-.164-1.24-.42-1.641-.77-.402-.348-.601-.818-.598-1.41-.003-.484.13-.907.397-1.269.27-.362.64-.645 1.111-.848.242-.104.5-.181.775-.232V5Z"}),React__default.default.createElement("defs",null,React__default.default.createElement("radialGradient",{id:"a",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(-49.924 18.2 -.497) scale(14.7338 19.4196)",gradientUnits:"userSpaceOnUse"},React__default.default.createElement("stop",{stopColor:"#09B3A1"}),React__default.default.createElement("stop",{offset:"1",stopColor:"#3AC15E"}))));exports.Subscribed=Subscribed;
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
var colors = require('../../../common/colors.js');
|
|
7
|
-
|
|
8
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
-
|
|
12
|
-
const Icon = ({ as, children, color = 'grey-3', size = 16, sx, ...rest }) => {
|
|
13
|
-
return (React__default.default.createElement(SVG, { as: as, width: size, height: size, viewBox: "0 0 16 16", fill: colors.colorReference[color], xmlns: "http://www.w3.org/2000/svg", "$sx": sx, ...rest }, children));
|
|
14
|
-
};
|
|
15
|
-
const SVG = styled.styled.svg `
|
|
16
|
-
${({ $sx }) => ($sx ? $sx : '')}
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
exports.Icon = Icon;
|
|
2
|
+
"use strict";var React=require("react"),styled=require("styled-components"),colors=require("../../../common/colors.js");function _interopDefaultCompat(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var React__default=_interopDefaultCompat(React);const Icon=({as:e,children:t,color:o="grey-3",size:r=16,sx:c,...s})=>React__default.default.createElement(SVG,{as:e,width:r,height:r,viewBox:"0 0 16 16",fill:colors.colorReference[o],xmlns:"http://www.w3.org/2000/svg",$sx:c,...s},t),SVG=styled.styled.svg`
|
|
3
|
+
${({$sx:e})=>e||""}
|
|
4
|
+
`;exports.Icon=Icon;
|
|
@@ -1,131 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
var date$1 = require('../../../common/date.js');
|
|
7
|
-
var button = require('../../actions/button/button.js');
|
|
8
|
-
var paragraph = require('../../atoms/typography/paragraph.js');
|
|
9
|
-
var chevron_left = require('../../../icons/arrow/chevron_left.js');
|
|
10
|
-
var chevron_right = require('../../../icons/arrow/chevron_right.js');
|
|
11
|
-
var calendar = require('../../../icons/time/calendar.js');
|
|
12
|
-
var date = require('../../../utils/date.js');
|
|
13
|
-
|
|
14
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
|
-
|
|
16
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
17
|
-
|
|
18
|
-
const CalendarInput = ({ selectedDate, onSelect: parentOnSelect, disablePastDates, }) => {
|
|
19
|
-
const today = new Date();
|
|
20
|
-
today.setHours(0);
|
|
21
|
-
today.setMinutes(0);
|
|
22
|
-
today.setSeconds(0);
|
|
23
|
-
today.setMilliseconds(0);
|
|
24
|
-
const firstOfMonth = new Date(today);
|
|
25
|
-
firstOfMonth.setDate(1);
|
|
26
|
-
const pickerRef = React__default.default.useRef(null);
|
|
27
|
-
const [show, setShow] = React__default.default.useState(false);
|
|
28
|
-
const [displayDate, setDisplayDate] = React__default.default.useState(() => selectedDate?.toDateString() || new Date().toDateString());
|
|
29
|
-
const [componentSelectedDate, setComponentSelectedDate] = React__default.default.useState(() => selectedDate?.toDateString() || new Date().toDateString());
|
|
30
|
-
React__default.default.useEffect(() => {
|
|
31
|
-
setComponentSelectedDate(selectedDate?.toDateString() || new Date().toDateString());
|
|
32
|
-
}, [selectedDate]);
|
|
33
|
-
const handleShow = () => setShow((prev) => !prev);
|
|
34
|
-
const handleBlur = (event) => {
|
|
35
|
-
if (pickerRef?.current &&
|
|
36
|
-
!pickerRef?.current?.contains(event.relatedTarget)) {
|
|
37
|
-
setShow(false);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
const handlePreviousMonth = () => {
|
|
41
|
-
setDisplayDate((prev) => {
|
|
42
|
-
const newDate = new Date(prev);
|
|
43
|
-
newDate.setMonth(newDate.getMonth() - 1);
|
|
44
|
-
return newDate.toDateString();
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
const handleNextMonth = () => {
|
|
48
|
-
setDisplayDate((prev) => {
|
|
49
|
-
const newDate = new Date(prev);
|
|
50
|
-
newDate.setMonth(newDate.getMonth() + 1);
|
|
51
|
-
return newDate.toDateString();
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
const onSelect = (newDate) => {
|
|
55
|
-
setComponentSelectedDate(newDate.toDateString());
|
|
56
|
-
};
|
|
57
|
-
const handleApply = () => {
|
|
58
|
-
parentOnSelect(new Date(componentSelectedDate));
|
|
59
|
-
setShow(false);
|
|
60
|
-
};
|
|
61
|
-
const handleClick = (event) => {
|
|
62
|
-
const target = event.target;
|
|
63
|
-
const day = target.getAttribute('data-day');
|
|
64
|
-
const month = target.getAttribute('data-month');
|
|
65
|
-
const year = target.getAttribute('data-year');
|
|
66
|
-
onSelect(new Date(`${month}-${day}-${year}`));
|
|
67
|
-
};
|
|
68
|
-
const handleCancel = () => {
|
|
69
|
-
setComponentSelectedDate(selectedDate?.toDateString() || new Date().toDateString());
|
|
70
|
-
setShow(false);
|
|
71
|
-
};
|
|
72
|
-
const calendar$1 = date.buildCalendar(new Date(displayDate).getMonth() + 1, new Date(displayDate).getFullYear());
|
|
73
|
-
const [month, day, year] = (selectedDate || new Date())
|
|
74
|
-
.toLocaleString('default', {
|
|
75
|
-
year: '2-digit',
|
|
76
|
-
month: '2-digit',
|
|
77
|
-
day: '2-digit',
|
|
78
|
-
})
|
|
79
|
-
.split('/');
|
|
80
|
-
return (React__default.default.createElement(Wrapper, { onBlurCapture: handleBlur, ref: pickerRef, tabIndex: 0 },
|
|
81
|
-
React__default.default.createElement(InputWrapper, null,
|
|
82
|
-
React__default.default.createElement(Input, { value: selectedDate ? `${month} / ${day} / ${year}` : '', onFocus: handleShow, style: { letterSpacing: '1px', fontSize: '16px' }, readOnly: true }),
|
|
83
|
-
React__default.default.createElement(calendar.Calendar, null)),
|
|
84
|
-
show && (React__default.default.createElement(DateSelector, null,
|
|
85
|
-
React__default.default.createElement(InnerWrapper, null,
|
|
86
|
-
React__default.default.createElement("div", null,
|
|
87
|
-
React__default.default.createElement(MonthBar, null,
|
|
88
|
-
React__default.default.createElement(Arrow, { onClick: handlePreviousMonth },
|
|
89
|
-
React__default.default.createElement(chevron_left.ChevronLeft, { size: 24 })),
|
|
90
|
-
React__default.default.createElement(paragraph.P, null, `${Object.values(date$1.MONTHS)[Math.max(0, Math.min(new Date(displayDate).getMonth(), 11))]} ${new Date(displayDate).getFullYear()}`),
|
|
91
|
-
React__default.default.createElement(Arrow, { onClick: handleNextMonth },
|
|
92
|
-
React__default.default.createElement(chevron_right.ChevronRight, { size: 24 }))),
|
|
93
|
-
React__default.default.createElement(WeekdayWrapper, null, Object.values(date$1.WEEKDAYS).map((day) => (React__default.default.createElement(paragraph.P, { key: day }, day)))),
|
|
94
|
-
React__default.default.createElement(Calendar, null, calendar$1.map((week, index) => {
|
|
95
|
-
return (React__default.default.createElement(Week, { key: 'week-' + index.toString(36) }, week.map((day, dayIndex) => {
|
|
96
|
-
const dateObj = new Date(`${day[1]}-${day[2]}-${day[0]}`);
|
|
97
|
-
const isPastDate = today.getTime() - dateObj.getTime() > 0;
|
|
98
|
-
const isCurrMonth = day[1] !==
|
|
99
|
-
date.zeroPad(new Date(displayDate).getMonth() + 1, 2);
|
|
100
|
-
const isNotCurrent = disablePastDates
|
|
101
|
-
? isPastDate
|
|
102
|
-
: isCurrMonth;
|
|
103
|
-
const isToday = Math.abs(dateObj.getTime() - today.getTime()) < 0.5;
|
|
104
|
-
const isSelected = new Date(componentSelectedDate).getTime() ===
|
|
105
|
-
dateObj.getTime();
|
|
106
|
-
return (React__default.default.createElement(Day, { className: `${isToday ? 'today' : ''}${isNotCurrent ? ' not-current' : ''}${isSelected ? ' selected' : ''}`.trim(), "data-day": day[2], "data-month": day[1], "data-year": day[0], key: 'day-' + dayIndex.toString(36), onClick: handleClick }, `${day[2]}`.startsWith('0')
|
|
107
|
-
? `${day[2]}`[1]
|
|
108
|
-
: day[2]));
|
|
109
|
-
})));
|
|
110
|
-
})),
|
|
111
|
-
React__default.default.createElement(BottomWrapper, null,
|
|
112
|
-
React__default.default.createElement(button.Button, { onClick: handleCancel, size: "small", sx: "width: 80px;", type: "outlined" }, "Cancel"),
|
|
113
|
-
React__default.default.createElement(button.Button, { onClick: handleApply, size: "small", sx: "width: 80px;" }, "Apply"))))))));
|
|
114
|
-
};
|
|
115
|
-
const Wrapper = styled.styled.div `
|
|
2
|
+
"use strict";var React=require("react"),styled=require("styled-components"),date$1=require("../../../common/date.js"),button=require("../../actions/button/button.js"),paragraph=require("../../atoms/typography/paragraph.js"),chevron_left=require("../../../icons/arrow/chevron_left.js"),chevron_right=require("../../../icons/arrow/chevron_right.js"),calendar=require("../../../icons/time/calendar.js"),date=require("../../../utils/date.js");function _interopDefaultCompat(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var React__default=_interopDefaultCompat(React);const CalendarInput=({selectedDate:e,onSelect:t,disablePastDates:l})=>{const o=new Date;o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),new Date(o).setDate(1);const a=React__default.default.useRef(null),[r,n]=React__default.default.useState(!1),[d,i]=React__default.default.useState(()=>e?.toDateString()||(new Date).toDateString()),[u,c]=React__default.default.useState(()=>e?.toDateString()||(new Date).toDateString());React__default.default.useEffect(()=>{c(e?.toDateString()||(new Date).toDateString())},[e]);const s=e=>{var e=e.target,t=e.getAttribute("data-day"),a=e.getAttribute("data-month"),e=e.getAttribute("data-year");a=new Date(a+`-${t}-`+e),c(a.toDateString())};var f=date.buildCalendar(new Date(d).getMonth()+1,new Date(d).getFullYear()),[p,g,y]=(e||new Date).toLocaleString("default",{year:"2-digit",month:"2-digit",day:"2-digit"}).split("/");return React__default.default.createElement(Wrapper,{onBlurCapture:e=>{a?.current&&!a?.current?.contains(e.relatedTarget)&&n(!1)},ref:a,tabIndex:0},React__default.default.createElement(InputWrapper,null,React__default.default.createElement(Input,{value:e?p+` / ${g} / `+y:"",onFocus:()=>n(e=>!e),style:{letterSpacing:"1px",fontSize:"16px"},readOnly:!0}),React__default.default.createElement(calendar.Calendar,null)),r&&React__default.default.createElement(DateSelector,null,React__default.default.createElement(InnerWrapper,null,React__default.default.createElement("div",null,React__default.default.createElement(MonthBar,null,React__default.default.createElement(Arrow,{onClick:()=>{i(e=>{e=new Date(e);return e.setMonth(e.getMonth()-1),e.toDateString()})}},React__default.default.createElement(chevron_left.ChevronLeft,{size:24})),React__default.default.createElement(paragraph.P,null,Object.values(date$1.MONTHS)[Math.max(0,Math.min(new Date(d).getMonth(),11))]+" "+new Date(d).getFullYear()),React__default.default.createElement(Arrow,{onClick:()=>{i(e=>{e=new Date(e);return e.setMonth(e.getMonth()+1),e.toDateString()})}},React__default.default.createElement(chevron_right.ChevronRight,{size:24}))),React__default.default.createElement(WeekdayWrapper,null,Object.values(date$1.WEEKDAYS).map(e=>React__default.default.createElement(paragraph.P,{key:e},e))),React__default.default.createElement(Calendar,null,f.map((e,t)=>React__default.default.createElement(Week,{key:"week-"+t.toString(36)},e.map((e,t)=>{var a=new Date(`${e[1]}-${e[2]}-`+e[0]),r=0<o.getTime()-a.getTime(),n=e[1]!==date.zeroPad(new Date(d).getMonth()+1,2),r=l?r:n,n=Math.abs(a.getTime()-o.getTime())<.5,a=new Date(u).getTime()===a.getTime();return React__default.default.createElement(Day,{className:((n?"today":"")+(r?" not-current":"")+(a?" selected":"")).trim(),"data-day":e[2],"data-month":e[1],"data-year":e[0],key:"day-"+t.toString(36),onClick:s},(""+e[2]).startsWith("0")?(""+e[2])[1]:e[2])})))),React__default.default.createElement(BottomWrapper,null,React__default.default.createElement(button.Button,{onClick:()=>{c(e?.toDateString()||(new Date).toDateString()),n(!1)},size:"small",sx:"width: 80px;",type:"outlined"},"Cancel"),React__default.default.createElement(button.Button,{onClick:()=>{t(new Date(u)),n(!1)},size:"small",sx:"width: 80px;"},"Apply"))))))},Wrapper=styled.styled.div`
|
|
116
3
|
position: relative;
|
|
117
4
|
width: fit-content;
|
|
118
5
|
font-family: var(--font-inter);
|
|
119
|
-
|
|
120
|
-
const DateSelector = styled.styled.div `
|
|
6
|
+
`,DateSelector=styled.styled.div`
|
|
121
7
|
transform: translateY(26px);
|
|
122
8
|
position: absolute;
|
|
123
9
|
z-index: 5;
|
|
124
10
|
background-color: #ffffff;
|
|
125
11
|
border-radius: 25px;
|
|
126
12
|
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);
|
|
127
|
-
|
|
128
|
-
const InnerWrapper = styled.styled.div `
|
|
13
|
+
`,InnerWrapper=styled.styled.div`
|
|
129
14
|
display: flex;
|
|
130
15
|
gap: 31px;
|
|
131
16
|
padding: 30px;
|
|
@@ -143,15 +28,13 @@ const InnerWrapper = styled.styled.div `
|
|
|
143
28
|
transform: rotate(45deg);
|
|
144
29
|
box-shadow: -3px -3px 5px rgba(0, 0, 0, 0.1);
|
|
145
30
|
}
|
|
146
|
-
|
|
147
|
-
const MonthBar = styled.styled.div `
|
|
31
|
+
`,MonthBar=styled.styled.div`
|
|
148
32
|
display: flex;
|
|
149
33
|
justify-content: space-between;
|
|
150
34
|
align-items: center;
|
|
151
35
|
margin-bottom: 32px;
|
|
152
36
|
user-select: none;
|
|
153
|
-
|
|
154
|
-
const Arrow = styled.styled.button `
|
|
37
|
+
`,Arrow=styled.styled.button`
|
|
155
38
|
appearance: none;
|
|
156
39
|
border: none;
|
|
157
40
|
outline: none;
|
|
@@ -170,25 +53,21 @@ const Arrow = styled.styled.button `
|
|
|
170
53
|
fill: #ffffff;
|
|
171
54
|
}
|
|
172
55
|
}
|
|
173
|
-
|
|
174
|
-
const WeekdayWrapper = styled.styled.div `
|
|
56
|
+
`,WeekdayWrapper=styled.styled.div`
|
|
175
57
|
display: flex;
|
|
176
58
|
gap: 32px;
|
|
177
59
|
user-select: none;
|
|
178
|
-
|
|
179
|
-
const Calendar = styled.styled.div `
|
|
60
|
+
`,Calendar=styled.styled.div`
|
|
180
61
|
display: flex;
|
|
181
62
|
flex-direction: column;
|
|
182
63
|
gap: 32px;
|
|
183
64
|
margin: 32px 0px;
|
|
184
65
|
user-select: none;
|
|
185
|
-
|
|
186
|
-
const Week = styled.styled.div `
|
|
66
|
+
`,Week=styled.styled.div`
|
|
187
67
|
display: flex;
|
|
188
68
|
gap: 32px;
|
|
189
69
|
border-radius: 24px;
|
|
190
|
-
|
|
191
|
-
const Day = styled.styled.button `
|
|
70
|
+
`,Day=styled.styled.button`
|
|
192
71
|
outline: none;
|
|
193
72
|
border: none;
|
|
194
73
|
background: transparent;
|
|
@@ -222,13 +101,11 @@ const Day = styled.styled.button `
|
|
|
222
101
|
background-color: var(--color-blue-9);
|
|
223
102
|
}
|
|
224
103
|
}
|
|
225
|
-
|
|
226
|
-
const BottomWrapper = styled.styled.div `
|
|
104
|
+
`,BottomWrapper=styled.styled.div`
|
|
227
105
|
display: flex;
|
|
228
106
|
justify-content: flex-end;
|
|
229
107
|
gap: 18px;
|
|
230
|
-
|
|
231
|
-
const Input = styled.styled.input `
|
|
108
|
+
`,Input=styled.styled.input`
|
|
232
109
|
max-width: 140px;
|
|
233
110
|
padding: 0px;
|
|
234
111
|
flex: 1;
|
|
@@ -243,8 +120,7 @@ const Input = styled.styled.input `
|
|
|
243
120
|
&::placeholder {
|
|
244
121
|
color: var(--color-grey-6);
|
|
245
122
|
}
|
|
246
|
-
|
|
247
|
-
const InputWrapper = styled.styled.div `
|
|
123
|
+
`,InputWrapper=styled.styled.div`
|
|
248
124
|
width: fit-content;
|
|
249
125
|
display: flex;
|
|
250
126
|
gap: 8px;
|
|
@@ -262,6 +138,4 @@ const InputWrapper = styled.styled.div `
|
|
|
262
138
|
&:focus-within {
|
|
263
139
|
border-color: var(--color-primary-blue-2);
|
|
264
140
|
}
|
|
265
|
-
`;
|
|
266
|
-
|
|
267
|
-
exports.CalendarInput = CalendarInput;
|
|
141
|
+
`;exports.CalendarInput=CalendarInput;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
var styles = require('../../../common/styles.js');
|
|
7
|
-
var checkmark = require('../../../icons/basic/checkmark.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 Checkbox = ({ disabled, selected, sx, ...rest }) => {
|
|
14
|
-
return (React__default.default.createElement(Box, { "$align": "center", "$disabled": !!disabled, "$display": "flex", "$justify": "center", "$selected": selected, "$sx": sx, ...rest }, selected && React__default.default.createElement(checkmark.Checkmark, { color: "white" })));
|
|
15
|
-
};
|
|
16
|
-
const Box = styled.styled.div `
|
|
2
|
+
"use strict";var React=require("react"),styled=require("styled-components"),styles=require("../../../common/styles.js"),checkmark=require("../../../icons/basic/checkmark.js");function _interopDefaultCompat(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var React__default=_interopDefaultCompat(React);const Checkbox=({disabled:e,selected:r,sx:t,...o})=>React__default.default.createElement(Box,{$align:"center",$disabled:!!e,$display:"flex",$justify:"center",$selected:r,$sx:t,...o},r&&React__default.default.createElement(checkmark.Checkmark,{color:"white"})),Box=styled.styled.div`
|
|
17
3
|
display: flex;
|
|
18
4
|
width: 20px;
|
|
19
5
|
height: 20px;
|
|
@@ -21,12 +7,8 @@ const Box = styled.styled.div `
|
|
|
21
7
|
cursor: pointer;
|
|
22
8
|
box-sizing: border-box;
|
|
23
9
|
|
|
24
|
-
${({
|
|
25
|
-
|
|
26
|
-
border: 1px solid var(--color-primary-blue-2);`
|
|
27
|
-
: 'border: 1px solid var(--color-grey-8);'}
|
|
10
|
+
${({$selected:e})=>e?`background-color: var(--color-primary-blue-2);
|
|
11
|
+
border: 1px solid var(--color-primary-blue-2);`:"border: 1px solid var(--color-grey-8);"}
|
|
28
12
|
${styles.Styles.flex}
|
|
29
|
-
${({
|
|
30
|
-
`;
|
|
31
|
-
|
|
32
|
-
exports.Checkbox = Checkbox;
|
|
13
|
+
${({$sx:e})=>e||""}
|
|
14
|
+
`;exports.Checkbox=Checkbox;
|
|
@@ -1,225 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
var date$1 = require('../../../common/date.js');
|
|
7
|
-
var button = require('../../actions/button/button.js');
|
|
8
|
-
var paragraph = require('../../atoms/typography/paragraph.js');
|
|
9
|
-
var chevron_left = require('../../../icons/arrow/chevron_left.js');
|
|
10
|
-
var chevron_right = require('../../../icons/arrow/chevron_right.js');
|
|
11
|
-
var arrow_right = require('../../../icons/arrow/arrow_right.js');
|
|
12
|
-
var date = require('../../../utils/date.js');
|
|
13
|
-
|
|
14
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
|
-
|
|
16
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
17
|
-
|
|
18
|
-
const DatePicker = ({ endDate, label, onSelect: parentOnSelect, startDate, }) => {
|
|
19
|
-
const today = new Date();
|
|
20
|
-
today.setHours(0);
|
|
21
|
-
today.setMinutes(0);
|
|
22
|
-
today.setSeconds(0);
|
|
23
|
-
today.setMilliseconds(0);
|
|
24
|
-
const firstOfMonth = new Date(today);
|
|
25
|
-
firstOfMonth.setDate(1);
|
|
26
|
-
const thisMonth = firstOfMonth.getMonth() + 1;
|
|
27
|
-
const thisYear = firstOfMonth.getFullYear();
|
|
28
|
-
const isSingleDate = !endDate;
|
|
29
|
-
const pickerRef = React__default.default.useRef(null);
|
|
30
|
-
const [show, setShow] = React__default.default.useState(false);
|
|
31
|
-
const [displayDate, setDisplayDate] = React__default.default.useState(() => endDate?.toDateString() ?? startDate.toDateString());
|
|
32
|
-
const [componentStartDate, setComponentStartDate] = React__default.default.useState(() => startDate.toDateString());
|
|
33
|
-
const [componentEndDate, setComponentEndDate] = React__default.default.useState(() => endDate?.toDateString() ?? startDate.toDateString());
|
|
34
|
-
const [firstClick, setFirstClick] = React__default.default.useState(true);
|
|
35
|
-
React__default.default.useEffect(() => {
|
|
36
|
-
setComponentStartDate(startDate.toDateString());
|
|
37
|
-
}, [startDate]);
|
|
38
|
-
React__default.default.useEffect(() => {
|
|
39
|
-
setComponentEndDate((endDate ?? new Date())?.toDateString());
|
|
40
|
-
}, [endDate]);
|
|
41
|
-
React__default.default.useEffect(() => {
|
|
42
|
-
if (!isSingleDate &&
|
|
43
|
-
new Date(componentStartDate).getTime() >
|
|
44
|
-
new Date(componentEndDate).getTime()) {
|
|
45
|
-
const tempStart = componentStartDate;
|
|
46
|
-
setComponentStartDate(componentEndDate);
|
|
47
|
-
setComponentEndDate(tempStart);
|
|
48
|
-
}
|
|
49
|
-
}, [componentEndDate, componentStartDate]);
|
|
50
|
-
const handleShow = () => setShow((prev) => !prev);
|
|
51
|
-
const handleBlur = (event) => {
|
|
52
|
-
if (pickerRef?.current &&
|
|
53
|
-
!pickerRef?.current?.contains(event.relatedTarget)) {
|
|
54
|
-
setShow(false);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
const handlePreviousMonth = () => {
|
|
58
|
-
setDisplayDate((prev) => {
|
|
59
|
-
const newDate = new Date(prev);
|
|
60
|
-
newDate.setMonth(newDate.getMonth() - 1);
|
|
61
|
-
return newDate.toDateString();
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
const handleNextMonth = () => {
|
|
65
|
-
setDisplayDate((prev) => {
|
|
66
|
-
const newDate = new Date(prev);
|
|
67
|
-
newDate.setMonth(newDate.getMonth() + 1);
|
|
68
|
-
return newDate.toDateString();
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
const handleFirstClick = () => !isSingleDate && setFirstClick((prev) => !prev);
|
|
72
|
-
const onSelect = ({ type, value, }) => {
|
|
73
|
-
if (type === 'start') {
|
|
74
|
-
setComponentStartDate(value.toDateString());
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
setComponentEndDate(value.toDateString());
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
const handleClick = (event) => {
|
|
81
|
-
handleFirstClick();
|
|
82
|
-
const target = event.target;
|
|
83
|
-
const type = firstClick ? 'start' : 'end';
|
|
84
|
-
const day = target.getAttribute('data-day');
|
|
85
|
-
const month = target.getAttribute('data-month');
|
|
86
|
-
const year = target.getAttribute('data-year');
|
|
87
|
-
onSelect({ type, value: new Date(`${month}-${day}-${year}`) });
|
|
88
|
-
};
|
|
89
|
-
const handleApply = () => {
|
|
90
|
-
parentOnSelect({ type: 'start', value: new Date(componentStartDate) });
|
|
91
|
-
!isSingleDate &&
|
|
92
|
-
parentOnSelect({ type: 'end', value: new Date(componentEndDate) });
|
|
93
|
-
!isSingleDate && setFirstClick(true);
|
|
94
|
-
setShow(false);
|
|
95
|
-
};
|
|
96
|
-
const handleCancel = () => {
|
|
97
|
-
setComponentStartDate(startDate.toDateString());
|
|
98
|
-
setComponentEndDate((endDate ?? new Date())?.toDateString());
|
|
99
|
-
setFirstClick(true);
|
|
100
|
-
setShow(false);
|
|
101
|
-
};
|
|
102
|
-
const handleSetToday = () => {
|
|
103
|
-
onSelect({ type: 'start', value: today });
|
|
104
|
-
onSelect({ type: 'end', value: today });
|
|
105
|
-
setDisplayDate(today.toDateString());
|
|
106
|
-
setFirstClick(true);
|
|
107
|
-
};
|
|
108
|
-
const handleSetYesterday = () => {
|
|
109
|
-
const yesterday = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1);
|
|
110
|
-
onSelect({ type: 'start', value: yesterday });
|
|
111
|
-
onSelect({ type: 'end', value: yesterday });
|
|
112
|
-
setDisplayDate(today.toDateString());
|
|
113
|
-
setFirstClick(true);
|
|
114
|
-
};
|
|
115
|
-
const handleLastSevenDays = () => {
|
|
116
|
-
const lastWeekDate = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 7);
|
|
117
|
-
onSelect({ type: 'start', value: lastWeekDate });
|
|
118
|
-
onSelect({ type: 'end', value: today });
|
|
119
|
-
setDisplayDate(today.toDateString());
|
|
120
|
-
setFirstClick(true);
|
|
121
|
-
};
|
|
122
|
-
const handleLastThirtyDays = () => {
|
|
123
|
-
const lastMonthDate = new Date(today);
|
|
124
|
-
lastMonthDate.setMonth(thisMonth - 2);
|
|
125
|
-
onSelect({ type: 'start', value: lastMonthDate });
|
|
126
|
-
onSelect({ type: 'end', value: today });
|
|
127
|
-
setDisplayDate(today.toDateString());
|
|
128
|
-
setFirstClick(true);
|
|
129
|
-
};
|
|
130
|
-
const handleThisMonth = () => {
|
|
131
|
-
onSelect({ type: 'start', value: firstOfMonth });
|
|
132
|
-
onSelect({
|
|
133
|
-
type: 'end',
|
|
134
|
-
value: new Date(firstOfMonth.getFullYear(), firstOfMonth.getMonth(), date.getMonthDays()),
|
|
135
|
-
});
|
|
136
|
-
setDisplayDate(today.toDateString());
|
|
137
|
-
setFirstClick(true);
|
|
138
|
-
};
|
|
139
|
-
const handleLastMonth = () => {
|
|
140
|
-
const lastMonthDate = new Date(firstOfMonth);
|
|
141
|
-
lastMonthDate.setMonth(thisMonth - 2);
|
|
142
|
-
onSelect({ type: 'start', value: lastMonthDate });
|
|
143
|
-
onSelect({
|
|
144
|
-
type: 'end',
|
|
145
|
-
value: new Date(lastMonthDate.getFullYear(), lastMonthDate.getMonth(), date.getMonthDays(lastMonthDate.getMonth() + 1)),
|
|
146
|
-
});
|
|
147
|
-
setDisplayDate(lastMonthDate.toDateString());
|
|
148
|
-
setFirstClick(true);
|
|
149
|
-
};
|
|
150
|
-
const handleLastYear = () => {
|
|
151
|
-
const lastYearDate = new Date(today);
|
|
152
|
-
lastYearDate.setFullYear(thisYear - 1);
|
|
153
|
-
onSelect({ type: 'start', value: lastYearDate });
|
|
154
|
-
onSelect({ type: 'end', value: today });
|
|
155
|
-
setDisplayDate(today.toDateString());
|
|
156
|
-
setFirstClick(true);
|
|
157
|
-
};
|
|
158
|
-
const calendar = date.buildCalendar(new Date(displayDate).getMonth() + 1, new Date(displayDate).getFullYear());
|
|
159
|
-
const minRange = new Date(componentStartDate).getTime();
|
|
160
|
-
const maxRange = new Date(componentEndDate).getTime();
|
|
161
|
-
const displayDateObj = new Date(displayDate);
|
|
162
|
-
const displayFirstOfMonth = new Date(displayDateObj);
|
|
163
|
-
displayFirstOfMonth.setDate(1);
|
|
164
|
-
const displayLastOfMonth = new Date(displayDateObj);
|
|
165
|
-
displayLastOfMonth.setDate(date.getMonthDays(displayDateObj.getMonth() + 1));
|
|
166
|
-
return (React__default.default.createElement(Wrapper, { onBlurCapture: handleBlur, ref: pickerRef, tabIndex: 0 },
|
|
167
|
-
React__default.default.createElement(Trigger, { onClick: handleShow },
|
|
168
|
-
label && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
169
|
-
label,
|
|
170
|
-
' | ')),
|
|
171
|
-
React__default.default.createElement("span", null, startDate.toLocaleDateString('en-US').replaceAll('/', '-')),
|
|
172
|
-
!!endDate && startDate.toDateString() !== endDate?.toDateString() && (React__default.default.createElement(arrow_right.ArrowRight, { sx: "padding: 0px 8px; margin-bottom: -2px;" })),
|
|
173
|
-
startDate.toDateString() !== endDate?.toDateString() && (React__default.default.createElement("span", null, endDate?.toLocaleDateString('en-US').replaceAll('/', '-')))),
|
|
174
|
-
show && (React__default.default.createElement(DateSelector, null,
|
|
175
|
-
React__default.default.createElement(InnerWrapper, null,
|
|
176
|
-
!!endDate && (React__default.default.createElement(Left, null,
|
|
177
|
-
React__default.default.createElement(button.Button, { size: "small", type: "text", onClick: handleSetToday }, "Today"),
|
|
178
|
-
React__default.default.createElement(button.Button, { size: "small", type: "text", onClick: handleSetYesterday }, "Yesterday"),
|
|
179
|
-
React__default.default.createElement(button.Button, { size: "small", type: "text", onClick: handleLastSevenDays }, "Last 7 days"),
|
|
180
|
-
React__default.default.createElement(button.Button, { size: "small", type: "text", onClick: handleLastThirtyDays }, "Last 30 days"),
|
|
181
|
-
React__default.default.createElement(button.Button, { size: "small", type: "text", onClick: handleThisMonth }, "This month"),
|
|
182
|
-
React__default.default.createElement(button.Button, { size: "small", type: "text", onClick: handleLastMonth }, "Last month"),
|
|
183
|
-
React__default.default.createElement(button.Button, { size: "small", type: "text", onClick: handleLastYear }, "Last Year"))),
|
|
184
|
-
React__default.default.createElement("div", null,
|
|
185
|
-
React__default.default.createElement(MonthBar, null,
|
|
186
|
-
React__default.default.createElement(Arrow, { onClick: handlePreviousMonth },
|
|
187
|
-
React__default.default.createElement(chevron_left.ChevronLeft, { size: 24 })),
|
|
188
|
-
React__default.default.createElement(paragraph.P, null, `${Object.values(date$1.MONTHS)[Math.max(0, Math.min(new Date(displayDate).getMonth(), 11))]} ${new Date(displayDate).getFullYear()}`),
|
|
189
|
-
React__default.default.createElement(Arrow, { onClick: handleNextMonth },
|
|
190
|
-
React__default.default.createElement(chevron_right.ChevronRight, { size: 24 }))),
|
|
191
|
-
React__default.default.createElement(WeekdayWrapper, null, Object.values(date$1.WEEKDAYS).map((day) => (React__default.default.createElement(paragraph.P, { key: day }, day)))),
|
|
192
|
-
React__default.default.createElement(Calendar, null, calendar.map((week, index) => {
|
|
193
|
-
return (React__default.default.createElement(Week, { key: 'week-' + index.toString(36) }, week.map((day, dayIndex) => {
|
|
194
|
-
const isCurrMonth = day[1] !==
|
|
195
|
-
date.zeroPad(new Date(displayDate).getMonth() + 1, 2);
|
|
196
|
-
const dateObj = new Date(`${day[1]}-${day[2]}-${day[0]}`);
|
|
197
|
-
const isToday = Math.abs(dateObj.getTime() - today.getTime()) < 0.5;
|
|
198
|
-
const time = dateObj.toDateString();
|
|
199
|
-
const isStartDate = time === componentStartDate;
|
|
200
|
-
const isEndDate = !isSingleDate && time === componentEndDate;
|
|
201
|
-
const between = !isSingleDate &&
|
|
202
|
-
minRange <= dateObj.getTime() &&
|
|
203
|
-
dateObj.getTime() <= maxRange &&
|
|
204
|
-
!isStartDate &&
|
|
205
|
-
!isEndDate;
|
|
206
|
-
const isFirstOfMonth = displayFirstOfMonth.toDateString() === time;
|
|
207
|
-
const isLastOfMonth = displayLastOfMonth.toDateString() === time;
|
|
208
|
-
return (React__default.default.createElement(Day, { className: `${isToday ? 'today' : ''}${isCurrMonth ? ' not-current' : ''}${isStartDate ? ' start-date' : ''}${isEndDate ? ' end-date' : ''}${between ? ' between' : ''}${isFirstOfMonth ? ' first-of-month' : ''}${isLastOfMonth ? ' last-of-month' : ''}`.trim(), "data-day": day[2], "data-month": day[1], "data-year": day[0], key: 'day-' + dayIndex.toString(36), onClick: handleClick }, `${day[2]}`.startsWith('0')
|
|
209
|
-
? `${day[2]}`[1]
|
|
210
|
-
: day[2]));
|
|
211
|
-
})));
|
|
212
|
-
})),
|
|
213
|
-
React__default.default.createElement(BottomWrapper, null,
|
|
214
|
-
React__default.default.createElement(button.Button, { onClick: handleCancel, size: "small", sx: "width: 80px;", type: "outlined" }, "Cancel"),
|
|
215
|
-
React__default.default.createElement(button.Button, { onClick: handleApply, size: "small", sx: "width: 80px;" }, "Apply"))))))));
|
|
216
|
-
};
|
|
217
|
-
const Wrapper = styled.styled.div `
|
|
2
|
+
"use strict";var React=require("react"),styled=require("styled-components"),date$1=require("../../../common/date.js"),button=require("../../actions/button/button.js"),paragraph=require("../../atoms/typography/paragraph.js"),chevron_left=require("../../../icons/arrow/chevron_left.js"),chevron_right=require("../../../icons/arrow/chevron_right.js"),arrow_right=require("../../../icons/arrow/arrow_right.js"),date=require("../../../utils/date.js");function _interopDefaultCompat(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var React__default=_interopDefaultCompat(React);const DatePicker=({endDate:e,label:t,onSelect:a,startDate:r})=>{const u=new Date,o=(u.setHours(0),u.setMinutes(0),u.setSeconds(0),u.setMilliseconds(0),new Date(u)),l=(o.setDate(1),o.getMonth()+1),n=o.getFullYear(),s=!e,d=React__default.default.useRef(null),[i,c]=React__default.default.useState(!1),[f,p]=React__default.default.useState(()=>e?.toDateString()??r.toDateString()),[g,x]=React__default.default.useState(()=>r.toDateString()),[b,y]=React__default.default.useState(()=>e?.toDateString()??r.toDateString()),[h,m]=React__default.default.useState(!0);React__default.default.useEffect(()=>{x(r.toDateString())},[r]),React__default.default.useEffect(()=>{y((e??new Date)?.toDateString())},[e]),React__default.default.useEffect(()=>{var e;!s&&new Date(g).getTime()>new Date(b).getTime()&&(e=g,x(b),y(e))},[b,g]);const _=({type:e,value:t})=>{("start"===e?x:y)(t.toDateString())},v=e=>{s||m(e=>!e);var e=e.target,t=h?"start":"end",a=e.getAttribute("data-day"),r=e.getAttribute("data-month"),e=e.getAttribute("data-year");_({type:t,value:new Date(r+`-${a}-`+e)})};var D=date.buildCalendar(new Date(f).getMonth()+1,new Date(f).getFullYear());const w=new Date(g).getTime(),R=new Date(b).getTime();var k=new Date(f);const S=new Date(k),E=(S.setDate(1),new Date(k));return E.setDate(date.getMonthDays(k.getMonth()+1)),React__default.default.createElement(Wrapper,{onBlurCapture:e=>{d?.current&&!d?.current?.contains(e.relatedTarget)&&c(!1)},ref:d,tabIndex:0},React__default.default.createElement(Trigger,{onClick:()=>c(e=>!e)},t&&React__default.default.createElement(React__default.default.Fragment,null,t," | "),React__default.default.createElement("span",null,r.toLocaleDateString("en-US").replaceAll("/","-")),!!e&&r.toDateString()!==e?.toDateString()&&React__default.default.createElement(arrow_right.ArrowRight,{sx:"padding: 0px 8px; margin-bottom: -2px;"}),r.toDateString()!==e?.toDateString()&&React__default.default.createElement("span",null,e?.toLocaleDateString("en-US").replaceAll("/","-"))),i&&React__default.default.createElement(DateSelector,null,React__default.default.createElement(InnerWrapper,null,!!e&&React__default.default.createElement(Left,null,React__default.default.createElement(button.Button,{size:"small",type:"text",onClick:()=>{_({type:"start",value:u}),_({type:"end",value:u}),p(u.toDateString()),m(!0)}},"Today"),React__default.default.createElement(button.Button,{size:"small",type:"text",onClick:()=>{var e=new Date(u.getFullYear(),u.getMonth(),u.getDate()-1);_({type:"start",value:e}),_({type:"end",value:e}),p(u.toDateString()),m(!0)}},"Yesterday"),React__default.default.createElement(button.Button,{size:"small",type:"text",onClick:()=>{var e=new Date(u.getFullYear(),u.getMonth(),u.getDate()-7);_({type:"start",value:e}),_({type:"end",value:u}),p(u.toDateString()),m(!0)}},"Last 7 days"),React__default.default.createElement(button.Button,{size:"small",type:"text",onClick:()=>{var e=new Date(u);e.setMonth(l-2),_({type:"start",value:e}),_({type:"end",value:u}),p(u.toDateString()),m(!0)}},"Last 30 days"),React__default.default.createElement(button.Button,{size:"small",type:"text",onClick:()=>{_({type:"start",value:o}),_({type:"end",value:new Date(o.getFullYear(),o.getMonth(),date.getMonthDays())}),p(u.toDateString()),m(!0)}},"This month"),React__default.default.createElement(button.Button,{size:"small",type:"text",onClick:()=>{var e=new Date(o);e.setMonth(l-2),_({type:"start",value:e}),_({type:"end",value:new Date(e.getFullYear(),e.getMonth(),date.getMonthDays(e.getMonth()+1))}),p(e.toDateString()),m(!0)}},"Last month"),React__default.default.createElement(button.Button,{size:"small",type:"text",onClick:()=>{var e=new Date(u);e.setFullYear(n-1),_({type:"start",value:e}),_({type:"end",value:u}),p(u.toDateString()),m(!0)}},"Last Year")),React__default.default.createElement("div",null,React__default.default.createElement(MonthBar,null,React__default.default.createElement(Arrow,{onClick:()=>{p(e=>{e=new Date(e);return e.setMonth(e.getMonth()-1),e.toDateString()})}},React__default.default.createElement(chevron_left.ChevronLeft,{size:24})),React__default.default.createElement(paragraph.P,null,Object.values(date$1.MONTHS)[Math.max(0,Math.min(new Date(f).getMonth(),11))]+" "+new Date(f).getFullYear()),React__default.default.createElement(Arrow,{onClick:()=>{p(e=>{e=new Date(e);return e.setMonth(e.getMonth()+1),e.toDateString()})}},React__default.default.createElement(chevron_right.ChevronRight,{size:24}))),React__default.default.createElement(WeekdayWrapper,null,Object.values(date$1.WEEKDAYS).map(e=>React__default.default.createElement(paragraph.P,{key:e},e))),React__default.default.createElement(Calendar,null,D.map((e,t)=>React__default.default.createElement(Week,{key:"week-"+t.toString(36)},e.map((e,t)=>{var a=e[1]!==date.zeroPad(new Date(f).getMonth()+1,2),r=new Date(`${e[1]}-${e[2]}-`+e[0]),o=Math.abs(r.getTime()-u.getTime())<.5,l=r.toDateString(),n=l===g,d=!s&&l===b,r=!s&&w<=r.getTime()&&r.getTime()<=R&&!n&&!d,i=S.toDateString()===l,l=E.toDateString()===l;return React__default.default.createElement(Day,{className:((o?"today":"")+(a?" not-current":"")+(n?" start-date":"")+(d?" end-date":"")+(r?" between":"")+(i?" first-of-month":"")+(l?" last-of-month":"")).trim(),"data-day":e[2],"data-month":e[1],"data-year":e[0],key:"day-"+t.toString(36),onClick:v},(""+e[2]).startsWith("0")?(""+e[2])[1]:e[2])})))),React__default.default.createElement(BottomWrapper,null,React__default.default.createElement(button.Button,{onClick:()=>{x(r.toDateString()),y((e??new Date)?.toDateString()),m(!0),c(!1)},size:"small",sx:"width: 80px;",type:"outlined"},"Cancel"),React__default.default.createElement(button.Button,{onClick:()=>{a({type:"start",value:new Date(g)}),s||a({type:"end",value:new Date(b)}),s||m(!0),c(!1)},size:"small",sx:"width: 80px;"},"Apply"))))))},Wrapper=styled.styled.div`
|
|
218
3
|
position: relative;
|
|
219
4
|
width: fit-content;
|
|
220
5
|
font-family: var(--font-inter);
|
|
221
|
-
|
|
222
|
-
const Trigger = styled.styled.button `
|
|
6
|
+
`,Trigger=styled.styled.button`
|
|
223
7
|
padding: 12px 24px;
|
|
224
8
|
background-color: #ffffff;
|
|
225
9
|
border: 1px solid var(--color-grey-6);
|
|
@@ -250,16 +34,14 @@ const Trigger = styled.styled.button `
|
|
|
250
34
|
background-color: var(--color-blue-3);
|
|
251
35
|
border-color: var(--color-blue-3);
|
|
252
36
|
}
|
|
253
|
-
|
|
254
|
-
const DateSelector = styled.styled.div `
|
|
37
|
+
`,DateSelector=styled.styled.div`
|
|
255
38
|
transform: translateY(26px);
|
|
256
39
|
position: absolute;
|
|
257
40
|
z-index: 5;
|
|
258
41
|
background-color: #ffffff;
|
|
259
42
|
border-radius: 25px;
|
|
260
43
|
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);
|
|
261
|
-
|
|
262
|
-
const InnerWrapper = styled.styled.div `
|
|
44
|
+
`,InnerWrapper=styled.styled.div`
|
|
263
45
|
display: flex;
|
|
264
46
|
gap: 31px;
|
|
265
47
|
padding: 30px;
|
|
@@ -277,8 +59,7 @@ const InnerWrapper = styled.styled.div `
|
|
|
277
59
|
transform: rotate(45deg);
|
|
278
60
|
box-shadow: -3px -3px 5px rgba(0, 0, 0, 0.1);
|
|
279
61
|
}
|
|
280
|
-
|
|
281
|
-
const Left = styled.styled.div `
|
|
62
|
+
`,Left=styled.styled.div`
|
|
282
63
|
display: flex;
|
|
283
64
|
flex-flow: column nowrap;
|
|
284
65
|
gap: 24px;
|
|
@@ -305,15 +86,13 @@ const Left = styled.styled.div `
|
|
|
305
86
|
}
|
|
306
87
|
}
|
|
307
88
|
}
|
|
308
|
-
|
|
309
|
-
const MonthBar = styled.styled.div `
|
|
89
|
+
`,MonthBar=styled.styled.div`
|
|
310
90
|
display: flex;
|
|
311
91
|
justify-content: space-between;
|
|
312
92
|
align-items: center;
|
|
313
93
|
margin-bottom: 32px;
|
|
314
94
|
user-select: none;
|
|
315
|
-
|
|
316
|
-
const Arrow = styled.styled.button `
|
|
95
|
+
`,Arrow=styled.styled.button`
|
|
317
96
|
appearance: none;
|
|
318
97
|
border: none;
|
|
319
98
|
outline: none;
|
|
@@ -332,25 +111,21 @@ const Arrow = styled.styled.button `
|
|
|
332
111
|
fill: #ffffff;
|
|
333
112
|
}
|
|
334
113
|
}
|
|
335
|
-
|
|
336
|
-
const WeekdayWrapper = styled.styled.div `
|
|
114
|
+
`,WeekdayWrapper=styled.styled.div`
|
|
337
115
|
display: flex;
|
|
338
116
|
gap: 32px;
|
|
339
117
|
user-select: none;
|
|
340
|
-
|
|
341
|
-
const Calendar = styled.styled.div `
|
|
118
|
+
`,Calendar=styled.styled.div`
|
|
342
119
|
display: flex;
|
|
343
120
|
flex-direction: column;
|
|
344
121
|
gap: 32px;
|
|
345
122
|
margin: 32px 0px;
|
|
346
123
|
user-select: none;
|
|
347
|
-
|
|
348
|
-
const Week = styled.styled.div `
|
|
124
|
+
`,Week=styled.styled.div`
|
|
349
125
|
display: flex;
|
|
350
126
|
gap: 32px;
|
|
351
127
|
border-radius: 24px;
|
|
352
|
-
|
|
353
|
-
const Day = styled.styled.button `
|
|
128
|
+
`,Day=styled.styled.button`
|
|
354
129
|
outline: none;
|
|
355
130
|
border: none;
|
|
356
131
|
background: transparent;
|
|
@@ -519,11 +294,8 @@ const Day = styled.styled.button `
|
|
|
519
294
|
}
|
|
520
295
|
}
|
|
521
296
|
}
|
|
522
|
-
|
|
523
|
-
const BottomWrapper = styled.styled.div `
|
|
297
|
+
`,BottomWrapper=styled.styled.div`
|
|
524
298
|
display: flex;
|
|
525
299
|
justify-content: flex-end;
|
|
526
300
|
gap: 18px;
|
|
527
|
-
`;
|
|
528
|
-
|
|
529
|
-
exports.DatePicker = DatePicker;
|
|
301
|
+
`;exports.DatePicker=DatePicker;
|