@zendeskgarden/react-notifications 8.59.1 → 8.60.0

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.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ import { IGlobalAlertProps } from '../../types';
9
+ import { GlobalAlertButton } from './GlobalAlertButton';
10
+ import { GlobalAlertClose } from './GlobalAlertClose';
11
+ import { GlobalAlertContent } from './GlobalAlertContent';
12
+ import { GlobalAlertTitle } from './GlobalAlertTitle';
13
+ /**
14
+ * @extends HTMLAttributes<HTMLDivElement>
15
+ */
16
+ export declare const GlobalAlert: React.ForwardRefExoticComponent<IGlobalAlertProps & React.RefAttributes<HTMLDivElement>> & {
17
+ Button: typeof GlobalAlertButton;
18
+ Close: typeof GlobalAlertClose;
19
+ Content: typeof GlobalAlertContent;
20
+ Title: typeof GlobalAlertTitle;
21
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ import { IGlobalAlertButtonProps } from '../../types';
9
+ /**
10
+ * @extends ButtonHTMLAttributes<HTMLButtonElement>
11
+ */
12
+ export declare const GlobalAlertButton: React.ForwardRefExoticComponent<IGlobalAlertButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends ButtonHTMLAttributes<HTMLButtonElement>
10
+ */
11
+ export declare const GlobalAlertClose: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLDivElement>
10
+ */
11
+ export declare const GlobalAlertContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ import { IGlobalAlertTitleProps } from '../../types';
9
+ /**
10
+ * @extends HTMLAttributes<HTMLDivElement>
11
+ */
12
+ export declare const GlobalAlertTitle: React.ForwardRefExoticComponent<IGlobalAlertTitleProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { IGlobalAlertProps } from '../../types';
8
+ export declare type GlobalAlertContextProps = Pick<IGlobalAlertProps, 'type'>;
9
+ export declare const GlobalAlertContext: import("react").Context<GlobalAlertContextProps>;
10
+ export declare const useGlobalAlertContext: () => GlobalAlertContextProps;
@@ -12,7 +12,8 @@ export { Paragraph } from './elements/content/Paragraph';
12
12
  export { Title } from './elements/content/Title';
13
13
  export { ToastProvider } from './elements/toaster/ToastProvider';
14
14
  export { useToast } from './elements/toaster/useToast';
15
- export type { IAlertProps, INotificationProps, IWellProps, ITitleProps, IToastProviderProps,
15
+ export { GlobalAlert } from './elements/global-alert/GlobalAlert';
16
+ export type { IAlertProps, INotificationProps, IWellProps, ITitleProps, IToastProviderProps, IGlobalAlertProps, IGlobalAlertButtonProps, IGlobalAlertTitleProps,
16
17
  /** @deprecated can be dereferenced via IToastOptions['placement'] */
17
18
  Placement as ToastPlacement } from './types';
18
19
  export type { IToastOptions, IToast,
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { DefaultTheme } from 'styled-components';
8
+ import { IGlobalAlertProps } from '../../types';
9
+ interface IStyledGlobalAlertProps {
10
+ alertType: IGlobalAlertProps['type'];
11
+ }
12
+ export declare const StyledGlobalAlert: import("styled-components").StyledComponent<"div", DefaultTheme, {
13
+ 'data-garden-id': string;
14
+ 'data-garden-version': string;
15
+ } & IStyledGlobalAlertProps, "data-garden-id" | "data-garden-version">;
16
+ export {};
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { DefaultTheme } from 'styled-components';
8
+ import { IGlobalAlertProps } from '../../types';
9
+ interface IStyledGlobalAlertButtonProps {
10
+ alertType: IGlobalAlertProps['type'];
11
+ isBasic?: boolean;
12
+ }
13
+ export declare const StyledGlobalAlertButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-buttons").IButtonProps & import("react").RefAttributes<HTMLButtonElement>> & {
14
+ EndIcon: {
15
+ (props: import("@zendeskgarden/react-buttons").IButtonEndIconProps): JSX.Element;
16
+ displayName: string;
17
+ };
18
+ StartIcon: {
19
+ (props: import("@zendeskgarden/react-buttons").IButtonEndIconProps): JSX.Element;
20
+ displayName: string;
21
+ };
22
+ }, DefaultTheme, {
23
+ 'data-garden-id': string;
24
+ 'data-garden-version': string;
25
+ focusInset: false;
26
+ isDanger: false;
27
+ isLink: false;
28
+ isNeutral: false;
29
+ isPill: false;
30
+ isStretched: false;
31
+ size: "small";
32
+ } & IStyledGlobalAlertButtonProps, "isDanger" | "size" | "isStretched" | "isNeutral" | "isLink" | "isPill" | "focusInset" | "data-garden-id" | "data-garden-version">;
33
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { DefaultTheme, ThemeProps } from 'styled-components';
8
+ import { IGlobalAlertProps } from '../../types';
9
+ interface IStyledGlobalAlertCloseProps {
10
+ alertType: IGlobalAlertProps['type'];
11
+ }
12
+ export declare const colorStyles: (props: ThemeProps<DefaultTheme> & IStyledGlobalAlertCloseProps) => import("styled-components").FlattenSimpleInterpolation;
13
+ export declare const StyledGlobalAlertClose: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-buttons").IIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, DefaultTheme, {
14
+ 'data-garden-id': string;
15
+ 'data-garden-version': string;
16
+ size: "small";
17
+ } & IStyledGlobalAlertCloseProps, "size" | "data-garden-id" | "data-garden-version">;
18
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ export declare const StyledGlobalAlertContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
8
+ 'data-garden-id': string;
9
+ 'data-garden-version': string;
10
+ }, "data-garden-id" | "data-garden-version">;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ import { DefaultTheme } from 'styled-components';
9
+ export declare const StyledGlobalAlertIcon: import("styled-components").StyledComponent<({ children, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {
10
+ 'data-garden-id': string;
11
+ 'data-garden-version': string;
12
+ }, "data-garden-id" | "data-garden-version">;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { DefaultTheme } from 'styled-components';
8
+ import { IGlobalAlertProps, IGlobalAlertTitleProps } from '../../types';
9
+ interface IStyledGlobalAlertTitleProps {
10
+ alertType: IGlobalAlertProps['type'];
11
+ isRegular?: IGlobalAlertTitleProps['isRegular'];
12
+ }
13
+ export declare const StyledGlobalAlertTitle: import("styled-components").StyledComponent<"div", DefaultTheme, {
14
+ 'data-garden-id': string;
15
+ 'data-garden-version': string;
16
+ } & IStyledGlobalAlertTitleProps, "data-garden-id" | "data-garden-version">;
17
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ export { StyledGlobalAlert } from './StyledGlobalAlert';
8
+ export { StyledGlobalAlertButton } from './StyledGlobalAlertButton';
9
+ export { StyledGlobalAlertClose } from './StyledGlobalAlertClose';
10
+ export { StyledGlobalAlertContent } from './StyledGlobalAlertContent';
11
+ export { StyledGlobalAlertIcon } from './StyledGlobalAlertIcon';
12
+ export { StyledGlobalAlertTitle } from './StyledGlobalAlertTitle';
@@ -12,3 +12,4 @@ export { StyledNotification } from './StyledNotification';
12
12
  export { StyledWell } from './StyledWell';
13
13
  export { StyledIcon } from './StyledIcon';
14
14
  export { StyledBase } from './StyledBase';
15
+ export * from './global-alert';
@@ -4,7 +4,8 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import { HTMLAttributes } from 'react';
7
+ import { HTMLAttributes, ButtonHTMLAttributes } from 'react';
8
+ import { IButtonProps } from '@zendeskgarden/react-buttons';
8
9
  export declare const PLACEMENT: readonly ["top-start", "top", "top-end", "bottom-start", "bottom", "bottom-end"];
9
10
  export declare const TYPE: readonly ["success", "warning", "error", "info"];
10
11
  export declare type Placement = typeof PLACEMENT[number];
@@ -41,3 +42,17 @@ export interface IToastProviderProps {
41
42
  */
42
43
  zIndex?: number;
43
44
  }
45
+ export interface IGlobalAlertProps extends HTMLAttributes<HTMLDivElement> {
46
+ /**
47
+ * Applies global alert type styles
48
+ */
49
+ type: Type;
50
+ }
51
+ export interface IGlobalAlertButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Pick<IButtonProps, 'isBasic'> {
52
+ }
53
+ export interface IGlobalAlertTitleProps extends HTMLAttributes<HTMLDivElement> {
54
+ /**
55
+ * Applies regular (non-bold) font weight
56
+ */
57
+ isRegular?: boolean;
58
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-notifications",
3
- "version": "8.59.1",
3
+ "version": "8.60.0",
4
4
  "description": "Notification and Well components within the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -21,6 +21,7 @@
21
21
  "sideEffects": false,
22
22
  "types": "dist/typings/index.d.ts",
23
23
  "dependencies": {
24
+ "@zendeskgarden/react-buttons": "^8.60.0",
24
25
  "polished": "^4.1.1",
25
26
  "prop-types": "^15.5.7",
26
27
  "react-transition-group": "^4.4.2",
@@ -34,7 +35,7 @@
34
35
  },
35
36
  "devDependencies": {
36
37
  "@types/react-transition-group": "4.4.5",
37
- "@zendeskgarden/react-theming": "^8.59.1",
38
+ "@zendeskgarden/react-theming": "^8.60.0",
38
39
  "@zendeskgarden/svg-icons": "6.33.0"
39
40
  },
40
41
  "keywords": [
@@ -47,5 +48,5 @@
47
48
  "access": "public"
48
49
  },
49
50
  "zendeskgarden:src": "src/index.ts",
50
- "gitHead": "023c569e38e4d97264ef871bf7a9aa8b0d16b0aa"
51
+ "gitHead": "8adf13e61f58a64a0ba06794c0362f665e846fe9"
51
52
  }