@labpane/ui 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -12
- package/dist/chunk-NR3PLNO7.js +100 -0
- package/dist/chunk-NR3PLNO7.js.map +7 -0
- package/dist/index.js +6829 -610
- package/dist/index.js.map +4 -4
- package/dist/styles.css +1 -1
- package/dist/terminal.js +1 -1
- package/dist/terminal.js.map +1 -1
- package/dist/ui/alert.d.ts +13 -0
- package/dist/ui/app-menu.d.ts +6 -1
- package/dist/ui/avatar.d.ts +11 -0
- package/dist/ui/badge.d.ts +17 -0
- package/dist/ui/breadcrumb.d.ts +11 -0
- package/dist/ui/browser-layout.d.ts +20 -0
- package/dist/ui/button.d.ts +27 -0
- package/dist/ui/card.d.ts +15 -0
- package/dist/ui/chart-frame.d.ts +4 -0
- package/dist/ui/checkbox.d.ts +4 -0
- package/dist/ui/classes.d.ts +5 -0
- package/dist/ui/command.d.ts +82 -0
- package/dist/ui/confirm-dialog.d.ts +28 -0
- package/dist/ui/copy-button.d.ts +7 -0
- package/dist/ui/dialog.d.ts +8 -17
- package/dist/ui/discard-dialog.d.ts +6 -0
- package/dist/ui/email-thread.d.ts +35 -0
- package/dist/ui/empty.d.ts +14 -0
- package/dist/ui/field.d.ts +26 -0
- package/dist/ui/file-input.d.ts +6 -0
- package/dist/ui/flame-graph-model.d.ts +23 -0
- package/dist/ui/flame-graph.d.ts +15 -0
- package/dist/ui/form-fields.d.ts +1 -1
- package/dist/ui/histogram.d.ts +23 -0
- package/dist/ui/index.d.ts +54 -3
- package/dist/ui/input-group.d.ts +28 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/kbd.d.ts +4 -0
- package/dist/ui/label.d.ts +3 -0
- package/dist/ui/menu.d.ts +27 -0
- package/dist/ui/native-select.d.ts +7 -0
- package/dist/ui/nav-tabs.d.ts +7 -0
- package/dist/ui/overlay.d.ts +1 -0
- package/dist/ui/page.d.ts +22 -0
- package/dist/ui/rail.d.ts +16 -0
- package/dist/ui/search-input.d.ts +6 -0
- package/dist/ui/select.d.ts +13 -0
- package/dist/ui/separator.d.ts +6 -0
- package/dist/ui/settings.d.ts +14 -0
- package/dist/ui/sheet.d.ts +20 -0
- package/dist/ui/side-panel.d.ts +23 -0
- package/dist/ui/sidebar.d.ts +81 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/spinner.d.ts +3 -0
- package/dist/ui/stat.d.ts +7 -0
- package/dist/ui/steps.d.ts +7 -0
- package/dist/ui/switch.d.ts +6 -0
- package/dist/ui/tab-state.d.ts +8 -0
- package/dist/ui/table-layout.d.ts +19 -0
- package/dist/ui/table-model.d.ts +42 -0
- package/dist/ui/table-screen.d.ts +9 -0
- package/dist/ui/table.d.ts +33 -22
- package/dist/ui/tabs.d.ts +13 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/theme.d.ts +22 -0
- package/dist/ui/time-series-chart.d.ts +19 -0
- package/dist/ui/time-series-model.d.ts +90 -0
- package/dist/ui/timing-tracks.d.ts +27 -0
- package/dist/ui/toggle.d.ts +22 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/dist/ui/topbar.d.ts +4 -0
- package/dist/ui/use-chart-width.d.ts +5 -0
- package/dist/ui/use-mobile.d.ts +1 -0
- package/package.json +18 -1
- package/styles.css +123 -0
- package/dist/chunk-3ZY2AVB4.js +0 -434
- package/dist/chunk-3ZY2AVB4.js.map +0 -7
- package/dist/ui/primitives.d.ts +0 -85
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@labpane/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Page layouts, forms, dialogs, menus, tables, and an optional terminal for React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://labpane.com",
|
|
@@ -55,11 +55,13 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"clsx": "^2.1.1",
|
|
58
|
+
"cmdk": "^1.1.1",
|
|
58
59
|
"lucide-react": "^1.55.0",
|
|
59
60
|
"tailwind-merge": "^3.6.0"
|
|
60
61
|
},
|
|
61
62
|
"peerDependencies": {
|
|
62
63
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
64
|
+
"@radix-ui/react-avatar": "^1.2.7",
|
|
63
65
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
64
66
|
"@radix-ui/react-context-menu": "^2.2.16",
|
|
65
67
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
@@ -67,6 +69,11 @@
|
|
|
67
69
|
"@radix-ui/react-popover": "^1.1.15",
|
|
68
70
|
"@radix-ui/react-select": "^2.2.6",
|
|
69
71
|
"@radix-ui/react-slot": "^1.2.3",
|
|
72
|
+
"@radix-ui/react-switch": "^1.3.8",
|
|
73
|
+
"@radix-ui/react-tabs": "^1.1.22",
|
|
74
|
+
"@radix-ui/react-toggle": "^1.1.19",
|
|
75
|
+
"@radix-ui/react-toggle-group": "^1.1.20",
|
|
76
|
+
"@radix-ui/react-tooltip": "^1.3.0",
|
|
70
77
|
"@wterm/dom": "^0.5.4",
|
|
71
78
|
"react": "^18.2.0 || ^19.0.0",
|
|
72
79
|
"react-dom": "^18.2.0 || ^19.0.0"
|
|
@@ -77,7 +84,9 @@
|
|
|
77
84
|
}
|
|
78
85
|
},
|
|
79
86
|
"devDependencies": {
|
|
87
|
+
"@happy-dom/global-registrator": "^20.14.5",
|
|
80
88
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
89
|
+
"@radix-ui/react-avatar": "^1.2.7",
|
|
81
90
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
82
91
|
"@radix-ui/react-context-menu": "^2.2.16",
|
|
83
92
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
@@ -85,7 +94,15 @@
|
|
|
85
94
|
"@radix-ui/react-popover": "^1.1.15",
|
|
86
95
|
"@radix-ui/react-select": "^2.2.6",
|
|
87
96
|
"@radix-ui/react-slot": "^1.2.3",
|
|
97
|
+
"@radix-ui/react-switch": "^1.3.8",
|
|
98
|
+
"@radix-ui/react-tabs": "^1.1.22",
|
|
99
|
+
"@radix-ui/react-toggle": "^1.1.19",
|
|
100
|
+
"@radix-ui/react-toggle-group": "^1.1.20",
|
|
101
|
+
"@radix-ui/react-tooltip": "^1.3.0",
|
|
88
102
|
"@tailwindcss/cli": "^4.3.3",
|
|
103
|
+
"@testing-library/dom": "^10.4.2",
|
|
104
|
+
"@testing-library/react": "^16.3.3",
|
|
105
|
+
"@testing-library/user-event": "^14.6.7",
|
|
89
106
|
"@types/bun": "^1.4.2",
|
|
90
107
|
"@types/react": "^19.3.0",
|
|
91
108
|
"@types/react-dom": "^19.3.0",
|
package/styles.css
CHANGED
|
@@ -47,6 +47,25 @@
|
|
|
47
47
|
--labui-input-background: #eeeeee;
|
|
48
48
|
--labui-ring: #1d9db4;
|
|
49
49
|
--labui-overlay: color-mix(in srgb, #242424 18%, transparent);
|
|
50
|
+
--labui-info: #1e5aa8;
|
|
51
|
+
--labui-info-foreground: #ffffff;
|
|
52
|
+
--labui-chart-1: #05697a;
|
|
53
|
+
--labui-chart-2: #1d9db4;
|
|
54
|
+
--labui-chart-3: #116d3b;
|
|
55
|
+
--labui-chart-4: #b8741a;
|
|
56
|
+
--labui-chart-5: #7a4ea0;
|
|
57
|
+
--labui-sidebar: #f6f6f6;
|
|
58
|
+
--labui-sidebar-foreground: #242424;
|
|
59
|
+
--labui-sidebar-primary: #05697a;
|
|
60
|
+
--labui-sidebar-primary-foreground: #ffffff;
|
|
61
|
+
--labui-sidebar-accent: #e6e6e6;
|
|
62
|
+
--labui-sidebar-accent-foreground: #242424;
|
|
63
|
+
--labui-sidebar-border: #d6d6d6;
|
|
64
|
+
--labui-sidebar-ring: #1d9db4;
|
|
65
|
+
--labui-card-gap: 1.5rem;
|
|
66
|
+
--labui-card-px: 1.5rem;
|
|
67
|
+
--labui-card-py: 1.5rem;
|
|
68
|
+
--labui-topbar-height: 3rem;
|
|
50
69
|
}
|
|
51
70
|
|
|
52
71
|
:where(.dark) {
|
|
@@ -77,6 +96,21 @@
|
|
|
77
96
|
--labui-input-background: #242424;
|
|
78
97
|
--labui-ring: #68bccf;
|
|
79
98
|
--labui-overlay: color-mix(in srgb, #000000 50%, transparent);
|
|
99
|
+
--labui-info: #7fb4f0;
|
|
100
|
+
--labui-info-foreground: #0c2340;
|
|
101
|
+
--labui-chart-1: #68bccf;
|
|
102
|
+
--labui-chart-2: #1d9db4;
|
|
103
|
+
--labui-chart-3: #3ddc84;
|
|
104
|
+
--labui-chart-4: #e0a84a;
|
|
105
|
+
--labui-chart-5: #b58ce0;
|
|
106
|
+
--labui-sidebar: #202020;
|
|
107
|
+
--labui-sidebar-foreground: #e8e8e8;
|
|
108
|
+
--labui-sidebar-primary: #68bccf;
|
|
109
|
+
--labui-sidebar-primary-foreground: #1c1c1c;
|
|
110
|
+
--labui-sidebar-accent: #363636;
|
|
111
|
+
--labui-sidebar-accent-foreground: #f3f3f3;
|
|
112
|
+
--labui-sidebar-border: #363636;
|
|
113
|
+
--labui-sidebar-ring: #68bccf;
|
|
80
114
|
}
|
|
81
115
|
|
|
82
116
|
@media (forced-colors: active) {
|
|
@@ -121,12 +155,101 @@
|
|
|
121
155
|
--color-input-background: var(--labui-input-background);
|
|
122
156
|
--color-ring: var(--labui-ring);
|
|
123
157
|
--color-overlay: var(--labui-overlay);
|
|
158
|
+
--color-info: var(--labui-info);
|
|
159
|
+
--color-info-foreground: var(--labui-info-foreground);
|
|
160
|
+
--color-chart-1: var(--labui-chart-1);
|
|
161
|
+
--color-chart-2: var(--labui-chart-2);
|
|
162
|
+
--color-chart-3: var(--labui-chart-3);
|
|
163
|
+
--color-chart-4: var(--labui-chart-4);
|
|
164
|
+
--color-chart-5: var(--labui-chart-5);
|
|
165
|
+
--color-sidebar: var(--labui-sidebar);
|
|
166
|
+
--color-sidebar-foreground: var(--labui-sidebar-foreground);
|
|
167
|
+
--color-sidebar-primary: var(--labui-sidebar-primary);
|
|
168
|
+
--color-sidebar-primary-foreground: var(--labui-sidebar-primary-foreground);
|
|
169
|
+
--color-sidebar-accent: var(--labui-sidebar-accent);
|
|
170
|
+
--color-sidebar-accent-foreground: var(--labui-sidebar-accent-foreground);
|
|
171
|
+
--color-sidebar-border: var(--labui-sidebar-border);
|
|
172
|
+
--color-sidebar-ring: var(--labui-sidebar-ring);
|
|
124
173
|
}
|
|
125
174
|
|
|
126
175
|
@theme {
|
|
127
176
|
--animate-spin: labui-spin 1s linear infinite;
|
|
128
177
|
--animate-pulse: labui-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
129
178
|
--animate-pop: labui-pop 160ms ease-out;
|
|
179
|
+
--animate-fade-in: labui-fade-in 150ms ease-out;
|
|
180
|
+
--animate-fade-out: labui-fade-out 150ms ease-in;
|
|
181
|
+
--animate-zoom-in: labui-zoom-in 150ms ease-out;
|
|
182
|
+
--animate-zoom-out: labui-zoom-out 150ms ease-in;
|
|
183
|
+
--animate-slide-in-right: labui-slide-in-right 200ms ease-out;
|
|
184
|
+
--animate-slide-out-right: labui-slide-out-right 200ms ease-in;
|
|
185
|
+
--animate-slide-in-left: labui-slide-in-left 200ms ease-out;
|
|
186
|
+
--animate-slide-out-left: labui-slide-out-left 200ms ease-in;
|
|
187
|
+
--animate-slide-in-top: labui-slide-in-top 200ms ease-out;
|
|
188
|
+
--animate-slide-out-top: labui-slide-out-top 200ms ease-in;
|
|
189
|
+
--animate-slide-in-bottom: labui-slide-in-bottom 200ms ease-out;
|
|
190
|
+
--animate-slide-out-bottom: labui-slide-out-bottom 200ms ease-in;
|
|
191
|
+
@keyframes labui-fade-in {
|
|
192
|
+
from {
|
|
193
|
+
opacity: 0;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
@keyframes labui-fade-out {
|
|
197
|
+
to {
|
|
198
|
+
opacity: 0;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
@keyframes labui-zoom-in {
|
|
202
|
+
from {
|
|
203
|
+
opacity: 0;
|
|
204
|
+
transform: translate(-50%, -50%) scale(0.95);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
@keyframes labui-zoom-out {
|
|
208
|
+
to {
|
|
209
|
+
opacity: 0;
|
|
210
|
+
transform: translate(-50%, -50%) scale(0.95);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
@keyframes labui-slide-in-right {
|
|
214
|
+
from {
|
|
215
|
+
transform: translateX(100%);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
@keyframes labui-slide-out-right {
|
|
219
|
+
to {
|
|
220
|
+
transform: translateX(100%);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
@keyframes labui-slide-in-left {
|
|
224
|
+
from {
|
|
225
|
+
transform: translateX(-100%);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
@keyframes labui-slide-out-left {
|
|
229
|
+
to {
|
|
230
|
+
transform: translateX(-100%);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
@keyframes labui-slide-in-top {
|
|
234
|
+
from {
|
|
235
|
+
transform: translateY(-100%);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
@keyframes labui-slide-out-top {
|
|
239
|
+
to {
|
|
240
|
+
transform: translateY(-100%);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
@keyframes labui-slide-in-bottom {
|
|
244
|
+
from {
|
|
245
|
+
transform: translateY(100%);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
@keyframes labui-slide-out-bottom {
|
|
249
|
+
to {
|
|
250
|
+
transform: translateY(100%);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
130
253
|
@keyframes labui-spin {
|
|
131
254
|
to {
|
|
132
255
|
transform: rotate(360deg);
|
package/dist/chunk-3ZY2AVB4.js
DELETED
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
// classes.ts
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
4
|
-
var twMerge = extendTailwindMerge({
|
|
5
|
-
experimentalParseClassName: ({ className, parseClassName }) => parseClassName(className.replace(/^labui:/, ""))
|
|
6
|
-
});
|
|
7
|
-
function cn(...inputs) {
|
|
8
|
-
return twMerge(clsx(inputs));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// primitives.tsx
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
import {
|
|
14
|
-
ArrowLeftIcon,
|
|
15
|
-
CheckIcon,
|
|
16
|
-
ChevronDownIcon,
|
|
17
|
-
CopyIcon,
|
|
18
|
-
Loader2Icon
|
|
19
|
-
} from "lucide-react";
|
|
20
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
21
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
22
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
23
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
-
function PageActions({ children }) {
|
|
25
|
-
return /* @__PURE__ */ jsx("div", { className: "labui:ml-auto labui:flex labui:max-w-full labui:flex-wrap labui:items-center labui:justify-end labui:gap-2 labui:[--labui-control-height:2.25rem] labui:empty:hidden labui:[@media(pointer:coarse)]:[--labui-control-height:2.75rem]", children });
|
|
26
|
-
}
|
|
27
|
-
function PageHeader({
|
|
28
|
-
title,
|
|
29
|
-
actions
|
|
30
|
-
}) {
|
|
31
|
-
return /* @__PURE__ */ jsxs("header", { className: "labui:flex labui:flex-wrap labui:items-center labui:gap-3", children: [
|
|
32
|
-
/* @__PURE__ */ jsx("h1", { className: "labui:font-display labui:text-2xl labui:font-bold labui:tracking-tight", children: title }),
|
|
33
|
-
/* @__PURE__ */ jsx(PageActions, { children: actions })
|
|
34
|
-
] });
|
|
35
|
-
}
|
|
36
|
-
function Page({
|
|
37
|
-
title,
|
|
38
|
-
actions,
|
|
39
|
-
className,
|
|
40
|
-
children
|
|
41
|
-
}) {
|
|
42
|
-
return /* @__PURE__ */ jsxs(
|
|
43
|
-
"div",
|
|
44
|
-
{
|
|
45
|
-
className: cn(
|
|
46
|
-
"labui:flex labui:min-w-0 labui:flex-col labui:gap-4",
|
|
47
|
-
className
|
|
48
|
-
),
|
|
49
|
-
children: [
|
|
50
|
-
title && /* @__PURE__ */ jsx(PageHeader, { title, actions }),
|
|
51
|
-
children
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
var focusRing = "labui:focus-visible:border-ring labui:focus-visible:ring-[3px] labui:focus-visible:ring-ring/50";
|
|
57
|
-
var invalidRing = "labui:aria-invalid:border-destructive labui:aria-invalid:ring-destructive/20 labui:dark:aria-invalid:ring-destructive/40";
|
|
58
|
-
var raisedButtonSurface = [
|
|
59
|
-
"labui:border labui:border-border labui:border-b-input labui:bg-card labui:bg-linear-to-b labui:from-card labui:to-muted labui:text-foreground",
|
|
60
|
-
"labui:shadow-[inset_0_1px_0_#ffffff,0_1px_1px_#00000014,0_3px_4px_#0000000d]",
|
|
61
|
-
"labui:hover:to-background labui:hover:shadow-[inset_0_1px_0_#ffffff,0_2px_3px_#0000001a,0_4px_6px_#0000000d]",
|
|
62
|
-
"labui:active:translate-y-px labui:active:from-muted labui:active:to-card labui:active:shadow-[inset_0_1px_2px_#0000001a,0_1px_0_#ffffff80]",
|
|
63
|
-
"labui:dark:border-foreground/15 labui:dark:border-b-foreground/10 labui:dark:bg-secondary labui:dark:from-[color-mix(in_srgb,var(--labui-secondary)_88%,var(--labui-foreground))] labui:dark:to-secondary labui:dark:text-popover-foreground",
|
|
64
|
-
"labui:dark:shadow-[inset_0_1px_0_#ffffff14,0_1px_2px_#00000026]",
|
|
65
|
-
"labui:dark:hover:border-foreground/25 labui:dark:hover:from-[color-mix(in_srgb,var(--labui-secondary)_82%,var(--labui-foreground))] labui:dark:hover:to-secondary labui:dark:hover:shadow-[inset_0_1px_0_#ffffff1f,0_2px_4px_#00000033]",
|
|
66
|
-
"labui:dark:active:from-secondary labui:dark:active:to-secondary labui:dark:active:shadow-[inset_0_1px_2px_#00000033,0_1px_0_#ffffff0a]",
|
|
67
|
-
"labui:disabled:bg-secondary labui:disabled:bg-none labui:disabled:shadow-none labui:dark:disabled:shadow-none"
|
|
68
|
-
].join(" ");
|
|
69
|
-
var buttonVariants = {
|
|
70
|
-
default: "labui:border labui:border-transparent labui:bg-primary labui:text-primary-foreground labui:shadow-xs labui:hover:bg-primary/90 labui:active:translate-y-px",
|
|
71
|
-
destructive: "labui:border labui:border-transparent labui:bg-destructive-muted labui:text-destructive labui:hover:border-destructive/20 labui:hover:bg-destructive/15 labui:focus-visible:ring-destructive/20 labui:dark:focus-visible:ring-destructive/40",
|
|
72
|
-
secondary: raisedButtonSurface,
|
|
73
|
-
ghost: "labui:hover:bg-accent labui:hover:text-accent-foreground labui:dark:hover:bg-accent/50",
|
|
74
|
-
link: "labui:text-link labui:underline-offset-4 labui:hover:underline"
|
|
75
|
-
};
|
|
76
|
-
var buttonSizes = {
|
|
77
|
-
default: "labui:h-(--labui-control-height) labui:px-4 labui:py-2 labui:has-[>svg]:px-3",
|
|
78
|
-
sm: "labui:h-(--labui-control-height-sm) labui:gap-1.5 labui:rounded-md labui:px-3 labui:has-[>svg]:px-2.5",
|
|
79
|
-
"icon-xs": "labui:size-6 labui:rounded-md labui:[&_svg:not([class*='size-'])]:size-3",
|
|
80
|
-
"icon-sm": "labui:size-(--labui-control-height-sm)"
|
|
81
|
-
};
|
|
82
|
-
var Button = React.forwardRef(function Button2({
|
|
83
|
-
className,
|
|
84
|
-
variant = "default",
|
|
85
|
-
size = "default",
|
|
86
|
-
asChild = false,
|
|
87
|
-
...props
|
|
88
|
-
}, ref) {
|
|
89
|
-
const Comp = asChild ? Slot : "button";
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
Comp,
|
|
92
|
-
{
|
|
93
|
-
ref,
|
|
94
|
-
"data-slot": "button",
|
|
95
|
-
"data-variant": variant,
|
|
96
|
-
"data-size": size,
|
|
97
|
-
className: cn(
|
|
98
|
-
"labui:inline-flex labui:shrink-0 labui:items-center labui:justify-center labui:gap-2 labui:rounded-md",
|
|
99
|
-
"labui:text-sm labui:font-medium labui:whitespace-nowrap labui:transition-all labui:outline-none",
|
|
100
|
-
"labui:disabled:pointer-events-none labui:disabled:opacity-50",
|
|
101
|
-
focusRing,
|
|
102
|
-
invalidRing,
|
|
103
|
-
"labui:[&_svg]:pointer-events-none labui:[&_svg]:shrink-0 labui:[&_svg:not([class*='size-'])]:size-4",
|
|
104
|
-
variant && buttonVariants[variant],
|
|
105
|
-
size && buttonSizes[size],
|
|
106
|
-
className
|
|
107
|
-
),
|
|
108
|
-
...props
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
});
|
|
112
|
-
var badgeVariants = {
|
|
113
|
-
default: "labui:bg-primary labui:text-primary-foreground labui:[a&]:hover:bg-primary/90",
|
|
114
|
-
destructive: "labui:border-destructive/30 labui:bg-destructive/15 labui:text-destructive labui:focus-visible:ring-destructive/20 labui:[a&]:hover:bg-destructive/25",
|
|
115
|
-
success: "labui:border-success/30 labui:bg-success/15 labui:text-success labui:[a&]:hover:bg-success/25",
|
|
116
|
-
warning: "labui:border-warning/30 labui:bg-warning/15 labui:text-warning labui:[a&]:hover:bg-warning/25"
|
|
117
|
-
};
|
|
118
|
-
var Badge = React.forwardRef(function Badge2({ className, variant = "default", ...props }, ref) {
|
|
119
|
-
return /* @__PURE__ */ jsx(
|
|
120
|
-
"span",
|
|
121
|
-
{
|
|
122
|
-
ref,
|
|
123
|
-
"data-slot": "badge",
|
|
124
|
-
"data-variant": variant,
|
|
125
|
-
className: cn(
|
|
126
|
-
"labui:inline-flex labui:w-fit labui:shrink-0 labui:items-center labui:justify-center labui:gap-1 labui:overflow-hidden",
|
|
127
|
-
"labui:rounded-full labui:border labui:border-transparent labui:px-2 labui:py-0.5",
|
|
128
|
-
"labui:text-xs labui:font-medium labui:whitespace-nowrap labui:transition-[color,box-shadow]",
|
|
129
|
-
focusRing,
|
|
130
|
-
invalidRing,
|
|
131
|
-
"labui:[&>svg]:pointer-events-none labui:[&>svg]:size-3",
|
|
132
|
-
variant && badgeVariants[variant],
|
|
133
|
-
className
|
|
134
|
-
),
|
|
135
|
-
...props
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
});
|
|
139
|
-
var alertVariants = {
|
|
140
|
-
destructive: "labui:border-destructive/40 labui:bg-card labui:text-destructive labui:*:data-[slot=alert-description]:text-destructive/90 labui:[&>svg]:text-current",
|
|
141
|
-
warning: "labui:border-warning/40 labui:bg-card labui:text-foreground labui:[&>svg]:text-warning"
|
|
142
|
-
};
|
|
143
|
-
var Alert = React.forwardRef(function Alert2({ className, variant, ...props }, ref) {
|
|
144
|
-
return /* @__PURE__ */ jsx(
|
|
145
|
-
"div",
|
|
146
|
-
{
|
|
147
|
-
ref,
|
|
148
|
-
"data-slot": "alert",
|
|
149
|
-
role: "alert",
|
|
150
|
-
className: cn(
|
|
151
|
-
"labui:relative labui:grid labui:w-full labui:grid-cols-[0_1fr] labui:items-start labui:gap-y-0.5 labui:rounded-lg labui:border labui:px-4 labui:py-3 labui:text-sm labui:has-[>svg]:grid-cols-[--spacing(4)_1fr] labui:has-[>svg]:gap-x-3 labui:[&>svg]:size-4 labui:[&>svg]:translate-y-0.5 labui:[&>svg]:text-current",
|
|
152
|
-
variant && alertVariants[variant],
|
|
153
|
-
className
|
|
154
|
-
),
|
|
155
|
-
...props
|
|
156
|
-
}
|
|
157
|
-
);
|
|
158
|
-
});
|
|
159
|
-
var AlertTitle = React.forwardRef(function AlertTitle2({ className, ...props }, ref) {
|
|
160
|
-
return /* @__PURE__ */ jsx(
|
|
161
|
-
"div",
|
|
162
|
-
{
|
|
163
|
-
ref,
|
|
164
|
-
"data-slot": "alert-title",
|
|
165
|
-
className: cn(
|
|
166
|
-
"labui:col-start-2 labui:line-clamp-1 labui:min-h-4 labui:font-medium labui:tracking-tight",
|
|
167
|
-
className
|
|
168
|
-
),
|
|
169
|
-
...props
|
|
170
|
-
}
|
|
171
|
-
);
|
|
172
|
-
});
|
|
173
|
-
var AlertDescription = React.forwardRef(function AlertDescription2({ className, ...props }, ref) {
|
|
174
|
-
return /* @__PURE__ */ jsx(
|
|
175
|
-
"div",
|
|
176
|
-
{
|
|
177
|
-
ref,
|
|
178
|
-
"data-slot": "alert-description",
|
|
179
|
-
className: cn(
|
|
180
|
-
"labui:col-start-2 labui:grid labui:justify-items-start labui:gap-1 labui:text-sm labui:text-muted-foreground labui:[&_p]:leading-relaxed",
|
|
181
|
-
className
|
|
182
|
-
),
|
|
183
|
-
...props
|
|
184
|
-
}
|
|
185
|
-
);
|
|
186
|
-
});
|
|
187
|
-
var Input = React.forwardRef(function Input2({ className, type, ...props }, ref) {
|
|
188
|
-
return /* @__PURE__ */ jsx(
|
|
189
|
-
"input",
|
|
190
|
-
{
|
|
191
|
-
ref,
|
|
192
|
-
type,
|
|
193
|
-
autoComplete: "off",
|
|
194
|
-
"data-slot": "input",
|
|
195
|
-
className: cn(
|
|
196
|
-
"labui:h-(--labui-control-height) labui:w-full labui:min-w-0 labui:rounded-md labui:border labui:border-input",
|
|
197
|
-
"labui:bg-input-background labui:px-(--labui-control-px) labui:py-1 labui:shadow-xs",
|
|
198
|
-
"labui:text-base labui:md:text-sm labui:placeholder:text-muted-foreground labui:transition-[color,box-shadow] labui:outline-none",
|
|
199
|
-
"labui:selection:bg-primary labui:selection:text-primary-foreground",
|
|
200
|
-
"labui:file:me-3 labui:file:inline-flex labui:file:h-7 labui:file:border-0 labui:file:bg-transparent",
|
|
201
|
-
"labui:file:text-sm labui:file:font-medium labui:file:text-foreground",
|
|
202
|
-
"labui:disabled:pointer-events-none labui:disabled:cursor-not-allowed labui:disabled:opacity-50",
|
|
203
|
-
focusRing,
|
|
204
|
-
invalidRing,
|
|
205
|
-
"labui:[&::-webkit-search-cancel-button]:appearance-none labui:[&::-webkit-search-decoration]:appearance-none labui:[&::-webkit-search-results-button]:appearance-none",
|
|
206
|
-
"labui:[&::-webkit-calendar-picker-indicator]:opacity-60 labui:[&::-webkit-datetime-edit]:leading-none",
|
|
207
|
-
className
|
|
208
|
-
),
|
|
209
|
-
...props
|
|
210
|
-
}
|
|
211
|
-
);
|
|
212
|
-
});
|
|
213
|
-
var Checkbox = React.forwardRef(function Checkbox2({ className, ...props }, ref) {
|
|
214
|
-
return /* @__PURE__ */ jsx(
|
|
215
|
-
CheckboxPrimitive.Root,
|
|
216
|
-
{
|
|
217
|
-
ref,
|
|
218
|
-
"data-slot": "checkbox",
|
|
219
|
-
className: cn(
|
|
220
|
-
"labui:peer labui:size-4 labui:shrink-0 labui:rounded-[4px] labui:border labui:border-input labui:dark:bg-input/30",
|
|
221
|
-
"labui:shadow-xs labui:transition-shadow labui:outline-none",
|
|
222
|
-
"labui:disabled:cursor-not-allowed labui:disabled:opacity-50",
|
|
223
|
-
"labui:data-[state=checked]:border-primary labui:data-[state=checked]:bg-primary labui:data-[state=checked]:text-primary-foreground labui:dark:data-[state=checked]:bg-primary",
|
|
224
|
-
focusRing,
|
|
225
|
-
invalidRing,
|
|
226
|
-
className
|
|
227
|
-
),
|
|
228
|
-
...props,
|
|
229
|
-
children: /* @__PURE__ */ jsx(
|
|
230
|
-
CheckboxPrimitive.Indicator,
|
|
231
|
-
{
|
|
232
|
-
"data-slot": "checkbox-indicator",
|
|
233
|
-
className: "labui:grid labui:place-content-center labui:text-current labui:transition-none",
|
|
234
|
-
children: /* @__PURE__ */ jsx(CheckIcon, { className: "labui:size-3.5" })
|
|
235
|
-
}
|
|
236
|
-
)
|
|
237
|
-
}
|
|
238
|
-
);
|
|
239
|
-
});
|
|
240
|
-
var Field = React.forwardRef(function Field2({ className, orientation, ...props }, ref) {
|
|
241
|
-
return /* @__PURE__ */ jsx(
|
|
242
|
-
"div",
|
|
243
|
-
{
|
|
244
|
-
ref,
|
|
245
|
-
role: "group",
|
|
246
|
-
className: cn(
|
|
247
|
-
"labui:flex labui:w-full labui:gap-3 labui:data-[invalid=true]:text-destructive",
|
|
248
|
-
orientation ? "labui:items-center" : "labui:flex-col",
|
|
249
|
-
className
|
|
250
|
-
),
|
|
251
|
-
...props
|
|
252
|
-
}
|
|
253
|
-
);
|
|
254
|
-
});
|
|
255
|
-
var FieldLabel = React.forwardRef(function FieldLabel2({ className, ...props }, ref) {
|
|
256
|
-
return (
|
|
257
|
-
// oxlint-disable-next-line jsx-a11y/label-has-associated-control -- callers pass htmlFor
|
|
258
|
-
/* @__PURE__ */ jsx(
|
|
259
|
-
"label",
|
|
260
|
-
{
|
|
261
|
-
ref,
|
|
262
|
-
className: cn(
|
|
263
|
-
"labui:flex labui:w-fit labui:items-center labui:gap-2 labui:text-sm labui:leading-snug labui:font-medium labui:select-none",
|
|
264
|
-
className
|
|
265
|
-
),
|
|
266
|
-
...props
|
|
267
|
-
}
|
|
268
|
-
)
|
|
269
|
-
);
|
|
270
|
-
});
|
|
271
|
-
var FieldError = React.forwardRef(function FieldError2({ className, ...props }, ref) {
|
|
272
|
-
return /* @__PURE__ */ jsx(
|
|
273
|
-
"div",
|
|
274
|
-
{
|
|
275
|
-
ref,
|
|
276
|
-
role: "alert",
|
|
277
|
-
className: cn("labui:text-sm labui:text-destructive", className),
|
|
278
|
-
...props
|
|
279
|
-
}
|
|
280
|
-
);
|
|
281
|
-
});
|
|
282
|
-
function Select(props) {
|
|
283
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
284
|
-
}
|
|
285
|
-
function SelectValue(props) {
|
|
286
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
287
|
-
}
|
|
288
|
-
var SelectTrigger = React.forwardRef(function SelectTrigger2({ className, size = "default", children, ...props }, ref) {
|
|
289
|
-
return /* @__PURE__ */ jsxs(
|
|
290
|
-
SelectPrimitive.Trigger,
|
|
291
|
-
{
|
|
292
|
-
ref,
|
|
293
|
-
"data-slot": "select-trigger",
|
|
294
|
-
"data-size": size,
|
|
295
|
-
className: cn(
|
|
296
|
-
"labui:flex labui:h-(--labui-control-height) labui:w-full labui:min-w-0 labui:items-center labui:justify-between labui:gap-2",
|
|
297
|
-
"labui:rounded-md labui:border labui:border-input labui:bg-input-background labui:px-(--labui-control-px) labui:shadow-xs",
|
|
298
|
-
"labui:text-sm labui:whitespace-nowrap labui:transition-[color,box-shadow] labui:outline-none labui:data-[placeholder]:text-muted-foreground",
|
|
299
|
-
"labui:data-[size=sm]:h-(--labui-control-height-sm) labui:data-[size=sm]:px-2 labui:data-[size=sm]:text-xs",
|
|
300
|
-
focusRing,
|
|
301
|
-
invalidRing,
|
|
302
|
-
"labui:disabled:cursor-not-allowed labui:disabled:opacity-50",
|
|
303
|
-
"labui:*:data-[slot=select-value]:truncate labui:[&_svg]:pointer-events-none labui:[&_svg]:shrink-0",
|
|
304
|
-
className
|
|
305
|
-
),
|
|
306
|
-
...props,
|
|
307
|
-
children: [
|
|
308
|
-
children,
|
|
309
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "labui:size-4 labui:text-muted-foreground" }) })
|
|
310
|
-
]
|
|
311
|
-
}
|
|
312
|
-
);
|
|
313
|
-
});
|
|
314
|
-
var SelectContent = React.forwardRef(function SelectContent2({ className, children, ...props }, ref) {
|
|
315
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
316
|
-
SelectPrimitive.Content,
|
|
317
|
-
{
|
|
318
|
-
ref,
|
|
319
|
-
"data-slot": "select-content",
|
|
320
|
-
position: "popper",
|
|
321
|
-
sideOffset: 4,
|
|
322
|
-
className: cn(
|
|
323
|
-
"labui:relative labui:z-50 labui:max-h-(--radix-select-content-available-height) labui:min-w-(--radix-select-trigger-width) labui:overflow-x-hidden labui:overflow-y-auto labui:rounded-lg labui:border labui:bg-popover/90 labui:p-1 labui:text-popover-foreground labui:shadow-lg labui:backdrop-blur-xl labui:backdrop-saturate-150",
|
|
324
|
-
className
|
|
325
|
-
),
|
|
326
|
-
...props,
|
|
327
|
-
children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { children: React.Children.toArray(children).length ? children : /* @__PURE__ */ jsx("p", { className: "labui:p-2 labui:text-sm labui:text-muted-foreground", children: "Empty" }) })
|
|
328
|
-
}
|
|
329
|
-
) });
|
|
330
|
-
});
|
|
331
|
-
var SelectItem = React.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
|
|
332
|
-
return /* @__PURE__ */ jsxs(
|
|
333
|
-
SelectPrimitive.Item,
|
|
334
|
-
{
|
|
335
|
-
ref,
|
|
336
|
-
"data-slot": "select-item",
|
|
337
|
-
className: cn(
|
|
338
|
-
"labui:relative labui:flex labui:w-full labui:cursor-default labui:items-center labui:rounded-md labui:py-1.5 labui:pr-8 labui:pl-2 labui:text-sm labui:outline-none labui:select-none labui:data-[disabled]:pointer-events-none labui:data-[disabled]:opacity-50 labui:data-[highlighted]:bg-accent labui:data-[highlighted]:text-accent-foreground",
|
|
339
|
-
className
|
|
340
|
-
),
|
|
341
|
-
...props,
|
|
342
|
-
children: [
|
|
343
|
-
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }),
|
|
344
|
-
/* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { className: "labui:absolute labui:right-2 labui:flex labui:items-center", children: /* @__PURE__ */ jsx(CheckIcon, { className: "labui:size-4 labui:text-primary" }) })
|
|
345
|
-
]
|
|
346
|
-
}
|
|
347
|
-
);
|
|
348
|
-
});
|
|
349
|
-
var Spinner = React.forwardRef(function Spinner2({ className, ...props }, ref) {
|
|
350
|
-
return /* @__PURE__ */ jsx(
|
|
351
|
-
Loader2Icon,
|
|
352
|
-
{
|
|
353
|
-
ref,
|
|
354
|
-
role: "status",
|
|
355
|
-
"aria-label": "Loading",
|
|
356
|
-
className: cn("labui:size-4 labui:animate-spin", className),
|
|
357
|
-
...props
|
|
358
|
-
}
|
|
359
|
-
);
|
|
360
|
-
});
|
|
361
|
-
var Skeleton = React.forwardRef(function Skeleton2({ className, ...props }, ref) {
|
|
362
|
-
return /* @__PURE__ */ jsx(
|
|
363
|
-
"div",
|
|
364
|
-
{
|
|
365
|
-
ref,
|
|
366
|
-
"data-slot": "skeleton",
|
|
367
|
-
className: cn(
|
|
368
|
-
"labui:animate-pulse labui:rounded-md labui:bg-accent",
|
|
369
|
-
className
|
|
370
|
-
),
|
|
371
|
-
...props
|
|
372
|
-
}
|
|
373
|
-
);
|
|
374
|
-
});
|
|
375
|
-
function CopyButton({ value, label }) {
|
|
376
|
-
const [copied, setCopied] = React.useState(false);
|
|
377
|
-
return /* @__PURE__ */ jsx(
|
|
378
|
-
Button,
|
|
379
|
-
{
|
|
380
|
-
type: "button",
|
|
381
|
-
variant: "ghost",
|
|
382
|
-
size: "icon-xs",
|
|
383
|
-
"aria-label": label,
|
|
384
|
-
title: label,
|
|
385
|
-
onClick: () => navigator.clipboard.writeText(value).then(() => setCopied(true)),
|
|
386
|
-
children: copied ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CopyIcon, {})
|
|
387
|
-
}
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
function Back({
|
|
391
|
-
label,
|
|
392
|
-
...props
|
|
393
|
-
}) {
|
|
394
|
-
return /* @__PURE__ */ jsx(
|
|
395
|
-
Button,
|
|
396
|
-
{
|
|
397
|
-
variant: "ghost",
|
|
398
|
-
size: "sm",
|
|
399
|
-
className: "labui:-ml-2.5 labui:self-start",
|
|
400
|
-
asChild: true,
|
|
401
|
-
children: /* @__PURE__ */ jsxs("a", { ...props, children: [
|
|
402
|
-
/* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
403
|
-
label
|
|
404
|
-
] })
|
|
405
|
-
}
|
|
406
|
-
);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
export {
|
|
410
|
-
cn,
|
|
411
|
-
PageActions,
|
|
412
|
-
PageHeader,
|
|
413
|
-
Page,
|
|
414
|
-
Button,
|
|
415
|
-
Badge,
|
|
416
|
-
Alert,
|
|
417
|
-
AlertTitle,
|
|
418
|
-
AlertDescription,
|
|
419
|
-
Input,
|
|
420
|
-
Checkbox,
|
|
421
|
-
Field,
|
|
422
|
-
FieldLabel,
|
|
423
|
-
FieldError,
|
|
424
|
-
Select,
|
|
425
|
-
SelectValue,
|
|
426
|
-
SelectTrigger,
|
|
427
|
-
SelectContent,
|
|
428
|
-
SelectItem,
|
|
429
|
-
Spinner,
|
|
430
|
-
Skeleton,
|
|
431
|
-
CopyButton,
|
|
432
|
-
Back
|
|
433
|
-
};
|
|
434
|
-
//# sourceMappingURL=chunk-3ZY2AVB4.js.map
|