@tcn/ui 0.0.2 → 0.0.4
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.js +8 -8
- 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 +13 -5
- 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 +4 -4
- package/dist/actions/button/slim_button/slim_button.js.map +1 -1
- package/dist/feedback/progress/progress_bar.js +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 +3 -4
- package/dist/form/field/common/field_error.js.map +1 -1
- 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.d.ts.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.d.ts.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_presenters/options_field_presenter.d.ts.map +1 -1
- package/dist/form/field_presenters/options_field_presenter.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/form/form_field.d.ts.map +1 -1
- package/dist/form/form_field.js.map +1 -1
- package/dist/form/index.d.ts +14 -11
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +27 -20
- package/dist/form/index.js.map +1 -1
- package/dist/h_body.css +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.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/phone_number_input/phone_number_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +28 -31
- 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.js +3 -3
- package/dist/inputs/suggestions/suggestion_item.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +8 -8
- 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.d.ts.map +1 -1
- package/dist/layouts/body/h_body.js +12 -11
- package/dist/layouts/body/h_body.js.map +1 -1
- package/dist/layouts/body/v_body.d.ts.map +1 -1
- package/dist/layouts/body/v_body.js +11 -10
- 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.d.ts +2 -2
- package/dist/layouts/divider/divider.d.ts.map +1 -1
- package/dist/layouts/divider/divider.js +22 -21
- package/dist/layouts/divider/divider.js.map +1 -1
- package/dist/layouts/footer/footer.d.ts +1 -1
- package/dist/layouts/footer/footer.d.ts.map +1 -1
- package/dist/layouts/footer/footer.js +10 -10
- 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.d.ts +1 -1
- package/dist/layouts/header/header.d.ts.map +1 -1
- package/dist/layouts/header/header.js +20 -20
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/list/item.js +6 -6
- package/dist/layouts/list/item.js.map +1 -1
- package/dist/layouts/list/list.js +6 -6
- 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.d.ts +1 -1
- package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.js +20 -15
- package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
- package/dist/modal.css +1 -1
- package/dist/overlay/menu/menu.js +8 -8
- package/dist/overlay/menu/menu.js.map +1 -1
- package/dist/overlay/tooltip/tooltip.js +10 -10
- package/dist/overlay/tooltip/tooltip.js.map +1 -1
- package/dist/panel.css +1 -1
- package/dist/panel.module-DwGKncon.js +5 -0
- package/dist/panel.module-DwGKncon.js.map +1 -0
- package/dist/stack.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/types/styles.d.ts +2 -2
- package/dist/stacks/types/styles.d.ts.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.js +8 -8
- 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 +13 -20
- 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 +1 -1
- package/dist/surfaces/panel/h_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/h_panel.js +36 -31
- package/dist/surfaces/panel/h_panel.js.map +1 -1
- package/dist/surfaces/panel/v_panel.d.ts +1 -1
- package/dist/surfaces/panel/v_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/v_panel.js +39 -34
- 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 +5 -204
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/tokens/badge/badge.js +13 -13
- package/dist/tokens/badge/badge.js.map +1 -1
- package/dist/tokens/bubble/bubble.js +16 -17
- package/dist/tokens/bubble/bubble.js.map +1 -1
- package/dist/tokens/chip/chip.js +10 -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.d.ts +1 -1
- package/dist/typography/title/title.d.ts.map +1 -1
- package/dist/typography/title/title.js +19 -19
- package/dist/typography/title/title.js.map +1 -1
- package/dist/v_body.css +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 +2 -2
- package/src/actions/button/button/button.tsx +10 -4
- 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.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 +4 -7
- 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 +3 -3
- package/src/form/field/v_field/v_field.stories.tsx +10 -1
- package/src/form/field/v_field/v_field.tsx +3 -3
- package/src/form/field_presenters/options_field_presenter.ts +1 -1
- package/src/form/field_set/field_set.stories.tsx +9 -1
- package/src/form/field_set/field_set.tsx +4 -7
- package/src/form/form_field.tsx +1 -1
- package/src/form/index.ts +50 -11
- 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 +2 -2
- 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/phone_number_input/phone_number_input.stories.tsx +10 -1
- package/src/inputs/phone_number_input/phone_number_input.tsx +6 -9
- 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 +2 -2
- package/src/inputs/suggestions/suggestion_list.stories.tsx +21 -12
- package/src/inputs/suggestions/suggestion_list.tsx +3 -3
- 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.module.css +3 -2
- package/src/layouts/body/h_body.tsx +5 -4
- package/src/layouts/body/v_body.module.css +3 -2
- package/src/layouts/body/v_body.tsx +5 -4
- package/src/layouts/column/column.tsx +3 -3
- package/src/layouts/divider/__stories__/divider.stories.tsx +59 -19
- package/src/layouts/divider/divider.tsx +6 -5
- package/src/layouts/footer/footer.tsx +4 -4
- package/src/layouts/grid/grid.stories.tsx +42 -34
- package/src/layouts/grid/grid.tsx +2 -7
- package/src/layouts/header/header.tsx +4 -4
- package/src/layouts/list/item.tsx +2 -2
- package/src/layouts/list/list.tsx +2 -2
- 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 +9 -4
- 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/stack.module.css +54 -5
- package/src/stacks/stacks.mdx +28 -28
- 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/types/styles.ts +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 +2 -2
- 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 +68 -0
- package/src/surfaces/panel/__stories__/panel_stories.module.css +13 -0
- package/src/surfaces/panel/h_panel.tsx +12 -6
- package/src/surfaces/panel/panel.module.css +2 -7
- package/src/surfaces/panel/v_panel.tsx +11 -5
- 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/ergo_theme.css +142 -10
- 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 +3 -3
- 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/dist/form/field/form_field.d.ts +0 -6
- package/dist/form/field/form_field.d.ts.map +0 -1
- package/dist/form/field/form_field.js +0 -18
- package/dist/form/field/form_field.js.map +0 -1
- package/dist/panel.module-CtikcmYB.js +0 -5
- package/dist/panel.module-CtikcmYB.js.map +0 -1
- package/src/form/field/form_field.tsx +0 -29
- package/src/surfaces/modal/modal.stories.tsx +0 -15
|
@@ -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'>) {
|
|
@@ -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({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import React, {
|
|
4
4
|
useCallback,
|
|
5
5
|
useLayoutEffect,
|
|
@@ -272,15 +272,12 @@ export const PhoneNumberInput = React.forwardRef(function PhoneNumberInput(
|
|
|
272
272
|
return (
|
|
273
273
|
<HStack
|
|
274
274
|
ref={ref}
|
|
275
|
-
className={
|
|
275
|
+
className={clsx(styles['phone-number-input'], 'phone-number-input')}
|
|
276
276
|
height="auto"
|
|
277
277
|
{...props}
|
|
278
278
|
>
|
|
279
279
|
<Select
|
|
280
|
-
className={
|
|
281
|
-
styles['phone-number-input-select'],
|
|
282
|
-
'phone-number-input-select'
|
|
283
|
-
)}
|
|
280
|
+
className={clsx(styles['phone-number-input-select'], 'phone-number-input-select')}
|
|
284
281
|
ref={countryRef}
|
|
285
282
|
width="auto"
|
|
286
283
|
value={countryCode}
|
|
@@ -290,7 +287,7 @@ export const PhoneNumberInput = React.forwardRef(function PhoneNumberInput(
|
|
|
290
287
|
>
|
|
291
288
|
{countryOptions}
|
|
292
289
|
</Select>
|
|
293
|
-
<HStack width="flex" className={styles['phone-number-input-container']}>
|
|
290
|
+
<HStack width="flex" className={clsx(styles['phone-number-input-container'])}>
|
|
294
291
|
<MaskInput
|
|
295
292
|
ref={numberRef}
|
|
296
293
|
value={phoneNumber}
|
|
@@ -299,7 +296,7 @@ export const PhoneNumberInput = React.forwardRef(function PhoneNumberInput(
|
|
|
299
296
|
disabled={disabled}
|
|
300
297
|
data-is-disabled={disabled}
|
|
301
298
|
data-has-phone-book={showPhoneBook}
|
|
302
|
-
className={
|
|
299
|
+
className={clsx(styles['phone-number-input'], 'phone-number-input')}
|
|
303
300
|
preparePasteValue={preparePasteValue}
|
|
304
301
|
/>
|
|
305
302
|
</HStack>
|
|
@@ -307,7 +304,7 @@ export const PhoneNumberInput = React.forwardRef(function PhoneNumberInput(
|
|
|
307
304
|
<>
|
|
308
305
|
<SlimButton
|
|
309
306
|
disabled={disabled}
|
|
310
|
-
className={
|
|
307
|
+
className={clsx(
|
|
311
308
|
styles['phone-number-input-phone-book'],
|
|
312
309
|
'phone-number-input-phone-book'
|
|
313
310
|
)}
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Radio } from './radio.js';
|
|
2
|
+
import { Radio as RadioComponent } from './radio.js';
|
|
3
3
|
import { HStack } from '../../stacks/h_stack.js';
|
|
4
4
|
import { Spacer } from '../../stacks/spacer.js';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'Radio',
|
|
7
|
+
title: 'Inputs/Radio',
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: 'A radio component that allows the user to select a value.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
tags: ['autodocs'],
|
|
8
16
|
};
|
|
9
17
|
|
|
10
|
-
export function
|
|
18
|
+
export function Radio() {
|
|
11
19
|
return (
|
|
12
20
|
<HStack hAlign="center" height="auto">
|
|
13
|
-
<
|
|
21
|
+
<RadioComponent name="options" id="1" value="option-1" label="Option 1" />
|
|
14
22
|
<Spacer width="8px" />
|
|
15
|
-
<
|
|
23
|
+
<RadioComponent name="options" id="2" value="option-2" label="Option 2" />
|
|
16
24
|
<Spacer width="8px" />
|
|
17
|
-
<
|
|
25
|
+
<RadioComponent name="options" id="3" value="option-3" label="Option 3" />
|
|
18
26
|
</HStack>
|
|
19
27
|
);
|
|
20
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React, { HTMLAttributes } from 'react';
|
|
3
3
|
import styles from './radio.module.css';
|
|
4
4
|
import { HStack } from '../../stacks/h_stack.js';
|
|
@@ -39,7 +39,7 @@ export const Radio = React.forwardRef(function Radio(
|
|
|
39
39
|
<HStack inline width="auto">
|
|
40
40
|
<input
|
|
41
41
|
ref={ref}
|
|
42
|
-
className={
|
|
42
|
+
className={clsx(className, styles.radio, 'radio')}
|
|
43
43
|
type="radio"
|
|
44
44
|
id={finalId}
|
|
45
45
|
name={name}
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Option } from '../options/option.js';
|
|
3
|
-
import { Select, SelectProps } from './select.js';
|
|
3
|
+
import { Select as SelectComponent, SelectProps } from './select.js';
|
|
4
4
|
import { HStack } from '../../stacks/h_stack.js';
|
|
5
5
|
import { VStack } from '../../stacks/v_stack.js';
|
|
6
6
|
import { Headline } from '../../typography/headline/headline.js';
|
|
7
7
|
import { BodyText } from '../../typography/body_text/body_text.js';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
|
-
title: 'Select',
|
|
10
|
+
title: 'Inputs/Select',
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component:
|
|
15
|
+
'A select component that allows the user to select a value from a list of options.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
tags: ['autodocs'],
|
|
11
20
|
};
|
|
12
21
|
|
|
13
|
-
export function
|
|
22
|
+
export function Select(_: Omit<SelectProps, 'children'>) {
|
|
14
23
|
const [value, setValue] = useState<string>('');
|
|
15
24
|
|
|
16
25
|
return (
|
|
17
|
-
<
|
|
26
|
+
<SelectComponent value={value} onChange={setValue}>
|
|
18
27
|
<Option value="apple" label="Apple" keywords={['fruit', 'red', 'sweet']}>
|
|
19
28
|
Apple
|
|
20
29
|
</Option>
|
|
@@ -58,7 +67,7 @@ export function Default(_: Omit<SelectProps, 'children'>) {
|
|
|
58
67
|
>
|
|
59
68
|
Really Really Long Options
|
|
60
69
|
</Option>
|
|
61
|
-
</
|
|
70
|
+
</SelectComponent>
|
|
62
71
|
);
|
|
63
72
|
}
|
|
64
73
|
|
|
@@ -66,7 +75,7 @@ export function CustomWidth(_: Omit<SelectProps, 'children'>) {
|
|
|
66
75
|
const [value, setValue] = useState<string>('');
|
|
67
76
|
|
|
68
77
|
return (
|
|
69
|
-
<
|
|
78
|
+
<SelectComponent value={value} onChange={setValue} width="100px">
|
|
70
79
|
<Option value="apple" label="Apple" keywords={['fruit', 'red', 'sweet']}>
|
|
71
80
|
Apple
|
|
72
81
|
</Option>
|
|
@@ -110,7 +119,7 @@ export function CustomWidth(_: Omit<SelectProps, 'children'>) {
|
|
|
110
119
|
>
|
|
111
120
|
Really Really Long Options
|
|
112
121
|
</Option>
|
|
113
|
-
</
|
|
122
|
+
</SelectComponent>
|
|
114
123
|
);
|
|
115
124
|
}
|
|
116
125
|
|
|
@@ -118,7 +127,7 @@ export function CustomOptions() {
|
|
|
118
127
|
const [value, setValue] = useState<string>('');
|
|
119
128
|
|
|
120
129
|
return (
|
|
121
|
-
<
|
|
130
|
+
<SelectComponent value={value} onChange={setValue} width="100px">
|
|
122
131
|
<Option value="new-york" label="New York" keywords={['city', 'usa', 'big apple']}>
|
|
123
132
|
<HStack height="auto" gap="8px" padding="4px">
|
|
124
133
|
<span>🗽</span>
|
|
@@ -168,6 +177,6 @@ export function CustomOptions() {
|
|
|
168
177
|
</VStack>
|
|
169
178
|
</HStack>
|
|
170
179
|
</Option>
|
|
171
|
-
</
|
|
180
|
+
</SelectComponent>
|
|
172
181
|
);
|
|
173
182
|
}
|
|
@@ -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 { OptionProps } from '../options/option.js';
|
|
@@ -130,7 +130,7 @@ export const Select = React.forwardRef(function Select(
|
|
|
130
130
|
<>
|
|
131
131
|
<Button
|
|
132
132
|
ref={forkedRef}
|
|
133
|
-
className={
|
|
133
|
+
className={clsx(className, 'select', styles.select)}
|
|
134
134
|
width="100%"
|
|
135
135
|
{...props}
|
|
136
136
|
hAlign="start"
|
|
@@ -16,7 +16,15 @@ function BaseWithValue(props: SliderProps) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
|
-
title: 'Slider',
|
|
19
|
+
title: 'Inputs/Slider',
|
|
20
|
+
parameters: {
|
|
21
|
+
docs: {
|
|
22
|
+
description: {
|
|
23
|
+
component: 'A slider component that allows the user to select a value.',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
tags: ['autodocs'],
|
|
20
28
|
};
|
|
21
29
|
|
|
22
30
|
export function Slider() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React, { useLayoutEffect, useRef } from 'react';
|
|
3
3
|
import { HTMLAttributes } from 'react';
|
|
4
4
|
import styles from './slider.module.css';
|
|
@@ -41,7 +41,7 @@ export const Slider = React.forwardRef(function Slider(
|
|
|
41
41
|
return (
|
|
42
42
|
<input
|
|
43
43
|
type="range"
|
|
44
|
-
className={
|
|
44
|
+
className={clsx(className, styles.slider, 'slider')}
|
|
45
45
|
data-is-disabled={props.disabled || false}
|
|
46
46
|
ref={forkedRef}
|
|
47
47
|
onChange={e => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React, { useEffect, useRef } from 'react';
|
|
3
3
|
import styles from './suggestion_item.module.css';
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ export function SuggestionItem({
|
|
|
36
36
|
<button
|
|
37
37
|
tabIndex={-1}
|
|
38
38
|
ref={buttonRef}
|
|
39
|
-
className={
|
|
39
|
+
className={clsx(styles['suggestion-item'], 'suggestion-item')}
|
|
40
40
|
data-is-selected={isSelected}
|
|
41
41
|
data-is-focused={isFocused}
|
|
42
42
|
data-disabled={isDisabled}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
|
-
import { SuggestionList } from './suggestion_list.js';
|
|
3
|
+
import { SuggestionList as SuggestionListComponent } from './suggestion_list.js';
|
|
4
4
|
import { Option } from '../options/option.js';
|
|
5
5
|
import { HStack } from '../../stacks/h_stack.js';
|
|
6
6
|
import { VStack } from '../../stacks/v_stack.js';
|
|
7
7
|
import { BodyText, Headline } from '../../typography/index.js';
|
|
8
8
|
|
|
9
|
-
const meta: Meta<typeof
|
|
10
|
-
title: '
|
|
9
|
+
const meta: Meta<typeof SuggestionListComponent> = {
|
|
10
|
+
title: 'Inputs/Suggestion List',
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component:
|
|
15
|
+
'A suggestion list component that displays a list of suggestions and allows the user to select a value.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
tags: ['autodocs'],
|
|
11
20
|
};
|
|
12
21
|
|
|
13
22
|
export default meta;
|
|
14
23
|
type Story = StoryObj<typeof meta>;
|
|
15
24
|
|
|
16
|
-
export const
|
|
25
|
+
export const SuggestionList: Story = {
|
|
17
26
|
render: () => {
|
|
18
27
|
const [anchorElement, setAnchorElement] = useState<HTMLInputElement | null>(null);
|
|
19
28
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -30,7 +39,7 @@ export const Default: Story = {
|
|
|
30
39
|
style={{ width: '100%', padding: '8px' }}
|
|
31
40
|
/>
|
|
32
41
|
{isOpen && anchorElement && (
|
|
33
|
-
<
|
|
42
|
+
<SuggestionListComponent
|
|
34
43
|
value={value}
|
|
35
44
|
anchorElement={anchorElement}
|
|
36
45
|
onChange={setValue}
|
|
@@ -67,7 +76,7 @@ export const Default: Story = {
|
|
|
67
76
|
>
|
|
68
77
|
🫐 Elderberry
|
|
69
78
|
</Option>
|
|
70
|
-
</
|
|
79
|
+
</SuggestionListComponent>
|
|
71
80
|
)}
|
|
72
81
|
</div>
|
|
73
82
|
);
|
|
@@ -91,7 +100,7 @@ export const WithCustomContent: Story = {
|
|
|
91
100
|
style={{ width: '100%', padding: '8px' }}
|
|
92
101
|
/>
|
|
93
102
|
{isOpen && anchorElement && (
|
|
94
|
-
<
|
|
103
|
+
<SuggestionListComponent
|
|
95
104
|
value={label}
|
|
96
105
|
anchorElement={anchorElement}
|
|
97
106
|
onChange={setLabel}
|
|
@@ -132,7 +141,7 @@ export const WithCustomContent: Story = {
|
|
|
132
141
|
</VStack>
|
|
133
142
|
</HStack>
|
|
134
143
|
</Option>
|
|
135
|
-
</
|
|
144
|
+
</SuggestionListComponent>
|
|
136
145
|
)}
|
|
137
146
|
</div>
|
|
138
147
|
);
|
|
@@ -156,7 +165,7 @@ export const WithDisabledOptions: Story = {
|
|
|
156
165
|
style={{ width: '100%', padding: '8px' }}
|
|
157
166
|
/>
|
|
158
167
|
{isOpen && anchorElement && (
|
|
159
|
-
<
|
|
168
|
+
<SuggestionListComponent
|
|
160
169
|
value={value}
|
|
161
170
|
anchorElement={anchorElement}
|
|
162
171
|
onChange={setValue}
|
|
@@ -206,7 +215,7 @@ export const WithDisabledOptions: Story = {
|
|
|
206
215
|
<Option value="grape" label="Grape" keywords={['fruit', 'purple', 'bunch']}>
|
|
207
216
|
🍇 Grape
|
|
208
217
|
</Option>
|
|
209
|
-
</
|
|
218
|
+
</SuggestionListComponent>
|
|
210
219
|
)}
|
|
211
220
|
</div>
|
|
212
221
|
);
|
|
@@ -329,7 +338,7 @@ export const PerformanceTest: Story = {
|
|
|
329
338
|
style={{ width: '100%', padding: '8px' }}
|
|
330
339
|
/>
|
|
331
340
|
{isOpen && anchorElement && (
|
|
332
|
-
<
|
|
341
|
+
<SuggestionListComponent
|
|
333
342
|
value={label}
|
|
334
343
|
anchorElement={anchorElement}
|
|
335
344
|
onChange={setLabel}
|
|
@@ -340,7 +349,7 @@ export const PerformanceTest: Story = {
|
|
|
340
349
|
onClose={() => setIsOpen(false)}
|
|
341
350
|
>
|
|
342
351
|
{PERFORMANCE_TEST_ITEMS}
|
|
343
|
-
</
|
|
352
|
+
</SuggestionListComponent>
|
|
344
353
|
)}
|
|
345
354
|
</div>
|
|
346
355
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BodyText } from '../../typography/index.js';
|
|
2
2
|
import { VStack } from '../../stacks/v_stack.js';
|
|
3
3
|
import { ZStack } from '../../stacks/z_stack.js';
|
|
4
|
-
import
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
5
|
import React, { useLayoutEffect, Children, isValidElement } from 'react';
|
|
6
6
|
import { useRef, useState } from 'react';
|
|
7
7
|
import { FocusRedirect } from '../../utils/index.js';
|
|
@@ -369,7 +369,7 @@ export function SuggestionList({
|
|
|
369
369
|
minWidth={suggestionsWidth}
|
|
370
370
|
width="auto"
|
|
371
371
|
hAlign="start"
|
|
372
|
-
className={
|
|
372
|
+
className={clsx(styles['suggestion-list'], 'suggestion-list')}
|
|
373
373
|
>
|
|
374
374
|
<input
|
|
375
375
|
ref={internalInputRef}
|
|
@@ -378,7 +378,7 @@ export function SuggestionList({
|
|
|
378
378
|
onKeyUp={handleKeyUp}
|
|
379
379
|
onKeyDown={handleKeyDown}
|
|
380
380
|
onChange={handleChange}
|
|
381
|
-
className={
|
|
381
|
+
className={clsx(styles.input, 'suggestion-list-search-input')}
|
|
382
382
|
{...props}
|
|
383
383
|
/>
|
|
384
384
|
<VStack>
|
|
@@ -3,7 +3,15 @@ import { Switch as Component, SwitchProps } from './switch.js';
|
|
|
3
3
|
import styles from '../__storybook__/stories.module.css';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title: 'Switch',
|
|
6
|
+
title: 'Inputs/Switch',
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: 'A switch component that allows the user to toggle a value.',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
tags: ['autodocs'],
|
|
7
15
|
};
|
|
8
16
|
|
|
9
17
|
function Base(props: SwitchProps) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useRef, useState, HTMLAttributes, ChangeEvent } from 'react';
|
|
2
2
|
import { useForkRef } from '../../utils/index.js';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
import styles from './switch.module.css';
|
|
5
5
|
import { CheckIcon } from '@tcn/icons/check_icon.js';
|
|
6
6
|
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
@@ -55,18 +55,18 @@ export const Switch = React.forwardRef(function Switch(
|
|
|
55
55
|
data-is-checked={Boolean(checked)}
|
|
56
56
|
data-is-disabled={props.disabled || false}
|
|
57
57
|
data-width="fixed"
|
|
58
|
-
className={
|
|
58
|
+
className={clsx(styles['switch-wrapper'], className, 'switch-wrapper')}
|
|
59
59
|
>
|
|
60
60
|
{!omitIcons && (
|
|
61
61
|
<Icon
|
|
62
|
-
className={
|
|
62
|
+
className={clsx(styles['switch-icon'], 'switch-icon')}
|
|
63
63
|
data-is-checked={checked}
|
|
64
64
|
/>
|
|
65
65
|
)}
|
|
66
66
|
<input
|
|
67
67
|
ref={forkedInputRef}
|
|
68
68
|
type="checkbox"
|
|
69
|
-
className={
|
|
69
|
+
className={clsx(styles.switch, 'switch')}
|
|
70
70
|
onBlur={blur}
|
|
71
71
|
onFocus={focus}
|
|
72
72
|
style={{ ...style, ...customStyles }}
|
|
@@ -9,7 +9,15 @@ function Base(props: TextareaProps) {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
title: 'Textarea',
|
|
12
|
+
title: 'Inputs/Textarea',
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component: 'A textarea component that allows the user to enter a value.',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
tags: ['autodocs'],
|
|
13
21
|
};
|
|
14
22
|
|
|
15
23
|
export function Textarea() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { HTMLAttributes } from 'react';
|
|
4
4
|
import styles from './textarea.module.css';
|
|
@@ -20,7 +20,7 @@ export const Textarea = React.forwardRef(function Textarea(
|
|
|
20
20
|
return (
|
|
21
21
|
<textarea
|
|
22
22
|
style={{ width, height, ...style }}
|
|
23
|
-
className={
|
|
23
|
+
className={clsx(className, styles.textarea, 'textarea')}
|
|
24
24
|
data-is-disabled={props.disabled || false}
|
|
25
25
|
ref={ref}
|
|
26
26
|
onChange={e => {
|
|
@@ -7,7 +7,15 @@ import { ZStack } from '../../stacks/z_stack.js';
|
|
|
7
7
|
import { Footnote, Headline } from '../../typography/index.js';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
|
-
title: 'Unit Input',
|
|
10
|
+
title: 'Inputs/Unit Input',
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: 'A unit input component that allows the user to select a unit.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
tags: ['autodocs'],
|
|
11
19
|
};
|
|
12
20
|
|
|
13
21
|
function Base(props: Omit<UnitInputProps, 'children' | 'onChange'>) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { useForkRef } from '../../utils/index.js';
|
|
4
4
|
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
5
5
|
import { Input } from '../input/input.js';
|
|
@@ -82,13 +82,13 @@ export const UnitInput = React.forwardRef(function UnitInput(
|
|
|
82
82
|
return (
|
|
83
83
|
<HStack
|
|
84
84
|
ref={ref}
|
|
85
|
-
className={
|
|
85
|
+
className={clsx(styles['unit-input'], 'unit-input')}
|
|
86
86
|
height="auto"
|
|
87
87
|
{...props}
|
|
88
88
|
>
|
|
89
89
|
<ZStack width="flex">
|
|
90
90
|
<Input
|
|
91
|
-
className={
|
|
91
|
+
className={clsx(styles['unit-input-number'], 'unit-input-number')}
|
|
92
92
|
ref={forkedInputRef}
|
|
93
93
|
onChange={valueHandler}
|
|
94
94
|
disabled={disabled}
|
|
@@ -100,7 +100,7 @@ export const UnitInput = React.forwardRef(function UnitInput(
|
|
|
100
100
|
/>
|
|
101
101
|
</ZStack>
|
|
102
102
|
<Select
|
|
103
|
-
className={
|
|
103
|
+
className={clsx(styles['unit-input-select'], 'unit-input-select')}
|
|
104
104
|
ref={unitRef}
|
|
105
105
|
width="auto"
|
|
106
106
|
value={unit}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
import styles from './h_body.module.css';
|
|
5
5
|
|
|
6
6
|
export interface HBodyProps extends Omit<HStackProps, 'as'> {}
|
|
7
7
|
|
|
8
8
|
export const HBody = React.forwardRef<HTMLElement, HBodyProps>(function HBody(
|
|
9
|
-
{ children, className, ...props }: HBodyProps,
|
|
9
|
+
{ children, className, overflowX = 'auto', ...props }: HBodyProps,
|
|
10
10
|
ref
|
|
11
11
|
) {
|
|
12
12
|
return (
|
|
13
13
|
<HStack
|
|
14
14
|
ref={ref}
|
|
15
|
-
as="
|
|
16
|
-
|
|
15
|
+
as="div"
|
|
16
|
+
overflowX={overflowX}
|
|
17
|
+
className={clsx(styles['h-body'], className, 'tcn-h-body', 'body')}
|
|
17
18
|
{...props}
|
|
18
19
|
>
|
|
19
20
|
{children}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { VStack, type VStackProps } from '../../stacks/v_stack.js';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
import styles from './v_body.module.css';
|
|
5
5
|
|
|
6
6
|
export interface VBodyProps extends Omit<VStackProps, 'as'> {}
|
|
7
7
|
|
|
8
8
|
export const VBody = React.forwardRef<HTMLElement, VBodyProps>(function VBody(
|
|
9
|
-
{ children, className, ...props }: VBodyProps,
|
|
9
|
+
{ children, className, overflowY = 'auto', ...props }: VBodyProps,
|
|
10
10
|
ref
|
|
11
11
|
) {
|
|
12
12
|
return (
|
|
13
13
|
<VStack
|
|
14
14
|
ref={ref}
|
|
15
|
-
as="
|
|
16
|
-
|
|
15
|
+
as="div"
|
|
16
|
+
overflowY={overflowY}
|
|
17
|
+
className={clsx(styles['v-body'], className, 'tcn-body', 'tcn-v-body')}
|
|
17
18
|
{...props}
|
|
18
19
|
>
|
|
19
20
|
{children}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styles from './column.module.css';
|
|
4
4
|
import { Box, type BoxProps } from '../../stacks/box/box.js';
|
|
@@ -35,7 +35,7 @@ export const Column = React.forwardRef<HTMLElement, ColumnProps>(function Column
|
|
|
35
35
|
maxWidth={maxWidth}
|
|
36
36
|
minHeight={minHeight}
|
|
37
37
|
maxHeight={maxHeight}
|
|
38
|
-
className={
|
|
38
|
+
className={clsx(className, styles['column'], 'column')}
|
|
39
39
|
{...props}
|
|
40
40
|
>
|
|
41
41
|
<VStack
|
|
@@ -47,7 +47,7 @@ export const Column = React.forwardRef<HTMLElement, ColumnProps>(function Column
|
|
|
47
47
|
vAlign={vAlign}
|
|
48
48
|
ref={ref}
|
|
49
49
|
as="section"
|
|
50
|
-
className={
|
|
50
|
+
className={clsx(styles['column-stack'], 'column-stack')}
|
|
51
51
|
zIndex={0}
|
|
52
52
|
>
|
|
53
53
|
{children}
|