@ulu/frontend-vue 0.3.2 → 0.4.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.
@@ -1 +1 @@
1
- {"version":3,"file":"UluList.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluList.vue"],"names":[],"mappings":"AA8BA;wBA2OqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAVjC;;;;;;;;;;;;;;;;;;;;;;;2OAOG"}
1
+ {"version":3,"file":"UluList.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/elements/UluList.vue"],"names":[],"mappings":"AAiCA;wBAmPqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAVjC;;;;;;;;;;;;;;;;;;;;;;;2OAOG"}
@@ -1,13 +1,14 @@
1
- import { computed as n, createBlock as m, createCommentVNode as u, openBlock as t, resolveDynamicComponent as y, normalizeStyle as B, normalizeClass as o, withCtx as f, createElementBlock as d, Fragment as v, renderList as S, renderSlot as g, createTextVNode as k, toDisplayString as C } from "vue";
1
+ import { computed as n, createBlock as m, createCommentVNode as u, openBlock as l, resolveDynamicComponent as y, normalizeStyle as B, normalizeClass as o, withCtx as f, createElementBlock as d, Fragment as v, renderList as S, renderSlot as g, createTextVNode as k, toDisplayString as C } from "vue";
2
2
  const h = {
3
3
  __name: "UluList",
4
4
  props: {
5
5
  /**
6
6
  * Array of list items, output as is or use slot to template the item
7
+ * - Note item can add classes by defining { classes: { item } }
7
8
  */
8
9
  items: Array,
9
10
  /**
10
- * Classes object (keys are list and listItem to be applied to <ul> and <li>)
11
+ * Classes object (keys are { list, item } to be applied to <ul> and <li>)
11
12
  * - Any valid class binding for each
12
13
  */
13
14
  classes: {
@@ -49,8 +50,8 @@ const h = {
49
50
  listStyleType: String
50
51
  },
51
52
  setup(e) {
52
- const l = e, r = n(() => l.ordered || l.forceOrdered), c = n(() => r.value ? "ol" : "ul");
53
- return (i, O) => e.items?.length ? (t(), m(y(c.value), {
53
+ const r = e, s = n(() => r.ordered || r.forceOrdered), c = n(() => s.value ? "ol" : "ul");
54
+ return (i, O) => e.items?.length ? (l(), m(y(c.value), {
54
55
  key: 0,
55
56
  class: o([
56
57
  {
@@ -64,19 +65,22 @@ const h = {
64
65
  style: B({
65
66
  listStyleType: e.listStyleType
66
67
  }),
67
- reversed: r.value ? e.reversed : null,
68
+ reversed: s.value ? e.reversed : null,
68
69
  start: e.start
69
70
  }, {
70
71
  default: f(() => [
71
- (t(!0), d(v, null, S(e.items, (s, a) => (t(), d("li", {
72
+ (l(!0), d(v, null, S(e.items, (t, a) => (l(), d("li", {
72
73
  key: a,
73
- class: o(e.classes.listItem)
74
+ class: o([
75
+ e.classes.item,
76
+ t?.classes?.item
77
+ ])
74
78
  }, [
75
79
  g(i.$slots, "default", {
76
- item: s,
80
+ item: t,
77
81
  index: a
78
82
  }, () => [
79
- k(C(s), 1)
83
+ k(C(t), 1)
80
84
  ])
81
85
  ], 2))), 128))
82
86
  ]),
@@ -20,7 +20,10 @@
20
20
  <li
21
21
  v-for="(item, index) in items"
22
22
  :key="index"
23
- :class="classes.listItem"
23
+ :class="[
24
+ classes.item,
25
+ item?.classes?.item
26
+ ]"
24
27
  >
25
28
  <slot :item="item" :index="index">
26
29
  {{ item }}
@@ -35,10 +38,11 @@
35
38
  const props = defineProps({
36
39
  /**
37
40
  * Array of list items, output as is or use slot to template the item
41
+ * - Note item can add classes by defining { classes: { item } }
38
42
  */
39
43
  items: Array,
40
44
  /**
41
- * Classes object (keys are list and listItem to be applied to <ul> and <li>)
45
+ * Classes object (keys are { list, item } to be applied to <ul> and <li>)
42
46
  * - Any valid class binding for each
43
47
  */
44
48
  classes: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulu/frontend-vue",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "A modular, tree-shakeable Vue 3 component library for the Ulu Frontend theming system, plus general utilities for Vue development",
5
5
  "type": "module",
6
6
  "files": [
@@ -65,7 +65,7 @@
65
65
  "@fortawesome/vue-fontawesome": "^3.0.8",
66
66
  "@headlessui/vue": "^1.7.23",
67
67
  "@portabletext/vue": "^1.0.14",
68
- "@ulu/frontend": "^0.3.0",
68
+ "@ulu/frontend": "^0.3.6",
69
69
  "@ulu/utils": "^0.0.34",
70
70
  "@unhead/vue": "^2.0.11",
71
71
  "fuse.js": "^6.6.2",
@@ -87,7 +87,7 @@
87
87
  "@storybook/addon-essentials": "^9.0.0-alpha.12",
88
88
  "@storybook/addon-links": "^9.1.1",
89
89
  "@storybook/vue3-vite": "^9.1.1",
90
- "@ulu/frontend": "^0.3.3",
90
+ "@ulu/frontend": "^0.3.6",
91
91
  "@ulu/utils": "^0.0.34",
92
92
  "@unhead/vue": "^2.0.11",
93
93
  "@vitejs/plugin-vue": "^6.0.0",