@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 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
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,4 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
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;
|
|
@@ -1,16 +1,131 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
'use strict';
|
|
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 `
|
|
3
116
|
position: relative;
|
|
4
117
|
width: fit-content;
|
|
5
118
|
font-family: var(--font-inter);
|
|
6
|
-
|
|
119
|
+
`;
|
|
120
|
+
const DateSelector = styled.styled.div `
|
|
7
121
|
transform: translateY(26px);
|
|
8
122
|
position: absolute;
|
|
9
123
|
z-index: 5;
|
|
10
124
|
background-color: #ffffff;
|
|
11
125
|
border-radius: 25px;
|
|
12
126
|
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);
|
|
13
|
-
|
|
127
|
+
`;
|
|
128
|
+
const InnerWrapper = styled.styled.div `
|
|
14
129
|
display: flex;
|
|
15
130
|
gap: 31px;
|
|
16
131
|
padding: 30px;
|
|
@@ -28,13 +143,15 @@
|
|
|
28
143
|
transform: rotate(45deg);
|
|
29
144
|
box-shadow: -3px -3px 5px rgba(0, 0, 0, 0.1);
|
|
30
145
|
}
|
|
31
|
-
|
|
146
|
+
`;
|
|
147
|
+
const MonthBar = styled.styled.div `
|
|
32
148
|
display: flex;
|
|
33
149
|
justify-content: space-between;
|
|
34
150
|
align-items: center;
|
|
35
151
|
margin-bottom: 32px;
|
|
36
152
|
user-select: none;
|
|
37
|
-
|
|
153
|
+
`;
|
|
154
|
+
const Arrow = styled.styled.button `
|
|
38
155
|
appearance: none;
|
|
39
156
|
border: none;
|
|
40
157
|
outline: none;
|
|
@@ -53,21 +170,25 @@
|
|
|
53
170
|
fill: #ffffff;
|
|
54
171
|
}
|
|
55
172
|
}
|
|
56
|
-
|
|
173
|
+
`;
|
|
174
|
+
const WeekdayWrapper = styled.styled.div `
|
|
57
175
|
display: flex;
|
|
58
176
|
gap: 32px;
|
|
59
177
|
user-select: none;
|
|
60
|
-
|
|
178
|
+
`;
|
|
179
|
+
const Calendar = styled.styled.div `
|
|
61
180
|
display: flex;
|
|
62
181
|
flex-direction: column;
|
|
63
182
|
gap: 32px;
|
|
64
183
|
margin: 32px 0px;
|
|
65
184
|
user-select: none;
|
|
66
|
-
|
|
185
|
+
`;
|
|
186
|
+
const Week = styled.styled.div `
|
|
67
187
|
display: flex;
|
|
68
188
|
gap: 32px;
|
|
69
189
|
border-radius: 24px;
|
|
70
|
-
|
|
190
|
+
`;
|
|
191
|
+
const Day = styled.styled.button `
|
|
71
192
|
outline: none;
|
|
72
193
|
border: none;
|
|
73
194
|
background: transparent;
|
|
@@ -101,11 +222,13 @@
|
|
|
101
222
|
background-color: var(--color-blue-9);
|
|
102
223
|
}
|
|
103
224
|
}
|
|
104
|
-
|
|
225
|
+
`;
|
|
226
|
+
const BottomWrapper = styled.styled.div `
|
|
105
227
|
display: flex;
|
|
106
228
|
justify-content: flex-end;
|
|
107
229
|
gap: 18px;
|
|
108
|
-
|
|
230
|
+
`;
|
|
231
|
+
const Input = styled.styled.input `
|
|
109
232
|
max-width: 140px;
|
|
110
233
|
padding: 0px;
|
|
111
234
|
flex: 1;
|
|
@@ -120,7 +243,8 @@
|
|
|
120
243
|
&::placeholder {
|
|
121
244
|
color: var(--color-grey-6);
|
|
122
245
|
}
|
|
123
|
-
|
|
246
|
+
`;
|
|
247
|
+
const InputWrapper = styled.styled.div `
|
|
124
248
|
width: fit-content;
|
|
125
249
|
display: flex;
|
|
126
250
|
gap: 8px;
|
|
@@ -138,4 +262,6 @@
|
|
|
138
262
|
&:focus-within {
|
|
139
263
|
border-color: var(--color-primary-blue-2);
|
|
140
264
|
}
|
|
141
|
-
`;
|
|
265
|
+
`;
|
|
266
|
+
|
|
267
|
+
exports.CalendarInput = CalendarInput;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
'use strict';
|
|
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 `
|
|
3
17
|
display: flex;
|
|
4
18
|
width: 20px;
|
|
5
19
|
height: 20px;
|
|
@@ -7,8 +21,12 @@
|
|
|
7
21
|
cursor: pointer;
|
|
8
22
|
box-sizing: border-box;
|
|
9
23
|
|
|
10
|
-
${({$selected
|
|
11
|
-
|
|
24
|
+
${({ $selected }) => $selected
|
|
25
|
+
? `background-color: var(--color-primary-blue-2);
|
|
26
|
+
border: 1px solid var(--color-primary-blue-2);`
|
|
27
|
+
: 'border: 1px solid var(--color-grey-8);'}
|
|
12
28
|
${styles.Styles.flex}
|
|
13
|
-
${({$sx
|
|
14
|
-
`;
|
|
29
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
exports.Checkbox = Checkbox;
|
|
@@ -1,9 +1,225 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
'use strict';
|
|
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 `
|
|
3
218
|
position: relative;
|
|
4
219
|
width: fit-content;
|
|
5
220
|
font-family: var(--font-inter);
|
|
6
|
-
|
|
221
|
+
`;
|
|
222
|
+
const Trigger = styled.styled.button `
|
|
7
223
|
padding: 12px 24px;
|
|
8
224
|
background-color: #ffffff;
|
|
9
225
|
border: 1px solid var(--color-grey-6);
|
|
@@ -34,14 +250,16 @@
|
|
|
34
250
|
background-color: var(--color-blue-3);
|
|
35
251
|
border-color: var(--color-blue-3);
|
|
36
252
|
}
|
|
37
|
-
|
|
253
|
+
`;
|
|
254
|
+
const DateSelector = styled.styled.div `
|
|
38
255
|
transform: translateY(26px);
|
|
39
256
|
position: absolute;
|
|
40
257
|
z-index: 5;
|
|
41
258
|
background-color: #ffffff;
|
|
42
259
|
border-radius: 25px;
|
|
43
260
|
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);
|
|
44
|
-
|
|
261
|
+
`;
|
|
262
|
+
const InnerWrapper = styled.styled.div `
|
|
45
263
|
display: flex;
|
|
46
264
|
gap: 31px;
|
|
47
265
|
padding: 30px;
|
|
@@ -59,7 +277,8 @@
|
|
|
59
277
|
transform: rotate(45deg);
|
|
60
278
|
box-shadow: -3px -3px 5px rgba(0, 0, 0, 0.1);
|
|
61
279
|
}
|
|
62
|
-
|
|
280
|
+
`;
|
|
281
|
+
const Left = styled.styled.div `
|
|
63
282
|
display: flex;
|
|
64
283
|
flex-flow: column nowrap;
|
|
65
284
|
gap: 24px;
|
|
@@ -86,13 +305,15 @@
|
|
|
86
305
|
}
|
|
87
306
|
}
|
|
88
307
|
}
|
|
89
|
-
|
|
308
|
+
`;
|
|
309
|
+
const MonthBar = styled.styled.div `
|
|
90
310
|
display: flex;
|
|
91
311
|
justify-content: space-between;
|
|
92
312
|
align-items: center;
|
|
93
313
|
margin-bottom: 32px;
|
|
94
314
|
user-select: none;
|
|
95
|
-
|
|
315
|
+
`;
|
|
316
|
+
const Arrow = styled.styled.button `
|
|
96
317
|
appearance: none;
|
|
97
318
|
border: none;
|
|
98
319
|
outline: none;
|
|
@@ -111,21 +332,25 @@
|
|
|
111
332
|
fill: #ffffff;
|
|
112
333
|
}
|
|
113
334
|
}
|
|
114
|
-
|
|
335
|
+
`;
|
|
336
|
+
const WeekdayWrapper = styled.styled.div `
|
|
115
337
|
display: flex;
|
|
116
338
|
gap: 32px;
|
|
117
339
|
user-select: none;
|
|
118
|
-
|
|
340
|
+
`;
|
|
341
|
+
const Calendar = styled.styled.div `
|
|
119
342
|
display: flex;
|
|
120
343
|
flex-direction: column;
|
|
121
344
|
gap: 32px;
|
|
122
345
|
margin: 32px 0px;
|
|
123
346
|
user-select: none;
|
|
124
|
-
|
|
347
|
+
`;
|
|
348
|
+
const Week = styled.styled.div `
|
|
125
349
|
display: flex;
|
|
126
350
|
gap: 32px;
|
|
127
351
|
border-radius: 24px;
|
|
128
|
-
|
|
352
|
+
`;
|
|
353
|
+
const Day = styled.styled.button `
|
|
129
354
|
outline: none;
|
|
130
355
|
border: none;
|
|
131
356
|
background: transparent;
|
|
@@ -294,8 +519,11 @@
|
|
|
294
519
|
}
|
|
295
520
|
}
|
|
296
521
|
}
|
|
297
|
-
|
|
522
|
+
`;
|
|
523
|
+
const BottomWrapper = styled.styled.div `
|
|
298
524
|
display: flex;
|
|
299
525
|
justify-content: flex-end;
|
|
300
526
|
gap: 18px;
|
|
301
|
-
`;
|
|
527
|
+
`;
|
|
528
|
+
|
|
529
|
+
exports.DatePicker = DatePicker;
|