@altinn/altinn-components 0.67.10 → 0.67.12

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,66 +1,47 @@
1
- import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
- import { w as b, s as _, B as d } from "../../ToolbarSearch-DyVcALSw.js";
1
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
+ import { s as c, B as l } from "../../ToolbarSearch-DyVcALSw.js";
3
3
  import "../../index-p1eeF8LQ.js";
4
4
  import "react";
5
5
  import "../../tooltip-Ct39-719.js";
6
6
  import "../Typography/Link.js";
7
- import { Button as g } from "../Button/Button.js";
7
+ import { Button as p } from "../Button/Button.js";
8
8
  import "react-dom";
9
9
  import "../GlobalMenu/GlobalMenuBase.js";
10
10
  import "../Snackbar/useSnackbar.js";
11
- import { S as h } from "../../MenuHamburger-YjDC-ncP.js";
12
- import '../../assets/GlobalMenuButton.css';const N = "_button_e58u8_3", f = "_icon_e58u8_14", k = "_label_e58u8_22", y = "_badge_e58u8_28", t = {
13
- button: N,
14
- icon: f,
15
- label: k,
16
- badge: y
17
- }, M = (s) => {
18
- switch (s) {
19
- case "nn":
20
- return {
21
- close: "Lukk meny"
22
- };
23
- case "en":
24
- return {
25
- close: "Close menu"
26
- };
27
- default:
28
- return {
29
- close: "Lukk Meny"
30
- };
11
+ import { S as b } from "../../MenuHamburger-YjDC-ncP.js";
12
+ import '../../assets/GlobalMenuButton.css';const _ = "_button_e58u8_3", d = "_icon_e58u8_14", g = "_label_e58u8_22", N = "_badge_e58u8_28", o = {
13
+ button: _,
14
+ icon: d,
15
+ label: g,
16
+ badge: N
17
+ }, q = ({
18
+ className: h,
19
+ as: f = "button",
20
+ color: s = "company",
21
+ variant: n = "solid",
22
+ onClick: r,
23
+ expanded: a,
24
+ label: i = "Menu",
25
+ badge: e,
26
+ ...m
27
+ }) => /* @__PURE__ */ u(
28
+ p,
29
+ {
30
+ ...m,
31
+ type: "button",
32
+ onClick: r,
33
+ color: s,
34
+ variant: n,
35
+ className: o.button,
36
+ "aria-haspopup": "menu",
37
+ "aria-expanded": a,
38
+ children: [
39
+ a ? /* @__PURE__ */ t(c, { className: o.icon, "aria-hidden": "true" }) : /* @__PURE__ */ t(b, { className: o.icon, "aria-hidden": "true" }),
40
+ /* @__PURE__ */ t("span", { className: o.label, children: i }),
41
+ e && /* @__PURE__ */ t(l, { ...e, className: o.badge })
42
+ ]
31
43
  }
32
- }, X = ({
33
- className: s,
34
- as: x = "button",
35
- color: r = "company",
36
- variant: c = "solid",
37
- onClick: u,
38
- expanded: o,
39
- label: n = "Menu",
40
- badge: a,
41
- ...i
42
- }) => {
43
- const { languageCode: l } = b(), { close: m } = M(l);
44
- return /* @__PURE__ */ p(
45
- g,
46
- {
47
- ...i,
48
- type: "button",
49
- title: o ? m : n,
50
- onClick: u,
51
- color: r,
52
- variant: c,
53
- className: t.button,
54
- "aria-haspopup": "menu",
55
- "aria-expanded": o,
56
- children: [
57
- o ? /* @__PURE__ */ e(_, { className: t.icon, "aria-hidden": "true" }) : /* @__PURE__ */ e(h, { className: t.icon, "aria-hidden": "true" }),
58
- /* @__PURE__ */ e("span", { className: t.label, children: n }),
59
- a && /* @__PURE__ */ e(d, { ...a, className: t.badge })
60
- ]
61
- }
62
- );
63
- };
44
+ );
64
45
  export {
65
- X as GlobalMenuButton
46
+ q as GlobalMenuButton
66
47
  };
@@ -12,9 +12,9 @@ import "../Snackbar/useSnackbar.js";
12
12
  import { SettingsItemBase as r } from "./SettingsItemBase.js";
13
13
  import { SettingsModal as w } from "./SettingsModal.js";
14
14
  const q = ({
15
- loading: d,
16
- variant: h = "default",
17
- id: u = "settings",
15
+ loading: h,
16
+ variant: u = "default",
17
+ id: a = "settings",
18
18
  name: p,
19
19
  title: i,
20
20
  value: n,
@@ -22,14 +22,14 @@ const q = ({
22
22
  checked: f,
23
23
  onChange: g,
24
24
  modalProps: o,
25
- expanded: a,
26
- children: c,
25
+ expanded: c,
26
+ children: m,
27
27
  ...e
28
28
  }) => {
29
- const [l, m] = b(!1);
30
- if (d)
29
+ const [l, d] = b(!1);
30
+ if (h)
31
31
  return /* @__PURE__ */ t(r, { icon: e?.icon, titleProps: { children: i }, loading: !0 });
32
- switch (h) {
32
+ switch (u) {
33
33
  case "link":
34
34
  return /* @__PURE__ */ t(
35
35
  r,
@@ -51,6 +51,7 @@ const q = ({
51
51
  return /* @__PURE__ */ t(
52
52
  r,
53
53
  {
54
+ id: a,
54
55
  ...e,
55
56
  as: "div",
56
57
  titleProps: {
@@ -67,7 +68,7 @@ const q = ({
67
68
  {
68
69
  type: "checkbox",
69
70
  role: "switch",
70
- "aria-labelledby": u,
71
+ "aria-labelledby": a,
71
72
  name: p,
72
73
  value: n,
73
74
  checked: f,
@@ -85,7 +86,7 @@ const q = ({
85
86
  as: "button",
86
87
  linkIcon: !0,
87
88
  collapsible: !0,
88
- expanded: a,
89
+ expanded: c,
89
90
  titleProps: {
90
91
  children: i
91
92
  },
@@ -95,7 +96,7 @@ const q = ({
95
96
  variant: "subtle",
96
97
  children: s
97
98
  },
98
- children: a && /* @__PURE__ */ t("div", { children: c })
99
+ children: c && /* @__PURE__ */ t("div", { children: m })
99
100
  }
100
101
  );
101
102
  case "modal":
@@ -116,7 +117,7 @@ const q = ({
116
117
  },
117
118
  as: "button",
118
119
  linkIcon: !0,
119
- onClick: () => m(!0),
120
+ onClick: () => d(!0),
120
121
  expanded: l,
121
122
  children: l && /* @__PURE__ */ t(
122
123
  w,
@@ -125,8 +126,8 @@ const q = ({
125
126
  icon: o?.icon || e?.icon,
126
127
  title: o?.title || i,
127
128
  open: l,
128
- onClose: () => m(!1),
129
- children: c
129
+ onClose: () => d(!1),
130
+ children: m
130
131
  }
131
132
  )
132
133
  }
@@ -1,5 +1,5 @@
1
- import { jsxs as t, jsx as a, Fragment as g } from "react/jsx-runtime";
2
- import { i as u, H as c, B, p as C } from "../../ToolbarSearch-DyVcALSw.js";
1
+ import { jsxs as m, jsx as a, Fragment as g } from "react/jsx-runtime";
2
+ import { i as u, H as p, B, p as C } from "../../ToolbarSearch-DyVcALSw.js";
3
3
  import "../../index-p1eeF8LQ.js";
4
4
  import "react";
5
5
  import "../../tooltip-Ct39-719.js";
@@ -23,65 +23,65 @@ import '../../assets/SettingsItemBase.css';const A = "_listItem_9q1fv_1", D = "_
23
23
  linkIcon: T,
24
24
  label: U,
25
25
  controls: E
26
- }, os = ({
27
- as: p,
28
- ref: _,
29
- hidden: d,
30
- disabled: o,
31
- loading: m,
32
- color: f,
33
- collapsible: e,
34
- expanded: i,
35
- icon: v,
36
- label: I,
37
- titleProps: N = {},
38
- descriptionProps: k = {},
26
+ }, is = ({
27
+ as: _,
28
+ ref: d,
29
+ hidden: f,
30
+ disabled: i,
31
+ loading: t,
32
+ color: v,
33
+ collapsible: o,
34
+ expanded: e,
35
+ icon: I,
36
+ label: N,
37
+ titleProps: k = {},
38
+ descriptionProps: h = {},
39
39
  summary: n,
40
- children: h,
40
+ children: q,
41
41
  highlightWords: r,
42
42
  badge: l,
43
- linkIcon: q,
44
- controls: x,
45
- containerAs: y = "li",
46
- ...S
47
- }) => /* @__PURE__ */ t(y, { className: s.listItem, "data-collapsible": e, "data-expanded": i, children: [
48
- /* @__PURE__ */ t(R, { ref: _, as: "div", className: s.item, color: f, "aria-hidden": d, "data-loading": m, children: [
49
- /* @__PURE__ */ t(j, { ...S, className: s.link, disabled: o, as: p, children: [
50
- /* @__PURE__ */ a(u, { icon: v, className: s.media }),
51
- I || /* @__PURE__ */ t("span", { className: s.label, children: [
43
+ linkIcon: x,
44
+ controls: y,
45
+ containerAs: S = "li",
46
+ ...c
47
+ }) => /* @__PURE__ */ m(S, { className: s.listItem, "data-collapsible": o, "data-expanded": e, id: c.id, children: [
48
+ /* @__PURE__ */ m(R, { ref: d, as: "div", className: s.item, color: v, "aria-hidden": f, "data-loading": t, children: [
49
+ /* @__PURE__ */ m(j, { ...c, className: s.link, disabled: i, as: _, children: [
50
+ /* @__PURE__ */ a(u, { icon: I, className: s.media }),
51
+ N || /* @__PURE__ */ m("span", { className: s.label, children: [
52
52
  /* @__PURE__ */ a(
53
- c,
53
+ p,
54
54
  {
55
- ...N,
55
+ ...k,
56
56
  as: "span",
57
57
  highlightWords: r,
58
- loading: m,
58
+ loading: t,
59
59
  maxRows: 2,
60
60
  className: s.title
61
61
  }
62
62
  ),
63
63
  /* @__PURE__ */ a(
64
- c,
64
+ p,
65
65
  {
66
- ...k,
66
+ ...h,
67
67
  as: "span",
68
68
  highlightWords: r,
69
- loading: m,
69
+ loading: t,
70
70
  maxRows: 2,
71
71
  className: s.description
72
72
  }
73
73
  )
74
74
  ] })
75
75
  ] }),
76
- !o && /* @__PURE__ */ t(g, { children: [
77
- /* @__PURE__ */ a(w, { className: s.controls, children: x }),
76
+ !i && /* @__PURE__ */ m(g, { children: [
77
+ /* @__PURE__ */ a(w, { className: s.controls, children: y }),
78
78
  l && /* @__PURE__ */ a(B, { ...l }),
79
- e && (i ? /* @__PURE__ */ a(H, { className: s.linkIcon }) : /* @__PURE__ */ a(z, { className: s.linkIcon })) || q && /* @__PURE__ */ a(C, { className: s.linkIcon })
79
+ o && (e ? /* @__PURE__ */ a(H, { className: s.linkIcon }) : /* @__PURE__ */ a(z, { className: s.linkIcon })) || x && /* @__PURE__ */ a(C, { className: s.linkIcon })
80
80
  ] })
81
81
  ] }),
82
82
  n && /* @__PURE__ */ a(b, { className: s.summary, size: "xs", variant: "subtle", children: n }),
83
- h
83
+ q
84
84
  ] });
85
85
  export {
86
- os as SettingsItemBase
86
+ is as SettingsItemBase
87
87
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.67.10",
3
+ "version": "0.67.12",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",