@xleddyl/nuxt-cms 0.1.11 → 0.1.14

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 (404) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +6 -27
  3. package/dist/runtime/app/components/cms/Alert.d.vue.ts +18 -0
  4. package/dist/runtime/app/components/cms/Alert.vue +14 -0
  5. package/dist/runtime/app/components/cms/Alert.vue.d.ts +18 -0
  6. package/dist/runtime/app/components/cms/BlocksField.vue +23 -26
  7. package/dist/runtime/app/components/cms/Button.d.vue.ts +25 -0
  8. package/dist/runtime/app/components/cms/Button.vue +33 -0
  9. package/dist/runtime/app/components/cms/Button.vue.d.ts +25 -0
  10. package/dist/runtime/app/components/cms/ConfirmModal.d.vue.ts +1 -18
  11. package/dist/runtime/app/components/cms/ConfirmModal.vue +21 -22
  12. package/dist/runtime/app/components/cms/ConfirmModal.vue.d.ts +1 -18
  13. package/dist/runtime/app/components/cms/DropdownMenu.d.vue.ts +29 -0
  14. package/dist/runtime/app/components/cms/DropdownMenu.vue +57 -0
  15. package/dist/runtime/app/components/cms/DropdownMenu.vue.d.ts +29 -0
  16. package/dist/runtime/app/components/cms/EmptyState.vue +3 -3
  17. package/dist/runtime/app/components/cms/EntryForm.vue +9 -22
  18. package/dist/runtime/app/components/cms/FieldInput.vue +23 -15
  19. package/dist/runtime/app/components/cms/Form.d.vue.ts +35 -0
  20. package/dist/runtime/app/components/cms/Form.vue +42 -0
  21. package/dist/runtime/app/components/cms/Form.vue.d.ts +35 -0
  22. package/dist/runtime/app/components/cms/FormField.d.vue.ts +21 -0
  23. package/dist/runtime/app/components/cms/FormField.vue +22 -0
  24. package/dist/runtime/app/components/cms/FormField.vue.d.ts +21 -0
  25. package/dist/runtime/app/components/cms/Icon.d.vue.ts +6 -0
  26. package/dist/runtime/app/components/cms/Icon.vue +18 -0
  27. package/dist/runtime/app/components/cms/Icon.vue.d.ts +6 -0
  28. package/dist/runtime/app/components/cms/Input.d.vue.ts +28 -0
  29. package/dist/runtime/app/components/cms/Input.vue +43 -0
  30. package/dist/runtime/app/components/cms/Input.vue.d.ts +28 -0
  31. package/dist/runtime/app/components/cms/JsonField.vue +3 -6
  32. package/dist/runtime/app/components/cms/MediaField.vue +15 -16
  33. package/dist/runtime/app/components/cms/MediaGallery.vue +57 -54
  34. package/dist/runtime/app/components/cms/MediaUpload.vue +10 -9
  35. package/dist/runtime/app/components/cms/Modal.d.vue.ts +34 -0
  36. package/dist/runtime/app/components/cms/Modal.vue +54 -0
  37. package/dist/runtime/app/components/cms/Modal.vue.d.ts +34 -0
  38. package/dist/runtime/app/components/cms/PageHeader.vue +1 -1
  39. package/dist/runtime/app/components/cms/Pagination.d.vue.ts +15 -0
  40. package/dist/runtime/app/components/cms/Pagination.vue +51 -0
  41. package/dist/runtime/app/components/cms/Pagination.vue.d.ts +15 -0
  42. package/dist/runtime/app/components/cms/Popover.d.vue.ts +22 -0
  43. package/dist/runtime/app/components/cms/Popover.vue +27 -0
  44. package/dist/runtime/app/components/cms/Popover.vue.d.ts +22 -0
  45. package/dist/runtime/app/components/cms/RelationField.vue +6 -6
  46. package/dist/runtime/app/components/cms/RichTextField.vue +38 -39
  47. package/dist/runtime/app/components/cms/SelectMenu.d.vue.ts +26 -0
  48. package/dist/runtime/app/components/cms/SelectMenu.vue +139 -0
  49. package/dist/runtime/app/components/cms/SelectMenu.vue.d.ts +26 -0
  50. package/dist/runtime/app/components/cms/SlugField.vue +4 -4
  51. package/dist/runtime/app/components/cms/Switch.d.vue.ts +10 -0
  52. package/dist/runtime/app/components/cms/Switch.vue +14 -0
  53. package/dist/runtime/app/components/cms/Switch.vue.d.ts +10 -0
  54. package/dist/runtime/app/components/cms/Table.d.vue.ts +48 -0
  55. package/dist/runtime/app/components/cms/Table.vue +47 -0
  56. package/dist/runtime/app/components/cms/Table.vue.d.ts +48 -0
  57. package/dist/runtime/app/components/cms/Textarea.d.vue.ts +16 -0
  58. package/dist/runtime/app/components/cms/Textarea.vue +17 -0
  59. package/dist/runtime/app/components/cms/Textarea.vue.d.ts +16 -0
  60. package/dist/runtime/app/components/cms/Toaster.d.vue.ts +3 -0
  61. package/dist/runtime/app/components/cms/Toaster.vue +42 -0
  62. package/dist/runtime/app/components/cms/Toaster.vue.d.ts +3 -0
  63. package/dist/runtime/app/components/cms/TranslatableField.vue +5 -5
  64. package/dist/runtime/app/composables/cms-confirm.d.ts +8 -0
  65. package/dist/runtime/app/composables/cms-confirm.js +14 -5
  66. package/dist/runtime/app/composables/cms-toast.d.ts +13 -0
  67. package/dist/runtime/app/composables/cms-toast.js +18 -0
  68. package/dist/runtime/app/layouts/cms-admin.vue +21 -21
  69. package/dist/runtime/app/middleware/cms-auth.d.ts +1 -1
  70. package/dist/runtime/app/pages/admin-collection.vue +40 -53
  71. package/dist/runtime/app/pages/admin-entry.vue +15 -19
  72. package/dist/runtime/app/pages/admin-login.vue +16 -24
  73. package/dist/runtime/app/pages/admin-media.vue +2 -3
  74. package/dist/runtime/app/utils/ui.d.ts +4 -0
  75. package/dist/runtime/app/utils/ui.js +3 -2
  76. package/dist/runtime/assets/main.css +1 -1
  77. package/dist/runtime/assets/svg/academic-cap.svg +3 -0
  78. package/dist/runtime/assets/svg/adjustments-horizontal.svg +3 -0
  79. package/dist/runtime/assets/svg/adjustments-vertical.svg +3 -0
  80. package/dist/runtime/assets/svg/archive-box-arrow-down.svg +3 -0
  81. package/dist/runtime/assets/svg/archive-box-x-mark.svg +3 -0
  82. package/dist/runtime/assets/svg/archive-box.svg +3 -0
  83. package/dist/runtime/assets/svg/arrow-down-circle.svg +3 -0
  84. package/dist/runtime/assets/svg/arrow-down-left.svg +3 -0
  85. package/dist/runtime/assets/svg/arrow-down-on-square-stack.svg +3 -0
  86. package/dist/runtime/assets/svg/arrow-down-on-square.svg +3 -0
  87. package/dist/runtime/assets/svg/arrow-down-right.svg +3 -0
  88. package/dist/runtime/assets/svg/arrow-down-tray.svg +3 -0
  89. package/dist/runtime/assets/svg/arrow-down.svg +3 -0
  90. package/dist/runtime/assets/svg/arrow-left-circle.svg +3 -0
  91. package/dist/runtime/assets/svg/arrow-left-end-on-rectangle.svg +3 -0
  92. package/dist/runtime/assets/svg/arrow-left-on-rectangle.svg +3 -0
  93. package/dist/runtime/assets/svg/arrow-left-start-on-rectangle.svg +3 -0
  94. package/dist/runtime/assets/svg/arrow-left.svg +3 -0
  95. package/dist/runtime/assets/svg/arrow-long-down.svg +3 -0
  96. package/dist/runtime/assets/svg/arrow-long-left.svg +3 -0
  97. package/dist/runtime/assets/svg/arrow-long-right.svg +3 -0
  98. package/dist/runtime/assets/svg/arrow-long-up.svg +3 -0
  99. package/dist/runtime/assets/svg/arrow-path-rounded-square.svg +3 -0
  100. package/dist/runtime/assets/svg/arrow-path.svg +3 -0
  101. package/dist/runtime/assets/svg/arrow-right-circle.svg +3 -0
  102. package/dist/runtime/assets/svg/arrow-right-end-on-rectangle.svg +3 -0
  103. package/dist/runtime/assets/svg/arrow-right-on-rectangle.svg +3 -0
  104. package/dist/runtime/assets/svg/arrow-right-start-on-rectangle.svg +3 -0
  105. package/dist/runtime/assets/svg/arrow-right.svg +3 -0
  106. package/dist/runtime/assets/svg/arrow-small-down.svg +3 -0
  107. package/dist/runtime/assets/svg/arrow-small-left.svg +3 -0
  108. package/dist/runtime/assets/svg/arrow-small-right.svg +3 -0
  109. package/dist/runtime/assets/svg/arrow-small-up.svg +3 -0
  110. package/dist/runtime/assets/svg/arrow-top-right-on-square.svg +3 -0
  111. package/dist/runtime/assets/svg/arrow-trending-down.svg +3 -0
  112. package/dist/runtime/assets/svg/arrow-trending-up.svg +3 -0
  113. package/dist/runtime/assets/svg/arrow-turn-down-left.svg +3 -0
  114. package/dist/runtime/assets/svg/arrow-turn-down-right.svg +3 -0
  115. package/dist/runtime/assets/svg/arrow-turn-left-down.svg +3 -0
  116. package/dist/runtime/assets/svg/arrow-turn-left-up.svg +3 -0
  117. package/dist/runtime/assets/svg/arrow-turn-right-down.svg +3 -0
  118. package/dist/runtime/assets/svg/arrow-turn-right-up.svg +3 -0
  119. package/dist/runtime/assets/svg/arrow-turn-up-left.svg +3 -0
  120. package/dist/runtime/assets/svg/arrow-turn-up-right.svg +3 -0
  121. package/dist/runtime/assets/svg/arrow-up-circle.svg +3 -0
  122. package/dist/runtime/assets/svg/arrow-up-left.svg +3 -0
  123. package/dist/runtime/assets/svg/arrow-up-on-square-stack.svg +3 -0
  124. package/dist/runtime/assets/svg/arrow-up-on-square.svg +3 -0
  125. package/dist/runtime/assets/svg/arrow-up-right.svg +3 -0
  126. package/dist/runtime/assets/svg/arrow-up-tray.svg +3 -0
  127. package/dist/runtime/assets/svg/arrow-up.svg +3 -0
  128. package/dist/runtime/assets/svg/arrow-uturn-down.svg +3 -0
  129. package/dist/runtime/assets/svg/arrow-uturn-left.svg +3 -0
  130. package/dist/runtime/assets/svg/arrow-uturn-right.svg +3 -0
  131. package/dist/runtime/assets/svg/arrow-uturn-up.svg +3 -0
  132. package/dist/runtime/assets/svg/arrows-pointing-in.svg +3 -0
  133. package/dist/runtime/assets/svg/arrows-pointing-out.svg +3 -0
  134. package/dist/runtime/assets/svg/arrows-right-left.svg +3 -0
  135. package/dist/runtime/assets/svg/arrows-up-down.svg +3 -0
  136. package/dist/runtime/assets/svg/at-symbol.svg +3 -0
  137. package/dist/runtime/assets/svg/backspace.svg +3 -0
  138. package/dist/runtime/assets/svg/backward.svg +3 -0
  139. package/dist/runtime/assets/svg/banknotes.svg +3 -0
  140. package/dist/runtime/assets/svg/bars-2.svg +3 -0
  141. package/dist/runtime/assets/svg/bars-3-bottom-left.svg +3 -0
  142. package/dist/runtime/assets/svg/bars-3-bottom-right.svg +3 -0
  143. package/dist/runtime/assets/svg/bars-3-center-left.svg +3 -0
  144. package/dist/runtime/assets/svg/bars-3.svg +3 -0
  145. package/dist/runtime/assets/svg/bars-4.svg +3 -0
  146. package/dist/runtime/assets/svg/bars-arrow-down.svg +3 -0
  147. package/dist/runtime/assets/svg/bars-arrow-up.svg +3 -0
  148. package/dist/runtime/assets/svg/battery-0.svg +3 -0
  149. package/dist/runtime/assets/svg/battery-100.svg +3 -0
  150. package/dist/runtime/assets/svg/battery-50.svg +3 -0
  151. package/dist/runtime/assets/svg/beaker.svg +3 -0
  152. package/dist/runtime/assets/svg/bell-alert.svg +3 -0
  153. package/dist/runtime/assets/svg/bell-slash.svg +3 -0
  154. package/dist/runtime/assets/svg/bell-snooze.svg +3 -0
  155. package/dist/runtime/assets/svg/bell.svg +3 -0
  156. package/dist/runtime/assets/svg/bold.svg +3 -0
  157. package/dist/runtime/assets/svg/bolt-slash.svg +3 -0
  158. package/dist/runtime/assets/svg/bolt.svg +3 -0
  159. package/dist/runtime/assets/svg/book-open.svg +3 -0
  160. package/dist/runtime/assets/svg/bookmark-slash.svg +3 -0
  161. package/dist/runtime/assets/svg/bookmark-square.svg +3 -0
  162. package/dist/runtime/assets/svg/bookmark.svg +3 -0
  163. package/dist/runtime/assets/svg/briefcase.svg +3 -0
  164. package/dist/runtime/assets/svg/bug-ant.svg +3 -0
  165. package/dist/runtime/assets/svg/building-library.svg +3 -0
  166. package/dist/runtime/assets/svg/building-office-2.svg +3 -0
  167. package/dist/runtime/assets/svg/building-office.svg +3 -0
  168. package/dist/runtime/assets/svg/building-storefront.svg +3 -0
  169. package/dist/runtime/assets/svg/cake.svg +3 -0
  170. package/dist/runtime/assets/svg/calculator.svg +3 -0
  171. package/dist/runtime/assets/svg/calendar-date-range.svg +3 -0
  172. package/dist/runtime/assets/svg/calendar-days.svg +3 -0
  173. package/dist/runtime/assets/svg/calendar.svg +3 -0
  174. package/dist/runtime/assets/svg/camera.svg +4 -0
  175. package/dist/runtime/assets/svg/chart-bar-square.svg +3 -0
  176. package/dist/runtime/assets/svg/chart-bar.svg +3 -0
  177. package/dist/runtime/assets/svg/chart-pie.svg +4 -0
  178. package/dist/runtime/assets/svg/chat-bubble-bottom-center-text.svg +3 -0
  179. package/dist/runtime/assets/svg/chat-bubble-bottom-center.svg +3 -0
  180. package/dist/runtime/assets/svg/chat-bubble-left-ellipsis.svg +3 -0
  181. package/dist/runtime/assets/svg/chat-bubble-left-right.svg +3 -0
  182. package/dist/runtime/assets/svg/chat-bubble-left.svg +3 -0
  183. package/dist/runtime/assets/svg/chat-bubble-oval-left-ellipsis.svg +3 -0
  184. package/dist/runtime/assets/svg/chat-bubble-oval-left.svg +3 -0
  185. package/dist/runtime/assets/svg/check-badge.svg +3 -0
  186. package/dist/runtime/assets/svg/check-circle.svg +3 -0
  187. package/dist/runtime/assets/svg/check.svg +3 -0
  188. package/dist/runtime/assets/svg/chevron-double-down.svg +3 -0
  189. package/dist/runtime/assets/svg/chevron-double-left.svg +3 -0
  190. package/dist/runtime/assets/svg/chevron-double-right.svg +3 -0
  191. package/dist/runtime/assets/svg/chevron-double-up.svg +4 -0
  192. package/dist/runtime/assets/svg/chevron-down.svg +3 -0
  193. package/dist/runtime/assets/svg/chevron-left.svg +3 -0
  194. package/dist/runtime/assets/svg/chevron-right.svg +3 -0
  195. package/dist/runtime/assets/svg/chevron-up-down.svg +3 -0
  196. package/dist/runtime/assets/svg/chevron-up.svg +3 -0
  197. package/dist/runtime/assets/svg/circle-stack.svg +3 -0
  198. package/dist/runtime/assets/svg/clipboard-document-check.svg +3 -0
  199. package/dist/runtime/assets/svg/clipboard-document-list.svg +3 -0
  200. package/dist/runtime/assets/svg/clipboard-document.svg +3 -0
  201. package/dist/runtime/assets/svg/clipboard.svg +3 -0
  202. package/dist/runtime/assets/svg/clock.svg +3 -0
  203. package/dist/runtime/assets/svg/cloud-arrow-down.svg +3 -0
  204. package/dist/runtime/assets/svg/cloud-arrow-up.svg +3 -0
  205. package/dist/runtime/assets/svg/cloud.svg +3 -0
  206. package/dist/runtime/assets/svg/code-bracket-square.svg +3 -0
  207. package/dist/runtime/assets/svg/code-bracket.svg +3 -0
  208. package/dist/runtime/assets/svg/cog-6-tooth.svg +4 -0
  209. package/dist/runtime/assets/svg/cog-8-tooth.svg +4 -0
  210. package/dist/runtime/assets/svg/cog.svg +3 -0
  211. package/dist/runtime/assets/svg/command-line.svg +3 -0
  212. package/dist/runtime/assets/svg/computer-desktop.svg +3 -0
  213. package/dist/runtime/assets/svg/cpu-chip.svg +3 -0
  214. package/dist/runtime/assets/svg/credit-card.svg +3 -0
  215. package/dist/runtime/assets/svg/cube-transparent.svg +3 -0
  216. package/dist/runtime/assets/svg/cube.svg +3 -0
  217. package/dist/runtime/assets/svg/currency-bangladeshi.svg +3 -0
  218. package/dist/runtime/assets/svg/currency-dollar.svg +3 -0
  219. package/dist/runtime/assets/svg/currency-euro.svg +3 -0
  220. package/dist/runtime/assets/svg/currency-pound.svg +3 -0
  221. package/dist/runtime/assets/svg/currency-rupee.svg +3 -0
  222. package/dist/runtime/assets/svg/currency-yen.svg +3 -0
  223. package/dist/runtime/assets/svg/cursor-arrow-rays.svg +3 -0
  224. package/dist/runtime/assets/svg/cursor-arrow-ripple.svg +3 -0
  225. package/dist/runtime/assets/svg/device-phone-mobile.svg +3 -0
  226. package/dist/runtime/assets/svg/device-tablet.svg +3 -0
  227. package/dist/runtime/assets/svg/divide.svg +3 -0
  228. package/dist/runtime/assets/svg/document-arrow-down.svg +3 -0
  229. package/dist/runtime/assets/svg/document-arrow-up.svg +3 -0
  230. package/dist/runtime/assets/svg/document-chart-bar.svg +3 -0
  231. package/dist/runtime/assets/svg/document-check.svg +3 -0
  232. package/dist/runtime/assets/svg/document-currency-bangladeshi.svg +3 -0
  233. package/dist/runtime/assets/svg/document-currency-dollar.svg +3 -0
  234. package/dist/runtime/assets/svg/document-currency-euro.svg +3 -0
  235. package/dist/runtime/assets/svg/document-currency-pound.svg +3 -0
  236. package/dist/runtime/assets/svg/document-currency-rupee.svg +3 -0
  237. package/dist/runtime/assets/svg/document-currency-yen.svg +3 -0
  238. package/dist/runtime/assets/svg/document-duplicate.svg +3 -0
  239. package/dist/runtime/assets/svg/document-magnifying-glass.svg +3 -0
  240. package/dist/runtime/assets/svg/document-minus.svg +3 -0
  241. package/dist/runtime/assets/svg/document-plus.svg +3 -0
  242. package/dist/runtime/assets/svg/document-text.svg +3 -0
  243. package/dist/runtime/assets/svg/document.svg +3 -0
  244. package/dist/runtime/assets/svg/ellipsis-horizontal-circle.svg +3 -0
  245. package/dist/runtime/assets/svg/ellipsis-horizontal.svg +3 -0
  246. package/dist/runtime/assets/svg/ellipsis-vertical.svg +3 -0
  247. package/dist/runtime/assets/svg/envelope-open.svg +3 -0
  248. package/dist/runtime/assets/svg/envelope.svg +3 -0
  249. package/dist/runtime/assets/svg/equals.svg +3 -0
  250. package/dist/runtime/assets/svg/exclamation-circle.svg +3 -0
  251. package/dist/runtime/assets/svg/exclamation-triangle.svg +3 -0
  252. package/dist/runtime/assets/svg/eye-dropper.svg +3 -0
  253. package/dist/runtime/assets/svg/eye-slash.svg +3 -0
  254. package/dist/runtime/assets/svg/eye.svg +4 -0
  255. package/dist/runtime/assets/svg/face-frown.svg +3 -0
  256. package/dist/runtime/assets/svg/face-smile.svg +3 -0
  257. package/dist/runtime/assets/svg/film.svg +3 -0
  258. package/dist/runtime/assets/svg/finger-print.svg +3 -0
  259. package/dist/runtime/assets/svg/fire.svg +4 -0
  260. package/dist/runtime/assets/svg/flag.svg +3 -0
  261. package/dist/runtime/assets/svg/folder-arrow-down.svg +3 -0
  262. package/dist/runtime/assets/svg/folder-minus.svg +3 -0
  263. package/dist/runtime/assets/svg/folder-open.svg +3 -0
  264. package/dist/runtime/assets/svg/folder-plus.svg +3 -0
  265. package/dist/runtime/assets/svg/folder.svg +3 -0
  266. package/dist/runtime/assets/svg/forward.svg +3 -0
  267. package/dist/runtime/assets/svg/funnel.svg +3 -0
  268. package/dist/runtime/assets/svg/gif.svg +3 -0
  269. package/dist/runtime/assets/svg/gift-top.svg +3 -0
  270. package/dist/runtime/assets/svg/gift.svg +3 -0
  271. package/dist/runtime/assets/svg/globe-alt.svg +3 -0
  272. package/dist/runtime/assets/svg/globe-americas.svg +3 -0
  273. package/dist/runtime/assets/svg/globe-asia-australia.svg +3 -0
  274. package/dist/runtime/assets/svg/globe-europe-africa.svg +3 -0
  275. package/dist/runtime/assets/svg/h1.svg +3 -0
  276. package/dist/runtime/assets/svg/h2.svg +3 -0
  277. package/dist/runtime/assets/svg/h3.svg +3 -0
  278. package/dist/runtime/assets/svg/hand-raised.svg +3 -0
  279. package/dist/runtime/assets/svg/hand-thumb-down.svg +3 -0
  280. package/dist/runtime/assets/svg/hand-thumb-up.svg +3 -0
  281. package/dist/runtime/assets/svg/hashtag.svg +3 -0
  282. package/dist/runtime/assets/svg/heart.svg +3 -0
  283. package/dist/runtime/assets/svg/home-modern.svg +3 -0
  284. package/dist/runtime/assets/svg/home.svg +3 -0
  285. package/dist/runtime/assets/svg/identification.svg +3 -0
  286. package/dist/runtime/assets/svg/inbox-arrow-down.svg +3 -0
  287. package/dist/runtime/assets/svg/inbox-stack.svg +3 -0
  288. package/dist/runtime/assets/svg/inbox.svg +3 -0
  289. package/dist/runtime/assets/svg/information-circle.svg +3 -0
  290. package/dist/runtime/assets/svg/italic.svg +3 -0
  291. package/dist/runtime/assets/svg/key.svg +3 -0
  292. package/dist/runtime/assets/svg/language.svg +3 -0
  293. package/dist/runtime/assets/svg/lifebuoy.svg +3 -0
  294. package/dist/runtime/assets/svg/light-bulb.svg +3 -0
  295. package/dist/runtime/assets/svg/link-slash.svg +3 -0
  296. package/dist/runtime/assets/svg/link.svg +3 -0
  297. package/dist/runtime/assets/svg/list-bullet.svg +3 -0
  298. package/dist/runtime/assets/svg/lock-closed.svg +3 -0
  299. package/dist/runtime/assets/svg/lock-open.svg +3 -0
  300. package/dist/runtime/assets/svg/magnifying-glass-circle.svg +3 -0
  301. package/dist/runtime/assets/svg/magnifying-glass-minus.svg +3 -0
  302. package/dist/runtime/assets/svg/magnifying-glass-plus.svg +3 -0
  303. package/dist/runtime/assets/svg/magnifying-glass.svg +3 -0
  304. package/dist/runtime/assets/svg/map-pin.svg +4 -0
  305. package/dist/runtime/assets/svg/map.svg +3 -0
  306. package/dist/runtime/assets/svg/megaphone.svg +3 -0
  307. package/dist/runtime/assets/svg/microphone.svg +3 -0
  308. package/dist/runtime/assets/svg/minus-circle.svg +3 -0
  309. package/dist/runtime/assets/svg/minus-small.svg +3 -0
  310. package/dist/runtime/assets/svg/minus.svg +3 -0
  311. package/dist/runtime/assets/svg/moon.svg +3 -0
  312. package/dist/runtime/assets/svg/musical-note.svg +3 -0
  313. package/dist/runtime/assets/svg/newspaper.svg +3 -0
  314. package/dist/runtime/assets/svg/no-symbol.svg +3 -0
  315. package/dist/runtime/assets/svg/numbered-list.svg +3 -0
  316. package/dist/runtime/assets/svg/paint-brush.svg +3 -0
  317. package/dist/runtime/assets/svg/paper-airplane.svg +3 -0
  318. package/dist/runtime/assets/svg/paper-clip.svg +3 -0
  319. package/dist/runtime/assets/svg/pause-circle.svg +3 -0
  320. package/dist/runtime/assets/svg/pause.svg +3 -0
  321. package/dist/runtime/assets/svg/pencil-square.svg +3 -0
  322. package/dist/runtime/assets/svg/pencil.svg +3 -0
  323. package/dist/runtime/assets/svg/percent-badge.svg +3 -0
  324. package/dist/runtime/assets/svg/phone-arrow-down-left.svg +3 -0
  325. package/dist/runtime/assets/svg/phone-arrow-up-right.svg +3 -0
  326. package/dist/runtime/assets/svg/phone-x-mark.svg +3 -0
  327. package/dist/runtime/assets/svg/phone.svg +3 -0
  328. package/dist/runtime/assets/svg/photo.svg +3 -0
  329. package/dist/runtime/assets/svg/play-circle.svg +4 -0
  330. package/dist/runtime/assets/svg/play-pause.svg +3 -0
  331. package/dist/runtime/assets/svg/play.svg +3 -0
  332. package/dist/runtime/assets/svg/plus-circle.svg +3 -0
  333. package/dist/runtime/assets/svg/plus-small.svg +3 -0
  334. package/dist/runtime/assets/svg/plus.svg +3 -0
  335. package/dist/runtime/assets/svg/power.svg +3 -0
  336. package/dist/runtime/assets/svg/presentation-chart-bar.svg +3 -0
  337. package/dist/runtime/assets/svg/presentation-chart-line.svg +3 -0
  338. package/dist/runtime/assets/svg/printer.svg +3 -0
  339. package/dist/runtime/assets/svg/puzzle-piece.svg +3 -0
  340. package/dist/runtime/assets/svg/qr-code.svg +4 -0
  341. package/dist/runtime/assets/svg/question-mark-circle.svg +3 -0
  342. package/dist/runtime/assets/svg/queue-list.svg +3 -0
  343. package/dist/runtime/assets/svg/radio.svg +3 -0
  344. package/dist/runtime/assets/svg/receipt-percent.svg +3 -0
  345. package/dist/runtime/assets/svg/receipt-refund.svg +3 -0
  346. package/dist/runtime/assets/svg/rectangle-group.svg +3 -0
  347. package/dist/runtime/assets/svg/rectangle-stack.svg +3 -0
  348. package/dist/runtime/assets/svg/rocket-launch.svg +3 -0
  349. package/dist/runtime/assets/svg/rss.svg +3 -0
  350. package/dist/runtime/assets/svg/scale.svg +3 -0
  351. package/dist/runtime/assets/svg/scissors.svg +3 -0
  352. package/dist/runtime/assets/svg/server-stack.svg +3 -0
  353. package/dist/runtime/assets/svg/server.svg +3 -0
  354. package/dist/runtime/assets/svg/share.svg +3 -0
  355. package/dist/runtime/assets/svg/shield-check.svg +3 -0
  356. package/dist/runtime/assets/svg/shield-exclamation.svg +3 -0
  357. package/dist/runtime/assets/svg/shopping-bag.svg +3 -0
  358. package/dist/runtime/assets/svg/shopping-cart.svg +3 -0
  359. package/dist/runtime/assets/svg/signal-slash.svg +3 -0
  360. package/dist/runtime/assets/svg/signal.svg +3 -0
  361. package/dist/runtime/assets/svg/slash.svg +3 -0
  362. package/dist/runtime/assets/svg/sparkles.svg +3 -0
  363. package/dist/runtime/assets/svg/speaker-wave.svg +3 -0
  364. package/dist/runtime/assets/svg/speaker-x-mark.svg +3 -0
  365. package/dist/runtime/assets/svg/square-2-stack.svg +3 -0
  366. package/dist/runtime/assets/svg/square-3-stack-3d.svg +3 -0
  367. package/dist/runtime/assets/svg/squares-2x2.svg +3 -0
  368. package/dist/runtime/assets/svg/squares-plus.svg +3 -0
  369. package/dist/runtime/assets/svg/star.svg +3 -0
  370. package/dist/runtime/assets/svg/stop-circle.svg +4 -0
  371. package/dist/runtime/assets/svg/stop.svg +3 -0
  372. package/dist/runtime/assets/svg/strikethrough.svg +3 -0
  373. package/dist/runtime/assets/svg/sun.svg +3 -0
  374. package/dist/runtime/assets/svg/swatch.svg +3 -0
  375. package/dist/runtime/assets/svg/table-cells.svg +3 -0
  376. package/dist/runtime/assets/svg/tag.svg +4 -0
  377. package/dist/runtime/assets/svg/ticket.svg +3 -0
  378. package/dist/runtime/assets/svg/trash.svg +3 -0
  379. package/dist/runtime/assets/svg/trophy.svg +3 -0
  380. package/dist/runtime/assets/svg/truck.svg +3 -0
  381. package/dist/runtime/assets/svg/tv.svg +3 -0
  382. package/dist/runtime/assets/svg/underline.svg +3 -0
  383. package/dist/runtime/assets/svg/user-circle.svg +3 -0
  384. package/dist/runtime/assets/svg/user-group.svg +3 -0
  385. package/dist/runtime/assets/svg/user-minus.svg +3 -0
  386. package/dist/runtime/assets/svg/user-plus.svg +3 -0
  387. package/dist/runtime/assets/svg/user.svg +3 -0
  388. package/dist/runtime/assets/svg/users.svg +3 -0
  389. package/dist/runtime/assets/svg/variable.svg +3 -0
  390. package/dist/runtime/assets/svg/video-camera-slash.svg +3 -0
  391. package/dist/runtime/assets/svg/video-camera.svg +3 -0
  392. package/dist/runtime/assets/svg/view-columns.svg +3 -0
  393. package/dist/runtime/assets/svg/viewfinder-circle.svg +3 -0
  394. package/dist/runtime/assets/svg/wallet.svg +3 -0
  395. package/dist/runtime/assets/svg/wifi.svg +3 -0
  396. package/dist/runtime/assets/svg/window.svg +3 -0
  397. package/dist/runtime/assets/svg/wrench-screwdriver.svg +3 -0
  398. package/dist/runtime/assets/svg/wrench.svg +4 -0
  399. package/dist/runtime/assets/svg/x-circle.svg +3 -0
  400. package/dist/runtime/assets/svg/x-mark.svg +3 -0
  401. package/dist/runtime/shared/index.js +1 -1
  402. package/package.json +4 -3
  403. package/dist/runtime/app/i18n/en.json +0 -123
  404. package/dist/runtime/app/i18n/it.json +0 -123
@@ -1,65 +1,65 @@
1
1
  <template>
2
2
  <div class="cms-richtext">
3
3
  <div class="cms-richtext-toolbar">
4
- <UButton
4
+ <CmsButton
5
5
  v-for="action in actions"
6
6
  :key="action.icon"
7
7
  :icon="action.icon"
8
8
  size="xs"
9
9
  :variant="editor?.isActive(action.mark, action.attrs) ? 'soft' : 'ghost'"
10
10
  color="neutral"
11
- :aria-label="t(action.label)"
12
- :title="t(action.label)"
11
+ :aria-label="action.label"
12
+ :title="action.label"
13
13
  @click="action.run"
14
14
  />
15
- <UPopover v-model:open="linkOpen">
16
- <UButton
17
- icon="i-lucide-link"
15
+ <CmsPopover v-model:open="linkOpen">
16
+ <CmsButton
17
+ icon="link"
18
18
  size="xs"
19
19
  :variant="editor?.isActive('link') ? 'soft' : 'ghost'"
20
20
  color="neutral"
21
- :aria-label="t('cms.richtext.link')"
22
- :title="t('cms.richtext.link')"
21
+ aria-label="Link"
22
+ title="Link"
23
23
  />
24
24
  <template #content>
25
25
  <div class="flex items-center gap-2 p-2">
26
- <UInput
26
+ <CmsInput
27
27
  v-model="linkUrl"
28
28
  size="sm"
29
29
  placeholder="https://"
30
30
  class="w-64"
31
31
  @keydown.enter.prevent="applyLink"
32
32
  />
33
- <UButton size="xs" :label="t('cms.richtext.setLink')" @click="applyLink" />
34
- <UButton
33
+ <CmsButton size="xs" label="Apply" @click="applyLink" />
34
+ <CmsButton
35
35
  v-if="editor?.isActive('link')"
36
36
  size="xs"
37
37
  variant="subtle"
38
38
  color="error"
39
- :label="t('cms.richtext.unsetLink')"
39
+ label="Remove link"
40
40
  @click="removeLink"
41
41
  />
42
42
  </div>
43
43
  </template>
44
- </UPopover>
44
+ </CmsPopover>
45
45
  <span class="grow" />
46
- <UButton
47
- icon="i-lucide-undo-2"
46
+ <CmsButton
47
+ icon="arrow-uturn-left"
48
48
  size="xs"
49
49
  variant="ghost"
50
50
  color="neutral"
51
- :aria-label="t('cms.richtext.undo')"
52
- :title="t('cms.richtext.undo')"
51
+ aria-label="Undo"
52
+ title="Undo"
53
53
  :disabled="!editor?.can().undo()"
54
54
  @click="undo"
55
55
  />
56
- <UButton
57
- icon="i-lucide-redo-2"
56
+ <CmsButton
57
+ icon="arrow-uturn-right"
58
58
  size="xs"
59
59
  variant="ghost"
60
60
  color="neutral"
61
- :aria-label="t('cms.richtext.redo')"
62
- :title="t('cms.richtext.redo')"
61
+ aria-label="Redo"
62
+ title="Redo"
63
63
  :disabled="!editor?.can().redo()"
64
64
  @click="redo"
65
65
  />
@@ -71,9 +71,8 @@
71
71
  <script setup>
72
72
  import StarterKit from "@tiptap/starter-kit";
73
73
  import { EditorContent, useEditor } from "@tiptap/vue-3";
74
- import { ref, useI18n, watch } from "#imports";
74
+ import { ref, watch } from "#imports";
75
75
  const model = defineModel({ type: [String, null], ...{ required: true } });
76
- const { t } = useI18n();
77
76
  const editor = useEditor({
78
77
  content: model.value ?? "",
79
78
  extensions: [StarterKit.configure({ link: { openOnClick: false } })],
@@ -93,67 +92,67 @@ watch(model, (value) => {
93
92
  });
94
93
  const actions = [
95
94
  {
96
- icon: "i-lucide-bold",
95
+ icon: "bold",
97
96
  mark: "bold",
98
- label: "cms.richtext.bold",
97
+ label: "Bold",
99
98
  run: () => {
100
99
  editor.value?.chain().focus().toggleBold().run();
101
100
  }
102
101
  },
103
102
  {
104
- icon: "i-lucide-italic",
103
+ icon: "italic",
105
104
  mark: "italic",
106
- label: "cms.richtext.italic",
105
+ label: "Italic",
107
106
  run: () => {
108
107
  editor.value?.chain().focus().toggleItalic().run();
109
108
  }
110
109
  },
111
110
  {
112
- icon: "i-lucide-strikethrough",
111
+ icon: "strikethrough",
113
112
  mark: "strike",
114
- label: "cms.richtext.strike",
113
+ label: "Strikethrough",
115
114
  run: () => {
116
115
  editor.value?.chain().focus().toggleStrike().run();
117
116
  }
118
117
  },
119
118
  {
120
- icon: "i-lucide-heading-2",
119
+ icon: "h2",
121
120
  mark: "heading",
122
121
  attrs: { level: 2 },
123
- label: "cms.richtext.h2",
122
+ label: "Heading 2",
124
123
  run: () => {
125
124
  editor.value?.chain().focus().toggleHeading({ level: 2 }).run();
126
125
  }
127
126
  },
128
127
  {
129
- icon: "i-lucide-heading-3",
128
+ icon: "h3",
130
129
  mark: "heading",
131
130
  attrs: { level: 3 },
132
- label: "cms.richtext.h3",
131
+ label: "Heading 3",
133
132
  run: () => {
134
133
  editor.value?.chain().focus().toggleHeading({ level: 3 }).run();
135
134
  }
136
135
  },
137
136
  {
138
- icon: "i-lucide-list",
137
+ icon: "list-bullet",
139
138
  mark: "bulletList",
140
- label: "cms.richtext.bulletList",
139
+ label: "Bullet list",
141
140
  run: () => {
142
141
  editor.value?.chain().focus().toggleBulletList().run();
143
142
  }
144
143
  },
145
144
  {
146
- icon: "i-lucide-list-ordered",
145
+ icon: "numbered-list",
147
146
  mark: "orderedList",
148
- label: "cms.richtext.orderedList",
147
+ label: "Numbered list",
149
148
  run: () => {
150
149
  editor.value?.chain().focus().toggleOrderedList().run();
151
150
  }
152
151
  },
153
152
  {
154
- icon: "i-lucide-text-quote",
153
+ icon: "chat-bubble-bottom-center-text",
155
154
  mark: "blockquote",
156
- label: "cms.richtext.blockquote",
155
+ label: "Quote",
157
156
  run: () => {
158
157
  editor.value?.chain().focus().toggleBlockquote().run();
159
158
  }
@@ -0,0 +1,26 @@
1
+ type Item = Record<string, unknown> & {
2
+ label: string;
3
+ };
4
+ type __VLS_Props = {
5
+ items: Item[];
6
+ valueKey?: string;
7
+ multiple?: boolean;
8
+ ignoreFilter?: boolean;
9
+ loading?: boolean;
10
+ size?: string;
11
+ placeholder?: string;
12
+ };
13
+ type __VLS_ModelProps = {
14
+ modelValue?: string | string[] | null;
15
+ 'searchTerm'?: string;
16
+ };
17
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ "update:modelValue": (value: string | string[] | null | undefined) => any;
20
+ "update:searchTerm": (value: string) => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((value: string | string[] | null | undefined) => any) | undefined;
23
+ "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
@@ -0,0 +1,139 @@
1
+ <template>
2
+ <div ref="root" class="relative w-full">
3
+ <div class="cms-field cms-field-lg flex flex-wrap items-center gap-1" @click="focusInput">
4
+ <template v-if="multiple">
5
+ <span v-for="value in modelArray" :key="value" class="cms-tag">
6
+ {{ labelFor(value) }}
7
+ <button
8
+ type="button"
9
+ class="opacity-60 hover:opacity-100"
10
+ @click.stop="toggle(value)"
11
+ >
12
+ <CmsIcon name="x-mark" class="size-3" />
13
+ </button>
14
+ </span>
15
+ </template>
16
+ <input
17
+ ref="input"
18
+ class="min-w-16 flex-1 bg-transparent text-(--ui-text-highlighted) outline-none"
19
+ :value="displayValue"
20
+ :placeholder="placeholder"
21
+ @input="onInput"
22
+ @focus="onFocus"
23
+ />
24
+ <CmsIcon
25
+ v-if="loading"
26
+ name="arrow-path"
27
+ class="ml-auto size-4 shrink-0 animate-spin text-(--ui-text-dimmed)"
28
+ />
29
+ </div>
30
+ <div v-if="open" class="cms-selectmenu-panel">
31
+ <button
32
+ v-for="item in visibleItems"
33
+ :key="String(item[valueKey])"
34
+ type="button"
35
+ class="cms-menu-item"
36
+ @click="pick(item)"
37
+ >
38
+ <span class="truncate">{{ item.label }}</span>
39
+ <CmsIcon
40
+ v-if="!multiple && isSelected(item[valueKey])"
41
+ name="check"
42
+ class="cms-menu-check size-3.5"
43
+ />
44
+ </button>
45
+ <div v-if="!visibleItems.length" class="cms-menu-item pointer-events-none opacity-60">
46
+ No results
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </template>
51
+
52
+ <script setup>
53
+ import { computed, onBeforeUnmount, ref, watch } from "#imports";
54
+ const props = defineProps({
55
+ items: { type: Array, required: true },
56
+ valueKey: { type: String, required: false, default: "value" },
57
+ multiple: { type: Boolean, required: false },
58
+ ignoreFilter: { type: Boolean, required: false },
59
+ loading: { type: Boolean, required: false },
60
+ size: { type: String, required: false },
61
+ placeholder: { type: String, required: false }
62
+ });
63
+ const model = defineModel({ type: [String, Array, null] });
64
+ const search = defineModel("searchTerm", { type: String, ...{ default: "" } });
65
+ const open = ref(false);
66
+ const root = ref(null);
67
+ const input = ref(null);
68
+ const modelArray = computed(
69
+ () => props.multiple && Array.isArray(model.value) ? model.value : []
70
+ );
71
+ const selectedLabel = computed(() => {
72
+ if (props.multiple) return "";
73
+ const current = model.value;
74
+ return current == null ? "" : labelFor(current);
75
+ });
76
+ const placeholder = computed(() => {
77
+ if (props.multiple) return modelArray.value.length ? "" : props.placeholder ?? "";
78
+ return selectedLabel.value || props.placeholder || "";
79
+ });
80
+ const displayValue = computed(() => {
81
+ if (props.multiple) return search.value;
82
+ return open.value ? search.value : selectedLabel.value;
83
+ });
84
+ function onInput(event) {
85
+ search.value = event.target.value;
86
+ open.value = true;
87
+ }
88
+ function onFocus() {
89
+ if (!props.multiple) search.value = "";
90
+ open.value = true;
91
+ }
92
+ const visibleItems = computed(() => {
93
+ let list = props.items;
94
+ if (!props.ignoreFilter) {
95
+ const query = search.value.trim().toLowerCase();
96
+ if (query) list = list.filter((item) => item.label.toLowerCase().includes(query));
97
+ }
98
+ if (props.multiple) {
99
+ list = list.filter((item) => !modelArray.value.includes(item[props.valueKey]));
100
+ }
101
+ return list;
102
+ });
103
+ function labelFor(value) {
104
+ return props.items.find((item) => item[props.valueKey] === value)?.label ?? `#${value}`;
105
+ }
106
+ function isSelected(value) {
107
+ return props.multiple ? modelArray.value.includes(value) : model.value === value;
108
+ }
109
+ function focusInput() {
110
+ input.value?.focus();
111
+ }
112
+ function toggle(value) {
113
+ const next = modelArray.value.includes(value) ? modelArray.value.filter((entry) => entry !== value) : [...modelArray.value, value];
114
+ model.value = next;
115
+ }
116
+ function pick(item) {
117
+ const value = item[props.valueKey];
118
+ if (props.multiple) {
119
+ if (value != null) toggle(value);
120
+ search.value = "";
121
+ focusInput();
122
+ } else {
123
+ model.value = value;
124
+ search.value = "";
125
+ open.value = false;
126
+ }
127
+ }
128
+ function onOutside(event) {
129
+ if (root.value && !root.value.contains(event.target)) open.value = false;
130
+ }
131
+ watch(open, (value) => {
132
+ if (import.meta.server) return;
133
+ if (value) document.addEventListener("click", onOutside, true);
134
+ else document.removeEventListener("click", onOutside, true);
135
+ });
136
+ onBeforeUnmount(() => {
137
+ if (import.meta.client) document.removeEventListener("click", onOutside, true);
138
+ });
139
+ </script>
@@ -0,0 +1,26 @@
1
+ type Item = Record<string, unknown> & {
2
+ label: string;
3
+ };
4
+ type __VLS_Props = {
5
+ items: Item[];
6
+ valueKey?: string;
7
+ multiple?: boolean;
8
+ ignoreFilter?: boolean;
9
+ loading?: boolean;
10
+ size?: string;
11
+ placeholder?: string;
12
+ };
13
+ type __VLS_ModelProps = {
14
+ modelValue?: string | string[] | null;
15
+ 'searchTerm'?: string;
16
+ };
17
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ "update:modelValue": (value: string | string[] | null | undefined) => any;
20
+ "update:searchTerm": (value: string) => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((value: string | string[] | null | undefined) => any) | undefined;
23
+ "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <UInput
2
+ <CmsInput
3
3
  :model-value="model ?? ''"
4
4
  size="lg"
5
5
  class="w-full font-mono"
@@ -11,15 +11,15 @@
11
11
  "
12
12
  >
13
13
  <template v-if="source !== void 0" #trailing>
14
- <UButton
15
- icon="i-lucide-refresh-cw"
14
+ <CmsButton
15
+ icon="arrow-path"
16
16
  size="xs"
17
17
  variant="ghost"
18
18
  color="neutral"
19
19
  @click="regenerate"
20
20
  />
21
21
  </template>
22
- </UInput>
22
+ </CmsInput>
23
23
  </template>
24
24
 
25
25
  <script setup>
@@ -0,0 +1,10 @@
1
+ type __VLS_ModelProps = {
2
+ modelValue?: boolean;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:modelValue": (value: boolean | undefined) => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
7
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <button
3
+ type="button"
4
+ role="switch"
5
+ :aria-checked="model"
6
+ class="cms-switch"
7
+ :class="{ 'is-on': model }"
8
+ @click="model = !model"
9
+ />
10
+ </template>
11
+
12
+ <script setup>
13
+ const model = defineModel({ type: Boolean });
14
+ </script>
@@ -0,0 +1,10 @@
1
+ type __VLS_ModelProps = {
2
+ modelValue?: boolean;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:modelValue": (value: boolean | undefined) => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
7
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,48 @@
1
+ type Row = Record<string, unknown>;
2
+ interface Column {
3
+ id?: string;
4
+ accessorKey?: string;
5
+ accessorFn?: (row: Row) => unknown;
6
+ header?: string;
7
+ }
8
+ type __VLS_Props = {
9
+ data: Row[];
10
+ columns: Column[];
11
+ ui?: {
12
+ thead?: string;
13
+ th?: string;
14
+ td?: string;
15
+ tr?: string;
16
+ };
17
+ };
18
+ type __VLS_ModelProps = {
19
+ 'columnVisibility'?: Record<string, boolean>;
20
+ };
21
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
22
+ declare var __VLS_2: `${string}-cell`, __VLS_3: {
23
+ row: {
24
+ original: Row;
25
+ };
26
+ };
27
+ type __VLS_Slots = {} & {
28
+ [K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
29
+ };
30
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ select: (event: Event, row: {
32
+ original: Row;
33
+ }) => any;
34
+ "update:columnVisibility": (value: Record<string, boolean>) => any;
35
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
36
+ onSelect?: ((event: Event, row: {
37
+ original: Row;
38
+ }) => any) | undefined;
39
+ "onUpdate:columnVisibility"?: ((value: Record<string, boolean>) => any) | undefined;
40
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
+ declare const _default: typeof __VLS_export;
43
+ export default _default;
44
+ type __VLS_WithSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <table class="cms-table">
3
+ <thead :class="ui?.thead">
4
+ <tr>
5
+ <th v-for="column in visibleColumns" :key="columnId(column)" :class="ui?.th">
6
+ {{ column.header }}
7
+ </th>
8
+ </tr>
9
+ </thead>
10
+ <tbody>
11
+ <tr
12
+ v-for="(row, index) in data"
13
+ :key="index"
14
+ :class="ui?.tr"
15
+ @click="emit('select', $event, { original: row })"
16
+ >
17
+ <td v-for="column in visibleColumns" :key="columnId(column)" :class="ui?.td">
18
+ <slot :name="`${columnId(column)}-cell`" :row="{ original: row }">
19
+ {{ cellValue(column, row) }}
20
+ </slot>
21
+ </td>
22
+ </tr>
23
+ </tbody>
24
+ </table>
25
+ </template>
26
+
27
+ <script setup>
28
+ import { computed } from "#imports";
29
+ const props = defineProps({
30
+ data: { type: Array, required: true },
31
+ columns: { type: Array, required: true },
32
+ ui: { type: Object, required: false }
33
+ });
34
+ const visibility = defineModel("columnVisibility", { type: Object, ...{ default: () => ({}) } });
35
+ const emit = defineEmits(["select"]);
36
+ function columnId(column) {
37
+ return column.id ?? column.accessorKey ?? "";
38
+ }
39
+ const visibleColumns = computed(
40
+ () => props.columns.filter((column) => visibility.value[columnId(column)] !== false)
41
+ );
42
+ function cellValue(column, row) {
43
+ if (column.accessorFn) return column.accessorFn(row);
44
+ if (column.accessorKey) return row[column.accessorKey];
45
+ return "";
46
+ }
47
+ </script>
@@ -0,0 +1,48 @@
1
+ type Row = Record<string, unknown>;
2
+ interface Column {
3
+ id?: string;
4
+ accessorKey?: string;
5
+ accessorFn?: (row: Row) => unknown;
6
+ header?: string;
7
+ }
8
+ type __VLS_Props = {
9
+ data: Row[];
10
+ columns: Column[];
11
+ ui?: {
12
+ thead?: string;
13
+ th?: string;
14
+ td?: string;
15
+ tr?: string;
16
+ };
17
+ };
18
+ type __VLS_ModelProps = {
19
+ 'columnVisibility'?: Record<string, boolean>;
20
+ };
21
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
22
+ declare var __VLS_2: `${string}-cell`, __VLS_3: {
23
+ row: {
24
+ original: Row;
25
+ };
26
+ };
27
+ type __VLS_Slots = {} & {
28
+ [K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
29
+ };
30
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ select: (event: Event, row: {
32
+ original: Row;
33
+ }) => any;
34
+ "update:columnVisibility": (value: Record<string, boolean>) => any;
35
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
36
+ onSelect?: ((event: Event, row: {
37
+ original: Row;
38
+ }) => any) | undefined;
39
+ "onUpdate:columnVisibility"?: ((value: Record<string, boolean>) => any) | undefined;
40
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
+ declare const _default: typeof __VLS_export;
43
+ export default _default;
44
+ type __VLS_WithSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ rows?: number;
3
+ size?: 'sm' | 'md' | 'lg';
4
+ color?: 'error';
5
+ };
6
+ type __VLS_ModelProps = {
7
+ modelValue?: string | null;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (value: string | null | undefined) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
+ "onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <textarea
3
+ :rows="rows ?? 3"
4
+ :value="model ?? ''"
5
+ :class="['cms-field', `cms-field-${size ?? 'md'}`, { 'is-error': color === 'error' }]"
6
+ @input="model = $event.target.value"
7
+ />
8
+ </template>
9
+
10
+ <script setup>
11
+ defineProps({
12
+ rows: { type: Number, required: false },
13
+ size: { type: String, required: false },
14
+ color: { type: String, required: false }
15
+ });
16
+ const model = defineModel({ type: [String, null] });
17
+ </script>
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ rows?: number;
3
+ size?: 'sm' | 'md' | 'lg';
4
+ color?: 'error';
5
+ };
6
+ type __VLS_ModelProps = {
7
+ modelValue?: string | null;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (value: string | null | undefined) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
+ "onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;