@altinn/altinn-components 0.28.1 → 0.28.2

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.
Files changed (34) hide show
  1. package/dist/assets/Button.css +1 -1
  2. package/dist/assets/ButtonBase.css +1 -1
  3. package/dist/assets/ButtonIcon.css +1 -1
  4. package/dist/assets/ComboButton.css +1 -1
  5. package/dist/assets/ListItemHeader.css +1 -1
  6. package/dist/components/Button/Button.js +49 -44
  7. package/dist/components/Button/ButtonBase.js +1 -1
  8. package/dist/components/Button/ButtonIcon.js +12 -8
  9. package/dist/components/Button/ComboButton.js +49 -33
  10. package/dist/components/Button/IconButton.js +28 -26
  11. package/dist/components/Header/HeaderButton.js +1 -1
  12. package/dist/components/Icon/Icon.js +21 -22
  13. package/dist/components/Icon/IconOrAvatar.js +12 -12
  14. package/dist/components/List/ListItemHeader.js +69 -62
  15. package/dist/components/List/ListItemLink.js +32 -32
  16. package/dist/components/Profile/AccountListItem.js +23 -21
  17. package/dist/types/lib/components/Button/Button.d.ts +5 -5
  18. package/dist/types/lib/components/Button/Button.stories.d.ts +2 -1
  19. package/dist/types/lib/components/Button/ButtonIcon.d.ts +5 -5
  20. package/dist/types/lib/components/Button/ButtonLabel.d.ts +2 -2
  21. package/dist/types/lib/components/Button/ComboButton.d.ts +6 -4
  22. package/dist/types/lib/components/Button/IconButton.d.ts +3 -4
  23. package/dist/types/lib/components/Icon/Icon.d.ts +1 -3
  24. package/dist/types/lib/components/List/ListItem.d.ts +24 -1
  25. package/dist/types/lib/components/List/ListItem.stories.d.ts +1 -1
  26. package/dist/types/lib/components/List/ListItemLink.d.ts +3 -5
  27. package/dist/types/lib/components/List/Specimens.stories.d.ts +1 -1
  28. package/dist/types/lib/components/Menu/MenuItem.d.ts +3 -3
  29. package/dist/types/lib/components/Profile/AccountListItem.d.ts +1 -1
  30. package/dist/types/lib/components/Profile/AccountListItem.stories.d.ts +1 -2
  31. package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +0 -1
  32. package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -2
  33. package/package.json +1 -1
  34. package/dist/assets/IconButton.css +0 -1
@@ -1 +1 @@
1
- ._button_qyaf4_2{column-gap:.125em}._button_qyaf4_2[data-size=xs]{padding:0 .375rem}._button_qyaf4_2[data-size=sm]{padding:0 .5rem}._button_qyaf4_2[data-size=md]{padding:0 .625rem}._button_qyaf4_2[data-size=lg]{padding:0 .75rem}
1
+ ._button_1qqtu_1{display:inline-flex;align-items:center;column-gap:.25em;padding:.625em}._button_1qqtu_1[data-reverse=true]{flex-direction:row-reverse}
@@ -1 +1 @@
1
- ._button_1c0tl_1{border:1px solid;border-color:transparent;margin:0;padding:0;width:auto;overflow:visible;background:transparent;text-decoration:none;color:inherit;font:inherit;text-align:inherit;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;display:inline-flex;align-items:center;border-radius:2px}._button_1c0tl_1[data-reverse=true]{flex-direction:row-reverse}._button_1c0tl_1:disabled{opacity:.5;pointer-events:none}._button_1c0tl_1[data-size=xs]{height:2.25rem}._button_1c0tl_1[data-size=sm]{height:2.625rem}._button_1c0tl_1[data-size=md]{height:3rem}._button_1c0tl_1[data-size=lg]{height:3.5rem}._button_1c0tl_1[data-variant=solid]{background-color:var(--ds-color-base-default);border-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._button_1c0tl_1[data-variant=solid]:hover{background-color:var(--ds-color-base-hover);border-color:var(--ds-color-base-hover)}._button_1c0tl_1[data-variant=solid]:active{background-color:var(--ds-color-base-active);border-color:var(--ds-color-base-active)}._button_1c0tl_1[data-variant=tinted]{background-color:var(--ds-color-surface-tinted);border-color:var(--ds-color-surface-tinted);border-color:var(--ds-color-base-default);color:var(--ds-color-base-surface-tinted)}._button_1c0tl_1[data-variant=tinted]:hover{background-color:var(--ds-color-surface-hover)}._button_1c0tl_1[data-variant=tinted]:active{background-color:var(--ds-color-surface-active)}._button_1c0tl_1[data-variant=outline],._button_1c0tl_1[data-variant=dotted]{border-color:var(--ds-color-base-default)}._button_1c0tl_1[data-variant=outline]{border-style:solid}._button_1c0tl_1[data-variant=dotted]{border-style:dotted}._button_1c0tl_1[data-variant=text]{border-color:transparent;color:var(--ds-color-text-subtle)}._button_1c0tl_1[data-variant=outline]:hover,._button_1c0tl_1[data-variant=dotted]:hover,._button_1c0tl_1[data-variant=text]:hover{background-color:var(--ds-color-surface-hover);color:var(--ds-color-text-default)}._button_1c0tl_1[data-variant=outline]:active,._button_1c0tl_1[data-variant=dotted]:active,._button_1c0tl_1[data-variant=text]:active{background-color:var(--ds-color-surface-active)}._button_1c0tl_1[data-variant=link]{border:none;color:var(--ds-color-text-subtle)}._button_1c0tl_1[data-variant=link]:hover{color:var(--ds-color-base-hover)}._button_1c0tl_1:focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline));outline-offset:var(--_ds--focus, var(--ds-border-width-focus))}._button_1c0tl_1:focus-visible *{--_ds--focus: }
1
+ ._button_1pk1w_1{--dsc-button-background--active: transparent;--dsc-button-background--hover: transparent;--dsc-button-background: transparent;--dsc-button-color: inherit;--dsc-button-color--hover: inherit;--dsc-button-border-width: var(--ds-border-width-default);--dsc-button-border-style: solid;--dsc-button-border-color: transparent;--dsc-button-border-radius: 2px;--dsc-button-gap: var(--ds-size-2);--dsc-button-padding: var(--ds-size-2) var(--ds-size-4);--dsc-button-size: var(--ds-size-12);border-style:var(--dsc-button-border-style);border-width:var(--dsc-button-border-width);border-color:var(--dsc-button-border-color);border-radius:var(--dsc-button-border-radius);background:var(--dsc-button-background);color:var(--dsc-button-color);margin:0;padding:0;min-width:var(--dsc-button-size);min-height:var(--dsc-button-size);height:fit-content;justify-content:center;overflow:visible;text-decoration:none;text-align:inherit;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;display:inline-flex;align-items:center}._button_1pk1w_1:not([data-size]){font-size:inherit}._button_1pk1w_1:is(:disabled,[aria-disabled=true]){cursor:not-allowed;opacity:var(--ds-opacity-disabled)}._button_1pk1w_1:is(:disabled,[aria-disabled=true])[aria-busy=true]{opacity:1;cursor:progress}@media (hover: hover) and (pointer: fine){._button_1pk1w_1:where(:not(:disabled,[aria-disabled=true],[aria-busy=true])):hover{background:var(--dsc-button-background--hover);color:var(--dsc-button-color--hover)}}._button_1pk1w_1:where(:not(:disabled,[aria-disabled=true],[aria-busy=true])):active{background:var(--dsc-button-background--active)}._button_1pk1w_1[data-variant=solid]{--dsc-button-background--active: var(--ds-color-base-active);--dsc-button-background--hover: var(--ds-color-base-hover);--dsc-button-background: var(--ds-color-base-default);--dsc-button-color: var(--ds-color-base-contrast-default);--dsc-button-color--hover: var(--ds-color-base-contrast-default);--dsc-button-border-color: var(--ds-color-base-default)}._button_1pk1w_1[data-variant=outline],._button_1pk1w_1[data-variant=dotted],._button_1pk1w_1[data-variant=text]{--dsc-button-background: transparent;--dsc-button-background--active: var(--ds-color-surface-active);--dsc-button-background--hover: var(--ds-color-surface-hover);--dsc-button-color: var(--ds-color-text-subtle);--dsc-button-color--hover: var(--ds-color-text-default)}._button_1pk1w_1[data-variant=outline],._button_1pk1w_1[data-variant=dotted]{--dsc-button-border-color: var(--ds-color-border-strong)}._button_1pk1w_1[data-variant=dotted]{--dsc-button-border-style: dotted}._button_1pk1w_1[data-variant=tinted]{background-color:var(--ds-color-surface-tinted);border-color:var(--ds-color-surface-tinted);border-color:var(--ds-color-base-default);color:var(--ds-color-base-surface-tinted)}._button_1pk1w_1[data-variant=tinted]:hover{background-color:var(--ds-color-surface-hover)}._button_1pk1w_1[data-variant=tinted]:active{background-color:var(--ds-color-surface-active)}._button_1pk1w_1:focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline));outline-offset:var(--_ds--focus, var(--ds-border-width-focus))}._button_1pk1w_1:focus-visible *{--_ds--focus: }
@@ -1 +1 @@
1
- ._icon_n7bze_1{display:flex;align-items:center;justify-content:center}._icon_n7bze_1[data-size=xs]{font-size:1.25rem}._icon_n7bze_1[data-size=sm]{font-size:1.375rem}._icon_n7bze_1[data-size=md]{font-size:1.5rem}._icon_n7bze_1[data-size=lg]{font-size:1.625rem}
1
+ ._icon_1wozs_1{display:flex;align-items:center;justify-content:center;font-size:1em}._icon_1wozs_1[data-size=xs]{font-size:.875rem}._icon_1wozs_1[data-size=sm]{font-size:1rem}._icon_1wozs_1[data-size=md]{font-size:1.125rem}._icon_1wozs_1[data-size=lg]{font-size:1.25rem}._icon_1wozs_1 svg,._icon_1wozs_1 img{display:block;width:1em;height:1em;font-size:1.5em}
@@ -1 +1 @@
1
- ._button_d26a8_1{display:inline-flex;flex-direction:row;align-items:center}._divider_d26a8_7{align-self:stretch;border-left:1px solid currentColor;width:1px;margin:.375rem 0}._primary_d26a8_14,._secondary_d26a8_15{display:inline-flex;align-items:center;border:none}._primary_d26a8_14[data-size=xs],._secondary_d26a8_15[data-size=xs]{padding:0 .375rem}._primary_d26a8_14[data-size=sm],._secondary_d26a8_15[data-size=sm]{padding:0 .5rem}._primary_d26a8_14[data-size=md],._secondary_d26a8_15[data-size=md]{padding:0 .625rem}._primary_d26a8_14[data-size=lg],._secondary_d26a8_15[data-size=lg]{padding:0 .75rem}
1
+ ._button_kd2d3_1{display:inline-flex;flex-direction:row;align-items:center}._divider_kd2d3_7{align-self:stretch;border-left:1px solid currentColor;width:1px;margin:.375rem 0}._primary_kd2d3_14,._secondary_kd2d3_15{display:inline-flex;align-items:center;border-width:0;margin:-1px;padding:0 .5em}
@@ -1 +1 @@
1
- ._header_hyqf4_1{--dsc-item-spacing: .5em;position:relative;width:100%;min-height:var(--dsc-item-height);display:flex;align-items:center;justify-content:space-between;background:var(--dsc-item-background);column-gap:var(--dsc-item-spacing);padding-right:var(--dsc-item-px);padding-left:var(--dsc-item-px)}._header_hyqf4_1[data-interactive=true]{cursor:pointer}._header_hyqf4_1[data-interactive=true]:hover{background:var(--dsc-item-background--hover)}._header_hyqf4_1[data-interactive=true]:hover ._label_hyqf4_27 h2{text-decoration:underline}._header_hyqf4_1[data-has-active-child=true]{background-color:var(--ds-color-background-tinted)}
1
+ ._header_1rjb2_1{--dsc-item-spacing: .5em;position:relative;width:100%;min-height:var(--dsc-item-height);display:flex;align-items:center;justify-content:space-between;background:var(--dsc-item-background);column-gap:var(--dsc-item-spacing);padding-right:var(--dsc-item-px);padding-left:var(--dsc-item-px)}._header_1rjb2_1[data-interactive=true]{cursor:pointer}._header_1rjb2_1[data-interactive=true]:hover{background:var(--dsc-item-background--hover)}._header_1rjb2_1[data-interactive=true]:hover ._label_1rjb2_27 h2{text-decoration:underline}._header_1rjb2_1[data-has-active-child=true]{background-color:var(--ds-color-background-tinted)}._linkIcon_1rjb2_35{flex-shrink:0;min-width:1.5em;min-height:2em;display:flex;align-items:center;justify-content:center;pointer-events:none}
@@ -1,55 +1,60 @@
1
- import { jsx as o, jsxs as h } from "react/jsx-runtime";
2
- import { c as d } from "../../index-L8X2o7IH.js";
3
- import { ButtonBase as e } from "./ButtonBase.js";
4
- import { ButtonIcon as x } from "./ButtonIcon.js";
5
- import { ButtonLabel as y } from "./ButtonLabel.js";
6
- import '../../assets/Button.css';const N = "_button_qyaf4_2", n = {
7
- button: N
8
- }, I = ({
9
- variant: a = "solid",
10
- color: r,
11
- size: t = "md",
12
- selected: s = !1,
13
- icon: l,
14
- href: m,
15
- label: i,
16
- children: b,
17
- className: u,
18
- loading: p,
19
- loadingText: f = "Loading ...",
20
- ariaLabel: B,
21
- ...c
22
- }) => p ? /* @__PURE__ */ o(
23
- e,
1
+ import { jsx as t, jsxs as j } from "react/jsx-runtime";
2
+ import { c as b } from "../../index-L8X2o7IH.js";
3
+ import "react";
4
+ import { ButtonBase as d } from "./ButtonBase.js";
5
+ import { ButtonLabel as B } from "./ButtonLabel.js";
6
+ import { ButtonIcon as q } from "./ButtonIcon.js";
7
+ import "../RootProvider/RootProvider.js";
8
+ import "../Searchbar/AutocompleteBase.js";
9
+ import "../Snackbar/useSnackbar.js";
10
+ import '../../assets/Button.css';const y = "_button_1qqtu_1", a = {
11
+ button: y
12
+ }, C = ({
13
+ variant: r = "solid",
14
+ color: n,
15
+ size: s,
16
+ selected: m = !1,
17
+ icon: u,
18
+ iconSize: x,
19
+ href: i,
20
+ label: p,
21
+ labelSize: o,
22
+ children: c,
23
+ className: e,
24
+ loading: _,
25
+ ariaLabel: h,
26
+ ...f
27
+ }) => _ ? /* @__PURE__ */ t(
28
+ d,
24
29
  {
25
- variant: a,
30
+ variant: r,
26
31
  "aria-busy": !0,
27
- color: r,
28
- size: t,
29
- selected: s,
30
- href: m,
31
- className: d(n.button, u),
32
- ...c,
32
+ color: n,
33
+ size: s,
34
+ selected: m,
35
+ href: i,
36
+ className: b(a.button, e),
37
+ ...f,
33
38
  disabled: !0,
34
- children: /* @__PURE__ */ o("span", { className: n.label, "data-size": t, children: /* @__PURE__ */ o("span", { className: n.loading, children: f }) })
39
+ children: /* @__PURE__ */ t(B, { size: o, children: c || p })
35
40
  }
36
- ) : /* @__PURE__ */ h(
37
- e,
41
+ ) : /* @__PURE__ */ j(
42
+ d,
38
43
  {
39
- variant: a,
40
- color: r,
41
- size: t,
42
- ariaLabel: B,
43
- selected: s,
44
- href: m,
45
- className: d(n.button, u),
46
- ...c,
44
+ variant: r,
45
+ color: n,
46
+ size: s,
47
+ ariaLabel: h,
48
+ selected: m,
49
+ href: i,
50
+ className: b(a.button, e),
51
+ ...f,
47
52
  children: [
48
- l && /* @__PURE__ */ o(x, { size: t, icon: l }),
49
- /* @__PURE__ */ o(y, { size: t, children: b || i })
53
+ u && /* @__PURE__ */ t(q, { icon: u, size: x || o }),
54
+ /* @__PURE__ */ t(B, { size: o, children: c || p })
50
55
  ]
51
56
  }
52
57
  );
53
58
  export {
54
- I as Button
59
+ C as Button
55
60
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import { c as i } from "../../index-L8X2o7IH.js";
3
- import '../../assets/ButtonBase.css';const p = "_button_1c0tl_1", f = {
3
+ import '../../assets/ButtonBase.css';const p = "_button_1pk1w_1", f = {
4
4
  button: p
5
5
  }, B = ({
6
6
  as: a,
@@ -1,13 +1,17 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { c as i } from "../../index-L8X2o7IH.js";
3
- import { Icon as m } from "../Icon/Icon.js";
4
- import "react";
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { c as m } from "../../index-L8X2o7IH.js";
3
+ import { isValidElement as c } from "react";
4
+ import { isIconProps as p, Icon as s } from "../Icon/Icon.js";
5
5
  import "../RootProvider/RootProvider.js";
6
6
  import "../Searchbar/AutocompleteBase.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import '../../assets/ButtonIcon.css';const s = "_icon_n7bze_1", e = {
9
- icon: s
10
- }, u = ({ className: t, size: n, icon: r, iconAltText: c }) => /* @__PURE__ */ o("span", { className: i(e.icon, t), "data-size": n, children: /* @__PURE__ */ o(m, { svgElement: r, altText: c }) });
8
+ import '../../assets/ButtonIcon.css';const a = "_icon_1wozs_1", r = {
9
+ icon: a
10
+ };
11
+ function l(o) {
12
+ return typeof o == "string" || typeof o == "number" || typeof o == "boolean" || o === null || c(o);
13
+ }
14
+ const _ = ({ icon: o, size: n, iconAltText: e, className: i }) => /* @__PURE__ */ t("span", { className: m(r.wrapper, i), "data-size": n, "aria-label": e, children: p(o) && /* @__PURE__ */ t(s, { ...o, className: r.icon }) || l(o) && o || /* @__PURE__ */ t(s, { svgElement: o, className: r.icon }) });
11
15
  export {
12
- u as ButtonIcon
16
+ _ as ButtonIcon
13
17
  };
@@ -1,42 +1,58 @@
1
- import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
- import { c as y } from "../../index-L8X2o7IH.js";
3
- import { ButtonBase as t } from "./ButtonBase.js";
4
- import { ButtonIcon as b } from "./ButtonIcon.js";
5
- import { ButtonLabel as f } from "./ButtonLabel.js";
6
- import '../../assets/ComboButton.css';const v = "_button_d26a8_1", x = "_divider_d26a8_7", B = "_primary_d26a8_14", N = "_secondary_d26a8_15", a = {
7
- button: v,
8
- divider: x,
9
- primary: B,
10
- secondary: N
11
- }, L = ({
12
- variant: n = "solid",
13
- color: s,
14
- size: o = "md",
15
- selected: d = !1,
16
- icon: c,
17
- children: i,
18
- className: m,
19
- ariaLabel: e,
20
- onLabelClick: l,
21
- onIconClick: _,
22
- iconAltText: p
23
- }) => /* @__PURE__ */ u(
24
- t,
1
+ import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
+ import { c as k } from "../../index-L8X2o7IH.js";
3
+ import "react";
4
+ import { ButtonBase as s } from "./ButtonBase.js";
5
+ import { ButtonLabel as v } from "./ButtonLabel.js";
6
+ import { ButtonIcon as x } from "./ButtonIcon.js";
7
+ import "../RootProvider/RootProvider.js";
8
+ import "../Searchbar/AutocompleteBase.js";
9
+ import "../Snackbar/useSnackbar.js";
10
+ import '../../assets/ComboButton.css';const B = "_button_kd2d3_1", h = "_divider_kd2d3_7", N = "_primary_kd2d3_14", C = "_secondary_kd2d3_15", r = {
11
+ button: B,
12
+ divider: h,
13
+ primary: N,
14
+ secondary: C
15
+ }, E = ({
16
+ variant: a = "solid",
17
+ color: n,
18
+ size: t,
19
+ selected: e = !1,
20
+ icon: i,
21
+ iconSize: m,
22
+ iconAltText: c,
23
+ label: p,
24
+ labelSize: d,
25
+ children: l,
26
+ className: _,
27
+ ariaLabel: u,
28
+ onLabelClick: y,
29
+ onIconClick: b
30
+ }) => /* @__PURE__ */ f(
31
+ s,
25
32
  {
26
33
  as: "div",
27
- size: o,
28
- variant: n,
29
- color: s,
30
- selected: d,
31
- className: y(a.button, m),
34
+ size: t,
35
+ variant: a,
36
+ color: n,
37
+ selected: e,
38
+ className: k(r.button, _),
32
39
  tabIndex: -1,
33
40
  children: [
34
- /* @__PURE__ */ r(t, { ariaLabel: e, size: o, onClick: l, className: a.primary, children: /* @__PURE__ */ r(f, { size: o, children: i }) }),
35
- /* @__PURE__ */ r("span", { "data-size": o, className: a.divider }),
36
- /* @__PURE__ */ r(t, { size: o, onClick: _, className: a.secondary, ariaLabel: p, children: /* @__PURE__ */ r(b, { icon: c, size: o }) })
41
+ /* @__PURE__ */ o(s, { ariaLabel: u, size: t, onClick: y, className: r.primary, children: /* @__PURE__ */ o(v, { size: d, children: l || p }) }),
42
+ /* @__PURE__ */ o("span", { "data-size": t, className: r.divider }),
43
+ /* @__PURE__ */ o(
44
+ s,
45
+ {
46
+ onClick: b,
47
+ className: r.secondary,
48
+ ariaLabel: c,
49
+ size: m || d,
50
+ children: i && /* @__PURE__ */ o(x, { icon: i })
51
+ }
52
+ )
37
53
  ]
38
54
  }
39
55
  );
40
56
  export {
41
- L as ComboButton
57
+ E as ComboButton
42
58
  };
@@ -1,34 +1,36 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { c as l } from "../../index-L8X2o7IH.js";
3
- import { ButtonBase as b } from "./ButtonBase.js";
4
- import { ButtonIcon as d } from "./ButtonIcon.js";
5
- import '../../assets/IconButton.css';const p = "_button_hmev5_1", f = {
6
- button: p
7
- }, I = ({
8
- variant: n = "solid",
9
- size: t = "md",
10
- icon: r,
11
- color: s,
2
+ import "../../index-L8X2o7IH.js";
3
+ import "react";
4
+ import { ButtonBase as l } from "./ButtonBase.js";
5
+ import { ButtonIcon as u } from "./ButtonIcon.js";
6
+ import "../RootProvider/RootProvider.js";
7
+ import "../Searchbar/AutocompleteBase.js";
8
+ import "../Snackbar/useSnackbar.js";
9
+ const z = ({
10
+ variant: r = "solid",
11
+ size: i,
12
+ icon: t,
12
13
  iconSize: m,
13
- className: a,
14
- selected: c,
15
- onClick: e,
16
- dataTestId: i,
17
- iconAltText: u
14
+ iconAltText: p,
15
+ color: e,
16
+ className: n,
17
+ selected: a,
18
+ onClick: s,
19
+ dataTestId: d
18
20
  }) => /* @__PURE__ */ o(
19
- b,
21
+ l,
20
22
  {
21
- variant: n,
22
- color: s,
23
- size: t,
24
- className: l(f.button, a),
25
- onClick: e,
26
- selected: c,
27
- "data-testid": i,
28
- "aria-label": u,
29
- children: /* @__PURE__ */ o(d, { icon: r, size: m || t })
23
+ variant: r,
24
+ color: e,
25
+ size: i,
26
+ className: n,
27
+ onClick: s,
28
+ selected: a,
29
+ "data-testid": d,
30
+ "aria-label": p,
31
+ children: t && /* @__PURE__ */ o(u, { icon: t, size: m })
30
32
  }
31
33
  );
32
34
  export {
33
- I as IconButton
35
+ z as IconButton
34
36
  };
@@ -5,9 +5,9 @@ import { Avatar as I } from "../Avatar/Avatar.js";
5
5
  import { AvatarGroup as y } from "../Avatar/AvatarGroup.js";
6
6
  import { Badge as f } from "../Badge/Badge.js";
7
7
  import { ButtonBase as u } from "../Button/ButtonBase.js";
8
- import { Icon as b } from "../Icon/Icon.js";
9
8
  import * as _ from "react";
10
9
  import { forwardRef as v } from "react";
10
+ import { Icon as b } from "../Icon/Icon.js";
11
11
  import "../RootProvider/RootProvider.js";
12
12
  import "../Searchbar/AutocompleteBase.js";
13
13
  import "../Snackbar/useSnackbar.js";
@@ -1,34 +1,33 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { c as n } from "../../index-L8X2o7IH.js";
1
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
+ import { c } from "../../index-L8X2o7IH.js";
3
3
  import "react";
4
4
  import { Skeleton as _ } from "../Skeleton/Skeleton.js";
5
5
  import "../RootProvider/RootProvider.js";
6
6
  import "../Searchbar/AutocompleteBase.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import '../../assets/Icon.css';const f = "_icon_2h14f_1", g = "_shape_2h14f_9", v = "_svg_2h14f_15", N = "_image_2h14f_16", a = {
9
- icon: f,
10
- shape: g,
11
- svg: v,
12
- image: N
13
- }, z = (s) => typeof s == "object" && s !== null && ("svgElement" in s || "iconUrl" in s), E = ({
8
+ import '../../assets/Icon.css';const d = "_icon_2h14f_1", f = "_shape_2h14f_9", g = "_svg_2h14f_15", v = "_image_2h14f_16", a = {
9
+ icon: d,
10
+ shape: f,
11
+ svg: g,
12
+ image: v
13
+ }, y = (s) => typeof s == "object" && s !== null && ("svgElement" in s || "iconUrl" in s), z = ({
14
14
  loading: s,
15
- altText: r,
16
- svgElement: c,
17
- variant: i = "fill",
18
- size: o,
19
- color: m,
20
- theme: l,
15
+ altText: n,
16
+ svgElement: r,
17
+ size: i,
18
+ color: o,
19
+ theme: m,
21
20
  iconUrl: p,
22
21
  className: t,
23
- style: h
24
- }) => c ? /* @__PURE__ */ e("span", { "data-size": o, "data-color": m, "data-theme": l, className: n(a.icon, t), style: h, children: /* @__PURE__ */ d(_, { loading: s, variant: "circle", className: a.shape, children: [
22
+ style: l
23
+ }) => r ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: c(a.icon, t), style: l, children: /* @__PURE__ */ h(_, { loading: s, variant: "circle", className: a.shape, children: [
25
24
  /* @__PURE__ */ e("span", { className: a.shape }),
26
- /* @__PURE__ */ e(c, { "aria-hidden": "true", "alt-label": r, "data-variant": i, className: a.svg })
27
- ] }) }) : p ? /* @__PURE__ */ e("span", { "data-size": o, "data-color": m, "data-theme": l, className: n(a.icon, t), style: h, children: /* @__PURE__ */ d(_, { loading: s, variant: "circle", className: a.shape, children: [
25
+ /* @__PURE__ */ e(r, { "aria-hidden": "true", "alt-label": n, className: a.svg })
26
+ ] }) }) : p ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: c(a.icon, t), style: l, children: /* @__PURE__ */ h(_, { loading: s, variant: "circle", className: a.shape, children: [
28
27
  /* @__PURE__ */ e("span", { className: a.shape }),
29
- /* @__PURE__ */ e("img", { src: p, alt: r, className: a.image, "data-variant": i })
30
- ] }) }) : /* @__PURE__ */ e("span", { className: n(a.icon, t) });
28
+ /* @__PURE__ */ e("img", { src: p, alt: n, className: a.image })
29
+ ] }) }) : /* @__PURE__ */ e("span", { className: c(a.icon, t) });
31
30
  export {
32
- E as Icon,
33
- z as isIconProps
31
+ z as Icon,
32
+ y as isIconProps
34
33
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { isValidElement as p } from "react";
3
- import { Icon as i } from "./Icon.js";
3
+ import { Icon as n } from "./Icon.js";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import { Avatar as f } from "../Avatar/Avatar.js";
6
6
  import { AvatarGroup as c } from "../Avatar/AvatarGroup.js";
@@ -8,25 +8,25 @@ import "../RootProvider/RootProvider.js";
8
8
  import "../Searchbar/AutocompleteBase.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
10
  import { S as l } from "../../XMark-DIqxCTTQ.js";
11
- import '../../assets/IconOrAvatar.css';const u = "_icon_1ez59_1", v = "_avatar_1ez59_2", _ = "_avatarGroup_1ez59_6", e = {
11
+ import '../../assets/IconOrAvatar.css';const u = "_icon_1ez59_1", _ = "_avatar_1ez59_2", v = "_avatarGroup_1ez59_6", e = {
12
12
  icon: u,
13
- avatar: v,
14
- avatarGroup: _
13
+ avatar: _,
14
+ avatarGroup: v
15
15
  };
16
16
  function g(r) {
17
17
  return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || p(r);
18
18
  }
19
- const N = (r) => r.svgElement !== void 0 || r.iconUrl !== void 0, S = ({ loading: r, size: m, icon: t, iconTheme: s, avatar: n, avatarGroup: a }) => {
20
- if (!t && !n && !a)
19
+ const N = (r) => r.svgElement !== void 0 || r.iconUrl !== void 0, S = ({ loading: r, size: i, icon: t, iconTheme: a, avatar: s, avatarGroup: m }) => {
20
+ if (!t && !s && !m)
21
21
  return null;
22
22
  if (r)
23
- return /* @__PURE__ */ o(i, { className: e.icon, svgElement: l, loading: !0 });
23
+ return /* @__PURE__ */ o(n, { className: e.icon, svgElement: l, loading: !0 });
24
24
  if (t)
25
- return N(t) ? /* @__PURE__ */ o(i, { className: e.icon, theme: t.theme || s, variant: "contain", ...t }) : g(t) ? t : /* @__PURE__ */ o(i, { className: e.icon, svgElement: t, variant: "contain", theme: s });
26
- if (n)
27
- return /* @__PURE__ */ o(f, { ...n, size: n.size || m, className: e.avatar });
28
- if (a)
29
- return /* @__PURE__ */ o(c, { ...a, className: e.avatarGroup });
25
+ return N(t) ? /* @__PURE__ */ o(n, { className: e.icon, theme: t.theme || a, ...t }) : g(t) ? t : /* @__PURE__ */ o(n, { className: e.icon, svgElement: t, theme: a });
26
+ if (s)
27
+ return /* @__PURE__ */ o(f, { ...s, size: s.size || i, className: e.avatar });
28
+ if (m)
29
+ return /* @__PURE__ */ o(c, { ...m, className: e.avatarGroup });
30
30
  };
31
31
  export {
32
32
  S as IconOrAvatar
@@ -1,94 +1,101 @@
1
- import { jsxs as p, jsx as e, Fragment as E } from "react/jsx-runtime";
2
- import { c as k } from "../../index-L8X2o7IH.js";
3
- import { useId as w, isValidElement as z } from "react";
4
- import { Icon as D } from "../Icon/Icon.js";
5
- import { Badge as F } from "../Badge/Badge.js";
1
+ import { jsxs as l, jsx as e, Fragment as E } from "react/jsx-runtime";
2
+ import { c as w } from "../../index-L8X2o7IH.js";
3
+ import { useId as z, isValidElement as D } from "react";
4
+ import { Icon as F } from "../Icon/Icon.js";
5
+ import { Badge as H } from "../Badge/Badge.js";
6
6
  import "../RootProvider/RootProvider.js";
7
- import { ListItemLink as H } from "./ListItemLink.js";
8
- import { ListItemLabel as R } from "./ListItemLabel.js";
9
- import { ListItemIcon as U } from "./ListItemIcon.js";
10
- import { ListItemControls as V } from "./ListItemControls.js";
7
+ import { ListItemLink as R } from "./ListItemLink.js";
8
+ import { ListItemLabel as U } from "./ListItemLabel.js";
9
+ import { ListItemIcon as V } from "./ListItemIcon.js";
10
+ import { ListItemControls as q } from "./ListItemControls.js";
11
11
  import { ListItemSelect as A } from "./ListItemSelect.js";
12
12
  import "../Searchbar/AutocompleteBase.js";
13
13
  import "../Snackbar/useSnackbar.js";
14
14
  import { S as G, a as J } from "../../ChevronUp-DR4Lz2Jb.js";
15
15
  import { S as K } from "../../ChevronRight-BbelnTke.js";
16
- import '../../assets/ListItemHeader.css';const M = "_header_hyqf4_1", O = "_label_hyqf4_27", o = {
16
+ import '../../assets/ListItemHeader.css';const M = "_header_1rjb2_1", O = "_label_1rjb2_27", P = "_linkIcon_1rjb2_35", o = {
17
17
  header: M,
18
- label: O
19
- }, ie = ({
20
- as: d,
21
- interactive: s = !0,
22
- color: h,
23
- loading: r,
18
+ label: O,
19
+ linkIcon: P
20
+ }, ne = ({
21
+ as: c,
22
+ interactive: p = !0,
23
+ color: d,
24
+ loading: t,
24
25
  disabled: f,
25
- collapsible: I,
26
- linkIcon: v,
27
- expanded: L,
28
- select: m,
29
- href: b,
30
- onClick: u,
31
- onKeyPress: y,
32
- tabIndex: S,
26
+ collapsible: h,
27
+ linkIcon: I,
28
+ expanded: v,
29
+ select: s,
30
+ href: L,
31
+ onClick: _,
32
+ onKeyPress: b,
33
+ tabIndex: u,
33
34
  size: i,
34
- title: _,
35
- description: x,
36
- icon: C,
37
- active: a,
38
- badge: t,
39
- controls: l,
35
+ title: S,
36
+ description: j,
37
+ icon: k,
38
+ active: m,
39
+ badge: r,
40
+ controls: n,
40
41
  className: N,
41
- children: j,
42
- ariaLabel: q
42
+ children: x,
43
+ ariaLabel: y
43
44
  }) => {
44
- const n = I ? L ? G : J : v ? K : void 0, B = () => t && !r && typeof t == "object" && "label" in t ? /* @__PURE__ */ e(F, { ...t }) : z(t) ? t : null, c = w();
45
- return /* @__PURE__ */ p(
45
+ const a = h ? v ? G : J : I ? K : void 0, C = () => r && !t && typeof r == "object" && "label" in r ? /* @__PURE__ */ e(H, { ...r }) : D(r) ? r : null, B = z();
46
+ return /* @__PURE__ */ l(
46
47
  "header",
47
48
  {
48
- className: k(o.header, N),
49
- "data-color": h,
50
- "data-interactive": s,
49
+ className: w(o.header, N),
50
+ "data-color": d,
51
+ "data-interactive": p,
51
52
  "data-size": i,
52
- "data-has-active-child": a,
53
+ "data-has-active-child": m,
53
54
  children: [
54
55
  /* @__PURE__ */ e(
55
- H,
56
+ R,
56
57
  {
57
- interactive: s,
58
- as: d,
59
- href: b,
60
- onClick: u,
61
- onKeyPress: y,
62
- tabIndex: S,
63
- loading: r,
64
- disabled: f || r,
65
- active: a,
66
- describedby: c,
67
- children: /* @__PURE__ */ e("span", { children: q })
58
+ as: c,
59
+ href: L,
60
+ onClick: _,
61
+ onKeyPress: b,
62
+ tabIndex: u,
63
+ loading: t,
64
+ disabled: f || t,
65
+ active: m,
66
+ ariaLabel: y
68
67
  }
69
68
  ),
70
- m && /* @__PURE__ */ e(A, { ...m, className: o.select }),
71
- /* @__PURE__ */ e(U, { loading: r, icon: C }),
69
+ s && /* @__PURE__ */ e(A, { ...s, className: o.select }),
70
+ /* @__PURE__ */ e(V, { loading: t, icon: k }),
72
71
  /* @__PURE__ */ e(
73
- R,
72
+ U,
74
73
  {
75
74
  size: i,
76
- loading: r,
77
- title: _,
78
- description: x,
79
- id: c,
75
+ loading: t,
76
+ title: S,
77
+ description: j,
78
+ id: B,
80
79
  className: o.label,
81
- children: j
80
+ children: x
82
81
  }
83
82
  ),
84
- /* @__PURE__ */ e(V, { className: o.controls, children: l && !r ? /* @__PURE__ */ e("span", { style: { position: "relative" }, children: l }) : /* @__PURE__ */ p(E, { children: [
85
- B(),
86
- n && /* @__PURE__ */ e(D, { svgElement: n, style: { fontSize: "1.5rem" } })
83
+ /* @__PURE__ */ e(q, { className: o.controls, children: n && !t ? /* @__PURE__ */ e("span", { style: { position: "relative" }, children: n }) : /* @__PURE__ */ l(E, { children: [
84
+ C(),
85
+ a && /* @__PURE__ */ e("span", { className: o.linkIcon, children: /* @__PURE__ */ e(
86
+ F,
87
+ {
88
+ svgElement: a,
89
+ style: {
90
+ fontSize: "1.5rem"
91
+ }
92
+ }
93
+ ) })
87
94
  ] }) })
88
95
  ]
89
96
  }
90
97
  );
91
98
  };
92
99
  export {
93
- ie as ListItemHeader
100
+ ne as ListItemHeader
94
101
  };
@@ -1,37 +1,37 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { c } from "../../index-L8X2o7IH.js";
3
- import '../../assets/ListItemLink.css';const x = "_link_18ajm_1", i = {
4
- link: x
5
- }, u = ({
6
- interactive: e = !1,
7
- as: o,
8
- loading: p,
9
- disabled: f,
10
- selected: l,
11
- href: v,
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { c as m } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/ListItemLink.css';const u = "_link_18ajm_1", s = {
4
+ link: u
5
+ }, h = ({
6
+ as: c,
7
+ loading: l,
8
+ disabled: p,
9
+ selected: v,
10
+ href: f,
12
11
  onClick: t,
13
12
  onKeyPress: a,
14
13
  className: r,
15
- children: m,
16
- active: b,
17
- describedby: n
18
- }) => e ? /* @__PURE__ */ d(
19
- o || "div",
20
- {
21
- className: c(i.link, i.interactive, r),
22
- href: v,
23
- onKeyPress: (s) => {
24
- s.key === "Enter" && (t == null || t()), a == null || a(s);
25
- },
26
- onClick: t,
27
- "data-interactive": e,
28
- "aria-disabled": p || f,
29
- "aria-selected": l,
30
- "aria-describedby": n,
31
- "data-active": b,
32
- children: m
33
- }
34
- ) : /* @__PURE__ */ d("div", { className: c(i.link, r), "aria-describedby": n, children: m });
14
+ active: o,
15
+ ariaLabel: e
16
+ }) => {
17
+ const n = c || "div";
18
+ return n === "div" ? /* @__PURE__ */ i("div", { className: m(s.link, r), children: /* @__PURE__ */ i("span", { children: e }) }) : /* @__PURE__ */ i(
19
+ n,
20
+ {
21
+ className: m(s.link, r),
22
+ href: f,
23
+ onKeyPress: (d) => {
24
+ d.key === "Enter" && (t == null || t()), a == null || a(d);
25
+ },
26
+ onClick: t,
27
+ "data-interactive": "true",
28
+ "aria-disabled": l || p,
29
+ "aria-selected": v,
30
+ "aria-label": e,
31
+ "data-active": o
32
+ }
33
+ );
34
+ };
35
35
  export {
36
- u as ListItemLink
36
+ h as ListItemLink
37
37
  };
@@ -1,18 +1,18 @@
1
1
  "use client";
2
- import { jsxs as v, jsx as n } from "react/jsx-runtime";
2
+ import { jsxs as y, jsx as n } from "react/jsx-runtime";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import * as c from "react";
5
5
  import { forwardRef as m } from "react";
6
- import { Badge as y } from "../Badge/Badge.js";
7
- import { ContextMenu as O } from "../ContextMenu/ContextMenu.js";
8
- import { ListItemControls as w } from "../List/ListItemControls.js";
9
- import { ListItem as h } from "../List/ListItem.js";
6
+ import { Badge as O } from "../Badge/Badge.js";
7
+ import { ContextMenu as w } from "../ContextMenu/ContextMenu.js";
8
+ import { ListItemControls as h } from "../List/ListItemControls.js";
9
+ import { ListItem as I } from "../List/ListItem.js";
10
10
  import "../RootProvider/RootProvider.js";
11
11
  import "../Searchbar/AutocompleteBase.js";
12
12
  import "../Snackbar/useSnackbar.js";
13
- import { Flex as I } from "../Page/Flex.js";
13
+ import { Flex as j } from "../Page/Flex.js";
14
14
  import { u as d } from "../../useId-BVFxCjkq.js";
15
- var j = function(t, o) {
15
+ var x = function(t, o) {
16
16
  var l = {};
17
17
  for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (l[e] = t[e]);
18
18
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -20,8 +20,8 @@ var j = function(t, o) {
20
20
  o.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
21
21
  return l;
22
22
  };
23
- const x = m((t, o) => {
24
- var { title: l, titleId: e } = t, r = j(t, ["title", "titleId"]);
23
+ const E = m((t, o) => {
24
+ var { title: l, titleId: e } = t, r = x(t, ["title", "titleId"]);
25
25
  let i = d();
26
26
  return i = l ? e || "title-" + i : void 0, c.createElement(
27
27
  "svg",
@@ -30,7 +30,7 @@ const x = m((t, o) => {
30
30
  c.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 4.969c1.399-1.242 2.776-1.844 4.125-1.844 1.519 0 2.823.763 3.905 1.845 2.373 2.372 2.207 6.354-1 9.56l-6.5 6.5-.53-.53-.53.53-6.5-6.5c-3.207-3.206-3.373-7.188-1-9.56C5.05 3.888 6.356 3.125 7.875 3.125c1.349 0 2.726.602 4.125 1.844M12 20.5l-.53.53a.75.75 0 0 0 1.06 0zm0-1.06 5.97-5.97c2.793-2.794 2.627-5.812 1-7.44-.919-.918-1.864-1.405-2.845-1.405s-2.177.487-3.595 1.905a.75.75 0 0 1-1.06 0C10.05 5.112 8.856 4.625 7.874 4.625S5.948 5.112 5.03 6.03c-1.627 1.628-1.793 4.646 1 7.44z", clipRule: "evenodd" })
31
31
  );
32
32
  });
33
- var E = function(t, o) {
33
+ var S = function(t, o) {
34
34
  var l = {};
35
35
  for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (l[e] = t[e]);
36
36
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -38,8 +38,8 @@ var E = function(t, o) {
38
38
  o.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
39
39
  return l;
40
40
  };
41
- const S = m((t, o) => {
42
- var { title: l, titleId: e } = t, r = E(t, ["title", "titleId"]);
41
+ const _ = m((t, o) => {
42
+ var { title: l, titleId: e } = t, r = S(t, ["title", "titleId"]);
43
43
  let i = d();
44
44
  return i = l ? e || "title-" + i : void 0, c.createElement(
45
45
  "svg",
@@ -47,7 +47,7 @@ const S = m((t, o) => {
47
47
  l ? c.createElement("title", { id: i }, l) : null,
48
48
  c.createElement("path", { fill: "currentColor", d: "M12 4.969c1.399-1.242 2.776-1.844 4.125-1.844 1.519 0 2.823.763 3.905 1.845 2.373 2.372 2.206 6.354-1 9.56l-6.5 6.5a.75.75 0 0 1-1.06 0l-6.5-6.5c-3.207-3.206-3.373-7.188-1-9.56C5.05 3.888 6.355 3.125 7.874 3.125c1.349 0 2.726.602 4.125 1.844" })
49
49
  );
50
- }), $ = ({
50
+ }), q = ({
51
51
  size: t,
52
52
  expanded: o,
53
53
  type: l,
@@ -59,28 +59,30 @@ const S = m((t, o) => {
59
59
  contextMenu: f,
60
60
  favouriteLabel: p,
61
61
  children: u,
62
- ...g
62
+ interactive: g,
63
+ ...b
63
64
  }) => {
64
- const b = /* @__PURE__ */ v(w, { children: [
65
- /* @__PURE__ */ n(I, { align: "center", spacing: 2, style: { position: "relative", fontSize: "1.25rem" }, children: a ? /* @__PURE__ */ n(y, { color: l === "group" ? "neutral" : l, children: a }) : s ? /* @__PURE__ */ n(S, { "aria-label": p }) : /* @__PURE__ */ n(x, { "aria-hidden": !0 }) }),
66
- f && /* @__PURE__ */ n(O, { ...f, size: "sm" })
65
+ const v = /* @__PURE__ */ y(h, { children: [
66
+ /* @__PURE__ */ n(j, { align: "center", spacing: 2, style: { position: "relative", fontSize: "1.25rem" }, children: a ? /* @__PURE__ */ n(O, { color: l === "group" ? "neutral" : l, children: a }) : s ? /* @__PURE__ */ n(_, { "aria-label": p }) : /* @__PURE__ */ n(E, { "aria-hidden": !0 }) }),
67
+ f && /* @__PURE__ */ n(w, { ...f, size: "sm" })
67
68
  ] });
68
69
  return /* @__PURE__ */ n(
69
- h,
70
+ I,
70
71
  {
71
- ...g,
72
+ ...b,
72
73
  size: t,
73
74
  icon: e,
74
75
  title: r,
75
76
  description: o ? void 0 : i,
76
77
  expanded: o,
77
78
  selected: o,
78
- badge: !o && b,
79
+ badge: !o && v,
79
80
  linkIcon: !0,
81
+ interactive: g,
80
82
  children: u
81
83
  }
82
84
  );
83
85
  };
84
86
  export {
85
- $ as AccountListItem
87
+ q as AccountListItem
86
88
  };
@@ -1,10 +1,10 @@
1
- import { SvgElement } from '../Icon';
2
- import { ButtonBaseProps } from './ButtonBase';
1
+ import { ButtonBaseProps, ButtonIconProps, ButtonSize } from '..';
3
2
  export interface ButtonProps extends Partial<ButtonBaseProps> {
4
- icon?: SvgElement;
3
+ icon?: ButtonIconProps['icon'];
4
+ iconSize?: ButtonSize;
5
5
  ariaLabel?: string;
6
6
  loading?: boolean;
7
- loadingText?: string;
8
7
  label?: string;
8
+ labelSize?: ButtonSize;
9
9
  }
10
- export declare const Button: ({ variant, color, size, selected, icon, href, label, children, className, loading, loadingText, ariaLabel, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Button: ({ variant, color, size, selected, icon, iconSize, href, label, labelSize, children, className, loading, ariaLabel, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ variant, color, size, selected, icon, href, label, children, className, loading, loadingText, ariaLabel, ...rest }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ variant, color, size, selected, icon, iconSize, href, label, labelSize, children, className, loading, ariaLabel, ...rest }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
5
5
  tags: string[];
6
6
  parameters: {};
7
7
  args: {
@@ -17,6 +17,7 @@ export declare const Text: Story;
17
17
  export declare const Loading: Story;
18
18
  export declare const Disabled: Story;
19
19
  export declare const Sizes: (args: Story) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const LabelSize: (args: Story) => import("react/jsx-runtime").JSX.Element;
20
21
  export declare const Variants: (args: Story) => import("react/jsx-runtime").JSX.Element;
21
22
  export declare const ToolbarButtons: (args: Story) => import("react/jsx-runtime").JSX.Element;
22
23
  export declare const Specimens: (args: Story) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
- import { SvgElement } from '../Icon';
2
- import { ButtonSize } from './ButtonBase';
1
+ import { ButtonSize, IconProps, SvgElement } from '..';
3
2
  export interface ButtonIconProps {
4
- icon: SvgElement;
5
- size: ButtonSize;
3
+ icon: IconProps | SvgElement;
6
4
  iconAltText?: string;
5
+ size?: ButtonSize;
6
+ altText?: string;
7
7
  className?: string;
8
8
  }
9
- export declare const ButtonIcon: ({ className, size, icon, iconAltText }: ButtonIconProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ButtonIcon: ({ icon, size, iconAltText, className }: ButtonIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ButtonSize } from './ButtonBase';
3
3
  export interface ButtonLabelProps {
4
- size: ButtonSize;
4
+ size?: ButtonSize;
5
5
  className?: string;
6
- children: ReactNode;
6
+ children?: ReactNode;
7
7
  }
8
8
  export declare const ButtonLabel: ({ className, size, children }: ButtonLabelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,14 @@
1
1
  import { MouseEventHandler } from 'react';
2
- import { SvgElement } from '../Icon';
3
- import { ButtonBaseProps } from './ButtonBase';
2
+ import { ButtonBaseProps, ButtonIconProps, ButtonSize } from '..';
4
3
  export interface ComboButtonProps extends Omit<ButtonBaseProps, 'onClick'> {
5
- icon: SvgElement;
4
+ icon: ButtonIconProps['icon'];
5
+ iconSize?: ButtonSize;
6
6
  iconAltText?: string;
7
7
  ariaLabel?: string;
8
8
  onIconClick?: MouseEventHandler<HTMLButtonElement>;
9
9
  onLabelClick?: MouseEventHandler<HTMLButtonElement>;
10
10
  disabled?: boolean;
11
+ label?: string;
12
+ labelSize?: ButtonSize;
11
13
  }
12
- export declare const ComboButton: ({ variant, color, size, selected, icon, children, className, ariaLabel, onLabelClick, onIconClick, iconAltText, }: ComboButtonProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const ComboButton: ({ variant, color, size, selected, icon, iconSize, iconAltText, label, labelSize, children, className, ariaLabel, onLabelClick, onIconClick, }: ComboButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,7 @@
1
1
  import { MouseEventHandler } from 'react';
2
- import { SvgElement } from '../Icon';
3
- import { ButtonColor, ButtonSize, ButtonVariant } from './ButtonBase';
2
+ import { ButtonColor, ButtonIconProps, ButtonSize, ButtonVariant } from '..';
4
3
  export interface IconButtonProps {
5
- icon: SvgElement;
4
+ icon: ButtonIconProps['icon'];
6
5
  iconAltText: string;
7
6
  color?: ButtonColor;
8
7
  size?: ButtonSize;
@@ -13,4 +12,4 @@ export interface IconButtonProps {
13
12
  onClick?: MouseEventHandler;
14
13
  dataTestId?: string;
15
14
  }
16
- export declare const IconButton: ({ variant, size, icon, color, iconSize, className, selected, onClick, dataTestId, iconAltText, }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const IconButton: ({ variant, size, icon, iconSize, iconAltText, color, className, selected, onClick, dataTestId, }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,6 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { Color, Size, Theme } from '..';
3
3
  export type SvgElement = React.ComponentType<React.SVGProps<SVGSVGElement>>;
4
- export type IconVariant = 'fill' | 'contain' | 'custom';
5
4
  export type IconSize = Size | undefined;
6
5
  export type IconColor = Color;
7
6
  export type IconTheme = Theme;
@@ -10,7 +9,6 @@ export interface IconProps {
10
9
  iconUrl?: string;
11
10
  altText?: string;
12
11
  loading?: boolean;
13
- variant?: IconVariant;
14
12
  size?: IconSize;
15
13
  color?: IconColor;
16
14
  theme?: IconTheme;
@@ -18,4 +16,4 @@ export interface IconProps {
18
16
  style?: CSSProperties;
19
17
  }
20
18
  export declare const isIconProps: (icon: unknown) => icon is IconProps;
21
- export declare const Icon: ({ loading, altText, svgElement: SvgElement, variant, size, color, theme, iconUrl, className, style, }: IconProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const Icon: ({ loading, altText, svgElement: SvgElement, size, color, theme, iconUrl, className, style, }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -31,4 +31,27 @@ export interface ListItemInputProps extends ListItemProps {
31
31
  /** Child items */
32
32
  items?: ListItemProps[];
33
33
  }
34
- export declare const ListItem: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
34
+ /**
35
+ * `ListItem` is a compound component that combines `ListItemBase` and `ListItemHeader`
36
+ * to render a stylized, optionally interactive list item with support for various visual states
37
+ * such as loading, selection, and expansion. It supports customization of appearance through variants,
38
+ * shadows, borders, and iconography.
39
+ *
40
+ * @param {Object} props - Component props
41
+ * @param {string} [props.id] - Unique identifier for the list item.
42
+ * @param {'default' | 'subtle' | 'tinted'} [props.variant='default'] - Visual style variant of the item.
43
+ * @param {string} [props.className] - Custom class name for additional styling.
44
+ * @param {boolean} [props.loading] - Whether to show a loading placeholder.
45
+ * @param {ReactNode | () => ReactElement} [props.label] - Custom label, can be a node or a function returning a ReactElement.
46
+ * @param {ReactNode} [props.title] - Title content of the item.
47
+ * @param {ReactNode} [props.description] - Optional description beneath the title.
48
+ * @param {string} [props.ariaLabel] - ARIA label used for accessibility, defaults to `title` if not provided.
49
+ * @param {ReactNode} [props.icon] - Icon element displayed alongside the content.
50
+ * @param {ReactNode} [props.badge] - Optional badge displayed near the title.
51
+ * @param {boolean} [props.linkIcon=false] - Whether to display a link icon.
52
+ * @param {...ListItemBaseProps} props - Additional props inherited from `ListItemBase` for layout and interaction.
53
+ * @param {...ListItemHeaderProps} props - Additional props inherited from `ListItemHeader` for header controls and behavior.
54
+ *
55
+ * @returns {ReactElement} Rendered ListItem component.
56
+ */
57
+ export declare const ListItem: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => ReactElement;
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
2
2
  import { ListItemProps } from '../';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
5
+ component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => React.ReactElement;
6
6
  parameters: {};
7
7
  args: {
8
8
  id: string;
@@ -1,17 +1,15 @@
1
- import { ElementType, KeyboardEventHandler, ReactNode } from 'react';
1
+ import { ElementType, KeyboardEventHandler } from 'react';
2
2
  export interface ListItemLinkProps {
3
- interactive?: boolean;
4
3
  as?: ElementType;
5
4
  href?: string;
6
5
  onClick?: () => void;
7
6
  onKeyPress?: KeyboardEventHandler;
7
+ ariaLabel?: string;
8
8
  tabIndex?: number;
9
9
  loading?: boolean;
10
10
  disabled?: boolean;
11
11
  selected?: boolean;
12
12
  className?: string;
13
- children?: ReactNode;
14
13
  active?: boolean;
15
- describedby?: string;
16
14
  }
17
- export declare const ListItemLink: ({ interactive, as, loading, disabled, selected, href, onClick, onKeyPress, className, children, active, describedby, }: ListItemLinkProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const ListItemLink: ({ as, loading, disabled, selected, href, onClick, onKeyPress, className, active, ariaLabel, }: ListItemLinkProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { ListItemProps } from '../';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => React.ReactElement;
5
5
  parameters: {};
6
6
  args: {
7
7
  id: string;
@@ -1,6 +1,6 @@
1
1
  import { ElementType, ReactNode } from 'react';
2
2
  import { AvatarGroupProps, AvatarProps, BadgeProps, SvgElement } from '..';
3
- import { MenuItemColor, MenuItemIconProps, MenuItemSize, MenuItemTheme } from './';
3
+ import { MenuItemColor, MenuItemIconProps, MenuItemLabelProps, MenuItemSize, MenuItemTheme } from './';
4
4
  export interface MenuItemProps {
5
5
  id: string;
6
6
  type?: string;
@@ -18,8 +18,8 @@ export interface MenuItemProps {
18
18
  selected?: boolean;
19
19
  disabled?: boolean;
20
20
  groupId?: string | number;
21
- title?: string;
22
- description?: string;
21
+ title?: MenuItemLabelProps['title'];
22
+ description?: MenuItemLabelProps['description'];
23
23
  icon?: MenuItemIconProps['icon'];
24
24
  iconTheme?: MenuItemIconProps['theme'];
25
25
  iconBadge?: MenuItemIconProps['badge'];
@@ -9,4 +9,4 @@ export interface AccountListItemProps extends ListItemProps {
9
9
  label?: string;
10
10
  favouriteLabel?: string;
11
11
  }
12
- export declare const AccountListItem: ({ size, expanded, type, icon, title, description, label, favourite, contextMenu, favouriteLabel, children, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const AccountListItem: ({ size, expanded, type, icon, title, description, label, favourite, contextMenu, favouriteLabel, children, interactive, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ size, expanded, type, icon, title, description, label, favourite, contextMenu, favouriteLabel, children, ...item }: import('./AccountListItem').AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ size, expanded, type, icon, title, description, label, favourite, contextMenu, favouriteLabel, children, interactive, ...item }: import('./AccountListItem').AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
5
5
  tags: string[];
6
6
  parameters: {};
7
7
  args: {
@@ -48,7 +48,6 @@ declare const meta: {
48
48
  href?: string | undefined;
49
49
  onClick?: (() => void) | undefined;
50
50
  onKeyPress?: React.KeyboardEventHandler | undefined;
51
- describedby?: string | undefined;
52
51
  }>) => import("react/jsx-runtime").JSX.Element)[];
53
52
  };
54
53
  export default meta;
@@ -38,7 +38,6 @@ declare const meta: {
38
38
  href?: string | undefined;
39
39
  onClick?: (() => void) | undefined;
40
40
  onKeyPress?: React.KeyboardEventHandler | undefined;
41
- describedby?: string | undefined;
42
41
  }>) => import("react/jsx-runtime").JSX.Element)[];
43
42
  };
44
43
  export default meta;
@@ -19,7 +19,6 @@ declare const meta: {
19
19
  children?: React.ReactNode | (() => React.ReactElement);
20
20
  border?: import('..').ListItemBorder | undefined;
21
21
  loading?: boolean | undefined;
22
- variant?: import('..').ListItemVariant | undefined;
23
22
  size?: import('..').ListItemSize | undefined;
24
23
  color?: import('..').ListItemColor | undefined;
25
24
  className?: string | undefined;
@@ -27,6 +26,7 @@ declare const meta: {
27
26
  as?: React.ElementType | undefined;
28
27
  label?: React.ReactNode | (() => React.ReactElement);
29
28
  select?: import('..').ListItemSelectProps | undefined;
29
+ variant?: import('..').ListItemVariant | undefined;
30
30
  hidden?: boolean | undefined;
31
31
  expanded?: boolean | undefined;
32
32
  active?: boolean | undefined;
@@ -44,7 +44,6 @@ declare const meta: {
44
44
  collapsible?: boolean | undefined;
45
45
  onClick?: (() => void) | undefined;
46
46
  onKeyPress?: React.KeyboardEventHandler | undefined;
47
- describedby?: string | undefined;
48
47
  };
49
48
  };
50
49
  export default meta;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.28.1",
3
+ "version": "0.28.2",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",
@@ -1 +0,0 @@
1
- ._button_hmev5_1{display:flex;align-items:center;justify-content:center;border-radius:2px}._button_hmev5_1[data-size=xs]{width:2.25rem;height:2.25rem}._button_hmev5_1[data-size=sm]{width:2.625rem;height:2.625rem}._button_hmev5_1[data-size=md]{width:3rem;height:3rem}._button_hmev5_1[data-size=lg]{width:3.5rem;height:3.5rem}