@bixlab/mtone 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Xingjian Xu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,45 @@
1
- # Temporary Holding Version
1
+ # mtone
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Compact, ready-styled React components for knowledge and content applications. Base UI supplies interaction primitives; mtone supplies a cohesive warm-neutral visual system and high-level APIs. Tailwind builds the distributed CSS. Lucide supplies icons.
4
+
5
+ ## Install @bixlab/mtone
6
+
7
+ ```bash
8
+ npm install @bixlab/mtone
9
+ ```
10
+
11
+ ```tsx
12
+ import { MtoneProvider, Button, Select } from '@bixlab/mtone';
13
+ import '@bixlab/mtone/styles.css';
14
+
15
+ export function App() {
16
+ return <MtoneProvider locale="zh" density="compact">
17
+ <Button variant="solid">新建</Button>
18
+ <Select label="知识库" options={[{value:'notes',label:'研究笔记'}]} />
19
+ </MtoneProvider>;
20
+ }
21
+ ```
22
+
23
+ One package, no component-copy CLI, no Tailwind setup in the consuming application. React/ReactDOM ^19.2.0 are peer dependencies. ESM only. The install command above uses published npm releases. To try an unreleased checkout, build and pack it locally with `npm ci`, `npm run build -w @bixlab/mtone`, and `npm pack -w @bixlab/mtone`, then install the generated `.tgz` in your application.
24
+
25
+ ## Develop
26
+
27
+ ```bash
28
+ npm ci
29
+ npm run build
30
+ npm run dev
31
+ npm test
32
+ npm run typecheck
33
+ ```
34
+
35
+ Node 24 recommended. The documentation app lives in `apps/docs`; its static build is `dist/docs`. It consumes the precompiled library stylesheet, so run build after editing library CSS. Components are in `packages/mtone/src`.
36
+
37
+ ## Scope
38
+
39
+ Buttons, forms, selection controls, navigation, directory tree, tabs, menus, lists, table, status and property displays, dialogs/drawers, feedback and upload. No block editor or backend. See [API](https://github.com/xingjianxu/mtone/blob/master/docs/API.md), [coverage](https://github.com/xingjianxu/mtone/blob/master/docs/COVERAGE.md) and [verification](https://github.com/xingjianxu/mtone/blob/master/docs/VERIFICATION.md).
40
+
41
+ Default style: text #37352F, muted #787774, border #E9E9E7, subtle surface #F7F7F5, white canvas, 14px text, 28px controls, 4px radius. CSS is precompiled, prefixed and contains no Tailwind Preflight. Dark theme is not included.
42
+
43
+ ## License
44
+
45
+ MIT © 2026 Xingjian Xu. See [LICENSE](LICENSE).
@@ -0,0 +1,457 @@
1
+ import * as _base_ui_react from '@base-ui/react';
2
+ import * as React from 'react';
3
+ import React__default from 'react';
4
+ import { Button as Button$1 } from '@base-ui/react/button';
5
+ import { ToastManagerAddOptions, ToastManagerUpdateOptions, ToastObject } from '@base-ui/react/toast';
6
+
7
+ declare const cn: (...v: (string | false | null | undefined)[]) => string;
8
+ type Locale = "zh" | "en";
9
+ type Tokens = React.CSSProperties & Record<`--mt-${string}`, string | number>;
10
+ type Context = {
11
+ locale: Locale;
12
+ density: "compact" | "comfortable";
13
+ tokens?: Tokens;
14
+ };
15
+ declare const useMtone: () => Context;
16
+ declare function MtoneScope({ children, className, style, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
17
+ declare function MtoneProvider({ children, locale, density, tokens, }: Partial<Context> & {
18
+ children: React.ReactNode;
19
+ }): React.JSX.Element;
20
+ type ButtonProps = Omit<React.ComponentPropsWithoutRef<typeof Button$1>, "className"> & {
21
+ className?: string;
22
+ variant?: "blue" | "solid" | "outline" | "soft" | "ghost";
23
+ size?: "sm" | "md" | "lg";
24
+ danger?: boolean;
25
+ loading?: boolean;
26
+ icon?: React.ReactNode;
27
+ };
28
+ declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.ButtonProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "className"> & {
29
+ className?: string;
30
+ variant?: "blue" | "solid" | "outline" | "soft" | "ghost";
31
+ size?: "sm" | "md" | "lg";
32
+ danger?: boolean;
33
+ loading?: boolean;
34
+ icon?: React.ReactNode;
35
+ } & React.RefAttributes<HTMLButtonElement>>;
36
+ declare const IconButton: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.ButtonProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "className"> & {
37
+ className?: string;
38
+ variant?: "blue" | "solid" | "outline" | "soft" | "ghost";
39
+ size?: "sm" | "md" | "lg";
40
+ danger?: boolean;
41
+ loading?: boolean;
42
+ icon?: React.ReactNode;
43
+ } & {
44
+ "aria-label": string;
45
+ } & React.RefAttributes<HTMLButtonElement>>;
46
+ declare const ButtonGroup: ({ className, ...p }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
47
+ declare const Input: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
48
+ declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>>;
49
+ declare const SearchInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
50
+ declare function FormField({ label, error, description, required, children, }: {
51
+ label: React.ReactNode;
52
+ error?: React.ReactNode;
53
+ description?: React.ReactNode;
54
+ required?: boolean;
55
+ children: React.ReactElement;
56
+ }): React.JSX.Element;
57
+ declare const Form: ({ className, ...p }: React.FormHTMLAttributes<HTMLFormElement>) => React.JSX.Element;
58
+ type Tone = "neutral" | "blue" | "green" | "orange" | "red" | "purple";
59
+ declare function Tag({ children, tone, onRemove, className, ...p }: React.HTMLAttributes<HTMLSpanElement> & {
60
+ tone?: Tone;
61
+ onRemove?: () => void;
62
+ }): React.JSX.Element;
63
+ declare const Badge: typeof Tag;
64
+ declare const Status: ({ children, tone, }: {
65
+ children: React.ReactNode;
66
+ tone?: Tone;
67
+ }) => React.JSX.Element;
68
+ declare function Avatar({ src, name, size, }: {
69
+ src?: string;
70
+ name?: string;
71
+ size?: number;
72
+ }): React.JSX.Element;
73
+ declare function AvatarGroup({ items, max, }: {
74
+ items: {
75
+ name: string;
76
+ src?: string;
77
+ }[];
78
+ max?: number;
79
+ }): React.JSX.Element;
80
+ declare function Progress({ value, label }: {
81
+ value: number;
82
+ label?: string;
83
+ }): React.JSX.Element;
84
+ declare const Text: ({ muted, className, ...p }: React.HTMLAttributes<HTMLSpanElement> & {
85
+ muted?: boolean;
86
+ }) => React.JSX.Element;
87
+ declare const Divider: () => React.JSX.Element;
88
+ declare const Card: ({ className, ...p }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
89
+ declare const List: ({ className, ...p }: React.HTMLAttributes<HTMLUListElement>) => React.JSX.Element;
90
+ declare function ListItem({ children, icon, description, actions, ...p }: React.LiHTMLAttributes<HTMLLIElement> & {
91
+ icon?: React.ReactNode;
92
+ description?: React.ReactNode;
93
+ actions?: React.ReactNode;
94
+ }): React.JSX.Element;
95
+ type DocumentItem = {
96
+ id: string;
97
+ title: string;
98
+ description?: string;
99
+ updatedAt?: string;
100
+ icon?: React.ReactNode;
101
+ onClick?: () => void;
102
+ };
103
+ declare function DocumentList({ items }: {
104
+ items: DocumentItem[];
105
+ }): React.JSX.Element;
106
+ declare function DocumentCard({ title, description, icon, updatedAt, onClick, }: DocumentItem): React.JSX.Element;
107
+ declare const PropertyList: ({ children }: {
108
+ children: React.ReactNode;
109
+ }) => React.JSX.Element;
110
+ declare const PropertyItem: ({ label, children, }: {
111
+ label: React.ReactNode;
112
+ children: React.ReactNode;
113
+ }) => React.JSX.Element;
114
+ declare function Alert({ tone, title, children, onClose, }: {
115
+ tone?: "info" | "success" | "warning" | "error";
116
+ title?: React.ReactNode;
117
+ children?: React.ReactNode;
118
+ onClose?: () => void;
119
+ }): React.JSX.Element;
120
+ declare function Empty({ title, description, action, }: {
121
+ title?: React.ReactNode;
122
+ description?: React.ReactNode;
123
+ action?: React.ReactNode;
124
+ }): React.JSX.Element;
125
+ declare const Skeleton: ({ className, ...p }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
126
+ declare function Spinner({ label }: {
127
+ label?: string;
128
+ }): React.JSX.Element;
129
+
130
+ type SidebarProps = React.HTMLAttributes<HTMLElement> & {
131
+ header?: React.ReactNode | ((collapsed: boolean) => React.ReactNode);
132
+ footer?: React.ReactNode | ((collapsed: boolean) => React.ReactNode);
133
+ collapsePlacement?: "header" | "footer";
134
+ collapsible?: boolean;
135
+ collapsed?: boolean;
136
+ defaultCollapsed?: boolean;
137
+ onCollapsedChange?: (collapsed: boolean) => void;
138
+ collapseLabel?: string;
139
+ expandLabel?: string;
140
+ };
141
+ declare function Sidebar({ className, children, header, footer, collapsePlacement, collapsible, collapsed, defaultCollapsed, onCollapsedChange, collapseLabel, expandLabel, ...p }: SidebarProps): React.JSX.Element;
142
+ declare const NavItem: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
143
+ active?: boolean;
144
+ icon?: React.ReactNode;
145
+ } & React.RefAttributes<HTMLButtonElement>>;
146
+ declare function NavGroup({ label, children, }: {
147
+ label?: React.ReactNode;
148
+ children: React.ReactNode;
149
+ }): React.JSX.Element;
150
+ declare function Breadcrumb({ items, "aria-label": label, }: {
151
+ items: {
152
+ label: React.ReactNode;
153
+ href?: string;
154
+ }[];
155
+ "aria-label"?: string;
156
+ }): React.JSX.Element;
157
+ declare function FilterChip({ children, onRemove, }: {
158
+ children: React.ReactNode;
159
+ onRemove: () => void;
160
+ }): React.JSX.Element;
161
+ declare const FilterBar: ({ className, ...p }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
162
+
163
+ type ToastPosition = "top-right" | "bottom-right" | "top-left" | "bottom-left" | "top-center" | "bottom-center" | "center" | "center-top";
164
+ type ToastType = "success" | "error" | "info" | "loading";
165
+ type Presentation = {
166
+ position?: ToastPosition;
167
+ children?: React.ReactNode;
168
+ };
169
+ type InternalData<Data extends object> = Data & {
170
+ __mtoneToast?: Presentation;
171
+ };
172
+ type ToastOptions<Data extends object = Record<string, unknown>> = ToastManagerAddOptions<Data> & Presentation & {
173
+ body?: React.ReactNode;
174
+ };
175
+ type ToastUpdateOptions<Data extends object = Record<string, unknown>> = ToastManagerUpdateOptions<Data> & Presentation & {
176
+ body?: React.ReactNode;
177
+ };
178
+ type ToastPromiseOptions<Value, Data extends object = Record<string, unknown>> = {
179
+ loading: string | ToastUpdateOptions<Data>;
180
+ success: string | ToastUpdateOptions<Data> | ((value: Value) => string | ToastUpdateOptions<Data>);
181
+ error: string | ToastUpdateOptions<Data> | ((error: unknown) => string | ToastUpdateOptions<Data>);
182
+ };
183
+ /** Compatible with the Base UI manager, with styled shortcuts and body/position options. */
184
+ declare function useToast<Data extends object = any>(): {
185
+ add: <T extends Data = Data>(options: ToastOptions<T>) => string;
186
+ update: <T extends Data = Data>(id: string, options: ToastUpdateOptions<T> | ((previous: ToastObject<T>) => ToastUpdateOptions<T>)) => void;
187
+ promise: <Value, T extends Data = Data>(value: Promise<Value>, options: ToastPromiseOptions<Value, T>) => Promise<Value>;
188
+ success: (options: ToastOptions<Data>) => string;
189
+ error: (options: ToastOptions<Data>) => string;
190
+ info: (options: ToastOptions<Data>) => string;
191
+ toasts: ToastObject<InternalData<Data>>[];
192
+ close: (toastId?: string) => void;
193
+ };
194
+ type ToastProviderProps = {
195
+ children: React.ReactNode;
196
+ timeout?: number;
197
+ limit?: number;
198
+ position?: ToastPosition;
199
+ };
200
+ declare function ToastProvider({ children, timeout, limit, position, }: ToastProviderProps): React.JSX.Element;
201
+ declare const Toast: typeof ToastProvider;
202
+
203
+ interface Option {
204
+ value: string;
205
+ label: React__default.ReactNode;
206
+ disabled?: boolean;
207
+ }
208
+ interface Common {
209
+ className?: string;
210
+ disabled?: boolean;
211
+ name?: string;
212
+ label?: string;
213
+ }
214
+ interface ValueProps<T> {
215
+ value?: T;
216
+ defaultValue?: T;
217
+ onValueChange?: (value: T) => void;
218
+ }
219
+ interface OpenProps {
220
+ open?: boolean;
221
+ defaultOpen?: boolean;
222
+ onOpenChange?: (open: boolean) => void;
223
+ }
224
+ interface CheckboxProps extends Common {
225
+ checked?: boolean;
226
+ defaultChecked?: boolean;
227
+ onCheckedChange?: (checked: boolean) => void;
228
+ indeterminate?: boolean;
229
+ children?: React__default.ReactNode;
230
+ }
231
+ declare function Checkbox({ label, children, className, ...props }: CheckboxProps): React__default.JSX.Element;
232
+ declare function Switch({ label, children, className, ...props }: Omit<CheckboxProps, "indeterminate">): React__default.JSX.Element;
233
+ interface RadioGroupProps extends Common, ValueProps<string> {
234
+ options: Option[];
235
+ orientation?: "horizontal" | "vertical";
236
+ }
237
+ declare function RadioGroup({ options, label, className, orientation, ...props }: RadioGroupProps): React__default.JSX.Element;
238
+ interface SelectProps extends Common, ValueProps<string | null>, OpenProps {
239
+ options: Option[];
240
+ placeholder?: string;
241
+ }
242
+ declare function Select({ options, label, placeholder, className, ...props }: SelectProps): React__default.JSX.Element;
243
+ interface MultiSelectProps extends Common, ValueProps<string[]>, OpenProps {
244
+ options: Option[];
245
+ placeholder?: string;
246
+ }
247
+ declare function MultiSelect({ options, label, placeholder, className, ...props }: MultiSelectProps): React__default.JSX.Element;
248
+ interface SliderProps extends Common, ValueProps<number> {
249
+ min?: number;
250
+ max?: number;
251
+ step?: number;
252
+ }
253
+ declare function Slider({ label, className, ...props }: SliderProps): React__default.JSX.Element;
254
+ interface NumberInputProps extends Common, Omit<ValueProps<number | null>, "defaultValue"> {
255
+ defaultValue?: number;
256
+ min?: number;
257
+ max?: number;
258
+ step?: number;
259
+ }
260
+ declare function NumberInput({ label, className, ...props }: NumberInputProps): React__default.JSX.Element;
261
+ interface TabItem extends Option {
262
+ content: React__default.ReactNode;
263
+ }
264
+ interface TabsProps extends ValueProps<string> {
265
+ items: TabItem[];
266
+ className?: string;
267
+ }
268
+ declare function Tabs({ items, className, onValueChange, defaultValue, ...props }: TabsProps): React__default.JSX.Element;
269
+ declare function Segmented({ options, label, className, ...props }: RadioGroupProps): React__default.JSX.Element;
270
+ interface MenuItem {
271
+ icon?: React__default.ReactNode;
272
+ key: string;
273
+ label: React__default.ReactNode;
274
+ disabled?: boolean;
275
+ danger?: boolean;
276
+ shortcut?: string;
277
+ onSelect?: () => void;
278
+ }
279
+ interface DropdownMenuProps extends OpenProps {
280
+ trigger: React__default.ReactElement;
281
+ items: MenuItem[];
282
+ onSelect?: (key: string) => void;
283
+ }
284
+ declare function DropdownMenu({ trigger, items, onSelect, ...props }: DropdownMenuProps): React__default.JSX.Element;
285
+ declare function ContextMenu({ children, items, onSelect, ...props }: Omit<DropdownMenuProps, "trigger"> & {
286
+ children: React__default.ReactNode;
287
+ }): React__default.JSX.Element;
288
+ interface PopoverProps extends OpenProps {
289
+ trigger: React__default.ReactElement;
290
+ content: React__default.ReactNode;
291
+ title?: React__default.ReactNode;
292
+ side?: "top" | "bottom" | "left" | "right";
293
+ }
294
+ declare function Popover({ trigger, content, title, side, ...props }: PopoverProps): React__default.JSX.Element;
295
+ declare function Tooltip({ children, content, side, ...props }: Omit<PopoverProps, "trigger" | "title"> & {
296
+ children: React__default.ReactElement;
297
+ }): React__default.JSX.Element;
298
+ interface ModalProps extends OpenProps {
299
+ title: React__default.ReactNode;
300
+ description?: React__default.ReactNode;
301
+ children?: React__default.ReactNode;
302
+ footer?: React__default.ReactNode;
303
+ trigger?: React__default.ReactElement;
304
+ className?: string;
305
+ }
306
+ declare function Modal({ title, description, children, footer, trigger, className, ...props }: ModalProps): React__default.JSX.Element;
307
+ interface ConfirmDialogProps extends ModalProps {
308
+ onConfirm?: () => void | Promise<void>;
309
+ confirmText?: string;
310
+ cancelText?: string;
311
+ danger?: boolean;
312
+ }
313
+ declare function ConfirmDialog({ title, description, children, trigger, confirmText, cancelText, onConfirm, danger, open, defaultOpen, onOpenChange, }: ConfirmDialogProps): React__default.JSX.Element;
314
+ declare function Drawer({ title, description, children, footer, trigger, className, ...props }: ModalProps): React__default.JSX.Element;
315
+
316
+ type PaginationProps = {
317
+ total: number;
318
+ pageSize?: number;
319
+ page: number;
320
+ onPageChange: (page: number) => void;
321
+ className?: string;
322
+ };
323
+ declare function Pagination({ total, pageSize, page, onPageChange, className, }: PaginationProps): React.JSX.Element;
324
+ type TableColumn<T> = {
325
+ key: string;
326
+ title: React.ReactNode;
327
+ dataIndex?: keyof T;
328
+ render?: (value: unknown, row: T, index: number) => React.ReactNode;
329
+ sortable?: boolean;
330
+ filterable?: boolean;
331
+ };
332
+ type TableState = {
333
+ sort?: {
334
+ key: string;
335
+ direction: "asc" | "desc";
336
+ } | null;
337
+ filters: Record<string, string>;
338
+ page: number;
339
+ pageSize: number;
340
+ };
341
+ /** Set sort to null to explicitly clear controlled sorting; omit sort for internal sorting. Row-key values retain their original type. */
342
+ type TableProps<T> = {
343
+ data: T[];
344
+ columns: TableColumn<T>[];
345
+ rowKey: keyof T | ((row: T) => React.Key);
346
+ manual?: boolean;
347
+ loading?: boolean;
348
+ onChange?: (state: TableState) => void;
349
+ sort?: TableState["sort"];
350
+ filters?: Record<string, string>;
351
+ selectable?: boolean;
352
+ selectedKeys?: React.Key[];
353
+ onSelectionChange?: (keys: React.Key[]) => void;
354
+ pagination?: false | {
355
+ pageSize?: number;
356
+ page?: number;
357
+ total?: number;
358
+ onPageChange?: (page: number) => void;
359
+ };
360
+ empty?: React.ReactNode;
361
+ className?: string;
362
+ };
363
+ declare function Table<T>({ data, columns, rowKey, manual, loading, onChange, sort: controlledSort, filters: controlledFilters, selectable, selectedKeys, onSelectionChange, pagination, empty, className, }: TableProps<T>): React.JSX.Element;
364
+ type TreeItem = {
365
+ id: string;
366
+ label: React.ReactNode;
367
+ children?: TreeItem[];
368
+ disabled?: boolean;
369
+ icon?: React.ReactNode;
370
+ };
371
+ type TreeProps = {
372
+ items: TreeItem[];
373
+ value?: string;
374
+ defaultValue?: string;
375
+ onValueChange?: (value: string) => void;
376
+ expanded?: string[];
377
+ defaultExpanded?: string[];
378
+ onExpandedChange?: (ids: string[]) => void;
379
+ label?: string;
380
+ className?: string;
381
+ };
382
+ declare function Tree({ items, value, defaultValue, onValueChange, expanded, defaultExpanded, onExpandedChange, label, className, }: TreeProps): React.JSX.Element;
383
+ type DatePickerProps = {
384
+ value?: string;
385
+ defaultValue?: string;
386
+ onValueChange?: (value: string) => void;
387
+ min?: string;
388
+ max?: string;
389
+ disabledDate?: (date: string) => boolean;
390
+ disabled?: boolean;
391
+ label?: string;
392
+ clearable?: boolean;
393
+ className?: string;
394
+ name?: string;
395
+ };
396
+ /** Native single-date calendar. Calendar presentation/keyboard follow the browser; custom disabledDate is enforced on selection rather than drawn in the native calendar. Values are ISO YYYY-MM-DD. */
397
+ declare function DatePicker({ value, defaultValue, onValueChange, min, max, disabledDate, disabled, label, clearable, className, name, }: DatePickerProps): React.JSX.Element;
398
+ type UploadContext = {
399
+ signal: AbortSignal;
400
+ onProgress: (percent: number) => void;
401
+ };
402
+ type UploadAdapter = (file: File, context: UploadContext) => Promise<unknown>;
403
+ type UploadFile = {
404
+ id: string;
405
+ file: File;
406
+ status: "uploading" | "success" | "error" | "cancelled";
407
+ progress: number;
408
+ error?: string;
409
+ validationError?: "type" | "size";
410
+ };
411
+ type UploadProps = {
412
+ upload: UploadAdapter;
413
+ accept?: string;
414
+ maxSize?: number;
415
+ multiple?: boolean;
416
+ disabled?: boolean;
417
+ onChange?: (files: UploadFile[]) => void;
418
+ className?: string;
419
+ children?: React.ReactNode;
420
+ };
421
+ declare function Upload({ upload, accept, maxSize, multiple, disabled, onChange, className, children, }: UploadProps): React.JSX.Element;
422
+ declare const Dropzone: typeof Upload;
423
+
424
+ type LayoutProps = React.HTMLAttributes<HTMLDivElement> & {
425
+ hasSider?: boolean;
426
+ fullHeight?: boolean;
427
+ };
428
+ type LayoutSiderProps = Omit<SidebarProps, "header" | "footer" | "collapsePlacement"> & {
429
+ logo?: React.ReactNode;
430
+ version?: React.ReactNode;
431
+ collapsedLogo?: React.ReactNode;
432
+ width?: number;
433
+ collapsedWidth?: number;
434
+ breakpoint?: number;
435
+ onBreakpoint?: (broken: boolean) => void;
436
+ };
437
+ declare function LayoutSider({ logo, version, collapsedLogo, width, collapsedWidth, breakpoint, onBreakpoint, collapsed, defaultCollapsed, onCollapsedChange, collapsible, className, style, ...props }: LayoutSiderProps): React.JSX.Element;
438
+ type LayoutHeaderProps = React.HTMLAttributes<HTMLElement> & {
439
+ breadcrumb?: React.ReactNode;
440
+ extra?: React.ReactNode;
441
+ };
442
+ declare function LayoutHeader({ breadcrumb, extra, children, className, ...props }: LayoutHeaderProps): React.JSX.Element;
443
+ type LayoutContentProps = React.HTMLAttributes<HTMLElement> & {
444
+ as?: "main" | "section" | "div";
445
+ };
446
+ declare function LayoutContent({ as: Element, className, ...props }: LayoutContentProps): React.JSX.Element;
447
+ declare function LayoutFooter({ className, ...props }: React.HTMLAttributes<HTMLElement>): React.JSX.Element;
448
+ declare function LayoutRoot({ hasSider, fullHeight, className, children, ...props }: LayoutProps): React.JSX.Element;
449
+ /** Compose nested layouts with the familiar Layout.Sider/Header/Content/Footer API. */
450
+ declare const Layout: typeof LayoutRoot & {
451
+ Sider: typeof LayoutSider;
452
+ Header: typeof LayoutHeader;
453
+ Content: typeof LayoutContent;
454
+ Footer: typeof LayoutFooter;
455
+ };
456
+
457
+ export { Alert, Avatar, AvatarGroup, Badge, Breadcrumb, Button, ButtonGroup, type ButtonProps, Card, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, DatePicker, type DatePickerProps, Divider, DocumentCard, type DocumentItem, DocumentList, Drawer, DropdownMenu, type DropdownMenuProps, Dropzone, Empty, FilterBar, FilterChip, Form, FormField, IconButton, Input, Layout, type LayoutContentProps, type LayoutHeaderProps, type LayoutProps, type LayoutSiderProps, List, ListItem, type Locale, type MenuItem, Modal, type ModalProps, MtoneProvider, MtoneScope, MultiSelect, type MultiSelectProps, NavGroup, NavItem, NumberInput, type NumberInputProps, type OpenProps, type Option, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, PropertyItem, PropertyList, RadioGroup, type RadioGroupProps, SearchInput, Segmented, Select, type SelectProps, Sidebar, type SidebarProps, Skeleton, Slider, type SliderProps, Spinner, Status, Switch, type TabItem, Table, type TableColumn, type TableProps, type TableState, Tabs, type TabsProps, Tag, Text, Textarea, Toast, type ToastOptions, type ToastPosition, type ToastPromiseOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToastUpdateOptions, type Tokens, type Tone, Tooltip, Tree, type TreeItem, type TreeProps, Upload, type UploadAdapter, type UploadContext, type UploadFile, type UploadProps, cn, useMtone, useToast };