@skygraph/react 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -70
- package/dist/{Table-BmesoMje.d.ts → Table-CAay8MmA.d.ts} +8 -1
- package/dist/{Table-CpKMOH2x.d.cts → Table-CMKo6Pc3.d.cts} +8 -1
- package/dist/{chunk-ZJF6SJLP.js → chunk-45YW5VSP.js} +44 -10
- package/dist/chunk-45YW5VSP.js.map +1 -0
- package/dist/{chunk-Z5UGF7EO.js → chunk-EFDB2ENB.js} +87 -25
- package/dist/chunk-EFDB2ENB.js.map +1 -0
- package/dist/{chunk-UO6VJC3C.js → chunk-KGFFQGCM.js} +3 -3
- package/dist/{chunk-NXB3VAVF.js → chunk-P4J4PFBG.js} +54 -7
- package/dist/chunk-P4J4PFBG.js.map +1 -0
- package/dist/{chunk-FSV73JI4.js → chunk-PEX2UTNG.js} +2 -2
- package/dist/chunk-VLRLCHEL.js +184 -0
- package/dist/chunk-VLRLCHEL.js.map +1 -0
- package/dist/{chunk-MLEBVELO.js → chunk-YTPUWPWA.js} +51 -46
- package/dist/chunk-YTPUWPWA.js.map +1 -0
- package/dist/{chunk-GJDDPZH7.js → chunk-ZJC2QUWA.js} +12 -12
- package/dist/chunk-ZJC2QUWA.js.map +1 -0
- package/dist/datagrid.cjs +76 -21
- package/dist/datagrid.cjs.map +1 -1
- package/dist/datagrid.js +3 -3
- package/dist/devtools.cjs +11 -11
- package/dist/devtools.cjs.map +1 -1
- package/dist/devtools.js +1 -1
- package/dist/form.cjs +127 -86
- package/dist/form.cjs.map +1 -1
- package/dist/form.js +3 -3
- package/dist/index.cjs +1319 -945
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +153 -7
- package/dist/index.d.ts +153 -7
- package/dist/index.js +281 -141
- package/dist/index.js.map +1 -1
- package/dist/table.cjs +252 -169
- package/dist/table.cjs.map +1 -1
- package/dist/table.d.cts +1 -1
- package/dist/table.d.ts +1 -1
- package/dist/table.js +4 -4
- package/dist/tree.cjs.map +1 -1
- package/dist/tree.js +3 -3
- package/package.json +3 -3
- package/dist/chunk-2OCEO636.js +0 -91
- package/dist/chunk-2OCEO636.js.map +0 -1
- package/dist/chunk-GJDDPZH7.js.map +0 -1
- package/dist/chunk-MLEBVELO.js.map +0 -1
- package/dist/chunk-NXB3VAVF.js.map +0 -1
- package/dist/chunk-Z5UGF7EO.js.map +0 -1
- package/dist/chunk-ZJF6SJLP.js.map +0 -1
- /package/dist/{chunk-UO6VJC3C.js.map → chunk-KGFFQGCM.js.map} +0 -0
- /package/dist/{chunk-FSV73JI4.js.map → chunk-PEX2UTNG.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as SizeType, B as BaseComponentProps, S as SizableProps, I as InteractiveProps } from './common-CdpocIEz.cjs';
|
|
2
|
-
import { i as SgLocale, j as PrintOptions, k as CalendarLocale, l as PrintableProp, m as SlotClassNames, n as SlotStyles } from './Table-
|
|
3
|
-
export { A as AggregateType, B as BreadcrumbLocale, o as CarouselLocale, p as CascaderLocale, C as CellSpan, q as ChartsLocale, D as DashboardLocale, r as DatePickerLocale, s as DrawerLocale, t as EmptyLocale, E as ExpandableConfig, F as FilterDropdownProps, a as FlatRow, v as FormLocale, w as GanttLocale, G as GroupRow, H as HeaderCell, I as InlineEditLocale, x as InputPasswordLocale, M as ModalLocale, N as NotificationLocale,
|
|
2
|
+
import { i as SgLocale, j as PrintOptions, k as CalendarLocale, l as PrintableProp, m as SlotClassNames, n as SlotStyles } from './Table-CMKo6Pc3.cjs';
|
|
3
|
+
export { A as AggregateType, B as BreadcrumbLocale, o as CarouselLocale, p as CascaderLocale, C as CellSpan, q as ChartsLocale, D as DashboardLocale, r as DatePickerLocale, s as DrawerLocale, t as EmptyLocale, E as ExpandableConfig, F as FilterDropdownProps, a as FlatRow, v as FormLocale, w as GanttLocale, G as GroupRow, H as HeaderCell, I as InlineEditLocale, x as InputLocale, y as InputPasswordLocale, M as ModalLocale, N as NotificationLocale, z as PaginationLocale, P as PinnedRowsConfig, J as PopconfirmLocale, K as RateLocale, L as ResourceCalendarLocale, R as RowNumberConfig, b as RowSelectionConfig, O as SchemaFormEditorLocale, Q as SearchInputLocale, S as SelectionSummaryAction, V as SkeletonLocale, W as SpinLocale, c as SummaryCell, T as Table, d as TableColumn, e as TableLocale, f as TableProps, X as TableRef, Y as TagInputLocale, Z as TagLocale, _ as TimelineLocale, $ as TransferLocale, g as TreeConfig, a0 as TreeSelectLocale, a1 as UploadLocale, U as UseTableOptions, h as UseTableReturn, u as useTable } from './Table-CMKo6Pc3.cjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as React$1 from 'react';
|
|
6
6
|
import React__default, { ReactNode, CSSProperties, MouseEvent } from 'react';
|
|
@@ -13,6 +13,58 @@ export { UseVirtualScrollOptions, UseVirtualScrollReturn, VirtualList, VirtualLi
|
|
|
13
13
|
export { HistoryPanel, HistoryPanelProps, UseHistoryReturn, useHistory } from './devtools.cjs';
|
|
14
14
|
export { C as CellEditorProps, a as CellPosition, b as CellRange, c as CellValue, D as DataGrid, d as DataGridColumn, e as DataGridContextMenuItem, f as DataGridLocale, g as DataGridProps, h as DataGridRef, i as DataGridSummaryRow } from './datagrid-B6hg5yJh.cjs';
|
|
15
15
|
|
|
16
|
+
/** Text/layout direction shared by descendant components. */
|
|
17
|
+
type Direction = 'ltr' | 'rtl';
|
|
18
|
+
/**
|
|
19
|
+
* Friendly design-token overrides. Each entry is mapped to a `--sg-*` CSS
|
|
20
|
+
* custom property and emitted onto a `display: contents` scope wrapper, so
|
|
21
|
+
* overrides cascade to every descendant without affecting layout.
|
|
22
|
+
*
|
|
23
|
+
* Numeric values for length-like tokens (`borderRadius`, `fontSize`) are
|
|
24
|
+
* suffixed with `px`; everything else is emitted verbatim.
|
|
25
|
+
*/
|
|
26
|
+
interface SgThemeToken {
|
|
27
|
+
/** Brand / primary color → `--sg-color-primary`. */
|
|
28
|
+
colorPrimary?: string;
|
|
29
|
+
/** Success color → `--sg-color-success`. */
|
|
30
|
+
colorSuccess?: string;
|
|
31
|
+
/** Warning color → `--sg-color-warning`. */
|
|
32
|
+
colorWarning?: string;
|
|
33
|
+
/** Error / danger color → `--sg-color-error`. */
|
|
34
|
+
colorError?: string;
|
|
35
|
+
/** Base text color → `--sg-color-text`. */
|
|
36
|
+
colorText?: string;
|
|
37
|
+
/** Base background color → `--sg-color-bg`. */
|
|
38
|
+
colorBg?: string;
|
|
39
|
+
/** Base border color → `--sg-color-border`. */
|
|
40
|
+
colorBorder?: string;
|
|
41
|
+
/** Base corner radius → `--sg-border-radius` (number ⇒ px). */
|
|
42
|
+
borderRadius?: number | string;
|
|
43
|
+
/** Base font size → `--sg-font-size` (number ⇒ px). */
|
|
44
|
+
fontSize?: number | string;
|
|
45
|
+
/** Base font family → `--sg-font-sans`. */
|
|
46
|
+
fontFamily?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Theme configuration. Combines a built-in light/dark preset (`mode`),
|
|
50
|
+
* friendly token overrides (`token`), and an escape hatch for raw CSS
|
|
51
|
+
* variables (`cssVars`). All three are applied to a scope wrapper.
|
|
52
|
+
*/
|
|
53
|
+
interface ThemeConfig {
|
|
54
|
+
/** Built-in palette preset applied via `data-sg-theme`. */
|
|
55
|
+
mode?: 'light' | 'dark';
|
|
56
|
+
/** Friendly token overrides mapped to `--sg-*` variables. */
|
|
57
|
+
token?: SgThemeToken;
|
|
58
|
+
/** Raw CSS variable overrides (full names, e.g. `{ '--sg-color-link': '#f50' }`). */
|
|
59
|
+
cssVars?: Record<string, string>;
|
|
60
|
+
}
|
|
61
|
+
/** Content-Security-Policy options for runtime-injected styles. */
|
|
62
|
+
interface CSPConfig {
|
|
63
|
+
/** `nonce` attribute applied to dynamically created `<style>` tags. */
|
|
64
|
+
nonce?: string;
|
|
65
|
+
}
|
|
66
|
+
/** Customizes the empty state rendered by data components (`Empty`, `Table`, …). */
|
|
67
|
+
type RenderEmptyHandler = (componentName?: string) => React__default.ReactNode;
|
|
16
68
|
/**
|
|
17
69
|
* Global Skygraph component configuration merged through React context.
|
|
18
70
|
*
|
|
@@ -28,21 +80,57 @@ interface SgConfig {
|
|
|
28
80
|
disabled?: boolean;
|
|
29
81
|
/** Enables bordered styling for nested components when true. */
|
|
30
82
|
bordered?: boolean;
|
|
83
|
+
/** Text / layout direction (`ltr` by default) applied via the `dir` attribute. */
|
|
84
|
+
direction?: Direction;
|
|
31
85
|
/** Locale messages shallow-merged with the parent provider when set. */
|
|
32
86
|
locale?: SgLocale;
|
|
87
|
+
/** Theme preset + token overrides applied to a scope wrapper. */
|
|
88
|
+
theme?: ThemeConfig;
|
|
89
|
+
/**
|
|
90
|
+
* Returns the mount node for popups (dropdowns, tooltips, pickers). Defaults
|
|
91
|
+
* to `document.body` in consumers. Useful to keep overlays inside a scrolling
|
|
92
|
+
* or scoped container.
|
|
93
|
+
*/
|
|
94
|
+
getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
|
|
95
|
+
/** Returns the scroll/target container for affix-like positioning. */
|
|
96
|
+
getTargetContainer?: () => HTMLElement;
|
|
97
|
+
/** Global override for the default empty state. */
|
|
98
|
+
renderEmpty?: RenderEmptyHandler;
|
|
99
|
+
/** Content-Security-Policy options for injected styles. */
|
|
100
|
+
csp?: CSPConfig;
|
|
33
101
|
}
|
|
34
102
|
/** Props for `ConfigProvider`, extending `SgConfig` with React children. */
|
|
35
103
|
interface ConfigProviderProps extends SgConfig {
|
|
36
104
|
/** Tree of components that consume merged configuration from this provider. */
|
|
37
105
|
children: React__default.ReactNode;
|
|
38
106
|
}
|
|
107
|
+
/** Builds a CSS-variable map from a theme's `token` + `cssVars`. */
|
|
108
|
+
declare function buildThemeVars(theme?: ThemeConfig): Record<string, string>;
|
|
39
109
|
/**
|
|
40
110
|
* Merges Skygraph configuration with any parent provider and exposes it via context.
|
|
41
111
|
* Descendants read values through `useConfig` or `useConfigWithDefaults`.
|
|
112
|
+
*
|
|
113
|
+
* When `theme` or `direction` is set, children are wrapped in a `display: contents`
|
|
114
|
+
* element that carries the `dir`/`data-sg-theme` attributes and CSS variables, so
|
|
115
|
+
* the scope inherits without introducing an extra layout box.
|
|
42
116
|
*/
|
|
43
117
|
declare function ConfigProvider({ children, ...config }: ConfigProviderProps): react_jsx_runtime.JSX.Element;
|
|
44
118
|
/** Returns the merged `SgConfig` from the nearest ancestor `ConfigProvider`. */
|
|
45
119
|
declare function useConfig(): SgConfig;
|
|
120
|
+
/**
|
|
121
|
+
* Resolves effective `size`, `disabled`, and `direction` from props, context,
|
|
122
|
+
* and explicit defaults. Returns the original props plus the resolved values.
|
|
123
|
+
*/
|
|
124
|
+
declare function useConfigWithDefaults<T extends Record<string, unknown>>(props: T, defaults: {
|
|
125
|
+
size?: SizeType;
|
|
126
|
+
disabled?: boolean;
|
|
127
|
+
bordered?: boolean;
|
|
128
|
+
direction?: Direction;
|
|
129
|
+
}): T & {
|
|
130
|
+
resolvedSize: SizeType;
|
|
131
|
+
resolvedDisabled: boolean;
|
|
132
|
+
resolvedDirection: Direction;
|
|
133
|
+
};
|
|
46
134
|
|
|
47
135
|
/**
|
|
48
136
|
* English (US) locale preset for {@link ConfigProvider}.
|
|
@@ -377,6 +465,21 @@ interface InputProps extends BaseComponentProps, InteractiveProps, SizableProps
|
|
|
377
465
|
readOnly?: boolean;
|
|
378
466
|
/** DOM id forwarded to the underlying `<input>`. */
|
|
379
467
|
id?: string;
|
|
468
|
+
/**
|
|
469
|
+
* When true, renders a clear (×) button while the field has a value.
|
|
470
|
+
* Disabled and read-only fields hide the button. @default false
|
|
471
|
+
*/
|
|
472
|
+
allowClear?: boolean;
|
|
473
|
+
/**
|
|
474
|
+
* Validation status badge. Adds `sg-input-wrapper-status-{status}` and
|
|
475
|
+
* `sg-input-status-{status}` modifier classes and sets `aria-invalid` when
|
|
476
|
+
* `error`.
|
|
477
|
+
*/
|
|
478
|
+
status?: 'error' | 'warning';
|
|
479
|
+
/** Optional content rendered before the `<input>` (e.g. icon). */
|
|
480
|
+
prefix?: React__default.ReactNode;
|
|
481
|
+
/** Optional content rendered after the `<input>` (e.g. icon, unit). */
|
|
482
|
+
suffix?: React__default.ReactNode;
|
|
380
483
|
/** Exposes invalid state to assistive technologies. */
|
|
381
484
|
'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling';
|
|
382
485
|
/** Marks the field as required for assistive technologies. */
|
|
@@ -389,9 +492,11 @@ interface InputProps extends BaseComponentProps, InteractiveProps, SizableProps
|
|
|
389
492
|
onBlur?: () => void;
|
|
390
493
|
/** Called when the input gains focus. */
|
|
391
494
|
onFocus?: () => void;
|
|
495
|
+
/** Called when the user activates the built-in clear button. */
|
|
496
|
+
onClear?: () => void;
|
|
392
497
|
}
|
|
393
498
|
/** Single-line text input with optional loading indicator and configurable HTML type. */
|
|
394
|
-
declare function Input({ value, defaultValue, placeholder, type, readOnly, size: sizeProp, disabled: disabledProp, loading, onChange, onBlur, onFocus, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, 'aria-describedby': ariaDescribedBy, id, className, style, unstyled, }: InputProps): react_jsx_runtime.JSX.Element;
|
|
499
|
+
declare function Input({ value, defaultValue, placeholder, type, readOnly, size: sizeProp, disabled: disabledProp, loading, allowClear, status, prefix, suffix, onChange, onBlur, onFocus, onClear, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, 'aria-describedby': ariaDescribedBy, id, className, style, unstyled, }: InputProps): react_jsx_runtime.JSX.Element;
|
|
395
500
|
|
|
396
501
|
/** Props for the modal dialog overlay. */
|
|
397
502
|
interface ModalProps extends BaseComponentProps {
|
|
@@ -964,6 +1069,23 @@ interface UploadFile {
|
|
|
964
1069
|
size: number;
|
|
965
1070
|
/** Visual state in the file list row. */
|
|
966
1071
|
status: 'uploading' | 'done' | 'error';
|
|
1072
|
+
/** Upload progress percentage (0–100). */
|
|
1073
|
+
percent?: number;
|
|
1074
|
+
/** MIME type of the source file. */
|
|
1075
|
+
type?: string;
|
|
1076
|
+
/** Original `File` reference (only set for newly picked files). */
|
|
1077
|
+
raw?: File;
|
|
1078
|
+
}
|
|
1079
|
+
/** Options forwarded to `customRequest`. */
|
|
1080
|
+
interface UploadCustomRequestOptions {
|
|
1081
|
+
/** The picked file. */
|
|
1082
|
+
file: File;
|
|
1083
|
+
/** Reports incremental upload progress (0–100). */
|
|
1084
|
+
onProgress: (percent: number) => void;
|
|
1085
|
+
/** Marks the file as successfully uploaded. */
|
|
1086
|
+
onSuccess: (response?: unknown) => void;
|
|
1087
|
+
/** Marks the file as failed with an arbitrary payload. */
|
|
1088
|
+
onError: (err: unknown) => void;
|
|
967
1089
|
}
|
|
968
1090
|
/** Props for the file picker trigger, optional custom trigger, and file list UI. */
|
|
969
1091
|
interface UploadProps extends BaseComponentProps, InteractiveProps {
|
|
@@ -975,17 +1097,41 @@ interface UploadProps extends BaseComponentProps, InteractiveProps {
|
|
|
975
1097
|
fileList?: UploadFile[];
|
|
976
1098
|
/** Caps how many new files are passed to `onUpload` relative to current list length. */
|
|
977
1099
|
maxCount?: number;
|
|
1100
|
+
/** Maximum allowed file size in bytes — files larger than this are skipped. */
|
|
1101
|
+
maxSize?: number;
|
|
1102
|
+
/**
|
|
1103
|
+
* Pre-validation hook invoked per file. Return `false` (or a resolved
|
|
1104
|
+
* `false`) to skip the file. Mirrors the Vue adapter's
|
|
1105
|
+
* `beforeUpload` prop.
|
|
1106
|
+
*/
|
|
1107
|
+
beforeUpload?: (file: File, fileList: File[]) => boolean | Promise<boolean>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Custom upload implementation. When provided, SkyGraph stops faking the
|
|
1110
|
+
* upload pipeline — the caller controls progress/success/error via the
|
|
1111
|
+
* callbacks. Mirrors the Vue adapter's `customRequest` prop.
|
|
1112
|
+
*/
|
|
1113
|
+
customRequest?: (options: UploadCustomRequestOptions) => void;
|
|
1114
|
+
/** Visual layout for the file list. @default 'text' */
|
|
1115
|
+
listType?: 'text' | 'picture' | 'picture-card';
|
|
1116
|
+
/** Hide the built-in list when `false`. @default true */
|
|
1117
|
+
showUploadList?: boolean;
|
|
1118
|
+
/**
|
|
1119
|
+
* Renders a drag-and-drop area instead of a click trigger. Files dropped
|
|
1120
|
+
* on the area go through the same `beforeUpload` / `customRequest`
|
|
1121
|
+
* pipeline as the click trigger.
|
|
1122
|
+
*/
|
|
1123
|
+
drag?: boolean;
|
|
978
1124
|
/** Called with chosen files after the user confirms the native picker. */
|
|
979
1125
|
onUpload?: (files: File[]) => void;
|
|
980
1126
|
/** Called when the user removes a completed or errored list item. */
|
|
981
1127
|
onRemove?: (file: UploadFile) => void;
|
|
982
|
-
/** Custom trigger; defaults to a primary Upload button. */
|
|
1128
|
+
/** Custom trigger; defaults to a primary Upload button (or drag-area content when `drag`). */
|
|
983
1129
|
children?: React__default.ReactNode;
|
|
984
1130
|
}
|
|
985
1131
|
/**
|
|
986
1132
|
* Hidden file input with a clickable trigger and optional controlled file list with remove actions.
|
|
987
1133
|
*/
|
|
988
|
-
declare function Upload({ accept, multiple, disabled: disabledProp, loading, fileList, maxCount, onUpload, onRemove, children, className, style, unstyled, }: UploadProps): react_jsx_runtime.JSX.Element;
|
|
1134
|
+
declare function Upload({ accept, multiple, disabled: disabledProp, loading, fileList, maxCount, maxSize, beforeUpload, customRequest, listType, showUploadList, drag, onUpload, onRemove, children, className, style, unstyled, }: UploadProps): react_jsx_runtime.JSX.Element;
|
|
989
1135
|
|
|
990
1136
|
/** Visual variant for notification styling and icon. */
|
|
991
1137
|
type NotificationType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -1397,7 +1543,7 @@ interface EmptyProps extends BaseComponentProps {
|
|
|
1397
1543
|
/**
|
|
1398
1544
|
* Presents a no-data state with optional image, description, and footer slot.
|
|
1399
1545
|
*/
|
|
1400
|
-
declare function Empty({ image, description, children, className, style, unstyled
|
|
1546
|
+
declare function Empty({ image, description, children, className, style, unstyled }: EmptyProps): react_jsx_runtime.JSX.Element;
|
|
1401
1547
|
|
|
1402
1548
|
/** Props for the Result feedback page (status, title, and optional actions). */
|
|
1403
1549
|
interface ResultProps extends BaseComponentProps {
|
|
@@ -3682,4 +3828,4 @@ interface InputGroupProps extends BaseComponentProps, SizableProps {
|
|
|
3682
3828
|
/** Horizontally composes a control with optional leading and trailing slots. */
|
|
3683
3829
|
declare function InputGroup({ compact, before, after, size: sizeProp, children, className, style, unstyled, }: InputGroupProps): react_jsx_runtime.JSX.Element;
|
|
3684
3830
|
|
|
3685
|
-
export { AreaChart, type AreaChartProps, type Assignment, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, AutoFieldOption, Avatar, type AvatarProps, Badge, type BadgeProps, BarChart, type BarChartProps, type BaseChartProps, BaseComponentProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarCellInfo, type CalendarEvent, type CalendarHeaderInfo, CalendarLocale, type CalendarProps, Carousel, type CarouselProps, Cascader, type CascaderOption, type CascaderProps, type ChartAction, type ChartActionContext, type ChartActionsProp, type ChartAnimation, ChartBrush, type ChartBrushConfig, type ChartBrushProps, type ChartBrushRange, type ChartCategory, type ChartContextMenuHandler, type ChartContextMenuPayload, ChartCrosshair, type ChartCrosshairPoint, type ChartCrosshairProps, ChartHoverToolbar, type ChartHoverToolbarProps, ChartLegend, type ChartLegendProps, type ChartRef, type ChartSeries, type ChartSeriesContextMenuHandler, type ChartSeriesContextMenuPayload, type ChartSize, type ChartValue, Checkbox, type CheckboxProps, Collapse, type CollapseItem, type CollapseProps, ColorPicker, type ColorPickerProps, ConfigProvider, type ConfigProviderProps, DEFAULT_CHART_ANIMATION_MS, DEFAULT_PALETTE, DEFAULT_PALETTE_ITEMS, Dashboard, type DashboardContextMenuHandler, DashboardEditor, type DashboardEditorProps, type DashboardLayoutChange, type DashboardLayoutPatch, type DashboardProps, type DashboardWidget, type DashboardWidgetContextMenuHandler, DatePicker, type DatePickerProps, type DatePreset, Descriptions, type DescriptionsItem, type DescriptionsProps, Diagram, type DiagramCanvasContextPoint, type EdgeAction as DiagramEdgeAction, type NodeAction as DiagramNodeAction, type DiagramNodeRenderer, type DiagramProps, type DiagramRef, type DiagramSelectionMode, type DownloadPngOptions, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type EditorAction, type EditorField, type EditorSchema, type EditorState, Empty, type EmptyProps, EventTimeline, type EventTimelineProps, FieldType, Gantt, type GanttProps, type GanttRange, type GanttResource, type GanttScale, type GanttTask, InlineEdit, type InlineEditProps, Input, InputGroup, type InputGroupProps, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, InteractiveProps, JSONSchema, LineChart, type LineChartCrosshair, type LineChartProps, List, type ListItemMetaProps, type ListItemProps, type ListProps, type MentionOption, Mentions, type MentionsProps, Menu, type MenuItem, type MenuProps, Modal, type ModalProps, type NotificationConfig, NotificationContainer, type NotificationContainerProps, PALETTE_DATA_TYPE, Pagination, type PaginationProps, type PaletteItem, type PasswordStrength, type PickerMode, PieChart, type PieChartProps, type PieChartSlice, PinInput, type PinInputProps, type PngSize, Popconfirm, type PopconfirmProps, PrintOptions, PrintableProp, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RadioOption, RangePicker, type RangePickerProps, Rate, type RateProps, type Resource, ResourceCalendar, type ResourceCalendarProps, Result, type ResultProps, type SchemaEditorStore, SchemaFormEditor, SchemaFormEditorCanvas, type SchemaFormEditorCanvasProps, SchemaFormEditorInspector, type SchemaFormEditorInspectorProps, SchemaFormEditorPalette, type SchemaFormEditorPaletteProps, type SchemaFormEditorProps, SchemaFormEditorSchemaView, type SchemaFormEditorSchemaViewProps, SearchInput, type SearchInputProps, Segmented, type SegmentedProps, Select, type SelectOption, type SelectProps, type SgConfig, SgLocale, type ShowTimeConfig, SizableProps, SizeType, Skeleton, type SkeletonProps, Slider, type SliderProps, Spin, type SpinProps, type StepItem, Steps, type StepsProps, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Tag, TagInput, type TagInputProps, type TagProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, TimeRangePicker, type TimeRangePickerProps, Timeline, type TimelineEvent, type TimelineGroupBy, type TimelineItem, type TimelineOrientation, type TimelineProps, Tooltip, type TooltipProps, Transfer, type TransferItem, TransferList, type TransferListProps, type TransferProps, Transition, type TransitionProps, Upload, type UploadFile, type UploadProps, type UseGraphOptions, type UseGraphReturn, type UseSchemaEditorOptions, type WidgetAction, buildPageRule, buildPrintHtml, chartDataKey, colorForSeries, createEmptyEditorSchema, createFieldFromPaletteType, de_DE, defaultChartActions, downloadSvg, downloadSvgAsPng, editorSchemaToJsonSchema, en_US, es_ES, fr_FR, jsonSchemaToEditorSchema, makeChartContextMenuHandler, makeSeriesContextMenuHandler, measureSvg, notification, printElement, resolveBrushConfig, resolveChartActions, resolveChartAnimation, ru_RU, serializeSvg, triggerDownload, useChartSize, useComputed, useConfig, useGraph, useSchemaEditor, zh_CN };
|
|
3831
|
+
export { AreaChart, type AreaChartProps, type Assignment, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, AutoFieldOption, Avatar, type AvatarProps, Badge, type BadgeProps, BarChart, type BarChartProps, type BaseChartProps, BaseComponentProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, type CSPConfig, Calendar, type CalendarCellInfo, type CalendarEvent, type CalendarHeaderInfo, CalendarLocale, type CalendarProps, Carousel, type CarouselProps, Cascader, type CascaderOption, type CascaderProps, type ChartAction, type ChartActionContext, type ChartActionsProp, type ChartAnimation, ChartBrush, type ChartBrushConfig, type ChartBrushProps, type ChartBrushRange, type ChartCategory, type ChartContextMenuHandler, type ChartContextMenuPayload, ChartCrosshair, type ChartCrosshairPoint, type ChartCrosshairProps, ChartHoverToolbar, type ChartHoverToolbarProps, ChartLegend, type ChartLegendProps, type ChartRef, type ChartSeries, type ChartSeriesContextMenuHandler, type ChartSeriesContextMenuPayload, type ChartSize, type ChartValue, Checkbox, type CheckboxProps, Collapse, type CollapseItem, type CollapseProps, ColorPicker, type ColorPickerProps, ConfigProvider, type ConfigProviderProps, DEFAULT_CHART_ANIMATION_MS, DEFAULT_PALETTE, DEFAULT_PALETTE_ITEMS, Dashboard, type DashboardContextMenuHandler, DashboardEditor, type DashboardEditorProps, type DashboardLayoutChange, type DashboardLayoutPatch, type DashboardProps, type DashboardWidget, type DashboardWidgetContextMenuHandler, DatePicker, type DatePickerProps, type DatePreset, Descriptions, type DescriptionsItem, type DescriptionsProps, Diagram, type DiagramCanvasContextPoint, type EdgeAction as DiagramEdgeAction, type NodeAction as DiagramNodeAction, type DiagramNodeRenderer, type DiagramProps, type DiagramRef, type DiagramSelectionMode, type Direction, type DownloadPngOptions, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type EditorAction, type EditorField, type EditorSchema, type EditorState, Empty, type EmptyProps, EventTimeline, type EventTimelineProps, FieldType, Gantt, type GanttProps, type GanttRange, type GanttResource, type GanttScale, type GanttTask, InlineEdit, type InlineEditProps, Input, InputGroup, type InputGroupProps, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, InteractiveProps, JSONSchema, LineChart, type LineChartCrosshair, type LineChartProps, List, type ListItemMetaProps, type ListItemProps, type ListProps, type MentionOption, Mentions, type MentionsProps, Menu, type MenuItem, type MenuProps, Modal, type ModalProps, type NotificationConfig, NotificationContainer, type NotificationContainerProps, PALETTE_DATA_TYPE, Pagination, type PaginationProps, type PaletteItem, type PasswordStrength, type PickerMode, PieChart, type PieChartProps, type PieChartSlice, PinInput, type PinInputProps, type PngSize, Popconfirm, type PopconfirmProps, PrintOptions, PrintableProp, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RadioOption, RangePicker, type RangePickerProps, Rate, type RateProps, type RenderEmptyHandler, type Resource, ResourceCalendar, type ResourceCalendarProps, Result, type ResultProps, type SchemaEditorStore, SchemaFormEditor, SchemaFormEditorCanvas, type SchemaFormEditorCanvasProps, SchemaFormEditorInspector, type SchemaFormEditorInspectorProps, SchemaFormEditorPalette, type SchemaFormEditorPaletteProps, type SchemaFormEditorProps, SchemaFormEditorSchemaView, type SchemaFormEditorSchemaViewProps, SearchInput, type SearchInputProps, Segmented, type SegmentedProps, Select, type SelectOption, type SelectProps, type SgConfig, SgLocale, type SgThemeToken, type ShowTimeConfig, SizableProps, SizeType, Skeleton, type SkeletonProps, Slider, type SliderProps, Spin, type SpinProps, type StepItem, Steps, type StepsProps, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Tag, TagInput, type TagInputProps, type TagProps, Textarea, type TextareaProps, type ThemeConfig, TimePicker, type TimePickerProps, TimeRangePicker, type TimeRangePickerProps, Timeline, type TimelineEvent, type TimelineGroupBy, type TimelineItem, type TimelineOrientation, type TimelineProps, Tooltip, type TooltipProps, Transfer, type TransferItem, TransferList, type TransferListProps, type TransferProps, Transition, type TransitionProps, Upload, type UploadFile, type UploadProps, type UseGraphOptions, type UseGraphReturn, type UseSchemaEditorOptions, type WidgetAction, buildPageRule, buildPrintHtml, buildThemeVars, chartDataKey, colorForSeries, createEmptyEditorSchema, createFieldFromPaletteType, de_DE, defaultChartActions, downloadSvg, downloadSvgAsPng, editorSchemaToJsonSchema, en_US, es_ES, fr_FR, jsonSchemaToEditorSchema, makeChartContextMenuHandler, makeSeriesContextMenuHandler, measureSvg, notification, printElement, resolveBrushConfig, resolveChartActions, resolveChartAnimation, ru_RU, serializeSvg, triggerDownload, useChartSize, useComputed, useConfig, useConfigWithDefaults, useGraph, useSchemaEditor, zh_CN };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as SizeType, B as BaseComponentProps, S as SizableProps, I as InteractiveProps } from './common-CdpocIEz.js';
|
|
2
|
-
import { i as SgLocale, j as PrintOptions, k as CalendarLocale, l as PrintableProp, m as SlotClassNames, n as SlotStyles } from './Table-
|
|
3
|
-
export { A as AggregateType, B as BreadcrumbLocale, o as CarouselLocale, p as CascaderLocale, C as CellSpan, q as ChartsLocale, D as DashboardLocale, r as DatePickerLocale, s as DrawerLocale, t as EmptyLocale, E as ExpandableConfig, F as FilterDropdownProps, a as FlatRow, v as FormLocale, w as GanttLocale, G as GroupRow, H as HeaderCell, I as InlineEditLocale, x as InputPasswordLocale, M as ModalLocale, N as NotificationLocale,
|
|
2
|
+
import { i as SgLocale, j as PrintOptions, k as CalendarLocale, l as PrintableProp, m as SlotClassNames, n as SlotStyles } from './Table-CAay8MmA.js';
|
|
3
|
+
export { A as AggregateType, B as BreadcrumbLocale, o as CarouselLocale, p as CascaderLocale, C as CellSpan, q as ChartsLocale, D as DashboardLocale, r as DatePickerLocale, s as DrawerLocale, t as EmptyLocale, E as ExpandableConfig, F as FilterDropdownProps, a as FlatRow, v as FormLocale, w as GanttLocale, G as GroupRow, H as HeaderCell, I as InlineEditLocale, x as InputLocale, y as InputPasswordLocale, M as ModalLocale, N as NotificationLocale, z as PaginationLocale, P as PinnedRowsConfig, J as PopconfirmLocale, K as RateLocale, L as ResourceCalendarLocale, R as RowNumberConfig, b as RowSelectionConfig, O as SchemaFormEditorLocale, Q as SearchInputLocale, S as SelectionSummaryAction, V as SkeletonLocale, W as SpinLocale, c as SummaryCell, T as Table, d as TableColumn, e as TableLocale, f as TableProps, X as TableRef, Y as TagInputLocale, Z as TagLocale, _ as TimelineLocale, $ as TransferLocale, g as TreeConfig, a0 as TreeSelectLocale, a1 as UploadLocale, U as UseTableOptions, h as UseTableReturn, u as useTable } from './Table-CAay8MmA.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as React$1 from 'react';
|
|
6
6
|
import React__default, { ReactNode, CSSProperties, MouseEvent } from 'react';
|
|
@@ -13,6 +13,58 @@ export { UseVirtualScrollOptions, UseVirtualScrollReturn, VirtualList, VirtualLi
|
|
|
13
13
|
export { HistoryPanel, HistoryPanelProps, UseHistoryReturn, useHistory } from './devtools.js';
|
|
14
14
|
export { C as CellEditorProps, a as CellPosition, b as CellRange, c as CellValue, D as DataGrid, d as DataGridColumn, e as DataGridContextMenuItem, f as DataGridLocale, g as DataGridProps, h as DataGridRef, i as DataGridSummaryRow } from './datagrid-B6hg5yJh.js';
|
|
15
15
|
|
|
16
|
+
/** Text/layout direction shared by descendant components. */
|
|
17
|
+
type Direction = 'ltr' | 'rtl';
|
|
18
|
+
/**
|
|
19
|
+
* Friendly design-token overrides. Each entry is mapped to a `--sg-*` CSS
|
|
20
|
+
* custom property and emitted onto a `display: contents` scope wrapper, so
|
|
21
|
+
* overrides cascade to every descendant without affecting layout.
|
|
22
|
+
*
|
|
23
|
+
* Numeric values for length-like tokens (`borderRadius`, `fontSize`) are
|
|
24
|
+
* suffixed with `px`; everything else is emitted verbatim.
|
|
25
|
+
*/
|
|
26
|
+
interface SgThemeToken {
|
|
27
|
+
/** Brand / primary color → `--sg-color-primary`. */
|
|
28
|
+
colorPrimary?: string;
|
|
29
|
+
/** Success color → `--sg-color-success`. */
|
|
30
|
+
colorSuccess?: string;
|
|
31
|
+
/** Warning color → `--sg-color-warning`. */
|
|
32
|
+
colorWarning?: string;
|
|
33
|
+
/** Error / danger color → `--sg-color-error`. */
|
|
34
|
+
colorError?: string;
|
|
35
|
+
/** Base text color → `--sg-color-text`. */
|
|
36
|
+
colorText?: string;
|
|
37
|
+
/** Base background color → `--sg-color-bg`. */
|
|
38
|
+
colorBg?: string;
|
|
39
|
+
/** Base border color → `--sg-color-border`. */
|
|
40
|
+
colorBorder?: string;
|
|
41
|
+
/** Base corner radius → `--sg-border-radius` (number ⇒ px). */
|
|
42
|
+
borderRadius?: number | string;
|
|
43
|
+
/** Base font size → `--sg-font-size` (number ⇒ px). */
|
|
44
|
+
fontSize?: number | string;
|
|
45
|
+
/** Base font family → `--sg-font-sans`. */
|
|
46
|
+
fontFamily?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Theme configuration. Combines a built-in light/dark preset (`mode`),
|
|
50
|
+
* friendly token overrides (`token`), and an escape hatch for raw CSS
|
|
51
|
+
* variables (`cssVars`). All three are applied to a scope wrapper.
|
|
52
|
+
*/
|
|
53
|
+
interface ThemeConfig {
|
|
54
|
+
/** Built-in palette preset applied via `data-sg-theme`. */
|
|
55
|
+
mode?: 'light' | 'dark';
|
|
56
|
+
/** Friendly token overrides mapped to `--sg-*` variables. */
|
|
57
|
+
token?: SgThemeToken;
|
|
58
|
+
/** Raw CSS variable overrides (full names, e.g. `{ '--sg-color-link': '#f50' }`). */
|
|
59
|
+
cssVars?: Record<string, string>;
|
|
60
|
+
}
|
|
61
|
+
/** Content-Security-Policy options for runtime-injected styles. */
|
|
62
|
+
interface CSPConfig {
|
|
63
|
+
/** `nonce` attribute applied to dynamically created `<style>` tags. */
|
|
64
|
+
nonce?: string;
|
|
65
|
+
}
|
|
66
|
+
/** Customizes the empty state rendered by data components (`Empty`, `Table`, …). */
|
|
67
|
+
type RenderEmptyHandler = (componentName?: string) => React__default.ReactNode;
|
|
16
68
|
/**
|
|
17
69
|
* Global Skygraph component configuration merged through React context.
|
|
18
70
|
*
|
|
@@ -28,21 +80,57 @@ interface SgConfig {
|
|
|
28
80
|
disabled?: boolean;
|
|
29
81
|
/** Enables bordered styling for nested components when true. */
|
|
30
82
|
bordered?: boolean;
|
|
83
|
+
/** Text / layout direction (`ltr` by default) applied via the `dir` attribute. */
|
|
84
|
+
direction?: Direction;
|
|
31
85
|
/** Locale messages shallow-merged with the parent provider when set. */
|
|
32
86
|
locale?: SgLocale;
|
|
87
|
+
/** Theme preset + token overrides applied to a scope wrapper. */
|
|
88
|
+
theme?: ThemeConfig;
|
|
89
|
+
/**
|
|
90
|
+
* Returns the mount node for popups (dropdowns, tooltips, pickers). Defaults
|
|
91
|
+
* to `document.body` in consumers. Useful to keep overlays inside a scrolling
|
|
92
|
+
* or scoped container.
|
|
93
|
+
*/
|
|
94
|
+
getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
|
|
95
|
+
/** Returns the scroll/target container for affix-like positioning. */
|
|
96
|
+
getTargetContainer?: () => HTMLElement;
|
|
97
|
+
/** Global override for the default empty state. */
|
|
98
|
+
renderEmpty?: RenderEmptyHandler;
|
|
99
|
+
/** Content-Security-Policy options for injected styles. */
|
|
100
|
+
csp?: CSPConfig;
|
|
33
101
|
}
|
|
34
102
|
/** Props for `ConfigProvider`, extending `SgConfig` with React children. */
|
|
35
103
|
interface ConfigProviderProps extends SgConfig {
|
|
36
104
|
/** Tree of components that consume merged configuration from this provider. */
|
|
37
105
|
children: React__default.ReactNode;
|
|
38
106
|
}
|
|
107
|
+
/** Builds a CSS-variable map from a theme's `token` + `cssVars`. */
|
|
108
|
+
declare function buildThemeVars(theme?: ThemeConfig): Record<string, string>;
|
|
39
109
|
/**
|
|
40
110
|
* Merges Skygraph configuration with any parent provider and exposes it via context.
|
|
41
111
|
* Descendants read values through `useConfig` or `useConfigWithDefaults`.
|
|
112
|
+
*
|
|
113
|
+
* When `theme` or `direction` is set, children are wrapped in a `display: contents`
|
|
114
|
+
* element that carries the `dir`/`data-sg-theme` attributes and CSS variables, so
|
|
115
|
+
* the scope inherits without introducing an extra layout box.
|
|
42
116
|
*/
|
|
43
117
|
declare function ConfigProvider({ children, ...config }: ConfigProviderProps): react_jsx_runtime.JSX.Element;
|
|
44
118
|
/** Returns the merged `SgConfig` from the nearest ancestor `ConfigProvider`. */
|
|
45
119
|
declare function useConfig(): SgConfig;
|
|
120
|
+
/**
|
|
121
|
+
* Resolves effective `size`, `disabled`, and `direction` from props, context,
|
|
122
|
+
* and explicit defaults. Returns the original props plus the resolved values.
|
|
123
|
+
*/
|
|
124
|
+
declare function useConfigWithDefaults<T extends Record<string, unknown>>(props: T, defaults: {
|
|
125
|
+
size?: SizeType;
|
|
126
|
+
disabled?: boolean;
|
|
127
|
+
bordered?: boolean;
|
|
128
|
+
direction?: Direction;
|
|
129
|
+
}): T & {
|
|
130
|
+
resolvedSize: SizeType;
|
|
131
|
+
resolvedDisabled: boolean;
|
|
132
|
+
resolvedDirection: Direction;
|
|
133
|
+
};
|
|
46
134
|
|
|
47
135
|
/**
|
|
48
136
|
* English (US) locale preset for {@link ConfigProvider}.
|
|
@@ -377,6 +465,21 @@ interface InputProps extends BaseComponentProps, InteractiveProps, SizableProps
|
|
|
377
465
|
readOnly?: boolean;
|
|
378
466
|
/** DOM id forwarded to the underlying `<input>`. */
|
|
379
467
|
id?: string;
|
|
468
|
+
/**
|
|
469
|
+
* When true, renders a clear (×) button while the field has a value.
|
|
470
|
+
* Disabled and read-only fields hide the button. @default false
|
|
471
|
+
*/
|
|
472
|
+
allowClear?: boolean;
|
|
473
|
+
/**
|
|
474
|
+
* Validation status badge. Adds `sg-input-wrapper-status-{status}` and
|
|
475
|
+
* `sg-input-status-{status}` modifier classes and sets `aria-invalid` when
|
|
476
|
+
* `error`.
|
|
477
|
+
*/
|
|
478
|
+
status?: 'error' | 'warning';
|
|
479
|
+
/** Optional content rendered before the `<input>` (e.g. icon). */
|
|
480
|
+
prefix?: React__default.ReactNode;
|
|
481
|
+
/** Optional content rendered after the `<input>` (e.g. icon, unit). */
|
|
482
|
+
suffix?: React__default.ReactNode;
|
|
380
483
|
/** Exposes invalid state to assistive technologies. */
|
|
381
484
|
'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling';
|
|
382
485
|
/** Marks the field as required for assistive technologies. */
|
|
@@ -389,9 +492,11 @@ interface InputProps extends BaseComponentProps, InteractiveProps, SizableProps
|
|
|
389
492
|
onBlur?: () => void;
|
|
390
493
|
/** Called when the input gains focus. */
|
|
391
494
|
onFocus?: () => void;
|
|
495
|
+
/** Called when the user activates the built-in clear button. */
|
|
496
|
+
onClear?: () => void;
|
|
392
497
|
}
|
|
393
498
|
/** Single-line text input with optional loading indicator and configurable HTML type. */
|
|
394
|
-
declare function Input({ value, defaultValue, placeholder, type, readOnly, size: sizeProp, disabled: disabledProp, loading, onChange, onBlur, onFocus, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, 'aria-describedby': ariaDescribedBy, id, className, style, unstyled, }: InputProps): react_jsx_runtime.JSX.Element;
|
|
499
|
+
declare function Input({ value, defaultValue, placeholder, type, readOnly, size: sizeProp, disabled: disabledProp, loading, allowClear, status, prefix, suffix, onChange, onBlur, onFocus, onClear, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, 'aria-describedby': ariaDescribedBy, id, className, style, unstyled, }: InputProps): react_jsx_runtime.JSX.Element;
|
|
395
500
|
|
|
396
501
|
/** Props for the modal dialog overlay. */
|
|
397
502
|
interface ModalProps extends BaseComponentProps {
|
|
@@ -964,6 +1069,23 @@ interface UploadFile {
|
|
|
964
1069
|
size: number;
|
|
965
1070
|
/** Visual state in the file list row. */
|
|
966
1071
|
status: 'uploading' | 'done' | 'error';
|
|
1072
|
+
/** Upload progress percentage (0–100). */
|
|
1073
|
+
percent?: number;
|
|
1074
|
+
/** MIME type of the source file. */
|
|
1075
|
+
type?: string;
|
|
1076
|
+
/** Original `File` reference (only set for newly picked files). */
|
|
1077
|
+
raw?: File;
|
|
1078
|
+
}
|
|
1079
|
+
/** Options forwarded to `customRequest`. */
|
|
1080
|
+
interface UploadCustomRequestOptions {
|
|
1081
|
+
/** The picked file. */
|
|
1082
|
+
file: File;
|
|
1083
|
+
/** Reports incremental upload progress (0–100). */
|
|
1084
|
+
onProgress: (percent: number) => void;
|
|
1085
|
+
/** Marks the file as successfully uploaded. */
|
|
1086
|
+
onSuccess: (response?: unknown) => void;
|
|
1087
|
+
/** Marks the file as failed with an arbitrary payload. */
|
|
1088
|
+
onError: (err: unknown) => void;
|
|
967
1089
|
}
|
|
968
1090
|
/** Props for the file picker trigger, optional custom trigger, and file list UI. */
|
|
969
1091
|
interface UploadProps extends BaseComponentProps, InteractiveProps {
|
|
@@ -975,17 +1097,41 @@ interface UploadProps extends BaseComponentProps, InteractiveProps {
|
|
|
975
1097
|
fileList?: UploadFile[];
|
|
976
1098
|
/** Caps how many new files are passed to `onUpload` relative to current list length. */
|
|
977
1099
|
maxCount?: number;
|
|
1100
|
+
/** Maximum allowed file size in bytes — files larger than this are skipped. */
|
|
1101
|
+
maxSize?: number;
|
|
1102
|
+
/**
|
|
1103
|
+
* Pre-validation hook invoked per file. Return `false` (or a resolved
|
|
1104
|
+
* `false`) to skip the file. Mirrors the Vue adapter's
|
|
1105
|
+
* `beforeUpload` prop.
|
|
1106
|
+
*/
|
|
1107
|
+
beforeUpload?: (file: File, fileList: File[]) => boolean | Promise<boolean>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Custom upload implementation. When provided, SkyGraph stops faking the
|
|
1110
|
+
* upload pipeline — the caller controls progress/success/error via the
|
|
1111
|
+
* callbacks. Mirrors the Vue adapter's `customRequest` prop.
|
|
1112
|
+
*/
|
|
1113
|
+
customRequest?: (options: UploadCustomRequestOptions) => void;
|
|
1114
|
+
/** Visual layout for the file list. @default 'text' */
|
|
1115
|
+
listType?: 'text' | 'picture' | 'picture-card';
|
|
1116
|
+
/** Hide the built-in list when `false`. @default true */
|
|
1117
|
+
showUploadList?: boolean;
|
|
1118
|
+
/**
|
|
1119
|
+
* Renders a drag-and-drop area instead of a click trigger. Files dropped
|
|
1120
|
+
* on the area go through the same `beforeUpload` / `customRequest`
|
|
1121
|
+
* pipeline as the click trigger.
|
|
1122
|
+
*/
|
|
1123
|
+
drag?: boolean;
|
|
978
1124
|
/** Called with chosen files after the user confirms the native picker. */
|
|
979
1125
|
onUpload?: (files: File[]) => void;
|
|
980
1126
|
/** Called when the user removes a completed or errored list item. */
|
|
981
1127
|
onRemove?: (file: UploadFile) => void;
|
|
982
|
-
/** Custom trigger; defaults to a primary Upload button. */
|
|
1128
|
+
/** Custom trigger; defaults to a primary Upload button (or drag-area content when `drag`). */
|
|
983
1129
|
children?: React__default.ReactNode;
|
|
984
1130
|
}
|
|
985
1131
|
/**
|
|
986
1132
|
* Hidden file input with a clickable trigger and optional controlled file list with remove actions.
|
|
987
1133
|
*/
|
|
988
|
-
declare function Upload({ accept, multiple, disabled: disabledProp, loading, fileList, maxCount, onUpload, onRemove, children, className, style, unstyled, }: UploadProps): react_jsx_runtime.JSX.Element;
|
|
1134
|
+
declare function Upload({ accept, multiple, disabled: disabledProp, loading, fileList, maxCount, maxSize, beforeUpload, customRequest, listType, showUploadList, drag, onUpload, onRemove, children, className, style, unstyled, }: UploadProps): react_jsx_runtime.JSX.Element;
|
|
989
1135
|
|
|
990
1136
|
/** Visual variant for notification styling and icon. */
|
|
991
1137
|
type NotificationType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -1397,7 +1543,7 @@ interface EmptyProps extends BaseComponentProps {
|
|
|
1397
1543
|
/**
|
|
1398
1544
|
* Presents a no-data state with optional image, description, and footer slot.
|
|
1399
1545
|
*/
|
|
1400
|
-
declare function Empty({ image, description, children, className, style, unstyled
|
|
1546
|
+
declare function Empty({ image, description, children, className, style, unstyled }: EmptyProps): react_jsx_runtime.JSX.Element;
|
|
1401
1547
|
|
|
1402
1548
|
/** Props for the Result feedback page (status, title, and optional actions). */
|
|
1403
1549
|
interface ResultProps extends BaseComponentProps {
|
|
@@ -3682,4 +3828,4 @@ interface InputGroupProps extends BaseComponentProps, SizableProps {
|
|
|
3682
3828
|
/** Horizontally composes a control with optional leading and trailing slots. */
|
|
3683
3829
|
declare function InputGroup({ compact, before, after, size: sizeProp, children, className, style, unstyled, }: InputGroupProps): react_jsx_runtime.JSX.Element;
|
|
3684
3830
|
|
|
3685
|
-
export { AreaChart, type AreaChartProps, type Assignment, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, AutoFieldOption, Avatar, type AvatarProps, Badge, type BadgeProps, BarChart, type BarChartProps, type BaseChartProps, BaseComponentProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarCellInfo, type CalendarEvent, type CalendarHeaderInfo, CalendarLocale, type CalendarProps, Carousel, type CarouselProps, Cascader, type CascaderOption, type CascaderProps, type ChartAction, type ChartActionContext, type ChartActionsProp, type ChartAnimation, ChartBrush, type ChartBrushConfig, type ChartBrushProps, type ChartBrushRange, type ChartCategory, type ChartContextMenuHandler, type ChartContextMenuPayload, ChartCrosshair, type ChartCrosshairPoint, type ChartCrosshairProps, ChartHoverToolbar, type ChartHoverToolbarProps, ChartLegend, type ChartLegendProps, type ChartRef, type ChartSeries, type ChartSeriesContextMenuHandler, type ChartSeriesContextMenuPayload, type ChartSize, type ChartValue, Checkbox, type CheckboxProps, Collapse, type CollapseItem, type CollapseProps, ColorPicker, type ColorPickerProps, ConfigProvider, type ConfigProviderProps, DEFAULT_CHART_ANIMATION_MS, DEFAULT_PALETTE, DEFAULT_PALETTE_ITEMS, Dashboard, type DashboardContextMenuHandler, DashboardEditor, type DashboardEditorProps, type DashboardLayoutChange, type DashboardLayoutPatch, type DashboardProps, type DashboardWidget, type DashboardWidgetContextMenuHandler, DatePicker, type DatePickerProps, type DatePreset, Descriptions, type DescriptionsItem, type DescriptionsProps, Diagram, type DiagramCanvasContextPoint, type EdgeAction as DiagramEdgeAction, type NodeAction as DiagramNodeAction, type DiagramNodeRenderer, type DiagramProps, type DiagramRef, type DiagramSelectionMode, type DownloadPngOptions, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type EditorAction, type EditorField, type EditorSchema, type EditorState, Empty, type EmptyProps, EventTimeline, type EventTimelineProps, FieldType, Gantt, type GanttProps, type GanttRange, type GanttResource, type GanttScale, type GanttTask, InlineEdit, type InlineEditProps, Input, InputGroup, type InputGroupProps, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, InteractiveProps, JSONSchema, LineChart, type LineChartCrosshair, type LineChartProps, List, type ListItemMetaProps, type ListItemProps, type ListProps, type MentionOption, Mentions, type MentionsProps, Menu, type MenuItem, type MenuProps, Modal, type ModalProps, type NotificationConfig, NotificationContainer, type NotificationContainerProps, PALETTE_DATA_TYPE, Pagination, type PaginationProps, type PaletteItem, type PasswordStrength, type PickerMode, PieChart, type PieChartProps, type PieChartSlice, PinInput, type PinInputProps, type PngSize, Popconfirm, type PopconfirmProps, PrintOptions, PrintableProp, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RadioOption, RangePicker, type RangePickerProps, Rate, type RateProps, type Resource, ResourceCalendar, type ResourceCalendarProps, Result, type ResultProps, type SchemaEditorStore, SchemaFormEditor, SchemaFormEditorCanvas, type SchemaFormEditorCanvasProps, SchemaFormEditorInspector, type SchemaFormEditorInspectorProps, SchemaFormEditorPalette, type SchemaFormEditorPaletteProps, type SchemaFormEditorProps, SchemaFormEditorSchemaView, type SchemaFormEditorSchemaViewProps, SearchInput, type SearchInputProps, Segmented, type SegmentedProps, Select, type SelectOption, type SelectProps, type SgConfig, SgLocale, type ShowTimeConfig, SizableProps, SizeType, Skeleton, type SkeletonProps, Slider, type SliderProps, Spin, type SpinProps, type StepItem, Steps, type StepsProps, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Tag, TagInput, type TagInputProps, type TagProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, TimeRangePicker, type TimeRangePickerProps, Timeline, type TimelineEvent, type TimelineGroupBy, type TimelineItem, type TimelineOrientation, type TimelineProps, Tooltip, type TooltipProps, Transfer, type TransferItem, TransferList, type TransferListProps, type TransferProps, Transition, type TransitionProps, Upload, type UploadFile, type UploadProps, type UseGraphOptions, type UseGraphReturn, type UseSchemaEditorOptions, type WidgetAction, buildPageRule, buildPrintHtml, chartDataKey, colorForSeries, createEmptyEditorSchema, createFieldFromPaletteType, de_DE, defaultChartActions, downloadSvg, downloadSvgAsPng, editorSchemaToJsonSchema, en_US, es_ES, fr_FR, jsonSchemaToEditorSchema, makeChartContextMenuHandler, makeSeriesContextMenuHandler, measureSvg, notification, printElement, resolveBrushConfig, resolveChartActions, resolveChartAnimation, ru_RU, serializeSvg, triggerDownload, useChartSize, useComputed, useConfig, useGraph, useSchemaEditor, zh_CN };
|
|
3831
|
+
export { AreaChart, type AreaChartProps, type Assignment, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, AutoFieldOption, Avatar, type AvatarProps, Badge, type BadgeProps, BarChart, type BarChartProps, type BaseChartProps, BaseComponentProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, type CSPConfig, Calendar, type CalendarCellInfo, type CalendarEvent, type CalendarHeaderInfo, CalendarLocale, type CalendarProps, Carousel, type CarouselProps, Cascader, type CascaderOption, type CascaderProps, type ChartAction, type ChartActionContext, type ChartActionsProp, type ChartAnimation, ChartBrush, type ChartBrushConfig, type ChartBrushProps, type ChartBrushRange, type ChartCategory, type ChartContextMenuHandler, type ChartContextMenuPayload, ChartCrosshair, type ChartCrosshairPoint, type ChartCrosshairProps, ChartHoverToolbar, type ChartHoverToolbarProps, ChartLegend, type ChartLegendProps, type ChartRef, type ChartSeries, type ChartSeriesContextMenuHandler, type ChartSeriesContextMenuPayload, type ChartSize, type ChartValue, Checkbox, type CheckboxProps, Collapse, type CollapseItem, type CollapseProps, ColorPicker, type ColorPickerProps, ConfigProvider, type ConfigProviderProps, DEFAULT_CHART_ANIMATION_MS, DEFAULT_PALETTE, DEFAULT_PALETTE_ITEMS, Dashboard, type DashboardContextMenuHandler, DashboardEditor, type DashboardEditorProps, type DashboardLayoutChange, type DashboardLayoutPatch, type DashboardProps, type DashboardWidget, type DashboardWidgetContextMenuHandler, DatePicker, type DatePickerProps, type DatePreset, Descriptions, type DescriptionsItem, type DescriptionsProps, Diagram, type DiagramCanvasContextPoint, type EdgeAction as DiagramEdgeAction, type NodeAction as DiagramNodeAction, type DiagramNodeRenderer, type DiagramProps, type DiagramRef, type DiagramSelectionMode, type Direction, type DownloadPngOptions, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type EditorAction, type EditorField, type EditorSchema, type EditorState, Empty, type EmptyProps, EventTimeline, type EventTimelineProps, FieldType, Gantt, type GanttProps, type GanttRange, type GanttResource, type GanttScale, type GanttTask, InlineEdit, type InlineEditProps, Input, InputGroup, type InputGroupProps, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, InteractiveProps, JSONSchema, LineChart, type LineChartCrosshair, type LineChartProps, List, type ListItemMetaProps, type ListItemProps, type ListProps, type MentionOption, Mentions, type MentionsProps, Menu, type MenuItem, type MenuProps, Modal, type ModalProps, type NotificationConfig, NotificationContainer, type NotificationContainerProps, PALETTE_DATA_TYPE, Pagination, type PaginationProps, type PaletteItem, type PasswordStrength, type PickerMode, PieChart, type PieChartProps, type PieChartSlice, PinInput, type PinInputProps, type PngSize, Popconfirm, type PopconfirmProps, PrintOptions, PrintableProp, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RadioOption, RangePicker, type RangePickerProps, Rate, type RateProps, type RenderEmptyHandler, type Resource, ResourceCalendar, type ResourceCalendarProps, Result, type ResultProps, type SchemaEditorStore, SchemaFormEditor, SchemaFormEditorCanvas, type SchemaFormEditorCanvasProps, SchemaFormEditorInspector, type SchemaFormEditorInspectorProps, SchemaFormEditorPalette, type SchemaFormEditorPaletteProps, type SchemaFormEditorProps, SchemaFormEditorSchemaView, type SchemaFormEditorSchemaViewProps, SearchInput, type SearchInputProps, Segmented, type SegmentedProps, Select, type SelectOption, type SelectProps, type SgConfig, SgLocale, type SgThemeToken, type ShowTimeConfig, SizableProps, SizeType, Skeleton, type SkeletonProps, Slider, type SliderProps, Spin, type SpinProps, type StepItem, Steps, type StepsProps, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Tag, TagInput, type TagInputProps, type TagProps, Textarea, type TextareaProps, type ThemeConfig, TimePicker, type TimePickerProps, TimeRangePicker, type TimeRangePickerProps, Timeline, type TimelineEvent, type TimelineGroupBy, type TimelineItem, type TimelineOrientation, type TimelineProps, Tooltip, type TooltipProps, Transfer, type TransferItem, TransferList, type TransferListProps, type TransferProps, Transition, type TransitionProps, Upload, type UploadFile, type UploadProps, type UseGraphOptions, type UseGraphReturn, type UseSchemaEditorOptions, type WidgetAction, buildPageRule, buildPrintHtml, buildThemeVars, chartDataKey, colorForSeries, createEmptyEditorSchema, createFieldFromPaletteType, de_DE, defaultChartActions, downloadSvg, downloadSvgAsPng, editorSchemaToJsonSchema, en_US, es_ES, fr_FR, jsonSchemaToEditorSchema, makeChartContextMenuHandler, makeSeriesContextMenuHandler, measureSvg, notification, printElement, resolveBrushConfig, resolveChartActions, resolveChartAnimation, ru_RU, serializeSvg, triggerDownload, useChartSize, useComputed, useConfig, useConfigWithDefaults, useGraph, useSchemaEditor, zh_CN };
|