@nexdom/uimed-vue 2.0.0-beta.9 → 2.1.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/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 +46 -0
- package/dist/components/dialogs/dialog/dialog.vue_vue_type_script_setup_true_lang.js +148 -0
- package/dist/components/dialogs/dialog/types.d.ts +49 -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 -896
- package/dist/components.js +23 -1381
- 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 +78 -0
- package/dist/composables/dialogs/use-dialog-loading.js +13 -0
- package/dist/composables/dialogs/use-dialog.d.ts +37 -0
- package/dist/{use-dialog-Ck2_ZW7T.js → composables/dialogs/use-dialog.js} +4 -54
- 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 -193
- package/dist/composables.js +6 -117
- 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 +154 -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 +96 -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 -233
- package/CLAUDE.md +0 -1
- package/dist/types-HPMP8IrV.d.ts +0 -49
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
/**
|
|
21
|
+
* Whether the dialog is open. Updated to `false` when the user closes it with the "Fechar" button
|
|
22
|
+
* at its top right, `Esc`, a click outside or the browser's back button, once its leave transition
|
|
23
|
+
* ends.
|
|
24
|
+
*/
|
|
25
|
+
modelValue?: boolean;
|
|
26
|
+
}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
|
|
27
|
+
"update:modelValue": (value: boolean) => any;
|
|
28
|
+
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<DialogProps & {
|
|
29
|
+
/**
|
|
30
|
+
* Whether the dialog is open. Updated to `false` when the user closes it with the "Fechar" button
|
|
31
|
+
* at its top right, `Esc`, a click outside or the browser's back button, once its leave transition
|
|
32
|
+
* ends.
|
|
33
|
+
*/
|
|
34
|
+
modelValue?: boolean;
|
|
35
|
+
}> & Readonly<{
|
|
36
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
38
|
+
default?: (props: {}) => any;
|
|
39
|
+
}>;
|
|
40
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { _default as default };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { icons } from "../../../consts/icons.js";
|
|
2
|
+
import button_default from "../../button/button.js";
|
|
3
|
+
import { dialogHostKey } from "./dialog-host-key.js";
|
|
4
|
+
import { useDialogFocus } from "../../../composables/dialogs/use-dialog-focus.js";
|
|
5
|
+
import { useDialogLoading } from "../../../composables/dialogs/use-dialog-loading.js";
|
|
6
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
7
|
+
import { VCard, VCardItem, VCardText, VCardTitle, VDialog, VIconBtn } from "vuetify/components";
|
|
8
|
+
//#region src/components/dialogs/dialog/dialog.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
const _hoisted_1 = { class: "text-truncate" };
|
|
10
|
+
const _hoisted_2 = ["id"];
|
|
11
|
+
var dialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
12
|
+
inheritAttrs: false,
|
|
13
|
+
__name: "dialog",
|
|
14
|
+
props: /*@__PURE__*/ mergeModels({
|
|
15
|
+
title: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false
|
|
18
|
+
},
|
|
19
|
+
actions: {
|
|
20
|
+
type: Array,
|
|
21
|
+
required: false
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: false
|
|
26
|
+
},
|
|
27
|
+
dataTestid: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: false
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
"modelValue": {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
"modelModifiers": {}
|
|
37
|
+
}),
|
|
38
|
+
emits: ["update:modelValue"],
|
|
39
|
+
setup(__props) {
|
|
40
|
+
const props = __props;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the dialog is open. Updated to `false` when the user closes it with the "Fechar" button
|
|
43
|
+
* at its top right, `Esc`, a click outside or the browser's back button, once its leave transition
|
|
44
|
+
* ends.
|
|
45
|
+
*/
|
|
46
|
+
const model = useModel(__props, "modelValue");
|
|
47
|
+
const maxWidths = {
|
|
48
|
+
small: 400,
|
|
49
|
+
medium: 560,
|
|
50
|
+
large: 800
|
|
51
|
+
};
|
|
52
|
+
const host = inject(dialogHostKey, null);
|
|
53
|
+
const contentId = useId();
|
|
54
|
+
const card = useTemplateRef("card");
|
|
55
|
+
const title = computed(() => props.title || void 0);
|
|
56
|
+
const maxWidth = computed(() => maxWidths[props.size ?? "medium"]);
|
|
57
|
+
const role = computed(() => host?.role() ?? "dialog");
|
|
58
|
+
/**
|
|
59
|
+
* Whether the dialog is displayed. It follows `v-model`, but turns `false` as soon as the user
|
|
60
|
+
* closes the dialog, while `v-model` only does once the leave transition ends.
|
|
61
|
+
*/
|
|
62
|
+
const isActive = ref(model.value);
|
|
63
|
+
watch(model, (value) => isActive.value = value);
|
|
64
|
+
const { isLoading } = useDialogLoading(() => props.actions);
|
|
65
|
+
const { focusFirstElement } = useDialogFocus(() => isActive.value, () => card.value?.$el);
|
|
66
|
+
/**
|
|
67
|
+
* Closes the dialog from its close button, unless an action loads. The icon button's `disabled`
|
|
68
|
+
* only blocks pointer clicks and leaves the native `disabled` attribute out, hence its
|
|
69
|
+
* `aria-disabled`.
|
|
70
|
+
*/
|
|
71
|
+
function close() {
|
|
72
|
+
if (!isLoading.value) isActive.value = false;
|
|
73
|
+
}
|
|
74
|
+
function onAfterLeave() {
|
|
75
|
+
model.value = false;
|
|
76
|
+
host?.afterLeave();
|
|
77
|
+
}
|
|
78
|
+
return (_ctx, _cache) => {
|
|
79
|
+
return openBlock(), createBlock(unref(VDialog), {
|
|
80
|
+
modelValue: isActive.value,
|
|
81
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isActive.value = $event),
|
|
82
|
+
persistent: unref(isLoading),
|
|
83
|
+
"max-width": maxWidth.value,
|
|
84
|
+
role: role.value,
|
|
85
|
+
"aria-label": title.value,
|
|
86
|
+
"aria-labelledby": title.value ? void 0 : unref(contentId),
|
|
87
|
+
"aria-describedby": unref(host) ? unref(contentId) : void 0,
|
|
88
|
+
"data-testid": props.dataTestid,
|
|
89
|
+
scrollable: "",
|
|
90
|
+
onAfterEnter: unref(focusFirstElement),
|
|
91
|
+
onAfterLeave
|
|
92
|
+
}, {
|
|
93
|
+
default: withCtx(() => [createCommentVNode(" `data-u-dialog` identifies the card to the dialogs opened from this one "), createVNode(unref(VCard), {
|
|
94
|
+
ref_key: "card",
|
|
95
|
+
ref: card,
|
|
96
|
+
"data-u-dialog": ""
|
|
97
|
+
}, createSlots({
|
|
98
|
+
default: withCtx(() => [createVNode(unref(VCardItem), null, {
|
|
99
|
+
default: withCtx(() => [createCommentVNode(" The card's title prop has no room for the close button, so the title is built by hand.\n The flex classes place the button at the end, and the truncation brings back the ellipsis\n that the flex layout turns off "), createVNode(unref(VCardTitle), { class: "d-flex justify-space-between align-center" }, {
|
|
100
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1, toDisplayString(title.value), 1), createVNode(unref(VIconBtn), {
|
|
101
|
+
icon: unref(icons).close,
|
|
102
|
+
"aria-label": "Fechar",
|
|
103
|
+
"aria-disabled": unref(isLoading),
|
|
104
|
+
variant: "text",
|
|
105
|
+
size: "small",
|
|
106
|
+
"data-u-dialog-close": "",
|
|
107
|
+
disabled: unref(isLoading),
|
|
108
|
+
onClick: close
|
|
109
|
+
}, null, 8, [
|
|
110
|
+
"icon",
|
|
111
|
+
"aria-disabled",
|
|
112
|
+
"disabled"
|
|
113
|
+
])]),
|
|
114
|
+
_: 1
|
|
115
|
+
})]),
|
|
116
|
+
_: 1
|
|
117
|
+
}), createVNode(unref(VCardText), null, {
|
|
118
|
+
default: withCtx(() => [createElementVNode("div", { id: unref(contentId) }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_2)]),
|
|
119
|
+
_: 3
|
|
120
|
+
})]),
|
|
121
|
+
_: 2
|
|
122
|
+
}, [props.actions?.length ? {
|
|
123
|
+
name: "actions",
|
|
124
|
+
fn: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.actions, ({ label, onClick, ...action }, index) => {
|
|
125
|
+
return openBlock(), createBlock(button_default, mergeProps({ key: index }, { ref_for: true }, action, { onClick }), {
|
|
126
|
+
default: withCtx(() => [createTextVNode(toDisplayString(label), 1)]),
|
|
127
|
+
_: 2
|
|
128
|
+
}, 1040, ["onClick"]);
|
|
129
|
+
}), 128))]),
|
|
130
|
+
key: "0"
|
|
131
|
+
} : void 0]), 1536)]),
|
|
132
|
+
_: 3
|
|
133
|
+
}, 8, [
|
|
134
|
+
"modelValue",
|
|
135
|
+
"persistent",
|
|
136
|
+
"max-width",
|
|
137
|
+
"role",
|
|
138
|
+
"aria-label",
|
|
139
|
+
"aria-labelledby",
|
|
140
|
+
"aria-describedby",
|
|
141
|
+
"data-testid",
|
|
142
|
+
"onAfterEnter"
|
|
143
|
+
]);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
//#endregion
|
|
148
|
+
export { dialog_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ButtonProps } from "../../button/types.js";
|
|
2
|
+
//#region src/components/dialogs/dialog/types.d.ts
|
|
3
|
+
export type DialogSize = "small" | "medium" | "large";
|
|
4
|
+
/**
|
|
5
|
+
* Props exposed by the {@link Dialog} component. Every dialog displays a "Fechar" button at the top
|
|
6
|
+
* right of its title, which closes it as `Esc` and a click outside do.
|
|
7
|
+
*/
|
|
8
|
+
export type DialogProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Plain text displayed as the dialog's title, in a single line. HTML isn't interpreted.
|
|
11
|
+
* Also used as the dialog's accessible name. Without it, the content is the accessible name.
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Buttons displayed at the bottom of the dialog, right-aligned, in the given order.
|
|
16
|
+
* Place the main action last. When undefined or empty, no actions area is rendered.
|
|
17
|
+
* Clicking an action doesn't close the dialog: set `v-model` to `false` in `onClick`.
|
|
18
|
+
* While any action is `loading`, the user can't close the dialog with the "Fechar" button at its
|
|
19
|
+
* top right, `Esc`, a click outside or the browser's back button, but setting `v-model` to
|
|
20
|
+
* `false` still closes it.
|
|
21
|
+
*/
|
|
22
|
+
actions?: DialogButtonAction[];
|
|
23
|
+
/**
|
|
24
|
+
* Maximum width of the dialog.
|
|
25
|
+
* One of `small` (400px), `medium` (560px), or `large` (800px).
|
|
26
|
+
* @default "medium"
|
|
27
|
+
*/
|
|
28
|
+
size?: DialogSize;
|
|
29
|
+
/**
|
|
30
|
+
* Component id to use on automated tests.
|
|
31
|
+
*/
|
|
32
|
+
dataTestid?: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A single action rendered inside {@link Dialog}'s actions area. Same shape as `USection`'s
|
|
36
|
+
* actions. While it's `loading`, the user can't close the dialog, but setting `v-model` to `false` still does.
|
|
37
|
+
*/
|
|
38
|
+
export interface DialogButtonAction extends ButtonProps {
|
|
39
|
+
/**
|
|
40
|
+
* Text displayed on the action button.
|
|
41
|
+
*/
|
|
42
|
+
label: string;
|
|
43
|
+
/**
|
|
44
|
+
* Called when the action button is clicked. Not called while the action is `disabled` or
|
|
45
|
+
* `loading`. The dialog stays open.
|
|
46
|
+
*/
|
|
47
|
+
onClick?: (event: MouseEvent) => void;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import dialog_host_vue_vue_type_script_setup_true_lang_default from "./dialog-host.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/components/dialogs/dialog-host.vue
|
|
3
|
+
var dialog_host_default = dialog_host_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { dialog_host_default as default };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { dialogHostKey } from "./dialog/dialog-host-key.js";
|
|
2
|
+
import dialog_default from "./dialog/dialog.js";
|
|
3
|
+
import { owners, requests } from "../../composables/dialogs/use-dialog.js";
|
|
4
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, defineComponent, onMounted, onUnmounted, openBlock, provide, ref, shallowRef, toDisplayString, watch, withCtx } from "vue";
|
|
5
|
+
var dialog_host_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
__name: "dialog-host",
|
|
8
|
+
setup(__props) {
|
|
9
|
+
const owner = Symbol("dialog");
|
|
10
|
+
const isOwner = computed(() => owners.value[0] === owner);
|
|
11
|
+
const next = computed(() => isOwner.value ? requests.value[0] : void 0);
|
|
12
|
+
/** Dialog on display, kept until its leave transition ends. */
|
|
13
|
+
const request = shallowRef();
|
|
14
|
+
/**
|
|
15
|
+
* Changes for every dialog on display, so each one gets its own `Dialog`, open from the start.
|
|
16
|
+
* The next dialog can then open right after a dismissed one, whose `v-model` stays `true`.
|
|
17
|
+
*/
|
|
18
|
+
const key = shallowRef();
|
|
19
|
+
const isOpen = ref(false);
|
|
20
|
+
const selected = shallowRef();
|
|
21
|
+
const isRunning = computed(() => selected.value !== void 0);
|
|
22
|
+
const actions = computed(() => {
|
|
23
|
+
const current = request.value;
|
|
24
|
+
if (!current) return void 0;
|
|
25
|
+
return current.actions.map((action) => ({
|
|
26
|
+
label: action.text,
|
|
27
|
+
variant: action.variant,
|
|
28
|
+
color: action.color,
|
|
29
|
+
loading: selected.value === action,
|
|
30
|
+
disabled: isRunning.value && selected.value !== action,
|
|
31
|
+
onClick: () => void select(current, action)
|
|
32
|
+
}));
|
|
33
|
+
});
|
|
34
|
+
provide(dialogHostKey, {
|
|
35
|
+
role: () => request.value?.role,
|
|
36
|
+
afterLeave: showNext
|
|
37
|
+
});
|
|
38
|
+
onMounted(() => owners.value.push(owner));
|
|
39
|
+
onUnmounted(() => owners.value = owners.value.filter((item) => item !== owner));
|
|
40
|
+
watch(next, show);
|
|
41
|
+
function show() {
|
|
42
|
+
if (request.value) return;
|
|
43
|
+
request.value = next.value;
|
|
44
|
+
key.value = Symbol();
|
|
45
|
+
isOpen.value = next.value !== void 0;
|
|
46
|
+
}
|
|
47
|
+
function showNext() {
|
|
48
|
+
request.value = void 0;
|
|
49
|
+
show();
|
|
50
|
+
}
|
|
51
|
+
async function select(current, action) {
|
|
52
|
+
requests.value.shift();
|
|
53
|
+
selected.value = action;
|
|
54
|
+
await current.select(action?.value);
|
|
55
|
+
selected.value = void 0;
|
|
56
|
+
if (action) isOpen.value = false;
|
|
57
|
+
}
|
|
58
|
+
/** Called once a dialog closed by the user leaves, right before the next one is displayed. */
|
|
59
|
+
function dismiss() {
|
|
60
|
+
if (request.value) select(request.value);
|
|
61
|
+
}
|
|
62
|
+
return (_ctx, _cache) => {
|
|
63
|
+
return openBlock(), createElementBlock(Fragment, null, [createCommentVNode(" PascalCase, since `<dialog>` in the template would render the native HTML element instead "), (openBlock(), createBlock(dialog_default, {
|
|
64
|
+
key: key.value,
|
|
65
|
+
"model-value": isOpen.value,
|
|
66
|
+
title: request.value?.title,
|
|
67
|
+
actions: actions.value,
|
|
68
|
+
"onUpdate:modelValue": dismiss
|
|
69
|
+
}, {
|
|
70
|
+
default: withCtx(() => [createTextVNode(toDisplayString(request.value?.message), 1)]),
|
|
71
|
+
_: 1
|
|
72
|
+
}, 8, [
|
|
73
|
+
"model-value",
|
|
74
|
+
"title",
|
|
75
|
+
"actions"
|
|
76
|
+
]))], 2112);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
//#endregion
|
|
81
|
+
export { dialog_host_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import toast_vue_vue_type_script_setup_true_lang_default from "./toast.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/components/dialogs/toast.vue
|
|
3
|
+
var toast_default = toast_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { toast_default as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { icons } from "../../consts/icons.js";
|
|
2
|
+
import useDecorativeTimer from "../../composables/dialogs/use-decorative-timer.js";
|
|
3
|
+
import { messages } from "../../composables/dialogs/use-toast.js";
|
|
4
|
+
import { createBlock, createVNode, defineComponent, isRef, mergeProps, openBlock, unref, withCtx } from "vue";
|
|
5
|
+
import { VIconBtn, VSnackbarQueue } from "vuetify/components";
|
|
6
|
+
var toast_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
__name: "toast",
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const decorativeTimer = useDecorativeTimer();
|
|
11
|
+
return (_ctx, _cache) => {
|
|
12
|
+
return openBlock(), createBlock(unref(VSnackbarQueue), {
|
|
13
|
+
modelValue: unref(messages),
|
|
14
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(messages) ? messages.value = $event : null),
|
|
15
|
+
"content-props": unref(decorativeTimer),
|
|
16
|
+
"display-strategy": "overflow",
|
|
17
|
+
location: "top end",
|
|
18
|
+
"total-visible": "3",
|
|
19
|
+
collapsed: "",
|
|
20
|
+
closable: "",
|
|
21
|
+
timer: ""
|
|
22
|
+
}, {
|
|
23
|
+
actions: withCtx(({ props }) => [createVNode(unref(VIconBtn), mergeProps(props, {
|
|
24
|
+
"aria-label": "Fechar",
|
|
25
|
+
icon: unref(icons).close,
|
|
26
|
+
size: "small",
|
|
27
|
+
variant: "text"
|
|
28
|
+
}), null, 16, ["icon"])]),
|
|
29
|
+
_: 1
|
|
30
|
+
}, 8, ["modelValue", "content-props"]);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { toast_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import footer_vue_vue_type_script_setup_true_lang_default from "./footer.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/components/footer/footer.vue
|
|
3
|
+
var footer_default = footer_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { footer_default as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createBlock, createTextVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
|
|
2
|
+
import { VFooter } from "vuetify/components";
|
|
3
|
+
var footer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
4
|
+
inheritAttrs: false,
|
|
5
|
+
__name: "footer",
|
|
6
|
+
props: {
|
|
7
|
+
description: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: false
|
|
10
|
+
},
|
|
11
|
+
dataTestid: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: false
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
return (_ctx, _cache) => {
|
|
19
|
+
return openBlock(), createBlock(unref(VFooter), {
|
|
20
|
+
"data-testid": props.dataTestid,
|
|
21
|
+
class: "justify-center text-center",
|
|
22
|
+
app: ""
|
|
23
|
+
}, {
|
|
24
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.description), 1)]),
|
|
25
|
+
_: 1
|
|
26
|
+
}, 8, ["data-testid"]);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { footer_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/components/footer/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Props of the footer shown by the {@link Main} component.
|
|
4
|
+
*/
|
|
5
|
+
export type FooterProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Text shown in the footer, e.g. the application version ("Versão 1.4.2").
|
|
8
|
+
* The footer is hidden when it's empty or omitted.
|
|
9
|
+
*/
|
|
10
|
+
description?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Component id to use on automated tests.
|
|
13
|
+
*/
|
|
14
|
+
dataTestid?: string;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import form_vue_vue_type_script_setup_true_lang_default from "./form.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/components/form/form.vue
|
|
3
|
+
var form_default = form_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { form_default as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FormProps } from "./types.js";
|
|
2
|
+
//#region src/components/form/form.vue.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Form component to be used throughout the application.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```vue
|
|
8
|
+
* <template>
|
|
9
|
+
* <u-form @submit="onSubmit">
|
|
10
|
+
* <!-- uimed-field-components -->
|
|
11
|
+
* <!-- uimed-submit-btn-component -->
|
|
12
|
+
* </u-form>
|
|
13
|
+
* </template>
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/form | Form Guide}
|
|
17
|
+
*/
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<FormProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
|
|
20
|
+
submit: (event: SubmitEvent) => any;
|
|
21
|
+
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<FormProps> & Readonly<{
|
|
22
|
+
onSubmit?: ((event: SubmitEvent) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
24
|
+
default?: (props: {}) => any;
|
|
25
|
+
}>;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { _default as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createBlock, defineComponent, openBlock, renderSlot, unref, withCtx, withModifiers } from "vue";
|
|
2
|
+
import { VForm } from "vuetify/components";
|
|
3
|
+
var form_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
4
|
+
inheritAttrs: false,
|
|
5
|
+
__name: "form",
|
|
6
|
+
props: {
|
|
7
|
+
id: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: false
|
|
10
|
+
},
|
|
11
|
+
dataTestid: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: false
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
emits: ["submit"],
|
|
17
|
+
setup(__props, { emit: __emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const emit = __emit;
|
|
20
|
+
async function onSubmit(event) {
|
|
21
|
+
const { valid } = await event;
|
|
22
|
+
if (valid) emit("submit", event);
|
|
23
|
+
}
|
|
24
|
+
return (_ctx, _cache) => {
|
|
25
|
+
return openBlock(), createBlock(unref(VForm), {
|
|
26
|
+
id: props.id,
|
|
27
|
+
"data-testid": props.dataTestid,
|
|
28
|
+
onSubmit: withModifiers(onSubmit, ["prevent"])
|
|
29
|
+
}, {
|
|
30
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
31
|
+
_: 3
|
|
32
|
+
}, 8, ["id", "data-testid"]);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { form_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/components/form/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Props exposed by the {@link Form} component.
|
|
4
|
+
*/
|
|
5
|
+
export type FormProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Id to set on `form` native element.
|
|
8
|
+
*/
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Component id to use on automated tests.
|
|
12
|
+
*/
|
|
13
|
+
dataTestid?: string;
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import column_vue_vue_type_script_setup_true_lang_default from "./column.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/components/grid/column/column.vue
|
|
3
|
+
var column_default = column_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { column_default as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ColumnProps } from "./types.js";
|
|
2
|
+
//#region src/components/grid/column/column.vue.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Column component to be placed within a row.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```vue
|
|
8
|
+
* <template>
|
|
9
|
+
* <u-container>
|
|
10
|
+
* <u-row>
|
|
11
|
+
* <u-column>
|
|
12
|
+
* <!-- uimed-components -->
|
|
13
|
+
* </u-column>
|
|
14
|
+
* </u-row>
|
|
15
|
+
* </u-container>
|
|
16
|
+
* </template>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Column Guide}
|
|
20
|
+
*/
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ColumnProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ColumnProps> & Readonly<{}>, {
|
|
23
|
+
cols: "12" | "auto" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11";
|
|
24
|
+
}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
25
|
+
default?: (props: {}) => any;
|
|
26
|
+
}>;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { _default as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { computed, createBlock, defineComponent, normalizeClass, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
2
|
+
import { VCol } from "vuetify/components";
|
|
3
|
+
var column_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
4
|
+
inheritAttrs: false,
|
|
5
|
+
__name: "column",
|
|
6
|
+
props: {
|
|
7
|
+
cols: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: false,
|
|
10
|
+
default: "12"
|
|
11
|
+
},
|
|
12
|
+
listItem: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
required: false
|
|
15
|
+
},
|
|
16
|
+
dataTestid: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(__props) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const tag = computed(() => props.listItem ? "li" : void 0);
|
|
24
|
+
const listItemClasses = computed(() => props.listItem ? "d-block" : void 0);
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return openBlock(), createBlock(unref(VCol), {
|
|
27
|
+
cols: "12",
|
|
28
|
+
sm: props.cols,
|
|
29
|
+
tag: tag.value,
|
|
30
|
+
class: normalizeClass(listItemClasses.value),
|
|
31
|
+
"data-testid": props.dataTestid
|
|
32
|
+
}, {
|
|
33
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
34
|
+
_: 3
|
|
35
|
+
}, 8, [
|
|
36
|
+
"sm",
|
|
37
|
+
"tag",
|
|
38
|
+
"class",
|
|
39
|
+
"data-testid"
|
|
40
|
+
]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { column_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/components/grid/column/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Props exposed by the {@link Col} component.
|
|
4
|
+
*/
|
|
5
|
+
export type ColumnProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Number of columns to stretch the component.
|
|
8
|
+
* Available options are:
|
|
9
|
+
* - `"auto"`: which won't try to stretch the component
|
|
10
|
+
* - `"1"` to `"12"`.
|
|
11
|
+
* @default "12"
|
|
12
|
+
*/
|
|
13
|
+
cols?: Cols;
|
|
14
|
+
/**
|
|
15
|
+
* Renders the column as an item of a list (`<li>`), without its bullet.
|
|
16
|
+
* Use it on every column of a `URow` with `list`, whose records are,
|
|
17
|
+
* semantically, the items of a list.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
listItem?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Component id to use on automated tests.
|
|
23
|
+
*/
|
|
24
|
+
dataTestid?: string;
|
|
25
|
+
};
|
|
26
|
+
type Cols = "auto" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
|
|
27
|
+
//#endregion
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import container_vue_vue_type_script_setup_true_lang_default from "./container.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/components/grid/container/container.vue
|
|
3
|
+
var container_default = container_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { container_default as default };
|