@altinn/altinn-components 0.67.11 → 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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.67.11",
3
+ "version": "0.67.12",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",