@tcn/ui 0.3.1 → 0.3.3
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/README.md +2 -1
- package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
- package/dist/actions/button/base_button/base_button.js +18 -18
- package/dist/actions/button/base_button/base_button.js.map +1 -1
- package/dist/actions/button/button_group/button_group.d.ts +1 -1
- package/dist/actions/button/button_group/button_group.d.ts.map +1 -1
- package/dist/actions/button/button_group/button_group.js +10 -7
- package/dist/actions/button/button_group/button_group.js.map +1 -1
- package/dist/actions/button/select_group/select_group.js +2 -2
- package/dist/actions/button/select_group/select_group.js.map +1 -1
- package/dist/badge.css +1 -1
- package/dist/base_button.css +1 -1
- package/dist/body_text.css +1 -1
- package/dist/bottom_resize_handle.css +1 -1
- package/dist/bubble.css +1 -1
- package/dist/button.css +1 -1
- package/dist/button_group.css +1 -1
- package/dist/callout.css +1 -1
- package/dist/caption.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/chip.css +1 -1
- package/dist/circle.css +1 -1
- package/dist/collapsible_box.css +1 -1
- package/dist/color_input.css +1 -1
- package/dist/color_picker.css +1 -1
- package/dist/column.css +1 -1
- package/dist/confirm.css +1 -1
- package/dist/css/layers.css +1 -0
- package/dist/date_picker.css +1 -1
- package/dist/date_picker_date.css +1 -1
- package/dist/date_picker_day.css +1 -1
- package/dist/date_picker_header.css +1 -1
- package/dist/date_picker_input.css +1 -1
- package/dist/date_picker_time_selector.css +1 -1
- package/dist/date_picker_year_input.css +1 -1
- package/dist/date_picker_year_selector.css +1 -1
- package/dist/divider.css +1 -1
- package/dist/draggable.css +1 -1
- package/dist/drawer_bottom.css +1 -1
- package/dist/drawer_end.css +1 -1
- package/dist/drawer_start.css +1 -1
- package/dist/drawer_top.css +1 -1
- package/dist/end_resize_handle.css +1 -1
- package/dist/feedback/progress/progress_bar.d.ts.map +1 -1
- package/dist/feedback/progress/progress_bar.js +34 -26
- package/dist/feedback/progress/progress_bar.js.map +1 -1
- package/dist/field_control.css +1 -1
- package/dist/field_set.css +1 -1
- package/dist/footer.css +1 -1
- package/dist/footnote.css +1 -1
- package/dist/form/field/common/field_control/field_control.js +9 -9
- package/dist/form/field/common/field_control/field_control.js.map +1 -1
- package/dist/form/field/common/field_description.js +3 -3
- package/dist/form/field/common/field_description.js.map +1 -1
- package/dist/form/field/common/field_error.js +16 -8
- package/dist/form/field/common/field_error.js.map +1 -1
- package/dist/form/field/common/field_header.js +7 -7
- package/dist/form/field/common/field_header.js.map +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 +15 -9
- package/dist/form/field/common/status_input/status_input.js.map +1 -1
- package/dist/form/field/h_field/h_field.js +1 -1
- package/dist/form/field/h_field/h_field.js.map +1 -1
- package/dist/form/field/v_field/v_field.js +5 -5
- 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 +17 -10
- package/dist/form/field_set/field_set.js.map +1 -1
- package/dist/frame.css +1 -1
- package/dist/grid.css +1 -1
- package/dist/h_body.css +1 -1
- package/dist/h_field.css +1 -1
- package/dist/h_panel.css +1 -1
- package/dist/header.css +1 -1
- package/dist/headline.css +1 -1
- package/dist/input.css +1 -1
- package/dist/inputs/checkbox/checkbox.js +14 -14
- package/dist/inputs/checkbox/checkbox.js.map +1 -1
- package/dist/inputs/checkbox/checkbox_row.d.ts +1 -1
- package/dist/inputs/checkbox/checkbox_row.d.ts.map +1 -1
- package/dist/inputs/checkbox/checkbox_row.js +19 -8
- package/dist/inputs/checkbox/checkbox_row.js.map +1 -1
- package/dist/inputs/color_input/color_input.d.ts.map +1 -1
- package/dist/inputs/color_input/color_input.js +32 -28
- package/dist/inputs/color_input/color_input.js.map +1 -1
- package/dist/inputs/color_input/color_picker.js +16 -16
- package/dist/inputs/color_input/color_picker.js.map +1 -1
- package/dist/inputs/combo_box/combo_box.js +1 -1
- package/dist/inputs/combo_box/combo_box.js.map +1 -1
- package/dist/inputs/date_picker/date_picker.js +10 -10
- package/dist/inputs/date_picker/date_picker.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_body.js +1 -1
- package/dist/inputs/date_picker/date_picker_body.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_date.js +2 -2
- package/dist/inputs/date_picker/date_picker_date.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_day.d.ts.map +1 -1
- package/dist/inputs/date_picker/date_picker_day.js +16 -8
- package/dist/inputs/date_picker/date_picker_day.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_header.js +1 -1
- package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_input.js +3 -3
- 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 +14 -11
- package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_input.js +4 -4
- 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 +13 -10
- package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
- package/dist/inputs/index.d.ts +0 -4
- package/dist/inputs/index.d.ts.map +1 -1
- package/dist/inputs/index.js +53 -61
- package/dist/inputs/index.js.map +1 -1
- package/dist/inputs/input/input.js +3 -3
- package/dist/inputs/input/input.js.map +1 -1
- package/dist/inputs/multiselect/multiselect.d.ts.map +1 -1
- package/dist/inputs/multiselect/multiselect.js +10 -9
- package/dist/inputs/multiselect/multiselect.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_inline_values.d.ts.map +1 -1
- package/dist/inputs/multiselect/multiselect_inline_values.js +18 -17
- package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_values.js +20 -20
- 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 +94 -81
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/radio/radio.js +11 -11
- package/dist/inputs/radio/radio.js.map +1 -1
- package/dist/inputs/select/select.d.ts.map +1 -1
- package/dist/inputs/select/select.js +33 -33
- package/dist/inputs/select/select.js.map +1 -1
- package/dist/inputs/slider/slider.js +4 -4
- package/dist/inputs/slider/slider.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.js +9 -9
- package/dist/inputs/suggestions/suggestion_item.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +29 -22
- 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 +8 -8
- package/dist/inputs/unit_input/unit_input.js.map +1 -1
- package/dist/layouts/body/h_body.js +7 -7
- package/dist/layouts/body/h_body.js.map +1 -1
- package/dist/layouts/column/column.js +8 -8
- package/dist/layouts/column/column.js.map +1 -1
- package/dist/layouts/divider/divider.d.ts.map +1 -1
- package/dist/layouts/divider/divider.js +11 -12
- package/dist/layouts/divider/divider.js.map +1 -1
- package/dist/layouts/grid/grid.d.ts.map +1 -1
- package/dist/layouts/grid/grid.js +26 -17
- package/dist/layouts/grid/grid.js.map +1 -1
- package/dist/layouts/header/header.js +4 -4
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/list/section_header.d.ts.map +1 -1
- package/dist/layouts/list/section_header.js +15 -5
- package/dist/layouts/list/section_header.js.map +1 -1
- package/dist/layouts/sidebar_end/sidebar_end.js +26 -26
- package/dist/layouts/sidebar_end/sidebar_end.js.map +1 -1
- package/dist/layouts/sidebar_start/sidebar_start.js +24 -24
- package/dist/layouts/sidebar_start/sidebar_start.js.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.js +10 -15
- package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
- package/dist/left_resize_handle.css +1 -1
- package/dist/loading.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/modal.css +1 -1
- package/dist/multi_combo_box.css +1 -1
- package/dist/multiselect.css +1 -1
- package/dist/multiselect_values.css +1 -1
- package/dist/navigation/index.d.ts +7 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +17 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/navigation/tabs/primitives/tabs_bar.d.ts +7 -0
- package/dist/navigation/tabs/primitives/tabs_bar.d.ts.map +1 -0
- package/dist/navigation/tabs/primitives/tabs_bar.js +21 -0
- package/dist/navigation/tabs/primitives/tabs_bar.js.map +1 -0
- package/dist/navigation/tabs/primitives/tabs_list.d.ts +10 -0
- package/dist/navigation/tabs/primitives/tabs_list.d.ts.map +1 -0
- package/dist/navigation/tabs/primitives/tabs_list.js +36 -0
- package/dist/navigation/tabs/primitives/tabs_list.js.map +1 -0
- package/dist/navigation/tabs/state/context.d.ts +21 -0
- package/dist/navigation/tabs/state/context.d.ts.map +1 -0
- package/dist/navigation/tabs/state/context.js +34 -0
- package/dist/navigation/tabs/state/context.js.map +1 -0
- package/dist/navigation/tabs/state/link/tab_link.d.ts +9 -0
- package/dist/navigation/tabs/state/link/tab_link.d.ts.map +1 -0
- package/dist/navigation/tabs/state/link/tab_link.js +36 -0
- package/dist/navigation/tabs/state/link/tab_link.js.map +1 -0
- package/dist/navigation/tabs/state/link/use_tab_link.d.ts +5 -0
- package/dist/navigation/tabs/state/link/use_tab_link.d.ts.map +1 -0
- package/dist/navigation/tabs/state/link/use_tab_link.js +13 -0
- package/dist/navigation/tabs/state/link/use_tab_link.js.map +1 -0
- package/dist/navigation/tabs/state/nav_bar.d.ts +5 -0
- package/dist/navigation/tabs/state/nav_bar.d.ts.map +1 -0
- package/dist/navigation/tabs/state/nav_bar.js +36 -0
- package/dist/navigation/tabs/state/nav_bar.js.map +1 -0
- package/dist/navigation/tabs/state/tab.d.ts +6 -0
- package/dist/navigation/tabs/state/tab.d.ts.map +1 -0
- package/dist/navigation/tabs/state/tab.js +6 -0
- package/dist/navigation/tabs/state/tab.js.map +1 -0
- package/dist/overlay/context_menu/context_menu.js +5 -5
- package/dist/overlay/context_menu/context_menu.js.map +1 -1
- package/dist/overlay/menu/menu.js +2 -2
- package/dist/overlay/menu/menu.js.map +1 -1
- package/dist/overlay/popper/legacy/popper.d.ts.map +1 -1
- package/dist/overlay/popper/legacy/popper.js +12 -11
- package/dist/overlay/popper/legacy/popper.js.map +1 -1
- package/dist/overlay/popper/preview_popper.js +16 -16
- package/dist/overlay/popper/preview_popper.js.map +1 -1
- package/dist/overlay/portal/portal.css +1 -0
- package/dist/overlay/portal/portal_platform.d.ts.map +1 -1
- package/dist/overlay/portal/portal_platform.js +8 -7
- package/dist/overlay/portal/portal_platform.js.map +1 -1
- package/dist/page.css +1 -1
- package/dist/phone_number_input.css +1 -1
- package/dist/picture_placeholder.css +1 -1
- package/dist/popper.css +1 -1
- package/dist/progress_bar.css +1 -1
- package/dist/radio.css +1 -1
- package/dist/rect.css +1 -1
- package/dist/right_resize_handle.css +1 -1
- package/dist/scaffold.css +1 -1
- package/dist/select.css +1 -1
- package/dist/select_group.css +1 -1
- package/dist/sidebar_end.css +1 -1
- package/dist/sidebar_start.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/slim_button.css +1 -1
- package/dist/stack.css +1 -1
- package/dist/stacks/box/bottom_resize_handle.js +1 -1
- package/dist/stacks/box/bottom_resize_handle.js.map +1 -1
- package/dist/stacks/box/box.js +1 -1
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/stacks/box/end_resize_handle.js +1 -1
- package/dist/stacks/box/end_resize_handle.js.map +1 -1
- package/dist/stacks/box/left_resize_handle.js +7 -7
- package/dist/stacks/box/left_resize_handle.js.map +1 -1
- package/dist/stacks/box/right_resize_handle.js +3 -3
- package/dist/stacks/box/right_resize_handle.js.map +1 -1
- package/dist/stacks/box/start_resize_handle.js +6 -6
- package/dist/stacks/box/start_resize_handle.js.map +1 -1
- package/dist/stacks/box/top_resize_handle.js +1 -1
- package/dist/stacks/box/top_resize_handle.js.map +1 -1
- package/dist/stacks/h_collapsible_box.d.ts.map +1 -1
- package/dist/stacks/h_collapsible_box.js +8 -4
- package/dist/stacks/h_collapsible_box.js.map +1 -1
- package/dist/stacks/h_stack.js +5 -5
- package/dist/stacks/h_stack.js.map +1 -1
- package/dist/stacks/spacer.js +13 -13
- package/dist/stacks/spacer.js.map +1 -1
- package/dist/stacks/story_components/circle.js +3 -3
- package/dist/stacks/story_components/circle.js.map +1 -1
- package/dist/stacks/story_components/picture_placeholder.d.ts.map +1 -1
- package/dist/stacks/story_components/picture_placeholder.js +5 -1
- package/dist/stacks/story_components/picture_placeholder.js.map +1 -1
- package/dist/stacks/story_components/rect.js +10 -10
- package/dist/stacks/story_components/rect.js.map +1 -1
- package/dist/stacks/v_collapsible_box.d.ts.map +1 -1
- package/dist/stacks/v_collapsible_box.js +12 -8
- package/dist/stacks/v_collapsible_box.js.map +1 -1
- package/dist/stacks/v_stack.js +4 -4
- package/dist/stacks/v_stack.js.map +1 -1
- package/dist/stacks/z_stack.js +7 -7
- package/dist/stacks/z_stack.js.map +1 -1
- package/dist/start_resize_handle.css +1 -1
- package/dist/status_input.css +1 -1
- package/dist/subheadline.css +1 -1
- package/dist/suggestion_item.css +1 -1
- package/dist/suggestion_list.css +1 -1
- package/dist/surfaces/alert/alert.js +6 -6
- package/dist/surfaces/alert/alert.js.map +1 -1
- package/dist/surfaces/confirm/confirm.d.ts.map +1 -1
- package/dist/surfaces/confirm/confirm.js +22 -15
- package/dist/surfaces/confirm/confirm.js.map +1 -1
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js +3 -3
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +1 -1
- package/dist/surfaces/drawers/drawer_end/drawer_end.js +4 -4
- package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +1 -1
- package/dist/surfaces/drawers/drawer_start/drawer_start.js +1 -1
- package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +1 -1
- package/dist/surfaces/drawers/drawer_top/drawer_top.js +1 -1
- package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +1 -1
- package/dist/surfaces/page/h_page.js +1 -1
- package/dist/surfaces/page/h_page.js.map +1 -1
- package/dist/surfaces/page/v_page.js +4 -4
- package/dist/surfaces/page/v_page.js.map +1 -1
- package/dist/surfaces/popover/popover.js +1 -1
- package/dist/surfaces/popover/popover.js.map +1 -1
- package/dist/switch.css +1 -1
- package/dist/tabs_bar.css +1 -0
- package/dist/tethered.css +1 -1
- package/dist/textarea.css +1 -1
- package/dist/theme_provider.css +1 -0
- package/dist/theme_provider.module-ChZQ5Xsk.js +5 -0
- package/dist/theme_provider.module-ChZQ5Xsk.js.map +1 -0
- package/dist/themes/stylesheets/reset.css +1 -0
- package/dist/themes/stylesheets/reset.js +134 -131
- package/dist/themes/stylesheets/reset.js.map +1 -1
- package/dist/themes/theme.d.ts +3 -2
- package/dist/themes/theme.d.ts.map +1 -1
- package/dist/themes/theme.js +24 -5
- package/dist/themes/theme.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -0
- package/dist/themes/themes/ergo/ergo_theme.d.ts.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.js +608 -540
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/themes/themes/windows_98/windows_98.css +1 -0
- package/dist/themes/themes/windows_98/windows_98_theme.js +1071 -1167
- package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
- package/dist/title.css +1 -1
- package/dist/tokens/badge/badge.js +6 -6
- package/dist/tokens/badge/badge.js.map +1 -1
- package/dist/tokens/bubble/bubble.js +35 -27
- package/dist/tokens/bubble/bubble.js.map +1 -1
- package/dist/tokens/chip/chip.js +17 -9
- package/dist/tokens/chip/chip.js.map +1 -1
- package/dist/tooltip.css +1 -1
- package/dist/top_resize_handle.css +1 -1
- package/dist/typography/body_text/body_text.js +9 -9
- package/dist/typography/body_text/body_text.js.map +1 -1
- package/dist/typography/callout/callout.js +9 -9
- package/dist/typography/callout/callout.js.map +1 -1
- package/dist/typography/caption/caption.js +5 -5
- package/dist/typography/caption/caption.js.map +1 -1
- package/dist/typography/footnote/footnote.js +9 -9
- package/dist/typography/footnote/footnote.js.map +1 -1
- package/dist/typography/headline/headline.js +13 -13
- package/dist/typography/headline/headline.js.map +1 -1
- package/dist/typography/subheadline/subheadline.js +10 -10
- package/dist/typography/subheadline/subheadline.js.map +1 -1
- package/dist/typography/title/title.js +6 -6
- package/dist/typography/title/title.js.map +1 -1
- package/dist/unit_input.css +1 -1
- package/dist/utility_bar.css +1 -1
- package/dist/utils/css_utils.d.ts +9 -0
- package/dist/utils/css_utils.d.ts.map +1 -0
- package/dist/utils/css_utils.js +45 -0
- package/dist/utils/css_utils.js.map +1 -0
- package/dist/v_body.css +1 -1
- package/dist/window.css +1 -1
- package/package.json +10 -3
- package/src/actions/__docs__/actions.mdx +65 -2
- package/src/actions/__docs__/actions.stories.tsx +174 -2
- package/src/actions/button/__stories__/button_group.stories.tsx +63 -0
- package/src/actions/button/__stories__/select_group.stories.tsx +47 -4
- package/src/actions/button/base_button/base_button.module.css +15 -13
- package/src/actions/button/base_button/base_button.tsx +2 -1
- package/src/actions/button/button/button.module.css +52 -50
- package/src/actions/button/button_group/button_group.module.css +54 -52
- package/src/actions/button/button_group/button_group.tsx +9 -4
- package/src/actions/button/select_group/select_group.module.css +54 -52
- package/src/actions/button/select_group/select_group.tsx +2 -2
- package/src/actions/button/slim_button/slim_button.module.css +7 -5
- package/src/css/layers.css +1 -0
- package/src/feedback/loading/loading.module.css +17 -15
- package/src/feedback/progress/progress_bar.module.css +52 -50
- package/src/feedback/progress/progress_bar.tsx +6 -1
- package/src/form/field/common/field_control/field_control.module.css +17 -15
- package/src/form/field/common/field_control/field_control.tsx +1 -1
- package/src/form/field/common/field_description.tsx +1 -1
- package/src/form/field/common/field_error.tsx +1 -1
- package/src/form/field/common/field_header.tsx +1 -1
- package/src/form/field/common/status_input/status_input.module.css +10 -8
- package/src/form/field/common/status_input/status_input.tsx +8 -5
- package/src/form/field/h_field/h_field.module.css +7 -5
- package/src/form/field/h_field/h_field.tsx +1 -1
- package/src/form/field/v_field/v_field.tsx +1 -1
- package/src/form/field_set/field_set.module.css +16 -14
- package/src/form/field_set/field_set.tsx +7 -4
- package/src/inputs/checkbox/checkbox.module.css +45 -43
- package/src/inputs/checkbox/checkbox.tsx +1 -1
- package/src/inputs/checkbox/checkbox_row.tsx +9 -2
- package/src/inputs/color_input/color_input.module.css +58 -56
- package/src/inputs/color_input/color_input.tsx +8 -4
- package/src/inputs/color_input/color_picker.module.css +13 -11
- package/src/inputs/color_input/color_picker.tsx +2 -2
- package/src/inputs/combo_box/combo_box.tsx +1 -1
- package/src/inputs/date_picker/date_picker.module.css +19 -17
- package/src/inputs/date_picker/date_picker.tsx +2 -2
- package/src/inputs/date_picker/date_picker_body.tsx +1 -1
- package/src/inputs/date_picker/date_picker_date.module.css +71 -69
- package/src/inputs/date_picker/date_picker_date.tsx +2 -2
- package/src/inputs/date_picker/date_picker_day.module.css +5 -3
- package/src/inputs/date_picker/date_picker_day.tsx +7 -2
- package/src/inputs/date_picker/date_picker_header.module.css +4 -2
- package/src/inputs/date_picker/date_picker_header.tsx +1 -1
- package/src/inputs/date_picker/date_picker_input.module.css +55 -53
- package/src/inputs/date_picker/date_picker_input.tsx +3 -3
- package/src/inputs/date_picker/date_picker_time_selector.module.css +29 -28
- package/src/inputs/date_picker/date_picker_time_selector.tsx +7 -4
- package/src/inputs/date_picker/date_picker_year_input.module.css +46 -44
- package/src/inputs/date_picker/date_picker_year_input.tsx +1 -1
- package/src/inputs/date_picker/date_picker_year_selector.module.css +48 -46
- package/src/inputs/date_picker/date_picker_year_selector.tsx +5 -2
- package/src/inputs/index.ts +0 -4
- package/src/inputs/input/input.module.css +55 -79
- package/src/inputs/input/input.tsx +1 -1
- package/src/inputs/multi_combo_box/multi_combo_box.module.css +4 -2
- package/src/inputs/multiselect/multiselect.module.css +4 -2
- package/src/inputs/multiselect/multiselect.tsx +2 -1
- package/src/inputs/multiselect/multiselect_inline_values.tsx +3 -2
- package/src/inputs/multiselect/multiselect_values.module.css +28 -26
- package/src/inputs/multiselect/multiselect_values.tsx +3 -3
- package/src/inputs/phone_number_input/phone_number_input.module.css +54 -52
- package/src/inputs/phone_number_input/phone_number_input.tsx +15 -6
- package/src/inputs/radio/radio.module.css +48 -66
- package/src/inputs/radio/radio.tsx +2 -2
- package/src/inputs/select/select.module.css +57 -59
- package/src/inputs/select/select.tsx +4 -2
- package/src/inputs/slider/slider.module.css +151 -149
- package/src/inputs/slider/slider.tsx +1 -1
- package/src/inputs/suggestions/suggestion_item.module.css +35 -53
- package/src/inputs/suggestions/suggestion_item.tsx +1 -1
- package/src/inputs/suggestions/suggestion_list.module.css +29 -27
- package/src/inputs/suggestions/suggestion_list.tsx +6 -3
- package/src/inputs/switch/switch.module.css +111 -109
- package/src/inputs/switch/switch.tsx +3 -3
- package/src/inputs/textarea/textarea.module.css +46 -65
- package/src/inputs/textarea/textarea.tsx +1 -1
- package/src/inputs/unit_input/unit_input.module.css +20 -18
- package/src/inputs/unit_input/unit_input.tsx +3 -3
- package/src/layouts/body/h_body.module.css +7 -4
- package/src/layouts/body/h_body.tsx +1 -1
- package/src/layouts/body/v_body.module.css +6 -4
- package/src/layouts/column/column.module.css +30 -28
- package/src/layouts/column/column.tsx +2 -2
- package/src/layouts/divider/divider.module.css +103 -101
- package/src/layouts/divider/divider.tsx +1 -2
- package/src/layouts/footer/footer.module.css +24 -21
- package/src/layouts/grid/grid.module.css +20 -18
- package/src/layouts/grid/grid.tsx +6 -1
- package/src/layouts/header/header.module.css +7 -5
- package/src/layouts/header/header.tsx +1 -1
- package/src/layouts/list/section_header.module.css +16 -14
- package/src/layouts/list/section_header.tsx +7 -1
- package/src/layouts/scaffold/scaffold.module.css +6 -4
- package/src/layouts/sidebar_end/sidebar_end.module.css +28 -26
- package/src/layouts/sidebar_end/sidebar_end.tsx +2 -2
- package/src/layouts/sidebar_start/sidebar_start.module.css +28 -26
- package/src/layouts/sidebar_start/sidebar_start.tsx +2 -2
- package/src/layouts/utility_bar/utility_bar.module.css +5 -3
- package/src/layouts/utility_bar/utility_bar.tsx +1 -6
- package/src/navigation/index.ts +18 -0
- package/src/navigation/tabs/__stories__/state.stories.tsx +136 -0
- package/src/navigation/tabs/__stories__/tabs.stories.tsx +40 -0
- package/src/navigation/tabs/primitives/tabs_bar.module.css +13 -0
- package/src/navigation/tabs/primitives/tabs_bar.tsx +25 -0
- package/src/navigation/tabs/primitives/tabs_list.tsx +42 -0
- package/src/navigation/tabs/state/context.tsx +61 -0
- package/src/navigation/tabs/state/link/tab_link.tsx +45 -0
- package/src/navigation/tabs/state/link/use_tab_link.ts +17 -0
- package/src/navigation/tabs/state/nav_bar.tsx +37 -0
- package/src/navigation/tabs/state/tab.tsx +12 -0
- package/src/overlay/context_menu/context_menu.tsx +1 -1
- package/src/overlay/frame/frame.module.css +6 -4
- package/src/overlay/frame/frame_stories.module.css +14 -12
- package/src/overlay/menu/menu.module.css +30 -28
- package/src/overlay/menu/menu.tsx +2 -2
- package/src/overlay/popper/legacy/popper.module.css +10 -8
- package/src/overlay/popper/legacy/popper.tsx +2 -1
- package/src/overlay/popper/preview_popper.tsx +1 -1
- package/src/overlay/portal/portal.css +33 -31
- package/src/overlay/portal/portal_platform.tsx +6 -5
- package/src/overlay/tethered/tethered.module.css +9 -7
- package/src/stacks/box/bottom_resize_handle.module.css +11 -9
- package/src/stacks/box/bottom_resize_handle.tsx +1 -1
- package/src/stacks/box/box.tsx +1 -1
- package/src/stacks/box/end_resize_handle.module.css +16 -14
- package/src/stacks/box/end_resize_handle.tsx +1 -1
- package/src/stacks/box/left_resize_handle.module.css +11 -9
- package/src/stacks/box/left_resize_handle.tsx +1 -1
- package/src/stacks/box/right_resize_handle.module.css +11 -9
- package/src/stacks/box/right_resize_handle.tsx +1 -1
- package/src/stacks/box/start_resize_handle.module.css +16 -14
- package/src/stacks/box/start_resize_handle.tsx +1 -1
- package/src/stacks/box/top_resize_handle.module.css +11 -9
- package/src/stacks/box/top_resize_handle.tsx +1 -1
- package/src/stacks/collapsible_box.module.css +45 -29
- package/src/stacks/demo.module.css +5 -3
- package/src/stacks/h_collapsible_box.tsx +5 -1
- package/src/stacks/h_stack.tsx +1 -1
- package/src/stacks/spacer.tsx +1 -1
- package/src/stacks/stack.module.css +400 -393
- package/src/stacks/story_components/circle.module.css +8 -6
- package/src/stacks/story_components/circle.tsx +1 -1
- package/src/stacks/story_components/picture_placeholder.module.css +4 -2
- package/src/stacks/story_components/picture_placeholder.tsx +5 -1
- package/src/stacks/story_components/rect.module.css +9 -7
- package/src/stacks/story_components/rect.tsx +1 -1
- package/src/stacks/v_collapsible_box.tsx +5 -1
- package/src/stacks/v_stack.tsx +1 -1
- package/src/stacks/z_stack.tsx +1 -1
- package/src/surfaces/alert/alert.tsx +1 -1
- package/src/surfaces/card/card_stories.module.css +13 -11
- package/src/surfaces/confirm/confirm.module.css +37 -35
- package/src/surfaces/confirm/confirm.tsx +7 -4
- package/src/surfaces/drawers/drawer_bottom/drawer_bottom.module.css +4 -2
- package/src/surfaces/drawers/drawer_bottom/drawer_bottom.tsx +1 -1
- package/src/surfaces/drawers/drawer_end/drawer_end.module.css +4 -2
- package/src/surfaces/drawers/drawer_end/drawer_end.tsx +1 -1
- package/src/surfaces/drawers/drawer_start/drawer_start.module.css +4 -2
- package/src/surfaces/drawers/drawer_start/drawer_start.tsx +1 -1
- package/src/surfaces/drawers/drawer_top/drawer_top.module.css +4 -2
- package/src/surfaces/drawers/drawer_top/drawer_top.tsx +1 -1
- package/src/surfaces/modal/__stories__/modal.stories.tsx +3 -1
- package/src/surfaces/modal/modal.module.css +5 -3
- package/src/surfaces/page/h_page.tsx +1 -1
- package/src/surfaces/page/page.module.css +12 -10
- package/src/surfaces/page/v_page.tsx +1 -1
- package/src/surfaces/panel/panel.module.css +8 -7
- package/src/surfaces/popover/popover.tsx +1 -1
- package/src/surfaces/tooltip/tooltip.module.css +4 -2
- package/src/surfaces/window/window.module.css +6 -4
- package/src/themes/stylesheets/reset.css +134 -131
- package/src/themes/theme.tsx +29 -3
- package/src/themes/theme_provider.module.css +6 -0
- package/src/themes/themes/ergo/ergo_theme.css +607 -540
- package/src/themes/themes/ergo/ergo_theme.ts +1 -0
- package/src/themes/themes/windows_98/windows_98.css +1067 -1163
- package/src/tokens/badge/badge.module.css +13 -11
- package/src/tokens/badge/badge.tsx +2 -2
- package/src/tokens/bubble/bubble.module.css +12 -10
- package/src/tokens/bubble/bubble.tsx +1 -1
- package/src/tokens/chip/chip.module.css +14 -12
- package/src/tokens/chip/chip.tsx +1 -1
- package/src/typography/body_text/body_text.module.css +61 -59
- package/src/typography/body_text/body_text.tsx +1 -1
- package/src/typography/callout/callout.module.css +56 -54
- package/src/typography/callout/callout.tsx +1 -1
- package/src/typography/caption/caption.module.css +56 -54
- package/src/typography/caption/caption.tsx +1 -1
- package/src/typography/footnote/footnote.module.css +56 -54
- package/src/typography/footnote/footnote.tsx +1 -1
- package/src/typography/headline/headline.module.css +57 -55
- package/src/typography/headline/headline.tsx +1 -1
- package/src/typography/subheadline/subheadline.module.css +57 -55
- package/src/typography/subheadline/subheadline.tsx +1 -1
- package/src/typography/title/title.module.css +54 -52
- package/src/typography/title/title.tsx +1 -1
- package/src/utils/css_utils.ts +64 -0
- package/src/utils/dnd/draggable/draggable.module.css +8 -6
- package/dist/actions/types.js +0 -2
- package/dist/actions/types.js.map +0 -1
- package/dist/form/field/common/types.js +0 -2
- package/dist/form/field/common/types.js.map +0 -1
- package/dist/inputs/mask_input/mask_config.js +0 -2
- package/dist/inputs/mask_input/mask_config.js.map +0 -1
- package/dist/inputs/mask_input/mask_cursor.js +0 -2
- package/dist/inputs/mask_input/mask_cursor.js.map +0 -1
- package/dist/inputs/multiselect/multiselect_row.d.ts +0 -10
- package/dist/inputs/multiselect/multiselect_row.d.ts.map +0 -1
- package/dist/inputs/multiselect/multiselect_row.js +0 -35
- package/dist/inputs/multiselect/multiselect_row.js.map +0 -1
- package/dist/inputs/switch/switch_row.d.ts +0 -8
- package/dist/inputs/switch/switch_row.d.ts.map +0 -1
- package/dist/inputs/switch/switch_row.js +0 -16
- package/dist/inputs/switch/switch_row.js.map +0 -1
- package/dist/inputs/textarea/textarea_row.d.ts +0 -8
- package/dist/inputs/textarea/textarea_row.d.ts.map +0 -1
- package/dist/inputs/textarea/textarea_row.js +0 -12
- package/dist/inputs/textarea/textarea_row.js.map +0 -1
- package/dist/overlay/tethered/types.js +0 -2
- package/dist/overlay/tethered/types.js.map +0 -1
- package/dist/portal_platform.css +0 -1
- package/dist/stacks/box/handle_props.js +0 -2
- package/dist/stacks/box/handle_props.js.map +0 -1
- package/dist/utils/calendar/calendar_date.js +0 -2
- package/dist/utils/calendar/calendar_date.js.map +0 -1
- package/dist/utils/dnd/types.js +0 -2
- package/dist/utils/dnd/types.js.map +0 -1
- package/src/inputs/multiselect/multiselect_row.tsx +0 -57
- package/src/inputs/switch/TODO.md +0 -3
- package/src/inputs/switch/switch_row.tsx +0 -33
- package/src/inputs/textarea/textarea_row.tsx +0 -24
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as p } from "clsx";
|
|
3
3
|
import { s as u } from "../../headline.module-BiwHBtGf.js";
|
|
4
4
|
function j({
|
|
5
|
-
size:
|
|
5
|
+
size: n = "md",
|
|
6
6
|
emphasis: o = "normal",
|
|
7
|
-
hierarchy:
|
|
8
|
-
color:
|
|
9
|
-
children:
|
|
7
|
+
hierarchy: t = "primary",
|
|
8
|
+
color: e,
|
|
9
|
+
children: h,
|
|
10
10
|
className: s,
|
|
11
11
|
style: i = {},
|
|
12
12
|
padStart: r,
|
|
@@ -14,19 +14,19 @@ function j({
|
|
|
14
14
|
padBottom: f,
|
|
15
15
|
padTop: m,
|
|
16
16
|
pad: l,
|
|
17
|
-
selectable:
|
|
17
|
+
selectable: c = !0
|
|
18
18
|
}) {
|
|
19
19
|
let a;
|
|
20
|
-
return
|
|
20
|
+
return n === "lg" ? a = "h1" : n === "md" ? a = "h2" : a = "h3", l && (i.padding = l), r && (i.paddingInlineStart = r), d && (i.paddingInlineEnd = d), m && (i.paddingTop = m), f && (i.paddingBottom = f), e && (i.color = e), /* @__PURE__ */ g(
|
|
21
21
|
a,
|
|
22
22
|
{
|
|
23
|
-
"data-hierarchy":
|
|
23
|
+
"data-hierarchy": t,
|
|
24
24
|
"data-emphasis": o,
|
|
25
|
-
"data-selectable":
|
|
26
|
-
className:
|
|
25
|
+
"data-selectable": c,
|
|
26
|
+
className: p(u.headline, s, "tcn-headline"),
|
|
27
27
|
style: i,
|
|
28
|
-
"data-size":
|
|
29
|
-
children:
|
|
28
|
+
"data-size": n,
|
|
29
|
+
children: h
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headline.js","sources":["../../../src/typography/headline/headline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './headline.module.css';\n\nexport interface HeadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type HeadlineProps = WithDetailedHTMLProps<HeadlineOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport function Headline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: HeadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['headline'], 'headline'
|
|
1
|
+
{"version":3,"file":"headline.js","sources":["../../../src/typography/headline/headline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './headline.module.css';\n\nexport interface HeadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type HeadlineProps = WithDetailedHTMLProps<HeadlineOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport function Headline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: HeadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['headline'], className, 'tcn-headline')}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n}\n"],"names":["Headline","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","As","jsx","clsx","styles"],"mappings":";;;AAsBO,SAASA,EAAS;AAAA,EACvB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AACf,GAAkB;AAChB,MAAIC;AAEJ,SAAIb,MAAS,OACXa,IAAK,OACIb,MAAS,OAClBa,IAAK,OAELA,IAAK,MAGHF,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAW;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,kBAAgBX;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWG,EAAKC,EAAO,UAAaX,GAAW,cAAc;AAAA,MAC7D,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { s as
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as p } from "clsx";
|
|
3
|
+
import { s as u } from "../../subheadline.module-C-v7zMkQ.js";
|
|
4
4
|
function j({
|
|
5
|
-
size:
|
|
5
|
+
size: n = "md",
|
|
6
6
|
emphasis: l = "normal",
|
|
7
7
|
hierarchy: o = "primary",
|
|
8
|
-
color:
|
|
8
|
+
color: e,
|
|
9
9
|
children: s,
|
|
10
10
|
className: t,
|
|
11
11
|
style: i = {},
|
|
@@ -14,18 +14,18 @@ function j({
|
|
|
14
14
|
padBottom: f,
|
|
15
15
|
padTop: m,
|
|
16
16
|
pad: h,
|
|
17
|
-
selectable:
|
|
17
|
+
selectable: c = !0
|
|
18
18
|
}) {
|
|
19
19
|
let a;
|
|
20
|
-
return
|
|
20
|
+
return n === "lg" ? a = "h3" : n === "md" ? a = "h4" : a = "h5", h && (i.padding = h), r && (i.paddingInlineStart = r), d && (i.paddingInlineEnd = d), m && (i.paddingTop = m), f && (i.paddingBottom = f), e && (i.color = e), /* @__PURE__ */ g(
|
|
21
21
|
a,
|
|
22
22
|
{
|
|
23
23
|
"data-hierarchy": o,
|
|
24
24
|
"data-emphasis": l,
|
|
25
|
-
"data-selectable":
|
|
26
|
-
className: u
|
|
25
|
+
"data-selectable": c,
|
|
26
|
+
className: p(u.subheadline, t, "tcn-subheadline"),
|
|
27
27
|
style: i,
|
|
28
|
-
"data-size":
|
|
28
|
+
"data-size": n,
|
|
29
29
|
children: s
|
|
30
30
|
}
|
|
31
31
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subheadline.js","sources":["../../../src/typography/subheadline/subheadline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './subheadline.module.css';\n\nexport interface SubheadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type SubheadlineProps = WithDetailedHTMLProps<\n SubheadlineOwnProps,\n 'h3' | 'h4' | 'h5'\n>;\n\nexport function Subheadline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: SubheadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h3';\n } else if (size === 'md') {\n As = 'h4';\n } else {\n As = 'h5';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['subheadline'], 'subheadline'
|
|
1
|
+
{"version":3,"file":"subheadline.js","sources":["../../../src/typography/subheadline/subheadline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './subheadline.module.css';\n\nexport interface SubheadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type SubheadlineProps = WithDetailedHTMLProps<\n SubheadlineOwnProps,\n 'h3' | 'h4' | 'h5'\n>;\n\nexport function Subheadline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: SubheadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h3';\n } else if (size === 'md') {\n As = 'h4';\n } else {\n As = 'h5';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['subheadline'], className, 'tcn-subheadline')}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n}\n"],"names":["Subheadline","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","As","jsx","clsx","styles"],"mappings":";;;AAyBO,SAASA,EAAY;AAAA,EAC1B,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AACf,GAAqB;AACnB,MAAIC;AAEJ,SAAIb,MAAS,OACXa,IAAK,OACIb,MAAS,OAClBa,IAAK,OAELA,IAAK,MAGHF,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAW;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,kBAAgBX;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWG,EAAKC,EAAO,aAAgBX,GAAW,iBAAiB;AAAA,MACnE,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -5,27 +5,27 @@ import '../../title.css';const I = "_title_64bd0fd", T = { title: I }, N = x(fun
|
|
|
5
5
|
size: n = "md",
|
|
6
6
|
emphasis: m = "normal",
|
|
7
7
|
hierarchy: c = "primary",
|
|
8
|
-
color:
|
|
8
|
+
color: r,
|
|
9
9
|
children: p,
|
|
10
10
|
className: g,
|
|
11
11
|
style: i = {},
|
|
12
|
-
padStart:
|
|
12
|
+
padStart: e,
|
|
13
13
|
padEnd: a,
|
|
14
14
|
padBottom: f,
|
|
15
|
-
padTop:
|
|
16
|
-
pad:
|
|
15
|
+
padTop: d,
|
|
16
|
+
pad: l,
|
|
17
17
|
selectable: h = !0,
|
|
18
18
|
as: o
|
|
19
19
|
}, s) {
|
|
20
20
|
let t = o;
|
|
21
|
-
return o == null && (n === "lg" ? t = "h1" : n === "md" ? t = "h2" : t = "h3"),
|
|
21
|
+
return o == null && (n === "lg" ? t = "h1" : n === "md" ? t = "h2" : t = "h3"), l && (i.padding = l), e && (i.paddingInlineStart = e), a && (i.paddingInlineEnd = a), d && (i.paddingTop = d), f && (i.paddingBottom = f), r && (i.color = r), /* @__PURE__ */ u(
|
|
22
22
|
t,
|
|
23
23
|
{
|
|
24
24
|
ref: s,
|
|
25
25
|
"data-hierarchy": c,
|
|
26
26
|
"data-emphasis": m,
|
|
27
27
|
"data-selectable": h,
|
|
28
|
-
className: b(T.title,
|
|
28
|
+
className: b(T.title, g, "tcn-typography", "tcn-title"),
|
|
29
29
|
style: i,
|
|
30
30
|
"data-size": n,
|
|
31
31
|
children: p
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport styles from './title.module.css';\n\nexport interface TitleOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n as?: string;\n}\n\nexport type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(function Title(\n {\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n as,\n },\n ref\n) {\n let As: React.ElementType = as as React.ElementType;\n\n if (as == null) {\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n ref={ref}\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['title'],
|
|
1
|
+
{"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport styles from './title.module.css';\n\nexport interface TitleOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n as?: string;\n}\n\nexport type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(function Title(\n {\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n as,\n },\n ref\n) {\n let As: React.ElementType = as as React.ElementType;\n\n if (as == null) {\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n ref={ref}\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['title'], className, 'tcn-typography', 'tcn-title')}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n});\n"],"names":["Title","forwardRef","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","as","ref","As","jsx","clsx","styles"],"mappings":";;;8CAuBaA,IAAQC,EAA2C,SAC9D;AAAA,EACE,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,IAAAC;AACF,GACAC,GACA;AACA,MAAIC,IAAwBF;AAE5B,SAAIA,KAAM,SACJb,MAAS,OACXe,IAAK,OACIf,MAAS,OAClBe,IAAK,OAELA,IAAK,OAILJ,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAa;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,kBAAgBZ;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWK,EAAKC,EAAO,OAAUb,GAAW,kBAAkB,WAAW;AAAA,MACzE,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
package/dist/unit_input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._unit-input_4bd8bc8{position:relative;opacity:1}._unit-input-flex-box_8db2f9b{z-index:inherit}._unit-input-number_c95f85a{padding-inline-end:8px}._unit-input-number_c95f85a
|
|
1
|
+
@layer tcn-system{:where(._unit-input_4bd8bc8){position:relative;opacity:1}:where(._unit-input-flex-box_8db2f9b){z-index:inherit}:where(._unit-input-number_c95f85a){padding-inline-end:8px}:where(._unit-input-number_c95f85a),:where(._unit-input-select_1bbbad9){position:relative;z-index:1}:where(._unit-input-number_c95f85a:focus),:where(._unit-input-select_1bbbad9:focus){z-index:2}}
|
package/dist/utility_bar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._utility-bar_3a92315{width:100%;min-height:0}
|
|
1
|
+
@layer tcn-system{:where(._utility-bar_3a92315){width:100%;min-height:0}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Rectangle } from './types/dimensions.js';
|
|
2
|
+
export declare const convertRectangleToCssVariables: (componentName: string, stateName: string, rectangle?: Rectangle | null) => {
|
|
3
|
+
[x: string]: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function useTrackActiveItemRectangle(isActive: boolean): {
|
|
6
|
+
ref: import('react').RefObject<HTMLElement>;
|
|
7
|
+
rectangle: Rectangle | null;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=css_utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css_utils.d.ts","sourceRoot":"","sources":["../../src/utils/css_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,eAAO,MAAM,8BAA8B,GACzC,eAAe,MAAM,EACrB,WAAW,MAAM,EACjB,YAAY,SAAS,GAAG,IAAI;;CAY7B,CAAC;AAiBF,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,OAAO;;;EA4B5D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useRef as c, useState as u, useLayoutEffect as p } from "react";
|
|
2
|
+
const x = (e, i, t) => {
|
|
3
|
+
if (!t)
|
|
4
|
+
return {};
|
|
5
|
+
const n = `--${e}-${i}-rectangle-`;
|
|
6
|
+
return {
|
|
7
|
+
[`${n}position-x`]: t.position.x + "px",
|
|
8
|
+
[`${n}position-y`]: t.position.y + "px",
|
|
9
|
+
[`${n}width`]: t.dimensions.width + "px",
|
|
10
|
+
[`${n}height`]: t.dimensions.height + "px"
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
function d(e) {
|
|
14
|
+
return e ? {
|
|
15
|
+
dimensions: {
|
|
16
|
+
width: e.offsetWidth,
|
|
17
|
+
height: e.offsetHeight
|
|
18
|
+
},
|
|
19
|
+
position: {
|
|
20
|
+
x: e.offsetLeft,
|
|
21
|
+
y: e.offsetTop
|
|
22
|
+
}
|
|
23
|
+
} : null;
|
|
24
|
+
}
|
|
25
|
+
function a(e) {
|
|
26
|
+
const i = c(null), [t, n] = u(null);
|
|
27
|
+
return p(() => {
|
|
28
|
+
const o = i.current;
|
|
29
|
+
if (!o) return;
|
|
30
|
+
const s = () => {
|
|
31
|
+
const f = d(o);
|
|
32
|
+
e && f && n(f);
|
|
33
|
+
};
|
|
34
|
+
s();
|
|
35
|
+
const r = new ResizeObserver(s);
|
|
36
|
+
return r.observe(o), window.addEventListener("resize", s), () => {
|
|
37
|
+
r.disconnect(), window.removeEventListener("resize", s);
|
|
38
|
+
};
|
|
39
|
+
}, [e]), { ref: i, rectangle: t };
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
x as convertRectangleToCssVariables,
|
|
43
|
+
a as useTrackActiveItemRectangle
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=css_utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css_utils.js","sources":["../../src/utils/css_utils.ts"],"sourcesContent":["import type { Rectangle } from './types/dimensions.js';\nimport { useLayoutEffect, useRef, useState } from 'react';\n\nexport const convertRectangleToCssVariables = (\n componentName: string,\n stateName: string,\n rectangle?: Rectangle | null\n) => {\n if (!rectangle) {\n return {};\n }\n const prefix = `--${componentName}-${stateName}-rectangle-`;\n return {\n [`${prefix}position-x`]: rectangle.position.x + 'px',\n [`${prefix}position-y`]: rectangle.position.y + 'px',\n [`${prefix}width`]: rectangle.dimensions.width + 'px',\n [`${prefix}height`]: rectangle.dimensions.height + 'px',\n };\n};\n\nfunction getElementRect(element: HTMLElement | null): Rectangle | null {\n if (!element) return null;\n\n return {\n dimensions: {\n width: element.offsetWidth,\n height: element.offsetHeight,\n },\n position: {\n x: element.offsetLeft,\n y: element.offsetTop,\n },\n };\n}\n\nexport function useTrackActiveItemRectangle(isActive: boolean) {\n const ref = useRef<HTMLElement>(null);\n const [rectangle, setRectangle] = useState<Rectangle | null>(null);\n\n useLayoutEffect(() => {\n const element = ref.current;\n if (!element) return;\n\n const update = () => {\n const rect = getElementRect(element);\n if (isActive && rect) {\n setRectangle(rect);\n }\n };\n\n update();\n\n const resizeObserver = new ResizeObserver(update);\n resizeObserver.observe(element);\n window.addEventListener('resize', update);\n\n return () => {\n resizeObserver.disconnect();\n window.removeEventListener('resize', update);\n };\n }, [isActive]);\n\n return { ref, rectangle };\n}\n"],"names":["convertRectangleToCssVariables","componentName","stateName","rectangle","prefix","getElementRect","element","useTrackActiveItemRectangle","isActive","ref","useRef","setRectangle","useState","useLayoutEffect","update","rect","resizeObserver"],"mappings":";AAGO,MAAMA,IAAiC,CAC5CC,GACAC,GACAC,MACG;AACH,MAAI,CAACA;AACH,WAAO,CAAA;AAET,QAAMC,IAAS,KAAKH,CAAa,IAAIC,CAAS;AAC9C,SAAO;AAAA,IACL,CAAC,GAAGE,CAAM,YAAY,GAAGD,EAAU,SAAS,IAAI;AAAA,IAChD,CAAC,GAAGC,CAAM,YAAY,GAAGD,EAAU,SAAS,IAAI;AAAA,IAChD,CAAC,GAAGC,CAAM,OAAO,GAAGD,EAAU,WAAW,QAAQ;AAAA,IACjD,CAAC,GAAGC,CAAM,QAAQ,GAAGD,EAAU,WAAW,SAAS;AAAA,EAAA;AAEvD;AAEA,SAASE,EAAeC,GAA+C;AACrE,SAAKA,IAEE;AAAA,IACL,YAAY;AAAA,MACV,OAAOA,EAAQ;AAAA,MACf,QAAQA,EAAQ;AAAA,IAAA;AAAA,IAElB,UAAU;AAAA,MACR,GAAGA,EAAQ;AAAA,MACX,GAAGA,EAAQ;AAAA,IAAA;AAAA,EACb,IAVmB;AAYvB;AAEO,SAASC,EAA4BC,GAAmB;AAC7D,QAAMC,IAAMC,EAAoB,IAAI,GAC9B,CAACP,GAAWQ,CAAY,IAAIC,EAA2B,IAAI;AAEjE,SAAAC,EAAgB,MAAM;AACpB,UAAMP,IAAUG,EAAI;AACpB,QAAI,CAACH,EAAS;AAEd,UAAMQ,IAAS,MAAM;AACnB,YAAMC,IAAOV,EAAeC,CAAO;AACnC,MAAIE,KAAYO,KACdJ,EAAaI,CAAI;AAAA,IAErB;AAEA,IAAAD,EAAA;AAEA,UAAME,IAAiB,IAAI,eAAeF,CAAM;AAChD,WAAAE,EAAe,QAAQV,CAAO,GAC9B,OAAO,iBAAiB,UAAUQ,CAAM,GAEjC,MAAM;AACX,MAAAE,EAAe,WAAA,GACf,OAAO,oBAAoB,UAAUF,CAAM;AAAA,IAC7C;AAAA,EACF,GAAG,CAACN,CAAQ,CAAC,GAEN,EAAE,KAAAC,GAAK,WAAAN,EAAA;AAChB;"}
|
package/dist/v_body.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._v-body_d8f1917{min-height:0;flex-grow:1;width:100%}
|
|
1
|
+
@layer tcn-system{._v-body_d8f1917{min-height:0;flex-grow:1;width:100%}}
|
package/dist/window.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._window_7610fdb{position:relative;box-sizing:border-box}
|
|
1
|
+
@layer tcn-system{:where(._window_7610fdb){position:relative;box-sizing:border-box}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tcn/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "TCN",
|
|
@@ -71,6 +71,12 @@
|
|
|
71
71
|
"import": "./dist/layouts/index.js",
|
|
72
72
|
"default": "./dist/layouts/index.js"
|
|
73
73
|
},
|
|
74
|
+
"./navigation": {
|
|
75
|
+
"@bc-monorepo/source": "./src/navigation/index.ts",
|
|
76
|
+
"types": "./dist/navigation/index.d.ts",
|
|
77
|
+
"import": "./dist/navigation/index.js",
|
|
78
|
+
"default": "./dist/navigation/index.js"
|
|
79
|
+
},
|
|
74
80
|
"./overlay": {
|
|
75
81
|
"@bc-monorepo/source": "./src/overlay/index.ts",
|
|
76
82
|
"types": "./dist/overlay/index.d.ts",
|
|
@@ -132,10 +138,11 @@
|
|
|
132
138
|
"react-dom": "^18.2.0"
|
|
133
139
|
},
|
|
134
140
|
"dependencies": {
|
|
141
|
+
"@fontsource/lato": "^5.2.7",
|
|
135
142
|
"clsx": "^2.1.1",
|
|
136
143
|
"react-color": "^2.19.3",
|
|
137
|
-
"@tcn/icons": "2.2.
|
|
138
|
-
"@tcn/state": "1.1.
|
|
144
|
+
"@tcn/icons": "2.2.1",
|
|
145
|
+
"@tcn/state": "1.1.1"
|
|
139
146
|
},
|
|
140
147
|
"scripts": {
|
|
141
148
|
"build": "vite build",
|
|
@@ -7,14 +7,26 @@ import { Gallery } from './components/gallery';
|
|
|
7
7
|
|
|
8
8
|
# Actions
|
|
9
9
|
|
|
10
|
-
Interactive elements that
|
|
10
|
+
Interactive elements that triggers an action, or event. For example submitting a form, closing a modal, or deleting an entity.
|
|
11
|
+
|
|
12
|
+
- [Actions](#actions)
|
|
13
|
+
- [Button](#button)
|
|
14
|
+
- [Utility (Slim Button)](#utility)
|
|
15
|
+
- [Button Group](#button-group)
|
|
11
16
|
|
|
12
17
|
## Button
|
|
13
18
|
|
|
14
|
-
Relaxed, text based actions for high level page decisions (Cancel, Save, etc.)
|
|
19
|
+
Relaxed, text based actions for high level page, or surface decisions (Cancel, Save, etc.)
|
|
15
20
|
|
|
16
21
|
<Gallery minColumnWidth="350px">
|
|
17
22
|
|
|
23
|
+
<Showcase
|
|
24
|
+
title="Baseline"
|
|
25
|
+
description="The default, out-of-the-box button with no additional props."
|
|
26
|
+
of={ActionStories.ButtonBaselineShowcase}
|
|
27
|
+
width="180px"
|
|
28
|
+
/>
|
|
29
|
+
|
|
18
30
|
<Showcase
|
|
19
31
|
title="Hierarchy"
|
|
20
32
|
description="Visually indicates the importance of an action and its relationship to other actions. A primary action should be limited to one per surface."
|
|
@@ -93,6 +105,13 @@ Compact, icon-based actions. Used as re-usable tooling for item rows, utility b
|
|
|
93
105
|
|
|
94
106
|
<Gallery>
|
|
95
107
|
|
|
108
|
+
<Showcase
|
|
109
|
+
title="Baseline"
|
|
110
|
+
description="The default, out-of-the-box utility button with no additional props."
|
|
111
|
+
of={ActionStories.SlimButtonBaselineShowcase}
|
|
112
|
+
width="180px"
|
|
113
|
+
/>
|
|
114
|
+
|
|
96
115
|
<Showcase
|
|
97
116
|
title="Hierarchy"
|
|
98
117
|
description="Visually indicates the importance of an action and its relationship to other actions. A primary action should be limited to one per surface."
|
|
@@ -129,3 +148,47 @@ Compact, icon-based actions. Used as re-usable tooling for item rows, utility b
|
|
|
129
148
|
/>
|
|
130
149
|
|
|
131
150
|
</Gallery>
|
|
151
|
+
|
|
152
|
+
## Button Group
|
|
153
|
+
|
|
154
|
+
Visually grouped and styled buttons for closely related actions. The `hierarchy` and `size` props set on the ButtonGroup are automatically inherited by all child Button elements, ensuring visual consistency without needing to configure each button individually.
|
|
155
|
+
|
|
156
|
+
<Gallery minColumnWidth="380px">
|
|
157
|
+
|
|
158
|
+
<Showcase
|
|
159
|
+
title="Baseline"
|
|
160
|
+
description="The default, out-of-the-box button group with no additional props."
|
|
161
|
+
of={ActionStories.ButtonGroupBaselineShowcase}
|
|
162
|
+
/>
|
|
163
|
+
|
|
164
|
+
<Showcase
|
|
165
|
+
title="Hierarchy"
|
|
166
|
+
description="Set hierarchy on the parent ButtonGroup to style all child buttons uniformly. Individual buttons do not need hierarchy props—they inherit from the group."
|
|
167
|
+
of={ActionStories.ButtonGroupHierarchy}
|
|
168
|
+
/>
|
|
169
|
+
|
|
170
|
+
<Showcase
|
|
171
|
+
title="Size"
|
|
172
|
+
description="Set size on the parent ButtonGroup to control all child button sizes uniformly. Individual buttons inherit the group's size automatically."
|
|
173
|
+
of={ActionStories.ButtonGroupSizes}
|
|
174
|
+
/>
|
|
175
|
+
|
|
176
|
+
<Showcase
|
|
177
|
+
title="Disabled"
|
|
178
|
+
description="Individual buttons within a group can be disabled while others remain active."
|
|
179
|
+
of={ActionStories.ButtonGroupDisabled}
|
|
180
|
+
/>
|
|
181
|
+
|
|
182
|
+
<Showcase
|
|
183
|
+
title="Severity"
|
|
184
|
+
description="Severity can still be set on individual buttons within a group if a specific action should be elevated."
|
|
185
|
+
of={ActionStories.ButtonGroupSeverity}
|
|
186
|
+
/>
|
|
187
|
+
|
|
188
|
+
<Showcase
|
|
189
|
+
title="With Icons"
|
|
190
|
+
description="Buttons within groups can contain icons, either standalone or combined with text."
|
|
191
|
+
of={ActionStories.ButtonGroupWithIcons}
|
|
192
|
+
/>
|
|
193
|
+
|
|
194
|
+
</Gallery>
|
|
@@ -4,6 +4,7 @@ import { VStack } from '../../stacks/v_stack.js';
|
|
|
4
4
|
import { Spacer } from '../../stacks/spacer.js';
|
|
5
5
|
import { Button } from '../button/button/button.js';
|
|
6
6
|
import { SlimButton } from '../button/slim_button/slim_button.js';
|
|
7
|
+
import { ButtonGroup } from '../button/button_group/button_group.js';
|
|
7
8
|
import { SearchIcon } from '@tcn/icons/search_icon.js';
|
|
8
9
|
import { PlusIcon } from '@tcn/icons/plus_icon.js';
|
|
9
10
|
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
@@ -83,6 +84,18 @@ const severityOptions: { name: string; severity: ActionSeverity }[] = [
|
|
|
83
84
|
},
|
|
84
85
|
];
|
|
85
86
|
|
|
87
|
+
// ============================================================================
|
|
88
|
+
// BASELINE
|
|
89
|
+
// ============================================================================
|
|
90
|
+
|
|
91
|
+
export const ButtonBaselineShowcase: Story = {
|
|
92
|
+
render: () => (
|
|
93
|
+
<HStack gap="12px" vAlign="center">
|
|
94
|
+
<Button>Baseline</Button>
|
|
95
|
+
</HStack>
|
|
96
|
+
),
|
|
97
|
+
};
|
|
98
|
+
|
|
86
99
|
// ============================================================================
|
|
87
100
|
// HIERARCHY EXAMPLES
|
|
88
101
|
// ============================================================================
|
|
@@ -220,8 +233,22 @@ export const FullWidth: Story = {
|
|
|
220
233
|
|
|
221
234
|
export const SeverityShowcase: Story = {
|
|
222
235
|
render: () => (
|
|
223
|
-
<HStack vAlign="center">
|
|
224
|
-
<VStack gap="12px" vAlign="center" width="
|
|
236
|
+
<HStack vAlign="center" gap="12px">
|
|
237
|
+
<VStack gap="12px" vAlign="center" width="120px">
|
|
238
|
+
{severityOptions.map(({ name, severity }) => (
|
|
239
|
+
<Button key={name} hierarchy="tertiary" severity={severity} width="100%">
|
|
240
|
+
{name}
|
|
241
|
+
</Button>
|
|
242
|
+
))}
|
|
243
|
+
</VStack>
|
|
244
|
+
<VStack gap="12px" vAlign="center" width="120px">
|
|
245
|
+
{severityOptions.map(({ name, severity }) => (
|
|
246
|
+
<Button key={name} hierarchy="secondary" severity={severity} width="100%">
|
|
247
|
+
{name}
|
|
248
|
+
</Button>
|
|
249
|
+
))}
|
|
250
|
+
</VStack>
|
|
251
|
+
<VStack gap="12px" vAlign="center" width="120px">
|
|
225
252
|
{severityOptions.map(({ name, severity }) => (
|
|
226
253
|
<Button key={name} hierarchy="primary" severity={severity} width="100%">
|
|
227
254
|
{name}
|
|
@@ -236,6 +263,16 @@ export const SeverityShowcase: Story = {
|
|
|
236
263
|
// SLIM BUTTON EXAMPLES
|
|
237
264
|
// ============================================================================
|
|
238
265
|
|
|
266
|
+
export const SlimButtonBaselineShowcase: Story = {
|
|
267
|
+
render: () => (
|
|
268
|
+
<HStack gap="12px" vAlign="center">
|
|
269
|
+
<SlimButton>
|
|
270
|
+
<SearchIcon />
|
|
271
|
+
</SlimButton>
|
|
272
|
+
</HStack>
|
|
273
|
+
),
|
|
274
|
+
};
|
|
275
|
+
|
|
239
276
|
export const SlimButtonHierarchy: Story = {
|
|
240
277
|
render: () => (
|
|
241
278
|
<HStack gap="12px" vAlign="center">
|
|
@@ -307,3 +344,138 @@ export const SlimButtonSeverity: Story = {
|
|
|
307
344
|
</HStack>
|
|
308
345
|
),
|
|
309
346
|
};
|
|
347
|
+
|
|
348
|
+
// ============================================================================
|
|
349
|
+
// BUTTON GROUP EXAMPLES
|
|
350
|
+
// ============================================================================
|
|
351
|
+
|
|
352
|
+
export const ButtonGroupBaselineShowcase: Story = {
|
|
353
|
+
render: () => (
|
|
354
|
+
<HStack gap="12px" vAlign="center">
|
|
355
|
+
<ButtonGroup>
|
|
356
|
+
<Button>First</Button>
|
|
357
|
+
<Button>Second</Button>
|
|
358
|
+
<Button>Third</Button>
|
|
359
|
+
</ButtonGroup>
|
|
360
|
+
</HStack>
|
|
361
|
+
),
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
export const ButtonGroupHierarchy: Story = {
|
|
365
|
+
render: () => (
|
|
366
|
+
<VStack gap="12px" hAlign="start">
|
|
367
|
+
<ButtonGroup hierarchy="tertiary">
|
|
368
|
+
<Button>First</Button>
|
|
369
|
+
<Button>Second</Button>
|
|
370
|
+
<Button>Third</Button>
|
|
371
|
+
</ButtonGroup>
|
|
372
|
+
<ButtonGroup hierarchy="secondary">
|
|
373
|
+
<Button>First</Button>
|
|
374
|
+
<Button>Second</Button>
|
|
375
|
+
<Button>Third</Button>
|
|
376
|
+
</ButtonGroup>
|
|
377
|
+
<ButtonGroup hierarchy="primary">
|
|
378
|
+
<Button>First</Button>
|
|
379
|
+
<Button>Second</Button>
|
|
380
|
+
<Button>Third</Button>
|
|
381
|
+
</ButtonGroup>
|
|
382
|
+
</VStack>
|
|
383
|
+
),
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
export const ButtonGroupSeverity: Story = {
|
|
387
|
+
render: () => (
|
|
388
|
+
<VStack gap="12px" hAlign="start">
|
|
389
|
+
<ButtonGroup hierarchy="tertiary">
|
|
390
|
+
<Button>First</Button>
|
|
391
|
+
<Button>Second</Button>
|
|
392
|
+
<Button severity="dangerous">Dangerous</Button>
|
|
393
|
+
</ButtonGroup>
|
|
394
|
+
<ButtonGroup hierarchy="secondary">
|
|
395
|
+
<Button>First</Button>
|
|
396
|
+
<Button>Second</Button>
|
|
397
|
+
<Button severity="cautious">Cautious</Button>
|
|
398
|
+
</ButtonGroup>
|
|
399
|
+
<ButtonGroup hierarchy="tertiary">
|
|
400
|
+
<Button>First</Button>
|
|
401
|
+
<Button>Second</Button>
|
|
402
|
+
<Button severity="neutral">Neutral</Button>
|
|
403
|
+
</ButtonGroup>
|
|
404
|
+
<ButtonGroup hierarchy="secondary">
|
|
405
|
+
<Button>First</Button>
|
|
406
|
+
<Button>Second</Button>
|
|
407
|
+
<Button severity="suggested">Suggested</Button>
|
|
408
|
+
</ButtonGroup>
|
|
409
|
+
<ButtonGroup hierarchy="primary">
|
|
410
|
+
<Button>First</Button>
|
|
411
|
+
<Button>Second</Button>
|
|
412
|
+
<Button severity="encouraged">Encouraged</Button>
|
|
413
|
+
</ButtonGroup>
|
|
414
|
+
</VStack>
|
|
415
|
+
),
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
export const ButtonGroupSizes: Story = {
|
|
419
|
+
render: () => (
|
|
420
|
+
<VStack gap="12px" hAlign="start">
|
|
421
|
+
<ButtonGroup size="sm">
|
|
422
|
+
<Button>Small</Button>
|
|
423
|
+
<Button>Group</Button>
|
|
424
|
+
</ButtonGroup>
|
|
425
|
+
<ButtonGroup size="md">
|
|
426
|
+
<Button>Medium</Button>
|
|
427
|
+
<Button>Group</Button>
|
|
428
|
+
</ButtonGroup>
|
|
429
|
+
<ButtonGroup size="lg">
|
|
430
|
+
<Button>Large</Button>
|
|
431
|
+
<Button>Group</Button>
|
|
432
|
+
</ButtonGroup>
|
|
433
|
+
</VStack>
|
|
434
|
+
),
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
export const ButtonGroupDisabled: Story = {
|
|
438
|
+
render: () => (
|
|
439
|
+
<VStack gap="12px" hAlign="start">
|
|
440
|
+
<ButtonGroup hierarchy="tertiary">
|
|
441
|
+
<Button>Active</Button>
|
|
442
|
+
<Button disabled>Disabled</Button>
|
|
443
|
+
<Button>Active</Button>
|
|
444
|
+
</ButtonGroup>
|
|
445
|
+
<ButtonGroup hierarchy="secondary">
|
|
446
|
+
<Button>Active</Button>
|
|
447
|
+
<Button disabled>Disabled</Button>
|
|
448
|
+
<Button>Active</Button>
|
|
449
|
+
</ButtonGroup>
|
|
450
|
+
<ButtonGroup hierarchy="primary">
|
|
451
|
+
<Button>Active</Button>
|
|
452
|
+
<Button disabled>Disabled</Button>
|
|
453
|
+
<Button>Active</Button>
|
|
454
|
+
</ButtonGroup>
|
|
455
|
+
</VStack>
|
|
456
|
+
),
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
export const ButtonGroupWithIcons: Story = {
|
|
460
|
+
render: () => (
|
|
461
|
+
<VStack gap="12px" hAlign="start">
|
|
462
|
+
<ButtonGroup>
|
|
463
|
+
<Button>
|
|
464
|
+
First
|
|
465
|
+
<Spacer width="6px" />
|
|
466
|
+
<PlusIcon />
|
|
467
|
+
</Button>
|
|
468
|
+
<Button>
|
|
469
|
+
Second
|
|
470
|
+
<Spacer width="6px" />
|
|
471
|
+
<SearchIcon />
|
|
472
|
+
</Button>
|
|
473
|
+
<Button>
|
|
474
|
+
Third
|
|
475
|
+
<Spacer width="6px" />
|
|
476
|
+
<PlusIcon />
|
|
477
|
+
</Button>
|
|
478
|
+
</ButtonGroup>
|
|
479
|
+
</VStack>
|
|
480
|
+
),
|
|
481
|
+
};
|