@better-nds/react 0.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.cjs +283 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +273 -0
- package/dist/tailwind.css +2 -0
- package/dist/theme.css +74 -0
- package/package.json +56 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
5
|
+
var radixUi = require('radix-ui');
|
|
6
|
+
var clsx = require('clsx');
|
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
|
+
require('react');
|
|
9
|
+
|
|
10
|
+
function cn(...inputs) {
|
|
11
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const buttonVariants = classVarianceAuthority.cva("group/button focus-visible:ring-nds-black inline-flex shrink-0 items-center justify-center rounded-sm border bg-clip-padding font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-red-500 aria-invalid:ring-2 aria-invalid:ring-red-500/30 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
neutral: "",
|
|
18
|
+
primary: "",
|
|
19
|
+
"secondary-solid": "",
|
|
20
|
+
"secondary-outline": "",
|
|
21
|
+
subtle: "",
|
|
22
|
+
transparent: ""
|
|
23
|
+
},
|
|
24
|
+
destructive: {
|
|
25
|
+
true: "",
|
|
26
|
+
false: ""
|
|
27
|
+
},
|
|
28
|
+
onColor: {
|
|
29
|
+
true: "",
|
|
30
|
+
false: ""
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
lg: "h-10 gap-1.5 px-4 text-base has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5 [&_svg:not([class*='size-'])]:size-6",
|
|
34
|
+
md: "h-8 gap-1 px-3 text-sm has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-5",
|
|
35
|
+
sm: "h-6 gap-1 px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-4",
|
|
36
|
+
"icon-lg": "size-10 [&_svg:not([class*='size-'])]:size-6",
|
|
37
|
+
"icon-md": "size-8 [&_svg:not([class*='size-'])]:size-5",
|
|
38
|
+
"icon-sm": "size-6 [&_svg:not([class*='size-'])]:size-4"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
compoundVariants: [
|
|
42
|
+
// Default
|
|
43
|
+
{
|
|
44
|
+
variant: "neutral",
|
|
45
|
+
destructive: false,
|
|
46
|
+
onColor: false,
|
|
47
|
+
class: "bg-button-neutral text-button-neutral-text hover:bg-button-neutral-hover active:bg-button-neutral-pressed border-transparent"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
variant: "primary",
|
|
51
|
+
destructive: false,
|
|
52
|
+
onColor: false,
|
|
53
|
+
class: "bg-button-primary text-button-primary-text hover:bg-button-primary-hover active:bg-button-primary-pressed border-transparent"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
variant: "secondary-solid",
|
|
57
|
+
destructive: false,
|
|
58
|
+
onColor: false,
|
|
59
|
+
class: "bg-button-secondary-solid text-button-secondary-solid-text hover:bg-button-secondary-solid-hover active:bg-button-secondary-solid-pressed border-transparent"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
variant: "secondary-outline",
|
|
63
|
+
destructive: false,
|
|
64
|
+
onColor: false,
|
|
65
|
+
class: "border-button-secondary-outline-border text-button-secondary-outline-text hover:bg-button-secondary-outline-hover hover:border-button-secondary-outline-hover-border active:bg-button-secondary-outline-pressed active:border-button-secondary-outline-pressed-border"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
variant: "subtle",
|
|
69
|
+
destructive: false,
|
|
70
|
+
onColor: false,
|
|
71
|
+
class: "text-button-subtle-text hover:bg-button-subtle-hover active:bg-button-subtle-pressed border-transparent bg-transparent"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
variant: "transparent",
|
|
75
|
+
destructive: false,
|
|
76
|
+
onColor: false,
|
|
77
|
+
class: "text-button-transparent-text hover:text-button-transparent-hover-text active:text-button-transparent-pressed-text border-transparent bg-transparent"
|
|
78
|
+
},
|
|
79
|
+
// onColor
|
|
80
|
+
{
|
|
81
|
+
variant: [
|
|
82
|
+
"secondary-solid",
|
|
83
|
+
"secondary-outline",
|
|
84
|
+
"subtle",
|
|
85
|
+
"transparent"
|
|
86
|
+
],
|
|
87
|
+
destructive: false,
|
|
88
|
+
onColor: true,
|
|
89
|
+
class: "focus-visible:ring-nds-white"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
variant: [
|
|
93
|
+
"neutral",
|
|
94
|
+
"primary"
|
|
95
|
+
],
|
|
96
|
+
destructive: false,
|
|
97
|
+
onColor: true,
|
|
98
|
+
class: "bg-nds-white text-nds-black hover:bg-nds-white/80 active:bg-nds-white/60 focus-visible:ring-nds-black border-transparent"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
variant: "secondary-solid",
|
|
102
|
+
destructive: false,
|
|
103
|
+
onColor: true,
|
|
104
|
+
class: "bg-nds-white/20 text-nds-white active:bg-nds-white/40 border-transparent"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
variant: "secondary-outline",
|
|
108
|
+
destructive: false,
|
|
109
|
+
onColor: true,
|
|
110
|
+
class: "border-nds-white/40 text-nds-white hover:bg-nds-white/20 active:bg-nds-white/40"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
variant: "subtle",
|
|
114
|
+
destructive: false,
|
|
115
|
+
onColor: true,
|
|
116
|
+
class: "text-nds-white hover:bg-nds-white/20 active:bg-nds-white/40 border-transparent"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
variant: "transparent",
|
|
120
|
+
destructive: false,
|
|
121
|
+
onColor: true,
|
|
122
|
+
class: "text-nds-white hover:text-nds-primary-400 active:text-nds-primary-300 border-transparent"
|
|
123
|
+
},
|
|
124
|
+
// Destructive (neutral + primary share styles regardless of onColor)
|
|
125
|
+
{
|
|
126
|
+
variant: [
|
|
127
|
+
"neutral",
|
|
128
|
+
"primary",
|
|
129
|
+
"secondary-outline",
|
|
130
|
+
"subtle",
|
|
131
|
+
"transparent"
|
|
132
|
+
],
|
|
133
|
+
destructive: true,
|
|
134
|
+
class: "focus-visible:ring-nds-white"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
variant: [
|
|
138
|
+
"neutral",
|
|
139
|
+
"primary"
|
|
140
|
+
],
|
|
141
|
+
destructive: true,
|
|
142
|
+
class: "bg-nds-error-600 text-nds-white hover:bg-nds-error-700 active:bg-nds-error-900 border-transparent"
|
|
143
|
+
},
|
|
144
|
+
// Destructive secondary-solid (same regardless of onColor)
|
|
145
|
+
{
|
|
146
|
+
variant: "secondary-solid",
|
|
147
|
+
destructive: true,
|
|
148
|
+
class: "bg-nds-error-50 text-nds-error-700 hover:bg-nds-error-100 active:bg-nds-error-200 border-transparent"
|
|
149
|
+
},
|
|
150
|
+
// Destructive (onColor: false)
|
|
151
|
+
{
|
|
152
|
+
variant: "secondary-outline",
|
|
153
|
+
destructive: true,
|
|
154
|
+
onColor: false,
|
|
155
|
+
class: "border-nds-error-200 text-nds-error-700 hover:bg-nds-error-100 active:bg-nds-error-200"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
variant: "subtle",
|
|
159
|
+
destructive: true,
|
|
160
|
+
onColor: false,
|
|
161
|
+
class: "text-nds-error-700 hover:bg-nds-error-200 active:bg-nds-error-300 border-transparent"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
variant: "transparent",
|
|
165
|
+
destructive: true,
|
|
166
|
+
onColor: false,
|
|
167
|
+
class: "text-nds-error-600 hover:text-nds-error-700 active:text-nds-error-900 border-transparent"
|
|
168
|
+
},
|
|
169
|
+
// Destructive + onColor
|
|
170
|
+
{
|
|
171
|
+
variant: "secondary-outline",
|
|
172
|
+
destructive: true,
|
|
173
|
+
onColor: true,
|
|
174
|
+
class: "border-nds-error-200 text-nds-error-200 hover:text-nds-error-700 hover:bg-nds-error-100 active:bg-nds-error-200"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
variant: "subtle",
|
|
178
|
+
destructive: true,
|
|
179
|
+
onColor: true,
|
|
180
|
+
class: "text-nds-error-200 hover:text-nds-error-700 hover:bg-nds-error-100 active:bg-nds-error-200 border-transparent"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
variant: "transparent",
|
|
184
|
+
destructive: true,
|
|
185
|
+
onColor: true,
|
|
186
|
+
class: "text-nds-error-200 hover:text-nds-error-300 active:text-nds-error-400 border-transparent"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
defaultVariants: {
|
|
190
|
+
variant: "primary",
|
|
191
|
+
size: "md",
|
|
192
|
+
destructive: false,
|
|
193
|
+
onColor: false
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
function Button({ className, variant, size, destructive, onColor, asChild = false, ...props }) {
|
|
197
|
+
const Comp = asChild ? radixUi.Slot.Root : "button";
|
|
198
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Comp, {
|
|
199
|
+
"data-slot": "button",
|
|
200
|
+
"data-variant": variant,
|
|
201
|
+
"data-size": size,
|
|
202
|
+
className: cn(buttonVariants({
|
|
203
|
+
variant,
|
|
204
|
+
size,
|
|
205
|
+
destructive,
|
|
206
|
+
onColor,
|
|
207
|
+
className
|
|
208
|
+
})),
|
|
209
|
+
...props
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
const cardVariants = classVarianceAuthority.cva("group/card text-nds-black flex flex-col gap-4 overflow-hidden p-4 rounded-2xl", {
|
|
214
|
+
variants: {
|
|
215
|
+
type: {
|
|
216
|
+
stroke: "bg-nds-white border-nds-neutral-300 border"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
defaultVariants: {
|
|
220
|
+
type: "stroke"
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
function Card({ className, type, ...props }) {
|
|
224
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
225
|
+
"data-slot": "card",
|
|
226
|
+
className: cn(cardVariants({
|
|
227
|
+
type
|
|
228
|
+
}), className),
|
|
229
|
+
...props
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
function CardHeader({ className, ...props }) {
|
|
233
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
234
|
+
"data-slot": "card-header",
|
|
235
|
+
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]", className),
|
|
236
|
+
...props
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
function CardTitle({ className, ...props }) {
|
|
240
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
241
|
+
"data-slot": "card-title",
|
|
242
|
+
className: cn("text-base leading-snug font-bold", className),
|
|
243
|
+
...props
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function CardDescription({ className, ...props }) {
|
|
247
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
248
|
+
"data-slot": "card-description",
|
|
249
|
+
className: cn("text-sm", className),
|
|
250
|
+
...props
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
function CardAction({ className, ...props }) {
|
|
254
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
255
|
+
"data-slot": "card-action",
|
|
256
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
257
|
+
...props
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
function CardContent({ className, ...props }) {
|
|
261
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
262
|
+
"data-slot": "card-content",
|
|
263
|
+
className: cn(className),
|
|
264
|
+
...props
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
function CardFooter({ className, ...props }) {
|
|
268
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
269
|
+
"data-slot": "card-footer",
|
|
270
|
+
className: cn("flex items-center gap-4", className),
|
|
271
|
+
...props
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
exports.Button = Button;
|
|
276
|
+
exports.Card = Card;
|
|
277
|
+
exports.CardAction = CardAction;
|
|
278
|
+
exports.CardContent = CardContent;
|
|
279
|
+
exports.CardDescription = CardDescription;
|
|
280
|
+
exports.CardFooter = CardFooter;
|
|
281
|
+
exports.CardHeader = CardHeader;
|
|
282
|
+
exports.CardTitle = CardTitle;
|
|
283
|
+
exports.cn = cn;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ComponentProps } from 'react';
|
|
6
|
+
import { ClassValue } from 'clsx';
|
|
7
|
+
|
|
8
|
+
declare const buttonVariants: (props?: ({
|
|
9
|
+
variant?: "neutral" | "primary" | "secondary-solid" | "secondary-outline" | "subtle" | "transparent" | null | undefined;
|
|
10
|
+
destructive?: boolean | null | undefined;
|
|
11
|
+
onColor?: boolean | null | undefined;
|
|
12
|
+
size?: "lg" | "md" | "sm" | "icon-lg" | "icon-md" | "icon-sm" | null | undefined;
|
|
13
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
+
declare function Button({ className, variant, size, destructive, onColor, asChild, ...props }: ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
}): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
19
|
+
|
|
20
|
+
declare const cardVariants: (props?: ({
|
|
21
|
+
type?: "stroke" | null | undefined;
|
|
22
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
23
|
+
declare function Card({ className, type, ...props }: React.ComponentProps<"div"> & VariantProps<typeof cardVariants>): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
28
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
29
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
export { Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn };
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/components/button.tsx","../src/cn.ts","../src/components/card.tsx"],"mappings":";;;;;;;AAIA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA,IAAI,8BAA8B,CAAC,SAAS;AAC5C,iBAAiB,MAAM,wEAAwE,cAAc,aAAa,YAAY,QAAQ,cAAc;AAC5J;AACA,IAAI,iBAAiB,CAAC,GAAG,CAAC,OAAO;;ACXjC,iBAAiB,EAAE,YAAY,UAAU;;ACGzC,cAAc,YAAY;AAC1B;AACA,IAAI,8BAA8B,CAAC,SAAS;AAC5C,iBAAiB,IAAI,gCAAgC,KAAK,CAAC,cAAc,UAAU,YAAY,QAAQ,YAAY,IAAI,iBAAiB,CAAC,GAAG,CAAC,OAAO;AACpJ,iBAAiB,UAAU,0BAA0B,KAAK,CAAC,cAAc,UAAU,iBAAiB,CAAC,GAAG,CAAC,OAAO;AAChH,iBAAiB,SAAS,0BAA0B,KAAK,CAAC,cAAc,UAAU,iBAAiB,CAAC,GAAG,CAAC,OAAO;AAC/G,iBAAiB,eAAe,0BAA0B,KAAK,CAAC,cAAc,UAAU,iBAAiB,CAAC,GAAG,CAAC,OAAO;AACrH,iBAAiB,UAAU,0BAA0B,KAAK,CAAC,cAAc,UAAU,iBAAiB,CAAC,GAAG,CAAC,OAAO;AAChH,iBAAiB,WAAW,0BAA0B,KAAK,CAAC,cAAc,UAAU,iBAAiB,CAAC,GAAG,CAAC,OAAO;AACjH,iBAAiB,UAAU,0BAA0B,KAAK,CAAC,cAAc,UAAU,iBAAiB,CAAC,GAAG,CAAC,OAAO;;;;","names":[]}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { Slot } from 'radix-ui';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import 'react';
|
|
7
|
+
|
|
8
|
+
function cn(...inputs) {
|
|
9
|
+
return twMerge(clsx(inputs));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const buttonVariants = cva("group/button focus-visible:ring-nds-black inline-flex shrink-0 items-center justify-center rounded-sm border bg-clip-padding font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-red-500 aria-invalid:ring-2 aria-invalid:ring-red-500/30 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
neutral: "",
|
|
16
|
+
primary: "",
|
|
17
|
+
"secondary-solid": "",
|
|
18
|
+
"secondary-outline": "",
|
|
19
|
+
subtle: "",
|
|
20
|
+
transparent: ""
|
|
21
|
+
},
|
|
22
|
+
destructive: {
|
|
23
|
+
true: "",
|
|
24
|
+
false: ""
|
|
25
|
+
},
|
|
26
|
+
onColor: {
|
|
27
|
+
true: "",
|
|
28
|
+
false: ""
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
lg: "h-10 gap-1.5 px-4 text-base has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5 [&_svg:not([class*='size-'])]:size-6",
|
|
32
|
+
md: "h-8 gap-1 px-3 text-sm has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-5",
|
|
33
|
+
sm: "h-6 gap-1 px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-4",
|
|
34
|
+
"icon-lg": "size-10 [&_svg:not([class*='size-'])]:size-6",
|
|
35
|
+
"icon-md": "size-8 [&_svg:not([class*='size-'])]:size-5",
|
|
36
|
+
"icon-sm": "size-6 [&_svg:not([class*='size-'])]:size-4"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
compoundVariants: [
|
|
40
|
+
// Default
|
|
41
|
+
{
|
|
42
|
+
variant: "neutral",
|
|
43
|
+
destructive: false,
|
|
44
|
+
onColor: false,
|
|
45
|
+
class: "bg-button-neutral text-button-neutral-text hover:bg-button-neutral-hover active:bg-button-neutral-pressed border-transparent"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
variant: "primary",
|
|
49
|
+
destructive: false,
|
|
50
|
+
onColor: false,
|
|
51
|
+
class: "bg-button-primary text-button-primary-text hover:bg-button-primary-hover active:bg-button-primary-pressed border-transparent"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
variant: "secondary-solid",
|
|
55
|
+
destructive: false,
|
|
56
|
+
onColor: false,
|
|
57
|
+
class: "bg-button-secondary-solid text-button-secondary-solid-text hover:bg-button-secondary-solid-hover active:bg-button-secondary-solid-pressed border-transparent"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
variant: "secondary-outline",
|
|
61
|
+
destructive: false,
|
|
62
|
+
onColor: false,
|
|
63
|
+
class: "border-button-secondary-outline-border text-button-secondary-outline-text hover:bg-button-secondary-outline-hover hover:border-button-secondary-outline-hover-border active:bg-button-secondary-outline-pressed active:border-button-secondary-outline-pressed-border"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
variant: "subtle",
|
|
67
|
+
destructive: false,
|
|
68
|
+
onColor: false,
|
|
69
|
+
class: "text-button-subtle-text hover:bg-button-subtle-hover active:bg-button-subtle-pressed border-transparent bg-transparent"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
variant: "transparent",
|
|
73
|
+
destructive: false,
|
|
74
|
+
onColor: false,
|
|
75
|
+
class: "text-button-transparent-text hover:text-button-transparent-hover-text active:text-button-transparent-pressed-text border-transparent bg-transparent"
|
|
76
|
+
},
|
|
77
|
+
// onColor
|
|
78
|
+
{
|
|
79
|
+
variant: [
|
|
80
|
+
"secondary-solid",
|
|
81
|
+
"secondary-outline",
|
|
82
|
+
"subtle",
|
|
83
|
+
"transparent"
|
|
84
|
+
],
|
|
85
|
+
destructive: false,
|
|
86
|
+
onColor: true,
|
|
87
|
+
class: "focus-visible:ring-nds-white"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
variant: [
|
|
91
|
+
"neutral",
|
|
92
|
+
"primary"
|
|
93
|
+
],
|
|
94
|
+
destructive: false,
|
|
95
|
+
onColor: true,
|
|
96
|
+
class: "bg-nds-white text-nds-black hover:bg-nds-white/80 active:bg-nds-white/60 focus-visible:ring-nds-black border-transparent"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
variant: "secondary-solid",
|
|
100
|
+
destructive: false,
|
|
101
|
+
onColor: true,
|
|
102
|
+
class: "bg-nds-white/20 text-nds-white active:bg-nds-white/40 border-transparent"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
variant: "secondary-outline",
|
|
106
|
+
destructive: false,
|
|
107
|
+
onColor: true,
|
|
108
|
+
class: "border-nds-white/40 text-nds-white hover:bg-nds-white/20 active:bg-nds-white/40"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
variant: "subtle",
|
|
112
|
+
destructive: false,
|
|
113
|
+
onColor: true,
|
|
114
|
+
class: "text-nds-white hover:bg-nds-white/20 active:bg-nds-white/40 border-transparent"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
variant: "transparent",
|
|
118
|
+
destructive: false,
|
|
119
|
+
onColor: true,
|
|
120
|
+
class: "text-nds-white hover:text-nds-primary-400 active:text-nds-primary-300 border-transparent"
|
|
121
|
+
},
|
|
122
|
+
// Destructive (neutral + primary share styles regardless of onColor)
|
|
123
|
+
{
|
|
124
|
+
variant: [
|
|
125
|
+
"neutral",
|
|
126
|
+
"primary",
|
|
127
|
+
"secondary-outline",
|
|
128
|
+
"subtle",
|
|
129
|
+
"transparent"
|
|
130
|
+
],
|
|
131
|
+
destructive: true,
|
|
132
|
+
class: "focus-visible:ring-nds-white"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
variant: [
|
|
136
|
+
"neutral",
|
|
137
|
+
"primary"
|
|
138
|
+
],
|
|
139
|
+
destructive: true,
|
|
140
|
+
class: "bg-nds-error-600 text-nds-white hover:bg-nds-error-700 active:bg-nds-error-900 border-transparent"
|
|
141
|
+
},
|
|
142
|
+
// Destructive secondary-solid (same regardless of onColor)
|
|
143
|
+
{
|
|
144
|
+
variant: "secondary-solid",
|
|
145
|
+
destructive: true,
|
|
146
|
+
class: "bg-nds-error-50 text-nds-error-700 hover:bg-nds-error-100 active:bg-nds-error-200 border-transparent"
|
|
147
|
+
},
|
|
148
|
+
// Destructive (onColor: false)
|
|
149
|
+
{
|
|
150
|
+
variant: "secondary-outline",
|
|
151
|
+
destructive: true,
|
|
152
|
+
onColor: false,
|
|
153
|
+
class: "border-nds-error-200 text-nds-error-700 hover:bg-nds-error-100 active:bg-nds-error-200"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
variant: "subtle",
|
|
157
|
+
destructive: true,
|
|
158
|
+
onColor: false,
|
|
159
|
+
class: "text-nds-error-700 hover:bg-nds-error-200 active:bg-nds-error-300 border-transparent"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
variant: "transparent",
|
|
163
|
+
destructive: true,
|
|
164
|
+
onColor: false,
|
|
165
|
+
class: "text-nds-error-600 hover:text-nds-error-700 active:text-nds-error-900 border-transparent"
|
|
166
|
+
},
|
|
167
|
+
// Destructive + onColor
|
|
168
|
+
{
|
|
169
|
+
variant: "secondary-outline",
|
|
170
|
+
destructive: true,
|
|
171
|
+
onColor: true,
|
|
172
|
+
class: "border-nds-error-200 text-nds-error-200 hover:text-nds-error-700 hover:bg-nds-error-100 active:bg-nds-error-200"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
variant: "subtle",
|
|
176
|
+
destructive: true,
|
|
177
|
+
onColor: true,
|
|
178
|
+
class: "text-nds-error-200 hover:text-nds-error-700 hover:bg-nds-error-100 active:bg-nds-error-200 border-transparent"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
variant: "transparent",
|
|
182
|
+
destructive: true,
|
|
183
|
+
onColor: true,
|
|
184
|
+
class: "text-nds-error-200 hover:text-nds-error-300 active:text-nds-error-400 border-transparent"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
defaultVariants: {
|
|
188
|
+
variant: "primary",
|
|
189
|
+
size: "md",
|
|
190
|
+
destructive: false,
|
|
191
|
+
onColor: false
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
function Button({ className, variant, size, destructive, onColor, asChild = false, ...props }) {
|
|
195
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
196
|
+
return /*#__PURE__*/ jsx(Comp, {
|
|
197
|
+
"data-slot": "button",
|
|
198
|
+
"data-variant": variant,
|
|
199
|
+
"data-size": size,
|
|
200
|
+
className: cn(buttonVariants({
|
|
201
|
+
variant,
|
|
202
|
+
size,
|
|
203
|
+
destructive,
|
|
204
|
+
onColor,
|
|
205
|
+
className
|
|
206
|
+
})),
|
|
207
|
+
...props
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const cardVariants = cva("group/card text-nds-black flex flex-col gap-4 overflow-hidden p-4 rounded-2xl", {
|
|
212
|
+
variants: {
|
|
213
|
+
type: {
|
|
214
|
+
stroke: "bg-nds-white border-nds-neutral-300 border"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
defaultVariants: {
|
|
218
|
+
type: "stroke"
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
function Card({ className, type, ...props }) {
|
|
222
|
+
return /*#__PURE__*/ jsx("div", {
|
|
223
|
+
"data-slot": "card",
|
|
224
|
+
className: cn(cardVariants({
|
|
225
|
+
type
|
|
226
|
+
}), className),
|
|
227
|
+
...props
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
function CardHeader({ className, ...props }) {
|
|
231
|
+
return /*#__PURE__*/ jsx("div", {
|
|
232
|
+
"data-slot": "card-header",
|
|
233
|
+
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]", className),
|
|
234
|
+
...props
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
function CardTitle({ className, ...props }) {
|
|
238
|
+
return /*#__PURE__*/ jsx("div", {
|
|
239
|
+
"data-slot": "card-title",
|
|
240
|
+
className: cn("text-base leading-snug font-bold", className),
|
|
241
|
+
...props
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function CardDescription({ className, ...props }) {
|
|
245
|
+
return /*#__PURE__*/ jsx("div", {
|
|
246
|
+
"data-slot": "card-description",
|
|
247
|
+
className: cn("text-sm", className),
|
|
248
|
+
...props
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
function CardAction({ className, ...props }) {
|
|
252
|
+
return /*#__PURE__*/ jsx("div", {
|
|
253
|
+
"data-slot": "card-action",
|
|
254
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
255
|
+
...props
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
function CardContent({ className, ...props }) {
|
|
259
|
+
return /*#__PURE__*/ jsx("div", {
|
|
260
|
+
"data-slot": "card-content",
|
|
261
|
+
className: cn(className),
|
|
262
|
+
...props
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
function CardFooter({ className, ...props }) {
|
|
266
|
+
return /*#__PURE__*/ jsx("div", {
|
|
267
|
+
"data-slot": "card-footer",
|
|
268
|
+
className: cn("flex items-center gap-4", className),
|
|
269
|
+
...props
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export { Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.2.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--color-red-500:oklch(63.7% .237 25.331);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-bold:700;--leading-snug:1.375;--radius-sm:.25rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-nds-black:#161616;--color-nds-white:#fff;--color-nds-neutral-100:#f3f4f6;--color-nds-neutral-200:#e5e7eb;--color-nds-neutral-300:#d2d6db;--color-nds-neutral-600:#4d5761;--color-nds-neutral-800:#1f2a37;--color-nds-neutral-950:#0d121c;--color-nds-primary-300:#88dbad;--color-nds-primary-400:#54c08a;--color-nds-primary-600:#1b8354;--color-nds-primary-700:#166a45;--color-nds-primary-900:#104631;--color-nds-error-50:#fef3f2;--color-nds-error-100:#fee4e2;--color-nds-error-200:#fecdca;--color-nds-error-300:#fda29b;--color-nds-error-400:#f97066;--color-nds-error-600:#d92d20;--color-nds-error-700:#b42318;--color-nds-error-900:#7a271a;--color-button-neutral:var(--color-nds-neutral-950);--color-button-neutral-hover:var(--color-nds-neutral-800);--color-button-neutral-pressed:var(--color-nds-neutral-600);--color-button-neutral-text:var(--color-nds-neutral-100);--color-button-primary:var(--color-nds-primary-600);--color-button-primary-hover:var(--color-nds-primary-700);--color-button-primary-pressed:var(--color-nds-primary-900);--color-button-primary-text:var(--color-nds-neutral-100);--color-button-secondary-solid:var(--color-nds-neutral-100);--color-button-secondary-solid-hover:var(--color-nds-neutral-200);--color-button-secondary-solid-pressed:var(--color-nds-neutral-200);--color-button-secondary-solid-text:var(--color-nds-black);--color-button-secondary-outline-border:var(--color-nds-neutral-300);--color-button-secondary-outline-hover:var(--color-nds-neutral-100);--color-button-secondary-outline-hover-border:var(--color-nds-neutral-200);--color-button-secondary-outline-pressed:var(--color-nds-neutral-200);--color-button-secondary-outline-pressed-border:var(--color-nds-neutral-300);--color-button-secondary-outline-text:var(--color-nds-black);--color-button-subtle-hover:var(--color-nds-neutral-100);--color-button-subtle-pressed:var(--color-nds-neutral-200);--color-button-subtle-text:var(--color-nds-black);--color-button-transparent-text:var(--color-nds-black);--color-button-transparent-hover-text:var(--color-nds-primary-700);--color-button-transparent-pressed-text:var(--color-nds-primary-900)}}@layer utilities{.\@container\/card-header{container:card-header/inline-size}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.shrink-0{flex-shrink:0}.auto-rows-min{grid-auto-rows:min-content}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-4{gap:calc(var(--spacing) * 4)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-button-secondary-outline-border{border-color:var(--color-button-secondary-outline-border)}.border-nds-error-200{border-color:var(--color-nds-error-200)}.border-nds-neutral-300{border-color:var(--color-nds-neutral-300)}.border-nds-white\/40{border-color:#fff6}@supports (color:color-mix(in lab, red, red)){.border-nds-white\/40{border-color:color-mix(in oklab, var(--color-nds-white) 40%, transparent)}}.border-transparent{border-color:#0000}.bg-button-neutral{background-color:var(--color-button-neutral)}.bg-button-primary{background-color:var(--color-button-primary)}.bg-button-secondary-solid{background-color:var(--color-button-secondary-solid)}.bg-nds-error-50{background-color:var(--color-nds-error-50)}.bg-nds-error-600{background-color:var(--color-nds-error-600)}.bg-nds-white{background-color:var(--color-nds-white)}.bg-nds-white\/20{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.bg-nds-white\/20{background-color:color-mix(in oklab, var(--color-nds-white) 20%, transparent)}}.bg-transparent{background-color:#0000}.bg-clip-padding{background-clip:padding-box}.p-4{padding:calc(var(--spacing) * 4)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.whitespace-nowrap{white-space:nowrap}.text-button-neutral-text{color:var(--color-button-neutral-text)}.text-button-primary-text{color:var(--color-button-primary-text)}.text-button-secondary-outline-text{color:var(--color-button-secondary-outline-text)}.text-button-secondary-solid-text{color:var(--color-button-secondary-solid-text)}.text-button-subtle-text{color:var(--color-button-subtle-text)}.text-button-transparent-text{color:var(--color-button-transparent-text)}.text-nds-black{color:var(--color-nds-black)}.text-nds-error-200{color:var(--color-nds-error-200)}.text-nds-error-600{color:var(--color-nds-error-600)}.text-nds-error-700{color:var(--color-nds-error-700)}.text-nds-white{color:var(--color-nds-white)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.hover\:border-button-secondary-outline-hover-border:hover{border-color:var(--color-button-secondary-outline-hover-border)}.hover\:bg-button-neutral-hover:hover{background-color:var(--color-button-neutral-hover)}.hover\:bg-button-primary-hover:hover{background-color:var(--color-button-primary-hover)}.hover\:bg-button-secondary-outline-hover:hover{background-color:var(--color-button-secondary-outline-hover)}.hover\:bg-button-secondary-solid-hover:hover{background-color:var(--color-button-secondary-solid-hover)}.hover\:bg-button-subtle-hover:hover{background-color:var(--color-button-subtle-hover)}.hover\:bg-nds-error-100:hover{background-color:var(--color-nds-error-100)}.hover\:bg-nds-error-200:hover{background-color:var(--color-nds-error-200)}.hover\:bg-nds-error-700:hover{background-color:var(--color-nds-error-700)}.hover\:bg-nds-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\:bg-nds-white\/20:hover{background-color:color-mix(in oklab, var(--color-nds-white) 20%, transparent)}}.hover\:bg-nds-white\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab, red, red)){.hover\:bg-nds-white\/80:hover{background-color:color-mix(in oklab, var(--color-nds-white) 80%, transparent)}}.hover\:text-button-transparent-hover-text:hover{color:var(--color-button-transparent-hover-text)}.hover\:text-nds-error-300:hover{color:var(--color-nds-error-300)}.hover\:text-nds-error-700:hover{color:var(--color-nds-error-700)}.hover\:text-nds-primary-400:hover{color:var(--color-nds-primary-400)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-nds-black:focus-visible{--tw-ring-color:var(--color-nds-black)}.focus-visible\:ring-nds-white:focus-visible{--tw-ring-color:var(--color-nds-white)}.active\:border-button-secondary-outline-pressed-border:active{border-color:var(--color-button-secondary-outline-pressed-border)}.active\:bg-button-neutral-pressed:active{background-color:var(--color-button-neutral-pressed)}.active\:bg-button-primary-pressed:active{background-color:var(--color-button-primary-pressed)}.active\:bg-button-secondary-outline-pressed:active{background-color:var(--color-button-secondary-outline-pressed)}.active\:bg-button-secondary-solid-pressed:active{background-color:var(--color-button-secondary-solid-pressed)}.active\:bg-button-subtle-pressed:active{background-color:var(--color-button-subtle-pressed)}.active\:bg-nds-error-200:active{background-color:var(--color-nds-error-200)}.active\:bg-nds-error-300:active{background-color:var(--color-nds-error-300)}.active\:bg-nds-error-900:active{background-color:var(--color-nds-error-900)}.active\:bg-nds-white\/40:active{background-color:#fff6}@supports (color:color-mix(in lab, red, red)){.active\:bg-nds-white\/40:active{background-color:color-mix(in oklab, var(--color-nds-white) 40%, transparent)}}.active\:bg-nds-white\/60:active{background-color:#fff9}@supports (color:color-mix(in lab, red, red)){.active\:bg-nds-white\/60:active{background-color:color-mix(in oklab, var(--color-nds-white) 60%, transparent)}}.active\:text-button-transparent-pressed-text:active{color:var(--color-button-transparent-pressed-text)}.active\:text-nds-error-400:active{color:var(--color-nds-error-400)}.active\:text-nds-error-900:active{color:var(--color-nds-error-900)}.active\:text-nds-primary-300:active{color:var(--color-nds-primary-300)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.has-data-\[icon\=inline-end\]\:pr-1\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-end\]\:pr-2:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-end\]\:pr-2\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 2.5)}.has-data-\[icon\=inline-start\]\:pl-1\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-start\]\:pl-2:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-start\]\:pl-2\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 2.5)}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-data-\[slot\=card-description\]\:grid-rows-\[auto_auto\]:has([data-slot=card-description]){grid-template-rows:auto auto}.aria-invalid\:border-red-500[aria-invalid=true]{border-color:var(--color-red-500)}.aria-invalid\:ring-2[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-red-500\/30[aria-invalid=true]{--tw-ring-color:#fb2c364d}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-red-500\/30[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-5 svg:not([class*=size-]){width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-6 svg:not([class*=size-]){width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}}@layer base{button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
package/dist/theme.css
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
--color-nds-black: #161616;
|
|
3
|
+
--color-nds-white: #ffffff;
|
|
4
|
+
|
|
5
|
+
--color-nds-neutral-25: #fcfcfd;
|
|
6
|
+
--color-nds-neutral-50: #f9fafb;
|
|
7
|
+
--color-nds-neutral-100: #f3f4f6;
|
|
8
|
+
--color-nds-neutral-200: #e5e7eb;
|
|
9
|
+
--color-nds-neutral-300: #d2d6db;
|
|
10
|
+
--color-nds-neutral-400: #9da4ae;
|
|
11
|
+
--color-nds-neutral-500: #6c737f;
|
|
12
|
+
--color-nds-neutral-600: #4d5761;
|
|
13
|
+
--color-nds-neutral-700: #384250;
|
|
14
|
+
--color-nds-neutral-800: #1f2a37;
|
|
15
|
+
--color-nds-neutral-900: #111927;
|
|
16
|
+
--color-nds-neutral-950: #0d121c;
|
|
17
|
+
|
|
18
|
+
--color-nds-primary-25: #f7fdf9;
|
|
19
|
+
--color-nds-primary-50: #f3fcf6;
|
|
20
|
+
--color-nds-primary-100: #dff6e7;
|
|
21
|
+
--color-nds-primary-200: #b8eacb;
|
|
22
|
+
--color-nds-primary-300: #88dbad;
|
|
23
|
+
--color-nds-primary-400: #54c08a;
|
|
24
|
+
--color-nds-primary-500: #25935f;
|
|
25
|
+
--color-nds-primary-600: #1b8354;
|
|
26
|
+
--color-nds-primary-700: #166a45;
|
|
27
|
+
--color-nds-primary-800: #14573a;
|
|
28
|
+
--color-nds-primary-900: #104631;
|
|
29
|
+
--color-nds-primary-950: #092a1e;
|
|
30
|
+
|
|
31
|
+
--color-nds-error-25: #fffbfa;
|
|
32
|
+
--color-nds-error-50: #fef3f2;
|
|
33
|
+
--color-nds-error-100: #fee4e2;
|
|
34
|
+
--color-nds-error-200: #fecdca;
|
|
35
|
+
--color-nds-error-300: #fda29b;
|
|
36
|
+
--color-nds-error-400: #f97066;
|
|
37
|
+
--color-nds-error-500: #f04438;
|
|
38
|
+
--color-nds-error-600: #d92d20;
|
|
39
|
+
--color-nds-error-700: #b42318;
|
|
40
|
+
--color-nds-error-800: #912018;
|
|
41
|
+
--color-nds-error-900: #7a271a;
|
|
42
|
+
--color-nds-error-950: #55160c;
|
|
43
|
+
|
|
44
|
+
--color-button-neutral: var(--color-nds-neutral-950);
|
|
45
|
+
--color-button-neutral-hover: var(--color-nds-neutral-800);
|
|
46
|
+
--color-button-neutral-pressed: var(--color-nds-neutral-600);
|
|
47
|
+
--color-button-neutral-text: var(--color-nds-neutral-100);
|
|
48
|
+
|
|
49
|
+
--color-button-primary: var(--color-nds-primary-600);
|
|
50
|
+
--color-button-primary-hover: var(--color-nds-primary-700);
|
|
51
|
+
--color-button-primary-pressed: var(--color-nds-primary-900);
|
|
52
|
+
--color-button-primary-text: var(--color-nds-neutral-100);
|
|
53
|
+
|
|
54
|
+
--color-button-secondary-solid: var(--color-nds-neutral-100);
|
|
55
|
+
--color-button-secondary-solid-hover: var(--color-nds-neutral-200);
|
|
56
|
+
--color-button-secondary-solid-pressed: var(--color-nds-neutral-200);
|
|
57
|
+
--color-button-secondary-solid-text: var(--color-nds-black);
|
|
58
|
+
|
|
59
|
+
--color-button-secondary-outline-border: var(--color-nds-neutral-300);
|
|
60
|
+
--color-button-secondary-outline-hover: var(--color-nds-neutral-100);
|
|
61
|
+
--color-button-secondary-outline-hover-border: var(--color-nds-neutral-200);
|
|
62
|
+
--color-button-secondary-outline-pressed: var(--color-nds-neutral-200);
|
|
63
|
+
--color-button-secondary-outline-pressed-border: var(--color-nds-neutral-300);
|
|
64
|
+
--color-button-secondary-outline-text: var(--color-nds-black);
|
|
65
|
+
|
|
66
|
+
--color-button-subtle-hover: var(--color-nds-neutral-100);
|
|
67
|
+
--color-button-subtle-pressed: var(--color-nds-neutral-200);
|
|
68
|
+
--color-button-subtle-text: var(--color-nds-black);
|
|
69
|
+
|
|
70
|
+
--color-button-transparent: var(--color-nds-transparent);
|
|
71
|
+
--color-button-transparent-text: var(--color-nds-black);
|
|
72
|
+
--color-button-transparent-hover-text: var(--color-nds-primary-700);
|
|
73
|
+
--color-button-transparent-pressed-text: var(--color-nds-primary-900);
|
|
74
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@better-nds/react",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "React component library for better-nds",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.css"
|
|
8
|
+
],
|
|
9
|
+
"type": "module",
|
|
10
|
+
"main": "./dist/index.cjs",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./tailwind.css": "./dist/tailwind.css",
|
|
20
|
+
"./theme.css": "./dist/theme.css"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"class-variance-authority": "^0.7.1",
|
|
27
|
+
"clsx": "^2.1.1",
|
|
28
|
+
"radix-ui": "^1.4.3",
|
|
29
|
+
"tailwind-merge": "^3.5.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": "^18 || ^19",
|
|
33
|
+
"react-dom": "^18 || ^19"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@tailwindcss/cli": "^4.2.3",
|
|
37
|
+
"@types/react": "^19.2.3",
|
|
38
|
+
"@types/react-dom": "^19.2.3",
|
|
39
|
+
"bunchee": "^6.10.0",
|
|
40
|
+
"react": "^19.2.5",
|
|
41
|
+
"react-dom": "^19.2.5",
|
|
42
|
+
"tailwindcss": "^4.2.3",
|
|
43
|
+
"typescript": "^6.0.3"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "pnpm run build:js && pnpm run build:css && pnpm run build:theme",
|
|
47
|
+
"build:js": "bunchee",
|
|
48
|
+
"build:css": "tailwindcss -i ./src/styles/tailwind.css -o ./dist/tailwind.css --minify",
|
|
49
|
+
"build:theme": "node -e \"require('node:fs').mkdirSync('dist',{recursive:true});require('node:fs').copyFileSync('src/styles/theme.css','dist/theme.css')\"",
|
|
50
|
+
"dev": "pnpm run \"/^dev:.*/\"",
|
|
51
|
+
"dev:js": "bunchee --watch",
|
|
52
|
+
"dev:css": "tailwindcss -i ./src/styles/tailwind.css -o ./dist/tailwind.css --watch",
|
|
53
|
+
"dev:theme": "node -e \"require('node:fs').mkdirSync('dist',{recursive:true});require('node:fs').copyFileSync('src/styles/theme.css','dist/theme.css')\"",
|
|
54
|
+
"typecheck": "tsc --noEmit"
|
|
55
|
+
}
|
|
56
|
+
}
|