gantri-components 1.93.0 → 1.95.0

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 (45) hide show
  1. package/dist/components/breadcrumbs/index.d.ts +1 -0
  2. package/dist/components/button/button.types.d.ts +2 -2
  3. package/dist/components/color-picker/color-picker.d.ts +3 -0
  4. package/dist/components/color-picker/color-picker.presets.d.ts +2 -0
  5. package/dist/components/color-picker/color-picker.styles.d.ts +13 -0
  6. package/dist/components/color-picker/color-picker.types.d.ts +30 -0
  7. package/dist/components/color-picker/index.d.ts +1 -0
  8. package/dist/components/dropdown/dropdown.d.ts +1 -1
  9. package/dist/components/dropdown-menu/dropdown-menu.types.d.ts +1 -0
  10. package/dist/components/index.d.ts +7 -0
  11. package/dist/components/search-field/index.d.ts +1 -0
  12. package/dist/components/search-field/search-field.d.ts +3 -0
  13. package/dist/components/search-field/search-field.presets.d.ts +2 -0
  14. package/dist/components/search-field/search-field.styles.d.ts +4 -0
  15. package/dist/components/search-field/search-field.types.d.ts +32 -0
  16. package/dist/components/tabs/components/index.d.ts +3 -0
  17. package/dist/components/tabs/components/tab/index.d.ts +1 -0
  18. package/dist/components/tabs/components/tab/tab.d.ts +3 -0
  19. package/dist/components/tabs/components/tab/tab.presets.d.ts +2 -0
  20. package/dist/components/tabs/components/tab/tab.styled.d.ts +4 -0
  21. package/dist/components/tabs/components/tab/tab.types.d.ts +8 -0
  22. package/dist/components/tabs/components/tab-panel/index.d.ts +1 -0
  23. package/dist/components/tabs/components/tab-panel/tab-panel.d.ts +3 -0
  24. package/dist/components/tabs/components/tab-panel/tab-panel.presets.d.ts +2 -0
  25. package/dist/components/tabs/components/tab-panel/tab-panel.styles.d.ts +1 -0
  26. package/dist/components/tabs/components/tab-panel/tab-panel.types.d.ts +3 -0
  27. package/dist/components/tabs/components/tabs-list/index.d.ts +1 -0
  28. package/dist/components/tabs/components/tabs-list/tabs-list.d.ts +3 -0
  29. package/dist/components/tabs/components/tabs-list/tabs-list.presets.d.ts +2 -0
  30. package/dist/components/tabs/components/tabs-list/tabs-list.styles.d.ts +7 -0
  31. package/dist/components/tabs/components/tabs-list/tabs-list.types.d.ts +6 -0
  32. package/dist/components/tabs/index.d.ts +1 -0
  33. package/dist/components/tabs/tabs.content.d.ts +14 -0
  34. package/dist/components/tabs/tabs.d.ts +3 -0
  35. package/dist/components/tabs/tabs.types.d.ts +3 -0
  36. package/dist/components/tooltip/index.d.ts +1 -0
  37. package/dist/components/tooltip/tooltip.d.ts +3 -0
  38. package/dist/components/tooltip/tooltip.presets.d.ts +2 -0
  39. package/dist/components/tooltip/tooltip.styles.d.ts +5 -0
  40. package/dist/components/tooltip/tooltip.types.d.ts +12 -0
  41. package/dist/index.cjs.js +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.esm.js +1 -1
  44. package/dist/index.umd.js +1 -1
  45. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export * from './breadcrumbs';
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { MouseEvent } from 'react';
2
2
  import { Property } from 'csstype';
3
3
  import { BaseProps } from '../box/box.types';
4
4
  import { TextVariant } from '../typography/typography.types';
@@ -18,7 +18,7 @@ export interface ButtonProps extends BaseProps {
18
18
  iconLocation?: 'left' | 'right';
19
19
  justifySelf?: ResolutionAwareProp<Property.JustifySelf>;
20
20
  minWidth?: ResolutionAwareProp<Property.Width>;
21
- onClick?: () => void;
21
+ onClick?: (event: MouseEvent) => void;
22
22
  processing?: boolean;
23
23
  size?: 'large' | 'small';
24
24
  text?: string;
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { ColorPickerProps } from './color-picker.types';
3
+ export declare const ColorPicker: FC<PropsWithChildren<ColorPickerProps>>;
@@ -0,0 +1,2 @@
1
+ import { ColorPickerProps } from './color-picker.types';
2
+ export declare const ColorPickerPresets: Partial<ColorPickerProps>;
@@ -0,0 +1,13 @@
1
+ import { ColorPickerVariant } from './color-picker.types';
2
+ export declare const StyledColorPicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledColorList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
4
+ $readOnly?: boolean | undefined;
5
+ }, never>;
6
+ export declare const StyledColorOutline: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
7
+ $selected?: boolean | undefined;
8
+ $variant?: ColorPickerVariant | undefined;
9
+ }, never>;
10
+ export declare const StyledColor: import("styled-components").StyledComponent<import("react-spring").AnimatedComponent<"span">, import("styled-components").DefaultTheme, {
11
+ $variant?: ColorPickerVariant | undefined;
12
+ color: string;
13
+ }, never>;
@@ -0,0 +1,30 @@
1
+ import { ChangeEvent } from 'react';
2
+ export declare type ColorPickerVariant = 'large' | 'small';
3
+ export interface ColorPickerProps {
4
+ allowMultipleSelection?: boolean;
5
+ /**
6
+ * List of colors to render,
7
+ * defaults to gantri's product colors list
8
+ * */
9
+ colors?: Color[];
10
+ labelText?: string;
11
+ labelTx?: string;
12
+ labelTxValues?: Record<string, unknown>;
13
+ name?: string;
14
+ onChange?: (event: ColorPickerChangeEvent) => void;
15
+ onValueChange?: (selected: Color | Color[]) => void;
16
+ readOnly?: boolean;
17
+ value?: string | string[];
18
+ variant?: ColorPickerVariant;
19
+ }
20
+ export interface Color {
21
+ code: string;
22
+ name: string;
23
+ value: string;
24
+ }
25
+ export interface ColorPickerChangeEvent extends Pick<ChangeEvent<HTMLInputElement>, Exclude<keyof ChangeEvent<HTMLInputElement>, 'target'>> {
26
+ target: {
27
+ name: string;
28
+ value: string;
29
+ };
30
+ }
@@ -0,0 +1 @@
1
+ export * from './color-picker';
@@ -1,3 +1,3 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
2
  import { DropdownProps } from './dropdown.types';
3
- export declare const Dropdown: FC<PropsWithChildren<DropdownProps<any>>>;
3
+ export declare const Dropdown: FC<PropsWithChildren<DropdownProps>>;
@@ -11,6 +11,7 @@ export interface DropdownMenuProps<T = Record<string, unknown>> {
11
11
  maxHeight?: Property.MaxHeight<string | number>;
12
12
  noShadow?: boolean;
13
13
  onKeyDown?: (event: KeyboardEvent) => void;
14
+ onPreselectedIndexChange?: (index: number) => void;
14
15
  onSelect?: (item: T | null) => void;
15
16
  renderItem?: (item: T) => ReactNode;
16
17
  searchType?: 'startsWith' | 'contains' | 'endsWith';
@@ -1,9 +1,12 @@
1
1
  export * from './aspect-ratio';
2
2
  export * from './badge';
3
3
  export * from './box';
4
+ export * from './breadcrumbs';
4
5
  export * from './button';
5
6
  export * from './cell';
6
7
  export * from './checkbox';
8
+ export * from './circular-progress';
9
+ export * from './color-picker';
7
10
  export * from './confirmation-modal';
8
11
  export * from './dropdown';
9
12
  export * from './dropdown-menu';
@@ -12,11 +15,15 @@ export * from './formik-input';
12
15
  export * from './grid';
13
16
  export * from './icon';
14
17
  export * from './image';
18
+ export * from './linear-progress';
15
19
  export * from './modal';
16
20
  export * from './overlay';
17
21
  export * from './radio';
22
+ export * from './search-field';
18
23
  export * from './stack';
24
+ export * from './tabs';
19
25
  export * from './text-area';
20
26
  export * from './text-field';
27
+ export * from './tooltip';
21
28
  export * from './typography';
22
29
  export * from './video';
@@ -0,0 +1 @@
1
+ export * from './search-field';
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { SearchFieldProps } from './search-field.types';
3
+ export declare const SearchField: FC<PropsWithChildren<SearchFieldProps>>;
@@ -0,0 +1,2 @@
1
+ import { SearchFieldProps } from './search-field.types';
2
+ export declare const SearchFieldPresets: Partial<SearchFieldProps>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledOption: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../typography/typography.types").TypographyProps & import("react").RefAttributes<unknown>>, import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledSelect: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const StyledContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,32 @@
1
+ import { CSSProperties, FocusEvent, ReactElement } from 'react';
2
+ import { DropdownMenuProps } from '../dropdown-menu/dropdown-menu.types';
3
+ import { ErrorMessageType } from '../text-field';
4
+ import { BlurChangeEvent, DropdownChangeEvent } from '../dropdown';
5
+ export interface SearchFieldProps<T = Record<string, unknown>> extends Pick<DropdownMenuProps<T>, Exclude<keyof DropdownMenuProps<T>, 'items'>> {
6
+ borderless?: boolean;
7
+ className?: string;
8
+ disabled?: boolean;
9
+ errorMessage?: ErrorMessageType;
10
+ hideErrors?: boolean;
11
+ icon?: ReactElement;
12
+ items?: T[];
13
+ keyProperty?: (option?: T) => string;
14
+ labelPosition?: 'top' | 'left';
15
+ labelText?: string;
16
+ labelTx?: string;
17
+ name?: string;
18
+ onBlur?: (event: BlurChangeEvent) => void;
19
+ onChange?: (event: DropdownChangeEvent<T>) => void;
20
+ onFocus?: (event: FocusEvent<HTMLDivElement>) => void;
21
+ onOpen?: () => void;
22
+ onTextChange?: (value: string) => void;
23
+ placeholder?: string;
24
+ placeholderTx?: string;
25
+ placeholderTxValues?: {
26
+ [key: string]: string;
27
+ };
28
+ renderPlaceholder?: (option?: T) => JSX.Element;
29
+ resetSelectionOnDisabled?: boolean;
30
+ style?: CSSProperties;
31
+ variant?: 'line' | 'filled';
32
+ }
@@ -0,0 +1,3 @@
1
+ export * from './tab';
2
+ export * from './tab-panel';
3
+ export * from './tabs-list';
@@ -0,0 +1 @@
1
+ export * from './tab';
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TabProps } from './tab.types';
3
+ export declare const Tab: FC<TabProps>;
@@ -0,0 +1,2 @@
1
+ import { TabProps } from './tab.types';
2
+ export declare const TabPresets: Partial<TabProps>;
@@ -0,0 +1,4 @@
1
+ export declare const StyledTab: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ $active: boolean;
3
+ $disabled?: boolean | undefined;
4
+ }, never>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface TabProps {
3
+ disabled?: boolean;
4
+ icon?: JSX.Element;
5
+ label?: string;
6
+ labelTx?: string;
7
+ value: string | number;
8
+ }
@@ -0,0 +1 @@
1
+ export * from './tab-panel';
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { TabPanelProps } from './tab-panel.types';
3
+ export declare const TabPanel: FC<PropsWithChildren<TabPanelProps>>;
@@ -0,0 +1,2 @@
1
+ import { TabPanelProps } from './tab-panel.types';
2
+ export declare const TabPanelPresets: Partial<TabPanelProps>;
@@ -0,0 +1 @@
1
+ export declare const StyledTabPanel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,3 @@
1
+ export interface TabPanelProps {
2
+ value: string | number;
3
+ }
@@ -0,0 +1 @@
1
+ export * from './tabs-list';
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { TabsListProps } from './tabs-list.types';
3
+ export declare const TabsList: FC<PropsWithChildren<TabsListProps>>;
@@ -0,0 +1,2 @@
1
+ import { TabsListProps } from './tabs-list.types';
2
+ export declare const TabsListPresets: Partial<TabsListProps>;
@@ -0,0 +1,7 @@
1
+ import { Property } from 'csstype';
2
+ export declare const StyledTabsList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
+ $align?: Property.JustifyContent | undefined;
4
+ }, never>;
5
+ export declare const StyledTabsContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
6
+ $hasBorder?: boolean | undefined;
7
+ }, never>;
@@ -0,0 +1,6 @@
1
+ import { Property } from 'csstype';
2
+ export interface TabsListProps {
3
+ align?: Property.JustifyContent;
4
+ hasBorder?: boolean;
5
+ onValueChange?: (value: string | number) => void;
6
+ }
@@ -0,0 +1 @@
1
+ export * from './tabs';
@@ -0,0 +1,14 @@
1
+ import React, { FC, PropsWithChildren } from 'react';
2
+ interface State {
3
+ activeValue: number | string;
4
+ }
5
+ declare type Action = {
6
+ type: 'SET_VALUE';
7
+ value: string | number;
8
+ } | {
9
+ type: 'RESET';
10
+ };
11
+ export declare const TabsContent: FC<PropsWithChildren<State>>;
12
+ export declare function useTabsState(): State;
13
+ export declare function useTabsDispatch(): React.Dispatch<Action>;
14
+ export {};
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { TabsProps } from './tabs.types';
3
+ export declare const Tabs: FC<PropsWithChildren<TabsProps>>;
@@ -0,0 +1,3 @@
1
+ export interface TabsProps {
2
+ value: string | number;
3
+ }
@@ -0,0 +1 @@
1
+ export * from './tooltip';
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { TooltipProps } from './tooltip.types';
3
+ export declare const Tooltip: FC<PropsWithChildren<TooltipProps>>;
@@ -0,0 +1,2 @@
1
+ import { TooltipProps } from './tooltip.types';
2
+ export declare const TooltipPresets: Partial<TooltipProps>;
@@ -0,0 +1,5 @@
1
+ import { OverlayPosition } from '../overlay/overlay.types';
2
+ export declare const StyledTooltipContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
+ $hasPadding?: boolean | undefined;
4
+ $position?: OverlayPosition | undefined;
5
+ }, never>;
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { OverlayProps } from '../overlay/overlay.types';
3
+ export interface TooltipProps extends Pick<OverlayProps, 'position'> {
4
+ /**
5
+ * If specified, it will take preference over title/description
6
+ * */
7
+ Component?: ReactNode;
8
+ description?: string;
9
+ descriptionTx?: string;
10
+ title?: string;
11
+ titleTx?: string;
12
+ }