@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,152 +0,0 @@
1
- <template>
2
- <div ref="root" class="relative w-full">
3
- <div class="cms-field cms-field-md 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="cms-selectmenu-input"
19
- :value="displayValue"
20
- :placeholder="placeholder"
21
- @input="onInput"
22
- @focus="onFocus"
23
- />
24
- <span v-if="loading" class="cms-selectmenu-affix ml-auto flex">
25
- <CmsIcon name="arrow-path" class="size-4 animate-spin" />
26
- </span>
27
- <button
28
- v-else
29
- type="button"
30
- tabindex="-1"
31
- aria-label="Toggle options"
32
- class="cms-select-chevron cms-selectmenu-affix ml-auto"
33
- :class="{ 'is-open': open }"
34
- @click.stop="toggleOpen"
35
- >
36
- <CmsIcon name="chevron-down" class="size-4" />
37
- </button>
38
- </div>
39
- <div v-if="open" class="cms-selectmenu-panel">
40
- <button
41
- v-for="item in visibleItems"
42
- :key="String(item[valueKey])"
43
- type="button"
44
- class="cms-menu-item"
45
- @click="pick(item)"
46
- >
47
- <span class="truncate">{{ item.label }}</span>
48
- <CmsIcon
49
- v-if="!multiple && isSelected(item[valueKey])"
50
- name="check"
51
- class="cms-menu-check size-3.5"
52
- />
53
- </button>
54
- <div v-if="!visibleItems.length" class="cms-menu-item pointer-events-none opacity-60">
55
- No results
56
- </div>
57
- </div>
58
- </div>
59
- </template>
60
-
61
- <script setup>
62
- import { computed, onBeforeUnmount, ref, watch } from "#imports";
63
- const props = defineProps({
64
- items: { type: Array, required: true },
65
- valueKey: { type: String, required: false, default: "value" },
66
- multiple: { type: Boolean, required: false },
67
- ignoreFilter: { type: Boolean, required: false },
68
- loading: { type: Boolean, required: false },
69
- placeholder: { type: String, required: false }
70
- });
71
- const model = defineModel({ type: [String, Array, null] });
72
- const search = defineModel("searchTerm", { type: String, ...{ default: "" } });
73
- const open = ref(false);
74
- const root = ref(null);
75
- const input = ref(null);
76
- const modelArray = computed(
77
- () => props.multiple && Array.isArray(model.value) ? model.value : []
78
- );
79
- const selectedLabel = computed(() => {
80
- if (props.multiple) return "";
81
- const current = model.value;
82
- return current == null ? "" : labelFor(current);
83
- });
84
- const placeholder = computed(() => {
85
- if (props.multiple) return modelArray.value.length ? "" : props.placeholder ?? "";
86
- return selectedLabel.value || props.placeholder || "";
87
- });
88
- const displayValue = computed(() => {
89
- if (props.multiple) return search.value;
90
- return open.value ? search.value : selectedLabel.value;
91
- });
92
- function onInput(event) {
93
- search.value = event.target.value;
94
- open.value = true;
95
- }
96
- function onFocus() {
97
- if (!props.multiple) search.value = "";
98
- open.value = true;
99
- }
100
- const visibleItems = computed(() => {
101
- let list = props.items;
102
- if (!props.ignoreFilter) {
103
- const query = search.value.trim().toLowerCase();
104
- if (query) list = list.filter((item) => item.label.toLowerCase().includes(query));
105
- }
106
- if (props.multiple) {
107
- list = list.filter((item) => !modelArray.value.includes(item[props.valueKey]));
108
- }
109
- return list;
110
- });
111
- function labelFor(value) {
112
- return props.items.find((item) => item[props.valueKey] === value)?.label ?? `#${value}`;
113
- }
114
- function isSelected(value) {
115
- return props.multiple ? modelArray.value.includes(value) : model.value === value;
116
- }
117
- function focusInput() {
118
- input.value?.focus();
119
- open.value = true;
120
- }
121
- function toggleOpen() {
122
- if (open.value) open.value = false;
123
- else focusInput();
124
- }
125
- function toggle(value) {
126
- const next = modelArray.value.includes(value) ? modelArray.value.filter((entry) => entry !== value) : [...modelArray.value, value];
127
- model.value = next;
128
- }
129
- function pick(item) {
130
- const value = item[props.valueKey];
131
- if (props.multiple) {
132
- if (value != null) toggle(value);
133
- search.value = "";
134
- focusInput();
135
- } else {
136
- model.value = value;
137
- search.value = "";
138
- open.value = false;
139
- }
140
- }
141
- function onOutside(event) {
142
- if (root.value && !root.value.contains(event.target)) open.value = false;
143
- }
144
- watch(open, (value) => {
145
- if (import.meta.server) return;
146
- if (value) document.addEventListener("click", onOutside, true);
147
- else document.removeEventListener("click", onOutside, true);
148
- });
149
- onBeforeUnmount(() => {
150
- if (import.meta.client) document.removeEventListener("click", onOutside, true);
151
- });
152
- </script>
@@ -1,25 +0,0 @@
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
- placeholder?: string;
11
- };
12
- type __VLS_ModelProps = {
13
- modelValue?: string | string[] | null;
14
- 'searchTerm'?: string;
15
- };
16
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
17
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
- "update:modelValue": (value: string | string[] | null | undefined) => any;
19
- "update:searchTerm": (value: string) => any;
20
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
- "onUpdate:modelValue"?: ((value: string | string[] | null | undefined) => any) | undefined;
22
- "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
23
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
- declare const _default: typeof __VLS_export;
25
- export default _default;
@@ -1,3 +0,0 @@
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;
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="cms-spinner" role="status" aria-label="Loading">
3
- <span class="cms-spinner-ring" />
4
- </div>
5
- </template>
@@ -1,3 +0,0 @@
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;
@@ -1,10 +0,0 @@
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;
@@ -1,14 +0,0 @@
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>
@@ -1,10 +0,0 @@
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;
@@ -1,51 +0,0 @@
1
- type Row = Record<string, unknown>;
2
- interface Column {
3
- id?: string;
4
- accessorKey?: string;
5
- accessorFn?: (row: Row) => unknown;
6
- header?: string;
7
- sortable?: boolean;
8
- }
9
- interface TableSort {
10
- key: string;
11
- order: 'asc' | 'desc';
12
- }
13
- type __VLS_Props = {
14
- data: Row[];
15
- columns: Column[];
16
- selectable?: boolean;
17
- };
18
- type __VLS_ModelProps = {
19
- 'selected'?: string[];
20
- 'sort'?: TableSort | null;
21
- };
22
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
23
- declare var __VLS_21: `${string}-cell`, __VLS_22: {
24
- row: {
25
- original: Row;
26
- };
27
- };
28
- type __VLS_Slots = {} & {
29
- [K in NonNullable<typeof __VLS_21>]?: (props: typeof __VLS_22) => any;
30
- };
31
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
- select: (event: Event, row: {
33
- original: Row;
34
- }) => any;
35
- "update:selected": (value: string[]) => any;
36
- "update:sort": (value: TableSort | null) => any;
37
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
38
- onSelect?: ((event: Event, row: {
39
- original: Row;
40
- }) => any) | undefined;
41
- "onUpdate:selected"?: ((value: string[]) => any) | undefined;
42
- "onUpdate:sort"?: ((value: TableSort | null) => any) | undefined;
43
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
44
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
45
- declare const _default: typeof __VLS_export;
46
- export default _default;
47
- type __VLS_WithSlots<T, S> = T & {
48
- new (): {
49
- $slots: S;
50
- };
51
- };
@@ -1,115 +0,0 @@
1
- <template>
2
- <div class="cms-card cms-table-shell">
3
- <div class="cms-table-scroll">
4
- <table class="cms-table">
5
- <thead>
6
- <tr>
7
- <th v-if="selectable" class="cms-table-check-cell">
8
- <CmsCheckbox
9
- :checked="allSelected"
10
- :indeterminate="someSelected"
11
- aria-label="Select all rows"
12
- @toggle="toggleAll"
13
- />
14
- </th>
15
- <th
16
- v-for="column in columns"
17
- :key="columnId(column)"
18
- :class="{
19
- 'is-sortable': column.sortable,
20
- 'is-sorted': sort?.key === columnId(column)
21
- }"
22
- :aria-sort="ariaSort(column)"
23
- @click="toggleSort(column)"
24
- >
25
- <span class="cms-th-label">
26
- {{ column.header }}
27
- <CmsIcon
28
- v-if="column.sortable"
29
- :name="sortIcon(column)"
30
- class="cms-th-sort size-3"
31
- />
32
- </span>
33
- </th>
34
- </tr>
35
- </thead>
36
- <tbody>
37
- <tr
38
- v-for="(row, index) in data"
39
- :key="keyOf(row)"
40
- class="__clickable"
41
- :class="{ 'is-selected': isSelected(row) }"
42
- :style="{ '--cms-row-delay': `${Math.min(index, 14) * 24}ms` }"
43
- @click="emit('select', $event, { original: row })"
44
- >
45
- <td v-if="selectable" class="cms-table-check-cell" @click.stop="toggleRow(row)">
46
- <CmsCheckbox
47
- :checked="isSelected(row)"
48
- aria-label="Select row"
49
- @toggle="toggleRow(row)"
50
- />
51
- </td>
52
- <td v-for="column in columns" :key="columnId(column)">
53
- <slot :name="`${columnId(column)}-cell`" :row="{ original: row }">
54
- {{ cellValue(column, row) }}
55
- </slot>
56
- </td>
57
- </tr>
58
- </tbody>
59
- </table>
60
- </div>
61
- </div>
62
- </template>
63
-
64
- <script setup>
65
- import { computed } from "#imports";
66
- const props = defineProps({
67
- data: { type: Array, required: true },
68
- columns: { type: Array, required: true },
69
- selectable: { type: Boolean, required: false }
70
- });
71
- const selected = defineModel("selected", { type: Array, ...{ default: () => [] } });
72
- function keyOf(row) {
73
- return String(row.id);
74
- }
75
- function isSelected(row) {
76
- return selected.value.includes(keyOf(row));
77
- }
78
- function toggleRow(row) {
79
- const key = keyOf(row);
80
- selected.value = isSelected(row) ? selected.value.filter((k) => k !== key) : [...selected.value, key];
81
- }
82
- const allSelected = computed(
83
- () => props.data.length > 0 && props.data.every((row) => isSelected(row))
84
- );
85
- const someSelected = computed(() => !allSelected.value && selected.value.length > 0);
86
- function toggleAll() {
87
- selected.value = allSelected.value ? [] : props.data.map(keyOf);
88
- }
89
- const sort = defineModel("sort", { type: [Object, null], ...{ default: null } });
90
- const emit = defineEmits(["select"]);
91
- function columnId(column) {
92
- return column.id ?? column.accessorKey ?? "";
93
- }
94
- function toggleSort(column) {
95
- if (!column.sortable) return;
96
- const key = columnId(column);
97
- if (sort.value?.key !== key) sort.value = { key, order: "asc" };
98
- else if (sort.value.order === "asc") sort.value = { key, order: "desc" };
99
- else sort.value = null;
100
- }
101
- function sortIcon(column) {
102
- if (sort.value?.key !== columnId(column)) return "arrows-up-down";
103
- return sort.value.order === "asc" ? "arrow-small-up" : "arrow-small-down";
104
- }
105
- function ariaSort(column) {
106
- if (!column.sortable) return void 0;
107
- if (sort.value?.key !== columnId(column)) return "none";
108
- return sort.value.order === "asc" ? "ascending" : "descending";
109
- }
110
- function cellValue(column, row) {
111
- if (column.accessorFn) return column.accessorFn(row);
112
- if (column.accessorKey) return row[column.accessorKey];
113
- return "";
114
- }
115
- </script>
@@ -1,51 +0,0 @@
1
- type Row = Record<string, unknown>;
2
- interface Column {
3
- id?: string;
4
- accessorKey?: string;
5
- accessorFn?: (row: Row) => unknown;
6
- header?: string;
7
- sortable?: boolean;
8
- }
9
- interface TableSort {
10
- key: string;
11
- order: 'asc' | 'desc';
12
- }
13
- type __VLS_Props = {
14
- data: Row[];
15
- columns: Column[];
16
- selectable?: boolean;
17
- };
18
- type __VLS_ModelProps = {
19
- 'selected'?: string[];
20
- 'sort'?: TableSort | null;
21
- };
22
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
23
- declare var __VLS_21: `${string}-cell`, __VLS_22: {
24
- row: {
25
- original: Row;
26
- };
27
- };
28
- type __VLS_Slots = {} & {
29
- [K in NonNullable<typeof __VLS_21>]?: (props: typeof __VLS_22) => any;
30
- };
31
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
- select: (event: Event, row: {
33
- original: Row;
34
- }) => any;
35
- "update:selected": (value: string[]) => any;
36
- "update:sort": (value: TableSort | null) => any;
37
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
38
- onSelect?: ((event: Event, row: {
39
- original: Row;
40
- }) => any) | undefined;
41
- "onUpdate:selected"?: ((value: string[]) => any) | undefined;
42
- "onUpdate:sort"?: ((value: TableSort | null) => any) | undefined;
43
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
44
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
45
- declare const _default: typeof __VLS_export;
46
- export default _default;
47
- type __VLS_WithSlots<T, S> = T & {
48
- new (): {
49
- $slots: S;
50
- };
51
- };
@@ -1,15 +0,0 @@
1
- type __VLS_Props = {
2
- rows?: number;
3
- color?: 'error';
4
- };
5
- type __VLS_ModelProps = {
6
- modelValue?: string | null;
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:modelValue": (value: string | null | undefined) => any;
11
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
- "onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
- declare const _default: typeof __VLS_export;
15
- export default _default;
@@ -1,16 +0,0 @@
1
- <template>
2
- <textarea
3
- :rows="rows ?? 3"
4
- :value="model ?? ''"
5
- :class="['cms-field', 'cms-field-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
- color: { type: String, required: false }
14
- });
15
- const model = defineModel({ type: [String, null] });
16
- </script>
@@ -1,15 +0,0 @@
1
- type __VLS_Props = {
2
- rows?: number;
3
- color?: 'error';
4
- };
5
- type __VLS_ModelProps = {
6
- modelValue?: string | null;
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:modelValue": (value: string | null | undefined) => any;
11
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
- "onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
- declare const _default: typeof __VLS_export;
15
- export default _default;
@@ -1,3 +0,0 @@
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;
@@ -1,48 +0,0 @@
1
- <template>
2
- <Teleport to="body">
3
- <div v-if="toasts.length" class="cms-scope">
4
- <div class="cms-toaster">
5
- <div
6
- v-for="toast in toasts"
7
- :key="toast.id"
8
- class="cms-toast"
9
- :class="{
10
- 'is-success': toast.color === 'success',
11
- 'is-error': toast.color === 'error'
12
- }"
13
- >
14
- <div class="cms-toast-row">
15
- <CmsIcon :name="iconFor(toast.color)" class="cms-toast-icon size-4" />
16
- <div class="min-w-0 flex-1">
17
- <p class="cms-toast-title">
18
- {{ toast.title }}
19
- </p>
20
- <p v-if="toast.description" class="cms-toast-description">
21
- {{ toast.description }}
22
- </p>
23
- </div>
24
- <button
25
- type="button"
26
- class="cms-toast-dismiss"
27
- aria-label="Dismiss"
28
- @click="remove(toast.id)"
29
- >
30
- <CmsIcon name="x-mark" class="size-4" />
31
- </button>
32
- </div>
33
- </div>
34
- </div>
35
- </div>
36
- </Teleport>
37
- </template>
38
-
39
- <script setup>
40
- import { useCmsToast, useCmsToastState } from "../../composables/cms-toast";
41
- const toasts = useCmsToastState();
42
- const { remove } = useCmsToast();
43
- function iconFor(color) {
44
- if (color === "success") return "check-circle";
45
- if (color === "error") return "exclamation-circle";
46
- return "information-circle";
47
- }
48
- </script>
@@ -1,3 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- export declare function useCmsOverlay(close: () => void): {
2
- activate: () => void;
3
- deactivate: () => void;
4
- };
@@ -1,23 +0,0 @@
1
- import { onBeforeUnmount } from "#imports";
2
- const stack = [];
3
- function onKeydown(event) {
4
- if (event.key !== "Escape") return;
5
- stack[stack.length - 1]?.close();
6
- }
7
- export function useCmsOverlay(close) {
8
- const entry = { close };
9
- function activate() {
10
- if (import.meta.server || stack.includes(entry)) return;
11
- stack.push(entry);
12
- if (stack.length === 1) document.addEventListener("keydown", onKeydown);
13
- }
14
- function deactivate() {
15
- if (import.meta.server) return;
16
- const index = stack.indexOf(entry);
17
- if (index === -1) return;
18
- stack.splice(index, 1);
19
- if (stack.length === 0) document.removeEventListener("keydown", onKeydown);
20
- }
21
- onBeforeUnmount(deactivate);
22
- return { activate, deactivate };
23
- }
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="M6 13.5V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m12-3V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m-6-9V3.75m0 3.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 9.75V10.5"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m8.25 3v6.75m0 0-3-3m3 3 3-3M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="m9 12.75 3 3m0 0 3-3m-3 3v-7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="m19.5 4.5-15 15m0 0h11.25m-11.25 0V8.25"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 7.5h-.75A2.25 2.25 0 0 0 4.5 9.75v7.5a2.25 2.25 0 0 0 2.25 2.25h7.5a2.25 2.25 0 0 0 2.25-2.25v-7.5a2.25 2.25 0 0 0-2.25-2.25h-.75m-6 3.75 3 3m0 0 3-3m-3 3V1.5m6 9h.75a2.25 2.25 0 0 1 2.25 2.25v7.5a2.25 2.25 0 0 1-2.25 2.25h-7.5a2.25 2.25 0 0 1-2.25-2.25v-.75"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0 3-3m-3 3V2.25"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
2
- <path stroke-linecap="round" stroke-linejoin="round" d="m4.5 4.5 15 15m0 0V8.25m0 11.25H8.25"/>
3
- </svg>