@nuxt-atelier/admin 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +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/BlocksField.d.vue.ts +14 -0
- package/dist/runtime/components/BlocksField.vue +167 -0
- package/dist/runtime/components/BlocksField.vue.d.ts +14 -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 +457 -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 +356 -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 +247 -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 +281 -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 +543 -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 +133 -0
- package/dist/runtime/types.js +0 -0
- package/dist/types.d.mts +3 -0
- package/package.json +59 -4
|
@@ -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 @@
|
|
|
1
|
+
export declare function cn(...parts: Array<string | false | null | undefined>): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splits fallthrough attributes for a field component: `class` and `style`
|
|
3
|
+
* stay on the wrapper, everything else (`name`, `required`, `autocomplete`,
|
|
4
|
+
* listeners, …) goes to the native control so forms and validation work.
|
|
5
|
+
* Pair with `defineOptions({ inheritAttrs: false })`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useControlAttrs(): {
|
|
8
|
+
rootAttrs: import("vue").ComputedRef<{
|
|
9
|
+
class: import("vue").ClassValue;
|
|
10
|
+
style: import("vue").StyleValue;
|
|
11
|
+
}>;
|
|
12
|
+
controlAttrs: import("vue").ComputedRef<{
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { computed, useAttrs } from "vue";
|
|
2
|
+
export function useControlAttrs() {
|
|
3
|
+
const attrs = useAttrs();
|
|
4
|
+
return {
|
|
5
|
+
rootAttrs: computed(() => ({ class: attrs.class, style: attrs.style })),
|
|
6
|
+
controlAttrs: computed(() => {
|
|
7
|
+
const { class: _class, style: _style, ...rest } = attrs;
|
|
8
|
+
return rest;
|
|
9
|
+
})
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Traps focus inside `el` while `active`, closes on Escape, restores focus on
|
|
4
|
+
* deactivate. Mirrors the React useFocusTrap.
|
|
5
|
+
*
|
|
6
|
+
* For non-modal surfaces that cannot be a native `<dialog>`. Modal, Dialog,
|
|
7
|
+
* and Drawer use `useModalDialog`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useFocusTrap(el: Ref<HTMLElement | null>, active: Ref<boolean>, onClose: () => void): void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { nextTick, onScopeDispose, watch } from "vue";
|
|
2
|
+
const FOCUSABLE = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
3
|
+
export function useFocusTrap(el, active, onClose) {
|
|
4
|
+
let previouslyFocused = null;
|
|
5
|
+
let trapped = null;
|
|
6
|
+
function focusables(node) {
|
|
7
|
+
return Array.from(node.querySelectorAll(FOCUSABLE));
|
|
8
|
+
}
|
|
9
|
+
function onKey(e) {
|
|
10
|
+
if (e.defaultPrevented || !trapped) return;
|
|
11
|
+
if (e.key === "Escape") {
|
|
12
|
+
e.preventDefault();
|
|
13
|
+
onClose();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (e.key !== "Tab") return;
|
|
17
|
+
const items = focusables(trapped);
|
|
18
|
+
if (items.length === 0) {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const first = items[0];
|
|
23
|
+
const last = items[items.length - 1];
|
|
24
|
+
if (e.shiftKey && ((document.activeElement?.shadowRoot?.activeElement ?? document.activeElement) === first || (document.activeElement?.shadowRoot?.activeElement ?? document.activeElement) === trapped)) {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
last.focus();
|
|
27
|
+
} else if (!e.shiftKey && (document.activeElement?.shadowRoot?.activeElement ?? document.activeElement) === last) {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
first.focus();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function release() {
|
|
33
|
+
if (!trapped) return;
|
|
34
|
+
trapped.removeEventListener("keydown", onKey);
|
|
35
|
+
trapped = null;
|
|
36
|
+
previouslyFocused?.focus?.();
|
|
37
|
+
}
|
|
38
|
+
watch(
|
|
39
|
+
active,
|
|
40
|
+
async (isActive) => {
|
|
41
|
+
if (typeof document === "undefined") return;
|
|
42
|
+
if (!isActive) return release();
|
|
43
|
+
previouslyFocused = document.activeElement?.shadowRoot?.activeElement ?? document.activeElement;
|
|
44
|
+
await nextTick();
|
|
45
|
+
const node = el.value;
|
|
46
|
+
if (!node || !active.value) return;
|
|
47
|
+
trapped = node;
|
|
48
|
+
node.addEventListener("keydown", onKey);
|
|
49
|
+
if (!node.hasAttribute("tabindex")) node.setAttribute("tabindex", "-1");
|
|
50
|
+
(focusables(node)[0] ?? node).focus();
|
|
51
|
+
},
|
|
52
|
+
{ immediate: true }
|
|
53
|
+
);
|
|
54
|
+
onScopeDispose(release);
|
|
55
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Drives a native `<dialog>` as a modal overlay from a two-way `open` model.
|
|
4
|
+
* Mirrors the React useModalDialog so Modal/Dialog/Drawer behave identically
|
|
5
|
+
* across frameworks.
|
|
6
|
+
*
|
|
7
|
+
* `showModal()` makes the rest of the page inert, renders in the top layer
|
|
8
|
+
* (no teleport needed), routes Escape to the topmost dialog only, and returns
|
|
9
|
+
* focus to the opener on close.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useModalDialog(el: Ref<HTMLDialogElement | null>, open: Ref<boolean>): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { nextTick, onBeforeUnmount, onMounted, watch } from "vue";
|
|
2
|
+
function restoreFocus(dialog, opener) {
|
|
3
|
+
const active = document.activeElement?.shadowRoot?.activeElement ?? document.activeElement;
|
|
4
|
+
const lost = !active || active === document.body || dialog.contains(active);
|
|
5
|
+
if (lost && opener?.isConnected) opener.focus();
|
|
6
|
+
}
|
|
7
|
+
export function useModalDialog(el, open) {
|
|
8
|
+
let opener = null;
|
|
9
|
+
function sync() {
|
|
10
|
+
const dialog = el.value;
|
|
11
|
+
if (!dialog) return;
|
|
12
|
+
if (open.value && !dialog.open) {
|
|
13
|
+
opener = document.activeElement?.shadowRoot?.activeElement ?? document.activeElement;
|
|
14
|
+
dialog.showModal();
|
|
15
|
+
} else if (!open.value && dialog.open) {
|
|
16
|
+
dialog.close();
|
|
17
|
+
restoreFocus(dialog, opener);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function onCancel(e) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
open.value = false;
|
|
23
|
+
}
|
|
24
|
+
function onNativeClose() {
|
|
25
|
+
if (open.value) open.value = false;
|
|
26
|
+
}
|
|
27
|
+
onMounted(() => {
|
|
28
|
+
const dialog = el.value;
|
|
29
|
+
if (!dialog) return;
|
|
30
|
+
dialog.addEventListener("cancel", onCancel);
|
|
31
|
+
dialog.addEventListener("close", onNativeClose);
|
|
32
|
+
sync();
|
|
33
|
+
});
|
|
34
|
+
watch(open, () => nextTick(sync));
|
|
35
|
+
onBeforeUnmount(() => {
|
|
36
|
+
const dialog = el.value;
|
|
37
|
+
if (!dialog) return;
|
|
38
|
+
dialog.removeEventListener("cancel", onCancel);
|
|
39
|
+
dialog.removeEventListener("close", onNativeClose);
|
|
40
|
+
if (dialog.open) dialog.close();
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const alertContract = defineContract({
|
|
3
|
+
name: "alert",
|
|
4
|
+
description: "Inline, persistent message conveying status. Not a dialog.",
|
|
5
|
+
variants: ["info", "success", "warning", "danger"],
|
|
6
|
+
defaultVariant: "info",
|
|
7
|
+
sizes: ["md"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default"],
|
|
10
|
+
aria: "alert",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
'Static informational alerts render as a region; dynamically-inserted ones use role="alert".',
|
|
13
|
+
"The leading icon is decorative (aria-hidden); meaning is carried by text."
|
|
14
|
+
],
|
|
15
|
+
keyboard: [],
|
|
16
|
+
rtl: "logical-properties",
|
|
17
|
+
touchTarget: false
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const avatarContract = defineContract({
|
|
3
|
+
name: "avatar",
|
|
4
|
+
description: "User/entity image with initials fallback. Circle or rounded-square.",
|
|
5
|
+
variants: ["circle", "rounded"],
|
|
6
|
+
defaultVariant: "circle",
|
|
7
|
+
sizes: ["sm", "md", "lg"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default"],
|
|
10
|
+
aria: "none",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
"Image avatars require alt text naming the person/entity.",
|
|
13
|
+
'Initials/fallback avatars use aria-label; decorative-only avatars use alt="".'
|
|
14
|
+
],
|
|
15
|
+
keyboard: [],
|
|
16
|
+
rtl: "logical-properties",
|
|
17
|
+
touchTarget: false
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const badgeContract = defineContract({
|
|
3
|
+
name: "badge",
|
|
4
|
+
description: "Small status/label chip. Neutral or semantic state colors.",
|
|
5
|
+
variants: ["neutral", "primary", "success", "warning", "danger"],
|
|
6
|
+
defaultVariant: "neutral",
|
|
7
|
+
sizes: ["sm", "md"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default"],
|
|
10
|
+
aria: "none",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
"Decorative by default (renders a <span>).",
|
|
13
|
+
'When conveying live status, the consumer wraps it in a role="status" region.'
|
|
14
|
+
],
|
|
15
|
+
keyboard: [],
|
|
16
|
+
rtl: "logical-properties",
|
|
17
|
+
touchTarget: false
|
|
18
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const breadcrumbContract = defineContract({
|
|
3
|
+
name: "breadcrumb",
|
|
4
|
+
description: "Hierarchical navigation trail.",
|
|
5
|
+
variants: ["default"],
|
|
6
|
+
defaultVariant: "default",
|
|
7
|
+
sizes: ["sm", "md"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default", "hover", "focus-visible"],
|
|
10
|
+
aria: "navigation",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
'<nav aria-label="Breadcrumb"> wrapping an ordered list of links.',
|
|
13
|
+
'The current page is aria-current="page" and is not a link.',
|
|
14
|
+
"Separators are decorative (aria-hidden)."
|
|
15
|
+
],
|
|
16
|
+
keyboard: [{ key: "Tab", action: "Move between crumb links" }],
|
|
17
|
+
rtl: "mirrored",
|
|
18
|
+
touchTarget: true
|
|
19
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const buttonContract = defineContract({
|
|
3
|
+
name: "button",
|
|
4
|
+
description: "Primary action trigger. Raised primary, neutral secondary, border-only ghost.",
|
|
5
|
+
variants: ["primary", "secondary", "ghost", "danger"],
|
|
6
|
+
defaultVariant: "primary",
|
|
7
|
+
sizes: ["sm", "md", "lg"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default", "hover", "focus-visible", "active", "disabled", "loading"],
|
|
10
|
+
aria: "button",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
"Renders a native <button> with type by default.",
|
|
13
|
+
"aria-disabled reflects disabled; disabled buttons are not focusable.",
|
|
14
|
+
'When loading, aria-busy="true" and the label is preserved for screen readers.'
|
|
15
|
+
],
|
|
16
|
+
keyboard: [
|
|
17
|
+
{ key: "Enter", action: "Activate" },
|
|
18
|
+
{ key: "Space", action: "Activate" }
|
|
19
|
+
],
|
|
20
|
+
rtl: "logical-properties",
|
|
21
|
+
touchTarget: true
|
|
22
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const cardContract = defineContract({
|
|
3
|
+
name: "card",
|
|
4
|
+
description: "Container surface. Glass (frosted), raised (opaque), or feature (primary emphasis).",
|
|
5
|
+
variants: ["glass", "raised", "feature"],
|
|
6
|
+
defaultVariant: "glass",
|
|
7
|
+
sizes: ["sm", "md", "lg"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default"],
|
|
10
|
+
aria: "none",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
"Non-interactive by default; renders a <section> or <article> as appropriate.",
|
|
13
|
+
"If made clickable, the consumer must add an interactive child (button/link), not a click handler on the card."
|
|
14
|
+
],
|
|
15
|
+
keyboard: [],
|
|
16
|
+
rtl: "logical-properties",
|
|
17
|
+
touchTarget: false
|
|
18
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const checkboxContract = defineContract({
|
|
3
|
+
name: "checkbox",
|
|
4
|
+
description: "Binary or indeterminate checkbox with a visible box and \u226540px hit area.",
|
|
5
|
+
variants: ["default", "error"],
|
|
6
|
+
defaultVariant: "default",
|
|
7
|
+
sizes: ["sm", "md"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default", "hover", "focus-visible", "checked", "disabled", "error"],
|
|
10
|
+
aria: "checkbox",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
'Native <input type="checkbox">; supports indeterminate via the DOM property.',
|
|
13
|
+
"Label is clickable and associated via for/id."
|
|
14
|
+
],
|
|
15
|
+
keyboard: [{ key: "Space", action: "Toggle" }],
|
|
16
|
+
rtl: "mirrored",
|
|
17
|
+
model: { prop: "checked", type: "boolean" },
|
|
18
|
+
touchTarget: true
|
|
19
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const datePickerContract = defineContract({
|
|
3
|
+
name: "date-picker",
|
|
4
|
+
description: "Date entry built on the native date input for reliability and locale support.",
|
|
5
|
+
variants: ["default", "error"],
|
|
6
|
+
defaultVariant: "default",
|
|
7
|
+
sizes: ["sm", "md", "lg"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default", "hover", "focus-visible", "disabled", "error"],
|
|
10
|
+
aria: "none",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
'Native <input type="date">; label associated via for/id.',
|
|
13
|
+
"Min/max constrain selectable dates; aria-invalid on error."
|
|
14
|
+
],
|
|
15
|
+
keyboard: [
|
|
16
|
+
{ key: "ArrowUp", action: "Increment focused date segment" },
|
|
17
|
+
{ key: "ArrowDown", action: "Decrement focused date segment" }
|
|
18
|
+
],
|
|
19
|
+
rtl: "logical-properties",
|
|
20
|
+
model: { prop: "value", type: "string" },
|
|
21
|
+
touchTarget: true
|
|
22
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const dialogContract = defineContract({
|
|
3
|
+
name: "dialog",
|
|
4
|
+
description: "Confirmation/decision dialog requiring a response. Like Modal but action-oriented.",
|
|
5
|
+
variants: ["default", "destructive"],
|
|
6
|
+
defaultVariant: "default",
|
|
7
|
+
sizes: ["sm", "md"],
|
|
8
|
+
defaultSize: "sm",
|
|
9
|
+
states: ["default"],
|
|
10
|
+
aria: "alertdialog",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
'role="alertdialog" aria-modal="true"; labelled by title, described by body.',
|
|
13
|
+
"Focus moves to the least-destructive action on open; trapped while open; restored on close."
|
|
14
|
+
],
|
|
15
|
+
keyboard: [
|
|
16
|
+
{ key: "Escape", action: "Cancel/close" },
|
|
17
|
+
{ key: "Tab", action: "Cycle focus (trapped)" },
|
|
18
|
+
{ key: "Enter", action: "Confirm the focused action" }
|
|
19
|
+
],
|
|
20
|
+
rtl: "logical-properties",
|
|
21
|
+
model: { prop: "open", type: "boolean" },
|
|
22
|
+
touchTarget: true
|
|
23
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const drawerContract = defineContract({
|
|
3
|
+
name: "drawer",
|
|
4
|
+
description: "Edge-anchored panel that slides in over a scrim. Placement is logical (start/end).",
|
|
5
|
+
variants: ["default"],
|
|
6
|
+
defaultVariant: "default",
|
|
7
|
+
sizes: ["sm", "md", "lg"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default"],
|
|
10
|
+
aria: "dialog",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
'role="dialog" aria-modal="true"; labelled by its heading.',
|
|
13
|
+
"Placement start/end resolves with text direction (start = left in LTR, right in RTL).",
|
|
14
|
+
"Focus trapped while open; restored on close; background inert."
|
|
15
|
+
],
|
|
16
|
+
keyboard: [
|
|
17
|
+
{ key: "Escape", action: "Close" },
|
|
18
|
+
{ key: "Tab", action: "Cycle focus within the drawer (trapped)" }
|
|
19
|
+
],
|
|
20
|
+
rtl: "mirrored",
|
|
21
|
+
model: { prop: "open", type: "boolean" },
|
|
22
|
+
touchTarget: true
|
|
23
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const fileUploadContract: import("./types.js").Contract<"default" | "error", "md" | "lg">;
|
|
2
|
+
export type FileUploadVariant = (typeof fileUploadContract.variants)[number];
|
|
3
|
+
export type FileUploadSize = (typeof fileUploadContract.sizes)[number];
|
|
4
|
+
/**
|
|
5
|
+
* Whether `file` satisfies an `accept` string as the native picker would read
|
|
6
|
+
* it: comma-separated extensions (`.png`), exact MIME types (`image/png`), or
|
|
7
|
+
* MIME wildcards (`image/*`). An empty `accept` admits everything.
|
|
8
|
+
*/
|
|
9
|
+
export declare function fileMatchesAccept(file: {
|
|
10
|
+
name: string;
|
|
11
|
+
type: string;
|
|
12
|
+
}, accept?: string): boolean;
|
|
13
|
+
/** Narrow dropped files to what the native input would have allowed. */
|
|
14
|
+
export declare function acceptedFiles<T extends {
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
}>(files: Iterable<T>, accept?: string, multiple?: boolean): T[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineContract } from "./types.js";
|
|
2
|
+
export const fileUploadContract = defineContract({
|
|
3
|
+
name: "file-upload",
|
|
4
|
+
description: "File picker with a drop zone. Falls back to a native file input.",
|
|
5
|
+
variants: ["default", "error"],
|
|
6
|
+
defaultVariant: "default",
|
|
7
|
+
sizes: ["md", "lg"],
|
|
8
|
+
defaultSize: "md",
|
|
9
|
+
states: ["default", "hover", "focus-visible", "disabled", "error"],
|
|
10
|
+
aria: "none",
|
|
11
|
+
ariaNotes: [
|
|
12
|
+
'Native <input type="file"> is the source of truth; the drop zone is a labelled button that triggers it.',
|
|
13
|
+
"Drag-over state is announced via a polite live region; not required to operate."
|
|
14
|
+
],
|
|
15
|
+
keyboard: [
|
|
16
|
+
{ key: "Enter", action: "Open the file dialog" },
|
|
17
|
+
{ key: "Space", action: "Open the file dialog" }
|
|
18
|
+
],
|
|
19
|
+
rtl: "logical-properties",
|
|
20
|
+
model: { prop: "files", type: "File[]" },
|
|
21
|
+
touchTarget: true
|
|
22
|
+
});
|
|
23
|
+
export function fileMatchesAccept(file, accept) {
|
|
24
|
+
if (!accept) return true;
|
|
25
|
+
const name = file.name.toLowerCase();
|
|
26
|
+
const type = file.type.toLowerCase();
|
|
27
|
+
return accept.split(",").map((t) => t.trim().toLowerCase()).filter(Boolean).some((token) => {
|
|
28
|
+
if (token.startsWith(".")) return name.endsWith(token);
|
|
29
|
+
if (token.endsWith("/*")) return type.startsWith(token.slice(0, -1));
|
|
30
|
+
return type === token;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export function acceptedFiles(files, accept, multiple) {
|
|
34
|
+
const ok = Array.from(files).filter((f) => fileMatchesAccept(f, accept));
|
|
35
|
+
return multiple ? ok : ok.slice(0, 1);
|
|
36
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./button.contract.js";
|
|
3
|
+
export * from "./card.contract.js";
|
|
4
|
+
export * from "./input.contract.js";
|
|
5
|
+
export * from "./toggle.contract.js";
|
|
6
|
+
export * from "./nav.contract.js";
|
|
7
|
+
export * from "./modal.contract.js";
|
|
8
|
+
export * from "./tabs.contract.js";
|
|
9
|
+
export * from "./tooltip.contract.js";
|
|
10
|
+
export * from "./badge.contract.js";
|
|
11
|
+
export * from "./select.contract.js";
|
|
12
|
+
export * from "./checkbox.contract.js";
|
|
13
|
+
export * from "./radio.contract.js";
|
|
14
|
+
export * from "./slider.contract.js";
|
|
15
|
+
export * from "./date-picker.contract.js";
|
|
16
|
+
export * from "./textarea.contract.js";
|
|
17
|
+
export * from "./file-upload.contract.js";
|
|
18
|
+
export * from "./table.contract.js";
|
|
19
|
+
export * from "./list.contract.js";
|
|
20
|
+
export * from "./avatar.contract.js";
|
|
21
|
+
export * from "./progress.contract.js";
|
|
22
|
+
export * from "./skeleton.contract.js";
|
|
23
|
+
export * from "./breadcrumb.contract.js";
|
|
24
|
+
export * from "./pagination.contract.js";
|
|
25
|
+
export * from "./toast.contract.js";
|
|
26
|
+
export * from "./alert.contract.js";
|
|
27
|
+
export * from "./dialog.contract.js";
|
|
28
|
+
export * from "./drawer.contract.js";
|
|
29
|
+
export * from "./segmented-control.contract.js";
|
|
30
|
+
export * from "./sheet.contract.js";
|
|
31
|
+
export * from "./tab-bar.contract.js";
|
|
32
|
+
export * from "./menu.contract.js";
|
|
33
|
+
/** All contracts keyed by component name. Used by contract-parity tests. */
|
|
34
|
+
export declare const contracts: {
|
|
35
|
+
readonly button: import("./types.js").Contract<"primary" | "secondary" | "ghost" | "danger", "sm" | "md" | "lg">;
|
|
36
|
+
readonly card: import("./types.js").Contract<"glass" | "raised" | "feature", "sm" | "md" | "lg">;
|
|
37
|
+
readonly input: import("./types.js").Contract<"default" | "error", "sm" | "md" | "lg">;
|
|
38
|
+
readonly toggle: import("./types.js").Contract<"default", "sm" | "md">;
|
|
39
|
+
readonly nav: import("./types.js").Contract<"glass" | "solid", "md">;
|
|
40
|
+
readonly modal: import("./types.js").Contract<"default", "sm" | "md" | "lg">;
|
|
41
|
+
readonly tabs: import("./types.js").Contract<"line" | "enclosed", "sm" | "md">;
|
|
42
|
+
readonly tooltip: import("./types.js").Contract<"default", "md">;
|
|
43
|
+
readonly badge: import("./types.js").Contract<"success" | "primary" | "danger" | "neutral" | "warning", "sm" | "md">;
|
|
44
|
+
readonly select: import("./types.js").Contract<"default" | "error", "sm" | "md" | "lg">;
|
|
45
|
+
readonly checkbox: import("./types.js").Contract<"default" | "error", "sm" | "md">;
|
|
46
|
+
readonly radio: import("./types.js").Contract<"default" | "error", "sm" | "md">;
|
|
47
|
+
readonly slider: import("./types.js").Contract<"default", "sm" | "md">;
|
|
48
|
+
readonly "date-picker": import("./types.js").Contract<"default" | "error", "sm" | "md" | "lg">;
|
|
49
|
+
readonly textarea: import("./types.js").Contract<"default" | "error", "sm" | "md" | "lg">;
|
|
50
|
+
readonly "file-upload": import("./types.js").Contract<"default" | "error", "md" | "lg">;
|
|
51
|
+
readonly table: import("./types.js").Contract<"default" | "striped", "sm" | "md">;
|
|
52
|
+
readonly list: import("./types.js").Contract<"plain" | "bordered", "sm" | "md">;
|
|
53
|
+
readonly avatar: import("./types.js").Contract<"circle" | "rounded", "sm" | "md" | "lg">;
|
|
54
|
+
readonly progress: import("./types.js").Contract<"bar" | "indeterminate", "sm" | "md">;
|
|
55
|
+
readonly skeleton: import("./types.js").Contract<"text" | "block" | "circle", "sm" | "md" | "lg">;
|
|
56
|
+
readonly breadcrumb: import("./types.js").Contract<"default", "sm" | "md">;
|
|
57
|
+
readonly pagination: import("./types.js").Contract<"default", "sm" | "md">;
|
|
58
|
+
readonly toast: import("./types.js").Contract<"success" | "danger" | "neutral" | "warning", "md">;
|
|
59
|
+
readonly alert: import("./types.js").Contract<"success" | "danger" | "warning" | "info", "md">;
|
|
60
|
+
readonly dialog: import("./types.js").Contract<"default" | "destructive", "sm" | "md">;
|
|
61
|
+
readonly drawer: import("./types.js").Contract<"default", "sm" | "md" | "lg">;
|
|
62
|
+
readonly "segmented-control": import("./types.js").Contract<"default" | "block", "sm" | "md">;
|
|
63
|
+
readonly sheet: import("./types.js").Contract<"default", "md">;
|
|
64
|
+
readonly "tab-bar": import("./types.js").Contract<"default", "md">;
|
|
65
|
+
readonly menu: import("./types.js").Contract<"default", "md">;
|
|
66
|
+
};
|
|
67
|
+
export type ContractName = keyof typeof contracts;
|