@altinn/altinn-components 0.41.3 → 0.41.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/assets/Avatar.css +1 -1
- package/dist/assets/MenuItemIcon.css +1 -1
- package/dist/components/Account/AccountListItemDetails.js +18 -16
- package/dist/components/Account/AccountOrganization.js +9 -6
- package/dist/components/Avatar/Avatar.js +21 -21
- package/dist/components/Bookmarks/index.js +6 -12
- package/dist/components/Dialog/DialogMetadata.js +56 -39
- package/dist/components/Menu/MenuItemIcon.js +14 -14
- package/dist/components/Settings/BookmarksSettingsItem.js +67 -0
- package/dist/components/Settings/BookmarksSettingsList.js +43 -0
- package/dist/components/Settings/SettingsItem.js +47 -38
- package/dist/components/Settings/SettingsItemBase.js +47 -0
- package/dist/components/Settings/SettingsList.js +4 -4
- package/dist/components/Settings/SettingsSection.js +3 -3
- package/dist/components/Settings/index.js +18 -12
- package/dist/components/index.js +371 -371
- package/dist/index.js +376 -376
- package/dist/types/lib/components/Account/AccountListItemDetails.d.ts +3 -1
- package/dist/types/lib/components/Account/AccountListItemDetails.stories.d.ts +1 -1
- package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +2 -0
- package/dist/types/lib/components/Bookmarks/index.d.ts +0 -3
- package/dist/types/lib/components/Settings/BookmarksSettingsItem.d.ts +24 -0
- package/dist/types/lib/components/Settings/BookmarksSettingsList.d.ts +12 -0
- package/dist/types/lib/components/Settings/SettingsItem.d.ts +14 -11
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +19 -10
- package/dist/types/lib/components/Settings/SettingsItemBase.d.ts +13 -0
- package/dist/types/lib/components/Settings/index.d.ts +4 -1
- package/package.json +1 -1
- package/dist/Trash-ofRjaQsc.js +0 -24
- package/dist/components/Bookmarks/BookmarksSettingsItem.js +0 -54
- package/dist/components/Bookmarks/BookmarksSettingsModal.js +0 -46
- package/dist/components/Bookmarks/BookmarksSettingsSection.js +0 -64
- package/dist/components/Settings/AddressSettingsModal.js +0 -69
- package/dist/types/lib/components/Bookmarks/BookmarksSettingsItem.d.ts +0 -12
- package/dist/types/lib/components/Bookmarks/BookmarksSettingsModal.d.ts +0 -19
- package/dist/types/lib/components/Bookmarks/BookmarksSettingsSection.d.ts +0 -33
- package/dist/types/lib/components/Settings/AddressSettingsModal.d.ts +0 -5
- /package/dist/assets/{SettingsItem.css → SettingsItemBase.css} +0 -0
|
@@ -1,45 +1,54 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
|
-
import "react";
|
|
3
|
+
import { useState as h } from "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import { getAriaLabelFromTitle as L } from "../Menu/MenuItemLabel.js";
|
|
6
|
-
import { ListItemBase as d } from "../List/ListItemBase.js";
|
|
7
|
-
import { ListItemHeader as f } from "../List/ListItemHeader.js";
|
|
8
|
-
import { ListItemLabel as g } from "../List/ListItemLabel.js";
|
|
9
5
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
description: n,
|
|
23
|
-
children: _,
|
|
24
|
-
highlightWords: b,
|
|
25
|
-
...m
|
|
6
|
+
import { Input as v } from "../Forms/Input.js";
|
|
7
|
+
import { SettingsItemBase as i } from "./SettingsItemBase.js";
|
|
8
|
+
import { SettingsModal as b } from "./SettingsModal.js";
|
|
9
|
+
const B = ({
|
|
10
|
+
loading: a,
|
|
11
|
+
variant: c = "default",
|
|
12
|
+
id: m = "settings",
|
|
13
|
+
name: u,
|
|
14
|
+
checked: f,
|
|
15
|
+
onChange: d,
|
|
16
|
+
children: g,
|
|
17
|
+
...t
|
|
26
18
|
}) => {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
19
|
+
const [n, l] = h(!1);
|
|
20
|
+
if (a)
|
|
21
|
+
return /* @__PURE__ */ e(i, { icon: t == null ? void 0 : t.icon, title: t == null ? void 0 : t.title, loading: !0 });
|
|
22
|
+
switch (c) {
|
|
23
|
+
case "switch":
|
|
24
|
+
return /* @__PURE__ */ e(
|
|
25
|
+
i,
|
|
26
|
+
{
|
|
27
|
+
...t,
|
|
28
|
+
title: [t == null ? void 0 : t.title, t == null ? void 0 : t.value].join(": "),
|
|
29
|
+
value: void 0,
|
|
30
|
+
interactive: !1,
|
|
31
|
+
controls: /* @__PURE__ */ e(
|
|
32
|
+
v,
|
|
33
|
+
{
|
|
34
|
+
type: "checkbox",
|
|
35
|
+
role: "switch",
|
|
36
|
+
"aria-labelledby": m,
|
|
37
|
+
name: u,
|
|
38
|
+
value: t == null ? void 0 : t.value,
|
|
39
|
+
checked: f,
|
|
40
|
+
onChange: d,
|
|
41
|
+
style: { marginRight: "0.5em" }
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
case "modal":
|
|
47
|
+
return /* @__PURE__ */ e(i, { ...t, as: "button", linkIcon: !0, onClick: () => l(!0), expanded: n, children: n && /* @__PURE__ */ e(b, { icon: t == null ? void 0 : t.icon, title: t == null ? void 0 : t.title, open: n, onClose: () => l(!1), children: g }) });
|
|
48
|
+
default:
|
|
49
|
+
return /* @__PURE__ */ e(i, { ...t });
|
|
50
|
+
}
|
|
42
51
|
};
|
|
43
52
|
export {
|
|
44
|
-
|
|
53
|
+
B as SettingsItem
|
|
45
54
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs as L, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "../RootProvider/RootProvider.js";
|
|
5
|
+
import { getAriaLabelFromTitle as d } from "../Menu/MenuItemLabel.js";
|
|
6
|
+
import { ListItemBase as f } from "../List/ListItemBase.js";
|
|
7
|
+
import { ListItemHeader as g } from "../List/ListItemHeader.js";
|
|
8
|
+
import { ListItemLabel as I } from "../List/ListItemLabel.js";
|
|
9
|
+
import "../Snackbar/useSnackbar.js";
|
|
10
|
+
import '../../assets/SettingsItemBase.css';const k = "_item_lk1g7_1", N = "_label_lk1g7_20", j = "_header_lk1g7_24", e = {
|
|
11
|
+
item: k,
|
|
12
|
+
label: N,
|
|
13
|
+
header: j
|
|
14
|
+
}, q = ({
|
|
15
|
+
loading: t,
|
|
16
|
+
color: s,
|
|
17
|
+
size: l,
|
|
18
|
+
expanded: r,
|
|
19
|
+
icon: o,
|
|
20
|
+
label: c,
|
|
21
|
+
title: m,
|
|
22
|
+
value: n,
|
|
23
|
+
description: _,
|
|
24
|
+
children: b,
|
|
25
|
+
highlightWords: h,
|
|
26
|
+
...a
|
|
27
|
+
}) => {
|
|
28
|
+
const p = a.ariaLabel || d(m);
|
|
29
|
+
return /* @__PURE__ */ L(f, { className: e.item, color: s, size: l, expanded: r, children: [
|
|
30
|
+
/* @__PURE__ */ i(g, { ...a, loading: t, ariaLabel: p, className: e.header, icon: o, children: /* @__PURE__ */ i(
|
|
31
|
+
I,
|
|
32
|
+
{
|
|
33
|
+
loading: t,
|
|
34
|
+
highlightWords: h,
|
|
35
|
+
className: e.label,
|
|
36
|
+
title: m,
|
|
37
|
+
value: n,
|
|
38
|
+
description: _,
|
|
39
|
+
children: c
|
|
40
|
+
}
|
|
41
|
+
) }),
|
|
42
|
+
r && b
|
|
43
|
+
] });
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
q as SettingsItemBase
|
|
47
|
+
};
|
|
@@ -8,8 +8,8 @@ import { Divider as y } from "../Divider/Divider.js";
|
|
|
8
8
|
import { List as S } from "../List/List.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
10
|
import { Flex as v } from "../Page/Flex.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { SettingsItem as j } from "./SettingsItem.js";
|
|
12
|
+
import { SettingsSection as k } from "./SettingsSection.js";
|
|
13
13
|
const q = ({ items: n, groups: p = {}, sortGroupBy: c }) => {
|
|
14
14
|
const { menu: r } = h({
|
|
15
15
|
items: n,
|
|
@@ -22,11 +22,11 @@ const q = ({ items: n, groups: p = {}, sortGroupBy: c }) => {
|
|
|
22
22
|
const e = i.props || {};
|
|
23
23
|
return /* @__PURE__ */ o(s, { children: [
|
|
24
24
|
(e == null ? void 0 : e.title) && /* @__PURE__ */ t(g, { size: "lg", children: e.title }),
|
|
25
|
-
/* @__PURE__ */ t(
|
|
25
|
+
/* @__PURE__ */ t(k, { children: /* @__PURE__ */ t(S, { size: "sm", children: i == null ? void 0 : i.items.map((a, m) => {
|
|
26
26
|
const d = a.props || {};
|
|
27
27
|
return /* @__PURE__ */ o(s, { children: [
|
|
28
28
|
m > 0 && /* @__PURE__ */ t(y, { as: "li" }),
|
|
29
|
-
/* @__PURE__ */ f(
|
|
29
|
+
/* @__PURE__ */ f(j, { ...d, key: "settings-list-item" + m })
|
|
30
30
|
] }, m);
|
|
31
31
|
}) }) })
|
|
32
32
|
] }, l);
|
|
@@ -11,9 +11,9 @@ import '../../assets/SettingsSection.css';const m = "_section_kd6sc_1", p = {
|
|
|
11
11
|
theme: o = "default",
|
|
12
12
|
shadow: s = "xs",
|
|
13
13
|
as: i,
|
|
14
|
-
color:
|
|
15
|
-
children:
|
|
16
|
-
}) => /* @__PURE__ */ n(r, { as: i, size: t, color:
|
|
14
|
+
color: c,
|
|
15
|
+
children: e
|
|
16
|
+
}) => /* @__PURE__ */ n(r, { as: i, size: t, color: c, theme: o, shadow: s, className: p.section, spacing: 2, children: e });
|
|
17
17
|
export {
|
|
18
18
|
d as SettingsSection
|
|
19
19
|
};
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { SettingsList as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { SettingsItem as e } from "./SettingsItem.js";
|
|
2
|
+
import { SettingsItemBase as m } from "./SettingsItemBase.js";
|
|
3
|
+
import { SettingsList as i } from "./SettingsList.js";
|
|
4
|
+
import { SettingsSection as g } from "./SettingsSection.js";
|
|
5
|
+
import { SettingsModal as x } from "./SettingsModal.js";
|
|
6
|
+
import { UsedByLog as S } from "./UsedByLog.js";
|
|
7
|
+
import { UsedByLogItem as a } from "./UsedByLogItem.js";
|
|
8
|
+
import { BookmarksSettingsItem as I } from "./BookmarksSettingsItem.js";
|
|
9
|
+
import { BookmarksSettingsList as d } from "./BookmarksSettingsList.js";
|
|
7
10
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
I as BookmarksSettingsItem,
|
|
12
|
+
d as BookmarksSettingsList,
|
|
13
|
+
e as SettingsItem,
|
|
14
|
+
m as SettingsItemBase,
|
|
15
|
+
i as SettingsList,
|
|
16
|
+
x as SettingsModal,
|
|
17
|
+
g as SettingsSection,
|
|
18
|
+
S as UsedByLog,
|
|
19
|
+
a as UsedByLogItem
|
|
14
20
|
};
|