@nexxtmove/ui 0.0.7 → 0.0.8

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
@@ -5,6 +5,7 @@ import { PublicProps } from 'vue';
5
5
 
6
6
  declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
7
  variant: "primary" | "secondary";
8
+ buttonType: "button" | "submit" | "reset";
8
9
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
9
10
 
10
11
  declare type __VLS_Props = {
@@ -13,6 +14,7 @@ declare type __VLS_Props = {
13
14
  iconRight?: boolean;
14
15
  disabled?: boolean;
15
16
  loading?: boolean;
17
+ buttonType?: 'button' | 'submit' | 'reset';
16
18
  };
17
19
 
18
20
  declare function __VLS_template(): {
@@ -32,6 +34,6 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
32
34
  };
33
35
  };
34
36
 
35
- export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
37
+ export declare const NexxtButton: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
36
38
 
37
39
  export { }
package/dist/index.js CHANGED
@@ -1,37 +1,36 @@
1
- import { defineComponent as d, createElementBlock as t, openBlock as a, normalizeClass as o, createCommentVNode as i, renderSlot as c, createVNode as u, Transition as b, withCtx as f, createElementVNode as y } from "vue";
2
- const g = ["disabled"], v = /* @__PURE__ */ d({
1
+ import { defineComponent as r, createElementBlock as e, openBlock as a, normalizeClass as n, createCommentVNode as l, renderSlot as c, createVNode as d, Transition as u, withCtx as f, createElementVNode as y } from "vue";
2
+ const m = ["type", "disabled", "data-variant"], v = /* @__PURE__ */ r({
3
3
  __name: "Button",
4
4
  props: {
5
5
  variant: { default: "primary" },
6
6
  icon: {},
7
7
  iconRight: { type: Boolean },
8
8
  disabled: { type: Boolean },
9
- loading: { type: Boolean }
9
+ loading: { type: Boolean },
10
+ buttonType: { default: "button" }
10
11
  },
11
- setup(e) {
12
- const l = {
13
- primary: "bg-cornflower-blue-500 hover:bg-cornflower-blue-400 text-gray-50 disabled:bg-gray-200 disabled:text-gray-600",
14
- secondary: "bg-white border border-gray-950 hover:border-cornflower-blue-700 disabled:border-gray-400 disabled:text-gray-400"
15
- }, s = {
12
+ setup(t) {
13
+ const s = {
16
14
  primary: "bg-cornflower-blue-500",
17
15
  secondary: "bg-white"
18
16
  };
19
- return (r, n) => (a(), t("button", {
20
- type: "button",
21
- disabled: e.disabled,
22
- class: o([
23
- "outline-cornflower-blue-100 relative flex h-10 cursor-pointer items-center justify-center gap-2 overflow-hidden rounded-lg transition-colors focus:outline-3 disabled:cursor-not-allowed",
24
- r.$slots.default ? "px-4" : "w-10",
25
- l[e.variant],
26
- e.loading ? "pointer-events-none" : ""
27
- ])
17
+ return (o, i) => (a(), e("button", {
18
+ type: t.buttonType,
19
+ disabled: t.disabled,
20
+ class: n([
21
+ "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",
22
+ `button-${t.variant}`,
23
+ o.$slots.default ?? "w-10",
24
+ t.loading ? "pointer-events-none" : ""
25
+ ]),
26
+ "data-variant": t.variant
28
27
  }, [
29
- e.icon ? (a(), t("i", {
28
+ t.icon ? (a(), e("i", {
30
29
  key: 0,
31
- class: o([`fa-light fa-${e.icon} text-sm`, { "order-last": e.iconRight }])
32
- }, null, 2)) : i("", !0),
33
- c(r.$slots, "default"),
34
- u(b, {
30
+ class: n([`fa-light fa-${t.icon} text-sm`, { "order-last": t.iconRight }])
31
+ }, null, 2)) : l("", !0),
32
+ c(o.$slots, "default"),
33
+ d(u, {
35
34
  "enter-active-class": "transition-opacity duration-200",
36
35
  "enter-from-class": "opacity-0",
37
36
  "enter-to-class": "opacity-100",
@@ -40,21 +39,21 @@ const g = ["disabled"], v = /* @__PURE__ */ d({
40
39
  "leave-to-class": "opacity-0"
41
40
  }, {
42
41
  default: f(() => [
43
- e.loading ? (a(), t("div", {
42
+ t.loading ? (a(), e("div", {
44
43
  key: 0,
45
- class: o([
44
+ class: n([
46
45
  "absolute inset-0 flex items-center justify-center rounded-lg",
47
- s[e.variant]
46
+ s[t.variant]
48
47
  ])
49
- }, [...n[0] || (n[0] = [
48
+ }, [...i[0] || (i[0] = [
50
49
  y("i", { class: "fa-light fa-spinner-third fa-spin absolute text-sm" }, null, -1)
51
- ])], 2)) : i("", !0)
50
+ ])], 2)) : l("", !0)
52
51
  ]),
53
52
  _: 1
54
53
  })
55
- ], 10, g));
54
+ ], 10, m));
56
55
  }
57
56
  });
58
57
  export {
59
- v as Button
58
+ v as NexxtButton
60
59
  };
@@ -172,12 +172,13 @@
172
172
  --button-padding-x: var(--spacing-4);
173
173
  --button-padding-y: var(--spacing-2);
174
174
  --button-gap: var(--spacing-1);
175
+ --button-border-radius: var(--radius-lg);
175
176
  --font-sans: 'Poppins', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
176
177
  --font-serif: 'Playfair Display', ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
177
178
  --font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
178
- --shadow-xs: 0rem 0rem 1.5rem 0rem oklch(26.805% 0.01602 264.26805);
179
- --shadow-sm: 0rem 0rem 2rem 0.3125rem oklch(26.805% 0.01602 264.26805);
180
- --shadow-md: 0rem 0rem 3rem 0.625rem oklch(26.805% 0.01602 264.26805);
181
- --shadow-lg: 0rem 0rem 5rem 0.9375rem oklch(26.805% 0.01602 264.26805);
182
- --shadow-xl: 0rem 0.25rem 7rem 1.25rem oklch(26.805% 0.01602 264.26805);
179
+ --shadow-xs: 0px 0px 24px 0px oklch(26.805% 0.01602 264.26805 / 5%);
180
+ --shadow-sm: 0px 0px 32px 5px oklch(26.805% 0.01602 264.26805 / 10%);
181
+ --shadow-md: 0px 0px 48px 10px oklch(26.805% 0.01602 264.26805 / 12%);
182
+ --shadow-lg: 0px 0px 80px 15px oklch(26.805% 0.01602 264.26805 / 16%);
183
+ --shadow-xl: 0px 4px 112px 20px oklch(26.805% 0.01602 264.26805 / 18%);
183
184
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nexxtmove/ui",
3
3
  "type": "module",
4
- "version": "0.0.7",
4
+ "version": "0.0.8",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -38,6 +38,7 @@
38
38
  "consola": "^3.4.2",
39
39
  "eslint": "^9.39.2",
40
40
  "eslint-config-prettier": "^10.1.8",
41
+ "eslint-plugin-prettier": "^5.5.5",
41
42
  "eslint-plugin-vue": "^10.6.2",
42
43
  "globals": "^17.0.0",
43
44
  "jsdom": "^27.4.0",
@@ -61,6 +62,7 @@
61
62
  "test:dev": "vitest run --reporter=json --reporter=default",
62
63
  "build": "vite build && pnpm sd",
63
64
  "format": "prettier --write .",
65
+ "generate:index": "node --experimental-strip-types ./scripts/generate-index.ts",
64
66
  "lint": "eslint .",
65
67
  "lint:fix": "eslint . --fix",
66
68
  "storybook": "storybook dev -p 6006",