@vectara/vectara-ui 16.5.0 → 16.5.1

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.
@@ -1,5 +1,5 @@
1
1
  import { TreeItem } from "../types";
2
2
  export declare const VuiAppSideNavLink: import("react").ForwardRefExoticComponent<Pick<TreeItem, "className" | "path" | "name" | "isSelected" | "iconBefore" | "iconAfter"> & {
3
- onClick?: import("react").MouseEventHandler<HTMLAnchorElement> | undefined;
3
+ onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
4
4
  iconAfterAlignEnd?: boolean | undefined;
5
- } & import("react").RefAttributes<HTMLAnchorElement | null>>;
5
+ } & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
@@ -23,5 +23,8 @@ export const VuiAppSideNavLink = forwardRef((_a, ref) => {
23
23
  "vuiAppSideNavLink--active": isSelected !== null && isSelected !== void 0 ? isSelected : path === getPath()
24
24
  }, className);
25
25
  const content = iconBefore || iconAfter ? (_jsxs(VuiFlexContainer, Object.assign({ alignItems: "center", spacing: "xxs" }, { children: [iconBefore && (_jsx(VuiFlexItem, Object.assign({ grow: false, shrink: false }, { children: _jsx(VuiIcon, Object.assign({ size: "s" }, { children: iconBefore })) }))), _jsx(VuiFlexItem, Object.assign({ grow: false, shrink: false }, { children: name })), iconAfter && (_jsx(VuiFlexItem, Object.assign({ grow: false, shrink: false, className: iconAfterAlignEnd ? "vuiAppSideNavLink__iconAfter--alignEnd" : undefined }, { children: _jsx(VuiIcon, Object.assign({ size: "s" }, { children: iconAfter })) })))] }))) : (name);
26
- return createLink(Object.assign({ ref, className: classes, children: content, href: path, onClick }, rest));
26
+ if (!path) {
27
+ return (_jsx("button", Object.assign({ className: classes, onClick: onClick, type: "button", ref: ref }, rest, { children: content })));
28
+ }
29
+ return createLink(Object.assign({ ref: ref, className: classes, children: content, href: path, onClick }, rest));
27
30
  });
@@ -61,6 +61,7 @@
61
61
  line-height: 1.1;
62
62
  border-top: 1px solid var(--vui-color-empty-shade);
63
63
  border-bottom: 1px solid var(--vui-color-empty-shade);
64
+ width: 100%;
64
65
 
65
66
  &:hover {
66
67
  background-color: var(--vui-color-light-shade);
@@ -472,6 +472,7 @@ fieldset {
472
472
  line-height: 1.1;
473
473
  border-top: 1px solid var(--vui-color-empty-shade);
474
474
  border-bottom: 1px solid var(--vui-color-empty-shade);
475
+ width: 100%;
475
476
  }
476
477
  .vuiAppSideNavLink:hover {
477
478
  background-color: var(--vui-color-light-shade);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectara/vectara-ui",
3
- "version": "16.5.0",
3
+ "version": "16.5.1",
4
4
  "homepage": "./",
5
5
  "description": "Vectara's design system, codified as a React and Sass component library",
6
6
  "author": "Vectara",