@tcn/ui 0.3.0 → 0.3.2
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/Color-ASIRERSW-B4GaVKuQ.js +990 -0
- package/dist/Color-ASIRERSW-B4GaVKuQ.js.map +1 -0
- package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js +1485 -0
- package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js.map +1 -0
- package/dist/actions/__docs__/components/gallery.d.ts +8 -0
- package/dist/actions/__docs__/components/gallery.d.ts.map +1 -0
- package/dist/actions/__docs__/components/gallery.js +20 -0
- package/dist/actions/__docs__/components/gallery.js.map +1 -0
- package/dist/actions/__docs__/components/showcase.d.ts +27 -0
- package/dist/actions/__docs__/components/showcase.d.ts.map +1 -0
- package/dist/actions/__docs__/components/showcase.js +15 -0
- package/dist/actions/__docs__/components/showcase.js.map +1 -0
- package/dist/actions/button/base_button/base_button.d.ts +2 -0
- package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
- package/dist/actions/button/base_button/base_button.js +30 -28
- package/dist/actions/button/base_button/base_button.js.map +1 -1
- package/dist/actions/button/button/button.js +6 -6
- 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 +11 -8
- package/dist/actions/button/button_group/button_group.js.map +1 -1
- package/dist/actions/button/select_group/select_group.js +15 -15
- package/dist/actions/button/select_group/select_group.js.map +1 -1
- package/dist/actions/button/select_group/single_select_group.js +6 -6
- package/dist/actions/button/slim_button/slim_button.js +2 -2
- package/dist/actions/types.d.ts +2 -0
- package/dist/actions/types.d.ts.map +1 -0
- 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/loading/loading.js +12 -12
- package/dist/feedback/loading/loading.js.map +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 +1 -1
- 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 +8 -7
- 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 +20 -14
- package/dist/form/field/common/status_input/status_input.js.map +1 -1
- package/dist/form/field/field.js +5 -5
- package/dist/form/field/h_field/h_field.js +11 -11
- package/dist/form/field/h_field/h_field.js.map +1 -1
- package/dist/form/field/v_field/v_field.js +8 -8
- package/dist/form/field/v_field/v_field.js.map +1 -1
- package/dist/form/field_set/field_set.d.ts.map +1 -1
- package/dist/form/field_set/field_set.js +19 -12
- package/dist/form/field_set/field_set.js.map +1 -1
- package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js +6 -0
- package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js.map +1 -0
- package/dist/frame.css +1 -1
- package/dist/gallery.css +1 -0
- 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 +15 -15
- 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 +14 -14
- package/dist/inputs/color_input/color_picker.js.map +1 -1
- package/dist/inputs/combo_box/combo_box.js +16 -16
- package/dist/inputs/combo_box/combo_box.js.map +1 -1
- package/dist/inputs/date_picker/date_picker.js +26 -26
- package/dist/inputs/date_picker/date_picker.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_body.js +3 -3
- 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 +18 -18
- 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 +6 -6
- package/dist/inputs/input/input.js.map +1 -1
- package/dist/inputs/mask_input/key_capture_input.js +7 -7
- package/dist/inputs/mask_input/mask_input.js +4 -4
- package/dist/inputs/multi_combo_box/multi_combo_box.js +17 -17
- package/dist/inputs/multiselect/multiselect.d.ts.map +1 -1
- package/dist/inputs/multiselect/multiselect.js +23 -22
- 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 +104 -91
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/radio/radio.js +18 -18
- package/dist/inputs/radio/radio.js.map +1 -1
- package/dist/inputs/radio/radio_row.js +3 -3
- package/dist/inputs/select/select.d.ts.map +1 -1
- package/dist/inputs/select/select.js +40 -40
- package/dist/inputs/select/select.js.map +1 -1
- package/dist/inputs/slider/slider.js +9 -9
- 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 +16 -16
- package/dist/inputs/switch/switch.js.map +1 -1
- package/dist/inputs/textarea/textarea.js +4 -4
- package/dist/inputs/textarea/textarea.js.map +1 -1
- package/dist/inputs/unit_input/unit_input.js +12 -12
- 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/body/v_body.js +6 -6
- package/dist/layouts/column/column.js +14 -14
- 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/footer/footer.js +7 -7
- package/dist/layouts/grid/grid.d.ts.map +1 -1
- package/dist/layouts/grid/grid.js +40 -31
- package/dist/layouts/grid/grid.js.map +1 -1
- package/dist/layouts/header/header.js +5 -5
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/list/item.js +2 -2
- package/dist/layouts/list/list.js +7 -7
- package/dist/layouts/list/section_header.d.ts.map +1 -1
- package/dist/layouts/list/section_header.js +17 -7
- package/dist/layouts/list/section_header.js.map +1 -1
- package/dist/layouts/scaffold/scaffold.js +16 -16
- package/dist/layouts/sidebar_end/sidebar_end.js +25 -25
- package/dist/layouts/sidebar_end/sidebar_end.js.map +1 -1
- package/dist/layouts/sidebar_start/sidebar_start.js +21 -21
- 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 +12 -17
- 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/overlay/context_menu/context_menu.js +5 -5
- package/dist/overlay/context_menu/context_menu.js.map +1 -1
- package/dist/overlay/frame/frame.js +4 -4
- package/dist/overlay/menu/menu.js +35 -35
- 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 +6 -5
- package/dist/overlay/portal/portal_platform.js.map +1 -1
- package/dist/overlay/portal/portal_platform_context.js +4 -4
- 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/showcase-WfP6kBEb.js +58401 -0
- package/dist/showcase-WfP6kBEb.js.map +1 -0
- package/dist/showcase.css +1 -0
- 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 +24 -24
- 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 +10 -6
- package/dist/stacks/h_collapsible_box.js.map +1 -1
- package/dist/stacks/h_stack.js +45 -45
- package/dist/stacks/h_stack.js.map +1 -1
- package/dist/stacks/spacer.js +16 -16
- package/dist/stacks/spacer.js.map +1 -1
- package/dist/stacks/story_components/circle.js +9 -9
- 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 +13 -9
- package/dist/stacks/story_components/picture_placeholder.js.map +1 -1
- package/dist/stacks/story_components/rect.js +5 -5
- package/dist/stacks/story_components/rect.js.map +1 -1
- package/dist/stacks/story_components/style_box.js +4 -4
- package/dist/stacks/utils/use_is_collapsed.js +6 -6
- 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 +45 -45
- package/dist/stacks/v_stack.js.map +1 -1
- package/dist/stacks/z_stack.js +39 -39
- 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 +3 -3
- package/dist/surfaces/alert/alert.js.map +1 -1
- package/dist/surfaces/card/card.js +4 -4
- package/dist/surfaces/confirm/confirm.d.ts.map +1 -1
- package/dist/surfaces/confirm/confirm.js +27 -20
- 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 +3 -3
- package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +1 -1
- package/dist/surfaces/drawers/drawer_top/drawer_top.js +3 -3
- package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +1 -1
- package/dist/surfaces/modal/modal.js +5 -5
- package/dist/surfaces/page/h_page.js +7 -7
- package/dist/surfaces/page/h_page.js.map +1 -1
- package/dist/surfaces/page/v_page.js +7 -7
- package/dist/surfaces/page/v_page.js.map +1 -1
- package/dist/surfaces/panel/h_panel.js +14 -14
- package/dist/surfaces/panel/v_panel.js +9 -9
- package/dist/surfaces/pop_confirm/pop_confirm.js +6 -6
- package/dist/surfaces/popconfirm/pop_confirm.js +8 -8
- package/dist/surfaces/popover/popover.js +1 -1
- package/dist/surfaces/popover/popover.js.map +1 -1
- package/dist/surfaces/tooltip/tooltip.js +8 -8
- package/dist/surfaces/window/window.js +9 -9
- package/dist/switch.css +1 -1
- package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js +3777 -0
- package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js.map +1 -0
- package/dist/tethered.css +1 -1
- package/dist/textarea.css +1 -1
- package/dist/themes/stylesheets/reset.css +1 -0
- package/dist/themes/stylesheets/reset.js +133 -131
- package/dist/themes/stylesheets/reset.js.map +1 -1
- package/dist/themes/theme.d.ts.map +1 -1
- package/dist/themes/theme.js +15 -6
- 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.js +505 -515
- 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 +1034 -1168
- 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 +13 -13
- package/dist/tokens/badge/badge.js.map +1 -1
- package/dist/tokens/bubble/bubble.js +6 -5
- package/dist/tokens/bubble/bubble.js.map +1 -1
- package/dist/tokens/chip/chip.js +4 -3
- 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/click_away_listener.js +10 -10
- package/dist/utils/click_away_listener.js.map +1 -1
- package/dist/utils/dnd/draggable/draggable.js +4 -4
- package/dist/utils/dnd/handle.js +8 -8
- package/dist/utils/focus_redirect.js +5 -5
- package/dist/utils/hooks/make_context_hook.js +4 -4
- package/dist/utils/hooks/use_media_query.js +2 -2
- package/dist/utils/hooks/use_media_query.js.map +1 -1
- package/dist/v_body.css +1 -1
- package/dist/window.css +1 -1
- package/package.json +3 -3
- package/src/actions/__docs__/actions.mdx +194 -0
- package/src/actions/__docs__/actions.stories.tsx +481 -0
- package/src/actions/__docs__/components/gallery.module.css +6 -0
- package/src/actions/__docs__/components/gallery.tsx +28 -0
- package/src/actions/__docs__/components/showcase.module.css +55 -0
- package/src/actions/__docs__/components/showcase.tsx +121 -0
- 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 +6 -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/actions/types.ts +6 -0
- 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 +30 -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 +56 -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 +47 -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/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 +5 -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/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 +133 -131
- package/src/themes/theme.tsx +17 -0
- package/src/themes/themes/ergo/ergo_theme.css +505 -515
- package/src/themes/themes/windows_98/windows_98.css +1030 -1164
- 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/dnd/draggable/draggable.module.css +8 -6
- 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
|
@@ -4,6 +4,11 @@ import { Spacer } from '../../../stacks/spacer.js';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Button } from '../button/button.js';
|
|
6
6
|
import { ButtonGroup } from '../button_group/button_group.js';
|
|
7
|
+
import { SlimButton } from '../slim_button/slim_button.js';
|
|
8
|
+
import { PlusIcon } from '@tcn/icons/plus_icon.js';
|
|
9
|
+
import { SearchIcon } from '@tcn/icons/search_icon.js';
|
|
10
|
+
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
11
|
+
import { VStack } from '../../../stacks/v_stack.js';
|
|
7
12
|
|
|
8
13
|
export default {
|
|
9
14
|
title: 'Actions/Button Group',
|
|
@@ -104,3 +109,61 @@ export function PrimaryCustomColor() {
|
|
|
104
109
|
</ButtonGroup>
|
|
105
110
|
);
|
|
106
111
|
}
|
|
112
|
+
|
|
113
|
+
export function SlimButtonGroup() {
|
|
114
|
+
return (
|
|
115
|
+
<VStack gap="12px">
|
|
116
|
+
<ButtonGroup hierarchy="tertiary">
|
|
117
|
+
<SlimButton>
|
|
118
|
+
<CrossIcon />
|
|
119
|
+
</SlimButton>
|
|
120
|
+
<SlimButton>
|
|
121
|
+
<SearchIcon />
|
|
122
|
+
</SlimButton>
|
|
123
|
+
<SlimButton>
|
|
124
|
+
<PlusIcon />
|
|
125
|
+
</SlimButton>
|
|
126
|
+
</ButtonGroup>
|
|
127
|
+
<ButtonGroup hierarchy="secondary">
|
|
128
|
+
<SlimButton>
|
|
129
|
+
<CrossIcon />
|
|
130
|
+
</SlimButton>
|
|
131
|
+
<SlimButton>
|
|
132
|
+
<SearchIcon />
|
|
133
|
+
</SlimButton>
|
|
134
|
+
<SlimButton>
|
|
135
|
+
<PlusIcon />
|
|
136
|
+
</SlimButton>
|
|
137
|
+
</ButtonGroup>
|
|
138
|
+
<ButtonGroup hierarchy="primary">
|
|
139
|
+
<SlimButton>
|
|
140
|
+
<CrossIcon />
|
|
141
|
+
</SlimButton>
|
|
142
|
+
<SlimButton>
|
|
143
|
+
<SearchIcon />
|
|
144
|
+
</SlimButton>
|
|
145
|
+
<SlimButton>
|
|
146
|
+
<PlusIcon />
|
|
147
|
+
</SlimButton>
|
|
148
|
+
</ButtonGroup>
|
|
149
|
+
</VStack>
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function MixedTesting() {
|
|
154
|
+
return (
|
|
155
|
+
<ButtonGroup hierarchy="primary">
|
|
156
|
+
<SlimButton>
|
|
157
|
+
<SearchIcon />
|
|
158
|
+
</SlimButton>
|
|
159
|
+
<SlimButton>
|
|
160
|
+
<PlusIcon />
|
|
161
|
+
</SlimButton>
|
|
162
|
+
<Button>
|
|
163
|
+
Third
|
|
164
|
+
<Spacer width="4px" />
|
|
165
|
+
<LockTwoIcon />
|
|
166
|
+
</Button>
|
|
167
|
+
</ButtonGroup>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
@@ -4,6 +4,9 @@ import { Spacer } from '../../../stacks/spacer.js';
|
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import { SelectGroup } from '../select_group/select_group.js';
|
|
6
6
|
import { SingleSelectGroup } from '../select_group/single_select_group.js';
|
|
7
|
+
import { TextBoldIcon } from '@tcn/icons/text_bold_icon.js';
|
|
8
|
+
import { TextItalicIcon } from '@tcn/icons/text_italic_icon.js';
|
|
9
|
+
import { TextUnderlineIcon } from '@tcn/icons/text_underline_icon.js';
|
|
7
10
|
|
|
8
11
|
export default {
|
|
9
12
|
title: 'Actions/Select Group',
|
|
@@ -17,14 +20,36 @@ export default {
|
|
|
17
20
|
},
|
|
18
21
|
};
|
|
19
22
|
|
|
20
|
-
function useSBSelectGroupState() {
|
|
21
|
-
const [value, setValue] = useState<string[]>(
|
|
23
|
+
function useSBSelectGroupState(initialValue: string[] = []) {
|
|
24
|
+
const [value, setValue] = useState<string[]>(initialValue);
|
|
22
25
|
const handleChange = (newValue: string[]) => {
|
|
23
26
|
setValue(newValue);
|
|
24
27
|
};
|
|
25
28
|
return { value, setValue, handleChange };
|
|
26
29
|
}
|
|
27
30
|
|
|
31
|
+
export function Baseline() {
|
|
32
|
+
const { value, handleChange } = useSBSelectGroupState();
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<SelectGroup value={value} onChange={handleChange}>
|
|
36
|
+
<option value="1" title="First">
|
|
37
|
+
First
|
|
38
|
+
</option>
|
|
39
|
+
<option value="2" title="Second">
|
|
40
|
+
Second
|
|
41
|
+
</option>
|
|
42
|
+
<option value="3" title="Third">
|
|
43
|
+
<HStack inline width="auto">
|
|
44
|
+
Third
|
|
45
|
+
<Spacer width="4px" />
|
|
46
|
+
<LockTwoIcon />
|
|
47
|
+
</HStack>
|
|
48
|
+
</option>
|
|
49
|
+
</SelectGroup>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
28
53
|
export function FullyDisabled() {
|
|
29
54
|
const { value, handleChange } = useSBSelectGroupState();
|
|
30
55
|
|
|
@@ -70,7 +95,7 @@ export function Multiselect() {
|
|
|
70
95
|
}
|
|
71
96
|
|
|
72
97
|
export function Disabled() {
|
|
73
|
-
const { value, handleChange } = useSBSelectGroupState();
|
|
98
|
+
const { value, handleChange } = useSBSelectGroupState(['3']);
|
|
74
99
|
|
|
75
100
|
return (
|
|
76
101
|
<SelectGroup value={value} onChange={handleChange}>
|
|
@@ -80,7 +105,7 @@ export function Disabled() {
|
|
|
80
105
|
<option value="2" disabled title="Second">
|
|
81
106
|
Second
|
|
82
107
|
</option>
|
|
83
|
-
<option value="3" title="Third">
|
|
108
|
+
<option value="3" title="Third" disabled>
|
|
84
109
|
<HStack inline width="auto">
|
|
85
110
|
Third
|
|
86
111
|
<Spacer width="4px" />
|
|
@@ -154,3 +179,21 @@ export function SingleSelectDisabled() {
|
|
|
154
179
|
</SingleSelectGroup>
|
|
155
180
|
);
|
|
156
181
|
}
|
|
182
|
+
|
|
183
|
+
export function SelectUtilityGroup() {
|
|
184
|
+
const { value, handleChange } = useSBSelectGroupState();
|
|
185
|
+
|
|
186
|
+
return (
|
|
187
|
+
<SelectGroup value={value} onChange={handleChange}>
|
|
188
|
+
<option value="bold" title="Bold">
|
|
189
|
+
<TextBoldIcon />
|
|
190
|
+
</option>
|
|
191
|
+
<option value="italic" title="Italic">
|
|
192
|
+
<TextItalicIcon />
|
|
193
|
+
</option>
|
|
194
|
+
<option value="underline" title="Underline">
|
|
195
|
+
<TextUnderlineIcon />
|
|
196
|
+
</option>
|
|
197
|
+
</SelectGroup>
|
|
198
|
+
);
|
|
199
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
@layer tcn-system {
|
|
2
|
+
:where(.base-button) {
|
|
3
|
+
width: auto;
|
|
4
|
+
height: auto;
|
|
5
|
+
word-break: break-word;
|
|
6
|
+
overflow-wrap: break-word;
|
|
7
|
+
color: var(--tcn-button-text-color, #fff);
|
|
8
|
+
background-color: var(--tcn-button-color, var(--accent-color, #ccc));
|
|
9
|
+
}
|
|
9
10
|
|
|
10
|
-
.base-button[data-width="default"] {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
:where(.base-button[data-width="default"]) {
|
|
12
|
+
width: auto;
|
|
13
|
+
flex-grow: 0;
|
|
14
|
+
flex-shrink: 0;
|
|
15
|
+
flex-basis: auto;
|
|
16
|
+
}
|
|
15
17
|
}
|
|
@@ -5,11 +5,13 @@ import { HStack } from '../../../stacks/h_stack.js';
|
|
|
5
5
|
import type { HStackOwnProps } from '../../../stacks/h_stack.js';
|
|
6
6
|
import styles from './base_button.module.css';
|
|
7
7
|
import type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';
|
|
8
|
+
import type { ActionSeverity } from '../../types.js';
|
|
8
9
|
|
|
9
10
|
export interface BaseButtonOwnProps {
|
|
10
11
|
hierarchy?: Hierarchy;
|
|
11
12
|
size?: Size;
|
|
12
13
|
color?: string;
|
|
14
|
+
severity?: ActionSeverity;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
export type BaseButtonWithStackProps = BaseButtonOwnProps &
|
|
@@ -27,6 +29,7 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
|
|
|
27
29
|
style,
|
|
28
30
|
color,
|
|
29
31
|
hierarchy = 'secondary',
|
|
32
|
+
severity = 'neutral',
|
|
30
33
|
size = 'md',
|
|
31
34
|
onTouchStart,
|
|
32
35
|
onContextMenu,
|
|
@@ -55,7 +58,8 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
|
|
|
55
58
|
};
|
|
56
59
|
|
|
57
60
|
if (color) {
|
|
58
|
-
finalStyle['--
|
|
61
|
+
finalStyle['--tcn-interactive-color'] = color;
|
|
62
|
+
finalStyle['--tcn-button-color'] = color;
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
return (
|
|
@@ -65,6 +69,7 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
|
|
|
65
69
|
inline
|
|
66
70
|
vAlign="center"
|
|
67
71
|
hAlign="center"
|
|
72
|
+
data-severity={severity}
|
|
68
73
|
data-hierarchy={hierarchy}
|
|
69
74
|
data-size={size}
|
|
70
75
|
data-is-disabled={Boolean(props.disabled)}
|
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
@layer tcn-system {
|
|
2
|
+
:where(.button) {
|
|
3
|
+
--button-height: calc(26px * var(--scalar, 1));
|
|
4
|
+
--button-color: var(--accent-color);
|
|
5
|
+
--button-color-hover: color-mix(in srgb, var(--button-color) 90%, black);
|
|
6
|
+
--button-color-active: color-mix(in srgb, var(--button-color) 75%, black);
|
|
7
|
+
--button-color-disabled: var(--status-disabled, #cccccc);
|
|
8
|
+
|
|
9
|
+
min-height: var(--button-height);
|
|
10
|
+
width: auto;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
font-size: calc(14px * var(--scalar, 1));
|
|
13
|
+
line-height: calc(16px * var(--scalar, 1));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Sizes */
|
|
17
|
+
:where(.button[data-size="sm"]) {
|
|
18
|
+
--button-height: calc(22px * var(--scalar, 1));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(.button[data-size="md"]) {
|
|
22
|
+
--button-height: calc(26px * var(--scalar, 1));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:where(.button[data-size="lg"]) {
|
|
26
|
+
--button-height: calc(32px * var(--scalar, 1));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Button Text Sizes */
|
|
30
|
+
:where(.button[data-size="sm"] .button-text) {
|
|
31
|
+
font-size: calc(12px * var(--scalar, 1));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where(.button[data-size="md"] .button-text) {
|
|
35
|
+
font-size: calc(14px * var(--scalar, 1));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(.button[data-size="lg"] .button-text) {
|
|
39
|
+
font-size: calc(16px * var(--scalar, 1));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(.button[data-size="sm"]) {
|
|
43
|
+
font-size: calc(12px * var(--scalar, 1));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where(.button[data-size="md"]) {
|
|
47
|
+
font-size: calc(14px * var(--scalar, 1));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(.button[data-size="lg"]) {
|
|
51
|
+
font-size: calc(16px * var(--scalar, 1));
|
|
52
|
+
}
|
|
51
53
|
}
|
|
@@ -1,67 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
@layer tcn-system {
|
|
2
|
+
:where(.button-group) {
|
|
3
|
+
--button-background: var(--surface-color, transparent);
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
}
|
|
5
6
|
|
|
6
|
-
:where(.button-group-button) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
7
|
+
:where(.button-group-button) {
|
|
8
|
+
background-color: var(--button-background);
|
|
9
|
+
z-index: 1;
|
|
10
|
+
}
|
|
10
11
|
|
|
11
|
-
:where(.button-group-divider) {
|
|
12
|
-
|
|
13
|
-
}
|
|
12
|
+
:where(.button-group-divider) {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
14
15
|
|
|
15
|
-
.button-group-button:not(:first-child) {
|
|
16
|
-
|
|
17
|
-
}
|
|
16
|
+
:where(.button-group-button:not(:first-child)) {
|
|
17
|
+
margin-left: -1px;
|
|
18
|
+
}
|
|
18
19
|
|
|
19
|
-
.button-group-button:is(:focus, :focus-visible, :hover, :active) {
|
|
20
|
-
|
|
21
|
-
}
|
|
20
|
+
:where(.button-group-button:is(:focus, :focus-visible, :hover, :active)) {
|
|
21
|
+
z-index: 2;
|
|
22
|
+
}
|
|
22
23
|
|
|
23
|
-
.button-group-button:not(:first-child),
|
|
24
|
-
.button-group-button:not(:last-child) {
|
|
25
|
-
|
|
26
|
-
}
|
|
24
|
+
:where(.button-group-button:not(:first-child)),
|
|
25
|
+
:where(.button-group-button:not(:last-child)) {
|
|
26
|
+
border-radius: 0px;
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
.button-group-button:last-child {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
29
|
+
:where(.button-group-button:last-child) {
|
|
30
|
+
border-end-end-radius: 4px;
|
|
31
|
+
border-start-end-radius: 4px;
|
|
32
|
+
}
|
|
32
33
|
|
|
33
|
-
.button-group-button:first-child {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
34
|
+
:where(.button-group-button:first-child) {
|
|
35
|
+
border-start-start-radius: 4px;
|
|
36
|
+
border-end-start-radius: 4px;
|
|
37
|
+
}
|
|
37
38
|
|
|
38
|
-
.button-group-button:last-child {
|
|
39
|
-
|
|
40
|
-
}
|
|
39
|
+
:where(.button-group-button:last-child) {
|
|
40
|
+
border-inline-start-width: 0;
|
|
41
|
+
}
|
|
41
42
|
|
|
42
|
-
.button-group-button:first-child {
|
|
43
|
-
|
|
44
|
-
}
|
|
43
|
+
:where(.button-group-button:first-child) {
|
|
44
|
+
border-inline-end-width: 0;
|
|
45
|
+
}
|
|
45
46
|
|
|
46
|
-
.button-group-button:only-child {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
47
|
+
:where(.button-group-button:only-child) {
|
|
48
|
+
border-inline-end-width: 1px;
|
|
49
|
+
border-inline-start-width: 1px;
|
|
50
|
+
}
|
|
50
51
|
|
|
51
|
-
/* Sizes */
|
|
52
|
-
:where(.button-group[data-size="sm"]) {
|
|
53
|
-
|
|
54
|
-
}
|
|
52
|
+
/* Sizes */
|
|
53
|
+
:where(.button-group[data-size="sm"]) {
|
|
54
|
+
--button-height: calc(22px * var(--scalar, 1));
|
|
55
|
+
}
|
|
55
56
|
|
|
56
|
-
:where(.button-group[data-size="md"]) {
|
|
57
|
-
|
|
58
|
-
}
|
|
57
|
+
:where(.button-group[data-size="md"]) {
|
|
58
|
+
--button-height: calc(26px * var(--scalar, 1));
|
|
59
|
+
}
|
|
59
60
|
|
|
60
|
-
:where(.button-group[data-size="lg"]) {
|
|
61
|
-
|
|
62
|
-
}
|
|
61
|
+
:where(.button-group[data-size="lg"]) {
|
|
62
|
+
--button-height: calc(32px * var(--scalar, 1));
|
|
63
|
+
}
|
|
63
64
|
|
|
64
|
-
/* Disabled */
|
|
65
|
-
:where(.button-group-button[data-is-disabled="true"]) {
|
|
66
|
-
|
|
65
|
+
/* Disabled */
|
|
66
|
+
:where(.button-group-button[data-is-disabled="true"]) {
|
|
67
|
+
z-index: 0;
|
|
68
|
+
}
|
|
67
69
|
}
|
|
@@ -9,7 +9,9 @@ import styles from './button_group.module.css';
|
|
|
9
9
|
export interface ButtonGroupOwnProps {
|
|
10
10
|
hierarchy?: Hierarchy;
|
|
11
11
|
size?: Size;
|
|
12
|
-
children:
|
|
12
|
+
children:
|
|
13
|
+
| React.ReactElement<Omit<ButtonProps, 'hierarchy'>>
|
|
14
|
+
| React.ReactElement<Omit<ButtonProps, 'hierarchy'>>[];
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
export type ButtonGroupProps = WithDetailedHTMLProps<ButtonGroupOwnProps, 'div'>;
|
|
@@ -32,7 +34,7 @@ export const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(
|
|
|
32
34
|
height="auto"
|
|
33
35
|
data-hierarchy={hierarchy}
|
|
34
36
|
data-size={size}
|
|
35
|
-
className={clsx(styles['button-group'], 'button-group', className)}
|
|
37
|
+
className={clsx(styles['button-group'], 'tcn-button-group', className)}
|
|
36
38
|
{...props}
|
|
37
39
|
>
|
|
38
40
|
{buttons.map((button, i) => {
|
|
@@ -44,7 +46,7 @@ export const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(
|
|
|
44
46
|
{...button.props}
|
|
45
47
|
className={clsx(
|
|
46
48
|
styles['button-group-button'],
|
|
47
|
-
'button-group-button',
|
|
49
|
+
'tcn-button-group-button',
|
|
48
50
|
button.props.className
|
|
49
51
|
)}
|
|
50
52
|
hierarchy={hierarchy}
|
|
@@ -52,7 +54,10 @@ export const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(
|
|
|
52
54
|
/>
|
|
53
55
|
{!isLast && (
|
|
54
56
|
<div
|
|
55
|
-
className={clsx(
|
|
57
|
+
className={clsx(
|
|
58
|
+
styles['button-group-divider'],
|
|
59
|
+
'tcn-button-group-divider'
|
|
60
|
+
)}
|
|
56
61
|
data-hierarchy={hierarchy}
|
|
57
62
|
data-size={size}
|
|
58
63
|
/>
|
|
@@ -1,67 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
@layer tcn-system {
|
|
2
|
+
:where(.select-group) {
|
|
3
|
+
--button-background: var(--surface-color, transparent);
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
}
|
|
5
6
|
|
|
6
|
-
.select-group-option {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
7
|
+
:where(.select-group-option) {
|
|
8
|
+
background-color: var(--button-background);
|
|
9
|
+
z-index: 1;
|
|
10
|
+
}
|
|
10
11
|
|
|
11
|
-
.select-group-divider {
|
|
12
|
-
|
|
13
|
-
}
|
|
12
|
+
:where(.select-group-divider) {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
14
15
|
|
|
15
|
-
.select-group-option:not(:first-child) {
|
|
16
|
-
|
|
17
|
-
}
|
|
16
|
+
:where(.select-group-option:not(:first-child)) {
|
|
17
|
+
margin-left: -1px;
|
|
18
|
+
}
|
|
18
19
|
|
|
19
|
-
.select-group-option:is(:focus, :focus-visible, :hover, :active) {
|
|
20
|
-
|
|
21
|
-
}
|
|
20
|
+
:where(.select-group-option:is(:focus, :focus-visible, :hover, :active)) {
|
|
21
|
+
z-index: 2;
|
|
22
|
+
}
|
|
22
23
|
|
|
23
|
-
.select-group-option:not(:first-child),
|
|
24
|
-
.select-group-option:not(:last-child) {
|
|
25
|
-
|
|
26
|
-
}
|
|
24
|
+
:where(.select-group-option:not(:first-child)),
|
|
25
|
+
:where(.select-group-option:not(:last-child)) {
|
|
26
|
+
border-radius: 0px;
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
.select-group-option:last-child {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
29
|
+
:where(.select-group-option:last-child) {
|
|
30
|
+
border-end-end-radius: 4px;
|
|
31
|
+
border-start-end-radius: 4px;
|
|
32
|
+
}
|
|
32
33
|
|
|
33
|
-
.select-group-option:first-child {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
34
|
+
:where(.select-group-option:first-child) {
|
|
35
|
+
border-start-start-radius: 4px;
|
|
36
|
+
border-end-start-radius: 4px;
|
|
37
|
+
}
|
|
37
38
|
|
|
38
|
-
.select-group-option:last-child {
|
|
39
|
-
|
|
40
|
-
}
|
|
39
|
+
:where(.select-group-option:last-child) {
|
|
40
|
+
border-inline-start-width: 0;
|
|
41
|
+
}
|
|
41
42
|
|
|
42
|
-
.select-group-option:first-child {
|
|
43
|
-
|
|
44
|
-
}
|
|
43
|
+
:where(.select-group-option:first-child) {
|
|
44
|
+
border-inline-end-width: 0;
|
|
45
|
+
}
|
|
45
46
|
|
|
46
|
-
.select-group-option:only-child {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
47
|
+
:where(.select-group-option:only-child) {
|
|
48
|
+
border-inline-end-width: 1px;
|
|
49
|
+
border-inline-start-width: 1px;
|
|
50
|
+
}
|
|
50
51
|
|
|
51
|
-
/* Sizes */
|
|
52
|
-
.select-group[data-size="sm"] {
|
|
53
|
-
|
|
54
|
-
}
|
|
52
|
+
/* Sizes */
|
|
53
|
+
:where(.select-group[data-size="sm"]) {
|
|
54
|
+
--button-height: calc(22px * var(--scalar, 1));
|
|
55
|
+
}
|
|
55
56
|
|
|
56
|
-
.select-group[data-size="md"] {
|
|
57
|
-
|
|
58
|
-
}
|
|
57
|
+
:where(.select-group[data-size="md"]) {
|
|
58
|
+
--button-height: calc(26px * var(--scalar, 1));
|
|
59
|
+
}
|
|
59
60
|
|
|
60
|
-
.select-group[data-size="lg"] {
|
|
61
|
-
|
|
62
|
-
}
|
|
61
|
+
:where(.select-group[data-size="lg"]) {
|
|
62
|
+
--button-height: calc(32px * var(--scalar, 1));
|
|
63
|
+
}
|
|
63
64
|
|
|
64
|
-
/* Disabled */
|
|
65
|
-
.select-group-option[data-is-disabled="true"] {
|
|
66
|
-
|
|
65
|
+
/* Disabled */
|
|
66
|
+
:where(.select-group-option[data-is-disabled="true"]) {
|
|
67
|
+
z-index: 0;
|
|
68
|
+
}
|
|
67
69
|
}
|
|
@@ -49,7 +49,7 @@ export const SelectGroup = React.forwardRef(function ButtonGroup(
|
|
|
49
49
|
width="auto"
|
|
50
50
|
height="auto"
|
|
51
51
|
data-is-disabled={disabled}
|
|
52
|
-
className={clsx(styles['select-group'], 'select-group', className)}
|
|
52
|
+
className={clsx(styles['select-group'], 'tcn-select-group', className)}
|
|
53
53
|
{...props}
|
|
54
54
|
>
|
|
55
55
|
{options.map((option, i) => {
|
|
@@ -63,7 +63,7 @@ export const SelectGroup = React.forwardRef(function ButtonGroup(
|
|
|
63
63
|
<Button
|
|
64
64
|
disabled={disabled || option.props.disabled}
|
|
65
65
|
data-is-disabled={disabled || option.props.disabled}
|
|
66
|
-
className={clsx(styles['select-group-option'], 'select-group-option')}
|
|
66
|
+
className={clsx(styles['select-group-option'], 'tcn-select-group-option')}
|
|
67
67
|
hierarchy={isSelected ? 'primary' : 'secondary'}
|
|
68
68
|
onClick={select}
|
|
69
69
|
value={option.props.value}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
@layer tcn-system {
|
|
2
|
+
:where(.slim-button) {
|
|
3
|
+
min-height: auto;
|
|
4
|
+
}
|
|
4
5
|
|
|
5
|
-
.slim-button[data-is-disabled="true"] {
|
|
6
|
-
|
|
6
|
+
:where(.slim-button[data-is-disabled="true"]) {
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
}
|
|
7
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer tcn-reset, tcn-system, tcn-theme;
|