1mpacto-react-ui 0.0.13 → 0.0.14

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.
Files changed (33) hide show
  1. package/dist/assets/core.css +1 -1
  2. package/dist/assets/style.css +1 -1
  3. package/dist/index.cjs +41 -37
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.mjs +7116 -6843
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/src/components/Calendar/Calendar.d.ts +1 -39
  9. package/dist/src/components/Calendar/CalendarButton.d.ts +1 -5
  10. package/dist/src/components/Calendar/CalendarCell.d.ts +1 -6
  11. package/dist/src/components/Calendar/CalendarMonth.d.ts +1 -6
  12. package/dist/src/components/Calendar/CalendarRange.d.ts +1 -13
  13. package/dist/src/components/Calendar/CalendarYear.d.ts +1 -12
  14. package/dist/src/components/DatePicker/DatePicker.d.ts +1 -13
  15. package/dist/src/components/DatePicker/DateRangePicker.d.ts +1 -14
  16. package/dist/src/components/DatePicker/FilterDate.d.ts +2 -17
  17. package/dist/src/components/Pagination/Pagination.d.ts +1 -16
  18. package/dist/src/components/Sidebar/ItemSidebar.d.ts +5 -0
  19. package/dist/src/components/Sidebar/Sidebar.d.ts +5 -0
  20. package/dist/src/components/Switch/Switch.d.ts +2 -10
  21. package/dist/src/components/index.d.ts +4 -2
  22. package/dist/src/config/tailwind/index.d.ts +2 -1
  23. package/dist/src/config/tailwind/screen.d.ts +3 -0
  24. package/dist/src/hooks/index.d.ts +4 -0
  25. package/dist/src/hooks/useCountdown.d.ts +11 -0
  26. package/dist/src/hooks/useElementOrWindowMediaQuery.d.ts +2 -0
  27. package/dist/src/interfaces/components/Calendar/index.d.ts +76 -0
  28. package/dist/src/interfaces/components/DatePicker/index.d.ts +38 -0
  29. package/dist/src/interfaces/components/Pagination/index.d.ts +17 -0
  30. package/dist/src/interfaces/components/RadioCheckbox/RadioCheckbox.d.ts +1 -1
  31. package/dist/src/interfaces/components/Sidebar/index.d.ts +39 -0
  32. package/dist/src/interfaces/components/Switch/index.d.ts +12 -0
  33. package/package.json +1 -1
@@ -1,42 +1,4 @@
1
- import { ReactNode } from 'react';
2
- import { DateValue } from 'react-aria';
3
- import { CalendarState, CalendarStateOptions } from 'react-stately';
1
+ import { ICalendar } from '../../interfaces/components/Calendar';
4
2
 
5
- export type TCalendarType = 'date' | 'month' | 'year';
6
- export type TDateType = Date | string | null | undefined;
7
- export interface ICalendarPrevNextIcon {
8
- prevIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
9
- nextIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
10
- }
11
- export interface ICalendarButton {
12
- buttonReset?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
13
- buttonSubmit?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
14
- }
15
- export interface ITimeCalendar {
16
- hour?: number;
17
- minut?: number;
18
- second?: number;
19
- }
20
- export interface ICalendar extends CalendarStateOptions<DateValue>, ICalendarPrevNextIcon, ICalendarButton {
21
- withConfirm?: boolean;
22
- isCustomTime?: boolean;
23
- minDate?: TDateType;
24
- maxDate?: TDateType;
25
- time?: ITimeCalendar;
26
- handlerChangeTime: (v: ITimeCalendar) => void;
27
- handlerReset: (v: CalendarState) => void;
28
- handlerSubmit: () => void;
29
- }
30
- export interface ICalendarDateSelect extends CalendarStateOptions<DateValue>, ICalendarPrevNextIcon {
31
- state: CalendarState;
32
- setType: (v: TCalendarType) => void;
33
- }
34
- export interface ICustomTimeCalendar {
35
- time?: ITimeCalendar;
36
- value?: DateValue | null | undefined;
37
- minDate?: TDateType;
38
- maxDate?: TDateType;
39
- handlerChangeTime: (v: ITimeCalendar) => void;
40
- }
41
3
  declare const Calendar: (props: ICalendar) => import("react/jsx-runtime").JSX.Element;
42
4
  export default Calendar;
@@ -1,8 +1,4 @@
1
- import { ReactNode } from 'react';
2
- import { AriaButtonOptions } from 'react-aria';
1
+ import { ICalendarButton } from '../../interfaces/components/Calendar';
3
2
 
4
- export interface ICalendarButton extends AriaButtonOptions<'button'> {
5
- children: ReactNode | ReactNode[];
6
- }
7
3
  declare const CalendarButton: (props: ICalendarButton) => import("react/jsx-runtime").JSX.Element;
8
4
  export default CalendarButton;
@@ -1,9 +1,4 @@
1
- import { CalendarDate } from '@internationalized/date';
2
- import { CalendarState, RangeCalendarState } from 'react-stately';
1
+ import { ICalendarCell } from '../../interfaces/components/Calendar';
3
2
 
4
- export interface ICalendarCell {
5
- state: RangeCalendarState | CalendarState;
6
- date: CalendarDate;
7
- }
8
3
  declare const CalendarCell: (props: ICalendarCell) => import("react/jsx-runtime").JSX.Element;
9
4
  export default CalendarCell;
@@ -1,9 +1,4 @@
1
- import { CalendarState, RangeCalendarState } from 'react-stately';
2
- import { ICalendarPrevNextIcon, TCalendarType } from './Calendar';
1
+ import { ICalendarMonth } from '../../interfaces/components/Calendar';
3
2
 
4
- export interface ICalendarMonth extends ICalendarPrevNextIcon {
5
- state: CalendarState | RangeCalendarState;
6
- setType: (v: TCalendarType) => void;
7
- }
8
3
  declare const CalendarMonth: ({ prevIcon, nextIcon, state, setType }: ICalendarMonth) => import("react/jsx-runtime").JSX.Element;
9
4
  export default CalendarMonth;
@@ -1,16 +1,4 @@
1
- import { DateValue, RangeCalendarProps } from 'react-aria';
2
- import { DateRangePickerStateOptions, RangeCalendarState } from 'react-stately';
3
- import { ICalendarButton, ICalendarPrevNextIcon } from './Calendar';
1
+ import { ICalendarRange } from '../../interfaces/components/Calendar';
4
2
 
5
- export interface ICalendarDateRange extends RangeCalendarProps<DateValue>, ICalendarPrevNextIcon, ICalendarButton {
6
- withConfirm?: boolean;
7
- handlerSubmit: () => void;
8
- handlerReset: (v: RangeCalendarState) => void;
9
- }
10
- export interface ICalendarRange extends DateRangePickerStateOptions, ICalendarPrevNextIcon, ICalendarButton {
11
- withConfirm?: boolean;
12
- handlerSubmit: () => void;
13
- handlerReset: (v: RangeCalendarState) => void;
14
- }
15
3
  declare const CalendarRange: (props: ICalendarRange) => import("react/jsx-runtime").JSX.Element;
16
4
  export default CalendarRange;
@@ -1,15 +1,4 @@
1
- import { CalendarState, RangeCalendarState } from 'react-stately';
2
- import { TCalendarType } from './Calendar';
1
+ import { ICalendarYear } from '../../interfaces/components/Calendar';
3
2
 
4
- export interface ISetUpYear {
5
- startYear: number;
6
- endAfterThisYear: number;
7
- }
8
- export interface ICalendarYear {
9
- title: string;
10
- state: CalendarState | RangeCalendarState;
11
- setUpYear?: ISetUpYear;
12
- setType: (v: TCalendarType) => void;
13
- }
14
3
  declare const CalendarYear: ({ title, state, setUpYear, setType, }: ICalendarYear) => import("react/jsx-runtime").JSX.Element;
15
4
  export default CalendarYear;
@@ -1,16 +1,4 @@
1
- import { ReactNode } from 'react';
2
- import { ICalendarButton, ICalendarPrevNextIcon, TDateType } from '../Calendar/Calendar';
1
+ import { IDatePicker } from '../../interfaces/components/DatePicker';
3
2
 
4
- export interface IDatePicker extends ICalendarPrevNextIcon, ICalendarButton {
5
- value?: TDateType;
6
- minDate?: TDateType;
7
- maxDate?: TDateType;
8
- withConfirm?: boolean;
9
- isCustomTime?: boolean;
10
- className?: string | undefined;
11
- classNameButton?: string | undefined;
12
- buttonClick?: ReactNode | ReactNode[] | ((v: TDateType) => ReactNode) | ((v: TDateType) => ReactNode[]);
13
- onChange?: (v: TDateType | undefined) => void;
14
- }
15
3
  declare const DatePicker: (props: IDatePicker) => import("react/jsx-runtime").JSX.Element;
16
4
  export default DatePicker;
@@ -1,17 +1,4 @@
1
- import { ICalendarButton, ICalendarPrevNextIcon, TDateType } from '../Calendar/Calendar';
1
+ import { IDateRangePicker } from '../../interfaces/components/DatePicker';
2
2
 
3
- export interface IDateRange {
4
- startDate: TDateType;
5
- endDate: TDateType;
6
- }
7
- export interface IDateRangePicker extends ICalendarPrevNextIcon, ICalendarButton {
8
- defaultValue?: IDateRange;
9
- value?: TDateType;
10
- minDate?: Date | string;
11
- maxDate?: Date | string;
12
- withConfirm?: boolean;
13
- onChange?: (v: IDateRange) => void;
14
- onReset?: () => void;
15
- }
16
3
  declare const DateRangePicker: (props: IDateRangePicker) => import("react/jsx-runtime").JSX.Element;
17
4
  export default DateRangePicker;
@@ -1,19 +1,4 @@
1
- import { ReactNode } from 'react';
2
- import { IDateRange } from './DateRangePicker';
3
- import { ICalendarButton, ICalendarPrevNextIcon } from '../Calendar/Calendar';
1
+ import { IFilterDate } from '../../interfaces/components/DatePicker';
4
2
 
5
- export type TKeyButtonListType = 'thisDay' | 'thisWeek' | 'thisMonth' | 'thisYear' | 'yesterday' | 'lastWeek' | 'lastMonth' | 'lastYear' | 'custom';
6
- export interface IButtonList {
7
- key: TKeyButtonListType;
8
- value: string;
9
- }
10
- export interface IFilterDate extends ICalendarPrevNextIcon, ICalendarButton {
11
- className?: string | undefined;
12
- classNameButton?: string | undefined;
13
- buttonClick?: ReactNode | ReactNode[] | ((v: IDateRange | undefined) => ReactNode) | ((v: IDateRange | undefined) => ReactNode[]);
14
- value?: IDateRange | undefined;
15
- buttonList?: IButtonList[];
16
- onChange?: (v?: IDateRange) => void;
17
- }
18
- declare const FilterDate: ({ value, prevIcon, nextIcon, buttonReset, buttonSubmit, className, classNameButton, buttonClick, buttonList, onChange, }: IFilterDate) => import("react/jsx-runtime").JSX.Element;
3
+ declare const FilterDate: ({ value, prevIcon, nextIcon, buttonReset, buttonSubmit, className, classNameButton, buttonClick, buttonList, typePicker, onChange, }: IFilterDate) => import("react/jsx-runtime").JSX.Element;
19
4
  export default FilterDate;
@@ -1,19 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { IPaginationProps } from '../../interfaces/components/Pagination';
2
2
 
3
- type TKindPaginationType = 'box' | 'nude';
4
- export interface IPagination {
5
- pageNumber: number;
6
- pageSize: number;
7
- totalData: number;
8
- totalPage: number;
9
- }
10
- interface IPaginationProps extends IPagination {
11
- onChange?: (v: IPagination) => void;
12
- kind?: TKindPaginationType;
13
- className?: string | undefined;
14
- id?: string | undefined;
15
- prevIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
16
- nextIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
17
- }
18
3
  declare const Pagination: ({ totalData, totalPage, pageNumber, pageSize, className, id, kind, prevIcon, nextIcon, onChange, }: IPaginationProps) => import("react/jsx-runtime").JSX.Element;
19
4
  export default Pagination;
@@ -0,0 +1,5 @@
1
+ import { ElementType } from 'react';
2
+ import { IItemSidebar } from '../../interfaces/components/Sidebar';
3
+
4
+ declare const ItemSidebar: <T extends ElementType = "div">({ as, show, open, patch, iconSubs, kind, setShow, onClickItems, propsLink, ...value }: IItemSidebar<T>) => import("react/jsx-runtime").JSX.Element;
5
+ export default ItemSidebar;
@@ -0,0 +1,5 @@
1
+ import { ElementType } from 'react';
2
+ import { ISidebar } from '../../interfaces/components/Sidebar';
3
+
4
+ declare const Sidebar: <T extends ElementType = "div">({ as, children, patch, iconCompany, iconSubs, iconCollapse, iconCollapseClose, kind, modules, toleranceWidthIconCompany, onClickItems, ...props }: ISidebar<T>) => import("react/jsx-runtime").JSX.Element;
5
+ export default Sidebar;
@@ -1,12 +1,4 @@
1
- interface ISwitch {
2
- value: boolean;
3
- disabled?: boolean;
4
- size?: 'large' | 'regular' | 'small';
5
- title?: string;
6
- description?: string;
7
- id?: string | undefined;
8
- className?: string | undefined;
9
- onChange: (v: boolean) => void;
10
- }
1
+ import { ISwitch } from '../../interfaces/components/Switch';
2
+
11
3
  declare const Switch: ({ value, disabled, title, description, size, id, className, onChange, }: ISwitch) => import("react/jsx-runtime").JSX.Element;
12
4
  export default Switch;
@@ -26,8 +26,10 @@ import { default as Chips } from './Chips/Chips';
26
26
  import { default as RadioCheckbox } from './RadioCheckbox/RadioCheckbox';
27
27
  import { default as RadioCheckboxLabel } from './RadioCheckbox/RadioCheckboxLabel';
28
28
  import { default as Breadcrumbs } from './Breadcrumbs/Breadcrumbs';
29
+ import { default as Sidebar } from './Sidebar/Sidebar';
30
+ import { ISidebarModule } from '../interfaces/components/Sidebar';
29
31
  import { default as Collapse } from './Collapse/Collapse';
30
32
 
31
33
  import * as utilTable from '@tanstack/react-table';
32
- 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, Collapse, };
33
- export type { ITableColumnDef, IRefPopover, IRefTableVirtualization, IRefListVirtualization, IRefSelectDropdownContainer, IChildrenSelectDropdownContainer, };
34
+ 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, };
35
+ export type { ITableColumnDef, IRefPopover, IRefTableVirtualization, IRefListVirtualization, IRefSelectDropdownContainer, IChildrenSelectDropdownContainer, ISidebarModule, };
@@ -1,4 +1,5 @@
1
1
  import { default as ConfigColors } from './colors';
2
2
  import { default as configTypography, configTypographyLabaBisnis, configTypographyPayhere } from './typography';
3
+ import { default as configScreens } from './screen';
3
4
 
4
- export { ConfigColors, configTypography, configTypographyLabaBisnis, configTypographyPayhere };
5
+ export { ConfigColors, configTypography, configTypographyLabaBisnis, configTypographyPayhere, configScreens };
@@ -0,0 +1,3 @@
1
+ export type IScreen = Record<string, string>;
2
+ declare const screens: IScreen;
3
+ export default screens;
@@ -0,0 +1,4 @@
1
+ import { default as useElementOrWindowMediaQuery } from './useElementOrWindowMediaQuery';
2
+ import { default as useCountdown } from './useCountdown';
3
+
4
+ export { useElementOrWindowMediaQuery, useCountdown };
@@ -0,0 +1,11 @@
1
+ declare const useCountdown: (options: {
2
+ hours: number;
3
+ intervalMs: number;
4
+ running: boolean;
5
+ }) => {
6
+ count: number;
7
+ startCountdown: () => void;
8
+ stopCountdown: () => void;
9
+ resetCountdown: () => void;
10
+ };
11
+ export default useCountdown;
@@ -0,0 +1,2 @@
1
+ declare function useElementOrWindowMediaQuery(query: string, elementId?: string | null): boolean;
2
+ export default useElementOrWindowMediaQuery;
@@ -0,0 +1,76 @@
1
+ import { CalendarDate } from '@internationalized/date';
2
+ import { ReactNode } from 'react';
3
+ import { AriaButtonOptions, DateValue, RangeCalendarProps } from 'react-aria';
4
+ import { CalendarState, CalendarStateOptions, DateRangePickerStateOptions, RangeCalendarState } from 'react-stately';
5
+
6
+ export type TCalendarType = 'date' | 'month' | 'year';
7
+ export type TDateType = Date | string | null | undefined;
8
+ export interface ICalendarPrevNextIcon {
9
+ prevIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
10
+ nextIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
11
+ }
12
+ export interface ICalendarButtonConfirm {
13
+ buttonReset?: (() => ReactNode) | (() => ReactNode[]);
14
+ buttonSubmit?: (() => ReactNode) | (() => ReactNode[]);
15
+ }
16
+ export interface ITimeCalendar {
17
+ hour?: number;
18
+ minut?: number;
19
+ second?: number;
20
+ }
21
+ export interface ICalendar extends CalendarStateOptions<DateValue>, ICalendarPrevNextIcon, ICalendarButtonConfirm {
22
+ withConfirm?: boolean;
23
+ isCustomTime?: boolean;
24
+ minDate?: TDateType;
25
+ maxDate?: TDateType;
26
+ time?: ITimeCalendar;
27
+ handlerChangeTime?: (v: ITimeCalendar) => void;
28
+ handlerReset: (v: CalendarState) => void;
29
+ handlerSubmit: () => void;
30
+ }
31
+ export interface ICalendarDateSelect extends CalendarStateOptions<DateValue>, ICalendarPrevNextIcon {
32
+ state: CalendarState;
33
+ setType: (v: TCalendarType) => void;
34
+ }
35
+ export interface ICustomTimeCalendar {
36
+ time?: ITimeCalendar;
37
+ value?: DateValue | null | undefined;
38
+ minDate?: TDateType;
39
+ maxDate?: TDateType;
40
+ handlerChangeTime?: (v: ITimeCalendar) => void;
41
+ }
42
+ export interface ICalendarButton extends AriaButtonOptions<'button'> {
43
+ children: ReactNode | ReactNode[];
44
+ }
45
+ export interface ICalendarCell {
46
+ state: RangeCalendarState | CalendarState;
47
+ date: CalendarDate;
48
+ }
49
+ export interface ICalendarMonth extends ICalendarPrevNextIcon {
50
+ state: CalendarState | RangeCalendarState;
51
+ setType: (v: TCalendarType) => void;
52
+ }
53
+ export interface ISetUpYear {
54
+ startYear: number;
55
+ endAfterThisYear: number;
56
+ }
57
+ export interface ICalendarYear {
58
+ title: string;
59
+ state: CalendarState | RangeCalendarState;
60
+ setUpYear?: ISetUpYear;
61
+ setType: (v: TCalendarType) => void;
62
+ }
63
+ export interface IDateRange {
64
+ startDate: TDateType;
65
+ endDate: TDateType;
66
+ }
67
+ export interface ICalendarDateRange extends RangeCalendarProps<DateValue>, ICalendarPrevNextIcon, ICalendarButtonConfirm {
68
+ withConfirm?: boolean;
69
+ handlerSubmit: () => void;
70
+ handlerReset: (v: RangeCalendarState) => void;
71
+ }
72
+ export interface ICalendarRange extends DateRangePickerStateOptions, ICalendarPrevNextIcon, ICalendarButtonConfirm {
73
+ withConfirm?: boolean;
74
+ handlerSubmit: () => void;
75
+ handlerReset: (v: RangeCalendarState) => void;
76
+ }
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ import { ICalendarButtonConfirm, ICalendarPrevNextIcon, IDateRange, TDateType } from '../Calendar';
3
+
4
+ export interface IDatePicker extends ICalendarPrevNextIcon, ICalendarButtonConfirm {
5
+ value?: TDateType;
6
+ minDate?: TDateType;
7
+ maxDate?: TDateType;
8
+ withConfirm?: boolean;
9
+ isCustomTime?: boolean;
10
+ className?: string | undefined;
11
+ classNameButton?: string | undefined;
12
+ buttonClick?: ((v: TDateType) => ReactNode) | ((v: TDateType) => ReactNode[]);
13
+ onChange?: (v: TDateType | undefined) => void;
14
+ }
15
+ export interface IDateRangePicker extends ICalendarPrevNextIcon, ICalendarButtonConfirm {
16
+ defaultValue?: IDateRange;
17
+ value?: TDateType;
18
+ minDate?: TDateType;
19
+ maxDate?: TDateType;
20
+ withConfirm?: boolean;
21
+ typePicker?: 'SINGLE' | 'RANGE';
22
+ onChange?: (v: IDateRange) => void;
23
+ onReset?: () => void;
24
+ }
25
+ export type TKeyButtonListType = 'thisDay' | 'thisWeek' | 'thisMonth' | 'thisYear' | 'yesterday' | 'lastWeek' | 'lastMonth' | 'lastYear' | 'custom';
26
+ export interface IButtonList {
27
+ key: TKeyButtonListType;
28
+ value: string;
29
+ }
30
+ export interface IFilterDate extends ICalendarPrevNextIcon, ICalendarButtonConfirm {
31
+ className?: string | undefined;
32
+ classNameButton?: string | undefined;
33
+ buttonClick?: ReactNode | ReactNode[] | ((v: IDateRange | undefined) => ReactNode) | ((v: IDateRange | undefined) => ReactNode[]);
34
+ value?: IDateRange | undefined;
35
+ buttonList?: IButtonList[];
36
+ typePicker?: 'RANGE' | 'SINGLE';
37
+ onChange?: (v?: IDateRange) => void;
38
+ }
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export type TKindPaginationType = 'box' | 'nude';
4
+ export interface IPagination {
5
+ pageNumber: number;
6
+ pageSize: number;
7
+ totalData: number;
8
+ totalPage: number;
9
+ }
10
+ export interface IPaginationProps extends IPagination {
11
+ onChange?: (v: IPagination) => void;
12
+ kind?: TKindPaginationType;
13
+ className?: string | undefined;
14
+ id?: string | undefined;
15
+ prevIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
16
+ nextIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
17
+ }
@@ -5,7 +5,7 @@ import { Itypography } from '../../../config/components/typography';
5
5
  export interface IRadioCheckbox extends InputHTMLAttributes<HTMLInputElement> {
6
6
  classNameContainer?: string | undefined;
7
7
  classNameLabel?: string | undefined;
8
- sizeInput?: 'reguler' | 's';
8
+ sizeInput?: 'reguler' | 's' | 'm';
9
9
  variants?: 'laba-blue-10' | 'blue-700' | 'blue-700-hv_bg_transparent' | 'laba-blue-10-hv_bg_transparent';
10
10
  variantDisableds?: 'default-disabled-checkbox' | 'default-disabled-radio';
11
11
  borderRadius?: IBorderRadius;
@@ -0,0 +1,39 @@
1
+ import { ElementType, HTMLAttributes, ReactNode } from 'react';
2
+
3
+ export type TColorSidebarType = 'payhere' | 'laba';
4
+ export interface ISidebarModule {
5
+ name: string;
6
+ label: string;
7
+ slug: string;
8
+ subs: ISidebarModule[];
9
+ isShow: boolean;
10
+ parent: number;
11
+ icon?: string;
12
+ svgIcon?: ReactNode | null;
13
+ svgIconActive?: ReactNode | null;
14
+ }
15
+ export interface ISidebar<T extends ElementType> extends HTMLAttributes<HTMLDivElement> {
16
+ as?: T;
17
+ children: ReactNode | ReactNode[];
18
+ patch?: string;
19
+ iconCompany: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
20
+ iconSubs?: ReactNode | ReactNode[];
21
+ iconCollapse?: ReactNode | ReactNode[];
22
+ iconCollapseClose?: ReactNode | ReactNode[];
23
+ kind?: TColorSidebarType;
24
+ modules: ISidebarModule[];
25
+ toleranceWidthIconCompany?: number;
26
+ onClickItems?: (v: ISidebarModule) => void;
27
+ propsLink?: (value: string) => object;
28
+ }
29
+ export interface IItemSidebar<T extends ElementType> extends ISidebarModule {
30
+ as?: T;
31
+ show: string;
32
+ open: boolean | null;
33
+ patch?: string;
34
+ iconSubs?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
35
+ kind?: TColorSidebarType;
36
+ setShow: (v: string) => void;
37
+ onClickItems?: (v: ISidebarModule) => void;
38
+ propsLink?: (value: string) => object;
39
+ }
@@ -0,0 +1,12 @@
1
+ type TSizeSwitchType = 'large' | 'regular' | 'small';
2
+ export interface ISwitch {
3
+ value: boolean;
4
+ disabled?: boolean;
5
+ size?: TSizeSwitchType;
6
+ title?: string;
7
+ description?: string;
8
+ id?: string | undefined;
9
+ className?: string | undefined;
10
+ onChange: (v: boolean) => void;
11
+ }
12
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "1mpacto-react-ui",
3
3
  "private": false,
4
- "version": "0.0.13",
4
+ "version": "0.0.14",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",