@livo-tv/blocks 1.38.0 → 1.38.1-pr.10.38bcdd8
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 +3 -14
- package/package.json +7 -107
- package/dist/ui/alert-dialog.d.ts +0 -15
- package/dist/ui/alert-dialog.js +0 -137
- package/dist/ui/alert-dialog.js.map +0 -1
- package/dist/ui/alert.d.ts +0 -11
- package/dist/ui/alert.js +0 -57
- package/dist/ui/alert.js.map +0 -1
- package/dist/ui/avatar.d.ts +0 -13
- package/dist/ui/avatar.js +0 -105
- package/dist/ui/avatar.js.map +0 -1
- package/dist/ui/badge.d.ts +0 -13
- package/dist/ui/badge.js +0 -33
- package/dist/ui/badge.js.map +0 -1
- package/dist/ui/breadcrumb.d.ts +0 -12
- package/dist/ui/breadcrumb.js +0 -121
- package/dist/ui/breadcrumb.js.map +0 -1
- package/dist/ui/bubble.d.ts +0 -19
- package/dist/ui/bubble.js +0 -120
- package/dist/ui/bubble.js.map +0 -1
- package/dist/ui/button.d.ts +0 -12
- package/dist/ui/button.js +0 -59
- package/dist/ui/button.js.map +0 -1
- package/dist/ui/card.d.ts +0 -10
- package/dist/ui/card.js +0 -55
- package/dist/ui/card.js.map +0 -1
- package/dist/ui/collapsible.d.ts +0 -8
- package/dist/ui/collapsible.js +0 -17
- package/dist/ui/collapsible.js.map +0 -1
- package/dist/ui/dialog.d.ts +0 -16
- package/dist/ui/dialog.js +0 -125
- package/dist/ui/dialog.js.map +0 -1
- package/dist/ui/dropdown-menu.d.ts +0 -31
- package/dist/ui/dropdown-menu.js +0 -244
- package/dist/ui/dropdown-menu.js.map +0 -1
- package/dist/ui/input-otp.d.ts +0 -39
- package/dist/ui/input-otp.js +0 -53
- package/dist/ui/input-otp.js.map +0 -1
- package/dist/ui/input.d.ts +0 -5
- package/dist/ui/input.js +0 -28
- package/dist/ui/input.js.map +0 -1
- package/dist/ui/label.d.ts +0 -7
- package/dist/ui/label.js +0 -29
- package/dist/ui/label.js.map +0 -1
- package/dist/ui/message.d.ts +0 -12
- package/dist/ui/message.js +0 -93
- package/dist/ui/message.js.map +0 -1
- package/dist/ui/progress.d.ts +0 -9
- package/dist/ui/progress.js +0 -41
- package/dist/ui/progress.js.map +0 -1
- package/dist/ui/separator.d.ts +0 -6
- package/dist/ui/separator.js +0 -31
- package/dist/ui/separator.js.map +0 -1
- package/dist/ui/sheet.d.ts +0 -16
- package/dist/ui/sheet.js +0 -127
- package/dist/ui/sheet.js.map +0 -1
- package/dist/ui/sidebar.d.ts +0 -69
- package/dist/ui/sidebar.js +0 -624
- package/dist/ui/sidebar.js.map +0 -1
- package/dist/ui/skeleton.d.ts +0 -5
- package/dist/ui/skeleton.js +0 -26
- package/dist/ui/skeleton.js.map +0 -1
- package/dist/ui/sonner.d.ts +0 -6
- package/dist/ui/sonner.js +0 -25
- package/dist/ui/sonner.js.map +0 -1
- package/dist/ui/switch.d.ts +0 -8
- package/dist/ui/switch.js +0 -38
- package/dist/ui/switch.js.map +0 -1
- package/dist/ui/table.d.ts +0 -11
- package/dist/ui/table.js +0 -85
- package/dist/ui/table.js.map +0 -1
- package/dist/ui/tooltip.d.ts +0 -9
- package/dist/ui/tooltip.js +0 -67
- package/dist/ui/tooltip.js.map +0 -1
- package/dist/ui/use-mobile.d.ts +0 -3
- package/dist/ui/use-mobile.js +0 -24
- package/dist/ui/use-mobile.js.map +0 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Optional peers:
|
|
|
22
22
|
Scan the built package so utilities are not purged:
|
|
23
23
|
|
|
24
24
|
```css
|
|
25
|
-
@source "../../node_modules/@livo-tv/blocks/dist
|
|
25
|
+
@source "../../node_modules/@livo-tv/blocks/dist/*.{js,cjs,mjs}";
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Import the shared light and dark palette. Do not paste `:root` / `.dark` color tokens into the app:
|
|
@@ -32,18 +32,7 @@ Import the shared light and dark palette. Do not paste `:root` / `.dark` color t
|
|
|
32
32
|
@import "@livo-tv/blocks/theme.css";
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`theme.css` is CSS only. It does not pull the client barrel or `framer-motion`.
|
|
36
|
-
|
|
37
|
-
## UI primitives
|
|
38
|
-
|
|
39
|
-
Import each shadcn primitive from its own entry. A button import does not load the sidebar, the toast library, or the main chrome barrel:
|
|
40
|
-
|
|
41
|
-
```tsx
|
|
42
|
-
import { Button } from "@livo-tv/blocks/ui/button";
|
|
43
|
-
import { Dialog, DialogContent } from "@livo-tv/blocks/ui/dialog";
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
`@livo-tv/blocks/ui/sonner` needs the `next-themes` peer. These entries are the same components the web apps render. Do not copy them into `src/components/ui`. Product chrome (empty state, bell, upload, legal) stays on the main entry.
|
|
35
|
+
`theme.css` is CSS only. It does not pull the client barrel or `framer-motion`.
|
|
47
36
|
|
|
48
37
|
## Video
|
|
49
38
|
|
|
@@ -109,7 +98,7 @@ Defaults are English. Pass `labels` (and AvatarEditor `labels`) from next-intl.
|
|
|
109
98
|
|
|
110
99
|
Stories live under `src/**/*.stories.tsx`. They are not part of the published package and they are not part of `pnpm run ci:check`.
|
|
111
100
|
|
|
112
|
-
**Foundations** shows the shared palette, type scale, and the Lucide icons the web UIs import. **Components**
|
|
101
|
+
**Foundations** shows the shared palette, type scale, and the Lucide icons the web UIs import. **Components** shows the shadcn copies those UIs render (the customer app set, plus auth `alert` and `input-otp`). Those files live in `src/catalog/` and are not exported. **Chrome** is still the published `@livo-tv/blocks` primitives.
|
|
113
102
|
|
|
114
103
|
```bash
|
|
115
104
|
pnpm storybook
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livo-tv/blocks",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.1-pr.10.38bcdd8",
|
|
4
4
|
"description": "Shared UI components for Livo applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -47,107 +47,7 @@
|
|
|
47
47
|
"default": "./dist/video.cjs"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"./theme.css": "./src/theme.css"
|
|
51
|
-
"./ui/alert": {
|
|
52
|
-
"types": "./dist/ui/alert.d.ts",
|
|
53
|
-
"default": "./dist/ui/alert.js"
|
|
54
|
-
},
|
|
55
|
-
"./ui/alert-dialog": {
|
|
56
|
-
"types": "./dist/ui/alert-dialog.d.ts",
|
|
57
|
-
"default": "./dist/ui/alert-dialog.js"
|
|
58
|
-
},
|
|
59
|
-
"./ui/avatar": {
|
|
60
|
-
"types": "./dist/ui/avatar.d.ts",
|
|
61
|
-
"default": "./dist/ui/avatar.js"
|
|
62
|
-
},
|
|
63
|
-
"./ui/badge": {
|
|
64
|
-
"types": "./dist/ui/badge.d.ts",
|
|
65
|
-
"default": "./dist/ui/badge.js"
|
|
66
|
-
},
|
|
67
|
-
"./ui/breadcrumb": {
|
|
68
|
-
"types": "./dist/ui/breadcrumb.d.ts",
|
|
69
|
-
"default": "./dist/ui/breadcrumb.js"
|
|
70
|
-
},
|
|
71
|
-
"./ui/bubble": {
|
|
72
|
-
"types": "./dist/ui/bubble.d.ts",
|
|
73
|
-
"default": "./dist/ui/bubble.js"
|
|
74
|
-
},
|
|
75
|
-
"./ui/button": {
|
|
76
|
-
"types": "./dist/ui/button.d.ts",
|
|
77
|
-
"default": "./dist/ui/button.js"
|
|
78
|
-
},
|
|
79
|
-
"./ui/card": {
|
|
80
|
-
"types": "./dist/ui/card.d.ts",
|
|
81
|
-
"default": "./dist/ui/card.js"
|
|
82
|
-
},
|
|
83
|
-
"./ui/collapsible": {
|
|
84
|
-
"types": "./dist/ui/collapsible.d.ts",
|
|
85
|
-
"default": "./dist/ui/collapsible.js"
|
|
86
|
-
},
|
|
87
|
-
"./ui/dialog": {
|
|
88
|
-
"types": "./dist/ui/dialog.d.ts",
|
|
89
|
-
"default": "./dist/ui/dialog.js"
|
|
90
|
-
},
|
|
91
|
-
"./ui/dropdown-menu": {
|
|
92
|
-
"types": "./dist/ui/dropdown-menu.d.ts",
|
|
93
|
-
"default": "./dist/ui/dropdown-menu.js"
|
|
94
|
-
},
|
|
95
|
-
"./ui/input": {
|
|
96
|
-
"types": "./dist/ui/input.d.ts",
|
|
97
|
-
"default": "./dist/ui/input.js"
|
|
98
|
-
},
|
|
99
|
-
"./ui/input-otp": {
|
|
100
|
-
"types": "./dist/ui/input-otp.d.ts",
|
|
101
|
-
"default": "./dist/ui/input-otp.js"
|
|
102
|
-
},
|
|
103
|
-
"./ui/label": {
|
|
104
|
-
"types": "./dist/ui/label.d.ts",
|
|
105
|
-
"default": "./dist/ui/label.js"
|
|
106
|
-
},
|
|
107
|
-
"./ui/message": {
|
|
108
|
-
"types": "./dist/ui/message.d.ts",
|
|
109
|
-
"default": "./dist/ui/message.js"
|
|
110
|
-
},
|
|
111
|
-
"./ui/progress": {
|
|
112
|
-
"types": "./dist/ui/progress.d.ts",
|
|
113
|
-
"default": "./dist/ui/progress.js"
|
|
114
|
-
},
|
|
115
|
-
"./ui/separator": {
|
|
116
|
-
"types": "./dist/ui/separator.d.ts",
|
|
117
|
-
"default": "./dist/ui/separator.js"
|
|
118
|
-
},
|
|
119
|
-
"./ui/sheet": {
|
|
120
|
-
"types": "./dist/ui/sheet.d.ts",
|
|
121
|
-
"default": "./dist/ui/sheet.js"
|
|
122
|
-
},
|
|
123
|
-
"./ui/sidebar": {
|
|
124
|
-
"types": "./dist/ui/sidebar.d.ts",
|
|
125
|
-
"default": "./dist/ui/sidebar.js"
|
|
126
|
-
},
|
|
127
|
-
"./ui/skeleton": {
|
|
128
|
-
"types": "./dist/ui/skeleton.d.ts",
|
|
129
|
-
"default": "./dist/ui/skeleton.js"
|
|
130
|
-
},
|
|
131
|
-
"./ui/sonner": {
|
|
132
|
-
"types": "./dist/ui/sonner.d.ts",
|
|
133
|
-
"default": "./dist/ui/sonner.js"
|
|
134
|
-
},
|
|
135
|
-
"./ui/switch": {
|
|
136
|
-
"types": "./dist/ui/switch.d.ts",
|
|
137
|
-
"default": "./dist/ui/switch.js"
|
|
138
|
-
},
|
|
139
|
-
"./ui/table": {
|
|
140
|
-
"types": "./dist/ui/table.d.ts",
|
|
141
|
-
"default": "./dist/ui/table.js"
|
|
142
|
-
},
|
|
143
|
-
"./ui/tooltip": {
|
|
144
|
-
"types": "./dist/ui/tooltip.d.ts",
|
|
145
|
-
"default": "./dist/ui/tooltip.js"
|
|
146
|
-
},
|
|
147
|
-
"./ui/use-mobile": {
|
|
148
|
-
"types": "./dist/ui/use-mobile.d.ts",
|
|
149
|
-
"default": "./dist/ui/use-mobile.js"
|
|
150
|
-
}
|
|
50
|
+
"./theme.css": "./src/theme.css"
|
|
151
51
|
},
|
|
152
52
|
"files": [
|
|
153
53
|
"dist",
|
|
@@ -158,7 +58,7 @@
|
|
|
158
58
|
"**/*.css"
|
|
159
59
|
],
|
|
160
60
|
"scripts": {
|
|
161
|
-
"build": "tsup &&
|
|
61
|
+
"build": "tsup && node scripts/prepend-use-client.mjs",
|
|
162
62
|
"dev": "tsup --watch",
|
|
163
63
|
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.storybook.json",
|
|
164
64
|
"lint": "eslint . --max-warnings=0",
|
|
@@ -235,27 +135,25 @@
|
|
|
235
135
|
}
|
|
236
136
|
},
|
|
237
137
|
"dependencies": {
|
|
238
|
-
"@base-ui/react": "^1.8.0",
|
|
239
138
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
240
139
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
241
140
|
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
242
|
-
"@radix-ui/react-label": "^2.1.15",
|
|
243
141
|
"@radix-ui/react-slider": "^1.3.6",
|
|
244
142
|
"@radix-ui/react-slot": "^1.1.1",
|
|
245
143
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
246
144
|
"class-variance-authority": "^0.7.1",
|
|
247
145
|
"clsx": "^2.1.1",
|
|
248
|
-
"input-otp": "^1.5.0",
|
|
249
|
-
"sonner": "^2.0.8",
|
|
250
146
|
"tailwind-merge": "^3.3.0",
|
|
251
147
|
"vaul": "^1.1.2"
|
|
252
148
|
},
|
|
253
149
|
"devDependencies": {
|
|
150
|
+
"@base-ui/react": "^1.8.0",
|
|
254
151
|
"@chromatic-com/storybook": "^5.3.1",
|
|
255
152
|
"@commitlint/cli": "^19.8.1",
|
|
256
153
|
"@commitlint/config-conventional": "^19.8.1",
|
|
257
154
|
"@eslint/js": "^9.26.0",
|
|
258
155
|
"@fontsource/inter": "^5.3.0",
|
|
156
|
+
"@radix-ui/react-label": "^2.1.15",
|
|
259
157
|
"@react-three/fiber": "9.7.0",
|
|
260
158
|
"@semantic-release/changelog": "^6.0.3",
|
|
261
159
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -280,6 +178,7 @@
|
|
|
280
178
|
"framer-motion": "^12.26.2",
|
|
281
179
|
"hls.js": "^1.6.16",
|
|
282
180
|
"husky": "^9.1.7",
|
|
181
|
+
"input-otp": "^1.5.0",
|
|
283
182
|
"jsdom": "^26.1.0",
|
|
284
183
|
"lint-staged": "^16.2.7",
|
|
285
184
|
"lucide-react": "^0.560.0",
|
|
@@ -288,6 +187,7 @@
|
|
|
288
187
|
"react": "^19.1.0",
|
|
289
188
|
"react-dom": "^19.1.0",
|
|
290
189
|
"semantic-release": "^25.0.2",
|
|
190
|
+
"sonner": "^2.0.8",
|
|
291
191
|
"storybook": "^10.6.0",
|
|
292
192
|
"tailwindcss": "4.1.17",
|
|
293
193
|
"three": "0.185.1",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
4
|
-
|
|
5
|
-
declare function AlertDialog({ ...props }: ComponentProps<typeof AlertDialogPrimitive.Root>): React.JSX.Element;
|
|
6
|
-
declare function AlertDialogTrigger({ ...props }: ComponentProps<typeof AlertDialogPrimitive.Trigger>): React.JSX.Element;
|
|
7
|
-
declare function AlertDialogContent({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Content>): React.JSX.Element;
|
|
8
|
-
declare function AlertDialogHeader({ className, ...props }: ComponentProps<"div">): React.JSX.Element;
|
|
9
|
-
declare function AlertDialogFooter({ className, ...props }: ComponentProps<"div">): React.JSX.Element;
|
|
10
|
-
declare function AlertDialogTitle({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
|
|
11
|
-
declare function AlertDialogDescription({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
|
|
12
|
-
declare function AlertDialogAction({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Action>): React.JSX.Element;
|
|
13
|
-
declare function AlertDialogCancel({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Cancel>): React.JSX.Element;
|
|
14
|
-
|
|
15
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger };
|
package/dist/ui/alert-dialog.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { buttonVariants } from './button.js';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
function cn(...inputs) {
|
|
9
|
-
return twMerge(clsx(inputs));
|
|
10
|
-
}
|
|
11
|
-
function AlertDialog({
|
|
12
|
-
...props
|
|
13
|
-
}) {
|
|
14
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
15
|
-
}
|
|
16
|
-
function AlertDialogTrigger({
|
|
17
|
-
...props
|
|
18
|
-
}) {
|
|
19
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
20
|
-
}
|
|
21
|
-
function AlertDialogPortal({
|
|
22
|
-
...props
|
|
23
|
-
}) {
|
|
24
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
25
|
-
}
|
|
26
|
-
function AlertDialogOverlay({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}) {
|
|
30
|
-
return /* @__PURE__ */ jsx(
|
|
31
|
-
AlertDialogPrimitive.Overlay,
|
|
32
|
-
{
|
|
33
|
-
"data-slot": "alert-dialog-overlay",
|
|
34
|
-
className: cn(
|
|
35
|
-
"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",
|
|
36
|
-
className
|
|
37
|
-
),
|
|
38
|
-
...props
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
function AlertDialogContent({
|
|
43
|
-
className,
|
|
44
|
-
...props
|
|
45
|
-
}) {
|
|
46
|
-
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
47
|
-
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
48
|
-
/* @__PURE__ */ jsx(
|
|
49
|
-
AlertDialogPrimitive.Content,
|
|
50
|
-
{
|
|
51
|
-
"data-slot": "alert-dialog-content",
|
|
52
|
-
className: cn(
|
|
53
|
-
"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",
|
|
54
|
-
className
|
|
55
|
-
),
|
|
56
|
-
...props
|
|
57
|
-
}
|
|
58
|
-
)
|
|
59
|
-
] });
|
|
60
|
-
}
|
|
61
|
-
function AlertDialogHeader({ className, ...props }) {
|
|
62
|
-
return /* @__PURE__ */ jsx(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
"data-slot": "alert-dialog-header",
|
|
66
|
-
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
67
|
-
...props
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
function AlertDialogFooter({ className, ...props }) {
|
|
72
|
-
return /* @__PURE__ */ jsx(
|
|
73
|
-
"div",
|
|
74
|
-
{
|
|
75
|
-
"data-slot": "alert-dialog-footer",
|
|
76
|
-
className: cn(
|
|
77
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
78
|
-
className
|
|
79
|
-
),
|
|
80
|
-
...props
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
function AlertDialogTitle({
|
|
85
|
-
className,
|
|
86
|
-
...props
|
|
87
|
-
}) {
|
|
88
|
-
return /* @__PURE__ */ jsx(
|
|
89
|
-
AlertDialogPrimitive.Title,
|
|
90
|
-
{
|
|
91
|
-
"data-slot": "alert-dialog-title",
|
|
92
|
-
className: cn("text-lg font-semibold", className),
|
|
93
|
-
...props
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
function AlertDialogDescription({
|
|
98
|
-
className,
|
|
99
|
-
...props
|
|
100
|
-
}) {
|
|
101
|
-
return /* @__PURE__ */ jsx(
|
|
102
|
-
AlertDialogPrimitive.Description,
|
|
103
|
-
{
|
|
104
|
-
"data-slot": "alert-dialog-description",
|
|
105
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
106
|
-
...props
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
function AlertDialogAction({
|
|
111
|
-
className,
|
|
112
|
-
...props
|
|
113
|
-
}) {
|
|
114
|
-
return /* @__PURE__ */ jsx(
|
|
115
|
-
AlertDialogPrimitive.Action,
|
|
116
|
-
{
|
|
117
|
-
className: cn(buttonVariants(), className),
|
|
118
|
-
...props
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
function AlertDialogCancel({
|
|
123
|
-
className,
|
|
124
|
-
...props
|
|
125
|
-
}) {
|
|
126
|
-
return /* @__PURE__ */ jsx(
|
|
127
|
-
AlertDialogPrimitive.Cancel,
|
|
128
|
-
{
|
|
129
|
-
className: cn(buttonVariants({ variant: "outline" }), className),
|
|
130
|
-
...props
|
|
131
|
-
}
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger };
|
|
136
|
-
//# sourceMappingURL=alert-dialog.js.map
|
|
137
|
-
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/alert-dialog.tsx"],"names":[],"mappings":"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","file":"alert-dialog.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { buttonVariants } from \"./button\";\n\nfunction AlertDialog({\n\t...props\n}: ComponentProps<typeof AlertDialogPrimitive.Root>) {\n\treturn <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n\t...props\n}: ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n\t);\n}\n\nfunction AlertDialogPortal({\n\t...props\n}: ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n\t);\n}\n\nfunction AlertDialogOverlay({\n\tclassName,\n\t...props\n}: ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Overlay\n\t\t\tdata-slot=\"alert-dialog-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t\"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\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({\n\tclassName,\n\t...props\n}: ComponentProps<typeof AlertDialogPrimitive.Content>) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<AlertDialogPrimitive.Content\n\t\t\t\tdata-slot=\"alert-dialog-content\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"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\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({ className, ...props }: ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({ className, ...props }: ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-footer\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({\n\tclassName,\n\t...props\n}: ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot=\"alert-dialog-title\"\n\t\t\tclassName={cn(\"text-lg font-semibold\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({\n\tclassName,\n\t...props\n}: ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot=\"alert-dialog-description\"\n\t\t\tclassName={cn(\"text-muted-foreground text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogAction({\n\tclassName,\n\t...props\n}: ComponentProps<typeof AlertDialogPrimitive.Action>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Action\n\t\t\tclassName={cn(buttonVariants(), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogCancel({\n\tclassName,\n\t...props\n}: ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Cancel\n\t\t\tclassName={cn(buttonVariants({ variant: \"outline\" }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n};\n"]}
|
package/dist/ui/alert.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
|
|
5
|
-
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
7
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
9
|
-
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
10
|
-
|
|
11
|
-
export { Alert, AlertDescription, AlertTitle };
|
package/dist/ui/alert.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { clsx } from 'clsx';
|
|
5
|
-
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
// src/ui/alert.tsx
|
|
9
|
-
function cn(...inputs) {
|
|
10
|
-
return twMerge(clsx(inputs));
|
|
11
|
-
}
|
|
12
|
-
var alertVariants = cva(
|
|
13
|
-
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
14
|
-
{
|
|
15
|
-
variants: {
|
|
16
|
-
variant: {
|
|
17
|
-
default: "bg-background text-foreground",
|
|
18
|
-
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {
|
|
22
|
-
variant: "default"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
var Alert = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
ref,
|
|
30
|
-
role: "alert",
|
|
31
|
-
className: cn(alertVariants({ variant }), className),
|
|
32
|
-
...props
|
|
33
|
-
}
|
|
34
|
-
));
|
|
35
|
-
Alert.displayName = "Alert";
|
|
36
|
-
var AlertTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
37
|
-
"h5",
|
|
38
|
-
{
|
|
39
|
-
ref,
|
|
40
|
-
className: cn("mb-1 font-medium leading-none tracking-tight", className),
|
|
41
|
-
...props
|
|
42
|
-
}
|
|
43
|
-
));
|
|
44
|
-
AlertTitle.displayName = "AlertTitle";
|
|
45
|
-
var AlertDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
46
|
-
"div",
|
|
47
|
-
{
|
|
48
|
-
ref,
|
|
49
|
-
className: cn("text-sm [&_p]:leading-relaxed", className),
|
|
50
|
-
...props
|
|
51
|
-
}
|
|
52
|
-
));
|
|
53
|
-
AlertDescription.displayName = "AlertDescription";
|
|
54
|
-
|
|
55
|
-
export { Alert, AlertDescription, AlertTitle };
|
|
56
|
-
//# sourceMappingURL=alert.js.map
|
|
57
|
-
//# sourceMappingURL=alert.js.map
|
package/dist/ui/alert.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/alert.tsx"],"names":[],"mappings":";;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACDA,IAAM,aAAA,GAAgB,GAAA;AAAA,EACrB,yKAAA;AAAA,EACA;AAAA,IACC,QAAA,EAAU;AAAA,MACT,OAAA,EAAS;AAAA,QACR,OAAA,EAAS,+BAAA;AAAA,QACT,WAAA,EACC;AAAA;AACF,KACD;AAAA,IACA,eAAA,EAAiB;AAAA,MAChB,OAAA,EAAS;AAAA;AACV;AAEF,CAAA;AAEA,IAAM,KAAA,GAAc,iBAGlB,CAAC,EAAE,WAAW,OAAA,EAAS,GAAG,KAAA,EAAM,EAAG,GAAA,qBACpC,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA,EAAK,OAAA;AAAA,IACL,WAAW,EAAA,CAAG,aAAA,CAAc,EAAE,OAAA,EAAS,GAAG,SAAS,CAAA;AAAA,IAClD,GAAG;AAAA;AACL,CACA;AACD,KAAA,CAAM,WAAA,GAAc,OAAA;AAEpB,IAAM,UAAA,GAAmB,iBAGvB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC3B,GAAA;AAAA,EAAC,IAAA;AAAA,EAAA;AAAA,IACA,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,8CAAA,EAAgD,SAAS,CAAA;AAAA,IACtE,GAAG;AAAA;AACL,CACA;AACD,UAAA,CAAW,WAAA,GAAc,YAAA;AAEzB,IAAM,gBAAA,GAAyB,iBAG7B,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC3B,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACA,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,IACvD,GAAG;AAAA;AACL,CACA;AACD,gBAAA,CAAiB,WAAA,GAAc,kBAAA","file":"alert.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../lib/utils\";\n\nconst alertVariants = cva(\n\t\"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-background text-foreground\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nconst Alert = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\trole=\"alert\"\n\t\tclassName={cn(alertVariants({ variant }), className)}\n\t\t{...props}\n\t/>\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n\t<h5\n\t\tref={ref}\n\t\tclassName={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n\t\t{...props}\n\t/>\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription };\n"]}
|
package/dist/ui/avatar.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
3
|
-
|
|
4
|
-
declare function Avatar({ className, size, ...props }: Avatar$1.Root.Props & {
|
|
5
|
-
size?: "default" | "sm" | "lg";
|
|
6
|
-
}): React.JSX.Element;
|
|
7
|
-
declare function AvatarImage({ className, ...props }: Avatar$1.Image.Props): React.JSX.Element;
|
|
8
|
-
declare function AvatarFallback({ className, ...props }: Avatar$1.Fallback.Props): React.JSX.Element;
|
|
9
|
-
declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
10
|
-
declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
-
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
-
|
|
13
|
-
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
package/dist/ui/avatar.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function cn(...inputs) {
|
|
8
|
-
return twMerge(clsx(inputs));
|
|
9
|
-
}
|
|
10
|
-
function Avatar({
|
|
11
|
-
className,
|
|
12
|
-
size = "default",
|
|
13
|
-
...props
|
|
14
|
-
}) {
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
Avatar$1.Root,
|
|
17
|
-
{
|
|
18
|
-
"data-slot": "avatar",
|
|
19
|
-
"data-size": size,
|
|
20
|
-
className: cn(
|
|
21
|
-
"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
|
|
22
|
-
className
|
|
23
|
-
),
|
|
24
|
-
...props
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
function AvatarImage({ className, ...props }) {
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
30
|
-
Avatar$1.Image,
|
|
31
|
-
{
|
|
32
|
-
"data-slot": "avatar-image",
|
|
33
|
-
className: cn(
|
|
34
|
-
"aspect-square size-full rounded-full object-cover",
|
|
35
|
-
className
|
|
36
|
-
),
|
|
37
|
-
...props
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
function AvatarFallback({
|
|
42
|
-
className,
|
|
43
|
-
...props
|
|
44
|
-
}) {
|
|
45
|
-
return /* @__PURE__ */ jsx(
|
|
46
|
-
Avatar$1.Fallback,
|
|
47
|
-
{
|
|
48
|
-
"data-slot": "avatar-fallback",
|
|
49
|
-
className: cn(
|
|
50
|
-
"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
51
|
-
className
|
|
52
|
-
),
|
|
53
|
-
...props
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
function AvatarBadge({ className, ...props }) {
|
|
58
|
-
return /* @__PURE__ */ jsx(
|
|
59
|
-
"span",
|
|
60
|
-
{
|
|
61
|
-
"data-slot": "avatar-badge",
|
|
62
|
-
className: cn(
|
|
63
|
-
"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
|
|
64
|
-
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
65
|
-
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
66
|
-
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
67
|
-
className
|
|
68
|
-
),
|
|
69
|
-
...props
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
function AvatarGroup({ className, ...props }) {
|
|
74
|
-
return /* @__PURE__ */ jsx(
|
|
75
|
-
"div",
|
|
76
|
-
{
|
|
77
|
-
"data-slot": "avatar-group",
|
|
78
|
-
className: cn(
|
|
79
|
-
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
80
|
-
className
|
|
81
|
-
),
|
|
82
|
-
...props
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
function AvatarGroupCount({
|
|
87
|
-
className,
|
|
88
|
-
...props
|
|
89
|
-
}) {
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
"div",
|
|
92
|
-
{
|
|
93
|
-
"data-slot": "avatar-group-count",
|
|
94
|
-
className: cn(
|
|
95
|
-
"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
96
|
-
className
|
|
97
|
-
),
|
|
98
|
-
...props
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
104
|
-
//# sourceMappingURL=avatar.js.map
|
|
105
|
-
//# sourceMappingURL=avatar.js.map
|
package/dist/ui/avatar.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/avatar.tsx"],"names":["AvatarPrimitive"],"mappings":";;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACEA,SAAS,MAAA,CAAO;AAAA,EACf,SAAA;AAAA,EACA,IAAA,GAAO,SAAA;AAAA,EACP,GAAG;AACJ,CAAA,EAEG;AACF,EAAA,uBACC,GAAA;AAAA,IAACA,QAAA,CAAgB,IAAA;AAAA,IAAhB;AAAA,MACA,WAAA,EAAU,QAAA;AAAA,MACV,WAAA,EAAW,IAAA;AAAA,MACX,SAAA,EAAW,EAAA;AAAA,QACV,uPAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AAC1E,EAAA,uBACC,GAAA;AAAA,IAACA,QAAA,CAAgB,KAAA;AAAA,IAAhB;AAAA,MACA,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,mDAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,cAAA,CAAe;AAAA,EACvB,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAmC;AAClC,EAAA,uBACC,GAAA;AAAA,IAACA,QAAA,CAAgB,QAAA;AAAA,IAAhB;AAAA,MACA,WAAA,EAAU,iBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,oIAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAiC;AAC3E,EAAA,uBACC,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,0KAAA;AAAA,QACA,+EAAA;AAAA,QACA,2FAAA;AAAA,QACA,+EAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AAC1E,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,qGAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,gBAAA,CAAiB;AAAA,EACzB,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAgC;AAC/B,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,oBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,0VAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF","file":"avatar.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Avatar as AvatarPrimitive } from \"@base-ui/react/avatar\";\n\nimport { cn } from \"../lib/utils\";\n\nfunction Avatar({\n\tclassName,\n\tsize = \"default\",\n\t...props\n}: AvatarPrimitive.Root.Props & {\n\tsize?: \"default\" | \"sm\" | \"lg\";\n}) {\n\treturn (\n\t\t<AvatarPrimitive.Root\n\t\t\tdata-slot=\"avatar\"\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {\n\treturn (\n\t\t<AvatarPrimitive.Image\n\t\t\tdata-slot=\"avatar-image\"\n\t\t\tclassName={cn(\n\t\t\t\t\"aspect-square size-full rounded-full object-cover\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarFallback({\n\tclassName,\n\t...props\n}: AvatarPrimitive.Fallback.Props) {\n\treturn (\n\t\t<AvatarPrimitive.Fallback\n\t\t\tdata-slot=\"avatar-fallback\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarBadge({ className, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"avatar-badge\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none\",\n\t\t\t\t\"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden\",\n\t\t\t\t\"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2\",\n\t\t\t\t\"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"avatar-group\"\n\t\t\tclassName={cn(\n\t\t\t\t\"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarGroupCount({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"avatar-group-count\"\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAvatar,\n\tAvatarImage,\n\tAvatarFallback,\n\tAvatarGroup,\n\tAvatarGroupCount,\n\tAvatarBadge,\n};\n"]}
|
package/dist/ui/badge.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
-
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
|
|
6
|
-
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "destructive" | "secondary" | "outline" | "success" | "warning" | null | undefined;
|
|
8
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
-
interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
10
|
-
}
|
|
11
|
-
declare function Badge({ className, variant, ...props }: BadgeProps): React.JSX.Element;
|
|
12
|
-
|
|
13
|
-
export { Badge, badgeVariants };
|
package/dist/ui/badge.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { cva } from 'class-variance-authority';
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
// src/ui/badge.tsx
|
|
8
|
-
function cn(...inputs) {
|
|
9
|
-
return twMerge(clsx(inputs));
|
|
10
|
-
}
|
|
11
|
-
var badgeVariants = cva(
|
|
12
|
-
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",
|
|
13
|
-
{
|
|
14
|
-
variants: {
|
|
15
|
-
variant: {
|
|
16
|
-
default: "border-transparent bg-primary text-primary-foreground",
|
|
17
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
18
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
19
|
-
outline: "text-foreground",
|
|
20
|
-
success: "border-transparent bg-chart-5/15 text-chart-5 dark:bg-chart-5/25",
|
|
21
|
-
warning: "border-transparent bg-chart-4/15 text-chart-4 dark:bg-chart-4/25"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: { variant: "default" }
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
function Badge({ className, variant, ...props }) {
|
|
28
|
-
return /* @__PURE__ */ jsx("span", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { Badge, badgeVariants };
|
|
32
|
-
//# sourceMappingURL=badge.js.map
|
|
33
|
-
//# sourceMappingURL=badge.js.map
|
package/dist/ui/badge.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/badge.tsx"],"names":[],"mappings":";;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACDA,IAAM,aAAA,GAAgB,GAAA;AAAA,EACrB,oGAAA;AAAA,EACA;AAAA,IACC,QAAA,EAAU;AAAA,MACT,OAAA,EAAS;AAAA,QACR,OAAA,EAAS,uDAAA;AAAA,QACT,SAAA,EAAW,2DAAA;AAAA,QACX,WAAA,EACC,+DAAA;AAAA,QACD,OAAA,EAAS,iBAAA;AAAA,QACT,OAAA,EACC,kEAAA;AAAA,QACD,OAAA,EACC;AAAA;AACF,KACD;AAAA,IACA,eAAA,EAAiB,EAAE,OAAA,EAAS,SAAA;AAAU;AAExC;AAKA,SAAS,MAAM,EAAE,SAAA,EAAW,OAAA,EAAS,GAAG,OAAM,EAAe;AAC5D,EAAA,uBACC,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,EAAA,CAAG,aAAA,CAAc,EAAE,OAAA,EAAS,CAAA,EAAG,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAEzE","file":"badge.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nconst badgeVariants = cva(\n\t\"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"border-transparent bg-primary text-primary-foreground\",\n\t\t\t\tsecondary: \"border-transparent bg-secondary text-secondary-foreground\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"border-transparent bg-destructive text-destructive-foreground\",\n\t\t\t\toutline: \"text-foreground\",\n\t\t\t\tsuccess:\n\t\t\t\t\t\"border-transparent bg-chart-5/15 text-chart-5 dark:bg-chart-5/25\",\n\t\t\t\twarning:\n\t\t\t\t\t\"border-transparent bg-chart-4/15 text-chart-4 dark:bg-chart-4/25\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: { variant: \"default\" },\n\t},\n);\n\ninterface BadgeProps\n\textends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n\treturn (\n\t\t<span className={cn(badgeVariants({ variant }), className)} {...props} />\n\t);\n}\n\nexport { Badge, badgeVariants };\n"]}
|