ublo-lib 1.30.1 → 1.30.3

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.
@@ -5,13 +5,13 @@ import { loadJS } from "../utils/load-js";
5
5
  export default function useAccount({
6
6
  channel = "ESF",
7
7
  integration
8
- }) {
8
+ } = {}) {
9
9
  const {
10
10
  lang
11
11
  } = useUbloContext();
12
12
  const widgetLang = React.useMemo(() => lang === "fr" ? "fr" : "en", [lang]);
13
13
  React.useEffect(() => {
14
- const startTunnel = async () => {
14
+ const startAccount = async () => {
15
15
  await loadWigetMseM(integration);
16
16
  window.MseM.onLoad(() => {
17
17
  window.MseM.customerAccount({
@@ -22,7 +22,7 @@ export default function useAccount({
22
22
  });
23
23
  });
24
24
  };
25
- startTunnel();
25
+ startAccount();
26
26
  }, [channel, integration, widgetLang]);
27
27
  }
28
28
  async function loadWigetMseM(integration) {
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import classNames from "classnames";
2
3
  import Link from "ublo/link";
3
4
  import Button from "dt-design-system/es/button";
4
5
  import * as Icons from "dt-design-system/es/icons";
@@ -7,6 +8,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
9
  export default function AccountButton({
9
10
  item,
11
+ className,
10
12
  showLabel,
11
13
  compact
12
14
  }) {
@@ -16,11 +18,14 @@ export default function AccountButton({
16
18
  shortTitle,
17
19
  title
18
20
  } = item;
21
+ const classes = classNames(styles.button, className, {
22
+ [styles.compact]: compact
23
+ });
19
24
  return _jsxs(Button, {
20
25
  href: path,
21
26
  tag: Link,
22
27
  variant: "transparent",
23
- className: styles.button,
28
+ className: classes,
24
29
  "aria-label": shortTitle || title,
25
30
  compact: compact,
26
31
  children: [_jsx(Icons.User, {
@@ -1,3 +1,12 @@
1
1
  a.button {
2
+ align-self: center;
2
3
  color: inherit;
3
4
  }
5
+
6
+ .icon {
7
+ --size: 24px;
8
+ }
9
+
10
+ a.compact .icon {
11
+ --size: 15px;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.30.1",
3
+ "version": "1.30.3",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.8.3",
6
6
  "leaflet": "^1.9.1",