@tcn/ui 0.3.0 → 0.3.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/README.md +2 -1
- package/dist/Color-ASIRERSW-B4GaVKuQ.js +990 -0
- package/dist/Color-ASIRERSW-B4GaVKuQ.js.map +1 -0
- package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js +1485 -0
- package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js.map +1 -0
- package/dist/actions/__docs__/components/gallery.d.ts +8 -0
- package/dist/actions/__docs__/components/gallery.d.ts.map +1 -0
- package/dist/actions/__docs__/components/gallery.js +20 -0
- package/dist/actions/__docs__/components/gallery.js.map +1 -0
- package/dist/actions/__docs__/components/showcase.d.ts +27 -0
- package/dist/actions/__docs__/components/showcase.d.ts.map +1 -0
- package/dist/actions/__docs__/components/showcase.js +15 -0
- package/dist/actions/__docs__/components/showcase.js.map +1 -0
- package/dist/actions/button/base_button/base_button.d.ts +2 -0
- package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
- package/dist/actions/button/base_button/base_button.js +30 -28
- package/dist/actions/button/base_button/base_button.js.map +1 -1
- package/dist/actions/button/button/button.js +6 -6
- package/dist/actions/button/button_group/button_group.d.ts +1 -1
- package/dist/actions/button/button_group/button_group.d.ts.map +1 -1
- package/dist/actions/button/button_group/button_group.js +11 -8
- package/dist/actions/button/button_group/button_group.js.map +1 -1
- package/dist/actions/button/select_group/select_group.js +15 -15
- package/dist/actions/button/select_group/select_group.js.map +1 -1
- package/dist/actions/button/select_group/single_select_group.js +6 -6
- package/dist/actions/button/slim_button/slim_button.js +2 -2
- package/dist/actions/types.d.ts +2 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/badge.css +1 -1
- package/dist/base_button.css +1 -1
- package/dist/body_text.css +1 -1
- package/dist/bottom_resize_handle.css +1 -1
- package/dist/bubble.css +1 -1
- package/dist/button.css +1 -1
- package/dist/button_group.css +1 -1
- package/dist/callout.css +1 -1
- package/dist/caption.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/chip.css +1 -1
- package/dist/circle.css +1 -1
- package/dist/collapsible_box.css +1 -1
- package/dist/color_input.css +1 -1
- package/dist/color_picker.css +1 -1
- package/dist/column.css +1 -1
- package/dist/confirm.css +1 -1
- package/dist/css/layers.css +1 -0
- package/dist/date_picker.css +1 -1
- package/dist/date_picker_date.css +1 -1
- package/dist/date_picker_day.css +1 -1
- package/dist/date_picker_header.css +1 -1
- package/dist/date_picker_input.css +1 -1
- package/dist/date_picker_time_selector.css +1 -1
- package/dist/date_picker_year_input.css +1 -1
- package/dist/date_picker_year_selector.css +1 -1
- package/dist/divider.css +1 -1
- package/dist/draggable.css +1 -1
- package/dist/drawer_bottom.css +1 -1
- package/dist/drawer_end.css +1 -1
- package/dist/drawer_start.css +1 -1
- package/dist/drawer_top.css +1 -1
- package/dist/end_resize_handle.css +1 -1
- package/dist/feedback/loading/loading.js +12 -12
- package/dist/feedback/loading/loading.js.map +1 -1
- package/dist/feedback/progress/progress_bar.d.ts.map +1 -1
- package/dist/feedback/progress/progress_bar.js +34 -26
- package/dist/feedback/progress/progress_bar.js.map +1 -1
- package/dist/field_control.css +1 -1
- package/dist/field_set.css +1 -1
- package/dist/footer.css +1 -1
- package/dist/footnote.css +1 -1
- package/dist/form/field/common/field_control/field_control.js +1 -1
- package/dist/form/field/common/field_control/field_control.js.map +1 -1
- package/dist/form/field/common/field_description.js +3 -3
- package/dist/form/field/common/field_description.js.map +1 -1
- package/dist/form/field/common/field_error.js +8 -7
- package/dist/form/field/common/field_error.js.map +1 -1
- package/dist/form/field/common/field_header.js +7 -7
- package/dist/form/field/common/field_header.js.map +1 -1
- package/dist/form/field/common/status_input/status_input.d.ts.map +1 -1
- package/dist/form/field/common/status_input/status_input.js +20 -14
- package/dist/form/field/common/status_input/status_input.js.map +1 -1
- package/dist/form/field/field.js +5 -5
- package/dist/form/field/h_field/h_field.js +11 -11
- package/dist/form/field/h_field/h_field.js.map +1 -1
- package/dist/form/field/v_field/v_field.js +8 -8
- package/dist/form/field/v_field/v_field.js.map +1 -1
- package/dist/form/field_set/field_set.d.ts.map +1 -1
- package/dist/form/field_set/field_set.js +19 -12
- package/dist/form/field_set/field_set.js.map +1 -1
- package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js +6 -0
- package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js.map +1 -0
- package/dist/frame.css +1 -1
- package/dist/gallery.css +1 -0
- package/dist/grid.css +1 -1
- package/dist/h_body.css +1 -1
- package/dist/h_field.css +1 -1
- package/dist/h_panel.css +1 -1
- package/dist/header.css +1 -1
- package/dist/headline.css +1 -1
- package/dist/input.css +1 -1
- package/dist/inputs/checkbox/checkbox.js +15 -15
- package/dist/inputs/checkbox/checkbox.js.map +1 -1
- package/dist/inputs/checkbox/checkbox_row.d.ts +1 -1
- package/dist/inputs/checkbox/checkbox_row.d.ts.map +1 -1
- package/dist/inputs/checkbox/checkbox_row.js +19 -8
- package/dist/inputs/checkbox/checkbox_row.js.map +1 -1
- package/dist/inputs/color_input/color_input.d.ts.map +1 -1
- package/dist/inputs/color_input/color_input.js +32 -28
- package/dist/inputs/color_input/color_input.js.map +1 -1
- package/dist/inputs/color_input/color_picker.js +14 -14
- package/dist/inputs/color_input/color_picker.js.map +1 -1
- package/dist/inputs/combo_box/combo_box.js +16 -16
- package/dist/inputs/combo_box/combo_box.js.map +1 -1
- package/dist/inputs/date_picker/date_picker.js +26 -26
- package/dist/inputs/date_picker/date_picker.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_body.js +3 -3
- package/dist/inputs/date_picker/date_picker_body.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_date.js +2 -2
- package/dist/inputs/date_picker/date_picker_date.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_day.d.ts.map +1 -1
- package/dist/inputs/date_picker/date_picker_day.js +16 -8
- package/dist/inputs/date_picker/date_picker_day.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_header.js +1 -1
- package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_input.js +18 -18
- package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_time_selector.d.ts.map +1 -1
- package/dist/inputs/date_picker/date_picker_time_selector.js +14 -11
- package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_input.js +4 -4
- package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_selector.d.ts.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_selector.js +13 -10
- package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
- package/dist/inputs/index.d.ts +0 -4
- package/dist/inputs/index.d.ts.map +1 -1
- package/dist/inputs/index.js +53 -61
- package/dist/inputs/index.js.map +1 -1
- package/dist/inputs/input/input.js +6 -6
- package/dist/inputs/input/input.js.map +1 -1
- package/dist/inputs/mask_input/key_capture_input.js +7 -7
- package/dist/inputs/mask_input/mask_input.js +4 -4
- package/dist/inputs/multi_combo_box/multi_combo_box.js +17 -17
- package/dist/inputs/multiselect/multiselect.d.ts.map +1 -1
- package/dist/inputs/multiselect/multiselect.js +23 -22
- package/dist/inputs/multiselect/multiselect.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_inline_values.d.ts.map +1 -1
- package/dist/inputs/multiselect/multiselect_inline_values.js +18 -17
- package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_values.js +20 -20
- package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +104 -91
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/radio/radio.js +18 -18
- package/dist/inputs/radio/radio.js.map +1 -1
- package/dist/inputs/radio/radio_row.js +3 -3
- package/dist/inputs/select/select.d.ts.map +1 -1
- package/dist/inputs/select/select.js +40 -40
- package/dist/inputs/select/select.js.map +1 -1
- package/dist/inputs/slider/slider.js +9 -9
- package/dist/inputs/slider/slider.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.js +9 -9
- package/dist/inputs/suggestions/suggestion_item.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +29 -22
- package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
- package/dist/inputs/switch/switch.js +16 -16
- package/dist/inputs/switch/switch.js.map +1 -1
- package/dist/inputs/textarea/textarea.js +4 -4
- package/dist/inputs/textarea/textarea.js.map +1 -1
- package/dist/inputs/unit_input/unit_input.js +12 -12
- package/dist/inputs/unit_input/unit_input.js.map +1 -1
- package/dist/layouts/body/h_body.js +7 -7
- package/dist/layouts/body/h_body.js.map +1 -1
- package/dist/layouts/body/v_body.js +6 -6
- package/dist/layouts/column/column.js +14 -14
- package/dist/layouts/column/column.js.map +1 -1
- package/dist/layouts/divider/divider.d.ts.map +1 -1
- package/dist/layouts/divider/divider.js +11 -12
- package/dist/layouts/divider/divider.js.map +1 -1
- package/dist/layouts/footer/footer.js +7 -7
- package/dist/layouts/grid/grid.d.ts.map +1 -1
- package/dist/layouts/grid/grid.js +40 -31
- package/dist/layouts/grid/grid.js.map +1 -1
- package/dist/layouts/header/header.js +5 -5
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/list/item.js +2 -2
- package/dist/layouts/list/list.js +7 -7
- package/dist/layouts/list/section_header.d.ts.map +1 -1
- package/dist/layouts/list/section_header.js +17 -7
- package/dist/layouts/list/section_header.js.map +1 -1
- package/dist/layouts/scaffold/scaffold.js +16 -16
- package/dist/layouts/sidebar_end/sidebar_end.js +25 -25
- package/dist/layouts/sidebar_end/sidebar_end.js.map +1 -1
- package/dist/layouts/sidebar_start/sidebar_start.js +21 -21
- package/dist/layouts/sidebar_start/sidebar_start.js.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.js +12 -17
- package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
- package/dist/left_resize_handle.css +1 -1
- package/dist/loading.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/modal.css +1 -1
- package/dist/multi_combo_box.css +1 -1
- package/dist/multiselect.css +1 -1
- package/dist/multiselect_values.css +1 -1
- package/dist/overlay/context_menu/context_menu.js +5 -5
- package/dist/overlay/context_menu/context_menu.js.map +1 -1
- package/dist/overlay/frame/frame.js +4 -4
- package/dist/overlay/menu/menu.js +35 -35
- package/dist/overlay/menu/menu.js.map +1 -1
- package/dist/overlay/popper/legacy/popper.d.ts.map +1 -1
- package/dist/overlay/popper/legacy/popper.js +12 -11
- package/dist/overlay/popper/legacy/popper.js.map +1 -1
- package/dist/overlay/popper/preview_popper.js +16 -16
- package/dist/overlay/popper/preview_popper.js.map +1 -1
- package/dist/overlay/portal/portal.css +1 -0
- package/dist/overlay/portal/portal_platform.d.ts.map +1 -1
- package/dist/overlay/portal/portal_platform.js +6 -5
- package/dist/overlay/portal/portal_platform.js.map +1 -1
- package/dist/overlay/portal/portal_platform_context.js +4 -4
- package/dist/page.css +1 -1
- package/dist/phone_number_input.css +1 -1
- package/dist/picture_placeholder.css +1 -1
- package/dist/popper.css +1 -1
- package/dist/progress_bar.css +1 -1
- package/dist/radio.css +1 -1
- package/dist/rect.css +1 -1
- package/dist/right_resize_handle.css +1 -1
- package/dist/scaffold.css +1 -1
- package/dist/select.css +1 -1
- package/dist/select_group.css +1 -1
- package/dist/showcase-WfP6kBEb.js +58401 -0
- package/dist/showcase-WfP6kBEb.js.map +1 -0
- package/dist/showcase.css +1 -0
- package/dist/sidebar_end.css +1 -1
- package/dist/sidebar_start.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/slim_button.css +1 -1
- package/dist/stack.css +1 -1
- package/dist/stacks/box/bottom_resize_handle.js +1 -1
- package/dist/stacks/box/bottom_resize_handle.js.map +1 -1
- package/dist/stacks/box/box.js +24 -24
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/stacks/box/end_resize_handle.js +1 -1
- package/dist/stacks/box/end_resize_handle.js.map +1 -1
- package/dist/stacks/box/left_resize_handle.js +7 -7
- package/dist/stacks/box/left_resize_handle.js.map +1 -1
- package/dist/stacks/box/right_resize_handle.js +3 -3
- package/dist/stacks/box/right_resize_handle.js.map +1 -1
- package/dist/stacks/box/start_resize_handle.js +6 -6
- package/dist/stacks/box/start_resize_handle.js.map +1 -1
- package/dist/stacks/box/top_resize_handle.js +1 -1
- package/dist/stacks/box/top_resize_handle.js.map +1 -1
- package/dist/stacks/h_collapsible_box.d.ts.map +1 -1
- package/dist/stacks/h_collapsible_box.js +10 -6
- package/dist/stacks/h_collapsible_box.js.map +1 -1
- package/dist/stacks/h_stack.js +45 -45
- package/dist/stacks/h_stack.js.map +1 -1
- package/dist/stacks/spacer.js +16 -16
- package/dist/stacks/spacer.js.map +1 -1
- package/dist/stacks/story_components/circle.js +9 -9
- package/dist/stacks/story_components/circle.js.map +1 -1
- package/dist/stacks/story_components/picture_placeholder.d.ts.map +1 -1
- package/dist/stacks/story_components/picture_placeholder.js +13 -9
- package/dist/stacks/story_components/picture_placeholder.js.map +1 -1
- package/dist/stacks/story_components/rect.js +5 -5
- package/dist/stacks/story_components/rect.js.map +1 -1
- package/dist/stacks/story_components/style_box.js +4 -4
- package/dist/stacks/utils/use_is_collapsed.js +6 -6
- package/dist/stacks/v_collapsible_box.d.ts.map +1 -1
- package/dist/stacks/v_collapsible_box.js +12 -8
- package/dist/stacks/v_collapsible_box.js.map +1 -1
- package/dist/stacks/v_stack.js +45 -45
- package/dist/stacks/v_stack.js.map +1 -1
- package/dist/stacks/z_stack.js +39 -39
- package/dist/stacks/z_stack.js.map +1 -1
- package/dist/start_resize_handle.css +1 -1
- package/dist/status_input.css +1 -1
- package/dist/subheadline.css +1 -1
- package/dist/suggestion_item.css +1 -1
- package/dist/suggestion_list.css +1 -1
- package/dist/surfaces/alert/alert.js +3 -3
- package/dist/surfaces/alert/alert.js.map +1 -1
- package/dist/surfaces/card/card.js +4 -4
- package/dist/surfaces/confirm/confirm.d.ts.map +1 -1
- package/dist/surfaces/confirm/confirm.js +27 -20
- package/dist/surfaces/confirm/confirm.js.map +1 -1
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js +3 -3
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +1 -1
- package/dist/surfaces/drawers/drawer_end/drawer_end.js +4 -4
- package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +1 -1
- package/dist/surfaces/drawers/drawer_start/drawer_start.js +3 -3
- package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +1 -1
- package/dist/surfaces/drawers/drawer_top/drawer_top.js +3 -3
- package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +1 -1
- package/dist/surfaces/modal/modal.js +5 -5
- package/dist/surfaces/page/h_page.js +7 -7
- package/dist/surfaces/page/h_page.js.map +1 -1
- package/dist/surfaces/page/v_page.js +7 -7
- package/dist/surfaces/page/v_page.js.map +1 -1
- package/dist/surfaces/panel/h_panel.js +14 -14
- package/dist/surfaces/panel/v_panel.js +9 -9
- package/dist/surfaces/pop_confirm/pop_confirm.js +6 -6
- package/dist/surfaces/popconfirm/pop_confirm.js +8 -8
- package/dist/surfaces/popover/popover.js +1 -1
- package/dist/surfaces/popover/popover.js.map +1 -1
- package/dist/surfaces/tooltip/tooltip.js +8 -8
- package/dist/surfaces/window/window.js +9 -9
- package/dist/switch.css +1 -1
- package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js +3777 -0
- package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js.map +1 -0
- package/dist/tethered.css +1 -1
- package/dist/textarea.css +1 -1
- package/dist/themes/stylesheets/reset.css +1 -0
- package/dist/themes/stylesheets/reset.js +133 -131
- package/dist/themes/stylesheets/reset.js.map +1 -1
- package/dist/themes/theme.d.ts.map +1 -1
- package/dist/themes/theme.js +15 -6
- package/dist/themes/theme.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -0
- package/dist/themes/themes/ergo/ergo_theme.js +505 -515
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/themes/themes/windows_98/windows_98.css +1 -0
- package/dist/themes/themes/windows_98/windows_98_theme.js +1034 -1168
- package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
- package/dist/title.css +1 -1
- package/dist/tokens/badge/badge.js +13 -13
- package/dist/tokens/badge/badge.js.map +1 -1
- package/dist/tokens/bubble/bubble.js +6 -5
- package/dist/tokens/bubble/bubble.js.map +1 -1
- package/dist/tokens/chip/chip.js +4 -3
- package/dist/tokens/chip/chip.js.map +1 -1
- package/dist/tooltip.css +1 -1
- package/dist/top_resize_handle.css +1 -1
- package/dist/typography/body_text/body_text.js +9 -9
- package/dist/typography/body_text/body_text.js.map +1 -1
- package/dist/typography/callout/callout.js +9 -9
- package/dist/typography/callout/callout.js.map +1 -1
- package/dist/typography/caption/caption.js +5 -5
- package/dist/typography/caption/caption.js.map +1 -1
- package/dist/typography/footnote/footnote.js +9 -9
- package/dist/typography/footnote/footnote.js.map +1 -1
- package/dist/typography/headline/headline.js +13 -13
- package/dist/typography/headline/headline.js.map +1 -1
- package/dist/typography/subheadline/subheadline.js +10 -10
- package/dist/typography/subheadline/subheadline.js.map +1 -1
- package/dist/typography/title/title.js +6 -6
- package/dist/typography/title/title.js.map +1 -1
- package/dist/unit_input.css +1 -1
- package/dist/utility_bar.css +1 -1
- package/dist/utils/click_away_listener.js +10 -10
- package/dist/utils/click_away_listener.js.map +1 -1
- package/dist/utils/dnd/draggable/draggable.js +4 -4
- package/dist/utils/dnd/handle.js +8 -8
- package/dist/utils/focus_redirect.js +5 -5
- package/dist/utils/hooks/make_context_hook.js +4 -4
- package/dist/utils/hooks/use_media_query.js +2 -2
- package/dist/utils/hooks/use_media_query.js.map +1 -1
- package/dist/v_body.css +1 -1
- package/dist/window.css +1 -1
- package/package.json +3 -3
- package/src/actions/__docs__/actions.mdx +194 -0
- package/src/actions/__docs__/actions.stories.tsx +481 -0
- package/src/actions/__docs__/components/gallery.module.css +6 -0
- package/src/actions/__docs__/components/gallery.tsx +28 -0
- package/src/actions/__docs__/components/showcase.module.css +55 -0
- package/src/actions/__docs__/components/showcase.tsx +121 -0
- package/src/actions/button/__stories__/button_group.stories.tsx +63 -0
- package/src/actions/button/__stories__/select_group.stories.tsx +47 -4
- package/src/actions/button/base_button/base_button.module.css +15 -13
- package/src/actions/button/base_button/base_button.tsx +6 -1
- package/src/actions/button/button/button.module.css +52 -50
- package/src/actions/button/button_group/button_group.module.css +54 -52
- package/src/actions/button/button_group/button_group.tsx +9 -4
- package/src/actions/button/select_group/select_group.module.css +54 -52
- package/src/actions/button/select_group/select_group.tsx +2 -2
- package/src/actions/button/slim_button/slim_button.module.css +7 -5
- package/src/actions/types.ts +6 -0
- package/src/css/layers.css +1 -0
- package/src/feedback/loading/loading.module.css +17 -15
- package/src/feedback/progress/progress_bar.module.css +52 -50
- package/src/feedback/progress/progress_bar.tsx +6 -1
- package/src/form/field/common/field_control/field_control.module.css +17 -15
- package/src/form/field/common/field_control/field_control.tsx +1 -1
- package/src/form/field/common/field_description.tsx +1 -1
- package/src/form/field/common/field_error.tsx +1 -1
- package/src/form/field/common/field_header.tsx +1 -1
- package/src/form/field/common/status_input/status_input.module.css +10 -8
- package/src/form/field/common/status_input/status_input.tsx +8 -5
- package/src/form/field/h_field/h_field.module.css +7 -5
- package/src/form/field/h_field/h_field.tsx +1 -1
- package/src/form/field/v_field/v_field.tsx +1 -1
- package/src/form/field_set/field_set.module.css +16 -14
- package/src/form/field_set/field_set.tsx +7 -4
- package/src/inputs/checkbox/checkbox.module.css +45 -43
- package/src/inputs/checkbox/checkbox.tsx +1 -1
- package/src/inputs/checkbox/checkbox_row.tsx +9 -2
- package/src/inputs/color_input/color_input.module.css +58 -56
- package/src/inputs/color_input/color_input.tsx +8 -4
- package/src/inputs/color_input/color_picker.module.css +13 -11
- package/src/inputs/color_input/color_picker.tsx +2 -2
- package/src/inputs/combo_box/combo_box.tsx +1 -1
- package/src/inputs/date_picker/date_picker.module.css +19 -17
- package/src/inputs/date_picker/date_picker.tsx +2 -2
- package/src/inputs/date_picker/date_picker_body.tsx +1 -1
- package/src/inputs/date_picker/date_picker_date.module.css +71 -69
- package/src/inputs/date_picker/date_picker_date.tsx +2 -2
- package/src/inputs/date_picker/date_picker_day.module.css +5 -3
- package/src/inputs/date_picker/date_picker_day.tsx +7 -2
- package/src/inputs/date_picker/date_picker_header.module.css +4 -2
- package/src/inputs/date_picker/date_picker_header.tsx +1 -1
- package/src/inputs/date_picker/date_picker_input.module.css +55 -53
- package/src/inputs/date_picker/date_picker_input.tsx +3 -3
- package/src/inputs/date_picker/date_picker_time_selector.module.css +30 -28
- package/src/inputs/date_picker/date_picker_time_selector.tsx +7 -4
- package/src/inputs/date_picker/date_picker_year_input.module.css +46 -44
- package/src/inputs/date_picker/date_picker_year_input.tsx +1 -1
- package/src/inputs/date_picker/date_picker_year_selector.module.css +48 -46
- package/src/inputs/date_picker/date_picker_year_selector.tsx +5 -2
- package/src/inputs/index.ts +0 -4
- package/src/inputs/input/input.module.css +56 -79
- package/src/inputs/input/input.tsx +1 -1
- package/src/inputs/multi_combo_box/multi_combo_box.module.css +4 -2
- package/src/inputs/multiselect/multiselect.module.css +4 -2
- package/src/inputs/multiselect/multiselect.tsx +2 -1
- package/src/inputs/multiselect/multiselect_inline_values.tsx +3 -2
- package/src/inputs/multiselect/multiselect_values.module.css +28 -26
- package/src/inputs/multiselect/multiselect_values.tsx +3 -3
- package/src/inputs/phone_number_input/phone_number_input.module.css +54 -52
- package/src/inputs/phone_number_input/phone_number_input.tsx +15 -6
- package/src/inputs/radio/radio.module.css +48 -66
- package/src/inputs/radio/radio.tsx +2 -2
- package/src/inputs/select/select.module.css +57 -59
- package/src/inputs/select/select.tsx +4 -2
- package/src/inputs/slider/slider.module.css +151 -149
- package/src/inputs/slider/slider.tsx +1 -1
- package/src/inputs/suggestions/suggestion_item.module.css +35 -53
- package/src/inputs/suggestions/suggestion_item.tsx +1 -1
- package/src/inputs/suggestions/suggestion_list.module.css +29 -27
- package/src/inputs/suggestions/suggestion_list.tsx +6 -3
- package/src/inputs/switch/switch.module.css +111 -109
- package/src/inputs/switch/switch.tsx +3 -3
- package/src/inputs/textarea/textarea.module.css +47 -65
- package/src/inputs/textarea/textarea.tsx +1 -1
- package/src/inputs/unit_input/unit_input.module.css +20 -18
- package/src/inputs/unit_input/unit_input.tsx +3 -3
- package/src/layouts/body/h_body.module.css +7 -4
- package/src/layouts/body/h_body.tsx +1 -1
- package/src/layouts/body/v_body.module.css +6 -4
- package/src/layouts/column/column.module.css +30 -28
- package/src/layouts/column/column.tsx +2 -2
- package/src/layouts/divider/divider.module.css +103 -101
- package/src/layouts/divider/divider.tsx +1 -2
- package/src/layouts/footer/footer.module.css +24 -21
- package/src/layouts/grid/grid.module.css +20 -18
- package/src/layouts/grid/grid.tsx +6 -1
- package/src/layouts/header/header.module.css +7 -5
- package/src/layouts/header/header.tsx +1 -1
- package/src/layouts/list/section_header.module.css +16 -14
- package/src/layouts/list/section_header.tsx +7 -1
- package/src/layouts/scaffold/scaffold.module.css +6 -4
- package/src/layouts/sidebar_end/sidebar_end.module.css +28 -26
- package/src/layouts/sidebar_end/sidebar_end.tsx +2 -2
- package/src/layouts/sidebar_start/sidebar_start.module.css +28 -26
- package/src/layouts/sidebar_start/sidebar_start.tsx +2 -2
- package/src/layouts/utility_bar/utility_bar.module.css +5 -3
- package/src/layouts/utility_bar/utility_bar.tsx +1 -6
- package/src/overlay/context_menu/context_menu.tsx +1 -1
- package/src/overlay/frame/frame.module.css +6 -4
- package/src/overlay/frame/frame_stories.module.css +14 -12
- package/src/overlay/menu/menu.module.css +30 -28
- package/src/overlay/menu/menu.tsx +2 -2
- package/src/overlay/popper/legacy/popper.module.css +10 -8
- package/src/overlay/popper/legacy/popper.tsx +2 -1
- package/src/overlay/popper/preview_popper.tsx +1 -1
- package/src/overlay/portal/portal.css +33 -31
- package/src/overlay/portal/portal_platform.tsx +5 -5
- package/src/overlay/tethered/tethered.module.css +9 -7
- package/src/stacks/box/bottom_resize_handle.module.css +11 -9
- package/src/stacks/box/bottom_resize_handle.tsx +1 -1
- package/src/stacks/box/box.tsx +1 -1
- package/src/stacks/box/end_resize_handle.module.css +16 -14
- package/src/stacks/box/end_resize_handle.tsx +1 -1
- package/src/stacks/box/left_resize_handle.module.css +11 -9
- package/src/stacks/box/left_resize_handle.tsx +1 -1
- package/src/stacks/box/right_resize_handle.module.css +11 -9
- package/src/stacks/box/right_resize_handle.tsx +1 -1
- package/src/stacks/box/start_resize_handle.module.css +16 -14
- package/src/stacks/box/start_resize_handle.tsx +1 -1
- package/src/stacks/box/top_resize_handle.module.css +11 -9
- package/src/stacks/box/top_resize_handle.tsx +1 -1
- package/src/stacks/collapsible_box.module.css +45 -29
- package/src/stacks/demo.module.css +5 -3
- package/src/stacks/h_collapsible_box.tsx +5 -1
- package/src/stacks/h_stack.tsx +1 -1
- package/src/stacks/spacer.tsx +1 -1
- package/src/stacks/stack.module.css +400 -393
- package/src/stacks/story_components/circle.module.css +8 -6
- package/src/stacks/story_components/circle.tsx +1 -1
- package/src/stacks/story_components/picture_placeholder.module.css +4 -2
- package/src/stacks/story_components/picture_placeholder.tsx +5 -1
- package/src/stacks/story_components/rect.module.css +9 -7
- package/src/stacks/story_components/rect.tsx +1 -1
- package/src/stacks/v_collapsible_box.tsx +5 -1
- package/src/stacks/v_stack.tsx +1 -1
- package/src/stacks/z_stack.tsx +1 -1
- package/src/surfaces/alert/alert.tsx +1 -1
- package/src/surfaces/card/card_stories.module.css +13 -11
- package/src/surfaces/confirm/confirm.module.css +37 -35
- package/src/surfaces/confirm/confirm.tsx +7 -4
- package/src/surfaces/drawers/drawer_bottom/drawer_bottom.module.css +4 -2
- package/src/surfaces/drawers/drawer_bottom/drawer_bottom.tsx +1 -1
- package/src/surfaces/drawers/drawer_end/drawer_end.module.css +4 -2
- package/src/surfaces/drawers/drawer_end/drawer_end.tsx +1 -1
- package/src/surfaces/drawers/drawer_start/drawer_start.module.css +4 -2
- package/src/surfaces/drawers/drawer_start/drawer_start.tsx +1 -1
- package/src/surfaces/drawers/drawer_top/drawer_top.module.css +4 -2
- package/src/surfaces/drawers/drawer_top/drawer_top.tsx +1 -1
- package/src/surfaces/modal/modal.module.css +5 -3
- package/src/surfaces/page/h_page.tsx +1 -1
- package/src/surfaces/page/page.module.css +12 -10
- package/src/surfaces/page/v_page.tsx +1 -1
- package/src/surfaces/panel/panel.module.css +8 -7
- package/src/surfaces/popover/popover.tsx +1 -1
- package/src/surfaces/tooltip/tooltip.module.css +4 -2
- package/src/surfaces/window/window.module.css +6 -4
- package/src/themes/stylesheets/reset.css +133 -131
- package/src/themes/theme.tsx +17 -0
- package/src/themes/themes/ergo/ergo_theme.css +505 -515
- package/src/themes/themes/windows_98/windows_98.css +1030 -1164
- package/src/tokens/badge/badge.module.css +13 -11
- package/src/tokens/badge/badge.tsx +2 -2
- package/src/tokens/bubble/bubble.module.css +12 -10
- package/src/tokens/bubble/bubble.tsx +1 -1
- package/src/tokens/chip/chip.module.css +14 -12
- package/src/tokens/chip/chip.tsx +1 -1
- package/src/typography/body_text/body_text.module.css +61 -59
- package/src/typography/body_text/body_text.tsx +1 -1
- package/src/typography/callout/callout.module.css +56 -54
- package/src/typography/callout/callout.tsx +1 -1
- package/src/typography/caption/caption.module.css +56 -54
- package/src/typography/caption/caption.tsx +1 -1
- package/src/typography/footnote/footnote.module.css +56 -54
- package/src/typography/footnote/footnote.tsx +1 -1
- package/src/typography/headline/headline.module.css +57 -55
- package/src/typography/headline/headline.tsx +1 -1
- package/src/typography/subheadline/subheadline.module.css +57 -55
- package/src/typography/subheadline/subheadline.tsx +1 -1
- package/src/typography/title/title.module.css +54 -52
- package/src/typography/title/title.tsx +1 -1
- package/src/utils/dnd/draggable/draggable.module.css +8 -6
- package/dist/form/field/common/types.js +0 -2
- package/dist/form/field/common/types.js.map +0 -1
- package/dist/inputs/mask_input/mask_config.js +0 -2
- package/dist/inputs/mask_input/mask_config.js.map +0 -1
- package/dist/inputs/mask_input/mask_cursor.js +0 -2
- package/dist/inputs/mask_input/mask_cursor.js.map +0 -1
- package/dist/inputs/multiselect/multiselect_row.d.ts +0 -10
- package/dist/inputs/multiselect/multiselect_row.d.ts.map +0 -1
- package/dist/inputs/multiselect/multiselect_row.js +0 -35
- package/dist/inputs/multiselect/multiselect_row.js.map +0 -1
- package/dist/inputs/switch/switch_row.d.ts +0 -8
- package/dist/inputs/switch/switch_row.d.ts.map +0 -1
- package/dist/inputs/switch/switch_row.js +0 -16
- package/dist/inputs/switch/switch_row.js.map +0 -1
- package/dist/inputs/textarea/textarea_row.d.ts +0 -8
- package/dist/inputs/textarea/textarea_row.d.ts.map +0 -1
- package/dist/inputs/textarea/textarea_row.js +0 -12
- package/dist/inputs/textarea/textarea_row.js.map +0 -1
- package/dist/overlay/tethered/types.js +0 -2
- package/dist/overlay/tethered/types.js.map +0 -1
- package/dist/portal_platform.css +0 -1
- package/dist/stacks/box/handle_props.js +0 -2
- package/dist/stacks/box/handle_props.js.map +0 -1
- package/dist/utils/calendar/calendar_date.js +0 -2
- package/dist/utils/calendar/calendar_date.js.map +0 -1
- package/dist/utils/dnd/types.js +0 -2
- package/dist/utils/dnd/types.js.map +0 -1
- package/src/inputs/multiselect/multiselect_row.tsx +0 -57
- package/src/inputs/switch/TODO.md +0 -3
- package/src/inputs/switch/switch_row.tsx +0 -33
- package/src/inputs/textarea/textarea_row.tsx +0 -24
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as N } from "react/jsx-runtime";
|
|
2
2
|
import { VStack as x } from "../../stacks/v_stack.js";
|
|
3
3
|
import { ZStack as C } from "../../stacks/z_stack.js";
|
|
4
|
-
import { clsx as
|
|
4
|
+
import { clsx as n } from "clsx";
|
|
5
5
|
import "../../actions/button/base_button/base_button.js";
|
|
6
6
|
import "../../actions/button/button_group/button_group.js";
|
|
7
7
|
import "../../actions/button/slim_button/slim_button.js";
|
|
@@ -16,7 +16,7 @@ import "../../headline.module-BiwHBtGf.js";
|
|
|
16
16
|
import "../../subheadline.module-C-v7zMkQ.js";
|
|
17
17
|
import "../../typography/title/title.js";
|
|
18
18
|
import { ClockIcon as j } from "@tcn/icons/clock_icon.js";
|
|
19
|
-
import '../../date_picker_time_selector.css';const z = "_time-box_f3145be", P = "_time-box-title_6cc801b", Z = "_time-box-title-container_22add52", v = "_selected-time_33e3aa3",
|
|
19
|
+
import '../../date_picker_time_selector.css';const z = "_time-box_f3145be", P = "_time-box-title_6cc801b", Z = "_time-box-title-container_22add52", v = "_selected-time_33e3aa3", m = { "time-box": z, "time-box-title": P, "time-box-title-container": Z, "selected-time": v };
|
|
20
20
|
function it({
|
|
21
21
|
origin: e,
|
|
22
22
|
intervalInMinutes: f,
|
|
@@ -28,10 +28,10 @@ function it({
|
|
|
28
28
|
disabled: l,
|
|
29
29
|
height: _
|
|
30
30
|
}) {
|
|
31
|
-
const
|
|
31
|
+
const s = f * 1e3 * 60, w = 24 * 1e3 * 60 * 60 / s, a = new Date(e || /* @__PURE__ */ new Date()), d = [], y = g?.getTime() ?? -1 / 0, M = b?.getTime() ?? 1 / 0;
|
|
32
32
|
a.setHours(0, 0, 0, 0);
|
|
33
|
-
let p = a.getTime(),
|
|
34
|
-
for (let
|
|
33
|
+
let p = a.getTime(), c = 0;
|
|
34
|
+
for (let r = 0; r < w; r++) {
|
|
35
35
|
const t = new Date(p);
|
|
36
36
|
let i = t.getHours() % 12;
|
|
37
37
|
const H = t.getMinutes(), k = t.getHours() >= 12 ? "PM" : "AM";
|
|
@@ -41,16 +41,16 @@ function it({
|
|
|
41
41
|
{
|
|
42
42
|
width: "flex",
|
|
43
43
|
hierarchy: "tertiary",
|
|
44
|
-
className:
|
|
44
|
+
className: n("tcn-selected-time", B && m["selected-time"]),
|
|
45
45
|
disabled: e == null || l || D,
|
|
46
46
|
onClick: () => {
|
|
47
47
|
T(t.getHours(), t.getMinutes(), t.getSeconds());
|
|
48
48
|
},
|
|
49
49
|
children: `${i.toString().padStart(2, "0")}:${H.toString().padStart(2, "0")} ${k}`
|
|
50
50
|
},
|
|
51
|
-
|
|
51
|
+
r
|
|
52
52
|
);
|
|
53
|
-
|
|
53
|
+
c >= h && c <= S && d.push(I), p += s, c += s;
|
|
54
54
|
}
|
|
55
55
|
return /* @__PURE__ */ N(
|
|
56
56
|
x,
|
|
@@ -58,13 +58,16 @@ function it({
|
|
|
58
58
|
width: "auto",
|
|
59
59
|
height: _,
|
|
60
60
|
"data-is-disabled": l || e == null,
|
|
61
|
-
className: m
|
|
61
|
+
className: n(m["time-box"], "tcn-time-box"),
|
|
62
62
|
children: [
|
|
63
63
|
/* @__PURE__ */ o(
|
|
64
64
|
C,
|
|
65
65
|
{
|
|
66
|
-
className:
|
|
67
|
-
|
|
66
|
+
className: n(
|
|
67
|
+
m["time-box-title-container"],
|
|
68
|
+
"tcn-time-box-title-container"
|
|
69
|
+
),
|
|
70
|
+
children: /* @__PURE__ */ o($, { className: n(m["time-box-title"], "tcn-time-box-title"), children: /* @__PURE__ */ o(j, { size: "lg" }) })
|
|
68
71
|
}
|
|
69
72
|
),
|
|
70
73
|
/* @__PURE__ */ o(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date_picker_time_selector.js","sources":["../../../src/inputs/date_picker/date_picker_time_selector.tsx"],"sourcesContent":["import { VStack } from '../../stacks/v_stack.js';\nimport { ZStack } from '../../stacks/z_stack.js';\nimport { clsx } from 'clsx';\nimport React from 'react';\nimport { Button } from '../../actions/index.js';\nimport styles from './date_picker_time_selector.module.css';\nimport { BodyText } from '../../typography/index.js';\nimport { ClockIcon } from '@tcn/icons/clock_icon.js';\n\nexport interface DatePickerTimeSelectorProps {\n origin: Date | null;\n intervalInMinutes: number;\n max: Date | null;\n min: Date | null;\n minVisibleTimeInMilliseconds: number;\n maxVisibleTimeInMilliseconds: number;\n onSelect: (hours: number, minutes: number, seconds: number) => void;\n disabled?: boolean;\n height?: string;\n}\n\nexport function DatePickerTimeSelector({\n origin,\n intervalInMinutes,\n max,\n min,\n minVisibleTimeInMilliseconds,\n maxVisibleTimeInMilliseconds,\n onSelect,\n disabled,\n height,\n}: DatePickerTimeSelectorProps) {\n const stepInMilliseconds = intervalInMinutes * 1000 * 60;\n const amountOfSteps = (24 * 1000 * 60 * 60) / stepInMilliseconds;\n const normalizedDate = new Date(origin || new Date());\n const options: React.ReactElement[] = [];\n const minTime = min?.getTime() ?? -Infinity;\n const maxTime = max?.getTime() ?? Infinity;\n\n normalizedDate.setHours(0, 0, 0, 0);\n let offset = normalizedDate.getTime();\n let offsetFromZero = 0;\n\n for (let x = 0; x < amountOfSteps; x++) {\n const date = new Date(offset);\n\n let hour = date.getHours() % 12;\n const minute = date.getMinutes();\n const meridiem = date.getHours() >= 12 ? 'PM' : 'AM';\n hour = hour === 0 ? 12 : hour;\n\n const isSelected =\n origin != null &&\n date.getHours() === origin.getHours() &&\n date.getMinutes() === origin.getMinutes() &&\n date.getSeconds() === origin.getSeconds();\n\n const time = date.getTime();\n const isOutOfRange = time < minTime || time > maxTime;\n\n const button = (\n <Button\n key={x}\n width=\"flex\"\n hierarchy=\"tertiary\"\n className={clsx('selected-time', isSelected && styles['selected-time'])}\n disabled={origin == null || disabled || isOutOfRange}\n onClick={() => {\n onSelect(date.getHours(), date.getMinutes(), date.getSeconds());\n }}\n >{`${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')} ${meridiem}`}</Button>\n );\n\n if (\n offsetFromZero >= minVisibleTimeInMilliseconds &&\n offsetFromZero <= maxVisibleTimeInMilliseconds\n ) {\n options.push(button);\n }\n\n offset += stepInMilliseconds;\n offsetFromZero += stepInMilliseconds;\n }\n\n return (\n <VStack\n width=\"auto\"\n height={height}\n data-is-disabled={disabled || origin == null}\n className={clsx(styles['time-box'], 'time-box')}\n >\n <ZStack\n className={clsx(styles['time-box-title-container']
|
|
1
|
+
{"version":3,"file":"date_picker_time_selector.js","sources":["../../../src/inputs/date_picker/date_picker_time_selector.tsx"],"sourcesContent":["import { VStack } from '../../stacks/v_stack.js';\nimport { ZStack } from '../../stacks/z_stack.js';\nimport { clsx } from 'clsx';\nimport React from 'react';\nimport { Button } from '../../actions/index.js';\nimport styles from './date_picker_time_selector.module.css';\nimport { BodyText } from '../../typography/index.js';\nimport { ClockIcon } from '@tcn/icons/clock_icon.js';\n\nexport interface DatePickerTimeSelectorProps {\n origin: Date | null;\n intervalInMinutes: number;\n max: Date | null;\n min: Date | null;\n minVisibleTimeInMilliseconds: number;\n maxVisibleTimeInMilliseconds: number;\n onSelect: (hours: number, minutes: number, seconds: number) => void;\n disabled?: boolean;\n height?: string;\n}\n\nexport function DatePickerTimeSelector({\n origin,\n intervalInMinutes,\n max,\n min,\n minVisibleTimeInMilliseconds,\n maxVisibleTimeInMilliseconds,\n onSelect,\n disabled,\n height,\n}: DatePickerTimeSelectorProps) {\n const stepInMilliseconds = intervalInMinutes * 1000 * 60;\n const amountOfSteps = (24 * 1000 * 60 * 60) / stepInMilliseconds;\n const normalizedDate = new Date(origin || new Date());\n const options: React.ReactElement[] = [];\n const minTime = min?.getTime() ?? -Infinity;\n const maxTime = max?.getTime() ?? Infinity;\n\n normalizedDate.setHours(0, 0, 0, 0);\n let offset = normalizedDate.getTime();\n let offsetFromZero = 0;\n\n for (let x = 0; x < amountOfSteps; x++) {\n const date = new Date(offset);\n\n let hour = date.getHours() % 12;\n const minute = date.getMinutes();\n const meridiem = date.getHours() >= 12 ? 'PM' : 'AM';\n hour = hour === 0 ? 12 : hour;\n\n const isSelected =\n origin != null &&\n date.getHours() === origin.getHours() &&\n date.getMinutes() === origin.getMinutes() &&\n date.getSeconds() === origin.getSeconds();\n\n const time = date.getTime();\n const isOutOfRange = time < minTime || time > maxTime;\n\n const button = (\n <Button\n key={x}\n width=\"flex\"\n hierarchy=\"tertiary\"\n className={clsx('tcn-selected-time', isSelected && styles['selected-time'])}\n disabled={origin == null || disabled || isOutOfRange}\n onClick={() => {\n onSelect(date.getHours(), date.getMinutes(), date.getSeconds());\n }}\n >{`${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')} ${meridiem}`}</Button>\n );\n\n if (\n offsetFromZero >= minVisibleTimeInMilliseconds &&\n offsetFromZero <= maxVisibleTimeInMilliseconds\n ) {\n options.push(button);\n }\n\n offset += stepInMilliseconds;\n offsetFromZero += stepInMilliseconds;\n }\n\n return (\n <VStack\n width=\"auto\"\n height={height}\n data-is-disabled={disabled || origin == null}\n className={clsx(styles['time-box'], 'tcn-time-box')}\n >\n <ZStack\n className={clsx(\n styles['time-box-title-container'],\n 'tcn-time-box-title-container'\n )}\n >\n <BodyText className={clsx(styles['time-box-title'], 'tcn-time-box-title')}>\n <ClockIcon size=\"lg\" />\n </BodyText>\n </ZStack>\n <VStack\n width=\"auto\"\n height=\"flex\"\n overflowY=\"auto\"\n style={{ paddingInline: '4px' }}\n >\n {options}\n </VStack>\n </VStack>\n );\n}\n"],"names":["DatePickerTimeSelector","origin","intervalInMinutes","max","min","minVisibleTimeInMilliseconds","maxVisibleTimeInMilliseconds","onSelect","disabled","height","stepInMilliseconds","amountOfSteps","normalizedDate","options","minTime","maxTime","offset","offsetFromZero","x","date","hour","minute","meridiem","isSelected","time","isOutOfRange","button","jsx","Button","clsx","styles","jsxs","VStack","ZStack","BodyText","ClockIcon"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBO,SAASA,GAAuB;AAAA,EACrC,QAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,KAAAC;AAAA,EACA,KAAAC;AAAA,EACA,8BAAAC;AAAA,EACA,8BAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AACF,GAAgC;AAC9B,QAAMC,IAAqBR,IAAoB,MAAO,IAChDS,IAAiB,KAAK,MAAO,KAAK,KAAMD,GACxCE,IAAiB,IAAI,KAAKX,KAAU,oBAAI,MAAM,GAC9CY,IAAgC,CAAA,GAChCC,IAAUV,GAAK,QAAA,KAAa,QAC5BW,IAAUZ,GAAK,QAAA,KAAa;AAElC,EAAAS,EAAe,SAAS,GAAG,GAAG,GAAG,CAAC;AAClC,MAAII,IAASJ,EAAe,QAAA,GACxBK,IAAiB;AAErB,WAASC,IAAI,GAAGA,IAAIP,GAAeO,KAAK;AACtC,UAAMC,IAAO,IAAI,KAAKH,CAAM;AAE5B,QAAII,IAAOD,EAAK,SAAA,IAAa;AAC7B,UAAME,IAASF,EAAK,WAAA,GACdG,IAAWH,EAAK,SAAA,KAAc,KAAK,OAAO;AAChD,IAAAC,IAAOA,MAAS,IAAI,KAAKA;AAEzB,UAAMG,IACJtB,KAAU,QACVkB,EAAK,SAAA,MAAelB,EAAO,SAAA,KAC3BkB,EAAK,WAAA,MAAiBlB,EAAO,WAAA,KAC7BkB,EAAK,WAAA,MAAiBlB,EAAO,WAAA,GAEzBuB,IAAOL,EAAK,QAAA,GACZM,IAAeD,IAAOV,KAAWU,IAAOT,GAExCW,IACJ,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QAEC,OAAM;AAAA,QACN,WAAU;AAAA,QACV,WAAWC,EAAK,qBAAqBN,KAAcO,EAAO,eAAe,CAAC;AAAA,QAC1E,UAAU7B,KAAU,QAAQO,KAAYiB;AAAA,QACxC,SAAS,MAAM;AACb,UAAAlB,EAASY,EAAK,YAAYA,EAAK,cAAcA,EAAK,YAAY;AAAA,QAChE;AAAA,QACA,aAAGC,EAAK,SAAA,EAAW,SAAS,GAAG,GAAG,CAAC,IAAIC,EAAO,WAAW,SAAS,GAAG,GAAG,CAAC,IAAIC,CAAQ;AAAA,MAAA;AAAA,MARhFJ;AAAA,IAAA;AAWT,IACED,KAAkBZ,KAClBY,KAAkBX,KAElBO,EAAQ,KAAKa,CAAM,GAGrBV,KAAUN,GACVO,KAAkBP;AAAA,EACpB;AAEA,SACE,gBAAAqB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAAvB;AAAA,MACA,oBAAkBD,KAAYP,KAAU;AAAA,MACxC,WAAW4B,EAAKC,EAAO,UAAU,GAAG,cAAc;AAAA,MAElD,UAAA;AAAA,QAAA,gBAAAH;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,WAAWJ;AAAA,cACTC,EAAO,0BAA0B;AAAA,cACjC;AAAA,YAAA;AAAA,YAGF,UAAA,gBAAAH,EAACO,GAAA,EAAS,WAAWL,EAAKC,EAAO,gBAAgB,GAAG,oBAAoB,GACtE,UAAA,gBAAAH,EAACQ,GAAA,EAAU,MAAK,MAAK,EAAA,CACvB;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAR;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACN,QAAO;AAAA,YACP,WAAU;AAAA,YACV,OAAO,EAAE,eAAe,MAAA;AAAA,YAEvB,UAAAnB;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -12,7 +12,7 @@ import { DatePickerYearSelector as g } from "./date_picker_year_selector.js";
|
|
|
12
12
|
import { useSignalValue as b } from "@tcn/state";
|
|
13
13
|
import '../../date_picker_year_input.css';const k = "_year-select_eb568a7", s = { "year-select": k };
|
|
14
14
|
function I({ presenter: t }) {
|
|
15
|
-
const { visibleYear:
|
|
15
|
+
const { visibleYear: c } = b(t.stateBroadcast), [a, i] = n(null), [l, r] = n(!1);
|
|
16
16
|
function o() {
|
|
17
17
|
r(!1);
|
|
18
18
|
}
|
|
@@ -24,17 +24,17 @@ function I({ presenter: t }) {
|
|
|
24
24
|
h,
|
|
25
25
|
{
|
|
26
26
|
hierarchy: "tertiary",
|
|
27
|
-
className: d("date-picker-year-select", s["year-select"]),
|
|
27
|
+
className: d("tcn-date-picker-year-select", s["year-select"]),
|
|
28
28
|
width: "auto",
|
|
29
29
|
hAlign: "start",
|
|
30
30
|
onClick: m,
|
|
31
|
-
children: /* @__PURE__ */ e("span", { className: s.selectedLabel, children:
|
|
31
|
+
children: /* @__PURE__ */ e("span", { className: s.selectedLabel, children: c })
|
|
32
32
|
}
|
|
33
33
|
),
|
|
34
34
|
/* @__PURE__ */ e(
|
|
35
35
|
y,
|
|
36
36
|
{
|
|
37
|
-
anchorElement:
|
|
37
|
+
anchorElement: a,
|
|
38
38
|
horizontalAnchor: "center",
|
|
39
39
|
horizontalOrigin: "center",
|
|
40
40
|
onClose: o,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date_picker_year_input.js","sources":["../../../src/inputs/date_picker/date_picker_year_input.tsx"],"sourcesContent":["import { Button } from '../../actions/index.js';\nimport { clsx } from 'clsx';\nimport styles from './date_picker_year_input.module.css';\nimport { useState } from 'react';\nimport { Popper } from '../../overlay/popper/legacy/popper.js';\nimport { DatePickerPresenter } from './date_picker_presenter.js';\nimport { DatePickerYearSelector } from './date_picker_year_selector.js';\nimport { useSignalValue } from '@tcn/state';\n\nexport interface DatePickerYearInputProps {\n presenter: DatePickerPresenter;\n}\n\nexport function DatePickerYearInput({ presenter }: DatePickerYearInputProps) {\n const { visibleYear } = useSignalValue(presenter.stateBroadcast);\n const [buttonRef, setButtonRef] = useState<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n function close() {\n setIsOpen(false);\n }\n\n function open(event: React.MouseEvent<HTMLButtonElement>) {\n setButtonRef(event.currentTarget);\n setIsOpen(true);\n }\n\n return (\n <>\n <Button\n hierarchy=\"tertiary\"\n className={clsx('date-picker-year-select', styles['year-select'])}\n width=\"auto\"\n hAlign=\"start\"\n onClick={open}\n >\n <span className={styles.selectedLabel}>{visibleYear}</span>\n </Button>\n <Popper\n anchorElement={buttonRef}\n horizontalAnchor=\"center\"\n horizontalOrigin=\"center\"\n onClose={close}\n open={isOpen}\n restoreFocus\n >\n <DatePickerYearSelector presenter={presenter} onClose={close} />\n </Popper>\n </>\n );\n}\n"],"names":["DatePickerYearInput","presenter","visibleYear","useSignalValue","buttonRef","setButtonRef","useState","isOpen","setIsOpen","close","open","event","jsxs","Fragment","jsx","Button","clsx","styles","Popper","DatePickerYearSelector"],"mappings":";;;;;;;;;;;;;AAaO,SAASA,EAAoB,EAAE,WAAAC,KAAuC;AAC3E,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAeF,EAAU,cAAc,GACzD,CAACG,GAAWC,CAAY,IAAIC,EAAmC,IAAI,GACnE,CAACC,GAAQC,CAAS,IAAIF,EAAS,EAAK;AAE1C,WAASG,IAAQ;AACf,IAAAD,EAAU,EAAK;AAAA,EACjB;AAEA,WAASE,EAAKC,GAA4C;AACxD,IAAAN,EAAaM,EAAM,aAAa,GAChCH,EAAU,EAAI;AAAA,EAChB;AAEA,SACE,gBAAAI,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,WAAWC,EAAK,
|
|
1
|
+
{"version":3,"file":"date_picker_year_input.js","sources":["../../../src/inputs/date_picker/date_picker_year_input.tsx"],"sourcesContent":["import { Button } from '../../actions/index.js';\nimport { clsx } from 'clsx';\nimport styles from './date_picker_year_input.module.css';\nimport { useState } from 'react';\nimport { Popper } from '../../overlay/popper/legacy/popper.js';\nimport { DatePickerPresenter } from './date_picker_presenter.js';\nimport { DatePickerYearSelector } from './date_picker_year_selector.js';\nimport { useSignalValue } from '@tcn/state';\n\nexport interface DatePickerYearInputProps {\n presenter: DatePickerPresenter;\n}\n\nexport function DatePickerYearInput({ presenter }: DatePickerYearInputProps) {\n const { visibleYear } = useSignalValue(presenter.stateBroadcast);\n const [buttonRef, setButtonRef] = useState<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n function close() {\n setIsOpen(false);\n }\n\n function open(event: React.MouseEvent<HTMLButtonElement>) {\n setButtonRef(event.currentTarget);\n setIsOpen(true);\n }\n\n return (\n <>\n <Button\n hierarchy=\"tertiary\"\n className={clsx('tcn-date-picker-year-select', styles['year-select'])}\n width=\"auto\"\n hAlign=\"start\"\n onClick={open}\n >\n <span className={styles.selectedLabel}>{visibleYear}</span>\n </Button>\n <Popper\n anchorElement={buttonRef}\n horizontalAnchor=\"center\"\n horizontalOrigin=\"center\"\n onClose={close}\n open={isOpen}\n restoreFocus\n >\n <DatePickerYearSelector presenter={presenter} onClose={close} />\n </Popper>\n </>\n );\n}\n"],"names":["DatePickerYearInput","presenter","visibleYear","useSignalValue","buttonRef","setButtonRef","useState","isOpen","setIsOpen","close","open","event","jsxs","Fragment","jsx","Button","clsx","styles","Popper","DatePickerYearSelector"],"mappings":";;;;;;;;;;;;;AAaO,SAASA,EAAoB,EAAE,WAAAC,KAAuC;AAC3E,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAeF,EAAU,cAAc,GACzD,CAACG,GAAWC,CAAY,IAAIC,EAAmC,IAAI,GACnE,CAACC,GAAQC,CAAS,IAAIF,EAAS,EAAK;AAE1C,WAASG,IAAQ;AACf,IAAAD,EAAU,EAAK;AAAA,EACjB;AAEA,WAASE,EAAKC,GAA4C;AACxD,IAAAN,EAAaM,EAAM,aAAa,GAChCH,EAAU,EAAI;AAAA,EAChB;AAEA,SACE,gBAAAI,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,WAAWC,EAAK,+BAA+BC,EAAO,aAAa,CAAC;AAAA,QACpE,OAAM;AAAA,QACN,QAAO;AAAA,QACP,SAASP;AAAA,QAET,UAAA,gBAAAI,EAAC,QAAA,EAAK,WAAWG,EAAO,eAAgB,UAAAf,EAAA,CAAY;AAAA,MAAA;AAAA,IAAA;AAAA,IAEtD,gBAAAY;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,eAAed;AAAA,QACf,kBAAiB;AAAA,QACjB,kBAAiB;AAAA,QACjB,SAASK;AAAA,QACT,MAAMF;AAAA,QACN,cAAY;AAAA,QAEZ,UAAA,gBAAAO,EAACK,GAAA,EAAuB,WAAAlB,GAAsB,SAASQ,EAAA,CAAO;AAAA,MAAA;AAAA,IAAA;AAAA,EAChE,GACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date_picker_year_selector.d.ts","sourceRoot":"","sources":["../../../src/inputs/date_picker/date_picker_year_selector.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAKjE,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,OAAO,GACR,EAAE,2BAA2B,
|
|
1
|
+
{"version":3,"file":"date_picker_year_selector.d.ts","sourceRoot":"","sources":["../../../src/inputs/date_picker/date_picker_year_selector.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAKjE,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,OAAO,GACR,EAAE,2BAA2B,2CAwG7B"}
|
|
@@ -31,12 +31,12 @@ function ye({
|
|
|
31
31
|
}) {
|
|
32
32
|
const { min: p, max: m, visibleYear: o, visibleMonth: b } = $(
|
|
33
33
|
s.stateBroadcast
|
|
34
|
-
), [
|
|
35
|
-
let u = o - d +
|
|
34
|
+
), [a, f] = z(0), c = D(null), R = p == null ? -1 / 0 : p.getFullYear(), S = m == null ? 1 / 0 : m.getFullYear(), r = [], d = o % 20;
|
|
35
|
+
let u = o - d + a, F = u + 19;
|
|
36
36
|
for (let n = 0; n < 20; n++) {
|
|
37
37
|
let l = !1;
|
|
38
38
|
const i = new Date(o, b, 1);
|
|
39
|
-
i.setFullYear(o - d + n +
|
|
39
|
+
i.setFullYear(o - d + n + a), (i.getFullYear() > S || i.getFullYear() < R) && (l = !0);
|
|
40
40
|
const j = t;
|
|
41
41
|
r.push(
|
|
42
42
|
/* @__PURE__ */ e(
|
|
@@ -45,7 +45,7 @@ function ye({
|
|
|
45
45
|
as: "button",
|
|
46
46
|
width: "flex",
|
|
47
47
|
disabled: l,
|
|
48
|
-
className: y(Y["date-picker-year-button"], "date-picker-year-button"),
|
|
48
|
+
className: y(Y["date-picker-year-button"], "tcn-date-picker-year-button"),
|
|
49
49
|
"data-is-disabled": String(l),
|
|
50
50
|
"data-is-selected": String(i.getFullYear() === o),
|
|
51
51
|
onClick: () => {
|
|
@@ -58,25 +58,28 @@ function ye({
|
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
function w() {
|
|
61
|
-
|
|
61
|
+
c.current != null && c.current.focus();
|
|
62
62
|
}
|
|
63
63
|
H(() => {
|
|
64
|
-
|
|
64
|
+
c.current != null && c.current.focus();
|
|
65
65
|
}, []);
|
|
66
66
|
const v = r.slice(0, 4), B = r.slice(4, 8), C = r.slice(8, 12), I = r.slice(12, 16), _ = r.slice(16, 20);
|
|
67
67
|
function P() {
|
|
68
|
-
f(
|
|
68
|
+
f(a - 20);
|
|
69
69
|
}
|
|
70
70
|
function V() {
|
|
71
|
-
f(
|
|
71
|
+
f(a + 20);
|
|
72
72
|
}
|
|
73
73
|
return /* @__PURE__ */ h(
|
|
74
74
|
E,
|
|
75
75
|
{
|
|
76
|
-
ref:
|
|
76
|
+
ref: c,
|
|
77
77
|
tabIndex: 0,
|
|
78
78
|
padding: "8px",
|
|
79
|
-
className: y(
|
|
79
|
+
className: y(
|
|
80
|
+
Y["date-picker-year-selector"],
|
|
81
|
+
"tcn-date-picker-year-selector"
|
|
82
|
+
),
|
|
80
83
|
gap: "4px",
|
|
81
84
|
children: [
|
|
82
85
|
/* @__PURE__ */ h(t, { gap: "4px", children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date_picker_year_selector.js","sources":["../../../src/inputs/date_picker/date_picker_year_selector.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { ChevronLeftIcon } from '@tcn/icons/chevron_left_icon.js';\nimport { ChevronRightIcon } from '@tcn/icons/chevron_right_icon.js';\nimport { useSignalValue } from '@tcn/state';\nimport { SlimButton } from '../../actions/index.js';\nimport { HStack } from '../../stacks/h_stack.js';\nimport { Spacer } from '../../stacks/spacer.js';\nimport { VStack } from '../../stacks/v_stack.js';\nimport { BodyText, Headline } from '../../typography/index.js';\nimport { DatePickerPresenter } from './date_picker_presenter.js';\nimport styles from './date_picker_year_selector.module.css';\nimport { FocusRedirect } from '../../utils/index.js';\nimport { clsx } from 'clsx';\n\nexport interface DatePickerYearSelectorProps {\n presenter: DatePickerPresenter;\n onClose: () => void;\n}\n\nexport function DatePickerYearSelector({\n presenter,\n onClose,\n}: DatePickerYearSelectorProps) {\n const { min, max, visibleYear, visibleMonth } = useSignalValue(\n presenter.stateBroadcast\n );\n\n const [offset, setOffset] = useState(0);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const minYear = min == null ? -Infinity : min.getFullYear();\n const maxYear = max == null ? Infinity : max.getFullYear();\n const years: React.ReactNode[] = [];\n const remainder = visibleYear % 20;\n let firstYear = visibleYear - remainder + offset;\n let lastYear = firstYear + 19;\n\n for (let x = 0; x < 20; x++) {\n let disabled = false;\n const date = new Date(visibleYear, visibleMonth, 1);\n date.setFullYear(visibleYear - remainder + x + offset);\n\n if (date.getFullYear() > maxYear || date.getFullYear() < minYear) {\n disabled = true;\n }\n\n const Button: any = HStack;\n\n years.push(\n <Button\n as=\"button\"\n key={x}\n width=\"flex\"\n disabled={disabled}\n className={clsx(styles['date-picker-year-button'], 'date-picker-year-button')}\n data-is-disabled={String(disabled)}\n data-is-selected={String(date.getFullYear() === visibleYear)}\n onClick={() => {\n presenter.setVisibleYear(date.getFullYear());\n onClose();\n }}\n >\n <BodyText>{date.getFullYear()}</BodyText>\n </Button>\n );\n }\n\n function focus() {\n if (containerRef.current != null) {\n containerRef.current.focus();\n }\n }\n\n useEffect(() => {\n if (containerRef.current != null) {\n containerRef.current.focus();\n }\n }, []);\n\n const firstRow = years.slice(0, 4);\n const secondRow = years.slice(4, 8);\n const thirdRow = years.slice(8, 12);\n const fourthRow = years.slice(12, 16);\n const fifthRow = years.slice(16, 20);\n\n function prev() {\n setOffset(offset - 20);\n }\n\n function next() {\n setOffset(offset + 20);\n }\n\n return (\n <VStack\n ref={containerRef}\n tabIndex={0}\n padding=\"8px\"\n className={clsx(styles['date-picker-year-selector']
|
|
1
|
+
{"version":3,"file":"date_picker_year_selector.js","sources":["../../../src/inputs/date_picker/date_picker_year_selector.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { ChevronLeftIcon } from '@tcn/icons/chevron_left_icon.js';\nimport { ChevronRightIcon } from '@tcn/icons/chevron_right_icon.js';\nimport { useSignalValue } from '@tcn/state';\nimport { SlimButton } from '../../actions/index.js';\nimport { HStack } from '../../stacks/h_stack.js';\nimport { Spacer } from '../../stacks/spacer.js';\nimport { VStack } from '../../stacks/v_stack.js';\nimport { BodyText, Headline } from '../../typography/index.js';\nimport { DatePickerPresenter } from './date_picker_presenter.js';\nimport styles from './date_picker_year_selector.module.css';\nimport { FocusRedirect } from '../../utils/index.js';\nimport { clsx } from 'clsx';\n\nexport interface DatePickerYearSelectorProps {\n presenter: DatePickerPresenter;\n onClose: () => void;\n}\n\nexport function DatePickerYearSelector({\n presenter,\n onClose,\n}: DatePickerYearSelectorProps) {\n const { min, max, visibleYear, visibleMonth } = useSignalValue(\n presenter.stateBroadcast\n );\n\n const [offset, setOffset] = useState(0);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const minYear = min == null ? -Infinity : min.getFullYear();\n const maxYear = max == null ? Infinity : max.getFullYear();\n const years: React.ReactNode[] = [];\n const remainder = visibleYear % 20;\n let firstYear = visibleYear - remainder + offset;\n let lastYear = firstYear + 19;\n\n for (let x = 0; x < 20; x++) {\n let disabled = false;\n const date = new Date(visibleYear, visibleMonth, 1);\n date.setFullYear(visibleYear - remainder + x + offset);\n\n if (date.getFullYear() > maxYear || date.getFullYear() < minYear) {\n disabled = true;\n }\n\n const Button: any = HStack;\n\n years.push(\n <Button\n as=\"button\"\n key={x}\n width=\"flex\"\n disabled={disabled}\n className={clsx(styles['date-picker-year-button'], 'tcn-date-picker-year-button')}\n data-is-disabled={String(disabled)}\n data-is-selected={String(date.getFullYear() === visibleYear)}\n onClick={() => {\n presenter.setVisibleYear(date.getFullYear());\n onClose();\n }}\n >\n <BodyText>{date.getFullYear()}</BodyText>\n </Button>\n );\n }\n\n function focus() {\n if (containerRef.current != null) {\n containerRef.current.focus();\n }\n }\n\n useEffect(() => {\n if (containerRef.current != null) {\n containerRef.current.focus();\n }\n }, []);\n\n const firstRow = years.slice(0, 4);\n const secondRow = years.slice(4, 8);\n const thirdRow = years.slice(8, 12);\n const fourthRow = years.slice(12, 16);\n const fifthRow = years.slice(16, 20);\n\n function prev() {\n setOffset(offset - 20);\n }\n\n function next() {\n setOffset(offset + 20);\n }\n\n return (\n <VStack\n ref={containerRef}\n tabIndex={0}\n padding=\"8px\"\n className={clsx(\n styles['date-picker-year-selector'],\n 'tcn-date-picker-year-selector'\n )}\n gap=\"4px\"\n >\n <HStack gap=\"4px\">\n <SlimButton onClick={prev} hierarchy=\"tertiary\">\n <ChevronLeftIcon flipOnRtl size=\"md\" />\n </SlimButton>\n <Spacer />\n <Headline\n selectable={false}\n emphasis=\"faint\"\n hierarchy=\"tertiary\"\n >{`${firstYear}-${lastYear}`}</Headline>\n <Spacer />\n <SlimButton hierarchy=\"tertiary\" onClick={next}>\n <ChevronRightIcon size=\"md\" />\n </SlimButton>\n </HStack>\n <HStack gap=\"4px\">{firstRow}</HStack>\n <HStack gap=\"4px\">{secondRow}</HStack>\n <HStack gap=\"4px\">{thirdRow}</HStack>\n <HStack gap=\"4px\">{fourthRow}</HStack>\n <HStack gap=\"4px\">{fifthRow}</HStack>\n <FocusRedirect onRedirect={focus} />\n </VStack>\n );\n}\n"],"names":["DatePickerYearSelector","presenter","onClose","min","max","visibleYear","visibleMonth","useSignalValue","offset","setOffset","useState","containerRef","useRef","minYear","maxYear","years","remainder","firstYear","lastYear","x","disabled","date","Button","HStack","jsx","clsx","styles","BodyText","focus","useEffect","firstRow","secondRow","thirdRow","fourthRow","fifthRow","prev","next","jsxs","VStack","SlimButton","ChevronLeftIcon","Spacer","Headline","ChevronRightIcon","FocusRedirect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,SAASA,GAAuB;AAAA,EACrC,WAAAC;AAAA,EACA,SAAAC;AACF,GAAgC;AAC9B,QAAM,EAAE,KAAAC,GAAK,KAAAC,GAAK,aAAAC,GAAa,cAAAC,MAAiBC;AAAA,IAC9CN,EAAU;AAAA,EAAA,GAGN,CAACO,GAAQC,CAAS,IAAIC,EAAS,CAAC,GAChCC,IAAeC,EAA8B,IAAI,GACjDC,IAAUV,KAAO,OAAO,SAAYA,EAAI,YAAA,GACxCW,IAAUV,KAAO,OAAO,QAAWA,EAAI,YAAA,GACvCW,IAA2B,CAAA,GAC3BC,IAAYX,IAAc;AAChC,MAAIY,IAAYZ,IAAcW,IAAYR,GACtCU,IAAWD,IAAY;AAE3B,WAASE,IAAI,GAAGA,IAAI,IAAIA,KAAK;AAC3B,QAAIC,IAAW;AACf,UAAMC,IAAO,IAAI,KAAKhB,GAAaC,GAAc,CAAC;AAClD,IAAAe,EAAK,YAAYhB,IAAcW,IAAYG,IAAIX,CAAM,IAEjDa,EAAK,gBAAgBP,KAAWO,EAAK,YAAA,IAAgBR,OACvDO,IAAW;AAGb,UAAME,IAAcC;AAEpB,IAAAR,EAAM;AAAA,MACJ,gBAAAS;AAAA,QAACF;AAAA,QAAA;AAAA,UACC,IAAG;AAAA,UAEH,OAAM;AAAA,UACN,UAAAF;AAAA,UACA,WAAWK,EAAKC,EAAO,yBAAyB,GAAG,6BAA6B;AAAA,UAChF,oBAAkB,OAAON,CAAQ;AAAA,UACjC,oBAAkB,OAAOC,EAAK,YAAA,MAAkBhB,CAAW;AAAA,UAC3D,SAAS,MAAM;AACb,YAAAJ,EAAU,eAAeoB,EAAK,aAAa,GAC3CnB,EAAA;AAAA,UACF;AAAA,UAEA,UAAA,gBAAAsB,EAACG,GAAA,EAAU,UAAAN,EAAK,cAAY,CAAE;AAAA,QAAA;AAAA,QAXzBF;AAAA,MAAA;AAAA,IAYP;AAAA,EAEJ;AAEA,WAASS,IAAQ;AACf,IAAIjB,EAAa,WAAW,QAC1BA,EAAa,QAAQ,MAAA;AAAA,EAEzB;AAEA,EAAAkB,EAAU,MAAM;AACd,IAAIlB,EAAa,WAAW,QAC1BA,EAAa,QAAQ,MAAA;AAAA,EAEzB,GAAG,CAAA,CAAE;AAEL,QAAMmB,IAAWf,EAAM,MAAM,GAAG,CAAC,GAC3BgB,IAAYhB,EAAM,MAAM,GAAG,CAAC,GAC5BiB,IAAWjB,EAAM,MAAM,GAAG,EAAE,GAC5BkB,IAAYlB,EAAM,MAAM,IAAI,EAAE,GAC9BmB,IAAWnB,EAAM,MAAM,IAAI,EAAE;AAEnC,WAASoB,IAAO;AACd,IAAA1B,EAAUD,IAAS,EAAE;AAAA,EACvB;AAEA,WAAS4B,IAAO;AACd,IAAA3B,EAAUD,IAAS,EAAE;AAAA,EACvB;AAEA,SACE,gBAAA6B;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAK3B;AAAA,MACL,UAAU;AAAA,MACV,SAAQ;AAAA,MACR,WAAWc;AAAA,QACTC,EAAO,2BAA2B;AAAA,QAClC;AAAA,MAAA;AAAA,MAEF,KAAI;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAW,EAACd,GAAA,EAAO,KAAI,OACV,UAAA;AAAA,UAAA,gBAAAC,EAACe,GAAA,EAAW,SAASJ,GAAM,WAAU,YACnC,UAAA,gBAAAX,EAACgB,GAAA,EAAgB,WAAS,IAAC,MAAK,KAAA,CAAK,GACvC;AAAA,4BACCC,GAAA,EAAO;AAAA,UACR,gBAAAjB;AAAA,YAACkB;AAAA,YAAA;AAAA,cACC,YAAY;AAAA,cACZ,UAAS;AAAA,cACT,WAAU;AAAA,cACV,UAAA,GAAGzB,CAAS,IAAIC,CAAQ;AAAA,YAAA;AAAA,UAAA;AAAA,4BACzBuB,GAAA,EAAO;AAAA,UACR,gBAAAjB,EAACe,GAAA,EAAW,WAAU,YAAW,SAASH,GACxC,UAAA,gBAAAZ,EAACmB,GAAA,EAAiB,MAAK,KAAA,CAAK,EAAA,CAC9B;AAAA,QAAA,GACF;AAAA,QACA,gBAAAnB,EAACD,GAAA,EAAO,KAAI,OAAO,UAAAO,GAAS;AAAA,QAC5B,gBAAAN,EAACD,GAAA,EAAO,KAAI,OAAO,UAAAQ,GAAU;AAAA,QAC7B,gBAAAP,EAACD,GAAA,EAAO,KAAI,OAAO,UAAAS,GAAS;AAAA,QAC5B,gBAAAR,EAACD,GAAA,EAAO,KAAI,OAAO,UAAAU,GAAU;AAAA,QAC7B,gBAAAT,EAACD,GAAA,EAAO,KAAI,OAAO,UAAAW,GAAS;AAAA,QAC5B,gBAAAV,EAACoB,GAAA,EAAc,YAAYhB,EAAA,CAAO;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGxC;"}
|
package/dist/inputs/index.d.ts
CHANGED
|
@@ -26,21 +26,17 @@ export * from './mask_input/regex_character.js';
|
|
|
26
26
|
export * from './multi_combo_box/multi_combo_box.js';
|
|
27
27
|
export * from './multiselect/multiselect.js';
|
|
28
28
|
export * from './multiselect/multiselect_inline_values.js';
|
|
29
|
-
export * from './multiselect/multiselect_row.js';
|
|
30
29
|
export * from './multiselect/multiselect_values.js';
|
|
31
30
|
export * from './options/utils.js';
|
|
32
31
|
export * from './options/option.js';
|
|
33
32
|
export * from './phone_number_input/countries_phone_information.js';
|
|
34
33
|
export * from './phone_number_input/phone_number_input.js';
|
|
35
34
|
export * from './radio/radio.js';
|
|
36
|
-
export * from './radio/radio_row.js';
|
|
37
35
|
export * from './select/select.js';
|
|
38
36
|
export * from './slider/slider.js';
|
|
39
37
|
export * from './suggestions/suggestion_item.js';
|
|
40
38
|
export * from './suggestions/suggestion_list.js';
|
|
41
39
|
export * from './switch/switch.js';
|
|
42
|
-
export * from './switch/switch_row.js';
|
|
43
40
|
export * from './textarea/textarea.js';
|
|
44
|
-
export * from './textarea/textarea_row.js';
|
|
45
41
|
export * from './unit_input/unit_input.js';
|
|
46
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAE9C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AAEjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAEhD,cAAc,sCAAsC,CAAC;AAErD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAE9C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AAEjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAEhD,cAAc,sCAAsC,CAAC;AAErD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,qDAAqD,CAAC;AACpE,cAAc,4CAA4C,CAAC;AAE3D,cAAc,kBAAkB,CAAC;AAEjC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,oBAAoB,CAAC;AAEnC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,4BAA4B,CAAC"}
|
package/dist/inputs/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Checkbox as
|
|
1
|
+
import { Checkbox as o } from "./checkbox/checkbox.js";
|
|
2
2
|
import { ColorInput as p } from "./color_input/color_input.js";
|
|
3
|
-
import { ColorPicker as
|
|
3
|
+
import { ColorPicker as a } from "./color_input/color_picker.js";
|
|
4
4
|
import { ComboBox as f } from "./combo_box/combo_box.js";
|
|
5
|
-
import { DatePicker as
|
|
5
|
+
import { DatePicker as n } from "./date_picker/date_picker.js";
|
|
6
6
|
import { DatePickerDay as u } from "./date_picker/date_picker_day.js";
|
|
7
7
|
import { DatePickerBody as s } from "./date_picker/date_picker_body.js";
|
|
8
|
-
import { DatePickerDate as
|
|
8
|
+
import { DatePickerDate as C } from "./date_picker/date_picker_date.js";
|
|
9
9
|
import { DatePickerInput as P } from "./date_picker/date_picker_input.js";
|
|
10
10
|
import { DatePickerHeader as D } from "./date_picker/date_picker_header.js";
|
|
11
|
-
import { DatePickerPresenter as
|
|
12
|
-
import { Input as
|
|
13
|
-
import { AlphaCharacter as
|
|
14
|
-
import { AlphaNumericCharacter as
|
|
15
|
-
import { Character as
|
|
16
|
-
import { ConstantCharacter as
|
|
17
|
-
import { KeyCaptureInput as
|
|
18
|
-
import { LanguageCharacter as
|
|
19
|
-
import { Mask as
|
|
11
|
+
import { DatePickerPresenter as M } from "./date_picker/date_picker_presenter.js";
|
|
12
|
+
import { Input as S } from "./input/input.js";
|
|
13
|
+
import { AlphaCharacter as A } from "./mask_input/alpha_character.js";
|
|
14
|
+
import { AlphaNumericCharacter as B } from "./mask_input/alpha_numeric_character.js";
|
|
15
|
+
import { Character as O } from "./mask_input/character.js";
|
|
16
|
+
import { ConstantCharacter as L } from "./mask_input/constant_character.js";
|
|
17
|
+
import { KeyCaptureInput as v } from "./mask_input/key_capture_input.js";
|
|
18
|
+
import { LanguageCharacter as H } from "./mask_input/language_character.js";
|
|
19
|
+
import { Mask as T } from "./mask_input/mask.js";
|
|
20
20
|
import { MaskInput as j } from "./mask_input/mask_input.js";
|
|
21
21
|
import { MaskPresenter as z } from "./mask_input/mask_presenter.js";
|
|
22
22
|
import { NumericCharacter as F } from "./mask_input/numeric_character.js";
|
|
@@ -24,67 +24,59 @@ import { RegexCharacter as J } from "./mask_input/regex_character.js";
|
|
|
24
24
|
import { MultiComboBox as W } from "./multi_combo_box/multi_combo_box.js";
|
|
25
25
|
import { Multiselect as Y } from "./multiselect/multiselect.js";
|
|
26
26
|
import { MultiselectInlineValues as _ } from "./multiselect/multiselect_inline_values.js";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import { SwitchRow as dr } from "./switch/switch_row.js";
|
|
41
|
-
import { Textarea as yr } from "./textarea/textarea.js";
|
|
42
|
-
import { TextareaRow as Nr } from "./textarea/textarea_row.js";
|
|
43
|
-
import { UnitInput as Vr } from "./unit_input/unit_input.js";
|
|
27
|
+
import { MultiselectValues as rr } from "./multiselect/multiselect_values.js";
|
|
28
|
+
import { makeAvailableOptions as or, makeValuesAsOptions as tr } from "./options/utils.js";
|
|
29
|
+
import { Option as mr } from "./options/option.js";
|
|
30
|
+
import { countriesPhoneInformation as xr } from "./phone_number_input/countries_phone_information.js";
|
|
31
|
+
import { PhoneNumberInput as ir } from "./phone_number_input/phone_number_input.js";
|
|
32
|
+
import { Radio as cr } from "./radio/radio.js";
|
|
33
|
+
import { Select as lr } from "./select/select.js";
|
|
34
|
+
import { Slider as kr } from "./slider/slider.js";
|
|
35
|
+
import { SuggestionItem as hr } from "./suggestions/suggestion_item.js";
|
|
36
|
+
import { SuggestionList as Ir } from "./suggestions/suggestion_list.js";
|
|
37
|
+
import { Switch as gr } from "./switch/switch.js";
|
|
38
|
+
import { Textarea as br } from "./textarea/textarea.js";
|
|
39
|
+
import { UnitInput as dr } from "./unit_input/unit_input.js";
|
|
44
40
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
A as AlphaCharacter,
|
|
42
|
+
B as AlphaNumericCharacter,
|
|
43
|
+
O as Character,
|
|
44
|
+
o as Checkbox,
|
|
49
45
|
p as ColorInput,
|
|
50
|
-
|
|
46
|
+
a as ColorPicker,
|
|
51
47
|
f as ComboBox,
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
L as ConstantCharacter,
|
|
49
|
+
n as DatePicker,
|
|
54
50
|
s as DatePickerBody,
|
|
55
|
-
|
|
51
|
+
C as DatePickerDate,
|
|
56
52
|
u as DatePickerDay,
|
|
57
53
|
D as DatePickerHeader,
|
|
58
54
|
P as DatePickerInput,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
M as DatePickerPresenter,
|
|
56
|
+
S as Input,
|
|
57
|
+
v as KeyCaptureInput,
|
|
58
|
+
H as LanguageCharacter,
|
|
59
|
+
T as Mask,
|
|
64
60
|
j as MaskInput,
|
|
65
61
|
z as MaskPresenter,
|
|
66
62
|
W as MultiComboBox,
|
|
67
63
|
Y as Multiselect,
|
|
68
64
|
_ as MultiselectInlineValues,
|
|
69
|
-
rr as
|
|
70
|
-
er as MultiselectValues,
|
|
65
|
+
rr as MultiselectValues,
|
|
71
66
|
F as NumericCharacter,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
hr as RadioRow,
|
|
67
|
+
mr as Option,
|
|
68
|
+
ir as PhoneNumberInput,
|
|
69
|
+
cr as Radio,
|
|
76
70
|
J as RegexCharacter,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
pr as makeAvailableOptions,
|
|
88
|
-
mr as makeValuesAsOptions
|
|
71
|
+
lr as Select,
|
|
72
|
+
kr as Slider,
|
|
73
|
+
hr as SuggestionItem,
|
|
74
|
+
Ir as SuggestionList,
|
|
75
|
+
gr as Switch,
|
|
76
|
+
br as Textarea,
|
|
77
|
+
dr as UnitInput,
|
|
78
|
+
xr as countriesPhoneInformation,
|
|
79
|
+
or as makeAvailableOptions,
|
|
80
|
+
tr as makeValuesAsOptions
|
|
89
81
|
};
|
|
90
82
|
//# sourceMappingURL=index.js.map
|
package/dist/inputs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as
|
|
3
|
-
import
|
|
4
|
-
import '../../input.css';const c = "_input_a16553f", m = { input: c },
|
|
2
|
+
import { clsx as f } from "clsx";
|
|
3
|
+
import o from "react";
|
|
4
|
+
import '../../input.css';const c = "_input_a16553f", m = { input: c }, y = o.forwardRef(function({ type: i = "text", style: n, className: s, width: r, height: l, onChange: a, ...t }, u) {
|
|
5
5
|
return /* @__PURE__ */ d(
|
|
6
6
|
"input",
|
|
7
7
|
{
|
|
8
|
-
className:
|
|
8
|
+
className: f(m.input, s, "tcn-input"),
|
|
9
9
|
type: i,
|
|
10
10
|
ref: u,
|
|
11
11
|
"data-is-disabled": t.disabled || !1,
|
|
@@ -14,11 +14,11 @@ import '../../input.css';const c = "_input_a16553f", m = { input: c }, I = f.for
|
|
|
14
14
|
a && a(e.currentTarget.value, e);
|
|
15
15
|
},
|
|
16
16
|
...t,
|
|
17
|
-
style: { width: r, height: l, ...
|
|
17
|
+
style: { width: r, height: l, ...n }
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
});
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
y as Input
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../../src/inputs/input/input.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { InputHTMLAttributes } from 'react';\nimport styles from './input.module.css';\n\nexport interface InputProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n type?: React.HTMLInputTypeAttribute;\n width?: string;\n height?: string;\n value?: string;\n disabled?: boolean;\n min?: string;\n max?: string;\n placeholder?: string;\n onChange?: (value: string, event?: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const Input = React.forwardRef(function Input(\n { type = 'text', style, className, width, height, onChange, ...props }: InputProps,\n ref: React.Ref<HTMLInputElement>\n) {\n return (\n <input\n className={clsx(styles.input, className, 'input')}\n type={type}\n ref={ref}\n data-is-disabled={props.disabled || false}\n aria-disabled={props.disabled || false}\n onChange={e => {\n onChange && onChange(e.currentTarget.value, e);\n }}\n {...props}\n style={{ width, height, ...style }}\n />\n );\n});\n"],"names":["Input","React","type","style","className","width","height","onChange","props","ref","jsx","clsx","styles"],"mappings":";;;8CAkBaA,IAAQC,EAAM,WAAW,SACpC,EAAE,MAAAC,IAAO,QAAQ,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAA,GAC/DC,GACA;AACA,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,OAAOR,GAAW,
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../src/inputs/input/input.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { InputHTMLAttributes } from 'react';\nimport styles from './input.module.css';\n\nexport interface InputProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n type?: React.HTMLInputTypeAttribute;\n width?: string;\n height?: string;\n value?: string;\n disabled?: boolean;\n min?: string;\n max?: string;\n placeholder?: string;\n onChange?: (value: string, event?: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const Input = React.forwardRef(function Input(\n { type = 'text', style, className, width, height, onChange, ...props }: InputProps,\n ref: React.Ref<HTMLInputElement>\n) {\n return (\n <input\n className={clsx(styles.input, className, 'tcn-input')}\n type={type}\n ref={ref}\n data-is-disabled={props.disabled || false}\n aria-disabled={props.disabled || false}\n onChange={e => {\n onChange && onChange(e.currentTarget.value, e);\n }}\n {...props}\n style={{ width, height, ...style }}\n />\n );\n});\n"],"names":["Input","React","type","style","className","width","height","onChange","props","ref","jsx","clsx","styles"],"mappings":";;;8CAkBaA,IAAQC,EAAM,WAAW,SACpC,EAAE,MAAAC,IAAO,QAAQ,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAA,GAC/DC,GACA;AACA,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,OAAOR,GAAW,WAAW;AAAA,MACpD,MAAAF;AAAA,MACA,KAAAO;AAAA,MACA,oBAAkBD,EAAM,YAAY;AAAA,MACpC,iBAAeA,EAAM,YAAY;AAAA,MACjC,UAAU,CAAA,MAAK;AACb,QAAAD,KAAYA,EAAS,EAAE,cAAc,OAAO,CAAC;AAAA,MAC/C;AAAA,MACC,GAAGC;AAAA,MACJ,OAAO,EAAE,OAAAH,GAAO,QAAAC,GAAQ,GAAGH,EAAA;AAAA,IAAM;AAAA,EAAA;AAGvC,CAAC;"}
|
|
@@ -2,12 +2,12 @@ import { jsx as L } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../utils/click_away_listener.js";
|
|
3
3
|
import "../../utils/focus_redirect.js";
|
|
4
4
|
import "../../utils/scroll_away_listener.js";
|
|
5
|
-
import
|
|
6
|
-
import { useForkRef as
|
|
5
|
+
import _, { useRef as e } from "react";
|
|
6
|
+
import { useForkRef as j } from "../../utils/hooks/use_fork_ref.js";
|
|
7
7
|
import "../../utils/hooks/use_resize_observer.js";
|
|
8
|
-
import { Input as
|
|
9
|
-
const
|
|
10
|
-
const p = e(0), c = e(0), r = e(0), u = e(0), x = e(0), o = e(0), i = e(null), P =
|
|
8
|
+
import { Input as B } from "../input/input.js";
|
|
9
|
+
const N = _.forwardRef(function({ onKeyCapture: n, onKeyDown: m, onInput: d, ...E }, v) {
|
|
10
|
+
const p = e(0), c = e(0), r = e(0), u = e(0), x = e(0), o = e(0), i = e(null), P = j(v, i);
|
|
11
11
|
function g(f) {
|
|
12
12
|
const t = i.current;
|
|
13
13
|
t != null && (p.current = t.value.length, c.current = t.selectionStart == null ? 0 : t.selectionStart, r.current = t.selectionEnd == null ? 0 : t.selectionEnd, o.current = r.current, u.current = Math.min(
|
|
@@ -71,9 +71,9 @@ const O = j.forwardRef(function({ onKeyCapture: n, onKeyDown: m, onInput: d, ...
|
|
|
71
71
|
}
|
|
72
72
|
d && d(f);
|
|
73
73
|
}
|
|
74
|
-
return /* @__PURE__ */ L(
|
|
74
|
+
return /* @__PURE__ */ L(B, { ref: P, onKeyDown: g, onInput: I, ...E });
|
|
75
75
|
});
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
N as KeyCaptureInput
|
|
78
78
|
};
|
|
79
79
|
//# sourceMappingURL=key_capture_input.js.map
|
|
@@ -6,8 +6,8 @@ import "../../utils/scroll_away_listener.js";
|
|
|
6
6
|
import A, { useRef as I, useState as j, useLayoutEffect as p } from "react";
|
|
7
7
|
import { useForkRef as K } from "../../utils/hooks/use_fork_ref.js";
|
|
8
8
|
import "../../utils/hooks/use_resize_observer.js";
|
|
9
|
-
import { KeyCaptureInput as
|
|
10
|
-
import { MaskPresenter as
|
|
9
|
+
import { KeyCaptureInput as _ } from "./key_capture_input.js";
|
|
10
|
+
import { MaskPresenter as F } from "./mask_presenter.js";
|
|
11
11
|
const Y = A.forwardRef(
|
|
12
12
|
function({
|
|
13
13
|
value: m = "",
|
|
@@ -21,7 +21,7 @@ const Y = A.forwardRef(
|
|
|
21
21
|
prepareCopyValue: y = (i) => i,
|
|
22
22
|
...C
|
|
23
23
|
}, E) {
|
|
24
|
-
const i = Array.isArray(c) ? c : [c], f = I(null), D = K(E, f), [e] = j(() => new
|
|
24
|
+
const i = Array.isArray(c) ? c : [c], f = I(null), D = K(E, f), [e] = j(() => new F(i)), P = B(e.valueBroadcast);
|
|
25
25
|
B(e.maskConfigsBroadcast);
|
|
26
26
|
function T(t, s, n, o, l, r) {
|
|
27
27
|
switch (n != null ? e.setSelection(n.start, n.end) : e.forceMoveCursorTo(o), s) {
|
|
@@ -103,7 +103,7 @@ const Y = A.forwardRef(
|
|
|
103
103
|
document.removeEventListener("selectionchange", l), document.removeEventListener("mousedown", n), document.removeEventListener("keydown", o);
|
|
104
104
|
};
|
|
105
105
|
}, [e]), /* @__PURE__ */ V(
|
|
106
|
-
|
|
106
|
+
_,
|
|
107
107
|
{
|
|
108
108
|
value: P,
|
|
109
109
|
ref: D,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as t, jsxs as h, Fragment as C } from "react/jsx-runtime";
|
|
2
|
-
import O, { useState as
|
|
2
|
+
import O, { useState as _ } from "react";
|
|
3
3
|
import { ComboBox as v } from "../combo_box/combo_box.js";
|
|
4
|
-
import { MultiselectInlineValues as
|
|
5
|
-
import { MultiselectValues as
|
|
6
|
-
import { makeAvailableOptions as
|
|
7
|
-
import { Option as
|
|
8
|
-
import { clsx as
|
|
9
|
-
import { VStack as
|
|
4
|
+
import { MultiselectInlineValues as N } from "../multiselect/multiselect_inline_values.js";
|
|
5
|
+
import { MultiselectValues as R } from "../multiselect/multiselect_values.js";
|
|
6
|
+
import { makeAvailableOptions as T } from "../options/utils.js";
|
|
7
|
+
import { Option as g } from "../options/option.js";
|
|
8
|
+
import { clsx as j } from "clsx";
|
|
9
|
+
import { VStack as k } from "../../stacks/v_stack.js";
|
|
10
10
|
import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3", F = { "multi-combo-box-container": E }, P = O.forwardRef(function({
|
|
11
11
|
value: e = [],
|
|
12
12
|
children: M,
|
|
@@ -19,11 +19,11 @@ import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3
|
|
|
19
19
|
inputProps: m,
|
|
20
20
|
...y
|
|
21
21
|
}, S) {
|
|
22
|
-
const [f, l] =
|
|
22
|
+
const [f, l] = _(""), u = O.Children.toArray(
|
|
23
23
|
M
|
|
24
|
-
),
|
|
25
|
-
const i =
|
|
26
|
-
return i ?? /* @__PURE__ */ t(
|
|
24
|
+
), p = T(u, e), d = e.map((o) => {
|
|
25
|
+
const i = u.find((a) => a.props.value === o);
|
|
26
|
+
return i ?? /* @__PURE__ */ t(g, { value: o, label: o, children: o });
|
|
27
27
|
});
|
|
28
28
|
function x(o) {
|
|
29
29
|
if (e.indexOf(o.props.value) > -1) {
|
|
@@ -49,11 +49,11 @@ import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3
|
|
|
49
49
|
noOptionMatchedMessage: "Press Enter To Add",
|
|
50
50
|
placeholder: "Type to Add",
|
|
51
51
|
...m,
|
|
52
|
-
children:
|
|
52
|
+
children: p
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
55
|
/* @__PURE__ */ t(
|
|
56
|
-
|
|
56
|
+
N,
|
|
57
57
|
{
|
|
58
58
|
values: d,
|
|
59
59
|
disabled: n,
|
|
@@ -61,11 +61,11 @@ import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3
|
|
|
61
61
|
}
|
|
62
62
|
)
|
|
63
63
|
] }) : /* @__PURE__ */ h(
|
|
64
|
-
|
|
64
|
+
k,
|
|
65
65
|
{
|
|
66
66
|
ref: S,
|
|
67
67
|
...y,
|
|
68
|
-
className:
|
|
68
|
+
className: j(F["multi-combo-box-container"], A),
|
|
69
69
|
children: [
|
|
70
70
|
/* @__PURE__ */ t(
|
|
71
71
|
v,
|
|
@@ -79,11 +79,11 @@ import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3
|
|
|
79
79
|
noOptionMatchedMessage: "No Options Matched",
|
|
80
80
|
placeholder: "Type to Search or Add",
|
|
81
81
|
...m,
|
|
82
|
-
children:
|
|
82
|
+
children: p
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
85
|
/* @__PURE__ */ t(
|
|
86
|
-
|
|
86
|
+
R,
|
|
87
87
|
{
|
|
88
88
|
values: d,
|
|
89
89
|
onRemove: x,
|