@xleddyl/nuxt-cms 0.4.4 → 0.5.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/README.md +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +22 -7
- package/dist/runtime/app/components/cms/BlockOutline.vue +56 -67
- package/dist/runtime/app/components/cms/BlockPalette.vue +3 -1
- package/dist/runtime/app/components/cms/BlocksField.vue +155 -149
- package/dist/runtime/app/components/cms/BrandMark.d.vue.ts +3 -1
- package/dist/runtime/app/components/cms/BrandMark.vue +24 -25
- package/dist/runtime/app/components/cms/BrandMark.vue.d.ts +3 -1
- package/dist/runtime/app/components/cms/{Checkbox.d.vue.ts → ConfirmGroups.d.vue.ts} +4 -4
- package/dist/runtime/app/components/cms/ConfirmGroups.vue +22 -0
- package/dist/runtime/app/components/cms/{Checkbox.vue.d.ts → ConfirmGroups.vue.d.ts} +4 -4
- package/dist/runtime/app/components/cms/EntryDrawer.d.vue.ts +2 -2
- package/dist/runtime/app/components/cms/EntryDrawer.vue +62 -47
- package/dist/runtime/app/components/cms/EntryDrawer.vue.d.ts +2 -2
- package/dist/runtime/app/components/cms/EntryForm.vue +100 -95
- package/dist/runtime/app/components/cms/FieldInput.vue +56 -32
- package/dist/runtime/app/components/cms/ImportModal.d.vue.ts +2 -2
- package/dist/runtime/app/components/cms/ImportModal.vue +80 -79
- package/dist/runtime/app/components/cms/ImportModal.vue.d.ts +2 -2
- package/dist/runtime/app/components/cms/JsonField.vue +17 -8
- package/dist/runtime/app/components/cms/ListFilters.vue +54 -63
- package/dist/runtime/app/components/cms/LocaleSwitch.vue +21 -18
- package/dist/runtime/app/components/cms/MediaDetail.vue +110 -72
- package/dist/runtime/app/components/cms/MediaField.vue +37 -29
- package/dist/runtime/app/components/cms/MediaFolderPicker.d.vue.ts +1 -0
- package/dist/runtime/app/components/cms/MediaFolderPicker.vue +77 -49
- package/dist/runtime/app/components/cms/MediaFolderPicker.vue.d.ts +1 -0
- package/dist/runtime/app/components/cms/MediaGallery.vue +300 -323
- package/dist/runtime/app/components/cms/MediaThumb.vue +7 -2
- package/dist/runtime/app/components/cms/MediaUpload.vue +37 -70
- package/dist/runtime/app/components/cms/RelationField.vue +23 -71
- package/dist/runtime/app/components/cms/RichTextField.vue +23 -177
- package/dist/runtime/app/components/cms/SettingsAccount.vue +96 -104
- package/dist/runtime/app/components/cms/SettingsColumns.vue +7 -6
- package/dist/runtime/app/components/cms/SettingsEntry.d.vue.ts +10 -1
- package/dist/runtime/app/components/cms/SettingsEntry.vue +35 -52
- package/dist/runtime/app/components/cms/SettingsEntry.vue.d.ts +10 -1
- package/dist/runtime/app/components/cms/SettingsLayout.vue +7 -4
- package/dist/runtime/app/components/cms/SettingsModal.d.vue.ts +0 -4
- package/dist/runtime/app/components/cms/SettingsModal.vue +102 -151
- package/dist/runtime/app/components/cms/SettingsModal.vue.d.ts +0 -4
- package/dist/runtime/app/components/cms/SettingsUsers.d.vue.ts +8 -1
- package/dist/runtime/app/components/cms/SettingsUsers.vue +182 -189
- package/dist/runtime/app/components/cms/SettingsUsers.vue.d.ts +8 -1
- package/dist/runtime/app/components/cms/SlugField.vue +9 -6
- package/dist/runtime/app/components/cms/StatusBadge.vue +7 -6
- package/dist/runtime/app/components/cms/TranslatableField.vue +11 -6
- package/dist/runtime/app/components/cms/VisualEditor.vue +243 -282
- package/dist/runtime/app/components/cms/WelcomeModal.vue +49 -41
- package/dist/runtime/app/composables/cms-confirm.d.ts +0 -6
- package/dist/runtime/app/composables/cms-confirm.js +13 -13
- package/dist/runtime/app/composables/cms-media-uploader.d.ts +4 -0
- package/dist/runtime/app/composables/cms-media-uploader.js +12 -40
- package/dist/runtime/app/composables/cms-theme.d.ts +3 -9
- package/dist/runtime/app/composables/cms-theme.js +1 -19
- package/dist/runtime/app/composables/cms-toast.d.ts +3 -4
- package/dist/runtime/app/composables/cms-toast.js +6 -13
- package/dist/runtime/app/layouts/cms-admin.d.vue.ts +2 -2
- package/dist/runtime/app/layouts/cms-admin.vue +184 -113
- package/dist/runtime/app/layouts/cms-admin.vue.d.ts +2 -2
- package/dist/runtime/app/layouts/cms-editor.d.vue.ts +2 -2
- package/dist/runtime/app/layouts/cms-editor.vue +9 -4
- package/dist/runtime/app/layouts/cms-editor.vue.d.ts +2 -2
- package/dist/runtime/app/pages/admin-collection.vue +178 -143
- package/dist/runtime/app/pages/admin-content.vue +35 -30
- package/dist/runtime/app/pages/admin-entry.vue +14 -9
- package/dist/runtime/app/pages/admin-login.vue +57 -54
- package/dist/runtime/app/pages/admin-media.vue +6 -4
- package/dist/runtime/app/pages/admin-preview.vue +3 -2
- package/dist/runtime/app/preview/PreviewOverlay.vue +9 -7
- package/dist/runtime/app/utils/ui.d.ts +1 -3
- package/dist/runtime/app/utils/ui.js +4 -2
- package/dist/runtime/assets/editor.css +1 -0
- package/dist/runtime/assets/main.css +1 -1
- package/dist/runtime/assets/media.css +1 -0
- package/dist/runtime/assets/shell.css +1 -0
- package/package.json +9 -8
- package/dist/runtime/app/components/cms/Alert.d.vue.ts +0 -17
- package/dist/runtime/app/components/cms/Alert.vue +0 -13
- package/dist/runtime/app/components/cms/Alert.vue.d.ts +0 -17
- package/dist/runtime/app/components/cms/Button.d.vue.ts +0 -26
- package/dist/runtime/app/components/cms/Button.vue +0 -48
- package/dist/runtime/app/components/cms/Button.vue.d.ts +0 -26
- package/dist/runtime/app/components/cms/Checkbox.vue +0 -21
- package/dist/runtime/app/components/cms/ConfirmModal.d.vue.ts +0 -3
- package/dist/runtime/app/components/cms/ConfirmModal.vue +0 -46
- package/dist/runtime/app/components/cms/ConfirmModal.vue.d.ts +0 -3
- package/dist/runtime/app/components/cms/Drawer.d.vue.ts +0 -30
- package/dist/runtime/app/components/cms/Drawer.vue +0 -61
- package/dist/runtime/app/components/cms/Drawer.vue.d.ts +0 -30
- package/dist/runtime/app/components/cms/DropdownMenu.d.vue.ts +0 -26
- package/dist/runtime/app/components/cms/DropdownMenu.vue +0 -48
- package/dist/runtime/app/components/cms/DropdownMenu.vue.d.ts +0 -26
- package/dist/runtime/app/components/cms/EmptyState.d.vue.ts +0 -19
- package/dist/runtime/app/components/cms/EmptyState.vue +0 -21
- package/dist/runtime/app/components/cms/EmptyState.vue.d.ts +0 -19
- package/dist/runtime/app/components/cms/Form.d.vue.ts +0 -37
- package/dist/runtime/app/components/cms/Form.vue +0 -63
- package/dist/runtime/app/components/cms/Form.vue.d.ts +0 -37
- package/dist/runtime/app/components/cms/FormField.d.vue.ts +0 -22
- package/dist/runtime/app/components/cms/FormField.vue +0 -35
- package/dist/runtime/app/components/cms/FormField.vue.d.ts +0 -22
- package/dist/runtime/app/components/cms/Icon.d.vue.ts +0 -6
- package/dist/runtime/app/components/cms/Icon.vue +0 -23
- package/dist/runtime/app/components/cms/Icon.vue.d.ts +0 -6
- package/dist/runtime/app/components/cms/Input.d.vue.ts +0 -27
- package/dist/runtime/app/components/cms/Input.vue +0 -46
- package/dist/runtime/app/components/cms/Input.vue.d.ts +0 -27
- package/dist/runtime/app/components/cms/Modal.d.vue.ts +0 -31
- package/dist/runtime/app/components/cms/Modal.vue +0 -49
- package/dist/runtime/app/components/cms/Modal.vue.d.ts +0 -31
- package/dist/runtime/app/components/cms/PageHeader.d.vue.ts +0 -25
- package/dist/runtime/app/components/cms/PageHeader.vue +0 -36
- package/dist/runtime/app/components/cms/PageHeader.vue.d.ts +0 -25
- package/dist/runtime/app/components/cms/Pagination.d.vue.ts +0 -15
- package/dist/runtime/app/components/cms/Pagination.vue +0 -51
- package/dist/runtime/app/components/cms/Pagination.vue.d.ts +0 -15
- package/dist/runtime/app/components/cms/PasswordInput.d.vue.ts +0 -17
- package/dist/runtime/app/components/cms/PasswordInput.vue +0 -81
- package/dist/runtime/app/components/cms/PasswordInput.vue.d.ts +0 -17
- package/dist/runtime/app/components/cms/Popover.d.vue.ts +0 -22
- package/dist/runtime/app/components/cms/Popover.vue +0 -27
- package/dist/runtime/app/components/cms/Popover.vue.d.ts +0 -22
- package/dist/runtime/app/components/cms/Search.d.vue.ts +0 -7
- package/dist/runtime/app/components/cms/Search.vue +0 -347
- package/dist/runtime/app/components/cms/Search.vue.d.ts +0 -7
- package/dist/runtime/app/components/cms/SelectMenu.d.vue.ts +0 -25
- package/dist/runtime/app/components/cms/SelectMenu.vue +0 -152
- package/dist/runtime/app/components/cms/SelectMenu.vue.d.ts +0 -25
- package/dist/runtime/app/components/cms/Spinner.d.vue.ts +0 -3
- package/dist/runtime/app/components/cms/Spinner.vue +0 -5
- package/dist/runtime/app/components/cms/Spinner.vue.d.ts +0 -3
- package/dist/runtime/app/components/cms/Switch.d.vue.ts +0 -10
- package/dist/runtime/app/components/cms/Switch.vue +0 -14
- package/dist/runtime/app/components/cms/Switch.vue.d.ts +0 -10
- package/dist/runtime/app/components/cms/Table.d.vue.ts +0 -51
- package/dist/runtime/app/components/cms/Table.vue +0 -115
- package/dist/runtime/app/components/cms/Table.vue.d.ts +0 -51
- package/dist/runtime/app/components/cms/Textarea.d.vue.ts +0 -15
- package/dist/runtime/app/components/cms/Textarea.vue +0 -16
- package/dist/runtime/app/components/cms/Textarea.vue.d.ts +0 -15
- package/dist/runtime/app/components/cms/Toaster.d.vue.ts +0 -3
- package/dist/runtime/app/components/cms/Toaster.vue +0 -48
- package/dist/runtime/app/components/cms/Toaster.vue.d.ts +0 -3
- package/dist/runtime/app/composables/cms-overlay.d.ts +0 -4
- package/dist/runtime/app/composables/cms-overlay.js +0 -23
- package/dist/runtime/assets/svg/academic-cap.svg +0 -3
- package/dist/runtime/assets/svg/adjustments-horizontal.svg +0 -3
- package/dist/runtime/assets/svg/adjustments-vertical.svg +0 -3
- package/dist/runtime/assets/svg/archive-box-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/archive-box-x-mark.svg +0 -3
- package/dist/runtime/assets/svg/archive-box.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-circle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-on-square-stack.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-on-square.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-tray.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left-circle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left-end-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left-start-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-long-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-long-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-long-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-long-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-path-rounded-square.svg +0 -3
- package/dist/runtime/assets/svg/arrow-path.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right-circle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right-end-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right-start-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-small-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-small-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-small-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-small-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-top-right-on-square.svg +0 -3
- package/dist/runtime/assets/svg/arrow-trending-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-trending-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-down-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-down-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-left-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-left-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-right-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-right-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-up-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-up-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-circle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-on-square-stack.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-on-square.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-tray.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-uturn-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-uturn-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-uturn-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-uturn-up.svg +0 -3
- package/dist/runtime/assets/svg/arrows-pointing-in.svg +0 -3
- package/dist/runtime/assets/svg/arrows-pointing-out.svg +0 -3
- package/dist/runtime/assets/svg/arrows-right-left.svg +0 -3
- package/dist/runtime/assets/svg/arrows-up-down.svg +0 -3
- package/dist/runtime/assets/svg/at-symbol.svg +0 -3
- package/dist/runtime/assets/svg/backspace.svg +0 -3
- package/dist/runtime/assets/svg/backward.svg +0 -3
- package/dist/runtime/assets/svg/banknotes.svg +0 -3
- package/dist/runtime/assets/svg/bars-2.svg +0 -3
- package/dist/runtime/assets/svg/bars-3-bottom-left.svg +0 -3
- package/dist/runtime/assets/svg/bars-3-bottom-right.svg +0 -3
- package/dist/runtime/assets/svg/bars-3-center-left.svg +0 -3
- package/dist/runtime/assets/svg/bars-3.svg +0 -3
- package/dist/runtime/assets/svg/bars-4.svg +0 -3
- package/dist/runtime/assets/svg/bars-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/bars-arrow-up.svg +0 -3
- package/dist/runtime/assets/svg/battery-0.svg +0 -3
- package/dist/runtime/assets/svg/battery-100.svg +0 -3
- package/dist/runtime/assets/svg/battery-50.svg +0 -3
- package/dist/runtime/assets/svg/beaker.svg +0 -3
- package/dist/runtime/assets/svg/bell-alert.svg +0 -3
- package/dist/runtime/assets/svg/bell-slash.svg +0 -3
- package/dist/runtime/assets/svg/bell-snooze.svg +0 -3
- package/dist/runtime/assets/svg/bell.svg +0 -3
- package/dist/runtime/assets/svg/bold.svg +0 -3
- package/dist/runtime/assets/svg/bolt-slash.svg +0 -3
- package/dist/runtime/assets/svg/bolt.svg +0 -3
- package/dist/runtime/assets/svg/book-open.svg +0 -3
- package/dist/runtime/assets/svg/bookmark-slash.svg +0 -3
- package/dist/runtime/assets/svg/bookmark-square.svg +0 -3
- package/dist/runtime/assets/svg/bookmark.svg +0 -3
- package/dist/runtime/assets/svg/briefcase.svg +0 -3
- package/dist/runtime/assets/svg/bug-ant.svg +0 -3
- package/dist/runtime/assets/svg/building-library.svg +0 -3
- package/dist/runtime/assets/svg/building-office-2.svg +0 -3
- package/dist/runtime/assets/svg/building-office.svg +0 -3
- package/dist/runtime/assets/svg/building-storefront.svg +0 -3
- package/dist/runtime/assets/svg/cake.svg +0 -3
- package/dist/runtime/assets/svg/calculator.svg +0 -3
- package/dist/runtime/assets/svg/calendar-date-range.svg +0 -3
- package/dist/runtime/assets/svg/calendar-days.svg +0 -3
- package/dist/runtime/assets/svg/calendar.svg +0 -3
- package/dist/runtime/assets/svg/camera.svg +0 -4
- package/dist/runtime/assets/svg/chart-bar-square.svg +0 -3
- package/dist/runtime/assets/svg/chart-bar.svg +0 -3
- package/dist/runtime/assets/svg/chart-pie.svg +0 -4
- package/dist/runtime/assets/svg/chat-bubble-bottom-center-text.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-bottom-center.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-left-ellipsis.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-left-right.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-left.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-oval-left-ellipsis.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-oval-left.svg +0 -3
- package/dist/runtime/assets/svg/check-badge.svg +0 -3
- package/dist/runtime/assets/svg/check-circle.svg +0 -3
- package/dist/runtime/assets/svg/check.svg +0 -3
- package/dist/runtime/assets/svg/chevron-double-down.svg +0 -3
- package/dist/runtime/assets/svg/chevron-double-left.svg +0 -3
- package/dist/runtime/assets/svg/chevron-double-right.svg +0 -3
- package/dist/runtime/assets/svg/chevron-double-up.svg +0 -4
- package/dist/runtime/assets/svg/chevron-down.svg +0 -3
- package/dist/runtime/assets/svg/chevron-left.svg +0 -3
- package/dist/runtime/assets/svg/chevron-right.svg +0 -3
- package/dist/runtime/assets/svg/chevron-up-down.svg +0 -3
- package/dist/runtime/assets/svg/chevron-up.svg +0 -3
- package/dist/runtime/assets/svg/circle-stack.svg +0 -3
- package/dist/runtime/assets/svg/clipboard-document-check.svg +0 -3
- package/dist/runtime/assets/svg/clipboard-document-list.svg +0 -3
- package/dist/runtime/assets/svg/clipboard-document.svg +0 -3
- package/dist/runtime/assets/svg/clipboard.svg +0 -3
- package/dist/runtime/assets/svg/clock.svg +0 -3
- package/dist/runtime/assets/svg/cloud-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/cloud-arrow-up.svg +0 -3
- package/dist/runtime/assets/svg/cloud.svg +0 -3
- package/dist/runtime/assets/svg/code-bracket-square.svg +0 -3
- package/dist/runtime/assets/svg/code-bracket.svg +0 -3
- package/dist/runtime/assets/svg/cog-6-tooth.svg +0 -4
- package/dist/runtime/assets/svg/cog-8-tooth.svg +0 -4
- package/dist/runtime/assets/svg/cog.svg +0 -3
- package/dist/runtime/assets/svg/command-line.svg +0 -3
- package/dist/runtime/assets/svg/computer-desktop.svg +0 -3
- package/dist/runtime/assets/svg/cpu-chip.svg +0 -3
- package/dist/runtime/assets/svg/credit-card.svg +0 -3
- package/dist/runtime/assets/svg/cube-transparent.svg +0 -3
- package/dist/runtime/assets/svg/cube.svg +0 -3
- package/dist/runtime/assets/svg/currency-bangladeshi.svg +0 -3
- package/dist/runtime/assets/svg/currency-dollar.svg +0 -3
- package/dist/runtime/assets/svg/currency-euro.svg +0 -3
- package/dist/runtime/assets/svg/currency-pound.svg +0 -3
- package/dist/runtime/assets/svg/currency-rupee.svg +0 -3
- package/dist/runtime/assets/svg/currency-yen.svg +0 -3
- package/dist/runtime/assets/svg/cursor-arrow-rays.svg +0 -3
- package/dist/runtime/assets/svg/cursor-arrow-ripple.svg +0 -3
- package/dist/runtime/assets/svg/device-phone-mobile.svg +0 -3
- package/dist/runtime/assets/svg/device-tablet.svg +0 -3
- package/dist/runtime/assets/svg/divide.svg +0 -3
- package/dist/runtime/assets/svg/document-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/document-arrow-up.svg +0 -3
- package/dist/runtime/assets/svg/document-chart-bar.svg +0 -3
- package/dist/runtime/assets/svg/document-check.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-bangladeshi.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-dollar.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-euro.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-pound.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-rupee.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-yen.svg +0 -3
- package/dist/runtime/assets/svg/document-duplicate.svg +0 -3
- package/dist/runtime/assets/svg/document-magnifying-glass.svg +0 -3
- package/dist/runtime/assets/svg/document-minus.svg +0 -3
- package/dist/runtime/assets/svg/document-plus.svg +0 -3
- package/dist/runtime/assets/svg/document-text.svg +0 -3
- package/dist/runtime/assets/svg/document.svg +0 -3
- package/dist/runtime/assets/svg/ellipsis-horizontal-circle.svg +0 -3
- package/dist/runtime/assets/svg/ellipsis-horizontal.svg +0 -3
- package/dist/runtime/assets/svg/ellipsis-vertical.svg +0 -3
- package/dist/runtime/assets/svg/envelope-open.svg +0 -3
- package/dist/runtime/assets/svg/envelope.svg +0 -3
- package/dist/runtime/assets/svg/equals.svg +0 -3
- package/dist/runtime/assets/svg/exclamation-circle.svg +0 -3
- package/dist/runtime/assets/svg/exclamation-triangle.svg +0 -3
- package/dist/runtime/assets/svg/eye-dropper.svg +0 -3
- package/dist/runtime/assets/svg/eye-slash.svg +0 -3
- package/dist/runtime/assets/svg/eye.svg +0 -4
- package/dist/runtime/assets/svg/face-frown.svg +0 -3
- package/dist/runtime/assets/svg/face-smile.svg +0 -3
- package/dist/runtime/assets/svg/film.svg +0 -3
- package/dist/runtime/assets/svg/finger-print.svg +0 -3
- package/dist/runtime/assets/svg/fire.svg +0 -4
- package/dist/runtime/assets/svg/flag.svg +0 -3
- package/dist/runtime/assets/svg/folder-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/folder-minus.svg +0 -3
- package/dist/runtime/assets/svg/folder-open.svg +0 -3
- package/dist/runtime/assets/svg/folder-plus.svg +0 -3
- package/dist/runtime/assets/svg/folder.svg +0 -3
- package/dist/runtime/assets/svg/forward.svg +0 -3
- package/dist/runtime/assets/svg/funnel.svg +0 -3
- package/dist/runtime/assets/svg/gif.svg +0 -3
- package/dist/runtime/assets/svg/gift-top.svg +0 -3
- package/dist/runtime/assets/svg/gift.svg +0 -3
- package/dist/runtime/assets/svg/globe-alt.svg +0 -3
- package/dist/runtime/assets/svg/globe-americas.svg +0 -3
- package/dist/runtime/assets/svg/globe-asia-australia.svg +0 -3
- package/dist/runtime/assets/svg/globe-europe-africa.svg +0 -3
- package/dist/runtime/assets/svg/h1.svg +0 -3
- package/dist/runtime/assets/svg/h2.svg +0 -3
- package/dist/runtime/assets/svg/h3.svg +0 -3
- package/dist/runtime/assets/svg/hand-raised.svg +0 -3
- package/dist/runtime/assets/svg/hand-thumb-down.svg +0 -3
- package/dist/runtime/assets/svg/hand-thumb-up.svg +0 -3
- package/dist/runtime/assets/svg/hashtag.svg +0 -3
- package/dist/runtime/assets/svg/heart.svg +0 -3
- package/dist/runtime/assets/svg/home-modern.svg +0 -3
- package/dist/runtime/assets/svg/home.svg +0 -3
- package/dist/runtime/assets/svg/identification.svg +0 -3
- package/dist/runtime/assets/svg/inbox-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/inbox-stack.svg +0 -3
- package/dist/runtime/assets/svg/inbox.svg +0 -3
- package/dist/runtime/assets/svg/information-circle.svg +0 -3
- package/dist/runtime/assets/svg/italic.svg +0 -3
- package/dist/runtime/assets/svg/key.svg +0 -3
- package/dist/runtime/assets/svg/language.svg +0 -3
- package/dist/runtime/assets/svg/lifebuoy.svg +0 -3
- package/dist/runtime/assets/svg/light-bulb.svg +0 -3
- package/dist/runtime/assets/svg/link-slash.svg +0 -3
- package/dist/runtime/assets/svg/link.svg +0 -3
- package/dist/runtime/assets/svg/list-bullet.svg +0 -3
- package/dist/runtime/assets/svg/lock-closed.svg +0 -3
- package/dist/runtime/assets/svg/lock-open.svg +0 -3
- package/dist/runtime/assets/svg/magnifying-glass-circle.svg +0 -3
- package/dist/runtime/assets/svg/magnifying-glass-minus.svg +0 -3
- package/dist/runtime/assets/svg/magnifying-glass-plus.svg +0 -3
- package/dist/runtime/assets/svg/magnifying-glass.svg +0 -3
- package/dist/runtime/assets/svg/map-pin.svg +0 -4
- package/dist/runtime/assets/svg/map.svg +0 -3
- package/dist/runtime/assets/svg/megaphone.svg +0 -3
- package/dist/runtime/assets/svg/microphone.svg +0 -3
- package/dist/runtime/assets/svg/minus-circle.svg +0 -3
- package/dist/runtime/assets/svg/minus-small.svg +0 -3
- package/dist/runtime/assets/svg/minus.svg +0 -3
- package/dist/runtime/assets/svg/moon.svg +0 -3
- package/dist/runtime/assets/svg/musical-note.svg +0 -3
- package/dist/runtime/assets/svg/newspaper.svg +0 -3
- package/dist/runtime/assets/svg/no-symbol.svg +0 -3
- package/dist/runtime/assets/svg/numbered-list.svg +0 -3
- package/dist/runtime/assets/svg/paint-brush.svg +0 -3
- package/dist/runtime/assets/svg/paper-airplane.svg +0 -3
- package/dist/runtime/assets/svg/paper-clip.svg +0 -3
- package/dist/runtime/assets/svg/pause-circle.svg +0 -3
- package/dist/runtime/assets/svg/pause.svg +0 -3
- package/dist/runtime/assets/svg/pencil-square.svg +0 -3
- package/dist/runtime/assets/svg/pencil.svg +0 -3
- package/dist/runtime/assets/svg/percent-badge.svg +0 -3
- package/dist/runtime/assets/svg/phone-arrow-down-left.svg +0 -3
- package/dist/runtime/assets/svg/phone-arrow-up-right.svg +0 -3
- package/dist/runtime/assets/svg/phone-x-mark.svg +0 -3
- package/dist/runtime/assets/svg/phone.svg +0 -3
- package/dist/runtime/assets/svg/photo.svg +0 -3
- package/dist/runtime/assets/svg/play-circle.svg +0 -4
- package/dist/runtime/assets/svg/play-pause.svg +0 -3
- package/dist/runtime/assets/svg/play.svg +0 -3
- package/dist/runtime/assets/svg/plus-circle.svg +0 -3
- package/dist/runtime/assets/svg/plus-small.svg +0 -3
- package/dist/runtime/assets/svg/plus.svg +0 -3
- package/dist/runtime/assets/svg/power.svg +0 -3
- package/dist/runtime/assets/svg/presentation-chart-bar.svg +0 -3
- package/dist/runtime/assets/svg/presentation-chart-line.svg +0 -3
- package/dist/runtime/assets/svg/printer.svg +0 -3
- package/dist/runtime/assets/svg/puzzle-piece.svg +0 -3
- package/dist/runtime/assets/svg/qr-code.svg +0 -4
- package/dist/runtime/assets/svg/question-mark-circle.svg +0 -3
- package/dist/runtime/assets/svg/queue-list.svg +0 -3
- package/dist/runtime/assets/svg/radio.svg +0 -3
- package/dist/runtime/assets/svg/receipt-percent.svg +0 -3
- package/dist/runtime/assets/svg/receipt-refund.svg +0 -3
- package/dist/runtime/assets/svg/rectangle-group.svg +0 -3
- package/dist/runtime/assets/svg/rectangle-stack.svg +0 -3
- package/dist/runtime/assets/svg/rocket-launch.svg +0 -3
- package/dist/runtime/assets/svg/rss.svg +0 -3
- package/dist/runtime/assets/svg/scale.svg +0 -3
- package/dist/runtime/assets/svg/scissors.svg +0 -3
- package/dist/runtime/assets/svg/server-stack.svg +0 -3
- package/dist/runtime/assets/svg/server.svg +0 -3
- package/dist/runtime/assets/svg/share.svg +0 -3
- package/dist/runtime/assets/svg/shield-check.svg +0 -3
- package/dist/runtime/assets/svg/shield-exclamation.svg +0 -3
- package/dist/runtime/assets/svg/shopping-bag.svg +0 -3
- package/dist/runtime/assets/svg/shopping-cart.svg +0 -3
- package/dist/runtime/assets/svg/signal-slash.svg +0 -3
- package/dist/runtime/assets/svg/signal.svg +0 -3
- package/dist/runtime/assets/svg/slash.svg +0 -3
- package/dist/runtime/assets/svg/sparkles.svg +0 -3
- package/dist/runtime/assets/svg/speaker-wave.svg +0 -3
- package/dist/runtime/assets/svg/speaker-x-mark.svg +0 -3
- package/dist/runtime/assets/svg/square-2-stack.svg +0 -3
- package/dist/runtime/assets/svg/square-3-stack-3d.svg +0 -3
- package/dist/runtime/assets/svg/squares-2x2.svg +0 -3
- package/dist/runtime/assets/svg/squares-plus.svg +0 -3
- package/dist/runtime/assets/svg/star.svg +0 -3
- package/dist/runtime/assets/svg/stop-circle.svg +0 -4
- package/dist/runtime/assets/svg/stop.svg +0 -3
- package/dist/runtime/assets/svg/strikethrough.svg +0 -3
- package/dist/runtime/assets/svg/sun.svg +0 -3
- package/dist/runtime/assets/svg/swatch.svg +0 -3
- package/dist/runtime/assets/svg/table-cells.svg +0 -3
- package/dist/runtime/assets/svg/tag.svg +0 -4
- package/dist/runtime/assets/svg/ticket.svg +0 -3
- package/dist/runtime/assets/svg/trash.svg +0 -3
- package/dist/runtime/assets/svg/trophy.svg +0 -3
- package/dist/runtime/assets/svg/truck.svg +0 -3
- package/dist/runtime/assets/svg/tv.svg +0 -3
- package/dist/runtime/assets/svg/underline.svg +0 -3
- package/dist/runtime/assets/svg/user-circle.svg +0 -3
- package/dist/runtime/assets/svg/user-group.svg +0 -3
- package/dist/runtime/assets/svg/user-minus.svg +0 -3
- package/dist/runtime/assets/svg/user-plus.svg +0 -3
- package/dist/runtime/assets/svg/user.svg +0 -3
- package/dist/runtime/assets/svg/users.svg +0 -3
- package/dist/runtime/assets/svg/variable.svg +0 -3
- package/dist/runtime/assets/svg/video-camera-slash.svg +0 -3
- package/dist/runtime/assets/svg/video-camera.svg +0 -3
- package/dist/runtime/assets/svg/view-columns.svg +0 -3
- package/dist/runtime/assets/svg/viewfinder-circle.svg +0 -3
- package/dist/runtime/assets/svg/wallet.svg +0 -3
- package/dist/runtime/assets/svg/wifi.svg +0 -3
- package/dist/runtime/assets/svg/window.svg +0 -3
- package/dist/runtime/assets/svg/wrench-screwdriver.svg +0 -3
- package/dist/runtime/assets/svg/wrench.svg +0 -4
- package/dist/runtime/assets/svg/x-circle.svg +0 -3
- package/dist/runtime/assets/svg/x-mark.svg +0 -3
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
generate?: boolean;
|
|
3
|
-
copy?: boolean;
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
autocomplete?: string;
|
|
6
|
-
};
|
|
7
|
-
type __VLS_ModelProps = {
|
|
8
|
-
modelValue: string;
|
|
9
|
-
};
|
|
10
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
-
"update:modelValue": (value: string) => any;
|
|
13
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
15
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
-
declare const _default: typeof __VLS_export;
|
|
17
|
-
export default _default;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<CmsInput
|
|
3
|
-
v-model="model"
|
|
4
|
-
:type="visible ? 'text' : 'password'"
|
|
5
|
-
icon="key"
|
|
6
|
-
class="cms-password-input"
|
|
7
|
-
:autocomplete="autocomplete ?? 'new-password'"
|
|
8
|
-
:placeholder="placeholder"
|
|
9
|
-
>
|
|
10
|
-
<template #trailing>
|
|
11
|
-
<span class="cms-password-actions">
|
|
12
|
-
<button
|
|
13
|
-
type="button"
|
|
14
|
-
class="cms-password-action"
|
|
15
|
-
:title="visible ? 'Hide password' : 'Show password'"
|
|
16
|
-
:aria-label="visible ? 'Hide password' : 'Show password'"
|
|
17
|
-
@click="visible = !visible"
|
|
18
|
-
>
|
|
19
|
-
<CmsIcon :name="visible ? 'eye-slash' : 'eye'" class="size-4" />
|
|
20
|
-
</button>
|
|
21
|
-
<button
|
|
22
|
-
v-if="generate"
|
|
23
|
-
type="button"
|
|
24
|
-
class="cms-password-action"
|
|
25
|
-
title="Generate a password"
|
|
26
|
-
aria-label="Generate a password"
|
|
27
|
-
@click="regenerate"
|
|
28
|
-
>
|
|
29
|
-
<CmsIcon name="sparkles" class="size-4" />
|
|
30
|
-
</button>
|
|
31
|
-
<button
|
|
32
|
-
v-if="copy"
|
|
33
|
-
type="button"
|
|
34
|
-
class="cms-password-action"
|
|
35
|
-
:class="{ 'is-done': copied }"
|
|
36
|
-
:title="copied ? 'Copied' : 'Copy password'"
|
|
37
|
-
:aria-label="copied ? 'Copied' : 'Copy password'"
|
|
38
|
-
:disabled="!model"
|
|
39
|
-
@click="copyPassword"
|
|
40
|
-
>
|
|
41
|
-
<CmsIcon
|
|
42
|
-
:name="copied ? 'clipboard-document-check' : 'clipboard-document'"
|
|
43
|
-
class="size-4"
|
|
44
|
-
/>
|
|
45
|
-
</button>
|
|
46
|
-
</span>
|
|
47
|
-
</template>
|
|
48
|
-
</CmsInput>
|
|
49
|
-
</template>
|
|
50
|
-
|
|
51
|
-
<script setup>
|
|
52
|
-
import { ref } from "#imports";
|
|
53
|
-
import { generatePassword } from "../../composables/cms-account";
|
|
54
|
-
defineProps({
|
|
55
|
-
generate: { type: Boolean, required: false },
|
|
56
|
-
copy: { type: Boolean, required: false },
|
|
57
|
-
placeholder: { type: String, required: false },
|
|
58
|
-
autocomplete: { type: String, required: false }
|
|
59
|
-
});
|
|
60
|
-
const model = defineModel({ type: String, ...{ required: true } });
|
|
61
|
-
const visible = ref(false);
|
|
62
|
-
const copied = ref(false);
|
|
63
|
-
let copiedTimer;
|
|
64
|
-
function regenerate() {
|
|
65
|
-
model.value = generatePassword();
|
|
66
|
-
visible.value = true;
|
|
67
|
-
}
|
|
68
|
-
async function copyPassword() {
|
|
69
|
-
if (!model.value) return;
|
|
70
|
-
try {
|
|
71
|
-
await navigator.clipboard.writeText(model.value);
|
|
72
|
-
copied.value = true;
|
|
73
|
-
clearTimeout(copiedTimer);
|
|
74
|
-
copiedTimer = setTimeout(() => {
|
|
75
|
-
copied.value = false;
|
|
76
|
-
}, 1600);
|
|
77
|
-
} catch {
|
|
78
|
-
copied.value = false;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
</script>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
generate?: boolean;
|
|
3
|
-
copy?: boolean;
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
autocomplete?: string;
|
|
6
|
-
};
|
|
7
|
-
type __VLS_ModelProps = {
|
|
8
|
-
modelValue: string;
|
|
9
|
-
};
|
|
10
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
-
"update:modelValue": (value: string) => any;
|
|
13
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
15
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
-
declare const _default: typeof __VLS_export;
|
|
17
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
type __VLS_ModelProps = {
|
|
2
|
-
'open'?: boolean;
|
|
3
|
-
};
|
|
4
|
-
declare var __VLS_1: {}, __VLS_3: {};
|
|
5
|
-
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof __VLS_1) => any;
|
|
7
|
-
} & {
|
|
8
|
-
content?: (props: typeof __VLS_3) => any;
|
|
9
|
-
};
|
|
10
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
-
"update:open": (value: boolean) => any;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
13
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
14
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
-
declare const _default: typeof __VLS_export;
|
|
17
|
-
export default _default;
|
|
18
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
-
new (): {
|
|
20
|
-
$slots: S;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div ref="root" class="relative inline-flex">
|
|
3
|
-
<div class="contents" @click="open = !open">
|
|
4
|
-
<slot />
|
|
5
|
-
</div>
|
|
6
|
-
<div v-if="open" class="cms-popover">
|
|
7
|
-
<slot name="content" />
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script setup>
|
|
13
|
-
import { onBeforeUnmount, ref, watch } from "#imports";
|
|
14
|
-
const open = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
15
|
-
const root = ref(null);
|
|
16
|
-
function onOutside(event) {
|
|
17
|
-
if (root.value && !root.value.contains(event.target)) open.value = false;
|
|
18
|
-
}
|
|
19
|
-
watch(open, (value) => {
|
|
20
|
-
if (import.meta.server) return;
|
|
21
|
-
if (value) document.addEventListener("click", onOutside, true);
|
|
22
|
-
else document.removeEventListener("click", onOutside, true);
|
|
23
|
-
});
|
|
24
|
-
onBeforeUnmount(() => {
|
|
25
|
-
if (import.meta.client) document.removeEventListener("click", onOutside, true);
|
|
26
|
-
});
|
|
27
|
-
</script>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
type __VLS_ModelProps = {
|
|
2
|
-
'open'?: boolean;
|
|
3
|
-
};
|
|
4
|
-
declare var __VLS_1: {}, __VLS_3: {};
|
|
5
|
-
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof __VLS_1) => any;
|
|
7
|
-
} & {
|
|
8
|
-
content?: (props: typeof __VLS_3) => any;
|
|
9
|
-
};
|
|
10
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
-
"update:open": (value: boolean) => any;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
13
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
14
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
-
declare const _default: typeof __VLS_export;
|
|
17
|
-
export default _default;
|
|
18
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
-
new (): {
|
|
20
|
-
$slots: S;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
open: () => any;
|
|
3
|
-
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onOpen?: (() => any) | undefined;
|
|
5
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
-
declare const _default: typeof __VLS_export;
|
|
7
|
-
export default _default;
|
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<button
|
|
3
|
-
ref="trigger"
|
|
4
|
-
type="button"
|
|
5
|
-
class="cms-search-trigger"
|
|
6
|
-
aria-haspopup="dialog"
|
|
7
|
-
:aria-expanded="open"
|
|
8
|
-
aria-keyshortcuts="Meta+K Control+K"
|
|
9
|
-
@click="show"
|
|
10
|
-
>
|
|
11
|
-
<CmsIcon name="magnifying-glass" class="cms-search-trigger-icon size-4 shrink-0" />
|
|
12
|
-
<span class="cms-search-trigger-text">Search</span>
|
|
13
|
-
<kbd class="cms-kbd">{{ shortcut }}</kbd>
|
|
14
|
-
</button>
|
|
15
|
-
|
|
16
|
-
<Teleport to="body">
|
|
17
|
-
<Transition name="cms-modal">
|
|
18
|
-
<div v-if="open" class="cms-scope cms-overlay cms-search-overlay" @click.self="close">
|
|
19
|
-
<div
|
|
20
|
-
class="cms-modal cms-search"
|
|
21
|
-
role="dialog"
|
|
22
|
-
aria-modal="true"
|
|
23
|
-
aria-labelledby="cms-search-label"
|
|
24
|
-
>
|
|
25
|
-
<div class="cms-search-bar">
|
|
26
|
-
<label id="cms-search-label" for="cms-search-input" class="sr-only">
|
|
27
|
-
Search the CMS
|
|
28
|
-
</label>
|
|
29
|
-
<CmsIcon name="magnifying-glass" class="cms-search-bar-icon size-5 shrink-0" />
|
|
30
|
-
<input
|
|
31
|
-
id="cms-search-input"
|
|
32
|
-
ref="input"
|
|
33
|
-
v-model="query"
|
|
34
|
-
type="text"
|
|
35
|
-
role="combobox"
|
|
36
|
-
class="cms-search-input"
|
|
37
|
-
placeholder="Search content, fields and pages"
|
|
38
|
-
autocomplete="off"
|
|
39
|
-
spellcheck="false"
|
|
40
|
-
aria-autocomplete="list"
|
|
41
|
-
aria-controls="cms-search-results"
|
|
42
|
-
:aria-expanded="hits.length > 0"
|
|
43
|
-
:aria-activedescendant="activeId"
|
|
44
|
-
@keydown="onKeydown"
|
|
45
|
-
/>
|
|
46
|
-
<CmsSpinner v-if="loading" />
|
|
47
|
-
<kbd class="cms-kbd">Esc</kbd>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div class="cms-search-body">
|
|
51
|
-
<p v-if="hint" class="cms-search-hint">{{ hint }}</p>
|
|
52
|
-
<div
|
|
53
|
-
id="cms-search-results"
|
|
54
|
-
role="listbox"
|
|
55
|
-
aria-labelledby="cms-search-label"
|
|
56
|
-
class="cms-search-results"
|
|
57
|
-
>
|
|
58
|
-
<div
|
|
59
|
-
v-for="(group, groupIndex) in groups"
|
|
60
|
-
:key="group.key"
|
|
61
|
-
role="group"
|
|
62
|
-
:aria-labelledby="`cms-search-group-${groupIndex}`"
|
|
63
|
-
class="cms-search-group"
|
|
64
|
-
>
|
|
65
|
-
<div :id="`cms-search-group-${groupIndex}`" class="cms-search-group-title">
|
|
66
|
-
<span>{{ group.label }}</span>
|
|
67
|
-
<span class="cms-search-group-kind">{{ KIND_LABELS[group.kind] }}</span>
|
|
68
|
-
</div>
|
|
69
|
-
<div
|
|
70
|
-
v-for="item in group.items"
|
|
71
|
-
:id="optionId(item.index)"
|
|
72
|
-
:key="item.index"
|
|
73
|
-
role="option"
|
|
74
|
-
class="cms-search-option"
|
|
75
|
-
:class="{ 'is-active': item.index === active }"
|
|
76
|
-
:aria-selected="item.index === active"
|
|
77
|
-
@mousemove="active = item.index"
|
|
78
|
-
@click="go(item.hit)"
|
|
79
|
-
>
|
|
80
|
-
<CmsIcon
|
|
81
|
-
:name="iconOf(item.hit)"
|
|
82
|
-
class="cms-search-option-icon size-4 shrink-0"
|
|
83
|
-
/>
|
|
84
|
-
<span class="cms-search-option-text">
|
|
85
|
-
<template v-if="isValueHit(item.hit)">
|
|
86
|
-
<span class="cms-search-option-head">
|
|
87
|
-
<span class="cms-search-option-title">
|
|
88
|
-
{{ item.hit.title ?? item.hit.entryLabel }}
|
|
89
|
-
</span>
|
|
90
|
-
<span v-if="item.hit.fieldLabel" class="cms-search-option-meta">
|
|
91
|
-
{{ item.hit.fieldLabel }}
|
|
92
|
-
</span>
|
|
93
|
-
<span v-if="item.hit.locale" class="cms-badge is-muted">
|
|
94
|
-
{{ item.hit.locale }}
|
|
95
|
-
</span>
|
|
96
|
-
</span>
|
|
97
|
-
<span class="cms-search-snippet">
|
|
98
|
-
{{ item.hit.snippet.before
|
|
99
|
-
}}<mark class="cms-search-mark">{{
|
|
100
|
-
item.hit.snippet.match
|
|
101
|
-
}}</mark
|
|
102
|
-
>{{ item.hit.snippet.after }}
|
|
103
|
-
</span>
|
|
104
|
-
</template>
|
|
105
|
-
<template v-else>
|
|
106
|
-
<span class="cms-search-option-title">
|
|
107
|
-
{{ item.hit.snippet.before
|
|
108
|
-
}}<mark class="cms-search-mark">{{
|
|
109
|
-
item.hit.snippet.match
|
|
110
|
-
}}</mark
|
|
111
|
-
>{{ item.hit.snippet.after }}
|
|
112
|
-
</span>
|
|
113
|
-
<span class="cms-search-option-meta">{{
|
|
114
|
-
labelMeta(item.hit)
|
|
115
|
-
}}</span>
|
|
116
|
-
</template>
|
|
117
|
-
</span>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
<p v-if="truncated" class="cms-search-hint">
|
|
122
|
-
Showing the first results. Type more to narrow them down.
|
|
123
|
-
</p>
|
|
124
|
-
</div>
|
|
125
|
-
|
|
126
|
-
<div class="cms-search-footer" aria-hidden="true">
|
|
127
|
-
<span><kbd class="cms-kbd">↑</kbd><kbd class="cms-kbd">↓</kbd> to move</span>
|
|
128
|
-
<span><kbd class="cms-kbd">↵</kbd> to open</span>
|
|
129
|
-
<span><kbd class="cms-kbd">Esc</kbd> to close</span>
|
|
130
|
-
</div>
|
|
131
|
-
<p class="sr-only" aria-live="polite">{{ status }}</p>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</Transition>
|
|
135
|
-
</Teleport>
|
|
136
|
-
</template>
|
|
137
|
-
|
|
138
|
-
<script setup>
|
|
139
|
-
import { computed, navigateTo, nextTick, onBeforeUnmount, onMounted, ref, watch } from "#imports";
|
|
140
|
-
import { isSearchableQuery, normalizeSearchQuery } from "../../../shared/search";
|
|
141
|
-
import { useCmsOverlay } from "../../composables/cms-overlay";
|
|
142
|
-
import { cmsApi } from "../../utils/api";
|
|
143
|
-
const DEBOUNCE_MS = 180;
|
|
144
|
-
const KIND_LABELS = {
|
|
145
|
-
collection: "Collection",
|
|
146
|
-
single: "Single",
|
|
147
|
-
content: "Content",
|
|
148
|
-
page: "Pages",
|
|
149
|
-
media: "Library"
|
|
150
|
-
};
|
|
151
|
-
const KIND_ICONS = {
|
|
152
|
-
collection: "square-3-stack-3d",
|
|
153
|
-
single: "document-text",
|
|
154
|
-
content: "newspaper",
|
|
155
|
-
page: "window",
|
|
156
|
-
media: "photo"
|
|
157
|
-
};
|
|
158
|
-
const TYPE_LABELS = {
|
|
159
|
-
entry: "Section",
|
|
160
|
-
page: "Page",
|
|
161
|
-
tab: "Tab",
|
|
162
|
-
field: "Field",
|
|
163
|
-
block: "Block",
|
|
164
|
-
value: "Value",
|
|
165
|
-
media: "Media"
|
|
166
|
-
};
|
|
167
|
-
const TYPE_ICONS = {
|
|
168
|
-
page: "window",
|
|
169
|
-
tab: "rectangle-group",
|
|
170
|
-
field: "tag",
|
|
171
|
-
block: "squares-2x2",
|
|
172
|
-
value: "bars-3-bottom-left",
|
|
173
|
-
media: "photo"
|
|
174
|
-
};
|
|
175
|
-
const emit = defineEmits(["open"]);
|
|
176
|
-
const open = ref(false);
|
|
177
|
-
const query = ref("");
|
|
178
|
-
const hits = ref([]);
|
|
179
|
-
const truncated = ref(false);
|
|
180
|
-
const loading = ref(false);
|
|
181
|
-
const failed = ref(false);
|
|
182
|
-
const searched = ref("");
|
|
183
|
-
const active = ref(0);
|
|
184
|
-
const shortcut = ref("Ctrl K");
|
|
185
|
-
const trigger = ref(null);
|
|
186
|
-
const input = ref(null);
|
|
187
|
-
let timer;
|
|
188
|
-
let request = 0;
|
|
189
|
-
let returnFocus = null;
|
|
190
|
-
const groups = computed(() => {
|
|
191
|
-
const map = /* @__PURE__ */ new Map();
|
|
192
|
-
hits.value.forEach((hit, index2) => {
|
|
193
|
-
const key = hit.collection ?? hit.kind;
|
|
194
|
-
let group = map.get(key);
|
|
195
|
-
if (!group) {
|
|
196
|
-
group = { key, label: hit.entryLabel, kind: hit.kind, items: [] };
|
|
197
|
-
map.set(key, group);
|
|
198
|
-
}
|
|
199
|
-
group.items.push({ hit, index: index2 });
|
|
200
|
-
});
|
|
201
|
-
const ordered = [...map.values()];
|
|
202
|
-
let index = 0;
|
|
203
|
-
for (const group of ordered) {
|
|
204
|
-
for (const item of group.items) item.index = index++;
|
|
205
|
-
}
|
|
206
|
-
return ordered;
|
|
207
|
-
});
|
|
208
|
-
const flat = computed(() => groups.value.flatMap((group) => group.items.map((item) => item.hit)));
|
|
209
|
-
const activeId = computed(() => flat.value.length ? optionId(active.value) : void 0);
|
|
210
|
-
const hint = computed(() => {
|
|
211
|
-
if (!isSearchableQuery(query.value)) return "Type at least 2 characters to search.";
|
|
212
|
-
if (failed.value) return "Search failed. Try again.";
|
|
213
|
-
if (!loading.value && searched.value && !flat.value.length) {
|
|
214
|
-
return `No results for "${searched.value}".`;
|
|
215
|
-
}
|
|
216
|
-
return "";
|
|
217
|
-
});
|
|
218
|
-
const status = computed(() => {
|
|
219
|
-
if (hint.value) return hint.value;
|
|
220
|
-
if (loading.value) return "Searching";
|
|
221
|
-
return `${flat.value.length} results`;
|
|
222
|
-
});
|
|
223
|
-
function optionId(index) {
|
|
224
|
-
return `cms-search-option-${index}`;
|
|
225
|
-
}
|
|
226
|
-
function isValueHit(hit) {
|
|
227
|
-
return hit.type === "value" || hit.type === "media";
|
|
228
|
-
}
|
|
229
|
-
function iconOf(hit) {
|
|
230
|
-
return hit.type === "entry" ? KIND_ICONS[hit.kind] : TYPE_ICONS[hit.type] ?? "tag";
|
|
231
|
-
}
|
|
232
|
-
function labelMeta(hit) {
|
|
233
|
-
const parts = [TYPE_LABELS[hit.type]];
|
|
234
|
-
if (hit.title) parts.push(hit.title);
|
|
235
|
-
if (hit.fieldLabel && hit.type !== "tab") parts.push(hit.fieldLabel);
|
|
236
|
-
if (hit.type === "page" && hit.id) parts.push(hit.to);
|
|
237
|
-
return parts.join(" \xB7 ");
|
|
238
|
-
}
|
|
239
|
-
async function run(term) {
|
|
240
|
-
const current = ++request;
|
|
241
|
-
loading.value = true;
|
|
242
|
-
failed.value = false;
|
|
243
|
-
try {
|
|
244
|
-
const response = await cmsApi("/api/cms/search", { query: { q: term } });
|
|
245
|
-
if (current !== request) return;
|
|
246
|
-
hits.value = response.hits;
|
|
247
|
-
truncated.value = response.truncated;
|
|
248
|
-
searched.value = response.query;
|
|
249
|
-
active.value = 0;
|
|
250
|
-
} catch {
|
|
251
|
-
if (current !== request) return;
|
|
252
|
-
hits.value = [];
|
|
253
|
-
truncated.value = false;
|
|
254
|
-
failed.value = true;
|
|
255
|
-
} finally {
|
|
256
|
-
if (current === request) loading.value = false;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
watch(query, (value) => {
|
|
260
|
-
clearTimeout(timer);
|
|
261
|
-
const term = normalizeSearchQuery(value);
|
|
262
|
-
if (!isSearchableQuery(term)) {
|
|
263
|
-
request++;
|
|
264
|
-
hits.value = [];
|
|
265
|
-
truncated.value = false;
|
|
266
|
-
loading.value = false;
|
|
267
|
-
failed.value = false;
|
|
268
|
-
searched.value = "";
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
timer = setTimeout(() => run(term), DEBOUNCE_MS);
|
|
272
|
-
});
|
|
273
|
-
watch(active, (index) => {
|
|
274
|
-
void nextTick(
|
|
275
|
-
() => document.getElementById(optionId(index))?.scrollIntoView({ block: "nearest" })
|
|
276
|
-
);
|
|
277
|
-
});
|
|
278
|
-
function focusInput() {
|
|
279
|
-
void nextTick(() => {
|
|
280
|
-
input.value?.focus();
|
|
281
|
-
input.value?.select();
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
function show() {
|
|
285
|
-
if (open.value) {
|
|
286
|
-
focusInput();
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
290
|
-
emit("open");
|
|
291
|
-
open.value = true;
|
|
292
|
-
}
|
|
293
|
-
function close() {
|
|
294
|
-
open.value = false;
|
|
295
|
-
}
|
|
296
|
-
const overlay = useCmsOverlay(close);
|
|
297
|
-
watch(open, (value) => {
|
|
298
|
-
if (value) {
|
|
299
|
-
overlay.activate();
|
|
300
|
-
focusInput();
|
|
301
|
-
} else {
|
|
302
|
-
overlay.deactivate();
|
|
303
|
-
const target = returnFocus ?? trigger.value;
|
|
304
|
-
returnFocus = null;
|
|
305
|
-
void nextTick(() => target?.focus());
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
function go(hit) {
|
|
309
|
-
if (!hit) return;
|
|
310
|
-
returnFocus = null;
|
|
311
|
-
close();
|
|
312
|
-
void navigateTo(hit.to);
|
|
313
|
-
}
|
|
314
|
-
function onKeydown(event) {
|
|
315
|
-
const count = flat.value.length;
|
|
316
|
-
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
317
|
-
event.preventDefault();
|
|
318
|
-
if (!count) return;
|
|
319
|
-
const step = event.key === "ArrowDown" ? 1 : -1;
|
|
320
|
-
active.value = (active.value + step + count) % count;
|
|
321
|
-
} else if (event.key === "Home" && count && event.ctrlKey) {
|
|
322
|
-
event.preventDefault();
|
|
323
|
-
active.value = 0;
|
|
324
|
-
} else if (event.key === "End" && count && event.ctrlKey) {
|
|
325
|
-
event.preventDefault();
|
|
326
|
-
active.value = count - 1;
|
|
327
|
-
} else if (event.key === "Enter") {
|
|
328
|
-
event.preventDefault();
|
|
329
|
-
go(flat.value[active.value]);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
function onGlobalKeydown(event) {
|
|
333
|
-
if (event.key.toLowerCase() !== "k" || event.altKey || event.shiftKey) return;
|
|
334
|
-
if (!event.metaKey && !event.ctrlKey) return;
|
|
335
|
-
event.preventDefault();
|
|
336
|
-
show();
|
|
337
|
-
}
|
|
338
|
-
onMounted(() => {
|
|
339
|
-
const platform = navigator.userAgentData?.platform ?? navigator.platform ?? navigator.userAgent;
|
|
340
|
-
if (/mac|iphone|ipad|ipod/i.test(platform)) shortcut.value = "\u2318K";
|
|
341
|
-
document.addEventListener("keydown", onGlobalKeydown);
|
|
342
|
-
});
|
|
343
|
-
onBeforeUnmount(() => {
|
|
344
|
-
clearTimeout(timer);
|
|
345
|
-
document.removeEventListener("keydown", onGlobalKeydown);
|
|
346
|
-
});
|
|
347
|
-
</script>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
open: () => any;
|
|
3
|
-
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onOpen?: (() => any) | undefined;
|
|
5
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
-
declare const _default: typeof __VLS_export;
|
|
7
|
-
export default _default;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
type Item = Record<string, unknown> & {
|
|
2
|
-
label: string;
|
|
3
|
-
};
|
|
4
|
-
type __VLS_Props = {
|
|
5
|
-
items: Item[];
|
|
6
|
-
valueKey?: string;
|
|
7
|
-
multiple?: boolean;
|
|
8
|
-
ignoreFilter?: boolean;
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
};
|
|
12
|
-
type __VLS_ModelProps = {
|
|
13
|
-
modelValue?: string | string[] | null;
|
|
14
|
-
'searchTerm'?: 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 | string[] | null | undefined) => any;
|
|
19
|
-
"update:searchTerm": (value: string) => any;
|
|
20
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
-
"onUpdate:modelValue"?: ((value: string | string[] | null | undefined) => any) | undefined;
|
|
22
|
-
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
23
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
-
declare const _default: typeof __VLS_export;
|
|
25
|
-
export default _default;
|