@zendeskgarden/react-notifications 9.0.0-next.14 → 9.0.0-next.15

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.
Files changed (42) hide show
  1. package/dist/esm/elements/Alert.js +6 -6
  2. package/dist/esm/elements/Notification.js +4 -5
  3. package/dist/esm/elements/Well.js +12 -3
  4. package/dist/esm/elements/content/Close.js +7 -4
  5. package/dist/esm/elements/content/Title.js +10 -3
  6. package/dist/esm/elements/global-alert/GlobalAlert.js +23 -10
  7. package/dist/esm/elements/global-alert/GlobalAlertButton.js +3 -2
  8. package/dist/esm/elements/global-alert/GlobalAlertClose.js +5 -3
  9. package/dist/esm/elements/global-alert/GlobalAlertTitle.js +8 -3
  10. package/dist/esm/styled/StyledAlert.js +29 -3
  11. package/dist/esm/styled/StyledBase.js +72 -25
  12. package/dist/esm/styled/StyledIcon.js +47 -4
  13. package/dist/esm/styled/StyledNotification.js +19 -25
  14. package/dist/esm/styled/StyledWell.js +28 -4
  15. package/dist/esm/styled/content/StyledClose.js +53 -8
  16. package/dist/esm/styled/content/StyledParagraph.js +1 -1
  17. package/dist/esm/styled/content/StyledTitle.js +6 -3
  18. package/dist/esm/styled/global-alert/StyledGlobalAlert.js +113 -38
  19. package/dist/esm/styled/global-alert/StyledGlobalAlertButton.js +78 -33
  20. package/dist/esm/styled/global-alert/StyledGlobalAlertClose.js +62 -31
  21. package/dist/esm/styled/global-alert/StyledGlobalAlertContent.js +2 -2
  22. package/dist/esm/styled/global-alert/StyledGlobalAlertIcon.js +40 -4
  23. package/dist/esm/styled/global-alert/StyledGlobalAlertTitle.js +20 -9
  24. package/dist/esm/utils/icons.js +6 -6
  25. package/dist/index.cjs.js +765 -370
  26. package/dist/typings/styled/StyledAlert.d.ts +8 -3
  27. package/dist/typings/styled/StyledBase.d.ts +8 -6
  28. package/dist/typings/styled/StyledIcon.d.ts +10 -1
  29. package/dist/typings/styled/StyledNotification.d.ts +11 -3
  30. package/dist/typings/styled/StyledWell.d.ts +7 -2
  31. package/dist/typings/styled/content/StyledClose.d.ts +5 -3
  32. package/dist/typings/styled/content/StyledTitle.d.ts +1 -1
  33. package/dist/typings/styled/global-alert/StyledGlobalAlert.d.ts +1 -1
  34. package/dist/typings/styled/global-alert/StyledGlobalAlertButton.d.ts +3 -9
  35. package/dist/typings/styled/global-alert/StyledGlobalAlertClose.d.ts +3 -3
  36. package/dist/typings/styled/global-alert/StyledGlobalAlertTitle.d.ts +2 -2
  37. package/dist/typings/utils/icons.d.ts +1 -1
  38. package/dist/typings/{elements/global-alert/utility.d.ts → utils/useGlobalAlertContext.d.ts} +1 -1
  39. package/dist/typings/utils/useNotificationsContext.d.ts +2 -3
  40. package/package.json +4 -4
  41. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/x-stroke.svg.js +0 -26
  42. /package/dist/esm/{elements/global-alert/utility.js → utils/useGlobalAlertContext.js} +0 -0
@@ -5,13 +5,18 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import { DefaultTheme } from 'styled-components';
8
- export interface IStyledAlertProps {
9
- hue?: string;
8
+ import { IStyledBaseProps } from './StyledBase';
9
+ import { Type } from '../types';
10
+ export interface IStyledAlertProps extends IStyledBaseProps {
11
+ $type?: Type;
10
12
  }
11
13
  /**
12
14
  * Supports all `<div>` props
13
15
  */
14
- export declare const StyledAlert: import("styled-components").StyledComponent<"div", DefaultTheme, import("./StyledBase").IStyledBaseProps & {
16
+ export declare const StyledAlert: import("styled-components").StyledComponent<"div", DefaultTheme, {
17
+ 'data-garden-id': string;
18
+ 'data-garden-version': string;
19
+ } & IStyledBaseProps & {
15
20
  'data-garden-id': string;
16
21
  'data-garden-version': string;
17
22
  } & IStyledAlertProps, "data-garden-id" | "data-garden-version">;
@@ -4,11 +4,13 @@
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 { DefaultTheme } from 'styled-components';
7
+ import { ThemeProps, DefaultTheme } from 'styled-components';
8
8
  import { Type } from '../types';
9
- export interface IStyledBaseProps {
10
- isFloating?: boolean;
11
- hue?: string;
12
- type?: Type;
9
+ export interface IStyledBaseProps extends ThemeProps<DefaultTheme> {
10
+ $isFloating?: boolean;
11
+ $type?: Type;
13
12
  }
14
- export declare const StyledBase: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledBaseProps, never>;
13
+ export declare const StyledBase: import("styled-components").StyledComponent<"div", DefaultTheme, {
14
+ 'data-garden-id': string;
15
+ 'data-garden-version': string;
16
+ } & IStyledBaseProps, "data-garden-id" | "data-garden-version">;
@@ -5,4 +5,13 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  /// <reference types="react" />
8
- export declare const StyledIcon: import("styled-components").StyledComponent<({ children, theme, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>, import("styled-components").DefaultTheme, {}, never>;
8
+ import { DefaultTheme, ThemeProps } from 'styled-components';
9
+ import { Type } from '../types';
10
+ interface IStyledIconProps extends ThemeProps<DefaultTheme> {
11
+ $type?: Type;
12
+ }
13
+ export declare const StyledIcon: import("styled-components").StyledComponent<({ children, theme, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {
14
+ 'data-garden-id': string;
15
+ 'data-garden-version': string;
16
+ } & IStyledIconProps, "data-garden-id" | "data-garden-version">;
17
+ export {};
@@ -5,11 +5,19 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import { DefaultTheme } from 'styled-components';
8
- import { INotificationProps } from '../types';
8
+ import { Type } from '../types';
9
+ import { IStyledBaseProps } from './StyledBase';
10
+ interface IStyledNotificationProps extends IStyledBaseProps {
11
+ $type?: Type;
12
+ }
9
13
  /**
10
14
  * Supports all `<div>` props
11
15
  */
12
- export declare const StyledNotification: import("styled-components").StyledComponent<"div", DefaultTheme, import("./StyledBase").IStyledBaseProps & {
16
+ export declare const StyledNotification: import("styled-components").StyledComponent<"div", DefaultTheme, {
13
17
  'data-garden-id': string;
14
18
  'data-garden-version': string;
15
- } & INotificationProps, "data-garden-id" | "data-garden-version">;
19
+ } & IStyledBaseProps & {
20
+ 'data-garden-id': string;
21
+ 'data-garden-version': string;
22
+ } & IStyledNotificationProps, "data-garden-id" | "data-garden-version">;
23
+ export {};
@@ -4,13 +4,18 @@
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 { DefaultTheme } from 'styled-components';
7
8
  export interface IStyledWellProps {
8
- isRecessed?: boolean;
9
+ $isRecessed?: boolean;
10
+ $isFloating?: boolean;
9
11
  }
10
12
  /**
11
13
  * Supports all `<div>` props
12
14
  */
13
- export declare const StyledWell: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("./StyledBase").IStyledBaseProps & {
15
+ export declare const StyledWell: import("styled-components").StyledComponent<"div", DefaultTheme, {
16
+ 'data-garden-id': string;
17
+ 'data-garden-version': string;
18
+ } & import("./StyledBase").IStyledBaseProps & {
14
19
  'data-garden-id': string;
15
20
  'data-garden-version': string;
16
21
  } & IStyledWellProps, "data-garden-id" | "data-garden-version">;
@@ -4,9 +4,11 @@
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 { Hue } from '../../utils/useNotificationsContext';
7
+ /// <reference types="react" />
8
+ import { DefaultTheme } from 'styled-components';
9
+ import { Type } from '../../types';
8
10
  interface IStyledCloseProps {
9
- hue?: Hue;
11
+ $type?: Type;
10
12
  }
11
13
  /**
12
14
  * Used to close a Notification. Supports all `<button>` props
@@ -14,7 +16,7 @@ interface IStyledCloseProps {
14
16
  * 1. Reset for <button> element.
15
17
  * 2. Remove dotted outline from Firefox on focus.
16
18
  */
17
- export declare const StyledClose: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
19
+ export declare const StyledClose: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-buttons").IIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, DefaultTheme, {
18
20
  'data-garden-id': string;
19
21
  'data-garden-version': string;
20
22
  } & IStyledCloseProps, "data-garden-id" | "data-garden-version">;
@@ -5,7 +5,7 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  export interface IStyledTitleProps {
8
- isRegular?: boolean;
8
+ $isRegular?: boolean;
9
9
  }
10
10
  /**
11
11
  * 1. Reset for <h1>, etc.
@@ -7,7 +7,7 @@
7
7
  import { DefaultTheme } from 'styled-components';
8
8
  import { IGlobalAlertProps } from '../../types';
9
9
  interface IStyledGlobalAlertProps {
10
- alertType: IGlobalAlertProps['type'];
10
+ $alertType: IGlobalAlertProps['type'];
11
11
  }
12
12
  export declare const StyledGlobalAlert: import("styled-components").StyledComponent<"div", DefaultTheme, {
13
13
  'data-garden-id': string;
@@ -8,7 +8,7 @@
8
8
  import { DefaultTheme } from 'styled-components';
9
9
  import { IGlobalAlertProps } from '../../types';
10
10
  interface IStyledGlobalAlertButtonProps {
11
- alertType: IGlobalAlertProps['type'];
11
+ $alertType: IGlobalAlertProps['type'];
12
12
  isBasic?: boolean;
13
13
  }
14
14
  export declare const StyledGlobalAlertButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-buttons").IButtonProps & import("react").RefAttributes<HTMLButtonElement>> & {
@@ -21,13 +21,7 @@ export declare const StyledGlobalAlertButton: import("styled-components").Styled
21
21
  displayName: string;
22
22
  };
23
23
  }, DefaultTheme, {
24
+ 'data-garden-id': string;
24
25
  '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, "size" | "isDanger" | "isStretched" | "isNeutral" | "isLink" | "isPill" | "focusInset" | "data-garden-version">;
26
+ } & IStyledGlobalAlertButtonProps, "data-garden-id" | "data-garden-version">;
33
27
  export {};
@@ -8,11 +8,11 @@
8
8
  import { DefaultTheme, ThemeProps } from 'styled-components';
9
9
  import { IGlobalAlertProps } from '../../types';
10
10
  interface IStyledGlobalAlertCloseProps {
11
- alertType: IGlobalAlertProps['type'];
11
+ $alertType: IGlobalAlertProps['type'];
12
12
  }
13
13
  export declare const colorStyles: (props: ThemeProps<DefaultTheme> & IStyledGlobalAlertCloseProps) => import("styled-components").FlattenSimpleInterpolation;
14
14
  export declare const StyledGlobalAlertClose: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-buttons").IIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, DefaultTheme, {
15
+ 'data-garden-id': string;
15
16
  'data-garden-version': string;
16
- size: "small";
17
- } & IStyledGlobalAlertCloseProps, "size" | "data-garden-version">;
17
+ } & IStyledGlobalAlertCloseProps, "data-garden-id" | "data-garden-version">;
18
18
  export {};
@@ -7,8 +7,8 @@
7
7
  import { DefaultTheme } from 'styled-components';
8
8
  import { IGlobalAlertProps, IGlobalAlertTitleProps } from '../../types';
9
9
  interface IStyledGlobalAlertTitleProps {
10
- alertType: IGlobalAlertProps['type'];
11
- isRegular?: IGlobalAlertTitleProps['isRegular'];
10
+ $alertType: IGlobalAlertProps['type'];
11
+ $isRegular?: IGlobalAlertTitleProps['isRegular'];
12
12
  }
13
13
  export declare const StyledGlobalAlertTitle: import("styled-components").StyledComponent<"div", DefaultTheme, {
14
14
  'data-garden-id': string;
@@ -6,4 +6,4 @@
6
6
  */
7
7
  import { Type } from '../types';
8
8
  export declare const validationIcons: Record<Type, Record<string, unknown>>;
9
- export declare const validationHues: Record<Type, string>;
9
+ export declare const validationTypes: Record<Type, Type>;
@@ -5,7 +5,7 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  /// <reference types="react" />
8
- import { IGlobalAlertProps } from '../../types';
8
+ import { IGlobalAlertProps } from '../types';
9
9
  export type GlobalAlertContextProps = Pick<IGlobalAlertProps, 'type'>;
10
10
  export declare const GlobalAlertContext: import("react").Context<GlobalAlertContextProps>;
11
11
  export declare const useGlobalAlertContext: () => GlobalAlertContextProps;
@@ -5,6 +5,5 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  /// <reference types="react" />
8
- export type Hue = 'successHue' | 'warningHue' | 'dangerHue' | 'neutralHue';
9
- export declare const NotificationsContext: import("react").Context<Hue | undefined>;
10
- export declare const useNotificationsContext: () => Hue | undefined;
8
+ export declare const NotificationsContext: import("react").Context<"success" | "warning" | "error" | "info" | undefined>;
9
+ export declare const useNotificationsContext: () => "success" | "warning" | "error" | "info" | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-notifications",
3
- "version": "9.0.0-next.14",
3
+ "version": "9.0.0-next.15",
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,7 +21,7 @@
21
21
  "sideEffects": false,
22
22
  "types": "dist/typings/index.d.ts",
23
23
  "dependencies": {
24
- "@zendeskgarden/react-buttons": "^9.0.0-next.14",
24
+ "@zendeskgarden/react-buttons": "^9.0.0-next.15",
25
25
  "polished": "^4.3.1",
26
26
  "prop-types": "^15.5.7",
27
27
  "react-transition-group": "^4.4.2",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/react-transition-group": "4.4.10",
38
- "@zendeskgarden/react-theming": "^9.0.0-next.14",
38
+ "@zendeskgarden/react-theming": "^9.0.0-next.15",
39
39
  "@zendeskgarden/svg-icons": "7.1.1"
40
40
  },
41
41
  "keywords": [
@@ -48,5 +48,5 @@
48
48
  "access": "public"
49
49
  },
50
50
  "zendeskgarden:src": "src/index.ts",
51
- "gitHead": "4cd4e10839f6d083f0c5e642b99256e390a37ae6"
51
+ "gitHead": "f165ebfd3f53d4cbc2ac788bb3c1cd07348a16de"
52
52
  }
@@ -1,26 +0,0 @@
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 * as React from 'react';
8
-
9
- var _path;
10
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
11
- var SvgXStroke = function SvgXStroke(props) {
12
- return /*#__PURE__*/React.createElement("svg", _extends({
13
- xmlns: "http://www.w3.org/2000/svg",
14
- width: 12,
15
- height: 12,
16
- focusable: "false",
17
- viewBox: "0 0 12 12",
18
- "aria-hidden": "true"
19
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
20
- stroke: "currentColor",
21
- strokeLinecap: "round",
22
- d: "M3 9l6-6m0 6L3 3"
23
- })));
24
- };
25
-
26
- export { SvgXStroke as default };