ublo-lib 1.36.3 → 1.36.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.
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  type Props = {
2
3
  item: {
3
4
  name: string;
@@ -9,6 +10,6 @@ type Props = {
9
10
  showLabel?: boolean;
10
11
  compact?: boolean;
11
12
  };
12
- export default function AccountButton({ item, className, showLabel, compact, }: Props): import("react/jsx-runtime").JSX.Element;
13
- export {};
13
+ declare const AccountButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
14
+ export default AccountButton;
14
15
  //# sourceMappingURL=account-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"account-button.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/account-button/account-button.tsx"],"names":[],"mappings":"AAOA,KAAK,KAAK,GAAG;IACX,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,SAAS,EACT,SAAS,EACT,OAAO,GACR,EAAE,KAAK,2CA0BP"}
1
+ {"version":3,"file":"account-button.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/account-button/account-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,KAAK,KAAK,GAAG;IACX,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,aAAa,iFA+BlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,13 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
2
3
  import classNames from "classnames";
3
4
  import Link from "ublo/link";
4
5
  import Button from "dt-design-system/es/button";
5
6
  import * as Icons from "dt-design-system/es/icons";
6
7
  import styles from "./account-button.module.css";
7
- export default function AccountButton({ item, className, showLabel, compact, }) {
8
+ const AccountButton = React.forwardRef((props, ref) => {
9
+ const { item, className, showLabel = true, compact = false } = props;
8
10
  const { name, path, shortTitle, title } = item;
9
11
  const classes = classNames(styles.button, className, {
10
12
  [styles.compact]: compact,
11
13
  });
12
- return (_jsxs(Button, { href: path, tag: Link, variant: "transparent", className: classes, "aria-label": shortTitle || title, compact: compact, children: [_jsx(Icons.User, { className: styles.icon }), showLabel && (_jsx("span", { className: styles.label, dangerouslySetInnerHTML: { __html: shortTitle || title } }))] }, name));
13
- }
14
+ return (_jsxs(Button, { href: path, tag: Link, variant: "transparent", className: classes, "aria-label": shortTitle || title, compact: compact, ref: ref, ...props, children: [_jsx(Icons.User, { className: styles.icon }), showLabel && (_jsx("span", { className: styles.label, dangerouslySetInnerHTML: { __html: shortTitle || title } }))] }, name));
15
+ });
16
+ export default AccountButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.36.3",
3
+ "version": "1.36.5",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.9.9",
6
6
  "leaflet": "^1.9.1",