@ulu/frontend-vue 0.2.0-beta.8 → 0.3.0
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/components/collapsible/UluAccordionGroup.vue.d.ts +2 -2
- package/dist/components/collapsible/UluAccordionGroup.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluAccordionGroup.vue.js +22 -19
- package/dist/components/collapsible/UluDropdown.vue.d.ts +1 -1
- package/dist/components/collapsible/UluDropdown.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluDropdown.vue.js +22 -15
- package/dist/components/collapsible/UluModal.vue.d.ts +43 -248
- package/dist/components/collapsible/UluModal.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluModal.vue.js +139 -191
- package/dist/components/collapsible/UluTabGroup.vue.d.ts +2 -0
- package/dist/components/collapsible/UluTabGroup.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluTabGroup.vue.js +23 -14
- package/dist/components/elements/UluAlert.vue.d.ts +29 -144
- package/dist/components/elements/UluAlert.vue.d.ts.map +1 -1
- package/dist/components/elements/UluAlert.vue.js +39 -50
- package/dist/components/elements/UluBadge.vue.d.ts +6 -6
- package/dist/components/elements/UluBadgeStack.vue.d.ts +1 -1
- package/dist/components/elements/UluBadgeStack.vue.d.ts.map +1 -1
- package/dist/components/elements/UluBadgeStack.vue.js +12 -9
- package/dist/components/elements/UluButton.vue.d.ts +47 -177
- package/dist/components/elements/UluButton.vue.d.ts.map +1 -1
- package/dist/components/elements/UluButton.vue.js +59 -72
- package/dist/components/elements/UluButtonVerbose.vue.d.ts +38 -123
- package/dist/components/elements/UluButtonVerbose.vue.d.ts.map +1 -1
- package/dist/components/elements/UluButtonVerbose.vue.js +52 -65
- package/dist/components/elements/UluCallout.vue.d.ts +20 -25
- package/dist/components/elements/UluCallout.vue.d.ts.map +1 -1
- package/dist/components/elements/UluCallout.vue.js +11 -16
- package/dist/components/elements/UluCaptionedFigure.vue.d.ts +25 -0
- package/dist/components/elements/UluCaptionedFigure.vue.d.ts.map +1 -0
- package/dist/components/elements/UluCaptionedFigure.vue.js +48 -0
- package/dist/components/elements/UluCard.vue.d.ts +2 -2
- package/dist/components/elements/UluDefinitionList.vue.d.ts +4 -2
- package/dist/components/elements/UluDefinitionList.vue.d.ts.map +1 -1
- package/dist/components/elements/UluDefinitionList.vue.js +32 -28
- package/dist/components/elements/UluExternalLink.vue.d.ts +2 -2
- package/dist/components/elements/UluImage.vue.d.ts +14 -0
- package/dist/components/elements/UluImage.vue.d.ts.map +1 -0
- package/dist/components/elements/UluImage.vue.js +53 -0
- package/dist/components/elements/UluList.vue.d.ts.map +1 -1
- package/dist/components/elements/UluList.vue.js +14 -13
- package/dist/components/elements/UluOverflowScroller.vue.d.ts +49 -0
- package/dist/components/elements/UluOverflowScroller.vue.d.ts.map +1 -0
- package/dist/components/elements/UluOverflowScroller.vue.js +138 -0
- package/dist/components/elements/UluScrollSlider.vue.d.ts +38 -0
- package/dist/components/elements/UluScrollSlider.vue.d.ts.map +1 -0
- package/dist/components/elements/UluScrollSlider.vue.js +146 -0
- package/dist/components/elements/UluSlider.vue.d.ts +57 -0
- package/dist/components/elements/UluSlider.vue.d.ts.map +1 -0
- package/dist/components/elements/UluSlider.vue.js +277 -0
- package/dist/components/forms/UluFormFile.vue.d.ts +2 -2
- package/dist/components/forms/UluFormRadio.vue.d.ts +4 -4
- package/dist/components/index.d.ts +6 -0
- package/dist/components/layout/UluTitleRail.vue.d.ts +29 -87
- package/dist/components/layout/UluTitleRail.vue.d.ts.map +1 -1
- package/dist/components/layout/UluTitleRail.vue.js +51 -46
- package/dist/components/navigation/UluBreadcrumb.vue.d.ts +27 -68
- package/dist/components/navigation/UluBreadcrumb.vue.d.ts.map +1 -1
- package/dist/components/navigation/UluBreadcrumb.vue.js +51 -54
- package/dist/components/navigation/UluMenu.vue.d.ts +30 -138
- package/dist/components/navigation/UluMenu.vue.d.ts.map +1 -1
- package/dist/components/navigation/UluMenu.vue.js +85 -84
- package/dist/components/navigation/UluMenuStack.vue.d.ts +12 -2
- package/dist/components/navigation/UluMenuStack.vue.d.ts.map +1 -1
- package/dist/components/navigation/UluMenuStack.vue.js +26 -18
- package/dist/components/navigation/UluNavStrip.vue.d.ts +22 -134
- package/dist/components/navigation/UluNavStrip.vue.d.ts.map +1 -1
- package/dist/components/navigation/UluNavStrip.vue.js +43 -31
- package/dist/components/systems/facets/UluFacetsSidebarLayout.vue.js +10 -10
- package/dist/components/systems/facets/useFacets.d.ts +3 -0
- package/dist/components/systems/facets/useFacets.d.ts.map +1 -1
- package/dist/components/systems/facets/useFacets.js +124 -112
- package/dist/components/systems/index.d.ts +0 -3
- package/dist/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts +2 -2
- package/dist/components/systems/table-sticky/UluTableSticky.vue.d.ts +504 -432
- package/dist/components/systems/table-sticky/UluTableSticky.vue.d.ts.map +1 -1
- package/dist/components/systems/table-sticky/UluTableSticky.vue.js +313 -456
- package/dist/components/systems/table-sticky/UluTableStickyRows.vue.d.ts +40 -31
- package/dist/components/systems/table-sticky/UluTableStickyRows.vue.d.ts.map +1 -1
- package/dist/components/systems/table-sticky/UluTableStickyRows.vue.js +43 -45
- package/dist/components/systems/table-sticky/UluTableStickyTable.vue.d.ts +60 -146
- package/dist/components/systems/table-sticky/UluTableStickyTable.vue.d.ts.map +1 -1
- package/dist/components/systems/table-sticky/UluTableStickyTable.vue.js +156 -175
- package/dist/components/utils/UluAction.vue.d.ts +36 -0
- package/dist/components/utils/UluAction.vue.d.ts.map +1 -0
- package/dist/components/utils/UluAction.vue.js +59 -0
- package/dist/components/utils/UluConditionalText.vue.d.ts +7 -26
- package/dist/components/utils/UluConditionalText.vue.d.ts.map +1 -1
- package/dist/components/utils/UluConditionalText.vue.js +12 -14
- package/dist/components/utils/UluConditionalWrapper.vue.d.ts.map +1 -1
- package/dist/components/utils/UluConditionalWrapper.vue.js +11 -9
- package/dist/components/utils/UluPlaceholderImage.vue.d.ts +12 -57
- package/dist/components/utils/UluPlaceholderImage.vue.d.ts.map +1 -1
- package/dist/components/utils/UluPlaceholderImage.vue.js +18 -26
- package/dist/components/utils/UluPlaceholderText.vue.d.ts +6 -20
- package/dist/components/utils/UluPlaceholderText.vue.js +12 -14
- package/dist/components/utils/UluRouteAnnouncer.vue.d.ts +9 -58
- package/dist/components/utils/UluRouteAnnouncer.vue.d.ts.map +1 -1
- package/dist/components/utils/UluRouteAnnouncer.vue.js +28 -28
- package/dist/components/visualizations/UluAnimateNumber.vue.d.ts +20 -14
- package/dist/components/visualizations/UluAnimateNumber.vue.d.ts.map +1 -1
- package/dist/components/visualizations/UluAnimateNumber.vue.js +18 -26
- package/dist/components/visualizations/UluProgressCircle.vue.d.ts +2 -2
- package/dist/composables/useModifiers.d.ts +20 -25
- package/dist/composables/useModifiers.d.ts.map +1 -1
- package/dist/index.js +206 -200
- package/dist/plugins/modals/UluModalsDisplay.vue.d.ts +3 -12
- package/dist/plugins/modals/UluModalsDisplay.vue.js +24 -45
- package/dist/plugins/modals/index.js +6 -6
- package/dist/plugins/toast/UluToast.vue.d.ts +24 -49
- package/dist/plugins/toast/UluToast.vue.d.ts.map +1 -1
- package/dist/plugins/toast/UluToast.vue.js +68 -77
- package/dist/plugins/toast/UluToastDisplay.vue.d.ts +1 -9
- package/dist/plugins/toast/UluToastDisplay.vue.js +27 -35
- package/dist/plugins/toast/defaults.d.ts +40 -35
- package/dist/plugins/toast/defaults.js +2 -2
- package/dist/plugins/toast/index.js +4 -4
- package/dist/plugins/toast/store.d.ts +40 -35
- package/dist/plugins/toast/store.d.ts.map +1 -1
- package/dist/utils/props.d.ts +7 -0
- package/dist/utils/props.d.ts.map +1 -0
- package/dist/utils/props.js +6 -0
- package/lib/components/collapsible/UluAccordionGroup.vue +4 -1
- package/lib/components/collapsible/UluDropdown.vue +5 -1
- package/lib/components/collapsible/UluModal.vue +278 -298
- package/lib/components/collapsible/UluTabGroup.vue +21 -6
- package/lib/components/elements/UluAlert.vue +38 -51
- package/lib/components/elements/UluBadgeStack.vue +4 -1
- package/lib/components/elements/UluButton.vue +105 -129
- package/lib/components/elements/UluButtonVerbose.vue +67 -89
- package/lib/components/elements/UluCallout.vue +15 -19
- package/lib/components/elements/UluCaptionedFigure.vue +40 -0
- package/lib/components/elements/UluDefinitionList.vue +27 -6
- package/lib/components/elements/UluImage.vue +56 -0
- package/lib/components/elements/UluList.vue +1 -0
- package/lib/components/elements/UluOverflowScroller.vue +140 -0
- package/lib/components/elements/UluScrollSlider.vue +150 -0
- package/lib/components/elements/UluSlider.vue +488 -0
- package/lib/components/index.js +10 -0
- package/lib/components/layout/UluTitleRail.vue +55 -48
- package/lib/components/navigation/UluBreadcrumb.vue +29 -34
- package/lib/components/navigation/UluMenu.vue +60 -71
- package/lib/components/navigation/UluMenuStack.vue +6 -1
- package/lib/components/navigation/UluNavStrip.vue +43 -31
- package/lib/components/systems/facets/useFacets.js +33 -17
- package/lib/components/systems/index.js +0 -4
- package/lib/components/systems/table-sticky/UluTableSticky.vue +602 -576
- package/lib/components/systems/table-sticky/UluTableStickyRows.vue +16 -27
- package/lib/components/systems/table-sticky/UluTableStickyTable.vue +95 -96
- package/lib/components/utils/UluAction.vue +81 -0
- package/lib/components/utils/UluConditionalText.vue +13 -16
- package/lib/components/utils/UluConditionalWrapper.vue +5 -1
- package/lib/components/utils/UluPlaceholderImage.vue +44 -46
- package/lib/components/utils/UluPlaceholderText.vue +10 -13
- package/lib/components/utils/UluRouteAnnouncer.vue +59 -47
- package/lib/components/visualizations/UluAnimateNumber.vue +23 -30
- package/lib/composables/useModifiers.js +21 -26
- package/lib/plugins/modals/UluModalsDisplay.vue +44 -45
- package/lib/plugins/toast/UluToast.vue +28 -34
- package/lib/plugins/toast/UluToastDisplay.vue +9 -15
- package/lib/utils/props.js +8 -0
- package/package.json +9 -5
- package/dist/components/systems/slider/UluImageSlideShow.vue.d.ts +0 -130
- package/dist/components/systems/slider/UluImageSlideShow.vue.d.ts.map +0 -1
- package/dist/components/systems/slider/UluImageSlideShow.vue.js +0 -73
- package/dist/components/systems/slider/UluSlideShow.vue.d.ts +0 -205
- package/dist/components/systems/slider/UluSlideShow.vue.d.ts.map +0 -1
- package/dist/components/systems/slider/UluSlideShow.vue.js +0 -292
- package/dist/components/systems/slider/UluSlideShowSlide.vue.d.ts +0 -17
- package/dist/components/systems/slider/UluSlideShowSlide.vue.d.ts.map +0 -1
- package/dist/components/systems/slider/UluSlideShowSlide.vue.js +0 -26
- package/lib/components/systems/slider/UluImageSlideShow.vue +0 -75
- package/lib/components/systems/slider/UluSlideShow.vue +0 -336
- package/lib/components/systems/slider/UluSlideShowSlide.vue +0 -25
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createElementBlock as t, openBlock as s, normalizeClass as n, createElementVNode as u, Fragment as i, renderList as m, mergeProps as r } from "vue";
|
|
2
|
+
const o = ["src", "alt"], g = ["src", "alt"], y = /* @__PURE__ */ Object.assign({
|
|
3
|
+
inheritAttrs: !1
|
|
4
|
+
}, {
|
|
5
|
+
__name: "UluImage",
|
|
6
|
+
props: {
|
|
7
|
+
src: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: !0
|
|
10
|
+
},
|
|
11
|
+
alt: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* Array of source objects for <picture> tag.
|
|
17
|
+
* Example: [{ srcset: '/small.jpg', media: '(max-width: 600px)' }]
|
|
18
|
+
*/
|
|
19
|
+
sources: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: () => []
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* Granular class targeting for internal elements.
|
|
25
|
+
* Example: { picture: 'my-picture-class', img: 'my-img-class' }
|
|
26
|
+
*/
|
|
27
|
+
classes: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: () => ({})
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
setup(e) {
|
|
33
|
+
return (l, d) => e.sources?.length ? (s(), t("picture", {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: n(e.classes?.picture)
|
|
36
|
+
}, [
|
|
37
|
+
(s(!0), t(i, null, m(e.sources, (a, c) => (s(), t("source", r({ key: c }, { ref_for: !0 }, a), null, 16))), 128)),
|
|
38
|
+
u("img", r({
|
|
39
|
+
src: e.src,
|
|
40
|
+
alt: e.alt,
|
|
41
|
+
class: e.classes?.img
|
|
42
|
+
}, l.$attrs), null, 16, o)
|
|
43
|
+
], 2)) : (s(), t("img", r({
|
|
44
|
+
key: 1,
|
|
45
|
+
src: e.src,
|
|
46
|
+
alt: e.alt,
|
|
47
|
+
class: e.classes?.img
|
|
48
|
+
}, l.$attrs), null, 16, g));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
y as default
|
|
53
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluList.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UluList.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluList.vue"],"names":[],"mappings":"AA8BA;wBA2OqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAVjC;;;;;;;;;;;;;;;;;;;;;;;2OAOG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
const
|
|
1
|
+
import { computed as n, createBlock as m, createCommentVNode as u, openBlock as t, resolveDynamicComponent as y, normalizeStyle as B, normalizeClass as o, withCtx as f, createElementBlock as d, Fragment as v, renderList as S, renderSlot as g, createTextVNode as k, toDisplayString as C } from "vue";
|
|
2
|
+
const h = {
|
|
3
3
|
__name: "UluList",
|
|
4
4
|
props: {
|
|
5
5
|
/**
|
|
@@ -49,9 +49,10 @@ const x = {
|
|
|
49
49
|
listStyleType: String
|
|
50
50
|
},
|
|
51
51
|
setup(e) {
|
|
52
|
-
const l = e, r =
|
|
53
|
-
return (i, O) => (t(),
|
|
54
|
-
|
|
52
|
+
const l = e, r = n(() => l.ordered || l.forceOrdered), c = n(() => r.value ? "ol" : "ul");
|
|
53
|
+
return (i, O) => e.items?.length ? (t(), m(y(c.value), {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: o([
|
|
55
56
|
{
|
|
56
57
|
"list-ordered": e.ordered,
|
|
57
58
|
"list-unordered": e.unordered,
|
|
@@ -60,29 +61,29 @@ const x = {
|
|
|
60
61
|
},
|
|
61
62
|
e.classes.list
|
|
62
63
|
]),
|
|
63
|
-
style:
|
|
64
|
+
style: B({
|
|
64
65
|
listStyleType: e.listStyleType
|
|
65
66
|
}),
|
|
66
67
|
reversed: r.value ? e.reversed : null,
|
|
67
68
|
start: e.start
|
|
68
69
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
(t(!0), d(
|
|
70
|
+
default: f(() => [
|
|
71
|
+
(t(!0), d(v, null, S(e.items, (s, a) => (t(), d("li", {
|
|
71
72
|
key: a,
|
|
72
|
-
class:
|
|
73
|
+
class: o(e.classes.listItem)
|
|
73
74
|
}, [
|
|
74
|
-
|
|
75
|
+
g(i.$slots, "default", {
|
|
75
76
|
item: s,
|
|
76
77
|
index: a
|
|
77
78
|
}, () => [
|
|
78
|
-
|
|
79
|
+
k(C(s), 1)
|
|
79
80
|
])
|
|
80
81
|
], 2))), 128))
|
|
81
82
|
]),
|
|
82
83
|
_: 3
|
|
83
|
-
}, 8, ["class", "style", "reversed", "start"]));
|
|
84
|
+
}, 8, ["class", "style", "reversed", "start"])) : u("", !0);
|
|
84
85
|
}
|
|
85
86
|
};
|
|
86
87
|
export {
|
|
87
|
-
|
|
88
|
+
h as default
|
|
88
89
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
7
|
+
element: string;
|
|
8
|
+
controls: boolean;
|
|
9
|
+
trackId: string;
|
|
10
|
+
scrollAmount: string | number;
|
|
11
|
+
scrollBehavior: string;
|
|
12
|
+
namespace: string;
|
|
13
|
+
controlsClass: string;
|
|
14
|
+
buttonClasses: unknown[];
|
|
15
|
+
iconClassPrevious: string;
|
|
16
|
+
iconClassNext: string;
|
|
17
|
+
offsetStart: number;
|
|
18
|
+
offsetEnd: number;
|
|
19
|
+
$props: {
|
|
20
|
+
readonly element?: string | undefined;
|
|
21
|
+
readonly controls?: boolean | undefined;
|
|
22
|
+
readonly trackId?: string | undefined;
|
|
23
|
+
readonly scrollAmount?: string | number | undefined;
|
|
24
|
+
readonly scrollBehavior?: string | undefined;
|
|
25
|
+
readonly namespace?: string | undefined;
|
|
26
|
+
readonly controlsClass?: string | undefined;
|
|
27
|
+
readonly buttonClasses?: unknown[] | undefined;
|
|
28
|
+
readonly iconClassPrevious?: string | undefined;
|
|
29
|
+
readonly iconClassNext?: string | undefined;
|
|
30
|
+
readonly offsetStart?: number | undefined;
|
|
31
|
+
readonly offsetEnd?: number | undefined;
|
|
32
|
+
};
|
|
33
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
type __VLS_TemplateResult = {
|
|
35
|
+
attrs: Partial<{}>;
|
|
36
|
+
slots: {
|
|
37
|
+
default?(_: {
|
|
38
|
+
setTrackRef: (el: any) => void;
|
|
39
|
+
onScroll: () => void;
|
|
40
|
+
canScrollLeft: boolean;
|
|
41
|
+
canScrollRight: boolean;
|
|
42
|
+
}): any;
|
|
43
|
+
previous?(_: {}): any;
|
|
44
|
+
next?(_: {}): any;
|
|
45
|
+
};
|
|
46
|
+
refs: {};
|
|
47
|
+
rootEl: any;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=UluOverflowScroller.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluOverflowScroller.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluOverflowScroller.vue"],"names":[],"mappings":"AAoCA;wBAoXqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;;;;;;;;;;;;;;2OAQG"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { ref as d, onMounted as g, nextTick as k, onBeforeUnmount as B, createBlock as N, openBlock as v, resolveDynamicComponent as x, withCtx as w, renderSlot as f, createElementBlock as L, createCommentVNode as R, normalizeClass as o, createElementVNode as s, createVNode as b } from "vue";
|
|
2
|
+
import y from "./UluIcon.vue.js";
|
|
3
|
+
const E = ["aria-controls", "disabled"], A = ["aria-controls", "disabled"], P = {
|
|
4
|
+
__name: "UluOverflowScroller",
|
|
5
|
+
props: {
|
|
6
|
+
/**
|
|
7
|
+
* The HTML element to use as the root wrapper.
|
|
8
|
+
*/
|
|
9
|
+
element: { type: String, default: "div" },
|
|
10
|
+
/**
|
|
11
|
+
* Show previous/next controls.
|
|
12
|
+
*/
|
|
13
|
+
controls: { type: Boolean, default: !0 },
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the track element, used for aria-controls.
|
|
16
|
+
*/
|
|
17
|
+
trackId: { type: String, default: null },
|
|
18
|
+
/**
|
|
19
|
+
* Scroll amount (in pixels) for the next/prev buttons.
|
|
20
|
+
* If 'auto', it scrolls by the visible width of the track.
|
|
21
|
+
*/
|
|
22
|
+
scrollAmount: { type: [Number, String], default: "auto" },
|
|
23
|
+
/**
|
|
24
|
+
* Scroll behavior ('smooth' or 'auto').
|
|
25
|
+
*/
|
|
26
|
+
scrollBehavior: { type: String, default: "smooth" },
|
|
27
|
+
/**
|
|
28
|
+
* CSS class namespace for controls.
|
|
29
|
+
*/
|
|
30
|
+
namespace: { type: String, default: "OverflowScroller" },
|
|
31
|
+
/**
|
|
32
|
+
* Additional class to apply to the controls container.
|
|
33
|
+
*/
|
|
34
|
+
controlsClass: { type: String, default: "" },
|
|
35
|
+
/**
|
|
36
|
+
* Button classes to apply.
|
|
37
|
+
*/
|
|
38
|
+
buttonClasses: { type: Array, default: () => ["button", "button--icon"] },
|
|
39
|
+
/**
|
|
40
|
+
* Icon definition for previous button.
|
|
41
|
+
*/
|
|
42
|
+
iconClassPrevious: { type: String, default: "type:previous" },
|
|
43
|
+
/**
|
|
44
|
+
* Icon definition for next button.
|
|
45
|
+
*/
|
|
46
|
+
iconClassNext: { type: String, default: "type:next" },
|
|
47
|
+
/**
|
|
48
|
+
* Offset threshold to consider "at start" (disables previous button).
|
|
49
|
+
*/
|
|
50
|
+
offsetStart: { type: Number, default: 10 },
|
|
51
|
+
/**
|
|
52
|
+
* Offset threshold to consider "at end" (disables next button).
|
|
53
|
+
*/
|
|
54
|
+
offsetEnd: { type: Number, default: 10 }
|
|
55
|
+
},
|
|
56
|
+
setup(e) {
|
|
57
|
+
const c = e, n = d(null), r = d(!1), i = d(!1), S = (t) => {
|
|
58
|
+
n.value = t;
|
|
59
|
+
}, u = () => {
|
|
60
|
+
if (!n.value) return;
|
|
61
|
+
const { scrollLeft: t, scrollWidth: l, clientWidth: a } = n.value;
|
|
62
|
+
r.value = t > c.offsetStart, i.value = Math.ceil(t + a) < l - c.offsetEnd;
|
|
63
|
+
}, h = () => {
|
|
64
|
+
u();
|
|
65
|
+
}, m = (t) => {
|
|
66
|
+
if (!n.value) return;
|
|
67
|
+
const { clientWidth: l } = n.value;
|
|
68
|
+
let a = c.scrollAmount;
|
|
69
|
+
a === "auto" && (a = l), n.value.scrollBy({
|
|
70
|
+
left: t === "right" ? a : -a,
|
|
71
|
+
behavior: c.scrollBehavior
|
|
72
|
+
});
|
|
73
|
+
}, $ = () => m("left"), C = () => m("right");
|
|
74
|
+
return g(() => {
|
|
75
|
+
k(() => {
|
|
76
|
+
u();
|
|
77
|
+
}), window.addEventListener("resize", u);
|
|
78
|
+
}), B(() => {
|
|
79
|
+
window.removeEventListener("resize", u);
|
|
80
|
+
}), (t, l) => (v(), N(x(e.element), null, {
|
|
81
|
+
default: w(() => [
|
|
82
|
+
f(t.$slots, "default", {
|
|
83
|
+
setTrackRef: S,
|
|
84
|
+
onScroll: h,
|
|
85
|
+
canScrollLeft: r.value,
|
|
86
|
+
canScrollRight: i.value
|
|
87
|
+
}),
|
|
88
|
+
e.controls ? (v(), L("ul", {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: o([`${e.namespace}__controls`, e.controlsClass])
|
|
91
|
+
}, [
|
|
92
|
+
s("li", {
|
|
93
|
+
class: o([`${e.namespace}__controls-item`, `${e.namespace}__controls-item--previous`, { [`${e.namespace}__controls-item--disabled`]: !r.value }])
|
|
94
|
+
}, [
|
|
95
|
+
s("button", {
|
|
96
|
+
class: o([`${e.namespace}__control-button`, `${e.namespace}__control-button--previous`, ...e.buttonClasses]),
|
|
97
|
+
"aria-label": "Scroll Left",
|
|
98
|
+
"aria-controls": e.trackId,
|
|
99
|
+
onClick: $,
|
|
100
|
+
disabled: !r.value
|
|
101
|
+
}, [
|
|
102
|
+
f(t.$slots, "previous", {}, () => [
|
|
103
|
+
l[0] || (l[0] = s("span", { class: "hidden-visually" }, "Previous", -1)),
|
|
104
|
+
b(y, {
|
|
105
|
+
icon: e.iconClassPrevious,
|
|
106
|
+
class: o(`${e.namespace}__control-icon`)
|
|
107
|
+
}, null, 8, ["icon", "class"])
|
|
108
|
+
])
|
|
109
|
+
], 10, E)
|
|
110
|
+
], 2),
|
|
111
|
+
s("li", {
|
|
112
|
+
class: o([`${e.namespace}__controls-item`, `${e.namespace}__controls-item--next`, { [`${e.namespace}__controls-item--disabled`]: !i.value }])
|
|
113
|
+
}, [
|
|
114
|
+
s("button", {
|
|
115
|
+
class: o([`${e.namespace}__control-button`, `${e.namespace}__control-button--next`, ...e.buttonClasses]),
|
|
116
|
+
"aria-label": "Scroll Right",
|
|
117
|
+
"aria-controls": e.trackId,
|
|
118
|
+
onClick: C,
|
|
119
|
+
disabled: !i.value
|
|
120
|
+
}, [
|
|
121
|
+
f(t.$slots, "next", {}, () => [
|
|
122
|
+
l[1] || (l[1] = s("span", { class: "hidden-visually" }, "Next", -1)),
|
|
123
|
+
b(y, {
|
|
124
|
+
icon: e.iconClassNext,
|
|
125
|
+
class: o(`${e.namespace}__control-icon`)
|
|
126
|
+
}, null, 8, ["icon", "class"])
|
|
127
|
+
])
|
|
128
|
+
], 10, A)
|
|
129
|
+
], 2)
|
|
130
|
+
], 2)) : R("", !0)
|
|
131
|
+
]),
|
|
132
|
+
_: 3
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
export {
|
|
137
|
+
P as default
|
|
138
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
7
|
+
items: unknown[];
|
|
8
|
+
controls: boolean;
|
|
9
|
+
scrollAmount: string | number;
|
|
10
|
+
scrollBehavior: string;
|
|
11
|
+
emptySlides: boolean;
|
|
12
|
+
observerOptions: Record<string, any>;
|
|
13
|
+
modifiers?: string | unknown[] | undefined;
|
|
14
|
+
$props: {
|
|
15
|
+
readonly items?: unknown[] | undefined;
|
|
16
|
+
readonly controls?: boolean | undefined;
|
|
17
|
+
readonly scrollAmount?: string | number | undefined;
|
|
18
|
+
readonly scrollBehavior?: string | undefined;
|
|
19
|
+
readonly emptySlides?: boolean | undefined;
|
|
20
|
+
readonly observerOptions?: Record<string, any> | undefined;
|
|
21
|
+
readonly modifiers?: string | unknown[] | undefined;
|
|
22
|
+
};
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
24
|
+
type __VLS_TemplateResult = {
|
|
25
|
+
attrs: Partial<{}>;
|
|
26
|
+
slots: {
|
|
27
|
+
slide?(_: {
|
|
28
|
+
item: unknown;
|
|
29
|
+
index: number;
|
|
30
|
+
isIntersecting: boolean;
|
|
31
|
+
}): any;
|
|
32
|
+
previous?(_: {}): any;
|
|
33
|
+
next?(_: {}): any;
|
|
34
|
+
};
|
|
35
|
+
refs: {};
|
|
36
|
+
rootEl: HTMLDivElement;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=UluScrollSlider.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluScrollSlider.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluScrollSlider.vue"],"names":[],"mappings":"AA6CA;wBAqYqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;;;;sPAQG"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { ref as f, onMounted as g, nextTick as A, onBeforeUnmount as $, createElementBlock as i, openBlock as n, normalizeClass as C, unref as m, createVNode as x, createSlots as E, withCtx as v, createElementVNode as k, createCommentVNode as S, Fragment as N, renderList as O, renderSlot as p } from "vue";
|
|
2
|
+
import { useModifiers as w } from "../../composables/useModifiers.js";
|
|
3
|
+
import { newId as M } from "../../utils/dom.js";
|
|
4
|
+
import R from "./UluOverflowScroller.vue.js";
|
|
5
|
+
const V = { class: "scroll-slider__track-crop" }, U = ["id", "onScroll"], j = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "scroll-slider__slide scroll-slider__slide--empty",
|
|
8
|
+
role: "presentation"
|
|
9
|
+
}, q = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "scroll-slider__slide scroll-slider__slide--empty",
|
|
12
|
+
role: "presentation"
|
|
13
|
+
}, D = {
|
|
14
|
+
__name: "UluScrollSlider",
|
|
15
|
+
props: {
|
|
16
|
+
/**
|
|
17
|
+
* Array of items to render.
|
|
18
|
+
*/
|
|
19
|
+
items: {
|
|
20
|
+
type: Array,
|
|
21
|
+
required: !0
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* Show previous/next controls.
|
|
25
|
+
*/
|
|
26
|
+
controls: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* Scroll amount (in pixels) for the next/prev buttons.
|
|
32
|
+
* If not provided, it defaults to the visible width of the track.
|
|
33
|
+
*/
|
|
34
|
+
scrollAmount: {
|
|
35
|
+
type: [Number, String],
|
|
36
|
+
default: "auto"
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Scroll behavior ('smooth' or 'auto').
|
|
40
|
+
*/
|
|
41
|
+
scrollBehavior: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "smooth"
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Include empty start and end slides (needed for correct margin collapsing with some styles).
|
|
47
|
+
*/
|
|
48
|
+
emptySlides: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !0
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* Options passed to the IntersectionObserver (determines when a slide is considered "intersecting").
|
|
54
|
+
*/
|
|
55
|
+
observerOptions: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: () => ({ threshold: 0.1 })
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* Base class modifiers.
|
|
61
|
+
*/
|
|
62
|
+
modifiers: [String, Array]
|
|
63
|
+
},
|
|
64
|
+
setup(l) {
|
|
65
|
+
const _ = l, { resolvedModifiers: B } = w({ props: _, baseClass: "scroll-slider" }), y = M("ulu-scroll-slider-track"), h = f(null), u = f([]), r = f([]);
|
|
66
|
+
let c = null;
|
|
67
|
+
const I = (e, o) => {
|
|
68
|
+
e && (u.value[o] = e);
|
|
69
|
+
};
|
|
70
|
+
return g(() => {
|
|
71
|
+
A(() => {
|
|
72
|
+
c = new IntersectionObserver((e) => {
|
|
73
|
+
e.forEach((o) => {
|
|
74
|
+
const s = u.value.findIndex((t) => t === o.target);
|
|
75
|
+
s > -1 && (o.isIntersecting ? r.value.includes(s) || r.value.push(s) : r.value = r.value.filter((t) => t !== s));
|
|
76
|
+
});
|
|
77
|
+
}, {
|
|
78
|
+
..._.observerOptions,
|
|
79
|
+
root: h.value
|
|
80
|
+
}), u.value.forEach((e) => {
|
|
81
|
+
e && c.observe(e);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}), $(() => {
|
|
85
|
+
c && c.disconnect();
|
|
86
|
+
}), (e, o) => (n(), i("div", {
|
|
87
|
+
class: C(["scroll-slider", m(B)])
|
|
88
|
+
}, [
|
|
89
|
+
x(R, {
|
|
90
|
+
class: "scroll-slider__control-context",
|
|
91
|
+
controlsClass: "scroll-slider__controls",
|
|
92
|
+
controls: l.controls,
|
|
93
|
+
scrollAmount: l.scrollAmount,
|
|
94
|
+
scrollBehavior: l.scrollBehavior,
|
|
95
|
+
trackId: m(y)
|
|
96
|
+
}, E({
|
|
97
|
+
default: v(({ setTrackRef: s, onScroll: t }) => [
|
|
98
|
+
k("div", V, [
|
|
99
|
+
k("ul", {
|
|
100
|
+
class: "scroll-slider__track",
|
|
101
|
+
id: m(y),
|
|
102
|
+
ref: (d) => {
|
|
103
|
+
h.value = d, s(d);
|
|
104
|
+
},
|
|
105
|
+
onScroll: t
|
|
106
|
+
}, [
|
|
107
|
+
l.emptySlides ? (n(), i("li", j, " ")) : S("", !0),
|
|
108
|
+
(n(!0), i(N, null, O(l.items, (d, a) => (n(), i("li", {
|
|
109
|
+
key: a,
|
|
110
|
+
class: "scroll-slider__slide",
|
|
111
|
+
ref_for: !0,
|
|
112
|
+
ref: (b) => I(b, a)
|
|
113
|
+
}, [
|
|
114
|
+
p(e.$slots, "slide", {
|
|
115
|
+
item: d,
|
|
116
|
+
index: a,
|
|
117
|
+
isIntersecting: r.value.includes(a)
|
|
118
|
+
})
|
|
119
|
+
]))), 128)),
|
|
120
|
+
l.emptySlides ? (n(), i("li", q, " ")) : S("", !0)
|
|
121
|
+
], 40, U)
|
|
122
|
+
])
|
|
123
|
+
]),
|
|
124
|
+
_: 2
|
|
125
|
+
}, [
|
|
126
|
+
e.$slots.previous ? {
|
|
127
|
+
name: "previous",
|
|
128
|
+
fn: v(() => [
|
|
129
|
+
p(e.$slots, "previous")
|
|
130
|
+
]),
|
|
131
|
+
key: "0"
|
|
132
|
+
} : void 0,
|
|
133
|
+
e.$slots.next ? {
|
|
134
|
+
name: "next",
|
|
135
|
+
fn: v(() => [
|
|
136
|
+
p(e.$slots, "next")
|
|
137
|
+
]),
|
|
138
|
+
key: "1"
|
|
139
|
+
} : void 0
|
|
140
|
+
]), 1032, ["controls", "scrollAmount", "scrollBehavior", "trackId"])
|
|
141
|
+
], 2));
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
export {
|
|
145
|
+
D as default
|
|
146
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
7
|
+
$emit: (event: "change", ...args: any[]) => void;
|
|
8
|
+
duration: number;
|
|
9
|
+
transition: string;
|
|
10
|
+
items: unknown[];
|
|
11
|
+
nav: boolean;
|
|
12
|
+
controls: boolean;
|
|
13
|
+
timingFunction: string;
|
|
14
|
+
loop: boolean;
|
|
15
|
+
autoplay: number;
|
|
16
|
+
reduceMotionFallback: boolean;
|
|
17
|
+
focusOptions: Record<string, any>;
|
|
18
|
+
modifiers?: string | unknown[] | undefined;
|
|
19
|
+
$props: {
|
|
20
|
+
readonly duration?: number | undefined;
|
|
21
|
+
readonly transition?: string | undefined;
|
|
22
|
+
readonly items?: unknown[] | undefined;
|
|
23
|
+
readonly nav?: boolean | undefined;
|
|
24
|
+
readonly controls?: boolean | undefined;
|
|
25
|
+
readonly timingFunction?: string | undefined;
|
|
26
|
+
readonly loop?: boolean | undefined;
|
|
27
|
+
readonly autoplay?: number | undefined;
|
|
28
|
+
readonly reduceMotionFallback?: boolean | undefined;
|
|
29
|
+
readonly focusOptions?: Record<string, any> | undefined;
|
|
30
|
+
readonly modifiers?: string | unknown[] | undefined;
|
|
31
|
+
};
|
|
32
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
33
|
+
trackRef: HTMLUListElement;
|
|
34
|
+
}, HTMLDivElement>;
|
|
35
|
+
type __VLS_TemplateResult = {
|
|
36
|
+
attrs: Partial<{}>;
|
|
37
|
+
slots: {
|
|
38
|
+
slide?(_: {
|
|
39
|
+
item: unknown;
|
|
40
|
+
index: number;
|
|
41
|
+
active: boolean;
|
|
42
|
+
upcoming: boolean;
|
|
43
|
+
}): any;
|
|
44
|
+
previous?(_: {}): any;
|
|
45
|
+
next?(_: {}): any;
|
|
46
|
+
nav?(_: {
|
|
47
|
+
item: unknown;
|
|
48
|
+
index: number;
|
|
49
|
+
active: boolean;
|
|
50
|
+
}): any;
|
|
51
|
+
};
|
|
52
|
+
refs: {
|
|
53
|
+
trackRef: HTMLUListElement;
|
|
54
|
+
};
|
|
55
|
+
rootEl: HTMLDivElement;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=UluSlider.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluSlider.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluSlider.vue"],"names":[],"mappings":"AAiGA;wBAwjCqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAbjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAUG"}
|