@ulu/frontend-vue 0.5.5 → 0.5.7
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/elements/UluCard.vue.d.ts +2 -0
- package/dist/components/elements/UluCard.vue.d.ts.map +1 -1
- package/dist/components/elements/UluCard.vue.js +76 -68
- package/dist/components/elements/UluImage.vue.d.ts +14 -2
- package/dist/components/elements/UluImage.vue.d.ts.map +1 -1
- package/dist/components/elements/UluImage.vue.js +11 -9
- package/dist/components/elements/UluImageSource.vue.d.ts +10 -0
- package/dist/components/elements/UluImageSource.vue.d.ts.map +1 -0
- package/dist/components/elements/UluImageSource.vue.js +31 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/utils/UluPlaceholderImage.vue.d.ts +1 -1
- package/dist/components/utils/UluPlaceholderImage.vue.js +10 -9
- package/dist/index.js +178 -176
- package/dist/utils/props.d.ts +8 -0
- package/dist/utils/props.d.ts.map +1 -1
- package/dist/utils/props.js +6 -2
- package/dist/vite.d.ts +5 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +7 -0
- package/lib/components/elements/UluCard.vue +32 -4
- package/lib/components/elements/UluImage.vue +5 -2
- package/lib/components/elements/UluImageSource.vue +30 -0
- package/lib/components/index.js +1 -0
- package/lib/components/utils/UluPlaceholderImage.vue +2 -1
- package/lib/utils/props.js +13 -0
- package/lib/vite.js +25 -0
- package/package.json +1 -1
|
@@ -22,6 +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
26
|
imageSrc?: string | undefined;
|
|
26
27
|
imageAlt?: string | undefined;
|
|
27
28
|
$props: {
|
|
@@ -42,6 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
|
42
43
|
readonly titleTo?: string | Record<string, any> | undefined;
|
|
43
44
|
readonly titleHref?: string | undefined;
|
|
44
45
|
readonly titleTarget?: string | undefined;
|
|
46
|
+
readonly image?: string | Record<string, any> | undefined;
|
|
45
47
|
readonly imageSrc?: string | undefined;
|
|
46
48
|
readonly imageAlt?: string | undefined;
|
|
47
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluCard.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluCard.vue"],"names":[],"mappings":"AA+EA;
|
|
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,14 +1,16 @@
|
|
|
1
|
-
import { useSlots as
|
|
2
|
-
import { RouterLink as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { refToElement as
|
|
5
|
-
|
|
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";
|
|
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 = {
|
|
6
8
|
key: 0,
|
|
7
9
|
class: "card__aside"
|
|
8
|
-
},
|
|
10
|
+
}, Y = {
|
|
9
11
|
key: 1,
|
|
10
12
|
class: "card__footer"
|
|
11
|
-
},
|
|
13
|
+
}, oe = {
|
|
12
14
|
__name: "UluCard",
|
|
13
15
|
props: {
|
|
14
16
|
/**
|
|
@@ -82,11 +84,17 @@ const q = { class: "card__body" }, L = { class: "card__main" }, F = ["href", "ta
|
|
|
82
84
|
default: () => ({})
|
|
83
85
|
},
|
|
84
86
|
/**
|
|
85
|
-
*
|
|
87
|
+
* Unified image prop configuration passed to UluImage. Can be a string (src) or an object matching UluImage props.
|
|
88
|
+
*/
|
|
89
|
+
image: [String, Object],
|
|
90
|
+
/**
|
|
91
|
+
* This is deprecated and will be removed in future version use "image" prop or image slot
|
|
92
|
+
* @deprecated Use `image` instead.
|
|
86
93
|
*/
|
|
87
94
|
imageSrc: String,
|
|
88
95
|
/**
|
|
89
|
-
*
|
|
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.
|
|
90
98
|
*/
|
|
91
99
|
imageAlt: String,
|
|
92
100
|
/**
|
|
@@ -112,118 +120,118 @@ const q = { class: "card__body" }, L = { class: "card__main" }, F = ["href", "ta
|
|
|
112
120
|
modifiers: [Array, String]
|
|
113
121
|
},
|
|
114
122
|
emits: ["proxy-click"],
|
|
115
|
-
setup(
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
const
|
|
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 ? {
|
|
127
|
+
src: e.imageSrc,
|
|
128
|
+
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(() => ({
|
|
119
130
|
selectorPrevent: "input, select, textarea, button, a, [tabindex='-1']",
|
|
120
131
|
mousedownDurationPrevent: 250,
|
|
121
|
-
...
|
|
122
|
-
})), j = r(() => u.value ? "pointer" : null), D = r(() =>
|
|
123
|
-
function
|
|
124
|
-
if (!
|
|
125
|
-
const { selectorPrevent: o } =
|
|
126
|
-
c.value = !1, l.closest(o) || (c.value = !0,
|
|
132
|
+
...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);
|
|
127
138
|
}
|
|
128
|
-
function
|
|
129
|
-
if (!
|
|
130
|
-
const { mousedownDurationPrevent: d } =
|
|
131
|
-
if (l -
|
|
132
|
-
if (
|
|
133
|
-
const o =
|
|
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);
|
|
134
145
|
o ? o.click() : console.warn("Unable to resolve title link ref");
|
|
135
|
-
} else if (
|
|
146
|
+
} else if (U.value) {
|
|
136
147
|
const o = T.value?.querySelector("[data-ulu-card-proxy-target]");
|
|
137
|
-
o ? o.click() :
|
|
148
|
+
o ? o.click() : H("proxy-click");
|
|
138
149
|
}
|
|
139
150
|
}
|
|
140
151
|
c.value = !1;
|
|
141
152
|
}
|
|
142
|
-
return (l, d) => (a(), k(
|
|
153
|
+
return (l, d) => (a(), k(z(D.value), {
|
|
143
154
|
ref_key: "cardRoot",
|
|
144
155
|
ref: T,
|
|
145
156
|
class: h(["card", [
|
|
146
157
|
{
|
|
147
|
-
"card--horizontal":
|
|
148
|
-
"card--horizontal-center":
|
|
149
|
-
"card--overlay":
|
|
158
|
+
"card--horizontal": t.horizontal || t.horizontalCenter,
|
|
159
|
+
"card--horizontal-center": t.horizontalCenter,
|
|
160
|
+
"card--overlay": t.overlay
|
|
150
161
|
},
|
|
151
|
-
n(
|
|
162
|
+
n(M)
|
|
152
163
|
]]),
|
|
153
|
-
onMousedown:
|
|
154
|
-
onMouseup:
|
|
155
|
-
style:
|
|
156
|
-
target:
|
|
157
|
-
to:
|
|
158
|
-
href:
|
|
159
|
-
"data-ulu-proxy-click-init":
|
|
164
|
+
onMousedown: A,
|
|
165
|
+
onMouseup: N,
|
|
166
|
+
style: V({ cursor: j.value }),
|
|
167
|
+
target: t.target,
|
|
168
|
+
to: t.to,
|
|
169
|
+
href: t.href,
|
|
170
|
+
"data-ulu-proxy-click-init": v.value
|
|
160
171
|
}, {
|
|
161
172
|
default: S(() => [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
173
|
+
$("div", K, [
|
|
174
|
+
$("div", Q, [
|
|
175
|
+
t.title || n(s).title ? (a(), k(z(t.titleElement), {
|
|
165
176
|
key: 0,
|
|
166
|
-
class: h(["card__title",
|
|
177
|
+
class: h(["card__title", t.classes.title])
|
|
167
178
|
}, {
|
|
168
179
|
default: S(() => [
|
|
169
|
-
|
|
180
|
+
t.titleTo ? (a(), k(n(B), {
|
|
170
181
|
key: 0,
|
|
171
182
|
class: "card__title-link",
|
|
172
|
-
to:
|
|
183
|
+
to: t.titleTo,
|
|
173
184
|
ref_key: "link",
|
|
174
|
-
ref:
|
|
185
|
+
ref: y
|
|
175
186
|
}, {
|
|
176
187
|
default: S(() => [
|
|
177
188
|
i(l.$slots, "title", {}, () => [
|
|
178
|
-
x(
|
|
189
|
+
C(x(t.title), 1)
|
|
179
190
|
])
|
|
180
191
|
]),
|
|
181
192
|
_: 3
|
|
182
|
-
}, 8, ["to"])) :
|
|
193
|
+
}, 8, ["to"])) : t.titleHref ? (a(), m("a", {
|
|
183
194
|
key: 1,
|
|
184
195
|
class: "card__title-link",
|
|
185
|
-
href:
|
|
186
|
-
target:
|
|
196
|
+
href: t.titleHref,
|
|
197
|
+
target: t.titleTarget,
|
|
187
198
|
ref_key: "link",
|
|
188
|
-
ref:
|
|
199
|
+
ref: y
|
|
189
200
|
}, [
|
|
190
201
|
i(l.$slots, "title", {}, () => [
|
|
191
|
-
x(
|
|
202
|
+
C(x(t.title), 1)
|
|
192
203
|
])
|
|
193
|
-
], 8,
|
|
194
|
-
x(
|
|
204
|
+
], 8, W)) : i(l.$slots, "title", { key: 2 }, () => [
|
|
205
|
+
C(x(t.title), 1)
|
|
195
206
|
])
|
|
196
207
|
]),
|
|
197
208
|
_: 3
|
|
198
|
-
}, 8, ["class"])) :
|
|
209
|
+
}, 8, ["class"])) : g("", !0),
|
|
199
210
|
i(l.$slots, "body")
|
|
200
211
|
]),
|
|
201
|
-
n(s).aside ? (a(), m("div",
|
|
212
|
+
n(s).aside ? (a(), m("div", X, [
|
|
202
213
|
i(l.$slots, "aside")
|
|
203
|
-
])) :
|
|
214
|
+
])) : g("", !0)
|
|
204
215
|
]),
|
|
205
|
-
n(s).image ||
|
|
216
|
+
n(s).image || b.value ? (a(), m("div", {
|
|
206
217
|
key: 0,
|
|
207
218
|
class: h(["card__image", [
|
|
208
|
-
{ "card__image--icon":
|
|
209
|
-
|
|
219
|
+
{ "card__image--icon": t.imageIcon },
|
|
220
|
+
t.classes.image
|
|
210
221
|
]])
|
|
211
222
|
}, [
|
|
212
223
|
i(l.$slots, "image", {}, () => [
|
|
213
|
-
|
|
214
|
-
src: e.imageSrc,
|
|
215
|
-
alt: e.imageAlt
|
|
216
|
-
}, null, 8, J)
|
|
224
|
+
I(J, q(L(b.value)), null, 16)
|
|
217
225
|
])
|
|
218
|
-
], 2)) :
|
|
219
|
-
n(s).footer ? (a(), m("div",
|
|
226
|
+
], 2)) : g("", !0),
|
|
227
|
+
n(s).footer ? (a(), m("div", Y, [
|
|
220
228
|
i(l.$slots, "footer")
|
|
221
|
-
])) :
|
|
229
|
+
])) : g("", !0)
|
|
222
230
|
]),
|
|
223
231
|
_: 3
|
|
224
232
|
}, 40, ["class", "style", "target", "to", "href", "data-ulu-proxy-click-init"]));
|
|
225
233
|
}
|
|
226
234
|
};
|
|
227
235
|
export {
|
|
228
|
-
|
|
236
|
+
oe as default
|
|
229
237
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
2
7
|
classes: Record<string, any>;
|
|
3
8
|
alt: string;
|
|
4
9
|
src: string;
|
|
@@ -10,5 +15,12 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
10
15
|
readonly sources?: unknown[] | undefined;
|
|
11
16
|
};
|
|
12
17
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
13
|
-
|
|
18
|
+
type __VLS_TemplateResult = {
|
|
19
|
+
attrs: Partial<{}>;
|
|
20
|
+
slots: {
|
|
21
|
+
default?(_: {}): any;
|
|
22
|
+
};
|
|
23
|
+
refs: {};
|
|
24
|
+
rootEl: any;
|
|
25
|
+
};
|
|
14
26
|
//# sourceMappingURL=UluImage.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluImage.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluImage.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UluImage.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluImage.vue"],"names":[],"mappings":"AAwBA;wBA2KqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAVjC;;;;;;;;;;;2OAOG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
|
|
1
|
+
import { createElementBlock as r, openBlock as s, normalizeClass as n, renderSlot as u, createElementVNode as i, Fragment as m, renderList as o, createBlock as f, mergeProps as l } from "vue";
|
|
2
|
+
import d from "./UluImageSource.vue.js";
|
|
3
|
+
const g = ["src", "alt"], y = ["src", "alt"], B = /* @__PURE__ */ Object.assign({
|
|
3
4
|
inheritAttrs: !1
|
|
4
5
|
}, {
|
|
5
6
|
__name: "UluImage",
|
|
@@ -30,24 +31,25 @@ const o = ["src", "alt"], g = ["src", "alt"], y = /* @__PURE__ */ Object.assign(
|
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
setup(e) {
|
|
33
|
-
return (
|
|
34
|
+
return (t, k) => e.sources?.length || t.$slots.default ? (s(), r("picture", {
|
|
34
35
|
key: 0,
|
|
35
36
|
class: n(e.classes?.picture)
|
|
36
37
|
}, [
|
|
37
|
-
(
|
|
38
|
-
|
|
38
|
+
u(t.$slots, "default"),
|
|
39
|
+
(s(!0), r(m, null, o(e.sources, (a, c) => (s(), f(d, l({ key: c }, { ref_for: !0 }, a), null, 16))), 128)),
|
|
40
|
+
i("img", l({
|
|
39
41
|
src: e.src,
|
|
40
42
|
alt: e.alt,
|
|
41
43
|
class: e.classes?.img
|
|
42
|
-
},
|
|
43
|
-
], 2)) : (s(),
|
|
44
|
+
}, t.$attrs), null, 16, g)
|
|
45
|
+
], 2)) : (s(), r("img", l({
|
|
44
46
|
key: 1,
|
|
45
47
|
src: e.src,
|
|
46
48
|
alt: e.alt,
|
|
47
49
|
class: e.classes?.img
|
|
48
|
-
},
|
|
50
|
+
}, t.$attrs), null, 16, y));
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
B as default
|
|
53
55
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
srcset: string;
|
|
3
|
+
media?: string | undefined;
|
|
4
|
+
$props: {
|
|
5
|
+
readonly srcset?: string | undefined;
|
|
6
|
+
readonly media?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=UluImageSource.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluImageSource.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluImageSource.vue"],"names":[],"mappings":"AAOA;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createElementBlock as r, openBlock as s, mergeProps as a } from "vue";
|
|
2
|
+
const c = ["srcset", "media"], o = /* @__PURE__ */ Object.assign({
|
|
3
|
+
inheritAttrs: !1
|
|
4
|
+
}, {
|
|
5
|
+
__name: "UluImageSource",
|
|
6
|
+
props: {
|
|
7
|
+
/**
|
|
8
|
+
* Source set (e.g. image paths)
|
|
9
|
+
*/
|
|
10
|
+
srcset: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: !0
|
|
13
|
+
},
|
|
14
|
+
/**
|
|
15
|
+
* Media query (e.g. (min-width: 600px))
|
|
16
|
+
*/
|
|
17
|
+
media: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: void 0
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(e) {
|
|
23
|
+
return (t, n) => (s(), r("source", a({
|
|
24
|
+
srcset: e.srcset,
|
|
25
|
+
media: e.media
|
|
26
|
+
}, t.$attrs), null, 16, c));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
o as default
|
|
31
|
+
};
|
|
@@ -23,6 +23,7 @@ export { default as UluDefinitionListItem } from './elements/UluDefinitionListIt
|
|
|
23
23
|
export { default as UluExternalLink } from './elements/UluExternalLink.vue';
|
|
24
24
|
export { default as UluIcon } from './elements/UluIcon.vue';
|
|
25
25
|
export { default as UluImage } from './elements/UluImage.vue';
|
|
26
|
+
export { default as UluImageSource } from './elements/UluImageSource.vue';
|
|
26
27
|
export { default as UluList } from './elements/UluList.vue';
|
|
27
28
|
export { default as UluListItem } from './elements/UluListItem.vue';
|
|
28
29
|
export { default as UluCounterList } from './elements/UluCounterList.vue';
|
|
@@ -11,6 +11,6 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
11
11
|
readonly alt?: string | undefined;
|
|
12
12
|
readonly imageId?: string | undefined;
|
|
13
13
|
};
|
|
14
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
14
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
15
15
|
export default _default;
|
|
16
16
|
//# sourceMappingURL=UluPlaceholderImage.vue.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { randomInt as
|
|
3
|
-
|
|
1
|
+
import { computed as o, createBlock as m, openBlock as d } from "vue";
|
|
2
|
+
import { randomInt as n } from "@ulu/utils/random.js";
|
|
3
|
+
import h from "../elements/UluImage.vue.js";
|
|
4
|
+
const g = {
|
|
4
5
|
__name: "UluPlaceholderImage",
|
|
5
6
|
props: {
|
|
6
7
|
imageId: String,
|
|
@@ -28,17 +29,17 @@ const s = ["src", "alt"], g = {
|
|
|
28
29
|
random: Boolean
|
|
29
30
|
},
|
|
30
31
|
setup(e) {
|
|
31
|
-
const t = e, a =
|
|
32
|
-
width:
|
|
33
|
-
height:
|
|
34
|
-
} : { width: t.width, height: t.height }), c =
|
|
32
|
+
const t = e, a = o(() => t.random ? {
|
|
33
|
+
width: n(500, 1e3),
|
|
34
|
+
height: n(500, 1e3)
|
|
35
|
+
} : { width: t.width, height: t.height }), c = o(() => {
|
|
35
36
|
const { width: r, height: i } = a.value;
|
|
36
37
|
return `https://picsum.photos/${t.imageId ? `id/${t.imageId}/` : ""}${r}/${i}`;
|
|
37
38
|
});
|
|
38
|
-
return (r, i) => (
|
|
39
|
+
return (r, i) => (d(), m(h, {
|
|
39
40
|
src: c.value,
|
|
40
41
|
alt: e.alt
|
|
41
|
-
}, null, 8,
|
|
42
|
+
}, null, 8, ["src", "alt"]));
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
45
|
export {
|
package/dist/index.js
CHANGED
|
@@ -8,11 +8,11 @@ import { default as U } from "./plugins/breakpoints/index.js";
|
|
|
8
8
|
import { default as n } from "./components/collapsible/UluAccordion.vue.js";
|
|
9
9
|
import { default as S } from "./components/collapsible/UluAccordionGroup.vue.js";
|
|
10
10
|
import { default as T } from "./components/collapsible/UluCollapsible.vue.js";
|
|
11
|
-
import { default as
|
|
11
|
+
import { default as g } from "./components/collapsible/UluDropdown.vue.js";
|
|
12
12
|
import { default as h } from "./components/collapsible/UluModal.vue.js";
|
|
13
13
|
import { default as P } from "./components/collapsible/UluOverflowPopover.vue.js";
|
|
14
14
|
import { default as C } from "./components/collapsible/UluTab.vue.js";
|
|
15
|
-
import { default as
|
|
15
|
+
import { default as v } from "./components/collapsible/UluTabGroup.vue.js";
|
|
16
16
|
import { default as R } from "./components/collapsible/UluTabList.vue.js";
|
|
17
17
|
import { default as w } from "./components/collapsible/UluTabPanel.vue.js";
|
|
18
18
|
import { default as D } from "./components/collapsible/UluTabPanels.vue.js";
|
|
@@ -30,209 +30,211 @@ import { default as te } from "./components/elements/UluDefinitionListItem.vue.j
|
|
|
30
30
|
import { default as le } from "./components/elements/UluExternalLink.vue.js";
|
|
31
31
|
import { default as fe } from "./components/elements/UluIcon.vue.js";
|
|
32
32
|
import { default as me } from "./components/elements/UluImage.vue.js";
|
|
33
|
-
import { default as de } from "./components/elements/
|
|
34
|
-
import { default as Ue } from "./components/elements/
|
|
35
|
-
import { default as ne } from "./components/elements/
|
|
36
|
-
import { default as Se } from "./components/elements/
|
|
37
|
-
import { default as Te } from "./components/elements/
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as he } from "./components/elements/
|
|
40
|
-
import { default as Pe } from "./components/elements/
|
|
41
|
-
import { default as Ce } from "./components/elements/
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as Re } from "./components/
|
|
44
|
-
import { default as we } from "./components/forms/
|
|
45
|
-
import { default as De } from "./components/forms/
|
|
46
|
-
import { default as Ee } from "./components/forms/
|
|
47
|
-
import { default as We } from "./components/forms/
|
|
48
|
-
import { default as He } from "./components/forms/
|
|
49
|
-
import { default as Ve } from "./components/forms/
|
|
50
|
-
import { default as ze } from "./components/forms/
|
|
51
|
-
import { default as Ke } from "./components/forms/
|
|
52
|
-
import { default as Xe } from "./components/forms/
|
|
53
|
-
import { default as Ze } from "./components/forms/
|
|
54
|
-
import { default as $e } from "./components/forms/
|
|
55
|
-
import { default as oo } from "./components/forms/
|
|
56
|
-
import { default as to } from "./components/forms/
|
|
57
|
-
import { default as lo } from "./components/forms/
|
|
58
|
-
import { default as fo } from "./components/forms/
|
|
59
|
-
import { default as mo } from "./components/
|
|
60
|
-
import { default as xo } from "./components/layout/
|
|
61
|
-
import { default as io } from "./components/layout/
|
|
62
|
-
import { default as co } from "./components/layout/
|
|
63
|
-
import { default as Fo } from "./components/
|
|
64
|
-
import { default as bo } from "./components/navigation/
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as ko } from "./components/navigation/
|
|
67
|
-
import { default as Lo } from "./components/navigation/
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as Mo } from "./components/utils/
|
|
71
|
-
import { default as Bo } from "./components/utils/
|
|
72
|
-
import { default as No } from "./components/utils/
|
|
73
|
-
import { default as Go } from "./components/utils/
|
|
74
|
-
import { default as qo } from "./components/utils/
|
|
75
|
-
import { default as Oo } from "./components/
|
|
76
|
-
import { default as jo } from "./components/visualizations/
|
|
77
|
-
import { default as Jo } from "./components/visualizations/
|
|
78
|
-
import { default as Qo } from "./components/
|
|
79
|
-
import { default as Yo } from "./components/systems/facets/
|
|
80
|
-
import { default as _o } from "./components/systems/facets/
|
|
81
|
-
import { default as er } from "./components/systems/facets/
|
|
82
|
-
import { default as rr } from "./components/systems/facets/
|
|
83
|
-
import { default as ar } from "./components/systems/facets/
|
|
84
|
-
import { default as ur } from "./components/systems/facets/
|
|
85
|
-
import { default as sr } from "./components/systems/facets/
|
|
86
|
-
import { default as pr } from "./components/systems/facets/
|
|
87
|
-
import { default as xr } from "./components/systems/facets/
|
|
88
|
-
import { default as ir } from "./components/systems/facets/
|
|
89
|
-
import { default as cr } from "./components/systems/
|
|
90
|
-
import { default as Fr } from "./components/systems/scroll-anchors/
|
|
91
|
-
import { default as br } from "./components/systems/scroll-anchors/
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as kr } from "./components/systems/scroll-anchors/
|
|
94
|
-
import { default as Lr } from "./components/systems/
|
|
95
|
-
import { default as
|
|
96
|
-
import { default as
|
|
97
|
-
import { default as Mr } from "./components/systems/skeleton/
|
|
98
|
-
import { default as Br } from "./components/systems/
|
|
99
|
-
import { default as Nr } from "./components/systems/table-sticky/
|
|
100
|
-
import { default as Gr } from "./components/systems/table-sticky/
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import { default as jr } from "./components/
|
|
104
|
-
import { default as Jr } from "./components/
|
|
105
|
-
import { default as Qr } from "./components/utils/
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
33
|
+
import { default as de } from "./components/elements/UluImageSource.vue.js";
|
|
34
|
+
import { default as Ue } from "./components/elements/UluList.vue.js";
|
|
35
|
+
import { default as ne } from "./components/elements/UluListItem.vue.js";
|
|
36
|
+
import { default as Se } from "./components/elements/UluCounterList.vue.js";
|
|
37
|
+
import { default as Te } from "./components/elements/UluOverflowScroller.vue.js";
|
|
38
|
+
import { default as ge } from "./components/elements/UluRule.vue.js";
|
|
39
|
+
import { default as he } from "./components/elements/UluScrollSlider.vue.js";
|
|
40
|
+
import { default as Pe } from "./components/elements/UluSlider.vue.js";
|
|
41
|
+
import { default as Ce } from "./components/elements/UluSpokeSpinner.vue.js";
|
|
42
|
+
import { default as ve } from "./components/elements/UluTable.vue.js";
|
|
43
|
+
import { default as Re } from "./components/elements/UluTag.vue.js";
|
|
44
|
+
import { default as we } from "./components/forms/UluSelectableMenu.vue.js";
|
|
45
|
+
import { default as De } from "./components/forms/UluFileDisplay.vue.js";
|
|
46
|
+
import { default as Ee } from "./components/forms/UluFormFile.vue.js";
|
|
47
|
+
import { default as We } from "./components/forms/UluFormMessage.vue.js";
|
|
48
|
+
import { default as He } from "./components/forms/UluFormSelect.vue.js";
|
|
49
|
+
import { default as Ve } from "./components/forms/UluFormText.vue.js";
|
|
50
|
+
import { default as ze } from "./components/forms/UluSearchForm.vue.js";
|
|
51
|
+
import { default as Ke } from "./components/forms/UluForm.vue.js";
|
|
52
|
+
import { default as Xe } from "./components/forms/UluFormActions.vue.js";
|
|
53
|
+
import { default as Ze } from "./components/forms/UluFormCheckbox.vue.js";
|
|
54
|
+
import { default as $e } from "./components/forms/UluFormFieldset.vue.js";
|
|
55
|
+
import { default as oo } from "./components/forms/UluFormItem.vue.js";
|
|
56
|
+
import { default as to } from "./components/forms/UluFormItemsInline.vue.js";
|
|
57
|
+
import { default as lo } from "./components/forms/UluFormRadio.vue.js";
|
|
58
|
+
import { default as fo } from "./components/forms/UluFormRequiredChar.vue.js";
|
|
59
|
+
import { default as mo } from "./components/forms/UluFormTextarea.vue.js";
|
|
60
|
+
import { default as xo } from "./components/layout/UluAdaptiveLayout.vue.js";
|
|
61
|
+
import { default as io } from "./components/layout/UluDataGrid.vue.js";
|
|
62
|
+
import { default as co } from "./components/layout/UluTitleRail.vue.js";
|
|
63
|
+
import { default as Fo } from "./components/layout/UluWhenBreakpoint.vue.js";
|
|
64
|
+
import { default as bo } from "./components/navigation/UluBreadcrumb.vue.js";
|
|
65
|
+
import { default as Ao } from "./components/navigation/UluMenu.vue.js";
|
|
66
|
+
import { default as ko } from "./components/navigation/UluMenuStack.vue.js";
|
|
67
|
+
import { default as Lo } from "./components/navigation/UluNavStrip.vue.js";
|
|
68
|
+
import { default as Io } from "./components/navigation/UluPager.vue.js";
|
|
69
|
+
import { default as yo } from "./components/utils/UluAction.vue.js";
|
|
70
|
+
import { default as Mo } from "./components/utils/UluConditionalText.vue.js";
|
|
71
|
+
import { default as Bo } from "./components/utils/UluConditionalWrapper.vue.js";
|
|
72
|
+
import { default as No } from "./components/utils/UluPlaceholderImage.vue.js";
|
|
73
|
+
import { default as Go } from "./components/utils/UluPlaceholderText.vue.js";
|
|
74
|
+
import { default as qo } from "./components/utils/UluRouteAnnouncer.vue.js";
|
|
75
|
+
import { default as Oo } from "./components/utils/UluSanityRichText.vue.js";
|
|
76
|
+
import { default as jo } from "./components/visualizations/UluAnimateNumber.vue.js";
|
|
77
|
+
import { default as Jo } from "./components/visualizations/UluProgressBar.vue.js";
|
|
78
|
+
import { default as Qo } from "./components/visualizations/UluProgressCircle.vue.js";
|
|
79
|
+
import { default as Yo } from "./components/systems/facets/UluFacetsActiveFilters.vue.js";
|
|
80
|
+
import { default as _o } from "./components/systems/facets/UluFacetsFilterLists.vue.js";
|
|
81
|
+
import { default as er } from "./components/systems/facets/UluFacetsFilterAccordions.vue.js";
|
|
82
|
+
import { default as rr } from "./components/systems/facets/UluFacetsFilterPopovers.vue.js";
|
|
83
|
+
import { default as ar } from "./components/systems/facets/UluFacetsFilterSelects.vue.js";
|
|
84
|
+
import { default as ur } from "./components/systems/facets/UluFacetsHeaderLayout.vue.js";
|
|
85
|
+
import { default as sr } from "./components/systems/facets/UluFacetsResults.vue.js";
|
|
86
|
+
import { default as pr } from "./components/systems/facets/UluFacetsSearch.vue.js";
|
|
87
|
+
import { default as xr } from "./components/systems/facets/UluFacetsSidebarLayout.vue.js";
|
|
88
|
+
import { default as ir } from "./components/systems/facets/UluFacetsSort.vue.js";
|
|
89
|
+
import { default as cr } from "./components/systems/facets/UluFacetsList.vue.js";
|
|
90
|
+
import { default as Fr } from "./components/systems/scroll-anchors/UluScrollAnchors.vue.js";
|
|
91
|
+
import { default as br } from "./components/systems/scroll-anchors/UluScrollAnchorsNav.vue.js";
|
|
92
|
+
import { default as Ar } from "./components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.js";
|
|
93
|
+
import { default as kr } from "./components/systems/scroll-anchors/UluScrollAnchorsSection.vue.js";
|
|
94
|
+
import { default as Lr } from "./components/systems/scroll-anchors/UluScrollAnchorsHeadlessSection.vue.js";
|
|
95
|
+
import { default as Ir } from "./components/systems/skeleton/UluShowSkeleton.vue.js";
|
|
96
|
+
import { default as yr } from "./components/systems/skeleton/UluSkeletonContent.vue.js";
|
|
97
|
+
import { default as Mr } from "./components/systems/skeleton/UluSkeletonMedia.vue.js";
|
|
98
|
+
import { default as Br } from "./components/systems/skeleton/UluSkeletonText.vue.js";
|
|
99
|
+
import { default as Nr } from "./components/systems/table-sticky/UluTableSticky.vue.js";
|
|
100
|
+
import { default as Gr } from "./components/systems/table-sticky/UluTableStickyRows.vue.js";
|
|
101
|
+
import { default as qr } from "./components/systems/table-sticky/UluTableStickyTable.vue.js";
|
|
102
|
+
import { useTooltip as Or } from "./plugins/popovers/useTooltip.js";
|
|
103
|
+
import { default as jr } from "./components/elements/UluMain.vue.js";
|
|
104
|
+
import { default as Jr } from "./components/navigation/UluSkipLink.vue.js";
|
|
105
|
+
import { default as Qr } from "./components/utils/UluEmpty.vue.js";
|
|
106
|
+
import { default as Yr } from "./components/utils/UluEmptyView.vue.js";
|
|
107
|
+
import { useFacets as _r } from "./components/systems/facets/useFacets.js";
|
|
108
|
+
import { useScrollAnchors as et } from "./components/systems/scroll-anchors/useScrollAnchors.js";
|
|
109
|
+
import { useScrollAnchorSection as rt } from "./components/systems/scroll-anchors/useScrollAnchorSection.js";
|
|
110
|
+
import { useScrollAnchorSections as at } from "./components/systems/scroll-anchors/useScrollAnchorSections.js";
|
|
111
|
+
import { useIcon as ut } from "./composables/useIcon.js";
|
|
112
|
+
import { useModifiers as st } from "./composables/useModifiers.js";
|
|
113
|
+
import { useWindowResize as pt } from "./composables/useWindowResize.js";
|
|
114
|
+
import { useRequiredInject as xt } from "./composables/useRequiredInject.js";
|
|
115
|
+
import { useBreakpointManager as it } from "./composables/useBreakpointManager.js";
|
|
116
|
+
import { usePagination as ct } from "./composables/usePagination.js";
|
|
117
|
+
import { useDocumentTitle as Ft } from "./composables/useDocumentTitle.js";
|
|
118
|
+
import { useUluFloating as bt } from "./composables/useUluFloating.js";
|
|
119
|
+
import { useTableData as At } from "./composables/useTableData.js";
|
|
119
120
|
export {
|
|
120
121
|
n as UluAccordion,
|
|
121
122
|
S as UluAccordionGroup,
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
yo as UluAction,
|
|
124
|
+
xo as UluAdaptiveLayout,
|
|
124
125
|
E as UluAlert,
|
|
125
|
-
|
|
126
|
+
jo as UluAnimateNumber,
|
|
126
127
|
W as UluBadge,
|
|
127
128
|
H as UluBadgeStack,
|
|
128
|
-
|
|
129
|
+
bo as UluBreadcrumb,
|
|
129
130
|
V as UluButton,
|
|
130
131
|
z as UluButtonVerbose,
|
|
131
132
|
K as UluCallout,
|
|
132
133
|
X as UluCaptionedFigure,
|
|
133
134
|
Z as UluCard,
|
|
134
135
|
T as UluCollapsible,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
Mo as UluConditionalText,
|
|
137
|
+
Bo as UluConditionalWrapper,
|
|
138
|
+
Se as UluCounterList,
|
|
139
|
+
io as UluDataGrid,
|
|
139
140
|
$ as UluDataTable,
|
|
140
141
|
oe as UluDefinitionList,
|
|
141
142
|
te as UluDefinitionListItem,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
g as UluDropdown,
|
|
144
|
+
Qr as UluEmpty,
|
|
145
|
+
Yr as UluEmptyView,
|
|
145
146
|
le as UluExternalLink,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
147
|
+
Yo as UluFacetsActiveFilters,
|
|
148
|
+
er as UluFacetsFilterAccordions,
|
|
149
|
+
_o as UluFacetsFilterLists,
|
|
150
|
+
rr as UluFacetsFilterPopovers,
|
|
151
|
+
ar as UluFacetsFilterSelects,
|
|
152
|
+
ur as UluFacetsHeaderLayout,
|
|
153
|
+
cr as UluFacetsList,
|
|
154
|
+
sr as UluFacetsResults,
|
|
155
|
+
pr as UluFacetsSearch,
|
|
156
|
+
xr as UluFacetsSidebarLayout,
|
|
157
|
+
ir as UluFacetsSort,
|
|
158
|
+
De as UluFileDisplay,
|
|
159
|
+
Ke as UluForm,
|
|
160
|
+
Xe as UluFormActions,
|
|
161
|
+
Ze as UluFormCheckbox,
|
|
162
|
+
$e as UluFormFieldset,
|
|
163
|
+
Ee as UluFormFile,
|
|
164
|
+
oo as UluFormItem,
|
|
165
|
+
to as UluFormItemsInline,
|
|
166
|
+
We as UluFormMessage,
|
|
167
|
+
lo as UluFormRadio,
|
|
168
|
+
fo as UluFormRequiredChar,
|
|
169
|
+
He as UluFormSelect,
|
|
170
|
+
Ve as UluFormText,
|
|
171
|
+
mo as UluFormTextarea,
|
|
171
172
|
fe as UluIcon,
|
|
172
173
|
me as UluImage,
|
|
173
|
-
de as
|
|
174
|
-
Ue as
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
de as UluImageSource,
|
|
175
|
+
Ue as UluList,
|
|
176
|
+
ne as UluListItem,
|
|
177
|
+
jr as UluMain,
|
|
178
|
+
Ao as UluMenu,
|
|
179
|
+
ko as UluMenuStack,
|
|
178
180
|
h as UluModal,
|
|
179
|
-
|
|
181
|
+
Lo as UluNavStrip,
|
|
180
182
|
P as UluOverflowPopover,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
183
|
+
Te as UluOverflowScroller,
|
|
184
|
+
Io as UluPager,
|
|
185
|
+
No as UluPlaceholderImage,
|
|
186
|
+
Go as UluPlaceholderText,
|
|
187
|
+
Jo as UluProgressBar,
|
|
188
|
+
Qo as UluProgressCircle,
|
|
189
|
+
qo as UluRouteAnnouncer,
|
|
190
|
+
ge as UluRule,
|
|
191
|
+
Oo as UluSanityRichText,
|
|
192
|
+
Fr as UluScrollAnchors,
|
|
193
|
+
Lr as UluScrollAnchorsHeadlessSection,
|
|
194
|
+
br as UluScrollAnchorsNav,
|
|
195
|
+
Ar as UluScrollAnchorsNavAnimated,
|
|
196
|
+
kr as UluScrollAnchorsSection,
|
|
197
|
+
he as UluScrollSlider,
|
|
198
|
+
ze as UluSearchForm,
|
|
199
|
+
we as UluSelectableMenu,
|
|
200
|
+
Ir as UluShowSkeleton,
|
|
201
|
+
yr as UluSkeletonContent,
|
|
202
|
+
Mr as UluSkeletonMedia,
|
|
203
|
+
Br as UluSkeletonText,
|
|
204
|
+
Jr as UluSkipLink,
|
|
205
|
+
Pe as UluSlider,
|
|
206
|
+
Ce as UluSpokeSpinner,
|
|
205
207
|
C as UluTab,
|
|
206
|
-
|
|
208
|
+
v as UluTabGroup,
|
|
207
209
|
R as UluTabList,
|
|
208
210
|
w as UluTabPanel,
|
|
209
211
|
D as UluTabPanels,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
ve as UluTable,
|
|
213
|
+
Nr as UluTableSticky,
|
|
214
|
+
Gr as UluTableStickyRows,
|
|
215
|
+
qr as UluTableStickyTable,
|
|
216
|
+
Re as UluTag,
|
|
217
|
+
co as UluTitleRail,
|
|
218
|
+
Fo as UluWhenBreakpoint,
|
|
217
219
|
U as breakpointsPlugin,
|
|
218
220
|
t as corePlugin,
|
|
219
221
|
m as modalsPlugin,
|
|
220
222
|
l as popoversPlugin,
|
|
221
223
|
d as toastPlugin,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
224
|
+
it as useBreakpointManager,
|
|
225
|
+
Ft as useDocumentTitle,
|
|
226
|
+
_r as useFacets,
|
|
227
|
+
ut as useIcon,
|
|
228
|
+
st as useModifiers,
|
|
229
|
+
ct as usePagination,
|
|
230
|
+
xt as useRequiredInject,
|
|
231
|
+
rt as useScrollAnchorSection,
|
|
232
|
+
at as useScrollAnchorSections,
|
|
233
|
+
et as useScrollAnchors,
|
|
234
|
+
At as useTableData,
|
|
235
|
+
Or as useTooltip,
|
|
234
236
|
f as useTooltipFollow,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
+
bt as useUluFloating,
|
|
238
|
+
pt as useWindowResize,
|
|
237
239
|
e as utils
|
|
238
240
|
};
|
package/dist/utils/props.d.ts
CHANGED
|
@@ -4,4 +4,12 @@
|
|
|
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;
|
|
7
15
|
//# 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"}
|
|
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"}
|
package/dist/utils/props.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
function t(e) {
|
|
2
|
-
return e.every((
|
|
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`);
|
|
3
6
|
}
|
|
4
7
|
export {
|
|
5
|
-
t as isArrayOfObjects
|
|
8
|
+
t as isArrayOfObjects,
|
|
9
|
+
i as warnDeprecatedProp
|
|
6
10
|
};
|
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../lib/vite.js"],"names":[],"mappings":""}
|
package/dist/vite.js
ADDED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
63
63
|
<div
|
|
64
|
-
v-if="$slots.image ||
|
|
64
|
+
v-if="$slots.image || resolvedImage"
|
|
65
65
|
class="card__image"
|
|
66
66
|
:class="[
|
|
67
67
|
{ 'card__image--icon' : imageIcon },
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
]"
|
|
70
70
|
>
|
|
71
71
|
<slot name="image">
|
|
72
|
-
<
|
|
72
|
+
<UluImage v-bind="resolvedImage" />
|
|
73
73
|
</slot>
|
|
74
74
|
</div>
|
|
75
75
|
<div class="card__footer" v-if="$slots.footer">
|
|
@@ -83,6 +83,8 @@
|
|
|
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
|
+
import UluImage from './UluImage.vue';
|
|
86
88
|
|
|
87
89
|
const props = defineProps({
|
|
88
90
|
/**
|
|
@@ -156,11 +158,17 @@
|
|
|
156
158
|
default: () => ({})
|
|
157
159
|
},
|
|
158
160
|
/**
|
|
159
|
-
*
|
|
161
|
+
* Unified image prop configuration passed to UluImage. Can be a string (src) or an object matching UluImage props.
|
|
162
|
+
*/
|
|
163
|
+
image: [String, Object],
|
|
164
|
+
/**
|
|
165
|
+
* This is deprecated and will be removed in future version use "image" prop or image slot
|
|
166
|
+
* @deprecated Use `image` instead.
|
|
160
167
|
*/
|
|
161
168
|
imageSrc: String,
|
|
162
169
|
/**
|
|
163
|
-
*
|
|
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.
|
|
164
172
|
*/
|
|
165
173
|
imageAlt: String,
|
|
166
174
|
/**
|
|
@@ -197,6 +205,26 @@
|
|
|
197
205
|
console.warn("UluCard: 'titleTo'/'titleHref' should not be used with 'to'/'href'.");
|
|
198
206
|
}
|
|
199
207
|
|
|
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
|
+
const resolvedImage = computed(() => {
|
|
214
|
+
if (props.image) {
|
|
215
|
+
if (typeof props.image === 'string') {
|
|
216
|
+
return { src: props.image };
|
|
217
|
+
}
|
|
218
|
+
return props.image;
|
|
219
|
+
} else if (props.imageSrc) {
|
|
220
|
+
return {
|
|
221
|
+
src: props.imageSrc,
|
|
222
|
+
alt: props.imageAlt || ''
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
return null;
|
|
226
|
+
});
|
|
227
|
+
|
|
200
228
|
// --- Template refs
|
|
201
229
|
const cardRoot = ref(null);
|
|
202
230
|
const link = ref(null);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<picture v-if="sources?.length" :class="classes?.picture">
|
|
3
|
-
<
|
|
2
|
+
<picture v-if="sources?.length || $slots.default" :class="classes?.picture">
|
|
3
|
+
<slot />
|
|
4
|
+
<UluImageSource
|
|
4
5
|
v-for="(source, index) in sources"
|
|
5
6
|
:key="index"
|
|
6
7
|
v-bind="source"
|
|
@@ -23,6 +24,8 @@
|
|
|
23
24
|
</template>
|
|
24
25
|
|
|
25
26
|
<script setup>
|
|
27
|
+
import UluImageSource from './UluImageSource.vue';
|
|
28
|
+
|
|
26
29
|
defineOptions({
|
|
27
30
|
inheritAttrs: false
|
|
28
31
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<source
|
|
3
|
+
:srcset="srcset"
|
|
4
|
+
:media="media"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
defineOptions({
|
|
11
|
+
inheritAttrs: false
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
defineProps({
|
|
15
|
+
/**
|
|
16
|
+
* Source set (e.g. image paths)
|
|
17
|
+
*/
|
|
18
|
+
srcset: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* Media query (e.g. (min-width: 600px))
|
|
24
|
+
*/
|
|
25
|
+
media: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: undefined
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
</script>
|
package/lib/components/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export { default as UluDefinitionListItem } from './elements/UluDefinitionListIt
|
|
|
28
28
|
export { default as UluExternalLink } from './elements/UluExternalLink.vue';
|
|
29
29
|
export { default as UluIcon } from './elements/UluIcon.vue';
|
|
30
30
|
export { default as UluImage } from './elements/UluImage.vue';
|
|
31
|
+
export { default as UluImageSource } from './elements/UluImageSource.vue';
|
|
31
32
|
|
|
32
33
|
// TODO (Still needs stylesheet for main library [and any scripting over there so it's contained in ulu])
|
|
33
34
|
// export { default as UluImageSlider } from './elements/UluImageSlider.vue';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<UluImage :src="src" :alt="alt" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from 'vue';
|
|
7
7
|
import { randomInt } from "@ulu/utils/random.js";
|
|
8
|
+
import UluImage from "../elements/UluImage.vue";
|
|
8
9
|
|
|
9
10
|
const props = defineProps({
|
|
10
11
|
imageId: String,
|
package/lib/utils/props.js
CHANGED
|
@@ -5,4 +5,17 @@
|
|
|
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
|
+
}
|
|
8
21
|
}
|
package/lib/vite.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vite/Vue plugin utility to automatically transform asset URLs for UluImage components.
|
|
3
|
+
*
|
|
4
|
+
* Usage in vite.config.js:
|
|
5
|
+
* import { uluTransformAssetUrls } from '@ulu/frontend-vue/vite.js';
|
|
6
|
+
* import vue from '@vitejs/plugin-vue';
|
|
7
|
+
*
|
|
8
|
+
* export default defineConfig({
|
|
9
|
+
* plugins: [
|
|
10
|
+
* vue({
|
|
11
|
+
* template: {
|
|
12
|
+
* transformAssetUrls: {
|
|
13
|
+
* // You can spread default tags if needed, or Vue handles merging objects depending on setup.
|
|
14
|
+
* ...uluTransformAssetUrls
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* })
|
|
18
|
+
* ]
|
|
19
|
+
* });
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export const uluTransformAssetUrls = {
|
|
23
|
+
UluImage: ['src'],
|
|
24
|
+
UluImageSource: ['srcset']
|
|
25
|
+
};
|
package/package.json
CHANGED