@nexdom/uimed-vue 1.2.0 → 1.3.0-beta.2

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.
@@ -142,6 +142,10 @@ type RootProps = {
142
142
  * Component id to use on automated tests.
143
143
  */
144
144
  dataTestid?: string;
145
+ /**
146
+ * URL to logo image.
147
+ */
148
+ logo?: string;
145
149
  /**
146
150
  * App bar properties.
147
151
  */
@@ -339,8 +343,8 @@ declare const __VLS_export$4: import("vue", { with: { "resolution-mode": "import
339
343
  }> & Readonly<{
340
344
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
341
345
  }>, {
342
- type: TextFieldType;
343
346
  variant: TextFieldVariant;
347
+ type: TextFieldType;
344
348
  clearable: boolean;
345
349
  }, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
346
350
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { r as useVuetifyColor, t as messages } from "./use-toast-CACuYhK_.js";
2
2
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, isRef, mergeModels, mergeProps, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, useModel, withCtx, withModifiers } from "vue";
3
- import { VApp, VAppBar, VAppBarNavIcon, VAvatar, VBadge, VBtn, VCard, VCardText, VCol, VContainer, VDivider, VForm, VIcon, VIconBtn, VList, VListGroup, VListItem, VListItemAction, VListSubheader, VMain, VMenu, VNavigationDrawer, VRow, VSnackbarQueue, VTextField } from "vuetify/components";
3
+ import { VApp, VAppBar, VAppBarNavIcon, VAppBarTitle, VAvatar, VBadge, VBtn, VCard, VCardText, VCol, VContainer, VDivider, VForm, VIcon, VIconBtn, VImg, VList, VListGroup, VListItem, VListItemAction, VListSubheader, VMain, VMenu, VNavigationDrawer, VRow, VSnackbarQueue, VTextField } from "vuetify/components";
4
4
  import { formatDateTime, isEmail, isEmpty, isPhone, isUrl, toPeriodInterval } from "@nexdom/shared/utils";
5
5
  //#region src/composables/navigation/use-route-props.ts
6
6
  function useRouteProps(route) {
@@ -44,7 +44,11 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
44
44
  },
45
45
  navigation: {
46
46
  type: Boolean,
47
- required: true
47
+ required: false
48
+ },
49
+ logo: {
50
+ type: String,
51
+ required: false
48
52
  }
49
53
  }, {
50
54
  "notificationsOpen": {
@@ -94,15 +98,7 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
94
98
  return interval.days === 1;
95
99
  }
96
100
  return (_ctx, _cache) => {
97
- return openBlock(), createBlock(unref(VAppBar), {
98
- title: props.title,
99
- "data-testid": props.dataTestid
100
- }, {
101
- prepend: withCtx(() => [__props.navigation ? (openBlock(), createBlock(unref(VAppBarNavIcon), {
102
- key: 0,
103
- "data-testid": navigationBtnDataTestid.value,
104
- onClick: _cache[0] || (_cache[0] = ($event) => navigationOpen.value = !navigationOpen.value)
105
- }, null, 8, ["data-testid"])) : createCommentVNode("v-if", true)]),
101
+ return openBlock(), createBlock(unref(VAppBar), { "data-testid": props.dataTestid }, {
106
102
  append: withCtx(() => [
107
103
  showHelp.value ? (openBlock(), createBlock(unref(VBtn), mergeProps({ key: 0 }, unref(routeProps), {
108
104
  "data-testid": helpBtnDataTestid.value,
@@ -209,8 +205,27 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
209
205
  _: 1
210
206
  })) : createCommentVNode("v-if", true)
211
207
  ]),
208
+ default: withCtx(() => [
209
+ __props.navigation ? (openBlock(), createBlock(unref(VAppBarNavIcon), {
210
+ key: 0,
211
+ "data-testid": navigationBtnDataTestid.value,
212
+ onClick: _cache[0] || (_cache[0] = ($event) => navigationOpen.value = !navigationOpen.value)
213
+ }, null, 8, ["data-testid"])) : createCommentVNode("v-if", true),
214
+ __props.logo ? (openBlock(), createBlock(unref(VImg), {
215
+ key: 1,
216
+ src: props.logo,
217
+ height: "100%",
218
+ width: "fit-content",
219
+ class: "py-2 ml-5 mr-n3",
220
+ cover: ""
221
+ }, null, 8, ["src"])) : createCommentVNode("v-if", true),
222
+ props.title ? (openBlock(), createBlock(unref(VAppBarTitle), { key: 2 }, {
223
+ default: withCtx(() => [createTextVNode(toDisplayString(props.title), 1)]),
224
+ _: 1
225
+ })) : createCommentVNode("v-if", true)
226
+ ]),
212
227
  _: 1
213
- }, 8, ["title", "data-testid"]);
228
+ }, 8, ["data-testid"]);
214
229
  };
215
230
  }
216
231
  });
@@ -349,7 +364,7 @@ var text_field_default = /* @__PURE__ */ defineComponent({
349
364
  const rules = useTextFieldRules(props);
350
365
  const isSearchField = computed(() => props.type === "search");
351
366
  const computedClearable = computed(() => props.clearable ?? isSearchField.value);
352
- const prependIcon = computed(() => isSearchField.value ? "mdi-magnify" : void 0);
367
+ const appendIcon = computed(() => isSearchField.value ? "mdi-magnify" : void 0);
353
368
  function clear() {
354
369
  modelValue.value = "";
355
370
  }
@@ -359,7 +374,7 @@ var text_field_default = /* @__PURE__ */ defineComponent({
359
374
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
360
375
  variant: unref(vuetifyVariant),
361
376
  type: unref(vuetifyType),
362
- "prepend-inner-icon": prependIcon.value,
377
+ "append-inner-icon": appendIcon.value,
363
378
  rules: unref(rules),
364
379
  "data-testid": props.dataTestid,
365
380
  disabled: props.disabled,
@@ -374,7 +389,7 @@ var text_field_default = /* @__PURE__ */ defineComponent({
374
389
  "modelValue",
375
390
  "variant",
376
391
  "type",
377
- "prepend-inner-icon",
392
+ "append-inner-icon",
378
393
  "rules",
379
394
  "data-testid",
380
395
  "disabled",
@@ -537,6 +552,10 @@ var root_default = /* @__PURE__ */ defineComponent({
537
552
  type: String,
538
553
  required: false
539
554
  },
555
+ logo: {
556
+ type: String,
557
+ required: false
558
+ },
540
559
  appBar: {
541
560
  type: Object,
542
561
  required: false
@@ -557,6 +576,7 @@ var root_default = /* @__PURE__ */ defineComponent({
557
576
  const props = __props;
558
577
  const appBarProps = computed(() => props.appBar ? {
559
578
  ...props.appBar,
579
+ logo: props.logo,
560
580
  navigation: props.navigationMenu !== void 0
561
581
  } : void 0);
562
582
  const notificationsOpen = useModel(__props, "notificationsOpen");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexdom/uimed-vue",
3
- "version": "1.2.0",
3
+ "version": "1.3.0-beta.2",
4
4
  "description": "A ui framework for NEXDOM applications.",
5
5
  "keywords": [
6
6
  "lib",