@mechane-ai/elements 0.0.0-stage → 0.4.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.
- package/LICENSE +202 -0
- package/NOTICE +32 -0
- package/README.md +119 -2
- package/dist/accessibility-C-aIZ1Yx.js +15 -0
- package/dist/ai.js +323 -0
- package/dist/assets/stylex.css +2664 -0
- package/dist/categorical-values-cMX7Mykq.js +58 -0
- package/dist/chart-frame-bX0VLC_W.js +152 -0
- package/dist/chart-input-qnM44oen.js +21 -0
- package/dist/charts/cartesian.js +1040 -0
- package/dist/charts/distribution.js +610 -0
- package/dist/charts/graph.js +231 -0
- package/dist/charts/hierarchy.js +109 -0
- package/dist/charts/matrix.js +439 -0
- package/dist/charts/timeline.js +198 -0
- package/dist/charts.js +1 -0
- package/dist/code-block-BiMcfdlB.js +175 -0
- package/dist/collections.js +466 -0
- package/dist/content/code.js +1 -0
- package/dist/content/diff.js +96 -0
- package/dist/content/link.js +1 -0
- package/dist/content/markdown.js +155 -0
- package/dist/content/tree.js +77 -0
- package/dist/content-link-Bm-Td5wm.js +26 -0
- package/dist/content.js +318 -0
- package/dist/feedback.js +1 -0
- package/dist/forms/dates.js +168 -0
- package/dist/forms.js +1 -0
- package/dist/index.js +1 -0
- package/dist/layout.js +379 -0
- package/dist/navigation/commands.js +80 -0
- package/dist/navigation-yxK3iQXo.js +39 -0
- package/dist/navigation.js +58 -0
- package/dist/overlays.js +1 -0
- package/dist/packages/ai/src/approval.d.ts +29 -0
- package/dist/packages/ai/src/conversation.d.ts +34 -0
- package/dist/packages/ai/src/index.d.ts +10 -0
- package/dist/packages/ai/src/message.d.ts +19 -0
- package/dist/packages/ai/src/prompt-input.d.ts +25 -0
- package/dist/packages/ai/src/sources.d.ts +17 -0
- package/dist/packages/charts/src/cartesian/bar-chart.d.ts +24 -0
- package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +12 -0
- package/dist/packages/charts/src/cartesian/index.d.ts +12 -0
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +37 -0
- package/dist/packages/charts/src/cartesian/sparkline.d.ts +11 -0
- package/dist/packages/charts/src/cartesian/time-series-data.d.ts +54 -0
- package/dist/packages/charts/src/cartesian/time-series-line.d.ts +9 -0
- package/dist/packages/charts/src/cartesian/time-series.d.ts +29 -0
- package/dist/packages/charts/src/categorical-values.d.ts +24 -0
- package/dist/packages/charts/src/chart-frame.d.ts +34 -0
- package/dist/packages/charts/src/chart-input.d.ts +10 -0
- package/dist/packages/charts/src/chart-theme.d.ts +48 -0
- package/dist/packages/charts/src/distribution/distribution-input.d.ts +14 -0
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +135 -0
- package/dist/packages/charts/src/distribution/ecdf.d.ts +23 -0
- package/dist/packages/charts/src/distribution/histogram.d.ts +26 -0
- package/dist/packages/charts/src/distribution/index.d.ts +8 -0
- package/dist/packages/charts/src/distribution/interval-plot.d.ts +24 -0
- package/dist/packages/charts/src/distribution/ranked-bars.d.ts +22 -0
- package/dist/packages/charts/src/graph/index.d.ts +2 -0
- package/dist/packages/charts/src/graph/relation-graph.d.ts +45 -0
- package/dist/packages/charts/src/hierarchy/index.d.ts +2 -0
- package/dist/packages/charts/src/hierarchy/treemap.d.ts +12 -0
- package/dist/packages/charts/src/index.d.ts +4 -0
- package/dist/packages/charts/src/matrix/color-legend.d.ts +7 -0
- package/dist/packages/charts/src/matrix/heatmap-scale.d.ts +8 -0
- package/dist/packages/charts/src/matrix/index.d.ts +7 -0
- package/dist/packages/charts/src/matrix/matrix.d.ts +34 -0
- package/dist/packages/charts/src/matrix/token-heatmap.d.ts +20 -0
- package/dist/packages/charts/src/plot-width.d.ts +5 -0
- package/dist/packages/charts/src/timeline/index.d.ts +2 -0
- package/dist/packages/charts/src/timeline/waterfall.d.ts +34 -0
- package/dist/packages/collections/src/collection-controls.d.ts +41 -0
- package/dist/packages/collections/src/data-table.d.ts +49 -0
- package/dist/packages/collections/src/index.d.ts +10 -0
- package/dist/packages/collections/src/inspector.d.ts +16 -0
- package/dist/packages/collections/src/list-footer.d.ts +6 -0
- package/dist/packages/collections/src/metrics.d.ts +9 -0
- package/dist/packages/collections/src/table.d.ts +17 -0
- package/dist/packages/collections/src/timestamp.d.ts +7 -0
- package/dist/packages/content/src/code/code-block.d.ts +22 -0
- package/dist/packages/content/src/code/index.d.ts +2 -0
- package/dist/packages/content/src/code/use-highlighted-code.d.ts +9 -0
- package/dist/packages/content/src/content-link.d.ts +8 -0
- package/dist/packages/content/src/diff/diff-source.d.ts +32 -0
- package/dist/packages/content/src/diff/diff-viewer.d.ts +3 -0
- package/dist/packages/content/src/diff/index.d.ts +2 -0
- package/dist/packages/content/src/diff/pierre-diff.d.ts +14 -0
- package/dist/packages/content/src/index.d.ts +8 -0
- package/dist/packages/content/src/json-viewer.d.ts +11 -0
- package/dist/packages/content/src/link.d.ts +2 -0
- package/dist/packages/content/src/log-viewer.d.ts +9 -0
- package/dist/packages/content/src/markdown/index.d.ts +2 -0
- package/dist/packages/content/src/markdown/markdown.d.ts +7 -0
- package/dist/packages/content/src/pierre-theme.d.ts +36 -0
- package/dist/packages/content/src/stack-trace.d.ts +16 -0
- package/dist/packages/content/src/trace.d.ts +35 -0
- package/dist/packages/content/src/tree/file-tree-types.d.ts +12 -0
- package/dist/packages/content/src/tree/file-tree.d.ts +3 -0
- package/dist/packages/content/src/tree/index.d.ts +2 -0
- package/dist/packages/content/src/tree/pierre-tree.d.ts +3 -0
- package/dist/packages/core/src/actions.d.ts +31 -0
- package/dist/packages/core/src/avatar.d.ts +10 -0
- package/dist/packages/core/src/copy-value.d.ts +9 -0
- package/dist/packages/core/src/disclosure.d.ts +33 -0
- package/dist/packages/core/src/index.d.ts +7 -0
- package/dist/packages/core/src/surfaces.d.ts +18 -0
- package/dist/packages/core/src/text.d.ts +30 -0
- package/dist/packages/feedback/src/feedback.d.ts +11 -0
- package/dist/packages/feedback/src/index.d.ts +7 -0
- package/dist/packages/feedback/src/loading.d.ts +7 -0
- package/dist/packages/feedback/src/progress.d.ts +10 -0
- package/dist/packages/feedback/src/skeleton.d.ts +18 -0
- package/dist/packages/feedback/src/toast.d.ts +28 -0
- package/dist/packages/forms/src/combobox.d.ts +81 -0
- package/dist/packages/forms/src/dates/calendar.d.ts +32 -0
- package/dist/packages/forms/src/dates/date-range-picker.d.ts +16 -0
- package/dist/packages/forms/src/dates/index.d.ts +4 -0
- package/dist/packages/forms/src/field-styles.d.ts +66 -0
- package/dist/packages/forms/src/form-controls.d.ts +81 -0
- package/dist/packages/forms/src/forms.d.ts +32 -0
- package/dist/packages/forms/src/index.d.ts +7 -0
- package/dist/packages/forms/src/select.d.ts +44 -0
- package/dist/packages/forms/src/selection-styles.d.ts +110 -0
- package/dist/packages/forms/src/selection.d.ts +57 -0
- package/dist/packages/forms/src/settings-row.d.ts +8 -0
- package/dist/packages/foundations/src/accessibility.d.ts +14 -0
- package/dist/packages/foundations/src/control-state.d.ts +67 -0
- package/dist/packages/foundations/src/overlay-styles.d.ts +46 -0
- package/dist/packages/foundations/src/popup-styles.d.ts +84 -0
- package/dist/packages/foundations/src/style-composition.d.ts +22 -0
- package/dist/packages/foundations/src/theme.d.ts +16 -0
- package/dist/packages/foundations/src/tokens.stylex.d.ts +143 -0
- package/dist/packages/layout/src/app-shell.d.ts +9 -0
- package/dist/packages/layout/src/detail-page.d.ts +6 -0
- package/dist/packages/layout/src/frame.stylex.d.ts +23 -0
- package/dist/packages/layout/src/index.d.ts +6 -0
- package/dist/packages/layout/src/page-toolbar.d.ts +14 -0
- package/dist/packages/layout/src/resizable.d.ts +27 -0
- package/dist/packages/layout/src/sidebar.d.ts +46 -0
- package/dist/packages/navigation/src/commands/command.d.ts +37 -0
- package/dist/packages/navigation/src/commands/index.d.ts +2 -0
- package/dist/packages/navigation/src/index.d.ts +3 -0
- package/dist/packages/navigation/src/navigation.d.ts +24 -0
- package/dist/packages/navigation/src/skip-link.d.ts +6 -0
- package/dist/packages/navigation/src/tabs.d.ts +19 -0
- package/dist/packages/overlays/src/alert-dialog.d.ts +18 -0
- package/dist/packages/overlays/src/dialog.d.ts +27 -0
- package/dist/packages/overlays/src/drawer.d.ts +33 -0
- package/dist/packages/overlays/src/index.d.ts +7 -0
- package/dist/packages/overlays/src/menu.d.ts +51 -0
- package/dist/packages/overlays/src/popover.d.ts +24 -0
- package/dist/packages/overlays/src/preview.d.ts +17 -0
- package/dist/packages/overlays/src/tooltip.d.ts +18 -0
- package/dist/pierre-diff-CZdzgiYm.js +66 -0
- package/dist/pierre-theme-BpESNIsV.js +96 -0
- package/dist/pierre-tree-qZVvI5c1.js +106 -0
- package/dist/plot-width--OgdohB5.js +18 -0
- package/dist/popup-styles-CvtZDE2t.js +135 -0
- package/dist/src-BfvOOeA3.js +272 -0
- package/dist/src-CbYaLvhD.js +671 -0
- package/dist/src-CfDf8TY8.js +466 -0
- package/dist/src-CvpS9XIR.js +1077 -0
- package/dist/style-composition-uYlczSsB.js +9 -0
- package/dist/theme.js +7 -0
- package/dist/tokens.js +138 -0
- package/package.json +148 -3
- package/packages/foundations/src/tokens.stylex.ts +145 -0
- package/styles.css +2 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StyleXStyles } from '@stylexjs/stylex';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
type PlacementProperties = Pick<CSSProperties, 'alignSelf' | 'flex' | 'flexGrow' | 'flexShrink' | 'gridArea' | 'gridColumn' | 'gridRow' | 'margin' | 'marginBlock' | 'marginInline' | 'marginBlockStart' | 'marginBlockEnd' | 'marginInlineStart' | 'marginInlineEnd' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'width' | 'maxWidth' | 'minWidth'>;
|
|
4
|
+
type ControlGeometry = Pick<CSSProperties, 'height' | 'minHeight' | 'maxHeight' | 'padding' | 'paddingBlock' | 'paddingInline' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'borderRadius' | 'justifyContent' | 'alignItems' | 'gap'>;
|
|
5
|
+
type DefinedProperties<Properties> = {
|
|
6
|
+
readonly [Key in keyof Properties]?: Exclude<Properties[Key], undefined>;
|
|
7
|
+
};
|
|
8
|
+
export type PlacementStyle = StyleXStyles<DefinedProperties<PlacementProperties>>;
|
|
9
|
+
export type ControlStyle = StyleXStyles<DefinedProperties<PlacementProperties & ControlGeometry>>;
|
|
10
|
+
type StyleProperties<State> = {
|
|
11
|
+
readonly className?: string | ((state: State) => string | undefined) | undefined;
|
|
12
|
+
readonly style?: CSSProperties | ((state: State) => CSSProperties | undefined) | undefined;
|
|
13
|
+
};
|
|
14
|
+
type CompiledStyles = {
|
|
15
|
+
readonly className?: string | undefined;
|
|
16
|
+
readonly style?: CSSProperties | undefined;
|
|
17
|
+
};
|
|
18
|
+
type MergeStylesInput<State> = StyleProperties<State> & {
|
|
19
|
+
readonly styles: CompiledStyles;
|
|
20
|
+
};
|
|
21
|
+
export declare function mergeStyles<State>({ className, style, styles }: MergeStylesInput<State>): StyleProperties<State>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const themeProps: {
|
|
2
|
+
readonly light: Readonly<{
|
|
3
|
+
className?: string;
|
|
4
|
+
'data-style-src'?: string;
|
|
5
|
+
style?: Readonly<{
|
|
6
|
+
[$$Key$$: string]: string | number;
|
|
7
|
+
}>;
|
|
8
|
+
}>;
|
|
9
|
+
readonly dark: Readonly<{
|
|
10
|
+
className?: string;
|
|
11
|
+
'data-style-src'?: string;
|
|
12
|
+
style?: Readonly<{
|
|
13
|
+
[$$Key$$: string]: string | number;
|
|
14
|
+
}>;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
export declare const colors: stylex.VarGroup<Readonly<{
|
|
3
|
+
canvas: string;
|
|
4
|
+
surface: string;
|
|
5
|
+
ink: string;
|
|
6
|
+
inkHover: string;
|
|
7
|
+
inverse: string;
|
|
8
|
+
muted: string;
|
|
9
|
+
faint: string;
|
|
10
|
+
line: string;
|
|
11
|
+
focus: string;
|
|
12
|
+
accent: string;
|
|
13
|
+
accentSoft: string;
|
|
14
|
+
warning: string;
|
|
15
|
+
warningSoft: string;
|
|
16
|
+
danger: string;
|
|
17
|
+
dangerHover: string;
|
|
18
|
+
dangerSoft: string;
|
|
19
|
+
overlay: string;
|
|
20
|
+
}>, symbol>;
|
|
21
|
+
export declare const darkColors: {
|
|
22
|
+
canvas: string;
|
|
23
|
+
surface: string;
|
|
24
|
+
ink: string;
|
|
25
|
+
inkHover: string;
|
|
26
|
+
inverse: string;
|
|
27
|
+
muted: string;
|
|
28
|
+
faint: string;
|
|
29
|
+
line: string;
|
|
30
|
+
focus: string;
|
|
31
|
+
accent: string;
|
|
32
|
+
accentSoft: string;
|
|
33
|
+
warning: string;
|
|
34
|
+
warningSoft: string;
|
|
35
|
+
danger: string;
|
|
36
|
+
dangerHover: string;
|
|
37
|
+
dangerSoft: string;
|
|
38
|
+
overlay: string;
|
|
39
|
+
};
|
|
40
|
+
export declare const chartColors: stylex.VarGroup<Readonly<{
|
|
41
|
+
series1: string;
|
|
42
|
+
series2: string;
|
|
43
|
+
series3: string;
|
|
44
|
+
series4: string;
|
|
45
|
+
series5: string;
|
|
46
|
+
series6: string;
|
|
47
|
+
negative: string;
|
|
48
|
+
positive: string;
|
|
49
|
+
missing: string;
|
|
50
|
+
}>, symbol>;
|
|
51
|
+
export declare const darkChartColors: {
|
|
52
|
+
series1: string;
|
|
53
|
+
series2: string;
|
|
54
|
+
series3: string;
|
|
55
|
+
series4: string;
|
|
56
|
+
series5: string;
|
|
57
|
+
series6: string;
|
|
58
|
+
negative: string;
|
|
59
|
+
positive: string;
|
|
60
|
+
missing: string;
|
|
61
|
+
};
|
|
62
|
+
export declare const syntaxColors: stylex.VarGroup<Readonly<{
|
|
63
|
+
keyword: string;
|
|
64
|
+
string: string;
|
|
65
|
+
comment: string;
|
|
66
|
+
number: string;
|
|
67
|
+
type: string;
|
|
68
|
+
}>, symbol>;
|
|
69
|
+
export declare const darkSyntaxColors: {
|
|
70
|
+
keyword: string;
|
|
71
|
+
string: string;
|
|
72
|
+
comment: string;
|
|
73
|
+
number: string;
|
|
74
|
+
type: string;
|
|
75
|
+
};
|
|
76
|
+
export declare const spacing: stylex.VarGroup<Readonly<{
|
|
77
|
+
xxs: string;
|
|
78
|
+
xs: string;
|
|
79
|
+
sm: string;
|
|
80
|
+
md: string;
|
|
81
|
+
lg: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
xxl: string;
|
|
84
|
+
}>, symbol>;
|
|
85
|
+
export declare const typography: stylex.VarGroup<Readonly<{
|
|
86
|
+
fontFamily: string;
|
|
87
|
+
monoFamily: string;
|
|
88
|
+
bodySize: string;
|
|
89
|
+
bodyLineHeight: string;
|
|
90
|
+
multilineLineHeight: string;
|
|
91
|
+
captionSize: string;
|
|
92
|
+
captionLineHeight: string;
|
|
93
|
+
inputSize: string;
|
|
94
|
+
touchInputSize: string;
|
|
95
|
+
sectionSize: string;
|
|
96
|
+
sectionLineHeight: string;
|
|
97
|
+
headingSize: string;
|
|
98
|
+
headingLineHeight: string;
|
|
99
|
+
compactHeadingSize: string;
|
|
100
|
+
compactHeadingLineHeight: string;
|
|
101
|
+
headingTracking: string;
|
|
102
|
+
}>, symbol>;
|
|
103
|
+
export declare const controls: stylex.VarGroup<Readonly<{
|
|
104
|
+
smHeight: string;
|
|
105
|
+
mdHeight: string;
|
|
106
|
+
coarseTarget: string;
|
|
107
|
+
iconSize: string;
|
|
108
|
+
paddingInline: string;
|
|
109
|
+
paddingBlock: string;
|
|
110
|
+
gap: string;
|
|
111
|
+
focusWidth: string;
|
|
112
|
+
disabledOpacity: string;
|
|
113
|
+
}>, symbol>;
|
|
114
|
+
export declare const radii: stylex.VarGroup<Readonly<{
|
|
115
|
+
sm: string;
|
|
116
|
+
md: string;
|
|
117
|
+
}>, symbol>;
|
|
118
|
+
export declare const motion: stylex.VarGroup<Readonly<{
|
|
119
|
+
duration: string;
|
|
120
|
+
easing: string;
|
|
121
|
+
drawerDuration: string;
|
|
122
|
+
drawerEasing: string;
|
|
123
|
+
}>, symbol>;
|
|
124
|
+
export declare const shadows: stylex.VarGroup<Readonly<{
|
|
125
|
+
popup: string;
|
|
126
|
+
}>, symbol>;
|
|
127
|
+
export declare const darkShadows: {
|
|
128
|
+
popup: string;
|
|
129
|
+
};
|
|
130
|
+
export declare const layers: {
|
|
131
|
+
backdrop: string;
|
|
132
|
+
dialog: string;
|
|
133
|
+
popup: string;
|
|
134
|
+
tooltip: string;
|
|
135
|
+
skipLink: string;
|
|
136
|
+
};
|
|
137
|
+
export declare const conditions: {
|
|
138
|
+
coarsePointer: string;
|
|
139
|
+
hoverPointer: string;
|
|
140
|
+
compactText: string;
|
|
141
|
+
compactTable: string;
|
|
142
|
+
reducedMotion: string;
|
|
143
|
+
};
|
|
@@ -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,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,6 @@
|
|
|
1
|
+
export { AppShell } from './app-shell.tsx';
|
|
2
|
+
export { DetailPage } from './detail-page.tsx';
|
|
3
|
+
export { PageToolbar, ToolbarAction } from './page-toolbar.tsx';
|
|
4
|
+
export type { ResizableRootProps, ResizablePaneProps, ResizableHandleProps } from './resizable.tsx';
|
|
5
|
+
export { Resizable } from './resizable.tsx';
|
|
6
|
+
export { Navigation, NavigationItem, NavigationLink, SidebarLabel, SidebarFooter } from './sidebar.tsx';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Button } from '../../core/src/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,27 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export type ResizableRootProps = {
|
|
3
|
+
readonly orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
readonly initialSizes?: Readonly<Record<string, number>>;
|
|
5
|
+
readonly onSizesChange?: (sizes: Readonly<Record<string, number>>) => void;
|
|
6
|
+
readonly disabled?: boolean;
|
|
7
|
+
} & Omit<ComponentProps<'div'>, 'onChange' | 'defaultValue'>;
|
|
8
|
+
export type ResizablePaneProps = {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly initialSizePercent?: number;
|
|
11
|
+
readonly minimumSizePercent?: number;
|
|
12
|
+
readonly maximumSizePercent?: number;
|
|
13
|
+
readonly collapsible?: boolean;
|
|
14
|
+
} & Omit<ComponentProps<'div'>, 'id' | 'onResize'>;
|
|
15
|
+
export type ResizableHandleProps = {
|
|
16
|
+
readonly 'aria-label': string;
|
|
17
|
+
readonly 'disabled'?: boolean;
|
|
18
|
+
} & Omit<ComponentProps<'div'>, 'children'>;
|
|
19
|
+
declare function ResizableRoot({ orientation, initialSizes, onSizesChange, disabled, ref, ...props }: ResizableRootProps): ReactNode;
|
|
20
|
+
declare function ResizablePane({ id, initialSizePercent, minimumSizePercent, maximumSizePercent, collapsible, ref, ...props }: ResizablePaneProps): ReactNode;
|
|
21
|
+
declare function ResizableHandle({ ref, ...props }: ResizableHandleProps): ReactNode;
|
|
22
|
+
export declare const Resizable: {
|
|
23
|
+
Root: typeof ResizableRoot;
|
|
24
|
+
Pane: typeof ResizablePane;
|
|
25
|
+
Handle: typeof ResizableHandle;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { Button } from '../../core/src/index.ts';
|
|
3
|
+
import { Drawer } from '../../overlays/src/index.ts';
|
|
4
|
+
type SidebarState = {
|
|
5
|
+
readonly isExpanded: boolean;
|
|
6
|
+
readonly sidebarId: string;
|
|
7
|
+
readonly drawerHandle: ReturnType<typeof Drawer.createHandle>;
|
|
8
|
+
readonly navigationToggleRef: RefObject<HTMLButtonElement | null>;
|
|
9
|
+
readonly onToggle: () => void;
|
|
10
|
+
readonly onNavigate: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const SidebarContext: import("react").Context<SidebarState | null>;
|
|
13
|
+
type SidebarProps = {
|
|
14
|
+
readonly header?: ReactNode;
|
|
15
|
+
readonly footer?: ReactNode;
|
|
16
|
+
readonly close?: ReactNode;
|
|
17
|
+
readonly children: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
type NavigationProps = {
|
|
20
|
+
readonly children: ReactNode;
|
|
21
|
+
readonly label?: string;
|
|
22
|
+
};
|
|
23
|
+
type NavigationItemProps = Omit<ComponentProps<typeof Button>, 'variant' | 'tone' | 'size' | 'xstyle'> & {
|
|
24
|
+
readonly icon?: ReactNode;
|
|
25
|
+
readonly selected?: boolean;
|
|
26
|
+
};
|
|
27
|
+
type NavigationLinkProps = ComponentProps<'a'> & {
|
|
28
|
+
readonly icon?: ReactNode;
|
|
29
|
+
readonly selected?: boolean;
|
|
30
|
+
};
|
|
31
|
+
type SidebarLabelProps = {
|
|
32
|
+
readonly children: ReactNode;
|
|
33
|
+
readonly grow?: boolean;
|
|
34
|
+
};
|
|
35
|
+
type SidebarFooterProps = {
|
|
36
|
+
readonly children: ReactNode;
|
|
37
|
+
};
|
|
38
|
+
export declare function Sidebar({ header, footer, close, children }: SidebarProps): ReactNode;
|
|
39
|
+
export declare function SidebarClose(): ReactNode;
|
|
40
|
+
export declare function Navigation({ children, label }: NavigationProps): ReactNode;
|
|
41
|
+
export declare function NavigationItem({ children, icon, selected, onClick, ...props }: NavigationItemProps): ReactNode;
|
|
42
|
+
export declare function NavigationLink({ children, icon, selected, onClick, className, style, ...props }: NavigationLinkProps): ReactNode;
|
|
43
|
+
export declare function SidebarLabel({ children, grow }: SidebarLabelProps): ReactNode;
|
|
44
|
+
export declare function SidebarFooter({ children }: SidebarFooterProps): ReactNode;
|
|
45
|
+
export declare function SidebarToggle(): ReactNode;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode, RefObject } from 'react';
|
|
2
|
+
export type CommandShortcut = {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly mod?: boolean;
|
|
5
|
+
readonly ctrl?: boolean;
|
|
6
|
+
readonly alt?: boolean;
|
|
7
|
+
readonly shift?: boolean;
|
|
8
|
+
readonly meta?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type CommandAction = {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly label: string;
|
|
13
|
+
readonly description?: string;
|
|
14
|
+
readonly shortcut?: CommandShortcut;
|
|
15
|
+
readonly disabled?: boolean;
|
|
16
|
+
readonly onSelect: () => void;
|
|
17
|
+
};
|
|
18
|
+
export type CommandShortcutsOptions = {
|
|
19
|
+
readonly commands: ReadonlyArray<CommandAction>;
|
|
20
|
+
readonly target: RefObject<HTMLElement | null> | HTMLElement | null;
|
|
21
|
+
readonly enabled: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare function useCommandShortcuts({ commands, target, enabled }: CommandShortcutsOptions): void;
|
|
24
|
+
export type ShortcutHintProps = {
|
|
25
|
+
readonly shortcut: CommandShortcut;
|
|
26
|
+
};
|
|
27
|
+
export declare function ShortcutHint({ shortcut }: ShortcutHintProps): ReactNode;
|
|
28
|
+
export type CommandPaletteProps = {
|
|
29
|
+
readonly open: boolean;
|
|
30
|
+
readonly onOpenChange: (open: boolean) => void;
|
|
31
|
+
readonly title: string;
|
|
32
|
+
readonly commands: ReadonlyArray<CommandAction>;
|
|
33
|
+
readonly trigger?: ReactElement;
|
|
34
|
+
readonly placeholder?: string;
|
|
35
|
+
readonly empty?: string;
|
|
36
|
+
};
|
|
37
|
+
export declare function CommandPalette({ open, onOpenChange, title, commands, trigger, placeholder, empty, }: CommandPaletteProps): ReactNode;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
type BreadcrumbRootProps = Omit<ComponentProps<'nav'>, 'aria-label'> & {
|
|
3
|
+
readonly 'aria-label': string;
|
|
4
|
+
};
|
|
5
|
+
type BreadcrumbListProps = ComponentProps<'ol'>;
|
|
6
|
+
type BreadcrumbItemProps = ComponentProps<'li'>;
|
|
7
|
+
type BreadcrumbCurrentProps = ComponentProps<'span'>;
|
|
8
|
+
type KbdProps = Omit<ComponentProps<'kbd'>, 'children'> & {
|
|
9
|
+
readonly children: string;
|
|
10
|
+
};
|
|
11
|
+
declare function BreadcrumbRoot(props: BreadcrumbRootProps): ReactNode;
|
|
12
|
+
declare function BreadcrumbList(props: BreadcrumbListProps): ReactNode;
|
|
13
|
+
declare function BreadcrumbItem(props: BreadcrumbItemProps): ReactNode;
|
|
14
|
+
declare function BreadcrumbCurrent(props: BreadcrumbCurrentProps): ReactNode;
|
|
15
|
+
declare function BreadcrumbSeparator(): ReactNode;
|
|
16
|
+
export declare function Kbd(props: KbdProps): ReactNode;
|
|
17
|
+
export declare const Breadcrumb: {
|
|
18
|
+
Root: typeof BreadcrumbRoot;
|
|
19
|
+
List: typeof BreadcrumbList;
|
|
20
|
+
Item: typeof BreadcrumbItem;
|
|
21
|
+
Current: typeof BreadcrumbCurrent;
|
|
22
|
+
Separator: typeof BreadcrumbSeparator;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Tabs as BaseTabs } from '@base-ui/react/tabs';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import type { ValueStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
|
+
type BaseTabsRootProps = ComponentProps<typeof BaseTabs.Root>;
|
|
5
|
+
type TabsRootProps = Omit<BaseTabsRootProps, 'value' | 'defaultValue' | 'onValueChange'> & ValueStateProperties<Exclude<BaseTabsRootProps['value'], undefined>, NonNullable<BaseTabsRootProps['onValueChange']>>;
|
|
6
|
+
type TabsListProps = ComponentProps<typeof BaseTabs.List>;
|
|
7
|
+
type TabsTabProps = ComponentProps<typeof BaseTabs.Tab>;
|
|
8
|
+
type TabsPanelProps = ComponentProps<typeof BaseTabs.Panel>;
|
|
9
|
+
declare function TabsRoot({ className, style, ...props }: TabsRootProps): ReactNode;
|
|
10
|
+
declare function TabsList({ className, style, ...props }: TabsListProps): ReactNode;
|
|
11
|
+
declare function TabsTab({ className, style, ...props }: TabsTabProps): ReactNode;
|
|
12
|
+
declare function TabsPanel({ className, style, ...props }: TabsPanelProps): ReactNode;
|
|
13
|
+
export declare const Tabs: {
|
|
14
|
+
Root: typeof TabsRoot;
|
|
15
|
+
List: typeof TabsList;
|
|
16
|
+
Tab: typeof TabsTab;
|
|
17
|
+
Panel: typeof TabsPanel;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { OpenStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
|
+
type AlertDialogRootProps<Payload> = Omit<BaseAlertDialog.Root.Props<Payload>, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BaseAlertDialog.Root.Props<Payload>['onOpenChange']>>;
|
|
5
|
+
declare function AlertDialogRoot<Payload = unknown>(props: AlertDialogRootProps<Payload>): ReactNode;
|
|
6
|
+
export declare const AlertDialog: {
|
|
7
|
+
Root: typeof AlertDialogRoot;
|
|
8
|
+
Trigger: BaseAlertDialog.Trigger;
|
|
9
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Backdrop: ({ className, style, ...props }: Omit<import("@base-ui/react").DialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>) => ReactNode;
|
|
11
|
+
Popup: ({ className, style, xstyle, ...props }: Omit<import("@base-ui/react").DialogPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
12
|
+
readonly xstyle?: import("../../foundations/src/style-composition.ts").PlacementStyle;
|
|
13
|
+
}) => ReactNode;
|
|
14
|
+
Title: ({ className, style, ...props }: Omit<import("@base-ui/react").DialogTitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>) => ReactNode;
|
|
15
|
+
Description: ({ className, style, ...props }: Omit<import("@base-ui/react").DialogDescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>) => ReactNode;
|
|
16
|
+
Close: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
};
|
|
18
|
+
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 '../../foundations/src/control-state.ts';
|
|
4
|
+
import type { PlacementStyle } from '../../foundations/src/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 '../../foundations/src/control-state.ts';
|
|
4
|
+
import type { PlacementStyle } from '../../foundations/src/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,7 @@
|
|
|
1
|
+
export { AlertDialog } from './alert-dialog.tsx';
|
|
2
|
+
export { Dialog } from './dialog.tsx';
|
|
3
|
+
export { Drawer } from './drawer.tsx';
|
|
4
|
+
export { Menu } from './menu.tsx';
|
|
5
|
+
export { Popover } from './popover.tsx';
|
|
6
|
+
export { Preview } from './preview.tsx';
|
|
7
|
+
export { Tooltip } from './tooltip.tsx';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Menu as BaseMenu } from '@base-ui/react/menu';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import type { OpenStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
|
+
type MenuRootProps<Payload> = Omit<BaseMenu.Root.Props<Payload>, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BaseMenu.Root.Props<Payload>['onOpenChange']>>;
|
|
5
|
+
type MenuPositionerProps = ComponentProps<typeof BaseMenu.Positioner>;
|
|
6
|
+
type MenuPopupProps = ComponentProps<typeof BaseMenu.Popup>;
|
|
7
|
+
type MenuItemProps = ComponentProps<typeof BaseMenu.Item>;
|
|
8
|
+
type MenuLinkItemProps = ComponentProps<typeof BaseMenu.LinkItem>;
|
|
9
|
+
type MenuGroupLabelProps = ComponentProps<typeof BaseMenu.GroupLabel>;
|
|
10
|
+
type MenuSeparatorProps = ComponentProps<typeof BaseMenu.Separator>;
|
|
11
|
+
type MenuCheckboxItemProps = Omit<ComponentProps<typeof BaseMenu.CheckboxItem>, 'checked' | 'defaultChecked' | 'onCheckedChange'> & {
|
|
12
|
+
readonly checked: boolean;
|
|
13
|
+
readonly onCheckedChange: NonNullable<BaseMenu.CheckboxItem.Props['onCheckedChange']>;
|
|
14
|
+
};
|
|
15
|
+
type MenuRadioGroupProps = Omit<ComponentProps<typeof BaseMenu.RadioGroup>, 'value' | 'defaultValue' | 'onValueChange'> & {
|
|
16
|
+
readonly value: string;
|
|
17
|
+
readonly onValueChange: NonNullable<BaseMenu.RadioGroup.Props['onValueChange']>;
|
|
18
|
+
};
|
|
19
|
+
type MenuRadioItemProps = ComponentProps<typeof BaseMenu.RadioItem>;
|
|
20
|
+
type MenuSubmenuTriggerProps = ComponentProps<typeof BaseMenu.SubmenuTrigger>;
|
|
21
|
+
type MenuSubmenuRootProps = Omit<BaseMenu.SubmenuRoot.Props, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BaseMenu.SubmenuRoot.Props['onOpenChange']>>;
|
|
22
|
+
declare function MenuRoot<Payload = unknown>(props: MenuRootProps<Payload>): ReactNode;
|
|
23
|
+
declare function MenuSubmenuRoot(props: MenuSubmenuRootProps): ReactNode;
|
|
24
|
+
declare function MenuPositioner({ className, style, sideOffset, ...props }: MenuPositionerProps): ReactNode;
|
|
25
|
+
declare function MenuPopup({ className, style, ...props }: MenuPopupProps): ReactNode;
|
|
26
|
+
declare function MenuItem({ className, style, ...props }: MenuItemProps): ReactNode;
|
|
27
|
+
declare function MenuLinkItem({ className, style, ...props }: MenuLinkItemProps): ReactNode;
|
|
28
|
+
declare function MenuGroupLabel({ className, style, ...props }: MenuGroupLabelProps): ReactNode;
|
|
29
|
+
declare function MenuSeparator({ className, style, ...props }: MenuSeparatorProps): ReactNode;
|
|
30
|
+
declare function MenuCheckboxItem({ className, style, children, ...props }: MenuCheckboxItemProps): ReactNode;
|
|
31
|
+
declare function MenuRadioGroup(props: MenuRadioGroupProps): ReactNode;
|
|
32
|
+
declare function MenuRadioItem({ className, style, children, ...props }: MenuRadioItemProps): ReactNode;
|
|
33
|
+
declare function MenuSubmenuTrigger({ className, style, ...props }: MenuSubmenuTriggerProps): ReactNode;
|
|
34
|
+
export declare const Menu: {
|
|
35
|
+
Root: typeof MenuRoot;
|
|
36
|
+
Trigger: BaseMenu.Trigger;
|
|
37
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
38
|
+
Positioner: typeof MenuPositioner;
|
|
39
|
+
Popup: typeof MenuPopup;
|
|
40
|
+
Item: typeof MenuItem;
|
|
41
|
+
LinkItem: typeof MenuLinkItem;
|
|
42
|
+
Group: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
|
+
GroupLabel: typeof MenuGroupLabel;
|
|
44
|
+
Separator: typeof MenuSeparator;
|
|
45
|
+
CheckboxItem: typeof MenuCheckboxItem;
|
|
46
|
+
RadioGroup: typeof MenuRadioGroup;
|
|
47
|
+
RadioItem: typeof MenuRadioItem;
|
|
48
|
+
SubmenuRoot: typeof MenuSubmenuRoot;
|
|
49
|
+
SubmenuTrigger: typeof MenuSubmenuTrigger;
|
|
50
|
+
};
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Popover as BasePopover } from '@base-ui/react/popover';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import type { OpenStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
|
+
type PopoverRootProps<Payload> = Omit<BasePopover.Root.Props<Payload>, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BasePopover.Root.Props<Payload>['onOpenChange']>>;
|
|
5
|
+
type PopoverPositionerProps = ComponentProps<typeof BasePopover.Positioner>;
|
|
6
|
+
type PopoverPopupProps = ComponentProps<typeof BasePopover.Popup>;
|
|
7
|
+
type PopoverTitleProps = ComponentProps<typeof BasePopover.Title>;
|
|
8
|
+
type PopoverDescriptionProps = ComponentProps<typeof BasePopover.Description>;
|
|
9
|
+
declare function PopoverRoot<Payload = unknown>(props: PopoverRootProps<Payload>): ReactNode;
|
|
10
|
+
declare function PopoverPositioner({ className, style, sideOffset, ...props }: PopoverPositionerProps): ReactNode;
|
|
11
|
+
declare function PopoverPopup({ className, style, ...props }: PopoverPopupProps): ReactNode;
|
|
12
|
+
declare function PopoverTitle({ className, style, ...props }: PopoverTitleProps): ReactNode;
|
|
13
|
+
declare function PopoverDescription({ className, style, ...props }: PopoverDescriptionProps): ReactNode;
|
|
14
|
+
export declare const Popover: {
|
|
15
|
+
Root: typeof PopoverRoot;
|
|
16
|
+
Trigger: BasePopover.Trigger;
|
|
17
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Positioner: typeof PopoverPositioner;
|
|
19
|
+
Popup: typeof PopoverPopup;
|
|
20
|
+
Title: typeof PopoverTitle;
|
|
21
|
+
Description: typeof PopoverDescription;
|
|
22
|
+
Close: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PreviewCard as BasePreview } from '@base-ui/react/preview-card';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import type { OpenStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
|
+
type PreviewRootProps<Payload> = Omit<BasePreview.Root.Props<Payload>, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BasePreview.Root.Props<Payload>['onOpenChange']>>;
|
|
5
|
+
type PreviewPositionerProps = ComponentProps<typeof BasePreview.Positioner>;
|
|
6
|
+
type PreviewPopupProps = ComponentProps<typeof BasePreview.Popup>;
|
|
7
|
+
declare function PreviewRoot<Payload = unknown>(props: PreviewRootProps<Payload>): ReactNode;
|
|
8
|
+
declare function PreviewPositioner({ className, style, sideOffset, ...props }: PreviewPositionerProps): ReactNode;
|
|
9
|
+
declare function PreviewPopup({ className, style, ...props }: PreviewPopupProps): ReactNode;
|
|
10
|
+
export declare const Preview: {
|
|
11
|
+
Root: typeof PreviewRoot;
|
|
12
|
+
Trigger: BasePreview.Trigger;
|
|
13
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PreviewCardPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Positioner: typeof PreviewPositioner;
|
|
15
|
+
Popup: typeof PreviewPopup;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import type { OpenStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
|
+
type TooltipRootProps<Payload> = Omit<BaseTooltip.Root.Props<Payload>, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BaseTooltip.Root.Props<Payload>['onOpenChange']>>;
|
|
5
|
+
type TooltipPositionerProps = ComponentProps<typeof BaseTooltip.Positioner>;
|
|
6
|
+
type TooltipPopupProps = ComponentProps<typeof BaseTooltip.Popup>;
|
|
7
|
+
declare function TooltipRoot<Payload = unknown>(props: TooltipRootProps<Payload>): ReactNode;
|
|
8
|
+
declare function TooltipPositioner({ className, style, sideOffset, ...props }: TooltipPositionerProps): ReactNode;
|
|
9
|
+
declare function TooltipPopup({ className, style, ...props }: TooltipPopupProps): ReactNode;
|
|
10
|
+
export declare const Tooltip: {
|
|
11
|
+
Provider: import("react").FC<import("@base-ui/react").TooltipProviderProps>;
|
|
12
|
+
Root: typeof TooltipRoot;
|
|
13
|
+
Trigger: BaseTooltip.Trigger;
|
|
14
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Positioner: typeof TooltipPositioner;
|
|
16
|
+
Popup: typeof TooltipPopup;
|
|
17
|
+
};
|
|
18
|
+
export {};
|