@cognite/aura 0.1.7 → 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 +34 -92
- package/README.md +3 -3
- package/dist/colors.css +441 -214
- package/dist/components/index.d.ts +15 -1
- package/dist/components/index.js +345 -275
- package/dist/components/ui/core/accordion/accordion.js +22 -22
- package/dist/components/ui/core/alert/alert.d.ts +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 +1 -1
- 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/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/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/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 +314 -255
- 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 +5 -5
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
declare const tabsListVariants: (props?: ({
|
|
5
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
6
|
+
size?: "default" | "small" | null | undefined;
|
|
7
|
+
fullWidth?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
declare const tabsTriggerVariants: (props?: ({
|
|
10
|
+
size?: "default" | "small" | null | undefined;
|
|
11
|
+
fullWidth?: boolean | null | undefined;
|
|
12
|
+
stateTone?: "default" | null | undefined;
|
|
13
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
|
+
declare const Tabs: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').TabsRootProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
|
+
type TabsListProps = TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>;
|
|
16
|
+
declare const TabsList: import('react').ForwardRefExoticComponent<Omit<TabsListProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
|
+
type TabsTriggerProps = TabsPrimitive.Tab.Props & VariantProps<typeof tabsTriggerVariants> & {
|
|
18
|
+
badge?: ReactNode;
|
|
19
|
+
};
|
|
20
|
+
declare const TabsTrigger: import('react').ForwardRefExoticComponent<Omit<TabsTriggerProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
21
|
+
declare const TabsLabel: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
22
|
+
declare const TabsPanel: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').TabsPanelProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export { Tabs, TabsLabel, TabsList, TabsPanel, TabsTrigger, tabsListVariants, tabsTriggerVariants, };
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { jsx as i, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n, createContext as v, useContext as x } from "react";
|
|
3
|
+
import { Tabs as u } from "@base-ui/react/tabs";
|
|
4
|
+
import { cva as f } from "class-variance-authority";
|
|
5
|
+
import { cn as l } from "../../../../lib/utils.js";
|
|
6
|
+
import { Badge as z } from "../badge/badge.js";
|
|
7
|
+
import { resolveTabLabelTitle as T } from "./tabs.utils.js";
|
|
8
|
+
const w = f("relative isolate inline-flex", {
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "flex-row",
|
|
12
|
+
vertical: "flex-col"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
small: "",
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
fullWidth: {
|
|
19
|
+
true: "w-full",
|
|
20
|
+
false: "w-fit"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
compoundVariants: [
|
|
24
|
+
{
|
|
25
|
+
orientation: "horizontal",
|
|
26
|
+
size: "small",
|
|
27
|
+
className: "items-center gap-1"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
orientation: "horizontal",
|
|
31
|
+
size: "default",
|
|
32
|
+
className: "items-center gap-2"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
orientation: "vertical",
|
|
36
|
+
size: "small",
|
|
37
|
+
className: "items-stretch gap-1"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
orientation: "vertical",
|
|
41
|
+
size: "default",
|
|
42
|
+
className: "items-stretch gap-2"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
defaultVariants: {
|
|
46
|
+
orientation: "horizontal",
|
|
47
|
+
size: "small",
|
|
48
|
+
fullWidth: !1
|
|
49
|
+
}
|
|
50
|
+
}), N = f(
|
|
51
|
+
"pointer-events-none absolute top-(--active-tab-top) left-(--active-tab-left) z-0 h-(--active-tab-height) w-(--active-tab-width) bg-active-muted-background motion-safe:transition-[top,left,width,height] motion-safe:duration-200 motion-safe:ease-out data-[activation-direction=none]:transition-none",
|
|
52
|
+
{
|
|
53
|
+
variants: {
|
|
54
|
+
size: {
|
|
55
|
+
small: "rounded-md",
|
|
56
|
+
default: "rounded-lg"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
size: "small"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
), y = f(
|
|
64
|
+
"group relative z-10 inline-flex min-w-0 max-w-full items-center justify-start outline-none transition-[color,box-shadow] duration-200 ease-out shrink-0 font-medium tracking-normal text-sm cursor-pointer focus-visible:border-ring focus-visible:ring-ring-shadow focus-visible:ring data-[disabled]:pointer-events-none data-[disabled]:cursor-default [&_[data-slot=tabs-label]]:min-w-0 [&_[data-slot=tabs-label]]:truncate",
|
|
65
|
+
{
|
|
66
|
+
variants: {
|
|
67
|
+
size: {
|
|
68
|
+
small: "h-7 px-2 gap-1.5 leading-4.5 rounded-md",
|
|
69
|
+
default: "h-9 px-3 gap-2 leading-4.5 rounded-lg"
|
|
70
|
+
},
|
|
71
|
+
fullWidth: {
|
|
72
|
+
true: "min-w-px justify-center [&_[data-slot=tabs-label]]:flex-none [&_[data-slot=tabs-label]]:text-center",
|
|
73
|
+
false: ""
|
|
74
|
+
},
|
|
75
|
+
stateTone: {
|
|
76
|
+
default: "text-muted-foreground hover:text-foreground data-active:text-foreground data-active:hover:text-foreground data-[disabled]:text-disabled-foreground"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
size: "small",
|
|
81
|
+
fullWidth: !1,
|
|
82
|
+
stateTone: "default"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
), _ = n(
|
|
86
|
+
({ className: e, ...t }, a) => /* @__PURE__ */ i(
|
|
87
|
+
u.Root,
|
|
88
|
+
{
|
|
89
|
+
ref: a,
|
|
90
|
+
"data-slot": "tabs",
|
|
91
|
+
className: l(e),
|
|
92
|
+
...t
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
);
|
|
96
|
+
_.displayName = "Tabs";
|
|
97
|
+
const g = v(void 0), h = n(({ className: e, size: t = "small", ...a }, s) => /* @__PURE__ */ i(
|
|
98
|
+
u.Indicator,
|
|
99
|
+
{
|
|
100
|
+
ref: s,
|
|
101
|
+
"data-slot": "tabs-indicator",
|
|
102
|
+
className: l(N({ size: t }), e),
|
|
103
|
+
...a
|
|
104
|
+
}
|
|
105
|
+
));
|
|
106
|
+
h.displayName = "TabsIndicator";
|
|
107
|
+
const L = n(
|
|
108
|
+
({
|
|
109
|
+
className: e,
|
|
110
|
+
orientation: t = "horizontal",
|
|
111
|
+
size: a = "small",
|
|
112
|
+
fullWidth: s = !1,
|
|
113
|
+
children: o,
|
|
114
|
+
...d
|
|
115
|
+
}, c) => {
|
|
116
|
+
const r = a ?? "small";
|
|
117
|
+
return /* @__PURE__ */ i(
|
|
118
|
+
u.List,
|
|
119
|
+
{
|
|
120
|
+
ref: c,
|
|
121
|
+
"data-slot": "tabs-list",
|
|
122
|
+
"data-size": r,
|
|
123
|
+
"data-orientation": t,
|
|
124
|
+
"data-full-width": s ? "true" : "false",
|
|
125
|
+
className: l(
|
|
126
|
+
"[&[data-orientation=horizontal][data-full-width=true]_[data-slot=tabs-trigger]]:flex-1",
|
|
127
|
+
"[&[data-orientation=horizontal][data-full-width=true]_[data-slot=tabs-trigger]]:justify-center",
|
|
128
|
+
"[&[data-orientation=horizontal][data-full-width=true]_[data-slot=tabs-label]]:flex-none",
|
|
129
|
+
"[&[data-orientation=horizontal][data-full-width=true]_[data-slot=tabs-label]]:text-center",
|
|
130
|
+
"[&[data-orientation=vertical][data-full-width=true]_[data-slot=tabs-trigger]]:w-full",
|
|
131
|
+
w({ orientation: t, size: r, fullWidth: s }),
|
|
132
|
+
e
|
|
133
|
+
),
|
|
134
|
+
...d,
|
|
135
|
+
children: /* @__PURE__ */ b(g.Provider, { value: r, children: [
|
|
136
|
+
/* @__PURE__ */ i(h, { size: r }),
|
|
137
|
+
o
|
|
138
|
+
] })
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
L.displayName = "TabsList";
|
|
144
|
+
const V = n(
|
|
145
|
+
({
|
|
146
|
+
className: e,
|
|
147
|
+
size: t,
|
|
148
|
+
fullWidth: a = !1,
|
|
149
|
+
badge: s,
|
|
150
|
+
disabled: o = !1,
|
|
151
|
+
children: d,
|
|
152
|
+
...c
|
|
153
|
+
}, r) => {
|
|
154
|
+
const p = x(g), m = t ?? p ?? "small";
|
|
155
|
+
return /* @__PURE__ */ b(
|
|
156
|
+
u.Tab,
|
|
157
|
+
{
|
|
158
|
+
ref: r,
|
|
159
|
+
"data-slot": "tabs-trigger",
|
|
160
|
+
"data-size": m,
|
|
161
|
+
"data-full-width": a ? "true" : "false",
|
|
162
|
+
disabled: o,
|
|
163
|
+
className: l(
|
|
164
|
+
y({ size: m, fullWidth: a }),
|
|
165
|
+
e
|
|
166
|
+
),
|
|
167
|
+
...c,
|
|
168
|
+
children: [
|
|
169
|
+
d,
|
|
170
|
+
s == null ? null : /* @__PURE__ */ i(
|
|
171
|
+
z,
|
|
172
|
+
{
|
|
173
|
+
variant: "mountain",
|
|
174
|
+
className: l(
|
|
175
|
+
"h-4 min-w-4 rounded-sm px-0.5 text-xs leading-3.5 tracking-tighter gap-0",
|
|
176
|
+
o && "bg-disabled-background text-disabled-foreground border-transparent"
|
|
177
|
+
),
|
|
178
|
+
children: s
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
V.displayName = "TabsTrigger";
|
|
187
|
+
const k = n(
|
|
188
|
+
({ className: e, children: t, title: a, ...s }, o) => {
|
|
189
|
+
const d = T(a, t);
|
|
190
|
+
return /* @__PURE__ */ i(
|
|
191
|
+
"span",
|
|
192
|
+
{
|
|
193
|
+
ref: o,
|
|
194
|
+
"data-slot": "tabs-label",
|
|
195
|
+
className: l("block min-w-0 flex-1 truncate text-left", e),
|
|
196
|
+
title: d,
|
|
197
|
+
...s,
|
|
198
|
+
children: t
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
k.displayName = "TabsLabel";
|
|
204
|
+
const j = n(({ className: e, ...t }, a) => /* @__PURE__ */ i(
|
|
205
|
+
u.Panel,
|
|
206
|
+
{
|
|
207
|
+
ref: a,
|
|
208
|
+
"data-slot": "tabs-panel",
|
|
209
|
+
className: l("outline-none", e),
|
|
210
|
+
...t
|
|
211
|
+
}
|
|
212
|
+
));
|
|
213
|
+
j.displayName = "TabsPanel";
|
|
214
|
+
export {
|
|
215
|
+
_ as Tabs,
|
|
216
|
+
k as TabsLabel,
|
|
217
|
+
L as TabsList,
|
|
218
|
+
j as TabsPanel,
|
|
219
|
+
V as TabsTrigger,
|
|
220
|
+
w as tabsListVariants,
|
|
221
|
+
y as tabsTriggerVariants
|
|
222
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Avatar } from '../avatar/avatar';
|
|
3
|
+
declare const Topbar: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const TopbarLeft: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
type TopbarIconProps = Omit<ComponentProps<typeof Avatar>, 'sizes' | 'variant' | 'children'> & {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare const TopbarIcon: import('react').ForwardRefExoticComponent<Omit<TopbarIconProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
declare const TopbarBreadcrumbs: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
10
|
+
declare const TopbarMetadata: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
declare const TopbarCenter: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const TopbarRight: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
type TopbarTheme = 'light' | 'dark';
|
|
14
|
+
type TopbarThemeSwitcherProps = ComponentProps<'div'> & {
|
|
15
|
+
theme?: TopbarTheme;
|
|
16
|
+
onThemeChange?: (theme: TopbarTheme) => void;
|
|
17
|
+
availableThemes?: readonly TopbarTheme[];
|
|
18
|
+
toggleThemeLabel?: string;
|
|
19
|
+
lightModeTitle?: string;
|
|
20
|
+
darkModeTitle?: string;
|
|
21
|
+
switchThemeLabel?: string;
|
|
22
|
+
lightModeLabel?: string;
|
|
23
|
+
darkModeLabel?: string;
|
|
24
|
+
};
|
|
25
|
+
declare const TopbarThemeSwitcher: import('react').ForwardRefExoticComponent<Omit<TopbarThemeSwitcherProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const TopbarAction: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ButtonProps & import('class-variance-authority').VariantProps<(props?: ({
|
|
27
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
28
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
29
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
30
|
+
export { Topbar, TopbarAction, TopbarBreadcrumbs, TopbarCenter, TopbarIcon, TopbarLeft, TopbarMetadata, TopbarRight, TopbarThemeSwitcher, type TopbarTheme, };
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as o } from "react";
|
|
3
|
+
import { IconSun as N, IconMoon as y } from "@tabler/icons-react";
|
|
4
|
+
import { cn as i } from "../../../../lib/utils.js";
|
|
5
|
+
import { Avatar as M, AvatarIcon as D } from "../avatar/avatar.js";
|
|
6
|
+
import { Breadcrumb as k } from "../breadcrumb/breadcrumb.js";
|
|
7
|
+
import { Button as c } from "../button/button.js";
|
|
8
|
+
import { DropdownMenu as v, DropdownMenuTrigger as R, DropdownMenuContent as S, DropdownMenuGroup as A, DropdownMenuLabel as L, DropdownMenuRadioGroup as E, DropdownMenuRadioItem as s } from "../dropdown-menu/dropdown-menu.js";
|
|
9
|
+
const I = i(
|
|
10
|
+
"flex h-11 w-full items-center gap-2 rounded-t-lg border-b border-border bg-background px-3 py-2",
|
|
11
|
+
"[&:has(>[data-slot=topbar-center])>[data-slot=topbar-right]]:flex-none"
|
|
12
|
+
), B = o(
|
|
13
|
+
({ className: r, role: t = "banner", ...a }, n) => /* @__PURE__ */ e(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
ref: n,
|
|
17
|
+
"data-slot": "topbar",
|
|
18
|
+
role: t,
|
|
19
|
+
className: i(I, r),
|
|
20
|
+
...a
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
B.displayName = "Topbar";
|
|
25
|
+
const C = o(
|
|
26
|
+
({ className: r, ...t }, a) => /* @__PURE__ */ e(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref: a,
|
|
30
|
+
"data-slot": "topbar-left",
|
|
31
|
+
className: i("flex min-w-0 items-center gap-0.5", r),
|
|
32
|
+
...t
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
);
|
|
36
|
+
C.displayName = "TopbarLeft";
|
|
37
|
+
const _ = o(
|
|
38
|
+
({ className: r, children: t, ...a }, n) => /* @__PURE__ */ e(
|
|
39
|
+
M,
|
|
40
|
+
{
|
|
41
|
+
ref: n,
|
|
42
|
+
"data-slot": "topbar-icon",
|
|
43
|
+
sizes: "xxsm",
|
|
44
|
+
variant: "fjord",
|
|
45
|
+
className: r,
|
|
46
|
+
...a,
|
|
47
|
+
children: /* @__PURE__ */ e(D, { children: t })
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
_.displayName = "TopbarIcon";
|
|
52
|
+
const j = o(
|
|
53
|
+
({ className: r, ...t }, a) => /* @__PURE__ */ e(
|
|
54
|
+
k,
|
|
55
|
+
{
|
|
56
|
+
ref: a,
|
|
57
|
+
"data-slot": "topbar-breadcrumbs",
|
|
58
|
+
className: r,
|
|
59
|
+
...t
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
);
|
|
63
|
+
j.displayName = "TopbarBreadcrumbs";
|
|
64
|
+
const O = o(
|
|
65
|
+
({ className: r, ...t }, a) => /* @__PURE__ */ e(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
ref: a,
|
|
69
|
+
"data-slot": "topbar-metadata",
|
|
70
|
+
className: i(
|
|
71
|
+
"px-2 pt-0.5 text-xs leading-3.5 tracking-tightest text-muted-foreground",
|
|
72
|
+
r
|
|
73
|
+
),
|
|
74
|
+
...t
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
);
|
|
78
|
+
O.displayName = "TopbarMetadata";
|
|
79
|
+
const H = o(
|
|
80
|
+
({ className: r, ...t }, a) => /* @__PURE__ */ e(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
ref: a,
|
|
84
|
+
"data-slot": "topbar-center",
|
|
85
|
+
className: i(
|
|
86
|
+
"flex min-w-0 flex-1 items-center justify-center",
|
|
87
|
+
r
|
|
88
|
+
),
|
|
89
|
+
...t
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
);
|
|
93
|
+
H.displayName = "TopbarCenter";
|
|
94
|
+
const z = o(
|
|
95
|
+
({ className: r, ...t }, a) => /* @__PURE__ */ e(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
ref: a,
|
|
99
|
+
"data-slot": "topbar-right",
|
|
100
|
+
className: i(
|
|
101
|
+
"flex min-w-0 flex-1 items-center justify-end gap-2",
|
|
102
|
+
r
|
|
103
|
+
),
|
|
104
|
+
...t
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
);
|
|
108
|
+
z.displayName = "TopbarRight";
|
|
109
|
+
const G = ["light", "dark"], P = (r) => r === "light" || r === "dark", F = o(
|
|
110
|
+
({
|
|
111
|
+
className: r,
|
|
112
|
+
theme: t = "light",
|
|
113
|
+
onThemeChange: a,
|
|
114
|
+
availableThemes: n = G,
|
|
115
|
+
toggleThemeLabel: p = "Toggle theme",
|
|
116
|
+
lightModeTitle: m = "Light mode",
|
|
117
|
+
darkModeTitle: h = "Dark mode",
|
|
118
|
+
switchThemeLabel: b = "Switch Theme",
|
|
119
|
+
lightModeLabel: u = "Light mode",
|
|
120
|
+
darkModeLabel: g = "Dark mode",
|
|
121
|
+
...T
|
|
122
|
+
}, f) => {
|
|
123
|
+
const x = n.includes("light"), w = n.includes("dark");
|
|
124
|
+
return n.length < 2 ? null : /* @__PURE__ */ e(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
ref: f,
|
|
128
|
+
"data-slot": "topbar-theme-switcher",
|
|
129
|
+
className: i("flex items-center gap-1", r),
|
|
130
|
+
...T,
|
|
131
|
+
children: /* @__PURE__ */ d(v, { modal: !1, children: [
|
|
132
|
+
/* @__PURE__ */ e(
|
|
133
|
+
R,
|
|
134
|
+
{
|
|
135
|
+
render: /* @__PURE__ */ e(
|
|
136
|
+
c,
|
|
137
|
+
{
|
|
138
|
+
variant: "ghost",
|
|
139
|
+
size: "icon-sm",
|
|
140
|
+
"aria-label": p,
|
|
141
|
+
children: t === "light" ? /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e("title", { children: m }) }) : /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e("title", { children: h }) })
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ e(S, { align: "end", className: "w-40", children: /* @__PURE__ */ d(A, { children: [
|
|
147
|
+
/* @__PURE__ */ e(L, { children: b }),
|
|
148
|
+
/* @__PURE__ */ d(
|
|
149
|
+
E,
|
|
150
|
+
{
|
|
151
|
+
value: t,
|
|
152
|
+
onValueChange: (l) => {
|
|
153
|
+
P(l) && a?.(l);
|
|
154
|
+
},
|
|
155
|
+
children: [
|
|
156
|
+
x ? /* @__PURE__ */ e(s, { value: "light", children: u }) : null,
|
|
157
|
+
w ? /* @__PURE__ */ e(s, { value: "dark", children: g }) : null
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] }) })
|
|
162
|
+
] })
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
F.displayName = "TopbarThemeSwitcher";
|
|
168
|
+
const U = o(
|
|
169
|
+
({ className: r, ...t }, a) => /* @__PURE__ */ e(
|
|
170
|
+
c,
|
|
171
|
+
{
|
|
172
|
+
ref: a,
|
|
173
|
+
"data-slot": "topbar-action",
|
|
174
|
+
className: r,
|
|
175
|
+
...t
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
);
|
|
179
|
+
U.displayName = "TopbarAction";
|
|
180
|
+
export {
|
|
181
|
+
B as Topbar,
|
|
182
|
+
U as TopbarAction,
|
|
183
|
+
j as TopbarBreadcrumbs,
|
|
184
|
+
H as TopbarCenter,
|
|
185
|
+
_ as TopbarIcon,
|
|
186
|
+
C as TopbarLeft,
|
|
187
|
+
O as TopbarMetadata,
|
|
188
|
+
z as TopbarRight,
|
|
189
|
+
F as TopbarThemeSwitcher
|
|
190
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionMetadata, AccordionTrigger, Alert, AlertActions, AlertButton, AlertClose, AlertDescription, AlertMetadata, AlertTitle, Avatar, AvatarFallback, AvatarIcon, AvatarImage, AvatarMetadata, Badge, BadgeMetadata, Banner, BannerAction, BannerActions, BannerClose, BannerIcon, BannerMetadata, BannerStatus, BannerTitle, badgeVariants, Button, ButtonGroup, ButtonGroupMetadata, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, ButtonMetadata, buttonVariants, Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader,
|
|
1
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionMetadata, AccordionTrigger, Alert, AlertActions, AlertButton, AlertClose, AlertDescription, AlertMetadata, AlertTitle, Avatar, AvatarFallback, AvatarIcon, AvatarImage, AvatarMetadata, Badge, BadgeMetadata, Banner, BannerAction, BannerActions, BannerClose, BannerIcon, BannerMetadata, BannerStatus, BannerTitle, badgeVariants, Button, ButtonGroup, ButtonGroupMetadata, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, ButtonMetadata, buttonVariants, Card, CardActions, CardContent, CardDescription, CardFooter, CardFooterEnd, CardFooterStart, CardHeader, CardHeaderCenter, CardHeaderEnd, CardHeaderStart, CardMetadata, CardTitle, CheckboxGroup, CheckboxItem, CheckboxItemControl, CheckboxItemDescription, CheckboxItemLabel, CheckboxMetadata, CodeBlock, CodeBlockCollapseButton, CodeBlockCopyButton, CodeBlockDownloadButton, CodeBlockMetadata, Collapsible, CollapsibleContent, CollapsibleMetadata, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandMetadata, CommandSeparator, CommandShortcut, Count, countVariants, type ComponentMeta, type ComponentStatusType, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogMetadata, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuHeader, DropdownMenuItem, DropdownMenuLabel, DropdownMenuMetadata, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSectionLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HelperText, HelperTextMetadata, HoverCard, HoverCardContent, HoverCardMetadata, HoverCardTrigger, InlineCitation, InlineCitationCard, InlineCitationCardBody, InlineCitationCardTrigger, InlineCitationGroup, InlineCitationLink, type InlineCitationLinkProps, InlineCitationMetadata, InlineCitationQuote, InlineCitationSource, InlineCitationText, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupMetadata, InputGroupText, InputGroupTextarea, InputMetadata, Kbd, KbdGroup, KbdMetadata, Label, LabelMetadata, Loader, LoaderMetadata, Message, MessageAction, MessageActions, MessageContent, MessageResponse, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverMetadata, PopoverSlot, PopoverTitle, PopoverTrigger, PortalContainerContext, PromptInput, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputBody, PromptInputButton, PromptInputCommand, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputMetadata, PromptInputModelSelect, PromptInputModelSelectContent, PromptInputModelSelectItem, PromptInputModelSelectTrigger, PromptInputModelSelectValue, PromptInputProvider, PromptInputSubmit, PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, PromptInputTextarea, PromptInputTools, Reasoning, ReasoningContent, ReasoningHeader, ReasoningItem, ReasoningMetadata, RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemDescription, RadioGroupItemLabel, RadioGroupMetadata, ScrollArea, ScrollAreaMetadata, ScrollBar, SegmentedControl, SegmentedControlButton, SegmentedControlContent, SegmentedControlList, segmentedControlButtonVariants, segmentedControlListVariants, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectMetadata, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeparatorMetadata, Shimmer, ShimmerMetadata, Skeleton, SkeletonMetadata, Source, Sources, SourcesTitle, SonnerToastMetadata, toast, Toaster, Tabs, TabsLabel, TabsList, TabsPanel, TabsTrigger, tabsListVariants, tabsTriggerVariants, Textarea, TextareaMetadata, Topbar, TopbarAction, TopbarBreadcrumbs, TopbarCenter, TopbarIcon, TopbarLeft, TopbarMetadata, TopbarRight, type TopbarTheme, TopbarThemeSwitcher, Tool, ToolContent, ToolHeader, ToolInput, ToolMetadata, ToolOutput, Tooltip, TooltipContent, TooltipMetadata, TooltipProvider, TooltipTrigger, usePromptInputController, } from './components';
|