nntc-ui 0.0.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 +52 -0
- package/chunk-RKPZOIBV.js +172 -0
- package/icons/index.d.ts +67 -0
- package/icons/index.js +62 -0
- package/index.css +1727 -0
- package/index.d.ts +348 -0
- package/index.js +2933 -0
- package/package.json +91 -0
- package/styles/global.css +148 -0
- package/styles/themes/dark.css +97 -0
- package/styles/themes/light.css +97 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, DetailedHTMLProps, InputHTMLAttributes, PropsWithChildren, ChangeEvent, JSX, HTMLProps, ElementType } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { Placement } from '@floating-ui/react';
|
|
5
|
+
|
|
6
|
+
type PropsObject = {
|
|
7
|
+
[key: string]: string | PropsObject;
|
|
8
|
+
};
|
|
9
|
+
type UiProps<P = unknown> = P & {
|
|
10
|
+
classes?: PropsObject;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type Variant$7 = 'filled' | 'outlined' | 'text' | 'elevated' | 'tonal' | 'link';
|
|
14
|
+
type Size$9 = 'medium' | 'small';
|
|
15
|
+
interface Props$m {
|
|
16
|
+
variant?: Variant$7;
|
|
17
|
+
size?: Size$9;
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
textSecondary?: boolean;
|
|
20
|
+
isActive?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & ButtonHTMLAttributes<HTMLButtonElement> & Props$m & {
|
|
23
|
+
classes?: PropsObject;
|
|
24
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
|
|
26
|
+
type Size$8 = 'medium' | 'large';
|
|
27
|
+
interface Props$l {
|
|
28
|
+
label?: string;
|
|
29
|
+
componentSize?: Size$8;
|
|
30
|
+
several?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare function Checkbox(props: UiProps<Props$l> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
interface Divider$1 {
|
|
35
|
+
type: 'divider';
|
|
36
|
+
name?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type Maybe<T> = T | null | undefined;
|
|
40
|
+
|
|
41
|
+
interface Item$5 {
|
|
42
|
+
type: 'item';
|
|
43
|
+
name: string;
|
|
44
|
+
value: string;
|
|
45
|
+
icon?: ReactNode;
|
|
46
|
+
description?: string;
|
|
47
|
+
selected?: boolean;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
}
|
|
50
|
+
type MaybeItem = Maybe<Item$5>;
|
|
51
|
+
|
|
52
|
+
type Variant$6 = 'filled' | 'outlined';
|
|
53
|
+
type Size$7 = 'medium' | 'small';
|
|
54
|
+
interface Props$k {
|
|
55
|
+
variant?: Variant$6;
|
|
56
|
+
componentSize?: Size$7;
|
|
57
|
+
icon?: ReactNode;
|
|
58
|
+
fullWidth?: boolean;
|
|
59
|
+
label?: string;
|
|
60
|
+
placeholder?: string;
|
|
61
|
+
items: (Item$5 | Divider$1)[];
|
|
62
|
+
onValueChange?: (newItem: MaybeItem) => void;
|
|
63
|
+
selected?: MaybeItem;
|
|
64
|
+
}
|
|
65
|
+
declare function Select(props: UiProps<Props$k> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
66
|
+
|
|
67
|
+
type Variant$5 = 'filled' | 'outlined';
|
|
68
|
+
type Size$6 = 'medium' | 'small';
|
|
69
|
+
interface Props$j {
|
|
70
|
+
variant?: Variant$5;
|
|
71
|
+
componentSize?: Size$6;
|
|
72
|
+
fullWidth?: boolean;
|
|
73
|
+
placeholder?: string;
|
|
74
|
+
values?: (string | undefined)[];
|
|
75
|
+
defaultValues?: (string | undefined)[];
|
|
76
|
+
onClear?: () => void;
|
|
77
|
+
onValueChange?: (values: (string | undefined)[]) => void;
|
|
78
|
+
}
|
|
79
|
+
declare function DateTime(props: UiProps<Props$j> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
type Variant$4 = 'outlined';
|
|
82
|
+
type Size$5 = 'medium' | 'small';
|
|
83
|
+
interface Props$i {
|
|
84
|
+
variant?: Variant$4;
|
|
85
|
+
componentSize?: Size$5;
|
|
86
|
+
fullWidth?: boolean;
|
|
87
|
+
label?: string;
|
|
88
|
+
onValueChange?: (newValue: string) => void;
|
|
89
|
+
}
|
|
90
|
+
declare const ColorPicker: (props: UiProps<Props$i> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => react_jsx_runtime.JSX.Element;
|
|
91
|
+
|
|
92
|
+
type Variant$3 = 'outlined';
|
|
93
|
+
type Size$4 = 'medium' | 'small';
|
|
94
|
+
interface Props$h {
|
|
95
|
+
variant?: Variant$3;
|
|
96
|
+
componentSize?: Size$4;
|
|
97
|
+
fullWidth?: boolean;
|
|
98
|
+
label?: string;
|
|
99
|
+
}
|
|
100
|
+
declare const Input: (props: UiProps<Props$h> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => react_jsx_runtime.JSX.Element;
|
|
101
|
+
|
|
102
|
+
type Variant$2 = 'filled' | 'outlined';
|
|
103
|
+
type Size$3 = 'medium' | 'small';
|
|
104
|
+
interface Props$g {
|
|
105
|
+
variant?: Variant$2;
|
|
106
|
+
componentSize?: Size$3;
|
|
107
|
+
disableIcon?: boolean;
|
|
108
|
+
fullWidth?: boolean;
|
|
109
|
+
}
|
|
110
|
+
declare function SearchInput(props: UiProps<Props$g> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
111
|
+
|
|
112
|
+
type Size$2 = 'medium' | 'small';
|
|
113
|
+
interface Props$f {
|
|
114
|
+
componentSize?: Size$2;
|
|
115
|
+
}
|
|
116
|
+
declare const WrapForLabel: (props: UiProps<PropsWithChildren<Props$f>>) => react_jsx_runtime.JSX.Element;
|
|
117
|
+
|
|
118
|
+
interface Item$4 {
|
|
119
|
+
name: string;
|
|
120
|
+
value: string;
|
|
121
|
+
description?: string;
|
|
122
|
+
selected?: boolean;
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
type TitleVariant = 'allValue' | 'numberValue' | 'firstValue';
|
|
127
|
+
|
|
128
|
+
type Variant$1 = 'filled' | 'outlined';
|
|
129
|
+
type Size$1 = 'medium' | 'small';
|
|
130
|
+
interface Props$e {
|
|
131
|
+
variant?: Variant$1;
|
|
132
|
+
componentSize?: Size$1;
|
|
133
|
+
icon?: ReactNode;
|
|
134
|
+
fullWidth?: boolean;
|
|
135
|
+
label?: string;
|
|
136
|
+
placeholder?: string;
|
|
137
|
+
items: Item$4[];
|
|
138
|
+
onValueChange?: (newItem: string[] | null) => void;
|
|
139
|
+
selected: string[] | null;
|
|
140
|
+
titleType?: TitleVariant;
|
|
141
|
+
}
|
|
142
|
+
declare function MultiSelect(props: UiProps<Props$e> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
143
|
+
|
|
144
|
+
interface Item$3 {
|
|
145
|
+
name: string;
|
|
146
|
+
value: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
interface SelectedItems {
|
|
150
|
+
[keys: string]: boolean;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
interface Props$d {
|
|
154
|
+
items: Item$3[];
|
|
155
|
+
selected: SelectedItems;
|
|
156
|
+
disableSearch?: boolean;
|
|
157
|
+
isDisabled?: boolean;
|
|
158
|
+
actionWithSelected: (value: SelectedItems) => void;
|
|
159
|
+
onChangeItem?: (item: Item$3) => void;
|
|
160
|
+
}
|
|
161
|
+
declare function Checklist(props: UiProps<Props$d>): react_jsx_runtime.JSX.Element;
|
|
162
|
+
|
|
163
|
+
interface Props$c {
|
|
164
|
+
}
|
|
165
|
+
declare const ButtonsGroup: (props: PropsWithChildren<UiProps<Props$c>>) => react_jsx_runtime.JSX.Element;
|
|
166
|
+
|
|
167
|
+
interface Props$b {
|
|
168
|
+
type?: 'primary' | 'panel' | 'modal';
|
|
169
|
+
}
|
|
170
|
+
declare function Surface(props: PropsWithChildren<UiProps<Props$b>>): react_jsx_runtime.JSX.Element;
|
|
171
|
+
|
|
172
|
+
interface Props$a {
|
|
173
|
+
withoutHeader?: boolean;
|
|
174
|
+
}
|
|
175
|
+
declare function Layout(props: PropsWithChildren<UiProps<Props$a>>): react_jsx_runtime.JSX.Element;
|
|
176
|
+
|
|
177
|
+
interface Divider {
|
|
178
|
+
type: 'divider';
|
|
179
|
+
name?: string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
interface Item$2 {
|
|
183
|
+
type: 'item';
|
|
184
|
+
name: string;
|
|
185
|
+
icon?: ReactNode;
|
|
186
|
+
description?: string;
|
|
187
|
+
onClick?: () => void;
|
|
188
|
+
selected?: boolean;
|
|
189
|
+
disabled?: boolean;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
type Size = 'medium' | 'small';
|
|
193
|
+
interface Props$9 {
|
|
194
|
+
items: (Item$2 | Divider)[];
|
|
195
|
+
size?: Size;
|
|
196
|
+
}
|
|
197
|
+
declare function Menu(props: UiProps<Props$9>): react_jsx_runtime.JSX.Element;
|
|
198
|
+
|
|
199
|
+
interface Item$1<T> {
|
|
200
|
+
name: string;
|
|
201
|
+
value: T;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
interface Props$8<T> {
|
|
205
|
+
items: Item$1<T>[];
|
|
206
|
+
defaultSelected?: T;
|
|
207
|
+
onChange?: (newValue: T) => void;
|
|
208
|
+
}
|
|
209
|
+
declare function Tabs<T>(props: UiProps<Props$8<T>>): react_jsx_runtime.JSX.Element;
|
|
210
|
+
|
|
211
|
+
interface TableCell {
|
|
212
|
+
value?: string | number;
|
|
213
|
+
error?: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
interface TableRow {
|
|
217
|
+
[keys: string]: TableCell;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
interface AdditionalButton {
|
|
221
|
+
title: string;
|
|
222
|
+
onClick?: (rowIndex: number, original: TableRow) => void;
|
|
223
|
+
icon: ReactNode;
|
|
224
|
+
template?: (props: AdditionalButton) => ReactNode;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
type ColumnAlign = 'Left' | 'Right' | 'Center';
|
|
228
|
+
|
|
229
|
+
type VerticalAlign = 'FlexStart' | 'Center' | 'FlexEnd';
|
|
230
|
+
|
|
231
|
+
interface TableColumn {
|
|
232
|
+
id: string;
|
|
233
|
+
accessorKey?: string;
|
|
234
|
+
label: string;
|
|
235
|
+
columns?: TableColumn[];
|
|
236
|
+
editable?: boolean;
|
|
237
|
+
sortable?: boolean;
|
|
238
|
+
sortAnotherName?: string;
|
|
239
|
+
filterable?: boolean;
|
|
240
|
+
width?: number;
|
|
241
|
+
headerAlign?: ColumnAlign;
|
|
242
|
+
rowsAlign?: ColumnAlign;
|
|
243
|
+
valueFormat?: (value: string) => string;
|
|
244
|
+
showInModal?: boolean;
|
|
245
|
+
verticalAlign?: VerticalAlign;
|
|
246
|
+
toFixed?: number;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
interface Props$7 {
|
|
250
|
+
rows: TableRow[];
|
|
251
|
+
columns: TableColumn[];
|
|
252
|
+
additionalColumnsViews?: (id: string, value: string | number | undefined) => {
|
|
253
|
+
edit: ((onChange: (e: ChangeEvent) => void, onBlur: () => void) => JSX.Element | null) | null;
|
|
254
|
+
view: JSX.Element | null;
|
|
255
|
+
};
|
|
256
|
+
onChangeCell?: (rowIndex: number, columnId: string, value: string | number | undefined, original?: TableRow) => void;
|
|
257
|
+
cellWidth?: (columnIndex: number) => number;
|
|
258
|
+
rowButtons?: ((original: TableRow) => AdditionalButton[]) | undefined;
|
|
259
|
+
fixedColumnsCount?: 0 | 1 | 2;
|
|
260
|
+
headerRowHeight?: number[];
|
|
261
|
+
bodyRowHeight?: number;
|
|
262
|
+
rowActionWidth?: number;
|
|
263
|
+
dynamicRowHeight?: boolean;
|
|
264
|
+
}
|
|
265
|
+
declare function VirtualTable(props: UiProps<Props$7>): react_jsx_runtime.JSX.Element;
|
|
266
|
+
|
|
267
|
+
interface FilterBy {
|
|
268
|
+
columnName: string;
|
|
269
|
+
values: string[];
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
interface SortBy {
|
|
273
|
+
columnName: string;
|
|
274
|
+
direction: 'asc' | 'desc';
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
interface Item {
|
|
278
|
+
id: string;
|
|
279
|
+
name: string;
|
|
280
|
+
type?: string;
|
|
281
|
+
isSelectable?: boolean;
|
|
282
|
+
children?: Item[];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
interface Props$6 {
|
|
286
|
+
data: Item[];
|
|
287
|
+
selected: string[];
|
|
288
|
+
startIcons?: Record<string, JSX.Element>;
|
|
289
|
+
withSearch?: boolean;
|
|
290
|
+
onSelect?: (id: string) => void;
|
|
291
|
+
}
|
|
292
|
+
declare const _default: React.NamedExoticComponent<Props$6>;
|
|
293
|
+
|
|
294
|
+
interface Props$5 {
|
|
295
|
+
label?: ReactNode | string;
|
|
296
|
+
clickable?: boolean;
|
|
297
|
+
initialOpen?: boolean;
|
|
298
|
+
placement?: Placement;
|
|
299
|
+
withoutArrow?: boolean;
|
|
300
|
+
wrapTrigger?: boolean;
|
|
301
|
+
alertType?: 'success' | 'warning' | 'error' | 'info' | 'default';
|
|
302
|
+
}
|
|
303
|
+
declare function Tooltip(props: PropsWithChildren<UiProps<Props$5>>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
304
|
+
|
|
305
|
+
interface Props$4 {
|
|
306
|
+
description?: ReactNode | string;
|
|
307
|
+
clickable?: boolean;
|
|
308
|
+
initialOpen?: boolean;
|
|
309
|
+
placement?: Placement;
|
|
310
|
+
wrapTrigger?: boolean;
|
|
311
|
+
containerOffset?: number;
|
|
312
|
+
}
|
|
313
|
+
declare function Popover(props: PropsWithChildren<UiProps<Props$4>>): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
|
|
314
|
+
|
|
315
|
+
type Pair = {
|
|
316
|
+
label: string;
|
|
317
|
+
value: string | number;
|
|
318
|
+
} | null;
|
|
319
|
+
|
|
320
|
+
interface Props$3 {
|
|
321
|
+
pairs: Pair[];
|
|
322
|
+
column1Width?: string;
|
|
323
|
+
column2Width?: string;
|
|
324
|
+
showBorder?: boolean;
|
|
325
|
+
minRowHeight?: string;
|
|
326
|
+
}
|
|
327
|
+
declare function Pairs(props: UiProps<Props$3>): react_jsx_runtime.JSX.Element;
|
|
328
|
+
|
|
329
|
+
interface Props$2 {
|
|
330
|
+
surfaceType?: 'primary' | 'panel' | 'modal';
|
|
331
|
+
title?: ReactNode;
|
|
332
|
+
actions?: ReactNode;
|
|
333
|
+
}
|
|
334
|
+
declare function Card(props: PropsWithChildren<UiProps<Props$2>>): react_jsx_runtime.JSX.Element;
|
|
335
|
+
|
|
336
|
+
type Variant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'button' | 'caption' | 'overline';
|
|
337
|
+
interface Props$1 {
|
|
338
|
+
variant?: Variant;
|
|
339
|
+
component?: ElementType;
|
|
340
|
+
}
|
|
341
|
+
declare const Typography: React.ForwardRefExoticComponent<Omit<HTMLProps<HTMLParagraphElement> & Props$1, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
342
|
+
|
|
343
|
+
interface Props {
|
|
344
|
+
close: () => void;
|
|
345
|
+
}
|
|
346
|
+
declare function Modal(props: PropsWithChildren<UiProps<Props>>): react_jsx_runtime.JSX.Element;
|
|
347
|
+
|
|
348
|
+
export { type AdditionalButton, Button, ButtonsGroup, Card, Checkbox, Checklist, type Item$3 as ChecklistItem, type SelectedItems as ChecklistSelectedItems, ColorPicker, type ColumnAlign, DateTime, type FilterBy, Input, Layout, Menu, type Divider as MenuDivider, type Item$2 as MenuItem, Modal, MultiSelect, type Item$4 as MultiSelectItem, type TitleVariant as MultiSelectTitleVariant, type Pair, Pairs, Popover, SearchInput, Select, type Divider$1 as SelectDivider, type Item$5 as SelectItem, type SortBy, Surface, type TableCell, type TableColumn, type TableRow, Tabs, type Item$1 as TabsItem, Tooltip, _default as TreeView, type Item as TreeViewItem, Typography, type VerticalAlign, VirtualTable, WrapForLabel };
|