@vinyasa/button 1.0.15 → 1.0.17

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,84 @@
1
- export declare const button: string;
1
+ export declare const button: import("@vanilla-extract/recipes").RuntimeFn<{
2
+ variant: {
3
+ primary: {
4
+ backgroundColor: `var(--${string})`;
5
+ color: `var(--${string})`;
6
+ selectors: {
7
+ '&:hover:not(:disabled)': {
8
+ opacity: `var(--${string})`;
9
+ };
10
+ };
11
+ };
12
+ secondary: {
13
+ backgroundColor: `var(--${string})`;
14
+ color: `var(--${string})`;
15
+ selectors: {
16
+ '&:hover:not(:disabled)': {
17
+ opacity: `var(--${string})`;
18
+ };
19
+ };
20
+ };
21
+ tertiary: {
22
+ backgroundColor: `var(--${string})`;
23
+ color: `var(--${string})`;
24
+ selectors: {
25
+ '&:hover:not(:disabled)': {
26
+ opacity: `var(--${string})`;
27
+ };
28
+ };
29
+ };
30
+ danger: {
31
+ backgroundColor: `var(--${string})`;
32
+ color: `var(--${string})`;
33
+ selectors: {
34
+ '&:hover:not(:disabled)': {
35
+ opacity: `var(--${string})`;
36
+ };
37
+ };
38
+ };
39
+ outline: {
40
+ backgroundColor: "transparent";
41
+ color: `var(--${string})`;
42
+ border: `var(--${string}) solid var(--${string})`;
43
+ selectors: {
44
+ '&:hover:not(:disabled)': {
45
+ backgroundColor: `var(--${string})`;
46
+ };
47
+ };
48
+ };
49
+ ghost: {
50
+ backgroundColor: "transparent";
51
+ color: `var(--${string})`;
52
+ selectors: {
53
+ '&:hover:not(:disabled)': {
54
+ backgroundColor: `var(--${string})`;
55
+ };
56
+ };
57
+ };
58
+ };
59
+ size: {
60
+ sm: {
61
+ padding: `var(--${string}) var(--${string})`;
62
+ fontSize: `var(--${string})`;
63
+ };
64
+ md: {
65
+ padding: `var(--${string}) var(--${string})`;
66
+ fontSize: `var(--${string})`;
67
+ };
68
+ lg: {
69
+ padding: `var(--${string}) var(--${string})`;
70
+ fontSize: `var(--${string})`;
71
+ };
72
+ };
73
+ radius: {
74
+ sm: {
75
+ borderRadius: `var(--${string})`;
76
+ };
77
+ md: {
78
+ borderRadius: `var(--${string})`;
79
+ };
80
+ full: {
81
+ borderRadius: `var(--${string})`;
82
+ };
83
+ };
84
+ }>;
@@ -1,3 +1,15 @@
1
- import React from 'react';
2
- declare const Button: () => React.JSX.Element;
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'outline' | 'ghost';
3
+ export type ButtonSize = 'sm' | 'md' | 'lg';
4
+ export type ButtonRadius = 'sm' | 'md' | 'full';
5
+ export interface ButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'children'> {
6
+ children: ReactNode;
7
+ variant?: ButtonVariant;
8
+ size?: ButtonSize;
9
+ radius?: ButtonRadius;
10
+ loading?: boolean;
11
+ leadingIcon?: ReactNode;
12
+ trailingIcon?: ReactNode;
13
+ }
14
+ declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
3
15
  export default Button;
@@ -0,0 +1 @@
1
+ export declare const spinner: string;
@@ -0,0 +1,2 @@
1
+ declare const Spinner: () => import("react").JSX.Element;
2
+ export default Spinner;
@@ -1,2 +1,3 @@
1
1
  import Button from './Button';
2
2
  export default Button;
3
+ export type { ButtonProps, ButtonRadius, ButtonSize, ButtonVariant } from './Button';
@@ -1,2 +1,3 @@
1
1
  export { default as Button } from './components/button';
2
2
  export { default } from './components/button';
3
+ export type { ButtonProps, ButtonRadius, ButtonSize, ButtonVariant } from './components/button';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vinyasa/button",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -41,7 +41,7 @@
41
41
  "peerDependencies": {
42
42
  "react": "^18.0.0 || ^19.0.0",
43
43
  "react-dom": "^18.0.0 || ^19.0.0",
44
- "@vinyasa/tokens": "^1.0.15"
44
+ "@vinyasa/tokens": "^1.0.17"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@rsbuild/plugin-react": "^2.1.0",
@@ -50,10 +50,11 @@
50
50
  "@types/node": "^26.0.1",
51
51
  "@types/react": "^19.0.0",
52
52
  "@vanilla-extract/css": "^1.21.0",
53
+ "@vanilla-extract/recipes": "^0.5.7",
53
54
  "@vanilla-extract/vite-plugin": "^5.2.3",
54
55
  "@vanilla-extract/webpack-plugin": "^2.3.27",
55
56
  "typescript": "^5.7.3",
56
- "@vinyasa/tokens": "1.0.15"
57
+ "@vinyasa/tokens": "1.0.17"
57
58
  },
58
59
  "scripts": {
59
60
  "build": "rslib build && node ../../scripts/postbuild-package.mjs",