@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,14 +1,11 @@
1
- import { resolveComponent as m, createElementBlock as i, openBlock as s, normalizeClass as r, createElementVNode as o, createVNode as u, createCommentVNode as f, renderSlot as n, toDisplayString as c, createTextVNode as p, computed as _ } from "vue";
2
- import g from "./UluButton.vue.js";
3
- import y from "./UluIcon.vue.js";
4
- import { useModifiers as v } from "../../composables/useModifiers.js";
5
- import S from "../../_virtual/_plugin-vue_export-helper.js";
6
- const U = {
7
- name: "UluAlert",
8
- components: {
9
- UluButton: g,
10
- UluIcon: y
11
- },
1
+ import { computed as d, createElementBlock as s, openBlock as n, normalizeClass as r, unref as m, createElementVNode as t, createVNode as u, createCommentVNode as p, renderSlot as i, toDisplayString as a, createTextVNode as f } from "vue";
2
+ import g from "./UluIcon.vue.js";
3
+ import { useModifiers as y } from "../../composables/useModifiers.js";
4
+ const v = { class: "layout-flex" }, S = { class: "type-small" }, $ = {
5
+ key: 0,
6
+ class: "margin-left-auto align-self-center"
7
+ }, B = {
8
+ __name: "UluAlert",
12
9
  props: {
13
10
  /**
14
11
  * Alert Title
@@ -39,49 +36,41 @@ const U = {
39
36
  modifiers: [String, Array]
40
37
  },
41
38
  setup(e) {
42
- const { resolvedModifiers: l } = v({
43
- props: e,
39
+ const o = e, { resolvedModifiers: c } = y({
40
+ props: o,
44
41
  baseClass: "callout",
45
- internal: _(() => ({
46
- [e.type]: e.type,
47
- compact: e.compact
42
+ internal: d(() => ({
43
+ [o.type]: o.type,
44
+ compact: o.compact
48
45
  }))
49
46
  });
50
- return { resolvedModifiers: l };
51
- }
52
- }, h = { class: "layout-flex" }, $ = { class: "type-small" }, B = {
53
- key: 0,
54
- class: "margin-left-auto align-self-center"
55
- };
56
- function C(e, l, t, a, N, V) {
57
- const d = m("UluIcon");
58
- return s(), i("div", {
59
- class: r(["callout", a.resolvedModifiers])
60
- }, [
61
- o("div", h, [
62
- u(d, {
63
- class: r(["type-large margin-right-small", `color-${t.type}`]),
64
- icon: t.icon || `type:${t.type}`
65
- }, null, 8, ["class", "icon"]),
66
- o("div", $, [
67
- o("div", null, [
68
- n(e.$slots, "title", {}, () => [
69
- o("strong", null, c(t.title), 1)
47
+ return (l, h) => (n(), s("div", {
48
+ class: r(["callout", m(c)])
49
+ }, [
50
+ t("div", v, [
51
+ u(g, {
52
+ class: r(["type-large margin-right-small", `color-${e.type}`]),
53
+ icon: e.icon || `type:${e.type}`
54
+ }, null, 8, ["class", "icon"]),
55
+ t("div", S, [
56
+ t("div", null, [
57
+ i(l.$slots, "title", {}, () => [
58
+ t("strong", null, a(e.title), 1)
59
+ ])
60
+ ]),
61
+ t("div", null, [
62
+ i(l.$slots, "description", {}, () => [
63
+ f(a(e.description), 1)
64
+ ])
70
65
  ])
71
66
  ]),
72
- o("div", null, [
73
- n(e.$slots, "description", {}, () => [
74
- p(c(t.description), 1)
75
- ])
76
- ])
77
- ]),
78
- e.$slots.action ? (s(), i("div", B, [
79
- n(e.$slots, "action")
80
- ])) : f("", !0)
81
- ])
82
- ], 2);
83
- }
84
- const b = /* @__PURE__ */ S(U, [["render", C]]);
67
+ l.$slots.action ? (n(), s("div", $, [
68
+ i(l.$slots, "action")
69
+ ])) : p("", !0)
70
+ ])
71
+ ], 2));
72
+ }
73
+ };
85
74
  export {
86
- b as default
75
+ B as default
87
76
  };
@@ -7,20 +7,20 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
7
7
  skeleton: boolean;
8
8
  type?: string | undefined;
9
9
  size?: string | undefined;
10
- text?: string | undefined;
11
- href?: string | undefined;
12
- alt?: string | undefined;
13
10
  to?: string | Record<string, any> | undefined;
11
+ href?: string | undefined;
14
12
  click?: Function | undefined;
13
+ text?: string | undefined;
14
+ alt?: string | undefined;
15
15
  $props: {
16
16
  readonly skeleton?: boolean | undefined;
17
17
  readonly type?: string | undefined;
18
18
  readonly size?: string | undefined;
19
- readonly text?: string | undefined;
20
- readonly href?: string | undefined;
21
- readonly alt?: string | undefined;
22
19
  readonly to?: string | Record<string, any> | undefined;
20
+ readonly href?: string | undefined;
23
21
  readonly click?: Function | undefined;
22
+ readonly text?: string | undefined;
23
+ readonly alt?: string | undefined;
24
24
  };
25
25
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
26
26
  type __VLS_TemplateResult = {
@@ -3,6 +3,6 @@ declare const _default: import('vue').DefineComponent<{}, {
3
3
  $props: {
4
4
  readonly items?: unknown[] | undefined;
5
5
  };
6
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLUListElement>;
6
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
7
7
  export default _default;
8
8
  //# sourceMappingURL=UluBadgeStack.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluBadgeStack.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluBadgeStack.vue"],"names":[],"mappings":"AAWA;"}
1
+ {"version":3,"file":"UluBadgeStack.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluBadgeStack.vue"],"names":[],"mappings":"AAcA;"}
@@ -1,6 +1,9 @@
1
- import { createElementBlock as e, openBlock as r, Fragment as c, renderList as o, createVNode as n, mergeProps as l } from "vue";
2
- import m from "./UluBadge.vue.js";
3
- const _ = { class: "badge-stack" }, f = {
1
+ import { createElementBlock as e, createCommentVNode as c, openBlock as t, Fragment as m, renderList as n, createVNode as o, mergeProps as l } from "vue";
2
+ import u from "./UluBadge.vue.js";
3
+ const i = {
4
+ key: 0,
5
+ class: "badge-stack"
6
+ }, g = {
4
7
  __name: "UluBadgeStack",
5
8
  props: {
6
9
  /**
@@ -8,17 +11,17 @@ const _ = { class: "badge-stack" }, f = {
8
11
  */
9
12
  items: Array
10
13
  },
11
- setup(t) {
12
- return (u, i) => (r(), e("ul", _, [
13
- (r(!0), e(c, null, o(t.items, (a, s) => (r(), e("li", {
14
+ setup(r) {
15
+ return (_, d) => r.items?.length ? (t(), e("ul", i, [
16
+ (t(!0), e(m, null, n(r.items, (a, s) => (t(), e("li", {
14
17
  class: "badge-stack__item",
15
18
  key: s
16
19
  }, [
17
- n(m, l({ ref_for: !0 }, a), null, 16)
20
+ o(u, l({ ref_for: !0 }, a), null, 16)
18
21
  ]))), 128))
19
- ]));
22
+ ])) : c("", !0);
20
23
  }
21
24
  };
22
25
  export {
23
- f as default
26
+ g as default
24
27
  };
@@ -1,186 +1,56 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- /**
3
- * Icon prop, if used will set the icon for the button, will use UluIcon (which uses font-awesome icons conditionally)
4
- * - If using custom icons don't use this prop, use before or after slots with correct classes (ie .button__icon)
5
- */
6
- icon: (StringConstructor | ArrayConstructor)[];
7
- /**
8
- * If passing an icon (and not using iconOnly) this determines if the icon is before or after (default) the text
9
- */
10
- iconBefore: BooleanConstructor;
11
- /**
12
- * Button style for only icon
13
- */
14
- iconOnly: BooleanConstructor;
15
- /**
16
- * If set will use router-link for button component and pass to prop
17
- */
18
- to: (ObjectConstructor | StringConstructor)[];
19
- /**
20
- * Sets the button to a link with this href
21
- */
22
- href: StringConstructor;
23
- /**
24
- * Set a value for target attribute when button is a link
25
- */
26
- target: StringConstructor;
27
- /**
28
- * Sets the download attribute on the link (passing string [filename] will populate the download attribute, true will just include it as boolean attribute)
29
- */
30
- download: (BooleanConstructor | StringConstructor)[];
31
- /**
32
- * For icon only buttons or buttons that need an explicit label
33
- */
34
- alt: StringConstructor;
35
- /**
36
- * If not using slot this sets the buttons text via prop
37
- */
38
- text: StringConstructor;
39
- /**
40
- * Pass any sizes setup for button (ie. small, large, etc)
41
- */
42
- size: StringConstructor;
43
- /**
44
- * Preset to set primary style (needs to be a button style in ulu scss)
45
- */
46
- primary: BooleanConstructor;
47
- /**
48
- * Preset to set secondary style (needs to be a button style in ulu scss)
49
- */
50
- secondary: BooleanConstructor;
51
- /**
52
- * Preset to set small size (use "size" for any sizes)
53
- */
54
- small: BooleanConstructor;
55
- /**
56
- * Preset to set large size (use "size" for any sizes)
57
- */
58
- large: BooleanConstructor;
59
- /**
60
- * Preset to set outline style button (needs to be a button style in ulu scss)
61
- */
62
- outline: BooleanConstructor;
63
- /**
64
- * Preset to set transparent style button (needs to be a button style in ulu scss)
65
- */
66
- transparent: BooleanConstructor;
67
- /**
68
- * Add no-margin utility
69
- */
70
- noMargin: BooleanConstructor;
71
- /**
72
- * Modifiers (to add any modifier classes based on base class [ie. 'tertiary'])
73
- */
74
- modifiers: (StringConstructor | ArrayConstructor)[];
75
- }>, {
76
- resolvedModifiers: any;
77
- }, {}, {
78
- resolvedAriaLabel(): string | null;
79
- classes(): string[];
80
- element(): "button" | import('vue-router')._RouterLinkI | "a";
81
- attrs(): {
82
- to: string | Record<string, any>;
83
- href?: undefined;
84
- } | {
85
- href: string;
86
- to?: undefined;
87
- } | {
88
- to?: undefined;
89
- href?: undefined;
90
- };
91
- }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
92
- /**
93
- * Icon prop, if used will set the icon for the button, will use UluIcon (which uses font-awesome icons conditionally)
94
- * - If using custom icons don't use this prop, use before or after slots with correct classes (ie .button__icon)
95
- */
96
- icon: (StringConstructor | ArrayConstructor)[];
97
- /**
98
- * If passing an icon (and not using iconOnly) this determines if the icon is before or after (default) the text
99
- */
100
- iconBefore: BooleanConstructor;
101
- /**
102
- * Button style for only icon
103
- */
104
- iconOnly: BooleanConstructor;
105
- /**
106
- * If set will use router-link for button component and pass to prop
107
- */
108
- to: (ObjectConstructor | StringConstructor)[];
109
- /**
110
- * Sets the button to a link with this href
111
- */
112
- href: StringConstructor;
113
- /**
114
- * Set a value for target attribute when button is a link
115
- */
116
- target: StringConstructor;
117
- /**
118
- * Sets the download attribute on the link (passing string [filename] will populate the download attribute, true will just include it as boolean attribute)
119
- */
120
- download: (BooleanConstructor | StringConstructor)[];
121
- /**
122
- * For icon only buttons or buttons that need an explicit label
123
- */
124
- alt: StringConstructor;
125
- /**
126
- * If not using slot this sets the buttons text via prop
127
- */
128
- text: StringConstructor;
129
- /**
130
- * Pass any sizes setup for button (ie. small, large, etc)
131
- */
132
- size: StringConstructor;
133
- /**
134
- * Preset to set primary style (needs to be a button style in ulu scss)
135
- */
136
- primary: BooleanConstructor;
137
- /**
138
- * Preset to set secondary style (needs to be a button style in ulu scss)
139
- */
140
- secondary: BooleanConstructor;
141
- /**
142
- * Preset to set small size (use "size" for any sizes)
143
- */
144
- small: BooleanConstructor;
145
- /**
146
- * Preset to set large size (use "size" for any sizes)
147
- */
148
- large: BooleanConstructor;
149
- /**
150
- * Preset to set outline style button (needs to be a button style in ulu scss)
151
- */
152
- outline: BooleanConstructor;
153
- /**
154
- * Preset to set transparent style button (needs to be a button style in ulu scss)
155
- */
156
- transparent: BooleanConstructor;
157
- /**
158
- * Add no-margin utility
159
- */
160
- noMargin: BooleanConstructor;
161
- /**
162
- * Modifiers (to add any modifier classes based on base class [ie. 'tertiary'])
163
- */
164
- modifiers: (StringConstructor | ArrayConstructor)[];
165
- }>> & Readonly<{}>, {
166
- small: boolean;
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<{}, {
167
7
  iconOnly: boolean;
168
8
  iconBefore: boolean;
169
9
  primary: boolean;
170
10
  secondary: boolean;
11
+ small: boolean;
171
12
  large: boolean;
172
13
  outline: boolean;
173
14
  transparent: boolean;
174
15
  noMargin: boolean;
175
- }, {}, {
176
- UluIcon: import('vue').DefineComponent<{}, {
177
- spaced: boolean;
178
- icon?: string | boolean | Record<string, any> | unknown[] | undefined;
179
- $props: {
180
- readonly spaced?: boolean | undefined;
181
- readonly icon?: string | boolean | Record<string, any> | unknown[] | undefined;
182
- };
183
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
184
- }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
185
- export default _default;
16
+ size?: string | undefined;
17
+ icon?: string | unknown[] | undefined;
18
+ modifiers?: string | unknown[] | undefined;
19
+ to?: string | Record<string, any> | undefined;
20
+ target?: string | undefined;
21
+ href?: string | undefined;
22
+ download?: string | boolean | undefined;
23
+ text?: string | undefined;
24
+ alt?: string | undefined;
25
+ $props: {
26
+ readonly iconOnly?: boolean | undefined;
27
+ readonly iconBefore?: boolean | undefined;
28
+ readonly primary?: boolean | undefined;
29
+ readonly secondary?: boolean | undefined;
30
+ readonly small?: boolean | undefined;
31
+ readonly large?: boolean | undefined;
32
+ readonly outline?: boolean | undefined;
33
+ readonly transparent?: boolean | undefined;
34
+ readonly noMargin?: boolean | undefined;
35
+ readonly size?: string | undefined;
36
+ readonly icon?: string | unknown[] | undefined;
37
+ readonly modifiers?: string | unknown[] | undefined;
38
+ readonly to?: string | Record<string, any> | undefined;
39
+ readonly target?: string | undefined;
40
+ readonly href?: string | undefined;
41
+ readonly download?: string | boolean | undefined;
42
+ readonly text?: string | undefined;
43
+ readonly alt?: string | undefined;
44
+ };
45
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
46
+ type __VLS_TemplateResult = {
47
+ attrs: Partial<{}>;
48
+ slots: {
49
+ before?(_: {}): any;
50
+ default?(_: {}): any;
51
+ after?(_: {}): any;
52
+ };
53
+ refs: {};
54
+ rootEl: any;
55
+ };
186
56
  //# sourceMappingURL=UluButton.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluButton.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluButton.vue"],"names":[],"mappings":"AAwCA;;IA2KM;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;IAvEH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG"}
1
+ {"version":3,"file":"UluButton.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluButton.vue"],"names":[],"mappings":"AAkCA;wBA0WqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2OAQG"}
@@ -1,13 +1,9 @@
1
- import { RouterLink as m } from "vue-router";
2
- import f from "./UluIcon.vue.js";
3
- import { useModifiers as d } from "../../composables/useModifiers.js";
4
- import { resolveComponent as b, createBlock as i, openBlock as l, resolveDynamicComponent as g, mergeProps as y, withCtx as B, renderSlot as s, createCommentVNode as c, createElementBlock as _, createTextVNode as h, toDisplayString as S } from "vue";
5
- import k from "../../_virtual/_plugin-vue_export-helper.js";
6
- const O = {
7
- name: "UluButton",
8
- components: {
9
- UluIcon: f
10
- },
1
+ import { computed as i, createBlock as a, openBlock as t, normalizeClass as d, unref as m, withCtx as f, renderSlot as l, createCommentVNode as r, createElementBlock as g, createTextVNode as y, toDisplayString as B } from "vue";
2
+ import b from "../utils/UluAction.vue.js";
3
+ import c from "./UluIcon.vue.js";
4
+ import { useModifiers as S } from "../../composables/useModifiers.js";
5
+ const h = { key: 1 }, z = {
6
+ __name: "UluButton",
11
7
  props: {
12
8
  /**
13
9
  * Icon prop, if used will set the icon for the button, will use UluIcon (which uses font-awesome icons conditionally)
@@ -84,68 +80,59 @@ const O = {
84
80
  modifiers: [String, Array]
85
81
  },
86
82
  setup(e) {
87
- const { resolvedModifiers: n } = d({ props: e, baseClass: "button" });
88
- return { resolvedModifiers: n };
89
- },
90
- computed: {
91
- resolvedAriaLabel() {
92
- const e = this.alt || this.iconOnly && this.text;
93
- return e || null;
94
- },
95
- classes() {
96
- const e = [], { size: n } = this;
97
- return n && e.push(`button--${n}`), e;
98
- },
99
- element() {
100
- return this.to ? m : this.href ? "a" : "button";
101
- },
102
- attrs() {
103
- const { to: e, href: n, download: t, target: o } = this, r = e ? { to: e } : n ? { href: n } : {};
104
- return n && (o && (r.target = o), t && (r.download = typeof t == "string" ? t : !0)), r;
105
- }
83
+ const n = e, { resolvedModifiers: s } = S({
84
+ props: n,
85
+ baseClass: "button",
86
+ internal: i(() => ({
87
+ transparent: n.transparent,
88
+ primary: n.primary,
89
+ secondary: n.secondary,
90
+ outline: n.outline,
91
+ small: n.small,
92
+ large: n.large,
93
+ icon: n.iconOnly,
94
+ [n.size]: n.size
95
+ }))
96
+ }), u = i(() => {
97
+ const o = n.alt || n.iconOnly && n.text;
98
+ return o || null;
99
+ });
100
+ return (o, O) => (t(), a(b, {
101
+ to: e.to,
102
+ href: e.href,
103
+ target: e.target,
104
+ download: e.download,
105
+ class: d(["button", [
106
+ {
107
+ "no-margin": e.noMargin
108
+ },
109
+ m(s)
110
+ ]]),
111
+ "aria-label": u.value
112
+ }, {
113
+ default: f(() => [
114
+ l(o.$slots, "before"),
115
+ e.icon && (e.iconBefore || e.iconOnly) ? (t(), a(c, {
116
+ key: 0,
117
+ icon: e.icon,
118
+ class: "button__icon"
119
+ }, null, 8, ["icon"])) : r("", !0),
120
+ (o.$slots.default || e.text) && !e.iconOnly ? (t(), g("span", h, [
121
+ l(o.$slots, "default", {}, () => [
122
+ y(B(e.text), 1)
123
+ ])
124
+ ])) : r("", !0),
125
+ e.icon && !e.iconBefore && !e.iconOnly ? (t(), a(c, {
126
+ key: 2,
127
+ icon: e.icon,
128
+ class: "button__icon"
129
+ }, null, 8, ["icon"])) : r("", !0),
130
+ l(o.$slots, "after")
131
+ ]),
132
+ _: 3
133
+ }, 8, ["to", "href", "target", "download", "class", "aria-label"]));
106
134
  }
107
- }, v = { key: 1 };
108
- function x(e, n, t, o, r, a) {
109
- const u = b("UluIcon");
110
- return l(), i(g(a.element), y({
111
- class: ["button", [
112
- {
113
- "button--transparent": t.transparent,
114
- "button--primary": t.primary,
115
- "button--secondary": t.secondary,
116
- "button--outline": t.outline,
117
- "button--small": t.small,
118
- "button--large": t.large,
119
- "button--icon": t.iconOnly,
120
- "no-margin": t.noMargin
121
- },
122
- a.classes,
123
- o.resolvedModifiers
124
- ]]
125
- }, a.attrs, { "aria-label": a.resolvedAriaLabel }), {
126
- default: B(() => [
127
- s(e.$slots, "before"),
128
- t.icon && (t.iconBefore || t.iconOnly) ? (l(), i(u, {
129
- key: 0,
130
- icon: t.icon,
131
- class: "button__icon"
132
- }, null, 8, ["icon"])) : c("", !0),
133
- (e.$slots.default || t.text) && !t.iconOnly ? (l(), _("span", v, [
134
- s(e.$slots, "default", {}, () => [
135
- h(S(t.text), 1)
136
- ])
137
- ])) : c("", !0),
138
- t.icon && !t.iconBefore && !t.iconOnly ? (l(), i(u, {
139
- key: 2,
140
- icon: t.icon,
141
- class: "button__icon"
142
- }, null, 8, ["icon"])) : c("", !0),
143
- s(e.$slots, "after")
144
- ]),
145
- _: 3
146
- }, 16, ["class", "aria-label"]);
147
- }
148
- const I = /* @__PURE__ */ k(O, [["render", x]]);
135
+ };
149
136
  export {
150
- I as default
137
+ z as default
151
138
  };