@tcn/ui 0.0.3 → 0.1.1
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/actions/button/base_button/base_button.d.ts.map +1 -1
- package/dist/actions/button/base_button/base_button.js +20 -15
- package/dist/actions/button/base_button/base_button.js.map +1 -1
- package/dist/actions/button/button/button.d.ts.map +1 -1
- package/dist/actions/button/button/button.js +7 -7
- package/dist/actions/button/button/button.js.map +1 -1
- package/dist/actions/button/button_group/button_group.d.ts.map +1 -1
- package/dist/actions/button/button_group/button_group.js +2 -5
- package/dist/actions/button/button_group/button_group.js.map +1 -1
- package/dist/actions/button/select_group/select_group.js +7 -7
- package/dist/actions/button/select_group/select_group.js.map +1 -1
- package/dist/actions/button/slim_button/slim_button.d.ts.map +1 -1
- package/dist/actions/button/slim_button/slim_button.js +5 -5
- package/dist/actions/button/slim_button/slim_button.js.map +1 -1
- package/dist/button.css +1 -1
- package/dist/feedback/progress/progress_bar.js +1 -1
- package/dist/footer.css +1 -1
- package/dist/form/field/common/field_control/field_control.js +6 -6
- package/dist/form/field/common/field_control/field_control.js.map +1 -1
- package/dist/form/field/common/field_description.js +1 -1
- package/dist/form/field/common/field_error.js +2 -2
- package/dist/form/field/common/field_header.js +8 -8
- package/dist/form/field/common/field_header.js.map +1 -1
- package/dist/form/field/common/field_label.js +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 +9 -15
- package/dist/form/field/common/status_input/status_input.js.map +1 -1
- package/dist/form/field/h_field/h_field.js +9 -9
- 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 +12 -19
- package/dist/form/field_set/field_set.js.map +1 -1
- package/dist/inputs/checkbox/checkbox.js +12 -12
- package/dist/inputs/checkbox/checkbox.js.map +1 -1
- package/dist/inputs/color_input/color_input.d.ts.map +1 -1
- package/dist/inputs/color_input/color_input.js +13 -17
- package/dist/inputs/color_input/color_input.js.map +1 -1
- package/dist/inputs/color_input/color_picker.js +6 -6
- package/dist/inputs/color_input/color_picker.js.map +1 -1
- package/dist/inputs/combo_box/combo_box.js +15 -15
- package/dist/inputs/combo_box/combo_box.js.map +1 -1
- package/dist/inputs/date_picker/date_picker.js +6 -6
- package/dist/inputs/date_picker/date_picker.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_date.js +13 -13
- package/dist/inputs/date_picker/date_picker_date.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_day.js +1 -1
- package/dist/inputs/date_picker/date_picker_header.js +24 -24
- package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_input.js +19 -19
- 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 +6 -9
- package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_input.js +3 -3
- 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 +18 -24
- package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
- package/dist/inputs/input/input.d.ts +2 -2
- package/dist/inputs/input/input.d.ts.map +1 -1
- package/dist/inputs/input/input.js +4 -4
- package/dist/inputs/input/input.js.map +1 -1
- package/dist/inputs/multi_combo_box/multi_combo_box.js +1 -1
- package/dist/inputs/multi_combo_box/multi_combo_box.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_values.js +8 -8
- package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
- package/dist/inputs/options/option.d.ts +1 -0
- package/dist/inputs/options/option.d.ts.map +1 -1
- package/dist/inputs/options/option.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts +6 -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 +169 -128
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/radio/radio.js +14 -14
- package/dist/inputs/radio/radio.js.map +1 -1
- package/dist/inputs/select/select.js +16 -16
- package/dist/inputs/select/select.js.map +1 -1
- package/dist/inputs/slider/slider.js +7 -7
- package/dist/inputs/slider/slider.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.d.ts +1 -1
- package/dist/inputs/suggestions/suggestion_item.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.js +23 -18
- package/dist/inputs/suggestions/suggestion_item.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +105 -95
- package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
- package/dist/inputs/switch/switch.js +14 -14
- package/dist/inputs/switch/switch.js.map +1 -1
- package/dist/inputs/textarea/textarea.js +6 -6
- package/dist/inputs/textarea/textarea.js.map +1 -1
- package/dist/inputs/unit_input/unit_input.js +5 -5
- package/dist/inputs/unit_input/unit_input.js.map +1 -1
- package/dist/layouts/body/h_body.js +10 -10
- package/dist/layouts/body/h_body.js.map +1 -1
- package/dist/layouts/body/v_body.js +8 -8
- package/dist/layouts/body/v_body.js.map +1 -1
- package/dist/layouts/column/column.js +16 -16
- package/dist/layouts/column/column.js.map +1 -1
- package/dist/layouts/divider/divider.js +9 -9
- package/dist/layouts/divider/divider.js.map +1 -1
- package/dist/layouts/footer/footer.js +6 -6
- package/dist/layouts/footer/footer.js.map +1 -1
- package/dist/layouts/grid/grid.d.ts.map +1 -1
- package/dist/layouts/grid/grid.js +22 -31
- package/dist/layouts/grid/grid.js.map +1 -1
- package/dist/layouts/header/header.js +11 -11
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/index.d.ts +3 -2
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +26 -24
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/list/item.d.ts +1 -0
- package/dist/layouts/list/item.d.ts.map +1 -1
- package/dist/layouts/list/item.js +18 -7
- package/dist/layouts/list/item.js.map +1 -1
- package/dist/layouts/list/list.js +12 -12
- package/dist/layouts/list/list.js.map +1 -1
- package/dist/layouts/sidebar_end/sidebar_end.js +15 -15
- package/dist/layouts/sidebar_end/sidebar_end.js.map +1 -1
- package/dist/layouts/sidebar_start/sidebar_start.js +16 -16
- package/dist/layouts/sidebar_start/sidebar_start.js.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.js +14 -14
- package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
- package/dist/modal.css +1 -1
- package/dist/overlay/context_menu/context_menu.js +4 -4
- package/dist/overlay/index.js +3 -3
- package/dist/overlay/menu/menu.js +8 -8
- package/dist/overlay/menu/menu.js.map +1 -1
- package/dist/overlay/popper/popper.js +12 -12
- package/dist/{portal-qqIp4SIl.js → overlay/portal/portal.js} +3 -3
- package/dist/overlay/portal/portal.js.map +1 -0
- package/dist/overlay/portal/portal_platform.js +3 -4
- package/dist/overlay/portal/portal_platform.js.map +1 -1
- package/dist/overlay/tooltip/tooltip.js +10 -10
- package/dist/overlay/tooltip/tooltip.js.map +1 -1
- package/dist/phone_number_input.css +1 -1
- package/dist/slim_button.css +1 -1
- package/dist/stacks/box/bottom_resize_handle.js +9 -9
- package/dist/stacks/box/bottom_resize_handle.js.map +1 -1
- package/dist/stacks/box/box.js +42 -42
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/stacks/box/end_resize_handle.js +6 -6
- package/dist/stacks/box/end_resize_handle.js.map +1 -1
- package/dist/stacks/box/left_resize_handle.js +3 -3
- package/dist/stacks/box/left_resize_handle.js.map +1 -1
- package/dist/stacks/box/right_resize_handle.js +8 -8
- package/dist/stacks/box/right_resize_handle.js.map +1 -1
- package/dist/stacks/box/start_resize_handle.js +7 -7
- package/dist/stacks/box/start_resize_handle.js.map +1 -1
- package/dist/stacks/box/top_resize_handle.js +8 -8
- package/dist/stacks/box/top_resize_handle.js.map +1 -1
- package/dist/stacks/h_collapsible_box.js +5 -5
- package/dist/stacks/h_collapsible_box.js.map +1 -1
- package/dist/stacks/h_stack.js +26 -26
- package/dist/stacks/h_stack.js.map +1 -1
- package/dist/stacks/spacer.js +5 -5
- package/dist/stacks/spacer.js.map +1 -1
- package/dist/stacks/story_components/circle.js +6 -6
- package/dist/stacks/story_components/circle.js.map +1 -1
- package/dist/stacks/story_components/picture_placeholder.js +8 -8
- package/dist/stacks/story_components/picture_placeholder.js.map +1 -1
- package/dist/stacks/story_components/rect.js +11 -11
- package/dist/stacks/story_components/rect.js.map +1 -1
- package/dist/stacks/v_collapsible_box.js +8 -8
- package/dist/stacks/v_collapsible_box.js.map +1 -1
- package/dist/stacks/v_stack.js +35 -35
- package/dist/stacks/v_stack.js.map +1 -1
- package/dist/stacks/z_stack.js +34 -34
- package/dist/stacks/z_stack.js.map +1 -1
- package/dist/surfaces/alert/alert.js +8 -8
- package/dist/surfaces/alert/alert.js.map +1 -1
- package/dist/surfaces/card/card.d.ts.map +1 -1
- package/dist/surfaces/card/card.js +6 -15
- package/dist/surfaces/card/card.js.map +1 -1
- package/dist/surfaces/confirm/confirm.d.ts.map +1 -1
- package/dist/surfaces/confirm/confirm.js +17 -24
- package/dist/surfaces/confirm/confirm.js.map +1 -1
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js +5 -5
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +1 -1
- package/dist/surfaces/drawers/drawer_end/drawer_end.js +8 -8
- package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +1 -1
- package/dist/surfaces/drawers/drawer_start/drawer_start.js +4 -4
- package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +1 -1
- package/dist/surfaces/drawers/drawer_top/drawer_top.js +4 -4
- package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +1 -1
- package/dist/surfaces/modal/modal.d.ts +2 -4
- package/dist/surfaces/modal/modal.d.ts.map +1 -1
- package/dist/surfaces/modal/modal.js +16 -7
- package/dist/surfaces/modal/modal.js.map +1 -1
- package/dist/surfaces/page/h_page.js +6 -6
- package/dist/surfaces/page/h_page.js.map +1 -1
- package/dist/surfaces/page/v_page.js +9 -9
- package/dist/surfaces/page/v_page.js.map +1 -1
- package/dist/surfaces/panel/h_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/h_panel.js +18 -24
- package/dist/surfaces/panel/h_panel.js.map +1 -1
- package/dist/surfaces/panel/v_panel.js +9 -9
- package/dist/surfaces/panel/v_panel.js.map +1 -1
- package/dist/surfaces/popover/popover.js +34 -34
- package/dist/surfaces/popover/popover.js.map +1 -1
- package/dist/surfaces/window/window.d.ts.map +1 -1
- package/dist/surfaces/window/window.js +6 -14
- package/dist/surfaces/window/window.js.map +1 -1
- package/dist/themes/index.d.ts +0 -2
- package/dist/themes/index.d.ts.map +1 -1
- package/dist/themes/index.js +6 -402
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/stylesheets/reset.js +140 -0
- package/dist/themes/stylesheets/reset.js.map +1 -0
- package/dist/themes/themes/ergo/ergo_theme.js +595 -0
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -0
- package/dist/tokens/badge/badge.js +13 -13
- package/dist/tokens/badge/badge.js.map +1 -1
- package/dist/tokens/bubble/bubble.js +11 -11
- package/dist/tokens/bubble/bubble.js.map +1 -1
- package/dist/tokens/chip/chip.js +11 -11
- package/dist/tokens/chip/chip.js.map +1 -1
- package/dist/typography/body_text/body_text.js +21 -21
- package/dist/typography/body_text/body_text.js.map +1 -1
- package/dist/typography/callout/callout.js +16 -16
- package/dist/typography/callout/callout.js.map +1 -1
- package/dist/typography/caption/caption.js +13 -13
- package/dist/typography/caption/caption.js.map +1 -1
- package/dist/typography/footnote/footnote.js +14 -14
- package/dist/typography/footnote/footnote.js.map +1 -1
- package/dist/typography/headline/headline.js +12 -12
- package/dist/typography/headline/headline.js.map +1 -1
- package/dist/typography/subheadline/subheadline.js +13 -13
- package/dist/typography/subheadline/subheadline.js.map +1 -1
- package/dist/typography/title/title.js +17 -17
- package/dist/typography/title/title.js.map +1 -1
- package/package.json +23 -4
- package/src/actions/button/__stories__/button.stories.tsx +1 -1
- package/src/actions/button/__stories__/button_group.stories.tsx +1 -1
- package/src/actions/button/__stories__/select_group.stories.tsx +1 -1
- package/src/actions/button/__stories__/slim_button.stories.tsx +1 -1
- package/src/actions/button/base_button/base_button.tsx +8 -3
- package/src/actions/button/button/button.module.css +0 -78
- package/src/actions/button/button/button.tsx +3 -5
- package/src/actions/button/button_group/button_group.tsx +4 -7
- package/src/actions/button/select_group/select_group.tsx +3 -3
- package/src/actions/button/slim_button/slim_button.module.css +0 -26
- package/src/actions/button/slim_button/slim_button.tsx +3 -2
- package/src/feedback/lazy/lazy.stories.tsx +1 -1
- package/src/feedback/loading/__storybook__/loading.stories.tsx +1 -1
- package/src/feedback/progress/progress_bar.stories.tsx +1 -1
- package/src/form/field/common/field_control/field_control.tsx +2 -2
- package/src/form/field/common/field_header.tsx +2 -2
- package/src/form/field/common/status_input/status_input.tsx +3 -6
- package/src/form/field/field.stories.tsx +2 -1
- package/src/form/field/h_field/h_field.stories.tsx +10 -1
- package/src/form/field/h_field/h_field.tsx +2 -2
- package/src/form/field/v_field/v_field.stories.tsx +10 -1
- package/src/form/field/v_field/v_field.tsx +2 -2
- package/src/form/field_set/field_set.stories.tsx +9 -1
- package/src/form/field_set/field_set.tsx +4 -7
- package/src/inputs/checkbox/checkbox.stories.tsx +9 -1
- package/src/inputs/checkbox/checkbox.tsx +2 -2
- package/src/inputs/color_input/color_input.stories.tsx +9 -1
- package/src/inputs/color_input/color_input.tsx +2 -6
- package/src/inputs/color_input/color_picker.tsx +2 -2
- package/src/inputs/combo_box/combo_box.stories.tsx +14 -5
- package/src/inputs/combo_box/combo_box.tsx +2 -2
- package/src/inputs/date_picker/date_picker.stories.tsx +18 -10
- package/src/inputs/date_picker/date_picker.tsx +3 -3
- package/src/inputs/date_picker/date_picker_date.tsx +3 -3
- package/src/inputs/date_picker/date_picker_header.tsx +2 -2
- package/src/inputs/date_picker/date_picker_input.stories.tsx +15 -7
- package/src/inputs/date_picker/date_picker_input.tsx +3 -3
- package/src/inputs/date_picker/date_picker_time_selector.tsx +5 -8
- package/src/inputs/date_picker/date_picker_year_input.tsx +2 -2
- package/src/inputs/date_picker/date_picker_year_selector.tsx +3 -9
- package/src/inputs/input/input.stories.tsx +9 -1
- package/src/inputs/input/input.tsx +5 -4
- package/src/inputs/mask_input/key_capture_input.stories.tsx +9 -1
- package/src/inputs/mask_input/mask_input.stories.tsx +10 -1
- package/src/inputs/multi_combo_box/multi_combo_box.stories.tsx +10 -1
- package/src/inputs/multi_combo_box/multi_combo_box.tsx +2 -2
- package/src/inputs/multiselect/multiselect_values.tsx +2 -2
- package/src/inputs/multiselect/mutliselect.stories.tsx +10 -1
- package/src/inputs/options/option.tsx +1 -0
- package/src/inputs/phone_number_input/phone_number_input.module.css +12 -0
- package/src/inputs/phone_number_input/phone_number_input.stories.tsx +18 -1
- package/src/inputs/phone_number_input/phone_number_input.tsx +104 -29
- package/src/inputs/radio/radio.stories.tsx +14 -6
- package/src/inputs/radio/radio.tsx +2 -2
- package/src/inputs/select/select.stories.tsx +18 -9
- package/src/inputs/select/select.tsx +2 -2
- package/src/inputs/slider/slider.stories.tsx +9 -1
- package/src/inputs/slider/slider.tsx +2 -2
- package/src/inputs/suggestions/suggestion_item.tsx +14 -4
- package/src/inputs/suggestions/suggestion_list.stories.tsx +21 -12
- package/src/inputs/suggestions/suggestion_list.tsx +25 -6
- package/src/inputs/switch/switch.stories.tsx +9 -1
- package/src/inputs/switch/switch.tsx +4 -4
- package/src/inputs/textarea/textarea.stories.tsx +9 -1
- package/src/inputs/textarea/textarea.tsx +2 -2
- package/src/inputs/unit_input/unit_input.stories.tsx +9 -1
- package/src/inputs/unit_input/unit_input.tsx +4 -4
- package/src/layouts/body/h_body.tsx +2 -2
- package/src/layouts/body/v_body.tsx +2 -2
- package/src/layouts/column/column.tsx +3 -3
- package/src/layouts/divider/__stories__/divider.stories.tsx +59 -19
- package/src/layouts/divider/divider.tsx +3 -3
- package/src/layouts/footer/footer.module.css +0 -1
- package/src/layouts/footer/footer.tsx +2 -2
- package/src/layouts/grid/grid.stories.tsx +42 -34
- package/src/layouts/grid/grid.tsx +2 -7
- package/src/layouts/header/header.tsx +2 -2
- package/src/layouts/index.ts +3 -2
- package/src/layouts/list/item.tsx +11 -3
- package/src/layouts/list/list.tsx +3 -3
- package/src/layouts/sidebar_end/sidebar_end.tsx +2 -2
- package/src/layouts/sidebar_start/sidebar_start.tsx +2 -2
- package/src/layouts/utility_bar/utility_bar.tsx +2 -2
- package/src/overlay/context_menu/context_menu.stories.tsx +13 -5
- package/src/overlay/menu/menu.stories.tsx +22 -14
- package/src/overlay/menu/menu.tsx +3 -3
- package/src/overlay/popper/popper.stories.tsx +43 -22
- package/src/overlay/portal/portal.stories.tsx +10 -1
- package/src/overlay/tooltip/tooltip.stories.tsx +9 -2
- package/src/overlay/tooltip/tooltip.tsx +2 -2
- package/src/stacks/box/bottom_resize_handle.tsx +2 -2
- package/src/stacks/box/box.tsx +2 -2
- package/src/stacks/box/end_resize_handle.tsx +2 -2
- package/src/stacks/box/left_resize_handle.tsx +2 -2
- package/src/stacks/box/right_resize_handle.tsx +2 -2
- package/src/stacks/box/start_resize_handle.tsx +2 -2
- package/src/stacks/box/top_resize_handle.tsx +2 -2
- package/src/stacks/collapsible_box.stories.tsx +10 -1
- package/src/stacks/h_collapsible_box.tsx +2 -2
- package/src/stacks/h_stack.stories.tsx +104 -59
- package/src/stacks/h_stack.tsx +2 -2
- package/src/stacks/spacer.tsx +2 -2
- package/src/stacks/story_components/circle.tsx +2 -2
- package/src/stacks/story_components/picture_placeholder.tsx +2 -2
- package/src/stacks/story_components/rect.tsx +2 -2
- package/src/stacks/v_collapsible_box.tsx +2 -2
- package/src/stacks/v_stack.stories.tsx +91 -10
- package/src/stacks/v_stack.tsx +2 -2
- package/src/stacks/z_stack.stories.tsx +9 -1
- package/src/stacks/z_stack.tsx +2 -2
- package/src/surfaces/alert/alert.stories.tsx +4 -4
- package/src/surfaces/alert/alert.tsx +2 -2
- package/src/surfaces/card/card.tsx +3 -9
- package/src/surfaces/confirm/confirm.stories.tsx +4 -4
- package/src/surfaces/confirm/confirm.tsx +3 -6
- package/src/surfaces/drawers/__stories__/drawers.stories.tsx +1 -1
- package/src/surfaces/drawers/drawer_bottom/drawer_bottom.tsx +2 -2
- package/src/surfaces/drawers/drawer_end/drawer_end.tsx +2 -2
- package/src/surfaces/drawers/drawer_start/drawer_start.tsx +2 -2
- package/src/surfaces/drawers/drawer_top/drawer_top.tsx +2 -2
- package/src/surfaces/modal/__stories__/modal.stories.tsx +54 -0
- package/src/surfaces/modal/modal.module.css +2 -1
- package/src/surfaces/modal/modal.tsx +9 -6
- package/src/surfaces/page/h_page.tsx +2 -2
- package/src/surfaces/page/v_page.tsx +2 -2
- package/src/surfaces/panel/__stories__/panel.stories.tsx +13 -12
- package/src/surfaces/panel/h_panel.tsx +3 -9
- package/src/surfaces/panel/v_panel.tsx +3 -3
- package/src/surfaces/popover/popover.tsx +2 -2
- package/src/surfaces/window/window.stories.tsx +1 -1
- package/src/surfaces/window/window.tsx +2 -6
- package/src/themes/index.ts +0 -2
- package/src/themes/stories/themes.stories.tsx +1 -1
- package/src/themes/themes/ergo/__stories__/components/material_picker/sb_inverted_materials.module.css +34 -0
- package/src/themes/themes/ergo/__stories__/components/material_picker/sb_material_picker.tsx +52 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_card.module.css +5 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_card.tsx +40 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.tsx +83 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/types.ts +7 -0
- package/src/themes/themes/ergo/__stories__/material.stories.tsx +154 -0
- package/src/themes/themes/ergo/__stories__/sb_materials.module.css +110 -0
- package/src/themes/themes/ergo/__stories__/utils.ts +92 -0
- package/src/themes/themes/ergo/ergo_theme.css +348 -15
- package/src/tokens/badge/badge.stories.tsx +6 -6
- package/src/tokens/badge/badge.tsx +3 -3
- package/src/tokens/bubble/bubble.stories.tsx +16 -9
- package/src/tokens/bubble/bubble.tsx +2 -2
- package/src/tokens/chip/chip.stories.tsx +1 -1
- package/src/tokens/chip/chip.tsx +2 -2
- package/src/typography/body_text/body_text.tsx +2 -2
- package/src/typography/callout/callout.tsx +2 -2
- package/src/typography/caption/caption.tsx +2 -2
- package/src/typography/footnote/footnote.tsx +2 -2
- package/src/typography/headline/headline.tsx +2 -2
- package/src/typography/subheadline/subheadline.tsx +2 -2
- package/src/typography/title/title.tsx +2 -2
- package/src/typography/typography-showcase.stories.tsx +2 -2
- package/src/utils/click_away_listener.stories.tsx +21 -11
- package/src/utils/responsive/responsive_renderer.stories.tsx +7 -7
- package/src/utils/scroll_away_listener.stories.tsx +11 -1
- package/tsconfig.json +0 -3
- package/dist/card.css +0 -1
- package/dist/portal-qqIp4SIl.js.map +0 -1
- package/dist/themes/stylesheets/reset.css +0 -1
- package/dist/themes/themes/ergo/ergo_theme.css +0 -1
- package/dist/themes/themes/windows_98/windows_98.css +0 -1
- package/src/surfaces/card/card.module.css +0 -5
- package/src/surfaces/modal/modal.stories.tsx +0 -15
- /package/dist/{overlay/portal/portal.css → portal_platform.css} +0 -0
|
@@ -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
|
|
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/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,2BAA2BC,EAAO,aAAa,CAAC;AAAA,QAChE,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,2CAqG7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ChevronLeftIcon as
|
|
2
|
+
import { useState as z, useRef as D, useEffect as H } from "react";
|
|
3
|
+
import { ChevronLeftIcon as N } from "@tcn/icons/chevron_left_icon.js";
|
|
4
4
|
import { ChevronRightIcon as O } from "@tcn/icons/chevron_right_icon.js";
|
|
5
5
|
import { useSignalValue as $ } from "@tcn/state";
|
|
6
6
|
import "../../actions/button/base_button/base_button.js";
|
|
@@ -10,10 +10,10 @@ import "../../actions/button/button/button.js";
|
|
|
10
10
|
import "../../actions/button/select_group/select_group.js";
|
|
11
11
|
import "../../actions/button/select_group/single_select_group.js";
|
|
12
12
|
import { HStack as t } from "../../stacks/h_stack.js";
|
|
13
|
-
import { Spacer as
|
|
13
|
+
import { Spacer as x } from "../../stacks/spacer.js";
|
|
14
14
|
import { VStack as E } from "../../stacks/v_stack.js";
|
|
15
15
|
import { BodyText as L } from "../../typography/body_text/body_text.js";
|
|
16
|
-
import
|
|
16
|
+
import { clsx as y } from "clsx";
|
|
17
17
|
import "../../callout.module-D8ECmxpO.js";
|
|
18
18
|
import "../../caption.module-DDq0H4xZ.js";
|
|
19
19
|
import "../../footnote.module-DEyFuqOr.js";
|
|
@@ -25,30 +25,27 @@ import "../../utils/click_away_listener.js";
|
|
|
25
25
|
import "../../utils/scroll_away_listener.js";
|
|
26
26
|
import "../../utils/hooks/use_resize_observer.js";
|
|
27
27
|
import '../../date_picker_year_selector.css';const q = "_date-picker-year-selector_ab05e1f", A = "_date-picker-year-button_fded757", Y = { "date-picker-year-selector": q, "date-picker-year-button": A };
|
|
28
|
-
function
|
|
28
|
+
function ye({
|
|
29
29
|
presenter: s,
|
|
30
30
|
onClose: k
|
|
31
31
|
}) {
|
|
32
32
|
const { min: p, max: m, visibleYear: o, visibleMonth: b } = $(
|
|
33
33
|
s.stateBroadcast
|
|
34
|
-
), [c, f] =
|
|
34
|
+
), [c, f] = z(0), a = D(null), R = p == null ? -1 / 0 : p.getFullYear(), S = m == null ? 1 / 0 : m.getFullYear(), r = [], d = o % 20;
|
|
35
35
|
let u = o - d + c, 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
39
|
i.setFullYear(o - d + n + c), (i.getFullYear() > S || i.getFullYear() < R) && (l = !0);
|
|
40
|
-
const
|
|
40
|
+
const j = t;
|
|
41
41
|
r.push(
|
|
42
42
|
/* @__PURE__ */ e(
|
|
43
|
-
|
|
43
|
+
j,
|
|
44
44
|
{
|
|
45
45
|
as: "button",
|
|
46
46
|
width: "flex",
|
|
47
47
|
disabled: l,
|
|
48
|
-
className:
|
|
49
|
-
Y["date-picker-year-button"],
|
|
50
|
-
"date-picker-year-button"
|
|
51
|
-
),
|
|
48
|
+
className: y(Y["date-picker-year-button"], "date-picker-year-button"),
|
|
52
49
|
"data-is-disabled": String(l),
|
|
53
50
|
"data-is-selected": String(i.getFullYear() === o),
|
|
54
51
|
onClick: () => {
|
|
@@ -63,14 +60,14 @@ function xe({
|
|
|
63
60
|
function w() {
|
|
64
61
|
a.current != null && a.current.focus();
|
|
65
62
|
}
|
|
66
|
-
|
|
63
|
+
H(() => {
|
|
67
64
|
a.current != null && a.current.focus();
|
|
68
65
|
}, []);
|
|
69
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);
|
|
70
|
-
function
|
|
67
|
+
function P() {
|
|
71
68
|
f(c - 20);
|
|
72
69
|
}
|
|
73
|
-
function
|
|
70
|
+
function V() {
|
|
74
71
|
f(c + 20);
|
|
75
72
|
}
|
|
76
73
|
return /* @__PURE__ */ h(
|
|
@@ -79,15 +76,12 @@ function xe({
|
|
|
79
76
|
ref: a,
|
|
80
77
|
tabIndex: 0,
|
|
81
78
|
padding: "8px",
|
|
82
|
-
className:
|
|
83
|
-
Y["date-picker-year-selector"],
|
|
84
|
-
"date-picker-year-selector"
|
|
85
|
-
),
|
|
79
|
+
className: y(Y["date-picker-year-selector"], "date-picker-year-selector"),
|
|
86
80
|
gap: "4px",
|
|
87
81
|
children: [
|
|
88
82
|
/* @__PURE__ */ h(t, { gap: "4px", children: [
|
|
89
|
-
/* @__PURE__ */ e(g, { onClick:
|
|
90
|
-
/* @__PURE__ */ e(
|
|
83
|
+
/* @__PURE__ */ e(g, { onClick: P, hierarchy: "tertiary", children: /* @__PURE__ */ e(N, { flipOnRtl: !0, size: "md" }) }),
|
|
84
|
+
/* @__PURE__ */ e(x, {}),
|
|
91
85
|
/* @__PURE__ */ e(
|
|
92
86
|
M,
|
|
93
87
|
{
|
|
@@ -97,8 +91,8 @@ function xe({
|
|
|
97
91
|
children: `${u}-${F}`
|
|
98
92
|
}
|
|
99
93
|
),
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
/* @__PURE__ */ e(g, { hierarchy: "tertiary", onClick:
|
|
94
|
+
/* @__PURE__ */ e(x, {}),
|
|
95
|
+
/* @__PURE__ */ e(g, { hierarchy: "tertiary", onClick: V, children: /* @__PURE__ */ e(O, { size: "md" }) })
|
|
102
96
|
] }),
|
|
103
97
|
/* @__PURE__ */ e(t, { gap: "4px", children: v }),
|
|
104
98
|
/* @__PURE__ */ e(t, { gap: "4px", children: B }),
|
|
@@ -111,6 +105,6 @@ function xe({
|
|
|
111
105
|
);
|
|
112
106
|
}
|
|
113
107
|
export {
|
|
114
|
-
|
|
108
|
+
ye as DatePickerYearSelector
|
|
115
109
|
};
|
|
116
110
|
//# sourceMappingURL=date_picker_year_selector.js.map
|
|
@@ -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
|
|
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'], 'date-picker-year-selector')}\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":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React,
|
|
2
|
-
export interface InputProps extends Omit<
|
|
1
|
+
import { default as React, InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
3
3
|
type?: React.HTMLInputTypeAttribute;
|
|
4
4
|
width?: string;
|
|
5
5
|
height?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/inputs/input/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/inputs/input/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjF;AAED,eAAO,MAAM,KAAK,qFAkBhB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import o from "
|
|
2
|
+
import { clsx as o } from "clsx";
|
|
3
3
|
import f from "react";
|
|
4
|
-
import '../../input.css';const c = "_input_a16553f", m = { input: c }, I = f.forwardRef(function({ type:
|
|
4
|
+
import '../../input.css';const c = "_input_a16553f", m = { input: c }, I = f.forwardRef(function({ type: i = "text", style: s, className: n, width: r, height: l, onChange: a, ...t }, u) {
|
|
5
5
|
return /* @__PURE__ */ d(
|
|
6
6
|
"input",
|
|
7
7
|
{
|
|
8
8
|
className: o(m.input, n, "input"),
|
|
9
|
-
type:
|
|
9
|
+
type: i,
|
|
10
10
|
ref: u,
|
|
11
11
|
"data-is-disabled": t.disabled || !1,
|
|
12
12
|
"aria-disabled": t.disabled || !1,
|
|
@@ -14,7 +14,7 @@ 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, ...s }
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../../src/inputs/input/input.tsx"],"sourcesContent":["import
|
|
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,OAAO;AAAA,MAChD,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;"}
|
|
@@ -5,7 +5,7 @@ import { MultiselectInlineValues as R } from "../multiselect/multiselect_inline_
|
|
|
5
5
|
import { MultiselectValues as T } from "../multiselect/multiselect_values.js";
|
|
6
6
|
import { makeAvailableOptions as g } from "../options/utils.js";
|
|
7
7
|
import { Option as j } from "../options/option.js";
|
|
8
|
-
import k from "
|
|
8
|
+
import { clsx as k } from "clsx";
|
|
9
9
|
import { VStack as _ } 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 = [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi_combo_box.js","sources":["../../../src/inputs/multi_combo_box/multi_combo_box.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { ComboBox } from '../combo_box/combo_box.js';\nimport { InputProps } from '../input/input.js';\nimport { MultiselectInlineValues } from '../multiselect/multiselect_inline_values.js';\nimport { MultiselectValues } from '../multiselect/multiselect_values.js';\nimport { makeAvailableOptions } from '../options/utils.js';\nimport { OptionProps } from '../options/option.js';\nimport { Option } from '../options/option.js';\n\nimport styles from './multi_combo_box.module.css';\nimport
|
|
1
|
+
{"version":3,"file":"multi_combo_box.js","sources":["../../../src/inputs/multi_combo_box/multi_combo_box.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { ComboBox } from '../combo_box/combo_box.js';\nimport { InputProps } from '../input/input.js';\nimport { MultiselectInlineValues } from '../multiselect/multiselect_inline_values.js';\nimport { MultiselectValues } from '../multiselect/multiselect_values.js';\nimport { makeAvailableOptions } from '../options/utils.js';\nimport { OptionProps } from '../options/option.js';\nimport { Option } from '../options/option.js';\n\nimport styles from './multi_combo_box.module.css';\nimport { clsx } from 'clsx';\nimport { VStack, type VStackProps } from '../../stacks/v_stack.js';\n\nexport interface MultiComboBoxProps extends Omit<VStackProps, 'onChange'> {\n children: React.ReactElement<OptionProps> | React.ReactElement<OptionProps>[];\n onChange?: (values: string[]) => void;\n value?: string[];\n disabled?: boolean;\n inline?: boolean;\n inputRef?: React.Ref<HTMLInputElement>;\n inputProps?: InputProps;\n trimCustomInput?: boolean;\n}\n\nexport const MultiComboBox = React.forwardRef(function MultiComboBox(\n {\n value: values = [],\n children,\n disabled = false,\n className,\n onChange,\n inline = false,\n inputRef,\n trimCustomInput = false,\n inputProps,\n ...props\n }: MultiComboBoxProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [intervalValue, setInternalValue] = useState('');\n const childrenArray = React.Children.toArray(\n children\n ) as React.ReactElement<OptionProps>[];\n\n const availableOptions = makeAvailableOptions(childrenArray, values);\n const valuesAsOptions = values.map(v => {\n const option = childrenArray.find(o => o.props.value === v);\n if (option == null) {\n return (\n <Option value={v} label={v}>\n {v}\n </Option>\n );\n }\n return option;\n });\n\n function removeValue(option: React.ReactElement<OptionProps>) {\n const index = values.indexOf(option.props.value);\n\n if (index > -1) {\n const newValues = values.filter(v => v !== option.props.value);\n onChange && onChange(newValues);\n }\n }\n\n function addValue(newValue: string) {\n if (newValue.trim() === '') {\n return;\n }\n\n const index = values.indexOf(newValue);\n\n if (index === -1) {\n onChange && onChange([...values, newValue]);\n }\n\n setInternalValue('');\n }\n\n if (inline) {\n return (\n <>\n <ComboBox\n ref={inputRef}\n value={intervalValue}\n onChange={setInternalValue}\n onOptionSelect={addValue}\n trimCustomInput={trimCustomInput}\n disabled={disabled}\n noOptionMatchedMessage=\"Press Enter To Add\"\n placeholder=\"Type to Add\"\n {...inputProps}\n >\n {availableOptions}\n </ComboBox>\n <MultiselectInlineValues\n values={valuesAsOptions}\n disabled={disabled}\n onRemove={removeValue}\n />\n </>\n );\n }\n\n return (\n <VStack\n ref={ref}\n {...props}\n className={clsx(styles['multi-combo-box-container'], className)}\n >\n <ComboBox\n ref={inputRef}\n value={intervalValue}\n onChange={setInternalValue}\n onOptionSelect={addValue}\n trimCustomInput={trimCustomInput}\n disabled={disabled}\n noOptionMatchedMessage=\"No Options Matched\"\n placeholder=\"Type to Search or Add\"\n {...inputProps}\n >\n {availableOptions}\n </ComboBox>\n <MultiselectValues\n values={valuesAsOptions}\n onRemove={removeValue}\n disabled={disabled}\n className=\"multi-combo-box-values-container\"\n />\n </VStack>\n );\n});\n"],"names":["MultiComboBox","React","values","children","disabled","className","onChange","inline","inputRef","trimCustomInput","inputProps","props","ref","intervalValue","setInternalValue","useState","childrenArray","availableOptions","makeAvailableOptions","valuesAsOptions","v","option","o","Option","removeValue","newValues","addValue","newValue","jsxs","Fragment","jsx","ComboBox","MultiselectInlineValues","VStack","clsx","styles","MultiselectValues"],"mappings":";;;;;;;;;wFAwBaA,IAAgBC,EAAM,WAAW,SAC5C;AAAA,EACE,OAAOC,IAAS,CAAA;AAAA,EAChB,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,UAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,YAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAE,GAC/CC,IAAgBf,EAAM,SAAS;AAAA,IACnCE;AAAA,EAAA,GAGIc,IAAmBC,EAAqBF,GAAed,CAAM,GAC7DiB,IAAkBjB,EAAO,IAAI,CAAAkB,MAAK;AACtC,UAAMC,IAASL,EAAc,KAAK,OAAKM,EAAE,MAAM,UAAUF,CAAC;AAC1D,WAAIC,uBAECE,GAAA,EAAO,OAAOH,GAAG,OAAOA,GACtB,UAAAA,GACH;AAAA,EAIN,CAAC;AAED,WAASI,EAAYH,GAAyC;AAG5D,QAFcnB,EAAO,QAAQmB,EAAO,MAAM,KAAK,IAEnC,IAAI;AACd,YAAMI,IAAYvB,EAAO,OAAO,OAAKkB,MAAMC,EAAO,MAAM,KAAK;AAC7D,MAAAf,KAAYA,EAASmB,CAAS;AAAA,IAChC;AAAA,EACF;AAEA,WAASC,EAASC,GAAkB;AAClC,QAAIA,EAAS,KAAA,MAAW;AACtB;AAKF,IAFczB,EAAO,QAAQyB,CAAQ,MAEvB,MACZrB,KAAYA,EAAS,CAAC,GAAGJ,GAAQyB,CAAQ,CAAC,GAG5Cb,EAAiB,EAAE;AAAA,EACrB;AAEA,SAAIP,IAEA,gBAAAqB,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAKvB;AAAA,QACL,OAAOK;AAAA,QACP,UAAUC;AAAA,QACV,gBAAgBY;AAAA,QAChB,iBAAAjB;AAAA,QACA,UAAAL;AAAA,QACA,wBAAuB;AAAA,QACvB,aAAY;AAAA,QACX,GAAGM;AAAA,QAEH,UAAAO;AAAA,MAAA;AAAA,IAAA;AAAA,IAEH,gBAAAa;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,QAAQb;AAAA,QACR,UAAAf;AAAA,QACA,UAAUoB;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF,IAKF,gBAAAI;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,KAAArB;AAAA,MACC,GAAGD;AAAA,MACJ,WAAWuB,EAAKC,EAAO,2BAA2B,GAAG9B,CAAS;AAAA,MAE9D,UAAA;AAAA,QAAA,gBAAAyB;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,KAAKvB;AAAA,YACL,OAAOK;AAAA,YACP,UAAUC;AAAA,YACV,gBAAgBY;AAAA,YAChB,iBAAAjB;AAAA,YACA,UAAAL;AAAA,YACA,wBAAuB;AAAA,YACvB,aAAY;AAAA,YACX,GAAGM;AAAA,YAEH,UAAAO;AAAA,UAAA;AAAA,QAAA;AAAA,QAEH,gBAAAa;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,QAAQjB;AAAA,YACR,UAAUK;AAAA,YACV,UAAApB;AAAA,YACA,WAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACZ;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as a } from "clsx";
|
|
3
3
|
import { s as i } from "../../multiselect_values.module-BMJOyYHe.js";
|
|
4
4
|
import { CrossIcon as c } from "@tcn/icons/cross_icon.js";
|
|
5
5
|
import "../../actions/button/base_button/base_button.js";
|
|
@@ -17,7 +17,7 @@ function k({
|
|
|
17
17
|
className: m,
|
|
18
18
|
onRemove: l
|
|
19
19
|
}) {
|
|
20
|
-
const
|
|
20
|
+
const o = s.map((e, n) => /* @__PURE__ */ p(
|
|
21
21
|
u,
|
|
22
22
|
{
|
|
23
23
|
hAlign: "start",
|
|
@@ -25,7 +25,7 @@ function k({
|
|
|
25
25
|
className: i.chip,
|
|
26
26
|
paddingInlineStart: "8px",
|
|
27
27
|
children: [
|
|
28
|
-
/* @__PURE__ */ r("span", { children:
|
|
28
|
+
/* @__PURE__ */ r("span", { children: e.props.label }),
|
|
29
29
|
/* @__PURE__ */ r(
|
|
30
30
|
h,
|
|
31
31
|
{
|
|
@@ -34,7 +34,7 @@ function k({
|
|
|
34
34
|
hierarchy: "tertiary",
|
|
35
35
|
className: i.remove,
|
|
36
36
|
onClick: () => {
|
|
37
|
-
l(
|
|
37
|
+
l(e);
|
|
38
38
|
},
|
|
39
39
|
children: /* @__PURE__ */ r(c, { size: "xs" })
|
|
40
40
|
}
|
|
@@ -43,16 +43,16 @@ function k({
|
|
|
43
43
|
},
|
|
44
44
|
n
|
|
45
45
|
));
|
|
46
|
-
return
|
|
46
|
+
return o.length === 0 ? null : /* @__PURE__ */ r(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
|
-
className:
|
|
49
|
+
className: a(
|
|
50
50
|
i["item-container"],
|
|
51
51
|
m,
|
|
52
52
|
"multiselect-values-container"
|
|
53
53
|
),
|
|
54
54
|
"data-is-disabled": t,
|
|
55
|
-
children:
|
|
55
|
+
children: o
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect_values.js","sources":["../../../src/inputs/multiselect/multiselect_values.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"multiselect_values.js","sources":["../../../src/inputs/multiselect/multiselect_values.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport styles from './multiselect_values.module.css';\nimport { CrossIcon } from '@tcn/icons/cross_icon.js';\nimport { OptionProps } from '../options/option.js';\nimport { SlimButton } from '../../actions/index.js';\nimport { Chip } from '../../tokens/index.js';\n\nexport interface MultiselectValueProps {\n values: React.ReactElement<OptionProps>[];\n disabled: boolean;\n onRemove: (value: React.ReactElement<OptionProps>) => void;\n className?: string;\n}\n\nexport function MultiselectValues({\n values,\n disabled,\n className,\n onRemove,\n}: MultiselectValueProps) {\n const items = values.map((v, index) => {\n return (\n <Chip\n hAlign=\"start\"\n color=\"rgb(57, 85, 120)\"\n className={styles.chip}\n key={index}\n paddingInlineStart=\"8px\"\n >\n <span>{v.props.label}</span>\n <SlimButton\n disabled={disabled}\n size=\"sm\"\n hierarchy=\"tertiary\"\n className={styles.remove}\n onClick={() => {\n onRemove(v);\n }}\n >\n <CrossIcon size=\"xs\" />\n </SlimButton>\n </Chip>\n );\n });\n\n if (items.length === 0) {\n return null;\n }\n\n return (\n <div\n className={clsx(\n styles['item-container'],\n className,\n 'multiselect-values-container'\n )}\n data-is-disabled={disabled}\n >\n {items}\n </div>\n );\n}\n"],"names":["MultiselectValues","values","disabled","className","onRemove","items","v","index","jsxs","Chip","styles","jsx","SlimButton","CrossIcon","clsx"],"mappings":";;;;;;;;;;;;;AAeO,SAASA,EAAkB;AAAA,EAChC,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,GAA0B;AACxB,QAAMC,IAAQJ,EAAO,IAAI,CAACK,GAAGC,MAEzB,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,OAAM;AAAA,MACN,WAAWC,EAAO;AAAA,MAElB,oBAAmB;AAAA,MAEnB,UAAA;AAAA,QAAA,gBAAAC,EAAC,QAAA,EAAM,UAAAL,EAAE,MAAM,OAAM;AAAA,QACrB,gBAAAK;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,UAAAV;AAAA,YACA,MAAK;AAAA,YACL,WAAU;AAAA,YACV,WAAWQ,EAAO;AAAA,YAClB,SAAS,MAAM;AACb,cAAAN,EAASE,CAAC;AAAA,YACZ;AAAA,YAEA,UAAA,gBAAAK,EAACE,GAAA,EAAU,MAAK,KAAA,CAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACvB;AAAA,IAAA;AAAA,IAdKN;AAAA,EAAA,CAiBV;AAED,SAAIF,EAAM,WAAW,IACZ,OAIP,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWG;AAAA,QACTJ,EAAO,gBAAgB;AAAA,QACvBP;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,oBAAkBD;AAAA,MAEjB,UAAAG;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -6,6 +6,7 @@ export interface OptionProps {
|
|
|
6
6
|
keywords?: string[];
|
|
7
7
|
selected?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
obfuscate?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare function Option({ children }: OptionProps): number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
11
12
|
//# sourceMappingURL=option.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../../src/inputs/options/option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../../src/inputs/options/option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,6GAS/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.js","sources":["../../../src/inputs/options/option.tsx"],"sourcesContent":["import { HStack } from '../../stacks/h_stack.js';\nimport { BodyText } from '../../typography/body_text/body_text.js';\nimport React from 'react';\n\nexport interface OptionProps {\n children: React.ReactNode;\n value: string;\n label?: string;\n keywords?: string[];\n selected?: boolean;\n disabled?: boolean;\n}\n\nexport function Option({ children }: OptionProps) {\n if (typeof children === 'string') {\n return (\n <HStack hAlign=\"start\" padding=\"4px\" height=\"auto\">\n <BodyText size=\"lg\">{children}</BodyText>\n </HStack>\n );\n }\n return children;\n}\n"],"names":["Option","children","jsx","HStack","BodyText"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"option.js","sources":["../../../src/inputs/options/option.tsx"],"sourcesContent":["import { HStack } from '../../stacks/h_stack.js';\nimport { BodyText } from '../../typography/body_text/body_text.js';\nimport React from 'react';\n\nexport interface OptionProps {\n children: React.ReactNode;\n value: string;\n label?: string;\n keywords?: string[];\n selected?: boolean;\n disabled?: boolean;\n obfuscate?: boolean;\n}\n\nexport function Option({ children }: OptionProps) {\n if (typeof children === 'string') {\n return (\n <HStack hAlign=\"start\" padding=\"4px\" height=\"auto\">\n <BodyText size=\"lg\">{children}</BodyText>\n </HStack>\n );\n }\n return children;\n}\n"],"names":["Option","children","jsx","HStack","BodyText"],"mappings":";;;AAcO,SAASA,EAAO,EAAE,UAAAC,KAAyB;AAChD,SAAI,OAAOA,KAAa,WAEpB,gBAAAC,EAACC,GAAA,EAAO,QAAO,SAAQ,SAAQ,OAAM,QAAO,QAC1C,UAAA,gBAAAD,EAACE,GAAA,EAAS,MAAK,MAAM,UAAAH,GAAS,GAChC,IAGGA;AACT;"}
|
|
@@ -4,7 +4,12 @@ import { OptionProps } from '../options/option.js';
|
|
|
4
4
|
export interface PhoneNumberInputProps extends Omit<HStackProps, 'onChange' | 'children'> {
|
|
5
5
|
value?: string;
|
|
6
6
|
defaultCountry?: string;
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Callback fired when the phone number value changes.
|
|
9
|
+
* @param value - The phone number value with country prefix
|
|
10
|
+
* @param obfuscate - Whether the selected phone number is obfuscated (e.g., from a phone book entry marked as obfuscated)
|
|
11
|
+
*/
|
|
12
|
+
onChange?: (value: string, obfuscate: boolean) => void;
|
|
8
13
|
countrySelectRef?: React.Ref<HTMLButtonElement>;
|
|
9
14
|
phoneNumberInputRef?: React.Ref<HTMLInputElement>;
|
|
10
15
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone_number_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/phone_number_input/phone_number_input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAQN,MAAM,OAAO,CAAC;AAUf,OAAO,EAAU,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"phone_number_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/phone_number_input/phone_number_input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAQN,MAAM,OAAO,CAAC;AAUf,OAAO,EAAU,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAiG3D,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,UAAU,CAAC;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,gBAAgB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAChD,mBAAmB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;CAChF;AAED,eAAO,MAAM,gBAAgB,2FAkR3B,CAAC"}
|