@zonos/amino 5.2.11 → 5.2.13

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.
@@ -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,9 +1,11 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { FontType } from "../text/Text";
2
3
  import type { BaseProps } from "../../types/BaseProps";
3
4
  export type VSectionProps = BaseProps & {
4
5
  actions?: ReactNode;
5
- children: ReactNode;
6
+ children?: ReactNode;
6
7
  label?: ReactNode;
8
+ labelType?: FontType;
7
9
  sublabel?: ReactNode;
8
10
  };
9
- export declare const VSection: ({ actions, children, className, label, style, sublabel, }: VSectionProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const VSection: ({ actions, children, className, label, labelType, style, sublabel, }: VSectionProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("clsx"),t=require("./_SectionHeader.js"),s=require("./_SectionInnerWrapper.js"),i=require("./_SectionSubheader.js"),n=require("../stack/HStack.js"),c=require("../../style-inject.es-d4ddeae4.js");function a(e){return e&&e.__esModule?e:{default:e}}require("../text/Text.js"),require("../../_tslib-bd4862e8.js"),require("../../styles/constants/theme.js"),require("../stack/Stack.js");var l=a(r),o="Amino_VSection-module__styledSectionWrapper--jKcx5";c.styleInject(".Amino_VSection-module__styledSectionWrapper--jKcx5{margin-bottom:40px}");exports.VSection=function(r){var c=r.actions,a=r.children,u=r.className,d=r.label,j=r.style,S=r.sublabel,x=void 0===S?"":S;return e.jsxs("div",{className:l.default(u,o),style:j,children:[d&&e.jsxs(s.SectionInnerWrapper,{children:[e.jsxs("div",{children:["string"==typeof d?e.jsx(t.SectionHeader,{children:d}):d,"string"==typeof x?e.jsx(i.SectionSubheader,{children:x}):x]}),e.jsx(n.HStack,{spacing:8,children:c})]}),e.jsx("div",{children:a})]})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("clsx"),t=require("./_SectionInnerWrapper.js"),i=require("./_SectionSubheader.js"),s=require("../stack/HStack.js"),n=require("./_SectionHeader.js"),c=require("../../style-inject.es-d4ddeae4.js");function l(e){return e&&e.__esModule?e:{default:e}}require("../text/Text.js"),require("../../_tslib-bd4862e8.js"),require("../../styles/constants/theme.js"),require("../stack/Stack.js");var a=l(r),o="Amino_VSection-module__styledSectionWrapper--jKcx5";c.styleInject(".Amino_VSection-module__styledSectionWrapper--jKcx5{margin-bottom:40px}");exports.VSection=function(r){var c=r.actions,l=r.children,u=r.className,d=r.label,j=r.labelType,S=void 0===j?"title":j,p=r.style,x=r.sublabel,_=void 0===x?"":x;return e.jsxs("div",{className:a.default(u,o),style:p,children:[d&&e.jsxs(t.SectionInnerWrapper,{children:[e.jsxs("div",{children:["string"==typeof d?e.jsx(n.SectionHeader,{type:S,children:d}):d,"string"==typeof _?e.jsx(i.SectionSubheader,{children:_}):_]}),e.jsx(s.HStack,{spacing:8,children:c})]}),l&&e.jsx("div",{children:l})]})};
@@ -1,7 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
+ import { type FontType } from "../text/Text";
2
3
  import type { BaseProps } from "../../types/BaseProps";
3
4
  type Props = BaseProps & {
4
5
  children: ReactNode;
6
+ type: FontType;
5
7
  };
6
- export declare const SectionHeader: ({ children, className, style }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const SectionHeader: ({ children, className, style, type }: Props) => import("react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("clsx"),r=require("../text/Text.js"),s=require("../../style-inject.es-d4ddeae4.js");function i(e){return e&&e.__esModule?e:{default:e}}require("../../_tslib-bd4862e8.js"),require("../../styles/constants/theme.js");var l=i(t),n="Amino__SectionHeader-module__styledSectionHeader--no0Wh";s.styleInject(".Amino__SectionHeader-module__styledSectionHeader--no0Wh{display:flex;flex:auto;flex-direction:column}");exports.SectionHeader=function(t){var s=t.children,i=t.className,c=t.style;return e.jsx(r.Text,{className:l.default(i,n),style:c,type:"title",children:s})};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("clsx"),r=require("../text/Text.js"),s=require("../../style-inject.es-d4ddeae4.js");function i(e){return e&&e.__esModule?e:{default:e}}require("../../_tslib-bd4862e8.js"),require("../../styles/constants/theme.js");var n=i(t),l="Amino__SectionHeader-module__styledSectionHeader--no0Wh";s.styleInject(".Amino__SectionHeader-module__styledSectionHeader--no0Wh{display:flex;flex:auto;flex-direction:column}");exports.SectionHeader=function(t){var s=t.children,i=t.className,c=t.style,o=t.type;return e.jsx(r.Text,{className:n.default(i,l),style:c,type:o,children:s})};
@@ -83,7 +83,7 @@ export declare const textOptions: readonly [{
83
83
  readonly weight: 400;
84
84
  }];
85
85
  type Size = (typeof textOptions)[number]['size'];
86
- type Type = (typeof textOptions)[number]['type'];
86
+ export type FontType = (typeof textOptions)[number]['type'];
87
87
  export type FontWeight = (typeof textOptions)[number]['weight'] | 800;
88
88
  type Tag = (typeof textOptions)[number]['tag'];
89
89
  type TypographyOverrides = {
@@ -92,7 +92,7 @@ type TypographyOverrides = {
92
92
  fontWeight?: FontWeight;
93
93
  lineHeight?: Size;
94
94
  };
95
- type TextStyle = Type | OtherText;
95
+ type TextStyle = FontType | OtherText;
96
96
  export type TextProps = BaseProps & {
97
97
  children: ReactNode;
98
98
  isUppercase?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.2.11",
3
+ "version": "5.2.13",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",
@@ -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> | undefined;
5
- options?: Fuse.IFuseOptions<T> | undefined;
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 | undefined;
3
- internalPaths?: string[] | undefined;
4
- shouldWarn?: boolean | undefined;
2
+ href?: string;
3
+ internalPaths?: string[];
4
+ shouldWarn?: boolean;
5
5
  }) => {
6
6
  isBrokenLink: boolean;
7
7
  isInternalLink: boolean | undefined;
@@ -1,5 +1,5 @@
1
1
  export type TestIdFormat = `amino--${string}`;
2
2
  export declare const getTestId: ({ componentName, name, }: {
3
- componentName?: string | undefined;
4
- name?: string | undefined;
3
+ componentName?: string;
4
+ name?: string;
5
5
  }) => TestIdFormat;
@@ -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
- body?: NoInfer<RequestBody> | undefined;
18
- testExpectedData?: ((data: ResponseBody) => boolean) | undefined;
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 | undefined;
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, }: StorageParams<TValue, TKey> & {
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;
@@ -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, Partial<import("swr/_internal").PublicConfiguration<SwrtParams<ResponseData>, FetcherError, import("swr").BareFetcher<SwrtParams<ResponseData>>>> | undefined>;
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 {};
@@ -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, }: Omit<StorageParams<Value, string>, "schema"> & {
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;