@ulu/frontend-vue 0.5.7 → 0.5.9

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.
@@ -22,7 +22,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
22
22
  titleTo?: string | Record<string, any> | undefined;
23
23
  titleHref?: string | undefined;
24
24
  titleTarget?: string | undefined;
25
- image?: string | Record<string, any> | undefined;
25
+ image?: Record<string, any> | undefined;
26
26
  imageSrc?: string | undefined;
27
27
  imageAlt?: string | undefined;
28
28
  $props: {
@@ -43,7 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
43
43
  readonly titleTo?: string | Record<string, any> | undefined;
44
44
  readonly titleHref?: string | undefined;
45
45
  readonly titleTarget?: string | undefined;
46
- readonly image?: string | Record<string, any> | undefined;
46
+ readonly image?: Record<string, any> | undefined;
47
47
  readonly imageSrc?: string | undefined;
48
48
  readonly imageAlt?: string | undefined;
49
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"UluCard.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluCard.vue"],"names":[],"mappings":"AA+EA;wBAitBqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAbjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAUG"}
1
+ {"version":3,"file":"UluCard.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluCard.vue"],"names":[],"mappings":"AA+EA;wBA+rBqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAbjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAUG"}
@@ -1,16 +1,15 @@
1
- import { useSlots as R, computed as r, ref as f, createBlock as k, openBlock as a, resolveDynamicComponent as z, normalizeStyle as V, normalizeClass as h, unref as n, withCtx as S, createElementVNode as $, createElementBlock as m, createCommentVNode as g, renderSlot as i, createTextVNode as C, toDisplayString as x, createVNode as I, normalizeProps as q, guardReactiveProps as L } from "vue";
1
+ import { useSlots as V, computed as o, ref as f, createBlock as k, openBlock as a, resolveDynamicComponent as P, normalizeStyle as p, normalizeClass as h, unref as n, withCtx as S, createElementVNode as $, createElementBlock as m, createCommentVNode as y, renderSlot as i, createTextVNode as C, toDisplayString as x, createVNode as A, normalizeProps as I, guardReactiveProps as q } from "vue";
2
2
  import { RouterLink as B } from "vue-router";
3
- import { useModifiers as F } from "../../composables/useModifiers.js";
4
- import { refToElement as G } from "../../utils/dom.js";
5
- import { warnDeprecatedProp as O } from "../../utils/props.js";
6
- import J from "./UluImage.vue.js";
7
- const K = { class: "card__body" }, Q = { class: "card__main" }, W = ["href", "target"], X = {
3
+ import { useModifiers as L } from "../../composables/useModifiers.js";
4
+ import { refToElement as F } from "../../utils/dom.js";
5
+ import G from "./UluImage.vue.js";
6
+ const J = { class: "card__body" }, K = { class: "card__main" }, Q = ["href", "target"], W = {
8
7
  key: 0,
9
8
  class: "card__aside"
10
- }, Y = {
9
+ }, X = {
11
10
  key: 1,
12
11
  class: "card__footer"
13
- }, oe = {
12
+ }, le = {
14
13
  __name: "UluCard",
15
14
  props: {
16
15
  /**
@@ -84,17 +83,17 @@ const K = { class: "card__body" }, Q = { class: "card__main" }, W = ["href", "ta
84
83
  default: () => ({})
85
84
  },
86
85
  /**
87
- * Unified image prop configuration passed to UluImage. Can be a string (src) or an object matching UluImage props.
86
+ * Advanced configuration for the underlying `<UluImage>` component.
87
+ * Accepts a full configuration object (e.g., for lazy loading, srcset, etc.).
88
88
  */
89
- image: [String, Object],
89
+ image: Object,
90
90
  /**
91
- * This is deprecated and will be removed in future version use "image" prop or image slot
92
- * @deprecated Use `image` instead.
91
+ * Convenience prop for quickly setting the image source.
92
+ * For advanced image configurations, use the `image` prop or `#image` slot instead.
93
93
  */
94
94
  imageSrc: String,
95
95
  /**
96
- * This is deprecated and will be removed in future version use "image" prop or image slot
97
- * @deprecated Use `image` (as an object with `alt`) instead.
96
+ * The alt text for the image when using the `imageSrc` convenience prop.
98
97
  */
99
98
  imageAlt: String,
100
99
  /**
@@ -120,37 +119,37 @@ const K = { class: "card__body" }, Q = { class: "card__main" }, W = ["href", "ta
120
119
  modifiers: [Array, String]
121
120
  },
122
121
  emits: ["proxy-click"],
123
- setup(t, { emit: p }) {
124
- const e = t, H = p, s = R();
125
- e.proxyClick && (e.to || e.href) && console.warn("UluCard: 'proxyClick' is ignored when 'to' or 'href' are present."), (e.titleTo || e.titleHref) && (e.to || e.href) && console.warn("UluCard: 'titleTo'/'titleHref' should not be used with 'to'/'href'."), O("UluCard", e, "imageSrc", "image"), O("UluCard", e, "imageAlt", "image");
126
- const b = r(() => e.image ? typeof e.image == "string" ? { src: e.image } : e.image : e.imageSrc ? {
122
+ setup(t, { emit: O }) {
123
+ const e = t, H = O, s = V();
124
+ e.proxyClick && (e.to || e.href) && console.warn("UluCard: 'proxyClick' is ignored when 'to' or 'href' are present."), (e.titleTo || e.titleHref) && (e.to || e.href) && console.warn("UluCard: 'titleTo'/'titleHref' should not be used with 'to'/'href'.");
125
+ const b = o(() => e.image ? e.image : e.imageSrc ? {
127
126
  src: e.imageSrc,
128
127
  alt: e.imageAlt || ""
129
- } : null), T = f(null), y = f(null), { resolvedModifiers: M } = F({ props: e, baseClass: "card" }), w = f(null), c = f(!1), u = r(() => e.proxyClick && !e.to && !e.href), E = r(() => u.value && (e.titleTo || e.titleHref)), U = r(() => u.value && !E.value), v = r(() => u.value || null), P = r(() => ({
128
+ } : null), T = f(null), v = f(null), { resolvedModifiers: M } = L({ props: e, baseClass: "card" }), E = f(null), c = f(!1), u = o(() => e.proxyClick && !e.to && !e.href), w = o(() => u.value && (e.titleTo || e.titleHref)), j = o(() => u.value && !w.value), g = o(() => u.value || null), z = o(() => ({
130
129
  selectorPrevent: "input, select, textarea, button, a, [tabindex='-1']",
131
130
  mousedownDurationPrevent: 250,
132
131
  ...e.proxyClickOptions
133
- })), j = r(() => u.value ? "pointer" : null), D = r(() => e.to ? B : e.href ? "a" : e.cardElement);
134
- function A({ target: l, timeStamp: d }) {
135
- if (!v.value) return;
136
- const { selectorPrevent: o } = P.value;
137
- c.value = !1, l.closest(o) || (c.value = !0, w.value = d);
132
+ })), D = o(() => u.value ? "pointer" : null), N = o(() => e.to ? B : e.href ? "a" : e.cardElement);
133
+ function R({ target: l, timeStamp: d }) {
134
+ if (!g.value) return;
135
+ const { selectorPrevent: r } = z.value;
136
+ c.value = !1, l.closest(r) || (c.value = !0, E.value = d);
138
137
  }
139
- function N({ timeStamp: l }) {
140
- if (!v.value || !c.value) return;
141
- const { mousedownDurationPrevent: d } = P.value;
142
- if (l - w.value < d) {
143
- if (E.value) {
144
- const o = G(y.value);
145
- o ? o.click() : console.warn("Unable to resolve title link ref");
146
- } else if (U.value) {
147
- const o = T.value?.querySelector("[data-ulu-card-proxy-target]");
148
- o ? o.click() : H("proxy-click");
138
+ function U({ timeStamp: l }) {
139
+ if (!g.value || !c.value) return;
140
+ const { mousedownDurationPrevent: d } = z.value;
141
+ if (l - E.value < d) {
142
+ if (w.value) {
143
+ const r = F(v.value);
144
+ r ? r.click() : console.warn("Unable to resolve title link ref");
145
+ } else if (j.value) {
146
+ const r = T.value?.querySelector("[data-ulu-card-proxy-target]");
147
+ r ? r.click() : H("proxy-click");
149
148
  }
150
149
  }
151
150
  c.value = !1;
152
151
  }
153
- return (l, d) => (a(), k(z(D.value), {
152
+ return (l, d) => (a(), k(P(N.value), {
154
153
  ref_key: "cardRoot",
155
154
  ref: T,
156
155
  class: h(["card", [
@@ -161,18 +160,18 @@ const K = { class: "card__body" }, Q = { class: "card__main" }, W = ["href", "ta
161
160
  },
162
161
  n(M)
163
162
  ]]),
164
- onMousedown: A,
165
- onMouseup: N,
166
- style: V({ cursor: j.value }),
163
+ onMousedown: R,
164
+ onMouseup: U,
165
+ style: p({ cursor: D.value }),
167
166
  target: t.target,
168
167
  to: t.to,
169
168
  href: t.href,
170
- "data-ulu-proxy-click-init": v.value
169
+ "data-ulu-proxy-click-init": g.value
171
170
  }, {
172
171
  default: S(() => [
173
- $("div", K, [
174
- $("div", Q, [
175
- t.title || n(s).title ? (a(), k(z(t.titleElement), {
172
+ $("div", J, [
173
+ $("div", K, [
174
+ t.title || n(s).title ? (a(), k(P(t.titleElement), {
176
175
  key: 0,
177
176
  class: h(["card__title", t.classes.title])
178
177
  }, {
@@ -182,7 +181,7 @@ const K = { class: "card__body" }, Q = { class: "card__main" }, W = ["href", "ta
182
181
  class: "card__title-link",
183
182
  to: t.titleTo,
184
183
  ref_key: "link",
185
- ref: y
184
+ ref: v
186
185
  }, {
187
186
  default: S(() => [
188
187
  i(l.$slots, "title", {}, () => [
@@ -196,22 +195,22 @@ const K = { class: "card__body" }, Q = { class: "card__main" }, W = ["href", "ta
196
195
  href: t.titleHref,
197
196
  target: t.titleTarget,
198
197
  ref_key: "link",
199
- ref: y
198
+ ref: v
200
199
  }, [
201
200
  i(l.$slots, "title", {}, () => [
202
201
  C(x(t.title), 1)
203
202
  ])
204
- ], 8, W)) : i(l.$slots, "title", { key: 2 }, () => [
203
+ ], 8, Q)) : i(l.$slots, "title", { key: 2 }, () => [
205
204
  C(x(t.title), 1)
206
205
  ])
207
206
  ]),
208
207
  _: 3
209
- }, 8, ["class"])) : g("", !0),
208
+ }, 8, ["class"])) : y("", !0),
210
209
  i(l.$slots, "body")
211
210
  ]),
212
- n(s).aside ? (a(), m("div", X, [
211
+ n(s).aside ? (a(), m("div", W, [
213
212
  i(l.$slots, "aside")
214
- ])) : g("", !0)
213
+ ])) : y("", !0)
215
214
  ]),
216
215
  n(s).image || b.value ? (a(), m("div", {
217
216
  key: 0,
@@ -221,17 +220,17 @@ const K = { class: "card__body" }, Q = { class: "card__main" }, W = ["href", "ta
221
220
  ]])
222
221
  }, [
223
222
  i(l.$slots, "image", {}, () => [
224
- I(J, q(L(b.value)), null, 16)
223
+ A(G, I(q(b.value)), null, 16)
225
224
  ])
226
- ], 2)) : g("", !0),
227
- n(s).footer ? (a(), m("div", Y, [
225
+ ], 2)) : y("", !0),
226
+ n(s).footer ? (a(), m("div", X, [
228
227
  i(l.$slots, "footer")
229
- ])) : g("", !0)
228
+ ])) : y("", !0)
230
229
  ]),
231
230
  _: 3
232
231
  }, 40, ["class", "style", "target", "to", "href", "data-ulu-proxy-click-init"]));
233
232
  }
234
233
  };
235
234
  export {
236
- oe as default
235
+ le as default
237
236
  };
@@ -4,12 +4,4 @@
4
4
  * @returns {Boolean} Whether all are objects within
5
5
  */
6
6
  export function isArrayOfObjects(array: any[]): boolean;
7
- /**
8
- * Logs a deprecation warning for a component prop in non-production environments.
9
- * @param {String} componentName The name of the component using the deprecated prop.
10
- * @param {Object} props The component's props object.
11
- * @param {String} oldProp The name of the deprecated prop.
12
- * @param {String} newProp The name of the new prop to use instead.
13
- */
14
- export function warnDeprecatedProp(componentName: string, props: Object, oldProp: string, newProp: string): void;
15
7
  //# sourceMappingURL=props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../lib/utils/props.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wDAEC;AAED;;;;;;GAMG;AACH,iEAJW,MAAM,0CAQhB"}
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../lib/utils/props.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wDAEC"}
@@ -1,10 +1,6 @@
1
1
  function t(e) {
2
- return e.every((n) => typeof n == "object");
3
- }
4
- function i(e, n, r, o) {
5
- n[r] !== void 0 && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn(`[${e}]: Prop '${r}' is deprecated and will be removed in future, Use '${o}' instead`);
2
+ return e.every((r) => typeof r == "object");
6
3
  }
7
4
  export {
8
- t as isArrayOfObjects,
9
- i as warnDeprecatedProp
5
+ t as isArrayOfObjects
10
6
  };
package/dist/vite.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export namespace uluTransformAssetUrls {
2
2
  let UluImage: string[];
3
3
  let UluImageSource: string[];
4
+ let UluCard: string[];
4
5
  }
5
6
  //# sourceMappingURL=vite.d.ts.map
package/dist/vite.js CHANGED
@@ -1,7 +1,8 @@
1
- const s = {
1
+ const r = {
2
2
  UluImage: ["src"],
3
- UluImageSource: ["srcset"]
3
+ UluImageSource: ["srcset"],
4
+ UluCard: ["imageSrc"]
4
5
  };
5
6
  export {
6
- s as uluTransformAssetUrls
7
+ r as uluTransformAssetUrls
7
8
  };
@@ -83,7 +83,6 @@
83
83
  import { RouterLink } from "vue-router";
84
84
  import { useModifiers } from "../../composables/useModifiers.js";
85
85
  import { refToElement } from '../../utils/dom.js';
86
- import { warnDeprecatedProp } from '../../utils/props.js';
87
86
  import UluImage from './UluImage.vue';
88
87
 
89
88
  const props = defineProps({
@@ -158,17 +157,17 @@
158
157
  default: () => ({})
159
158
  },
160
159
  /**
161
- * Unified image prop configuration passed to UluImage. Can be a string (src) or an object matching UluImage props.
160
+ * Advanced configuration for the underlying `<UluImage>` component.
161
+ * Accepts a full configuration object (e.g., for lazy loading, srcset, etc.).
162
162
  */
163
- image: [String, Object],
163
+ image: Object,
164
164
  /**
165
- * This is deprecated and will be removed in future version use "image" prop or image slot
166
- * @deprecated Use `image` instead.
165
+ * Convenience prop for quickly setting the image source.
166
+ * For advanced image configurations, use the `image` prop or `#image` slot instead.
167
167
  */
168
168
  imageSrc: String,
169
169
  /**
170
- * This is deprecated and will be removed in future version use "image" prop or image slot
171
- * @deprecated Use `image` (as an object with `alt`) instead.
170
+ * The alt text for the image when using the `imageSrc` convenience prop.
172
171
  */
173
172
  imageAlt: String,
174
173
  /**
@@ -205,16 +204,8 @@
205
204
  console.warn("UluCard: 'titleTo'/'titleHref' should not be used with 'to'/'href'.");
206
205
  }
207
206
 
208
- // Deprecation Warnings
209
- // - Note these should be removed in the next minor or maybe major release
210
- warnDeprecatedProp('UluCard', props, 'imageSrc', 'image');
211
- warnDeprecatedProp('UluCard', props, 'imageAlt', 'image');
212
-
213
207
  const resolvedImage = computed(() => {
214
208
  if (props.image) {
215
- if (typeof props.image === 'string') {
216
- return { src: props.image };
217
- }
218
209
  return props.image;
219
210
  } else if (props.imageSrc) {
220
211
  return {
@@ -5,17 +5,4 @@
5
5
  */
6
6
  export function isArrayOfObjects(array) {
7
7
  return array.every(item => typeof item === "object");
8
- }
9
-
10
- /**
11
- * Logs a deprecation warning for a component prop in non-production environments.
12
- * @param {String} componentName The name of the component using the deprecated prop.
13
- * @param {Object} props The component's props object.
14
- * @param {String} oldProp The name of the deprecated prop.
15
- * @param {String} newProp The name of the new prop to use instead.
16
- */
17
- export function warnDeprecatedProp(componentName, props, oldProp, newProp) {
18
- if (props[oldProp] !== undefined && typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
19
- console.warn(`[${ componentName }]: Prop '${ oldProp }' is deprecated and will be removed in future, Use '${ newProp }' instead`);
20
- }
21
8
  }
package/lib/vite.js CHANGED
@@ -21,5 +21,6 @@
21
21
 
22
22
  export const uluTransformAssetUrls = {
23
23
  UluImage: ['src'],
24
- UluImageSource: ['srcset']
24
+ UluImageSource: ['srcset'],
25
+ UluCard: ['imageSrc']
25
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulu/frontend-vue",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "A modular, tree-shakeable Vue 3 component library for the Ulu Frontend theming system, plus general utilities for Vue development",
5
5
  "type": "module",
6
6
  "files": [