@locusgraph/components 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action/button-group.js +45 -17
- package/dist/action/button.js +44 -27
- package/dist/action/toggle-group.js +176 -12
- package/dist/action/toggle.js +70 -17
- package/dist/display/avatar.js +118 -7
- package/dist/display/badge.js +33 -20
- package/dist/display/chart/chart-container.js +205 -45
- package/dist/display/chart/chart-legend.js +79 -14
- package/dist/display/chart/chart-tooltip.js +211 -40
- package/dist/display/chat/attachment/attachment-parts.js +56 -13
- package/dist/display/chat/attachment/attachment.js +70 -28
- package/dist/display/chat/bubble.js +80 -37
- package/dist/display/chat/marker.js +44 -15
- package/dist/display/chat/message-scroller.js +276 -14
- package/dist/display/chat/message.js +58 -13
- package/dist/display/content/item.js +134 -47
- package/dist/display/content/kbd.js +19 -5
- package/dist/display/media/aspect-ratio.js +27 -3
- package/dist/display/media/carousel-controls.js +162 -11
- package/dist/display/media/carousel.js +325 -65
- package/dist/display/rule-grid/rule-grid.js +86 -29
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +30 -6
- package/dist/display/skeletons/layouts/skeleton-table.js +44 -6
- package/dist/display/skeletons/shapes/skeleton-avatar.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-button.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-text.js +25 -7
- package/dist/display/skeletons/skeleton-parts.js +22 -6
- package/dist/display/status/alert.js +44 -18
- package/dist/display/status/empty.js +69 -22
- package/dist/display/status/progress.js +116 -16
- package/dist/display/status/skeleton.js +10 -3
- package/dist/display/status/spinner.js +11 -3
- package/dist/display/table.js +77 -17
- package/dist/feedback/toaster.js +98 -21
- package/dist/form/advanced/calendar-day-button.js +89 -12
- package/dist/form/advanced/calendar.js +349 -56
- package/dist/form/advanced/combobox/combobox-chips.js +151 -8
- package/dist/form/advanced/combobox/combobox-items.js +239 -14
- package/dist/form/advanced/combobox/combobox.js +386 -13
- package/dist/form/advanced/input-otp.js +201 -11
- package/dist/form/choice/checkbox.js +58 -3
- package/dist/form/choice/radio-group.js +94 -5
- package/dist/form/choice/select.js +479 -25
- package/dist/form/choice/slider.js +118 -4
- package/dist/form/choice/switch.js +53 -3
- package/dist/form/field/field-error.js +34 -14
- package/dist/form/field/field-separator.js +19 -3
- package/dist/form/field/field-set.js +21 -5
- package/dist/form/field/field-text.js +28 -7
- package/dist/form/field/field.js +43 -25
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +13 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +39 -7
- package/dist/form/textarea.js +11 -3
- package/dist/layout/accordion.js +165 -8
- package/dist/layout/collapsible.js +75 -7
- package/dist/layout/resizable.js +122 -7
- package/dist/layout/scroll/direction.js +25 -3
- package/dist/layout/scroll/scroll-area.js +138 -5
- package/dist/layout/sidebar/sidebar-context.js +184 -51
- package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
- package/dist/layout/sidebar/sidebar-menu.js +319 -38
- package/dist/layout/sidebar/sidebar-sections.js +369 -22
- package/dist/layout/sidebar/sidebar.js +384 -28
- package/dist/layout/tabs.js +183 -18
- package/dist/layout/use-mobile.js +11 -11
- package/dist/navigation/breadcrumb.js +82 -17
- package/dist/navigation/menubar/menubar-items.js +322 -16
- package/dist/navigation/menubar/menubar-sub.js +125 -7
- package/dist/navigation/menubar/menubar.js +213 -13
- package/dist/navigation/navigation-menu.js +90 -18
- package/dist/navigation/pagination.js +91 -20
- package/dist/overlay/alert-dialog.js +485 -26
- package/dist/overlay/context-menu/context-menu-items.js +322 -16
- package/dist/overlay/context-menu/context-menu-sub.js +125 -7
- package/dist/overlay/context-menu/context-menu.js +140 -11
- package/dist/overlay/dialog.js +405 -24
- package/dist/overlay/floating/command.js +423 -20
- package/dist/overlay/floating/drawer.js +354 -22
- package/dist/overlay/floating/hover-card.js +107 -7
- package/dist/overlay/menu/dropdown-menu-choice.js +149 -7
- package/dist/overlay/menu/dropdown-menu-item.js +174 -9
- package/dist/overlay/menu/dropdown-menu-sub.js +124 -7
- package/dist/overlay/menu/dropdown-menu.js +147 -12
- package/dist/overlay/popover.js +106 -7
- package/dist/overlay/sheet.js +379 -26
- package/dist/overlay/tooltip.js +145 -9
- package/dist/shell/app-header.js +29 -5
- package/dist/shell/app-shell.js +19 -3
- package/dist/shell/breadcrumbs.js +46 -14
- package/dist/shell/docs/docs-header.js +210 -10
- package/dist/shell/docs/docs-shell.js +36 -3
- package/dist/shell/docs/docs-sidebar.js +41 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +44 -42
- package/dist/shell/navigation/app-sidebar.js +66 -6
- package/dist/shell/navigation/nav-group.js +53 -11
- package/dist/shell/theme-toggle.js +51 -4
- package/package.json +2 -2
|
@@ -1,27 +1,55 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import * as Slot from "radix-ui/slot";
|
|
5
4
|
import { Separator } from "../display/separator.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const buttonGroupVariants = cva("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
variants: {
|
|
8
|
+
orientation: {
|
|
9
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>input:first-child]:rounded-l-full [&>input:first-child]:pl-4",
|
|
10
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
orientation: "horizontal"
|
|
15
|
+
}
|
|
16
16
|
});
|
|
17
|
-
function ButtonGroup({
|
|
18
|
-
|
|
17
|
+
function ButtonGroup({
|
|
18
|
+
className,
|
|
19
|
+
orientation,
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
return /*#__PURE__*/_jsx("div", {
|
|
23
|
+
role: "group",
|
|
24
|
+
"data-slot": "button-group",
|
|
25
|
+
"data-orientation": orientation,
|
|
26
|
+
className: cn(buttonGroupVariants({
|
|
27
|
+
orientation
|
|
28
|
+
}), className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
19
31
|
}
|
|
20
|
-
function ButtonGroupText({
|
|
21
|
-
|
|
22
|
-
|
|
32
|
+
function ButtonGroupText({
|
|
33
|
+
className,
|
|
34
|
+
asChild = false,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
38
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
39
|
+
className: cn("flex items-center gap-2 rounded-md border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
23
42
|
}
|
|
24
|
-
function ButtonGroupSeparator({
|
|
25
|
-
|
|
43
|
+
function ButtonGroupSeparator({
|
|
44
|
+
className,
|
|
45
|
+
orientation = "vertical",
|
|
46
|
+
...props
|
|
47
|
+
}) {
|
|
48
|
+
return /*#__PURE__*/_jsx(Separator, {
|
|
49
|
+
"data-slot": "button-group-separator",
|
|
50
|
+
orientation: orientation,
|
|
51
|
+
className: cn("relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto", className),
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
26
54
|
}
|
|
27
55
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
package/dist/action/button.js
CHANGED
|
@@ -1,35 +1,52 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import * as Slot from "radix-ui/slot";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
const buttonVariants = cva("inline-flex shrink-0 items-center justify-center gap-2 rounded-full text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow] duration-150 ease-out outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
17
|
-
xs: "h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
18
|
-
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
19
|
-
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
20
|
-
icon: "size-9",
|
|
21
|
-
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
22
|
-
"icon-sm": "size-8",
|
|
23
|
-
"icon-lg": "size-10",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
variant: "default",
|
|
28
|
-
size: "default",
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-primary text-primary-foreground shadow-[0_1px_2px_rgb(0_0_0/0.12),inset_0_1px_0_rgb(255_255_255/0.14)] hover:bg-primary/90 disabled:bg-transparent disabled:text-muted-foreground disabled:opacity-100 disabled:shadow-none disabled:ring-1 disabled:ring-input disabled:ring-inset",
|
|
10
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 disabled:bg-transparent disabled:text-muted-foreground disabled:opacity-100 disabled:ring-1 disabled:ring-input disabled:ring-inset",
|
|
11
|
+
outline: "border bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
12
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
13
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
14
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
29
15
|
},
|
|
16
|
+
size: {
|
|
17
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
18
|
+
xs: "h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
19
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
20
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
21
|
+
icon: "size-9",
|
|
22
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
23
|
+
"icon-sm": "size-8",
|
|
24
|
+
"icon-lg": "size-10"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: "default",
|
|
29
|
+
size: "default"
|
|
30
|
+
}
|
|
30
31
|
});
|
|
31
|
-
function Button({
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
function Button({
|
|
33
|
+
className,
|
|
34
|
+
variant = "default",
|
|
35
|
+
size = "default",
|
|
36
|
+
asChild = false,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
40
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
41
|
+
"data-slot": "button",
|
|
42
|
+
"data-variant": variant,
|
|
43
|
+
"data-size": size,
|
|
44
|
+
className: cn(buttonVariants({
|
|
45
|
+
variant,
|
|
46
|
+
size,
|
|
47
|
+
className
|
|
48
|
+
})),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
34
51
|
}
|
|
35
52
|
export { Button, buttonVariants };
|
|
@@ -1,22 +1,186 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { cn } from "cn";
|
|
4
5
|
import * as ToggleGroupPrimitive from "radix-ui/toggle-group";
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
import { toggleVariants } from "./toggle.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
const ToggleGroupContext = React.createContext({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
size: "default",
|
|
11
|
+
variant: "default",
|
|
12
|
+
spacing: 0
|
|
11
13
|
});
|
|
12
|
-
function ToggleGroup(
|
|
13
|
-
|
|
14
|
+
function ToggleGroup(t0) {
|
|
15
|
+
const $ = _c(26);
|
|
16
|
+
let children;
|
|
17
|
+
let className;
|
|
18
|
+
let props;
|
|
19
|
+
let size;
|
|
20
|
+
let t1;
|
|
21
|
+
let variant;
|
|
22
|
+
if ($[0] !== t0) {
|
|
23
|
+
({
|
|
24
|
+
className,
|
|
25
|
+
variant,
|
|
26
|
+
size,
|
|
27
|
+
spacing: t1,
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
} = t0);
|
|
31
|
+
$[0] = t0;
|
|
32
|
+
$[1] = children;
|
|
33
|
+
$[2] = className;
|
|
34
|
+
$[3] = props;
|
|
35
|
+
$[4] = size;
|
|
36
|
+
$[5] = t1;
|
|
37
|
+
$[6] = variant;
|
|
38
|
+
} else {
|
|
39
|
+
children = $[1];
|
|
40
|
+
className = $[2];
|
|
41
|
+
props = $[3];
|
|
42
|
+
size = $[4];
|
|
43
|
+
t1 = $[5];
|
|
44
|
+
variant = $[6];
|
|
45
|
+
}
|
|
46
|
+
const spacing = t1 === undefined ? 0 : t1;
|
|
47
|
+
let t2;
|
|
48
|
+
if ($[7] !== spacing) {
|
|
49
|
+
t2 = {
|
|
50
|
+
"--gap": spacing
|
|
51
|
+
};
|
|
52
|
+
$[7] = spacing;
|
|
53
|
+
$[8] = t2;
|
|
54
|
+
} else {
|
|
55
|
+
t2 = $[8];
|
|
56
|
+
}
|
|
57
|
+
let t3;
|
|
58
|
+
if ($[9] !== className) {
|
|
59
|
+
t3 = cn("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-full data-[spacing=default]:data-[variant=outline]:shadow-xs", className);
|
|
60
|
+
$[9] = className;
|
|
61
|
+
$[10] = t3;
|
|
62
|
+
} else {
|
|
63
|
+
t3 = $[10];
|
|
64
|
+
}
|
|
65
|
+
let t4;
|
|
66
|
+
if ($[11] !== size || $[12] !== spacing || $[13] !== variant) {
|
|
67
|
+
t4 = {
|
|
68
|
+
variant,
|
|
69
|
+
size,
|
|
70
|
+
spacing
|
|
71
|
+
};
|
|
72
|
+
$[11] = size;
|
|
73
|
+
$[12] = spacing;
|
|
74
|
+
$[13] = variant;
|
|
75
|
+
$[14] = t4;
|
|
76
|
+
} else {
|
|
77
|
+
t4 = $[14];
|
|
78
|
+
}
|
|
79
|
+
let t5;
|
|
80
|
+
if ($[15] !== children || $[16] !== t4) {
|
|
81
|
+
t5 = /*#__PURE__*/_jsx(ToggleGroupContext.Provider, {
|
|
82
|
+
value: t4,
|
|
83
|
+
children: children
|
|
84
|
+
});
|
|
85
|
+
$[15] = children;
|
|
86
|
+
$[16] = t4;
|
|
87
|
+
$[17] = t5;
|
|
88
|
+
} else {
|
|
89
|
+
t5 = $[17];
|
|
90
|
+
}
|
|
91
|
+
let t6;
|
|
92
|
+
if ($[18] !== props || $[19] !== size || $[20] !== spacing || $[21] !== t2 || $[22] !== t3 || $[23] !== t5 || $[24] !== variant) {
|
|
93
|
+
t6 = /*#__PURE__*/_jsx(ToggleGroupPrimitive.Root, {
|
|
94
|
+
"data-slot": "toggle-group",
|
|
95
|
+
"data-variant": variant,
|
|
96
|
+
"data-size": size,
|
|
97
|
+
"data-spacing": spacing,
|
|
98
|
+
style: t2,
|
|
99
|
+
className: t3,
|
|
100
|
+
...props,
|
|
101
|
+
children: t5
|
|
102
|
+
});
|
|
103
|
+
$[18] = props;
|
|
104
|
+
$[19] = size;
|
|
105
|
+
$[20] = spacing;
|
|
106
|
+
$[21] = t2;
|
|
107
|
+
$[22] = t3;
|
|
108
|
+
$[23] = t5;
|
|
109
|
+
$[24] = variant;
|
|
110
|
+
$[25] = t6;
|
|
111
|
+
} else {
|
|
112
|
+
t6 = $[25];
|
|
113
|
+
}
|
|
114
|
+
return t6;
|
|
14
115
|
}
|
|
15
|
-
function ToggleGroupItem(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
116
|
+
function ToggleGroupItem(t0) {
|
|
117
|
+
const $ = _c(19);
|
|
118
|
+
let children;
|
|
119
|
+
let className;
|
|
120
|
+
let props;
|
|
121
|
+
let size;
|
|
122
|
+
let variant;
|
|
123
|
+
if ($[0] !== t0) {
|
|
124
|
+
({
|
|
125
|
+
className,
|
|
126
|
+
children,
|
|
127
|
+
variant,
|
|
128
|
+
size,
|
|
129
|
+
...props
|
|
130
|
+
} = t0);
|
|
131
|
+
$[0] = t0;
|
|
132
|
+
$[1] = children;
|
|
133
|
+
$[2] = className;
|
|
134
|
+
$[3] = props;
|
|
135
|
+
$[4] = size;
|
|
136
|
+
$[5] = variant;
|
|
137
|
+
} else {
|
|
138
|
+
children = $[1];
|
|
139
|
+
className = $[2];
|
|
140
|
+
props = $[3];
|
|
141
|
+
size = $[4];
|
|
142
|
+
variant = $[5];
|
|
143
|
+
}
|
|
144
|
+
const context = React.useContext(ToggleGroupContext);
|
|
145
|
+
const t1 = context.variant || variant;
|
|
146
|
+
const t2 = context.size || size;
|
|
147
|
+
const t3 = context.spacing;
|
|
148
|
+
let t4;
|
|
149
|
+
if ($[6] !== className || $[7] !== context.size || $[8] !== context.variant || $[9] !== size || $[10] !== variant) {
|
|
150
|
+
t4 = cn(toggleVariants({
|
|
151
|
+
variant: context.variant || variant,
|
|
152
|
+
size: context.size || size
|
|
153
|
+
}), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-full data-[spacing=0]:last:rounded-r-full data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l", className);
|
|
154
|
+
$[6] = className;
|
|
155
|
+
$[7] = context.size;
|
|
156
|
+
$[8] = context.variant;
|
|
157
|
+
$[9] = size;
|
|
158
|
+
$[10] = variant;
|
|
159
|
+
$[11] = t4;
|
|
160
|
+
} else {
|
|
161
|
+
t4 = $[11];
|
|
162
|
+
}
|
|
163
|
+
let t5;
|
|
164
|
+
if ($[12] !== children || $[13] !== context.spacing || $[14] !== props || $[15] !== t1 || $[16] !== t2 || $[17] !== t4) {
|
|
165
|
+
t5 = /*#__PURE__*/_jsx(ToggleGroupPrimitive.Item, {
|
|
166
|
+
"data-slot": "toggle-group-item",
|
|
167
|
+
"data-variant": t1,
|
|
168
|
+
"data-size": t2,
|
|
169
|
+
"data-spacing": t3,
|
|
170
|
+
className: t4,
|
|
171
|
+
...props,
|
|
172
|
+
children: children
|
|
173
|
+
});
|
|
174
|
+
$[12] = children;
|
|
175
|
+
$[13] = context.spacing;
|
|
176
|
+
$[14] = props;
|
|
177
|
+
$[15] = t1;
|
|
178
|
+
$[16] = t2;
|
|
179
|
+
$[17] = t4;
|
|
180
|
+
$[18] = t5;
|
|
181
|
+
} else {
|
|
182
|
+
t5 = $[18];
|
|
183
|
+
}
|
|
184
|
+
return t5;
|
|
21
185
|
}
|
|
22
186
|
export { ToggleGroup, ToggleGroupItem };
|
package/dist/action/toggle.js
CHANGED
|
@@ -1,26 +1,79 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
4
5
|
import { cn } from "cn";
|
|
5
6
|
import * as TogglePrimitive from "radix-ui/toggle";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
9
|
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-full text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-foreground/10 data-[state=on]:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
size: {
|
|
13
|
-
default: "h-9 min-w-9 px-2.5",
|
|
14
|
-
sm: "h-8 min-w-8 px-2",
|
|
15
|
-
lg: "h-10 min-w-10 px-3",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
defaultVariants: {
|
|
19
|
-
variant: "default",
|
|
20
|
-
size: "default",
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-transparent",
|
|
13
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-muted hover:text-foreground data-[state=on]:border-foreground/30"
|
|
21
14
|
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "h-9 min-w-9 px-2.5",
|
|
17
|
+
sm: "h-8 min-w-8 px-2",
|
|
18
|
+
lg: "h-10 min-w-10 px-3"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "default",
|
|
23
|
+
size: "default"
|
|
24
|
+
}
|
|
22
25
|
});
|
|
23
|
-
function Toggle(
|
|
24
|
-
|
|
26
|
+
function Toggle(t0) {
|
|
27
|
+
const $ = _c(12);
|
|
28
|
+
let className;
|
|
29
|
+
let props;
|
|
30
|
+
let size;
|
|
31
|
+
let variant;
|
|
32
|
+
if ($[0] !== t0) {
|
|
33
|
+
({
|
|
34
|
+
className,
|
|
35
|
+
variant,
|
|
36
|
+
size,
|
|
37
|
+
...props
|
|
38
|
+
} = t0);
|
|
39
|
+
$[0] = t0;
|
|
40
|
+
$[1] = className;
|
|
41
|
+
$[2] = props;
|
|
42
|
+
$[3] = size;
|
|
43
|
+
$[4] = variant;
|
|
44
|
+
} else {
|
|
45
|
+
className = $[1];
|
|
46
|
+
props = $[2];
|
|
47
|
+
size = $[3];
|
|
48
|
+
variant = $[4];
|
|
49
|
+
}
|
|
50
|
+
let t1;
|
|
51
|
+
if ($[5] !== className || $[6] !== size || $[7] !== variant) {
|
|
52
|
+
t1 = cn(toggleVariants({
|
|
53
|
+
variant,
|
|
54
|
+
size,
|
|
55
|
+
className
|
|
56
|
+
}));
|
|
57
|
+
$[5] = className;
|
|
58
|
+
$[6] = size;
|
|
59
|
+
$[7] = variant;
|
|
60
|
+
$[8] = t1;
|
|
61
|
+
} else {
|
|
62
|
+
t1 = $[8];
|
|
63
|
+
}
|
|
64
|
+
let t2;
|
|
65
|
+
if ($[9] !== props || $[10] !== t1) {
|
|
66
|
+
t2 = /*#__PURE__*/_jsx(TogglePrimitive.Root, {
|
|
67
|
+
"data-slot": "toggle",
|
|
68
|
+
className: t1,
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
$[9] = props;
|
|
72
|
+
$[10] = t1;
|
|
73
|
+
$[11] = t2;
|
|
74
|
+
} else {
|
|
75
|
+
t2 = $[11];
|
|
76
|
+
}
|
|
77
|
+
return t2;
|
|
25
78
|
}
|
|
26
79
|
export { Toggle, toggleVariants };
|
package/dist/display/avatar.js
CHANGED
|
@@ -1,14 +1,125 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { cn } from "cn";
|
|
4
5
|
import * as AvatarPrimitive from "radix-ui/avatar";
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
function Avatar(t0) {
|
|
9
|
+
const $ = _c(8);
|
|
10
|
+
let className;
|
|
11
|
+
let props;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
} = t0);
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
$[1] = className;
|
|
19
|
+
$[2] = props;
|
|
20
|
+
} else {
|
|
21
|
+
className = $[1];
|
|
22
|
+
props = $[2];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[3] !== className) {
|
|
26
|
+
t1 = cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className);
|
|
27
|
+
$[3] = className;
|
|
28
|
+
$[4] = t1;
|
|
29
|
+
} else {
|
|
30
|
+
t1 = $[4];
|
|
31
|
+
}
|
|
32
|
+
let t2;
|
|
33
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
34
|
+
t2 = /*#__PURE__*/_jsx(AvatarPrimitive.Root, {
|
|
35
|
+
"data-slot": "avatar",
|
|
36
|
+
className: t1,
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
$[5] = props;
|
|
40
|
+
$[6] = t1;
|
|
41
|
+
$[7] = t2;
|
|
42
|
+
} else {
|
|
43
|
+
t2 = $[7];
|
|
44
|
+
}
|
|
45
|
+
return t2;
|
|
7
46
|
}
|
|
8
|
-
function AvatarImage(
|
|
9
|
-
|
|
47
|
+
function AvatarImage(t0) {
|
|
48
|
+
const $ = _c(8);
|
|
49
|
+
let className;
|
|
50
|
+
let props;
|
|
51
|
+
if ($[0] !== t0) {
|
|
52
|
+
({
|
|
53
|
+
className,
|
|
54
|
+
...props
|
|
55
|
+
} = t0);
|
|
56
|
+
$[0] = t0;
|
|
57
|
+
$[1] = className;
|
|
58
|
+
$[2] = props;
|
|
59
|
+
} else {
|
|
60
|
+
className = $[1];
|
|
61
|
+
props = $[2];
|
|
62
|
+
}
|
|
63
|
+
let t1;
|
|
64
|
+
if ($[3] !== className) {
|
|
65
|
+
t1 = cn("aspect-square size-full", className);
|
|
66
|
+
$[3] = className;
|
|
67
|
+
$[4] = t1;
|
|
68
|
+
} else {
|
|
69
|
+
t1 = $[4];
|
|
70
|
+
}
|
|
71
|
+
let t2;
|
|
72
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
73
|
+
t2 = /*#__PURE__*/_jsx(AvatarPrimitive.Image, {
|
|
74
|
+
"data-slot": "avatar-image",
|
|
75
|
+
className: t1,
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
$[5] = props;
|
|
79
|
+
$[6] = t1;
|
|
80
|
+
$[7] = t2;
|
|
81
|
+
} else {
|
|
82
|
+
t2 = $[7];
|
|
83
|
+
}
|
|
84
|
+
return t2;
|
|
10
85
|
}
|
|
11
|
-
function AvatarFallback(
|
|
12
|
-
|
|
86
|
+
function AvatarFallback(t0) {
|
|
87
|
+
const $ = _c(8);
|
|
88
|
+
let className;
|
|
89
|
+
let props;
|
|
90
|
+
if ($[0] !== t0) {
|
|
91
|
+
({
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
} = t0);
|
|
95
|
+
$[0] = t0;
|
|
96
|
+
$[1] = className;
|
|
97
|
+
$[2] = props;
|
|
98
|
+
} else {
|
|
99
|
+
className = $[1];
|
|
100
|
+
props = $[2];
|
|
101
|
+
}
|
|
102
|
+
let t1;
|
|
103
|
+
if ($[3] !== className) {
|
|
104
|
+
t1 = cn("flex size-full items-center justify-center rounded-full bg-ghost text-xs font-medium uppercase", className);
|
|
105
|
+
$[3] = className;
|
|
106
|
+
$[4] = t1;
|
|
107
|
+
} else {
|
|
108
|
+
t1 = $[4];
|
|
109
|
+
}
|
|
110
|
+
let t2;
|
|
111
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
112
|
+
t2 = /*#__PURE__*/_jsx(AvatarPrimitive.Fallback, {
|
|
113
|
+
"data-slot": "avatar-fallback",
|
|
114
|
+
className: t1,
|
|
115
|
+
...props
|
|
116
|
+
});
|
|
117
|
+
$[5] = props;
|
|
118
|
+
$[6] = t1;
|
|
119
|
+
$[7] = t2;
|
|
120
|
+
} else {
|
|
121
|
+
t2 = $[7];
|
|
122
|
+
}
|
|
123
|
+
return t2;
|
|
13
124
|
}
|
|
14
125
|
export { Avatar, AvatarFallback, AvatarImage };
|
package/dist/display/badge.js
CHANGED
|
@@ -1,27 +1,40 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import * as Slot from "radix-ui/slot";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
const badgeVariants = cva("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
10
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
11
|
+
destructive: "bg-destructive text-white focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
|
|
12
|
+
success: "bg-good/10 text-good [a&]:hover:bg-good/15",
|
|
13
|
+
warning: "bg-warn/10 text-warn [a&]:hover:bg-warn/15",
|
|
14
|
+
"destructive-soft": "bg-destructive/10 text-destructive [a&]:hover:bg-destructive/15",
|
|
15
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
16
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
17
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default"
|
|
22
|
+
}
|
|
22
23
|
});
|
|
23
|
-
function Badge({
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
function Badge({
|
|
25
|
+
className,
|
|
26
|
+
variant = "default",
|
|
27
|
+
asChild = false,
|
|
28
|
+
...props
|
|
29
|
+
}) {
|
|
30
|
+
const Comp = asChild ? Slot.Root : "span";
|
|
31
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
32
|
+
"data-slot": "badge",
|
|
33
|
+
"data-variant": variant,
|
|
34
|
+
className: cn(badgeVariants({
|
|
35
|
+
variant
|
|
36
|
+
}), className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
26
39
|
}
|
|
27
40
|
export { Badge, badgeVariants };
|