1mpacto-react-ui 0.0.18 → 0.0.20

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, }: 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, }: IFilterDate) => import("react/jsx-runtime").JSX.Element;
4
4
  export default FilterDate;
@@ -0,0 +1,4 @@
1
+ import { IFilterContainer } from '../../interfaces/components/FilterContainer';
2
+
3
+ declare const FilterContainer: ({ children, onChange }: IFilterContainer) => import("react/jsx-runtime").JSX.Element;
4
+ export default FilterContainer;
@@ -1,4 +1,7 @@
1
+ import { ForwardedRef } from 'react';
1
2
  import { IRefSelectDropdownContainer, ISelectDropdownContainer } from '../../interfaces/components/SelectDropdownContainer';
2
3
 
3
- declare const SelectDropdownContainer: import('react').ForwardRefExoticComponent<ISelectDropdownContainer & import('react').RefAttributes<IRefSelectDropdownContainer>>;
4
+ declare const SelectDropdownContainer: <T>(props: ISelectDropdownContainer<T> & {
5
+ ref?: ForwardedRef<IRefSelectDropdownContainer>;
6
+ }) => JSX.Element;
4
7
  export default SelectDropdownContainer;
@@ -0,0 +1,6 @@
1
+ import { ITimelineContent, ITimelineLayout } from '../../interfaces/components/Timeline';
2
+
3
+ declare const Timeline: (({ children }: ITimelineLayout) => import("react/jsx-runtime").JSX.Element) & {
4
+ TimelineContent: ({ children, time, clasName }: ITimelineContent) => import("react/jsx-runtime").JSX.Element;
5
+ };
6
+ export default Timeline;
@@ -30,7 +30,12 @@ import { default as Sidebar } from './Sidebar/Sidebar';
30
30
  import { ISidebarModule } from '../interfaces/components/Sidebar';
31
31
  import { default as Collapse } from './Collapse/Collapse';
32
32
  import { default as ModalDialog } from './Modal/ModalDialog';
33
+ import { components as SelectDropdownContainerComponents } from 'react-select';
34
+ import { default as Timeline } from './Timeline/Timeline';
35
+ import { default as FilterContainer } from './FilterContainer/FilterContainer';
33
36
 
34
37
  import * as utilTable from '@tanstack/react-table';
35
- 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, };
36
- export type { ITableColumnDef, IRefPopover, IRefTableVirtualization, IRefListVirtualization, IRefSelectDropdownContainer, IChildrenSelectDropdownContainer, ISidebarModule, };
38
+ import type * as SelectDropdownContainerType from 'react-select';
39
+ import type * as FilterContainerType from '../interfaces/components/FilterContainer';
40
+ 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, };
41
+ export type { ITableColumnDef, IRefPopover, IRefTableVirtualization, IRefListVirtualization, IRefSelectDropdownContainer, IChildrenSelectDropdownContainer, ISidebarModule, SelectDropdownContainerType, FilterContainerType, };
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
 
3
3
  export interface IButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  size?: 'large' | 'reguler' | 'small' | 'l' | 'm' | 's' | 'xs';
5
- variants?: 'filled-laba-blue-10' | 'ghost-laba-blue-10' | 'nude-laba-blue-10' | 'nude-gray-500' | 'primary-blue-700' | 'secondary-blue-700' | 'tertiary-blue-700' | 'ghost-blue-gray-100-bg_white';
5
+ variants?: 'filled-laba-blue-10' | 'ghost-laba-blue-10' | 'nude-laba-blue-10' | 'nude-gray-500' | 'primary-blue-700' | 'secondary-blue-700' | 'secondary-red-600' | 'tertiary-blue-700' | 'ghost-blue-gray-100-bg_white';
6
6
  startIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
7
7
  endIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
8
8
  children: ReactNode | ReactNode[];
@@ -1,5 +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
4
 
4
5
  export interface IDatePicker extends ICalendarPrevNextIcon, ICalendarButtonConfirm {
5
6
  value?: TDateType;
@@ -11,6 +12,9 @@ export interface IDatePicker extends ICalendarPrevNextIcon, ICalendarButtonConfi
11
12
  classNameButton?: string | undefined;
12
13
  buttonClick?: ((v: TDateType) => ReactNode) | ((v: TDateType) => ReactNode[]);
13
14
  onChange?: (v: TDateType | undefined) => void;
15
+ idPopover?: string;
16
+ id?: string;
17
+ floatingOptions?: UseFloatingOptions;
14
18
  }
15
19
  export interface IDateRangePicker extends ICalendarPrevNextIcon, ICalendarButtonConfirm {
16
20
  defaultValue?: IDateRange;
@@ -35,4 +39,7 @@ export interface IFilterDate extends ICalendarPrevNextIcon, ICalendarButtonConfi
35
39
  buttonList?: IButtonList[];
36
40
  typePicker?: 'RANGE' | 'SINGLE';
37
41
  onChange?: (v?: IDateRange) => void;
42
+ idPopover?: string;
43
+ id?: string;
44
+ floatingOptions?: UseFloatingOptions;
38
45
  }
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface IChildFilterContainer {
4
+ handlerOnChange: THandlerOnChangeFilterContainer;
5
+ value: IMergeState;
6
+ nativeValue: IMergeState;
7
+ }
8
+ export type IArrayOfObjectFilterContainer = {
9
+ [key: string]: unknown;
10
+ }[];
11
+ export interface IMergeState {
12
+ [key: string]: object | string | boolean | string[] | IArrayOfObjectFilterContainer;
13
+ }
14
+ export type THandlerOnChangeFilterContainer = (value: object | string | boolean | string[] | IArrayOfObjectFilterContainer, key: string, transform: 'array-to-string' | 'array-of-object-to-array' | 'array-of-object-to-string' | '', keyTransform: string) => void;
15
+ export interface IFilterContainer {
16
+ children: ((params: IChildFilterContainer) => ReactNode) | ((params: IChildFilterContainer) => ReactNode[]);
17
+ onChange?: (value: IMergeState, nativeValue: IMergeState) => void;
18
+ }
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { FlipOptions, AutoPlacementOptions } from '@floating-ui/react';
2
+ import { FlipOptions, AutoPlacementOptions, UseFloatingOptions } from '@floating-ui/react';
3
3
 
4
4
  export interface IPopover extends React.HTMLAttributes<HTMLDivElement> {
5
5
  children: ReactNode | ReactNode[];
@@ -13,6 +13,7 @@ export interface IPopover extends React.HTMLAttributes<HTMLDivElement> {
13
13
  zIndex?: number | undefined | string;
14
14
  width?: number | string;
15
15
  styleInnerPopover?: React.CSSProperties;
16
+ floatingOptions?: UseFloatingOptions;
16
17
  }
17
18
  export interface IRefPopover {
18
19
  show: boolean;
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
- import { Props as SelectProps, ActionMeta } from 'react-select';
3
- import { AutoPlacementOptions, FlipOptions } from '@floating-ui/react';
2
+ import { Props as SelectProps, ActionMeta, GroupBase, SelectComponentsConfig, MultiValue, SingleValue } from 'react-select';
3
+ import { AutoPlacementOptions, FlipOptions, UseFloatingOptions } from '@floating-ui/react';
4
4
 
5
- export interface ISelectDropdownContainer extends SelectProps {
5
+ export interface ISelectDropdownContainer<T> extends Omit<SelectProps<T, boolean, GroupBase<T>>, 'onChange' | 'getOptionLabel'> {
6
6
  width?: number | string;
7
7
  children: ((params: IChildrenSelectDropdownContainer) => ReactNode) | ((params: IChildrenSelectDropdownContainer) => ReactNode[]);
8
8
  classNameContainer?: string;
@@ -10,7 +10,7 @@ export interface ISelectDropdownContainer extends SelectProps {
10
10
  classNameContainerSelect?: string;
11
11
  classNameLabelError?: string;
12
12
  error?: string;
13
- onChange?: (newValue: unknown, actionMeta: ActionMeta<unknown>) => void;
13
+ onChange?: (newValue: MultiValue<T> | SingleValue<T>, actionMeta: ActionMeta<T>) => void;
14
14
  externalValue?: boolean;
15
15
  defaultValueButtonDropdown?: object | unknown[];
16
16
  autoClose?: boolean;
@@ -24,7 +24,10 @@ export interface ISelectDropdownContainer extends SelectProps {
24
24
  useAutoPlacement?: boolean;
25
25
  flipOptions?: FlipOptions;
26
26
  autoPlacementOptions?: AutoPlacementOptions;
27
+ floatingOptions?: UseFloatingOptions;
27
28
  withSearch?: boolean;
29
+ components?: SelectComponentsConfig<T, boolean, GroupBase<T>>;
30
+ getOptionLabel?: (option: T) => ReactNode | Element | string;
28
31
  }
29
32
  export interface IChildrenSelectDropdownContainer {
30
33
  selectValue: unknown;
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface ITimelineLayout {
4
+ children: ReactNode | ReactNode[];
5
+ id?: string;
6
+ }
7
+ export interface ITimelineContent {
8
+ children: ReactNode | ReactNode[];
9
+ time?: string;
10
+ clasName?: string | undefined;
11
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "1mpacto-react-ui",
3
3
  "private": false,
4
- "version": "0.0.18",
4
+ "version": "0.0.20",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",