@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,17 @@
1
+ type __VLS_Props = {
2
+ id: string;
3
+ modelValue?: unknown;
4
+ label: string;
5
+ description?: string;
6
+ required?: boolean;
7
+ placeholder?: string;
8
+ errors?: string[];
9
+ disabled?: boolean;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (value: unknown) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,35 @@
1
+ <script setup>
2
+ import EPFormField from "../ui/EPFormField.vue";
3
+ import EPLinkEditor from "../ui/EPLinkEditor.vue";
4
+ defineProps({
5
+ id: { type: String, required: true },
6
+ modelValue: { type: null, required: false },
7
+ label: { type: String, required: true },
8
+ description: { type: String, required: false },
9
+ required: { type: Boolean, required: false },
10
+ placeholder: { type: String, required: false },
11
+ errors: { type: Array, required: false, default: () => [] },
12
+ disabled: { type: Boolean, required: false }
13
+ });
14
+ const emit = defineEmits(["update:modelValue"]);
15
+ </script>
16
+
17
+ <template>
18
+ <EPFormField
19
+ :id="id"
20
+ :label="label"
21
+ :description="description"
22
+ :required="required"
23
+ :errors="errors"
24
+ >
25
+ <EPLinkEditor
26
+ :id="id"
27
+ :label="label"
28
+ :model-value="modelValue"
29
+ :placeholder="placeholder"
30
+ :invalid="Boolean(errors.length)"
31
+ :disabled="disabled"
32
+ @update:model-value="emit('update:modelValue', $event)"
33
+ />
34
+ </EPFormField>
35
+ </template>
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ id: string;
3
+ modelValue?: unknown;
4
+ label: string;
5
+ description?: string;
6
+ required?: boolean;
7
+ placeholder?: string;
8
+ errors?: string[];
9
+ disabled?: boolean;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (value: unknown) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ modelValue?: boolean;
3
+ value: string;
4
+ disabled?: boolean;
5
+ };
6
+ declare var __VLS_22: {}, __VLS_35: {}, __VLS_43: {};
7
+ type __VLS_Slots = {} & {
8
+ header?: (props: typeof __VLS_22) => any;
9
+ } & {
10
+ action?: (props: typeof __VLS_35) => any;
11
+ } & {
12
+ default?: (props: typeof __VLS_43) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ "update:modelValue": (value: boolean) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,64 @@
1
+ <script setup>
2
+ import {
3
+ AccordionContent,
4
+ AccordionHeader,
5
+ AccordionItem,
6
+ AccordionRoot,
7
+ AccordionTrigger
8
+ } from "reka-ui";
9
+ import { computed } from "vue";
10
+ const props = defineProps({
11
+ modelValue: { type: Boolean, required: false, default: false },
12
+ value: { type: String, required: true },
13
+ disabled: { type: Boolean, required: false, default: false }
14
+ });
15
+ const emit = defineEmits(["update:modelValue"]);
16
+ const activeValue = computed(() => props.modelValue ? props.value : void 0);
17
+ </script>
18
+
19
+ <template>
20
+ <AccordionRoot
21
+ type="single"
22
+ collapsible
23
+ :model-value="activeValue"
24
+ class="ep:w-full ep:min-w-0"
25
+ @update:model-value="emit('update:modelValue', $event === value)"
26
+ >
27
+ <AccordionItem
28
+ :value="value"
29
+ :disabled="disabled"
30
+ class="ep:w-full ep:min-w-0"
31
+ >
32
+ <AccordionHeader
33
+ as="div"
34
+ class="ep:group ep:relative ep:w-full ep:min-w-0"
35
+ >
36
+ <slot name="header" />
37
+ <AccordionTrigger
38
+ class="ep:group ep:absolute ep:top-1/2 ep:right-1.5 ep:flex ep:h-7 ep:w-7 ep:-translate-y-1/2 ep:cursor-pointer ep:items-center ep:justify-center ep:rounded-md ep:border-0 ep:bg-transparent ep:text-muted-ep ep:transition ep:hover:bg-theme-ep ep:hover:text-white ep:focus-visible:outline-none ep:focus-visible:ring-2 ep:focus-visible:ring-white/20"
39
+ :aria-label="modelValue ? 'Close folder' : 'Open folder'"
40
+ >
41
+ <Icon
42
+ name="mingcute:down-small-line"
43
+ size="18"
44
+ aria-hidden="true"
45
+ class="ep:transition-transform ep:group-data-[state=closed]:-rotate-90"
46
+ />
47
+ </AccordionTrigger>
48
+ <div
49
+ v-if="$slots.action"
50
+ class="ep:absolute ep:top-1/2 ep:right-9 ep:-translate-y-1/2 ep:opacity-0 ep:transition ep:group-hover:opacity-100 ep:focus-within:opacity-100"
51
+ >
52
+ <slot name="action" />
53
+ </div>
54
+ </AccordionHeader>
55
+ <AccordionContent class="eponyme-accordion-content ep:overflow-hidden ep:pt-1 ep:text-muted-ep">
56
+ <slot />
57
+ </AccordionContent>
58
+ </AccordionItem>
59
+ </AccordionRoot>
60
+ </template>
61
+
62
+ <style scoped>
63
+ .eponyme-accordion-content[data-state=open]{animation:eponyme-accordion-down .18s cubic-bezier(.22,1,.36,1)}.eponyme-accordion-content[data-state=closed]{animation:eponyme-accordion-up .14s ease-in}@keyframes eponyme-accordion-down{0%{height:0;opacity:0}to{height:var(--reka-accordion-content-height);opacity:1}}@keyframes eponyme-accordion-up{0%{height:var(--reka-accordion-content-height);opacity:1}to{height:0;opacity:0}}
64
+ </style>
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ modelValue?: boolean;
3
+ value: string;
4
+ disabled?: boolean;
5
+ };
6
+ declare var __VLS_22: {}, __VLS_35: {}, __VLS_43: {};
7
+ type __VLS_Slots = {} & {
8
+ header?: (props: typeof __VLS_22) => any;
9
+ } & {
10
+ action?: (props: typeof __VLS_35) => any;
11
+ } & {
12
+ default?: (props: typeof __VLS_43) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ "update:modelValue": (value: boolean) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ src?: string;
3
+ alt?: string;
4
+ fallback?: string;
5
+ size?: 'sm' | 'md' | 'lg';
6
+ };
7
+ declare const __VLS_export: 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>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,25 @@
1
+ <script setup>
2
+ import { AvatarFallback, AvatarImage, AvatarRoot } from "reka-ui";
3
+ import { initials } from "../../utils/initials";
4
+ defineProps({
5
+ src: { type: String, required: false },
6
+ alt: { type: String, required: false, default: "" },
7
+ fallback: { type: String, required: false, default: "?" },
8
+ size: { type: String, required: false, default: "md" }
9
+ });
10
+ </script>
11
+
12
+ <template>
13
+ <AvatarRoot
14
+ class="ep:inline-flex ep:shrink-0 ep:items-center ep:justify-center ep:overflow-hidden ep:rounded-full ep:bg-selected-ep ep:text-xs ep:font-semibold ep:text-text-ep"
15
+ :class="{ sm: 'ep:h-8 ep:w-8', md: 'ep:h-9 ep:w-9', lg: 'ep:h-12 ep:w-12' }[size]"
16
+ >
17
+ <AvatarImage
18
+ v-if="src"
19
+ :src="src"
20
+ :alt="alt"
21
+ class="ep:h-full ep:w-full ep:object-cover"
22
+ />
23
+ <AvatarFallback>{{ initials(fallback) }}</AvatarFallback>
24
+ </AvatarRoot>
25
+ </template>
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ src?: string;
3
+ alt?: string;
4
+ fallback?: string;
5
+ size?: 'sm' | 'md' | 'lg';
6
+ };
7
+ declare const __VLS_export: 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>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ variant?: 'neutral' | 'success' | 'warning' | 'danger';
3
+ };
4
+ declare var __VLS_1: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_1) => any;
7
+ };
8
+ 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>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,17 @@
1
+ <script setup>
2
+ defineProps({
3
+ variant: { type: String, required: false, default: "neutral" }
4
+ });
5
+ </script>
6
+
7
+ <template>
8
+ <span
9
+ class="ep:inline-flex ep:items-center ep:rounded-full ep:border ep:px-2.5 ep:py-1 ep:text-[10px] ep:font-semibold ep:tracking-widest ep:uppercase"
10
+ :class="{
11
+ neutral: 'ep:border-white/15 ep:text-muted-ep',
12
+ success: 'ep:border-success-ep/30 ep:text-success-ep',
13
+ warning: 'ep:border-warning-ep/30 ep:text-warning-ep',
14
+ danger: 'ep:border-danger-ep/30 ep:text-danger-ep'
15
+ }[variant]"
16
+ ><slot /></span>
17
+ </template>
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ variant?: 'neutral' | 'success' | 'warning' | 'danger';
3
+ };
4
+ declare var __VLS_1: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_1) => any;
7
+ };
8
+ 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>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ label?: string;
3
+ icon?: string;
4
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
5
+ size?: 'sm' | 'md' | 'icon';
6
+ type?: 'button' | 'submit' | 'reset';
7
+ loading?: boolean;
8
+ disabled?: boolean;
9
+ };
10
+ declare var __VLS_1: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_1) => any;
13
+ };
14
+ 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>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,55 @@
1
+ <script setup>
2
+ import { computed, useSlots } from "vue";
3
+ const slots = useSlots();
4
+ const props = defineProps({
5
+ label: { type: String, required: false },
6
+ icon: { type: String, required: false },
7
+ variant: { type: String, required: false, default: "secondary" },
8
+ size: { type: String, required: false },
9
+ type: { type: String, required: false, default: "button" },
10
+ loading: { type: Boolean, required: false },
11
+ disabled: { type: Boolean, required: false }
12
+ });
13
+ const resolvedSize = computed(
14
+ () => props.size ?? (props.icon && !props.label && !slots.default ? "icon" : "md")
15
+ );
16
+ const classes = computed(() => [
17
+ "ep:inline-flex ep:cursor-pointer ep:items-center ep:justify-center ep:gap-2 ep:rounded-lg ep:border ep:text-sm ep:font-medium ep:transition ep:focus-visible:outline-none ep:focus-visible:ring-2 ep:focus-visible:ring-white/30 ep:active:translate-y-px ep:disabled:cursor-not-allowed ep:disabled:opacity-50",
18
+ {
19
+ primary: "ep:border-white/80 ep:bg-white ep:text-theme-ep ep:hover:bg-text-ep",
20
+ secondary: "ep:border-border-ep ep:bg-transparent ep:text-muted-ep ep:hover:bg-selected-ep ep:hover:text-white",
21
+ ghost: "ep:border-transparent ep:bg-transparent ep:text-muted-ep ep:hover:bg-selected-ep ep:hover:text-white",
22
+ danger: "ep:border-danger-ep/30 ep:bg-danger-ep/10 ep:text-danger-ep ep:hover:bg-danger-ep/20"
23
+ }[props.variant],
24
+ {
25
+ sm: "ep:h-8 ep:px-3 ep:text-xs",
26
+ md: "ep:h-10 ep:px-5",
27
+ icon: "ep:h-8 ep:w-8 ep:p-0"
28
+ }[resolvedSize.value]
29
+ ]);
30
+ </script>
31
+
32
+ <template>
33
+ <button
34
+ :type="type"
35
+ :disabled="disabled || loading"
36
+ :aria-busy="loading || void 0"
37
+ :class="classes"
38
+ >
39
+ <span
40
+ v-if="loading"
41
+ class="ep:h-1.5 ep:w-1.5 ep:animate-pulse ep:rounded-full ep:bg-current"
42
+ aria-hidden="true"
43
+ />
44
+ <template v-if="label">
45
+ {{ label }}
46
+ </template>
47
+ <slot v-else-if="$slots.default" />
48
+ <Icon
49
+ v-else-if="icon"
50
+ :name="icon"
51
+ size="20"
52
+ aria-hidden="true"
53
+ />
54
+ </button>
55
+ </template>
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ label?: string;
3
+ icon?: string;
4
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
5
+ size?: 'sm' | 'md' | 'icon';
6
+ type?: 'button' | 'submit' | 'reset';
7
+ loading?: boolean;
8
+ disabled?: boolean;
9
+ };
10
+ declare var __VLS_1: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_1) => any;
13
+ };
14
+ 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>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ modelValue?: boolean;
3
+ disabled?: boolean;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "update:modelValue": (value: boolean) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,21 @@
1
+ <script setup>
2
+ import { CheckboxIndicator, CheckboxRoot } from "reka-ui";
3
+ defineProps({
4
+ modelValue: { type: Boolean, required: false },
5
+ disabled: { type: Boolean, required: false }
6
+ });
7
+ const emit = defineEmits(["update:modelValue"]);
8
+ </script>
9
+
10
+ <template>
11
+ <CheckboxRoot
12
+ :model-value="modelValue"
13
+ :disabled="disabled"
14
+ class="ep:flex ep:h-5 ep:w-5 ep:shrink-0 ep:cursor-pointer ep:items-center ep:justify-center ep:rounded-md ep:border ep:border-border-ep ep:bg-selected-ep ep:text-theme-ep ep:outline-none ep:transition ep:focus-visible:ring-2 ep:focus-visible:ring-white/20 ep:data-[state=checked]:border-white ep:data-[state=checked]:bg-white ep:disabled:cursor-not-allowed ep:disabled:opacity-50"
15
+ @update:model-value="emit('update:modelValue', $event === true)"
16
+ >
17
+ <CheckboxIndicator class="ep:text-xs ep:font-bold">
18
+ ✓
19
+ </CheckboxIndicator>
20
+ </CheckboxRoot>
21
+ </template>
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ modelValue?: boolean;
3
+ disabled?: boolean;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "update:modelValue": (value: boolean) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ /** Lands on the native picker, which is the focusable control the label points at. */
3
+ id?: string;
4
+ modelValue?: string;
5
+ /** Clickable palette; an empty list leaves only the custom picker. */
6
+ presets?: ReadonlyArray<{
7
+ label: string;
8
+ value: string;
9
+ }>;
10
+ disabled?: boolean;
11
+ invalid?: boolean;
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (value: string) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,63 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { normalizeHexColor, sameHexColor } from "../../utils/normalize-hex-color";
4
+ const props = defineProps({
5
+ id: { type: String, required: false },
6
+ modelValue: { type: String, required: false, default: "" },
7
+ presets: { type: Array, required: false, default: () => [] },
8
+ disabled: { type: Boolean, required: false },
9
+ invalid: { type: Boolean, required: false }
10
+ });
11
+ const emit = defineEmits(["update:modelValue"]);
12
+ const swatchClasses = "ep:h-8 ep:w-8 ep:shrink-0 ep:cursor-pointer ep:rounded-full ep:border ep:border-white/15 ep:transition ep:outline-none ep:focus-visible:ring-2 ep:focus-visible:ring-white/40 ep:disabled:cursor-not-allowed ep:disabled:opacity-50";
13
+ const pickerValue = computed(() => normalizeHexColor(props.modelValue)?.slice(0, 7) ?? "#000000");
14
+ const isPreset = computed(() => props.presets.some((preset) => sameHexColor(preset.value, props.modelValue)));
15
+ const customActive = computed(() => Boolean(props.modelValue) && !isPreset.value);
16
+ function select(value) {
17
+ if (props.disabled) return;
18
+ emit("update:modelValue", value);
19
+ }
20
+ </script>
21
+
22
+ <template>
23
+ <div class="ep:flex ep:flex-wrap ep:items-center ep:gap-2">
24
+ <button
25
+ v-for="preset in presets"
26
+ :key="preset.value"
27
+ type="button"
28
+ :class="[swatchClasses, sameHexColor(preset.value, modelValue) ? 'ep:ring-2 ep:ring-white ep:ring-offset-2 ep:ring-offset-theme-ep' : 'ep:hover:scale-110']"
29
+ :style="{ backgroundColor: preset.value }"
30
+ :disabled="disabled"
31
+ :aria-pressed="sameHexColor(preset.value, modelValue)"
32
+ :aria-label="preset.label"
33
+ :title="preset.label"
34
+ @click="select(preset.value)"
35
+ />
36
+
37
+ <span
38
+ class="ep:relative ep:inline-flex"
39
+ :class="{ 'ep:ml-1': presets.length }"
40
+ >
41
+ <span
42
+ :class="[swatchClasses, 'ep:flex ep:items-center ep:justify-center ep:bg-selected-ep ep:text-sm ep:text-muted-ep', customActive ? 'ep:ring-2 ep:ring-white ep:ring-offset-2 ep:ring-offset-theme-ep' : '']"
43
+ :style="customActive ? { backgroundColor: pickerValue } : void 0"
44
+ aria-hidden="true"
45
+ >
46
+ <template v-if="!customActive">+</template>
47
+ </span>
48
+ <input
49
+ :id="id"
50
+ type="color"
51
+ :value="pickerValue"
52
+ :disabled="disabled"
53
+ :aria-invalid="invalid || void 0"
54
+ aria-label="Custom color"
55
+ title="Custom color"
56
+ class="ep:absolute ep:inset-0 ep:h-full ep:w-full ep:cursor-pointer ep:rounded-full ep:opacity-0 ep:disabled:cursor-not-allowed"
57
+ @input="select($event.target.value)"
58
+ >
59
+ </span>
60
+
61
+ <span class="ep:ml-1 ep:text-sm ep:font-medium ep:text-muted-ep">{{ modelValue }}</span>
62
+ </div>
63
+ </template>
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ /** Lands on the native picker, which is the focusable control the label points at. */
3
+ id?: string;
4
+ modelValue?: string;
5
+ /** Clickable palette; an empty list leaves only the custom picker. */
6
+ presets?: ReadonlyArray<{
7
+ label: string;
8
+ value: string;
9
+ }>;
10
+ disabled?: boolean;
11
+ invalid?: boolean;
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (value: string) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,24 @@
1
+ type __VLS_Props = {
2
+ open?: boolean;
3
+ title: string;
4
+ description?: string;
5
+ };
6
+ declare var __VLS_16: {}, __VLS_47: {};
7
+ type __VLS_Slots = {} & {
8
+ trigger?: (props: typeof __VLS_16) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_47) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:open": (value: boolean) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
16
+ }>, {}, {}, {}, {}, 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,54 @@
1
+ <script setup>
2
+ import { DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger } from "reka-ui";
3
+ import EPButton from "./EPButton.vue";
4
+ defineProps({
5
+ open: { type: Boolean, required: false },
6
+ title: { type: String, required: true },
7
+ description: { type: String, required: false }
8
+ });
9
+ const emit = defineEmits(["update:open"]);
10
+ </script>
11
+
12
+ <template>
13
+ <DialogRoot
14
+ :open="open"
15
+ @update:open="emit('update:open', $event)"
16
+ >
17
+ <DialogTrigger
18
+ v-if="$slots.trigger"
19
+ as-child
20
+ >
21
+ <slot name="trigger" />
22
+ </DialogTrigger>
23
+ <DialogPortal>
24
+ <DialogOverlay class="eponyme-dialog-overlay ep:fixed ep:inset-0 ep:z-50 ep:bg-black/65 ep:backdrop-blur-sm" />
25
+ <DialogContent class="eponyme-dialog-content eponyme-portal ep:fixed ep:top-1/2 ep:left-1/2 ep:z-50 ep:w-[min(32rem,calc(100vw-2rem))] ep:rounded-2xl ep:border-0 ep:bg-theme-ep ep:p-6 ep:font-sans ep:text-text-ep ep:outline-none">
26
+ <DialogTitle class="ep:text-xl ep:font-semibold ep:text-white">
27
+ {{ title }}
28
+ </DialogTitle>
29
+ <DialogDescription
30
+ v-if="description"
31
+ class="ep:mt-2 ep:text-sm ep:leading-relaxed ep:text-muted-ep"
32
+ >
33
+ {{ description }}
34
+ </DialogDescription>
35
+ <div class="ep:mt-5">
36
+ <slot />
37
+ </div>
38
+ <DialogClose as-child>
39
+ <EPButton
40
+ variant="ghost"
41
+ icon="mingcute:close-line"
42
+ class="ep:absolute ep:top-4 ep:right-4"
43
+ aria-label="Close"
44
+ title="Close"
45
+ />
46
+ </DialogClose>
47
+ </DialogContent>
48
+ </DialogPortal>
49
+ </DialogRoot>
50
+ </template>
51
+
52
+ <style scoped>
53
+ .eponyme-dialog-content{transform:translate(-50%,-50%)}.eponyme-dialog-overlay[data-state=open]{animation:eponyme-dialog-overlay-in .22s ease-out}.eponyme-dialog-overlay[data-state=closed]{animation:eponyme-dialog-overlay-out .14s ease-in}.eponyme-dialog-content[data-state=open]{animation:eponyme-dialog-content-in .28s cubic-bezier(.22,1,.36,1)}.eponyme-dialog-content[data-state=closed]{animation:eponyme-dialog-content-out .15s ease-in}@keyframes eponyme-dialog-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes eponyme-dialog-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes eponyme-dialog-content-in{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes eponyme-dialog-content-out{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-48%) scale(.97)}}@media (prefers-reduced-motion:reduce){.eponyme-dialog-content,.eponyme-dialog-overlay{animation-duration:1ms!important}}
54
+ </style>
@@ -0,0 +1,24 @@
1
+ type __VLS_Props = {
2
+ open?: boolean;
3
+ title: string;
4
+ description?: string;
5
+ };
6
+ declare var __VLS_16: {}, __VLS_47: {};
7
+ type __VLS_Slots = {} & {
8
+ trigger?: (props: typeof __VLS_16) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_47) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:open": (value: boolean) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
16
+ }>, {}, {}, {}, {}, 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
+ };