@ulu/frontend-vue 0.2.0-beta.9 → 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 (171) 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/UluPlaceholderImage.vue.d.ts +12 -57
  91. package/dist/components/utils/UluPlaceholderImage.vue.d.ts.map +1 -1
  92. package/dist/components/utils/UluPlaceholderImage.vue.js +18 -26
  93. package/dist/components/utils/UluPlaceholderText.vue.d.ts +6 -20
  94. package/dist/components/utils/UluPlaceholderText.vue.js +12 -14
  95. package/dist/components/utils/UluRouteAnnouncer.vue.d.ts +9 -58
  96. package/dist/components/utils/UluRouteAnnouncer.vue.d.ts.map +1 -1
  97. package/dist/components/utils/UluRouteAnnouncer.vue.js +28 -28
  98. package/dist/components/visualizations/UluAnimateNumber.vue.d.ts +20 -14
  99. package/dist/components/visualizations/UluAnimateNumber.vue.d.ts.map +1 -1
  100. package/dist/components/visualizations/UluAnimateNumber.vue.js +18 -26
  101. package/dist/components/visualizations/UluProgressCircle.vue.d.ts +2 -2
  102. package/dist/composables/useModifiers.d.ts +20 -25
  103. package/dist/composables/useModifiers.d.ts.map +1 -1
  104. package/dist/index.js +206 -200
  105. package/dist/plugins/modals/UluModalsDisplay.vue.d.ts +3 -12
  106. package/dist/plugins/modals/UluModalsDisplay.vue.js +24 -45
  107. package/dist/plugins/modals/index.js +6 -6
  108. package/dist/plugins/toast/UluToast.vue.d.ts +24 -49
  109. package/dist/plugins/toast/UluToast.vue.d.ts.map +1 -1
  110. package/dist/plugins/toast/UluToast.vue.js +68 -77
  111. package/dist/plugins/toast/UluToastDisplay.vue.d.ts +1 -9
  112. package/dist/plugins/toast/UluToastDisplay.vue.js +27 -35
  113. package/dist/plugins/toast/defaults.d.ts +40 -35
  114. package/dist/plugins/toast/defaults.js +2 -2
  115. package/dist/plugins/toast/index.js +4 -4
  116. package/dist/plugins/toast/store.d.ts +40 -35
  117. package/dist/plugins/toast/store.d.ts.map +1 -1
  118. package/dist/utils/props.d.ts +7 -0
  119. package/dist/utils/props.d.ts.map +1 -0
  120. package/dist/utils/props.js +6 -0
  121. package/lib/components/collapsible/UluAccordionGroup.vue +4 -1
  122. package/lib/components/collapsible/UluDropdown.vue +5 -1
  123. package/lib/components/collapsible/UluModal.vue +278 -298
  124. package/lib/components/collapsible/UluTabGroup.vue +21 -6
  125. package/lib/components/elements/UluAlert.vue +38 -51
  126. package/lib/components/elements/UluBadgeStack.vue +4 -1
  127. package/lib/components/elements/UluButton.vue +105 -129
  128. package/lib/components/elements/UluButtonVerbose.vue +67 -89
  129. package/lib/components/elements/UluCallout.vue +15 -19
  130. package/lib/components/elements/UluCaptionedFigure.vue +40 -0
  131. package/lib/components/elements/UluDefinitionList.vue +27 -6
  132. package/lib/components/elements/UluImage.vue +56 -0
  133. package/lib/components/elements/UluList.vue +1 -0
  134. package/lib/components/elements/UluOverflowScroller.vue +140 -0
  135. package/lib/components/elements/UluScrollSlider.vue +150 -0
  136. package/lib/components/elements/UluSlider.vue +488 -0
  137. package/lib/components/index.js +10 -0
  138. package/lib/components/layout/UluTitleRail.vue +55 -48
  139. package/lib/components/navigation/UluBreadcrumb.vue +29 -34
  140. package/lib/components/navigation/UluMenu.vue +60 -71
  141. package/lib/components/navigation/UluMenuStack.vue +6 -1
  142. package/lib/components/navigation/UluNavStrip.vue +43 -31
  143. package/lib/components/systems/facets/useFacets.js +33 -17
  144. package/lib/components/systems/index.js +0 -4
  145. package/lib/components/systems/table-sticky/UluTableSticky.vue +602 -576
  146. package/lib/components/systems/table-sticky/UluTableStickyRows.vue +16 -27
  147. package/lib/components/systems/table-sticky/UluTableStickyTable.vue +95 -96
  148. package/lib/components/utils/UluAction.vue +81 -0
  149. package/lib/components/utils/UluConditionalText.vue +13 -16
  150. package/lib/components/utils/UluPlaceholderImage.vue +44 -46
  151. package/lib/components/utils/UluPlaceholderText.vue +10 -13
  152. package/lib/components/utils/UluRouteAnnouncer.vue +59 -47
  153. package/lib/components/visualizations/UluAnimateNumber.vue +23 -30
  154. package/lib/composables/useModifiers.js +21 -26
  155. package/lib/plugins/modals/UluModalsDisplay.vue +44 -45
  156. package/lib/plugins/toast/UluToast.vue +28 -34
  157. package/lib/plugins/toast/UluToastDisplay.vue +9 -15
  158. package/lib/utils/props.js +8 -0
  159. package/package.json +9 -5
  160. package/dist/components/systems/slider/UluImageSlideShow.vue.d.ts +0 -130
  161. package/dist/components/systems/slider/UluImageSlideShow.vue.d.ts.map +0 -1
  162. package/dist/components/systems/slider/UluImageSlideShow.vue.js +0 -73
  163. package/dist/components/systems/slider/UluSlideShow.vue.d.ts +0 -205
  164. package/dist/components/systems/slider/UluSlideShow.vue.d.ts.map +0 -1
  165. package/dist/components/systems/slider/UluSlideShow.vue.js +0 -292
  166. package/dist/components/systems/slider/UluSlideShowSlide.vue.d.ts +0 -17
  167. package/dist/components/systems/slider/UluSlideShowSlide.vue.d.ts.map +0 -1
  168. package/dist/components/systems/slider/UluSlideShowSlide.vue.js +0 -26
  169. package/lib/components/systems/slider/UluImageSlideShow.vue +0 -75
  170. package/lib/components/systems/slider/UluSlideShow.vue +0 -336
  171. package/lib/components/systems/slider/UluSlideShowSlide.vue +0 -25
@@ -1,205 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- /**
3
- * Should slides be focusable by tab key
4
- */
5
- slideFocusable: BooleanConstructor;
6
- /**
7
- * Setting for element.focus() when navigating to() a specific slide
8
- */
9
- focusOptions: {
10
- type: ObjectConstructor;
11
- default: () => {
12
- preventScroll: boolean;
13
- focusVisible: boolean;
14
- };
15
- };
16
- /**
17
- * Array of slide items (data)
18
- * - Use slot (#slide) to template
19
- */
20
- items: ArrayConstructor;
21
- /**
22
- * Slideshow without a nav
23
- */
24
- noNav: BooleanConstructor;
25
- /**
26
- * Allow user to change the scroll behavior when a slide is navigated to()
27
- */
28
- scrollBehaviorNav: {
29
- type: StringConstructor;
30
- default: string;
31
- };
32
- /**
33
- * Allow user to change the scroll behavior when a slide is navigated via next/prev
34
- */
35
- scrollBehaviorControl: {
36
- type: StringConstructor;
37
- default: string;
38
- };
39
- /**
40
- * Observe
41
- */
42
- observerOptions: {
43
- type: ObjectConstructor;
44
- default: () => {
45
- threshhold: number;
46
- rootMargin: string;
47
- };
48
- };
49
- /**
50
- * The intial slide index to use for active slide (zero based)
51
- */
52
- initialActive: {
53
- type: NumberConstructor;
54
- default: number;
55
- };
56
- /**
57
- * Allow user to control scroll amount (element.scrollTo) for prev/next controls
58
- * - For future scroll implementations (like ulu scroll-slider for cards, etc)
59
- * - Function is passed (direction, DomRefs)
60
- * - Number is passed directly
61
- */
62
- scrollAmount: (FunctionConstructor | NumberConstructor)[];
63
- }>, {}, {
64
- slides: any;
65
- }, {
66
- canScrollRight(): boolean;
67
- canScrollLeft(): boolean;
68
- }, {
69
- /**
70
- * Creates the internal array of slides based on user's passed items
71
- */
72
- createSlides(): {
73
- element: null;
74
- active: boolean;
75
- item: unknown;
76
- }[];
77
- /**
78
- * Find the corresponding slide data by slide element
79
- */
80
- getSlideByElement(el: any): any;
81
- /**
82
- * Provides scroll measurements
83
- */
84
- getScrollData(): {
85
- scrollLeft: any;
86
- offsetWidth: any;
87
- scrollWidth: any;
88
- };
89
- /**
90
- * Determines the amount to scroll the track
91
- */
92
- resolveAmount(dir: any): any;
93
- /**
94
- * Scroll the track to a specified point
95
- */
96
- scrollTo(left: any, behavior: any): void;
97
- /**
98
- * Scroll to specific index
99
- * @param {Number} index Slide index
100
- */
101
- to(index: number): void;
102
- /**
103
- * Goto to next slide
104
- */
105
- next(): void;
106
- /**
107
- * Goto to previous slide
108
- */
109
- previous(): void;
110
- /**
111
- * Sets up a new observer to watch the slides visibility (within track)
112
- */
113
- createObserver(): void;
114
- /**
115
- * Add all slide elements as targets in observer
116
- */
117
- observeSlides(): void;
118
- /**
119
- * Remove observer and it's internal DOM references (GC)
120
- */
121
- destroyObserver(): void;
122
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "slide-change"[], "slide-change", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
123
- /**
124
- * Should slides be focusable by tab key
125
- */
126
- slideFocusable: BooleanConstructor;
127
- /**
128
- * Setting for element.focus() when navigating to() a specific slide
129
- */
130
- focusOptions: {
131
- type: ObjectConstructor;
132
- default: () => {
133
- preventScroll: boolean;
134
- focusVisible: boolean;
135
- };
136
- };
137
- /**
138
- * Array of slide items (data)
139
- * - Use slot (#slide) to template
140
- */
141
- items: ArrayConstructor;
142
- /**
143
- * Slideshow without a nav
144
- */
145
- noNav: BooleanConstructor;
146
- /**
147
- * Allow user to change the scroll behavior when a slide is navigated to()
148
- */
149
- scrollBehaviorNav: {
150
- type: StringConstructor;
151
- default: string;
152
- };
153
- /**
154
- * Allow user to change the scroll behavior when a slide is navigated via next/prev
155
- */
156
- scrollBehaviorControl: {
157
- type: StringConstructor;
158
- default: string;
159
- };
160
- /**
161
- * Observe
162
- */
163
- observerOptions: {
164
- type: ObjectConstructor;
165
- default: () => {
166
- threshhold: number;
167
- rootMargin: string;
168
- };
169
- };
170
- /**
171
- * The intial slide index to use for active slide (zero based)
172
- */
173
- initialActive: {
174
- type: NumberConstructor;
175
- default: number;
176
- };
177
- /**
178
- * Allow user to control scroll amount (element.scrollTo) for prev/next controls
179
- * - For future scroll implementations (like ulu scroll-slider for cards, etc)
180
- * - Function is passed (direction, DomRefs)
181
- * - Number is passed directly
182
- */
183
- scrollAmount: (FunctionConstructor | NumberConstructor)[];
184
- }>> & Readonly<{
185
- "onSlide-change"?: ((...args: any[]) => any) | undefined;
186
- }>, {
187
- observerOptions: Record<string, any>;
188
- slideFocusable: boolean;
189
- noNav: boolean;
190
- focusOptions: Record<string, any>;
191
- scrollBehaviorNav: string;
192
- scrollBehaviorControl: string;
193
- initialActive: number;
194
- }, {}, {
195
- UluIcon: import('vue').DefineComponent<{}, {
196
- spaced: boolean;
197
- icon?: string | boolean | Record<string, any> | unknown[] | undefined;
198
- $props: {
199
- readonly spaced?: boolean | undefined;
200
- readonly icon?: string | boolean | Record<string, any> | unknown[] | undefined;
201
- };
202
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
203
- }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
204
- export default _default;
205
- //# sourceMappingURL=UluSlideShow.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UluSlideShow.vue.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/slider/UluSlideShow.vue"],"names":[],"mappings":"AAiGA;;IAyVM;;OAEG;;IAEH;;OAEG;;;;;;;;IAQH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;;;;IAQH;;OAEG;;;;;IAKH;;;;;OAKG;;;;;;;;IA2BH;;OAEG;;;;;;IAQH;;OAEG;;IAIH;;OAEG;;;;;;IAKH;;OAEG;;IAgBH;;OAEG;;IAIH;;;OAGG;;IAcH;;OAEG;;IAKH;;OAEG;;IAKH;;OAEG;;IAsBH;;OAEG;;IAUH;;OAEG;;;IA1MH;;OAEG;;IAEH;;OAEG;;;;;;;;IAQH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;;;;IAQH;;OAEG;;;;;IAKH;;;;;OAKG"}
@@ -1,292 +0,0 @@
1
- import p from "../../elements/UluIcon.vue.js";
2
- import { resolveComponent as S, createElementBlock as a, openBlock as d, createElementVNode as r, createCommentVNode as w, Fragment as v, renderList as f, normalizeClass as _, renderSlot as m, createVNode as b, toDisplayString as g } from "vue";
3
- import k from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const y = {
5
- name: "SlideShow",
6
- emits: ["slide-change"],
7
- components: {
8
- UluIcon: p
9
- },
10
- props: {
11
- /**
12
- * Should slides be focusable by tab key
13
- */
14
- slideFocusable: Boolean,
15
- /**
16
- * Setting for element.focus() when navigating to() a specific slide
17
- */
18
- focusOptions: {
19
- type: Object,
20
- default: () => ({
21
- preventScroll: !0,
22
- focusVisible: !1
23
- })
24
- },
25
- /**
26
- * Array of slide items (data)
27
- * - Use slot (#slide) to template
28
- */
29
- items: Array,
30
- /**
31
- * Slideshow without a nav
32
- */
33
- noNav: Boolean,
34
- /**
35
- * Allow user to change the scroll behavior when a slide is navigated to()
36
- */
37
- scrollBehaviorNav: {
38
- type: String,
39
- default: "instant"
40
- },
41
- /**
42
- * Allow user to change the scroll behavior when a slide is navigated via next/prev
43
- */
44
- scrollBehaviorControl: {
45
- type: String,
46
- default: "smooth"
47
- },
48
- /**
49
- * Observe
50
- */
51
- observerOptions: {
52
- type: Object,
53
- default: () => ({
54
- threshhold: 0,
55
- rootMargin: "-50% 0px"
56
- })
57
- },
58
- /**
59
- * The intial slide index to use for active slide (zero based)
60
- */
61
- initialActive: {
62
- type: Number,
63
- default: 0
64
- },
65
- /**
66
- * Allow user to control scroll amount (element.scrollTo) for prev/next controls
67
- * - For future scroll implementations (like ulu scroll-slider for cards, etc)
68
- * - Function is passed (direction, DomRefs)
69
- * - Number is passed directly
70
- */
71
- scrollAmount: [Number, Function]
72
- },
73
- data() {
74
- return {
75
- slides: this.createSlides()
76
- };
77
- },
78
- computed: {
79
- canScrollRight() {
80
- const { slides: e } = this;
81
- return !e[e.length - 1].active;
82
- },
83
- canScrollLeft() {
84
- const { slides: e } = this;
85
- return !e[0].active;
86
- }
87
- },
88
- watch: {
89
- "items.length"() {
90
- this.slides = this.createSlides(), this.$nextTick(() => {
91
- this.observeSlides();
92
- });
93
- }
94
- },
95
- methods: {
96
- /**
97
- * Creates the internal array of slides based on user's passed items
98
- */
99
- createSlides() {
100
- return this.items.map((e) => ({
101
- element: null,
102
- active: !1,
103
- item: e
104
- }));
105
- },
106
- /**
107
- * Find the corresponding slide data by slide element
108
- */
109
- getSlideByElement(e) {
110
- return this.slides.find(({ element: t }) => e === t);
111
- },
112
- /**
113
- * Provides scroll measurements
114
- */
115
- getScrollData() {
116
- const { scrollLeft: e, offsetWidth: t, scrollWidth: s } = this.$refs.track;
117
- return { scrollLeft: e, offsetWidth: t, scrollWidth: s };
118
- },
119
- /**
120
- * Determines the amount to scroll the track
121
- */
122
- resolveAmount(e) {
123
- const t = e === "next", { scrollAmount: s } = this, { scrollLeft: n, offsetWidth: l } = this.getScrollData();
124
- return typeof s == "function" ? s(e, this.$refs) : typeof s == "number" ? t ? n + s : n - s : t ? n + l : n - l;
125
- },
126
- /**
127
- * Scroll the track to a specified point
128
- */
129
- scrollTo(e, t) {
130
- this.$refs.track.scrollTo({ left: e, top: 0, behavior: t });
131
- },
132
- /**
133
- * Scroll to specific index
134
- * @param {Number} index Slide index
135
- */
136
- to(e) {
137
- const t = this.slides[e], { track: s } = this.$refs;
138
- if (t) {
139
- let n = t.element.offsetLeft;
140
- const l = () => {
141
- t.element.focus(this.focusOptions), s.removeEventListener("scrollend", l);
142
- };
143
- s.addEventListener("scrollend", l), this.scrollTo(n, this.scrollBehaviorNav);
144
- }
145
- },
146
- /**
147
- * Goto to next slide
148
- */
149
- next() {
150
- const e = this.resolveAmount("next");
151
- this.scrollTo(e, this.scrollBehaviorControl);
152
- },
153
- /**
154
- * Goto to previous slide
155
- */
156
- previous() {
157
- const e = this.resolveAmount("previous");
158
- this.scrollTo(e, this.scrollBehaviorControl);
159
- },
160
- /**
161
- * Sets up a new observer to watch the slides visibility (within track)
162
- */
163
- createObserver() {
164
- const { observerOptions: e } = this, { track: t, nav: s } = this.$refs, n = (l) => {
165
- l.forEach((i) => {
166
- this.$nextTick(() => {
167
- const h = this.getSlideByElement(i.target);
168
- h.active = i.isIntersecting, this.$emit("slide-change", { slide: h, track: t, nav: s });
169
- });
170
- });
171
- };
172
- this.observer = new IntersectionObserver(n, {
173
- root: t,
174
- ...e
175
- });
176
- },
177
- /**
178
- * Add all slide elements as targets in observer
179
- */
180
- observeSlides() {
181
- const { observer: e, slides: t } = this;
182
- e.disconnect(), t.forEach(({ element: s }) => {
183
- s && e.observe(s);
184
- });
185
- },
186
- /**
187
- * Remove observer and it's internal DOM references (GC)
188
- */
189
- destroyObserver() {
190
- this.observer.disconnect(), this.observer = null;
191
- }
192
- },
193
- mounted() {
194
- this.createObserver(), this.observeSlides();
195
- },
196
- beforeUnmount() {
197
- this.destroyObserver();
198
- }
199
- }, x = { class: "slideshow" }, O = {
200
- class: "slideshow__control-context",
201
- ref: "context"
202
- }, B = {
203
- class: "slideshow__track-crop",
204
- ref: "crop"
205
- }, C = {
206
- class: "slideshow__track",
207
- ref: "track"
208
- }, N = ["tabindex"], E = { class: "slideshow__controls" }, L = { class: "slideshow__controls-item slideshow__controls-item--previous" }, A = ["disabled"], T = { class: "slideshow__controls-item slideshow__controls-item--next" }, I = ["disabled"], U = {
209
- key: 0,
210
- class: "slideshow__nav",
211
- ref: "nav"
212
- }, $ = ["onClick"], F = { class: "hidden-visually" };
213
- function V(e, t, s, n, l, i) {
214
- const h = S("UluIcon");
215
- return d(), a("div", x, [
216
- r("div", O, [
217
- r("div", B, [
218
- r("ul", C, [
219
- (d(!0), a(v, null, f(l.slides, (o, c) => (d(), a("li", {
220
- class: _(["slideshow__slide", { "is-active": o.active }]),
221
- key: c,
222
- tabindex: s.slideFocusable ? "0" : "-1",
223
- ref_for: !0,
224
- ref: (u) => {
225
- o.element = u;
226
- }
227
- }, [
228
- m(e.$slots, "slide", {
229
- item: o.item,
230
- index: c
231
- })
232
- ], 10, N))), 128))
233
- ], 512)
234
- ], 512),
235
- r("ul", E, [
236
- r("li", L, [
237
- r("button", {
238
- class: "slideshow__control-button slideshow__control-button--previous",
239
- "aria-label": "Scroll Right",
240
- onClick: t[0] || (t[0] = (...o) => i.previous && i.previous(...o)),
241
- disabled: !i.canScrollLeft
242
- }, [
243
- b(h, {
244
- class: "slideshow__control-icon",
245
- icon: "type:previous"
246
- })
247
- ], 8, A)
248
- ]),
249
- r("li", T, [
250
- r("button", {
251
- class: "slideshow__control-button slideshow__control-button--next",
252
- "aria-label": "Scroll Left",
253
- onClick: t[1] || (t[1] = (...o) => i.next && i.next(...o)),
254
- disabled: !i.canScrollRight
255
- }, [
256
- b(h, {
257
- class: "slideshow__control-icon",
258
- icon: "type:next"
259
- })
260
- ], 8, I)
261
- ])
262
- ])
263
- ], 512),
264
- s.noNav ? w("", !0) : (d(), a("ul", U, [
265
- (d(!0), a(v, null, f(l.slides, (o, c) => (d(), a("li", {
266
- class: _(["slideshow__nav-item", { "is-active": o.active }]),
267
- ref_for: !0,
268
- ref: (u) => {
269
- o.navElement = u;
270
- },
271
- key: c
272
- }, [
273
- r("button", {
274
- class: _(["slideshow__nav-button", { "is-active": o.active }]),
275
- onClick: (u) => i.to(c)
276
- }, [
277
- m(e.$slots, "nav", {
278
- item: o.item,
279
- index: c,
280
- active: o.active
281
- }, () => [
282
- r("span", F, "Item " + g(c + 1), 1)
283
- ])
284
- ], 10, $)
285
- ], 2))), 128))
286
- ], 512))
287
- ]);
288
- }
289
- const j = /* @__PURE__ */ k(y, [["render", V]]);
290
- export {
291
- j as default
292
- };
@@ -1,17 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- /**
3
- * Provided by grandparent, not user
4
- */
5
- active: BooleanConstructor;
6
- someClassTest: StringConstructor;
7
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
8
- /**
9
- * Provided by grandparent, not user
10
- */
11
- active: BooleanConstructor;
12
- someClassTest: StringConstructor;
13
- }>> & Readonly<{}>, {
14
- active: boolean;
15
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
16
- export default _default;
17
- //# sourceMappingURL=UluSlideShowSlide.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UluSlideShowSlide.vue.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/slider/UluSlideShowSlide.vue"],"names":[],"mappings":"AASA;;IA6BM;;OAEG;;;;IAFH;;OAEG"}
@@ -1,26 +0,0 @@
1
- import { createElementBlock as s, openBlock as t, normalizeClass as l, renderSlot as i } from "vue";
2
- import n from "../../../_virtual/_plugin-vue_export-helper.js";
3
- const r = {
4
- name: "SlideShowSlide",
5
- props: {
6
- /**
7
- * Provided by grandparent, not user
8
- */
9
- active: Boolean,
10
- someClassTest: String
11
- },
12
- mounted() {
13
- console.log("slide mounted");
14
- }
15
- };
16
- function a(e, c, o, d, m, p) {
17
- return t(), s("li", {
18
- class: l(["slideshow__slide", { "is-active": o.active }])
19
- }, [
20
- i(e.$slots, "default")
21
- ], 2);
22
- }
23
- const u = /* @__PURE__ */ n(r, [["render", a]]);
24
- export {
25
- u as default
26
- };
@@ -1,75 +0,0 @@
1
- <!--
2
- Note: This is the image implementation of SlideShow
3
- Notes:
4
- - Should the images resize to fit the nav?
5
- - Should the nav slide based on the active index?
6
-
7
- -->
8
- <template>
9
- <UluSlideShow
10
- class="slideshow--images"
11
- :items="images"
12
- @slide-change="slideChange"
13
- >
14
- <template #slide="{ item }">
15
- <img :src="item.src" :alt="item.alt">
16
- <!-- Adding this in here for now, not generic meant for selection in compare ui -->
17
- <div class="slideshow__image-actions">
18
- <AppButton v-if="selectButton" class="type-small" icon="plus" small iconBefore>
19
- Select
20
- </AppButton>
21
- </div>
22
- </template>
23
- <template #nav="{ index }">
24
- <img :src="images[index].src" :alt="`View image ${ index }`">
25
- </template>
26
- </UluSlideShow>
27
- </template>
28
-
29
- <script>
30
- import UluSlideShow from "./UluSlideShow.vue";
31
- export default {
32
- name: 'ImageSlideShow',
33
- components: {
34
- UluSlideShow,
35
- },
36
- props: {
37
- images: Array,
38
- selectButton: Boolean
39
- },
40
- watch: {
41
- images() {
42
- console.log('watch image from outer');
43
- }
44
- },
45
- methods: {
46
- /**
47
- * Test to see if the active slide's nav button (thumbnail) is in view
48
- * if not, scroll the nav to ensure it is visible. This function will take
49
- * into account which side of the overflow nav the item is hidden in and will
50
- * scroll either to fit it to the flush end (if overflow to the right) or flush start
51
- */
52
- slideChange({ slide, nav }) {
53
- const { active, navElement } = slide;
54
- if (!navElement) return;
55
- const { offsetWidth, scrollLeft: left } = nav;
56
- const { offsetLeft, offsetWidth: navWidth } = navElement;
57
- const right = left + offsetWidth;
58
- const navRight = offsetLeft + navWidth;
59
- let amount = null;
60
- console.log('left/right', left, right);
61
- if (active && navElement) {
62
-
63
- if (navRight > right) {
64
- amount = left + (navRight - right);
65
- } else if (offsetLeft < left) {
66
- amount = offsetLeft;
67
- }
68
- if (amount !== null) {
69
- nav.scrollTo({ left: amount, top: 0, behavior: "smooth" });
70
- }
71
- }
72
- }
73
- }
74
- }
75
- </script>