@mechane-ai/ui 0.0.0-stage → 0.2.1

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.
@@ -0,0 +1,2 @@
1
+ export { Waterfall } from './waterfall.tsx';
2
+ export type { WaterfallItem } from './waterfall.tsx';
@@ -0,0 +1,34 @@
1
+ import type { ReactNode } from 'react';
2
+ type WaterfallGeometry = {
3
+ readonly kind: 'interval';
4
+ readonly start: number;
5
+ readonly end: number;
6
+ } | {
7
+ readonly kind: 'point';
8
+ readonly at: number;
9
+ readonly marker: 'filled' | 'hollow' | 'diamond';
10
+ } | {
11
+ readonly kind: 'unavailable';
12
+ };
13
+ export type WaterfallItem = {
14
+ readonly id: string;
15
+ readonly label: string;
16
+ readonly detail: string;
17
+ readonly summary: string;
18
+ readonly tone: 'neutral' | 'positive' | 'negative';
19
+ readonly geometry: WaterfallGeometry;
20
+ };
21
+ type WaterfallProps = {
22
+ readonly items: ReadonlyArray<WaterfallItem>;
23
+ readonly start: number;
24
+ readonly end: number;
25
+ readonly label: string;
26
+ readonly rowLabel: string;
27
+ readonly summaryLabel: string;
28
+ readonly emptyLabel: string;
29
+ readonly selectedId: string | undefined;
30
+ readonly onSelect: (id: string) => void;
31
+ readonly formatOffset: (offset: number) => string;
32
+ };
33
+ export declare function Waterfall({ items, start, end, label, rowLabel, summaryLabel, emptyLabel, selectedId, onSelect, formatOffset, }: WaterfallProps): ReactNode;
34
+ export {};
package/dist/charts.js ADDED
@@ -0,0 +1,198 @@
1
+ import { N as e } from "./src-Czfi0YQa.js";
2
+ import * as t from "@stylexjs/stylex";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { scaleLinear as i } from "@visx/scale";
5
+ import { Bar as a } from "@visx/shape";
6
+ // src/charts/waterfall.tsx
7
+ var o = {
8
+ plot: {
9
+ k7Eaqz: "xeuugli",
10
+ kUOVxO: "xl4o6ss",
11
+ kBCFzs: "x1npkx4u xp7zxbh",
12
+ kbNqZ1: "x1ms6mhf xq5skvx",
13
+ $$css: !0
14
+ },
15
+ neutral: {
16
+ kMwMTN: "x1ns7tj1",
17
+ $$css: !0
18
+ },
19
+ positive: {
20
+ kMwMTN: "x1swbf3d",
21
+ $$css: !0
22
+ },
23
+ negative: {
24
+ kMwMTN: "x11ep619",
25
+ $$css: !0
26
+ }
27
+ }, s = {
28
+ neutral: o.neutral,
29
+ positive: o.positive,
30
+ negative: o.negative
31
+ }, c = [
32
+ 0,
33
+ .5,
34
+ 1
35
+ ], l = 100;
36
+ function u({ items: a, start: u, end: p, label: m, rowLabel: h, summaryLabel: g, emptyLabel: _, selectedId: v, onSelect: y, formatOffset: b }) {
37
+ let x = p - u, S = i({
38
+ domain: [u, p],
39
+ range: [0, x === 0 ? 0 : l]
40
+ }), C = x > 0 ? c : [0];
41
+ return /* @__PURE__ */ r("div", {
42
+ role: "group",
43
+ "aria-label": m,
44
+ className: "xeuugli x1o2ymkw",
45
+ children: [
46
+ /* @__PURE__ */ r("div", {
47
+ className: "xrvj5dj x13sfnbj xj8mwme x6s0dn4 x1y871oy xq5c7ks xh8yej3 x9f619 xqin4a2 xu0aao5 x1ns7tj1 x1755wjq xso031l x1q0q8m5 xx6l4uz",
48
+ children: [
49
+ /* @__PURE__ */ n(e, {
50
+ variant: "caption",
51
+ tone: "muted",
52
+ children: h
53
+ }),
54
+ /* @__PURE__ */ n("div", {
55
+ className: "xeuugli xl4o6ss x1npkx4u xp7zxbh x1ms6mhf xq5skvx x78zum5 x1qughib x6s0dn4 x1755wjq x1df3ybb xss6m8b",
56
+ children: C.map((e) => /* @__PURE__ */ n("span", { children: b(x * e) }, e))
57
+ }),
58
+ /* @__PURE__ */ n("span", {
59
+ className: "xeuugli x1k3v4rp x1moszlt x1ms6mhf xp4054r xj0a0fe xss6m8b",
60
+ children: /* @__PURE__ */ n(e, {
61
+ variant: "caption",
62
+ tone: "muted",
63
+ children: g
64
+ })
65
+ })
66
+ ]
67
+ }),
68
+ a.length === 0 && /* @__PURE__ */ n("p", {
69
+ className: "x1ghz6dp x805nir",
70
+ children: /* @__PURE__ */ n(e, {
71
+ tone: "muted",
72
+ children: _
73
+ })
74
+ }),
75
+ a.map((i) => {
76
+ let a = f({
77
+ geometry: i.geometry,
78
+ start: u,
79
+ formatOffset: b
80
+ });
81
+ return /* @__PURE__ */ r("button", {
82
+ type: "button",
83
+ "aria-pressed": v === i.id,
84
+ "aria-label": `${i.label} · ${i.detail} · ${i.summary} · ${a}`,
85
+ onClick: () => y(i.id),
86
+ ...{
87
+ 0: { className: "xrvj5dj x13sfnbj xj8mwme x6s0dn4 x1y871oy xq5c7ks xh8yej3 x9f619 xqin4a2 x1r1ej2n x1wiwyrm xc342km xso031l x1q0q8m5 xx6l4uz x1kb4e9r xn4qiis x1o2ymkw x1yc453h x1ypdohk x1p052by x1f1h9gf x9v5kkp xdv554w x1bqaal x1t1lzn6" },
88
+ 1: { className: "xrvj5dj x13sfnbj xj8mwme x6s0dn4 x1y871oy xq5c7ks xh8yej3 x9f619 xqin4a2 x1r1ej2n x1wiwyrm xc342km xso031l x1q0q8m5 xx6l4uz xn4qiis x1o2ymkw x1yc453h x1ypdohk x1p052by x1f1h9gf x9v5kkp xdv554w x1bqaal x1t1lzn6 xco4m3t x1jmj9dw" }
89
+ }[v === i.id | 0],
90
+ children: [
91
+ /* @__PURE__ */ r("span", {
92
+ className: "xeuugli xrvj5dj x1tothx9",
93
+ children: [/* @__PURE__ */ n("span", {
94
+ className: "xk50ysn xj0a0fe",
95
+ children: /* @__PURE__ */ n(e, { children: i.label })
96
+ }), /* @__PURE__ */ n("span", {
97
+ title: i.detail,
98
+ className: "xb3r6kr xuxw1ft xlyipyv",
99
+ children: /* @__PURE__ */ n(e, {
100
+ variant: "caption",
101
+ tone: "muted",
102
+ children: i.detail
103
+ })
104
+ })]
105
+ }),
106
+ /* @__PURE__ */ n("span", {
107
+ title: a,
108
+ ...t.props(o.plot, s[i.tone]),
109
+ children: i.geometry.kind === "unavailable" ? /* @__PURE__ */ n(e, {
110
+ variant: "caption",
111
+ tone: "muted",
112
+ children: a
113
+ }) : /* @__PURE__ */ r("svg", {
114
+ "aria-hidden": !0,
115
+ className: "x1lliihq xh8yej3 xmix8c7 x1rea2x4",
116
+ children: [C.map((e) => /* @__PURE__ */ n("line", {
117
+ x1: `${e * l}%`,
118
+ x2: `${e * l}%`,
119
+ y1: "0",
120
+ y2: "18",
121
+ className: "xi5i0ux"
122
+ }, e)), /* @__PURE__ */ n(d, {
123
+ geometry: i.geometry,
124
+ scale: S
125
+ })]
126
+ })
127
+ }),
128
+ /* @__PURE__ */ n("span", {
129
+ className: "xeuugli x1k3v4rp x1moszlt x1ms6mhf xp4054r xj0a0fe xss6m8b",
130
+ children: /* @__PURE__ */ n(e, {
131
+ variant: "caption",
132
+ tone: "muted",
133
+ children: i.summary
134
+ })
135
+ })
136
+ ]
137
+ }, i.id);
138
+ })
139
+ ]
140
+ });
141
+ }
142
+ function d({ geometry: e, scale: t }) {
143
+ switch (e.kind) {
144
+ case "unavailable": return null;
145
+ case "interval": {
146
+ let r = t(e.start), i = t(e.end) - r;
147
+ return i === 0 ? /* @__PURE__ */ n("circle", {
148
+ cx: `${r}%`,
149
+ cy: 9,
150
+ r: 3,
151
+ className: "x117rol3"
152
+ }) : /* @__PURE__ */ n(a, {
153
+ x: `${r}%`,
154
+ y: 6,
155
+ width: `${i}%`,
156
+ height: 6,
157
+ rx: 2,
158
+ className: "x117rol3"
159
+ });
160
+ }
161
+ case "point": {
162
+ let r = t(e.at);
163
+ switch (e.marker) {
164
+ case "filled": return /* @__PURE__ */ n("circle", {
165
+ cx: `${r}%`,
166
+ cy: 9,
167
+ r: 3,
168
+ className: "x117rol3"
169
+ });
170
+ case "hollow": return /* @__PURE__ */ n("circle", {
171
+ cx: `${r}%`,
172
+ cy: 9,
173
+ r: 3.5,
174
+ className: "x17dcl0o x73je2i xvlca1e"
175
+ });
176
+ case "diamond": return /* @__PURE__ */ n("svg", {
177
+ x: `${r}%`,
178
+ y: 9,
179
+ width: 1,
180
+ height: 1,
181
+ overflow: "visible",
182
+ children: /* @__PURE__ */ n("path", {
183
+ d: "M0 -5 5 0 0 5 -5 0Z",
184
+ className: "x117rol3"
185
+ })
186
+ });
187
+ }
188
+ }
189
+ }
190
+ }
191
+ function f({ geometry: e, start: t, formatOffset: n }) {
192
+ switch (e.kind) {
193
+ case "interval": return `Start ${n(e.start - t)}, end ${n(e.end - t)}, duration ${n(e.end - e.start)}`;
194
+ case "point": return `At ${n(e.at - t)}`;
195
+ case "unavailable": return "Timing unavailable";
196
+ }
197
+ }
198
+ export { u as Waterfall };
@@ -0,0 +1,51 @@
1
+ import type { Dialog } from '@base-ui/react/dialog';
2
+ import type { ComponentProps } from 'react';
3
+ export type OpenStateProperties<Change> = {
4
+ readonly open: NonNullable<Dialog.Root.Props['open']>;
5
+ readonly defaultOpen?: never;
6
+ readonly onOpenChange: Change;
7
+ } | {
8
+ readonly open?: never;
9
+ readonly defaultOpen?: Dialog.Root.Props['defaultOpen'];
10
+ readonly onOpenChange?: Change;
11
+ };
12
+ export type ValueStateProperties<Value, Change> = {
13
+ readonly value: Value;
14
+ readonly defaultValue?: never;
15
+ readonly onValueChange: Change;
16
+ } | {
17
+ readonly value?: never;
18
+ readonly defaultValue?: Value;
19
+ readonly onValueChange?: Change;
20
+ };
21
+ export type ReadOnlyValueProperties<Value, Change> = {
22
+ readonly value: Value;
23
+ readonly defaultValue?: never;
24
+ readonly onValueChange?: Change;
25
+ readonly readOnly: true;
26
+ };
27
+ export type TextValueProperties<Value, Change, ValueChange> = {
28
+ readonly value: Value;
29
+ readonly defaultValue?: never;
30
+ readonly onChange: Change;
31
+ readonly onValueChange?: ValueChange;
32
+ readonly readOnly?: ComponentProps<'input'>['readOnly'];
33
+ } | {
34
+ readonly value: Value;
35
+ readonly defaultValue?: never;
36
+ readonly onChange?: Change;
37
+ readonly onValueChange: ValueChange;
38
+ readonly readOnly?: ComponentProps<'input'>['readOnly'];
39
+ } | {
40
+ readonly value: Value;
41
+ readonly defaultValue?: never;
42
+ readonly onChange?: Change;
43
+ readonly onValueChange?: ValueChange;
44
+ readonly readOnly: true;
45
+ } | {
46
+ readonly value?: never;
47
+ readonly defaultValue?: Value;
48
+ readonly onChange?: Change;
49
+ readonly onValueChange?: ValueChange;
50
+ readonly readOnly?: ComponentProps<'input'>['readOnly'];
51
+ };
@@ -0,0 +1,8 @@
1
+ import { Button as BaseButton } from '@base-ui/react/button';
2
+ import type { ComponentProps, ReactNode } from 'react';
3
+ type CopyValueProps = Omit<ComponentProps<typeof BaseButton>, 'value'> & {
4
+ readonly value: string;
5
+ readonly label: string;
6
+ };
7
+ export declare function CopyValue({ value, label, children, className, style, disabled, onClick, ...props }: CopyValueProps): ReactNode;
8
+ export {};
@@ -0,0 +1,27 @@
1
+ import { Dialog as BaseDialog } from '@base-ui/react/dialog';
2
+ import type { ComponentProps, ReactNode } from 'react';
3
+ import type { OpenStateProperties } from './control-state.ts';
4
+ import type { PlacementStyle } from './style-composition.ts';
5
+ type DialogRootProps<Payload> = Omit<BaseDialog.Root.Props<Payload>, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BaseDialog.Root.Props<Payload>['onOpenChange']>>;
6
+ type DialogBackdropProps = ComponentProps<typeof BaseDialog.Backdrop>;
7
+ type DialogPopupProps = ComponentProps<typeof BaseDialog.Popup> & {
8
+ readonly xstyle?: PlacementStyle;
9
+ };
10
+ type DialogTitleProps = ComponentProps<typeof BaseDialog.Title>;
11
+ type DialogDescriptionProps = ComponentProps<typeof BaseDialog.Description>;
12
+ declare function DialogRoot<Payload = unknown>(props: DialogRootProps<Payload>): ReactNode;
13
+ declare function DialogBackdrop({ className, style, ...props }: DialogBackdropProps): ReactNode;
14
+ declare function DialogPopup({ className, style, xstyle, ...props }: DialogPopupProps): ReactNode;
15
+ declare function DialogTitle({ className, style, ...props }: DialogTitleProps): ReactNode;
16
+ declare function DialogDescription({ className, style, ...props }: DialogDescriptionProps): ReactNode;
17
+ export declare const Dialog: {
18
+ Root: typeof DialogRoot;
19
+ Trigger: BaseDialog.Trigger;
20
+ Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
21
+ Backdrop: typeof DialogBackdrop;
22
+ Popup: typeof DialogPopup;
23
+ Title: typeof DialogTitle;
24
+ Description: typeof DialogDescription;
25
+ Close: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
26
+ };
27
+ export {};
@@ -0,0 +1,33 @@
1
+ import { Drawer as BaseDrawer } from '@base-ui/react/drawer';
2
+ import type { ComponentProps, ReactNode } from 'react';
3
+ import type { OpenStateProperties } from './control-state.ts';
4
+ import type { PlacementStyle } from './style-composition.ts';
5
+ type DrawerRootProps<Payload> = Omit<BaseDrawer.Root.Props<Payload>, 'open' | 'defaultOpen' | 'onOpenChange' | 'swipeDirection' | 'snapPoints' | 'snapPoint' | 'defaultSnapPoint' | 'onSnapPointChange' | 'snapToSequentialPoints'> & OpenStateProperties<NonNullable<BaseDrawer.Root.Props<Payload>['onOpenChange']>>;
6
+ type DrawerBackdropProps = ComponentProps<typeof BaseDrawer.Backdrop>;
7
+ type DrawerViewportProps = ComponentProps<typeof BaseDrawer.Viewport>;
8
+ type DrawerPopupProps = ComponentProps<typeof BaseDrawer.Popup> & {
9
+ readonly xstyle?: PlacementStyle;
10
+ };
11
+ type DrawerTitleProps = ComponentProps<typeof BaseDrawer.Title> & {
12
+ readonly visuallyHidden?: boolean;
13
+ };
14
+ type DrawerDescriptionProps = ComponentProps<typeof BaseDrawer.Description>;
15
+ declare function DrawerRoot<Payload = unknown>(props: DrawerRootProps<Payload>): ReactNode;
16
+ declare function DrawerBackdrop({ className, style, ...props }: DrawerBackdropProps): ReactNode;
17
+ declare function DrawerViewport({ className, style, ...props }: DrawerViewportProps): ReactNode;
18
+ declare function DrawerPopup({ className, style, xstyle, ...props }: DrawerPopupProps): ReactNode;
19
+ declare function DrawerTitle({ className, style, visuallyHidden, ...props }: DrawerTitleProps): ReactNode;
20
+ declare function DrawerDescription({ className, style, ...props }: DrawerDescriptionProps): ReactNode;
21
+ export declare const Drawer: {
22
+ createHandle: typeof BaseDrawer.createHandle;
23
+ Root: typeof DrawerRoot;
24
+ Trigger: BaseDrawer.Trigger;
25
+ Portal: BaseDrawer.Portal;
26
+ Backdrop: typeof DrawerBackdrop;
27
+ Viewport: typeof DrawerViewport;
28
+ Popup: typeof DrawerPopup;
29
+ Title: typeof DrawerTitle;
30
+ Description: typeof DrawerDescription;
31
+ Close: BaseDrawer.Close;
32
+ };
33
+ export {};
@@ -0,0 +1,32 @@
1
+ import { Field as BaseField } from '@base-ui/react/field';
2
+ import { Input as BaseInput } from '@base-ui/react/input';
3
+ import type { ComponentProps, ReactNode } from 'react';
4
+ import type { TextValueProperties } from './control-state.ts';
5
+ import type { PlacementStyle } from './style-composition.ts';
6
+ type FieldRootProps = ComponentProps<typeof BaseField.Root> & {
7
+ readonly xstyle?: PlacementStyle;
8
+ };
9
+ type FieldLabelProps = ComponentProps<typeof BaseField.Label>;
10
+ type FieldDescriptionProps = ComponentProps<typeof BaseField.Description>;
11
+ type FieldErrorProps = ComponentProps<typeof BaseField.Error>;
12
+ type BaseInputProps = ComponentProps<typeof BaseInput>;
13
+ type InputProps = Omit<BaseInputProps, 'value' | 'defaultValue' | 'onChange' | 'onValueChange' | 'readOnly'> & TextValueProperties<NonNullable<BaseInputProps['value']>, NonNullable<BaseInputProps['onChange']>, NonNullable<BaseInputProps['onValueChange']>> & {
14
+ readonly xstyle?: PlacementStyle;
15
+ };
16
+ type NativeTextareaProps = ComponentProps<'textarea'>;
17
+ type TextareaProps = Omit<NativeTextareaProps, 'value' | 'defaultValue' | 'onChange' | 'readOnly'> & TextValueProperties<NonNullable<NativeTextareaProps['value']>, NonNullable<NativeTextareaProps['onChange']>, NonNullable<BaseInputProps['onValueChange']>> & {
18
+ readonly xstyle?: PlacementStyle;
19
+ };
20
+ declare function FieldRoot({ className, style, xstyle, ...props }: FieldRootProps): ReactNode;
21
+ declare function FieldLabel({ className, style, ...props }: FieldLabelProps): ReactNode;
22
+ declare function FieldDescription({ className, style, ...props }: FieldDescriptionProps): ReactNode;
23
+ declare function FieldError({ className, style, ...props }: FieldErrorProps): ReactNode;
24
+ export declare const Field: {
25
+ Root: typeof FieldRoot;
26
+ Label: typeof FieldLabel;
27
+ Description: typeof FieldDescription;
28
+ Error: typeof FieldError;
29
+ };
30
+ export declare function Input({ className, style, xstyle, ...props }: InputProps): ReactNode;
31
+ export declare function Textarea({ value, defaultValue, onValueChange, name, disabled, readOnly, required, className, style, xstyle, ...props }: TextareaProps): ReactNode;
32
+ export {};
@@ -0,0 +1,16 @@
1
+ export { Button, IconButton, TextButton, TextLink } from './actions.tsx';
2
+ export { Badge, Heading, Identifier, Muted, Prose, Status, Subheading, Text } from './text.tsx';
3
+ export { Field, Input, Textarea } from './forms.tsx';
4
+ export { Select } from './select.tsx';
5
+ export { Dialog } from './dialog.tsx';
6
+ export { Drawer } from './drawer.tsx';
7
+ export { Tooltip } from './tooltip.tsx';
8
+ export { Columns, Divider, EmptyState, Notice, Panel, Row, Stack } from './surfaces.tsx';
9
+ export { ListFooter } from './list-footer.tsx';
10
+ export { Cell, Table } from './table.tsx';
11
+ export { Metric, MetricGrid } from './metrics.tsx';
12
+ export { CopyValue } from './copy-value.tsx';
13
+ export { Loading } from './loading.tsx';
14
+ export { Tabs } from './tabs.tsx';
15
+ export { Inspector, Details } from './inspector.tsx';
16
+ export { SkipLink } from './skip-link.tsx';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { E as Badge, P as Button, l as Cell, f as Columns, o as CopyValue, n as Details, x as Dialog, p as Divider, b as Drawer, m as EmptyState, C as Field, D as Heading, F as IconButton, O as Identifier, w as Input, r as Inspector, d as ListFooter, a as Loading, s as Metric, c as MetricGrid, k as Muted, h as Notice, g as Panel, A as Prose, _ as Row, S as Select, t as SkipLink, v as Stack, j as Status, M as Subheading, u as Table, i as Tabs, N as Text, I as TextButton, L as TextLink, T as Textarea, y as Tooltip } from "./src-Czfi0YQa.js";
@@ -0,0 +1,16 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ type InspectorProps = ComponentProps<'div'> & {
3
+ readonly master: ReactNode;
4
+ readonly detail: ReactNode;
5
+ readonly label: string;
6
+ };
7
+ type DetailItem = {
8
+ readonly label: string;
9
+ readonly value: ReactNode;
10
+ };
11
+ type DetailsProps = ComponentProps<'dl'> & {
12
+ readonly items: ReadonlyArray<DetailItem>;
13
+ };
14
+ export declare function Inspector({ master, detail, label, ...props }: InspectorProps): ReactNode;
15
+ export declare function Details({ items, ...props }: DetailsProps): ReactNode;
16
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ type AppShellProps = {
3
+ readonly sidebarHeader?: ReactNode;
4
+ readonly sidebar: ReactNode;
5
+ readonly footer?: ReactNode;
6
+ readonly children: ReactNode;
7
+ };
8
+ export declare function AppShell({ sidebarHeader, sidebar, footer, children }: AppShellProps): ReactNode;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ type DetailPageProps = {
3
+ readonly children: ReactNode;
4
+ };
5
+ export declare function DetailPage({ children }: DetailPageProps): ReactNode;
6
+ export {};
@@ -0,0 +1,23 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ export declare const frame: stylex.VarGroup<Readonly<{
3
+ sidebarWidth: string;
4
+ toolbarHeight: string;
5
+ navigationHeight: string;
6
+ navigationInset: string;
7
+ navigationPadding: string;
8
+ footerHeight: string;
9
+ footerPadding: string;
10
+ detailWidth: string;
11
+ detailMaxWidth: string;
12
+ detailTop: string;
13
+ detailBottom: string;
14
+ detailMobileTop: string;
15
+ detailMobileBottom: string;
16
+ }>, symbol>;
17
+ export declare const frameConditions: {
18
+ sidebarMobile: string;
19
+ sidebarDesktopQuery: string;
20
+ sidebarCoarse: string;
21
+ detailMobile: string;
22
+ toolbarCompact: string;
23
+ };
@@ -0,0 +1,4 @@
1
+ export { AppShell } from './app-shell.tsx';
2
+ export { PageToolbar, ToolbarAction } from './page-toolbar.tsx';
3
+ export { DetailPage } from './detail-page.tsx';
4
+ export { Navigation, NavigationItem, NavigationLink, SidebarLabel, SidebarFooter } from './sidebar.tsx';
@@ -0,0 +1,14 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import { Button } from '../index.ts';
3
+ type PageToolbarProps = {
4
+ readonly title: ReactNode;
5
+ readonly actions?: ReactNode;
6
+ readonly breadcrumb?: boolean;
7
+ readonly navigation?: boolean;
8
+ };
9
+ type ToolbarActionProps = Omit<ComponentProps<typeof Button>, 'variant' | 'size' | 'xstyle'> & {
10
+ readonly icon?: ReactNode;
11
+ };
12
+ export declare function PageToolbar({ title, actions, breadcrumb, navigation }: PageToolbarProps): ReactNode;
13
+ export declare function ToolbarAction({ icon, children, ...props }: ToolbarActionProps): ReactNode;
14
+ export {};
@@ -0,0 +1,45 @@
1
+ import type { ComponentProps, ReactNode, RefObject } from 'react';
2
+ import { Button, Drawer } from '../index.ts';
3
+ type SidebarState = {
4
+ readonly isExpanded: boolean;
5
+ readonly sidebarId: string;
6
+ readonly drawerHandle: ReturnType<typeof Drawer.createHandle>;
7
+ readonly navigationToggleRef: RefObject<HTMLButtonElement | null>;
8
+ readonly onToggle: () => void;
9
+ readonly onNavigate: () => void;
10
+ };
11
+ export declare const SidebarContext: import("react").Context<SidebarState | null>;
12
+ type SidebarProps = {
13
+ readonly header?: ReactNode;
14
+ readonly footer?: ReactNode;
15
+ readonly close?: ReactNode;
16
+ readonly children: ReactNode;
17
+ };
18
+ type NavigationProps = {
19
+ readonly children: ReactNode;
20
+ readonly label?: string;
21
+ };
22
+ type NavigationItemProps = Omit<ComponentProps<typeof Button>, 'variant' | 'tone' | 'size' | 'xstyle'> & {
23
+ readonly icon?: ReactNode;
24
+ readonly selected?: boolean;
25
+ };
26
+ type NavigationLinkProps = ComponentProps<'a'> & {
27
+ readonly icon?: ReactNode;
28
+ readonly selected?: boolean;
29
+ };
30
+ type SidebarLabelProps = {
31
+ readonly children: ReactNode;
32
+ readonly grow?: boolean;
33
+ };
34
+ type SidebarFooterProps = {
35
+ readonly children: ReactNode;
36
+ };
37
+ export declare function Sidebar({ header, footer, close, children }: SidebarProps): ReactNode;
38
+ export declare function SidebarClose(): ReactNode;
39
+ export declare function Navigation({ children, label }: NavigationProps): ReactNode;
40
+ export declare function NavigationItem({ children, icon, selected, onClick, ...props }: NavigationItemProps): ReactNode;
41
+ export declare function NavigationLink({ children, icon, selected, onClick, className, style, ...props }: NavigationLinkProps): ReactNode;
42
+ export declare function SidebarLabel({ children, grow }: SidebarLabelProps): ReactNode;
43
+ export declare function SidebarFooter({ children }: SidebarFooterProps): ReactNode;
44
+ export declare function SidebarToggle(): ReactNode;
45
+ export {};