@nexxtmove/ui 0.0.13 → 0.0.14

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.
package/dist/index.d.ts CHANGED
@@ -4,19 +4,7 @@ import { DefineComponent } from 'vue';
4
4
  import { IconName } from '@awesome.me/kit-37b149f3ef/icons';
5
5
  import { PublicProps } from 'vue';
6
6
 
7
- declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
- variant: "primary" | "secondary";
9
- buttonType: "button" | "submit" | "reset";
10
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
11
-
12
- declare type __VLS_Props = {
13
- variant?: 'primary' | 'secondary';
14
- icon?: InstanceType<typeof NexxtIcon>['name'];
15
- iconRight?: boolean;
16
- disabled?: boolean;
17
- loading?: boolean;
18
- buttonType?: 'button' | 'submit' | 'reset';
19
- };
7
+ declare const __VLS_component: DefineComponent<NexxtButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<NexxtButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
20
8
 
21
9
  declare function __VLS_template(): {
22
10
  attrs: Partial<{}>;
@@ -39,11 +27,18 @@ declare type IconType = 'regular' | 'solid' | 'light' | 'duotone' | 'brands';
39
27
 
40
28
  export declare const NexxtButton: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
41
29
 
42
- export declare const NexxtIcon: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {
43
- type: IconType;
44
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
30
+ declare interface NexxtButtonProps {
31
+ variant?: 'primary' | 'secondary' | 'link';
32
+ icon?: InstanceType<typeof NexxtIcon>['name'];
33
+ iconRight?: boolean;
34
+ disabled?: boolean;
35
+ loading?: boolean;
36
+ buttonType?: 'button' | 'submit' | 'reset';
37
+ }
38
+
39
+ export declare const NexxtIcon: DefineComponent<NexxtIconProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<NexxtIconProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
45
40
 
46
- declare interface Props {
41
+ declare interface NexxtIconProps {
47
42
  name: IconName;
48
43
  type?: IconType;
49
44
  }
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as c, createElementBlock as o, openBlock as t, normalizeClass as a, createBlock as d, createCommentVNode as l, renderSlot as u, createVNode as s, Transition as m, withCtx as y } from "vue";
2
- const r = /* @__PURE__ */ c({
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";
2
+ const s = /* @__PURE__ */ c({
3
3
  name: "NexxtIcon",
4
4
  __name: "Icon",
5
5
  props: {
@@ -7,11 +7,14 @@ const r = /* @__PURE__ */ c({
7
7
  type: { default: "light" }
8
8
  },
9
9
  setup(e) {
10
- return (i, n) => (t(), o("i", {
11
- class: a([`fa-${e.type}`, `fa-${e.name}`, "items-center", "justify-center"])
10
+ return (a, r) => (n(), i("i", {
11
+ class: t([`fa-${e.type}`, `fa-${e.name}`, "items-center", "justify-center"])
12
12
  }, null, 2));
13
13
  }
14
- }), f = ["type", "disabled", "data-variant"], x = /* @__PURE__ */ c({
14
+ }), v = ["type", "disabled", "data-variant"], b = {
15
+ key: 0,
16
+ class: /* @__PURE__ */ t(["absolute inset-0 flex items-center justify-center rounded-lg"])
17
+ }, x = /* @__PURE__ */ c({
15
18
  name: "NexxtButton",
16
19
  __name: "Button",
17
20
  props: {
@@ -19,32 +22,37 @@ const r = /* @__PURE__ */ c({
19
22
  icon: {},
20
23
  iconRight: { type: Boolean },
21
24
  disabled: { type: Boolean },
22
- loading: { type: Boolean },
25
+ loading: { type: Boolean, default: !1 },
23
26
  buttonType: { default: "button" }
24
27
  },
25
28
  setup(e) {
26
- const i = {
27
- primary: "bg-cornflower-blue-500",
28
- secondary: "bg-white"
29
- };
30
- return (n, b) => (t(), o("button", {
29
+ return (a, r) => (n(), i("button", {
31
30
  type: e.buttonType,
32
31
  disabled: e.disabled,
33
- class: a([
34
- "button relative flex h-10 cursor-pointer items-center justify-center overflow-hidden rounded-lg transition-colors focus-visible:outline-3 disabled:cursor-not-allowed",
32
+ class: t([
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",
35
34
  `button-${e.variant}`,
36
- n.$slots.default ?? "w-10",
35
+ a.$slots.default ?? "w-10",
37
36
  e.loading ? "pointer-events-none" : ""
38
37
  ]),
39
38
  "data-variant": e.variant
40
39
  }, [
41
- e.icon ? (t(), d(r, {
40
+ e.icon ? (n(), d(s, {
42
41
  key: 0,
43
42
  name: e.icon,
44
- class: a({ "order-last": e.iconRight })
45
- }, null, 8, ["name", "class"])) : l("", !0),
46
- u(n.$slots, "default"),
47
- s(m, {
43
+ class: t({ "order-last": e.iconRight, "opacity-0": e.loading })
44
+ }, null, 8, ["name", "class"])) : o("", !0),
45
+ u("span", {
46
+ class: t([
47
+ "inline-block transition-all duration-200",
48
+ { "opacity-0": e.loading },
49
+ e.variant === "link" ? "underline underline-offset-1" : "",
50
+ e.variant === "link" && !e.loading && !e.disabled ? "hover:underline-offset-2" : ""
51
+ ])
52
+ }, [
53
+ f(a.$slots, "default")
54
+ ], 2),
55
+ l(m, {
48
56
  "enter-active-class": "transition-opacity duration-200",
49
57
  "enter-from-class": "opacity-0",
50
58
  "enter-to-class": "opacity-100",
@@ -53,26 +61,20 @@ const r = /* @__PURE__ */ c({
53
61
  "leave-to-class": "opacity-0"
54
62
  }, {
55
63
  default: y(() => [
56
- e.loading ? (t(), o("div", {
57
- key: 0,
58
- class: a([
59
- "absolute inset-0 flex items-center justify-center rounded-lg",
60
- i[e.variant]
61
- ])
62
- }, [
63
- s(r, {
64
+ e.loading ? (n(), i("div", b, [
65
+ l(s, {
64
66
  name: "spinner-third",
65
67
  type: "light",
66
68
  class: "fa-spin absolute text-sm"
67
69
  })
68
- ], 2)) : l("", !0)
70
+ ])) : o("", !0)
69
71
  ]),
70
72
  _: 1
71
73
  })
72
- ], 10, f));
74
+ ], 10, v));
73
75
  }
74
76
  });
75
77
  export {
76
78
  x as NexxtButton,
77
- r as NexxtIcon
79
+ s as NexxtIcon
78
80
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nexxtmove/ui",
3
3
  "type": "module",
4
- "version": "0.0.13",
4
+ "version": "0.0.14",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -23,11 +23,11 @@
23
23
  "devDependencies": {
24
24
  "@awesome.me/kit-37b149f3ef": "^1.0.4",
25
25
  "@eslint/js": "^9.39.2",
26
- "@storybook/addon-a11y": "^10.1.11",
27
- "@storybook/addon-docs": "^10.1.11",
28
- "@storybook/addon-vitest": "^10.1.11",
29
- "@storybook/builder-vite": "^10.1.11",
30
- "@storybook/vue3-vite": "^10.1.11",
26
+ "@storybook/addon-a11y": "^10.2.0",
27
+ "@storybook/addon-docs": "^10.2.0",
28
+ "@storybook/addon-vitest": "^10.2.0",
29
+ "@storybook/builder-vite": "^10.2.0",
30
+ "@storybook/vue3-vite": "^10.2.0",
31
31
  "@tailwindcss/vite": "^4.1.18",
32
32
  "@types/node": "^25.0.3",
33
33
  "@types/react": "^19.2.8",
@@ -49,11 +49,12 @@
49
49
  "react": "^19.2.3",
50
50
  "react-dom": "^19.2.3",
51
51
  "remark-frontmatter": "^5.0.0",
52
- "storybook": "^10.1.11",
52
+ "storybook": "^10.2.0",
53
53
  "typescript-eslint": "^8.52.0",
54
54
  "vite": "^7.3.0",
55
55
  "vite-plugin-dts": "^4.5.4",
56
- "vitest": "^4.0.16"
56
+ "vitest": "^4.0.16",
57
+ "eslint-plugin-storybook": "10.2.0"
57
58
  },
58
59
  "engines": {
59
60
  "node": ">=22.18.0"