@cognite/aura 0.1.5 → 0.1.6
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/colors.css +824 -0
- package/dist/components/index.d.ts +9 -2
- package/dist/components/index.js +279 -249
- package/dist/components/ui/core/accordion/accordion.d.ts +24 -0
- package/dist/components/ui/core/accordion/accordion.js +113 -0
- package/dist/components/ui/core/accordion/accordion.metadata.d.ts +2 -0
- package/dist/components/ui/core/accordion/accordion.metadata.js +9 -0
- package/dist/components/ui/core/alert/alert.js +65 -65
- package/dist/components/ui/core/avatar/avatar.js +29 -32
- package/dist/components/ui/core/badge/badge.d.ts +1 -1
- package/dist/components/ui/core/badge/badge.js +44 -52
- package/dist/components/ui/core/banner/banner.d.ts +40 -0
- package/dist/components/ui/core/banner/banner.js +218 -0
- package/dist/components/ui/core/banner/banner.metadata.d.ts +2 -0
- package/dist/components/ui/core/banner/banner.metadata.js +9 -0
- package/dist/components/ui/core/button/button.d.ts +2 -2
- package/dist/components/ui/core/button/button.js +19 -20
- package/dist/components/ui/core/button-group/button-group.js +10 -10
- package/dist/components/ui/core/card/card.js +1 -1
- package/dist/components/ui/core/code-block/code-block.d.ts +10 -3
- package/dist/components/ui/core/code-block/code-block.js +147 -94
- package/dist/components/ui/core/code-block/code-block.metadata.js +1 -1
- package/dist/components/ui/core/collapsible/collapsible.js +30 -24
- package/dist/components/ui/core/command/command.d.ts +2 -2
- package/dist/components/ui/core/command/command.js +30 -30
- package/dist/components/ui/core/dialog/dialog.js +8 -8
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +35 -35
- package/dist/components/ui/core/helper-text/helper-text.js +8 -8
- package/dist/components/ui/core/hover-card/hover-card.js +5 -5
- package/dist/components/ui/core/inline-citation/inline-citation.js +19 -16
- package/dist/components/ui/core/input/input.d.ts +1 -5
- package/dist/components/ui/core/input/input.js +24 -30
- package/dist/components/ui/core/input-group/input-group.d.ts +2 -2
- package/dist/components/ui/core/input-group/input-group.js +104 -74
- package/dist/components/ui/core/label/label.d.ts +3 -1
- package/dist/components/ui/core/label/label.js +39 -16
- package/dist/components/ui/core/label/label.metadata.js +2 -2
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.d.ts +11 -0
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +13 -0
- package/dist/components/ui/core/message/message.d.ts +1 -1
- package/dist/components/ui/core/message/message.js +62 -44
- package/dist/components/ui/core/popover/popover.d.ts +10 -1
- package/dist/components/ui/core/popover/popover.js +137 -34
- package/dist/components/ui/core/popover/popover.metadata.js +9 -0
- package/dist/components/ui/core/progress/progress.d.ts +10 -0
- package/dist/components/ui/core/progress/progress.js +61 -0
- package/dist/components/ui/core/progress/progress.metadata.d.ts +2 -0
- package/dist/components/ui/core/progress/progress.metadata.js +9 -0
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +2 -2
- package/dist/components/ui/core/prompt-input/prompt-input.js +100 -100
- package/dist/components/ui/core/select/select.d.ts +3 -3
- package/dist/components/ui/core/select/select.js +69 -73
- package/dist/components/ui/core/skeleton/skeleton.js +6 -6
- package/dist/components/ui/core/sources/sources.js +8 -1
- package/dist/components/ui/core/textarea/textarea.d.ts +1 -8
- package/dist/components/ui/core/textarea/textarea.js +21 -45
- package/dist/components/ui/core/tool/tool.js +38 -34
- package/dist/components/ui/core/tooltip/tooltip.js +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +276 -249
- package/dist/lib/utils.d.ts +6 -6
- package/dist/lib/utils.js +26 -26
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +3 -812
- package/package.json +21 -7
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
import { Accordion as r } from "@base-ui/react/accordion";
|
|
4
|
+
import { IconChevronDown as A } from "@tabler/icons-react";
|
|
5
|
+
import { cn as u } from "../../../../lib/utils.js";
|
|
6
|
+
const w = d((e, t) => {
|
|
7
|
+
if (e.type === "multiple") {
|
|
8
|
+
const {
|
|
9
|
+
type: s,
|
|
10
|
+
value: c,
|
|
11
|
+
defaultValue: b,
|
|
12
|
+
onValueChange: f,
|
|
13
|
+
...x
|
|
14
|
+
} = e;
|
|
15
|
+
return /* @__PURE__ */ o(
|
|
16
|
+
r.Root,
|
|
17
|
+
{
|
|
18
|
+
ref: t,
|
|
19
|
+
"data-slot": "accordion",
|
|
20
|
+
multiple: !0,
|
|
21
|
+
value: c,
|
|
22
|
+
defaultValue: b,
|
|
23
|
+
onValueChange: (y) => {
|
|
24
|
+
if (!f) return;
|
|
25
|
+
const N = y.filter(
|
|
26
|
+
(V) => V != null
|
|
27
|
+
);
|
|
28
|
+
f(N);
|
|
29
|
+
},
|
|
30
|
+
...x
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const {
|
|
35
|
+
type: a,
|
|
36
|
+
collapsible: i = !1,
|
|
37
|
+
value: l,
|
|
38
|
+
defaultValue: n,
|
|
39
|
+
onValueChange: g,
|
|
40
|
+
...p
|
|
41
|
+
} = e, h = l === void 0 ? void 0 : l === "" ? [] : [l], v = n === void 0 ? void 0 : n === "" ? [] : [n];
|
|
42
|
+
return /* @__PURE__ */ o(
|
|
43
|
+
r.Root,
|
|
44
|
+
{
|
|
45
|
+
ref: t,
|
|
46
|
+
"data-slot": "accordion",
|
|
47
|
+
multiple: !1,
|
|
48
|
+
value: h,
|
|
49
|
+
defaultValue: v,
|
|
50
|
+
onValueChange: (s, c) => {
|
|
51
|
+
if (g) {
|
|
52
|
+
if (!i && s.length === 0) {
|
|
53
|
+
c.cancel();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
g(s[0] ?? "");
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
...p
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
w.displayName = "Accordion";
|
|
64
|
+
const C = d(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
65
|
+
r.Item,
|
|
66
|
+
{
|
|
67
|
+
ref: a,
|
|
68
|
+
"data-slot": "accordion-item",
|
|
69
|
+
className: u("mt-2 first:mt-0 rounded-md", e),
|
|
70
|
+
...t
|
|
71
|
+
}
|
|
72
|
+
));
|
|
73
|
+
C.displayName = "AccordionItem";
|
|
74
|
+
const k = d(({ className: e, children: t, icon: a, ...i }, l) => {
|
|
75
|
+
const n = a;
|
|
76
|
+
return /* @__PURE__ */ o(r.Header, { className: "flex", children: /* @__PURE__ */ m(
|
|
77
|
+
r.Trigger,
|
|
78
|
+
{
|
|
79
|
+
ref: l,
|
|
80
|
+
"data-slot": "accordion-trigger",
|
|
81
|
+
className: u(
|
|
82
|
+
"focus-visible:border-ring focus-visible:ring-ring-shadow group/accordion-trigger flex flex-1 items-center justify-between gap-4.5 rounded-lg px-3 py-2 text-left hover:bg-muted-background hover:text-foreground focus-visible:ring text-base font-normal tracking-tightest transition-all outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-disabled-foreground aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:text-disabled-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled-foreground",
|
|
83
|
+
e
|
|
84
|
+
),
|
|
85
|
+
...i,
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
88
|
+
n && /* @__PURE__ */ o(n, { className: "pointer-events-none size-4 shrink-0 transition-transform duration-200" }),
|
|
89
|
+
/* @__PURE__ */ o("span", { children: t })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ o(A, { className: "pointer-events-none size-4 shrink-0 transition-transform duration-200 group-aria-expanded/accordion-trigger:rotate-180" })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
) });
|
|
95
|
+
});
|
|
96
|
+
k.displayName = "AccordionTrigger";
|
|
97
|
+
const I = d(({ className: e, children: t, ...a }, i) => /* @__PURE__ */ o(
|
|
98
|
+
r.Panel,
|
|
99
|
+
{
|
|
100
|
+
ref: i,
|
|
101
|
+
"data-slot": "accordion-content",
|
|
102
|
+
className: "h-(--accordion-panel-height) overflow-hidden text-sm font-normal tracking-tightest text-secondary-foreground transition-all duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0",
|
|
103
|
+
...a,
|
|
104
|
+
children: /* @__PURE__ */ o("div", { className: u("px-3 pb-3 pt-2", e), children: t })
|
|
105
|
+
}
|
|
106
|
+
));
|
|
107
|
+
I.displayName = "AccordionContent";
|
|
108
|
+
export {
|
|
109
|
+
w as Accordion,
|
|
110
|
+
I as AccordionContent,
|
|
111
|
+
C as AccordionItem,
|
|
112
|
+
k as AccordionTrigger
|
|
113
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
name: "Accordion",
|
|
3
|
+
status: "experimental",
|
|
4
|
+
description: "An accessible accordion with smooth expand/collapse built on Base UI primitives.",
|
|
5
|
+
llmUsage: "Use `<Accordion>` with `<AccordionItem>`, `<AccordionTrigger>`, and `<AccordionContent>` for collapsible sections."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
o as AccordionMetadata
|
|
9
|
+
};
|
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { IconX as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { useControllableState as
|
|
1
|
+
import { jsx as a, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as w, forwardRef as n, useMemo as y, useContext as d } from "react";
|
|
3
|
+
import { IconX as A } from "@tabler/icons-react";
|
|
4
|
+
import { cva as k } from "class-variance-authority";
|
|
5
|
+
import { useControllableState as N } from "../../../../lib/use-controllable-state.js";
|
|
6
6
|
import { cn as s } from "../../../../lib/utils.js";
|
|
7
7
|
import { Button as p } from "../button/button.js";
|
|
8
|
-
const
|
|
8
|
+
const l = w({
|
|
9
9
|
show: !0,
|
|
10
10
|
setShow: () => {
|
|
11
11
|
},
|
|
12
12
|
variant: "default"
|
|
13
|
-
}),
|
|
13
|
+
}), C = k(
|
|
14
14
|
"relative w-full rounded-md pt-2.5 pr-3 has-[>button[data-slot=alert-close]]:pr-12 pb-2 pl-3 text-sm grid has-[>svg]:grid-cols-[auto_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-2 has-[>svg]:gap-y-1 items-start [&>svg]:size-4 [&>svg]:translate-y-0.65 [&>svg]:shrink-0",
|
|
15
15
|
{
|
|
16
16
|
variants: {
|
|
17
17
|
variant: {
|
|
18
|
-
default: "bg-
|
|
19
|
-
secondary: "bg-
|
|
20
|
-
warning: "bg-warning-
|
|
21
|
-
error: "bg-destructive-
|
|
18
|
+
default: "bg-neutral-muted-background text-foreground [&>svg]:text-info-foreground",
|
|
19
|
+
secondary: "bg-info-muted-background text-foreground [&>svg]:text-info-foreground",
|
|
20
|
+
warning: "bg-warning-muted-background [&>svg]:text-warning-foreground",
|
|
21
|
+
error: "bg-destructive-muted-background text-foreground [&>svg]:text-destructive-foreground"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
defaultVariants: {
|
|
25
25
|
variant: "default"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
),
|
|
28
|
+
), V = n(
|
|
29
29
|
({
|
|
30
30
|
className: t,
|
|
31
|
-
variant:
|
|
32
|
-
visible:
|
|
33
|
-
defaultVisible:
|
|
34
|
-
onClose:
|
|
31
|
+
variant: r = "default",
|
|
32
|
+
visible: e,
|
|
33
|
+
defaultVisible: o = !0,
|
|
34
|
+
onClose: i,
|
|
35
35
|
children: c,
|
|
36
36
|
...u
|
|
37
37
|
}, x) => {
|
|
38
|
-
const [g,
|
|
39
|
-
defaultProp:
|
|
40
|
-
prop:
|
|
41
|
-
onChange:
|
|
42
|
-
}), f =
|
|
43
|
-
() => ({ show: g, setShow:
|
|
44
|
-
[g,
|
|
38
|
+
const [g, m] = N({
|
|
39
|
+
defaultProp: o,
|
|
40
|
+
prop: e,
|
|
41
|
+
onChange: i
|
|
42
|
+
}), f = r ?? "default", b = y(
|
|
43
|
+
() => ({ show: g, setShow: m, variant: f }),
|
|
44
|
+
[g, m, f]
|
|
45
45
|
);
|
|
46
|
-
return g ? /* @__PURE__ */
|
|
46
|
+
return g ? /* @__PURE__ */ a(l.Provider, { value: b, children: /* @__PURE__ */ v(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
49
|
ref: x,
|
|
50
50
|
"data-slot": "alert",
|
|
51
51
|
role: "alert",
|
|
52
|
-
className: s(
|
|
52
|
+
className: s(C({ variant: f }), t),
|
|
53
53
|
...u,
|
|
54
54
|
children: [
|
|
55
|
-
|
|
55
|
+
i && /* @__PURE__ */ a(h, {}),
|
|
56
56
|
c
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
59
|
) }) : null;
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
|
|
62
|
+
V.displayName = "Alert";
|
|
63
63
|
const z = {
|
|
64
|
-
default: "text-
|
|
65
|
-
secondary: "text-
|
|
64
|
+
default: "text-info-foreground",
|
|
65
|
+
secondary: "text-info-foreground",
|
|
66
66
|
warning: "text-warning-foreground",
|
|
67
67
|
error: "text-destructive-foreground"
|
|
68
68
|
}, S = n(
|
|
69
|
-
({ className: t, ...
|
|
70
|
-
const { variant:
|
|
71
|
-
return /* @__PURE__ */
|
|
69
|
+
({ className: t, ...r }, e) => {
|
|
70
|
+
const { variant: o } = d(l);
|
|
71
|
+
return /* @__PURE__ */ a(
|
|
72
72
|
"div",
|
|
73
73
|
{
|
|
74
|
-
ref:
|
|
74
|
+
ref: e,
|
|
75
75
|
"data-slot": "alert-title",
|
|
76
76
|
className: s(
|
|
77
77
|
"text-base font-medium leading-5 tracking-tightest",
|
|
78
|
-
z[
|
|
78
|
+
z[o],
|
|
79
79
|
t
|
|
80
80
|
),
|
|
81
|
-
...
|
|
81
|
+
...r
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
86
|
S.displayName = "AlertTitle";
|
|
87
87
|
const j = {
|
|
88
|
-
default: "text-
|
|
88
|
+
default: "text-foreground",
|
|
89
89
|
secondary: "text-foreground",
|
|
90
|
-
warning: "text-
|
|
90
|
+
warning: "text-foreground",
|
|
91
91
|
error: "text-foreground"
|
|
92
92
|
}, B = n(
|
|
93
|
-
({ className: t, ...
|
|
94
|
-
const { variant:
|
|
95
|
-
return /* @__PURE__ */
|
|
93
|
+
({ className: t, ...r }, e) => {
|
|
94
|
+
const { variant: o } = d(l);
|
|
95
|
+
return /* @__PURE__ */ a(
|
|
96
96
|
"div",
|
|
97
97
|
{
|
|
98
|
-
ref:
|
|
98
|
+
ref: e,
|
|
99
99
|
"data-slot": "alert-description",
|
|
100
100
|
className: s(
|
|
101
101
|
"col-start-2 grid justify-items-start gap-1 text-sm font-normal leading-4.5 tracking-tight items-center",
|
|
102
|
-
j[
|
|
102
|
+
j[o],
|
|
103
103
|
t
|
|
104
104
|
),
|
|
105
|
-
...
|
|
105
|
+
...r
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
110
|
B.displayName = "AlertDescription";
|
|
111
111
|
const D = n(
|
|
112
|
-
({ className: t, ...
|
|
112
|
+
({ className: t, ...r }, e) => /* @__PURE__ */ a(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
|
-
ref:
|
|
115
|
+
ref: e,
|
|
116
116
|
"data-slot": "alert-actions",
|
|
117
117
|
className: s(
|
|
118
118
|
"col-start-2 flex flex-wrap items-start gap-2 pt-1",
|
|
119
119
|
t
|
|
120
120
|
),
|
|
121
|
-
...
|
|
121
|
+
...r
|
|
122
122
|
}
|
|
123
123
|
)
|
|
124
124
|
);
|
|
125
125
|
D.displayName = "AlertActions";
|
|
126
|
-
const T = n(({ className: t, ...
|
|
127
|
-
const { variant:
|
|
128
|
-
return /* @__PURE__ */
|
|
126
|
+
const T = n(({ className: t, ...r }, e) => {
|
|
127
|
+
const { variant: o } = d(l);
|
|
128
|
+
return /* @__PURE__ */ a(
|
|
129
129
|
p,
|
|
130
130
|
{
|
|
131
|
-
ref:
|
|
131
|
+
ref: e,
|
|
132
132
|
"data-slot": "alert-button",
|
|
133
133
|
variant: "ghost",
|
|
134
134
|
size: "sm",
|
|
135
135
|
className: s("text-foreground", {
|
|
136
|
-
default: "hover:bg-
|
|
137
|
-
secondary: "hover:bg-
|
|
138
|
-
warning: "hover:bg-warning-hover",
|
|
139
|
-
error: "hover:bg-destructive-hover"
|
|
140
|
-
}[
|
|
141
|
-
...
|
|
136
|
+
default: "hover:bg-neutral-background-hover",
|
|
137
|
+
secondary: "hover:bg-info-background-hover",
|
|
138
|
+
warning: "hover:bg-warning-background-hover",
|
|
139
|
+
error: "hover:bg-destructive-background-hover"
|
|
140
|
+
}[o], t),
|
|
141
|
+
...r
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
144
|
});
|
|
145
145
|
T.displayName = "AlertButton";
|
|
146
146
|
const h = n(
|
|
147
|
-
({ className: t, onClick:
|
|
148
|
-
const { setShow:
|
|
149
|
-
|
|
147
|
+
({ className: t, onClick: r, ...e }, o) => {
|
|
148
|
+
const { setShow: i } = d(l), c = (u) => {
|
|
149
|
+
i(!1), r?.(u);
|
|
150
150
|
};
|
|
151
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ v(
|
|
152
152
|
p,
|
|
153
153
|
{
|
|
154
|
-
ref:
|
|
154
|
+
ref: o,
|
|
155
155
|
"data-slot": "alert-close",
|
|
156
156
|
variant: "ghost",
|
|
157
157
|
size: "icon-sm",
|
|
@@ -160,10 +160,10 @@ const h = n(
|
|
|
160
160
|
t
|
|
161
161
|
),
|
|
162
162
|
onClick: c,
|
|
163
|
-
...
|
|
163
|
+
...e,
|
|
164
164
|
children: [
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ a(A, { size: 14 }),
|
|
166
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
169
|
);
|
|
@@ -171,7 +171,7 @@ const h = n(
|
|
|
171
171
|
);
|
|
172
172
|
h.displayName = "AlertClose";
|
|
173
173
|
export {
|
|
174
|
-
|
|
174
|
+
V as Alert,
|
|
175
175
|
D as AlertActions,
|
|
176
176
|
T as AlertButton,
|
|
177
177
|
h as AlertClose,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as i, Fragment as v } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as t } from "react";
|
|
3
3
|
import { Avatar as n } from "@base-ui/react/avatar";
|
|
4
4
|
import { cva as g } from "class-variance-authority";
|
|
5
5
|
import { cn as d } from "../../../../lib/utils.js";
|
|
6
6
|
const u = g(
|
|
7
|
-
"group/avatar relative inline-flex text-base font-medium leading-5 shrink-0 overflow-hidden
|
|
7
|
+
"group/avatar relative inline-flex text-base font-medium leading-5 shrink-0 overflow-hidden flex-col justify-center items-center box-border",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-decorative-background
|
|
12
|
-
nordic: "bg-decorative-background
|
|
13
|
-
aurora: "bg-decorative-background
|
|
14
|
-
fjord: "bg-decorative-background
|
|
15
|
-
dusk: "bg-decorative-background
|
|
16
|
-
orange: "bg-decorative-background
|
|
17
|
-
sky: "bg-decorative-background
|
|
18
|
-
overflow: "bg-secondary text-secondary-foreground hover:bg-secondary-hover"
|
|
11
|
+
default: "bg-decorative-mountain-background text-decorative-mountain-foreground hover:bg-decorative-mountain-background-hover",
|
|
12
|
+
nordic: "bg-decorative-nordic-background text-decorative-nordic-foreground hover:bg-background-hover",
|
|
13
|
+
aurora: "bg-decorative-aurora-background text-decorative-aurora-foreground hover:bg-decorative-aurora-background-hover",
|
|
14
|
+
fjord: "bg-decorative-fjord-background text-decorative-fjord-foreground hover:bg-decorative-fjord-background-hover",
|
|
15
|
+
dusk: "bg-decorative-dusk-background text-decorative-dusk-foreground hover:bg-decorative-dusk-background-hover",
|
|
16
|
+
orange: "bg-decorative-orange-background text-decorative-orange-foreground hover:bg-decorative-orange-background-hover",
|
|
17
|
+
sky: "bg-decorative-sky-background text-decorative-sky-foreground hover:bg-decorative-sky-background-hover",
|
|
18
|
+
overflow: "bg-secondary-background text-secondary-foreground hover:bg-secondary-background-hover"
|
|
19
19
|
},
|
|
20
20
|
sizes: {
|
|
21
|
-
default: "size-9 text-sm [&_svg]:w-5 [&_svg]:h-5",
|
|
22
|
-
xsm: "size-7 text-xs [&_svg]:w-4 [&_svg]:h-4",
|
|
23
|
-
xxsm: "size-5 text-2xs [&_svg]:w-3 [&_svg]:h-3"
|
|
21
|
+
default: "size-9 rounded-lg text-sm [&_svg]:w-5 [&_svg]:h-5",
|
|
22
|
+
xsm: "size-7 rounded-md text-xs [&_svg]:w-4 [&_svg]:h-4",
|
|
23
|
+
xxsm: "size-5 rounded-sm text-2xs [&_svg]:w-3 [&_svg]:h-3"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
defaultVariants: {
|
|
@@ -28,23 +28,26 @@ const u = g(
|
|
|
28
28
|
sizes: "default"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
), l = t(({ className: a, variant: e, sizes: r, ...s },
|
|
31
|
+
), l = t(({ className: a, variant: e, sizes: r, ...s }, c) => /* @__PURE__ */ o(
|
|
32
32
|
n.Root,
|
|
33
33
|
{
|
|
34
|
-
ref:
|
|
34
|
+
ref: c,
|
|
35
35
|
"data-slot": "avatar",
|
|
36
36
|
className: d(u({ variant: e, sizes: r }), a),
|
|
37
37
|
...s
|
|
38
38
|
}
|
|
39
39
|
));
|
|
40
40
|
l.displayName = "Avatar";
|
|
41
|
-
const b = t(({ className: a, ...e }, r) => /* @__PURE__ */
|
|
41
|
+
const b = t(({ className: a, ...e }, r) => /* @__PURE__ */ i(v, { children: [
|
|
42
42
|
/* @__PURE__ */ o(
|
|
43
43
|
n.Image,
|
|
44
44
|
{
|
|
45
45
|
ref: r,
|
|
46
46
|
"data-slot": "avatar-image",
|
|
47
|
-
className: d(
|
|
47
|
+
className: d(
|
|
48
|
+
"aspect-square size-full object-cover object-center",
|
|
49
|
+
a
|
|
50
|
+
),
|
|
48
51
|
...e
|
|
49
52
|
}
|
|
50
53
|
),
|
|
@@ -52,43 +55,37 @@ const b = t(({ className: a, ...e }, r) => /* @__PURE__ */ c(v, { children: [
|
|
|
52
55
|
"span",
|
|
53
56
|
{
|
|
54
57
|
"data-slot": "avatar-image-backdrop",
|
|
55
|
-
className: "absolute inset-0 bg-
|
|
58
|
+
className: "absolute inset-0 bg-overlay-background opacity-0 transition-opacity group-hover/avatar:opacity-100 pointer-events-none",
|
|
56
59
|
"aria-hidden": "true"
|
|
57
60
|
}
|
|
58
61
|
)
|
|
59
62
|
] }));
|
|
60
63
|
b.displayName = "AvatarImage";
|
|
61
|
-
const
|
|
64
|
+
const f = t(({ className: a, ...e }, r) => /* @__PURE__ */ o(
|
|
62
65
|
n.Fallback,
|
|
63
66
|
{
|
|
64
67
|
ref: r,
|
|
65
68
|
"data-slot": "avatar-fallback",
|
|
66
|
-
className: d(
|
|
67
|
-
" flex size-full items-center justify-center rounded-md",
|
|
68
|
-
a
|
|
69
|
-
),
|
|
69
|
+
className: d(" flex size-full items-center justify-center", a),
|
|
70
70
|
...e
|
|
71
71
|
}
|
|
72
72
|
));
|
|
73
|
-
|
|
74
|
-
const
|
|
73
|
+
f.displayName = "AvatarFallback";
|
|
74
|
+
const m = t(
|
|
75
75
|
({ className: a, ...e }, r) => /* @__PURE__ */ o(
|
|
76
76
|
"span",
|
|
77
77
|
{
|
|
78
78
|
ref: r,
|
|
79
79
|
"data-slot": "avatar-icon",
|
|
80
|
-
className: d(
|
|
81
|
-
"flex size-full items-center justify-center rounded-md",
|
|
82
|
-
a
|
|
83
|
-
),
|
|
80
|
+
className: d("flex size-full items-center justify-center", a),
|
|
84
81
|
...e
|
|
85
82
|
}
|
|
86
83
|
)
|
|
87
84
|
);
|
|
88
|
-
|
|
85
|
+
m.displayName = "AvatarIcon";
|
|
89
86
|
export {
|
|
90
87
|
l as Avatar,
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
f as AvatarFallback,
|
|
89
|
+
m as AvatarIcon,
|
|
93
90
|
b as AvatarImage
|
|
94
91
|
};
|
|
@@ -2,7 +2,7 @@ import { useRender } from '@base-ui/react/use-render';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "secondary" | "gray" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "mountain" | "error" | "warning" | "success" | "inProgress" | "archived" | "closable" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "icon" | "default" | null | undefined;
|
|
6
6
|
outline?: boolean | null | undefined;
|
|
7
7
|
background?: boolean | null | undefined;
|
|
8
8
|
dot?: boolean | null | undefined;
|
|
@@ -4,30 +4,30 @@ import { useRender as v } from "@base-ui/react/use-render";
|
|
|
4
4
|
import { cva as m } from "class-variance-authority";
|
|
5
5
|
import { cn as x } from "../../../../lib/utils.js";
|
|
6
6
|
const k = m(
|
|
7
|
-
"inline-flex items-center align-middle justify-center rounded-md border text-
|
|
7
|
+
"inline-flex h-5 items-center align-middle justify-center rounded-md border px-1 text-sm font-medium leading-[18px] w-fit whitespace-nowrap shrink-0 gap-1 [&>svg]:pointer-events-none [&>svg]:size-3 outline-none focus-visible:border-ring focus-visible:ring-ring-shadow focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "border-transparent bg-
|
|
12
|
-
fjord: "border-transparent bg-decorative-background
|
|
13
|
-
nordic: "border-transparent bg-decorative-background
|
|
14
|
-
aurora: "border-transparent bg-decorative-background
|
|
15
|
-
sky: "border-transparent bg-decorative-background
|
|
16
|
-
dusk: "border-transparent bg-decorative-background
|
|
17
|
-
orange: "border-transparent bg-decorative-background
|
|
18
|
-
gray: "border-transparent bg-decorative-background
|
|
19
|
-
mountain: "border-transparent bg-decorative-background
|
|
20
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground
|
|
21
|
-
error: "border-transparent bg-destructive text-destructive-foreground-
|
|
22
|
-
warning: "border-transparent bg-warning text-warning-foreground-
|
|
23
|
-
success: "border-transparent bg-success text-success-foreground-
|
|
24
|
-
inProgress: "border-transparent bg-
|
|
25
|
-
archived: "border-transparent bg-
|
|
26
|
-
closable: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary-hover cursor-pointer"
|
|
11
|
+
default: "border-transparent bg-neutral-background text-foreground-on-neutral",
|
|
12
|
+
fjord: "border-transparent bg-decorative-fjord-background text-decorative-fjord-foreground",
|
|
13
|
+
nordic: "border-transparent bg-decorative-nordic-background text-decorative-nordic-foreground",
|
|
14
|
+
aurora: "border-transparent bg-decorative-aurora-background text-decorative-aurora-foreground",
|
|
15
|
+
sky: "border-transparent bg-decorative-sky-background text-decorative-sky-foreground",
|
|
16
|
+
dusk: "border-transparent bg-decorative-dusk-background text-decorative-dusk-foreground",
|
|
17
|
+
orange: "border-transparent bg-decorative-orange-background text-decorative-orange-foreground",
|
|
18
|
+
gray: "border-transparent bg-decorative-mountain-background text-decorative-mountain-foreground",
|
|
19
|
+
mountain: "border-transparent bg-decorative-mountain-background text-decorative-mountain-foreground",
|
|
20
|
+
secondary: "border-transparent bg-secondary-background text-secondary-foreground",
|
|
21
|
+
error: "border-transparent bg-destructive-background text-destructive-foreground-on-critical",
|
|
22
|
+
warning: "border-transparent bg-warning-background text-warning-foreground-on-warning",
|
|
23
|
+
success: "border-transparent bg-success-background text-success-foreground-on-success",
|
|
24
|
+
inProgress: "border-transparent bg-info-background text-info-foreground-on-info",
|
|
25
|
+
archived: "border-transparent bg-neutral-background text-neutral-foreground-on-neutral",
|
|
26
|
+
closable: "border-transparent bg-secondary-background text-secondary-foreground hover:bg-secondary-background-hover cursor-pointer"
|
|
27
27
|
},
|
|
28
28
|
size: {
|
|
29
|
-
default: "
|
|
30
|
-
icon: "
|
|
29
|
+
default: "",
|
|
30
|
+
icon: "w-5 px-0 py-0"
|
|
31
31
|
},
|
|
32
32
|
outline: {
|
|
33
33
|
true: "border-border"
|
|
@@ -36,16 +36,9 @@ const k = m(
|
|
|
36
36
|
false: "bg-transparent"
|
|
37
37
|
},
|
|
38
38
|
dot: {
|
|
39
|
-
true: "rounded-
|
|
39
|
+
true: "min-w-5 rounded-md border border-background px-1 gap-0"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
compoundVariants: [
|
|
43
|
-
{
|
|
44
|
-
outline: !0,
|
|
45
|
-
size: "default",
|
|
46
|
-
className: "px-1.5"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
42
|
defaultVariants: {
|
|
50
43
|
variant: "default",
|
|
51
44
|
size: "default",
|
|
@@ -54,54 +47,53 @@ const k = m(
|
|
|
54
47
|
dot: !1
|
|
55
48
|
}
|
|
56
49
|
}
|
|
57
|
-
),
|
|
50
|
+
), w = l(
|
|
58
51
|
({
|
|
59
|
-
className:
|
|
52
|
+
className: t,
|
|
60
53
|
variant: r,
|
|
61
|
-
size:
|
|
62
|
-
outline:
|
|
54
|
+
size: a,
|
|
55
|
+
outline: d,
|
|
63
56
|
dot: o,
|
|
64
|
-
background:
|
|
65
|
-
urgent:
|
|
66
|
-
children:
|
|
67
|
-
render:
|
|
68
|
-
...
|
|
69
|
-
},
|
|
70
|
-
const
|
|
57
|
+
background: i,
|
|
58
|
+
urgent: s = !1,
|
|
59
|
+
children: n,
|
|
60
|
+
render: u,
|
|
61
|
+
...g
|
|
62
|
+
}, c) => {
|
|
63
|
+
const b = !n, f = r && !(/* @__PURE__ */ new Set([
|
|
71
64
|
"mountain",
|
|
72
65
|
"fjord",
|
|
73
66
|
"nordic",
|
|
74
67
|
"aurora",
|
|
75
68
|
"dusk",
|
|
76
69
|
"orange"
|
|
77
|
-
])).has(r), e =
|
|
70
|
+
])).has(r), e = d === !0 && f;
|
|
78
71
|
return v({
|
|
79
72
|
defaultTagName: "span",
|
|
80
|
-
ref:
|
|
73
|
+
ref: c,
|
|
81
74
|
props: p(
|
|
82
75
|
{
|
|
83
76
|
className: x(
|
|
84
77
|
k({
|
|
85
78
|
variant: r,
|
|
86
|
-
size:
|
|
79
|
+
size: a,
|
|
87
80
|
outline: e,
|
|
88
|
-
background: e ? !1 :
|
|
81
|
+
background: e ? !1 : i,
|
|
89
82
|
dot: o
|
|
90
83
|
}),
|
|
91
84
|
e && r === "error" && "text-destructive-foreground",
|
|
92
85
|
e && r === "warning" && "text-warning-foreground",
|
|
93
86
|
e && r === "success" && "text-success-foreground",
|
|
94
|
-
e && r === "inProgress" && "text-
|
|
95
|
-
e && r === "archived" && "text-
|
|
96
|
-
o &&
|
|
97
|
-
o &&
|
|
98
|
-
|
|
99
|
-
d
|
|
87
|
+
e && r === "inProgress" && "text-info-foreground",
|
|
88
|
+
e && r === "archived" && "text-neutral-foreground",
|
|
89
|
+
o && b && "h-2 w-2 min-h-2 min-w-2 max-h-2 max-w-2 rounded-full p-0 border-0",
|
|
90
|
+
o && s && "bg-destructive-background text-destructive-foreground-on-critical",
|
|
91
|
+
t
|
|
100
92
|
)
|
|
101
93
|
},
|
|
102
|
-
{ ...
|
|
94
|
+
{ ...g, children: n }
|
|
103
95
|
),
|
|
104
|
-
render:
|
|
96
|
+
render: u,
|
|
105
97
|
state: {
|
|
106
98
|
slot: "badge",
|
|
107
99
|
variant: r
|
|
@@ -109,8 +101,8 @@ const k = m(
|
|
|
109
101
|
});
|
|
110
102
|
}
|
|
111
103
|
);
|
|
112
|
-
|
|
104
|
+
w.displayName = "Badge";
|
|
113
105
|
export {
|
|
114
|
-
|
|
106
|
+
w as Badge,
|
|
115
107
|
k as badgeVariants
|
|
116
108
|
};
|