@me1a/ui 2.0.0 → 2.0.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.
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +375 -1
- package/dist/index.d.ts +375 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -6
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@tailwind base;@tailwind components;@tailwind utilities;@layer base{:root{--background: 0 0% 100%;--foreground:
|
|
1
|
+
@tailwind base;@tailwind components;@tailwind utilities;@layer base{:root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark{--background: 0 0% 3.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}}@layer base{*{@apply border-border;}body{@apply bg-background text-foreground;}}
|
|
2
2
|
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styles/globals.css"],"sourcesContent":["@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground:
|
|
1
|
+
{"version":3,"sources":["../src/styles/globals.css"],"sourcesContent":["@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 0 0% 3.9%;\n\n --card: 0 0% 100%;\n --card-foreground: 0 0% 3.9%;\n \n --popover: 0 0% 100%;\n --popover-foreground: 0 0% 3.9%;\n \n --primary: 0 0% 9%;\n --primary-foreground: 0 0% 98%;\n \n --secondary: 0 0% 96.1%;\n --secondary-foreground: 0 0% 9%;\n \n --muted: 0 0% 96.1%;\n --muted-foreground: 0 0% 45.1%;\n \n --accent: 0 0% 96.1%;\n --accent-foreground: 0 0% 9%;\n \n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 0 0% 98%;\n\n --border: 0 0% 89.8%;\n --input: 0 0% 89.8%;\n --ring: 0 0% 3.9%;\n \n --radius: 0.5rem;\n \n --chart-1: 12 76% 61%;\n \n --chart-2: 173 58% 39%;\n \n --chart-3: 197 37% 24%;\n \n --chart-4: 43 74% 66%;\n \n --chart-5: 27 87% 67%;\n }\n \n .dark {\n --background: 0 0% 3.9%;\n --foreground: 0 0% 98%;\n \n --card: 0 0% 3.9%;\n --card-foreground: 0 0% 98%;\n \n --popover: 0 0% 3.9%;\n --popover-foreground: 0 0% 98%;\n \n --primary: 0 0% 98%;\n --primary-foreground: 0 0% 9%;\n \n --secondary: 0 0% 14.9%;\n --secondary-foreground: 0 0% 98%;\n \n --muted: 0 0% 14.9%;\n --muted-foreground: 0 0% 63.9%;\n \n --accent: 0 0% 14.9%;\n --accent-foreground: 0 0% 98%;\n \n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 0 0% 98%;\n \n --border: 0 0% 14.9%;\n --input: 0 0% 14.9%;\n --ring: 0 0% 83.1%;\n --chart-1: 220 70% 50%;\n --chart-2: 160 60% 45%;\n --chart-3: 30 80% 55%;\n --chart-4: 280 65% 60%;\n --chart-5: 340 75% 55%;\n }\n}\n \n@layer base {\n * {\n @apply border-border;\n }\n body {\n @apply bg-background text-foreground;\n }\n} "],"mappings":"AAAA,UAAU,KACV,UAAU,WACV,UAAU,UAEV,YACE,MACE,cAAc,EAAE,GAAG,KACnB,cAAc,EAAE,GAAG,KAEnB,QAAQ,EAAE,GAAG,KACb,mBAAmB,EAAE,GAAG,KAExB,WAAW,EAAE,GAAG,KAChB,sBAAsB,EAAE,GAAG,KAE3B,WAAW,EAAE,GAAG,GAChB,sBAAsB,EAAE,GAAG,IAE3B,aAAa,EAAE,GAAG,MAClB,wBAAwB,EAAE,GAAG,GAE7B,SAAS,EAAE,GAAG,MACd,oBAAoB,EAAE,GAAG,MAEzB,UAAU,EAAE,GAAG,MACf,qBAAqB,EAAE,GAAG,GAE1B,eAAe,EAAE,MAAM,MACvB,0BAA0B,EAAE,GAAG,IAE/B,UAAU,EAAE,GAAG,MACf,SAAS,EAAE,GAAG,MACd,QAAQ,EAAE,GAAG,KAEb,UAAU,MAEV,WAAW,GAAG,IAAI,IAElB,WAAW,IAAI,IAAI,IAEnB,WAAW,IAAI,IAAI,IAEnB,WAAW,GAAG,IAAI,IAElB,WAAW,GAAG,IAAI,GACpB,CAEA,CAAC,KACC,cAAc,EAAE,GAAG,KACnB,cAAc,EAAE,GAAG,IAEnB,QAAQ,EAAE,GAAG,KACb,mBAAmB,EAAE,GAAG,IAExB,WAAW,EAAE,GAAG,KAChB,sBAAsB,EAAE,GAAG,IAE3B,WAAW,EAAE,GAAG,IAChB,sBAAsB,EAAE,GAAG,GAE3B,aAAa,EAAE,GAAG,MAClB,wBAAwB,EAAE,GAAG,IAE7B,SAAS,EAAE,GAAG,MACd,oBAAoB,EAAE,GAAG,MAEzB,UAAU,EAAE,GAAG,MACf,qBAAqB,EAAE,GAAG,IAE1B,eAAe,EAAE,MAAM,MACvB,0BAA0B,EAAE,GAAG,IAE/B,UAAU,EAAE,GAAG,MACf,SAAS,EAAE,GAAG,MACd,QAAQ,EAAE,GAAG,MACb,WAAW,IAAI,IAAI,IACnB,WAAW,IAAI,IAAI,IACnB,WAAW,GAAG,IAAI,IAClB,WAAW,IAAI,IAAI,IACnB,WAAW,IAAI,IAAI,GACrB,CACF,CAEA,YACE,EACE,OAAO,cACT,CACA,KACE,OAAO,cAAc,gBACvB,CACF","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
6
|
+
import * as vaul from 'vaul';
|
|
7
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
4
8
|
import { ClassValue } from 'clsx';
|
|
5
9
|
|
|
6
10
|
/**
|
|
@@ -15,9 +19,15 @@ import { ClassValue } from 'clsx';
|
|
|
15
19
|
* @property {string} [variant] - The visual style variant of the button.
|
|
16
20
|
* @property {string} [size] - The size variant of the button.
|
|
17
21
|
* @property {string} [className] - Additional CSS classes to apply to the button.
|
|
22
|
+
* @property {React.ReactNode} [startIcon] - Icon to display before the button text.
|
|
23
|
+
* @property {React.ReactNode} [endIcon] - Icon to display after the button text.
|
|
24
|
+
* @property {boolean} [loading] - Whether the button is in a loading state.
|
|
18
25
|
*/
|
|
19
26
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
20
27
|
asChild?: boolean;
|
|
28
|
+
startIcon?: React.ReactNode;
|
|
29
|
+
endIcon?: React.ReactNode;
|
|
30
|
+
loading?: boolean;
|
|
21
31
|
}
|
|
22
32
|
|
|
23
33
|
/**
|
|
@@ -50,6 +60,13 @@ declare const buttonVariants: (props?: ({
|
|
|
50
60
|
* <Button variant="link" asChild>
|
|
51
61
|
* <a href="/about">About</a>
|
|
52
62
|
* </Button>
|
|
63
|
+
*
|
|
64
|
+
* // With icons
|
|
65
|
+
* <Button startIcon={<Icon />}>With Start Icon</Button>
|
|
66
|
+
* <Button endIcon={<Icon />}>With End Icon</Button>
|
|
67
|
+
*
|
|
68
|
+
* // Loading state
|
|
69
|
+
* <Button loading>Loading</Button>
|
|
53
70
|
* ```
|
|
54
71
|
*
|
|
55
72
|
* @param {ButtonProps} props - The component props
|
|
@@ -58,6 +75,363 @@ declare const buttonVariants: (props?: ({
|
|
|
58
75
|
*/
|
|
59
76
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
60
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Props interface for the TextField component.
|
|
80
|
+
* Extends the native input HTML attributes and adds support for variants and icons.
|
|
81
|
+
*
|
|
82
|
+
* @interface TextFieldProps
|
|
83
|
+
* @extends {React.InputHTMLAttributes<HTMLInputElement>}
|
|
84
|
+
* @extends {VariantProps<typeof textFieldVariants>}
|
|
85
|
+
*
|
|
86
|
+
* @property {string} [variant] - The visual style variant of the text field.
|
|
87
|
+
* @property {string} [size] - The size variant of the text field.
|
|
88
|
+
* @property {string} [className] - Additional CSS classes to apply to the text field.
|
|
89
|
+
* @property {React.ReactNode} [startIcon] - Icon to display before the input.
|
|
90
|
+
* @property {React.ReactNode} [endIcon] - Icon to display after the input.
|
|
91
|
+
* @property {boolean} [loading] - Whether the text field is in a loading state.
|
|
92
|
+
* @property {string} [error] - Error message to display below the text field.
|
|
93
|
+
* @property {string} [label] - Label text for the text field.
|
|
94
|
+
* @property {string} [helperText] - Helper text to display below the text field.
|
|
95
|
+
*/
|
|
96
|
+
interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof textFieldVariants> {
|
|
97
|
+
startIcon?: React.ReactNode;
|
|
98
|
+
endIcon?: React.ReactNode;
|
|
99
|
+
loading?: boolean;
|
|
100
|
+
error?: string;
|
|
101
|
+
label?: string;
|
|
102
|
+
helperText?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Text field variant styles using class-variance-authority.
|
|
107
|
+
* Defines the visual styles for different text field variants and sizes.
|
|
108
|
+
*/
|
|
109
|
+
declare const textFieldVariants: (props?: ({
|
|
110
|
+
variant?: "default" | "error" | null | undefined;
|
|
111
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
112
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
113
|
+
/**
|
|
114
|
+
* A versatile text field component that supports multiple variants, sizes, and icons.
|
|
115
|
+
* Built on top of shadcn/ui's Input component.
|
|
116
|
+
*
|
|
117
|
+
* @component
|
|
118
|
+
* @example
|
|
119
|
+
* ```tsx
|
|
120
|
+
* // Default text field
|
|
121
|
+
* <TextField placeholder="Enter text" />
|
|
122
|
+
*
|
|
123
|
+
* // With icons
|
|
124
|
+
* <TextField startIcon={<SearchIcon />} placeholder="Search..." />
|
|
125
|
+
* <TextField endIcon={<CalendarIcon />} placeholder="Select date" />
|
|
126
|
+
*
|
|
127
|
+
* // With loading state
|
|
128
|
+
* <TextField loading placeholder="Loading..." />
|
|
129
|
+
*
|
|
130
|
+
* // With error
|
|
131
|
+
* <TextField error="Invalid input" placeholder="Enter text" />
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
135
|
+
|
|
136
|
+
interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
137
|
+
/**
|
|
138
|
+
* The maximum width of the container.
|
|
139
|
+
* - "sm": 640px
|
|
140
|
+
* - "md": 768px
|
|
141
|
+
* - "lg": 1024px
|
|
142
|
+
* - "xl": 1280px
|
|
143
|
+
* - "full": 100%
|
|
144
|
+
* - false: No max-width (fluid)
|
|
145
|
+
*
|
|
146
|
+
* @default "lg"
|
|
147
|
+
*/
|
|
148
|
+
maxWidth?: "sm" | "md" | "lg" | "xl" | "full" | false;
|
|
149
|
+
/**
|
|
150
|
+
* Whether to disable the default horizontal padding.
|
|
151
|
+
* When true, removes the default padding (px-4 sm:px-6 lg:px-8).
|
|
152
|
+
*
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
disablePadding?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Whether to make the container fluid (no max-width).
|
|
158
|
+
* When true, the container will expand to fill its parent's width.
|
|
159
|
+
*
|
|
160
|
+
* @default false
|
|
161
|
+
*/
|
|
162
|
+
fluid?: boolean;
|
|
163
|
+
}
|
|
164
|
+
declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Box is a fundamental layout component that serves as a building block for other components.
|
|
168
|
+
* It's a polymorphic component that can render as different HTML elements while maintaining
|
|
169
|
+
* consistent styling and behavior.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```tsx
|
|
173
|
+
* // Basic usage
|
|
174
|
+
* <Box>Content</Box>
|
|
175
|
+
*
|
|
176
|
+
* // As a different element
|
|
177
|
+
* <Box as="section">Section content</Box>
|
|
178
|
+
*
|
|
179
|
+
* // With custom className
|
|
180
|
+
* <Box className="bg-primary text-white p-4">Styled content</Box>
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
|
|
184
|
+
type BoxComponent = "div" | "span" | "section" | "article" | "main" | "aside" | "header" | "footer" | "nav";
|
|
185
|
+
interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
186
|
+
/**
|
|
187
|
+
* The HTML element to render the Box as.
|
|
188
|
+
* This allows for semantic HTML while maintaining consistent styling.
|
|
189
|
+
*
|
|
190
|
+
* @default "div"
|
|
191
|
+
*/
|
|
192
|
+
as?: BoxComponent;
|
|
193
|
+
}
|
|
194
|
+
declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Stack is a layout component that arranges its children in a vertical or horizontal stack
|
|
198
|
+
* with consistent spacing between items. It's built on top of Flexbox and provides
|
|
199
|
+
* a simple way to create consistent layouts.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```tsx
|
|
203
|
+
* // Basic vertical stack
|
|
204
|
+
* <Stack>
|
|
205
|
+
* <div>Item 1</div>
|
|
206
|
+
* <div>Item 2</div>
|
|
207
|
+
* <div>Item 3</div>
|
|
208
|
+
* </Stack>
|
|
209
|
+
*
|
|
210
|
+
* // Horizontal stack with custom spacing
|
|
211
|
+
* <Stack direction="horizontal" spacing="lg">
|
|
212
|
+
* <div>Item 1</div>
|
|
213
|
+
* <div>Item 2</div>
|
|
214
|
+
* </Stack>
|
|
215
|
+
*
|
|
216
|
+
* // Centered stack with wrapping
|
|
217
|
+
* <Stack direction="horizontal" center wrap>
|
|
218
|
+
* <div>Item 1</div>
|
|
219
|
+
* <div>Item 2</div>
|
|
220
|
+
* <div>Item 3</div>
|
|
221
|
+
* </Stack>
|
|
222
|
+
*
|
|
223
|
+
* // Stack with custom alignment
|
|
224
|
+
* <Stack align="center" justify="between">
|
|
225
|
+
* <div>Left</div>
|
|
226
|
+
* <div>Center</div>
|
|
227
|
+
* <div>Right</div>
|
|
228
|
+
* </Stack>
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
|
|
232
|
+
interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
233
|
+
/**
|
|
234
|
+
* The direction in which to stack the items.
|
|
235
|
+
* - "vertical": Items are stacked top to bottom
|
|
236
|
+
* - "horizontal": Items are stacked left to right
|
|
237
|
+
*
|
|
238
|
+
* @default "vertical"
|
|
239
|
+
*/
|
|
240
|
+
direction?: "vertical" | "horizontal";
|
|
241
|
+
/**
|
|
242
|
+
* The spacing between items in the stack.
|
|
243
|
+
* - "none": 0px
|
|
244
|
+
* - "xs": 0.25rem (4px)
|
|
245
|
+
* - "sm": 0.5rem (8px)
|
|
246
|
+
* - "md": 1rem (16px)
|
|
247
|
+
* - "lg": 1.5rem (24px)
|
|
248
|
+
* - "xl": 2rem (32px)
|
|
249
|
+
*
|
|
250
|
+
* @default "md"
|
|
251
|
+
*/
|
|
252
|
+
spacing?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
253
|
+
/**
|
|
254
|
+
* Whether to allow items to wrap to the next line when they don't fit.
|
|
255
|
+
* Only applies to horizontal stacks.
|
|
256
|
+
*
|
|
257
|
+
* @default false
|
|
258
|
+
*/
|
|
259
|
+
wrap?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Whether to center items both horizontally and vertically.
|
|
262
|
+
* This is a shorthand for setting both align and justify to "center".
|
|
263
|
+
*
|
|
264
|
+
* @default false
|
|
265
|
+
*/
|
|
266
|
+
center?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* How to justify items along the main axis.
|
|
269
|
+
* - "start": Items are packed toward the start
|
|
270
|
+
* - "end": Items are packed toward the end
|
|
271
|
+
* - "center": Items are centered
|
|
272
|
+
* - "between": Items are evenly distributed with first item at start and last at end
|
|
273
|
+
* - "around": Items are evenly distributed with equal space around them
|
|
274
|
+
* - "evenly": Items are distributed so that the spacing between any two items is equal
|
|
275
|
+
*
|
|
276
|
+
* @default undefined
|
|
277
|
+
*/
|
|
278
|
+
justify?: "start" | "end" | "center" | "between" | "around" | "evenly";
|
|
279
|
+
/**
|
|
280
|
+
* How to align items along the cross axis.
|
|
281
|
+
* - "start": Items are aligned at the start
|
|
282
|
+
* - "end": Items are aligned at the end
|
|
283
|
+
* - "center": Items are centered
|
|
284
|
+
* - "stretch": Items are stretched to fill the container
|
|
285
|
+
* - "baseline": Items are aligned at their baselines
|
|
286
|
+
*
|
|
287
|
+
* @default undefined
|
|
288
|
+
*/
|
|
289
|
+
align?: "start" | "end" | "center" | "stretch" | "baseline";
|
|
290
|
+
}
|
|
291
|
+
declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
|
|
292
|
+
|
|
293
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
294
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
295
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
296
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
297
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
298
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
299
|
+
declare const DialogHeader: {
|
|
300
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
301
|
+
displayName: string;
|
|
302
|
+
};
|
|
303
|
+
declare const DialogFooter: {
|
|
304
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
305
|
+
displayName: string;
|
|
306
|
+
};
|
|
307
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
308
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
309
|
+
|
|
310
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Card is a flexible container component that can be used to group related content and actions.
|
|
314
|
+
* It provides a consistent visual style with a subtle border, shadow, and rounded corners.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```tsx
|
|
318
|
+
* // Basic card
|
|
319
|
+
* <Card>
|
|
320
|
+
* <CardHeader>
|
|
321
|
+
* <CardTitle>Card Title</CardTitle>
|
|
322
|
+
* <CardDescription>Card Description</CardDescription>
|
|
323
|
+
* </CardHeader>
|
|
324
|
+
* <CardContent>
|
|
325
|
+
* <p>Card content goes here.</p>
|
|
326
|
+
* </CardContent>
|
|
327
|
+
* <CardFooter>
|
|
328
|
+
* <Button>Action</Button>
|
|
329
|
+
* </CardFooter>
|
|
330
|
+
* </Card>
|
|
331
|
+
*
|
|
332
|
+
* // Card with custom styling
|
|
333
|
+
* <Card className="bg-primary text-primary-foreground">
|
|
334
|
+
* <CardHeader>
|
|
335
|
+
* <CardTitle>Custom Styled Card</CardTitle>
|
|
336
|
+
* </CardHeader>
|
|
337
|
+
* <CardContent>
|
|
338
|
+
* <p>This card has custom background and text colors.</p>
|
|
339
|
+
* </CardContent>
|
|
340
|
+
* </Card>
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The main card container component.
|
|
346
|
+
* Provides the base styling for the card including border, shadow, and rounded corners.
|
|
347
|
+
*/
|
|
348
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
349
|
+
/**
|
|
350
|
+
* Header section of the card.
|
|
351
|
+
* Typically contains the card title and description.
|
|
352
|
+
* Includes padding and spacing for consistent layout.
|
|
353
|
+
*/
|
|
354
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
355
|
+
/**
|
|
356
|
+
* Title component for the card.
|
|
357
|
+
* Should be used within CardHeader.
|
|
358
|
+
* Provides consistent typography styling for card titles.
|
|
359
|
+
*/
|
|
360
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
361
|
+
/**
|
|
362
|
+
* Description component for the card.
|
|
363
|
+
* Should be used within CardHeader.
|
|
364
|
+
* Provides consistent typography styling for card descriptions.
|
|
365
|
+
*/
|
|
366
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
367
|
+
/**
|
|
368
|
+
* Main content section of the card.
|
|
369
|
+
* Includes padding and removes top padding to maintain consistent spacing with the header.
|
|
370
|
+
*/
|
|
371
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
372
|
+
/**
|
|
373
|
+
* Footer section of the card.
|
|
374
|
+
* Typically contains action buttons or additional information.
|
|
375
|
+
* Includes padding and removes top padding to maintain consistent spacing with the content.
|
|
376
|
+
*/
|
|
377
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
378
|
+
|
|
379
|
+
declare const Drawer: {
|
|
380
|
+
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
381
|
+
displayName: string;
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* The trigger element that opens the drawer.
|
|
385
|
+
* Should be used with the `asChild` prop to wrap your own trigger element.
|
|
386
|
+
*/
|
|
387
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
388
|
+
/**
|
|
389
|
+
* Portal component that renders the drawer content outside the DOM hierarchy.
|
|
390
|
+
* This ensures proper stacking context and accessibility.
|
|
391
|
+
*/
|
|
392
|
+
declare const DrawerPortal: typeof vaul.Portal;
|
|
393
|
+
/**
|
|
394
|
+
* Close button component for the drawer.
|
|
395
|
+
* Should be used with the `asChild` prop to wrap your own close button.
|
|
396
|
+
*/
|
|
397
|
+
declare const DrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
398
|
+
/**
|
|
399
|
+
* Overlay component that appears behind the drawer.
|
|
400
|
+
* Provides a semi-transparent backdrop and handles click-outside behavior.
|
|
401
|
+
*/
|
|
402
|
+
declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
403
|
+
/**
|
|
404
|
+
* The main content container for the drawer.
|
|
405
|
+
* Includes the handle bar at the top and manages the slide-up animation.
|
|
406
|
+
*/
|
|
407
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
408
|
+
/**
|
|
409
|
+
* Header section of the drawer.
|
|
410
|
+
* Typically contains the title and description.
|
|
411
|
+
*/
|
|
412
|
+
declare const DrawerHeader: {
|
|
413
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
414
|
+
displayName: string;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* Footer section of the drawer.
|
|
418
|
+
* Typically contains action buttons.
|
|
419
|
+
*/
|
|
420
|
+
declare const DrawerFooter: {
|
|
421
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
422
|
+
displayName: string;
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* Title component for the drawer.
|
|
426
|
+
* Should be used within DrawerHeader.
|
|
427
|
+
*/
|
|
428
|
+
declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
429
|
+
/**
|
|
430
|
+
* Description component for the drawer.
|
|
431
|
+
* Should be used within DrawerHeader.
|
|
432
|
+
*/
|
|
433
|
+
declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
434
|
+
|
|
61
435
|
declare function cn(...inputs: ClassValue[]): string;
|
|
62
436
|
|
|
63
|
-
export { Button, buttonVariants, cn };
|
|
437
|
+
export { Box, type BoxProps, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Container, type ContainerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Input, Stack, type StackProps, TextField, buttonVariants, cn, textFieldVariants };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
6
|
+
import * as vaul from 'vaul';
|
|
7
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
4
8
|
import { ClassValue } from 'clsx';
|
|
5
9
|
|
|
6
10
|
/**
|
|
@@ -15,9 +19,15 @@ import { ClassValue } from 'clsx';
|
|
|
15
19
|
* @property {string} [variant] - The visual style variant of the button.
|
|
16
20
|
* @property {string} [size] - The size variant of the button.
|
|
17
21
|
* @property {string} [className] - Additional CSS classes to apply to the button.
|
|
22
|
+
* @property {React.ReactNode} [startIcon] - Icon to display before the button text.
|
|
23
|
+
* @property {React.ReactNode} [endIcon] - Icon to display after the button text.
|
|
24
|
+
* @property {boolean} [loading] - Whether the button is in a loading state.
|
|
18
25
|
*/
|
|
19
26
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
20
27
|
asChild?: boolean;
|
|
28
|
+
startIcon?: React.ReactNode;
|
|
29
|
+
endIcon?: React.ReactNode;
|
|
30
|
+
loading?: boolean;
|
|
21
31
|
}
|
|
22
32
|
|
|
23
33
|
/**
|
|
@@ -50,6 +60,13 @@ declare const buttonVariants: (props?: ({
|
|
|
50
60
|
* <Button variant="link" asChild>
|
|
51
61
|
* <a href="/about">About</a>
|
|
52
62
|
* </Button>
|
|
63
|
+
*
|
|
64
|
+
* // With icons
|
|
65
|
+
* <Button startIcon={<Icon />}>With Start Icon</Button>
|
|
66
|
+
* <Button endIcon={<Icon />}>With End Icon</Button>
|
|
67
|
+
*
|
|
68
|
+
* // Loading state
|
|
69
|
+
* <Button loading>Loading</Button>
|
|
53
70
|
* ```
|
|
54
71
|
*
|
|
55
72
|
* @param {ButtonProps} props - The component props
|
|
@@ -58,6 +75,363 @@ declare const buttonVariants: (props?: ({
|
|
|
58
75
|
*/
|
|
59
76
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
60
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Props interface for the TextField component.
|
|
80
|
+
* Extends the native input HTML attributes and adds support for variants and icons.
|
|
81
|
+
*
|
|
82
|
+
* @interface TextFieldProps
|
|
83
|
+
* @extends {React.InputHTMLAttributes<HTMLInputElement>}
|
|
84
|
+
* @extends {VariantProps<typeof textFieldVariants>}
|
|
85
|
+
*
|
|
86
|
+
* @property {string} [variant] - The visual style variant of the text field.
|
|
87
|
+
* @property {string} [size] - The size variant of the text field.
|
|
88
|
+
* @property {string} [className] - Additional CSS classes to apply to the text field.
|
|
89
|
+
* @property {React.ReactNode} [startIcon] - Icon to display before the input.
|
|
90
|
+
* @property {React.ReactNode} [endIcon] - Icon to display after the input.
|
|
91
|
+
* @property {boolean} [loading] - Whether the text field is in a loading state.
|
|
92
|
+
* @property {string} [error] - Error message to display below the text field.
|
|
93
|
+
* @property {string} [label] - Label text for the text field.
|
|
94
|
+
* @property {string} [helperText] - Helper text to display below the text field.
|
|
95
|
+
*/
|
|
96
|
+
interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof textFieldVariants> {
|
|
97
|
+
startIcon?: React.ReactNode;
|
|
98
|
+
endIcon?: React.ReactNode;
|
|
99
|
+
loading?: boolean;
|
|
100
|
+
error?: string;
|
|
101
|
+
label?: string;
|
|
102
|
+
helperText?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Text field variant styles using class-variance-authority.
|
|
107
|
+
* Defines the visual styles for different text field variants and sizes.
|
|
108
|
+
*/
|
|
109
|
+
declare const textFieldVariants: (props?: ({
|
|
110
|
+
variant?: "default" | "error" | null | undefined;
|
|
111
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
112
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
113
|
+
/**
|
|
114
|
+
* A versatile text field component that supports multiple variants, sizes, and icons.
|
|
115
|
+
* Built on top of shadcn/ui's Input component.
|
|
116
|
+
*
|
|
117
|
+
* @component
|
|
118
|
+
* @example
|
|
119
|
+
* ```tsx
|
|
120
|
+
* // Default text field
|
|
121
|
+
* <TextField placeholder="Enter text" />
|
|
122
|
+
*
|
|
123
|
+
* // With icons
|
|
124
|
+
* <TextField startIcon={<SearchIcon />} placeholder="Search..." />
|
|
125
|
+
* <TextField endIcon={<CalendarIcon />} placeholder="Select date" />
|
|
126
|
+
*
|
|
127
|
+
* // With loading state
|
|
128
|
+
* <TextField loading placeholder="Loading..." />
|
|
129
|
+
*
|
|
130
|
+
* // With error
|
|
131
|
+
* <TextField error="Invalid input" placeholder="Enter text" />
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
135
|
+
|
|
136
|
+
interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
137
|
+
/**
|
|
138
|
+
* The maximum width of the container.
|
|
139
|
+
* - "sm": 640px
|
|
140
|
+
* - "md": 768px
|
|
141
|
+
* - "lg": 1024px
|
|
142
|
+
* - "xl": 1280px
|
|
143
|
+
* - "full": 100%
|
|
144
|
+
* - false: No max-width (fluid)
|
|
145
|
+
*
|
|
146
|
+
* @default "lg"
|
|
147
|
+
*/
|
|
148
|
+
maxWidth?: "sm" | "md" | "lg" | "xl" | "full" | false;
|
|
149
|
+
/**
|
|
150
|
+
* Whether to disable the default horizontal padding.
|
|
151
|
+
* When true, removes the default padding (px-4 sm:px-6 lg:px-8).
|
|
152
|
+
*
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
disablePadding?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Whether to make the container fluid (no max-width).
|
|
158
|
+
* When true, the container will expand to fill its parent's width.
|
|
159
|
+
*
|
|
160
|
+
* @default false
|
|
161
|
+
*/
|
|
162
|
+
fluid?: boolean;
|
|
163
|
+
}
|
|
164
|
+
declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Box is a fundamental layout component that serves as a building block for other components.
|
|
168
|
+
* It's a polymorphic component that can render as different HTML elements while maintaining
|
|
169
|
+
* consistent styling and behavior.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```tsx
|
|
173
|
+
* // Basic usage
|
|
174
|
+
* <Box>Content</Box>
|
|
175
|
+
*
|
|
176
|
+
* // As a different element
|
|
177
|
+
* <Box as="section">Section content</Box>
|
|
178
|
+
*
|
|
179
|
+
* // With custom className
|
|
180
|
+
* <Box className="bg-primary text-white p-4">Styled content</Box>
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
|
|
184
|
+
type BoxComponent = "div" | "span" | "section" | "article" | "main" | "aside" | "header" | "footer" | "nav";
|
|
185
|
+
interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
186
|
+
/**
|
|
187
|
+
* The HTML element to render the Box as.
|
|
188
|
+
* This allows for semantic HTML while maintaining consistent styling.
|
|
189
|
+
*
|
|
190
|
+
* @default "div"
|
|
191
|
+
*/
|
|
192
|
+
as?: BoxComponent;
|
|
193
|
+
}
|
|
194
|
+
declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Stack is a layout component that arranges its children in a vertical or horizontal stack
|
|
198
|
+
* with consistent spacing between items. It's built on top of Flexbox and provides
|
|
199
|
+
* a simple way to create consistent layouts.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```tsx
|
|
203
|
+
* // Basic vertical stack
|
|
204
|
+
* <Stack>
|
|
205
|
+
* <div>Item 1</div>
|
|
206
|
+
* <div>Item 2</div>
|
|
207
|
+
* <div>Item 3</div>
|
|
208
|
+
* </Stack>
|
|
209
|
+
*
|
|
210
|
+
* // Horizontal stack with custom spacing
|
|
211
|
+
* <Stack direction="horizontal" spacing="lg">
|
|
212
|
+
* <div>Item 1</div>
|
|
213
|
+
* <div>Item 2</div>
|
|
214
|
+
* </Stack>
|
|
215
|
+
*
|
|
216
|
+
* // Centered stack with wrapping
|
|
217
|
+
* <Stack direction="horizontal" center wrap>
|
|
218
|
+
* <div>Item 1</div>
|
|
219
|
+
* <div>Item 2</div>
|
|
220
|
+
* <div>Item 3</div>
|
|
221
|
+
* </Stack>
|
|
222
|
+
*
|
|
223
|
+
* // Stack with custom alignment
|
|
224
|
+
* <Stack align="center" justify="between">
|
|
225
|
+
* <div>Left</div>
|
|
226
|
+
* <div>Center</div>
|
|
227
|
+
* <div>Right</div>
|
|
228
|
+
* </Stack>
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
|
|
232
|
+
interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
233
|
+
/**
|
|
234
|
+
* The direction in which to stack the items.
|
|
235
|
+
* - "vertical": Items are stacked top to bottom
|
|
236
|
+
* - "horizontal": Items are stacked left to right
|
|
237
|
+
*
|
|
238
|
+
* @default "vertical"
|
|
239
|
+
*/
|
|
240
|
+
direction?: "vertical" | "horizontal";
|
|
241
|
+
/**
|
|
242
|
+
* The spacing between items in the stack.
|
|
243
|
+
* - "none": 0px
|
|
244
|
+
* - "xs": 0.25rem (4px)
|
|
245
|
+
* - "sm": 0.5rem (8px)
|
|
246
|
+
* - "md": 1rem (16px)
|
|
247
|
+
* - "lg": 1.5rem (24px)
|
|
248
|
+
* - "xl": 2rem (32px)
|
|
249
|
+
*
|
|
250
|
+
* @default "md"
|
|
251
|
+
*/
|
|
252
|
+
spacing?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
253
|
+
/**
|
|
254
|
+
* Whether to allow items to wrap to the next line when they don't fit.
|
|
255
|
+
* Only applies to horizontal stacks.
|
|
256
|
+
*
|
|
257
|
+
* @default false
|
|
258
|
+
*/
|
|
259
|
+
wrap?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Whether to center items both horizontally and vertically.
|
|
262
|
+
* This is a shorthand for setting both align and justify to "center".
|
|
263
|
+
*
|
|
264
|
+
* @default false
|
|
265
|
+
*/
|
|
266
|
+
center?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* How to justify items along the main axis.
|
|
269
|
+
* - "start": Items are packed toward the start
|
|
270
|
+
* - "end": Items are packed toward the end
|
|
271
|
+
* - "center": Items are centered
|
|
272
|
+
* - "between": Items are evenly distributed with first item at start and last at end
|
|
273
|
+
* - "around": Items are evenly distributed with equal space around them
|
|
274
|
+
* - "evenly": Items are distributed so that the spacing between any two items is equal
|
|
275
|
+
*
|
|
276
|
+
* @default undefined
|
|
277
|
+
*/
|
|
278
|
+
justify?: "start" | "end" | "center" | "between" | "around" | "evenly";
|
|
279
|
+
/**
|
|
280
|
+
* How to align items along the cross axis.
|
|
281
|
+
* - "start": Items are aligned at the start
|
|
282
|
+
* - "end": Items are aligned at the end
|
|
283
|
+
* - "center": Items are centered
|
|
284
|
+
* - "stretch": Items are stretched to fill the container
|
|
285
|
+
* - "baseline": Items are aligned at their baselines
|
|
286
|
+
*
|
|
287
|
+
* @default undefined
|
|
288
|
+
*/
|
|
289
|
+
align?: "start" | "end" | "center" | "stretch" | "baseline";
|
|
290
|
+
}
|
|
291
|
+
declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
|
|
292
|
+
|
|
293
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
294
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
295
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
296
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
297
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
298
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
299
|
+
declare const DialogHeader: {
|
|
300
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
301
|
+
displayName: string;
|
|
302
|
+
};
|
|
303
|
+
declare const DialogFooter: {
|
|
304
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
305
|
+
displayName: string;
|
|
306
|
+
};
|
|
307
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
308
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
309
|
+
|
|
310
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Card is a flexible container component that can be used to group related content and actions.
|
|
314
|
+
* It provides a consistent visual style with a subtle border, shadow, and rounded corners.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```tsx
|
|
318
|
+
* // Basic card
|
|
319
|
+
* <Card>
|
|
320
|
+
* <CardHeader>
|
|
321
|
+
* <CardTitle>Card Title</CardTitle>
|
|
322
|
+
* <CardDescription>Card Description</CardDescription>
|
|
323
|
+
* </CardHeader>
|
|
324
|
+
* <CardContent>
|
|
325
|
+
* <p>Card content goes here.</p>
|
|
326
|
+
* </CardContent>
|
|
327
|
+
* <CardFooter>
|
|
328
|
+
* <Button>Action</Button>
|
|
329
|
+
* </CardFooter>
|
|
330
|
+
* </Card>
|
|
331
|
+
*
|
|
332
|
+
* // Card with custom styling
|
|
333
|
+
* <Card className="bg-primary text-primary-foreground">
|
|
334
|
+
* <CardHeader>
|
|
335
|
+
* <CardTitle>Custom Styled Card</CardTitle>
|
|
336
|
+
* </CardHeader>
|
|
337
|
+
* <CardContent>
|
|
338
|
+
* <p>This card has custom background and text colors.</p>
|
|
339
|
+
* </CardContent>
|
|
340
|
+
* </Card>
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The main card container component.
|
|
346
|
+
* Provides the base styling for the card including border, shadow, and rounded corners.
|
|
347
|
+
*/
|
|
348
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
349
|
+
/**
|
|
350
|
+
* Header section of the card.
|
|
351
|
+
* Typically contains the card title and description.
|
|
352
|
+
* Includes padding and spacing for consistent layout.
|
|
353
|
+
*/
|
|
354
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
355
|
+
/**
|
|
356
|
+
* Title component for the card.
|
|
357
|
+
* Should be used within CardHeader.
|
|
358
|
+
* Provides consistent typography styling for card titles.
|
|
359
|
+
*/
|
|
360
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
361
|
+
/**
|
|
362
|
+
* Description component for the card.
|
|
363
|
+
* Should be used within CardHeader.
|
|
364
|
+
* Provides consistent typography styling for card descriptions.
|
|
365
|
+
*/
|
|
366
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
367
|
+
/**
|
|
368
|
+
* Main content section of the card.
|
|
369
|
+
* Includes padding and removes top padding to maintain consistent spacing with the header.
|
|
370
|
+
*/
|
|
371
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
372
|
+
/**
|
|
373
|
+
* Footer section of the card.
|
|
374
|
+
* Typically contains action buttons or additional information.
|
|
375
|
+
* Includes padding and removes top padding to maintain consistent spacing with the content.
|
|
376
|
+
*/
|
|
377
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
378
|
+
|
|
379
|
+
declare const Drawer: {
|
|
380
|
+
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
381
|
+
displayName: string;
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* The trigger element that opens the drawer.
|
|
385
|
+
* Should be used with the `asChild` prop to wrap your own trigger element.
|
|
386
|
+
*/
|
|
387
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
388
|
+
/**
|
|
389
|
+
* Portal component that renders the drawer content outside the DOM hierarchy.
|
|
390
|
+
* This ensures proper stacking context and accessibility.
|
|
391
|
+
*/
|
|
392
|
+
declare const DrawerPortal: typeof vaul.Portal;
|
|
393
|
+
/**
|
|
394
|
+
* Close button component for the drawer.
|
|
395
|
+
* Should be used with the `asChild` prop to wrap your own close button.
|
|
396
|
+
*/
|
|
397
|
+
declare const DrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
398
|
+
/**
|
|
399
|
+
* Overlay component that appears behind the drawer.
|
|
400
|
+
* Provides a semi-transparent backdrop and handles click-outside behavior.
|
|
401
|
+
*/
|
|
402
|
+
declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
403
|
+
/**
|
|
404
|
+
* The main content container for the drawer.
|
|
405
|
+
* Includes the handle bar at the top and manages the slide-up animation.
|
|
406
|
+
*/
|
|
407
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
408
|
+
/**
|
|
409
|
+
* Header section of the drawer.
|
|
410
|
+
* Typically contains the title and description.
|
|
411
|
+
*/
|
|
412
|
+
declare const DrawerHeader: {
|
|
413
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
414
|
+
displayName: string;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* Footer section of the drawer.
|
|
418
|
+
* Typically contains action buttons.
|
|
419
|
+
*/
|
|
420
|
+
declare const DrawerFooter: {
|
|
421
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
422
|
+
displayName: string;
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* Title component for the drawer.
|
|
426
|
+
* Should be used within DrawerHeader.
|
|
427
|
+
*/
|
|
428
|
+
declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
429
|
+
/**
|
|
430
|
+
* Description component for the drawer.
|
|
431
|
+
* Should be used within DrawerHeader.
|
|
432
|
+
*/
|
|
433
|
+
declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
434
|
+
|
|
61
435
|
declare function cn(...inputs: ClassValue[]): string;
|
|
62
436
|
|
|
63
|
-
export { Button, buttonVariants, cn };
|
|
437
|
+
export { Box, type BoxProps, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Container, type ContainerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Input, Stack, type StackProps, TextField, buttonVariants, cn, textFieldVariants };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var f=require('react'),reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var f__namespace=/*#__PURE__*/_interopNamespace(f);var l=Object.defineProperty;var n=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var i=(r,o,e)=>o in r?l(r,o,{enumerable:true,configurable:true,writable:true,value:e}):r[o]=e,c=(r,o)=>{for(var e in o||(o={}))u.call(o,e)&&i(r,e,o[e]);if(n)for(var e of n(o))s.call(o,e)&&i(r,e,o[e]);return r};var p=(r,o)=>{var e={};for(var t in r)u.call(r,t)&&o.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&n)for(var t of n(r))o.indexOf(t)<0&&s.call(r,t)&&(e[t]=r[t]);return e};function d(...r){return tailwindMerge.twMerge(clsx.clsx(r))}var h=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),w=f__namespace.forwardRef((B,g)=>{var a=B,{className:r,variant:o,size:e,asChild:t=false}=a,m=p(a,["className","variant","size","asChild"]);return jsxRuntime.jsx(t?reactSlot.Slot:"button",c({className:d(h({variant:o,size:e,className:r})),ref:g},m))});w.displayName="Button";exports.Button=w;exports.buttonVariants=h;exports.cn=d;//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';var y=require('react'),reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime'),d=require('@radix-ui/react-dialog'),vaul=require('vaul');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var y__namespace=/*#__PURE__*/_interopNamespace(y);var d__namespace=/*#__PURE__*/_interopNamespace(d);var K=Object.defineProperty,Q=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var A=(e,t,r)=>t in e?K(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||(t={}))B.call(t,r)&&A(e,r,t[r]);if(h)for(var r of h(t))F.call(t,r)&&A(e,r,t[r]);return e},x=(e,t)=>Q(e,U(t));var n=(e,t)=>{var r={};for(var a in e)B.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&h)for(var a of h(e))t.indexOf(a)<0&&F.call(e,a)&&(r[a]=e[a]);return r};function i(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var z=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ee=y__namespace.forwardRef((E,v)=>{var H=E,{className:e,variant:t,size:r,asChild:a=false,startIcon:o,endIcon:l,loading:m=false,disabled:f,children:g}=H,D=n(H,["className","variant","size","asChild","startIcon","endIcon","loading","disabled","children"]);let w=a?reactSlot.Slot:"button";return a?jsxRuntime.jsx(w,x(s({className:i(z({variant:t,size:r,className:e})),ref:v,disabled:f||m},D),{children:g})):jsxRuntime.jsxs(w,x(s({className:i(z({variant:t,size:r,className:e})),ref:v,disabled:f||m},D),{children:[m&&jsxRuntime.jsx(lucideReact.Loader2,{className:"mr-2 h-4 w-4 animate-spin",role:"status","aria-label":"Loading"}),!m&&o&&jsxRuntime.jsx("span",{className:"mr-2",children:o}),g,!m&&l&&jsxRuntime.jsx("span",{className:"ml-2",children:l})]}))});ee.displayName="Button";var L=y__namespace.forwardRef((o,a)=>{var l=o,{className:e,type:t}=l,r=n(l,["className","type"]);return jsxRuntime.jsx("input",s({type:t,className:i("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a},r))});L.displayName="Input";var ie=classVarianceAuthority.cva("w-full",{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive"},size:{default:"h-10",sm:"h-8 text-xs",lg:"h-12 text-base"}},defaultVariants:{variant:"default",size:"default"}}),se=y__namespace.forwardRef((H,E)=>{var w=H,{className:e,variant:t,size:r,startIcon:a,endIcon:o,loading:l=false,error:m,label:f,helperText:g,disabled:D}=w,v=n(w,["className","variant","size","startIcon","endIcon","loading","error","label","helperText","disabled"]);let k=y__namespace.useId();return jsxRuntime.jsxs("div",{className:"w-full space-y-2",children:[f&&jsxRuntime.jsx("label",{htmlFor:k,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:f}),jsxRuntime.jsxs("div",{className:"relative",children:[a&&jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:a}),jsxRuntime.jsx(L,s({id:k,className:i(ie({variant:m?"error":t,size:r,className:e}),a&&"pl-9",(o||l)&&"pr-9"),ref:E,disabled:D||l},v)),(o||l)&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:l?jsxRuntime.jsx(lucideReact.Loader2,{className:"h-4 w-4 animate-spin"}):o})]}),(m||g)&&jsxRuntime.jsx("p",{className:i("text-sm",m?"text-destructive":"text-muted-foreground"),children:m||g})]})});se.displayName="TextField";var ne=y__namespace.forwardRef((m,l)=>{var f=m,{className:e,maxWidth:t="lg",disablePadding:r=false,fluid:a=false}=f,o=n(f,["className","maxWidth","disablePadding","fluid"]);return jsxRuntime.jsx("div",s({ref:l,className:i("mx-auto w-full",!r&&"px-4 sm:px-6 lg:px-8",!a&&{"max-w-screen-sm":t==="sm","max-w-screen-md":t==="md","max-w-screen-lg":t==="lg","max-w-screen-xl":t==="xl","max-w-full":t==="full"},e)},o))});ne.displayName="Container";var de=y__namespace.forwardRef((o,a)=>{var l=o,{as:e="div",className:t}=l,r=n(l,["as","className"]);return jsxRuntime.jsx(e,s({ref:a,className:i(t)},r))});de.displayName="Box";var ce=y__namespace.forwardRef((D,g)=>{var v=D,{className:e,direction:t="vertical",spacing:r="md",wrap:a=false,center:o=false,justify:l,align:m}=v,f=n(v,["className","direction","spacing","wrap","center","justify","align"]);return jsxRuntime.jsx("div",s({ref:g,className:i("flex",t==="vertical"?"flex-col":"flex-row",{"gap-0":r==="none","gap-1":r==="xs","gap-2":r==="sm","gap-4":r==="md","gap-6":r==="lg","gap-8":r==="xl"},a&&"flex-wrap",o&&"items-center justify-center",l&&{"justify-start":l==="start","justify-end":l==="end","justify-center":l==="center","justify-between":l==="between","justify-around":l==="around","justify-evenly":l==="evenly"},m&&{"items-start":m==="start","items-end":m==="end","items-center":m==="center","items-stretch":m==="stretch","items-baseline":m==="baseline"},e)},f))});ce.displayName="Stack";var xt=d__namespace.Root,yt=d__namespace.Trigger,ue=d__namespace.Portal,Rt=d__namespace.Close,G=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx(d__namespace.Overlay,s({ref:r,className:i("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e)},t))});G.displayName=d__namespace.Overlay.displayName;var ge=y__namespace.forwardRef((o,a)=>{var l=o,{className:e,children:t}=l,r=n(l,["className","children"]);return jsxRuntime.jsxs(ue,{children:[jsxRuntime.jsx(G,{}),jsxRuntime.jsxs(d__namespace.Content,x(s({ref:a,className:i("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e)},r),{children:[t,jsxRuntime.jsxs(d__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})});ge.displayName=d__namespace.Content.displayName;var ve=r=>{var a=r,{className:e}=a,t=n(a,["className"]);return jsxRuntime.jsx("div",s({className:i("flex flex-col space-y-1.5 text-center sm:text-left",e)},t))};ve.displayName="DialogHeader";var xe=r=>{var a=r,{className:e}=a,t=n(a,["className"]);return jsxRuntime.jsx("div",s({className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e)},t))};xe.displayName="DialogFooter";var ye=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx(d__namespace.Title,s({ref:r,className:i("text-lg font-semibold leading-none tracking-tight",e)},t))});ye.displayName=d__namespace.Title.displayName;var Re=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx(d__namespace.Description,s({ref:r,className:i("text-sm text-muted-foreground",e)},t))});Re.displayName=d__namespace.Description.displayName;var be=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx("div",s({ref:r,className:i("rounded-lg border bg-card text-card-foreground shadow-sm",e)},t))});be.displayName="Card";var De=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx("div",s({ref:r,className:i("flex flex-col space-y-1.5 p-6",e)},t))});De.displayName="CardHeader";var we=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx("h3",s({ref:r,className:i("text-2xl font-semibold leading-none tracking-tight",e)},t))});we.displayName="CardTitle";var Ne=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx("p",s({ref:r,className:i("text-sm text-muted-foreground",e)},t))});Ne.displayName="CardDescription";var Pe=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx("div",s({ref:r,className:i("p-6 pt-0",e)},t))});Pe.displayName="CardContent";var he=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx("div",s({ref:r,className:i("flex items-center p-6 pt-0",e)},t))});he.displayName="CardFooter";var Te=r=>{var a=r,{shouldScaleBackground:e=true}=a,t=n(a,["shouldScaleBackground"]);return jsxRuntime.jsx(vaul.Drawer.Root,s({shouldScaleBackground:e},t))};Te.displayName="Drawer";var Lt=vaul.Drawer.Trigger,Ce=vaul.Drawer.Portal,Mt=vaul.Drawer.Close,J=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx(vaul.Drawer.Overlay,s({ref:r,className:i("fixed inset-0 z-50 bg-black/80",e)},t))});J.displayName=vaul.Drawer.Overlay.displayName;var He=y__namespace.forwardRef((o,a)=>{var l=o,{className:e,children:t}=l,r=n(l,["className","children"]);return jsxRuntime.jsxs(Ce,{children:[jsxRuntime.jsx(J,{}),jsxRuntime.jsxs(vaul.Drawer.Content,x(s({ref:a,className:i("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e)},r),{children:[jsxRuntime.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]}))]})});He.displayName="DrawerContent";var Le=r=>{var a=r,{className:e}=a,t=n(a,["className"]);return jsxRuntime.jsx("div",s({className:i("grid gap-1.5 p-4 text-center sm:text-left",e)},t))};Le.displayName="DrawerHeader";var Me=r=>{var a=r,{className:e}=a,t=n(a,["className"]);return jsxRuntime.jsx("div",s({className:i("mt-auto flex flex-col gap-2 p-4",e)},t))};Me.displayName="DrawerFooter";var Ee=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx(vaul.Drawer.Title,s({ref:r,className:i("text-lg font-semibold leading-none tracking-tight",e)},t))});Ee.displayName=vaul.Drawer.Title.displayName;var ke=y__namespace.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsxRuntime.jsx(vaul.Drawer.Description,s({ref:r,className:i("text-sm text-muted-foreground",e)},t))});ke.displayName=vaul.Drawer.Description.displayName;exports.Box=de;exports.Button=ee;exports.Card=be;exports.CardContent=Pe;exports.CardDescription=Ne;exports.CardFooter=he;exports.CardHeader=De;exports.CardTitle=we;exports.Container=ne;exports.Dialog=xt;exports.DialogClose=Rt;exports.DialogContent=ge;exports.DialogDescription=Re;exports.DialogFooter=xe;exports.DialogHeader=ve;exports.DialogOverlay=G;exports.DialogPortal=ue;exports.DialogTitle=ye;exports.DialogTrigger=yt;exports.Drawer=Te;exports.DrawerClose=Mt;exports.DrawerContent=He;exports.DrawerDescription=ke;exports.DrawerFooter=Me;exports.DrawerHeader=Le;exports.DrawerOverlay=J;exports.DrawerPortal=Ce;exports.DrawerTitle=Ee;exports.DrawerTrigger=Lt;exports.Input=L;exports.Stack=ce;exports.TextField=se;exports.buttonVariants=z;exports.cn=i;exports.textFieldVariants=ie;//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/atoms/button/button.tsx","../src/utils/cn.ts"],"names":["cn","inputs","twMerge","clsx","buttonVariants","cva","Button","f","_a","ref","_b","className","variant","size","asChild","props","__objRest","jsx","Slot","__spreadValues"],"mappings":"olBAAA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,qBAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,SAAA,CAAA,cAAA,CAAA,CAAA,CAAA,MAAA,CAAA,SAAA,CAAA,oBAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAA,IAAA,CAAA,YAAA,CAAA,IAAA,CAAA,QAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,IAAA,IAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,IAAA,IAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA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,CACF,CACF,CAAA,CAyBMC,CAAe,CAAAC,YAAA,CAAA,UAAA,CACnB,CAACC,CAAAA,CAAyDC,CAAQ,GAAA,CAAjE,IAAAC,CAAAA,CAAAF,CAAE,CAAA,CAAA,SAAA,CAAAG,CAAW,CAAA,OAAA,CAAAC,CAAS,CAAA,IAAA,CAAAC,CAAM,CAAA,OAAA,CAAAC,CAAU,CAAA,KAlEzC,CAkEGJ,CAAAA,CAAAA,CAAgDK,EAAAC,CAAhDN,CAAAA,CAAAA,CAAgD,CAA9C,WAAA,CAAW,SAAS,CAAA,MAAA,CAAM,SAE3B,CAAA,CAAA,CAAA,OACEO,cAFWH,CAAAA,CAAAA,CAAUI,cAAO,CAAA,QAAA,CAE3BC,CAAA,CAAA,CAAK,SAAWnB,CAAAA,CAAAA,CAAGI,EAAe,CAAE,OAAA,CAAAQ,CAAS,CAAA,IAAA,CAAAC,CAAM,CAAA,SAAA,CAAAF,CAAU,CAAC,CAAC,CAAA,CAAG,GAAKF,CAAAA,CAAAA,CAAAA,CAASM,CAAO,CAAA,CAE5F,CACF,EACAT,EAAO,WAAc,CAAA,QAAA","file":"index.js","sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { ButtonProps } from \"./button.types\"\n\n/**\n * Button variant styles using class-variance-authority.\n * Defines the visual styles for different button variants and sizes.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">Click me</Button>\n * ```\n */\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\"\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n)\n\n/**\n * A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.\n * Built on top of Radix UI's Slot primitive for maximum flexibility.\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Destructive button with small size\n * <Button variant=\"destructive\" size=\"sm\">Delete</Button>\n *\n * // As a link\n * <Button variant=\"link\" asChild>\n * <a href=\"/about\">About</a>\n * </Button>\n * ```\n *\n * @param {ButtonProps} props - The component props\n * @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref\n * @returns {JSX.Element} A button element\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/atoms/button/button.tsx","../src/utils/cn.ts","../src/components/atoms/input/input.tsx","../src/components/atoms/text-field/text-field.tsx","../src/components/atoms/container/container.tsx","../src/components/atoms/box/box.tsx","../src/components/atoms/stack/stack.tsx","../src/components/atoms/dialog/dialog.tsx","../src/components/molecules/card/card.tsx","../src/components/organisms/drawer/drawer.tsx"],"names":["cn","inputs","twMerge","clsx","buttonVariants","cva","Button","O","_a","ref","_b","className","variant","size","asChild","startIcon","endIcon","loading","disabled","children","props","__objRest","Comp","Slot","jsx","__spreadProps","__spreadValues","jsxs","Loader2","Input","S","type","textFieldVariants","TextField","C","error","label","helperText","id","Container","W","maxWidth","disablePadding","fluid","Box","X","Component","Stack","q","direction","spacing","wrap","center","justify","align","Dialog","d","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","N","DialogContent","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Card","y","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","Drawer","shouldScaleBackground","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","P","DrawerContent","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":"ouBAAA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,CAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,yBAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,qBAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,SAAA,CAAA,cAAA,CAAA,CAAA,CAAA,MAAA,CAAA,SAAA,CAAA,oBAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAA,IAAA,CAAA,YAAA,CAAA,IAAA,CAAA,QAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,IAAA,IAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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,CAAAA,WAAAA,CAAgB,YAAhBlD,CAAA,CAAA,CACC,IAAKjB,CACL,CAAA,SAAA,CAAWT,EAAG,+BAAiCW,CAAAA,CAAS,GACpDS,CACN,CAAA,CAAA,CACD,EACDkE,EAAkB,CAAA,WAAA,CAAcV,YAAgB,WAAY,CAAA,WAAA","file":"index.js","sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { ButtonProps } from \"./button.types\"\nimport { Loader2 } from \"lucide-react\"\n\n/**\n * Button variant styles using class-variance-authority.\n * Defines the visual styles for different button variants and sizes.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">Click me</Button>\n * ```\n */\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\"\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n)\n\n/**\n * A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.\n * Built on top of Radix UI's Slot primitive for maximum flexibility.\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Destructive button with small size\n * <Button variant=\"destructive\" size=\"sm\">Delete</Button>\n *\n * // As a link\n * <Button variant=\"link\" asChild>\n * <a href=\"/about\">About</a>\n * </Button>\n *\n * // With icons\n * <Button startIcon={<Icon />}>With Start Icon</Button>\n * <Button endIcon={<Icon />}>With End Icon</Button>\n *\n * // Loading state\n * <Button loading>Loading</Button>\n * ```\n *\n * @param {ButtonProps} props - The component props\n * @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref\n * @returns {JSX.Element} A button element\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n startIcon,\n endIcon,\n loading = false,\n disabled,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n\n if (asChild) {\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={disabled || loading}\n {...props}\n >\n {children}\n </Comp>\n )\n }\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={disabled || loading}\n {...props}\n >\n {loading && (\n <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" role=\"status\" aria-label=\"Loading\" />\n )}\n {!loading && startIcon && <span className=\"mr-2\">{startIcon}</span>}\n {children}\n {!loading && endIcon && <span className=\"ml-2\">{endIcon}</span>}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/utils/cn\"\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","import * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { TextFieldProps } from \"./text-field.types\"\nimport { Loader2 } from \"lucide-react\"\nimport { Input } from \"../input\"\n\n/**\n * Text field variant styles using class-variance-authority.\n * Defines the visual styles for different text field variants and sizes.\n */\nconst textFieldVariants = cva(\"w-full\", {\n variants: {\n variant: {\n default: \"\",\n error: \"border-destructive focus-visible:ring-destructive\"\n },\n size: {\n default: \"h-10\",\n sm: \"h-8 text-xs\",\n lg: \"h-12 text-base\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n})\n\n/**\n * A versatile text field component that supports multiple variants, sizes, and icons.\n * Built on top of shadcn/ui's Input component.\n *\n * @component\n * @example\n * ```tsx\n * // Default text field\n * <TextField placeholder=\"Enter text\" />\n *\n * // With icons\n * <TextField startIcon={<SearchIcon />} placeholder=\"Search...\" />\n * <TextField endIcon={<CalendarIcon />} placeholder=\"Select date\" />\n *\n * // With loading state\n * <TextField loading placeholder=\"Loading...\" />\n *\n * // With error\n * <TextField error=\"Invalid input\" placeholder=\"Enter text\" />\n * ```\n */\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n variant,\n size,\n startIcon,\n endIcon,\n loading = false,\n error,\n label,\n helperText,\n disabled,\n ...props\n },\n ref\n ) => {\n const id = React.useId()\n\n return (\n <div className=\"w-full space-y-2\">\n {label && (\n <label\n htmlFor={id}\n className=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n >\n {label}\n </label>\n )}\n <div className=\"relative\">\n {startIcon && (\n <div className=\"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground\">\n {startIcon}\n </div>\n )}\n <Input\n id={id}\n className={cn(\n textFieldVariants({ variant: error ? \"error\" : variant, size, className }),\n startIcon && \"pl-9\",\n (endIcon || loading) && \"pr-9\"\n )}\n ref={ref}\n disabled={disabled || loading}\n {...props}\n />\n {(endIcon || loading) && (\n <div className=\"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground\">\n {loading ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : endIcon}\n </div>\n )}\n </div>\n {(error || helperText) && (\n <p className={cn(\"text-sm\", error ? \"text-destructive\" : \"text-muted-foreground\")}>\n {error || helperText}\n </p>\n )}\n </div>\n )\n }\n)\n\nTextField.displayName = \"TextField\"\n\nexport { TextField, textFieldVariants }\n","/**\n * Container is a layout component that provides a centered, max-width wrapper for content.\n * It's designed to create consistent horizontal padding and maximum widths across different screen sizes.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Container>\n * <h1>Page Title</h1>\n * <p>Content goes here...</p>\n * </Container>\n *\n * // With custom max width\n * <Container maxWidth=\"xl\">\n * <h1>Wider Content</h1>\n * </Container>\n *\n * // Fluid container (no max-width)\n * <Container fluid>\n * <h1>Full Width Content</h1>\n * </Container>\n *\n * // Without padding\n * <Container disablePadding>\n * <h1>No Padding Content</h1>\n * </Container>\n * ```\n */\nimport { cn } from \"@/utils\"\nimport * as React from \"react\"\n\nexport interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The maximum width of the container.\n * - \"sm\": 640px\n * - \"md\": 768px\n * - \"lg\": 1024px\n * - \"xl\": 1280px\n * - \"full\": 100%\n * - false: No max-width (fluid)\n *\n * @default \"lg\"\n */\n maxWidth?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\" | false\n /**\n * Whether to disable the default horizontal padding.\n * When true, removes the default padding (px-4 sm:px-6 lg:px-8).\n *\n * @default false\n */\n disablePadding?: boolean\n /**\n * Whether to make the container fluid (no max-width).\n * When true, the container will expand to fill its parent's width.\n *\n * @default false\n */\n fluid?: boolean\n}\n\nconst Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n ({ className, maxWidth = \"lg\", disablePadding = false, fluid = false, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n // Base styles\n \"mx-auto w-full\",\n // Padding\n !disablePadding && \"px-4 sm:px-6 lg:px-8\",\n // Max width\n !fluid && {\n \"max-w-screen-sm\": maxWidth === \"sm\",\n \"max-w-screen-md\": maxWidth === \"md\",\n \"max-w-screen-lg\": maxWidth === \"lg\",\n \"max-w-screen-xl\": maxWidth === \"xl\",\n \"max-w-full\": maxWidth === \"full\"\n },\n className\n )}\n {...props}\n />\n )\n }\n)\n\nContainer.displayName = \"Container\"\n\nexport { Container }\n","/**\n * Box is a fundamental layout component that serves as a building block for other components.\n * It's a polymorphic component that can render as different HTML elements while maintaining\n * consistent styling and behavior.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Box>Content</Box>\n *\n * // As a different element\n * <Box as=\"section\">Section content</Box>\n *\n * // With custom className\n * <Box className=\"bg-primary text-white p-4\">Styled content</Box>\n * ```\n */\nimport * as React from \"react\"\nimport { cn } from \"@/utils\"\n\ntype BoxComponent =\n | \"div\"\n | \"span\"\n | \"section\"\n | \"article\"\n | \"main\"\n | \"aside\"\n | \"header\"\n | \"footer\"\n | \"nav\"\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The HTML element to render the Box as.\n * This allows for semantic HTML while maintaining consistent styling.\n *\n * @default \"div\"\n */\n as?: BoxComponent\n}\n\nconst Box = React.forwardRef<HTMLDivElement, BoxProps>(\n ({ as: Component = \"div\", className, ...props }, ref) => {\n return <Component ref={ref} className={cn(className)} {...props} />\n }\n)\n\nBox.displayName = \"Box\"\n\nexport { Box }\n","/**\n * Stack is a layout component that arranges its children in a vertical or horizontal stack\n * with consistent spacing between items. It's built on top of Flexbox and provides\n * a simple way to create consistent layouts.\n *\n * @example\n * ```tsx\n * // Basic vertical stack\n * <Stack>\n * <div>Item 1</div>\n * <div>Item 2</div>\n * <div>Item 3</div>\n * </Stack>\n *\n * // Horizontal stack with custom spacing\n * <Stack direction=\"horizontal\" spacing=\"lg\">\n * <div>Item 1</div>\n * <div>Item 2</div>\n * </Stack>\n *\n * // Centered stack with wrapping\n * <Stack direction=\"horizontal\" center wrap>\n * <div>Item 1</div>\n * <div>Item 2</div>\n * <div>Item 3</div>\n * </Stack>\n *\n * // Stack with custom alignment\n * <Stack align=\"center\" justify=\"between\">\n * <div>Left</div>\n * <div>Center</div>\n * <div>Right</div>\n * </Stack>\n * ```\n */\nimport * as React from \"react\"\nimport { cn } from \"@/utils\"\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The direction in which to stack the items.\n * - \"vertical\": Items are stacked top to bottom\n * - \"horizontal\": Items are stacked left to right\n *\n * @default \"vertical\"\n */\n direction?: \"vertical\" | \"horizontal\"\n /**\n * The spacing between items in the stack.\n * - \"none\": 0px\n * - \"xs\": 0.25rem (4px)\n * - \"sm\": 0.5rem (8px)\n * - \"md\": 1rem (16px)\n * - \"lg\": 1.5rem (24px)\n * - \"xl\": 2rem (32px)\n *\n * @default \"md\"\n */\n spacing?: \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n /**\n * Whether to allow items to wrap to the next line when they don't fit.\n * Only applies to horizontal stacks.\n *\n * @default false\n */\n wrap?: boolean\n /**\n * Whether to center items both horizontally and vertically.\n * This is a shorthand for setting both align and justify to \"center\".\n *\n * @default false\n */\n center?: boolean\n /**\n * How to justify items along the main axis.\n * - \"start\": Items are packed toward the start\n * - \"end\": Items are packed toward the end\n * - \"center\": Items are centered\n * - \"between\": Items are evenly distributed with first item at start and last at end\n * - \"around\": Items are evenly distributed with equal space around them\n * - \"evenly\": Items are distributed so that the spacing between any two items is equal\n *\n * @default undefined\n */\n justify?: \"start\" | \"end\" | \"center\" | \"between\" | \"around\" | \"evenly\"\n /**\n * How to align items along the cross axis.\n * - \"start\": Items are aligned at the start\n * - \"end\": Items are aligned at the end\n * - \"center\": Items are centered\n * - \"stretch\": Items are stretched to fill the container\n * - \"baseline\": Items are aligned at their baselines\n *\n * @default undefined\n */\n align?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"baseline\"\n}\n\nconst Stack = React.forwardRef<HTMLDivElement, StackProps>(\n (\n {\n className,\n direction = \"vertical\",\n spacing = \"md\",\n wrap = false,\n center = false,\n justify,\n align,\n ...props\n },\n ref\n ) => {\n return (\n <div\n ref={ref}\n className={cn(\n // Base styles\n \"flex\",\n // Direction\n direction === \"vertical\" ? \"flex-col\" : \"flex-row\",\n // Spacing\n {\n \"gap-0\": spacing === \"none\",\n \"gap-1\": spacing === \"xs\",\n \"gap-2\": spacing === \"sm\",\n \"gap-4\": spacing === \"md\",\n \"gap-6\": spacing === \"lg\",\n \"gap-8\": spacing === \"xl\"\n },\n // Wrap\n wrap && \"flex-wrap\",\n // Center\n center && \"items-center justify-center\",\n // Justify\n justify && {\n \"justify-start\": justify === \"start\",\n \"justify-end\": justify === \"end\",\n \"justify-center\": justify === \"center\",\n \"justify-between\": justify === \"between\",\n \"justify-around\": justify === \"around\",\n \"justify-evenly\": justify === \"evenly\"\n },\n // Align\n align && {\n \"items-start\": align === \"start\",\n \"items-end\": align === \"end\",\n \"items-center\": align === \"center\",\n \"items-stretch\": align === \"stretch\",\n \"items-baseline\": align === \"baseline\"\n },\n className\n )}\n {...props}\n />\n )\n }\n)\n\nStack.displayName = \"Stack\"\n\nexport { Stack }\n","import * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\nimport { cn } from \"@/utils\"\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription\n}\n","/**\n * Card is a flexible container component that can be used to group related content and actions.\n * It provides a consistent visual style with a subtle border, shadow, and rounded corners.\n *\n * @example\n * ```tsx\n * // Basic card\n * <Card>\n * <CardHeader>\n * <CardTitle>Card Title</CardTitle>\n * <CardDescription>Card Description</CardDescription>\n * </CardHeader>\n * <CardContent>\n * <p>Card content goes here.</p>\n * </CardContent>\n * <CardFooter>\n * <Button>Action</Button>\n * </CardFooter>\n * </Card>\n *\n * // Card with custom styling\n * <Card className=\"bg-primary text-primary-foreground\">\n * <CardHeader>\n * <CardTitle>Custom Styled Card</CardTitle>\n * </CardHeader>\n * <CardContent>\n * <p>This card has custom background and text colors.</p>\n * </CardContent>\n * </Card>\n * ```\n */\nimport * as React from \"react\"\nimport { cn } from \"@/utils\"\n\n/**\n * The main card container component.\n * Provides the base styling for the card including border, shadow, and rounded corners.\n */\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"rounded-lg border bg-card text-card-foreground shadow-sm\", className)}\n {...props}\n />\n )\n)\nCard.displayName = \"Card\"\n\n/**\n * Header section of the card.\n * Typically contains the card title and description.\n * Includes padding and spacing for consistent layout.\n */\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex flex-col space-y-1.5 p-6\", className)} {...props} />\n )\n)\nCardHeader.displayName = \"CardHeader\"\n\n/**\n * Title component for the card.\n * Should be used within CardHeader.\n * Provides consistent typography styling for card titles.\n */\nconst CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"text-2xl font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n )\n)\nCardTitle.displayName = \"CardTitle\"\n\n/**\n * Description component for the card.\n * Should be used within CardHeader.\n * Provides consistent typography styling for card descriptions.\n */\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n))\nCardDescription.displayName = \"CardDescription\"\n\n/**\n * Main content section of the card.\n * Includes padding and removes top padding to maintain consistent spacing with the header.\n */\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n )\n)\nCardContent.displayName = \"CardContent\"\n\n/**\n * Footer section of the card.\n * Typically contains action buttons or additional information.\n * Includes padding and removes top padding to maintain consistent spacing with the content.\n */\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center p-6 pt-0\", className)} {...props} />\n )\n)\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n","/**\n * Drawer is a slide-out panel component that appears from the bottom of the screen.\n * It's built on top of Vaul and provides a smooth, accessible drawer experience.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Drawer>\n * <DrawerTrigger>\n * <Button>Open Drawer</Button>\n * </DrawerTrigger>\n * <DrawerContent>\n * <DrawerHeader>\n * <DrawerTitle>Title</DrawerTitle>\n * <DrawerDescription>Description</DrawerDescription>\n * </DrawerHeader>\n * <div>Content</div>\n * <DrawerFooter>\n * <Button>Save</Button>\n * </DrawerFooter>\n * </DrawerContent>\n * </Drawer>\n * ```\n */\nimport { cn } from \"@/utils\"\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\n)\nDrawer.displayName = \"Drawer\"\n\n/**\n * The trigger element that opens the drawer.\n * Should be used with the `asChild` prop to wrap your own trigger element.\n */\nconst DrawerTrigger = DrawerPrimitive.Trigger\n\n/**\n * Portal component that renders the drawer content outside the DOM hierarchy.\n * This ensures proper stacking context and accessibility.\n */\nconst DrawerPortal = DrawerPrimitive.Portal\n\n/**\n * Close button component for the drawer.\n * Should be used with the `asChild` prop to wrap your own close button.\n */\nconst DrawerClose = DrawerPrimitive.Close\n\n/**\n * Overlay component that appears behind the drawer.\n * Provides a semi-transparent backdrop and handles click-outside behavior.\n */\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n {...props}\n />\n))\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName\n\n/**\n * The main content container for the drawer.\n * Includes the handle bar at the top and manages the slide-up animation.\n */\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background\",\n className\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n))\nDrawerContent.displayName = \"DrawerContent\"\n\n/**\n * Header section of the drawer.\n * Typically contains the title and description.\n */\nconst DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />\n)\nDrawerHeader.displayName = \"DrawerHeader\"\n\n/**\n * Footer section of the drawer.\n * Typically contains action buttons.\n */\nconst DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />\n)\nDrawerFooter.displayName = \"DrawerFooter\"\n\n/**\n * Title component for the drawer.\n * Should be used within DrawerHeader.\n */\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n))\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName\n\n/**\n * Description component for the drawer.\n * Should be used within DrawerHeader.\n */\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription\n}\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as f from'react';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx}from'react/jsx-runtime';var l=Object.defineProperty;var n=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var i=(r,o,e)=>o in r?l(r,o,{enumerable:true,configurable:true,writable:true,value:e}):r[o]=e,c=(r,o)=>{for(var e in o||(o={}))u.call(o,e)&&i(r,e,o[e]);if(n)for(var e of n(o))s.call(o,e)&&i(r,e,o[e]);return r};var p=(r,o)=>{var e={};for(var t in r)u.call(r,t)&&o.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&n)for(var t of n(r))o.indexOf(t)<0&&s.call(r,t)&&(e[t]=r[t]);return e};function d(...r){return twMerge(clsx(r))}var h=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),w=f.forwardRef((B,g)=>{var a=B,{className:r,variant:o,size:e,asChild:t=false}=a,m=p(a,["className","variant","size","asChild"]);return jsx(t?Slot:"button",c({className:d(h({variant:o,size:e,className:r})),ref:g},m))});w.displayName="Button";export{w as Button,h as buttonVariants,d as cn};//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import*as y from'react';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {Loader2,X}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';import*as d from'@radix-ui/react-dialog';import {Drawer}from'vaul';var K=Object.defineProperty,Q=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var A=(e,t,r)=>t in e?K(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||(t={}))B.call(t,r)&&A(e,r,t[r]);if(h)for(var r of h(t))F.call(t,r)&&A(e,r,t[r]);return e},x=(e,t)=>Q(e,U(t));var n=(e,t)=>{var r={};for(var a in e)B.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&h)for(var a of h(e))t.indexOf(a)<0&&F.call(e,a)&&(r[a]=e[a]);return r};function i(...e){return twMerge(clsx(e))}var z=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ee=y.forwardRef((E,v)=>{var H=E,{className:e,variant:t,size:r,asChild:a=false,startIcon:o,endIcon:l,loading:m=false,disabled:f,children:g}=H,D=n(H,["className","variant","size","asChild","startIcon","endIcon","loading","disabled","children"]);let w=a?Slot:"button";return a?jsx(w,x(s({className:i(z({variant:t,size:r,className:e})),ref:v,disabled:f||m},D),{children:g})):jsxs(w,x(s({className:i(z({variant:t,size:r,className:e})),ref:v,disabled:f||m},D),{children:[m&&jsx(Loader2,{className:"mr-2 h-4 w-4 animate-spin",role:"status","aria-label":"Loading"}),!m&&o&&jsx("span",{className:"mr-2",children:o}),g,!m&&l&&jsx("span",{className:"ml-2",children:l})]}))});ee.displayName="Button";var L=y.forwardRef((o,a)=>{var l=o,{className:e,type:t}=l,r=n(l,["className","type"]);return jsx("input",s({type:t,className:i("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a},r))});L.displayName="Input";var ie=cva("w-full",{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive"},size:{default:"h-10",sm:"h-8 text-xs",lg:"h-12 text-base"}},defaultVariants:{variant:"default",size:"default"}}),se=y.forwardRef((H,E)=>{var w=H,{className:e,variant:t,size:r,startIcon:a,endIcon:o,loading:l=false,error:m,label:f,helperText:g,disabled:D}=w,v=n(w,["className","variant","size","startIcon","endIcon","loading","error","label","helperText","disabled"]);let k=y.useId();return jsxs("div",{className:"w-full space-y-2",children:[f&&jsx("label",{htmlFor:k,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:f}),jsxs("div",{className:"relative",children:[a&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:a}),jsx(L,s({id:k,className:i(ie({variant:m?"error":t,size:r,className:e}),a&&"pl-9",(o||l)&&"pr-9"),ref:E,disabled:D||l},v)),(o||l)&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:l?jsx(Loader2,{className:"h-4 w-4 animate-spin"}):o})]}),(m||g)&&jsx("p",{className:i("text-sm",m?"text-destructive":"text-muted-foreground"),children:m||g})]})});se.displayName="TextField";var ne=y.forwardRef((m,l)=>{var f=m,{className:e,maxWidth:t="lg",disablePadding:r=false,fluid:a=false}=f,o=n(f,["className","maxWidth","disablePadding","fluid"]);return jsx("div",s({ref:l,className:i("mx-auto w-full",!r&&"px-4 sm:px-6 lg:px-8",!a&&{"max-w-screen-sm":t==="sm","max-w-screen-md":t==="md","max-w-screen-lg":t==="lg","max-w-screen-xl":t==="xl","max-w-full":t==="full"},e)},o))});ne.displayName="Container";var de=y.forwardRef((o,a)=>{var l=o,{as:e="div",className:t}=l,r=n(l,["as","className"]);return jsx(e,s({ref:a,className:i(t)},r))});de.displayName="Box";var ce=y.forwardRef((D,g)=>{var v=D,{className:e,direction:t="vertical",spacing:r="md",wrap:a=false,center:o=false,justify:l,align:m}=v,f=n(v,["className","direction","spacing","wrap","center","justify","align"]);return jsx("div",s({ref:g,className:i("flex",t==="vertical"?"flex-col":"flex-row",{"gap-0":r==="none","gap-1":r==="xs","gap-2":r==="sm","gap-4":r==="md","gap-6":r==="lg","gap-8":r==="xl"},a&&"flex-wrap",o&&"items-center justify-center",l&&{"justify-start":l==="start","justify-end":l==="end","justify-center":l==="center","justify-between":l==="between","justify-around":l==="around","justify-evenly":l==="evenly"},m&&{"items-start":m==="start","items-end":m==="end","items-center":m==="center","items-stretch":m==="stretch","items-baseline":m==="baseline"},e)},f))});ce.displayName="Stack";var xt=d.Root,yt=d.Trigger,ue=d.Portal,Rt=d.Close,G=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx(d.Overlay,s({ref:r,className:i("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e)},t))});G.displayName=d.Overlay.displayName;var ge=y.forwardRef((o,a)=>{var l=o,{className:e,children:t}=l,r=n(l,["className","children"]);return jsxs(ue,{children:[jsx(G,{}),jsxs(d.Content,x(s({ref:a,className:i("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e)},r),{children:[t,jsxs(d.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]}))]})});ge.displayName=d.Content.displayName;var ve=r=>{var a=r,{className:e}=a,t=n(a,["className"]);return jsx("div",s({className:i("flex flex-col space-y-1.5 text-center sm:text-left",e)},t))};ve.displayName="DialogHeader";var xe=r=>{var a=r,{className:e}=a,t=n(a,["className"]);return jsx("div",s({className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e)},t))};xe.displayName="DialogFooter";var ye=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx(d.Title,s({ref:r,className:i("text-lg font-semibold leading-none tracking-tight",e)},t))});ye.displayName=d.Title.displayName;var Re=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx(d.Description,s({ref:r,className:i("text-sm text-muted-foreground",e)},t))});Re.displayName=d.Description.displayName;var be=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx("div",s({ref:r,className:i("rounded-lg border bg-card text-card-foreground shadow-sm",e)},t))});be.displayName="Card";var De=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx("div",s({ref:r,className:i("flex flex-col space-y-1.5 p-6",e)},t))});De.displayName="CardHeader";var we=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx("h3",s({ref:r,className:i("text-2xl font-semibold leading-none tracking-tight",e)},t))});we.displayName="CardTitle";var Ne=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx("p",s({ref:r,className:i("text-sm text-muted-foreground",e)},t))});Ne.displayName="CardDescription";var Pe=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx("div",s({ref:r,className:i("p-6 pt-0",e)},t))});Pe.displayName="CardContent";var he=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx("div",s({ref:r,className:i("flex items-center p-6 pt-0",e)},t))});he.displayName="CardFooter";var Te=r=>{var a=r,{shouldScaleBackground:e=true}=a,t=n(a,["shouldScaleBackground"]);return jsx(Drawer.Root,s({shouldScaleBackground:e},t))};Te.displayName="Drawer";var Lt=Drawer.Trigger,Ce=Drawer.Portal,Mt=Drawer.Close,J=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx(Drawer.Overlay,s({ref:r,className:i("fixed inset-0 z-50 bg-black/80",e)},t))});J.displayName=Drawer.Overlay.displayName;var He=y.forwardRef((o,a)=>{var l=o,{className:e,children:t}=l,r=n(l,["className","children"]);return jsxs(Ce,{children:[jsx(J,{}),jsxs(Drawer.Content,x(s({ref:a,className:i("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e)},r),{children:[jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]}))]})});He.displayName="DrawerContent";var Le=r=>{var a=r,{className:e}=a,t=n(a,["className"]);return jsx("div",s({className:i("grid gap-1.5 p-4 text-center sm:text-left",e)},t))};Le.displayName="DrawerHeader";var Me=r=>{var a=r,{className:e}=a,t=n(a,["className"]);return jsx("div",s({className:i("mt-auto flex flex-col gap-2 p-4",e)},t))};Me.displayName="DrawerFooter";var Ee=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx(Drawer.Title,s({ref:r,className:i("text-lg font-semibold leading-none tracking-tight",e)},t))});Ee.displayName=Drawer.Title.displayName;var ke=y.forwardRef((a,r)=>{var o=a,{className:e}=o,t=n(o,["className"]);return jsx(Drawer.Description,s({ref:r,className:i("text-sm text-muted-foreground",e)},t))});ke.displayName=Drawer.Description.displayName;export{de as Box,ee as Button,be as Card,Pe as CardContent,Ne as CardDescription,he as CardFooter,De as CardHeader,we as CardTitle,ne as Container,xt as Dialog,Rt as DialogClose,ge as DialogContent,Re as DialogDescription,xe as DialogFooter,ve as DialogHeader,G as DialogOverlay,ue as DialogPortal,ye as DialogTitle,yt as DialogTrigger,Te as Drawer,Mt as DrawerClose,He as DrawerContent,ke as DrawerDescription,Me as DrawerFooter,Le as DrawerHeader,J as DrawerOverlay,Ce as DrawerPortal,Ee as DrawerTitle,Lt as DrawerTrigger,L as Input,ce as Stack,se as TextField,z as buttonVariants,i as cn,ie as textFieldVariants};//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/atoms/button/button.tsx","../src/utils/cn.ts"],"names":["cn","inputs","twMerge","clsx","buttonVariants","cva","Button","_a","ref","_b","className","variant","size","asChild","props","__objRest","js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H,CAAAA,CAAAA,CAAUI,IAAO,CAAA,QAAA,CAE3BC,CAAA,CAAA,CAAK,SAAWlB,CAAAA,CAAAA,CAAGI,EAAe,CAAE,OAAA,CAAAO,CAAS,CAAA,IAAA,CAAAC,CAAM,CAAA,SAAA,CAAAF,CAAU,CAAC,CAAC,CAAA,CAAG,GAAKF,CAAAA,CAAAA,CAAAA,CAASM,CAAO,CAAA,CAE5F,CACF,EACAR,EAAO,WAAc,CAAA,QAAA","file":"index.mjs","sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { ButtonProps } from \"./button.types\"\n\n/**\n * Button variant styles using class-variance-authority.\n * Defines the visual styles for different button variants and sizes.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">Click me</Button>\n * ```\n */\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\"\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n)\n\n/**\n * A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.\n * Built on top of Radix UI's Slot primitive for maximum flexibility.\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Destructive button with small size\n * <Button variant=\"destructive\" size=\"sm\">Delete</Button>\n *\n * // As a link\n * <Button variant=\"link\" asChild>\n * <a href=\"/about\">About</a>\n * </Button>\n * ```\n *\n * @param {ButtonProps} props - The component props\n * @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref\n * @returns {JSX.Element} A button element\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/atoms/button/button.tsx","../src/utils/cn.ts","../src/components/atoms/input/input.tsx","../src/components/atoms/text-field/text-field.tsx","../src/components/atoms/container/container.tsx","../src/components/atoms/box/box.tsx","../src/components/atoms/stack/stack.tsx","../src/components/atoms/dialog/dialog.tsx","../src/components/molecules/card/card.tsx","../src/components/organisms/drawer/drawer.tsx"],"names":["cn","inputs","twMerge","clsx","buttonVariants","cva","Button","O","_a","ref","_b","className","variant","size","asChild","startIcon","endIcon","loading","disabled","children","props","__objRest","Comp","Slot","jsx","__spreadProps","__spreadValues","jsxs","Loader2","Input","S","type","textFieldVariants","TextField","C","error","label","helperText","id","Container","W","maxWidth","disablePadding","fluid","Box","X","Component","Stack","q","direction","spacing","wrap","center","justify","align","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","N","DialogContent","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","Drawer","shouldScaleBackground","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","P","Drawer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G,CAAA,iCAAA,CAAmCW,CAAS,CAAOS,CAAAA,CAAAA,CAAAA,CAAO,GAE/E8D,EAAa,CAAA,WAAA,CAAc,eAMrBC,IAAAA,EAAAA,CAAoBJ,aAGxB,CAACvE,CAAAA,CAAyBC,IAAK,CAA9B,IAAAC,EAAAF,CAAE,CAAA,CAAA,SAAA,CAAAG,CAxHL,CAwHGD,CAAAA,CAAAA,CAAgBU,EAAAC,CAAhBX,CAAAA,CAAAA,CAAgB,CAAd,WACH,CAAA,CAAA,CAAA,OAAAc,IAACkD,MAAgB,CAAA,KAAA,CAAhBhD,EAAA,CACC,GAAA,CAAKjB,EACL,SAAWT,CAAAA,CAAAA,CAAG,oDAAqDW,CAAS,CAAA,CAAA,CACxES,EACN,CACD,CAAA,EACD+D,GAAY,WAAcT,CAAAA,MAAAA,CAAgB,MAAM,WAMhD,CAAA,IAAMU,GAA0BL,CAG9B,CAAA,UAAA,CAAA,CAACvE,EAAyBC,CAAK,GAAA,CAA9B,IAAAC,CAAAF,CAAAA,CAAAA,CAAE,WAAAG,CAxIL,CAAA,CAwIGD,EAAgBU,CAAAC,CAAAA,CAAAA,CAAhBX,EAAgB,CAAd,WAAA,CAAA,CAAA,CACH,OAAAc,GAACkD,CAAAA,MAAAA,CAAgB,YAAhBhD,CAAA,CAAA,CACC,IAAKjB,CACL,CAAA,SAAA,CAAWT,EAAG,+BAAiCW,CAAAA,CAAS,GACpDS,CACN,CAAA,CAAA,CACD,EACDgE,EAAkB,CAAA,WAAA,CAAcV,OAAgB,WAAY,CAAA,WAAA","file":"index.mjs","sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { ButtonProps } from \"./button.types\"\nimport { Loader2 } from \"lucide-react\"\n\n/**\n * Button variant styles using class-variance-authority.\n * Defines the visual styles for different button variants and sizes.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">Click me</Button>\n * ```\n */\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\"\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n)\n\n/**\n * A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.\n * Built on top of Radix UI's Slot primitive for maximum flexibility.\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Destructive button with small size\n * <Button variant=\"destructive\" size=\"sm\">Delete</Button>\n *\n * // As a link\n * <Button variant=\"link\" asChild>\n * <a href=\"/about\">About</a>\n * </Button>\n *\n * // With icons\n * <Button startIcon={<Icon />}>With Start Icon</Button>\n * <Button endIcon={<Icon />}>With End Icon</Button>\n *\n * // Loading state\n * <Button loading>Loading</Button>\n * ```\n *\n * @param {ButtonProps} props - The component props\n * @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref\n * @returns {JSX.Element} A button element\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n startIcon,\n endIcon,\n loading = false,\n disabled,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n\n if (asChild) {\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={disabled || loading}\n {...props}\n >\n {children}\n </Comp>\n )\n }\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={disabled || loading}\n {...props}\n >\n {loading && (\n <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" role=\"status\" aria-label=\"Loading\" />\n )}\n {!loading && startIcon && <span className=\"mr-2\">{startIcon}</span>}\n {children}\n {!loading && endIcon && <span className=\"ml-2\">{endIcon}</span>}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/utils/cn\"\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","import * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { TextFieldProps } from \"./text-field.types\"\nimport { Loader2 } from \"lucide-react\"\nimport { Input } from \"../input\"\n\n/**\n * Text field variant styles using class-variance-authority.\n * Defines the visual styles for different text field variants and sizes.\n */\nconst textFieldVariants = cva(\"w-full\", {\n variants: {\n variant: {\n default: \"\",\n error: \"border-destructive focus-visible:ring-destructive\"\n },\n size: {\n default: \"h-10\",\n sm: \"h-8 text-xs\",\n lg: \"h-12 text-base\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n})\n\n/**\n * A versatile text field component that supports multiple variants, sizes, and icons.\n * Built on top of shadcn/ui's Input component.\n *\n * @component\n * @example\n * ```tsx\n * // Default text field\n * <TextField placeholder=\"Enter text\" />\n *\n * // With icons\n * <TextField startIcon={<SearchIcon />} placeholder=\"Search...\" />\n * <TextField endIcon={<CalendarIcon />} placeholder=\"Select date\" />\n *\n * // With loading state\n * <TextField loading placeholder=\"Loading...\" />\n *\n * // With error\n * <TextField error=\"Invalid input\" placeholder=\"Enter text\" />\n * ```\n */\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n variant,\n size,\n startIcon,\n endIcon,\n loading = false,\n error,\n label,\n helperText,\n disabled,\n ...props\n },\n ref\n ) => {\n const id = React.useId()\n\n return (\n <div className=\"w-full space-y-2\">\n {label && (\n <label\n htmlFor={id}\n className=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n >\n {label}\n </label>\n )}\n <div className=\"relative\">\n {startIcon && (\n <div className=\"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground\">\n {startIcon}\n </div>\n )}\n <Input\n id={id}\n className={cn(\n textFieldVariants({ variant: error ? \"error\" : variant, size, className }),\n startIcon && \"pl-9\",\n (endIcon || loading) && \"pr-9\"\n )}\n ref={ref}\n disabled={disabled || loading}\n {...props}\n />\n {(endIcon || loading) && (\n <div className=\"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground\">\n {loading ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : endIcon}\n </div>\n )}\n </div>\n {(error || helperText) && (\n <p className={cn(\"text-sm\", error ? \"text-destructive\" : \"text-muted-foreground\")}>\n {error || helperText}\n </p>\n )}\n </div>\n )\n }\n)\n\nTextField.displayName = \"TextField\"\n\nexport { TextField, textFieldVariants }\n","/**\n * Container is a layout component that provides a centered, max-width wrapper for content.\n * It's designed to create consistent horizontal padding and maximum widths across different screen sizes.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Container>\n * <h1>Page Title</h1>\n * <p>Content goes here...</p>\n * </Container>\n *\n * // With custom max width\n * <Container maxWidth=\"xl\">\n * <h1>Wider Content</h1>\n * </Container>\n *\n * // Fluid container (no max-width)\n * <Container fluid>\n * <h1>Full Width Content</h1>\n * </Container>\n *\n * // Without padding\n * <Container disablePadding>\n * <h1>No Padding Content</h1>\n * </Container>\n * ```\n */\nimport { cn } from \"@/utils\"\nimport * as React from \"react\"\n\nexport interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The maximum width of the container.\n * - \"sm\": 640px\n * - \"md\": 768px\n * - \"lg\": 1024px\n * - \"xl\": 1280px\n * - \"full\": 100%\n * - false: No max-width (fluid)\n *\n * @default \"lg\"\n */\n maxWidth?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\" | false\n /**\n * Whether to disable the default horizontal padding.\n * When true, removes the default padding (px-4 sm:px-6 lg:px-8).\n *\n * @default false\n */\n disablePadding?: boolean\n /**\n * Whether to make the container fluid (no max-width).\n * When true, the container will expand to fill its parent's width.\n *\n * @default false\n */\n fluid?: boolean\n}\n\nconst Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n ({ className, maxWidth = \"lg\", disablePadding = false, fluid = false, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n // Base styles\n \"mx-auto w-full\",\n // Padding\n !disablePadding && \"px-4 sm:px-6 lg:px-8\",\n // Max width\n !fluid && {\n \"max-w-screen-sm\": maxWidth === \"sm\",\n \"max-w-screen-md\": maxWidth === \"md\",\n \"max-w-screen-lg\": maxWidth === \"lg\",\n \"max-w-screen-xl\": maxWidth === \"xl\",\n \"max-w-full\": maxWidth === \"full\"\n },\n className\n )}\n {...props}\n />\n )\n }\n)\n\nContainer.displayName = \"Container\"\n\nexport { Container }\n","/**\n * Box is a fundamental layout component that serves as a building block for other components.\n * It's a polymorphic component that can render as different HTML elements while maintaining\n * consistent styling and behavior.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Box>Content</Box>\n *\n * // As a different element\n * <Box as=\"section\">Section content</Box>\n *\n * // With custom className\n * <Box className=\"bg-primary text-white p-4\">Styled content</Box>\n * ```\n */\nimport * as React from \"react\"\nimport { cn } from \"@/utils\"\n\ntype BoxComponent =\n | \"div\"\n | \"span\"\n | \"section\"\n | \"article\"\n | \"main\"\n | \"aside\"\n | \"header\"\n | \"footer\"\n | \"nav\"\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The HTML element to render the Box as.\n * This allows for semantic HTML while maintaining consistent styling.\n *\n * @default \"div\"\n */\n as?: BoxComponent\n}\n\nconst Box = React.forwardRef<HTMLDivElement, BoxProps>(\n ({ as: Component = \"div\", className, ...props }, ref) => {\n return <Component ref={ref} className={cn(className)} {...props} />\n }\n)\n\nBox.displayName = \"Box\"\n\nexport { Box }\n","/**\n * Stack is a layout component that arranges its children in a vertical or horizontal stack\n * with consistent spacing between items. It's built on top of Flexbox and provides\n * a simple way to create consistent layouts.\n *\n * @example\n * ```tsx\n * // Basic vertical stack\n * <Stack>\n * <div>Item 1</div>\n * <div>Item 2</div>\n * <div>Item 3</div>\n * </Stack>\n *\n * // Horizontal stack with custom spacing\n * <Stack direction=\"horizontal\" spacing=\"lg\">\n * <div>Item 1</div>\n * <div>Item 2</div>\n * </Stack>\n *\n * // Centered stack with wrapping\n * <Stack direction=\"horizontal\" center wrap>\n * <div>Item 1</div>\n * <div>Item 2</div>\n * <div>Item 3</div>\n * </Stack>\n *\n * // Stack with custom alignment\n * <Stack align=\"center\" justify=\"between\">\n * <div>Left</div>\n * <div>Center</div>\n * <div>Right</div>\n * </Stack>\n * ```\n */\nimport * as React from \"react\"\nimport { cn } from \"@/utils\"\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The direction in which to stack the items.\n * - \"vertical\": Items are stacked top to bottom\n * - \"horizontal\": Items are stacked left to right\n *\n * @default \"vertical\"\n */\n direction?: \"vertical\" | \"horizontal\"\n /**\n * The spacing between items in the stack.\n * - \"none\": 0px\n * - \"xs\": 0.25rem (4px)\n * - \"sm\": 0.5rem (8px)\n * - \"md\": 1rem (16px)\n * - \"lg\": 1.5rem (24px)\n * - \"xl\": 2rem (32px)\n *\n * @default \"md\"\n */\n spacing?: \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n /**\n * Whether to allow items to wrap to the next line when they don't fit.\n * Only applies to horizontal stacks.\n *\n * @default false\n */\n wrap?: boolean\n /**\n * Whether to center items both horizontally and vertically.\n * This is a shorthand for setting both align and justify to \"center\".\n *\n * @default false\n */\n center?: boolean\n /**\n * How to justify items along the main axis.\n * - \"start\": Items are packed toward the start\n * - \"end\": Items are packed toward the end\n * - \"center\": Items are centered\n * - \"between\": Items are evenly distributed with first item at start and last at end\n * - \"around\": Items are evenly distributed with equal space around them\n * - \"evenly\": Items are distributed so that the spacing between any two items is equal\n *\n * @default undefined\n */\n justify?: \"start\" | \"end\" | \"center\" | \"between\" | \"around\" | \"evenly\"\n /**\n * How to align items along the cross axis.\n * - \"start\": Items are aligned at the start\n * - \"end\": Items are aligned at the end\n * - \"center\": Items are centered\n * - \"stretch\": Items are stretched to fill the container\n * - \"baseline\": Items are aligned at their baselines\n *\n * @default undefined\n */\n align?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"baseline\"\n}\n\nconst Stack = React.forwardRef<HTMLDivElement, StackProps>(\n (\n {\n className,\n direction = \"vertical\",\n spacing = \"md\",\n wrap = false,\n center = false,\n justify,\n align,\n ...props\n },\n ref\n ) => {\n return (\n <div\n ref={ref}\n className={cn(\n // Base styles\n \"flex\",\n // Direction\n direction === \"vertical\" ? \"flex-col\" : \"flex-row\",\n // Spacing\n {\n \"gap-0\": spacing === \"none\",\n \"gap-1\": spacing === \"xs\",\n \"gap-2\": spacing === \"sm\",\n \"gap-4\": spacing === \"md\",\n \"gap-6\": spacing === \"lg\",\n \"gap-8\": spacing === \"xl\"\n },\n // Wrap\n wrap && \"flex-wrap\",\n // Center\n center && \"items-center justify-center\",\n // Justify\n justify && {\n \"justify-start\": justify === \"start\",\n \"justify-end\": justify === \"end\",\n \"justify-center\": justify === \"center\",\n \"justify-between\": justify === \"between\",\n \"justify-around\": justify === \"around\",\n \"justify-evenly\": justify === \"evenly\"\n },\n // Align\n align && {\n \"items-start\": align === \"start\",\n \"items-end\": align === \"end\",\n \"items-center\": align === \"center\",\n \"items-stretch\": align === \"stretch\",\n \"items-baseline\": align === \"baseline\"\n },\n className\n )}\n {...props}\n />\n )\n }\n)\n\nStack.displayName = \"Stack\"\n\nexport { Stack }\n","import * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\nimport { cn } from \"@/utils\"\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription\n}\n","/**\n * Card is a flexible container component that can be used to group related content and actions.\n * It provides a consistent visual style with a subtle border, shadow, and rounded corners.\n *\n * @example\n * ```tsx\n * // Basic card\n * <Card>\n * <CardHeader>\n * <CardTitle>Card Title</CardTitle>\n * <CardDescription>Card Description</CardDescription>\n * </CardHeader>\n * <CardContent>\n * <p>Card content goes here.</p>\n * </CardContent>\n * <CardFooter>\n * <Button>Action</Button>\n * </CardFooter>\n * </Card>\n *\n * // Card with custom styling\n * <Card className=\"bg-primary text-primary-foreground\">\n * <CardHeader>\n * <CardTitle>Custom Styled Card</CardTitle>\n * </CardHeader>\n * <CardContent>\n * <p>This card has custom background and text colors.</p>\n * </CardContent>\n * </Card>\n * ```\n */\nimport * as React from \"react\"\nimport { cn } from \"@/utils\"\n\n/**\n * The main card container component.\n * Provides the base styling for the card including border, shadow, and rounded corners.\n */\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"rounded-lg border bg-card text-card-foreground shadow-sm\", className)}\n {...props}\n />\n )\n)\nCard.displayName = \"Card\"\n\n/**\n * Header section of the card.\n * Typically contains the card title and description.\n * Includes padding and spacing for consistent layout.\n */\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex flex-col space-y-1.5 p-6\", className)} {...props} />\n )\n)\nCardHeader.displayName = \"CardHeader\"\n\n/**\n * Title component for the card.\n * Should be used within CardHeader.\n * Provides consistent typography styling for card titles.\n */\nconst CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"text-2xl font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n )\n)\nCardTitle.displayName = \"CardTitle\"\n\n/**\n * Description component for the card.\n * Should be used within CardHeader.\n * Provides consistent typography styling for card descriptions.\n */\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n))\nCardDescription.displayName = \"CardDescription\"\n\n/**\n * Main content section of the card.\n * Includes padding and removes top padding to maintain consistent spacing with the header.\n */\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n )\n)\nCardContent.displayName = \"CardContent\"\n\n/**\n * Footer section of the card.\n * Typically contains action buttons or additional information.\n * Includes padding and removes top padding to maintain consistent spacing with the content.\n */\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center p-6 pt-0\", className)} {...props} />\n )\n)\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n","/**\n * Drawer is a slide-out panel component that appears from the bottom of the screen.\n * It's built on top of Vaul and provides a smooth, accessible drawer experience.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Drawer>\n * <DrawerTrigger>\n * <Button>Open Drawer</Button>\n * </DrawerTrigger>\n * <DrawerContent>\n * <DrawerHeader>\n * <DrawerTitle>Title</DrawerTitle>\n * <DrawerDescription>Description</DrawerDescription>\n * </DrawerHeader>\n * <div>Content</div>\n * <DrawerFooter>\n * <Button>Save</Button>\n * </DrawerFooter>\n * </DrawerContent>\n * </Drawer>\n * ```\n */\nimport { cn } from \"@/utils\"\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\n)\nDrawer.displayName = \"Drawer\"\n\n/**\n * The trigger element that opens the drawer.\n * Should be used with the `asChild` prop to wrap your own trigger element.\n */\nconst DrawerTrigger = DrawerPrimitive.Trigger\n\n/**\n * Portal component that renders the drawer content outside the DOM hierarchy.\n * This ensures proper stacking context and accessibility.\n */\nconst DrawerPortal = DrawerPrimitive.Portal\n\n/**\n * Close button component for the drawer.\n * Should be used with the `asChild` prop to wrap your own close button.\n */\nconst DrawerClose = DrawerPrimitive.Close\n\n/**\n * Overlay component that appears behind the drawer.\n * Provides a semi-transparent backdrop and handles click-outside behavior.\n */\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n {...props}\n />\n))\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName\n\n/**\n * The main content container for the drawer.\n * Includes the handle bar at the top and manages the slide-up animation.\n */\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background\",\n className\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n))\nDrawerContent.displayName = \"DrawerContent\"\n\n/**\n * Header section of the drawer.\n * Typically contains the title and description.\n */\nconst DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />\n)\nDrawerHeader.displayName = \"DrawerHeader\"\n\n/**\n * Footer section of the drawer.\n * Typically contains action buttons.\n */\nconst DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />\n)\nDrawerFooter.displayName = \"DrawerFooter\"\n\n/**\n * Title component for the drawer.\n * Should be used within DrawerHeader.\n */\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n))\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName\n\n/**\n * Description component for the drawer.\n * Should be used within DrawerHeader.\n */\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@me1a/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"test:watch": "jest --watch",
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
22
22
|
"storybook": "storybook dev -p 6006",
|
|
23
|
-
"build-storybook": "storybook build"
|
|
23
|
+
"build-storybook": "storybook build",
|
|
24
|
+
"serve-storybook": "npx serve storybook-static"
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
26
27
|
"next": "^14.1.0",
|
|
@@ -70,14 +71,16 @@
|
|
|
70
71
|
"typescript": "^5.3.3"
|
|
71
72
|
},
|
|
72
73
|
"dependencies": {
|
|
74
|
+
"@radix-ui/react-dialog": "^1.1.13",
|
|
73
75
|
"@radix-ui/react-icons": "^1.3.0",
|
|
74
76
|
"@radix-ui/react-slot": "^1.0.2",
|
|
75
|
-
"class-variance-authority": "^0.7.
|
|
76
|
-
"clsx": "^2.1.
|
|
77
|
+
"class-variance-authority": "^0.7.1",
|
|
78
|
+
"clsx": "^2.1.1",
|
|
77
79
|
"lucide-react": "^0.330.0",
|
|
78
80
|
"next-themes": "^0.2.1",
|
|
79
|
-
"tailwind-merge": "^2.
|
|
80
|
-
"tailwindcss-animate": "^1.0.7"
|
|
81
|
+
"tailwind-merge": "^2.6.0",
|
|
82
|
+
"tailwindcss-animate": "^1.0.7",
|
|
83
|
+
"vaul": "^1.1.2"
|
|
81
84
|
},
|
|
82
85
|
"publishConfig": {
|
|
83
86
|
"access": "public"
|