@homebound/beam 2.220.0 → 2.222.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.
@@ -10,6 +10,7 @@ const PresentationContext_1 = require("./PresentationContext");
10
10
  const SnackbarContext_1 = require("./Snackbar/SnackbarContext");
11
11
  const SuperDrawer_1 = require("./SuperDrawer/SuperDrawer");
12
12
  const index_1 = require("../utils/index");
13
+ const ToastContext_1 = require("./Toast/ToastContext");
13
14
  /** This is only exported internally, for useModal and useSuperDrawer, it's not a public API. */
14
15
  exports.BeamContext = (0, react_1.createContext)({
15
16
  modalState: new index_1.EmptyRef(),
@@ -59,7 +60,7 @@ function BeamProvider({ children, ...presentationProps }) {
59
60
  sdHeaderDiv,
60
61
  };
61
62
  }, [modalBodyDiv, modalFooterDiv]);
62
- return ((0, jsx_runtime_1.jsx)(exports.BeamContext.Provider, Object.assign({ value: { ...context } }, { children: (0, jsx_runtime_1.jsx)(PresentationContext_1.PresentationProvider, Object.assign({}, presentationProps, { children: (0, jsx_runtime_1.jsx)(form_state_1.AutoSaveStatusProvider, { children: (0, jsx_runtime_1.jsxs)(SnackbarContext_1.SnackbarProvider, { children: [(0, jsx_runtime_1.jsxs)(react_aria_1.OverlayProvider, { children: [children, modalRef.current && (0, jsx_runtime_1.jsx)(Modal_1.Modal, Object.assign({}, modalRef.current), void 0)] }, void 0), (0, jsx_runtime_1.jsx)(SuperDrawer_1.SuperDrawer, {}, void 0)] }, void 0) }, void 0) }), void 0) }), void 0));
63
+ return ((0, jsx_runtime_1.jsx)(exports.BeamContext.Provider, Object.assign({ value: { ...context } }, { children: (0, jsx_runtime_1.jsx)(PresentationContext_1.PresentationProvider, Object.assign({}, presentationProps, { children: (0, jsx_runtime_1.jsx)(form_state_1.AutoSaveStatusProvider, { children: (0, jsx_runtime_1.jsxs)(SnackbarContext_1.SnackbarProvider, { children: [(0, jsx_runtime_1.jsx)(ToastContext_1.ToastProvider, { children: (0, jsx_runtime_1.jsxs)(react_aria_1.OverlayProvider, { children: [children, modalRef.current && (0, jsx_runtime_1.jsx)(Modal_1.Modal, Object.assign({}, modalRef.current), void 0)] }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(SuperDrawer_1.SuperDrawer, {}, void 0)] }, void 0) }, void 0) }), void 0) }), void 0));
63
64
  }
64
65
  exports.BeamProvider = BeamProvider;
65
66
  /** Looks like a ref, but invokes a re-render on set (w/o changing the setter identity). */
@@ -3,6 +3,7 @@ import { OverlayTriggerProps } from "./internal/OverlayTrigger";
3
3
  interface ButtonMenuProps extends Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip" | "showActiveBorder"> {
4
4
  items: MenuItem[];
5
5
  persistentItems?: MenuItem[];
6
+ searchable?: boolean;
6
7
  defaultOpen?: boolean;
7
8
  }
8
9
  export declare function ButtonMenu(props: ButtonMenuProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -9,11 +9,11 @@ const Menu_1 = require("./internal/Menu");
9
9
  const OverlayTrigger_1 = require("./internal/OverlayTrigger");
10
10
  const utils_1 = require("../utils");
11
11
  function ButtonMenu(props) {
12
- const { defaultOpen, disabled, items, persistentItems, trigger } = props;
12
+ const { defaultOpen, disabled, items, persistentItems, trigger, searchable } = props;
13
13
  const state = (0, react_stately_1.useMenuTriggerState)({ isOpen: defaultOpen });
14
14
  const buttonRef = (0, react_1.useRef)(null);
15
15
  const { menuTriggerProps, menuProps } = (0, react_aria_1.useMenuTrigger)({ isDisabled: !!disabled }, state, buttonRef);
16
16
  const tid = (0, utils_1.useTestIds)(props, (0, OverlayTrigger_1.isTextButton)(trigger) ? trigger.label : (0, OverlayTrigger_1.isIconButton)(trigger) ? trigger.icon : trigger.name);
17
- return ((0, jsx_runtime_1.jsx)(OverlayTrigger_1.OverlayTrigger, Object.assign({}, props, { menuTriggerProps: menuTriggerProps, state: state, buttonRef: buttonRef }, tid, { children: (0, jsx_runtime_1.jsx)(Menu_1.Menu, Object.assign({ ariaMenuProps: menuProps, onClose: () => state.close(), items: items, persistentItems: persistentItems }, tid), void 0) }), void 0));
17
+ return ((0, jsx_runtime_1.jsx)(OverlayTrigger_1.OverlayTrigger, Object.assign({}, props, { menuTriggerProps: menuTriggerProps, state: state, buttonRef: buttonRef }, tid, { children: (0, jsx_runtime_1.jsx)(Menu_1.Menu, Object.assign({ ariaMenuProps: menuProps, onClose: () => state.close(), items: items, persistentItems: persistentItems, searchable: searchable }, tid), void 0) }), void 0));
18
18
  }
19
19
  exports.ButtonMenu = ButtonMenu;
@@ -0,0 +1,2 @@
1
+ export declare function Toast(): import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare type ToastTypes = "error" | "warning" | "success" | "info" | "alert";
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Toast = void 0;
4
+ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
5
+ const Icon_1 = require("../Icon");
6
+ const Css_1 = require("../../Css");
7
+ const utils_1 = require("../../utils");
8
+ const IconButton_1 = require("../IconButton");
9
+ const ToastContext_1 = require("./ToastContext");
10
+ function Toast() {
11
+ const { setNotice, notice } = (0, ToastContext_1.useToastContext)();
12
+ const tid = (0, utils_1.useTestIds)({}, "toast");
13
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: notice && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: { ...variantStyles[notice.type], ...Css_1.Css.df.aic.w100.gap1.p2.gray900.base.bshBasic.$ } }, tid, { role: "alert" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ css: Css_1.Css.fs0.$ }, { children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, Object.assign({ icon: typeToIcon[notice.type] }, tid.type, { color: Css_1.Palette.Gray900 }), void 0) }), void 0), (0, jsx_runtime_1.jsx)("span", Object.assign({ css: Css_1.Css.fg1.$ }, tid.message, { children: notice.message }), void 0), (0, jsx_runtime_1.jsx)("span", Object.assign({ css: Css_1.Css.lh(0).$ }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, Object.assign({ icon: "x", onClick: () => setNotice(undefined) }, tid.close, { color: Css_1.Palette.Gray900 }), void 0) }), void 0)] }), void 0)) }, void 0));
14
+ }
15
+ exports.Toast = Toast;
16
+ const typeToIcon = {
17
+ success: "checkCircle",
18
+ info: "infoCircle",
19
+ warning: "error",
20
+ alert: "errorCircle",
21
+ error: "xCircle",
22
+ };
23
+ const variantStyles = {
24
+ success: Css_1.Css.bgGreen100.gray900.$,
25
+ info: Css_1.Css.bgLightBlue100.gray900.$,
26
+ warning: Css_1.Css.bgYellow200.gray900.$,
27
+ alert: Css_1.Css.bgGray200.gray900.$,
28
+ error: Css_1.Css.bgRed100.gray900.$,
29
+ };
@@ -0,0 +1,13 @@
1
+ import React, { PropsWithChildren, ReactNode } from "react";
2
+ import { ToastTypes } from "./Toast";
3
+ export interface ToastNoticeProps {
4
+ type: ToastTypes;
5
+ message: ReactNode;
6
+ }
7
+ export declare type ToastContextProps = {
8
+ notice: ToastNoticeProps | undefined;
9
+ setNotice: React.Dispatch<React.SetStateAction<ToastNoticeProps | undefined>>;
10
+ };
11
+ export declare const ToastContext: React.Context<ToastContextProps>;
12
+ export declare function ToastProvider(props: PropsWithChildren<{}>): import("@emotion/react/jsx-runtime").JSX.Element;
13
+ export declare function useToastContext(): ToastContextProps;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useToastContext = exports.ToastProvider = exports.ToastContext = void 0;
4
+ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ exports.ToastContext = (0, react_1.createContext)({
7
+ setNotice: () => {
8
+ throw new Error("Missing ToastProvider");
9
+ },
10
+ notice: undefined,
11
+ });
12
+ function ToastProvider(props) {
13
+ const [notice, setNotice] = (0, react_1.useState)();
14
+ const contextValue = (0, react_1.useMemo)(() => ({ setNotice, notice }), [setNotice, notice]);
15
+ return (0, jsx_runtime_1.jsx)(exports.ToastContext.Provider, Object.assign({ value: contextValue }, { children: props.children }), void 0);
16
+ }
17
+ exports.ToastProvider = ToastProvider;
18
+ function useToastContext() {
19
+ return (0, react_1.useContext)(exports.ToastContext);
20
+ }
21
+ exports.useToastContext = useToastContext;
@@ -0,0 +1,5 @@
1
+ import { ToastNoticeProps } from "./ToastContext";
2
+ export interface UseToastProps {
3
+ showToast: (props: ToastNoticeProps) => void;
4
+ }
5
+ export declare function useToast(): UseToastProps;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useToast = void 0;
4
+ const react_1 = require("react");
5
+ const ToastContext_1 = require("./ToastContext");
6
+ function useToast() {
7
+ const { setNotice } = (0, ToastContext_1.useToastContext)();
8
+ const showToast = (0, react_1.useCallback)((props) => {
9
+ setNotice(props);
10
+ }, [setNotice]);
11
+ return { showToast };
12
+ }
13
+ exports.useToast = useToast;
@@ -5,7 +5,6 @@ export * from "./ToggleChip";
5
5
  export * from "./ToggleChips";
6
6
  export * from "./Accordion";
7
7
  export * from "./AccordionList";
8
- export * from "./Alert";
9
8
  export * from "./AutoSaveIndicator";
10
9
  export * from "./Avatar";
11
10
  export * from "./AvatarButton";
@@ -13,8 +12,8 @@ export { BeamProvider } from "./BeamContext";
13
12
  export * from "./Button";
14
13
  export * from "./ButtonDatePicker";
15
14
  export * from "./ButtonGroup";
16
- export * from "./ButtonModal";
17
15
  export * from "./ButtonMenu";
16
+ export * from "./ButtonModal";
18
17
  export * from "./Copy";
19
18
  export * from "./CssReset";
20
19
  export * from "./Filters";
@@ -36,4 +35,6 @@ export * from "./Table";
36
35
  export { TabContent, Tabs, TabsWithContent } from "./Tabs";
37
36
  export type { RouteTab, RouteTabWithContent, Tab, TabWithContent } from "./Tabs";
38
37
  export * from "./Tag";
38
+ export * from "./Toast/Toast";
39
+ export { useToast } from "./Toast/useToast";
39
40
  export * from "./Tooltip";
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.TabsWithContent = exports.Tabs = exports.TabContent = exports.PresentationProvider = exports.NavLink = exports.HB_QUIPS_MISSION = exports.HB_QUIPS_FLAVOR = exports.HbSpinnerProvider = exports.HbLoadingSpinner = exports.BeamProvider = void 0;
13
+ exports.useToast = exports.TabsWithContent = exports.Tabs = exports.TabContent = exports.PresentationProvider = exports.NavLink = exports.HB_QUIPS_MISSION = exports.HB_QUIPS_FLAVOR = exports.HbSpinnerProvider = exports.HbLoadingSpinner = exports.BeamProvider = void 0;
14
14
  __exportStar(require("./Chip"), exports);
15
15
  __exportStar(require("./Chips"), exports);
16
16
  __exportStar(require("./Table/GridTable"), exports);
@@ -18,7 +18,6 @@ __exportStar(require("./ToggleChip"), exports);
18
18
  __exportStar(require("./ToggleChips"), exports);
19
19
  __exportStar(require("./Accordion"), exports);
20
20
  __exportStar(require("./AccordionList"), exports);
21
- __exportStar(require("./Alert"), exports);
22
21
  __exportStar(require("./AutoSaveIndicator"), exports);
23
22
  __exportStar(require("./Avatar"), exports);
24
23
  __exportStar(require("./AvatarButton"), exports);
@@ -27,8 +26,8 @@ Object.defineProperty(exports, "BeamProvider", { enumerable: true, get: function
27
26
  __exportStar(require("./Button"), exports);
28
27
  __exportStar(require("./ButtonDatePicker"), exports);
29
28
  __exportStar(require("./ButtonGroup"), exports);
30
- __exportStar(require("./ButtonModal"), exports);
31
29
  __exportStar(require("./ButtonMenu"), exports);
30
+ __exportStar(require("./ButtonModal"), exports);
32
31
  __exportStar(require("./Copy"), exports);
33
32
  __exportStar(require("./CssReset"), exports);
34
33
  __exportStar(require("./Filters"), exports);
@@ -57,4 +56,7 @@ Object.defineProperty(exports, "TabContent", { enumerable: true, get: function (
57
56
  Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return Tabs_1.Tabs; } });
58
57
  Object.defineProperty(exports, "TabsWithContent", { enumerable: true, get: function () { return Tabs_1.TabsWithContent; } });
59
58
  __exportStar(require("./Tag"), exports);
59
+ __exportStar(require("./Toast/Toast"), exports);
60
+ var useToast_1 = require("./Toast/useToast");
61
+ Object.defineProperty(exports, "useToast", { enumerable: true, get: function () { return useToast_1.useToast; } });
60
62
  __exportStar(require("./Tooltip"), exports);
@@ -4,6 +4,7 @@ interface MenuProps<T> {
4
4
  ariaMenuProps: HTMLAttributes<HTMLElement>;
5
5
  onClose: VoidFunction;
6
6
  items: MenuItem[];
7
+ searchable?: boolean;
7
8
  persistentItems?: MenuItem[];
8
9
  }
9
10
  export declare function Menu<T>(props: PropsWithChildren<MenuProps<T>>): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -8,9 +8,10 @@ const react_aria_1 = require("react-aria");
8
8
  const react_stately_1 = require("react-stately");
9
9
  const MenuSection_1 = require("./MenuSection");
10
10
  const Css_1 = require("../../Css");
11
+ const MenuSearchField_1 = require("../../inputs/internal/MenuSearchField");
11
12
  const utils_1 = require("../../utils");
12
13
  function Menu(props) {
13
- const { ariaMenuProps, items, persistentItems, onClose } = props;
14
+ const { ariaMenuProps, items, persistentItems, onClose, searchable } = props;
14
15
  // Build out the Menu's Tree data to include the Persistent Action, if any. This is a collection of Nodes that is used
15
16
  // by React-Aria to keep track of item states such as focus, and provide hooks for calling those actions.
16
17
  const tree = (0, react_stately_1.useTreeData)({
@@ -18,20 +19,49 @@ function Menu(props) {
18
19
  getKey: (item) => (0, change_case_1.camelCase)(item.label),
19
20
  getChildren: (item) => { var _a; return (_a = item.items) !== null && _a !== void 0 ? _a : []; },
20
21
  });
22
+ const [search, setSearch] = (0, react_1.useState)(undefined);
23
+ let { contains } = (0, react_aria_1.useFilter)({
24
+ sensitivity: "base",
25
+ });
26
+ // Filter our tree data items based on the search term
27
+ const filteredTree = (0, react_1.useMemo)(() => {
28
+ const { items, ...others } = tree;
29
+ const [itemsSection, persistentSection] = items;
30
+ if (search) {
31
+ const filteredChildren = itemsSection.children.filter((item) => contains(item.value.label, search));
32
+ const { items, ...otherValues } = itemsSection.value;
33
+ const filteredValue = items === null || items === void 0 ? void 0 : items.filter((item) => contains(item.label, search));
34
+ return {
35
+ ...others,
36
+ items: [
37
+ { ...itemsSection, value: { ...otherValues, children: filteredChildren, items: filteredValue } },
38
+ persistentSection,
39
+ ],
40
+ };
41
+ }
42
+ else {
43
+ return tree;
44
+ }
45
+ }, [tree, search, contains]);
21
46
  const menuChildren = (0, react_1.useMemo)(() => {
22
- return tree.items.map(({ value: s }) => ((0, jsx_runtime_1.jsx)(react_stately_1.Section, Object.assign({ title: s.label, items: s.items }, { children: (item) => (0, jsx_runtime_1.jsx)(react_stately_1.Item, { children: item.label }, item.label.replace(/"/g, "")) }), s.label.replace(/"/g, ""))));
23
- }, [tree]);
24
- const state = (0, react_stately_1.useTreeState)({ children: menuChildren, items: tree.items.map((i) => i.value), selectionMode: "none" });
47
+ return filteredTree.items.map(({ value: s }) => ((0, jsx_runtime_1.jsx)(react_stately_1.Section, Object.assign({ title: s.label, items: s.items }, { children: (item) => (0, jsx_runtime_1.jsx)(react_stately_1.Item, { children: item.label }, item.label.replace(/"/g, "")) }), s.label.replace(/"/g, ""))));
48
+ }, [filteredTree]);
49
+ const state = (0, react_stately_1.useTreeState)({
50
+ children: menuChildren,
51
+ items: filteredTree.items.map((i) => i.value),
52
+ selectionMode: "none",
53
+ });
25
54
  const menuRef = (0, react_1.useRef)(null);
26
- const { menuProps } = (0, react_aria_1.useMenu)({ ...ariaMenuProps, autoFocus: true }, state, menuRef);
55
+ const { menuProps } = (0, react_aria_1.useMenu)({ ...ariaMenuProps, autoFocus: searchable ? false : true }, state, menuRef);
27
56
  const tid = (0, utils_1.useTestIds)(props);
28
57
  // Bulk updates of MenuItems below. If we find this to be of sluggish performance, then we can change to be more surgical in our updating.
29
58
  // If our list of items change, update the "items" menu section. (key is based on label in `getKey` above)
30
- (0, react_1.useEffect)(() => tree.update("items", { label: "items", items }), [items]);
31
- return ((0, jsx_runtime_1.jsx)(react_aria_1.FocusScope, { children: (0, jsx_runtime_1.jsx)("ul", Object.assign({ css: {
32
- // Using `max-height: inherit` allows us to take advantage of the height set on the overlay container, which updates based on the available space for the overlay within the viewport
33
- ...Css_1.Css.df.fdc.myPx(4).bgWhite.outline0.br4.bshBasic.listReset.maxh("inherit").overflowAuto.$,
34
- "&:hover, &:focus": Css_1.Css.bshHover.$,
35
- } }, menuProps, { ref: menuRef }, tid.menu, { children: [...state.collection].map((item) => ((0, jsx_runtime_1.jsx)(MenuSection_1.MenuSectionImpl, Object.assign({ section: item, state: state, onClose: onClose }, tid), item.key))) }), void 0) }, void 0));
59
+ (0, react_1.useEffect)(() => filteredTree.update("items", { label: "items", items }), [items]);
60
+ return ((0, jsx_runtime_1.jsx)(react_aria_1.FocusScope, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({
61
+ // Using `max-height: inherit` allows us to take advantage of the height set on the overlay container, which updates based on the available space for the overlay within the viewport
62
+ css: {
63
+ ...Css_1.Css.df.fdc.myPx(4).bgWhite.outline0.br4.bshBasic.maxh("inherit").overflowAuto.$,
64
+ "&:hover": Css_1.Css.bshHover.$,
65
+ } }, { children: [searchable && ((0, jsx_runtime_1.jsx)(MenuSearchField_1.MenuSearchField, Object.assign({ label: "", value: search, placeholder: "Search...", inlineLabel: true, onChange: setSearch }, tid), void 0)), (0, jsx_runtime_1.jsx)("ul", Object.assign({ css: Css_1.Css.listReset.$ }, menuProps, { ref: menuRef }, tid.menu, { children: [...state.collection].map((item) => ((0, jsx_runtime_1.jsx)(MenuSection_1.MenuSectionImpl, Object.assign({ section: item, state: state, onClose: onClose }, tid), item.key))) }), void 0)] }), void 0) }, void 0));
36
66
  }
37
67
  exports.Menu = Menu;
@@ -0,0 +1,7 @@
1
+ import { Only } from "../../Css";
2
+ import { BeamTextFieldProps, TextFieldXss } from "../../interfaces";
3
+ interface TextFieldProps<X> extends BeamTextFieldProps<X> {
4
+ inlineLabel: boolean;
5
+ }
6
+ export declare function MenuSearchField<X extends Only<TextFieldXss, X>>(props: TextFieldProps<X>): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MenuSearchField = void 0;
4
+ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
5
+ const textfield_1 = require("@react-aria/textfield");
6
+ const react_1 = require("react");
7
+ const components_1 = require("../../components");
8
+ const utils_1 = require("../../utils");
9
+ const TextFieldBase_1 = require("../TextFieldBase");
10
+ function MenuSearchField(props) {
11
+ const tid = (0, utils_1.useTestIds)(props);
12
+ const inputRef = (0, react_1.useRef)(null);
13
+ const { labelProps, inputProps } = (0, textfield_1.useTextField)({ ...props }, inputRef);
14
+ return ((0, jsx_runtime_1.jsx)(TextFieldBase_1.TextFieldBase, Object.assign({ label: "", labelProps: labelProps, inputProps: inputProps, startAdornment: (0, jsx_runtime_1.jsx)(components_1.Icon, { icon: "search" }, void 0) }, tid.search), void 0));
15
+ }
16
+ exports.MenuSearchField = MenuSearchField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.220.0",
3
+ "version": "2.222.0",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -1,6 +0,0 @@
1
- import { ReactNode } from "react";
2
- export interface AlertProps {
3
- children: ReactNode;
4
- onClose: () => void;
5
- }
6
- export declare function Alert(props: AlertProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Alert = void 0;
4
- const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
5
- const IconButton_1 = require("./IconButton");
6
- const Css_1 = require("../Css");
7
- function Alert(props) {
8
- const { children, onClose } = props;
9
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: Css_1.Css.df.aifs.jcsb.bgRed100.ba.bRed400.red700.p2.br4.$, role: "alert" }, { children: [(0, jsx_runtime_1.jsx)("div", { children: children }, void 0), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { icon: "x", color: Css_1.Palette.Red700, onClick: onClose }, void 0)] }), void 0));
10
- }
11
- exports.Alert = Alert;