@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
|
@@ -2,7 +2,7 @@ import { Box } from '../../stacks/box/box.js';
|
|
|
2
2
|
import { HStack } from '../../stacks/h_stack.js';
|
|
3
3
|
import { Spacer } from '../../stacks/spacer.js';
|
|
4
4
|
import { ZStack } from '../../stacks/z_stack.js';
|
|
5
|
-
import
|
|
5
|
+
import { clsx } from 'clsx';
|
|
6
6
|
import React, { useLayoutEffect, useRef, useState } from 'react';
|
|
7
7
|
import { HTMLAttributes } from 'react';
|
|
8
8
|
import { ColorState } from 'react-color';
|
|
@@ -105,11 +105,7 @@ export function ColorInput({
|
|
|
105
105
|
onClick={openPicker}
|
|
106
106
|
width="70px"
|
|
107
107
|
maxWidth="70px"
|
|
108
|
-
className={
|
|
109
|
-
styles['color-input-select'],
|
|
110
|
-
'color-input-select',
|
|
111
|
-
'select'
|
|
112
|
-
)}
|
|
108
|
+
className={clsx(styles['color-input-select'], 'color-input-select', 'select')}
|
|
113
109
|
style={{
|
|
114
110
|
borderStartStartRadius: 0,
|
|
115
111
|
borderEndStartRadius: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useForkRef } from '../../utils/index.js';
|
|
2
2
|
import { ZStack } from '../../stacks/z_stack.js';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
import React, { HTMLAttributes, useLayoutEffect, useRef } from 'react';
|
|
5
5
|
import { ChromePicker, Color, type ColorResult } from 'react-color';
|
|
6
6
|
import styles from './color_picker.module.css';
|
|
@@ -28,7 +28,7 @@ export const ColorPicker = React.forwardRef(function ColorPicker(
|
|
|
28
28
|
padding="8px"
|
|
29
29
|
height="auto"
|
|
30
30
|
width="auto"
|
|
31
|
-
className={
|
|
31
|
+
className={clsx(styles['color-picker'], className)}
|
|
32
32
|
{...props}
|
|
33
33
|
>
|
|
34
34
|
<ChromePicker
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { ComboBox } from '
|
|
2
|
+
import { ComboBox as ComboBoxComponent } from './combo_box.js';
|
|
3
3
|
import { Option } from '../options/option.js';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title: 'ComboBox',
|
|
6
|
+
title: 'Inputs/ComboBox',
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component:
|
|
11
|
+
'A combo box component that allows the user to select a value from a list of options.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
tags: ['autodocs'],
|
|
7
16
|
};
|
|
8
17
|
|
|
9
|
-
export function
|
|
18
|
+
export function ComboBox() {
|
|
10
19
|
const [value, setValue] = useState('');
|
|
11
20
|
function onSuggestionSelect(value: string) {
|
|
12
21
|
setValue(value);
|
|
13
22
|
}
|
|
14
23
|
return (
|
|
15
|
-
<
|
|
24
|
+
<ComboBoxComponent
|
|
16
25
|
value={value}
|
|
17
26
|
onChange={setValue}
|
|
18
27
|
onOptionSelect={onSuggestionSelect}
|
|
@@ -88,6 +97,6 @@ export function Default() {
|
|
|
88
97
|
>
|
|
89
98
|
Laura White
|
|
90
99
|
</Option>
|
|
91
|
-
</
|
|
100
|
+
</ComboBoxComponent>
|
|
92
101
|
);
|
|
93
102
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useForkRef } from '../../utils/index.js';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import React, { useRef, useState } from 'react';
|
|
4
4
|
import { SuggestionList } from '../suggestions/suggestion_list.js';
|
|
5
5
|
import { Input, InputProps } from '../input/input.js';
|
|
@@ -127,7 +127,7 @@ export const ComboBox = React.forwardRef(function ComboBox(
|
|
|
127
127
|
<>
|
|
128
128
|
<Input
|
|
129
129
|
ref={forkedRef}
|
|
130
|
-
className={
|
|
130
|
+
className={clsx(className, 'combo-box-input')}
|
|
131
131
|
{...props}
|
|
132
132
|
value={value}
|
|
133
133
|
onKeyDown={handleKeyDown}
|
|
@@ -4,20 +4,28 @@ import { Spacer } from '../../stacks/spacer.js';
|
|
|
4
4
|
import { VStack } from '../../stacks/v_stack.js';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { Button } from '../../actions/index.js';
|
|
7
|
-
import { DatePicker } from './date_picker.js';
|
|
7
|
+
import { DatePicker as DatePickerComponent } from './date_picker.js';
|
|
8
8
|
import { DatePickerPresenter } from './date_picker_presenter.js';
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
|
-
title: 'Date Picker',
|
|
11
|
+
title: 'Inputs/Date Picker',
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component: 'A date picker component that allows the user to select a date.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
tags: ['autodocs'],
|
|
12
20
|
};
|
|
13
21
|
|
|
14
|
-
export function
|
|
15
|
-
return <
|
|
22
|
+
export function DatePicker() {
|
|
23
|
+
return <DatePickerComponent value={new Date()} />;
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
export function BoundedTime() {
|
|
19
27
|
return (
|
|
20
|
-
<
|
|
28
|
+
<DatePickerComponent
|
|
21
29
|
showTime
|
|
22
30
|
value={new Date()}
|
|
23
31
|
minVisibleTimeInMilliseconds={8 * 1000 * 60 * 60}
|
|
@@ -35,7 +43,7 @@ export function SmallValidRange() {
|
|
|
35
43
|
min.setHours(10, 0, 0, 0);
|
|
36
44
|
max.setHours(12, 0, 0, 0);
|
|
37
45
|
return (
|
|
38
|
-
<
|
|
46
|
+
<DatePickerComponent
|
|
39
47
|
showTime
|
|
40
48
|
value={new Date()}
|
|
41
49
|
min={min}
|
|
@@ -53,7 +61,7 @@ export function MidValidRange() {
|
|
|
53
61
|
max.setFullYear(max.getFullYear() + 10);
|
|
54
62
|
|
|
55
63
|
return (
|
|
56
|
-
<
|
|
64
|
+
<DatePickerComponent
|
|
57
65
|
showTime
|
|
58
66
|
value={new Date()}
|
|
59
67
|
min={min}
|
|
@@ -65,7 +73,7 @@ export function MidValidRange() {
|
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
export function CountryCode() {
|
|
68
|
-
return <
|
|
76
|
+
return <DatePickerComponent countryCode="fr-FR" value={new Date()} />;
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
function DatePickerActions({ presenter }: { presenter: DatePickerPresenter }) {
|
|
@@ -112,7 +120,7 @@ function DatePickerActions({ presenter }: { presenter: DatePickerPresenter }) {
|
|
|
112
120
|
|
|
113
121
|
export function Actions() {
|
|
114
122
|
return (
|
|
115
|
-
<
|
|
123
|
+
<DatePickerComponent
|
|
116
124
|
value={new Date()}
|
|
117
125
|
renderActions={presenter => {
|
|
118
126
|
return <DatePickerActions presenter={presenter} />;
|
|
@@ -122,5 +130,5 @@ export function Actions() {
|
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
export function Disabled() {
|
|
125
|
-
return <
|
|
133
|
+
return <DatePickerComponent disabled value={new Date()} />;
|
|
126
134
|
}
|
|
@@ -3,7 +3,7 @@ import { useResizeObserver } from '../../utils/index.js';
|
|
|
3
3
|
import { HStack } from '../../stacks/h_stack.js';
|
|
4
4
|
import { Spacer } from '../../stacks/spacer.js';
|
|
5
5
|
import { VStack } from '../../stacks/v_stack.js';
|
|
6
|
-
import
|
|
6
|
+
import { clsx } from 'clsx';
|
|
7
7
|
import React, { useLayoutEffect, useRef, useState } from 'react';
|
|
8
8
|
import { DatePickerBody } from './date_picker_body.js';
|
|
9
9
|
import { DatePickerHeader } from './date_picker_header.js';
|
|
@@ -128,7 +128,7 @@ export const DatePicker = React.forwardRef(function DatePicker(
|
|
|
128
128
|
ref={ref}
|
|
129
129
|
width="auto"
|
|
130
130
|
height="auto"
|
|
131
|
-
className={
|
|
131
|
+
className={clsx(styles['date-picker'], 'date-picker')}
|
|
132
132
|
tabIndex={0}
|
|
133
133
|
>
|
|
134
134
|
<VStack
|
|
@@ -136,7 +136,7 @@ export const DatePicker = React.forwardRef(function DatePicker(
|
|
|
136
136
|
inline
|
|
137
137
|
height="auto"
|
|
138
138
|
width="auto"
|
|
139
|
-
className={
|
|
139
|
+
className={clsx(styles['date-picker-box'], 'date-picker-box')}
|
|
140
140
|
data-is-disabled={disabled}
|
|
141
141
|
>
|
|
142
142
|
<VStack height="auto">
|
|
@@ -4,7 +4,7 @@ import { ZStack } from '../../stacks/z_stack.js';
|
|
|
4
4
|
import type { CalendarDate } from '../../utils/calendar/calendar_date.js';
|
|
5
5
|
import type { DatePickerPresenter } from './date_picker_presenter.js';
|
|
6
6
|
import styles from './date_picker_date.module.css';
|
|
7
|
-
import
|
|
7
|
+
import { clsx } from 'clsx';
|
|
8
8
|
|
|
9
9
|
export interface DatePickerDateProps {
|
|
10
10
|
date: CalendarDate;
|
|
@@ -77,7 +77,7 @@ export function DatePickerDate({ presenter, date: calendarDate }: DatePickerDate
|
|
|
77
77
|
return (
|
|
78
78
|
<button
|
|
79
79
|
disabled={!isWithinMonth || isDisabled || !isWithinRange}
|
|
80
|
-
className={
|
|
80
|
+
className={clsx(styles['date-picker-date'], 'date-picker-date')}
|
|
81
81
|
onClick={select}
|
|
82
82
|
data-is-within-month={String(isWithinMonth)}
|
|
83
83
|
data-is-selected={String(isSelected)}
|
|
@@ -89,7 +89,7 @@ export function DatePickerDate({ presenter, date: calendarDate }: DatePickerDate
|
|
|
89
89
|
<BodyText>{String(calendarDate.date)}</BodyText>
|
|
90
90
|
{isToday && (
|
|
91
91
|
<div
|
|
92
|
-
className={
|
|
92
|
+
className={clsx(styles['date-picker-today'], 'date-picker-today')}
|
|
93
93
|
data-is-selected={String(isSelected)}
|
|
94
94
|
></div>
|
|
95
95
|
)}
|
|
@@ -11,7 +11,7 @@ import { ChevronRightIcon } from '@tcn/icons/chevron_right_icon.js';
|
|
|
11
11
|
import { Option, OptionProps } from '../options/option.js';
|
|
12
12
|
import { DatePickerState } from './date_picker_presenter.js';
|
|
13
13
|
import styles from './date_picker_header.module.css';
|
|
14
|
-
import
|
|
14
|
+
import { clsx } from 'clsx';
|
|
15
15
|
import { DatePickerYearInput } from './date_picker_year_input.js';
|
|
16
16
|
|
|
17
17
|
function makeMonthsOptions(countryCode: string): React.ReactElement<OptionProps>[] {
|
|
@@ -61,7 +61,7 @@ export function DatePickerHeader({ presenter, countryCode }: DatePickerHeaderPro
|
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
63
|
<HStack
|
|
64
|
-
className={
|
|
64
|
+
className={clsx(styles['date-picker-header'], 'date-picker-header')}
|
|
65
65
|
minWidth="35px"
|
|
66
66
|
width="100%"
|
|
67
67
|
>
|
|
@@ -4,11 +4,19 @@ import { Spacer } from '../../stacks/spacer.js';
|
|
|
4
4
|
import { HStack } from '../../stacks/h_stack.js';
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
import { Button } from '../../actions/index.js';
|
|
7
|
-
import { DatePickerInput } from './date_picker_input.js';
|
|
7
|
+
import { DatePickerInput as DatePickerInputComponent } from './date_picker_input.js';
|
|
8
8
|
import { DatePickerPresenter } from './date_picker_presenter.js';
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
|
-
title: 'Date Picker Input',
|
|
11
|
+
title: 'Inputs/Date Picker Input',
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component: 'A date picker input component that allows the user to select a date.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
tags: ['autodocs'],
|
|
12
20
|
};
|
|
13
21
|
|
|
14
22
|
function DatePickerActions({ presenter }: { presenter: DatePickerPresenter }) {
|
|
@@ -53,17 +61,17 @@ function DatePickerActions({ presenter }: { presenter: DatePickerPresenter }) {
|
|
|
53
61
|
);
|
|
54
62
|
}
|
|
55
63
|
|
|
56
|
-
export function
|
|
64
|
+
export function DatePickerInput() {
|
|
57
65
|
const [value, setValue] = useState<Date | null>(null);
|
|
58
66
|
|
|
59
|
-
return <
|
|
67
|
+
return <DatePickerInputComponent value={value} onChange={setValue} width="300px" />;
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
export function WithTime() {
|
|
63
71
|
const [value, setValue] = useState<Date | null>(null);
|
|
64
72
|
|
|
65
73
|
return (
|
|
66
|
-
<
|
|
74
|
+
<DatePickerInputComponent
|
|
67
75
|
value={value}
|
|
68
76
|
onChange={setValue}
|
|
69
77
|
showTime
|
|
@@ -79,7 +87,7 @@ export function WithTimeInterval() {
|
|
|
79
87
|
const [value, setValue] = useState<Date | null>(null);
|
|
80
88
|
|
|
81
89
|
return (
|
|
82
|
-
<
|
|
90
|
+
<DatePickerInputComponent
|
|
83
91
|
value={value}
|
|
84
92
|
onChange={setValue}
|
|
85
93
|
showTime
|
|
@@ -96,7 +104,7 @@ export function CountryCode() {
|
|
|
96
104
|
const [value, setValue] = useState<Date | null>(null);
|
|
97
105
|
|
|
98
106
|
return (
|
|
99
|
-
<
|
|
107
|
+
<DatePickerInputComponent
|
|
100
108
|
value={value}
|
|
101
109
|
onChange={setValue}
|
|
102
110
|
countryCode="fr-FR"
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from '
|
|
|
2
2
|
import { Hierarchy } from '../../utils/index.js';
|
|
3
3
|
import { ZStack } from '../../stacks/z_stack.js';
|
|
4
4
|
import { Popper } from '../../overlay/popper/popper.js';
|
|
5
|
-
import
|
|
5
|
+
import { clsx } from 'clsx';
|
|
6
6
|
import { HTMLAttributes } from 'react';
|
|
7
7
|
import { Button } from '../../actions/index.js';
|
|
8
8
|
import { DatePicker } from './date_picker.js';
|
|
@@ -125,7 +125,7 @@ export const DatePickerInput = React.forwardRef<HTMLButtonElement, DatePickerInp
|
|
|
125
125
|
<>
|
|
126
126
|
<Button
|
|
127
127
|
ref={ref}
|
|
128
|
-
className={
|
|
128
|
+
className={clsx(styles.button, 'select')}
|
|
129
129
|
hAlign="start"
|
|
130
130
|
disabled={disabled}
|
|
131
131
|
hierarchy={hierarchy}
|
|
@@ -153,7 +153,7 @@ export const DatePickerInput = React.forwardRef<HTMLButtonElement, DatePickerInp
|
|
|
153
153
|
>
|
|
154
154
|
<ZStack
|
|
155
155
|
padding="8px"
|
|
156
|
-
className={
|
|
156
|
+
className={clsx(styles.popover, 'date-picker-popover')}
|
|
157
157
|
onKeyDown={processKeyInput}
|
|
158
158
|
>
|
|
159
159
|
<DatePicker
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VStack } from '../../stacks/v_stack.js';
|
|
2
2
|
import { ZStack } from '../../stacks/z_stack.js';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Button } from '../../actions/index.js';
|
|
6
6
|
import styles from './date_picker_time_selector.module.css';
|
|
@@ -63,7 +63,7 @@ export function DatePickerTimeSelector({
|
|
|
63
63
|
key={x}
|
|
64
64
|
width="flex"
|
|
65
65
|
hierarchy="tertiary"
|
|
66
|
-
className={
|
|
66
|
+
className={clsx('selected-time', isSelected && styles['selected-time'])}
|
|
67
67
|
disabled={origin == null || disabled || isOutOfRange}
|
|
68
68
|
onClick={() => {
|
|
69
69
|
onSelect(date.getHours(), date.getMinutes(), date.getSeconds());
|
|
@@ -87,15 +87,12 @@ export function DatePickerTimeSelector({
|
|
|
87
87
|
width="auto"
|
|
88
88
|
height={height}
|
|
89
89
|
data-is-disabled={disabled || origin == null}
|
|
90
|
-
className={
|
|
90
|
+
className={clsx(styles['time-box'], 'time-box')}
|
|
91
91
|
>
|
|
92
92
|
<ZStack
|
|
93
|
-
className={
|
|
94
|
-
styles['time-box-title-container'],
|
|
95
|
-
'time-box-title-container'
|
|
96
|
-
)}
|
|
93
|
+
className={clsx(styles['time-box-title-container'], 'time-box-title-container')}
|
|
97
94
|
>
|
|
98
|
-
<BodyText className={
|
|
95
|
+
<BodyText className={clsx(styles['time-box-title'], 'time-box-title')}>
|
|
99
96
|
<ClockIcon size="lg" />
|
|
100
97
|
</BodyText>
|
|
101
98
|
</ZStack>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Button } from '../../actions/index.js';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import styles from './date_picker_year_input.module.css';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { Popper } from '../../overlay/popper/popper.js';
|
|
@@ -29,7 +29,7 @@ export function DatePickerYearInput({ presenter }: DatePickerYearInputProps) {
|
|
|
29
29
|
<>
|
|
30
30
|
<Button
|
|
31
31
|
hierarchy="tertiary"
|
|
32
|
-
className={
|
|
32
|
+
className={clsx('date-picker-year-select', styles['year-select'])}
|
|
33
33
|
width="auto"
|
|
34
34
|
hAlign="start"
|
|
35
35
|
onClick={open}
|
|
@@ -10,7 +10,7 @@ import { BodyText, Headline } from '../../typography/index.js';
|
|
|
10
10
|
import { DatePickerPresenter } from './date_picker_presenter.js';
|
|
11
11
|
import styles from './date_picker_year_selector.module.css';
|
|
12
12
|
import { FocusRedirect } from '../../utils/index.js';
|
|
13
|
-
import
|
|
13
|
+
import { clsx } from 'clsx';
|
|
14
14
|
|
|
15
15
|
export interface DatePickerYearSelectorProps {
|
|
16
16
|
presenter: DatePickerPresenter;
|
|
@@ -51,10 +51,7 @@ export function DatePickerYearSelector({
|
|
|
51
51
|
key={x}
|
|
52
52
|
width="flex"
|
|
53
53
|
disabled={disabled}
|
|
54
|
-
className={
|
|
55
|
-
styles['date-picker-year-button'],
|
|
56
|
-
'date-picker-year-button'
|
|
57
|
-
)}
|
|
54
|
+
className={clsx(styles['date-picker-year-button'], 'date-picker-year-button')}
|
|
58
55
|
data-is-disabled={String(disabled)}
|
|
59
56
|
data-is-selected={String(date.getFullYear() === visibleYear)}
|
|
60
57
|
onClick={() => {
|
|
@@ -98,10 +95,7 @@ export function DatePickerYearSelector({
|
|
|
98
95
|
ref={containerRef}
|
|
99
96
|
tabIndex={0}
|
|
100
97
|
padding="8px"
|
|
101
|
-
className={
|
|
102
|
-
styles['date-picker-year-selector'],
|
|
103
|
-
'date-picker-year-selector'
|
|
104
|
-
)}
|
|
98
|
+
className={clsx(styles['date-picker-year-selector'], 'date-picker-year-selector')}
|
|
105
99
|
gap="4px"
|
|
106
100
|
>
|
|
107
101
|
<HStack gap="4px">
|
|
@@ -4,7 +4,15 @@ import styles from '../__storybook__/stories.module.css';
|
|
|
4
4
|
import { VStack } from '../../stacks/v_stack.js';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'Input',
|
|
7
|
+
title: 'Inputs/Input',
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: 'A input component that allows the user to enter a value.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
tags: ['autodocs'],
|
|
8
16
|
};
|
|
9
17
|
|
|
10
18
|
function Base(props: InputProps) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { InputHTMLAttributes } from 'react';
|
|
4
4
|
import styles from './input.module.css';
|
|
5
5
|
|
|
6
|
-
export interface InputProps
|
|
6
|
+
export interface InputProps
|
|
7
|
+
extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
7
8
|
type?: React.HTMLInputTypeAttribute;
|
|
8
9
|
width?: string;
|
|
9
10
|
height?: string;
|
|
@@ -21,7 +22,7 @@ export const Input = React.forwardRef(function Input(
|
|
|
21
22
|
) {
|
|
22
23
|
return (
|
|
23
24
|
<input
|
|
24
|
-
className={
|
|
25
|
+
className={clsx(styles.input, className, 'input')}
|
|
25
26
|
type={type}
|
|
26
27
|
ref={ref}
|
|
27
28
|
data-is-disabled={props.disabled || false}
|
|
@@ -7,7 +7,15 @@ import { ZStack } from '../../stacks/z_stack.js';
|
|
|
7
7
|
import { KeyCaptureInput as Component, Range } from './key_capture_input.js';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
|
-
title: 'Key Capture Input',
|
|
10
|
+
title: 'Inputs/Key Capture Input',
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: 'A key capture input component that allows the user to capture a key.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
tags: ['autodocs'],
|
|
11
19
|
};
|
|
12
20
|
|
|
13
21
|
export function KeyCaptureInput() {
|
|
@@ -3,7 +3,16 @@ import { MaskInput as Component, MaskInputProps } from './mask_input.js';
|
|
|
3
3
|
import styles from '../__storybook__/stories.module.css';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title: 'Mask Input',
|
|
6
|
+
title: 'Inputs/Mask Input',
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component:
|
|
11
|
+
'A mask input component that allows the user to enter a value with a mask.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
tags: ['autodocs'],
|
|
7
16
|
};
|
|
8
17
|
|
|
9
18
|
function Base(props: Omit<MaskInputProps, 'onChange'>) {
|
|
@@ -4,7 +4,16 @@ import { Option } from '../options/option.js';
|
|
|
4
4
|
import styles from '../__storybook__/stories.module.css';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'Multi Combo Box',
|
|
7
|
+
title: 'Inputs/Multi Combo Box',
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component:
|
|
12
|
+
'A multi combo box component that allows the user to select multiple values from a list of options.',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
tags: ['autodocs'],
|
|
8
17
|
};
|
|
9
18
|
|
|
10
19
|
function Base(props: Omit<React.ComponentProps<typeof Component>, 'children'>) {
|
|
@@ -8,7 +8,7 @@ import { OptionProps } from '../options/option.js';
|
|
|
8
8
|
import { Option } from '../options/option.js';
|
|
9
9
|
|
|
10
10
|
import styles from './multi_combo_box.module.css';
|
|
11
|
-
import
|
|
11
|
+
import { clsx } from 'clsx';
|
|
12
12
|
import { VStack, type VStackProps } from '../../stacks/v_stack.js';
|
|
13
13
|
|
|
14
14
|
export interface MultiComboBoxProps extends Omit<VStackProps, 'onChange'> {
|
|
@@ -107,7 +107,7 @@ export const MultiComboBox = React.forwardRef(function MultiComboBox(
|
|
|
107
107
|
<VStack
|
|
108
108
|
ref={ref}
|
|
109
109
|
{...props}
|
|
110
|
-
className={
|
|
110
|
+
className={clsx(styles['multi-combo-box-container'], className)}
|
|
111
111
|
>
|
|
112
112
|
<ComboBox
|
|
113
113
|
ref={inputRef}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styles from './multiselect_values.module.css';
|
|
4
4
|
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
@@ -50,7 +50,7 @@ export function MultiselectValues({
|
|
|
50
50
|
|
|
51
51
|
return (
|
|
52
52
|
<div
|
|
53
|
-
className={
|
|
53
|
+
className={clsx(
|
|
54
54
|
styles['item-container'],
|
|
55
55
|
className,
|
|
56
56
|
'multiselect-values-container'
|
|
@@ -5,7 +5,16 @@ import { Option } from '../options/option.js';
|
|
|
5
5
|
import styles from '../__storybook__/stories.module.css';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
|
-
title: 'Multiselect',
|
|
8
|
+
title: 'Inputs/Multiselect',
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component:
|
|
13
|
+
'A multiselect component that allows the user to select multiple values from a list of options.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
tags: ['autodocs'],
|
|
9
18
|
};
|
|
10
19
|
|
|
11
20
|
function Base(props: Omit<React.ComponentProps<typeof Component>, 'children'>) {
|
|
@@ -48,3 +48,15 @@
|
|
|
48
48
|
max-height: calc(26px * var(--scalar, 1)) !important;
|
|
49
49
|
max-width: calc(26px * var(--scalar, 1)) !important;
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
.phone-number-input-obfuscated {
|
|
53
|
+
user-select: none;
|
|
54
|
+
-webkit-user-select: none;
|
|
55
|
+
cursor: default;
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.phone-number-input-obfuscated::selection {
|
|
61
|
+
background: transparent;
|
|
62
|
+
}
|
|
@@ -7,7 +7,16 @@ import { Option } from '../options/option.js';
|
|
|
7
7
|
import styles from '../__storybook__/stories.module.css';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
|
-
title: 'Phone Number Input',
|
|
10
|
+
title: 'Inputs/Phone Number Input',
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component:
|
|
15
|
+
'A phone number input component that allows the user to enter a phone number.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
tags: ['autodocs'],
|
|
11
20
|
};
|
|
12
21
|
|
|
13
22
|
function Base({
|
|
@@ -81,6 +90,14 @@ export function PhoneNumberInput() {
|
|
|
81
90
|
>
|
|
82
91
|
Bob Johnson - +1 (435) 586-5955
|
|
83
92
|
</Option>
|
|
93
|
+
<Option
|
|
94
|
+
value="+14355865956"
|
|
95
|
+
label="Obfuscated Number"
|
|
96
|
+
keywords={['obfuscated', 'number']}
|
|
97
|
+
obfuscate={true}
|
|
98
|
+
>
|
|
99
|
+
Obfuscated Number
|
|
100
|
+
</Option>
|
|
84
101
|
</Base>
|
|
85
102
|
</td>
|
|
86
103
|
</tr>
|