@xleddyl/nuxt-cms 0.4.4 → 0.5.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 (471) hide show
  1. package/README.md +1 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +22 -7
  4. package/dist/runtime/app/components/cms/BlockOutline.vue +56 -67
  5. package/dist/runtime/app/components/cms/BlockPalette.vue +3 -1
  6. package/dist/runtime/app/components/cms/BlocksField.vue +155 -149
  7. package/dist/runtime/app/components/cms/BrandMark.d.vue.ts +3 -1
  8. package/dist/runtime/app/components/cms/BrandMark.vue +24 -25
  9. package/dist/runtime/app/components/cms/BrandMark.vue.d.ts +3 -1
  10. package/dist/runtime/app/components/cms/{Checkbox.d.vue.ts → ConfirmGroups.d.vue.ts} +4 -4
  11. package/dist/runtime/app/components/cms/ConfirmGroups.vue +22 -0
  12. package/dist/runtime/app/components/cms/{Checkbox.vue.d.ts → ConfirmGroups.vue.d.ts} +4 -4
  13. package/dist/runtime/app/components/cms/EntryDrawer.d.vue.ts +2 -2
  14. package/dist/runtime/app/components/cms/EntryDrawer.vue +62 -47
  15. package/dist/runtime/app/components/cms/EntryDrawer.vue.d.ts +2 -2
  16. package/dist/runtime/app/components/cms/EntryForm.vue +100 -95
  17. package/dist/runtime/app/components/cms/FieldInput.vue +56 -32
  18. package/dist/runtime/app/components/cms/ImportModal.d.vue.ts +2 -2
  19. package/dist/runtime/app/components/cms/ImportModal.vue +80 -79
  20. package/dist/runtime/app/components/cms/ImportModal.vue.d.ts +2 -2
  21. package/dist/runtime/app/components/cms/JsonField.vue +17 -8
  22. package/dist/runtime/app/components/cms/ListFilters.vue +54 -63
  23. package/dist/runtime/app/components/cms/LocaleSwitch.vue +21 -18
  24. package/dist/runtime/app/components/cms/MediaDetail.vue +110 -72
  25. package/dist/runtime/app/components/cms/MediaField.vue +37 -29
  26. package/dist/runtime/app/components/cms/MediaFolderPicker.d.vue.ts +1 -0
  27. package/dist/runtime/app/components/cms/MediaFolderPicker.vue +77 -49
  28. package/dist/runtime/app/components/cms/MediaFolderPicker.vue.d.ts +1 -0
  29. package/dist/runtime/app/components/cms/MediaGallery.vue +300 -323
  30. package/dist/runtime/app/components/cms/MediaThumb.vue +7 -2
  31. package/dist/runtime/app/components/cms/MediaUpload.vue +37 -70
  32. package/dist/runtime/app/components/cms/RelationField.vue +23 -71
  33. package/dist/runtime/app/components/cms/RichTextField.vue +23 -177
  34. package/dist/runtime/app/components/cms/SettingsAccount.vue +96 -104
  35. package/dist/runtime/app/components/cms/SettingsColumns.vue +7 -6
  36. package/dist/runtime/app/components/cms/SettingsEntry.d.vue.ts +10 -1
  37. package/dist/runtime/app/components/cms/SettingsEntry.vue +35 -52
  38. package/dist/runtime/app/components/cms/SettingsEntry.vue.d.ts +10 -1
  39. package/dist/runtime/app/components/cms/SettingsLayout.vue +7 -4
  40. package/dist/runtime/app/components/cms/SettingsModal.d.vue.ts +0 -4
  41. package/dist/runtime/app/components/cms/SettingsModal.vue +102 -151
  42. package/dist/runtime/app/components/cms/SettingsModal.vue.d.ts +0 -4
  43. package/dist/runtime/app/components/cms/SettingsUsers.d.vue.ts +8 -1
  44. package/dist/runtime/app/components/cms/SettingsUsers.vue +182 -189
  45. package/dist/runtime/app/components/cms/SettingsUsers.vue.d.ts +8 -1
  46. package/dist/runtime/app/components/cms/SlugField.vue +9 -6
  47. package/dist/runtime/app/components/cms/StatusBadge.vue +7 -6
  48. package/dist/runtime/app/components/cms/TranslatableField.vue +11 -6
  49. package/dist/runtime/app/components/cms/VisualEditor.vue +243 -282
  50. package/dist/runtime/app/components/cms/WelcomeModal.vue +49 -41
  51. package/dist/runtime/app/composables/cms-confirm.d.ts +0 -6
  52. package/dist/runtime/app/composables/cms-confirm.js +13 -13
  53. package/dist/runtime/app/composables/cms-media-uploader.d.ts +4 -0
  54. package/dist/runtime/app/composables/cms-media-uploader.js +12 -40
  55. package/dist/runtime/app/composables/cms-theme.d.ts +3 -9
  56. package/dist/runtime/app/composables/cms-theme.js +1 -19
  57. package/dist/runtime/app/composables/cms-toast.d.ts +3 -4
  58. package/dist/runtime/app/composables/cms-toast.js +6 -13
  59. package/dist/runtime/app/layouts/cms-admin.d.vue.ts +2 -2
  60. package/dist/runtime/app/layouts/cms-admin.vue +184 -113
  61. package/dist/runtime/app/layouts/cms-admin.vue.d.ts +2 -2
  62. package/dist/runtime/app/layouts/cms-editor.d.vue.ts +2 -2
  63. package/dist/runtime/app/layouts/cms-editor.vue +9 -4
  64. package/dist/runtime/app/layouts/cms-editor.vue.d.ts +2 -2
  65. package/dist/runtime/app/pages/admin-collection.vue +178 -143
  66. package/dist/runtime/app/pages/admin-content.vue +35 -30
  67. package/dist/runtime/app/pages/admin-entry.vue +14 -9
  68. package/dist/runtime/app/pages/admin-login.vue +57 -54
  69. package/dist/runtime/app/pages/admin-media.vue +6 -4
  70. package/dist/runtime/app/pages/admin-preview.vue +3 -2
  71. package/dist/runtime/app/preview/PreviewOverlay.vue +9 -7
  72. package/dist/runtime/app/utils/ui.d.ts +1 -3
  73. package/dist/runtime/app/utils/ui.js +4 -2
  74. package/dist/runtime/assets/editor.css +1 -0
  75. package/dist/runtime/assets/main.css +1 -1
  76. package/dist/runtime/assets/media.css +1 -0
  77. package/dist/runtime/assets/shell.css +1 -0
  78. package/package.json +9 -8
  79. package/dist/runtime/app/components/cms/Alert.d.vue.ts +0 -17
  80. package/dist/runtime/app/components/cms/Alert.vue +0 -13
  81. package/dist/runtime/app/components/cms/Alert.vue.d.ts +0 -17
  82. package/dist/runtime/app/components/cms/Button.d.vue.ts +0 -26
  83. package/dist/runtime/app/components/cms/Button.vue +0 -48
  84. package/dist/runtime/app/components/cms/Button.vue.d.ts +0 -26
  85. package/dist/runtime/app/components/cms/Checkbox.vue +0 -21
  86. package/dist/runtime/app/components/cms/ConfirmModal.d.vue.ts +0 -3
  87. package/dist/runtime/app/components/cms/ConfirmModal.vue +0 -46
  88. package/dist/runtime/app/components/cms/ConfirmModal.vue.d.ts +0 -3
  89. package/dist/runtime/app/components/cms/Drawer.d.vue.ts +0 -30
  90. package/dist/runtime/app/components/cms/Drawer.vue +0 -61
  91. package/dist/runtime/app/components/cms/Drawer.vue.d.ts +0 -30
  92. package/dist/runtime/app/components/cms/DropdownMenu.d.vue.ts +0 -26
  93. package/dist/runtime/app/components/cms/DropdownMenu.vue +0 -48
  94. package/dist/runtime/app/components/cms/DropdownMenu.vue.d.ts +0 -26
  95. package/dist/runtime/app/components/cms/EmptyState.d.vue.ts +0 -19
  96. package/dist/runtime/app/components/cms/EmptyState.vue +0 -21
  97. package/dist/runtime/app/components/cms/EmptyState.vue.d.ts +0 -19
  98. package/dist/runtime/app/components/cms/Form.d.vue.ts +0 -37
  99. package/dist/runtime/app/components/cms/Form.vue +0 -63
  100. package/dist/runtime/app/components/cms/Form.vue.d.ts +0 -37
  101. package/dist/runtime/app/components/cms/FormField.d.vue.ts +0 -22
  102. package/dist/runtime/app/components/cms/FormField.vue +0 -35
  103. package/dist/runtime/app/components/cms/FormField.vue.d.ts +0 -22
  104. package/dist/runtime/app/components/cms/Icon.d.vue.ts +0 -6
  105. package/dist/runtime/app/components/cms/Icon.vue +0 -23
  106. package/dist/runtime/app/components/cms/Icon.vue.d.ts +0 -6
  107. package/dist/runtime/app/components/cms/Input.d.vue.ts +0 -27
  108. package/dist/runtime/app/components/cms/Input.vue +0 -46
  109. package/dist/runtime/app/components/cms/Input.vue.d.ts +0 -27
  110. package/dist/runtime/app/components/cms/Modal.d.vue.ts +0 -31
  111. package/dist/runtime/app/components/cms/Modal.vue +0 -49
  112. package/dist/runtime/app/components/cms/Modal.vue.d.ts +0 -31
  113. package/dist/runtime/app/components/cms/PageHeader.d.vue.ts +0 -25
  114. package/dist/runtime/app/components/cms/PageHeader.vue +0 -36
  115. package/dist/runtime/app/components/cms/PageHeader.vue.d.ts +0 -25
  116. package/dist/runtime/app/components/cms/Pagination.d.vue.ts +0 -15
  117. package/dist/runtime/app/components/cms/Pagination.vue +0 -51
  118. package/dist/runtime/app/components/cms/Pagination.vue.d.ts +0 -15
  119. package/dist/runtime/app/components/cms/PasswordInput.d.vue.ts +0 -17
  120. package/dist/runtime/app/components/cms/PasswordInput.vue +0 -81
  121. package/dist/runtime/app/components/cms/PasswordInput.vue.d.ts +0 -17
  122. package/dist/runtime/app/components/cms/Popover.d.vue.ts +0 -22
  123. package/dist/runtime/app/components/cms/Popover.vue +0 -27
  124. package/dist/runtime/app/components/cms/Popover.vue.d.ts +0 -22
  125. package/dist/runtime/app/components/cms/Search.d.vue.ts +0 -7
  126. package/dist/runtime/app/components/cms/Search.vue +0 -347
  127. package/dist/runtime/app/components/cms/Search.vue.d.ts +0 -7
  128. package/dist/runtime/app/components/cms/SelectMenu.d.vue.ts +0 -25
  129. package/dist/runtime/app/components/cms/SelectMenu.vue +0 -152
  130. package/dist/runtime/app/components/cms/SelectMenu.vue.d.ts +0 -25
  131. package/dist/runtime/app/components/cms/Spinner.d.vue.ts +0 -3
  132. package/dist/runtime/app/components/cms/Spinner.vue +0 -5
  133. package/dist/runtime/app/components/cms/Spinner.vue.d.ts +0 -3
  134. package/dist/runtime/app/components/cms/Switch.d.vue.ts +0 -10
  135. package/dist/runtime/app/components/cms/Switch.vue +0 -14
  136. package/dist/runtime/app/components/cms/Switch.vue.d.ts +0 -10
  137. package/dist/runtime/app/components/cms/Table.d.vue.ts +0 -51
  138. package/dist/runtime/app/components/cms/Table.vue +0 -115
  139. package/dist/runtime/app/components/cms/Table.vue.d.ts +0 -51
  140. package/dist/runtime/app/components/cms/Textarea.d.vue.ts +0 -15
  141. package/dist/runtime/app/components/cms/Textarea.vue +0 -16
  142. package/dist/runtime/app/components/cms/Textarea.vue.d.ts +0 -15
  143. package/dist/runtime/app/components/cms/Toaster.d.vue.ts +0 -3
  144. package/dist/runtime/app/components/cms/Toaster.vue +0 -48
  145. package/dist/runtime/app/components/cms/Toaster.vue.d.ts +0 -3
  146. package/dist/runtime/app/composables/cms-overlay.d.ts +0 -4
  147. package/dist/runtime/app/composables/cms-overlay.js +0 -23
  148. package/dist/runtime/assets/svg/academic-cap.svg +0 -3
  149. package/dist/runtime/assets/svg/adjustments-horizontal.svg +0 -3
  150. package/dist/runtime/assets/svg/adjustments-vertical.svg +0 -3
  151. package/dist/runtime/assets/svg/archive-box-arrow-down.svg +0 -3
  152. package/dist/runtime/assets/svg/archive-box-x-mark.svg +0 -3
  153. package/dist/runtime/assets/svg/archive-box.svg +0 -3
  154. package/dist/runtime/assets/svg/arrow-down-circle.svg +0 -3
  155. package/dist/runtime/assets/svg/arrow-down-left.svg +0 -3
  156. package/dist/runtime/assets/svg/arrow-down-on-square-stack.svg +0 -3
  157. package/dist/runtime/assets/svg/arrow-down-on-square.svg +0 -3
  158. package/dist/runtime/assets/svg/arrow-down-right.svg +0 -3
  159. package/dist/runtime/assets/svg/arrow-down-tray.svg +0 -3
  160. package/dist/runtime/assets/svg/arrow-down.svg +0 -3
  161. package/dist/runtime/assets/svg/arrow-left-circle.svg +0 -3
  162. package/dist/runtime/assets/svg/arrow-left-end-on-rectangle.svg +0 -3
  163. package/dist/runtime/assets/svg/arrow-left-on-rectangle.svg +0 -3
  164. package/dist/runtime/assets/svg/arrow-left-start-on-rectangle.svg +0 -3
  165. package/dist/runtime/assets/svg/arrow-left.svg +0 -3
  166. package/dist/runtime/assets/svg/arrow-long-down.svg +0 -3
  167. package/dist/runtime/assets/svg/arrow-long-left.svg +0 -3
  168. package/dist/runtime/assets/svg/arrow-long-right.svg +0 -3
  169. package/dist/runtime/assets/svg/arrow-long-up.svg +0 -3
  170. package/dist/runtime/assets/svg/arrow-path-rounded-square.svg +0 -3
  171. package/dist/runtime/assets/svg/arrow-path.svg +0 -3
  172. package/dist/runtime/assets/svg/arrow-right-circle.svg +0 -3
  173. package/dist/runtime/assets/svg/arrow-right-end-on-rectangle.svg +0 -3
  174. package/dist/runtime/assets/svg/arrow-right-on-rectangle.svg +0 -3
  175. package/dist/runtime/assets/svg/arrow-right-start-on-rectangle.svg +0 -3
  176. package/dist/runtime/assets/svg/arrow-right.svg +0 -3
  177. package/dist/runtime/assets/svg/arrow-small-down.svg +0 -3
  178. package/dist/runtime/assets/svg/arrow-small-left.svg +0 -3
  179. package/dist/runtime/assets/svg/arrow-small-right.svg +0 -3
  180. package/dist/runtime/assets/svg/arrow-small-up.svg +0 -3
  181. package/dist/runtime/assets/svg/arrow-top-right-on-square.svg +0 -3
  182. package/dist/runtime/assets/svg/arrow-trending-down.svg +0 -3
  183. package/dist/runtime/assets/svg/arrow-trending-up.svg +0 -3
  184. package/dist/runtime/assets/svg/arrow-turn-down-left.svg +0 -3
  185. package/dist/runtime/assets/svg/arrow-turn-down-right.svg +0 -3
  186. package/dist/runtime/assets/svg/arrow-turn-left-down.svg +0 -3
  187. package/dist/runtime/assets/svg/arrow-turn-left-up.svg +0 -3
  188. package/dist/runtime/assets/svg/arrow-turn-right-down.svg +0 -3
  189. package/dist/runtime/assets/svg/arrow-turn-right-up.svg +0 -3
  190. package/dist/runtime/assets/svg/arrow-turn-up-left.svg +0 -3
  191. package/dist/runtime/assets/svg/arrow-turn-up-right.svg +0 -3
  192. package/dist/runtime/assets/svg/arrow-up-circle.svg +0 -3
  193. package/dist/runtime/assets/svg/arrow-up-left.svg +0 -3
  194. package/dist/runtime/assets/svg/arrow-up-on-square-stack.svg +0 -3
  195. package/dist/runtime/assets/svg/arrow-up-on-square.svg +0 -3
  196. package/dist/runtime/assets/svg/arrow-up-right.svg +0 -3
  197. package/dist/runtime/assets/svg/arrow-up-tray.svg +0 -3
  198. package/dist/runtime/assets/svg/arrow-up.svg +0 -3
  199. package/dist/runtime/assets/svg/arrow-uturn-down.svg +0 -3
  200. package/dist/runtime/assets/svg/arrow-uturn-left.svg +0 -3
  201. package/dist/runtime/assets/svg/arrow-uturn-right.svg +0 -3
  202. package/dist/runtime/assets/svg/arrow-uturn-up.svg +0 -3
  203. package/dist/runtime/assets/svg/arrows-pointing-in.svg +0 -3
  204. package/dist/runtime/assets/svg/arrows-pointing-out.svg +0 -3
  205. package/dist/runtime/assets/svg/arrows-right-left.svg +0 -3
  206. package/dist/runtime/assets/svg/arrows-up-down.svg +0 -3
  207. package/dist/runtime/assets/svg/at-symbol.svg +0 -3
  208. package/dist/runtime/assets/svg/backspace.svg +0 -3
  209. package/dist/runtime/assets/svg/backward.svg +0 -3
  210. package/dist/runtime/assets/svg/banknotes.svg +0 -3
  211. package/dist/runtime/assets/svg/bars-2.svg +0 -3
  212. package/dist/runtime/assets/svg/bars-3-bottom-left.svg +0 -3
  213. package/dist/runtime/assets/svg/bars-3-bottom-right.svg +0 -3
  214. package/dist/runtime/assets/svg/bars-3-center-left.svg +0 -3
  215. package/dist/runtime/assets/svg/bars-3.svg +0 -3
  216. package/dist/runtime/assets/svg/bars-4.svg +0 -3
  217. package/dist/runtime/assets/svg/bars-arrow-down.svg +0 -3
  218. package/dist/runtime/assets/svg/bars-arrow-up.svg +0 -3
  219. package/dist/runtime/assets/svg/battery-0.svg +0 -3
  220. package/dist/runtime/assets/svg/battery-100.svg +0 -3
  221. package/dist/runtime/assets/svg/battery-50.svg +0 -3
  222. package/dist/runtime/assets/svg/beaker.svg +0 -3
  223. package/dist/runtime/assets/svg/bell-alert.svg +0 -3
  224. package/dist/runtime/assets/svg/bell-slash.svg +0 -3
  225. package/dist/runtime/assets/svg/bell-snooze.svg +0 -3
  226. package/dist/runtime/assets/svg/bell.svg +0 -3
  227. package/dist/runtime/assets/svg/bold.svg +0 -3
  228. package/dist/runtime/assets/svg/bolt-slash.svg +0 -3
  229. package/dist/runtime/assets/svg/bolt.svg +0 -3
  230. package/dist/runtime/assets/svg/book-open.svg +0 -3
  231. package/dist/runtime/assets/svg/bookmark-slash.svg +0 -3
  232. package/dist/runtime/assets/svg/bookmark-square.svg +0 -3
  233. package/dist/runtime/assets/svg/bookmark.svg +0 -3
  234. package/dist/runtime/assets/svg/briefcase.svg +0 -3
  235. package/dist/runtime/assets/svg/bug-ant.svg +0 -3
  236. package/dist/runtime/assets/svg/building-library.svg +0 -3
  237. package/dist/runtime/assets/svg/building-office-2.svg +0 -3
  238. package/dist/runtime/assets/svg/building-office.svg +0 -3
  239. package/dist/runtime/assets/svg/building-storefront.svg +0 -3
  240. package/dist/runtime/assets/svg/cake.svg +0 -3
  241. package/dist/runtime/assets/svg/calculator.svg +0 -3
  242. package/dist/runtime/assets/svg/calendar-date-range.svg +0 -3
  243. package/dist/runtime/assets/svg/calendar-days.svg +0 -3
  244. package/dist/runtime/assets/svg/calendar.svg +0 -3
  245. package/dist/runtime/assets/svg/camera.svg +0 -4
  246. package/dist/runtime/assets/svg/chart-bar-square.svg +0 -3
  247. package/dist/runtime/assets/svg/chart-bar.svg +0 -3
  248. package/dist/runtime/assets/svg/chart-pie.svg +0 -4
  249. package/dist/runtime/assets/svg/chat-bubble-bottom-center-text.svg +0 -3
  250. package/dist/runtime/assets/svg/chat-bubble-bottom-center.svg +0 -3
  251. package/dist/runtime/assets/svg/chat-bubble-left-ellipsis.svg +0 -3
  252. package/dist/runtime/assets/svg/chat-bubble-left-right.svg +0 -3
  253. package/dist/runtime/assets/svg/chat-bubble-left.svg +0 -3
  254. package/dist/runtime/assets/svg/chat-bubble-oval-left-ellipsis.svg +0 -3
  255. package/dist/runtime/assets/svg/chat-bubble-oval-left.svg +0 -3
  256. package/dist/runtime/assets/svg/check-badge.svg +0 -3
  257. package/dist/runtime/assets/svg/check-circle.svg +0 -3
  258. package/dist/runtime/assets/svg/check.svg +0 -3
  259. package/dist/runtime/assets/svg/chevron-double-down.svg +0 -3
  260. package/dist/runtime/assets/svg/chevron-double-left.svg +0 -3
  261. package/dist/runtime/assets/svg/chevron-double-right.svg +0 -3
  262. package/dist/runtime/assets/svg/chevron-double-up.svg +0 -4
  263. package/dist/runtime/assets/svg/chevron-down.svg +0 -3
  264. package/dist/runtime/assets/svg/chevron-left.svg +0 -3
  265. package/dist/runtime/assets/svg/chevron-right.svg +0 -3
  266. package/dist/runtime/assets/svg/chevron-up-down.svg +0 -3
  267. package/dist/runtime/assets/svg/chevron-up.svg +0 -3
  268. package/dist/runtime/assets/svg/circle-stack.svg +0 -3
  269. package/dist/runtime/assets/svg/clipboard-document-check.svg +0 -3
  270. package/dist/runtime/assets/svg/clipboard-document-list.svg +0 -3
  271. package/dist/runtime/assets/svg/clipboard-document.svg +0 -3
  272. package/dist/runtime/assets/svg/clipboard.svg +0 -3
  273. package/dist/runtime/assets/svg/clock.svg +0 -3
  274. package/dist/runtime/assets/svg/cloud-arrow-down.svg +0 -3
  275. package/dist/runtime/assets/svg/cloud-arrow-up.svg +0 -3
  276. package/dist/runtime/assets/svg/cloud.svg +0 -3
  277. package/dist/runtime/assets/svg/code-bracket-square.svg +0 -3
  278. package/dist/runtime/assets/svg/code-bracket.svg +0 -3
  279. package/dist/runtime/assets/svg/cog-6-tooth.svg +0 -4
  280. package/dist/runtime/assets/svg/cog-8-tooth.svg +0 -4
  281. package/dist/runtime/assets/svg/cog.svg +0 -3
  282. package/dist/runtime/assets/svg/command-line.svg +0 -3
  283. package/dist/runtime/assets/svg/computer-desktop.svg +0 -3
  284. package/dist/runtime/assets/svg/cpu-chip.svg +0 -3
  285. package/dist/runtime/assets/svg/credit-card.svg +0 -3
  286. package/dist/runtime/assets/svg/cube-transparent.svg +0 -3
  287. package/dist/runtime/assets/svg/cube.svg +0 -3
  288. package/dist/runtime/assets/svg/currency-bangladeshi.svg +0 -3
  289. package/dist/runtime/assets/svg/currency-dollar.svg +0 -3
  290. package/dist/runtime/assets/svg/currency-euro.svg +0 -3
  291. package/dist/runtime/assets/svg/currency-pound.svg +0 -3
  292. package/dist/runtime/assets/svg/currency-rupee.svg +0 -3
  293. package/dist/runtime/assets/svg/currency-yen.svg +0 -3
  294. package/dist/runtime/assets/svg/cursor-arrow-rays.svg +0 -3
  295. package/dist/runtime/assets/svg/cursor-arrow-ripple.svg +0 -3
  296. package/dist/runtime/assets/svg/device-phone-mobile.svg +0 -3
  297. package/dist/runtime/assets/svg/device-tablet.svg +0 -3
  298. package/dist/runtime/assets/svg/divide.svg +0 -3
  299. package/dist/runtime/assets/svg/document-arrow-down.svg +0 -3
  300. package/dist/runtime/assets/svg/document-arrow-up.svg +0 -3
  301. package/dist/runtime/assets/svg/document-chart-bar.svg +0 -3
  302. package/dist/runtime/assets/svg/document-check.svg +0 -3
  303. package/dist/runtime/assets/svg/document-currency-bangladeshi.svg +0 -3
  304. package/dist/runtime/assets/svg/document-currency-dollar.svg +0 -3
  305. package/dist/runtime/assets/svg/document-currency-euro.svg +0 -3
  306. package/dist/runtime/assets/svg/document-currency-pound.svg +0 -3
  307. package/dist/runtime/assets/svg/document-currency-rupee.svg +0 -3
  308. package/dist/runtime/assets/svg/document-currency-yen.svg +0 -3
  309. package/dist/runtime/assets/svg/document-duplicate.svg +0 -3
  310. package/dist/runtime/assets/svg/document-magnifying-glass.svg +0 -3
  311. package/dist/runtime/assets/svg/document-minus.svg +0 -3
  312. package/dist/runtime/assets/svg/document-plus.svg +0 -3
  313. package/dist/runtime/assets/svg/document-text.svg +0 -3
  314. package/dist/runtime/assets/svg/document.svg +0 -3
  315. package/dist/runtime/assets/svg/ellipsis-horizontal-circle.svg +0 -3
  316. package/dist/runtime/assets/svg/ellipsis-horizontal.svg +0 -3
  317. package/dist/runtime/assets/svg/ellipsis-vertical.svg +0 -3
  318. package/dist/runtime/assets/svg/envelope-open.svg +0 -3
  319. package/dist/runtime/assets/svg/envelope.svg +0 -3
  320. package/dist/runtime/assets/svg/equals.svg +0 -3
  321. package/dist/runtime/assets/svg/exclamation-circle.svg +0 -3
  322. package/dist/runtime/assets/svg/exclamation-triangle.svg +0 -3
  323. package/dist/runtime/assets/svg/eye-dropper.svg +0 -3
  324. package/dist/runtime/assets/svg/eye-slash.svg +0 -3
  325. package/dist/runtime/assets/svg/eye.svg +0 -4
  326. package/dist/runtime/assets/svg/face-frown.svg +0 -3
  327. package/dist/runtime/assets/svg/face-smile.svg +0 -3
  328. package/dist/runtime/assets/svg/film.svg +0 -3
  329. package/dist/runtime/assets/svg/finger-print.svg +0 -3
  330. package/dist/runtime/assets/svg/fire.svg +0 -4
  331. package/dist/runtime/assets/svg/flag.svg +0 -3
  332. package/dist/runtime/assets/svg/folder-arrow-down.svg +0 -3
  333. package/dist/runtime/assets/svg/folder-minus.svg +0 -3
  334. package/dist/runtime/assets/svg/folder-open.svg +0 -3
  335. package/dist/runtime/assets/svg/folder-plus.svg +0 -3
  336. package/dist/runtime/assets/svg/folder.svg +0 -3
  337. package/dist/runtime/assets/svg/forward.svg +0 -3
  338. package/dist/runtime/assets/svg/funnel.svg +0 -3
  339. package/dist/runtime/assets/svg/gif.svg +0 -3
  340. package/dist/runtime/assets/svg/gift-top.svg +0 -3
  341. package/dist/runtime/assets/svg/gift.svg +0 -3
  342. package/dist/runtime/assets/svg/globe-alt.svg +0 -3
  343. package/dist/runtime/assets/svg/globe-americas.svg +0 -3
  344. package/dist/runtime/assets/svg/globe-asia-australia.svg +0 -3
  345. package/dist/runtime/assets/svg/globe-europe-africa.svg +0 -3
  346. package/dist/runtime/assets/svg/h1.svg +0 -3
  347. package/dist/runtime/assets/svg/h2.svg +0 -3
  348. package/dist/runtime/assets/svg/h3.svg +0 -3
  349. package/dist/runtime/assets/svg/hand-raised.svg +0 -3
  350. package/dist/runtime/assets/svg/hand-thumb-down.svg +0 -3
  351. package/dist/runtime/assets/svg/hand-thumb-up.svg +0 -3
  352. package/dist/runtime/assets/svg/hashtag.svg +0 -3
  353. package/dist/runtime/assets/svg/heart.svg +0 -3
  354. package/dist/runtime/assets/svg/home-modern.svg +0 -3
  355. package/dist/runtime/assets/svg/home.svg +0 -3
  356. package/dist/runtime/assets/svg/identification.svg +0 -3
  357. package/dist/runtime/assets/svg/inbox-arrow-down.svg +0 -3
  358. package/dist/runtime/assets/svg/inbox-stack.svg +0 -3
  359. package/dist/runtime/assets/svg/inbox.svg +0 -3
  360. package/dist/runtime/assets/svg/information-circle.svg +0 -3
  361. package/dist/runtime/assets/svg/italic.svg +0 -3
  362. package/dist/runtime/assets/svg/key.svg +0 -3
  363. package/dist/runtime/assets/svg/language.svg +0 -3
  364. package/dist/runtime/assets/svg/lifebuoy.svg +0 -3
  365. package/dist/runtime/assets/svg/light-bulb.svg +0 -3
  366. package/dist/runtime/assets/svg/link-slash.svg +0 -3
  367. package/dist/runtime/assets/svg/link.svg +0 -3
  368. package/dist/runtime/assets/svg/list-bullet.svg +0 -3
  369. package/dist/runtime/assets/svg/lock-closed.svg +0 -3
  370. package/dist/runtime/assets/svg/lock-open.svg +0 -3
  371. package/dist/runtime/assets/svg/magnifying-glass-circle.svg +0 -3
  372. package/dist/runtime/assets/svg/magnifying-glass-minus.svg +0 -3
  373. package/dist/runtime/assets/svg/magnifying-glass-plus.svg +0 -3
  374. package/dist/runtime/assets/svg/magnifying-glass.svg +0 -3
  375. package/dist/runtime/assets/svg/map-pin.svg +0 -4
  376. package/dist/runtime/assets/svg/map.svg +0 -3
  377. package/dist/runtime/assets/svg/megaphone.svg +0 -3
  378. package/dist/runtime/assets/svg/microphone.svg +0 -3
  379. package/dist/runtime/assets/svg/minus-circle.svg +0 -3
  380. package/dist/runtime/assets/svg/minus-small.svg +0 -3
  381. package/dist/runtime/assets/svg/minus.svg +0 -3
  382. package/dist/runtime/assets/svg/moon.svg +0 -3
  383. package/dist/runtime/assets/svg/musical-note.svg +0 -3
  384. package/dist/runtime/assets/svg/newspaper.svg +0 -3
  385. package/dist/runtime/assets/svg/no-symbol.svg +0 -3
  386. package/dist/runtime/assets/svg/numbered-list.svg +0 -3
  387. package/dist/runtime/assets/svg/paint-brush.svg +0 -3
  388. package/dist/runtime/assets/svg/paper-airplane.svg +0 -3
  389. package/dist/runtime/assets/svg/paper-clip.svg +0 -3
  390. package/dist/runtime/assets/svg/pause-circle.svg +0 -3
  391. package/dist/runtime/assets/svg/pause.svg +0 -3
  392. package/dist/runtime/assets/svg/pencil-square.svg +0 -3
  393. package/dist/runtime/assets/svg/pencil.svg +0 -3
  394. package/dist/runtime/assets/svg/percent-badge.svg +0 -3
  395. package/dist/runtime/assets/svg/phone-arrow-down-left.svg +0 -3
  396. package/dist/runtime/assets/svg/phone-arrow-up-right.svg +0 -3
  397. package/dist/runtime/assets/svg/phone-x-mark.svg +0 -3
  398. package/dist/runtime/assets/svg/phone.svg +0 -3
  399. package/dist/runtime/assets/svg/photo.svg +0 -3
  400. package/dist/runtime/assets/svg/play-circle.svg +0 -4
  401. package/dist/runtime/assets/svg/play-pause.svg +0 -3
  402. package/dist/runtime/assets/svg/play.svg +0 -3
  403. package/dist/runtime/assets/svg/plus-circle.svg +0 -3
  404. package/dist/runtime/assets/svg/plus-small.svg +0 -3
  405. package/dist/runtime/assets/svg/plus.svg +0 -3
  406. package/dist/runtime/assets/svg/power.svg +0 -3
  407. package/dist/runtime/assets/svg/presentation-chart-bar.svg +0 -3
  408. package/dist/runtime/assets/svg/presentation-chart-line.svg +0 -3
  409. package/dist/runtime/assets/svg/printer.svg +0 -3
  410. package/dist/runtime/assets/svg/puzzle-piece.svg +0 -3
  411. package/dist/runtime/assets/svg/qr-code.svg +0 -4
  412. package/dist/runtime/assets/svg/question-mark-circle.svg +0 -3
  413. package/dist/runtime/assets/svg/queue-list.svg +0 -3
  414. package/dist/runtime/assets/svg/radio.svg +0 -3
  415. package/dist/runtime/assets/svg/receipt-percent.svg +0 -3
  416. package/dist/runtime/assets/svg/receipt-refund.svg +0 -3
  417. package/dist/runtime/assets/svg/rectangle-group.svg +0 -3
  418. package/dist/runtime/assets/svg/rectangle-stack.svg +0 -3
  419. package/dist/runtime/assets/svg/rocket-launch.svg +0 -3
  420. package/dist/runtime/assets/svg/rss.svg +0 -3
  421. package/dist/runtime/assets/svg/scale.svg +0 -3
  422. package/dist/runtime/assets/svg/scissors.svg +0 -3
  423. package/dist/runtime/assets/svg/server-stack.svg +0 -3
  424. package/dist/runtime/assets/svg/server.svg +0 -3
  425. package/dist/runtime/assets/svg/share.svg +0 -3
  426. package/dist/runtime/assets/svg/shield-check.svg +0 -3
  427. package/dist/runtime/assets/svg/shield-exclamation.svg +0 -3
  428. package/dist/runtime/assets/svg/shopping-bag.svg +0 -3
  429. package/dist/runtime/assets/svg/shopping-cart.svg +0 -3
  430. package/dist/runtime/assets/svg/signal-slash.svg +0 -3
  431. package/dist/runtime/assets/svg/signal.svg +0 -3
  432. package/dist/runtime/assets/svg/slash.svg +0 -3
  433. package/dist/runtime/assets/svg/sparkles.svg +0 -3
  434. package/dist/runtime/assets/svg/speaker-wave.svg +0 -3
  435. package/dist/runtime/assets/svg/speaker-x-mark.svg +0 -3
  436. package/dist/runtime/assets/svg/square-2-stack.svg +0 -3
  437. package/dist/runtime/assets/svg/square-3-stack-3d.svg +0 -3
  438. package/dist/runtime/assets/svg/squares-2x2.svg +0 -3
  439. package/dist/runtime/assets/svg/squares-plus.svg +0 -3
  440. package/dist/runtime/assets/svg/star.svg +0 -3
  441. package/dist/runtime/assets/svg/stop-circle.svg +0 -4
  442. package/dist/runtime/assets/svg/stop.svg +0 -3
  443. package/dist/runtime/assets/svg/strikethrough.svg +0 -3
  444. package/dist/runtime/assets/svg/sun.svg +0 -3
  445. package/dist/runtime/assets/svg/swatch.svg +0 -3
  446. package/dist/runtime/assets/svg/table-cells.svg +0 -3
  447. package/dist/runtime/assets/svg/tag.svg +0 -4
  448. package/dist/runtime/assets/svg/ticket.svg +0 -3
  449. package/dist/runtime/assets/svg/trash.svg +0 -3
  450. package/dist/runtime/assets/svg/trophy.svg +0 -3
  451. package/dist/runtime/assets/svg/truck.svg +0 -3
  452. package/dist/runtime/assets/svg/tv.svg +0 -3
  453. package/dist/runtime/assets/svg/underline.svg +0 -3
  454. package/dist/runtime/assets/svg/user-circle.svg +0 -3
  455. package/dist/runtime/assets/svg/user-group.svg +0 -3
  456. package/dist/runtime/assets/svg/user-minus.svg +0 -3
  457. package/dist/runtime/assets/svg/user-plus.svg +0 -3
  458. package/dist/runtime/assets/svg/user.svg +0 -3
  459. package/dist/runtime/assets/svg/users.svg +0 -3
  460. package/dist/runtime/assets/svg/variable.svg +0 -3
  461. package/dist/runtime/assets/svg/video-camera-slash.svg +0 -3
  462. package/dist/runtime/assets/svg/video-camera.svg +0 -3
  463. package/dist/runtime/assets/svg/view-columns.svg +0 -3
  464. package/dist/runtime/assets/svg/viewfinder-circle.svg +0 -3
  465. package/dist/runtime/assets/svg/wallet.svg +0 -3
  466. package/dist/runtime/assets/svg/wifi.svg +0 -3
  467. package/dist/runtime/assets/svg/window.svg +0 -3
  468. package/dist/runtime/assets/svg/wrench-screwdriver.svg +0 -3
  469. package/dist/runtime/assets/svg/wrench.svg +0 -4
  470. package/dist/runtime/assets/svg/x-circle.svg +0 -3
  471. package/dist/runtime/assets/svg/x-mark.svg +0 -3
@@ -1,37 +0,0 @@
1
- interface FormIssue {
2
- path: readonly PropertyKey[];
3
- message: string;
4
- }
5
- interface ParseResult {
6
- success: boolean;
7
- error?: {
8
- issues: readonly FormIssue[];
9
- };
10
- }
11
- type __VLS_Props = {
12
- id?: string;
13
- state: Record<string, unknown>;
14
- schema?: {
15
- safeParse: (value: unknown) => ParseResult;
16
- };
17
- warnings?: (value: Record<string, unknown>) => readonly FormIssue[];
18
- };
19
- declare var __VLS_13: {};
20
- type __VLS_Slots = {} & {
21
- default?: (props: typeof __VLS_13) => any;
22
- };
23
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
- error: () => any;
25
- submit: () => any;
26
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
27
- onError?: (() => any) | undefined;
28
- onSubmit?: (() => any) | undefined;
29
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
- declare const _default: typeof __VLS_export;
32
- export default _default;
33
- type __VLS_WithSlots<T, S> = T & {
34
- new (): {
35
- $slots: S;
36
- };
37
- };
@@ -1,63 +0,0 @@
1
- <template>
2
- <form :id="id" class="cms-form" @submit.prevent="onSubmit">
3
- <CmsAlert v-if="errors[ROOT_KEY]" color="error">{{ errors[ROOT_KEY] }}</CmsAlert>
4
- <CmsAlert v-for="message in rootWarnings" :key="message" color="warning">
5
- {{ message }}
6
- </CmsAlert>
7
- <slot />
8
- </form>
9
- </template>
10
-
11
- <script setup>
12
- import { computed, provide, reactive, watch } from "#imports";
13
- import { CMS_FORM_ERRORS, CMS_FORM_WARNINGS } from "../../utils/ui";
14
- const ROOT_KEY = "";
15
- const props = defineProps({
16
- id: { type: String, required: false },
17
- state: { type: Object, required: true },
18
- schema: { type: Object, required: false },
19
- warnings: { type: Function, required: false }
20
- });
21
- const emit = defineEmits(["submit", "error"]);
22
- const errors = reactive({});
23
- provide(CMS_FORM_ERRORS, errors);
24
- const warningList = computed(() => props.warnings?.(props.state) ?? []);
25
- const warningsByKey = computed(() => {
26
- const grouped = {};
27
- for (const issue of warningList.value) {
28
- const key = String(issue.path[0] ?? ROOT_KEY);
29
- if (key !== ROOT_KEY) grouped[key] ??= issue.message;
30
- }
31
- return grouped;
32
- });
33
- provide(CMS_FORM_WARNINGS, warningsByKey);
34
- const rootWarnings = computed(() => [
35
- ...new Set(
36
- warningList.value.filter((issue) => !issue.path.length).map((issue) => issue.message)
37
- )
38
- ]);
39
- let submitted = false;
40
- function validate() {
41
- for (const key of Object.keys(errors)) delete errors[key];
42
- if (!props.schema) return true;
43
- const result = props.schema.safeParse(props.state);
44
- if (result.success) return true;
45
- for (const issue of result.error?.issues ?? []) {
46
- const key = String(issue.path[0] ?? ROOT_KEY);
47
- if (!errors[key]) errors[key] = issue.message;
48
- }
49
- return false;
50
- }
51
- function onSubmit() {
52
- submitted = true;
53
- if (validate()) emit("submit");
54
- else emit("error");
55
- }
56
- watch(
57
- () => props.state,
58
- () => {
59
- if (submitted) validate();
60
- },
61
- { deep: true }
62
- );
63
- </script>
@@ -1,37 +0,0 @@
1
- interface FormIssue {
2
- path: readonly PropertyKey[];
3
- message: string;
4
- }
5
- interface ParseResult {
6
- success: boolean;
7
- error?: {
8
- issues: readonly FormIssue[];
9
- };
10
- }
11
- type __VLS_Props = {
12
- id?: string;
13
- state: Record<string, unknown>;
14
- schema?: {
15
- safeParse: (value: unknown) => ParseResult;
16
- };
17
- warnings?: (value: Record<string, unknown>) => readonly FormIssue[];
18
- };
19
- declare var __VLS_13: {};
20
- type __VLS_Slots = {} & {
21
- default?: (props: typeof __VLS_13) => any;
22
- };
23
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
- error: () => any;
25
- submit: () => any;
26
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
27
- onError?: (() => any) | undefined;
28
- onSubmit?: (() => any) | undefined;
29
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
- declare const _default: typeof __VLS_export;
32
- export default _default;
33
- type __VLS_WithSlots<T, S> = T & {
34
- new (): {
35
- $slots: S;
36
- };
37
- };
@@ -1,22 +0,0 @@
1
- type __VLS_Props = {
2
- label?: string;
3
- icon?: string;
4
- description?: string;
5
- name?: string;
6
- required?: boolean;
7
- };
8
- declare var __VLS_6: {}, __VLS_8: {};
9
- type __VLS_Slots = {} & {
10
- 'label-actions'?: (props: typeof __VLS_6) => any;
11
- } & {
12
- default?: (props: typeof __VLS_8) => 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
- };
@@ -1,35 +0,0 @@
1
- <template>
2
- <div class="cms-form-field" :class="{ 'is-error': error }">
3
- <div v-if="label || $slots['label-actions']" class="cms-form-label-row">
4
- <label v-if="label" class="cms-form-label">
5
- <CmsIcon v-if="icon" :name="icon" class="cms-form-label-icon size-3.5" />
6
- {{ label }}<span v-if="required" class="cms-form-required"> *</span>
7
- </label>
8
- <slot name="label-actions" />
9
- </div>
10
- <slot />
11
- <p v-if="description" class="cms-form-description">{{ description }}</p>
12
- <p v-if="error" class="cms-form-error">
13
- <CmsIcon name="exclamation-circle" class="size-3.5 shrink-0" />{{ error }}
14
- </p>
15
- <p v-else-if="warning" class="cms-form-warning">
16
- <CmsIcon name="exclamation-triangle" class="size-3.5 shrink-0" />{{ warning }}
17
- </p>
18
- </div>
19
- </template>
20
-
21
- <script setup>
22
- import { computed, inject } from "#imports";
23
- import { CMS_FORM_ERRORS, CMS_FORM_WARNINGS } from "../../utils/ui";
24
- const props = defineProps({
25
- label: { type: String, required: false },
26
- icon: { type: String, required: false },
27
- description: { type: String, required: false },
28
- name: { type: String, required: false },
29
- required: { type: Boolean, required: false }
30
- });
31
- const errors = inject(CMS_FORM_ERRORS, null);
32
- const warnings = inject(CMS_FORM_WARNINGS, null);
33
- const error = computed(() => props.name && errors ? errors[props.name] : void 0);
34
- const warning = computed(() => props.name && warnings ? warnings.value[props.name] : void 0);
35
- </script>
@@ -1,22 +0,0 @@
1
- type __VLS_Props = {
2
- label?: string;
3
- icon?: string;
4
- description?: string;
5
- name?: string;
6
- required?: boolean;
7
- };
8
- declare var __VLS_6: {}, __VLS_8: {};
9
- type __VLS_Slots = {} & {
10
- 'label-actions'?: (props: typeof __VLS_6) => any;
11
- } & {
12
- default?: (props: typeof __VLS_8) => 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
- };
@@ -1,6 +0,0 @@
1
- type __VLS_Props = {
2
- name: string;
3
- };
4
- 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>;
5
- declare const _default: typeof __VLS_export;
6
- export default _default;
@@ -1,23 +0,0 @@
1
- <template>
2
- <component :is="icon" v-if="icon" :data-icon="name" class="size-5 stroke-[1.5]" />
3
- </template>
4
-
5
- <script setup>
6
- import { defineAsyncComponent, shallowRef, watch } from "#imports";
7
- const props = defineProps({
8
- name: { type: String, required: true }
9
- });
10
- const icons = import.meta.glob("../../../assets/svg/*.svg", {
11
- query: "?component",
12
- import: "default"
13
- });
14
- const icon = shallowRef();
15
- watch(
16
- () => props.name,
17
- (name) => {
18
- const loader = name ? icons[`../../../assets/svg/${name}.svg`] : void 0;
19
- icon.value = loader ? defineAsyncComponent(loader) : void 0;
20
- },
21
- { immediate: true }
22
- );
23
- </script>
@@ -1,6 +0,0 @@
1
- type __VLS_Props = {
2
- name: string;
3
- };
4
- 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>;
5
- declare const _default: typeof __VLS_export;
6
- export default _default;
@@ -1,27 +0,0 @@
1
- type __VLS_Props = {
2
- type?: string;
3
- size?: 'sm' | 'md' | 'lg';
4
- icon?: string;
5
- };
6
- type __VLS_ModelProps = {
7
- modelValue?: string | number | null;
8
- 'modelModifiers'?: Partial<Record<'number', true>>;
9
- };
10
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
- declare var __VLS_6: {};
12
- type __VLS_Slots = {} & {
13
- trailing?: (props: typeof __VLS_6) => any;
14
- };
15
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
- "update:modelValue": (value: string | number | null | undefined) => any;
17
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
- "onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
19
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
- declare const _default: typeof __VLS_export;
22
- export default _default;
23
- type __VLS_WithSlots<T, S> = T & {
24
- new (): {
25
- $slots: S;
26
- };
27
- };
@@ -1,46 +0,0 @@
1
- <template>
2
- <div
3
- class="cms-input-wrap"
4
- :class="[$attrs.class, { 'has-lead': icon }]"
5
- :style="$attrs.style"
6
- >
7
- <span v-if="icon" class="cms-input-lead">
8
- <CmsIcon :name="icon" class="size-4" />
9
- </span>
10
- <input
11
- v-bind="inputAttrs"
12
- :type="type ?? 'text'"
13
- :value="model ?? ''"
14
- :class="['cms-field', `cms-field-${size ?? 'md'}`]"
15
- @input="onInput"
16
- />
17
- <span v-if="$slots.trailing" class="cms-input-trail">
18
- <slot name="trailing" />
19
- </span>
20
- </div>
21
- </template>
22
-
23
- <script setup>
24
- import { computed, useAttrs } from "#imports";
25
- defineOptions({ inheritAttrs: false });
26
- defineProps({
27
- type: { type: String, required: false },
28
- size: { type: String, required: false },
29
- icon: { type: String, required: false }
30
- });
31
- const [model, modifiers] = defineModel({ type: [String, Number, null] });
32
- const attrs = useAttrs();
33
- const inputAttrs = computed(() => {
34
- const { class: _class, style: _style, ...rest } = attrs;
35
- return rest;
36
- });
37
- function onInput(event) {
38
- const value = event.target.value;
39
- if (modifiers.number) {
40
- const parsed = Number.parseFloat(value);
41
- model.value = value === "" ? null : Number.isNaN(parsed) ? value : parsed;
42
- } else {
43
- model.value = value;
44
- }
45
- }
46
- </script>
@@ -1,27 +0,0 @@
1
- type __VLS_Props = {
2
- type?: string;
3
- size?: 'sm' | 'md' | 'lg';
4
- icon?: string;
5
- };
6
- type __VLS_ModelProps = {
7
- modelValue?: string | number | null;
8
- 'modelModifiers'?: Partial<Record<'number', true>>;
9
- };
10
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
- declare var __VLS_6: {};
12
- type __VLS_Slots = {} & {
13
- trailing?: (props: typeof __VLS_6) => any;
14
- };
15
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
- "update:modelValue": (value: string | number | null | undefined) => any;
17
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
- "onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
19
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
- declare const _default: typeof __VLS_export;
22
- export default _default;
23
- type __VLS_WithSlots<T, S> = T & {
24
- new (): {
25
- $slots: S;
26
- };
27
- };
@@ -1,31 +0,0 @@
1
- type __VLS_Props = {
2
- title?: string;
3
- size?: 'sm' | 'lg';
4
- };
5
- type __VLS_ModelProps = {
6
- 'open'?: boolean;
7
- };
8
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
- declare var __VLS_13: {}, __VLS_15: {}, __VLS_17: {};
10
- type __VLS_Slots = {} & {
11
- header?: (props: typeof __VLS_13) => any;
12
- } & {
13
- body?: (props: typeof __VLS_15) => any;
14
- } & {
15
- default?: (props: typeof __VLS_17) => any;
16
- };
17
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
- "after:leave": () => any;
19
- "update:open": (value: boolean) => any;
20
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
- "onAfter:leave"?: (() => any) | undefined;
22
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
23
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
- declare const _default: typeof __VLS_export;
26
- export default _default;
27
- type __VLS_WithSlots<T, S> = T & {
28
- new (): {
29
- $slots: S;
30
- };
31
- };
@@ -1,49 +0,0 @@
1
- <template>
2
- <Teleport to="body">
3
- <Transition name="cms-modal">
4
- <div v-if="open" class="cms-scope cms-overlay" @click.self="close">
5
- <div
6
- class="cms-modal"
7
- :class="size ? `is-${size}` : void 0"
8
- role="dialog"
9
- aria-modal="true"
10
- >
11
- <div v-if="title || $slots.header" class="cms-modal-header">
12
- <slot name="header">
13
- <h2 class="cms-title cms-title-sm">
14
- {{ title }}
15
- </h2>
16
- </slot>
17
- </div>
18
- <div class="cms-modal-body">
19
- <slot name="body"><slot /></slot>
20
- </div>
21
- </div>
22
- </div>
23
- </Transition>
24
- </Teleport>
25
- </template>
26
-
27
- <script setup>
28
- import { watch } from "#imports";
29
- import { useCmsOverlay } from "../../composables/cms-overlay";
30
- defineProps({
31
- title: { type: String, required: false },
32
- size: { type: String, required: false }
33
- });
34
- const open = defineModel("open", { type: Boolean, ...{ default: false } });
35
- const emit = defineEmits(["after:leave"]);
36
- function close() {
37
- open.value = false;
38
- }
39
- const overlay = useCmsOverlay(close);
40
- watch(open, (value, previous) => {
41
- if (import.meta.server) return;
42
- if (value) {
43
- overlay.activate();
44
- } else {
45
- overlay.deactivate();
46
- if (previous) emit("after:leave");
47
- }
48
- });
49
- </script>
@@ -1,31 +0,0 @@
1
- type __VLS_Props = {
2
- title?: string;
3
- size?: 'sm' | 'lg';
4
- };
5
- type __VLS_ModelProps = {
6
- 'open'?: boolean;
7
- };
8
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
- declare var __VLS_13: {}, __VLS_15: {}, __VLS_17: {};
10
- type __VLS_Slots = {} & {
11
- header?: (props: typeof __VLS_13) => any;
12
- } & {
13
- body?: (props: typeof __VLS_15) => any;
14
- } & {
15
- default?: (props: typeof __VLS_17) => any;
16
- };
17
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
- "after:leave": () => any;
19
- "update:open": (value: boolean) => any;
20
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
- "onAfter:leave"?: (() => any) | undefined;
22
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
23
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
- declare const _default: typeof __VLS_export;
26
- export default _default;
27
- type __VLS_WithSlots<T, S> = T & {
28
- new (): {
29
- $slots: S;
30
- };
31
- };
@@ -1,25 +0,0 @@
1
- export interface CmsBreadcrumbLink {
2
- label: string;
3
- to: string;
4
- }
5
- type __VLS_Props = {
6
- title: string;
7
- icon?: string;
8
- description?: string;
9
- links?: CmsBreadcrumbLink[];
10
- };
11
- declare var __VLS_17: {}, __VLS_19: {};
12
- type __VLS_Slots = {} & {
13
- badge?: (props: typeof __VLS_17) => any;
14
- } & {
15
- default?: (props: typeof __VLS_19) => any;
16
- };
17
- 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>;
18
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
- declare const _default: typeof __VLS_export;
20
- export default _default;
21
- type __VLS_WithSlots<T, S> = T & {
22
- new (): {
23
- $slots: S;
24
- };
25
- };
@@ -1,36 +0,0 @@
1
- <template>
2
- <header class="cms-page-header">
3
- <div class="cms-page-heading">
4
- <nav v-if="links?.length" class="cms-breadcrumb">
5
- <template v-for="link in links" :key="link.to">
6
- <NuxtLink :to="link.to" class="cms-breadcrumb-link">{{ link.label }}</NuxtLink>
7
- <CmsIcon name="chevron-right" class="cms-breadcrumb-separator size-3" />
8
- </template>
9
- </nav>
10
- <div class="cms-page-title-row">
11
- <span v-if="icon" class="cms-page-icon">
12
- <CmsIcon :name="icon" class="size-[18px]" />
13
- </span>
14
- <div class="cms-page-title-text">
15
- <div class="cms-actions">
16
- <h1 class="cms-title cms-title-md">
17
- {{ title }}
18
- </h1>
19
- <slot name="badge" />
20
- </div>
21
- <p v-if="description" class="cms-page-description">{{ description }}</p>
22
- </div>
23
- </div>
24
- </div>
25
- <slot />
26
- </header>
27
- </template>
28
-
29
- <script setup>
30
- defineProps({
31
- title: { type: String, required: true },
32
- icon: { type: String, required: false },
33
- description: { type: String, required: false },
34
- links: { type: Array, required: false }
35
- });
36
- </script>
@@ -1,25 +0,0 @@
1
- export interface CmsBreadcrumbLink {
2
- label: string;
3
- to: string;
4
- }
5
- type __VLS_Props = {
6
- title: string;
7
- icon?: string;
8
- description?: string;
9
- links?: CmsBreadcrumbLink[];
10
- };
11
- declare var __VLS_17: {}, __VLS_19: {};
12
- type __VLS_Slots = {} & {
13
- badge?: (props: typeof __VLS_17) => any;
14
- } & {
15
- default?: (props: typeof __VLS_19) => any;
16
- };
17
- 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>;
18
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
- declare const _default: typeof __VLS_export;
20
- export default _default;
21
- type __VLS_WithSlots<T, S> = T & {
22
- new (): {
23
- $slots: S;
24
- };
25
- };
@@ -1,15 +0,0 @@
1
- type __VLS_Props = {
2
- total: number;
3
- itemsPerPage: number;
4
- };
5
- type __VLS_ModelProps = {
6
- 'page'?: number;
7
- };
8
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
- "update:page": (value: number) => any;
11
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
- "onUpdate:page"?: ((value: number) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
- declare const _default: typeof __VLS_export;
15
- export default _default;
@@ -1,51 +0,0 @@
1
- <template>
2
- <div class="cms-pagination">
3
- <button
4
- type="button"
5
- class="cms-page-btn"
6
- :disabled="page <= 1"
7
- aria-label="Previous page"
8
- @click="go(page - 1)"
9
- >
10
- <CmsIcon name="chevron-left" class="size-4" />
11
- </button>
12
- <button
13
- v-for="p in pages"
14
- :key="p"
15
- type="button"
16
- class="cms-page-btn"
17
- :class="{ 'is-active': p === page }"
18
- @click="go(p)"
19
- >
20
- {{ p }}
21
- </button>
22
- <button
23
- type="button"
24
- class="cms-page-btn"
25
- :disabled="page >= pageCount"
26
- aria-label="Next page"
27
- @click="go(page + 1)"
28
- >
29
- <CmsIcon name="chevron-right" class="size-4" />
30
- </button>
31
- </div>
32
- </template>
33
-
34
- <script setup>
35
- import { computed } from "#imports";
36
- const props = defineProps({
37
- total: { type: Number, required: true },
38
- itemsPerPage: { type: Number, required: true }
39
- });
40
- const page = defineModel("page", { type: Number, ...{ default: 1 } });
41
- const pageCount = computed(() => Math.max(1, Math.ceil(props.total / props.itemsPerPage)));
42
- const pages = computed(() => {
43
- const count = pageCount.value;
44
- if (count <= 7) return Array.from({ length: count }, (_, index) => index + 1);
45
- const start = Math.min(Math.max(page.value - 3, 1), count - 6);
46
- return Array.from({ length: 7 }, (_, index) => start + index);
47
- });
48
- function go(target) {
49
- if (target >= 1 && target <= pageCount.value) page.value = target;
50
- }
51
- </script>
@@ -1,15 +0,0 @@
1
- type __VLS_Props = {
2
- total: number;
3
- itemsPerPage: number;
4
- };
5
- type __VLS_ModelProps = {
6
- 'page'?: number;
7
- };
8
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
- "update:page": (value: number) => any;
11
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
- "onUpdate:page"?: ((value: number) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
- declare const _default: typeof __VLS_export;
15
- export default _default;