@zonos/amino 5.1.39 → 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.
- package/components/button/RippleGroup.d.ts +2 -2
- package/components/button/useRipple.d.ts +3 -3
- package/components/select/CountryMultiSelect.d.ts +2 -2
- package/components/select/CountryPhoneSelect.d.ts +2 -2
- package/components/select/MultiSelect.d.ts +2 -2
- package/components/select/Select.d.ts +2 -2
- package/components/select/_StyledReactSelect.d.ts +2 -2
- package/components/sortable-list/SortableList.d.ts +2 -2
- package/components/sortable-list/SortableListItem.d.ts +2 -2
- package/components/stack/Stack.d.ts +2 -2
- package/components/tag/Tag.d.ts +2 -2
- package/package.json +1 -1
- package/types/BaseProps.d.ts +2 -2
- package/types/Country.d.ts +10 -10
- package/types/FetcherError.d.ts +2 -2
- package/types/JsonError.d.ts +2 -2
- package/types/SwrtParams.d.ts +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { Color } from "../../types";
|
|
3
|
-
export
|
|
3
|
+
export type RippleActions = {
|
|
4
4
|
start: (event: React.SyntheticEvent) => void;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
export type RippleGroupProps = {
|
|
7
7
|
/**
|
|
8
8
|
* @default 'inherit'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { RippleActions } from "./RippleGroup";
|
|
3
|
-
|
|
3
|
+
type RippleEventHandlers = {
|
|
4
4
|
onMouseDown: React.MouseEventHandler;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
type Props = {
|
|
7
7
|
disabled: boolean;
|
|
8
8
|
rippleEnabled: boolean;
|
|
@@ -10,7 +10,7 @@ type Props = {
|
|
|
10
10
|
};
|
|
11
11
|
type Return = {
|
|
12
12
|
/** Combines event handlers */
|
|
13
|
-
getRippleHandlers(otherEvents: Partial<
|
|
13
|
+
getRippleHandlers(otherEvents: Partial<RippleEventHandlers>): RippleEventHandlers;
|
|
14
14
|
rippleEnabled: boolean;
|
|
15
15
|
};
|
|
16
16
|
export declare const useRipple: ({ disabled, rippleEnabled, rippleRef, }: Props) => Return;
|
|
@@ -4,7 +4,7 @@ import { type HelpTextProps } from "../help-text/HelpText";
|
|
|
4
4
|
import { type CountryOption, type UnavailableCountry } from "../../types/Country";
|
|
5
5
|
import type { SelectOption } from "../../types/SelectOption";
|
|
6
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
|
|
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
9
|
countryOptions: CountryOption<Option['value']>[];
|
|
10
10
|
icon?: ReactNode;
|
|
@@ -13,5 +13,5 @@ export interface CountryMultiSelectProps<Option extends SelectOption<string> = S
|
|
|
13
13
|
unavailableCountries: UnavailableCountry[];
|
|
14
14
|
value: Option['value'][];
|
|
15
15
|
onChange: (countryCodes: Option['value'][]) => void;
|
|
16
|
-
}
|
|
16
|
+
} & Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'options' | 'value'> & HelpTextProps;
|
|
17
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;
|
|
@@ -3,7 +3,7 @@ import { type GroupBase, type Props, type SelectComponentsConfig, type StylesCon
|
|
|
3
3
|
import type { HelpTextProps } from "../help-text/HelpText";
|
|
4
4
|
import type { CountryOption } from "../../types/Country";
|
|
5
5
|
import type { SelectOption } from "../../types/SelectOption";
|
|
6
|
-
export
|
|
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
8
|
countryOptions: CountryOption[];
|
|
9
9
|
hasGroups?: boolean;
|
|
@@ -14,5 +14,5 @@ export interface CountryPhoneSelectProps<Option extends SelectOption = SelectOpt
|
|
|
14
14
|
styles?: StylesConfig<Option, IsMulti, Group>;
|
|
15
15
|
setPhone: (changed: string) => void;
|
|
16
16
|
setPhoneCountry: (changed: CountryOption | null) => void;
|
|
17
|
-
}
|
|
17
|
+
} & Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'value'> & HelpTextProps;
|
|
18
18
|
export declare const CountryPhoneSelect: ({ countryOptions, icon, label, phone, phoneCountry, setPhone, setPhoneCountry, ...props }: CountryPhoneSelectProps<CountryOption>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import type { GroupBase, Props, PropsValue, SelectComponentsConfig, StylesConfig
|
|
|
3
3
|
import { type HelpTextProps } from "../help-text/HelpText";
|
|
4
4
|
import type { SelectOption } from "../../types/SelectOption";
|
|
5
5
|
type RequiredProps = 'onChange' | 'options' | 'value';
|
|
6
|
-
export
|
|
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,7 +14,7 @@ export interface MultiSelectProps<Option extends SelectOption = SelectOption, Is
|
|
|
14
14
|
* value: { label: string; value: string; }[];
|
|
15
15
|
*/
|
|
16
16
|
value: PropsValue<Option>;
|
|
17
|
-
}
|
|
17
|
+
} & Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps> & Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>> & HelpTextProps;
|
|
18
18
|
export type GroupOption<Option extends SelectOption> = {
|
|
19
19
|
data: Option;
|
|
20
20
|
index: 0;
|
|
@@ -4,7 +4,7 @@ import { type HelpTextProps } from "../help-text/HelpText";
|
|
|
4
4
|
import type { SelectOption } from "../../types/SelectOption";
|
|
5
5
|
import type { Size } from "../../types/Size";
|
|
6
6
|
type RequiredProps = 'options' | 'value';
|
|
7
|
-
export
|
|
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 SelectOption = SelectOption, IsMulti
|
|
|
27
27
|
* onChange={changed => setExampleValue(changed?.value || null)}
|
|
28
28
|
*/
|
|
29
29
|
onChange: (changed: Option | null, actionMeta: ActionMeta<Option>) => void;
|
|
30
|
-
}
|
|
30
|
+
} & Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps> & Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>> & HelpTextProps;
|
|
31
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 {};
|
|
@@ -11,11 +11,11 @@ type AdditionalProps<Value> = {
|
|
|
11
11
|
customOption?: (value: Value) => ReactNode;
|
|
12
12
|
};
|
|
13
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
|
|
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
|
-
}
|
|
19
|
+
} & Props<Option, IsMulti, Group> & HelpTextProps & AdditionalProps<Option['value']>;
|
|
20
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
|
|
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
|
|
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,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
|
|
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 {};
|
package/components/tag/Tag.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
type TagSize = 'base' | 'lg';
|
|
3
|
-
export
|
|
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 {};
|
package/package.json
CHANGED
package/types/BaseProps.d.ts
CHANGED
package/types/Country.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { SelectOption } from "./SelectOption";
|
|
|
2
2
|
export declare const regions: readonly ["Africa", "Americas", "Asia", "Central America", "Europe", "North America", "Oceania", "South America"];
|
|
3
3
|
type Region = (typeof regions)[number];
|
|
4
4
|
/** @desc /api/address/getCountries */
|
|
5
|
-
export
|
|
5
|
+
export type Country<CountryCode extends string = string> = {
|
|
6
6
|
active: boolean;
|
|
7
7
|
code: CountryCode;
|
|
8
8
|
code3: string | null;
|
|
@@ -14,20 +14,20 @@ export interface Country<CountryCode extends string = string> {
|
|
|
14
14
|
region: Region;
|
|
15
15
|
upsCode: string | null;
|
|
16
16
|
zipRegex: string | null;
|
|
17
|
-
}
|
|
18
|
-
export
|
|
17
|
+
};
|
|
18
|
+
export type CountryOption<CountryCode extends string = string> = {
|
|
19
19
|
phoneCode: string[];
|
|
20
|
-
}
|
|
21
|
-
export
|
|
20
|
+
} & Country<CountryCode> & SelectOption<CountryCode>;
|
|
21
|
+
export type RegionCountryOption = {
|
|
22
22
|
label: Region;
|
|
23
23
|
options: CountryOption[];
|
|
24
|
-
}
|
|
25
|
-
export
|
|
24
|
+
};
|
|
25
|
+
export type UnavailableCountry = {
|
|
26
26
|
code: string;
|
|
27
27
|
message: string;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
/** @desc /api/address/getCountries */
|
|
30
|
-
export
|
|
30
|
+
export type GetCountriesResponse<CountryCode extends string = string> = {
|
|
31
31
|
[key: string]: Country<CountryCode>;
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
export {};
|
package/types/FetcherError.d.ts
CHANGED
package/types/JsonError.d.ts
CHANGED
package/types/SwrtParams.d.ts
CHANGED