@karibsen/eponyme 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +609 -0
- package/dist/eponyme.d.mts +15 -0
- package/dist/eponyme.mjs +38 -0
- package/dist/module.d.mts +26 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +154 -0
- package/dist/runtime/assets/dashboard.css +1 -0
- package/dist/runtime/components/editor/EponymeCollectionPage.d.vue.ts +9 -0
- package/dist/runtime/components/editor/EponymeCollectionPage.vue +238 -0
- package/dist/runtime/components/editor/EponymeCollectionPage.vue.d.ts +9 -0
- package/dist/runtime/components/editor/EponymeCopy.d.vue.ts +7 -0
- package/dist/runtime/components/editor/EponymeCopy.vue +28 -0
- package/dist/runtime/components/editor/EponymeCopy.vue.d.ts +7 -0
- package/dist/runtime/components/editor/EponymeFolderNav.d.vue.ts +7 -0
- package/dist/runtime/components/editor/EponymeFolderNav.vue +146 -0
- package/dist/runtime/components/editor/EponymeFolderNav.vue.d.ts +7 -0
- package/dist/runtime/components/editor/EponymeFolderPage.d.vue.ts +7 -0
- package/dist/runtime/components/editor/EponymeFolderPage.vue +62 -0
- package/dist/runtime/components/editor/EponymeFolderPage.vue.d.ts +7 -0
- package/dist/runtime/components/editor/EponymeForm.d.vue.ts +9 -0
- package/dist/runtime/components/editor/EponymeForm.vue +309 -0
- package/dist/runtime/components/editor/EponymeForm.vue.d.ts +9 -0
- package/dist/runtime/components/editor/EponymeFormPage.d.vue.ts +8 -0
- package/dist/runtime/components/editor/EponymeFormPage.vue +288 -0
- package/dist/runtime/components/editor/EponymeFormPage.vue.d.ts +8 -0
- package/dist/runtime/components/editor/EponymeHistoryDialog.d.vue.ts +14 -0
- package/dist/runtime/components/editor/EponymeHistoryDialog.vue +97 -0
- package/dist/runtime/components/editor/EponymeHistoryDialog.vue.d.ts +14 -0
- package/dist/runtime/components/editor/EponymeNavigationLink.d.vue.ts +14 -0
- package/dist/runtime/components/editor/EponymeNavigationLink.vue +80 -0
- package/dist/runtime/components/editor/EponymeNavigationLink.vue.d.ts +14 -0
- package/dist/runtime/components/editor/EponymePageNavigation.d.vue.ts +8 -0
- package/dist/runtime/components/editor/EponymePageNavigation.vue +58 -0
- package/dist/runtime/components/editor/EponymePageNavigation.vue.d.ts +8 -0
- package/dist/runtime/components/editor/EponymePreviewPanel.d.vue.ts +16 -0
- package/dist/runtime/components/editor/EponymePreviewPanel.vue +100 -0
- package/dist/runtime/components/editor/EponymePreviewPanel.vue.d.ts +16 -0
- package/dist/runtime/components/editor/EponymeSidebar.d.vue.ts +6 -0
- package/dist/runtime/components/editor/EponymeSidebar.vue +244 -0
- package/dist/runtime/components/editor/EponymeSidebar.vue.d.ts +6 -0
- package/dist/runtime/components/editor/EponymeSidebarTree.d.vue.ts +18 -0
- package/dist/runtime/components/editor/EponymeSidebarTree.vue +84 -0
- package/dist/runtime/components/editor/EponymeSidebarTree.vue.d.ts +18 -0
- package/dist/runtime/components/fields/ArrayField.d.vue.ts +19 -0
- package/dist/runtime/components/fields/ArrayField.vue +198 -0
- package/dist/runtime/components/fields/ArrayField.vue.d.ts +19 -0
- package/dist/runtime/components/fields/BooleanField.d.vue.ts +16 -0
- package/dist/runtime/components/fields/BooleanField.vue +36 -0
- package/dist/runtime/components/fields/BooleanField.vue.d.ts +16 -0
- package/dist/runtime/components/fields/CheckboxGroupField.d.vue.ts +20 -0
- package/dist/runtime/components/fields/CheckboxGroupField.vue +52 -0
- package/dist/runtime/components/fields/CheckboxGroupField.vue.d.ts +20 -0
- package/dist/runtime/components/fields/ColorField.d.vue.ts +19 -0
- package/dist/runtime/components/fields/ColorField.vue +39 -0
- package/dist/runtime/components/fields/ColorField.vue.d.ts +19 -0
- package/dist/runtime/components/fields/DateField.d.vue.ts +18 -0
- package/dist/runtime/components/fields/DateField.vue +39 -0
- package/dist/runtime/components/fields/DateField.vue.d.ts +18 -0
- package/dist/runtime/components/fields/FieldRenderer.d.vue.ts +24 -0
- package/dist/runtime/components/fields/FieldRenderer.vue +135 -0
- package/dist/runtime/components/fields/FieldRenderer.vue.d.ts +24 -0
- package/dist/runtime/components/fields/NumberField.d.vue.ts +20 -0
- package/dist/runtime/components/fields/NumberField.vue +58 -0
- package/dist/runtime/components/fields/NumberField.vue.d.ts +20 -0
- package/dist/runtime/components/fields/RadioField.d.vue.ts +20 -0
- package/dist/runtime/components/fields/RadioField.vue +44 -0
- package/dist/runtime/components/fields/RadioField.vue.d.ts +20 -0
- package/dist/runtime/components/fields/RichTextField.d.vue.ts +20 -0
- package/dist/runtime/components/fields/RichTextField.vue +176 -0
- package/dist/runtime/components/fields/RichTextField.vue.d.ts +20 -0
- package/dist/runtime/components/fields/SectionField.d.vue.ts +20 -0
- package/dist/runtime/components/fields/SectionField.vue +127 -0
- package/dist/runtime/components/fields/SectionField.vue.d.ts +20 -0
- package/dist/runtime/components/fields/SelectField.d.vue.ts +21 -0
- package/dist/runtime/components/fields/SelectField.vue +42 -0
- package/dist/runtime/components/fields/SelectField.vue.d.ts +21 -0
- package/dist/runtime/components/fields/SlugField.d.vue.ts +20 -0
- package/dist/runtime/components/fields/SlugField.vue +35 -0
- package/dist/runtime/components/fields/SlugField.vue.d.ts +20 -0
- package/dist/runtime/components/fields/TabsField.d.vue.ts +19 -0
- package/dist/runtime/components/fields/TabsField.vue +109 -0
- package/dist/runtime/components/fields/TabsField.vue.d.ts +19 -0
- package/dist/runtime/components/fields/TextField.d.vue.ts +22 -0
- package/dist/runtime/components/fields/TextField.vue +56 -0
- package/dist/runtime/components/fields/TextField.vue.d.ts +22 -0
- package/dist/runtime/components/fields/TextareaField.d.vue.ts +20 -0
- package/dist/runtime/components/fields/TextareaField.vue +47 -0
- package/dist/runtime/components/fields/TextareaField.vue.d.ts +20 -0
- package/dist/runtime/components/fields/UrlField.d.vue.ts +17 -0
- package/dist/runtime/components/fields/UrlField.vue +35 -0
- package/dist/runtime/components/fields/UrlField.vue.d.ts +17 -0
- package/dist/runtime/components/ui/EPAccordion.d.vue.ts +26 -0
- package/dist/runtime/components/ui/EPAccordion.vue +64 -0
- package/dist/runtime/components/ui/EPAccordion.vue.d.ts +26 -0
- package/dist/runtime/components/ui/EPAvatar.d.vue.ts +9 -0
- package/dist/runtime/components/ui/EPAvatar.vue +25 -0
- package/dist/runtime/components/ui/EPAvatar.vue.d.ts +9 -0
- package/dist/runtime/components/ui/EPBadge.d.vue.ts +16 -0
- package/dist/runtime/components/ui/EPBadge.vue +17 -0
- package/dist/runtime/components/ui/EPBadge.vue.d.ts +16 -0
- package/dist/runtime/components/ui/EPButton.d.vue.ts +22 -0
- package/dist/runtime/components/ui/EPButton.vue +55 -0
- package/dist/runtime/components/ui/EPButton.vue.d.ts +22 -0
- package/dist/runtime/components/ui/EPCheckbox.d.vue.ts +11 -0
- package/dist/runtime/components/ui/EPCheckbox.vue +21 -0
- package/dist/runtime/components/ui/EPCheckbox.vue.d.ts +11 -0
- package/dist/runtime/components/ui/EPColorPicker.d.vue.ts +19 -0
- package/dist/runtime/components/ui/EPColorPicker.vue +63 -0
- package/dist/runtime/components/ui/EPColorPicker.vue.d.ts +19 -0
- package/dist/runtime/components/ui/EPDialog.d.vue.ts +24 -0
- package/dist/runtime/components/ui/EPDialog.vue +54 -0
- package/dist/runtime/components/ui/EPDialog.vue.d.ts +24 -0
- package/dist/runtime/components/ui/EPDropdownMenu.d.vue.ts +25 -0
- package/dist/runtime/components/ui/EPDropdownMenu.vue +40 -0
- package/dist/runtime/components/ui/EPDropdownMenu.vue.d.ts +25 -0
- package/dist/runtime/components/ui/EPFormField.d.vue.ts +24 -0
- package/dist/runtime/components/ui/EPFormField.vue +62 -0
- package/dist/runtime/components/ui/EPFormField.vue.d.ts +24 -0
- package/dist/runtime/components/ui/EPInputText.d.vue.ts +17 -0
- package/dist/runtime/components/ui/EPInputText.vue +33 -0
- package/dist/runtime/components/ui/EPInputText.vue.d.ts +17 -0
- package/dist/runtime/components/ui/EPLinkEditor.d.vue.ts +16 -0
- package/dist/runtime/components/ui/EPLinkEditor.vue +169 -0
- package/dist/runtime/components/ui/EPLinkEditor.vue.d.ts +16 -0
- package/dist/runtime/components/ui/EPRadioButton.d.vue.ts +16 -0
- package/dist/runtime/components/ui/EPRadioButton.vue +34 -0
- package/dist/runtime/components/ui/EPRadioButton.vue.d.ts +16 -0
- package/dist/runtime/components/ui/EPSelect.d.vue.ts +21 -0
- package/dist/runtime/components/ui/EPSelect.vue +73 -0
- package/dist/runtime/components/ui/EPSelect.vue.d.ts +21 -0
- package/dist/runtime/components/ui/EPSlider.d.vue.ts +16 -0
- package/dist/runtime/components/ui/EPSlider.vue +51 -0
- package/dist/runtime/components/ui/EPSlider.vue.d.ts +16 -0
- package/dist/runtime/components/ui/EPSwitch.d.vue.ts +11 -0
- package/dist/runtime/components/ui/EPSwitch.vue +23 -0
- package/dist/runtime/components/ui/EPSwitch.vue.d.ts +11 -0
- package/dist/runtime/components/ui/EPTextarea.d.vue.ts +12 -0
- package/dist/runtime/components/ui/EPTextarea.vue +18 -0
- package/dist/runtime/components/ui/EPTextarea.vue.d.ts +12 -0
- package/dist/runtime/components/ui/EPToast.d.vue.ts +13 -0
- package/dist/runtime/components/ui/EPToast.vue +60 -0
- package/dist/runtime/components/ui/EPToast.vue.d.ts +13 -0
- package/dist/runtime/components/ui/EPTooltip.d.vue.ts +17 -0
- package/dist/runtime/components/ui/EPTooltip.vue +34 -0
- package/dist/runtime/components/ui/EPTooltip.vue.d.ts +17 -0
- package/dist/runtime/components/ui/form-field-context.d.ts +12 -0
- package/dist/runtime/components/ui/form-field-context.js +1 -0
- package/dist/runtime/composables/useEponyme.d.ts +24 -0
- package/dist/runtime/composables/useEponyme.js +63 -0
- package/dist/runtime/composables/useEponymeAuth.d.ts +16 -0
- package/dist/runtime/composables/useEponymeAuth.js +81 -0
- package/dist/runtime/composables/useEponymeCollection.d.ts +27 -0
- package/dist/runtime/composables/useEponymeCollection.js +44 -0
- package/dist/runtime/composables/useEponymeColorPresets.d.ts +5 -0
- package/dist/runtime/composables/useEponymeColorPresets.js +16 -0
- package/dist/runtime/composables/useEponymeConfig.d.ts +1 -0
- package/dist/runtime/composables/useEponymeConfig.js +4 -0
- package/dist/runtime/composables/useEponymeForm.d.ts +35 -0
- package/dist/runtime/composables/useEponymeForm.js +75 -0
- package/dist/runtime/composables/useEponymeHistory.d.ts +26 -0
- package/dist/runtime/composables/useEponymeHistory.js +24 -0
- package/dist/runtime/composables/useEponymeValidation.d.ts +21 -0
- package/dist/runtime/composables/useEponymeValidation.js +34 -0
- package/dist/runtime/fields/array.d.ts +2 -0
- package/dist/runtime/fields/array.js +3 -0
- package/dist/runtime/fields/boolean.d.ts +2 -0
- package/dist/runtime/fields/boolean.js +3 -0
- package/dist/runtime/fields/checkbox-group.d.ts +2 -0
- package/dist/runtime/fields/checkbox-group.js +3 -0
- package/dist/runtime/fields/color.d.ts +2 -0
- package/dist/runtime/fields/color.js +3 -0
- package/dist/runtime/fields/date.d.ts +3 -0
- package/dist/runtime/fields/date.js +6 -0
- package/dist/runtime/fields/email.d.ts +2 -0
- package/dist/runtime/fields/email.js +3 -0
- package/dist/runtime/fields/image.d.ts +2 -0
- package/dist/runtime/fields/image.js +3 -0
- package/dist/runtime/fields/index.d.ts +37 -0
- package/dist/runtime/fields/index.js +19 -0
- package/dist/runtime/fields/number.d.ts +2 -0
- package/dist/runtime/fields/number.js +3 -0
- package/dist/runtime/fields/radio.d.ts +2 -0
- package/dist/runtime/fields/radio.js +3 -0
- package/dist/runtime/fields/rich-text.d.ts +2 -0
- package/dist/runtime/fields/rich-text.js +3 -0
- package/dist/runtime/fields/section.d.ts +2 -0
- package/dist/runtime/fields/section.js +3 -0
- package/dist/runtime/fields/select.d.ts +2 -0
- package/dist/runtime/fields/select.js +3 -0
- package/dist/runtime/fields/slug.d.ts +2 -0
- package/dist/runtime/fields/slug.js +3 -0
- package/dist/runtime/fields/string.d.ts +2 -0
- package/dist/runtime/fields/string.js +3 -0
- package/dist/runtime/fields/tab.d.ts +2 -0
- package/dist/runtime/fields/tab.js +3 -0
- package/dist/runtime/fields/textarea.d.ts +2 -0
- package/dist/runtime/fields/textarea.js +3 -0
- package/dist/runtime/fields/url.d.ts +2 -0
- package/dist/runtime/fields/url.js +3 -0
- package/dist/runtime/middleware/eponyme-auth.d.ts +2 -0
- package/dist/runtime/middleware/eponyme-auth.js +13 -0
- package/dist/runtime/middleware/eponyme-owner.d.ts +2 -0
- package/dist/runtime/middleware/eponyme-owner.js +7 -0
- package/dist/runtime/pages/EponymeChangePasswordPage.d.vue.ts +3 -0
- package/dist/runtime/pages/EponymeChangePasswordPage.vue +118 -0
- package/dist/runtime/pages/EponymeChangePasswordPage.vue.d.ts +3 -0
- package/dist/runtime/pages/EponymeDetailPage.d.vue.ts +3 -0
- package/dist/runtime/pages/EponymeDetailPage.vue +83 -0
- package/dist/runtime/pages/EponymeDetailPage.vue.d.ts +3 -0
- package/dist/runtime/pages/EponymeIndexPage.d.vue.ts +3 -0
- package/dist/runtime/pages/EponymeIndexPage.vue +51 -0
- package/dist/runtime/pages/EponymeIndexPage.vue.d.ts +3 -0
- package/dist/runtime/pages/EponymeLoginPage.d.vue.ts +3 -0
- package/dist/runtime/pages/EponymeLoginPage.vue +102 -0
- package/dist/runtime/pages/EponymeLoginPage.vue.d.ts +3 -0
- package/dist/runtime/pages/EponymeUsersPage.d.vue.ts +3 -0
- package/dist/runtime/pages/EponymeUsersPage.vue +261 -0
- package/dist/runtime/pages/EponymeUsersPage.vue.d.ts +3 -0
- package/dist/runtime/server/api/eponyme/[name].get.d.ts +4 -0
- package/dist/runtime/server/api/eponyme/[name].get.js +20 -0
- package/dist/runtime/server/api/eponyme/[name].patch.d.ts +11 -0
- package/dist/runtime/server/api/eponyme/[name].patch.js +20 -0
- package/dist/runtime/server/api/eponyme-auth/change-password.post.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-auth/change-password.post.js +21 -0
- package/dist/runtime/server/api/eponyme-auth/login.post.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-auth/login.post.js +12 -0
- package/dist/runtime/server/api/eponyme-auth/logout.post.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-auth/logout.post.js +13 -0
- package/dist/runtime/server/api/eponyme-auth/session.get.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-auth/session.get.js +5 -0
- package/dist/runtime/server/api/eponyme-collections/[path].delete.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-collections/[path].delete.js +11 -0
- package/dist/runtime/server/api/eponyme-collections/[path].get.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-collections/[path].get.js +11 -0
- package/dist/runtime/server/api/eponyme-collections/[path].post.d.ts +7 -0
- package/dist/runtime/server/api/eponyme-collections/[path].post.js +16 -0
- package/dist/runtime/server/api/eponyme-forms/[path].delete.d.ts +6 -0
- package/dist/runtime/server/api/eponyme-forms/[path].delete.js +19 -0
- package/dist/runtime/server/api/eponyme-forms/[path].get.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-forms/[path].get.js +22 -0
- package/dist/runtime/server/api/eponyme-forms/[path].post.d.ts +19 -0
- package/dist/runtime/server/api/eponyme-forms/[path].post.js +36 -0
- package/dist/runtime/server/api/eponyme-history/[path].get.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-history/[path].get.js +11 -0
- package/dist/runtime/server/api/eponyme-history/[path].patch.d.ts +2 -0
- package/dist/runtime/server/api/eponyme-history/[path].patch.js +18 -0
- package/dist/runtime/server/api/eponyme-sitemap.get.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-sitemap.get.js +5 -0
- package/dist/runtime/server/api/eponyme-statuses.get.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-statuses.get.js +7 -0
- package/dist/runtime/server/api/eponyme-users/[id]/reset-password.post.d.ts +5 -0
- package/dist/runtime/server/api/eponyme-users/[id]/reset-password.post.js +12 -0
- package/dist/runtime/server/api/eponyme-users/[id].patch.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-users/[id].patch.js +14 -0
- package/dist/runtime/server/api/eponyme-users/index.get.d.ts +4 -0
- package/dist/runtime/server/api/eponyme-users/index.get.js +7 -0
- package/dist/runtime/server/api/eponyme-users/index.post.d.ts +5 -0
- package/dist/runtime/server/api/eponyme-users/index.post.js +13 -0
- package/dist/runtime/server/plugins/eponyme-sync.d.ts +2 -0
- package/dist/runtime/server/plugins/eponyme-sync.js +14 -0
- package/dist/runtime/server/services/eponyme-auth-service.d.ts +2 -0
- package/dist/runtime/server/services/eponyme-auth-service.js +15 -0
- package/dist/runtime/server/services/eponyme-auth-store.d.ts +119 -0
- package/dist/runtime/server/services/eponyme-auth-store.js +227 -0
- package/dist/runtime/server/services/eponyme-form-service.d.ts +3 -0
- package/dist/runtime/server/services/eponyme-form-service.js +8 -0
- package/dist/runtime/server/services/eponyme-form-store.d.ts +100 -0
- package/dist/runtime/server/services/eponyme-form-store.js +109 -0
- package/dist/runtime/server/services/eponyme-service.d.ts +3 -0
- package/dist/runtime/server/services/eponyme-service.js +8 -0
- package/dist/runtime/server/services/eponyme-store.d.ts +202 -0
- package/dist/runtime/server/services/eponyme-store.js +338 -0
- package/dist/runtime/server/utils/auth.d.ts +11 -0
- package/dist/runtime/server/utils/auth.js +41 -0
- package/dist/runtime/server/utils/eponyme-form.d.ts +14 -0
- package/dist/runtime/server/utils/eponyme-form.js +6 -0
- package/dist/runtime/server/utils/eponyme-sitemap.d.ts +7 -0
- package/dist/runtime/server/utils/eponyme-sitemap.js +7 -0
- package/dist/runtime/server/utils/form-route.d.ts +14 -0
- package/dist/runtime/server/utils/form-route.js +14 -0
- package/dist/runtime/server/utils/password.d.ts +4 -0
- package/dist/runtime/server/utils/password.js +30 -0
- package/dist/runtime/types/auth.d.ts +20 -0
- package/dist/runtime/types/auth.js +7 -0
- package/dist/runtime/types/eponyme-config.d.ts +11 -0
- package/dist/runtime/types/eponyme-navigation.d.ts +6 -0
- package/dist/runtime/types/eponyme-navigation.js +0 -0
- package/dist/runtime/types/eponyme.d.ts +87 -0
- package/dist/runtime/types/eponyme.js +0 -0
- package/dist/runtime/types/field.d.ts +203 -0
- package/dist/runtime/types/field.js +0 -0
- package/dist/runtime/types/index.d.ts +3 -0
- package/dist/runtime/types/index.js +3 -0
- package/dist/runtime/types/nuxt.d.ts +11 -0
- package/dist/runtime/utils/as-record.d.ts +1 -0
- package/dist/runtime/utils/as-record.js +3 -0
- package/dist/runtime/utils/build-eponyme-schema.d.ts +22 -0
- package/dist/runtime/utils/build-eponyme-schema.js +42 -0
- package/dist/runtime/utils/changed-paths.d.ts +6 -0
- package/dist/runtime/utils/changed-paths.js +25 -0
- package/dist/runtime/utils/create-default-eponyme-data.d.ts +5 -0
- package/dist/runtime/utils/create-default-eponyme-data.js +12 -0
- package/dist/runtime/utils/field-path.d.ts +14 -0
- package/dist/runtime/utils/field-path.js +23 -0
- package/dist/runtime/utils/get-eponyme-schemas.d.ts +7 -0
- package/dist/runtime/utils/get-eponyme-schemas.js +33 -0
- package/dist/runtime/utils/get-field-default-value.d.ts +4 -0
- package/dist/runtime/utils/get-field-default-value.js +56 -0
- package/dist/runtime/utils/humanize-label.d.ts +6 -0
- package/dist/runtime/utils/humanize-label.js +3 -0
- package/dist/runtime/utils/initials.d.ts +1 -0
- package/dist/runtime/utils/initials.js +3 -0
- package/dist/runtime/utils/is-field-visible.d.ts +2 -0
- package/dist/runtime/utils/is-field-visible.js +14 -0
- package/dist/runtime/utils/normalize-hex-color.d.ts +8 -0
- package/dist/runtime/utils/normalize-hex-color.js +11 -0
- package/dist/runtime/utils/normalize-slug.d.ts +1 -0
- package/dist/runtime/utils/normalize-slug.js +4 -0
- package/dist/runtime/utils/preview.d.ts +30 -0
- package/dist/runtime/utils/preview.js +30 -0
- package/dist/runtime/utils/validate-eponyme-data.d.ts +10 -0
- package/dist/runtime/utils/validate-eponyme-data.js +204 -0
- package/dist/types.d.mts +11 -0
- package/package.json +96 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
items: ReadonlyArray<{
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_14: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
trigger?: (props: typeof __VLS_14) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
select: (value: string) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onSelect?: ((value: string) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { DropdownMenuContent, DropdownMenuItem, DropdownMenuPortal, DropdownMenuRoot, DropdownMenuTrigger } from "reka-ui";
|
|
3
|
+
defineProps({
|
|
4
|
+
items: { type: Array, required: true }
|
|
5
|
+
});
|
|
6
|
+
const emit = defineEmits(["select"]);
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<DropdownMenuRoot>
|
|
11
|
+
<DropdownMenuTrigger as-child>
|
|
12
|
+
<slot name="trigger">
|
|
13
|
+
<button
|
|
14
|
+
type="button"
|
|
15
|
+
class="ep:h-9 ep:rounded-lg ep:border ep:border-border-ep ep:px-3 ep:text-muted-ep"
|
|
16
|
+
>
|
|
17
|
+
•••
|
|
18
|
+
</button>
|
|
19
|
+
</slot>
|
|
20
|
+
</DropdownMenuTrigger>
|
|
21
|
+
<DropdownMenuPortal>
|
|
22
|
+
<DropdownMenuContent
|
|
23
|
+
:side-offset="6"
|
|
24
|
+
align="end"
|
|
25
|
+
class="eponyme-portal ep:z-50 ep:min-w-44 ep:rounded-xl ep:border ep:border-border-ep ep:bg-selected-ep ep:p-1 ep:text-text-ep"
|
|
26
|
+
>
|
|
27
|
+
<DropdownMenuItem
|
|
28
|
+
v-for="item in items"
|
|
29
|
+
:key="item.value"
|
|
30
|
+
:disabled="item.disabled"
|
|
31
|
+
class="ep:cursor-pointer ep:rounded-lg ep:px-3 ep:py-2.5 ep:text-sm ep:outline-none ep:select-none ep:data-[disabled]:pointer-events-none ep:data-[disabled]:opacity-40 ep:data-[highlighted]:bg-white/10"
|
|
32
|
+
:class="{ 'ep:text-danger-ep': item.danger }"
|
|
33
|
+
@select="emit('select', item.value)"
|
|
34
|
+
>
|
|
35
|
+
{{ item.label }}
|
|
36
|
+
</DropdownMenuItem>
|
|
37
|
+
</DropdownMenuContent>
|
|
38
|
+
</DropdownMenuPortal>
|
|
39
|
+
</DropdownMenuRoot>
|
|
40
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
items: ReadonlyArray<{
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_14: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
trigger?: (props: typeof __VLS_14) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
select: (value: string) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onSelect?: ((value: string) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
id?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
errors?: string[];
|
|
7
|
+
/** The parent already renders the label — only the control and its messages are shown. */
|
|
8
|
+
hideLabel?: boolean;
|
|
9
|
+
/** Smaller label, for fields nested inside an array item. */
|
|
10
|
+
compact?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_1: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_1) => any;
|
|
15
|
+
};
|
|
16
|
+
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>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, inject } from "vue";
|
|
3
|
+
import { formFieldContextKey } from "./form-field-context";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
id: { type: String, required: false },
|
|
6
|
+
label: { type: String, required: false },
|
|
7
|
+
description: { type: String, required: false },
|
|
8
|
+
required: { type: Boolean, required: false },
|
|
9
|
+
errors: { type: Array, required: false, default: () => [] },
|
|
10
|
+
hideLabel: { type: Boolean, required: false, default: void 0 },
|
|
11
|
+
compact: { type: Boolean, required: false, default: void 0 }
|
|
12
|
+
});
|
|
13
|
+
const context = inject(formFieldContextKey, {});
|
|
14
|
+
const hideLabel = computed(() => props.hideLabel ?? context.hideLabel ?? false);
|
|
15
|
+
const compact = computed(() => props.compact ?? context.compact ?? false);
|
|
16
|
+
const descriptionId = computed(() => props.id ? `${props.id}-description` : void 0);
|
|
17
|
+
const errorId = computed(() => props.id ? `${props.id}-error` : void 0);
|
|
18
|
+
const describedBy = computed(() => [
|
|
19
|
+
props.description ? descriptionId.value : void 0,
|
|
20
|
+
props.errors.length ? errorId.value : void 0
|
|
21
|
+
].filter(Boolean).join(" ") || void 0);
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div class="ep:min-w-0">
|
|
26
|
+
<template v-if="!hideLabel">
|
|
27
|
+
<label
|
|
28
|
+
v-if="label"
|
|
29
|
+
:for="id"
|
|
30
|
+
class="ep:mb-1.5 ep:inline-block ep:w-fit ep:font-medium ep:text-text-ep"
|
|
31
|
+
:class="compact ? 'ep:text-xs' : 'ep:text-sm'"
|
|
32
|
+
>
|
|
33
|
+
{{ label }}<span
|
|
34
|
+
v-if="required"
|
|
35
|
+
class="ep:text-danger-ep"
|
|
36
|
+
> *</span>
|
|
37
|
+
</label>
|
|
38
|
+
<p
|
|
39
|
+
v-if="description"
|
|
40
|
+
:id="descriptionId"
|
|
41
|
+
class="ep:mt-0 ep:mb-2 ep:text-xs ep:leading-relaxed ep:text-muted-ep"
|
|
42
|
+
>
|
|
43
|
+
{{ description }}
|
|
44
|
+
</p>
|
|
45
|
+
</template>
|
|
46
|
+
<div
|
|
47
|
+
class="ep:block ep:min-w-0"
|
|
48
|
+
:aria-describedby="describedBy"
|
|
49
|
+
>
|
|
50
|
+
<slot />
|
|
51
|
+
</div>
|
|
52
|
+
<p
|
|
53
|
+
v-for="(error, index) in errors"
|
|
54
|
+
:id="index === 0 ? errorId : void 0"
|
|
55
|
+
:key="error"
|
|
56
|
+
role="alert"
|
|
57
|
+
class="ep:mt-1.5 ep:text-xs ep:text-danger-ep"
|
|
58
|
+
>
|
|
59
|
+
{{ error }}
|
|
60
|
+
</p>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
id?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
errors?: string[];
|
|
7
|
+
/** The parent already renders the label — only the control and its messages are shown. */
|
|
8
|
+
hideLabel?: boolean;
|
|
9
|
+
/** Smaller label, for fields nested inside an array item. */
|
|
10
|
+
compact?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_1: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_1) => any;
|
|
15
|
+
};
|
|
16
|
+
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>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string | number;
|
|
3
|
+
type?: string;
|
|
4
|
+
invalid?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** `sm` suits dense chrome such as the sidebar search; `md` is the form default. */
|
|
7
|
+
size?: 'sm' | 'md';
|
|
8
|
+
/** Extra horizontal room for an icon or shortcut hint overlaid on the input. */
|
|
9
|
+
padded?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: string | number) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
modelValue: { type: [String, Number], required: false, default: "" },
|
|
5
|
+
type: { type: String, required: false, default: "text" },
|
|
6
|
+
invalid: { type: Boolean, required: false },
|
|
7
|
+
disabled: { type: Boolean, required: false },
|
|
8
|
+
size: { type: String, required: false, default: "md" },
|
|
9
|
+
padded: { type: Boolean, required: false }
|
|
10
|
+
});
|
|
11
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
12
|
+
const classes = computed(() => [
|
|
13
|
+
"ep:block ep:w-full ep:min-w-0 ep:border-0 ep:bg-selected-ep ep:text-sm ep:text-white ep:outline-none ep:transition ep:placeholder:text-muted-ep ep:focus:border-muted-ep ep:focus:ring-2 ep:focus:ring-white/10 ep:aria-invalid:border-danger-ep ep:disabled:cursor-not-allowed ep:disabled:opacity-50",
|
|
14
|
+
props.size === "sm" ? "ep:h-10 ep:rounded-lg" : "ep:h-12 ep:rounded-xl ep:py-3",
|
|
15
|
+
props.padded ? "ep:pr-12 ep:pl-10" : "ep:px-4",
|
|
16
|
+
{ "eponyme-date-input": props.type === "date" }
|
|
17
|
+
]);
|
|
18
|
+
function update(event) {
|
|
19
|
+
const value = event.target.value;
|
|
20
|
+
emit("update:modelValue", props.type === "number" && value !== "" ? Number(value) : value);
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<input
|
|
26
|
+
:type="type"
|
|
27
|
+
:value="modelValue"
|
|
28
|
+
:aria-invalid="invalid || void 0"
|
|
29
|
+
:disabled="disabled"
|
|
30
|
+
:class="classes"
|
|
31
|
+
@input="update"
|
|
32
|
+
>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string | number;
|
|
3
|
+
type?: string;
|
|
4
|
+
invalid?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** `sm` suits dense chrome such as the sidebar search; `md` is the form default. */
|
|
7
|
+
size?: 'sm' | 'md';
|
|
8
|
+
/** Extra horizontal room for an icon or shortcut hint overlaid on the input. */
|
|
9
|
+
padded?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: string | number) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UrlValue } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
modelValue?: unknown;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: UrlValue) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: UrlValue) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import EPButton from "./EPButton.vue";
|
|
4
|
+
import EPDialog from "./EPDialog.vue";
|
|
5
|
+
import EPInputText from "./EPInputText.vue";
|
|
6
|
+
import EPRadioButton from "./EPRadioButton.vue";
|
|
7
|
+
import EPSwitch from "./EPSwitch.vue";
|
|
8
|
+
import EPTooltip from "./EPTooltip.vue";
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
id: { type: String, required: true },
|
|
11
|
+
label: { type: String, required: true },
|
|
12
|
+
modelValue: { type: null, required: false },
|
|
13
|
+
placeholder: { type: String, required: false },
|
|
14
|
+
invalid: { type: Boolean, required: false },
|
|
15
|
+
disabled: { type: Boolean, required: false }
|
|
16
|
+
});
|
|
17
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
18
|
+
const dialogOpen = ref(false);
|
|
19
|
+
const draftHref = ref("");
|
|
20
|
+
const draftType = ref("external");
|
|
21
|
+
const draftOpenInNewTab = ref(false);
|
|
22
|
+
const value = computed(() => {
|
|
23
|
+
if (props.modelValue && typeof props.modelValue === "object" && !Array.isArray(props.modelValue)) {
|
|
24
|
+
const link = props.modelValue;
|
|
25
|
+
return {
|
|
26
|
+
href: typeof link.href === "string" ? link.href : "",
|
|
27
|
+
type: link.type === "internal" ? "internal" : "external",
|
|
28
|
+
openInNewTab: link.openInNewTab === true
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return { href: "", type: "external", openInNewTab: false };
|
|
32
|
+
});
|
|
33
|
+
const typeOptions = [
|
|
34
|
+
{ label: "Internal link", value: "internal" },
|
|
35
|
+
{ label: "External link", value: "external" }
|
|
36
|
+
];
|
|
37
|
+
function openDialog() {
|
|
38
|
+
draftHref.value = value.value.href;
|
|
39
|
+
draftType.value = value.value.type;
|
|
40
|
+
draftOpenInNewTab.value = value.value.openInNewTab;
|
|
41
|
+
dialogOpen.value = true;
|
|
42
|
+
}
|
|
43
|
+
function updateDialogOpen(open) {
|
|
44
|
+
dialogOpen.value = open;
|
|
45
|
+
}
|
|
46
|
+
function updateType(type) {
|
|
47
|
+
draftType.value = type === "internal" ? "internal" : "external";
|
|
48
|
+
}
|
|
49
|
+
function updateHref(href) {
|
|
50
|
+
draftHref.value = String(href);
|
|
51
|
+
}
|
|
52
|
+
function save() {
|
|
53
|
+
emit("update:modelValue", {
|
|
54
|
+
href: draftHref.value.trim(),
|
|
55
|
+
type: draftType.value,
|
|
56
|
+
openInNewTab: draftOpenInNewTab.value
|
|
57
|
+
});
|
|
58
|
+
dialogOpen.value = false;
|
|
59
|
+
}
|
|
60
|
+
function openLink() {
|
|
61
|
+
if (!value.value.href || typeof window === "undefined") return;
|
|
62
|
+
const href = value.value.type === "internal" ? new URL(value.value.href, window.location.origin).href : value.value.href;
|
|
63
|
+
window.open(href, "_blank", "noopener,noreferrer");
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<template>
|
|
68
|
+
<div
|
|
69
|
+
class="ep:flex ep:min-h-12 ep:items-center ep:gap-3 ep:rounded-xl ep:border ep:bg-selected-ep ep:px-3 ep:py-2"
|
|
70
|
+
:class="invalid ? 'ep:border-danger-ep' : 'ep:border-0'"
|
|
71
|
+
>
|
|
72
|
+
<Icon
|
|
73
|
+
name="mingcute:link-2-line"
|
|
74
|
+
size="20"
|
|
75
|
+
class="ep:shrink-0 ep:text-muted-ep"
|
|
76
|
+
aria-hidden="true"
|
|
77
|
+
/>
|
|
78
|
+
<div class="ep:min-w-0 ep:flex-1">
|
|
79
|
+
<p class="ep:m-0 ep:truncate ep:text-sm ep:text-white">
|
|
80
|
+
{{ value.href || "No link configured" }}
|
|
81
|
+
</p>
|
|
82
|
+
<p class="ep:mt-0.5 ep:mb-0 ep:text-[11px] ep:text-muted-ep">
|
|
83
|
+
{{ value.type === "internal" ? "Internal" : "External" }} · {{ value.openInNewTab ? "New tab" : "Same tab" }}
|
|
84
|
+
</p>
|
|
85
|
+
</div>
|
|
86
|
+
<EPTooltip content="Open link">
|
|
87
|
+
<EPButton
|
|
88
|
+
variant="ghost"
|
|
89
|
+
icon="mingcute:external-link-line"
|
|
90
|
+
:disabled="!value.href"
|
|
91
|
+
:aria-label="`Open ${label}`"
|
|
92
|
+
@click="openLink"
|
|
93
|
+
/>
|
|
94
|
+
</EPTooltip>
|
|
95
|
+
<EPTooltip content="Configure link">
|
|
96
|
+
<EPButton
|
|
97
|
+
:id="id"
|
|
98
|
+
variant="ghost"
|
|
99
|
+
icon="mingcute:settings-3-line"
|
|
100
|
+
:disabled="disabled"
|
|
101
|
+
:aria-label="`Configure ${label}`"
|
|
102
|
+
@click="openDialog"
|
|
103
|
+
/>
|
|
104
|
+
</EPTooltip>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<EPDialog
|
|
108
|
+
:open="dialogOpen"
|
|
109
|
+
title="Configure link"
|
|
110
|
+
description="Choose where the link points and how it should open."
|
|
111
|
+
@update:open="updateDialogOpen"
|
|
112
|
+
>
|
|
113
|
+
<div class="ep:grid ep:gap-5">
|
|
114
|
+
<div>
|
|
115
|
+
<p class="ep:mt-0 ep:mb-2 ep:text-sm ep:font-medium ep:text-white">
|
|
116
|
+
Link type
|
|
117
|
+
</p>
|
|
118
|
+
<EPRadioButton
|
|
119
|
+
:model-value="draftType"
|
|
120
|
+
:options="typeOptions"
|
|
121
|
+
@update:model-value="updateType"
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<label class="ep:block">
|
|
126
|
+
<span class="ep:mb-2 ep:block ep:text-sm ep:font-medium ep:text-white">Destination</span>
|
|
127
|
+
<EPInputText
|
|
128
|
+
:model-value="draftHref"
|
|
129
|
+
:type="draftType === 'external' ? 'url' : 'text'"
|
|
130
|
+
:placeholder="draftType === 'internal' ? '/contact' : placeholder || 'https://example.com'"
|
|
131
|
+
@update:model-value="updateHref"
|
|
132
|
+
/>
|
|
133
|
+
<span class="ep:mt-1.5 ep:block ep:text-xs ep:text-muted-ep">
|
|
134
|
+
{{ draftType === "internal" ? "Use a path beginning with / or an anchor beginning with #." : "Use a complete HTTP(S) address." }}
|
|
135
|
+
</span>
|
|
136
|
+
</label>
|
|
137
|
+
|
|
138
|
+
<div class="ep:flex ep:items-center ep:justify-between ep:gap-4 ep:rounded-xl ep:bg-selected-ep/40 ep:px-4 ep:py-3">
|
|
139
|
+
<div>
|
|
140
|
+
<p class="ep:m-0 ep:text-sm ep:font-medium ep:text-white">
|
|
141
|
+
Open in new tab
|
|
142
|
+
</p>
|
|
143
|
+
<p class="ep:mt-1 ep:mb-0 ep:text-xs ep:text-muted-ep">
|
|
144
|
+
Keep the current page open when visitors follow this link.
|
|
145
|
+
</p>
|
|
146
|
+
</div>
|
|
147
|
+
<EPSwitch
|
|
148
|
+
:model-value="draftOpenInNewTab"
|
|
149
|
+
@update:model-value="draftOpenInNewTab = $event"
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<div class="ep:flex ep:justify-end ep:gap-2">
|
|
154
|
+
<EPButton
|
|
155
|
+
variant="ghost"
|
|
156
|
+
@click="dialogOpen = false"
|
|
157
|
+
>
|
|
158
|
+
Cancel
|
|
159
|
+
</EPButton>
|
|
160
|
+
<EPButton
|
|
161
|
+
variant="primary"
|
|
162
|
+
@click="save"
|
|
163
|
+
>
|
|
164
|
+
Apply link
|
|
165
|
+
</EPButton>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</EPDialog>
|
|
169
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UrlValue } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
modelValue?: unknown;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: UrlValue) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: UrlValue) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
options: ReadonlyArray<{
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}>;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { RadioGroupIndicator, RadioGroupItem, RadioGroupRoot } from "reka-ui";
|
|
3
|
+
defineProps({
|
|
4
|
+
modelValue: { type: String, required: false },
|
|
5
|
+
options: { type: Array, required: true },
|
|
6
|
+
required: { type: Boolean, required: false },
|
|
7
|
+
disabled: { type: Boolean, required: false }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<RadioGroupRoot
|
|
14
|
+
:model-value="modelValue"
|
|
15
|
+
:required="required"
|
|
16
|
+
:disabled="disabled"
|
|
17
|
+
class="ep:grid ep:gap-2 ep:sm:grid-cols-2"
|
|
18
|
+
@update:model-value="emit('update:modelValue', String($event ?? ''))"
|
|
19
|
+
>
|
|
20
|
+
<label
|
|
21
|
+
v-for="option in options"
|
|
22
|
+
:key="option.value"
|
|
23
|
+
class="ep:flex ep:cursor-pointer ep:items-center ep:gap-3 ep:rounded-xl ep:bg-selected-ep/40 ep:px-4 ep:py-3 ep:text-sm ep:text-text-ep ep:transition ep:hover:border-muted-ep"
|
|
24
|
+
>
|
|
25
|
+
<RadioGroupItem
|
|
26
|
+
:value="option.value"
|
|
27
|
+
class="ep:flex ep:h-5 ep:w-5 ep:items-center ep:justify-center ep:rounded-full ep:border ep:border-border-ep ep:bg-selected-ep ep:outline-none ep:focus-visible:ring-2 ep:focus-visible:ring-white/20"
|
|
28
|
+
>
|
|
29
|
+
<RadioGroupIndicator class="ep:block ep:aspect-square ep:h-2.5 ep:w-2.5 ep:rounded-full ep:bg-white" />
|
|
30
|
+
</RadioGroupItem>
|
|
31
|
+
{{ option.label }}
|
|
32
|
+
</label>
|
|
33
|
+
</RadioGroupRoot>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
options: ReadonlyArray<{
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}>;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
options: ReadonlyArray<{
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}>;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
invalid?: boolean;
|
|
11
|
+
size?: 'sm' | 'md';
|
|
12
|
+
/** Classes applied to the portalled menu content. Replaces the default z-index class. */
|
|
13
|
+
contentClass?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (value: string) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
SelectContent,
|
|
4
|
+
SelectItem,
|
|
5
|
+
SelectItemIndicator,
|
|
6
|
+
SelectItemText,
|
|
7
|
+
SelectPortal,
|
|
8
|
+
SelectRoot,
|
|
9
|
+
SelectTrigger,
|
|
10
|
+
SelectValue,
|
|
11
|
+
SelectViewport
|
|
12
|
+
} from "reka-ui";
|
|
13
|
+
import { computed } from "vue";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
modelValue: { type: String, required: false },
|
|
16
|
+
options: { type: Array, required: true },
|
|
17
|
+
placeholder: { type: String, required: false },
|
|
18
|
+
required: { type: Boolean, required: false },
|
|
19
|
+
disabled: { type: Boolean, required: false },
|
|
20
|
+
invalid: { type: Boolean, required: false },
|
|
21
|
+
size: { type: String, required: false, default: "md" },
|
|
22
|
+
contentClass: { type: String, required: false }
|
|
23
|
+
});
|
|
24
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
25
|
+
const triggerClasses = computed(() => [
|
|
26
|
+
"ep:flex ep:w-full ep:min-w-0 ep:items-center ep:justify-between ep:gap-3 ep:border ep:border-border-ep ep:bg-selected-ep ep:px-4 ep:text-left ep:text-sm ep:text-white ep:outline-none ep:transition ep:focus:border-muted-ep ep:focus:ring-2 ep:focus:ring-white/10 ep:aria-invalid:border-danger-ep ep:disabled:cursor-not-allowed ep:disabled:opacity-50",
|
|
27
|
+
props.size === "sm" ? "ep:h-10 ep:rounded-lg" : "ep:h-12 ep:rounded-xl"
|
|
28
|
+
]);
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<SelectRoot
|
|
33
|
+
:model-value="modelValue"
|
|
34
|
+
:required="required"
|
|
35
|
+
:disabled="disabled"
|
|
36
|
+
@update:model-value="emit('update:modelValue', String($event ?? ''))"
|
|
37
|
+
>
|
|
38
|
+
<SelectTrigger
|
|
39
|
+
:aria-invalid="invalid || void 0"
|
|
40
|
+
:class="triggerClasses"
|
|
41
|
+
>
|
|
42
|
+
<SelectValue :placeholder="placeholder" />
|
|
43
|
+
<span
|
|
44
|
+
class="ep:text-xs ep:text-muted-ep"
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
>⌄</span>
|
|
47
|
+
</SelectTrigger>
|
|
48
|
+
<SelectPortal>
|
|
49
|
+
<SelectContent
|
|
50
|
+
position="popper"
|
|
51
|
+
:side-offset="6"
|
|
52
|
+
:class="[
|
|
53
|
+
'eponyme-portal ep:min-w-(--reka-select-trigger-width) ep:overflow-hidden ep:rounded-xl ep:border ep:border-border-ep ep:bg-selected-ep ep:p-1 ep:text-text-ep',
|
|
54
|
+
contentClass || 'ep:z-50'
|
|
55
|
+
]"
|
|
56
|
+
>
|
|
57
|
+
<SelectViewport>
|
|
58
|
+
<SelectItem
|
|
59
|
+
v-for="option in options"
|
|
60
|
+
:key="option.value"
|
|
61
|
+
:value="option.value"
|
|
62
|
+
class="ep:relative ep:flex ep:cursor-pointer ep:items-center ep:rounded-lg ep:py-2.5 ep:pr-8 ep:pl-3 ep:text-sm ep:outline-none ep:select-none ep:data-highlighted:bg-white/10"
|
|
63
|
+
>
|
|
64
|
+
<SelectItemText>{{ option.label }}</SelectItemText>
|
|
65
|
+
<SelectItemIndicator class="ep:absolute ep:right-3">
|
|
66
|
+
✓
|
|
67
|
+
</SelectItemIndicator>
|
|
68
|
+
</SelectItem>
|
|
69
|
+
</SelectViewport>
|
|
70
|
+
</SelectContent>
|
|
71
|
+
</SelectPortal>
|
|
72
|
+
</SelectRoot>
|
|
73
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
options: ReadonlyArray<{
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}>;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
invalid?: boolean;
|
|
11
|
+
size?: 'sm' | 'md';
|
|
12
|
+
/** Classes applied to the portalled menu content. Replaces the default z-index class. */
|
|
13
|
+
contentClass?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (value: string) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|