@nuxt-atelier/admin 0.0.0-stage → 0.1.0
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 +6 -2
- package/dist/module.d.mts +52 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +188 -0
- package/dist/runtime/admin.css +1 -0
- package/dist/runtime/ai-off.d.ts +1 -0
- package/dist/runtime/ai-off.js +1 -0
- package/dist/runtime/appearance.d.ts +59 -0
- package/dist/runtime/appearance.js +111 -0
- package/dist/runtime/branding.d.ts +11 -0
- package/dist/runtime/branding.js +14 -0
- package/dist/runtime/components/App.d.vue.ts +6 -0
- package/dist/runtime/components/App.vue +170 -0
- package/dist/runtime/components/App.vue.d.ts +6 -0
- package/dist/runtime/components/AppearanceModal.d.vue.ts +3 -0
- package/dist/runtime/components/AppearanceModal.vue +267 -0
- package/dist/runtime/components/AppearanceModal.vue.d.ts +3 -0
- package/dist/runtime/components/AuthFrame.d.vue.ts +15 -0
- package/dist/runtime/components/AuthFrame.vue +56 -0
- package/dist/runtime/components/AuthFrame.vue.d.ts +15 -0
- package/dist/runtime/components/Brand.d.vue.ts +6 -0
- package/dist/runtime/components/Brand.vue +22 -0
- package/dist/runtime/components/Brand.vue.d.ts +6 -0
- package/dist/runtime/components/CollectionList.d.vue.ts +6 -0
- package/dist/runtime/components/CollectionList.vue +312 -0
- package/dist/runtime/components/CollectionList.vue.d.ts +6 -0
- package/dist/runtime/components/CommentsPanel.d.vue.ts +9 -0
- package/dist/runtime/components/CommentsPanel.vue +228 -0
- package/dist/runtime/components/CommentsPanel.vue.d.ts +9 -0
- package/dist/runtime/components/EntryEdit.d.vue.ts +9 -0
- package/dist/runtime/components/EntryEdit.vue +451 -0
- package/dist/runtime/components/EntryEdit.vue.d.ts +9 -0
- package/dist/runtime/components/FieldInput.d.vue.ts +13 -0
- package/dist/runtime/components/FieldInput.vue +325 -0
- package/dist/runtime/components/FieldInput.vue.d.ts +13 -0
- package/dist/runtime/components/FormSubmissions.d.vue.ts +6 -0
- package/dist/runtime/components/FormSubmissions.vue +197 -0
- package/dist/runtime/components/FormSubmissions.vue.d.ts +6 -0
- package/dist/runtime/components/GlobalSearch.d.vue.ts +10 -0
- package/dist/runtime/components/GlobalSearch.vue +145 -0
- package/dist/runtime/components/GlobalSearch.vue.d.ts +10 -0
- package/dist/runtime/components/Home.d.vue.ts +3 -0
- package/dist/runtime/components/Home.vue +226 -0
- package/dist/runtime/components/Home.vue.d.ts +3 -0
- package/dist/runtime/components/Icon.d.ts +14 -0
- package/dist/runtime/components/Icon.js +12 -0
- package/dist/runtime/components/MediaDetails.d.vue.ts +11 -0
- package/dist/runtime/components/MediaDetails.vue +222 -0
- package/dist/runtime/components/MediaDetails.vue.d.ts +11 -0
- package/dist/runtime/components/MediaField.d.vue.ts +14 -0
- package/dist/runtime/components/MediaField.vue +86 -0
- package/dist/runtime/components/MediaField.vue.d.ts +14 -0
- package/dist/runtime/components/MediaGrid.d.vue.ts +13 -0
- package/dist/runtime/components/MediaGrid.vue +49 -0
- package/dist/runtime/components/MediaGrid.vue.d.ts +13 -0
- package/dist/runtime/components/MediaLibrary.d.vue.ts +12 -0
- package/dist/runtime/components/MediaLibrary.vue +151 -0
- package/dist/runtime/components/MediaLibrary.vue.d.ts +12 -0
- package/dist/runtime/components/NotFound.d.vue.ts +6 -0
- package/dist/runtime/components/NotFound.vue +29 -0
- package/dist/runtime/components/NotFound.vue.d.ts +6 -0
- package/dist/runtime/components/NotificationBell.d.vue.ts +3 -0
- package/dist/runtime/components/NotificationBell.vue +53 -0
- package/dist/runtime/components/NotificationBell.vue.d.ts +3 -0
- package/dist/runtime/components/Page.d.vue.ts +28 -0
- package/dist/runtime/components/Page.vue +84 -0
- package/dist/runtime/components/Page.vue.d.ts +28 -0
- package/dist/runtime/components/RelatedCreate.d.vue.ts +16 -0
- package/dist/runtime/components/RelatedCreate.vue +86 -0
- package/dist/runtime/components/RelatedCreate.vue.d.ts +16 -0
- package/dist/runtime/components/RevisionHistory.d.vue.ts +16 -0
- package/dist/runtime/components/RevisionHistory.vue +145 -0
- package/dist/runtime/components/RevisionHistory.vue.d.ts +16 -0
- package/dist/runtime/components/RichTextEditor.d.vue.ts +15 -0
- package/dist/runtime/components/RichTextEditor.vue +190 -0
- package/dist/runtime/components/RichTextEditor.vue.d.ts +15 -0
- package/dist/runtime/components/RobotsSettings.d.vue.ts +3 -0
- package/dist/runtime/components/RobotsSettings.vue +173 -0
- package/dist/runtime/components/RobotsSettings.vue.d.ts +3 -0
- package/dist/runtime/components/RoleEdit.d.vue.ts +6 -0
- package/dist/runtime/components/RoleEdit.vue +234 -0
- package/dist/runtime/components/RoleEdit.vue.d.ts +6 -0
- package/dist/runtime/components/Roles.d.vue.ts +3 -0
- package/dist/runtime/components/Roles.vue +129 -0
- package/dist/runtime/components/Roles.vue.d.ts +3 -0
- package/dist/runtime/components/ScheduleSection.d.vue.ts +12 -0
- package/dist/runtime/components/ScheduleSection.vue +120 -0
- package/dist/runtime/components/ScheduleSection.vue.d.ts +12 -0
- package/dist/runtime/components/SeoPanel.d.vue.ts +7 -0
- package/dist/runtime/components/SeoPanel.vue +81 -0
- package/dist/runtime/components/SeoPanel.vue.d.ts +7 -0
- package/dist/runtime/components/Setup.d.vue.ts +3 -0
- package/dist/runtime/components/Setup.vue +79 -0
- package/dist/runtime/components/Setup.vue.d.ts +3 -0
- package/dist/runtime/components/SharedBlockUsage.d.vue.ts +7 -0
- package/dist/runtime/components/SharedBlockUsage.vue +91 -0
- package/dist/runtime/components/SharedBlockUsage.vue.d.ts +7 -0
- package/dist/runtime/components/Shell.d.vue.ts +15 -0
- package/dist/runtime/components/Shell.vue +277 -0
- package/dist/runtime/components/Shell.vue.d.ts +15 -0
- package/dist/runtime/components/SignIn.d.vue.ts +3 -0
- package/dist/runtime/components/SignIn.vue +106 -0
- package/dist/runtime/components/SignIn.vue.d.ts +3 -0
- package/dist/runtime/components/Toaster.d.vue.ts +3 -0
- package/dist/runtime/components/Toaster.vue +24 -0
- package/dist/runtime/components/Toaster.vue.d.ts +3 -0
- package/dist/runtime/components/Users.d.vue.ts +3 -0
- package/dist/runtime/components/Users.vue +226 -0
- package/dist/runtime/components/Users.vue.d.ts +3 -0
- package/dist/runtime/composables/debounced.d.ts +3 -0
- package/dist/runtime/composables/debounced.js +11 -0
- package/dist/runtime/composables/useAtelierAdmin.d.ts +17 -0
- package/dist/runtime/composables/useAtelierAdmin.js +53 -0
- package/dist/runtime/composables/useAtelierAdminPortal.d.ts +3 -0
- package/dist/runtime/composables/useAtelierAdminPortal.js +5 -0
- package/dist/runtime/composables/useAtelierAdminSchema.d.ts +182 -0
- package/dist/runtime/composables/useAtelierAdminSchema.js +26 -0
- package/dist/runtime/composables/useAtelierCollection.d.ts +49 -0
- package/dist/runtime/composables/useAtelierCollection.js +77 -0
- package/dist/runtime/composables/useAtelierComments.d.ts +50 -0
- package/dist/runtime/composables/useAtelierComments.js +46 -0
- package/dist/runtime/composables/useAtelierDashboard.d.ts +42 -0
- package/dist/runtime/composables/useAtelierDashboard.js +16 -0
- package/dist/runtime/composables/useAtelierEntryForm.d.ts +77 -0
- package/dist/runtime/composables/useAtelierEntryForm.js +184 -0
- package/dist/runtime/composables/useAtelierGlobalSearch.d.ts +12 -0
- package/dist/runtime/composables/useAtelierGlobalSearch.js +17 -0
- package/dist/runtime/composables/useAtelierMediaLibrary.d.ts +75 -0
- package/dist/runtime/composables/useAtelierMediaLibrary.js +85 -0
- package/dist/runtime/composables/useAtelierNavigation.d.ts +20 -0
- package/dist/runtime/composables/useAtelierNavigation.js +37 -0
- package/dist/runtime/composables/useAtelierNotifications.d.ts +21 -0
- package/dist/runtime/composables/useAtelierNotifications.js +34 -0
- package/dist/runtime/composables/useAtelierPermissions.d.ts +11 -0
- package/dist/runtime/composables/useAtelierPermissions.js +15 -0
- package/dist/runtime/composables/useAtelierPresence.d.ts +32 -0
- package/dist/runtime/composables/useAtelierPresence.js +95 -0
- package/dist/runtime/composables/useAtelierRealtime.d.ts +10 -0
- package/dist/runtime/composables/useAtelierRealtime.js +74 -0
- package/dist/runtime/composables/useAtelierRoles.d.ts +13 -0
- package/dist/runtime/composables/useAtelierRoles.js +15 -0
- package/dist/runtime/composables/useAtelierSeo.d.ts +34 -0
- package/dist/runtime/composables/useAtelierSeo.js +57 -0
- package/dist/runtime/composables/useAtelierSession.d.ts +35 -0
- package/dist/runtime/composables/useAtelierSession.js +36 -0
- package/dist/runtime/composables/useAtelierSetting.d.ts +11 -0
- package/dist/runtime/composables/useAtelierSetting.js +16 -0
- package/dist/runtime/composables/useAtelierUsers.d.ts +18 -0
- package/dist/runtime/composables/useAtelierUsers.js +16 -0
- package/dist/runtime/crystal-neuo/VERSION +3 -0
- package/dist/runtime/crystal-neuo/components/Alert.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Alert.vue +25 -0
- package/dist/runtime/crystal-neuo/components/Alert.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Avatar.d.vue.ts +15 -0
- package/dist/runtime/crystal-neuo/components/Avatar.vue +25 -0
- package/dist/runtime/crystal-neuo/components/Avatar.vue.d.ts +15 -0
- package/dist/runtime/crystal-neuo/components/Badge.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Badge.vue +17 -0
- package/dist/runtime/crystal-neuo/components/Badge.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Breadcrumb.d.vue.ts +16 -0
- package/dist/runtime/crystal-neuo/components/Breadcrumb.vue +26 -0
- package/dist/runtime/crystal-neuo/components/Breadcrumb.vue.d.ts +16 -0
- package/dist/runtime/crystal-neuo/components/Button.d.vue.ts +35 -0
- package/dist/runtime/crystal-neuo/components/Button.vue +31 -0
- package/dist/runtime/crystal-neuo/components/Button.vue.d.ts +35 -0
- package/dist/runtime/crystal-neuo/components/Card.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Card.vue +17 -0
- package/dist/runtime/crystal-neuo/components/Card.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Checkbox.d.vue.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Checkbox.vue +45 -0
- package/dist/runtime/crystal-neuo/components/Checkbox.vue.d.ts +23 -0
- package/dist/runtime/crystal-neuo/components/DatePicker.d.vue.ts +24 -0
- package/dist/runtime/crystal-neuo/components/DatePicker.vue +43 -0
- package/dist/runtime/crystal-neuo/components/DatePicker.vue.d.ts +24 -0
- package/dist/runtime/crystal-neuo/components/Dialog.d.vue.ts +41 -0
- package/dist/runtime/crystal-neuo/components/Dialog.vue +63 -0
- package/dist/runtime/crystal-neuo/components/Dialog.vue.d.ts +41 -0
- package/dist/runtime/crystal-neuo/components/Drawer.d.vue.ts +34 -0
- package/dist/runtime/crystal-neuo/components/Drawer.vue +45 -0
- package/dist/runtime/crystal-neuo/components/Drawer.vue.d.ts +34 -0
- package/dist/runtime/crystal-neuo/components/FileUpload.d.vue.ts +32 -0
- package/dist/runtime/crystal-neuo/components/FileUpload.vue +94 -0
- package/dist/runtime/crystal-neuo/components/FileUpload.vue.d.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Input.d.vue.ts +26 -0
- package/dist/runtime/crystal-neuo/components/Input.vue +48 -0
- package/dist/runtime/crystal-neuo/components/Input.vue.d.ts +26 -0
- package/dist/runtime/crystal-neuo/components/List.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/List.vue +19 -0
- package/dist/runtime/crystal-neuo/components/List.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/ListItem.d.vue.ts +20 -0
- package/dist/runtime/crystal-neuo/components/ListItem.vue +13 -0
- package/dist/runtime/crystal-neuo/components/ListItem.vue.d.ts +20 -0
- package/dist/runtime/crystal-neuo/components/Menu.d.vue.ts +26 -0
- package/dist/runtime/crystal-neuo/components/Menu.vue +120 -0
- package/dist/runtime/crystal-neuo/components/Menu.vue.d.ts +26 -0
- package/dist/runtime/crystal-neuo/components/Modal.d.vue.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Modal.vue +37 -0
- package/dist/runtime/crystal-neuo/components/Modal.vue.d.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Nav.d.vue.ts +24 -0
- package/dist/runtime/crystal-neuo/components/Nav.vue +15 -0
- package/dist/runtime/crystal-neuo/components/Nav.vue.d.ts +24 -0
- package/dist/runtime/crystal-neuo/components/NavLink.d.vue.ts +22 -0
- package/dist/runtime/crystal-neuo/components/NavLink.vue +23 -0
- package/dist/runtime/crystal-neuo/components/NavLink.vue.d.ts +22 -0
- package/dist/runtime/crystal-neuo/components/Pagination.d.vue.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Pagination.vue +58 -0
- package/dist/runtime/crystal-neuo/components/Pagination.vue.d.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Progress.d.vue.ts +18 -0
- package/dist/runtime/crystal-neuo/components/Progress.vue +35 -0
- package/dist/runtime/crystal-neuo/components/Progress.vue.d.ts +18 -0
- package/dist/runtime/crystal-neuo/components/Radio.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Radio.vue +40 -0
- package/dist/runtime/crystal-neuo/components/Radio.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/SegmentedControl.d.vue.ts +31 -0
- package/dist/runtime/crystal-neuo/components/SegmentedControl.vue +39 -0
- package/dist/runtime/crystal-neuo/components/SegmentedControl.vue.d.ts +31 -0
- package/dist/runtime/crystal-neuo/components/Select.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Select.vue +48 -0
- package/dist/runtime/crystal-neuo/components/Select.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Sheet.d.vue.ts +29 -0
- package/dist/runtime/crystal-neuo/components/Sheet.vue +37 -0
- package/dist/runtime/crystal-neuo/components/Sheet.vue.d.ts +29 -0
- package/dist/runtime/crystal-neuo/components/Skeleton.d.vue.ts +13 -0
- package/dist/runtime/crystal-neuo/components/Skeleton.vue +17 -0
- package/dist/runtime/crystal-neuo/components/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/crystal-neuo/components/Slider.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Slider.vue +41 -0
- package/dist/runtime/crystal-neuo/components/Slider.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/TabBar.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/TabBar.vue +29 -0
- package/dist/runtime/crystal-neuo/components/TabBar.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Table.d.vue.ts +31 -0
- package/dist/runtime/crystal-neuo/components/Table.vue +36 -0
- package/dist/runtime/crystal-neuo/components/Table.vue.d.ts +31 -0
- package/dist/runtime/crystal-neuo/components/Tabs.d.vue.ts +40 -0
- package/dist/runtime/crystal-neuo/components/Tabs.vue +79 -0
- package/dist/runtime/crystal-neuo/components/Tabs.vue.d.ts +40 -0
- package/dist/runtime/crystal-neuo/components/Textarea.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Textarea.vue +48 -0
- package/dist/runtime/crystal-neuo/components/Textarea.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Toast.d.vue.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Toast.vue +67 -0
- package/dist/runtime/crystal-neuo/components/Toast.vue.d.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Toggle.d.vue.ts +21 -0
- package/dist/runtime/crystal-neuo/components/Toggle.vue +43 -0
- package/dist/runtime/crystal-neuo/components/Toggle.vue.d.ts +21 -0
- package/dist/runtime/crystal-neuo/components/Tooltip.d.vue.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Tooltip.vue +38 -0
- package/dist/runtime/crystal-neuo/components/Tooltip.vue.d.ts +23 -0
- package/dist/runtime/crystal-neuo/components/cn.d.ts +1 -0
- package/dist/runtime/crystal-neuo/components/cn.js +3 -0
- package/dist/runtime/crystal-neuo/components/useControlAttrs.d.ts +15 -0
- package/dist/runtime/crystal-neuo/components/useControlAttrs.js +11 -0
- package/dist/runtime/crystal-neuo/components/useFocusTrap.d.ts +9 -0
- package/dist/runtime/crystal-neuo/components/useFocusTrap.js +55 -0
- package/dist/runtime/crystal-neuo/components/useModalDialog.d.ts +11 -0
- package/dist/runtime/crystal-neuo/components/useModalDialog.js +42 -0
- package/dist/runtime/crystal-neuo/contract/alert.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/alert.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/avatar.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/avatar.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/badge.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/badge.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/button.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/button.contract.js +22 -0
- package/dist/runtime/crystal-neuo/contract/card.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/card.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/checkbox.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/checkbox.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/date-picker.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/date-picker.contract.js +22 -0
- package/dist/runtime/crystal-neuo/contract/dialog.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/dialog.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/drawer.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/drawer.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/file-upload.contract.d.ts +17 -0
- package/dist/runtime/crystal-neuo/contract/file-upload.contract.js +36 -0
- package/dist/runtime/crystal-neuo/contract/index.d.ts +67 -0
- package/dist/runtime/crystal-neuo/contract/index.js +96 -0
- package/dist/runtime/crystal-neuo/contract/input.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/input.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/list.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/list.contract.js +21 -0
- package/dist/runtime/crystal-neuo/contract/menu.contract.d.ts +21 -0
- package/dist/runtime/crystal-neuo/contract/menu.contract.js +51 -0
- package/dist/runtime/crystal-neuo/contract/modal.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/modal.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/nav.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/nav.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/pagination.contract.d.ts +11 -0
- package/dist/runtime/crystal-neuo/contract/pagination.contract.js +32 -0
- package/dist/runtime/crystal-neuo/contract/progress.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/progress.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/radio.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/radio.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/segmented-control.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/segmented-control.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/select.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/select.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/sheet.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/sheet.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/skeleton.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/skeleton.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/slider.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/slider.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/tab-bar.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/tab-bar.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/table.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/table.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/tabs.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/tabs.contract.js +26 -0
- package/dist/runtime/crystal-neuo/contract/textarea.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/textarea.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/toast.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/toast.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/toggle.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/toggle.contract.js +22 -0
- package/dist/runtime/crystal-neuo/contract/tooltip.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/tooltip.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/types.d.ts +76 -0
- package/dist/runtime/crystal-neuo/contract/types.js +12 -0
- package/dist/runtime/crystal-neuo/css/crystal-neuo.css +1 -0
- package/dist/runtime/crystal-neuo/runtime/axes.d.ts +16 -0
- package/dist/runtime/crystal-neuo/runtime/axes.js +9 -0
- package/dist/runtime/crystal-neuo/runtime/index.d.ts +62 -0
- package/dist/runtime/crystal-neuo/runtime/index.js +115 -0
- package/dist/runtime/crystal-neuo/runtime/platform.d.ts +11 -0
- package/dist/runtime/crystal-neuo/runtime/platform.js +18 -0
- package/dist/runtime/crystal-neuo/runtime/refraction.d.ts +42 -0
- package/dist/runtime/crystal-neuo/runtime/refraction.js +183 -0
- package/dist/runtime/css/shell.css +1 -0
- package/dist/runtime/i18n/en.d.ts +2 -0
- package/dist/runtime/i18n/en.js +511 -0
- package/dist/runtime/i18n/index.d.ts +15 -0
- package/dist/runtime/i18n/index.js +52 -0
- package/dist/runtime/overrides.d.ts +5 -0
- package/dist/runtime/overrides.js +6 -0
- package/dist/runtime/pages/AdminPage.d.vue.ts +3 -0
- package/dist/runtime/pages/AdminPage.vue +49 -0
- package/dist/runtime/pages/AdminPage.vue.d.ts +3 -0
- package/dist/runtime/passkeys-off.d.ts +1 -0
- package/dist/runtime/passkeys-off.js +3 -0
- package/dist/runtime/passkeys.d.ts +1 -0
- package/dist/runtime/passkeys.js +6 -0
- package/dist/runtime/toast.d.ts +15 -0
- package/dist/runtime/toast.js +19 -0
- package/dist/runtime/types.d.ts +137 -0
- package/dist/runtime/types.js +0 -0
- package/dist/types.d.mts +3 -0
- package/package.json +59 -4
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TableVariant, TableSize, Material } from "../contract/index.js";
|
|
2
|
+
export interface TableColumn<R> {
|
|
3
|
+
key: keyof R & string;
|
|
4
|
+
header: string;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
8
|
+
material?: Material;
|
|
9
|
+
variant?: TableVariant;
|
|
10
|
+
size?: TableSize;
|
|
11
|
+
columns: TableColumn<T>[];
|
|
12
|
+
rows: T[];
|
|
13
|
+
caption?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
}> & (typeof globalThis extends {
|
|
16
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
17
|
+
} ? P : {});
|
|
18
|
+
expose: (exposed: {}) => void;
|
|
19
|
+
attrs: any;
|
|
20
|
+
slots: {};
|
|
21
|
+
emit: {};
|
|
22
|
+
}>) => import("vue").VNode & {
|
|
23
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
24
|
+
};
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} : {
|
|
30
|
+
[K in keyof T as K]: T[K];
|
|
31
|
+
}) & {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
material: { type: String, required: false },
|
|
6
|
+
variant: { type: null, required: false, default: "default" },
|
|
7
|
+
size: { type: null, required: false, default: "md" },
|
|
8
|
+
columns: { type: Array, required: true },
|
|
9
|
+
rows: { type: Array, required: true },
|
|
10
|
+
caption: { type: String, required: false },
|
|
11
|
+
class: { type: String, required: false }
|
|
12
|
+
});
|
|
13
|
+
const classes = computed(
|
|
14
|
+
() => cn("cn-table", `cn-table--${props.variant}`, `cn-table--size-${props.size}`, props.class)
|
|
15
|
+
);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<table data-slot="table" :data-material="props.material" :class="classes">
|
|
20
|
+
<caption v-if="caption">
|
|
21
|
+
{{
|
|
22
|
+
caption
|
|
23
|
+
}}
|
|
24
|
+
</caption>
|
|
25
|
+
<thead>
|
|
26
|
+
<tr>
|
|
27
|
+
<th v-for="c in columns" :key="c.key" scope="col">{{ c.header }}</th>
|
|
28
|
+
</tr>
|
|
29
|
+
</thead>
|
|
30
|
+
<tbody>
|
|
31
|
+
<tr v-for="(row, i) in rows" :key="i">
|
|
32
|
+
<td v-for="c in columns" :key="c.key">{{ row[c.key] }}</td>
|
|
33
|
+
</tr>
|
|
34
|
+
</tbody>
|
|
35
|
+
</table>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TableVariant, TableSize, Material } from "../contract/index.js";
|
|
2
|
+
export interface TableColumn<R> {
|
|
3
|
+
key: keyof R & string;
|
|
4
|
+
header: string;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
8
|
+
material?: Material;
|
|
9
|
+
variant?: TableVariant;
|
|
10
|
+
size?: TableSize;
|
|
11
|
+
columns: TableColumn<T>[];
|
|
12
|
+
rows: T[];
|
|
13
|
+
caption?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
}> & (typeof globalThis extends {
|
|
16
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
17
|
+
} ? P : {});
|
|
18
|
+
expose: (exposed: {}) => void;
|
|
19
|
+
attrs: any;
|
|
20
|
+
slots: {};
|
|
21
|
+
emit: {};
|
|
22
|
+
}>) => import("vue").VNode & {
|
|
23
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
24
|
+
};
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} : {
|
|
30
|
+
[K in keyof T as K]: T[K];
|
|
31
|
+
}) & {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { TabsVariant, TabsSize, Material } from "../contract/index.js";
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
material?: Material;
|
|
9
|
+
items: TabItem[];
|
|
10
|
+
variant?: TabsVariant;
|
|
11
|
+
size?: TabsSize;
|
|
12
|
+
label: string;
|
|
13
|
+
class?: string;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_ModelProps = {
|
|
16
|
+
modelValue?: string;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
+
declare const __VLS_template: () => {
|
|
20
|
+
__VLS_Slots: {
|
|
21
|
+
[x: string]: ((props: {}) => any) | undefined;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: string) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
size: "sm" | "md";
|
|
31
|
+
variant: "line" | "enclosed";
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, useId } from "vue";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
material: { type: String, required: false },
|
|
6
|
+
items: { type: Array, required: true },
|
|
7
|
+
variant: { type: null, required: false, default: "line" },
|
|
8
|
+
size: { type: null, required: false, default: "md" },
|
|
9
|
+
label: { type: String, required: true },
|
|
10
|
+
class: { type: String, required: false }
|
|
11
|
+
});
|
|
12
|
+
const model = defineModel({ type: String, ...{ default: "" } });
|
|
13
|
+
const baseId = useId();
|
|
14
|
+
const firstEnabled = computed(() => props.items.find((it) => !it.disabled)?.value ?? "");
|
|
15
|
+
const active = computed(
|
|
16
|
+
() => props.items.some((it) => it.value === model.value && !it.disabled) ? model.value : firstEnabled.value
|
|
17
|
+
);
|
|
18
|
+
const tabEls = ref([]);
|
|
19
|
+
const classes = computed(
|
|
20
|
+
() => cn("cn-tabs", `cn-tabs--${props.variant}`, `cn-tabs--size-${props.size}`, props.class)
|
|
21
|
+
);
|
|
22
|
+
function onKeyDown(e, index) {
|
|
23
|
+
const enabled = props.items.map((it, i) => ({ it, i })).filter(({ it }) => !it.disabled);
|
|
24
|
+
const pos = enabled.findIndex(({ i }) => i === index);
|
|
25
|
+
const rtl = getComputedStyle(e.currentTarget).direction === "rtl";
|
|
26
|
+
const forward = rtl ? "ArrowLeft" : "ArrowRight";
|
|
27
|
+
const backward = rtl ? "ArrowRight" : "ArrowLeft";
|
|
28
|
+
let nextPos = pos;
|
|
29
|
+
if (e.key === forward) nextPos = (pos + 1) % enabled.length;
|
|
30
|
+
else if (e.key === backward) nextPos = (pos - 1 + enabled.length) % enabled.length;
|
|
31
|
+
else if (e.key === "Home") nextPos = 0;
|
|
32
|
+
else if (e.key === "End") nextPos = enabled.length - 1;
|
|
33
|
+
else return;
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
const target = enabled[nextPos];
|
|
36
|
+
if (!target) return;
|
|
37
|
+
model.value = target.it.value;
|
|
38
|
+
tabEls.value[target.i]?.focus();
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<div data-slot="tabs" :data-material="props.material" :class="classes">
|
|
44
|
+
<div class="cn-tabs__list" role="tablist" :aria-label="label">
|
|
45
|
+
<button
|
|
46
|
+
v-for="(it, i) in items"
|
|
47
|
+
:key="it.value"
|
|
48
|
+
:ref="
|
|
49
|
+
(el) => {
|
|
50
|
+
if (el) tabEls[i] = el;
|
|
51
|
+
}
|
|
52
|
+
"
|
|
53
|
+
role="tab"
|
|
54
|
+
type="button"
|
|
55
|
+
:id="`${baseId}-tab-${i}`"
|
|
56
|
+
:aria-selected="it.value === active"
|
|
57
|
+
:aria-controls="`${baseId}-panel-${i}`"
|
|
58
|
+
:tabindex="it.value === active ? 0 : -1"
|
|
59
|
+
:disabled="it.disabled"
|
|
60
|
+
class="cn-tabs__tab"
|
|
61
|
+
@click="model = it.value"
|
|
62
|
+
@keydown="onKeyDown($event, i)"
|
|
63
|
+
>
|
|
64
|
+
{{ it.label }}
|
|
65
|
+
</button>
|
|
66
|
+
</div>
|
|
67
|
+
<div
|
|
68
|
+
v-for="(it, i) in items"
|
|
69
|
+
:key="it.value"
|
|
70
|
+
role="tabpanel"
|
|
71
|
+
:id="`${baseId}-panel-${i}`"
|
|
72
|
+
:aria-labelledby="`${baseId}-tab-${i}`"
|
|
73
|
+
:hidden="it.value !== active"
|
|
74
|
+
class="cn-tabs__panel"
|
|
75
|
+
>
|
|
76
|
+
<slot :name="it.value" />
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { TabsVariant, TabsSize, Material } from "../contract/index.js";
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
material?: Material;
|
|
9
|
+
items: TabItem[];
|
|
10
|
+
variant?: TabsVariant;
|
|
11
|
+
size?: TabsSize;
|
|
12
|
+
label: string;
|
|
13
|
+
class?: string;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_ModelProps = {
|
|
16
|
+
modelValue?: string;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
+
declare const __VLS_template: () => {
|
|
20
|
+
__VLS_Slots: {
|
|
21
|
+
[x: string]: ((props: {}) => any) | undefined;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: string) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
size: "sm" | "md";
|
|
31
|
+
variant: "line" | "enclosed";
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TextareaSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
size?: TextareaSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
rows?: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
modelValue?: string;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: string) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
size: "sm" | "md" | "lg";
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useId } from "vue";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
import { useControlAttrs } from "./useControlAttrs";
|
|
5
|
+
defineOptions({ inheritAttrs: false });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
material: { type: String, required: false },
|
|
8
|
+
size: { type: null, required: false, default: "md" },
|
|
9
|
+
label: { type: String, required: false },
|
|
10
|
+
error: { type: String, required: false },
|
|
11
|
+
hint: { type: String, required: false },
|
|
12
|
+
id: { type: String, required: false },
|
|
13
|
+
placeholder: { type: String, required: false },
|
|
14
|
+
rows: { type: Number, required: false },
|
|
15
|
+
disabled: { type: Boolean, required: false }
|
|
16
|
+
});
|
|
17
|
+
const model = defineModel({ type: String, ...{ default: "" } });
|
|
18
|
+
const autoId = useId();
|
|
19
|
+
const taId = computed(() => props.id ?? autoId);
|
|
20
|
+
const msgId = computed(() => `${taId.value}-msg`);
|
|
21
|
+
const hintId = computed(() => `${taId.value}-hint`);
|
|
22
|
+
const describedBy = computed(
|
|
23
|
+
() => [props.error ? msgId.value : null, props.hint ? hintId.value : null].filter(Boolean).join(" ") || void 0
|
|
24
|
+
);
|
|
25
|
+
const taClass = computed(
|
|
26
|
+
() => cn("cn-textarea", `cn-input--size-${props.size}`, props.error && "cn-textarea--error")
|
|
27
|
+
);
|
|
28
|
+
const { rootAttrs, controlAttrs } = useControlAttrs();
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<div v-bind="rootAttrs" class="cn-field" data-slot="textarea-field" :data-material="props.material">
|
|
33
|
+
<label v-if="label" class="cn-field__label" :for="taId">{{ label }}</label>
|
|
34
|
+
<textarea
|
|
35
|
+
v-bind="controlAttrs"
|
|
36
|
+
:id="taId"
|
|
37
|
+
v-model="model"
|
|
38
|
+
:class="taClass"
|
|
39
|
+
:placeholder="placeholder"
|
|
40
|
+
:rows="rows"
|
|
41
|
+
:disabled="disabled"
|
|
42
|
+
:aria-invalid="error ? true : void 0"
|
|
43
|
+
:aria-describedby="describedBy"
|
|
44
|
+
/>
|
|
45
|
+
<span v-if="hint && !error" class="cn-field__hint" :id="hintId">{{ hint }}</span>
|
|
46
|
+
<span v-if="error" class="cn-field__message" :id="msgId">{{ error }}</span>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TextareaSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
size?: TextareaSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
rows?: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
modelValue?: string;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: string) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
size: "sm" | "md" | "lg";
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ToastVariant, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
variant?: ToastVariant;
|
|
5
|
+
/** Auto-dismiss delay in ms; paused while hovered or focused. `0` keeps the toast until dismissed. */
|
|
6
|
+
duration?: number;
|
|
7
|
+
dismissLabel?: string;
|
|
8
|
+
class?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_template: () => {
|
|
11
|
+
__VLS_Slots: {
|
|
12
|
+
default?: (props: {}) => any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
dismiss: () => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onDismiss?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
variant: "success" | "danger" | "neutral" | "warning";
|
|
22
|
+
duration: number;
|
|
23
|
+
dismissLabel: string;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onBeforeUnmount, ref, watchEffect } from "vue";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
material: { type: String, required: false },
|
|
6
|
+
variant: { type: null, required: false, default: "neutral" },
|
|
7
|
+
duration: { type: Number, required: false, default: 6e3 },
|
|
8
|
+
dismissLabel: { type: String, required: false, default: "Dismiss" },
|
|
9
|
+
class: { type: String, required: false }
|
|
10
|
+
});
|
|
11
|
+
const emit = defineEmits(["dismiss"]);
|
|
12
|
+
const visible = ref(true);
|
|
13
|
+
const paused = ref(false);
|
|
14
|
+
let timer;
|
|
15
|
+
function dismiss() {
|
|
16
|
+
visible.value = false;
|
|
17
|
+
emit("dismiss");
|
|
18
|
+
}
|
|
19
|
+
watchEffect((onCleanup) => {
|
|
20
|
+
if (!visible.value || paused.value || props.duration <= 0) return;
|
|
21
|
+
timer = setTimeout(dismiss, props.duration);
|
|
22
|
+
onCleanup(() => clearTimeout(timer));
|
|
23
|
+
});
|
|
24
|
+
onBeforeUnmount(() => clearTimeout(timer));
|
|
25
|
+
function onFocusOut(e) {
|
|
26
|
+
const root = e.currentTarget;
|
|
27
|
+
if (!root.contains(e.relatedTarget)) paused.value = false;
|
|
28
|
+
}
|
|
29
|
+
function onKeyDown(e) {
|
|
30
|
+
if (e.key === "Escape" && !e.defaultPrevented) {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
dismiss();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const assertive = computed(() => props.variant === "danger");
|
|
36
|
+
const classes = computed(() => cn("cn-toast", `cn-toast--${props.variant}`, props.class));
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div
|
|
41
|
+
v-if="visible"
|
|
42
|
+
data-slot="toast"
|
|
43
|
+
:data-material="props.material"
|
|
44
|
+
:role="assertive ? 'alert' : 'status'"
|
|
45
|
+
:aria-live="assertive ? 'assertive' : 'polite'"
|
|
46
|
+
:class="classes"
|
|
47
|
+
@mouseenter="paused = true"
|
|
48
|
+
@mouseleave="paused = false"
|
|
49
|
+
@focusin="paused = true"
|
|
50
|
+
@focusout="onFocusOut"
|
|
51
|
+
@keydown="onKeyDown"
|
|
52
|
+
>
|
|
53
|
+
<svg class="cn-toast__icon" viewBox="0 0 20 20" aria-hidden="true">
|
|
54
|
+
<circle cx="10" cy="10" r="8" fill="none" stroke="currentColor" stroke-width="1.5" />
|
|
55
|
+
<path d="M10 6v5M10 14h.01" stroke="currentColor" stroke-width="1.5" fill="none" />
|
|
56
|
+
</svg>
|
|
57
|
+
<div class="cn-toast__body"><slot /></div>
|
|
58
|
+
<button
|
|
59
|
+
type="button"
|
|
60
|
+
class="cn-button cn-button--ghost cn-button--size-sm cn-toast__close"
|
|
61
|
+
:aria-label="dismissLabel"
|
|
62
|
+
@click="dismiss"
|
|
63
|
+
>
|
|
64
|
+
<span aria-hidden="true">×</span>
|
|
65
|
+
</button>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ToastVariant, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
variant?: ToastVariant;
|
|
5
|
+
/** Auto-dismiss delay in ms; paused while hovered or focused. `0` keeps the toast until dismissed. */
|
|
6
|
+
duration?: number;
|
|
7
|
+
dismissLabel?: string;
|
|
8
|
+
class?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_template: () => {
|
|
11
|
+
__VLS_Slots: {
|
|
12
|
+
default?: (props: {}) => any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
dismiss: () => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onDismiss?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
variant: "success" | "danger" | "neutral" | "warning";
|
|
22
|
+
duration: number;
|
|
23
|
+
dismissLabel: string;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ToggleSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
size?: ToggleSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
"checked"?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:checked": (value: boolean) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
size: "sm" | "md";
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useId } from "vue";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
import { useControlAttrs } from "./useControlAttrs";
|
|
5
|
+
defineOptions({ inheritAttrs: false });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
material: { type: String, required: false },
|
|
8
|
+
size: { type: null, required: false, default: "md" },
|
|
9
|
+
label: { type: String, required: false },
|
|
10
|
+
id: { type: String, required: false },
|
|
11
|
+
disabled: { type: Boolean, required: false }
|
|
12
|
+
});
|
|
13
|
+
const checked = defineModel("checked", { type: Boolean, ...{ default: false } });
|
|
14
|
+
const autoId = useId();
|
|
15
|
+
const toggleId = computed(() => props.id ?? autoId);
|
|
16
|
+
const classes = computed(() => cn("cn-toggle", `cn-toggle--size-${props.size}`));
|
|
17
|
+
const { rootAttrs, controlAttrs } = useControlAttrs();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<label
|
|
22
|
+
v-bind="rootAttrs"
|
|
23
|
+
:class="classes"
|
|
24
|
+
:for="toggleId"
|
|
25
|
+
data-slot="toggle"
|
|
26
|
+
:data-material="props.material"
|
|
27
|
+
>
|
|
28
|
+
<span class="cn-toggle__track">
|
|
29
|
+
<input
|
|
30
|
+
v-bind="controlAttrs"
|
|
31
|
+
:id="toggleId"
|
|
32
|
+
v-model="checked"
|
|
33
|
+
class="cn-toggle__input"
|
|
34
|
+
type="checkbox"
|
|
35
|
+
role="switch"
|
|
36
|
+
:disabled="disabled"
|
|
37
|
+
@keydown.enter.prevent="$event.currentTarget.click()"
|
|
38
|
+
/>
|
|
39
|
+
<span class="cn-toggle__thumb" aria-hidden="true" />
|
|
40
|
+
</span>
|
|
41
|
+
<span v-if="label" class="cn-toggle__label">{{ label }}</span>
|
|
42
|
+
</label>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ToggleSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
size?: ToggleSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
"checked"?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:checked": (value: boolean) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
size: "sm" | "md";
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
label: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_template: () => {
|
|
8
|
+
__VLS_Slots: {
|
|
9
|
+
default?: (props: {
|
|
10
|
+
describedby: string;
|
|
11
|
+
}) => any;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onBeforeUnmount, ref, useId, watch } from "vue";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
material: { type: String, required: false },
|
|
6
|
+
label: { type: String, required: true },
|
|
7
|
+
class: { type: String, required: false }
|
|
8
|
+
});
|
|
9
|
+
const open = ref(false);
|
|
10
|
+
const id = useId();
|
|
11
|
+
const classes = computed(() => cn("cn-tooltip", props.class));
|
|
12
|
+
function onKey(e) {
|
|
13
|
+
if (e.key !== "Escape") return;
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
open.value = false;
|
|
16
|
+
}
|
|
17
|
+
watch(open, (isOpen) => {
|
|
18
|
+
if (isOpen) document.addEventListener("keydown", onKey);
|
|
19
|
+
else document.removeEventListener("keydown", onKey);
|
|
20
|
+
});
|
|
21
|
+
onBeforeUnmount(() => document.removeEventListener("keydown", onKey));
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<span
|
|
26
|
+
:class="classes"
|
|
27
|
+
data-slot="tooltip"
|
|
28
|
+
:data-material="props.material"
|
|
29
|
+
@mouseenter="open = true"
|
|
30
|
+
@mouseleave="open = false"
|
|
31
|
+
@focusin="open = true"
|
|
32
|
+
@focusout="open = false"
|
|
33
|
+
>
|
|
34
|
+
<slot :describedby="id" />
|
|
35
|
+
<!-- Always in the DOM so aria-describedby resolves when focus arrives. -->
|
|
36
|
+
<span role="tooltip" :id="id" class="cn-tooltip__bubble" :hidden="!open">{{ label }}</span>
|
|
37
|
+
</span>
|
|
38
|
+
</template>
|