@nexdom/uimed-vue 2.0.0-beta.8 → 2.0.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 (222) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_rolldown/runtime.js +7 -0
  3. package/dist/components/app-bar/app-bar.js +5 -0
  4. package/dist/components/app-bar/app-bar.vue_vue_type_script_setup_true_lang.js +286 -0
  5. package/dist/components/app-bar/types.d.ts +96 -0
  6. package/dist/components/button/button.js +5 -0
  7. package/dist/components/button/button.vue.d.ts +31 -0
  8. package/dist/components/button/button.vue_vue_type_script_setup_true_lang.js +97 -0
  9. package/dist/components/button/types.d.ts +65 -0
  10. package/dist/components/data-sets/data-set/data-set.js +5 -0
  11. package/dist/components/data-sets/data-set/data-set.vue.d.ts +47 -0
  12. package/dist/components/data-sets/data-set/data-set.vue_vue_type_script_setup_true_lang.js +157 -0
  13. package/dist/components/data-sets/data-set/types.d.ts +93 -0
  14. package/dist/components/data-sets/data-set-bar.js +5 -0
  15. package/dist/components/data-sets/data-set-bar.vue_vue_type_script_setup_true_lang.js +99 -0
  16. package/dist/components/data-sets/data-set-item/data-set-item.js +5 -0
  17. package/dist/components/data-sets/data-set-item/data-set-item.vue.d.ts +35 -0
  18. package/dist/components/data-sets/data-set-item/data-set-item.vue_vue_type_script_setup_true_lang.js +57 -0
  19. package/dist/components/data-sets/data-set-item/types.d.ts +42 -0
  20. package/dist/components/details/details.js +5 -0
  21. package/dist/components/details/details.vue.d.ts +28 -0
  22. package/dist/components/details/details.vue_vue_type_script_setup_true_lang.js +56 -0
  23. package/dist/components/details/types.d.ts +29 -0
  24. package/dist/components/dialogs/dialog/dialog-host-key.js +10 -0
  25. package/dist/components/dialogs/dialog/dialog.js +5 -0
  26. package/dist/components/dialogs/dialog/dialog.vue.d.ts +36 -0
  27. package/dist/components/dialogs/dialog/dialog.vue_vue_type_script_setup_true_lang.js +112 -0
  28. package/dist/components/dialogs/dialog/types.d.ts +47 -0
  29. package/dist/components/dialogs/dialog-host.js +5 -0
  30. package/dist/components/dialogs/dialog-host.vue_vue_type_script_setup_true_lang.js +81 -0
  31. package/dist/components/dialogs/toast.js +5 -0
  32. package/dist/components/dialogs/toast.vue_vue_type_script_setup_true_lang.js +35 -0
  33. package/dist/components/footer/footer.js +5 -0
  34. package/dist/components/footer/footer.vue_vue_type_script_setup_true_lang.js +31 -0
  35. package/dist/components/footer/types.d.ts +16 -0
  36. package/dist/components/form/form.js +5 -0
  37. package/dist/components/form/form.vue.d.ts +32 -0
  38. package/dist/components/form/form.vue_vue_type_script_setup_true_lang.js +37 -0
  39. package/dist/components/form/types.d.ts +15 -0
  40. package/dist/components/grid/column/column.js +5 -0
  41. package/dist/components/grid/column/column.vue.d.ts +33 -0
  42. package/dist/components/grid/column/column.vue_vue_type_script_setup_true_lang.js +45 -0
  43. package/dist/components/grid/column/types.d.ts +27 -0
  44. package/dist/components/grid/container/container.js +5 -0
  45. package/dist/components/grid/container/container.vue.d.ts +27 -0
  46. package/dist/components/grid/container/container.vue_vue_type_script_setup_true_lang.js +33 -0
  47. package/dist/components/grid/container/types.d.ts +17 -0
  48. package/dist/components/grid/row/row.js +5 -0
  49. package/dist/components/grid/row/row.vue.d.ts +29 -0
  50. package/dist/components/grid/row/row.vue_vue_type_script_setup_true_lang.js +61 -0
  51. package/dist/components/grid/row/types.d.ts +63 -0
  52. package/dist/components/icon-button/icon-button.js +5 -0
  53. package/dist/components/icon-button/icon-button.vue.d.ts +23 -0
  54. package/dist/components/icon-button/icon-button.vue_vue_type_script_setup_true_lang.js +51 -0
  55. package/dist/components/icon-button/types.d.ts +32 -0
  56. package/dist/components/img/img.js +5 -0
  57. package/dist/components/img/img.vue.d.ts +23 -0
  58. package/dist/components/img/img.vue_vue_type_script_setup_true_lang.js +61 -0
  59. package/dist/components/img/types.d.ts +43 -0
  60. package/dist/components/inputs/autocomplete-field/autocomplete-field.js +5 -0
  61. package/dist/components/inputs/autocomplete-field/autocomplete-field.vue.d.ts +33 -0
  62. package/dist/components/inputs/autocomplete-field/autocomplete-field.vue_vue_type_script_setup_true_lang.js +161 -0
  63. package/dist/components/inputs/autocomplete-field/types.d.ts +84 -0
  64. package/dist/components/inputs/checkbox/checkbox.js +5 -0
  65. package/dist/components/inputs/checkbox/checkbox.vue.d.ts +33 -0
  66. package/dist/components/inputs/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +71 -0
  67. package/dist/components/inputs/checkbox/types.d.ts +35 -0
  68. package/dist/components/inputs/date-time-field/date-time-field.js +5 -0
  69. package/dist/components/inputs/date-time-field/date-time-field.vue.d.ts +32 -0
  70. package/dist/components/inputs/date-time-field/date-time-field.vue_vue_type_script_setup_true_lang.js +205 -0
  71. package/dist/components/inputs/date-time-field/types.d.ts +84 -0
  72. package/dist/components/inputs/field-loader.js +5 -0
  73. package/dist/components/inputs/field-loader.vue_vue_type_script_setup_true_lang.js +30 -0
  74. package/dist/components/inputs/mask-field/mask-field.js +5 -0
  75. package/dist/components/inputs/mask-field/mask-field.vue.d.ts +32 -0
  76. package/dist/components/inputs/mask-field/mask-field.vue_vue_type_script_setup_true_lang.js +120 -0
  77. package/dist/components/inputs/mask-field/types.d.ts +118 -0
  78. package/dist/components/inputs/text-field/text-field.js +5 -0
  79. package/dist/components/inputs/text-field/text-field.vue.d.ts +30 -0
  80. package/dist/components/inputs/text-field/text-field.vue_vue_type_script_setup_true_lang.js +119 -0
  81. package/dist/components/inputs/text-field/types.d.ts +70 -0
  82. package/dist/components/link/link.js +5 -0
  83. package/dist/components/link/link.vue.d.ts +27 -0
  84. package/dist/components/link/link.vue_vue_type_script_setup_true_lang.js +32 -0
  85. package/dist/components/link/types.d.ts +18 -0
  86. package/dist/components/main/main.js +5 -0
  87. package/dist/components/main/main.vue.d.ts +33 -0
  88. package/dist/components/main/main.vue_vue_type_script_setup_true_lang.js +104 -0
  89. package/dist/components/main/types.d.ts +75 -0
  90. package/dist/components/navigation-menu/navigation-menu.js +5 -0
  91. package/dist/components/navigation-menu/navigation-menu.vue_vue_type_script_setup_true_lang.js +207 -0
  92. package/dist/components/navigation-menu/types.d.ts +62 -0
  93. package/dist/components/page-transition/page-transition.js +5 -0
  94. package/dist/components/page-transition/page-transition.vue.d.ts +40 -0
  95. package/dist/components/page-transition/page-transition.vue_vue_type_script_setup_true_lang.js +27 -0
  96. package/dist/components/page-transition/types.d.ts +18 -0
  97. package/dist/components/sections/section/section.js +5 -0
  98. package/dist/components/sections/section/section.vue.d.ts +28 -0
  99. package/dist/components/sections/section/section.vue_vue_type_script_setup_true_lang.js +108 -0
  100. package/dist/components/sections/section/types.d.ts +80 -0
  101. package/dist/components/sections/section-content/section-content.js +5 -0
  102. package/dist/components/sections/section-content/section-content.vue.d.ts +27 -0
  103. package/dist/components/sections/section-content/section-content.vue_vue_type_script_setup_true_lang.js +16 -0
  104. package/dist/components/skeleton-loader/skeleton-loader.js +5 -0
  105. package/dist/components/skeleton-loader/skeleton-loader.vue_vue_type_script_setup_true_lang.js +65 -0
  106. package/dist/components/table/table.js +5 -0
  107. package/dist/components/table/table.vue.d.ts +19 -0
  108. package/dist/components/table/table.vue_vue_type_script_setup_true_lang.js +84 -0
  109. package/dist/components/table/types.d.ts +51 -0
  110. package/dist/components.d.ts +23 -940
  111. package/dist/components.js +23 -1254
  112. package/dist/composables/alignment/alignment.js +41 -0
  113. package/dist/composables/alignment/types.d.ts +12 -0
  114. package/dist/composables/button/button.js +54 -0
  115. package/dist/composables/colors/constants.js +27 -0
  116. package/dist/composables/colors/types.d.ts +4 -0
  117. package/dist/composables/colors/use-vuetify-background-color.js +16 -0
  118. package/dist/composables/colors/use-vuetify-color.js +11 -0
  119. package/dist/composables/colors/use-vuetify-text-color.js +12 -0
  120. package/dist/composables/data-set/data-set.js +128 -0
  121. package/dist/composables/dialogs/types.d.ts +88 -0
  122. package/dist/composables/dialogs/use-confirm.d.ts +21 -0
  123. package/dist/composables/dialogs/use-confirm.js +55 -0
  124. package/dist/composables/dialogs/use-decorative-timer.js +25 -0
  125. package/dist/composables/dialogs/use-dialog-focus.js +64 -0
  126. package/dist/composables/dialogs/use-dialog-loading.js +13 -0
  127. package/dist/composables/dialogs/use-dialog.d.ts +36 -0
  128. package/dist/composables/dialogs/use-dialog.js +73 -0
  129. package/dist/composables/dialogs/use-run-or-toast.d.ts +27 -0
  130. package/dist/composables/dialogs/use-run-or-toast.js +65 -0
  131. package/dist/composables/dialogs/use-toast.d.ts +25 -0
  132. package/dist/composables/dialogs/use-toast.js +39 -0
  133. package/dist/composables/dimensions/dimensions.js +18 -0
  134. package/dist/composables/inputs/autocomplete-field.js +39 -0
  135. package/dist/composables/inputs/date-time-field.js +109 -0
  136. package/dist/composables/inputs/fields.js +28 -0
  137. package/dist/composables/inputs/mask-field.js +133 -0
  138. package/dist/composables/inputs/rules.js +16 -0
  139. package/dist/composables/inputs/text-field.js +81 -0
  140. package/dist/composables/navigation/types.d.ts +54 -0
  141. package/dist/composables/navigation/use-navigation-rail.js +163 -0
  142. package/dist/composables/navigation/use-navigation-search-shortcut.js +96 -0
  143. package/dist/composables/navigation/use-route-props.js +21 -0
  144. package/dist/composables/navigation/use-unsaved-changes.d.ts +35 -0
  145. package/dist/composables/navigation/use-unsaved-changes.js +88 -0
  146. package/dist/composables/section/section.js +34 -0
  147. package/dist/composables.d.ts +6 -67
  148. package/dist/composables.js +6 -65
  149. package/dist/consts/icons.d.ts +67 -0
  150. package/dist/consts/icons.js +69 -0
  151. package/dist/consts/locale.js +12 -0
  152. package/dist/consts/types.d.ts +12 -0
  153. package/dist/index.d.ts +1 -13
  154. package/dist/index.js +39 -14
  155. package/dist/plugins.d.ts +15 -4
  156. package/dist/plugins.js +54 -3
  157. package/dist/styles/fonts/UnimedSlab-Regular.woff2 +0 -0
  158. package/dist/styles/fonts/fonts.css +5 -0
  159. package/dist/styles/settings.scss +155 -0
  160. package/dist/unit-test.js +11 -7
  161. package/package.json +11 -11
  162. package/skills/uimed-vue/SKILL.md +113 -0
  163. package/skills/uimed-vue/references/api/components/autocomplete-field.md +45 -0
  164. package/skills/uimed-vue/references/api/components/button.md +48 -0
  165. package/skills/uimed-vue/references/api/components/checkbox.md +36 -0
  166. package/skills/uimed-vue/references/api/components/data-sets/data-set-item.md +61 -0
  167. package/skills/uimed-vue/references/api/components/data-sets/data-set.md +67 -0
  168. package/skills/uimed-vue/references/api/components/date-time-field.md +44 -0
  169. package/skills/uimed-vue/references/api/components/details.md +33 -0
  170. package/skills/uimed-vue/references/api/components/dialog.md +70 -0
  171. package/skills/uimed-vue/references/api/components/form.md +43 -0
  172. package/skills/uimed-vue/references/api/components/grid/column.md +41 -0
  173. package/skills/uimed-vue/references/api/components/grid/container.md +32 -0
  174. package/skills/uimed-vue/references/api/components/grid/row.md +37 -0
  175. package/skills/uimed-vue/references/api/components/icon-button.md +37 -0
  176. package/skills/uimed-vue/references/api/components/img.md +34 -0
  177. package/skills/uimed-vue/references/api/components/link.md +31 -0
  178. package/skills/uimed-vue/references/api/components/main.md +174 -0
  179. package/skills/uimed-vue/references/api/components/mask-field.md +60 -0
  180. package/skills/uimed-vue/references/api/components/page-transition.md +37 -0
  181. package/skills/uimed-vue/references/api/components/sections/section-content.md +23 -0
  182. package/skills/uimed-vue/references/api/components/sections/section.md +61 -0
  183. package/skills/uimed-vue/references/api/components/table.md +35 -0
  184. package/skills/uimed-vue/references/api/components/text-field.md +42 -0
  185. package/skills/uimed-vue/references/api/composables/use-confirm.md +96 -0
  186. package/skills/uimed-vue/references/api/composables/use-dialog.md +95 -0
  187. package/skills/uimed-vue/references/api/composables/use-run-or-toast.md +58 -0
  188. package/skills/uimed-vue/references/api/composables/use-toast.md +48 -0
  189. package/skills/uimed-vue/references/api/composables/use-unsaved-changes.md +106 -0
  190. package/skills/uimed-vue/references/api/index.md +1 -0
  191. package/skills/uimed-vue/references/guide/components/autocomplete-field.md +256 -0
  192. package/skills/uimed-vue/references/guide/components/button.md +155 -0
  193. package/skills/uimed-vue/references/guide/components/checkbox.md +113 -0
  194. package/skills/uimed-vue/references/guide/components/data-set.md +370 -0
  195. package/skills/uimed-vue/references/guide/components/date-time-field.md +202 -0
  196. package/skills/uimed-vue/references/guide/components/details.md +76 -0
  197. package/skills/uimed-vue/references/guide/components/dialog.md +269 -0
  198. package/skills/uimed-vue/references/guide/components/form.md +96 -0
  199. package/skills/uimed-vue/references/guide/components/icon-button.md +76 -0
  200. package/skills/uimed-vue/references/guide/components/img.md +128 -0
  201. package/skills/uimed-vue/references/guide/components/layout.md +323 -0
  202. package/skills/uimed-vue/references/guide/components/link.md +47 -0
  203. package/skills/uimed-vue/references/guide/components/main.md +435 -0
  204. package/skills/uimed-vue/references/guide/components/mask-field.md +256 -0
  205. package/skills/uimed-vue/references/guide/components/page-transition.md +111 -0
  206. package/skills/uimed-vue/references/guide/components/section.md +232 -0
  207. package/skills/uimed-vue/references/guide/components/table.md +102 -0
  208. package/skills/uimed-vue/references/guide/components/text-field.md +172 -0
  209. package/skills/uimed-vue/references/guide/composables/use-confirm.md +123 -0
  210. package/skills/uimed-vue/references/guide/composables/use-dialog.md +102 -0
  211. package/skills/uimed-vue/references/guide/composables/use-run-or-toast.md +55 -0
  212. package/skills/uimed-vue/references/guide/composables/use-toast.md +57 -0
  213. package/skills/uimed-vue/references/guide/composables/use-unsaved-changes.md +129 -0
  214. package/skills/uimed-vue/references/guide/getting-started.md +135 -0
  215. package/skills/uimed-vue/references/guide/icons.md +71 -0
  216. package/skills/uimed-vue/references/guide/index.md +51 -0
  217. package/skills/uimed-vue/references/guide/migration-v1-to-v2.md +191 -0
  218. package/skills/uimed-vue/references/guide/unit-testing.md +85 -0
  219. package/AGENTS.md +0 -160
  220. package/CLAUDE.md +0 -1
  221. package/dist/types-BPXXtbmW.d.ts +0 -5
  222. package/dist/use-toast-CACuYhK_.js +0 -53
@@ -1,1254 +1,23 @@
1
- import { r as useVuetifyColor, t as messages } from "./use-toast-CACuYhK_.js";
2
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, isRef, mergeModels, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toValue, unref, useModel, withCtx, withModifiers } from "vue";
3
- import { VApp, VAppBar, VAppBarNavIcon, VAppBarTitle, VAutocomplete, VAvatar, VBadge, VBtn, VCard, VCardActions, VCardText, VCheckboxBtn, VCol, VCombobox, VContainer, VDivider, VExpansionPanel, VExpansionPanelText, VExpansionPanelTitle, VExpansionPanels, VForm, VIcon, VIconBtn, VImg, VList, VListGroup, VListItem, VListItemAction, VListSubheader, VMain, VMenu, VNavigationDrawer, VRow, VSkeletonLoader, VSnackbarQueue, VTable, VTextField } from "vuetify/components";
4
- import { formatDateTime, isEmail, isEmpty, isPhone, isUrl, toPeriodInterval } from "@nexdom/shared/utils";
5
- //#region src/composables/navigation/use-route-props.ts
6
- function useRouteProps(route) {
7
- return computed(() => routeToProps(route));
8
- }
9
- function routeToProps(route) {
10
- const location = toValue(route);
11
- return isExternalRoute(location) ? { href: location } : { to: location };
12
- }
13
- function isExternalRoute(route) {
14
- return typeof route === "string" && route.startsWith("http");
15
- }
16
- //#endregion
17
- //#region src/components/app-bar/app-bar.vue?vue&type=script&setup=true&lang.ts
18
- const _hoisted_1$2 = { class: "opacity-60" };
19
- //#endregion
20
- //#region src/components/app-bar/app-bar.vue
21
- var app_bar_default = /* @__PURE__ */ defineComponent({
22
- inheritAttrs: false,
23
- __name: "app-bar",
24
- props: /*@__PURE__*/ mergeModels({
25
- dataTestid: {
26
- type: String,
27
- required: false
28
- },
29
- title: {
30
- type: String,
31
- required: false
32
- },
33
- help: {
34
- type: null,
35
- required: false
36
- },
37
- user: {
38
- type: Object,
39
- required: false
40
- },
41
- notifications: {
42
- type: Array,
43
- required: false
44
- },
45
- navigation: {
46
- type: Boolean,
47
- required: false
48
- },
49
- logo: {
50
- type: String,
51
- required: false
52
- }
53
- }, {
54
- "notificationsOpen": {
55
- type: Boolean,
56
- default: false
57
- },
58
- "notificationsOpenModifiers": {},
59
- "navigationOpen": { type: Boolean },
60
- "navigationOpenModifiers": {}
61
- }),
62
- emits: ["update:notificationsOpen", "update:navigationOpen"],
63
- setup(__props) {
64
- const props = __props;
65
- const notificationsOpen = useModel(__props, "notificationsOpen");
66
- const navigationOpen = useModel(__props, "navigationOpen");
67
- const helpBtnDataTestid = computed(() => `${props.dataTestid}-help`);
68
- const notificationsBtnDataTestid = computed(() => `${props.dataTestid}-notifications`);
69
- const navigationBtnDataTestid = computed(() => `${props.dataTestid}-navigation`);
70
- const notificationsMenuDataTestid = computed(() => `${props.dataTestid}-notifications-menu`);
71
- const userBtnDataTestid = computed(() => `${props.dataTestid}-user`);
72
- const userMenuDataTestid = computed(() => `${props.dataTestid}-user-menu`);
73
- const showHelp = computed(() => !!props.help);
74
- const routeProps = useRouteProps(() => props.help);
75
- const showNotifications = computed(() => !!props.notifications);
76
- const unreadCount = computed(() => props.notifications.filter((notification) => !notification.read).length);
77
- const hasUnreadNotifications = computed(() => unreadCount.value > 0);
78
- const showUser = computed(() => !!props.user);
79
- const userAvatarProps = computed(() => props.user.img ? { image: props.user.img } : { icon: "mdi-account-outline" });
80
- function isParentOption(option) {
81
- return "items" in option;
82
- }
83
- function formatNotificationDate(date) {
84
- const interval = toPeriodInterval(date);
85
- if (wasThisMonth(interval)) {
86
- if (wasToday(interval)) return formatDateTime(date, "HH:mm");
87
- else if (wasYesterday(interval)) return "Ontem";
88
- }
89
- return formatDateTime(date, "DD/MM/YYYY");
90
- }
91
- function wasThisMonth(interval) {
92
- return interval.months === 0 && interval.years === 0;
93
- }
94
- function wasToday(interval) {
95
- return interval.days === 0;
96
- }
97
- function wasYesterday(interval) {
98
- return interval.days === 1;
99
- }
100
- return (_ctx, _cache) => {
101
- return openBlock(), createBlock(unref(VAppBar), { "data-testid": props.dataTestid }, {
102
- append: withCtx(() => [
103
- showHelp.value ? (openBlock(), createBlock(unref(VBtn), mergeProps({ key: 0 }, unref(routeProps), {
104
- "data-testid": helpBtnDataTestid.value,
105
- icon: "mdi-help-circle-outline"
106
- }), null, 16, ["data-testid"])) : createCommentVNode("v-if", true),
107
- showNotifications.value ? (openBlock(), createBlock(unref(VMenu), {
108
- key: 1,
109
- modelValue: notificationsOpen.value,
110
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => notificationsOpen.value = $event),
111
- "close-on-content-click": false
112
- }, {
113
- activator: withCtx(({ props }) => [createVNode(unref(VBtn), mergeProps(props, {
114
- "data-testid": notificationsBtnDataTestid.value,
115
- icon: ""
116
- }), {
117
- default: withCtx(() => [createVNode(unref(VBadge), {
118
- "model-value": hasUnreadNotifications.value,
119
- content: unreadCount.value,
120
- color: "error"
121
- }, {
122
- default: withCtx(() => [createVNode(unref(VIcon), { icon: "mdi-bell-outline" })]),
123
- _: 1
124
- }, 8, ["model-value", "content"])]),
125
- _: 1
126
- }, 16, ["data-testid"])]),
127
- default: withCtx(() => [createVNode(unref(VCard), { "data-testid": notificationsMenuDataTestid.value }, {
128
- default: withCtx(() => [props.notifications?.length ? (openBlock(), createBlock(unref(VList), { key: 0 }, {
129
- default: withCtx(() => [createVNode(unref(VListSubheader), null, {
130
- default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode("Notificações", -1)])]),
131
- _: 1
132
- }), (openBlock(true), createElementBlock(Fragment, null, renderList(props.notifications, (notification, index) => {
133
- return openBlock(), createBlock(unref(VListItem), {
134
- key: index,
135
- active: !notification.read,
136
- title: notification.title,
137
- subtitle: notification.subtitle,
138
- "active-class": "text-primary"
139
- }, createSlots({ _: 2 }, [notification.date ? {
140
- name: "append",
141
- fn: withCtx(() => [createVNode(unref(VListItemAction), { end: "" }, {
142
- default: withCtx(() => [createElementVNode("small", _hoisted_1$2, toDisplayString(formatNotificationDate(notification.date)), 1)]),
143
- _: 2
144
- }, 1024)]),
145
- key: "0"
146
- } : void 0]), 1032, [
147
- "active",
148
- "title",
149
- "subtitle"
150
- ]);
151
- }), 128))]),
152
- _: 1
153
- })) : (openBlock(), createBlock(unref(VCardText), { key: 1 }, {
154
- default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("Nenhuma notificação", -1)])]),
155
- _: 1
156
- }))]),
157
- _: 1
158
- }, 8, ["data-testid"])]),
159
- _: 1
160
- }, 8, ["modelValue"])) : createCommentVNode("v-if", true),
161
- showUser.value ? (openBlock(), createBlock(unref(VMenu), {
162
- key: 2,
163
- "close-on-content-click": false
164
- }, {
165
- activator: withCtx(({ props }) => [createVNode(unref(VBtn), mergeProps(props, {
166
- "data-testid": userBtnDataTestid.value,
167
- icon: ""
168
- }), {
169
- default: withCtx(() => [createVNode(unref(VAvatar), mergeProps(userAvatarProps.value, { color: "primary" }), null, 16)]),
170
- _: 1
171
- }, 16, ["data-testid"])]),
172
- default: withCtx(() => [createVNode(unref(VCard), {
173
- title: __props.user?.title,
174
- subtitle: __props.user?.subtitle,
175
- "data-testid": userMenuDataTestid.value
176
- }, {
177
- prepend: withCtx(() => [createVNode(unref(VAvatar), mergeProps(userAvatarProps.value, { color: "primary" }), null, 16)]),
178
- default: withCtx(() => [createVNode(unref(VDivider)), createVNode(unref(VList), { nav: "" }, {
179
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.user?.options, (option, index) => {
180
- return openBlock(), createElementBlock(Fragment, { key: index }, [index > 0 ? (openBlock(), createBlock(unref(VDivider), {
181
- key: 0,
182
- class: "mt-1"
183
- })) : createCommentVNode("v-if", true), isParentOption(option) ? (openBlock(), createBlock(unref(VListGroup), { key: 1 }, {
184
- activator: withCtx(({ props }) => [createVNode(unref(VListItem), mergeProps({ ref_for: true }, props, { title: option.description }), null, 16, ["title"])]),
185
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(option.items, (childOption, index) => {
186
- return openBlock(), createBlock(unref(VListItem), mergeProps({ key: index }, { ref_for: true }, unref(routeToProps)(childOption.route), {
187
- title: childOption.description,
188
- onClick: childOption.action
189
- }), null, 16, ["title", "onClick"]);
190
- }), 128))]),
191
- _: 2
192
- }, 1024)) : (openBlock(), createBlock(unref(VListItem), mergeProps({
193
- key: 2,
194
- title: option.description
195
- }, { ref_for: true }, unref(routeToProps)(option.route), { onClick: option.action }), null, 16, ["title", "onClick"]))], 64);
196
- }), 128))]),
197
- _: 1
198
- })]),
199
- _: 1
200
- }, 8, [
201
- "title",
202
- "subtitle",
203
- "data-testid"
204
- ])]),
205
- _: 1
206
- })) : createCommentVNode("v-if", true)
207
- ]),
208
- default: withCtx(() => [
209
- __props.navigation ? (openBlock(), createBlock(unref(VAppBarNavIcon), {
210
- key: 0,
211
- "data-testid": navigationBtnDataTestid.value,
212
- onClick: _cache[0] || (_cache[0] = ($event) => navigationOpen.value = !navigationOpen.value)
213
- }, null, 8, ["data-testid"])) : createCommentVNode("v-if", true),
214
- __props.logo ? (openBlock(), createBlock(unref(VImg), {
215
- key: 1,
216
- src: props.logo,
217
- height: "100%",
218
- width: "fit-content",
219
- class: "py-2 ml-5 mr-n3",
220
- cover: ""
221
- }, null, 8, ["src"])) : createCommentVNode("v-if", true),
222
- props.title ? (openBlock(), createBlock(unref(VAppBarTitle), { key: 2 }, {
223
- default: withCtx(() => [createTextVNode(toDisplayString(props.title), 1)]),
224
- _: 1
225
- })) : createCommentVNode("v-if", true)
226
- ]),
227
- _: 1
228
- }, 8, ["data-testid"]);
229
- };
230
- }
231
- });
232
- //#endregion
233
- //#region src/composables/inputs/rules.ts
234
- function required(value) {
235
- return !isEmpty(value) || "Campo obrigatório";
236
- }
237
- function phone(value) {
238
- return isEmpty(value) || isPhone(value) || "Número inválido";
239
- }
240
- function email(value) {
241
- return isEmpty(value) || isEmail(value) || "E-mail inválido";
242
- }
243
- function url(value) {
244
- return isEmpty(value) || isUrl(value) || "URL inválida";
245
- }
246
- //#endregion
247
- //#region src/composables/inputs/fields.ts
248
- const textFieldVariantToVuetifyVariant = {
249
- primary: "underlined",
250
- secondary: "outlined"
251
- };
252
- function useTextFieldVariant(variant) {
253
- return computed(() => {
254
- const variantValue = toValue(variant);
255
- return textFieldVariantToVuetifyVariant[variantValue];
256
- });
257
- }
258
- function createRequiredRule(required, isPresent) {
259
- return (value) => {
260
- if (!required) return true;
261
- return isPresent(value) || "Campo obrigatório";
262
- };
263
- }
264
- function useRules(options) {
265
- return computed(() => {
266
- const rules = [];
267
- if (options.required) rules.push(required);
268
- return rules;
269
- });
270
- }
271
- //#endregion
272
- //#region src/composables/inputs/text-field.ts
273
- const textFieldTypeToVuetifyType = {
274
- text: "text",
275
- phone: "tel",
276
- email: "email",
277
- url: "url",
278
- password: "password",
279
- search: "text"
280
- };
281
- const textFieldTypeToVuetifyRule = {
282
- phone,
283
- email,
284
- url
285
- };
286
- function useTextFieldType(type) {
287
- return computed(() => {
288
- const typeValue = toValue(type);
289
- return textFieldTypeToVuetifyType[typeValue];
290
- });
291
- }
292
- function useTextFieldRules(props) {
293
- const defaultRules = useRules(props);
294
- return computed(() => {
295
- const rules = [...defaultRules.value];
296
- const typeRule = associatedRuleType(props.type) ? textFieldTypeToVuetifyRule[props.type] : void 0;
297
- if (typeRule) rules.push(typeRule);
298
- return rules;
299
- });
300
- }
301
- function associatedRuleType(type) {
302
- return type in textFieldTypeToVuetifyRule;
303
- }
304
- //#endregion
305
- //#region src/components/inputs/text-field/text-field.vue
306
- var text_field_default = /* @__PURE__ */ defineComponent({
307
- inheritAttrs: false,
308
- __name: "text-field",
309
- props: /*@__PURE__*/ mergeModels({
310
- variant: {
311
- type: String,
312
- required: false,
313
- default: "primary"
314
- },
315
- type: {
316
- type: String,
317
- required: false,
318
- default: "text"
319
- },
320
- disabled: {
321
- type: Boolean,
322
- required: false
323
- },
324
- loading: {
325
- type: Boolean,
326
- required: false
327
- },
328
- clearable: {
329
- type: Boolean,
330
- required: false,
331
- default: void 0
332
- },
333
- readonly: {
334
- type: Boolean,
335
- required: false
336
- },
337
- required: {
338
- type: Boolean,
339
- required: false
340
- },
341
- label: {
342
- type: String,
343
- required: false
344
- },
345
- placeholder: {
346
- type: String,
347
- required: false
348
- },
349
- hint: {
350
- type: String,
351
- required: false
352
- },
353
- dataTestid: {
354
- type: String,
355
- required: false
356
- }
357
- }, {
358
- "modelValue": {
359
- type: String,
360
- default: ""
361
- },
362
- "modelModifiers": {}
363
- }),
364
- emits: ["update:modelValue"],
365
- setup(__props) {
366
- const modelValue = useModel(__props, "modelValue");
367
- const props = __props;
368
- const vuetifyVariant = useTextFieldVariant(() => props.variant);
369
- const vuetifyType = useTextFieldType(() => props.type);
370
- const rules = useTextFieldRules(props);
371
- const isSearchField = computed(() => props.type === "search");
372
- const computedClearable = computed(() => props.clearable ?? isSearchField.value);
373
- const appendIcon = computed(() => isSearchField.value ? "mdi-magnify" : void 0);
374
- function clear() {
375
- modelValue.value = "";
376
- }
377
- return (_ctx, _cache) => {
378
- return openBlock(), createBlock(unref(VTextField), {
379
- modelValue: modelValue.value,
380
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
381
- variant: unref(vuetifyVariant),
382
- type: unref(vuetifyType),
383
- "append-inner-icon": appendIcon.value,
384
- rules: unref(rules),
385
- "data-testid": props.dataTestid,
386
- disabled: props.disabled,
387
- loading: props.loading,
388
- readonly: props.readonly,
389
- label: props.label,
390
- placeholder: props.placeholder,
391
- hint: props.hint,
392
- clearable: computedClearable.value,
393
- "onClick:clear": clear
394
- }, null, 8, [
395
- "modelValue",
396
- "variant",
397
- "type",
398
- "append-inner-icon",
399
- "rules",
400
- "data-testid",
401
- "disabled",
402
- "loading",
403
- "readonly",
404
- "label",
405
- "placeholder",
406
- "hint",
407
- "clearable"
408
- ]);
409
- };
410
- }
411
- });
412
- //#endregion
413
- //#region src/components/navigation-menu/navigation-menu.vue?vue&type=script&setup=true&lang.ts
414
- const _hoisted_1$1 = { class: "px-4 pt-2" };
415
- //#endregion
416
- //#region src/components/navigation-menu/navigation-menu.vue
417
- var navigation_menu_default = /* @__PURE__ */ defineComponent({
418
- inheritAttrs: false,
419
- __name: "navigation-menu",
420
- props: /*@__PURE__*/ mergeModels({
421
- dataTestid: {
422
- type: String,
423
- required: false
424
- },
425
- items: {
426
- type: Array,
427
- required: false
428
- }
429
- }, {
430
- "modelValue": {
431
- type: Boolean,
432
- default: false
433
- },
434
- "modelModifiers": {}
435
- }),
436
- emits: ["update:modelValue"],
437
- setup(__props) {
438
- const props = __props;
439
- const open = useModel(__props, "modelValue");
440
- const search = ref("");
441
- const filteredItems = computed(() => filterItems());
442
- const searchDataTestid = computed(() => `${props.dataTestid}-search`);
443
- const query = computed(() => search.value.toLowerCase());
444
- function filterItems() {
445
- return (props.items ?? []).reduce((filtered, item) => {
446
- if (matches(item)) filtered.push(item);
447
- else if (isParentItem(item)) {
448
- const matchingChildren = item.items.filter((child) => matches(child));
449
- if (matchingChildren.length) filtered.push({
450
- ...item,
451
- items: matchingChildren
452
- });
453
- }
454
- return filtered;
455
- }, []);
456
- }
457
- function matches(item) {
458
- return item.description.toLowerCase().includes(query.value);
459
- }
460
- function isParentItem(item) {
461
- return "items" in item;
462
- }
463
- return (_ctx, _cache) => {
464
- return openBlock(), createBlock(unref(VNavigationDrawer), {
465
- modelValue: open.value,
466
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => open.value = $event),
467
- "data-testid": props.dataTestid,
468
- absolute: "",
469
- temporary: ""
470
- }, {
471
- prepend: withCtx(() => [createElementVNode("div", _hoisted_1$1, [createVNode(text_field_default, {
472
- modelValue: search.value,
473
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
474
- type: "search",
475
- label: "Buscar",
476
- "data-testid": searchDataTestid.value
477
- }, null, 8, ["modelValue", "data-testid"])])]),
478
- default: withCtx(() => [createVNode(unref(VDivider)), createVNode(unref(VList), { nav: "" }, {
479
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(filteredItems.value, (item, index) => {
480
- return openBlock(), createElementBlock(Fragment, { key: index }, [isParentItem(item) ? (openBlock(), createBlock(unref(VListGroup), { key: 0 }, {
481
- activator: withCtx(({ props: activatorProps }) => [createVNode(unref(VListItem), mergeProps({ ref_for: true }, activatorProps, { title: item.description }), null, 16, ["title"])]),
482
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (childItem, childIndex) => {
483
- return openBlock(), createBlock(unref(VListItem), mergeProps({ key: childIndex }, { ref_for: true }, unref(routeToProps)(childItem.route), {
484
- title: childItem.description,
485
- onClick: childItem.action
486
- }), null, 16, ["title", "onClick"]);
487
- }), 128))]),
488
- _: 2
489
- }, 1024)) : (openBlock(), createBlock(unref(VListItem), mergeProps({
490
- key: 1,
491
- title: item.description
492
- }, { ref_for: true }, unref(routeToProps)(item.route), { onClick: item.action }), null, 16, ["title", "onClick"]))], 64);
493
- }), 128))]),
494
- _: 1
495
- })]),
496
- _: 1
497
- }, 8, ["modelValue", "data-testid"]);
498
- };
499
- }
500
- });
501
- //#endregion
502
- //#region src/components/grid/container/container.vue
503
- var container_default = /* @__PURE__ */ defineComponent({
504
- inheritAttrs: false,
505
- __name: "container",
506
- props: { dataTestid: {
507
- type: String,
508
- required: false
509
- } },
510
- setup(__props) {
511
- const props = __props;
512
- return (_ctx, _cache) => {
513
- return openBlock(), createBlock(unref(VContainer), {
514
- "data-testid": props.dataTestid,
515
- fluid: ""
516
- }, {
517
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
518
- _: 3
519
- }, 8, ["data-testid"]);
520
- };
521
- }
522
- });
523
- //#endregion
524
- //#region src/components/dialogs/toast.vue
525
- var toast_default = /* @__PURE__ */ defineComponent({
526
- inheritAttrs: false,
527
- __name: "toast",
528
- setup(__props) {
529
- return (_ctx, _cache) => {
530
- return openBlock(), createBlock(unref(VSnackbarQueue), {
531
- modelValue: unref(messages),
532
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(messages) ? messages.value = $event : null),
533
- "display-strategy": "overflow",
534
- location: "top end",
535
- "total-visible": "3",
536
- collapsed: "",
537
- closable: "",
538
- timer: ""
539
- }, {
540
- actions: withCtx(({ props }) => [createVNode(unref(VIconBtn), mergeProps(props, {
541
- "aria-label": "Fechar",
542
- icon: "$close",
543
- size: "small",
544
- variant: "text"
545
- }), null, 16)]),
546
- _: 1
547
- }, 8, ["modelValue"]);
548
- };
549
- }
550
- });
551
- //#endregion
552
- //#region src/components/main/main.vue
553
- var main_default = /* @__PURE__ */ defineComponent({
554
- inheritAttrs: false,
555
- __name: "main",
556
- props: /*@__PURE__*/ mergeModels({
557
- dataTestid: {
558
- type: String,
559
- required: false
560
- },
561
- logo: {
562
- type: String,
563
- required: false
564
- },
565
- appBar: {
566
- type: Object,
567
- required: false
568
- },
569
- navigationMenu: {
570
- type: Object,
571
- required: false
572
- }
573
- }, {
574
- "notificationsOpen": {
575
- type: Boolean,
576
- default: false
577
- },
578
- "notificationsOpenModifiers": {}
579
- }),
580
- emits: ["update:notificationsOpen"],
581
- setup(__props) {
582
- const props = __props;
583
- const appBarProps = computed(() => props.appBar ? {
584
- ...props.appBar,
585
- logo: props.logo,
586
- navigation: props.navigationMenu !== void 0
587
- } : void 0);
588
- const notificationsOpen = useModel(__props, "notificationsOpen");
589
- const navigationMenuOpen = ref(false);
590
- return (_ctx, _cache) => {
591
- return openBlock(), createBlock(unref(VApp), { "data-testid": props.dataTestid }, {
592
- default: withCtx(() => [
593
- appBarProps.value ? (openBlock(), createBlock(app_bar_default, mergeProps({ key: 0 }, appBarProps.value, {
594
- "notifications-open": notificationsOpen.value,
595
- "onUpdate:notificationsOpen": _cache[0] || (_cache[0] = ($event) => notificationsOpen.value = $event),
596
- "navigation-open": navigationMenuOpen.value,
597
- "onUpdate:navigationOpen": _cache[1] || (_cache[1] = ($event) => navigationMenuOpen.value = $event)
598
- }), null, 16, ["notifications-open", "navigation-open"])) : createCommentVNode("v-if", true),
599
- props.navigationMenu ? (openBlock(), createBlock(navigation_menu_default, mergeProps({ key: 1 }, props.navigationMenu, {
600
- modelValue: navigationMenuOpen.value,
601
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => navigationMenuOpen.value = $event)
602
- }), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
603
- createVNode(unref(VMain), null, {
604
- default: withCtx(() => [createVNode(container_default, null, {
605
- default: withCtx(() => [renderSlot(_ctx.$slots, "default"), createVNode(toast_default)]),
606
- _: 3
607
- })]),
608
- _: 3
609
- })
610
- ]),
611
- _: 3
612
- }, 8, ["data-testid"]);
613
- };
614
- }
615
- });
616
- //#endregion
617
- //#region src/composables/button/button.ts
618
- const buttonVariantToVuetifyVariant = {
619
- primary: "elevated",
620
- secondary: "flat",
621
- ghost: "outlined"
622
- };
623
- function useButtonVariant(variant) {
624
- return computed(() => {
625
- const variantValue = toValue(variant);
626
- return variantValue ? buttonVariantToVuetifyVariant[variantValue] : buttonVariantToVuetifyVariant.primary;
627
- });
628
- }
629
- function useButtonType(type) {
630
- return computed(() => {
631
- return toValue(type) ?? "button";
632
- });
633
- }
634
- function useButtonForm(form) {
635
- return computed(() => toValue(form));
636
- }
637
- //#endregion
638
- //#region src/components/button/button.vue
639
- var button_default = /* @__PURE__ */ defineComponent({
640
- inheritAttrs: false,
641
- __name: "button",
642
- props: {
643
- variant: {
644
- type: String,
645
- required: false
646
- },
647
- type: {
648
- type: String,
649
- required: false
650
- },
651
- color: {
652
- type: String,
653
- required: false
654
- },
655
- disabled: {
656
- type: Boolean,
657
- required: false
658
- },
659
- loading: {
660
- type: Boolean,
661
- required: false
662
- },
663
- form: {
664
- type: String,
665
- required: false
666
- },
667
- dataTestid: {
668
- type: String,
669
- required: false
670
- }
671
- },
672
- emits: ["click"],
673
- setup(__props, { emit: __emit }) {
674
- const props = __props;
675
- const emit = __emit;
676
- const variant = useButtonVariant(() => props.variant);
677
- const color = useVuetifyColor(() => props.color);
678
- const type = useButtonType(() => props.type);
679
- const form = useButtonForm(() => props.form);
680
- function onClick(event) {
681
- emit("click", event);
682
- }
683
- return (_ctx, _cache) => {
684
- return openBlock(), createBlock(unref(VBtn), {
685
- disabled: props.disabled,
686
- loading: props.loading,
687
- "data-testid": props.dataTestid,
688
- variant: unref(variant),
689
- color: unref(color),
690
- type: unref(type),
691
- form: unref(form),
692
- onClick
693
- }, {
694
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
695
- _: 3
696
- }, 8, [
697
- "disabled",
698
- "loading",
699
- "data-testid",
700
- "variant",
701
- "color",
702
- "type",
703
- "form"
704
- ]);
705
- };
706
- }
707
- });
708
- //#endregion
709
- //#region src/composables/inputs/autocomplete-field.ts
710
- function createAutocompleteRequiredRule(options) {
711
- return createRequiredRule(options.required, (value) => {
712
- if (options.multiple) return (Array.isArray(value) ? value : []).length > 0;
713
- return !isEmpty(String(value ?? ""));
714
- });
715
- }
716
- function useAutocompleteRules(options) {
717
- return computed(() => {
718
- const opts = toValue(options);
719
- const rules = [];
720
- if (opts.required) rules.push(createAutocompleteRequiredRule(opts));
721
- return rules;
722
- });
723
- }
724
- //#endregion
725
- //#region src/components/inputs/autocomplete-field/autocomplete-field.vue
726
- var autocomplete_field_default = /* @__PURE__ */ defineComponent({
727
- inheritAttrs: false,
728
- __name: "autocomplete-field",
729
- props: /*@__PURE__*/ mergeModels({
730
- variant: {
731
- type: String,
732
- required: false,
733
- default: "primary"
734
- },
735
- disabled: {
736
- type: Boolean,
737
- required: false
738
- },
739
- loading: {
740
- type: Boolean,
741
- required: false
742
- },
743
- clearable: {
744
- type: Boolean,
745
- required: false
746
- },
747
- readonly: {
748
- type: Boolean,
749
- required: false
750
- },
751
- required: {
752
- type: Boolean,
753
- required: false
754
- },
755
- label: {
756
- type: String,
757
- required: false
758
- },
759
- placeholder: {
760
- type: String,
761
- required: false
762
- },
763
- hint: {
764
- type: String,
765
- required: false
766
- },
767
- dataTestid: {
768
- type: String,
769
- required: false
770
- },
771
- strict: {
772
- type: Boolean,
773
- required: false
774
- },
775
- multiple: {
776
- type: null,
777
- required: false
778
- },
779
- items: {
780
- type: Array,
781
- required: false,
782
- default: () => []
783
- }
784
- }, {
785
- "modelValue": { type: null },
786
- "modelModifiers": {}
787
- }),
788
- emits: ["update:modelValue"],
789
- setup(__props) {
790
- const modelValue = useModel(__props, "modelValue");
791
- const props = __props;
792
- const vuetifyVariant = useTextFieldVariant(() => props.variant);
793
- const isMultiple = computed(() => props.multiple ?? false);
794
- const rules = useAutocompleteRules(() => ({
795
- required: props.required,
796
- multiple: isMultiple.value
797
- }));
798
- const vuetifyComponent = computed(() => props.strict ? VAutocomplete : VCombobox);
799
- const normalizedItems = computed(() => {
800
- return props.items.map((item) => {
801
- if (typeof item === "string") return {
802
- label: item,
803
- value: item
804
- };
805
- return item;
806
- });
807
- });
808
- return (_ctx, _cache) => {
809
- return openBlock(), createBlock(resolveDynamicComponent(vuetifyComponent.value), {
810
- modelValue: modelValue.value,
811
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
812
- variant: unref(vuetifyVariant),
813
- items: normalizedItems.value,
814
- "data-testid": props.dataTestid,
815
- disabled: props.disabled,
816
- loading: props.loading,
817
- readonly: props.readonly,
818
- label: props.label,
819
- placeholder: props.placeholder,
820
- hint: props.hint,
821
- clearable: props.clearable,
822
- multiple: isMultiple.value,
823
- "item-title": "label",
824
- rules: unref(rules),
825
- chips: ""
826
- }, null, 8, [
827
- "modelValue",
828
- "variant",
829
- "items",
830
- "data-testid",
831
- "disabled",
832
- "loading",
833
- "readonly",
834
- "label",
835
- "placeholder",
836
- "hint",
837
- "clearable",
838
- "multiple",
839
- "rules"
840
- ]);
841
- };
842
- }
843
- });
844
- //#endregion
845
- //#region src/components/inputs/checkbox/checkbox.vue
846
- var checkbox_default = /* @__PURE__ */ defineComponent({
847
- inheritAttrs: false,
848
- __name: "checkbox",
849
- props: /*@__PURE__*/ mergeModels({
850
- label: {
851
- type: String,
852
- required: false
853
- },
854
- disabled: {
855
- type: Boolean,
856
- required: false
857
- },
858
- readonly: {
859
- type: Boolean,
860
- required: false
861
- },
862
- trueValue: {
863
- type: Boolean,
864
- required: false,
865
- skipCheck: true,
866
- default: true
867
- },
868
- falseValue: {
869
- type: Boolean,
870
- required: false,
871
- skipCheck: true,
872
- default: false
873
- },
874
- dataTestid: {
875
- type: String,
876
- required: false
877
- }
878
- }, {
879
- "modelValue": {
880
- type: null,
881
- default: (props) => props.falseValue
882
- },
883
- "modelModifiers": {}
884
- }),
885
- emits: ["update:modelValue"],
886
- setup(__props) {
887
- const props = __props;
888
- const modelValue = useModel(__props, "modelValue");
889
- return (_ctx, _cache) => {
890
- return openBlock(), createBlock(unref(VCheckboxBtn), {
891
- modelValue: modelValue.value,
892
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
893
- "true-value": props.trueValue,
894
- "false-value": props.falseValue,
895
- "data-testid": props.dataTestid,
896
- disabled: props.disabled,
897
- readonly: props.readonly,
898
- label: props.label,
899
- class: "flex-0-1",
900
- "hide-details": ""
901
- }, null, 8, [
902
- "modelValue",
903
- "true-value",
904
- "false-value",
905
- "data-testid",
906
- "disabled",
907
- "readonly",
908
- "label"
909
- ]);
910
- };
911
- }
912
- });
913
- //#endregion
914
- //#region src/components/grid/row/row.vue
915
- var row_default = /* @__PURE__ */ defineComponent({
916
- inheritAttrs: false,
917
- __name: "row",
918
- props: { dataTestid: {
919
- type: String,
920
- required: false
921
- } },
922
- setup(__props) {
923
- const props = __props;
924
- return (_ctx, _cache) => {
925
- return openBlock(), createBlock(unref(VRow), { "data-testid": props.dataTestid }, {
926
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
927
- _: 3
928
- }, 8, ["data-testid"]);
929
- };
930
- }
931
- });
932
- //#endregion
933
- //#region src/components/grid/column/column.vue
934
- var column_default = /* @__PURE__ */ defineComponent({
935
- inheritAttrs: false,
936
- __name: "column",
937
- props: {
938
- cols: {
939
- type: String,
940
- required: false,
941
- default: "12"
942
- },
943
- dataTestid: {
944
- type: String,
945
- required: false
946
- }
947
- },
948
- setup(__props) {
949
- const props = __props;
950
- return (_ctx, _cache) => {
951
- return openBlock(), createBlock(unref(VCol), {
952
- cols: "12",
953
- sm: props.cols,
954
- "data-testid": props.dataTestid
955
- }, {
956
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
957
- _: 3
958
- }, 8, ["sm", "data-testid"]);
959
- };
960
- }
961
- });
962
- //#endregion
963
- //#region src/components/form/form.vue
964
- var form_default = /* @__PURE__ */ defineComponent({
965
- inheritAttrs: false,
966
- __name: "form",
967
- props: {
968
- id: {
969
- type: String,
970
- required: false
971
- },
972
- dataTestid: {
973
- type: String,
974
- required: false
975
- }
976
- },
977
- emits: ["submit"],
978
- setup(__props, { emit: __emit }) {
979
- const props = __props;
980
- const emit = __emit;
981
- async function onSubmit(event) {
982
- const { valid } = await event;
983
- if (valid) emit("submit", event);
984
- }
985
- return (_ctx, _cache) => {
986
- return openBlock(), createBlock(unref(VForm), {
987
- id: props.id,
988
- "data-testid": props.dataTestid,
989
- onSubmit: withModifiers(onSubmit, ["prevent"])
990
- }, {
991
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
992
- _: 3
993
- }, 8, ["id", "data-testid"]);
994
- };
995
- }
996
- });
997
- //#endregion
998
- //#region src/components/sections/section-content/section-content.vue
999
- var section_content_default = /* @__PURE__ */ defineComponent({
1000
- inheritAttrs: false,
1001
- __name: "section-content",
1002
- setup(__props) {
1003
- return (_ctx, _cache) => {
1004
- return openBlock(), createBlock(unref(VCardText), null, {
1005
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1006
- _: 3
1007
- });
1008
- };
1009
- }
1010
- });
1011
- //#endregion
1012
- //#region src/composables/section/section.ts
1013
- const sectionVariantToVuetifyVariant = {
1014
- primary: "elevated",
1015
- secondary: "outlined"
1016
- };
1017
- function useSectionVariant(variant) {
1018
- return computed(() => {
1019
- const variantValue = toValue(variant);
1020
- return variantValue ? sectionVariantToVuetifyVariant[variantValue] : sectionVariantToVuetifyVariant.primary;
1021
- });
1022
- }
1023
- //#endregion
1024
- //#region src/components/sections/section/section.vue
1025
- var section_default = /* @__PURE__ */ defineComponent({
1026
- inheritAttrs: false,
1027
- __name: "section",
1028
- props: {
1029
- variant: {
1030
- type: String,
1031
- required: false
1032
- },
1033
- title: {
1034
- type: String,
1035
- required: false
1036
- },
1037
- subtitle: {
1038
- type: String,
1039
- required: false
1040
- },
1041
- actions: {
1042
- type: Array,
1043
- required: false
1044
- },
1045
- fullWidth: {
1046
- type: Boolean,
1047
- required: false
1048
- },
1049
- fullHeight: {
1050
- type: Boolean,
1051
- required: false
1052
- },
1053
- loading: {
1054
- type: Boolean,
1055
- required: false
1056
- },
1057
- dataTestid: {
1058
- type: String,
1059
- required: false
1060
- }
1061
- },
1062
- setup(__props) {
1063
- const props = __props;
1064
- const variant = useSectionVariant(() => props.variant);
1065
- const title = computed(() => props.title || void 0);
1066
- const subtitle = computed(() => props.subtitle || void 0);
1067
- const width = computed(() => props.fullWidth ? "100%" : void 0);
1068
- const height = computed(() => props.fullHeight ? "100%" : void 0);
1069
- const showActions = computed(() => !!props.actions?.length);
1070
- const skeletonType = computed(() => showActions.value ? "image, actions" : "image");
1071
- return (_ctx, _cache) => {
1072
- return openBlock(), createBlock(unref(VSkeletonLoader), {
1073
- loading: props.loading,
1074
- type: skeletonType.value,
1075
- width: width.value,
1076
- height: height.value
1077
- }, {
1078
- default: withCtx(() => [createVNode(unref(VCard), {
1079
- title: title.value,
1080
- subtitle: subtitle.value,
1081
- variant: unref(variant),
1082
- width: width.value,
1083
- height: height.value,
1084
- "data-testid": props.dataTestid,
1085
- class: "d-flex flex-column"
1086
- }, {
1087
- default: withCtx(() => [renderSlot(_ctx.$slots, "default"), showActions.value ? (openBlock(), createBlock(unref(VCardActions), {
1088
- key: 0,
1089
- class: "mt-auto"
1090
- }, {
1091
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.actions, ({ label, onClick, ...action }, index) => {
1092
- return openBlock(), createBlock(button_default, mergeProps({ key: index }, { ref_for: true }, action, { onClick }), {
1093
- default: withCtx(() => [createTextVNode(toDisplayString(label), 1)]),
1094
- _: 2
1095
- }, 1040, ["onClick"]);
1096
- }), 128))]),
1097
- _: 1
1098
- })) : createCommentVNode("v-if", true)]),
1099
- _: 3
1100
- }, 8, [
1101
- "title",
1102
- "subtitle",
1103
- "variant",
1104
- "width",
1105
- "height",
1106
- "data-testid"
1107
- ])]),
1108
- _: 3
1109
- }, 8, [
1110
- "loading",
1111
- "type",
1112
- "width",
1113
- "height"
1114
- ]);
1115
- };
1116
- }
1117
- });
1118
- //#endregion
1119
- //#region src/components/table/table.vue?vue&type=script&setup=true&lang.ts
1120
- const _hoisted_1 = { scope: "row" };
1121
- const _hoisted_2 = { key: 0 };
1122
- //#endregion
1123
- //#region src/components/table/table.vue
1124
- var table_default = /* @__PURE__ */ defineComponent({
1125
- inheritAttrs: false,
1126
- __name: "table",
1127
- props: {
1128
- headers: {
1129
- type: Array,
1130
- required: false
1131
- },
1132
- items: {
1133
- type: Array,
1134
- required: false
1135
- },
1136
- vertical: {
1137
- type: Boolean,
1138
- required: false
1139
- },
1140
- loading: {
1141
- type: Boolean,
1142
- required: false
1143
- },
1144
- dataTestid: {
1145
- type: String,
1146
- required: false
1147
- }
1148
- },
1149
- setup(__props) {
1150
- const props = __props;
1151
- const hasHeaders = computed(() => !!props.headers?.length);
1152
- const itemRows = computed(() => props.items ?? []);
1153
- const type = computed(() => {
1154
- if (hasHeaders.value && !props.vertical) return "table-thead, table-tbody";
1155
- return "table-tbody";
1156
- });
1157
- function getVerticalTableTestId(index) {
1158
- if (!props.dataTestid) return void 0;
1159
- if (itemRows.value.length === 1) return props.dataTestid;
1160
- return `${props.dataTestid}-${index}`;
1161
- }
1162
- return (_ctx, _cache) => {
1163
- return openBlock(), createBlock(unref(VSkeletonLoader), {
1164
- loading: props.loading,
1165
- type: type.value
1166
- }, {
1167
- default: withCtx(() => [props.vertical ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(itemRows.value, (item, itemIndex) => {
1168
- return openBlock(), createBlock(unref(VTable), {
1169
- key: itemIndex,
1170
- "data-testid": getVerticalTableTestId(itemIndex)
1171
- }, {
1172
- default: withCtx(() => [createElementVNode("tbody", null, [hasHeaders.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.headers, (header, headerIndex) => {
1173
- return openBlock(), createElementBlock("tr", { key: headerIndex }, [createElementVNode("th", _hoisted_1, toDisplayString(header), 1), createElementVNode("td", null, toDisplayString(item[headerIndex]), 1)]);
1174
- }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(item, (cell, cellIndex) => {
1175
- return openBlock(), createElementBlock("tr", { key: cellIndex }, [createElementVNode("td", null, toDisplayString(cell), 1)]);
1176
- }), 128))])]),
1177
- _: 2
1178
- }, 1032, ["data-testid"]);
1179
- }), 128)) : (openBlock(), createBlock(unref(VTable), {
1180
- key: 1,
1181
- "data-testid": props.dataTestid
1182
- }, {
1183
- default: withCtx(() => [hasHeaders.value && !props.vertical ? (openBlock(), createElementBlock("thead", _hoisted_2, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.headers, (header, index) => {
1184
- return openBlock(), createElementBlock("th", {
1185
- key: index,
1186
- scope: "col"
1187
- }, toDisplayString(header), 1);
1188
- }), 128))])])) : createCommentVNode("v-if", true), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(itemRows.value, (row, rowIndex) => {
1189
- return openBlock(), createElementBlock("tr", { key: rowIndex }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, cellIndex) => {
1190
- return openBlock(), createElementBlock("td", { key: cellIndex }, toDisplayString(cell), 1);
1191
- }), 128))]);
1192
- }), 128))])]),
1193
- _: 1
1194
- }, 8, ["data-testid"]))]),
1195
- _: 1
1196
- }, 8, ["loading", "type"]);
1197
- };
1198
- }
1199
- });
1200
- //#endregion
1201
- //#region src/components/details/details.vue
1202
- var details_default = /* @__PURE__ */ defineComponent({
1203
- inheritAttrs: false,
1204
- __name: "details",
1205
- props: {
1206
- variant: {
1207
- type: String,
1208
- required: false
1209
- },
1210
- title: {
1211
- type: String,
1212
- required: false
1213
- },
1214
- loading: {
1215
- type: Boolean,
1216
- required: false
1217
- },
1218
- dataTestid: {
1219
- type: String,
1220
- required: false
1221
- }
1222
- },
1223
- setup(__props) {
1224
- const props = __props;
1225
- const outlined = computed(() => props.variant === "secondary");
1226
- return (_ctx, _cache) => {
1227
- return openBlock(), createBlock(unref(VSkeletonLoader), {
1228
- loading: props.loading,
1229
- type: "heading",
1230
- width: "100%"
1231
- }, {
1232
- default: withCtx(() => [createVNode(unref(VExpansionPanels), {
1233
- flat: outlined.value,
1234
- "data-testid": props.dataTestid
1235
- }, {
1236
- default: withCtx(() => [createVNode(unref(VExpansionPanel), { class: normalizeClass({ border: outlined.value }) }, {
1237
- default: withCtx(() => [createVNode(unref(VExpansionPanelTitle), null, {
1238
- default: withCtx(() => [createTextVNode(toDisplayString(props.title), 1)]),
1239
- _: 1
1240
- }), createVNode(unref(VExpansionPanelText), null, {
1241
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1242
- _: 3
1243
- })]),
1244
- _: 3
1245
- }, 8, ["class"])]),
1246
- _: 3
1247
- }, 8, ["flat", "data-testid"])]),
1248
- _: 3
1249
- }, 8, ["loading"]);
1250
- };
1251
- }
1252
- });
1253
- //#endregion
1254
- export { autocomplete_field_default as UAutocompleteField, button_default as UButton, checkbox_default as UCheckbox, column_default as UColumn, container_default as UContainer, details_default as UDetails, form_default as UForm, main_default as UMain, row_default as URow, section_default as USection, section_content_default as USectionContent, table_default as UTable, text_field_default as UTextField };
1
+ import text_field_default from "./components/inputs/text-field/text-field.js";
2
+ import container_default from "./components/grid/container/container.js";
3
+ import button_default from "./components/button/button.js";
4
+ import dialog_default from "./components/dialogs/dialog/dialog.js";
5
+ import main_default from "./components/main/main.js";
6
+ import icon_button_default from "./components/icon-button/icon-button.js";
7
+ import autocomplete_field_default from "./components/inputs/autocomplete-field/autocomplete-field.js";
8
+ import checkbox_default from "./components/inputs/checkbox/checkbox.js";
9
+ import date_time_field_default from "./components/inputs/date-time-field/date-time-field.js";
10
+ import mask_field_default from "./components/inputs/mask-field/mask-field.js";
11
+ import row_default from "./components/grid/row/row.js";
12
+ import column_default from "./components/grid/column/column.js";
13
+ import form_default from "./components/form/form.js";
14
+ import section_content_default from "./components/sections/section-content/section-content.js";
15
+ import section_default from "./components/sections/section/section.js";
16
+ import table_default from "./components/table/table.js";
17
+ import details_default from "./components/details/details.js";
18
+ import img_default from "./components/img/img.js";
19
+ import link_default from "./components/link/link.js";
20
+ import data_set_default from "./components/data-sets/data-set/data-set.js";
21
+ import data_set_item_default from "./components/data-sets/data-set-item/data-set-item.js";
22
+ import page_transition_default from "./components/page-transition/page-transition.js";
23
+ export { autocomplete_field_default as UAutocompleteField, button_default as UButton, checkbox_default as UCheckbox, column_default as UColumn, container_default as UContainer, data_set_default as UDataSet, data_set_item_default as UDataSetItem, date_time_field_default as UDateTimeField, details_default as UDetails, dialog_default as UDialog, form_default as UForm, icon_button_default as UIconButton, img_default as UImg, link_default as ULink, main_default as UMain, mask_field_default as UMaskField, page_transition_default as UPageTransition, row_default as URow, section_default as USection, section_content_default as USectionContent, table_default as UTable, text_field_default as UTextField };