@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
|
@@ -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,6 +1,6 @@
|
|
|
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'> {}
|
|
@@ -14,7 +14,7 @@ export const HBody = React.forwardRef<HTMLElement, HBodyProps>(function HBody(
|
|
|
14
14
|
ref={ref}
|
|
15
15
|
as="div"
|
|
16
16
|
overflowX={overflowX}
|
|
17
|
-
className={
|
|
17
|
+
className={clsx(styles['h-body'], className, 'tcn-h-body', 'body')}
|
|
18
18
|
{...props}
|
|
19
19
|
>
|
|
20
20
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
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'> {}
|
|
@@ -14,7 +14,7 @@ export const VBody = React.forwardRef<HTMLElement, VBodyProps>(function VBody(
|
|
|
14
14
|
ref={ref}
|
|
15
15
|
as="div"
|
|
16
16
|
overflowY={overflowY}
|
|
17
|
-
className={
|
|
17
|
+
className={clsx(styles['v-body'], className, 'tcn-body', 'tcn-v-body')}
|
|
18
18
|
{...props}
|
|
19
19
|
>
|
|
20
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}
|
|
@@ -18,34 +18,46 @@ type DividerStoryProps = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const meta: Meta<DividerStoryProps> = {
|
|
21
|
-
title: 'Divider',
|
|
21
|
+
title: 'Layouts/Divider',
|
|
22
22
|
component: DividerComponent as React.ComponentType<DividerStoryProps>,
|
|
23
|
+
tags: ['autodocs'],
|
|
23
24
|
parameters: {
|
|
24
25
|
controls: {
|
|
25
26
|
include: ['emphasis', 'thickness', 'length', 'height', 'width', 'squished'],
|
|
26
27
|
},
|
|
28
|
+
docs: {
|
|
29
|
+
description: {
|
|
30
|
+
component: 'A divider component that separates content into sections.',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
27
33
|
},
|
|
28
34
|
argTypes: {
|
|
29
35
|
emphasis: {
|
|
30
36
|
control: 'select',
|
|
31
37
|
options: ['strong', 'normal', 'faint'],
|
|
38
|
+
description: 'The emphasis of the divider',
|
|
32
39
|
},
|
|
33
40
|
thickness: {
|
|
34
41
|
control: 'select',
|
|
35
42
|
options: ['sm', 'md', 'lg'],
|
|
43
|
+
description: 'The thickness of the divider',
|
|
36
44
|
},
|
|
37
45
|
length: {
|
|
38
46
|
control: 'select',
|
|
39
47
|
options: ['sm', 'md', 'lg', 'full'],
|
|
48
|
+
description: 'The length of the divider',
|
|
40
49
|
},
|
|
41
50
|
height: {
|
|
42
51
|
control: 'text',
|
|
52
|
+
description: 'The height of the divider',
|
|
43
53
|
},
|
|
44
54
|
width: {
|
|
45
55
|
control: 'text',
|
|
56
|
+
description: 'The width of the divider',
|
|
46
57
|
},
|
|
47
58
|
squished: {
|
|
48
59
|
control: 'boolean',
|
|
60
|
+
description: 'Whether the divider is squished',
|
|
49
61
|
},
|
|
50
62
|
},
|
|
51
63
|
};
|
|
@@ -60,18 +72,30 @@ export const Vertical: Story = {
|
|
|
60
72
|
squished: false,
|
|
61
73
|
},
|
|
62
74
|
render: args => (
|
|
63
|
-
<HStack
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
<HStack width="100%" height={args.squished ? '72px' : '300px'} gap="16px">
|
|
76
|
+
<Box
|
|
77
|
+
width={'100px'}
|
|
78
|
+
height={'100%'}
|
|
79
|
+
style={{ backgroundColor: 'var(--accent-color)' }}
|
|
80
|
+
/>
|
|
81
|
+
<DividerComponent vertical {...args} />
|
|
82
|
+
<Box
|
|
83
|
+
width={'100px'}
|
|
84
|
+
height={'100%'}
|
|
85
|
+
style={{ backgroundColor: 'var(--accent-color)' }}
|
|
86
|
+
/>
|
|
87
|
+
<DividerComponent vertical {...args} />
|
|
88
|
+
<Box
|
|
89
|
+
width={'100px'}
|
|
90
|
+
height={'100%'}
|
|
91
|
+
style={{ backgroundColor: 'var(--accent-color)' }}
|
|
92
|
+
/>
|
|
93
|
+
<DividerComponent vertical {...args} />
|
|
94
|
+
<Box
|
|
95
|
+
width={'100px'}
|
|
96
|
+
height={'100%'}
|
|
97
|
+
style={{ backgroundColor: 'var(--accent-color)' }}
|
|
98
|
+
/>
|
|
75
99
|
</HStack>
|
|
76
100
|
),
|
|
77
101
|
};
|
|
@@ -85,15 +109,31 @@ export const Horizontal: Story = {
|
|
|
85
109
|
},
|
|
86
110
|
render: args => (
|
|
87
111
|
<HStack hAlign="center">
|
|
88
|
-
<VStack
|
|
89
|
-
<VStack
|
|
90
|
-
<Box
|
|
112
|
+
<VStack vAlign="center" width={args.squished ? '72px' : '100%'}>
|
|
113
|
+
<VStack gap="16px">
|
|
114
|
+
<Box
|
|
115
|
+
width={'100%'}
|
|
116
|
+
height={'100px'}
|
|
117
|
+
style={{ backgroundColor: 'var(--accent-color)' }}
|
|
118
|
+
/>
|
|
91
119
|
<DividerComponent horizontal {...args} />
|
|
92
|
-
<Box
|
|
120
|
+
<Box
|
|
121
|
+
width={'100%'}
|
|
122
|
+
height={'100px'}
|
|
123
|
+
style={{ backgroundColor: 'var(--accent-color)' }}
|
|
124
|
+
/>
|
|
93
125
|
<DividerComponent horizontal {...args} />
|
|
94
|
-
<Box
|
|
126
|
+
<Box
|
|
127
|
+
width={'100%'}
|
|
128
|
+
height={'100px'}
|
|
129
|
+
style={{ backgroundColor: 'var(--accent-color)' }}
|
|
130
|
+
/>
|
|
95
131
|
<DividerComponent horizontal {...args} />
|
|
96
|
-
<Box
|
|
132
|
+
<Box
|
|
133
|
+
width={'100%'}
|
|
134
|
+
height={'100px'}
|
|
135
|
+
style={{ backgroundColor: 'var(--accent-color)' }}
|
|
136
|
+
/>
|
|
97
137
|
</VStack>
|
|
98
138
|
</VStack>
|
|
99
139
|
</HStack>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type CSSProperties } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
|
|
4
4
|
import type { Emphasis, Size } from '../../utils/index.js';
|
|
5
5
|
import styles from './divider.module.css';
|
|
@@ -59,7 +59,7 @@ export const Divider: React.FC<DividerProps> = ({
|
|
|
59
59
|
data-thickness={thickness}
|
|
60
60
|
data-length={length}
|
|
61
61
|
data-orientation={orientation}
|
|
62
|
-
className={
|
|
62
|
+
className={clsx(styles[`divider`], 'divider', 'tcn-divider', className)}
|
|
63
63
|
{...props}
|
|
64
64
|
>
|
|
65
65
|
<div
|
|
@@ -68,7 +68,7 @@ export const Divider: React.FC<DividerProps> = ({
|
|
|
68
68
|
data-length={length}
|
|
69
69
|
data-orientation={orientation}
|
|
70
70
|
style={cssVariables}
|
|
71
|
-
className={
|
|
71
|
+
className={clsx(
|
|
72
72
|
styles[`divider-line`],
|
|
73
73
|
'divider-line',
|
|
74
74
|
'tcn-divider-line',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
4
4
|
import type { Hierarchy, Size } from '../../utils/index.js';
|
|
5
5
|
import styles from './footer.module.css';
|
|
@@ -18,7 +18,7 @@ export const Footer = React.forwardRef<HTMLElement, FooterProps>(function Footer
|
|
|
18
18
|
<HStack
|
|
19
19
|
ref={ref}
|
|
20
20
|
as="footer"
|
|
21
|
-
className={
|
|
21
|
+
className={clsx(styles.footer, className, 'tcn-footer')}
|
|
22
22
|
data-hierarchy={hierarchy}
|
|
23
23
|
data-size={size}
|
|
24
24
|
{...props}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Meta } from '@storybook/react-vite';
|
|
3
|
-
import { Grid, GridProps } from './grid.js';
|
|
3
|
+
import { Grid as GridComponent, GridProps } from './grid.js';
|
|
4
4
|
import { Rect } from '../../stacks/story_components/rect.js';
|
|
5
5
|
import { Circle } from '../../stacks/story_components/circle.js';
|
|
6
6
|
import { StyleBox } from '../../stacks/story_components/style_box.js';
|
|
7
7
|
import { VStack } from '../../stacks/v_stack.js';
|
|
8
8
|
|
|
9
9
|
const meta: Meta<GridProps> = {
|
|
10
|
-
title: 'Grid',
|
|
11
|
-
component:
|
|
10
|
+
title: 'Layouts/Grid',
|
|
11
|
+
component: GridComponent,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component: 'A grid component that lays out content in a grid.',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
12
20
|
args: {
|
|
13
21
|
gap: '1rem',
|
|
14
22
|
itemHeight: 100,
|
|
@@ -48,17 +56,17 @@ const meta: Meta<GridProps> = {
|
|
|
48
56
|
|
|
49
57
|
export default meta;
|
|
50
58
|
|
|
51
|
-
export function
|
|
59
|
+
export function Grid(props: GridProps) {
|
|
52
60
|
return (
|
|
53
61
|
<StyleBox>
|
|
54
|
-
<
|
|
62
|
+
<GridComponent {...props} gap="10px">
|
|
55
63
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
56
64
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
57
65
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
58
66
|
<Rect width="100%" height="100%" color="#96ceb4" />
|
|
59
67
|
<Rect width="100%" height="100%" color="#feca57" />
|
|
60
68
|
<Rect width="100%" height="100%" color="#ff9ff3" />
|
|
61
|
-
</
|
|
69
|
+
</GridComponent>
|
|
62
70
|
</StyleBox>
|
|
63
71
|
);
|
|
64
72
|
}
|
|
@@ -69,29 +77,29 @@ export function AlignmentExamples() {
|
|
|
69
77
|
<VStack vAlign="center" gap="2rem">
|
|
70
78
|
<VStack hAlign="start">
|
|
71
79
|
<h3>Start Alignment (Default)</h3>
|
|
72
|
-
<
|
|
80
|
+
<GridComponent itemWidth={100} itemHeight={100} columnAmount={4} gap="10px">
|
|
73
81
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
74
82
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
75
83
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
76
|
-
</
|
|
84
|
+
</GridComponent>
|
|
77
85
|
</VStack>
|
|
78
86
|
|
|
79
87
|
<VStack hAlign="center">
|
|
80
88
|
<h3>Center Alignment</h3>
|
|
81
|
-
<
|
|
89
|
+
<GridComponent itemWidth={100} itemHeight={100} columnAmount={4} gap="10px">
|
|
82
90
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
83
91
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
84
92
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
85
|
-
</
|
|
93
|
+
</GridComponent>
|
|
86
94
|
</VStack>
|
|
87
95
|
|
|
88
96
|
<VStack hAlign="end">
|
|
89
97
|
<h3>End Alignment</h3>
|
|
90
|
-
<
|
|
98
|
+
<GridComponent itemWidth={100} itemHeight={100} columnAmount={4} gap="10px">
|
|
91
99
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
92
100
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
93
101
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
94
|
-
</
|
|
102
|
+
</GridComponent>
|
|
95
103
|
</VStack>
|
|
96
104
|
</VStack>
|
|
97
105
|
</StyleBox>
|
|
@@ -104,32 +112,32 @@ export function DifferentGaps() {
|
|
|
104
112
|
<VStack vAlign="start" gap="30px">
|
|
105
113
|
<VStack hAlign="start">
|
|
106
114
|
<h3>Small Gap</h3>
|
|
107
|
-
<
|
|
115
|
+
<GridComponent itemWidth={120} itemHeight={120} columnAmount={3} gap="4px">
|
|
108
116
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
109
117
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
110
118
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
111
|
-
</
|
|
119
|
+
</GridComponent>
|
|
112
120
|
</VStack>
|
|
113
121
|
|
|
114
122
|
<VStack hAlign="start">
|
|
115
123
|
<h3>Large Gap</h3>
|
|
116
|
-
<
|
|
124
|
+
<GridComponent itemWidth={120} itemHeight={120} columnAmount={3} gap="8px">
|
|
117
125
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
118
126
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
119
127
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
120
|
-
</
|
|
128
|
+
</GridComponent>
|
|
121
129
|
</VStack>
|
|
122
130
|
|
|
123
131
|
<VStack hAlign="start">
|
|
124
132
|
<h3>Different Row and Column Gaps</h3>
|
|
125
|
-
<
|
|
133
|
+
<GridComponent itemWidth={120} itemHeight={120} columnAmount={3} gap="16px">
|
|
126
134
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
127
135
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
128
136
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
129
137
|
<Rect width="100%" height="100%" color="#96ceb4" />
|
|
130
138
|
<Rect width="100%" height="100%" color="#feca57" />
|
|
131
139
|
<Rect width="100%" height="100%" color="#ff9ff3" />
|
|
132
|
-
</
|
|
140
|
+
</GridComponent>
|
|
133
141
|
</VStack>
|
|
134
142
|
</VStack>
|
|
135
143
|
</StyleBox>
|
|
@@ -142,50 +150,50 @@ export function MaxColumnsExamples() {
|
|
|
142
150
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
143
151
|
<div>
|
|
144
152
|
<h3>2 Columns</h3>
|
|
145
|
-
<
|
|
153
|
+
<GridComponent itemWidth={150} itemHeight={150} columnAmount={2}>
|
|
146
154
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
147
155
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
148
156
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
149
157
|
<Rect width="100%" height="100%" color="#96ceb4" />
|
|
150
158
|
<Rect width="100%" height="100%" color="#feca57" />
|
|
151
159
|
<Rect width="100%" height="100%" color="#ff9ff3" />
|
|
152
|
-
</
|
|
160
|
+
</GridComponent>
|
|
153
161
|
</div>
|
|
154
162
|
|
|
155
163
|
<div>
|
|
156
164
|
<h3>3 Columns</h3>
|
|
157
|
-
<
|
|
165
|
+
<GridComponent itemWidth={120} itemHeight={120} columnAmount={3}>
|
|
158
166
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
159
167
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
160
168
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
161
169
|
<Rect width="100%" height="100%" color="#96ceb4" />
|
|
162
170
|
<Rect width="100%" height="100%" color="#feca57" />
|
|
163
171
|
<Rect width="100%" height="100%" color="#ff9ff3" />
|
|
164
|
-
</
|
|
172
|
+
</GridComponent>
|
|
165
173
|
</div>
|
|
166
174
|
|
|
167
175
|
<div>
|
|
168
176
|
<h3>4 Columns</h3>
|
|
169
|
-
<
|
|
177
|
+
<GridComponent itemWidth={100} itemHeight={100} columnAmount={4}>
|
|
170
178
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
171
179
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
172
180
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
173
181
|
<Rect width="100%" height="100%" color="#96ceb4" />
|
|
174
182
|
<Rect width="100%" height="100%" color="#feca57" />
|
|
175
183
|
<Rect width="100%" height="100%" color="#ff9ff3" />
|
|
176
|
-
</
|
|
184
|
+
</GridComponent>
|
|
177
185
|
</div>
|
|
178
186
|
|
|
179
187
|
<div>
|
|
180
188
|
<h3>6 Columns</h3>
|
|
181
|
-
<
|
|
189
|
+
<GridComponent itemWidth={80} itemHeight={80} columnAmount={6}>
|
|
182
190
|
<Rect width="100%" height="100%" color="#ff6b6b" />
|
|
183
191
|
<Rect width="100%" height="100%" color="#4ecdc4" />
|
|
184
192
|
<Rect width="100%" height="100%" color="#45b7d1" />
|
|
185
193
|
<Rect width="100%" height="100%" color="#96ceb4" />
|
|
186
194
|
<Rect width="100%" height="100%" color="#feca57" />
|
|
187
195
|
<Rect width="100%" height="100%" color="#ff9ff3" />
|
|
188
|
-
</
|
|
196
|
+
</GridComponent>
|
|
189
197
|
</div>
|
|
190
198
|
</div>
|
|
191
199
|
</StyleBox>
|
|
@@ -198,7 +206,7 @@ export function DifferentSizes() {
|
|
|
198
206
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
199
207
|
<div>
|
|
200
208
|
<h3>Small Items (80px x 80px)</h3>
|
|
201
|
-
<
|
|
209
|
+
<GridComponent itemWidth={80} itemHeight={80} columnAmount={6}>
|
|
202
210
|
{Array.from({ length: 8 }, (_, i) => (
|
|
203
211
|
<Rect
|
|
204
212
|
key={i}
|
|
@@ -207,12 +215,12 @@ export function DifferentSizes() {
|
|
|
207
215
|
color={`hsl(${i * 45}, 70%, 60%)`}
|
|
208
216
|
/>
|
|
209
217
|
))}
|
|
210
|
-
</
|
|
218
|
+
</GridComponent>
|
|
211
219
|
</div>
|
|
212
220
|
|
|
213
221
|
<div>
|
|
214
222
|
<h3>Medium Items (120px x 120px)</h3>
|
|
215
|
-
<
|
|
223
|
+
<GridComponent itemWidth={120} itemHeight={120} columnAmount={4}>
|
|
216
224
|
{Array.from({ length: 6 }, (_, i) => (
|
|
217
225
|
<Rect
|
|
218
226
|
key={i}
|
|
@@ -221,12 +229,12 @@ export function DifferentSizes() {
|
|
|
221
229
|
color={`hsl(${i * 60}, 70%, 60%)`}
|
|
222
230
|
/>
|
|
223
231
|
))}
|
|
224
|
-
</
|
|
232
|
+
</GridComponent>
|
|
225
233
|
</div>
|
|
226
234
|
|
|
227
235
|
<div>
|
|
228
236
|
<h3>Large Items (150px x 150px)</h3>
|
|
229
|
-
<
|
|
237
|
+
<GridComponent itemWidth={150} itemHeight={150} columnAmount={3}>
|
|
230
238
|
{Array.from({ length: 4 }, (_, i) => (
|
|
231
239
|
<Rect
|
|
232
240
|
key={i}
|
|
@@ -235,7 +243,7 @@ export function DifferentSizes() {
|
|
|
235
243
|
color={`hsl(${i * 90}, 70%, 60%)`}
|
|
236
244
|
/>
|
|
237
245
|
))}
|
|
238
|
-
</
|
|
246
|
+
</GridComponent>
|
|
239
247
|
</div>
|
|
240
248
|
</div>
|
|
241
249
|
</StyleBox>
|
|
@@ -245,7 +253,7 @@ export function DifferentSizes() {
|
|
|
245
253
|
export function WithCircles() {
|
|
246
254
|
return (
|
|
247
255
|
<StyleBox>
|
|
248
|
-
<
|
|
256
|
+
<GridComponent itemWidth={100} itemHeight={100} columnAmount={5}>
|
|
249
257
|
<Circle size="80px" color="#ff6b6b" />
|
|
250
258
|
<Circle size="80px" color="#4ecdc4" />
|
|
251
259
|
<Circle size="80px" color="#45b7d1" />
|
|
@@ -254,7 +262,7 @@ export function WithCircles() {
|
|
|
254
262
|
<Circle size="80px" color="#ff9ff3" />
|
|
255
263
|
<Circle size="80px" color="#a55eea" />
|
|
256
264
|
<Circle size="80px" color="#fd79a8" />
|
|
257
|
-
</
|
|
265
|
+
</GridComponent>
|
|
258
266
|
</StyleBox>
|
|
259
267
|
);
|
|
260
268
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React, { HTMLAttributes } from 'react';
|
|
3
3
|
import { CommonProps } from '../../stacks/types/common.js';
|
|
4
4
|
import styles from './grid.module.css';
|
|
@@ -108,12 +108,7 @@ export const Grid = React.forwardRef(function Grid(
|
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
return (
|
|
111
|
-
<As
|
|
112
|
-
ref={ref}
|
|
113
|
-
className={classNames(styles.grid, className)}
|
|
114
|
-
style={gridStyles}
|
|
115
|
-
{...attr}
|
|
116
|
-
>
|
|
111
|
+
<As ref={ref} className={clsx(styles.grid, className)} style={gridStyles} {...attr}>
|
|
117
112
|
{children}
|
|
118
113
|
</As>
|
|
119
114
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
4
4
|
import type { Hierarchy, Size } from '../../utils/index.js';
|
|
5
5
|
import styles from './header.module.css';
|
|
@@ -25,7 +25,7 @@ export const Header = React.forwardRef<HTMLElement, HeaderProps>(function Header
|
|
|
25
25
|
<HStack
|
|
26
26
|
ref={ref}
|
|
27
27
|
as="header"
|
|
28
|
-
className={
|
|
28
|
+
className={clsx(styles.header, className, 'tcn-header', 'header')}
|
|
29
29
|
data-hierarchy={hierarchy}
|
|
30
30
|
data-size={size}
|
|
31
31
|
height={height}
|
package/src/layouts/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './body/h_body.js';
|
|
2
|
+
export * from './body/v_body.js';
|
|
1
3
|
export * from './column/column.js';
|
|
2
4
|
export * from './divider/divider.js';
|
|
3
5
|
export * from './footer/footer.js';
|
|
@@ -8,5 +10,4 @@ export * from './list/list.js';
|
|
|
8
10
|
export * from './list/section_header.js';
|
|
9
11
|
export * from './sidebar_end/sidebar_end.js';
|
|
10
12
|
export * from './sidebar_start/sidebar_start.js';
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './body/v_body.js';
|
|
13
|
+
export * from './utility_bar/utility_bar.js';
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface ItemProps extends Omit<HStackProps, 'as' | 'children'> {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
|
+
selected?: boolean;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export const Item = React.forwardRef<HTMLDivElement, ItemProps>(function Item(
|
|
10
|
-
{ children, className, ...props }: ItemProps,
|
|
11
|
+
{ children, className, selected = false, ...props }: ItemProps,
|
|
11
12
|
ref
|
|
12
13
|
) {
|
|
13
14
|
return (
|
|
14
|
-
<HStack
|
|
15
|
+
<HStack
|
|
16
|
+
ref={ref}
|
|
17
|
+
as="li"
|
|
18
|
+
data-hierarchy={selected ? 'primary' : 'tertiary'}
|
|
19
|
+
data-is-selected={selected}
|
|
20
|
+
className={clsx('tcn-item', 'tcn-interactive', className)}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
15
23
|
{children}
|
|
16
24
|
</HStack>
|
|
17
25
|
);
|