@altinn/altinn-components 0.6.9 → 0.6.10

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
- ._footer_z2xgm_1{border-top:1px solid;border-color:var(--theme-border-subtle);display:flex;flex-direction:column;row-gap:1rem;padding:1rem 0;margin:2rem 1rem}._grid_z2xgm_13{width:100%;max-width:80rem;margin:0 auto;display:flex;flex-direction:column;justify-content:space-between;row-gap:1rem}@media (min-width: 1024px){._grid_z2xgm_13{padding:0 1rem;flex-direction:row}}
1
+ ._footer_1d8fg_1{width:100%;border-top:1px solid;border-color:var(--theme-border-subtle);display:flex;flex-direction:column;row-gap:1rem;padding:1rem 0;margin:2rem 1rem}._grid_1d8fg_14{width:100%;max-width:80rem;margin:0 auto;display:flex;flex-direction:column;justify-content:space-between;row-gap:1rem}@media (min-width: 1024px){._grid_1d8fg_14{padding:0 1rem;flex-direction:row}}
@@ -1 +1 @@
1
- ._nav_gzloq_1{background-color:#fff;display:flex;flex-direction:column;padding:0 .5rem}._header_gzloq_8{border-bottom:1px solid var(--theme-border-subtle)}._footer_gzloq_12{border-top:1px solid var(--theme-border-subtle);padding:1rem .5rem;display:flex;flex-direction:column;align-items:stretch}._drawer_gzloq_20[aria-expanded=true]{display:block;padding:.5rem;z-index:2}._dropdown_gzloq_26[aria-expanded=true]{display:none}@media (min-width: 1024px){._drawer_gzloq_20[aria-expanded=true]{display:none}._dropdown_gzloq_26[aria-expanded=true]{display:block;z-index:2}}
1
+ ._nav_1mnmu_1{background-color:#fff;display:flex;flex-direction:column;padding:0 .5rem}._footer_1mnmu_8{padding:1rem .5rem;display:flex;width:100%;flex-direction:column;align-items:stretch}._drawer_1mnmu_16[aria-expanded=true]{display:block;padding:.5rem;z-index:2}._dropdown_1mnmu_22[aria-expanded=true]{display:none}@media (min-width: 1024px){._drawer_1mnmu_16[aria-expanded=true]{display:none}._dropdown_1mnmu_22[aria-expanded=true]{display:block;z-index:2}}
@@ -1 +1 @@
1
- ._item_1m3xe_1{border:0;color:inherit;font:inherit;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0}._item_1m3xe_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_1m3xe_1[data-size=sm]{min-height:44px}._content_1m3xe_35{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._action_1m3xe_43{display:flex;justify-content:center;align-items:center;padding:10px}._linkText_1m3xe_50{font-size:.875rem;white-space:nowrap}._linkIcon_1m3xe_55{font-size:1.5rem}._item_1m3xe_1{background-color:transparent;color:var(--theme-text-default)}._item_1m3xe_1[aria-selected=true]{background-color:var(--theme-background-default)}._item_1m3xe_1:hover,._item_1m3xe_1:active{background-color:var(--theme-surface-hover)}._media_1m3xe_75[data-color=subtle]{background-color:var(--theme-background-default);color:var(--theme-text-default)}._media_1m3xe_75[data-color=strong]{background-color:var(--theme-base-default);color:var(--theme-background-default)}
1
+ ._item_16huj_1{padding:0;border:0;color:inherit;font:inherit;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0}._item_16huj_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_16huj_1[data-size=sm]{min-height:44px}._content_16huj_36{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._action_16huj_44{display:flex;justify-content:center;align-items:center;padding:10px}._linkText_16huj_51{font-size:.875rem;white-space:nowrap}._linkIcon_16huj_56{font-size:1.5rem}._item_16huj_1{background-color:transparent;color:var(--theme-text-default)}._item_16huj_1[aria-selected=true]{background-color:var(--theme-background-default)}._item_16huj_1:hover,._item_16huj_1:active{background-color:var(--theme-surface-hover)}._media_16huj_76[data-color=subtle]{background-color:var(--theme-background-default);color:var(--theme-text-default)}._media_16huj_76[data-color=strong]{background-color:var(--theme-base-default);color:var(--theme-background-default)}
@@ -1 +1 @@
1
- ._label_1am63_1{padding-left:6px}._input_1am63_5{position:absolute;opacity:0}._icon_1am63_10{font-size:1rem;display:flex;align-items:center;justify-content:center}._icon_1am63_10{color:var(--theme-base-default)}._icon_1am63_10 [data-hover=true]{opacity:0}._label_1am63_1:hover [data-hover=true]{opacity:1}
1
+ ._label_dg58p_1{padding-left:6px}._input_dg58p_5{position:absolute;opacity:0}._icon_dg58p_10{flex-shrink:0;font-size:1rem;display:flex;align-items:center;justify-content:center}._icon_dg58p_10{color:var(--theme-base-default)}._icon_dg58p_10 [data-hover=true]{opacity:0}._label_dg58p_1:hover [data-hover=true]{opacity:1}
@@ -1,12 +1,12 @@
1
1
  import { jsx as t, jsxs as e } from "react/jsx-runtime";
2
2
  import { c } from "../../index-L8X2o7IH.js";
3
- import '../../assets/FooterBase.css';const i = "_footer_z2xgm_1", m = "_grid_z2xgm_13", o = {
4
- footer: i,
5
- grid: m
6
- }, n = ({ className: r, children: s }) => /* @__PURE__ */ t("footer", { className: c(o.footer, r), children: /* @__PURE__ */ e("div", { className: o.grid, children: [
3
+ import '../../assets/FooterBase.css';const d = "_footer_1d8fg_1", f = "_grid_1d8fg_14", o = {
4
+ footer: d,
5
+ grid: f
6
+ }, a = ({ className: r, children: s }) => /* @__PURE__ */ t("footer", { className: c(o.footer, r), children: /* @__PURE__ */ e("div", { className: o.grid, children: [
7
7
  s,
8
8
  " "
9
9
  ] }) });
10
10
  export {
11
- n as FooterBase
11
+ a as FooterBase
12
12
  };
@@ -1,16 +1,12 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { c as s } from "../../index-L8X2o7IH.js";
3
- import "../Icon/SvgIcon.js";
4
- import "react";
5
- import "../RootProvider/RootProvider.js";
6
- import { MenuBase as m } from "../Menu/MenuBase.js";
7
- import '../../assets/FooterMenu.css';const l = "_menu_3o631_1", c = "_list_3o631_7", _ = "_item_3o631_28", a = "_link_3o631_32", i = {
8
- menu: l,
9
- list: c,
10
- item: _,
11
- link: a
12
- }, p = ({ as: t, className: e, title: o, ...r }) => /* @__PURE__ */ n(t || "a", { className: s(i.link, e), ...r, children: o }), C = ({ className: t, items: e = [] }) => /* @__PURE__ */ n(m, { className: s(i.menu, t), children: /* @__PURE__ */ n("ul", { className: i.list, children: e.map((o) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(p, { ...o }) }, o.id)) }) });
2
+ import { c as i } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/FooterMenu.css';const c = "_menu_3o631_1", r = "_list_3o631_7", m = "_item_3o631_28", _ = "_link_3o631_32", s = {
4
+ menu: c,
5
+ list: r,
6
+ item: m,
7
+ link: _
8
+ }, a = ({ as: t, className: e, title: o, ...l }) => /* @__PURE__ */ n(t || "a", { className: i(s.link, e), ...l, children: o }), k = ({ className: t, items: e = [] }) => /* @__PURE__ */ n("nav", { className: i(s.menu, t), children: /* @__PURE__ */ n("ul", { className: s.list, children: e.map((o) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(a, { ...o }) }, o.id)) }) });
13
9
  export {
14
- p as FooterLink,
15
- C as FooterMenu
10
+ a as FooterLink,
11
+ k as FooterMenu
16
12
  };
@@ -5,7 +5,7 @@ import "../../index-L8X2o7IH.js";
5
5
  import "../Icon/SvgIcon.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import { Menu as b } from "../Menu/Menu.js";
8
- const v = (r) => `${r} hits`, R = ({
8
+ const v = (r) => `${r} hits`, k = ({
9
9
  accounts: r = [],
10
10
  accountGroups: f = {},
11
11
  accountSearch: s,
@@ -29,11 +29,11 @@ const v = (r) => `${r} hits`, R = ({
29
29
  }).map((e) => ({
30
30
  ...e,
31
31
  groupId: "search"
32
- })) : p, h = i ? {
32
+ })) : p, I = i ? {
33
33
  search: {
34
34
  title: ((m = s == null ? void 0 : s.getResultsLabel) == null ? void 0 : m.call(s, l.length)) ?? v(l.length)
35
35
  }
36
- } : f, I = {
36
+ } : f, h = {
37
37
  name: "account-search",
38
38
  value: i,
39
39
  placeholder: (s == null ? void 0 : s.placeholder) ?? "Find account",
@@ -41,8 +41,16 @@ const v = (r) => `${r} hits`, R = ({
41
41
  }, C = [
42
42
  ...l.length > 0 ? l : [{ id: "search", groupId: "search", hidden: !0 }]
43
43
  ];
44
- return /* @__PURE__ */ L(b, { theme: "global", search: I, groups: h, items: C });
44
+ return /* @__PURE__ */ L(
45
+ b,
46
+ {
47
+ theme: "global",
48
+ search: s && h,
49
+ groups: I,
50
+ items: C
51
+ }
52
+ );
45
53
  };
46
54
  export {
47
- R as AccountMenu
55
+ k as AccountMenu
48
56
  };
@@ -1,58 +1,64 @@
1
1
  "use client";
2
- import { jsxs as u, jsx as o } from "react/jsx-runtime";
3
- import { useState as k } from "react";
2
+ import { jsxs as n, jsx as o, Fragment as x } from "react/jsx-runtime";
3
+ import { useState as G } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../Icon/SvgIcon.js";
6
6
  import "../RootProvider/RootProvider.js";
7
- import { AccountMenu as B } from "./AccountMenu.js";
8
- import { Menu as p } from "../Menu/Menu.js";
9
- import { AccountButton as x } from "./AccountButton.js";
10
- import { BackButton as G } from "./BackButton.js";
11
- import { GlobalMenuBase as i, GlobalMenuHeader as C, GlobalMenuFooter as j } from "./GlobalMenuBase.js";
12
- import { LogoutButton as A } from "./LogoutButton.js";
13
- const I = ({
14
- accounts: l = [],
15
- accountGroups: s = {},
16
- accountSearch: f,
17
- items: m = [],
7
+ import { AccountMenu as v } from "./AccountMenu.js";
8
+ import { MenuListItem as l } from "../Menu/MenuBase.js";
9
+ import { Menu as d } from "../Menu/Menu.js";
10
+ import { AccountButton as C } from "./AccountButton.js";
11
+ import { BackButton as j } from "./BackButton.js";
12
+ import { GlobalMenuBase as m, GlobalMenuHeader as f, GlobalMenuFooter as A } from "./GlobalMenuBase.js";
13
+ import { LogoutButton as F } from "./LogoutButton.js";
14
+ const N = ({
15
+ accounts: a = [],
16
+ accountGroups: h = {},
17
+ accountSearch: s,
18
+ items: p = [],
18
19
  groups: c,
19
- changeLabel: h = "Change",
20
- backLabel: d = "Back",
21
- currentAccount: t,
20
+ changeLabel: M = "Change",
21
+ backLabel: g = "Back",
22
+ currentAccount: r,
22
23
  onSelectAccount: e,
23
- logoutButton: a
24
+ logoutButton: u
24
25
  }) => {
25
- const [M, b] = k(!1), r = () => {
26
- b((n) => !n);
27
- }, g = (n) => {
28
- r(), e == null || e(n);
26
+ const [b, k] = G(!1), t = () => {
27
+ k((i) => !i);
28
+ }, B = (i) => {
29
+ t(), e == null || e(i);
29
30
  };
30
- return M ? /* @__PURE__ */ u(i, { children: [
31
- /* @__PURE__ */ o(G, { onClick: r, label: d }),
31
+ return b ? /* @__PURE__ */ n(m, { children: [
32
+ /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(j, { onClick: t, label: g }) }),
33
+ !s && /* @__PURE__ */ o(l, { as: "div", role: "separator" }),
32
34
  /* @__PURE__ */ o(
33
- B,
35
+ v,
34
36
  {
35
- currentAccount: t,
36
- accounts: l,
37
- accountGroups: s,
38
- accountSearch: f,
39
- onSelectAccount: g
37
+ currentAccount: r,
38
+ accounts: a,
39
+ accountGroups: h,
40
+ accountSearch: s,
41
+ onSelectAccount: B
40
42
  }
41
43
  )
42
- ] }) : t ? /* @__PURE__ */ u(i, { children: [
43
- /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(
44
- x,
44
+ ] }) : r ? /* @__PURE__ */ n(m, { children: [
45
+ /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(
46
+ C,
45
47
  {
46
- account: t,
47
- linkText: h,
48
- multipleAccounts: l.length > 1,
49
- onClick: r
48
+ account: r,
49
+ linkText: M,
50
+ multipleAccounts: a.length > 1,
51
+ onClick: t
50
52
  }
51
53
  ) }),
52
- /* @__PURE__ */ o(p, { groups: c, items: m }),
53
- a && /* @__PURE__ */ o(j, { children: /* @__PURE__ */ o(A, { ...a }) })
54
- ] }) : /* @__PURE__ */ o(i, { children: /* @__PURE__ */ o(p, { groups: c, items: m }) });
54
+ /* @__PURE__ */ o(l, { as: "div", role: "separator" }),
55
+ /* @__PURE__ */ o(d, { groups: c, items: p }),
56
+ u && /* @__PURE__ */ n(x, { children: [
57
+ /* @__PURE__ */ o(l, { as: "div", role: "separator" }),
58
+ /* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(F, { ...u }) })
59
+ ] })
60
+ ] }) : /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(d, { groups: c, items: p }) });
55
61
  };
56
62
  export {
57
- I as GlobalMenu
63
+ N as GlobalMenu
58
64
  };
@@ -1,7 +1,7 @@
1
- import { GlobalMenu as r } from "./GlobalMenu.js";
2
- const t = {
1
+ import { GlobalMenu as t } from "./GlobalMenu.js";
2
+ const r = {
3
3
  title: "GlobalMenu/GlobalMenu",
4
- component: r,
4
+ component: t,
5
5
  tags: ["autodocs"],
6
6
  parameters: {},
7
7
  args: {
@@ -14,10 +14,14 @@ const t = {
14
14
  }
15
15
  },
16
16
  currentAccount: {
17
+ id: "party:mathias",
17
18
  type: "person",
18
19
  name: "Mathias Dyngeland",
19
20
  description: "Fødselsnr. 07101995 XXXXXX"
20
21
  },
22
+ logoutButton: {
23
+ label: "Logg ut"
24
+ },
21
25
  accounts: [
22
26
  {
23
27
  id: "party:mathias",
@@ -148,6 +152,12 @@ const t = {
148
152
  }
149
153
  }
150
154
  }, l = {
155
+ args: {
156
+ accountSearch: {
157
+ placeholder: "Finn konto"
158
+ }
159
+ }
160
+ }, s = {
151
161
  args: {
152
162
  logoutLabel: "Logg ut",
153
163
  menuLabel: "Meny",
@@ -161,9 +171,10 @@ const t = {
161
171
  }
162
172
  };
163
173
  export {
174
+ l as AccountSearch,
164
175
  i as Company,
165
- l as CustomLabels,
176
+ s as CustomLabels,
166
177
  o as Default,
167
178
  n as Login,
168
- t as default
179
+ r as default
169
180
  };
@@ -2,6 +2,12 @@ import { ReactNode } from 'react';
2
2
  export interface GlobalMenuBaseProps {
3
3
  children: ReactNode;
4
4
  }
5
+ export interface GlobalMenuHeaderProps {
6
+ children: ReactNode;
7
+ }
8
+ export interface GlobalMenuFooterProps {
9
+ children: ReactNode;
10
+ }
5
11
  export declare const GlobalMenuBase: ({ children }: GlobalMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
6
- export declare const GlobalMenuHeader: ({ children }: GlobalMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
7
- export declare const GlobalMenuFooter: ({ children }: GlobalMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const GlobalMenuHeader: ({ children }: GlobalMenuHeaderProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const GlobalMenuFooter: ({ children }: GlobalMenuFooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,12 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import '../../assets/GlobalMenuBase.css';const a = "_nav_gzloq_1", n = "_header_gzloq_8", t = "_footer_gzloq_12", s = "_drawer_gzloq_20", l = "_dropdown_gzloq_26", r = {
3
- nav: a,
4
- header: n,
5
- footer: t,
6
- drawer: s,
7
- dropdown: l
8
- }, _ = ({ children: o }) => /* @__PURE__ */ e("nav", { className: r.nav, "data-theme": "global", children: o }), c = ({ children: o }) => /* @__PURE__ */ e("header", { className: r.header, children: o }), f = ({ children: o }) => /* @__PURE__ */ e("footer", { className: r.footer, children: o });
2
+ import '../../assets/GlobalMenuBase.css';const n = "_nav_1mnmu_1", a = "_footer_1mnmu_8", t = "_drawer_1mnmu_16", s = "_dropdown_1mnmu_22", r = {
3
+ nav: n,
4
+ footer: a,
5
+ drawer: t,
6
+ dropdown: s
7
+ }, d = ({ children: o }) => /* @__PURE__ */ e("nav", { className: r.nav, "data-theme": "global", children: o }), l = ({ children: o }) => /* @__PURE__ */ e("header", { className: r.header, children: o }), _ = ({ children: o }) => /* @__PURE__ */ e("footer", { className: r.footer, children: o });
9
8
  export {
10
- _ as GlobalMenuBase,
11
- f as GlobalMenuFooter,
12
- c as GlobalMenuHeader
9
+ d as GlobalMenuBase,
10
+ _ as GlobalMenuFooter,
11
+ l as GlobalMenuHeader
13
12
  };
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
2
  import { LayoutBase as i } from "../Layout/LayoutBase.js";
3
3
  import "../../index-L8X2o7IH.js";
4
- import "../Icon/SvgIcon.js";
5
4
  import "react";
6
- import { MenuItem as o } from "./MenuItem.js";
5
+ import "../Icon/SvgIcon.js";
7
6
  import "../RootProvider/RootProvider.js";
8
7
  import { MetaItem as l } from "../Meta/MetaItem.js";
8
+ import { MenuItem as o } from "./MenuItem.js";
9
9
  import { MenuBase as p } from "./MenuBase.js";
10
10
  const h = {
11
11
  title: "Menu/MenuItem",
@@ -1,9 +1,9 @@
1
1
  import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
- import { c as u } from "../../index-L8X2o7IH.js";
3
- import { Badge as T } from "../Badge/Badge.js";
4
- import { Icon as j } from "../Icon/Icon.js";
2
+ import { c as v } from "../../index-L8X2o7IH.js";
3
+ import { Badge as N } from "../Badge/Badge.js";
4
+ import { Icon as T } from "../Icon/Icon.js";
5
5
  import "../Icon/SvgIcon.js";
6
- import '../../assets/MenuItemBase.css';const B = "_item_1m3xe_1", g = "_content_1m3xe_35", w = "_action_1m3xe_43", y = "_linkText_1m3xe_50", z = "_linkIcon_1m3xe_55", C = "_media_1m3xe_75", e = {
6
+ import '../../assets/MenuItemBase.css';const B = "_item_16huj_1", g = "_content_16huj_36", w = "_action_16huj_44", y = "_linkText_16huj_51", z = "_linkIcon_16huj_56", C = "_media_16huj_76", n = {
7
7
  item: B,
8
8
  content: g,
9
9
  action: w,
@@ -16,41 +16,41 @@ import '../../assets/MenuItemBase.css';const B = "_item_1m3xe_1", g = "_content_
16
16
  size: _,
17
17
  color: d,
18
18
  linkIcon: o,
19
- linkText: x,
19
+ linkText: h,
20
20
  badge: c,
21
21
  tabIndex: p = 0,
22
- active: f = !1,
22
+ active: u = !1,
23
23
  collapsible: i = !1,
24
24
  expanded: s = !1,
25
- selected: h = !1,
25
+ selected: f = !1,
26
26
  disabled: m = !1,
27
- className: k,
28
- children: I,
29
- ...v
27
+ className: x,
28
+ children: j,
29
+ ...k
30
30
  }) => {
31
- const N = r || "a", n = i && s ? "chevron-up" : i ? "chevron-down" : o && "chevron-right";
31
+ const I = r || "a", e = i && s ? "chevron-up" : i ? "chevron-down" : o && "chevron-right";
32
32
  return /* @__PURE__ */ t(
33
- N,
33
+ I,
34
34
  {
35
35
  role: "menuitem",
36
36
  tabIndex: m ? "-1" : p ?? 0,
37
37
  "data-size": _,
38
38
  "data-color": d,
39
- "data-active": f,
39
+ "data-active": u,
40
40
  "aria-expanded": s,
41
41
  "aria-disabled": m,
42
- "aria-selected": h,
42
+ "aria-selected": f,
43
43
  onClick: l,
44
- className: u(e.item, k),
45
- ...v,
44
+ className: v(n.item, x),
45
+ ...k,
46
46
  children: [
47
- /* @__PURE__ */ t("div", { className: e.content, children: [
48
- I,
49
- c && /* @__PURE__ */ a(T, { ...c })
47
+ /* @__PURE__ */ t("div", { className: n.content, children: [
48
+ j,
49
+ c && /* @__PURE__ */ a(N, { ...c })
50
50
  ] }),
51
- n && /* @__PURE__ */ t("div", { className: e.action, children: [
52
- /* @__PURE__ */ a("span", { className: e.linkText, children: x }),
53
- n && /* @__PURE__ */ a(j, { name: n, className: e.linkIcon })
51
+ e && /* @__PURE__ */ t("div", { className: n.action, children: [
52
+ /* @__PURE__ */ a("span", { className: n.linkText, children: h }),
53
+ e && /* @__PURE__ */ a(T, { name: e, className: n.linkIcon })
54
54
  ] })
55
55
  ]
56
56
  }
@@ -19,9 +19,7 @@ import '../../assets/MenuItemMedia.css';const f = "_media_7n7uy_1", _ = "_icon_7
19
19
  lg: "md"
20
20
  }
21
21
  }, A = ({ size: o = "sm", color: n, icon: t, avatar: s, avatarGroup: r, children: i }) => !t && !s && !r && !i ? !1 : /* @__PURE__ */ d("div", { className: e.media, "data-size": o, "data-color": t ? n : null, children: [
22
- t && /* @__PURE__ */ a(u, { name: t, variant: n === "strong" ? "solid" : "outline", className: e.icon }),
23
- s && /* @__PURE__ */ a(l, { ...s, size: m == null ? void 0 : m.avatar[o] }),
24
- r && /* @__PURE__ */ a(c, { ...r, size: m == null ? void 0 : m.avatarGroup[o] }),
22
+ t && /* @__PURE__ */ a(u, { name: t, variant: n === "strong" ? "solid" : "outline", className: e.icon }) || s && /* @__PURE__ */ a(l, { ...s, size: m == null ? void 0 : m.avatar[o] }) || r && /* @__PURE__ */ a(c, { ...r, size: m == null ? void 0 : m.avatarGroup[o] }),
25
23
  i
26
24
  ] });
27
25
  export {
@@ -3,30 +3,30 @@ import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
4
  import { CheckboxIcon as b } from "../Icon/CheckboxIcon.js";
5
5
  import { RadioIcon as f } from "../Icon/RadioIcon.js";
6
- import { MenuItemBase as x } from "./MenuItemBase.js";
7
- import { MenuItemLabel as I } from "./MenuItemLabel.js";
8
- import '../../assets/MenuOption.css';const N = "_label_1am63_1", h = "_input_1am63_5", M = "_icon_1am63_10", t = {
9
- label: N,
10
- input: h,
11
- icon: M
12
- }, R = ({
13
- size: e = "sm",
14
- type: a,
15
- name: m,
16
- value: r,
17
- label: s,
18
- title: i,
19
- description: l,
6
+ import { MenuItemBase as d } from "./MenuItemBase.js";
7
+ import { MenuItemLabel as x } from "./MenuItemLabel.js";
8
+ import '../../assets/MenuOption.css';const I = "_label_dg58p_1", N = "_input_dg58p_5", g = "_icon_dg58p_10", t = {
9
+ label: I,
10
+ input: N,
11
+ icon: g
12
+ }, O = ({
13
+ size: r = "sm",
14
+ type: e,
15
+ name: s,
16
+ value: i,
17
+ label: l,
18
+ title: a,
19
+ description: m,
20
20
  badge: c,
21
21
  checked: o = !1,
22
22
  disabled: p,
23
23
  onChange: u
24
- }) => /* @__PURE__ */ _(x, { className: t.label, disabled: p, selected: o, size: e, badge: c, as: "label", children: [
25
- /* @__PURE__ */ n("input", { className: t.input, name: m, value: r, type: a, checked: o, onChange: u }),
26
- a === "checkbox" && /* @__PURE__ */ n(b, { checked: o, hover: !0, className: t.icon }),
27
- a === "radio" && /* @__PURE__ */ n(f, { checked: o, hover: !0, className: t.icon }),
28
- /* @__PURE__ */ n(I, { title: i, description: l, size: e, children: s })
24
+ }) => /* @__PURE__ */ _(d, { className: t.label, disabled: p, selected: o, size: r, badge: c, as: "label", children: [
25
+ /* @__PURE__ */ n("input", { className: t.input, name: s, value: i, type: e, checked: o, onChange: u }),
26
+ e === "checkbox" && /* @__PURE__ */ n(b, { checked: o, hover: !0, className: t.icon }),
27
+ e === "radio" && /* @__PURE__ */ n(f, { checked: o, hover: !0, className: t.icon }),
28
+ /* @__PURE__ */ n(x, { title: a, description: m, size: r, children: l })
29
29
  ] });
30
30
  export {
31
- R as MenuOption
31
+ O as MenuOption
32
32
  };
@@ -1,7 +1,7 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import s from "react";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import n from "react";
3
3
  import { Toolbar as o } from "./Toolbar.js";
4
- const b = {
4
+ const d = {
5
5
  title: "Toolbar/Toolbar",
6
6
  component: o,
7
7
  tags: ["autodocs"],
@@ -40,7 +40,14 @@ const b = {
40
40
  },
41
41
  {
42
42
  value: "brreg",
43
- label: "Brønnøysund"
43
+ label: "Brønnøysundregistrene"
44
+ },
45
+ {
46
+ value: "ssb",
47
+ label: "Statisitisk sentralbyrå",
48
+ badge: {
49
+ label: "10"
50
+ }
44
51
  },
45
52
  {
46
53
  value: "nav",
@@ -123,10 +130,10 @@ const p = {
123
130
  }))
124
131
  }
125
132
  }, v = () => {
126
- const [t, e] = s.useState({
133
+ const [t, e] = n.useState({
127
134
  from: ["skatt", "brreg"]
128
135
  });
129
- return /* @__PURE__ */ n(o, { filters: a.args.filters, filterState: t, onFilterStateChange: e });
136
+ return /* @__PURE__ */ s(o, { filters: a.args.filters, filterState: t, onFilterStateChange: e });
130
137
  }, c = {
131
138
  args: {
132
139
  search: {
@@ -175,5 +182,5 @@ export {
175
182
  c as FilterAndSearch,
176
183
  g as NoFilters,
177
184
  p as StaticFilters,
178
- b as default
185
+ d as default
179
186
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.6.9",
3
+ "version": "0.6.10",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [