@altinn/altinn-components 0.7.3 → 0.7.5

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 (78) hide show
  1. package/dist/Autocomplete-hEFuiN2u.js +287 -0
  2. package/dist/assets/Autocomplete.css +1 -0
  3. package/dist/assets/GlobalMenuBase.css +1 -1
  4. package/dist/assets/Header.css +1 -1
  5. package/dist/assets/LayoutBase.css +1 -1
  6. package/dist/components/Bookmarks/BookmarksList.js +1 -1
  7. package/dist/components/Bookmarks/BookmarksListItem.js +4 -5
  8. package/dist/components/Bookmarks/BookmarksListItem.stories.js +7 -7
  9. package/dist/components/Bookmarks/index.js +4 -4
  10. package/dist/components/Button/Buttons.stories.js +5 -4
  11. package/dist/components/ContextMenu/ContextMenu.js +4 -27
  12. package/dist/components/ContextMenu/ContextMenu.stories.js +3 -3
  13. package/dist/components/ContextMenu/ContextMenuBase.js +6 -32
  14. package/dist/components/ContextMenu/index.js +1 -1
  15. package/dist/components/Dialog/DialogActions.js +3 -2
  16. package/dist/components/Dialog/DialogGroup.js +3 -2
  17. package/dist/components/Dialog/DialogList.js +1 -1
  18. package/dist/components/Dialog/DialogListItem.js +13 -87
  19. package/dist/components/Dialog/DialogListItem.stories.js +1 -1
  20. package/dist/components/Dialog/DialogNav.js +11 -11
  21. package/dist/components/Dialog/Examples.stories.js +1 -1
  22. package/dist/components/Dialog/index.js +1 -1
  23. package/dist/components/Dropdown/DrawerButton.js +5 -4
  24. package/dist/components/Dropdown/DrawerOrDropdown.js +7 -6
  25. package/dist/components/GlobalMenu/AccountButton.js +3 -2
  26. package/dist/components/GlobalMenu/AccountMenu.d.ts +5 -2
  27. package/dist/components/GlobalMenu/AccountMenu.js +35 -26
  28. package/dist/components/GlobalMenu/AccountMenu.stories.js +19 -2
  29. package/dist/components/GlobalMenu/BackButton.js +3 -2
  30. package/dist/components/GlobalMenu/GlobalMenu.js +3 -2
  31. package/dist/components/GlobalMenu/GlobalMenu.stories.js +6 -12
  32. package/dist/components/GlobalMenu/GlobalMenuBase.js +9 -9
  33. package/dist/components/Header/Header.js +13 -13
  34. package/dist/components/Header/HeaderBase.js +5 -4
  35. package/dist/components/Layout/Layout.js +9 -8
  36. package/dist/components/Layout/Layout.stories.js +140 -49
  37. package/dist/components/Layout/LayoutBase.js +3 -3
  38. package/dist/components/LayoutAction/ActionMenu.js +5 -4
  39. package/dist/components/List/List.js +3 -3
  40. package/dist/components/List/List.stories.js +5 -4
  41. package/dist/components/List/ListItem.js +6 -39
  42. package/dist/components/List/ListItem.stories.js +1 -1
  43. package/dist/components/List/ListItemControls.js +5 -15
  44. package/dist/components/List/index.js +12 -13
  45. package/dist/components/Menu/Menu.js +9 -9
  46. package/dist/components/Menu/MenuItem.stories.js +21 -20
  47. package/dist/components/Menu/MenuItems.js +8 -59
  48. package/dist/components/Menu/MenuItems.stories.js +1 -1
  49. package/dist/components/Menu/MenuSearch.js +6 -5
  50. package/dist/components/Menu/index.js +7 -7
  51. package/dist/components/Page/PageHeader.js +8 -7
  52. package/dist/components/Searchbar/Autocomplete.d.ts +1 -2
  53. package/dist/components/Searchbar/Autocomplete.js +7 -23
  54. package/dist/components/Searchbar/Autocomplete.stories.js +1 -1
  55. package/dist/components/Searchbar/AutocompleteBase.d.ts +2 -1
  56. package/dist/components/Searchbar/AutocompleteBase.js +9 -6
  57. package/dist/components/Searchbar/AutocompleteItem.js +3 -20
  58. package/dist/components/Searchbar/ScopeListItem.d.ts +2 -2
  59. package/dist/components/Searchbar/ScopeListItem.js +3 -6
  60. package/dist/components/Searchbar/SearchField.js +39 -39
  61. package/dist/components/Searchbar/Searchbar.d.ts +1 -1
  62. package/dist/components/Searchbar/Searchbar.js +25 -17
  63. package/dist/components/Searchbar/Searchbar.stories.js +63 -47
  64. package/dist/components/Toolbar/ToolbarAdd.js +3 -2
  65. package/dist/components/Toolbar/ToolbarDaterange.js +3 -2
  66. package/dist/components/Toolbar/ToolbarFilter.js +3 -2
  67. package/dist/components/Toolbar/ToolbarMenu.js +3 -2
  68. package/dist/components/Toolbar/ToolbarOptions.js +13 -12
  69. package/dist/components/Toolbar/ToolbarSearch.js +16 -15
  70. package/dist/components/index.js +213 -218
  71. package/dist/hooks/useEnterKey.d.ts +1 -0
  72. package/dist/hooks/useEnterKey.js +15 -0
  73. package/dist/index.js +226 -231
  74. package/package.json +1 -1
  75. package/dist/assets/ContextMenuBase.css +0 -1
  76. package/dist/assets/DialogListItem.css +0 -1
  77. package/dist/assets/ListItemControls.css +0 -1
  78. package/dist/assets/ScopeListItem.css +0 -1
@@ -0,0 +1,287 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as _, Fragment as $ } from "react/jsx-runtime";
3
+ import { Fragment as G, forwardRef as K, createElement as R } from "react";
4
+ import { useMenu as E } from "./hooks/useMenu.js";
5
+ import { AutocompleteBase as Q } from "./components/Searchbar/AutocompleteBase.js";
6
+ import { AutocompleteGroup as V } from "./components/Searchbar/AutocompleteGroup.js";
7
+ import { c as q } from "./index-L8X2o7IH.js";
8
+ import "./components/Icon/SvgIcon.js";
9
+ import { useRootContext as J } from "./components/RootProvider/RootProvider.js";
10
+ import { ListItemBase as D } from "./components/List/ListItemBase.js";
11
+ import { ListItemLabel as H } from "./components/List/ListItemLabel.js";
12
+ import { DialogBorder as C } from "./components/Dialog/DialogBorder.js";
13
+ import { DialogMetadata as T } from "./components/Dialog/DialogMetadata.js";
14
+ import { DialogHeaderBase as O } from "./components/Dialog/DialogHeaderBase.js";
15
+ import { DialogHeadings as U } from "./components/Dialog/DialogHeadings.js";
16
+ import { DialogTitle as W } from "./components/Dialog/DialogTitle.js";
17
+ import { DialogTouchedBy as X } from "./components/Dialog/DialogTouchedBy.js";
18
+ import { DialogSelect as Y } from "./components/Dialog/DialogSelect.js";
19
+ import { DialogDescription as Z } from "./components/Dialog/DialogDescription.js";
20
+ import { Badge as z } from "./components/Badge/Badge.js";
21
+ import { MenuItem as P } from "./components/Menu/MenuItem.js";
22
+ import { MenuHeader as ee } from "./components/Menu/MenuHeader.js";
23
+ import { MenuList as te, MenuListItem as B } from "./components/Menu/MenuBase.js";
24
+ import { IconButton as oe } from "./components/Button/IconButton.js";
25
+ import { DropdownBase as ne } from "./components/Dropdown/DropdownBase.js";
26
+ import { Icon as re } from "./components/Icon/Icon.js";
27
+ import { ListItemHeader as se } from "./components/List/ListItemHeader.js";
28
+ import { QueryLabel as ce } from "./components/Bookmarks/QueryLabel.js";
29
+ import './assets/Autocomplete.css';const ae = ({ size: t = "sm", title: n, description: o, params: s, ...a }) => /* @__PURE__ */ e(L, { size: t, icon: "magnifying-glass", linkIcon: "chevron-right", ...a, children: !n && /* @__PURE__ */ e(ce, { params: s }) }), me = "_toggle_ya7jy_1", ie = "_button_ya7jy_5", le = "_icon_ya7jy_14", de = "_dropdown_ya7jy_18", w = {
30
+ toggle: me,
31
+ button: ie,
32
+ icon: le,
33
+ dropdown: de
34
+ }, ue = ({
35
+ size: t = "sm",
36
+ placement: n = "right",
37
+ expanded: o = !1,
38
+ className: s,
39
+ onToggle: a,
40
+ children: i
41
+ }) => /* @__PURE__ */ _("div", { className: q(w.toggle, s), "data-theme": "neutral", children: [
42
+ /* @__PURE__ */ e(
43
+ oe,
44
+ {
45
+ className: w.button,
46
+ size: t,
47
+ icon: "menu-elipsis-horizontal",
48
+ iconSize: "md",
49
+ variant: "text",
50
+ color: "secondary",
51
+ onClick: a
52
+ }
53
+ ),
54
+ /* @__PURE__ */ e(ne, { className: w.dropdown, placement: n, expanded: o, children: i })
55
+ ] }), fe = ({
56
+ id: t = "context-menu",
57
+ placement: n = "right",
58
+ size: o,
59
+ groups: s = {},
60
+ className: a,
61
+ items: i
62
+ }) => {
63
+ const { currentId: d, toggleId: c } = J();
64
+ return /* @__PURE__ */ e(
65
+ ue,
66
+ {
67
+ size: o,
68
+ placement: n,
69
+ className: a,
70
+ expanded: d === t,
71
+ onToggle: () => c(t),
72
+ children: /* @__PURE__ */ e(S, { groups: s, items: i })
73
+ }
74
+ );
75
+ }, S = ({
76
+ level: t = 0,
77
+ expanded: n,
78
+ items: o,
79
+ groups: s = {},
80
+ defaultItemColor: a,
81
+ defaultItemSize: i
82
+ }) => {
83
+ const { menu: d } = E({
84
+ items: o,
85
+ groups: s,
86
+ groupByKey: "groupId",
87
+ keyboardEvents: !1
88
+ });
89
+ return /* @__PURE__ */ e(te, { expanded: n, children: d.map((c, u) => {
90
+ const m = (c == null ? void 0 : c.props) || {}, { title: f, divider: I = !0 } = m, p = d[u + 1];
91
+ return /* @__PURE__ */ _(G, { children: [
92
+ (t > 0 || u) && I ? /* @__PURE__ */ e(B, { role: "separator" }) : "",
93
+ f && /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(ee, { title: f }) }),
94
+ c == null ? void 0 : c.items.filter((h) => {
95
+ var l;
96
+ return !((l = h.props) != null && l.hidden);
97
+ }).map((h, l) => {
98
+ const { active: x } = h, { groupId: k, ...r } = h.props || {}, { expanded: y } = r, b = c == null ? void 0 : c.items[l + 1];
99
+ return /* @__PURE__ */ _(B, { role: "presentation", expanded: y, children: [
100
+ /* @__PURE__ */ e(
101
+ P,
102
+ {
103
+ ...r,
104
+ color: (r == null ? void 0 : r.color) || (m == null ? void 0 : m.defaultItemColor) || a,
105
+ size: (r == null ? void 0 : r.size) || (m == null ? void 0 : m.defaultItemSize) || i,
106
+ active: x,
107
+ tabIndex: r != null && r.disabled ? -1 : 0
108
+ }
109
+ ),
110
+ y && (r == null ? void 0 : r.items) && /* @__PURE__ */ _($, { children: [
111
+ /* @__PURE__ */ e(
112
+ S,
113
+ {
114
+ expanded: y,
115
+ level: t + 1,
116
+ items: r == null ? void 0 : r.items,
117
+ groups: s,
118
+ defaultItemColor: a,
119
+ defaultItemSize: i
120
+ }
121
+ ),
122
+ (p || b) && /* @__PURE__ */ e(B, { role: "separator", as: "div" })
123
+ ] })
124
+ ] }, l);
125
+ })
126
+ ] }, u);
127
+ }) });
128
+ }, he = "_controls_dduzt_1", _e = "_linkText_dduzt_14", pe = "_linkIcon_dduzt_19", N = {
129
+ controls: he,
130
+ linkText: _e,
131
+ linkIcon: pe
132
+ }, Ie = ({ badge: t, linkText: n, linkIcon: o, menu: s, children: a }) => /* @__PURE__ */ e("div", { className: N.controls, "data-menu": s && !0, children: a || /* @__PURE__ */ _($, { children: [
133
+ t && /* @__PURE__ */ e(z, { ...t }),
134
+ n && /* @__PURE__ */ e("span", { className: N.linkText, children: n }),
135
+ o && /* @__PURE__ */ e(re, { name: o, className: N.linkIcon }),
136
+ s && /* @__PURE__ */ e(fe, { ...s, className: N.menu })
137
+ ] }) }), L = ({
138
+ as: t = "a",
139
+ color: n,
140
+ loading: o,
141
+ size: s = "sm",
142
+ icon: a,
143
+ avatar: i,
144
+ avatarGroup: d,
145
+ title: c,
146
+ description: u,
147
+ collapsible: m,
148
+ expanded: f,
149
+ badge: I,
150
+ linkText: p,
151
+ linkIcon: h,
152
+ menu: l,
153
+ select: x,
154
+ controls: k,
155
+ children: r,
156
+ ...y
157
+ }) => /* @__PURE__ */ e(
158
+ D,
159
+ {
160
+ as: t,
161
+ size: s,
162
+ color: n,
163
+ loading: o,
164
+ select: x,
165
+ controls: k || /* @__PURE__ */ e(Ie, { linkIcon: m && f ? "chevron-up" : m ? "chevron-down" : h, linkText: p, menu: l, badge: I }),
166
+ ...y,
167
+ children: /* @__PURE__ */ e(se, { loading: o, size: s, icon: a, avatar: i, avatarGroup: d, children: /* @__PURE__ */ e(H, { loading: o, title: c, description: u, size: s, children: r }) })
168
+ }
169
+ ), ye = "_item_v64fv_1", ve = "_select_v64fv_16", xe = "_summary_v64fv_23", be = "_footer_v64fv_44", ke = "_touchedBy_v64fv_52", Be = "_border_v64fv_61", v = {
170
+ item: ye,
171
+ select: ve,
172
+ summary: xe,
173
+ footer: be,
174
+ touchedBy: ke,
175
+ border: Be
176
+ }, Ne = ({
177
+ size: t = "lg",
178
+ variant: n = "neutral",
179
+ loading: o,
180
+ select: s,
181
+ status: a,
182
+ sender: i,
183
+ recipient: d,
184
+ grouped: c,
185
+ updatedAt: u,
186
+ updatedAtLabel: m,
187
+ archivedAt: f,
188
+ archivedAtLabel: I,
189
+ trashedAt: p,
190
+ trashedAtLabel: h,
191
+ label: l,
192
+ dueAt: x,
193
+ dueAtLabel: k,
194
+ seen: r = !1,
195
+ seenBy: y,
196
+ touchedBy: b,
197
+ attachmentsCount: F,
198
+ title: M,
199
+ description: g,
200
+ ...j
201
+ }) => {
202
+ const A = p ? "trashed" : f ? "archived" : n;
203
+ return t === "xs" || t === "sm" ? /* @__PURE__ */ e(D, { ...j, loading: o, size: t, className: v.item, children: /* @__PURE__ */ _(C, { className: v.border, size: t, seen: r, loading: o, children: [
204
+ /* @__PURE__ */ e(H, { loading: o, size: t, title: M, description: g }),
205
+ /* @__PURE__ */ e(T, { loading: o, updatedAt: u, updatedAtLabel: m })
206
+ ] }) }) : /* @__PURE__ */ e(
207
+ D,
208
+ {
209
+ ...j,
210
+ loading: o,
211
+ size: t,
212
+ className: v.item,
213
+ controls: s && /* @__PURE__ */ e(Y, { className: v.select, ...s }),
214
+ children: /* @__PURE__ */ _(C, { className: v.border, size: t, seen: r, loading: o, children: [
215
+ /* @__PURE__ */ _(O, { size: t, children: [
216
+ /* @__PURE__ */ e(W, { loading: o, size: t, variant: A, label: l, seen: r, children: M }),
217
+ /* @__PURE__ */ e(U, { loading: o, size: t, grouped: c, sender: i, recipient: d })
218
+ ] }),
219
+ /* @__PURE__ */ e(Z, { loading: o, size: t, children: g }),
220
+ /* @__PURE__ */ _("footer", { "data-size": t, className: v.footer, children: [
221
+ /* @__PURE__ */ e(
222
+ T,
223
+ {
224
+ loading: o,
225
+ status: a,
226
+ updatedAt: u,
227
+ updatedAtLabel: m,
228
+ archivedAt: f,
229
+ archivedAtLabel: I,
230
+ trashedAt: p,
231
+ trashedAtLabel: h,
232
+ dueAt: x,
233
+ dueAtLabel: k,
234
+ seenBy: y,
235
+ attachmentsCount: F
236
+ }
237
+ ),
238
+ b && /* @__PURE__ */ e(X, { loading: o, size: "xs", touchedBy: b, className: v.touchedBy })
239
+ ] })
240
+ ] })
241
+ }
242
+ );
243
+ }, Le = "_item_1a3bc_1", we = {
244
+ item: Le
245
+ }, De = ({ as: t = "a", label: n, ...o }) => /* @__PURE__ */ e(L, { className: we.item, linkIcon: "chevron-right", ...o, children: typeof n == "function" ? n() : n }), Me = ({ type: t, ...n }) => {
246
+ switch (t) {
247
+ case "scope":
248
+ return /* @__PURE__ */ e(De, { ...n, shadow: "none", tabIndex: -1 });
249
+ case "bookmark":
250
+ return /* @__PURE__ */ e(ae, { ...n, shadow: "none", size: "sm", tabIndex: -1 });
251
+ case "dialog":
252
+ return /* @__PURE__ */ e(Ne, { ...n, shadow: "none", size: "sm", tabIndex: -1 });
253
+ case "information":
254
+ return /* @__PURE__ */ e(L, { ...n, shadow: "none", tabIndex: -1, disabled: !0 });
255
+ default:
256
+ return /* @__PURE__ */ e(L, { ...n, shadow: "none", size: "sm", tabIndex: -1 });
257
+ }
258
+ }, ot = K(
259
+ ({ className: t, items: n, groups: o = {}, expanded: s }, a) => {
260
+ const { menu: i, setActiveIndex: d } = E({
261
+ items: n,
262
+ groups: o,
263
+ groupByKey: "groupId",
264
+ keyboardEvents: !0
265
+ });
266
+ return /* @__PURE__ */ e(Q, { className: t, expanded: s, ref: a, children: i.map((c, u) => /* @__PURE__ */ R(V, { ...c.props, key: u }, /* @__PURE__ */ e("ul", { children: c.items.map((m, f) => {
267
+ const {
268
+ active: I,
269
+ menuIndex: p,
270
+ props: { groupId: h, ...l }
271
+ } = m;
272
+ return /* @__PURE__ */ e("li", { tabIndex: -1, onMouseEnter: () => d(p), children: /* @__PURE__ */ e(Me, { ...l, active: I }) }, f);
273
+ }) }))) });
274
+ }
275
+ );
276
+ export {
277
+ ot as A,
278
+ ae as B,
279
+ fe as C,
280
+ Ne as D,
281
+ Ie as L,
282
+ S as M,
283
+ De as S,
284
+ L as a,
285
+ ue as b,
286
+ Me as c
287
+ };
@@ -0,0 +1 @@
1
+ ._toggle_ya7jy_1{position:relative}._button_ya7jy_5{display:flex;align-items:center;justify-content:center;width:2.75rem;padding:.625rem;border-radius:50%}._icon_ya7jy_14{font-size:1.5rem}._dropdown_ya7jy_18{display:none}._dropdown_ya7jy_18[aria-expanded=true]{display:block;position:absolute;right:0;z-index:2}._dropdown_ya7jy_18{margin-top:.5rem;padding:0 .5rem;background-color:var(--neutral-background-default);border-radius:2px;box-shadow:0 0 1px #00000026,0 1px 2px #0000001f,0 2px 4px #0000001a}._controls_dduzt_1{position:absolute;right:0;display:flex;align-items:center;gap:.625rem;padding:0 .625rem}._controls_dduzt_1:empty{display:none}._linkText_dduzt_14{font-size:.875rem;white-space:nowrap}._linkIcon_dduzt_19{font-size:1.5rem}._item_v64fv_1[aria-selected=true]{background-color:var(--theme-background-subtle);outline:2px solid}._item_v64fv_1[data-size=lg],._item_v64fv_1[data-size=md]{padding:1em}._item_v64fv_1[data-size=sm],._item_v64fv_1[data-size=xs]{padding:.5em .75em}._select_v64fv_16{position:absolute;top:0;right:0;margin:.375rem}._summary_v64fv_23{font-size:1rem;line-height:1.35;margin:0;font-weight:400}._summary_v64fv_23[data-size=lg]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;margin-top:.5rem}._summary_v64fv_23[data-size=md]{display:none}._footer_v64fv_44{width:100%;margin-top:1rem;display:flex;flex-direction:column;row-gap:1rem}._touchedBy_v64fv_52{position:absolute;right:0;bottom:0;margin:8px}._border_v64fv_61[data-size=lg],._border_v64fv_61[data-size=md]{padding-left:1rem}._border_v64fv_61[data-size=xs],._border_v64fv_61[data-size=sm]{width:100%;flex-direction:row;align-items:center;padding-left:.75rem}._item_1a3bc_1{box-shadow:none}._item_1a3bc_1 mark{background-color:transparent;font-weight:500;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}._item_1a3bc_1 mark:before{content:"«"}._item_1a3bc_1 mark:after{content:"»"}
@@ -1 +1 @@
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
+ ._nav_ratd2_1{background-color:#fff;display:flex;flex-direction:column}._footer_ratd2_7{padding:1rem .5rem;display:flex;width:100%;flex-direction:column;align-items:stretch}._drawer_ratd2_15[aria-expanded=true]{display:block;padding:.5rem;z-index:2}._dropdown_ratd2_21[aria-expanded=true]{display:none}@media (min-width: 1024px){._drawer_ratd2_15[aria-expanded=true]{display:none}._dropdown_ratd2_21[aria-expanded=true]{display:block;z-index:2}}
@@ -1 +1 @@
1
- ._drawer_1wgf5_1[aria-expanded=true]{display:block}._dropdown_1wgf5_5[aria-expanded=true]{width:320px;display:none}@media (min-width: 1024px){._dropdown_1wgf5_5[aria-expanded=true]{display:block}}@media (min-width: 1024px){._drawer_1wgf5_1[aria-expanded=true]{display:none}._dropdown_1wgf5_5[aria-expanded=true]{display:block}}
1
+ ._drawer_ft5v3_1[aria-expanded=true]{display:block}._dropdown_ft5v3_5[aria-expanded=true]{display:none}@media (min-width: 1024px){._dropdown_ft5v3_5[aria-expanded=true]{width:320px;display:block}._drawer_ft5v3_1[aria-expanded=true]{display:none}}
@@ -1 +1 @@
1
- ._base_1401f_1{position:relative;display:flex;flex-direction:column;min-height:100vh;overflow:hidden}._base_1401f_1[data-theme]{background-color:var(--theme-background-subtle)}._base_1401f_1[data-current-id=menu]{background-color:var(--theme-background-default)}@media (max-width: 1024px){._base_1401f_1[data-current-id=menu] header+*,._base_1401f_1[data-current-id=menu] footer{display:none}}
1
+ ._base_wqztk_1{position:relative;display:flex;flex-direction:column;min-height:100vh;overflow:hidden}._base_wqztk_1[data-theme]{background-color:var(--theme-background-subtle)}._base_wqztk_1[data-current-id=menu]{background-color:var(--theme-background-default)}
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import { createElement as p } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
- import { BookmarksListItem as i } from "./BookmarksListItem.js";
5
+ import { B as i } from "../../Autocomplete-hEFuiN2u.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import { ListBase as a } from "../List/ListBase.js";
8
8
  const L = ({ items: r, spacing: m }) => /* @__PURE__ */ t(a, { spacing: m, children: r == null ? void 0 : r.map((o) => /* @__PURE__ */ p(i, { ...o, key: o.id })) });
@@ -1,11 +1,10 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
4
  import "react";
5
- import { QueryLabel as n } from "./QueryLabel.js";
5
+ import { B as e } from "../../Autocomplete-hEFuiN2u.js";
6
+ import "./QueryLabel.js";
6
7
  import "../RootProvider/RootProvider.js";
7
- import { ListItem as e } from "../List/ListItem.js";
8
- const k = ({ size: o = "sm", title: i, description: p, params: t, ...m }) => /* @__PURE__ */ r(e, { size: o, icon: "magnifying-glass", linkIcon: "chevron-right", ...m, children: !i && /* @__PURE__ */ r(n, { params: t }) });
9
8
  export {
10
- k as BookmarksListItem
9
+ e as BookmarksListItem
11
10
  };
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
2
  import { Fragment as s } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
- import { BookmarksListItem as m } from "./BookmarksListItem.js";
5
+ import { B as m } from "../../Autocomplete-hEFuiN2u.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import { MetaItem as l } from "../Meta/MetaItem.js";
8
8
  import { ListBase as i } from "../List/ListBase.js";
@@ -26,13 +26,13 @@ const r = ["lg", "md", "sm", "xs"], h = {
26
26
  size: "md",
27
27
  href: "#"
28
28
  }
29
- }, x = {
29
+ }, B = {
30
30
  args: {}
31
- }, y = {
31
+ }, x = {
32
32
  args: {
33
33
  title: "Mitt lagrede søk"
34
34
  }
35
- }, B = {
35
+ }, y = {
36
36
  args: {
37
37
  params: [
38
38
  {
@@ -56,9 +56,9 @@ const r = ["lg", "md", "sm", "xs"], h = {
56
56
  /* @__PURE__ */ a(l, { children: e })
57
57
  ] }, e)) });
58
58
  export {
59
- y as CustomTitle,
60
- x as Default,
61
- B as LotsOfParams,
59
+ x as CustomTitle,
60
+ B as Default,
61
+ y as LotsOfParams,
62
62
  L as Sizes,
63
63
  h as default
64
64
  };
@@ -1,9 +1,9 @@
1
1
  import { BookmarksList as e } from "./BookmarksList.js";
2
- import { BookmarksListItem as t } from "./BookmarksListItem.js";
3
- import { QueryItem as s, QueryLabel as a } from "./QueryLabel.js";
2
+ import { B as t } from "../../Autocomplete-hEFuiN2u.js";
3
+ import { QueryItem as a, QueryLabel as k } from "./QueryLabel.js";
4
4
  export {
5
5
  e as BookmarksList,
6
6
  t as BookmarksListItem,
7
- s as QueryItem,
8
- a as QueryLabel
7
+ a as QueryItem,
8
+ k as QueryLabel
9
9
  };
@@ -7,7 +7,8 @@ import { ComboButton as d } from "./ComboButton.js";
7
7
  import { IconButton as p } from "./IconButton.js";
8
8
  import "../RootProvider/RootProvider.js";
9
9
  import { MetaItem as c } from "../Meta/MetaItem.js";
10
- const g = {
10
+ import "../../Autocomplete-hEFuiN2u.js";
11
+ const I = {
11
12
  title: "Atoms/Button/Buttons",
12
13
  tags: ["autodocs"],
13
14
  parameters: {},
@@ -20,7 +21,7 @@ const g = {
20
21
  options: ["primary", "secondary"]
21
22
  }
22
23
  }
23
- }, n = ["sm", "md", "lg"], m = ["solid", "outline", "dotted", "text"], I = (e) => /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", rowGap: "1rem" }, children: m == null ? void 0 : m.map((t) => /* @__PURE__ */ i(
24
+ }, n = ["sm", "md", "lg"], m = ["solid", "outline", "dotted", "text"], b = (e) => /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", rowGap: "1rem" }, children: m == null ? void 0 : m.map((t) => /* @__PURE__ */ i(
24
25
  "div",
25
26
  {
26
27
  style: {
@@ -45,6 +46,6 @@ const g = {
45
46
  t
46
47
  )) });
47
48
  export {
48
- I as VariantsAndSizes,
49
- g as default
49
+ b as VariantsAndSizes,
50
+ I as default
50
51
  };
@@ -1,32 +1,9 @@
1
- "use client";
2
- import { jsx as o } from "react/jsx-runtime";
1
+ import "react/jsx-runtime";
3
2
  import "../../index-L8X2o7IH.js";
4
3
  import "../Icon/SvgIcon.js";
5
4
  import "react";
6
- import { MenuItems as s } from "../Menu/MenuItems.js";
7
- import { useRootContext as x } from "../RootProvider/RootProvider.js";
8
- import { ContextMenuBase as c } from "./ContextMenuBase.js";
9
- const a = ({
10
- id: t = "context-menu",
11
- placement: e = "right",
12
- size: r,
13
- groups: n = {},
14
- className: m,
15
- items: i
16
- }) => {
17
- const { currentId: p, toggleId: u } = x();
18
- return /* @__PURE__ */ o(
19
- c,
20
- {
21
- size: r,
22
- placement: e,
23
- className: m,
24
- expanded: p === t,
25
- onToggle: () => u(t),
26
- children: /* @__PURE__ */ o(s, { groups: n, items: i })
27
- }
28
- );
29
- };
5
+ import { C as n } from "../../Autocomplete-hEFuiN2u.js";
6
+ import "../RootProvider/RootProvider.js";
30
7
  export {
31
- a as ContextMenu
8
+ n as ContextMenu
32
9
  };
@@ -1,4 +1,4 @@
1
- import { ContextMenu as t } from "./ContextMenu.js";
1
+ import { C as t } from "../../Autocomplete-hEFuiN2u.js";
2
2
  const o = {
3
3
  title: "ContextMenu/ContextMenu",
4
4
  component: t,
@@ -39,8 +39,8 @@ const o = {
39
39
  }
40
40
  ]
41
41
  }
42
- }, l = {};
42
+ }, a = {};
43
43
  export {
44
- l as Default,
44
+ a as Default,
45
45
  o as default
46
46
  };
@@ -1,37 +1,11 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { c as m } from "../../index-L8X2o7IH.js";
1
+ import "react/jsx-runtime";
2
+ import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
4
  import "react";
5
- import { IconButton as l } from "../Button/IconButton.js";
5
+ import "../Button/IconButton.js";
6
6
  import "../RootProvider/RootProvider.js";
7
- import { DropdownBase as d } from "../Dropdown/DropdownBase.js";
8
- import '../../assets/ContextMenuBase.css';const p = "_toggle_ya7jy_1", _ = "_button_ya7jy_5", y = "_icon_ya7jy_14", g = "_dropdown_ya7jy_18", o = {
9
- toggle: p,
10
- button: _,
11
- icon: y,
12
- dropdown: g
13
- }, B = ({
14
- size: n = "sm",
15
- placement: r = "right",
16
- expanded: s = !1,
17
- className: e,
18
- onToggle: a,
19
- children: c
20
- }) => /* @__PURE__ */ i("div", { className: m(o.toggle, e), "data-theme": "neutral", children: [
21
- /* @__PURE__ */ t(
22
- l,
23
- {
24
- className: o.button,
25
- size: n,
26
- icon: "menu-elipsis-horizontal",
27
- iconSize: "md",
28
- variant: "text",
29
- color: "secondary",
30
- onClick: a
31
- }
32
- ),
33
- /* @__PURE__ */ t(d, { className: o.dropdown, placement: r, expanded: s, children: c })
34
- ] });
7
+ import { b as s } from "../../Autocomplete-hEFuiN2u.js";
8
+ import "../Dropdown/DropdownBase.js";
35
9
  export {
36
- B as ContextMenuBase
10
+ s as ContextMenuBase
37
11
  };
@@ -1,4 +1,4 @@
1
- import { ContextMenu as t } from "./ContextMenu.js";
1
+ import { C as t } from "../../Autocomplete-hEFuiN2u.js";
2
2
  export {
3
3
  t as ContextMenu
4
4
  };
@@ -6,12 +6,13 @@ import "../Icon/SvgIcon.js";
6
6
  import { Button as u } from "../Button/Button.js";
7
7
  import { ComboButton as f } from "../Button/ComboButton.js";
8
8
  import "../RootProvider/RootProvider.js";
9
+ import "../../Autocomplete-hEFuiN2u.js";
9
10
  import { Menu as y } from "../Menu/Menu.js";
10
11
  import '../../assets/DialogActions.css';const g = "_action_1lkfe_1", h = "_comboButton_1lkfe_7", _ = "_dropdown_1lkfe_11", i = {
11
12
  action: g,
12
13
  comboButton: h,
13
14
  dropdown: _
14
- }, O = ({ items: e, maxItems: l = 2 }) => {
15
+ }, j = ({ items: e, maxItems: l = 2 }) => {
15
16
  const [c, a] = p(!1), n = m(() => (e || []).sort((r, o) => {
16
17
  const s = ["primary", "secondary", "tertiary"];
17
18
  return s.indexOf(r == null ? void 0 : r.priority) - s.indexOf(o == null ? void 0 : o.priority);
@@ -54,5 +55,5 @@ import '../../assets/DialogActions.css';const g = "_action_1lkfe_1", h = "_combo
54
55
  )) });
55
56
  };
56
57
  export {
57
- O as DialogActions
58
+ j as DialogActions
58
59
  };
@@ -6,9 +6,10 @@ import { Button as t } from "../Button/Button.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import { Heading as e } from "../Typography/Heading.js";
8
8
  import { ListBase as n } from "../List/ListBase.js";
9
+ import "../../Autocomplete-hEFuiN2u.js";
9
10
  import { SectionBase as p } from "../Page/SectionBase.js";
10
11
  import { SectionHeader as a } from "../Page/SectionHeader.js";
11
- const j = ({ title: i, children: m }) => /* @__PURE__ */ o(p, { spacing: "md", children: [
12
+ const k = ({ title: i, children: m }) => /* @__PURE__ */ o(p, { spacing: "md", children: [
12
13
  i && /* @__PURE__ */ o(a, { padding: !0, margin: !0, children: [
13
14
  /* @__PURE__ */ r(e, { children: i }),
14
15
  /* @__PURE__ */ r(t, { variant: "text", icon: "checkmark", size: "sm", children: "Velg alle" })
@@ -16,5 +17,5 @@ const j = ({ title: i, children: m }) => /* @__PURE__ */ o(p, { spacing: "md", c
16
17
  /* @__PURE__ */ r(n, { spacing: "md", children: m })
17
18
  ] });
18
19
  export {
19
- j as DialogGroup
20
+ k as DialogGroup
20
21
  };
@@ -4,7 +4,7 @@ import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
5
  import "../RootProvider/RootProvider.js";
6
6
  import { useMenu as f } from "../../hooks/useMenu.js";
7
- import { DialogListItem as l } from "./DialogListItem.js";
7
+ import { D as l } from "../../Autocomplete-hEFuiN2u.js";
8
8
  import { SectionBase as y } from "../Page/SectionBase.js";
9
9
  import { DialogGroup as d } from "./DialogGroup.js";
10
10
  const P = ({ items: e, groups: m = {} }) => {