@nexdom/uimed-vue 2.0.0-beta.48 → 2.0.0-beta.49
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
CHANGED
|
@@ -252,6 +252,18 @@ type MainProps = {
|
|
|
252
252
|
* @default false
|
|
253
253
|
*/
|
|
254
254
|
loading?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Applies a color to the background of the whole app, e.g. on landing pages. Text placed
|
|
257
|
+
* directly on the background takes the color the theme pairs with it (white or black), while
|
|
258
|
+
* the app bar, the footer, sections and dialogs keep their own backgrounds. When omitted, the
|
|
259
|
+
* app uses the theme's default background.
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* ```vue
|
|
263
|
+
* <u-main background="primary" />
|
|
264
|
+
* ```
|
|
265
|
+
*/
|
|
266
|
+
background?: ColorVariant;
|
|
255
267
|
};
|
|
256
268
|
//#endregion
|
|
257
269
|
//#region src/components/main/main.vue.d.ts
|
|
@@ -575,8 +587,8 @@ declare const __VLS_export$16: import("vue", { with: { "resolution-mode": "impor
|
|
|
575
587
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
576
588
|
}>, {
|
|
577
589
|
variant: TextFieldVariant;
|
|
578
|
-
clearable: boolean;
|
|
579
590
|
type: TextFieldType;
|
|
591
|
+
clearable: boolean;
|
|
580
592
|
}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
|
|
581
593
|
//#endregion
|
|
582
594
|
//#region src/components/inputs/checkbox/types.d.ts
|
package/dist/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as messages, c as colorToVuetifyTextColor, n as owners$1, r as requests, s as useVuetifyColor } from "./use-dialog-
|
|
1
|
+
import { a as messages, c as colorToVuetifyColor, l as colorToVuetifyTextColor, n as owners$1, r as requests, s as useVuetifyColor } from "./use-dialog-C0sM_bA2.js";
|
|
2
2
|
import { useLocale, useMask } from "vuetify";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, isRef, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, onMounted, onScopeDispose, onUnmounted, openBlock, provide, readonly, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toValue, unref, useId, useModel, useSlots, useTemplateRef, watch, withCtx, withKeys, withModifiers } from "vue";
|
|
4
4
|
import { pt } from "vuetify/locale";
|
|
@@ -1409,6 +1409,19 @@ var dialog_host_default = /* @__PURE__ */ defineComponent({
|
|
|
1409
1409
|
}
|
|
1410
1410
|
});
|
|
1411
1411
|
//#endregion
|
|
1412
|
+
//#region src/composables/colors/use-vuetify-background-color.ts
|
|
1413
|
+
/**
|
|
1414
|
+
* Vuetify's utility class that applies a color to the background of an element, and the color the
|
|
1415
|
+
* theme pairs with it to its text, for props that color a background. No class when the color is
|
|
1416
|
+
* omitted, so the element keeps its default background.
|
|
1417
|
+
*/
|
|
1418
|
+
function useVuetifyBackgroundColor(color) {
|
|
1419
|
+
return computed(() => {
|
|
1420
|
+
const colorValue = toValue(color);
|
|
1421
|
+
return colorValue ? `bg-${colorToVuetifyColor[colorValue]}` : void 0;
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
//#endregion
|
|
1412
1425
|
//#region src/components/main/main.vue
|
|
1413
1426
|
var main_default = /* @__PURE__ */ defineComponent({
|
|
1414
1427
|
inheritAttrs: false,
|
|
@@ -1437,6 +1450,10 @@ var main_default = /* @__PURE__ */ defineComponent({
|
|
|
1437
1450
|
loading: {
|
|
1438
1451
|
type: Boolean,
|
|
1439
1452
|
required: false
|
|
1453
|
+
},
|
|
1454
|
+
background: {
|
|
1455
|
+
type: String,
|
|
1456
|
+
required: false
|
|
1440
1457
|
}
|
|
1441
1458
|
}, {
|
|
1442
1459
|
"notificationsOpen": {
|
|
@@ -1454,10 +1471,14 @@ var main_default = /* @__PURE__ */ defineComponent({
|
|
|
1454
1471
|
navigation: props.navigationMenu !== void 0,
|
|
1455
1472
|
loading: props.loading
|
|
1456
1473
|
} : void 0);
|
|
1474
|
+
const backgroundClass = useVuetifyBackgroundColor(() => props.background);
|
|
1457
1475
|
const notificationsOpen = useModel(__props, "notificationsOpen");
|
|
1458
1476
|
const navigationMenuOpen = ref(false);
|
|
1459
1477
|
return (_ctx, _cache) => {
|
|
1460
|
-
return openBlock(), createBlock(unref(VApp), {
|
|
1478
|
+
return openBlock(), createBlock(unref(VApp), {
|
|
1479
|
+
class: normalizeClass(unref(backgroundClass)),
|
|
1480
|
+
"data-testid": props.dataTestid
|
|
1481
|
+
}, {
|
|
1461
1482
|
default: withCtx(() => [
|
|
1462
1483
|
appBarProps.value ? (openBlock(), createBlock(app_bar_default, mergeProps({ key: 0 }, appBarProps.value, {
|
|
1463
1484
|
"notifications-open": notificationsOpen.value,
|
|
@@ -1484,7 +1505,7 @@ var main_default = /* @__PURE__ */ defineComponent({
|
|
|
1484
1505
|
props.footer?.description ? (openBlock(), createBlock(footer_default, normalizeProps(mergeProps({ key: 2 }, props.footer)), null, 16)) : createCommentVNode("v-if", true)
|
|
1485
1506
|
]),
|
|
1486
1507
|
_: 3
|
|
1487
|
-
}, 8, ["data-testid"]);
|
|
1508
|
+
}, 8, ["class", "data-testid"]);
|
|
1488
1509
|
};
|
|
1489
1510
|
}
|
|
1490
1511
|
});
|
package/dist/composables.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as useDialog, o as useToast, t as openDialog } from "./use-dialog-
|
|
1
|
+
import { i as useDialog, o as useToast, t as openDialog } from "./use-dialog-C0sM_bA2.js";
|
|
2
2
|
import { computed, onActivated, onDeactivated, onMounted, onUnmounted, ref, toValue, watch } from "vue";
|
|
3
3
|
import { isDeepEqual } from "@nexdom/shared/utils";
|
|
4
4
|
import { onBeforeRouteLeave } from "vue-router";
|
|
@@ -135,4 +135,4 @@ function dialog(options) {
|
|
|
135
135
|
}, (value) => value);
|
|
136
136
|
}
|
|
137
137
|
//#endregion
|
|
138
|
-
export { messages as a,
|
|
138
|
+
export { messages as a, colorToVuetifyColor as c, useDialog as i, colorToVuetifyTextColor as l, owners as n, useToast as o, requests as r, useVuetifyColor as s, openDialog as t };
|