@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.
Files changed (174) hide show
  1. package/dist/components/collapsible/UluAccordionGroup.vue.d.ts +2 -2
  2. package/dist/components/collapsible/UluAccordionGroup.vue.d.ts.map +1 -1
  3. package/dist/components/collapsible/UluAccordionGroup.vue.js +22 -19
  4. package/dist/components/collapsible/UluDropdown.vue.d.ts +1 -1
  5. package/dist/components/collapsible/UluDropdown.vue.d.ts.map +1 -1
  6. package/dist/components/collapsible/UluDropdown.vue.js +22 -15
  7. package/dist/components/collapsible/UluModal.vue.d.ts +43 -248
  8. package/dist/components/collapsible/UluModal.vue.d.ts.map +1 -1
  9. package/dist/components/collapsible/UluModal.vue.js +139 -191
  10. package/dist/components/collapsible/UluTabGroup.vue.d.ts +2 -0
  11. package/dist/components/collapsible/UluTabGroup.vue.d.ts.map +1 -1
  12. package/dist/components/collapsible/UluTabGroup.vue.js +23 -14
  13. package/dist/components/elements/UluAlert.vue.d.ts +29 -144
  14. package/dist/components/elements/UluAlert.vue.d.ts.map +1 -1
  15. package/dist/components/elements/UluAlert.vue.js +39 -50
  16. package/dist/components/elements/UluBadge.vue.d.ts +6 -6
  17. package/dist/components/elements/UluBadgeStack.vue.d.ts +1 -1
  18. package/dist/components/elements/UluBadgeStack.vue.d.ts.map +1 -1
  19. package/dist/components/elements/UluBadgeStack.vue.js +12 -9
  20. package/dist/components/elements/UluButton.vue.d.ts +47 -177
  21. package/dist/components/elements/UluButton.vue.d.ts.map +1 -1
  22. package/dist/components/elements/UluButton.vue.js +59 -72
  23. package/dist/components/elements/UluButtonVerbose.vue.d.ts +38 -123
  24. package/dist/components/elements/UluButtonVerbose.vue.d.ts.map +1 -1
  25. package/dist/components/elements/UluButtonVerbose.vue.js +52 -65
  26. package/dist/components/elements/UluCallout.vue.d.ts +20 -25
  27. package/dist/components/elements/UluCallout.vue.d.ts.map +1 -1
  28. package/dist/components/elements/UluCallout.vue.js +11 -16
  29. package/dist/components/elements/UluCaptionedFigure.vue.d.ts +25 -0
  30. package/dist/components/elements/UluCaptionedFigure.vue.d.ts.map +1 -0
  31. package/dist/components/elements/UluCaptionedFigure.vue.js +48 -0
  32. package/dist/components/elements/UluCard.vue.d.ts +2 -2
  33. package/dist/components/elements/UluDefinitionList.vue.d.ts +4 -2
  34. package/dist/components/elements/UluDefinitionList.vue.d.ts.map +1 -1
  35. package/dist/components/elements/UluDefinitionList.vue.js +32 -28
  36. package/dist/components/elements/UluExternalLink.vue.d.ts +2 -2
  37. package/dist/components/elements/UluImage.vue.d.ts +14 -0
  38. package/dist/components/elements/UluImage.vue.d.ts.map +1 -0
  39. package/dist/components/elements/UluImage.vue.js +53 -0
  40. package/dist/components/elements/UluList.vue.d.ts.map +1 -1
  41. package/dist/components/elements/UluList.vue.js +14 -13
  42. package/dist/components/elements/UluOverflowScroller.vue.d.ts +49 -0
  43. package/dist/components/elements/UluOverflowScroller.vue.d.ts.map +1 -0
  44. package/dist/components/elements/UluOverflowScroller.vue.js +138 -0
  45. package/dist/components/elements/UluScrollSlider.vue.d.ts +38 -0
  46. package/dist/components/elements/UluScrollSlider.vue.d.ts.map +1 -0
  47. package/dist/components/elements/UluScrollSlider.vue.js +146 -0
  48. package/dist/components/elements/UluSlider.vue.d.ts +57 -0
  49. package/dist/components/elements/UluSlider.vue.d.ts.map +1 -0
  50. package/dist/components/elements/UluSlider.vue.js +277 -0
  51. package/dist/components/forms/UluFormFile.vue.d.ts +2 -2
  52. package/dist/components/forms/UluFormRadio.vue.d.ts +4 -4
  53. package/dist/components/index.d.ts +6 -0
  54. package/dist/components/layout/UluTitleRail.vue.d.ts +29 -87
  55. package/dist/components/layout/UluTitleRail.vue.d.ts.map +1 -1
  56. package/dist/components/layout/UluTitleRail.vue.js +51 -46
  57. package/dist/components/navigation/UluBreadcrumb.vue.d.ts +27 -68
  58. package/dist/components/navigation/UluBreadcrumb.vue.d.ts.map +1 -1
  59. package/dist/components/navigation/UluBreadcrumb.vue.js +51 -54
  60. package/dist/components/navigation/UluMenu.vue.d.ts +30 -138
  61. package/dist/components/navigation/UluMenu.vue.d.ts.map +1 -1
  62. package/dist/components/navigation/UluMenu.vue.js +85 -84
  63. package/dist/components/navigation/UluMenuStack.vue.d.ts +12 -2
  64. package/dist/components/navigation/UluMenuStack.vue.d.ts.map +1 -1
  65. package/dist/components/navigation/UluMenuStack.vue.js +26 -18
  66. package/dist/components/navigation/UluNavStrip.vue.d.ts +22 -134
  67. package/dist/components/navigation/UluNavStrip.vue.d.ts.map +1 -1
  68. package/dist/components/navigation/UluNavStrip.vue.js +43 -31
  69. package/dist/components/systems/facets/UluFacetsSidebarLayout.vue.js +10 -10
  70. package/dist/components/systems/facets/useFacets.d.ts +3 -0
  71. package/dist/components/systems/facets/useFacets.d.ts.map +1 -1
  72. package/dist/components/systems/facets/useFacets.js +124 -112
  73. package/dist/components/systems/index.d.ts +0 -3
  74. package/dist/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts +2 -2
  75. package/dist/components/systems/table-sticky/UluTableSticky.vue.d.ts +504 -432
  76. package/dist/components/systems/table-sticky/UluTableSticky.vue.d.ts.map +1 -1
  77. package/dist/components/systems/table-sticky/UluTableSticky.vue.js +313 -456
  78. package/dist/components/systems/table-sticky/UluTableStickyRows.vue.d.ts +40 -31
  79. package/dist/components/systems/table-sticky/UluTableStickyRows.vue.d.ts.map +1 -1
  80. package/dist/components/systems/table-sticky/UluTableStickyRows.vue.js +43 -45
  81. package/dist/components/systems/table-sticky/UluTableStickyTable.vue.d.ts +60 -146
  82. package/dist/components/systems/table-sticky/UluTableStickyTable.vue.d.ts.map +1 -1
  83. package/dist/components/systems/table-sticky/UluTableStickyTable.vue.js +156 -175
  84. package/dist/components/utils/UluAction.vue.d.ts +36 -0
  85. package/dist/components/utils/UluAction.vue.d.ts.map +1 -0
  86. package/dist/components/utils/UluAction.vue.js +59 -0
  87. package/dist/components/utils/UluConditionalText.vue.d.ts +7 -26
  88. package/dist/components/utils/UluConditionalText.vue.d.ts.map +1 -1
  89. package/dist/components/utils/UluConditionalText.vue.js +12 -14
  90. package/dist/components/utils/UluConditionalWrapper.vue.d.ts.map +1 -1
  91. package/dist/components/utils/UluConditionalWrapper.vue.js +11 -9
  92. package/dist/components/utils/UluPlaceholderImage.vue.d.ts +12 -57
  93. package/dist/components/utils/UluPlaceholderImage.vue.d.ts.map +1 -1
  94. package/dist/components/utils/UluPlaceholderImage.vue.js +18 -26
  95. package/dist/components/utils/UluPlaceholderText.vue.d.ts +6 -20
  96. package/dist/components/utils/UluPlaceholderText.vue.js +12 -14
  97. package/dist/components/utils/UluRouteAnnouncer.vue.d.ts +9 -58
  98. package/dist/components/utils/UluRouteAnnouncer.vue.d.ts.map +1 -1
  99. package/dist/components/utils/UluRouteAnnouncer.vue.js +28 -28
  100. package/dist/components/visualizations/UluAnimateNumber.vue.d.ts +20 -14
  101. package/dist/components/visualizations/UluAnimateNumber.vue.d.ts.map +1 -1
  102. package/dist/components/visualizations/UluAnimateNumber.vue.js +18 -26
  103. package/dist/components/visualizations/UluProgressCircle.vue.d.ts +2 -2
  104. package/dist/composables/useModifiers.d.ts +20 -25
  105. package/dist/composables/useModifiers.d.ts.map +1 -1
  106. package/dist/index.js +206 -200
  107. package/dist/plugins/modals/UluModalsDisplay.vue.d.ts +3 -12
  108. package/dist/plugins/modals/UluModalsDisplay.vue.js +24 -45
  109. package/dist/plugins/modals/index.js +6 -6
  110. package/dist/plugins/toast/UluToast.vue.d.ts +24 -49
  111. package/dist/plugins/toast/UluToast.vue.d.ts.map +1 -1
  112. package/dist/plugins/toast/UluToast.vue.js +68 -77
  113. package/dist/plugins/toast/UluToastDisplay.vue.d.ts +1 -9
  114. package/dist/plugins/toast/UluToastDisplay.vue.js +27 -35
  115. package/dist/plugins/toast/defaults.d.ts +40 -35
  116. package/dist/plugins/toast/defaults.js +2 -2
  117. package/dist/plugins/toast/index.js +4 -4
  118. package/dist/plugins/toast/store.d.ts +40 -35
  119. package/dist/plugins/toast/store.d.ts.map +1 -1
  120. package/dist/utils/props.d.ts +7 -0
  121. package/dist/utils/props.d.ts.map +1 -0
  122. package/dist/utils/props.js +6 -0
  123. package/lib/components/collapsible/UluAccordionGroup.vue +4 -1
  124. package/lib/components/collapsible/UluDropdown.vue +5 -1
  125. package/lib/components/collapsible/UluModal.vue +278 -298
  126. package/lib/components/collapsible/UluTabGroup.vue +21 -6
  127. package/lib/components/elements/UluAlert.vue +38 -51
  128. package/lib/components/elements/UluBadgeStack.vue +4 -1
  129. package/lib/components/elements/UluButton.vue +105 -129
  130. package/lib/components/elements/UluButtonVerbose.vue +67 -89
  131. package/lib/components/elements/UluCallout.vue +15 -19
  132. package/lib/components/elements/UluCaptionedFigure.vue +40 -0
  133. package/lib/components/elements/UluDefinitionList.vue +27 -6
  134. package/lib/components/elements/UluImage.vue +56 -0
  135. package/lib/components/elements/UluList.vue +1 -0
  136. package/lib/components/elements/UluOverflowScroller.vue +140 -0
  137. package/lib/components/elements/UluScrollSlider.vue +150 -0
  138. package/lib/components/elements/UluSlider.vue +488 -0
  139. package/lib/components/index.js +10 -0
  140. package/lib/components/layout/UluTitleRail.vue +55 -48
  141. package/lib/components/navigation/UluBreadcrumb.vue +29 -34
  142. package/lib/components/navigation/UluMenu.vue +60 -71
  143. package/lib/components/navigation/UluMenuStack.vue +6 -1
  144. package/lib/components/navigation/UluNavStrip.vue +43 -31
  145. package/lib/components/systems/facets/useFacets.js +33 -17
  146. package/lib/components/systems/index.js +0 -4
  147. package/lib/components/systems/table-sticky/UluTableSticky.vue +602 -576
  148. package/lib/components/systems/table-sticky/UluTableStickyRows.vue +16 -27
  149. package/lib/components/systems/table-sticky/UluTableStickyTable.vue +95 -96
  150. package/lib/components/utils/UluAction.vue +81 -0
  151. package/lib/components/utils/UluConditionalText.vue +13 -16
  152. package/lib/components/utils/UluConditionalWrapper.vue +5 -1
  153. package/lib/components/utils/UluPlaceholderImage.vue +44 -46
  154. package/lib/components/utils/UluPlaceholderText.vue +10 -13
  155. package/lib/components/utils/UluRouteAnnouncer.vue +59 -47
  156. package/lib/components/visualizations/UluAnimateNumber.vue +23 -30
  157. package/lib/composables/useModifiers.js +21 -26
  158. package/lib/plugins/modals/UluModalsDisplay.vue +44 -45
  159. package/lib/plugins/toast/UluToast.vue +28 -34
  160. package/lib/plugins/toast/UluToastDisplay.vue +9 -15
  161. package/lib/utils/props.js +8 -0
  162. package/package.json +9 -5
  163. package/dist/components/systems/slider/UluImageSlideShow.vue.d.ts +0 -130
  164. package/dist/components/systems/slider/UluImageSlideShow.vue.d.ts.map +0 -1
  165. package/dist/components/systems/slider/UluImageSlideShow.vue.js +0 -73
  166. package/dist/components/systems/slider/UluSlideShow.vue.d.ts +0 -205
  167. package/dist/components/systems/slider/UluSlideShow.vue.d.ts.map +0 -1
  168. package/dist/components/systems/slider/UluSlideShow.vue.js +0 -292
  169. package/dist/components/systems/slider/UluSlideShowSlide.vue.d.ts +0 -17
  170. package/dist/components/systems/slider/UluSlideShowSlide.vue.d.ts.map +0 -1
  171. package/dist/components/systems/slider/UluSlideShowSlide.vue.js +0 -26
  172. package/lib/components/systems/slider/UluImageSlideShow.vue +0 -75
  173. package/lib/components/systems/slider/UluSlideShow.vue +0 -336
  174. 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":"AA6BA;wBA0OqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;;;;;;;;;;2OAQG"}
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 o, createBlock as u, openBlock as t, resolveDynamicComponent as m, normalizeStyle as y, normalizeClass as n, withCtx as B, createElementBlock as d, Fragment as f, renderList as v, renderSlot as S, createTextVNode as g, toDisplayString as k } from "vue";
2
- const x = {
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 = o(() => l.ordered || l.forceOrdered), c = o(() => r.value ? "ol" : "ul");
53
- return (i, O) => (t(), u(m(c.value), {
54
- class: n([
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: y({
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: B(() => [
70
- (t(!0), d(f, null, v(e.items, (s, a) => (t(), d("li", {
70
+ default: f(() => [
71
+ (t(!0), d(v, null, S(e.items, (s, a) => (t(), d("li", {
71
72
  key: a,
72
- class: n(e.classes.listItem)
73
+ class: o(e.classes.listItem)
73
74
  }, [
74
- S(i.$slots, "default", {
75
+ g(i.$slots, "default", {
75
76
  item: s,
76
77
  index: a
77
78
  }, () => [
78
- g(k(s), 1)
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
- x as default
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"}