@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
@@ -0,0 +1,108 @@
1
+ import { useFullHeight, useFullWidth } from "../../../composables/dimensions/dimensions.js";
2
+ import skeleton_loader_default from "../../skeleton-loader/skeleton-loader.js";
3
+ import button_default from "../../button/button.js";
4
+ import { useSectionTextAlign, useSectionVariant } from "../../../composables/section/section.js";
5
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
6
+ import { VCard, VCardActions } from "vuetify/components";
7
+ var section_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
8
+ inheritAttrs: false,
9
+ __name: "section",
10
+ props: {
11
+ variant: {
12
+ type: String,
13
+ required: false
14
+ },
15
+ title: {
16
+ type: String,
17
+ required: false
18
+ },
19
+ subtitle: {
20
+ type: String,
21
+ required: false
22
+ },
23
+ textAlign: {
24
+ type: String,
25
+ required: false
26
+ },
27
+ actions: {
28
+ type: Array,
29
+ required: false
30
+ },
31
+ fullWidth: {
32
+ type: Boolean,
33
+ required: false
34
+ },
35
+ fullHeight: {
36
+ type: Boolean,
37
+ required: false
38
+ },
39
+ loading: {
40
+ type: Boolean,
41
+ required: false
42
+ },
43
+ dataTestid: {
44
+ type: String,
45
+ required: false
46
+ }
47
+ },
48
+ setup(__props) {
49
+ const props = __props;
50
+ const variant = useSectionVariant(() => props.variant);
51
+ const textAlignClasses = useSectionTextAlign(() => props.textAlign);
52
+ const title = computed(() => props.title || void 0);
53
+ const subtitle = computed(() => props.subtitle || void 0);
54
+ const widthClass = useFullWidth(() => props.fullWidth);
55
+ const heightClass = useFullHeight(() => props.fullHeight);
56
+ const showActions = computed(() => !!props.actions?.length);
57
+ const skeletonType = computed(() => showActions.value ? "image, actions" : "image");
58
+ return (_ctx, _cache) => {
59
+ return openBlock(), createBlock(skeleton_loader_default, {
60
+ loading: props.loading,
61
+ type: skeletonType.value,
62
+ "full-width": props.fullWidth,
63
+ "full-height": props.fullHeight
64
+ }, {
65
+ default: withCtx(() => [createCommentVNode(" The card and its actions have no alignment props, so `textAlign` uses utility classes "), createVNode(unref(VCard), {
66
+ title: title.value,
67
+ subtitle: subtitle.value,
68
+ variant: unref(variant),
69
+ "data-testid": props.dataTestid,
70
+ class: normalizeClass([
71
+ "d-flex flex-column",
72
+ unref(widthClass),
73
+ unref(heightClass),
74
+ unref(textAlignClasses).content
75
+ ])
76
+ }, {
77
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default"), showActions.value ? (openBlock(), createBlock(unref(VCardActions), {
78
+ key: 0,
79
+ class: normalizeClass(["mt-auto", unref(textAlignClasses).actions])
80
+ }, {
81
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.actions, ({ label, onClick, ...action }, index) => {
82
+ return openBlock(), createBlock(button_default, mergeProps({ key: index }, { ref_for: true }, action, { onClick }), {
83
+ default: withCtx(() => [createTextVNode(toDisplayString(label), 1)]),
84
+ _: 2
85
+ }, 1040, ["onClick"]);
86
+ }), 128))]),
87
+ _: 1
88
+ }, 8, ["class"])) : createCommentVNode("v-if", true)]),
89
+ _: 3
90
+ }, 8, [
91
+ "title",
92
+ "subtitle",
93
+ "variant",
94
+ "data-testid",
95
+ "class"
96
+ ])]),
97
+ _: 3
98
+ }, 8, [
99
+ "loading",
100
+ "type",
101
+ "full-width",
102
+ "full-height"
103
+ ]);
104
+ };
105
+ }
106
+ });
107
+ //#endregion
108
+ export { section_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,80 @@
1
+ import { ButtonProps } from "../../button/types.js";
2
+ //#region src/components/sections/section/types.d.ts
3
+ export type SectionVariant = "primary" | "secondary";
4
+ export type SectionTextAlign = "start" | "center" | "end";
5
+ /**
6
+ * Props exposed by the {@link Section} component.
7
+ */
8
+ export type SectionProps = {
9
+ /**
10
+ * Applies a distinct style variation to the section.
11
+ * One of `primary` or `secondary`.
12
+ * @default "primary"
13
+ */
14
+ variant?: SectionVariant;
15
+ /**
16
+ * Title displayed at the top of the section.
17
+ */
18
+ title?: string;
19
+ /**
20
+ * Subtitle displayed below the title.
21
+ */
22
+ subtitle?: string;
23
+ /**
24
+ * Horizontal alignment of the section's title, subtitle, content and actions.
25
+ * Available options are:
26
+ * - `"start"`: aligns the text to the start (left in left-to-right languages)
27
+ * and keeps the actions at the end;
28
+ * - `"center"`: centers the text and the actions;
29
+ * - `"end"`: aligns the text and the actions to the end.
30
+ *
31
+ * Uses `start`/`end` instead of `left`/`right`, so it follows the text
32
+ * direction in right-to-left languages. Nested components inherit the
33
+ * alignment, unless they define their own.
34
+ * @default "start"
35
+ */
36
+ textAlign?: SectionTextAlign;
37
+ /**
38
+ * List of actions displayed at the bottom of the section, inside
39
+ * `v-card-actions`. When undefined or empty, no actions area is rendered.
40
+ */
41
+ actions?: SectionAction[];
42
+ /**
43
+ * Makes the section occupy 100% of its parent's width.
44
+ * @default false
45
+ */
46
+ fullWidth?: boolean;
47
+ /**
48
+ * Makes the section occupy 100% of its parent's height.
49
+ *
50
+ * Inside a `URow`, set its `alignY` to `"stretch"` so the section takes the height of the
51
+ * tallest column on the same line.
52
+ * @default false
53
+ */
54
+ fullHeight?: boolean;
55
+ /**
56
+ * Shows a skeleton loader in place of the content while data is being
57
+ * loaded.
58
+ * @default false
59
+ */
60
+ loading?: boolean;
61
+ /**
62
+ * Component id to use on automated tests.
63
+ */
64
+ dataTestid?: string;
65
+ };
66
+ /**
67
+ * A single action rendered inside {@link Section}'s actions area.
68
+ */
69
+ export interface SectionAction extends ButtonProps {
70
+ /**
71
+ * Text displayed on the action button.
72
+ */
73
+ label: string;
74
+ /**
75
+ * Called when the action button is clicked. Not called while the action is `disabled` or
76
+ * `loading`.
77
+ */
78
+ onClick?: (event: MouseEvent) => void;
79
+ }
80
+ //#endregion
@@ -0,0 +1,5 @@
1
+ import section_content_vue_vue_type_script_setup_true_lang_default from "./section-content.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/sections/section-content/section-content.vue
3
+ var section_content_default = section_content_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { section_content_default as default };
@@ -0,0 +1,27 @@
1
+ //#region src/components/sections/section-content/section-content.vue.d.ts
2
+ /**
3
+ * Proxy component for Vuetify's `v-card-text`, used to structure content
4
+ * displayed inside a {@link Section}.
5
+ *
6
+ * @example
7
+ * ```vue
8
+ * <template>
9
+ * <u-section title="Title">
10
+ * <u-section-content>Content</u-section-content>
11
+ * </u-section>
12
+ * </template>
13
+ * ```
14
+ *
15
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/section | Section Guide}
16
+ */
17
+ declare const _default: typeof __VLS_export;
18
+ declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<{}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, true, {}, any>, {
19
+ default?: (props: {}) => any;
20
+ }>;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
26
+ //#endregion
27
+ export { _default as default };
@@ -0,0 +1,16 @@
1
+ import { createBlock, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
2
+ import { VCardText } from "vuetify/components";
3
+ var section_content_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
4
+ inheritAttrs: false,
5
+ __name: "section-content",
6
+ setup(__props) {
7
+ return (_ctx, _cache) => {
8
+ return openBlock(), createBlock(unref(VCardText), null, {
9
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
10
+ _: 3
11
+ });
12
+ };
13
+ }
14
+ });
15
+ //#endregion
16
+ export { section_content_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,5 @@
1
+ import skeleton_loader_vue_vue_type_script_setup_true_lang_default from "./skeleton-loader.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/skeleton-loader/skeleton-loader.vue
3
+ var skeleton_loader_default = skeleton_loader_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { skeleton_loader_default as default };
@@ -0,0 +1,65 @@
1
+ import { useFullHeight, useFullWidth } from "../../composables/dimensions/dimensions.js";
2
+ import { useLocale } from "vuetify";
3
+ import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
4
+ import { VSkeletonLoader } from "vuetify/components";
5
+ var skeleton_loader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
6
+ inheritAttrs: false,
7
+ __name: "skeleton-loader",
8
+ props: {
9
+ loading: {
10
+ type: Boolean,
11
+ required: false
12
+ },
13
+ type: {
14
+ type: null,
15
+ required: true
16
+ },
17
+ fullWidth: {
18
+ type: Boolean,
19
+ required: false
20
+ },
21
+ fullHeight: {
22
+ type: Boolean,
23
+ required: false
24
+ },
25
+ color: {
26
+ type: String,
27
+ required: false
28
+ }
29
+ },
30
+ setup(__props) {
31
+ const props = __props;
32
+ const { t } = useLocale();
33
+ const widthClass = useFullWidth(() => props.fullWidth);
34
+ const heightClass = useFullHeight(() => props.fullHeight);
35
+ const alignContentClass = computed(() => props.fullHeight ? "align-content-space-between" : void 0);
36
+ const loadingAttrs = computed(() => ({
37
+ ariaLabel: void 0,
38
+ ariaLive: void 0,
39
+ "aria-label": t("$vuetify.loading"),
40
+ "aria-live": "polite"
41
+ }));
42
+ return (_ctx, _cache) => {
43
+ return openBlock(), createBlock(unref(VSkeletonLoader), mergeProps({
44
+ loading: props.loading,
45
+ type: props.type,
46
+ color: props.color,
47
+ class: [
48
+ unref(widthClass),
49
+ unref(heightClass),
50
+ alignContentClass.value
51
+ ]
52
+ }, loadingAttrs.value), {
53
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
54
+ _: 3
55
+ }, 16, [
56
+ "loading",
57
+ "type",
58
+ "color",
59
+ "class"
60
+ ]);
61
+ };
62
+ }
63
+ });
64
+ //#endregion
65
+ export { skeleton_loader_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,5 @@
1
+ import table_vue_vue_type_script_setup_true_lang_default from "./table.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/table/table.vue
3
+ var table_default = table_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { table_default as default };
@@ -0,0 +1,19 @@
1
+ import { TableProps } from "./types.js";
2
+ //#region src/components/table/table.vue.d.ts
3
+ /**
4
+ * Component to present data using tables. All content is data-driven via props
5
+ * — no slots. Supports both horizontal (default) and vertical layouts.
6
+ *
7
+ * @example
8
+ * ```vue
9
+ * <template>
10
+ * <u-table :headers="['Nome', 'Idade']" :items="[['Ana', '30'], ['Bruno', '25']]" />
11
+ * </template>
12
+ * ```
13
+ *
14
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/table | Table Guide}
15
+ */
16
+ declare const _default: typeof __VLS_export;
17
+ declare const __VLS_export: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<TableProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<TableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
18
+ //#endregion
19
+ export { _default as default };
@@ -0,0 +1,84 @@
1
+ import skeleton_loader_default from "../skeleton-loader/skeleton-loader.js";
2
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
3
+ import { VTable } from "vuetify/components";
4
+ //#region src/components/table/table.vue?vue&type=script&setup=true&lang.ts
5
+ const _hoisted_1 = { scope: "row" };
6
+ const _hoisted_2 = { key: 0 };
7
+ var table_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
8
+ inheritAttrs: false,
9
+ __name: "table",
10
+ props: {
11
+ headers: {
12
+ type: Array,
13
+ required: false
14
+ },
15
+ items: {
16
+ type: Array,
17
+ required: false
18
+ },
19
+ vertical: {
20
+ type: Boolean,
21
+ required: false
22
+ },
23
+ loading: {
24
+ type: Boolean,
25
+ required: false
26
+ },
27
+ dataTestid: {
28
+ type: String,
29
+ required: false
30
+ }
31
+ },
32
+ setup(__props) {
33
+ const props = __props;
34
+ const hasHeaders = computed(() => !!props.headers?.length);
35
+ const itemRows = computed(() => props.items ?? []);
36
+ const type = computed(() => {
37
+ if (hasHeaders.value && !props.vertical) return "table-thead, table-tbody";
38
+ return "table-tbody";
39
+ });
40
+ function getVerticalTableTestId(index) {
41
+ if (!props.dataTestid) return void 0;
42
+ if (itemRows.value.length === 1) return props.dataTestid;
43
+ return `${props.dataTestid}-${index}`;
44
+ }
45
+ return (_ctx, _cache) => {
46
+ return openBlock(), createBlock(skeleton_loader_default, {
47
+ loading: props.loading,
48
+ type: type.value
49
+ }, {
50
+ default: withCtx(() => [props.vertical ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(itemRows.value, (item, itemIndex) => {
51
+ return openBlock(), createBlock(unref(VTable), {
52
+ key: itemIndex,
53
+ "data-testid": getVerticalTableTestId(itemIndex)
54
+ }, {
55
+ default: withCtx(() => [createElementVNode("tbody", null, [hasHeaders.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.headers, (header, headerIndex) => {
56
+ return openBlock(), createElementBlock("tr", { key: headerIndex }, [createElementVNode("th", _hoisted_1, toDisplayString(header), 1), createElementVNode("td", null, toDisplayString(item[headerIndex]), 1)]);
57
+ }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(item, (cell, cellIndex) => {
58
+ return openBlock(), createElementBlock("tr", { key: cellIndex }, [createElementVNode("td", null, toDisplayString(cell), 1)]);
59
+ }), 128))])]),
60
+ _: 2
61
+ }, 1032, ["data-testid"]);
62
+ }), 128)) : (openBlock(), createBlock(unref(VTable), {
63
+ key: 1,
64
+ "data-testid": props.dataTestid
65
+ }, {
66
+ default: withCtx(() => [hasHeaders.value && !props.vertical ? (openBlock(), createElementBlock("thead", _hoisted_2, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.headers, (header, index) => {
67
+ return openBlock(), createElementBlock("th", {
68
+ key: index,
69
+ scope: "col"
70
+ }, toDisplayString(header), 1);
71
+ }), 128))])])) : createCommentVNode("v-if", true), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(itemRows.value, (row, rowIndex) => {
72
+ return openBlock(), createElementBlock("tr", { key: rowIndex }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, cellIndex) => {
73
+ return openBlock(), createElementBlock("td", { key: cellIndex }, toDisplayString(cell), 1);
74
+ }), 128))]);
75
+ }), 128))])]),
76
+ _: 1
77
+ }, 8, ["data-testid"]))]),
78
+ _: 1
79
+ }, 8, ["loading", "type"]);
80
+ };
81
+ }
82
+ });
83
+ //#endregion
84
+ export { table_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,51 @@
1
+ //#region src/components/table/types.d.ts
2
+ /**
3
+ * Props exposed by the {@link UTable} component.
4
+ */
5
+ export type TableProps = {
6
+ /**
7
+ * Optional column headers. When not provided or empty, no `<thead>` is
8
+ * rendered in horizontal mode. In vertical mode, headers (when non-empty)
9
+ * are used as labels for rows. When `vertical` is true and `headers` is
10
+ * `undefined`, the component falls back to horizontal mode (single table,
11
+ * plain rows). When `vertical` is true and `headers` is an empty array,
12
+ * vertical mode is still used, but rows are rendered without labels (a
13
+ * single `<td>` per row).
14
+ */
15
+ headers?: string[];
16
+ /**
17
+ * Optional rows of data. Each entry is a list of string cell values.
18
+ * In horizontal mode, each item becomes one `<tr>` with cells as `<td>`.
19
+ * In vertical mode with headers, renders one `v-table` per item with one `<tr>`
20
+ * per header (th + td for that item's value). In vertical mode with an empty
21
+ * `headers` array, renders one `v-table` per item with one `<tr>` per cell
22
+ * value (a single `<td>`, no `<th>`). No padding or truncation applied —
23
+ * cells are rendered exactly as provided, even if rows have different lengths.
24
+ */
25
+ items?: string[][];
26
+ /**
27
+ * Changes table layout when true. When enabled with a non-empty `headers`
28
+ * array, renders one `v-table` per item in `items`, with each table showing
29
+ * that item's values vertically (one row per header). When enabled with an
30
+ * empty `headers` array, still renders one `v-table` per item, but each row
31
+ * only has the item's value (no header label). When `headers` is
32
+ * `undefined`, falls back to horizontal layout (single table, plain rows)
33
+ * regardless of this prop.
34
+ * @default false
35
+ */
36
+ vertical?: boolean;
37
+ /**
38
+ * Shows a skeleton loader in place of the table content while data is being
39
+ * loaded.
40
+ * @default false
41
+ */
42
+ loading?: boolean;
43
+ /**
44
+ * Component id to use on automated tests. In vertical mode with multiple
45
+ * items, each table gets a suffixed id: `${dataTestid}-${index}`. With a
46
+ * single table (non-vertical or vertical with one item), the unsuffixed id
47
+ * is used. When undefined, no data-testid attribute is set.
48
+ */
49
+ dataTestid?: string;
50
+ };
51
+ //#endregion