@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,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComponent } from "../../adapter/runtime/useComponent.js";
|
|
3
|
+
import { IconDescriptor } from "@soxa-ui/setup";
|
|
4
|
+
//#region src/components/icon/setup.component.ts
|
|
5
|
+
function useSetupIcon(props) {
|
|
6
|
+
return useComponent((create) => create(IconDescriptor(), {
|
|
7
|
+
ctrl: props.ctrl,
|
|
8
|
+
props
|
|
9
|
+
}), props);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { useSetupIcon };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export * from './component';
|
|
2
|
+
export * from './component-view';
|
|
3
|
+
export * from './stylable';
|
|
4
|
+
export * from './interactive';
|
|
5
|
+
export * from './control';
|
|
6
|
+
export * from './value-control';
|
|
7
|
+
export * from './input-control';
|
|
8
|
+
export * from './textable';
|
|
9
|
+
export * from './button';
|
|
10
|
+
export * from './icon';
|
|
11
|
+
export * from './label';
|
|
12
|
+
export * from './field';
|
|
13
|
+
export * from './frame';
|
|
14
|
+
export * from './popover';
|
|
15
|
+
export * from './tooltip';
|
|
16
|
+
export * from './menu';
|
|
17
|
+
export * from './dialog';
|
|
18
|
+
export * from './drawer';
|
|
19
|
+
export * from './toasts';
|
|
20
|
+
export * from './progress-linear';
|
|
21
|
+
export * from './progress-spinner';
|
|
22
|
+
export * from './skeleton';
|
|
23
|
+
export * from './input';
|
|
24
|
+
export * from './number-input';
|
|
25
|
+
export * from './textarea';
|
|
26
|
+
export * from './check-box';
|
|
27
|
+
export * from './switch';
|
|
28
|
+
export * from './radio-group';
|
|
29
|
+
export * from './slider';
|
|
30
|
+
export * from './rating';
|
|
31
|
+
export * from './date-input';
|
|
32
|
+
export * from './calendar';
|
|
33
|
+
export * from './date-picker';
|
|
34
|
+
export * from './list-box';
|
|
35
|
+
export * from './tags';
|
|
36
|
+
export * from './select';
|
|
37
|
+
export * from './tabs';
|
|
38
|
+
export * from './accordion';
|
|
39
|
+
export * from './pagination';
|
|
40
|
+
export * from './scroller';
|
|
41
|
+
export * from './table';
|
|
42
|
+
export * from './virtual';
|
|
43
|
+
export * from './drag-and-drop';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toAriaProps } from "../../adapter/common/aria.js";
|
|
3
|
+
import { toControlAttrs, toRootForward, toRootProps } from "../../adapter/common/root.js";
|
|
4
|
+
import { hasSlot, renderSlot } from "../../adapter/common/slots.js";
|
|
5
|
+
import { roleIcon } from "../../adapter/common/icon.js";
|
|
6
|
+
import { useClickAction } from "../../adapter/runtime/useClickAction.js";
|
|
7
|
+
import { NativeInput } from "../../adapter/runtime/NativeInput.js";
|
|
8
|
+
import { elevated } from "../../adapter/elevator/Elevate.js";
|
|
9
|
+
import { Button } from "../button/Button.js";
|
|
10
|
+
import { Icon } from "../icon/Icon.js";
|
|
11
|
+
import { useSetupInput } from "./setup.component.js";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
//#region src/components/input/Input.tsx
|
|
14
|
+
/** Input — текстовое поле со слотами по сторонам: AGENTS.md (React), «Поля ввода». */
|
|
15
|
+
function Input(props) {
|
|
16
|
+
const { ctrl, ref, forwardProps, state, layer } = useSetupInput(props);
|
|
17
|
+
const clear = useClickAction((event) => {
|
|
18
|
+
event.stopPropagation();
|
|
19
|
+
ctrl.clear();
|
|
20
|
+
});
|
|
21
|
+
const { rendered, tag, attrs, aria, dataset, id, value, name, disabled, readonly, required, placeholder, size, clearable, clearAria } = state;
|
|
22
|
+
if (!rendered) return null;
|
|
23
|
+
const Tag = tag;
|
|
24
|
+
const trailing = clearable === true || hasSlot(props.clear) || hasSlot(props.trailing);
|
|
25
|
+
return /* @__PURE__ */ jsxs(Tag, {
|
|
26
|
+
...toRootProps(ref, state, [attrs, dataset], toRootForward(forwardProps)),
|
|
27
|
+
children: [
|
|
28
|
+
hasSlot(props.leading) ? /* @__PURE__ */ jsx("div", {
|
|
29
|
+
className: "so-input__leading",
|
|
30
|
+
children: elevated(layer, renderSlot(props.leading, { ctrl }))
|
|
31
|
+
}) : null,
|
|
32
|
+
/* @__PURE__ */ jsx(NativeInput, {
|
|
33
|
+
type: "text",
|
|
34
|
+
id,
|
|
35
|
+
name,
|
|
36
|
+
disabled,
|
|
37
|
+
readOnly: readonly,
|
|
38
|
+
required,
|
|
39
|
+
placeholder,
|
|
40
|
+
...toAriaProps(aria),
|
|
41
|
+
...toControlAttrs(forwardProps),
|
|
42
|
+
live: { value }
|
|
43
|
+
}),
|
|
44
|
+
trailing ? /* @__PURE__ */ jsxs("div", {
|
|
45
|
+
className: "so-input__trailing",
|
|
46
|
+
children: [elevated(layer, renderSlot(props.clear, { clear: ctrl.clear })) ?? (clearable === true ? /* @__PURE__ */ jsx(Button, {
|
|
47
|
+
embedded: "input.clear",
|
|
48
|
+
type: "button",
|
|
49
|
+
className: "so-input__clear",
|
|
50
|
+
size,
|
|
51
|
+
disabled,
|
|
52
|
+
...toAriaProps(clearAria),
|
|
53
|
+
ref: clear,
|
|
54
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
55
|
+
embedded: "input.clear-icon",
|
|
56
|
+
tag: roleIcon("close"),
|
|
57
|
+
size
|
|
58
|
+
})
|
|
59
|
+
}) : null), elevated(layer, renderSlot(props.trailing, { ctrl }))]
|
|
60
|
+
}) : null
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { Input };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IInput } from '@soxa-ui/core';
|
|
2
|
+
import type { InputDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, TDomAttributes, TFieldAttributes, UseDomProps } from '../../types';
|
|
4
|
+
export type InputEventProps = EventProps<typeof InputDescriptor>;
|
|
5
|
+
/** Атрибуты Input: класс и стиль — корню, остальное — полю `<input>`. */
|
|
6
|
+
export type InputAttributes = TDomAttributes<typeof InputDescriptor, TFieldAttributes>;
|
|
7
|
+
export type InputProps = UseDomProps<typeof InputDescriptor, IInput, InputEventProps, TFieldAttributes>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { InputProps } from './base.component';
|
|
2
|
+
/** Поле формы `Field` над полем: ошибку и ссылки на части поле берёт от него лифтом. */
|
|
3
|
+
export declare function useSetupInput(props: InputProps): import("../../adapter").TComponentBinding<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").IInput, {
|
|
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
|
+
}>, InputProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComponent } from "../../adapter/runtime/useComponent.js";
|
|
3
|
+
import { InputDescriptor, TFieldControlExtension } from "@soxa-ui/setup";
|
|
4
|
+
//#region src/components/input/setup.component.ts
|
|
5
|
+
/** Поле формы `Field` над полем: ошибку и ссылки на части поле берёт от него лифтом. */
|
|
6
|
+
function useSetupInput(props) {
|
|
7
|
+
return useComponent((create, elevator) => create(InputDescriptor(), {
|
|
8
|
+
ctrl: props.ctrl,
|
|
9
|
+
props
|
|
10
|
+
}).use(TFieldControlExtension, { elevator }), props);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { useSetupInput };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IInputControl } from '@soxa-ui/core';
|
|
2
|
+
import type { InputControlDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseProps } from '../../types';
|
|
4
|
+
export type InputControlEventProps = EventProps<typeof InputControlDescriptor>;
|
|
5
|
+
/** Тип значения задаёт наследник. */
|
|
6
|
+
export type InputControlProps = UseProps<typeof InputControlDescriptor, IInputControl<unknown>, InputControlEventProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './base.component';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { InputControlProps } from './base.component';
|
|
2
|
+
export declare function useSetupInputControl(props: InputControlProps): import("../../adapter").TComponentBinding<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").IInputControl<unknown, import("@soxa-ui/core").IInputControlProps<unknown>, import("@soxa-ui/core").TInputControlEvents<unknown>>, {
|
|
3
|
+
props: object & {} & {} & {} & {
|
|
4
|
+
aria_label?: string | undefined;
|
|
5
|
+
aria_labelledBy?: string | undefined;
|
|
6
|
+
aria_describedBy?: string | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
events: object & {
|
|
11
|
+
"element:removed": () => void;
|
|
12
|
+
"element:ready": (element: Element) => void;
|
|
13
|
+
} & {} & {
|
|
14
|
+
"aria:change:label": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
15
|
+
"aria:change:labelledBy": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
16
|
+
"aria:change:describedBy": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
17
|
+
} & {
|
|
18
|
+
"action:blur": (event: FocusEvent) => void;
|
|
19
|
+
"action:click": (event: MouseEvent) => void;
|
|
20
|
+
"action:focus": (event: FocusEvent) => void;
|
|
21
|
+
"action:press": (event: MouseEvent) => void;
|
|
22
|
+
} & {
|
|
23
|
+
"change:id": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
24
|
+
};
|
|
25
|
+
outputs: object & {} & {} & {} & {} & {};
|
|
26
|
+
}>, InputControlProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IInteractive } from '@soxa-ui/core';
|
|
2
|
+
import type { InteractiveDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseProps } from '../../types';
|
|
4
|
+
export type InteractiveEventProps = EventProps<typeof InteractiveDescriptor>;
|
|
5
|
+
export type InteractiveProps = UseProps<typeof InteractiveDescriptor, IInteractive, InteractiveEventProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './base.component';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InteractiveProps } from './base.component';
|
|
2
|
+
export declare function useSetupInteractive(props: InteractiveProps): import("../../adapter").TComponentBinding<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").IInteractive<import("@soxa-ui/core").IInteractiveProps, import("@soxa-ui/core").TInteractiveEvents>, {
|
|
3
|
+
props: object & {} & {};
|
|
4
|
+
events: object & {
|
|
5
|
+
"element:removed": () => void;
|
|
6
|
+
"element:ready": (element: Element) => void;
|
|
7
|
+
} & {};
|
|
8
|
+
outputs: object & {} & {};
|
|
9
|
+
}>, InteractiveProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ButtonProps } from '../button/base.component';
|
|
3
|
+
/**
|
|
4
|
+
* Строка элемента коллекции — деталь разметки ListBox.Item, опции Select,
|
|
5
|
+
* пунктов меню и тега. Пропсы и разметка — Button (`renderButton`), сборка
|
|
6
|
+
* своя — по `ItemRowDescriptor`: её экземпляр (`TItemRow`) роль и остановку
|
|
7
|
+
* Tab себе не пишет, их несёт набор `aria` элемента, который разметка кладёт
|
|
8
|
+
* на строку.
|
|
9
|
+
*
|
|
10
|
+
* Экземпляр создаёт это монтирование и отпускает его снятие: строка живёт,
|
|
11
|
+
* пока нарисована, и окно `Virtual` держит их столько, сколько показывает.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ItemRow(props: ButtonProps): ReactElement | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { renderButton } from "../button/Button.js";
|
|
3
|
+
import { useSetupItemRow } from "./setup.component.js";
|
|
4
|
+
//#region src/components/item-row/ItemRow.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Строка элемента коллекции — деталь разметки ListBox.Item, опции Select,
|
|
7
|
+
* пунктов меню и тега. Пропсы и разметка — Button (`renderButton`), сборка
|
|
8
|
+
* своя — по `ItemRowDescriptor`: её экземпляр (`TItemRow`) роль и остановку
|
|
9
|
+
* Tab себе не пишет, их несёт набор `aria` элемента, который разметка кладёт
|
|
10
|
+
* на строку.
|
|
11
|
+
*
|
|
12
|
+
* Экземпляр создаёт это монтирование и отпускает его снятие: строка живёт,
|
|
13
|
+
* пока нарисована, и окно `Virtual` держит их столько, сколько показывает.
|
|
14
|
+
*/
|
|
15
|
+
function ItemRow(props) {
|
|
16
|
+
return renderButton(useSetupItemRow(props), props);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ItemRow };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ButtonProps } from '../button/base.component';
|
|
2
|
+
export declare function useSetupItemRow(props: ButtonProps): import("../../adapter").TComponentBinding<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").IButton, {
|
|
3
|
+
props: object & {} & {} & {} & {
|
|
4
|
+
aria_label?: string | undefined;
|
|
5
|
+
aria_labelledBy?: string | undefined;
|
|
6
|
+
aria_describedBy?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: object & {
|
|
9
|
+
"element:removed": () => void;
|
|
10
|
+
"element:ready": (element: Element) => void;
|
|
11
|
+
} & {} & {
|
|
12
|
+
"aria:change:label": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
13
|
+
"aria:change:labelledBy": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
14
|
+
"aria:change:describedBy": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
15
|
+
} & {
|
|
16
|
+
"action:blur": (event: FocusEvent) => void;
|
|
17
|
+
"action:click": (event: MouseEvent) => void;
|
|
18
|
+
"action:focus": (event: FocusEvent) => void;
|
|
19
|
+
"action:press": (event: MouseEvent) => void;
|
|
20
|
+
};
|
|
21
|
+
outputs: object & {} & {} & {} & {};
|
|
22
|
+
}>, ButtonProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComponent } from "../../adapter/runtime/useComponent.js";
|
|
3
|
+
import { ItemRowDescriptor } from "@soxa-ui/setup";
|
|
4
|
+
//#region src/components/item-row/setup.component.ts
|
|
5
|
+
function useSetupItemRow(props) {
|
|
6
|
+
return useComponent((create) => create(ItemRowDescriptor(), {
|
|
7
|
+
ctrl: props.ctrl,
|
|
8
|
+
props
|
|
9
|
+
}), props);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { useSetupItemRow };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { LabelProps } from './base.component';
|
|
3
|
+
/**
|
|
4
|
+
* Label — подпись контрола: контрол вложен, внутри только `span`. docs/agents/a11y.md,
|
|
5
|
+
* «Видимое имя контрола — подпись `Label`, вложением».
|
|
6
|
+
*/
|
|
7
|
+
export declare function Label(props: LabelProps): ReactElement | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toRootProps } from "../../adapter/common/root.js";
|
|
3
|
+
import { renderSlot } from "../../adapter/common/slots.js";
|
|
4
|
+
import { useSetupLabel } from "./setup.component.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/label/Label.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Label — подпись контрола: контрол вложен, внутри только `span`. docs/agents/a11y.md,
|
|
9
|
+
* «Видимое имя контрола — подпись `Label`, вложением».
|
|
10
|
+
*/
|
|
11
|
+
function Label(props) {
|
|
12
|
+
const { ref, forwardProps, state } = useSetupLabel(props);
|
|
13
|
+
const { rendered, tag, text, aria, dataset, attrs } = state;
|
|
14
|
+
if (!rendered) return null;
|
|
15
|
+
return /* @__PURE__ */ jsxs(tag, {
|
|
16
|
+
...toRootProps(ref, state, [
|
|
17
|
+
attrs,
|
|
18
|
+
aria,
|
|
19
|
+
dataset
|
|
20
|
+
], forwardProps),
|
|
21
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
22
|
+
className: "so-label__control",
|
|
23
|
+
children: renderSlot(props.children)
|
|
24
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
25
|
+
className: "so-label__text",
|
|
26
|
+
children: renderSlot(props.content) ?? text
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Label };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ILabel } from '@soxa-ui/core';
|
|
2
|
+
import type { LabelDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseDomProps } from '../../types';
|
|
4
|
+
export type LabelEventProps = EventProps<typeof LabelDescriptor>;
|
|
5
|
+
export type LabelProps = UseDomProps<typeof LabelDescriptor, ILabel, LabelEventProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LabelProps } from './base.component';
|
|
2
|
+
export declare function useSetupLabel(props: LabelProps): import("../../adapter").TComponentBinding<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").ILabel, {
|
|
3
|
+
props: object & {} & {} & {};
|
|
4
|
+
events: object & {
|
|
5
|
+
"element:removed": () => void;
|
|
6
|
+
"element:ready": (element: Element) => void;
|
|
7
|
+
} & {} & {};
|
|
8
|
+
outputs: object & {} & {} & {};
|
|
9
|
+
}>, LabelProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComponent } from "../../adapter/runtime/useComponent.js";
|
|
3
|
+
import { LabelDescriptor } from "@soxa-ui/setup";
|
|
4
|
+
//#region src/components/label/setup.component.ts
|
|
5
|
+
function useSetupLabel(props) {
|
|
6
|
+
return useComponent((create) => create(LabelDescriptor(), {
|
|
7
|
+
ctrl: props.ctrl,
|
|
8
|
+
props
|
|
9
|
+
}), props);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { useSetupLabel };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ListBoxProps } from './base.component';
|
|
3
|
+
/**
|
|
4
|
+
* ListBox — список с выбором: корень-рамка, в ней шапка, узел списка с `aria` и остановкой Tab
|
|
5
|
+
* и подвал. docs/agents/patterns.md, «Граница переиспользования между похожими компонентами
|
|
6
|
+
* (критично)»; петля по секциям — docs/agents/collections.md, «Рисование — механизм коллекции».
|
|
7
|
+
*/
|
|
8
|
+
export declare function ListBox(props: ListBoxProps): ReactElement | null;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toAriaProps } from "../../adapter/common/aria.js";
|
|
3
|
+
import { toControlAttrs, toReactStyle, 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 { ListBoxItem } from "./item/Item.js";
|
|
7
|
+
import { ListBoxGroup } from "./group/Group.js";
|
|
8
|
+
import { useSetupListBox } from "./setup.component.js";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/list-box/ListBox.tsx
|
|
11
|
+
/** Элемент из данных со слотами списка или распорка окна на месте пропущенных. */
|
|
12
|
+
function drawEntry(props, entry) {
|
|
13
|
+
if (entry.kind === "filler") return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: "so-list-box__filler",
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
style: toReactStyle(entry.style)
|
|
17
|
+
}, entry.key);
|
|
18
|
+
return /* @__PURE__ */ jsx(ListBoxItem, {
|
|
19
|
+
ctrl: entry.item,
|
|
20
|
+
leading: renderSlot(props["item-leading"], { item: entry.item }),
|
|
21
|
+
trailing: renderSlot(props["item-trailing"], { item: entry.item }),
|
|
22
|
+
"indicator-icon": relaySlot(props["item-indicator-icon"], { item: entry.item }),
|
|
23
|
+
children: relaySlot(props.item, { item: entry.item })
|
|
24
|
+
}, entry.key);
|
|
25
|
+
}
|
|
26
|
+
/** Ключи записи (число), группы и разделителя секции не пересекаются. */
|
|
27
|
+
function drawSection(props, section, separated) {
|
|
28
|
+
const entries = section.entries.map((entry) => drawEntry(props, entry));
|
|
29
|
+
const separator = separated ? [/* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: "so-list-box__separator",
|
|
31
|
+
"aria-hidden": "true"
|
|
32
|
+
}, `separator:${section.key}`)] : [];
|
|
33
|
+
if (!section.group) return [...separator, ...entries];
|
|
34
|
+
return [...separator, /* @__PURE__ */ jsx(ListBoxGroup, {
|
|
35
|
+
label: section.group.label,
|
|
36
|
+
children: entries
|
|
37
|
+
}, section.key)];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* ListBox — список с выбором: корень-рамка, в ней шапка, узел списка с `aria` и остановкой Tab
|
|
41
|
+
* и подвал. docs/agents/patterns.md, «Граница переиспользования между похожими компонентами
|
|
42
|
+
* (критично)»; петля по секциям — docs/agents/collections.md, «Рисование — механизм коллекции».
|
|
43
|
+
*/
|
|
44
|
+
function ListBox(props) {
|
|
45
|
+
const { ref, forwardProps, state, layer } = useSetupListBox(props);
|
|
46
|
+
const { rendered, drawnSections, groupSeparators, shown, attrs, aria, dataset } = state;
|
|
47
|
+
if (!rendered) return null;
|
|
48
|
+
return /* @__PURE__ */ jsx("div", {
|
|
49
|
+
...toRootProps(ref, state, [attrs, dataset], toRootForward(forwardProps)),
|
|
50
|
+
children: /* @__PURE__ */ jsxs(Elevate, {
|
|
51
|
+
layer,
|
|
52
|
+
children: [
|
|
53
|
+
renderSlot(props.header),
|
|
54
|
+
/* @__PURE__ */ jsxs("div", {
|
|
55
|
+
className: "so-list-box__list",
|
|
56
|
+
tabIndex: 0,
|
|
57
|
+
...toAriaProps(aria),
|
|
58
|
+
...toControlAttrs(forwardProps),
|
|
59
|
+
children: [hasSlot(props.children) ? renderSlot(props.children) : drawnSections?.flatMap((section, index) => drawSection(props, section, groupSeparators === true && index > 0)), shown?.length === 0 ? renderSlot(props.empty) : null]
|
|
60
|
+
}),
|
|
61
|
+
renderSlot(props.footer)
|
|
62
|
+
]
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { ListBox };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { IListBox } from '@soxa-ui/core';
|
|
3
|
+
import type { ListBoxCollectionDescriptor, ListBoxDescriptor } from '@soxa-ui/setup';
|
|
4
|
+
import type { EventProps, TDomAttributes, UseDomProps } from '../../types';
|
|
5
|
+
/** Колбэки обоих контекстов списка — свой и фасада коллекции — пропсы одного компонента. */
|
|
6
|
+
export type ListBoxEventProps = EventProps<typeof ListBoxDescriptor> & EventProps<typeof ListBoxCollectionDescriptor>;
|
|
7
|
+
/** Атрибуты списка: класс и стиль — корню, остальное — узлу списка с `role="listbox"`. */
|
|
8
|
+
export type ListBoxAttributes = TDomAttributes<typeof ListBoxDescriptor, HTMLAttributes<HTMLElement>, ListBoxEventProps>;
|
|
9
|
+
export type ListBoxProps = UseDomProps<typeof ListBoxDescriptor, IListBox, ListBoxEventProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ListBoxGroupProps } from './base.component';
|
|
3
|
+
/**
|
|
4
|
+
* ListBoxGroup — элементы списка под общей подписью.
|
|
5
|
+
* docs/agents/patterns.md, «Граница переиспользования между похожими компонентами (критично)».
|
|
6
|
+
*/
|
|
7
|
+
export declare function ListBoxGroup(props: ListBoxGroupProps): ReactElement | null;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { Elevate } from "../../../adapter/elevator/Elevate.js";
|
|
6
|
+
import { useSetupListBoxGroup } from "./setup.component.js";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/list-box/group/Group.tsx
|
|
9
|
+
/**
|
|
10
|
+
* ListBoxGroup — элементы списка под общей подписью.
|
|
11
|
+
* docs/agents/patterns.md, «Граница переиспользования между похожими компонентами (критично)».
|
|
12
|
+
*/
|
|
13
|
+
function ListBoxGroup(props) {
|
|
14
|
+
const { ref, forwardProps, state, layer } = useSetupListBoxGroup(props);
|
|
15
|
+
const { rendered, tag, label, labelAria, attrs, aria, dataset } = state;
|
|
16
|
+
if (!rendered) return null;
|
|
17
|
+
return /* @__PURE__ */ jsxs(tag, {
|
|
18
|
+
...toRootProps(ref, state, [
|
|
19
|
+
attrs,
|
|
20
|
+
aria,
|
|
21
|
+
dataset
|
|
22
|
+
], forwardProps),
|
|
23
|
+
children: [label ? /* @__PURE__ */ jsx("div", {
|
|
24
|
+
className: "so-list-box-group__label",
|
|
25
|
+
...toAriaProps(labelAria),
|
|
26
|
+
children: label
|
|
27
|
+
}) : null, /* @__PURE__ */ jsx(Elevate, {
|
|
28
|
+
layer,
|
|
29
|
+
children: renderSlot(props.children)
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ListBoxGroup };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IItemGroup } from '@soxa-ui/core';
|
|
2
|
+
import type { ListBoxGroupDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseDomProps } from '../../../types';
|
|
4
|
+
export type ListBoxGroupEventProps = EventProps<typeof ListBoxGroupDescriptor>;
|
|
5
|
+
/** Пропсы группы: подпись — проп `label`, элементы — дети. */
|
|
6
|
+
export type ListBoxGroupProps = UseDomProps<typeof ListBoxGroupDescriptor, IItemGroup, ListBoxGroupEventProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ListBoxGroupProps } from './base.component';
|
|
2
|
+
export declare function useSetupListBoxGroup(props: ListBoxGroupProps): import("../../../adapter").TComponentBinding<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").IItemGroup<import("@soxa-ui/core").IItemGroupProps, import("@soxa-ui/core").TItemGroupEvents>, {
|
|
3
|
+
props: object & {} & {} & {};
|
|
4
|
+
events: object & {
|
|
5
|
+
"element:removed": () => void;
|
|
6
|
+
"element:ready": (element: Element) => void;
|
|
7
|
+
} & {} & {};
|
|
8
|
+
outputs: object & {} & {} & {};
|
|
9
|
+
}>, ListBoxGroupProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComponent } from "../../../adapter/runtime/useComponent.js";
|
|
3
|
+
import { ListBoxGroupDescriptor, TItemGroupExtension } from "@soxa-ui/setup";
|
|
4
|
+
//#region src/components/list-box/group/setup.component.ts
|
|
5
|
+
function useSetupListBoxGroup(props) {
|
|
6
|
+
return useComponent((create, elevator) => create(ListBoxGroupDescriptor(), {
|
|
7
|
+
ctrl: props.ctrl,
|
|
8
|
+
props
|
|
9
|
+
}).use(TItemGroupExtension, { elevator }), props);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { useSetupListBoxGroup };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ListBox as ListBoxComponent } from './ListBox';
|
|
2
|
+
import { ListBoxGroup } from './group';
|
|
3
|
+
export * from './base.component';
|
|
4
|
+
export * from './item';
|
|
5
|
+
export * from './group';
|
|
6
|
+
export declare const ListBox: typeof ListBoxComponent & {
|
|
7
|
+
Item: import("react").NamedExoticComponent<import("./item").ListBoxItemProps>;
|
|
8
|
+
Group: typeof ListBoxGroup;
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ListBoxItem } from "./item/Item.js";
|
|
2
|
+
import { ListBoxGroup } from "./group/Group.js";
|
|
3
|
+
import { ListBox as ListBox$1 } from "./ListBox.js";
|
|
4
|
+
import { withParts } from "@soxa-ui/setup";
|
|
5
|
+
//#region src/components/list-box/index.ts
|
|
6
|
+
var ListBox = withParts(ListBox$1, {
|
|
7
|
+
Item: ListBoxItem,
|
|
8
|
+
Group: ListBoxGroup
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ListBox };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ListBoxItemProps } from './base.component';
|
|
2
|
+
/**
|
|
3
|
+
* ListBoxItem — элемент списка: корень по `tag` и строка-опция — `ItemRow` на `div`
|
|
4
|
+
* (под этот тег написан `TListBoxItem._ariaTag`).
|
|
5
|
+
*/
|
|
6
|
+
export declare const ListBoxItem: import("react").NamedExoticComponent<ListBoxItemProps>;
|