@altinn/altinn-components 0.10.4 → 0.11.0
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/README.md +11 -1
- package/dist/assets/Breadcrumbs.css +1 -0
- package/dist/assets/BreadcrumbsLink.css +1 -0
- package/dist/assets/FieldBase.css +1 -0
- package/dist/assets/Flex.css +1 -0
- package/dist/assets/Grid.css +1 -0
- package/dist/assets/Heading.css +1 -1
- package/dist/assets/InputBase.css +1 -0
- package/dist/assets/ListItemBase.css +1 -1
- package/dist/assets/ListItemHeader.css +1 -1
- package/dist/assets/ListItemLabel.css +1 -1
- package/dist/assets/MenuItemMedia.css +1 -1
- package/dist/assets/QueryLabel.css +1 -1
- package/dist/assets/Section.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/components/Autocomplete/AutocompleteItem.js +6 -6
- package/dist/components/Bookmarks/BookmarksListItem.js +66 -7
- package/dist/components/Bookmarks/BookmarksSection.js +36 -13
- package/dist/components/Bookmarks/QueryLabel.js +9 -9
- package/dist/components/Bookmarks/index.js +7 -9
- package/dist/components/Button/Button.js +16 -15
- package/dist/components/Button/IconButton.js +22 -10
- package/dist/components/Dialog/Dialog.js +2 -2
- package/dist/components/Dialog/DialogContent.js +6 -6
- package/dist/components/Dialog/DialogListGroup.js +7 -7
- package/dist/components/Dialog/DialogSection.js +1 -1
- package/dist/components/Dialog/DraftDialog.js +24 -24
- package/dist/components/Dropdown/DropdownBase.js +8 -7
- package/dist/components/Icon/iconsMap.js +16960 -739
- package/dist/components/List/ListItemBase.js +11 -11
- package/dist/components/List/ListItemControls.js +15 -15
- package/dist/components/List/ListItemHeader.js +49 -49
- package/dist/components/List/ListItemLabel.js +8 -8
- package/dist/components/Menu/MenuItemMedia.js +5 -5
- package/dist/components/Page/Article.js +4 -4
- package/dist/components/Page/Breadcrumbs.js +22 -0
- package/dist/components/Page/BreadcrumbsLink.js +28 -0
- package/dist/components/Page/Flex.js +42 -0
- package/dist/components/Page/Grid.js +34 -0
- package/dist/components/Page/PageHeader.js +10 -9
- package/dist/components/Page/PageNav.js +20 -17
- package/dist/components/Page/Section.js +11 -40
- package/dist/components/Page/index.js +18 -14
- package/dist/components/Searchbar/SearchField.js +38 -28
- package/dist/components/TextField/FieldBase.js +16 -0
- package/dist/components/TextField/InputBase.js +33 -0
- package/dist/components/TextField/TextField.js +7 -0
- package/dist/components/TextField/index.js +8 -0
- package/dist/components/Typography/Heading.js +3 -3
- package/dist/components/Typography/Typography.js +8 -9
- package/dist/components/index.js +266 -258
- package/dist/footer-BI7NNFeL.js +27 -0
- package/dist/globalMenu-A9dXKjrI.js +80 -0
- package/dist/header-B7oMg4iq.js +11 -0
- package/dist/inboxMenu-DXIoTtPz.js +48 -0
- package/dist/index.js +274 -266
- package/dist/types/lib/components/Bookmarks/BookmarksListItem.d.ts +16 -2
- package/dist/types/lib/components/Bookmarks/BookmarksListItem.stories.d.ts +2 -3
- package/dist/types/lib/components/Bookmarks/BookmarksSection.d.ts +10 -3
- package/dist/types/lib/components/Bookmarks/BookmarksSection.stories.d.ts +19 -3
- package/dist/types/lib/components/Bookmarks/index.d.ts +0 -1
- package/dist/types/lib/components/Button/Button.d.ts +2 -1
- package/dist/types/lib/components/Button/Button.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/IconButton.d.ts +2 -1
- package/dist/types/lib/components/Button/IconButton.stories.d.ts +1 -1
- package/dist/types/lib/components/Layout/LayoutBase.d.ts +1 -1
- package/dist/types/lib/components/List/ListItemControls.d.ts +2 -1
- package/dist/types/lib/components/List/ListItemHeader.d.ts +2 -2
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +1 -1
- package/dist/types/lib/components/Page/Article.d.ts +1 -1
- package/dist/types/lib/components/Page/Breadcrumbs.d.ts +5 -0
- package/dist/types/lib/components/Page/BreadcrumbsLink.d.ts +11 -0
- package/dist/types/lib/components/Page/{PageBase.stories.d.ts → Examples.stories.d.ts} +2 -1
- package/dist/types/lib/components/Page/Flex.d.ts +29 -0
- package/dist/types/lib/components/Page/Grid.d.ts +22 -0
- package/dist/types/lib/components/Page/PageNav.d.ts +6 -3
- package/dist/types/lib/components/Page/PageNav.stories.d.ts +2 -1
- package/dist/types/lib/components/Page/Section.d.ts +6 -26
- package/dist/types/lib/components/Page/index.d.ts +4 -2
- package/dist/types/lib/components/Searchbar/Searchbar.stories.d.ts +6 -1
- package/dist/types/lib/components/TextField/FieldBase.d.ts +11 -0
- package/dist/types/lib/components/TextField/InputBase.d.ts +14 -0
- package/dist/types/lib/components/TextField/TextField.d.ts +7 -0
- package/dist/types/lib/components/TextField/index.d.ts +3 -0
- package/dist/types/lib/components/Typography/Heading.d.ts +2 -2
- package/dist/types/lib/components/Typography/Typography.d.ts +1 -1
- package/dist/types/lib/components/index.d.ts +1 -0
- package/dist/{useAccountMenu-ImwZYwks.js → useAccountMenu-DgXhBMw4.js} +19 -27
- package/package.json +7 -2
- package/dist/ZoomPlusFill-xyiiemTy.js +0 -17126
- package/dist/assets/ListItemMenu.css +0 -1
- package/dist/assets/SectionFooter.css +0 -1
- package/dist/components/Bookmarks/BookmarksList.js +0 -12
- package/dist/components/Icon/__AkselIcon.js +0 -1042
- package/dist/components/List/ListItemMenu.js +0 -8
- package/dist/components/Page/SectionFooter.js +0 -8
- package/dist/components/Page/SectionHeader.js +0 -12
- package/dist/types/lib/components/Bookmarks/BookmarksList.d.ts +0 -5
- package/dist/types/lib/components/Bookmarks/BookmarksList.stories.d.ts +0 -34
- package/dist/types/lib/components/List/ListItemMenu.d.ts +0 -8
- package/dist/types/lib/components/Page/SectionFooter.d.ts +0 -6
- package/dist/types/lib/components/Page/SectionHeader.d.ts +0 -6
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { Icon as
|
|
2
|
+
import { jsxs as k, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { c as q } from "../../index-L8X2o7IH.js";
|
|
4
|
+
import { useRef as b } from "react";
|
|
5
|
+
import { Icon as w } from "../Icon/Icon.js";
|
|
6
6
|
import "../Icon/SvgIcon.js";
|
|
7
7
|
import { IconButton as l } from "../Button/IconButton.js";
|
|
8
|
-
import '../../assets/SearchField.css';const
|
|
9
|
-
field:
|
|
10
|
-
icon:
|
|
11
|
-
input:
|
|
12
|
-
dismiss:
|
|
8
|
+
import '../../assets/SearchField.css';const I = "_field_1wjpq_1", N = "_icon_1wjpq_10", g = "_input_1wjpq_17", C = "_dismiss_1wjpq_41", K = "_clear_1wjpq_47", s = {
|
|
9
|
+
field: I,
|
|
10
|
+
icon: N,
|
|
11
|
+
input: g,
|
|
12
|
+
dismiss: C,
|
|
13
13
|
clear: K
|
|
14
|
-
},
|
|
14
|
+
}, F = ({
|
|
15
15
|
className: m,
|
|
16
|
-
expanded:
|
|
16
|
+
expanded: a,
|
|
17
17
|
name: p = "q",
|
|
18
18
|
value: e,
|
|
19
19
|
placeholder: u = "Søk",
|
|
20
|
-
onFocus:
|
|
21
|
-
onBlur:
|
|
20
|
+
onFocus: d,
|
|
21
|
+
onBlur: f,
|
|
22
22
|
onChange: _,
|
|
23
23
|
onClear: x,
|
|
24
24
|
onClose: y,
|
|
25
|
-
onEnter:
|
|
26
|
-
tabIndex:
|
|
25
|
+
onEnter: c,
|
|
26
|
+
tabIndex: h
|
|
27
27
|
}) => {
|
|
28
|
-
const
|
|
28
|
+
const t = b(null), j = (o) => {
|
|
29
29
|
var r, n;
|
|
30
|
-
|
|
30
|
+
o.key === "Escape" && ((r = t.current) == null || r.blur()), o.key === "Enter" && ((n = t.current) == null || n.blur(), c == null || c());
|
|
31
31
|
};
|
|
32
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ k("div", { className: q(s.field, m), "aria-expanded": a, children: [
|
|
33
33
|
/* @__PURE__ */ i(
|
|
34
34
|
"input",
|
|
35
35
|
{
|
|
36
|
-
ref:
|
|
37
|
-
onFocus:
|
|
38
|
-
onBlur:
|
|
36
|
+
ref: t,
|
|
37
|
+
onFocus: d,
|
|
38
|
+
onBlur: f,
|
|
39
39
|
name: p,
|
|
40
40
|
value: e,
|
|
41
41
|
onChange: _,
|
|
42
42
|
placeholder: u,
|
|
43
43
|
className: s.input,
|
|
44
|
-
onKeyUp:
|
|
44
|
+
onKeyUp: j,
|
|
45
45
|
type: "search",
|
|
46
46
|
"aria-haspopup": !0,
|
|
47
47
|
autoComplete: "off",
|
|
48
48
|
"aria-autocomplete": "list",
|
|
49
|
-
"aria-expanded":
|
|
50
|
-
tabIndex:
|
|
49
|
+
"aria-expanded": a,
|
|
50
|
+
tabIndex: h ?? 0
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
|
-
/* @__PURE__ */ i(
|
|
53
|
+
/* @__PURE__ */ i(w, { name: "magnifying-glass", className: s.icon }),
|
|
54
54
|
e && /* @__PURE__ */ i(
|
|
55
55
|
l,
|
|
56
56
|
{
|
|
@@ -59,11 +59,21 @@ import '../../assets/SearchField.css';const b = "_field_1wjpq_1", g = "_icon_1wj
|
|
|
59
59
|
variant: "solid",
|
|
60
60
|
size: "custom",
|
|
61
61
|
className: s.clear,
|
|
62
|
-
onClick: x
|
|
62
|
+
onClick: x,
|
|
63
|
+
dataTestId: "search-button-clear"
|
|
63
64
|
}
|
|
64
|
-
) ||
|
|
65
|
+
) || a && /* @__PURE__ */ i(
|
|
66
|
+
l,
|
|
67
|
+
{
|
|
68
|
+
icon: "x-mark",
|
|
69
|
+
variant: "text",
|
|
70
|
+
className: s.dismiss,
|
|
71
|
+
onClick: y,
|
|
72
|
+
dataTestId: "search-button-close"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
65
75
|
] });
|
|
66
76
|
};
|
|
67
77
|
export {
|
|
68
|
-
|
|
78
|
+
F as SearchField
|
|
69
79
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { Typography as m } from "../Typography/Typography.js";
|
|
4
|
+
import { Heading as p } from "../Typography/Heading.js";
|
|
5
|
+
import '../../assets/FieldBase.css';const d = "_field_5tnbv_1", x = "_label_5tnbv_7", _ = "_helperText_5tnbv_11", e = {
|
|
6
|
+
field: d,
|
|
7
|
+
label: x,
|
|
8
|
+
helperText: _
|
|
9
|
+
}, y = ({ as: o, size: n, classname: r, label: s, helperText: l, children: a }) => /* @__PURE__ */ i(o || "label", { className: c(e.field, r), "data-size": n, children: [
|
|
10
|
+
s && /* @__PURE__ */ t(p, { size: "xs", className: e.label, children: s }),
|
|
11
|
+
a,
|
|
12
|
+
l && /* @__PURE__ */ t(m, { className: e.helperText, size: "xs", children: l })
|
|
13
|
+
] });
|
|
14
|
+
export {
|
|
15
|
+
y as FieldBase
|
|
16
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/InputBase.css';const x = "_input_dxhtf_1", f = {
|
|
4
|
+
input: x
|
|
5
|
+
}, l = ({
|
|
6
|
+
type: t = "text",
|
|
7
|
+
name: s,
|
|
8
|
+
value: n,
|
|
9
|
+
placeholder: p,
|
|
10
|
+
onChange: i,
|
|
11
|
+
onFocus: o,
|
|
12
|
+
onBlur: e,
|
|
13
|
+
size: r,
|
|
14
|
+
className: u,
|
|
15
|
+
...a
|
|
16
|
+
}) => /* @__PURE__ */ c(
|
|
17
|
+
"input",
|
|
18
|
+
{
|
|
19
|
+
className: m(f.input, u),
|
|
20
|
+
"data-size": r,
|
|
21
|
+
type: t,
|
|
22
|
+
name: s,
|
|
23
|
+
value: n,
|
|
24
|
+
placeholder: p,
|
|
25
|
+
onChange: i,
|
|
26
|
+
onFocus: o,
|
|
27
|
+
onBlur: e,
|
|
28
|
+
...a
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
export {
|
|
32
|
+
l as InputBase
|
|
33
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { FieldBase as i } from "./FieldBase.js";
|
|
3
|
+
import { InputBase as p } from "./InputBase.js";
|
|
4
|
+
const l = ({ size: r = "md", label: t, helperText: e, ...m }) => /* @__PURE__ */ o(i, { size: r, label: t, helperText: e, children: /* @__PURE__ */ o(p, { ...m, size: r }) });
|
|
5
|
+
export {
|
|
6
|
+
l as TextField
|
|
7
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { c as d } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/Heading.css';const
|
|
4
|
-
heading:
|
|
5
|
-
}, h = ({ as:
|
|
3
|
+
import '../../assets/Heading.css';const m = "_heading_mt0g8_1", o = {
|
|
4
|
+
heading: m
|
|
5
|
+
}, h = ({ as: t = "h2", size: a = "md", weight: e = "medium", className: s, children: i }) => /* @__PURE__ */ n(t, { className: d(o.heading, s), "data-size": a, "data-weight": e, children: i });
|
|
6
6
|
export {
|
|
7
7
|
h as Heading
|
|
8
8
|
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/Typography.css';const n = "
|
|
4
|
-
typography: n
|
|
5
|
-
item: y
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import { c as e } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/Typography.css';const n = "_typography_15hc3_1", m = {
|
|
4
|
+
typography: n
|
|
6
5
|
}, g = ({
|
|
7
6
|
as: t = "div",
|
|
8
7
|
size: o = "md",
|
|
9
8
|
theme: p = "inherit",
|
|
10
|
-
className:
|
|
11
|
-
children:
|
|
12
|
-
...
|
|
13
|
-
}) => /* @__PURE__ */
|
|
9
|
+
className: r,
|
|
10
|
+
children: a,
|
|
11
|
+
...s
|
|
12
|
+
}) => /* @__PURE__ */ y(t, { className: e(m.typography, r), "data-size": o, "data-theme": p, ...s, children: a });
|
|
14
13
|
export {
|
|
15
14
|
g as Typography
|
|
16
15
|
};
|