@altinn/altinn-components 0.67.11 → 0.68.0

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
- ._title_cy7ua_1{display:flex;align-items:center;column-gap:.5em}._title_cy7ua_1 h2{display:inline;font-weight:inherit;font-size:inherit;line-height:inherit;margin:0}
1
+ ._title_1hel0_1{display:flex;align-items:center;column-gap:.5em;-webkit-user-select:text;user-select:text}._title_1hel0_1 h2{display:inline;font-weight:inherit;font-size:inherit;line-height:inherit;margin:0}._content_1hel0_16{-webkit-user-select:text;user-select:text}
@@ -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
  };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as l, Fragment as x } from "react/jsx-runtime";
3
- import { useState as g } from "react";
2
+ import { jsx as t, jsxs as r, Fragment as g } from "react/jsx-runtime";
3
+ import { useState as _ } from "react";
4
4
  import { B as v } from "../../ToolbarSearch-DyVcALSw.js";
5
5
  import "../../index-p1eeF8LQ.js";
6
6
  import { AttachmentList as L } from "../Attachment/AttachmentList.js";
@@ -9,69 +9,70 @@ import { Typography as T } from "../Typography/Typography.js";
9
9
  import "../Typography/Link.js";
10
10
  import "../Button/Button.js";
11
11
  import "react-dom";
12
- import { SeenByLog as y } from "../Dialog/SeenByLog.js";
12
+ import { SeenByLog as A } from "../Dialog/SeenByLog.js";
13
13
  import "../GlobalMenu/GlobalMenuBase.js";
14
- import { ListItem as A } from "../List/ListItem.js";
14
+ import { ListItem as S } from "../List/ListItem.js";
15
15
  import "../Snackbar/useSnackbar.js";
16
- import { Section as S } from "../Page/Section.js";
17
- import { TransmissionType as _ } from "./TransmissionType.js";
18
- import '../../assets/Transmission.css';const j = "_title_cy7ua_1", k = {
19
- title: j
20
- }, Q = ({
21
- type: i,
22
- unread: o,
16
+ import { Section as j } from "../Page/Section.js";
17
+ import { TransmissionType as k } from "./TransmissionType.js";
18
+ import '../../assets/Transmission.css';const w = "_title_1hel0_1", y = "_content_1hel0_16", p = {
19
+ title: w,
20
+ content: y
21
+ }, R = ({
22
+ type: o,
23
+ unread: i,
23
24
  size: d = "xs",
24
- color: c = "neutral",
25
- title: n,
26
- createdAt: w,
27
- createdAtLabel: z,
28
- badge: f = { label: "Ulest" },
29
- sender: b,
30
- summary: a,
31
- attachments: s,
32
- children: r,
25
+ color: f = "neutral",
26
+ title: l,
27
+ createdAt: z,
28
+ createdAtLabel: B,
29
+ badge: b = { label: "Ulest" },
30
+ sender: h,
31
+ summary: s,
32
+ attachments: a,
33
+ children: n,
33
34
  seenByLog: m,
34
- ...p
35
+ ...c
35
36
  }) => {
36
- const [e, u] = g(p.expanded || !1);
37
+ const [e, u] = _(c.expanded || !1);
37
38
  return /* @__PURE__ */ t(
38
- A,
39
+ S,
39
40
  {
40
- ...p,
41
- icon: b,
42
- badge: i && /* @__PURE__ */ t(_, { value: i?.value, label: i?.label }),
41
+ ...c,
42
+ icon: h,
43
+ badge: o && /* @__PURE__ */ t(k, { value: o?.value, label: o?.label }),
43
44
  size: d,
44
- variant: o ? "subtle" : "default",
45
+ variant: i ? "subtle" : "default",
45
46
  border: e ? "none" : "solid",
46
47
  shadow: "none",
47
- color: c,
48
+ color: f,
48
49
  title: {
49
50
  as: "span",
50
- className: k.title,
51
- children: /* @__PURE__ */ l(x, { children: [
52
- /* @__PURE__ */ t("h2", { children: n }),
53
- o && /* @__PURE__ */ t(v, { variant: "tinted", size: "xs", ...f })
51
+ className: p.title,
52
+ children: /* @__PURE__ */ r(g, { children: [
53
+ /* @__PURE__ */ t("h2", { children: l }),
54
+ i && /* @__PURE__ */ t(v, { variant: "tinted", size: "xs", ...b })
54
55
  ] }),
55
- weight: o ? "bold" : "normal"
56
+ weight: i ? "bold" : "normal"
56
57
  },
57
58
  expanded: e,
58
59
  selected: e,
59
- onClick: () => u((h) => !h),
60
+ onClick: () => u((x) => !x),
60
61
  collapsible: !0,
61
62
  linkIcon: !0,
62
63
  as: "button",
63
- ariaLabel: n,
64
- children: /* @__PURE__ */ l(S, { padding: 4, spacing: 4, children: [
65
- /* @__PURE__ */ l(T, { size: "md", children: [
66
- a && /* @__PURE__ */ t("p", { children: a }),
67
- e ? typeof r == "function" ? r() : r : null,
68
- s?.items && /* @__PURE__ */ t(L, { ...s })
64
+ ariaLabel: l,
65
+ children: /* @__PURE__ */ r(j, { className: p.content, padding: 4, spacing: 4, children: [
66
+ /* @__PURE__ */ r(T, { size: "md", children: [
67
+ s && /* @__PURE__ */ t("p", { children: s }),
68
+ e ? typeof n == "function" ? n() : n : null,
69
+ a?.items && /* @__PURE__ */ t(L, { ...a })
69
70
  ] }),
70
- m && /* @__PURE__ */ t(y, { ...m })
71
+ m && /* @__PURE__ */ t(A, { ...m })
71
72
  ] })
72
73
  }
73
74
  );
74
75
  };
75
76
  export {
76
- Q as Transmission
77
+ R as Transmission
77
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.67.11",
3
+ "version": "0.68.0",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",