@vectara/vectara-ui 14.1.3 → 14.2.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.
@@ -6,8 +6,9 @@ type Props = {
6
6
  setIsOpen: (isOpen: boolean) => void;
7
7
  headerSize?: (typeof TEXT_SIZE)[number];
8
8
  padding?: "m" | "none";
9
+ bodyPadding?: "m" | "none";
9
10
  frame?: boolean;
10
11
  append?: React.ReactNode;
11
12
  };
12
- export declare const VuiAccordion: ({ header, children, isOpen, setIsOpen, headerSize, padding, frame, append, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const VuiAccordion: ({ header, children, isOpen, setIsOpen, headerSize, padding, bodyPadding, frame, append, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
13
14
  export {};
@@ -18,7 +18,7 @@ import { VuiIcon } from "../icon/Icon";
18
18
  import { VuiText } from "../typography/Text";
19
19
  import { createId } from "../../utils/createId";
20
20
  export const VuiAccordion = (_a) => {
21
- var { header, children, isOpen, setIsOpen, headerSize, padding = "m", frame = true, append } = _a, rest = __rest(_a, ["header", "children", "isOpen", "setIsOpen", "headerSize", "padding", "frame", "append"]);
21
+ var { header, children, isOpen, setIsOpen, headerSize, padding = "m", bodyPadding = "m", frame = true, append } = _a, rest = __rest(_a, ["header", "children", "isOpen", "setIsOpen", "headerSize", "padding", "bodyPadding", "frame", "append"]);
22
22
  const buttonId = createId();
23
23
  const contentId = createId();
24
24
  const headerClasses = classNames("vuiAccordionHeader", {
@@ -27,7 +27,7 @@ export const VuiAccordion = (_a) => {
27
27
  "vuiAccordionHeader--noFrame": !frame || append
28
28
  });
29
29
  const bodyClasses = classNames("vuiAccordionBody", {
30
- "vuiAccordionBody--paddingNone": padding === "none",
30
+ "vuiAccordionBody--paddingNone": padding === "none" || bodyPadding === "none",
31
31
  "vuiAccordionBody--noFrame": !frame
32
32
  });
33
33
  const button = (_jsx("button", Object.assign({ className: headerClasses, onClick: () => setIsOpen(!isOpen), id: buttonId, "aria-controls": contentId, "aria-expanded": isOpen, type: "button" }, rest, { children: _jsxs(VuiFlexContainer, Object.assign({ alignItems: "center", justifyContent: "start", spacing: "xxs" }, { children: [_jsx(VuiFlexItem, Object.assign({ grow: false, shrink: false }, { children: _jsx(VuiIcon, Object.assign({ size: "m", color: "neutral" }, { children: isOpen ? _jsx(BiChevronDown, {}) : _jsx(BiChevronRight, {}) })) })), _jsx(VuiFlexItem, Object.assign({ className: "vuiAccordionHeader__title", grow: 1 }, { children: _jsx(VuiText, Object.assign({ size: headerSize }, { children: header })) }))] })) })));
@@ -19,6 +19,8 @@
19
19
  max-height: inherit;
20
20
  background-color: var(--vui-color-light-shade) !important;
21
21
  border-radius: $sizeXxs;
22
+ // Ensure scrolling in case prism doesn't apply the correct styles.
23
+ overflow: auto;
22
24
  }
23
25
 
24
26
  .vuiCode {
@@ -1500,6 +1500,7 @@ fieldset {
1500
1500
  max-height: inherit;
1501
1501
  background-color: var(--vui-color-light-shade) !important;
1502
1502
  border-radius: 4px;
1503
+ overflow: auto;
1503
1504
  }
1504
1505
 
1505
1506
  .vuiCode {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectara/vectara-ui",
3
- "version": "14.1.3",
3
+ "version": "14.2.0",
4
4
  "homepage": "./",
5
5
  "description": "Vectara's design system, codified as a React and Sass component library",
6
6
  "author": "Vectara",