@zonos/amino 5.2.21 → 5.2.23

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/all.d.ts CHANGED
@@ -59,7 +59,6 @@ import './components/menu/MenuItem';
59
59
  import './components/nested-data-table/NestedDataTable';
60
60
  import './components/nested-data-table/NestedDataTableHasura';
61
61
  import './components/pivot-table/PivotTable';
62
- import './components/profile-icon/ProfileIcon';
63
62
  import './components/progress-bar/ProgressBar';
64
63
  import './components/radio/Radio';
65
64
  import './components/radio/RadioGroup';
@@ -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 DismissableDialogProps = BaseProps & {
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) => "danger" | "warning" | "primary";
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 { AlertDialogOpts } from "../../../types/AlertDialogOpts";
3
- export declare const AlertContext: import("react").Context<(opts: AlertDialogOpts) => void>;
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("../../../types").AlertDialogOpts) => void;
1
+ export declare const useAlert: () => (opts: import("./AlertContext").AlertDialogArgs) => void;
@@ -1,6 +1,11 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { ConfirmDialogOpts } from "../../../types/ConfirmDialogOpts";
3
- export declare const ConfirmContext: import("react").Context<(opts: ConfirmDialogOpts) => void>;
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("../../../types").ConfirmDialogOpts) => void;
1
+ export declare const useConfirm: () => (opts: import("./ConfirmContext").ConfirmDialogArgs) => void;
@@ -18,6 +18,14 @@ export type FlexProps = BaseProps & {
18
18
  */
19
19
  flexDirection?: CSSProperties['flexDirection'];
20
20
  flexWrap?: CSSProperties['flexWrap'];
21
+ /**
22
+ * @default false
23
+ */
24
+ fullHeight?: boolean;
25
+ /**
26
+ * @default false
27
+ */
28
+ fullWidth?: boolean;
21
29
  /**
22
30
  * @default 8
23
31
  */
@@ -31,4 +39,4 @@ export type FlexProps = BaseProps & {
31
39
  */
32
40
  padding?: number;
33
41
  };
34
- export declare const Flex: ({ alignItems, children, childrenFlex, className, flexDirection, flexWrap, gap, justifyContent, padding, style, }: FlexProps) => import("react/jsx-runtime").JSX.Element;
42
+ export declare const Flex: ({ alignItems, children, childrenFlex, className, flexDirection, flexWrap, fullHeight, fullWidth, gap, justifyContent, padding, style, }: FlexProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-bd4862e8.js"),r=require("react/jsx-runtime"),a=require("clsx"),l=require("../../style-inject.es-d4ddeae4.js");function d(e){return e&&e.__esModule?e:{default:e}}var i=d(a),p="Amino_Flex-module__flexWrapper--RLOkf";l.styleInject(".Amino_Flex-module__flexWrapper--RLOkf{align-items:var(--dashboard-flex-wrapper-align-items);display:flex;flex-direction:var(--dashboard-flex-wrapper-flex-direction);flex-wrap:var(--dashboard-flex-wrapper-flex-wrap);gap:var(--dashboard-flex-wrapper-gap);justify-content:var(--dashboard-flex-wrapper-justify-content);padding:var(--dashboard-flex-wrapper-padding)}.Amino_Flex-module__flexWrapper--RLOkf>*{flex:var(--dashboard-flex-wrapper-flex-children)}");exports.Flex=function(a){var l=a.alignItems,d=void 0===l?"stretch":l,s=a.children,t=a.childrenFlex,n=void 0===t?"initial":t,o=a.className,f=a.flexDirection,x=void 0===f?"row":f,c=a.flexWrap,h=void 0===c?"nowrap":c,u=a.gap,w=void 0===u?8:u,v=a.justifyContent,_=void 0===v?"flex-start":v,b=a.padding,g=void 0===b?0:b,m=a.style;return r.jsx("div",{className:i.default(o,p),style:e.__assign(e.__assign({},m),{"--dashboard-flex-wrapper-align-items":d,"--dashboard-flex-wrapper-flex-children":n,"--dashboard-flex-wrapper-flex-direction":x,"--dashboard-flex-wrapper-flex-wrap":h,"--dashboard-flex-wrapper-gap":"".concat(w,"px"),"--dashboard-flex-wrapper-justify-content":_,"--dashboard-flex-wrapper-padding":"".concat(g,"px")}),children:s})};
1
+ "use strict";var e=require("../../_tslib-bd4862e8.js"),i=require("react/jsx-runtime"),l=require("clsx"),r=require("../../style-inject.es-d4ddeae4.js");function a(e){return e&&e.__esModule?e:{default:e}}var n=a(l),o="Amino_Flex-module__flexWrapper--RLOkf",p="Amino_Flex-module__fullWidth--qdBi7",t="Amino_Flex-module__fullHeight--h1TZi";r.styleInject(".Amino_Flex-module__flexWrapper--RLOkf{align-items:var(--amino-flex-wrapper-align-items);display:flex;flex-direction:var(--amino-flex-wrapper-flex-direction);flex-wrap:var(--amino-flex-wrapper-flex-wrap);gap:var(--amino-flex-wrapper-gap);justify-content:var(--amino-flex-wrapper-justify-content);padding:var(--amino-flex-wrapper-padding)}.Amino_Flex-module__flexWrapper--RLOkf>*{flex:var(--amino-flex-wrapper-flex-children)}.Amino_Flex-module__flexWrapper--RLOkf.Amino_Flex-module__fullWidth--qdBi7{width:100%}.Amino_Flex-module__flexWrapper--RLOkf.Amino_Flex-module__fullHeight--h1TZi{height:100%}");exports.Flex=function(l){var r=l.alignItems,a=void 0===r?"stretch":r,f=l.children,x=l.childrenFlex,d=void 0===x?"initial":x,m=l.className,s=l.flexDirection,_=void 0===s?"row":s,u=l.flexWrap,c=void 0===u?"nowrap":u,v=l.fullHeight,w=void 0!==v&&v,g=l.fullWidth,h=void 0!==g&&g,F=l.gap,j=void 0===F?8:F,y=l.justifyContent,A=void 0===y?"flex-start":y,W=l.padding,q=void 0===W?0:W,k=l.style;return i.jsx("div",{className:n.default(m,o,h&&p,w&&t),style:e.__assign(e.__assign({},k),{"--amino-flex-wrapper-align-items":a,"--amino-flex-wrapper-flex-children":d,"--amino-flex-wrapper-flex-direction":_,"--amino-flex-wrapper-flex-wrap":c,"--amino-flex-wrapper-gap":"".concat(j,"px"),"--amino-flex-wrapper-justify-content":A,"--amino-flex-wrapper-padding":"".concat(q,"px")}),children:f})};
@@ -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" | "tabIndex" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "prefix" | "inputMode" | keyof import("../../../types/BaseProps").BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
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" | "tabIndex" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "prefix" | "inputMode" | keyof BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
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" | "tabIndex" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "prefix" | "inputMode" | keyof import("../../../types/BaseProps").BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
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" | "tabIndex" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "prefix" | "inputMode" | keyof import("../../../types/BaseProps").BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
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" | "tabIndex" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "prefix" | "inputMode" | keyof import("../../../types/BaseProps").BaseProps | "readOnly" | "required" | "suffix" | "valuePrefix"> & import("react").RefAttributes<HTMLInputElement>>;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.2.21",
3
+ "version": "5.2.23",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",
@@ -25,7 +25,6 @@
25
25
  "d3-geo": "^2.0.2",
26
26
  "fuse.js": "^6.6.2",
27
27
  "pretty-bytes": "^6.1.0",
28
- "react-awesome-gravatar": "^2.0.3",
29
28
  "react-data-grid": "7.0.0-beta.34",
30
29
  "react-dropzone": "^12.1.0",
31
30
  "react-select": "^5.7.4",
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 | 2 | 4 | 8 | 3 | 5 | 6 | 7 | 9 = 4>({ obj, propertyPath, value, }: {
40
+ export declare const changeDeepProperty: <T extends Record<string, unknown>, P extends DeepKeyof<T, Depth>, Depth extends 0 | 1 | 8 | 4 | 2 | 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 | 2 | 4 | 8 | 3 | 5 | 6 | 7 | 9 = 4>({ index, obj, propertyPath, value, }: {
63
+ export declare const changeDeepPropertyAtIndex: <T extends object, P extends DeepKeyofAtIndex<T, Depth>, Depth extends 0 | 1 | 8 | 4 | 2 | 3 | 5 | 6 | 7 | 9 = 4>({ index, obj, propertyPath, value, }: {
64
64
  index: number;
65
65
  obj: T;
66
66
  propertyPath: P;
@@ -1,6 +0,0 @@
1
- import type { ImageSize } from "../avatar/AvatarBase";
2
- export type Props = {
3
- email: string | null;
4
- size?: ImageSize;
5
- };
6
- export declare const ProfileIcon: ({ email, size }: Props) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react-awesome-gravatar"),a=require("../avatar/UserAvatar.js"),i=require("../../style-inject.es-d4ddeae4.js");require("../avatar/AvatarBase.js"),require("../../_tslib-bd4862e8.js"),require("clsx"),require("../../styles/constants/theme.js");var t="Amino_ProfileIcon-module__avatar--4N7uA";i.styleInject(".Amino_ProfileIcon-module__avatar--4N7uA{border-radius:50%;cursor:pointer;height:auto;max-width:var(--amino-profile-icon-max-width);overflow:hidden;width:100%}");exports.ProfileIcon=function(i){var s=i.email,o=i.size,l=void 0===o?32:o,n={default:"mp",size:l},u=s&&r.getGravatarUrl(s,n);return u?e.jsx("img",{alt:"Profile",className:t,src:u,style:{"--amino-profile-icon-max-width":"".concat(l,"px")}}):e.jsx(a.UserAvatar,{size:l})};
@@ -1,8 +0,0 @@
1
- import type { DismissableDialogIntent } from "../components/dialog/DismissableDialog";
2
- export type AlertDialogOpts = {
3
- dismissText: string;
4
- intent: DismissableDialogIntent;
5
- label: string;
6
- subtitle: string;
7
- onDismiss: () => void;
8
- };
@@ -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
- };