@zonos/amino 5.1.38 → 5.1.40

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 (30) hide show
  1. package/components/button/RippleGroup.d.ts +3 -3
  2. package/components/button/useRipple.d.ts +5 -5
  3. package/components/connection-map/ConnectionMap.d.ts +4 -4
  4. package/components/filter/filter-date/FilterDate.d.ts +2 -2
  5. package/components/filter/filter-multi-select/FilterMultiSelect.d.ts +4 -4
  6. package/components/filter/filter-select/FilterSelect.d.ts +3 -3
  7. package/components/select/CountryMultiSelect.d.ts +8 -8
  8. package/components/select/CountryPhoneSelect.d.ts +8 -8
  9. package/components/select/CountrySelect.d.ts +5 -5
  10. package/components/select/MultiSelect.d.ts +6 -6
  11. package/components/select/Select.d.ts +4 -4
  12. package/components/select/_StyledReactSelect.d.ts +5 -5
  13. package/components/sortable-list/SortableList.d.ts +2 -2
  14. package/components/sortable-list/SortableListItem.d.ts +2 -2
  15. package/components/split-panel/SplitPanel.d.ts +2 -2
  16. package/components/stack/Stack.d.ts +2 -2
  17. package/components/tag/Tag.d.ts +2 -2
  18. package/icons/flag-icon/FlagIcon.d.ts +6 -6
  19. package/package.json +1 -1
  20. package/types/BaseProps.d.ts +2 -2
  21. package/types/{ICountry.d.ts → Country.d.ts} +16 -16
  22. package/types/FetcherError.d.ts +2 -2
  23. package/types/{IGeoJsonWorld.d.ts → GeoJsonWorld.d.ts} +5 -5
  24. package/types/JsonError.d.ts +2 -2
  25. package/types/{IOption.d.ts → SelectOption.d.ts} +2 -2
  26. package/types/SwrtParams.d.ts +2 -2
  27. package/utils/_graphiqlFetcher.d.ts +2 -2
  28. package/utils/getCountryCodeByName.d.ts +2 -2
  29. package/utils/prepCountryOptions.d.ts +2 -2
  30. package/utils/prepRegionCountryOptions.d.ts +3 -3
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import type { Color } from "../../types";
3
- export interface IRippleActions {
3
+ export type RippleActions = {
4
4
  start: (event: React.SyntheticEvent) => void;
5
- }
5
+ };
6
6
  export type RippleGroupProps = {
7
7
  /**
8
8
  * @default 'inherit'
@@ -17,4 +17,4 @@ export type RippleGroupProps = {
17
17
  */
18
18
  opacity?: number;
19
19
  };
20
- export declare const RippleGroup: React.ForwardRefExoticComponent<RippleGroupProps & React.RefAttributes<IRippleActions>>;
20
+ export declare const RippleGroup: React.ForwardRefExoticComponent<RippleGroupProps & React.RefAttributes<RippleActions>>;
@@ -1,16 +1,16 @@
1
1
  import * as React from 'react';
2
- import type { IRippleActions } from "./RippleGroup";
3
- interface IRippleEventHandlers {
2
+ import type { RippleActions } from "./RippleGroup";
3
+ type RippleEventHandlers = {
4
4
  onMouseDown: React.MouseEventHandler;
5
- }
5
+ };
6
6
  type Props = {
7
7
  disabled: boolean;
8
8
  rippleEnabled: boolean;
9
- rippleRef: React.RefObject<IRippleActions>;
9
+ rippleRef: React.RefObject<RippleActions>;
10
10
  };
11
11
  type Return = {
12
12
  /** Combines event handlers */
13
- getRippleHandlers(otherEvents: Partial<IRippleEventHandlers>): IRippleEventHandlers;
13
+ getRippleHandlers(otherEvents: Partial<RippleEventHandlers>): RippleEventHandlers;
14
14
  rippleEnabled: boolean;
15
15
  };
16
16
  export declare const useRipple: ({ disabled, rippleEnabled, rippleRef, }: Props) => Return;
@@ -1,12 +1,12 @@
1
1
  import type { BaseProps } from "../../types/BaseProps";
2
- import { type ICountryOption } from "../../types/ICountry";
3
- import { type IGeoJsonWorld } from "../../types/IGeoJsonWorld";
2
+ import { type CountryOption } from "../../types/Country";
3
+ import { type GeoJsonWorld } from "../../types/GeoJsonWorld";
4
4
  type Props = BaseProps & {
5
- countries: ICountryOption[];
5
+ countries: CountryOption[];
6
6
  from: string;
7
7
  height?: number;
8
8
  to: string;
9
- worldData: IGeoJsonWorld | null;
9
+ worldData: GeoJsonWorld | null;
10
10
  };
11
11
  export declare const ConnectionMap: ({ className, countries, from, height, to, worldData, }: Props) => import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,12 +1,12 @@
1
1
  import { type Dispatch } from 'react';
2
2
  import { type FilterDateAction, type FilterDateState } from "./filterDateReducer";
3
3
  import { type BaseFilterProps } from "../useFilterWrapper";
4
- type IBadgeFilterDateProps = BaseFilterProps & {
4
+ type BadgeFilterDateProps = BaseFilterProps & {
5
5
  dispatch: Dispatch<FilterDateAction>;
6
6
  filter: FilterDateState;
7
7
  };
8
8
  /**
9
9
  * Assumes exclusive date range. Specific formats/ranges should be handled upstream.
10
10
  */
11
- export declare const FilterDate: ({ dispatch, dropdownTitle, filter, label, }: IBadgeFilterDateProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const FilterDate: ({ dispatch, dropdownTitle, filter, label, }: BadgeFilterDateProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,9 +1,9 @@
1
1
  import { type BaseFilterProps } from "../useFilterWrapper";
2
- import type { IOption } from "../../../types/IOption";
2
+ import type { SelectOption } from "../../../types/SelectOption";
3
3
  type FilterMultiSelectProps<T extends string = string> = BaseFilterProps & {
4
- options: IOption<T>[];
5
- value: IOption<T>[];
6
- onChange: (value: IOption<T>[]) => void;
4
+ options: SelectOption<T>[];
5
+ value: SelectOption<T>[];
6
+ onChange: (value: SelectOption<T>[]) => void;
7
7
  };
8
8
  export declare const FilterMultiSelect: <T extends string = string>({ dropdownTitle, label, onChange, options, value, }: FilterMultiSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1,9 +1,9 @@
1
1
  import { type BaseFilterProps } from "../useFilterWrapper";
2
- import type { IOption } from "../../../types/IOption";
3
- type FilterSelectProps<T extends string = string, O extends IOption<string> = IOption<T>> = BaseFilterProps & {
2
+ import type { SelectOption } from "../../../types/SelectOption";
3
+ type FilterSelectProps<T extends string = string, O extends SelectOption<string> = SelectOption<T>> = BaseFilterProps & {
4
4
  options: O[];
5
5
  value: O | null;
6
6
  onChange: (value: O | null) => void;
7
7
  };
8
- export declare const FilterSelect: <T extends string = string, O extends IOption<T> = IOption<T>>({ onChange, options, value, ...props }: FilterSelectProps<T, O>) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const FilterSelect: <T extends string = string, O extends SelectOption<T> = SelectOption<T>>({ onChange, options, value, ...props }: FilterSelectProps<T, O>) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1,17 +1,17 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { type GroupBase, type MenuListProps, type Props, type SelectComponentsConfig, type StylesConfig } from 'react-select';
3
3
  import { type HelpTextProps } from "../help-text/HelpText";
4
- import { type ICountryOption, type IUnavailableCountry } from "../../types/ICountry";
5
- import type { IOption } from "../../types/IOption";
6
- export declare const MenuList: <Option extends IOption<string | number>, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, ...props }: MenuListProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
7
- export interface CountryMultiSelectProps<Option extends IOption<string> = IOption<string>, IsMulti extends true = true, Group extends GroupBase<Option> = GroupBase<Option>> extends Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'options' | 'value'>, HelpTextProps {
4
+ import { type CountryOption, type UnavailableCountry } from "../../types/Country";
5
+ import type { SelectOption } from "../../types/SelectOption";
6
+ export declare const MenuList: <Option extends SelectOption, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, ...props }: MenuListProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
7
+ export type CountryMultiSelectProps<Option extends SelectOption<string> = SelectOption<string>, IsMulti extends true = true, Group extends GroupBase<Option> = GroupBase<Option>> = {
8
8
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
9
- countryOptions: ICountryOption<Option['value']>[];
9
+ countryOptions: CountryOption<Option['value']>[];
10
10
  icon?: ReactNode;
11
11
  label?: string;
12
12
  styles?: StylesConfig<Option, IsMulti, Group>;
13
- unavailableCountries: IUnavailableCountry[];
13
+ unavailableCountries: UnavailableCountry[];
14
14
  value: Option['value'][];
15
15
  onChange: (countryCodes: Option['value'][]) => void;
16
- }
17
- export declare const CountryMultiSelect: <T extends string>({ countryOptions, label, onChange, unavailableCountries, value, ...props }: CountryMultiSelectProps<IOption<T>, true, GroupBase<IOption<T>>>) => import("react/jsx-runtime").JSX.Element;
16
+ } & Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'options' | 'value'> & HelpTextProps;
17
+ export declare const CountryMultiSelect: <T extends string>({ countryOptions, label, onChange, unavailableCountries, value, ...props }: CountryMultiSelectProps<SelectOption<T>, true, GroupBase<SelectOption<T>>>) => import("react/jsx-runtime").JSX.Element;
@@ -1,18 +1,18 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type GroupBase, type Props, type SelectComponentsConfig, type StylesConfig } from 'react-select';
3
3
  import type { HelpTextProps } from "../help-text/HelpText";
4
- import type { ICountryOption } from "../../types/ICountry";
5
- import type { IOption } from "../../types/IOption";
6
- export interface CountryPhoneSelectProps<Option extends IOption = IOption, IsMulti extends false = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'value'>, HelpTextProps {
4
+ import type { CountryOption } from "../../types/Country";
5
+ import type { SelectOption } from "../../types/SelectOption";
6
+ export type CountryPhoneSelectProps<Option extends SelectOption = SelectOption, IsMulti extends false = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
7
7
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
8
- countryOptions: ICountryOption[];
8
+ countryOptions: CountryOption[];
9
9
  hasGroups?: boolean;
10
10
  icon?: ReactNode;
11
11
  label?: string;
12
12
  phone: string;
13
- phoneCountry: ICountryOption | null;
13
+ phoneCountry: CountryOption | null;
14
14
  styles?: StylesConfig<Option, IsMulti, Group>;
15
15
  setPhone: (changed: string) => void;
16
- setPhoneCountry: (changed: ICountryOption | null) => void;
17
- }
18
- export declare const CountryPhoneSelect: ({ countryOptions, icon, label, phone, phoneCountry, setPhone, setPhoneCountry, ...props }: CountryPhoneSelectProps<ICountryOption>) => import("react/jsx-runtime").JSX.Element;
16
+ setPhoneCountry: (changed: CountryOption | null) => void;
17
+ } & Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'value'> & HelpTextProps;
18
+ export declare const CountryPhoneSelect: ({ countryOptions, icon, label, phone, phoneCountry, setPhone, setPhoneCountry, ...props }: CountryPhoneSelectProps<CountryOption>) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,14 @@
1
1
  import { type SelectProps } from "./Select";
2
- import type { ICountryOption } from "../../types/ICountry";
2
+ import type { CountryOption } from "../../types/Country";
3
3
  type CountrySelectType<T extends string> = {
4
4
  autoFocus?: SelectProps['autoFocus'];
5
- countryOptions: ICountryOption<T>[];
5
+ countryOptions: CountryOption<T>[];
6
6
  label?: string;
7
- onChange: SelectProps<ICountryOption<T>>['onChange'];
7
+ onChange: SelectProps<CountryOption<T>>['onChange'];
8
8
  placeholder?: string;
9
9
  value: T | null;
10
- filter?: (country: ICountryOption<T>) => boolean;
10
+ filter?: (country: CountryOption<T>) => boolean;
11
11
  };
12
- export type CountrySelectProps<T extends string = string> = CountrySelectType<T> & Omit<SelectProps<ICountryOption<T>>, keyof CountrySelectType<T> | 'options'>;
12
+ export type CountrySelectProps<T extends string = string> = CountrySelectType<T> & Omit<SelectProps<CountryOption<T>>, keyof CountrySelectType<T> | 'options'>;
13
13
  export declare const CountrySelect: <T extends string>({ autoFocus, countryOptions, filter, label, onChange, placeholder, value, ...props }: CountrySelectProps<T>) => import("react/jsx-runtime").JSX.Element;
14
14
  export {};
@@ -1,9 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { GroupBase, Props, PropsValue, SelectComponentsConfig, StylesConfig } from 'react-select';
3
3
  import { type HelpTextProps } from "../help-text/HelpText";
4
- import type { IOption } from "../../types/IOption";
4
+ import type { SelectOption } from "../../types/SelectOption";
5
5
  type RequiredProps = 'onChange' | 'options' | 'value';
6
- export interface MultiSelectProps<Option extends IOption = IOption, IsMulti extends true = true, Group extends GroupBase<Option> = GroupBase<Option>> extends Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps>, Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>>, HelpTextProps {
6
+ export type MultiSelectProps<Option extends SelectOption = SelectOption, IsMulti extends true = true, Group extends GroupBase<Option> = GroupBase<Option>> = {
7
7
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
8
8
  hasGroups?: boolean;
9
9
  icon?: ReactNode;
@@ -14,13 +14,13 @@ export interface MultiSelectProps<Option extends IOption = IOption, IsMulti exte
14
14
  * value: { label: string; value: string; }[];
15
15
  */
16
16
  value: PropsValue<Option>;
17
- }
18
- export type IGroupOption<Option extends IOption> = {
17
+ } & Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps> & Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>> & HelpTextProps;
18
+ export type GroupOption<Option extends SelectOption> = {
19
19
  data: Option;
20
20
  index: 0;
21
21
  isDisabled: false;
22
22
  isSelected: false;
23
23
  type: 'option';
24
- } & IOption;
25
- export declare const MultiSelect: <Option extends IOption<string | number>, Group extends GroupBase<Option>>({ closeMenuOnSelect, hideSelectedOptions, ...props }: MultiSelectProps<Option, true, Group>) => import("react/jsx-runtime").JSX.Element;
24
+ } & SelectOption;
25
+ export declare const MultiSelect: <Option extends SelectOption, Group extends GroupBase<Option>>({ closeMenuOnSelect, hideSelectedOptions, ...props }: MultiSelectProps<Option, true, Group>) => import("react/jsx-runtime").JSX.Element;
26
26
  export {};
@@ -1,10 +1,10 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { ActionMeta, GroupBase, Props, SelectComponentsConfig, StylesConfig } from 'react-select';
3
3
  import { type HelpTextProps } from "../help-text/HelpText";
4
- import type { IOption } from "../../types/IOption";
4
+ import type { SelectOption } from "../../types/SelectOption";
5
5
  import type { Size } from "../../types/Size";
6
6
  type RequiredProps = 'options' | 'value';
7
- export interface SelectProps<Option extends IOption = IOption, IsMulti extends false = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps>, Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>>, HelpTextProps {
7
+ export type SelectProps<Option extends SelectOption = SelectOption, IsMulti extends false = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
8
8
  /** Close the select dropdown menu when scrolling outside of menu to prevent graphical jank */
9
9
  closeOnOutsideScroll?: boolean;
10
10
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
@@ -27,6 +27,6 @@ export interface SelectProps<Option extends IOption = IOption, IsMulti extends f
27
27
  * onChange={changed => setExampleValue(changed?.value || null)}
28
28
  */
29
29
  onChange: (changed: Option | null, actionMeta: ActionMeta<Option>) => void;
30
- }
31
- export declare const Select: <Option extends IOption<string | number>, Group extends GroupBase<Option> = GroupBase<Option>>({ isClearable, label, value, ...props }: SelectProps<Option, false, Group>) => import("react/jsx-runtime").JSX.Element;
30
+ } & Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps> & Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>> & HelpTextProps;
31
+ export declare const Select: <Option extends SelectOption, Group extends GroupBase<Option> = GroupBase<Option>>({ isClearable, label, value, ...props }: SelectProps<Option, false, Group>) => import("react/jsx-runtime").JSX.Element;
32
32
  export {};
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import type { GroupBase, OptionProps, Props, SelectComponentsConfig, StylesConfig } from 'react-select';
3
3
  import { type HelpTextProps } from "../help-text/HelpText";
4
- import type { IOption } from "../../types/IOption";
4
+ import type { SelectOption } from "../../types/SelectOption";
5
5
  import type { Size } from "../../types/Size";
6
6
  type AdditionalProps<Value> = {
7
7
  hasGroups?: boolean;
@@ -10,12 +10,12 @@ type AdditionalProps<Value> = {
10
10
  size?: Size;
11
11
  customOption?: (value: Value) => ReactNode;
12
12
  };
13
- export declare const CheckboxOptionComponent: <Option extends IOption<string | number>, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
14
- export interface StyledReactSelectProps<Option extends IOption, IsMulti extends boolean, Group extends GroupBase<Option>> extends Props<Option, IsMulti, Group>, HelpTextProps, AdditionalProps<Option['value']> {
13
+ export declare const CheckboxOptionComponent: <Option extends SelectOption, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
14
+ export type StyledReactSelectProps<Option extends SelectOption, IsMulti extends boolean, Group extends GroupBase<Option>> = {
15
15
  closeOnOutsideScroll?: boolean;
16
16
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
17
17
  size?: Size;
18
18
  styles?: StylesConfig<Option, IsMulti, Group>;
19
- }
20
- export declare const StyledReactSelect: <Option extends IOption<string | number>, IsMulti extends boolean, Group extends GroupBase<Option>>({ closeOnOutsideScroll, components, customOption, error, hasGroups, helpText, icon, label, menuPosition, placeholder, size, styles, ...props }: StyledReactSelectProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
19
+ } & Props<Option, IsMulti, Group> & HelpTextProps & AdditionalProps<Option['value']>;
20
+ export declare const StyledReactSelect: <Option extends SelectOption, IsMulti extends boolean, Group extends GroupBase<Option>>({ closeOnOutsideScroll, components, customOption, error, hasGroups, helpText, icon, label, menuPosition, placeholder, size, styles, ...props }: StyledReactSelectProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
21
21
  export {};
@@ -1,10 +1,10 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { SortingStrategy } from '@dnd-kit/sortable/dist/types';
3
3
  import type { DragEndEvent } from "./SortableListDeps";
4
- export interface SortableListProps {
4
+ export type SortableListProps = {
5
5
  children: ReactNode;
6
6
  itemIds: string[];
7
7
  sortingStrategy?: SortingStrategy;
8
8
  handleDragEnd: (e: DragEndEvent) => void;
9
- }
9
+ };
10
10
  export declare const SortableList: ({ children, handleDragEnd, itemIds, sortingStrategy, }: SortableListProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
- export interface SortableListItemProps {
2
+ export type SortableListItemProps = {
3
3
  children: ReactNode;
4
4
  handleIconSize?: number;
5
5
  id: string;
6
6
  useHandle?: boolean;
7
- }
7
+ };
8
8
  /** @description This must be a direct child of SortableList */
9
9
  export declare const SortableListItem: ({ children, handleIconSize, id, useHandle, }: SortableListItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { type Dispatch, type SetStateAction } from 'react';
2
- type IProps = {
2
+ type SplitPanelProps = {
3
3
  children: any;
4
4
  className?: string;
5
5
  collapseAll?: boolean;
@@ -26,5 +26,5 @@ type IProps = {
26
26
  * Split panel component
27
27
  * @ref https://greggman.github.io/react-split-it/
28
28
  */
29
- export declare const SplitPanel: ({ children, className, collapseAll, direction, gutterSize, onSetSizes, sizes, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const SplitPanel: ({ children, className, collapseAll, direction, gutterSize, onSetSizes, sizes, ...props }: SplitPanelProps) => import("react/jsx-runtime").JSX.Element;
30
30
  export {};
@@ -1,12 +1,12 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
2
  import type { GridAlignment, GridSpacing } from "../../types";
3
3
  type DivProps = Omit<HTMLAttributes<HTMLDivElement>, 'translate' | 'style' | 'prefix' | 'contentEditable' | 'inputMode' | 'children'>;
4
- export interface StackProps extends DivProps {
4
+ export type StackProps = {
5
5
  /** @default 'unset' */
6
6
  alignment?: GridAlignment;
7
7
  children: ReactNode;
8
8
  /** @default 24 */
9
9
  spacing?: GridSpacing;
10
- }
10
+ } & DivProps;
11
11
  export declare const Stack: ({ alignment, children, ...otherProps }: StackProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  type TagSize = 'base' | 'lg';
3
- export interface TagProps {
3
+ export type TagProps = {
4
4
  children?: ReactNode | string;
5
5
  className?: string;
6
6
  icon?: ReactNode;
@@ -8,6 +8,6 @@ export interface TagProps {
8
8
  size?: TagSize;
9
9
  onClick?: () => void;
10
10
  onClose: () => void;
11
- }
11
+ };
12
12
  export declare const Tag: ({ children, className, icon, iconRight, onClick, onClose, size, }: TagProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,14 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import * as flags from "../flags/FlagIndex";
3
- export type IFlag = keyof typeof flags;
4
- export type IFlagScale = 'small' | 'medium' | 'large';
3
+ export type Flag = keyof typeof flags;
4
+ export type FlagScale = 'small' | 'medium' | 'large';
5
5
  export type FlagIconProps = {
6
- iconScale: IFlagScale;
6
+ iconScale: FlagScale;
7
7
  } & {
8
- code: IFlag;
8
+ code: Flag;
9
9
  };
10
10
  export declare const FlagIcon: import("react").ForwardRefExoticComponent<{
11
- iconScale: IFlagScale;
11
+ iconScale: FlagScale;
12
12
  } & {
13
- code: IFlag;
13
+ code: Flag;
14
14
  } & import("react").RefAttributes<SVGSVGElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.1.38",
3
+ "version": "5.1.40",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * All components props should extend this interface.
3
3
  */
4
- export interface BaseProps {
4
+ export type BaseProps = {
5
5
  /** For styled-components styling */
6
6
  className?: string;
7
- }
7
+ };
@@ -1,8 +1,8 @@
1
- import type { IOption } from "./IOption";
1
+ import type { SelectOption } from "./SelectOption";
2
2
  export declare const regions: readonly ["Africa", "Americas", "Asia", "Central America", "Europe", "North America", "Oceania", "South America"];
3
- type IRegion = (typeof regions)[number];
3
+ type Region = (typeof regions)[number];
4
4
  /** @desc /api/address/getCountries */
5
- export interface ICountry<CountryCode extends string = string> {
5
+ export type Country<CountryCode extends string = string> = {
6
6
  active: boolean;
7
7
  code: CountryCode;
8
8
  code3: string | null;
@@ -11,23 +11,23 @@ export interface ICountry<CountryCode extends string = string> {
11
11
  fraudRisk: number;
12
12
  languageCode: string | null;
13
13
  numericCode: string | null;
14
- region: IRegion;
14
+ region: Region;
15
15
  upsCode: string | null;
16
16
  zipRegex: string | null;
17
- }
18
- export interface ICountryOption<CountryCode extends string = string> extends ICountry<CountryCode>, IOption<CountryCode> {
17
+ };
18
+ export type CountryOption<CountryCode extends string = string> = {
19
19
  phoneCode: string[];
20
- }
21
- export interface IRegionCountryOption {
22
- label: IRegion;
23
- options: ICountryOption[];
24
- }
25
- export interface IUnavailableCountry {
20
+ } & Country<CountryCode> & SelectOption<CountryCode>;
21
+ export type RegionCountryOption = {
22
+ label: Region;
23
+ options: CountryOption[];
24
+ };
25
+ export type UnavailableCountry = {
26
26
  code: string;
27
27
  message: string;
28
- }
28
+ };
29
29
  /** @desc /api/address/getCountries */
30
- export interface IGetCountriesResponse<CountryCode extends string = string> {
31
- [key: string]: ICountry<CountryCode>;
32
- }
30
+ export type GetCountriesResponse<CountryCode extends string = string> = {
31
+ [key: string]: Country<CountryCode>;
32
+ };
33
33
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { JsonError } from "./JsonError";
2
- export interface FetcherError {
2
+ export type FetcherError = {
3
3
  errors: JsonError[];
4
4
  status: number;
5
- }
5
+ };
@@ -1,17 +1,17 @@
1
1
  import type { BBox } from 'geojson';
2
2
  import type { Arc, MultiPolygon, Polygon, Transform } from 'topojson-specification';
3
- type IProperties = {
3
+ type Properties = {
4
4
  name: string;
5
5
  };
6
- type IGeometry = (Polygon | MultiPolygon) & {
7
- properties: IProperties;
6
+ type Geometry = (Polygon | MultiPolygon) & {
7
+ properties: Properties;
8
8
  };
9
- export type IGeoJsonWorld = {
9
+ export type GeoJsonWorld = {
10
10
  arcs: Arc[];
11
11
  bbox: BBox;
12
12
  objects: {
13
13
  countries: {
14
- geometries: IGeometry[];
14
+ geometries: Geometry[];
15
15
  type: 'GeometryCollection';
16
16
  };
17
17
  };
@@ -1,5 +1,5 @@
1
- export interface JsonError {
1
+ export type JsonError = {
2
2
  errorId?: number;
3
3
  message: string;
4
4
  type: string;
5
- }
5
+ };
@@ -1,8 +1,8 @@
1
1
  import type { ReactNode } from 'react';
2
- export interface IOption<V extends string | number = string | number> {
2
+ export type SelectOption<V extends string | number = string | number> = {
3
3
  icon?: ReactNode;
4
4
  isDisabled?: boolean;
5
5
  label: string;
6
6
  labelDescription?: string;
7
7
  value: V;
8
- }
8
+ };
@@ -1,4 +1,4 @@
1
- export interface SwrtParams<T> {
1
+ export type SwrtParams<T> = {
2
2
  json: T | null;
3
3
  response: Response | null;
4
- }
4
+ };
@@ -19,7 +19,7 @@ export type GraphiqlFetcher = (graphQLParams: FetcherParams, opts?: FetcherOpts)
19
19
  export type HandleFetchFetcher = <ResponseBody extends unknown, RequestBody = unknown>(url: string, _opts?: RequestOptions<ResponseBody, RequestBody> & {
20
20
  logRequestIfError?: boolean;
21
21
  }) => Promise<HandleFetchReturn<ResponseBody>>;
22
- type IFetcher = (props: {
22
+ type Fetcher = (props: {
23
23
  customFetcher: HandleFetchFetcher | null;
24
24
  url: string | null;
25
25
  }) => GraphiqlFetcher;
@@ -27,5 +27,5 @@ type IFetcher = (props: {
27
27
  * Graphiql fetcher to send a GraphQl request
28
28
  * @param url url to fetch
29
29
  */
30
- export declare const graphiqlFetcher: IFetcher;
30
+ export declare const graphiqlFetcher: Fetcher;
31
31
  export {};
@@ -1,2 +1,2 @@
1
- import type { ICountryOption } from "../types/ICountry";
2
- export declare const getCountryCodeByName: (countryName: string, countries: ICountryOption[]) => string;
1
+ import type { CountryOption } from "../types/Country";
2
+ export declare const getCountryCodeByName: (countryName: string, countries: CountryOption[]) => string;
@@ -1,6 +1,6 @@
1
- import type { IGetCountriesResponse } from "../types/ICountry";
1
+ import type { GetCountriesResponse } from "../types/Country";
2
2
  export declare const prepCountryOptions: <CountryCode extends string = string>({ json, }: {
3
- json: IGetCountriesResponse<CountryCode>;
3
+ json: GetCountriesResponse<CountryCode>;
4
4
  }) => {
5
5
  label: string;
6
6
  phoneCode: string[];
@@ -1,5 +1,5 @@
1
- import { type ICountryOption } from "../types/ICountry";
2
- export declare const prepRegionCountryOptions: <T extends string = string>(countries: ICountryOption<T>[]) => {
1
+ import { type CountryOption } from "../types/Country";
2
+ export declare const prepRegionCountryOptions: <T extends string = string>(countries: CountryOption<T>[]) => {
3
3
  label: "Africa" | "Americas" | "Asia" | "Central America" | "Europe" | "North America" | "Oceania" | "South America";
4
- options: ICountryOption<T>[];
4
+ options: CountryOption<T>[];
5
5
  }[];