@tcn/ui 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/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/card.css +1 -0
- package/dist/column.css +1 -1
- package/dist/containers.css +1 -1
- package/dist/containers.module-BmICKsOK.js +5 -0
- package/dist/containers.module-BmICKsOK.js.map +1 -0
- 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 +17 -13
- 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 -7
- package/dist/inputs/color_input/color_picker.js.map +1 -1
- package/dist/inputs/combo_box/combo_box.js +24 -20
- package/dist/inputs/combo_box/combo_box.js.map +1 -1
- package/dist/inputs/date_picker/date_picker.js +19 -15
- 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 +26 -23
- package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
- 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 +24 -21
- package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
- package/dist/inputs/mask_input/key_capture_input.js +35 -31
- package/dist/inputs/mask_input/key_capture_input.js.map +1 -1
- package/dist/inputs/mask_input/mask_input.js +18 -14
- package/dist/inputs/mask_input/mask_input.js.map +1 -1
- package/dist/inputs/multiselect/multiselect.js +28 -24
- 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 -9
- 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 +11 -8
- package/dist/inputs/select/select.js.map +1 -1
- package/dist/inputs/slider/slider.js +28 -24
- package/dist/inputs/slider/slider.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +11 -8
- package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
- package/dist/inputs/switch/switch.js +29 -25
- package/dist/inputs/switch/switch.js.map +1 -1
- package/dist/inputs/unit_input/unit_input.js +21 -17
- package/dist/inputs/unit_input/unit_input.js.map +1 -1
- package/dist/layouts/containers/columns/columns.d.ts +6 -1
- package/dist/layouts/containers/columns/columns.d.ts.map +1 -1
- package/dist/layouts/containers/columns/columns.js +30 -7
- package/dist/layouts/containers/columns/columns.js.map +1 -1
- package/dist/layouts/containers/rail.d.ts +2 -5
- package/dist/layouts/containers/rail.d.ts.map +1 -1
- package/dist/layouts/containers/rail.js +17 -55
- package/dist/layouts/containers/rail.js.map +1 -1
- package/dist/layouts/containers/rows/index.d.ts +3 -0
- package/dist/layouts/containers/rows/index.d.ts.map +1 -0
- package/dist/layouts/containers/rows/index.js +7 -0
- package/dist/layouts/containers/rows/index.js.map +1 -0
- package/dist/layouts/containers/rows/row.d.ts +6 -0
- package/dist/layouts/containers/rows/row.d.ts.map +1 -0
- package/dist/layouts/containers/rows/row.js +20 -0
- package/dist/layouts/containers/rows/row.js.map +1 -0
- package/dist/layouts/containers/rows/rows.d.ts +11 -0
- package/dist/layouts/containers/rows/rows.d.ts.map +1 -0
- package/dist/layouts/containers/rows/rows.js +34 -0
- package/dist/layouts/containers/rows/rows.js.map +1 -0
- package/dist/layouts/containers/scaffold.d.ts +2 -5
- package/dist/layouts/containers/scaffold.d.ts.map +1 -1
- package/dist/layouts/containers/scaffold.js +17 -55
- package/dist/layouts/containers/scaffold.js.map +1 -1
- package/dist/layouts/index.d.ts +2 -0
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +26 -22
- package/dist/layouts/index.js.map +1 -1
- package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js +11 -7
- 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 -7
- 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 +14 -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 +15 -11
- 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 -17
- 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 +14 -10
- package/dist/overlay/popper/context_popper.js.map +1 -1
- package/dist/overlay/popper/element_popper.js +15 -11
- package/dist/overlay/popper/element_popper.js.map +1 -1
- package/dist/overlay/popper/legacy/popper.js +32 -28
- package/dist/overlay/popper/legacy/popper.js.map +1 -1
- package/dist/overlay/popper/preview_popper.js +16 -12
- package/dist/overlay/popper/preview_popper.js.map +1 -1
- package/dist/overlay/tethered/tethered.js +17 -13
- package/dist/overlay/tethered/tethered.js.map +1 -1
- package/dist/resizable.css +1 -0
- package/dist/resizable.module-ur5FBfxo.js +5 -0
- package/dist/resizable.module-ur5FBfxo.js.map +1 -0
- package/dist/resize_handle.css +1 -0
- package/dist/row.css +1 -0
- 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 +104 -102
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/stacks/box/detect_resize_bounds.d.ts +1 -0
- package/dist/stacks/box/detect_resize_bounds.d.ts.map +1 -1
- package/dist/stacks/box/detect_resize_bounds.js +22 -20
- package/dist/stacks/box/detect_resize_bounds.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 +24 -20
- package/dist/stacks/h_collapsible_box.js.map +1 -1
- package/dist/stacks/v_collapsible_box.js +26 -22
- 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/surfaces/card/card.d.ts.map +1 -1
- package/dist/surfaces/card/card.js +14 -6
- package/dist/surfaces/card/card.js.map +1 -1
- package/dist/surfaces/pop_confirm/pop_confirm.js +4 -2
- package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -1
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/test-setup.js +10 -0
- package/dist/test-setup.js.map +1 -0
- 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/theme.d.ts.map +1 -1
- package/dist/themes/theme.js +17 -22
- package/dist/themes/theme.js.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 +653 -431
- 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/decorators/draggable/index.js.map +1 -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 +4 -0
- package/dist/utils/decorators/resizable/context.d.ts.map +1 -0
- package/dist/utils/decorators/resizable/context.js +10 -0
- package/dist/utils/decorators/resizable/context.js.map +1 -0
- package/dist/utils/decorators/resizable/handle_config.d.ts +32 -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 +10 -0
- package/dist/utils/decorators/resizable/index.d.ts.map +1 -0
- package/dist/utils/decorators/resizable/index.js +16 -0
- package/dist/utils/decorators/resizable/index.js.map +1 -0
- package/dist/utils/decorators/resizable/resizable.d.ts +11 -0
- package/dist/utils/decorators/resizable/resizable.d.ts.map +1 -0
- package/dist/utils/decorators/resizable/resizable.js +52 -0
- package/dist/utils/decorators/resizable/resizable.js.map +1 -0
- package/dist/utils/decorators/resizable/resize_handle.d.ts +7 -0
- package/dist/utils/decorators/resizable/resize_handle.d.ts.map +1 -0
- package/dist/utils/decorators/resizable/resize_handle.js +100 -0
- package/dist/utils/decorators/resizable/resize_handle.js.map +1 -0
- package/dist/utils/decorators/resizable/resize_strategy.d.ts +47 -0
- package/dist/utils/decorators/resizable/resize_strategy.d.ts.map +1 -0
- package/dist/utils/decorators/resizable/resize_strategy.js +108 -0
- package/dist/utils/decorators/resizable/resize_strategy.js.map +1 -0
- package/dist/utils/decorators/resizable/types.d.ts +28 -0
- package/dist/utils/decorators/resizable/types.d.ts.map +1 -0
- package/dist/utils/decorators/resizable/types.js +2 -0
- package/dist/utils/decorators/resizable/types.js.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 -7
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +45 -28
- 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 +3 -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/layouts/__stories__/columns.stories.tsx +31 -0
- package/src/layouts/__stories__/composed.stories.tsx +77 -8
- package/src/layouts/__stories__/rows.stories.tsx +77 -0
- package/src/layouts/__stories__/utils.tsx +2 -84
- package/src/layouts/containers/columns/column.module.css +3 -2
- package/src/layouts/containers/columns/columns.tsx +29 -3
- package/src/layouts/containers/containers.module.css +27 -29
- package/src/layouts/containers/rail.tsx +9 -51
- package/src/layouts/containers/rows/index.ts +2 -0
- package/src/layouts/containers/rows/row.module.css +15 -0
- package/src/layouts/containers/rows/row.tsx +22 -0
- package/src/layouts/containers/rows/rows.tsx +42 -0
- package/src/layouts/containers/scaffold.tsx +9 -49
- package/src/layouts/index.ts +2 -0
- 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/slide/slide.stories.tsx +1 -1
- package/src/stacks/box/box.tsx +29 -4
- package/src/stacks/box/detect_resize_bounds.ts +5 -1
- 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/card/card.module.css +5 -0
- package/src/surfaces/card/card.stories.tsx +66 -8
- package/src/surfaces/card/card.tsx +6 -2
- package/src/surfaces/page/page.stories.tsx +84 -4
- package/src/surfaces/panel/__stories__/panel.stories.tsx +84 -9
- package/src/surfaces/window/window.stories.tsx +1 -1
- package/src/test-setup.ts +11 -0
- 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/theme.tsx +6 -16
- 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 +219 -734
- 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/decorators/resizable/__stories__/resizable.stories.tsx +214 -0
- package/src/utils/decorators/resizable/__stories__/resizable_stories.module.css +47 -0
- package/src/utils/decorators/resizable/__tests__/handle_config.test.ts +191 -0
- package/src/utils/decorators/resizable/__tests__/resize_strategy.test.ts +163 -0
- package/src/utils/decorators/resizable/context.ts +9 -0
- package/src/utils/decorators/resizable/handle_config.ts +118 -0
- package/src/utils/decorators/resizable/index.ts +37 -0
- package/src/utils/decorators/resizable/resizable.module.css +5 -0
- package/src/utils/decorators/resizable/resizable.tsx +97 -0
- package/src/utils/decorators/resizable/resize_handle.module.css +106 -0
- package/src/utils/decorators/resizable/resize_handle.tsx +165 -0
- package/src/utils/decorators/resizable/resize_strategy.ts +190 -0
- package/src/utils/decorators/resizable/types.ts +58 -0
- package/src/utils/hooks/labelled_by_context.ts +27 -0
- package/src/utils/index.ts +9 -7
- 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/containers.module-DlGySre0.js +0 -5
- package/dist/containers.module-DlGySre0.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/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/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/{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/{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/{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
|
@@ -2,7 +2,7 @@ import { useSignalValue, useSignalValueEffect } from '@tcn/state';
|
|
|
2
2
|
import { HStack } from '../../stacks/h_stack.js';
|
|
3
3
|
import { Spacer } from '../../stacks/spacer.js';
|
|
4
4
|
import React, { useMemo, useRef } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { Button } from '../../actions/index.js';
|
|
6
6
|
import { getMonthsOfYear } from '../../utils/calendar/get_months_of_year.js';
|
|
7
7
|
import { DatePickerPresenter } from './date_picker_presenter.js';
|
|
8
8
|
import { Select } from '../select/select.js';
|
|
@@ -65,13 +65,14 @@ export function DatePickerHeader({ presenter, countryCode }: DatePickerHeaderPro
|
|
|
65
65
|
minWidth="35px"
|
|
66
66
|
width="100%"
|
|
67
67
|
>
|
|
68
|
-
<
|
|
68
|
+
<Button
|
|
69
|
+
utility
|
|
69
70
|
disabled={!state.canNavigateToPreviousMonth}
|
|
70
71
|
hierarchy="tertiary"
|
|
71
72
|
onClick={previous}
|
|
72
73
|
>
|
|
73
74
|
<ChevronLeftIcon flipOnRtl size="md" />
|
|
74
|
-
</
|
|
75
|
+
</Button>
|
|
75
76
|
<Spacer />
|
|
76
77
|
<HStack hAlign="center" gap="4px" width="auto">
|
|
77
78
|
<Select
|
|
@@ -86,13 +87,14 @@ export function DatePickerHeader({ presenter, countryCode }: DatePickerHeaderPro
|
|
|
86
87
|
<DatePickerYearInput presenter={presenter} />
|
|
87
88
|
</HStack>
|
|
88
89
|
<Spacer />
|
|
89
|
-
<
|
|
90
|
+
<Button
|
|
91
|
+
utility
|
|
90
92
|
disabled={!state.canNavigateToNextMonth}
|
|
91
93
|
hierarchy="tertiary"
|
|
92
94
|
onClick={next}
|
|
93
95
|
>
|
|
94
96
|
<ChevronRightIcon flipOnRtl size="md" />
|
|
95
|
-
</
|
|
97
|
+
</Button>
|
|
96
98
|
</HStack>
|
|
97
99
|
);
|
|
98
100
|
}
|
|
@@ -2,7 +2,7 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import { ChevronLeftIcon } from '@tcn/icons/chevron_left_icon.js';
|
|
3
3
|
import { ChevronRightIcon } from '@tcn/icons/chevron_right_icon.js';
|
|
4
4
|
import { useSignalValue } from '@tcn/state';
|
|
5
|
-
import {
|
|
5
|
+
import { Button } from '../../actions/index.js';
|
|
6
6
|
import { HStack } from '../../stacks/h_stack.js';
|
|
7
7
|
import { Spacer } from '../../stacks/spacer.js';
|
|
8
8
|
import { VStack } from '../../stacks/v_stack.js';
|
|
@@ -102,9 +102,9 @@ export function DatePickerYearSelector({
|
|
|
102
102
|
gap="4px"
|
|
103
103
|
>
|
|
104
104
|
<HStack gap="4px">
|
|
105
|
-
<
|
|
105
|
+
<Button utility onClick={prev} hierarchy="tertiary">
|
|
106
106
|
<ChevronLeftIcon flipOnRtl size="md" />
|
|
107
|
-
</
|
|
107
|
+
</Button>
|
|
108
108
|
<Spacer />
|
|
109
109
|
<Headline
|
|
110
110
|
selectable={false}
|
|
@@ -112,9 +112,9 @@ export function DatePickerYearSelector({
|
|
|
112
112
|
hierarchy="tertiary"
|
|
113
113
|
>{`${firstYear}-${lastYear}`}</Headline>
|
|
114
114
|
<Spacer />
|
|
115
|
-
<
|
|
115
|
+
<Button utility hierarchy="tertiary" onClick={next}>
|
|
116
116
|
<ChevronRightIcon size="md" />
|
|
117
|
-
</
|
|
117
|
+
</Button>
|
|
118
118
|
</HStack>
|
|
119
119
|
<HStack gap="4px">{firstRow}</HStack>
|
|
120
120
|
<HStack gap="4px">{secondRow}</HStack>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styles from './multiselect_values.module.css';
|
|
3
3
|
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
4
|
-
import {
|
|
4
|
+
import { Button } from '../../actions/index.js';
|
|
5
5
|
import { OptionProps } from '../options/option.js';
|
|
6
6
|
import { Chip } from '../../tokens/index.js';
|
|
7
7
|
import clsx from 'clsx';
|
|
@@ -27,7 +27,8 @@ export function MultiselectInlineValues({
|
|
|
27
27
|
width="auto"
|
|
28
28
|
>
|
|
29
29
|
<span>{v.props.label}</span>
|
|
30
|
-
<
|
|
30
|
+
<Button
|
|
31
|
+
utility
|
|
31
32
|
disabled={disabled}
|
|
32
33
|
size="sm"
|
|
33
34
|
hierarchy="tertiary"
|
|
@@ -37,7 +38,7 @@ export function MultiselectInlineValues({
|
|
|
37
38
|
}}
|
|
38
39
|
>
|
|
39
40
|
<CrossIcon size="xs" />
|
|
40
|
-
</
|
|
41
|
+
</Button>
|
|
41
42
|
</Chip>
|
|
42
43
|
);
|
|
43
44
|
});
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import styles from './multiselect_values.module.css';
|
|
4
4
|
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
5
5
|
import { OptionProps } from '../options/option.js';
|
|
6
|
-
import {
|
|
6
|
+
import { Button } from '../../actions/index.js';
|
|
7
7
|
import { Chip } from '../../tokens/index.js';
|
|
8
8
|
|
|
9
9
|
export interface MultiselectValueProps {
|
|
@@ -23,13 +23,13 @@ export function MultiselectValues({
|
|
|
23
23
|
return (
|
|
24
24
|
<Chip
|
|
25
25
|
hAlign="start"
|
|
26
|
-
color="rgb(57, 85, 120)"
|
|
27
26
|
className={clsx(styles.chip, 'tcn-multiselect-chip')}
|
|
28
27
|
key={index}
|
|
29
28
|
paddingInlineStart="8px"
|
|
30
29
|
>
|
|
31
30
|
<span>{v.props.label}</span>
|
|
32
|
-
<
|
|
31
|
+
<Button
|
|
32
|
+
utility
|
|
33
33
|
disabled={disabled}
|
|
34
34
|
size="sm"
|
|
35
35
|
hierarchy="tertiary"
|
|
@@ -39,7 +39,7 @@ export function MultiselectValues({
|
|
|
39
39
|
}}
|
|
40
40
|
>
|
|
41
41
|
<CrossIcon size="xs" />
|
|
42
|
-
</
|
|
42
|
+
</Button>
|
|
43
43
|
</Chip>
|
|
44
44
|
);
|
|
45
45
|
});
|
|
@@ -23,6 +23,37 @@ export default meta;
|
|
|
23
23
|
|
|
24
24
|
type Story = StoryObj;
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Simple example of two columns side by side.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* columnsMinWidth sets a default minWidth on all child Columns.
|
|
31
|
+
* An explicit minWidth prop on a Column overrides it.
|
|
32
|
+
*/
|
|
33
|
+
export const ColumnsMinWidth: Story = {
|
|
34
|
+
render: () => (
|
|
35
|
+
<LayoutStoryDecorator>
|
|
36
|
+
<Columns columnsMinWidth="200px">
|
|
37
|
+
<Column>
|
|
38
|
+
<Section>
|
|
39
|
+
<Detail>default (200px)</Detail>
|
|
40
|
+
</Section>
|
|
41
|
+
</Column>
|
|
42
|
+
<Column>
|
|
43
|
+
<Section>
|
|
44
|
+
<Detail>default (200px)</Detail>
|
|
45
|
+
</Section>
|
|
46
|
+
</Column>
|
|
47
|
+
<Column minWidth="400px">
|
|
48
|
+
<Section>
|
|
49
|
+
<Detail>override (400px)</Detail>
|
|
50
|
+
</Section>
|
|
51
|
+
</Column>
|
|
52
|
+
</Columns>
|
|
53
|
+
</LayoutStoryDecorator>
|
|
54
|
+
),
|
|
55
|
+
};
|
|
56
|
+
|
|
26
57
|
/**
|
|
27
58
|
* Simple example of two columns side by side.
|
|
28
59
|
*/
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import clsx from 'clsx';
|
|
2
3
|
import { VStack } from '../../stacks/v_stack.js';
|
|
3
4
|
import { SBNestedScaffold, SBContent, SBNestedRail } from './utils.js';
|
|
5
|
+
import { Header } from '../header/header.js';
|
|
6
|
+
import { Footer } from '../footer/footer.js';
|
|
7
|
+
import { Column } from '../containers/columns/column.js';
|
|
4
8
|
|
|
5
9
|
import styles from './composed_stories.module.css';
|
|
10
|
+
import { Scaffold } from '../containers/scaffold.js';
|
|
6
11
|
import { Rail } from '../containers/rail.js';
|
|
7
12
|
|
|
8
13
|
const meta: Meta = {
|
|
@@ -30,33 +35,97 @@ const SBContainer = ({ children }: { children: React.ReactNode }) => {
|
|
|
30
35
|
);
|
|
31
36
|
};
|
|
32
37
|
|
|
33
|
-
export const
|
|
38
|
+
export const RailInRail: Story = {
|
|
34
39
|
render: () => (
|
|
35
40
|
<SBContainer>
|
|
36
|
-
<
|
|
37
|
-
<
|
|
41
|
+
<SBNestedRail depth={1}>
|
|
42
|
+
<Column className={clsx(styles.side, styles.secondary)} minWidth="100px">
|
|
43
|
+
Column (Start)
|
|
44
|
+
</Column>
|
|
45
|
+
<SBNestedRail depth={2}>
|
|
46
|
+
<Column className={clsx(styles.side, styles.secondary)} minWidth="100px">
|
|
47
|
+
Column (Start)
|
|
48
|
+
</Column>
|
|
49
|
+
{/* Inner Body */}
|
|
38
50
|
<Rail>
|
|
39
51
|
<SBContent />
|
|
40
52
|
<SBContent />
|
|
41
|
-
<SBContent />
|
|
42
53
|
</Rail>
|
|
54
|
+
<Column className={clsx(styles.side, styles.secondary)} minWidth="100px">
|
|
55
|
+
Column (End)
|
|
56
|
+
</Column>
|
|
43
57
|
</SBNestedRail>
|
|
58
|
+
<Column className={clsx(styles.side, styles.secondary)} minWidth="100px">
|
|
59
|
+
Column (End)
|
|
60
|
+
</Column>
|
|
61
|
+
</SBNestedRail>
|
|
62
|
+
</SBContainer>
|
|
63
|
+
),
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const ScaffoldInRail: Story = {
|
|
67
|
+
render: () => (
|
|
68
|
+
<SBContainer>
|
|
69
|
+
<SBNestedRail depth={1}>
|
|
70
|
+
<Column className={clsx(styles.side, styles.secondary)} minWidth="100px">
|
|
71
|
+
Column (Start)
|
|
72
|
+
</Column>
|
|
73
|
+
<SBNestedScaffold depth={2}>
|
|
74
|
+
<Header className={clsx(styles.header, styles.secondary)}>Header</Header>
|
|
75
|
+
{/* Inner Body */}
|
|
76
|
+
<Scaffold>
|
|
77
|
+
<SBContent />
|
|
78
|
+
<SBContent />
|
|
79
|
+
</Scaffold>
|
|
80
|
+
<Footer className={clsx(styles.footer, styles.secondary)}>Footer</Footer>
|
|
81
|
+
</SBNestedScaffold>
|
|
82
|
+
<Column className={clsx(styles.side, styles.secondary)} minWidth="100px">
|
|
83
|
+
Column (End)
|
|
84
|
+
</Column>
|
|
85
|
+
</SBNestedRail>
|
|
86
|
+
</SBContainer>
|
|
87
|
+
),
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const ScaffoldInScaffold: Story = {
|
|
91
|
+
render: () => (
|
|
92
|
+
<SBContainer>
|
|
93
|
+
<SBNestedScaffold depth={1}>
|
|
94
|
+
<Header className={clsx(styles.header, styles.secondary)}>Header</Header>
|
|
95
|
+
<SBNestedScaffold depth={2}>
|
|
96
|
+
<Header className={clsx(styles.header, styles.secondary)}>Header</Header>
|
|
97
|
+
{/* Inner Body */}
|
|
98
|
+
<Scaffold>
|
|
99
|
+
<SBContent />
|
|
100
|
+
<SBContent />
|
|
101
|
+
</Scaffold>
|
|
102
|
+
<Footer className={clsx(styles.footer, styles.secondary)}>Footer</Footer>
|
|
103
|
+
</SBNestedScaffold>
|
|
104
|
+
<Footer className={clsx(styles.footer, styles.secondary)}>Footer</Footer>
|
|
44
105
|
</SBNestedScaffold>
|
|
45
106
|
</SBContainer>
|
|
46
107
|
),
|
|
47
108
|
};
|
|
48
109
|
|
|
49
|
-
export const
|
|
110
|
+
export const RailInScaffold: Story = {
|
|
50
111
|
render: () => (
|
|
51
112
|
<SBContainer>
|
|
52
|
-
<SBNestedScaffold depth={1}
|
|
53
|
-
<
|
|
113
|
+
<SBNestedScaffold depth={1}>
|
|
114
|
+
<Header className={clsx(styles.header, styles.secondary)}>Header</Header>
|
|
115
|
+
<SBNestedRail depth={2}>
|
|
116
|
+
<Column className={clsx(styles.side, styles.secondary)} minWidth="100px">
|
|
117
|
+
Column (Start)
|
|
118
|
+
</Column>
|
|
119
|
+
{/* Inner Body */}
|
|
54
120
|
<Rail>
|
|
55
121
|
<SBContent />
|
|
56
122
|
<SBContent />
|
|
57
|
-
<SBContent />
|
|
58
123
|
</Rail>
|
|
124
|
+
<Column className={clsx(styles.side, styles.secondary)} minWidth="100px">
|
|
125
|
+
Column (End)
|
|
126
|
+
</Column>
|
|
59
127
|
</SBNestedRail>
|
|
128
|
+
<Footer className={clsx(styles.footer, styles.secondary)}>Footer</Footer>
|
|
60
129
|
</SBNestedScaffold>
|
|
61
130
|
</SBContainer>
|
|
62
131
|
),
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { LayoutStoryDecorator } from './utils/layout_theme_provider.js';
|
|
4
|
+
import { Row } from '../containers/rows/row.js';
|
|
5
|
+
import { Rows } from '../containers/rows/rows.js';
|
|
6
|
+
import { Detail, Section } from '../section/index.js';
|
|
7
|
+
|
|
8
|
+
const meta: Meta = {
|
|
9
|
+
title: 'Layouts/Rows',
|
|
10
|
+
component: () => <></>,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component:
|
|
16
|
+
'Vertical container for fixed-height Row components. Theme controls row separation via the `.tcn-rows` context selector.',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default meta;
|
|
23
|
+
|
|
24
|
+
type Story = StoryObj;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Simple example of two rows stacked vertically.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* rowsMinHeight sets a default minHeight on all child Rows.
|
|
31
|
+
* An explicit minHeight prop on a Row overrides it.
|
|
32
|
+
*/
|
|
33
|
+
export const RowsMinHeight: Story = {
|
|
34
|
+
render: () => (
|
|
35
|
+
<LayoutStoryDecorator>
|
|
36
|
+
<Rows rowsMinHeight="80px">
|
|
37
|
+
<Row>
|
|
38
|
+
<Section>
|
|
39
|
+
<Detail>default (80px)</Detail>
|
|
40
|
+
</Section>
|
|
41
|
+
</Row>
|
|
42
|
+
<Row>
|
|
43
|
+
<Section>
|
|
44
|
+
<Detail>default (80px)</Detail>
|
|
45
|
+
</Section>
|
|
46
|
+
</Row>
|
|
47
|
+
<Row minHeight="160px">
|
|
48
|
+
<Section>
|
|
49
|
+
<Detail>override (160px)</Detail>
|
|
50
|
+
</Section>
|
|
51
|
+
</Row>
|
|
52
|
+
</Rows>
|
|
53
|
+
</LayoutStoryDecorator>
|
|
54
|
+
),
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Simple example of two rows stacked vertically.
|
|
59
|
+
*/
|
|
60
|
+
export const Baseline: Story = {
|
|
61
|
+
render: () => (
|
|
62
|
+
<LayoutStoryDecorator>
|
|
63
|
+
<Rows>
|
|
64
|
+
<Row minHeight="120px">
|
|
65
|
+
<Section>
|
|
66
|
+
<Detail>120px row</Detail>
|
|
67
|
+
</Section>
|
|
68
|
+
</Row>
|
|
69
|
+
<Row minHeight="120px">
|
|
70
|
+
<Section>
|
|
71
|
+
<Detail>120px row</Detail>
|
|
72
|
+
</Section>
|
|
73
|
+
</Row>
|
|
74
|
+
</Rows>
|
|
75
|
+
</LayoutStoryDecorator>
|
|
76
|
+
),
|
|
77
|
+
};
|
|
@@ -2,15 +2,9 @@ import type { PropsWithChildren } from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
|
|
4
4
|
import { Scaffold, type ScaffoldProps } from '../containers/scaffold.js';
|
|
5
|
-
import { Header } from '../header/header.js';
|
|
6
|
-
import { Footer } from '../footer/footer.js';
|
|
7
|
-
import { UtilityBar } from '../utility_bar/utility_bar.js';
|
|
8
5
|
|
|
9
6
|
import { Rail, type RailProps } from '../containers/rail.js';
|
|
10
|
-
import {
|
|
11
|
-
import { Box, Spacer } from '../../stacks/index.js';
|
|
12
|
-
import { UtilityStrip } from '../containers/utility_strip/utility_strip.js';
|
|
13
|
-
import { SearchIcon } from '@tcn/icons/search_icon.js';
|
|
7
|
+
import { Box } from '../../stacks/index.js';
|
|
14
8
|
|
|
15
9
|
import styles from './composed_stories.module.css';
|
|
16
10
|
|
|
@@ -22,10 +16,6 @@ const FloatingLabel = ({ children }: { children: React.ReactNode }) => {
|
|
|
22
16
|
);
|
|
23
17
|
};
|
|
24
18
|
|
|
25
|
-
const VerticalLabel = ({ children }: { children: React.ReactNode }) => {
|
|
26
|
-
return <span className={styles.verticalLabel}>{children}</span>;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
19
|
export const SBContent: React.FC<
|
|
30
20
|
PropsWithChildren<{ className?: string; minHeight?: string; minWidth?: string }>
|
|
31
21
|
> = ({ className, children, minHeight = '200px', minWidth = '200px' }) => {
|
|
@@ -42,43 +32,14 @@ export const SBContent: React.FC<
|
|
|
42
32
|
);
|
|
43
33
|
};
|
|
44
34
|
|
|
45
|
-
const SBActionBox = ({ children }: { children: React.ReactNode }) => {
|
|
46
|
-
return <span className={styles.actionBox}>{children}</span>;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const SBActions = () => {
|
|
50
|
-
return (
|
|
51
|
-
<>
|
|
52
|
-
<Spacer />
|
|
53
|
-
<SBActionBox>
|
|
54
|
-
<SearchIcon />
|
|
55
|
-
</SBActionBox>
|
|
56
|
-
<SBActionBox>
|
|
57
|
-
<SearchIcon />
|
|
58
|
-
</SBActionBox>
|
|
59
|
-
<SBActionBox>
|
|
60
|
-
<SearchIcon />
|
|
61
|
-
</SBActionBox>
|
|
62
|
-
</>
|
|
63
|
-
);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
35
|
interface SBNestedRailProps extends RailProps {
|
|
67
36
|
depth?: number;
|
|
68
|
-
scaffold?: boolean;
|
|
69
|
-
side?: boolean;
|
|
70
|
-
utilityStrip?: boolean;
|
|
71
|
-
label?: boolean;
|
|
72
37
|
}
|
|
73
38
|
|
|
74
39
|
export const SBNestedRail: React.FC<PropsWithChildren<SBNestedRailProps>> = ({
|
|
75
40
|
children,
|
|
76
41
|
className,
|
|
77
42
|
depth = 1,
|
|
78
|
-
scaffold = true,
|
|
79
|
-
side = true,
|
|
80
|
-
utilityStrip = true,
|
|
81
|
-
label = true,
|
|
82
43
|
height = '100%',
|
|
83
44
|
...props
|
|
84
45
|
}) => {
|
|
@@ -89,51 +50,20 @@ export const SBNestedRail: React.FC<PropsWithChildren<SBNestedRailProps>> = ({
|
|
|
89
50
|
data-depth={depth}
|
|
90
51
|
{...props}
|
|
91
52
|
>
|
|
92
|
-
|
|
93
|
-
{utilityStrip && (
|
|
94
|
-
<UtilityStrip className={clsx(styles.utilityStrip, styles.secondary)}>
|
|
95
|
-
<VerticalLabel>Utility Strip</VerticalLabel>
|
|
96
|
-
<SBActions />
|
|
97
|
-
</UtilityStrip>
|
|
98
|
-
)}
|
|
53
|
+
<FloatingLabel>Rail</FloatingLabel>
|
|
99
54
|
{children}
|
|
100
|
-
{side && (
|
|
101
|
-
<Column className={clsx(styles.side, styles.secondary)} minWidth="200px">
|
|
102
|
-
<span>Column</span>
|
|
103
|
-
</Column>
|
|
104
|
-
)}
|
|
105
|
-
{scaffold && (
|
|
106
|
-
<SBNestedScaffold
|
|
107
|
-
depth={depth + 1}
|
|
108
|
-
utilityBar={false}
|
|
109
|
-
footer={false}
|
|
110
|
-
minWidth={'fit-content'}
|
|
111
|
-
>
|
|
112
|
-
<Scaffold>
|
|
113
|
-
<SBContent />
|
|
114
|
-
<SBContent />
|
|
115
|
-
<SBContent />
|
|
116
|
-
</Scaffold>
|
|
117
|
-
</SBNestedScaffold>
|
|
118
|
-
)}
|
|
119
55
|
</Rail>
|
|
120
56
|
);
|
|
121
57
|
};
|
|
122
58
|
|
|
123
59
|
interface SBNestedScaffoldProps extends ScaffoldProps {
|
|
124
60
|
depth?: number;
|
|
125
|
-
header?: boolean;
|
|
126
|
-
utilityBar?: boolean;
|
|
127
|
-
footer?: boolean;
|
|
128
61
|
}
|
|
129
62
|
|
|
130
63
|
export const SBNestedScaffold: React.FC<PropsWithChildren<SBNestedScaffoldProps>> = ({
|
|
131
64
|
children,
|
|
132
65
|
className,
|
|
133
66
|
depth = 1,
|
|
134
|
-
header = true,
|
|
135
|
-
utilityBar = true,
|
|
136
|
-
footer = true,
|
|
137
67
|
height = '100%',
|
|
138
68
|
...props
|
|
139
69
|
}) => {
|
|
@@ -145,19 +75,7 @@ export const SBNestedScaffold: React.FC<PropsWithChildren<SBNestedScaffoldProps>
|
|
|
145
75
|
{...props}
|
|
146
76
|
>
|
|
147
77
|
<FloatingLabel>Scaffold</FloatingLabel>
|
|
148
|
-
{header && (
|
|
149
|
-
<Header className={clsx(styles.header, styles.secondary)}>Header</Header>
|
|
150
|
-
)}
|
|
151
|
-
{utilityBar && (
|
|
152
|
-
<UtilityBar className={clsx(styles.utilityBar, styles.secondary)}>
|
|
153
|
-
Utility Bar
|
|
154
|
-
<SBActions />
|
|
155
|
-
</UtilityBar>
|
|
156
|
-
)}
|
|
157
78
|
{children}
|
|
158
|
-
{footer && (
|
|
159
|
-
<Footer className={clsx(styles.footer, styles.secondary)}>Footer</Footer>
|
|
160
|
-
)}
|
|
161
79
|
</Scaffold>
|
|
162
80
|
);
|
|
163
81
|
};
|
|
@@ -1,15 +1,41 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { Rail, type RailProps } from '../rail.js';
|
|
4
|
+
import { removeUndefinedProperties } from '../../../stacks/utils/remove_undefined_properties.js';
|
|
4
5
|
|
|
5
|
-
export interface
|
|
6
|
+
export interface ColumnsOwnProps {
|
|
7
|
+
columnsMinWidth?: string | number;
|
|
8
|
+
columnsWidth?: string | number;
|
|
9
|
+
columnsMaxWidth?: string | number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ColumnsProps extends Omit<RailProps, 'as'>, ColumnsOwnProps {}
|
|
6
13
|
|
|
7
14
|
export const Columns = React.forwardRef<HTMLElement, ColumnsProps>(function Columns(
|
|
8
|
-
{
|
|
15
|
+
{
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
columnsMinWidth,
|
|
19
|
+
columnsWidth,
|
|
20
|
+
columnsMaxWidth,
|
|
21
|
+
style,
|
|
22
|
+
...props
|
|
23
|
+
}: ColumnsProps,
|
|
9
24
|
ref
|
|
10
25
|
) {
|
|
26
|
+
const columnVars = removeUndefinedProperties({
|
|
27
|
+
'--columns-min-width': columnsMinWidth,
|
|
28
|
+
'--columns-width': columnsWidth,
|
|
29
|
+
'--columns-max-width': columnsMaxWidth,
|
|
30
|
+
});
|
|
31
|
+
|
|
11
32
|
return (
|
|
12
|
-
<Rail
|
|
33
|
+
<Rail
|
|
34
|
+
ref={ref}
|
|
35
|
+
className={clsx('tcn-columns', className)}
|
|
36
|
+
style={{ ...columnVars, ...style }}
|
|
37
|
+
{...props}
|
|
38
|
+
>
|
|
13
39
|
{children}
|
|
14
40
|
</Rail>
|
|
15
41
|
);
|
|
@@ -1,55 +1,53 @@
|
|
|
1
1
|
@layer tcn-system {
|
|
2
|
+
/* Outer or standalone scaffold fills its container */
|
|
2
3
|
:where(.scaffold) {
|
|
3
|
-
|
|
4
|
+
height: 100%;
|
|
4
5
|
width: 100%;
|
|
5
|
-
height:
|
|
6
|
+
max-height: 100%;
|
|
7
|
+
overflow: auto;
|
|
6
8
|
}
|
|
7
9
|
|
|
10
|
+
/* Outer or standalone Rail fills its container */
|
|
8
11
|
:where(.rail) {
|
|
9
12
|
max-width: 100%;
|
|
10
13
|
height: 100%;
|
|
11
|
-
width: auto;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:where(.container) > :where(.container-stack) {
|
|
15
14
|
width: 100%;
|
|
16
|
-
|
|
15
|
+
overflow: auto;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
|
-
/*
|
|
20
|
-
:where(.
|
|
21
|
-
|
|
18
|
+
/* Nested Containers should grow via flex-grow */
|
|
19
|
+
:where(.container) > .container {
|
|
20
|
+
flex-grow: 1;
|
|
21
|
+
/* Important - override the Stack css */
|
|
22
|
+
flex-shrink: unset;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
/*
|
|
25
|
-
:where(.
|
|
26
|
-
|
|
25
|
+
/* Child Scaffolds should use flex-grow to manage height - scroll vertically */
|
|
26
|
+
:where(.container) > .scaffold {
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
min-height: 0;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
height: 100%;
|
|
31
|
+
:where(.scaffold) > .scaffold {
|
|
32
|
+
height: auto;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
/*
|
|
35
|
-
:where(.
|
|
35
|
+
/* Child Rails should use flex-grow to manage width - scroll horizontally */
|
|
36
|
+
:where(.container) > .rail {
|
|
36
37
|
overflow-x: auto;
|
|
38
|
+
min-width: 0;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
flex-grow: 1;
|
|
41
|
+
:where(.rail) > .rail {
|
|
42
|
+
width: auto;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
/*
|
|
45
|
-
:where(.
|
|
46
|
-
|
|
47
|
-
overflow-y: auto;
|
|
45
|
+
/* The opposite axis of the flex grow should fill via height or width */
|
|
46
|
+
:where(.rail) > .container {
|
|
47
|
+
height: 100%;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
min-width: 0;
|
|
53
|
-
overflow-x: auto;
|
|
50
|
+
:where(.scaffold) > .container {
|
|
51
|
+
width: 100%;
|
|
54
52
|
}
|
|
55
53
|
}
|