@tcn/ui 0.17.0 → 0.18.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/AI_USAGE.md +59 -0
- package/CHANGELOG.md +1009 -0
- package/ai-docs/actions.md +43 -0
- package/ai-docs/decorators.md +34 -0
- package/ai-docs/feedback.md +31 -0
- package/ai-docs/form.md +58 -0
- package/ai-docs/inputs.md +71 -0
- package/ai-docs/layouts.md +76 -0
- package/ai-docs/mobile.md +34 -0
- package/ai-docs/navigation.md +48 -0
- package/ai-docs/overlay.md +58 -0
- package/ai-docs/stacks.md +59 -0
- package/ai-docs/surfaces.md +79 -0
- package/ai-docs/themes.md +47 -0
- package/ai-docs/tokens.md +35 -0
- package/ai-docs/typography.md +38 -0
- package/ai-docs/utils.md +51 -0
- package/dist/actions/index.d.ts +0 -1
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +6 -8
- package/dist/actions/index.js.map +1 -1
- package/dist/draggable.css +1 -1
- package/dist/draggable.module-DFYR5n3n.js +5 -0
- package/dist/draggable.module-DFYR5n3n.js.map +1 -0
- package/dist/field_set.css +1 -1
- package/dist/field_set.module-BpJTFCi4.js +5 -0
- package/dist/field_set.module-BpJTFCi4.js.map +1 -0
- package/dist/form/field/field.js +11 -10
- package/dist/form/field/field.js.map +1 -1
- package/dist/form/field_set/field_set.d.ts +6 -10
- package/dist/form/field_set/field_set.d.ts.map +1 -1
- package/dist/form/field_set/field_set.js +33 -61
- package/dist/form/field_set/field_set.js.map +1 -1
- package/dist/form/field_set/legend.d.ts +20 -0
- package/dist/form/field_set/legend.d.ts.map +1 -0
- package/dist/form/field_set/legend.js +28 -0
- package/dist/form/field_set/legend.js.map +1 -0
- package/dist/form/index.d.ts +2 -1
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +24 -22
- package/dist/form/index.js.map +1 -1
- package/dist/inputs/color_input/color_input.js +2 -3
- package/dist/inputs/color_input/color_input.js.map +1 -1
- package/dist/inputs/color_input/color_picker.js +11 -10
- package/dist/inputs/color_input/color_picker.js.map +1 -1
- package/dist/inputs/combo_box/combo_box.js +11 -10
- package/dist/inputs/combo_box/combo_box.js.map +1 -1
- package/dist/inputs/date_picker/date_picker.js +11 -10
- package/dist/inputs/date_picker/date_picker.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_header.d.ts.map +1 -1
- package/dist/inputs/date_picker/date_picker_header.js +15 -14
- package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_input.js +9 -9
- package/dist/inputs/date_picker/date_picker_time_selector.js +2 -3
- package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_input.js +2 -3
- package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_selector.js +22 -22
- package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
- package/dist/inputs/mask_input/key_capture_input.js +21 -20
- package/dist/inputs/mask_input/key_capture_input.js.map +1 -1
- package/dist/inputs/mask_input/mask_input.js +18 -17
- package/dist/inputs/mask_input/mask_input.js.map +1 -1
- package/dist/inputs/multiselect/multiselect.js +11 -10
- 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 +15 -15
- package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_values.js +16 -17
- package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_context.js +13 -12
- package/dist/inputs/phone_number_input/phone_number_context.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input_adapter.js +2 -3
- package/dist/inputs/phone_number_input/phone_number_input_adapter.js.map +1 -1
- package/dist/inputs/phone_number_input/sip_input.js +8 -9
- package/dist/inputs/phone_number_input/sip_input.js.map +1 -1
- package/dist/inputs/select/select.js +9 -9
- package/dist/inputs/slider/slider.js +21 -20
- package/dist/inputs/slider/slider.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +9 -9
- package/dist/inputs/switch/switch.js +16 -15
- package/dist/inputs/switch/switch.js.map +1 -1
- package/dist/inputs/unit_input/unit_input.js +11 -10
- package/dist/inputs/unit_input/unit_input.js.map +1 -1
- package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js +11 -10
- package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js.map +1 -1
- package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js +11 -10
- package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js.map +1 -1
- package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js +11 -10
- package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js.map +1 -1
- package/dist/multiselect_values.css +1 -1
- package/dist/navigation/tabs/state/link/tab_link.js +11 -10
- package/dist/navigation/tabs/state/link/tab_link.js.map +1 -1
- package/dist/overlay/frame/frame.d.ts.map +1 -1
- package/dist/overlay/frame/frame.js +117 -76
- package/dist/overlay/frame/frame.js.map +1 -1
- package/dist/overlay/menu/menu.js +21 -20
- package/dist/overlay/menu/menu.js.map +1 -1
- package/dist/overlay/popper/base/dismissal_decorator.js +3 -3
- package/dist/overlay/popper/base/dismissal_decorator.js.map +1 -1
- package/dist/overlay/popper/context_popper.js +11 -10
- package/dist/overlay/popper/context_popper.js.map +1 -1
- package/dist/overlay/popper/element_popper.js +11 -10
- package/dist/overlay/popper/element_popper.js.map +1 -1
- package/dist/overlay/popper/legacy/popper.js +28 -27
- package/dist/overlay/popper/legacy/popper.js.map +1 -1
- package/dist/overlay/popper/preview_popper.js +11 -10
- package/dist/overlay/popper/preview_popper.js.map +1 -1
- package/dist/overlay/tethered/tethered.js +11 -10
- package/dist/overlay/tethered/tethered.js.map +1 -1
- package/dist/resizable.css +1 -1
- package/dist/resizable.module-ur5FBfxo.js +5 -0
- package/dist/resizable.module-ur5FBfxo.js.map +1 -0
- package/dist/resize_handle.css +1 -1
- package/dist/stacks/box/box.d.ts +14 -0
- package/dist/stacks/box/box.d.ts.map +1 -1
- package/dist/stacks/box/box.js +98 -99
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/stacks/box/end_resize_handle.js +5 -5
- package/dist/stacks/box/end_resize_handle.js.map +1 -1
- package/dist/stacks/box/resize_handlers.d.ts.map +1 -1
- package/dist/stacks/box/resize_handlers.js +12 -12
- package/dist/stacks/box/resize_handlers.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/types.d.ts +3 -2
- package/dist/stacks/box/types.d.ts.map +1 -1
- package/dist/stacks/h_collapsible_box.js +14 -13
- package/dist/stacks/h_collapsible_box.js.map +1 -1
- package/dist/stacks/v_collapsible_box.js +14 -13
- package/dist/stacks/v_collapsible_box.js.map +1 -1
- package/dist/surfaces/alert/alert.js +7 -8
- package/dist/surfaces/alert/alert.js.map +1 -1
- package/dist/themes/stories/button_showcase.d.ts.map +1 -1
- package/dist/themes/stories/controls_fieldset.d.ts.map +1 -1
- package/dist/themes/stories/menu_showcase.d.ts.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/themes/themes/ergo/ergo_theme.d.ts.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.js +336 -294
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/themes/themes/ergo/parts/actions.css +1 -0
- package/dist/themes/themes/ergo/parts/base.css +1 -0
- package/dist/themes/themes/ergo/parts/form.css +1 -0
- package/dist/themes/themes/ergo/parts/inputs.css +1 -0
- package/dist/themes/themes/ergo/parts/navigation.css +1 -0
- package/dist/themes/themes/windows_98/windows_98.css +1 -1
- package/dist/themes/themes/windows_98/windows_98_theme.js +32 -43
- package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
- package/dist/utils/decorators/clone_with_decorator.d.ts +21 -0
- package/dist/utils/decorators/clone_with_decorator.d.ts.map +1 -0
- package/dist/utils/decorators/clone_with_decorator.js +16 -0
- package/dist/utils/decorators/clone_with_decorator.js.map +1 -0
- package/dist/utils/decorators/draggable/context.d.ts.map +1 -0
- package/dist/utils/decorators/draggable/context.js.map +1 -0
- package/dist/utils/{dnd/handle.d.ts → decorators/draggable/drag_handle.d.ts} +1 -1
- package/dist/utils/decorators/draggable/drag_handle.d.ts.map +1 -0
- package/dist/utils/{dnd/handle.js → decorators/draggable/drag_handle.js} +2 -2
- package/dist/utils/decorators/draggable/drag_handle.js.map +1 -0
- package/dist/utils/decorators/draggable/draggable.d.ts.map +1 -0
- package/dist/utils/{dnd → decorators}/draggable/draggable.js +3 -3
- package/dist/utils/decorators/draggable/draggable.js.map +1 -0
- package/dist/utils/decorators/draggable/index.d.ts +11 -0
- package/dist/utils/decorators/draggable/index.d.ts.map +1 -0
- package/dist/utils/decorators/draggable/index.js +14 -0
- package/dist/utils/{dnd → decorators/draggable}/types.d.ts +1 -1
- package/dist/utils/decorators/draggable/types.d.ts.map +1 -0
- package/dist/utils/{dnd/hooks → decorators/draggable}/use_drag_container.d.ts +2 -2
- package/dist/utils/decorators/draggable/use_drag_container.d.ts.map +1 -0
- package/dist/utils/decorators/draggable/use_drag_container.js.map +1 -0
- package/dist/utils/decorators/draggable/use_draggable.d.ts.map +1 -0
- package/dist/utils/decorators/draggable/use_draggable.js.map +1 -0
- package/dist/utils/decorators/index.d.ts +3 -0
- package/dist/utils/decorators/index.d.ts.map +1 -0
- package/dist/utils/decorators/index.js +27 -0
- package/dist/utils/decorators/index.js.map +1 -0
- package/dist/utils/decorators/resizable/context.d.ts.map +1 -0
- package/dist/utils/{resize → decorators/resizable}/context.js +1 -1
- package/dist/utils/decorators/resizable/context.js.map +1 -0
- package/dist/utils/decorators/resizable/handle_config.d.ts.map +1 -0
- package/dist/utils/decorators/resizable/handle_config.js +62 -0
- package/dist/utils/decorators/resizable/handle_config.js.map +1 -0
- package/dist/utils/decorators/resizable/index.d.ts.map +1 -0
- package/dist/utils/decorators/resizable/index.js.map +1 -0
- package/dist/utils/decorators/resizable/resizable.d.ts.map +1 -0
- package/dist/utils/{resize → decorators/resizable}/resizable.js +2 -2
- package/dist/utils/decorators/resizable/resizable.js.map +1 -0
- package/dist/utils/decorators/resizable/resize_handle.d.ts.map +1 -0
- package/dist/utils/{resize → decorators/resizable}/resize_handle.js +2 -2
- package/dist/utils/decorators/resizable/resize_handle.js.map +1 -0
- package/dist/utils/{resize → decorators/resizable}/resize_strategy.d.ts +1 -1
- package/dist/utils/decorators/resizable/resize_strategy.d.ts.map +1 -0
- package/dist/utils/decorators/resizable/resize_strategy.js.map +1 -0
- package/dist/utils/{resize → decorators/resizable}/types.d.ts +2 -2
- package/dist/utils/decorators/resizable/types.d.ts.map +1 -0
- package/dist/utils/hooks/labelled_by_context.d.ts +21 -0
- package/dist/utils/hooks/labelled_by_context.d.ts.map +1 -0
- package/dist/utils/hooks/labelled_by_context.js +12 -0
- package/dist/utils/hooks/labelled_by_context.js.map +1 -0
- package/dist/utils/index.d.ts +8 -8
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +44 -40
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/listeners/click_away_listener.d.ts.map +1 -0
- package/dist/utils/{click_away_listener.js → listeners/click_away_listener.js} +1 -1
- package/dist/utils/listeners/click_away_listener.js.map +1 -0
- package/dist/utils/listeners/focus_redirect.d.ts.map +1 -0
- package/dist/utils/listeners/focus_redirect.js.map +1 -0
- package/dist/utils/listeners/index.d.ts +4 -0
- package/dist/utils/listeners/index.d.ts.map +1 -0
- package/dist/utils/listeners/index.js +10 -0
- package/dist/utils/listeners/index.js.map +1 -0
- package/dist/utils/listeners/mouse_leave_region.d.ts.map +1 -0
- package/dist/utils/listeners/mouse_leave_region.js.map +1 -0
- package/dist/utils/listeners/scroll_away_listener.d.ts.map +1 -0
- package/dist/utils/{scroll_away_listener.js → listeners/scroll_away_listener.js} +1 -1
- package/dist/utils/listeners/scroll_away_listener.js.map +1 -0
- package/dist/utils/system/index.d.ts +2 -0
- package/dist/utils/system/index.d.ts.map +1 -0
- package/dist/utils/system/index.js +2 -0
- package/dist/utils/system/index.js.map +1 -0
- package/dist/utils/system/variations.d.ts.map +1 -0
- package/dist/utils/system/variations.js +2 -0
- package/dist/utils/system/variations.js.map +1 -0
- package/dist/utils/types/sides.d.ts +3 -0
- package/dist/utils/types/sides.d.ts.map +1 -0
- package/package.json +7 -9
- package/src/actions/button/__stories__/button_group.stories.tsx +23 -24
- package/src/actions/index.ts +0 -1
- package/src/form/field/field.stories.tsx +2 -2
- package/src/form/field/h_field/h_field.stories.tsx +1 -1
- package/src/form/field/v_field/v_field.stories.tsx +1 -1
- package/src/form/field_set/field_set.module.css +0 -14
- package/src/form/field_set/field_set.stories.tsx +101 -1
- package/src/form/field_set/field_set.tsx +43 -57
- package/src/form/field_set/legend.tsx +44 -0
- package/src/form/index.ts +6 -1
- package/src/inputs/date_picker/date_picker_header.tsx +7 -5
- package/src/inputs/date_picker/date_picker_year_selector.tsx +5 -5
- package/src/inputs/multiselect/multiselect_inline_values.tsx +4 -3
- package/src/inputs/multiselect/multiselect_values.module.css +1 -0
- package/src/inputs/multiselect/multiselect_values.tsx +4 -4
- package/src/overlay/frame/frame.stories.tsx +2 -1
- package/src/overlay/frame/frame.tsx +68 -20
- package/src/overlay/popper/base/dismissal_decorator.tsx +3 -3
- package/src/overlay/popper/legacy/popper.stories.tsx +9 -2
- package/src/overlay/slide/slide.stories.tsx +1 -1
- package/src/stacks/box/box.tsx +29 -4
- package/src/stacks/box/end_resize_handle.tsx +1 -1
- package/src/stacks/box/resize_handlers.ts +1 -1
- package/src/stacks/box/start_resize_handle.tsx +1 -1
- package/src/stacks/box/types.ts +3 -2
- package/src/stacks/collapsible_box.stories.tsx +5 -5
- package/src/stacks/demo.stories.tsx +7 -7
- package/src/surfaces/page/page.stories.tsx +4 -4
- package/src/surfaces/window/window.stories.tsx +1 -1
- package/src/themes/stories/button_showcase.tsx +3 -1
- package/src/themes/stories/controls_fieldset.tsx +3 -1
- package/src/themes/stories/menu_showcase.tsx +3 -1
- package/src/themes/themes/ergo/INTERACTIVE.md +89 -0
- package/src/themes/themes/ergo/ROADMAP.md +116 -0
- package/src/themes/themes/ergo/ergo_theme.css +22 -717
- package/src/themes/themes/ergo/ergo_theme.ts +15 -1
- package/src/themes/themes/ergo/parts/actions.css +287 -0
- package/src/themes/themes/ergo/parts/base.css +62 -0
- package/src/themes/themes/ergo/parts/form.css +23 -0
- package/src/themes/themes/ergo/parts/inputs.css +252 -0
- package/src/themes/themes/ergo/parts/navigation.css +104 -0
- package/src/themes/themes/windows_98/windows_98.css +32 -43
- package/src/tokens/chip/chip.stories.tsx +5 -5
- package/src/utils/decorators/DECORATOR_PATTERN.md +86 -0
- package/src/utils/decorators/clone_with_decorator.ts +47 -0
- package/src/utils/{dnd → decorators/draggable}/__stories__/draggable.stories.tsx +7 -7
- package/src/utils/{dnd → decorators/draggable}/__stories__/use_draggable.stories.tsx +2 -2
- package/src/utils/{dnd/handle.tsx → decorators/draggable/drag_handle.tsx} +1 -1
- package/src/utils/{dnd → decorators}/draggable/draggable.tsx +2 -2
- package/src/utils/decorators/draggable/index.ts +15 -0
- package/src/utils/{dnd → decorators/draggable}/types.ts +1 -1
- package/src/utils/{dnd/hooks → decorators/draggable}/use_drag_container.ts +2 -2
- package/src/utils/decorators/index.ts +2 -0
- package/src/utils/{resize → decorators/resizable}/__stories__/resizable.stories.tsx +23 -23
- package/src/utils/{resize → decorators/resizable}/__tests__/handle_config.test.ts +19 -97
- package/src/utils/{resize → decorators/resizable}/__tests__/resize_strategy.test.ts +20 -20
- package/src/utils/{resize → decorators/resizable}/context.ts +1 -1
- package/src/utils/{resize → decorators/resizable}/handle_config.ts +7 -31
- package/src/utils/{resize → decorators/resizable}/resizable.tsx +1 -1
- package/src/utils/{resize → decorators/resizable}/resize_handle.module.css +1 -41
- package/src/utils/{resize → decorators/resizable}/resize_handle.tsx +1 -1
- package/src/utils/{resize → decorators/resizable}/resize_strategy.ts +1 -1
- package/src/utils/{resize → decorators/resizable}/types.ts +1 -7
- package/src/utils/hooks/labelled_by_context.ts +27 -0
- package/src/utils/index.ts +8 -8
- package/src/utils/{click_away_listener.tsx → listeners/click_away_listener.tsx} +1 -1
- package/src/utils/listeners/index.ts +3 -0
- package/src/utils/{scroll_away_listener.tsx → listeners/scroll_away_listener.tsx} +1 -1
- package/src/utils/system/index.ts +1 -0
- package/src/utils/types/sides.ts +2 -0
- package/dist/actions/button/slim_button/slim_button.d.ts +0 -9
- package/dist/actions/button/slim_button/slim_button.d.ts.map +0 -1
- package/dist/actions/button/slim_button/slim_button.js +0 -18
- package/dist/actions/button/slim_button/slim_button.js.map +0 -1
- package/dist/draggable.module-BgelQsuJ.js +0 -5
- package/dist/draggable.module-BgelQsuJ.js.map +0 -1
- package/dist/frame.css +0 -1
- package/dist/left_resize_handle.css +0 -1
- package/dist/resizable.module-I6iyBAvM.js +0 -5
- package/dist/resizable.module-I6iyBAvM.js.map +0 -1
- package/dist/right_resize_handle.css +0 -1
- package/dist/slim_button.css +0 -1
- package/dist/stacks/box/left_resize_handle.d.ts +0 -4
- package/dist/stacks/box/left_resize_handle.d.ts.map +0 -1
- package/dist/stacks/box/left_resize_handle.js +0 -36
- package/dist/stacks/box/left_resize_handle.js.map +0 -1
- package/dist/stacks/box/right_resize_handle.d.ts +0 -4
- package/dist/stacks/box/right_resize_handle.d.ts.map +0 -1
- package/dist/stacks/box/right_resize_handle.js +0 -36
- package/dist/stacks/box/right_resize_handle.js.map +0 -1
- package/dist/utils/click_away_listener.d.ts.map +0 -1
- package/dist/utils/click_away_listener.js.map +0 -1
- package/dist/utils/dnd/context.d.ts.map +0 -1
- package/dist/utils/dnd/context.js.map +0 -1
- package/dist/utils/dnd/draggable/draggable.d.ts.map +0 -1
- package/dist/utils/dnd/draggable/draggable.js.map +0 -1
- package/dist/utils/dnd/handle.d.ts.map +0 -1
- package/dist/utils/dnd/handle.js.map +0 -1
- package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +0 -1
- package/dist/utils/dnd/hooks/use_drag_container.js.map +0 -1
- package/dist/utils/dnd/hooks/use_draggable.d.ts.map +0 -1
- package/dist/utils/dnd/hooks/use_draggable.js.map +0 -1
- package/dist/utils/dnd/types.d.ts.map +0 -1
- package/dist/utils/focus_redirect.d.ts.map +0 -1
- package/dist/utils/focus_redirect.js.map +0 -1
- package/dist/utils/mouse_leave_region.d.ts.map +0 -1
- package/dist/utils/mouse_leave_region.js.map +0 -1
- package/dist/utils/resize/context.d.ts.map +0 -1
- package/dist/utils/resize/context.js.map +0 -1
- package/dist/utils/resize/handle_config.d.ts.map +0 -1
- package/dist/utils/resize/handle_config.js +0 -85
- package/dist/utils/resize/handle_config.js.map +0 -1
- package/dist/utils/resize/index.d.ts.map +0 -1
- package/dist/utils/resize/resizable.d.ts.map +0 -1
- package/dist/utils/resize/resizable.js.map +0 -1
- package/dist/utils/resize/resize_handle.d.ts.map +0 -1
- package/dist/utils/resize/resize_handle.js.map +0 -1
- package/dist/utils/resize/resize_strategy.d.ts.map +0 -1
- package/dist/utils/resize/resize_strategy.js.map +0 -1
- package/dist/utils/resize/types.d.ts.map +0 -1
- package/dist/utils/scroll_away_listener.d.ts.map +0 -1
- package/dist/utils/scroll_away_listener.js.map +0 -1
- package/dist/utils/types/variations.d.ts.map +0 -1
- package/src/actions/button/__stories__/slim_button.stories.tsx +0 -274
- package/src/actions/button/slim_button/slim_button.module.css +0 -9
- package/src/actions/button/slim_button/slim_button.tsx +0 -26
- package/src/overlay/frame/frame.module.css +0 -5
- package/src/stacks/box/left_resize_handle.module.css +0 -12
- package/src/stacks/box/left_resize_handle.tsx +0 -39
- package/src/stacks/box/right_resize_handle.module.css +0 -12
- package/src/stacks/box/right_resize_handle.tsx +0 -38
- /package/dist/utils/{dnd → decorators/draggable}/context.d.ts +0 -0
- /package/dist/utils/{dnd → decorators/draggable}/context.js +0 -0
- /package/dist/utils/{dnd → decorators}/draggable/draggable.d.ts +0 -0
- /package/dist/utils/{resize → decorators/draggable}/index.js.map +0 -0
- /package/dist/utils/{dnd → decorators/draggable}/types.js +0 -0
- /package/dist/utils/{dnd → decorators/draggable}/types.js.map +0 -0
- /package/dist/utils/{dnd/hooks → decorators/draggable}/use_drag_container.js +0 -0
- /package/dist/utils/{dnd/hooks → decorators/draggable}/use_draggable.d.ts +0 -0
- /package/dist/utils/{dnd/hooks → decorators/draggable}/use_draggable.js +0 -0
- /package/dist/utils/{resize → decorators/resizable}/context.d.ts +0 -0
- /package/dist/utils/{resize → decorators/resizable}/handle_config.d.ts +0 -0
- /package/dist/utils/{resize → decorators/resizable}/index.d.ts +0 -0
- /package/dist/utils/{resize → decorators/resizable}/index.js +0 -0
- /package/dist/utils/{resize → decorators/resizable}/resizable.d.ts +0 -0
- /package/dist/utils/{resize → decorators/resizable}/resize_handle.d.ts +0 -0
- /package/dist/utils/{resize → decorators/resizable}/resize_strategy.js +0 -0
- /package/dist/utils/{resize → decorators/resizable}/types.js +0 -0
- /package/dist/utils/{resize → decorators/resizable}/types.js.map +0 -0
- /package/dist/utils/{click_away_listener.d.ts → listeners/click_away_listener.d.ts} +0 -0
- /package/dist/utils/{focus_redirect.d.ts → listeners/focus_redirect.d.ts} +0 -0
- /package/dist/utils/{focus_redirect.js → listeners/focus_redirect.js} +0 -0
- /package/dist/utils/{mouse_leave_region.d.ts → listeners/mouse_leave_region.d.ts} +0 -0
- /package/dist/utils/{mouse_leave_region.js → listeners/mouse_leave_region.js} +0 -0
- /package/dist/utils/{scroll_away_listener.d.ts → listeners/scroll_away_listener.d.ts} +0 -0
- /package/dist/utils/{types → system}/variations.d.ts +0 -0
- /package/src/utils/{dnd → decorators/draggable}/__stories__/draggable_stories.module.css +0 -0
- /package/src/utils/{dnd → decorators/draggable}/context.ts +0 -0
- /package/src/utils/{dnd → decorators}/draggable/draggable.module.css +0 -0
- /package/src/utils/{dnd/hooks → decorators/draggable}/use_draggable.ts +0 -0
- /package/src/utils/{resize → decorators/resizable}/__stories__/resizable_stories.module.css +0 -0
- /package/src/utils/{resize → decorators/resizable}/index.ts +0 -0
- /package/src/utils/{resize → decorators/resizable}/resizable.module.css +0 -0
- /package/src/utils/{click_away_listener.stories.tsx → listeners/click_away_listener.stories.tsx} +0 -0
- /package/src/utils/{focus_redirect.tsx → listeners/focus_redirect.tsx} +0 -0
- /package/src/utils/{mouse_leave_region.tsx → listeners/mouse_leave_region.tsx} +0 -0
- /package/src/utils/{scroll_away_listener.stories.tsx → listeners/scroll_away_listener.stories.tsx} +0 -0
- /package/src/utils/{types → system}/variations.ts +0 -0
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
3
|
-
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
4
|
-
import { theme } from '../../../themes/index.js';
|
|
5
|
-
import { HStack } from '../../../stacks/h_stack.js';
|
|
6
|
-
import { ZStack } from '../../../stacks/z_stack.js';
|
|
7
|
-
import { ButtonProps } from '../button/button.js';
|
|
8
|
-
import { SlimButton } from '../slim_button/slim_button.js';
|
|
9
|
-
|
|
10
|
-
const meta: Meta<ButtonProps> = {
|
|
11
|
-
title: 'Actions/Slim Button',
|
|
12
|
-
component: SlimButton,
|
|
13
|
-
tags: ['autodocs'],
|
|
14
|
-
args: {
|
|
15
|
-
hierarchy: 'secondary',
|
|
16
|
-
disabled: false,
|
|
17
|
-
size: 'md',
|
|
18
|
-
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
hierarchy: {
|
|
21
|
-
control: 'select',
|
|
22
|
-
options: ['primary', 'secondary', 'tertiary'],
|
|
23
|
-
},
|
|
24
|
-
color: { control: 'color' },
|
|
25
|
-
minWidth: { control: 'text' },
|
|
26
|
-
width: { control: 'text' },
|
|
27
|
-
maxWidth: { control: 'text' },
|
|
28
|
-
minHeight: { control: 'text' },
|
|
29
|
-
height: { control: 'text' },
|
|
30
|
-
maxHeight: { control: 'text' },
|
|
31
|
-
size: { control: 'select', options: ['sm', 'md', 'lg'] },
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default meta;
|
|
36
|
-
|
|
37
|
-
type Story = StoryObj<ButtonProps>;
|
|
38
|
-
|
|
39
|
-
// Default Button
|
|
40
|
-
export const Default: Story = {
|
|
41
|
-
args: {
|
|
42
|
-
hierarchy: 'primary',
|
|
43
|
-
children: <CrossIcon />,
|
|
44
|
-
},
|
|
45
|
-
decorators: [
|
|
46
|
-
Story => (
|
|
47
|
-
<ZStack>
|
|
48
|
-
<Story />
|
|
49
|
-
</ZStack>
|
|
50
|
-
),
|
|
51
|
-
],
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const Primary: Story = {
|
|
55
|
-
args: {
|
|
56
|
-
hierarchy: 'primary',
|
|
57
|
-
children: <CrossIcon />,
|
|
58
|
-
},
|
|
59
|
-
decorators: [
|
|
60
|
-
Story => (
|
|
61
|
-
<ZStack>
|
|
62
|
-
<Story />
|
|
63
|
-
</ZStack>
|
|
64
|
-
),
|
|
65
|
-
],
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const Secondary: Story = {
|
|
69
|
-
args: {
|
|
70
|
-
hierarchy: 'secondary',
|
|
71
|
-
children: <CrossIcon />,
|
|
72
|
-
},
|
|
73
|
-
decorators: [
|
|
74
|
-
Story => (
|
|
75
|
-
<ZStack>
|
|
76
|
-
<Story />
|
|
77
|
-
</ZStack>
|
|
78
|
-
),
|
|
79
|
-
],
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export const Tertiary: Story = {
|
|
83
|
-
args: {
|
|
84
|
-
hierarchy: 'tertiary',
|
|
85
|
-
children: <CrossIcon />,
|
|
86
|
-
},
|
|
87
|
-
decorators: [
|
|
88
|
-
Story => (
|
|
89
|
-
<ZStack>
|
|
90
|
-
<Story />
|
|
91
|
-
</ZStack>
|
|
92
|
-
),
|
|
93
|
-
],
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// Disabled States
|
|
97
|
-
export const Disabled: Story = {
|
|
98
|
-
args: {
|
|
99
|
-
disabled: true,
|
|
100
|
-
children: <CrossIcon />,
|
|
101
|
-
},
|
|
102
|
-
decorators: [
|
|
103
|
-
Story => (
|
|
104
|
-
<ZStack>
|
|
105
|
-
<Story />
|
|
106
|
-
</ZStack>
|
|
107
|
-
),
|
|
108
|
-
],
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// Custom Dimensions
|
|
112
|
-
export const CustomDimensions: Story = {
|
|
113
|
-
args: {
|
|
114
|
-
minWidth: '120px',
|
|
115
|
-
minHeight: '50px',
|
|
116
|
-
width: '150px',
|
|
117
|
-
height: '60px',
|
|
118
|
-
children: <CrossIcon />,
|
|
119
|
-
},
|
|
120
|
-
decorators: [
|
|
121
|
-
Story => (
|
|
122
|
-
<ZStack>
|
|
123
|
-
<Story />
|
|
124
|
-
</ZStack>
|
|
125
|
-
),
|
|
126
|
-
],
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
// Dynamic Styles
|
|
130
|
-
export const DynamicStyles: Story = {
|
|
131
|
-
args: {
|
|
132
|
-
color: '#00fa3a',
|
|
133
|
-
children: <CrossIcon />,
|
|
134
|
-
},
|
|
135
|
-
decorators: [
|
|
136
|
-
Story => (
|
|
137
|
-
<ZStack>
|
|
138
|
-
<Story />
|
|
139
|
-
</ZStack>
|
|
140
|
-
),
|
|
141
|
-
],
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
// Dynamic Styles via Variables
|
|
145
|
-
export const ButtonCSSVariables: Story = {
|
|
146
|
-
args: {
|
|
147
|
-
children: <CrossIcon />,
|
|
148
|
-
},
|
|
149
|
-
argTypes: {
|
|
150
|
-
className: {
|
|
151
|
-
control: 'select',
|
|
152
|
-
options: ['action-primary', 'action-secondary', 'action-tertiary'],
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
decorators: [
|
|
156
|
-
Story => (
|
|
157
|
-
<ZStack>
|
|
158
|
-
<Story />
|
|
159
|
-
</ZStack>
|
|
160
|
-
),
|
|
161
|
-
],
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export const DarkBackground: Story = {
|
|
165
|
-
args: {
|
|
166
|
-
children: <CrossIcon />,
|
|
167
|
-
},
|
|
168
|
-
argTypes: {
|
|
169
|
-
className: {
|
|
170
|
-
control: 'select',
|
|
171
|
-
options: ['action-primary', 'action-secondary', 'action-tertiary'],
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
decorators: [
|
|
175
|
-
Story => (
|
|
176
|
-
<ZStack>
|
|
177
|
-
<Story />
|
|
178
|
-
</ZStack>
|
|
179
|
-
),
|
|
180
|
-
],
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
export const Small: Story = {
|
|
184
|
-
args: {
|
|
185
|
-
size: 'sm',
|
|
186
|
-
children: <CrossIcon />,
|
|
187
|
-
},
|
|
188
|
-
decorators: [
|
|
189
|
-
Story => (
|
|
190
|
-
<ZStack>
|
|
191
|
-
<Story />
|
|
192
|
-
</ZStack>
|
|
193
|
-
),
|
|
194
|
-
],
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
export const Medium: Story = {
|
|
198
|
-
args: {
|
|
199
|
-
size: 'md',
|
|
200
|
-
children: <CrossIcon />,
|
|
201
|
-
},
|
|
202
|
-
decorators: [
|
|
203
|
-
Story => (
|
|
204
|
-
<ZStack>
|
|
205
|
-
<Story />
|
|
206
|
-
</ZStack>
|
|
207
|
-
),
|
|
208
|
-
],
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
export const Large: Story = {
|
|
212
|
-
args: {
|
|
213
|
-
size: 'lg',
|
|
214
|
-
children: <CrossIcon />,
|
|
215
|
-
},
|
|
216
|
-
decorators: [
|
|
217
|
-
Story => (
|
|
218
|
-
<ZStack>
|
|
219
|
-
<Story />
|
|
220
|
-
</ZStack>
|
|
221
|
-
),
|
|
222
|
-
],
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
// Size Comparison
|
|
226
|
-
export const SizeComparison: Story = {
|
|
227
|
-
render: () => (
|
|
228
|
-
<HStack hAlign="center" gap={theme.padding.md}>
|
|
229
|
-
<SlimButton size="sm" hierarchy="primary">
|
|
230
|
-
<CrossIcon />
|
|
231
|
-
</SlimButton>
|
|
232
|
-
<SlimButton size="md" hierarchy="primary">
|
|
233
|
-
<CrossIcon />
|
|
234
|
-
</SlimButton>
|
|
235
|
-
<SlimButton size="lg" hierarchy="primary">
|
|
236
|
-
<CrossIcon />
|
|
237
|
-
</SlimButton>
|
|
238
|
-
</HStack>
|
|
239
|
-
),
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
// Size Comparison with Secondary Hierarchy
|
|
243
|
-
export const SizeComparisonSecondary: Story = {
|
|
244
|
-
render: () => (
|
|
245
|
-
<HStack hAlign="center" gap={theme.padding.md}>
|
|
246
|
-
<SlimButton size="sm" hierarchy="secondary">
|
|
247
|
-
<CrossIcon />
|
|
248
|
-
</SlimButton>
|
|
249
|
-
<SlimButton size="md" hierarchy="secondary">
|
|
250
|
-
<CrossIcon />
|
|
251
|
-
</SlimButton>
|
|
252
|
-
<SlimButton size="lg" hierarchy="secondary">
|
|
253
|
-
<CrossIcon />
|
|
254
|
-
</SlimButton>
|
|
255
|
-
</HStack>
|
|
256
|
-
),
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
// Size Comparison with Tertiary Hierarchy
|
|
260
|
-
export const SizeComparisonTertiary: Story = {
|
|
261
|
-
render: () => (
|
|
262
|
-
<HStack hAlign="center" gap={theme.padding.md}>
|
|
263
|
-
<SlimButton size="sm" hierarchy="tertiary">
|
|
264
|
-
<CrossIcon />
|
|
265
|
-
</SlimButton>
|
|
266
|
-
<SlimButton size="md" hierarchy="tertiary">
|
|
267
|
-
<CrossIcon />
|
|
268
|
-
</SlimButton>
|
|
269
|
-
<SlimButton size="lg" hierarchy="tertiary">
|
|
270
|
-
<CrossIcon />
|
|
271
|
-
</SlimButton>
|
|
272
|
-
</HStack>
|
|
273
|
-
),
|
|
274
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button, ButtonProps } from '../button/button.js';
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
// Styles
|
|
5
|
-
import styles from './slim_button.module.css';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated - use Button instead (utility=true)
|
|
9
|
-
* @param props - ButtonProps
|
|
10
|
-
* @returns SlimButton
|
|
11
|
-
*/
|
|
12
|
-
export const SlimButton = React.forwardRef<
|
|
13
|
-
HTMLButtonElement,
|
|
14
|
-
Omit<ButtonProps, 'utility'>
|
|
15
|
-
>(({ children, className, ...props }, ref) => {
|
|
16
|
-
return (
|
|
17
|
-
<Button
|
|
18
|
-
ref={ref}
|
|
19
|
-
className={clsx(styles['slim-button'], 'tcn-slim-button', className)}
|
|
20
|
-
utility={true}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</Button>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import styles from './left_resize_handle.module.css';
|
|
3
|
-
import { createHorizontalResizeHandler } from './resize_handlers.js';
|
|
4
|
-
import type { HorizontalResizeHandleProps } from './types.js';
|
|
5
|
-
|
|
6
|
-
export type LeftResizeHandleProps = HorizontalResizeHandleProps;
|
|
7
|
-
|
|
8
|
-
export function LeftResizeHandle({
|
|
9
|
-
targetRef,
|
|
10
|
-
handleProps,
|
|
11
|
-
onWidthResize,
|
|
12
|
-
onWidthResizeEnd,
|
|
13
|
-
}: LeftResizeHandleProps) {
|
|
14
|
-
const resizeHandler = createHorizontalResizeHandler(
|
|
15
|
-
targetRef,
|
|
16
|
-
onWidthResize,
|
|
17
|
-
onWidthResizeEnd,
|
|
18
|
-
'left',
|
|
19
|
-
true,
|
|
20
|
-
true
|
|
21
|
-
);
|
|
22
|
-
const offset = handleProps?.offset ? handleProps.offset : -8;
|
|
23
|
-
|
|
24
|
-
const leftResizeHandleStyle: any = {
|
|
25
|
-
...handleProps?.style,
|
|
26
|
-
'--resize-offset': `${offset}px`,
|
|
27
|
-
width: handleProps?.size || '16px',
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<div
|
|
32
|
-
className={clsx(styles['left-resize-handle'], 'tcn-left-resize-handle')}
|
|
33
|
-
onMouseDown={resizeHandler}
|
|
34
|
-
style={leftResizeHandleStyle}
|
|
35
|
-
>
|
|
36
|
-
{handleProps?.children}
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import { createHorizontalResizeHandler } from './resize_handlers.js';
|
|
3
|
-
import styles from './right_resize_handle.module.css';
|
|
4
|
-
import type { HorizontalResizeHandleProps } from './types.js';
|
|
5
|
-
|
|
6
|
-
export type RightResizeHandleProps = HorizontalResizeHandleProps;
|
|
7
|
-
export function RightResizeHandle({
|
|
8
|
-
targetRef,
|
|
9
|
-
handleProps,
|
|
10
|
-
onWidthResize,
|
|
11
|
-
onWidthResizeEnd,
|
|
12
|
-
}: RightResizeHandleProps) {
|
|
13
|
-
const resizeHandler = createHorizontalResizeHandler(
|
|
14
|
-
targetRef,
|
|
15
|
-
onWidthResize,
|
|
16
|
-
onWidthResizeEnd,
|
|
17
|
-
'right',
|
|
18
|
-
false,
|
|
19
|
-
true
|
|
20
|
-
);
|
|
21
|
-
const offset = handleProps?.offset ? handleProps.offset : -8;
|
|
22
|
-
|
|
23
|
-
const rightResizeHandleStyle: any = {
|
|
24
|
-
...handleProps?.style,
|
|
25
|
-
'--resize-offset': `${offset}px`,
|
|
26
|
-
width: handleProps?.size || '16px',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div
|
|
31
|
-
className={clsx(styles['right-resize-handle'], 'tcn-right-resize-handle')}
|
|
32
|
-
onMouseDown={resizeHandler}
|
|
33
|
-
style={rightResizeHandleStyle}
|
|
34
|
-
>
|
|
35
|
-
{handleProps?.children}
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/utils/{click_away_listener.stories.tsx → listeners/click_away_listener.stories.tsx}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/utils/{scroll_away_listener.stories.tsx → listeners/scroll_away_listener.stories.tsx}
RENAMED
|
File without changes
|
|
File without changes
|