@soxa-ui/vue 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 +152 -2
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/adapter/common/createVueAdapterContext.d.ts +36 -0
- package/dist/adapter/common/createVueAdapterContext.js +45 -0
- package/dist/adapter/common/icon.d.ts +2 -0
- package/dist/adapter/common/icon.js +45 -0
- package/dist/adapter/common/index.d.ts +6 -0
- package/dist/adapter/common/naming.d.ts +12 -0
- package/dist/adapter/common/naming.js +8 -0
- package/dist/adapter/common/profile.d.ts +13 -0
- package/dist/adapter/common/profile.js +8 -0
- package/dist/adapter/common/useSplitAttrs.d.ts +11 -0
- package/dist/adapter/common/useSplitAttrs.js +24 -0
- package/dist/adapter/elevator/elevator.class.d.ts +12 -0
- package/dist/adapter/elevator/elevator.class.js +20 -0
- package/dist/adapter/elevator/factory.d.ts +2 -0
- package/dist/adapter/elevator/factory.js +5 -0
- package/dist/adapter/elevator/index.d.ts +2 -0
- package/dist/adapter/index.d.ts +6 -0
- package/dist/adapter/locale/LocaleProvider.d.ts +38 -0
- package/dist/adapter/locale/LocaleProvider.js +41 -0
- package/dist/adapter/locale/index.d.ts +2 -0
- package/dist/adapter/locale/key.d.ts +7 -0
- package/dist/adapter/locale/key.js +8 -0
- package/dist/adapter/runtime/exposeRoot.d.ts +21 -0
- package/dist/adapter/runtime/exposeRoot.js +25 -0
- package/dist/adapter/runtime/index.d.ts +4 -0
- package/dist/adapter/runtime/useAdapter.d.ts +69 -0
- package/dist/adapter/runtime/useAdapter.js +117 -0
- package/dist/adapter/runtime/useCollectionAdapter.d.ts +34 -0
- package/dist/adapter/runtime/useCollectionAdapter.js +25 -0
- package/dist/adapter/runtime/view.d.ts +53 -0
- package/dist/adapter/runtime/view.js +103 -0
- package/dist/adapter/static/index.d.ts +4 -0
- package/dist/adapter/static/useEmits.d.ts +13 -0
- package/dist/adapter/static/useEmits.js +19 -0
- package/dist/adapter/static/useExpose.d.ts +69 -0
- package/dist/adapter/static/useExpose.js +18 -0
- package/dist/adapter/static/useProps.d.ts +8 -0
- package/dist/adapter/static/useProps.js +16 -0
- package/dist/adapter/toasts/index.d.ts +3 -0
- package/dist/adapter/toasts/render.d.ts +8 -0
- package/dist/adapter/toasts/render.js +12 -0
- package/dist/adapter/toasts/types.d.ts +11 -0
- package/dist/adapter/toasts/useToasts.d.ts +17 -0
- package/dist/adapter/toasts/useToasts.js +24 -0
- package/dist/components/accordion/Accordion.js +37 -0
- package/dist/components/accordion/Accordion.vue.d.ts +256 -0
- package/dist/components/accordion/Accordion.vue_vue_type_script_lang.js +9 -0
- package/dist/components/accordion/base.component.d.ts +12 -0
- package/dist/components/accordion/base.component.js +16 -0
- package/dist/components/accordion/index.d.ts +734 -0
- package/dist/components/accordion/index.js +9 -0
- package/dist/components/accordion/item/Item.js +69 -0
- package/dist/components/accordion/item/Item.vue.d.ts +188 -0
- package/dist/components/accordion/item/Item.vue_vue_type_script_lang.js +13 -0
- package/dist/components/accordion/item/base.component.d.ts +12 -0
- package/dist/components/accordion/item/base.component.js +16 -0
- package/dist/components/accordion/item/index.d.ts +5 -0
- package/dist/components/accordion/item/index.js +6 -0
- package/dist/components/accordion/item/setup.component.d.ts +47 -0
- package/dist/components/accordion/item/setup.component.js +36 -0
- package/dist/components/accordion/setup.component.d.ts +35 -0
- package/dist/components/accordion/setup.component.js +32 -0
- package/dist/components/button/Button.js +26 -0
- package/dist/components/button/Button.vue.d.ts +61 -0
- package/dist/components/button/Button.vue_vue_type_script_lang.js +5 -0
- package/dist/components/button/base.component.d.ts +12 -0
- package/dist/components/button/base.component.js +13 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/button/index.js +6 -0
- package/dist/components/button/setup.component.d.ts +33 -0
- package/dist/components/button/setup.component.js +20 -0
- package/dist/components/calendar/Calendar.js +174 -0
- package/dist/components/calendar/Calendar.vue.d.ts +1366 -0
- package/dist/components/calendar/Calendar.vue_vue_type_script_lang.js +19 -0
- package/dist/components/calendar/base.component.d.ts +12 -0
- package/dist/components/calendar/base.component.js +16 -0
- package/dist/components/calendar/index.d.ts +2801 -0
- package/dist/components/calendar/index.js +9 -0
- package/dist/components/calendar/item/Item.js +22 -0
- package/dist/components/calendar/item/Item.vue.d.ts +32 -0
- package/dist/components/calendar/item/Item.vue_vue_type_script_lang.js +5 -0
- package/dist/components/calendar/item/base.component.d.ts +12 -0
- package/dist/components/calendar/item/base.component.js +16 -0
- package/dist/components/calendar/item/index.d.ts +5 -0
- package/dist/components/calendar/item/index.js +6 -0
- package/dist/components/calendar/item/setup.component.d.ts +28 -0
- package/dist/components/calendar/item/setup.component.js +35 -0
- package/dist/components/calendar/setup.component.d.ts +50 -0
- package/dist/components/calendar/setup.component.js +47 -0
- package/dist/components/check-box/CheckBox.js +50 -0
- package/dist/components/check-box/CheckBox.vue.d.ts +134 -0
- package/dist/components/check-box/CheckBox.vue_vue_type_script_lang.js +5 -0
- package/dist/components/check-box/base.component.d.ts +64 -0
- package/dist/components/check-box/base.component.js +15 -0
- package/dist/components/check-box/index.d.ts +4 -0
- package/dist/components/check-box/index.js +6 -0
- package/dist/components/check-box/setup.component.d.ts +97 -0
- package/dist/components/check-box/setup.component.js +29 -0
- package/dist/components/component/base.component.d.ts +12 -0
- package/dist/components/component/index.d.ts +1 -0
- package/dist/components/component-view/ComponentView.js +21 -0
- package/dist/components/component-view/ComponentView.vue.d.ts +30 -0
- package/dist/components/component-view/ComponentView.vue_vue_type_script_lang.js +5 -0
- package/dist/components/component-view/base.component.d.ts +12 -0
- package/dist/components/component-view/base.component.js +13 -0
- package/dist/components/component-view/index.d.ts +5 -0
- package/dist/components/component-view/index.js +6 -0
- package/dist/components/component-view/setup.component.d.ts +20 -0
- package/dist/components/component-view/setup.component.js +20 -0
- package/dist/components/control/base.component.d.ts +12 -0
- package/dist/components/control/index.d.ts +1 -0
- package/dist/components/date-input/DateInput.js +74 -0
- package/dist/components/date-input/DateInput.vue.d.ts +197 -0
- package/dist/components/date-input/DateInput.vue_vue_type_script_lang.js +13 -0
- package/dist/components/date-input/base.component.d.ts +12 -0
- package/dist/components/date-input/base.component.js +13 -0
- package/dist/components/date-input/index.d.ts +4 -0
- package/dist/components/date-input/index.js +6 -0
- package/dist/components/date-input/setup.component.d.ts +46 -0
- package/dist/components/date-input/setup.component.js +30 -0
- package/dist/components/date-picker/DatePicker.js +178 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +3310 -0
- package/dist/components/date-picker/DatePicker.vue_vue_type_script_lang.js +19 -0
- package/dist/components/date-picker/base.component.d.ts +12 -0
- package/dist/components/date-picker/base.component.js +13 -0
- package/dist/components/date-picker/index.d.ts +5 -0
- package/dist/components/date-picker/index.js +6 -0
- package/dist/components/date-picker/setup.component.d.ts +83 -0
- package/dist/components/date-picker/setup.component.js +54 -0
- package/dist/components/dialog/Dialog.js +63 -0
- package/dist/components/dialog/Dialog.vue.d.ts +197 -0
- package/dist/components/dialog/Dialog.vue_vue_type_script_lang.js +20 -0
- package/dist/components/dialog/base.component.d.ts +12 -0
- package/dist/components/dialog/base.component.js +13 -0
- package/dist/components/dialog/index.d.ts +4 -0
- package/dist/components/dialog/index.js +6 -0
- package/dist/components/dialog/setup.component.d.ts +56 -0
- package/dist/components/dialog/setup.component.js +41 -0
- package/dist/components/drag-and-drop/DragAndDrop.js +10 -0
- package/dist/components/drag-and-drop/DragAndDrop.vue.d.ts +19 -0
- package/dist/components/drag-and-drop/DragAndDrop.vue_vue_type_script_lang.js +5 -0
- package/dist/components/drag-and-drop/base.component.d.ts +12 -0
- package/dist/components/drag-and-drop/base.component.js +13 -0
- package/dist/components/drag-and-drop/index.d.ts +4 -0
- package/dist/components/drag-and-drop/index.js +6 -0
- package/dist/components/drag-and-drop/setup.component.d.ts +17 -0
- package/dist/components/drag-and-drop/setup.component.js +21 -0
- package/dist/components/drawer/Drawer.js +57 -0
- package/dist/components/drawer/Drawer.vue.d.ts +191 -0
- package/dist/components/drawer/Drawer.vue_vue_type_script_lang.js +20 -0
- package/dist/components/drawer/base.component.d.ts +12 -0
- package/dist/components/drawer/base.component.js +13 -0
- package/dist/components/drawer/index.d.ts +4 -0
- package/dist/components/drawer/index.js +6 -0
- package/dist/components/drawer/setup.component.d.ts +54 -0
- package/dist/components/drawer/setup.component.js +39 -0
- package/dist/components/field/Field.js +42 -0
- package/dist/components/field/Field.vue.d.ts +97 -0
- package/dist/components/field/Field.vue_vue_type_script_lang.js +9 -0
- package/dist/components/field/base.component.d.ts +12 -0
- package/dist/components/field/base.component.js +13 -0
- package/dist/components/field/index.d.ts +4 -0
- package/dist/components/field/index.js +6 -0
- package/dist/components/field/setup.component.d.ts +28 -0
- package/dist/components/field/setup.component.js +29 -0
- package/dist/components/frame/Frame.js +26 -0
- package/dist/components/frame/Frame.vue.d.ts +95 -0
- package/dist/components/frame/Frame.vue_vue_type_script_lang.js +17 -0
- package/dist/components/frame/base.component.d.ts +12 -0
- package/dist/components/frame/base.component.js +13 -0
- package/dist/components/frame/index.d.ts +4 -0
- package/dist/components/frame/index.js +6 -0
- package/dist/components/frame/setup.component.d.ts +44 -0
- package/dist/components/frame/setup.component.js +23 -0
- package/dist/components/icon/Icon.js +18 -0
- package/dist/components/icon/Icon.vue.d.ts +52 -0
- package/dist/components/icon/Icon.vue_vue_type_script_lang.js +5 -0
- package/dist/components/icon/base.component.d.ts +12 -0
- package/dist/components/icon/base.component.js +13 -0
- package/dist/components/icon/index.d.ts +4 -0
- package/dist/components/icon/index.js +6 -0
- package/dist/components/icon/setup.component.d.ts +30 -0
- package/dist/components/icon/setup.component.js +20 -0
- package/dist/components/index.d.ts +43 -0
- package/dist/components/input/Input.js +71 -0
- package/dist/components/input/Input.vue.d.ts +191 -0
- package/dist/components/input/Input.vue_vue_type_script_lang.js +13 -0
- package/dist/components/input/base.component.d.ts +12 -0
- package/dist/components/input/base.component.js +13 -0
- package/dist/components/input/index.d.ts +4 -0
- package/dist/components/input/index.js +6 -0
- package/dist/components/input/setup.component.d.ts +44 -0
- package/dist/components/input/setup.component.js +28 -0
- package/dist/components/input-control/base.component.d.ts +12 -0
- package/dist/components/input-control/index.d.ts +1 -0
- package/dist/components/interactive/base.component.d.ts +12 -0
- package/dist/components/interactive/index.d.ts +1 -0
- package/dist/components/item-row/ItemRow.js +26 -0
- package/dist/components/item-row/ItemRow.vue.d.ts +74 -0
- package/dist/components/item-row/ItemRow.vue_vue_type_script_lang.js +18 -0
- package/dist/components/item-row/index.d.ts +4 -0
- package/dist/components/item-row/index.js +6 -0
- package/dist/components/item-row/setup.component.d.ts +33 -0
- package/dist/components/item-row/setup.component.js +20 -0
- package/dist/components/label/Label.js +23 -0
- package/dist/components/label/Label.vue.d.ts +38 -0
- package/dist/components/label/Label.vue_vue_type_script_lang.js +5 -0
- package/dist/components/label/base.component.d.ts +12 -0
- package/dist/components/label/base.component.js +13 -0
- package/dist/components/label/index.d.ts +4 -0
- package/dist/components/label/index.js +6 -0
- package/dist/components/label/setup.component.d.ts +20 -0
- package/dist/components/label/setup.component.js +20 -0
- package/dist/components/list-box/ListBox.js +101 -0
- package/dist/components/list-box/ListBox.vue.d.ts +313 -0
- package/dist/components/list-box/ListBox.vue_vue_type_script_lang.js +13 -0
- package/dist/components/list-box/base.component.d.ts +12 -0
- package/dist/components/list-box/base.component.js +16 -0
- package/dist/components/list-box/group/Group.js +24 -0
- package/dist/components/list-box/group/Group.vue.d.ts +32 -0
- package/dist/components/list-box/group/Group.vue_vue_type_script_lang.js +5 -0
- package/dist/components/list-box/group/base.component.d.ts +12 -0
- package/dist/components/list-box/group/base.component.js +13 -0
- package/dist/components/list-box/group/index.d.ts +5 -0
- package/dist/components/list-box/group/index.js +6 -0
- package/dist/components/list-box/group/setup.component.d.ts +25 -0
- package/dist/components/list-box/group/setup.component.js +26 -0
- package/dist/components/list-box/index.d.ts +892 -0
- package/dist/components/list-box/index.js +17 -0
- package/dist/components/list-box/item/Item.js +69 -0
- package/dist/components/list-box/item/Item.vue.d.ts +203 -0
- package/dist/components/list-box/item/Item.vue_vue_type_script_lang.js +24 -0
- package/dist/components/list-box/item/base.component.d.ts +12 -0
- package/dist/components/list-box/item/base.component.js +16 -0
- package/dist/components/list-box/item/index.d.ts +5 -0
- package/dist/components/list-box/item/index.js +6 -0
- package/dist/components/list-box/item/setup.component.d.ts +51 -0
- package/dist/components/list-box/item/setup.component.js +36 -0
- package/dist/components/list-box/setup.component.d.ts +41 -0
- package/dist/components/list-box/setup.component.js +34 -0
- package/dist/components/menu/Menu.js +149 -0
- package/dist/components/menu/Menu.vue.d.ts +825 -0
- package/dist/components/menu/Menu.vue_vue_type_script_lang.js +19 -0
- package/dist/components/menu/base.component.d.ts +12 -0
- package/dist/components/menu/base.component.js +16 -0
- package/dist/components/menu/checkbox-item/CheckboxItem.js +51 -0
- package/dist/components/menu/checkbox-item/CheckboxItem.vue.d.ts +192 -0
- package/dist/components/menu/checkbox-item/CheckboxItem.vue_vue_type_script_lang.js +19 -0
- package/dist/components/menu/checkbox-item/base.component.d.ts +12 -0
- package/dist/components/menu/checkbox-item/base.component.js +16 -0
- package/dist/components/menu/checkbox-item/index.d.ts +5 -0
- package/dist/components/menu/checkbox-item/index.js +6 -0
- package/dist/components/menu/checkbox-item/setup.component.d.ts +55 -0
- package/dist/components/menu/checkbox-item/setup.component.js +44 -0
- package/dist/components/menu/group/Group.js +24 -0
- package/dist/components/menu/group/Group.vue.d.ts +32 -0
- package/dist/components/menu/group/Group.vue_vue_type_script_lang.js +5 -0
- package/dist/components/menu/group/base.component.d.ts +12 -0
- package/dist/components/menu/group/base.component.js +13 -0
- package/dist/components/menu/group/index.d.ts +5 -0
- package/dist/components/menu/group/index.js +6 -0
- package/dist/components/menu/group/setup.component.d.ts +24 -0
- package/dist/components/menu/group/setup.component.js +25 -0
- package/dist/components/menu/index.d.ts +3005 -0
- package/dist/components/menu/index.js +36 -0
- package/dist/components/menu/item/Item.js +38 -0
- package/dist/components/menu/item/Item.vue.d.ts +140 -0
- package/dist/components/menu/item/Item.vue_vue_type_script_lang.js +16 -0
- package/dist/components/menu/item/base.component.d.ts +12 -0
- package/dist/components/menu/item/base.component.js +16 -0
- package/dist/components/menu/item/index.d.ts +5 -0
- package/dist/components/menu/item/index.js +6 -0
- package/dist/components/menu/item/setup.component.d.ts +53 -0
- package/dist/components/menu/item/setup.component.js +41 -0
- package/dist/components/menu/popover-item/PopoverItem.js +65 -0
- package/dist/components/menu/popover-item/PopoverItem.vue.d.ts +296 -0
- package/dist/components/menu/popover-item/PopoverItem.vue_vue_type_script_lang.js +22 -0
- package/dist/components/menu/popover-item/base.component.d.ts +12 -0
- package/dist/components/menu/popover-item/base.component.js +16 -0
- package/dist/components/menu/popover-item/index.d.ts +5 -0
- package/dist/components/menu/popover-item/index.js +6 -0
- package/dist/components/menu/popover-item/setup.component.d.ts +74 -0
- package/dist/components/menu/popover-item/setup.component.js +50 -0
- package/dist/components/menu/radio-group/RadioGroup.js +24 -0
- package/dist/components/menu/radio-group/RadioGroup.vue.d.ts +34 -0
- package/dist/components/menu/radio-group/RadioGroup.vue_vue_type_script_lang.js +5 -0
- package/dist/components/menu/radio-group/base.component.d.ts +12 -0
- package/dist/components/menu/radio-group/base.component.js +13 -0
- package/dist/components/menu/radio-group/index.d.ts +5 -0
- package/dist/components/menu/radio-group/index.js +6 -0
- package/dist/components/menu/radio-group/setup.component.d.ts +26 -0
- package/dist/components/menu/radio-group/setup.component.js +27 -0
- package/dist/components/menu/radio-item/RadioItem.js +49 -0
- package/dist/components/menu/radio-item/RadioItem.vue.d.ts +141 -0
- package/dist/components/menu/radio-item/RadioItem.vue_vue_type_script_lang.js +15 -0
- package/dist/components/menu/radio-item/base.component.d.ts +12 -0
- package/dist/components/menu/radio-item/base.component.js +16 -0
- package/dist/components/menu/radio-item/index.d.ts +5 -0
- package/dist/components/menu/radio-item/index.js +6 -0
- package/dist/components/menu/radio-item/setup.component.d.ts +56 -0
- package/dist/components/menu/radio-item/setup.component.js +44 -0
- package/dist/components/menu/separator/Separator.js +18 -0
- package/dist/components/menu/separator/Separator.vue.d.ts +30 -0
- package/dist/components/menu/separator/Separator.vue_vue_type_script_lang.js +5 -0
- package/dist/components/menu/separator/base.component.d.ts +12 -0
- package/dist/components/menu/separator/base.component.js +13 -0
- package/dist/components/menu/separator/index.d.ts +5 -0
- package/dist/components/menu/separator/index.js +6 -0
- package/dist/components/menu/separator/setup.component.d.ts +20 -0
- package/dist/components/menu/separator/setup.component.js +20 -0
- package/dist/components/menu/setup.component.d.ts +42 -0
- package/dist/components/menu/setup.component.js +43 -0
- package/dist/components/menu/submenu/Submenu.js +171 -0
- package/dist/components/menu/submenu/Submenu.vue.d.ts +495 -0
- package/dist/components/menu/submenu/Submenu.vue_vue_type_script_lang.js +51 -0
- package/dist/components/menu/submenu/base.component.d.ts +12 -0
- package/dist/components/menu/submenu/base.component.js +21 -0
- package/dist/components/menu/submenu/index.d.ts +5 -0
- package/dist/components/menu/submenu/index.js +6 -0
- package/dist/components/menu/submenu/setup.component.d.ts +76 -0
- package/dist/components/menu/submenu/setup.component.js +60 -0
- package/dist/components/number-input/NumberInput.js +119 -0
- package/dist/components/number-input/NumberInput.vue.d.ts +203 -0
- package/dist/components/number-input/NumberInput.vue_vue_type_script_lang.js +13 -0
- package/dist/components/number-input/base.component.d.ts +12 -0
- package/dist/components/number-input/base.component.js +13 -0
- package/dist/components/number-input/index.d.ts +4 -0
- package/dist/components/number-input/index.js +6 -0
- package/dist/components/number-input/setup.component.d.ts +54 -0
- package/dist/components/number-input/setup.component.js +38 -0
- package/dist/components/pagination/Pagination.js +85 -0
- package/dist/components/pagination/Pagination.vue.d.ts +277 -0
- package/dist/components/pagination/Pagination.vue_vue_type_script_lang.js +15 -0
- package/dist/components/pagination/base.component.d.ts +12 -0
- package/dist/components/pagination/base.component.js +16 -0
- package/dist/components/pagination/index.d.ts +10 -0
- package/dist/components/pagination/index.js +11 -0
- package/dist/components/pagination/item/Item.js +35 -0
- package/dist/components/pagination/item/Item.vue.d.ts +101 -0
- package/dist/components/pagination/item/Item.vue_vue_type_script_lang.js +16 -0
- package/dist/components/pagination/item/base.component.d.ts +12 -0
- package/dist/components/pagination/item/base.component.js +16 -0
- package/dist/components/pagination/item/index.d.ts +6 -0
- package/dist/components/pagination/item/index.js +7 -0
- package/dist/components/pagination/item/setup.component.d.ts +30 -0
- package/dist/components/pagination/item/setup.component.js +36 -0
- package/dist/components/pagination/setup.component.d.ts +51 -0
- package/dist/components/pagination/setup.component.js +48 -0
- package/dist/components/popover/Popover.js +70 -0
- package/dist/components/popover/Popover.vue.d.ts +264 -0
- package/dist/components/popover/Popover.vue_vue_type_script_lang.js +15 -0
- package/dist/components/popover/base.component.d.ts +12 -0
- package/dist/components/popover/base.component.js +13 -0
- package/dist/components/popover/index.d.ts +4 -0
- package/dist/components/popover/index.js +6 -0
- package/dist/components/popover/setup.component.d.ts +47 -0
- package/dist/components/popover/setup.component.js +34 -0
- package/dist/components/progress-linear/ProgressLinear.js +22 -0
- package/dist/components/progress-linear/ProgressLinear.vue.d.ts +58 -0
- package/dist/components/progress-linear/ProgressLinear.vue_vue_type_script_lang.js +5 -0
- package/dist/components/progress-linear/base.component.d.ts +12 -0
- package/dist/components/progress-linear/base.component.js +13 -0
- package/dist/components/progress-linear/index.d.ts +4 -0
- package/dist/components/progress-linear/index.js +6 -0
- package/dist/components/progress-linear/setup.component.d.ts +33 -0
- package/dist/components/progress-linear/setup.component.js +25 -0
- package/dist/components/progress-spinner/ProgressSpinner.js +47 -0
- package/dist/components/progress-spinner/ProgressSpinner.vue.d.ts +56 -0
- package/dist/components/progress-spinner/ProgressSpinner.vue_vue_type_script_lang.js +5 -0
- package/dist/components/progress-spinner/base.component.d.ts +12 -0
- package/dist/components/progress-spinner/base.component.js +13 -0
- package/dist/components/progress-spinner/index.d.ts +4 -0
- package/dist/components/progress-spinner/index.js +6 -0
- package/dist/components/progress-spinner/setup.component.d.ts +32 -0
- package/dist/components/progress-spinner/setup.component.js +24 -0
- package/dist/components/radio-group/RadioGroup.js +36 -0
- package/dist/components/radio-group/RadioGroup.vue.d.ts +135 -0
- package/dist/components/radio-group/RadioGroup.vue_vue_type_script_lang.js +9 -0
- package/dist/components/radio-group/base.component.d.ts +12 -0
- package/dist/components/radio-group/base.component.js +16 -0
- package/dist/components/radio-group/index.d.ts +370 -0
- package/dist/components/radio-group/index.js +9 -0
- package/dist/components/radio-group/item/Item.js +42 -0
- package/dist/components/radio-group/item/Item.vue.d.ts +65 -0
- package/dist/components/radio-group/item/Item.vue_vue_type_script_lang.js +5 -0
- package/dist/components/radio-group/item/base.component.d.ts +12 -0
- package/dist/components/radio-group/item/base.component.js +16 -0
- package/dist/components/radio-group/item/index.d.ts +5 -0
- package/dist/components/radio-group/item/index.js +6 -0
- package/dist/components/radio-group/item/setup.component.d.ts +46 -0
- package/dist/components/radio-group/item/setup.component.js +38 -0
- package/dist/components/radio-group/setup.component.d.ts +43 -0
- package/dist/components/radio-group/setup.component.js +40 -0
- package/dist/components/rating/Rating.js +54 -0
- package/dist/components/rating/Rating.vue.d.ts +77 -0
- package/dist/components/rating/Rating.vue_vue_type_script_lang.js +5 -0
- package/dist/components/rating/base.component.d.ts +12 -0
- package/dist/components/rating/base.component.js +13 -0
- package/dist/components/rating/index.d.ts +4 -0
- package/dist/components/rating/index.js +6 -0
- package/dist/components/rating/setup.component.d.ts +51 -0
- package/dist/components/rating/setup.component.js +35 -0
- package/dist/components/scroller/Scroller.js +57 -0
- package/dist/components/scroller/Scroller.vue.d.ts +171 -0
- package/dist/components/scroller/Scroller.vue_vue_type_script_lang.js +13 -0
- package/dist/components/scroller/base.component.d.ts +12 -0
- package/dist/components/scroller/base.component.js +13 -0
- package/dist/components/scroller/index.d.ts +4 -0
- package/dist/components/scroller/index.js +6 -0
- package/dist/components/scroller/setup.component.d.ts +47 -0
- package/dist/components/scroller/setup.component.js +35 -0
- package/dist/components/select/Select.js +151 -0
- package/dist/components/select/Select.vue.d.ts +1598 -0
- package/dist/components/select/Select.vue_vue_type_script_lang.js +21 -0
- package/dist/components/select/base.component.d.ts +12 -0
- package/dist/components/select/base.component.js +16 -0
- package/dist/components/select/group/Group.js +24 -0
- package/dist/components/select/group/Group.vue.d.ts +32 -0
- package/dist/components/select/group/Group.vue_vue_type_script_lang.js +5 -0
- package/dist/components/select/group/base.component.d.ts +12 -0
- package/dist/components/select/group/base.component.js +13 -0
- package/dist/components/select/group/index.d.ts +5 -0
- package/dist/components/select/group/index.js +6 -0
- package/dist/components/select/group/setup.component.d.ts +24 -0
- package/dist/components/select/group/setup.component.js +25 -0
- package/dist/components/select/index.d.ts +17 -0
- package/dist/components/select/index.js +19 -0
- package/dist/components/select/item/Item.js +67 -0
- package/dist/components/select/item/Item.vue.d.ts +228 -0
- package/dist/components/select/item/Item.vue_vue_type_script_lang.js +51 -0
- package/dist/components/select/item/base.component.d.ts +12 -0
- package/dist/components/select/item/base.component.js +16 -0
- package/dist/components/select/item/index.d.ts +5 -0
- package/dist/components/select/item/index.js +6 -0
- package/dist/components/select/item/setup.component.d.ts +58 -0
- package/dist/components/select/item/setup.component.js +43 -0
- package/dist/components/select/setup.component.d.ts +89 -0
- package/dist/components/select/setup.component.js +60 -0
- package/dist/components/skeleton/Skeleton.js +25 -0
- package/dist/components/skeleton/Skeleton.vue.d.ts +42 -0
- package/dist/components/skeleton/Skeleton.vue_vue_type_script_lang.js +5 -0
- package/dist/components/skeleton/base.component.d.ts +12 -0
- package/dist/components/skeleton/base.component.js +13 -0
- package/dist/components/skeleton/index.d.ts +4 -0
- package/dist/components/skeleton/index.js +6 -0
- package/dist/components/skeleton/setup.component.d.ts +22 -0
- package/dist/components/skeleton/setup.component.js +20 -0
- package/dist/components/slider/Slider.js +75 -0
- package/dist/components/slider/Slider.vue.d.ts +87 -0
- package/dist/components/slider/Slider.vue_vue_type_script_lang.js +5 -0
- package/dist/components/slider/base.component.d.ts +12 -0
- package/dist/components/slider/base.component.js +13 -0
- package/dist/components/slider/index.d.ts +4 -0
- package/dist/components/slider/index.js +6 -0
- package/dist/components/slider/setup.component.d.ts +46 -0
- package/dist/components/slider/setup.component.js +34 -0
- package/dist/components/stylable/base.component.d.ts +12 -0
- package/dist/components/stylable/index.d.ts +1 -0
- package/dist/components/switch/Switch.js +49 -0
- package/dist/components/switch/Switch.vue.d.ts +76 -0
- package/dist/components/switch/Switch.vue_vue_type_script_lang.js +5 -0
- package/dist/components/switch/base.component.d.ts +12 -0
- package/dist/components/switch/base.component.js +13 -0
- package/dist/components/switch/index.d.ts +4 -0
- package/dist/components/switch/index.js +6 -0
- package/dist/components/switch/setup.component.d.ts +43 -0
- package/dist/components/switch/setup.component.js +24 -0
- package/dist/components/table/Table.js +94 -0
- package/dist/components/table/Table.vue.d.ts +564 -0
- package/dist/components/table/Table.vue_vue_type_script_lang.js +15 -0
- package/dist/components/table/base.component.d.ts +12 -0
- package/dist/components/table/base.component.js +16 -0
- package/dist/components/table/column/Column.js +59 -0
- package/dist/components/table/column/Column.vue.d.ts +143 -0
- package/dist/components/table/column/Column.vue_vue_type_script_lang.js +13 -0
- package/dist/components/table/column/base.component.d.ts +12 -0
- package/dist/components/table/column/base.component.js +13 -0
- package/dist/components/table/column/index.d.ts +5 -0
- package/dist/components/table/column/index.js +6 -0
- package/dist/components/table/column/setup.component.d.ts +37 -0
- package/dist/components/table/column/setup.component.js +39 -0
- package/dist/components/table/index.d.ts +1512 -0
- package/dist/components/table/index.js +18 -0
- package/dist/components/table/row/Cells.js +40 -0
- package/dist/components/table/row/Cells.vue.d.ts +65 -0
- package/dist/components/table/row/Cells.vue_vue_type_script_lang.js +61 -0
- package/dist/components/table/row/Row.js +55 -0
- package/dist/components/table/row/Row.vue.d.ts +193 -0
- package/dist/components/table/row/Row.vue_vue_type_script_lang.js +13 -0
- package/dist/components/table/row/base.component.d.ts +12 -0
- package/dist/components/table/row/base.component.js +16 -0
- package/dist/components/table/row/index.d.ts +5 -0
- package/dist/components/table/row/index.js +6 -0
- package/dist/components/table/row/setup.component.d.ts +33 -0
- package/dist/components/table/row/setup.component.js +38 -0
- package/dist/components/table/setup.component.d.ts +68 -0
- package/dist/components/table/setup.component.js +59 -0
- package/dist/components/tabs/Tabs.js +56 -0
- package/dist/components/tabs/Tabs.vue.d.ts +267 -0
- package/dist/components/tabs/Tabs.vue_vue_type_script_lang.js +9 -0
- package/dist/components/tabs/base.component.d.ts +12 -0
- package/dist/components/tabs/base.component.js +16 -0
- package/dist/components/tabs/collection.types.d.ts +1 -0
- package/dist/components/tabs/content/Content.js +20 -0
- package/dist/components/tabs/content/Content.vue.d.ts +40 -0
- package/dist/components/tabs/content/Content.vue_vue_type_script_lang.js +5 -0
- package/dist/components/tabs/content/base.component.d.ts +12 -0
- package/dist/components/tabs/content/base.component.js +16 -0
- package/dist/components/tabs/content/index.d.ts +5 -0
- package/dist/components/tabs/content/index.js +6 -0
- package/dist/components/tabs/content/setup.component.d.ts +31 -0
- package/dist/components/tabs/content/setup.component.js +34 -0
- package/dist/components/tabs/index.d.ts +804 -0
- package/dist/components/tabs/index.js +18 -0
- package/dist/components/tabs/item/Item.js +61 -0
- package/dist/components/tabs/item/Item.vue.d.ts +188 -0
- package/dist/components/tabs/item/Item.vue_vue_type_script_lang.js +13 -0
- package/dist/components/tabs/item/base.component.d.ts +12 -0
- package/dist/components/tabs/item/base.component.js +16 -0
- package/dist/components/tabs/item/index.d.ts +5 -0
- package/dist/components/tabs/item/index.js +6 -0
- package/dist/components/tabs/item/setup.component.d.ts +47 -0
- package/dist/components/tabs/item/setup.component.js +36 -0
- package/dist/components/tabs/setup.component.d.ts +41 -0
- package/dist/components/tabs/setup.component.js +34 -0
- package/dist/components/tags/Tags.js +40 -0
- package/dist/components/tags/Tags.vue.d.ts +319 -0
- package/dist/components/tags/Tags.vue_vue_type_script_lang.js +9 -0
- package/dist/components/tags/base.component.d.ts +12 -0
- package/dist/components/tags/base.component.js +16 -0
- package/dist/components/tags/index.d.ts +915 -0
- package/dist/components/tags/index.js +9 -0
- package/dist/components/tags/item/Item.js +64 -0
- package/dist/components/tags/item/Item.vue.d.ts +289 -0
- package/dist/components/tags/item/Item.vue_vue_type_script_lang.js +61 -0
- package/dist/components/tags/item/base.component.d.ts +12 -0
- package/dist/components/tags/item/base.component.js +16 -0
- package/dist/components/tags/item/index.d.ts +5 -0
- package/dist/components/tags/item/index.js +6 -0
- package/dist/components/tags/item/setup.component.d.ts +43 -0
- package/dist/components/tags/item/setup.component.js +36 -0
- package/dist/components/tags/setup.component.d.ts +35 -0
- package/dist/components/tags/setup.component.js +32 -0
- package/dist/components/textable/base.component.d.ts +12 -0
- package/dist/components/textable/index.d.ts +1 -0
- package/dist/components/textarea/Textarea.js +48 -0
- package/dist/components/textarea/Textarea.vue.d.ts +90 -0
- package/dist/components/textarea/Textarea.vue_vue_type_script_lang.js +5 -0
- package/dist/components/textarea/base.component.d.ts +12 -0
- package/dist/components/textarea/base.component.js +13 -0
- package/dist/components/textarea/index.d.ts +4 -0
- package/dist/components/textarea/index.js +6 -0
- package/dist/components/textarea/setup.component.d.ts +54 -0
- package/dist/components/textarea/setup.component.js +33 -0
- package/dist/components/toasts/Toasts.js +51 -0
- package/dist/components/toasts/Toasts.vue.d.ts +281 -0
- package/dist/components/toasts/Toasts.vue_vue_type_script_lang.js +17 -0
- package/dist/components/toasts/base.component.d.ts +12 -0
- package/dist/components/toasts/base.component.js +16 -0
- package/dist/components/toasts/index.d.ts +9 -0
- package/dist/components/toasts/index.js +11 -0
- package/dist/components/toasts/item/Item.js +64 -0
- package/dist/components/toasts/item/Item.vue.d.ts +230 -0
- package/dist/components/toasts/item/Item.vue_vue_type_script_lang.js +22 -0
- package/dist/components/toasts/item/base.component.d.ts +12 -0
- package/dist/components/toasts/item/base.component.js +16 -0
- package/dist/components/toasts/item/index.d.ts +6 -0
- package/dist/components/toasts/item/index.js +7 -0
- package/dist/components/toasts/item/setup.component.d.ts +51 -0
- package/dist/components/toasts/item/setup.component.js +60 -0
- package/dist/components/toasts/setup.component.d.ts +34 -0
- package/dist/components/toasts/setup.component.js +42 -0
- package/dist/components/tooltip/Tooltip.js +40 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +134 -0
- package/dist/components/tooltip/Tooltip.vue_vue_type_script_lang.js +9 -0
- package/dist/components/tooltip/base.component.d.ts +12 -0
- package/dist/components/tooltip/base.component.js +13 -0
- package/dist/components/tooltip/index.d.ts +4 -0
- package/dist/components/tooltip/index.js +6 -0
- package/dist/components/tooltip/setup.component.d.ts +32 -0
- package/dist/components/tooltip/setup.component.js +25 -0
- package/dist/components/value-control/base.component.d.ts +12 -0
- package/dist/components/value-control/index.d.ts +1 -0
- package/dist/components/virtual/Virtual.js +10 -0
- package/dist/components/virtual/Virtual.vue.d.ts +21 -0
- package/dist/components/virtual/Virtual.vue_vue_type_script_lang.js +5 -0
- package/dist/components/virtual/base.component.d.ts +12 -0
- package/dist/components/virtual/base.component.js +13 -0
- package/dist/components/virtual/index.d.ts +4 -0
- package/dist/components/virtual/index.js +6 -0
- package/dist/components/virtual/setup.component.d.ts +22 -0
- package/dist/components/virtual/setup.component.js +26 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +60 -0
- package/dist/types/common.d.ts +6 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +56 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yuri Soldatov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,153 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @soxa-ui/vue
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**The Vue adapter: Soxa UI components rendered on the headless models of the core.**
|
|
4
|
+
|
|
5
|
+
Part of [Soxa UI](https://github.com/youra-h/soxa-ui) — UI components with the logic written once: a
|
|
6
|
+
framework-agnostic core and thin adapters that render it in Vue, React, Angular, Svelte, Solid and
|
|
7
|
+
Web Components.
|
|
8
|
+
|
|
9
|
+
The adapter is wiring, not behavior: it connects a core model to Vue's reactivity and renders the
|
|
10
|
+
markup — BEM classes `so-*` and `data-*` state attributes. Props, events and slots come from the
|
|
11
|
+
component descriptor, so they match the other five adapters; only the spelling is Vue's.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @soxa-ui/vue @soxa-ui/setup @soxa-ui/theme-oren @soxa-ui/icons-material
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Install `@soxa-ui/setup` as a direct dependency for the `useIcons` and `useTheme` imports below.
|
|
20
|
+
Keep it on the same version as `@soxa-ui/vue`.
|
|
21
|
+
|
|
22
|
+
Vue `^3.5` is a peer dependency. A theme and an icon pack are separate packages — pick the ones you
|
|
23
|
+
want.
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
Compound components name their parts with a dot:
|
|
28
|
+
|
|
29
|
+
```vue
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { Accordion } from '@soxa-ui/vue'
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<Accordion mode="multiple">
|
|
36
|
+
<Accordion.Item text="First" value="a" :selected="true">
|
|
37
|
+
<p>Content A</p>
|
|
38
|
+
</Accordion.Item>
|
|
39
|
+
<Accordion.Item text="Second" value="b">
|
|
40
|
+
<p>Content B</p>
|
|
41
|
+
</Accordion.Item>
|
|
42
|
+
</Accordion>
|
|
43
|
+
</template>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The same component can be driven from code — pass a core instance as `ctrl`, and both sides see the
|
|
47
|
+
same state and events:
|
|
48
|
+
|
|
49
|
+
```vue
|
|
50
|
+
<script setup lang="ts">
|
|
51
|
+
import { TButton } from '@soxa-ui/core'
|
|
52
|
+
import { Button } from '@soxa-ui/vue'
|
|
53
|
+
|
|
54
|
+
const btn = new TButton({ text: 'Save' })
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<template>
|
|
58
|
+
<Button :ctrl="btn" @action:press="btn.disabled = true" />
|
|
59
|
+
</template>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The application plugs in a theme and an icon pack once:
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
import { createApp } from 'vue'
|
|
66
|
+
import { useIcons, useTheme } from '@soxa-ui/setup'
|
|
67
|
+
import * as material from '@soxa-ui/icons-material'
|
|
68
|
+
import oren from '@soxa-ui/theme-oren/setup'
|
|
69
|
+
import App from './App.vue'
|
|
70
|
+
|
|
71
|
+
import '@soxa-ui/theme-oren'
|
|
72
|
+
|
|
73
|
+
useIcons(material)
|
|
74
|
+
useTheme(oren)
|
|
75
|
+
|
|
76
|
+
createApp(App).mount('#app')
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`@soxa-ui/theme-oren` is the stylesheet of every component. To take only the components your
|
|
80
|
+
pages use, import their stylesheets instead — `@soxa-ui/theme-oren/button.css`,
|
|
81
|
+
`@soxa-ui/theme-oren/select.css`, one per component, each with the shared part of the theme
|
|
82
|
+
(the theme's README, [Only the components you use](https://github.com/youra-h/soxa-ui/tree/main/packages/themes/oren#only-the-components-you-use)).
|
|
83
|
+
|
|
84
|
+
## Two-way binding
|
|
85
|
+
|
|
86
|
+
Use named `v-model` bindings with the property you want to control: `v-model:value` for a field's
|
|
87
|
+
value, `v-model:open` for a panel's open state, or `v-model:selected` for an item's selection.
|
|
88
|
+
A component can have several bindings at once:
|
|
89
|
+
|
|
90
|
+
```vue
|
|
91
|
+
<script setup lang="ts">
|
|
92
|
+
import { ref } from 'vue'
|
|
93
|
+
import { Input, Select } from '@soxa-ui/vue'
|
|
94
|
+
|
|
95
|
+
const text = ref('')
|
|
96
|
+
const selection = ref('a')
|
|
97
|
+
const opened = ref(false)
|
|
98
|
+
const options = [
|
|
99
|
+
{ value: 'a', text: 'First' },
|
|
100
|
+
{ value: 'b', text: 'Second' },
|
|
101
|
+
]
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<template>
|
|
105
|
+
<Input v-model:value="text" />
|
|
106
|
+
<Select v-model:value="selection" v-model:open="opened" :items="options" />
|
|
107
|
+
</template>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`v-model:value="text"` is shorthand for `:value="text"` and `@update:value="text = $event"`.
|
|
111
|
+
The same rule applies to other writable properties with change notifications: each uses
|
|
112
|
+
`update:<property>` with the new value as its payload.
|
|
113
|
+
|
|
114
|
+
Bare `v-model` is unsupported: Vue expands it to `modelValue` and `update:modelValue`, which
|
|
115
|
+
Soxa components do not expose. Always specify the property name.
|
|
116
|
+
|
|
117
|
+
## Several Vue apps on one page
|
|
118
|
+
|
|
119
|
+
Soxa builds the `id`s of component parts and the owner marks of panels (`data-owner`) on Vue's
|
|
120
|
+
`useId`, so that the server and the browser render the same markup. `useId` numbers ids within an
|
|
121
|
+
app, and when a page runs several Vue apps — islands, micro-frontends — their ids coincide: a menu,
|
|
122
|
+
popover or dialog of one app then finds the panel of another. Give each app a prefix of its own
|
|
123
|
+
before it mounts — on the server too, if the app is rendered there:
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
app.config.idPrefix = 'cart'
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Documentation
|
|
130
|
+
|
|
131
|
+
- [Soxa UI README](https://github.com/youra-h/soxa-ui#readme) — the component set and what each
|
|
132
|
+
adapter implements so far.
|
|
133
|
+
- [Architecture overview](https://github.com/youra-h/soxa-ui/blob/main/docs/architecture.md) —
|
|
134
|
+
layers, descriptors, plugins, collections, adapters.
|
|
135
|
+
|
|
136
|
+
## Public API
|
|
137
|
+
|
|
138
|
+
The package entry exports application components, their consumer types, the locale provider,
|
|
139
|
+
and the supported icon and toast helpers. Component props, slots, events, refs and core models
|
|
140
|
+
passed through `ctrl` remain the supported ways to customize the UI. Models come from
|
|
141
|
+
`@soxa-ui/core`; theme, icon and external-plugin registration comes from `@soxa-ui/setup`.
|
|
142
|
+
|
|
143
|
+
Assembly functions, adapter profiles, bindings, generated metadata and rendering templates
|
|
144
|
+
are private implementation details. They are no longer exported from the package entry, and
|
|
145
|
+
there is no public `/internal` entry. Code that imported them must use the component contract
|
|
146
|
+
instead. Building a new adapter component from Soxa's assembly helpers is not a supported
|
|
147
|
+
public SDK.
|
|
148
|
+
|
|
149
|
+
Component props types, including `ButtonProps`, are available from the package entry.
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
[MIT](https://github.com/youra-h/soxa-ui/blob/main/LICENSE)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region \0plugin-vue:export-helper
|
|
2
|
+
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
3
|
+
const target = sfc.__vccOpts || sfc;
|
|
4
|
+
for (const [key, val] of props) target[key] = val;
|
|
5
|
+
return target;
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _plugin_vue_export_helper_default as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createAdapterContext, type IAdapterContextConfig, type IAdapterContextOptions } from '@soxa-ui/setup';
|
|
2
|
+
/**
|
|
3
|
+
* Опции и конфиг — те же, что у `createAdapterContext`: setup их экспортирует,
|
|
4
|
+
* и копии здесь больше нет. Имена оставлены прежними — их ждут компоненты.
|
|
5
|
+
*/
|
|
6
|
+
export type IVueAdapterContextOptions<TInstance extends object> = IAdapterContextOptions<TInstance>;
|
|
7
|
+
export type IVueAdapterContextConfig = IAdapterContextConfig;
|
|
8
|
+
/**
|
|
9
|
+
* Обёртка над `createAdapterContext` из `@soxa-ui/setup`, единственное место,
|
|
10
|
+
* где Vue-компонентам нужен `toRaw`. Снимает прокси с `ctrl` и со значений
|
|
11
|
+
* верхнего уровня `options` (в частности, `engine` коллекционного контекста)
|
|
12
|
+
* перед тем, как отдать их ядру, которое `vue` не импортирует и о прокси не
|
|
13
|
+
* знает. Имя `engine` обёртке знать не нужно: `toRaw` на значении без прокси
|
|
14
|
+
* ничего не меняет.
|
|
15
|
+
*
|
|
16
|
+
* Цепочка `.use(...)` остаётся на месте вызова, как и раньше — набора
|
|
17
|
+
* расширений по умолчанию обёртка не собирает (см. AGENTS.md, «Vue collection
|
|
18
|
+
* setup»).
|
|
19
|
+
*
|
|
20
|
+
* Здесь же — id монтирования (`mountId`) от `useId`: от него плагины строят
|
|
21
|
+
* `id` частей. Счётчик процесса на сервере общий для всех запросов, и `id` от
|
|
22
|
+
* него расходились бы при гидратации, а `useId` Vue выводит из места
|
|
23
|
+
* компонента в дереве. Обёртку зовёт `setup()` компонента, поэтому у `useId`
|
|
24
|
+
* есть текущий компонент. Id монтирования, заданный опцией явно, остаётся за
|
|
25
|
+
* тем, кто его задал.
|
|
26
|
+
*
|
|
27
|
+
* Там же — локаль поддерева (`locale`): источник ближайшего `LocaleProvider`
|
|
28
|
+
* выше по дереву (`inject`). Провайдера нет — опция не задана, и у набора
|
|
29
|
+
* своя английская. Локаль, заданная опцией явно, тоже остаётся за тем, кто её
|
|
30
|
+
* задал.
|
|
31
|
+
*
|
|
32
|
+
* Сигнатура — сама `createAdapterContext`: своих параметров типа у обёртки
|
|
33
|
+
* нет, контракт контекста выводится из дескриптора там же, где и у остальных
|
|
34
|
+
* адаптеров.
|
|
35
|
+
*/
|
|
36
|
+
export declare const createVueAdapterContext: typeof createAdapterContext;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LOCALE_KEY } from "../locale/key.js";
|
|
2
|
+
import { createAdapterContext } from "@soxa-ui/setup";
|
|
3
|
+
import { inject, toRaw, useId } from "vue";
|
|
4
|
+
//#region src/adapter/common/createVueAdapterContext.ts
|
|
5
|
+
/** Снимает Vue-прокси со значений верхнего уровня объекта, не заглядывая внутрь. */
|
|
6
|
+
function stripTopLevelProxies(value) {
|
|
7
|
+
return Object.fromEntries(Object.entries(value).map(([key, v]) => [key, toRaw(v)]));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Обёртка над `createAdapterContext` из `@soxa-ui/setup`, единственное место,
|
|
11
|
+
* где Vue-компонентам нужен `toRaw`. Снимает прокси с `ctrl` и со значений
|
|
12
|
+
* верхнего уровня `options` (в частности, `engine` коллекционного контекста)
|
|
13
|
+
* перед тем, как отдать их ядру, которое `vue` не импортирует и о прокси не
|
|
14
|
+
* знает. Имя `engine` обёртке знать не нужно: `toRaw` на значении без прокси
|
|
15
|
+
* ничего не меняет.
|
|
16
|
+
*
|
|
17
|
+
* Цепочка `.use(...)` остаётся на месте вызова, как и раньше — набора
|
|
18
|
+
* расширений по умолчанию обёртка не собирает (см. AGENTS.md, «Vue collection
|
|
19
|
+
* setup»).
|
|
20
|
+
*
|
|
21
|
+
* Здесь же — id монтирования (`mountId`) от `useId`: от него плагины строят
|
|
22
|
+
* `id` частей. Счётчик процесса на сервере общий для всех запросов, и `id` от
|
|
23
|
+
* него расходились бы при гидратации, а `useId` Vue выводит из места
|
|
24
|
+
* компонента в дереве. Обёртку зовёт `setup()` компонента, поэтому у `useId`
|
|
25
|
+
* есть текущий компонент. Id монтирования, заданный опцией явно, остаётся за
|
|
26
|
+
* тем, кто его задал.
|
|
27
|
+
*
|
|
28
|
+
* Там же — локаль поддерева (`locale`): источник ближайшего `LocaleProvider`
|
|
29
|
+
* выше по дереву (`inject`). Провайдера нет — опция не задана, и у набора
|
|
30
|
+
* своя английская. Локаль, заданная опцией явно, тоже остаётся за тем, кто её
|
|
31
|
+
* задал.
|
|
32
|
+
*
|
|
33
|
+
* Сигнатура — сама `createAdapterContext`: своих параметров типа у обёртки
|
|
34
|
+
* нет, контракт контекста выводится из дескриптора там же, где и у остальных
|
|
35
|
+
* адаптеров.
|
|
36
|
+
*/
|
|
37
|
+
var createVueAdapterContext = (descriptor, options, config) => createAdapterContext(descriptor, {
|
|
38
|
+
...options,
|
|
39
|
+
ctrl: options.ctrl !== void 0 ? toRaw(options.ctrl) : void 0,
|
|
40
|
+
options: options.options !== void 0 ? stripTopLevelProxies(options.options) : void 0,
|
|
41
|
+
mountId: options.mountId ?? useId(),
|
|
42
|
+
locale: options.locale ?? inject(LOCALE_KEY, void 0)
|
|
43
|
+
}, config);
|
|
44
|
+
//#endregion
|
|
45
|
+
export { createVueAdapterContext };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { getIcon } from "@soxa-ui/setup";
|
|
2
|
+
import { defineComponent, h, markRaw } from "vue";
|
|
3
|
+
//#region src/adapter/common/icon.ts
|
|
4
|
+
/**
|
|
5
|
+
* Компонент иконки по роли из реестра.
|
|
6
|
+
*
|
|
7
|
+
* Иконка приходит данными (`{ viewBox, body }`), а разметку строит адаптер —
|
|
8
|
+
* поэтому здесь `h()`, а не `template`. Разница не косметическая: `template`
|
|
9
|
+
* требует рантайм-компилятор Vue, из-за чего в конфиге стоял алиас на полный
|
|
10
|
+
* билд (`vue/dist/vue.esm-bundler.js`). То есть иконки навязывали лишний вес
|
|
11
|
+
* каждому приложению и ломались при CSP без `unsafe-eval`.
|
|
12
|
+
*
|
|
13
|
+
* `innerHTML` вместо разбора `body` на узлы: содержимое иконки произвольно —
|
|
14
|
+
* группы, маски, несколько путей. Источник доверенный (пакет из зависимостей),
|
|
15
|
+
* пользовательский ввод сюда не попадает.
|
|
16
|
+
*
|
|
17
|
+
* Роль резолвится **на отрисовке**, а не при вызове: `useIcons()` может быть
|
|
18
|
+
* вызван после того, как компонент уже создан.
|
|
19
|
+
*
|
|
20
|
+
* Компонент на роль один на модуль, как `roleIcon` у React: роль читается на
|
|
21
|
+
* отрисовке, и определению нечего помнить о вызове. Новое определение на
|
|
22
|
+
* каждый вызов умножалось бы на экземпляры — у чекбоксов таблицы на 5000
|
|
23
|
+
* строк это 10 000 одинаковых компонентов. Это не composable: контекста
|
|
24
|
+
* `setup()` он не требует и состояния не заводит, поэтому зовётся где угодно,
|
|
25
|
+
* в том числе на уровне модуля.
|
|
26
|
+
*/
|
|
27
|
+
var icons = /* @__PURE__ */ new Map();
|
|
28
|
+
function roleIcon(role) {
|
|
29
|
+
const known = icons.get(role);
|
|
30
|
+
if (known) return known;
|
|
31
|
+
const icon = markRaw(defineComponent({
|
|
32
|
+
name: `Icon_${role}`,
|
|
33
|
+
render() {
|
|
34
|
+
const source = getIcon(role);
|
|
35
|
+
return h("svg", {
|
|
36
|
+
viewBox: source.viewBox,
|
|
37
|
+
innerHTML: source.body
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
icons.set(role, icon);
|
|
42
|
+
return icon;
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { roleIcon };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vue-стратегия именования props и событий.
|
|
3
|
+
*
|
|
4
|
+
* - props: `styles` @ ns `icon-styles` → `iconStyles_styles` (общее правило)
|
|
5
|
+
* - events: `element:ready` → `element:ready` (как в ядре)
|
|
6
|
+
*
|
|
7
|
+
* Имя события — `TName.getName()` без преобразований: двоеточия в emit
|
|
8
|
+
* допустимы. Своей копии формата `namespace:name` здесь нет — её пришлось бы
|
|
9
|
+
* менять вместе с `getName()`. То же решение, что в Web Components.
|
|
10
|
+
*/
|
|
11
|
+
import type { INamingStrategy } from '@soxa-ui/setup';
|
|
12
|
+
export declare const VueNaming: INamingStrategy;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Профиль Vue: имена поверхности и событие `v-model`.
|
|
3
|
+
*
|
|
4
|
+
* Поверхность нужна компоненту дважды: при импорте модуля (`props` и `emits`
|
|
5
|
+
* Options API — `useProps`, `useEmits`) и на монтировании (связка
|
|
6
|
+
* `adapter.connect()`). Один профиль — одна поверхность на оба случая.
|
|
7
|
+
*
|
|
8
|
+
* `v-model` держится на `update:<prop>`: его объявляет поверхность, а
|
|
9
|
+
* эмитит связка, — у каждого записываемого пропа с триггерами, плагинные
|
|
10
|
+
* включительно (`update:anchor_anchor` у Frame).
|
|
11
|
+
*/
|
|
12
|
+
import type { IAdapterProfile } from '@soxa-ui/setup';
|
|
13
|
+
export declare const VueProfile: IAdapterProfile;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Разделяет fallthrough-атрибуты на две группы:
|
|
3
|
+
* - `containerAttrs` — class, style (на корневой контейнер)
|
|
4
|
+
* - `controlAttrs` — всё остальное: события, aria-*, data-* (на интерактивный контрол)
|
|
5
|
+
*/
|
|
6
|
+
export declare function useSplitAttrs(): {
|
|
7
|
+
containerAttrs: import("vue").ComputedRef<Record<string, unknown>>;
|
|
8
|
+
controlAttrs: import("vue").ComputedRef<{
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { computed, useAttrs } from "vue";
|
|
2
|
+
//#region src/adapter/common/useSplitAttrs.ts
|
|
3
|
+
/**
|
|
4
|
+
* Разделяет fallthrough-атрибуты на две группы:
|
|
5
|
+
* - `containerAttrs` — class, style (на корневой контейнер)
|
|
6
|
+
* - `controlAttrs` — всё остальное: события, aria-*, data-* (на интерактивный контрол)
|
|
7
|
+
*/
|
|
8
|
+
function useSplitAttrs() {
|
|
9
|
+
const attrs = useAttrs();
|
|
10
|
+
return {
|
|
11
|
+
containerAttrs: computed(() => {
|
|
12
|
+
const result = {};
|
|
13
|
+
if (attrs.class) result.class = attrs.class;
|
|
14
|
+
if (attrs.style) result.style = attrs.style;
|
|
15
|
+
return result;
|
|
16
|
+
}),
|
|
17
|
+
controlAttrs: computed(() => {
|
|
18
|
+
const { class: _, style: __, ...rest } = attrs;
|
|
19
|
+
return rest;
|
|
20
|
+
})
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { useSplitAttrs };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TVueElevator — реализация IContextElevator через Vue provide/inject.
|
|
3
|
+
*
|
|
4
|
+
* Наследует TElevator из @soxa-ui/setup (кэширование ключей).
|
|
5
|
+
* Ключевое ограничение: up()/down() должны вызываться синхронно
|
|
6
|
+
* внутри setup() UI-компонента.
|
|
7
|
+
*/
|
|
8
|
+
import { TElevator } from '@soxa-ui/setup';
|
|
9
|
+
export declare class TVueElevator<T = any> extends TElevator<T> {
|
|
10
|
+
down(value: T): void;
|
|
11
|
+
up(): T | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TElevator } from "@soxa-ui/setup";
|
|
2
|
+
import { inject, provide } from "vue";
|
|
3
|
+
//#region src/adapter/elevator/elevator.class.ts
|
|
4
|
+
/**
|
|
5
|
+
* TVueElevator — реализация IContextElevator через Vue provide/inject.
|
|
6
|
+
*
|
|
7
|
+
* Наследует TElevator из @soxa-ui/setup (кэширование ключей).
|
|
8
|
+
* Ключевое ограничение: up()/down() должны вызываться синхронно
|
|
9
|
+
* внутри setup() UI-компонента.
|
|
10
|
+
*/
|
|
11
|
+
var TVueElevator = class extends TElevator {
|
|
12
|
+
down(value) {
|
|
13
|
+
provide(this._key, value);
|
|
14
|
+
}
|
|
15
|
+
up() {
|
|
16
|
+
return inject(this._key, void 0);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { TVueElevator };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { TLocale } from '@soxa-ui/plugins';
|
|
2
|
+
import { type TClosedComponent } from '../static';
|
|
3
|
+
/** Пропсы провайдера: локаль поддерева. */
|
|
4
|
+
export type LocaleProviderProps = {
|
|
5
|
+
/** Локаль поддерева: тег для Intl и строки библиотеки (`ruRU`, `extendLocale(...)`) */
|
|
6
|
+
locale: TLocale;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Объектом опций, а не функцией `setup`: опции `expose` форма с функцией не
|
|
10
|
+
* принимает, а она у провайдера та же, что у компонентов (`useExpose`). Тип
|
|
11
|
+
* пропсов — аргументом `defineComponent`: опция `props` — список имён, и тип
|
|
12
|
+
* из неё был бы `any`.
|
|
13
|
+
*/
|
|
14
|
+
declare const LocaleProviderComponent: import("vue").DefineComponent<LocaleProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LocaleProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
/**
|
|
16
|
+
* LocaleProvider — локаль поддерева: язык и строки библиотеки компонентам
|
|
17
|
+
* внутри.
|
|
18
|
+
*
|
|
19
|
+
* ```vue
|
|
20
|
+
* <LocaleProvider :locale="current">
|
|
21
|
+
* <RouterView />
|
|
22
|
+
* </LocaleProvider>
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Источник локали (`TLocaleSource`) у провайдера свой: он создаётся с
|
|
26
|
+
* провайдером и уходит детям через `provide`, а сборка каждого компонента
|
|
27
|
+
* отдаёт его набору плагинов. Сменили проп — провайдер пишет новую локаль в
|
|
28
|
+
* источник, и плагины языка и имён переписывают компонентам тег и имена на
|
|
29
|
+
* лету, без перемонтирования. Источник один на провайдер, а не на процесс:
|
|
30
|
+
* сервер рисует параллельные запросы каждый на своём языке, а вложенный
|
|
31
|
+
* провайдер даёт поддереву свой. Без провайдера компоненты — на английском.
|
|
32
|
+
*
|
|
33
|
+
* Провайдер — механизм фреймворка (`provide`, `watch`), поэтому он в
|
|
34
|
+
* адаптерном слое, а не среди компонентов. Своей разметки у него нет:
|
|
35
|
+
* рисует он только содержимое. Экземпляр снаружи закрыт, как у компонентов.
|
|
36
|
+
*/
|
|
37
|
+
export declare const LocaleProvider: TClosedComponent<typeof LocaleProviderComponent>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { LOCALE_KEY } from "./key.js";
|
|
2
|
+
import { useExpose } from "../static/useExpose.js";
|
|
3
|
+
import { defineComponent, provide, watch } from "vue";
|
|
4
|
+
import { TLocaleSource } from "@soxa-ui/plugins";
|
|
5
|
+
/**
|
|
6
|
+
* LocaleProvider — локаль поддерева: язык и строки библиотеки компонентам
|
|
7
|
+
* внутри.
|
|
8
|
+
*
|
|
9
|
+
* ```vue
|
|
10
|
+
* <LocaleProvider :locale="current">
|
|
11
|
+
* <RouterView />
|
|
12
|
+
* </LocaleProvider>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Источник локали (`TLocaleSource`) у провайдера свой: он создаётся с
|
|
16
|
+
* провайдером и уходит детям через `provide`, а сборка каждого компонента
|
|
17
|
+
* отдаёт его набору плагинов. Сменили проп — провайдер пишет новую локаль в
|
|
18
|
+
* источник, и плагины языка и имён переписывают компонентам тег и имена на
|
|
19
|
+
* лету, без перемонтирования. Источник один на провайдер, а не на процесс:
|
|
20
|
+
* сервер рисует параллельные запросы каждый на своём языке, а вложенный
|
|
21
|
+
* провайдер даёт поддереву свой. Без провайдера компоненты — на английском.
|
|
22
|
+
*
|
|
23
|
+
* Провайдер — механизм фреймворка (`provide`, `watch`), поэтому он в
|
|
24
|
+
* адаптерном слое, а не среди компонентов. Своей разметки у него нет:
|
|
25
|
+
* рисует он только содержимое. Экземпляр снаружи закрыт, как у компонентов.
|
|
26
|
+
*/
|
|
27
|
+
var LocaleProvider = defineComponent({
|
|
28
|
+
name: "LocaleProvider",
|
|
29
|
+
props: ["locale"],
|
|
30
|
+
expose: useExpose(),
|
|
31
|
+
setup(props, { slots }) {
|
|
32
|
+
const source = new TLocaleSource(props.locale);
|
|
33
|
+
provide(LOCALE_KEY, source);
|
|
34
|
+
watch(() => props.locale, (locale) => {
|
|
35
|
+
source.locale = locale;
|
|
36
|
+
});
|
|
37
|
+
return () => slots.default?.();
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
//#endregion
|
|
41
|
+
export { LocaleProvider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { ILocaleSource } from '@soxa-ui/plugins';
|
|
3
|
+
/**
|
|
4
|
+
* Ключ локали поддерева: под ним `LocaleProvider` отдаёт детям свой источник,
|
|
5
|
+
* а сборка компонента (`createVueAdapterContext`) берёт ближайший.
|
|
6
|
+
*/
|
|
7
|
+
export declare const LOCALE_KEY: InjectionKey<ILocaleSource>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/adapter/locale/key.ts
|
|
2
|
+
/**
|
|
3
|
+
* Ключ локали поддерева: под ним `LocaleProvider` отдаёт детям свой источник,
|
|
4
|
+
* а сборка компонента (`createVueAdapterContext`) берёт ближайший.
|
|
5
|
+
*/
|
|
6
|
+
var LOCALE_KEY = Symbol("soxa:locale");
|
|
7
|
+
//#endregion
|
|
8
|
+
export { LOCALE_KEY };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Ref, SetupContext } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* `$el` экземпляра — корень компонента, когда корень шаблона не он.
|
|
4
|
+
*
|
|
5
|
+
* Путь потребителя к корню во Vue — `$el` экземпляра из `ref`, и даёт его сам
|
|
6
|
+
* Vue: первый узел шаблона. У Frame, Dialog и Drawer первый узел шаблона —
|
|
7
|
+
* `<teleport>`, и `$el` — его якорь в разметке родителя, узел-комментарий, а
|
|
8
|
+
* панель телепортирована в другое место. Переопределить `$el` можно только
|
|
9
|
+
* через `expose`: прокси экземпляра читает открытый ключ раньше свойств Vue.
|
|
10
|
+
* Больше экземпляр ничего не открывает (`useExpose`).
|
|
11
|
+
*
|
|
12
|
+
* Узел — из ссылки адаптера на корень, той, что привязана к `TElementPlugin`.
|
|
13
|
+
* Читается он через ссылку: сменился `tag` — `$el` отдаёт новый узел, корень
|
|
14
|
+
* не отрисован — `null`.
|
|
15
|
+
*
|
|
16
|
+
* Отдельная функция, а не флаг `useAdapter`: `expose()` зовётся один раз на
|
|
17
|
+
* `setup()`, а `useAdapter` у элемента коллекции зовётся дважды. Корень, который
|
|
18
|
+
* Vue и так отдаёт верно, через неё не открывают: у Table `$el` — окно, внешний
|
|
19
|
+
* узел, а к `TElementPlugin` привязана `table` внутри него.
|
|
20
|
+
*/
|
|
21
|
+
export declare function exposeRoot(expose: SetupContext['expose'], rootElement: Ref<Element | null> | undefined): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/adapter/runtime/exposeRoot.ts
|
|
2
|
+
/**
|
|
3
|
+
* `$el` экземпляра — корень компонента, когда корень шаблона не он.
|
|
4
|
+
*
|
|
5
|
+
* Путь потребителя к корню во Vue — `$el` экземпляра из `ref`, и даёт его сам
|
|
6
|
+
* Vue: первый узел шаблона. У Frame, Dialog и Drawer первый узел шаблона —
|
|
7
|
+
* `<teleport>`, и `$el` — его якорь в разметке родителя, узел-комментарий, а
|
|
8
|
+
* панель телепортирована в другое место. Переопределить `$el` можно только
|
|
9
|
+
* через `expose`: прокси экземпляра читает открытый ключ раньше свойств Vue.
|
|
10
|
+
* Больше экземпляр ничего не открывает (`useExpose`).
|
|
11
|
+
*
|
|
12
|
+
* Узел — из ссылки адаптера на корень, той, что привязана к `TElementPlugin`.
|
|
13
|
+
* Читается он через ссылку: сменился `tag` — `$el` отдаёт новый узел, корень
|
|
14
|
+
* не отрисован — `null`.
|
|
15
|
+
*
|
|
16
|
+
* Отдельная функция, а не флаг `useAdapter`: `expose()` зовётся один раз на
|
|
17
|
+
* `setup()`, а `useAdapter` у элемента коллекции зовётся дважды. Корень, который
|
|
18
|
+
* Vue и так отдаёт верно, через неё не открывают: у Table `$el` — окно, внешний
|
|
19
|
+
* узел, а к `TElementPlugin` привязана `table` внутри него.
|
|
20
|
+
*/
|
|
21
|
+
function exposeRoot(expose, rootElement) {
|
|
22
|
+
expose({ $el: rootElement ?? null });
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { exposeRoot };
|