@altinn/altinn-components 0.43.3 → 0.43.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 +1 @@
1
- ._label_ggqvo_1{flex-grow:1;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 .125rem;font-size:1rem;column-gap:.5em;pointer-events:none}._title_ggqvo_13{color:var(--ds-color-text-default);display:inline;vertical-align:text-top}._titleWrapper_ggqvo_19{display:inline;line-height:1.25}._count_ggqvo_24{margin-left:.5rem;display:inline;font-size:smaller;white-space:nowrap}._radio_ggqvo_31,._checkbox_ggqvo_32{flex-shrink:0;flex-grow:0;position:relative;width:1.25em;height:1.25em;display:flex;align-items:center;justify-content:center;color:transparent}._radio_ggqvo_31{border:1px solid;border-color:var(--ds-color-border-subtle);outline:var(--ds-color-border-subtle) solid 1px;border-radius:50%}._checkbox_ggqvo_32{border:2px solid;border-color:var(--ds-color-border-subtle);border-radius:2px}._radio_ggqvo_31[data-checked=true],._checkbox_ggqvo_32[data-checked=true]{background-color:var(--ds-color-base-default);border:none;outline-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._icon_ggqvo_65{font-size:1.25em}@supports (-webkit-hyphens: none){._icon_ggqvo_65{font-size:unset;width:1.25em;height:1.25em}._icon_ggqvo_65 svg,._icon_ggqvo_65 img{width:100%;height:100%}}
1
+ ._label_xjlhn_1{flex-grow:1;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 .125rem;font-size:1rem;column-gap:.5em;pointer-events:none;word-break:normal;white-space:normal;overflow-wrap:normal}._title_xjlhn_16{color:var(--ds-color-text-default);display:inline;vertical-align:text-top}._titleWrapper_xjlhn_22{display:inline;line-height:1.25}._count_xjlhn_27{margin-left:.5rem;display:inline;font-size:smaller;white-space:nowrap}._radio_xjlhn_34,._checkbox_xjlhn_35{flex-shrink:0;flex-grow:0;position:relative;width:1.25em;height:1.25em;display:flex;align-items:center;justify-content:center;color:transparent}._radio_xjlhn_34{border:1px solid;border-color:var(--ds-color-border-subtle);outline:var(--ds-color-border-subtle) solid 1px;border-radius:50%}._checkbox_xjlhn_35{border:2px solid;border-color:var(--ds-color-border-subtle);border-radius:2px}._radio_xjlhn_34[data-checked=true],._checkbox_xjlhn_35[data-checked=true]{background-color:var(--ds-color-base-default);border:none;outline-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._icon_xjlhn_68{font-size:1.25em}@supports (-webkit-hyphens: none){._icon_xjlhn_68{font-size:unset;width:1.25em;height:1.25em}._icon_xjlhn_68 svg,._icon_xjlhn_68 img{width:100%;height:100%}}
@@ -1,85 +1,85 @@
1
- import { jsx as a, jsxs as r } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
4
  import "../RootProvider/RootProvider.js";
5
- import { MenuItem as m } from "./MenuItem.js";
5
+ import { MenuItem as p } from "./MenuItem.js";
6
6
  import "../Snackbar/useSnackbar.js";
7
- import { S as _ } from "../../Checkmark-Byz_C9x4.js";
8
- import '../../assets/MenuOption.css';const b = "_label_ggqvo_1", x = "_title_ggqvo_13", q = "_titleWrapper_ggqvo_19", f = "_count_ggqvo_24", k = "_radio_ggqvo_31", W = "_checkbox_ggqvo_32", I = "_icon_ggqvo_65", e = {
9
- label: b,
10
- title: x,
11
- titleWrapper: q,
12
- count: f,
13
- radio: k,
14
- checkbox: W,
15
- icon: I
7
+ import { S as m } from "../../Checkmark-Byz_C9x4.js";
8
+ import '../../assets/MenuOption.css';const j = "_label_xjlhn_1", f = "_title_xjlhn_16", k = "_titleWrapper_xjlhn_22", v = "_count_xjlhn_27", W = "_radio_xjlhn_34", I = "_checkbox_xjlhn_35", M = "_icon_xjlhn_68", e = {
9
+ label: j,
10
+ title: f,
11
+ titleWrapper: k,
12
+ count: v,
13
+ radio: W,
14
+ checkbox: I,
15
+ icon: M
16
16
  }, C = ({
17
- size: n = "md",
18
- type: h,
19
- name: M,
20
- active: i,
21
- value: j,
22
- label: c,
23
- title: g,
17
+ size: c = "md",
18
+ type: _,
19
+ name: S,
20
+ active: l,
21
+ value: g,
22
+ label: r,
23
+ title: x,
24
24
  description: u,
25
- icon: v,
26
- count: t = 0,
27
- checked: s = !1,
28
- disabled: o,
29
- onMouseEnter: S,
30
- onClick: l,
25
+ icon: N,
26
+ count: n = 0,
27
+ checked: t = !1,
28
+ disabled: i,
29
+ onMouseEnter: w,
30
+ onClick: o,
31
31
  role: d,
32
- ...p
32
+ ...h
33
33
  }) => {
34
- const N = () => {
35
- switch (h) {
34
+ const b = () => {
35
+ switch (_) {
36
36
  case "checkbox":
37
- return /* @__PURE__ */ r("span", { className: e.label, children: [
38
- /* @__PURE__ */ a("span", { className: e.checkbox, "data-checked": s, children: /* @__PURE__ */ a(_, { className: e.icon, "aria-hidden": !0 }) }),
39
- /* @__PURE__ */ r("div", { className: e.titleWrapper, children: [
40
- /* @__PURE__ */ a("span", { className: e.title, children: c }),
41
- t > 0 && /* @__PURE__ */ a("span", { className: e.count, "aria-hidden": "true", children: t })
37
+ return /* @__PURE__ */ s("span", { className: e.label, children: [
38
+ /* @__PURE__ */ a("span", { className: e.checkbox, "data-checked": t, children: /* @__PURE__ */ a(m, { className: e.icon, "aria-hidden": !0 }) }),
39
+ /* @__PURE__ */ s("div", { className: e.titleWrapper, children: [
40
+ /* @__PURE__ */ a("span", { className: e.title, children: r }),
41
+ n > 0 && /* @__PURE__ */ a("span", { className: e.count, "aria-hidden": "true", children: n })
42
42
  ] })
43
43
  ] });
44
44
  case "radio":
45
- return /* @__PURE__ */ r("span", { className: e.label, children: [
46
- /* @__PURE__ */ a("span", { className: e.radio, "data-checked": s, children: /* @__PURE__ */ a(_, { className: e.icon, "aria-hidden": !0 }) }),
47
- /* @__PURE__ */ r("div", { className: e.titleWrapper, children: [
48
- /* @__PURE__ */ a("span", { className: e.title, children: c }),
49
- t > 0 && /* @__PURE__ */ a("span", { className: e.count, "aria-hidden": "true", children: t })
45
+ return /* @__PURE__ */ s("span", { className: e.label, children: [
46
+ /* @__PURE__ */ a("span", { className: e.radio, "data-checked": t, children: /* @__PURE__ */ a(m, { className: e.icon, "aria-hidden": !0 }) }),
47
+ /* @__PURE__ */ s("div", { className: e.titleWrapper, children: [
48
+ /* @__PURE__ */ a("span", { className: e.title, children: r }),
49
+ n > 0 && /* @__PURE__ */ a("span", { className: e.count, "aria-hidden": "true", children: n })
50
50
  ] })
51
51
  ] });
52
52
  }
53
53
  };
54
- return c ? /* @__PURE__ */ a(
55
- m,
54
+ return r ? /* @__PURE__ */ a(
55
+ p,
56
56
  {
57
- disabled: o,
58
- selected: s,
59
- size: n,
57
+ disabled: i,
58
+ selected: t,
59
+ size: c,
60
60
  as: "div",
61
- active: i,
61
+ active: l,
62
62
  tabIndex: -1,
63
- onClick: l,
63
+ onClick: o,
64
64
  role: d,
65
- label: /* @__PURE__ */ a(N, {}),
66
- ...p
65
+ label: /* @__PURE__ */ a(b, {}),
66
+ ...h
67
67
  }
68
68
  ) : /* @__PURE__ */ a(
69
- m,
69
+ p,
70
70
  {
71
- disabled: o,
72
- selected: s,
73
- size: n,
71
+ disabled: i,
72
+ selected: t,
73
+ size: c,
74
74
  as: "div",
75
- active: i,
75
+ active: l,
76
76
  tabIndex: -1,
77
- onClick: l,
77
+ onClick: o,
78
78
  role: d,
79
- icon: v,
80
- title: g,
79
+ icon: N,
80
+ title: x,
81
81
  description: u,
82
- ...p
82
+ ...h
83
83
  }
84
84
  );
85
85
  };
@@ -1,44 +1,45 @@
1
- import { jsxs as g, jsx as p } from "react/jsx-runtime";
2
- import { createElement as x } from "react";
1
+ import { jsxs as x, jsx as p } from "react/jsx-runtime";
2
+ import { createElement as b } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
- import { AccountMenu as b } from "../Account/AccountMenu.js";
5
- import { useRootContext as k } from "../RootProvider/RootProvider.js";
6
- import { DrawerOrDropdown as I } from "../Dropdown/DrawerOrDropdown.js";
7
- import { useIsDesktop as h } from "../../hooks/useIsDesktop.js";
4
+ import { AccountMenu as k } from "../Account/AccountMenu.js";
5
+ import { useRootContext as I } from "../RootProvider/RootProvider.js";
6
+ import { DrawerOrDropdown as h } from "../Dropdown/DrawerOrDropdown.js";
7
+ import { useIsDesktop as w } from "../../hooks/useIsDesktop.js";
8
8
  import "../Snackbar/useSnackbar.js";
9
- import { ToolbarButton as w } from "./ToolbarButton.js";
10
- import { ToolbarFilterBase as B } from "./ToolbarFilterBase.js";
11
- const R = ({
9
+ import { ToolbarButton as B } from "./ToolbarButton.js";
10
+ import { ToolbarFilterBase as C } from "./ToolbarFilterBase.js";
11
+ const q = ({
12
12
  currentAccount: o,
13
- id: a = "toolbar-accounts",
13
+ id: s = "toolbar-accounts",
14
14
  onSelectAccount: t,
15
- buttonTestId: n,
16
- ...d
15
+ buttonTestId: d,
16
+ title: l = "Endre aktør",
17
+ ...n
17
18
  }) => {
18
- const { currentId: i, toggleId: l, closeAll: s } = k(), f = h(), T = () => l(a), e = i === a;
19
- return /* @__PURE__ */ g(B, { expanded: e, onBlurCapture: (r) => {
20
- const m = r.relatedTarget;
21
- (!m || !r.currentTarget.contains(m)) && s();
19
+ const { currentId: i, toggleId: f, closeAll: a } = I(), T = w(), g = () => f(s), r = i === s;
20
+ return /* @__PURE__ */ x(C, { expanded: r, onBlurCapture: (e) => {
21
+ const m = e.relatedTarget;
22
+ (!m || !e.currentTarget.contains(m)) && a();
22
23
  }, dataTestId: "filter-base-accounts", children: [
23
24
  /* @__PURE__ */ p(
24
- w,
25
+ B,
25
26
  {
26
27
  type: "switch",
27
- onToggle: T,
28
+ onToggle: g,
28
29
  active: !!o,
29
- dataTestId: n,
30
- "aria-expanded": e,
30
+ dataTestId: d,
31
+ "aria-expanded": r,
31
32
  children: o == null ? void 0 : o.name
32
33
  }
33
34
  ),
34
- /* @__PURE__ */ p(I, { open: e, size: "lg", drawerTitle: "Endre konto", onClose: s, children: /* @__PURE__ */ x(
35
- b,
35
+ /* @__PURE__ */ p(h, { open: r, size: "lg", drawerTitle: l, onClose: a, children: /* @__PURE__ */ b(
36
+ k,
36
37
  {
37
- ...d,
38
- keyboardEvents: e && f,
38
+ ...n,
39
+ keyboardEvents: r && T,
39
40
  key: i,
40
- onSelectAccount: (r) => {
41
- t == null || t(r), s();
41
+ onSelectAccount: (e) => {
42
+ t == null || t(e), a();
42
43
  },
43
44
  currentAccount: o
44
45
  }
@@ -46,5 +47,5 @@ const R = ({
46
47
  ] });
47
48
  };
48
49
  export {
49
- R as ToolbarAccountMenu
50
+ q as ToolbarAccountMenu
50
51
  };
@@ -3,5 +3,6 @@ export interface ToolbarAccountMenuProps extends AccountMenuProps {
3
3
  id?: string;
4
4
  isVirtualized?: boolean;
5
5
  buttonTestId?: string;
6
+ title?: string;
6
7
  }
7
- export declare const ToolbarAccountMenu: ({ currentAccount, id, onSelectAccount, buttonTestId, ...rest }: ToolbarAccountMenuProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const ToolbarAccountMenu: ({ currentAccount, id, onSelectAccount, buttonTestId, title, ...rest }: ToolbarAccountMenuProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.43.3",
3
+ "version": "0.43.5",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",