@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headline.js","sources":["../../../src/typography/headline/headline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './headline.module.css';\n\nexport interface HeadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type HeadlineProps = WithDetailedHTMLProps<HeadlineOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport function Headline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: HeadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['headline'], 'headline'
|
|
1
|
+
{"version":3,"file":"headline.js","sources":["../../../src/typography/headline/headline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './headline.module.css';\n\nexport interface HeadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type HeadlineProps = WithDetailedHTMLProps<HeadlineOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport function Headline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: HeadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['headline'], className, 'tcn-headline')}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n}\n"],"names":["Headline","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","As","jsx","clsx","styles"],"mappings":";;;AAsBO,SAASA,EAAS;AAAA,EACvB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AACf,GAAkB;AAChB,MAAIC;AAEJ,SAAIb,MAAS,OACXa,IAAK,OACIb,MAAS,OAClBa,IAAK,OAELA,IAAK,MAGHF,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAW;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,kBAAgBX;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWG,EAAKC,EAAO,UAAaX,GAAW,cAAc;AAAA,MAC7D,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { s as
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as p } from "clsx";
|
|
3
|
+
import { s as u } from "../../subheadline.module-C-v7zMkQ.js";
|
|
4
4
|
function j({
|
|
5
|
-
size:
|
|
5
|
+
size: n = "md",
|
|
6
6
|
emphasis: l = "normal",
|
|
7
7
|
hierarchy: o = "primary",
|
|
8
|
-
color:
|
|
8
|
+
color: e,
|
|
9
9
|
children: s,
|
|
10
10
|
className: t,
|
|
11
11
|
style: i = {},
|
|
@@ -14,18 +14,18 @@ function j({
|
|
|
14
14
|
padBottom: f,
|
|
15
15
|
padTop: m,
|
|
16
16
|
pad: h,
|
|
17
|
-
selectable:
|
|
17
|
+
selectable: c = !0
|
|
18
18
|
}) {
|
|
19
19
|
let a;
|
|
20
|
-
return
|
|
20
|
+
return n === "lg" ? a = "h3" : n === "md" ? a = "h4" : a = "h5", h && (i.padding = h), r && (i.paddingInlineStart = r), d && (i.paddingInlineEnd = d), m && (i.paddingTop = m), f && (i.paddingBottom = f), e && (i.color = e), /* @__PURE__ */ g(
|
|
21
21
|
a,
|
|
22
22
|
{
|
|
23
23
|
"data-hierarchy": o,
|
|
24
24
|
"data-emphasis": l,
|
|
25
|
-
"data-selectable":
|
|
26
|
-
className: u
|
|
25
|
+
"data-selectable": c,
|
|
26
|
+
className: p(u.subheadline, t, "tcn-subheadline"),
|
|
27
27
|
style: i,
|
|
28
|
-
"data-size":
|
|
28
|
+
"data-size": n,
|
|
29
29
|
children: s
|
|
30
30
|
}
|
|
31
31
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subheadline.js","sources":["../../../src/typography/subheadline/subheadline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './subheadline.module.css';\n\nexport interface SubheadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type SubheadlineProps = WithDetailedHTMLProps<\n SubheadlineOwnProps,\n 'h3' | 'h4' | 'h5'\n>;\n\nexport function Subheadline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: SubheadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h3';\n } else if (size === 'md') {\n As = 'h4';\n } else {\n As = 'h5';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['subheadline'], 'subheadline'
|
|
1
|
+
{"version":3,"file":"subheadline.js","sources":["../../../src/typography/subheadline/subheadline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './subheadline.module.css';\n\nexport interface SubheadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type SubheadlineProps = WithDetailedHTMLProps<\n SubheadlineOwnProps,\n 'h3' | 'h4' | 'h5'\n>;\n\nexport function Subheadline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: SubheadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h3';\n } else if (size === 'md') {\n As = 'h4';\n } else {\n As = 'h5';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['subheadline'], className, 'tcn-subheadline')}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n}\n"],"names":["Subheadline","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","As","jsx","clsx","styles"],"mappings":";;;AAyBO,SAASA,EAAY;AAAA,EAC1B,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AACf,GAAqB;AACnB,MAAIC;AAEJ,SAAIb,MAAS,OACXa,IAAK,OACIb,MAAS,OAClBa,IAAK,OAELA,IAAK,MAGHF,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAW;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,kBAAgBX;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWG,EAAKC,EAAO,aAAgBX,GAAW,iBAAiB;AAAA,MACnE,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -5,27 +5,27 @@ import '../../title.css';const I = "_title_64bd0fd", T = { title: I }, N = x(fun
|
|
|
5
5
|
size: n = "md",
|
|
6
6
|
emphasis: m = "normal",
|
|
7
7
|
hierarchy: c = "primary",
|
|
8
|
-
color:
|
|
8
|
+
color: r,
|
|
9
9
|
children: p,
|
|
10
10
|
className: g,
|
|
11
11
|
style: i = {},
|
|
12
|
-
padStart:
|
|
12
|
+
padStart: e,
|
|
13
13
|
padEnd: a,
|
|
14
14
|
padBottom: f,
|
|
15
|
-
padTop:
|
|
16
|
-
pad:
|
|
15
|
+
padTop: d,
|
|
16
|
+
pad: l,
|
|
17
17
|
selectable: h = !0,
|
|
18
18
|
as: o
|
|
19
19
|
}, s) {
|
|
20
20
|
let t = o;
|
|
21
|
-
return o == null && (n === "lg" ? t = "h1" : n === "md" ? t = "h2" : t = "h3"),
|
|
21
|
+
return o == null && (n === "lg" ? t = "h1" : n === "md" ? t = "h2" : t = "h3"), l && (i.padding = l), e && (i.paddingInlineStart = e), a && (i.paddingInlineEnd = a), d && (i.paddingTop = d), f && (i.paddingBottom = f), r && (i.color = r), /* @__PURE__ */ u(
|
|
22
22
|
t,
|
|
23
23
|
{
|
|
24
24
|
ref: s,
|
|
25
25
|
"data-hierarchy": c,
|
|
26
26
|
"data-emphasis": m,
|
|
27
27
|
"data-selectable": h,
|
|
28
|
-
className: b(T.title,
|
|
28
|
+
className: b(T.title, g, "tcn-typography", "tcn-title"),
|
|
29
29
|
style: i,
|
|
30
30
|
"data-size": n,
|
|
31
31
|
children: p
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport styles from './title.module.css';\n\nexport interface TitleOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n as?: string;\n}\n\nexport type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(function Title(\n {\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n as,\n },\n ref\n) {\n let As: React.ElementType = as as React.ElementType;\n\n if (as == null) {\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n ref={ref}\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['title'],
|
|
1
|
+
{"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport styles from './title.module.css';\n\nexport interface TitleOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n as?: string;\n}\n\nexport type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(function Title(\n {\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n as,\n },\n ref\n) {\n let As: React.ElementType = as as React.ElementType;\n\n if (as == null) {\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n ref={ref}\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['title'], className, 'tcn-typography', 'tcn-title')}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n});\n"],"names":["Title","forwardRef","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","as","ref","As","jsx","clsx","styles"],"mappings":";;;8CAuBaA,IAAQC,EAA2C,SAC9D;AAAA,EACE,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,IAAAC;AACF,GACAC,GACA;AACA,MAAIC,IAAwBF;AAE5B,SAAIA,KAAM,SACJb,MAAS,OACXe,IAAK,OACIf,MAAS,OAClBe,IAAK,OAELA,IAAK,OAILJ,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAa;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,kBAAgBZ;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWK,EAAKC,EAAO,OAAUb,GAAW,kBAAkB,WAAW;AAAA,MACzE,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
package/dist/unit_input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._unit-input_4bd8bc8{position:relative;opacity:1}._unit-input-flex-box_8db2f9b{z-index:inherit}._unit-input-number_c95f85a{padding-inline-end:8px}._unit-input-number_c95f85a
|
|
1
|
+
@layer tcn-system{:where(._unit-input_4bd8bc8){position:relative;opacity:1}:where(._unit-input-flex-box_8db2f9b){z-index:inherit}:where(._unit-input-number_c95f85a){padding-inline-end:8px}:where(._unit-input-number_c95f85a),:where(._unit-input-select_1bbbad9){position:relative;z-index:1}:where(._unit-input-number_c95f85a:focus),:where(._unit-input-select_1bbbad9:focus){z-index:2}}
|
package/dist/utility_bar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._utility-bar_3a92315{width:100%;min-height:0}
|
|
1
|
+
@layer tcn-system{:where(._utility-bar_3a92315){width:100%;min-height:0}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import d, { useRef as p, useCallback as L, useEffect as W } from "react";
|
|
2
2
|
import { useForkRef as T } from "./hooks/use_fork_ref.js";
|
|
3
3
|
const C = {
|
|
4
4
|
onClick: "click",
|
|
@@ -8,16 +8,16 @@ const C = {
|
|
|
8
8
|
onTouchStart: "touchstart",
|
|
9
9
|
onTouchEnd: "touchend"
|
|
10
10
|
};
|
|
11
|
-
function w(o, t,
|
|
12
|
-
if (!
|
|
11
|
+
function w(o, t, m, s) {
|
|
12
|
+
if (!m)
|
|
13
13
|
return !0;
|
|
14
14
|
let n;
|
|
15
15
|
return o.composedPath ? n = [t, ...s].find((e) => o.composedPath().indexOf(e) > -1) !== void 0 : n = !document.documentElement.contains(o.target) || [t, ...s].find((e) => e?.contains(o.target)) !== void 0, n;
|
|
16
16
|
}
|
|
17
|
-
const F =
|
|
18
|
-
function({ children: t, mouseEvent:
|
|
19
|
-
const f = p(null), v = p(!0),
|
|
20
|
-
|
|
17
|
+
const F = d.forwardRef(
|
|
18
|
+
function({ children: t, mouseEvent: m, touchEvent: s, onClickAway: n, refs: e = [], isException: a }, R) {
|
|
19
|
+
const f = p(null), v = p(!0), l = C[m || "onClick"], E = g[s || "onTouchEnd"], k = T(R, f, t.ref), i = d.useRef(!1);
|
|
20
|
+
d.useEffect(() => (window.setTimeout(() => {
|
|
21
21
|
i.current = !0;
|
|
22
22
|
}, 0), () => {
|
|
23
23
|
i.current = !1;
|
|
@@ -44,9 +44,9 @@ const F = m.forwardRef(
|
|
|
44
44
|
},
|
|
45
45
|
[n, e, a]
|
|
46
46
|
);
|
|
47
|
-
return W(() => (document.addEventListener("mousedown", r), document.addEventListener("touchstart", r), document.addEventListener(
|
|
48
|
-
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r), document.removeEventListener(
|
|
49
|
-
}), [
|
|
47
|
+
return W(() => (document.addEventListener("mousedown", r), document.addEventListener("touchstart", r), document.addEventListener(l, c), document.addEventListener(E, c), () => {
|
|
48
|
+
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r), document.removeEventListener(l, c), document.removeEventListener(E, c);
|
|
49
|
+
}), [E, l, c, r]), d.cloneElement(t, {
|
|
50
50
|
...t.props,
|
|
51
51
|
ref: k
|
|
52
52
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"click_away_listener.js","sources":["../../src/utils/click_away_listener.tsx"],"sourcesContent":["import React, { useEffect, useCallback, useRef } from 'react';\nimport { useForkRef } from './hooks/use_fork_ref.js';\nexport interface ClickAwayListenerProps {\n children: React.ReactElement;\n onClickAway: (event: React.MouseEvent | React.TouchEvent) => void;\n mouseEvent?: 'onMouseUp' | 'onMouseDown' | 'onClick';\n touchEvent?: 'onTouchStart' | 'onTouchEnd';\n isException?: (target: HTMLElement) => boolean;\n // An array of refs that wont trigger the click away listener\n refs?: React.RefObject<Element>[];\n}\nconst eventMap = {\n onClick: 'click',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n};\nconst touchMap = {\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n};\n\nexport function isEventWithinElement(\n event: MouseEvent | TouchEvent,\n node: HTMLElement | null,\n activated: boolean,\n refs: (Element | null)[]\n) {\n if (!activated) {\n return true;\n }\n\n let isWithinElement: boolean;\n\n if (event.composedPath) {\n isWithinElement =\n [node, ...refs].find((ref: any) => {\n return event.composedPath().indexOf(ref) > -1;\n }) !== undefined;\n } else {\n isWithinElement =\n !document.documentElement.contains(event.target as any) ||\n [node, ...refs].find((ref: any) => {\n return ref?.contains(event.target);\n }) !== undefined;\n }\n\n return isWithinElement;\n}\n\nexport const ClickAwayListener = React.forwardRef<HTMLElement, ClickAwayListenerProps>(\n function ClickAwayListener(\n { children, mouseEvent, touchEvent, onClickAway, refs = [], isException },\n ref\n ) {\n const nodeRef = useRef<HTMLElement | null>(null);\n const startedActionWithinElementRef = useRef<boolean>(true);\n const DOMMouseEvent = eventMap[mouseEvent || 'onClick'];\n const DOMTouchEvent = touchMap[touchEvent || 'onTouchEnd'];\n const newRef = useForkRef(ref, nodeRef, (children as any).ref);\n const activatedRef = React.useRef(false);\n\n React.useEffect(() => {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n window.setTimeout(() => {\n activatedRef.current = true;\n }, 0);\n return () => {\n activatedRef.current = false;\n };\n }, []);\n\n const trackAction = useCallback(\n (event: any) => {\n startedActionWithinElementRef.current = isEventWithinElement(\n event,\n nodeRef.current,\n activatedRef.current,\n refs.map(r => r.current)\n );\n },\n [refs]\n );\n\n const eventHandler = useCallback(\n (event: any) => {\n const startedFromWithinElement = startedActionWithinElementRef.current;\n const isWithinElement = isEventWithinElement(\n event,\n nodeRef.current,\n activatedRef.current,\n refs.map(r => r.current)\n );\n\n if (\n !isWithinElement &&\n !startedFromWithinElement &&\n (!isException || !isException(event.target))\n ) {\n onClickAway(event);\n }\n },\n [onClickAway, refs, isException]\n );\n\n useEffect(() => {\n document.addEventListener('mousedown', trackAction);\n document.addEventListener('touchstart', trackAction);\n document.addEventListener(DOMMouseEvent, eventHandler);\n document.addEventListener(DOMTouchEvent, eventHandler);\n return () => {\n document.removeEventListener('mousedown', trackAction);\n document.removeEventListener('touchstart', trackAction);\n document.removeEventListener(DOMMouseEvent, eventHandler);\n document.removeEventListener(DOMTouchEvent, eventHandler);\n };\n }, [DOMTouchEvent, DOMMouseEvent, eventHandler, trackAction]);\n\n return React.cloneElement(children, {\n ...children.props,\n ref: newRef,\n });\n }\n);\n"],"names":["eventMap","touchMap","isEventWithinElement","event","node","activated","refs","isWithinElement","ref","ClickAwayListener","React","children","mouseEvent","touchEvent","onClickAway","isException","nodeRef","useRef","startedActionWithinElementRef","DOMMouseEvent","DOMTouchEvent","newRef","useForkRef","activatedRef","trackAction","useCallback","r","eventHandler","startedFromWithinElement","useEffect"],"mappings":";;AAWA,MAAMA,IAAW;AAAA,EACf,SAAS;AAAA,EACT,aAAa;AAAA,EACb,WAAW;AACb,GACMC,IAAW;AAAA,EACf,cAAc;AAAA,EACd,YAAY;AACd;AAEO,SAASC,EACdC,GACAC,GACAC,GACAC,GACA;AACA,MAAI,CAACD;AACH,WAAO;AAGT,MAAIE;AAEJ,SAAIJ,EAAM,eACRI,IACE,CAACH,GAAM,GAAGE,CAAI,EAAE,KAAK,CAACE,MACbL,EAAM,aAAA,EAAe,QAAQK,CAAG,IAAI,EAC5C,MAAM,SAETD,IACE,CAAC,SAAS,gBAAgB,SAASJ,EAAM,MAAa,KACtD,CAACC,GAAM,GAAGE,CAAI,EAAE,KAAK,CAACE,MACbA,GAAK,SAASL,EAAM,MAAM,CAClC,MAAM,QAGJI;AACT;AAEO,MAAME,IAAoBC,EAAM;AAAA,EACrC,SACE,EAAE,UAAAC,GAAU,YAAAC,GAAY,YAAAC,GAAY,aAAAC,GAAa,MAAAR,IAAO,CAAA,GAAI,aAAAS,EAAA,GAC5DP,GACA;AACA,UAAMQ,IAAUC,EAA2B,IAAI,GACzCC,IAAgCD,EAAgB,EAAI,GACpDE,IAAgBnB,EAASY,KAAc,SAAS,GAChDQ,IAAgBnB,EAASY,KAAc,YAAY,GACnDQ,IAASC,EAAWd,GAAKQ,GAAUL,EAAiB,GAAG,GACvDY,IAAeb,EAAM,OAAO,EAAK;
|
|
1
|
+
{"version":3,"file":"click_away_listener.js","sources":["../../src/utils/click_away_listener.tsx"],"sourcesContent":["import React, { useEffect, useCallback, useRef } from 'react';\nimport { useForkRef } from './hooks/use_fork_ref.js';\nexport interface ClickAwayListenerProps {\n children: React.ReactElement;\n onClickAway: (event: React.MouseEvent | React.TouchEvent) => void;\n mouseEvent?: 'onMouseUp' | 'onMouseDown' | 'onClick';\n touchEvent?: 'onTouchStart' | 'onTouchEnd';\n isException?: (target: HTMLElement) => boolean;\n // An array of refs that wont trigger the click away listener\n refs?: React.RefObject<Element>[];\n}\nconst eventMap = {\n onClick: 'click',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n};\nconst touchMap = {\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n};\n\nexport function isEventWithinElement(\n event: MouseEvent | TouchEvent,\n node: HTMLElement | null,\n activated: boolean,\n refs: (Element | null)[]\n) {\n if (!activated) {\n return true;\n }\n\n let isWithinElement: boolean;\n\n if (event.composedPath) {\n isWithinElement =\n [node, ...refs].find((ref: any) => {\n return event.composedPath().indexOf(ref) > -1;\n }) !== undefined;\n } else {\n isWithinElement =\n !document.documentElement.contains(event.target as any) ||\n [node, ...refs].find((ref: any) => {\n return ref?.contains(event.target);\n }) !== undefined;\n }\n\n return isWithinElement;\n}\n\nexport const ClickAwayListener = React.forwardRef<HTMLElement, ClickAwayListenerProps>(\n function ClickAwayListener(\n { children, mouseEvent, touchEvent, onClickAway, refs = [], isException },\n ref\n ) {\n const nodeRef = useRef<HTMLElement | null>(null);\n const startedActionWithinElementRef = useRef<boolean>(true);\n const DOMMouseEvent = eventMap[mouseEvent || 'onClick'];\n const DOMTouchEvent = touchMap[touchEvent || 'onTouchEnd'];\n const newRef = useForkRef(ref, nodeRef, (children as any).ref);\n const activatedRef = React.useRef(false);\n\n React.useEffect(() => {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n window.setTimeout(() => {\n activatedRef.current = true;\n }, 0);\n return () => {\n activatedRef.current = false;\n };\n }, []);\n\n const trackAction = useCallback(\n (event: any) => {\n startedActionWithinElementRef.current = isEventWithinElement(\n event,\n nodeRef.current,\n activatedRef.current,\n refs.map(r => r.current)\n );\n },\n [refs]\n );\n\n const eventHandler = useCallback(\n (event: any) => {\n const startedFromWithinElement = startedActionWithinElementRef.current;\n const isWithinElement = isEventWithinElement(\n event,\n nodeRef.current,\n activatedRef.current,\n refs.map(r => r.current)\n );\n\n if (\n !isWithinElement &&\n !startedFromWithinElement &&\n (!isException || !isException(event.target))\n ) {\n onClickAway(event);\n }\n },\n [onClickAway, refs, isException]\n );\n\n useEffect(() => {\n document.addEventListener('mousedown', trackAction);\n document.addEventListener('touchstart', trackAction);\n document.addEventListener(DOMMouseEvent, eventHandler);\n document.addEventListener(DOMTouchEvent, eventHandler);\n return () => {\n document.removeEventListener('mousedown', trackAction);\n document.removeEventListener('touchstart', trackAction);\n document.removeEventListener(DOMMouseEvent, eventHandler);\n document.removeEventListener(DOMTouchEvent, eventHandler);\n };\n }, [DOMTouchEvent, DOMMouseEvent, eventHandler, trackAction]);\n\n return React.cloneElement(children, {\n ...children.props,\n ref: newRef,\n });\n }\n);\n"],"names":["eventMap","touchMap","isEventWithinElement","event","node","activated","refs","isWithinElement","ref","ClickAwayListener","React","children","mouseEvent","touchEvent","onClickAway","isException","nodeRef","useRef","startedActionWithinElementRef","DOMMouseEvent","DOMTouchEvent","newRef","useForkRef","activatedRef","trackAction","useCallback","r","eventHandler","startedFromWithinElement","useEffect"],"mappings":";;AAWA,MAAMA,IAAW;AAAA,EACf,SAAS;AAAA,EACT,aAAa;AAAA,EACb,WAAW;AACb,GACMC,IAAW;AAAA,EACf,cAAc;AAAA,EACd,YAAY;AACd;AAEO,SAASC,EACdC,GACAC,GACAC,GACAC,GACA;AACA,MAAI,CAACD;AACH,WAAO;AAGT,MAAIE;AAEJ,SAAIJ,EAAM,eACRI,IACE,CAACH,GAAM,GAAGE,CAAI,EAAE,KAAK,CAACE,MACbL,EAAM,aAAA,EAAe,QAAQK,CAAG,IAAI,EAC5C,MAAM,SAETD,IACE,CAAC,SAAS,gBAAgB,SAASJ,EAAM,MAAa,KACtD,CAACC,GAAM,GAAGE,CAAI,EAAE,KAAK,CAACE,MACbA,GAAK,SAASL,EAAM,MAAM,CAClC,MAAM,QAGJI;AACT;AAEO,MAAME,IAAoBC,EAAM;AAAA,EACrC,SACE,EAAE,UAAAC,GAAU,YAAAC,GAAY,YAAAC,GAAY,aAAAC,GAAa,MAAAR,IAAO,CAAA,GAAI,aAAAS,EAAA,GAC5DP,GACA;AACA,UAAMQ,IAAUC,EAA2B,IAAI,GACzCC,IAAgCD,EAAgB,EAAI,GACpDE,IAAgBnB,EAASY,KAAc,SAAS,GAChDQ,IAAgBnB,EAASY,KAAc,YAAY,GACnDQ,IAASC,EAAWd,GAAKQ,GAAUL,EAAiB,GAAG,GACvDY,IAAeb,EAAM,OAAO,EAAK;AAEvCA,IAAAA,EAAM,UAAU,OAGd,OAAO,WAAW,MAAM;AACtB,MAAAa,EAAa,UAAU;AAAA,IACzB,GAAG,CAAC,GACG,MAAM;AACX,MAAAA,EAAa,UAAU;AAAA,IACzB,IACC,CAAA,CAAE;AAEL,UAAMC,IAAcC;AAAA,MAClB,CAACtB,MAAe;AACd,QAAAe,EAA8B,UAAUhB;AAAA,UACtCC;AAAA,UACAa,EAAQ;AAAA,UACRO,EAAa;AAAA,UACbjB,EAAK,IAAI,CAAAoB,MAAKA,EAAE,OAAO;AAAA,QAAA;AAAA,MAE3B;AAAA,MACA,CAACpB,CAAI;AAAA,IAAA,GAGDqB,IAAeF;AAAA,MACnB,CAACtB,MAAe;AACd,cAAMyB,IAA2BV,EAA8B;AAQ/D,QACE,CARsBhB;AAAA,UACtBC;AAAA,UACAa,EAAQ;AAAA,UACRO,EAAa;AAAA,UACbjB,EAAK,IAAI,CAAAoB,MAAKA,EAAE,OAAO;AAAA,QAAA,KAKvB,CAACE,MACA,CAACb,KAAe,CAACA,EAAYZ,EAAM,MAAM,MAE1CW,EAAYX,CAAK;AAAA,MAErB;AAAA,MACA,CAACW,GAAaR,GAAMS,CAAW;AAAA,IAAA;AAGjC,WAAAc,EAAU,OACR,SAAS,iBAAiB,aAAaL,CAAW,GAClD,SAAS,iBAAiB,cAAcA,CAAW,GACnD,SAAS,iBAAiBL,GAAeQ,CAAY,GACrD,SAAS,iBAAiBP,GAAeO,CAAY,GAC9C,MAAM;AACX,eAAS,oBAAoB,aAAaH,CAAW,GACrD,SAAS,oBAAoB,cAAcA,CAAW,GACtD,SAAS,oBAAoBL,GAAeQ,CAAY,GACxD,SAAS,oBAAoBP,GAAeO,CAAY;AAAA,IAC1D,IACC,CAACP,GAAeD,GAAeQ,GAAcH,CAAW,CAAC,GAErDd,EAAM,aAAaC,GAAU;AAAA,MAClC,GAAGA,EAAS;AAAA,MACZ,KAAKU;AAAA,IAAA,CACN;AAAA,EACH;AACF;"}
|
|
@@ -7,19 +7,19 @@ import '../../../draggable.css';const c = "_draggable_db40376", m = { draggable:
|
|
|
7
7
|
children: a,
|
|
8
8
|
draggable: t = !0
|
|
9
9
|
}) => {
|
|
10
|
-
const o = p({}),
|
|
10
|
+
const o = p({}), e = n(
|
|
11
11
|
() => ({
|
|
12
12
|
"--position-x": `${o.position.x}px`,
|
|
13
13
|
"--position-y": `${o.position.y}px`
|
|
14
14
|
}),
|
|
15
15
|
[o.position]
|
|
16
|
-
),
|
|
16
|
+
), r = i.cloneElement(a, {
|
|
17
17
|
className: l("tcn-draggable", m.draggable, a.props.className),
|
|
18
|
-
style: { ...
|
|
18
|
+
style: { ...e, ...a.props.style },
|
|
19
19
|
"data-is-dragging": o.isDragging,
|
|
20
20
|
"data-is-draggable": t
|
|
21
21
|
});
|
|
22
|
-
return /* @__PURE__ */ s(g.Provider, { value: o, children:
|
|
22
|
+
return /* @__PURE__ */ s(g.Provider, { value: o, children: r });
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
25
|
y as Draggable
|
package/dist/utils/dnd/handle.js
CHANGED
|
@@ -2,17 +2,17 @@ import s, { useRef as f, useEffect as u } from "react";
|
|
|
2
2
|
import a from "clsx";
|
|
3
3
|
import { useDragContainer as l } from "./context.js";
|
|
4
4
|
import { useForkRef as m } from "../hooks/use_fork_ref.js";
|
|
5
|
-
const d = ({ children:
|
|
6
|
-
const { registerHandle: t, unregisterHandle: n } = l(),
|
|
5
|
+
const d = ({ children: r }) => {
|
|
6
|
+
const { registerHandle: t, unregisterHandle: n } = l(), e = f(null);
|
|
7
7
|
u(() => {
|
|
8
|
-
if (
|
|
9
|
-
return t(
|
|
10
|
-
|
|
8
|
+
if (e.current != null)
|
|
9
|
+
return t(e), () => {
|
|
10
|
+
e.current != null && n(e);
|
|
11
11
|
};
|
|
12
12
|
}, [t, n]);
|
|
13
|
-
const o = m(
|
|
14
|
-
return s.cloneElement(
|
|
15
|
-
className: a("tcn-drag-handle",
|
|
13
|
+
const o = m(e, r.props.ref);
|
|
14
|
+
return s.cloneElement(r, {
|
|
15
|
+
className: a("tcn-drag-handle", r.props.className),
|
|
16
16
|
ref: o
|
|
17
17
|
});
|
|
18
18
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import i from "react";
|
|
3
|
+
const n = i.forwardRef(function({ onRedirect: t }, o) {
|
|
4
|
+
return /* @__PURE__ */ e(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
7
|
ref: o,
|
|
@@ -19,6 +19,6 @@ const d = e.forwardRef(function({ onRedirect: t }, o) {
|
|
|
19
19
|
);
|
|
20
20
|
});
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
n as FocusRedirect
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=focus_redirect.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
const i = (
|
|
3
|
-
const
|
|
4
|
-
if (
|
|
2
|
+
const i = (o, t) => () => {
|
|
3
|
+
const e = r.useContext(o);
|
|
4
|
+
if (e === void 0)
|
|
5
5
|
throw t ? new Error(`Context ${t} was accessed outside of a context provider!`) : new Error("Context must be used within a Context Provider!");
|
|
6
|
-
return
|
|
6
|
+
return e;
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
i as makeContextHook
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import s from "react";
|
|
2
|
-
function
|
|
2
|
+
function d(t) {
|
|
3
3
|
const [c, a] = s.useState(!1);
|
|
4
4
|
return s.useEffect(() => {
|
|
5
5
|
const e = window.matchMedia(t);
|
|
@@ -11,6 +11,6 @@ function h(t) {
|
|
|
11
11
|
}, [t]), c;
|
|
12
12
|
}
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
d as useMediaQuery
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=use_media_query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_media_query.js","sources":["../../../src/utils/hooks/use_media_query.ts"],"sourcesContent":["import React from 'react';\n\n/**\n * Custom hook that returns a boolean indicating if the current viewport\n * matches the given media query.\n *\n * @param query - The media query to match against (e.g. \"(min-width: 768px)\")\n * @returns boolean indicating if the media query matches\n */\nexport function useMediaQuery(query: string): boolean {\n const [matches, setMatches] = React.useState(false);\n\n React.useEffect(() => {\n const mediaQuery = window.matchMedia(query);\n\n // Set initial value\n setMatches(mediaQuery.matches);\n\n // Create event listener\n const handler = (event: MediaQueryListEvent) => {\n setMatches(event.matches);\n };\n\n // Add the listener\n mediaQuery.addEventListener('change', handler);\n\n // Clean up\n return () => mediaQuery.removeEventListener('change', handler);\n }, [query]);\n\n return matches;\n}\n"],"names":["useMediaQuery","query","matches","setMatches","React","mediaQuery","handler","event"],"mappings":";AASO,SAASA,EAAcC,GAAwB;AACpD,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAM,SAAS,EAAK;
|
|
1
|
+
{"version":3,"file":"use_media_query.js","sources":["../../../src/utils/hooks/use_media_query.ts"],"sourcesContent":["import React from 'react';\n\n/**\n * Custom hook that returns a boolean indicating if the current viewport\n * matches the given media query.\n *\n * @param query - The media query to match against (e.g. \"(min-width: 768px)\")\n * @returns boolean indicating if the media query matches\n */\nexport function useMediaQuery(query: string): boolean {\n const [matches, setMatches] = React.useState(false);\n\n React.useEffect(() => {\n const mediaQuery = window.matchMedia(query);\n\n // Set initial value\n setMatches(mediaQuery.matches);\n\n // Create event listener\n const handler = (event: MediaQueryListEvent) => {\n setMatches(event.matches);\n };\n\n // Add the listener\n mediaQuery.addEventListener('change', handler);\n\n // Clean up\n return () => mediaQuery.removeEventListener('change', handler);\n }, [query]);\n\n return matches;\n}\n"],"names":["useMediaQuery","query","matches","setMatches","React","mediaQuery","handler","event"],"mappings":";AASO,SAASA,EAAcC,GAAwB;AACpD,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAM,SAAS,EAAK;AAElDA,SAAAA,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,OAAO,WAAWJ,CAAK;AAG1C,IAAAE,EAAWE,EAAW,OAAO;AAG7B,UAAMC,IAAU,CAACC,MAA+B;AAC9C,MAAAJ,EAAWI,EAAM,OAAO;AAAA,IAC1B;AAGA,WAAAF,EAAW,iBAAiB,UAAUC,CAAO,GAGtC,MAAMD,EAAW,oBAAoB,UAAUC,CAAO;AAAA,EAC/D,GAAG,CAACL,CAAK,CAAC,GAEHC;AACT;"}
|
package/dist/v_body.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._v-body_d8f1917{min-height:0;flex-grow:1;width:100%}
|
|
1
|
+
@layer tcn-system{._v-body_d8f1917{min-height:0;flex-grow:1;width:100%}}
|
package/dist/window.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._window_7610fdb{position:relative;box-sizing:border-box}
|
|
1
|
+
@layer tcn-system{:where(._window_7610fdb){position:relative;box-sizing:border-box}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tcn/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "TCN",
|
|
@@ -134,8 +134,8 @@
|
|
|
134
134
|
"dependencies": {
|
|
135
135
|
"clsx": "^2.1.1",
|
|
136
136
|
"react-color": "^2.19.3",
|
|
137
|
-
"@tcn/icons": "2.2.
|
|
138
|
-
"@tcn/state": "1.1.
|
|
137
|
+
"@tcn/icons": "2.2.1",
|
|
138
|
+
"@tcn/state": "1.1.1"
|
|
139
139
|
},
|
|
140
140
|
"scripts": {
|
|
141
141
|
"build": "vite build",
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { Canvas, Meta, Markdown } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as ActionStories from './actions.stories';
|
|
3
|
+
import { Showcase, Section } from './components/showcase';
|
|
4
|
+
import { Gallery } from './components/gallery';
|
|
5
|
+
|
|
6
|
+
<Meta title="Catalog/Actions" of={ActionStories} />
|
|
7
|
+
|
|
8
|
+
# Actions
|
|
9
|
+
|
|
10
|
+
Interactive elements that triggers an action, or event. For example submitting a form, closing a modal, or deleting an entity.
|
|
11
|
+
|
|
12
|
+
- [Actions](#actions)
|
|
13
|
+
- [Button](#button)
|
|
14
|
+
- [Utility (Slim Button)](#utility)
|
|
15
|
+
- [Button Group](#button-group)
|
|
16
|
+
|
|
17
|
+
## Button
|
|
18
|
+
|
|
19
|
+
Relaxed, text based actions for high level page, or surface decisions (Cancel, Save, etc.)
|
|
20
|
+
|
|
21
|
+
<Gallery minColumnWidth="350px">
|
|
22
|
+
|
|
23
|
+
<Showcase
|
|
24
|
+
title="Baseline"
|
|
25
|
+
description="The default, out-of-the-box button with no additional props."
|
|
26
|
+
of={ActionStories.ButtonBaselineShowcase}
|
|
27
|
+
width="180px"
|
|
28
|
+
/>
|
|
29
|
+
|
|
30
|
+
<Showcase
|
|
31
|
+
title="Hierarchy"
|
|
32
|
+
description="Visually indicates the importance of an action and its relationship to other actions. A primary action should be limited to one per surface."
|
|
33
|
+
of={ActionStories.HierarchyShowcase}
|
|
34
|
+
width="380px"
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<Showcase
|
|
38
|
+
title="Size"
|
|
39
|
+
description="Used to customize the size of actions in relation to one another on a surface. Use sparingly, do not use as a replacement for hierarchy."
|
|
40
|
+
of={ActionStories.SizeShowcase}
|
|
41
|
+
width="320px"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<Showcase
|
|
45
|
+
title="Disabled"
|
|
46
|
+
description="Prevents interaction and reduces visual prominence."
|
|
47
|
+
of={ActionStories.DisabledShowcase}
|
|
48
|
+
width="420px"
|
|
49
|
+
/>
|
|
50
|
+
|
|
51
|
+
<Showcase
|
|
52
|
+
title="With Icons"
|
|
53
|
+
description="Icons can be added to buttons with the use of Icon and Spacer components."
|
|
54
|
+
of={ActionStories.IconShowcase}
|
|
55
|
+
width="300px"
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<Showcase
|
|
59
|
+
title="Severity"
|
|
60
|
+
description="Visual indication of the severity of consequential, one-time actions."
|
|
61
|
+
of={ActionStories.SeverityShowcase}
|
|
62
|
+
width="300px"
|
|
63
|
+
>
|
|
64
|
+
<Markdown>
|
|
65
|
+
{`
|
|
66
|
+
**🚧 This concept is being actively developed.**
|
|
67
|
+
|
|
68
|
+
Severity gives users a clear, visual indication of the impact and importance of an action.
|
|
69
|
+
|
|
70
|
+
Should be the primary exception of color variance in actions and generally replacing the need for using custom colors.
|
|
71
|
+
|
|
72
|
+
Use sparingly for consequential, one-time actions such as:
|
|
73
|
+
|
|
74
|
+
- Deleting an entity permanently - **dangerous**
|
|
75
|
+
- Discarding the UIs current state or unsaved changes when leaving the page - **cautious**
|
|
76
|
+
- Prompting a user to pick a preferred option out of multiple otherwise valid options - **suggested**
|
|
77
|
+
- Client confirmation for important migration - **encouraged**
|
|
78
|
+
`}
|
|
79
|
+
</Markdown>
|
|
80
|
+
</Showcase>
|
|
81
|
+
|
|
82
|
+
<Showcase
|
|
83
|
+
title="Custom Colors"
|
|
84
|
+
description="
|
|
85
|
+
Override accent color for heavily brand or product specific actions.
|
|
86
|
+
Use sparingly, should be avoided to create cohesion and consistency between UIs."
|
|
87
|
+
of={ActionStories.ColorShowcase}
|
|
88
|
+
width="420px"
|
|
89
|
+
/>
|
|
90
|
+
|
|
91
|
+
<Showcase
|
|
92
|
+
title="Full Width"
|
|
93
|
+
description="Fill container width for mobile or prominent CTAs."
|
|
94
|
+
of={ActionStories.FullWidth}
|
|
95
|
+
width="340px"
|
|
96
|
+
/>
|
|
97
|
+
|
|
98
|
+
</Gallery>
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## Utility
|
|
103
|
+
|
|
104
|
+
Compact, icon-based actions. Used as re-usable tooling for item rows, utility bars, or supplemental behavior on elements (Close Panel, Copy Entity, ect)
|
|
105
|
+
|
|
106
|
+
<Gallery>
|
|
107
|
+
|
|
108
|
+
<Showcase
|
|
109
|
+
title="Baseline"
|
|
110
|
+
description="The default, out-of-the-box utility button with no additional props."
|
|
111
|
+
of={ActionStories.SlimButtonBaselineShowcase}
|
|
112
|
+
width="180px"
|
|
113
|
+
/>
|
|
114
|
+
|
|
115
|
+
<Showcase
|
|
116
|
+
title="Hierarchy"
|
|
117
|
+
description="Visually indicates the importance of an action and its relationship to other actions. A primary action should be limited to one per surface."
|
|
118
|
+
of={ActionStories.SlimButtonHierarchy}
|
|
119
|
+
width="240px"
|
|
120
|
+
/>
|
|
121
|
+
|
|
122
|
+
<Showcase
|
|
123
|
+
title="Size"
|
|
124
|
+
description="Used to customize the size of actions in relation to one another on a surface. Use sparingly, do not use as a replacement for hierarchy."
|
|
125
|
+
of={ActionStories.SlimButtonSizes}
|
|
126
|
+
width="220px"
|
|
127
|
+
/>
|
|
128
|
+
|
|
129
|
+
<Showcase
|
|
130
|
+
title="Disabled"
|
|
131
|
+
description="Prevents interaction and reduces visual prominence."
|
|
132
|
+
of={ActionStories.SlimButtonDisabled}
|
|
133
|
+
width="240px"
|
|
134
|
+
/>
|
|
135
|
+
|
|
136
|
+
<Showcase
|
|
137
|
+
title="Severity"
|
|
138
|
+
description="Visual indication of the severity of consequential, one-time actions."
|
|
139
|
+
of={ActionStories.SlimButtonSeverity}
|
|
140
|
+
width="140px"
|
|
141
|
+
/>
|
|
142
|
+
|
|
143
|
+
<Showcase
|
|
144
|
+
title="Custom Colors"
|
|
145
|
+
description="Override accent color for heavily brand or product specific actions. Use sparingly, should be avoided to create cohesion and consistency between UIs."
|
|
146
|
+
of={ActionStories.SlimButtonColors}
|
|
147
|
+
width="140px"
|
|
148
|
+
/>
|
|
149
|
+
|
|
150
|
+
</Gallery>
|
|
151
|
+
|
|
152
|
+
## Button Group
|
|
153
|
+
|
|
154
|
+
Visually grouped and styled buttons for closely related actions. The `hierarchy` and `size` props set on the ButtonGroup are automatically inherited by all child Button elements, ensuring visual consistency without needing to configure each button individually.
|
|
155
|
+
|
|
156
|
+
<Gallery minColumnWidth="380px">
|
|
157
|
+
|
|
158
|
+
<Showcase
|
|
159
|
+
title="Baseline"
|
|
160
|
+
description="The default, out-of-the-box button group with no additional props."
|
|
161
|
+
of={ActionStories.ButtonGroupBaselineShowcase}
|
|
162
|
+
/>
|
|
163
|
+
|
|
164
|
+
<Showcase
|
|
165
|
+
title="Hierarchy"
|
|
166
|
+
description="Set hierarchy on the parent ButtonGroup to style all child buttons uniformly. Individual buttons do not need hierarchy props—they inherit from the group."
|
|
167
|
+
of={ActionStories.ButtonGroupHierarchy}
|
|
168
|
+
/>
|
|
169
|
+
|
|
170
|
+
<Showcase
|
|
171
|
+
title="Size"
|
|
172
|
+
description="Set size on the parent ButtonGroup to control all child button sizes uniformly. Individual buttons inherit the group's size automatically."
|
|
173
|
+
of={ActionStories.ButtonGroupSizes}
|
|
174
|
+
/>
|
|
175
|
+
|
|
176
|
+
<Showcase
|
|
177
|
+
title="Disabled"
|
|
178
|
+
description="Individual buttons within a group can be disabled while others remain active."
|
|
179
|
+
of={ActionStories.ButtonGroupDisabled}
|
|
180
|
+
/>
|
|
181
|
+
|
|
182
|
+
<Showcase
|
|
183
|
+
title="Severity"
|
|
184
|
+
description="Severity can still be set on individual buttons within a group if a specific action should be elevated."
|
|
185
|
+
of={ActionStories.ButtonGroupSeverity}
|
|
186
|
+
/>
|
|
187
|
+
|
|
188
|
+
<Showcase
|
|
189
|
+
title="With Icons"
|
|
190
|
+
description="Buttons within groups can contain icons, either standalone or combined with text."
|
|
191
|
+
of={ActionStories.ButtonGroupWithIcons}
|
|
192
|
+
/>
|
|
193
|
+
|
|
194
|
+
</Gallery>
|