@homebound/beam 2.370.1 → 2.370.2

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.
@@ -3,6 +3,7 @@ export interface BannerProps {
3
3
  type: BannerTypes;
4
4
  message: ReactNode;
5
5
  onClose?: VoidFunction;
6
+ showIcon?: boolean;
6
7
  }
7
8
  export declare function Banner(props: BannerProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
9
  export type BannerTypes = "error" | "warning" | "success" | "info" | "alert";
@@ -7,9 +7,9 @@ const IconButton_1 = require("./IconButton");
7
7
  const Css_1 = require("../Css");
8
8
  const utils_1 = require("../utils");
9
9
  function Banner(props) {
10
- const { type, message, onClose = false, ...others } = props;
10
+ const { type, message, onClose = false, showIcon = true, ...others } = props;
11
11
  const tid = (0, utils_1.useTestIds)(others, "banner");
12
- return ((0, jsx_runtime_1.jsxs)("div", { css: { ...variantStyles[type], ...Css_1.Css.df.aic.w100.gap1.p2.gray900.base.bshBasic.$ }, ...tid, role: "alert", children: [(0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.$, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: typeToIcon[type], ...tid.type, color: Css_1.Palette.Gray900 }) }), (0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fg1.$, ...tid.message, children: message }), onClose && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.lh(0).$, children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { icon: "x", onClick: onClose, ...tid.close, color: Css_1.Palette.Gray900 }) }))] }));
12
+ return ((0, jsx_runtime_1.jsxs)("div", { css: { ...variantStyles[type], ...Css_1.Css.df.aic.w100.gap1.p2.gray900.base.bshBasic.$ }, ...tid, role: "alert", children: [showIcon && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.$, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: typeToIcon[type], ...tid.type, color: Css_1.Palette.Gray900 }) })), (0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fg1.$, ...tid.message, children: message }), onClose && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.lh(0).$, children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { icon: "x", onClick: onClose, ...tid.close, color: Css_1.Palette.Gray900 }) }))] }));
13
13
  }
14
14
  const typeToIcon = {
15
15
  success: "checkCircle",
@@ -39,6 +39,7 @@ export declare const Icons: {
39
39
  check: import("@emotion/react/jsx-runtime").JSX.Element;
40
40
  search: import("@emotion/react/jsx-runtime").JSX.Element;
41
41
  comment: import("@emotion/react/jsx-runtime").JSX.Element;
42
+ commentFilled: import("@emotion/react/jsx-runtime").JSX.Element;
42
43
  plus: import("@emotion/react/jsx-runtime").JSX.Element;
43
44
  minus: import("@emotion/react/jsx-runtime").JSX.Element;
44
45
  pencil: import("@emotion/react/jsx-runtime").JSX.Element;
@@ -44,6 +44,7 @@ exports.Icons = {
44
44
  check: ((0, jsx_runtime_1.jsx)("path", { d: "M9.99997 15.586L6.70697 12.293L5.29297 13.707L9.99997 18.414L19.707 8.70697L18.293 7.29297L9.99997 15.586Z" })),
45
45
  search: ((0, jsx_runtime_1.jsx)("path", { d: "M10 18C11.846 18 13.543 17.365 14.897 16.312L19.293 20.708L20.707 19.294L16.311 14.898C17.365 13.543 18 11.846 18 10C18 5.589 14.411 2 10 2C5.589 2 2 5.589 2 10C2 14.411 5.589 18 10 18ZM10 4C13.309 4 16 6.691 16 10C16 13.309 13.309 16 10 16C6.691 16 4 13.309 4 10C4 6.691 6.691 4 10 4Z" })),
46
46
  comment: ((0, jsx_runtime_1.jsx)("path", { d: "M12 2C6.486 2 2 5.589 2 10C2 12.908 3.898 15.516 7 16.934V22L12.34 17.995C17.697 17.852 22 14.32 22 10C22 5.589 17.514 2 12 2ZM12 16H11.667L9 18V15.583L8.359 15.336C5.67 14.301 4 12.256 4 10C4 6.691 7.589 4 12 4C16.411 4 20 6.691 20 10C20 13.309 16.411 16 12 16Z" })),
47
+ commentFilled: ((0, jsx_runtime_1.jsx)("path", { d: "M10 0C4.486 0 0 3.589 0 8C0 10.908 1.898 13.516 5 14.934V20L10.34 15.995C15.697 15.852 20 12.32 20 8C20 3.589 15.514 0 10 0Z" })),
47
48
  plus: (0, jsx_runtime_1.jsx)("path", { d: "M19 11H13V5H11V11H5V13H11V19H13V13H19V11Z" }),
48
49
  minus: (0, jsx_runtime_1.jsx)("rect", { x: "6", y: "11", width: "12", height: "2" }),
49
50
  pencil: ((0, jsx_runtime_1.jsx)("path", { d: "M4.0031 21.0001C4.0841 21.0001 4.1651 20.9901 4.2451 20.9701L8.2451 19.9701C8.4211 19.9261 8.5821 19.8351 8.7101 19.7071L21.0031 7.41411C21.3811 7.03611 21.5891 6.53411 21.5891 6.00011C21.5891 5.46611 21.3811 4.96411 21.0031 4.58611L19.4171 3.00011C18.6611 2.24411 17.3451 2.24411 16.5891 3.00011L4.2961 15.2931C4.1681 15.4211 4.0771 15.5821 4.0331 15.7571L3.0331 19.7571C2.9471 20.0981 3.0481 20.4581 3.2961 20.7071C3.4851 20.8971 3.7411 21.0001 4.0031 21.0001ZM18.0031 4.41411L19.5891 6.00011L18.0031 7.58611L16.4171 6.00011L18.0031 4.41411ZM5.9061 16.5111L15.0031 7.41411L16.5891 9.00011L7.4911 18.0971L5.3771 18.6251L5.9061 16.5111Z" })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.370.1",
3
+ "version": "2.370.2",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",