@equal-experts/kuat-react 0.2.3 → 0.2.5
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 +88 -3
- package/dist/accordion-Da2BsKRK.js +46 -0
- package/dist/accordion.d.ts +2 -0
- package/dist/accordion.js +9 -0
- package/dist/alert-dialog-C769FFOM.js +113 -0
- package/dist/alert-dialog.d.ts +2 -0
- package/dist/alert-dialog.js +16 -0
- package/dist/badge-BXjC4NYJ.js +26 -0
- package/dist/badge.d.ts +3 -0
- package/dist/badge.js +7 -0
- package/dist/button-X-yV4Iwq.js +44 -0
- package/dist/button.d.ts +3 -0
- package/dist/button.js +7 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/index-D5fkjZ2l.js +34 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +25 -2344
- package/dist/style.css +1 -1
- package/dist/styles-qaFjX9_3.js +2278 -0
- package/docs/README.md +35 -0
- package/docs/components/guidelines.md +221 -0
- package/docs/content/README.md +297 -0
- package/docs/content/content-foundations.md +506 -0
- package/docs/content/content-marketing-sales.md +454 -0
- package/docs/content/content-product-ux.md +875 -0
- package/docs/design/borders.md +500 -0
- package/docs/design/colours.md +523 -0
- package/docs/design/design-system.md +148 -0
- package/docs/design/layouts.md +681 -0
- package/docs/design/logo.md +383 -0
- package/docs/design/spacing.md +477 -0
- package/docs/design/typography.md +451 -0
- package/package.json +23 -4
package/README.md
CHANGED
|
@@ -42,6 +42,42 @@ pnpm add lucide-react
|
|
|
42
42
|
|
|
43
43
|
**Note:** `@equal-experts/kuat-core` is bundled with this package - you don't need to install it separately. Only install the Radix UI packages for the components you actually use.
|
|
44
44
|
|
|
45
|
+
### Recommended: Use Subpath Imports
|
|
46
|
+
|
|
47
|
+
To avoid installing all peer dependencies when you only need specific components, use **subpath imports**. This allows you to import only the components you need and only install their required peer dependencies.
|
|
48
|
+
|
|
49
|
+
**Example: Only using Button**
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Only install peer dependencies for Button
|
|
53
|
+
pnpm add react react-dom @radix-ui/react-slot
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
// Import from subpath - only Button and its dependencies are required
|
|
58
|
+
import { Button } from "@equal-experts/kuat-react/button";
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Component Peer Dependencies:**
|
|
62
|
+
|
|
63
|
+
- **Button**: `react`, `react-dom`, `@radix-ui/react-slot`
|
|
64
|
+
- **Accordion**: `react`, `react-dom`, `@radix-ui/react-accordion`, `lucide-react`
|
|
65
|
+
- **AlertDialog**: `react`, `react-dom`, `@radix-ui/react-alert-dialog`
|
|
66
|
+
- **Badge**: `react`, `react-dom` (no additional Radix UI dependencies)
|
|
67
|
+
|
|
68
|
+
**Using Main Export (All Components):**
|
|
69
|
+
|
|
70
|
+
If you import from the main package, you'll need all peer dependencies:
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
// This requires ALL peer dependencies to be installed
|
|
74
|
+
import { Button, Accordion, AlertDialog } from "@equal-experts/kuat-react";
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**lucide-react Version Support:**
|
|
78
|
+
|
|
79
|
+
The package supports `lucide-react` versions `^0.344.0 || >=0.400.0`, including the latest versions (0.562.0+).
|
|
80
|
+
|
|
45
81
|
---
|
|
46
82
|
|
|
47
83
|
## Setup
|
|
@@ -148,14 +184,30 @@ If you want to use different fonts or load them differently, you can override th
|
|
|
148
184
|
|
|
149
185
|
### Import Components
|
|
150
186
|
|
|
187
|
+
You can import components in two ways:
|
|
188
|
+
|
|
189
|
+
**Option 1: Subpath Import (Recommended for single components)**
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
// Import only Button - only requires Button's peer dependencies
|
|
193
|
+
import { Button } from "@equal-experts/kuat-react/button";
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Option 2: Main Package Import**
|
|
197
|
+
|
|
151
198
|
```typescript
|
|
199
|
+
// Import from main package - requires all peer dependencies
|
|
152
200
|
import { Button } from "@equal-experts/kuat-react";
|
|
153
201
|
```
|
|
154
202
|
|
|
155
203
|
### Use in Your App
|
|
156
204
|
|
|
157
205
|
```tsx
|
|
158
|
-
|
|
206
|
+
// Recommended: Subpath import
|
|
207
|
+
import { Button } from "@equal-experts/kuat-react/button";
|
|
208
|
+
|
|
209
|
+
// Or: Main package import
|
|
210
|
+
// import { Button } from "@equal-experts/kuat-react";
|
|
159
211
|
|
|
160
212
|
function App() {
|
|
161
213
|
return (
|
|
@@ -379,10 +431,43 @@ function CustomButton({ className, ...props }) {
|
|
|
379
431
|
|
|
380
432
|
## Additional Resources
|
|
381
433
|
|
|
382
|
-
- **Design System Documentation**: See [../../docs/agent/design/design-system.md](../../docs/agent/design/design-system.md)
|
|
383
|
-
- **Component Guidelines**: See [../../docs/agent/technical/component-guidelines.md](../../docs/agent/technical/component-guidelines.md)
|
|
384
434
|
- **shadcn/ui Documentation**: [https://ui.shadcn.com](https://ui.shadcn.com)
|
|
385
435
|
- **Tailwind CSS v4**: [https://tailwindcss.com](https://tailwindcss.com)
|
|
436
|
+
- **Radix UI Documentation**: [https://www.radix-ui.com](https://www.radix-ui.com)
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## AI Agent Documentation
|
|
441
|
+
|
|
442
|
+
This package includes AI-friendly documentation in the `docs/` directory, optimized for LLM consumption.
|
|
443
|
+
|
|
444
|
+
### Included Documentation
|
|
445
|
+
|
|
446
|
+
- **[Design System](./docs/design/)** - Colors, typography, spacing, borders, and design tokens
|
|
447
|
+
- **[Component Guidelines](./docs/components/guidelines.md)** - Component development patterns and best practices
|
|
448
|
+
- **[Content Guidelines](./docs/content/)** - Content writing guidelines for marketing and product UX
|
|
449
|
+
|
|
450
|
+
### Accessing Documentation
|
|
451
|
+
|
|
452
|
+
The documentation is available in your `node_modules` after installation:
|
|
453
|
+
|
|
454
|
+
```
|
|
455
|
+
node_modules/@equal-experts/kuat-react/docs/
|
|
456
|
+
├── design/ # Design system guidelines
|
|
457
|
+
├── components/ # Component patterns
|
|
458
|
+
└── content/ # Content writing guidelines
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### For AI Agents
|
|
462
|
+
|
|
463
|
+
You can reference this documentation in your `.cursorrules` or similar configuration:
|
|
464
|
+
|
|
465
|
+
```
|
|
466
|
+
# Kuat Design System Documentation
|
|
467
|
+
- Design tokens: node_modules/@equal-experts/kuat-react/docs/design/
|
|
468
|
+
- Component patterns: node_modules/@equal-experts/kuat-react/docs/components/
|
|
469
|
+
- Brand colors available: EE Blue, Tech Blue, Transform Teal, Equal Ember
|
|
470
|
+
```
|
|
386
471
|
|
|
387
472
|
---
|
|
388
473
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import * as a from "@radix-ui/react-accordion";
|
|
4
|
+
import { ChevronDown as d } from "lucide-react";
|
|
5
|
+
import { c as i } from "./styles-qaFjX9_3.js";
|
|
6
|
+
const w = a.Root, m = s.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
7
|
+
a.Item,
|
|
8
|
+
{
|
|
9
|
+
ref: r,
|
|
10
|
+
className: i("border-b", e),
|
|
11
|
+
...o
|
|
12
|
+
}
|
|
13
|
+
));
|
|
14
|
+
m.displayName = "AccordionItem";
|
|
15
|
+
const l = s.forwardRef(({ className: e, children: o, ...r }, n) => /* @__PURE__ */ t(a.Header, { className: "flex", children: /* @__PURE__ */ c(
|
|
16
|
+
a.Trigger,
|
|
17
|
+
{
|
|
18
|
+
ref: n,
|
|
19
|
+
className: i(
|
|
20
|
+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 ",
|
|
21
|
+
e
|
|
22
|
+
),
|
|
23
|
+
...r,
|
|
24
|
+
children: [
|
|
25
|
+
o,
|
|
26
|
+
/* @__PURE__ */ t(d, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
) }));
|
|
30
|
+
l.displayName = a.Trigger.displayName;
|
|
31
|
+
const f = s.forwardRef(({ className: e, children: o, ...r }, n) => /* @__PURE__ */ t(
|
|
32
|
+
a.Content,
|
|
33
|
+
{
|
|
34
|
+
ref: n,
|
|
35
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
36
|
+
...r,
|
|
37
|
+
children: /* @__PURE__ */ t("div", { className: i("pb-4 pt-0", e), children: o })
|
|
38
|
+
}
|
|
39
|
+
));
|
|
40
|
+
f.displayName = a.Content.displayName;
|
|
41
|
+
export {
|
|
42
|
+
w as A,
|
|
43
|
+
m as a,
|
|
44
|
+
l as b,
|
|
45
|
+
f as c
|
|
46
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx as s, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import * as t from "@radix-ui/react-alert-dialog";
|
|
4
|
+
import { c as l } from "./styles-qaFjX9_3.js";
|
|
5
|
+
import { b as r } from "./button-X-yV4Iwq.js";
|
|
6
|
+
const w = t.Root, b = t.Trigger, m = t.Portal, d = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ s(
|
|
7
|
+
t.Overlay,
|
|
8
|
+
{
|
|
9
|
+
className: l(
|
|
10
|
+
"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",
|
|
11
|
+
a
|
|
12
|
+
),
|
|
13
|
+
...e,
|
|
14
|
+
ref: o
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
d.displayName = t.Overlay.displayName;
|
|
18
|
+
const c = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ n(m, { children: [
|
|
19
|
+
/* @__PURE__ */ s(d, {}),
|
|
20
|
+
/* @__PURE__ */ s(
|
|
21
|
+
t.Content,
|
|
22
|
+
{
|
|
23
|
+
ref: o,
|
|
24
|
+
className: l(
|
|
25
|
+
"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",
|
|
26
|
+
a
|
|
27
|
+
),
|
|
28
|
+
...e
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
] }));
|
|
32
|
+
c.displayName = t.Content.displayName;
|
|
33
|
+
const f = ({
|
|
34
|
+
className: a,
|
|
35
|
+
...e
|
|
36
|
+
}) => /* @__PURE__ */ s(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: l(
|
|
40
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
41
|
+
a
|
|
42
|
+
),
|
|
43
|
+
...e
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
f.displayName = "AlertDialogHeader";
|
|
47
|
+
const p = ({
|
|
48
|
+
className: a,
|
|
49
|
+
...e
|
|
50
|
+
}) => /* @__PURE__ */ s(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
className: l(
|
|
54
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
55
|
+
a
|
|
56
|
+
),
|
|
57
|
+
...e
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
p.displayName = "AlertDialogFooter";
|
|
61
|
+
const g = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ s(
|
|
62
|
+
t.Title,
|
|
63
|
+
{
|
|
64
|
+
ref: o,
|
|
65
|
+
className: l("text-lg font-semibold", a),
|
|
66
|
+
...e
|
|
67
|
+
}
|
|
68
|
+
));
|
|
69
|
+
g.displayName = t.Title.displayName;
|
|
70
|
+
const N = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ s(
|
|
71
|
+
t.Description,
|
|
72
|
+
{
|
|
73
|
+
ref: o,
|
|
74
|
+
className: l("text-sm text-muted-foreground", a),
|
|
75
|
+
...e
|
|
76
|
+
}
|
|
77
|
+
));
|
|
78
|
+
N.displayName = t.Description.displayName;
|
|
79
|
+
const y = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ s(
|
|
80
|
+
t.Action,
|
|
81
|
+
{
|
|
82
|
+
ref: o,
|
|
83
|
+
className: l(r(), a),
|
|
84
|
+
...e
|
|
85
|
+
}
|
|
86
|
+
));
|
|
87
|
+
y.displayName = t.Action.displayName;
|
|
88
|
+
const x = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ s(
|
|
89
|
+
t.Cancel,
|
|
90
|
+
{
|
|
91
|
+
ref: o,
|
|
92
|
+
className: l(
|
|
93
|
+
r({ variant: "outline" }),
|
|
94
|
+
"mt-2 sm:mt-0",
|
|
95
|
+
a
|
|
96
|
+
),
|
|
97
|
+
...e
|
|
98
|
+
}
|
|
99
|
+
));
|
|
100
|
+
x.displayName = t.Cancel.displayName;
|
|
101
|
+
export {
|
|
102
|
+
w as A,
|
|
103
|
+
m as a,
|
|
104
|
+
d as b,
|
|
105
|
+
b as c,
|
|
106
|
+
c as d,
|
|
107
|
+
f as e,
|
|
108
|
+
p as f,
|
|
109
|
+
g,
|
|
110
|
+
N as h,
|
|
111
|
+
y as i,
|
|
112
|
+
x as j
|
|
113
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { cn } from './lib/utils';
|
|
2
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './components/ui/alert-dialog';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { c as e } from "./styles-qaFjX9_3.js";
|
|
2
|
+
import { A as o, i as t, j as i, d as g, h as s, f as A, e as D, b as c, a as n, g as f, c as p } from "./alert-dialog-C769FFOM.js";
|
|
3
|
+
export {
|
|
4
|
+
o as AlertDialog,
|
|
5
|
+
t as AlertDialogAction,
|
|
6
|
+
i as AlertDialogCancel,
|
|
7
|
+
g as AlertDialogContent,
|
|
8
|
+
s as AlertDialogDescription,
|
|
9
|
+
A as AlertDialogFooter,
|
|
10
|
+
D as AlertDialogHeader,
|
|
11
|
+
c as AlertDialogOverlay,
|
|
12
|
+
n as AlertDialogPortal,
|
|
13
|
+
f as AlertDialogTitle,
|
|
14
|
+
p as AlertDialogTrigger,
|
|
15
|
+
e as cn
|
|
16
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as o } from "./index-D5fkjZ2l.js";
|
|
3
|
+
import { c as a } from "./styles-qaFjX9_3.js";
|
|
4
|
+
const s = o(
|
|
5
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
10
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
11
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
12
|
+
outline: "text-foreground"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: "default"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
function u({ className: r, variant: t, ...e }) {
|
|
21
|
+
return /* @__PURE__ */ n("div", { className: a(s({ variant: t }), r), ...e });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
u as B,
|
|
25
|
+
s as b
|
|
26
|
+
};
|
package/dist/badge.d.ts
ADDED
package/dist/badge.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { Slot as d } from "@radix-ui/react-slot";
|
|
4
|
+
import { c } from "./index-D5fkjZ2l.js";
|
|
5
|
+
import { c as u } from "./styles-qaFjX9_3.js";
|
|
6
|
+
const f = c(
|
|
7
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
13
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
14
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
16
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: "h-10 px-4 py-2",
|
|
20
|
+
sm: "h-9 rounded-md px-3",
|
|
21
|
+
lg: "h-11 rounded-md px-8",
|
|
22
|
+
icon: "h-10 w-10"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
variant: "default",
|
|
27
|
+
size: "default"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
), g = a.forwardRef(
|
|
31
|
+
({ className: e, variant: r, size: t, asChild: o = !1, ...n }, i) => /* @__PURE__ */ s(
|
|
32
|
+
o ? d : "button",
|
|
33
|
+
{
|
|
34
|
+
className: u(f({ variant: r, size: t, className: e })),
|
|
35
|
+
ref: i,
|
|
36
|
+
...n
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
);
|
|
40
|
+
g.displayName = "Button";
|
|
41
|
+
export {
|
|
42
|
+
g as B,
|
|
43
|
+
f as b
|
|
44
|
+
};
|
package/dist/button.d.ts
ADDED
package/dist/button.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
+
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
+
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
|
+
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
6
|
+
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const AlertDialogHeader: {
|
|
9
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const AlertDialogFooter: {
|
|
13
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { a as O } from "./styles-qaFjX9_3.js";
|
|
2
|
+
const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
|
|
3
|
+
var u;
|
|
4
|
+
if ((l == null ? void 0 : l.variants) == null) return y(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
5
|
+
const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
|
|
6
|
+
const a = n == null ? void 0 : n[t], s = d == null ? void 0 : d[t];
|
|
7
|
+
if (a === null) return null;
|
|
8
|
+
const i = m(a) || m(s);
|
|
9
|
+
return r[t][i];
|
|
10
|
+
}), v = n && Object.entries(n).reduce((t, a) => {
|
|
11
|
+
let [s, i] = a;
|
|
12
|
+
return i === void 0 || (t[s] = i), t;
|
|
13
|
+
}, {}), N = l == null || (u = l.compoundVariants) === null || u === void 0 ? void 0 : u.reduce((t, a) => {
|
|
14
|
+
let { class: s, className: i, ...f } = a;
|
|
15
|
+
return Object.entries(f).every((C) => {
|
|
16
|
+
let [c, o] = C;
|
|
17
|
+
return Array.isArray(o) ? o.includes({
|
|
18
|
+
...d,
|
|
19
|
+
...v
|
|
20
|
+
}[c]) : {
|
|
21
|
+
...d,
|
|
22
|
+
...v
|
|
23
|
+
}[c] === o;
|
|
24
|
+
}) ? [
|
|
25
|
+
...t,
|
|
26
|
+
s,
|
|
27
|
+
i
|
|
28
|
+
] : t;
|
|
29
|
+
}, []);
|
|
30
|
+
return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
j as c
|
|
34
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { cn } from './lib/utils';
|
|
2
2
|
export { Button, buttonVariants } from './components/ui/button';
|
|
3
3
|
export type { ButtonProps } from './components/ui/button';
|
|
4
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from './components/ui/accordion';
|
|
5
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './components/ui/alert-dialog';
|
|
6
|
+
export { Badge, badgeVariants } from './components/ui/badge';
|
|
7
|
+
export type { BadgeProps } from './components/ui/badge';
|