@ulu/frontend-vue 0.1.1-beta.16 → 0.1.1-beta.18
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-B0Wreot9.js → breakpoints-DMo5a-Xm.js} +1 -1
- package/dist/frontend-vue.js +68 -67
- package/dist/{index-slmI2p79.js → index-CFgUxIw_.js} +1388 -1259
- package/lib/components/elements/UluDefinitionList.vue +55 -3
- package/lib/components/navigation/UluMenuStack.vue +2 -2
- package/lib/components/systems/facets/UluFacetsFilterAccordions.vue +94 -0
- package/lib/components/systems/facets/UluFacetsFilterLists.vue +0 -3
- package/lib/components/systems/index.js +1 -0
- package/package.json +3 -3
- package/types/components/elements/UluDefinitionList.vue.d.ts +18 -2
- package/types/components/elements/UluDefinitionList.vue.d.ts.map +1 -1
- package/types/components/systems/facets/UluFacetsFilterAccordions.vue.d.ts +29 -0
- package/types/components/systems/facets/UluFacetsFilterAccordions.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsFilterLists.vue.d.ts.map +1 -1
- package/types/components/systems/index.d.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<dl :class="classes.list">
|
|
2
|
+
<dl class="definition-list" :class="[resolvedModifiers, classes.list]">
|
|
3
3
|
<div
|
|
4
4
|
v-for="(item, index) in items"
|
|
5
5
|
:key="index"
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
{{ item.term }}
|
|
11
11
|
</slot>
|
|
12
12
|
</dt>
|
|
13
|
+
|
|
13
14
|
<dd :class="classes.description">
|
|
14
15
|
<slot name="description" :item="item" :index="index">
|
|
15
16
|
{{ item.description }}
|
|
@@ -20,7 +21,10 @@
|
|
|
20
21
|
</template>
|
|
21
22
|
|
|
22
23
|
<script setup>
|
|
23
|
-
|
|
24
|
+
import { computed } from 'vue';
|
|
25
|
+
import { useModifiers } from "../../composables/useModifiers.js";
|
|
26
|
+
|
|
27
|
+
const props = defineProps({
|
|
24
28
|
/**
|
|
25
29
|
* Array of term, and description (props in object)
|
|
26
30
|
* - Can use slots also
|
|
@@ -32,6 +36,54 @@
|
|
|
32
36
|
classes: {
|
|
33
37
|
type: Object,
|
|
34
38
|
default: () => ({})
|
|
35
|
-
}
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* Class modifiers (ie. 'transparent', 'secondary', etc)
|
|
42
|
+
*/
|
|
43
|
+
modifiers: [String, Array],
|
|
44
|
+
/**
|
|
45
|
+
* Displays only the definition descriptions on the same line.
|
|
46
|
+
*/
|
|
47
|
+
inline: Boolean,
|
|
48
|
+
/**
|
|
49
|
+
* Displays both the definition term and its descriptions on the same line.
|
|
50
|
+
*/
|
|
51
|
+
inlineAll: Boolean,
|
|
52
|
+
/**
|
|
53
|
+
* Displays the list in a two-column grid on larger screens.
|
|
54
|
+
*/
|
|
55
|
+
table: Boolean,
|
|
56
|
+
/**
|
|
57
|
+
* Adds a rule between each item.
|
|
58
|
+
*/
|
|
59
|
+
separated: Boolean,
|
|
60
|
+
/**
|
|
61
|
+
* Adds a rule to the top of the first item.
|
|
62
|
+
*/
|
|
63
|
+
separatedFirst: Boolean,
|
|
64
|
+
/**
|
|
65
|
+
* Adds a rule to the bottom of the last item.
|
|
66
|
+
*/
|
|
67
|
+
separatedLast: Boolean,
|
|
68
|
+
/**
|
|
69
|
+
* Reduces the margin between items.
|
|
70
|
+
*/
|
|
71
|
+
compact: Boolean,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const internalModifiers = computed(() => ({
|
|
75
|
+
"inline" : props.inline,
|
|
76
|
+
"inline-all" : props.inlineAll,
|
|
77
|
+
"table" : props.table,
|
|
78
|
+
"separated" : props.separated,
|
|
79
|
+
"separated-first" : props.separatedFirst,
|
|
80
|
+
"separated-last" : props.separatedLast,
|
|
81
|
+
"compact" : props.compact,
|
|
82
|
+
}));
|
|
83
|
+
|
|
84
|
+
const { resolvedModifiers } = useModifiers({
|
|
85
|
+
props,
|
|
86
|
+
internal: internalModifiers,
|
|
87
|
+
baseClass: "definition-list"
|
|
36
88
|
});
|
|
37
89
|
</script>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="facets-filters">
|
|
3
|
+
<UluAccordion
|
|
4
|
+
v-for="group in facets"
|
|
5
|
+
:key="group.uid"
|
|
6
|
+
:modifiers="accordionModifiers"
|
|
7
|
+
:startOpen="group.open"
|
|
8
|
+
>
|
|
9
|
+
<template #trigger="{ isOpen }">
|
|
10
|
+
<slot name="groupTrigger" :group="group" :isOpen="isOpen">
|
|
11
|
+
{{ group.name }}
|
|
12
|
+
</slot>
|
|
13
|
+
</template>
|
|
14
|
+
<template #default>
|
|
15
|
+
<UluFacetsList
|
|
16
|
+
:children="group.children.slice(0, maxVisible)"
|
|
17
|
+
:groupUid="group.uid"
|
|
18
|
+
:groupName="group.name"
|
|
19
|
+
:type="group.multiple ? 'checkbox' : 'radio'"
|
|
20
|
+
:compact="compact"
|
|
21
|
+
:model-value="selectedUids(group)"
|
|
22
|
+
@facet-change="emit('facet-change', $event)"
|
|
23
|
+
/>
|
|
24
|
+
<UluAccordion
|
|
25
|
+
v-if="group.children.length > maxVisible"
|
|
26
|
+
class="facets-filters__more-facets"
|
|
27
|
+
:class="classes.moreFacets"
|
|
28
|
+
:modifiers="accordionModifiers"
|
|
29
|
+
>
|
|
30
|
+
<template #trigger="{ isOpen }">
|
|
31
|
+
{{ isOpen ? "View Less" : "Show More" }}
|
|
32
|
+
</template>
|
|
33
|
+
<template #default>
|
|
34
|
+
<UluFacetsList
|
|
35
|
+
:children="group.children.slice(maxVisible)"
|
|
36
|
+
:groupUid="group.uid"
|
|
37
|
+
:groupName="group.name"
|
|
38
|
+
:type="group.multiple ? 'checkbox' : 'radio'"
|
|
39
|
+
:compact="compact"
|
|
40
|
+
:model-value="selectedUids(group)"
|
|
41
|
+
@facet-change="emit('facet-change', $event)"
|
|
42
|
+
/>
|
|
43
|
+
</template>
|
|
44
|
+
</UluAccordion>
|
|
45
|
+
</template>
|
|
46
|
+
</UluAccordion>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script setup>
|
|
51
|
+
import UluFacetsList from "./UluFacetsList.vue";
|
|
52
|
+
import UluAccordion from "../../collapsible/UluAccordion.vue";
|
|
53
|
+
|
|
54
|
+
defineProps({
|
|
55
|
+
/**
|
|
56
|
+
* An object of classes to apply to the component.
|
|
57
|
+
*/
|
|
58
|
+
classes: {
|
|
59
|
+
type: Object,
|
|
60
|
+
default: () => ({})
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* The maximum number of facets to show before showing the "More" button.
|
|
64
|
+
*/
|
|
65
|
+
maxVisible: {
|
|
66
|
+
type: Number,
|
|
67
|
+
default: 5
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* An array of facet groups to display.
|
|
71
|
+
*/
|
|
72
|
+
facets: {
|
|
73
|
+
type: Array,
|
|
74
|
+
default: () => []
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* Whether to use compact modifier on selectable menu
|
|
78
|
+
*/
|
|
79
|
+
compact: Boolean,
|
|
80
|
+
/**
|
|
81
|
+
* Class modifiers for accordion (ie. 'transparent', 'secondary', etc)
|
|
82
|
+
*/
|
|
83
|
+
accordionModifiers: [String, Array]
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const emit = defineEmits(['facet-change']);
|
|
87
|
+
|
|
88
|
+
const selectedUids = (group) => {
|
|
89
|
+
if (group.multiple) {
|
|
90
|
+
return group.children.filter(c => c.selected).map(c => c.uid);
|
|
91
|
+
}
|
|
92
|
+
return group.children.find(c => c.selected)?.uid || '';
|
|
93
|
+
};
|
|
94
|
+
</script>
|
|
@@ -31,9 +31,6 @@
|
|
|
31
31
|
v-if="group.children.length > maxVisible"
|
|
32
32
|
class="facets-filters__more-facets"
|
|
33
33
|
:class="classes.moreFacets"
|
|
34
|
-
:clickOutsideCloses="false"
|
|
35
|
-
:closeOnEscape="false"
|
|
36
|
-
:transitionHeight="true"
|
|
37
34
|
>
|
|
38
35
|
<template #trigger="{ isOpen }">
|
|
39
36
|
{{ isOpen ? "View Less" : "Show More" }}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { useFacets } from './facets/useFacets.js';
|
|
2
2
|
export { default as UluFacetsActiveFilters } from './facets/UluFacetsActiveFilters.vue';
|
|
3
3
|
export { default as UluFacetsFilterLists } from './facets/UluFacetsFilterLists.vue';
|
|
4
|
+
export { default as UluFacetsFilterAccordions } from './facets/UluFacetsFilterAccordions.vue';
|
|
4
5
|
export { default as UluFacetsFilterPopovers } from './facets/UluFacetsFilterPopovers.vue';
|
|
5
6
|
export { default as UluFacetsFilterSelects } from './facets/UluFacetsFilterSelects.vue';
|
|
6
7
|
export { default as UluFacetsHeaderLayout } from './facets/UluFacetsHeaderLayout.vue';
|
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.18",
|
|
4
4
|
"description": "A modular and tree-shakeable Vue 3 component library for the Ulu frontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -63,7 +63,7 @@
|
|
|
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.117",
|
|
67
67
|
"@unhead/vue": "^2.0.11",
|
|
68
68
|
"vue": "^3.5.17",
|
|
69
69
|
"vue-router": "^4.5.1"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@storybook/addon-essentials": "^9.0.0-alpha.12",
|
|
88
88
|
"@storybook/addon-links": "^9.1.1",
|
|
89
89
|
"@storybook/vue3-vite": "^9.1.1",
|
|
90
|
-
"@ulu/frontend": "^0.1.0-beta.
|
|
90
|
+
"@ulu/frontend": "^0.1.0-beta.117",
|
|
91
91
|
"@unhead/vue": "^2.0.11",
|
|
92
92
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
93
93
|
"ollama": "^0.5.16",
|
|
@@ -4,8 +4,16 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
4
4
|
$slots: S;
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
-
$props: Partial<typeof
|
|
7
|
+
$props: Partial<typeof props>;
|
|
8
8
|
classes: Record<string, any>;
|
|
9
|
+
table: boolean;
|
|
10
|
+
inline: boolean;
|
|
11
|
+
compact: boolean;
|
|
12
|
+
inlineAll: boolean;
|
|
13
|
+
separated: boolean;
|
|
14
|
+
separatedFirst: boolean;
|
|
15
|
+
separatedLast: boolean;
|
|
16
|
+
modifiers?: string | unknown[] | undefined;
|
|
9
17
|
items?: unknown[] | undefined;
|
|
10
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
19
|
type __VLS_Slots = {
|
|
@@ -19,8 +27,16 @@ type __VLS_Slots = {
|
|
|
19
27
|
index: number;
|
|
20
28
|
}) => any) | undefined;
|
|
21
29
|
};
|
|
22
|
-
declare const
|
|
30
|
+
declare const props: {
|
|
23
31
|
readonly classes: Record<string, any>;
|
|
32
|
+
readonly table: boolean;
|
|
33
|
+
readonly inline: boolean;
|
|
34
|
+
readonly compact: boolean;
|
|
35
|
+
readonly inlineAll: boolean;
|
|
36
|
+
readonly separated: boolean;
|
|
37
|
+
readonly separatedFirst: boolean;
|
|
38
|
+
readonly separatedLast: boolean;
|
|
39
|
+
readonly modifiers?: string | unknown[] | undefined;
|
|
24
40
|
readonly items?: unknown[] | undefined;
|
|
25
41
|
};
|
|
26
42
|
//# sourceMappingURL=UluDefinitionList.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluDefinitionList.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluDefinitionList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UluDefinitionList.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluDefinitionList.vue"],"names":[],"mappings":"wBAsOqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AARzB;YAGmB,OAAO,CAAC,OAAO,KAAK,CAAC;;;;;;;;;;;2OAErC;;;;;;;;;;;;AAxID;;;;;;;;;;;EA6CG"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
$emit: typeof emit;
|
|
8
|
+
$props: Partial<typeof __VLS_props>;
|
|
9
|
+
classes: Record<string, any>;
|
|
10
|
+
compact: boolean;
|
|
11
|
+
maxVisible: number;
|
|
12
|
+
facets: unknown[];
|
|
13
|
+
accordionModifiers?: string | unknown[] | undefined;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
groupTrigger?: ((props: {
|
|
17
|
+
group: unknown;
|
|
18
|
+
isOpen: boolean | undefined;
|
|
19
|
+
}) => any) | undefined;
|
|
20
|
+
};
|
|
21
|
+
declare const emit: (event: "facet-change", ...args: any[]) => void;
|
|
22
|
+
declare const __VLS_props: {
|
|
23
|
+
readonly classes: Record<string, any>;
|
|
24
|
+
readonly compact: boolean;
|
|
25
|
+
readonly maxVisible: number;
|
|
26
|
+
readonly facets: unknown[];
|
|
27
|
+
readonly accordionModifiers?: string | unknown[] | undefined;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=UluFacetsFilterAccordions.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluFacetsFilterAccordions.vue.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/facets/UluFacetsFilterAccordions.vue"],"names":[],"mappings":"wBAkTqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AATzB;WAIkB,OAAO,IAAI;YADV,OAAO,CAAC,OAAO,WAAW,CAAC;;;;;;2OAG3C;;;;;;;AA/KD,oEAA2C;AAhC3C;;;;;;EA8BG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluFacetsFilterLists.vue.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/facets/UluFacetsFilterLists.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UluFacetsFilterLists.vue.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/facets/UluFacetsFilterLists.vue"],"names":[],"mappings":"wBAyTqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AATzB;WAIkB,OAAO,IAAI;YADV,OAAO,CAAC,OAAO,WAAW,CAAC;;;;;2OAG3C;;;;;;;AAzLD,oEAA2C;AA5B3C;;;;;EA0BG"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { useFacets } from "./facets/useFacets.js";
|
|
2
2
|
export { default as UluFacetsActiveFilters } from "./facets/UluFacetsActiveFilters.vue";
|
|
3
3
|
export { default as UluFacetsFilterLists } from "./facets/UluFacetsFilterLists.vue";
|
|
4
|
+
export { default as UluFacetsFilterAccordions } from "./facets/UluFacetsFilterAccordions.vue";
|
|
4
5
|
export { default as UluFacetsFilterPopovers } from "./facets/UluFacetsFilterPopovers.vue";
|
|
5
6
|
export { default as UluFacetsFilterSelects } from "./facets/UluFacetsFilterSelects.vue";
|
|
6
7
|
export { default as UluFacetsHeaderLayout } from "./facets/UluFacetsHeaderLayout.vue";
|