@cognite/aura 0.1.6 → 0.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/DESIGN.md +1211 -0
- package/README.md +24 -0
- package/dist/colors.css +441 -214
- package/dist/components/index.d.ts +17 -1
- package/dist/components/index.js +344 -269
- package/dist/components/ui/core/accordion/accordion.js +22 -22
- package/dist/components/ui/core/alert/alert.d.ts +3 -2
- package/dist/components/ui/core/alert/alert.js +111 -87
- package/dist/components/ui/core/alert/alert.metadata.js +1 -1
- package/dist/components/ui/core/avatar/avatar.js +10 -10
- package/dist/components/ui/core/badge/badge.d.ts +2 -2
- package/dist/components/ui/core/badge/badge.js +13 -13
- package/dist/components/ui/core/banner/banner.d.ts +4 -4
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +11 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +190 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.d.ts +2 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.js +9 -0
- package/dist/components/ui/core/button/button.d.ts +1 -1
- package/dist/components/ui/core/card/card.d.ts +7 -4
- package/dist/components/ui/core/card/card.js +131 -87
- package/dist/components/ui/core/card/card.metadata.js +1 -1
- package/dist/components/ui/core/checkbox/checkbox.d.ts +13 -0
- package/dist/components/ui/core/checkbox/checkbox.js +129 -0
- package/dist/components/ui/core/checkbox/checkbox.metadata.d.ts +2 -0
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +8 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +5 -1
- package/dist/components/ui/core/code-block/code-block.js +200 -132
- package/dist/components/ui/core/command/command.d.ts +2 -2
- package/dist/components/ui/core/count/count.d.ts +8 -0
- package/dist/components/ui/core/count/count.js +32 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +43 -40
- package/dist/components/ui/core/inline-citation/inline-citation.js +8 -8
- package/dist/components/ui/core/input-group/input-group.d.ts +1 -1
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -0
- package/dist/components/ui/core/kbd/kbd.js +36 -0
- package/dist/components/ui/core/kbd/kbd.metadata.d.ts +2 -0
- package/dist/components/ui/core/kbd/kbd.metadata.js +9 -0
- package/dist/components/ui/core/loader/loader.d.ts +9 -1
- package/dist/components/ui/core/loader/loader.js +106 -107
- package/dist/components/ui/core/loader/loader.metadata.js +2 -2
- package/dist/components/ui/core/popover/popover.d.ts +1 -1
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +1 -1
- package/dist/components/ui/core/radio-group/radio-group.d.ts +16 -0
- package/dist/components/ui/core/radio-group/radio-group.js +110 -0
- package/dist/components/ui/core/radio-group/radio-group.metadata.d.ts +2 -0
- package/dist/components/ui/core/radio-group/radio-group.metadata.js +9 -0
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +3 -0
- package/dist/components/ui/core/scroll-area/scroll-area.js +71 -0
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +2 -0
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +9 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +16 -0
- package/dist/components/ui/core/segmented-control/segmented-control.js +169 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +3 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +48 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.d.ts +2 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.js +9 -0
- package/dist/components/ui/core/tabs/tabs.d.ts +23 -0
- package/dist/components/ui/core/tabs/tabs.js +222 -0
- package/dist/components/ui/core/tabs/tabs.utils.d.ts +2 -0
- package/dist/components/ui/core/tabs/tabs.utils.js +9 -0
- package/dist/components/ui/core/tool/tool.js +31 -27
- package/dist/components/ui/core/topbar/topbar.d.ts +30 -0
- package/dist/components/ui/core/topbar/topbar.js +190 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +312 -248
- package/dist/lib/utils.d.ts +11 -0
- package/dist/lib/utils.js +40 -29
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +66 -7
- package/package.json +11 -6
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as d } from "react";
|
|
3
3
|
import { Accordion as r } from "@base-ui/react/accordion";
|
|
4
4
|
import { IconChevronDown as A } from "@tabler/icons-react";
|
|
5
5
|
import { cn as u } from "../../../../lib/utils.js";
|
|
6
|
-
const
|
|
6
|
+
const C = d((e, t) => {
|
|
7
7
|
if (e.type === "multiple") {
|
|
8
8
|
const {
|
|
9
9
|
type: s,
|
|
10
10
|
value: c,
|
|
11
11
|
defaultValue: b,
|
|
12
|
-
onValueChange:
|
|
12
|
+
onValueChange: m,
|
|
13
13
|
...x
|
|
14
14
|
} = e;
|
|
15
15
|
return /* @__PURE__ */ o(
|
|
@@ -21,24 +21,24 @@ const w = d((e, t) => {
|
|
|
21
21
|
value: c,
|
|
22
22
|
defaultValue: b,
|
|
23
23
|
onValueChange: (y) => {
|
|
24
|
-
if (!
|
|
24
|
+
if (!m) return;
|
|
25
25
|
const N = y.filter(
|
|
26
26
|
(V) => V != null
|
|
27
27
|
);
|
|
28
|
-
|
|
28
|
+
m(N);
|
|
29
29
|
},
|
|
30
30
|
...x
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
const {
|
|
35
|
-
type:
|
|
35
|
+
type: n,
|
|
36
36
|
collapsible: i = !1,
|
|
37
37
|
value: l,
|
|
38
|
-
defaultValue:
|
|
38
|
+
defaultValue: a,
|
|
39
39
|
onValueChange: g,
|
|
40
40
|
...p
|
|
41
|
-
} = e, h = l === void 0 ? void 0 : l === "" ? [] : [l], v =
|
|
41
|
+
} = e, h = l === void 0 ? void 0 : l === "" ? [] : [l], v = a === void 0 ? void 0 : a === "" ? [] : [a];
|
|
42
42
|
return /* @__PURE__ */ o(
|
|
43
43
|
r.Root,
|
|
44
44
|
{
|
|
@@ -60,32 +60,32 @@ const w = d((e, t) => {
|
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
});
|
|
63
|
-
|
|
64
|
-
const
|
|
63
|
+
C.displayName = "Accordion";
|
|
64
|
+
const w = d(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
65
65
|
r.Item,
|
|
66
66
|
{
|
|
67
|
-
ref:
|
|
67
|
+
ref: n,
|
|
68
68
|
"data-slot": "accordion-item",
|
|
69
69
|
className: u("mt-2 first:mt-0 rounded-md", e),
|
|
70
70
|
...t
|
|
71
71
|
}
|
|
72
72
|
));
|
|
73
|
-
|
|
74
|
-
const k = d(({ className: e, children: t, icon:
|
|
75
|
-
const
|
|
76
|
-
return /* @__PURE__ */ o(r.Header, { className: "flex", children: /* @__PURE__ */
|
|
73
|
+
w.displayName = "AccordionItem";
|
|
74
|
+
const k = d(({ className: e, children: t, icon: n, ...i }, l) => {
|
|
75
|
+
const a = n;
|
|
76
|
+
return /* @__PURE__ */ o(r.Header, { className: "flex", children: /* @__PURE__ */ f(
|
|
77
77
|
r.Trigger,
|
|
78
78
|
{
|
|
79
79
|
ref: l,
|
|
80
80
|
"data-slot": "accordion-trigger",
|
|
81
81
|
className: u(
|
|
82
|
-
"focus-visible:border-ring focus-visible:ring-ring-
|
|
82
|
+
"focus-visible:border-ring focus-visible:ring-ring-muted 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
83
|
e
|
|
84
84
|
),
|
|
85
85
|
...i,
|
|
86
86
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
87
|
+
/* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
88
|
+
a && /* @__PURE__ */ o(a, { className: "pointer-events-none size-4 shrink-0 transition-transform duration-200" }),
|
|
89
89
|
/* @__PURE__ */ o("span", { children: t })
|
|
90
90
|
] }),
|
|
91
91
|
/* @__PURE__ */ o(A, { className: "pointer-events-none size-4 shrink-0 transition-transform duration-200 group-aria-expanded/accordion-trigger:rotate-180" })
|
|
@@ -94,20 +94,20 @@ const k = d(({ className: e, children: t, icon: a, ...i }, l) => {
|
|
|
94
94
|
) });
|
|
95
95
|
});
|
|
96
96
|
k.displayName = "AccordionTrigger";
|
|
97
|
-
const I = d(({ className: e, children: t, ...
|
|
97
|
+
const I = d(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ o(
|
|
98
98
|
r.Panel,
|
|
99
99
|
{
|
|
100
100
|
ref: i,
|
|
101
101
|
"data-slot": "accordion-content",
|
|
102
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
|
-
...
|
|
103
|
+
...n,
|
|
104
104
|
children: /* @__PURE__ */ o("div", { className: u("px-3 pb-3 pt-2", e), children: t })
|
|
105
105
|
}
|
|
106
106
|
));
|
|
107
107
|
I.displayName = "AccordionContent";
|
|
108
108
|
export {
|
|
109
|
-
|
|
109
|
+
C as Accordion,
|
|
110
110
|
I as AccordionContent,
|
|
111
|
-
|
|
111
|
+
w as AccordionItem,
|
|
112
112
|
k as AccordionTrigger
|
|
113
113
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
type AlertVariant = 'default' | 'secondary' | 'warning' | 'error';
|
|
4
4
|
declare const alertVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "secondary" | "
|
|
5
|
+
variant?: "default" | "secondary" | "warning" | "error" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
type AlertProps = ComponentProps<'div'> & Omit<VariantProps<typeof alertVariants>, 'variant'> & {
|
|
8
8
|
variant?: AlertVariant;
|
|
9
9
|
visible?: boolean;
|
|
10
10
|
defaultVisible?: boolean;
|
|
11
11
|
onClose?: () => void;
|
|
12
|
+
icon?: ReactNode;
|
|
12
13
|
};
|
|
13
14
|
declare const Alert: import('react').ForwardRefExoticComponent<Omit<AlertProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
15
|
declare const AlertTitle: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,134 +1,158 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { IconX as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { useControllableState as
|
|
1
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as N, forwardRef as n, useMemo as k, useContext as u } from "react";
|
|
3
|
+
import { IconX as C, IconInfoCircle as I, IconAlertHexagon as V, IconAlertTriangle as _ } from "@tabler/icons-react";
|
|
4
|
+
import { cva as h } from "class-variance-authority";
|
|
5
|
+
import { useControllableState as z } from "../../../../lib/use-controllable-state.js";
|
|
6
6
|
import { cn as s } from "../../../../lib/utils.js";
|
|
7
|
-
import { Button as
|
|
8
|
-
const
|
|
7
|
+
import { Button as x } from "../button/button.js";
|
|
8
|
+
const i = N({
|
|
9
9
|
show: !0,
|
|
10
10
|
setShow: () => {
|
|
11
11
|
},
|
|
12
12
|
variant: "default"
|
|
13
|
-
}),
|
|
14
|
-
|
|
13
|
+
}), j = h(
|
|
14
|
+
[
|
|
15
|
+
"[&_svg]:shrink-0",
|
|
16
|
+
"[&_svg:not([class*='size-']):not([class*='w-'])]:w-3.5",
|
|
17
|
+
"[&_svg:not([class*='size-']):not([class*='h-'])]:h-3.5",
|
|
18
|
+
"[&_svg:not([class*='mt-'])]:mt-0.5"
|
|
19
|
+
].join(" ")
|
|
20
|
+
), D = h(
|
|
21
|
+
"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-[>[data-slot=alert-icon]]:grid-cols-[auto_1fr] grid-cols-[0_1fr] has-[>[data-slot=alert-icon]]:gap-x-2 has-[>[data-slot=alert-icon]]:gap-y-1 items-start",
|
|
15
22
|
{
|
|
16
23
|
variants: {
|
|
17
24
|
variant: {
|
|
18
|
-
default: "bg-neutral-muted-background text-foreground [&>
|
|
19
|
-
secondary: "bg-info-muted-background text-foreground [&>
|
|
20
|
-
warning: "bg-warning-muted-background [&>
|
|
21
|
-
error: "bg-destructive-muted-background text-foreground [&>
|
|
25
|
+
default: "bg-neutral-muted-background text-foreground [&>[data-slot=alert-icon]]:text-info-foreground",
|
|
26
|
+
secondary: "bg-info-muted-background text-foreground [&>[data-slot=alert-icon]]:text-info-foreground",
|
|
27
|
+
warning: "bg-warning-muted-background [&>[data-slot=alert-icon]]:text-warning-foreground",
|
|
28
|
+
error: "bg-destructive-muted-background text-foreground [&>[data-slot=alert-icon]]:text-destructive-foreground"
|
|
22
29
|
}
|
|
23
30
|
},
|
|
24
31
|
defaultVariants: {
|
|
25
32
|
variant: "default"
|
|
26
33
|
}
|
|
27
34
|
}
|
|
28
|
-
)
|
|
35
|
+
);
|
|
36
|
+
function S(r) {
|
|
37
|
+
const t = { "aria-hidden": !0 };
|
|
38
|
+
switch (r) {
|
|
39
|
+
case "warning":
|
|
40
|
+
return /* @__PURE__ */ e(_, { ...t });
|
|
41
|
+
case "error":
|
|
42
|
+
return /* @__PURE__ */ e(V, { ...t });
|
|
43
|
+
default:
|
|
44
|
+
return /* @__PURE__ */ e(I, { ...t });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const T = n(
|
|
29
48
|
({
|
|
30
|
-
className:
|
|
31
|
-
variant:
|
|
32
|
-
visible:
|
|
49
|
+
className: r,
|
|
50
|
+
variant: t = "default",
|
|
51
|
+
visible: a,
|
|
33
52
|
defaultVisible: o = !0,
|
|
34
|
-
onClose:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
53
|
+
onClose: l,
|
|
54
|
+
icon: c,
|
|
55
|
+
children: g,
|
|
56
|
+
...w
|
|
57
|
+
}, A) => {
|
|
58
|
+
const [f, m] = z({
|
|
39
59
|
defaultProp: o,
|
|
40
|
-
prop:
|
|
41
|
-
onChange:
|
|
42
|
-
}),
|
|
43
|
-
() => ({ show:
|
|
44
|
-
[
|
|
60
|
+
prop: a,
|
|
61
|
+
onChange: l
|
|
62
|
+
}), d = t ?? "default", y = k(
|
|
63
|
+
() => ({ show: f, setShow: m, variant: d }),
|
|
64
|
+
[f, m, d]
|
|
45
65
|
);
|
|
46
|
-
|
|
66
|
+
if (!f)
|
|
67
|
+
return null;
|
|
68
|
+
const v = c !== void 0 ? c : S(d);
|
|
69
|
+
return /* @__PURE__ */ e(i.Provider, { value: y, children: /* @__PURE__ */ p(
|
|
47
70
|
"div",
|
|
48
71
|
{
|
|
49
|
-
ref:
|
|
72
|
+
ref: A,
|
|
50
73
|
"data-slot": "alert",
|
|
51
74
|
role: "alert",
|
|
52
|
-
className: s(
|
|
53
|
-
...
|
|
75
|
+
className: s(D({ variant: d }), r),
|
|
76
|
+
...w,
|
|
54
77
|
children: [
|
|
55
|
-
|
|
56
|
-
|
|
78
|
+
l && /* @__PURE__ */ e(b, {}),
|
|
79
|
+
v && /* @__PURE__ */ e("span", { "data-slot": "alert-icon", className: j(), children: v }),
|
|
80
|
+
g
|
|
57
81
|
]
|
|
58
82
|
}
|
|
59
|
-
) })
|
|
83
|
+
) });
|
|
60
84
|
}
|
|
61
85
|
);
|
|
62
|
-
|
|
63
|
-
const
|
|
86
|
+
T.displayName = "Alert";
|
|
87
|
+
const B = {
|
|
64
88
|
default: "text-info-foreground",
|
|
65
89
|
secondary: "text-info-foreground",
|
|
66
90
|
warning: "text-warning-foreground",
|
|
67
91
|
error: "text-destructive-foreground"
|
|
68
|
-
},
|
|
69
|
-
({ className:
|
|
70
|
-
const { variant: o } =
|
|
71
|
-
return /* @__PURE__ */
|
|
92
|
+
}, P = n(
|
|
93
|
+
({ className: r, ...t }, a) => {
|
|
94
|
+
const { variant: o } = u(i);
|
|
95
|
+
return /* @__PURE__ */ e(
|
|
72
96
|
"div",
|
|
73
97
|
{
|
|
74
|
-
ref:
|
|
98
|
+
ref: a,
|
|
75
99
|
"data-slot": "alert-title",
|
|
76
100
|
className: s(
|
|
77
|
-
"text-base font-medium leading-5 tracking-tightest",
|
|
78
|
-
|
|
79
|
-
|
|
101
|
+
"col-start-2 text-base font-medium leading-5 tracking-tightest",
|
|
102
|
+
B[o],
|
|
103
|
+
r
|
|
80
104
|
),
|
|
81
|
-
...
|
|
105
|
+
...t
|
|
82
106
|
}
|
|
83
107
|
);
|
|
84
108
|
}
|
|
85
109
|
);
|
|
86
|
-
|
|
87
|
-
const
|
|
110
|
+
P.displayName = "AlertTitle";
|
|
111
|
+
const H = {
|
|
88
112
|
default: "text-foreground",
|
|
89
113
|
secondary: "text-foreground",
|
|
90
114
|
warning: "text-foreground",
|
|
91
115
|
error: "text-foreground"
|
|
92
|
-
},
|
|
93
|
-
({ className:
|
|
94
|
-
const { variant: o } =
|
|
95
|
-
return /* @__PURE__ */
|
|
116
|
+
}, M = n(
|
|
117
|
+
({ className: r, ...t }, a) => {
|
|
118
|
+
const { variant: o } = u(i);
|
|
119
|
+
return /* @__PURE__ */ e(
|
|
96
120
|
"div",
|
|
97
121
|
{
|
|
98
|
-
ref:
|
|
122
|
+
ref: a,
|
|
99
123
|
"data-slot": "alert-description",
|
|
100
124
|
className: s(
|
|
101
125
|
"col-start-2 grid justify-items-start gap-1 text-sm font-normal leading-4.5 tracking-tight items-center",
|
|
102
|
-
|
|
103
|
-
|
|
126
|
+
H[o],
|
|
127
|
+
r
|
|
104
128
|
),
|
|
105
|
-
...
|
|
129
|
+
...t
|
|
106
130
|
}
|
|
107
131
|
);
|
|
108
132
|
}
|
|
109
133
|
);
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
({ className:
|
|
134
|
+
M.displayName = "AlertDescription";
|
|
135
|
+
const R = n(
|
|
136
|
+
({ className: r, ...t }, a) => /* @__PURE__ */ e(
|
|
113
137
|
"div",
|
|
114
138
|
{
|
|
115
|
-
ref:
|
|
139
|
+
ref: a,
|
|
116
140
|
"data-slot": "alert-actions",
|
|
117
141
|
className: s(
|
|
118
142
|
"col-start-2 flex flex-wrap items-start gap-2 pt-1",
|
|
119
|
-
|
|
143
|
+
r
|
|
120
144
|
),
|
|
121
|
-
...
|
|
145
|
+
...t
|
|
122
146
|
}
|
|
123
147
|
)
|
|
124
148
|
);
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
const { variant: o } =
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
-
|
|
149
|
+
R.displayName = "AlertActions";
|
|
150
|
+
const X = n(({ className: r, ...t }, a) => {
|
|
151
|
+
const { variant: o } = u(i);
|
|
152
|
+
return /* @__PURE__ */ e(
|
|
153
|
+
x,
|
|
130
154
|
{
|
|
131
|
-
ref:
|
|
155
|
+
ref: a,
|
|
132
156
|
"data-slot": "alert-button",
|
|
133
157
|
variant: "ghost",
|
|
134
158
|
size: "sm",
|
|
@@ -137,19 +161,19 @@ const T = n(({ className: t, ...r }, e) => {
|
|
|
137
161
|
secondary: "hover:bg-info-background-hover",
|
|
138
162
|
warning: "hover:bg-warning-background-hover",
|
|
139
163
|
error: "hover:bg-destructive-background-hover"
|
|
140
|
-
}[o],
|
|
141
|
-
...
|
|
164
|
+
}[o], r),
|
|
165
|
+
...t
|
|
142
166
|
}
|
|
143
167
|
);
|
|
144
168
|
});
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
({ className:
|
|
148
|
-
const { setShow:
|
|
149
|
-
|
|
169
|
+
X.displayName = "AlertButton";
|
|
170
|
+
const b = n(
|
|
171
|
+
({ className: r, onClick: t, ...a }, o) => {
|
|
172
|
+
const { setShow: l } = u(i), c = (g) => {
|
|
173
|
+
l(!1), t?.(g);
|
|
150
174
|
};
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
|
|
175
|
+
return /* @__PURE__ */ p(
|
|
176
|
+
x,
|
|
153
177
|
{
|
|
154
178
|
ref: o,
|
|
155
179
|
"data-slot": "alert-close",
|
|
@@ -157,24 +181,24 @@ const h = n(
|
|
|
157
181
|
size: "icon-sm",
|
|
158
182
|
className: s(
|
|
159
183
|
"absolute top-3 right-4 h-3.5 w-3.5 p-0 opacity-70 hover:opacity-100 text-foreground",
|
|
160
|
-
|
|
184
|
+
r
|
|
161
185
|
),
|
|
162
186
|
onClick: c,
|
|
163
|
-
...
|
|
187
|
+
...a,
|
|
164
188
|
children: [
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ e(C, { size: 14 }),
|
|
190
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
167
191
|
]
|
|
168
192
|
}
|
|
169
193
|
);
|
|
170
194
|
}
|
|
171
195
|
);
|
|
172
|
-
|
|
196
|
+
b.displayName = "AlertClose";
|
|
173
197
|
export {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
198
|
+
T as Alert,
|
|
199
|
+
R as AlertActions,
|
|
200
|
+
X as AlertButton,
|
|
201
|
+
b as AlertClose,
|
|
202
|
+
M as AlertDescription,
|
|
203
|
+
P as AlertTitle
|
|
180
204
|
};
|
|
@@ -2,7 +2,7 @@ const e = {
|
|
|
2
2
|
name: "Alert",
|
|
3
3
|
status: "in-progress-code-review",
|
|
4
4
|
description: "A dismissible alert component with multiple variants for displaying messages.",
|
|
5
|
-
llmUsage: "Use `<Alert>` with `<AlertTitle>` and `<AlertDescription
|
|
5
|
+
llmUsage: "Use `<Alert>` with optional `icon` prop (defaults to a variant-appropriate icon), plus `<AlertTitle>` and `<AlertDescription>`, for informational messages. Pass `icon={null}` to suppress the icon."
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
e as AlertMetadata
|
|
@@ -8,13 +8,13 @@ const u = g(
|
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-decorative-mountain
|
|
12
|
-
nordic: "bg-decorative-nordic
|
|
13
|
-
aurora: "bg-decorative-aurora
|
|
14
|
-
fjord: "bg-decorative-fjord
|
|
15
|
-
dusk: "bg-decorative-dusk
|
|
16
|
-
orange: "bg-decorative-orange
|
|
17
|
-
sky: "bg-decorative-sky
|
|
11
|
+
default: "bg-decorative-background-mountain text-decorative-foreground-mountain hover:bg-decorative-background-mountain-hover",
|
|
12
|
+
nordic: "bg-decorative-background-nordic text-decorative-foreground-nordic hover:bg-decorative-background-nordic-hover",
|
|
13
|
+
aurora: "bg-decorative-background-aurora text-decorative-foreground-aurora hover:bg-decorative-background-aurora-hover",
|
|
14
|
+
fjord: "bg-decorative-background-fjord text-decorative-foreground-fjord hover:bg-decorative-background-fjord-hover",
|
|
15
|
+
dusk: "bg-decorative-background-dusk text-decorative-foreground-dusk hover:bg-decorative-background-dusk-hover",
|
|
16
|
+
orange: "bg-decorative-background-orange text-decorative-foreground-orange hover:bg-decorative-background-orange-hover",
|
|
17
|
+
sky: "bg-decorative-background-sky text-decorative-foreground-sky hover:bg-decorative-background-sky-hover",
|
|
18
18
|
overflow: "bg-secondary-background text-secondary-foreground hover:bg-secondary-background-hover"
|
|
19
19
|
},
|
|
20
20
|
sizes: {
|
|
@@ -28,13 +28,13 @@ const u = g(
|
|
|
28
28
|
sizes: "default"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
), l = t(({ className: a, variant: e, sizes: r, ...
|
|
31
|
+
), l = t(({ className: a, variant: e, sizes: r, ...c }, s) => /* @__PURE__ */ o(
|
|
32
32
|
n.Root,
|
|
33
33
|
{
|
|
34
|
-
ref:
|
|
34
|
+
ref: s,
|
|
35
35
|
"data-slot": "avatar",
|
|
36
36
|
className: d(u({ variant: e, sizes: r }), a),
|
|
37
|
-
...
|
|
37
|
+
...c
|
|
38
38
|
}
|
|
39
39
|
));
|
|
40
40
|
l.displayName = "Avatar";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "secondary" | "gray" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "default" | "secondary" | "gray" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "warning" | "mountain" | "error" | "success" | "inProgress" | "archived" | "closable" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | null | undefined;
|
|
6
6
|
outline?: boolean | null | undefined;
|
|
7
7
|
background?: boolean | null | undefined;
|
|
8
8
|
dot?: boolean | null | undefined;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { forwardRef as l } from "react";
|
|
2
2
|
import { mergeProps as p } from "@base-ui/react/merge-props";
|
|
3
|
-
import { useRender as
|
|
4
|
-
import { cva as
|
|
3
|
+
import { useRender as m } from "@base-ui/react/use-render";
|
|
4
|
+
import { cva as v } from "class-variance-authority";
|
|
5
5
|
import { cn as x } from "../../../../lib/utils.js";
|
|
6
|
-
const k =
|
|
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-
|
|
6
|
+
const k = v(
|
|
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-muted 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
11
|
default: "border-transparent bg-neutral-background text-foreground-on-neutral",
|
|
12
|
-
fjord: "border-transparent bg-decorative-fjord
|
|
13
|
-
nordic: "border-transparent bg-decorative-nordic
|
|
14
|
-
aurora: "border-transparent bg-decorative-aurora
|
|
15
|
-
sky: "border-transparent bg-decorative-sky
|
|
16
|
-
dusk: "border-transparent bg-decorative-dusk
|
|
17
|
-
orange: "border-transparent bg-decorative-orange
|
|
18
|
-
gray: "border-transparent bg-decorative-mountain
|
|
19
|
-
mountain: "border-transparent bg-decorative-mountain
|
|
12
|
+
fjord: "border-transparent bg-decorative-background-fjord text-decorative-foreground-fjord",
|
|
13
|
+
nordic: "border-transparent bg-decorative-background-nordic text-decorative-foreground-nordic",
|
|
14
|
+
aurora: "border-transparent bg-decorative-background-aurora text-decorative-foreground-aurora",
|
|
15
|
+
sky: "border-transparent bg-decorative-background-sky text-decorative-foreground-sky",
|
|
16
|
+
dusk: "border-transparent bg-decorative-background-dusk text-decorative-foreground-dusk",
|
|
17
|
+
orange: "border-transparent bg-decorative-background-orange text-decorative-foreground-orange",
|
|
18
|
+
gray: "border-transparent bg-decorative-background-mountain text-decorative-foreground-mountain",
|
|
19
|
+
mountain: "border-transparent bg-decorative-background-mountain text-decorative-foreground-mountain",
|
|
20
20
|
secondary: "border-transparent bg-secondary-background text-secondary-foreground",
|
|
21
21
|
error: "border-transparent bg-destructive-background text-destructive-foreground-on-critical",
|
|
22
22
|
warning: "border-transparent bg-warning-background text-warning-foreground-on-warning",
|
|
@@ -68,7 +68,7 @@ const k = m(
|
|
|
68
68
|
"dusk",
|
|
69
69
|
"orange"
|
|
70
70
|
])).has(r), e = d === !0 && f;
|
|
71
|
-
return
|
|
71
|
+
return m({
|
|
72
72
|
defaultTagName: "span",
|
|
73
73
|
ref: c,
|
|
74
74
|
props: p(
|
|
@@ -3,7 +3,7 @@ import { IconProps } from '@tabler/icons-react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import { Button } from '../button/button';
|
|
5
5
|
declare const Banner: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
|
-
variant?: "default" | "destructive" | "
|
|
6
|
+
variant?: "default" | "destructive" | "info" | "warning" | null | undefined;
|
|
7
7
|
inset?: boolean | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
|
|
9
9
|
visible?: boolean;
|
|
@@ -21,8 +21,8 @@ declare const BannerStatus: import('react').ForwardRefExoticComponent<Omit<Omit<
|
|
|
21
21
|
} & {
|
|
22
22
|
render?: import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | import('@base-ui/react').ComponentRenderFn<import('@base-ui/react').HTMLProps, {}> | undefined;
|
|
23
23
|
} & VariantProps<(props?: ({
|
|
24
|
-
variant?: "default" | "secondary" | "gray" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "
|
|
25
|
-
size?: "
|
|
24
|
+
variant?: "default" | "secondary" | "gray" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "warning" | "mountain" | "error" | "success" | "inProgress" | "archived" | "closable" | null | undefined;
|
|
25
|
+
size?: "default" | "icon" | null | undefined;
|
|
26
26
|
outline?: boolean | null | undefined;
|
|
27
27
|
background?: boolean | null | undefined;
|
|
28
28
|
dot?: boolean | null | undefined;
|
|
@@ -33,7 +33,7 @@ type BannerActionsProps = HTMLAttributes<HTMLDivElement>;
|
|
|
33
33
|
declare const BannerActions: import('react').ForwardRefExoticComponent<BannerActionsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
34
34
|
declare const BannerAction: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ButtonProps & VariantProps<(props?: ({
|
|
35
35
|
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
36
|
-
size?: "
|
|
36
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
37
37
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
38
38
|
type BannerCloseProps = Omit<ComponentProps<typeof Button>, 'size'>;
|
|
39
39
|
declare const BannerClose: import('react').ForwardRefExoticComponent<Omit<BannerCloseProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
declare const Breadcrumb: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
3
|
+
declare const BreadcrumbList: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & import('react').RefAttributes<HTMLOListElement>>;
|
|
4
|
+
declare const BreadcrumbItem: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import('react').RefAttributes<HTMLLIElement>>;
|
|
5
|
+
declare const BreadcrumbLink: import('react').ForwardRefExoticComponent<Omit<useRender.ComponentProps<"a", {}, import('@base-ui/react').HTMLProps>, "ref"> & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
6
|
+
declare const BreadcrumbPage: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
declare const BreadcrumbPageButton: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const BreadcrumbEllipsisButton: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const BreadcrumbSeparator: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import('react').RefAttributes<HTMLLIElement>>;
|
|
10
|
+
declare const BreadcrumbEllipsis: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import('react').RefAttributes<HTMLLIElement>>;
|
|
11
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbPageButton, BreadcrumbEllipsisButton, BreadcrumbSeparator, BreadcrumbEllipsis, };
|