@zonos/amino 5.2.10 → 5.2.12
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/danger-zone/DangerZone.d.ts +1 -9
- package/components/thumbnail/Thumbnail.d.ts +7 -2
- package/components/thumbnail/Thumbnail.js +1 -1
- package/package.json +1 -1
- package/utils/getFuzzySearch.d.ts +2 -2
- package/utils/getIsInternalLink.d.ts +3 -3
- package/utils/getTestId.d.ts +2 -2
- package/utils/handleFetch.d.ts +3 -6
- package/utils/hooks/_useGraphiqlExplorer.d.ts +1 -1
- package/utils/hooks/useStorage.d.ts +1 -3
- package/utils/hooks/useSwrt.d.ts +1 -1
- package/utils/storage.d.ts +1 -3
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { type CardProps } from "../card/Card";
|
|
3
3
|
import type { BaseProps } from "../../types/BaseProps";
|
|
4
|
-
export declare const DangerZone: ({ children, className, style, ...props }: BaseProps & {
|
|
5
|
-
actions?: ReactNode;
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
footerActions?: ReactNode;
|
|
8
|
-
footerContent?: ReactNode;
|
|
9
|
-
footerHeight?: number | undefined;
|
|
10
|
-
label?: ReactNode;
|
|
11
|
-
spacing?: string | undefined;
|
|
12
|
-
} & {
|
|
4
|
+
export declare const DangerZone: ({ children, className, style, ...props }: BaseProps & CardProps & {
|
|
13
5
|
children: ReactNode;
|
|
14
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ImageSize } from "../avatar/AvatarBase";
|
|
3
3
|
import type { BaseProps } from "../../types/BaseProps";
|
|
4
|
-
import type { ColorPrefix } from "../../types/Color";
|
|
4
|
+
import type { Color, ColorPrefix } from "../../types/Color";
|
|
5
5
|
declare const thumbnailShapes: {
|
|
6
6
|
readonly round: "50%";
|
|
7
7
|
readonly rounded: "20%";
|
|
@@ -9,14 +9,19 @@ declare const thumbnailShapes: {
|
|
|
9
9
|
};
|
|
10
10
|
export type ThumbnailProps = BaseProps & {
|
|
11
11
|
/** @default 'gray' */
|
|
12
|
+
/** @description automatically applies a color scheme based on the color passed */
|
|
12
13
|
color?: ColorPrefix;
|
|
13
14
|
icon: ReactNode;
|
|
14
15
|
/** @default 'full' */
|
|
15
16
|
intent?: 'full' | 'outline' | 'bordered';
|
|
17
|
+
/** @description mainColorOverride is used if the "color" prop is not sufficient for your needs */
|
|
18
|
+
mainColorOverride?: Color;
|
|
19
|
+
/** @description secondaryColorOverride is used if the "color" prop is not sufficient for your needs */
|
|
20
|
+
secondaryColorOverride?: Color;
|
|
16
21
|
/** @default 'round' */
|
|
17
22
|
shape?: keyof typeof thumbnailShapes;
|
|
18
23
|
/** @default 32 */
|
|
19
24
|
size?: ImageSize;
|
|
20
25
|
};
|
|
21
|
-
export declare const Thumbnail: ({ className, color, icon, intent, shape, size, style, }: ThumbnailProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const Thumbnail: ({ className, color, icon, intent, mainColorOverride, secondaryColorOverride, shape, size, style, }: ThumbnailProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
27
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var i=require("../../_tslib-bd4862e8.js"),o=require("react/jsx-runtime"),a=require("clsx"),n=require("../../styles/constants/theme.js"),
|
|
1
|
+
"use strict";var i=require("../../_tslib-bd4862e8.js"),o=require("react/jsx-runtime"),a=require("clsx"),n=require("../../styles/constants/theme.js"),r=require("../../style-inject.es-d4ddeae4.js");function e(i){return i&&i.__esModule?i:{default:i}}var l=e(a),m="Amino_Thumbnail-module__wrapper--oG7iK",u="Amino_Thumbnail-module__bordered--hqPCS",t="Amino_Thumbnail-module__outline--BntlJ";r.styleInject(".Amino_Thumbnail-module__wrapper--oG7iK{align-items:center;background-color:var(--amino-thumbnail-background-color);border-radius:var(--amino-thumbnail-border-radius);box-sizing:initial;display:inline-flex;height:var(--amino-thumbnail-size);justify-content:center;width:var(--amino-thumbnail-size)}.Amino_Thumbnail-module__wrapper--oG7iK.Amino_Thumbnail-module__bordered--hqPCS{border:calc(var(--amino-thumbnail-size)/16) solid var(--amino-gray-0)}.Amino_Thumbnail-module__wrapper--oG7iK.Amino_Thumbnail-module__outline--BntlJ{background-color:initial;border:1px solid var(--amino-gray-200)}.Amino_Thumbnail-module__wrapper--oG7iK svg{color:var(--amino-thumbnail-svg-main-color);height:60%;width:60%}.Amino_Thumbnail-module__wrapper--oG7iK svg path[data-is-secondary-color]{fill:var(--amino-thumbnail-svg-secondary-color)}");var s={round:"50%",rounded:"20%",square:"0px"};exports.Thumbnail=function(a){var r=a.className,e=a.color,d=void 0===e?"gray":e,c=a.icon,h=a.intent,b=void 0===h?"full":h,_=a.mainColorOverride,v=a.secondaryColorOverride,g=a.shape,p=void 0===g?"round":g,y=a.size,T=void 0===y?32:y,A=a.style;return o.jsx("div",{className:l.default(r,m,"bordered"===b&&u,"outline"===b&&t),style:i.__assign(i.__assign({},A),{"--amino-thumbnail-background-color":n.theme["".concat(d,"100")],"--amino-thumbnail-border-radius":s[p],"--amino-thumbnail-size":"".concat(T,"px"),"--amino-thumbnail-svg-main-color":n.theme[_||"".concat(d,"800")],"--amino-thumbnail-svg-secondary-color":n.theme[v||"".concat(d,"400")]}),children:c})};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Fuse from 'fuse.js';
|
|
2
2
|
export declare const getFuzzySearch: <T extends unknown>({ array, index, options, }: {
|
|
3
3
|
array: T[];
|
|
4
|
-
index?: Fuse.FuseIndex<T
|
|
5
|
-
options?: Fuse.IFuseOptions<T
|
|
4
|
+
index?: Fuse.FuseIndex<T>;
|
|
5
|
+
options?: Fuse.IFuseOptions<T>;
|
|
6
6
|
}) => {
|
|
7
7
|
fuzzySearch: Fuse<T>;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const getIsInternalLink: ({ href, internalPaths, shouldWarn, }: {
|
|
2
|
-
href?: string
|
|
3
|
-
internalPaths?: string[]
|
|
4
|
-
shouldWarn?: boolean
|
|
2
|
+
href?: string;
|
|
3
|
+
internalPaths?: string[];
|
|
4
|
+
shouldWarn?: boolean;
|
|
5
5
|
}) => {
|
|
6
6
|
isBrokenLink: boolean;
|
|
7
7
|
isInternalLink: boolean | undefined;
|
package/utils/getTestId.d.ts
CHANGED
package/utils/handleFetch.d.ts
CHANGED
|
@@ -13,10 +13,7 @@ export type RequestOptions<ResponseBody, RequestBody> = {
|
|
|
13
13
|
body?: NoInfer<RequestBody>;
|
|
14
14
|
testExpectedData?: (data: ResponseBody) => boolean;
|
|
15
15
|
} & Omit<RequestInit, 'body'>;
|
|
16
|
-
export declare const handleFetch: <ResponseBody extends unknown, RequestBody = unknown>(url: string, _opts?:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} & Omit<RequestInit, "body"> & {
|
|
20
|
-
logRequestIfError?: boolean | undefined;
|
|
21
|
-
}) | undefined) => Promise<HandleFetchReturn<ResponseBody>>;
|
|
16
|
+
export declare const handleFetch: <ResponseBody extends unknown, RequestBody = unknown>(url: string, _opts?: RequestOptions<ResponseBody, RequestBody> & {
|
|
17
|
+
logRequestIfError?: boolean;
|
|
18
|
+
}) => Promise<HandleFetchReturn<ResponseBody>>;
|
|
22
19
|
export declare const fetcher: <ResponseBody extends unknown, RequestBody = unknown>(url: string, options?: RequestOptions<ResponseBody, RequestBody>) => Promise<FetcherReturn<ResponseBody>>;
|
|
@@ -12,6 +12,6 @@ type GraphiQlColors = {
|
|
|
12
12
|
variable: string;
|
|
13
13
|
};
|
|
14
14
|
export declare const useGraphiqlExplorer: ({ overrideColor, }: {
|
|
15
|
-
overrideColor?: GraphiQlColors
|
|
15
|
+
overrideColor?: GraphiQlColors;
|
|
16
16
|
}) => import("@graphiql/react").GraphiQLPlugin;
|
|
17
17
|
export {};
|
|
@@ -10,9 +10,7 @@ export declare const useStorage: <TValue extends unknown, TKey extends AminoStor
|
|
|
10
10
|
setValue: (value: TValue) => void;
|
|
11
11
|
value: TValue;
|
|
12
12
|
};
|
|
13
|
-
export declare const useStorageWithLifetime: <TValue extends unknown, TKey extends AminoStorageKey = AminoStorageKey>({ defaultValue, key, lifetime, schema, type, }:
|
|
14
|
-
defaultValue: TValue;
|
|
15
|
-
} & {
|
|
13
|
+
export declare const useStorageWithLifetime: <TValue extends unknown, TKey extends AminoStorageKey = AminoStorageKey>({ defaultValue, key, lifetime, schema, type, }: UseStorageParams<TValue, TKey> & {
|
|
16
14
|
lifetime: Dayjs;
|
|
17
15
|
}) => {
|
|
18
16
|
setValue: (value: TValue) => void;
|
package/utils/hooks/useSwrt.d.ts
CHANGED
|
@@ -17,5 +17,5 @@ type UseSwrArgs<ResponseData> = readonly [Key] | readonly [Key, Fetcher<SwrtPara
|
|
|
17
17
|
* fetcher
|
|
18
18
|
* );
|
|
19
19
|
*/
|
|
20
|
-
export declare const useSwrt: <ResponseData = unknown>(...params: UseSwrArgs<ResponseData>) => import("swr").SWRResponse<SwrtParams<ResponseData>, FetcherError,
|
|
20
|
+
export declare const useSwrt: <ResponseData = unknown>(...params: UseSwrArgs<ResponseData>) => import("swr").SWRResponse<SwrtParams<ResponseData>, FetcherError, SWRConfiguration<SwrtParams<ResponseData>, FetcherError, import("swr").BareFetcher<SwrtParams<ResponseData>>> | undefined>;
|
|
21
21
|
export {};
|
package/utils/storage.d.ts
CHANGED
|
@@ -14,9 +14,7 @@ type SetParams<Value> = Omit<StorageParams<Value>, 'schema'> & {
|
|
|
14
14
|
};
|
|
15
15
|
export declare const getStorageItem: <Value extends unknown>({ key, schema, type, }: StorageParams<Value>) => Value | null;
|
|
16
16
|
export declare const setStorageItem: <Value extends unknown>({ key, type, value, }: SetParams<Value>) => void;
|
|
17
|
-
export declare const setStorageItemWithLifetime: <Value extends unknown>({ key, lifetime, type, value, }:
|
|
18
|
-
value: Value;
|
|
19
|
-
} & {
|
|
17
|
+
export declare const setStorageItemWithLifetime: <Value extends unknown>({ key, lifetime, type, value, }: SetParams<Value> & {
|
|
20
18
|
lifetime: Dayjs;
|
|
21
19
|
}) => void;
|
|
22
20
|
export declare const getShouldUpdateStorageItem: <Value extends unknown>({ key, type, }: StorageParams<Value>) => boolean;
|