@zonos/amino 5.2.22 → 5.2.24
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/avatar/AvatarBase.d.ts +1 -1
- package/components/avatar/AvatarBase.js +1 -1
- package/components/dialog/DismissableDialog.d.ts +6 -4
- package/components/dialog/alert/AlertContext.d.ts +6 -2
- package/components/dialog/alert/useAlert.d.ts +1 -1
- package/components/dialog/confirm/ConfirmContext.d.ts +7 -2
- package/components/dialog/confirm/useConfirm.d.ts +1 -1
- package/components/input/input-type/_DateInput.d.ts +1 -1
- package/components/input/input-type/_FloatLabelInput.d.ts +1 -1
- package/components/input/input-type/_NumberInput.d.ts +1 -1
- package/components/input/input-type/_PasswordInput.d.ts +1 -1
- package/components/input/input-type/_TimeInput.d.ts +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +0 -2
- package/utils/changeDeepProperty.d.ts +1 -1
- package/utils/changeDeepPropertyAtIndex.d.ts +1 -1
- package/types/AlertDialogOpts.d.ts +0 -8
- package/types/ConfirmDialogOpts.d.ts +0 -10
|
@@ -3,7 +3,7 @@ import type { BaseProps } from "../../types/BaseProps";
|
|
|
3
3
|
export type ImageSize = 16 | 24 | 32 | 40 | 48 | 56 | 64;
|
|
4
4
|
export declare const avatarShapes: {
|
|
5
5
|
readonly round: "50%";
|
|
6
|
-
readonly rounded: "
|
|
6
|
+
readonly rounded: "";
|
|
7
7
|
readonly square: "0px";
|
|
8
8
|
};
|
|
9
9
|
type AvatarShape = keyof typeof avatarShapes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var a=require("../../_tslib-bd4862e8.js"),r=require("react/jsx-runtime"),e=require("clsx"),o=require("../../styles/constants/theme.js"),t=require("../../style-inject.es-d4ddeae4.js");function
|
|
1
|
+
"use strict";var a=require("../../_tslib-bd4862e8.js"),r=require("react/jsx-runtime"),e=require("clsx"),o=require("../../styles/constants/theme.js"),t=require("../../style-inject.es-d4ddeae4.js");function n(a){return a&&a.__esModule?a:{default:a}}var s=n(e),i="Amino_AvatarBase-module__wrapper--gUJPn",d="Amino_AvatarBase-module__styledAvatarBase--CnTXf";t.styleInject(".Amino_AvatarBase-module__wrapper--gUJPn{align-items:center;border:var(--amino-avatar-base-border);border-radius:var(--amino-avatar-base-border-radius);display:flex;height:var(--amino-avatar-base-height);justify-content:center;width:var(--amino-avatar-base-width)}.Amino_AvatarBase-module__styledAvatarBase--CnTXf{background-color:var(--amino-avatar-base-background-color);background-image:var(--amino-avatar-base-background-image);background-position:var(--amino-avatar-base-background-position);background-repeat:no-repeat;background-size:var(--amino-avatar-base-background-size);border-radius:var(--amino-avatar-base-border-radius);height:100%;width:100%}");var c={round:"50%",rounded:"",square:"0px"};exports.AvatarBase=function(e){var t=e.backgroundColor,n=e.backgroundPosition,u=e.backgroundSize,b=e.backgroundUrl,v=e.bordered,m=e.children,g=e.className,l=e.shape,h=e.size,p=e.style;return r.jsx("div",{className:s.default(i,g),style:a.__assign(a.__assign({},p),{"--amino-avatar-base-background-color":t||"".concat(o.theme.gray100),"--amino-avatar-base-background-image":"url(".concat(b,")"),"--amino-avatar-base-background-position":n||"center","--amino-avatar-base-background-size":u||"","--amino-avatar-base-border":v?"".concat(h/16,"px solid ").concat(o.theme.gray0):"","--amino-avatar-base-border-radius":"rounded"===l?"".concat(2*(h/8-1),"px"):c[l],"--amino-avatar-base-height":"".concat(h,"px"),"--amino-avatar-base-width":"".concat(h,"px")}),children:m||r.jsx("div",{className:d})})},exports.avatarShapes=c;
|
|
@@ -2,14 +2,16 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { BaseProps } from "../../types/BaseProps";
|
|
3
3
|
import type { Theme } from "../../types/Theme";
|
|
4
4
|
export type DismissableDialogIntent = 'danger' | 'warning' | 'info';
|
|
5
|
-
export type
|
|
6
|
-
actions?: ReactNode;
|
|
5
|
+
export type DismissableDialogBaseArgs = {
|
|
7
6
|
intent: DismissableDialogIntent;
|
|
8
7
|
label: string;
|
|
9
|
-
open: boolean;
|
|
10
8
|
subtitle?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export type DismissableDialogProps = BaseProps & DismissableDialogBaseArgs & {
|
|
11
|
+
actions?: ReactNode;
|
|
12
|
+
open: boolean;
|
|
11
13
|
themeOverride?: Theme;
|
|
12
14
|
dismissAction: () => void;
|
|
13
15
|
};
|
|
14
|
-
export declare const _dismissableDialogGetButtonVariant: (intent: DismissableDialogIntent) => "
|
|
16
|
+
export declare const _dismissableDialogGetButtonVariant: (intent: DismissableDialogIntent) => "primary" | "warning" | "danger";
|
|
15
17
|
export declare const DismissableDialog: ({ actions, dismissAction, intent, label, open, style, subtitle, themeOverride, }: DismissableDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
export
|
|
2
|
+
import type { DismissableDialogBaseArgs } from "../DismissableDialog";
|
|
3
|
+
export type AlertDialogArgs = DismissableDialogBaseArgs & {
|
|
4
|
+
dismissText: string;
|
|
5
|
+
onDismiss: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const AlertContext: import("react").Context<(opts: AlertDialogArgs) => void>;
|
|
4
8
|
type Props = {
|
|
5
9
|
children: ReactNode;
|
|
6
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useAlert: () => (opts: import("
|
|
1
|
+
export declare const useAlert: () => (opts: import("./AlertContext").AlertDialogArgs) => void;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
export
|
|
2
|
+
import type { DismissableDialogBaseArgs } from "../DismissableDialog";
|
|
3
|
+
export type ConfirmDialogArgs = DismissableDialogBaseArgs & {
|
|
4
|
+
confirmText: string;
|
|
5
|
+
dismissText: string;
|
|
6
|
+
onConfirm: (ok: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const ConfirmContext: import("react").Context<(opts: ConfirmDialogArgs) => void>;
|
|
4
9
|
type Props = {
|
|
5
10
|
children: ReactNode;
|
|
6
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useConfirm: () => (opts: import("
|
|
1
|
+
export declare const useConfirm: () => (opts: import("./ConfirmContext").ConfirmDialogArgs) => void;
|
|
@@ -17,4 +17,4 @@ export declare const DateInput: import("react").ForwardRefExoticComponent<import
|
|
|
17
17
|
type?: import("react").HTMLInputTypeAttribute | undefined;
|
|
18
18
|
value: string | null;
|
|
19
19
|
valuePrefix?: import("react").ReactNode;
|
|
20
|
-
} & Pick<import("../../help-text/HelpText").HelpTextProps, "error"> & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "
|
|
20
|
+
} & Pick<import("../../help-text/HelpText").HelpTextProps, "error"> & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "autoFocus" | "placeholder" | "tabIndex" | "prefix" | "inputMode" | "onChange" | "onKeyDown" | keyof import("../../../types/BaseProps").BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -68,5 +68,5 @@ export declare const FloatLabelInput: import("react").ForwardRefExoticComponent<
|
|
|
68
68
|
value: string | null;
|
|
69
69
|
/** An additional value that appears next to the input but cannot be changed by the input */
|
|
70
70
|
valuePrefix?: ReactNode;
|
|
71
|
-
} & Pick<HelpTextProps, "error"> & Omit<InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "
|
|
71
|
+
} & Pick<HelpTextProps, "error"> & Omit<InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "autoFocus" | "placeholder" | "tabIndex" | "prefix" | "inputMode" | "onChange" | "onKeyDown" | keyof BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
72
72
|
export {};
|
|
@@ -18,4 +18,4 @@ export declare const NumberInput: import("react").ForwardRefExoticComponent<impo
|
|
|
18
18
|
type?: import("react").HTMLInputTypeAttribute | undefined;
|
|
19
19
|
value: string | null;
|
|
20
20
|
valuePrefix?: import("react").ReactNode;
|
|
21
|
-
} & Pick<import("../../help-text/HelpText").HelpTextProps, "error"> & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "
|
|
21
|
+
} & Pick<import("../../help-text/HelpText").HelpTextProps, "error"> & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "autoFocus" | "placeholder" | "tabIndex" | "prefix" | "inputMode" | "onChange" | "onKeyDown" | keyof import("../../../types/BaseProps").BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -17,4 +17,4 @@ export declare const PasswordInput: import("react").ForwardRefExoticComponent<im
|
|
|
17
17
|
type?: import("react").HTMLInputTypeAttribute | undefined;
|
|
18
18
|
value: string | null;
|
|
19
19
|
valuePrefix?: import("react").ReactNode;
|
|
20
|
-
} & Pick<import("../../help-text/HelpText").HelpTextProps, "error"> & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "
|
|
20
|
+
} & Pick<import("../../help-text/HelpText").HelpTextProps, "error"> & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "autoFocus" | "placeholder" | "tabIndex" | "prefix" | "inputMode" | "onChange" | "onKeyDown" | keyof import("../../../types/BaseProps").BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -17,4 +17,4 @@ export declare const TimeInput: import("react").ForwardRefExoticComponent<import
|
|
|
17
17
|
type?: import("react").HTMLInputTypeAttribute | undefined;
|
|
18
18
|
value: string | null;
|
|
19
19
|
valuePrefix?: import("react").ReactNode;
|
|
20
|
-
} & Pick<import("../../help-text/HelpText").HelpTextProps, "error"> & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "
|
|
20
|
+
} & Pick<import("../../help-text/HelpText").HelpTextProps, "error"> & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "error" | "size" | "label" | "pattern" | "disabled" | "type" | "value" | "autoFocus" | "placeholder" | "tabIndex" | "prefix" | "inputMode" | "onChange" | "onKeyDown" | keyof import("../../../types/BaseProps").BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export type { AlertDialogOpts } from './AlertDialogOpts';
|
|
2
1
|
export type { Color } from './Color';
|
|
3
|
-
export type { ConfirmDialogOpts } from './ConfirmDialogOpts';
|
|
4
2
|
export type { FetcherError } from './FetcherError';
|
|
5
3
|
export type * from './GridSpacing';
|
|
6
4
|
export type { IconProps } from './IconProps';
|
|
@@ -37,7 +37,7 @@ import type { DeepKeyof, DeepPropertyType } from "../types/deep/DeepKeyof";
|
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
39
|
*/
|
|
40
|
-
export declare const changeDeepProperty: <T extends Record<string, unknown>, P extends DeepKeyof<T, Depth>, Depth extends 0 | 1 |
|
|
40
|
+
export declare const changeDeepProperty: <T extends Record<string, unknown>, P extends DeepKeyof<T, Depth>, Depth extends 0 | 1 | 8 | 2 | 4 | 3 | 5 | 6 | 7 | 9 = 4>({ obj, propertyPath, value, }: {
|
|
41
41
|
obj: T;
|
|
42
42
|
propertyPath: P;
|
|
43
43
|
value: DeepPropertyType<T, P, Depth>;
|
|
@@ -60,7 +60,7 @@ import type { DeepKeyofAtIndex, DeepPropertyTypeAtIndex } from "../types/deep/De
|
|
|
60
60
|
},
|
|
61
61
|
};
|
|
62
62
|
*/
|
|
63
|
-
export declare const changeDeepPropertyAtIndex: <T extends object, P extends DeepKeyofAtIndex<T, Depth>, Depth extends 0 | 1 |
|
|
63
|
+
export declare const changeDeepPropertyAtIndex: <T extends object, P extends DeepKeyofAtIndex<T, Depth>, Depth extends 0 | 1 | 8 | 2 | 4 | 3 | 5 | 6 | 7 | 9 = 4>({ index, obj, propertyPath, value, }: {
|
|
64
64
|
index: number;
|
|
65
65
|
obj: T;
|
|
66
66
|
propertyPath: P;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { DismissableDialogIntent } from "../components/dialog/DismissableDialog";
|
|
3
|
-
export type ConfirmDialogOpts = {
|
|
4
|
-
confirmText: string;
|
|
5
|
-
dismissText: string;
|
|
6
|
-
intent: DismissableDialogIntent;
|
|
7
|
-
label: string;
|
|
8
|
-
subtitle?: ReactNode;
|
|
9
|
-
onConfirm: (ok: boolean) => void;
|
|
10
|
-
};
|