@ulu/frontend-vue 0.1.3-beta.5 → 0.1.3-beta.6
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/frontend-vue.js +1087 -1010
- package/dist/types/components/elements/UluRule.vue.d.ts +19 -0
- package/dist/types/components/elements/UluRule.vue.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/systems/facets/UluFacetsFilterSelects.vue.d.ts +21 -2
- package/dist/types/components/systems/facets/UluFacetsFilterSelects.vue.d.ts.map +1 -1
- package/lib/components/collapsible/UluModal.vue +8 -8
- package/lib/components/elements/UluRule.vue +49 -0
- package/lib/components/index.js +1 -0
- package/lib/components/systems/facets/UluFacetsFilterSelects.vue +34 -7
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
$props: Partial<typeof props>;
|
|
3
|
+
large: boolean;
|
|
4
|
+
semantic: boolean;
|
|
5
|
+
short: boolean;
|
|
6
|
+
light: boolean;
|
|
7
|
+
margin?: string | undefined;
|
|
8
|
+
modifiers?: string | unknown[] | undefined;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
export default _default;
|
|
11
|
+
declare const props: {
|
|
12
|
+
readonly large: boolean;
|
|
13
|
+
readonly semantic: boolean;
|
|
14
|
+
readonly short: boolean;
|
|
15
|
+
readonly light: boolean;
|
|
16
|
+
readonly margin?: string | undefined;
|
|
17
|
+
readonly modifiers?: string | unknown[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=UluRule.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluRule.vue.d.ts","sourceRoot":"","sources":["../../../../lib/components/elements/UluRule.vue"],"names":[],"mappings":";YAgJmB,OAAO,CAAC,OAAO,KAAK,CAAC;;;;;;;;;AA3FtC;;;;;;;EAyBG"}
|
|
@@ -20,6 +20,7 @@ export { default as UluExternalLink } from "./elements/UluExternalLink.vue";
|
|
|
20
20
|
export { default as UluIcon } from "./elements/UluIcon.vue";
|
|
21
21
|
export { default as UluList } from "./elements/UluList.vue";
|
|
22
22
|
export { default as UluMain } from "./elements/UluMain.vue";
|
|
23
|
+
export { default as UluRule } from "./elements/UluRule.vue";
|
|
23
24
|
export { default as UluSpokeSpinner } from "./elements/UluSpokeSpinner.vue";
|
|
24
25
|
export { default as UluTag } from "./elements/UluTag.vue";
|
|
25
26
|
export { default as UluSelectableMenu } from "./forms/UluSelectableMenu.vue";
|
|
@@ -1,11 +1,30 @@
|
|
|
1
|
-
declare const _default:
|
|
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<{}, {
|
|
2
7
|
$emit: typeof emit;
|
|
3
8
|
$props: Partial<typeof props>;
|
|
9
|
+
classes: Record<string, any>;
|
|
4
10
|
facets: unknown[];
|
|
5
11
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
-
|
|
12
|
+
type __VLS_Slots = {
|
|
13
|
+
label?: ((props: {}) => any) | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
optionAll?: ((props: {
|
|
16
|
+
group: unknown;
|
|
17
|
+
}) => any) | undefined;
|
|
18
|
+
} & {
|
|
19
|
+
option?: ((props: {
|
|
20
|
+
group: unknown;
|
|
21
|
+
option: any;
|
|
22
|
+
index: number;
|
|
23
|
+
}) => any) | undefined;
|
|
24
|
+
};
|
|
7
25
|
declare const emit: (event: "facet-change", ...args: any[]) => void;
|
|
8
26
|
declare const props: {
|
|
27
|
+
readonly classes: Record<string, any>;
|
|
9
28
|
readonly facets: unknown[];
|
|
10
29
|
};
|
|
11
30
|
//# sourceMappingURL=UluFacetsFilterSelects.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluFacetsFilterSelects.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/facets/UluFacetsFilterSelects.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"UluFacetsFilterSelects.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/facets/UluFacetsFilterSelects.vue"],"names":[],"mappings":"wBAqPqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AATzB;WAIkB,OAAO,IAAI;YADV,OAAO,CAAC,OAAO,KAAK,CAAC;;;2OAGrC;;;;;;;;;;;;;;AA5HH,oEAA2C;AApB3C;;;EAeG"}
|
|
@@ -216,14 +216,14 @@
|
|
|
216
216
|
// Define the internal modifiers object as a computed property (so it can react to changes)
|
|
217
217
|
const internalModifiers = computed(() => ({
|
|
218
218
|
[props.position]: props.position,
|
|
219
|
-
"resize": props.allowResize,
|
|
220
|
-
"no-resize": !props.allowResize,
|
|
221
|
-
"no-header": !hasHeader.value,
|
|
222
|
-
"body-fills": props.bodyFills,
|
|
223
|
-
"no-backdrop": props.noBackdrop,
|
|
224
|
-
"no-min-height": props.noMinHeight,
|
|
225
|
-
"non-modal": props.nonModal,
|
|
226
|
-
"resizer-active": resizerEnabled.value,
|
|
219
|
+
"resize" : props.allowResize,
|
|
220
|
+
"no-resize" : !props.allowResize,
|
|
221
|
+
"no-header" : !hasHeader.value,
|
|
222
|
+
"body-fills" : props.bodyFills,
|
|
223
|
+
"no-backdrop" : props.noBackdrop,
|
|
224
|
+
"no-min-height" : props.noMinHeight,
|
|
225
|
+
"non-modal" : props.nonModal,
|
|
226
|
+
"resizer-active" : resizerEnabled.value,
|
|
227
227
|
}));
|
|
228
228
|
|
|
229
229
|
const { resolvedModifiers } = useModifiers({
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<hr v-if="semantic" class="rule" :class="resolvedModifiers">
|
|
3
|
+
<div v-else class="rule" :class="resolvedModifiers"></div>
|
|
4
|
+
</template>
|
|
5
|
+
|
|
6
|
+
<script setup>
|
|
7
|
+
import { computed } from "vue";
|
|
8
|
+
import { useModifiers } from "../../composables/useModifiers.js";
|
|
9
|
+
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
/**
|
|
12
|
+
* Whether to use the actual <hr> vs superficial <div></div> for rule element
|
|
13
|
+
*/
|
|
14
|
+
semantic: Boolean,
|
|
15
|
+
/**
|
|
16
|
+
* Use short modifier
|
|
17
|
+
*/
|
|
18
|
+
short: Boolean,
|
|
19
|
+
/**
|
|
20
|
+
* Optional margin (keyword from your rule margins config in frontend)
|
|
21
|
+
*/
|
|
22
|
+
margin: String,
|
|
23
|
+
/**
|
|
24
|
+
* Add light modifier (if set, usually exists, this is for convenience, use modifiers prop if you have custom naming)
|
|
25
|
+
*/
|
|
26
|
+
light: Boolean,
|
|
27
|
+
/**
|
|
28
|
+
* Add large modifier (if set, usually exists, this is for convenience, use modifiers prop if you have custom naming)
|
|
29
|
+
*/
|
|
30
|
+
large: Boolean,
|
|
31
|
+
/**
|
|
32
|
+
* Modifiers (to add any modifier classes based on base class [ie. 'tertiary'])
|
|
33
|
+
*/
|
|
34
|
+
modifiers: [String, Array]
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const internalModifiers = computed(() => ({
|
|
38
|
+
"short" : props.short,
|
|
39
|
+
"light" : props.light,
|
|
40
|
+
"large" : props.large,
|
|
41
|
+
[`margin-${ props.margin }`] : props.margin
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
const { resolvedModifiers } = useModifiers({
|
|
45
|
+
props,
|
|
46
|
+
baseClass: "rule",
|
|
47
|
+
internal: internalModifiers
|
|
48
|
+
});
|
|
49
|
+
</script>
|
package/lib/components/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export { default as UluExternalLink } from './elements/UluExternalLink.vue';
|
|
|
25
25
|
export { default as UluIcon } from './elements/UluIcon.vue';
|
|
26
26
|
export { default as UluList } from './elements/UluList.vue';
|
|
27
27
|
export { default as UluMain } from './elements/UluMain.vue';
|
|
28
|
+
export { default as UluRule } from './elements/UluRule.vue';
|
|
28
29
|
export { default as UluSpokeSpinner } from './elements/UluSpokeSpinner.vue';
|
|
29
30
|
export { default as UluTag } from './elements/UluTag.vue';
|
|
30
31
|
export { default as UluSelectableMenu } from './forms/UluSelectableMenu.vue';
|
|
@@ -1,26 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="facets-dropdown-filters">
|
|
2
|
+
<div class="facets-dropdown-filters" :class="classes.container">
|
|
3
3
|
<div
|
|
4
4
|
class="facets-dropdown-filters__group"
|
|
5
|
+
:class="classes.group"
|
|
5
6
|
v-for="group in facets"
|
|
6
7
|
:key="group.uid"
|
|
7
8
|
>
|
|
8
|
-
<label
|
|
9
|
-
{
|
|
9
|
+
<label
|
|
10
|
+
:for="`facet-dropdown-${ group.uid }`"
|
|
11
|
+
class="facets-dropdown-filters__label"
|
|
12
|
+
:class="classes.label"
|
|
13
|
+
>
|
|
14
|
+
<slot name="label">
|
|
15
|
+
{{ group.name }}
|
|
16
|
+
</slot>
|
|
10
17
|
</label>
|
|
11
18
|
<select
|
|
12
19
|
:id="`facet-dropdown-${group.uid}`"
|
|
13
20
|
class="facets-dropdown-filters__select"
|
|
21
|
+
:class="classes.select"
|
|
14
22
|
@change="onFilterChange(group, $event)"
|
|
15
23
|
>
|
|
16
|
-
<option value="">
|
|
24
|
+
<option value="">
|
|
25
|
+
<slot name="optionAll" :group="group">
|
|
26
|
+
All {{ group.name }}s
|
|
27
|
+
</slot>
|
|
28
|
+
</option>
|
|
17
29
|
<option
|
|
18
|
-
v-for="option in group.children"
|
|
30
|
+
v-for="(option, index) in group.children"
|
|
19
31
|
:key="option.uid"
|
|
20
32
|
:value="option.uid"
|
|
21
33
|
:selected="option.selected"
|
|
22
34
|
>
|
|
23
|
-
|
|
35
|
+
<slot name="option" :group="group" :option="option" :index="index">
|
|
36
|
+
{{ option.label }}
|
|
37
|
+
</slot>
|
|
24
38
|
</option>
|
|
25
39
|
</select>
|
|
26
40
|
</div>
|
|
@@ -29,12 +43,25 @@
|
|
|
29
43
|
|
|
30
44
|
<script setup>
|
|
31
45
|
const props = defineProps({
|
|
46
|
+
/**
|
|
47
|
+
* Facets Array
|
|
48
|
+
*/
|
|
32
49
|
facets: {
|
|
33
50
|
type: Array,
|
|
34
51
|
default: () => []
|
|
35
|
-
}
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Optional classes bindings for all elements { container, group, label, select }
|
|
55
|
+
*/
|
|
56
|
+
classes: {
|
|
57
|
+
type: Object,
|
|
58
|
+
default: () => ({})
|
|
59
|
+
},
|
|
36
60
|
});
|
|
37
61
|
|
|
62
|
+
console.log(props);
|
|
63
|
+
|
|
64
|
+
|
|
38
65
|
const emit = defineEmits(['facet-change']);
|
|
39
66
|
|
|
40
67
|
function onFilterChange(group, event) {
|