@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.
Files changed (325) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +609 -0
  3. package/dist/eponyme.d.mts +15 -0
  4. package/dist/eponyme.mjs +38 -0
  5. package/dist/module.d.mts +26 -0
  6. package/dist/module.json +9 -0
  7. package/dist/module.mjs +154 -0
  8. package/dist/runtime/assets/dashboard.css +1 -0
  9. package/dist/runtime/components/editor/EponymeCollectionPage.d.vue.ts +9 -0
  10. package/dist/runtime/components/editor/EponymeCollectionPage.vue +238 -0
  11. package/dist/runtime/components/editor/EponymeCollectionPage.vue.d.ts +9 -0
  12. package/dist/runtime/components/editor/EponymeCopy.d.vue.ts +7 -0
  13. package/dist/runtime/components/editor/EponymeCopy.vue +28 -0
  14. package/dist/runtime/components/editor/EponymeCopy.vue.d.ts +7 -0
  15. package/dist/runtime/components/editor/EponymeFolderNav.d.vue.ts +7 -0
  16. package/dist/runtime/components/editor/EponymeFolderNav.vue +146 -0
  17. package/dist/runtime/components/editor/EponymeFolderNav.vue.d.ts +7 -0
  18. package/dist/runtime/components/editor/EponymeFolderPage.d.vue.ts +7 -0
  19. package/dist/runtime/components/editor/EponymeFolderPage.vue +62 -0
  20. package/dist/runtime/components/editor/EponymeFolderPage.vue.d.ts +7 -0
  21. package/dist/runtime/components/editor/EponymeForm.d.vue.ts +9 -0
  22. package/dist/runtime/components/editor/EponymeForm.vue +309 -0
  23. package/dist/runtime/components/editor/EponymeForm.vue.d.ts +9 -0
  24. package/dist/runtime/components/editor/EponymeFormPage.d.vue.ts +8 -0
  25. package/dist/runtime/components/editor/EponymeFormPage.vue +288 -0
  26. package/dist/runtime/components/editor/EponymeFormPage.vue.d.ts +8 -0
  27. package/dist/runtime/components/editor/EponymeHistoryDialog.d.vue.ts +14 -0
  28. package/dist/runtime/components/editor/EponymeHistoryDialog.vue +97 -0
  29. package/dist/runtime/components/editor/EponymeHistoryDialog.vue.d.ts +14 -0
  30. package/dist/runtime/components/editor/EponymeNavigationLink.d.vue.ts +14 -0
  31. package/dist/runtime/components/editor/EponymeNavigationLink.vue +80 -0
  32. package/dist/runtime/components/editor/EponymeNavigationLink.vue.d.ts +14 -0
  33. package/dist/runtime/components/editor/EponymePageNavigation.d.vue.ts +8 -0
  34. package/dist/runtime/components/editor/EponymePageNavigation.vue +58 -0
  35. package/dist/runtime/components/editor/EponymePageNavigation.vue.d.ts +8 -0
  36. package/dist/runtime/components/editor/EponymePreviewPanel.d.vue.ts +16 -0
  37. package/dist/runtime/components/editor/EponymePreviewPanel.vue +100 -0
  38. package/dist/runtime/components/editor/EponymePreviewPanel.vue.d.ts +16 -0
  39. package/dist/runtime/components/editor/EponymeSidebar.d.vue.ts +6 -0
  40. package/dist/runtime/components/editor/EponymeSidebar.vue +244 -0
  41. package/dist/runtime/components/editor/EponymeSidebar.vue.d.ts +6 -0
  42. package/dist/runtime/components/editor/EponymeSidebarTree.d.vue.ts +18 -0
  43. package/dist/runtime/components/editor/EponymeSidebarTree.vue +84 -0
  44. package/dist/runtime/components/editor/EponymeSidebarTree.vue.d.ts +18 -0
  45. package/dist/runtime/components/fields/ArrayField.d.vue.ts +19 -0
  46. package/dist/runtime/components/fields/ArrayField.vue +198 -0
  47. package/dist/runtime/components/fields/ArrayField.vue.d.ts +19 -0
  48. package/dist/runtime/components/fields/BooleanField.d.vue.ts +16 -0
  49. package/dist/runtime/components/fields/BooleanField.vue +36 -0
  50. package/dist/runtime/components/fields/BooleanField.vue.d.ts +16 -0
  51. package/dist/runtime/components/fields/CheckboxGroupField.d.vue.ts +20 -0
  52. package/dist/runtime/components/fields/CheckboxGroupField.vue +52 -0
  53. package/dist/runtime/components/fields/CheckboxGroupField.vue.d.ts +20 -0
  54. package/dist/runtime/components/fields/ColorField.d.vue.ts +19 -0
  55. package/dist/runtime/components/fields/ColorField.vue +39 -0
  56. package/dist/runtime/components/fields/ColorField.vue.d.ts +19 -0
  57. package/dist/runtime/components/fields/DateField.d.vue.ts +18 -0
  58. package/dist/runtime/components/fields/DateField.vue +39 -0
  59. package/dist/runtime/components/fields/DateField.vue.d.ts +18 -0
  60. package/dist/runtime/components/fields/FieldRenderer.d.vue.ts +24 -0
  61. package/dist/runtime/components/fields/FieldRenderer.vue +135 -0
  62. package/dist/runtime/components/fields/FieldRenderer.vue.d.ts +24 -0
  63. package/dist/runtime/components/fields/NumberField.d.vue.ts +20 -0
  64. package/dist/runtime/components/fields/NumberField.vue +58 -0
  65. package/dist/runtime/components/fields/NumberField.vue.d.ts +20 -0
  66. package/dist/runtime/components/fields/RadioField.d.vue.ts +20 -0
  67. package/dist/runtime/components/fields/RadioField.vue +44 -0
  68. package/dist/runtime/components/fields/RadioField.vue.d.ts +20 -0
  69. package/dist/runtime/components/fields/RichTextField.d.vue.ts +20 -0
  70. package/dist/runtime/components/fields/RichTextField.vue +176 -0
  71. package/dist/runtime/components/fields/RichTextField.vue.d.ts +20 -0
  72. package/dist/runtime/components/fields/SectionField.d.vue.ts +20 -0
  73. package/dist/runtime/components/fields/SectionField.vue +127 -0
  74. package/dist/runtime/components/fields/SectionField.vue.d.ts +20 -0
  75. package/dist/runtime/components/fields/SelectField.d.vue.ts +21 -0
  76. package/dist/runtime/components/fields/SelectField.vue +42 -0
  77. package/dist/runtime/components/fields/SelectField.vue.d.ts +21 -0
  78. package/dist/runtime/components/fields/SlugField.d.vue.ts +20 -0
  79. package/dist/runtime/components/fields/SlugField.vue +35 -0
  80. package/dist/runtime/components/fields/SlugField.vue.d.ts +20 -0
  81. package/dist/runtime/components/fields/TabsField.d.vue.ts +19 -0
  82. package/dist/runtime/components/fields/TabsField.vue +109 -0
  83. package/dist/runtime/components/fields/TabsField.vue.d.ts +19 -0
  84. package/dist/runtime/components/fields/TextField.d.vue.ts +22 -0
  85. package/dist/runtime/components/fields/TextField.vue +56 -0
  86. package/dist/runtime/components/fields/TextField.vue.d.ts +22 -0
  87. package/dist/runtime/components/fields/TextareaField.d.vue.ts +20 -0
  88. package/dist/runtime/components/fields/TextareaField.vue +47 -0
  89. package/dist/runtime/components/fields/TextareaField.vue.d.ts +20 -0
  90. package/dist/runtime/components/fields/UrlField.d.vue.ts +17 -0
  91. package/dist/runtime/components/fields/UrlField.vue +35 -0
  92. package/dist/runtime/components/fields/UrlField.vue.d.ts +17 -0
  93. package/dist/runtime/components/ui/EPAccordion.d.vue.ts +26 -0
  94. package/dist/runtime/components/ui/EPAccordion.vue +64 -0
  95. package/dist/runtime/components/ui/EPAccordion.vue.d.ts +26 -0
  96. package/dist/runtime/components/ui/EPAvatar.d.vue.ts +9 -0
  97. package/dist/runtime/components/ui/EPAvatar.vue +25 -0
  98. package/dist/runtime/components/ui/EPAvatar.vue.d.ts +9 -0
  99. package/dist/runtime/components/ui/EPBadge.d.vue.ts +16 -0
  100. package/dist/runtime/components/ui/EPBadge.vue +17 -0
  101. package/dist/runtime/components/ui/EPBadge.vue.d.ts +16 -0
  102. package/dist/runtime/components/ui/EPButton.d.vue.ts +22 -0
  103. package/dist/runtime/components/ui/EPButton.vue +55 -0
  104. package/dist/runtime/components/ui/EPButton.vue.d.ts +22 -0
  105. package/dist/runtime/components/ui/EPCheckbox.d.vue.ts +11 -0
  106. package/dist/runtime/components/ui/EPCheckbox.vue +21 -0
  107. package/dist/runtime/components/ui/EPCheckbox.vue.d.ts +11 -0
  108. package/dist/runtime/components/ui/EPColorPicker.d.vue.ts +19 -0
  109. package/dist/runtime/components/ui/EPColorPicker.vue +63 -0
  110. package/dist/runtime/components/ui/EPColorPicker.vue.d.ts +19 -0
  111. package/dist/runtime/components/ui/EPDialog.d.vue.ts +24 -0
  112. package/dist/runtime/components/ui/EPDialog.vue +54 -0
  113. package/dist/runtime/components/ui/EPDialog.vue.d.ts +24 -0
  114. package/dist/runtime/components/ui/EPDropdownMenu.d.vue.ts +25 -0
  115. package/dist/runtime/components/ui/EPDropdownMenu.vue +40 -0
  116. package/dist/runtime/components/ui/EPDropdownMenu.vue.d.ts +25 -0
  117. package/dist/runtime/components/ui/EPFormField.d.vue.ts +24 -0
  118. package/dist/runtime/components/ui/EPFormField.vue +62 -0
  119. package/dist/runtime/components/ui/EPFormField.vue.d.ts +24 -0
  120. package/dist/runtime/components/ui/EPInputText.d.vue.ts +17 -0
  121. package/dist/runtime/components/ui/EPInputText.vue +33 -0
  122. package/dist/runtime/components/ui/EPInputText.vue.d.ts +17 -0
  123. package/dist/runtime/components/ui/EPLinkEditor.d.vue.ts +16 -0
  124. package/dist/runtime/components/ui/EPLinkEditor.vue +169 -0
  125. package/dist/runtime/components/ui/EPLinkEditor.vue.d.ts +16 -0
  126. package/dist/runtime/components/ui/EPRadioButton.d.vue.ts +16 -0
  127. package/dist/runtime/components/ui/EPRadioButton.vue +34 -0
  128. package/dist/runtime/components/ui/EPRadioButton.vue.d.ts +16 -0
  129. package/dist/runtime/components/ui/EPSelect.d.vue.ts +21 -0
  130. package/dist/runtime/components/ui/EPSelect.vue +73 -0
  131. package/dist/runtime/components/ui/EPSelect.vue.d.ts +21 -0
  132. package/dist/runtime/components/ui/EPSlider.d.vue.ts +16 -0
  133. package/dist/runtime/components/ui/EPSlider.vue +51 -0
  134. package/dist/runtime/components/ui/EPSlider.vue.d.ts +16 -0
  135. package/dist/runtime/components/ui/EPSwitch.d.vue.ts +11 -0
  136. package/dist/runtime/components/ui/EPSwitch.vue +23 -0
  137. package/dist/runtime/components/ui/EPSwitch.vue.d.ts +11 -0
  138. package/dist/runtime/components/ui/EPTextarea.d.vue.ts +12 -0
  139. package/dist/runtime/components/ui/EPTextarea.vue +18 -0
  140. package/dist/runtime/components/ui/EPTextarea.vue.d.ts +12 -0
  141. package/dist/runtime/components/ui/EPToast.d.vue.ts +13 -0
  142. package/dist/runtime/components/ui/EPToast.vue +60 -0
  143. package/dist/runtime/components/ui/EPToast.vue.d.ts +13 -0
  144. package/dist/runtime/components/ui/EPTooltip.d.vue.ts +17 -0
  145. package/dist/runtime/components/ui/EPTooltip.vue +34 -0
  146. package/dist/runtime/components/ui/EPTooltip.vue.d.ts +17 -0
  147. package/dist/runtime/components/ui/form-field-context.d.ts +12 -0
  148. package/dist/runtime/components/ui/form-field-context.js +1 -0
  149. package/dist/runtime/composables/useEponyme.d.ts +24 -0
  150. package/dist/runtime/composables/useEponyme.js +63 -0
  151. package/dist/runtime/composables/useEponymeAuth.d.ts +16 -0
  152. package/dist/runtime/composables/useEponymeAuth.js +81 -0
  153. package/dist/runtime/composables/useEponymeCollection.d.ts +27 -0
  154. package/dist/runtime/composables/useEponymeCollection.js +44 -0
  155. package/dist/runtime/composables/useEponymeColorPresets.d.ts +5 -0
  156. package/dist/runtime/composables/useEponymeColorPresets.js +16 -0
  157. package/dist/runtime/composables/useEponymeConfig.d.ts +1 -0
  158. package/dist/runtime/composables/useEponymeConfig.js +4 -0
  159. package/dist/runtime/composables/useEponymeForm.d.ts +35 -0
  160. package/dist/runtime/composables/useEponymeForm.js +75 -0
  161. package/dist/runtime/composables/useEponymeHistory.d.ts +26 -0
  162. package/dist/runtime/composables/useEponymeHistory.js +24 -0
  163. package/dist/runtime/composables/useEponymeValidation.d.ts +21 -0
  164. package/dist/runtime/composables/useEponymeValidation.js +34 -0
  165. package/dist/runtime/fields/array.d.ts +2 -0
  166. package/dist/runtime/fields/array.js +3 -0
  167. package/dist/runtime/fields/boolean.d.ts +2 -0
  168. package/dist/runtime/fields/boolean.js +3 -0
  169. package/dist/runtime/fields/checkbox-group.d.ts +2 -0
  170. package/dist/runtime/fields/checkbox-group.js +3 -0
  171. package/dist/runtime/fields/color.d.ts +2 -0
  172. package/dist/runtime/fields/color.js +3 -0
  173. package/dist/runtime/fields/date.d.ts +3 -0
  174. package/dist/runtime/fields/date.js +6 -0
  175. package/dist/runtime/fields/email.d.ts +2 -0
  176. package/dist/runtime/fields/email.js +3 -0
  177. package/dist/runtime/fields/image.d.ts +2 -0
  178. package/dist/runtime/fields/image.js +3 -0
  179. package/dist/runtime/fields/index.d.ts +37 -0
  180. package/dist/runtime/fields/index.js +19 -0
  181. package/dist/runtime/fields/number.d.ts +2 -0
  182. package/dist/runtime/fields/number.js +3 -0
  183. package/dist/runtime/fields/radio.d.ts +2 -0
  184. package/dist/runtime/fields/radio.js +3 -0
  185. package/dist/runtime/fields/rich-text.d.ts +2 -0
  186. package/dist/runtime/fields/rich-text.js +3 -0
  187. package/dist/runtime/fields/section.d.ts +2 -0
  188. package/dist/runtime/fields/section.js +3 -0
  189. package/dist/runtime/fields/select.d.ts +2 -0
  190. package/dist/runtime/fields/select.js +3 -0
  191. package/dist/runtime/fields/slug.d.ts +2 -0
  192. package/dist/runtime/fields/slug.js +3 -0
  193. package/dist/runtime/fields/string.d.ts +2 -0
  194. package/dist/runtime/fields/string.js +3 -0
  195. package/dist/runtime/fields/tab.d.ts +2 -0
  196. package/dist/runtime/fields/tab.js +3 -0
  197. package/dist/runtime/fields/textarea.d.ts +2 -0
  198. package/dist/runtime/fields/textarea.js +3 -0
  199. package/dist/runtime/fields/url.d.ts +2 -0
  200. package/dist/runtime/fields/url.js +3 -0
  201. package/dist/runtime/middleware/eponyme-auth.d.ts +2 -0
  202. package/dist/runtime/middleware/eponyme-auth.js +13 -0
  203. package/dist/runtime/middleware/eponyme-owner.d.ts +2 -0
  204. package/dist/runtime/middleware/eponyme-owner.js +7 -0
  205. package/dist/runtime/pages/EponymeChangePasswordPage.d.vue.ts +3 -0
  206. package/dist/runtime/pages/EponymeChangePasswordPage.vue +118 -0
  207. package/dist/runtime/pages/EponymeChangePasswordPage.vue.d.ts +3 -0
  208. package/dist/runtime/pages/EponymeDetailPage.d.vue.ts +3 -0
  209. package/dist/runtime/pages/EponymeDetailPage.vue +83 -0
  210. package/dist/runtime/pages/EponymeDetailPage.vue.d.ts +3 -0
  211. package/dist/runtime/pages/EponymeIndexPage.d.vue.ts +3 -0
  212. package/dist/runtime/pages/EponymeIndexPage.vue +51 -0
  213. package/dist/runtime/pages/EponymeIndexPage.vue.d.ts +3 -0
  214. package/dist/runtime/pages/EponymeLoginPage.d.vue.ts +3 -0
  215. package/dist/runtime/pages/EponymeLoginPage.vue +102 -0
  216. package/dist/runtime/pages/EponymeLoginPage.vue.d.ts +3 -0
  217. package/dist/runtime/pages/EponymeUsersPage.d.vue.ts +3 -0
  218. package/dist/runtime/pages/EponymeUsersPage.vue +261 -0
  219. package/dist/runtime/pages/EponymeUsersPage.vue.d.ts +3 -0
  220. package/dist/runtime/server/api/eponyme/[name].get.d.ts +4 -0
  221. package/dist/runtime/server/api/eponyme/[name].get.js +20 -0
  222. package/dist/runtime/server/api/eponyme/[name].patch.d.ts +11 -0
  223. package/dist/runtime/server/api/eponyme/[name].patch.js +20 -0
  224. package/dist/runtime/server/api/eponyme-auth/change-password.post.d.ts +4 -0
  225. package/dist/runtime/server/api/eponyme-auth/change-password.post.js +21 -0
  226. package/dist/runtime/server/api/eponyme-auth/login.post.d.ts +4 -0
  227. package/dist/runtime/server/api/eponyme-auth/login.post.js +12 -0
  228. package/dist/runtime/server/api/eponyme-auth/logout.post.d.ts +4 -0
  229. package/dist/runtime/server/api/eponyme-auth/logout.post.js +13 -0
  230. package/dist/runtime/server/api/eponyme-auth/session.get.d.ts +4 -0
  231. package/dist/runtime/server/api/eponyme-auth/session.get.js +5 -0
  232. package/dist/runtime/server/api/eponyme-collections/[path].delete.d.ts +4 -0
  233. package/dist/runtime/server/api/eponyme-collections/[path].delete.js +11 -0
  234. package/dist/runtime/server/api/eponyme-collections/[path].get.d.ts +4 -0
  235. package/dist/runtime/server/api/eponyme-collections/[path].get.js +11 -0
  236. package/dist/runtime/server/api/eponyme-collections/[path].post.d.ts +7 -0
  237. package/dist/runtime/server/api/eponyme-collections/[path].post.js +16 -0
  238. package/dist/runtime/server/api/eponyme-forms/[path].delete.d.ts +6 -0
  239. package/dist/runtime/server/api/eponyme-forms/[path].delete.js +19 -0
  240. package/dist/runtime/server/api/eponyme-forms/[path].get.d.ts +4 -0
  241. package/dist/runtime/server/api/eponyme-forms/[path].get.js +22 -0
  242. package/dist/runtime/server/api/eponyme-forms/[path].post.d.ts +19 -0
  243. package/dist/runtime/server/api/eponyme-forms/[path].post.js +36 -0
  244. package/dist/runtime/server/api/eponyme-history/[path].get.d.ts +4 -0
  245. package/dist/runtime/server/api/eponyme-history/[path].get.js +11 -0
  246. package/dist/runtime/server/api/eponyme-history/[path].patch.d.ts +2 -0
  247. package/dist/runtime/server/api/eponyme-history/[path].patch.js +18 -0
  248. package/dist/runtime/server/api/eponyme-sitemap.get.d.ts +4 -0
  249. package/dist/runtime/server/api/eponyme-sitemap.get.js +5 -0
  250. package/dist/runtime/server/api/eponyme-statuses.get.d.ts +4 -0
  251. package/dist/runtime/server/api/eponyme-statuses.get.js +7 -0
  252. package/dist/runtime/server/api/eponyme-users/[id]/reset-password.post.d.ts +5 -0
  253. package/dist/runtime/server/api/eponyme-users/[id]/reset-password.post.js +12 -0
  254. package/dist/runtime/server/api/eponyme-users/[id].patch.d.ts +4 -0
  255. package/dist/runtime/server/api/eponyme-users/[id].patch.js +14 -0
  256. package/dist/runtime/server/api/eponyme-users/index.get.d.ts +4 -0
  257. package/dist/runtime/server/api/eponyme-users/index.get.js +7 -0
  258. package/dist/runtime/server/api/eponyme-users/index.post.d.ts +5 -0
  259. package/dist/runtime/server/api/eponyme-users/index.post.js +13 -0
  260. package/dist/runtime/server/plugins/eponyme-sync.d.ts +2 -0
  261. package/dist/runtime/server/plugins/eponyme-sync.js +14 -0
  262. package/dist/runtime/server/services/eponyme-auth-service.d.ts +2 -0
  263. package/dist/runtime/server/services/eponyme-auth-service.js +15 -0
  264. package/dist/runtime/server/services/eponyme-auth-store.d.ts +119 -0
  265. package/dist/runtime/server/services/eponyme-auth-store.js +227 -0
  266. package/dist/runtime/server/services/eponyme-form-service.d.ts +3 -0
  267. package/dist/runtime/server/services/eponyme-form-service.js +8 -0
  268. package/dist/runtime/server/services/eponyme-form-store.d.ts +100 -0
  269. package/dist/runtime/server/services/eponyme-form-store.js +109 -0
  270. package/dist/runtime/server/services/eponyme-service.d.ts +3 -0
  271. package/dist/runtime/server/services/eponyme-service.js +8 -0
  272. package/dist/runtime/server/services/eponyme-store.d.ts +202 -0
  273. package/dist/runtime/server/services/eponyme-store.js +338 -0
  274. package/dist/runtime/server/utils/auth.d.ts +11 -0
  275. package/dist/runtime/server/utils/auth.js +41 -0
  276. package/dist/runtime/server/utils/eponyme-form.d.ts +14 -0
  277. package/dist/runtime/server/utils/eponyme-form.js +6 -0
  278. package/dist/runtime/server/utils/eponyme-sitemap.d.ts +7 -0
  279. package/dist/runtime/server/utils/eponyme-sitemap.js +7 -0
  280. package/dist/runtime/server/utils/form-route.d.ts +14 -0
  281. package/dist/runtime/server/utils/form-route.js +14 -0
  282. package/dist/runtime/server/utils/password.d.ts +4 -0
  283. package/dist/runtime/server/utils/password.js +30 -0
  284. package/dist/runtime/types/auth.d.ts +20 -0
  285. package/dist/runtime/types/auth.js +7 -0
  286. package/dist/runtime/types/eponyme-config.d.ts +11 -0
  287. package/dist/runtime/types/eponyme-navigation.d.ts +6 -0
  288. package/dist/runtime/types/eponyme-navigation.js +0 -0
  289. package/dist/runtime/types/eponyme.d.ts +87 -0
  290. package/dist/runtime/types/eponyme.js +0 -0
  291. package/dist/runtime/types/field.d.ts +203 -0
  292. package/dist/runtime/types/field.js +0 -0
  293. package/dist/runtime/types/index.d.ts +3 -0
  294. package/dist/runtime/types/index.js +3 -0
  295. package/dist/runtime/types/nuxt.d.ts +11 -0
  296. package/dist/runtime/utils/as-record.d.ts +1 -0
  297. package/dist/runtime/utils/as-record.js +3 -0
  298. package/dist/runtime/utils/build-eponyme-schema.d.ts +22 -0
  299. package/dist/runtime/utils/build-eponyme-schema.js +42 -0
  300. package/dist/runtime/utils/changed-paths.d.ts +6 -0
  301. package/dist/runtime/utils/changed-paths.js +25 -0
  302. package/dist/runtime/utils/create-default-eponyme-data.d.ts +5 -0
  303. package/dist/runtime/utils/create-default-eponyme-data.js +12 -0
  304. package/dist/runtime/utils/field-path.d.ts +14 -0
  305. package/dist/runtime/utils/field-path.js +23 -0
  306. package/dist/runtime/utils/get-eponyme-schemas.d.ts +7 -0
  307. package/dist/runtime/utils/get-eponyme-schemas.js +33 -0
  308. package/dist/runtime/utils/get-field-default-value.d.ts +4 -0
  309. package/dist/runtime/utils/get-field-default-value.js +56 -0
  310. package/dist/runtime/utils/humanize-label.d.ts +6 -0
  311. package/dist/runtime/utils/humanize-label.js +3 -0
  312. package/dist/runtime/utils/initials.d.ts +1 -0
  313. package/dist/runtime/utils/initials.js +3 -0
  314. package/dist/runtime/utils/is-field-visible.d.ts +2 -0
  315. package/dist/runtime/utils/is-field-visible.js +14 -0
  316. package/dist/runtime/utils/normalize-hex-color.d.ts +8 -0
  317. package/dist/runtime/utils/normalize-hex-color.js +11 -0
  318. package/dist/runtime/utils/normalize-slug.d.ts +1 -0
  319. package/dist/runtime/utils/normalize-slug.js +4 -0
  320. package/dist/runtime/utils/preview.d.ts +30 -0
  321. package/dist/runtime/utils/preview.js +30 -0
  322. package/dist/runtime/utils/validate-eponyme-data.d.ts +10 -0
  323. package/dist/runtime/utils/validate-eponyme-data.js +204 -0
  324. package/dist/types.d.mts +11 -0
  325. 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;