@wssto2/vue-core 0.1.0 → 0.3.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 (314) hide show
  1. package/README.md +53 -9
  2. package/dist/AccessGate.vue_vue_type_script_setup_true_lang-DKX3PH2n.js +22 -0
  3. package/dist/AccountMenuItem.vue_vue_type_script_setup_true_lang-DIGqTLwd.js +76 -0
  4. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-B7Lpfkf6.js +45 -0
  5. package/dist/Activity-DviO0VQ8.js +156 -0
  6. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CKghARkW.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js} +48 -47
  7. package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-BZb4qKXo.js → AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js} +2 -2
  8. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-B82bl36A.js → AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js} +4 -4
  9. package/dist/Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js +51 -0
  10. package/dist/{Banner.vue_vue_type_script_setup_true_lang-n_wGPIIu.js → Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js} +1 -1
  11. package/dist/{BottomDock.vue_vue_type_script_setup_true_lang-DhlMnPC2.js → BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js} +1 -1
  12. package/dist/Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js +182 -0
  13. package/dist/Changes-DlT5mN9G.js +129 -0
  14. package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-CXILftEc.js +1481 -0
  15. package/dist/CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js +299 -0
  16. package/dist/DataTable.vue_vue_type_script_setup_true_lang-DSYgS9lC.js +52 -0
  17. package/dist/DateField.vue_vue_type_script_setup_true_lang-DMVjNsaM.js +1099 -0
  18. package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Bx5O1RZJ.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-Cb3xJI1x.js} +1 -1
  19. package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js → EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js} +1 -1
  20. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js +276 -0
  21. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js +136 -0
  22. package/dist/FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js +38 -0
  23. package/dist/General-BD-Hcz0a.js +145 -0
  24. package/dist/{Icon.vue_vue_type_script_lang-DtC4_mkz.js → Icon.vue_vue_type_script_lang-VvcV2Bzo.js} +46 -33
  25. package/dist/{IconTile.vue_vue_type_script_setup_true_lang-Csfv6Sel.js → IconTile.vue_vue_type_script_setup_true_lang-D7QgnUyN.js} +1 -1
  26. package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +35 -0
  27. package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-DH6EB8br.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-C2udmeEA.js} +2 -2
  28. package/dist/{Menu.vue_vue_type_script_setup_true_lang-D44EHXQZ.js → Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js} +61 -57
  29. package/dist/{Modal.vue_vue_type_script_setup_true_lang-DYQgaUtj.js → Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js} +139 -129
  30. package/dist/NewRolePage-Dla4YnMs.js +42 -0
  31. package/dist/NoAccess.vue_vue_type_script_setup_true_lang-8m9cNptR.js +31 -0
  32. package/dist/NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.js +113 -0
  33. package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +95 -0
  34. package/dist/PageBar.vue_vue_type_script_setup_true_lang-Cfr5xsJx.js +47 -0
  35. package/dist/{Panel.vue_vue_type_script_setup_true_lang-BQmv3cLb.js → Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js} +1 -1
  36. package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DDVQXJRB.js → PhotoViewer.vue_vue_type_script_setup_true_lang-B3Q4dhqJ.js} +2 -2
  37. package/dist/Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js +125 -0
  38. package/dist/ProfilePage-OJMQ8cr8.js +691 -0
  39. package/dist/{ProgressTrack.vue_vue_type_script_setup_true_lang-1DDaNs2W.js → ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js} +2 -2
  40. package/dist/RecordHeader.vue_vue_type_script_setup_true_lang-DKsaKlAq.js +64 -0
  41. package/dist/ResourcePage.vue_vue_type_script_setup_true_lang-CJcKa9SW.js +173 -0
  42. package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-DuEPOmjI.js +299 -0
  43. package/dist/RolePage-bZzv_E4l.js +315 -0
  44. package/dist/RolesPage-BniZv0nB.js +115 -0
  45. package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +23 -0
  46. package/dist/SectionList.vue_vue_type_script_setup_true_lang-BKP_bge8.js +148 -0
  47. package/dist/SectionNavigator.vue_vue_type_script_setup_true_lang-BgGEGxSI.js +314 -0
  48. package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BZ9UdgA1.js +58 -0
  49. package/dist/SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js +422 -0
  50. package/dist/SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js +111 -0
  51. package/dist/Sessions-Co5-xdeb.js +96 -0
  52. package/dist/Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js +142 -0
  53. package/dist/SignIn-BWwFbxki.js +140 -0
  54. package/dist/SignInPage-FnLtoi2q.js +60 -0
  55. package/dist/SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js +79 -0
  56. package/dist/SignIns-3UcI64_h.js +66 -0
  57. package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-4I8m27ol.js +93 -0
  58. package/dist/Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js +155 -0
  59. package/dist/TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js +269 -0
  60. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CU3KTKIJ.js +127 -0
  61. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CSY_mMm1.js → Timestamp.vue_vue_type_script_setup_true_lang-1RJGKxbD.js} +1 -1
  62. package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-BJWPVyfT.js → Tooltip.vue_vue_type_script_setup_true_lang-OOD_XNWx.js} +1 -1
  63. package/dist/UserRecord-Ci8HfwbX.js +267 -0
  64. package/dist/UsersList-vEJ-cgkT.js +155 -0
  65. package/dist/ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js +28 -0
  66. package/dist/access/AddRoleDialog.vue.d.ts +19 -0
  67. package/dist/access/BindingRow.vue.d.ts +19 -0
  68. package/dist/access/EffectiveAccess.vue.d.ts +12 -0
  69. package/dist/access/NewRolePage.vue.d.ts +2 -0
  70. package/dist/access/PermissionTree.vue.d.ts +13 -0
  71. package/dist/access/PersonAccess.vue.d.ts +21 -0
  72. package/dist/access/ReplaceRoleDialog.vue.d.ts +17 -0
  73. package/dist/access/RoleCompareDialog.vue.d.ts +14 -0
  74. package/dist/access/RoleEditor.vue.d.ts +28 -0
  75. package/dist/access/RolePage.vue.d.ts +2 -0
  76. package/dist/access/RolesPage.vue.d.ts +2 -0
  77. package/dist/access/api.d.ts +26 -0
  78. package/dist/access/catalogue.d.ts +64 -0
  79. package/dist/access/context.d.ts +20 -0
  80. package/dist/access/effective.d.ts +42 -0
  81. package/dist/access/feature.d.ts +27 -0
  82. package/dist/access/index.d.ts +13 -0
  83. package/dist/access/index.js +15 -0
  84. package/dist/access/labels.d.ts +35 -0
  85. package/dist/access/refusals.d.ts +6 -0
  86. package/dist/access/routes.d.ts +45 -0
  87. package/dist/access/scopes.d.ts +20 -0
  88. package/dist/app/application.d.ts +5 -0
  89. package/dist/app/contributions.d.ts +1 -1
  90. package/dist/app/environment.d.ts +2 -0
  91. package/dist/app/feature.d.ts +8 -0
  92. package/dist/app/index.js +260 -294
  93. package/dist/bottomDock-BZEiOPYZ.js +12 -0
  94. package/dist/button/Button.vue.d.ts +3 -3
  95. package/dist/button/index.d.ts +1 -1
  96. package/dist/button/index.js +5 -3
  97. package/dist/button/shortcut.d.ts +28 -2
  98. package/dist/chrome-BS3xJcad.js +93 -0
  99. package/dist/client/client.d.ts +13 -0
  100. package/dist/client/index.d.ts +3 -1
  101. package/dist/client/index.js +19 -138
  102. package/dist/client/route.d.ts +59 -0
  103. package/dist/client-Bw0aM5Gu.js +147 -0
  104. package/dist/closeOverlays-CjVsIrpL.js +8 -0
  105. package/dist/collection/CollectionPage.vue.d.ts +1 -0
  106. package/dist/collection/CollectionRows.vue.d.ts +59 -0
  107. package/dist/collection/CollectionTable.vue.d.ts +1 -1
  108. package/dist/collection/DataTable.vue.d.ts +47 -0
  109. package/dist/collection/RowActions.vue.d.ts +19 -0
  110. package/dist/collection/columns.d.ts +2 -0
  111. package/dist/collection/http.d.ts +4 -2
  112. package/dist/collection/index.d.ts +4 -2
  113. package/dist/collection/index.js +87 -2299
  114. package/dist/collection/rowLayout.d.ts +10 -0
  115. package/dist/collection/slots.d.ts +6 -3
  116. package/dist/content/index.js +37 -66
  117. package/dist/contributions-CDDg3fKp.js +26 -0
  118. package/dist/controls/DateButton.vue.d.ts +1 -1
  119. package/dist/controls/PopupButton.vue.d.ts +1 -1
  120. package/dist/controls/index.js +11 -10
  121. package/dist/defineRoutes-BGAdiIrt.js +19 -0
  122. package/dist/describeError-Ctga6GcS.js +41 -0
  123. package/dist/dialogStack-DZZg55w0.js +31 -0
  124. package/dist/environment-Dva-SG8D.js +6 -0
  125. package/dist/{error-Bb_dr_Ay.js → error-CD7x0Jrz.js} +2 -2
  126. package/dist/feature-DdUAfyi4.js +25 -0
  127. package/dist/fieldMessages-C3Rpbktw.js +25 -0
  128. package/dist/form/CheckboxField.vue.d.ts +1 -1
  129. package/dist/form/CommandDialog.vue.d.ts +13 -2
  130. package/dist/form/DateField.vue.d.ts +1 -1
  131. package/dist/form/DateTimeField.vue.d.ts +1 -1
  132. package/dist/form/EditorPage.vue.d.ts +1 -1
  133. package/dist/form/Field.vue.d.ts +1 -1
  134. package/dist/form/FileField.vue.d.ts +1 -1
  135. package/dist/form/FormGroup.vue.d.ts +1 -1
  136. package/dist/form/FormGroupButton.vue.d.ts +1 -1
  137. package/dist/form/FormRow.vue.d.ts +1 -1
  138. package/dist/form/I18nField.vue.d.ts +3 -3
  139. package/dist/form/MoneyField.vue.d.ts +1 -1
  140. package/dist/form/MonthYearField.vue.d.ts +1 -1
  141. package/dist/form/MultiSelectField.vue.d.ts +4 -1
  142. package/dist/form/NumberCell.vue.d.ts +1 -1
  143. package/dist/form/NumberField.vue.d.ts +8 -2
  144. package/dist/form/OptionList.vue.d.ts +6 -2
  145. package/dist/form/OtpInput.vue.d.ts +2 -2
  146. package/dist/form/PhotoField.vue.d.ts +1 -1
  147. package/dist/form/SelectField.vue.d.ts +4 -1
  148. package/dist/form/SwitchField.vue.d.ts +1 -1
  149. package/dist/form/TextField.vue.d.ts +3 -3
  150. package/dist/form/TextareaField.vue.d.ts +3 -3
  151. package/dist/form/TimeField.vue.d.ts +1 -1
  152. package/dist/form/date/DatePickerSheet.vue.d.ts +1 -1
  153. package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
  154. package/dist/form/index.d.ts +2 -0
  155. package/dist/form/index.js +1273 -3509
  156. package/dist/form/suggestions.d.ts +11 -0
  157. package/dist/form/useOptions.d.ts +60 -0
  158. package/dist/guards-Cd1V28oG.js +51 -0
  159. package/dist/http-DGGSKWvU.js +193 -0
  160. package/dist/i18n/describeError.d.ts +31 -0
  161. package/dist/i18n/index.d.ts +307 -0
  162. package/dist/i18n/index.js +54 -52
  163. package/dist/icon/core.d.ts +13 -0
  164. package/dist/icon/index.js +1 -1
  165. package/dist/identity/ImpersonationBanner.vue.d.ts +2 -0
  166. package/dist/identity/LocaleSync.vue.d.ts +2 -0
  167. package/dist/identity/SessionExpiry.vue.d.ts +2 -0
  168. package/dist/identity/SignInAsButton.vue.d.ts +15 -0
  169. package/dist/identity/SignInPage.vue.d.ts +2 -0
  170. package/dist/identity/context.d.ts +7 -0
  171. package/dist/identity/feature.d.ts +16 -0
  172. package/dist/identity/fieldMessages.d.ts +15 -0
  173. package/dist/identity/index.d.ts +16 -0
  174. package/dist/identity/index.js +18 -0
  175. package/dist/identity/profile/DetailsPanel.vue.d.ts +11 -0
  176. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +14 -0
  177. package/dist/identity/profile/EmailPanel.vue.d.ts +11 -0
  178. package/dist/identity/profile/PanelActions.vue.d.ts +17 -0
  179. package/dist/identity/profile/PasswordPanel.vue.d.ts +2 -0
  180. package/dist/identity/profile/ProfileMenuItem.vue.d.ts +2 -0
  181. package/dist/identity/profile/ProfilePage.vue.d.ts +2 -0
  182. package/dist/identity/profile/SessionsPanel.vue.d.ts +2 -0
  183. package/dist/identity/profile/SignInsPanel.vue.d.ts +2 -0
  184. package/dist/identity/profile/VerifyCode.vue.d.ts +49 -0
  185. package/dist/identity/profile/routes.d.ts +13 -0
  186. package/dist/identity/session.d.ts +30 -0
  187. package/dist/identity/shared/ActionRow.vue.d.ts +20 -0
  188. package/dist/identity/shared/ChangeFeed.vue.d.ts +11 -0
  189. package/dist/identity/shared/PageBar.vue.d.ts +12 -0
  190. package/dist/identity/shared/SectionIntro.vue.d.ts +16 -0
  191. package/dist/identity/shared/SessionList.vue.d.ts +19 -0
  192. package/dist/{phone/CountryFlag.vue.d.ts → identity/shared/SignInTable.vue.d.ts} +5 -4
  193. package/dist/identity/shared/ViewTabs.vue.d.ts +23 -0
  194. package/dist/identity/shared/signInEvents.d.ts +9 -0
  195. package/dist/identity/signIn.d.ts +27 -0
  196. package/dist/identity/useSignInForm.d.ts +20 -0
  197. package/dist/identity/user.d.ts +6 -0
  198. package/dist/identity/users/DeactivateDialog.vue.d.ts +18 -0
  199. package/dist/identity/users/NewUserDialog.vue.d.ts +9 -0
  200. package/dist/identity/users/SetPasswordDialog.vue.d.ts +16 -0
  201. package/dist/identity/users/UserRecord.vue.d.ts +2 -0
  202. package/dist/identity/users/UsersList.vue.d.ts +2 -0
  203. package/dist/identity/users/access.d.ts +4 -0
  204. package/dist/identity/users/context.d.ts +9 -0
  205. package/dist/identity/users/feature.d.ts +34 -0
  206. package/dist/identity/users/languages.d.ts +4 -0
  207. package/dist/identity/users/list.d.ts +8 -0
  208. package/dist/identity/users/person.d.ts +26 -0
  209. package/dist/identity/users/personSections.d.ts +22 -0
  210. package/dist/identity/users/routes.d.ts +22 -0
  211. package/dist/identity/users/sections/Activity.vue.d.ts +2 -0
  212. package/dist/identity/users/sections/Changes.vue.d.ts +2 -0
  213. package/dist/identity/users/sections/General.vue.d.ts +2 -0
  214. package/dist/identity/users/sections/Sessions.vue.d.ts +2 -0
  215. package/dist/identity/users/sections/SignIn.vue.d.ts +2 -0
  216. package/dist/identity/users/sections/SignIns.vue.d.ts +2 -0
  217. package/dist/identity/users/status.d.ts +4 -0
  218. package/dist/index-B2dbYZR9.js +706 -0
  219. package/dist/index-BAcl44SC.js +459 -0
  220. package/dist/index.d.ts +1 -1
  221. package/dist/index.js +1 -1
  222. package/dist/internal/CountryFlag.vue.d.ts +10 -0
  223. package/dist/internal/languageName.d.ts +2 -0
  224. package/dist/keepAlive-WYQGRhuz.js +48 -0
  225. package/dist/languageName-CItV_SOv.js +11 -0
  226. package/dist/languages-BShG9LpE.js +10 -0
  227. package/dist/leaveGuard-Cc8yeLxM.js +72 -0
  228. package/dist/modal/Modal.vue.d.ts +4 -0
  229. package/dist/modal/ShortcutHelp.vue.d.ts +2 -0
  230. package/dist/modal/index.d.ts +2 -0
  231. package/dist/modal/index.js +64 -6
  232. package/dist/modal/placement.d.ts +22 -0
  233. package/dist/modules/access/entities.d.ts +112 -0
  234. package/dist/modules/access/routes.d.ts +67 -0
  235. package/dist/modules/access/schemas.d.ts +73 -0
  236. package/dist/modules/identity/entities.d.ts +150 -0
  237. package/dist/modules/identity/routes.d.ts +118 -0
  238. package/dist/modules/identity/schemas.d.ts +145 -0
  239. package/dist/{navigation-B33ikiCS.js → navigation-BPWa63ge.js} +21 -20
  240. package/dist/neighbors-D0WRBxXI.js +86 -0
  241. package/dist/{options-CjSz2dQK.js → options-BXkMR63B.js} +48 -49
  242. package/dist/overlay/AlertDialog.vue.d.ts +3 -3
  243. package/dist/overlay/Popover.vue.d.ts +4 -1
  244. package/dist/overlay/closeOverlays.d.ts +7 -0
  245. package/dist/overlay/dialogStack.d.ts +9 -0
  246. package/dist/overlay/index.d.ts +1 -1
  247. package/dist/overlay/index.js +20 -18
  248. package/dist/page/AdaptivePageShell.vue.d.ts +2 -2
  249. package/dist/page/ResourceHeader.vue.d.ts +2 -2
  250. package/dist/page/index.js +99 -457
  251. package/dist/phone/PhoneField.vue.d.ts +2 -2
  252. package/dist/phone/index.js +247 -540
  253. package/dist/platform/AccessGate.vue.d.ts +50 -0
  254. package/dist/platform/index.d.ts +4 -2
  255. package/dist/platform/index.js +38 -35
  256. package/dist/platform/platform.d.ts +2 -2
  257. package/dist/platform/session.d.ts +22 -1
  258. package/dist/platform-hunMqFdB.js +255 -0
  259. package/dist/resource/index.js +8 -248
  260. package/dist/routeResource-DstM0hvf.js +82 -0
  261. package/dist/router/guards.d.ts +7 -1
  262. package/dist/router/index.js +23 -37
  263. package/dist/router/navigation.d.ts +1 -1
  264. package/dist/rowLayout-BI7a3Kom.js +603 -0
  265. package/dist/sectionIndex-BS0ic5W7.js +86 -0
  266. package/dist/{sections-LtxV5Mtk.js → sections-BEqW1dOc.js} +1 -1
  267. package/dist/shell/AccountMenuItem.vue.d.ts +4 -1
  268. package/dist/shell/BackofficeShell.vue.d.ts +2 -2
  269. package/dist/shell/ShellBrand.vue.d.ts +1 -1
  270. package/dist/shell/backofficeShell.d.ts +1 -1
  271. package/dist/shell/identity.d.ts +1 -1
  272. package/dist/shell/index.js +476 -532
  273. package/dist/state/Badge.vue.d.ts +17 -10
  274. package/dist/state/ProgressTrack.vue.d.ts +1 -1
  275. package/dist/state/hue.d.ts +8 -0
  276. package/dist/state/index.d.ts +2 -0
  277. package/dist/state/index.js +34 -31
  278. package/dist/state/useLoad.d.ts +41 -0
  279. package/dist/status-C9aXR-Jb.js +33 -0
  280. package/dist/styles.css +1 -1
  281. package/dist/suggestions-BJAqOj4c.js +138 -0
  282. package/dist/testing/app.d.ts +61 -0
  283. package/dist/testing/async.d.ts +12 -0
  284. package/dist/testing/collection.d.ts +18 -0
  285. package/dist/testing/format.d.ts +9 -0
  286. package/dist/testing/i18n.d.ts +16 -0
  287. package/dist/testing/index.d.ts +14 -0
  288. package/dist/testing/index.js +178 -0
  289. package/dist/testing/media.d.ts +23 -0
  290. package/dist/testing/platform.d.ts +40 -0
  291. package/dist/testing/transport.d.ts +40 -0
  292. package/dist/toast-D9Z5To38.js +13 -0
  293. package/dist/useCommand-BgRwnYlV.js +135 -0
  294. package/dist/{useDialog-wmyNx2j_.js → useDialog-CXR3hN0G.js} +1 -1
  295. package/dist/useLoad-CYRVx6HW.js +39 -0
  296. package/dist/useResourceForm-Bgc9jMcu.js +52 -0
  297. package/dist/useSaveChrome-chi6D3HY.js +25 -0
  298. package/dist/useSheetDrag-OsD6Eb6I.js +72 -0
  299. package/package.json +26 -5
  300. package/src/styles/theme.css +60 -0
  301. package/dist/Badge.vue_vue_type_script_setup_true_lang-DKc6ugmr.js +0 -31
  302. package/dist/Button.vue_vue_type_script_setup_true_lang-3f0emVNU.js +0 -141
  303. package/dist/NoAccess.vue_vue_type_script_setup_true_lang-OKW8pKYU.js +0 -78
  304. package/dist/SectionList.vue_vue_type_script_setup_true_lang-DGcKX_OJ.js +0 -230
  305. package/dist/SelectField.vue_vue_type_script_setup_true_lang-SyFWE33A.js +0 -422
  306. package/dist/Sheet.vue_vue_type_script_setup_true_lang-BLBD5ps8.js +0 -210
  307. package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-CGTuEnTv.js +0 -243
  308. package/dist/chrome-D9pwD6iS.js +0 -101
  309. package/dist/dialogStack-DiTG1rZc.js +0 -26
  310. package/dist/environment-D3nozt9a.js +0 -75
  311. package/dist/feature-DyDtyMLU.js +0 -47
  312. package/dist/platform-jqlKVJ2e.js +0 -244
  313. package/dist/toast-BTeX0r66.js +0 -129
  314. /package/dist/{phone → internal}/flagLoaders.d.ts +0 -0
@@ -0,0 +1,135 @@
1
+ import { nextTick as f, defineComponent as L, useTemplateRef as p, ref as w, watch as S, onBeforeUnmount as x, computed as E, openBlock as v, createBlock as T, unref as c, createSlots as $, withCtx as y, createElementVNode as C, createElementBlock as D, toDisplayString as B, createCommentVNode as N, createVNode as z, renderSlot as g } from "vue";
2
+ import { useI18n as V } from "vue-i18n";
3
+ import { f as q } from "./useDialog-CXR3hN0G.js";
4
+ import { _ as A } from "./Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js";
5
+ import { D as F } from "./useWaitStatus-fsacMl4W.js";
6
+ import { _ as O, u as I } from "./FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js";
7
+ import { a as R } from "./leaveGuard-Cc8yeLxM.js";
8
+ const d = "input:not([type=hidden]):not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";
9
+ async function U(t = document, n) {
10
+ const e = [...t.querySelectorAll("[data-field-error]")], s = e.find((a) => a.matches(d) || a.querySelector(d)) ?? e[0];
11
+ if (!s) return !1;
12
+ const r = n?.sections.value.find((a) => a.element.contains(s));
13
+ r && (await n?.scrollTo(r.id, { updateUrl: !1 }), await f());
14
+ const o = s.matches(d) ? s : s.querySelector(d);
15
+ return (o ?? s).scrollIntoView?.({ block: "center" }), (o ?? s).focus({ preventScroll: !0 }), !0;
16
+ }
17
+ const Q = (t) => ({ "data-field-key": t }), G = {
18
+ key: 0,
19
+ class: "text-body text-content-muted"
20
+ }, X = /* @__PURE__ */ L({
21
+ __name: "CommandDialog",
22
+ props: {
23
+ command: {},
24
+ title: {},
25
+ subtitle: { default: void 0 },
26
+ confirmLabel: {},
27
+ doneLabel: { default: void 0 },
28
+ busyLabel: { default: void 0 },
29
+ message: { default: void 0 },
30
+ size: { default: "sm" },
31
+ fieldLabel: { type: Function, default: void 0 }
32
+ },
33
+ emits: ["done"],
34
+ setup(t, { emit: n }) {
35
+ const e = t, s = n, { t: r } = V(), o = p("modal"), a = p("body"), u = w(!1);
36
+ let m = null;
37
+ const { confirmDiscard: _ } = R(() => e.command.open.value && e.command.form.dirty.value);
38
+ S(() => e.command.open.value, (i) => {
39
+ i ? (u.value = !1, o.value?.present()) : o.value?.dismiss();
40
+ });
41
+ async function b(i = {}) {
42
+ const l = await e.command.run();
43
+ if (l.status === "failed") {
44
+ l.failure.kind === "invalid" && await f().then(() => U(a.value ?? document));
45
+ return;
46
+ }
47
+ if (l.status !== "aborted") {
48
+ if (s("done"), i.addAnother) {
49
+ e.command.present(), await f(), q(a.value)[0]?.focus();
50
+ return;
51
+ }
52
+ u.value = !0, m = setTimeout(() => e.command.dismiss(), F);
53
+ }
54
+ }
55
+ x(() => {
56
+ m && clearTimeout(m);
57
+ });
58
+ const k = E(() => e.command.form.submitting.value ? "processing" : u.value ? "done" : "idle");
59
+ return (i, l) => (v(), T(A, {
60
+ ref_key: "modal",
61
+ ref: o,
62
+ size: e.size,
63
+ grouped: "",
64
+ title: e.title,
65
+ subtitle: e.subtitle,
66
+ "before-dismiss": c(_),
67
+ "primary-label": e.confirmLabel,
68
+ status: k.value,
69
+ "processing-label": e.busyLabel ?? c(r)("core.actions.saving"),
70
+ "done-label": e.doneLabel ?? c(r)("core.actions.saved"),
71
+ onPrimary: l[0] || (l[0] = (h) => b()),
72
+ onDismissed: l[1] || (l[1] = (h) => e.command.dismiss())
73
+ }, $({
74
+ default: y(() => [
75
+ C("div", {
76
+ ref_key: "body",
77
+ ref: a,
78
+ class: "flex min-w-0 flex-col gap-group-gap",
79
+ "data-test": "command-dialog"
80
+ }, [
81
+ e.message ? (v(), D("p", G, B(e.message), 1)) : N("", !0),
82
+ z(O, {
83
+ form: e.command.form,
84
+ label: e.fieldLabel,
85
+ scope: a.value
86
+ }, null, 8, ["form", "label", "scope"]),
87
+ g(i.$slots, "default")
88
+ ], 512)
89
+ ]),
90
+ _: 2
91
+ }, [
92
+ i.$slots.actions ? {
93
+ name: "actions",
94
+ fn: y(() => [
95
+ g(i.$slots, "actions", {
96
+ run: b,
97
+ busy: e.command.form.submitting.value
98
+ })
99
+ ]),
100
+ key: "0"
101
+ } : void 0
102
+ ]), 1032, ["size", "title", "subtitle", "before-dismiss", "primary-label", "status", "processing-label", "done-label"]));
103
+ }
104
+ });
105
+ function Y(t) {
106
+ const n = I(t), e = w(!1), s = () => typeof t.defaults == "function" ? t.defaults() : t.defaults;
107
+ async function r() {
108
+ return await n.submit(t.run, {
109
+ // The page updating itself after the call is the refresh: its failure is "saved, but could not be read back".
110
+ refresh: t.done ? (a) => t.done?.(a) : void 0
111
+ });
112
+ }
113
+ return {
114
+ form: n,
115
+ open: e,
116
+ present(o) {
117
+ n.hydrate({ ...s(), ...o }), e.value = !0;
118
+ },
119
+ dismiss() {
120
+ e.value = !1;
121
+ },
122
+ run: r,
123
+ async confirm() {
124
+ const o = await r();
125
+ if (o.status === "failed") throw new Error(o.failure.message);
126
+ if (o.status === "aborted") throw new Error("aborted");
127
+ }
128
+ };
129
+ }
130
+ export {
131
+ X as _,
132
+ Q as a,
133
+ U as f,
134
+ Y as u
135
+ };
@@ -1,5 +1,5 @@
1
1
  import { ref as A, watch as F, onUnmounted as T, nextTick as y } from "vue";
2
- import { u as I } from "./dialogStack-DiTG1rZc.js";
2
+ import { a as I } from "./dialogStack-DZZg55w0.js";
3
3
  const S = [
4
4
  "a[href]",
5
5
  "area[href]",
@@ -0,0 +1,39 @@
1
+ import { shallowRef as h, watch as k, getCurrentScope as y, onScopeDispose as C, computed as v } from "vue";
2
+ import { useI18n as D } from "vue-i18n";
3
+ import { u as E } from "./describeError-Ctga6GcS.js";
4
+ function I(f, t = {}) {
5
+ const { t: m } = D(), g = E(), p = t.errorMessage ?? ((a) => g(a, { fallback: m("core.resource.unavailable") })), e = h({ status: "loading" });
6
+ let s = 0, u = null;
7
+ function l() {
8
+ return u?.abort(), u = null, ++s;
9
+ }
10
+ async function o() {
11
+ const a = l(), i = e.value, r = "value" in i ? i : null;
12
+ e.value = r ? { status: "refreshing", value: r.value } : { status: "loading" };
13
+ const c = new AbortController();
14
+ u = c;
15
+ try {
16
+ const n = await f({ signal: c.signal });
17
+ a === s && (e.value = { status: "loaded", value: n });
18
+ } catch (n) {
19
+ if (a !== s) return;
20
+ const d = p(n);
21
+ e.value = r ? { status: "stale", value: r.value, error: d } : { status: "failed", error: d };
22
+ }
23
+ }
24
+ function w(a) {
25
+ l(), e.value = { status: "loaded", value: a };
26
+ }
27
+ function b() {
28
+ e.value = { status: "loading" }, o();
29
+ }
30
+ return t.watch !== void 0 ? k(t.watch, b, { immediate: t.immediate ?? !0 }) : (t.immediate ?? !0) && o(), y() && C(l), {
31
+ state: v(() => e.value),
32
+ data: v(() => "value" in e.value ? e.value.value : null),
33
+ reload: o,
34
+ update: w
35
+ };
36
+ }
37
+ export {
38
+ I as u
39
+ };
@@ -0,0 +1,52 @@
1
+ import { shallowRef as v, watch as m, computed as f } from "vue";
2
+ import { u as i, c as h } from "./FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js";
3
+ function b(u) {
4
+ const t = i(u), r = v(null), s = v(!1);
5
+ let n = null;
6
+ function c(e) {
7
+ r.value = e, n = u.source.id.value, s.value = !1, t.hydrate(u.toValues(e));
8
+ }
9
+ m(
10
+ u.source.data,
11
+ (e) => {
12
+ !e || e === r.value || (n !== u.source.id.value || !t.dirty.value ? c(e) : (r.value = e, s.value = !0));
13
+ },
14
+ { immediate: !0, flush: "sync" }
15
+ );
16
+ async function d(e) {
17
+ return t.submit(
18
+ async (a, l) => {
19
+ const o = r.value;
20
+ if (!o) throw new Error("useResourceForm: the record is not loaded, so there is nothing to save.");
21
+ return u.save(a, o, l);
22
+ },
23
+ {
24
+ refresh: e?.refresh,
25
+ // The saved record is the new truth, unless the user has moved on to another record meanwhile.
26
+ hydrateFrom: (a) => {
27
+ const l = r.value;
28
+ return r.value = a, u.source.update(a) ? (s.value = !1, u.toValues(a)) : (r.value = l, null);
29
+ }
30
+ }
31
+ );
32
+ }
33
+ return {
34
+ ...t,
35
+ record: f(() => r.value),
36
+ outdated: f(() => s.value),
37
+ save: d,
38
+ rebase(e = []) {
39
+ const a = u.source.data.value;
40
+ if (!a || u.source.state.value.status !== "loaded") return !1;
41
+ const l = Object.fromEntries(e.map((o) => [o, h(t.values[o])]));
42
+ return c(a), Object.assign(t.values, l), !0;
43
+ },
44
+ reset() {
45
+ const e = r.value;
46
+ e && s.value ? c(e) : t.reset();
47
+ }
48
+ };
49
+ }
50
+ export {
51
+ b as u
52
+ };
@@ -0,0 +1,25 @@
1
+ import { computed as u, toValue as r } from "vue";
2
+ import { useI18n as n } from "vue-i18n";
3
+ import { u as s } from "./chrome-BS3xJcad.js";
4
+ import { a as m } from "./leaveGuard-Cc8yeLxM.js";
5
+ function d(e) {
6
+ const { t: a } = n(), l = u(() => (r(e.ready) ?? !0) && (r(e.allowed) ?? !0)), c = u(() => l.value && e.form.dirty.value);
7
+ m(() => l.value && e.form.dirty.value), s({
8
+ actions: () => l.value ? [
9
+ {
10
+ id: e.id ?? "save",
11
+ label: r(e.label) ?? a("core.actions.save"),
12
+ shortLabel: a("core.actions.save"),
13
+ icon: "save",
14
+ placement: "primary",
15
+ processing: e.form.submitting.value,
16
+ onClick: e.save
17
+ }
18
+ ] : [],
19
+ leading: () => c.value ? { id: `${e.id ?? "save"}-cancel`, label: a("core.actions.cancel"), prominence: "plain", onClick: e.cancel } : null,
20
+ status: () => c.value ? a("core.form.unsaved_changes") : null
21
+ });
22
+ }
23
+ export {
24
+ d as u
25
+ };
@@ -0,0 +1,72 @@
1
+ import { ref as p, computed as S } from "vue";
2
+ const D = 120, P = 0.5, C = 40;
3
+ function H({ enabled: l, panel: f, body: T, onDismiss: I }) {
4
+ const o = p(0), n = p(!1);
5
+ let u = 0, s = 0, i = 0, c = 0, v = !1, a = !1;
6
+ function h(t, e) {
7
+ l.value && (u = s = t, i = performance.now(), c = 0, v = e, a = !0, n.value = !e);
8
+ }
9
+ function d(t) {
10
+ if (!a) return !1;
11
+ const e = t - u;
12
+ if (!n.value) {
13
+ const m = (T.value?.scrollTop ?? 0) <= 0;
14
+ if (!v || !m || e <= 0)
15
+ return (e < 0 || !m) && (a = !1), !1;
16
+ n.value = !0, u = t;
17
+ }
18
+ const g = performance.now();
19
+ return c = (t - s) / Math.max(g - i, 1), s = t, i = g, o.value = Math.max(0, t - u), !0;
20
+ }
21
+ async function r() {
22
+ if (!a || (a = !1, !n.value)) return;
23
+ n.value = !1;
24
+ const t = c > P && o.value > C;
25
+ if (o.value > D || t) {
26
+ const e = o.value;
27
+ if (await I()) {
28
+ o.value = Math.max(e, f.value?.offsetHeight ?? window.innerHeight);
29
+ return;
30
+ }
31
+ }
32
+ o.value = 0;
33
+ }
34
+ function w() {
35
+ a = !1, n.value = !1, o.value = 0;
36
+ }
37
+ const M = {
38
+ onPointerdown(t) {
39
+ t.button === 0 && (t.target?.closest('button, a, input, [role="button"]') || (t.currentTarget.setPointerCapture(t.pointerId), h(t.clientY, !1)));
40
+ },
41
+ onPointermove(t) {
42
+ if (t.buttons === 0) {
43
+ r();
44
+ return;
45
+ }
46
+ d(t.clientY);
47
+ },
48
+ onPointerup: () => void r(),
49
+ onPointercancel: () => void r()
50
+ }, b = {
51
+ onTouchstartPassive(t) {
52
+ const e = t.touches[0];
53
+ e && t.touches.length === 1 && h(e.clientY, !0);
54
+ },
55
+ onTouchmove(t) {
56
+ const e = t.touches[0];
57
+ e && d(e.clientY) && t.cancelable && t.preventDefault();
58
+ },
59
+ onTouchend: () => void r(),
60
+ onTouchcancel: () => void r()
61
+ }, x = S(
62
+ () => !l.value || o.value === 0 ? void 0 : { transform: `translateY(${o.value}px)` }
63
+ ), y = S(() => {
64
+ if (!l.value || o.value === 0) return;
65
+ const t = f.value?.offsetHeight || window.innerHeight;
66
+ return { opacity: String(Math.max(0, 1 - o.value / t)) };
67
+ });
68
+ return { dragOffset: o, dragging: n, handleEvents: M, bodyEvents: b, panelStyle: x, backdropStyle: y, reset: w };
69
+ }
70
+ export {
71
+ H as u
72
+ };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@wssto2/vue-core",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
+ "goCore": "v1.6.0",
4
5
  "description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
5
6
  "keywords": [
6
7
  "vue",
@@ -107,6 +108,18 @@
107
108
  "types": "./dist/phone/index.d.ts",
108
109
  "import": "./dist/phone/index.js"
109
110
  },
111
+ "./identity": {
112
+ "types": "./dist/identity/index.d.ts",
113
+ "import": "./dist/identity/index.js"
114
+ },
115
+ "./access": {
116
+ "types": "./dist/access/index.d.ts",
117
+ "import": "./dist/access/index.js"
118
+ },
119
+ "./testing": {
120
+ "types": "./dist/testing/index.d.ts",
121
+ "import": "./dist/testing/index.js"
122
+ },
110
123
  "./styles.css": "./dist/styles.css",
111
124
  "./tailwind.css": "./src/styles/tailwind.css",
112
125
  "./fonts.css": "./src/styles/fonts.css",
@@ -119,18 +132,22 @@
119
132
  "lint": "eslint . && node scripts/check-src-imports.mjs",
120
133
  "typecheck": "vue-tsc --noEmit",
121
134
  "typecheck:docs": "vue-tsc --noEmit -p docs/examples/tsconfig.json",
135
+ "typecheck:fixtures": "vue-tsc --noEmit -p test-data/tsconfig.json",
122
136
  "test": "vitest run",
123
137
  "build": "vite build && vite build -c vite.styles.config.ts && vue-tsc -p tsconfig.build.json",
124
138
  "check:consumer": "node scripts/check-consumer.mjs",
125
- "check": "npm run lint && npm run typecheck && npm run typecheck:docs && npm run check:docs && npm run test && npm run build && npm run check:consumer",
139
+ "check": "npm run lint && npm run typecheck && npm run typecheck:docs && npm run typecheck:fixtures && npm run check:modules && npm run check:docs && npm run test && npm run build && npm run check:consumer",
126
140
  "check:docs": "node scripts/check-docs.mjs",
127
- "prepublishOnly": "npm run check"
141
+ "prepublishOnly": "npm run check",
142
+ "modules:sync": "node scripts/modules.mjs sync",
143
+ "check:modules": "node scripts/modules.mjs check"
128
144
  },
129
145
  "peerDependencies": {
146
+ "tailwindcss": "^4.0.0",
130
147
  "vue": "^3.5.0",
131
148
  "vue-i18n": "^10.0.0-beta.5",
132
149
  "vue-router": "^4.4.3",
133
- "tailwindcss": "^4.0.0"
150
+ "zod": "^4.0.0"
134
151
  },
135
152
  "devDependencies": {
136
153
  "@eslint/js": "^10.0.1",
@@ -152,7 +169,8 @@
152
169
  "vue-eslint-parser": "^10.4.0",
153
170
  "vue-i18n": "^10.0.8",
154
171
  "vue-router": "^4.5.0",
155
- "vue-tsc": "^2.2.8"
172
+ "vue-tsc": "^2.2.8",
173
+ "zod": "^4.6.5"
156
174
  },
157
175
  "dependencies": {
158
176
  "@floating-ui/dom": "^1.8.0",
@@ -163,6 +181,9 @@
163
181
  "peerDependenciesMeta": {
164
182
  "tailwindcss": {
165
183
  "optional": true
184
+ },
185
+ "zod": {
186
+ "optional": true
166
187
  }
167
188
  }
168
189
  }
@@ -226,6 +226,29 @@
226
226
  --app-status-neutral-surface: #F1F3F2;
227
227
  --app-status-neutral-solid: #5B6763;
228
228
 
229
+ /* Categories: nine hues for telling things apart (a lead's source, a kind), never for a state. Each is a
230
+ content / surface pair like the status roles and is checked for text contrast (AA, 4.5:1) in
231
+ src/state/categoryHues.test.ts. Red, green, orange-brown and sky blue belong to the status roles above,
232
+ so no hue here borrows them. Not for the brand to change. */
233
+ --app-category-amber-content: #766202;
234
+ --app-category-amber-surface: #F6F0DA;
235
+ --app-category-lime-content: #466E00;
236
+ --app-category-lime-surface: #EAF5E0;
237
+ --app-category-teal-content: #057168;
238
+ --app-category-teal-surface: #DBF7F3;
239
+ --app-category-cyan-content: #036E7F;
240
+ --app-category-cyan-surface: #DAF6FC;
241
+ --app-category-blue-content: #3260B9;
242
+ --app-category-blue-surface: #E9F1FE;
243
+ --app-category-indigo-content: #5E57B9;
244
+ --app-category-indigo-surface: #EEEFFF;
245
+ --app-category-violet-content: #7D4BAA;
246
+ --app-category-violet-surface: #F4ECFE;
247
+ --app-category-fuchsia-content: #9B4089;
248
+ --app-category-fuchsia-surface: #FEE9F8;
249
+ --app-category-pink-content: #A73967;
250
+ --app-category-pink-surface: #FFEAF0;
251
+
229
252
  /* Icon tiles: brand = the application's programmes and primary status icons
230
253
  (tile-brand above), anchor = integrations and navigation (also person and
231
254
  record avatars), neutral = system and export */
@@ -342,6 +365,25 @@
342
365
  --app-status-neutral-surface: #293530;
343
366
  --app-status-neutral-solid: #5B6763;
344
367
 
368
+ --app-category-amber-content: #D6BD5C;
369
+ --app-category-amber-surface: #362D0D;
370
+ --app-category-lime-content: #A4CD79;
371
+ --app-category-lime-surface: #253317;
372
+ --app-category-teal-content: #4CD7C8;
373
+ --app-category-teal-surface: #053631;
374
+ --app-category-cyan-content: #4AD2EC;
375
+ --app-category-cyan-surface: #04343D;
376
+ --app-category-blue-content: #9BBEFF;
377
+ --app-category-blue-surface: #202E47;
378
+ --app-category-indigo-content: #B4B5FF;
379
+ --app-category-indigo-surface: #2A2A46;
380
+ --app-category-violet-content: #D1A9FB;
381
+ --app-category-violet-surface: #342742;
382
+ --app-category-fuchsia-content: #EEA0DB;
383
+ --app-category-fuchsia-surface: #3D2437;
384
+ --app-category-pink-content: #FC9CBD;
385
+ --app-category-pink-surface: #42232E;
386
+
345
387
  --app-tile-neutral: #4F5B57;
346
388
 
347
389
  --app-shadow-group: 0 0 0 1px rgb(210 235 226 / 0.04);
@@ -456,6 +498,24 @@
456
498
  --color-status-neutral-content: var(--app-status-neutral-content);
457
499
  --color-status-neutral-surface: var(--app-status-neutral-surface);
458
500
  --color-status-neutral-solid: var(--app-status-neutral-solid);
501
+ --color-category-amber-content: var(--app-category-amber-content);
502
+ --color-category-amber-surface: var(--app-category-amber-surface);
503
+ --color-category-lime-content: var(--app-category-lime-content);
504
+ --color-category-lime-surface: var(--app-category-lime-surface);
505
+ --color-category-teal-content: var(--app-category-teal-content);
506
+ --color-category-teal-surface: var(--app-category-teal-surface);
507
+ --color-category-cyan-content: var(--app-category-cyan-content);
508
+ --color-category-cyan-surface: var(--app-category-cyan-surface);
509
+ --color-category-blue-content: var(--app-category-blue-content);
510
+ --color-category-blue-surface: var(--app-category-blue-surface);
511
+ --color-category-indigo-content: var(--app-category-indigo-content);
512
+ --color-category-indigo-surface: var(--app-category-indigo-surface);
513
+ --color-category-violet-content: var(--app-category-violet-content);
514
+ --color-category-violet-surface: var(--app-category-violet-surface);
515
+ --color-category-fuchsia-content: var(--app-category-fuchsia-content);
516
+ --color-category-fuchsia-surface: var(--app-category-fuchsia-surface);
517
+ --color-category-pink-content: var(--app-category-pink-content);
518
+ --color-category-pink-surface: var(--app-category-pink-surface);
459
519
 
460
520
  --color-tile-brand: var(--app-tile-brand);
461
521
  --color-tile-brand-foreground: var(--app-tile-brand-foreground);
@@ -1,31 +0,0 @@
1
- import { defineComponent as c, openBlock as n, createElementBlock as s, normalizeClass as a, createCommentVNode as u, renderSlot as d } from "vue";
2
- const l = /* @__PURE__ */ c({
3
- __name: "Badge",
4
- props: {
5
- tone: { default: "neutral" },
6
- dot: { type: Boolean, default: !1 }
7
- },
8
- setup(o) {
9
- const t = o, e = {
10
- neutral: { badge: "bg-status-neutral-surface text-status-neutral-content", dot: "bg-status-neutral-content" },
11
- info: { badge: "bg-status-info-surface text-status-info-content", dot: "bg-status-info-content" },
12
- positive: { badge: "bg-status-success-surface text-status-success-content", dot: "bg-status-success-content" },
13
- warning: { badge: "bg-status-warning-surface text-status-warning-content", dot: "bg-status-warning-content" },
14
- critical: { badge: "bg-status-danger-surface text-status-danger-content", dot: "bg-status-danger-content" },
15
- context: { badge: "bg-surface-cell text-content", dot: "bg-content-disabled" }
16
- };
17
- return (r, g) => (n(), s("span", {
18
- class: a(["inline-flex items-center gap-x-1.5 whitespace-nowrap rounded-md px-2 py-0.5 text-xs font-medium ring-1 ring-inset ring-current/20", e[t.tone].badge])
19
- }, [
20
- t.dot ? (n(), s("span", {
21
- key: 0,
22
- class: a(["size-1.5 shrink-0 rounded-full", e[t.tone].dot]),
23
- "aria-hidden": "true"
24
- }, null, 2)) : u("", !0),
25
- d(r.$slots, "default")
26
- ], 2));
27
- }
28
- });
29
- export {
30
- l as _
31
- };
@@ -1,141 +0,0 @@
1
- import { watchEffect as E, toValue as z, defineComponent as L, useSlots as S, useTemplateRef as B, computed as m, openBlock as v, createBlock as I, unref as N, withCtx as R, createElementVNode as T, mergeProps as g, createVNode as y, createElementBlock as k, h as x } from "vue";
2
- import { RouterLink as V } from "vue-router";
3
- import { _ as h } from "./Icon.vue_vue_type_script_lang-DtC4_mkz.js";
4
- import { u as D } from "./useWaitStatus-fsacMl4W.js";
5
- function M(t, o) {
6
- return t.key.toLowerCase() === o.key.toLowerCase() && t.ctrlKey === (o.ctrlKey ?? !1) && t.shiftKey === (o.shiftKey ?? !1) && t.altKey === (o.altKey ?? !1) && t.metaKey === (o.metaKey ?? !1);
7
- }
8
- function P(t) {
9
- return t instanceof HTMLElement && (t.isContentEditable || /^(input|textarea|select)$/i.test(t.tagName));
10
- }
11
- function $(t, o) {
12
- E((e) => {
13
- const i = z(t);
14
- if (!i) return;
15
- const c = (n) => {
16
- n.repeat || !M(n, i) || !(i.ctrlKey || i.altKey || i.metaKey) && P(n.target) || o(n) !== !1 && n.preventDefault();
17
- };
18
- window.addEventListener("keydown", c), e(() => window.removeEventListener("keydown", c));
19
- });
20
- }
21
- const j = ["href", "tabindex", "onClick"], H = ["href", "tabindex"], O = ["type", "disabled"], F = /* @__PURE__ */ L({
22
- __name: "Button",
23
- props: {
24
- prominence: { default: "standard" },
25
- tone: { default: void 0 },
26
- size: { default: "md" },
27
- icon: { default: void 0 },
28
- trailingIcon: { default: void 0 },
29
- to: { default: void 0 },
30
- href: { default: void 0 },
31
- type: { default: "button" },
32
- disabled: { type: Boolean, default: !1 },
33
- processing: { type: Boolean, default: !1 },
34
- keyboardShortcut: { default: void 0 }
35
- },
36
- emits: ["click"],
37
- setup(t, { emit: o }) {
38
- const e = t, i = o, c = S(), n = B("element"), _ = D(() => e.processing), a = m(() => e.disabled || e.processing);
39
- function u(s, r) {
40
- if (a.value) {
41
- s.preventDefault();
42
- return;
43
- }
44
- i("click", s), r?.(s);
45
- }
46
- $(() => e.keyboardShortcut, (s) => {
47
- if (a.value || n.value?.closest("[inert]")) return !1;
48
- i("click", s);
49
- });
50
- const w = {
51
- primary: {
52
- default: "bg-tint text-content-on-tint hover:bg-tint/90 active:bg-tint/80",
53
- critical: "bg-status-danger-solid text-white hover:brightness-110"
54
- },
55
- secondary: {
56
- default: "bg-tint-soft text-content-link hover:brightness-95 dark:hover:brightness-125",
57
- critical: "bg-status-danger-surface text-content-destructive hover:brightness-95 dark:hover:brightness-125"
58
- },
59
- standard: {
60
- default: "bg-fill text-content-strong hover:bg-fill-strong",
61
- critical: "bg-fill text-content-destructive hover:bg-fill-strong"
62
- },
63
- plain: {
64
- default: "bg-transparent text-content-link hover:bg-tint-soft",
65
- critical: "bg-transparent text-content-destructive hover:bg-status-danger-surface"
66
- },
67
- link: {
68
- default: "bg-transparent text-content-link hover:underline",
69
- critical: "bg-transparent text-content-destructive hover:underline"
70
- }
71
- }, d = {
72
- xs: { box: "min-h-6 px-2.5 py-0.5 text-xs gap-1", icon: 12 },
73
- sm: { box: "min-h-8 px-3 py-1 text-xs gap-1.5", icon: 14 },
74
- md: { box: "min-h-9 px-4 py-1.5 text-sm gap-2", icon: 16 },
75
- lg: { box: "min-h-11 px-5 py-2 text-base gap-2", icon: 20 },
76
- xl: { box: "min-h-12 px-6 py-2.5 text-base gap-2.5", icon: 22 }
77
- }, f = m(() => [
78
- "hit-target flex cursor-pointer select-none items-center justify-center rounded-button text-center font-semibold",
79
- "transition duration-motion-fast ease-motion-standard",
80
- "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
81
- w[e.prominence][e.tone ?? "default"],
82
- d[e.size].box,
83
- // aria-disabled covers links, which have no `disabled` attribute.
84
- e.processing && !e.disabled ? "cursor-progress" : "disabled:cursor-not-allowed disabled:opacity-45 aria-disabled:cursor-not-allowed aria-disabled:opacity-45"
85
- ]), p = m(() => ({
86
- "aria-disabled": a.value || void 0,
87
- "aria-busy": e.processing || void 0
88
- })), b = () => [
89
- e.processing && _.visible.value ? x(h, { name: "loader4Line", size: d[e.size].icon, class: "animate-spin", "data-test": "button-spinner" }) : e.icon ? x(h, { name: e.icon, size: d[e.size].icon }) : null,
90
- c.default?.(),
91
- e.trailingIcon ? x(h, { name: e.trailingIcon, size: d[e.size].icon }) : null
92
- ];
93
- return (s, r) => e.to !== void 0 ? (v(), I(N(V), {
94
- key: 0,
95
- to: e.to,
96
- custom: ""
97
- }, {
98
- default: R(({ href: l, navigate: C }) => [
99
- T("a", g({
100
- ref_key: "element",
101
- ref: n,
102
- href: a.value ? void 0 : l,
103
- class: f.value
104
- }, p.value, {
105
- tabindex: a.value ? -1 : void 0,
106
- onClick: (K) => u(K, C)
107
- }), [
108
- y(b)
109
- ], 16, j)
110
- ]),
111
- _: 1
112
- }, 8, ["to"])) : e.href !== void 0 ? (v(), k("a", g({
113
- key: 1,
114
- ref_key: "element",
115
- ref: n,
116
- href: a.value ? void 0 : e.href,
117
- class: f.value
118
- }, p.value, {
119
- tabindex: a.value ? -1 : void 0,
120
- onClick: r[0] || (r[0] = (l) => u(l))
121
- }), [
122
- y(b)
123
- ], 16, H)) : (v(), k("button", g({
124
- key: 2,
125
- ref_key: "element",
126
- ref: n,
127
- type: e.type,
128
- class: f.value,
129
- disabled: a.value
130
- }, p.value, {
131
- onClick: r[1] || (r[1] = (l) => u(l))
132
- }), [
133
- y(b)
134
- ], 16, O));
135
- }
136
- });
137
- export {
138
- F as _,
139
- M as m,
140
- $ as u
141
- };