shru-design-system 0.0.9 → 0.1.0
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/README.md +35 -107
- package/dist/index.d.mts +55 -0
- package/dist/index.d.ts +34 -1028
- package/dist/index.js +241 -7839
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +364 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +36 -79
- package/apps/design-system/styles/globals.css +0 -640
- package/dist/index.cjs +0 -8452
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -1049
- package/scripts/build-css.js +0 -231
- package/scripts/copy-globals.js +0 -106
- package/scripts/copy-tokens.js +0 -62
- package/src/tokens/base.json +0 -161
- package/src/tokens/palettes.json +0 -294
- package/src/tokens/themes/animation/brisk.json +0 -14
- package/src/tokens/themes/animation/gentle.json +0 -14
- package/src/tokens/themes/color/dark.json +0 -38
- package/src/tokens/themes/color/white.json +0 -38
- package/src/tokens/themes/custom/brand.json +0 -13
- package/src/tokens/themes/custom/minimal.json +0 -16
- package/src/tokens/themes/density/comfortable.json +0 -19
- package/src/tokens/themes/density/compact.json +0 -19
- package/src/tokens/themes/shape/sharp.json +0 -11
- package/src/tokens/themes/shape/smooth.json +0 -11
- package/src/tokens/themes/typography/sans.json +0 -25
- package/src/tokens/themes/typography/serif.json +0 -25
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
8
|
+
import { XIcon, ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react';
|
|
9
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
10
|
+
|
|
11
|
+
// src/atoms/Button.tsx
|
|
12
|
+
function cn(...inputs) {
|
|
13
|
+
return twMerge(clsx(inputs));
|
|
14
|
+
}
|
|
15
|
+
var buttonVariantsConfig = {
|
|
16
|
+
variants: {
|
|
17
|
+
variant: {
|
|
18
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
19
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
20
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
21
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
22
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
23
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
27
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
28
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
29
|
+
icon: "size-9",
|
|
30
|
+
"icon-sm": "size-8",
|
|
31
|
+
"icon-lg": "size-10"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
variant: "default",
|
|
36
|
+
size: "default"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var buttonVariants = cva(
|
|
40
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
41
|
+
buttonVariantsConfig
|
|
42
|
+
);
|
|
43
|
+
var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
44
|
+
const Comp = asChild ? Slot : "button";
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
Comp,
|
|
47
|
+
{
|
|
48
|
+
ref,
|
|
49
|
+
"data-slot": "button",
|
|
50
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
51
|
+
...props
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
Button.displayName = "Button";
|
|
56
|
+
var badgeVariantsConfig = {
|
|
57
|
+
variants: {
|
|
58
|
+
variant: {
|
|
59
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
60
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
61
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
62
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
variant: "default"
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
var badgeVariants = cva(
|
|
70
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
71
|
+
badgeVariantsConfig
|
|
72
|
+
);
|
|
73
|
+
var Badge = React.forwardRef(({ className, variant, asChild = false, ...props }, ref) => {
|
|
74
|
+
const Comp = asChild ? Slot : "span";
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
Comp,
|
|
77
|
+
{
|
|
78
|
+
ref,
|
|
79
|
+
"data-slot": "badge",
|
|
80
|
+
className: cn(badgeVariants({ variant }), className),
|
|
81
|
+
...props
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
|
+
Badge.displayName = "Badge";
|
|
86
|
+
function Modal({
|
|
87
|
+
...props
|
|
88
|
+
}) {
|
|
89
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "modal", ...props });
|
|
90
|
+
}
|
|
91
|
+
function ModalTrigger({
|
|
92
|
+
...props
|
|
93
|
+
}) {
|
|
94
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "modal-trigger", ...props });
|
|
95
|
+
}
|
|
96
|
+
function ModalPortal({
|
|
97
|
+
...props
|
|
98
|
+
}) {
|
|
99
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "modal-portal", ...props });
|
|
100
|
+
}
|
|
101
|
+
function ModalClose({
|
|
102
|
+
...props
|
|
103
|
+
}) {
|
|
104
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "modal-close", ...props });
|
|
105
|
+
}
|
|
106
|
+
function ModalOverlay({
|
|
107
|
+
className,
|
|
108
|
+
...props
|
|
109
|
+
}) {
|
|
110
|
+
return /* @__PURE__ */ jsx(
|
|
111
|
+
DialogPrimitive.Overlay,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "modal-overlay",
|
|
114
|
+
className: cn(
|
|
115
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
116
|
+
className
|
|
117
|
+
),
|
|
118
|
+
...props
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function ModalContent({
|
|
123
|
+
className,
|
|
124
|
+
children,
|
|
125
|
+
showCloseButton = true,
|
|
126
|
+
...props
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ jsxs(ModalPortal, { "data-slot": "modal-portal", children: [
|
|
129
|
+
/* @__PURE__ */ jsx(ModalOverlay, {}),
|
|
130
|
+
/* @__PURE__ */ jsxs(
|
|
131
|
+
DialogPrimitive.Content,
|
|
132
|
+
{
|
|
133
|
+
"data-slot": "modal-content",
|
|
134
|
+
className: cn(
|
|
135
|
+
"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
136
|
+
className
|
|
137
|
+
),
|
|
138
|
+
...props,
|
|
139
|
+
children: [
|
|
140
|
+
children,
|
|
141
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
142
|
+
DialogPrimitive.Close,
|
|
143
|
+
{
|
|
144
|
+
"data-slot": "modal-close",
|
|
145
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
148
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
] });
|
|
156
|
+
}
|
|
157
|
+
function ModalHeader({ className, ...props }) {
|
|
158
|
+
return /* @__PURE__ */ jsx(
|
|
159
|
+
"div",
|
|
160
|
+
{
|
|
161
|
+
"data-slot": "modal-header",
|
|
162
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
163
|
+
...props
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
function ModalFooter({ className, ...props }) {
|
|
168
|
+
return /* @__PURE__ */ jsx(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
"data-slot": "modal-footer",
|
|
172
|
+
className: cn(
|
|
173
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
174
|
+
className
|
|
175
|
+
),
|
|
176
|
+
...props
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
function ModalTitle({
|
|
181
|
+
className,
|
|
182
|
+
...props
|
|
183
|
+
}) {
|
|
184
|
+
return /* @__PURE__ */ jsx(
|
|
185
|
+
DialogPrimitive.Title,
|
|
186
|
+
{
|
|
187
|
+
"data-slot": "modal-title",
|
|
188
|
+
className: cn("text-lg leading-none font-semibold", className),
|
|
189
|
+
...props
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
function ModalDescription({
|
|
194
|
+
className,
|
|
195
|
+
...props
|
|
196
|
+
}) {
|
|
197
|
+
return /* @__PURE__ */ jsx(
|
|
198
|
+
DialogPrimitive.Description,
|
|
199
|
+
{
|
|
200
|
+
"data-slot": "modal-description",
|
|
201
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
202
|
+
...props
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
function Select({
|
|
207
|
+
...props
|
|
208
|
+
}) {
|
|
209
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
210
|
+
}
|
|
211
|
+
function SelectGroup({
|
|
212
|
+
...props
|
|
213
|
+
}) {
|
|
214
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
215
|
+
}
|
|
216
|
+
function SelectValue({
|
|
217
|
+
...props
|
|
218
|
+
}) {
|
|
219
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
220
|
+
}
|
|
221
|
+
function SelectTrigger({
|
|
222
|
+
className,
|
|
223
|
+
size = "default",
|
|
224
|
+
children,
|
|
225
|
+
...props
|
|
226
|
+
}) {
|
|
227
|
+
return /* @__PURE__ */ jsxs(
|
|
228
|
+
SelectPrimitive.Trigger,
|
|
229
|
+
{
|
|
230
|
+
"data-slot": "select-trigger",
|
|
231
|
+
"data-size": size,
|
|
232
|
+
className: cn(
|
|
233
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
234
|
+
className
|
|
235
|
+
),
|
|
236
|
+
...props,
|
|
237
|
+
children: [
|
|
238
|
+
children,
|
|
239
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
function SelectContent({
|
|
245
|
+
className,
|
|
246
|
+
children,
|
|
247
|
+
position = "popper",
|
|
248
|
+
align = "center",
|
|
249
|
+
...props
|
|
250
|
+
}) {
|
|
251
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
252
|
+
SelectPrimitive.Content,
|
|
253
|
+
{
|
|
254
|
+
"data-slot": "select-content",
|
|
255
|
+
className: cn(
|
|
256
|
+
"bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
257
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
258
|
+
className
|
|
259
|
+
),
|
|
260
|
+
position,
|
|
261
|
+
align,
|
|
262
|
+
...props,
|
|
263
|
+
children: [
|
|
264
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
265
|
+
/* @__PURE__ */ jsx(
|
|
266
|
+
SelectPrimitive.Viewport,
|
|
267
|
+
{
|
|
268
|
+
className: cn(
|
|
269
|
+
"p-1",
|
|
270
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
271
|
+
),
|
|
272
|
+
children
|
|
273
|
+
}
|
|
274
|
+
),
|
|
275
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
) });
|
|
279
|
+
}
|
|
280
|
+
function SelectLabel({
|
|
281
|
+
className,
|
|
282
|
+
...props
|
|
283
|
+
}) {
|
|
284
|
+
return /* @__PURE__ */ jsx(
|
|
285
|
+
SelectPrimitive.Label,
|
|
286
|
+
{
|
|
287
|
+
"data-slot": "select-label",
|
|
288
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
289
|
+
...props
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
function SelectItem({
|
|
294
|
+
className,
|
|
295
|
+
children,
|
|
296
|
+
...props
|
|
297
|
+
}) {
|
|
298
|
+
return /* @__PURE__ */ jsxs(
|
|
299
|
+
SelectPrimitive.Item,
|
|
300
|
+
{
|
|
301
|
+
"data-slot": "select-item",
|
|
302
|
+
className: cn(
|
|
303
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
304
|
+
className
|
|
305
|
+
),
|
|
306
|
+
...props,
|
|
307
|
+
children: [
|
|
308
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
309
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
function SelectSeparator({
|
|
315
|
+
className,
|
|
316
|
+
...props
|
|
317
|
+
}) {
|
|
318
|
+
return /* @__PURE__ */ jsx(
|
|
319
|
+
SelectPrimitive.Separator,
|
|
320
|
+
{
|
|
321
|
+
"data-slot": "select-separator",
|
|
322
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
323
|
+
...props
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
function SelectScrollUpButton({
|
|
328
|
+
className,
|
|
329
|
+
...props
|
|
330
|
+
}) {
|
|
331
|
+
return /* @__PURE__ */ jsx(
|
|
332
|
+
SelectPrimitive.ScrollUpButton,
|
|
333
|
+
{
|
|
334
|
+
"data-slot": "select-scroll-up-button",
|
|
335
|
+
className: cn(
|
|
336
|
+
"flex cursor-default items-center justify-center py-1",
|
|
337
|
+
className
|
|
338
|
+
),
|
|
339
|
+
...props,
|
|
340
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
341
|
+
}
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
function SelectScrollDownButton({
|
|
345
|
+
className,
|
|
346
|
+
...props
|
|
347
|
+
}) {
|
|
348
|
+
return /* @__PURE__ */ jsx(
|
|
349
|
+
SelectPrimitive.ScrollDownButton,
|
|
350
|
+
{
|
|
351
|
+
"data-slot": "select-scroll-down-button",
|
|
352
|
+
className: cn(
|
|
353
|
+
"flex cursor-default items-center justify-center py-1",
|
|
354
|
+
className
|
|
355
|
+
),
|
|
356
|
+
...props,
|
|
357
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export { Badge, Button, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, badgeVariants, buttonVariants };
|
|
363
|
+
//# sourceMappingURL=index.mjs.map
|
|
364
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils.ts","../src/atoms/Button.tsx","../src/atoms/Badge.tsx","../src/molecules/Modal.tsx","../src/molecules/Select.tsx"],"names":["cva","React2","Slot","jsx","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A;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,2BAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,sDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAAA,GAAAA,CAAC,eAAA,EAAA,EAAgB,SAAA,EAAU,QAAA,EAAS;AAAA;AAAA,GACtC;AAEJ","file":"index.mjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\n/**\n * Utility function to merge class names with Tailwind conflict resolution\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../utils\"\n\nconst buttonVariantsConfig = {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\" as const,\n size: \"default\" as const,\n },\n} as const\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n buttonVariantsConfig\n)\n\nconst Button = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }\n>(({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n})\n\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../utils\"\n\nconst badgeVariantsConfig = {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n destructive:\n \"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\" as const,\n },\n} as const\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden\",\n badgeVariantsConfig\n)\n\nconst Badge = React.forwardRef<\n HTMLSpanElement,\n React.ComponentProps<\"span\"> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }\n>(({ className, variant, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"span\"\n\n return (\n <Comp\n ref={ref}\n data-slot=\"badge\"\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n )\n})\n\nBadge.displayName = \"Badge\"\n\nexport { Badge, badgeVariants }\n\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\nimport { Button } from \"../atoms/Button\"\n\nimport { cn } from \"../utils\"\n\nfunction Modal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"modal\" {...props} />\n}\n\nfunction ModalTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"modal-trigger\" {...props} />\n}\n\nfunction ModalPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"modal-portal\" {...props} />\n}\n\nfunction ModalClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"modal-close\" {...props} />\n}\n\nfunction ModalOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"modal-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ModalContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <ModalPortal data-slot=\"modal-portal\">\n <ModalOverlay />\n <DialogPrimitive.Content\n data-slot=\"modal-content\"\n className={cn(\n \"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"modal-close\"\n className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </ModalPortal>\n )\n}\n\nfunction ModalHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"modal-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction ModalFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"modal-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ModalTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"modal-title\"\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction ModalDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"modal-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Modal,\n ModalClose,\n ModalContent,\n ModalDescription,\n ModalFooter,\n ModalHeader,\n ModalOverlay,\n ModalPortal,\n ModalTitle,\n ModalTrigger,\n}\n\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\n\nimport { cn } from \"../utils\"\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nconst selectTriggerSizes = [\"sm\", \"default\"] as const\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: typeof selectTriggerSizes[number]\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"bg-border pointer-events-none -mx-1 my-1 h-px\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n\n"]}
|
package/package.json
CHANGED
|
@@ -1,101 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shru-design-system",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "A
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"design-system",
|
|
8
|
-
"theme-toggle",
|
|
9
|
-
"react",
|
|
10
|
-
"components",
|
|
11
|
-
"tailwind",
|
|
12
|
-
"css-variables",
|
|
13
|
-
"theming",
|
|
14
|
-
"ui-components"
|
|
15
|
-
],
|
|
16
|
-
"type": "module",
|
|
17
|
-
"main": "dist/index.cjs",
|
|
18
|
-
"module": "dist/index.js",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A React component library with atoms and molecules built on Radix UI and Tailwind CSS",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
19
7
|
"types": "dist/index.d.ts",
|
|
20
8
|
"files": [
|
|
21
|
-
"dist"
|
|
22
|
-
"src/tokens",
|
|
23
|
-
"scripts",
|
|
24
|
-
"apps/design-system/styles/globals.css"
|
|
9
|
+
"dist"
|
|
25
10
|
],
|
|
26
11
|
"exports": {
|
|
27
12
|
".": {
|
|
28
13
|
"types": "./dist/index.d.ts",
|
|
29
|
-
"import": "./dist/index.
|
|
30
|
-
"require": "./dist/index.
|
|
31
|
-
}
|
|
32
|
-
"./styles": "./apps/design-system/styles/globals.css"
|
|
14
|
+
"import": "./dist/index.mjs",
|
|
15
|
+
"require": "./dist/index.js"
|
|
16
|
+
}
|
|
33
17
|
},
|
|
34
|
-
"workspaces": [
|
|
35
|
-
"apps/*"
|
|
36
|
-
],
|
|
37
18
|
"scripts": {
|
|
38
19
|
"build": "tsup src/index.ts --dts --format esm,cjs",
|
|
39
|
-
"
|
|
40
|
-
"build:css": "node scripts/build-css.js",
|
|
41
|
-
"copy:tokens": "node scripts/copy-tokens.js",
|
|
42
|
-
"copy:globals": "node scripts/copy-globals.js",
|
|
43
|
-
"dev": "turbo run dev --parallel",
|
|
44
|
-
"lint": "turbo run lint",
|
|
45
|
-
"lint:fix": "turbo run lint:fix",
|
|
46
|
-
"preview": "turbo run preview",
|
|
47
|
-
"typecheck": "turbo run typecheck",
|
|
48
|
-
"format:write": "turbo run format:write",
|
|
49
|
-
"format:check": "turbo run format:check",
|
|
50
|
-
"check": "turbo lint typecheck format:check"
|
|
51
|
-
},
|
|
52
|
-
"bin": {
|
|
53
|
-
"copy-tokens": "./scripts/copy-tokens.js",
|
|
54
|
-
"copy-globals": "./scripts/copy-globals.js"
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
55
21
|
},
|
|
56
22
|
"peerDependencies": {
|
|
57
23
|
"react": ">=18",
|
|
58
|
-
"react-dom": ">=18"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"@manypkg/cli": "^0.20.0",
|
|
67
|
-
"@typescript-eslint/parser": "^5.59.7",
|
|
68
|
-
"autoprefixer": "^10.4.14",
|
|
69
|
-
"concurrently": "^8.0.1",
|
|
70
|
-
"cross-env": "^7.0.3",
|
|
71
|
-
"eslint": "^8.41.0",
|
|
72
|
-
"eslint-config-next": "13.3.0",
|
|
73
|
-
"eslint-config-prettier": "^8.8.0",
|
|
74
|
-
"eslint-config-turbo": "^1.9.9",
|
|
75
|
-
"eslint-plugin-react": "^7.32.2",
|
|
76
|
-
"eslint-plugin-tailwindcss": "3.13.1",
|
|
77
|
-
"motion": "^12.12.1",
|
|
78
|
-
"prettier": "^2.8.8",
|
|
79
|
-
"pretty-quick": "^3.1.3",
|
|
80
|
-
"tailwindcss": "^3.4.18",
|
|
81
|
-
"tsx": "^4.1.4",
|
|
82
|
-
"turbo": "^1.9.9",
|
|
83
|
-
"vite": "^7.1.12",
|
|
84
|
-
"vite-tsconfig-paths": "^4.2.0",
|
|
85
|
-
"vitest": "^2.1.9"
|
|
24
|
+
"react-dom": ">=18",
|
|
25
|
+
"@radix-ui/react-slot": "^1.0.0",
|
|
26
|
+
"@radix-ui/react-dialog": "^1.0.0",
|
|
27
|
+
"@radix-ui/react-select": "^2.0.0",
|
|
28
|
+
"class-variance-authority": "^0.7.0",
|
|
29
|
+
"clsx": "^2.0.0",
|
|
30
|
+
"tailwind-merge": "^2.0.0",
|
|
31
|
+
"lucide-react": "^0.400.0"
|
|
86
32
|
},
|
|
87
33
|
"devDependencies": {
|
|
88
|
-
"@types/hast": "^3.0.4",
|
|
89
|
-
"@types/node": "^20.11.27",
|
|
90
34
|
"@types/react": "^18.2.65",
|
|
91
35
|
"@types/react-dom": "^18.2.22",
|
|
36
|
+
"@radix-ui/react-slot": "^1.0.2",
|
|
37
|
+
"@radix-ui/react-dialog": "^1.0.5",
|
|
38
|
+
"@radix-ui/react-select": "^2.0.0",
|
|
39
|
+
"class-variance-authority": "^0.7.0",
|
|
40
|
+
"clsx": "^2.1.0",
|
|
41
|
+
"tailwind-merge": "^2.2.0",
|
|
42
|
+
"lucide-react": "^0.400.0",
|
|
92
43
|
"tsup": "^8.5.1",
|
|
93
44
|
"typescript": "^5.5.3"
|
|
94
45
|
},
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"keywords": [
|
|
48
|
+
"react",
|
|
49
|
+
"components",
|
|
50
|
+
"design-system",
|
|
51
|
+
"radix-ui",
|
|
52
|
+
"tailwind",
|
|
53
|
+
"ui-components",
|
|
54
|
+
"atoms",
|
|
55
|
+
"molecules"
|
|
56
|
+
]
|
|
101
57
|
}
|
|
58
|
+
|