@indusaction/cms-design-system 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/index.cjs +2418 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +60 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +465 -6
- package/dist/index.d.ts +465 -6
- package/dist/index.js +2388 -22
- package/dist/index.js.map +1 -1
- package/package.json +3 -13
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
1
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import * as antd from 'antd';
|
|
3
|
+
import { ButtonProps as ButtonProps$1, TabsProps as TabsProps$1, DropdownProps as DropdownProps$1, TablePaginationConfig, TagProps as TagProps$1, CardProps as CardProps$1, StatisticProps, SkeletonProps as SkeletonProps$1, Skeleton as Skeleton$1, ModalProps as ModalProps$1, Modal as Modal$1, MenuProps, SiderProps, ResultProps, AlertProps, notification, message, ThemeConfig } from 'antd';
|
|
4
|
+
export { MenuProps, ModalFuncProps, TabPaneProps } from 'antd';
|
|
5
|
+
import { DropdownButtonProps as DropdownButtonProps$1 } from 'antd/es/dropdown';
|
|
6
|
+
import { TableProps as TableProps$1, ColumnGroupType, ColumnType } from 'antd/es/table';
|
|
7
|
+
import { FilterValue, SorterResult, TableCurrentDataSource } from 'antd/es/table/interface';
|
|
8
|
+
import { LinkProps as LinkProps$1 } from 'antd/es/typography/Link';
|
|
9
|
+
import * as antd_es_alert_Alert from 'antd/es/alert/Alert';
|
|
3
10
|
|
|
4
11
|
type ButtonVariant = "primary" | "default" | "dashed" | "link" | "text";
|
|
5
12
|
type ButtonSize = "large" | "middle" | "small";
|
|
@@ -10,12 +17,418 @@ interface ButtonProps extends Omit<ButtonProps$1, "type" | "variant" | "size" |
|
|
|
10
17
|
}
|
|
11
18
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
19
|
|
|
20
|
+
interface TabsProps extends Omit<TabsProps$1, "type"> {
|
|
21
|
+
type?: "line" | "card";
|
|
22
|
+
}
|
|
23
|
+
declare const Tabs: React.FC<TabsProps>;
|
|
24
|
+
|
|
25
|
+
interface DropdownProps extends DropdownProps$1 {
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
interface DropdownButtonProps extends DropdownButtonProps$1 {
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
declare const DropdownButton: React.FC<DropdownButtonProps>;
|
|
32
|
+
interface DropdownInterface extends React.FC<DropdownProps> {
|
|
33
|
+
Button: typeof DropdownButton;
|
|
34
|
+
}
|
|
35
|
+
declare const Dropdown: DropdownInterface;
|
|
36
|
+
|
|
37
|
+
type TableMode = "client" | "server";
|
|
38
|
+
type TableSortOrder = "ascend" | "descend" | null;
|
|
39
|
+
type TableQuery = {
|
|
40
|
+
search: string;
|
|
41
|
+
page: number;
|
|
42
|
+
pageSize: number;
|
|
43
|
+
sortField?: React.Key | readonly React.Key[];
|
|
44
|
+
sortOrder?: TableSortOrder;
|
|
45
|
+
filters: Record<string, FilterValue | null>;
|
|
46
|
+
};
|
|
47
|
+
type TableSearchConfig = {
|
|
48
|
+
placeholder?: string;
|
|
49
|
+
value?: string;
|
|
50
|
+
defaultValue?: string;
|
|
51
|
+
onChange?: (value: string) => void;
|
|
52
|
+
debounceMs?: number;
|
|
53
|
+
};
|
|
54
|
+
type TableColumnType<T> = ColumnType<T> & {
|
|
55
|
+
/** Include this column in free-text search. Default: true when `dataIndex` is set. */
|
|
56
|
+
searchable?: boolean;
|
|
57
|
+
};
|
|
58
|
+
type TableColumnGroupType<T> = Omit<ColumnGroupType<T>, "children"> & {
|
|
59
|
+
children: TableColumnsType<T>;
|
|
60
|
+
};
|
|
61
|
+
type TableColumnsType<T> = (TableColumnGroupType<T> | TableColumnType<T>)[];
|
|
62
|
+
interface TableProps<T extends object> extends Omit<TableProps$1<T>, "columns" | "onChange" | "pagination"> {
|
|
63
|
+
columns?: TableColumnsType<T>;
|
|
64
|
+
/**
|
|
65
|
+
* `client` (default): search, filters, sort, and pagination run on `dataSource`.
|
|
66
|
+
* `server`: `dataSource` is the current page only. Pass `pagination.total` from the
|
|
67
|
+
* API and handle `onQueryChange` to fetch the next page / search / sort / filters.
|
|
68
|
+
*/
|
|
69
|
+
mode?: TableMode;
|
|
70
|
+
/** Free-text search, shown on the same row as pagination above the table. Pass `false` to hide it. */
|
|
71
|
+
search?: boolean | TableSearchConfig;
|
|
72
|
+
pagination?: false | TablePaginationConfig;
|
|
73
|
+
onChange?: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<T> | SorterResult<T>[], extra: TableCurrentDataSource<T>) => void;
|
|
74
|
+
/** Fires whenever search, page, page size, sort, or column filters change. */
|
|
75
|
+
onQueryChange?: (query: TableQuery) => void;
|
|
76
|
+
}
|
|
77
|
+
declare function Table<T extends object>({ columns, dataSource, mode, search, pagination, onChange, onQueryChange, scroll, size, loading, rowKey, ...rest }: TableProps<T>): React.JSX.Element;
|
|
78
|
+
declare namespace Table {
|
|
79
|
+
var displayName: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface TagProps extends TagProps$1 {
|
|
83
|
+
children?: React.ReactNode;
|
|
84
|
+
}
|
|
85
|
+
declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
86
|
+
|
|
87
|
+
interface LinkProps extends LinkProps$1 {
|
|
88
|
+
children?: React.ReactNode;
|
|
89
|
+
}
|
|
90
|
+
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLElement>>;
|
|
91
|
+
|
|
92
|
+
interface CardProps extends Omit<CardProps$1, "title" | "loading"> {
|
|
93
|
+
title?: React.ReactNode;
|
|
94
|
+
description?: React.ReactNode;
|
|
95
|
+
tags?: React.ReactNode;
|
|
96
|
+
extraInfo?: React.ReactNode;
|
|
97
|
+
ctas?: React.ReactNode;
|
|
98
|
+
layout?: "inline" | "grid";
|
|
99
|
+
children?: React.ReactNode;
|
|
100
|
+
/** Replace body content with a details skeleton while data is loading. */
|
|
101
|
+
loading?: boolean;
|
|
102
|
+
/** Placeholder field rows shown when `loading` is true. Default: 5 */
|
|
103
|
+
loadingRows?: number;
|
|
104
|
+
}
|
|
105
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
106
|
+
|
|
107
|
+
type MetricCardVariant = "solid" | "outlined" | "tinted";
|
|
108
|
+
type MetricCardLayout = "vertical" | "horizontal";
|
|
109
|
+
type MetricCardSize = "small" | "default" | "large";
|
|
110
|
+
type MetricCardStatus = "primary" | "success" | "warning" | "error" | "info" | "neutral";
|
|
111
|
+
interface MetricCardProps {
|
|
112
|
+
title: ReactNode;
|
|
113
|
+
value?: number | string | null;
|
|
114
|
+
description?: ReactNode;
|
|
115
|
+
variant?: MetricCardVariant;
|
|
116
|
+
layout?: MetricCardLayout;
|
|
117
|
+
size?: MetricCardSize;
|
|
118
|
+
status?: MetricCardStatus;
|
|
119
|
+
color?: string;
|
|
120
|
+
textColor?: string;
|
|
121
|
+
icon?: ReactNode;
|
|
122
|
+
prefix?: StatisticProps["prefix"];
|
|
123
|
+
suffix?: StatisticProps["suffix"];
|
|
124
|
+
precision?: StatisticProps["precision"];
|
|
125
|
+
formatter?: StatisticProps["formatter"];
|
|
126
|
+
groupSeparator?: StatisticProps["groupSeparator"];
|
|
127
|
+
decimalSeparator?: StatisticProps["decimalSeparator"];
|
|
128
|
+
loading?: boolean;
|
|
129
|
+
className?: string;
|
|
130
|
+
style?: CSSProperties;
|
|
131
|
+
}
|
|
132
|
+
declare const MetricCard: React.ForwardRefExoticComponent<MetricCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
133
|
+
|
|
134
|
+
interface ChartDatum {
|
|
135
|
+
label: string;
|
|
136
|
+
value: number;
|
|
137
|
+
id?: string;
|
|
138
|
+
color?: string;
|
|
139
|
+
}
|
|
140
|
+
interface GroupedChartDatum {
|
|
141
|
+
label: string;
|
|
142
|
+
values: Record<string, number>;
|
|
143
|
+
id?: string;
|
|
144
|
+
}
|
|
145
|
+
interface ColumnChartProps {
|
|
146
|
+
data: ChartDatum[] | GroupedChartDatum[];
|
|
147
|
+
mode?: "basic" | "stacked" | "grouped";
|
|
148
|
+
seriesColors?: readonly string[];
|
|
149
|
+
showLegend?: boolean;
|
|
150
|
+
height?: number;
|
|
151
|
+
color?: string;
|
|
152
|
+
ariaLabel?: string;
|
|
153
|
+
formatValue?: (value: number) => string;
|
|
154
|
+
style?: CSSProperties;
|
|
155
|
+
}
|
|
156
|
+
declare function ColumnChart({ data, mode, seriesColors, showLegend, height, color, ariaLabel, formatValue, style, }: ColumnChartProps): React.JSX.Element;
|
|
157
|
+
|
|
158
|
+
interface BarChartProps {
|
|
159
|
+
data: ChartDatum[] | GroupedChartDatum[];
|
|
160
|
+
mode?: "basic" | "stacked" | "grouped";
|
|
161
|
+
seriesColors?: readonly string[];
|
|
162
|
+
showLegend?: boolean;
|
|
163
|
+
height?: number;
|
|
164
|
+
color?: string;
|
|
165
|
+
ariaLabel?: string;
|
|
166
|
+
formatValue?: (value: number) => string;
|
|
167
|
+
style?: CSSProperties;
|
|
168
|
+
}
|
|
169
|
+
declare function BarChart({ data, mode, seriesColors, showLegend, height, color, ariaLabel, formatValue, style, }: BarChartProps): React.JSX.Element;
|
|
170
|
+
|
|
171
|
+
interface DonutChartProps {
|
|
172
|
+
data: ChartDatum[];
|
|
173
|
+
height?: number;
|
|
174
|
+
centerLabel?: string;
|
|
175
|
+
ariaLabel?: string;
|
|
176
|
+
showLegend?: boolean;
|
|
177
|
+
formatValue?: (value: number) => string;
|
|
178
|
+
style?: CSSProperties;
|
|
179
|
+
}
|
|
180
|
+
declare function DonutChart({ data, height, centerLabel, ariaLabel, showLegend, formatValue, style, }: DonutChartProps): React.JSX.Element;
|
|
181
|
+
|
|
182
|
+
interface TimeSeriesDatum {
|
|
183
|
+
date: string;
|
|
184
|
+
value: number;
|
|
185
|
+
series?: string;
|
|
186
|
+
id?: string;
|
|
187
|
+
}
|
|
188
|
+
interface TimeSeriesChartProps {
|
|
189
|
+
data: TimeSeriesDatum[];
|
|
190
|
+
type?: "line" | "area" | "step";
|
|
191
|
+
smooth?: boolean;
|
|
192
|
+
height?: number;
|
|
193
|
+
colors?: readonly string[];
|
|
194
|
+
ariaLabel?: string;
|
|
195
|
+
showLegend?: boolean;
|
|
196
|
+
formatValue?: (value: number) => string;
|
|
197
|
+
formatDate?: (date: string) => string;
|
|
198
|
+
threshold?: number;
|
|
199
|
+
thresholdLabel?: string;
|
|
200
|
+
style?: CSSProperties;
|
|
201
|
+
}
|
|
202
|
+
declare function TimeSeriesChart({ data, type, smooth, height, colors: seriesColors, ariaLabel, showLegend, formatValue, formatDate, threshold, thresholdLabel, style, }: TimeSeriesChartProps): React.JSX.Element;
|
|
203
|
+
declare const LineChart: typeof TimeSeriesChart;
|
|
204
|
+
type LineChartProps = TimeSeriesChartProps;
|
|
205
|
+
|
|
206
|
+
interface BulletDatum {
|
|
207
|
+
label: string;
|
|
208
|
+
value: number;
|
|
209
|
+
target: number;
|
|
210
|
+
ranges?: number[];
|
|
211
|
+
max?: number;
|
|
212
|
+
id?: string;
|
|
213
|
+
}
|
|
214
|
+
interface BulletChartProps {
|
|
215
|
+
data: BulletDatum[];
|
|
216
|
+
height?: number;
|
|
217
|
+
ariaLabel?: string;
|
|
218
|
+
formatValue?: (value: number) => string;
|
|
219
|
+
style?: CSSProperties;
|
|
220
|
+
}
|
|
221
|
+
declare function BulletChart({ data, height, ariaLabel, formatValue, style, }: BulletChartProps): React.JSX.Element;
|
|
222
|
+
|
|
223
|
+
interface HistogramChartProps {
|
|
224
|
+
data: number[];
|
|
225
|
+
bins?: "auto" | number;
|
|
226
|
+
height?: number;
|
|
227
|
+
color?: string;
|
|
228
|
+
ariaLabel?: string;
|
|
229
|
+
style?: CSSProperties;
|
|
230
|
+
}
|
|
231
|
+
declare function HistogramChart({ data, bins, height, color, ariaLabel, style, }: HistogramChartProps): React.JSX.Element;
|
|
232
|
+
|
|
233
|
+
type SkeletonProps = SkeletonProps$1;
|
|
234
|
+
interface DetailsSkeletonProps {
|
|
235
|
+
/** Number of label/value placeholder rows. Default: 5 */
|
|
236
|
+
rows?: number;
|
|
237
|
+
/** Show an avatar + title block above the fields. */
|
|
238
|
+
avatar?: boolean;
|
|
239
|
+
}
|
|
240
|
+
declare function DetailsSkeleton({ rows, avatar }: DetailsSkeletonProps): React.JSX.Element;
|
|
241
|
+
declare namespace DetailsSkeleton {
|
|
242
|
+
var displayName: string;
|
|
243
|
+
}
|
|
244
|
+
interface SkeletonInterface extends React.FC<SkeletonProps> {
|
|
245
|
+
Button: typeof Skeleton$1.Button;
|
|
246
|
+
Avatar: typeof Skeleton$1.Avatar;
|
|
247
|
+
Input: typeof Skeleton$1.Input;
|
|
248
|
+
Image: typeof Skeleton$1.Image;
|
|
249
|
+
Node: typeof Skeleton$1.Node;
|
|
250
|
+
Details: typeof DetailsSkeleton;
|
|
251
|
+
}
|
|
252
|
+
declare const Skeleton: SkeletonInterface;
|
|
253
|
+
|
|
254
|
+
interface ModalProps extends ModalProps$1 {
|
|
255
|
+
children?: React.ReactNode;
|
|
256
|
+
}
|
|
257
|
+
interface ModalInterface extends React.FC<ModalProps> {
|
|
258
|
+
info: typeof Modal$1.info;
|
|
259
|
+
success: typeof Modal$1.success;
|
|
260
|
+
error: typeof Modal$1.error;
|
|
261
|
+
warning: typeof Modal$1.warning;
|
|
262
|
+
warn: typeof Modal$1.warn;
|
|
263
|
+
confirm: typeof Modal$1.confirm;
|
|
264
|
+
destroyAll: typeof Modal$1.destroyAll;
|
|
265
|
+
config: typeof Modal$1.config;
|
|
266
|
+
useModal: typeof Modal$1.useModal;
|
|
267
|
+
}
|
|
268
|
+
declare const Modal: ModalInterface;
|
|
269
|
+
|
|
270
|
+
type HeaderBreadcrumb = {
|
|
271
|
+
title: React.ReactNode;
|
|
272
|
+
href?: string;
|
|
273
|
+
onClick?: () => void;
|
|
274
|
+
};
|
|
275
|
+
type HeaderUser = {
|
|
276
|
+
name: string;
|
|
277
|
+
role?: string;
|
|
278
|
+
avatarSrc?: string;
|
|
279
|
+
};
|
|
280
|
+
type HeaderAction = {
|
|
281
|
+
key: string;
|
|
282
|
+
label: React.ReactNode;
|
|
283
|
+
variant?: ButtonVariant;
|
|
284
|
+
icon?: React.ReactNode;
|
|
285
|
+
onClick?: () => void;
|
|
286
|
+
href?: string;
|
|
287
|
+
disabled?: boolean;
|
|
288
|
+
danger?: boolean;
|
|
289
|
+
};
|
|
290
|
+
interface HeaderProps {
|
|
291
|
+
/** Page title on the left of the bar. */
|
|
292
|
+
title?: React.ReactNode;
|
|
293
|
+
/** Supporting text under the title. `description` is preferred. */
|
|
294
|
+
description?: React.ReactNode;
|
|
295
|
+
/** @deprecated Use `description`. */
|
|
296
|
+
subtitle?: React.ReactNode;
|
|
297
|
+
breadcrumbs?: HeaderBreadcrumb[];
|
|
298
|
+
/** Primary CTAs, rendered on the top-right of the bar. */
|
|
299
|
+
actions?: HeaderAction[];
|
|
300
|
+
/** Extra nodes after the CTA buttons (filters, custom controls). */
|
|
301
|
+
extra?: React.ReactNode;
|
|
302
|
+
/** Slot before the title — typically a mobile menu button. */
|
|
303
|
+
leading?: React.ReactNode;
|
|
304
|
+
user?: HeaderUser | null;
|
|
305
|
+
userMenu?: MenuProps;
|
|
306
|
+
onLogout?: () => void;
|
|
307
|
+
sticky?: boolean;
|
|
308
|
+
className?: string;
|
|
309
|
+
style?: React.CSSProperties;
|
|
310
|
+
}
|
|
311
|
+
declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLElement>>;
|
|
312
|
+
|
|
313
|
+
declare const indusActionLogo: string;
|
|
314
|
+
|
|
315
|
+
type SideNavItem = NonNullable<NonNullable<MenuProps["items"]>[number]>;
|
|
316
|
+
interface SideNavUser {
|
|
317
|
+
name: string;
|
|
318
|
+
role?: string;
|
|
319
|
+
avatarSrc?: string;
|
|
320
|
+
}
|
|
321
|
+
interface SideNavProps extends Omit<SiderProps, "children" | "breakpoint"> {
|
|
322
|
+
items?: MenuProps["items"];
|
|
323
|
+
menu?: Omit<MenuProps, "items" | "mode">;
|
|
324
|
+
user?: SideNavUser | null;
|
|
325
|
+
onLogout?: () => void;
|
|
326
|
+
logoutLabel?: string;
|
|
327
|
+
logoSrc?: string;
|
|
328
|
+
logoAlt?: string;
|
|
329
|
+
logo?: ReactNode;
|
|
330
|
+
/**
|
|
331
|
+
* Below this breakpoint the sider becomes a drawer (phone layout).
|
|
332
|
+
* Set `false` to always keep the desktop sider.
|
|
333
|
+
* @default "md"
|
|
334
|
+
*/
|
|
335
|
+
breakpoint?: SiderProps["breakpoint"] | false;
|
|
336
|
+
/**
|
|
337
|
+
* When false, skip the fixed mobile logo bar. Use when a parent header
|
|
338
|
+
* already provides a menu trigger (for example AppShell).
|
|
339
|
+
* @default true
|
|
340
|
+
*/
|
|
341
|
+
showMobileBar?: boolean;
|
|
342
|
+
/** Replace or hide (`null`) the default mobile menu button. */
|
|
343
|
+
mobileTrigger?: ReactNode | null;
|
|
344
|
+
mobileOpen?: boolean;
|
|
345
|
+
onMobileOpenChange?: (open: boolean) => void;
|
|
346
|
+
}
|
|
347
|
+
declare function SideNav({ items, menu, user, onLogout, logoutLabel, logoSrc, logoAlt, logo, width, theme, collapsed: collapsedProp, defaultCollapsed, onCollapse, collapsible, trigger, style, breakpoint, showMobileBar, mobileTrigger, mobileOpen: mobileOpenProp, onMobileOpenChange, ...siderProps }: SideNavProps): React.JSX.Element;
|
|
348
|
+
declare namespace SideNav {
|
|
349
|
+
var displayName: string;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
type StatusPageStatus = NonNullable<ResultProps["status"]>;
|
|
353
|
+
interface StatusPageProps {
|
|
354
|
+
status: StatusPageStatus;
|
|
355
|
+
title?: React.ReactNode;
|
|
356
|
+
subTitle?: React.ReactNode;
|
|
357
|
+
actionLabel?: string;
|
|
358
|
+
/** Click handler for the default action button. */
|
|
359
|
+
onAction?: () => void;
|
|
360
|
+
/** If set, the default action button renders as a link. */
|
|
361
|
+
actionHref?: string;
|
|
362
|
+
/** Replaces the default action button. */
|
|
363
|
+
extra?: React.ReactNode;
|
|
364
|
+
/** Fill the viewport and center the result. Default: true. */
|
|
365
|
+
fullPage?: boolean;
|
|
366
|
+
className?: string;
|
|
367
|
+
style?: React.CSSProperties;
|
|
368
|
+
}
|
|
369
|
+
declare function StatusPage({ status, title, subTitle, actionLabel, onAction, actionHref, extra, fullPage, className, style, }: StatusPageProps): React.JSX.Element;
|
|
370
|
+
declare namespace StatusPage {
|
|
371
|
+
var displayName: string;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
type NotFoundPageProps = Omit<StatusPageProps, "status">;
|
|
375
|
+
declare function NotFoundPage({ title, subTitle, actionLabel, actionHref, onAction, extra, ...rest }: NotFoundPageProps): React.JSX.Element;
|
|
376
|
+
declare namespace NotFoundPage {
|
|
377
|
+
var displayName: string;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
type UnauthorizedPageProps = Omit<StatusPageProps, "status">;
|
|
381
|
+
declare function UnauthorizedPage({ title, subTitle, actionLabel, actionHref, onAction, extra, ...rest }: UnauthorizedPageProps): React.JSX.Element;
|
|
382
|
+
declare namespace UnauthorizedPage {
|
|
383
|
+
var displayName: string;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
type InlineAlertType = "success" | "info" | "warning" | "error";
|
|
387
|
+
type InlineAlertVariant = "outlined" | "filled";
|
|
388
|
+
interface InlineAlertProps extends Omit<AlertProps, "variant"> {
|
|
389
|
+
type?: InlineAlertType;
|
|
390
|
+
variant?: InlineAlertVariant;
|
|
391
|
+
showIcon?: boolean;
|
|
392
|
+
}
|
|
393
|
+
declare const InlineAlert: React.ForwardRefExoticComponent<InlineAlertProps & React.RefAttributes<antd_es_alert_Alert.AlertRef>>;
|
|
394
|
+
type ToastApi = ReturnType<typeof message.useMessage>[0];
|
|
395
|
+
type ToastConfig = Parameters<ToastApi["open"]>[0];
|
|
396
|
+
type ToastTypeMethod = ToastApi["success"];
|
|
397
|
+
type AntNotificationConfig = Parameters<ReturnType<typeof notification.useNotification>[0]["open"]>[0];
|
|
398
|
+
type NotificationPlacement = NonNullable<AntNotificationConfig["placement"]>;
|
|
399
|
+
interface NotificationConfig extends Omit<AntNotificationConfig, "btn"> {
|
|
400
|
+
actions?: ReactNode;
|
|
401
|
+
btn?: ReactNode;
|
|
402
|
+
}
|
|
403
|
+
type NotificationApi = Omit<ReturnType<typeof notification.useNotification>[0], "open" | "success" | "error" | "info" | "warning"> & {
|
|
404
|
+
open: (config: NotificationConfig) => void;
|
|
405
|
+
success: (config: NotificationConfig) => void;
|
|
406
|
+
error: (config: NotificationConfig) => void;
|
|
407
|
+
info: (config: NotificationConfig) => void;
|
|
408
|
+
warning: (config: NotificationConfig) => void;
|
|
409
|
+
};
|
|
410
|
+
type NotificationTypeMethod = NotificationApi["success"];
|
|
411
|
+
interface NotificationContextValue {
|
|
412
|
+
toast: ToastApi;
|
|
413
|
+
notify: NotificationApi;
|
|
414
|
+
}
|
|
415
|
+
interface NotificationProviderProps {
|
|
416
|
+
children: ReactNode;
|
|
417
|
+
}
|
|
418
|
+
declare const useNotification: () => NotificationContextValue;
|
|
419
|
+
declare const useNotifications: () => NotificationContextValue;
|
|
420
|
+
interface NotificationProviderComponent extends React.FC<NotificationProviderProps> {
|
|
421
|
+
Alert: typeof InlineAlert;
|
|
422
|
+
}
|
|
423
|
+
declare const NotificationProvider: NotificationProviderComponent;
|
|
424
|
+
|
|
13
425
|
declare const colors: {
|
|
14
426
|
readonly brand: {
|
|
15
427
|
readonly primary: "#596993";
|
|
16
428
|
readonly primaryHover: "#6B7BA5";
|
|
17
429
|
readonly primaryActive: "#4A587C";
|
|
18
430
|
readonly primaryLight: "#E8EBF2";
|
|
431
|
+
readonly accent: "#F69120";
|
|
19
432
|
};
|
|
20
433
|
readonly neutral: {
|
|
21
434
|
readonly white: "#FFFFFF";
|
|
@@ -38,13 +451,59 @@ declare const colors: {
|
|
|
38
451
|
readonly info: "#596993";
|
|
39
452
|
};
|
|
40
453
|
};
|
|
454
|
+
declare const spacing: {
|
|
455
|
+
readonly none: 0;
|
|
456
|
+
readonly xxs: 4;
|
|
457
|
+
readonly xs: 8;
|
|
458
|
+
readonly sm: 12;
|
|
459
|
+
readonly md: 16;
|
|
460
|
+
readonly lg: 24;
|
|
461
|
+
readonly xl: 32;
|
|
462
|
+
readonly xxl: 48;
|
|
463
|
+
};
|
|
464
|
+
declare const fontSize: {
|
|
465
|
+
readonly xxs: 11;
|
|
466
|
+
readonly xs: 12;
|
|
467
|
+
readonly sm: 14;
|
|
468
|
+
readonly md: 16;
|
|
469
|
+
readonly lg: 20;
|
|
470
|
+
readonly xl: 24;
|
|
471
|
+
readonly xxl: 30;
|
|
472
|
+
};
|
|
473
|
+
/** Viewport min-widths. Matches Ant Design's `Grid` / `Sider` breakpoint names. */
|
|
474
|
+
declare const breakpoints: {
|
|
475
|
+
readonly xs: 480;
|
|
476
|
+
readonly sm: 576;
|
|
477
|
+
readonly md: 768;
|
|
478
|
+
readonly lg: 992;
|
|
479
|
+
readonly xl: 1200;
|
|
480
|
+
readonly xxl: 1600;
|
|
481
|
+
};
|
|
41
482
|
type Colors = typeof colors;
|
|
42
|
-
|
|
483
|
+
type Spacing = typeof spacing;
|
|
484
|
+
type FontSize = typeof fontSize;
|
|
485
|
+
type Breakpoints = typeof breakpoints;
|
|
486
|
+
/**
|
|
487
|
+
* Seed + map tokens only. Ant Design's algorithm applies these to Button,
|
|
488
|
+
* Menu, Layout, and every other component — no per-component lists.
|
|
489
|
+
*/
|
|
43
490
|
declare const theme: ThemeConfig;
|
|
44
|
-
|
|
45
491
|
interface ThemeProviderProps {
|
|
46
492
|
children: React.ReactNode;
|
|
47
493
|
}
|
|
48
|
-
declare function ThemeProvider({ children }: ThemeProviderProps): React.
|
|
494
|
+
declare function ThemeProvider({ children }: ThemeProviderProps): React.FunctionComponentElement<antd.ConfigProviderProps>;
|
|
495
|
+
|
|
496
|
+
type IconProps = {
|
|
497
|
+
size?: number;
|
|
498
|
+
className?: string;
|
|
499
|
+
style?: React.CSSProperties;
|
|
500
|
+
};
|
|
501
|
+
declare function LogoutIcon({ size, className, style }: IconProps): React.JSX.Element;
|
|
502
|
+
declare function CollapseIcon({ collapsed, size, className, style, }: IconProps & {
|
|
503
|
+
collapsed?: boolean;
|
|
504
|
+
}): React.JSX.Element;
|
|
505
|
+
declare function MenuIcon({ size, className, style }: IconProps): React.JSX.Element;
|
|
506
|
+
declare function CloseIcon({ size, className, style }: IconProps): React.JSX.Element;
|
|
507
|
+
declare function DownloadIcon({ size, className, style }: IconProps): React.JSX.Element;
|
|
49
508
|
|
|
50
|
-
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, type Colors, ThemeProvider, type ThemeProviderProps, colors, theme };
|
|
509
|
+
export { BarChart, type BarChartProps, type Breakpoints, BulletChart, type BulletChartProps, type BulletDatum, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type ChartDatum, CloseIcon, CollapseIcon, type Colors, ColumnChart, type ColumnChartProps, type DetailsSkeletonProps, DonutChart, type DonutChartProps, DownloadIcon, Dropdown, type DropdownButtonProps, type DropdownInterface, type DropdownProps, type FontSize, type GroupedChartDatum, Header, type HeaderAction, type HeaderBreadcrumb, type HeaderProps, type HeaderUser, HistogramChart, type HistogramChartProps, InlineAlert, type InlineAlertProps, type InlineAlertType, type InlineAlertVariant, LineChart, type LineChartProps, Link, type LinkProps, LogoutIcon, MenuIcon, MetricCard, type MetricCardLayout, type MetricCardProps, type MetricCardSize, type MetricCardStatus, type MetricCardVariant, Modal, type ModalInterface, type ModalProps, NotFoundPage, type NotFoundPageProps, type NotificationApi, type NotificationConfig, type NotificationContextValue, type NotificationPlacement, NotificationProvider, type NotificationProviderComponent, type NotificationProviderProps, type NotificationTypeMethod, SideNav, type SideNavItem, type SideNavProps, type SideNavUser, Skeleton, type SkeletonInterface, type SkeletonProps, type Spacing, StatusPage, type StatusPageProps, type StatusPageStatus, Table, type TableColumnGroupType, type TableColumnType, type TableColumnsType, type TableMode, type TableProps, type TableQuery, type TableSearchConfig, type TableSortOrder, Tabs, type TabsProps, Tag, type TagProps, ThemeProvider, type ThemeProviderProps, TimeSeriesChart, type TimeSeriesChartProps, type TimeSeriesDatum, type ToastApi, type ToastConfig, type ToastTypeMethod, UnauthorizedPage, type UnauthorizedPageProps, breakpoints, colors, fontSize, indusActionLogo, spacing, theme, useNotification, useNotifications };
|