@cognite/aura 0.1.4 → 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/README.md +68 -0
- 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/eslint/index.d.ts +7 -0
- package/dist/eslint/index.js +10 -0
- package/dist/eslint/no-overriding-styles.d.ts +2 -0
- package/dist/eslint/no-overriding-styles.js +262 -0
- 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 +26 -6
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ComponentProps, ComponentType, HTMLAttributes } from 'react';
|
|
2
|
+
import { IconProps } from '@tabler/icons-react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { Button } from '../button/button';
|
|
5
|
+
declare const Banner: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
|
+
variant?: "default" | "destructive" | "warning" | "info" | null | undefined;
|
|
7
|
+
inset?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
defaultVisible?: boolean;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
type TablerIconComponent = ComponentType<IconProps>;
|
|
14
|
+
declare const BannerIcon: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
15
|
+
icon: TablerIconComponent;
|
|
16
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
|
+
type BannerTitleProps = HTMLAttributes<HTMLParagraphElement>;
|
|
18
|
+
declare const BannerTitle: import('react').ForwardRefExoticComponent<BannerTitleProps & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
declare const BannerStatus: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
20
|
+
ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
render?: import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | import('@base-ui/react').ComponentRenderFn<import('@base-ui/react').HTMLProps, {}> | undefined;
|
|
23
|
+
} & VariantProps<(props?: ({
|
|
24
|
+
variant?: "default" | "secondary" | "gray" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "mountain" | "error" | "warning" | "success" | "inProgress" | "archived" | "closable" | null | undefined;
|
|
25
|
+
size?: "icon" | "default" | null | undefined;
|
|
26
|
+
outline?: boolean | null | undefined;
|
|
27
|
+
background?: boolean | null | undefined;
|
|
28
|
+
dot?: boolean | null | undefined;
|
|
29
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
|
|
30
|
+
urgent?: boolean;
|
|
31
|
+
}, "ref"> & import('react').RefAttributes<HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
32
|
+
type BannerActionsProps = HTMLAttributes<HTMLDivElement>;
|
|
33
|
+
declare const BannerActions: import('react').ForwardRefExoticComponent<BannerActionsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
34
|
+
declare const BannerAction: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ButtonProps & VariantProps<(props?: ({
|
|
35
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
36
|
+
size?: "icon" | "default" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
37
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
38
|
+
type BannerCloseProps = Omit<ComponentProps<typeof Button>, 'size'>;
|
|
39
|
+
declare const BannerClose: import('react').ForwardRefExoticComponent<Omit<BannerCloseProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
40
|
+
export { Banner, BannerIcon, BannerTitle, BannerStatus, BannerActions, BannerAction, BannerClose, };
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as k, forwardRef as l, useMemo as w, useContext as b, useState as B, useRef as N, useEffect as y, useCallback as C } from "react";
|
|
3
|
+
import { cva as V } from "class-variance-authority";
|
|
4
|
+
import { cn as u } from "../../../../lib/utils.js";
|
|
5
|
+
import { Badge as S } from "../badge/badge.js";
|
|
6
|
+
import { Button as A } from "../button/button.js";
|
|
7
|
+
const R = (e) => {
|
|
8
|
+
}, m = k({
|
|
9
|
+
show: !0,
|
|
10
|
+
setShow: R,
|
|
11
|
+
variant: "default"
|
|
12
|
+
});
|
|
13
|
+
function p(e) {
|
|
14
|
+
return typeof e == "function";
|
|
15
|
+
}
|
|
16
|
+
function j({
|
|
17
|
+
visible: e,
|
|
18
|
+
defaultVisible: t,
|
|
19
|
+
onClose: n
|
|
20
|
+
}) {
|
|
21
|
+
const [r, a] = B(t), i = e !== void 0, g = i ? e : r, d = N(n);
|
|
22
|
+
y(() => {
|
|
23
|
+
d.current = n;
|
|
24
|
+
}, [n]);
|
|
25
|
+
const x = C(
|
|
26
|
+
(o) => {
|
|
27
|
+
if (i) {
|
|
28
|
+
(p(o) ? o(e) : o) || d.current?.();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
a((c) => {
|
|
32
|
+
const f = p(o) ? o(c) : o;
|
|
33
|
+
return f || d.current?.(), f;
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
[i, e]
|
|
37
|
+
);
|
|
38
|
+
return [g, x];
|
|
39
|
+
}
|
|
40
|
+
const I = V(
|
|
41
|
+
"flex w-full h-11 flex-col items-start justify-center px-3 py-0",
|
|
42
|
+
{
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
default: "bg-neutral-background text-foreground-fixed-dark",
|
|
46
|
+
info: "bg-info-background text-foreground-fixed-dark",
|
|
47
|
+
warning: "bg-warning-background text-foreground-fixed-dark",
|
|
48
|
+
destructive: "bg-destructive-background text-foreground-fixed-dark"
|
|
49
|
+
},
|
|
50
|
+
inset: {
|
|
51
|
+
true: "rounded-lg",
|
|
52
|
+
false: ""
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
defaultVariants: {
|
|
56
|
+
variant: "default",
|
|
57
|
+
inset: !1
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
), M = l(
|
|
61
|
+
({
|
|
62
|
+
children: e,
|
|
63
|
+
visible: t,
|
|
64
|
+
defaultVisible: n = !0,
|
|
65
|
+
onClose: r,
|
|
66
|
+
className: a,
|
|
67
|
+
inset: i = !1,
|
|
68
|
+
variant: g = "default",
|
|
69
|
+
...d
|
|
70
|
+
}, x) => {
|
|
71
|
+
const o = g ?? "default", [c, f] = j({
|
|
72
|
+
defaultVisible: n,
|
|
73
|
+
visible: t,
|
|
74
|
+
onClose: r
|
|
75
|
+
}), h = w(
|
|
76
|
+
() => ({ show: c ?? !0, setShow: f, variant: o }),
|
|
77
|
+
[c, f, o]
|
|
78
|
+
);
|
|
79
|
+
return c ? /* @__PURE__ */ s(m.Provider, { value: h, children: /* @__PURE__ */ s(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
ref: x,
|
|
83
|
+
"data-slot": "banner",
|
|
84
|
+
className: u(
|
|
85
|
+
I({ variant: o, inset: i }),
|
|
86
|
+
a
|
|
87
|
+
),
|
|
88
|
+
...d,
|
|
89
|
+
children: /* @__PURE__ */ s(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "banner-content",
|
|
93
|
+
className: "flex h-7 w-full items-center self-stretch gap-2",
|
|
94
|
+
children: e
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
) }) : null;
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
M.displayName = "Banner";
|
|
102
|
+
const O = {
|
|
103
|
+
default: "text-neutral-foreground-on-neutral",
|
|
104
|
+
info: "text-info-foreground-on-info",
|
|
105
|
+
warning: "text-warning-foreground-on-warning",
|
|
106
|
+
destructive: "text-destructive-foreground-on-critical"
|
|
107
|
+
}, _ = l(
|
|
108
|
+
({ icon: e, className: t, ...n }, r) => {
|
|
109
|
+
const { variant: a } = b(m);
|
|
110
|
+
return /* @__PURE__ */ s(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
ref: r,
|
|
114
|
+
"data-slot": "banner-icon",
|
|
115
|
+
className: u(
|
|
116
|
+
"flex h-4 w-4 shrink-0 items-center justify-center",
|
|
117
|
+
O[a],
|
|
118
|
+
t
|
|
119
|
+
),
|
|
120
|
+
...n,
|
|
121
|
+
children: /* @__PURE__ */ s(e, { size: 16 })
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
_.displayName = "BannerIcon";
|
|
127
|
+
const E = l(
|
|
128
|
+
({ className: e, ...t }, n) => /* @__PURE__ */ s(
|
|
129
|
+
"p",
|
|
130
|
+
{
|
|
131
|
+
ref: n,
|
|
132
|
+
"data-slot": "banner-title",
|
|
133
|
+
className: u(
|
|
134
|
+
"flex min-w-0 flex-1 items-center text-base font-medium leading-5 tracking-tighter text-foreground-fixed-dark",
|
|
135
|
+
e
|
|
136
|
+
),
|
|
137
|
+
...t
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
);
|
|
141
|
+
E.displayName = "BannerTitle";
|
|
142
|
+
const L = l(
|
|
143
|
+
({ outline: e = !0, variant: t, className: n, ...r }, a) => {
|
|
144
|
+
const { variant: i } = b(m), d = t ?? {
|
|
145
|
+
default: "default",
|
|
146
|
+
info: "inProgress",
|
|
147
|
+
destructive: "error",
|
|
148
|
+
warning: "warning"
|
|
149
|
+
}[i];
|
|
150
|
+
return /* @__PURE__ */ s(
|
|
151
|
+
S,
|
|
152
|
+
{
|
|
153
|
+
ref: a,
|
|
154
|
+
"data-slot": "banner-status",
|
|
155
|
+
outline: e,
|
|
156
|
+
variant: d,
|
|
157
|
+
className: u("shrink-0", n),
|
|
158
|
+
...r
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
L.displayName = "BannerStatus";
|
|
164
|
+
const P = l(
|
|
165
|
+
({ className: e, ...t }, n) => /* @__PURE__ */ s(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
ref: n,
|
|
169
|
+
"data-slot": "banner-actions",
|
|
170
|
+
className: u("ml-auto flex h-7 shrink-0 items-center gap-2", e),
|
|
171
|
+
...t
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
);
|
|
175
|
+
P.displayName = "BannerActions";
|
|
176
|
+
const v = l(
|
|
177
|
+
({ variant: e = "ghost", size: t = "sm", className: n, ...r }, a) => /* @__PURE__ */ s(
|
|
178
|
+
A,
|
|
179
|
+
{
|
|
180
|
+
ref: a,
|
|
181
|
+
"data-slot": "banner-action",
|
|
182
|
+
className: u(
|
|
183
|
+
"h-7 min-w-16 shrink-0 rounded px-2 text-sm font-medium leading-4.5 text-foreground-fixed-dark hover:bg-transparent dark:hover:bg-transparent hover:text-foreground-secondary-fixed-dark disabled:bg-transparent dark:disabled:bg-transparent disabled:text-disabled-foreground",
|
|
184
|
+
n
|
|
185
|
+
),
|
|
186
|
+
size: t,
|
|
187
|
+
variant: e,
|
|
188
|
+
...r
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
);
|
|
192
|
+
v.displayName = "BannerAction";
|
|
193
|
+
const T = l(
|
|
194
|
+
({ onClick: e, ...t }, n) => {
|
|
195
|
+
const { setShow: r } = b(m);
|
|
196
|
+
return /* @__PURE__ */ s(
|
|
197
|
+
v,
|
|
198
|
+
{
|
|
199
|
+
ref: n,
|
|
200
|
+
"data-slot": "banner-close",
|
|
201
|
+
onClick: (i) => {
|
|
202
|
+
r(!1), e?.(i);
|
|
203
|
+
},
|
|
204
|
+
...t
|
|
205
|
+
}
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
T.displayName = "BannerClose";
|
|
210
|
+
export {
|
|
211
|
+
M as Banner,
|
|
212
|
+
v as BannerAction,
|
|
213
|
+
P as BannerActions,
|
|
214
|
+
T as BannerClose,
|
|
215
|
+
_ as BannerIcon,
|
|
216
|
+
L as BannerStatus,
|
|
217
|
+
E as BannerTitle
|
|
218
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const n = {
|
|
2
|
+
name: "Banner",
|
|
3
|
+
status: "in-progress-code-review",
|
|
4
|
+
description: "A configurable banner for important inline messages with variant styling, optional status badge, and action controls.",
|
|
5
|
+
llmUsage: "Use `<Banner>` with `<BannerIcon>`, `<BannerTitle>`, optional `<BannerStatus>`, and `<BannerActions>` containing `<BannerAction>` or `<BannerClose>`."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
n as BannerMetadata
|
|
9
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
5
|
+
size?: "icon" | "default" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
type ButtonProps = ButtonPrimitive.Props & VariantProps<typeof buttonVariants>;
|
|
8
8
|
declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { focusRing as
|
|
6
|
-
const p =
|
|
7
|
-
`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { Button as u } from "@base-ui/react/button";
|
|
4
|
+
import { cva as g } from "class-variance-authority";
|
|
5
|
+
import { focusRing as b, focusRingDestructive as v, cn as l } from "../../../../lib/utils.js";
|
|
6
|
+
const p = g(
|
|
7
|
+
`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm leading-4.5 tracking-normal font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 ${b} aria-invalid:focus-visible:shadow-focus-ring-destructive`,
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-primary text-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
link: "text-foreground-link underline-offset-4 hover:underline"
|
|
11
|
+
default: "bg-primary-background text-foreground-on-primary hover:bg-primary-background-hover",
|
|
12
|
+
secondary: "bg-secondary-background text-secondary-foreground hover:bg-secondary-background-hover",
|
|
13
|
+
outline: "border border-border-emphasized bg-background text-foreground hover:bg-accent-background disabled:border-transparent disabled:bg-disabled-background",
|
|
14
|
+
ghost: "hover:bg-accent-background",
|
|
15
|
+
destructive: `bg-destructive-background text-destructive-foreground-on-critical hover:bg-destructive-background-hover ${v}`
|
|
17
16
|
},
|
|
18
17
|
size: {
|
|
19
|
-
default: "h-9 px-3
|
|
20
|
-
sm: "h-7 rounded-
|
|
18
|
+
default: "h-9 px-3 has-[>svg]:px-3",
|
|
19
|
+
sm: "h-7 rounded-md gap-1.5 px-2 has-[>svg]:px-2",
|
|
21
20
|
lg: "h-10 px-4 has-[>svg]:px-4",
|
|
22
21
|
icon: "size-9",
|
|
23
22
|
"icon-sm": "size-7",
|
|
@@ -29,17 +28,17 @@ const p = u(
|
|
|
29
28
|
size: "default"
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
), f =
|
|
33
|
-
({ className: r, variant:
|
|
34
|
-
|
|
31
|
+
), f = c(
|
|
32
|
+
({ className: r, variant: o, size: t, children: a, render: e, nativeButton: n, ...s }, i) => /* @__PURE__ */ d(
|
|
33
|
+
u,
|
|
35
34
|
{
|
|
36
35
|
ref: i,
|
|
37
36
|
"data-slot": "button",
|
|
38
37
|
render: e,
|
|
39
|
-
nativeButton:
|
|
40
|
-
className:
|
|
38
|
+
nativeButton: n ?? (e ? !1 : void 0),
|
|
39
|
+
className: l(p({ variant: o, size: t, className: r })),
|
|
41
40
|
...s,
|
|
42
|
-
children:
|
|
41
|
+
children: a
|
|
43
42
|
}
|
|
44
43
|
)
|
|
45
44
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { mergeProps as
|
|
3
|
-
import { useRender as
|
|
2
|
+
import { mergeProps as s } from "@base-ui/react/merge-props";
|
|
3
|
+
import { useRender as i } from "@base-ui/react/use-render";
|
|
4
4
|
import { cva as l } from "class-variance-authority";
|
|
5
5
|
import { cn as e } from "../../../../lib/utils.js";
|
|
6
6
|
import { Separator as d } from "../separator/separator.js";
|
|
@@ -18,7 +18,7 @@ const u = l(
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
|
-
function
|
|
21
|
+
function b({
|
|
22
22
|
className: o,
|
|
23
23
|
orientation: t,
|
|
24
24
|
...r
|
|
@@ -34,18 +34,18 @@ function v({
|
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function v({
|
|
38
38
|
className: o,
|
|
39
39
|
render: t,
|
|
40
40
|
children: r,
|
|
41
41
|
...n
|
|
42
42
|
}) {
|
|
43
|
-
return
|
|
43
|
+
return i({
|
|
44
44
|
defaultTagName: "div",
|
|
45
|
-
props:
|
|
45
|
+
props: s(
|
|
46
46
|
{
|
|
47
47
|
className: e(
|
|
48
|
-
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
48
|
+
"bg-muted-background flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
49
49
|
o
|
|
50
50
|
)
|
|
51
51
|
},
|
|
@@ -68,7 +68,7 @@ function x({
|
|
|
68
68
|
"data-slot": "button-group-separator",
|
|
69
69
|
orientation: t,
|
|
70
70
|
className: e(
|
|
71
|
-
"bg-
|
|
71
|
+
"bg-muted-background relative m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
72
72
|
o
|
|
73
73
|
),
|
|
74
74
|
...r
|
|
@@ -76,8 +76,8 @@ function x({
|
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
export {
|
|
79
|
-
|
|
79
|
+
b as ButtonGroup,
|
|
80
80
|
x as ButtonGroupSeparator,
|
|
81
|
-
|
|
81
|
+
v as ButtonGroupText,
|
|
82
82
|
u as buttonGroupVariants
|
|
83
83
|
};
|
|
@@ -15,7 +15,14 @@ type CodeBlockCopyButtonProps = ComponentProps<typeof Button> & {
|
|
|
15
15
|
};
|
|
16
16
|
declare const CodeBlockCopyButton: import('react').ForwardRefExoticComponent<Omit<CodeBlockCopyButtonProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
17
17
|
declare const CodeBlockCollapseButton: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ButtonProps & import('class-variance-authority').VariantProps<(props?: ({
|
|
18
|
-
variant?: "
|
|
19
|
-
size?: "
|
|
18
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
19
|
+
size?: "icon" | "default" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
20
20
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
21
|
-
|
|
21
|
+
type CodeBlockDownloadButtonProps = ComponentProps<typeof Button> & {
|
|
22
|
+
fileName?: string;
|
|
23
|
+
mimeType?: string;
|
|
24
|
+
onDownload?: () => void;
|
|
25
|
+
onError?: (error: Error) => void;
|
|
26
|
+
};
|
|
27
|
+
declare const CodeBlockDownloadButton: import('react').ForwardRefExoticComponent<Omit<CodeBlockDownloadButtonProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
28
|
+
export { CodeBlock, CodeBlockCollapseButton, CodeBlockCopyButton, CodeBlockDownloadButton, };
|