@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
@@ -1,16 +1,11 @@
1
- import { resolveComponent as v, createBlock as b, openBlock as d, Teleport as S, createElementVNode as c, withModifiers as R, normalizeStyle as _, normalizeClass as r, createElementBlock as z, createCommentVNode as u, renderSlot as h, toDisplayString as I, createVNode as g, useSlots as k, computed as f } from "vue";
1
+ import { useSlots as q, ref as p, computed as a, watch as B, nextTick as M, onMounted as G, onBeforeUnmount as J, createBlock as O, openBlock as c, Teleport as K, createElementVNode as d, withModifiers as Q, normalizeStyle as Z, normalizeClass as i, unref as T, createElementBlock as w, createCommentVNode as h, renderSlot as u, toDisplayString as _, createVNode as L } from "vue";
2
2
  import C from "../elements/UluIcon.vue.js";
3
- import { useModifiers as w } from "../../composables/useModifiers.js";
4
- import { preventScroll as E, wasClickOutside as B } from "@ulu/utils/browser/dom.js";
5
- import { Resizer as M } from "@ulu/frontend";
6
- import { newId as V } from "../../utils/dom.js";
7
- import T from "../../_virtual/_plugin-vue_export-helper.js";
8
- const p = {
9
- name: "UluModal",
10
- components: {
11
- UluIcon: C
12
- },
13
- emits: ["update:modelValue", "close", "open"],
3
+ import { useModifiers as x } from "../../composables/useModifiers.js";
4
+ import { preventScroll as ee, wasClickOutside as le } from "@ulu/utils/browser/dom.js";
5
+ import { Resizer as oe, observeDialogToggle as te } from "@ulu/frontend";
6
+ import { newId as se } from "../../utils/dom.js";
7
+ const ne = ["aria-labelledby", "aria-describedby"], ie = ["id"], re = { class: "modal__title-text" }, ve = {
8
+ __name: "UluModal",
14
9
  props: {
15
10
  /**
16
11
  * Controls the visibility of the modal (for v-model).
@@ -114,205 +109,158 @@ const p = {
114
109
  /**
115
110
  * Modifiers (to add any modifier classes based on base class [ie. 'tertiary'])
116
111
  */
117
- modifiers: [String, Array]
118
- },
119
- data() {
120
- return {
121
- containerWidth: null,
122
- titleId: V("ulu-modal-title"),
123
- bodyOverflowValue: null,
124
- bodyPaddingRightValue: null,
125
- isResizing: !1
126
- };
112
+ modifiers: [String, Array],
113
+ /**
114
+ * If true, modal is forced to fullscreen on mobile viewports
115
+ */
116
+ fullscreenMobile: Boolean
127
117
  },
128
- setup(e) {
129
- const l = k(), t = f(() => e.title || l.title), o = f(() => {
130
- const { allowResize: i, position: m } = e;
131
- if (!i || !m) return;
132
- const y = ["left", "right", "center"];
133
- return y.includes(m) ? !0 : (console.warn(`Passed invalid position for resize (${m}), use ${y.join(", ")}`), !1);
134
- }), n = f(() => e.position === "center" ? "type:resizeBoth" : "type:resizeHorizontal"), s = f(() => ({
118
+ emits: ["update:modelValue", "close", "open"],
119
+ setup(t, { emit: H }) {
120
+ const r = H, e = t, j = q(), D = p(null), I = se("ulu-modal-title"), g = p(!1), o = p(null), R = p(null), E = a(() => e.title || j.title), f = a(() => {
121
+ const { allowResize: l, position: s } = e;
122
+ if (!l || !s) return !1;
123
+ const $ = ["left", "right", "center"];
124
+ return $.includes(s) ? !0 : (console.warn(`Passed invalid position for resize (${s}), use ${$.join(", ")}`), !1);
125
+ }), N = a(() => e.position === "center" ? "type:resizeBoth" : "type:resizeHorizontal"), P = a(() => ({
135
126
  [e.position]: e.position,
136
127
  resize: e.allowResize,
137
128
  "no-resize": !e.allowResize,
138
- "no-header": !t.value,
129
+ "no-header": !E.value,
139
130
  "body-fills": e.bodyFills,
140
131
  "no-backdrop": e.noBackdrop,
141
132
  "no-min-height": e.noMinHeight,
142
133
  "non-modal": e.nonModal,
143
- "resizer-active": o.value
144
- })), { resolvedModifiers: a } = w({
134
+ "resizer-active": f.value,
135
+ "fullscreen-mobile": e.fullscreenMobile
136
+ })), { resolvedModifiers: F } = x({
145
137
  props: e,
146
138
  baseClass: "modal",
147
- internal: s
148
- });
149
- return {
150
- resolvedModifiers: a,
151
- hasHeader: t,
152
- resizerEnabled: o,
153
- resizerIconType: n
154
- };
155
- },
156
- computed: {
157
- resolvedLabelledby() {
158
- const { labelledby: e, titleId: l } = this;
159
- return e || l;
160
- }
161
- },
162
- watch: {
163
- modelValue: {
164
- // So that it runs on mount (if modelValue is initially true)
165
- immediate: !0,
166
- handler(e) {
167
- this.$nextTick(() => {
168
- const { container: l } = this.$refs;
169
- e ? (l[this.nonModal ? "show" : "showModal"](), this.$emit("open")) : l.close();
170
- });
139
+ internal: P
140
+ }), U = a(() => e.labelledby ? e.labelledby : I), n = () => {
141
+ r("update:modelValue", !1), r("close");
142
+ }, X = () => {
143
+ e.modelValue && (r("update:modelValue", !1), r("close"));
144
+ }, A = (l) => {
145
+ if (e.clickOutsideCloses && !g.value) {
146
+ const { target: s } = l;
147
+ s === o.value && le(o.value, l) && n();
171
148
  }
172
- },
173
- resizerEnabled: {
174
- immediate: !1,
175
- // Don't run on initial mount, as setupResizer is called in mounted
176
- handler(e) {
177
- e ? this.$nextTick(() => {
178
- this.setupResizer();
179
- }) : this.destroyResizer();
180
- }
181
- },
182
- position(e, l) {
183
- e !== l && (this.destroyResizer(), this.$nextTick(() => {
184
- this.setupResizer();
149
+ };
150
+ let m = null, v = null, b = null, y = null, z = null;
151
+ const W = () => {
152
+ !e.nonModal && e.preventScroll && (m = te(o.value, (l) => {
153
+ l ? v = ee({ preventShift: e.preventScrollShift }) : V();
185
154
  }));
186
- }
187
- },
188
- methods: {
189
- close() {
190
- this.$emit("update:modelValue", !1), this.$emit("close");
191
- },
192
- handleDialogCloseEvent() {
193
- this.modelValue && (this.$emit("update:modelValue", !1), this.$emit("close"));
194
- },
195
- handleClick(e) {
196
- if (this.clickOutsideCloses && !this.isResizing) {
197
- const { target: l } = e, { container: t } = this.$refs;
198
- l === t && B(t, e) && this.close();
199
- }
200
- },
201
- setupPreventScroll() {
202
- const { body: e } = document;
203
- this.bodyOverflowValue = e.style.overflow, this.bodyPaddingRightValue = e.style.paddingRight;
204
- },
205
- destroyPreventScroll() {
206
- this.restoreScroll && this.restoreScroll();
207
- },
208
- handleToggle(e) {
209
- if (!this.nonModal && this.preventScroll) {
210
- const { preventScrollShift: l } = this;
211
- e.newState === "open" ? this.restoreScroll = E({ preventShift: l }) : this.destroyPreventScroll();
212
- }
213
- },
214
- setupResizer() {
215
- const { position: e, resizerEnabled: l } = this;
216
- if (l) {
217
- const { container: t, resizer: o } = this.$refs, n = e === "center" ? { fromX: "right", fromY: "bottom", multiplier: 2 } : { fromX: e === "right" ? "left" : "right" };
218
- this.resizerInstance = new M(t, o, n), this.handleResizerStart = () => {
219
- this.isResizing = !0;
220
- }, this.handleResizerEnd = () => {
155
+ }, Y = () => {
156
+ m && (m.destroy(), m = null);
157
+ }, V = () => {
158
+ v && (v(), v = null);
159
+ }, S = () => {
160
+ if (f.value) {
161
+ const l = e.position === "center" ? { fromX: "right", fromY: "bottom", multiplier: 2 } : { fromX: e.position === "right" ? "left" : "right" };
162
+ b = new oe(o.value, R.value, l), y = () => {
163
+ g.value = !0;
164
+ }, z = () => {
221
165
  setTimeout(() => {
222
- this.isResizing = !1;
166
+ g.value = !1;
223
167
  }, 0);
224
- }, t.addEventListener("ulu:resizer:start", this.handleResizerStart), t.addEventListener("ulu:resizer:end", this.handleResizerEnd);
168
+ }, o.value.addEventListener("ulu:resizer:start", y), o.value.addEventListener("ulu:resizer:end", z);
225
169
  }
226
- },
227
- destroyResizer() {
228
- const { container: e } = this.$refs;
229
- this.resizerInstance && (this.resizerInstance.destroy(), this.resizerInstance = null), this.handleResizerStart && e.removeEventListener("ulu:resizer:start", this.handleResizerStart), this.handleResizerEnd && e.removeEventListener("ulu:resizer:end", this.handleResizerEnd);
230
- }
231
- },
232
- mounted() {
233
- this.preventScroll && this.setupPreventScroll(), this.setupResizer();
234
- },
235
- beforeUnmount() {
236
- const { container: e } = this.$refs;
237
- e && e.open && e.close(), this.destroyPreventScroll(), this.destroyResizer();
238
- }
239
- }, O = ["aria-labelledby", "aria-describedby"], P = ["id"], L = { class: "modal__title-text" }, U = {
240
- key: 2,
241
- class: "modal__resizer",
242
- ref: "resizer",
243
- type: "button"
244
- };
245
- function H(e, l, t, o, n, s) {
246
- const a = v("UluIcon");
247
- return d(), b(S, {
248
- to: t.teleport === !1 ? null : t.teleport,
249
- disabled: t.teleport === !1
250
- }, [
251
- c("dialog", {
252
- class: r(["modal", [o.resolvedModifiers, t.classes.container]]),
253
- "aria-labelledby": s.resolvedLabelledby,
254
- "aria-describedby": t.describedby,
255
- ref: "container",
256
- style: _({ width: n.containerWidth }),
257
- onCancel: l[1] || (l[1] = R((...i) => s.close && s.close(...i), ["prevent"])),
258
- onClose: l[2] || (l[2] = (...i) => s.handleDialogCloseEvent && s.handleDialogCloseEvent(...i)),
259
- onClick: l[3] || (l[3] = (...i) => s.handleClick && s.handleClick(...i)),
260
- onToggle: l[4] || (l[4] = (...i) => s.handleToggle && s.handleToggle(...i))
170
+ }, k = () => {
171
+ b && (b.destroy(), b = null), y && o.value && o.value.removeEventListener("ulu:resizer:start", y), z && o.value && o.value.removeEventListener("ulu:resizer:end", z);
172
+ };
173
+ return B(() => e.modelValue, (l) => {
174
+ M(() => {
175
+ o.value && (l ? (o.value[e.nonModal ? "show" : "showModal"](), r("open")) : o.value.close());
176
+ });
177
+ }, { immediate: !0 }), B(f, (l) => {
178
+ l ? M(() => {
179
+ S();
180
+ }) : k();
181
+ }, { immediate: !1 }), B(() => e.position, (l, s) => {
182
+ l !== s && (k(), M(() => {
183
+ S();
184
+ }));
185
+ }), G(() => {
186
+ W(), S();
187
+ }), J(() => {
188
+ o.value && o.value.open && o.value.close(), Y(), V(), k();
189
+ }), (l, s) => (c(), O(K, {
190
+ to: t.teleport === !1 ? null : t.teleport,
191
+ disabled: t.teleport === !1
261
192
  }, [
262
- o.hasHeader ? (d(), z("header", {
263
- key: 0,
264
- class: r(["modal__header", t.classes.header])
193
+ d("dialog", {
194
+ class: i(["modal", [T(F), t.classes.container]]),
195
+ "aria-labelledby": U.value,
196
+ "aria-describedby": t.describedby,
197
+ ref_key: "container",
198
+ ref: o,
199
+ style: Z({ width: D.value }),
200
+ onCancel: Q(n, ["prevent"]),
201
+ onClose: X,
202
+ onClick: A
265
203
  }, [
266
- c("h2", {
267
- class: r(["modal__title", t.classes.title]),
268
- id: n.titleId
204
+ E.value ? (c(), w("header", {
205
+ key: 0,
206
+ class: i(["modal__header", t.classes.header])
269
207
  }, [
270
- h(e.$slots, "title", { close: s.close }, () => [
271
- t.titleIcon ? (d(), b(a, {
272
- key: 0,
273
- class: "modal__title-icon",
274
- icon: t.titleIcon
275
- }, null, 8, ["icon"])) : u("", !0),
276
- c("span", L, I(t.title), 1)
277
- ])
278
- ], 10, P),
279
- c("button", {
280
- class: r(["modal__close", t.classes.close]),
281
- "aria-label": "Close modal",
282
- onClick: l[0] || (l[0] = (...i) => s.close && s.close(...i)),
283
- autofocus: ""
208
+ d("h2", {
209
+ class: i(["modal__title", t.classes.title]),
210
+ id: T(I)
211
+ }, [
212
+ u(l.$slots, "title", { close: n }, () => [
213
+ t.titleIcon ? (c(), O(C, {
214
+ key: 0,
215
+ class: "modal__title-icon",
216
+ icon: t.titleIcon
217
+ }, null, 8, ["icon"])) : h("", !0),
218
+ d("span", re, _(t.title), 1)
219
+ ])
220
+ ], 10, ie),
221
+ d("button", {
222
+ class: i(["modal__close", t.classes.close]),
223
+ "aria-label": "Close modal",
224
+ onClick: n,
225
+ autofocus: ""
226
+ }, [
227
+ u(l.$slots, "closeIcon", {}, () => [
228
+ L(C, {
229
+ class: "modal__close-icon",
230
+ icon: t.closeIcon || "type:close"
231
+ }, null, 8, ["icon"])
232
+ ])
233
+ ], 2)
234
+ ], 2)) : h("", !0),
235
+ d("div", {
236
+ class: i(["modal__body", t.classes.body])
237
+ }, [
238
+ u(l.$slots, "default", { close: n })
239
+ ], 2),
240
+ l.$slots.footer ? (c(), w("div", {
241
+ key: 1,
242
+ class: i(["site-modal__footer", t.classes.footer])
243
+ }, [
244
+ u(l.$slots, "footer", { close: n })
245
+ ], 2)) : h("", !0),
246
+ f.value ? (c(), w("button", {
247
+ key: 2,
248
+ class: "modal__resizer",
249
+ ref_key: "resizer",
250
+ ref: R,
251
+ type: "button"
284
252
  }, [
285
- h(e.$slots, "closeIcon", {}, () => [
286
- g(a, {
287
- class: "modal__close-icon",
288
- icon: t.closeIcon || "type:close"
253
+ u(l.$slots, "resizerIcon", {}, () => [
254
+ L(C, {
255
+ class: "modal__resizer-icon",
256
+ icon: t.resizerIcon || N.value
289
257
  }, null, 8, ["icon"])
290
258
  ])
291
- ], 2)
292
- ], 2)) : u("", !0),
293
- c("div", {
294
- class: r(["modal__body", t.classes.body])
295
- }, [
296
- h(e.$slots, "default", { close: s.close })
297
- ], 2),
298
- e.$slots.footer ? (d(), z("div", {
299
- key: 1,
300
- class: r(["site-modal__footer", t.classes.footer])
301
- }, [
302
- h(e.$slots, "footer", { close: s.close })
303
- ], 2)) : u("", !0),
304
- o.resizerEnabled ? (d(), z("button", U, [
305
- h(e.$slots, "resizerIcon", {}, () => [
306
- g(a, {
307
- class: "modal__resizer-icon",
308
- icon: t.resizerIcon || o.resizerIconType
309
- }, null, 8, ["icon"])
310
- ])
311
- ], 512)) : u("", !0)
312
- ], 46, O)
313
- ], 8, ["to", "disabled"]);
314
- }
315
- const A = /* @__PURE__ */ T(p, [["render", H]]);
259
+ ], 512)) : h("", !0)
260
+ ], 46, ne)
261
+ ], 8, ["to", "disabled"]));
262
+ }
263
+ };
316
264
  export {
317
- A as default
265
+ ve as default
318
266
  };
@@ -5,9 +5,11 @@ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
5
5
  });
6
6
  declare const __VLS_component: import('vue').DefineComponent<{}, {
7
7
  vertical: boolean;
8
+ modifiers?: string | unknown[] | undefined;
8
9
  defaultIndex?: number | undefined;
9
10
  $props: {
10
11
  readonly vertical?: boolean | undefined;
12
+ readonly modifiers?: string | unknown[] | undefined;
11
13
  readonly defaultIndex?: number | undefined;
12
14
  };
13
15
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"UluTabGroup.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluTabGroup.vue"],"names":[],"mappings":"AAYA;wBAwHqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAVjC;;;;;;;2OAOG"}
1
+ {"version":3,"file":"UluTabGroup.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluTabGroup.vue"],"names":[],"mappings":"AAoBA;wBAmJqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAVjC;;;;;;;;;2OAOG"}
@@ -1,6 +1,7 @@
1
- import { createBlock as r, openBlock as l, unref as o, withCtx as n, createElementVNode as c, normalizeClass as i, renderSlot as s, normalizeProps as u, guardReactiveProps as d } from "vue";
2
- import { TabGroup as f } from "@headlessui/vue";
3
- const b = /* @__PURE__ */ Object.assign({
1
+ import { createBlock as l, openBlock as i, unref as t, withCtx as n, createElementVNode as d, mergeProps as c, renderSlot as u, normalizeProps as f, guardReactiveProps as m } from "vue";
2
+ import { TabGroup as p } from "@headlessui/vue";
3
+ import { useModifiers as v } from "../../composables/useModifiers.js";
4
+ const h = /* @__PURE__ */ Object.assign({
4
5
  inheritAttrs: !1
5
6
  }, {
6
7
  __name: "UluTabGroup",
@@ -12,26 +13,34 @@ const b = /* @__PURE__ */ Object.assign({
12
13
  /**
13
14
  * Whether or not to use vertical layout
14
15
  */
15
- vertical: Boolean
16
+ vertical: Boolean,
17
+ /**
18
+ * Class modifiers (ie. 'transparent', 'secondary', etc)
19
+ */
20
+ modifiers: [String, Array]
16
21
  },
17
22
  setup(e) {
18
- return (t, m) => (l(), r(o(f), {
23
+ const a = e, { resolvedModifiers: s } = v({ props: a, baseClass: "tabs" });
24
+ return (r, b) => (i(), l(t(p), {
19
25
  defaultIndex: e.defaultIndex,
20
26
  vertical: e.vertical
21
27
  }, {
22
- default: n((a) => [
23
- c("div", {
24
- class: i(["tabs", {
25
- "tabs--vertical": e.vertical
26
- }])
27
- }, [
28
- s(t.$slots, "default", u(d(a)))
29
- ], 2)
28
+ default: n((o) => [
29
+ d("div", c(r.$attrs, {
30
+ class: ["tabs", [
31
+ t(s),
32
+ {
33
+ "tabs--vertical": e.vertical
34
+ }
35
+ ]]
36
+ }), [
37
+ u(r.$slots, "default", f(m(o)))
38
+ ], 16)
30
39
  ]),
31
40
  _: 3
32
41
  }, 8, ["defaultIndex", "vertical"]));
33
42
  }
34
43
  });
35
44
  export {
36
- b as default
45
+ h as default
37
46
  };
@@ -1,147 +1,32 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- /**
3
- * Alert Title
4
- */
5
- title: StringConstructor;
6
- /**
7
- * Alert description
8
- */
9
- description: StringConstructor;
10
- /**
11
- * Pass specific icon definition, else it will resolve based on common types
12
- */
13
- icon: StringConstructor;
14
- /**
15
- * Error, warning, info, success etc (must have these callout modifiers setup and this is used for type color [ie. color-error])
16
- */
17
- type: {
18
- type: StringConstructor;
19
- default: string;
20
- };
21
- /**
22
- * Compact callout style
23
- */
24
- compact: BooleanConstructor;
25
- /**
26
- * Modifiers (to add any modifier classes based on base class [ie. 'tertiary'])
27
- */
28
- modifiers: (StringConstructor | ArrayConstructor)[];
29
- }>, {
30
- resolvedModifiers: any;
31
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
32
- /**
33
- * Alert Title
34
- */
35
- title: StringConstructor;
36
- /**
37
- * Alert description
38
- */
39
- description: StringConstructor;
40
- /**
41
- * Pass specific icon definition, else it will resolve based on common types
42
- */
43
- icon: StringConstructor;
44
- /**
45
- * Error, warning, info, success etc (must have these callout modifiers setup and this is used for type color [ie. color-error])
46
- */
47
- type: {
48
- type: StringConstructor;
49
- default: string;
50
- };
51
- /**
52
- * Compact callout style
53
- */
54
- compact: BooleanConstructor;
55
- /**
56
- * Modifiers (to add any modifier classes based on base class [ie. 'tertiary'])
57
- */
58
- modifiers: (StringConstructor | ArrayConstructor)[];
59
- }>> & Readonly<{}>, {
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<{}, {
60
7
  type: string;
61
8
  compact: boolean;
62
- }, {}, {
63
- UluButton: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
64
- icon: (StringConstructor | ArrayConstructor)[];
65
- iconBefore: BooleanConstructor;
66
- iconOnly: BooleanConstructor;
67
- to: (ObjectConstructor | StringConstructor)[];
68
- href: StringConstructor;
69
- target: StringConstructor;
70
- download: (BooleanConstructor | StringConstructor)[];
71
- alt: StringConstructor;
72
- text: StringConstructor;
73
- size: StringConstructor;
74
- primary: BooleanConstructor;
75
- secondary: BooleanConstructor;
76
- small: BooleanConstructor;
77
- large: BooleanConstructor;
78
- outline: BooleanConstructor;
79
- transparent: BooleanConstructor;
80
- noMargin: BooleanConstructor;
81
- modifiers: (StringConstructor | ArrayConstructor)[];
82
- }>, {
83
- resolvedModifiers: any;
84
- }, {}, {
85
- resolvedAriaLabel(): string | null;
86
- classes(): string[];
87
- element(): "button" | import('vue-router')._RouterLinkI | "a";
88
- attrs(): {
89
- to: string | Record<string, any>;
90
- href?: undefined;
91
- } | {
92
- href: string;
93
- to?: undefined;
94
- } | {
95
- to?: undefined;
96
- href?: undefined;
97
- };
98
- }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
99
- icon: (StringConstructor | ArrayConstructor)[];
100
- iconBefore: BooleanConstructor;
101
- iconOnly: BooleanConstructor;
102
- to: (ObjectConstructor | StringConstructor)[];
103
- href: StringConstructor;
104
- target: StringConstructor;
105
- download: (BooleanConstructor | StringConstructor)[];
106
- alt: StringConstructor;
107
- text: StringConstructor;
108
- size: StringConstructor;
109
- primary: BooleanConstructor;
110
- secondary: BooleanConstructor;
111
- small: BooleanConstructor;
112
- large: BooleanConstructor;
113
- outline: BooleanConstructor;
114
- transparent: BooleanConstructor;
115
- noMargin: BooleanConstructor;
116
- modifiers: (StringConstructor | ArrayConstructor)[];
117
- }>> & Readonly<{}>, {
118
- small: boolean;
119
- iconOnly: boolean;
120
- iconBefore: boolean;
121
- primary: boolean;
122
- secondary: boolean;
123
- large: boolean;
124
- outline: boolean;
125
- transparent: boolean;
126
- noMargin: boolean;
127
- }, {}, {
128
- UluIcon: import('vue').DefineComponent<{}, {
129
- spaced: boolean;
130
- icon?: string | boolean | Record<string, any> | unknown[] | undefined;
131
- $props: {
132
- readonly spaced?: boolean | undefined;
133
- readonly icon?: string | boolean | Record<string, any> | unknown[] | undefined;
134
- };
135
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
136
- }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
137
- UluIcon: import('vue').DefineComponent<{}, {
138
- spaced: boolean;
139
- icon?: string | boolean | Record<string, any> | unknown[] | undefined;
140
- $props: {
141
- readonly spaced?: boolean | undefined;
142
- readonly icon?: string | boolean | Record<string, any> | unknown[] | undefined;
143
- };
144
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
145
- }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
146
- export default _default;
9
+ icon?: string | undefined;
10
+ title?: string | undefined;
11
+ modifiers?: string | unknown[] | undefined;
12
+ description?: string | undefined;
13
+ $props: {
14
+ readonly type?: string | undefined;
15
+ readonly compact?: boolean | undefined;
16
+ readonly icon?: string | undefined;
17
+ readonly title?: string | undefined;
18
+ readonly modifiers?: string | unknown[] | undefined;
19
+ readonly description?: string | undefined;
20
+ };
21
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
22
+ type __VLS_TemplateResult = {
23
+ attrs: Partial<{}>;
24
+ slots: {
25
+ title?(_: {}): any;
26
+ description?(_: {}): any;
27
+ action?(_: {}): any;
28
+ };
29
+ refs: {};
30
+ rootEl: HTMLDivElement;
31
+ };
147
32
  //# sourceMappingURL=UluAlert.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluAlert.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluAlert.vue"],"names":[],"mappings":"AAsBA;;IA+FM;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;IAKH;;OAEG;;IAEH;;OAEG;;;;;IAzBH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;IAKH;;OAEG;;IAEH;;OAEG"}
1
+ {"version":3,"file":"UluAlert.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluAlert.vue"],"names":[],"mappings":"AAsBA;wBA0MqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;;sPAQG"}