@majoo-ui/react 1.48.0 → 1.48.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/components/datePicker/components/DateNumber.d.ts +1 -0
- package/components/datePicker/state/reducer.d.ts +1 -0
- package/components/mapPicker/InputMapPicker.d.ts +0 -4
- package/components/modalDialog/ModalDialog.d.ts +25 -20
- package/components/pageDialog/PageDialog.d.ts +19 -18
- package/components/table/MobileTable.d.ts +5 -0
- package/components/table/Table.d.ts +9 -1
- package/index.esm.js +502 -267
- package/index.umd.js +496 -265
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import type * as Stitches from '@stitches/react';
|
|
|
2
2
|
declare const DateNumber: import("@stitches/react/types/styled-component").StyledComponent<"div", {
|
|
3
3
|
variant?: "end" | "start" | "default" | "neutral" | "disabled" | "selected" | "road" | undefined;
|
|
4
4
|
size?: "large" | "small" | undefined;
|
|
5
|
+
isSunday?: boolean | "true" | undefined;
|
|
5
6
|
}, {
|
|
6
7
|
sm: "(min-width: 359px)";
|
|
7
8
|
md: "(min-width: 767px)";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Dialog } from '../../';
|
|
3
|
+
import { FocusScopeProps } from '@radix-ui/react-dialog';
|
|
3
4
|
import type { DialogContentProps } from '..';
|
|
4
5
|
export declare const ModalDialogFooter: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
|
|
5
6
|
sm: "(min-width: 359px)";
|
|
@@ -392,30 +393,34 @@ interface ModalDialogProps extends IDialog, DialogContentProps {
|
|
|
392
393
|
/** Force to mobile view or desktop view, if undefined ModalDialog will be responsive according to current screen size */
|
|
393
394
|
isMobile?: boolean | undefined;
|
|
394
395
|
/**
|
|
395
|
-
|
|
396
|
-
|
|
396
|
+
* @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
|
|
397
|
+
*/
|
|
397
398
|
width?: string | number;
|
|
398
399
|
/** Set default behavior when opening dialog with form. Usually used with prevent default*/
|
|
399
|
-
onOpenAutoFocus
|
|
400
|
+
onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
|
|
401
|
+
/**
|
|
402
|
+
* If true, the close icon button is hidden
|
|
403
|
+
*/
|
|
404
|
+
hideCloseButton?: boolean;
|
|
400
405
|
}
|
|
401
406
|
/**
|
|
402
|
-
* ModalDialog 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.
|
|
403
|
-
* https://react-majoo-ui.mangkujagat.com/?path=/story/core-components-pagedialog--default
|
|
404
|
-
* @param size - default fullsize
|
|
405
|
-
* @param layer - z-index default 1400
|
|
406
|
-
* @param isMobile - force mobile/desktop view, default is responsive
|
|
407
|
-
* @param onOpenAutoFocus - set default open behaviour
|
|
408
|
-
*
|
|
409
|
-
* @example
|
|
410
|
-
* // Uncontrolled Example
|
|
411
|
-
* <ModalDialog>
|
|
412
|
-
* <ModalDialogTrigger>Button Trigger</ModalDialogTrigger>
|
|
413
|
-
* <ModalDialogTitle>Title</ModalDialogTitle>
|
|
414
|
-
* <ModalDialogContent>Content</ModalDialogContent>
|
|
415
|
-
* <ModalDialogFooter>Footer</ModalDialogFooter>
|
|
416
|
-
* </ModalDialog>
|
|
417
|
-
* @component
|
|
418
|
-
*/
|
|
407
|
+
* ModalDialog 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.
|
|
408
|
+
* https://react-majoo-ui.mangkujagat.com/?path=/story/core-components-pagedialog--default
|
|
409
|
+
* @param size - default fullsize
|
|
410
|
+
* @param layer - z-index default 1400
|
|
411
|
+
* @param isMobile - force mobile/desktop view, default is responsive
|
|
412
|
+
* @param onOpenAutoFocus - set default open behaviour
|
|
413
|
+
*
|
|
414
|
+
* @example
|
|
415
|
+
* // Uncontrolled Example
|
|
416
|
+
* <ModalDialog>
|
|
417
|
+
* <ModalDialogTrigger>Button Trigger</ModalDialogTrigger>
|
|
418
|
+
* <ModalDialogTitle>Title</ModalDialogTitle>
|
|
419
|
+
* <ModalDialogContent>Content</ModalDialogContent>
|
|
420
|
+
* <ModalDialogFooter>Footer</ModalDialogFooter>
|
|
421
|
+
* </ModalDialog>
|
|
422
|
+
* @component
|
|
423
|
+
*/
|
|
419
424
|
declare const ModalDialog: {
|
|
420
425
|
(props: ModalDialogProps): JSX.Element;
|
|
421
426
|
Trigger: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Dialog } from '../../';
|
|
3
|
+
import { FocusScopeProps } from '@radix-ui/react-dialog';
|
|
3
4
|
import type { DialogContentProps } from '..';
|
|
4
5
|
export declare const PageDialogFooter: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
|
|
5
6
|
sm: "(min-width: 359px)";
|
|
@@ -392,26 +393,26 @@ interface PageDialogProps extends IDialog, DialogContentProps {
|
|
|
392
393
|
/** Force to mobile view or desktop view, if undefined PageDialog will be responsive according to current screen size */
|
|
393
394
|
isMobile?: boolean | undefined;
|
|
394
395
|
/** Set default behavior when opening dialog with form. Usually used with prevent default*/
|
|
395
|
-
onOpenAutoFocus
|
|
396
|
+
onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
|
|
396
397
|
}
|
|
397
398
|
/**
|
|
398
|
-
* 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.
|
|
399
|
-
* https://react-majoo-ui.mangkujagat.com/?path=/story/core-components-pagedialog--default
|
|
400
|
-
* @param size - default fullsize
|
|
401
|
-
* @param layer - z-index default 1400
|
|
402
|
-
* @param isMobile - force mobile/desktop view, default is responsive
|
|
403
|
-
* @param onOpenAutoFocus - set default open behaviour
|
|
404
|
-
*
|
|
405
|
-
* @example
|
|
406
|
-
* // Uncontrolled Example
|
|
407
|
-
* <PageDialog>
|
|
408
|
-
* <PageDialogTrigger>Button Trigger</PageDialogTrigger>
|
|
409
|
-
* <PageDialogTitle>Title</PageDialogTitle>
|
|
410
|
-
* <PageDialogContent>Content</PageDialogContent>
|
|
411
|
-
* <PageDialogFooter>Footer</PageDialogFooter>
|
|
412
|
-
* </PageDialog>
|
|
413
|
-
* @component
|
|
414
|
-
*/
|
|
399
|
+
* 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.
|
|
400
|
+
* https://react-majoo-ui.mangkujagat.com/?path=/story/core-components-pagedialog--default
|
|
401
|
+
* @param size - default fullsize
|
|
402
|
+
* @param layer - z-index default 1400
|
|
403
|
+
* @param isMobile - force mobile/desktop view, default is responsive
|
|
404
|
+
* @param onOpenAutoFocus - set default open behaviour
|
|
405
|
+
*
|
|
406
|
+
* @example
|
|
407
|
+
* // Uncontrolled Example
|
|
408
|
+
* <PageDialog>
|
|
409
|
+
* <PageDialogTrigger>Button Trigger</PageDialogTrigger>
|
|
410
|
+
* <PageDialogTitle>Title</PageDialogTitle>
|
|
411
|
+
* <PageDialogContent>Content</PageDialogContent>
|
|
412
|
+
* <PageDialogFooter>Footer</PageDialogFooter>
|
|
413
|
+
* </PageDialog>
|
|
414
|
+
* @component
|
|
415
|
+
*/
|
|
415
416
|
export declare const PageDialog: {
|
|
416
417
|
(props: PageDialogProps): JSX.Element;
|
|
417
418
|
Trigger: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
|
|
@@ -2,6 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { CSS } from '../../config/stitches.config';
|
|
3
3
|
import { RowGroup } from './Table';
|
|
4
4
|
import { TableInstance } from 'react-table';
|
|
5
|
+
interface CustomRowsStyle {
|
|
6
|
+
predicate: boolean;
|
|
7
|
+
css: CSS;
|
|
8
|
+
}
|
|
5
9
|
interface MobileTableProps {
|
|
6
10
|
instance: TableInstance<object>;
|
|
7
11
|
totalData: number;
|
|
@@ -13,6 +17,7 @@ interface MobileTableProps {
|
|
|
13
17
|
rowGroup?: RowGroup;
|
|
14
18
|
hiddenColumns?: string[];
|
|
15
19
|
css?: CSS;
|
|
20
|
+
customRowsStyle?: (e: any) => CustomRowsStyle[];
|
|
16
21
|
}
|
|
17
22
|
declare const MobileTable: React.ForwardRefExoticComponent<MobileTableProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
23
|
export default MobileTable;
|
|
@@ -888,6 +888,10 @@ export interface RowGroup {
|
|
|
888
888
|
groupKey: string;
|
|
889
889
|
headerRender?: (row: Row<object>) => React.ReactNode;
|
|
890
890
|
}
|
|
891
|
+
interface CustomRowsStyle {
|
|
892
|
+
predicate: boolean;
|
|
893
|
+
css: CSS;
|
|
894
|
+
}
|
|
891
895
|
export interface TableProps {
|
|
892
896
|
/**
|
|
893
897
|
* The data array that you want to display on the table.
|
|
@@ -988,8 +992,12 @@ export interface TableProps {
|
|
|
988
992
|
* The order of column id
|
|
989
993
|
*/
|
|
990
994
|
columnOrder?: string[];
|
|
995
|
+
/**
|
|
996
|
+
* Additional style to customize one of the rows based on the specified condition
|
|
997
|
+
*/
|
|
998
|
+
customRowsStyle?: (e: any) => CustomRowsStyle[];
|
|
991
999
|
}
|
|
992
|
-
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, }: TableProps): JSX.Element;
|
|
1000
|
+
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, }: TableProps): JSX.Element;
|
|
993
1001
|
export interface TableColumnProps {
|
|
994
1002
|
/**
|
|
995
1003
|
* Required if accessor is a function<br/>
|