@soxa-ui/solid 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 +266 -2
- package/dist/adapter/common/ResolvedSlot.d.ts +29 -0
- package/dist/adapter/common/ResolvedSlot.js +42 -0
- package/dist/adapter/common/click-action.d.ts +6 -0
- package/dist/adapter/common/click-action.js +11 -0
- package/dist/adapter/common/createSolidAdapterContext.d.ts +8 -0
- package/dist/adapter/common/createSolidAdapterContext.js +20 -0
- package/dist/adapter/common/handlers.d.ts +10 -0
- package/dist/adapter/common/handlers.js +10 -0
- package/dist/adapter/common/hydration.d.ts +23 -0
- package/dist/adapter/common/hydration.js +44 -0
- package/dist/adapter/common/icon.d.ts +9 -0
- package/dist/adapter/common/icon.js +28 -0
- package/dist/adapter/common/index.d.ts +9 -0
- package/dist/adapter/common/naming.d.ts +3 -0
- package/dist/adapter/common/naming.js +9 -0
- package/dist/adapter/common/profile.d.ts +3 -0
- package/dist/adapter/common/profile.js +9 -0
- package/dist/adapter/common/root.d.ts +96 -0
- package/dist/adapter/common/root.js +128 -0
- package/dist/adapter/common/slots.d.ts +30 -0
- package/dist/adapter/common/slots.js +75 -0
- package/dist/adapter/elevator/Elevate.d.ts +12 -0
- package/dist/adapter/elevator/Elevate.js +16 -0
- package/dist/adapter/elevator/elevator.class.d.ts +17 -0
- package/dist/adapter/elevator/elevator.class.js +27 -0
- package/dist/adapter/elevator/index.d.ts +4 -0
- package/dist/adapter/elevator/layer.d.ts +16 -0
- package/dist/adapter/elevator/layer.js +28 -0
- package/dist/adapter/elevator/useElevator.d.ts +13 -0
- package/dist/adapter/elevator/useElevator.js +19 -0
- package/dist/adapter/index.d.ts +5 -0
- package/dist/adapter/locale/LocaleProvider.d.ts +22 -0
- package/dist/adapter/locale/LocaleProvider.js +33 -0
- package/dist/adapter/locale/context.d.ts +4 -0
- package/dist/adapter/locale/context.js +9 -0
- package/dist/adapter/locale/index.d.ts +2 -0
- package/dist/adapter/runtime/KeyedFor.d.ts +14 -0
- package/dist/adapter/runtime/KeyedFor.js +54 -0
- package/dist/adapter/runtime/Root.d.ts +20 -0
- package/dist/adapter/runtime/Root.js +43 -0
- package/dist/adapter/runtime/Teleport.d.ts +14 -0
- package/dist/adapter/runtime/Teleport.js +45 -0
- package/dist/adapter/runtime/field-text.d.ts +22 -0
- package/dist/adapter/runtime/field-text.js +38 -0
- package/dist/adapter/runtime/flow.d.ts +34 -0
- package/dist/adapter/runtime/flow.js +70 -0
- package/dist/adapter/runtime/index.d.ts +8 -0
- package/dist/adapter/runtime/part-node.d.ts +38 -0
- package/dist/adapter/runtime/part-node.js +76 -0
- package/dist/adapter/runtime/state.d.ts +43 -0
- package/dist/adapter/runtime/state.js +116 -0
- package/dist/adapter/runtime/tag.d.ts +11 -0
- package/dist/adapter/runtime/tag.js +11 -0
- package/dist/adapter/runtime/useAdapter.d.ts +74 -0
- package/dist/adapter/runtime/useAdapter.js +110 -0
- package/dist/adapter/toasts/index.d.ts +3 -0
- package/dist/adapter/toasts/render.d.ts +3 -0
- package/dist/adapter/toasts/render.js +7 -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 +15 -0
- package/dist/components/accordion/Accordion.d.ts +4 -0
- package/dist/components/accordion/Accordion.js +71 -0
- package/dist/components/accordion/base.component.d.ts +7 -0
- package/dist/components/accordion/index.d.ts +8 -0
- package/dist/components/accordion/index.js +9 -0
- package/dist/components/accordion/item/Item.d.ts +7 -0
- package/dist/components/accordion/item/Item.js +110 -0
- package/dist/components/accordion/item/base.component.d.ts +9 -0
- package/dist/components/accordion/item/index.d.ts +3 -0
- package/dist/components/accordion/item/setup.component.d.ts +39 -0
- package/dist/components/accordion/item/setup.component.js +24 -0
- package/dist/components/accordion/setup.component.d.ts +35 -0
- package/dist/components/accordion/setup.component.js +27 -0
- package/dist/components/button/Button.d.ts +12 -0
- package/dist/components/button/Button.js +59 -0
- package/dist/components/button/base.component.d.ts +8 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/setup.component.d.ts +22 -0
- package/dist/components/button/setup.component.js +13 -0
- package/dist/components/calendar/Calendar.d.ts +8 -0
- package/dist/components/calendar/Calendar.js +335 -0
- package/dist/components/calendar/base.component.d.ts +7 -0
- package/dist/components/calendar/index.d.ts +8 -0
- package/dist/components/calendar/index.js +9 -0
- package/dist/components/calendar/item/Item.d.ts +8 -0
- package/dist/components/calendar/item/Item.js +51 -0
- package/dist/components/calendar/item/base.component.d.ts +7 -0
- package/dist/components/calendar/item/index.d.ts +3 -0
- package/dist/components/calendar/item/setup.component.d.ts +13 -0
- package/dist/components/calendar/item/setup.component.js +21 -0
- package/dist/components/calendar/setup.component.d.ts +36 -0
- package/dist/components/calendar/setup.component.js +28 -0
- package/dist/components/check-box/CheckBox.d.ts +8 -0
- package/dist/components/check-box/CheckBox.js +97 -0
- package/dist/components/check-box/base.component.d.ts +8 -0
- package/dist/components/check-box/index.d.ts +3 -0
- package/dist/components/check-box/setup.component.d.ts +35 -0
- package/dist/components/check-box/setup.component.js +18 -0
- package/dist/components/component/base.component.d.ts +6 -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 +43 -0
- package/dist/components/component-view/base.component.d.ts +6 -0
- package/dist/components/component-view/index.d.ts +3 -0
- package/dist/components/component-view/setup.component.d.ts +9 -0
- package/dist/components/component-view/setup.component.js +13 -0
- package/dist/components/control/base.component.d.ts +6 -0
- package/dist/components/control/index.d.ts +2 -0
- package/dist/components/control/setup.component.d.ts +22 -0
- package/dist/components/date-input/DateInput.d.ts +7 -0
- package/dist/components/date-input/DateInput.js +203 -0
- package/dist/components/date-input/base.component.d.ts +7 -0
- package/dist/components/date-input/index.d.ts +3 -0
- package/dist/components/date-input/setup.component.d.ts +36 -0
- package/dist/components/date-input/setup.component.js +19 -0
- package/dist/components/date-picker/DatePicker.d.ts +7 -0
- package/dist/components/date-picker/DatePicker.js +273 -0
- package/dist/components/date-picker/base.component.d.ts +7 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/setup.component.d.ts +58 -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 +160 -0
- package/dist/components/dialog/base.component.d.ts +7 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/setup.component.d.ts +29 -0
- package/dist/components/dialog/setup.component.js +13 -0
- package/dist/components/drag-and-drop/DragAndDrop.d.ts +4 -0
- package/dist/components/drag-and-drop/DragAndDrop.js +19 -0
- package/dist/components/drag-and-drop/base.component.d.ts +7 -0
- package/dist/components/drag-and-drop/index.d.ts +3 -0
- package/dist/components/drag-and-drop/setup.component.d.ts +11 -0
- package/dist/components/drag-and-drop/setup.component.js +21 -0
- package/dist/components/drawer/Drawer.d.ts +4 -0
- package/dist/components/drawer/Drawer.js +131 -0
- package/dist/components/drawer/base.component.d.ts +7 -0
- package/dist/components/drawer/index.d.ts +3 -0
- package/dist/components/drawer/setup.component.d.ts +29 -0
- package/dist/components/drawer/setup.component.js +13 -0
- package/dist/components/field/Field.d.ts +4 -0
- package/dist/components/field/Field.js +112 -0
- package/dist/components/field/base.component.d.ts +6 -0
- package/dist/components/field/index.d.ts +3 -0
- package/dist/components/field/setup.component.d.ts +18 -0
- package/dist/components/field/setup.component.js +18 -0
- package/dist/components/frame/Frame.d.ts +4 -0
- package/dist/components/frame/Frame.js +54 -0
- package/dist/components/frame/base.component.d.ts +6 -0
- package/dist/components/frame/index.d.ts +3 -0
- package/dist/components/frame/setup.component.d.ts +33 -0
- package/dist/components/frame/setup.component.js +13 -0
- package/dist/components/icon/Icon.d.ts +7 -0
- package/dist/components/icon/Icon.js +38 -0
- package/dist/components/icon/base.component.d.ts +6 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/icon/setup.component.d.ts +19 -0
- package/dist/components/icon/setup.component.js +13 -0
- package/dist/components/index.d.ts +43 -0
- package/dist/components/input/Input.d.ts +8 -0
- package/dist/components/input/Input.js +159 -0
- package/dist/components/input/base.component.d.ts +8 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/setup.component.d.ts +35 -0
- package/dist/components/input/setup.component.js +18 -0
- package/dist/components/input-control/base.component.d.ts +7 -0
- package/dist/components/input-control/index.d.ts +2 -0
- package/dist/components/input-control/setup.component.d.ts +26 -0
- package/dist/components/interactive/base.component.d.ts +6 -0
- package/dist/components/interactive/index.d.ts +2 -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 +18 -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 +13 -0
- package/dist/components/label/Label.d.ts +8 -0
- package/dist/components/label/Label.js +58 -0
- package/dist/components/label/base.component.d.ts +6 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/setup.component.d.ts +9 -0
- package/dist/components/label/setup.component.js +13 -0
- package/dist/components/list-box/ListBox.d.ts +8 -0
- package/dist/components/list-box/ListBox.js +160 -0
- package/dist/components/list-box/base.component.d.ts +9 -0
- package/dist/components/list-box/group/Group.d.ts +4 -0
- package/dist/components/list-box/group/Group.js +63 -0
- package/dist/components/list-box/group/base.component.d.ts +7 -0
- package/dist/components/list-box/group/index.d.ts +3 -0
- package/dist/components/list-box/group/setup.component.d.ts +19 -0
- package/dist/components/list-box/group/setup.component.js +19 -0
- package/dist/components/list-box/index.d.ts +11 -0
- package/dist/components/list-box/index.js +14 -0
- package/dist/components/list-box/item/Item.d.ts +8 -0
- package/dist/components/list-box/item/Item.js +97 -0
- package/dist/components/list-box/item/base.component.d.ts +9 -0
- package/dist/components/list-box/item/index.d.ts +3 -0
- package/dist/components/list-box/item/setup.component.d.ts +42 -0
- package/dist/components/list-box/item/setup.component.js +25 -0
- package/dist/components/list-box/setup.component.d.ts +35 -0
- package/dist/components/list-box/setup.component.js +27 -0
- package/dist/components/menu/Menu.d.ts +8 -0
- package/dist/components/menu/Menu.js +97 -0
- package/dist/components/menu/base.component.d.ts +7 -0
- package/dist/components/menu/checkbox-item/CheckboxItem.d.ts +7 -0
- package/dist/components/menu/checkbox-item/CheckboxItem.js +98 -0
- package/dist/components/menu/checkbox-item/base.component.d.ts +9 -0
- package/dist/components/menu/checkbox-item/index.d.ts +3 -0
- package/dist/components/menu/checkbox-item/setup.component.d.ts +37 -0
- package/dist/components/menu/checkbox-item/setup.component.js +24 -0
- package/dist/components/menu/group/Group.d.ts +4 -0
- package/dist/components/menu/group/Group.js +63 -0
- package/dist/components/menu/group/base.component.d.ts +7 -0
- package/dist/components/menu/group/index.d.ts +3 -0
- package/dist/components/menu/group/setup.component.d.ts +18 -0
- package/dist/components/menu/group/setup.component.js +18 -0
- package/dist/components/menu/index.d.ts +29 -0
- package/dist/components/menu/index.js +32 -0
- package/dist/components/menu/item/Item.d.ts +7 -0
- package/dist/components/menu/item/Item.js +79 -0
- package/dist/components/menu/item/base.component.d.ts +9 -0
- package/dist/components/menu/item/index.d.ts +3 -0
- package/dist/components/menu/item/setup.component.d.ts +37 -0
- package/dist/components/menu/item/setup.component.js +24 -0
- package/dist/components/menu/popover-item/PopoverItem.d.ts +7 -0
- package/dist/components/menu/popover-item/PopoverItem.js +118 -0
- package/dist/components/menu/popover-item/base.component.d.ts +9 -0
- package/dist/components/menu/popover-item/index.d.ts +3 -0
- package/dist/components/menu/popover-item/setup.component.d.ts +48 -0
- package/dist/components/menu/popover-item/setup.component.js +24 -0
- package/dist/components/menu/radio-group/RadioGroup.d.ts +4 -0
- package/dist/components/menu/radio-group/RadioGroup.js +63 -0
- package/dist/components/menu/radio-group/base.component.d.ts +7 -0
- package/dist/components/menu/radio-group/index.d.ts +3 -0
- package/dist/components/menu/radio-group/setup.component.d.ts +18 -0
- package/dist/components/menu/radio-group/setup.component.js +18 -0
- package/dist/components/menu/radio-item/RadioItem.d.ts +4 -0
- package/dist/components/menu/radio-item/RadioItem.js +86 -0
- package/dist/components/menu/radio-item/base.component.d.ts +9 -0
- package/dist/components/menu/radio-item/index.d.ts +3 -0
- package/dist/components/menu/radio-item/setup.component.d.ts +37 -0
- package/dist/components/menu/radio-item/setup.component.js +24 -0
- package/dist/components/menu/separator/Separator.d.ts +4 -0
- package/dist/components/menu/separator/Separator.js +39 -0
- package/dist/components/menu/separator/base.component.d.ts +7 -0
- package/dist/components/menu/separator/index.d.ts +3 -0
- package/dist/components/menu/separator/setup.component.d.ts +9 -0
- package/dist/components/menu/separator/setup.component.js +13 -0
- package/dist/components/menu/setup.component.d.ts +29 -0
- package/dist/components/menu/setup.component.js +27 -0
- package/dist/components/menu/submenu/Submenu.d.ts +23 -0
- package/dist/components/menu/submenu/Submenu.js +240 -0
- package/dist/components/menu/submenu/base.component.d.ts +9 -0
- package/dist/components/menu/submenu/index.d.ts +3 -0
- package/dist/components/menu/submenu/setup.component.d.ts +54 -0
- package/dist/components/menu/submenu/setup.component.js +34 -0
- package/dist/components/number-input/NumberInput.d.ts +8 -0
- package/dist/components/number-input/NumberInput.js +220 -0
- package/dist/components/number-input/base.component.d.ts +8 -0
- package/dist/components/number-input/index.d.ts +3 -0
- package/dist/components/number-input/setup.component.d.ts +35 -0
- package/dist/components/number-input/setup.component.js +18 -0
- package/dist/components/pagination/Pagination.d.ts +4 -0
- package/dist/components/pagination/Pagination.js +155 -0
- package/dist/components/pagination/base.component.d.ts +7 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/item/Item.d.ts +4 -0
- package/dist/components/pagination/item/Item.js +63 -0
- package/dist/components/pagination/item/base.component.d.ts +7 -0
- package/dist/components/pagination/item/index.d.ts +3 -0
- package/dist/components/pagination/item/setup.component.d.ts +22 -0
- package/dist/components/pagination/item/setup.component.js +24 -0
- package/dist/components/pagination/setup.component.d.ts +35 -0
- package/dist/components/pagination/setup.component.js +27 -0
- package/dist/components/popover/Popover.d.ts +7 -0
- package/dist/components/popover/Popover.js +120 -0
- package/dist/components/popover/base.component.d.ts +7 -0
- package/dist/components/popover/index.d.ts +3 -0
- package/dist/components/popover/setup.component.d.ts +24 -0
- package/dist/components/popover/setup.component.js +13 -0
- package/dist/components/progress-linear/ProgressLinear.d.ts +4 -0
- package/dist/components/progress-linear/ProgressLinear.js +44 -0
- package/dist/components/progress-linear/base.component.d.ts +6 -0
- package/dist/components/progress-linear/index.d.ts +3 -0
- package/dist/components/progress-linear/setup.component.d.ts +17 -0
- package/dist/components/progress-linear/setup.component.js +13 -0
- package/dist/components/progress-spinner/ProgressSpinner.d.ts +4 -0
- package/dist/components/progress-spinner/ProgressSpinner.js +44 -0
- package/dist/components/progress-spinner/base.component.d.ts +6 -0
- package/dist/components/progress-spinner/index.d.ts +3 -0
- package/dist/components/progress-spinner/setup.component.d.ts +17 -0
- package/dist/components/progress-spinner/setup.component.js +13 -0
- package/dist/components/radio-group/RadioGroup.d.ts +4 -0
- package/dist/components/radio-group/RadioGroup.js +70 -0
- package/dist/components/radio-group/base.component.d.ts +7 -0
- package/dist/components/radio-group/index.d.ts +8 -0
- package/dist/components/radio-group/index.js +9 -0
- package/dist/components/radio-group/item/Item.d.ts +7 -0
- package/dist/components/radio-group/item/Item.js +87 -0
- package/dist/components/radio-group/item/base.component.d.ts +9 -0
- package/dist/components/radio-group/item/index.d.ts +3 -0
- package/dist/components/radio-group/item/setup.component.d.ts +35 -0
- package/dist/components/radio-group/item/setup.component.js +24 -0
- package/dist/components/radio-group/setup.component.d.ts +35 -0
- package/dist/components/radio-group/setup.component.js +27 -0
- package/dist/components/rating/Rating.d.ts +7 -0
- package/dist/components/rating/Rating.js +99 -0
- package/dist/components/rating/base.component.d.ts +7 -0
- package/dist/components/rating/index.d.ts +3 -0
- package/dist/components/rating/setup.component.d.ts +35 -0
- package/dist/components/rating/setup.component.js +18 -0
- package/dist/components/scroller/Scroller.d.ts +11 -0
- package/dist/components/scroller/Scroller.js +106 -0
- package/dist/components/scroller/base.component.d.ts +7 -0
- package/dist/components/scroller/index.d.ts +3 -0
- package/dist/components/scroller/setup.component.d.ts +22 -0
- package/dist/components/scroller/setup.component.js +13 -0
- package/dist/components/select/Select.d.ts +8 -0
- package/dist/components/select/Select.js +269 -0
- package/dist/components/select/base.component.d.ts +9 -0
- package/dist/components/select/group/Group.d.ts +4 -0
- package/dist/components/select/group/Group.js +63 -0
- package/dist/components/select/group/base.component.d.ts +7 -0
- package/dist/components/select/group/index.d.ts +3 -0
- package/dist/components/select/group/setup.component.d.ts +18 -0
- package/dist/components/select/group/setup.component.js +18 -0
- package/dist/components/select/index.d.ts +11 -0
- package/dist/components/select/index.js +14 -0
- package/dist/components/select/item/Item.d.ts +9 -0
- package/dist/components/select/item/Item.js +94 -0
- package/dist/components/select/item/base.component.d.ts +9 -0
- package/dist/components/select/item/index.d.ts +3 -0
- package/dist/components/select/item/setup.component.d.ts +41 -0
- package/dist/components/select/item/setup.component.js +24 -0
- package/dist/components/select/setup.component.d.ts +55 -0
- package/dist/components/select/setup.component.js +28 -0
- package/dist/components/skeleton/Skeleton.d.ts +7 -0
- package/dist/components/skeleton/Skeleton.js +46 -0
- package/dist/components/skeleton/base.component.d.ts +6 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/setup.component.d.ts +11 -0
- package/dist/components/skeleton/setup.component.js +13 -0
- package/dist/components/slider/Slider.d.ts +7 -0
- package/dist/components/slider/Slider.js +149 -0
- package/dist/components/slider/base.component.d.ts +7 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/setup.component.d.ts +31 -0
- package/dist/components/slider/setup.component.js +18 -0
- package/dist/components/stylable/base.component.d.ts +6 -0
- package/dist/components/stylable/index.d.ts +2 -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 +89 -0
- package/dist/components/switch/base.component.d.ts +8 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/setup.component.d.ts +35 -0
- package/dist/components/switch/setup.component.js +18 -0
- package/dist/components/table/Table.d.ts +8 -0
- package/dist/components/table/Table.js +178 -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 +110 -0
- package/dist/components/table/column/base.component.d.ts +7 -0
- package/dist/components/table/column/index.d.ts +3 -0
- package/dist/components/table/column/setup.component.d.ts +22 -0
- package/dist/components/table/column/setup.component.js +20 -0
- package/dist/components/table/index.d.ts +11 -0
- package/dist/components/table/index.js +14 -0
- package/dist/components/table/row/Cells.d.ts +17 -0
- package/dist/components/table/row/Cells.js +61 -0
- package/dist/components/table/row/Row.d.ts +7 -0
- package/dist/components/table/row/Row.js +80 -0
- package/dist/components/table/row/base.component.d.ts +7 -0
- package/dist/components/table/row/index.d.ts +3 -0
- package/dist/components/table/row/setup.component.d.ts +23 -0
- package/dist/components/table/row/setup.component.js +25 -0
- package/dist/components/table/setup.component.d.ts +39 -0
- package/dist/components/table/setup.component.js +29 -0
- package/dist/components/tabs/Tabs.d.ts +10 -0
- package/dist/components/tabs/Tabs.js +104 -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 +39 -0
- package/dist/components/tabs/content/base.component.d.ts +7 -0
- package/dist/components/tabs/content/index.d.ts +3 -0
- package/dist/components/tabs/content/setup.component.d.ts +18 -0
- package/dist/components/tabs/content/setup.component.js +22 -0
- package/dist/components/tabs/index.d.ts +11 -0
- package/dist/components/tabs/index.js +14 -0
- package/dist/components/tabs/item/Item.d.ts +8 -0
- package/dist/components/tabs/item/Item.js +115 -0
- package/dist/components/tabs/item/base.component.d.ts +9 -0
- package/dist/components/tabs/item/index.d.ts +3 -0
- package/dist/components/tabs/item/setup.component.d.ts +39 -0
- package/dist/components/tabs/item/setup.component.js +24 -0
- package/dist/components/tabs/setup.component.d.ts +35 -0
- package/dist/components/tabs/setup.component.js +27 -0
- package/dist/components/tags/Tags.d.ts +7 -0
- package/dist/components/tags/Tags.js +76 -0
- package/dist/components/tags/base.component.d.ts +7 -0
- package/dist/components/tags/index.d.ts +8 -0
- package/dist/components/tags/index.js +9 -0
- package/dist/components/tags/item/Item.d.ts +9 -0
- package/dist/components/tags/item/Item.js +118 -0
- package/dist/components/tags/item/base.component.d.ts +9 -0
- package/dist/components/tags/item/index.d.ts +3 -0
- package/dist/components/tags/item/setup.component.d.ts +35 -0
- package/dist/components/tags/item/setup.component.js +24 -0
- package/dist/components/tags/setup.component.d.ts +35 -0
- package/dist/components/tags/setup.component.js +27 -0
- package/dist/components/textable/base.component.d.ts +6 -0
- package/dist/components/textable/index.d.ts +2 -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 +84 -0
- package/dist/components/textarea/base.component.d.ts +8 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/setup.component.d.ts +28 -0
- package/dist/components/textarea/setup.component.js +15 -0
- package/dist/components/toasts/Toasts.d.ts +7 -0
- package/dist/components/toasts/Toasts.js +85 -0
- package/dist/components/toasts/base.component.d.ts +7 -0
- package/dist/components/toasts/index.d.ts +3 -0
- package/dist/components/toasts/item/Item.d.ts +7 -0
- package/dist/components/toasts/item/Item.js +122 -0
- package/dist/components/toasts/item/base.component.d.ts +7 -0
- package/dist/components/toasts/item/index.d.ts +3 -0
- package/dist/components/toasts/item/setup.component.d.ts +13 -0
- package/dist/components/toasts/item/setup.component.js +21 -0
- package/dist/components/toasts/setup.component.d.ts +24 -0
- package/dist/components/toasts/setup.component.js +27 -0
- package/dist/components/tooltip/Tooltip.d.ts +4 -0
- package/dist/components/tooltip/Tooltip.js +60 -0
- package/dist/components/tooltip/base.component.d.ts +7 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/setup.component.d.ts +16 -0
- package/dist/components/tooltip/setup.component.js +13 -0
- package/dist/components/value-control/base.component.d.ts +7 -0
- package/dist/components/value-control/index.d.ts +2 -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 +19 -0
- package/dist/components/virtual/base.component.d.ts +7 -0
- package/dist/components/virtual/index.d.ts +3 -0
- package/dist/components/virtual/setup.component.d.ts +11 -0
- package/dist/components/virtual/setup.component.js +21 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +60 -0
- package/dist/source/adapter/common/ResolvedSlot.jsx +31 -0
- package/dist/source/adapter/common/click-action.js +8 -0
- package/dist/source/adapter/common/createSolidAdapterContext.js +18 -0
- package/dist/source/adapter/common/handlers.js +13 -0
- package/dist/source/adapter/common/hydration.js +42 -0
- package/dist/source/adapter/common/icon.jsx +19 -0
- package/dist/source/adapter/common/index.js +9 -0
- package/dist/source/adapter/common/naming.js +6 -0
- package/dist/source/adapter/common/profile.js +3 -0
- package/dist/source/adapter/common/root.js +113 -0
- package/dist/source/adapter/common/slots.js +74 -0
- package/dist/source/adapter/elevator/Elevate.jsx +11 -0
- package/dist/source/adapter/elevator/elevator.class.js +25 -0
- package/dist/source/adapter/elevator/index.js +3 -0
- package/dist/source/adapter/elevator/layer.js +25 -0
- package/dist/source/adapter/elevator/useElevator.js +16 -0
- package/dist/source/adapter/index.js +5 -0
- package/dist/source/adapter/locale/LocaleProvider.jsx +24 -0
- package/dist/source/adapter/locale/context.js +6 -0
- package/dist/source/adapter/locale/index.js +1 -0
- package/dist/source/adapter/runtime/KeyedFor.jsx +60 -0
- package/dist/source/adapter/runtime/Root.jsx +51 -0
- package/dist/source/adapter/runtime/Teleport.jsx +28 -0
- package/dist/source/adapter/runtime/field-text.js +44 -0
- package/dist/source/adapter/runtime/flow.js +74 -0
- package/dist/source/adapter/runtime/index.js +8 -0
- package/dist/source/adapter/runtime/part-node.js +82 -0
- package/dist/source/adapter/runtime/state.js +127 -0
- package/dist/source/adapter/runtime/tag.js +10 -0
- package/dist/source/adapter/runtime/useAdapter.js +116 -0
- package/dist/source/adapter/toasts/index.js +2 -0
- package/dist/source/adapter/toasts/render.js +4 -0
- package/dist/source/adapter/toasts/types.js +1 -0
- package/dist/source/adapter/toasts/useToasts.js +14 -0
- package/dist/source/components/accordion/Accordion.jsx +27 -0
- package/dist/source/components/accordion/base.component.js +1 -0
- package/dist/source/components/accordion/index.js +7 -0
- package/dist/source/components/accordion/item/Item.jsx +51 -0
- package/dist/source/components/accordion/item/base.component.js +1 -0
- package/dist/source/components/accordion/item/index.js +3 -0
- package/dist/source/components/accordion/item/setup.component.js +13 -0
- package/dist/source/components/accordion/setup.component.js +15 -0
- package/dist/source/components/button/Button.jsx +27 -0
- package/dist/source/components/button/base.component.js +1 -0
- package/dist/source/components/button/index.js +3 -0
- package/dist/source/components/button/setup.component.js +6 -0
- package/dist/source/components/calendar/Calendar.jsx +115 -0
- package/dist/source/components/calendar/base.component.js +1 -0
- package/dist/source/components/calendar/index.js +7 -0
- package/dist/source/components/calendar/item/Item.jsx +23 -0
- package/dist/source/components/calendar/item/base.component.js +1 -0
- package/dist/source/components/calendar/item/index.js +3 -0
- package/dist/source/components/calendar/item/setup.component.js +13 -0
- package/dist/source/components/calendar/setup.component.js +17 -0
- package/dist/source/components/check-box/CheckBox.jsx +52 -0
- package/dist/source/components/check-box/base.component.js +1 -0
- package/dist/source/components/check-box/index.js +3 -0
- package/dist/source/components/check-box/setup.component.js +10 -0
- package/dist/source/components/component/base.component.js +1 -0
- package/dist/source/components/component/index.js +1 -0
- package/dist/source/components/component-view/ComponentView.jsx +18 -0
- package/dist/source/components/component-view/base.component.js +1 -0
- package/dist/source/components/component-view/index.js +3 -0
- package/dist/source/components/component-view/setup.component.js +9 -0
- package/dist/source/components/control/base.component.js +1 -0
- package/dist/source/components/control/index.js +2 -0
- package/dist/source/components/control/setup.component.js +6 -0
- package/dist/source/components/date-input/DateInput.jsx +78 -0
- package/dist/source/components/date-input/base.component.js +1 -0
- package/dist/source/components/date-input/index.js +3 -0
- package/dist/source/components/date-input/setup.component.js +11 -0
- package/dist/source/components/date-picker/DatePicker.jsx +86 -0
- package/dist/source/components/date-picker/base.component.js +1 -0
- package/dist/source/components/date-picker/index.js +3 -0
- package/dist/source/components/date-picker/setup.component.js +21 -0
- package/dist/source/components/dialog/Dialog.jsx +67 -0
- package/dist/source/components/dialog/base.component.js +1 -0
- package/dist/source/components/dialog/index.js +3 -0
- package/dist/source/components/dialog/setup.component.js +6 -0
- package/dist/source/components/drag-and-drop/DragAndDrop.jsx +7 -0
- package/dist/source/components/drag-and-drop/base.component.js +1 -0
- package/dist/source/components/drag-and-drop/index.js +3 -0
- package/dist/source/components/drag-and-drop/setup.component.js +12 -0
- package/dist/source/components/drawer/Drawer.jsx +52 -0
- package/dist/source/components/drawer/base.component.js +1 -0
- package/dist/source/components/drawer/index.js +3 -0
- package/dist/source/components/drawer/setup.component.js +6 -0
- package/dist/source/components/field/Field.jsx +48 -0
- package/dist/source/components/field/base.component.js +1 -0
- package/dist/source/components/field/index.js +3 -0
- package/dist/source/components/field/setup.component.js +10 -0
- package/dist/source/components/frame/Frame.jsx +20 -0
- package/dist/source/components/frame/base.component.js +1 -0
- package/dist/source/components/frame/index.js +3 -0
- package/dist/source/components/frame/setup.component.js +6 -0
- package/dist/source/components/icon/Icon.jsx +19 -0
- package/dist/source/components/icon/base.component.js +1 -0
- package/dist/source/components/icon/index.js +3 -0
- package/dist/source/components/icon/setup.component.js +6 -0
- package/dist/source/components/index.js +43 -0
- package/dist/source/components/input/Input.jsx +60 -0
- package/dist/source/components/input/base.component.js +1 -0
- package/dist/source/components/input/index.js +3 -0
- package/dist/source/components/input/setup.component.js +10 -0
- package/dist/source/components/input-control/base.component.js +1 -0
- package/dist/source/components/input-control/index.js +2 -0
- package/dist/source/components/input-control/setup.component.js +6 -0
- package/dist/source/components/interactive/base.component.js +1 -0
- package/dist/source/components/interactive/index.js +2 -0
- package/dist/source/components/interactive/setup.component.js +6 -0
- package/dist/source/components/item-row/ItemRow.jsx +15 -0
- package/dist/source/components/item-row/index.js +2 -0
- package/dist/source/components/item-row/setup.component.js +6 -0
- package/dist/source/components/label/Label.jsx +24 -0
- package/dist/source/components/label/base.component.js +1 -0
- package/dist/source/components/label/index.js +3 -0
- package/dist/source/components/label/setup.component.js +6 -0
- package/dist/source/components/list-box/ListBox.jsx +70 -0
- package/dist/source/components/list-box/base.component.js +1 -0
- package/dist/source/components/list-box/group/Group.jsx +24 -0
- package/dist/source/components/list-box/group/base.component.js +1 -0
- package/dist/source/components/list-box/group/index.js +3 -0
- package/dist/source/components/list-box/group/setup.component.js +11 -0
- package/dist/source/components/list-box/index.js +9 -0
- package/dist/source/components/list-box/item/Item.jsx +45 -0
- package/dist/source/components/list-box/item/base.component.js +1 -0
- package/dist/source/components/list-box/item/index.js +3 -0
- package/dist/source/components/list-box/item/setup.component.js +11 -0
- package/dist/source/components/list-box/setup.component.js +16 -0
- package/dist/source/components/menu/Menu.jsx +38 -0
- package/dist/source/components/menu/base.component.js +1 -0
- package/dist/source/components/menu/checkbox-item/CheckboxItem.jsx +39 -0
- package/dist/source/components/menu/checkbox-item/base.component.js +1 -0
- package/dist/source/components/menu/checkbox-item/index.js +3 -0
- package/dist/source/components/menu/checkbox-item/setup.component.js +13 -0
- package/dist/source/components/menu/group/Group.jsx +24 -0
- package/dist/source/components/menu/group/base.component.js +1 -0
- package/dist/source/components/menu/group/index.js +3 -0
- package/dist/source/components/menu/group/setup.component.js +10 -0
- package/dist/source/components/menu/index.js +30 -0
- package/dist/source/components/menu/item/Item.jsx +29 -0
- package/dist/source/components/menu/item/base.component.js +1 -0
- package/dist/source/components/menu/item/index.js +3 -0
- package/dist/source/components/menu/item/setup.component.js +10 -0
- package/dist/source/components/menu/popover-item/PopoverItem.jsx +41 -0
- package/dist/source/components/menu/popover-item/base.component.js +1 -0
- package/dist/source/components/menu/popover-item/index.js +3 -0
- package/dist/source/components/menu/popover-item/setup.component.js +13 -0
- package/dist/source/components/menu/radio-group/RadioGroup.jsx +24 -0
- package/dist/source/components/menu/radio-group/base.component.js +1 -0
- package/dist/source/components/menu/radio-group/index.js +3 -0
- package/dist/source/components/menu/radio-group/setup.component.js +12 -0
- package/dist/source/components/menu/radio-item/RadioItem.jsx +33 -0
- package/dist/source/components/menu/radio-item/base.component.js +1 -0
- package/dist/source/components/menu/radio-item/index.js +3 -0
- package/dist/source/components/menu/radio-item/setup.component.js +13 -0
- package/dist/source/components/menu/separator/Separator.jsx +16 -0
- package/dist/source/components/menu/separator/base.component.js +1 -0
- package/dist/source/components/menu/separator/index.js +3 -0
- package/dist/source/components/menu/separator/setup.component.js +9 -0
- package/dist/source/components/menu/setup.component.js +13 -0
- package/dist/source/components/menu/submenu/Submenu.jsx +74 -0
- package/dist/source/components/menu/submenu/base.component.js +1 -0
- package/dist/source/components/menu/submenu/index.js +3 -0
- package/dist/source/components/menu/submenu/setup.component.js +20 -0
- package/dist/source/components/number-input/NumberInput.jsx +75 -0
- package/dist/source/components/number-input/base.component.js +1 -0
- package/dist/source/components/number-input/index.js +3 -0
- package/dist/source/components/number-input/setup.component.js +10 -0
- package/dist/source/components/pagination/Pagination.jsx +56 -0
- package/dist/source/components/pagination/base.component.js +1 -0
- package/dist/source/components/pagination/index.js +3 -0
- package/dist/source/components/pagination/item/Item.jsx +27 -0
- package/dist/source/components/pagination/item/base.component.js +1 -0
- package/dist/source/components/pagination/item/index.js +3 -0
- package/dist/source/components/pagination/item/setup.component.js +13 -0
- package/dist/source/components/pagination/setup.component.js +16 -0
- package/dist/source/components/popover/Popover.jsx +50 -0
- package/dist/source/components/popover/base.component.js +1 -0
- package/dist/source/components/popover/index.js +3 -0
- package/dist/source/components/popover/setup.component.js +6 -0
- package/dist/source/components/progress-linear/ProgressLinear.jsx +20 -0
- package/dist/source/components/progress-linear/base.component.js +1 -0
- package/dist/source/components/progress-linear/index.js +3 -0
- package/dist/source/components/progress-linear/setup.component.js +9 -0
- package/dist/source/components/progress-spinner/ProgressSpinner.jsx +27 -0
- package/dist/source/components/progress-spinner/base.component.js +1 -0
- package/dist/source/components/progress-spinner/index.js +3 -0
- package/dist/source/components/progress-spinner/setup.component.js +9 -0
- package/dist/source/components/radio-group/RadioGroup.jsx +25 -0
- package/dist/source/components/radio-group/base.component.js +1 -0
- package/dist/source/components/radio-group/index.js +7 -0
- package/dist/source/components/radio-group/item/Item.jsx +38 -0
- package/dist/source/components/radio-group/item/base.component.js +1 -0
- package/dist/source/components/radio-group/item/index.js +3 -0
- package/dist/source/components/radio-group/item/setup.component.js +13 -0
- package/dist/source/components/radio-group/setup.component.js +16 -0
- package/dist/source/components/rating/Rating.jsx +44 -0
- package/dist/source/components/rating/base.component.js +1 -0
- package/dist/source/components/rating/index.js +3 -0
- package/dist/source/components/rating/setup.component.js +10 -0
- package/dist/source/components/scroller/Scroller.jsx +40 -0
- package/dist/source/components/scroller/base.component.js +1 -0
- package/dist/source/components/scroller/index.js +3 -0
- package/dist/source/components/scroller/setup.component.js +6 -0
- package/dist/source/components/select/Select.jsx +92 -0
- package/dist/source/components/select/base.component.js +1 -0
- package/dist/source/components/select/group/Group.jsx +24 -0
- package/dist/source/components/select/group/base.component.js +1 -0
- package/dist/source/components/select/group/index.js +3 -0
- package/dist/source/components/select/group/setup.component.js +10 -0
- package/dist/source/components/select/index.js +9 -0
- package/dist/source/components/select/item/Item.jsx +45 -0
- package/dist/source/components/select/item/base.component.js +1 -0
- package/dist/source/components/select/item/index.js +3 -0
- package/dist/source/components/select/item/setup.component.js +10 -0
- package/dist/source/components/select/setup.component.js +22 -0
- package/dist/source/components/skeleton/Skeleton.jsx +22 -0
- package/dist/source/components/skeleton/base.component.js +1 -0
- package/dist/source/components/skeleton/index.js +3 -0
- package/dist/source/components/skeleton/setup.component.js +6 -0
- package/dist/source/components/slider/Slider.jsx +57 -0
- package/dist/source/components/slider/base.component.js +1 -0
- package/dist/source/components/slider/index.js +3 -0
- package/dist/source/components/slider/setup.component.js +10 -0
- package/dist/source/components/stylable/base.component.js +1 -0
- package/dist/source/components/stylable/index.js +2 -0
- package/dist/source/components/stylable/setup.component.js +6 -0
- package/dist/source/components/switch/Switch.jsx +31 -0
- package/dist/source/components/switch/base.component.js +1 -0
- package/dist/source/components/switch/index.js +3 -0
- package/dist/source/components/switch/setup.component.js +10 -0
- package/dist/source/components/table/Table.jsx +74 -0
- package/dist/source/components/table/base.component.js +1 -0
- package/dist/source/components/table/column/Column.jsx +47 -0
- package/dist/source/components/table/column/base.component.js +1 -0
- package/dist/source/components/table/column/index.js +3 -0
- package/dist/source/components/table/column/setup.component.js +10 -0
- package/dist/source/components/table/index.js +9 -0
- package/dist/source/components/table/row/Cells.jsx +49 -0
- package/dist/source/components/table/row/Row.jsx +27 -0
- package/dist/source/components/table/row/base.component.js +1 -0
- package/dist/source/components/table/row/index.js +3 -0
- package/dist/source/components/table/row/setup.component.js +11 -0
- package/dist/source/components/table/setup.component.js +20 -0
- package/dist/source/components/tabs/Tabs.jsx +50 -0
- package/dist/source/components/tabs/base.component.js +1 -0
- package/dist/source/components/tabs/content/Content.jsx +18 -0
- package/dist/source/components/tabs/content/base.component.js +1 -0
- package/dist/source/components/tabs/content/index.js +3 -0
- package/dist/source/components/tabs/content/setup.component.js +14 -0
- package/dist/source/components/tabs/index.js +9 -0
- package/dist/source/components/tabs/item/Item.jsx +47 -0
- package/dist/source/components/tabs/item/base.component.js +1 -0
- package/dist/source/components/tabs/item/index.js +3 -0
- package/dist/source/components/tabs/item/setup.component.js +10 -0
- package/dist/source/components/tabs/setup.component.js +15 -0
- package/dist/source/components/tags/Tags.jsx +30 -0
- package/dist/source/components/tags/base.component.js +1 -0
- package/dist/source/components/tags/index.js +7 -0
- package/dist/source/components/tags/item/Item.jsx +47 -0
- package/dist/source/components/tags/item/base.component.js +1 -0
- package/dist/source/components/tags/item/index.js +3 -0
- package/dist/source/components/tags/item/setup.component.js +10 -0
- package/dist/source/components/tags/setup.component.js +13 -0
- package/dist/source/components/textable/base.component.js +1 -0
- package/dist/source/components/textable/index.js +2 -0
- package/dist/source/components/textable/setup.component.js +6 -0
- package/dist/source/components/textarea/Textarea.jsx +27 -0
- package/dist/source/components/textarea/base.component.js +1 -0
- package/dist/source/components/textarea/index.js +3 -0
- package/dist/source/components/textarea/setup.component.js +10 -0
- package/dist/source/components/toasts/Toasts.jsx +33 -0
- package/dist/source/components/toasts/base.component.js +1 -0
- package/dist/source/components/toasts/index.js +3 -0
- package/dist/source/components/toasts/item/Item.jsx +64 -0
- package/dist/source/components/toasts/item/base.component.js +1 -0
- package/dist/source/components/toasts/item/index.js +3 -0
- package/dist/source/components/toasts/item/setup.component.js +13 -0
- package/dist/source/components/toasts/setup.component.js +15 -0
- package/dist/source/components/tooltip/Tooltip.jsx +24 -0
- package/dist/source/components/tooltip/base.component.js +1 -0
- package/dist/source/components/tooltip/index.js +3 -0
- package/dist/source/components/tooltip/setup.component.js +6 -0
- package/dist/source/components/value-control/base.component.js +1 -0
- package/dist/source/components/value-control/index.js +2 -0
- package/dist/source/components/value-control/setup.component.js +6 -0
- package/dist/source/components/virtual/Virtual.jsx +7 -0
- package/dist/source/components/virtual/base.component.js +1 -0
- package/dist/source/components/virtual/index.js +3 -0
- package/dist/source/components/virtual/setup.component.js +12 -0
- package/dist/source/index.js +5 -0
- package/dist/source/types.js +1 -0
- package/dist/types.d.ts +42 -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,267 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @soxa-ui/solid
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**The Solid 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 Solid's signals 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 Solid's: events
|
|
12
|
+
arrive as callback props (`element:ready` → `onElementReady`), and the default slot is `children`.
|
|
13
|
+
|
|
14
|
+
> **Status:** the Solid adapter is in progress — Button, Icon, Label, Frame, Popover (a non-modal
|
|
15
|
+
> panel with any content at its trigger), Tooltip (a hint shown on hover and on keyboard focus),
|
|
16
|
+
> Dialog (a modal window), Drawer (a panel that slides in at an edge and can be swiped away),
|
|
17
|
+
> Toasts (notifications shown from code with `useToasts()`),
|
|
18
|
+
> Menu (an action menu at a button or a context menu on right click — `openOn="contextmenu"` —
|
|
19
|
+
> with `<Menu.Item>`, `<Menu.CheckboxItem>`, `<Menu.RadioGroup>` with `<Menu.RadioItem>`,
|
|
20
|
+
> `<Menu.Submenu>`, `<Menu.PopoverItem>`, `<Menu.Group>` and `<Menu.Separator>` or `items`, where
|
|
21
|
+
> an item with nested `items` is a submenu), ProgressSpinner, ProgressLinear, Skeleton, the fields
|
|
22
|
+
> Input, NumberInput (a number in the locale's format with − and + step buttons; the form gets the
|
|
23
|
+
> number), Textarea (multi-line, growing with its text, with a character counter), CheckBox and
|
|
24
|
+
> Switch, Slider (a number or a range) and Rating, the form field `Field` (label, helper and error
|
|
25
|
+
> linked to the control inside it), the dates — DateInput (a date, or a date and time with
|
|
26
|
+
> `kind="datetime"`, typed in parts in the locale's format; the form gets the date as a string),
|
|
27
|
+
> Calendar (month grids of `Calendar.Item` days; a month heading opens the month and year picker)
|
|
28
|
+
> and DatePicker (a date field and a calendar in a panel: a single date or a range, with Cancel
|
|
29
|
+
> and OK buttons under `confirmable`), the collections ListBox, Tabs, Accordion, RadioGroup and Tags
|
|
30
|
+
> (`<ListBox.Item>`, `<Tabs.Item>` with `<Tabs.Content>`, `<Accordion.Item>`, `<RadioGroup.Item>`,
|
|
31
|
+
> `<Tags.Item>` or `items`; tags close, select by mode and either wrap or scroll), Select (a
|
|
32
|
+
> combobox: `<Select.Item>` and `<Select.Group>` or `items`, `editable` with search or filter,
|
|
33
|
+
> tags in the field in `multiple`), Pagination, Table (columns and rows as data — `columns`,
|
|
34
|
+
> `items` — with sorting, row selection, column resizing and reordering), the `Scroller` strip,
|
|
35
|
+
> the `Virtual` window for long lists (`<Virtual><ListBox items={…} /></Virtual>`, the same with
|
|
36
|
+
> `Select` and `Table`) and the
|
|
37
|
+
> `DragAndDrop` wrapper that lets users reorder the items of Tabs, ListBox and Accordion by
|
|
38
|
+
> dragging (`<DragAndDrop onMove={…}><ListBox items={…} /></DragAndDrop>`, `onMoveBefore` can
|
|
39
|
+
> cancel) are ported, the rest of the set is on its way. Icon renders the `tag` it is given: an
|
|
40
|
+
> element name, a Solid component, or `roleIcon(role)` — the icon of that role from the registered
|
|
41
|
+
> icon pack.
|
|
42
|
+
> Frame teleports its panel into `target` (`body` by default) on the client; with `contained` it
|
|
43
|
+
> stays in place. Dialog and Drawer are teleported the same way, with their backdrop next to the
|
|
44
|
+
> panel, and so is the region of Toasts; `ref` of Dialog and Drawer is the panel, of Toasts — the
|
|
45
|
+
> region. A change of `contained` or `target` moves the same nodes, and a field in the panel keeps
|
|
46
|
+
> what was typed. Popover, Tooltip and Menu keep the trigger in their root and anchor their panel,
|
|
47
|
+
> a Frame, to that root; your attributes and `ref` go to the root, not to the panel. The items of a
|
|
48
|
+
> menu stand in its panel, so they are drawn on the client, not on the server. Select anchors its
|
|
49
|
+
> list panel to its root the same way: the server renders a Select from `items` with the text of
|
|
50
|
+
> the selected option (with tags in `multiple`); options given as markup live in the panel and
|
|
51
|
+
> join the collection on the client. A field — and Select — gives its class and style to the root
|
|
52
|
+
> and every other attribute to its `<input>` (a textarea — to its `<textarea>`), except Slider and
|
|
53
|
+
> Rating: they keep every attribute on the root — a slider has a field per thumb, and the pointer
|
|
54
|
+
> never reaches the field. DateInput, Calendar and DatePicker keep every attribute on the root too:
|
|
55
|
+
> a date field has no `<input>` to type in, only its parts. The panel of DatePicker is teleported
|
|
56
|
+
> like the panel of Select, so the server renders the field and the calendar button, and the
|
|
57
|
+
> calendar appears on the client. An item of a collection, a menu item too, gives them to its row; a list
|
|
58
|
+
> box and tabs give them to the list itself, `[role=listbox]` or `[role=tablist]`; a table gives
|
|
59
|
+
> them to the `<table>` itself, and its class, style and `ref` to the scroll viewport around it;
|
|
60
|
+
> otherwise `ref` gets the root. `Label` names the control it wraps; `LocaleProvider` gives a
|
|
61
|
+
> subtree its language and library strings, such as the name of the clear button of `Input` or the
|
|
62
|
+
> arrows of `Pagination`. See
|
|
63
|
+
> [the adapter table](https://github.com/youra-h/soxa-ui#components).
|
|
64
|
+
|
|
65
|
+
## Install
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm install @soxa-ui/solid @soxa-ui/setup @soxa-ui/theme-oren @soxa-ui/icons-material
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Install `@soxa-ui/setup` as a direct dependency for the `useIcons` and `useTheme` imports below.
|
|
72
|
+
Keep it on the same version as `@soxa-ui/solid`.
|
|
73
|
+
|
|
74
|
+
Solid `^1.9.13` is a peer dependency. The package ships its components as source with JSX under the
|
|
75
|
+
`solid` export condition, so your app's bundler compiles them with its Solid plugin (for Vite,
|
|
76
|
+
`vite-plugin-solid`). A theme and an icon pack are separate packages — pick the ones you want.
|
|
77
|
+
|
|
78
|
+
## Usage
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
import { Button } from '@soxa-ui/solid'
|
|
82
|
+
|
|
83
|
+
export function Toolbar() {
|
|
84
|
+
return <Button text="Save" onActionPress={() => console.log('pressed')} />
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The same component can be driven from code — pass a core instance as `ctrl`, and both sides see the
|
|
89
|
+
same state and events:
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
import { TButton } from '@soxa-ui/core'
|
|
93
|
+
import { Button } from '@soxa-ui/solid'
|
|
94
|
+
|
|
95
|
+
const btn = new TButton({ text: 'Save' })
|
|
96
|
+
|
|
97
|
+
export function Toolbar() {
|
|
98
|
+
return <Button ctrl={btn} onActionPress={() => (btn.disabled = true)} />
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
An icon from the registered pack — the root of `Icon` is an `<svg>` of that role:
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
import { Icon, roleIcon } from '@soxa-ui/solid'
|
|
106
|
+
|
|
107
|
+
export function CloseIcon() {
|
|
108
|
+
return <Icon tag={roleIcon('close')} aria_label="Close" />
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
A collection takes its items as markup parts or as data (`items`). Tabs keep their panels in the
|
|
113
|
+
`content` slot, next to the list of tabs rather than inside it:
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
import { Tabs } from '@soxa-ui/solid'
|
|
117
|
+
|
|
118
|
+
export function Settings() {
|
|
119
|
+
return (
|
|
120
|
+
<Tabs
|
|
121
|
+
aria_label="Settings"
|
|
122
|
+
content={
|
|
123
|
+
<>
|
|
124
|
+
<Tabs.Content value="general">General settings</Tabs.Content>
|
|
125
|
+
<Tabs.Content value="privacy">Privacy settings</Tabs.Content>
|
|
126
|
+
</>
|
|
127
|
+
}
|
|
128
|
+
>
|
|
129
|
+
<Tabs.Item value="general" text="General" active />
|
|
130
|
+
<Tabs.Item value="privacy" text="Privacy" />
|
|
131
|
+
</Tabs>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Items given as data are drawn by the owner, and their slots are the owner's `item-<slot>` props,
|
|
137
|
+
with the item in the scope: `item={(scope) => <b>{scope.item.text}</b>}`. Read the scope in the
|
|
138
|
+
markup, as you read Solid props, rather than destructuring it: the markup follows the scope in
|
|
139
|
+
place, while a destructured scope redraws the whole slot on every change — on every selection — and
|
|
140
|
+
a button or field in the slot loses its focus. An item whose slot drew nothing draws its own content
|
|
141
|
+
instead — its text, check mark or close icon.
|
|
142
|
+
|
|
143
|
+
A popover opens a panel with any content at its trigger. The trigger is your own element in the
|
|
144
|
+
`trigger` slot; the link to the panel comes in the slot scope — `triggerAria` (`aria-haspopup`,
|
|
145
|
+
`aria-expanded`, `aria-controls`) and `triggerDataset` (`data-selected` of an open trigger):
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
import { Button, Popover } from '@soxa-ui/solid'
|
|
149
|
+
|
|
150
|
+
export function Filters() {
|
|
151
|
+
return (
|
|
152
|
+
<Popover
|
|
153
|
+
aria_label="Filters"
|
|
154
|
+
trigger={(scope) => (
|
|
155
|
+
<Button text="Filters" {...scope.triggerAria} {...scope.triggerDataset} />
|
|
156
|
+
)}
|
|
157
|
+
>
|
|
158
|
+
Any content: text, fields, buttons
|
|
159
|
+
</Popover>
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Here too the scope is read in the markup: the link changes on every opening, and a spread of
|
|
165
|
+
`scope.triggerAria` updates the same trigger in place, while a destructured scope would draw a new
|
|
166
|
+
trigger each time, and the focus on the old one would be lost. `Tooltip` takes its trigger the same
|
|
167
|
+
way, with `triggerAria` in the scope.
|
|
168
|
+
|
|
169
|
+
A menu takes its trigger the same way. Choosing an action closes the menu and calls `onChoose`; a
|
|
170
|
+
checkbox item and a radio item are checked in place, and the menu stays open:
|
|
171
|
+
|
|
172
|
+
```tsx
|
|
173
|
+
import { Button, Menu } from '@soxa-ui/solid'
|
|
174
|
+
|
|
175
|
+
export function Actions() {
|
|
176
|
+
return (
|
|
177
|
+
<Menu
|
|
178
|
+
trigger={(scope) => (
|
|
179
|
+
<Button text="Actions" {...scope.triggerAria} {...scope.triggerDataset} />
|
|
180
|
+
)}
|
|
181
|
+
onChoose={(item) => console.log(item.value)}
|
|
182
|
+
>
|
|
183
|
+
<Menu.Item value="edit" text="Edit" />
|
|
184
|
+
<Menu.Submenu value="share" text="Share">
|
|
185
|
+
<Menu.Item value="link" text="Copy link" />
|
|
186
|
+
<Menu.Item value="mail" text="Email" />
|
|
187
|
+
</Menu.Submenu>
|
|
188
|
+
<Menu.Separator />
|
|
189
|
+
<Menu.Item value="remove" text="Delete" />
|
|
190
|
+
</Menu>
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Toasts are shown from code. The manager wraps the application, and any component under it takes
|
|
196
|
+
the API in its body, like `useContext` — a component in a dialog under the manager too; your own
|
|
197
|
+
content of a toast is a Solid component with a `toast` prop:
|
|
198
|
+
|
|
199
|
+
```tsx
|
|
200
|
+
import { Button, Toasts, useToasts, type TToastRender } from '@soxa-ui/solid'
|
|
201
|
+
|
|
202
|
+
const Undo: TToastRender = (props) => <Button text="Undo" onClick={() => props.toast.close()} />
|
|
203
|
+
|
|
204
|
+
function Page() {
|
|
205
|
+
const { show } = useToasts()
|
|
206
|
+
|
|
207
|
+
return <Button text="Delete" onClick={() => show({ text: 'Deleted', render: Undo })} />
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function App() {
|
|
211
|
+
return (
|
|
212
|
+
<Toasts>
|
|
213
|
+
<Page />
|
|
214
|
+
</Toasts>
|
|
215
|
+
)
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
The application plugs in a theme and an icon pack once, in its entry point:
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
import { useIcons, useTheme } from '@soxa-ui/setup'
|
|
223
|
+
import * as material from '@soxa-ui/icons-material'
|
|
224
|
+
import oren from '@soxa-ui/theme-oren/setup'
|
|
225
|
+
|
|
226
|
+
import '@soxa-ui/theme-oren'
|
|
227
|
+
|
|
228
|
+
useIcons(material)
|
|
229
|
+
useTheme(oren)
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
`@soxa-ui/theme-oren` is the stylesheet of every component. To take only the components your
|
|
233
|
+
pages use, import their stylesheets instead — `@soxa-ui/theme-oren/button.css`,
|
|
234
|
+
`@soxa-ui/theme-oren/select.css`, one per component, each with the shared part of the theme
|
|
235
|
+
(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)).
|
|
236
|
+
|
|
237
|
+
## Server rendering
|
|
238
|
+
|
|
239
|
+
Server rendering and hydration — SolidStart, or Vite SSR with `vite-plugin-solid({ ssr: true })` —
|
|
240
|
+
need nothing extra: the Solid plugin finds the package by its `solid` export condition and compiles
|
|
241
|
+
its components together with your app, for the server and for the browser. A bundler without the
|
|
242
|
+
Solid plugin gets the `default` export instead — a build for the browser, which does not render on
|
|
243
|
+
the server.
|
|
244
|
+
|
|
245
|
+
## Documentation
|
|
246
|
+
|
|
247
|
+
- [Soxa UI README](https://github.com/youra-h/soxa-ui#readme) — the component set and what each
|
|
248
|
+
adapter implements so far.
|
|
249
|
+
- [Architecture overview](https://github.com/youra-h/soxa-ui/blob/main/docs/architecture.md) —
|
|
250
|
+
layers, descriptors, plugins, collections, adapters.
|
|
251
|
+
|
|
252
|
+
## Public API
|
|
253
|
+
|
|
254
|
+
The package entry exports application components, their consumer types, the locale provider,
|
|
255
|
+
and the supported icon and toast helpers. Component props, slots, events, refs and core models
|
|
256
|
+
passed through `ctrl` remain the supported ways to customize the UI. Models come from
|
|
257
|
+
`@soxa-ui/core`; theme, icon and external-plugin registration comes from `@soxa-ui/setup`.
|
|
258
|
+
|
|
259
|
+
Assembly functions, adapter profiles, bindings, generated metadata and rendering templates
|
|
260
|
+
are private implementation details. They are no longer exported from the package entry, and
|
|
261
|
+
there is no public `/internal` entry. Code that imported them must use the component contract
|
|
262
|
+
instead. Building a new adapter component from Soxa's assembly helpers is not a supported
|
|
263
|
+
public SDK.
|
|
264
|
+
|
|
265
|
+
## License
|
|
266
|
+
|
|
267
|
+
[MIT](https://github.com/youra-h/soxa-ui/blob/main/LICENSE)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Слот, развёрнутый там, где стоит в разметке: под `Elevate` владельца
|
|
3
|
+
* коллекции, чтобы элементы в слоте видели его слой. Задан ли слот, решает
|
|
4
|
+
* его значение, а не узлы: компонент в слоте — содержимое, что бы он ни
|
|
5
|
+
* нарисовал. AGENTS.md (Solid), «Слоты».
|
|
6
|
+
*
|
|
7
|
+
* - незаданный — `fallback` (у владельца коллекции — элементы из данных);
|
|
8
|
+
* - заданный — узлы, а с `children` — обёртка вокруг них;
|
|
9
|
+
* - со `scope` — функция слота получает его живым и зовётся один раз.
|
|
10
|
+
*/
|
|
11
|
+
import { type Accessor, type JSX } from 'solid-js';
|
|
12
|
+
import { type TSlotContent } from './slots';
|
|
13
|
+
type TResolvedSlotBase = {
|
|
14
|
+
fallback?: JSX.Element;
|
|
15
|
+
/** Обёртка вокруг заданного слота. */
|
|
16
|
+
children?: (nodes: Accessor<JSX.Element | undefined>) => JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
/** Без scope функция слота не проходит: звать её было бы не с чем. */
|
|
19
|
+
type TPlainSlotProps = TResolvedSlotBase & {
|
|
20
|
+
content: JSX.Element | undefined;
|
|
21
|
+
scope?: undefined;
|
|
22
|
+
};
|
|
23
|
+
type TScopedSlotProps<TScope extends object> = TResolvedSlotBase & {
|
|
24
|
+
content: TSlotContent<TScope> | undefined;
|
|
25
|
+
scope: () => TScope;
|
|
26
|
+
};
|
|
27
|
+
export type TResolvedSlotProps<TScope extends object = object> = TPlainSlotProps | TScopedSlotProps<TScope>;
|
|
28
|
+
export declare function ResolvedSlot<TScope extends object>(props: TResolvedSlotProps<TScope>): JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { hasSlot, slotValue } from "./slots.js";
|
|
2
|
+
import { Show as Show$1 } from "../runtime/flow.js";
|
|
3
|
+
import { children, createMemo } from "solid-js";
|
|
4
|
+
import { createComponent } from "solid-js/web";
|
|
5
|
+
//#region src/adapter/common/ResolvedSlot.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Слот, развёрнутый там, где стоит в разметке: под `Elevate` владельца
|
|
8
|
+
* коллекции, чтобы элементы в слоте видели его слой. Задан ли слот, решает
|
|
9
|
+
* его значение, а не узлы: компонент в слоте — содержимое, что бы он ни
|
|
10
|
+
* нарисовал. AGENTS.md (Solid), «Слоты».
|
|
11
|
+
*
|
|
12
|
+
* - незаданный — `fallback` (у владельца коллекции — элементы из данных);
|
|
13
|
+
* - заданный — узлы, а с `children` — обёртка вокруг них;
|
|
14
|
+
* - со `scope` — функция слота получает его живым и зовётся один раз.
|
|
15
|
+
*/
|
|
16
|
+
function ResolvedSlot(props) {
|
|
17
|
+
const value = valueOf(props);
|
|
18
|
+
const nodes = children(value);
|
|
19
|
+
const wrap = props.children;
|
|
20
|
+
return createComponent(Show$1, {
|
|
21
|
+
get when() {
|
|
22
|
+
return hasSlot(value());
|
|
23
|
+
},
|
|
24
|
+
get fallback() {
|
|
25
|
+
return props.fallback;
|
|
26
|
+
},
|
|
27
|
+
get children() {
|
|
28
|
+
return wrap ? wrap(nodes) : nodes();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/** Значение слота мемо; есть ли у слота scope, за жизнь компонента не меняется. */
|
|
33
|
+
function valueOf(props) {
|
|
34
|
+
if (props.scope === void 0) return createMemo(() => slotValue(() => props.content, noScope));
|
|
35
|
+
const scope = props.scope;
|
|
36
|
+
return createMemo(() => slotValue(() => props.content, scope));
|
|
37
|
+
}
|
|
38
|
+
function noScope() {
|
|
39
|
+
return {};
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { ResolvedSlot };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The action of a part on a click (activate a tab, choose an option, close a
|
|
3
|
+
* panel) — a native listener on the part's node, given as its `ref`.
|
|
4
|
+
* AGENTS.md (Solid), «Клик части».
|
|
5
|
+
*/
|
|
6
|
+
export declare function clickAction(action: (event: Event) => void): (node: Element) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/adapter/common/click-action.ts
|
|
2
|
+
/**
|
|
3
|
+
* The action of a part on a click (activate a tab, choose an option, close a
|
|
4
|
+
* panel) — a native listener on the part's node, given as its `ref`.
|
|
5
|
+
* AGENTS.md (Solid), «Клик части».
|
|
6
|
+
*/
|
|
7
|
+
function clickAction(action) {
|
|
8
|
+
return (node) => node.addEventListener("click", action);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { clickAction };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createAdapterContext } from '@soxa-ui/setup';
|
|
2
|
+
/**
|
|
3
|
+
* Сборка компонента Solid поверх `createAdapterContext`: id монтирования —
|
|
4
|
+
* `createUniqueId()` (совпадает на сервере и при гидратации), локаль —
|
|
5
|
+
* ближайшего `LocaleProvider`. Контекст на чужом наборе (фасад коллекции) их
|
|
6
|
+
* не берёт: они у того, кто набор собрал. Зовётся в теле компонента.
|
|
7
|
+
*/
|
|
8
|
+
export declare const createSolidAdapterContext: typeof createAdapterContext;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { nearestLocale } from "../locale/context.js";
|
|
2
|
+
import { createAdapterContext } from "@soxa-ui/setup";
|
|
3
|
+
import { createUniqueId } from "solid-js";
|
|
4
|
+
//#region src/adapter/common/createSolidAdapterContext.ts
|
|
5
|
+
/**
|
|
6
|
+
* Сборка компонента Solid поверх `createAdapterContext`: id монтирования —
|
|
7
|
+
* `createUniqueId()` (совпадает на сервере и при гидратации), локаль —
|
|
8
|
+
* ближайшего `LocaleProvider`. Контекст на чужом наборе (фасад коллекции) их
|
|
9
|
+
* не берёт: они у того, кто набор собрал. Зовётся в теле компонента.
|
|
10
|
+
*/
|
|
11
|
+
var createSolidAdapterContext = (descriptor, options, config) => {
|
|
12
|
+
if (config?.bundle !== void 0) return createAdapterContext(descriptor, options, config);
|
|
13
|
+
return createAdapterContext(descriptor, {
|
|
14
|
+
...options,
|
|
15
|
+
mountId: options.mountId ?? createUniqueId(),
|
|
16
|
+
locale: options.locale ?? nearestLocale()
|
|
17
|
+
}, config);
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { createSolidAdapterContext };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Своё, затем обработчик потребителя — на одном событии разметки: в Solid
|
|
3
|
+
* событие — проп, и обработчик потребителя занял бы место своего.
|
|
4
|
+
*/
|
|
5
|
+
/** Обработчик в любой форме разметки Solid: функция или пара `[handler, data]`. */
|
|
6
|
+
export type THandlerUnion<TEvent> = ((event: TEvent) => void) | {
|
|
7
|
+
readonly 0: (data: unknown, event: TEvent) => void;
|
|
8
|
+
readonly 1: unknown;
|
|
9
|
+
};
|
|
10
|
+
export declare function chainHandler<TEvent>(own: (event: TEvent) => void, consumer: THandlerUnion<TEvent> | undefined): (event: TEvent) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/adapter/common/handlers.ts
|
|
2
|
+
function chainHandler(own, consumer) {
|
|
3
|
+
return (event) => {
|
|
4
|
+
own(event);
|
|
5
|
+
if (typeof consumer === "function") consumer(event);
|
|
6
|
+
else consumer?.[0](consumer[1], event);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { chainHandler };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Окна гидратации и мемо, которое их переживает: раскладка корня и частей
|
|
3
|
+
* (`root.ts`), ветки и петли (`../runtime/flow.ts`, `KeyedFor`).
|
|
4
|
+
* AGENTS.md (Solid), «Окна гидратации».
|
|
5
|
+
*/
|
|
6
|
+
import { type Accessor } from 'solid-js';
|
|
7
|
+
/**
|
|
8
|
+
* Открыто ли окно гидратации — условие `isHydrating` из `solid-js/web` без
|
|
9
|
+
* узла (сам он не экспортирован). `done` — гидратацию сорвало расхождение или
|
|
10
|
+
* первое делегированное событие, и Solid снова пишет в узлы.
|
|
11
|
+
*/
|
|
12
|
+
export declare function hydrating(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Мемо, которое переживает окна гидратации: первое значение — `live`, а
|
|
15
|
+
* пересчёт в любом окне читает источники (`track`) и до конца окна отдаёт
|
|
16
|
+
* прежнее. Конец объявляет эффект, заведённый в этом пересчёте: Solid
|
|
17
|
+
* выполняет его, уже сняв контекст гидратации.
|
|
18
|
+
*
|
|
19
|
+
* `track` по умолчанию — сам `live`; петля только читает список, чтобы в окне
|
|
20
|
+
* не строить строк. Вычисление — функция над `source`, а не замыкание: мемо
|
|
21
|
+
* раскладки стоит у каждой строки таблицы.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createHeldMemo<S, T>(source: S, live: (source: S) => T, track?: (source: S) => unknown): Accessor<T>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createEffect, createMemo, createSignal, sharedConfig } from "solid-js";
|
|
2
|
+
import { isServer } from "solid-js/web";
|
|
3
|
+
//#region src/adapter/common/hydration.ts
|
|
4
|
+
/**
|
|
5
|
+
* Окна гидратации и мемо, которое их переживает: раскладка корня и частей
|
|
6
|
+
* (`root.ts`), ветки и петли (`../runtime/flow.ts`, `KeyedFor`).
|
|
7
|
+
* AGENTS.md (Solid), «Окна гидратации».
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Открыто ли окно гидратации — условие `isHydrating` из `solid-js/web` без
|
|
11
|
+
* узла (сам он не экспортирован). `done` — гидратацию сорвало расхождение или
|
|
12
|
+
* первое делегированное событие, и Solid снова пишет в узлы.
|
|
13
|
+
*/
|
|
14
|
+
function hydrating() {
|
|
15
|
+
return !isServer && Boolean(sharedConfig.context) && !sharedConfig.done;
|
|
16
|
+
}
|
|
17
|
+
/** Метка «ещё не считали»: значение мемо бывает и пустым. */
|
|
18
|
+
var UNCOMPUTED = Symbol("uncomputed");
|
|
19
|
+
/** Конец окна — один сигнал на документ, как `sharedConfig` у Solid. */
|
|
20
|
+
var [hydrationEnd, endHydration] = createSignal(void 0, { equals: false });
|
|
21
|
+
function announceHydrationEnd() {
|
|
22
|
+
endHydration();
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Мемо, которое переживает окна гидратации: первое значение — `live`, а
|
|
26
|
+
* пересчёт в любом окне читает источники (`track`) и до конца окна отдаёт
|
|
27
|
+
* прежнее. Конец объявляет эффект, заведённый в этом пересчёте: Solid
|
|
28
|
+
* выполняет его, уже сняв контекст гидратации.
|
|
29
|
+
*
|
|
30
|
+
* `track` по умолчанию — сам `live`; петля только читает список, чтобы в окне
|
|
31
|
+
* не строить строк. Вычисление — функция над `source`, а не замыкание: мемо
|
|
32
|
+
* раскладки стоит у каждой строки таблицы.
|
|
33
|
+
*/
|
|
34
|
+
function createHeldMemo(source, live, track = live) {
|
|
35
|
+
return createMemo((previous) => {
|
|
36
|
+
if (previous === UNCOMPUTED || !hydrating()) return live(source);
|
|
37
|
+
track(source);
|
|
38
|
+
hydrationEnd();
|
|
39
|
+
createEffect(announceHydrationEnd);
|
|
40
|
+
return previous;
|
|
41
|
+
}, UNCOMPUTED);
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { createHeldMemo, hydrating };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Иконка по роли — тег для `Icon`, аналог `roleIcon` у Vue. Атрибуты корня и
|
|
3
|
+
* `ref` ложатся на `<svg>`, тело иконки — `innerHTML` из доверенного пакета.
|
|
4
|
+
* Роль резолвится на отрисовке: `useIcons()` может прийти позже. Компонент на
|
|
5
|
+
* роль один, и `tag` с той же ролью корень не пересоздаёт.
|
|
6
|
+
*/
|
|
7
|
+
import type { Component, JSX } from 'solid-js';
|
|
8
|
+
export type TRoleIconProps = JSX.SvgSVGAttributes<SVGSVGElement>;
|
|
9
|
+
export declare function roleIcon(role: string): Component<TRoleIconProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getIcon } from "@soxa-ui/setup";
|
|
2
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
3
|
+
//#region src/adapter/common/icon.tsx
|
|
4
|
+
var _tmpl$ = /*#__PURE__*/ template(`<svg>`);
|
|
5
|
+
var icons = /* @__PURE__ */ new Map();
|
|
6
|
+
function roleIcon(role) {
|
|
7
|
+
const known = icons.get(role);
|
|
8
|
+
if (known) return known;
|
|
9
|
+
function RoleIcon(props) {
|
|
10
|
+
const icon = getIcon(role);
|
|
11
|
+
return (() => {
|
|
12
|
+
var _el$ = _tmpl$();
|
|
13
|
+
spread(_el$, mergeProps(props, {
|
|
14
|
+
get viewBox() {
|
|
15
|
+
return icon.viewBox;
|
|
16
|
+
},
|
|
17
|
+
get innerHTML() {
|
|
18
|
+
return icon.body;
|
|
19
|
+
}
|
|
20
|
+
}), true, false);
|
|
21
|
+
return _el$;
|
|
22
|
+
})();
|
|
23
|
+
}
|
|
24
|
+
icons.set(role, RoleIcon);
|
|
25
|
+
return RoleIcon;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { roleIcon };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { SolidProfile } from './profile';
|
|
2
|
+
export { SolidNaming } from './naming';
|
|
3
|
+
export { createSolidAdapterContext } from './createSolidAdapterContext';
|
|
4
|
+
export { renderSlot, hasSlot, resolveSlot, liveScope, relaySlot, type TSlotContent } from './slots';
|
|
5
|
+
export { ResolvedSlot, type TResolvedSlotProps } from './ResolvedSlot';
|
|
6
|
+
export { chainHandler, type THandlerUnion } from './handlers';
|
|
7
|
+
export { clickAction } from './click-action';
|
|
8
|
+
export { createPartProps, createRootProps, createWrappedRootProps, toControlAttrs, toPartClass, toRootForward, toRootLayout, toRootProps, toWrappedRootProps, type TRootForward, type TRootLayout, type TRootProps, type TRootSource, type TRootState, type TRootStyle, type TWrappedRootProps, type TWrappedRootSource, } from './root';
|
|
9
|
+
export { roleIcon, type TRoleIconProps } from './icon';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { callbackEventNaming, underscorePropNaming } from "@soxa-ui/setup";
|
|
2
|
+
//#region src/adapter/common/naming.ts
|
|
3
|
+
/** Имена Solid: `iconStyles_styles`, события — колбэк-пропсы `onElementReady`. */
|
|
4
|
+
var SolidNaming = {
|
|
5
|
+
prop: underscorePropNaming,
|
|
6
|
+
event: callbackEventNaming
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { SolidNaming };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SolidNaming } from "./naming.js";
|
|
2
|
+
//#region src/adapter/common/profile.ts
|
|
3
|
+
/** Профиль связки (`adapter.connect()`): имена и слот по умолчанию `children`. */
|
|
4
|
+
var SolidProfile = {
|
|
5
|
+
naming: SolidNaming,
|
|
6
|
+
defaultSlot: "children"
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { SolidProfile };
|