adverich-kun-ui 0.1.76 → 0.1.78

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 (35) hide show
  1. package/dist/adverich-kun-ui.css +1 -1
  2. package/dist/components/KunAlert/src/components/KunAlert.vue.js +193 -33
  3. package/dist/components/KunAppbar/src/components/KunAppbar.vue.js +69 -41
  4. package/dist/components/KunAppbarTitle/src/components/KunAppbarTitle.vue.js +9 -5
  5. package/dist/components/KunAutocomplete/src/components/KunAutocomplete.vue.js +51 -52
  6. package/dist/components/KunAutocomplete/src/composables/useAutocomplete.js +1 -1
  7. package/dist/components/KunBtn/src/components/KunBtn.vue.js +86 -77
  8. package/dist/components/KunCard/src/components/KunCard.vue.js +38 -32
  9. package/dist/components/KunCard/src/composables/kunCardProps.js +4 -8
  10. package/dist/components/KunCardActions/src/components/KunCardActions.vue.js +18 -16
  11. package/dist/components/KunCardActions/src/composables/kunCardActionsProps.js +0 -8
  12. package/dist/components/KunCardItem/src/components/KunCardItem.vue.js +17 -16
  13. package/dist/components/KunCardItem/src/composables/kunCardItemProps.js +0 -8
  14. package/dist/components/KunCardSubtitle/src/components/KunCardSubtitle.vue.js +16 -17
  15. package/dist/components/KunCardSubtitle/src/composables/kunCardSubtitleProps.js +1 -9
  16. package/dist/components/KunCardText/src/components/KunCardText.vue.js +16 -17
  17. package/dist/components/KunCardText/src/composables/kunCardTextProps.js +1 -9
  18. package/dist/components/KunCardTitle/src/components/KunCardTitle.vue.js +57 -45
  19. package/dist/components/KunCardTitle/src/composables/kunCardTitleProps.js +5 -25
  20. package/dist/components/KunChip/src/components/KunChip.vue.js +63 -47
  21. package/dist/components/KunChip/src/composables/kunChipProps.js +7 -17
  22. package/dist/components/KunChip/src/composables/useChip.js +10 -19
  23. package/dist/components/KunList/src/components/KunList.vue.js +10 -10
  24. package/dist/components/kunMenu/src/components/kunMenu.vue.js +48 -48
  25. package/dist/components/kunMenu/src/composables/kunMenuProps.js +0 -4
  26. package/dist/components/kunMenu/src/composables/useKunMenuStyles.js +31 -14
  27. package/dist/icons/IconMenuRounded.vue.js +17 -0
  28. package/dist/index.js +12 -12
  29. package/package.json +1 -1
  30. package/dist/components/KunCard/src/composables/useCard.js +0 -17
  31. package/dist/components/KunCardActions/src/composables/useCardActions.js +0 -19
  32. package/dist/components/KunCardItem/src/composables/useCardItem.js +0 -17
  33. package/dist/components/KunCardSubtitle/src/composables/useCardSubtitle.js +0 -15
  34. package/dist/components/KunCardText/src/composables/useCardText.js +0 -15
  35. package/dist/components/KunCardTitle/src/composables/useCardTitle.js +0 -25
@@ -1,9 +1,9 @@
1
- import { mergeModels as A, useModel as R, onMounted as ne, onUnmounted as ie, ref as U, watch as re, createBlock as c, openBlock as r, unref as e, isRef as B, createSlots as ae, withCtx as i, createElementBlock as F, createCommentVNode as k, createVNode as a, Fragment as se, renderList as ue, createElementVNode as de, createTextVNode as w, toDisplayString as V, normalizeClass as ce, withModifiers as me } from "vue";
1
+ import { mergeModels as z, useModel as A, onMounted as ne, onUnmounted as ie, ref as R, watch as re, createBlock as c, openBlock as r, unref as e, isRef as U, createSlots as ae, withCtx as i, createElementBlock as B, createCommentVNode as k, createVNode as a, Fragment as se, renderList as ue, createElementVNode as de, createTextVNode as w, toDisplayString as V, normalizeClass as ce, withModifiers as me } from "vue";
2
2
  import { icons as p } from "../../../../icons/index.js";
3
- import { isNotEmpty as fe, isArray as N } from "../../../../utils/utils.js";
3
+ import { isNotEmpty as fe, isArray as F } from "../../../../utils/utils.js";
4
4
  import pe from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
5
5
  import ve from "../../../KunList/src/components/KunList.vue.js";
6
- import T from "../../../KunListItem/src/components/KunListItem.vue.js";
6
+ import N from "../../../KunListItem/src/components/KunListItem.vue.js";
7
7
  import ye from "../../../KunListItemTitle/src/components/KunListItemTitle.vue.js";
8
8
  import ke from "../../../KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
9
9
  import he from "../../../kunMenu/src/components/kunMenu.vue.js";
@@ -13,48 +13,48 @@ import be from "../../../KunTextField/src/components/KunTextField.vue.js";
13
13
  import we from "../../../KunBtn/src/components/KunBtn.vue.js";
14
14
  import Ve from "../../../KunChip/src/components/KunChip.vue.js";
15
15
  import h from "../../../KunIcon/src/components/KunIcon.vue.js";
16
- const Se = {
16
+ const xe = {
17
17
  key: 0,
18
18
  class: "flex justify-center align-center"
19
- }, _e = { class: "flex justify-center align-center" }, Te = {
19
+ }, Ie = { class: "flex justify-center align-center" }, Te = {
20
20
  __name: "KunAutocomplete",
21
- props: /* @__PURE__ */ A(Ce, {
21
+ props: /* @__PURE__ */ z(Ce, {
22
22
  modelValue: { default: null },
23
23
  modelModifiers: {},
24
24
  items: { default: [], type: Array, required: !0 },
25
25
  itemsModifiers: {}
26
26
  }),
27
- emits: /* @__PURE__ */ A(["createItem", "validation", "search"], ["update:modelValue", "update:items"]),
28
- setup(g, { emit: H }) {
29
- const u = R(g, "modelValue"), S = R(g, "items"), n = g, v = H, {
27
+ emits: /* @__PURE__ */ z(["createItem", "validation", "search"], ["update:modelValue", "update:items"]),
28
+ setup(g, { emit: T }) {
29
+ const u = A(g, "modelValue"), x = A(g, "items"), n = g, v = T, {
30
30
  selectedItem: m,
31
31
  textFieldRef: d,
32
32
  listRef: C,
33
33
  menuModel: s,
34
34
  search: f,
35
- removeItem: O,
36
- clearSelection: P,
37
- lightReset: _,
35
+ removeItem: H,
36
+ clearSelection: O,
37
+ lightReset: I,
38
38
  openMenu: $,
39
- onMenuKeydown: x,
39
+ onMenuKeydown: S,
40
40
  getSelectedItem: j,
41
41
  textArr: q,
42
- getItemText: W,
43
- createItem: G,
44
- checkDisabled: J,
45
- itemToString: I,
42
+ getItemText: P,
43
+ createItem: W,
44
+ checkDisabled: G,
45
+ itemToString: _,
46
46
  placeholder: K,
47
- hasCreateItem: Q
48
- } = ge(n, v, u, S);
47
+ hasCreateItem: J
48
+ } = ge(n, v, u, x);
49
49
  ne(() => {
50
50
  b(), window.addEventListener("resize", b), n.focusOnRender && d.value.focus();
51
51
  }), ie(() => {
52
52
  window.removeEventListener("resize", b);
53
53
  });
54
- function X(t) {
54
+ function Q(t) {
55
55
  return u.value === null || u.value === void 0 ? n.bgItemListColor : n.multiple ? u.value.find((o) => o[n.itemValue] === t[n.itemValue]) ? n.selectedColor : n.bgItemListColor : K.value === t[n.itemTitle] ? n.selectedColor : n.bgItemListColor;
56
56
  }
57
- const y = U(""), M = (t) => {
57
+ const y = R(""), M = (t) => {
58
58
  for (const o of n.rules) {
59
59
  const l = o(t);
60
60
  if (l !== !0)
@@ -68,15 +68,15 @@ const Se = {
68
68
  function D() {
69
69
  s.value = !1, d.value.$el.focus();
70
70
  }
71
- function Y(t) {
71
+ function X(t) {
72
72
  v("search", f);
73
73
  }
74
- const E = U({});
74
+ const Y = R({});
75
75
  function b() {
76
76
  if (d.value) {
77
77
  const t = d.value.$el.getBoundingClientRect();
78
78
  let o = t.bottom;
79
- n.hideDetails || (o = o - 20), E.value = {
79
+ n.hideDetails || (o = o - 20), Y.value = {
80
80
  position: "absolute",
81
81
  top: `${o}px`,
82
82
  // Posiciona el menú justo debajo
@@ -101,10 +101,10 @@ const Se = {
101
101
  C.value.focusWithKey(o);
102
102
  return;
103
103
  }
104
- x(t);
104
+ S(t);
105
105
  }
106
106
  function te(t) {
107
- x(t);
107
+ S(t);
108
108
  }
109
109
  function le() {
110
110
  s.value = !1;
@@ -112,8 +112,8 @@ const Se = {
112
112
  return (t, o) => (r(), c(be, {
113
113
  modelValue: e(f),
114
114
  "onUpdate:modelValue": [
115
- o[2] || (o[2] = (l) => B(f) ? f.value = l : null),
116
- Y
115
+ o[2] || (o[2] = (l) => U(f) ? f.value = l : null),
116
+ X
117
117
  ],
118
118
  label: t.label,
119
119
  dirty: "",
@@ -126,26 +126,26 @@ const Se = {
126
126
  onFocusInput: Z,
127
127
  onHandleClick: e($),
128
128
  onBlurInput: le,
129
- placeholder: e(N)(e(m)) && e(m).length ? "" : e(K),
129
+ placeholder: e(F)(e(m)) && e(m).length ? "" : e(K),
130
130
  error: !!y.value,
131
131
  "error-messages": y.value
132
132
  }, ae({
133
133
  default: i(() => [
134
- e(N)(e(m)) ? (r(), F("div", Se, [
135
- (r(!0), F(se, null, ue(e(m), (l) => (r(), c(Ve, {
134
+ e(F)(e(m)) ? (r(), B("div", xe, [
135
+ (r(!0), B(se, null, ue(e(m), (l) => (r(), c(Ve, {
136
136
  key: l.id ?? l.name,
137
137
  size: "small",
138
138
  class: "ml-1"
139
139
  }, {
140
140
  default: i(() => [
141
- de("div", _e, [
142
- w(V(e(W)(l, t.itemTitle)) + " ", 1),
141
+ de("div", Ie, [
142
+ w(V(e(P)(l, t.itemTitle)) + " ", 1),
143
143
  a(h, {
144
144
  color: "error",
145
145
  icon: e(p).close,
146
146
  size: "small",
147
147
  class: "ml-1",
148
- onClick: (oe) => e(O)(l)
148
+ onClick: (oe) => e(H)(l)
149
149
  }, null, 8, ["icon", "onClick"])
150
150
  ])
151
151
  ]),
@@ -154,29 +154,28 @@ const Se = {
154
154
  ])) : k("", !0),
155
155
  a(he, {
156
156
  transition: "fade",
157
- "onClick:outside": e(_),
157
+ "onClick:outside": e(I),
158
158
  modelValue: e(s),
159
- "onUpdate:modelValue": o[1] || (o[1] = (l) => B(s) ? s.value = l : null),
159
+ "onUpdate:modelValue": o[1] || (o[1] = (l) => U(s) ? s.value = l : null),
160
160
  activator: "parent",
161
161
  "text-field-ref": e(d),
162
162
  onHandleEscape: D,
163
163
  "close-on-content-click": t.closeOnSelect,
164
- "max-height": t.maxHeight,
165
- menuPositionStyle: E.value
164
+ "max-height": t.maxHeight
166
165
  }, {
167
166
  default: i(() => [
168
167
  a(ve, {
169
168
  "onUpdate:selected": e(j),
170
- "onClick:select": o[0] || (o[0] = (l) => e(_)()),
169
+ "onClick:select": o[0] || (o[0] = (l) => e(I)()),
171
170
  ref_key: "listRef",
172
171
  ref: C,
173
172
  onKeyDown: te
174
173
  }, {
175
174
  default: i(() => [
176
- e(Q) ? (r(), c(T, { key: 0 }, {
175
+ e(J) ? (r(), c(N, { key: 0 }, {
177
176
  default: i(() => [
178
177
  a(we, {
179
- onClick: e(G),
178
+ onClick: e(W),
180
179
  class: "w-full",
181
180
  color: "bg-green-400"
182
181
  }, {
@@ -190,7 +189,7 @@ const Se = {
190
189
  _: 1
191
190
  })) : k("", !0),
192
191
  a(pe, {
193
- items: S.value,
192
+ items: x.value,
194
193
  search: e(f),
195
194
  "searchable-keys": n.searchableKeys,
196
195
  "items-per-intersection": 10,
@@ -199,25 +198,25 @@ const Se = {
199
198
  "item-height": 48
200
199
  }, {
201
200
  default: i(({ item: l, index: oe }) => {
202
- var L, z;
201
+ var E, L;
203
202
  return [
204
- (r(), c(T, {
203
+ (r(), c(N, {
205
204
  value: l,
206
- key: ((L = l.id) == null ? void 0 : L.toString()) ?? l.name,
207
- disabled: e(J)(l),
208
- class: ce(X(l)),
205
+ key: ((E = l.id) == null ? void 0 : E.toString()) ?? l.name,
206
+ disabled: e(G)(l),
207
+ class: ce(Q(l)),
209
208
  density: t.density,
210
- id: ((z = l.id) == null ? void 0 : z.toString()) ?? l.name
209
+ id: ((L = l.id) == null ? void 0 : L.toString()) ?? l.name
211
210
  }, {
212
211
  default: i(() => [
213
212
  a(ye, { class: "text-wrap" }, {
214
213
  default: i(() => [
215
- w(V(e(I)(l, e(q), "hasDefault")), 1)
214
+ w(V(e(_)(l, e(q), "hasDefault")), 1)
216
215
  ]),
217
216
  _: 2
218
217
  }, 1024),
219
218
  a(ke, {
220
- textContent: V(t.itemSubtitle ? e(I)(l, t.itemSubtitle) : "")
219
+ textContent: V(t.itemSubtitle ? e(_)(l, t.itemSubtitle) : "")
221
220
  }, null, 8, ["textContent"])
222
221
  ]),
223
222
  _: 2
@@ -231,7 +230,7 @@ const Se = {
231
230
  }, 8, ["onUpdate:selected"])
232
231
  ]),
233
232
  _: 1
234
- }, 8, ["onClick:outside", "modelValue", "text-field-ref", "close-on-content-click", "max-height", "menuPositionStyle"])
233
+ }, 8, ["onClick:outside", "modelValue", "text-field-ref", "close-on-content-click", "max-height"])
235
234
  ]),
236
235
  _: 2
237
236
  }, [
@@ -240,7 +239,7 @@ const Se = {
240
239
  fn: i(() => [
241
240
  t.clearable && e(m) ? (r(), c(h, {
242
241
  key: 0,
243
- onClick: e(P),
242
+ onClick: e(O),
244
243
  size: "small",
245
244
  color: "error",
246
245
  icon: e(p).close,
@@ -83,7 +83,7 @@ function W(u, C, l, h, G) {
83
83
  u.clearSearchOnSelect && (c.value = ""), u.focusOnSelect && j();
84
84
  }
85
85
  function m() {
86
- console.log(1), v.value = !v.value;
86
+ v.value = !v.value;
87
87
  }
88
88
  function A(e) {
89
89
  return e.length === 1 && e.match(/\w/);
@@ -1,22 +1,22 @@
1
- import { computed as a, createBlock as x, openBlock as o, resolveDynamicComponent as y, mergeProps as m, withCtx as b, renderSlot as l, createElementBlock as i, createCommentVNode as s, createElementVNode as h, createTextVNode as v, toDisplayString as $ } from "vue";
2
- import { RouterLink as S } from "vue-router";
3
- const k = {
1
+ import { useAttrs as h, computed as a, createBlock as y, openBlock as s, resolveDynamicComponent as v, mergeProps as $, unref as k, withCtx as S, renderSlot as o, createElementBlock as i, createCommentVNode as u, createElementVNode as w, createTextVNode as B, toDisplayString as C } from "vue";
2
+ import { RouterLink as A } from "vue-router";
3
+ const W = {
4
4
  key: 1,
5
5
  class: "mr-2 flex items-center"
6
- }, w = {
6
+ }, z = {
7
7
  key: 2,
8
8
  class: "truncate"
9
- }, B = {
9
+ }, N = {
10
10
  key: 3,
11
11
  class: "ml-2 flex items-center"
12
- }, z = {
12
+ }, j = {
13
13
  __name: "KunBtn",
14
14
  props: {
15
- text: { type: String, default: null },
15
+ text: String,
16
16
  size: {
17
17
  type: String,
18
18
  default: "md",
19
- validator: (e) => ["xxs", "xs", "sm", "md", "lg", "xl", "xxl"].includes(e)
19
+ validator: (r) => ["xxs", "xs", "sm", "md", "lg", "xl", "xxl"].includes(r)
20
20
  },
21
21
  minWidth: { type: String, default: "min-w-[6rem]" },
22
22
  fontWeight: { type: String, default: "font-medium" },
@@ -25,105 +25,114 @@ const k = {
25
25
  variant: {
26
26
  type: String,
27
27
  default: "default",
28
- validator: (e) => ["default", "tonal", "plain", "outline", "soft"].includes(e)
28
+ validator: (r) => ["default", "tonal", "plain", "outlined", "soft", "text"].includes(r)
29
+ },
30
+ disabled: Boolean,
31
+ loading: Boolean,
32
+ bgColor: {
33
+ type: String,
34
+ default: "bg-slate-200 dark:bg-slate-800"
35
+ },
36
+ textColor: {
37
+ type: String,
38
+ default: "text-slate-700 dark:text-slate-300"
29
39
  },
30
- disabled: { type: Boolean, default: !1 },
31
- loading: { type: Boolean, default: !1 },
32
- bgColor: { type: String, default: "bg-indigo-600" },
33
- textColor: { type: String, default: "text-white" },
34
40
  to: [String, Object],
35
41
  href: String,
36
- replace: { type: Boolean, default: !1 },
37
- target: { type: String, default: null },
38
- ring: {
39
- type: Boolean,
40
- default: !0
41
- }
42
+ replace: Boolean,
43
+ target: String,
44
+ ring: Boolean
42
45
  },
43
- setup(e) {
44
- const t = e, d = a(() => !!t.to || !!t.href), u = a(() => !d.value), c = a(() => t.href ? "a" : t.to ? S : "button"), f = a(() => t.href ? {
45
- href: t.href,
46
- target: t.target ?? "_self",
47
- rel: t.target === "_blank" ? "noopener noreferrer" : null
48
- } : t.to ? {
49
- to: t.to,
50
- replace: t.replace
46
+ setup(r) {
47
+ const e = r, l = h(), d = a(() => !!e.to || !!e.href), c = a(() => !d.value), p = a(() => e.href ? "a" : e.to ? A : "button"), f = a(() => e.href ? {
48
+ href: e.href,
49
+ target: e.target ?? "_self",
50
+ rel: e.target === "_blank" ? "noopener noreferrer" : null
51
+ } : e.to ? {
52
+ to: e.to,
53
+ replace: e.replace
51
54
  } : {
52
55
  type: "button",
53
- disabled: t.loading || t.disabled
54
- }), g = (n) => {
55
- switch (n) {
56
+ disabled: e.loading || e.disabled
57
+ }), g = (t) => {
58
+ switch (t) {
56
59
  case "xxs":
57
60
  return "px-1 py-1 text-xs";
58
61
  case "xs":
59
62
  return "px-2 py-2 text-xs";
60
63
  case "sm":
61
- return "px-1 py-1 text-sm";
64
+ return "px-2 py-1 text-sm";
62
65
  case "md":
63
- return "px-2 py-2 text-sm";
66
+ return "px-3 py-2 text-sm";
64
67
  case "lg":
65
- return "px-3 py-3 text-sm";
68
+ return "px-4 py-2 text-base";
66
69
  case "xl":
67
- return "px-3 py-3 text-base";
70
+ return "px-5 py-3 text-lg";
68
71
  case "xxl":
69
- return "px-4 py-4 text-base";
72
+ return "px-6 py-4 text-xl";
73
+ default:
74
+ return "px-3 py-2 text-sm";
70
75
  }
71
- }, p = a(() => {
72
- const n = t.bgColor || "bg-indigo-600", r = t.textColor || "text-white";
73
- switch (t.variant) {
76
+ }, x = a(() => {
77
+ const t = e.bgColor, n = e.textColor;
78
+ switch (e.variant) {
74
79
  case "default":
75
- return `${n} ${r} shadow hover:brightness-90 transition`;
80
+ return `${t} ${n} shadow hover:brightness-95`;
76
81
  case "tonal":
77
- return `${n} ${r} bg-opacity-20 hover:bg-opacity-30 transition`;
78
- case "plain":
79
- return `bg-transparent ${r} hover:bg-gray-100 transition`;
80
- case "outline":
81
- return `bg-transparent border ${n} ${r} border-opacity-80 hover:bg-opacity-10 transition`;
82
+ return `${t} ${n} shadow-sm hover:shadow-md`;
82
83
  case "soft":
83
- return `${n} ${r} shadow-md bg-opacity-30 hover:bg-opacity-40 transition`;
84
+ return `${t} ${n} hover:bg-opacity-30 shadow-sm`;
85
+ case "outlined":
86
+ return `bg-transparent ${n} border ${t} border-opacity-40 hover:bg-black/5`;
87
+ case "plain":
88
+ return `bg-transparent ${n} hover:bg-transparent active:bg-black/10`;
89
+ case "text":
90
+ return `${t} ${n} hover:bg-opacity-10 active:bg-black/5`;
84
91
  default:
85
- return `${n} ${r}`;
92
+ return `${t} ${n}`;
86
93
  }
87
- });
88
- return (n, r) => (o(), x(y(c.value), m(f.value, {
89
- class: ["inline-flex items-center justify-center break-keep transition-all", [
90
- e.minWidth,
94
+ }), m = a(() => !!e.text), b = a(() => {
95
+ const t = [
96
+ "inline-flex items-center justify-center break-keep transition-all whitespace-nowrap",
91
97
  g(e.size),
92
98
  e.fontWeight,
93
- p.value,
94
99
  e.rounded,
95
100
  e.textAlign,
96
- "whitespace-nowrap",
97
- e.loading || e.disabled ? "opacity-50 cursor-not-allowed" : [
98
- "hover:opacity-90",
99
- "focus:outline-none",
100
- e.ring ? "focus:ring-2 focus:ring-offset-2" : "",
101
- "active:scale-[.98]",
102
- "transition duration-100 ease-in-out",
103
- "cursor-pointer"
104
- ]
105
- ]],
106
- disabled: u.value && (e.loading || e.disabled)
101
+ x.value
102
+ ];
103
+ return !e.loading && !e.disabled ? t.push(
104
+ "hover:opacity-90",
105
+ "focus:outline-none",
106
+ e.ring ? "focus:ring-2 focus:ring-offset-2" : "",
107
+ "active:scale-[.98]",
108
+ "transition duration-100 ease-in-out",
109
+ "cursor-pointer"
110
+ ) : t.push("opacity-50 cursor-not-allowed"), m.value && t.push(e.minWidth), l.class && t.push(l.class), t.filter(Boolean);
111
+ });
112
+ return (t, n) => (s(), y(v(p.value), $(f.value, {
113
+ class: b.value,
114
+ style: k(l).style,
115
+ disabled: c.value && (r.loading || r.disabled)
107
116
  }), {
108
- default: b(() => [
109
- e.loading ? l(n.$slots, "loader", { key: 0 }, () => [
110
- r[0] || (r[0] = h("span", { class: "mr-2 h-5 w-5 border-[3px] border-current opacity-100 border-opacity-100 border-t-transparent rounded-full animate-spin" }, null, -1))
111
- ]) : n.$slots.prepend ? (o(), i("span", k, [
112
- l(n.$slots, "prepend")
113
- ])) : s("", !0),
114
- !e.loading && (n.$slots.default || e.text) ? (o(), i("span", w, [
115
- l(n.$slots, "default", {}, () => [
116
- v($(e.text), 1)
117
+ default: S(() => [
118
+ r.loading ? o(t.$slots, "loader", { key: 0 }, () => [
119
+ n[0] || (n[0] = w("span", { class: "mr-2 h-5 w-5 border-[3px] border-current border-t-transparent rounded-full animate-spin" }, null, -1))
120
+ ]) : t.$slots.prepend ? (s(), i("span", W, [
121
+ o(t.$slots, "prepend")
122
+ ])) : u("", !0),
123
+ !r.loading && (r.text || t.$slots.default) ? (s(), i("span", z, [
124
+ o(t.$slots, "default", {}, () => [
125
+ B(C(r.text), 1)
117
126
  ])
118
- ])) : s("", !0),
119
- !e.loading && n.$slots.append ? (o(), i("span", B, [
120
- l(n.$slots, "append")
121
- ])) : s("", !0)
127
+ ])) : u("", !0),
128
+ !r.loading && t.$slots.append ? (s(), i("span", N, [
129
+ o(t.$slots, "append")
130
+ ])) : u("", !0)
122
131
  ]),
123
132
  _: 3
124
- }, 16, ["class", "disabled"]));
133
+ }, 16, ["class", "style", "disabled"]));
125
134
  }
126
135
  };
127
136
  export {
128
- z as default
137
+ j as default
129
138
  };
@@ -1,52 +1,58 @@
1
- import { createElementBlock as o, openBlock as e, normalizeStyle as c, normalizeClass as p, unref as i, createCommentVNode as l, createVNode as s, withCtx as r, createBlock as _, renderSlot as a } from "vue";
2
- import { useCard as k } from "../composables/useCard.js";
1
+ import { useAttrs as f, computed as c, createElementBlock as s, openBlock as o, normalizeClass as p, createCommentVNode as r, createVNode as l, withCtx as n, createBlock as C, renderSlot as a } from "vue";
3
2
  import { kunCardProps as $ } from "../composables/kunCardProps.js";
4
- import n from "../../../KunCardItem/src/components/KunCardItem.vue.js";
5
- import y from "../../../KunCardTitle/src/components/KunCardTitle.vue.js";
6
- import C from "../../../KunCardText/src/components/KunCardText.vue.js";
7
- import h from "../../../KunCardActions/src/components/KunCardActions.vue.js";
8
- const v = { key: 0 }, b = { key: 1 }, B = { key: 2 }, g = {
3
+ import i from "../../../KunCardItem/src/components/KunCardItem.vue.js";
4
+ import k from "../../../KunCardTitle/src/components/KunCardTitle.vue.js";
5
+ import _ from "../../../KunCardText/src/components/KunCardText.vue.js";
6
+ import b from "../../../KunCardActions/src/components/KunCardActions.vue.js";
7
+ const h = { key: 0 }, v = { key: 1 }, y = { key: 2 }, V = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
9
8
  __name: "KunCard",
10
9
  props: $,
11
- setup(m) {
12
- const u = m, {
13
- cardClass: d,
14
- cardStyle: f
15
- } = k(u);
16
- return (t, S) => (e(), o("div", {
17
- class: p(["w-full", i(d)]),
18
- style: c(i(f))
10
+ setup(d) {
11
+ const e = d, u = f(), m = c(() => {
12
+ const t = u.class || "";
13
+ return [
14
+ "w-full",
15
+ e.bgColor,
16
+ e.textColor || "text-black",
17
+ e.outlined ? `border ${e.outlineColor}` : "",
18
+ e.rounded === !0 ? "rounded-lg" : e.rounded ? `rounded-${e.rounded}` : "",
19
+ e.flat ? "shadow-none" : `shadow-${e.elevation}`,
20
+ t
21
+ ].filter(Boolean).join(" ");
22
+ });
23
+ return (t, w) => (o(), s("div", {
24
+ class: p(m.value)
19
25
  }, [
20
- t.$slots.title || t.title ? (e(), o("div", v, [
21
- s(n, { dense: "" }, {
22
- default: r(() => [
23
- s(y, {
26
+ t.$slots.title || t.title || t.subtitle ? (o(), s("div", h, [
27
+ l(i, { dense: "" }, {
28
+ default: n(() => [
29
+ l(k, {
24
30
  title: t.title,
25
31
  subtitle: t.subtitle
26
32
  }, null, 8, ["title", "subtitle"])
27
33
  ]),
28
34
  _: 1
29
35
  })
30
- ])) : l("", !0),
31
- t.$slots.default || t.text ? (e(), o("div", b, [
32
- t.text ? (e(), _(n, { key: 0 }, {
33
- default: r(() => [
34
- s(C, { text: t.text }, null, 8, ["text"])
36
+ ])) : r("", !0),
37
+ t.$slots.default || t.text ? (o(), s("div", v, [
38
+ t.text ? (o(), C(i, { key: 0 }, {
39
+ default: n(() => [
40
+ l(_, { text: t.text }, null, 8, ["text"])
35
41
  ]),
36
42
  _: 1
37
43
  })) : a(t.$slots, "default", { key: 1 })
38
- ])) : l("", !0),
39
- t.$slots.actions ? (e(), o("div", B, [
40
- s(h, null, {
41
- default: r(() => [
44
+ ])) : r("", !0),
45
+ t.$slots.actions ? (o(), s("div", y, [
46
+ l(b, null, {
47
+ default: n(() => [
42
48
  a(t.$slots, "actions")
43
49
  ]),
44
50
  _: 3
45
51
  })
46
- ])) : l("", !0)
47
- ], 6));
52
+ ])) : r("", !0)
53
+ ], 2));
48
54
  }
49
- };
55
+ });
50
56
  export {
51
- g as default
57
+ V as default
52
58
  };
@@ -11,6 +11,10 @@ const e = {
11
11
  type: String,
12
12
  default: null
13
13
  },
14
+ textColor: {
15
+ type: String,
16
+ default: "text-black dark:text-white"
17
+ },
14
18
  bgColor: {
15
19
  type: String,
16
20
  default: "bg-transparent"
@@ -36,14 +40,6 @@ const e = {
36
40
  type: [String, Number],
37
41
  default: 1,
38
42
  validator: (t) => ["0", "1", "2", "3", "4", "5", "", 0, 1, 2, 3, 4, 5].includes(t)
39
- },
40
- class: {
41
- type: [String, Array, Object],
42
- default: null
43
- },
44
- style: {
45
- type: Object,
46
- default: null
47
43
  }
48
44
  };
49
45
  export {
@@ -1,22 +1,24 @@
1
- import { createElementBlock as a, openBlock as l, normalizeStyle as c, normalizeClass as i, unref as o, renderSlot as m } from "vue";
2
- import { useCardActions as p } from "../composables/useCardActions.js";
3
- import { kunCardActionsProps as u } from "../composables/kunCardActionsProps.js";
4
- const k = {
1
+ import { useAttrs as a, computed as l, createElementBlock as n, openBlock as p, normalizeClass as c, renderSlot as u } from "vue";
2
+ import { kunCardActionsProps as f } from "../composables/kunCardActionsProps.js";
3
+ const x = {
5
4
  __name: "KunCardActions",
6
- props: u,
7
- setup(r) {
8
- const e = r, {
9
- containerClass: t,
10
- containerStyle: n
11
- } = p(e);
12
- return (s, f) => (l(), a("div", {
13
- class: i(["w-full", o(t)]),
14
- style: c(o(n))
5
+ props: f,
6
+ setup(s) {
7
+ const e = s, t = a(), o = l(() => [
8
+ e.wrap ? "flex-wrap" : "flex-nowrap",
9
+ e.justify,
10
+ e.align,
11
+ e.gap,
12
+ e.dense ? "py-1 px-2" : "py-3 px-4",
13
+ t.class
14
+ ].filter(Boolean));
15
+ return (r, i) => (p(), n("div", {
16
+ class: c(["w-full flex", o.value])
15
17
  }, [
16
- m(s.$slots, "default")
17
- ], 6));
18
+ u(r.$slots, "default")
19
+ ], 2));
18
20
  }
19
21
  };
20
22
  export {
21
- k as default
23
+ x as default
22
24
  };
@@ -20,14 +20,6 @@ const e = {
20
20
  dense: {
21
21
  type: Boolean,
22
22
  default: !1
23
- },
24
- class: {
25
- type: [String, Array, Object],
26
- default: null
27
- },
28
- style: {
29
- type: Object,
30
- default: null
31
23
  }
32
24
  };
33
25
  export {