@altinn/altinn-components 0.10.0 → 0.10.1

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 (45) hide show
  1. package/dist/assets/DialogHeading.css +1 -1
  2. package/dist/assets/DialogListItem.css +1 -1
  3. package/dist/assets/ListItemBase.css +1 -1
  4. package/dist/assets/ListItemHeader.css +1 -1
  5. package/dist/assets/ListItemLabel.css +1 -1
  6. package/dist/assets/ListItemLink.css +1 -0
  7. package/dist/assets/ListItemMedia.css +1 -1
  8. package/dist/assets/ListItemSelect.css +1 -1
  9. package/dist/components/AccessAreaList/AccessAreaListItem.js +6 -6
  10. package/dist/components/Dialog/DialogByline.d.ts +1 -1
  11. package/dist/components/Dialog/DialogHeading.d.ts +4 -4
  12. package/dist/components/Dialog/DialogHeading.js +7 -7
  13. package/dist/components/Dialog/DialogLabel.d.ts +3 -3
  14. package/dist/components/Dialog/DialogLabel.js +1 -1
  15. package/dist/components/Dialog/DialogListItem.d.ts +9 -20
  16. package/dist/components/Dialog/DialogListItem.js +76 -83
  17. package/dist/components/Dialog/index.d.ts +0 -1
  18. package/dist/components/Dialog/index.js +27 -29
  19. package/dist/components/List/List.d.ts +4 -3
  20. package/dist/components/List/List.js +12 -4
  21. package/dist/components/List/ListItem.d.ts +2 -0
  22. package/dist/components/List/ListItem.stories.js +88 -80
  23. package/dist/components/List/ListItemBase.d.ts +1 -1
  24. package/dist/components/List/ListItemBase.js +8 -8
  25. package/dist/components/List/ListItemHeader.d.ts +5 -13
  26. package/dist/components/List/ListItemHeader.js +48 -59
  27. package/dist/components/List/ListItemHeader.stories.js +33 -41
  28. package/dist/components/List/ListItemLabel.js +6 -6
  29. package/dist/components/List/ListItemLink.d.ts +16 -0
  30. package/dist/components/List/ListItemLink.js +35 -0
  31. package/dist/components/List/ListItemMedia.d.ts +2 -3
  32. package/dist/components/List/ListItemMedia.js +21 -29
  33. package/dist/components/List/ListItemSelect.js +9 -9
  34. package/dist/components/List/index.d.ts +1 -0
  35. package/dist/components/List/index.js +18 -16
  36. package/dist/components/ResourceList/ResourceList.d.ts +1 -1
  37. package/dist/components/ResourceList/ResourceList.js +1 -1
  38. package/dist/components/ResourceList/ResourceList.stories.js +2 -2
  39. package/dist/components/Searchbar/Searchbar.stories.js +10 -8
  40. package/dist/components/index.js +104 -104
  41. package/dist/index.js +123 -123
  42. package/package.json +1 -1
  43. package/dist/assets/DialogBorder.css +0 -1
  44. package/dist/components/Dialog/DialogBorder.d.ts +0 -10
  45. package/dist/components/Dialog/DialogBorder.js +0 -8
@@ -1,36 +1,36 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { Fragment as s, useState as g } from "react";
2
+ import { Fragment as s, useState as k } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
5
  import "../Autocomplete/AutocompleteBase.js";
6
- import { Button as k } from "../Button/Button.js";
7
- import { MetaItem as r } from "../Meta/MetaItem.js";
6
+ import { Button as b } from "../Button/Button.js";
7
+ import { MetaItem as i } from "../Meta/MetaItem.js";
8
8
  import "../RootProvider/RootProvider.js";
9
- import { ListItemBase as b } from "./ListItemBase.js";
10
- import { ListItemHeader as y } from "./ListItemHeader.js";
11
- import { ListItem as t } from "./ListItem.js";
12
- import { ListBase as d } from "./ListBase.js";
13
- import { List as v } from "./List.js";
14
- const l = ["xl", "lg", "md", "sm", "xs"], S = {
9
+ import { ListItemBase as y } from "./ListItemBase.js";
10
+ import { ListItemHeader as v } from "./ListItemHeader.js";
11
+ import { ListItem as r } from "./ListItem.js";
12
+ import { ListBase as c } from "./ListBase.js";
13
+ import { List as I } from "./List.js";
14
+ const f = ["neutral", "accent", "transparent"], l = ["xl", "lg", "md", "sm", "xs"], j = {
15
15
  title: "List/ListItem",
16
- component: t,
16
+ component: r,
17
17
  tags: ["autodocs"],
18
18
  parameters: {},
19
19
  args: {
20
20
  id: "id",
21
21
  title: "Title",
22
22
  description: "Description",
23
- size: "md"
23
+ size: "sm"
24
24
  }
25
- }, _ = {
25
+ }, P = {
26
26
  args: {}
27
- }, j = (n) => /* @__PURE__ */ a(d, { children: [
28
- /* @__PURE__ */ e(t, { ...n }),
29
- /* @__PURE__ */ e(r, { children: "No media" }),
30
- /* @__PURE__ */ e(t, { ...n, icon: "teddy-bear" }),
31
- /* @__PURE__ */ e(r, { children: "Icon" }),
27
+ }, G = (n) => /* @__PURE__ */ a(c, { children: [
28
+ /* @__PURE__ */ e(r, { ...n }),
29
+ /* @__PURE__ */ e(i, { children: "No media" }),
30
+ /* @__PURE__ */ e(r, { ...n, icon: "teddy-bear" }),
31
+ /* @__PURE__ */ e(i, { children: "Icon" }),
32
32
  /* @__PURE__ */ e(
33
- t,
33
+ r,
34
34
  {
35
35
  ...n,
36
36
  avatar: {
@@ -39,9 +39,9 @@ const l = ["xl", "lg", "md", "sm", "xs"], S = {
39
39
  }
40
40
  }
41
41
  ),
42
- /* @__PURE__ */ e(r, { children: "Person" }),
42
+ /* @__PURE__ */ e(i, { children: "Person" }),
43
43
  /* @__PURE__ */ e(
44
- t,
44
+ r,
45
45
  {
46
46
  ...n,
47
47
  avatar: {
@@ -50,9 +50,9 @@ const l = ["xl", "lg", "md", "sm", "xs"], S = {
50
50
  }
51
51
  }
52
52
  ),
53
- /* @__PURE__ */ e(r, { children: "Company" }),
53
+ /* @__PURE__ */ e(i, { children: "Company" }),
54
54
  /* @__PURE__ */ e(
55
- t,
55
+ r,
56
56
  {
57
57
  ...n,
58
58
  avatar: {
@@ -62,9 +62,9 @@ const l = ["xl", "lg", "md", "sm", "xs"], S = {
62
62
  }
63
63
  }
64
64
  ),
65
- /* @__PURE__ */ e(r, { children: "Logo" }),
65
+ /* @__PURE__ */ e(i, { children: "Logo" }),
66
66
  /* @__PURE__ */ e(
67
- t,
67
+ r,
68
68
  {
69
69
  ...n,
70
70
  avatarGroup: {
@@ -85,9 +85,9 @@ const l = ["xl", "lg", "md", "sm", "xs"], S = {
85
85
  }
86
86
  }
87
87
  ),
88
- /* @__PURE__ */ e(r, { children: "People group" }),
88
+ /* @__PURE__ */ e(i, { children: "People group" }),
89
89
  /* @__PURE__ */ e(
90
- t,
90
+ r,
91
91
  {
92
92
  ...n,
93
93
  avatarGroup: {
@@ -108,78 +108,78 @@ const l = ["xl", "lg", "md", "sm", "xs"], S = {
108
108
  }
109
109
  }
110
110
  ),
111
- /* @__PURE__ */ e(r, { children: "Company group" })
112
- ] }), P = (n) => /* @__PURE__ */ e(d, { children: l == null ? void 0 : l.map((i) => /* @__PURE__ */ a(s, { children: [
113
- /* @__PURE__ */ e(t, { ...n, icon: "teddy-bear", size: i, loading: !0 }),
114
- /* @__PURE__ */ e(t, { ...n, icon: "teddy-bear", size: i, loading: !1 }),
115
- /* @__PURE__ */ e(r, { children: i })
116
- ] }, i)) }), G = (n) => /* @__PURE__ */ a(d, { children: [
117
- /* @__PURE__ */ e(t, { ...n, linkIcon: "chevron-right" }),
118
- /* @__PURE__ */ e(r, { children: "Link icon, emphasising that this will take you somewhere" }),
119
- /* @__PURE__ */ e(t, { ...n, linkIcon: "chevron-right", linkText: "Åpne" }),
120
- /* @__PURE__ */ e(r, { children: "Link icon + link text, emphasising that this will take you somewhere" }),
121
- /* @__PURE__ */ e(t, { ...n, collapsible: !0, badge: { label: "Admin" } }),
122
- /* @__PURE__ */ e(r, { children: "Collapsible item with badge" }),
123
- /* @__PURE__ */ e(t, { ...n, collapsible: !0, expanded: !0 }),
124
- /* @__PURE__ */ e(r, { children: "Collapsible and expanded item" }),
111
+ /* @__PURE__ */ e(i, { children: "Company group" })
112
+ ] }), N = (n) => /* @__PURE__ */ e(c, { children: l.map((t) => /* @__PURE__ */ a(s, { children: [
113
+ /* @__PURE__ */ e(r, { ...n, icon: "teddy-bear", size: t, loading: !0 }),
114
+ /* @__PURE__ */ e(r, { ...n, icon: "teddy-bear", size: t, loading: !1 }),
115
+ /* @__PURE__ */ e(i, { children: t })
116
+ ] }, t)) }), Q = (n) => /* @__PURE__ */ a(c, { children: [
117
+ /* @__PURE__ */ e(r, { ...n, linkIcon: "chevron-right" }),
118
+ /* @__PURE__ */ e(i, { children: "Link icon, emphasising that this will take you somewhere" }),
119
+ /* @__PURE__ */ e(r, { ...n, linkIcon: "chevron-right", linkText: "Åpne" }),
120
+ /* @__PURE__ */ e(i, { children: "Link icon + link text, emphasising that this will take you somewhere" }),
121
+ /* @__PURE__ */ e(r, { ...n, collapsible: !0, badge: { label: "Admin" } }),
122
+ /* @__PURE__ */ e(i, { children: "Collapsible item with badge" }),
123
+ /* @__PURE__ */ e(r, { ...n, collapsible: !0, expanded: !0 }),
124
+ /* @__PURE__ */ e(i, { children: "Collapsible and expanded item" }),
125
125
  /* @__PURE__ */ e(
126
- t,
126
+ r,
127
127
  {
128
128
  ...n,
129
129
  badge: { label: "Admin" },
130
130
  linkIcon: "chevron-right",
131
131
  menu: {
132
+ id: "menu",
132
133
  items: [
133
- { title: "Innstillinger", icon: "cog" },
134
- { title: "Aktivitetslogg", icon: "clock-dashed" }
134
+ { id: "settings", title: "Innstillinger", icon: "cog" },
135
+ { id: "log", title: "Aktivitetslogg", icon: "clock-dashed" }
135
136
  ]
136
137
  }
137
138
  }
138
139
  ),
139
- /* @__PURE__ */ e(r, { children: "List item with badge, linkIcon and context menu" }),
140
+ /* @__PURE__ */ e(i, { children: "List item with badge, linkIcon and context menu" }),
140
141
  /* @__PURE__ */ e(
141
- t,
142
+ r,
142
143
  {
143
144
  ...n,
144
- controls: /* @__PURE__ */ e("div", { style: { position: "absolute", right: 0, display: "flex", alignItems: "center", margin: "0.625rem" }, children: /* @__PURE__ */ e(k, { icon: "pencil", size: "sm", variant: "outline", children: "Rediger" }) })
145
+ controls: /* @__PURE__ */ e("div", { style: { position: "absolute", right: 0, display: "flex", alignItems: "center", margin: "0.625rem" }, children: /* @__PURE__ */ e(b, { icon: "pencil", size: "sm", variant: "outline", children: "Rediger" }) })
145
146
  }
146
147
  ),
147
- /* @__PURE__ */ e(r, { children: "List item with custom controls" })
148
- ] }), N = (n) => /* @__PURE__ */ e(d, { children: l == null ? void 0 : l.map((i) => /* @__PURE__ */ a(s, { children: [
148
+ /* @__PURE__ */ e(i, { children: "List item with custom controls" })
149
+ ] }), Y = (n) => /* @__PURE__ */ e(c, { children: l == null ? void 0 : l.map((t) => /* @__PURE__ */ a(s, { children: [
149
150
  /* @__PURE__ */ e(
150
- t,
151
+ r,
151
152
  {
152
153
  ...n,
153
- size: i,
154
+ size: t,
154
155
  select: {
155
156
  checked: !1
156
157
  }
157
158
  }
158
159
  ),
159
160
  /* @__PURE__ */ e(
160
- t,
161
+ r,
161
162
  {
162
163
  ...n,
163
- size: i,
164
+ size: t,
164
165
  select: {
165
166
  checked: !0
166
167
  },
167
168
  selected: !0
168
169
  }
169
170
  ),
170
- /* @__PURE__ */ e(r, { children: i })
171
- ] }, i)) }), Q = (n) => /* @__PURE__ */ a(d, { children: [
172
- /* @__PURE__ */ e(t, { ...n }),
173
- /* @__PURE__ */ e(r, { children: "Default" }),
174
- /* @__PURE__ */ e(t, { ...n, color: "accent" }),
175
- /* @__PURE__ */ e(r, { children: "Accent" })
176
- ] }), Y = (n) => /* @__PURE__ */ e(d, { children: l == null ? void 0 : l.map((i) => /* @__PURE__ */ a(s, { children: [
177
- /* @__PURE__ */ e(t, { ...n, icon: "teddy-bear", size: i, selected: i === (n == null ? void 0 : n.size), linkIcon: "chevron-right" }),
178
- /* @__PURE__ */ e(r, { children: i })
179
- ] }, i)) }), F = (n) => {
180
- const [i, p] = g(!1), m = () => {
171
+ /* @__PURE__ */ e(i, { children: t })
172
+ ] }, t)) }), F = (n) => /* @__PURE__ */ e(c, { children: f.map((t) => /* @__PURE__ */ a(s, { children: [
173
+ /* @__PURE__ */ e(r, { ...n, icon: "teddy-bear", color: t, linkIcon: "chevron-right" }),
174
+ /* @__PURE__ */ e(i, { children: t })
175
+ ] }, t)) }), J = (n) => /* @__PURE__ */ e(c, { children: l == null ? void 0 : l.map((t) => /* @__PURE__ */ a(s, { children: [
176
+ /* @__PURE__ */ e(r, { ...n, icon: "teddy-bear", size: t, linkIcon: "chevron-right" }),
177
+ /* @__PURE__ */ e(r, { ...n, avatar: { name: "Avatar" }, size: t, linkIcon: "chevron-right" }),
178
+ /* @__PURE__ */ e(i, { children: t })
179
+ ] }, t)) }), q = (n) => {
180
+ const [t, p] = k(!1), m = () => {
181
181
  p((o) => !o);
182
- }, c = [
182
+ }, d = [
183
183
  {
184
184
  name: "Per Ove Ludvigsen",
185
185
  role: "Sportlig leder",
@@ -200,7 +200,7 @@ const l = ["xl", "lg", "md", "sm", "xs"], S = {
200
200
  role: "Toppspillerutvikler",
201
201
  rights: "Ingen rettigheter"
202
202
  }
203
- ], h = c == null ? void 0 : c.map((o) => ({
203
+ ], h = d.map((o, g) => ({
204
204
  avatar: {
205
205
  ...o,
206
206
  type: "person"
@@ -208,36 +208,44 @@ const l = ["xl", "lg", "md", "sm", "xs"], S = {
208
208
  title: o == null ? void 0 : o.name,
209
209
  description: o == null ? void 0 : o.role,
210
210
  badge: { label: o == null ? void 0 : o.rights },
211
- linkIcon: "menu-elipsis-horizontal"
211
+ menu: {
212
+ id: "menu" + g,
213
+ items: [
214
+ {
215
+ id: "item1",
216
+ title: "Hallo"
217
+ }
218
+ ]
219
+ }
212
220
  })), u = {
213
- items: c == null ? void 0 : c.map((o) => ({
221
+ items: d.map((o) => ({
214
222
  name: o == null ? void 0 : o.name,
215
223
  type: "person"
216
224
  }))
217
225
  };
218
- return /* @__PURE__ */ a(b, { children: [
226
+ return /* @__PURE__ */ a(y, { children: [
219
227
  /* @__PURE__ */ e(
220
- y,
228
+ v,
221
229
  {
222
230
  ...n,
223
231
  avatarGroup: u,
224
232
  collapsible: !0,
225
- expanded: i,
233
+ expanded: t,
226
234
  onClick: m,
227
235
  as: "button"
228
236
  }
229
237
  ),
230
- i && /* @__PURE__ */ e(v, { size: "sm", spacing: "none", items: h })
238
+ t && /* @__PURE__ */ e(I, { spacing: "none", defaultItemSize: "xs", defaultItemColor: "transparent", items: h })
231
239
  ] });
232
240
  };
233
241
  export {
234
- F as Collapsible,
235
- Q as Colors,
236
- G as Controls,
237
- _ as Default,
238
- P as Loading,
239
- j as MediaTypes,
240
- N as Selectable,
241
- Y as Sizes,
242
- S as default
242
+ q as Collapsible,
243
+ F as Colors,
244
+ Q as Controls,
245
+ P as Default,
246
+ N as Loading,
247
+ G as MediaTypes,
248
+ Y as Selectable,
249
+ J as Sizes,
250
+ j as default
243
251
  };
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  export type ListItemSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
3
  export type ListItemVariant = 'solid' | 'dotted';
4
- export type ListItemColor = 'subtle' | 'accent' | 'transparent';
4
+ export type ListItemColor = 'neutral' | 'accent' | 'transparent';
5
5
  export type ListItemShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
6
  export interface ListItemBaseProps {
7
7
  color?: ListItemColor;
@@ -1,14 +1,14 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import '../../assets/ListItemBase.css';const p = "_item_19vbq_1", x = {
2
+ import '../../assets/ListItemBase.css';const p = "_item_1grve_1", x = {
3
3
  item: p
4
- }, f = ({
4
+ }, v = ({
5
5
  size: e,
6
6
  variant: t = "solid",
7
- color: a = "subtle",
7
+ color: a = "neutral",
8
8
  shadow: s = "xs",
9
9
  loading: i,
10
- disabled: d,
11
- hidden: r = !1,
10
+ disabled: r,
11
+ hidden: d = !1,
12
12
  active: n = !1,
13
13
  selected: l,
14
14
  expanded: o,
@@ -22,13 +22,13 @@ import '../../assets/ListItemBase.css';const p = "_item_19vbq_1", x = {
22
22
  "data-size": e,
23
23
  "data-shadow": a === "transparent" ? "none" : s,
24
24
  "data-active": n,
25
- "aria-hidden": r,
26
- "aria-disabled": d || i,
25
+ "aria-hidden": d,
26
+ "aria-disabled": r || i,
27
27
  "aria-selected": l,
28
28
  "aria-expanded": o,
29
29
  children: m
30
30
  }
31
31
  );
32
32
  export {
33
- f as ListItemBase
33
+ v as ListItemBase
34
34
  };
@@ -1,24 +1,16 @@
1
- import { ElementType, KeyboardEventHandler, ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { AvatarGroupProps, AvatarProps } from '../Avatar';
3
3
  import { BadgeProps } from '../Badge';
4
4
  import { IconName } from '../Icon';
5
- import { ListItemColor, ListItemSize } from './ListItemBase';
5
+ import { ListItemSize } from './ListItemBase';
6
+ import { ListItemLinkProps } from './ListItemLink';
6
7
  import { ListItemMenuProps } from './ListItemMenu';
7
8
  import { ListItemSelectProps } from './ListItemSelect';
8
- export interface ListItemHeaderProps {
9
- as?: ElementType;
10
- href?: string;
11
- onClick?: () => void;
12
- onKeyPress?: KeyboardEventHandler;
13
- tabIndex?: number;
9
+ export interface ListItemHeaderProps extends ListItemLinkProps {
14
10
  /** Header is loading */
15
11
  loading?: boolean;
16
- /** Header is disabled */
17
- disabled?: boolean;
18
12
  /** Header size */
19
13
  size?: ListItemSize;
20
- /** Optional color */
21
- color?: ListItemColor;
22
14
  /** Optional classname */
23
15
  className?: string;
24
16
  /** Select controls */
@@ -50,4 +42,4 @@ export interface ListItemHeaderProps {
50
42
  /** Custom label */
51
43
  children?: ReactNode;
52
44
  }
53
- export declare const ListItemHeader: ({ as, loading, disabled, select, href, onClick, onKeyPress, tabIndex, collapsible, expanded, size, color, title, description, icon, avatar, avatarGroup, linkIcon, linkText, badge, menu, controls, className, children, }: ListItemHeaderProps) => import("react/jsx-runtime").JSX.Element;
45
+ export declare const ListItemHeader: ({ as, loading, disabled, select, href, onClick, onKeyPress, tabIndex, collapsible, expanded, size, title, description, icon, avatar, avatarGroup, linkIcon, linkText, badge, menu, controls, className, children, }: ListItemHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,75 +1,64 @@
1
- import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
- import { c as q } from "../../index-L8X2o7IH.js";
3
- import { ListItemControls as A } from "./ListItemControls.js";
4
- import { ListItemLabel as B } from "./ListItemLabel.js";
5
- import { ListItemMedia as D } from "./ListItemMedia.js";
6
- import { ListItemMenu as F } from "./ListItemMenu.js";
7
- import { ListItemSelect as G } from "./ListItemSelect.js";
8
- import '../../assets/ListItemHeader.css';const J = "_header_s8c6k_1", O = "_link_s8c6k_8", h = {
9
- header: J,
10
- link: O
11
- }, Y = ({
12
- as: I,
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import { c as y } from "../../index-L8X2o7IH.js";
3
+ import { ListItemControls as C } from "./ListItemControls.js";
4
+ import { ListItemLabel as H } from "./ListItemLabel.js";
5
+ import { ListItemLink as S } from "./ListItemLink.js";
6
+ import { ListItemMedia as q } from "./ListItemMedia.js";
7
+ import { ListItemMenu as A } from "./ListItemMenu.js";
8
+ import { ListItemSelect as B } from "./ListItemSelect.js";
9
+ import '../../assets/ListItemHeader.css';const D = "_header_16s1f_1", E = "_link_16s1f_8", a = {
10
+ header: D,
11
+ link: E
12
+ }, T = ({
13
+ as: c,
13
14
  loading: e,
14
- disabled: L,
15
- select: s,
15
+ disabled: p,
16
+ select: o,
16
17
  href: f,
17
- onClick: a,
18
- onKeyPress: m,
19
- tabIndex: _,
20
- collapsible: i,
21
- expanded: n,
18
+ onClick: L,
19
+ onKeyPress: d,
20
+ tabIndex: h,
21
+ collapsible: m,
22
+ expanded: i,
22
23
  size: t = "sm",
23
- color: o,
24
24
  title: l,
25
- description: k,
26
- icon: x,
27
- avatar: b,
28
- avatarGroup: u,
25
+ description: I,
26
+ icon: k,
27
+ avatar: _,
28
+ avatarGroup: x,
29
29
  linkIcon: j,
30
- linkText: v,
31
- badge: M,
32
- menu: d,
33
- controls: N,
34
- className: w,
35
- children: E
30
+ linkText: u,
31
+ badge: v,
32
+ menu: s,
33
+ controls: M,
34
+ className: N,
35
+ children: b
36
36
  }) => {
37
- const H = I || "button", S = i && n ? "chevron-up" : i ? "chevron-down" : j;
38
- return /* @__PURE__ */ p("header", { className: h.header, "data-size": t, "data-color": o, "aria-expanded": n, children: [
39
- s && /* @__PURE__ */ r(G, { ...s, size: t }),
40
- /* @__PURE__ */ p(
41
- H,
37
+ const w = m && i ? "chevron-up" : m ? "chevron-down" : j;
38
+ return /* @__PURE__ */ n("header", { className: a.header, "data-size": t, "aria-expanded": i, children: [
39
+ o && /* @__PURE__ */ r(B, { ...o, size: t }),
40
+ /* @__PURE__ */ n(
41
+ S,
42
42
  {
43
- className: q(h.link, w),
43
+ className: y(a.link, N),
44
+ as: c,
44
45
  href: f,
45
- onKeyPress: (c) => {
46
- c.key === "Enter" && (a == null || a()), m == null || m(c);
47
- },
48
- onClick: a,
49
- tabIndex: _,
50
- "data-size": t,
51
- "data-color": o,
52
- "aria-disabled": e || L,
46
+ onClick: L,
47
+ onKeyPress: d,
48
+ tabIndex: h,
49
+ loading: e,
50
+ disabled: p,
51
+ size: t,
53
52
  children: [
54
- /* @__PURE__ */ r(
55
- D,
56
- {
57
- loading: e,
58
- size: t,
59
- color: o,
60
- icon: x,
61
- avatar: b,
62
- avatarGroup: u
63
- }
64
- ),
65
- /* @__PURE__ */ r(B, { loading: e, size: t, title: l, description: k, children: E }),
66
- /* @__PURE__ */ r(A, { linkIcon: S, linkText: v, badge: M })
53
+ /* @__PURE__ */ r(q, { loading: e, size: t, icon: k, avatar: _, avatarGroup: x }),
54
+ /* @__PURE__ */ r(H, { loading: e, size: t, title: l, description: I, children: b }),
55
+ /* @__PURE__ */ r(C, { linkIcon: w, linkText: u, badge: v })
67
56
  ]
68
57
  }
69
58
  ),
70
- d && /* @__PURE__ */ r(F, { ...d }) || N
59
+ s && /* @__PURE__ */ r(A, { ...s }) || M
71
60
  ] });
72
61
  };
73
62
  export {
74
- Y as ListItemHeader
63
+ T as ListItemHeader
75
64
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { Fragment as s, useState as g } from "react";
2
+ import { Fragment as d, useState as g } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
5
  import "../Autocomplete/AutocompleteBase.js";
@@ -7,21 +7,21 @@ import { Button as k } from "../Button/Button.js";
7
7
  import { MetaItem as r } from "../Meta/MetaItem.js";
8
8
  import "../RootProvider/RootProvider.js";
9
9
  import { ListItemHeader as t } from "./ListItemHeader.js";
10
- import { ListBase as d } from "./ListBase.js";
11
- const l = ["lg", "md", "sm", "xs"], w = {
10
+ import { ListBase as c } from "./ListBase.js";
11
+ import { List as b } from "./List.js";
12
+ const l = ["lg", "md", "sm", "xs"], T = {
12
13
  title: "List/ListItemHeader",
13
14
  component: t,
14
15
  tags: ["autodocs"],
15
16
  parameters: {},
16
17
  args: {
17
- id: "id",
18
18
  title: "Title",
19
19
  description: "Description",
20
20
  size: "md"
21
21
  }
22
- }, D = {
22
+ }, B = {
23
23
  args: {}
24
- }, T = (n) => /* @__PURE__ */ a(d, { children: [
24
+ }, E = (n) => /* @__PURE__ */ a(c, { children: [
25
25
  /* @__PURE__ */ e(t, { ...n }),
26
26
  /* @__PURE__ */ e(r, { children: "No media" }),
27
27
  /* @__PURE__ */ e(t, { ...n, icon: "teddy-bear" }),
@@ -106,11 +106,11 @@ const l = ["lg", "md", "sm", "xs"], w = {
106
106
  }
107
107
  ),
108
108
  /* @__PURE__ */ e(r, { children: "Company group" })
109
- ] }), B = (n) => /* @__PURE__ */ e(d, { children: l == null ? void 0 : l.map((i) => /* @__PURE__ */ a(s, { children: [
109
+ ] }), S = (n) => /* @__PURE__ */ e(c, { children: l == null ? void 0 : l.map((i) => /* @__PURE__ */ a(d, { children: [
110
110
  /* @__PURE__ */ e(t, { ...n, icon: "teddy-bear", size: i, loading: !0 }),
111
111
  /* @__PURE__ */ e(t, { ...n, icon: "teddy-bear", size: i, loading: !1 }),
112
112
  /* @__PURE__ */ e(r, { children: i })
113
- ] }, i)) }), E = (n) => /* @__PURE__ */ a(d, { children: [
113
+ ] }, i)) }), M = (n) => /* @__PURE__ */ a(c, { children: [
114
114
  /* @__PURE__ */ e(t, { ...n, linkIcon: "chevron-right" }),
115
115
  /* @__PURE__ */ e(r, { children: "Link icon, emphasising that this will take you somewhere" }),
116
116
  /* @__PURE__ */ e(t, { ...n, linkIcon: "chevron-right", linkText: "Åpne" }),
@@ -126,9 +126,10 @@ const l = ["lg", "md", "sm", "xs"], w = {
126
126
  badge: { label: "Admin" },
127
127
  linkIcon: "chevron-right",
128
128
  menu: {
129
+ id: "menu",
129
130
  items: [
130
- { title: "Innstillinger", icon: "cog" },
131
- { title: "Aktivitetslogg", icon: "clock-dashed" }
131
+ { id: "settings", title: "Innstillinger", icon: "cog" },
132
+ { id: "log", title: "Aktivitetslogg", icon: "clock-dashed" }
132
133
  ]
133
134
  }
134
135
  }
@@ -142,7 +143,7 @@ const l = ["lg", "md", "sm", "xs"], w = {
142
143
  }
143
144
  ),
144
145
  /* @__PURE__ */ e(r, { children: "List item with custom controls" })
145
- ] }), M = (n) => /* @__PURE__ */ e(d, { children: l == null ? void 0 : l.map((i) => /* @__PURE__ */ a(s, { children: [
146
+ ] }), _ = (n) => /* @__PURE__ */ e(c, { children: l == null ? void 0 : l.map((i) => /* @__PURE__ */ a(d, { children: [
146
147
  /* @__PURE__ */ e(
147
148
  t,
148
149
  {
@@ -165,27 +166,18 @@ const l = ["lg", "md", "sm", "xs"], w = {
165
166
  }
166
167
  ),
167
168
  /* @__PURE__ */ e(r, { children: i })
168
- ] }, i)) }), S = (n) => /* @__PURE__ */ a(d, { children: [
169
+ ] }, i)) }), j = (n) => /* @__PURE__ */ a(c, { children: [
169
170
  /* @__PURE__ */ e(t, { ...n }),
170
171
  /* @__PURE__ */ e(r, { children: "Default" }),
171
- /* @__PURE__ */ e(t, { ...n, color: "accent" }),
172
+ /* @__PURE__ */ e(t, { ...n }),
172
173
  /* @__PURE__ */ e(r, { children: "Accent" })
173
- ] }), _ = (n) => /* @__PURE__ */ e(d, { children: l == null ? void 0 : l.map((i) => /* @__PURE__ */ a(s, { children: [
174
- /* @__PURE__ */ e(
175
- t,
176
- {
177
- ...n,
178
- icon: "teddy-bear",
179
- size: i,
180
- selected: i === (n == null ? void 0 : n.size),
181
- linkIcon: "chevron-right"
182
- }
183
- ),
174
+ ] }), P = (n) => /* @__PURE__ */ e(c, { children: l == null ? void 0 : l.map((i) => /* @__PURE__ */ a(d, { children: [
175
+ /* @__PURE__ */ e(t, { ...n, icon: "teddy-bear", selected: i === (n == null ? void 0 : n.size), linkIcon: "chevron-right" }),
184
176
  /* @__PURE__ */ e(r, { children: i })
185
- ] }, i)) }), j = (n) => {
186
- const [i, p] = g(!1), m = () => {
187
- p((o) => !o);
188
- }, c = [
177
+ ] }, i)) }), G = (n) => {
178
+ const [i, s] = g(!1), m = () => {
179
+ s((o) => !o);
180
+ }, p = [
189
181
  {
190
182
  name: "Per Ove Ludvigsen",
191
183
  role: "Sportlig leder",
@@ -206,7 +198,7 @@ const l = ["lg", "md", "sm", "xs"], w = {
206
198
  role: "Toppspillerutvikler",
207
199
  rights: "Ingen rettigheter"
208
200
  }
209
- ], h = c == null ? void 0 : c.map((o) => ({
201
+ ], h = p.map((o) => ({
210
202
  avatar: {
211
203
  ...o,
212
204
  type: "person"
@@ -216,12 +208,12 @@ const l = ["lg", "md", "sm", "xs"], w = {
216
208
  badge: { label: o == null ? void 0 : o.rights },
217
209
  linkIcon: "menu-elipsis-horizontal"
218
210
  })), u = {
219
- items: c == null ? void 0 : c.map((o) => ({
211
+ items: p.map((o) => ({
220
212
  name: o == null ? void 0 : o.name,
221
213
  type: "person"
222
214
  }))
223
215
  };
224
- return /* @__PURE__ */ a(s, { children: [
216
+ return /* @__PURE__ */ a(d, { children: [
225
217
  /* @__PURE__ */ e(
226
218
  t,
227
219
  {
@@ -233,17 +225,17 @@ const l = ["lg", "md", "sm", "xs"], w = {
233
225
  as: "button"
234
226
  }
235
227
  ),
236
- i && /* @__PURE__ */ e(List, { size: "sm", spacing: "none", items: h })
228
+ i && /* @__PURE__ */ e(b, { defaultItemSize: "sm", spacing: "none", items: h })
237
229
  ] });
238
230
  };
239
231
  export {
240
- j as Collapsible,
241
- S as Colors,
242
- E as Controls,
243
- D as Default,
244
- B as Loading,
245
- T as MediaTypes,
246
- M as Selectable,
247
- _ as Sizes,
248
- w as default
232
+ G as Collapsible,
233
+ j as Colors,
234
+ M as Controls,
235
+ B as Default,
236
+ S as Loading,
237
+ E as MediaTypes,
238
+ _ as Selectable,
239
+ P as Sizes,
240
+ T as default
249
241
  };