@nexdom/uimed-vue 2.0.0-beta.17 → 2.0.0-beta.19
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/components.d.ts +24 -2
- package/dist/components.js +32 -5
- package/package.json +1 -1
package/dist/components.d.ts
CHANGED
|
@@ -651,6 +651,22 @@ type __VLS_WithSlots$8<T, S> = T & {
|
|
|
651
651
|
* Props exposed by the {@link Row} component.
|
|
652
652
|
*/
|
|
653
653
|
type RowProps = {
|
|
654
|
+
/**
|
|
655
|
+
* Vertical alignment of the row's columns, relative to the tallest column on the same line.
|
|
656
|
+
* Available options are:
|
|
657
|
+
* - `"start"`: aligns the columns to the top;
|
|
658
|
+
* - `"center"`: centers the columns vertically;
|
|
659
|
+
* - `"end"`: aligns the columns to the bottom;
|
|
660
|
+
* - `"stretch"`: stretches every column to the height of the tallest one.
|
|
661
|
+
*
|
|
662
|
+
* Use `"stretch"` to keep side by side columns at the same height, e.g. cards made of
|
|
663
|
+
* `USection`s with `fullHeight`.
|
|
664
|
+
*
|
|
665
|
+
* Columns sit side by side only from the `sm` breakpoint up. Below it, each column takes a
|
|
666
|
+
* whole line, so the alignment has no visible effect.
|
|
667
|
+
* @default "start"
|
|
668
|
+
*/
|
|
669
|
+
align?: RowAlign;
|
|
654
670
|
/**
|
|
655
671
|
* Renders the row as a list (`<ul>`), without the list's default indentation
|
|
656
672
|
* and bullets, so assistive technologies announce its columns as the items
|
|
@@ -664,6 +680,7 @@ type RowProps = {
|
|
|
664
680
|
*/
|
|
665
681
|
dataTestid?: string;
|
|
666
682
|
};
|
|
683
|
+
type RowAlign = "start" | "center" | "end" | "stretch";
|
|
667
684
|
//#endregion
|
|
668
685
|
//#region src/components/grid/row/row.vue.d.ts
|
|
669
686
|
/**
|
|
@@ -673,7 +690,7 @@ type RowProps = {
|
|
|
673
690
|
* ```vue
|
|
674
691
|
* <template>
|
|
675
692
|
* <u-container>
|
|
676
|
-
*
|
|
693
|
+
* <u-row align="center">
|
|
677
694
|
* <!-- uimed-column -->
|
|
678
695
|
* </u-row>
|
|
679
696
|
* </u-container>
|
|
@@ -683,7 +700,9 @@ type RowProps = {
|
|
|
683
700
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Row Guide}
|
|
684
701
|
*/
|
|
685
702
|
declare const _default$12: typeof __VLS_export$9;
|
|
686
|
-
declare const __VLS_export$9: __VLS_WithSlots$7<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<RowProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<RowProps> & Readonly<{}>, {
|
|
703
|
+
declare const __VLS_export$9: __VLS_WithSlots$7<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<RowProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<RowProps> & Readonly<{}>, {
|
|
704
|
+
align: RowAlign;
|
|
705
|
+
}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
687
706
|
default?: (props: {}) => any;
|
|
688
707
|
}>;
|
|
689
708
|
type __VLS_WithSlots$7<T, S> = T & {
|
|
@@ -853,6 +872,9 @@ type SectionProps = {
|
|
|
853
872
|
fullWidth?: boolean;
|
|
854
873
|
/**
|
|
855
874
|
* Makes the section occupy 100% of its parent's height.
|
|
875
|
+
*
|
|
876
|
+
* Inside a `URow`, set its `align` to `"stretch"` so the section takes the height of the
|
|
877
|
+
* tallest column on the same line.
|
|
856
878
|
* @default false
|
|
857
879
|
*/
|
|
858
880
|
fullHeight?: boolean;
|
package/dist/components.js
CHANGED
|
@@ -80,6 +80,8 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
80
80
|
const showNotifications = computed(() => !!props.notifications);
|
|
81
81
|
const unreadCount = computed(() => props.notifications.filter((notification) => !notification.read).length);
|
|
82
82
|
const hasUnreadNotifications = computed(() => unreadCount.value > 0);
|
|
83
|
+
const unreadLabel = computed(() => unreadCount.value === 1 ? "1 não lida" : `${unreadCount.value} não lidas`);
|
|
84
|
+
const notificationsLabel = computed(() => hasUnreadNotifications.value ? `Notificações (${unreadLabel.value})` : "Notificações");
|
|
83
85
|
watch(() => props.loading, (loading) => {
|
|
84
86
|
if (loading) notificationsOpen.value = false;
|
|
85
87
|
});
|
|
@@ -100,6 +102,7 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
100
102
|
default: withCtx(() => [
|
|
101
103
|
showHelp.value ? (openBlock(), createBlock(unref(VBtn), mergeProps({ key: 0 }, unref(routeProps), {
|
|
102
104
|
"data-testid": helpBtnDataTestid.value,
|
|
105
|
+
"aria-label": "Ajuda",
|
|
103
106
|
icon: "mdi-help-circle-outline"
|
|
104
107
|
}), null, 16, ["data-testid"])) : createCommentVNode("v-if", true),
|
|
105
108
|
showNotifications.value ? (openBlock(), createBlock(unref(VMenu), {
|
|
@@ -110,18 +113,24 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
110
113
|
}, {
|
|
111
114
|
activator: withCtx(({ props }) => [createVNode(unref(VBtn), mergeProps(props, {
|
|
112
115
|
"data-testid": notificationsBtnDataTestid.value,
|
|
116
|
+
"aria-label": notificationsLabel.value,
|
|
113
117
|
icon: ""
|
|
114
118
|
}), {
|
|
115
119
|
default: withCtx(() => [createVNode(unref(VBadge), {
|
|
116
120
|
"model-value": hasUnreadNotifications.value,
|
|
117
121
|
content: unreadCount.value,
|
|
122
|
+
label: unreadLabel.value,
|
|
118
123
|
color: "error"
|
|
119
124
|
}, {
|
|
120
125
|
default: withCtx(() => [createVNode(unref(VIcon), { icon: "mdi-bell-outline" })]),
|
|
121
126
|
_: 1
|
|
122
|
-
}, 8, [
|
|
127
|
+
}, 8, [
|
|
128
|
+
"model-value",
|
|
129
|
+
"content",
|
|
130
|
+
"label"
|
|
131
|
+
])]),
|
|
123
132
|
_: 1
|
|
124
|
-
}, 16, ["data-testid"])]),
|
|
133
|
+
}, 16, ["data-testid", "aria-label"])]),
|
|
125
134
|
default: withCtx(() => [createVNode(unref(VCard), { "data-testid": notificationsMenuDataTestid.value }, {
|
|
126
135
|
default: withCtx(() => [props.notifications?.length ? (openBlock(), createBlock(unref(VList), { key: 0 }, {
|
|
127
136
|
default: withCtx(() => [createVNode(unref(VListSubheader), null, {
|
|
@@ -162,6 +171,7 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
162
171
|
}, {
|
|
163
172
|
activator: withCtx(({ props }) => [createVNode(unref(VBtn), mergeProps(props, {
|
|
164
173
|
"data-testid": userBtnDataTestid.value,
|
|
174
|
+
"aria-label": "Menu do usuário",
|
|
165
175
|
icon: ""
|
|
166
176
|
}), {
|
|
167
177
|
default: withCtx(() => [createVNode(unref(VAvatar), mergeProps(userAvatarProps.value, { color: "primary" }), null, 16)]),
|
|
@@ -209,8 +219,10 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
209
219
|
__props.navigation ? (openBlock(), createBlock(unref(VAppBarNavIcon), {
|
|
210
220
|
key: 0,
|
|
211
221
|
"data-testid": navigationBtnDataTestid.value,
|
|
222
|
+
"aria-expanded": navigationOpen.value,
|
|
223
|
+
"aria-label": "Menu de navegação",
|
|
212
224
|
onClick: _cache[0] || (_cache[0] = ($event) => navigationOpen.value = !navigationOpen.value)
|
|
213
|
-
}, null, 8, ["data-testid"])) : createCommentVNode("v-if", true),
|
|
225
|
+
}, null, 8, ["data-testid", "aria-expanded"])) : createCommentVNode("v-if", true),
|
|
214
226
|
__props.logo ? (openBlock(), createBlock(unref(VImg), {
|
|
215
227
|
key: 1,
|
|
216
228
|
src: props.logo,
|
|
@@ -1458,6 +1470,11 @@ var row_default = /* @__PURE__ */ defineComponent({
|
|
|
1458
1470
|
inheritAttrs: false,
|
|
1459
1471
|
__name: "row",
|
|
1460
1472
|
props: {
|
|
1473
|
+
align: {
|
|
1474
|
+
type: String,
|
|
1475
|
+
required: false,
|
|
1476
|
+
default: "start"
|
|
1477
|
+
},
|
|
1461
1478
|
list: {
|
|
1462
1479
|
type: Boolean,
|
|
1463
1480
|
required: false
|
|
@@ -1469,12 +1486,19 @@ var row_default = /* @__PURE__ */ defineComponent({
|
|
|
1469
1486
|
},
|
|
1470
1487
|
setup(__props) {
|
|
1471
1488
|
const props = __props;
|
|
1489
|
+
const rowAlignToClass = {
|
|
1490
|
+
start: "align-start",
|
|
1491
|
+
center: "align-center",
|
|
1492
|
+
end: "align-end",
|
|
1493
|
+
stretch: "align-stretch"
|
|
1494
|
+
};
|
|
1495
|
+
const alignClass = computed(() => rowAlignToClass[props.align]);
|
|
1472
1496
|
const tag = computed(() => props.list ? "ul" : void 0);
|
|
1473
1497
|
const listClasses = computed(() => props.list ? "pa-0 ma-0" : void 0);
|
|
1474
1498
|
return (_ctx, _cache) => {
|
|
1475
1499
|
return openBlock(), createBlock(unref(VRow), {
|
|
1476
1500
|
tag: tag.value,
|
|
1477
|
-
class: normalizeClass(listClasses.value),
|
|
1501
|
+
class: normalizeClass([alignClass.value, listClasses.value]),
|
|
1478
1502
|
"data-testid": props.dataTestid
|
|
1479
1503
|
}, {
|
|
1480
1504
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
@@ -2025,7 +2049,10 @@ var data_set_default = /* @__PURE__ */ defineComponent({
|
|
|
2025
2049
|
type: "search",
|
|
2026
2050
|
label: "Pesquisar"
|
|
2027
2051
|
}, null, 8, ["modelValue"])) : createCommentVNode("v-if", true)]),
|
|
2028
|
-
default: withCtx(({ items: pageItems }) => [
|
|
2052
|
+
default: withCtx(({ items: pageItems }) => [createCommentVNode(" Stretched, so the items of the same line (e.g. full-height cards) share its height "), createVNode(row_default, {
|
|
2053
|
+
list: "",
|
|
2054
|
+
align: "stretch"
|
|
2055
|
+
}, {
|
|
2029
2056
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(pageItems, (pageItem, index) => {
|
|
2030
2057
|
return openBlock(), createBlock(column_default, {
|
|
2031
2058
|
key: index,
|