@altinn/altinn-components 0.35.4 → 0.35.6
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/components/ActivityLog/ActivityLog.js +14 -14
- package/dist/components/ActivityLog/ActivityLogSegment.js +3 -3
- package/dist/components/Dialog/DialogList.js +11 -11
- package/dist/components/List/ListItemIcon.js +21 -13
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useState as f, createElement as m } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
|
-
import { Button as
|
|
5
|
+
import { Button as u } from "../Button/Button.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { Timeline as
|
|
7
|
+
import { Timeline as h } from "../Timeline/Timeline.js";
|
|
8
8
|
import "../Searchbar/AutocompleteBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { Section as
|
|
11
|
-
import { ActivityLogSegment as
|
|
12
|
-
const
|
|
10
|
+
import { Section as y } from "../Page/Section.js";
|
|
11
|
+
import { ActivityLogSegment as v } from "./ActivityLogSegment.js";
|
|
12
|
+
const b = ({
|
|
13
13
|
items: o,
|
|
14
14
|
maxItems: t,
|
|
15
15
|
expandLabel: i = "Expand history",
|
|
@@ -17,14 +17,14 @@ const q = ({
|
|
|
17
17
|
}) => {
|
|
18
18
|
if (!(o != null && o.length))
|
|
19
19
|
return null;
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
}, d = t ? o.slice(0, t) : o,
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */ e(
|
|
25
|
-
|
|
20
|
+
const [r, c] = f(!1), p = () => {
|
|
21
|
+
c((n) => !n);
|
|
22
|
+
}, d = t ? o.slice(0, t) : o, g = r ? o : d, s = t && o.length > t;
|
|
23
|
+
return /* @__PURE__ */ a(y, { spacing: 4, children: [
|
|
24
|
+
/* @__PURE__ */ e(h, { children: g.map((n) => /* @__PURE__ */ m(v, { ...n, key: "activitylog-segment-" + n.id })) }),
|
|
25
|
+
s && /* @__PURE__ */ e(u, { variant: "outline", onClick: p, children: r ? l : i })
|
|
26
26
|
] });
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
b as ActivityLog
|
|
30
30
|
};
|
|
@@ -7,10 +7,10 @@ import { Typography as l } from "../Typography/Typography.js";
|
|
|
7
7
|
import "../Searchbar/AutocompleteBase.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
9
|
import { ActivityLogItem as y } from "./ActivityLogItem.js";
|
|
10
|
-
const T = ({ id: i, items:
|
|
11
|
-
|
|
10
|
+
const T = ({ id: i, items: o, datetime: m, byline: p, children: e, summary: r }) => /* @__PURE__ */ n(f, { datetime: m, byline: p, spacing: 2, id: i, children: [
|
|
11
|
+
r && /* @__PURE__ */ c(l, { children: r }),
|
|
12
12
|
e,
|
|
13
|
-
|
|
13
|
+
o == null ? void 0 : o.map((t) => /* @__PURE__ */ g(y, { ...t, key: "activity-log-item" + t.id }))
|
|
14
14
|
] });
|
|
15
15
|
export {
|
|
16
16
|
T as ActivityLogSegment
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createElement as
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as r } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import { useMenu as y } from "../../hooks/useMenu.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { DialogListGroup as
|
|
7
|
-
import { DialogListItem as
|
|
6
|
+
import { DialogListGroup as d } from "./DialogListGroup.js";
|
|
7
|
+
import { DialogListItem as g } from "./DialogListItem.js";
|
|
8
8
|
import "../Searchbar/AutocompleteBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { Section as
|
|
11
|
-
const v = ({ items: i, groups: m = {}, sortGroupBy: e, isLoading:
|
|
10
|
+
import { Section as u } from "../Page/Section.js";
|
|
11
|
+
const v = ({ items: i, groups: m = {}, sortGroupBy: e, isLoading: s }) => {
|
|
12
12
|
const { menu: o } = y({
|
|
13
13
|
items: i,
|
|
14
14
|
groups: m,
|
|
@@ -16,11 +16,11 @@ const v = ({ items: i, groups: m = {}, sortGroupBy: e, isLoading: p }) => {
|
|
|
16
16
|
keyboardEvents: !1,
|
|
17
17
|
sortGroupBy: e
|
|
18
18
|
});
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ f(u, { spacing: 3, margin: "section", "aria-busy": s, children: o == null ? void 0 : o.map((t, p) => {
|
|
20
|
+
const a = t.props || {};
|
|
21
|
+
return /* @__PURE__ */ r(d, { ...a, key: "dialog-list-item" + p }, t == null ? void 0 : t.items.map((n, l) => {
|
|
22
|
+
const c = n.props || {};
|
|
23
|
+
return /* @__PURE__ */ r(g, { ...c, key: "dialog-list-item" + l });
|
|
24
24
|
}));
|
|
25
25
|
}) });
|
|
26
26
|
};
|
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { isValidElement as n } from "react";
|
|
3
|
-
import { Icon as
|
|
3
|
+
import { Icon as e, isIconProps as l } from "../Icon/Icon.js";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
5
|
import { isAvatarProps as c, Avatar as f } from "../Avatar/Avatar.js";
|
|
6
|
-
import { isAvatarGroupProps as v, AvatarGroup as
|
|
7
|
-
import { Badge as
|
|
6
|
+
import { isAvatarGroupProps as v, AvatarGroup as u } from "../Avatar/AvatarGroup.js";
|
|
7
|
+
import { Badge as _ } from "../Badge/Badge.js";
|
|
8
8
|
import "../RootProvider/RootProvider.js";
|
|
9
9
|
import "../Searchbar/AutocompleteBase.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
import { S as
|
|
12
|
-
import '../../assets/ListItemIcon.css';const
|
|
13
|
-
wrapper:
|
|
14
|
-
icon:
|
|
15
|
-
avatar:
|
|
16
|
-
avatarGroup:
|
|
11
|
+
import { S as d } from "../../XMark-DIqxCTTQ.js";
|
|
12
|
+
import '../../assets/ListItemIcon.css';const g = "_wrapper_1q66b_1", N = "_icon_1q66b_8", w = "_avatar_1q66b_16", b = "_avatarGroup_1q66b_20", t = {
|
|
13
|
+
wrapper: g,
|
|
14
|
+
icon: N,
|
|
15
|
+
avatar: w,
|
|
16
|
+
avatarGroup: b
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function h(a) {
|
|
19
19
|
return typeof a == "string" || typeof a == "number" || typeof a == "boolean" || a === null || n(a);
|
|
20
20
|
}
|
|
21
|
-
const z = ({ loading: a, size: m, icon: r, theme:
|
|
22
|
-
c(r) && /* @__PURE__ */ o(
|
|
23
|
-
|
|
21
|
+
const z = ({ loading: a, size: m, icon: r, theme: s, badge: p }) => r ? a ? /* @__PURE__ */ o(e, { className: t.wrapper, svgElement: d, loading: !0 }) : /* @__PURE__ */ i("div", { className: t.wrapper, "data-size": m, children: [
|
|
22
|
+
c(r) && /* @__PURE__ */ o(
|
|
23
|
+
f,
|
|
24
|
+
{
|
|
25
|
+
...r,
|
|
26
|
+
className: t.avatar,
|
|
27
|
+
innerContainerStyle: { width: "fit-content" },
|
|
28
|
+
avatarImageStyle: { height: "1em", width: "auto" }
|
|
29
|
+
}
|
|
30
|
+
) || v(r) && /* @__PURE__ */ o(u, { ...r, className: t.avatarGroup }) || l(r) && /* @__PURE__ */ o(e, { ...r, theme: r.theme || s, className: t.icon }) || h(r) && r || /* @__PURE__ */ o(e, { theme: s, svgElement: r, className: t.icon }),
|
|
31
|
+
p && /* @__PURE__ */ o(_, { ...p, className: t.badge })
|
|
24
32
|
] }) : null;
|
|
25
33
|
export {
|
|
26
34
|
z as ListItemIcon
|
|
@@ -51,3 +51,4 @@ declare const meta: {
|
|
|
51
51
|
export default meta;
|
|
52
52
|
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
53
53
|
export declare const UsingBadges: () => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare const WithWideLogo: () => import("react/jsx-runtime").JSX.Element;
|