@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
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Meta } from '@storybook/react-vite';
|
|
3
3
|
import { Circle } from './story_components/circle.js';
|
|
4
|
-
import { HStack, HStackProps } from './h_stack.js';
|
|
5
|
-
import { HorizontalBorder } from './story_components/horizontal_border.js';
|
|
4
|
+
import { HStack as HStackComponent, type HStackProps } from './h_stack.js';
|
|
6
5
|
import { Spacer } from './spacer.js';
|
|
7
6
|
import { Rect } from './story_components/rect.js';
|
|
8
|
-
import {
|
|
7
|
+
import { StyleBox } from './story_components/style_box.js';
|
|
9
8
|
|
|
10
9
|
const meta: Meta<HStackProps> = {
|
|
11
|
-
title: 'HStack',
|
|
12
|
-
component:
|
|
10
|
+
title: 'Stacks/HStack',
|
|
11
|
+
component: HStackComponent,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component:
|
|
17
|
+
'A horizontal stack component that can be used to arrange elements horizontally.',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
13
21
|
args: {
|
|
14
|
-
minWidth: '400px',
|
|
15
22
|
width: '400px',
|
|
16
|
-
maxWidth: '400px',
|
|
17
|
-
minHeight: '150px',
|
|
18
23
|
height: '150px',
|
|
19
|
-
maxHeight: '150px',
|
|
20
24
|
},
|
|
21
25
|
argTypes: {
|
|
22
26
|
as: { table: { disable: true } },
|
|
@@ -26,12 +30,12 @@ const meta: Meta<HStackProps> = {
|
|
|
26
30
|
inline: { table: { disable: true } },
|
|
27
31
|
style: { table: { disable: true } },
|
|
28
32
|
overflowX: {
|
|
29
|
-
options: ['auto', 'hidden', 'visible'],
|
|
30
|
-
control: { type: '
|
|
33
|
+
options: [undefined, 'auto', 'scroll', 'hidden', 'visible'],
|
|
34
|
+
control: { type: 'select' },
|
|
31
35
|
},
|
|
32
36
|
overflowY: {
|
|
33
|
-
options: [
|
|
34
|
-
control: { type: '
|
|
37
|
+
options: [undefined, 'hidden', 'visible'],
|
|
38
|
+
control: { type: 'select' },
|
|
35
39
|
},
|
|
36
40
|
vAlign: {
|
|
37
41
|
options: ['start', 'center', 'end'],
|
|
@@ -41,67 +45,108 @@ const meta: Meta<HStackProps> = {
|
|
|
41
45
|
options: ['start', 'center', 'end'],
|
|
42
46
|
control: { type: 'radio' },
|
|
43
47
|
},
|
|
48
|
+
width: {
|
|
49
|
+
control: { type: 'text' },
|
|
50
|
+
},
|
|
51
|
+
minWidth: {
|
|
52
|
+
control: { type: 'text' },
|
|
53
|
+
},
|
|
54
|
+
maxWidth: {
|
|
55
|
+
control: { type: 'text' },
|
|
56
|
+
},
|
|
57
|
+
height: {
|
|
58
|
+
control: { type: 'text' },
|
|
59
|
+
},
|
|
60
|
+
minHeight: {
|
|
61
|
+
control: { type: 'text' },
|
|
62
|
+
},
|
|
63
|
+
maxHeight: {
|
|
64
|
+
control: { type: 'text' },
|
|
65
|
+
},
|
|
66
|
+
allowFlow: {
|
|
67
|
+
control: { type: 'boolean' },
|
|
68
|
+
},
|
|
69
|
+
gap: {
|
|
70
|
+
control: { type: 'text' },
|
|
71
|
+
},
|
|
72
|
+
growWeight: {
|
|
73
|
+
control: { type: 'number' },
|
|
74
|
+
},
|
|
75
|
+
shrinkWeight: {
|
|
76
|
+
control: { type: 'number' },
|
|
77
|
+
},
|
|
44
78
|
},
|
|
45
79
|
};
|
|
46
80
|
|
|
47
81
|
export default meta;
|
|
48
82
|
|
|
49
|
-
export function
|
|
83
|
+
export function HStack(props: HStackProps) {
|
|
50
84
|
return (
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</HorizontalBorder>
|
|
66
|
-
</ZStack>
|
|
85
|
+
<StyleBox border="1px dashed #ccc" backgroundColor="white">
|
|
86
|
+
<HStackComponent {...props}>
|
|
87
|
+
<Rect
|
|
88
|
+
width="75px"
|
|
89
|
+
height="75px"
|
|
90
|
+
onClick={() => {
|
|
91
|
+
// biome-ignore lint/suspicious/noConsole: Storybook
|
|
92
|
+
console.log('hello');
|
|
93
|
+
}}
|
|
94
|
+
/>
|
|
95
|
+
<Spacer width="25px" />
|
|
96
|
+
<Circle size="75px" />
|
|
97
|
+
</HStackComponent>
|
|
98
|
+
</StyleBox>
|
|
67
99
|
);
|
|
68
100
|
}
|
|
69
101
|
|
|
102
|
+
HStack.storyName = 'HStack';
|
|
103
|
+
|
|
70
104
|
export function ManyChildren(props: HStackProps) {
|
|
71
105
|
return (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
106
|
+
<StyleBox
|
|
107
|
+
border="1px dashed #ccc"
|
|
108
|
+
backgroundColor="white"
|
|
109
|
+
width="100%"
|
|
110
|
+
overflowX="auto"
|
|
111
|
+
>
|
|
112
|
+
<HStackComponent height="auto" {...props}>
|
|
113
|
+
<Rect width="75px" height="75px" />
|
|
114
|
+
<Spacer width="25px" />
|
|
115
|
+
<Circle size="75px" />
|
|
116
|
+
<Spacer width="25px" />
|
|
117
|
+
<Rect width="75px" height="75px" />
|
|
118
|
+
<Spacer width="25px" />
|
|
119
|
+
<Circle size="75px" />
|
|
120
|
+
<Spacer width="25px" />
|
|
121
|
+
<Rect width="75px" height="75px" />
|
|
122
|
+
<Spacer width="25px" />
|
|
123
|
+
<Circle size="75px" />
|
|
124
|
+
<Spacer width="25px" />
|
|
125
|
+
<Rect width="75px" height="75px" />
|
|
126
|
+
<Spacer width="25px" />
|
|
127
|
+
<Circle size="75px" />
|
|
128
|
+
<Spacer width="25px" />
|
|
129
|
+
<Rect width="75px" height="75px" />
|
|
130
|
+
<Spacer width="25px" />
|
|
131
|
+
<Circle size="75px" />
|
|
132
|
+
</HStackComponent>
|
|
133
|
+
</StyleBox>
|
|
97
134
|
);
|
|
98
135
|
}
|
|
99
136
|
|
|
100
137
|
export function Padding() {
|
|
101
138
|
return (
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
139
|
+
<StyleBox
|
|
140
|
+
border="1px dashed #ccc"
|
|
141
|
+
backgroundColor="white"
|
|
142
|
+
width="100%"
|
|
143
|
+
overflowX="auto"
|
|
144
|
+
>
|
|
145
|
+
{' '}
|
|
146
|
+
<HStackComponent height="auto" padding="30px">
|
|
147
|
+
<Circle></Circle>
|
|
148
|
+
<Circle></Circle>
|
|
149
|
+
</HStackComponent>
|
|
150
|
+
</StyleBox>
|
|
106
151
|
);
|
|
107
152
|
}
|
package/src/stacks/h_stack.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React, { HTMLAttributes } from 'react';
|
|
3
3
|
import { removeUndefinedProperties } from './utils/remove_undefined_properties.js';
|
|
4
4
|
import { CommonProps } from './types/common.js';
|
|
@@ -96,7 +96,7 @@ export const HStack = React.forwardRef(function HStack<T extends HTMLElement>(
|
|
|
96
96
|
return (
|
|
97
97
|
<As
|
|
98
98
|
ref={ref}
|
|
99
|
-
className={
|
|
99
|
+
className={clsx(styles['h-stack'], className, 'h-stack', 'stack')}
|
|
100
100
|
style={finalStyles}
|
|
101
101
|
data-inline={Boolean(inline)}
|
|
102
102
|
data-allow-flow={Boolean(allowFlow)}
|
package/src/stacks/spacer.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
export interface SpacerProps {
|
|
@@ -41,7 +41,7 @@ export const Spacer = React.forwardRef<HTMLDivElement, SpacerProps>(function Spa
|
|
|
41
41
|
zIndex: 1,
|
|
42
42
|
flex,
|
|
43
43
|
}}
|
|
44
|
-
className={
|
|
44
|
+
className={clsx('spacer', className)}
|
|
45
45
|
></div>
|
|
46
46
|
);
|
|
47
47
|
});
|
|
@@ -20,7 +20,8 @@ HStack CSS
|
|
|
20
20
|
display: inline-grid;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.box[data-height="flex"]
|
|
23
|
+
.box[data-height="flex"],
|
|
24
|
+
.box[data-height="fill"] {
|
|
24
25
|
height: auto;
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -127,13 +128,30 @@ HStack CSS
|
|
|
127
128
|
:where(.h-stack > .h-stack[data-width="flex"]),
|
|
128
129
|
:where(.h-stack > .z-stack[data-width="flex"]),
|
|
129
130
|
:where(.h-stack > .v-stack[data-width="flex"]),
|
|
130
|
-
:where(.h-stack > .stack-flex[data-width="flex"])
|
|
131
|
+
:where(.h-stack > .stack-flex[data-width="flex"]),
|
|
132
|
+
:where(.h-stack > .h-stack[data-width="fill"]),
|
|
133
|
+
:where(.h-stack > .z-stack[data-width="fill"]),
|
|
134
|
+
:where(.h-stack > .v-stack[data-width="fill"]),
|
|
135
|
+
:where(.h-stack > .stack-flex[data-width="fill"]),
|
|
136
|
+
:where(.h-stack > .box[data-width="fill"]) {
|
|
131
137
|
flex-grow: 1;
|
|
132
138
|
flex-shrink: 0;
|
|
133
139
|
flex-basis: 0%;
|
|
134
140
|
width: auto;
|
|
135
141
|
}
|
|
136
142
|
|
|
143
|
+
:where(.h-stack > .h-stack[data-height="flex"]),
|
|
144
|
+
:where(.h-stack > .z-stack[data-height="flex"]),
|
|
145
|
+
:where(.h-stack > .v-stack[data-height="flex"]),
|
|
146
|
+
:where(.h-stack > .stack-flex[data-height="flex"]),
|
|
147
|
+
:where(.h-stack > .h-stack[data-height="fill"]),
|
|
148
|
+
:where(.h-stack > .z-stack[data-height="fill"]),
|
|
149
|
+
:where(.h-stack > .v-stack[data-height="fill"]),
|
|
150
|
+
:where(.h-stack > .stack-flex[data-height="fill"]),
|
|
151
|
+
:where(.h-stack > .box[data-height="fill"]) {
|
|
152
|
+
height: 100%;
|
|
153
|
+
}
|
|
154
|
+
|
|
137
155
|
:where(.reveal-layout .h-stack:after),
|
|
138
156
|
:where(.reveal-h-stack .h-stack:after) {
|
|
139
157
|
content: "";
|
|
@@ -189,17 +207,38 @@ HStack CSS
|
|
|
189
207
|
:where(.v-stack > .h-stack[data-height="flex"]),
|
|
190
208
|
:where(.v-stack > .z-stack[data-height="flex"]),
|
|
191
209
|
:where(.v-stack > .v-stack[data-height="flex"]),
|
|
192
|
-
:where(.v-stack > .stack-flex[data-height="flex"])
|
|
210
|
+
:where(.v-stack > .stack-flex[data-height="flex"]),
|
|
211
|
+
:where(.v-stack > .h-stack[data-height="fill"]),
|
|
212
|
+
:where(.v-stack > .z-stack[data-height="fill"]),
|
|
213
|
+
:where(.v-stack > .v-stack[data-height="fill"]),
|
|
214
|
+
:where(.v-stack > .stack-flex[data-height="fill"]),
|
|
215
|
+
:where(.v-stack > .box[data-height="fill"]) {
|
|
193
216
|
flex-grow: 1;
|
|
194
217
|
flex-shrink: 0;
|
|
195
218
|
flex-basis: 0%;
|
|
196
219
|
height: auto;
|
|
197
220
|
}
|
|
198
221
|
|
|
222
|
+
:where(.v-stack > .h-stack[data-width="flex"]),
|
|
223
|
+
:where(.v-stack > .z-stack[data-width="flex"]),
|
|
224
|
+
:where(.v-stack > .v-stack[data-width="flex"]),
|
|
225
|
+
:where(.v-stack > .stack-flex[data-width="flex"]),
|
|
226
|
+
:where(.v-stack > .h-stack[data-width="fill"]),
|
|
227
|
+
:where(.v-stack > .z-stack[data-width="fill"]),
|
|
228
|
+
:where(.v-stack > .v-stack[data-width="fill"]),
|
|
229
|
+
:where(.v-stack > .stack-flex[data-width="fill"]),
|
|
230
|
+
:where(.v-stack > .box[data-width="fill"]) {
|
|
231
|
+
width: 100%;
|
|
232
|
+
}
|
|
233
|
+
|
|
199
234
|
:where(.v-stack[data-height="auto"] > .h-stack[data-height="flex"]),
|
|
200
235
|
:where(.v-stack[data-height="auto"] > .z-stack[data-height="flex"]),
|
|
201
236
|
:where(.v-stack[data-height="auto"] > .v-stack[data-height="flex"]),
|
|
202
|
-
:where(.v-stack[data-height="auto"] > .stack-flex[data-height="flex"])
|
|
237
|
+
:where(.v-stack[data-height="auto"] > .stack-flex[data-height="flex"]),
|
|
238
|
+
:where(.v-stack[data-height="auto"] > .h-stack[data-height="fill"]),
|
|
239
|
+
:where(.v-stack[data-height="auto"] > .z-stack[data-height="fill"]),
|
|
240
|
+
:where(.v-stack[data-height="auto"] > .v-stack[data-height="fill"]),
|
|
241
|
+
:where(.v-stack[data-height="auto"] > .stack-flex[data-height="fill"]) {
|
|
203
242
|
flex-basis: auto;
|
|
204
243
|
}
|
|
205
244
|
|
|
@@ -259,12 +298,18 @@ ZStack CSS
|
|
|
259
298
|
|
|
260
299
|
:where(.z-stack > .h-stack[data-height="flex"]),
|
|
261
300
|
:where(.z-stack > .v-stack[data-height="flex"]),
|
|
301
|
+
:where(.z-stack > .h-stack[data-height="fill"]),
|
|
302
|
+
:where(.z-stack > .v-stack[data-height="fill"]),
|
|
303
|
+
:where(.z-stack > .stack-flex[data-height="fill"]),
|
|
262
304
|
:where(.z-stack > .stack-flex[data-height="default"]) {
|
|
263
305
|
height: 100%;
|
|
264
306
|
}
|
|
265
307
|
|
|
266
308
|
:where(.z-stack > .h-stack[data-width="flex"]),
|
|
267
309
|
:where(.z-stack > .v-stack[data-width="flex"]),
|
|
310
|
+
:where(.z-stack > .h-stack[data-width="fill"]),
|
|
311
|
+
:where(.z-stack > .v-stack[data-width="fill"]),
|
|
312
|
+
:where(.z-stack > .stack-flex[data-width="fill"]),
|
|
268
313
|
:where(.z-stack > .stack-flex[data-width="default"]) {
|
|
269
314
|
width: 100%;
|
|
270
315
|
}
|
|
@@ -311,7 +356,11 @@ Defaults CSS
|
|
|
311
356
|
:where(.h-stack[data-width="auto"] > .h-stack[data-width="flex"]),
|
|
312
357
|
:where(.h-stack[data-width="auto"] > .z-stack[data-width="flex"]),
|
|
313
358
|
:where(.h-stack[data-width="auto"] > .v-stack[data-width="flex"]),
|
|
314
|
-
:where(.h-stack[data-width="auto"] > .stack-flex[data-width="flex"])
|
|
359
|
+
:where(.h-stack[data-width="auto"] > .stack-flex[data-width="flex"]),
|
|
360
|
+
:where(.h-stack[data-width="auto"] > .h-stack[data-width="fill"]),
|
|
361
|
+
:where(.h-stack[data-width="auto"] > .z-stack[data-width="fill"]),
|
|
362
|
+
:where(.h-stack[data-width="auto"] > .v-stack[data-width="fill"]),
|
|
363
|
+
:where(.h-stack[data-width="auto"] > .stack-flex[data-width="fill"]) {
|
|
315
364
|
flex-basis: auto;
|
|
316
365
|
}
|
|
317
366
|
|
package/src/stacks/stacks.mdx
CHANGED
|
@@ -34,14 +34,14 @@ Here is the list of components that you will use with stacks:
|
|
|
34
34
|
### HStack
|
|
35
35
|
|
|
36
36
|
This example uses `HStack` to arrange elements horizontally. It places a `Box` on either
|
|
37
|
-
side and a `Box` with width set to `
|
|
38
|
-
components are set to occupy 25% of the width each, while the `Box` with width set to `
|
|
37
|
+
side and a `Box` with width set to `fill` in the middle, creating a simple, evenly spaced layout. The `Box`
|
|
38
|
+
components are set to occupy 25% of the width each, while the `Box` with width set to `fill` automatically
|
|
39
39
|
takes up the remaining space.
|
|
40
40
|
|
|
41
41
|
<StyleBox height="auto" padding="10px" border="1px solid #ccc">
|
|
42
42
|
<HStack height="100px">
|
|
43
43
|
<Rect color="#abdef0" width="25%">25%</Rect>
|
|
44
|
-
<Rect color="#89d9c8" width="
|
|
44
|
+
<Rect color="#89d9c8" width="fill">fill</Rect>
|
|
45
45
|
<Rect color="#abdef0" width="25%">25%</Rect>
|
|
46
46
|
</HStack>
|
|
47
47
|
</StyleBox>
|
|
@@ -49,22 +49,22 @@ takes up the remaining space.
|
|
|
49
49
|
```tsx
|
|
50
50
|
<HStack height="100px">
|
|
51
51
|
<Box width="25%">25%</Box>
|
|
52
|
-
<Box width="
|
|
52
|
+
<Box width="fill">fill</Box>
|
|
53
53
|
<Box width="25%">25%</Box>
|
|
54
54
|
</HStack>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
---
|
|
58
58
|
|
|
59
|
-
Here, two `Box` components with width set to `
|
|
60
|
-
evenly share the available space between them, making it ideal for creating
|
|
59
|
+
Here, two `Box` components with width set to `fill` are placed between `Box` elements. Each `Box` will
|
|
60
|
+
evenly share the available space between them, making it ideal for creating fillible
|
|
61
61
|
layouts where multiple components need equal space.
|
|
62
62
|
|
|
63
63
|
<StyleBox height="auto" padding="10px" border="1px solid #ccc">
|
|
64
64
|
<HStack height="100px">
|
|
65
65
|
<Rect color="#abdef0" width="25%">25%</Rect>
|
|
66
|
-
<Rect color="#89d9c8" width="
|
|
67
|
-
<Rect color="#89d9c8" width="
|
|
66
|
+
<Rect color="#89d9c8" width="fill">fill</Rect>
|
|
67
|
+
<Rect color="#89d9c8" width="fill">fill</Rect>
|
|
68
68
|
<Rect color="#abdef0" width="25%">25%</Rect>
|
|
69
69
|
</HStack>
|
|
70
70
|
</StyleBox>
|
|
@@ -72,15 +72,15 @@ layouts where multiple components need equal space.
|
|
|
72
72
|
```tsx
|
|
73
73
|
<HStack height="100px">
|
|
74
74
|
<Box width="25%">25%</Box>
|
|
75
|
-
<Box width="
|
|
76
|
-
<Box width="
|
|
75
|
+
<Box width="fill">fill</Box>
|
|
76
|
+
<Box width="fill">fill</Box>
|
|
77
77
|
<Box width="25%">25%</Box>
|
|
78
78
|
</HStack>
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
|
|
83
|
-
Using `Spacer` components between the `Box` components with width set to `
|
|
83
|
+
Using `Spacer` components between the `Box` components with width set to `fill` evenly distributes space
|
|
84
84
|
between the elements. This is useful when you want to create consistent gaps between
|
|
85
85
|
components without needing to specify exact widths.
|
|
86
86
|
|
|
@@ -88,9 +88,9 @@ components without needing to specify exact widths.
|
|
|
88
88
|
<HStack height="100px">
|
|
89
89
|
<Rect color="#abdef0" width="25%">25%</Rect>
|
|
90
90
|
<Spacer />
|
|
91
|
-
<Rect color="#89d9c8" width="
|
|
91
|
+
<Rect color="#89d9c8" width="fill">fill</Rect>
|
|
92
92
|
<Spacer />
|
|
93
|
-
<Rect color="#89d9c8" width="
|
|
93
|
+
<Rect color="#89d9c8" width="fill">fill</Rect>
|
|
94
94
|
<Spacer />
|
|
95
95
|
<Rect color="#abdef0" width="25%">25%</Rect>
|
|
96
96
|
</HStack>
|
|
@@ -100,9 +100,9 @@ components without needing to specify exact widths.
|
|
|
100
100
|
<HStack height="100px">
|
|
101
101
|
<Box width="25%">25%</Box>
|
|
102
102
|
<Spacer />
|
|
103
|
-
<Box width="
|
|
103
|
+
<Box width="fill">fill</Box>
|
|
104
104
|
<Spacer />
|
|
105
|
-
<Box width="
|
|
105
|
+
<Box width="fill">fill</Box>
|
|
106
106
|
<Spacer />
|
|
107
107
|
<Box width="25%">25%</Box>
|
|
108
108
|
</HStack>
|
|
@@ -118,9 +118,9 @@ automatically fill the available space.
|
|
|
118
118
|
<HStack height="100px">
|
|
119
119
|
<Rect width="25%" color="#abdef0">25%</Rect>
|
|
120
120
|
<Spacer width="10px" />
|
|
121
|
-
<Rect width="
|
|
121
|
+
<Rect width="fill" color="#89d9c8">fill</Rect>
|
|
122
122
|
<Spacer width="10px" />
|
|
123
|
-
<Rect width="
|
|
123
|
+
<Rect width="fill" color="#89d9c8">fill</Rect>
|
|
124
124
|
<Spacer width="10px" />
|
|
125
125
|
<Rect width="25%" color="#abdef0">25%</Rect>
|
|
126
126
|
</HStack>
|
|
@@ -130,9 +130,9 @@ automatically fill the available space.
|
|
|
130
130
|
<HStack height="100px">
|
|
131
131
|
<Box width="25%">25%</Box>
|
|
132
132
|
<Spacer width="10px" />
|
|
133
|
-
<Box width="
|
|
133
|
+
<Box width="fill">fill</Box>
|
|
134
134
|
<Spacer width="10px" />
|
|
135
|
-
<Box width="
|
|
135
|
+
<Box width="fill">fill</Box>
|
|
136
136
|
<Spacer width="10px" />
|
|
137
137
|
<Box width="25%">25%</Box>
|
|
138
138
|
</HStack>
|
|
@@ -143,13 +143,13 @@ automatically fill the available space.
|
|
|
143
143
|
### VStack
|
|
144
144
|
|
|
145
145
|
This example uses `VStack` to arrange elements vertically. The `Box` components at the top
|
|
146
|
-
and bottom occupy 25% of the height each, while the `Box` with height set to `
|
|
146
|
+
and bottom occupy 25% of the height each, while the `Box` with height set to `fill` fills the remaining space,
|
|
147
147
|
making it ideal for creating header-body-footer layouts.
|
|
148
148
|
|
|
149
149
|
<StyleBox height="400px" padding="10px" border="1px solid #ccc">
|
|
150
150
|
<VStack height="100%">
|
|
151
151
|
<Rect height="25%" color="#abdef0">25%</Rect>
|
|
152
|
-
<Rect height="
|
|
152
|
+
<Rect height="fill" color="#89d9c8">fill</Rect>
|
|
153
153
|
<Rect height="25%" color="#abdef0">25%</Rect>
|
|
154
154
|
</VStack>
|
|
155
155
|
</StyleBox>
|
|
@@ -157,7 +157,7 @@ making it ideal for creating header-body-footer layouts.
|
|
|
157
157
|
```tsx
|
|
158
158
|
<VStack height="100%">
|
|
159
159
|
<Box height="25%">25%</Box>
|
|
160
|
-
<Box height="
|
|
160
|
+
<Box height="fill">fill</Box>
|
|
161
161
|
<Box height="25%">25%</Box>
|
|
162
162
|
</VStack>
|
|
163
163
|
```
|
|
@@ -170,7 +170,7 @@ prop to create consistent gaps between the header, body, and footer sections.
|
|
|
170
170
|
<StyleBox height="400px" width="100%" padding="10px" border="1px solid #ccc">
|
|
171
171
|
<VStack height="100%" gap="10px">
|
|
172
172
|
<Rect height="40px" color="#abdef0">Header</Rect>
|
|
173
|
-
<Rect height="
|
|
173
|
+
<Rect height="fill" color="#ededed">Body</Rect>
|
|
174
174
|
<Rect height="40px" color="#abdef0">Footer</Rect>
|
|
175
175
|
</VStack>
|
|
176
176
|
</StyleBox>
|
|
@@ -178,7 +178,7 @@ prop to create consistent gaps between the header, body, and footer sections.
|
|
|
178
178
|
```tsx
|
|
179
179
|
<VStack height="100%" gap="10px">
|
|
180
180
|
<Box height="40px">Header</Box>
|
|
181
|
-
<Box height="
|
|
181
|
+
<Box height="fill">Body</Box>
|
|
182
182
|
<Box height="40px">Footer</Box>
|
|
183
183
|
</VStack>
|
|
184
184
|
```
|
|
@@ -192,9 +192,9 @@ between the header, sidebar, and footer sections.
|
|
|
192
192
|
<StyleBox height="400px" width="100%" padding="10px" border="1px solid #ccc">
|
|
193
193
|
<VStack height="100%" gap="10px">
|
|
194
194
|
<Rect height="40px" color="#abdef0">Header</Rect>
|
|
195
|
-
<HStack height="
|
|
195
|
+
<HStack height="fill" gap="10px">
|
|
196
196
|
<Rect width="200px" minWidth="200px" height="100%" zIndex="1" enableResizeOnEnd color="#ededed">Sidebar</Rect>
|
|
197
|
-
<Rect width="
|
|
197
|
+
<Rect width="fill" height="100%" color="#ededed">
|
|
198
198
|
<VStack width="100%" height="100%" overflowY="auto">
|
|
199
199
|
<Grid itemHeight={100} itemWidth={100} columnAmount={4} gap="10px" padding="10px">
|
|
200
200
|
<Rect width="100%" height="100%" color="#abdef0">1</Rect>
|
|
@@ -218,9 +218,9 @@ between the header, sidebar, and footer sections.
|
|
|
218
218
|
```tsx
|
|
219
219
|
<VStack height="100%" gap="10px">
|
|
220
220
|
<Box height="40px">Header</Box>
|
|
221
|
-
<HStack height="
|
|
221
|
+
<HStack height="fill" gap="10px">
|
|
222
222
|
<Box width="200px" minWidth="200px" height="100%" zIndex="1" enableResizeOnEnd>Sidebar</Box>
|
|
223
|
-
<VStack width="
|
|
223
|
+
<VStack width="fill" height="100%" overflowY="auto">
|
|
224
224
|
<Grid itemHeight={100} itemWidth={100} columnAmount={4} gap="10px" padding="10px">
|
|
225
225
|
<Box width="100%" height="100%">1</Box>
|
|
226
226
|
<Box width="100%" height="100%">2</Box>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ZStack, ZStackProps } from '../z_stack.js';
|
|
3
3
|
import styles from './circle.module.css';
|
|
4
|
-
import
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
5
|
|
|
6
6
|
export interface CircleProps extends ZStackProps {
|
|
7
7
|
color?: string;
|
|
@@ -23,7 +23,7 @@ export const Circle = React.forwardRef(function Circle(
|
|
|
23
23
|
style={finalStyle}
|
|
24
24
|
width={size}
|
|
25
25
|
height={size}
|
|
26
|
-
className={
|
|
26
|
+
className={clsx(className, styles['circle'])}
|
|
27
27
|
{...props}
|
|
28
28
|
/>
|
|
29
29
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from 'react';
|
|
2
2
|
import styles from './picture_placeholder.module.css';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface PicturePlaceholderProps extends HTMLAttributes<SVGSVGElement> {
|
|
6
6
|
color?: string;
|
|
@@ -29,7 +29,7 @@ export const PicturePlaceholder = React.forwardRef(function PicturePlaceholder(
|
|
|
29
29
|
height={size}
|
|
30
30
|
viewBox="0 0 16 16"
|
|
31
31
|
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
-
className={
|
|
32
|
+
className={clsx(className, styles['picture-placeholder'])}
|
|
33
33
|
style={finalStyle}
|
|
34
34
|
{...props}
|
|
35
35
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box, BoxProps } from '../box/box.js';
|
|
3
3
|
import styles from './rect.module.css';
|
|
4
|
-
import
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
5
|
|
|
6
6
|
export interface RectProps extends BoxProps {
|
|
7
7
|
color?: string;
|
|
@@ -27,7 +27,7 @@ export const Rect = React.forwardRef(function Rect(
|
|
|
27
27
|
<Box
|
|
28
28
|
ref={ref}
|
|
29
29
|
style={finalStyle}
|
|
30
|
-
className={
|
|
30
|
+
className={clsx(className, styles['rect'])}
|
|
31
31
|
width={width}
|
|
32
32
|
height={height}
|
|
33
33
|
{...props}
|
|
@@ -3,10 +3,10 @@ import { Alignment } from './alignment.js';
|
|
|
3
3
|
export interface StackStyleProps {
|
|
4
4
|
hAlign?: Alignment;
|
|
5
5
|
vAlign?: Alignment;
|
|
6
|
-
width?: 'default' | 'flex' | 'auto' | string | number;
|
|
6
|
+
width?: 'default' | 'flex' | 'auto' | 'fill' | string | number;
|
|
7
7
|
minWidth?: string | number;
|
|
8
8
|
maxWidth?: string | number;
|
|
9
|
-
height?: 'default' | 'flex' | 'auto' | string | number;
|
|
9
|
+
height?: 'default' | 'flex' | 'auto' | 'fill' | string | number;
|
|
10
10
|
minHeight?: string | number;
|
|
11
11
|
maxHeight?: string | number;
|
|
12
12
|
growWeight?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useLayoutEffect } from 'react';
|
|
2
2
|
import { useForkRef } from '../utils/index.js';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
import { Box, BoxProps } from './box/box.js';
|
|
5
5
|
import styles from './collapsible_box.module.css';
|
|
6
6
|
import { useIsCollapsed } from './utils/use_is_collapsed.js';
|
|
@@ -41,7 +41,7 @@ export const VCollapsibleBox = React.forwardRef(function CollapsibleBox(
|
|
|
41
41
|
collapsibleRef.current?.style.setProperty('--collapsible-size', `${height}px`);
|
|
42
42
|
props.onHeightResizeEnd?.(height);
|
|
43
43
|
}}
|
|
44
|
-
className={
|
|
44
|
+
className={clsx(props.className, styles['collapsible-box'])}
|
|
45
45
|
children={children}
|
|
46
46
|
/>
|
|
47
47
|
);
|