@majoo-ui/react 1.50.2-rc.3 → 1.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/checkboxTable/CheckboxTable.d.ts +29 -0
- package/components/checkboxTable/index.d.ts +1 -0
- package/components/checkboxTable/transition.d.ts +11 -0
- package/components/editableTable/EditableTable.d.ts +207 -1
- package/components/form/components/InputCounter/InputCounter.d.ts +8 -0
- package/components/index.d.ts +1 -0
- package/components/pageDialog/PageDialog.d.ts +4 -0
- package/index.esm.js +609 -204
- package/index.umd.js +624 -207
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Column } from 'react-table';
|
|
3
|
+
import { CSS } from '../../config/stitches.config';
|
|
4
|
+
interface CheckboxTableProps<Data extends object> {
|
|
5
|
+
/**
|
|
6
|
+
* Columns of table.
|
|
7
|
+
*/
|
|
8
|
+
columns: ReadonlyArray<Column<Data>>;
|
|
9
|
+
/**
|
|
10
|
+
* Data record array to be displayed.
|
|
11
|
+
*/
|
|
12
|
+
data: Data[];
|
|
13
|
+
/**
|
|
14
|
+
* Displayed message if data does not exist.
|
|
15
|
+
*/
|
|
16
|
+
emptyDataMessage?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Additional height of the rows.
|
|
19
|
+
*/
|
|
20
|
+
rowHeight?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Additional align items of the rows.
|
|
23
|
+
*/
|
|
24
|
+
align?: 'top' | 'center' | 'bottom';
|
|
25
|
+
css?: CSS;
|
|
26
|
+
onChange?: (e: any) => void;
|
|
27
|
+
}
|
|
28
|
+
export default function CheckboxTable(props: CheckboxTableProps<object>): JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CheckboxTable } from './CheckboxTable';
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Column } from 'react-table';
|
|
2
|
+
import { Column, Row } from 'react-table';
|
|
3
|
+
import { CSS } from '../../config/stitches.config';
|
|
4
|
+
interface CustomRows {
|
|
5
|
+
predicate: boolean;
|
|
6
|
+
css?: CSS;
|
|
7
|
+
Row?: any;
|
|
8
|
+
}
|
|
3
9
|
interface EditableTableProps<Data extends object> {
|
|
4
10
|
/**
|
|
5
11
|
* Columns of table.
|
|
@@ -21,6 +27,10 @@ interface EditableTableProps<Data extends object> {
|
|
|
21
27
|
* Additional align items of the rows.
|
|
22
28
|
*/
|
|
23
29
|
align?: 'top' | 'center' | 'bottom';
|
|
30
|
+
/**
|
|
31
|
+
* Additional customize one of the rows based on the specified condition
|
|
32
|
+
*/
|
|
33
|
+
customRows?: (row: Row<object>) => CustomRows[];
|
|
24
34
|
}
|
|
25
35
|
interface RemoveProps {
|
|
26
36
|
position?: 'leftBottom' | 'rightBottom' | 'leftTop' | 'rightTop';
|
|
@@ -131,5 +141,201 @@ declare namespace EditableTable {
|
|
|
131
141
|
}>>;
|
|
132
142
|
var Switch: (props: any) => JSX.Element;
|
|
133
143
|
var Remove: (props: RemoveProps) => JSX.Element;
|
|
144
|
+
var TableRow: import("@stitches/react/types/styled-component").StyledComponent<"tr", {
|
|
145
|
+
subRow?: boolean | "true" | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
sm: "(min-width: 359px)";
|
|
148
|
+
md: "(min-width: 767px)";
|
|
149
|
+
lg: "(min-width: 1023px)";
|
|
150
|
+
xl: "(min-width: 1199px)";
|
|
151
|
+
'2xl': "(min-width: 1399px)";
|
|
152
|
+
'3xl': "(min-width: 1600px)";
|
|
153
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
154
|
+
sm: "(min-width: 359px)";
|
|
155
|
+
md: "(min-width: 767px)";
|
|
156
|
+
lg: "(min-width: 1023px)";
|
|
157
|
+
xl: "(min-width: 1199px)";
|
|
158
|
+
'2xl': "(min-width: 1399px)";
|
|
159
|
+
'3xl': "(min-width: 1600px)";
|
|
160
|
+
}, {
|
|
161
|
+
colors: unknown;
|
|
162
|
+
space: unknown;
|
|
163
|
+
shadows: unknown;
|
|
164
|
+
fontSizes: unknown;
|
|
165
|
+
fonts: unknown;
|
|
166
|
+
lineHeights: unknown;
|
|
167
|
+
letterSpacings: unknown;
|
|
168
|
+
radii: unknown;
|
|
169
|
+
sizes: unknown;
|
|
170
|
+
zIndices: unknown;
|
|
171
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
172
|
+
m: (value: {
|
|
173
|
+
readonly [$$ScaleValue]: "space";
|
|
174
|
+
}) => {
|
|
175
|
+
margin: {
|
|
176
|
+
readonly [$$ScaleValue]: "space";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
mt: (value: {
|
|
180
|
+
readonly [$$ScaleValue]: "space";
|
|
181
|
+
}) => {
|
|
182
|
+
marginTop: {
|
|
183
|
+
readonly [$$ScaleValue]: "space";
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
mr: (value: {
|
|
187
|
+
readonly [$$ScaleValue]: "space";
|
|
188
|
+
}) => {
|
|
189
|
+
marginRight: {
|
|
190
|
+
readonly [$$ScaleValue]: "space";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
mb: (value: {
|
|
194
|
+
readonly [$$ScaleValue]: "space";
|
|
195
|
+
}) => {
|
|
196
|
+
marginBottom: {
|
|
197
|
+
readonly [$$ScaleValue]: "space";
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
ml: (value: {
|
|
201
|
+
readonly [$$ScaleValue]: "space";
|
|
202
|
+
}) => {
|
|
203
|
+
marginLeft: {
|
|
204
|
+
readonly [$$ScaleValue]: "space";
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
mx: (value: {
|
|
208
|
+
readonly [$$ScaleValue]: "space";
|
|
209
|
+
}) => {
|
|
210
|
+
marginLeft: {
|
|
211
|
+
readonly [$$ScaleValue]: "space";
|
|
212
|
+
};
|
|
213
|
+
marginRight: {
|
|
214
|
+
readonly [$$ScaleValue]: "space";
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
my: (value: {
|
|
218
|
+
readonly [$$ScaleValue]: "space";
|
|
219
|
+
}) => {
|
|
220
|
+
marginTop: {
|
|
221
|
+
readonly [$$ScaleValue]: "space";
|
|
222
|
+
};
|
|
223
|
+
marginBottom: {
|
|
224
|
+
readonly [$$ScaleValue]: "space";
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
size: (value: {
|
|
228
|
+
readonly [$$PropertyValue]: "width";
|
|
229
|
+
}) => {
|
|
230
|
+
width: {
|
|
231
|
+
readonly [$$PropertyValue]: "width";
|
|
232
|
+
};
|
|
233
|
+
height: {
|
|
234
|
+
readonly [$$PropertyValue]: "width";
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
subtleColor: (value: string) => {
|
|
238
|
+
color: string;
|
|
239
|
+
backgroundColor: string;
|
|
240
|
+
};
|
|
241
|
+
}>>;
|
|
242
|
+
var TableCell: import("@stitches/react/types/styled-component").StyledComponent<"td", {
|
|
243
|
+
verticalAlign?: "bottom" | "top" | "middle" | undefined;
|
|
244
|
+
}, {
|
|
245
|
+
sm: "(min-width: 359px)";
|
|
246
|
+
md: "(min-width: 767px)";
|
|
247
|
+
lg: "(min-width: 1023px)";
|
|
248
|
+
xl: "(min-width: 1199px)";
|
|
249
|
+
'2xl': "(min-width: 1399px)";
|
|
250
|
+
'3xl': "(min-width: 1600px)";
|
|
251
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
252
|
+
sm: "(min-width: 359px)";
|
|
253
|
+
md: "(min-width: 767px)";
|
|
254
|
+
lg: "(min-width: 1023px)";
|
|
255
|
+
xl: "(min-width: 1199px)";
|
|
256
|
+
'2xl': "(min-width: 1399px)";
|
|
257
|
+
'3xl': "(min-width: 1600px)";
|
|
258
|
+
}, {
|
|
259
|
+
colors: unknown;
|
|
260
|
+
space: unknown;
|
|
261
|
+
shadows: unknown;
|
|
262
|
+
fontSizes: unknown;
|
|
263
|
+
fonts: unknown;
|
|
264
|
+
lineHeights: unknown;
|
|
265
|
+
letterSpacings: unknown;
|
|
266
|
+
radii: unknown;
|
|
267
|
+
sizes: unknown;
|
|
268
|
+
zIndices: unknown;
|
|
269
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
270
|
+
m: (value: {
|
|
271
|
+
readonly [$$ScaleValue]: "space";
|
|
272
|
+
}) => {
|
|
273
|
+
margin: {
|
|
274
|
+
readonly [$$ScaleValue]: "space";
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
mt: (value: {
|
|
278
|
+
readonly [$$ScaleValue]: "space";
|
|
279
|
+
}) => {
|
|
280
|
+
marginTop: {
|
|
281
|
+
readonly [$$ScaleValue]: "space";
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
mr: (value: {
|
|
285
|
+
readonly [$$ScaleValue]: "space";
|
|
286
|
+
}) => {
|
|
287
|
+
marginRight: {
|
|
288
|
+
readonly [$$ScaleValue]: "space";
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
mb: (value: {
|
|
292
|
+
readonly [$$ScaleValue]: "space";
|
|
293
|
+
}) => {
|
|
294
|
+
marginBottom: {
|
|
295
|
+
readonly [$$ScaleValue]: "space";
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
ml: (value: {
|
|
299
|
+
readonly [$$ScaleValue]: "space";
|
|
300
|
+
}) => {
|
|
301
|
+
marginLeft: {
|
|
302
|
+
readonly [$$ScaleValue]: "space";
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
mx: (value: {
|
|
306
|
+
readonly [$$ScaleValue]: "space";
|
|
307
|
+
}) => {
|
|
308
|
+
marginLeft: {
|
|
309
|
+
readonly [$$ScaleValue]: "space";
|
|
310
|
+
};
|
|
311
|
+
marginRight: {
|
|
312
|
+
readonly [$$ScaleValue]: "space";
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
my: (value: {
|
|
316
|
+
readonly [$$ScaleValue]: "space";
|
|
317
|
+
}) => {
|
|
318
|
+
marginTop: {
|
|
319
|
+
readonly [$$ScaleValue]: "space";
|
|
320
|
+
};
|
|
321
|
+
marginBottom: {
|
|
322
|
+
readonly [$$ScaleValue]: "space";
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
size: (value: {
|
|
326
|
+
readonly [$$PropertyValue]: "width";
|
|
327
|
+
}) => {
|
|
328
|
+
width: {
|
|
329
|
+
readonly [$$PropertyValue]: "width";
|
|
330
|
+
};
|
|
331
|
+
height: {
|
|
332
|
+
readonly [$$PropertyValue]: "width";
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
subtleColor: (value: string) => {
|
|
336
|
+
color: string;
|
|
337
|
+
backgroundColor: string;
|
|
338
|
+
};
|
|
339
|
+
}>>;
|
|
134
340
|
}
|
|
135
341
|
export default EditableTable;
|
|
@@ -29,6 +29,14 @@ interface CounterProps {
|
|
|
29
29
|
* Additional css style.
|
|
30
30
|
*/
|
|
31
31
|
css?: CSS;
|
|
32
|
+
/**
|
|
33
|
+
* add prefix to input.
|
|
34
|
+
*/
|
|
35
|
+
prefix?: string;
|
|
36
|
+
/**
|
|
37
|
+
* add suffix to input.
|
|
38
|
+
*/
|
|
39
|
+
suffix?: string;
|
|
32
40
|
}
|
|
33
41
|
declare const InputCounter: React.ForwardRefExoticComponent<CounterProps & React.RefAttributes<unknown>>;
|
|
34
42
|
export default InputCounter;
|
package/components/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Dialog } from '../../';
|
|
3
3
|
import { FocusScopeProps } from '@radix-ui/react-dialog';
|
|
4
|
+
import { PointerDownOutsideEvent, FocusOutsideEvent } from '@radix-ui/react-dismissable-layer';
|
|
4
5
|
import type { DialogContentProps } from '..';
|
|
5
6
|
export declare const PageDialogFooter: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
|
|
6
7
|
sm: "(min-width: 359px)";
|
|
@@ -394,6 +395,9 @@ interface PageDialogProps extends IDialog, DialogContentProps {
|
|
|
394
395
|
isMobile?: boolean | undefined;
|
|
395
396
|
/** Set default behavior when opening dialog with form. Usually used with prevent default*/
|
|
396
397
|
onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
|
|
398
|
+
onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
|
|
399
|
+
onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
|
|
400
|
+
onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
|
|
397
401
|
}
|
|
398
402
|
/**
|
|
399
403
|
* PageDialog are used to focus and display content that contains one specific task that requires interaction from the user and is separate from the main page.
|