@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
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { VStack } from '../../../../stacks/v_stack.js';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { PlusIcon } from '@tcn/icons/plus_icon.js';
|
|
5
|
+
import { Divider, Footer, Header, VBody } from '../../../../layouts/index.js';
|
|
6
|
+
import { VPanel } from '../../../../surfaces/index.js';
|
|
7
|
+
import { Button } from '../../../../actions/button/button/button.js';
|
|
8
|
+
import { Spacer } from '../../../../stacks/spacer.js';
|
|
9
|
+
import { SlimButton } from '../../../../actions/button/slim_button/slim_button.js';
|
|
10
|
+
import { SB_TonePicker } from './components/tone_picker/sb_tone_picker.js';
|
|
11
|
+
import { formatHSLString, getContrastText, parseHSL } from './utils.js';
|
|
12
|
+
import { SB_MaterialPicker } from './components/material_picker/sb_material_picker.js';
|
|
13
|
+
import { Title } from '../../../../typography/index.js';
|
|
14
|
+
import { theme } from '../../../theme_variables.js';
|
|
15
|
+
|
|
16
|
+
// Styles
|
|
17
|
+
import styles from './sb_materials.module.css';
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
title: 'Themes/Material',
|
|
21
|
+
tags: ['autodocs'],
|
|
22
|
+
argTypes: {
|
|
23
|
+
materialColor: {
|
|
24
|
+
control: { type: 'color', presetColors: [], disableAlpha: false },
|
|
25
|
+
label: 'Custom Material Color',
|
|
26
|
+
format: 'hsla',
|
|
27
|
+
},
|
|
28
|
+
accentColor: {
|
|
29
|
+
control: { type: 'color', presetColors: [], disableAlpha: false },
|
|
30
|
+
label: 'Custom Accent Color',
|
|
31
|
+
format: 'hsla',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
args: {
|
|
35
|
+
materialColor: 'hsl(122, 100%, 20%)',
|
|
36
|
+
accentColor: 'hsl(122, 100%, 55%)',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function useCustomSurface(materialColor?: string, accentColor?: string) {
|
|
41
|
+
const mat = materialColor || 'hsl(122, 100%, 20%)';
|
|
42
|
+
const acc = accentColor || 'hsl(122, 100%, 55%)';
|
|
43
|
+
|
|
44
|
+
const material = parseHSL(mat);
|
|
45
|
+
const accent = parseHSL(acc);
|
|
46
|
+
const onMaterial = getContrastText(material);
|
|
47
|
+
const onAction = getContrastText(accent);
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
material: formatHSLString(material),
|
|
51
|
+
accent: formatHSLString(accent),
|
|
52
|
+
onMaterial: formatHSLString(onMaterial),
|
|
53
|
+
onAction: formatHSLString(onAction),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const DynamicSurface = (args: {
|
|
58
|
+
materialColor?: string;
|
|
59
|
+
accentColor?: string;
|
|
60
|
+
}) => {
|
|
61
|
+
const [surface, setSurface] = useState('light-primary');
|
|
62
|
+
|
|
63
|
+
const handleSurfaceClick = (surface: string) => () => {
|
|
64
|
+
setSurface(surface);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const custom = useCustomSurface(args.materialColor, args.accentColor);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<VStack
|
|
71
|
+
className={styles['storybook-palette']}
|
|
72
|
+
height="100%"
|
|
73
|
+
gap={theme.gap.md}
|
|
74
|
+
padding={theme.padding.md}
|
|
75
|
+
growWeight={1}
|
|
76
|
+
style={
|
|
77
|
+
{
|
|
78
|
+
'--custom-action': custom.accent,
|
|
79
|
+
'--custom-on-action': custom.onAction,
|
|
80
|
+
'--custom-material': custom.material,
|
|
81
|
+
'--custom-on-material': custom.onMaterial,
|
|
82
|
+
} as React.CSSProperties
|
|
83
|
+
}
|
|
84
|
+
>
|
|
85
|
+
<Header>
|
|
86
|
+
<Title>Ergo Theme: Materials and Surfaces</Title>
|
|
87
|
+
</Header>
|
|
88
|
+
<SB_MaterialPicker handleSurfaceClick={handleSurfaceClick} />
|
|
89
|
+
<VPanel
|
|
90
|
+
// TODO: Find a better way to have typography inherit the on material color
|
|
91
|
+
style={{
|
|
92
|
+
color: 'inherit',
|
|
93
|
+
}}
|
|
94
|
+
minHeight="200px"
|
|
95
|
+
maxHeight="700px"
|
|
96
|
+
height="100%"
|
|
97
|
+
className={clsx(styles[`${surface}`], styles['surface'])}
|
|
98
|
+
>
|
|
99
|
+
<Header>
|
|
100
|
+
Enabled Utilities
|
|
101
|
+
<Spacer />
|
|
102
|
+
<SlimButton hierarchy="tertiary">
|
|
103
|
+
<PlusIcon />
|
|
104
|
+
</SlimButton>
|
|
105
|
+
<SlimButton hierarchy="secondary">
|
|
106
|
+
<PlusIcon />
|
|
107
|
+
</SlimButton>
|
|
108
|
+
<Divider vertical />
|
|
109
|
+
<SlimButton hierarchy="primary">
|
|
110
|
+
<PlusIcon />
|
|
111
|
+
</SlimButton>
|
|
112
|
+
</Header>
|
|
113
|
+
<Header>
|
|
114
|
+
Disabled Utilities
|
|
115
|
+
<Spacer />
|
|
116
|
+
<SlimButton hierarchy="tertiary" disabled>
|
|
117
|
+
<PlusIcon />
|
|
118
|
+
</SlimButton>
|
|
119
|
+
<SlimButton hierarchy="secondary" disabled>
|
|
120
|
+
<PlusIcon />
|
|
121
|
+
</SlimButton>
|
|
122
|
+
<Divider vertical />
|
|
123
|
+
<SlimButton hierarchy="primary" disabled>
|
|
124
|
+
<PlusIcon />
|
|
125
|
+
</SlimButton>
|
|
126
|
+
</Header>
|
|
127
|
+
<VBody>
|
|
128
|
+
<SB_TonePicker />
|
|
129
|
+
</VBody>
|
|
130
|
+
<Footer>
|
|
131
|
+
Disabled Buttons
|
|
132
|
+
<Spacer />
|
|
133
|
+
<Button hierarchy="tertiary" disabled>
|
|
134
|
+
Tertiary
|
|
135
|
+
</Button>
|
|
136
|
+
<Button hierarchy="secondary" disabled>
|
|
137
|
+
Secondary
|
|
138
|
+
</Button>
|
|
139
|
+
<Button hierarchy="primary" disabled>
|
|
140
|
+
Primary
|
|
141
|
+
</Button>
|
|
142
|
+
</Footer>
|
|
143
|
+
<Footer>
|
|
144
|
+
Enabled Buttons
|
|
145
|
+
<Spacer />
|
|
146
|
+
<Button hierarchy="tertiary">Tertiary</Button>
|
|
147
|
+
<Button hierarchy="secondary">Secondary</Button>
|
|
148
|
+
<Button hierarchy="primary">Primary</Button>
|
|
149
|
+
</Footer>
|
|
150
|
+
</VPanel>
|
|
151
|
+
<Header></Header>
|
|
152
|
+
</VStack>
|
|
153
|
+
);
|
|
154
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
.storybook-palette {
|
|
2
|
+
--background: #f1f1f1;
|
|
3
|
+
--primary: 23, 65%, 49%;
|
|
4
|
+
--navy: 213, 35.6%, 34.7%;
|
|
5
|
+
--white: 0, 0%, 100%;
|
|
6
|
+
--tan: 33, 22%, 84%;
|
|
7
|
+
--secondary: 197, 34.2%, 55.3%;
|
|
8
|
+
--secondary-light: 208 65.2% 95.5%;
|
|
9
|
+
--slate: 217, 32.6%, 17.5%;
|
|
10
|
+
|
|
11
|
+
--positive: 141, 71%, 48%; /* Green */
|
|
12
|
+
--notice: 202, 76%, 50%; /* Blue */
|
|
13
|
+
--neutral: 0, 0%, 100%; /* White */
|
|
14
|
+
--warning: 48, 100%, 50%; /* Yellow */
|
|
15
|
+
--danger: 0, 100%, 50%; /* Red */
|
|
16
|
+
|
|
17
|
+
background: var(--background);
|
|
18
|
+
|
|
19
|
+
/* This behavior can be moved to ergo theme once dialed and the global will be dropped */
|
|
20
|
+
:global(.tcn-card) {
|
|
21
|
+
:global(.tcn-header) {
|
|
22
|
+
background: hsl(var(--material));
|
|
23
|
+
color: hsl(var(--on-material));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:global(.tcn-card[data-tone="positive"]) {
|
|
28
|
+
--material: var(--positive);
|
|
29
|
+
--on-material: var(--white);
|
|
30
|
+
--action: var(--white);
|
|
31
|
+
--on-action: var(--positive);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:global(.tcn-card[data-tone="notice"]) {
|
|
35
|
+
--material: var(--notice);
|
|
36
|
+
--on-material: var(--white);
|
|
37
|
+
--action: var(--white);
|
|
38
|
+
--on-action: var(--notice);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* :global(.tcn-card[data-tone="neutral"]) {} */
|
|
42
|
+
|
|
43
|
+
:global(.tcn-card[data-tone="warning"]) {
|
|
44
|
+
--material: var(--warning);
|
|
45
|
+
--on-material: var(--navy);
|
|
46
|
+
--action: var(--navy);
|
|
47
|
+
--on-action: var(--white);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:global(.tcn-card[data-tone="danger"]) {
|
|
51
|
+
--material: var(--danger);
|
|
52
|
+
--on-material: var(--white);
|
|
53
|
+
--action: var(--white);
|
|
54
|
+
--on-action: var(--danger);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.light-primary {
|
|
59
|
+
--action: var(--primary);
|
|
60
|
+
--on-action: var(--white);
|
|
61
|
+
--material: var(--white);
|
|
62
|
+
--on-material: var(--navy);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.light-secondary {
|
|
66
|
+
--action: var(--navy);
|
|
67
|
+
--on-action: var(--white);
|
|
68
|
+
--material: var(--tan);
|
|
69
|
+
--on-material: var(--navy);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.dark-primary {
|
|
73
|
+
--action: var(--secondary);
|
|
74
|
+
--on-action: var(--white);
|
|
75
|
+
--material: var(--slate);
|
|
76
|
+
--on-material: var(--white);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.dark-secondary {
|
|
80
|
+
--action: var(--tan);
|
|
81
|
+
--on-action: var(--navy);
|
|
82
|
+
--material: var(--navy);
|
|
83
|
+
--on-material: var(--white);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.light-tertiary {
|
|
87
|
+
--action: var(--navy);
|
|
88
|
+
--on-action: var(--white);
|
|
89
|
+
--material: var(--secondary-light);
|
|
90
|
+
--on-material: var(--navy);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.surface-custom {
|
|
94
|
+
--action: var(--custom-action);
|
|
95
|
+
--on-action: var(--custom-on-action);
|
|
96
|
+
--material: var(--custom-material);
|
|
97
|
+
--on-material: var(--custom-on-material);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.surface-custom-inverted {
|
|
101
|
+
--action: var(--custom-material);
|
|
102
|
+
--on-action: var(--custom-on-material);
|
|
103
|
+
--material: var(--navy);
|
|
104
|
+
--on-material: var(--white);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.surface {
|
|
108
|
+
background: hsl(var(--material));
|
|
109
|
+
color: hsl(var(--on-material));
|
|
110
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
interface HSL {
|
|
2
|
+
h: string;
|
|
3
|
+
s: string;
|
|
4
|
+
l: string;
|
|
5
|
+
a?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function parseHSL(color: string): HSL {
|
|
9
|
+
if (!color) return { h: '46', s: '46%', l: '89%', a: '100%' };
|
|
10
|
+
|
|
11
|
+
// Handle hsl() format: "hsl(46, 46%, 89%)"
|
|
12
|
+
if (color.startsWith('hsl(')) {
|
|
13
|
+
const match = color.match(
|
|
14
|
+
/hsl\((\d+(?:\.\d+)?),\s*(\d+(?:\.\d+)?)%?,\s*(\d+(?:\.\d+)?)%?\)/
|
|
15
|
+
);
|
|
16
|
+
if (match) {
|
|
17
|
+
return {
|
|
18
|
+
h: match[1],
|
|
19
|
+
s: match[2].includes('%') ? match[2] : `${match[2]}%`,
|
|
20
|
+
l: match[3].includes('%') ? match[3] : `${match[3]}%`,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (color.startsWith('hsla(')) {
|
|
26
|
+
const match = color.match(
|
|
27
|
+
/hsla\((\d+(?:\.\d+)?),\s*(\d+(?:\.\d+)?)%?,\s*(\d+(?:\.\d+)?)%?,\s*(\d+(?:\.\d+)?)\)/
|
|
28
|
+
);
|
|
29
|
+
if (match) {
|
|
30
|
+
return {
|
|
31
|
+
h: match[1],
|
|
32
|
+
s: match[2].includes('%') ? match[2] : `${match[2]}%`,
|
|
33
|
+
l: match[3].includes('%') ? match[3] : `${match[3]}%`,
|
|
34
|
+
a: match[4].includes('%') ? match[4] : `${match[4]}%`,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Handle hex format (Storybook color picker often returns hex)
|
|
40
|
+
if (color.startsWith('#')) {
|
|
41
|
+
const r = parseInt(color.slice(1, 3), 16) / 255;
|
|
42
|
+
const g = parseInt(color.slice(3, 5), 16) / 255;
|
|
43
|
+
const b = parseInt(color.slice(5, 7), 16) / 255;
|
|
44
|
+
const max = Math.max(r, g, b);
|
|
45
|
+
const min = Math.min(r, g, b);
|
|
46
|
+
let h = 0;
|
|
47
|
+
let s = 0;
|
|
48
|
+
const l = (max + min) / 2;
|
|
49
|
+
if (max !== min) {
|
|
50
|
+
const d = max - min;
|
|
51
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
52
|
+
switch (max) {
|
|
53
|
+
case r:
|
|
54
|
+
h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
|
|
55
|
+
break;
|
|
56
|
+
case g:
|
|
57
|
+
h = ((b - r) / d + 2) / 6;
|
|
58
|
+
break;
|
|
59
|
+
case b:
|
|
60
|
+
h = ((r - g) / d + 4) / 6;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
h: Math.round(h * 360).toString(),
|
|
66
|
+
s: `${Math.round(s * 100)}%`,
|
|
67
|
+
l: `${Math.round(l * 100)}%`,
|
|
68
|
+
a: '100%',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Default fallback
|
|
73
|
+
return { h: '46', s: '46%', l: '89%', a: '100%' };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function getContrastText(material: HSL) {
|
|
77
|
+
const l = parseFloat(material.l);
|
|
78
|
+
|
|
79
|
+
// If background is light, return off-black for contrast.
|
|
80
|
+
// If background is dark, return off-white for contrast.
|
|
81
|
+
if (l > 50) {
|
|
82
|
+
// dark text for light background: "off-black"
|
|
83
|
+
return { h: '0', s: '0%', l: '12%' }; // near black, but not pure black
|
|
84
|
+
} else {
|
|
85
|
+
// light text for dark background: "off-white"
|
|
86
|
+
return { h: '0', s: '0%', l: '95%' }; // near white, but not pure white
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function formatHSLString(hsl: HSL) {
|
|
91
|
+
return `${hsl.h}, ${hsl.s}, ${hsl.l}`;
|
|
92
|
+
}
|