@majoo-ui/react 1.58.0 → 1.58.2-0.rc-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.
@@ -15,10 +15,20 @@ interface CardProps {
15
15
  icon?: JSX.Element;
16
16
  showBottomLine?: boolean;
17
17
  children?: React.ReactNode;
18
+ /**
19
+ * Only show in mobile view.
20
+ */
21
+ mobileOnly?: boolean;
22
+ /**
23
+ * Only show in desktop view.
24
+ */
25
+ desktopOnly?: boolean;
18
26
  }
19
27
  export declare const CardComponent: import("@stitches/react/types/styled-component").StyledComponent<"div", {
20
28
  shadow?: boolean | "true" | undefined;
21
29
  isTemplateFormat?: boolean | "true" | undefined;
30
+ mobileOnly?: boolean | "true" | undefined;
31
+ desktopOnly?: boolean | "true" | undefined;
22
32
  }, {
23
33
  sm: "(min-width: 359px)";
24
34
  md: "(min-width: 767px)";
@@ -310,7 +320,7 @@ export declare const StyledTitle: import("@stitches/react/types/styled-component
310
320
  };
311
321
  }>>;
312
322
  export declare const Card: {
313
- ({ className, children, color, shadow, radius, padding, title, width, textColor, icon, showBottomLine, label, description, ...props }: CardProps): JSX.Element;
323
+ ({ className, children, color, shadow, radius, padding, title, width, textColor, icon, showBottomLine, label, description, mobileOnly, desktopOnly, ...props }: CardProps): JSX.Element;
314
324
  defaultProps: {
315
325
  className: string;
316
326
  color: string;
@@ -137,6 +137,14 @@ export interface InputDatePickerProps {
137
137
  * Wrapping DatePicker with FloatingPortal.
138
138
  */
139
139
  portalled?: boolean;
140
+ /**
141
+ * Only show in mobile view.
142
+ */
143
+ mobileOnly?: boolean;
144
+ /**
145
+ * Only show in desktop view.
146
+ */
147
+ desktopOnly?: boolean;
140
148
  }
141
- export declare function InputDatePicker({ type, showRangeControl, rangePickerType, placeholder, size, disabled, onChange, onDateSelected, defaultValue: defaultDateValue, value: dateValue, defaultDate, date, advanceView, placement, css, showTimePicker, timePickerProps, minDate, maxDate, readOnly, isInvalid, allowReset, portalled, onClose, }: InputDatePickerProps): JSX.Element;
149
+ export declare function InputDatePicker({ type, showRangeControl, rangePickerType, placeholder, size, disabled, onChange, onDateSelected, defaultValue: defaultDateValue, value: dateValue, defaultDate, date, advanceView, placement, css, showTimePicker, timePickerProps, minDate, maxDate, readOnly, isInvalid, allowReset, portalled, onClose, mobileOnly, desktopOnly, }: InputDatePickerProps): JSX.Element;
142
150
  export {};
@@ -7,6 +7,8 @@ interface ContainertRangePickerProps {
7
7
  isInvalid?: boolean;
8
8
  children: JSX.Element;
9
9
  onRangeChange(type: string): void;
10
+ mobileOnly?: boolean;
11
+ desktopOnly?: boolean;
10
12
  }
11
13
  interface InputRangePickerProps {
12
14
  value: string;
@@ -16,6 +18,8 @@ interface InputRangePickerProps {
16
18
  readOnly?: boolean;
17
19
  isInvalid?: boolean;
18
20
  onClick(): void;
21
+ mobileOnly?: boolean;
22
+ desktopOnly?: boolean;
19
23
  }
20
24
  export declare function ContainerDateRangePicker(props: ContainertRangePickerProps): JSX.Element;
21
25
  export declare function InputDateRangePicker(props: InputRangePickerProps): JSX.Element;
@@ -17,6 +17,7 @@ interface EditableMobileProps<Data extends object> {
17
17
  onExpand?: (expanded: boolean) => void;
18
18
  hiddenColumns?: string[];
19
19
  customEmptyDataProps?: EmptyDataProps;
20
+ virtualized?: boolean;
20
21
  }
21
22
  export default function EditableTableMobile(props: EditableMobileProps<any>): JSX.Element;
22
23
  export {};
@@ -9,6 +9,7 @@ interface CustomRows {
9
9
  showInMobile?: boolean;
10
10
  }
11
11
  interface EditableTableProps<Data extends object> {
12
+ css?: CSS;
12
13
  /**
13
14
  * Columns of table.
14
15
  */
@@ -79,6 +80,10 @@ interface EditableTableProps<Data extends object> {
79
80
  * Array of hidden column id
80
81
  */
81
82
  hiddenColumns?: string[];
83
+ /**
84
+ * Activate table row virtualizer support
85
+ */
86
+ virtualized?: boolean;
82
87
  }
83
88
  interface RemoveProps {
84
89
  position?: 'leftBottom' | 'rightBottom' | 'leftTop' | 'rightTop';
@@ -0,0 +1,16 @@
1
+ declare type ProductType = {
2
+ name: string;
3
+ variants: ('Small' | 'Medium' | 'Large')[];
4
+ };
5
+ export interface IProduct {
6
+ id: number;
7
+ produk: ProductType;
8
+ terima_stok: boolean;
9
+ jumlah: number;
10
+ satuan: 'cup' | 'pcs';
11
+ harga_beli: number;
12
+ total: number;
13
+ note: string;
14
+ }
15
+ export declare const makeData: (len: number) => IProduct[];
16
+ export {};
@@ -7,12 +7,13 @@ export interface IResource {
7
7
  description?: string;
8
8
  icon?: () => JSX.Element;
9
9
  }
10
- interface IInputResourceListProps {
10
+ export interface IInputResourceListProps {
11
11
  data: IResource[];
12
12
  disabled: boolean;
13
13
  onItemCheck(checkedItem: IResource): void;
14
14
  onItemUncheck(checkedItem: IResource): void;
15
15
  searchPlaceholder?: string;
16
+ counterFooter?: boolean;
16
17
  counterFooterText?: string;
17
18
  isLoading: boolean;
18
19
  enabledItems?: string[];
@@ -24,9 +25,13 @@ interface IInputResourceListProps {
24
25
  }): void;
25
26
  onQueryChange?(query: string): void;
26
27
  css?: Stitches.CSS;
28
+ wrapperCss?: Stitches.CSS;
27
29
  defaultSort?: 'asc' | 'desc';
28
30
  title?: string;
29
31
  hideSelectAll?: boolean;
32
+ renderSelectAll?: JSX.Element;
33
+ customHeader?: JSX.Element;
34
+ expandable?: boolean;
30
35
  }
31
- declare function InputResourceList({ data: dataProp, disabled, onItemCheck, onItemUncheck, searchPlaceholder, counterFooterText, isLoading, enabledItems, emptyDataMessage, value, fetchData, onQueryChange, css, defaultSort, title, hideSelectAll, }: IInputResourceListProps): JSX.Element;
36
+ declare function InputResourceList({ data: dataProp, disabled, onItemCheck, onItemUncheck, searchPlaceholder, counterFooter, counterFooterText, isLoading, enabledItems, emptyDataMessage, value, fetchData, onQueryChange, css, wrapperCss, defaultSort, title, hideSelectAll, customHeader, }: IInputResourceListProps): JSX.Element;
32
37
  export default InputResourceList;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IInputResourceListProps } from './InputResourceList';
3
+ declare const ResourceList: ({ expandable, ...props }: IInputResourceListProps) => JSX.Element;
4
+ export default ResourceList;
@@ -1,7 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { ControllerStateAndHelpers, DownshiftProps } from 'downshift';
3
3
  import { CSS } from '../../../../config/stitches.config';
4
- export declare const SelectContainer: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
4
+ export declare const SelectContainer: import("@stitches/react/types/styled-component").StyledComponent<"div", {
5
+ mobileOnly?: boolean | "true" | undefined;
6
+ desktopOnly?: boolean | "true" | undefined;
7
+ }, {
5
8
  sm: "(min-width: 359px)";
6
9
  md: "(min-width: 767px)";
7
10
  lg: "(min-width: 1023px)";
@@ -813,6 +816,14 @@ interface InputSelectProps extends Omit<DownshiftProps<Option>, 'initialSelected
813
816
  * Custom empty data message
814
817
  */
815
818
  emptyDataMessage?: string;
819
+ /**
820
+ * Only show in mobile view.
821
+ */
822
+ mobileOnly?: boolean;
823
+ /**
824
+ * Only show in desktop view.
825
+ */
826
+ desktopOnly?: boolean;
816
827
  }
817
828
  export declare const InputSelect: React.ForwardRefExoticComponent<InputSelectProps & React.RefAttributes<HTMLInputElement>>;
818
829
  export default InputSelect;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export default function OptionGroupItem({ item, children }: {
3
+ item: any;
4
+ children: any;
5
+ }): JSX.Element;
@@ -18,7 +18,7 @@ export * from './InputSelect';
18
18
  export { default as InputSelectCheck } from './InputSelectCheck/InputSelectCheck';
19
19
  export { default as InputSelectTag } from './InputSelectTag/InputSelectTag';
20
20
  export { default as InputCreatable } from './InputCreatable/InputCreatable';
21
- export { default as InputResourceList } from './InputResourceList/InputResourceList';
21
+ export { default as InputResourceList } from './InputResourceList/ResourceList';
22
22
  export * from './InputCombobox';
23
23
  export * from './InputOTP';
24
24
  export * from './InputCounter';
@@ -84,4 +84,8 @@ export interface InputMapPickerProps {
84
84
  * Change event handler.
85
85
  */
86
86
  onChange: (MapObject: any) => void;
87
+ /**
88
+ * on Marker click event handle
89
+ */
90
+ onMarkerClick: () => void;
87
91
  }
@@ -1,13 +1,17 @@
1
1
  import React from 'react';
2
2
  interface ProgressListData {
3
3
  progress: number;
4
- title: string | (() => HTMLElement | React.ReactElement | JSX.Element);
4
+ title?: string | (() => HTMLElement | React.ReactElement | JSX.Element);
5
5
  icon?: React.ReactElement | undefined;
6
+ render?: () => JSX.Element | JSX.Element;
6
7
  }
7
8
  interface ProgressIndicatorProps {
9
+ direction?: 'horizontal' | 'vertical';
8
10
  progress: number;
9
11
  progressError?: number;
10
12
  progressList: ProgressListData[];
13
+ width?: number;
14
+ gap?: number;
11
15
  }
12
16
  export default function ProgressIndicator(props: ProgressIndicatorProps): JSX.Element;
13
17
  export {};
@@ -4,7 +4,15 @@ import { EmptyDataProps, RowGroup, Decoration } from './Table';
4
4
  import { TableInstance } from 'react-table';
5
5
  interface CustomRowsStyle {
6
6
  predicate: boolean;
7
- css: CSS;
7
+ css?: CSS;
8
+ hideRowMenuColumn?: boolean;
9
+ }
10
+ interface IRowVirtualizer {
11
+ virtualItems: {
12
+ start: number;
13
+ end: number;
14
+ }[];
15
+ totalSize: number;
8
16
  }
9
17
  interface MobileTableProps {
10
18
  instance: TableInstance<object>;
@@ -24,6 +32,7 @@ interface MobileTableProps {
24
32
  additionalExceptionIds: string[];
25
33
  hideHeader?: boolean;
26
34
  decoration?: Decoration;
35
+ rowVirtualizer: IRowVirtualizer;
27
36
  }
28
37
  declare const MobileTable: React.ForwardRefExoticComponent<MobileTableProps & React.RefAttributes<HTMLDivElement>>;
29
38
  export default MobileTable;
@@ -1106,7 +1106,8 @@ export interface RowGroup {
1106
1106
  }
1107
1107
  interface CustomRowsStyle {
1108
1108
  predicate: boolean;
1109
- css: CSS;
1109
+ css?: CSS;
1110
+ hideRowMenuColumn?: boolean;
1110
1111
  }
1111
1112
  export interface ColumnInstanceProps<D extends object> extends ColumnInstance<D> {
1112
1113
  options?: [];
@@ -1275,8 +1276,21 @@ export interface TableProps {
1275
1276
  * Additional id which is not clickable and has no context menu
1276
1277
  */
1277
1278
  additionalExceptionIds?: string[];
1279
+ /**
1280
+ * Callback fired when the expanded rows are updated.
1281
+ */
1282
+ onExpand?: (expanded: object) => void;
1283
+ /**
1284
+ * Additional id table for unique identifier each table
1285
+ */
1286
+ id?: string | null;
1287
+ /**
1288
+ * Option for customise column to show in table <br />
1289
+ * can be filled with boolean value or 'string' value
1290
+ */
1291
+ customizableColumn?: boolean | string;
1278
1292
  }
1279
- export declare function Table({ columns, data: rawData, keyId, pageIndex: controlledPageIndex, totalPage, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, customEmptyDataProps: emptyDataProps, isLoading, css, headerCss, hideHeader, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, decoration, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, hidePagination, searchQuery, additionalExceptionIds, }: TableProps): JSX.Element;
1293
+ export declare function Table({ columns, data: rawData, keyId, pageIndex: controlledPageIndex, totalPage, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, customEmptyDataProps: emptyDataProps, isLoading, css, headerCss, hideHeader, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, decoration, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, hidePagination, searchQuery, additionalExceptionIds, onExpand, id, customizableColumn, }: TableProps): JSX.Element;
1280
1294
  export interface TableColumnProps {
1281
1295
  /**
1282
1296
  * Required if accessor is a function<br/>