@majoo-ui/react 1.52.9 → 1.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import type * as Stitches from '@stitches/react';
3
3
  import { CSS } from '../../config/stitches.config';
4
4
  export declare const ButtonPrimitive: import("@stitches/react/types/styled-component").StyledComponent<"button", {
5
- buttonType?: "primary" | "secondary" | "ghost" | "negative" | "negative-secondary" | "negative-ghost" | "headerMenu" | "tableMenu" | undefined;
5
+ buttonType?: "primary" | "secondary" | "ghost" | "ghost-secondary" | "negative" | "negative-secondary" | "negative-ghost" | "headerMenu" | "tableMenu" | undefined;
6
6
  size?: "sm" | "md" | "lg" | "xs" | undefined;
7
7
  iconSize?: "sm" | "md" | "lg" | "xs" | undefined;
8
8
  }, {
@@ -129,7 +129,7 @@ interface AdditionalButtonProps extends React.ComponentPropsWithoutRef<'button'>
129
129
  css?: CSS;
130
130
  }
131
131
  export declare const Button: React.ForwardRefExoticComponent<import("@stitches/react/types/styled-component").TransformProps<{
132
- buttonType?: "primary" | "secondary" | "ghost" | "negative" | "negative-secondary" | "negative-ghost" | "headerMenu" | "tableMenu" | undefined;
132
+ buttonType?: "primary" | "secondary" | "ghost" | "ghost-secondary" | "negative" | "negative-secondary" | "negative-ghost" | "headerMenu" | "tableMenu" | undefined;
133
133
  size?: "sm" | "md" | "lg" | "xs" | undefined;
134
134
  iconSize?: "sm" | "md" | "lg" | "xs" | undefined;
135
135
  }, {
@@ -0,0 +1,400 @@
1
+ /// <reference types="react" />
2
+ interface TriggerProps {
3
+ id: string;
4
+ triggerSide?: 'left' | 'right';
5
+ children?: JSX.Element | string;
6
+ }
7
+ interface MenuProps {
8
+ id: string;
9
+ children?: JSX.Element | JSX.Element[];
10
+ }
11
+ interface ItemProps {
12
+ children?: JSX.Element | string;
13
+ data?: object;
14
+ onClick?: (e: any, data: any) => void;
15
+ }
16
+ export declare const ContextMenuTrigger: import("@stitches/react/types/styled-component").StyledComponent<(props: TriggerProps) => JSX.Element, {}, {
17
+ sm: "(min-width: 359px)";
18
+ md: "(min-width: 767px)";
19
+ lg: "(min-width: 1023px)";
20
+ xl: "(min-width: 1199px)";
21
+ '2xl': "(min-width: 1399px)";
22
+ '3xl': "(min-width: 1600px)";
23
+ }, import("@stitches/react/types/css-util").CSS<{
24
+ sm: "(min-width: 359px)";
25
+ md: "(min-width: 767px)";
26
+ lg: "(min-width: 1023px)";
27
+ xl: "(min-width: 1199px)";
28
+ '2xl': "(min-width: 1399px)";
29
+ '3xl': "(min-width: 1600px)";
30
+ }, {
31
+ colors: unknown;
32
+ space: unknown;
33
+ shadows: unknown;
34
+ fontSizes: unknown;
35
+ fonts: unknown;
36
+ lineHeights: unknown;
37
+ letterSpacings: unknown;
38
+ radii: unknown;
39
+ sizes: unknown;
40
+ zIndices: unknown;
41
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
42
+ m: (value: {
43
+ readonly [$$ScaleValue]: "space";
44
+ }) => {
45
+ margin: {
46
+ readonly [$$ScaleValue]: "space";
47
+ };
48
+ };
49
+ mt: (value: {
50
+ readonly [$$ScaleValue]: "space";
51
+ }) => {
52
+ marginTop: {
53
+ readonly [$$ScaleValue]: "space";
54
+ };
55
+ };
56
+ mr: (value: {
57
+ readonly [$$ScaleValue]: "space";
58
+ }) => {
59
+ marginRight: {
60
+ readonly [$$ScaleValue]: "space";
61
+ };
62
+ };
63
+ mb: (value: {
64
+ readonly [$$ScaleValue]: "space";
65
+ }) => {
66
+ marginBottom: {
67
+ readonly [$$ScaleValue]: "space";
68
+ };
69
+ };
70
+ ml: (value: {
71
+ readonly [$$ScaleValue]: "space";
72
+ }) => {
73
+ marginLeft: {
74
+ readonly [$$ScaleValue]: "space";
75
+ };
76
+ };
77
+ mx: (value: {
78
+ readonly [$$ScaleValue]: "space";
79
+ }) => {
80
+ marginLeft: {
81
+ readonly [$$ScaleValue]: "space";
82
+ };
83
+ marginRight: {
84
+ readonly [$$ScaleValue]: "space";
85
+ };
86
+ };
87
+ my: (value: {
88
+ readonly [$$ScaleValue]: "space";
89
+ }) => {
90
+ marginTop: {
91
+ readonly [$$ScaleValue]: "space";
92
+ };
93
+ marginBottom: {
94
+ readonly [$$ScaleValue]: "space";
95
+ };
96
+ };
97
+ size: (value: {
98
+ readonly [$$PropertyValue]: "width";
99
+ }) => {
100
+ width: {
101
+ readonly [$$PropertyValue]: "width";
102
+ };
103
+ height: {
104
+ readonly [$$PropertyValue]: "width";
105
+ };
106
+ };
107
+ subtleColor: (value: string) => {
108
+ color: string;
109
+ backgroundColor: string;
110
+ };
111
+ }>>;
112
+ export declare const ContextMenu: import("@stitches/react/types/styled-component").StyledComponent<(props: MenuProps) => JSX.Element, {}, {
113
+ sm: "(min-width: 359px)";
114
+ md: "(min-width: 767px)";
115
+ lg: "(min-width: 1023px)";
116
+ xl: "(min-width: 1199px)";
117
+ '2xl': "(min-width: 1399px)";
118
+ '3xl': "(min-width: 1600px)";
119
+ }, import("@stitches/react/types/css-util").CSS<{
120
+ sm: "(min-width: 359px)";
121
+ md: "(min-width: 767px)";
122
+ lg: "(min-width: 1023px)";
123
+ xl: "(min-width: 1199px)";
124
+ '2xl': "(min-width: 1399px)";
125
+ '3xl': "(min-width: 1600px)";
126
+ }, {
127
+ colors: unknown;
128
+ space: unknown;
129
+ shadows: unknown;
130
+ fontSizes: unknown;
131
+ fonts: unknown;
132
+ lineHeights: unknown;
133
+ letterSpacings: unknown;
134
+ radii: unknown;
135
+ sizes: unknown;
136
+ zIndices: unknown;
137
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
138
+ m: (value: {
139
+ readonly [$$ScaleValue]: "space";
140
+ }) => {
141
+ margin: {
142
+ readonly [$$ScaleValue]: "space";
143
+ };
144
+ };
145
+ mt: (value: {
146
+ readonly [$$ScaleValue]: "space";
147
+ }) => {
148
+ marginTop: {
149
+ readonly [$$ScaleValue]: "space";
150
+ };
151
+ };
152
+ mr: (value: {
153
+ readonly [$$ScaleValue]: "space";
154
+ }) => {
155
+ marginRight: {
156
+ readonly [$$ScaleValue]: "space";
157
+ };
158
+ };
159
+ mb: (value: {
160
+ readonly [$$ScaleValue]: "space";
161
+ }) => {
162
+ marginBottom: {
163
+ readonly [$$ScaleValue]: "space";
164
+ };
165
+ };
166
+ ml: (value: {
167
+ readonly [$$ScaleValue]: "space";
168
+ }) => {
169
+ marginLeft: {
170
+ readonly [$$ScaleValue]: "space";
171
+ };
172
+ };
173
+ mx: (value: {
174
+ readonly [$$ScaleValue]: "space";
175
+ }) => {
176
+ marginLeft: {
177
+ readonly [$$ScaleValue]: "space";
178
+ };
179
+ marginRight: {
180
+ readonly [$$ScaleValue]: "space";
181
+ };
182
+ };
183
+ my: (value: {
184
+ readonly [$$ScaleValue]: "space";
185
+ }) => {
186
+ marginTop: {
187
+ readonly [$$ScaleValue]: "space";
188
+ };
189
+ marginBottom: {
190
+ readonly [$$ScaleValue]: "space";
191
+ };
192
+ };
193
+ size: (value: {
194
+ readonly [$$PropertyValue]: "width";
195
+ }) => {
196
+ width: {
197
+ readonly [$$PropertyValue]: "width";
198
+ };
199
+ height: {
200
+ readonly [$$PropertyValue]: "width";
201
+ };
202
+ };
203
+ subtleColor: (value: string) => {
204
+ color: string;
205
+ backgroundColor: string;
206
+ };
207
+ }>>;
208
+ export declare const ContextMenuItem: import("@stitches/react/types/styled-component").StyledComponent<(props: ItemProps) => JSX.Element, {}, {
209
+ sm: "(min-width: 359px)";
210
+ md: "(min-width: 767px)";
211
+ lg: "(min-width: 1023px)";
212
+ xl: "(min-width: 1199px)";
213
+ '2xl': "(min-width: 1399px)";
214
+ '3xl': "(min-width: 1600px)";
215
+ }, import("@stitches/react/types/css-util").CSS<{
216
+ sm: "(min-width: 359px)";
217
+ md: "(min-width: 767px)";
218
+ lg: "(min-width: 1023px)";
219
+ xl: "(min-width: 1199px)";
220
+ '2xl': "(min-width: 1399px)";
221
+ '3xl': "(min-width: 1600px)";
222
+ }, {
223
+ colors: unknown;
224
+ space: unknown;
225
+ shadows: unknown;
226
+ fontSizes: unknown;
227
+ fonts: unknown;
228
+ lineHeights: unknown;
229
+ letterSpacings: unknown;
230
+ radii: unknown;
231
+ sizes: unknown;
232
+ zIndices: unknown;
233
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
234
+ m: (value: {
235
+ readonly [$$ScaleValue]: "space";
236
+ }) => {
237
+ margin: {
238
+ readonly [$$ScaleValue]: "space";
239
+ };
240
+ };
241
+ mt: (value: {
242
+ readonly [$$ScaleValue]: "space";
243
+ }) => {
244
+ marginTop: {
245
+ readonly [$$ScaleValue]: "space";
246
+ };
247
+ };
248
+ mr: (value: {
249
+ readonly [$$ScaleValue]: "space";
250
+ }) => {
251
+ marginRight: {
252
+ readonly [$$ScaleValue]: "space";
253
+ };
254
+ };
255
+ mb: (value: {
256
+ readonly [$$ScaleValue]: "space";
257
+ }) => {
258
+ marginBottom: {
259
+ readonly [$$ScaleValue]: "space";
260
+ };
261
+ };
262
+ ml: (value: {
263
+ readonly [$$ScaleValue]: "space";
264
+ }) => {
265
+ marginLeft: {
266
+ readonly [$$ScaleValue]: "space";
267
+ };
268
+ };
269
+ mx: (value: {
270
+ readonly [$$ScaleValue]: "space";
271
+ }) => {
272
+ marginLeft: {
273
+ readonly [$$ScaleValue]: "space";
274
+ };
275
+ marginRight: {
276
+ readonly [$$ScaleValue]: "space";
277
+ };
278
+ };
279
+ my: (value: {
280
+ readonly [$$ScaleValue]: "space";
281
+ }) => {
282
+ marginTop: {
283
+ readonly [$$ScaleValue]: "space";
284
+ };
285
+ marginBottom: {
286
+ readonly [$$ScaleValue]: "space";
287
+ };
288
+ };
289
+ size: (value: {
290
+ readonly [$$PropertyValue]: "width";
291
+ }) => {
292
+ width: {
293
+ readonly [$$PropertyValue]: "width";
294
+ };
295
+ height: {
296
+ readonly [$$PropertyValue]: "width";
297
+ };
298
+ };
299
+ subtleColor: (value: string) => {
300
+ color: string;
301
+ backgroundColor: string;
302
+ };
303
+ }>>;
304
+ export declare const ContextMenuSeparator: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
305
+ sm: "(min-width: 359px)";
306
+ md: "(min-width: 767px)";
307
+ lg: "(min-width: 1023px)";
308
+ xl: "(min-width: 1199px)";
309
+ '2xl': "(min-width: 1399px)";
310
+ '3xl': "(min-width: 1600px)";
311
+ }, import("@stitches/react/types/css-util").CSS<{
312
+ sm: "(min-width: 359px)";
313
+ md: "(min-width: 767px)";
314
+ lg: "(min-width: 1023px)";
315
+ xl: "(min-width: 1199px)";
316
+ '2xl': "(min-width: 1399px)";
317
+ '3xl': "(min-width: 1600px)";
318
+ }, {
319
+ colors: unknown;
320
+ space: unknown;
321
+ shadows: unknown;
322
+ fontSizes: unknown;
323
+ fonts: unknown;
324
+ lineHeights: unknown;
325
+ letterSpacings: unknown;
326
+ radii: unknown;
327
+ sizes: unknown;
328
+ zIndices: unknown;
329
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
330
+ m: (value: {
331
+ readonly [$$ScaleValue]: "space";
332
+ }) => {
333
+ margin: {
334
+ readonly [$$ScaleValue]: "space";
335
+ };
336
+ };
337
+ mt: (value: {
338
+ readonly [$$ScaleValue]: "space";
339
+ }) => {
340
+ marginTop: {
341
+ readonly [$$ScaleValue]: "space";
342
+ };
343
+ };
344
+ mr: (value: {
345
+ readonly [$$ScaleValue]: "space";
346
+ }) => {
347
+ marginRight: {
348
+ readonly [$$ScaleValue]: "space";
349
+ };
350
+ };
351
+ mb: (value: {
352
+ readonly [$$ScaleValue]: "space";
353
+ }) => {
354
+ marginBottom: {
355
+ readonly [$$ScaleValue]: "space";
356
+ };
357
+ };
358
+ ml: (value: {
359
+ readonly [$$ScaleValue]: "space";
360
+ }) => {
361
+ marginLeft: {
362
+ readonly [$$ScaleValue]: "space";
363
+ };
364
+ };
365
+ mx: (value: {
366
+ readonly [$$ScaleValue]: "space";
367
+ }) => {
368
+ marginLeft: {
369
+ readonly [$$ScaleValue]: "space";
370
+ };
371
+ marginRight: {
372
+ readonly [$$ScaleValue]: "space";
373
+ };
374
+ };
375
+ my: (value: {
376
+ readonly [$$ScaleValue]: "space";
377
+ }) => {
378
+ marginTop: {
379
+ readonly [$$ScaleValue]: "space";
380
+ };
381
+ marginBottom: {
382
+ readonly [$$ScaleValue]: "space";
383
+ };
384
+ };
385
+ size: (value: {
386
+ readonly [$$PropertyValue]: "width";
387
+ }) => {
388
+ width: {
389
+ readonly [$$PropertyValue]: "width";
390
+ };
391
+ height: {
392
+ readonly [$$PropertyValue]: "width";
393
+ };
394
+ };
395
+ subtleColor: (value: string) => {
396
+ color: string;
397
+ backgroundColor: string;
398
+ };
399
+ }>>;
400
+ export {};
@@ -0,0 +1 @@
1
+ export * from './ContextMenu';
@@ -1,11 +1,19 @@
1
1
  /// <reference types="react" />
2
- import { Column, UseTableHooks } from 'react-table';
2
+ import { Column, UseTableHooks, Row } from 'react-table';
3
+ import { CSS } from '../../config/stitches.config';
4
+ interface CustomRows {
5
+ predicate: boolean;
6
+ css?: CSS;
7
+ Row?: any;
8
+ showInMobile?: boolean;
9
+ }
3
10
  interface EditableMobileProps<Data extends object> {
4
11
  columns: ReadonlyArray<Column<Data>>;
5
12
  data: Data[];
6
13
  instance: UseTableHooks;
7
14
  emptyDataMessage?: string;
8
15
  showCheckbox?: boolean;
16
+ customRows?: (row: Row<object>) => CustomRows[];
9
17
  }
10
18
  export default function EditableTableMobile(props: EditableMobileProps<any>): JSX.Element;
11
19
  export {};
@@ -5,6 +5,7 @@ interface CustomRows {
5
5
  predicate: boolean;
6
6
  css?: CSS;
7
7
  Row?: any;
8
+ showInMobile?: boolean;
8
9
  }
9
10
  interface EditableTableProps<Data extends object> {
10
11
  /**
@@ -45,3 +45,4 @@ export * from './mapPicker';
45
45
  export * from './chart';
46
46
  export * from './checkboxTable';
47
47
  export * from './contentEditor';
48
+ export * from './contextMenu';
@@ -29,6 +29,7 @@ interface IStepWizardProps {
29
29
  forbidClickNav: boolean;
30
30
  hide?: boolean;
31
31
  onChangeVisibility?: (isHide: boolean) => void;
32
+ onNavClicked?: () => void;
32
33
  }
33
34
  declare const StepWizard: (props: IStepWizardProps) => JSX.Element;
34
35
  export default StepWizard;
@@ -1212,8 +1212,9 @@ export interface TableProps {
1212
1212
  * To show duplicated data in table.
1213
1213
  */
1214
1214
  showDuplicatedData?: boolean;
1215
+ onRowClick?: (record: Row, index: number) => void;
1215
1216
  }
1216
- export declare function Table({ columns, data, keyId, pageIndex: controlledPageIndex, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, isLoading, css, headerCss, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, }: TableProps): JSX.Element;
1217
+ export declare function Table({ columns, data, keyId, pageIndex: controlledPageIndex, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, isLoading, css, headerCss, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, }: TableProps): JSX.Element;
1217
1218
  export interface TableColumnProps {
1218
1219
  /**
1219
1220
  * Required if accessor is a function<br/>