@soul-refiner/design-system 2.0.0-alpha.27 → 2.0.0-alpha.28
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/components/actions/button/button.js +19 -14
- package/dist/components/actions/dropdown/dropdown.js +28 -24
- package/dist/components/actions/rate/rate.js +15 -11
- package/dist/components/actions/switch/switch.js +9 -5
- package/dist/components/actions/toggle/toggle.js +9 -5
- package/dist/components/actions/upload/upload.js +21 -17
- package/dist/components/atoms/box/box.js +5 -1
- package/dist/components/atoms/hide/hide.js +5 -1
- package/dist/components/atoms/seconds_to_duration/seconds_to_duration.js +10 -6
- package/dist/components/atoms/time_ago/time_ago.js +5 -1
- package/dist/components/atoms/typography/display.js +5 -1
- package/dist/components/atoms/typography/heading.js +13 -9
- package/dist/components/atoms/typography/paragraph.js +5 -1
- package/dist/components/card/action/action.js +15 -10
- package/dist/components/card/audio/audio.js +24 -19
- package/dist/components/card/card.js +13 -9
- package/dist/components/card/feature/feature.js +26 -21
- package/dist/components/card/meeting/meeting.js +34 -29
- package/dist/components/card/person/person.js +14 -9
- package/dist/components/card/price/price.js +24 -20
- package/dist/components/card/regular/regular.js +8 -3
- package/dist/components/card/video/video.js +24 -19
- package/dist/components/card/written/written.js +24 -19
- package/dist/components/custom/courses_selection/courses_selection.js +24 -19
- package/dist/components/custom/users_selection/users_selection.js +23 -18
- package/dist/components/editor/context.js +8 -4
- package/dist/components/editor/editor.js +9 -5
- package/dist/components/editor/icons/border-all.js +6 -2
- package/dist/components/editor/icons/border-bottom.js +6 -2
- package/dist/components/editor/icons/border-left.js +6 -2
- package/dist/components/editor/icons/border-none.js +6 -2
- package/dist/components/editor/icons/border-right.js +6 -2
- package/dist/components/editor/icons/border-top.js +6 -2
- package/dist/components/editor/navbar/alignment_dropdown.js +14 -10
- package/dist/components/editor/navbar/button_modal.js +34 -30
- package/dist/components/editor/navbar/navbar.js +76 -72
- package/dist/components/editor/navbar/style_dropdown.js +5 -1
- package/dist/components/editor/plugins/blocks/blockquote.js +8 -4
- package/dist/components/editor/plugins/blocks/buttons.js +10 -6
- package/dist/components/editor/plugins/blocks/dropdown-menu.js +4 -3
- package/dist/components/editor/plugins/blocks/image.js +21 -17
- package/dist/components/editor/plugins/blocks/list.js +7 -3
- package/dist/components/editor/plugins/blocks/media-popover.js +13 -9
- package/dist/components/editor/plugins/blocks/plate-button.js +3 -2
- package/dist/components/editor/plugins/blocks/popover.js +4 -3
- package/dist/components/editor/plugins/blocks/qa.js +16 -12
- package/dist/components/editor/plugins/blocks/resizable.js +5 -1
- package/dist/components/editor/plugins/blocks/separator.js +3 -2
- package/dist/components/editor/plugins/blocks/table-cell.js +13 -9
- package/dist/components/editor/plugins/blocks/table-row.js +6 -2
- package/dist/components/editor/plugins/blocks/table.js +46 -42
- package/dist/components/editor/plugins/blocks/text.js +32 -28
- package/dist/components/editor/plugins/blocks/video.js +9 -5
- package/dist/components/editor/plugins/leafs/link.js +23 -19
- package/dist/components/editor/simple_editor/navbar.js +49 -45
- package/dist/components/editor/simple_editor/simple_editor.js +9 -5
- package/dist/components/feedback/animated_toast/animated_toast.js +10 -6
- package/dist/components/feedback/badge/badge.js +7 -3
- package/dist/components/feedback/banner/banner.js +15 -11
- package/dist/components/feedback/chip/chip.js +7 -3
- package/dist/components/feedback/loader/loader.js +7 -2
- package/dist/components/feedback/notification/notification.js +14 -10
- package/dist/components/feedback/progress/progress.js +17 -13
- package/dist/components/feedback/toast/toast.js +14 -10
- package/dist/components/feedback/tooltip/tooltip.js +10 -6
- package/dist/components/iconography/avatar/avatar.js +23 -18
- package/dist/components/iconography/avatar/icons/approved.js +8 -4
- package/dist/components/iconography/avatar/icons/busy.js +8 -4
- package/dist/components/iconography/avatar/icons/declined.js +8 -4
- package/dist/components/iconography/avatar/icons/default.js +7 -3
- package/dist/components/iconography/avatar/icons/focus.js +8 -4
- package/dist/components/iconography/avatar/icons/locked.js +8 -4
- package/dist/components/iconography/avatar/icons/offline.js +8 -4
- package/dist/components/iconography/avatar/icons/online.js +7 -3
- package/dist/components/iconography/avatar/icons/subscribed.js +12 -8
- package/dist/components/iconography/icon/icon.js +5 -1
- package/dist/components/input/calendar/calendar.js +29 -25
- package/dist/components/input/checkbox/checkbox.js +5 -1
- package/dist/components/input/date/date.js +43 -39
- package/dist/components/input/filter/filter.js +49 -44
- package/dist/components/input/filter/filter_option.js +10 -6
- package/dist/components/input/radio/radio.js +10 -6
- package/dist/components/input/search/search.js +13 -9
- package/dist/components/input/select/select.js +8 -4
- package/dist/components/input/text_area/text_area.js +14 -10
- package/dist/components/input/text_input/text_input.js +16 -12
- package/dist/components/input/time/time.js +9 -5
- package/dist/components/media/video/video.js +9 -3
- package/dist/components/media/video-player/playlist-item.js +17 -12
- package/dist/components/media/video-player/video.js +37 -31
- package/dist/components/navigation/breadcrumb/breadcrumb.js +19 -14
- package/dist/components/navigation/inner/inner.js +30 -25
- package/dist/components/navigation/tabs/tabs.js +11 -6
- package/dist/components/surfaces/accordion/accordion.js +15 -11
- package/dist/components/surfaces/calendar_date/calendar_date.js +14 -10
- package/dist/components/surfaces/carousel/card/card.js +11 -7
- package/dist/components/surfaces/comment/comment.js +44 -39
- package/dist/components/surfaces/drawer/drawer.js +20 -16
- package/dist/components/surfaces/message/message.js +12 -8
- package/dist/components/surfaces/modal/modal.js +23 -19
- package/dist/components/surfaces/portal/portal.js +8 -3
- package/dist/components/surfaces/post/post.js +36 -30
- package/dist/components/table/table/table.js +14 -10
- package/dist/icons/arrow/arrow_all.js +6 -2
- package/dist/icons/arrow/arrow_all_diagonal.js +6 -2
- package/dist/icons/arrow/arrow_both_downwards.js +6 -2
- package/dist/icons/arrow/arrow_both_upwards.js +6 -2
- package/dist/icons/arrow/arrow_circle_left.js +6 -2
- package/dist/icons/arrow/arrow_circle_left_double.js +6 -2
- package/dist/icons/arrow/arrow_circle_left_double_alert.js +8 -4
- package/dist/icons/arrow/arrow_circle_right.js +6 -2
- package/dist/icons/arrow/arrow_circle_right_double.js +6 -2
- package/dist/icons/arrow/arrow_circle_right_double_alert.js +6 -2
- package/dist/icons/arrow/arrow_diagonal_down_left.js +6 -2
- package/dist/icons/arrow/arrow_diagonal_down_left_circle.js +6 -2
- package/dist/icons/arrow/arrow_diagonal_down_right.js +6 -2
- package/dist/icons/arrow/arrow_diagonal_down_right_circle.js +6 -2
- package/dist/icons/arrow/arrow_diagonal_up_left.js +6 -2
- package/dist/icons/arrow/arrow_diagonal_up_left_circle.js +6 -2
- package/dist/icons/arrow/arrow_diagonal_up_right.js +6 -2
- package/dist/icons/arrow/arrow_diagonal_up_right_circle.js +6 -2
- package/dist/icons/arrow/arrow_down.js +6 -2
- package/dist/icons/arrow/arrow_down_bold.js +6 -2
- package/dist/icons/arrow/arrow_down_circle.js +6 -2
- package/dist/icons/arrow/arrow_left.js +6 -2
- package/dist/icons/arrow/arrow_left_bold.js +6 -2
- package/dist/icons/arrow/arrow_left_circle.js +6 -2
- package/dist/icons/arrow/arrow_left_curved.js +6 -2
- package/dist/icons/arrow/arrow_left_curved_circle.js +6 -2
- package/dist/icons/arrow/arrow_right.js +6 -2
- package/dist/icons/arrow/arrow_right_bold.js +6 -2
- package/dist/icons/arrow/arrow_right_circle.js +6 -2
- package/dist/icons/arrow/arrow_right_curved.js +6 -2
- package/dist/icons/arrow/arrow_right_curved_circle.js +6 -2
- package/dist/icons/arrow/arrow_up.js +6 -2
- package/dist/icons/arrow/arrow_up_bold.js +6 -2
- package/dist/icons/arrow/arrow_up_circle.js +6 -2
- package/dist/icons/arrow/chevron_down.js +6 -2
- package/dist/icons/arrow/chevron_down_circle.js +6 -2
- package/dist/icons/arrow/chevron_down_double.js +6 -2
- package/dist/icons/arrow/chevron_down_double_circle.js +6 -2
- package/dist/icons/arrow/chevron_left.js +6 -2
- package/dist/icons/arrow/chevron_left_circle.js +6 -2
- package/dist/icons/arrow/chevron_left_double.js +6 -2
- package/dist/icons/arrow/chevron_left_double_circle.js +6 -2
- package/dist/icons/arrow/chevron_right.js +6 -2
- package/dist/icons/arrow/chevron_right_circle.js +6 -2
- package/dist/icons/arrow/chevron_right_double.js +6 -2
- package/dist/icons/arrow/chevron_right_double_circle.js +6 -2
- package/dist/icons/arrow/chevron_scroll.js +6 -2
- package/dist/icons/arrow/chevron_up.js +6 -2
- package/dist/icons/arrow/chevron_up_circle.js +6 -2
- package/dist/icons/arrow/chevron_up_double.js +6 -2
- package/dist/icons/arrow/chevron_up_double_circle.js +6 -2
- package/dist/icons/arrow/forward_all.js +6 -2
- package/dist/icons/arrow/forward_all_bold.js +6 -2
- package/dist/icons/arrow/forward_bold.js +6 -2
- package/dist/icons/arrow/redo.js +6 -2
- package/dist/icons/arrow/redo_bold.js +6 -2
- package/dist/icons/arrow/reply.js +6 -2
- package/dist/icons/arrow/reply_all.js +6 -2
- package/dist/icons/arrow/reply_all_bold.js +6 -2
- package/dist/icons/arrow/reply_bold.js +6 -2
- package/dist/icons/arrow/undo.js +6 -2
- package/dist/icons/arrow/undo_bold.js +6 -2
- package/dist/icons/audio_video/drag_indicator.js +6 -2
- package/dist/icons/audio_video/eject.js +6 -2
- package/dist/icons/audio_video/equalizer.js +6 -2
- package/dist/icons/audio_video/fast_forward.js +6 -2
- package/dist/icons/audio_video/fast_forward_30.js +6 -2
- package/dist/icons/audio_video/fullscreen.js +6 -2
- package/dist/icons/audio_video/headphones.js +6 -2
- package/dist/icons/audio_video/library_add.js +6 -2
- package/dist/icons/audio_video/library_music.js +6 -2
- package/dist/icons/audio_video/microphone.js +6 -2
- package/dist/icons/audio_video/musical_note.js +6 -2
- package/dist/icons/audio_video/next.js +6 -2
- package/dist/icons/audio_video/pause.js +6 -2
- package/dist/icons/audio_video/pause_circle.js +6 -2
- package/dist/icons/audio_video/play.js +6 -2
- package/dist/icons/audio_video/play_circle.js +6 -2
- package/dist/icons/audio_video/play_display.js +6 -2
- package/dist/icons/audio_video/play_pause.js +6 -2
- package/dist/icons/audio_video/play_solid.js +6 -2
- package/dist/icons/audio_video/player_list.js +6 -2
- package/dist/icons/audio_video/player_list_add.js +6 -2
- package/dist/icons/audio_video/player_list_play.js +6 -2
- package/dist/icons/audio_video/previous.js +6 -2
- package/dist/icons/audio_video/radio.js +6 -2
- package/dist/icons/audio_video/record.js +6 -2
- package/dist/icons/audio_video/repeat.js +6 -2
- package/dist/icons/audio_video/rewind.js +6 -2
- package/dist/icons/audio_video/rewind_30.js +6 -2
- package/dist/icons/audio_video/shuffle.js +6 -2
- package/dist/icons/audio_video/sound_wave.js +6 -2
- package/dist/icons/audio_video/stop.js +6 -2
- package/dist/icons/audio_video/stop_circle.js +6 -2
- package/dist/icons/audio_video/subscriptions.js +6 -2
- package/dist/icons/audio_video/tuner.js +6 -2
- package/dist/icons/audio_video/volume.js +6 -2
- package/dist/icons/audio_video/volume_high.js +6 -2
- package/dist/icons/audio_video/volume_low.js +6 -2
- package/dist/icons/audio_video/volume_slash.js +6 -2
- package/dist/icons/basic/aa_sansserif.js +7 -3
- package/dist/icons/basic/aa_serif.js +7 -3
- package/dist/icons/basic/anchor.js +8 -4
- package/dist/icons/basic/bible.js +6 -2
- package/dist/icons/basic/bold.js +6 -2
- package/dist/icons/basic/book.js +6 -2
- package/dist/icons/basic/book_open.js +6 -2
- package/dist/icons/basic/bookmark.js +6 -2
- package/dist/icons/basic/bookmark_add.js +6 -2
- package/dist/icons/basic/bookmark_slash.js +6 -2
- package/dist/icons/basic/bookmarks.js +6 -2
- package/dist/icons/basic/books.js +9 -5
- package/dist/icons/basic/box.js +6 -2
- package/dist/icons/basic/briefcase.js +6 -2
- package/dist/icons/basic/browse_activity.js +6 -2
- package/dist/icons/basic/browser.js +6 -2
- package/dist/icons/basic/browser_slash.js +6 -2
- package/dist/icons/basic/calculator.js +6 -2
- package/dist/icons/basic/camera.js +6 -2
- package/dist/icons/basic/camera_add.js +6 -2
- package/dist/icons/basic/camera_slash.js +6 -2
- package/dist/icons/basic/checkmark.js +6 -2
- package/dist/icons/basic/checkmark_circle.js +8 -4
- package/dist/icons/basic/checkmark_filled.js +6 -2
- package/dist/icons/basic/checkmarks.js +6 -2
- package/dist/icons/basic/circle.js +6 -2
- package/dist/icons/basic/circle_slash.js +8 -4
- package/dist/icons/basic/clear_text_style.js +6 -2
- package/dist/icons/basic/close.js +6 -2
- package/dist/icons/basic/close_circle.js +6 -2
- package/dist/icons/basic/close_filled.js +6 -2
- package/dist/icons/basic/copy.js +6 -2
- package/dist/icons/basic/delete.js +6 -2
- package/dist/icons/basic/detail.js +6 -2
- package/dist/icons/basic/dot.js +6 -2
- package/dist/icons/basic/download.js +6 -2
- package/dist/icons/basic/download_arrow.js +6 -2
- package/dist/icons/basic/droplet.js +8 -4
- package/dist/icons/basic/ellipsis_horizontal.js +6 -2
- package/dist/icons/basic/ellipsis_horizontal_circle.js +6 -2
- package/dist/icons/basic/ellipsis_vertical.js +6 -2
- package/dist/icons/basic/ellipsis_vertical_circle.js +6 -2
- package/dist/icons/basic/eye.js +6 -2
- package/dist/icons/basic/eye_slash.js +6 -2
- package/dist/icons/basic/fingerprint.js +6 -2
- package/dist/icons/basic/flag.js +6 -2
- package/dist/icons/basic/flag_wave.js +6 -2
- package/dist/icons/basic/flag_wave_filled.js +6 -2
- package/dist/icons/basic/flame.js +6 -2
- package/dist/icons/basic/gauge.js +6 -2
- package/dist/icons/basic/glasses.js +6 -2
- package/dist/icons/basic/graduation_cap.js +6 -2
- package/dist/icons/basic/hashmark.js +6 -2
- package/dist/icons/basic/heart.js +6 -2
- package/dist/icons/basic/heart_slash.js +6 -2
- package/dist/icons/basic/highlighter.js +6 -2
- package/dist/icons/basic/home.js +6 -2
- package/dist/icons/basic/image.js +6 -2
- package/dist/icons/basic/inbox.js +6 -2
- package/dist/icons/basic/italic.js +6 -2
- package/dist/icons/basic/layers.js +6 -2
- package/dist/icons/basic/lightening.js +6 -2
- package/dist/icons/basic/lightening_slash.js +6 -2
- package/dist/icons/basic/link.js +6 -2
- package/dist/icons/basic/link_slash.js +6 -2
- package/dist/icons/basic/loudspeaker.js +6 -2
- package/dist/icons/basic/maximize.js +6 -2
- package/dist/icons/basic/menu.js +6 -2
- package/dist/icons/basic/menu_circle.js +6 -2
- package/dist/icons/basic/menu_dots.js +6 -2
- package/dist/icons/basic/microphone_slash.js +6 -2
- package/dist/icons/basic/minimize.js +6 -2
- package/dist/icons/basic/minus.js +6 -2
- package/dist/icons/basic/minus_circle.js +6 -2
- package/dist/icons/basic/move_item.js +6 -2
- package/dist/icons/basic/new.js +6 -2
- package/dist/icons/basic/newspaper.js +6 -2
- package/dist/icons/basic/node.js +6 -2
- package/dist/icons/basic/note_pad.js +7 -3
- package/dist/icons/basic/options.js +6 -2
- package/dist/icons/basic/paint_brush.js +6 -2
- package/dist/icons/basic/paperclip.js +6 -2
- package/dist/icons/basic/paperclip_slash.js +6 -2
- package/dist/icons/basic/pencil.js +6 -2
- package/dist/icons/basic/pencil_pad.js +6 -2
- package/dist/icons/basic/plus.js +6 -2
- package/dist/icons/basic/plus_circle.js +6 -2
- package/dist/icons/basic/presentation.js +6 -2
- package/dist/icons/basic/printer.js +6 -2
- package/dist/icons/basic/profile.js +6 -2
- package/dist/icons/basic/profile_check.js +6 -2
- package/dist/icons/basic/pulse.js +6 -2
- package/dist/icons/basic/qr_code.js +6 -2
- package/dist/icons/basic/resize.js +8 -4
- package/dist/icons/basic/scan.js +6 -2
- package/dist/icons/basic/scissors.js +6 -2
- package/dist/icons/basic/screenshot.js +6 -2
- package/dist/icons/basic/search.js +6 -2
- package/dist/icons/basic/select_item.js +7 -3
- package/dist/icons/basic/settings.js +6 -2
- package/dist/icons/basic/share.js +6 -2
- package/dist/icons/basic/share_external.js +6 -2
- package/dist/icons/basic/square.js +6 -2
- package/dist/icons/basic/star.js +6 -2
- package/dist/icons/basic/star_circle.js +6 -2
- package/dist/icons/basic/star_filled.js +6 -2
- package/dist/icons/basic/star_filled_half.js +6 -2
- package/dist/icons/basic/star_slash.js +6 -2
- package/dist/icons/basic/sticker.js +6 -2
- package/dist/icons/basic/strikethrough.js +6 -2
- package/dist/icons/basic/subtask.js +7 -3
- package/dist/icons/basic/tax.js +9 -5
- package/dist/icons/basic/text_bg_color.js +6 -2
- package/dist/icons/basic/text_color.js +6 -2
- package/dist/icons/basic/textbox.js +6 -2
- package/dist/icons/basic/thumbs_down.js +6 -2
- package/dist/icons/basic/thumbs_up.js +6 -2
- package/dist/icons/basic/thumbs_up_filled.js +6 -2
- package/dist/icons/basic/toggle_left.js +6 -2
- package/dist/icons/basic/toggle_right.js +6 -2
- package/dist/icons/basic/translate.js +6 -2
- package/dist/icons/basic/trash.js +6 -2
- package/dist/icons/basic/trash_slash.js +6 -2
- package/dist/icons/basic/underline.js +6 -2
- package/dist/icons/basic/upload.js +6 -2
- package/dist/icons/basic/video.js +6 -2
- package/dist/icons/basic/video_add.js +7 -3
- package/dist/icons/basic/video_slash.js +6 -2
- package/dist/icons/basic/wrench.js +6 -2
- package/dist/icons/basic/zoom_in.js +6 -2
- package/dist/icons/basic/zoom_out.js +6 -2
- package/dist/icons/data/bar_chart.js +6 -2
- package/dist/icons/data/bar_chart_downward.js +6 -2
- package/dist/icons/data/bar_chart_downward_outline.js +6 -2
- package/dist/icons/data/bar_chart_upward.js +6 -2
- package/dist/icons/data/bar_chart_upward_outline.js +6 -2
- package/dist/icons/data/candlestick_chart.js +6 -2
- package/dist/icons/data/four_circles.js +6 -2
- package/dist/icons/data/legend_toggle.js +6 -2
- package/dist/icons/data/line_chart.js +6 -2
- package/dist/icons/data/line_chart_area.js +6 -2
- package/dist/icons/data/line_chart_area_shaded.js +6 -2
- package/dist/icons/data/line_chart_double.js +6 -2
- package/dist/icons/data/line_chart_downward.js +6 -2
- package/dist/icons/data/line_chart_node.js +6 -2
- package/dist/icons/data/line_chart_outline.js +6 -2
- package/dist/icons/data/line_chart_search.js +6 -2
- package/dist/icons/data/line_chart_stars.js +6 -2
- package/dist/icons/data/line_chart_upward.js +6 -2
- package/dist/icons/data/pie_chart.js +7 -3
- package/dist/icons/data/tree.js +6 -2
- package/dist/icons/email/mail.js +6 -2
- package/dist/icons/email/mail_check.js +6 -2
- package/dist/icons/email/mail_minus.js +6 -2
- package/dist/icons/email/mail_send.js +6 -2
- package/dist/icons/email/send.js +6 -2
- package/dist/icons/email/send_close.js +6 -2
- package/dist/icons/email/send_schedule.js +6 -2
- package/dist/icons/email/send_text.js +6 -2
- package/dist/icons/emoji/emoji_add.js +6 -2
- package/dist/icons/emoji/laughing.js +6 -2
- package/dist/icons/emoji/neutral.js +6 -2
- package/dist/icons/emoji/sad.js +6 -2
- package/dist/icons/emoji/shocked.js +6 -2
- package/dist/icons/emoji/smile.js +6 -2
- package/dist/icons/file/clipboard.js +6 -2
- package/dist/icons/file/clipboard_check.js +6 -2
- package/dist/icons/file/clipboard_close.js +6 -2
- package/dist/icons/file/clipboard_minus.js +6 -2
- package/dist/icons/file/clipboard_plus.js +6 -2
- package/dist/icons/file/clipboard_text.js +6 -2
- package/dist/icons/file/file.js +6 -2
- package/dist/icons/file/file_add.js +6 -2
- package/dist/icons/file/file_check.js +6 -2
- package/dist/icons/file/file_close.js +6 -2
- package/dist/icons/file/file_code.js +6 -2
- package/dist/icons/file/file_download.js +6 -2
- package/dist/icons/file/file_draft.js +6 -2
- package/dist/icons/file/file_gear.js +7 -3
- package/dist/icons/file/file_minus.js +6 -2
- package/dist/icons/file/file_plus.js +6 -2
- package/dist/icons/file/file_scan.js +6 -2
- package/dist/icons/file/file_shred.js +6 -2
- package/dist/icons/file/file_text.js +6 -2
- package/dist/icons/file/file_upload.js +6 -2
- package/dist/icons/file/folder.js +6 -2
- package/dist/icons/file/folder_add.js +6 -2
- package/dist/icons/file/folder_arrow.js +6 -2
- package/dist/icons/file/folder_check.js +6 -2
- package/dist/icons/file/folder_close.js +6 -2
- package/dist/icons/file/folder_cloud.js +6 -2
- package/dist/icons/file/folder_gear.js +7 -3
- package/dist/icons/file/folder_minus.js +6 -2
- package/dist/icons/file/folder_music.js +6 -2
- package/dist/icons/file/folder_open.js +6 -2
- package/dist/icons/file/folder_plus.js +6 -2
- package/dist/icons/file/folder_zip.js +6 -2
- package/dist/icons/file/note.js +6 -2
- package/dist/icons/file/note_text.js +6 -2
- package/dist/icons/file/pdf.js +6 -2
- package/dist/icons/file/photo.js +6 -2
- package/dist/icons/finance/bitcoin.js +6 -2
- package/dist/icons/finance/coins.js +10 -6
- package/dist/icons/finance/credit_card.js +6 -2
- package/dist/icons/finance/credit_card_add.js +6 -2
- package/dist/icons/finance/credit_card_face.js +6 -2
- package/dist/icons/finance/credit_card_member.js +6 -2
- package/dist/icons/finance/credit_card_outcome.js +6 -2
- package/dist/icons/finance/credit_card_scan.js +6 -2
- package/dist/icons/finance/credit_card_share.js +6 -2
- package/dist/icons/finance/credit_card_slash.js +6 -2
- package/dist/icons/finance/currency_exchange.js +6 -2
- package/dist/icons/finance/dollar.js +6 -2
- package/dist/icons/finance/ethereum.js +6 -2
- package/dist/icons/finance/paypass.js +6 -2
- package/dist/icons/finance/strongbox.js +6 -2
- package/dist/icons/finance/wallet.js +6 -2
- package/dist/icons/layout/block_align_bottom.js +6 -2
- package/dist/icons/layout/block_align_center.js +6 -2
- package/dist/icons/layout/block_align_left.js +6 -2
- package/dist/icons/layout/block_align_middle.js +6 -2
- package/dist/icons/layout/block_align_right.js +6 -2
- package/dist/icons/layout/block_align_top.js +6 -2
- package/dist/icons/layout/block_horizontal.js +6 -2
- package/dist/icons/layout/block_vertical.js +6 -2
- package/dist/icons/layout/edit_shape.js +6 -2
- package/dist/icons/layout/elements.js +6 -2
- package/dist/icons/layout/elements_add.js +6 -2
- package/dist/icons/layout/elements_filled.js +6 -2
- package/dist/icons/layout/elements_masonry.js +6 -2
- package/dist/icons/layout/frame.js +6 -2
- package/dist/icons/layout/frame_stack.js +6 -2
- package/dist/icons/layout/grid.js +6 -2
- package/dist/icons/layout/grid_column_three.js +6 -2
- package/dist/icons/layout/grid_column_two.js +6 -2
- package/dist/icons/layout/grid_dynamic.js +6 -2
- package/dist/icons/layout/grid_frame.js +6 -2
- package/dist/icons/layout/grid_row_three.js +6 -2
- package/dist/icons/layout/grid_row_two.js +6 -2
- package/dist/icons/layout/grid_six.js +6 -2
- package/dist/icons/layout/grid_small.js +6 -2
- package/dist/icons/layout/iframe.js +6 -2
- package/dist/icons/layout/kanban.js +6 -2
- package/dist/icons/layout/layout.js +6 -2
- package/dist/icons/layout/list.js +6 -2
- package/dist/icons/layout/list_filled.js +11 -7
- package/dist/icons/layout/padding.js +6 -2
- package/dist/icons/layout/page_break.js +6 -2
- package/dist/icons/layout/rotate_left.js +6 -2
- package/dist/icons/layout/rotate_right.js +6 -2
- package/dist/icons/layout/ruler.js +6 -2
- package/dist/icons/layout/segment.js +6 -2
- package/dist/icons/layout/select_area.js +6 -2
- package/dist/icons/layout/select_boundary.js +6 -2
- package/dist/icons/layout/sidebar_left.js +6 -2
- package/dist/icons/layout/sidebar_right.js +6 -2
- package/dist/icons/layout/slides.js +6 -2
- package/dist/icons/layout/slides_horizontal.js +6 -2
- package/dist/icons/layout/slides_vertical.js +11 -7
- package/dist/icons/layout/stack.js +6 -2
- package/dist/icons/layout/text.js +6 -2
- package/dist/icons/maps/atlas.js +6 -2
- package/dist/icons/maps/compass.js +6 -2
- package/dist/icons/maps/direction.js +6 -2
- package/dist/icons/maps/direction_angled.js +6 -2
- package/dist/icons/maps/globe.js +6 -2
- package/dist/icons/maps/globe_slash.js +6 -2
- package/dist/icons/maps/location.js +6 -2
- package/dist/icons/maps/location_slash.js +6 -2
- package/dist/icons/maps/map.js +6 -2
- package/dist/icons/maps/marker.js +6 -2
- package/dist/icons/maps/panorama.js +6 -2
- package/dist/icons/maps/pin.js +6 -2
- package/dist/icons/maps/pin_arrow.js +6 -2
- package/dist/icons/maps/pin_location.js +6 -2
- package/dist/icons/maps/pin_plus.js +6 -2
- package/dist/icons/maps/pin_question.js +6 -2
- package/dist/icons/maps/pin_slash.js +6 -2
- package/dist/icons/maps/push_pin.js +6 -2
- package/dist/icons/maps/push_pin_filled.js +6 -2
- package/dist/icons/maps/push_pin_slash.js +6 -2
- package/dist/icons/maps/radar.js +6 -2
- package/dist/icons/maps/route.js +6 -2
- package/dist/icons/message/bubble.js +6 -2
- package/dist/icons/message/bubble_question.js +6 -2
- package/dist/icons/message/comment.js +6 -2
- package/dist/icons/message/comment_add.js +6 -2
- package/dist/icons/message/comment_check.js +6 -2
- package/dist/icons/message/comment_close.js +6 -2
- package/dist/icons/message/comment_minus.js +6 -2
- package/dist/icons/message/comment_text.js +6 -2
- package/dist/icons/misc/advertisement.js +6 -2
- package/dist/icons/misc/atom.js +6 -2
- package/dist/icons/misc/bone.js +6 -2
- package/dist/icons/misc/brightness_high.js +6 -2
- package/dist/icons/misc/brightness_low.js +6 -2
- package/dist/icons/misc/contrast.js +6 -2
- package/dist/icons/misc/crosshairs.js +6 -2
- package/dist/icons/misc/crown.js +6 -2
- package/dist/icons/misc/footprint.js +6 -2
- package/dist/icons/misc/form.js +6 -2
- package/dist/icons/misc/funnel.js +6 -2
- package/dist/icons/misc/infinite.js +6 -2
- package/dist/icons/misc/insert_button.js +6 -2
- package/dist/icons/misc/light_bulb.js +6 -2
- package/dist/icons/misc/moon.js +6 -2
- package/dist/icons/misc/nut.js +6 -2
- package/dist/icons/misc/planet.js +6 -2
- package/dist/icons/misc/plus_thick.js +6 -2
- package/dist/icons/misc/pocket.js +6 -2
- package/dist/icons/misc/rocket.js +6 -2
- package/dist/icons/misc/soup.js +10 -6
- package/dist/icons/misc/sun.js +6 -2
- package/dist/icons/misc/toy_horse.js +6 -2
- package/dist/icons/misc/trophy.js +6 -2
- package/dist/icons/misc/watercloset.js +6 -2
- package/dist/icons/notifications/alert_circle.js +6 -2
- package/dist/icons/notifications/alert_octogon.js +6 -2
- package/dist/icons/notifications/alert_triangle.js +6 -2
- package/dist/icons/notifications/app_notification.js +6 -2
- package/dist/icons/notifications/bell.js +6 -2
- package/dist/icons/notifications/bell_alert.js +6 -2
- package/dist/icons/notifications/bell_checkmark.js +6 -2
- package/dist/icons/notifications/bell_minus.js +6 -2
- package/dist/icons/notifications/bell_plus.js +6 -2
- package/dist/icons/notifications/bell_ring.js +8 -4
- package/dist/icons/notifications/bell_slash.js +6 -2
- package/dist/icons/notifications/information.js +6 -2
- package/dist/icons/notifications/minus_octogon.js +6 -2
- package/dist/icons/notifications/question_circle.js +6 -2
- package/dist/icons/people/group.js +6 -2
- package/dist/icons/people/group_add.js +6 -2
- package/dist/icons/people/group_chat.js +8 -4
- package/dist/icons/people/group_remove.js +6 -2
- package/dist/icons/people/group_send.js +7 -3
- package/dist/icons/people/groups.js +6 -2
- package/dist/icons/people/person.js +6 -2
- package/dist/icons/people/person_add.js +6 -2
- package/dist/icons/people/person_checkmark.js +6 -2
- package/dist/icons/people/person_circle.js +8 -4
- package/dist/icons/people/person_close.js +8 -4
- package/dist/icons/people/person_remove.js +6 -2
- package/dist/icons/people/person_slash.js +8 -4
- package/dist/icons/phone/keypad.js +6 -2
- package/dist/icons/phone/phone.js +6 -2
- package/dist/icons/phone/phone_add.js +6 -2
- package/dist/icons/phone/phone_calling.js +6 -2
- package/dist/icons/phone/phone_check.js +6 -2
- package/dist/icons/phone/phone_close.js +6 -2
- package/dist/icons/phone/phone_decline.js +6 -2
- package/dist/icons/phone/phone_forwarded.js +6 -2
- package/dist/icons/phone/phone_hash.js +6 -2
- package/dist/icons/phone/phone_incoming.js +6 -2
- package/dist/icons/phone/phone_outgoing.js +6 -2
- package/dist/icons/phone/phone_pause.js +6 -2
- package/dist/icons/phone/phone_slash.js +6 -2
- package/dist/icons/phone/voicemail.js +6 -2
- package/dist/icons/security/key.js +6 -2
- package/dist/icons/security/key_slash.js +6 -2
- package/dist/icons/security/lock.js +6 -2
- package/dist/icons/security/lock_circle.js +6 -2
- package/dist/icons/security/lock_open.js +6 -2
- package/dist/icons/security/lock_slash.js +6 -2
- package/dist/icons/security/shield.js +6 -2
- package/dist/icons/security/shield_checkmark.js +6 -2
- package/dist/icons/security/shield_lock.js +6 -2
- package/dist/icons/security/shield_slash.js +6 -2
- package/dist/icons/security/verified.js +6 -2
- package/dist/icons/shopping/basket.js +6 -2
- package/dist/icons/shopping/cart.js +6 -2
- package/dist/icons/shopping/cart_filled.js +6 -2
- package/dist/icons/shopping/coupon.js +6 -2
- package/dist/icons/shopping/coupon_cut.js +6 -2
- package/dist/icons/shopping/delivery.js +6 -2
- package/dist/icons/shopping/discount.js +6 -2
- package/dist/icons/shopping/gift.js +6 -2
- package/dist/icons/shopping/gift_bag.js +6 -2
- package/dist/icons/shopping/inventory.js +6 -2
- package/dist/icons/shopping/point_of_sale.js +6 -2
- package/dist/icons/shopping/shirt.js +6 -2
- package/dist/icons/shopping/tag.js +6 -2
- package/dist/icons/shopping/tag_diagonal.js +6 -2
- package/dist/icons/shopping/tote.js +6 -2
- package/dist/icons/special/upload_audio.js +11 -7
- package/dist/icons/special/upload_file.js +6 -2
- package/dist/icons/special/upload_image.js +8 -4
- package/dist/icons/special/upload_video.js +9 -5
- package/dist/icons/symbols/at.js +6 -2
- package/dist/icons/symbols/cc.js +6 -2
- package/dist/icons/symbols/cmd.js +6 -2
- package/dist/icons/symbols/facebook.js +6 -2
- package/dist/icons/symbols/google.js +9 -5
- package/dist/icons/symbols/hash.js +6 -2
- package/dist/icons/symbols/instagram.js +18 -14
- package/dist/icons/symbols/messenger.js +12 -8
- package/dist/icons/symbols/twitter.js +6 -2
- package/dist/icons/technology/battery.js +6 -2
- package/dist/icons/technology/battery_100.js +6 -2
- package/dist/icons/technology/battery_20.js +6 -2
- package/dist/icons/technology/battery_40.js +6 -2
- package/dist/icons/technology/battery_60.js +6 -2
- package/dist/icons/technology/battery_80.js +6 -2
- package/dist/icons/technology/battery_charging.js +6 -2
- package/dist/icons/technology/battery_slash.js +6 -2
- package/dist/icons/technology/devices.js +6 -2
- package/dist/icons/technology/floppy_disk.js +6 -2
- package/dist/icons/technology/iphone.js +6 -2
- package/dist/icons/technology/laptop.js +6 -2
- package/dist/icons/technology/mobile.js +6 -2
- package/dist/icons/technology/monitor.js +6 -2
- package/dist/icons/technology/server.js +6 -2
- package/dist/icons/technology/sim_card.js +6 -2
- package/dist/icons/technology/usb_stick.js +6 -2
- package/dist/icons/text/align_center.js +6 -2
- package/dist/icons/text/align_justified.js +6 -2
- package/dist/icons/text/align_left.js +6 -2
- package/dist/icons/text/align_right.js +6 -2
- package/dist/icons/text/code_block.js +6 -2
- package/dist/icons/text/divider.js +6 -2
- package/dist/icons/text/footnote.js +8 -4
- package/dist/icons/text/indent_decrease.js +6 -2
- package/dist/icons/text/indent_increase.js +6 -2
- package/dist/icons/text/list_ordered.js +6 -2
- package/dist/icons/text/list_unordered.js +6 -2
- package/dist/icons/text/quote.js +6 -2
- package/dist/icons/text/table.js +6 -2
- package/dist/icons/time/alarm.js +6 -2
- package/dist/icons/time/alarm_checkmark.js +6 -2
- package/dist/icons/time/alarm_minus.js +6 -2
- package/dist/icons/time/alarm_plus.js +6 -2
- package/dist/icons/time/alarm_slash.js +6 -2
- package/dist/icons/time/alarm_snooze.js +6 -2
- package/dist/icons/time/calendar.js +6 -2
- package/dist/icons/time/calendar_add.js +6 -2
- package/dist/icons/time/calendar_checkmark.js +6 -2
- package/dist/icons/time/calendar_close.js +6 -2
- package/dist/icons/time/calendar_dates.js +6 -2
- package/dist/icons/time/calendar_minus.js +6 -2
- package/dist/icons/time/calendar_plus.js +6 -2
- package/dist/icons/time/calendar_scroll.js +8 -4
- package/dist/icons/time/clock.js +6 -2
- package/dist/icons/time/clock_history.js +6 -2
- package/dist/icons/time/stopwatch.js +6 -2
- package/dist/icons/time/timer.js +6 -2
- package/dist/icons/time/watch.js +6 -2
- package/package.json +1 -1
|
@@ -11,6 +11,10 @@ var chevron_right = require('../../../icons/arrow/chevron_right.js');
|
|
|
11
11
|
var arrow_right = require('../../../icons/arrow/arrow_right.js');
|
|
12
12
|
var date = require('../../../utils/date.js');
|
|
13
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
|
+
|
|
14
18
|
const DatePicker = ({ endDate, label, onSelect: parentOnSelect, startDate, }) => {
|
|
15
19
|
const today = new Date();
|
|
16
20
|
today.setHours(0);
|
|
@@ -22,19 +26,19 @@ const DatePicker = ({ endDate, label, onSelect: parentOnSelect, startDate, }) =>
|
|
|
22
26
|
const thisMonth = firstOfMonth.getMonth() + 1;
|
|
23
27
|
const thisYear = firstOfMonth.getFullYear();
|
|
24
28
|
const isSingleDate = !endDate;
|
|
25
|
-
const pickerRef =
|
|
26
|
-
const [show, setShow] =
|
|
27
|
-
const [displayDate, setDisplayDate] =
|
|
28
|
-
const [componentStartDate, setComponentStartDate] =
|
|
29
|
-
const [componentEndDate, setComponentEndDate] =
|
|
30
|
-
const [firstClick, setFirstClick] =
|
|
31
|
-
|
|
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(() => {
|
|
32
36
|
setComponentStartDate(startDate.toDateString());
|
|
33
37
|
}, [startDate]);
|
|
34
|
-
|
|
38
|
+
React__default.default.useEffect(() => {
|
|
35
39
|
setComponentEndDate((endDate ?? new Date())?.toDateString());
|
|
36
40
|
}, [endDate]);
|
|
37
|
-
|
|
41
|
+
React__default.default.useEffect(() => {
|
|
38
42
|
if (!isSingleDate &&
|
|
39
43
|
new Date(componentStartDate).getTime() >
|
|
40
44
|
new Date(componentEndDate).getTime()) {
|
|
@@ -159,34 +163,34 @@ const DatePicker = ({ endDate, label, onSelect: parentOnSelect, startDate, }) =>
|
|
|
159
163
|
displayFirstOfMonth.setDate(1);
|
|
160
164
|
const displayLastOfMonth = new Date(displayDateObj);
|
|
161
165
|
displayLastOfMonth.setDate(date.getMonthDays(displayDateObj.getMonth() + 1));
|
|
162
|
-
return (
|
|
163
|
-
|
|
164
|
-
label && (
|
|
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,
|
|
165
169
|
label,
|
|
166
170
|
' | ')),
|
|
167
|
-
|
|
168
|
-
!!endDate && startDate.toDateString() !== endDate?.toDateString() && (
|
|
169
|
-
startDate.toDateString() !== endDate?.toDateString() && (
|
|
170
|
-
show && (
|
|
171
|
-
|
|
172
|
-
!!endDate && (
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return (
|
|
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) => {
|
|
190
194
|
const isCurrMonth = day[1] !==
|
|
191
195
|
date.zeroPad(new Date(displayDate).getMonth() + 1, 2);
|
|
192
196
|
const dateObj = new Date(`${day[1]}-${day[2]}-${day[0]}`);
|
|
@@ -201,14 +205,14 @@ const DatePicker = ({ endDate, label, onSelect: parentOnSelect, startDate, }) =>
|
|
|
201
205
|
!isEndDate;
|
|
202
206
|
const isFirstOfMonth = displayFirstOfMonth.toDateString() === time;
|
|
203
207
|
const isLastOfMonth = displayLastOfMonth.toDateString() === time;
|
|
204
|
-
return (
|
|
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')
|
|
205
209
|
? `${day[2]}`[1]
|
|
206
210
|
: day[2]));
|
|
207
211
|
})));
|
|
208
212
|
})),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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"))))))));
|
|
212
216
|
};
|
|
213
217
|
const Wrapper = styled.styled.div `
|
|
214
218
|
position: relative;
|
|
@@ -12,26 +12,31 @@ var close = require('../../../icons/basic/close.js');
|
|
|
12
12
|
var styles = require('../../../common/styles.js');
|
|
13
13
|
var filter_option = require('./filter_option.js');
|
|
14
14
|
|
|
15
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
16
|
+
|
|
17
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
|
+
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
19
|
+
|
|
15
20
|
const Filter = ({ closeOnBlur = true, disabled, graphic, graphicAlignment = 'left', resetGraphic, label = '', sx, triggerType, options, defaultValue = '', closeOnChange = true, optionOnChange, optionShowClose, checkbox, applyOnClick, resetOnClick, applyResetActions, }) => {
|
|
16
21
|
const multiple = !!checkbox;
|
|
17
|
-
const wrapperRef =
|
|
18
|
-
const optionsRef =
|
|
19
|
-
const [open, setOpen] =
|
|
20
|
-
const [selected, setSelected] =
|
|
21
|
-
const [filterLabel, setFilterLabel] =
|
|
22
|
-
|
|
22
|
+
const wrapperRef = React__default.default.useRef(null);
|
|
23
|
+
const optionsRef = React__default.default.useRef(null);
|
|
24
|
+
const [open, setOpen] = React__default.default.useState(false);
|
|
25
|
+
const [selected, setSelected] = React__default.default.useState(() => defaultValue ? defaultValue : multiple ? [] : '');
|
|
26
|
+
const [filterLabel, setFilterLabel] = React__default.default.useState('');
|
|
27
|
+
React__default.default.useEffect(() => {
|
|
23
28
|
if (disabled) {
|
|
24
29
|
setOpen(false);
|
|
25
30
|
}
|
|
26
31
|
}, [disabled]);
|
|
27
|
-
|
|
32
|
+
React__default.default.useEffect(() => {
|
|
28
33
|
if (triggerType === 'outlined' && defaultValue === undefined) {
|
|
29
34
|
setSelected(multiple
|
|
30
35
|
? [options[0]?.value]
|
|
31
36
|
: options[0]?.value);
|
|
32
37
|
}
|
|
33
38
|
}, [triggerType, defaultValue]);
|
|
34
|
-
|
|
39
|
+
React__default.default.useEffect(() => {
|
|
35
40
|
if (open) {
|
|
36
41
|
return;
|
|
37
42
|
}
|
|
@@ -97,18 +102,18 @@ const Filter = ({ closeOnBlur = true, disabled, graphic, graphicAlignment = 'lef
|
|
|
97
102
|
const dropdownOptions = [
|
|
98
103
|
...options.map((option, index) => {
|
|
99
104
|
if (typeof option === 'string' && option === 'break') {
|
|
100
|
-
return
|
|
105
|
+
return React__default.default.createElement(filter_option.Spacer, { key: `${React__default.default.useId()}-spacer-${index}` });
|
|
101
106
|
}
|
|
102
|
-
return (
|
|
107
|
+
return (React__default.default.createElement(filter_option.Option, { key: option.value, onClick: handleChange, selected: isSelected(option.value), checkbox: checkbox, radio: !multiple && triggerType === 'pill', showClose: optionShowClose === undefined
|
|
103
108
|
? index === 0 && triggerType === 'pill'
|
|
104
109
|
: optionShowClose, onClose: () => setOpen(false), ...option }));
|
|
105
110
|
}),
|
|
106
|
-
triggerType === 'pill' &&
|
|
111
|
+
triggerType === 'pill' && React__default.default.createElement(filter_option.Spacer, { key: `spacer-${options.length}` }),
|
|
107
112
|
];
|
|
108
113
|
const showResetGraphic = resetGraphic &&
|
|
109
114
|
(typeof selected === 'string' ? !!selected : !!selected.length);
|
|
110
|
-
return (
|
|
111
|
-
|
|
115
|
+
return (React__default.default.createElement(Wrapper, { "$sx": sx, tabIndex: 0, ref: wrapperRef, onBlurCapture: handleBlur },
|
|
116
|
+
React__default.default.createElement(FilterTrigger, { disabled: disabled, graphic: graphic, graphicAlignment: graphicAlignment, label: label, onClick: handleOpen, onReset: resetGraphic
|
|
112
117
|
? (event) => {
|
|
113
118
|
event.stopPropagation();
|
|
114
119
|
resetOnClick && resetOnClick(event);
|
|
@@ -116,27 +121,27 @@ const Filter = ({ closeOnBlur = true, disabled, graphic, graphicAlignment = 'lef
|
|
|
116
121
|
setOpen(false);
|
|
117
122
|
}
|
|
118
123
|
: undefined, open: open, resetGraphic: showResetGraphic, type: triggerType, value: filterLabel }),
|
|
119
|
-
open && (
|
|
120
|
-
|
|
124
|
+
open && (React__default.default.createElement(Container, { ref: optionsRef },
|
|
125
|
+
React__default.default.createElement(React__default.default.Fragment, null,
|
|
121
126
|
dropdownOptions,
|
|
122
|
-
triggerType === 'pill' && applyResetActions && (
|
|
123
|
-
|
|
127
|
+
triggerType === 'pill' && applyResetActions && (React__default.default.createElement(box.Box, { "$display": "flex", "$dir": "row", "$align": "center", "$justify": "flex-end", "$gap": 8, sx: "margin-top: 8px; padding-right: 8px; padding-bottom: 8px" },
|
|
128
|
+
React__default.default.createElement(button.Button, { onClick: (event) => {
|
|
124
129
|
resetOnClick && resetOnClick(event);
|
|
125
130
|
setSelected(multiple ? [] : '');
|
|
126
131
|
setOpen(false);
|
|
127
132
|
}, size: "small", type: "text" }, "Reset"),
|
|
128
|
-
|
|
133
|
+
React__default.default.createElement(button.Button, { onClick: (event) => {
|
|
129
134
|
applyOnClick && applyOnClick(event);
|
|
130
135
|
setOpen(false);
|
|
131
136
|
}, size: "small", type: "primary" }, "Apply"))))))));
|
|
132
137
|
};
|
|
133
|
-
const Wrapper =
|
|
138
|
+
const Wrapper = styled__default.default.div `
|
|
134
139
|
position: relative;
|
|
135
140
|
display: block;
|
|
136
141
|
outline: none;
|
|
137
142
|
${({ $sx }) => ($sx ? $sx : '')}
|
|
138
143
|
`;
|
|
139
|
-
const Container =
|
|
144
|
+
const Container = styled__default.default.div `
|
|
140
145
|
position: absolute;
|
|
141
146
|
width: max-content;
|
|
142
147
|
z-index: 100;
|
|
@@ -169,39 +174,39 @@ const wrapperProps = {
|
|
|
169
174
|
};
|
|
170
175
|
const FilterTrigger = ({ disabled, graphic, graphicAlignment, label, onClick, resetGraphic, open, onReset, type, value, }) => {
|
|
171
176
|
if (type === 'pill') {
|
|
172
|
-
return (
|
|
177
|
+
return (React__default.default.createElement(Pill, { disabled: disabled, onClick: onClick, "$labelIsDefault": value === label, ...wrapperProps },
|
|
173
178
|
graphicAlignment === 'left' ? graphic : null,
|
|
174
|
-
|
|
175
|
-
resetGraphic ?
|
|
179
|
+
React__default.default.createElement(paragraph.P, { ...textProps }, value),
|
|
180
|
+
resetGraphic ? React__default.default.createElement(close.Close, { color: "blue-3", onClick: onReset }) : null,
|
|
176
181
|
graphicAlignment === 'right' ? graphic : null,
|
|
177
|
-
!graphic && !resetGraphic && (open ?
|
|
182
|
+
!graphic && !resetGraphic && (open ? React__default.default.createElement(chevron_up.ChevronUp, null) : React__default.default.createElement(chevron_down.ChevronDown, null))));
|
|
178
183
|
}
|
|
179
184
|
if (type === 'labeled') {
|
|
180
|
-
return (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
open ?
|
|
185
|
+
return (React__default.default.createElement(Labeled, { disabled: disabled, onClick: onClick, ...wrapperProps },
|
|
186
|
+
React__default.default.createElement(paragraph.P, { ...textProps }, label),
|
|
187
|
+
React__default.default.createElement(LabelSeparator, null),
|
|
188
|
+
React__default.default.createElement(paragraph.P, { "$color": "primary-blue-2", "$mediumBold": true, ...textProps }, value),
|
|
189
|
+
open ? React__default.default.createElement(chevron_up.ChevronUp, null) : React__default.default.createElement(chevron_down.ChevronDown, null)));
|
|
185
190
|
}
|
|
186
191
|
if (type === 'avatar') {
|
|
187
|
-
return (
|
|
192
|
+
return (React__default.default.createElement(Avatar, { "$align": "center", "$dir": "row", "$gap": 8, disabled: disabled, onClick: onClick },
|
|
188
193
|
graphic,
|
|
189
|
-
open ?
|
|
194
|
+
open ? React__default.default.createElement(chevron_up.ChevronUp, null) : React__default.default.createElement(chevron_down.ChevronDown, null)));
|
|
190
195
|
}
|
|
191
196
|
if (type === 'text') {
|
|
192
|
-
return (
|
|
193
|
-
|
|
197
|
+
return (React__default.default.createElement(Text, { disabled: disabled, onClick: onClick, ...wrapperProps },
|
|
198
|
+
React__default.default.createElement(paragraph.P, { "$color": "grey-4", "$semiBold": true, ...textProps },
|
|
194
199
|
label,
|
|
195
200
|
":"),
|
|
196
|
-
|
|
197
|
-
open ?
|
|
201
|
+
React__default.default.createElement(paragraph.P, { "$color": "primary-blue-2", "$semiBold": true, className: "filter-trigger-value", ...textProps }, value),
|
|
202
|
+
open ? React__default.default.createElement(chevron_up.ChevronUp, null) : React__default.default.createElement(chevron_down.ChevronDown, null)));
|
|
198
203
|
}
|
|
199
|
-
return (
|
|
204
|
+
return (React__default.default.createElement(Outlined, { disabled: disabled, onClick: onClick, ...wrapperProps },
|
|
200
205
|
graphicAlignment === 'left' ? graphic : null,
|
|
201
206
|
graphic,
|
|
202
|
-
|
|
207
|
+
React__default.default.createElement(paragraph.P, { ...textProps }, value),
|
|
203
208
|
graphicAlignment === 'right' ? graphic : null,
|
|
204
|
-
!graphic && (open ?
|
|
209
|
+
!graphic && (open ? React__default.default.createElement(chevron_up.ChevronUp, null) : React__default.default.createElement(chevron_down.ChevronDown, null))));
|
|
205
210
|
};
|
|
206
211
|
Filter.Trigger = FilterTrigger;
|
|
207
212
|
FilterTrigger.displayName = 'Filter.Trigger';
|
|
@@ -224,7 +229,7 @@ const sharedStyles = styled.css `
|
|
|
224
229
|
}
|
|
225
230
|
}
|
|
226
231
|
`;
|
|
227
|
-
const Outlined =
|
|
232
|
+
const Outlined = styled__default.default.button `
|
|
228
233
|
${sharedStyles}
|
|
229
234
|
${styles.Styles.flex}
|
|
230
235
|
border: 1px solid var(--color-grey-8);
|
|
@@ -236,7 +241,7 @@ const Outlined = styled.button `
|
|
|
236
241
|
background-color: var(--color-grey-9);
|
|
237
242
|
}
|
|
238
243
|
`;
|
|
239
|
-
const Pill =
|
|
244
|
+
const Pill = styled__default.default.button `
|
|
240
245
|
${sharedStyles}
|
|
241
246
|
${styles.Styles.flex}
|
|
242
247
|
border: 1px solid var(--color-grey-8);
|
|
@@ -262,7 +267,7 @@ const Pill = styled.button `
|
|
|
262
267
|
`
|
|
263
268
|
: ''}
|
|
264
269
|
`;
|
|
265
|
-
const Labeled =
|
|
270
|
+
const Labeled = styled__default.default.button `
|
|
266
271
|
${sharedStyles}
|
|
267
272
|
${styles.Styles.flex}
|
|
268
273
|
border-radius: 24px;
|
|
@@ -274,12 +279,12 @@ const Labeled = styled.button `
|
|
|
274
279
|
background-color: var(--color-grey-9);
|
|
275
280
|
}
|
|
276
281
|
`;
|
|
277
|
-
const LabelSeparator =
|
|
282
|
+
const LabelSeparator = styled__default.default.div `
|
|
278
283
|
width: 1px;
|
|
279
284
|
height: 20px;
|
|
280
285
|
background-color: var(--color-grey-8);
|
|
281
286
|
`;
|
|
282
|
-
const Avatar =
|
|
287
|
+
const Avatar = styled__default.default.button `
|
|
283
288
|
${sharedStyles}
|
|
284
289
|
${styles.Styles.flex}
|
|
285
290
|
padding: 4px 16px;
|
|
@@ -300,7 +305,7 @@ const Avatar = styled.button `
|
|
|
300
305
|
}
|
|
301
306
|
}
|
|
302
307
|
`;
|
|
303
|
-
const Text =
|
|
308
|
+
const Text = styled__default.default.button `
|
|
304
309
|
${sharedStyles}
|
|
305
310
|
${styles.Styles.flex}
|
|
306
311
|
gap: 8px;
|
|
@@ -9,12 +9,16 @@ var checkbox = require('../checkbox/checkbox.js');
|
|
|
9
9
|
var radio = require('../radio/radio.js');
|
|
10
10
|
var close = require('../../../icons/basic/close.js');
|
|
11
11
|
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
+
|
|
12
16
|
const Option = ({ label, onClick, selected, sx, value, checkbox: checkbox$1, radio: radio$1 = false, showClose = false, onClose, }) => {
|
|
13
|
-
return (
|
|
14
|
-
checkbox$1 &&
|
|
15
|
-
radio$1 &&
|
|
16
|
-
|
|
17
|
-
showClose && (
|
|
17
|
+
return (React__default.default.createElement(OptionWrapper, { "data-value": value, onClick: onClick, "$selected": selected, "$sx": sx, "$hasCheckbox": !!checkbox$1 },
|
|
18
|
+
checkbox$1 && React__default.default.createElement(checkbox.Checkbox, { selected: selected }),
|
|
19
|
+
radio$1 && React__default.default.createElement(radio.Radio, { checked: selected, value: value }),
|
|
20
|
+
React__default.default.createElement(box.Box, { "$dir": "column", "$display": "flex" }, label && (React__default.default.createElement(paragraph.P, { "$color": "grey-4", "$fontSize": 14, "$lineHeight": 20, "$mediumBold": true, "$textClampLines": 1 }, label))),
|
|
21
|
+
showClose && (React__default.default.createElement(close.Close, { sx: "margin-left: auto; pointer-events: auto !important;", size: 16, onClick: (event) => {
|
|
18
22
|
event.stopPropagation();
|
|
19
23
|
onClose && onClose();
|
|
20
24
|
} }))));
|
|
@@ -60,7 +64,7 @@ const OptionWrapper = styled.styled.div `
|
|
|
60
64
|
${({ $sx }) => ($sx ? $sx : '')}
|
|
61
65
|
`;
|
|
62
66
|
const Spacer = ({ sx }) => {
|
|
63
|
-
return
|
|
67
|
+
return React__default.default.createElement(SpacerWrapper, { "$sx": sx });
|
|
64
68
|
};
|
|
65
69
|
Spacer.displayName = 'Filter.Spacer';
|
|
66
70
|
const SpacerWrapper = styled.styled.div `
|
|
@@ -6,6 +6,10 @@ var styled = require('styled-components');
|
|
|
6
6
|
var box = require('../../atoms/box/box.js');
|
|
7
7
|
var paragraph = require('../../atoms/typography/paragraph.js');
|
|
8
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
|
+
|
|
9
13
|
const Radio = ({ checked = false, disabled, label, onClick, reversed, sx, value, ...rest }) => {
|
|
10
14
|
const handleInputClick = (event) => {
|
|
11
15
|
event.stopPropagation();
|
|
@@ -16,9 +20,9 @@ const Radio = ({ checked = false, disabled, label, onClick, reversed, sx, value,
|
|
|
16
20
|
event.preventDefault();
|
|
17
21
|
onClick && onClick(event);
|
|
18
22
|
};
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
return (React__default.default.createElement(Label, { "$disabled": disabled, "$reversed": reversed, "$sx": sx, onClick: handleLabelClick },
|
|
24
|
+
React__default.default.createElement(Input, { checked: checked, onClickCapture: handleInputClick, disabled: disabled, type: "radio", value: value, ...rest }),
|
|
25
|
+
React__default.default.createElement(paragraph.P, { as: "span" }, label)));
|
|
22
26
|
};
|
|
23
27
|
const Label = styled.styled.label `
|
|
24
28
|
display: flex;
|
|
@@ -77,9 +81,9 @@ const Input = styled.styled.input `
|
|
|
77
81
|
}
|
|
78
82
|
`;
|
|
79
83
|
const RadioGroup = ({ children, name, ...rest }) => {
|
|
80
|
-
return (
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
84
|
+
return (React__default.default.createElement(box.Box, { ...rest }, React__default.default.Children.map(children, (child) => {
|
|
85
|
+
if (React__default.default.isValidElement(child))
|
|
86
|
+
return React__default.default.createElement(Radio, { key: child.key, name: name, ...child.props });
|
|
83
87
|
})));
|
|
84
88
|
};
|
|
85
89
|
Radio.Group = RadioGroup;
|
|
@@ -7,10 +7,14 @@ var styles = require('../../../common/styles.js');
|
|
|
7
7
|
var close = require('../../../icons/basic/close.js');
|
|
8
8
|
var search = require('../../../icons/basic/search.js');
|
|
9
9
|
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
|
+
|
|
10
14
|
const Search = ({ dropdownFilter, onChange, onClearText, onSubmit, placeholder, size, sx, value, }) => {
|
|
11
|
-
const [expanded, setExpanded] =
|
|
12
|
-
const [focused, setFocused] =
|
|
13
|
-
const inputRef =
|
|
15
|
+
const [expanded, setExpanded] = React__default.default.useState(false);
|
|
16
|
+
const [focused, setFocused] = React__default.default.useState(false);
|
|
17
|
+
const inputRef = React__default.default.useRef(null);
|
|
14
18
|
const isCollapsed = !expanded && size === 'collapsed';
|
|
15
19
|
const iconSize = isCollapsed || size === 'large' ? 24 : 16;
|
|
16
20
|
const handleExpand = () => {
|
|
@@ -25,12 +29,12 @@ const Search = ({ dropdownFilter, onChange, onClearText, onSubmit, placeholder,
|
|
|
25
29
|
const handleFocus = () => {
|
|
26
30
|
inputRef?.current?.focus();
|
|
27
31
|
};
|
|
28
|
-
return (
|
|
32
|
+
return (React__default.default.createElement(Wrapper, { "$align": "center", "$dir": "row", "$isCollapsed": isCollapsed, "$isFocused": focused, "$borderRadius": "large", "$size": size, "$sx": sx, onClick: dropdownFilter && size === 'large'
|
|
29
33
|
? undefined
|
|
30
34
|
: isCollapsed
|
|
31
35
|
? handleExpand
|
|
32
36
|
: handleFocus },
|
|
33
|
-
|
|
37
|
+
React__default.default.createElement(search.Search, { color: size === 'large' ? 'blue-7' : 'grey-3', size: iconSize, onClick: isCollapsed ? undefined : handleCollapse, sx: isCollapsed || size !== 'collapsed'
|
|
34
38
|
? undefined
|
|
35
39
|
: `
|
|
36
40
|
&:hover {
|
|
@@ -38,8 +42,8 @@ const Search = ({ dropdownFilter, onChange, onClearText, onSubmit, placeholder,
|
|
|
38
42
|
background-color: var(--color-grey-10);
|
|
39
43
|
border-radius: 50%;
|
|
40
44
|
}` }),
|
|
41
|
-
|
|
42
|
-
!isCollapsed && onClearText && (
|
|
45
|
+
React__default.default.createElement(Input, { "$isCollapsed": isCollapsed, onBlur: () => setFocused(false), onChange: onChange, onFocus: () => setFocused(true), onSubmit: onSubmit, placeholder: placeholder, ref: inputRef, value: value }),
|
|
46
|
+
!isCollapsed && onClearText && (React__default.default.createElement(close.Close, { size: 16, onClick: onClearText, sx: `
|
|
43
47
|
${value.length === 0 ? 'visibility: hidden;' : ''}
|
|
44
48
|
padding: 4px;
|
|
45
49
|
&:hover {
|
|
@@ -47,8 +51,8 @@ const Search = ({ dropdownFilter, onChange, onClearText, onSubmit, placeholder,
|
|
|
47
51
|
background-color: var(--color-grey-10);
|
|
48
52
|
border-radius: 50%;
|
|
49
53
|
}` })),
|
|
50
|
-
size === 'large' && dropdownFilter && (
|
|
51
|
-
|
|
54
|
+
size === 'large' && dropdownFilter && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
55
|
+
React__default.default.createElement(Separator, null),
|
|
52
56
|
dropdownFilter))));
|
|
53
57
|
};
|
|
54
58
|
const Wrapper = styled.styled.div `
|
|
@@ -5,11 +5,15 @@ var React = require('react');
|
|
|
5
5
|
var styled = require('styled-components');
|
|
6
6
|
var paragraph = require('../../atoms/typography/paragraph.js');
|
|
7
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
|
+
|
|
8
12
|
const Select = ({ label, onClick, selected, sx, value, }) => {
|
|
9
|
-
return (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
return (React__default.default.createElement(Label, { onClick: (event) => onClick(event, value), "$sx": sx },
|
|
14
|
+
React__default.default.createElement("input", { value: value, type: "radio", checked: selected, readOnly: true }),
|
|
15
|
+
React__default.default.createElement(SelectBox, { "$selected": selected }),
|
|
16
|
+
React__default.default.createElement(paragraph.P, { as: "div" }, label)));
|
|
13
17
|
};
|
|
14
18
|
const Label = styled.styled.div `
|
|
15
19
|
display: flex;
|
|
@@ -7,27 +7,31 @@ var box = require('../../atoms/box/box.js');
|
|
|
7
7
|
var checkmark_circle = require('../../../icons/basic/checkmark_circle.js');
|
|
8
8
|
var alert_circle = require('../../../icons/notifications/alert_circle.js');
|
|
9
9
|
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
|
+
|
|
10
14
|
const TextArea = ({ bg = 'var(--color-blue-10)', disabled, helperText, icon, label, maxCharacters, minHeight, minWidth, name, onChange, placeholder, resize = false, successful, sx, value, warning, }) => {
|
|
11
|
-
const ref =
|
|
12
|
-
|
|
15
|
+
const ref = React__default.default.useRef(null);
|
|
16
|
+
React__default.default.useEffect(() => {
|
|
13
17
|
if (ref.current) {
|
|
14
18
|
ref.current.style.height = `${minHeight}px`;
|
|
15
19
|
const scrollHeight = ref.current.scrollHeight;
|
|
16
20
|
ref.current.style.height = scrollHeight + 'px';
|
|
17
21
|
}
|
|
18
22
|
}, [ref.current, value]);
|
|
19
|
-
return (
|
|
23
|
+
return (React__default.default.createElement(Label, { "$disabled": disabled, "$sx": sx },
|
|
20
24
|
label,
|
|
21
|
-
|
|
25
|
+
React__default.default.createElement(InputWrapper, { "$bg": bg, "$minWidth": minWidth, "$successful": successful, "$warning": warning },
|
|
22
26
|
icon,
|
|
23
|
-
|
|
27
|
+
React__default.default.createElement(TextAreaElement, { disabled: disabled, name: name, onChange: onChange, placeholder: placeholder, ref: ref, value: maxCharacters
|
|
24
28
|
? value.slice(0, maxCharacters - 1)
|
|
25
29
|
: value, "$minHeight": minHeight, "$resize": resize }),
|
|
26
|
-
successful &&
|
|
27
|
-
warning &&
|
|
28
|
-
|
|
29
|
-
helperText &&
|
|
30
|
-
maxCharacters && (
|
|
30
|
+
successful && React__default.default.createElement(checkmark_circle.CheckmarkCircle, { color: "green-3" }),
|
|
31
|
+
warning && React__default.default.createElement(alert_circle.AlertCircle, { color: "red-4" })),
|
|
32
|
+
React__default.default.createElement(box.Box, { "$gap": 16, "$justify": "space-between" },
|
|
33
|
+
helperText && React__default.default.createElement(HelperText, null, helperText),
|
|
34
|
+
maxCharacters && (React__default.default.createElement(MaxCharactersText, null,
|
|
31
35
|
value.length,
|
|
32
36
|
" / ",
|
|
33
37
|
maxCharacters)))));
|
|
@@ -7,10 +7,14 @@ var chip = require('../../feedback/chip/chip.js');
|
|
|
7
7
|
var checkmark_circle = require('../../../icons/basic/checkmark_circle.js');
|
|
8
8
|
var alert_circle = require('../../../icons/notifications/alert_circle.js');
|
|
9
9
|
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
|
+
|
|
10
14
|
const TextInput = ({ bg = 'var(--color-blue-10)', disabled, helperText, icon, label, maxCharacters, multiple, name, onChange, onMultipleChange, placeholder, size = 'large', successful, sx, value, warning, type = 'text', placeIconAtTheEnd = false, inputSx, }) => {
|
|
11
|
-
const id =
|
|
15
|
+
const id = React__default.default.useId();
|
|
12
16
|
const isMultiple = multiple;
|
|
13
|
-
const [multipleValueToAdd, setMultipleValueToAdd] =
|
|
17
|
+
const [multipleValueToAdd, setMultipleValueToAdd] = React__default.default.useState('');
|
|
14
18
|
const handleMultipleValueToAdd = (event) => {
|
|
15
19
|
setMultipleValueToAdd(event.target.value);
|
|
16
20
|
};
|
|
@@ -46,26 +50,26 @@ const TextInput = ({ bg = 'var(--color-blue-10)', disabled, helperText, icon, la
|
|
|
46
50
|
onMultipleChange &&
|
|
47
51
|
onMultipleChange(value.filter((item) => item !== removalItem));
|
|
48
52
|
};
|
|
49
|
-
return (
|
|
53
|
+
return (React__default.default.createElement(Label, { "$disabled": disabled, "$size": size, "$sx": sx },
|
|
50
54
|
label,
|
|
51
|
-
|
|
55
|
+
React__default.default.createElement(InputWrapper, { "$bg": bg, "$size": size, "$successful": successful, "$warning": warning },
|
|
52
56
|
!placeIconAtTheEnd && icon,
|
|
53
|
-
isMultiple && (
|
|
54
|
-
value.filter(Boolean).map((item, index) => (
|
|
55
|
-
|
|
56
|
-
!isMultiple && (
|
|
57
|
+
isMultiple && (React__default.default.createElement(MultipleInputWrapper, { onSubmit: handleMultipleAdd },
|
|
58
|
+
value.filter(Boolean).map((item, index) => (React__default.default.createElement(chip.Chip, { key: id + item + index, color: "blue", size: "small", onDismiss: () => handleMultipleItemRemoval(item) }, item))),
|
|
59
|
+
React__default.default.createElement(Input, { onChange: handleMultipleValueToAdd, onKeyDown: handleMultipleValueDelete, value: multipleValueToAdd, "$size": size, "$sx": inputSx }))),
|
|
60
|
+
!isMultiple && (React__default.default.createElement(Input, { disabled: disabled, name: name, onChange: onChange, placeholder: placeholder, value: type === 'number'
|
|
57
61
|
? value
|
|
58
62
|
: maxCharacters
|
|
59
63
|
? value?.slice(0, maxCharacters - 1) || ''
|
|
60
64
|
: value, "$size": size, type: type, "$sx": inputSx })),
|
|
61
|
-
maxCharacters && type !== 'number' && !placeIconAtTheEnd && (
|
|
65
|
+
maxCharacters && type !== 'number' && !placeIconAtTheEnd && (React__default.default.createElement(MaxCharactersText, { "$size": size },
|
|
62
66
|
value?.length || 0,
|
|
63
67
|
" / ",
|
|
64
68
|
maxCharacters)),
|
|
65
69
|
placeIconAtTheEnd && icon,
|
|
66
|
-
successful &&
|
|
67
|
-
warning &&
|
|
68
|
-
helperText &&
|
|
70
|
+
successful && React__default.default.createElement(checkmark_circle.CheckmarkCircle, { color: "green-3" }),
|
|
71
|
+
warning && React__default.default.createElement(alert_circle.AlertCircle, { color: "red-4" })),
|
|
72
|
+
helperText && React__default.default.createElement(HelperText, { "$size": size }, helperText)));
|
|
69
73
|
};
|
|
70
74
|
const Label = styled.styled.div `
|
|
71
75
|
width: 100%;
|
|
@@ -6,8 +6,12 @@ var React = require('react');
|
|
|
6
6
|
var styled = require('styled-components');
|
|
7
7
|
var clock = require('../../../icons/time/clock.js');
|
|
8
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
|
+
|
|
9
13
|
const Time = ({ selectedTime, setTime, selectedPeriod, setPeriod, }) => {
|
|
10
|
-
const hours =
|
|
14
|
+
const hours = React__default.default.useMemo(() => {
|
|
11
15
|
const hours = [];
|
|
12
16
|
for (let i = 1; i <= 12; i++) {
|
|
13
17
|
hours.push(`${i}:00`);
|
|
@@ -17,12 +21,12 @@ const Time = ({ selectedTime, setTime, selectedPeriod, setPeriod, }) => {
|
|
|
17
21
|
}
|
|
18
22
|
return hours;
|
|
19
23
|
}, []);
|
|
20
|
-
return (
|
|
24
|
+
return (React__default.default.createElement(dropdown.Dropdown, { options: hours.map((hour) => ({
|
|
21
25
|
value: hour,
|
|
22
26
|
label: hour,
|
|
23
|
-
})), containerSx: "height: 440px;", trigger:
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
})), containerSx: "height: 440px;", trigger: React__default.default.createElement(InputWrapper, null,
|
|
28
|
+
React__default.default.createElement(Input, { readOnly: true, value: `${selectedTime} ${selectedPeriod}` }),
|
|
29
|
+
React__default.default.createElement(clock.Clock, null)), additionalOptions: [
|
|
26
30
|
{
|
|
27
31
|
label: 'AM',
|
|
28
32
|
value: 'AM',
|