@altinn/altinn-components 0.7.3 → 0.7.4
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.
- package/dist/Autocomplete-BNV2UfH3.js +284 -0
- package/dist/assets/Autocomplete.css +1 -0
- package/dist/components/Bookmarks/BookmarksList.js +1 -1
- package/dist/components/Bookmarks/BookmarksListItem.js +4 -5
- package/dist/components/Bookmarks/BookmarksListItem.stories.js +7 -7
- package/dist/components/Bookmarks/index.js +4 -4
- package/dist/components/Button/Buttons.stories.js +5 -4
- package/dist/components/ContextMenu/ContextMenu.js +4 -27
- package/dist/components/ContextMenu/ContextMenu.stories.js +3 -3
- package/dist/components/ContextMenu/ContextMenuBase.js +6 -32
- package/dist/components/ContextMenu/index.js +1 -1
- package/dist/components/Dialog/DialogActions.js +3 -2
- package/dist/components/Dialog/DialogGroup.js +3 -2
- package/dist/components/Dialog/DialogList.js +1 -1
- package/dist/components/Dialog/DialogListItem.js +13 -87
- package/dist/components/Dialog/DialogListItem.stories.js +1 -1
- package/dist/components/Dialog/DialogNav.js +11 -11
- package/dist/components/Dialog/Examples.stories.js +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Dropdown/DrawerButton.js +5 -4
- package/dist/components/Dropdown/DrawerOrDropdown.js +7 -6
- package/dist/components/GlobalMenu/AccountButton.js +3 -2
- package/dist/components/GlobalMenu/AccountMenu.js +3 -2
- package/dist/components/GlobalMenu/BackButton.js +3 -2
- package/dist/components/GlobalMenu/GlobalMenu.js +3 -2
- package/dist/components/Header/HeaderBase.js +5 -4
- package/dist/components/Layout/Layout.js +9 -8
- package/dist/components/Layout/Layout.stories.js +30 -28
- package/dist/components/LayoutAction/ActionMenu.js +5 -4
- package/dist/components/List/List.js +3 -3
- package/dist/components/List/List.stories.js +5 -4
- package/dist/components/List/ListItem.js +6 -39
- package/dist/components/List/ListItem.stories.js +1 -1
- package/dist/components/List/ListItemControls.js +5 -15
- package/dist/components/List/index.js +12 -13
- package/dist/components/Menu/Menu.js +9 -9
- package/dist/components/Menu/MenuItem.stories.js +21 -20
- package/dist/components/Menu/MenuItems.js +8 -59
- package/dist/components/Menu/MenuItems.stories.js +1 -1
- package/dist/components/Menu/MenuSearch.js +6 -5
- package/dist/components/Menu/index.js +7 -7
- package/dist/components/Page/PageHeader.js +8 -7
- package/dist/components/Searchbar/Autocomplete.d.ts +1 -2
- package/dist/components/Searchbar/Autocomplete.js +7 -23
- package/dist/components/Searchbar/Autocomplete.stories.js +1 -1
- package/dist/components/Searchbar/AutocompleteBase.d.ts +2 -1
- package/dist/components/Searchbar/AutocompleteBase.js +9 -6
- package/dist/components/Searchbar/AutocompleteItem.js +3 -20
- package/dist/components/Searchbar/ScopeListItem.d.ts +2 -2
- package/dist/components/Searchbar/ScopeListItem.js +3 -6
- package/dist/components/Searchbar/SearchField.js +39 -39
- package/dist/components/Searchbar/Searchbar.d.ts +1 -1
- package/dist/components/Searchbar/Searchbar.js +25 -17
- package/dist/components/Searchbar/Searchbar.stories.js +63 -47
- package/dist/components/Toolbar/ToolbarAdd.js +3 -2
- package/dist/components/Toolbar/ToolbarDaterange.js +3 -2
- package/dist/components/Toolbar/ToolbarFilter.js +3 -2
- package/dist/components/Toolbar/ToolbarMenu.js +3 -2
- package/dist/components/Toolbar/ToolbarOptions.js +13 -12
- package/dist/components/Toolbar/ToolbarSearch.js +16 -15
- package/dist/components/index.js +213 -218
- package/dist/hooks/useEnterKey.d.ts +1 -0
- package/dist/hooks/useEnterKey.js +15 -0
- package/dist/index.js +226 -231
- package/package.json +1 -1
- package/dist/assets/ContextMenuBase.css +0 -1
- package/dist/assets/DialogListItem.css +0 -1
- package/dist/assets/ListItemControls.css +0 -1
- package/dist/assets/ScopeListItem.css +0 -1
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as f, 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__ */ f("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: l, toggleId: c } = J();
|
|
64
|
+
return /* @__PURE__ */ e(
|
|
65
|
+
ue,
|
|
66
|
+
{
|
|
67
|
+
size: o,
|
|
68
|
+
placement: n,
|
|
69
|
+
className: a,
|
|
70
|
+
expanded: l === 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: l } = E({
|
|
84
|
+
items: o,
|
|
85
|
+
groups: s,
|
|
86
|
+
groupByKey: "groupId",
|
|
87
|
+
keyboardEvents: !1
|
|
88
|
+
});
|
|
89
|
+
return /* @__PURE__ */ e(te, { expanded: n, children: l.map((c, d) => {
|
|
90
|
+
const m = (c == null ? void 0 : c.props) || {}, { title: u, divider: I = !0 } = m, h = l[d + 1];
|
|
91
|
+
return /* @__PURE__ */ f(G, { children: [
|
|
92
|
+
(t > 0 || d) && I ? /* @__PURE__ */ e(B, { role: "separator" }) : "",
|
|
93
|
+
u && /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(ee, { title: u }) }),
|
|
94
|
+
c == null ? void 0 : c.items.map((p, _) => {
|
|
95
|
+
const { active: v } = p, { groupId: k, ...r } = p.props || {}, { expanded: y } = r, b = c == null ? void 0 : c.items[_ + 1];
|
|
96
|
+
return /* @__PURE__ */ f(B, { role: "presentation", expanded: y, children: [
|
|
97
|
+
/* @__PURE__ */ e(
|
|
98
|
+
P,
|
|
99
|
+
{
|
|
100
|
+
...r,
|
|
101
|
+
color: (r == null ? void 0 : r.color) || (m == null ? void 0 : m.defaultItemColor) || a,
|
|
102
|
+
size: (r == null ? void 0 : r.size) || (m == null ? void 0 : m.defaultItemSize) || i,
|
|
103
|
+
active: v,
|
|
104
|
+
tabIndex: r != null && r.disabled ? -1 : 0
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
y && (r == null ? void 0 : r.items) && /* @__PURE__ */ f($, { children: [
|
|
108
|
+
/* @__PURE__ */ e(
|
|
109
|
+
S,
|
|
110
|
+
{
|
|
111
|
+
expanded: y,
|
|
112
|
+
level: t + 1,
|
|
113
|
+
items: r == null ? void 0 : r.items,
|
|
114
|
+
groups: s,
|
|
115
|
+
defaultItemColor: a,
|
|
116
|
+
defaultItemSize: i
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
(h || b) && /* @__PURE__ */ e(B, { role: "separator" })
|
|
120
|
+
] })
|
|
121
|
+
] }, _);
|
|
122
|
+
})
|
|
123
|
+
] }, d);
|
|
124
|
+
}) });
|
|
125
|
+
}, he = "_controls_dduzt_1", _e = "_linkText_dduzt_14", Ie = "_linkIcon_dduzt_19", N = {
|
|
126
|
+
controls: he,
|
|
127
|
+
linkText: _e,
|
|
128
|
+
linkIcon: Ie
|
|
129
|
+
}, pe = ({ badge: t, linkText: n, linkIcon: o, menu: s, children: a }) => /* @__PURE__ */ e("div", { className: N.controls, "data-menu": s && !0, children: a || /* @__PURE__ */ f($, { children: [
|
|
130
|
+
t && /* @__PURE__ */ e(z, { ...t }),
|
|
131
|
+
n && /* @__PURE__ */ e("span", { className: N.linkText, children: n }),
|
|
132
|
+
o && /* @__PURE__ */ e(re, { name: o, className: N.linkIcon }),
|
|
133
|
+
s && /* @__PURE__ */ e(fe, { ...s, className: N.menu })
|
|
134
|
+
] }) }), L = ({
|
|
135
|
+
as: t = "a",
|
|
136
|
+
color: n,
|
|
137
|
+
loading: o,
|
|
138
|
+
size: s = "sm",
|
|
139
|
+
icon: a,
|
|
140
|
+
avatar: i,
|
|
141
|
+
avatarGroup: l,
|
|
142
|
+
title: c,
|
|
143
|
+
description: d,
|
|
144
|
+
collapsible: m,
|
|
145
|
+
expanded: u,
|
|
146
|
+
badge: I,
|
|
147
|
+
linkText: h,
|
|
148
|
+
linkIcon: p,
|
|
149
|
+
menu: _,
|
|
150
|
+
select: v,
|
|
151
|
+
controls: k,
|
|
152
|
+
children: r,
|
|
153
|
+
...y
|
|
154
|
+
}) => /* @__PURE__ */ e(
|
|
155
|
+
D,
|
|
156
|
+
{
|
|
157
|
+
as: t,
|
|
158
|
+
size: s,
|
|
159
|
+
color: n,
|
|
160
|
+
loading: o,
|
|
161
|
+
select: v,
|
|
162
|
+
controls: k || /* @__PURE__ */ e(pe, { linkIcon: m && u ? "chevron-up" : m ? "chevron-down" : p, linkText: h, menu: _, badge: I }),
|
|
163
|
+
...y,
|
|
164
|
+
children: /* @__PURE__ */ e(se, { loading: o, size: s, icon: a, avatar: i, avatarGroup: l, children: /* @__PURE__ */ e(H, { loading: o, title: c, description: d, size: s, children: r }) })
|
|
165
|
+
}
|
|
166
|
+
), ye = "_item_v64fv_1", xe = "_select_v64fv_16", ve = "_summary_v64fv_23", be = "_footer_v64fv_44", ke = "_touchedBy_v64fv_52", Be = "_border_v64fv_61", x = {
|
|
167
|
+
item: ye,
|
|
168
|
+
select: xe,
|
|
169
|
+
summary: ve,
|
|
170
|
+
footer: be,
|
|
171
|
+
touchedBy: ke,
|
|
172
|
+
border: Be
|
|
173
|
+
}, Ne = ({
|
|
174
|
+
size: t = "lg",
|
|
175
|
+
variant: n = "neutral",
|
|
176
|
+
loading: o,
|
|
177
|
+
select: s,
|
|
178
|
+
status: a,
|
|
179
|
+
sender: i,
|
|
180
|
+
recipient: l,
|
|
181
|
+
grouped: c,
|
|
182
|
+
updatedAt: d,
|
|
183
|
+
updatedAtLabel: m,
|
|
184
|
+
archivedAt: u,
|
|
185
|
+
archivedAtLabel: I,
|
|
186
|
+
trashedAt: h,
|
|
187
|
+
trashedAtLabel: p,
|
|
188
|
+
label: _,
|
|
189
|
+
dueAt: v,
|
|
190
|
+
dueAtLabel: k,
|
|
191
|
+
seen: r = !1,
|
|
192
|
+
seenBy: y,
|
|
193
|
+
touchedBy: b,
|
|
194
|
+
attachmentsCount: F,
|
|
195
|
+
title: M,
|
|
196
|
+
description: g,
|
|
197
|
+
...j
|
|
198
|
+
}) => {
|
|
199
|
+
const A = h ? "trashed" : u ? "archived" : n;
|
|
200
|
+
return t === "xs" || t === "sm" ? /* @__PURE__ */ e(D, { ...j, loading: o, size: t, className: x.item, children: /* @__PURE__ */ f(C, { className: x.border, size: t, seen: r, loading: o, children: [
|
|
201
|
+
/* @__PURE__ */ e(H, { loading: o, size: t, title: M, description: g }),
|
|
202
|
+
/* @__PURE__ */ e(T, { loading: o, updatedAt: d, updatedAtLabel: m })
|
|
203
|
+
] }) }) : /* @__PURE__ */ e(
|
|
204
|
+
D,
|
|
205
|
+
{
|
|
206
|
+
...j,
|
|
207
|
+
loading: o,
|
|
208
|
+
size: t,
|
|
209
|
+
className: x.item,
|
|
210
|
+
controls: s && /* @__PURE__ */ e(Y, { className: x.select, ...s }),
|
|
211
|
+
children: /* @__PURE__ */ f(C, { className: x.border, size: t, seen: r, loading: o, children: [
|
|
212
|
+
/* @__PURE__ */ f(O, { size: t, children: [
|
|
213
|
+
/* @__PURE__ */ e(W, { loading: o, size: t, variant: A, label: _, seen: r, children: M }),
|
|
214
|
+
/* @__PURE__ */ e(U, { loading: o, size: t, grouped: c, sender: i, recipient: l })
|
|
215
|
+
] }),
|
|
216
|
+
/* @__PURE__ */ e(Z, { loading: o, size: t, children: g }),
|
|
217
|
+
/* @__PURE__ */ f("footer", { "data-size": t, className: x.footer, children: [
|
|
218
|
+
/* @__PURE__ */ e(
|
|
219
|
+
T,
|
|
220
|
+
{
|
|
221
|
+
loading: o,
|
|
222
|
+
status: a,
|
|
223
|
+
updatedAt: d,
|
|
224
|
+
updatedAtLabel: m,
|
|
225
|
+
archivedAt: u,
|
|
226
|
+
archivedAtLabel: I,
|
|
227
|
+
trashedAt: h,
|
|
228
|
+
trashedAtLabel: p,
|
|
229
|
+
dueAt: v,
|
|
230
|
+
dueAtLabel: k,
|
|
231
|
+
seenBy: y,
|
|
232
|
+
attachmentsCount: F
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
b && /* @__PURE__ */ e(X, { loading: o, size: "xs", touchedBy: b, className: x.touchedBy })
|
|
236
|
+
] })
|
|
237
|
+
] })
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
}, Le = "_item_1a3bc_1", we = {
|
|
241
|
+
item: Le
|
|
242
|
+
}, 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 }) => {
|
|
243
|
+
switch (t) {
|
|
244
|
+
case "scope":
|
|
245
|
+
return /* @__PURE__ */ e(De, { ...n, shadow: "none", tabIndex: -1 });
|
|
246
|
+
case "bookmark":
|
|
247
|
+
return /* @__PURE__ */ e(ae, { ...n, shadow: "none", size: "sm", tabIndex: -1 });
|
|
248
|
+
case "dialog":
|
|
249
|
+
return /* @__PURE__ */ e(Ne, { ...n, shadow: "none", size: "sm", tabIndex: -1 });
|
|
250
|
+
case "information":
|
|
251
|
+
return /* @__PURE__ */ e(L, { ...n, shadow: "none", tabIndex: -1, disabled: !0 });
|
|
252
|
+
default:
|
|
253
|
+
return /* @__PURE__ */ e(L, { ...n, shadow: "none", size: "sm", tabIndex: -1 });
|
|
254
|
+
}
|
|
255
|
+
}, ot = K(
|
|
256
|
+
({ className: t, items: n, groups: o = {}, expanded: s }, a) => {
|
|
257
|
+
const { menu: i, setActiveIndex: l } = E({
|
|
258
|
+
items: n,
|
|
259
|
+
groups: o,
|
|
260
|
+
groupByKey: "groupId",
|
|
261
|
+
keyboardEvents: !0
|
|
262
|
+
});
|
|
263
|
+
return /* @__PURE__ */ e(Q, { className: t, expanded: s, ref: a, children: i.map((c, d) => /* @__PURE__ */ R(V, { ...c.props, key: d }, /* @__PURE__ */ e("ul", { children: c.items.map((m, u) => {
|
|
264
|
+
const {
|
|
265
|
+
active: I,
|
|
266
|
+
menuIndex: h,
|
|
267
|
+
props: { groupId: p, ..._ }
|
|
268
|
+
} = m;
|
|
269
|
+
return /* @__PURE__ */ e("li", { tabIndex: -1, onMouseEnter: () => l(h), children: /* @__PURE__ */ e(Me, { ..._, active: I }) }, u);
|
|
270
|
+
}) }))) });
|
|
271
|
+
}
|
|
272
|
+
);
|
|
273
|
+
export {
|
|
274
|
+
ot as A,
|
|
275
|
+
ae as B,
|
|
276
|
+
fe as C,
|
|
277
|
+
Ne as D,
|
|
278
|
+
pe as L,
|
|
279
|
+
S as M,
|
|
280
|
+
De as S,
|
|
281
|
+
L as a,
|
|
282
|
+
ue as b,
|
|
283
|
+
Me as c
|
|
284
|
+
};
|
|
@@ -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:"»"}
|
|
@@ -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 {
|
|
5
|
+
import { B as i } from "../../Autocomplete-BNV2UfH3.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
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "../Icon/SvgIcon.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import {
|
|
5
|
+
import { B as e } from "../../Autocomplete-BNV2UfH3.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
|
-
|
|
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 {
|
|
5
|
+
import { B as m } from "../../Autocomplete-BNV2UfH3.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
|
-
},
|
|
29
|
+
}, B = {
|
|
30
30
|
args: {}
|
|
31
|
-
},
|
|
31
|
+
}, x = {
|
|
32
32
|
args: {
|
|
33
33
|
title: "Mitt lagrede søk"
|
|
34
34
|
}
|
|
35
|
-
},
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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 {
|
|
3
|
-
import { QueryItem as
|
|
2
|
+
import { B as t } from "../../Autocomplete-BNV2UfH3.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
|
-
|
|
8
|
-
|
|
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
|
-
|
|
10
|
+
import "../../Autocomplete-BNV2UfH3.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"],
|
|
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
|
-
|
|
49
|
-
|
|
49
|
+
b as VariantsAndSizes,
|
|
50
|
+
I as default
|
|
50
51
|
};
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
|
|
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 {
|
|
7
|
-
import
|
|
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-BNV2UfH3.js";
|
|
6
|
+
import "../RootProvider/RootProvider.js";
|
|
30
7
|
export {
|
|
31
|
-
|
|
8
|
+
n as ContextMenu
|
|
32
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as t } from "../../Autocomplete-BNV2UfH3.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
|
-
},
|
|
42
|
+
}, a = {};
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
a as Default,
|
|
45
45
|
o as default
|
|
46
46
|
};
|
|
@@ -1,37 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "../Icon/SvgIcon.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import
|
|
5
|
+
import "../Button/IconButton.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
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-BNV2UfH3.js";
|
|
8
|
+
import "../Dropdown/DropdownBase.js";
|
|
35
9
|
export {
|
|
36
|
-
|
|
10
|
+
s as ContextMenuBase
|
|
37
11
|
};
|
|
@@ -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-BNV2UfH3.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
|
-
},
|
|
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
|
-
|
|
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-BNV2UfH3.js";
|
|
9
10
|
import { SectionBase as p } from "../Page/SectionBase.js";
|
|
10
11
|
import { SectionHeader as a } from "../Page/SectionHeader.js";
|
|
11
|
-
const
|
|
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
|
-
|
|
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 {
|
|
7
|
+
import { D as l } from "../../Autocomplete-BNV2UfH3.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 = {} }) => {
|
|
@@ -1,93 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../List/ListItemBase.js";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../Icon/SvgIcon.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
6
|
+
import "../List/ListItemLabel.js";
|
|
7
|
+
import "./DialogBorder.js";
|
|
8
|
+
import "./DialogMetadata.js";
|
|
9
|
+
import "./DialogHeaderBase.js";
|
|
10
|
+
import "./DialogHeadings.js";
|
|
11
|
+
import "./DialogTitle.js";
|
|
12
|
+
import "./DialogTouchedBy.js";
|
|
13
|
+
import { D as c } from "../../Autocomplete-BNV2UfH3.js";
|
|
14
|
+
import "./DialogSelect.js";
|
|
14
15
|
import "../RootProvider/RootProvider.js";
|
|
15
|
-
import
|
|
16
|
-
import '../../assets/DialogListItem.css';const F = "_item_v64fv_1", G = "_select_v64fv_16", J = "_summary_v64fv_23", K = "_footer_v64fv_44", O = "_touchedBy_v64fv_52", P = "_border_v64fv_61", m = {
|
|
17
|
-
item: F,
|
|
18
|
-
select: G,
|
|
19
|
-
summary: J,
|
|
20
|
-
footer: K,
|
|
21
|
-
touchedBy: O,
|
|
22
|
-
border: P
|
|
23
|
-
}, cr = ({
|
|
24
|
-
size: r = "lg",
|
|
25
|
-
variant: y = "neutral",
|
|
26
|
-
loading: o,
|
|
27
|
-
select: s,
|
|
28
|
-
status: d,
|
|
29
|
-
sender: B,
|
|
30
|
-
recipient: N,
|
|
31
|
-
grouped: b,
|
|
32
|
-
updatedAt: a,
|
|
33
|
-
updatedAtLabel: i,
|
|
34
|
-
archivedAt: l,
|
|
35
|
-
archivedAtLabel: x,
|
|
36
|
-
trashedAt: f,
|
|
37
|
-
trashedAtLabel: I,
|
|
38
|
-
label: L,
|
|
39
|
-
dueAt: j,
|
|
40
|
-
dueAtLabel: H,
|
|
41
|
-
seen: c = !1,
|
|
42
|
-
seenBy: T,
|
|
43
|
-
touchedBy: _,
|
|
44
|
-
attachmentsCount: g,
|
|
45
|
-
title: p,
|
|
46
|
-
description: v,
|
|
47
|
-
...h
|
|
48
|
-
}) => {
|
|
49
|
-
const M = f ? "trashed" : l ? "archived" : y;
|
|
50
|
-
return r === "xs" || r === "sm" ? /* @__PURE__ */ t(n, { ...h, loading: o, size: r, className: m.item, children: /* @__PURE__ */ e(D, { className: m.border, size: r, seen: c, loading: o, children: [
|
|
51
|
-
/* @__PURE__ */ t(S, { loading: o, size: r, title: p, description: v }),
|
|
52
|
-
/* @__PURE__ */ t(u, { loading: o, updatedAt: a, updatedAtLabel: i })
|
|
53
|
-
] }) }) : /* @__PURE__ */ t(
|
|
54
|
-
n,
|
|
55
|
-
{
|
|
56
|
-
...h,
|
|
57
|
-
loading: o,
|
|
58
|
-
size: r,
|
|
59
|
-
className: m.item,
|
|
60
|
-
controls: s && /* @__PURE__ */ t(C, { className: m.select, ...s }),
|
|
61
|
-
children: /* @__PURE__ */ e(D, { className: m.border, size: r, seen: c, loading: o, children: [
|
|
62
|
-
/* @__PURE__ */ e(V, { size: r, children: [
|
|
63
|
-
/* @__PURE__ */ t(q, { loading: o, size: r, variant: M, label: L, seen: c, children: p }),
|
|
64
|
-
/* @__PURE__ */ t(k, { loading: o, size: r, grouped: b, sender: B, recipient: N })
|
|
65
|
-
] }),
|
|
66
|
-
/* @__PURE__ */ t(E, { loading: o, size: r, children: v }),
|
|
67
|
-
/* @__PURE__ */ e("footer", { "data-size": r, className: m.footer, children: [
|
|
68
|
-
/* @__PURE__ */ t(
|
|
69
|
-
u,
|
|
70
|
-
{
|
|
71
|
-
loading: o,
|
|
72
|
-
status: d,
|
|
73
|
-
updatedAt: a,
|
|
74
|
-
updatedAtLabel: i,
|
|
75
|
-
archivedAt: l,
|
|
76
|
-
archivedAtLabel: x,
|
|
77
|
-
trashedAt: f,
|
|
78
|
-
trashedAtLabel: I,
|
|
79
|
-
dueAt: j,
|
|
80
|
-
dueAtLabel: H,
|
|
81
|
-
seenBy: T,
|
|
82
|
-
attachmentsCount: g
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
_ && /* @__PURE__ */ t(w, { loading: o, size: "xs", touchedBy: _, className: m.touchedBy })
|
|
86
|
-
] })
|
|
87
|
-
] })
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
};
|
|
16
|
+
import "./DialogDescription.js";
|
|
91
17
|
export {
|
|
92
|
-
|
|
18
|
+
c as DialogListItem
|
|
93
19
|
};
|