@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
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { HStack } from '../../stacks/h_stack.js';
|
|
3
|
+
import { VStack } from '../../stacks/v_stack.js';
|
|
4
|
+
import { Spacer } from '../../stacks/spacer.js';
|
|
5
|
+
import { Button } from '../button/button/button.js';
|
|
6
|
+
import { SlimButton } from '../button/slim_button/slim_button.js';
|
|
7
|
+
import { ButtonGroup } from '../button/button_group/button_group.js';
|
|
8
|
+
import { SearchIcon } from '@tcn/icons/search_icon.js';
|
|
9
|
+
import { PlusIcon } from '@tcn/icons/plus_icon.js';
|
|
10
|
+
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
11
|
+
import type { ActionSeverity } from '../types.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* These stories are used exclusively by the MDX documentation.
|
|
15
|
+
* They are hidden from the Storybook sidebar using tags.
|
|
16
|
+
*/
|
|
17
|
+
const meta: Meta<typeof Button> = {
|
|
18
|
+
title: 'Catalog/Actions',
|
|
19
|
+
component: Button,
|
|
20
|
+
parameters: {
|
|
21
|
+
docs: {
|
|
22
|
+
story: { exclude: ['style'] },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
// Hide these stories from the sidebar - they're only for MDX docs
|
|
27
|
+
tags: ['!autodocs', '!dev'],
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof Button>;
|
|
32
|
+
|
|
33
|
+
// ============================================================================
|
|
34
|
+
// Utility Code
|
|
35
|
+
// ============================================================================
|
|
36
|
+
|
|
37
|
+
const tcnBrandedColors = [
|
|
38
|
+
{
|
|
39
|
+
name: 'Integrated Infrastructure',
|
|
40
|
+
action: '27, 15%, 43%',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Omnichannel Communications',
|
|
44
|
+
action: '197, 34%, 40%',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Workforce Engagement',
|
|
48
|
+
action: '23, 65%, 42%',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Integration and Automation',
|
|
52
|
+
action: '139, 21%, 39%',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Compliance and Data Management',
|
|
56
|
+
action: '49, 50%, 34%',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Intelligence, Reporting, and Analytics',
|
|
60
|
+
action: '214, 14%, 45%',
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const severityOptions: { name: string; severity: ActionSeverity }[] = [
|
|
65
|
+
{
|
|
66
|
+
name: 'Dangerous',
|
|
67
|
+
severity: 'dangerous',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Cautious',
|
|
71
|
+
severity: 'cautious',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Neutral',
|
|
75
|
+
severity: 'neutral',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Suggested',
|
|
79
|
+
severity: 'suggested',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'Encouraged',
|
|
83
|
+
severity: 'encouraged',
|
|
84
|
+
},
|
|
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
|
+
|
|
99
|
+
// ============================================================================
|
|
100
|
+
// HIERARCHY EXAMPLES
|
|
101
|
+
// ============================================================================
|
|
102
|
+
|
|
103
|
+
export const HierarchyShowcase: Story = {
|
|
104
|
+
render: () => (
|
|
105
|
+
<HStack gap="12px" vAlign="center">
|
|
106
|
+
<Button hierarchy="tertiary">Tertiary</Button>
|
|
107
|
+
<Button hierarchy="secondary">Secondary</Button>
|
|
108
|
+
<Button hierarchy="primary">Primary</Button>
|
|
109
|
+
</HStack>
|
|
110
|
+
),
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// ============================================================================
|
|
114
|
+
// SIZE EXAMPLES
|
|
115
|
+
// ============================================================================
|
|
116
|
+
|
|
117
|
+
export const SizeShowcase: Story = {
|
|
118
|
+
render: () => (
|
|
119
|
+
<HStack gap="12px" vAlign="center">
|
|
120
|
+
<Button size="sm">Small</Button>
|
|
121
|
+
<Button size="md">Medium</Button>
|
|
122
|
+
<Button size="lg">Large</Button>
|
|
123
|
+
</HStack>
|
|
124
|
+
),
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// ============================================================================
|
|
128
|
+
// DISABLED EXAMPLES
|
|
129
|
+
// ============================================================================
|
|
130
|
+
|
|
131
|
+
export const DisabledShowcase: Story = {
|
|
132
|
+
render: () => (
|
|
133
|
+
<HStack gap="12px" vAlign="center">
|
|
134
|
+
<VStack gap="12px" vAlign="center" width="200px">
|
|
135
|
+
<Button hierarchy="tertiary" disabled width="100%">
|
|
136
|
+
Tertiary Disabled
|
|
137
|
+
</Button>
|
|
138
|
+
<Button hierarchy="secondary" disabled width="100%">
|
|
139
|
+
Secondary Disabled
|
|
140
|
+
</Button>
|
|
141
|
+
<Button hierarchy="primary" disabled width="100%">
|
|
142
|
+
Primary Disabled
|
|
143
|
+
</Button>
|
|
144
|
+
</VStack>
|
|
145
|
+
</HStack>
|
|
146
|
+
),
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// ============================================================================
|
|
150
|
+
// WITH ICONS
|
|
151
|
+
// ============================================================================
|
|
152
|
+
|
|
153
|
+
export const IconShowcase: Story = {
|
|
154
|
+
render: () => (
|
|
155
|
+
<VStack gap="12px" vAlign="center">
|
|
156
|
+
<HStack gap="12px" vAlign="center">
|
|
157
|
+
<Button hierarchy="tertiary">
|
|
158
|
+
Cancel
|
|
159
|
+
<Spacer width="6px" />
|
|
160
|
+
<CrossIcon size="sm" />
|
|
161
|
+
</Button>
|
|
162
|
+
<Button hierarchy="secondary">
|
|
163
|
+
Search
|
|
164
|
+
<Spacer width="6px" />
|
|
165
|
+
<SearchIcon size="sm" />
|
|
166
|
+
</Button>
|
|
167
|
+
<Button hierarchy="primary">
|
|
168
|
+
Add
|
|
169
|
+
<Spacer width="6px" />
|
|
170
|
+
<PlusIcon size="sm" />
|
|
171
|
+
</Button>
|
|
172
|
+
</HStack>
|
|
173
|
+
<HStack gap="12px" vAlign="center">
|
|
174
|
+
<Button hierarchy="tertiary">
|
|
175
|
+
<CrossIcon size="sm" />
|
|
176
|
+
<Spacer width="6px" />
|
|
177
|
+
Cancel
|
|
178
|
+
</Button>
|
|
179
|
+
<Button hierarchy="secondary">
|
|
180
|
+
<SearchIcon size="sm" />
|
|
181
|
+
<Spacer width="6px" />
|
|
182
|
+
Search
|
|
183
|
+
</Button>
|
|
184
|
+
<Button hierarchy="primary">
|
|
185
|
+
<PlusIcon size="sm" />
|
|
186
|
+
<Spacer width="6px" />
|
|
187
|
+
Add
|
|
188
|
+
</Button>
|
|
189
|
+
</HStack>
|
|
190
|
+
</VStack>
|
|
191
|
+
),
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// ============================================================================
|
|
195
|
+
// CUSTOM COLORS
|
|
196
|
+
// ============================================================================
|
|
197
|
+
|
|
198
|
+
export const ColorShowcase: Story = {
|
|
199
|
+
render: () => (
|
|
200
|
+
<HStack vAlign="center" gap="12px">
|
|
201
|
+
<VStack gap="12px" vAlign="center" width="200px">
|
|
202
|
+
{tcnBrandedColors.map(({ name, action }) => (
|
|
203
|
+
<Button key={name} hierarchy="primary" color={action} width="100%">
|
|
204
|
+
{name}
|
|
205
|
+
</Button>
|
|
206
|
+
))}
|
|
207
|
+
</VStack>
|
|
208
|
+
</HStack>
|
|
209
|
+
),
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
// ============================================================================
|
|
213
|
+
// FULL WIDTH
|
|
214
|
+
// ============================================================================
|
|
215
|
+
|
|
216
|
+
export const FullWidth: Story = {
|
|
217
|
+
render: () => (
|
|
218
|
+
<HStack vAlign="center">
|
|
219
|
+
<VStack gap="12px" vAlign="center" width="200px">
|
|
220
|
+
<Button hierarchy="tertiary" width="100%">
|
|
221
|
+
Full Width Tertiary
|
|
222
|
+
</Button>
|
|
223
|
+
<Button hierarchy="secondary" width="100%">
|
|
224
|
+
Full Width Secondary
|
|
225
|
+
</Button>
|
|
226
|
+
<Button hierarchy="primary" width="100%">
|
|
227
|
+
Full Width Primary
|
|
228
|
+
</Button>
|
|
229
|
+
</VStack>
|
|
230
|
+
</HStack>
|
|
231
|
+
),
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export const SeverityShowcase: Story = {
|
|
235
|
+
render: () => (
|
|
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">
|
|
252
|
+
{severityOptions.map(({ name, severity }) => (
|
|
253
|
+
<Button key={name} hierarchy="primary" severity={severity} width="100%">
|
|
254
|
+
{name}
|
|
255
|
+
</Button>
|
|
256
|
+
))}
|
|
257
|
+
</VStack>
|
|
258
|
+
</HStack>
|
|
259
|
+
),
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
// ============================================================================
|
|
263
|
+
// SLIM BUTTON EXAMPLES
|
|
264
|
+
// ============================================================================
|
|
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
|
+
|
|
276
|
+
export const SlimButtonHierarchy: Story = {
|
|
277
|
+
render: () => (
|
|
278
|
+
<HStack gap="12px" vAlign="center">
|
|
279
|
+
<SlimButton hierarchy="tertiary">
|
|
280
|
+
<CrossIcon />
|
|
281
|
+
</SlimButton>
|
|
282
|
+
<SlimButton hierarchy="secondary">
|
|
283
|
+
<SearchIcon />
|
|
284
|
+
</SlimButton>
|
|
285
|
+
<SlimButton hierarchy="primary">
|
|
286
|
+
<PlusIcon />
|
|
287
|
+
</SlimButton>
|
|
288
|
+
</HStack>
|
|
289
|
+
),
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export const SlimButtonSizes: Story = {
|
|
293
|
+
render: () => (
|
|
294
|
+
<HStack gap="12px" vAlign="center">
|
|
295
|
+
<SlimButton size="sm" hierarchy="primary">
|
|
296
|
+
<PlusIcon />
|
|
297
|
+
</SlimButton>
|
|
298
|
+
<SlimButton size="md" hierarchy="primary">
|
|
299
|
+
<PlusIcon />
|
|
300
|
+
</SlimButton>
|
|
301
|
+
<SlimButton size="lg" hierarchy="primary">
|
|
302
|
+
<PlusIcon />
|
|
303
|
+
</SlimButton>
|
|
304
|
+
</HStack>
|
|
305
|
+
),
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
export const SlimButtonDisabled: Story = {
|
|
309
|
+
render: () => (
|
|
310
|
+
<HStack gap="12px" vAlign="center">
|
|
311
|
+
<SlimButton hierarchy="tertiary" disabled>
|
|
312
|
+
<CrossIcon />
|
|
313
|
+
</SlimButton>
|
|
314
|
+
<SlimButton hierarchy="secondary" disabled>
|
|
315
|
+
<SearchIcon />
|
|
316
|
+
</SlimButton>
|
|
317
|
+
<SlimButton hierarchy="primary" disabled>
|
|
318
|
+
<PlusIcon />
|
|
319
|
+
</SlimButton>
|
|
320
|
+
</HStack>
|
|
321
|
+
),
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
export const SlimButtonColors: Story = {
|
|
325
|
+
render: () => (
|
|
326
|
+
<HStack gap="12px" vAlign="center">
|
|
327
|
+
{tcnBrandedColors.map(({ name, action }) => (
|
|
328
|
+
<SlimButton key={name} hierarchy="primary" color={action}>
|
|
329
|
+
<SearchIcon />
|
|
330
|
+
</SlimButton>
|
|
331
|
+
))}
|
|
332
|
+
</HStack>
|
|
333
|
+
),
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
export const SlimButtonSeverity: Story = {
|
|
337
|
+
render: () => (
|
|
338
|
+
<HStack gap="12px" vAlign="center">
|
|
339
|
+
{severityOptions.map(({ name, severity }) => (
|
|
340
|
+
<SlimButton key={name} hierarchy="primary" severity={severity}>
|
|
341
|
+
<CrossIcon />
|
|
342
|
+
</SlimButton>
|
|
343
|
+
))}
|
|
344
|
+
</HStack>
|
|
345
|
+
),
|
|
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
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './gallery.module.css';
|
|
3
|
+
|
|
4
|
+
export interface GalleryProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
minColumnWidth?: string;
|
|
7
|
+
maxGalleryWidth?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Gallery: React.FC<GalleryProps> = ({
|
|
11
|
+
children,
|
|
12
|
+
minColumnWidth = '300px',
|
|
13
|
+
maxGalleryWidth = '1200px',
|
|
14
|
+
}) => {
|
|
15
|
+
return (
|
|
16
|
+
<section
|
|
17
|
+
className={styles.container}
|
|
18
|
+
style={
|
|
19
|
+
{
|
|
20
|
+
'--min-column-width': minColumnWidth,
|
|
21
|
+
'--max-gallery-width': maxGalleryWidth,
|
|
22
|
+
} as React.CSSProperties
|
|
23
|
+
}
|
|
24
|
+
>
|
|
25
|
+
{children}
|
|
26
|
+
</section>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.showcase {
|
|
2
|
+
border: 1px solid var(--docs-border-color, #e5e7eb);
|
|
3
|
+
background-color: var(--docs-card-bg, #fff);
|
|
4
|
+
border-radius: 8px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
height: fit-content;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.toolbar {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
padding: 8px 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.header {
|
|
17
|
+
min-height: 48px;
|
|
18
|
+
background-color: var(--docs-header-bg, #fafafa);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.title {
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
color: var(--docs-text-color, #1f2937);
|
|
25
|
+
margin: 0px !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.subtitle {
|
|
29
|
+
background-color: var(--docs-header-bg, #fafafa);
|
|
30
|
+
flex-grow: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.documentation {
|
|
34
|
+
color: var(--docs-text-muted, #6b7280);
|
|
35
|
+
padding: 0px 16px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.description {
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
color: var(--docs-text-muted, #6b7280);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.content {
|
|
44
|
+
min-height: 200px;
|
|
45
|
+
background-color: red;
|
|
46
|
+
width: 100%;
|
|
47
|
+
border: none !important;
|
|
48
|
+
box-shadow: none !important;
|
|
49
|
+
margin: 0px !important;
|
|
50
|
+
border-radius: 0px !important;
|
|
51
|
+
|
|
52
|
+
:global(.docs-story) {
|
|
53
|
+
min-height: 200px !important;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Canvas } from '@storybook/addon-docs/blocks';
|
|
3
|
+
import { HStack } from '../../../stacks/index.js';
|
|
4
|
+
import styles from './showcase.module.css';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
export interface ShowcaseProps {
|
|
8
|
+
/** Title displayed at the top of the card */
|
|
9
|
+
title?: string;
|
|
10
|
+
// A concise description of the showcase
|
|
11
|
+
description?: React.ReactNode;
|
|
12
|
+
/** The story to render */
|
|
13
|
+
of: any;
|
|
14
|
+
/** Width of the card */
|
|
15
|
+
minWidth?: string;
|
|
16
|
+
maxWidth?: string;
|
|
17
|
+
// Addition documentation for the showcase
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Example card component for MDX documentation.
|
|
23
|
+
* Displays as a cohesive card with header, content, and footer.
|
|
24
|
+
*/
|
|
25
|
+
export const Showcase: React.FC<ShowcaseProps> = ({
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
of,
|
|
29
|
+
minWidth = '300px',
|
|
30
|
+
maxWidth = '600px',
|
|
31
|
+
children,
|
|
32
|
+
}: ShowcaseProps) => (
|
|
33
|
+
<div
|
|
34
|
+
style={{
|
|
35
|
+
minWidth,
|
|
36
|
+
maxWidth,
|
|
37
|
+
height: 'fit-content',
|
|
38
|
+
}}
|
|
39
|
+
className={styles.showcase}
|
|
40
|
+
>
|
|
41
|
+
<HStack className={clsx(styles.header, styles.toolbar)}>
|
|
42
|
+
<h4 className={styles.title}>{title}</h4>
|
|
43
|
+
</HStack>
|
|
44
|
+
<HStack className={clsx(styles.subtitle, styles.toolbar)} vAlign="start">
|
|
45
|
+
<div className={styles.description}>{description}</div>
|
|
46
|
+
</HStack>
|
|
47
|
+
<HStack className={clsx(styles.subtitle, styles.toolbar)} vAlign="start">
|
|
48
|
+
<div className={styles.documentation}>{children}</div>
|
|
49
|
+
</HStack>
|
|
50
|
+
<Canvas
|
|
51
|
+
className={styles.content}
|
|
52
|
+
layout="centered"
|
|
53
|
+
of={of}
|
|
54
|
+
sourceState={'hidden'}
|
|
55
|
+
story={{
|
|
56
|
+
inline: true,
|
|
57
|
+
}}
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Section component - displays examples in a flex row that wraps.
|
|
64
|
+
*/
|
|
65
|
+
export const Section = ({
|
|
66
|
+
title,
|
|
67
|
+
description,
|
|
68
|
+
children,
|
|
69
|
+
maxWidth = '100%',
|
|
70
|
+
}: {
|
|
71
|
+
title: string;
|
|
72
|
+
description?: React.ReactNode;
|
|
73
|
+
children: React.ReactNode;
|
|
74
|
+
maxWidth?: string;
|
|
75
|
+
}) => {
|
|
76
|
+
return (
|
|
77
|
+
<section
|
|
78
|
+
style={{
|
|
79
|
+
maxWidth,
|
|
80
|
+
marginBottom: '48px',
|
|
81
|
+
}}
|
|
82
|
+
>
|
|
83
|
+
{/* Section Header */}
|
|
84
|
+
<div style={{ marginBottom: '24px' }}>
|
|
85
|
+
<h2
|
|
86
|
+
style={{
|
|
87
|
+
margin: '0 0 8px 0',
|
|
88
|
+
fontSize: '20px',
|
|
89
|
+
fontWeight: 600,
|
|
90
|
+
color: 'var(--docs-text-color, #1f2937)',
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
{title}
|
|
94
|
+
</h2>
|
|
95
|
+
{description && (
|
|
96
|
+
<p
|
|
97
|
+
style={{
|
|
98
|
+
margin: 0,
|
|
99
|
+
fontSize: '14px',
|
|
100
|
+
color: 'var(--docs-text-muted, #6b7280)',
|
|
101
|
+
lineHeight: 1.6,
|
|
102
|
+
}}
|
|
103
|
+
>
|
|
104
|
+
{description}
|
|
105
|
+
</p>
|
|
106
|
+
)}
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
{/* Cards Grid - Flex row with wrap */}
|
|
110
|
+
<div
|
|
111
|
+
style={{
|
|
112
|
+
display: 'flex',
|
|
113
|
+
flexWrap: 'wrap',
|
|
114
|
+
gap: '20px',
|
|
115
|
+
}}
|
|
116
|
+
>
|
|
117
|
+
{children}
|
|
118
|
+
</div>
|
|
119
|
+
</section>
|
|
120
|
+
);
|
|
121
|
+
};
|