@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tcn/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "TCN",
|
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
11
|
"access": "public",
|
|
12
|
+
"blackcatConfig": {
|
|
13
|
+
"storybook": {
|
|
14
|
+
"publish": true,
|
|
15
|
+
"title": "UI",
|
|
16
|
+
"port": 6200
|
|
17
|
+
}
|
|
18
|
+
},
|
|
12
19
|
"files": [
|
|
13
20
|
"dist",
|
|
14
21
|
"src",
|
|
@@ -82,6 +89,18 @@
|
|
|
82
89
|
"import": "./dist/themes/index.js",
|
|
83
90
|
"default": "./dist/themes/index.js"
|
|
84
91
|
},
|
|
92
|
+
"./themes/windows98": {
|
|
93
|
+
"@bc-monorepo/source": "./src/themes/themes/windows_98/windows_98_theme.ts",
|
|
94
|
+
"types": "./dist/themes/themes/windows_98/windows_98_theme.d.ts",
|
|
95
|
+
"import": "./dist/themes/themes/windows_98/windows_98_theme.js",
|
|
96
|
+
"default": "./dist/themes/themes/windows_98/windows_98_theme.js"
|
|
97
|
+
},
|
|
98
|
+
"./themes/ergo": {
|
|
99
|
+
"@bc-monorepo/source": "./src/themes/themes/ergo/ergo_theme.ts",
|
|
100
|
+
"types": "./dist/themes/themes/ergo/ergo_theme.d.ts",
|
|
101
|
+
"import": "./dist/themes/themes/ergo/ergo_theme.js",
|
|
102
|
+
"default": "./dist/themes/themes/ergo/ergo_theme.js"
|
|
103
|
+
},
|
|
85
104
|
"./tokens": {
|
|
86
105
|
"@bc-monorepo/source": "./src/tokens/index.ts",
|
|
87
106
|
"types": "./dist/tokens/index.d.ts",
|
|
@@ -107,10 +126,10 @@
|
|
|
107
126
|
"react-dom": "^18.2.0"
|
|
108
127
|
},
|
|
109
128
|
"dependencies": {
|
|
110
|
-
"
|
|
129
|
+
"clsx": "^2.1.1",
|
|
111
130
|
"react-color": "^2.19.3",
|
|
112
|
-
"@tcn/
|
|
113
|
-
"@tcn/
|
|
131
|
+
"@tcn/icons": "2.1.1",
|
|
132
|
+
"@tcn/state": "1.0.1"
|
|
114
133
|
},
|
|
115
134
|
"scripts": {
|
|
116
135
|
"build": "vite build",
|
|
@@ -6,7 +6,7 @@ import { Spacer } from '../../../stacks/spacer.js';
|
|
|
6
6
|
import { Button, ButtonProps } from '../button/button.js';
|
|
7
7
|
|
|
8
8
|
const meta: Meta<ButtonProps> = {
|
|
9
|
-
title: '
|
|
9
|
+
title: 'Actions/Button',
|
|
10
10
|
component: Button,
|
|
11
11
|
tags: ['autodocs'],
|
|
12
12
|
args: {
|
|
@@ -6,7 +6,7 @@ import { SelectGroup } from '../select_group/select_group.js';
|
|
|
6
6
|
import { SingleSelectGroup } from '../select_group/single_select_group.js';
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
title: '
|
|
9
|
+
title: 'Actions/Select Group',
|
|
10
10
|
component: SelectGroup,
|
|
11
11
|
tags: ['autodocs'],
|
|
12
12
|
argTypes: {
|
|
@@ -8,7 +8,7 @@ import { ButtonProps } from '../button/button.js';
|
|
|
8
8
|
import { SlimButton } from '../slim_button/slim_button.js';
|
|
9
9
|
|
|
10
10
|
const meta: Meta<ButtonProps> = {
|
|
11
|
-
title: '
|
|
11
|
+
title: 'Actions/Slim Button',
|
|
12
12
|
component: SlimButton,
|
|
13
13
|
tags: ['autodocs'],
|
|
14
14
|
args: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import type { Hierarchy, Size } from '../../../utils/index.js';
|
|
4
4
|
import { HStack } from '../../../stacks/h_stack.js';
|
|
5
5
|
import type { HStackOwnProps } from '../../../stacks/h_stack.js';
|
|
@@ -27,7 +27,7 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
|
|
|
27
27
|
style,
|
|
28
28
|
color,
|
|
29
29
|
hierarchy = 'secondary',
|
|
30
|
-
size = '
|
|
30
|
+
size = 'md',
|
|
31
31
|
onTouchStart,
|
|
32
32
|
onContextMenu,
|
|
33
33
|
...props
|
|
@@ -68,7 +68,12 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
|
|
|
68
68
|
data-hierarchy={hierarchy}
|
|
69
69
|
data-size={size}
|
|
70
70
|
data-is-disabled={Boolean(props.disabled)}
|
|
71
|
-
className={
|
|
71
|
+
className={clsx(
|
|
72
|
+
styles['base-button'],
|
|
73
|
+
'tcn-interactive',
|
|
74
|
+
'tcn-base-button',
|
|
75
|
+
className
|
|
76
|
+
)}
|
|
72
77
|
style={finalStyle}
|
|
73
78
|
onTouchStart={handleTouchStart}
|
|
74
79
|
onContextMenu={handleContextMenu}
|
|
@@ -6,90 +6,12 @@
|
|
|
6
6
|
--button-color-disabled: var(--status-disabled, #cccccc);
|
|
7
7
|
|
|
8
8
|
min-height: var(--button-height);
|
|
9
|
-
padding: 4px 8px;
|
|
10
|
-
border-radius: 4px;
|
|
11
9
|
width: auto;
|
|
12
|
-
border: 1px solid transparent;
|
|
13
|
-
outline: none;
|
|
14
10
|
cursor: pointer;
|
|
15
|
-
background: transparent;
|
|
16
11
|
font-size: calc(14px * var(--scalar, 1));
|
|
17
12
|
line-height: calc(16px * var(--scalar, 1));
|
|
18
13
|
}
|
|
19
14
|
|
|
20
|
-
.button:focus-visible {
|
|
21
|
-
outline: 3px solid color-mix(in srgb, var(--button-color) 40%, transparent);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* Primary */
|
|
25
|
-
.button[data-hierarchy="primary"] {
|
|
26
|
-
background: var(--button-color);
|
|
27
|
-
color: #ffffff;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.button[data-hierarchy="primary"]:hover {
|
|
31
|
-
background: var(--button-color-hover);
|
|
32
|
-
color: #ffffff;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.button[data-hierarchy="primary"]:active {
|
|
36
|
-
background: var(--button-color-active);
|
|
37
|
-
box-shadow: none;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* Secondary */
|
|
41
|
-
.button[data-hierarchy="secondary"] {
|
|
42
|
-
color: rgb(57, 85, 120);
|
|
43
|
-
border-color: rgb(57, 85, 120);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.button[data-hierarchy="secondary"]:hover {
|
|
47
|
-
background: color-mix(in srgb, rgb(57, 85, 120) 10%, rgb(255, 255, 255, 0.5));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.button[data-hierarchy="secondary"]:active {
|
|
51
|
-
background: color-mix(in srgb, rgb(57, 85, 120) 25%, rgb(255, 255, 255, 0.5));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* Tertiary */
|
|
55
|
-
.button[data-hierarchy="tertiary"] {
|
|
56
|
-
border-color: transparent;
|
|
57
|
-
color: rgb(57, 85, 120);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.button[data-hierarchy="tertiary"]:hover {
|
|
61
|
-
text-decoration: underline;
|
|
62
|
-
text-decoration-color: rgb(57, 85, 120);
|
|
63
|
-
text-decoration-thickness: 1px;
|
|
64
|
-
text-underline-offset: 2px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.button[data-hierarchy="tertiary"]:active {
|
|
68
|
-
opacity: 0.5;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* Disabled */
|
|
72
|
-
.button[data-is-disabled="true"] {
|
|
73
|
-
pointer-events: none;
|
|
74
|
-
background: var(--button-color-disabled);
|
|
75
|
-
color: #ffffff;
|
|
76
|
-
border-color: var(--button-color-disabled);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Disabled Secondary */
|
|
80
|
-
.button[data-hierarchy="secondary"][data-is-disabled="true"] {
|
|
81
|
-
background: transparent;
|
|
82
|
-
color: var(--button-color-disabled);
|
|
83
|
-
border-color: var(--button-color-disabled);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Disabled Tertiary */
|
|
87
|
-
.button[data-hierarchy="tertiary"][data-is-disabled="true"] {
|
|
88
|
-
background: transparent;
|
|
89
|
-
color: var(--button-color-disabled);
|
|
90
|
-
border-color: transparent;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
15
|
/* Sizes */
|
|
94
16
|
.button[data-size="sm"] {
|
|
95
17
|
--button-height: calc(22px * var(--scalar, 1));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { BaseButton, type BaseButtonProps } from '../base_button/base_button.js';
|
|
4
4
|
import styles from './button.module.css';
|
|
5
5
|
|
|
@@ -12,13 +12,11 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function
|
|
|
12
12
|
return (
|
|
13
13
|
<BaseButton
|
|
14
14
|
ref={ref}
|
|
15
|
-
className={
|
|
15
|
+
className={clsx(styles.button, 'tcn-button', className)}
|
|
16
16
|
{...props}
|
|
17
17
|
>
|
|
18
18
|
{typeof children === 'string' ? (
|
|
19
|
-
<span className={
|
|
20
|
-
{children}
|
|
21
|
-
</span>
|
|
19
|
+
<span className={clsx(styles['button-text'], 'tcn-button-text')}>{children}</span>
|
|
22
20
|
) : (
|
|
23
21
|
children
|
|
24
22
|
)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hierarchy, Size } from '../../../utils/index.js';
|
|
2
2
|
import { HStack } from '../../../stacks/h_stack.js';
|
|
3
3
|
import type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';
|
|
4
|
-
import
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { Button, ButtonProps } from '../button/button.js';
|
|
7
7
|
import styles from './button_group.module.css';
|
|
@@ -32,7 +32,7 @@ export const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(
|
|
|
32
32
|
height="auto"
|
|
33
33
|
data-hierarchy={hierarchy}
|
|
34
34
|
data-size={size}
|
|
35
|
-
className={
|
|
35
|
+
className={clsx(styles['button-group'], 'button-group', className)}
|
|
36
36
|
{...props}
|
|
37
37
|
>
|
|
38
38
|
{buttons.map((button, i) => {
|
|
@@ -42,7 +42,7 @@ export const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(
|
|
|
42
42
|
<React.Fragment key={i}>
|
|
43
43
|
<Button
|
|
44
44
|
{...button.props}
|
|
45
|
-
className={
|
|
45
|
+
className={clsx(
|
|
46
46
|
styles['button-group-button'],
|
|
47
47
|
'button-group-button',
|
|
48
48
|
button.props.className
|
|
@@ -52,10 +52,7 @@ export const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(
|
|
|
52
52
|
/>
|
|
53
53
|
{!isLast && (
|
|
54
54
|
<div
|
|
55
|
-
className={
|
|
56
|
-
styles['button-group-divider'],
|
|
57
|
-
'button-group-divider'
|
|
58
|
-
)}
|
|
55
|
+
className={clsx(styles['button-group-divider'], 'button-group-divider')}
|
|
59
56
|
data-hierarchy={hierarchy}
|
|
60
57
|
data-size={size}
|
|
61
58
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HStack } from '../../../stacks/h_stack.js';
|
|
2
2
|
import type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Button } from '../button/button.js';
|
|
6
6
|
import styles from './select_group.module.css';
|
|
@@ -49,7 +49,7 @@ export const SelectGroup = React.forwardRef(function ButtonGroup(
|
|
|
49
49
|
width="auto"
|
|
50
50
|
height="auto"
|
|
51
51
|
data-is-disabled={disabled}
|
|
52
|
-
className={
|
|
52
|
+
className={clsx(styles['select-group'], 'select-group', className)}
|
|
53
53
|
{...props}
|
|
54
54
|
>
|
|
55
55
|
{options.map((option, i) => {
|
|
@@ -63,7 +63,7 @@ export const SelectGroup = React.forwardRef(function ButtonGroup(
|
|
|
63
63
|
<Button
|
|
64
64
|
disabled={disabled || option.props.disabled}
|
|
65
65
|
data-is-disabled={disabled || option.props.disabled}
|
|
66
|
-
className={
|
|
66
|
+
className={clsx(styles['select-group-option'], 'select-group-option')}
|
|
67
67
|
hierarchy={isSelected ? 'primary' : 'secondary'}
|
|
68
68
|
onClick={select}
|
|
69
69
|
value={option.props.value}
|
|
@@ -5,29 +5,3 @@
|
|
|
5
5
|
.slim-button[data-is-disabled="true"] {
|
|
6
6
|
pointer-events: none;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
.slim-button[data-size="sm"] {
|
|
10
|
-
padding: 1px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.slim-button[data-size="md"] {
|
|
14
|
-
padding: 2px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.slim-button[data-size="lg"] {
|
|
18
|
-
padding: 3px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.slim-button[data-hierarchy="tertiary"][data-is-disabled="true"] {
|
|
22
|
-
background-color: transparent;
|
|
23
|
-
border: none;
|
|
24
|
-
color: var(--button-color-disabled);
|
|
25
|
-
min-height: auto;
|
|
26
|
-
pointer-events: none;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.slim-button[data-hierarchy="secondary"][data-is-disabled="true"] {
|
|
30
|
-
background-color: transparent;
|
|
31
|
-
border: 1px solid var(--button-color-disabled);
|
|
32
|
-
color: var(--button-color-disabled);
|
|
33
|
-
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
2
|
import { Button, ButtonProps } from '../button/button.js';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
// Styles
|
|
4
5
|
import styles from './slim_button.module.css';
|
|
5
6
|
|
|
6
7
|
export const SlimButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
@@ -8,7 +9,7 @@ export const SlimButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
8
9
|
return (
|
|
9
10
|
<Button
|
|
10
11
|
ref={ref}
|
|
11
|
-
className={
|
|
12
|
+
className={clsx(styles['slim-button'], 'tcn-slim-button', className)}
|
|
12
13
|
{...props}
|
|
13
14
|
>
|
|
14
15
|
{children}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { VStack } from '../../../../stacks/v_stack.js';
|
|
3
3
|
import type { VStackOwnProps } from '../../../../stacks/v_stack.js';
|
|
4
4
|
import type { WithDetailedHTMLProps } from '../../../../stacks/types/as.js';
|
|
5
|
-
import
|
|
5
|
+
import { clsx } from 'clsx';
|
|
6
6
|
import styles from './field_control.module.css';
|
|
7
7
|
import { FieldErrorMessage } from '../field_error.js';
|
|
8
8
|
|
|
@@ -38,7 +38,7 @@ export const FieldControl = React.forwardRef(function FieldControl(
|
|
|
38
38
|
data-locked={locked}
|
|
39
39
|
data-loading={loading}
|
|
40
40
|
data-error={hasError}
|
|
41
|
-
className={
|
|
41
|
+
className={clsx(styles['field-control'], 'field-control', className)}
|
|
42
42
|
height="auto"
|
|
43
43
|
width="flex"
|
|
44
44
|
hAlign="end"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { VStack } from '../../../stacks/v_stack.js';
|
|
4
4
|
import type { VStackOwnProps } from '../../../stacks/v_stack.js';
|
|
5
5
|
import type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';
|
|
@@ -27,7 +27,7 @@ export const FieldHeader = React.forwardRef(function FieldHeader(
|
|
|
27
27
|
as="div"
|
|
28
28
|
hAlign="start"
|
|
29
29
|
gap="4px"
|
|
30
|
-
className={
|
|
30
|
+
className={clsx('field-header', className)}
|
|
31
31
|
ref={ref}
|
|
32
32
|
{...props}
|
|
33
33
|
>
|
|
@@ -5,7 +5,7 @@ import type { HStackOwnProps } from '../../../../stacks/h_stack.js';
|
|
|
5
5
|
import type { WithDetailedHTMLProps } from '../../../../stacks/types/as.js';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { Loading } from '../../../../feedback/index.js';
|
|
8
|
-
import
|
|
8
|
+
import { clsx } from 'clsx';
|
|
9
9
|
import styles from './status_input.module.css';
|
|
10
10
|
|
|
11
11
|
/*
|
|
@@ -25,10 +25,7 @@ const LoadingAdornment: React.FC = () => {
|
|
|
25
25
|
|
|
26
26
|
const ErroredAdornment: React.FC = () => {
|
|
27
27
|
return (
|
|
28
|
-
<AlertTriangleIcon
|
|
29
|
-
className={classNames(styles['field-error'], 'field-error')}
|
|
30
|
-
size="lg"
|
|
31
|
-
/>
|
|
28
|
+
<AlertTriangleIcon className={clsx(styles['field-error'], 'field-error')} size="lg" />
|
|
32
29
|
);
|
|
33
30
|
};
|
|
34
31
|
|
|
@@ -66,7 +63,7 @@ export const FieldStatusInput = React.forwardRef(function StatusInput(
|
|
|
66
63
|
<HStack
|
|
67
64
|
ref={ref}
|
|
68
65
|
data-state={state}
|
|
69
|
-
className={
|
|
66
|
+
className={clsx(
|
|
70
67
|
'field-status-input',
|
|
71
68
|
styles['field-status-input'],
|
|
72
69
|
className,
|
|
@@ -10,7 +10,7 @@ import { AlertTriangleIcon } from '@tcn/icons/alert_triangle_icon.js';
|
|
|
10
10
|
import { theme } from '../../themes/index.js';
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
|
-
title: '
|
|
13
|
+
title: 'Form/Field',
|
|
14
14
|
parameters: {
|
|
15
15
|
docs: {
|
|
16
16
|
description: {
|
|
@@ -19,6 +19,7 @@ export default {
|
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
|
+
tags: ['autodocs'],
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export function Baseline() {
|
|
@@ -9,7 +9,16 @@ import { HStack } from '../../../stacks/h_stack.js';
|
|
|
9
9
|
import { Spacer } from '../../../stacks/spacer.js';
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
title: '
|
|
12
|
+
title: 'Form/HField',
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component:
|
|
17
|
+
'A horizontal field component that displays a label and input side by side.',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
tags: ['autodocs'],
|
|
13
22
|
};
|
|
14
23
|
|
|
15
24
|
export function Baseline() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HStack } from '../../../stacks/h_stack.js';
|
|
2
2
|
import type { HStackOwnProps } from '../../../stacks/h_stack.js';
|
|
3
3
|
import type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';
|
|
4
|
-
import
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
import styles from './h_field.module.css';
|
|
7
7
|
import type { FieldInput } from '../common/types.js';
|
|
@@ -47,7 +47,7 @@ export const HField = React.forwardRef(function HField(
|
|
|
47
47
|
data-locked={locked}
|
|
48
48
|
data-error={hasError}
|
|
49
49
|
data-loading={loading}
|
|
50
|
-
className={
|
|
50
|
+
className={clsx('base-field', styles['h-field'], 'h-field', className)}
|
|
51
51
|
vAlign="start"
|
|
52
52
|
hAlign="start"
|
|
53
53
|
height="auto"
|
|
@@ -9,7 +9,16 @@ import { AlertTriangleIcon } from '@tcn/icons/alert_triangle_icon.js';
|
|
|
9
9
|
import { FieldSet } from '../../field_set/field_set.js';
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
title: '
|
|
12
|
+
title: 'Form/VField',
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component:
|
|
17
|
+
'A vertical field component that displays a label and input below each other.',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
tags: ['autodocs'],
|
|
13
22
|
};
|
|
14
23
|
|
|
15
24
|
export function Baseline() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VStack } from '../../../stacks/v_stack.js';
|
|
2
2
|
import type { VStackOwnProps } from '../../../stacks/v_stack.js';
|
|
3
3
|
import type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';
|
|
4
|
-
import
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
import styles from './v_field.module.css';
|
|
7
7
|
import { FieldControl } from '../common/field_control/field_control.js';
|
|
@@ -46,7 +46,7 @@ export const VField = React.forwardRef(function VField(
|
|
|
46
46
|
data-locked={locked}
|
|
47
47
|
data-error={hasError}
|
|
48
48
|
data-loading={loading}
|
|
49
|
-
className={
|
|
49
|
+
className={clsx('base-field', styles['v-field'], 'v-field', className)}
|
|
50
50
|
vAlign="start"
|
|
51
51
|
hAlign="start"
|
|
52
52
|
height="auto"
|
|
@@ -15,7 +15,15 @@ import {
|
|
|
15
15
|
import { HField } from '../field/h_field/h_field.js';
|
|
16
16
|
|
|
17
17
|
export default {
|
|
18
|
-
title: '
|
|
18
|
+
title: 'Form/Field Set',
|
|
19
|
+
parameters: {
|
|
20
|
+
docs: {
|
|
21
|
+
description: {
|
|
22
|
+
component: 'A field set component that displays a legend and a group of fields.',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
tags: ['autodocs'],
|
|
19
27
|
};
|
|
20
28
|
|
|
21
29
|
export function Baseline() {
|
|
@@ -3,7 +3,7 @@ import { HStack } from '../../stacks/h_stack.js';
|
|
|
3
3
|
import { Spacer } from '../../stacks/spacer.js';
|
|
4
4
|
import { VStack } from '../../stacks/v_stack.js';
|
|
5
5
|
import type { VStackProps } from '../../stacks/v_stack.js';
|
|
6
|
-
import
|
|
6
|
+
import { clsx } from 'clsx';
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
import styles from './field_set.module.css';
|
|
9
9
|
|
|
@@ -37,13 +37,13 @@ export const FieldSet = React.forwardRef(function FieldSet(
|
|
|
37
37
|
as="fieldset"
|
|
38
38
|
aria-labelledby={labelId}
|
|
39
39
|
ref={ref}
|
|
40
|
-
className={
|
|
40
|
+
className={clsx(styles['field-set'], className, 'field-set')}
|
|
41
41
|
{...props}
|
|
42
42
|
>
|
|
43
43
|
{legend && (
|
|
44
44
|
<HStack
|
|
45
45
|
id={labelId}
|
|
46
|
-
className={
|
|
46
|
+
className={clsx('legend', 'field-set-legend')}
|
|
47
47
|
hAlign="start"
|
|
48
48
|
height={props.height}
|
|
49
49
|
>
|
|
@@ -54,10 +54,7 @@ export const FieldSet = React.forwardRef(function FieldSet(
|
|
|
54
54
|
{endAdornments}
|
|
55
55
|
</HStack>
|
|
56
56
|
)}
|
|
57
|
-
<VStack
|
|
58
|
-
className={classnames('field-set-body', styles['field-set-body'])}
|
|
59
|
-
{...props}
|
|
60
|
-
>
|
|
57
|
+
<VStack className={clsx('field-set-body', styles['field-set-body'])} {...props}>
|
|
61
58
|
{children}
|
|
62
59
|
</VStack>
|
|
63
60
|
</VStack>
|
|
@@ -17,7 +17,15 @@ function Base(props: CheckboxProps) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
|
-
title: 'Checkbox',
|
|
20
|
+
title: 'Inputs/Checkbox',
|
|
21
|
+
parameters: {
|
|
22
|
+
docs: {
|
|
23
|
+
description: {
|
|
24
|
+
component: 'A checkbox component that allows the user to select a value.',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
tags: ['autodocs'],
|
|
21
29
|
};
|
|
22
30
|
|
|
23
31
|
export function Checkbox() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React, { HTMLAttributes } from 'react';
|
|
3
3
|
import styles from './checkbox.module.css';
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ export const Checkbox = React.forwardRef(function Checkbox(
|
|
|
36
36
|
onChange && onChange(Boolean(e.currentTarget.checked), e);
|
|
37
37
|
}}
|
|
38
38
|
{...props}
|
|
39
|
-
className={
|
|
39
|
+
className={clsx(className, styles.checkbox, 'checkbox')}
|
|
40
40
|
style={{ width, height, ...style }}
|
|
41
41
|
/>
|
|
42
42
|
);
|
|
@@ -8,7 +8,15 @@ function Base(props: ColorInputProps) {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
|
-
title: 'Color Input',
|
|
11
|
+
title: 'Inputs/Color Input',
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component: 'A color input component that allows the user to select a color.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
tags: ['autodocs'],
|
|
12
20
|
};
|
|
13
21
|
|
|
14
22
|
export function ColorInput() {
|