@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.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +7 -0
- package/dist/components/app-bar/app-bar.js +5 -0
- package/dist/components/app-bar/app-bar.vue_vue_type_script_setup_true_lang.js +286 -0
- package/dist/components/app-bar/types.d.ts +96 -0
- package/dist/components/button/button.js +5 -0
- package/dist/components/button/button.vue.d.ts +31 -0
- package/dist/components/button/button.vue_vue_type_script_setup_true_lang.js +97 -0
- package/dist/components/button/types.d.ts +65 -0
- package/dist/components/data-sets/data-set/data-set.js +5 -0
- package/dist/components/data-sets/data-set/data-set.vue.d.ts +47 -0
- package/dist/components/data-sets/data-set/data-set.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/components/data-sets/data-set/types.d.ts +93 -0
- package/dist/components/data-sets/data-set-bar.js +5 -0
- package/dist/components/data-sets/data-set-bar.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/components/data-sets/data-set-item/data-set-item.js +5 -0
- package/dist/components/data-sets/data-set-item/data-set-item.vue.d.ts +35 -0
- package/dist/components/data-sets/data-set-item/data-set-item.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/components/data-sets/data-set-item/types.d.ts +42 -0
- package/dist/components/details/details.js +5 -0
- package/dist/components/details/details.vue.d.ts +28 -0
- package/dist/components/details/details.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/components/details/types.d.ts +29 -0
- package/dist/components/dialogs/dialog/dialog-host-key.js +10 -0
- package/dist/components/dialogs/dialog/dialog.js +5 -0
- package/dist/components/dialogs/dialog/dialog.vue.d.ts +36 -0
- package/dist/components/dialogs/dialog/dialog.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/dialogs/dialog/types.d.ts +47 -0
- package/dist/components/dialogs/dialog-host.js +5 -0
- package/dist/components/dialogs/dialog-host.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/components/dialogs/toast.js +5 -0
- package/dist/components/dialogs/toast.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/components/footer/footer.js +5 -0
- package/dist/components/footer/footer.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/footer/types.d.ts +16 -0
- package/dist/components/form/form.js +5 -0
- package/dist/components/form/form.vue.d.ts +32 -0
- package/dist/components/form/form.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/form/types.d.ts +15 -0
- package/dist/components/grid/column/column.js +5 -0
- package/dist/components/grid/column/column.vue.d.ts +33 -0
- package/dist/components/grid/column/column.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/grid/column/types.d.ts +27 -0
- package/dist/components/grid/container/container.js +5 -0
- package/dist/components/grid/container/container.vue.d.ts +27 -0
- package/dist/components/grid/container/container.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/components/grid/container/types.d.ts +17 -0
- package/dist/components/grid/row/row.js +5 -0
- package/dist/components/grid/row/row.vue.d.ts +29 -0
- package/dist/components/grid/row/row.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/components/grid/row/types.d.ts +63 -0
- package/dist/components/icon-button/icon-button.js +5 -0
- package/dist/components/icon-button/icon-button.vue.d.ts +23 -0
- package/dist/components/icon-button/icon-button.vue_vue_type_script_setup_true_lang.js +51 -0
- package/dist/components/icon-button/types.d.ts +32 -0
- package/dist/components/img/img.js +5 -0
- package/dist/components/img/img.vue.d.ts +23 -0
- package/dist/components/img/img.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/components/img/types.d.ts +43 -0
- package/dist/components/inputs/autocomplete-field/autocomplete-field.js +5 -0
- package/dist/components/inputs/autocomplete-field/autocomplete-field.vue.d.ts +33 -0
- package/dist/components/inputs/autocomplete-field/autocomplete-field.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/components/inputs/autocomplete-field/types.d.ts +84 -0
- package/dist/components/inputs/checkbox/checkbox.js +5 -0
- package/dist/components/inputs/checkbox/checkbox.vue.d.ts +33 -0
- package/dist/components/inputs/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/components/inputs/checkbox/types.d.ts +35 -0
- package/dist/components/inputs/date-time-field/date-time-field.js +5 -0
- package/dist/components/inputs/date-time-field/date-time-field.vue.d.ts +32 -0
- package/dist/components/inputs/date-time-field/date-time-field.vue_vue_type_script_setup_true_lang.js +205 -0
- package/dist/components/inputs/date-time-field/types.d.ts +84 -0
- package/dist/components/inputs/field-loader.js +5 -0
- package/dist/components/inputs/field-loader.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/inputs/mask-field/mask-field.js +5 -0
- package/dist/components/inputs/mask-field/mask-field.vue.d.ts +32 -0
- package/dist/components/inputs/mask-field/mask-field.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/components/inputs/mask-field/types.d.ts +118 -0
- package/dist/components/inputs/text-field/text-field.js +5 -0
- package/dist/components/inputs/text-field/text-field.vue.d.ts +30 -0
- package/dist/components/inputs/text-field/text-field.vue_vue_type_script_setup_true_lang.js +119 -0
- package/dist/components/inputs/text-field/types.d.ts +70 -0
- package/dist/components/link/link.js +5 -0
- package/dist/components/link/link.vue.d.ts +27 -0
- package/dist/components/link/link.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/components/link/types.d.ts +18 -0
- package/dist/components/main/main.js +5 -0
- package/dist/components/main/main.vue.d.ts +33 -0
- package/dist/components/main/main.vue_vue_type_script_setup_true_lang.js +104 -0
- package/dist/components/main/types.d.ts +75 -0
- package/dist/components/navigation-menu/navigation-menu.js +5 -0
- package/dist/components/navigation-menu/navigation-menu.vue_vue_type_script_setup_true_lang.js +207 -0
- package/dist/components/navigation-menu/types.d.ts +62 -0
- package/dist/components/page-transition/page-transition.js +5 -0
- package/dist/components/page-transition/page-transition.vue.d.ts +40 -0
- package/dist/components/page-transition/page-transition.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/components/page-transition/types.d.ts +18 -0
- package/dist/components/sections/section/section.js +5 -0
- package/dist/components/sections/section/section.vue.d.ts +28 -0
- package/dist/components/sections/section/section.vue_vue_type_script_setup_true_lang.js +108 -0
- package/dist/components/sections/section/types.d.ts +80 -0
- package/dist/components/sections/section-content/section-content.js +5 -0
- package/dist/components/sections/section-content/section-content.vue.d.ts +27 -0
- package/dist/components/sections/section-content/section-content.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/components/skeleton-loader/skeleton-loader.js +5 -0
- package/dist/components/skeleton-loader/skeleton-loader.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/table/table.js +5 -0
- package/dist/components/table/table.vue.d.ts +19 -0
- package/dist/components/table/table.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/components/table/types.d.ts +51 -0
- package/dist/components.d.ts +23 -940
- package/dist/components.js +23 -1254
- package/dist/composables/alignment/alignment.js +41 -0
- package/dist/composables/alignment/types.d.ts +12 -0
- package/dist/composables/button/button.js +54 -0
- package/dist/composables/colors/constants.js +27 -0
- package/dist/composables/colors/types.d.ts +4 -0
- package/dist/composables/colors/use-vuetify-background-color.js +16 -0
- package/dist/composables/colors/use-vuetify-color.js +11 -0
- package/dist/composables/colors/use-vuetify-text-color.js +12 -0
- package/dist/composables/data-set/data-set.js +128 -0
- package/dist/composables/dialogs/types.d.ts +88 -0
- package/dist/composables/dialogs/use-confirm.d.ts +21 -0
- package/dist/composables/dialogs/use-confirm.js +55 -0
- package/dist/composables/dialogs/use-decorative-timer.js +25 -0
- package/dist/composables/dialogs/use-dialog-focus.js +64 -0
- package/dist/composables/dialogs/use-dialog-loading.js +13 -0
- package/dist/composables/dialogs/use-dialog.d.ts +36 -0
- package/dist/composables/dialogs/use-dialog.js +73 -0
- package/dist/composables/dialogs/use-run-or-toast.d.ts +27 -0
- package/dist/composables/dialogs/use-run-or-toast.js +65 -0
- package/dist/composables/dialogs/use-toast.d.ts +25 -0
- package/dist/composables/dialogs/use-toast.js +39 -0
- package/dist/composables/dimensions/dimensions.js +18 -0
- package/dist/composables/inputs/autocomplete-field.js +39 -0
- package/dist/composables/inputs/date-time-field.js +109 -0
- package/dist/composables/inputs/fields.js +28 -0
- package/dist/composables/inputs/mask-field.js +133 -0
- package/dist/composables/inputs/rules.js +16 -0
- package/dist/composables/inputs/text-field.js +81 -0
- package/dist/composables/navigation/types.d.ts +54 -0
- package/dist/composables/navigation/use-navigation-rail.js +163 -0
- package/dist/composables/navigation/use-navigation-search-shortcut.js +96 -0
- package/dist/composables/navigation/use-route-props.js +21 -0
- package/dist/composables/navigation/use-unsaved-changes.d.ts +35 -0
- package/dist/composables/navigation/use-unsaved-changes.js +88 -0
- package/dist/composables/section/section.js +34 -0
- package/dist/composables.d.ts +6 -67
- package/dist/composables.js +6 -65
- package/dist/consts/icons.d.ts +67 -0
- package/dist/consts/icons.js +69 -0
- package/dist/consts/locale.js +12 -0
- package/dist/consts/types.d.ts +12 -0
- package/dist/index.d.ts +1 -13
- package/dist/index.js +39 -14
- package/dist/plugins.d.ts +15 -4
- package/dist/plugins.js +54 -3
- package/dist/styles/fonts/UnimedSlab-Regular.woff2 +0 -0
- package/dist/styles/fonts/fonts.css +5 -0
- package/dist/styles/settings.scss +155 -0
- package/dist/unit-test.js +11 -7
- package/package.json +11 -11
- package/skills/uimed-vue/SKILL.md +113 -0
- package/skills/uimed-vue/references/api/components/autocomplete-field.md +45 -0
- package/skills/uimed-vue/references/api/components/button.md +48 -0
- package/skills/uimed-vue/references/api/components/checkbox.md +36 -0
- package/skills/uimed-vue/references/api/components/data-sets/data-set-item.md +61 -0
- package/skills/uimed-vue/references/api/components/data-sets/data-set.md +67 -0
- package/skills/uimed-vue/references/api/components/date-time-field.md +44 -0
- package/skills/uimed-vue/references/api/components/details.md +33 -0
- package/skills/uimed-vue/references/api/components/dialog.md +70 -0
- package/skills/uimed-vue/references/api/components/form.md +43 -0
- package/skills/uimed-vue/references/api/components/grid/column.md +41 -0
- package/skills/uimed-vue/references/api/components/grid/container.md +32 -0
- package/skills/uimed-vue/references/api/components/grid/row.md +37 -0
- package/skills/uimed-vue/references/api/components/icon-button.md +37 -0
- package/skills/uimed-vue/references/api/components/img.md +34 -0
- package/skills/uimed-vue/references/api/components/link.md +31 -0
- package/skills/uimed-vue/references/api/components/main.md +174 -0
- package/skills/uimed-vue/references/api/components/mask-field.md +60 -0
- package/skills/uimed-vue/references/api/components/page-transition.md +37 -0
- package/skills/uimed-vue/references/api/components/sections/section-content.md +23 -0
- package/skills/uimed-vue/references/api/components/sections/section.md +61 -0
- package/skills/uimed-vue/references/api/components/table.md +35 -0
- package/skills/uimed-vue/references/api/components/text-field.md +42 -0
- package/skills/uimed-vue/references/api/composables/use-confirm.md +96 -0
- package/skills/uimed-vue/references/api/composables/use-dialog.md +95 -0
- package/skills/uimed-vue/references/api/composables/use-run-or-toast.md +58 -0
- package/skills/uimed-vue/references/api/composables/use-toast.md +48 -0
- package/skills/uimed-vue/references/api/composables/use-unsaved-changes.md +106 -0
- package/skills/uimed-vue/references/api/index.md +1 -0
- package/skills/uimed-vue/references/guide/components/autocomplete-field.md +256 -0
- package/skills/uimed-vue/references/guide/components/button.md +155 -0
- package/skills/uimed-vue/references/guide/components/checkbox.md +113 -0
- package/skills/uimed-vue/references/guide/components/data-set.md +370 -0
- package/skills/uimed-vue/references/guide/components/date-time-field.md +202 -0
- package/skills/uimed-vue/references/guide/components/details.md +76 -0
- package/skills/uimed-vue/references/guide/components/dialog.md +269 -0
- package/skills/uimed-vue/references/guide/components/form.md +96 -0
- package/skills/uimed-vue/references/guide/components/icon-button.md +76 -0
- package/skills/uimed-vue/references/guide/components/img.md +128 -0
- package/skills/uimed-vue/references/guide/components/layout.md +323 -0
- package/skills/uimed-vue/references/guide/components/link.md +47 -0
- package/skills/uimed-vue/references/guide/components/main.md +435 -0
- package/skills/uimed-vue/references/guide/components/mask-field.md +256 -0
- package/skills/uimed-vue/references/guide/components/page-transition.md +111 -0
- package/skills/uimed-vue/references/guide/components/section.md +232 -0
- package/skills/uimed-vue/references/guide/components/table.md +102 -0
- package/skills/uimed-vue/references/guide/components/text-field.md +172 -0
- package/skills/uimed-vue/references/guide/composables/use-confirm.md +123 -0
- package/skills/uimed-vue/references/guide/composables/use-dialog.md +102 -0
- package/skills/uimed-vue/references/guide/composables/use-run-or-toast.md +55 -0
- package/skills/uimed-vue/references/guide/composables/use-toast.md +57 -0
- package/skills/uimed-vue/references/guide/composables/use-unsaved-changes.md +129 -0
- package/skills/uimed-vue/references/guide/getting-started.md +135 -0
- package/skills/uimed-vue/references/guide/icons.md +71 -0
- package/skills/uimed-vue/references/guide/index.md +51 -0
- package/skills/uimed-vue/references/guide/migration-v1-to-v2.md +191 -0
- package/skills/uimed-vue/references/guide/unit-testing.md +85 -0
- package/AGENTS.md +0 -160
- package/CLAUDE.md +0 -1
- package/dist/types-BPXXtbmW.d.ts +0 -5
- 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 };
|
package/dist/components/skeleton-loader/skeleton-loader.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -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
|