@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,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useAdapter, useCollectionAdapter } from "../../../adapter/runtime/useAdapter.js";
|
|
3
|
+
import { useAdapterContext } from "../../../adapter/runtime/useAdapterContext.js";
|
|
4
|
+
import { useRootElement } from "../../../adapter/runtime/useRootElement.js";
|
|
5
|
+
import { MenuCollectionItemDescriptor, MenuSubmenuCollectionDescriptor, MenuSubmenuDescriptor, TCollectionExtension, TCollectionItemExtension } from "@soxa-ui/setup";
|
|
6
|
+
//#region src/components/menu/submenu/setup.component.ts
|
|
7
|
+
function useSetupMenuSubmenu(props) {
|
|
8
|
+
const { contexts: [adapter, item, collectionAdapter], layer } = useAdapterContext((create, elevator) => {
|
|
9
|
+
const adapter = create(MenuSubmenuDescriptor(), {
|
|
10
|
+
ctrl: props.ctrl,
|
|
11
|
+
props
|
|
12
|
+
});
|
|
13
|
+
return [
|
|
14
|
+
adapter,
|
|
15
|
+
create(MenuCollectionItemDescriptor(), { props }, { bundle: adapter.bundle }).use(TCollectionItemExtension, {
|
|
16
|
+
adapter,
|
|
17
|
+
elevator
|
|
18
|
+
}),
|
|
19
|
+
create(MenuSubmenuCollectionDescriptor(), {
|
|
20
|
+
props,
|
|
21
|
+
options: {
|
|
22
|
+
owner: adapter.instance,
|
|
23
|
+
engine: props.engine
|
|
24
|
+
}
|
|
25
|
+
}, { bundle: adapter.bundle }).use(TCollectionExtension, { elevator })
|
|
26
|
+
];
|
|
27
|
+
});
|
|
28
|
+
const binding = useCollectionAdapter(useCollectionAdapter(useAdapter(adapter, props), item, props), collectionAdapter, props);
|
|
29
|
+
return {
|
|
30
|
+
...binding,
|
|
31
|
+
context: item.instance.context,
|
|
32
|
+
rootElement: useRootElement(binding.root),
|
|
33
|
+
layer
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { useSetupMenuSubmenu };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { NumberInputProps } from './base.component';
|
|
3
|
+
/** NumberInput — поле числа с кнопками шага: docs/agents/patterns.md, «Готовые паттерны». */
|
|
4
|
+
export declare function NumberInput(props: NumberInputProps): ReactElement | null;
|
|
@@ -0,0 +1,108 @@
|
|
|
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 { useSetupNumberInput } from "./setup.component.js";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
//#region src/components/number-input/NumberInput.tsx
|
|
14
|
+
var CloseMark = roleIcon("close");
|
|
15
|
+
var MinusMark = roleIcon("minus");
|
|
16
|
+
var PlusMark = roleIcon("plus");
|
|
17
|
+
/** NumberInput — поле числа с кнопками шага: docs/agents/patterns.md, «Готовые паттерны». */
|
|
18
|
+
function NumberInput(props) {
|
|
19
|
+
const { ctrl, ref, forwardProps, state, layer } = useSetupNumberInput(props);
|
|
20
|
+
const clear = useClickAction((event) => {
|
|
21
|
+
event.stopPropagation();
|
|
22
|
+
ctrl.clear();
|
|
23
|
+
});
|
|
24
|
+
const { rendered, tag, attrs, aria, dataset, id, value, text, name, disabled, readonly, required, placeholder, size, clearable, clearAria, inputAttrs, inputAria, decrementDisabled, incrementDisabled, decrementAria, incrementAria, decrementDataset, incrementDataset } = state;
|
|
25
|
+
if (!rendered) return null;
|
|
26
|
+
const Tag = tag;
|
|
27
|
+
const trailing = clearable === true || hasSlot(props.clear) || hasSlot(props.trailing);
|
|
28
|
+
return /* @__PURE__ */ jsxs(Tag, {
|
|
29
|
+
...toRootProps(ref, state, [attrs, dataset], toRootForward(forwardProps)),
|
|
30
|
+
children: [
|
|
31
|
+
hasSlot(props.leading) ? /* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: "so-number-input__leading",
|
|
33
|
+
children: elevated(layer, renderSlot(props.leading, { ctrl }))
|
|
34
|
+
}) : null,
|
|
35
|
+
/* @__PURE__ */ jsx(NativeInput, {
|
|
36
|
+
type: "text",
|
|
37
|
+
className: "so-number-input__input",
|
|
38
|
+
id,
|
|
39
|
+
placeholder,
|
|
40
|
+
disabled,
|
|
41
|
+
readOnly: readonly,
|
|
42
|
+
required,
|
|
43
|
+
autoComplete: "off",
|
|
44
|
+
spellCheck: false,
|
|
45
|
+
...toAriaProps(inputAttrs),
|
|
46
|
+
...toAriaProps(aria),
|
|
47
|
+
...toAriaProps(inputAria),
|
|
48
|
+
...toControlAttrs(forwardProps),
|
|
49
|
+
live: { value: text }
|
|
50
|
+
}),
|
|
51
|
+
trailing ? /* @__PURE__ */ jsxs("div", {
|
|
52
|
+
className: "so-number-input__trailing",
|
|
53
|
+
children: [elevated(layer, renderSlot(props.clear, { clear: ctrl.clear })) ?? (clearable === true ? /* @__PURE__ */ jsx(Button, {
|
|
54
|
+
embedded: "number-input.clear",
|
|
55
|
+
type: "button",
|
|
56
|
+
className: "so-number-input__clear",
|
|
57
|
+
size,
|
|
58
|
+
disabled,
|
|
59
|
+
...toAriaProps(clearAria),
|
|
60
|
+
ref: clear,
|
|
61
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
62
|
+
embedded: "number-input.clear-icon",
|
|
63
|
+
tag: CloseMark,
|
|
64
|
+
size
|
|
65
|
+
})
|
|
66
|
+
}) : null), elevated(layer, renderSlot(props.trailing, { ctrl }))]
|
|
67
|
+
}) : null,
|
|
68
|
+
/* @__PURE__ */ jsxs("div", {
|
|
69
|
+
className: "so-number-input__stepper",
|
|
70
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
71
|
+
embedded: "number-input.decrement",
|
|
72
|
+
type: "button",
|
|
73
|
+
className: "so-number-input__decrement",
|
|
74
|
+
size,
|
|
75
|
+
disabled: decrementDisabled,
|
|
76
|
+
...toAriaProps(decrementAria),
|
|
77
|
+
...toAriaProps(decrementDataset),
|
|
78
|
+
children: elevated(layer, renderSlot(props["decrement-icon"])) ?? /* @__PURE__ */ jsx(Icon, {
|
|
79
|
+
embedded: "number-input.decrement-icon",
|
|
80
|
+
tag: MinusMark,
|
|
81
|
+
size
|
|
82
|
+
})
|
|
83
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
84
|
+
embedded: "number-input.increment",
|
|
85
|
+
type: "button",
|
|
86
|
+
className: "so-number-input__increment",
|
|
87
|
+
size,
|
|
88
|
+
disabled: incrementDisabled,
|
|
89
|
+
...toAriaProps(incrementAria),
|
|
90
|
+
...toAriaProps(incrementDataset),
|
|
91
|
+
children: elevated(layer, renderSlot(props["increment-icon"])) ?? /* @__PURE__ */ jsx(Icon, {
|
|
92
|
+
embedded: "number-input.increment-icon",
|
|
93
|
+
tag: PlusMark,
|
|
94
|
+
size
|
|
95
|
+
})
|
|
96
|
+
})]
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ jsx("input", {
|
|
99
|
+
type: "hidden",
|
|
100
|
+
name,
|
|
101
|
+
value: value === void 0 ? "" : String(value),
|
|
102
|
+
disabled
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { NumberInput };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { INumberInput } from '@soxa-ui/core';
|
|
2
|
+
import type { NumberInputDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, TDomAttributes, TFieldAttributes, UseDomProps } from '../../types';
|
|
4
|
+
export type NumberInputEventProps = EventProps<typeof NumberInputDescriptor>;
|
|
5
|
+
/** Атрибуты NumberInput: класс и стиль — корню, остальное — вводу `<input>`. */
|
|
6
|
+
export type NumberInputAttributes = TDomAttributes<typeof NumberInputDescriptor, TFieldAttributes>;
|
|
7
|
+
export type NumberInputProps = UseDomProps<typeof NumberInputDescriptor, INumberInput, NumberInputEventProps, TFieldAttributes>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { NumberInputProps } from './base.component';
|
|
2
|
+
/** Поле формы `Field` над полем: ошибку и ссылки на части поле берёт от него лифтом. */
|
|
3
|
+
export declare function useSetupNumberInput(props: NumberInputProps): import("../../adapter").TComponentBinding<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").INumberInput, {
|
|
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
|
+
}>, NumberInputProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComponent } from "../../adapter/runtime/useComponent.js";
|
|
3
|
+
import { NumberInputDescriptor, TFieldControlExtension } from "@soxa-ui/setup";
|
|
4
|
+
//#region src/components/number-input/setup.component.ts
|
|
5
|
+
/** Поле формы `Field` над полем: ошибку и ссылки на части поле берёт от него лифтом. */
|
|
6
|
+
function useSetupNumberInput(props) {
|
|
7
|
+
return useComponent((create, elevator) => create(NumberInputDescriptor(), {
|
|
8
|
+
ctrl: props.ctrl,
|
|
9
|
+
props
|
|
10
|
+
}).use(TFieldControlExtension, { elevator }), props);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { useSetupNumberInput };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { PaginationProps } from './base.component';
|
|
3
|
+
/**
|
|
4
|
+
* Pagination — стрелка «назад», список страниц и пропусков окна, стрелка «вперёд».
|
|
5
|
+
* docs/agents/patterns.md, «Готовые паттерны» (Pagination).
|
|
6
|
+
*/
|
|
7
|
+
export declare function Pagination(props: PaginationProps): ReactElement | null;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toAriaProps } from "../../adapter/common/aria.js";
|
|
3
|
+
import { toRootProps } from "../../adapter/common/root.js";
|
|
4
|
+
import { relaySlot, renderSlot } from "../../adapter/common/slots.js";
|
|
5
|
+
import { roleIcon } from "../../adapter/common/icon.js";
|
|
6
|
+
import { useClickAction } from "../../adapter/runtime/useClickAction.js";
|
|
7
|
+
import { Elevate } from "../../adapter/elevator/Elevate.js";
|
|
8
|
+
import { Button } from "../button/Button.js";
|
|
9
|
+
import { Icon } from "../icon/Icon.js";
|
|
10
|
+
import { PaginationItem } from "./item/Item.js";
|
|
11
|
+
import { useSetupPagination } from "./setup.component.js";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
//#region src/components/pagination/Pagination.tsx
|
|
14
|
+
/** Одна иконка на обе стрелки: роли «влево» нет, стрелку к началу строки зеркалит тема. */
|
|
15
|
+
var Arrow = roleIcon("arrowRight");
|
|
16
|
+
/**
|
|
17
|
+
* Pagination — стрелка «назад», список страниц и пропусков окна, стрелка «вперёд».
|
|
18
|
+
* docs/agents/patterns.md, «Готовые паттерны» (Pagination).
|
|
19
|
+
*/
|
|
20
|
+
function Pagination(props) {
|
|
21
|
+
const { ctrl, ref, forwardProps, state, layer } = useSetupPagination(props);
|
|
22
|
+
const prev = useClickAction(() => ctrl.prev());
|
|
23
|
+
const next = useClickAction(() => ctrl.next());
|
|
24
|
+
const { rendered, tag, attrs, aria, dataset, size, variant, prevDisabled, nextDisabled, prevAria, nextAria, cells } = state;
|
|
25
|
+
if (!rendered) return null;
|
|
26
|
+
return /* @__PURE__ */ jsx(tag, {
|
|
27
|
+
...toRootProps(ref, state, [
|
|
28
|
+
attrs,
|
|
29
|
+
aria,
|
|
30
|
+
dataset
|
|
31
|
+
], forwardProps),
|
|
32
|
+
children: /* @__PURE__ */ jsxs(Elevate, {
|
|
33
|
+
layer,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx(Button, {
|
|
36
|
+
embedded: "pagination.prev",
|
|
37
|
+
type: "button",
|
|
38
|
+
className: "so-pagination__prev",
|
|
39
|
+
size,
|
|
40
|
+
variant,
|
|
41
|
+
disabled: prevDisabled,
|
|
42
|
+
ref: prev,
|
|
43
|
+
...toAriaProps(prevAria),
|
|
44
|
+
children: renderSlot(props["prev-icon"]) ?? /* @__PURE__ */ jsx(Icon, {
|
|
45
|
+
embedded: "pagination.prev-icon",
|
|
46
|
+
tag: Arrow,
|
|
47
|
+
size
|
|
48
|
+
})
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ jsx("ol", {
|
|
51
|
+
className: "so-pagination__list",
|
|
52
|
+
children: cells?.map((cell) => cell.kind === "item" ? /* @__PURE__ */ jsx(PaginationItem, {
|
|
53
|
+
ctrl: cell.item,
|
|
54
|
+
children: relaySlot(props.item, { item: cell.item })
|
|
55
|
+
}, cell.key) : /* @__PURE__ */ jsx("li", {
|
|
56
|
+
className: "so-pagination__ellipsis",
|
|
57
|
+
children: "…"
|
|
58
|
+
}, cell.key))
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsx(Button, {
|
|
61
|
+
embedded: "pagination.next",
|
|
62
|
+
type: "button",
|
|
63
|
+
className: "so-pagination__next",
|
|
64
|
+
size,
|
|
65
|
+
variant,
|
|
66
|
+
disabled: nextDisabled,
|
|
67
|
+
ref: next,
|
|
68
|
+
...toAriaProps(nextAria),
|
|
69
|
+
children: renderSlot(props["next-icon"]) ?? /* @__PURE__ */ jsx(Icon, {
|
|
70
|
+
embedded: "pagination.next-icon",
|
|
71
|
+
tag: Arrow,
|
|
72
|
+
size
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { Pagination };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IPagination } from '@soxa-ui/core';
|
|
2
|
+
import type { PaginationCollectionDescriptor, PaginationDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseDomProps } from '../../types';
|
|
4
|
+
/** Колбэки обоих контекстов пагинации — свой и фасада коллекции — пропсы одного компонента. */
|
|
5
|
+
export type PaginationEventProps = EventProps<typeof PaginationDescriptor> & EventProps<typeof PaginationCollectionDescriptor>;
|
|
6
|
+
export type PaginationProps = UseDomProps<typeof PaginationDescriptor, IPagination, PaginationEventProps>;
|
|
@@ -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 { useClickAction } from "../../../adapter/runtime/useClickAction.js";
|
|
6
|
+
import { withRenderBoundary } from "../../../adapter/runtime/withRenderBoundary.js";
|
|
7
|
+
import { Button } from "../../button/Button.js";
|
|
8
|
+
import { useSetupPaginationItem } from "./setup.component.js";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/pagination/item/Item.tsx
|
|
11
|
+
/** PaginationItem — страница пагинации, внутренняя часть: её рисует только `Pagination`. */
|
|
12
|
+
var PaginationItem = withRenderBoundary(function PaginationItem(props) {
|
|
13
|
+
const { ref, forwardProps, state, context } = useSetupPaginationItem(props);
|
|
14
|
+
const activate = useClickAction(() => {
|
|
15
|
+
if (context) context.adapters.activation.active = true;
|
|
16
|
+
});
|
|
17
|
+
const { rendered, tag, text, disabled, size, variant, aria, dataset, attrs } = state;
|
|
18
|
+
if (!rendered) return null;
|
|
19
|
+
return /* @__PURE__ */ jsx(tag, {
|
|
20
|
+
...toRootProps(ref, state, [attrs, dataset], forwardProps),
|
|
21
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
22
|
+
embedded: "pagination.page",
|
|
23
|
+
type: "button",
|
|
24
|
+
disabled,
|
|
25
|
+
size,
|
|
26
|
+
variant,
|
|
27
|
+
ref: activate,
|
|
28
|
+
...toAriaProps(aria),
|
|
29
|
+
children: renderSlot(props.children, { text: text ?? "" }) ?? text
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
export { PaginationItem };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IPaginationItem } from '@soxa-ui/core';
|
|
2
|
+
import type { PaginationCollectionItemDescriptor, PaginationItemDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseDomProps } from '../../../types';
|
|
4
|
+
export type PaginationItemEventProps = EventProps<typeof PaginationItemDescriptor> & EventProps<typeof PaginationCollectionItemDescriptor>;
|
|
5
|
+
export type PaginationItemProps = UseDomProps<typeof PaginationItemDescriptor, IPaginationItem, PaginationItemEventProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PaginationItemProps } from './base.component';
|
|
2
|
+
export declare function useSetupPaginationItem(props: PaginationItemProps): {
|
|
3
|
+
context: import("@soxa-ui/core").TItemContext<import("@soxa-ui/core").IPaginationItem, import("@soxa-ui/core").TPaginationCollectionExtensions> | undefined;
|
|
4
|
+
ref: (el: Element | null) => void;
|
|
5
|
+
plugins: import("@soxa-ui/plugins").IPluginBundle | null;
|
|
6
|
+
ctrl: object & import("@soxa-ui/core").IPaginationItem;
|
|
7
|
+
root: import("../../../adapter").TRootSource;
|
|
8
|
+
forwardProps: Partial<PaginationItemProps>;
|
|
9
|
+
bindRef: (el: Element | null) => void;
|
|
10
|
+
state: import("@soxa-ui/setup").TInstanceState<object & import("@soxa-ui/core").IPaginationItem> & import("@soxa-ui/setup").TInstanceState<object & {} & {}> & import("@soxa-ui/setup").TInstanceState<object & {} & {}> & import("@soxa-ui/setup").TInstanceState<object & import("@soxa-ui/core").TPaginationItemCollectionFacade> & 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 { PaginationCollectionItemDescriptor, PaginationItemDescriptor, TCollectionItemExtension } from "@soxa-ui/setup";
|
|
5
|
+
//#region src/components/pagination/item/setup.component.ts
|
|
6
|
+
function useSetupPaginationItem(props) {
|
|
7
|
+
const { contexts: [adapter, item] } = useAdapterContext((create, elevator) => {
|
|
8
|
+
const adapter = create(PaginationItemDescriptor(), {
|
|
9
|
+
ctrl: props.ctrl,
|
|
10
|
+
props
|
|
11
|
+
});
|
|
12
|
+
return [adapter, create(PaginationCollectionItemDescriptor(), { 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 { useSetupPaginationItem };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PaginationProps } from './base.component';
|
|
2
|
+
export declare function useSetupPagination(props: PaginationProps): {
|
|
3
|
+
layer: import("../../adapter").TElevatorLayer;
|
|
4
|
+
ref: (el: Element | null) => void;
|
|
5
|
+
plugins: import("@soxa-ui/plugins").IPluginBundle | null;
|
|
6
|
+
ctrl: object & import("@soxa-ui/core").IPagination;
|
|
7
|
+
root: import("../../adapter").TRootSource;
|
|
8
|
+
forwardProps: Partial<PaginationProps>;
|
|
9
|
+
bindRef: (el: Element | null) => void;
|
|
10
|
+
state: import("@soxa-ui/setup").TInstanceState<object & import("@soxa-ui/core").IPagination> & import("@soxa-ui/setup").TInstanceState<object & {} & {} & {} & {
|
|
11
|
+
aria_label?: string | undefined;
|
|
12
|
+
aria_labelledBy?: string | undefined;
|
|
13
|
+
aria_describedBy?: string | undefined;
|
|
14
|
+
} & {} & {} & {} & {} & {} & {}> & import("@soxa-ui/setup").TInstanceState<object & {} & {} & {} & {} & {} & {} & {} & {} & {} & {}> & import("@soxa-ui/setup").TInstanceState<object & import("@soxa-ui/core").TPaginationCollectionFacade> & object;
|
|
15
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useAdapter, useCollectionAdapter } from "../../adapter/runtime/useAdapter.js";
|
|
3
|
+
import { useAdapterContext } from "../../adapter/runtime/useAdapterContext.js";
|
|
4
|
+
import { PaginationCollectionDescriptor, PaginationDescriptor, TCollectionExtension } from "@soxa-ui/setup";
|
|
5
|
+
//#region src/components/pagination/setup.component.ts
|
|
6
|
+
function useSetupPagination(props) {
|
|
7
|
+
const { contexts: [adapter, collectionAdapter], layer } = useAdapterContext((create, elevator) => {
|
|
8
|
+
const adapter = create(PaginationDescriptor(), {
|
|
9
|
+
ctrl: props.ctrl,
|
|
10
|
+
props
|
|
11
|
+
});
|
|
12
|
+
return [adapter, create(PaginationCollectionDescriptor(), {
|
|
13
|
+
props,
|
|
14
|
+
options: {
|
|
15
|
+
owner: adapter.instance,
|
|
16
|
+
engine: props.engine
|
|
17
|
+
}
|
|
18
|
+
}, { bundle: adapter.bundle }).use(TCollectionExtension, { elevator })];
|
|
19
|
+
});
|
|
20
|
+
return {
|
|
21
|
+
...useCollectionAdapter(useAdapter(adapter, props), collectionAdapter, props),
|
|
22
|
+
layer
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { useSetupPagination };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { PopoverProps } from './base.component';
|
|
3
|
+
/**
|
|
4
|
+
* Popover — панель у триггера (немодальный диалог). Панель — Frame, якорь —
|
|
5
|
+
* корень значением: AGENTS.md (React), «Корень и `ref` потребителя».
|
|
6
|
+
*/
|
|
7
|
+
export declare function Popover(props: PopoverProps): ReactElement | null;
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { useClickAction } from "../../adapter/runtime/useClickAction.js";
|
|
7
|
+
import { Button } from "../button/Button.js";
|
|
8
|
+
import { Icon } from "../icon/Icon.js";
|
|
9
|
+
import { Frame } from "../frame/Frame.js";
|
|
10
|
+
import { useSetupPopover } from "./setup.component.js";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/popover/Popover.tsx
|
|
13
|
+
var CloseIcon = roleIcon("close");
|
|
14
|
+
/**
|
|
15
|
+
* Popover — панель у триггера (немодальный диалог). Панель — Frame, якорь —
|
|
16
|
+
* корень значением: AGENTS.md (React), «Корень и `ref` потребителя».
|
|
17
|
+
*/
|
|
18
|
+
function Popover(props) {
|
|
19
|
+
const { ctrl, ref, forwardProps, state, rootElement } = useSetupPopover(props);
|
|
20
|
+
const close = useClickAction(() => {
|
|
21
|
+
ctrl.open = false;
|
|
22
|
+
});
|
|
23
|
+
const { rendered, tag, attrs, aria, dataset, open, contained, placement, closable, closeAria, triggerAria, triggerDataset, panelDataset, contentRendered, handleRendered, dismiss_ownerAttribute } = state;
|
|
24
|
+
if (!rendered) return null;
|
|
25
|
+
return /* @__PURE__ */ jsxs(tag, {
|
|
26
|
+
...toRootProps(ref, state, [attrs, dataset], forwardProps),
|
|
27
|
+
children: [renderSlot(props.trigger, {
|
|
28
|
+
triggerAria: triggerAria ?? {},
|
|
29
|
+
triggerDataset: triggerDataset ?? {}
|
|
30
|
+
}), /* @__PURE__ */ jsxs(Frame, {
|
|
31
|
+
embedded: "popover.frame",
|
|
32
|
+
className: "so-popover__panel",
|
|
33
|
+
tabIndex: -1,
|
|
34
|
+
visible: state.visible && open,
|
|
35
|
+
contained,
|
|
36
|
+
strategy: "fixed",
|
|
37
|
+
anchor_anchor: rootElement,
|
|
38
|
+
anchor_placement: placement,
|
|
39
|
+
anchor_offset: 8,
|
|
40
|
+
...toAriaProps(aria),
|
|
41
|
+
...toAriaProps(panelDataset),
|
|
42
|
+
...toAriaProps(dismiss_ownerAttribute),
|
|
43
|
+
children: [
|
|
44
|
+
handleRendered ? /* @__PURE__ */ jsx("div", {
|
|
45
|
+
className: "so-popover__handle",
|
|
46
|
+
"aria-hidden": "true"
|
|
47
|
+
}) : null,
|
|
48
|
+
/* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: "so-popover__content",
|
|
50
|
+
children: contentRendered ? renderSlot(props.children) : null
|
|
51
|
+
}),
|
|
52
|
+
closable ? /* @__PURE__ */ jsx(Button, {
|
|
53
|
+
embedded: "popover.close",
|
|
54
|
+
type: "button",
|
|
55
|
+
className: "so-popover__close",
|
|
56
|
+
ref: close,
|
|
57
|
+
...toAriaProps(closeAria),
|
|
58
|
+
children: renderSlot(props["close-icon"]) ?? /* @__PURE__ */ jsx(Icon, {
|
|
59
|
+
embedded: "popover.close-icon",
|
|
60
|
+
tag: CloseIcon
|
|
61
|
+
})
|
|
62
|
+
}) : null
|
|
63
|
+
]
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { Popover };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IPopover } from '@soxa-ui/core';
|
|
2
|
+
import type { PopoverDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseDomProps } from '../../types';
|
|
4
|
+
export type PopoverEventProps = EventProps<typeof PopoverDescriptor>;
|
|
5
|
+
/** Пропсы Popover: атрибуты — корню, обёртке триггера. */
|
|
6
|
+
export type PopoverProps = UseDomProps<typeof PopoverDescriptor, IPopover, PopoverEventProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PopoverProps } from './base.component';
|
|
2
|
+
export declare function useSetupPopover(props: PopoverProps): {
|
|
3
|
+
rootElement: Element | null;
|
|
4
|
+
ctrl: object & import("@soxa-ui/core").IPopover;
|
|
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<PopoverProps>;
|
|
10
|
+
state: import("@soxa-ui/setup").TAdapterState<import("@soxa-ui/setup").TContextContract<import("@soxa-ui/core").IPopover, {
|
|
11
|
+
props: object & {} & {} & {} & {
|
|
12
|
+
aria_label?: string | undefined;
|
|
13
|
+
aria_labelledBy?: string | undefined;
|
|
14
|
+
aria_describedBy?: string | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
dismiss_enabled?: boolean | undefined;
|
|
17
|
+
} & {} & {} & {} & {};
|
|
18
|
+
events: object & {
|
|
19
|
+
"element:removed": () => void;
|
|
20
|
+
"element:ready": (element: Element) => void;
|
|
21
|
+
} & {} & {
|
|
22
|
+
"dismiss:change:enabled": (payload: import("@soxa-ui/core").TValuePayload<boolean>) => void;
|
|
23
|
+
"dismiss:dismiss": (event: MouseEvent | FocusEvent) => void;
|
|
24
|
+
} & {
|
|
25
|
+
"aria:change:label": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
26
|
+
"aria:change:labelledBy": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
27
|
+
"aria:change:describedBy": (payload: import("@soxa-ui/core").TValuePayload<string | undefined>) => void;
|
|
28
|
+
} & {} & {} & {} & {} & {};
|
|
29
|
+
outputs: object & {} & {} & {} & {} & {
|
|
30
|
+
readonly dismiss_ownerAttribute: Record<string, string>;
|
|
31
|
+
} & {} & {} & {} & {};
|
|
32
|
+
}>>;
|
|
33
|
+
layer: import("../../adapter").TElevatorLayer;
|
|
34
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComponent } from "../../adapter/runtime/useComponent.js";
|
|
3
|
+
import { useRootElement } from "../../adapter/runtime/useRootElement.js";
|
|
4
|
+
import { PopoverDescriptor } from "@soxa-ui/setup";
|
|
5
|
+
//#region src/components/popover/setup.component.ts
|
|
6
|
+
function useSetupPopover(props) {
|
|
7
|
+
const binding = useComponent((create) => create(PopoverDescriptor(), {
|
|
8
|
+
ctrl: props.ctrl,
|
|
9
|
+
props
|
|
10
|
+
}), props);
|
|
11
|
+
return {
|
|
12
|
+
...binding,
|
|
13
|
+
rootElement: useRootElement(binding.root)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { useSetupPopover };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ProgressLinearProps } from './base.component';
|
|
3
|
+
/**
|
|
4
|
+
* ProgressLinear — индикатор выполнения линией: корень — дорожка, в нём заливка.
|
|
5
|
+
* Всё `span`: полосу кладут в `Button` и `Label`, где разрешена только строчная разметка.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ProgressLinear(props: ProgressLinearProps): ReactElement | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toRootProps } from "../../adapter/common/root.js";
|
|
3
|
+
import { useSetupProgressLinear } from "./setup.component.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/progress-linear/ProgressLinear.tsx
|
|
6
|
+
/**
|
|
7
|
+
* ProgressLinear — индикатор выполнения линией: корень — дорожка, в нём заливка.
|
|
8
|
+
* Всё `span`: полосу кладут в `Button` и `Label`, где разрешена только строчная разметка.
|
|
9
|
+
*/
|
|
10
|
+
function ProgressLinear(props) {
|
|
11
|
+
const { ref, forwardProps, state } = useSetupProgressLinear(props);
|
|
12
|
+
const { rendered, tag, aria, dataset, attrs, percentStyle } = state;
|
|
13
|
+
if (!rendered) return null;
|
|
14
|
+
return /* @__PURE__ */ jsx(tag, {
|
|
15
|
+
...toRootProps(ref, state, [
|
|
16
|
+
attrs,
|
|
17
|
+
aria,
|
|
18
|
+
dataset
|
|
19
|
+
], forwardProps, percentStyle),
|
|
20
|
+
children: /* @__PURE__ */ jsx("span", { className: "so-progress-linear__range" })
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ProgressLinear };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IProgressLinear } from '@soxa-ui/core';
|
|
2
|
+
import type { ProgressLinearDescriptor } from '@soxa-ui/setup';
|
|
3
|
+
import type { EventProps, UseDomProps } from '../../types';
|
|
4
|
+
export type ProgressLinearEventProps = EventProps<typeof ProgressLinearDescriptor>;
|
|
5
|
+
export type ProgressLinearProps = UseDomProps<typeof ProgressLinearDescriptor, IProgressLinear, ProgressLinearEventProps>;
|