@regardio/react 0.7.24 → 0.8.1

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 (54) hide show
  1. package/dist/button/index.d.mts +2 -2
  2. package/dist/button/index.mjs +2 -2
  3. package/dist/button-BllZdqCA.mjs +109 -0
  4. package/dist/carousel/index.mjs +1 -1
  5. package/dist/checkbox/index.mjs +12 -17
  6. package/dist/combobox/index.d.mts +142 -0
  7. package/dist/combobox/index.mjs +238 -0
  8. package/dist/field/index.d.mts +2 -2
  9. package/dist/field/index.mjs +26 -26
  10. package/dist/fieldset/index.d.mts +2 -2
  11. package/dist/fieldset/index.mjs +18 -21
  12. package/dist/icon-button/index.d.mts +1 -1
  13. package/dist/icon-button/index.mjs +1 -1
  14. package/dist/index-BTB1biC_.d.mts +19 -0
  15. package/dist/index-DEHa010W.d.mts +35 -0
  16. package/dist/input/index.d.mts +1 -1
  17. package/dist/input/index.mjs +1 -1
  18. package/dist/input-BHRHF8xW.mjs +62 -0
  19. package/dist/password-input/index.d.mts +2 -2
  20. package/dist/password-input/index.mjs +5 -6
  21. package/dist/radio/index.mjs +12 -17
  22. package/dist/slider/index.mjs +6 -13
  23. package/dist/switch/index.mjs +7 -12
  24. package/dist/text/index.d.mts +6 -3
  25. package/dist/text/index.mjs +6 -3
  26. package/dist/toggle/index.mjs +44 -29
  27. package/package.json +27 -15
  28. package/src/button/button.test.tsx +12 -8
  29. package/src/button/button.tsx +50 -59
  30. package/src/button/index.ts +2 -2
  31. package/src/checkbox/checkbox.tsx +11 -14
  32. package/src/combobox/combobox.stories.tsx +137 -0
  33. package/src/combobox/combobox.tsx +435 -0
  34. package/src/combobox/index.ts +2 -0
  35. package/src/field/field.test.tsx +1 -1
  36. package/src/field/field.tsx +21 -13
  37. package/src/fieldset/fieldset.test.tsx +1 -1
  38. package/src/fieldset/fieldset.tsx +6 -6
  39. package/src/icon-button/icon-button.test.tsx +1 -1
  40. package/src/input/input.stories.tsx +0 -11
  41. package/src/input/input.test.tsx +5 -2
  42. package/src/input/input.tsx +34 -75
  43. package/src/password-input/password-input.tsx +4 -5
  44. package/src/radio/radio.tsx +11 -14
  45. package/src/slider/slider.tsx +6 -8
  46. package/src/storybook.css +27 -0
  47. package/src/switch/switch.tsx +6 -11
  48. package/src/text/text.tsx +6 -3
  49. package/src/toggle/toggle.test.tsx +1 -2
  50. package/src/toggle/toggle.tsx +44 -29
  51. package/dist/button-wigUM1BB.mjs +0 -127
  52. package/dist/index-B_G_f749.d.mts +0 -29
  53. package/dist/index-DH3W0i5O.d.mts +0 -35
  54. package/dist/input-C2SM4-AB.mjs +0 -71
@@ -2,96 +2,55 @@ import { Input as BaseUIInput } from '@base-ui/react/input';
2
2
  import { tv } from '@regardio/tailwind/utils';
3
3
  import type { ComponentProps } from 'react';
4
4
 
5
- const inputVariants = {
6
- default: [
7
- 'w-full',
8
- 'px-3',
9
- 'py-2',
10
- 'border',
11
- 'border-gray-300',
12
- 'rounded-md',
13
- 'bg-white',
14
- 'text-gray-900',
15
- 'placeholder-gray-500',
16
- 'focus:outline-none',
17
- 'focus:ring-2',
18
- 'focus:ring-blue-500',
19
- 'focus:border-blue-500',
20
- 'transition-colors',
21
- 'duration-200',
22
- ],
23
- error: [
24
- 'border-red-300',
25
- 'text-red-900',
26
- 'placeholder-red-500',
27
- 'focus:ring-red-500',
28
- 'focus:border-red-500',
29
- ],
30
- success: [
31
- 'border-green-300',
32
- 'text-green-900',
33
- 'placeholder-green-500',
34
- 'focus:ring-green-500',
35
- 'focus:border-green-500',
36
- ],
37
- } as const;
38
-
39
- const inputSizes = {
40
- lg: ['px-4', 'py-3', 'text-lg'],
41
- md: ['px-3', 'py-2', 'text-base'],
42
- sm: ['px-2', 'py-1', 'text-sm'],
43
- } as const;
44
-
45
5
  const input = tv({
46
- base: [
47
- 'w-full',
48
- 'px-3',
49
- 'py-2',
50
- 'border',
51
- 'border-gray-300',
52
- 'rounded-md',
53
- 'bg-white',
54
- 'text-gray-900',
55
- 'placeholder-gray-500',
56
- 'focus:outline-none',
57
- 'focus:ring-2',
58
- 'focus:ring-blue-500',
59
- 'focus:border-blue-500',
60
- 'transition-colors',
61
- 'duration-200',
62
- ],
6
+ base: [],
63
7
  defaultVariants: {
64
8
  size: 'md',
65
9
  variant: 'default',
66
10
  },
67
11
  variants: {
68
12
  size: {
69
- lg: ['px-4', 'py-3', 'text-lg'],
70
- md: [],
71
- sm: ['px-2', 'py-1', 'text-sm'],
13
+ lg: ['px-4', 'py-3'],
14
+ md: ['px-3', 'py-2'],
15
+ sm: ['px-2', 'py-1'],
72
16
  },
73
17
  variant: {
74
- default: [],
75
- error: [
76
- 'border-red-300',
77
- 'text-red-900',
78
- 'placeholder-red-500',
79
- 'focus:ring-red-500',
80
- 'focus:border-red-500',
18
+ default: [
19
+ 'w-full',
20
+ 'border',
21
+ 'border-current',
22
+ 'rounded-md',
23
+ 'bg-background-muted',
24
+ 'text-foreground',
25
+ 'placeholder:text-muted-foreground',
26
+ 'focus:outline-none',
27
+ 'focus:ring-2',
28
+ 'focus:ring-ring',
29
+ 'focus:border-ring',
30
+ 'transition-colors',
31
+ 'duration-200',
81
32
  ],
82
- success: [
83
- 'border-green-300',
84
- 'text-green-900',
85
- 'placeholder-green-500',
86
- 'focus:ring-green-500',
87
- 'focus:border-green-500',
33
+ error: [
34
+ 'w-full',
35
+ 'border',
36
+ 'rounded-md',
37
+ 'bg-background-muted',
38
+ 'focus:outline-none',
39
+ 'focus:ring-2',
40
+ 'transition-colors',
41
+ 'duration-200',
42
+ 'border-destructive',
43
+ 'text-destructive',
44
+ 'placeholder:text-destructive',
45
+ 'focus:ring-destructive',
46
+ 'focus:border-destructive',
88
47
  ],
89
48
  },
90
49
  },
91
50
  });
92
51
 
93
- export type InputVariant = keyof typeof inputVariants;
94
- export type InputSize = keyof typeof inputSizes;
52
+ export type InputVariant = 'default' | 'error';
53
+ export type InputSize = 'sm' | 'md' | 'lg';
95
54
 
96
55
  export interface InputProps extends Omit<ComponentProps<typeof BaseUIInput>, 'className' | 'size'> {
97
56
  className?: string;
@@ -32,11 +32,11 @@ const toggleButton = tv({
32
32
  'cursor-pointer',
33
33
  'items-center',
34
34
  'justify-center',
35
- 'text-gray-500',
36
- 'hover:text-gray-700',
35
+ 'text-muted-foreground',
36
+ 'hover:text-foreground',
37
37
  'focus:outline-none',
38
38
  'focus:ring-2',
39
- 'focus:ring-blue-500',
39
+ 'focus:ring-ring',
40
40
  'focus:ring-offset-2',
41
41
  'rounded',
42
42
  'transition-colors',
@@ -49,7 +49,7 @@ export type PasswordInputVariant = keyof typeof passwordInputVariants;
49
49
  export interface PasswordInputProps
50
50
  extends Omit<React.ComponentProps<typeof Input>, 'type' | 'variant'> {
51
51
  className?: string;
52
- inputVariant?: 'default' | 'error' | 'success';
52
+ inputVariant?: 'default' | 'error';
53
53
  showToggle?: boolean;
54
54
  variant?: PasswordInputVariant;
55
55
  }
@@ -81,7 +81,6 @@ export const PasswordInput = ({
81
81
  aria-label={showPassword ? 'Hide password' : 'Show password'}
82
82
  className={toggleButton()}
83
83
  onClick={togglePasswordVisibility}
84
- size="sm"
85
84
  variant="ghost"
86
85
  >
87
86
  {showPassword ? (
@@ -4,22 +4,19 @@ import type { ComponentProps } from 'react';
4
4
 
5
5
  const radioRoot = tv({
6
6
  base: [
7
- 'h-4',
8
- 'w-4',
7
+ 'flex',
8
+ 'items-center',
9
+ 'justify-center',
9
10
  'rounded-full',
10
- 'border',
11
- 'border-gray-300',
12
- 'bg-white',
13
- 'focus:outline-none',
14
- 'focus:ring-2',
15
- 'focus:ring-blue-500',
16
- 'focus:ring-offset-2',
11
+ 'focus-visible:outline-2',
12
+ 'focus-visible:outline-offset-2',
13
+ 'focus-visible:outline-ring',
17
14
  'disabled:cursor-not-allowed',
18
- 'disabled:opacity-50',
19
- 'data-[checked]:bg-blue-600',
20
- 'data-[checked]:border-blue-600',
15
+ 'data-[checked]:bg-primary',
16
+ 'data-[unchecked]:border',
17
+ 'data-[unchecked]:border-current',
18
+ 'data-[unchecked]:bg-background-muted',
21
19
  'transition-colors',
22
- 'duration-200',
23
20
  'cursor-pointer',
24
21
  ],
25
22
  defaultVariants: {
@@ -35,7 +32,7 @@ const radioRoot = tv({
35
32
  });
36
33
 
37
34
  const radioIndicator = tv({
38
- base: ['flex', 'items-center', 'justify-center', 'text-white', 'data-[unchecked]:invisible'],
35
+ base: ['flex', 'text-primary-foreground', 'data-[unchecked]:hidden'],
39
36
  });
40
37
 
41
38
  export type RadioSize = 'sm' | 'md' | 'lg';
@@ -21,7 +21,7 @@ const sliderControl = tv({
21
21
  });
22
22
 
23
23
  const sliderTrack = tv({
24
- base: ['relative', 'w-full', 'rounded-full', 'bg-gray-200', 'overflow-hidden'],
24
+ base: ['relative', 'w-full', 'rounded-full', 'bg-muted', 'overflow-hidden'],
25
25
  defaultVariants: {
26
26
  size: 'md',
27
27
  },
@@ -35,23 +35,21 @@ const sliderTrack = tv({
35
35
  });
36
36
 
37
37
  const sliderIndicator = tv({
38
- base: ['absolute', 'h-full', 'bg-blue-600', 'rounded-full'],
38
+ base: ['absolute', 'h-full', 'bg-primary', 'rounded-full'],
39
39
  });
40
40
 
41
41
  const sliderThumb = tv({
42
42
  base: [
43
43
  'block',
44
44
  'rounded-full',
45
- 'bg-white',
45
+ 'bg-background-muted',
46
46
  'border-2',
47
- 'border-blue-600',
48
- 'shadow-lg',
47
+ 'border-primary',
49
48
  'focus:outline-none',
50
49
  'focus:ring-2',
51
- 'focus:ring-blue-500',
50
+ 'focus:ring-ring',
52
51
  'focus:ring-offset-2',
53
52
  'disabled:cursor-not-allowed',
54
- 'disabled:opacity-50',
55
53
  'cursor-grab',
56
54
  'active:cursor-grabbing',
57
55
  ],
@@ -68,7 +66,7 @@ const sliderThumb = tv({
68
66
  });
69
67
 
70
68
  const sliderValue = tv({
71
- base: ['text-sm', 'font-medium', 'text-gray-700', 'mb-2'],
69
+ base: ['text-foreground', 'mb-2'],
72
70
  });
73
71
 
74
72
  export type SliderSize = 'sm' | 'md' | 'lg';
package/src/storybook.css CHANGED
@@ -1 +1,28 @@
1
1
  @import "tailwindcss";
2
+ @import "@regardio/tailwind/styles/index.css";
3
+
4
+ /* Sample semantic color tokens for Storybook testing */
5
+ /* Applications should define their own tokens or use @regardio/brand */
6
+ @theme {
7
+ --color-foreground: oklch(25.3% 0.015 254.6);
8
+ --color-muted-foreground: oklch(53.4% 0.013 254.6);
9
+ --color-background: oklch(97.3% 0.003 254.6);
10
+ --color-background-muted: oklch(100% 0 0);
11
+ --color-background-subtle: oklch(95.5% 0.006 254.6);
12
+ --color-border: oklch(85.5% 0.006 254.6);
13
+ --color-border-muted: oklch(91.9% 0.004 254.6);
14
+ --color-ring: oklch(69.8% 0.088 192.3);
15
+ --color-primary: oklch(63.2% 0.096 192.3);
16
+ --color-primary-foreground: oklch(100% 0 0);
17
+ --color-primary-hover: oklch(56.6% 0.089 192.3);
18
+ --color-secondary: oklch(64.8% 0.142 154.5);
19
+ --color-secondary-foreground: oklch(100% 0 0);
20
+ --color-secondary-hover: oklch(58.1% 0.132 154.5);
21
+ --color-accent: oklch(85.2% 0.151 130.4);
22
+ --color-accent-foreground: oklch(25.3% 0.015 254.6);
23
+ --color-accent-hover: oklch(78.9% 0.148 130.4);
24
+ --color-muted: oklch(95.5% 0.006 254.6);
25
+ --color-destructive: oklch(62.8% 0.258 27.3);
26
+ --color-destructive-foreground: oklch(100% 0 0);
27
+ --color-destructive-hover: oklch(55.5% 0.24 27.3);
28
+ }
@@ -9,16 +9,13 @@ const switchRoot = tv({
9
9
  'items-center',
10
10
  'rounded-full',
11
11
  'transition-colors',
12
- 'duration-200',
13
- 'focus:outline-none',
14
- 'focus:ring-2',
15
- 'focus:ring-blue-500',
16
- 'focus:ring-offset-2',
12
+ 'focus-visible:outline-2',
13
+ 'focus-visible:outline-offset-2',
14
+ 'focus-visible:outline-ring',
17
15
  'disabled:cursor-not-allowed',
18
- 'disabled:opacity-50',
19
16
  'cursor-pointer',
20
- 'bg-gray-300',
21
- 'data-[checked]:bg-blue-600',
17
+ 'bg-muted',
18
+ 'data-[checked]:bg-primary',
22
19
  ],
23
20
  defaultVariants: {
24
21
  size: 'md',
@@ -37,13 +34,11 @@ const switchThumb = tv({
37
34
  'pointer-events-none',
38
35
  'inline-block',
39
36
  'rounded-full',
40
- 'bg-white',
41
- 'shadow-lg',
37
+ 'bg-background-muted',
42
38
  'ring-0',
43
39
  'transition-transform',
44
40
  'duration-200',
45
41
  'translate-x-0',
46
- 'data-[checked]:translate-x-full',
47
42
  ],
48
43
  defaultVariants: {
49
44
  size: 'md',
package/src/text/text.tsx CHANGED
@@ -6,9 +6,12 @@ const themeColorVariants = {
6
6
  } as const;
7
7
 
8
8
  const textVariants = {
9
- code: ['font-light', 'font-monospace'],
10
- primary: [],
11
- subtitle: ['text-lg'],
9
+ code: ['font-mono', 'text-sm'],
10
+ muted: ['text-muted-foreground'],
11
+ primary: ['text-foreground'],
12
+ secondary: ['text-muted-foreground'],
13
+ subtitle: ['text-muted-foreground'],
14
+ supertitle: ['text-foreground', 'font-semibold'],
12
15
  } as const;
13
16
 
14
17
  const text = tv({
@@ -37,7 +37,7 @@ describe('Toggle', () => {
37
37
  </Toggle>,
38
38
  );
39
39
  const toggle = screen.getByTestId('variant-toggle');
40
- expect(toggle).toHaveClass('bg-transparent', 'text-gray-700');
40
+ expect(toggle).toHaveClass('bg-transparent', 'text-foreground');
41
41
  });
42
42
 
43
43
  it('applies size styles', () => {
@@ -90,7 +90,6 @@ describe('Toggle', () => {
90
90
  );
91
91
  const toggle = screen.getByTestId('disabled-toggle');
92
92
  expect(toggle).toBeDisabled();
93
- expect(toggle).toHaveClass('disabled:opacity-50');
94
93
  });
95
94
 
96
95
  it('applies custom className', () => {
@@ -3,22 +3,7 @@ import { tv } from '@regardio/tailwind/utils';
3
3
  import type { ComponentProps, ReactNode } from 'react';
4
4
 
5
5
  const toggle: ReturnType<typeof tv> = tv({
6
- base: [
7
- 'inline-flex',
8
- 'items-center',
9
- 'justify-center',
10
- 'rounded-md',
11
- 'text-sm',
12
- 'font-medium',
13
- 'transition-colors',
14
- 'duration-200',
15
- 'focus:outline-none',
16
- 'focus:ring-2',
17
- 'focus:ring-blue-500',
18
- 'focus:ring-offset-2',
19
- 'disabled:pointer-events-none',
20
- 'disabled:opacity-50',
21
- ],
6
+ base: [],
22
7
  defaultVariants: {
23
8
  size: 'md',
24
9
  variant: 'outline',
@@ -30,24 +15,54 @@ const toggle: ReturnType<typeof tv> = tv({
30
15
  sm: ['h-8', 'w-8', 'p-1'],
31
16
  },
32
17
  variant: {
33
- default: [],
18
+ default: [
19
+ 'inline-flex',
20
+ 'items-center',
21
+ 'justify-center',
22
+ 'rounded-md',
23
+ 'transition-colors',
24
+ 'duration-200',
25
+ 'focus:outline-none',
26
+ 'focus:ring-2',
27
+ 'focus:ring-ring',
28
+ 'focus:ring-offset-2',
29
+ 'disabled:pointer-events-none',
30
+ ],
34
31
  ghost: [
32
+ 'inline-flex',
33
+ 'items-center',
34
+ 'justify-center',
35
+ 'rounded-md',
36
+ 'transition-colors',
37
+ 'duration-200',
38
+ 'focus:outline-none',
39
+ 'focus:ring-2',
40
+ 'focus:ring-ring',
41
+ 'focus:ring-offset-2',
42
+ 'disabled:pointer-events-none',
35
43
  'bg-transparent',
36
- 'text-gray-700',
37
- 'hover:bg-gray-100',
38
- 'hover:text-gray-900',
39
- 'data-[pressed]:bg-gray-200',
40
- 'data-[pressed]:text-gray-900',
44
+ 'text-foreground',
45
+ 'hover:bg-muted',
46
+ 'data-[pressed]:bg-muted',
41
47
  ],
42
48
  outline: [
49
+ 'inline-flex',
50
+ 'items-center',
51
+ 'justify-center',
52
+ 'rounded-md',
53
+ 'transition-colors',
54
+ 'duration-200',
55
+ 'focus:outline-none',
56
+ 'focus:ring-2',
57
+ 'focus:ring-ring',
58
+ 'focus:ring-offset-2',
59
+ 'disabled:pointer-events-none',
43
60
  'border',
44
- 'border-gray-300',
45
- 'bg-white',
46
- 'text-gray-700',
47
- 'hover:bg-gray-50',
48
- 'hover:text-gray-900',
49
- 'data-[pressed]:bg-gray-100',
50
- 'data-[pressed]:text-gray-900',
61
+ 'border-current',
62
+ 'bg-background-muted',
63
+ 'text-foreground',
64
+ 'hover:bg-muted',
65
+ 'data-[pressed]:bg-muted',
51
66
  ],
52
67
  },
53
68
  },
@@ -1,127 +0,0 @@
1
- import { tv } from "@regardio/tailwind/utils";
2
- import { jsx } from "react/jsx-runtime";
3
- import { Button } from "@base-ui/react/button";
4
- //#region src/button/button.tsx
5
- const buttonVariants = {
6
- destructive: [
7
- "bg-red-600",
8
- "text-white",
9
- "border-red-600",
10
- "hover:bg-red-700",
11
- "hover:border-red-700",
12
- "focus-visible:ring-2",
13
- "focus-visible:ring-red-500",
14
- "focus-visible:ring-offset-2"
15
- ],
16
- ghost: [
17
- "bg-transparent",
18
- "text-gray-900",
19
- "border-transparent",
20
- "hover:bg-gray-100",
21
- "hover:border-transparent",
22
- "focus-visible:ring-2",
23
- "focus-visible:ring-gray-500",
24
- "focus-visible:ring-offset-2"
25
- ],
26
- outline: [
27
- "bg-transparent",
28
- "text-gray-900",
29
- "border-gray-300",
30
- "hover:bg-gray-50",
31
- "hover:border-gray-400",
32
- "focus-visible:ring-2",
33
- "focus-visible:ring-gray-500",
34
- "focus-visible:ring-offset-2"
35
- ],
36
- primary: [
37
- "bg-blue-600",
38
- "text-white",
39
- "border-blue-600",
40
- "hover:bg-blue-700",
41
- "hover:border-blue-700",
42
- "focus-visible:ring-2",
43
- "focus-visible:ring-blue-500",
44
- "focus-visible:ring-offset-2"
45
- ],
46
- secondary: [
47
- "bg-gray-100",
48
- "text-gray-900",
49
- "border-gray-300",
50
- "hover:bg-gray-200",
51
- "hover:border-gray-400",
52
- "focus-visible:ring-2",
53
- "focus-visible:ring-gray-500",
54
- "focus-visible:ring-offset-2"
55
- ]
56
- };
57
- const button = tv({
58
- base: [
59
- "inline-flex",
60
- "items-center",
61
- "justify-center",
62
- "border",
63
- "transition-colors",
64
- "duration-200",
65
- "ease-in-out",
66
- "disabled:opacity-50",
67
- "disabled:cursor-not-allowed",
68
- "disabled:pointer-events-none"
69
- ],
70
- defaultVariants: {
71
- size: "md",
72
- variant: "primary"
73
- },
74
- variants: {
75
- size: {
76
- "2xl": [
77
- "px-10",
78
- "py-5",
79
- "text-2xl",
80
- "font-medium",
81
- "rounded-lg"
82
- ],
83
- lg: [
84
- "px-6",
85
- "py-3",
86
- "text-lg",
87
- "font-medium",
88
- "rounded-lg"
89
- ],
90
- md: [
91
- "px-4",
92
- "py-2",
93
- "text-base",
94
- "font-medium",
95
- "rounded-md"
96
- ],
97
- sm: [
98
- "px-3",
99
- "py-1.5",
100
- "text-sm",
101
- "font-medium",
102
- "rounded-md"
103
- ],
104
- xl: [
105
- "px-8",
106
- "py-4",
107
- "text-xl",
108
- "font-medium",
109
- "rounded-lg"
110
- ]
111
- },
112
- variant: buttonVariants
113
- }
114
- });
115
- const Button$1 = ({ children, className, variant, size, ...props }) => {
116
- return /* @__PURE__ */ jsx(Button, {
117
- className: button({
118
- className,
119
- size,
120
- variant
121
- }),
122
- ...props,
123
- children
124
- });
125
- };
126
- //#endregion
127
- export { Button$1 as t };
@@ -1,29 +0,0 @@
1
- import { ComponentProps } from "react";
2
- import { Input } from "@base-ui/react/input";
3
-
4
- //#region src/input/input.d.ts
5
- declare const inputVariants: {
6
- readonly default: readonly ["w-full", "px-3", "py-2", "border", "border-gray-300", "rounded-md", "bg-white", "text-gray-900", "placeholder-gray-500", "focus:outline-none", "focus:ring-2", "focus:ring-blue-500", "focus:border-blue-500", "transition-colors", "duration-200"];
7
- readonly error: readonly ["border-red-300", "text-red-900", "placeholder-red-500", "focus:ring-red-500", "focus:border-red-500"];
8
- readonly success: readonly ["border-green-300", "text-green-900", "placeholder-green-500", "focus:ring-green-500", "focus:border-green-500"];
9
- };
10
- declare const inputSizes: {
11
- readonly lg: readonly ["px-4", "py-3", "text-lg"];
12
- readonly md: readonly ["px-3", "py-2", "text-base"];
13
- readonly sm: readonly ["px-2", "py-1", "text-sm"];
14
- };
15
- type InputVariant = keyof typeof inputVariants;
16
- type InputSize = keyof typeof inputSizes;
17
- interface InputProps extends Omit<ComponentProps<typeof Input>, "className" | "size"> {
18
- className?: string;
19
- size?: InputSize;
20
- variant?: InputVariant;
21
- }
22
- declare const Input$1: ({
23
- className,
24
- variant,
25
- size,
26
- ...props
27
- }: InputProps) => React.JSX.Element;
28
- //#endregion
29
- export { InputVariant as i, InputProps as n, InputSize as r, Input$1 as t };
@@ -1,35 +0,0 @@
1
- import { ComponentProps } from "react";
2
- import { Button } from "@base-ui/react/button";
3
-
4
- //#region src/button/button.d.ts
5
- declare const buttonVariants: {
6
- readonly destructive: readonly ["bg-red-600", "text-white", "border-red-600", "hover:bg-red-700", "hover:border-red-700", "focus-visible:ring-2", "focus-visible:ring-red-500", "focus-visible:ring-offset-2"];
7
- readonly ghost: readonly ["bg-transparent", "text-gray-900", "border-transparent", "hover:bg-gray-100", "hover:border-transparent", "focus-visible:ring-2", "focus-visible:ring-gray-500", "focus-visible:ring-offset-2"];
8
- readonly outline: readonly ["bg-transparent", "text-gray-900", "border-gray-300", "hover:bg-gray-50", "hover:border-gray-400", "focus-visible:ring-2", "focus-visible:ring-gray-500", "focus-visible:ring-offset-2"];
9
- readonly primary: readonly ["bg-blue-600", "text-white", "border-blue-600", "hover:bg-blue-700", "hover:border-blue-700", "focus-visible:ring-2", "focus-visible:ring-blue-500", "focus-visible:ring-offset-2"];
10
- readonly secondary: readonly ["bg-gray-100", "text-gray-900", "border-gray-300", "hover:bg-gray-200", "hover:border-gray-400", "focus-visible:ring-2", "focus-visible:ring-gray-500", "focus-visible:ring-offset-2"];
11
- };
12
- declare const buttonSizes: {
13
- readonly "2xl": readonly ["px-10", "py-5", "text-2xl", "font-medium", "rounded-lg"];
14
- readonly lg: readonly ["px-6", "py-3", "text-lg", "font-medium", "rounded-lg"];
15
- readonly md: readonly ["px-4", "py-2", "text-base", "font-medium", "rounded-md"];
16
- readonly sm: readonly ["px-3", "py-1.5", "text-sm", "font-medium", "rounded-md"];
17
- readonly xl: readonly ["px-8", "py-4", "text-xl", "font-medium", "rounded-lg"];
18
- };
19
- type ButtonVariant = keyof typeof buttonVariants;
20
- type ButtonSize = keyof typeof buttonSizes;
21
- interface ButtonProps extends Omit<ComponentProps<typeof Button>, "className"> {
22
- className?: string;
23
- size?: ButtonSize;
24
- type?: "button" | "submit" | "reset";
25
- variant?: ButtonVariant;
26
- }
27
- declare const Button$1: ({
28
- children,
29
- className,
30
- variant,
31
- size,
32
- ...props
33
- }: ButtonProps) => React.JSX.Element;
34
- //#endregion
35
- export { ButtonVariant as i, ButtonProps as n, ButtonSize as r, Button$1 as t };