@tcn/ui 0.0.3 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
- package/dist/actions/button/base_button/base_button.js +20 -15
- package/dist/actions/button/base_button/base_button.js.map +1 -1
- package/dist/actions/button/button/button.d.ts.map +1 -1
- package/dist/actions/button/button/button.js +7 -7
- package/dist/actions/button/button/button.js.map +1 -1
- package/dist/actions/button/button_group/button_group.d.ts.map +1 -1
- package/dist/actions/button/button_group/button_group.js +2 -5
- package/dist/actions/button/button_group/button_group.js.map +1 -1
- package/dist/actions/button/select_group/select_group.js +7 -7
- package/dist/actions/button/select_group/select_group.js.map +1 -1
- package/dist/actions/button/slim_button/slim_button.d.ts.map +1 -1
- package/dist/actions/button/slim_button/slim_button.js +5 -5
- package/dist/actions/button/slim_button/slim_button.js.map +1 -1
- package/dist/button.css +1 -1
- package/dist/feedback/progress/progress_bar.js +1 -1
- package/dist/footer.css +1 -1
- package/dist/form/field/common/field_control/field_control.js +6 -6
- package/dist/form/field/common/field_control/field_control.js.map +1 -1
- package/dist/form/field/common/field_description.js +1 -1
- package/dist/form/field/common/field_error.js +2 -2
- package/dist/form/field/common/field_header.js +8 -8
- package/dist/form/field/common/field_header.js.map +1 -1
- package/dist/form/field/common/field_label.js +1 -1
- package/dist/form/field/common/status_input/status_input.d.ts.map +1 -1
- package/dist/form/field/common/status_input/status_input.js +9 -15
- package/dist/form/field/common/status_input/status_input.js.map +1 -1
- package/dist/form/field/h_field/h_field.js +9 -9
- package/dist/form/field/h_field/h_field.js.map +1 -1
- package/dist/form/field/v_field/v_field.js +8 -8
- package/dist/form/field/v_field/v_field.js.map +1 -1
- package/dist/form/field_set/field_set.d.ts.map +1 -1
- package/dist/form/field_set/field_set.js +12 -19
- package/dist/form/field_set/field_set.js.map +1 -1
- package/dist/inputs/checkbox/checkbox.js +12 -12
- package/dist/inputs/checkbox/checkbox.js.map +1 -1
- package/dist/inputs/color_input/color_input.d.ts.map +1 -1
- package/dist/inputs/color_input/color_input.js +13 -17
- package/dist/inputs/color_input/color_input.js.map +1 -1
- package/dist/inputs/color_input/color_picker.js +6 -6
- package/dist/inputs/color_input/color_picker.js.map +1 -1
- package/dist/inputs/combo_box/combo_box.js +15 -15
- package/dist/inputs/combo_box/combo_box.js.map +1 -1
- package/dist/inputs/date_picker/date_picker.js +6 -6
- package/dist/inputs/date_picker/date_picker.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_date.js +13 -13
- package/dist/inputs/date_picker/date_picker_date.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_day.js +1 -1
- package/dist/inputs/date_picker/date_picker_header.js +24 -24
- package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_input.js +19 -19
- package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_time_selector.d.ts.map +1 -1
- package/dist/inputs/date_picker/date_picker_time_selector.js +6 -9
- package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_input.js +3 -3
- package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_selector.d.ts.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_selector.js +18 -24
- package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
- package/dist/inputs/input/input.d.ts +2 -2
- package/dist/inputs/input/input.d.ts.map +1 -1
- package/dist/inputs/input/input.js +4 -4
- package/dist/inputs/input/input.js.map +1 -1
- package/dist/inputs/multi_combo_box/multi_combo_box.js +1 -1
- package/dist/inputs/multi_combo_box/multi_combo_box.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_values.js +8 -8
- package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
- package/dist/inputs/options/option.d.ts +1 -0
- package/dist/inputs/options/option.d.ts.map +1 -1
- package/dist/inputs/options/option.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts +6 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +169 -128
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/radio/radio.js +14 -14
- package/dist/inputs/radio/radio.js.map +1 -1
- package/dist/inputs/select/select.js +16 -16
- package/dist/inputs/select/select.js.map +1 -1
- package/dist/inputs/slider/slider.js +7 -7
- package/dist/inputs/slider/slider.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.d.ts +1 -1
- package/dist/inputs/suggestions/suggestion_item.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.js +23 -18
- package/dist/inputs/suggestions/suggestion_item.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +105 -95
- package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
- package/dist/inputs/switch/switch.js +14 -14
- package/dist/inputs/switch/switch.js.map +1 -1
- package/dist/inputs/textarea/textarea.js +6 -6
- package/dist/inputs/textarea/textarea.js.map +1 -1
- package/dist/inputs/unit_input/unit_input.js +5 -5
- package/dist/inputs/unit_input/unit_input.js.map +1 -1
- package/dist/layouts/body/h_body.js +10 -10
- package/dist/layouts/body/h_body.js.map +1 -1
- package/dist/layouts/body/v_body.js +8 -8
- package/dist/layouts/body/v_body.js.map +1 -1
- package/dist/layouts/column/column.js +16 -16
- package/dist/layouts/column/column.js.map +1 -1
- package/dist/layouts/divider/divider.js +9 -9
- package/dist/layouts/divider/divider.js.map +1 -1
- package/dist/layouts/footer/footer.js +6 -6
- package/dist/layouts/footer/footer.js.map +1 -1
- package/dist/layouts/grid/grid.d.ts.map +1 -1
- package/dist/layouts/grid/grid.js +22 -31
- package/dist/layouts/grid/grid.js.map +1 -1
- package/dist/layouts/header/header.js +11 -11
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/index.d.ts +3 -2
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +26 -24
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/list/item.d.ts +1 -0
- package/dist/layouts/list/item.d.ts.map +1 -1
- package/dist/layouts/list/item.js +18 -7
- package/dist/layouts/list/item.js.map +1 -1
- package/dist/layouts/list/list.js +12 -12
- package/dist/layouts/list/list.js.map +1 -1
- package/dist/layouts/sidebar_end/sidebar_end.js +15 -15
- package/dist/layouts/sidebar_end/sidebar_end.js.map +1 -1
- package/dist/layouts/sidebar_start/sidebar_start.js +16 -16
- package/dist/layouts/sidebar_start/sidebar_start.js.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.js +14 -14
- package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
- package/dist/modal.css +1 -1
- package/dist/overlay/context_menu/context_menu.js +4 -4
- package/dist/overlay/index.js +3 -3
- package/dist/overlay/menu/menu.js +8 -8
- package/dist/overlay/menu/menu.js.map +1 -1
- package/dist/overlay/popper/popper.js +12 -12
- package/dist/{portal-qqIp4SIl.js → overlay/portal/portal.js} +3 -3
- package/dist/overlay/portal/portal.js.map +1 -0
- package/dist/overlay/portal/portal_platform.js +3 -4
- package/dist/overlay/portal/portal_platform.js.map +1 -1
- package/dist/overlay/tooltip/tooltip.js +10 -10
- package/dist/overlay/tooltip/tooltip.js.map +1 -1
- package/dist/phone_number_input.css +1 -1
- package/dist/slim_button.css +1 -1
- package/dist/stacks/box/bottom_resize_handle.js +9 -9
- package/dist/stacks/box/bottom_resize_handle.js.map +1 -1
- package/dist/stacks/box/box.js +42 -42
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/stacks/box/end_resize_handle.js +6 -6
- package/dist/stacks/box/end_resize_handle.js.map +1 -1
- package/dist/stacks/box/left_resize_handle.js +3 -3
- package/dist/stacks/box/left_resize_handle.js.map +1 -1
- package/dist/stacks/box/right_resize_handle.js +8 -8
- package/dist/stacks/box/right_resize_handle.js.map +1 -1
- package/dist/stacks/box/start_resize_handle.js +7 -7
- package/dist/stacks/box/start_resize_handle.js.map +1 -1
- package/dist/stacks/box/top_resize_handle.js +8 -8
- package/dist/stacks/box/top_resize_handle.js.map +1 -1
- package/dist/stacks/h_collapsible_box.js +5 -5
- package/dist/stacks/h_collapsible_box.js.map +1 -1
- package/dist/stacks/h_stack.js +26 -26
- package/dist/stacks/h_stack.js.map +1 -1
- package/dist/stacks/spacer.js +5 -5
- package/dist/stacks/spacer.js.map +1 -1
- package/dist/stacks/story_components/circle.js +6 -6
- package/dist/stacks/story_components/circle.js.map +1 -1
- package/dist/stacks/story_components/picture_placeholder.js +8 -8
- package/dist/stacks/story_components/picture_placeholder.js.map +1 -1
- package/dist/stacks/story_components/rect.js +11 -11
- package/dist/stacks/story_components/rect.js.map +1 -1
- package/dist/stacks/v_collapsible_box.js +8 -8
- package/dist/stacks/v_collapsible_box.js.map +1 -1
- package/dist/stacks/v_stack.js +35 -35
- package/dist/stacks/v_stack.js.map +1 -1
- package/dist/stacks/z_stack.js +34 -34
- package/dist/stacks/z_stack.js.map +1 -1
- package/dist/surfaces/alert/alert.js +8 -8
- package/dist/surfaces/alert/alert.js.map +1 -1
- package/dist/surfaces/card/card.d.ts.map +1 -1
- package/dist/surfaces/card/card.js +6 -15
- package/dist/surfaces/card/card.js.map +1 -1
- package/dist/surfaces/confirm/confirm.d.ts.map +1 -1
- package/dist/surfaces/confirm/confirm.js +17 -24
- package/dist/surfaces/confirm/confirm.js.map +1 -1
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js +5 -5
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +1 -1
- package/dist/surfaces/drawers/drawer_end/drawer_end.js +8 -8
- package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +1 -1
- package/dist/surfaces/drawers/drawer_start/drawer_start.js +4 -4
- package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +1 -1
- package/dist/surfaces/drawers/drawer_top/drawer_top.js +4 -4
- package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +1 -1
- package/dist/surfaces/modal/modal.d.ts +2 -4
- package/dist/surfaces/modal/modal.d.ts.map +1 -1
- package/dist/surfaces/modal/modal.js +16 -7
- package/dist/surfaces/modal/modal.js.map +1 -1
- package/dist/surfaces/page/h_page.js +6 -6
- package/dist/surfaces/page/h_page.js.map +1 -1
- package/dist/surfaces/page/v_page.js +9 -9
- package/dist/surfaces/page/v_page.js.map +1 -1
- package/dist/surfaces/panel/h_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/h_panel.js +18 -24
- package/dist/surfaces/panel/h_panel.js.map +1 -1
- package/dist/surfaces/panel/v_panel.js +9 -9
- package/dist/surfaces/panel/v_panel.js.map +1 -1
- package/dist/surfaces/popover/popover.js +34 -34
- package/dist/surfaces/popover/popover.js.map +1 -1
- package/dist/surfaces/window/window.d.ts.map +1 -1
- package/dist/surfaces/window/window.js +6 -14
- package/dist/surfaces/window/window.js.map +1 -1
- package/dist/themes/index.d.ts +0 -2
- package/dist/themes/index.d.ts.map +1 -1
- package/dist/themes/index.js +6 -402
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/stylesheets/reset.js +140 -0
- package/dist/themes/stylesheets/reset.js.map +1 -0
- package/dist/themes/themes/ergo/ergo_theme.js +595 -0
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -0
- package/dist/tokens/badge/badge.js +13 -13
- package/dist/tokens/badge/badge.js.map +1 -1
- package/dist/tokens/bubble/bubble.js +11 -11
- package/dist/tokens/bubble/bubble.js.map +1 -1
- package/dist/tokens/chip/chip.js +11 -11
- package/dist/tokens/chip/chip.js.map +1 -1
- package/dist/typography/body_text/body_text.js +21 -21
- package/dist/typography/body_text/body_text.js.map +1 -1
- package/dist/typography/callout/callout.js +16 -16
- package/dist/typography/callout/callout.js.map +1 -1
- package/dist/typography/caption/caption.js +13 -13
- package/dist/typography/caption/caption.js.map +1 -1
- package/dist/typography/footnote/footnote.js +14 -14
- package/dist/typography/footnote/footnote.js.map +1 -1
- package/dist/typography/headline/headline.js +12 -12
- package/dist/typography/headline/headline.js.map +1 -1
- package/dist/typography/subheadline/subheadline.js +13 -13
- package/dist/typography/subheadline/subheadline.js.map +1 -1
- package/dist/typography/title/title.js +17 -17
- package/dist/typography/title/title.js.map +1 -1
- package/package.json +23 -4
- package/src/actions/button/__stories__/button.stories.tsx +1 -1
- package/src/actions/button/__stories__/button_group.stories.tsx +1 -1
- package/src/actions/button/__stories__/select_group.stories.tsx +1 -1
- package/src/actions/button/__stories__/slim_button.stories.tsx +1 -1
- package/src/actions/button/base_button/base_button.tsx +8 -3
- package/src/actions/button/button/button.module.css +0 -78
- package/src/actions/button/button/button.tsx +3 -5
- package/src/actions/button/button_group/button_group.tsx +4 -7
- package/src/actions/button/select_group/select_group.tsx +3 -3
- package/src/actions/button/slim_button/slim_button.module.css +0 -26
- package/src/actions/button/slim_button/slim_button.tsx +3 -2
- package/src/feedback/lazy/lazy.stories.tsx +1 -1
- package/src/feedback/loading/__storybook__/loading.stories.tsx +1 -1
- package/src/feedback/progress/progress_bar.stories.tsx +1 -1
- package/src/form/field/common/field_control/field_control.tsx +2 -2
- package/src/form/field/common/field_header.tsx +2 -2
- package/src/form/field/common/status_input/status_input.tsx +3 -6
- package/src/form/field/field.stories.tsx +2 -1
- package/src/form/field/h_field/h_field.stories.tsx +10 -1
- package/src/form/field/h_field/h_field.tsx +2 -2
- package/src/form/field/v_field/v_field.stories.tsx +10 -1
- package/src/form/field/v_field/v_field.tsx +2 -2
- package/src/form/field_set/field_set.stories.tsx +9 -1
- package/src/form/field_set/field_set.tsx +4 -7
- package/src/inputs/checkbox/checkbox.stories.tsx +9 -1
- package/src/inputs/checkbox/checkbox.tsx +2 -2
- package/src/inputs/color_input/color_input.stories.tsx +9 -1
- package/src/inputs/color_input/color_input.tsx +2 -6
- package/src/inputs/color_input/color_picker.tsx +2 -2
- package/src/inputs/combo_box/combo_box.stories.tsx +14 -5
- package/src/inputs/combo_box/combo_box.tsx +2 -2
- package/src/inputs/date_picker/date_picker.stories.tsx +18 -10
- package/src/inputs/date_picker/date_picker.tsx +3 -3
- package/src/inputs/date_picker/date_picker_date.tsx +3 -3
- package/src/inputs/date_picker/date_picker_header.tsx +2 -2
- package/src/inputs/date_picker/date_picker_input.stories.tsx +15 -7
- package/src/inputs/date_picker/date_picker_input.tsx +3 -3
- package/src/inputs/date_picker/date_picker_time_selector.tsx +5 -8
- package/src/inputs/date_picker/date_picker_year_input.tsx +2 -2
- package/src/inputs/date_picker/date_picker_year_selector.tsx +3 -9
- package/src/inputs/input/input.stories.tsx +9 -1
- package/src/inputs/input/input.tsx +5 -4
- package/src/inputs/mask_input/key_capture_input.stories.tsx +9 -1
- package/src/inputs/mask_input/mask_input.stories.tsx +10 -1
- package/src/inputs/multi_combo_box/multi_combo_box.stories.tsx +10 -1
- package/src/inputs/multi_combo_box/multi_combo_box.tsx +2 -2
- package/src/inputs/multiselect/multiselect_values.tsx +2 -2
- package/src/inputs/multiselect/mutliselect.stories.tsx +10 -1
- package/src/inputs/options/option.tsx +1 -0
- package/src/inputs/phone_number_input/phone_number_input.module.css +12 -0
- package/src/inputs/phone_number_input/phone_number_input.stories.tsx +18 -1
- package/src/inputs/phone_number_input/phone_number_input.tsx +104 -29
- package/src/inputs/radio/radio.stories.tsx +14 -6
- package/src/inputs/radio/radio.tsx +2 -2
- package/src/inputs/select/select.stories.tsx +18 -9
- package/src/inputs/select/select.tsx +2 -2
- package/src/inputs/slider/slider.stories.tsx +9 -1
- package/src/inputs/slider/slider.tsx +2 -2
- package/src/inputs/suggestions/suggestion_item.tsx +14 -4
- package/src/inputs/suggestions/suggestion_list.stories.tsx +21 -12
- package/src/inputs/suggestions/suggestion_list.tsx +25 -6
- package/src/inputs/switch/switch.stories.tsx +9 -1
- package/src/inputs/switch/switch.tsx +4 -4
- package/src/inputs/textarea/textarea.stories.tsx +9 -1
- package/src/inputs/textarea/textarea.tsx +2 -2
- package/src/inputs/unit_input/unit_input.stories.tsx +9 -1
- package/src/inputs/unit_input/unit_input.tsx +4 -4
- package/src/layouts/body/h_body.tsx +2 -2
- package/src/layouts/body/v_body.tsx +2 -2
- package/src/layouts/column/column.tsx +3 -3
- package/src/layouts/divider/__stories__/divider.stories.tsx +59 -19
- package/src/layouts/divider/divider.tsx +3 -3
- package/src/layouts/footer/footer.module.css +0 -1
- package/src/layouts/footer/footer.tsx +2 -2
- package/src/layouts/grid/grid.stories.tsx +42 -34
- package/src/layouts/grid/grid.tsx +2 -7
- package/src/layouts/header/header.tsx +2 -2
- package/src/layouts/index.ts +3 -2
- package/src/layouts/list/item.tsx +11 -3
- package/src/layouts/list/list.tsx +3 -3
- package/src/layouts/sidebar_end/sidebar_end.tsx +2 -2
- package/src/layouts/sidebar_start/sidebar_start.tsx +2 -2
- package/src/layouts/utility_bar/utility_bar.tsx +2 -2
- package/src/overlay/context_menu/context_menu.stories.tsx +13 -5
- package/src/overlay/menu/menu.stories.tsx +22 -14
- package/src/overlay/menu/menu.tsx +3 -3
- package/src/overlay/popper/popper.stories.tsx +43 -22
- package/src/overlay/portal/portal.stories.tsx +10 -1
- package/src/overlay/tooltip/tooltip.stories.tsx +9 -2
- package/src/overlay/tooltip/tooltip.tsx +2 -2
- package/src/stacks/box/bottom_resize_handle.tsx +2 -2
- package/src/stacks/box/box.tsx +2 -2
- package/src/stacks/box/end_resize_handle.tsx +2 -2
- package/src/stacks/box/left_resize_handle.tsx +2 -2
- package/src/stacks/box/right_resize_handle.tsx +2 -2
- package/src/stacks/box/start_resize_handle.tsx +2 -2
- package/src/stacks/box/top_resize_handle.tsx +2 -2
- package/src/stacks/collapsible_box.stories.tsx +10 -1
- package/src/stacks/h_collapsible_box.tsx +2 -2
- package/src/stacks/h_stack.stories.tsx +104 -59
- package/src/stacks/h_stack.tsx +2 -2
- package/src/stacks/spacer.tsx +2 -2
- package/src/stacks/story_components/circle.tsx +2 -2
- package/src/stacks/story_components/picture_placeholder.tsx +2 -2
- package/src/stacks/story_components/rect.tsx +2 -2
- package/src/stacks/v_collapsible_box.tsx +2 -2
- package/src/stacks/v_stack.stories.tsx +91 -10
- package/src/stacks/v_stack.tsx +2 -2
- package/src/stacks/z_stack.stories.tsx +9 -1
- package/src/stacks/z_stack.tsx +2 -2
- package/src/surfaces/alert/alert.stories.tsx +4 -4
- package/src/surfaces/alert/alert.tsx +2 -2
- package/src/surfaces/card/card.tsx +3 -9
- package/src/surfaces/confirm/confirm.stories.tsx +4 -4
- package/src/surfaces/confirm/confirm.tsx +3 -6
- package/src/surfaces/drawers/__stories__/drawers.stories.tsx +1 -1
- package/src/surfaces/drawers/drawer_bottom/drawer_bottom.tsx +2 -2
- package/src/surfaces/drawers/drawer_end/drawer_end.tsx +2 -2
- package/src/surfaces/drawers/drawer_start/drawer_start.tsx +2 -2
- package/src/surfaces/drawers/drawer_top/drawer_top.tsx +2 -2
- package/src/surfaces/modal/__stories__/modal.stories.tsx +54 -0
- package/src/surfaces/modal/modal.module.css +2 -1
- package/src/surfaces/modal/modal.tsx +9 -6
- package/src/surfaces/page/h_page.tsx +2 -2
- package/src/surfaces/page/v_page.tsx +2 -2
- package/src/surfaces/panel/__stories__/panel.stories.tsx +13 -12
- package/src/surfaces/panel/h_panel.tsx +3 -9
- package/src/surfaces/panel/v_panel.tsx +3 -3
- package/src/surfaces/popover/popover.tsx +2 -2
- package/src/surfaces/window/window.stories.tsx +1 -1
- package/src/surfaces/window/window.tsx +2 -6
- package/src/themes/index.ts +0 -2
- package/src/themes/stories/themes.stories.tsx +1 -1
- package/src/themes/themes/ergo/__stories__/components/material_picker/sb_inverted_materials.module.css +34 -0
- package/src/themes/themes/ergo/__stories__/components/material_picker/sb_material_picker.tsx +52 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_card.module.css +5 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_card.tsx +40 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.tsx +83 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/types.ts +7 -0
- package/src/themes/themes/ergo/__stories__/material.stories.tsx +154 -0
- package/src/themes/themes/ergo/__stories__/sb_materials.module.css +110 -0
- package/src/themes/themes/ergo/__stories__/utils.ts +92 -0
- package/src/themes/themes/ergo/ergo_theme.css +348 -15
- package/src/tokens/badge/badge.stories.tsx +6 -6
- package/src/tokens/badge/badge.tsx +3 -3
- package/src/tokens/bubble/bubble.stories.tsx +16 -9
- package/src/tokens/bubble/bubble.tsx +2 -2
- package/src/tokens/chip/chip.stories.tsx +1 -1
- package/src/tokens/chip/chip.tsx +2 -2
- package/src/typography/body_text/body_text.tsx +2 -2
- package/src/typography/callout/callout.tsx +2 -2
- package/src/typography/caption/caption.tsx +2 -2
- package/src/typography/footnote/footnote.tsx +2 -2
- package/src/typography/headline/headline.tsx +2 -2
- package/src/typography/subheadline/subheadline.tsx +2 -2
- package/src/typography/title/title.tsx +2 -2
- package/src/typography/typography-showcase.stories.tsx +2 -2
- package/src/utils/click_away_listener.stories.tsx +21 -11
- package/src/utils/responsive/responsive_renderer.stories.tsx +7 -7
- package/src/utils/scroll_away_listener.stories.tsx +11 -1
- package/tsconfig.json +0 -3
- package/dist/card.css +0 -1
- package/dist/portal-qqIp4SIl.js.map +0 -1
- package/dist/themes/stylesheets/reset.css +0 -1
- package/dist/themes/themes/ergo/ergo_theme.css +0 -1
- package/dist/themes/themes/windows_98/windows_98.css +0 -1
- package/src/surfaces/card/card.module.css +0 -5
- package/src/surfaces/modal/modal.stories.tsx +0 -15
- /package/dist/{overlay/portal/portal.css → portal_platform.css} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VStack, type VStackProps } from '../../../stacks/v_stack.js';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styles from './drawer_end.module.css';
|
|
5
5
|
|
|
@@ -15,7 +15,7 @@ export const DrawerEnd = React.forwardRef<HTMLElement, DrawerEndProps>(function
|
|
|
15
15
|
<VStack
|
|
16
16
|
ref={ref}
|
|
17
17
|
as="section"
|
|
18
|
-
className={
|
|
18
|
+
className={clsx(styles.drawerEnd, className, 'drawerEnd')}
|
|
19
19
|
{...props}
|
|
20
20
|
>
|
|
21
21
|
{children}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VStack, type VStackProps } from '../../../stacks/v_stack.js';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styles from './drawer_start.module.css';
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ export const DrawerStart = React.forwardRef<HTMLElement, DrawerStartProps>(
|
|
|
13
13
|
<VStack
|
|
14
14
|
ref={ref}
|
|
15
15
|
as="section"
|
|
16
|
-
className={
|
|
16
|
+
className={clsx(styles.drawerStart, className, 'drawerStart')}
|
|
17
17
|
{...props}
|
|
18
18
|
>
|
|
19
19
|
{children}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VStack, type VStackProps } from '../../../stacks/v_stack.js';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styles from './drawer_top.module.css';
|
|
5
5
|
|
|
@@ -15,7 +15,7 @@ export const DrawerTop = React.forwardRef<HTMLElement, DrawerTopProps>(function
|
|
|
15
15
|
<VStack
|
|
16
16
|
ref={ref}
|
|
17
17
|
as="section"
|
|
18
|
-
className={
|
|
18
|
+
className={clsx(styles.drawerTop, className, 'drawerTop')}
|
|
19
19
|
{...props}
|
|
20
20
|
>
|
|
21
21
|
{children}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Button, SlimButton } from '../../../actions/index.js';
|
|
3
|
+
import { Footer, Header, VBody } from '../../../layouts/index.js';
|
|
4
|
+
import { Portal } from '../../../overlay/index.js';
|
|
5
|
+
import { ZStack } from '../../../stacks/z_stack.js';
|
|
6
|
+
import { BodyText, Title } from '../../../typography/index.js';
|
|
7
|
+
import { Modal } from '../modal.js';
|
|
8
|
+
import { ClickAwayListener } from '../../../utils/index.js';
|
|
9
|
+
import { Spacer } from '../../../stacks/index.js';
|
|
10
|
+
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Surfaces/Modal',
|
|
14
|
+
component: Modal,
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const ModalStory = () => {
|
|
19
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
20
|
+
|
|
21
|
+
function toggle() {
|
|
22
|
+
setIsOpen(!isOpen);
|
|
23
|
+
}
|
|
24
|
+
return (
|
|
25
|
+
<ZStack height="100%" width="100%" minHeight="600px">
|
|
26
|
+
<button onClick={toggle}>{isOpen ? 'Close' : 'Open'}</button>
|
|
27
|
+
{isOpen && (
|
|
28
|
+
<Portal>
|
|
29
|
+
<ZStack width="100%" height="100%" className="tcn-veil">
|
|
30
|
+
<ClickAwayListener onClickAway={toggle}>
|
|
31
|
+
<Modal width="400px" height="500px">
|
|
32
|
+
<Header>
|
|
33
|
+
<Title>Modal Title</Title>
|
|
34
|
+
<Spacer />
|
|
35
|
+
<SlimButton hierarchy="tertiary" size="md" onClick={toggle}>
|
|
36
|
+
<CrossIcon />
|
|
37
|
+
</SlimButton>
|
|
38
|
+
</Header>
|
|
39
|
+
<VBody>
|
|
40
|
+
<BodyText>This is a modal</BodyText>
|
|
41
|
+
</VBody>
|
|
42
|
+
<Footer>
|
|
43
|
+
<Spacer />
|
|
44
|
+
<Button hierarchy="secondary">Cancel</Button>
|
|
45
|
+
<Button hierarchy="primary">Save</Button>
|
|
46
|
+
</Footer>
|
|
47
|
+
</Modal>
|
|
48
|
+
</ClickAwayListener>
|
|
49
|
+
</ZStack>
|
|
50
|
+
</Portal>
|
|
51
|
+
)}
|
|
52
|
+
</ZStack>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { VStack, type VStackProps } from '../../stacks/v_stack.js';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styles from './modal.module.css';
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}
|
|
6
|
+
export type ModalProps = Omit<VStackProps<HTMLDialogElement>, 'as'>;
|
|
9
7
|
|
|
10
|
-
export const Modal = React.forwardRef<
|
|
8
|
+
export const Modal = React.forwardRef<HTMLDialogElement, ModalProps>(function Modal(
|
|
11
9
|
{ children, className, ...props }: ModalProps,
|
|
12
10
|
ref
|
|
13
11
|
) {
|
|
14
12
|
return (
|
|
15
|
-
<VStack
|
|
13
|
+
<VStack
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={clsx(styles['modal'], 'tcn-modal', className)}
|
|
16
|
+
as="dialog"
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
16
19
|
{children}
|
|
17
20
|
</VStack>
|
|
18
21
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styles from './page.module.css';
|
|
4
4
|
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
@@ -13,7 +13,7 @@ export const HPage = React.forwardRef<HTMLElement, HPageProps>(function HPage(
|
|
|
13
13
|
<HStack
|
|
14
14
|
ref={ref}
|
|
15
15
|
as="main"
|
|
16
|
-
className={
|
|
16
|
+
className={clsx(styles.page, className, 'page')}
|
|
17
17
|
vAlign="start"
|
|
18
18
|
{...props}
|
|
19
19
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VStack, type VStackProps } from '../../stacks/v_stack.js';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styles from './page.module.css';
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ export const VPage = React.forwardRef<HTMLElement, VPageProps>(function VPage(
|
|
|
13
13
|
<VStack
|
|
14
14
|
ref={ref}
|
|
15
15
|
as="main"
|
|
16
|
-
className={
|
|
16
|
+
className={clsx(styles.page, className, 'page')}
|
|
17
17
|
{...props}
|
|
18
18
|
>
|
|
19
19
|
{children}
|
|
@@ -11,6 +11,7 @@ import { Title } from '../../../typography/title/title.js';
|
|
|
11
11
|
import { VPanel } from '../v_panel.js';
|
|
12
12
|
// Styles
|
|
13
13
|
import styles from './panel_stories.module.css';
|
|
14
|
+
import { SlimButton } from '../../../actions/index.js';
|
|
14
15
|
|
|
15
16
|
export default {
|
|
16
17
|
title: 'Surfaces/Panel',
|
|
@@ -25,29 +26,29 @@ export const Default = () => {
|
|
|
25
26
|
<Header>
|
|
26
27
|
<Title>Panel Primary Header</Title>
|
|
27
28
|
<Spacer />
|
|
28
|
-
<
|
|
29
|
+
<SlimButton hierarchy="tertiary">
|
|
29
30
|
<GridOneIcon />
|
|
30
|
-
</
|
|
31
|
+
</SlimButton>
|
|
31
32
|
<Divider length="md" vertical />
|
|
32
|
-
<
|
|
33
|
+
<SlimButton hierarchy="tertiary">
|
|
33
34
|
<CrossIcon />
|
|
34
|
-
</
|
|
35
|
+
</SlimButton>
|
|
35
36
|
</Header>
|
|
36
37
|
<UtilityBar>
|
|
37
38
|
<Title>Utility Bar</Title>
|
|
38
39
|
<Spacer />
|
|
39
|
-
<
|
|
40
|
+
<SlimButton hierarchy="tertiary">
|
|
40
41
|
<BugIcon />
|
|
41
|
-
</
|
|
42
|
-
<
|
|
42
|
+
</SlimButton>
|
|
43
|
+
<SlimButton hierarchy="tertiary">
|
|
43
44
|
<BugIcon />
|
|
44
|
-
</
|
|
45
|
-
<
|
|
45
|
+
</SlimButton>
|
|
46
|
+
<SlimButton size="md" hierarchy="tertiary">
|
|
46
47
|
<BugIcon />
|
|
47
|
-
</
|
|
48
|
-
<
|
|
48
|
+
</SlimButton>
|
|
49
|
+
<SlimButton hierarchy="tertiary">
|
|
49
50
|
<BugIcon />
|
|
50
|
-
</
|
|
51
|
+
</SlimButton>
|
|
51
52
|
</UtilityBar>
|
|
52
53
|
|
|
53
54
|
<VBody>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { Box, type BoxProps } from '../../stacks/box/box.js';
|
|
4
4
|
import { HStack } from '../../stacks/h_stack.js';
|
|
5
5
|
import type { Alignment } from '../../stacks/types/alignment.js';
|
|
@@ -38,13 +38,7 @@ export const HPanel = React.forwardRef<HTMLElement, HPanelProps>(function HPanel
|
|
|
38
38
|
maxHeight={maxHeight}
|
|
39
39
|
data-h-alignment={hAlign}
|
|
40
40
|
data-v-alignment={vAlign}
|
|
41
|
-
className={
|
|
42
|
-
styles['panel'],
|
|
43
|
-
className,
|
|
44
|
-
'panel',
|
|
45
|
-
'tcn-panel',
|
|
46
|
-
'tcn-h-panel'
|
|
47
|
-
)}
|
|
41
|
+
className={clsx(styles['panel'], className, 'panel', 'tcn-panel', 'tcn-h-panel')}
|
|
48
42
|
{...props}
|
|
49
43
|
>
|
|
50
44
|
<HStack
|
|
@@ -56,7 +50,7 @@ export const HPanel = React.forwardRef<HTMLElement, HPanelProps>(function HPanel
|
|
|
56
50
|
hAlign={hAlign}
|
|
57
51
|
vAlign={vAlign}
|
|
58
52
|
ref={ref}
|
|
59
|
-
className={
|
|
53
|
+
className={clsx(
|
|
60
54
|
styles['panel-stack'],
|
|
61
55
|
className,
|
|
62
56
|
'panel-stack',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { Box, type BoxProps } from '../../stacks/box/box.js';
|
|
4
4
|
import type { Alignment } from '../../stacks/types/alignment.js';
|
|
5
5
|
import { VStack } from '../../stacks/v_stack.js';
|
|
@@ -38,7 +38,7 @@ export const VPanel = React.forwardRef<HTMLElement, VPanelProps>(function VPanel
|
|
|
38
38
|
maxHeight={maxHeight}
|
|
39
39
|
data-h-alignment={hAlign}
|
|
40
40
|
data-v-alignment={vAlign}
|
|
41
|
-
className={
|
|
41
|
+
className={clsx(className, 'panel', 'tcn-panel', 'tcn-v-panel')}
|
|
42
42
|
{...props}
|
|
43
43
|
>
|
|
44
44
|
<VStack
|
|
@@ -50,7 +50,7 @@ export const VPanel = React.forwardRef<HTMLElement, VPanelProps>(function VPanel
|
|
|
50
50
|
hAlign={hAlign}
|
|
51
51
|
vAlign={vAlign}
|
|
52
52
|
ref={ref}
|
|
53
|
-
className={
|
|
53
|
+
className={clsx(
|
|
54
54
|
styles['panel-stack'],
|
|
55
55
|
className,
|
|
56
56
|
'panel-stack',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { VStack } from '../../stacks/v_stack.js';
|
|
3
3
|
import { Popper, type PopperProps } from '../../overlay/popper/popper.js';
|
|
4
4
|
import { VStackProps } from '../../stacks/v_stack.js';
|
|
@@ -45,7 +45,7 @@ export function Popover({
|
|
|
45
45
|
open={open}
|
|
46
46
|
onClose={onClose}
|
|
47
47
|
>
|
|
48
|
-
<VStack inline width="auto" className={
|
|
48
|
+
<VStack inline width="auto" className={clsx(className, 'popover')} {...props}>
|
|
49
49
|
{children}
|
|
50
50
|
</VStack>
|
|
51
51
|
</Popper>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VStack, type VStackProps } from '../../stacks/v_stack.js';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styles from './window.module.css';
|
|
5
5
|
|
|
@@ -10,11 +10,7 @@ export const Window = React.forwardRef<HTMLDivElement, WindowProps>(function Win
|
|
|
10
10
|
ref
|
|
11
11
|
) {
|
|
12
12
|
return (
|
|
13
|
-
<VStack
|
|
14
|
-
ref={ref}
|
|
15
|
-
className={classNames(styles.window, className, 'window')}
|
|
16
|
-
{...props}
|
|
17
|
-
>
|
|
13
|
+
<VStack ref={ref} className={clsx(styles.window, className, 'window')} {...props}>
|
|
18
14
|
{children}
|
|
19
15
|
</VStack>
|
|
20
16
|
);
|
package/src/themes/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
title: 'Themes',
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export function
|
|
13
|
+
export function Themes() {
|
|
14
14
|
const [theme, setTheme] = useState<'windows98' | 'ergo'>('windows98');
|
|
15
15
|
|
|
16
16
|
const styleSheet = theme === 'windows98' ? windows98StyleSheet : ergoStyleSheet;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.light-primary-inverted {
|
|
2
|
+
--action: var(--primary);
|
|
3
|
+
--on-action: var(--white);
|
|
4
|
+
--material: var(--white);
|
|
5
|
+
--on-material: var(--navy);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.light-secondary-inverted {
|
|
9
|
+
--action: var(--tan);
|
|
10
|
+
--on-action: var(--navy);
|
|
11
|
+
--material: var(--white);
|
|
12
|
+
--on-material: var(--navy);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dark-primary-inverted {
|
|
16
|
+
--action: var(--slate);
|
|
17
|
+
--on-action: var(--white);
|
|
18
|
+
--material: var(--white);
|
|
19
|
+
--on-material: var(--navy);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dark-secondary-inverted {
|
|
23
|
+
--action: var(--navy);
|
|
24
|
+
--on-action: var(--white);
|
|
25
|
+
--material: var(--white);
|
|
26
|
+
--on-material: var(--navy);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.surface-custom-inverted {
|
|
30
|
+
--action: var(--custom-material);
|
|
31
|
+
--on-action: var(--custom-on-material);
|
|
32
|
+
--material: var(--navy);
|
|
33
|
+
--on-material: var(--white);
|
|
34
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { Header } from '../../../../../../layouts/index.js';
|
|
4
|
+
import { Button } from '../../../../../../actions/button/button/button.js';
|
|
5
|
+
import { theme } from '../../../../../theme_variables.js';
|
|
6
|
+
|
|
7
|
+
// Styles
|
|
8
|
+
import styles from './sb_inverted_materials.module.css';
|
|
9
|
+
|
|
10
|
+
export const SB_MaterialPicker: React.FC<{
|
|
11
|
+
handleSurfaceClick: (surface: string) => () => void;
|
|
12
|
+
}> = ({ handleSurfaceClick }) => {
|
|
13
|
+
return (
|
|
14
|
+
<Header gap={theme.gap.md} height="48px">
|
|
15
|
+
<Button
|
|
16
|
+
hierarchy="primary"
|
|
17
|
+
className={clsx(styles['light-primary-inverted'])}
|
|
18
|
+
onClick={handleSurfaceClick('light-primary')}
|
|
19
|
+
>
|
|
20
|
+
Light
|
|
21
|
+
</Button>
|
|
22
|
+
<Button
|
|
23
|
+
onClick={handleSurfaceClick('light-secondary')}
|
|
24
|
+
hierarchy="primary"
|
|
25
|
+
className={clsx(styles['light-secondary-inverted'])}
|
|
26
|
+
>
|
|
27
|
+
Light Variant
|
|
28
|
+
</Button>
|
|
29
|
+
<Button
|
|
30
|
+
onClick={handleSurfaceClick('dark-primary')}
|
|
31
|
+
hierarchy="primary"
|
|
32
|
+
className={clsx(styles['dark-primary-inverted'])}
|
|
33
|
+
>
|
|
34
|
+
Dark
|
|
35
|
+
</Button>
|
|
36
|
+
<Button
|
|
37
|
+
onClick={handleSurfaceClick('dark-secondary')}
|
|
38
|
+
hierarchy="primary"
|
|
39
|
+
className={clsx(styles['dark-secondary-inverted'])}
|
|
40
|
+
>
|
|
41
|
+
Dark Variant
|
|
42
|
+
</Button>
|
|
43
|
+
<Button
|
|
44
|
+
onClick={handleSurfaceClick('surface-custom')}
|
|
45
|
+
hierarchy="primary"
|
|
46
|
+
className={clsx(styles['surface-custom-inverted'])}
|
|
47
|
+
>
|
|
48
|
+
Custom
|
|
49
|
+
</Button>
|
|
50
|
+
</Header>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Header, VBody } from '../../../../../../layouts/index.js';
|
|
2
|
+
import { Card } from '../../../../../../surfaces/index.js';
|
|
3
|
+
import { SlimButton } from '../../../../../../actions/button/slim_button/slim_button.js';
|
|
4
|
+
import { Spacer } from '../../../../../../stacks/spacer.js';
|
|
5
|
+
import { Box } from '../../../../../../stacks/index.js';
|
|
6
|
+
import { InfoIcon } from '@tcn/icons/info_icon.js';
|
|
7
|
+
import { AlertCircleIcon } from '@tcn/icons/alert_circle_icon.js';
|
|
8
|
+
import { CheckCircleIcon } from '@tcn/icons/check_circle_icon.js';
|
|
9
|
+
import { theme } from '../../../../../theme_variables.js';
|
|
10
|
+
|
|
11
|
+
// Styles
|
|
12
|
+
import styles from './sb_card.module.css';
|
|
13
|
+
import type { SB_ToneListItem } from './types.js';
|
|
14
|
+
|
|
15
|
+
export const SB_ToneCard: React.FC<{
|
|
16
|
+
item: SB_ToneListItem | null;
|
|
17
|
+
}> = ({ item }) => {
|
|
18
|
+
return (
|
|
19
|
+
<Card data-tone={item?.tone || 'neutral'}>
|
|
20
|
+
<Header>
|
|
21
|
+
{item?.name ?? 'Neutral'}
|
|
22
|
+
<Spacer />
|
|
23
|
+
<SlimButton size="sm" hierarchy="tertiary">
|
|
24
|
+
<InfoIcon />
|
|
25
|
+
</SlimButton>
|
|
26
|
+
<SlimButton size="sm" hierarchy="secondary">
|
|
27
|
+
<AlertCircleIcon />
|
|
28
|
+
</SlimButton>
|
|
29
|
+
<SlimButton size="sm" hierarchy="primary">
|
|
30
|
+
<CheckCircleIcon />
|
|
31
|
+
</SlimButton>
|
|
32
|
+
</Header>
|
|
33
|
+
<VBody gap={theme.gap.md}>
|
|
34
|
+
<Box className={styles.box} />
|
|
35
|
+
<Box className={styles.box} />
|
|
36
|
+
<Box className={styles.box} />
|
|
37
|
+
</VBody>
|
|
38
|
+
</Card>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { BodyText } from '../../../../../../typography/body_text/body_text.js';
|
|
3
|
+
import { Item, List, SectionHeader } from '../../../../../../layouts/index.js';
|
|
4
|
+
import { HStack } from '../../../../../../stacks/h_stack.js';
|
|
5
|
+
import type { SB_ToneListItem } from './types.js';
|
|
6
|
+
import { SB_ToneCard } from './sb_tone_card.js';
|
|
7
|
+
import { theme } from '../../../../../theme_variables.js';
|
|
8
|
+
import { VStack } from '../../../../../../stacks/v_stack.js';
|
|
9
|
+
|
|
10
|
+
const items: SB_ToneListItem[] = [
|
|
11
|
+
{
|
|
12
|
+
id: 'positive',
|
|
13
|
+
name: 'Positive',
|
|
14
|
+
tone: 'positive',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 'notice',
|
|
18
|
+
name: 'Notice',
|
|
19
|
+
tone: 'notice',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'neutral',
|
|
23
|
+
name: 'Neutral',
|
|
24
|
+
tone: 'neutral',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'warning',
|
|
28
|
+
name: 'Warning',
|
|
29
|
+
tone: 'warning',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'danger',
|
|
33
|
+
name: 'Danger',
|
|
34
|
+
tone: 'danger',
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
export const SB_TonePicker = () => {
|
|
39
|
+
const [selectedItem, setSelectedItem] = useState<SB_ToneListItem | null>(null);
|
|
40
|
+
|
|
41
|
+
const handleItemClick = (item: SB_ToneListItem) => () => {
|
|
42
|
+
setSelectedItem(item);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<HStack
|
|
47
|
+
gap={theme.gap.md}
|
|
48
|
+
growWeight={1}
|
|
49
|
+
paddingTop={theme.padding.md}
|
|
50
|
+
paddingBottom={theme.padding.md}
|
|
51
|
+
>
|
|
52
|
+
<VStack
|
|
53
|
+
height="100%"
|
|
54
|
+
width="auto"
|
|
55
|
+
gap={theme.gap.md}
|
|
56
|
+
hAlign="start"
|
|
57
|
+
minWidth="300px"
|
|
58
|
+
>
|
|
59
|
+
<SectionHeader>Tone Picker (WIP)</SectionHeader>
|
|
60
|
+
<List
|
|
61
|
+
padding={theme.padding.md}
|
|
62
|
+
maxWidth="200px"
|
|
63
|
+
growWeight={1}
|
|
64
|
+
height="100%"
|
|
65
|
+
overflowY="auto"
|
|
66
|
+
>
|
|
67
|
+
{items.map(item => (
|
|
68
|
+
<Item
|
|
69
|
+
key={item.id}
|
|
70
|
+
onClick={handleItemClick(item)}
|
|
71
|
+
selected={selectedItem?.id === item.id}
|
|
72
|
+
>
|
|
73
|
+
<BodyText>{item.name}</BodyText>
|
|
74
|
+
</Item>
|
|
75
|
+
))}
|
|
76
|
+
</List>
|
|
77
|
+
</VStack>
|
|
78
|
+
<VStack height="100%">
|
|
79
|
+
<SB_ToneCard item={selectedItem || null} />
|
|
80
|
+
</VStack>
|
|
81
|
+
</HStack>
|
|
82
|
+
);
|
|
83
|
+
};
|