@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,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
|
+
error: { type: String, required: false },
|
|
11
|
+
id: { type: String, required: false },
|
|
12
|
+
min: { type: String, required: false },
|
|
13
|
+
max: { type: String, required: false },
|
|
14
|
+
disabled: { type: Boolean, required: false }
|
|
15
|
+
});
|
|
16
|
+
const model = defineModel({ type: String, ...{ default: "" } });
|
|
17
|
+
const autoId = useId();
|
|
18
|
+
const dpId = computed(() => props.id ?? autoId);
|
|
19
|
+
const msgId = computed(() => `${dpId.value}-msg`);
|
|
20
|
+
const inputClass = computed(
|
|
21
|
+
() => cn("cn-input", `cn-input--size-${props.size}`, props.error && "cn-input--error")
|
|
22
|
+
);
|
|
23
|
+
const { rootAttrs, controlAttrs } = useControlAttrs();
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div v-bind="rootAttrs" class="cn-field" data-slot="date-field" :data-material="props.material">
|
|
28
|
+
<label v-if="label" class="cn-field__label" :for="dpId">{{ label }}</label>
|
|
29
|
+
<input
|
|
30
|
+
v-bind="controlAttrs"
|
|
31
|
+
:id="dpId"
|
|
32
|
+
v-model="model"
|
|
33
|
+
type="date"
|
|
34
|
+
:class="inputClass"
|
|
35
|
+
:min="min"
|
|
36
|
+
:max="max"
|
|
37
|
+
:disabled="disabled"
|
|
38
|
+
:aria-invalid="error ? true : void 0"
|
|
39
|
+
:aria-describedby="error ? msgId : void 0"
|
|
40
|
+
/>
|
|
41
|
+
<span v-if="error" class="cn-field__message" :id="msgId">{{ error }}</span>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DatePickerSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
size?: DatePickerSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
min?: string;
|
|
9
|
+
max?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_ModelProps = {
|
|
13
|
+
modelValue?: string;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: string) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
size: "sm" | "md" | "lg";
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { DialogVariant, DialogSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
variant?: DialogVariant;
|
|
7
|
+
size?: DialogSize;
|
|
8
|
+
confirmLabel?: string;
|
|
9
|
+
cancelLabel?: string;
|
|
10
|
+
class?: string;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_ModelProps = {
|
|
13
|
+
"open"?: boolean;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
+
declare const __VLS_template: () => {
|
|
17
|
+
__VLS_Slots: {
|
|
18
|
+
default?: (props: {}) => any;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
"update:open": (value: boolean) => any;
|
|
24
|
+
confirm: () => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
27
|
+
onConfirm?: (() => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
size: "sm" | "md";
|
|
30
|
+
variant: "default" | "destructive";
|
|
31
|
+
confirmLabel: string;
|
|
32
|
+
cancelLabel: string;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, useId } from "vue";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
import { useModalDialog } from "./useModalDialog";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
material: { type: String, required: false },
|
|
7
|
+
title: { type: String, required: true },
|
|
8
|
+
description: { type: String, required: false },
|
|
9
|
+
variant: { type: null, required: false, default: "default" },
|
|
10
|
+
size: { type: null, required: false, default: "sm" },
|
|
11
|
+
confirmLabel: { type: String, required: false, default: "Confirm" },
|
|
12
|
+
cancelLabel: { type: String, required: false, default: "Cancel" },
|
|
13
|
+
class: { type: String, required: false }
|
|
14
|
+
});
|
|
15
|
+
const open = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
16
|
+
const emit = defineEmits(["confirm"]);
|
|
17
|
+
const dialog = ref(null);
|
|
18
|
+
const titleId = useId();
|
|
19
|
+
const descId = useId();
|
|
20
|
+
useModalDialog(dialog, open);
|
|
21
|
+
const classes = computed(() => cn("cn-dialog", `cn-dialog--size-${props.size}`, props.class));
|
|
22
|
+
const confirmClass = computed(
|
|
23
|
+
() => cn(
|
|
24
|
+
"cn-button",
|
|
25
|
+
props.variant === "destructive" ? "cn-button--danger" : "cn-button--primary",
|
|
26
|
+
"cn-button--size-md"
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
function onScrim(e) {
|
|
30
|
+
if (e.target !== e.currentTarget) return;
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
open.value = false;
|
|
33
|
+
}
|
|
34
|
+
function confirm() {
|
|
35
|
+
emit("confirm");
|
|
36
|
+
open.value = false;
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<dialog
|
|
42
|
+
ref="dialog"
|
|
43
|
+
class="cn-scrim"
|
|
44
|
+
data-slot="dialog-scrim"
|
|
45
|
+
:data-material="props.material"
|
|
46
|
+
role="alertdialog"
|
|
47
|
+
:aria-labelledby="titleId"
|
|
48
|
+
:aria-describedby="description ? descId : void 0"
|
|
49
|
+
@mousedown="onScrim"
|
|
50
|
+
>
|
|
51
|
+
<div v-if="open" :class="classes">
|
|
52
|
+
<h2 :id="titleId" class="cn-dialog__title">{{ title }}</h2>
|
|
53
|
+
<p v-if="description" :id="descId">{{ description }}</p>
|
|
54
|
+
<slot />
|
|
55
|
+
<div class="cn-dialog__actions">
|
|
56
|
+
<button type="button" class="cn-button cn-button--ghost cn-button--size-md" @click="open = false">
|
|
57
|
+
{{ cancelLabel }}
|
|
58
|
+
</button>
|
|
59
|
+
<button type="button" :class="confirmClass" @click="confirm">{{ confirmLabel }}</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</dialog>
|
|
63
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { DialogVariant, DialogSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
variant?: DialogVariant;
|
|
7
|
+
size?: DialogSize;
|
|
8
|
+
confirmLabel?: string;
|
|
9
|
+
cancelLabel?: string;
|
|
10
|
+
class?: string;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_ModelProps = {
|
|
13
|
+
"open"?: boolean;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
+
declare const __VLS_template: () => {
|
|
17
|
+
__VLS_Slots: {
|
|
18
|
+
default?: (props: {}) => any;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
"update:open": (value: boolean) => any;
|
|
24
|
+
confirm: () => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
27
|
+
onConfirm?: (() => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
size: "sm" | "md";
|
|
30
|
+
variant: "default" | "destructive";
|
|
31
|
+
confirmLabel: string;
|
|
32
|
+
cancelLabel: string;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { DrawerSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
title: string;
|
|
5
|
+
placement?: "start" | "end";
|
|
6
|
+
size?: DrawerSize;
|
|
7
|
+
class?: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
"open"?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
+
declare const __VLS_template: () => {
|
|
14
|
+
__VLS_Slots: {
|
|
15
|
+
default?: (props: {}) => any;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:open": (value: boolean) => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
size: "sm" | "md" | "lg";
|
|
25
|
+
placement: "start" | "end";
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, useId } from "vue";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
import { useModalDialog } from "./useModalDialog";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
material: { type: String, required: false },
|
|
7
|
+
title: { type: String, required: true },
|
|
8
|
+
placement: { type: String, required: false, default: "start" },
|
|
9
|
+
size: { type: null, required: false, default: "md" },
|
|
10
|
+
class: { type: String, required: false }
|
|
11
|
+
});
|
|
12
|
+
const open = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
13
|
+
const dialog = ref(null);
|
|
14
|
+
const titleId = useId();
|
|
15
|
+
useModalDialog(dialog, open);
|
|
16
|
+
const classes = computed(
|
|
17
|
+
() => cn(
|
|
18
|
+
"cn-drawer",
|
|
19
|
+
`cn-drawer--size-${props.size}`,
|
|
20
|
+
props.placement === "end" && "cn-drawer--end",
|
|
21
|
+
props.class
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
function onScrim(e) {
|
|
25
|
+
if (e.target !== e.currentTarget) return;
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
open.value = false;
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<dialog
|
|
33
|
+
ref="dialog"
|
|
34
|
+
class="cn-scrim cn-scrim--drawer"
|
|
35
|
+
data-slot="drawer-scrim"
|
|
36
|
+
:data-material="props.material"
|
|
37
|
+
:aria-labelledby="titleId"
|
|
38
|
+
@mousedown="onScrim"
|
|
39
|
+
>
|
|
40
|
+
<div v-if="open" :class="classes">
|
|
41
|
+
<h2 :id="titleId" class="cn-drawer__title">{{ title }}</h2>
|
|
42
|
+
<slot />
|
|
43
|
+
</div>
|
|
44
|
+
</dialog>
|
|
45
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { DrawerSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
title: string;
|
|
5
|
+
placement?: "start" | "end";
|
|
6
|
+
size?: DrawerSize;
|
|
7
|
+
class?: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
"open"?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
+
declare const __VLS_template: () => {
|
|
14
|
+
__VLS_Slots: {
|
|
15
|
+
default?: (props: {}) => any;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:open": (value: boolean) => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
size: "sm" | "md" | "lg";
|
|
25
|
+
placement: "start" | "end";
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type FileUploadSize, type Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
size?: FileUploadSize;
|
|
5
|
+
label: string;
|
|
6
|
+
hint?: string;
|
|
7
|
+
/** Error message; switches to the error variant. */
|
|
8
|
+
error?: string;
|
|
9
|
+
/** Announced while files are dragged over the zone. */
|
|
10
|
+
dropLabel?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
accept?: string;
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
class?: string;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_ModelProps = {
|
|
20
|
+
"files"?: File[];
|
|
21
|
+
};
|
|
22
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
"update:files": (value: File[]) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
"onUpdate:files"?: ((value: File[]) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
size: "md" | "lg";
|
|
29
|
+
dropLabel: string;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, useId, useTemplateRef } from "vue";
|
|
3
|
+
import { acceptedFiles } from "../contract/index";
|
|
4
|
+
import { cn } from "./cn";
|
|
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: true },
|
|
10
|
+
hint: { type: String, required: false },
|
|
11
|
+
error: { type: String, required: false },
|
|
12
|
+
dropLabel: { type: String, required: false, default: "Drop to upload" },
|
|
13
|
+
id: { type: String, required: false },
|
|
14
|
+
name: { type: String, required: false },
|
|
15
|
+
accept: { type: String, required: false },
|
|
16
|
+
multiple: { type: Boolean, required: false },
|
|
17
|
+
required: { type: Boolean, required: false },
|
|
18
|
+
disabled: { type: Boolean, required: false },
|
|
19
|
+
class: { type: String, required: false }
|
|
20
|
+
});
|
|
21
|
+
const files = defineModel("files", { type: Array, ...{ default: () => [] } });
|
|
22
|
+
const autoId = useId();
|
|
23
|
+
const fileId = computed(() => props.id ?? autoId);
|
|
24
|
+
const hintId = computed(() => `${fileId.value}-hint`);
|
|
25
|
+
const msgId = computed(() => `${fileId.value}-msg`);
|
|
26
|
+
const describedBy = computed(
|
|
27
|
+
() => [props.hint ? hintId.value : null, props.error ? msgId.value : null].filter(Boolean).join(" ") || void 0
|
|
28
|
+
);
|
|
29
|
+
const dragover = ref(false);
|
|
30
|
+
const inputEl = useTemplateRef("inputEl");
|
|
31
|
+
const classes = computed(
|
|
32
|
+
() => cn(
|
|
33
|
+
"cn-fileupload",
|
|
34
|
+
`cn-fileupload--size-${props.size}`,
|
|
35
|
+
props.error && "cn-fileupload--error",
|
|
36
|
+
props.class
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
function onDragOver() {
|
|
40
|
+
if (!props.disabled) dragover.value = true;
|
|
41
|
+
}
|
|
42
|
+
function onDrop(e) {
|
|
43
|
+
dragover.value = false;
|
|
44
|
+
if (props.disabled || !e.dataTransfer) return;
|
|
45
|
+
const picked = acceptedFiles(e.dataTransfer.files, props.accept, props.multiple);
|
|
46
|
+
if (!picked.length) return;
|
|
47
|
+
if (inputEl.value) {
|
|
48
|
+
const transfer = new DataTransfer();
|
|
49
|
+
picked.forEach((f) => transfer.items.add(f));
|
|
50
|
+
inputEl.value.files = transfer.files;
|
|
51
|
+
}
|
|
52
|
+
files.value = picked;
|
|
53
|
+
}
|
|
54
|
+
function onChange(e) {
|
|
55
|
+
const target = e.target;
|
|
56
|
+
if (target.files?.length) files.value = Array.from(target.files);
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<div :class="classes" data-slot="file-upload" :data-material="props.material">
|
|
62
|
+
<button
|
|
63
|
+
type="button"
|
|
64
|
+
class="cn-fileupload__zone"
|
|
65
|
+
:data-dragover="dragover || void 0"
|
|
66
|
+
:disabled="disabled"
|
|
67
|
+
:aria-describedby="describedBy"
|
|
68
|
+
@click="inputEl?.click()"
|
|
69
|
+
@dragover.prevent="onDragOver"
|
|
70
|
+
@dragleave="dragover = false"
|
|
71
|
+
@drop.prevent="onDrop"
|
|
72
|
+
>
|
|
73
|
+
<span>{{ label }}</span>
|
|
74
|
+
<span v-if="hint" class="cn-field__hint" :id="hintId">{{ hint }}</span>
|
|
75
|
+
</button>
|
|
76
|
+
<input
|
|
77
|
+
ref="inputEl"
|
|
78
|
+
v-bind="$attrs"
|
|
79
|
+
:id="fileId"
|
|
80
|
+
type="file"
|
|
81
|
+
class="cn-fileupload__input"
|
|
82
|
+
tabindex="-1"
|
|
83
|
+
aria-hidden="true"
|
|
84
|
+
:name="name"
|
|
85
|
+
:accept="accept"
|
|
86
|
+
:multiple="multiple"
|
|
87
|
+
:required="required"
|
|
88
|
+
:disabled="disabled"
|
|
89
|
+
@change="onChange"
|
|
90
|
+
/>
|
|
91
|
+
<span class="cn-visually-hidden" aria-live="polite">{{ dragover ? dropLabel : "" }}</span>
|
|
92
|
+
<span v-if="error" class="cn-field__message" :id="msgId">{{ error }}</span>
|
|
93
|
+
</div>
|
|
94
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type FileUploadSize, type Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
size?: FileUploadSize;
|
|
5
|
+
label: string;
|
|
6
|
+
hint?: string;
|
|
7
|
+
/** Error message; switches to the error variant. */
|
|
8
|
+
error?: string;
|
|
9
|
+
/** Announced while files are dragged over the zone. */
|
|
10
|
+
dropLabel?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
accept?: string;
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
class?: string;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_ModelProps = {
|
|
20
|
+
"files"?: File[];
|
|
21
|
+
};
|
|
22
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
"update:files": (value: File[]) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
"onUpdate:files"?: ((value: File[]) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
size: "md" | "lg";
|
|
29
|
+
dropLabel: string;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { InputSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
size?: InputSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
type?: string;
|
|
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
|
+
type: string;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
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
|
+
disabled: { type: Boolean, required: false },
|
|
15
|
+
type: { type: String, required: false, default: "text" }
|
|
16
|
+
});
|
|
17
|
+
const model = defineModel({ type: String, ...{ default: "" } });
|
|
18
|
+
const autoId = useId();
|
|
19
|
+
const inputId = computed(() => props.id ?? autoId);
|
|
20
|
+
const msgId = computed(() => `${inputId.value}-msg`);
|
|
21
|
+
const hintId = computed(() => `${inputId.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 inputClass = computed(
|
|
26
|
+
() => cn("cn-input", `cn-input--size-${props.size}`, props.error && "cn-input--error")
|
|
27
|
+
);
|
|
28
|
+
const { rootAttrs, controlAttrs } = useControlAttrs();
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<div v-bind="rootAttrs" class="cn-field" data-slot="input-field" :data-material="props.material">
|
|
33
|
+
<label v-if="label" class="cn-field__label" :for="inputId">{{ label }}</label>
|
|
34
|
+
<input
|
|
35
|
+
v-bind="controlAttrs"
|
|
36
|
+
:id="inputId"
|
|
37
|
+
v-model="model"
|
|
38
|
+
:class="inputClass"
|
|
39
|
+
:type="type"
|
|
40
|
+
:placeholder="placeholder"
|
|
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,26 @@
|
|
|
1
|
+
import type { InputSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
size?: InputSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
type?: string;
|
|
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
|
+
type: string;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ListVariant, ListSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
variant?: ListVariant;
|
|
5
|
+
size?: ListSize;
|
|
6
|
+
class?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_template: () => {
|
|
9
|
+
__VLS_Slots: {
|
|
10
|
+
default?: (props: {}) => any;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
size: "sm" | "md";
|
|
16
|
+
variant: "plain" | "bordered";
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
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: "plain" },
|
|
7
|
+
size: { type: null, required: false, default: "md" },
|
|
8
|
+
class: { type: String, required: false }
|
|
9
|
+
});
|
|
10
|
+
const classes = computed(
|
|
11
|
+
() => cn("cn-list", `cn-list--${props.variant}`, `cn-list--size-${props.size}`, props.class)
|
|
12
|
+
);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<ul data-slot="list" :data-material="props.material" :class="classes">
|
|
17
|
+
<slot />
|
|
18
|
+
</ul>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ListVariant, ListSize, Material } from "../contract/index.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
material?: Material;
|
|
4
|
+
variant?: ListVariant;
|
|
5
|
+
size?: ListSize;
|
|
6
|
+
class?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_template: () => {
|
|
9
|
+
__VLS_Slots: {
|
|
10
|
+
default?: (props: {}) => any;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
size: "sm" | "md";
|
|
16
|
+
variant: "plain" | "bordered";
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|