@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,29 @@
1
+ import { RowProps } from "./types.js";
2
+ //#region src/components/grid/row/row.vue.d.ts
3
+ /**
4
+ * Row component to be placed within a container.
5
+ *
6
+ * @example
7
+ * ```vue
8
+ * <template>
9
+ * <u-container>
10
+ * <u-row align-x="center" align-y="center">
11
+ * <!-- uimed-column -->
12
+ * </u-row>
13
+ * </u-container>
14
+ * </template>
15
+ * ```
16
+ *
17
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Row Guide}
18
+ */
19
+ declare const _default: typeof __VLS_export;
20
+ declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<RowProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<RowProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
21
+ default?: (props: {}) => any;
22
+ }>;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
28
+ //#endregion
29
+ export { _default as default };
@@ -0,0 +1,61 @@
1
+ import { useFullHeight } from "../../../composables/dimensions/dimensions.js";
2
+ import { useAlignX, useAlignY } from "../../../composables/alignment/alignment.js";
3
+ import { computed, createBlock, defineComponent, normalizeClass, openBlock, renderSlot, unref, withCtx } from "vue";
4
+ import { VRow } from "vuetify/components";
5
+ var row_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
6
+ inheritAttrs: false,
7
+ __name: "row",
8
+ props: {
9
+ alignX: {
10
+ type: String,
11
+ required: false
12
+ },
13
+ alignY: {
14
+ type: String,
15
+ required: false
16
+ },
17
+ fullHeight: {
18
+ type: Boolean,
19
+ required: false
20
+ },
21
+ list: {
22
+ type: Boolean,
23
+ required: false
24
+ },
25
+ dataTestid: {
26
+ type: String,
27
+ required: false
28
+ }
29
+ },
30
+ setup(__props) {
31
+ const props = __props;
32
+ const alignXClass = useAlignX(() => props.alignX);
33
+ const alignYClasses = useAlignY(() => props.alignY);
34
+ const heightClass = useFullHeight(() => props.fullHeight);
35
+ const alignContentClass = computed(() => props.fullHeight ? alignYClasses.value.content : void 0);
36
+ const tag = computed(() => props.list ? "ul" : void 0);
37
+ const listClasses = computed(() => props.list ? "pa-0 ma-0" : void 0);
38
+ return (_ctx, _cache) => {
39
+ return openBlock(), createBlock(unref(VRow), {
40
+ tag: tag.value,
41
+ class: normalizeClass([
42
+ unref(alignXClass),
43
+ unref(alignYClasses).items,
44
+ unref(heightClass),
45
+ alignContentClass.value,
46
+ listClasses.value
47
+ ]),
48
+ "data-testid": props.dataTestid
49
+ }, {
50
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
51
+ _: 3
52
+ }, 8, [
53
+ "tag",
54
+ "class",
55
+ "data-testid"
56
+ ]);
57
+ };
58
+ }
59
+ });
60
+ //#endregion
61
+ export { row_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,63 @@
1
+ import { AlignX, AlignY } from "../../../composables/alignment/types.js";
2
+ //#region src/components/grid/row/types.d.ts
3
+ /**
4
+ * Props exposed by the {@link Row} component.
5
+ */
6
+ export type RowProps = {
7
+ /**
8
+ * Horizontal alignment of the row's columns on each line.
9
+ * Available options are:
10
+ * - `"start"`: aligns the columns to the start of the line;
11
+ * - `"center"`: centers the columns horizontally;
12
+ * - `"end"`: aligns the columns to the end of the line.
13
+ *
14
+ * `"start"` and `"end"` follow the text direction. It only has a visible effect when the
15
+ * columns of a line don't fill it, e.g. with `cols="auto"` or sizes adding up to less than 12.
16
+ * When the columns wrap into several lines, each line is aligned on its own.
17
+ *
18
+ * Columns sit side by side only from the `sm` breakpoint up. Below it, each column takes a
19
+ * whole line, so the alignment has no visible effect.
20
+ * @default "start"
21
+ */
22
+ alignX?: AlignX;
23
+ /**
24
+ * Vertical alignment of the row's columns, relative to the tallest column on the same line.
25
+ * Available options are:
26
+ * - `"start"`: aligns the columns to the top;
27
+ * - `"center"`: centers the columns vertically;
28
+ * - `"end"`: aligns the columns to the bottom;
29
+ * - `"stretch"`: stretches every column to the height of the tallest one.
30
+ *
31
+ * Use `"stretch"` to keep side by side columns at the same height, e.g. cards made of
32
+ * `USection`s with `fullHeight`.
33
+ *
34
+ * Columns sit side by side only from the `sm` breakpoint up. Below it, each column takes a
35
+ * whole line, so the alignment has no visible effect, unless the row has `fullHeight`: then
36
+ * the columns, as a group, are aligned within the row's height.
37
+ * @default "start"
38
+ */
39
+ alignY?: AlignY;
40
+ /**
41
+ * Stretches the row to the whole height of its parent: the visible content area of `UMain`
42
+ * (below its app bar) or a `UContainer` with `fullHeight`.
43
+ *
44
+ * Combine it with `alignY` to place the columns within that height, e.g. `alignY="center"`
45
+ * and `alignX="center"` to center a login form on the screen. A row with `fullHeight` takes
46
+ * the whole height by itself, so other rows next to it are pushed below the visible area.
47
+ * @default false
48
+ */
49
+ fullHeight?: boolean;
50
+ /**
51
+ * Renders the row as a list (`<ul>`), without the list's default indentation
52
+ * and bullets, so assistive technologies announce its columns as the items
53
+ * of a list. Use it for a grid of records that is, semantically, a list,
54
+ * like cards of patients, and set `listItem` on each of its `UColumn`s.
55
+ * @default false
56
+ */
57
+ list?: boolean;
58
+ /**
59
+ * Component id to use on automated tests.
60
+ */
61
+ dataTestid?: string;
62
+ };
63
+ //#endregion
@@ -0,0 +1,5 @@
1
+ import icon_button_vue_vue_type_script_setup_true_lang_default from "./icon-button.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/icon-button/icon-button.vue
3
+ var icon_button_default = icon_button_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { icon_button_default as default };
@@ -0,0 +1,23 @@
1
+ import { IconButtonProps } from "./types.js";
2
+ //#region src/components/icon-button/icon-button.vue.d.ts
3
+ /**
4
+ * Button that shows only an icon, for actions whose icon is enough to identify them, such as
5
+ * editing a record of a list. Its `label` is the name assistive technologies read.
6
+ *
7
+ * @example
8
+ * ```vue
9
+ * <template>
10
+ * <u-icon-button icon="cog" label="Configurações" @click="onClick" />
11
+ * </template>
12
+ * ```
13
+ *
14
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/icon-button | IconButton Guide}
15
+ */
16
+ declare const _default: typeof __VLS_export;
17
+ declare const __VLS_export: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<IconButtonProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
18
+ click: (event: MouseEvent) => any;
19
+ }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<IconButtonProps> & Readonly<{
20
+ onClick?: ((event: MouseEvent) => any) | undefined;
21
+ }>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
22
+ //#endregion
23
+ export { _default as default };
@@ -0,0 +1,51 @@
1
+ import { icons } from "../../consts/icons.js";
2
+ import useVuetifyColor from "../../composables/colors/use-vuetify-color.js";
3
+ import { createBlock, defineComponent, openBlock, unref } from "vue";
4
+ import { VIconBtn } from "vuetify/components";
5
+ var icon_button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
6
+ inheritAttrs: false,
7
+ __name: "icon-button",
8
+ props: {
9
+ icon: {
10
+ type: null,
11
+ required: true
12
+ },
13
+ label: {
14
+ type: String,
15
+ required: true
16
+ },
17
+ color: {
18
+ type: String,
19
+ required: false
20
+ },
21
+ dataTestid: {
22
+ type: String,
23
+ required: false
24
+ }
25
+ },
26
+ emits: ["click"],
27
+ setup(__props, { emit: __emit }) {
28
+ const props = __props;
29
+ const emit = __emit;
30
+ const color = useVuetifyColor(() => props.color);
31
+ function onClick(event) {
32
+ emit("click", event);
33
+ }
34
+ return (_ctx, _cache) => {
35
+ return openBlock(), createBlock(unref(VIconBtn), {
36
+ icon: unref(icons)[props.icon],
37
+ "aria-label": props.label,
38
+ color: unref(color),
39
+ "data-testid": props.dataTestid,
40
+ onClick
41
+ }, null, 8, [
42
+ "icon",
43
+ "aria-label",
44
+ "color",
45
+ "data-testid"
46
+ ]);
47
+ };
48
+ }
49
+ });
50
+ //#endregion
51
+ export { icon_button_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,32 @@
1
+ import { Icon } from "../../consts/types.js";
2
+ import { ColorVariant } from "../../composables/colors/types.js";
3
+ //#region src/components/icon-button/types.d.ts
4
+ /**
5
+ * Props exposed by the {@link IconButton} component.
6
+ */
7
+ export type IconButtonProps = {
8
+ /**
9
+ * Icon drawn on the button. One of the names listed on the "Ícones" guide page. Assistive
10
+ * technologies ignore it and read `label` instead.
11
+ *
12
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/icons | Icons Guide}
13
+ */
14
+ icon: Icon;
15
+ /**
16
+ * Accessible name of the button, read by assistive technologies instead of the icon. Describe
17
+ * the action the button performs (e.g. "Editar paciente"), not the icon's drawing (e.g.
18
+ * "Lápis").
19
+ */
20
+ label: string;
21
+ /**
22
+ * Applies a color to the button.
23
+ * One of `primary`, `secondary`, `positive`, `informative`, `caution`, or `danger`.
24
+ * @default "primary"
25
+ */
26
+ color?: ColorVariant;
27
+ /**
28
+ * Component id to use on automated tests.
29
+ */
30
+ dataTestid?: string;
31
+ };
32
+ //#endregion
@@ -0,0 +1,5 @@
1
+ import img_vue_vue_type_script_setup_true_lang_default from "./img.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/img/img.vue
3
+ var img_default = img_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { img_default as default };
@@ -0,0 +1,23 @@
1
+ import { ImgProps } from "./types.js";
2
+ //#region src/components/img/img.vue.d.ts
3
+ /**
4
+ * Decorative image, ignored by assistive technologies, loaded when it's about
5
+ * to become visible. Set its dimensions to reserve its space before it loads.
6
+ *
7
+ * @example
8
+ * ```vue
9
+ * <template>
10
+ * <u-row>
11
+ * <u-column cols="12">
12
+ * <u-img src="/logo.svg" :width="380" :height="88" eager />
13
+ * </u-column>
14
+ * </u-row>
15
+ * </template>
16
+ * ```
17
+ *
18
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/img | Img Guide}
19
+ */
20
+ declare const _default: typeof __VLS_export;
21
+ declare const __VLS_export: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ImgProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ImgProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
22
+ //#endregion
23
+ export { _default as default };
@@ -0,0 +1,61 @@
1
+ import { createBlock, defineComponent, openBlock, unref } from "vue";
2
+ import { VImg } from "vuetify/components";
3
+ var img_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
4
+ inheritAttrs: false,
5
+ __name: "img",
6
+ props: {
7
+ src: {
8
+ type: String,
9
+ required: true
10
+ },
11
+ width: {
12
+ type: [Number, String],
13
+ required: false
14
+ },
15
+ height: {
16
+ type: [Number, String],
17
+ required: false
18
+ },
19
+ aspectRatio: {
20
+ type: Number,
21
+ required: false
22
+ },
23
+ cover: {
24
+ type: Boolean,
25
+ required: false
26
+ },
27
+ eager: {
28
+ type: Boolean,
29
+ required: false
30
+ },
31
+ dataTestid: {
32
+ type: String,
33
+ required: false
34
+ }
35
+ },
36
+ setup(__props) {
37
+ const props = __props;
38
+ return (_ctx, _cache) => {
39
+ return openBlock(), createBlock(unref(VImg), {
40
+ src: props.src,
41
+ alt: "",
42
+ width: props.width,
43
+ height: props.height,
44
+ "aspect-ratio": props.aspectRatio,
45
+ cover: props.cover,
46
+ eager: props.eager,
47
+ "data-testid": props.dataTestid
48
+ }, null, 8, [
49
+ "src",
50
+ "width",
51
+ "height",
52
+ "aspect-ratio",
53
+ "cover",
54
+ "eager",
55
+ "data-testid"
56
+ ]);
57
+ };
58
+ }
59
+ });
60
+ //#endregion
61
+ export { img_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,43 @@
1
+ //#region src/components/img/types.d.ts
2
+ /**
3
+ * Props exposed by the {@link Img} component.
4
+ */
5
+ export type ImgProps = {
6
+ /**
7
+ * Path or URL of the image.
8
+ */
9
+ src: string;
10
+ /**
11
+ * Width of the image. A number sets it in pixels, and a string sets it in
12
+ * any CSS unit (e.g. `"100%"`). Shrinks to fit the available width when
13
+ * it's larger (e.g. inside a narrow `UColumn`).
14
+ */
15
+ width?: number | string;
16
+ /**
17
+ * Height of the image. A number sets it in pixels, and a string sets it in
18
+ * any CSS unit (e.g. `"10rem"`).
19
+ */
20
+ height?: number | string;
21
+ /**
22
+ * Proportion between width and height (e.g. `16 / 9`), used to reserve the
23
+ * image's space before it loads. Ignored when `height` is set.
24
+ */
25
+ aspectRatio?: number;
26
+ /**
27
+ * Fills the image's area, cropping the image when its proportion differs
28
+ * from the area's. By default, the whole image is shown inside the area.
29
+ * @default false
30
+ */
31
+ cover?: boolean;
32
+ /**
33
+ * Loads the image right away, instead of when it's about to become
34
+ * visible. Use it for images visible when the page opens, such as a logo.
35
+ * @default false
36
+ */
37
+ eager?: boolean;
38
+ /**
39
+ * Component id to use on automated tests.
40
+ */
41
+ dataTestid?: string;
42
+ };
43
+ //#endregion
@@ -0,0 +1,5 @@
1
+ import autocomplete_field_vue_vue_type_script_setup_true_lang_default from "./autocomplete-field.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/inputs/autocomplete-field/autocomplete-field.vue
3
+ var autocomplete_field_default = autocomplete_field_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { autocomplete_field_default as default };
@@ -0,0 +1,33 @@
1
+ import { AutocompleteFieldProps } from "./types.js";
2
+ //#region src/components/inputs/autocomplete-field/autocomplete-field.vue.d.ts
3
+ /**
4
+ * Select field component to be used throughout the application.
5
+ *
6
+ * @example
7
+ * ```vue
8
+ * <template>
9
+ * <u-autocomplete-field label="Country" :items="['Brazil', 'Argentina']" />
10
+ * </template>
11
+ * ```
12
+ *
13
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/autocomplete-field | AutocompleteField Guide}
14
+ */
15
+ declare const _default: typeof __VLS_export;
16
+ declare const __VLS_export: <T = string, Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
17
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(AutocompleteFieldProps<T, Multiple> & {
18
+ modelValue?: Multiple extends true ? T[] : T;
19
+ }) & {
20
+ "onUpdate:modelValue"?: ((value: Multiple extends true ? T[] : T | undefined) => any) | undefined;
21
+ }> & (typeof globalThis extends {
22
+ __VLS_PROPS_FALLBACK: infer P;
23
+ } ? P : {});
24
+ expose: (exposed: {}) => void;
25
+ attrs: any;
26
+ slots: {};
27
+ emit: (event: "update:modelValue", value: Multiple extends true ? T[] : T | undefined) => void;
28
+ }>) => import("vue").VNode & {
29
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
30
+ };
31
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
32
+ //#endregion
33
+ export { _default as default };
@@ -0,0 +1,161 @@
1
+ import { useTextFieldVariant } from "../../../composables/inputs/fields.js";
2
+ import field_loader_default from "../field-loader.js";
3
+ import { autocompleteFieldMenuProps, useAutocompleteRules } from "../../../composables/inputs/autocomplete-field.js";
4
+ import { computed, createBlock, createSlots, createVNode, defineComponent, guardReactiveProps, mergeModels, normalizeProps, openBlock, ref, resolveDynamicComponent, unref, useModel, withCtx } from "vue";
5
+ import { VAutocomplete, VCheckboxBtn, VCombobox, VListItem } from "vuetify/components";
6
+ import { VHighlight } from "vuetify/labs/VHighlight";
7
+ var autocomplete_field_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
8
+ inheritAttrs: false,
9
+ __name: "autocomplete-field",
10
+ props: /*@__PURE__*/ mergeModels({
11
+ variant: {
12
+ type: String,
13
+ required: false,
14
+ default: "primary"
15
+ },
16
+ disabled: {
17
+ type: Boolean,
18
+ required: false
19
+ },
20
+ loading: {
21
+ type: Boolean,
22
+ required: false
23
+ },
24
+ clearable: {
25
+ type: Boolean,
26
+ required: false
27
+ },
28
+ readonly: {
29
+ type: Boolean,
30
+ required: false
31
+ },
32
+ required: {
33
+ type: Boolean,
34
+ required: false
35
+ },
36
+ label: {
37
+ type: String,
38
+ required: false
39
+ },
40
+ placeholder: {
41
+ type: String,
42
+ required: false
43
+ },
44
+ hint: {
45
+ type: String,
46
+ required: false
47
+ },
48
+ dataTestid: {
49
+ type: String,
50
+ required: false
51
+ },
52
+ strict: {
53
+ type: Boolean,
54
+ required: false
55
+ },
56
+ multiple: {
57
+ type: null,
58
+ required: false
59
+ },
60
+ items: {
61
+ type: Array,
62
+ required: false,
63
+ default: () => []
64
+ }
65
+ }, {
66
+ "modelValue": { type: null },
67
+ "modelModifiers": {}
68
+ }),
69
+ emits: ["update:modelValue"],
70
+ setup(__props) {
71
+ const modelValue = useModel(__props, "modelValue");
72
+ const props = __props;
73
+ const vuetifyVariant = useTextFieldVariant(() => props.variant);
74
+ const isMultiple = computed(() => props.multiple ?? false);
75
+ const rules = useAutocompleteRules(() => ({
76
+ required: props.required,
77
+ multiple: isMultiple.value
78
+ }));
79
+ const vuetifyComponent = computed(() => props.strict ? VAutocomplete : VCombobox);
80
+ const search = ref("");
81
+ const maskClass = computed(() => props.strict ? "v-autocomplete__mask" : "v-combobox__mask");
82
+ const normalizedItems = computed(() => {
83
+ return props.items.map((item) => {
84
+ if (typeof item === "string") return {
85
+ label: item,
86
+ value: item
87
+ };
88
+ return item;
89
+ });
90
+ });
91
+ return (_ctx, _cache) => {
92
+ return openBlock(), createBlock(resolveDynamicComponent(vuetifyComponent.value), {
93
+ modelValue: modelValue.value,
94
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
95
+ search: search.value,
96
+ "onUpdate:search": _cache[1] || (_cache[1] = ($event) => search.value = $event),
97
+ variant: unref(vuetifyVariant),
98
+ items: normalizedItems.value,
99
+ "data-testid": props.dataTestid,
100
+ disabled: props.disabled,
101
+ loading: props.loading,
102
+ "aria-busy": props.loading || void 0,
103
+ readonly: props.readonly,
104
+ label: props.label,
105
+ placeholder: props.placeholder,
106
+ hint: props.hint,
107
+ clearable: props.clearable,
108
+ multiple: isMultiple.value,
109
+ "item-title": "label",
110
+ rules: unref(rules),
111
+ "menu-props": unref(autocompleteFieldMenuProps),
112
+ chips: ""
113
+ }, createSlots({
114
+ loader: withCtx((loader) => [createVNode(field_loader_default, normalizeProps(guardReactiveProps(loader)), null, 16)]),
115
+ _: 2
116
+ }, [isMultiple.value ? {
117
+ name: "item",
118
+ fn: withCtx(({ props: itemProps }) => [createVNode(unref(VListItem), normalizeProps(guardReactiveProps(itemProps)), {
119
+ prepend: withCtx(({ isSelected }) => [createVNode(unref(VCheckboxBtn), {
120
+ "model-value": isSelected,
121
+ ripple: false,
122
+ inert: "",
123
+ "aria-hidden": "true"
124
+ }, null, 8, ["model-value"])]),
125
+ title: withCtx(() => [createVNode(unref(VHighlight), {
126
+ text: itemProps.title,
127
+ query: search.value,
128
+ "match-all": "",
129
+ "ignore-case": "",
130
+ "mark-class": maskClass.value
131
+ }, null, 8, [
132
+ "text",
133
+ "query",
134
+ "mark-class"
135
+ ])]),
136
+ _: 2
137
+ }, 1040)]),
138
+ key: "0"
139
+ } : void 0]), 1064, [
140
+ "modelValue",
141
+ "search",
142
+ "variant",
143
+ "items",
144
+ "data-testid",
145
+ "disabled",
146
+ "loading",
147
+ "aria-busy",
148
+ "readonly",
149
+ "label",
150
+ "placeholder",
151
+ "hint",
152
+ "clearable",
153
+ "multiple",
154
+ "rules",
155
+ "menu-props"
156
+ ]);
157
+ };
158
+ }
159
+ });
160
+ //#endregion
161
+ export { autocomplete_field_vue_vue_type_script_setup_true_lang_default as default };