@ulu/frontend-vue 0.1.2-beta.9 → 0.1.3-beta.10
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.css +1 -1
- package/dist/frontend-vue.js +2650 -2218
- package/dist/types/components/collapsible/UluModal.vue.d.ts.map +1 -1
- package/dist/types/components/elements/UluList.vue.d.ts.map +1 -1
- 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/forms/UluForm.vue.d.ts +24 -0
- package/dist/types/components/forms/UluForm.vue.d.ts.map +1 -0
- package/dist/types/components/forms/UluFormActions.vue.d.ts +10 -0
- package/dist/types/components/forms/UluFormActions.vue.d.ts.map +1 -0
- package/dist/types/components/forms/UluFormCheckbox.vue.d.ts +22 -0
- package/dist/types/components/forms/UluFormCheckbox.vue.d.ts.map +1 -0
- package/dist/types/components/forms/UluFormFieldset.vue.d.ts +16 -0
- package/dist/types/components/forms/UluFormFieldset.vue.d.ts.map +1 -0
- package/dist/types/components/forms/UluFormFile.vue.d.ts +2 -0
- package/dist/types/components/forms/UluFormFile.vue.d.ts.map +1 -1
- package/dist/types/components/forms/UluFormItem.vue.d.ts +28 -0
- package/dist/types/components/forms/UluFormItem.vue.d.ts.map +1 -0
- package/dist/types/components/forms/UluFormItemsInline.vue.d.ts +10 -0
- package/dist/types/components/forms/UluFormItemsInline.vue.d.ts.map +1 -0
- package/dist/types/components/forms/UluFormRadio.vue.d.ts +26 -0
- package/dist/types/components/forms/UluFormRadio.vue.d.ts.map +1 -0
- package/dist/types/components/forms/UluFormRequiredChar.vue.d.ts +3 -0
- package/dist/types/components/forms/UluFormRequiredChar.vue.d.ts.map +1 -0
- package/dist/types/components/forms/UluFormSelect.vue.d.ts +3 -1
- package/dist/types/components/forms/UluFormSelect.vue.d.ts.map +1 -1
- package/dist/types/components/forms/UluFormText.vue.d.ts +3 -1
- package/dist/types/components/forms/UluFormText.vue.d.ts.map +1 -1
- package/dist/types/components/forms/UluFormTextarea.vue.d.ts +24 -0
- package/dist/types/components/forms/UluFormTextarea.vue.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/components/navigation/UluPager.vue.d.ts.map +1 -1
- 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/dist/types/components/systems/facets/UluFacetsSearch.vue.d.ts.map +1 -1
- package/dist/types/components/systems/facets/UluFacetsSort.vue.d.ts.map +1 -1
- package/dist/types/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.d.ts.map +1 -1
- package/dist/types/plugins/popovers/defaults.d.ts.map +1 -1
- package/dist/types/plugins/popovers/index.d.ts.map +1 -1
- package/lib/components/collapsible/UluModal.vue +11 -14
- package/lib/components/elements/UluList.vue +3 -4
- package/lib/components/elements/UluRule.vue +49 -0
- package/lib/components/forms/UluForm.vue +42 -0
- package/lib/components/forms/UluFormActions.vue +9 -0
- package/lib/components/forms/UluFormCheckbox.vue +38 -0
- package/lib/components/forms/UluFormFieldset.vue +15 -0
- package/lib/components/forms/UluFormFile.vue +24 -23
- package/lib/components/forms/UluFormItem.vue +49 -0
- package/lib/components/forms/UluFormItemsInline.vue +9 -0
- package/lib/components/forms/UluFormMessage.vue +3 -3
- package/lib/components/forms/UluFormRadio.vue +48 -0
- package/lib/components/forms/UluFormRequiredChar.vue +7 -0
- package/lib/components/forms/UluFormSelect.vue +24 -23
- package/lib/components/forms/UluFormText.vue +20 -19
- package/lib/components/forms/UluFormTextarea.vue +41 -0
- package/lib/components/index.js +12 -0
- package/lib/components/navigation/UluPager.vue +2 -3
- package/lib/components/systems/facets/UluFacetsFilterSelects.vue +34 -7
- package/lib/components/systems/facets/UluFacetsSearch.vue +5 -5
- package/lib/components/systems/facets/UluFacetsSort.vue +5 -7
- package/lib/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue +3 -0
- package/lib/plugins/popovers/defaults.js +10 -10
- package/lib/plugins/popovers/index.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<input
|
|
3
|
+
type="checkbox"
|
|
4
|
+
:id="id"
|
|
5
|
+
:checked="modelValue"
|
|
6
|
+
@change="$emit('update:modelValue', $event.target.checked)"
|
|
7
|
+
:required="required"
|
|
8
|
+
>
|
|
9
|
+
<label :for="id">
|
|
10
|
+
<slot>
|
|
11
|
+
{{ label }}<UluFormRequiredChar v-if="required" />
|
|
12
|
+
</slot>
|
|
13
|
+
</label>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { newId } from "../../utils/dom.js";
|
|
18
|
+
import UluFormRequiredChar from "./UluFormRequiredChar.vue";
|
|
19
|
+
|
|
20
|
+
defineProps({
|
|
21
|
+
/**
|
|
22
|
+
* The label for the checkbox.
|
|
23
|
+
*/
|
|
24
|
+
label: String,
|
|
25
|
+
/**
|
|
26
|
+
* The value of the checkbox (for v-model).
|
|
27
|
+
*/
|
|
28
|
+
modelValue: Boolean,
|
|
29
|
+
/**
|
|
30
|
+
* If true, the field will be required.
|
|
31
|
+
*/
|
|
32
|
+
required: Boolean
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
defineEmits(['update:modelValue']);
|
|
36
|
+
|
|
37
|
+
const id = newId();
|
|
38
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<fieldset class="form-theme__fieldset">
|
|
3
|
+
<legend v-if="legend">{{ legend }}</legend>
|
|
4
|
+
<slot />
|
|
5
|
+
</fieldset>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
defineProps({
|
|
10
|
+
/**
|
|
11
|
+
* The legend for the fieldset.
|
|
12
|
+
*/
|
|
13
|
+
legend: String
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
</div>
|
|
2
|
+
<label
|
|
3
|
+
:class="{ 'hidden-visually' : labelHidden }"
|
|
4
|
+
:for="id"
|
|
5
|
+
>
|
|
6
|
+
<slot name="label">
|
|
7
|
+
{{ label }}<UluFormRequiredChar v-if="required" />
|
|
8
|
+
</slot>
|
|
9
|
+
</label>
|
|
10
|
+
<input
|
|
11
|
+
type="file"
|
|
12
|
+
@change="onChangeFile"
|
|
13
|
+
:multiple="multiple"
|
|
14
|
+
:id="id"
|
|
15
|
+
v-bind="inputAttrs"
|
|
16
|
+
:required="required"
|
|
17
|
+
/>
|
|
19
18
|
</template>
|
|
20
19
|
|
|
21
20
|
<script setup>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return () => `file-input-id-${++count}`;
|
|
25
|
-
})();
|
|
21
|
+
import { newId } from "../../utils/dom.js";
|
|
22
|
+
import UluFormRequiredChar from "./UluFormRequiredChar.vue";
|
|
26
23
|
|
|
27
24
|
defineProps({
|
|
28
25
|
/**
|
|
@@ -47,12 +44,16 @@
|
|
|
47
44
|
/**
|
|
48
45
|
* Additional attributes to bind to the input element.
|
|
49
46
|
*/
|
|
50
|
-
inputAttrs: Object
|
|
47
|
+
inputAttrs: Object,
|
|
48
|
+
/**
|
|
49
|
+
* If true, the field will be required.
|
|
50
|
+
*/
|
|
51
|
+
required: Boolean
|
|
51
52
|
});
|
|
52
53
|
|
|
53
54
|
const emit = defineEmits(["file-change"]);
|
|
54
55
|
|
|
55
|
-
const id =
|
|
56
|
+
const id = newId();
|
|
56
57
|
|
|
57
58
|
const onChangeFile = (event) => {
|
|
58
59
|
emit("file-change", event.target.files);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="form-theme__item"
|
|
4
|
+
:class="[{
|
|
5
|
+
'is-danger': error,
|
|
6
|
+
'is-warning': warning,
|
|
7
|
+
'form-theme__item--align-top': alignTop,
|
|
8
|
+
'form-theme__item--text': text,
|
|
9
|
+
'form-theme__item--file': file,
|
|
10
|
+
'form-theme__item--select': select,
|
|
11
|
+
'form-theme__item--textarea': textarea
|
|
12
|
+
}]"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
defineProps({
|
|
20
|
+
/**
|
|
21
|
+
* If true, applies the error state styles.
|
|
22
|
+
*/
|
|
23
|
+
error: Boolean,
|
|
24
|
+
/**
|
|
25
|
+
* If true, applies the warning state styles.
|
|
26
|
+
*/
|
|
27
|
+
warning: Boolean,
|
|
28
|
+
/**
|
|
29
|
+
* If true, aligns the item to the top.
|
|
30
|
+
*/
|
|
31
|
+
alignTop: Boolean,
|
|
32
|
+
/**
|
|
33
|
+
* If true, applies the text item styles.
|
|
34
|
+
*/
|
|
35
|
+
text: Boolean,
|
|
36
|
+
/**
|
|
37
|
+
* If true, applies the file item styles.
|
|
38
|
+
*/
|
|
39
|
+
file: Boolean,
|
|
40
|
+
/**
|
|
41
|
+
* If true, applies the select item styles.
|
|
42
|
+
*/
|
|
43
|
+
select: Boolean,
|
|
44
|
+
/**
|
|
45
|
+
* If true, applies the textarea item styles.
|
|
46
|
+
*/
|
|
47
|
+
textarea: Boolean
|
|
48
|
+
});
|
|
49
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<p class="
|
|
3
|
-
'
|
|
4
|
-
'
|
|
2
|
+
<p class="form-theme__description" :class="{
|
|
3
|
+
'form-theme__error' : error,
|
|
4
|
+
'form-theme__warning' : warning
|
|
5
5
|
}">
|
|
6
6
|
<UluIcon v-if="error || warning" :icon="`type:${ error ? 'error' : 'warning' }`" />
|
|
7
7
|
<slot/>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<input
|
|
3
|
+
type="radio"
|
|
4
|
+
:id="id"
|
|
5
|
+
:name="name"
|
|
6
|
+
:value="value"
|
|
7
|
+
:checked="modelValue === value"
|
|
8
|
+
@change="$emit('update:modelValue', value)"
|
|
9
|
+
:required="required"
|
|
10
|
+
>
|
|
11
|
+
<label :for="id">
|
|
12
|
+
<slot>
|
|
13
|
+
{{ label }}<UluFormRequiredChar v-if="required" />
|
|
14
|
+
</slot>
|
|
15
|
+
</label>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import { newId } from "../../utils/dom.js";
|
|
20
|
+
import UluFormRequiredChar from "./UluFormRequiredChar.vue";
|
|
21
|
+
|
|
22
|
+
defineProps({
|
|
23
|
+
/**
|
|
24
|
+
* The label for the radio button.
|
|
25
|
+
*/
|
|
26
|
+
label: String,
|
|
27
|
+
/**
|
|
28
|
+
* The value of the selected radio button in the group (for v-model).
|
|
29
|
+
*/
|
|
30
|
+
modelValue: [String, Number],
|
|
31
|
+
/**
|
|
32
|
+
* The value of this radio button.
|
|
33
|
+
*/
|
|
34
|
+
value: [String, Number],
|
|
35
|
+
/**
|
|
36
|
+
* The name of the radio button group.
|
|
37
|
+
*/
|
|
38
|
+
name: String,
|
|
39
|
+
/**
|
|
40
|
+
* If true, the field will be required.
|
|
41
|
+
*/
|
|
42
|
+
required: Boolean
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
defineEmits(['update:modelValue']);
|
|
46
|
+
|
|
47
|
+
const id = newId();
|
|
48
|
+
</script>
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
</div>
|
|
2
|
+
<label :class="{ 'hidden-visually' : labelHidden }" :for="id">
|
|
3
|
+
<slot name="label">
|
|
4
|
+
{{ label }}<UluFormRequiredChar v-if="required" />
|
|
5
|
+
</slot>
|
|
6
|
+
</label>
|
|
7
|
+
<select
|
|
8
|
+
:id="id"
|
|
9
|
+
:value="modelValue"
|
|
10
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
11
|
+
:required="required"
|
|
12
|
+
>
|
|
13
|
+
<option disabled value="">Please select one</option>
|
|
14
|
+
<option v-for="(option, index) in options" :key="index" :value="option.value">
|
|
15
|
+
{{ option.text }}
|
|
16
|
+
</option>
|
|
17
|
+
</select>
|
|
19
18
|
</template>
|
|
20
19
|
|
|
21
20
|
<script setup>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return () => `select-id-${++count}`;
|
|
25
|
-
})();
|
|
21
|
+
import { newId } from "../../utils/dom.js";
|
|
22
|
+
import UluFormRequiredChar from "./UluFormRequiredChar.vue";
|
|
26
23
|
|
|
27
24
|
defineProps({
|
|
28
25
|
/**
|
|
@@ -40,10 +37,14 @@
|
|
|
40
37
|
/**
|
|
41
38
|
* If true, the label will be visually hidden.
|
|
42
39
|
*/
|
|
43
|
-
labelHidden: Boolean
|
|
40
|
+
labelHidden: Boolean,
|
|
41
|
+
/**
|
|
42
|
+
* If true, the field will be required.
|
|
43
|
+
*/
|
|
44
|
+
required: Boolean
|
|
44
45
|
});
|
|
45
46
|
|
|
46
47
|
defineEmits(['update:modelValue']);
|
|
47
48
|
|
|
48
|
-
const id =
|
|
49
|
+
const id = newId();
|
|
49
50
|
</script>
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</div>
|
|
2
|
+
<label :class="{ 'hidden-visually' : labelHidden }" :for="id">
|
|
3
|
+
<slot name="label">
|
|
4
|
+
{{ label }}<UluFormRequiredChar v-if="required" />
|
|
5
|
+
</slot>
|
|
6
|
+
</label>
|
|
7
|
+
<input
|
|
8
|
+
type="text"
|
|
9
|
+
:value="modelValue"
|
|
10
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
11
|
+
:id="id"
|
|
12
|
+
:required="required"
|
|
13
|
+
>
|
|
15
14
|
</template>
|
|
16
15
|
|
|
17
16
|
<script setup>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return () => `text-input-id-${++count}`;
|
|
21
|
-
})();
|
|
17
|
+
import { newId } from "../../utils/dom.js";
|
|
18
|
+
import UluFormRequiredChar from "./UluFormRequiredChar.vue";
|
|
22
19
|
|
|
23
20
|
defineProps({
|
|
24
21
|
/**
|
|
@@ -32,10 +29,14 @@
|
|
|
32
29
|
/**
|
|
33
30
|
* If true, the label will be visually hidden.
|
|
34
31
|
*/
|
|
35
|
-
labelHidden: Boolean
|
|
32
|
+
labelHidden: Boolean,
|
|
33
|
+
/**
|
|
34
|
+
* If true, the field will be required.
|
|
35
|
+
*/
|
|
36
|
+
required: Boolean
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
defineEmits(['update:modelValue']);
|
|
39
40
|
|
|
40
|
-
const id =
|
|
41
|
+
const id = newId();
|
|
41
42
|
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<label :class="{ 'hidden-visually' : labelHidden }" :for="id">
|
|
3
|
+
<slot name="label">
|
|
4
|
+
{{ label }}<UluFormRequiredChar v-if="required" />
|
|
5
|
+
</slot>
|
|
6
|
+
</label>
|
|
7
|
+
<textarea
|
|
8
|
+
:value="modelValue"
|
|
9
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
10
|
+
:id="id"
|
|
11
|
+
:required="required"
|
|
12
|
+
></textarea>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup>
|
|
16
|
+
import { newId } from "../../utils/dom.js";
|
|
17
|
+
import UluFormRequiredChar from "./UluFormRequiredChar.vue";
|
|
18
|
+
|
|
19
|
+
defineProps({
|
|
20
|
+
/**
|
|
21
|
+
* The label for the textarea.
|
|
22
|
+
*/
|
|
23
|
+
label: String,
|
|
24
|
+
/**
|
|
25
|
+
* The value of the textarea (for v-model).
|
|
26
|
+
*/
|
|
27
|
+
modelValue: String,
|
|
28
|
+
/**
|
|
29
|
+
* If true, the label will be visually hidden.
|
|
30
|
+
*/
|
|
31
|
+
labelHidden: Boolean,
|
|
32
|
+
/**
|
|
33
|
+
* If true, the field will be required.
|
|
34
|
+
*/
|
|
35
|
+
required: Boolean
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
defineEmits(['update:modelValue']);
|
|
39
|
+
|
|
40
|
+
const id = newId();
|
|
41
|
+
</script>
|
package/lib/components/index.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* - Used in main plugin and bundle exports
|
|
5
5
|
*/
|
|
6
6
|
export { default as UluAccordion } from './collapsible/UluAccordion.vue';
|
|
7
|
+
export { default as UluAccordionGroup } from './collapsible/UluAccordionGroup.vue';
|
|
7
8
|
export { default as UluCollapsible } from './collapsible/UluCollapsible.vue';
|
|
8
9
|
export { default as UluDropdown } from './collapsible/UluDropdown.vue';
|
|
9
10
|
export { default as UluModal } from './collapsible/UluModal.vue';
|
|
@@ -25,6 +26,7 @@ export { default as UluExternalLink } from './elements/UluExternalLink.vue';
|
|
|
25
26
|
export { default as UluIcon } from './elements/UluIcon.vue';
|
|
26
27
|
export { default as UluList } from './elements/UluList.vue';
|
|
27
28
|
export { default as UluMain } from './elements/UluMain.vue';
|
|
29
|
+
export { default as UluRule } from './elements/UluRule.vue';
|
|
28
30
|
export { default as UluSpokeSpinner } from './elements/UluSpokeSpinner.vue';
|
|
29
31
|
export { default as UluTag } from './elements/UluTag.vue';
|
|
30
32
|
export { default as UluSelectableMenu } from './forms/UluSelectableMenu.vue';
|
|
@@ -34,9 +36,19 @@ export { default as UluFormMessage } from './forms/UluFormMessage.vue';
|
|
|
34
36
|
export { default as UluFormSelect } from './forms/UluFormSelect.vue';
|
|
35
37
|
export { default as UluFormText } from './forms/UluFormText.vue';
|
|
36
38
|
export { default as UluSearchForm } from './forms/UluSearchForm.vue';
|
|
39
|
+
export { default as UluForm } from './forms/UluForm.vue';
|
|
40
|
+
export { default as UluFormActions } from './forms/UluFormActions.vue';
|
|
41
|
+
export { default as UluFormCheckbox } from './forms/UluFormCheckbox.vue';
|
|
42
|
+
export { default as UluFormFieldset } from './forms/UluFormFieldset.vue';
|
|
43
|
+
export { default as UluFormItem } from './forms/UluFormItem.vue';
|
|
44
|
+
export { default as UluFormItemsInline } from './forms/UluFormItemsInline.vue';
|
|
45
|
+
export { default as UluFormRadio } from './forms/UluFormRadio.vue';
|
|
46
|
+
export { default as UluFormRequiredChar } from './forms/UluFormRequiredChar.vue';
|
|
47
|
+
export { default as UluFormTextarea } from './forms/UluFormTextarea.vue';
|
|
37
48
|
export { default as UluAdaptiveLayout } from './layout/UluAdaptiveLayout.vue';
|
|
38
49
|
export { default as UluDataGrid } from './layout/UluDataGrid.vue';
|
|
39
50
|
export { default as UluTitleRail } from './layout/UluTitleRail.vue';
|
|
51
|
+
export { default as UluWhenBreakpoint } from './layout/UluWhenBreakpoint.vue';
|
|
40
52
|
export { default as UluBreadcrumb } from './navigation/UluBreadcrumb.vue';
|
|
41
53
|
export { default as UluMenu } from './navigation/UluMenu.vue';
|
|
42
54
|
export { default as UluMenuStack } from './navigation/UluMenuStack.vue';
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
<script setup>
|
|
57
57
|
import UluIcon from '../elements/UluIcon.vue';
|
|
58
|
-
|
|
59
|
-
let pagerCounter = 0;
|
|
58
|
+
import { newId } from '../../utils/dom.js';
|
|
60
59
|
|
|
61
60
|
const props = defineProps({
|
|
62
61
|
/**
|
|
@@ -89,7 +88,7 @@ const props = defineProps({
|
|
|
89
88
|
}
|
|
90
89
|
});
|
|
91
90
|
|
|
92
|
-
const headingId =
|
|
91
|
+
const headingId = newId('ulu-pager');
|
|
93
92
|
|
|
94
93
|
/**
|
|
95
94
|
* Generates the title for a page link.
|
|
@@ -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) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="facets-search">
|
|
3
|
-
<label :class="classes.
|
|
2
|
+
<div class="facets-search" :class="classes.container">
|
|
3
|
+
<label :class="classes.label" :for="id">
|
|
4
4
|
<strong>Search</strong>
|
|
5
5
|
</label>
|
|
6
6
|
<input
|
|
7
7
|
:id="id"
|
|
8
|
-
:class="classes.
|
|
8
|
+
:class="classes.input"
|
|
9
9
|
v-model="localValue"
|
|
10
10
|
type="text"
|
|
11
11
|
:placeholder="placeholder"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<script setup>
|
|
17
17
|
import { computed } from 'vue';
|
|
18
|
+
import { newId } from '../../../utils/dom.js';
|
|
18
19
|
|
|
19
20
|
const props = defineProps({
|
|
20
21
|
classes: {
|
|
@@ -30,8 +31,7 @@
|
|
|
30
31
|
|
|
31
32
|
const emit = defineEmits(['update:modelValue']);
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
const id = `facet-view-keyword-${++uid}`;
|
|
34
|
+
const id = newId('facet-view-keyword');
|
|
35
35
|
|
|
36
36
|
const localValue = computed({
|
|
37
37
|
get() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="facets-sort" :class="classes.
|
|
2
|
+
<div class="facets-sort" :class="classes.container">
|
|
3
3
|
<label
|
|
4
4
|
:for="sortId"
|
|
5
|
-
:class="classes.
|
|
5
|
+
:class="classes.label"
|
|
6
6
|
>
|
|
7
7
|
<slot>Sort:</slot>
|
|
8
8
|
</label>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:value="modelValue"
|
|
11
11
|
@change="emit('update:modelValue', $event.target.value)"
|
|
12
12
|
:id="sortId"
|
|
13
|
-
:class="classes.
|
|
13
|
+
:class="classes.select"
|
|
14
14
|
>
|
|
15
15
|
<option v-for="(item, key) in sortTypes" :value="key" :key="key">
|
|
16
16
|
{{ item.text }}
|
|
@@ -20,9 +20,7 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script setup>
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
let idCounter = 0;
|
|
23
|
+
import { newId } from '../../../utils/dom.js';
|
|
26
24
|
|
|
27
25
|
defineProps({
|
|
28
26
|
classes: {
|
|
@@ -41,5 +39,5 @@
|
|
|
41
39
|
|
|
42
40
|
const emit = defineEmits(['update:modelValue']);
|
|
43
41
|
|
|
44
|
-
const sortId =
|
|
42
|
+
const sortId = newId('ulu-facet-sort');
|
|
45
43
|
</script>
|
|
@@ -105,6 +105,9 @@ Changes:
|
|
|
105
105
|
// User can override these styles
|
|
106
106
|
// - Think this is better than props/etc
|
|
107
107
|
// - Refactored from props to just plain css to be overridden
|
|
108
|
+
.scroll-anchors__nav {
|
|
109
|
+
position: relative;
|
|
110
|
+
}
|
|
108
111
|
.scroll-anchors__rail {
|
|
109
112
|
border-left: 3px solid rgb(220, 220, 220);
|
|
110
113
|
padding-left: 1rem;
|
|
@@ -9,16 +9,7 @@ export default {
|
|
|
9
9
|
* @type {String}
|
|
10
10
|
*/
|
|
11
11
|
directiveName: "ulu-tooltip",
|
|
12
|
-
|
|
13
|
-
* The element that the tooltip should be rendered within
|
|
14
|
-
* - Default bottom of the body (on top of everything)
|
|
15
|
-
* - Doesn't need to be inline for accessibility since tooltips are just an enhancement
|
|
16
|
-
* content displayed within them should be hidden for assistive devices,
|
|
17
|
-
* they are not visible to assistive devices
|
|
18
|
-
* @type {String}
|
|
19
|
-
*/
|
|
20
|
-
tooltipTeleportTo: "body",
|
|
21
|
-
},
|
|
12
|
+
},
|
|
22
13
|
/**
|
|
23
14
|
* Default Popover Options
|
|
24
15
|
*/
|
|
@@ -59,6 +50,15 @@ export default {
|
|
|
59
50
|
* @type {Object}
|
|
60
51
|
*/
|
|
61
52
|
tooltip: {
|
|
53
|
+
/**
|
|
54
|
+
* The element that the tooltip should be rendered within
|
|
55
|
+
* - Default bottom of the body if this is unset
|
|
56
|
+
* - Doesn't need to be inline for accessibility since tooltips are just an enhancement
|
|
57
|
+
* content displayed within them should be hidden for assistive devices,
|
|
58
|
+
* they are not visible to assistive devices
|
|
59
|
+
* @type {String}
|
|
60
|
+
*/
|
|
61
|
+
teleportTo: null,
|
|
62
62
|
/**
|
|
63
63
|
* Optional class binding for tooltip element
|
|
64
64
|
* @type {String|Object|Array}
|