@vectara/vectara-ui 15.6.2 → 15.6.5

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.
@@ -45,10 +45,10 @@ export const VuiModal = (_a) => {
45
45
  }, 0);
46
46
  };
47
47
  const classes = classNames("vuiModal", `vuiModal--${color}`, `vuiModal--${size}`, className);
48
- return (_jsx(VuiPortal, { children: isOpen && (_jsx(VuiScreenBlock, { children: _jsx(FocusOn, Object.assign({ onEscapeKey: onCloseDelayed, onClickOutside: canClickOutsideToClose ? onCloseDelayed : undefined,
48
+ return (_jsx(VuiPortal, { children: isOpen && (_jsx(VuiScreenBlock, Object.assign({ type: "modal" }, { children: _jsx(FocusOn, Object.assign({ onEscapeKey: onCloseDelayed, onClickOutside: canClickOutsideToClose ? onCloseDelayed : undefined,
49
49
  // Enable manual focus return to work.
50
50
  returnFocus: false,
51
51
  // Enable focus on contents when it's open,
52
52
  // but enable manual focus return to work when it's closed.
53
- autoFocus: isOpen }, { children: _jsx("div", Object.assign({ className: "vuiModalContainer" }, getOverlayProps("modalTitle"), { children: _jsxs("div", Object.assign({ className: classes }, rest, { children: [_jsx("div", Object.assign({ className: "vuiModalHeader" }, { children: _jsxs(VuiFlexContainer, Object.assign({ justifyContent: "spaceBetween", alignItems: "center" }, { children: [_jsx(VuiFlexItem, Object.assign({ grow: false }, { children: _jsxs(VuiFlexContainer, Object.assign({ alignItems: "center", spacing: "xs" }, { children: [icon && (_jsx(VuiFlexItem, Object.assign({ grow: false, shrink: false }, { children: _jsx(VuiIcon, Object.assign({ size: "l" }, { children: icon })) }))), _jsx(VuiFlexItem, Object.assign({ grow: false }, { children: _jsx("div", Object.assign({ className: "vuiModalHeader__title" }, { children: _jsx(DrawerTitle, Object.assign({ id: "modalTitle" }, { children: title })) })) }))] })) })), onClose && (_jsx(VuiFlexItem, { children: _jsx(VuiIconButton, { "aria-label": "Close", "data-testid": "modalCloseButton", onClick: onCloseDelayed, color: "neutral", icon: _jsx(VuiIcon, Object.assign({ size: "m", color: "neutral" }, { children: _jsx(BiX, {}) })) }) }))] })) })), _jsx("div", Object.assign({ className: "vuiModalContent" }, { children: _jsx("div", Object.assign({ className: "vuiModalContent__inner" }, { children: children })) }))] })) })) })) }, key)) }));
53
+ autoFocus: isOpen }, { children: _jsx("div", Object.assign({ className: "vuiModalContainer" }, getOverlayProps("modalTitle"), { children: _jsxs("div", Object.assign({ className: classes }, rest, { children: [_jsx("div", Object.assign({ className: "vuiModalHeader" }, { children: _jsxs(VuiFlexContainer, Object.assign({ justifyContent: "spaceBetween", alignItems: "center" }, { children: [_jsx(VuiFlexItem, Object.assign({ grow: false }, { children: _jsxs(VuiFlexContainer, Object.assign({ alignItems: "center", spacing: "xs" }, { children: [icon && (_jsx(VuiFlexItem, Object.assign({ grow: false, shrink: false }, { children: _jsx(VuiIcon, Object.assign({ size: "l" }, { children: icon })) }))), _jsx(VuiFlexItem, Object.assign({ grow: false }, { children: _jsx("div", Object.assign({ className: "vuiModalHeader__title" }, { children: _jsx(DrawerTitle, Object.assign({ id: "modalTitle" }, { children: title })) })) }))] })) })), onClose && (_jsx(VuiFlexItem, { children: _jsx(VuiIconButton, { "aria-label": "Close", "data-testid": "modalCloseButton", onClick: onCloseDelayed, color: "neutral", icon: _jsx(VuiIcon, Object.assign({ size: "m", color: "neutral" }, { children: _jsx(BiX, {}) })) }) }))] })) })), _jsx("div", Object.assign({ className: "vuiModalContent" }, { children: _jsx("div", Object.assign({ className: "vuiModalContent__inner" }, { children: children })) }))] })) })) })) }), key)) }));
54
54
  };
@@ -2,6 +2,7 @@ type Props = {
2
2
  onClick?: () => void;
3
3
  children: React.ReactNode;
4
4
  color?: "neutral" | "primary" | "danger" | "success";
5
+ type?: "default" | "modal";
5
6
  };
6
- export declare const VuiScreenBlock: ({ onClick, children, color }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const VuiScreenBlock: ({ onClick, children, color, type }: Props) => import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import classNames from "classnames";
3
- export const VuiScreenBlock = ({ onClick, children, color = "neutral" }) => {
4
- const classes = classNames("vuiScreenBlock", `vuiScreenBlock--${color}`);
3
+ export const VuiScreenBlock = ({ onClick, children, color = "neutral", type = "default" }) => {
4
+ const classes = classNames("vuiScreenBlock", `vuiScreenBlock--${color}`, `vuiScreenBlock--${type}`);
5
5
  return (_jsxs("div", Object.assign({ className: classes }, { children: [children, _jsx("div", { className: "vuiScreenBlock__mask", onClick: onClick })] })));
6
6
  };
@@ -4,12 +4,19 @@
4
4
  left: 0;
5
5
  right: 0;
6
6
  bottom: 0;
7
- z-index: $screenBlockZIndex;
8
7
  display: flex;
9
8
  align-items: center;
10
9
  justify-content: center;
11
10
  }
12
11
 
12
+ .vuiScreenBlock--default {
13
+ z-index: $screenBlockZIndex;
14
+ }
15
+
16
+ .vuiScreenBlock--modal {
17
+ z-index: $modalZIndex;
18
+ }
19
+
13
20
  .vuiScreenBlock__mask {
14
21
  width: 100%;
15
22
  height: 100%;
@@ -4493,12 +4493,19 @@ h2.react-datepicker__current-month {
4493
4493
  left: 0;
4494
4494
  right: 0;
4495
4495
  bottom: 0;
4496
- z-index: 10;
4497
4496
  display: flex;
4498
4497
  align-items: center;
4499
4498
  justify-content: center;
4500
4499
  }
4501
4500
 
4501
+ .vuiScreenBlock--default {
4502
+ z-index: 10;
4503
+ }
4504
+
4505
+ .vuiScreenBlock--modal {
4506
+ z-index: 12;
4507
+ }
4508
+
4502
4509
  .vuiScreenBlock__mask {
4503
4510
  width: 100%;
4504
4511
  height: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectara/vectara-ui",
3
- "version": "15.6.2",
3
+ "version": "15.6.5",
4
4
  "homepage": "./",
5
5
  "description": "Vectara's design system, codified as a React and Sass component library",
6
6
  "author": "Vectara",