@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,157 @@
1
+ import skeleton_loader_default from "../../skeleton-loader/skeleton-loader.js";
2
+ import row_default from "../../grid/row/row.js";
3
+ import column_default from "../../grid/column/column.js";
4
+ import { getDataSetTotalVisible, useDataSetBarCols, useDataSetColumnCols, useDataSetFilterKeys, useDataSetFittingColumns, useDataSetSearchPageReset, useDataSetWidth } from "../../../composables/data-set/data-set.js";
5
+ import data_set_bar_default from "../data-set-bar.js";
6
+ import { Fragment, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, mergeModels, openBlock, renderList, renderSlot, unref, useModel, useSlots, useTemplateRef, withCtx } from "vue";
7
+ import { VDataIterator, VEmptyState, VPagination } from "vuetify/components";
8
+ var data_set_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
9
+ inheritAttrs: false,
10
+ __name: "data-set",
11
+ props: /*@__PURE__*/ mergeModels({
12
+ items: {
13
+ type: Array,
14
+ required: false
15
+ },
16
+ columns: {
17
+ type: Number,
18
+ required: false,
19
+ default: 3
20
+ },
21
+ itemsPerPage: {
22
+ type: Number,
23
+ required: false,
24
+ default: 10
25
+ },
26
+ actions: {
27
+ type: Array,
28
+ required: false
29
+ },
30
+ searchable: {
31
+ type: Boolean,
32
+ required: false
33
+ },
34
+ searchKeys: {
35
+ type: Array,
36
+ required: false
37
+ },
38
+ noDataText: {
39
+ type: String,
40
+ required: false,
41
+ default: "Nenhum registro encontrado."
42
+ },
43
+ loading: {
44
+ type: Boolean,
45
+ required: false
46
+ },
47
+ dataTestid: {
48
+ type: String,
49
+ required: false
50
+ }
51
+ }, {
52
+ "page": {
53
+ type: Number,
54
+ default: 1
55
+ },
56
+ "pageModifiers": {},
57
+ "search": {
58
+ type: String,
59
+ default: ""
60
+ },
61
+ "searchModifiers": {}
62
+ }),
63
+ emits: ["update:page", "update:search"],
64
+ setup(__props) {
65
+ const props = __props;
66
+ useSlots();
67
+ const page = useModel(__props, "page");
68
+ const search = useModel(__props, "search");
69
+ const iterator = useTemplateRef("iterator");
70
+ const width = useDataSetWidth(() => iterator.value?.$el);
71
+ const fittingColumns = useDataSetFittingColumns(() => props.columns, width);
72
+ const columnCols = useDataSetColumnCols(fittingColumns);
73
+ const barColumnCols = useDataSetBarCols(width);
74
+ const filterKeys = useDataSetFilterKeys(() => props.searchKeys);
75
+ useDataSetSearchPageReset(search, page);
76
+ return (_ctx, _cache) => {
77
+ return openBlock(), createBlock(skeleton_loader_default, {
78
+ loading: props.loading,
79
+ type: "card",
80
+ "full-width": ""
81
+ }, {
82
+ default: withCtx(() => [createCommentVNode(" The bar and the records take a line each of the same row, so the grid spaces them as it\n spaces its lines. The bar stays out of the iterator's header, where nothing would space\n it from the records "), createVNode(row_default, { "data-testid": props.dataTestid }, {
83
+ default: withCtx(() => [props.actions?.length || props.searchable ? (openBlock(), createBlock(column_default, { key: 0 }, {
84
+ default: withCtx(() => [createVNode(data_set_bar_default, {
85
+ modelValue: search.value,
86
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
87
+ actions: props.actions,
88
+ searchable: props.searchable,
89
+ cols: unref(barColumnCols)
90
+ }, null, 8, [
91
+ "modelValue",
92
+ "actions",
93
+ "searchable",
94
+ "cols"
95
+ ])]),
96
+ _: 1
97
+ })) : createCommentVNode("v-if", true), createVNode(column_default, null, {
98
+ default: withCtx(() => [createVNode(unref(VDataIterator), {
99
+ ref_key: "iterator",
100
+ ref: iterator,
101
+ page: page.value,
102
+ "onUpdate:page": _cache[2] || (_cache[2] = ($event) => page.value = $event),
103
+ items: props.items,
104
+ "items-per-page": props.itemsPerPage,
105
+ search: search.value,
106
+ "filter-keys": unref(filterKeys)
107
+ }, {
108
+ default: withCtx(({ items: pageItems }) => [createCommentVNode(" Stretched, so the items of the same line (e.g. full-height cards) share its height "), createVNode(row_default, {
109
+ list: "",
110
+ "align-y": "stretch"
111
+ }, {
112
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(pageItems, (pageItem, index) => {
113
+ return openBlock(), createBlock(column_default, {
114
+ key: index,
115
+ cols: unref(columnCols),
116
+ "list-item": ""
117
+ }, {
118
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
119
+ item: pageItem.raw,
120
+ index
121
+ })]),
122
+ _: 2
123
+ }, 1032, ["cols"]);
124
+ }), 128))]),
125
+ _: 2
126
+ }, 1024)]),
127
+ "no-data": withCtx(() => [createVNode(unref(VEmptyState), { text: props.noDataText }, null, 8, ["text"])]),
128
+ footer: withCtx(({ pageCount }) => [pageCount > 1 ? (openBlock(), createBlock(unref(VPagination), {
129
+ key: 0,
130
+ modelValue: page.value,
131
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => page.value = $event),
132
+ length: pageCount,
133
+ "total-visible": unref(getDataSetTotalVisible)(pageCount)
134
+ }, null, 8, [
135
+ "modelValue",
136
+ "length",
137
+ "total-visible"
138
+ ])) : createCommentVNode("v-if", true)]),
139
+ _: 3
140
+ }, 8, [
141
+ "page",
142
+ "items",
143
+ "items-per-page",
144
+ "search",
145
+ "filter-keys"
146
+ ])]),
147
+ _: 3
148
+ })]),
149
+ _: 3
150
+ }, 8, ["data-testid"])]),
151
+ _: 3
152
+ }, 8, ["loading"]);
153
+ };
154
+ }
155
+ });
156
+ //#endregion
157
+ export { data_set_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,93 @@
1
+ import { SectionAction } from "../../sections/section/types.js";
2
+ //#region src/components/data-sets/data-set/types.d.ts
3
+ /**
4
+ * Number of records shown side by side on each row of a {@link DataSet}.
5
+ */
6
+ export type DataSetColumns = 1 | 2 | 3 | 4 | 6;
7
+ /**
8
+ * Props exposed by the {@link DataSet} component.
9
+ */
10
+ export type DataSetProps<T extends object> = {
11
+ /**
12
+ * Records to be listed. Each record of the current page is passed, as is,
13
+ * to the default slot.
14
+ * @default []
15
+ */
16
+ items?: T[];
17
+ /**
18
+ * Maximum number of records shown side by side on each row of the grid.
19
+ * One of `1`, `2`, `3`, `4` or `6`.
20
+ *
21
+ * It's reduced to the largest of these values that keeps each record's card
22
+ * at least 240px wide within the data set's own width, so narrow
23
+ * containers, like dialogs or side panels, show fewer records per row, down
24
+ * to a single one. On extra small screens, each record always takes the
25
+ * full width.
26
+ * @default 3
27
+ */
28
+ columns?: DataSetColumns;
29
+ /**
30
+ * Maximum number of records shown per page. Page controls are only shown
31
+ * when there's more than one page.
32
+ * @default 10
33
+ */
34
+ itemsPerPage?: number;
35
+ /**
36
+ * List of actions about the whole list, such as creating a record, displayed
37
+ * as buttons at the start of the bar above the records, before the search
38
+ * field. Same shape as `USection`'s actions, but an action without `variant`
39
+ * is `secondary`, not `primary`, so it doesn't compete with the actions of the
40
+ * records; an action that sets `variant` keeps it.
41
+ *
42
+ * With the search field, the actions take the first half of the bar,
43
+ * wrapping within it, or a line of their own when the data set isn't wide
44
+ * enough for two records side by side. On extra small screens, each action
45
+ * takes a line of its own and the full width. When undefined or empty, and
46
+ * `searchable` is false, no bar is rendered.
47
+ */
48
+ actions?: SectionAction[];
49
+ /**
50
+ * Shows a search field at the end of the bar above the records, bound to
51
+ * `v-model:search`. It's 240px wide, the same as a card's minimum width. On
52
+ * extra small screens, it takes a line of its own and the full width.
53
+ * @default false
54
+ */
55
+ searchable?: boolean;
56
+ /**
57
+ * Record properties considered by the search. When undefined or empty,
58
+ * every property of the record is considered.
59
+ */
60
+ searchKeys?: Array<Extract<keyof T, string>>;
61
+ /**
62
+ * Message shown when there are no records to list, either because `items`
63
+ * is empty or because no record matches the search.
64
+ * @default "Nenhum registro encontrado."
65
+ */
66
+ noDataText?: string;
67
+ /**
68
+ * Shows a skeleton loader in place of the records while data is being
69
+ * loaded.
70
+ * @default false
71
+ */
72
+ loading?: boolean;
73
+ /**
74
+ * Component id to use on automated tests.
75
+ */
76
+ dataTestid?: string;
77
+ };
78
+ /**
79
+ * Slots exposed by the {@link DataSet} component.
80
+ */
81
+ export type DataSetSlots<T extends object> = {
82
+ /**
83
+ * Renders each record of the current page in its own grid column, usually
84
+ * with `UDataSetItem`.
85
+ * @param props.item The original record, from `items`.
86
+ * @param props.index Position of the record inside the current page.
87
+ */
88
+ default?: (props: {
89
+ item: T;
90
+ index: number;
91
+ }) => unknown;
92
+ };
93
+ //#endregion
@@ -0,0 +1,5 @@
1
+ import data_set_bar_vue_vue_type_script_setup_true_lang_default from "./data-set-bar.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/data-sets/data-set-bar.vue
3
+ var data_set_bar_default = data_set_bar_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { data_set_bar_default as default };
@@ -0,0 +1,99 @@
1
+ import text_field_default from "../inputs/text-field/text-field.js";
2
+ import button_default from "../button/button.js";
3
+ import row_default from "../grid/row/row.js";
4
+ import column_default from "../grid/column/column.js";
5
+ import { Fragment, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, openBlock, renderList, toDisplayString, unref, useModel, withCtx } from "vue";
6
+ import { VDefaultsProvider } from "vuetify/components";
7
+ var data_set_bar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
8
+ inheritAttrs: false,
9
+ __name: "data-set-bar",
10
+ props: /*@__PURE__*/ mergeModels({
11
+ actions: {
12
+ type: Array,
13
+ required: false
14
+ },
15
+ searchable: {
16
+ type: Boolean,
17
+ required: false
18
+ },
19
+ cols: {
20
+ type: String,
21
+ required: true
22
+ }
23
+ }, {
24
+ "modelValue": {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ "modelModifiers": {}
29
+ }),
30
+ emits: ["update:modelValue"],
31
+ setup(__props) {
32
+ const props = __props;
33
+ const search = useModel(__props, "modelValue");
34
+ const searchFieldDefaults = { VTextField: {
35
+ hideDetails: "auto",
36
+ minWidth: 240
37
+ } };
38
+ return (_ctx, _cache) => {
39
+ return openBlock(), createBlock(row_default, { "align-y": "end" }, {
40
+ default: withCtx(() => [
41
+ createCommentVNode(" The search field leaves room above its text for the floating label, so its text, icon and\n underline sit below its middle. Centered on it, the actions would look higher than the\n field, so they line up with its underline instead "),
42
+ createCommentVNode(" No column grows to push the search field to the end of the line, so the actions and the\n search field share it in two columns, and the search field is aligned to the end of its\n own "),
43
+ props.actions?.length ? (openBlock(), createBlock(column_default, {
44
+ key: 0,
45
+ cols: props.searchable ? props.cols : "12"
46
+ }, {
47
+ default: withCtx(() => [createVNode(row_default, null, {
48
+ default: withCtx(() => [
49
+ createCommentVNode(" Each action takes the full width of its column, which only stretches it below sm "),
50
+ createCommentVNode(" The list's actions are secondary unless they set a variant, so they don't compete with\n the actions of the records and of the sections "),
51
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.actions, ({ label, onClick, variant = "secondary", ...action }, index) => {
52
+ return openBlock(), createBlock(column_default, {
53
+ key: index,
54
+ cols: "auto"
55
+ }, {
56
+ default: withCtx(() => [createVNode(button_default, mergeProps({
57
+ "full-width": "",
58
+ variant
59
+ }, { ref_for: true }, action, { onClick }), {
60
+ default: withCtx(() => [createTextVNode(toDisplayString(label), 1)]),
61
+ _: 2
62
+ }, 1040, ["variant", "onClick"])]),
63
+ _: 2
64
+ }, 1024);
65
+ }), 128))
66
+ ]),
67
+ _: 1
68
+ })]),
69
+ _: 1
70
+ }, 8, ["cols"])) : createCommentVNode("v-if", true),
71
+ props.searchable ? (openBlock(), createBlock(column_default, {
72
+ key: 1,
73
+ cols: props.actions?.length ? props.cols : "12"
74
+ }, {
75
+ default: withCtx(() => [createVNode(row_default, { "align-x": "end" }, {
76
+ default: withCtx(() => [createVNode(column_default, { cols: "auto" }, {
77
+ default: withCtx(() => [createCommentVNode(" Hides the empty messages area, which would misalign the field with the actions, and\n keeps the field from shrinking to its label, which is all a column of its own width\n would leave it "), createVNode(unref(VDefaultsProvider), { defaults: searchFieldDefaults }, {
78
+ default: withCtx(() => [createVNode(text_field_default, {
79
+ modelValue: search.value,
80
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
81
+ type: "search",
82
+ label: "Pesquisar"
83
+ }, null, 8, ["modelValue"])]),
84
+ _: 1
85
+ })]),
86
+ _: 1
87
+ })]),
88
+ _: 1
89
+ })]),
90
+ _: 1
91
+ }, 8, ["cols"])) : createCommentVNode("v-if", true)
92
+ ]),
93
+ _: 1
94
+ });
95
+ };
96
+ }
97
+ });
98
+ //#endregion
99
+ export { data_set_bar_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,5 @@
1
+ import data_set_item_vue_vue_type_script_setup_true_lang_default from "./data-set-item.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/data-sets/data-set-item/data-set-item.vue
3
+ var data_set_item_default = data_set_item_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { data_set_item_default as default };
@@ -0,0 +1,35 @@
1
+ import { DataSetItemProps, DataSetItemSlots } from "./types.js";
2
+ //#region src/components/data-sets/data-set-item/data-set-item.vue.d.ts
3
+ /**
4
+ * Card of a single record listed by a {@link DataSet}, built on `USection`.
5
+ * It fills the height of its grid column, so the cards of a row line up. Its
6
+ * details, like a vertical `UTable`, go in the default slot.
7
+ *
8
+ * @example
9
+ * ```vue
10
+ * <template>
11
+ * <u-data-set :items="patients">
12
+ * <template #default="{ item }">
13
+ * <u-data-set-item
14
+ * :title="item.name"
15
+ * subtitle="Beneficiário"
16
+ * :actions="[{ label: 'Editar', variant: 'secondary', onClick: () => edit(item) }]"
17
+ * >
18
+ * <u-table :headers="['Plano', 'Idade']" :items="[[item.plan, item.age]]" vertical />
19
+ * </u-data-set-item>
20
+ * </template>
21
+ * </u-data-set>
22
+ * </template>
23
+ * ```
24
+ *
25
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/data-set | DataSet Guide}
26
+ */
27
+ declare const _default: typeof __VLS_export;
28
+ declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<DataSetItemProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<DataSetItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, DataSetItemSlots>;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
34
+ //#endregion
35
+ export { _default as default };
@@ -0,0 +1,57 @@
1
+ import section_content_default from "../../sections/section-content/section-content.js";
2
+ import section_default from "../../sections/section/section.js";
3
+ import { createBlock, createCommentVNode, defineComponent, openBlock, renderSlot, useSlots, withCtx } from "vue";
4
+ var data_set_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
5
+ inheritAttrs: false,
6
+ __name: "data-set-item",
7
+ props: {
8
+ title: {
9
+ type: String,
10
+ required: false
11
+ },
12
+ subtitle: {
13
+ type: String,
14
+ required: false
15
+ },
16
+ variant: {
17
+ type: String,
18
+ required: false
19
+ },
20
+ actions: {
21
+ type: Array,
22
+ required: false
23
+ },
24
+ dataTestid: {
25
+ type: String,
26
+ required: false
27
+ }
28
+ },
29
+ setup(__props) {
30
+ const props = __props;
31
+ const slots = useSlots();
32
+ return (_ctx, _cache) => {
33
+ return openBlock(), createBlock(section_default, {
34
+ title: props.title,
35
+ subtitle: props.subtitle,
36
+ variant: props.variant,
37
+ actions: props.actions,
38
+ "data-testid": props.dataTestid,
39
+ "full-height": ""
40
+ }, {
41
+ default: withCtx(() => [slots.default ? (openBlock(), createBlock(section_content_default, { key: 0 }, {
42
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
43
+ _: 3
44
+ })) : createCommentVNode("v-if", true)]),
45
+ _: 3
46
+ }, 8, [
47
+ "title",
48
+ "subtitle",
49
+ "variant",
50
+ "actions",
51
+ "data-testid"
52
+ ]);
53
+ };
54
+ }
55
+ });
56
+ //#endregion
57
+ export { data_set_item_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,42 @@
1
+ import { SectionAction, SectionVariant } from "../../sections/section/types.js";
2
+ //#region src/components/data-sets/data-set-item/types.d.ts
3
+ /**
4
+ * Props exposed by the {@link DataSetItem} component.
5
+ */
6
+ export type DataSetItemProps = {
7
+ /**
8
+ * Title displayed at the top of the record's card.
9
+ */
10
+ title?: string;
11
+ /**
12
+ * Short description displayed below the title.
13
+ */
14
+ subtitle?: string;
15
+ /**
16
+ * Applies a distinct style variation to the record's card, just like on
17
+ * `USection`. One of `primary` or `secondary`.
18
+ * @default "primary"
19
+ */
20
+ variant?: SectionVariant;
21
+ /**
22
+ * Actions of the record, like "Editar" and "Excluir", displayed at the
23
+ * bottom of its card, just like on `USection`. When undefined or empty, no
24
+ * actions area is rendered.
25
+ */
26
+ actions?: SectionAction[];
27
+ /**
28
+ * Component id to use on automated tests.
29
+ */
30
+ dataTestid?: string;
31
+ };
32
+ /**
33
+ * Slots exposed by the {@link DataSetItem} component.
34
+ */
35
+ export type DataSetItemSlots = {
36
+ /**
37
+ * Details of the record, displayed below the title and subtitle, like a
38
+ * vertical `UTable` with some of its fields.
39
+ */
40
+ default?: () => unknown;
41
+ };
42
+ //#endregion
@@ -0,0 +1,5 @@
1
+ import details_vue_vue_type_script_setup_true_lang_default from "./details.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/details/details.vue
3
+ var details_default = details_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { details_default as default };
@@ -0,0 +1,28 @@
1
+ import { DetailsProps } from "./types.js";
2
+ //#region src/components/details/details.vue.d.ts
3
+ /**
4
+ * Details component to show content that can be expanded or collapsed by
5
+ * clicking on its title. Starts collapsed.
6
+ *
7
+ * @example
8
+ * ```vue
9
+ * <template>
10
+ * <u-details title="Title">
11
+ * Content
12
+ * </u-details>
13
+ * </template>
14
+ * ```
15
+ *
16
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/details | Details Guide}
17
+ */
18
+ declare const _default: typeof __VLS_export;
19
+ declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<DetailsProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<DetailsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
20
+ default?: (props: {}) => any;
21
+ }>;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
27
+ //#endregion
28
+ export { _default as default };
@@ -0,0 +1,56 @@
1
+ import skeleton_loader_default from "../skeleton-loader/skeleton-loader.js";
2
+ import { computed, createBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
3
+ import { VExpansionPanel, VExpansionPanelText, VExpansionPanelTitle, VExpansionPanels } from "vuetify/components";
4
+ var details_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
5
+ inheritAttrs: false,
6
+ __name: "details",
7
+ props: {
8
+ variant: {
9
+ type: String,
10
+ required: false
11
+ },
12
+ title: {
13
+ type: String,
14
+ required: false
15
+ },
16
+ loading: {
17
+ type: Boolean,
18
+ required: false
19
+ },
20
+ dataTestid: {
21
+ type: String,
22
+ required: false
23
+ }
24
+ },
25
+ setup(__props) {
26
+ const props = __props;
27
+ const outlined = computed(() => props.variant === "secondary");
28
+ return (_ctx, _cache) => {
29
+ return openBlock(), createBlock(skeleton_loader_default, {
30
+ loading: props.loading,
31
+ type: "heading",
32
+ "full-width": ""
33
+ }, {
34
+ default: withCtx(() => [createVNode(unref(VExpansionPanels), {
35
+ flat: outlined.value,
36
+ "data-testid": props.dataTestid
37
+ }, {
38
+ default: withCtx(() => [createVNode(unref(VExpansionPanel), { class: normalizeClass({ border: outlined.value }) }, {
39
+ default: withCtx(() => [createVNode(unref(VExpansionPanelTitle), null, {
40
+ default: withCtx(() => [createTextVNode(toDisplayString(props.title), 1)]),
41
+ _: 1
42
+ }), createVNode(unref(VExpansionPanelText), null, {
43
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
44
+ _: 3
45
+ })]),
46
+ _: 3
47
+ }, 8, ["class"])]),
48
+ _: 3
49
+ }, 8, ["flat", "data-testid"])]),
50
+ _: 3
51
+ }, 8, ["loading"]);
52
+ };
53
+ }
54
+ });
55
+ //#endregion
56
+ export { details_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,29 @@
1
+ //#region src/components/details/types.d.ts
2
+ export type DetailsVariant = "primary" | "secondary";
3
+ /**
4
+ * Props exposed by the {@link Details} component.
5
+ */
6
+ export type DetailsProps = {
7
+ /**
8
+ * Applies a distinct style variation to the details.
9
+ * One of `primary` or `secondary`.
10
+ * @default "primary"
11
+ */
12
+ variant?: DetailsVariant;
13
+ /**
14
+ * Title displayed on the header, which expands or collapses the content
15
+ * when clicked. The header stays clickable even without a title.
16
+ */
17
+ title?: string;
18
+ /**
19
+ * Shows a skeleton loader in place of the details while data is being
20
+ * loaded.
21
+ * @default false
22
+ */
23
+ loading?: boolean;
24
+ /**
25
+ * Component id to use on automated tests.
26
+ */
27
+ dataTestid?: string;
28
+ };
29
+ //#endregion
@@ -0,0 +1,10 @@
1
+ //#region src/components/dialogs/dialog/dialog-host-key.ts
2
+ /**
3
+ * Injection key of {@link DialogHostContext}, provided by the internal `DialogHost`. Besides the
4
+ * role, the blocking while an action runs and the end of the leave transitions, it makes the
5
+ * dialog's content describe the dialog (`aria-describedby`), since `DialogHost` only displays text
6
+ * messages. Not part of the public API.
7
+ */
8
+ const dialogHostKey = Symbol("dialog-host");
9
+ //#endregion
10
+ export { dialogHostKey };
@@ -0,0 +1,5 @@
1
+ import dialog_vue_vue_type_script_setup_true_lang_default from "./dialog.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/dialogs/dialog/dialog.vue
3
+ var dialog_default = dialog_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { dialog_default as default };
@@ -0,0 +1,36 @@
1
+ import { DialogProps } from "./types.js";
2
+ //#region src/components/dialogs/dialog/dialog.vue.d.ts
3
+ /**
4
+ * Dialog component to display content in a modal window, over the page, until it's closed.
5
+ * Its title and actions stay in place while the content scrolls.
6
+ *
7
+ * @example
8
+ * ```vue
9
+ * <template>
10
+ * <u-dialog v-model="open" title="Title" :actions="[{ label: 'Close', onClick: () => (open = false) }]">
11
+ * Content
12
+ * </u-dialog>
13
+ * </template>
14
+ * ```
15
+ *
16
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/dialog | Dialog Guide}
17
+ */
18
+ declare const _default: typeof __VLS_export;
19
+ declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<DialogProps & {
20
+ modelValue?: boolean;
21
+ }, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
22
+ "update:modelValue": (value: boolean) => any;
23
+ }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<DialogProps & {
24
+ modelValue?: boolean;
25
+ }> & Readonly<{
26
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
27
+ }>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
28
+ default?: (props: {}) => any;
29
+ }>;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
35
+ //#endregion
36
+ export { _default as default };