@ulu/frontend-vue 0.1.1-beta.20 → 0.1.1-beta.21
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/{breakpoints-ZD2SdNmZ.js → breakpoints-BK5cY325.js} +1 -1
- package/dist/frontend-vue.js +72 -70
- package/dist/{index-DQaSeg6Y.js → index-CzaotMwA.js} +1367 -1296
- package/lib/components/index.js +3 -1
- package/lib/components/utils/{UluCondText.vue → UluConditionalText.vue} +1 -1
- package/lib/components/utils/UluConditionalWrapper.vue +29 -0
- package/lib/components/utils/UluRouteAnnouncer.vue +1 -1
- package/lib/components/utils/UluSanityRichText.vue +41 -0
- package/package.json +4 -3
- package/types/components/index.d.ts +3 -1
- package/types/components/utils/UluConditionalText.vue.d.ts +29 -0
- package/types/components/utils/UluConditionalText.vue.d.ts.map +1 -0
- package/types/components/utils/UluConditionalWrapper.vue.d.ts +20 -0
- package/types/components/utils/UluConditionalWrapper.vue.d.ts.map +1 -0
- package/types/components/utils/UluRouteAnnouncer.vue.d.ts +2 -2
- package/types/components/utils/UluSanityRichText.vue.d.ts +15 -0
- package/types/components/utils/UluSanityRichText.vue.d.ts.map +1 -0
package/lib/components/index.js
CHANGED
|
@@ -42,12 +42,14 @@ export { default as UluMenu } from './navigation/UluMenu.vue';
|
|
|
42
42
|
export { default as UluMenuStack } from './navigation/UluMenuStack.vue';
|
|
43
43
|
export { default as UluNavStrip } from './navigation/UluNavStrip.vue';
|
|
44
44
|
export { default as UluSkipLink } from './navigation/UluSkipLink.vue';
|
|
45
|
-
export { default as
|
|
45
|
+
export { default as UluConditionalText } from './utils/UluConditionalText.vue';
|
|
46
|
+
export { default as UluConditionalWrapper } from './utils/UluConditionalWrapper.vue';
|
|
46
47
|
export { default as UluEmpty } from './utils/UluEmpty.vue';
|
|
47
48
|
export { default as UluEmptyView } from './utils/UluEmptyView.vue';
|
|
48
49
|
export { default as UluPlaceholderImage } from './utils/UluPlaceholderImage.vue';
|
|
49
50
|
export { default as UluPlaceholderText } from './utils/UluPlaceholderText.vue';
|
|
50
51
|
export { default as UluRouteAnnouncer } from './utils/UluRouteAnnouncer.vue';
|
|
52
|
+
export { default as UluSanityRichText } from './utils/UluSanityRichText.vue';
|
|
51
53
|
export { default as UluAnimateNumber } from './visualizations/UluAnimateNumber.vue';
|
|
52
54
|
export { default as UluProgressBar } from './visualizations/UluProgressBar.vue';
|
|
53
55
|
export { default as UluProgressCircle } from './visualizations/UluProgressCircle.vue';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component v-if="!unwrapped" :is="is">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</component>
|
|
5
|
+
<template v-else>
|
|
6
|
+
<slot></slot>
|
|
7
|
+
</template>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
defineProps({
|
|
12
|
+
/**
|
|
13
|
+
* The underlying component or HTML tag to render.
|
|
14
|
+
* Can be a string like 'div' or an imported component object.
|
|
15
|
+
*/
|
|
16
|
+
is: {
|
|
17
|
+
type: [String, Object, Function], // Can be a string or a component definition
|
|
18
|
+
default: 'div' // A sensible default for a wrapper
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* If true, the wrapper will not be rendered and the content
|
|
22
|
+
* will be output directly.
|
|
23
|
+
*/
|
|
24
|
+
unwrapped: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
props: {
|
|
27
27
|
/**
|
|
28
28
|
* Allow user to bypass this functionality
|
|
29
|
-
* - Function should return true if the page should be
|
|
29
|
+
* - Function should return true if the page should be announced
|
|
30
30
|
* - Function is passed (to, from, $route) => {}
|
|
31
31
|
* - to/from are path strings
|
|
32
32
|
*/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UluConditionalWrapper
|
|
3
|
+
v-if="content?.length"
|
|
4
|
+
class="wysiwyg"
|
|
5
|
+
:unwrapped="noWrapper"
|
|
6
|
+
>
|
|
7
|
+
<PortableText :value="content" :components="portableComponents"/>
|
|
8
|
+
</UluConditionalWrapper>
|
|
9
|
+
</template>
|
|
10
|
+
<script setup>
|
|
11
|
+
import { h } from "vue";
|
|
12
|
+
import { PortableText } from '@portabletext/vue';
|
|
13
|
+
import UluConditionalWrapper from './UluConditionalWrapper.vue';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A component to render Sanity's Portable Text format.
|
|
17
|
+
* It requires the '@portabletext/vue' package to be installed by the consumer.
|
|
18
|
+
*/
|
|
19
|
+
defineProps({
|
|
20
|
+
/**
|
|
21
|
+
* The array of Portable Text blocks to render.
|
|
22
|
+
*/
|
|
23
|
+
content: Array,
|
|
24
|
+
/**
|
|
25
|
+
* If true, the output will not be wrapped in a div with the 'wysiwyg' class.
|
|
26
|
+
*/
|
|
27
|
+
noWrapper: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const portableComponents = {
|
|
34
|
+
types: {
|
|
35
|
+
image: ({ value }) => h('img', {
|
|
36
|
+
src: `${ value.imageUrl }?max-w=1100&fit=crop`,
|
|
37
|
+
alt: value.imageAlt
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulu/frontend-vue",
|
|
3
|
-
"version": "0.1.1-beta.
|
|
3
|
+
"version": "0.1.1-beta.21",
|
|
4
4
|
"description": "A modular and tree-shakeable Vue 3 component library for the Ulu frontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -63,12 +63,13 @@
|
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@formkit/auto-animate": "^0.9.0",
|
|
65
65
|
"@headlessui/vue": "^1.7.23",
|
|
66
|
-
"@ulu/frontend": "^0.1.0-beta.
|
|
66
|
+
"@ulu/frontend": "^0.1.0-beta.122",
|
|
67
67
|
"@unhead/vue": "^2.0.11",
|
|
68
68
|
"vue": "^3.5.17",
|
|
69
69
|
"vue-router": "^4.5.1"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
+
"@portabletext/vue": "^1.0.14",
|
|
72
73
|
"fuse.js": "^6.6.2",
|
|
73
74
|
"gsap": "^3.13.0",
|
|
74
75
|
"vue3-dropzone": "^2.2.1"
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"@storybook/addon-essentials": "^9.0.0-alpha.12",
|
|
88
89
|
"@storybook/addon-links": "^9.1.1",
|
|
89
90
|
"@storybook/vue3-vite": "^9.1.1",
|
|
90
|
-
"@ulu/frontend": "^0.1.0-beta.
|
|
91
|
+
"@ulu/frontend": "^0.1.0-beta.122",
|
|
91
92
|
"@unhead/vue": "^2.0.11",
|
|
92
93
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
93
94
|
"ollama": "^0.5.16",
|
|
@@ -37,12 +37,14 @@ export { default as UluMenu } from "./navigation/UluMenu.vue";
|
|
|
37
37
|
export { default as UluMenuStack } from "./navigation/UluMenuStack.vue";
|
|
38
38
|
export { default as UluNavStrip } from "./navigation/UluNavStrip.vue";
|
|
39
39
|
export { default as UluSkipLink } from "./navigation/UluSkipLink.vue";
|
|
40
|
-
export { default as
|
|
40
|
+
export { default as UluConditionalText } from "./utils/UluConditionalText.vue";
|
|
41
|
+
export { default as UluConditionalWrapper } from "./utils/UluConditionalWrapper.vue";
|
|
41
42
|
export { default as UluEmpty } from "./utils/UluEmpty.vue";
|
|
42
43
|
export { default as UluEmptyView } from "./utils/UluEmptyView.vue";
|
|
43
44
|
export { default as UluPlaceholderImage } from "./utils/UluPlaceholderImage.vue";
|
|
44
45
|
export { default as UluPlaceholderText } from "./utils/UluPlaceholderText.vue";
|
|
45
46
|
export { default as UluRouteAnnouncer } from "./utils/UluRouteAnnouncer.vue";
|
|
47
|
+
export { default as UluSanityRichText } from "./utils/UluSanityRichText.vue";
|
|
46
48
|
export { default as UluAnimateNumber } from "./visualizations/UluAnimateNumber.vue";
|
|
47
49
|
export { default as UluProgressBar } from "./visualizations/UluProgressBar.vue";
|
|
48
50
|
export { default as UluProgressCircle } from "./visualizations/UluProgressCircle.vue";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
/**
|
|
3
|
+
* Text to print in element
|
|
4
|
+
*/
|
|
5
|
+
text: (ObjectConstructor | StringConstructor | ArrayConstructor | NumberConstructor)[];
|
|
6
|
+
/**
|
|
7
|
+
* Element type to render (ie. h1, h2, p, etc)
|
|
8
|
+
*/
|
|
9
|
+
element: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
/**
|
|
15
|
+
* Text to print in element
|
|
16
|
+
*/
|
|
17
|
+
text: (ObjectConstructor | StringConstructor | ArrayConstructor | NumberConstructor)[];
|
|
18
|
+
/**
|
|
19
|
+
* Element type to render (ie. h1, h2, p, etc)
|
|
20
|
+
*/
|
|
21
|
+
element: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {
|
|
26
|
+
element: string;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export default _default;
|
|
29
|
+
//# sourceMappingURL=UluConditionalText.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluConditionalText.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/utils/UluConditionalText.vue"],"names":[],"mappings":";IAmCM;;OAEG;;IAEH;;OAEG;;;;;;IANH;;OAEG;;IAEH;;OAEG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
+
$props: Partial<typeof __VLS_props>;
|
|
8
|
+
is: string | Function | Record<string, any>;
|
|
9
|
+
unwrapped: boolean;
|
|
10
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
default?: ((props: {}) => any) | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
default?: ((props: {}) => any) | undefined;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_props: {
|
|
17
|
+
readonly is: string | Function | Record<string, any>;
|
|
18
|
+
readonly unwrapped: boolean;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=UluConditionalWrapper.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluConditionalWrapper.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/utils/UluConditionalWrapper.vue"],"names":[],"mappings":"wBA0GqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AARzB;YAGmB,OAAO,CAAC,OAAO,WAAW,CAAC;;;2OAE3C;;;;;;AA3ED;;;EAiBG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
/**
|
|
3
3
|
* Allow user to bypass this functionality
|
|
4
|
-
* - Function should return true if the page should be
|
|
4
|
+
* - Function should return true if the page should be announced
|
|
5
5
|
* - Function is passed (to, from, $route) => {}
|
|
6
6
|
* - to/from are path strings
|
|
7
7
|
*/
|
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
30
30
|
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
31
|
/**
|
|
32
32
|
* Allow user to bypass this functionality
|
|
33
|
-
* - Function should return true if the page should be
|
|
33
|
+
* - Function should return true if the page should be announced
|
|
34
34
|
* - Function is passed (to, from, $route) => {}
|
|
35
35
|
* - to/from are path strings
|
|
36
36
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
$props: Partial<typeof __VLS_props>;
|
|
3
|
+
noWrapper: boolean;
|
|
4
|
+
content?: unknown[] | undefined;
|
|
5
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
7
|
+
/**
|
|
8
|
+
* A component to render Sanity's Portable Text format.
|
|
9
|
+
* It requires the '@portabletext/vue' package to be installed by the consumer.
|
|
10
|
+
*/
|
|
11
|
+
declare const __VLS_props: {
|
|
12
|
+
readonly noWrapper: boolean;
|
|
13
|
+
readonly content?: unknown[] | undefined;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=UluSanityRichText.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluSanityRichText.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/utils/UluSanityRichText.vue"],"names":[],"mappings":";YA4ImB,OAAO,CAAC,OAAO,WAAW,CAAC;;;;;AA9F5C;;;GAGG;AACH;;;EAYG"}
|