@soxa-ui/react 0.0.0-stage → 0.3.0-beta.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/LICENSE +21 -0
- package/README.md +253 -2
- package/dist/adapter/common/aria.d.ts +6 -0
- package/dist/adapter/common/aria.js +22 -0
- package/dist/adapter/common/icon.d.ts +9 -0
- package/dist/adapter/common/icon.js +22 -0
- package/dist/adapter/common/index.d.ts +6 -0
- package/dist/adapter/common/naming.d.ts +6 -0
- package/dist/adapter/common/naming.js +8 -0
- package/dist/adapter/common/profile.d.ts +3 -0
- package/dist/adapter/common/profile.js +8 -0
- package/dist/adapter/common/root.d.ts +67 -0
- package/dist/adapter/common/root.js +83 -0
- package/dist/adapter/common/slots.d.ts +15 -0
- package/dist/adapter/common/slots.js +23 -0
- package/dist/adapter/elevator/Elevate.d.ts +16 -0
- package/dist/adapter/elevator/Elevate.js +22 -0
- package/dist/adapter/elevator/elevator.class.d.ts +14 -0
- package/dist/adapter/elevator/elevator.class.js +23 -0
- package/dist/adapter/elevator/index.d.ts +3 -0
- package/dist/adapter/elevator/layer.d.ts +6 -0
- package/dist/adapter/elevator/layer.js +5 -0
- package/dist/adapter/elevator/scope.class.d.ts +19 -0
- package/dist/adapter/elevator/scope.class.js +31 -0
- package/dist/adapter/index.d.ts +5 -0
- package/dist/adapter/locale/LocaleProvider.d.ts +19 -0
- package/dist/adapter/locale/LocaleProvider.js +29 -0
- package/dist/adapter/locale/context.d.ts +3 -0
- package/dist/adapter/locale/context.js +7 -0
- package/dist/adapter/locale/index.d.ts +2 -0
- package/dist/adapter/runtime/NativeInput.d.ts +24 -0
- package/dist/adapter/runtime/NativeInput.js +40 -0
- package/dist/adapter/runtime/NativeTextarea.d.ts +10 -0
- package/dist/adapter/runtime/NativeTextarea.js +24 -0
- package/dist/adapter/runtime/Teleport.d.ts +14 -0
- package/dist/adapter/runtime/Teleport.js +82 -0
- package/dist/adapter/runtime/accepting.d.ts +10 -0
- package/dist/adapter/runtime/accepting.js +18 -0
- package/dist/adapter/runtime/click-action.class.d.ts +14 -0
- package/dist/adapter/runtime/click-action.class.js +26 -0
- package/dist/adapter/runtime/drafts.class.d.ts +24 -0
- package/dist/adapter/runtime/drafts.class.js +41 -0
- package/dist/adapter/runtime/event-callbacks.class.d.ts +29 -0
- package/dist/adapter/runtime/event-callbacks.class.js +44 -0
- package/dist/adapter/runtime/index.d.ts +16 -0
- package/dist/adapter/runtime/root-ref.class.d.ts +39 -0
- package/dist/adapter/runtime/root-ref.class.js +86 -0
- package/dist/adapter/runtime/stable-snapshot.class.d.ts +20 -0
- package/dist/adapter/runtime/stable-snapshot.class.js +43 -0
- package/dist/adapter/runtime/useAdapter.d.ts +39 -0
- package/dist/adapter/runtime/useAdapter.js +78 -0
- package/dist/adapter/runtime/useAdapterContext.d.ts +22 -0
- package/dist/adapter/runtime/useAdapterContext.js +128 -0
- package/dist/adapter/runtime/useClickAction.d.ts +6 -0
- package/dist/adapter/runtime/useClickAction.js +16 -0
- package/dist/adapter/runtime/useComponent.d.ts +15 -0
- package/dist/adapter/runtime/useComponent.js +13 -0
- package/dist/adapter/runtime/useRootElement.d.ts +6 -0
- package/dist/adapter/runtime/useRootElement.js +13 -0
- package/dist/adapter/runtime/withRenderBoundary.d.ts +7 -0
- package/dist/adapter/runtime/withRenderBoundary.js +13 -0
- package/dist/adapter/toasts/index.d.ts +3 -0
- package/dist/adapter/toasts/render.d.ts +6 -0
- package/dist/adapter/toasts/render.js +17 -0
- package/dist/adapter/toasts/types.d.ts +6 -0
- package/dist/adapter/toasts/useToasts.d.ts +8 -0
- package/dist/adapter/toasts/useToasts.js +19 -0
- package/dist/components/accordion/Accordion.d.ts +14 -0
- package/dist/components/accordion/Accordion.js +40 -0
- package/dist/components/accordion/base.component.d.ts +6 -0
- package/dist/components/accordion/index.d.ts +6 -0
- package/dist/components/accordion/index.js +7 -0
- package/dist/components/accordion/item/Item.d.ts +6 -0
- package/dist/components/accordion/item/Item.js +68 -0
- package/dist/components/accordion/item/base.component.d.ts +9 -0
- package/dist/components/accordion/item/index.d.ts +2 -0
- package/dist/components/accordion/item/setup.component.d.ts +17 -0
- package/dist/components/accordion/item/setup.component.js +23 -0
- package/dist/components/accordion/setup.component.d.ts +15 -0
- package/dist/components/accordion/setup.component.js +26 -0
- package/dist/components/button/Button.d.ts +15 -0
- package/dist/components/button/Button.js +38 -0
- package/dist/components/button/base.component.d.ts +7 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/setup.component.d.ts +22 -0
- package/dist/components/button/setup.component.js +12 -0
- package/dist/components/calendar/Calendar.d.ts +7 -0
- package/dist/components/calendar/Calendar.js +190 -0
- package/dist/components/calendar/base.component.d.ts +7 -0
- package/dist/components/calendar/index.d.ts +7 -0
- package/dist/components/calendar/index.js +8 -0
- package/dist/components/calendar/item/Item.d.ts +3 -0
- package/dist/components/calendar/item/Item.js +26 -0
- package/dist/components/calendar/item/base.component.d.ts +7 -0
- package/dist/components/calendar/item/index.d.ts +2 -0
- package/dist/components/calendar/item/setup.component.d.ts +13 -0
- package/dist/components/calendar/item/setup.component.js +20 -0
- package/dist/components/calendar/setup.component.d.ts +15 -0
- package/dist/components/calendar/setup.component.js +26 -0
- package/dist/components/check-box/CheckBox.d.ts +4 -0
- package/dist/components/check-box/CheckBox.js +49 -0
- package/dist/components/check-box/base.component.d.ts +7 -0
- package/dist/components/check-box/index.d.ts +2 -0
- package/dist/components/check-box/setup.component.d.ts +27 -0
- package/dist/components/check-box/setup.component.js +13 -0
- package/dist/components/component/base.component.d.ts +5 -0
- package/dist/components/component/index.d.ts +1 -0
- package/dist/components/component-view/ComponentView.d.ts +4 -0
- package/dist/components/component-view/ComponentView.js +22 -0
- package/dist/components/component-view/base.component.d.ts +5 -0
- package/dist/components/component-view/index.d.ts +2 -0
- package/dist/components/component-view/setup.component.d.ts +9 -0
- package/dist/components/component-view/setup.component.js +12 -0
- package/dist/components/control/base.component.d.ts +5 -0
- package/dist/components/control/index.d.ts +1 -0
- package/dist/components/control/setup.component.d.ts +22 -0
- package/dist/components/date-input/DateInput.d.ts +4 -0
- package/dist/components/date-input/DateInput.js +88 -0
- package/dist/components/date-input/base.component.d.ts +6 -0
- package/dist/components/date-input/index.d.ts +2 -0
- package/dist/components/date-input/setup.component.d.ts +27 -0
- package/dist/components/date-input/setup.component.js +13 -0
- package/dist/components/date-picker/DatePicker.d.ts +9 -0
- package/dist/components/date-picker/DatePicker.js +148 -0
- package/dist/components/date-picker/base.component.d.ts +6 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/setup.component.d.ts +60 -0
- package/dist/components/date-picker/setup.component.js +26 -0
- package/dist/components/dialog/Dialog.d.ts +7 -0
- package/dist/components/dialog/Dialog.js +88 -0
- package/dist/components/dialog/base.component.d.ts +6 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog/setup.component.d.ts +29 -0
- package/dist/components/dialog/setup.component.js +12 -0
- package/dist/components/drag-and-drop/DragAndDrop.d.ts +4 -0
- package/dist/components/drag-and-drop/DragAndDrop.js +16 -0
- package/dist/components/drag-and-drop/base.component.d.ts +6 -0
- package/dist/components/drag-and-drop/index.d.ts +2 -0
- package/dist/components/drag-and-drop/setup.component.d.ts +6 -0
- package/dist/components/drag-and-drop/setup.component.js +12 -0
- package/dist/components/drawer/Drawer.d.ts +7 -0
- package/dist/components/drawer/Drawer.js +75 -0
- package/dist/components/drawer/base.component.d.ts +6 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/setup.component.d.ts +29 -0
- package/dist/components/drawer/setup.component.js +12 -0
- package/dist/components/field/Field.d.ts +4 -0
- package/dist/components/field/Field.js +58 -0
- package/dist/components/field/base.component.d.ts +5 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/setup.component.d.ts +10 -0
- package/dist/components/field/setup.component.js +13 -0
- package/dist/components/frame/Frame.d.ts +7 -0
- package/dist/components/frame/Frame.js +30 -0
- package/dist/components/frame/base.component.d.ts +5 -0
- package/dist/components/frame/index.d.ts +2 -0
- package/dist/components/frame/setup.component.d.ts +33 -0
- package/dist/components/frame/setup.component.js +12 -0
- package/dist/components/icon/Icon.d.ts +7 -0
- package/dist/components/icon/Icon.js +17 -0
- package/dist/components/icon/base.component.d.ts +5 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/setup.component.d.ts +19 -0
- package/dist/components/icon/setup.component.js +12 -0
- package/dist/components/index.d.ts +43 -0
- package/dist/components/input/Input.d.ts +4 -0
- package/dist/components/input/Input.js +65 -0
- package/dist/components/input/base.component.d.ts +7 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/setup.component.d.ts +27 -0
- package/dist/components/input/setup.component.js +13 -0
- package/dist/components/input-control/base.component.d.ts +6 -0
- package/dist/components/input-control/index.d.ts +1 -0
- package/dist/components/input-control/setup.component.d.ts +26 -0
- package/dist/components/interactive/base.component.d.ts +5 -0
- package/dist/components/interactive/index.d.ts +1 -0
- package/dist/components/interactive/setup.component.d.ts +9 -0
- package/dist/components/item-row/ItemRow.d.ts +13 -0
- package/dist/components/item-row/ItemRow.js +19 -0
- package/dist/components/item-row/index.d.ts +2 -0
- package/dist/components/item-row/setup.component.d.ts +22 -0
- package/dist/components/item-row/setup.component.js +12 -0
- package/dist/components/label/Label.d.ts +7 -0
- package/dist/components/label/Label.js +31 -0
- package/dist/components/label/base.component.d.ts +5 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/setup.component.d.ts +9 -0
- package/dist/components/label/setup.component.js +12 -0
- package/dist/components/list-box/ListBox.d.ts +8 -0
- package/dist/components/list-box/ListBox.js +67 -0
- package/dist/components/list-box/base.component.d.ts +9 -0
- package/dist/components/list-box/group/Group.d.ts +7 -0
- package/dist/components/list-box/group/Group.js +34 -0
- package/dist/components/list-box/group/base.component.d.ts +6 -0
- package/dist/components/list-box/group/index.d.ts +2 -0
- package/dist/components/list-box/group/setup.component.d.ts +9 -0
- package/dist/components/list-box/group/setup.component.js +12 -0
- package/dist/components/list-box/index.d.ts +9 -0
- package/dist/components/list-box/index.js +11 -0
- package/dist/components/list-box/item/Item.d.ts +6 -0
- package/dist/components/list-box/item/Item.js +57 -0
- package/dist/components/list-box/item/base.component.d.ts +8 -0
- package/dist/components/list-box/item/index.d.ts +2 -0
- package/dist/components/list-box/item/setup.component.d.ts +19 -0
- package/dist/components/list-box/item/setup.component.js +23 -0
- package/dist/components/list-box/setup.component.d.ts +15 -0
- package/dist/components/list-box/setup.component.js +26 -0
- package/dist/components/menu/Menu.d.ts +7 -0
- package/dist/components/menu/Menu.js +47 -0
- package/dist/components/menu/base.component.d.ts +6 -0
- package/dist/components/menu/checkbox-item/CheckboxItem.d.ts +6 -0
- package/dist/components/menu/checkbox-item/CheckboxItem.js +61 -0
- package/dist/components/menu/checkbox-item/base.component.d.ts +8 -0
- package/dist/components/menu/checkbox-item/index.d.ts +2 -0
- package/dist/components/menu/checkbox-item/setup.component.d.ts +17 -0
- package/dist/components/menu/checkbox-item/setup.component.js +23 -0
- package/dist/components/menu/group/Group.d.ts +4 -0
- package/dist/components/menu/group/Group.js +31 -0
- package/dist/components/menu/group/base.component.d.ts +6 -0
- package/dist/components/menu/group/index.d.ts +2 -0
- package/dist/components/menu/group/setup.component.d.ts +9 -0
- package/dist/components/menu/group/setup.component.js +12 -0
- package/dist/components/menu/index.d.ts +23 -0
- package/dist/components/menu/index.js +23 -0
- package/dist/components/menu/item/Item.d.ts +3 -0
- package/dist/components/menu/item/Item.js +42 -0
- package/dist/components/menu/item/base.component.d.ts +8 -0
- package/dist/components/menu/item/index.d.ts +2 -0
- package/dist/components/menu/item/setup.component.d.ts +17 -0
- package/dist/components/menu/item/setup.component.js +23 -0
- package/dist/components/menu/popover-item/PopoverItem.d.ts +6 -0
- package/dist/components/menu/popover-item/PopoverItem.js +72 -0
- package/dist/components/menu/popover-item/base.component.d.ts +8 -0
- package/dist/components/menu/popover-item/index.d.ts +2 -0
- package/dist/components/menu/popover-item/setup.component.d.ts +24 -0
- package/dist/components/menu/popover-item/setup.component.js +26 -0
- package/dist/components/menu/radio-group/RadioGroup.d.ts +4 -0
- package/dist/components/menu/radio-group/RadioGroup.js +31 -0
- package/dist/components/menu/radio-group/base.component.d.ts +5 -0
- package/dist/components/menu/radio-group/index.d.ts +2 -0
- package/dist/components/menu/radio-group/setup.component.d.ts +9 -0
- package/dist/components/menu/radio-group/setup.component.js +12 -0
- package/dist/components/menu/radio-item/RadioItem.d.ts +3 -0
- package/dist/components/menu/radio-item/RadioItem.js +50 -0
- package/dist/components/menu/radio-item/base.component.d.ts +9 -0
- package/dist/components/menu/radio-item/index.d.ts +2 -0
- package/dist/components/menu/radio-item/setup.component.d.ts +17 -0
- package/dist/components/menu/radio-item/setup.component.js +23 -0
- package/dist/components/menu/separator/Separator.d.ts +4 -0
- package/dist/components/menu/separator/Separator.js +18 -0
- package/dist/components/menu/separator/base.component.d.ts +5 -0
- package/dist/components/menu/separator/index.d.ts +2 -0
- package/dist/components/menu/separator/setup.component.d.ts +9 -0
- package/dist/components/menu/separator/setup.component.js +12 -0
- package/dist/components/menu/setup.component.d.ts +16 -0
- package/dist/components/menu/setup.component.js +29 -0
- package/dist/components/menu/submenu/Submenu.d.ts +22 -0
- package/dist/components/menu/submenu/Submenu.js +117 -0
- package/dist/components/menu/submenu/base.component.d.ts +9 -0
- package/dist/components/menu/submenu/index.d.ts +2 -0
- package/dist/components/menu/submenu/setup.component.d.ts +25 -0
- package/dist/components/menu/submenu/setup.component.js +37 -0
- package/dist/components/number-input/NumberInput.d.ts +4 -0
- package/dist/components/number-input/NumberInput.js +108 -0
- package/dist/components/number-input/base.component.d.ts +7 -0
- package/dist/components/number-input/index.d.ts +2 -0
- package/dist/components/number-input/setup.component.d.ts +27 -0
- package/dist/components/number-input/setup.component.js +13 -0
- package/dist/components/pagination/Pagination.d.ts +7 -0
- package/dist/components/pagination/Pagination.js +80 -0
- package/dist/components/pagination/base.component.d.ts +6 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/item/Item.d.ts +3 -0
- package/dist/components/pagination/item/Item.js +34 -0
- package/dist/components/pagination/item/base.component.d.ts +5 -0
- package/dist/components/pagination/item/index.d.ts +2 -0
- package/dist/components/pagination/item/setup.component.d.ts +11 -0
- package/dist/components/pagination/item/setup.component.js +23 -0
- package/dist/components/pagination/setup.component.d.ts +15 -0
- package/dist/components/pagination/setup.component.js +26 -0
- package/dist/components/popover/Popover.d.ts +7 -0
- package/dist/components/popover/Popover.js +68 -0
- package/dist/components/popover/base.component.d.ts +6 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/setup.component.d.ts +34 -0
- package/dist/components/popover/setup.component.js +17 -0
- package/dist/components/progress-linear/ProgressLinear.d.ts +7 -0
- package/dist/components/progress-linear/ProgressLinear.js +24 -0
- package/dist/components/progress-linear/base.component.d.ts +5 -0
- package/dist/components/progress-linear/index.d.ts +2 -0
- package/dist/components/progress-linear/setup.component.d.ts +17 -0
- package/dist/components/progress-linear/setup.component.js +12 -0
- package/dist/components/progress-spinner/ProgressSpinner.d.ts +7 -0
- package/dist/components/progress-spinner/ProgressSpinner.js +50 -0
- package/dist/components/progress-spinner/base.component.d.ts +5 -0
- package/dist/components/progress-spinner/index.d.ts +2 -0
- package/dist/components/progress-spinner/setup.component.d.ts +17 -0
- package/dist/components/progress-spinner/setup.component.js +12 -0
- package/dist/components/radio-group/RadioGroup.d.ts +4 -0
- package/dist/components/radio-group/RadioGroup.js +30 -0
- package/dist/components/radio-group/base.component.d.ts +7 -0
- package/dist/components/radio-group/index.d.ts +7 -0
- package/dist/components/radio-group/index.js +8 -0
- package/dist/components/radio-group/item/Item.d.ts +3 -0
- package/dist/components/radio-group/item/Item.js +46 -0
- package/dist/components/radio-group/item/base.component.d.ts +9 -0
- package/dist/components/radio-group/item/index.d.ts +2 -0
- package/dist/components/radio-group/item/setup.component.d.ts +42 -0
- package/dist/components/radio-group/item/setup.component.js +30 -0
- package/dist/components/radio-group/setup.component.d.ts +16 -0
- package/dist/components/radio-group/setup.component.js +27 -0
- package/dist/components/rating/Rating.d.ts +4 -0
- package/dist/components/rating/Rating.js +55 -0
- package/dist/components/rating/base.component.d.ts +6 -0
- package/dist/components/rating/index.d.ts +2 -0
- package/dist/components/rating/setup.component.d.ts +27 -0
- package/dist/components/rating/setup.component.js +13 -0
- package/dist/components/scroller/Scroller.d.ts +7 -0
- package/dist/components/scroller/Scroller.js +64 -0
- package/dist/components/scroller/base.component.d.ts +6 -0
- package/dist/components/scroller/index.d.ts +2 -0
- package/dist/components/scroller/setup.component.d.ts +22 -0
- package/dist/components/scroller/setup.component.js +12 -0
- package/dist/components/select/Select.d.ts +7 -0
- package/dist/components/select/Select.js +116 -0
- package/dist/components/select/base.component.d.ts +8 -0
- package/dist/components/select/group/Group.d.ts +7 -0
- package/dist/components/select/group/Group.js +34 -0
- package/dist/components/select/group/base.component.d.ts +6 -0
- package/dist/components/select/group/index.d.ts +2 -0
- package/dist/components/select/group/setup.component.d.ts +9 -0
- package/dist/components/select/group/setup.component.js +12 -0
- package/dist/components/select/index.d.ts +9 -0
- package/dist/components/select/index.js +11 -0
- package/dist/components/select/item/Item.d.ts +6 -0
- package/dist/components/select/item/Item.js +58 -0
- package/dist/components/select/item/base.component.d.ts +8 -0
- package/dist/components/select/item/index.d.ts +2 -0
- package/dist/components/select/item/setup.component.d.ts +19 -0
- package/dist/components/select/item/setup.component.js +23 -0
- package/dist/components/select/setup.component.d.ts +27 -0
- package/dist/components/select/setup.component.js +30 -0
- package/dist/components/skeleton/Skeleton.d.ts +4 -0
- package/dist/components/skeleton/Skeleton.js +23 -0
- package/dist/components/skeleton/base.component.d.ts +5 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/setup.component.d.ts +11 -0
- package/dist/components/skeleton/setup.component.js +12 -0
- package/dist/components/slider/Slider.d.ts +4 -0
- package/dist/components/slider/Slider.js +72 -0
- package/dist/components/slider/base.component.d.ts +6 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/setup.component.d.ts +23 -0
- package/dist/components/slider/setup.component.js +13 -0
- package/dist/components/stylable/base.component.d.ts +5 -0
- package/dist/components/stylable/index.d.ts +1 -0
- package/dist/components/stylable/setup.component.d.ts +9 -0
- package/dist/components/switch/Switch.d.ts +4 -0
- package/dist/components/switch/Switch.js +42 -0
- package/dist/components/switch/base.component.d.ts +7 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/setup.component.d.ts +27 -0
- package/dist/components/switch/setup.component.js +13 -0
- package/dist/components/table/Table.d.ts +9 -0
- package/dist/components/table/Table.js +83 -0
- package/dist/components/table/base.component.d.ts +7 -0
- package/dist/components/table/column/Column.d.ts +7 -0
- package/dist/components/table/column/Column.js +66 -0
- package/dist/components/table/column/base.component.d.ts +6 -0
- package/dist/components/table/column/index.d.ts +2 -0
- package/dist/components/table/column/setup.component.d.ts +19 -0
- package/dist/components/table/column/setup.component.js +16 -0
- package/dist/components/table/index.d.ts +9 -0
- package/dist/components/table/index.js +11 -0
- package/dist/components/table/row/Cells.d.ts +14 -0
- package/dist/components/table/row/Cells.js +29 -0
- package/dist/components/table/row/Row.d.ts +6 -0
- package/dist/components/table/row/Row.js +43 -0
- package/dist/components/table/row/base.component.d.ts +7 -0
- package/dist/components/table/row/index.d.ts +2 -0
- package/dist/components/table/row/setup.component.d.ts +11 -0
- package/dist/components/table/row/setup.component.js +23 -0
- package/dist/components/table/setup.component.d.ts +18 -0
- package/dist/components/table/setup.component.js +27 -0
- package/dist/components/tabs/Tabs.d.ts +9 -0
- package/dist/components/tabs/Tabs.js +53 -0
- package/dist/components/tabs/base.component.d.ts +9 -0
- package/dist/components/tabs/content/Content.d.ts +4 -0
- package/dist/components/tabs/content/Content.js +18 -0
- package/dist/components/tabs/content/base.component.d.ts +7 -0
- package/dist/components/tabs/content/index.d.ts +2 -0
- package/dist/components/tabs/content/setup.component.d.ts +17 -0
- package/dist/components/tabs/content/setup.component.js +20 -0
- package/dist/components/tabs/index.d.ts +9 -0
- package/dist/components/tabs/index.js +11 -0
- package/dist/components/tabs/item/Item.d.ts +6 -0
- package/dist/components/tabs/item/Item.js +64 -0
- package/dist/components/tabs/item/base.component.d.ts +9 -0
- package/dist/components/tabs/item/index.d.ts +2 -0
- package/dist/components/tabs/item/setup.component.d.ts +17 -0
- package/dist/components/tabs/item/setup.component.js +23 -0
- package/dist/components/tabs/setup.component.d.ts +15 -0
- package/dist/components/tabs/setup.component.js +26 -0
- package/dist/components/tags/Tags.d.ts +7 -0
- package/dist/components/tags/Tags.js +36 -0
- package/dist/components/tags/base.component.d.ts +6 -0
- package/dist/components/tags/index.d.ts +6 -0
- package/dist/components/tags/index.js +7 -0
- package/dist/components/tags/item/Item.d.ts +6 -0
- package/dist/components/tags/item/Item.js +63 -0
- package/dist/components/tags/item/base.component.d.ts +8 -0
- package/dist/components/tags/item/index.d.ts +2 -0
- package/dist/components/tags/item/setup.component.d.ts +15 -0
- package/dist/components/tags/item/setup.component.js +23 -0
- package/dist/components/tags/setup.component.d.ts +15 -0
- package/dist/components/tags/setup.component.js +26 -0
- package/dist/components/textable/base.component.d.ts +5 -0
- package/dist/components/textable/index.d.ts +1 -0
- package/dist/components/textable/setup.component.d.ts +22 -0
- package/dist/components/textarea/Textarea.d.ts +4 -0
- package/dist/components/textarea/Textarea.js +35 -0
- package/dist/components/textarea/base.component.d.ts +7 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/setup.component.d.ts +29 -0
- package/dist/components/textarea/setup.component.js +13 -0
- package/dist/components/toasts/Toasts.d.ts +7 -0
- package/dist/components/toasts/Toasts.js +43 -0
- package/dist/components/toasts/base.component.d.ts +7 -0
- package/dist/components/toasts/index.d.ts +2 -0
- package/dist/components/toasts/item/Item.d.ts +3 -0
- package/dist/components/toasts/item/Item.js +88 -0
- package/dist/components/toasts/item/base.component.d.ts +6 -0
- package/dist/components/toasts/item/index.d.ts +2 -0
- package/dist/components/toasts/item/setup.component.d.ts +13 -0
- package/dist/components/toasts/item/setup.component.js +20 -0
- package/dist/components/toasts/setup.component.d.ts +13 -0
- package/dist/components/toasts/setup.component.js +26 -0
- package/dist/components/tooltip/Tooltip.d.ts +4 -0
- package/dist/components/tooltip/Tooltip.js +34 -0
- package/dist/components/tooltip/base.component.d.ts +6 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/setup.component.d.ts +26 -0
- package/dist/components/tooltip/setup.component.js +17 -0
- package/dist/components/value-control/base.component.d.ts +6 -0
- package/dist/components/value-control/index.d.ts +1 -0
- package/dist/components/value-control/setup.component.d.ts +22 -0
- package/dist/components/virtual/Virtual.d.ts +4 -0
- package/dist/components/virtual/Virtual.js +16 -0
- package/dist/components/virtual/base.component.d.ts +6 -0
- package/dist/components/virtual/index.d.ts +2 -0
- package/dist/components/virtual/setup.component.d.ts +6 -0
- package/dist/components/virtual/setup.component.js +12 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +60 -0
- package/dist/types.d.ts +25 -0
- package/package.json +60 -4
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toAriaProps } from "../../adapter/common/aria.js";
|
|
3
|
+
import { toControlAttrs, toRootForward, toRootProps } from "../../adapter/common/root.js";
|
|
4
|
+
import { renderSlot } from "../../adapter/common/slots.js";
|
|
5
|
+
import { NativeInput } from "../../adapter/runtime/NativeInput.js";
|
|
6
|
+
import { elevated } from "../../adapter/elevator/Elevate.js";
|
|
7
|
+
import { useSetupSwitch } from "./setup.component.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/switch/Switch.tsx
|
|
10
|
+
/** Switch — переключатель на нативном флажке: AGENTS.md (React), «Поля ввода». */
|
|
11
|
+
function Switch(props) {
|
|
12
|
+
const { ctrl, ref, forwardProps, state, layer } = useSetupSwitch(props);
|
|
13
|
+
const { rendered, tag, attrs, aria, dataset, id, value, name, disabled, required } = state;
|
|
14
|
+
if (!rendered) return null;
|
|
15
|
+
const Tag = tag;
|
|
16
|
+
const scope = {
|
|
17
|
+
value,
|
|
18
|
+
ctrl
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ jsxs(Tag, {
|
|
21
|
+
...toRootProps(ref, state, [attrs, dataset], toRootForward(forwardProps)),
|
|
22
|
+
children: [/* @__PURE__ */ jsx(NativeInput, {
|
|
23
|
+
type: "checkbox",
|
|
24
|
+
id,
|
|
25
|
+
name,
|
|
26
|
+
disabled,
|
|
27
|
+
required,
|
|
28
|
+
...toAriaProps(aria),
|
|
29
|
+
...toControlAttrs(forwardProps),
|
|
30
|
+
live: { checked: value }
|
|
31
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
32
|
+
className: "so-switch__track",
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
35
|
+
className: "so-switch__track--thumb",
|
|
36
|
+
children: elevated(layer, value ? renderSlot(props.on, scope) : renderSlot(props.off, scope))
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Switch };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ISwitch } from '@soxa-ui/core';
|
|
2
|
+
import type { SwitchDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, TDomAttributes, TFieldAttributes, UseDomProps } from '../../types';
|
|
4
|
+
export type SwitchEventProps = EventProps<typeof SwitchDescriptor>;
|
|
5
|
+
/** Атрибуты Switch: класс и стиль — корню, остальное — полю `<input>`. */
|
|
6
|
+
export type SwitchAttributes = TDomAttributes<typeof SwitchDescriptor, TFieldAttributes>;
|
|
7
|
+
export type SwitchProps = UseDomProps<typeof SwitchDescriptor, ISwitch, SwitchEventProps, TFieldAttributes>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SwitchProps } from './base.component';
|
|
2
|
+
/** Поле формы `Field` над переключателем: ошибку и ссылки на части берёт от него лифтом. */
|
|
3
|
+
export declare function useSetupSwitch(props: SwitchProps): import("../../adapter").TComponentBinding<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").ISwitch, {
|
|
4
|
+
props: object & {} & {} & {} & {
|
|
5
|
+
aria_label?: string | undefined;
|
|
6
|
+
aria_labelledBy?: string | undefined;
|
|
7
|
+
aria_describedBy?: string | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
id?: string | undefined;
|
|
10
|
+
} & {} & {};
|
|
11
|
+
events: object & {
|
|
12
|
+
"element:removed": () => void;
|
|
13
|
+
"element:ready": (element: Element) => void;
|
|
14
|
+
} & {} & {
|
|
15
|
+
"aria:change:label": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
16
|
+
"aria:change:labelledBy": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
17
|
+
"aria:change:describedBy": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
18
|
+
} & {
|
|
19
|
+
"action:blur": (event: FocusEvent) => void;
|
|
20
|
+
"action:click": (event: MouseEvent) => void;
|
|
21
|
+
"action:focus": (event: FocusEvent) => void;
|
|
22
|
+
"action:press": (event: MouseEvent) => void;
|
|
23
|
+
} & {
|
|
24
|
+
"change:id": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
25
|
+
} & {};
|
|
26
|
+
outputs: object & {} & {} & {} & {} & {} & {} & {};
|
|
27
|
+
}>, SwitchProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComponent } from "../../adapter/runtime/useComponent.js";
|
|
3
|
+
import { SwitchDescriptor, TFieldControlExtension } from "@soxa-ui/setup";
|
|
4
|
+
//#region src/components/switch/setup.component.ts
|
|
5
|
+
/** Поле формы `Field` над переключателем: ошибку и ссылки на части берёт от него лифтом. */
|
|
6
|
+
function useSetupSwitch(props) {
|
|
7
|
+
return useComponent((create, elevator) => create(SwitchDescriptor(), {
|
|
8
|
+
ctrl: props.ctrl,
|
|
9
|
+
props
|
|
10
|
+
}).use(TFieldControlExtension, { elevator }), props);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { useSetupSwitch };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { TableProps } from './base.component';
|
|
3
|
+
/**
|
|
4
|
+
* Table — таблица по паттернам APG Table и Sortable Table: окно
|
|
5
|
+
* `so-table__viewport` вокруг корня `table` (AGENTS.md (React), «Корень и `ref`
|
|
6
|
+
* потребителя»). Строки и ячейки — под границей перерисовки: корневой
|
|
7
|
+
* AGENTS.md, «Адаптер обязан адаптировать».
|
|
8
|
+
*/
|
|
9
|
+
export declare function Table(props: TableProps): ReactElement | null;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toAriaProps } from "../../adapter/common/aria.js";
|
|
3
|
+
import { toReactStyle, toWrappedRootProps } from "../../adapter/common/root.js";
|
|
4
|
+
import { relaySlot, renderSlot } from "../../adapter/common/slots.js";
|
|
5
|
+
import { Elevate } from "../../adapter/elevator/Elevate.js";
|
|
6
|
+
import { CheckBox } from "../check-box/CheckBox.js";
|
|
7
|
+
import { TableColumn } from "./column/Column.js";
|
|
8
|
+
import { TableRow } from "./row/Row.js";
|
|
9
|
+
import { useSetupTable } from "./setup.component.js";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/table/Table.tsx
|
|
12
|
+
/**
|
|
13
|
+
* Table — таблица по паттернам APG Table и Sortable Table: окно
|
|
14
|
+
* `so-table__viewport` вокруг корня `table` (AGENTS.md (React), «Корень и `ref`
|
|
15
|
+
* потребителя»). Строки и ячейки — под границей перерисовки: корневой
|
|
16
|
+
* AGENTS.md, «Адаптер обязан адаптировать».
|
|
17
|
+
*/
|
|
18
|
+
function Table(props) {
|
|
19
|
+
const { bindRef, forwardProps, state, layer, facade } = useSetupTable(props);
|
|
20
|
+
const { rendered, tag, mode, names_selectAll, headRowAria, cellAria, shownColumns, drawn, shown, columnCount, attrs, aria, dataset } = state;
|
|
21
|
+
if (!rendered) return null;
|
|
22
|
+
const Tag = tag;
|
|
23
|
+
const { wrapper, root } = toWrappedRootProps(bindRef, state, [
|
|
24
|
+
attrs,
|
|
25
|
+
aria,
|
|
26
|
+
dataset
|
|
27
|
+
], forwardProps, "so-table__viewport");
|
|
28
|
+
const { selectAll } = facade;
|
|
29
|
+
return /* @__PURE__ */ jsx("div", {
|
|
30
|
+
...wrapper,
|
|
31
|
+
children: /* @__PURE__ */ jsx(Tag, {
|
|
32
|
+
...root,
|
|
33
|
+
children: /* @__PURE__ */ jsxs(Elevate, {
|
|
34
|
+
layer,
|
|
35
|
+
children: [/* @__PURE__ */ jsx("thead", {
|
|
36
|
+
className: "so-table__head",
|
|
37
|
+
children: /* @__PURE__ */ jsxs("tr", {
|
|
38
|
+
className: "so-table__head-row",
|
|
39
|
+
...toAriaProps(headRowAria),
|
|
40
|
+
children: [mode === "multiple" ? /* @__PURE__ */ jsx("th", {
|
|
41
|
+
className: "so-table__select",
|
|
42
|
+
...toAriaProps(cellAria),
|
|
43
|
+
children: /* @__PURE__ */ jsx(CheckBox, {
|
|
44
|
+
embedded: "table.select-all",
|
|
45
|
+
ctrl: selectAll,
|
|
46
|
+
aria_label: names_selectAll
|
|
47
|
+
}, selectAll.uid)
|
|
48
|
+
}) : mode === "single" ? /* @__PURE__ */ jsx("td", {
|
|
49
|
+
className: "so-table__select",
|
|
50
|
+
...toAriaProps(cellAria)
|
|
51
|
+
}) : null, shownColumns?.map((column) => /* @__PURE__ */ jsx(TableColumn, {
|
|
52
|
+
ctrl: column,
|
|
53
|
+
children: relaySlot(props.header, { column })
|
|
54
|
+
}, column.uid))]
|
|
55
|
+
})
|
|
56
|
+
}), /* @__PURE__ */ jsxs("tbody", {
|
|
57
|
+
className: "so-table__body",
|
|
58
|
+
children: [drawn?.map((entry) => entry.kind === "filler" ? /* @__PURE__ */ jsx("tr", {
|
|
59
|
+
className: "so-table__filler-row",
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
style: toReactStyle(entry.style),
|
|
62
|
+
children: /* @__PURE__ */ jsx("td", {
|
|
63
|
+
className: "so-table__filler",
|
|
64
|
+
colSpan: columnCount
|
|
65
|
+
})
|
|
66
|
+
}, entry.key) : /* @__PURE__ */ jsx(TableRow, {
|
|
67
|
+
ctrl: entry.item,
|
|
68
|
+
cell: props.cell
|
|
69
|
+
}, entry.key)), shown?.length === 0 ? /* @__PURE__ */ jsx("tr", {
|
|
70
|
+
className: "so-table__empty-row",
|
|
71
|
+
children: /* @__PURE__ */ jsx("td", {
|
|
72
|
+
className: "so-table__empty",
|
|
73
|
+
colSpan: columnCount,
|
|
74
|
+
children: renderSlot(props.empty)
|
|
75
|
+
})
|
|
76
|
+
}) : null]
|
|
77
|
+
})]
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { Table };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ITable } from '@soxa-ui/core';
|
|
2
|
+
import type { TableCollectionDescriptor, TableDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseDomProps } from '../../types';
|
|
4
|
+
/** События Table — свои и фасада коллекции строк. */
|
|
5
|
+
export type TableEventProps = EventProps<typeof TableDescriptor> & EventProps<typeof TableCollectionDescriptor>;
|
|
6
|
+
/** Пропсы Table: класс, стиль и `ref` — окну, остальное — `table`. */
|
|
7
|
+
export type TableProps = UseDomProps<typeof TableDescriptor, ITable, TableEventProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { TableColumnProps } from './base.component';
|
|
3
|
+
/**
|
|
4
|
+
* TableColumn — заголовок колонки (`Table.Column`) с кнопкой сортировки и ручкой
|
|
5
|
+
* ширины; поле ручки — `NativeInput` (AGENTS.md (React), «Поля ввода»).
|
|
6
|
+
*/
|
|
7
|
+
export declare function TableColumn(props: TableColumnProps): ReactElement | null;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toAriaProps } from "../../../adapter/common/aria.js";
|
|
3
|
+
import { toRootProps } from "../../../adapter/common/root.js";
|
|
4
|
+
import { renderSlot } from "../../../adapter/common/slots.js";
|
|
5
|
+
import { roleIcon } from "../../../adapter/common/icon.js";
|
|
6
|
+
import { NativeInput } from "../../../adapter/runtime/NativeInput.js";
|
|
7
|
+
import { Button } from "../../button/Button.js";
|
|
8
|
+
import { Icon } from "../../icon/Icon.js";
|
|
9
|
+
import { useSetupTableColumn } from "./setup.component.js";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/table/column/Column.tsx
|
|
12
|
+
var SortIcon = roleIcon("arrowUpward");
|
|
13
|
+
/**
|
|
14
|
+
* TableColumn — заголовок колонки (`Table.Column`) с кнопкой сортировки и ручкой
|
|
15
|
+
* ширины; поле ручки — `NativeInput` (AGENTS.md (React), «Поля ввода»).
|
|
16
|
+
*/
|
|
17
|
+
function TableColumn(props) {
|
|
18
|
+
const { ref, forwardProps, state, column } = useSetupTableColumn(props);
|
|
19
|
+
const { rendered, tag, text, sortable, disabled, widthStyle, textAria, sortAria, resizerRendered, resizer, resizerAria, attrs, aria, dataset } = state;
|
|
20
|
+
if (!rendered) return null;
|
|
21
|
+
return /* @__PURE__ */ jsxs(tag, {
|
|
22
|
+
...toRootProps(ref, state, [
|
|
23
|
+
attrs,
|
|
24
|
+
aria,
|
|
25
|
+
dataset
|
|
26
|
+
], forwardProps, widthStyle),
|
|
27
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
28
|
+
className: "so-table-column__content",
|
|
29
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: "so-table-column__text",
|
|
31
|
+
...toAriaProps(textAria),
|
|
32
|
+
children: renderSlot(props.children, {
|
|
33
|
+
text: text ?? "",
|
|
34
|
+
sortable: sortable ?? false
|
|
35
|
+
}) ?? text
|
|
36
|
+
}), sortable ? /* @__PURE__ */ jsx(Button, {
|
|
37
|
+
embedded: "table.sort",
|
|
38
|
+
type: "button",
|
|
39
|
+
className: "so-table-column__sort",
|
|
40
|
+
disabled,
|
|
41
|
+
...toAriaProps(sortAria),
|
|
42
|
+
onActionPress: () => column.toggleSort(),
|
|
43
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
44
|
+
className: "so-table-column__sort-icon",
|
|
45
|
+
"aria-hidden": "true",
|
|
46
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
47
|
+
embedded: "table.sort-icon",
|
|
48
|
+
tag: SortIcon
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
}) : null]
|
|
52
|
+
}), resizerRendered && resizer ? /* @__PURE__ */ jsx("span", {
|
|
53
|
+
className: "so-table-column__resizer",
|
|
54
|
+
children: /* @__PURE__ */ jsx(NativeInput, {
|
|
55
|
+
className: "so-table-column__input",
|
|
56
|
+
type: "range",
|
|
57
|
+
min: resizer.min,
|
|
58
|
+
max: resizer.max,
|
|
59
|
+
...toAriaProps(resizerAria),
|
|
60
|
+
live: { value: resizer.value }
|
|
61
|
+
})
|
|
62
|
+
}) : null]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { TableColumn };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ITableColumn } from '@soxa-ui/core';
|
|
2
|
+
import type { TableColumnDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseDomProps } from '../../../types';
|
|
4
|
+
export type TableColumnEventProps = EventProps<typeof TableColumnDescriptor>;
|
|
5
|
+
/** Пропсы заголовка колонки: входов нет, рисует таблица над `ctrl`. */
|
|
6
|
+
export type TableColumnProps = UseDomProps<typeof TableColumnDescriptor, ITableColumn, TableColumnEventProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TableColumnProps } from './base.component';
|
|
2
|
+
export declare function useSetupTableColumn(props: TableColumnProps): {
|
|
3
|
+
column: object & import("@soxa-ui/core").ITableColumn<import("@soxa-ui/core").ITableColumnProps, import("@soxa-ui/core").TTableColumnEvents>;
|
|
4
|
+
ctrl: object & import("@soxa-ui/core").ITableColumn<import("@soxa-ui/core").ITableColumnProps, import("@soxa-ui/core").TTableColumnEvents>;
|
|
5
|
+
plugins: import("@soxa-ui/plugins").IPluginBundle | null;
|
|
6
|
+
ref: (el: Element | null) => void;
|
|
7
|
+
bindRef: (el: Element | null) => void;
|
|
8
|
+
root: import("../../../adapter").TRootSource;
|
|
9
|
+
forwardProps: Partial<TableColumnProps>;
|
|
10
|
+
state: import("@soxa-ui/setup").TAdapterState<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").ITableColumn<import("@soxa-ui/core").ITableColumnProps, import("@soxa-ui/core").TTableColumnEvents>, {
|
|
11
|
+
props: object & {} & {} & {} & {} & {};
|
|
12
|
+
events: object & {
|
|
13
|
+
"element:removed": () => void;
|
|
14
|
+
"element:ready": (element: Element) => void;
|
|
15
|
+
} & {} & {} & {} & {};
|
|
16
|
+
outputs: object & {} & {} & {} & {} & {};
|
|
17
|
+
}>>;
|
|
18
|
+
layer: import("../../../adapter").TElevatorLayer;
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComponent } from "../../../adapter/runtime/useComponent.js";
|
|
3
|
+
import { TableColumnDescriptor } from "@soxa-ui/setup";
|
|
4
|
+
//#region src/components/table/column/setup.component.ts
|
|
5
|
+
function useSetupTableColumn(props) {
|
|
6
|
+
const binding = useComponent((create) => create(TableColumnDescriptor(), {
|
|
7
|
+
ctrl: props.ctrl,
|
|
8
|
+
props
|
|
9
|
+
}), props);
|
|
10
|
+
return {
|
|
11
|
+
...binding,
|
|
12
|
+
column: binding.ctrl
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { useSetupTableColumn };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Table as TableComponent } from './Table';
|
|
2
|
+
import { TableColumn } from './column';
|
|
3
|
+
export * from './base.component';
|
|
4
|
+
export * from './column';
|
|
5
|
+
export * from './row';
|
|
6
|
+
export declare const Table: typeof TableComponent & {
|
|
7
|
+
Column: typeof TableColumn;
|
|
8
|
+
Row: import("react").NamedExoticComponent<import("./row").TableRowProps>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TableColumn } from "./column/Column.js";
|
|
2
|
+
import { TableRow } from "./row/Row.js";
|
|
3
|
+
import { Table as Table$1 } from "./Table.js";
|
|
4
|
+
import { withParts } from "@soxa-ui/setup";
|
|
5
|
+
//#region src/components/table/index.ts
|
|
6
|
+
var Table = withParts(Table$1, {
|
|
7
|
+
Column: TableColumn,
|
|
8
|
+
Row: TableRow
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Table };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ITableRow, TAriaAttributes, TTableCell } from '@soxa-ui/core';
|
|
2
|
+
import type { TableRowProps } from './base.component';
|
|
3
|
+
type TTableRowCellsProps = {
|
|
4
|
+
readonly row: ITableRow;
|
|
5
|
+
readonly cells: readonly TTableCell[] | undefined;
|
|
6
|
+
readonly cellAria: TAriaAttributes | undefined;
|
|
7
|
+
readonly cell: TableRowProps['cell'];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Ячейки строки таблицы — внутренняя часть `Table.Row` под своей границей
|
|
11
|
+
* перерисовки: выбор перерисовывает строку, но не ячейки. Из пакета не экспортируется.
|
|
12
|
+
*/
|
|
13
|
+
export declare const TableRowCells: import("react").NamedExoticComponent<TTableRowCellsProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toAriaProps } from "../../../adapter/common/aria.js";
|
|
3
|
+
import { renderSlot } from "../../../adapter/common/slots.js";
|
|
4
|
+
import { withRenderBoundary } from "../../../adapter/runtime/withRenderBoundary.js";
|
|
5
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/table/row/Cells.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Ячейки строки таблицы — внутренняя часть `Table.Row` под своей границей
|
|
9
|
+
* перерисовки: выбор перерисовывает строку, но не ячейки. Из пакета не экспортируется.
|
|
10
|
+
*/
|
|
11
|
+
var TableRowCells = withRenderBoundary(function TableRowCells({ row, cells, cellAria, cell: slot }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Fragment, { children: cells?.map((cell) => {
|
|
13
|
+
const Cell = cell.rowHeader ? "th" : "td";
|
|
14
|
+
return /* @__PURE__ */ jsx(Cell, {
|
|
15
|
+
className: "so-table-row__cell",
|
|
16
|
+
scope: cell.rowHeader ? "row" : void 0,
|
|
17
|
+
...toAriaProps(cell.dataset),
|
|
18
|
+
...toAriaProps(cellAria),
|
|
19
|
+
...toAriaProps(cell.aria),
|
|
20
|
+
children: renderSlot(slot, {
|
|
21
|
+
row,
|
|
22
|
+
column: cell.column,
|
|
23
|
+
value: cell.value
|
|
24
|
+
}) ?? cell.text
|
|
25
|
+
}, cell.column.uid);
|
|
26
|
+
}) });
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { TableRowCells };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TableRowProps } from './base.component';
|
|
2
|
+
/**
|
|
3
|
+
* TableRow — строка таблицы (`Table.Row`) под границей перерисовки. Ключ
|
|
4
|
+
* чекбокса — его экземпляр: AGENTS.md (React), «Пересобранный инстанс и `key`».
|
|
5
|
+
*/
|
|
6
|
+
export declare const TableRow: import("react").NamedExoticComponent<TableRowProps>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toAriaProps } from "../../../adapter/common/aria.js";
|
|
3
|
+
import { toRootProps } from "../../../adapter/common/root.js";
|
|
4
|
+
import { withRenderBoundary } from "../../../adapter/runtime/withRenderBoundary.js";
|
|
5
|
+
import { CheckBox } from "../../check-box/CheckBox.js";
|
|
6
|
+
import { TableRowCells } from "./Cells.js";
|
|
7
|
+
import { useSetupTableRow } from "./setup.component.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/table/row/Row.tsx
|
|
10
|
+
/**
|
|
11
|
+
* TableRow — строка таблицы (`Table.Row`) под границей перерисовки. Ключ
|
|
12
|
+
* чекбокса — его экземпляр: AGENTS.md (React), «Пересобранный инстанс и `key`».
|
|
13
|
+
*/
|
|
14
|
+
var TableRow = withRenderBoundary(function TableRow(props) {
|
|
15
|
+
const { ctrl, ref, forwardProps, state, context } = useSetupTableRow(props);
|
|
16
|
+
const { rendered, tag, selecting, cells, cellAria, rowHeaderId, attrs, aria, dataset } = state;
|
|
17
|
+
if (!rendered) return null;
|
|
18
|
+
const Tag = tag;
|
|
19
|
+
const checkBox = selecting ? context?.adapters.table.checkBox : void 0;
|
|
20
|
+
return /* @__PURE__ */ jsxs(Tag, {
|
|
21
|
+
...toRootProps(ref, state, [
|
|
22
|
+
attrs,
|
|
23
|
+
aria,
|
|
24
|
+
dataset
|
|
25
|
+
], forwardProps),
|
|
26
|
+
children: [selecting ? /* @__PURE__ */ jsx("td", {
|
|
27
|
+
className: "so-table-row__select",
|
|
28
|
+
...toAriaProps(cellAria),
|
|
29
|
+
children: /* @__PURE__ */ jsx(CheckBox, {
|
|
30
|
+
embedded: "table.select",
|
|
31
|
+
ctrl: checkBox,
|
|
32
|
+
aria_labelledBy: rowHeaderId
|
|
33
|
+
}, checkBox?.uid)
|
|
34
|
+
}) : null, /* @__PURE__ */ jsx(TableRowCells, {
|
|
35
|
+
row: ctrl,
|
|
36
|
+
cells,
|
|
37
|
+
cellAria,
|
|
38
|
+
cell: props.cell
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { TableRow };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ITableRow } from '@soxa-ui/core';
|
|
2
|
+
import type { TableCollectionRowDescriptor, TableRowDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseDomProps } from '../../../types';
|
|
4
|
+
/** События строки — свои и фасада. */
|
|
5
|
+
export type TableRowEventProps = EventProps<typeof TableRowDescriptor> & EventProps<typeof TableCollectionRowDescriptor>;
|
|
6
|
+
/** Пропсы строки: входов нет, рисует таблица над `ctrl`. */
|
|
7
|
+
export type TableRowProps = UseDomProps<typeof TableRowDescriptor, ITableRow, TableRowEventProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TableRowProps } from './base.component';
|
|
2
|
+
export declare function useSetupTableRow(props: TableRowProps): {
|
|
3
|
+
context: import("@soxa-ui/core").TItemContext<import("@soxa-ui/core").ITableRow<import("@soxa-ui/core").ITableRowProps, import("@soxa-ui/core").TTableRowEvents>, import("@soxa-ui/core").TTableCollectionExtensions> | undefined;
|
|
4
|
+
ref: (el: Element | null) => void;
|
|
5
|
+
plugins: import("@soxa-ui/plugins").IPluginBundle | null;
|
|
6
|
+
ctrl: object & import("@soxa-ui/core").ITableRow<import("@soxa-ui/core").ITableRowProps, import("@soxa-ui/core").TTableRowEvents>;
|
|
7
|
+
root: import("../../../adapter").TRootSource;
|
|
8
|
+
forwardProps: Partial<TableRowProps>;
|
|
9
|
+
bindRef: (el: Element | null) => void;
|
|
10
|
+
state: import("@soxa-ui/setup").TInstanceState<object & import("@soxa-ui/core").ITableRow<import("@soxa-ui/core").ITableRowProps, import("@soxa-ui/core").TTableRowEvents>> & import("@soxa-ui/setup").TInstanceState<object & {} & {} & {}> & import("@soxa-ui/setup").TInstanceState<object & {} & {} & {}> & import("@soxa-ui/setup").TInstanceState<object & import("@soxa-ui/core").TTableRowCollectionFacade> & object;
|
|
11
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useAdapter, useCollectionAdapter } from "../../../adapter/runtime/useAdapter.js";
|
|
3
|
+
import { useAdapterContext } from "../../../adapter/runtime/useAdapterContext.js";
|
|
4
|
+
import { TCollectionItemExtension, TableCollectionRowDescriptor, TableRowDescriptor } from "@soxa-ui/setup";
|
|
5
|
+
//#region src/components/table/row/setup.component.ts
|
|
6
|
+
function useSetupTableRow(props) {
|
|
7
|
+
const { contexts: [adapter, item] } = useAdapterContext((create, elevator) => {
|
|
8
|
+
const adapter = create(TableRowDescriptor(), {
|
|
9
|
+
ctrl: props.ctrl,
|
|
10
|
+
props
|
|
11
|
+
});
|
|
12
|
+
return [adapter, create(TableCollectionRowDescriptor(), { props }, { bundle: adapter.bundle }).use(TCollectionItemExtension, {
|
|
13
|
+
adapter,
|
|
14
|
+
elevator
|
|
15
|
+
})];
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
...useCollectionAdapter(useAdapter(adapter, props), item, props),
|
|
19
|
+
context: item.instance.context
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { useSetupTableRow };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TableProps } from './base.component';
|
|
2
|
+
export declare function useSetupTable(props: TableProps): {
|
|
3
|
+
layer: import("../../adapter").TElevatorLayer;
|
|
4
|
+
facade: object & import("@soxa-ui/core").TTableCollectionFacade;
|
|
5
|
+
ref: (el: Element | null) => void;
|
|
6
|
+
plugins: import("@soxa-ui/plugins").IPluginBundle | null;
|
|
7
|
+
ctrl: object & import("@soxa-ui/core").ITable;
|
|
8
|
+
root: import("../../adapter").TRootSource;
|
|
9
|
+
forwardProps: Partial<TableProps>;
|
|
10
|
+
bindRef: (el: Element | null) => void;
|
|
11
|
+
state: import("@soxa-ui/setup").TInstanceState<object & import("@soxa-ui/core").ITable> & import("@soxa-ui/setup").TInstanceState<object & {} & {} & {} & {
|
|
12
|
+
aria_label?: string | undefined;
|
|
13
|
+
aria_labelledBy?: string | undefined;
|
|
14
|
+
aria_describedBy?: string | undefined;
|
|
15
|
+
} & {} & {} & {} & {} & {} & {} & {}> & import("@soxa-ui/setup").TInstanceState<object & {} & {} & {} & {} & {} & {} & {} & {
|
|
16
|
+
readonly names_selectAll: string;
|
|
17
|
+
} & {} & {} & {}> & import("@soxa-ui/setup").TInstanceState<object & import("@soxa-ui/core").TTableCollectionFacade> & object;
|
|
18
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useAdapter, useCollectionAdapter } from "../../adapter/runtime/useAdapter.js";
|
|
3
|
+
import { useAdapterContext } from "../../adapter/runtime/useAdapterContext.js";
|
|
4
|
+
import { TCollectionExtension, TVirtualCollectionExtension, TableCollectionDescriptor, TableDescriptor } from "@soxa-ui/setup";
|
|
5
|
+
//#region src/components/table/setup.component.ts
|
|
6
|
+
function useSetupTable(props) {
|
|
7
|
+
const { contexts: [adapter, collectionAdapter], layer } = useAdapterContext((create, elevator) => {
|
|
8
|
+
const adapter = create(TableDescriptor(), {
|
|
9
|
+
ctrl: props.ctrl,
|
|
10
|
+
props
|
|
11
|
+
});
|
|
12
|
+
return [adapter, create(TableCollectionDescriptor(), {
|
|
13
|
+
props,
|
|
14
|
+
options: {
|
|
15
|
+
owner: adapter.instance,
|
|
16
|
+
engine: props.engine
|
|
17
|
+
}
|
|
18
|
+
}, { bundle: adapter.bundle }).use(TCollectionExtension, { elevator }).use(TVirtualCollectionExtension, { elevator })];
|
|
19
|
+
});
|
|
20
|
+
return {
|
|
21
|
+
...useCollectionAdapter(useAdapter(adapter, props), collectionAdapter, props),
|
|
22
|
+
layer,
|
|
23
|
+
facade: collectionAdapter.instance
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { useSetupTable };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { TabsProps } from './base.component';
|
|
3
|
+
/**
|
|
4
|
+
* Tabs — набор табов: ряд со списком `[role=tablist]` и панели рядом с ним
|
|
5
|
+
* (слот `content`). Слоты `leading` и `trailing` — в ряду по краям списка, а
|
|
6
|
+
* не в нём: в `tablist` ARIA пускает только `tab`. Атрибуты потребителя —
|
|
7
|
+
* списку: AGENTS.md (React), «Корень и `ref` потребителя».
|
|
8
|
+
*/
|
|
9
|
+
export declare function Tabs(props: TabsProps): ReactElement | null;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toAriaProps } from "../../adapter/common/aria.js";
|
|
3
|
+
import { toControlAttrs, toRootForward, toRootProps } from "../../adapter/common/root.js";
|
|
4
|
+
import { hasSlot, relaySlot, renderSlot } from "../../adapter/common/slots.js";
|
|
5
|
+
import { Elevate } from "../../adapter/elevator/Elevate.js";
|
|
6
|
+
import { TabsItem } from "./item/Item.js";
|
|
7
|
+
import { useSetupTabs } from "./setup.component.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/tabs/Tabs.tsx
|
|
10
|
+
/**
|
|
11
|
+
* Tabs — набор табов: ряд со списком `[role=tablist]` и панели рядом с ним
|
|
12
|
+
* (слот `content`). Слоты `leading` и `trailing` — в ряду по краям списка, а
|
|
13
|
+
* не в нём: в `tablist` ARIA пускает только `tab`. Атрибуты потребителя —
|
|
14
|
+
* списку: AGENTS.md (React), «Корень и `ref` потребителя».
|
|
15
|
+
*/
|
|
16
|
+
function Tabs(props) {
|
|
17
|
+
const { ref, forwardProps, state, layer } = useSetupTabs(props);
|
|
18
|
+
const { rendered, shown, attrs, aria, dataset } = state;
|
|
19
|
+
if (!rendered) return null;
|
|
20
|
+
return /* @__PURE__ */ jsx("div", {
|
|
21
|
+
...toRootProps(ref, state, [attrs, dataset], toRootForward(forwardProps)),
|
|
22
|
+
children: /* @__PURE__ */ jsxs(Elevate, {
|
|
23
|
+
layer,
|
|
24
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: "so-tabs__bar",
|
|
26
|
+
children: [
|
|
27
|
+
hasSlot(props.leading) ? /* @__PURE__ */ jsx("div", {
|
|
28
|
+
className: "so-tabs__leading",
|
|
29
|
+
children: renderSlot(props.leading)
|
|
30
|
+
}) : null,
|
|
31
|
+
/* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: "so-tabs__list",
|
|
33
|
+
...toAriaProps(aria),
|
|
34
|
+
...toControlAttrs(forwardProps),
|
|
35
|
+
children: hasSlot(props.children) ? renderSlot(props.children) : shown?.map((item) => /* @__PURE__ */ jsx(TabsItem, {
|
|
36
|
+
ctrl: item,
|
|
37
|
+
leading: renderSlot(props["item-leading"], { item }),
|
|
38
|
+
trailing: renderSlot(props["item-trailing"], { item }),
|
|
39
|
+
"close-icon": renderSlot(props["item-close-icon"], { item }),
|
|
40
|
+
children: relaySlot(props.item, { item })
|
|
41
|
+
}, item.uid))
|
|
42
|
+
}),
|
|
43
|
+
hasSlot(props.trailing) ? /* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: "so-tabs__trailing",
|
|
45
|
+
children: renderSlot(props.trailing)
|
|
46
|
+
}) : null
|
|
47
|
+
]
|
|
48
|
+
}), renderSlot(props.content)]
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { Tabs };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { ITabs } from '@soxa-ui/core';
|
|
3
|
+
import type { TabsCollectionDescriptor, TabsDescriptor } from '@soxa-ui/setup';
|
|
4
|
+
import type { EventProps, TDomAttributes, UseDomProps } from '../../types';
|
|
5
|
+
/** События Tabs — свои и фасада коллекции. */
|
|
6
|
+
export type TabsEventProps = EventProps<typeof TabsDescriptor> & EventProps<typeof TabsCollectionDescriptor>;
|
|
7
|
+
/** Атрибуты набора: класс и стиль — корню, остальное — списку табов с `role="tablist"`. */
|
|
8
|
+
export type TabsAttributes = TDomAttributes<typeof TabsDescriptor, HTMLAttributes<HTMLElement>, TabsEventProps>;
|
|
9
|
+
export type TabsProps = UseDomProps<typeof TabsDescriptor, ITabs, TabsEventProps>;
|