1mpacto-react-ui 0.0.23 → 0.0.24

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.
@@ -1,4 +1,4 @@
1
1
  import { IFilterDate } from '../../interfaces/components/DatePicker';
2
2
 
3
- declare const FilterDate: ({ value, prevIcon, nextIcon, buttonReset, buttonSubmit, className, classNameButton, buttonClick, buttonList, typePicker, onChange, idPopover, id, floatingOptions, offsetPopover, }: IFilterDate) => import("react/jsx-runtime").JSX.Element;
3
+ declare const FilterDate: ({ value, prevIcon, nextIcon, buttonReset, buttonSubmit, className, classNameButton, buttonClick, buttonList, typePicker, onChange, idPopover, id, floatingOptions, offsetPopover, zIndexPopper, }: IFilterDate) => import("react/jsx-runtime").JSX.Element;
4
4
  export default FilterDate;
@@ -1,4 +1,5 @@
1
+ import { ElementType } from 'react';
1
2
  import { IModalDialog } from '../../interfaces/components/Modal';
2
3
 
3
- declare const ModalDialog: ({ children, id, idModal, withOverlay, show, size, className, classNameContainer, onClose, }: IModalDialog) => import("react/jsx-runtime").JSX.Element;
4
+ declare const ModalDialog: <T extends ElementType = "div">({ as, children, id, idModal, withOverlay, show, size, className, classNameContainer, onClose, ...props }: IModalDialog<T>) => import("react/jsx-runtime").JSX.Element;
4
5
  export default ModalDialog;
@@ -1,4 +1,4 @@
1
1
  import { INumberFormat } from '../../interfaces/components/NumberFormat';
2
2
 
3
- declare const NumberFormat: ({ max, onChange, ...otherProps }: INumberFormat) => import("react/jsx-runtime").JSX.Element;
3
+ declare const NumberFormat: ({ max, min, onChange, ...otherProps }: INumberFormat) => import("react/jsx-runtime").JSX.Element;
4
4
  export default NumberFormat;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ declare const PortalComponent: React.FC<{
4
+ containerId?: string;
5
+ children: ReactNode;
6
+ }>;
7
+ export default PortalComponent;
@@ -1,4 +1,10 @@
1
1
  import { IRadioCheckbox } from '../../interfaces/components/RadioCheckbox/RadioCheckbox';
2
2
 
3
+ export declare const DefaultCheckedChecboxIcon: ({ className }: {
4
+ className?: string;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const DefaultRadioChecboxIcon: ({ className }: {
7
+ className?: string;
8
+ }) => import("react/jsx-runtime").JSX.Element;
3
9
  declare const RadioCheckbox: import('react').ForwardRefExoticComponent<IRadioCheckbox & import('react').RefAttributes<HTMLInputElement>>;
4
10
  export default RadioCheckbox;
@@ -1,5 +1,6 @@
1
- import { ITable, IVirtualizationHead, IVirtualizationTable } from '../../interfaces/components/Table';
1
+ import { ITable, IVirtualizationHead, IVirtualizationTable, ITableConfig } from '../../interfaces/components/Table';
2
2
 
3
+ export declare const ConfigTable: () => ITableConfig;
3
4
  export declare const VirtualizationHead: import('react').ForwardRefExoticComponent<Omit<IVirtualizationHead, "ref"> & import('react').RefAttributes<HTMLTableSectionElement>>;
4
5
  export declare const VirtualizationTable: ({ style, context, ...props }: IVirtualizationTable) => import("react/jsx-runtime").JSX.Element;
5
6
  declare const Table: <T>({ tableInstance, classNameWrapperTable, classNameTable, collapseAll, handlerRowClick, privillageRowClick, virtualization, virtualizationProps, headerId, tbodyTrId, maxHeight, idCalculateHeight, kind, componentSortASC, componentSortDESC, scrollTop, }: ITable<T>) => import("react/jsx-runtime").JSX.Element;
@@ -4,8 +4,8 @@ import { default as Popover } from './Popover/Popover';
4
4
  import { IRefPopover } from '../interfaces/components/Popover';
5
5
  import { default as InputFloatingInner } from './Input/InputFloatingInner';
6
6
  import { default as InputReguler } from './Input/InputReguler';
7
- import { default as Table } from './Table/Table';
8
- import { ITableColumnDef } from '../interfaces/components/Table';
7
+ import { default as Table, ConfigTable } from './Table/Table';
8
+ import { ITableColumnDef, ITableConfig } from '../interfaces/components/Table';
9
9
  import { default as TableVirtualization } from './Virtualization/TableVirtualization';
10
10
  import { TableVirtuosoHandle as IRefTableVirtualization, VirtuosoHandle as IRefListVirtualization } from 'react-virtuoso';
11
11
  import { default as ListVirtualization } from './Virtualization/ListVirtualization';
@@ -23,7 +23,7 @@ import { default as Switch } from './Switch/Switch';
23
23
  import { default as ButtonIcon } from './ButtonIcon/ButtonIcon';
24
24
  import { default as Badges } from './Badges/Badges';
25
25
  import { default as Chips } from './Chips/Chips';
26
- import { default as RadioCheckbox } from './RadioCheckbox/RadioCheckbox';
26
+ import { default as RadioCheckbox, DefaultCheckedChecboxIcon, DefaultRadioChecboxIcon } from './RadioCheckbox/RadioCheckbox';
27
27
  import { default as RadioCheckboxLabel } from './RadioCheckbox/RadioCheckboxLabel';
28
28
  import { default as Breadcrumbs } from './Breadcrumbs/Breadcrumbs';
29
29
  import { default as Sidebar } from './Sidebar/Sidebar';
@@ -36,9 +36,10 @@ import { default as FilterContainer } from './FilterContainer/FilterContainer';
36
36
  import { default as NumberFormat } from './NumberFormat/NumberFormat';
37
37
  import { PatternFormat } from 'react-number-format';
38
38
  import { IInputReguler, IInputFloatingInner } from '../interfaces/components/Input';
39
+ import { default as PortalComponent } from './PortalComponent/PortalComponent';
39
40
 
40
41
  import * as utilTable from '@tanstack/react-table';
41
42
  import type * as SelectDropdownContainerType from 'react-select';
42
43
  import type * as FilterContainerType from '../interfaces/components/FilterContainer';
43
- export { TPublish, Button, Popover, Calendar, CalendarRange, DatePicker, DateRangePicker, FilterDate, InputFloatingInner, InputReguler, Pagination, Tabs, TabPanel, Table, TableVirtualization, ListVirtualization, SelectDropdownContainer, utilTable, Switch, ButtonIcon, Badges, Chips, RadioCheckbox, RadioCheckboxLabel, Breadcrumbs, Sidebar, Collapse, ModalDialog, SelectDropdownContainerComponents, Timeline, FilterContainer, NumberFormat, PatternFormat, };
44
- export type { ITableColumnDef, IRefPopover, IRefTableVirtualization, IRefListVirtualization, IRefSelectDropdownContainer, IChildrenSelectDropdownContainer, ISidebarModule, SelectDropdownContainerType, FilterContainerType, IInputReguler, IInputFloatingInner, };
44
+ export { TPublish, Button, Popover, Calendar, CalendarRange, DatePicker, DateRangePicker, FilterDate, InputFloatingInner, InputReguler, Pagination, Tabs, TabPanel, Table, TableVirtualization, ListVirtualization, SelectDropdownContainer, utilTable, Switch, ButtonIcon, Badges, Chips, RadioCheckbox, RadioCheckboxLabel, Breadcrumbs, Sidebar, Collapse, ModalDialog, SelectDropdownContainerComponents, Timeline, FilterContainer, NumberFormat, PatternFormat, DefaultCheckedChecboxIcon, DefaultRadioChecboxIcon, ConfigTable, PortalComponent, };
45
+ export type { ITableColumnDef, IRefPopover, IRefTableVirtualization, IRefListVirtualization, IRefSelectDropdownContainer, IChildrenSelectDropdownContainer, ISidebarModule, SelectDropdownContainerType, FilterContainerType, IInputReguler, IInputFloatingInner, ITableConfig, };
@@ -1,4 +1,6 @@
1
1
  import { default as useElementOrWindowMediaQuery } from './useElementOrWindowMediaQuery';
2
2
  import { default as useCountdown } from './useCountdown';
3
+ import { default as useAsyncDebounce } from './useAsyncDebounce';
4
+ import { default as useCombinedResizeObserver } from './useCombinedResizeObserver';
3
5
 
4
- export { useElementOrWindowMediaQuery, useCountdown };
6
+ export { useElementOrWindowMediaQuery, useCountdown, useAsyncDebounce, useCombinedResizeObserver };
@@ -0,0 +1,2 @@
1
+ declare function useAsyncDebounce<T extends (...args: unknown[]) => Promise<unknown>>(defaultFn: T, defaultWait?: number): (...args: Parameters<T>) => Promise<ReturnType<T>>;
2
+ export default useAsyncDebounce;
@@ -0,0 +1,22 @@
1
+ import { RefObject } from 'react';
2
+
3
+ interface ContentRect {
4
+ width: number;
5
+ height: number;
6
+ top: number;
7
+ left: number;
8
+ bottom: number;
9
+ right: number;
10
+ x: number;
11
+ y: number;
12
+ }
13
+ interface CombinedResizeObserverHook<T extends HTMLElement> {
14
+ ref: RefObject<T>;
15
+ windowSize: {
16
+ width: number;
17
+ height: number;
18
+ };
19
+ contentRect: ContentRect;
20
+ }
21
+ declare const useCombinedResizeObserver: <T extends HTMLElement>() => CombinedResizeObserverHook<T>;
22
+ export default useCombinedResizeObserver;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ICalendarButtonConfirm, ICalendarPrevNextIcon, IDateRange, TDateType } from '../Calendar';
3
- import { UseFloatingOptions } from '@floating-ui/react';
3
+ import { OffsetOptions, UseFloatingOptions } from '@floating-ui/react';
4
4
 
5
5
  export interface IDatePicker extends ICalendarPrevNextIcon, ICalendarButtonConfirm {
6
6
  value?: TDateType;
@@ -15,7 +15,8 @@ export interface IDatePicker extends ICalendarPrevNextIcon, ICalendarButtonConfi
15
15
  idPopover?: string;
16
16
  id?: string;
17
17
  floatingOptions?: UseFloatingOptions;
18
- offsetPopover?: number;
18
+ offsetPopover?: OffsetOptions;
19
+ zIndexPopper?: number;
19
20
  }
20
21
  export interface IDateRangePicker extends ICalendarPrevNextIcon, ICalendarButtonConfirm {
21
22
  defaultValue?: IDateRange;
@@ -43,5 +44,6 @@ export interface IFilterDate extends ICalendarPrevNextIcon, ICalendarButtonConfi
43
44
  idPopover?: string;
44
45
  id?: string;
45
46
  floatingOptions?: UseFloatingOptions;
46
- offsetPopover?: number;
47
+ offsetPopover?: OffsetOptions;
48
+ zIndexPopper?: number;
47
49
  }
@@ -1,6 +1,7 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, ElementType } from 'react';
2
2
 
3
- export interface IModalDialog {
3
+ export interface IModalDialog<T extends ElementType> {
4
+ as?: T;
4
5
  children: ReactNode | ReactNode[];
5
6
  id?: string;
6
7
  idModal?: string;
@@ -2,5 +2,6 @@ import { NumericFormatProps } from 'react-number-format';
2
2
 
3
3
  export interface INumberFormat extends NumericFormatProps {
4
4
  max?: number | undefined;
5
+ min?: number | undefined;
5
6
  [key: string]: unknown;
6
7
  }
@@ -1,10 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
- import { FlipOptions, AutoPlacementOptions, UseFloatingOptions } from '@floating-ui/react';
2
+ import { FlipOptions, AutoPlacementOptions, UseFloatingOptions, OffsetOptions } from '@floating-ui/react';
3
3
 
4
4
  export interface IPopover extends React.HTMLAttributes<HTMLDivElement> {
5
5
  children: ReactNode | ReactNode[];
6
6
  className?: string | undefined;
7
- offset?: number;
7
+ offset?: OffsetOptions;
8
8
  anchorEl?: ReactNode;
9
9
  isShow?: boolean;
10
10
  useAutoPlacement?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Props as SelectProps, ActionMeta, GroupBase, SelectComponentsConfig, MultiValue, SingleValue } from 'react-select';
3
- import { AutoPlacementOptions, FlipOptions, UseFloatingOptions } from '@floating-ui/react';
3
+ import { AutoPlacementOptions, FlipOptions, OffsetOptions, UseFloatingOptions } from '@floating-ui/react';
4
4
 
5
5
  export interface ISelectDropdownContainer<T> extends Omit<SelectProps<T, boolean, GroupBase<T>>, 'onChange' | 'getOptionLabel'> {
6
6
  width?: number | string;
@@ -29,7 +29,7 @@ export interface ISelectDropdownContainer<T> extends Omit<SelectProps<T, boolean
29
29
  components?: SelectComponentsConfig<T, boolean, GroupBase<T>>;
30
30
  getOptionLabel?: (option: T) => ReactNode | Element | string;
31
31
  selectProps?: object;
32
- offsetPopover?: number;
32
+ offsetPopover?: OffsetOptions;
33
33
  }
34
34
  export interface IChildrenSelectDropdownContainer {
35
35
  selectValue: unknown;
@@ -62,3 +62,16 @@ export interface IVirtualizationTable extends HTMLAttributes<HTMLTableElement> {
62
62
  };
63
63
  [key: string]: unknown;
64
64
  }
65
+ export interface ITableConfig {
66
+ kind: {
67
+ 'payhere-reguler': string;
68
+ 'laba-reguler': string;
69
+ };
70
+ pointer: {
71
+ 'payhere-reguler': string;
72
+ 'laba-reguler': string;
73
+ };
74
+ utility: {
75
+ 'table-scroll-top': string;
76
+ };
77
+ }
@@ -14,7 +14,7 @@ export interface IItemProps {
14
14
  }
15
15
  export interface IListVirtualization {
16
16
  classNameContainer?: string;
17
- computeItemKey?: () => string;
17
+ computeItemKey?: (index: number, item: unknown, context: unknown) => string;
18
18
  itemSize?: (el: HTMLElement) => number;
19
19
  totalCount?: number;
20
20
  typeHight: 'min-max' | 'container';
@@ -23,7 +23,7 @@ export interface IListVirtualization {
23
23
  minLengthItem?: number;
24
24
  itemContent: (Wrapper: React.ComponentType<IWrapperProps>, index: number, data: unknown, context: unknown) => ReactNode;
25
25
  typeCalculateItemSize?: 'auto' | 'manual';
26
- itemSizeNames: string[];
26
+ itemSizeNames?: string[];
27
27
  overscan?: (value?: number) => number;
28
28
  component?: Components;
29
29
  idContainer?: string;
@@ -14,7 +14,7 @@ export interface ITableRowProps {
14
14
  }
15
15
  export interface ITableVirtualization {
16
16
  classNameContainer?: string;
17
- computeItemKey?: () => string;
17
+ computeItemKey?: (index: number, item: unknown, context: unknown) => string;
18
18
  itemSize?: (el: HTMLElement) => number;
19
19
  totalCount?: number;
20
20
  typeHight: 'min-max' | 'container';
@@ -24,7 +24,7 @@ export interface ITableVirtualization {
24
24
  fixedHeaderContent: (() => ReactNode) | (() => ReactNode[]);
25
25
  itemContent: (Wrapper: React.ComponentType<IWrapperProps>, index: number, data: unknown, context: unknown) => ReactNode;
26
26
  typeCalculateItemSize?: 'auto' | 'manual';
27
- itemSizeNames: string[];
27
+ itemSizeNames?: string[];
28
28
  overscan?: (value?: number) => number;
29
29
  component?: TableComponents;
30
30
  idContainer?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "1mpacto-react-ui",
3
3
  "private": false,
4
- "version": "0.0.23",
4
+ "version": "0.0.24",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",