@nexxtmove/ui 0.0.14 → 0.0.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.
Files changed (2) hide show
  1. package/dist/index.js +22 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as c, createElementBlock as i, openBlock as n, normalizeClass as t, createBlock as d, createCommentVNode as o, createElementVNode as u, createVNode as l, renderSlot as f, Transition as m, withCtx as y } from "vue";
1
+ import { defineComponent as c, createElementBlock as i, openBlock as a, normalizeClass as n, createBlock as d, createCommentVNode as o, createVNode as l, renderSlot as u, Transition as f, withCtx as m } from "vue";
2
2
  const s = /* @__PURE__ */ c({
3
3
  name: "NexxtIcon",
4
4
  __name: "Icon",
@@ -7,14 +7,14 @@ const s = /* @__PURE__ */ c({
7
7
  type: { default: "light" }
8
8
  },
9
9
  setup(e) {
10
- return (a, r) => (n(), i("i", {
11
- class: t([`fa-${e.type}`, `fa-${e.name}`, "items-center", "justify-center"])
10
+ return (t, r) => (a(), i("i", {
11
+ class: n([`fa-${e.type}`, `fa-${e.name}`, "items-center", "justify-center"])
12
12
  }, null, 2));
13
13
  }
14
- }), v = ["type", "disabled", "data-variant"], b = {
14
+ }), y = ["type", "disabled", "data-variant"], v = {
15
15
  key: 0,
16
- class: /* @__PURE__ */ t(["absolute inset-0 flex items-center justify-center rounded-lg"])
17
- }, x = /* @__PURE__ */ c({
16
+ class: /* @__PURE__ */ n(["absolute inset-0 flex items-center justify-center rounded-lg"])
17
+ }, h = /* @__PURE__ */ c({
18
18
  name: "NexxtButton",
19
19
  __name: "Button",
20
20
  props: {
@@ -26,33 +26,35 @@ const s = /* @__PURE__ */ c({
26
26
  buttonType: { default: "button" }
27
27
  },
28
28
  setup(e) {
29
- return (a, r) => (n(), i("button", {
29
+ return (t, r) => (a(), i("button", {
30
30
  type: e.buttonType,
31
31
  disabled: e.disabled,
32
- class: t([
32
+ class: n([
33
33
  "button relative flex h-10 cursor-pointer items-center justify-center overflow-hidden rounded-lg transition-colors duration-200 focus-visible:outline-3 disabled:cursor-not-allowed",
34
34
  `button-${e.variant}`,
35
- a.$slots.default ?? "w-10",
35
+ t.$slots.default ?? "w-10",
36
+ !t.$slots.default && e.icon ? "aspect-square px-0" : "",
36
37
  e.loading ? "pointer-events-none" : ""
37
38
  ]),
38
39
  "data-variant": e.variant
39
40
  }, [
40
- e.icon ? (n(), d(s, {
41
+ e.icon ? (a(), d(s, {
41
42
  key: 0,
42
43
  name: e.icon,
43
- class: t({ "order-last": e.iconRight, "opacity-0": e.loading })
44
+ class: n({ "order-last": e.iconRight, "opacity-0": e.loading })
44
45
  }, null, 8, ["name", "class"])) : o("", !0),
45
- u("span", {
46
- class: t([
46
+ t.$slots.default ? (a(), i("span", {
47
+ key: 1,
48
+ class: n([
47
49
  "inline-block transition-all duration-200",
48
50
  { "opacity-0": e.loading },
49
51
  e.variant === "link" ? "underline underline-offset-1" : "",
50
52
  e.variant === "link" && !e.loading && !e.disabled ? "hover:underline-offset-2" : ""
51
53
  ])
52
54
  }, [
53
- f(a.$slots, "default")
54
- ], 2),
55
- l(m, {
55
+ u(t.$slots, "default")
56
+ ], 2)) : o("", !0),
57
+ l(f, {
56
58
  "enter-active-class": "transition-opacity duration-200",
57
59
  "enter-from-class": "opacity-0",
58
60
  "enter-to-class": "opacity-100",
@@ -60,8 +62,8 @@ const s = /* @__PURE__ */ c({
60
62
  "leave-from-class": "opacity-100",
61
63
  "leave-to-class": "opacity-0"
62
64
  }, {
63
- default: y(() => [
64
- e.loading ? (n(), i("div", b, [
65
+ default: m(() => [
66
+ e.loading ? (a(), i("div", v, [
65
67
  l(s, {
66
68
  name: "spinner-third",
67
69
  type: "light",
@@ -71,10 +73,10 @@ const s = /* @__PURE__ */ c({
71
73
  ]),
72
74
  _: 1
73
75
  })
74
- ], 10, v));
76
+ ], 10, y));
75
77
  }
76
78
  });
77
79
  export {
78
- x as NexxtButton,
80
+ h as NexxtButton,
79
81
  s as NexxtIcon
80
82
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nexxtmove/ui",
3
3
  "type": "module",
4
- "version": "0.0.14",
4
+ "version": "0.0.15",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",