gantri-components 2.209.0 → 2.210.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.
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { BannerProps } from './banner.types';
3
+ export declare const Banner: FC<BannerProps>;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { StyledBannerProps } from './banner.types';
3
+ export declare const StyledBanner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledBannerProps>> & string;
4
+ export declare const StyledBannerContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ export declare const StyledBannerTextContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
+ export declare const StyledBannerVerticalContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
+ export declare const StyledBannerLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {
8
+ $color: string;
9
+ }>> & string;
10
+ export declare const StyledBannerCaption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {
11
+ $color: string;
12
+ }>> & string;
13
+ export declare const StyledBannerCta: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
14
+ $isDark: boolean;
15
+ }>> & string;
16
+ export declare const StyledCloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
@@ -0,0 +1,29 @@
1
+ import { ReactElement } from 'react';
2
+ export type BannerVariant = 'success' | 'info' | 'warning' | 'alert' | 'subtle' | 'contrast' | 'dynamic';
3
+ export type BannerLayout = 'horizontal' | 'vertical';
4
+ export interface BannerProps {
5
+ /** Banner color variant. */
6
+ variant?: BannerVariant;
7
+ /** Layout direction. Horizontal shows CTA arrow inline, vertical stacks CTA button below. */
8
+ layout?: BannerLayout;
9
+ /** Whether to use the emphasized (solid) or de-emphasized (tinted) style. */
10
+ emphasized?: boolean;
11
+ /** Primary label text. */
12
+ label?: string;
13
+ /** Secondary caption text. */
14
+ caption?: string;
15
+ /** Icon element displayed before the label. */
16
+ icon?: ReactElement;
17
+ /** CTA action text (vertical layout) or show arrow icon (horizontal layout). */
18
+ actionText?: string;
19
+ /** Callback when the banner or CTA is clicked. */
20
+ onClick?: () => void;
21
+ /** Whether the banner can be dismissed. */
22
+ closeable?: boolean;
23
+ /** Callback when the close button is clicked. */
24
+ onClose?: () => void;
25
+ }
26
+ export interface StyledBannerProps {
27
+ $variant: BannerVariant;
28
+ $emphasized: boolean;
29
+ }
@@ -0,0 +1,2 @@
1
+ export * from './banner';
2
+ export * from './banner.types';
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps } from './button.types';
3
3
  import { PropsWithHidden } from '../box/box.types';
4
- export declare const StyledButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Partial<PropsWithHidden<ButtonProps>>>> & string;
4
+ export declare const StyledButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Partial<PropsWithHidden<ButtonProps>> & {
5
+ $iconOnly?: boolean | undefined;
6
+ }>> & string;
5
7
  export declare const StyledButtonContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ButtonProps>> & string;
@@ -3,11 +3,13 @@ import { CheckboxVariant } from './checkbox.types';
3
3
  export declare const StyledCheckboxWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {
4
4
  $hasError: boolean;
5
5
  }>> & string;
6
- export declare const StyledCheckbox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
6
+ interface StyledCheckboxProps {
7
7
  $checked: boolean;
8
- $hasError?: boolean | undefined;
9
- $variant?: CheckboxVariant | undefined;
10
- }>> & string;
8
+ $hasError?: boolean;
9
+ $variant?: CheckboxVariant;
10
+ }
11
+ export declare const StyledCheckbox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledCheckboxProps>> & string;
11
12
  export declare const StyledCheckboxContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
12
13
  disabled: boolean;
13
14
  }>> & string;
15
+ export {};
@@ -1,5 +1,6 @@
1
1
  export * from './aspect-ratio';
2
2
  export * from './badge';
3
+ export * from './banner';
3
4
  export * from './box';
4
5
  export * from './breadcrumbs';
5
6
  export * from './button-menu';
@@ -22,11 +23,13 @@ export * from './icon';
22
23
  export * from './image';
23
24
  export * from './in-view';
24
25
  export * from './input-group';
26
+ export * from './label';
25
27
  export * from './line';
26
28
  export * from './linear-progress';
27
29
  export * from './max-width';
28
30
  export * from './modal';
29
31
  export * from './multi-select-list';
32
+ export * from './option-selector';
30
33
  export * from './overlay';
31
34
  export * from './pills';
32
35
  export * from './positioned';
@@ -0,0 +1,2 @@
1
+ export * from './label';
2
+ export * from './label.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { LabelProps } from './label.types';
3
+ export declare const Label: (props: LabelProps) => React.JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledLabelContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const StyledOptionalText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -0,0 +1,19 @@
1
+ import { ReactElement } from 'react';
2
+ import { TextVariant } from '../typography';
3
+ import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
4
+ export interface LabelProps {
5
+ /** Label text. */
6
+ text?: string;
7
+ /** i18n translation key. */
8
+ tx?: string;
9
+ /** i18n components for interpolation. */
10
+ txComponents?: readonly ReactElement[] | {
11
+ readonly [tagName: string]: ReactElement;
12
+ };
13
+ /** i18n values for interpolation. */
14
+ txValues?: Record<string, unknown>;
15
+ /** Typography variant. Defaults to theme default. */
16
+ variant?: ResolutionAwareProp<TextVariant>;
17
+ /** Whether the field is required. Hides "(Optional)" when true. */
18
+ required?: boolean;
19
+ }
@@ -0,0 +1,2 @@
1
+ export * from './option-selector';
2
+ export * from './option-selector.types';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { OptionSelectorProps } from './option-selector.types';
3
+ export declare const OptionSelector: {
4
+ (props: OptionSelectorProps): React.JSX.Element;
5
+ defaultProps: Partial<OptionSelectorProps>;
6
+ };
@@ -0,0 +1,2 @@
1
+ import { OptionSelectorProps } from './option-selector.types';
2
+ export declare const optionSelectorDefaultProps: Partial<OptionSelectorProps>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { StyledOptionProps } from './option-selector.types';
3
+ export declare const StyledBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
4
+ export declare const StyledOptionButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledOptionProps>> & string;
5
+ export declare const StyledErrorMessage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -0,0 +1,68 @@
1
+ import { ReactElement } from 'react';
2
+ import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
3
+ import { BoxDimension } from '../box/box.types';
4
+ import { TextFieldSize } from '../text-field/text-field.types';
5
+ import { TextVariant } from '../typography';
6
+ export type OptionSelectorSize = TextFieldSize;
7
+ export interface OptionSelectorItem {
8
+ /** Unique value for this option. */
9
+ value: string;
10
+ /** Display label for the option. */
11
+ label: string;
12
+ /** Whether this option is disabled. */
13
+ disabled?: boolean;
14
+ /** Optional badge text displayed in the top-right corner of the option. */
15
+ badge?: string;
16
+ }
17
+ export interface OptionSelectorProps {
18
+ /** Array of options. Can be strings (used as both value and label) or OptionSelectorItem objects. */
19
+ items: (string | OptionSelectorItem)[];
20
+ /** Currently selected value. */
21
+ value: string;
22
+ /** Callback when an option is selected. */
23
+ onSelected: (value: string) => void;
24
+ /** Number of columns in the grid. */
25
+ columns?: ResolutionAwareProp<number>;
26
+ /** Gap between items. Defaults to '.5x' (4px). */
27
+ gap?: ResolutionAwareProp<BoxDimension>;
28
+ /** Label text displayed above the options. */
29
+ labelText?: string;
30
+ /** i18n translation key for label. */
31
+ labelTx?: string;
32
+ /** i18n components for label interpolation. */
33
+ labelTxComponents?: readonly ReactElement[] | {
34
+ readonly [tagName: string]: ReactElement;
35
+ };
36
+ /** i18n values for label interpolation. */
37
+ labelTxValues?: Record<string, unknown>;
38
+ /** Typography variant for the label. */
39
+ labelVariant?: ResolutionAwareProp<TextVariant>;
40
+ /** Optional name for form integration. */
41
+ name?: string;
42
+ /** Whether the field is required. */
43
+ required?: boolean;
44
+ /** Formik integration props - injected by FormikInput. */
45
+ onChange?: (event: {
46
+ target: {
47
+ name: string;
48
+ value: string;
49
+ };
50
+ }) => void;
51
+ /** Formik integration props - injected by FormikInput. */
52
+ onBlur?: (event: {
53
+ target: {
54
+ name: string;
55
+ };
56
+ }) => void;
57
+ /** Max width for each option button. */
58
+ optionMaxWidth?: string;
59
+ /** Size of the option buttons. Matches TextField sizes. Defaults to 'medium'. */
60
+ size?: ResolutionAwareProp<OptionSelectorSize>;
61
+ /** Error message from Formik validation. */
62
+ errorMessage?: string;
63
+ }
64
+ export interface StyledOptionProps {
65
+ $disabled: boolean;
66
+ $selected: boolean;
67
+ $size?: ResolutionAwareProp<OptionSelectorSize>;
68
+ }
@@ -3,15 +3,18 @@ import { RadioVariant } from './radio.types';
3
3
  export declare const StyledRadioContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
4
  $disabled?: boolean | undefined;
5
5
  }>> & string;
6
- export declare const StyledRadioWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {
6
+ interface StyledRadioWrapperProps {
7
7
  disabled: boolean | undefined;
8
8
  isChecked: boolean | undefined;
9
9
  showAsTile: boolean | undefined;
10
- }>> & string;
11
- export declare const StyledRadio: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
12
- $checked?: boolean | undefined;
13
- $disabled?: boolean | undefined;
14
- $variant?: RadioVariant | undefined;
15
- }>> & string;
10
+ }
11
+ export declare const StyledRadioWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, StyledRadioWrapperProps>> & string;
12
+ interface StyledRadioProps {
13
+ $checked?: boolean;
14
+ $disabled?: boolean;
15
+ $variant?: RadioVariant;
16
+ }
17
+ export declare const StyledRadio: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledRadioProps>> & string;
16
18
  export declare const StyledRadioInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
17
19
  export declare const StyledRadioMarker: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
20
+ export {};
@@ -2,9 +2,11 @@
2
2
  export declare const StyledToggleContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
3
  $disabled?: boolean | undefined;
4
4
  }>> & string;
5
- export declare const StyledToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
5
+ interface StyledToggleProps {
6
6
  $checked: boolean;
7
- $disabled?: boolean | undefined;
7
+ $disabled?: boolean;
8
8
  $withErrors: boolean;
9
- }>> & string;
9
+ }
10
+ export declare const StyledToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledToggleProps>> & string;
10
11
  export declare const StyledToggleSwitch: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
12
+ export {};