@ulu/frontend-vue 0.1.0-beta.1
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/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/breakpoints-ClT9bfZm.js +211 -0
- package/dist/frontend-vue.css +1 -0
- package/dist/frontend-vue.js +82 -0
- package/dist/frontend-vue.umd.cjs +561 -0
- package/dist/index-P5Rwl_Dl.js +7263 -0
- package/dist/index.es-HlG3u0J5.js +3134 -0
- package/lib/_index.scss +14 -0
- package/lib/components/_index.scss +6 -0
- package/lib/components/collapsible/UluAccordion.vue +82 -0
- package/lib/components/collapsible/UluCollapsibleRegion.vue +278 -0
- package/lib/components/collapsible/UluDropdown.vue +42 -0
- package/lib/components/collapsible/UluModal.vue +384 -0
- package/lib/components/collapsible/UluOverflowPopover.vue +52 -0
- package/lib/components/collapsible/UluTab.vue +9 -0
- package/lib/components/collapsible/UluTabGroup.vue +31 -0
- package/lib/components/collapsible/UluTabList.vue +9 -0
- package/lib/components/collapsible/UluTabPanel.vue +9 -0
- package/lib/components/collapsible/UluTabPanels.vue +9 -0
- package/lib/components/elements/UluAlert.vue +81 -0
- package/lib/components/elements/UluBadge.vue +58 -0
- package/lib/components/elements/UluBadgeStack.vue +27 -0
- package/lib/components/elements/UluButton.vue +161 -0
- package/lib/components/elements/UluCallout.vue +30 -0
- package/lib/components/elements/UluCard.vue +241 -0
- package/lib/components/elements/UluDefinitionList.vue +40 -0
- package/lib/components/elements/UluExternalLink.vue +47 -0
- package/lib/components/elements/UluIcon.vue +108 -0
- package/lib/components/elements/UluList.vue +87 -0
- package/lib/components/elements/UluMain.vue +5 -0
- package/lib/components/elements/UluSpokeSpinner.vue +25 -0
- package/lib/components/elements/UluTag.vue +53 -0
- package/lib/components/forms/UluCheckboxMenu.vue +36 -0
- package/lib/components/forms/UluFileDisplay.vue +39 -0
- package/lib/components/forms/UluFormDropzone.vue +62 -0
- package/lib/components/forms/UluFormFile.vue +47 -0
- package/lib/components/forms/UluFormMessage.vue +20 -0
- package/lib/components/forms/UluFormSelect.vue +37 -0
- package/lib/components/forms/UluFormText.vue +32 -0
- package/lib/components/forms/UluSearchForm.vue +31 -0
- package/lib/components/index.js +54 -0
- package/lib/components/layout/UluAdaptiveLayout.vue +11 -0
- package/lib/components/layout/UluDataGrid.vue +41 -0
- package/lib/components/layout/UluTitleRail.vue +56 -0
- package/lib/components/layout/UluWhenBreakpoint.vue +86 -0
- package/lib/components/navigation/UluBreadcrumb.vue +72 -0
- package/lib/components/navigation/UluMenu.vue +105 -0
- package/lib/components/navigation/UluMenuStack.vue +49 -0
- package/lib/components/navigation/UluNavStrip.vue +48 -0
- package/lib/components/navigation/UluSkipLink.vue +5 -0
- package/lib/components/systems/facets/UluFacets.vue +380 -0
- package/lib/components/systems/facets/UluFacetsList.vue +39 -0
- package/lib/components/systems/facets/UluFacetsSearch.vue +67 -0
- package/lib/components/systems/facets/_facets.scss +64 -0
- package/lib/components/systems/index.js +17 -0
- package/lib/components/systems/scroll-anchors/UluScrollAnchors.vue +152 -0
- package/lib/components/systems/scroll-anchors/UluScrollAnchorsNav.vue +37 -0
- package/lib/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue +124 -0
- package/lib/components/systems/scroll-anchors/UluScrollAnchorsSection.vue +63 -0
- package/lib/components/systems/scroll-anchors/symbols.js +6 -0
- package/lib/components/systems/skeleton/UluShowSkeleton.vue +13 -0
- package/lib/components/systems/skeleton/UluSkeletonContent.vue +60 -0
- package/lib/components/systems/skeleton/UluSkeletonMedia.vue +11 -0
- package/lib/components/systems/skeleton/UluSkeletonTextInline.vue +9 -0
- package/lib/components/systems/slider/UluImageSlideShow.vue +75 -0
- package/lib/components/systems/slider/UluSlideShow.vue +331 -0
- package/lib/components/systems/slider/UluSlideShowSlide.vue +25 -0
- package/lib/components/systems/table-sticky/UluTableSticky.vue +793 -0
- package/lib/components/systems/table-sticky/UluTableStickyRows.vue +73 -0
- package/lib/components/systems/table-sticky/UluTableStickyTable.vue +237 -0
- package/lib/components/systems/table-sticky/_table-sticky.scss +185 -0
- package/lib/components/utils/UluCondText.vue +28 -0
- package/lib/components/utils/UluEmpty.vue +3 -0
- package/lib/components/utils/UluEmptyView.vue +3 -0
- package/lib/components/utils/UluPlaceholderImage.vue +53 -0
- package/lib/components/utils/UluPlaceholderText.vue +25 -0
- package/lib/components/utils/UluRouteAnnouncer.vue +83 -0
- package/lib/components/visualizations/UluAnimateNumber.vue +32 -0
- package/lib/components/visualizations/UluProgressBar.vue +94 -0
- package/lib/components/visualizations/UluProgressDonut.vue +97 -0
- package/lib/composables/index.js +10 -0
- package/lib/composables/useBreakpointManager.js +68 -0
- package/lib/composables/useIcon.js +62 -0
- package/lib/composables/useModifiers.js +93 -0
- package/lib/composables/useWindowResize.js +64 -0
- package/lib/index.js +10 -0
- package/lib/plugins/_index.scss +7 -0
- package/lib/plugins/breakpoints/index.js +47 -0
- package/lib/plugins/index.js +11 -0
- package/lib/plugins/modals/UluModalsDisplay.vue +59 -0
- package/lib/plugins/modals/api.js +76 -0
- package/lib/plugins/modals/index.js +60 -0
- package/lib/plugins/modals/useModals.js +9 -0
- package/lib/plugins/popovers/UluPopover.vue +189 -0
- package/lib/plugins/popovers/UluTooltipDisplay.vue +15 -0
- package/lib/plugins/popovers/UluTooltipPopover.vue +83 -0
- package/lib/plugins/popovers/defaults.js +108 -0
- package/lib/plugins/popovers/directive.js +95 -0
- package/lib/plugins/popovers/index.js +18 -0
- package/lib/plugins/popovers/manager.js +54 -0
- package/lib/plugins/popovers/useFollow.js +80 -0
- package/lib/plugins/popovers/utils.js +5 -0
- package/lib/plugins/toast/UluToast.vue +87 -0
- package/lib/plugins/toast/UluToastDisplay.vue +35 -0
- package/lib/plugins/toast/_toast.scss +198 -0
- package/lib/plugins/toast/defaults.js +30 -0
- package/lib/plugins/toast/index.js +17 -0
- package/lib/plugins/toast/store.js +71 -0
- package/lib/plugins/toast/useToast.js +18 -0
- package/lib/settings.js +119 -0
- package/lib/utils/dom.js +14 -0
- package/lib/utils/placeholder.js +6 -0
- package/lib/utils/vue-router.js +219 -0
- package/package.json +75 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="listElement"
|
|
4
|
+
:class="[
|
|
5
|
+
{
|
|
6
|
+
'list-ordered' : ordered,
|
|
7
|
+
'list-unordered' : unordered,
|
|
8
|
+
'list-lines' : lines,
|
|
9
|
+
'list-compact' : compact,
|
|
10
|
+
},
|
|
11
|
+
classes.list
|
|
12
|
+
]"
|
|
13
|
+
:style="{
|
|
14
|
+
listStyleType: listStyleType
|
|
15
|
+
}"
|
|
16
|
+
:reversed="reversed"
|
|
17
|
+
:start="start"
|
|
18
|
+
>
|
|
19
|
+
<li
|
|
20
|
+
v-for="(item, index) in items"
|
|
21
|
+
:key="index"
|
|
22
|
+
:class="classes.listItem"
|
|
23
|
+
>
|
|
24
|
+
<slot :item="item" :index="index">
|
|
25
|
+
{{ item }}
|
|
26
|
+
</slot>
|
|
27
|
+
</li>
|
|
28
|
+
</component>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
export default {
|
|
33
|
+
name: "UluList",
|
|
34
|
+
props: {
|
|
35
|
+
/**
|
|
36
|
+
* Array of list items, output as is or use slot to template the item
|
|
37
|
+
*/
|
|
38
|
+
items: Array,
|
|
39
|
+
/**
|
|
40
|
+
* Classes object (keys are list and listItem to be applied to <ul> and <li>)
|
|
41
|
+
* - Any valid class binding for each
|
|
42
|
+
*/
|
|
43
|
+
classes: {
|
|
44
|
+
type: Object,
|
|
45
|
+
default: () => ({})
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* Use list-ordered class, and sets element to <ol>
|
|
49
|
+
*/
|
|
50
|
+
ordered: Boolean,
|
|
51
|
+
/**
|
|
52
|
+
* Use list-unordered class
|
|
53
|
+
*/
|
|
54
|
+
unordered: Boolean,
|
|
55
|
+
/**
|
|
56
|
+
* Use list-lines class
|
|
57
|
+
*/
|
|
58
|
+
lines: Boolean,
|
|
59
|
+
/**
|
|
60
|
+
* Use list-compact class
|
|
61
|
+
*/
|
|
62
|
+
compact: Boolean,
|
|
63
|
+
/**
|
|
64
|
+
* If setting up custom ordered list this will ensure the correct element type
|
|
65
|
+
* - Note: 'ordered' prop sets the ordered list class, this does not
|
|
66
|
+
*/
|
|
67
|
+
forceOrdered: Boolean,
|
|
68
|
+
/**
|
|
69
|
+
* Define the start value for <ol>
|
|
70
|
+
*/
|
|
71
|
+
start: String,
|
|
72
|
+
/**
|
|
73
|
+
* Reverse ordered list
|
|
74
|
+
*/
|
|
75
|
+
reversed: Boolean,
|
|
76
|
+
/**
|
|
77
|
+
* Define list style type (ie. disc, decimal, etc)
|
|
78
|
+
*/
|
|
79
|
+
listStyleType: String,
|
|
80
|
+
},
|
|
81
|
+
computed: {
|
|
82
|
+
listElement() {
|
|
83
|
+
return this.ordered || this.forceOrdered ? "ol" : "ul";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="spoke-spinner" :class="modifierClass">
|
|
3
|
+
<div class="spoke-spinner__spinner">
|
|
4
|
+
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: "UluSpokeSpinner",
|
|
12
|
+
props: {
|
|
13
|
+
/**
|
|
14
|
+
* Type modifier for spinner (ie match scss style name)
|
|
15
|
+
*/
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
modifierClass() {
|
|
20
|
+
const { type } = this;
|
|
21
|
+
return type ? `spoke-spinner--${ type }` : null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
class="tag"
|
|
4
|
+
:class="[
|
|
5
|
+
{
|
|
6
|
+
'tag--small' : small,
|
|
7
|
+
'type-small' : small,
|
|
8
|
+
[`tag--${ type }`] : type
|
|
9
|
+
},
|
|
10
|
+
resolvedModifiers
|
|
11
|
+
]"
|
|
12
|
+
>
|
|
13
|
+
<UluIcon v-if="icon" :definition="icon" />
|
|
14
|
+
<slot>
|
|
15
|
+
{{ text }}
|
|
16
|
+
</slot>
|
|
17
|
+
</span>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
import UluIcon from "./UluIcon.vue";
|
|
22
|
+
import { useModifiers } from "../../composables/useModifiers.js";
|
|
23
|
+
export default {
|
|
24
|
+
name: "UluTag",
|
|
25
|
+
components: {
|
|
26
|
+
UluIcon
|
|
27
|
+
},
|
|
28
|
+
props: {
|
|
29
|
+
type: [String],
|
|
30
|
+
/**
|
|
31
|
+
* Preset to set small modifier and small type size
|
|
32
|
+
*/
|
|
33
|
+
small: Boolean,
|
|
34
|
+
/**
|
|
35
|
+
* Text for tag, or use slot
|
|
36
|
+
*/
|
|
37
|
+
text: [String, Number],
|
|
38
|
+
/**
|
|
39
|
+
* Icon prop, if used will set the icon for the button, will use UluIcon (which uses font-awesome icons conditionally)
|
|
40
|
+
* - If using custom icons use slot instead
|
|
41
|
+
*/
|
|
42
|
+
icon: [String, Array],
|
|
43
|
+
/**
|
|
44
|
+
* Modifiers for tag class
|
|
45
|
+
*/
|
|
46
|
+
modifiers: [String, Array]
|
|
47
|
+
},
|
|
48
|
+
setup(props) {
|
|
49
|
+
const { resolvedModifiers } = useModifiers({ props, baseClass: "tag" });
|
|
50
|
+
return { resolvedModifiers };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ul class="site-menu site-form">
|
|
3
|
+
<li
|
|
4
|
+
class="site-menu__item"
|
|
5
|
+
v-for="(option, index) in options"
|
|
6
|
+
:key="index"
|
|
7
|
+
>
|
|
8
|
+
<div class="site-menu__checkbox">
|
|
9
|
+
<input
|
|
10
|
+
type="checkbox"
|
|
11
|
+
:id="getId(index)"
|
|
12
|
+
v-model="option.checked"
|
|
13
|
+
>
|
|
14
|
+
<label :for="getId(index)">
|
|
15
|
+
<slot>
|
|
16
|
+
{{ option?.title || option?.text }}
|
|
17
|
+
</slot>
|
|
18
|
+
</label>
|
|
19
|
+
</div>
|
|
20
|
+
</li>
|
|
21
|
+
</ul>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
export default {
|
|
26
|
+
name: "UluCheckboxMenu",
|
|
27
|
+
props: {
|
|
28
|
+
options: Array
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
getId(index) {
|
|
32
|
+
return `checkbox-menu-opt-${ index }`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a class="layout-flex-baseline" :href="fileUrl" :download="file.name">
|
|
3
|
+
<FaIcon class="ui-icon" :icon="['far', $site.getIcon('file')]"/>
|
|
4
|
+
<span class="margin-left-small-x">
|
|
5
|
+
{{ file.name }}
|
|
6
|
+
<span class="tag tag--small tag--outline type-small-x">{{ fileSize }}</span>
|
|
7
|
+
</span>
|
|
8
|
+
</a>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: "FileDisplay",
|
|
14
|
+
props: {
|
|
15
|
+
file: {
|
|
16
|
+
required: true,
|
|
17
|
+
type: Object
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
computed: {
|
|
21
|
+
fileUrl() {
|
|
22
|
+
return window.URL.createObjectURL(this.file);
|
|
23
|
+
},
|
|
24
|
+
fileSize() {
|
|
25
|
+
const { size } = this.file;
|
|
26
|
+
const Mbs = size / 1000000;
|
|
27
|
+
const Kbs = size / 1000;
|
|
28
|
+
const format = n => parseFloat(n.toFixed(2));
|
|
29
|
+
// Either display Mbs or Kbs if less than 1 Mb
|
|
30
|
+
/* eslint-disable */
|
|
31
|
+
return Mbs > 1 ?
|
|
32
|
+
`${ format(Mbs) }Mb` : Kbs > 1 ?
|
|
33
|
+
`${ format(Kbs) }Kb` :
|
|
34
|
+
`${ format(size) }B`;
|
|
35
|
+
/* eslint-enable */
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!-- Based on https://react-dropzone.js.org/#section-basic-example -->
|
|
2
|
+
<template>
|
|
3
|
+
<div
|
|
4
|
+
class="site-dropzone site-form__item site-form__item--file"
|
|
5
|
+
:class="{ 'is-danger' : fileErrors.length }"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
class="site-dropzone__target"
|
|
9
|
+
:class="{
|
|
10
|
+
'site-dropzone__target--dropping' : isDragActive
|
|
11
|
+
}"
|
|
12
|
+
v-bind="getRootProps()"
|
|
13
|
+
>
|
|
14
|
+
<input v-bind="getInputProps()" />
|
|
15
|
+
<div class="site-dropzone__instructions">
|
|
16
|
+
<strong class="type-normal">
|
|
17
|
+
Drag 'n' drop files here, or click to select
|
|
18
|
+
</strong>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<p class="site-form__description">
|
|
22
|
+
<em>Only images allowed (.jpg, .png)</em>
|
|
23
|
+
</p>
|
|
24
|
+
<div v-if="fileErrors.length" class="site-dropzone__errors site-form__description site-form__error">
|
|
25
|
+
<ul class="list-unordered">
|
|
26
|
+
<li v-for="(fileErr, index) in fileErrors" :key="index">
|
|
27
|
+
<strong>{{ fileErr.file.name }}</strong>:
|
|
28
|
+
<span>{{ fileErr.errors.map(e => e.message).join() }}</span>
|
|
29
|
+
</li>
|
|
30
|
+
</ul>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="site-dropzone__display margin-top" v-if="files.length">
|
|
33
|
+
<strong>Files</strong>
|
|
34
|
+
<FilesDisplay class="site-dropzone__list" :files="files"/>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup>
|
|
40
|
+
import { ref } from "vue";
|
|
41
|
+
import { useDropzone } from "vue3-dropzone";
|
|
42
|
+
|
|
43
|
+
const files = ref([]);
|
|
44
|
+
const fileErrors = ref([]);
|
|
45
|
+
|
|
46
|
+
const $emit = defineEmits(["filesChange"]);
|
|
47
|
+
|
|
48
|
+
const { getRootProps, getInputProps, isDragActive } = useDropzone({
|
|
49
|
+
onDrop: (acceptFiles, rejectReasons) => {
|
|
50
|
+
if (rejectReasons) {
|
|
51
|
+
fileErrors.value = rejectReasons.map(err => err);
|
|
52
|
+
} else {
|
|
53
|
+
fileErrors.value = [];
|
|
54
|
+
}
|
|
55
|
+
if (acceptFiles.length) {
|
|
56
|
+
files.value = acceptFiles.map(file => file);
|
|
57
|
+
$emit("filesChange", files.value);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
accept: [".png", ".jpg", ".jpeg"]
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="site-form__item site-form__item--file">
|
|
3
|
+
<label
|
|
4
|
+
:class="{ 'hidden-visually' : labelHidden }"
|
|
5
|
+
:for="id"
|
|
6
|
+
>
|
|
7
|
+
<slot name="label">
|
|
8
|
+
{{ label }}
|
|
9
|
+
</slot>
|
|
10
|
+
</label>
|
|
11
|
+
<input
|
|
12
|
+
type="file"
|
|
13
|
+
@change="onChangeFile"
|
|
14
|
+
:multiple="multiple"
|
|
15
|
+
:id="id"
|
|
16
|
+
v-bind="inputAttrs"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
let count = 0;
|
|
23
|
+
export default {
|
|
24
|
+
name: "FormFile",
|
|
25
|
+
props: {
|
|
26
|
+
label: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "Select File"
|
|
29
|
+
},
|
|
30
|
+
labelHidden: Boolean,
|
|
31
|
+
noClasses: Boolean,
|
|
32
|
+
multiple: Boolean,
|
|
33
|
+
inputAttrs: Object
|
|
34
|
+
},
|
|
35
|
+
emits: ["filesChange"],
|
|
36
|
+
data() {
|
|
37
|
+
return {
|
|
38
|
+
id: `file-input-id-${ ++count }`
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
methods: {
|
|
42
|
+
onChangeFile(event) {
|
|
43
|
+
this.$emit("filesChange", event.target.files);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<p class="site-form__description" :class="{
|
|
3
|
+
'site-form__error' : error,
|
|
4
|
+
'site-form__warning' : warning
|
|
5
|
+
}">
|
|
6
|
+
<FaIcon v-if="error" :icon="$site.getIcon('error')"/>
|
|
7
|
+
<FaIcon v-if="warning" :icon="$site.getIcon('warning')"/>
|
|
8
|
+
<slot/>
|
|
9
|
+
</p>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
name: "FormMessage",
|
|
15
|
+
props: {
|
|
16
|
+
warning: Boolean,
|
|
17
|
+
error: Boolean,
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="site-form__item site-form__item--select">
|
|
3
|
+
<label :class="{ 'hidden-visually' : labelHidden }" :for="id">
|
|
4
|
+
<slot>
|
|
5
|
+
{{ label }}
|
|
6
|
+
</slot>
|
|
7
|
+
</label>
|
|
8
|
+
<select
|
|
9
|
+
:id="id"
|
|
10
|
+
:value="modelValue"
|
|
11
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
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>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
let count = 0;
|
|
23
|
+
export default {
|
|
24
|
+
name: "FormSelect",
|
|
25
|
+
props: {
|
|
26
|
+
label: String,
|
|
27
|
+
modelValue: String,
|
|
28
|
+
options: Array,
|
|
29
|
+
labelHidden: Boolean
|
|
30
|
+
},
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
id: `select-id-${ ++count }`
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="site-form__item site-form__item--text">
|
|
3
|
+
<label :class="{ 'hidden-visually' : labelHidden }" :for="id">
|
|
4
|
+
<slot>
|
|
5
|
+
{{ label }}
|
|
6
|
+
</slot>
|
|
7
|
+
</label>
|
|
8
|
+
<input
|
|
9
|
+
type="text"
|
|
10
|
+
:value="modelValue"
|
|
11
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
12
|
+
:id="id"
|
|
13
|
+
>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
let count = 0;
|
|
19
|
+
export default {
|
|
20
|
+
name: "FormText",
|
|
21
|
+
props: {
|
|
22
|
+
label: String,
|
|
23
|
+
modelValue: String,
|
|
24
|
+
labelHidden: Boolean
|
|
25
|
+
},
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
id: `text-input-id-${ ++count }`
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="form-theme search-form type-small">
|
|
3
|
+
<div class="search-form__field">
|
|
4
|
+
<label class="hidden-visually">Search</label>
|
|
5
|
+
<input
|
|
6
|
+
class="search-form__input"
|
|
7
|
+
type="text"
|
|
8
|
+
id="example-input"
|
|
9
|
+
:placeholder="placeholder"
|
|
10
|
+
>
|
|
11
|
+
</div>
|
|
12
|
+
<button
|
|
13
|
+
class="search-form__submit button button--primary"
|
|
14
|
+
aria-label="Submit Search"
|
|
15
|
+
>
|
|
16
|
+
<FaIcon :icon="$site.getIcon('search')"/>
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
export default {
|
|
23
|
+
name: "SearchForm",
|
|
24
|
+
props: {
|
|
25
|
+
placeholder: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "Titles, keyword…"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module components/index.js
|
|
3
|
+
* Responsible for exporting all components
|
|
4
|
+
* - Used in main plugin and bundle exports
|
|
5
|
+
*/
|
|
6
|
+
export { default as UluAccordion } from './collapsible/UluAccordion.vue';
|
|
7
|
+
export { default as UluCollapsibleRegion } from './collapsible/UluCollapsibleRegion.vue';
|
|
8
|
+
export { default as UluDropdown } from './collapsible/UluDropdown.vue';
|
|
9
|
+
export { default as UluModal } from './collapsible/UluModal.vue';
|
|
10
|
+
export { default as UluOverflowPopover } from './collapsible/UluOverflowPopover.vue';
|
|
11
|
+
export { default as UluTab } from './collapsible/UluTab.vue';
|
|
12
|
+
export { default as UluTabGroup } from './collapsible/UluTabGroup.vue';
|
|
13
|
+
export { default as UluTabList } from './collapsible/UluTabList.vue';
|
|
14
|
+
export { default as UluTabPanel } from './collapsible/UluTabPanel.vue';
|
|
15
|
+
export { default as UluTabPanels } from './collapsible/UluTabPanels.vue';
|
|
16
|
+
export { default as UluAlert } from './elements/UluAlert.vue';
|
|
17
|
+
export { default as UluBadge } from './elements/UluBadge.vue';
|
|
18
|
+
export { default as UluBadgeStack } from './elements/UluBadgeStack.vue';
|
|
19
|
+
export { default as UluButton } from './elements/UluButton.vue';
|
|
20
|
+
export { default as UluCallout } from './elements/UluCallout.vue';
|
|
21
|
+
export { default as UluCard } from './elements/UluCard.vue';
|
|
22
|
+
export { default as UluDefinitionList } from './elements/UluDefinitionList.vue';
|
|
23
|
+
export { default as UluExternalLink } from './elements/UluExternalLink.vue';
|
|
24
|
+
export { default as UluIcon } from './elements/UluIcon.vue';
|
|
25
|
+
export { default as UluList } from './elements/UluList.vue';
|
|
26
|
+
export { default as UluMain } from './elements/UluMain.vue';
|
|
27
|
+
export { default as UluSpokeSpinner } from './elements/UluSpokeSpinner.vue';
|
|
28
|
+
export { default as UluTag } from './elements/UluTag.vue';
|
|
29
|
+
export { default as UluCheckboxMenu } from './forms/UluCheckboxMenu.vue';
|
|
30
|
+
export { default as UluFileDisplay } from './forms/UluFileDisplay.vue';
|
|
31
|
+
export { default as UluFormDropzone } from './forms/UluFormDropzone.vue';
|
|
32
|
+
export { default as UluFormFile } from './forms/UluFormFile.vue';
|
|
33
|
+
export { default as UluFormMessage } from './forms/UluFormMessage.vue';
|
|
34
|
+
export { default as UluFormSelect } from './forms/UluFormSelect.vue';
|
|
35
|
+
export { default as UluFormText } from './forms/UluFormText.vue';
|
|
36
|
+
export { default as UluSearchForm } from './forms/UluSearchForm.vue';
|
|
37
|
+
export { default as UluAdaptiveLayout } from './layout/UluAdaptiveLayout.vue';
|
|
38
|
+
export { default as UluDataGrid } from './layout/UluDataGrid.vue';
|
|
39
|
+
export { default as UluTitleRail } from './layout/UluTitleRail.vue';
|
|
40
|
+
export { default as UluBreadcrumb } from './navigation/UluBreadcrumb.vue';
|
|
41
|
+
export { default as UluMenu } from './navigation/UluMenu.vue';
|
|
42
|
+
export { default as UluMenuStack } from './navigation/UluMenuStack.vue';
|
|
43
|
+
export { default as UluNavStrip } from './navigation/UluNavStrip.vue';
|
|
44
|
+
export { default as UluSkipLink } from './navigation/UluSkipLink.vue';
|
|
45
|
+
export { default as UluCondText } from './utils/UluCondText.vue';
|
|
46
|
+
export { default as UluEmpty } from './utils/UluEmpty.vue';
|
|
47
|
+
export { default as UluEmptyView } from './utils/UluEmptyView.vue';
|
|
48
|
+
export { default as UluPlaceholderImage } from './utils/UluPlaceholderImage.vue';
|
|
49
|
+
export { default as UluPlaceholderText } from './utils/UluPlaceholderText.vue';
|
|
50
|
+
export { default as UluRouteAnnouncer } from './utils/UluRouteAnnouncer.vue';
|
|
51
|
+
export { default as UluAnimateNumber } from './visualizations/UluAnimateNumber.vue';
|
|
52
|
+
export { default as UluProgressBar } from './visualizations/UluProgressBar.vue';
|
|
53
|
+
export { default as UluProgressDonut } from './visualizations/UluProgressDonut.vue';
|
|
54
|
+
export * from './systems/index.js';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SSR Version
|
|
3
|
+
|
|
4
|
+
Wrapper for simple CSS data-grid for support in Vue. Works normally
|
|
5
|
+
with jQuery plugin for row wrapping information to toggle rule classes.
|
|
6
|
+
This code uses a utility script for classes needed
|
|
7
|
+
|
|
8
|
+
Purpose:
|
|
9
|
+
- Print grid container
|
|
10
|
+
- Initialize a grid on a page
|
|
11
|
+
* Run the position detection in javascript and add positional classes
|
|
12
|
+
* Attach handler for resize
|
|
13
|
+
- Remove handlers on unmount
|
|
14
|
+
* Resize handler
|
|
15
|
+
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div>
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import { setPositionClasses } from "@ulu/frontend/js/utils/dom.js";
|
|
26
|
+
import { debounce } from "@ulu/utils/performance.js";
|
|
27
|
+
export default {
|
|
28
|
+
name: "UluDataGrid",
|
|
29
|
+
async mounted() {
|
|
30
|
+
const setClasses = () => setPositionClasses(this.$el);
|
|
31
|
+
setClasses();
|
|
32
|
+
this.resizeHandler = debounce(setClasses, 200, false, this);
|
|
33
|
+
window.addEventListener("resize", this.resizeHandler);
|
|
34
|
+
},
|
|
35
|
+
beforeUnmount() {
|
|
36
|
+
if (this.resizeHandler) {
|
|
37
|
+
window.removeEventListener("resize", this.resizeHandler);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="rail rail--title-rail">
|
|
3
|
+
<div class="rail__item rail__item--title" :class="classes.itemTitle">
|
|
4
|
+
<component
|
|
5
|
+
class="layout-flex type-max-width-small no-margin"
|
|
6
|
+
:is="titleElement"
|
|
7
|
+
:class="classes.title"
|
|
8
|
+
:style="{ alignItems: iconAlign }"
|
|
9
|
+
>
|
|
10
|
+
<UluIcon
|
|
11
|
+
v-if="icon || iconType"
|
|
12
|
+
:class="classes.icon"
|
|
13
|
+
:type="iconType"
|
|
14
|
+
:definition="icon"
|
|
15
|
+
/>
|
|
16
|
+
<slot>
|
|
17
|
+
{{ title }}
|
|
18
|
+
</slot>
|
|
19
|
+
</component>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-if="$slots.end" class="rail__item rail__item--pull">
|
|
22
|
+
<slot name="end"/>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import UluIcon from "../elements/UluIcon.vue";
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: "UluTitleRail",
|
|
32
|
+
components: {
|
|
33
|
+
UluIcon
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
icon: String,
|
|
37
|
+
iconAlign: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "baseline"
|
|
40
|
+
},
|
|
41
|
+
iconType: String,
|
|
42
|
+
classes: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: () => ({
|
|
45
|
+
title: "h2",
|
|
46
|
+
icon: "margin-right-small"
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
title: String,
|
|
50
|
+
titleElement: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "h2"
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
</script>
|