@ulu/frontend-vue 0.2.0-beta.13 → 0.2.0-beta.15

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.
@@ -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 +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":"AAwCA;;IA0KM;;;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"}
@@ -101,7 +101,7 @@ const O = {
101
101
  },
102
102
  attrs() {
103
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;
104
+ return o && (r.target = o), n && t && (r.download = typeof t == "string" ? t : !0), r;
105
105
  }
106
106
  }
107
107
  }, v = { key: 1 };
@@ -1,10 +1,18 @@
1
1
  <template>
2
- <TabGroup v-slot="slotProps" :defaultIndex="defaultIndex" :vertical="vertical">
2
+ <TabGroup
3
+ v-slot="slotProps"
4
+ :defaultIndex="defaultIndex"
5
+ :vertical="vertical"
6
+ >
3
7
  <div
8
+ v-bind="$attrs"
4
9
  class="tabs"
5
- :class="{
6
- 'tabs--vertical' : vertical
7
- }"
10
+ :class="[
11
+ resolvedModifiers,
12
+ {
13
+ 'tabs--vertical' : vertical
14
+ }
15
+ ]"
8
16
  >
9
17
  <slot v-bind="slotProps"/>
10
18
  </div>
@@ -13,12 +21,13 @@
13
21
 
14
22
  <script setup>
15
23
  import { TabGroup } from "@headlessui/vue";
24
+ import { useModifiers } from "../../composables/useModifiers.js";
16
25
 
17
26
  defineOptions({
18
27
  inheritAttrs: false
19
28
  });
20
29
 
21
- defineProps({
30
+ const props = defineProps({
22
31
  /**
23
32
  * Active tab index by default
24
33
  */
@@ -26,6 +35,12 @@
26
35
  /**
27
36
  * Whether or not to use vertical layout
28
37
  */
29
- vertical: Boolean
38
+ vertical: Boolean,
39
+ /**
40
+ * Class modifiers (ie. 'transparent', 'secondary', etc)
41
+ */
42
+ modifiers: [String, Array]
30
43
  });
44
+
45
+ const { resolvedModifiers } = useModifiers({ props, baseClass: "tabs" });
31
46
  </script>
@@ -146,13 +146,12 @@
146
146
  attrs() {
147
147
  const { to, href, download, target } = this;
148
148
  const attrs = to ? { to } : href ? { href } : {};
149
- if (href) {
150
- if (target) {
151
- attrs.target = target;
152
- }
153
- if (download) {
154
- attrs.download = typeof download === "string" ? download : true;
155
- }
149
+ // Both router links and regular links
150
+ if (target) {
151
+ attrs.target = target;
152
+ }
153
+ if (href && download) {
154
+ attrs.download = typeof download === "string" ? download : true;
156
155
  }
157
156
  return attrs;
158
157
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulu/frontend-vue",
3
- "version": "0.2.0-beta.13",
3
+ "version": "0.2.0-beta.15",
4
4
  "description": "A modular and tree-shakeable Vue 3 component library for the Ulu frontend",
5
5
  "type": "module",
6
6
  "files": [