@altinn/altinn-components 0.29.2 → 0.29.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/SnackbarItem.css +1 -1
- package/dist/assets/TimelineLink.css +1 -1
- package/dist/components/List/ListItemHeader.js +7 -7
- package/dist/components/Snackbar/SnackbarItem.js +36 -37
- package/dist/components/Timeline/TimelineLink.js +18 -19
- package/dist/types/lib/components/Account/AccountMenu.d.ts +3 -4
- package/dist/types/lib/components/Snackbar/SnackbarItem.d.ts +0 -2
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +5 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_1a13i_1{border:none;color:inherit;font:inherit;text-align:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-user-select:none;user-select:none;border-radius:.5rem;box-shadow:var(--ds-shadow-xs)}._item_1a13i_1{position:relative;display:flex;align-items:center;text-decoration:none;color:inherit;padding:.625rem}._icon_1a13i_23{flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:1.5rem;width:2.75rem;height:2.75rem}._content_1a13i_33{flex-grow:1;display:flex;align-items:center;margin-left:.625rem;margin-right:1.25rem}._action_1a13i_41{flex-shrink:0;display:flex;align-items:center;justify-content:center}._item_1a13i_1{background-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_87kyt_1{display:inline-flex;column-gap:.25em;align-items:center;justify-content:flex-start;font-size:.875rem;min-height:auto}._label_87kyt_10{flex-shrink:1;font-weight:400;white-space:inherit;padding:.3125rem}._button_87kyt_1 a{color:inherit}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as E } from "react/jsx-runtime";
|
|
2
2
|
import { c as g } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import { useId as w, isValidElement as z } from "react";
|
|
4
4
|
import { Icon as D } from "../Icon/Icon.js";
|
|
@@ -42,9 +42,9 @@ import '../../assets/ListItemHeader.css';const K = "_header_s4ghf_1", M = "_labe
|
|
|
42
42
|
children: y,
|
|
43
43
|
ariaLabel: C
|
|
44
44
|
}) => {
|
|
45
|
-
const
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
"
|
|
45
|
+
const l = d ? v ? A : G : I ? J : void 0, j = () => r && !t && typeof r == "object" && "label" in r ? /* @__PURE__ */ e(F, { ...r }) : z(r) ? r : null, B = w();
|
|
46
|
+
return /* @__PURE__ */ a(
|
|
47
|
+
"div",
|
|
48
48
|
{
|
|
49
49
|
className: g(o.header, x),
|
|
50
50
|
"data-color": f,
|
|
@@ -80,12 +80,12 @@ import '../../assets/ListItemHeader.css';const K = "_header_s4ghf_1", M = "_labe
|
|
|
80
80
|
children: y
|
|
81
81
|
}
|
|
82
82
|
),
|
|
83
|
-
/* @__PURE__ */ e(V, { className: o.controls, children: n && !t ? /* @__PURE__ */ e("span", { style: { position: "relative" }, children: n }) : /* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ e(V, { className: o.controls, children: n && !t ? /* @__PURE__ */ e("span", { style: { position: "relative" }, children: n }) : /* @__PURE__ */ a(E, { children: [
|
|
84
84
|
j(),
|
|
85
|
-
|
|
85
|
+
l && /* @__PURE__ */ e("span", { className: o.linkIcon, children: /* @__PURE__ */ e(
|
|
86
86
|
D,
|
|
87
87
|
{
|
|
88
|
-
svgElement:
|
|
88
|
+
svgElement: l,
|
|
89
89
|
style: {
|
|
90
90
|
fontSize: "1.5rem"
|
|
91
91
|
}
|
|
@@ -1,65 +1,64 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as f, jsx as
|
|
2
|
+
import { jsxs as f, jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import { c as p } from "../../index-L8X2o7IH.js";
|
|
4
4
|
import { Icon as v } from "../Icon/Icon.js";
|
|
5
5
|
import * as a from "react";
|
|
6
6
|
import { forwardRef as u } from "react";
|
|
7
|
-
import { IconButton as
|
|
7
|
+
import { IconButton as g } from "../Button/IconButton.js";
|
|
8
8
|
import "../RootProvider/RootProvider.js";
|
|
9
9
|
import "../Searchbar/AutocompleteBase.js";
|
|
10
10
|
import "./useSnackbar.js";
|
|
11
|
-
import { u as
|
|
11
|
+
import { u as _ } from "../../useId-BVFxCjkq.js";
|
|
12
12
|
import { S as h } from "../../XMark-DIqxCTTQ.js";
|
|
13
|
-
import '../../assets/SnackbarItem.css';var w = function(e,
|
|
14
|
-
var
|
|
15
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) &&
|
|
13
|
+
import '../../assets/SnackbarItem.css';var w = function(e, i) {
|
|
14
|
+
var o = {};
|
|
15
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (o[t] = e[t]);
|
|
16
16
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
17
17
|
for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
|
|
18
|
-
|
|
19
|
-
return
|
|
18
|
+
i.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
|
|
19
|
+
return o;
|
|
20
20
|
};
|
|
21
|
-
const
|
|
22
|
-
var { title:
|
|
23
|
-
let
|
|
24
|
-
return
|
|
21
|
+
const y = u((e, i) => {
|
|
22
|
+
var { title: o, titleId: t } = e, n = w(e, ["title", "titleId"]);
|
|
23
|
+
let r = _();
|
|
24
|
+
return r = o ? t || "title-" + r : void 0, a.createElement(
|
|
25
25
|
"svg",
|
|
26
|
-
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref:
|
|
27
|
-
|
|
26
|
+
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: i, "aria-labelledby": r }, n),
|
|
27
|
+
o ? a.createElement("title", { id: r }, o) : null,
|
|
28
28
|
a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12.75 2.5a.75.75 0 0 0-1.5 0v1.273c-2.222.14-3.655.92-4.499 2.186-.887 1.33-1.001 3.04-1.001 4.541v3c0 .809-.424 1.92-.92 2.915a18 18 0 0 1-.936 1.641l-.014.022-.004.006A.75.75 0 0 0 4.5 19.25h4.338a3.25 3.25 0 0 0 6.324 0H19.5a.75.75 0 0 0 .624-1.166l-.004-.006-.014-.022-.06-.091c-.05-.081-.125-.2-.215-.35-.18-.301-.42-.722-.66-1.2-.497-.994-.921-2.106-.921-2.915v-3c0-1.501-.114-3.21-1.001-4.541-.844-1.266-2.277-2.046-4.499-2.186zm-1.987 17.237a1.8 1.8 0 0 1-.344-.487h3.162a1.75 1.75 0 0 1-1.581 1 1.75 1.75 0 0 1-1.237-.513", clipRule: "evenodd" })
|
|
29
29
|
);
|
|
30
|
-
}),
|
|
31
|
-
item:
|
|
32
|
-
media: x,
|
|
30
|
+
}), x = "_item_1a13i_1", O = "_icon_1a13i_23", I = "_content_1a13i_33", b = "_action_1a13i_41", c = {
|
|
31
|
+
item: x,
|
|
33
32
|
icon: O,
|
|
34
33
|
content: I,
|
|
35
|
-
action:
|
|
34
|
+
action: b
|
|
36
35
|
};
|
|
37
|
-
var
|
|
38
|
-
const
|
|
36
|
+
var j = /* @__PURE__ */ ((e) => (e.accent = "accent", e.success = "success", e.warning = "warning", e.danger = "danger", e.info = "info", e))(j || {});
|
|
37
|
+
const H = ({
|
|
39
38
|
as: e,
|
|
40
|
-
message:
|
|
41
|
-
className:
|
|
42
|
-
color: t
|
|
43
|
-
icon: n =
|
|
44
|
-
iconAltText:
|
|
39
|
+
message: i,
|
|
40
|
+
className: o,
|
|
41
|
+
color: t,
|
|
42
|
+
icon: n = y,
|
|
43
|
+
iconAltText: r = "Bell icon",
|
|
45
44
|
dismissable: s = !0,
|
|
46
|
-
onDismiss:
|
|
47
|
-
...
|
|
48
|
-
}) => /* @__PURE__ */ f(e || "div", { className: p(
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
s && /* @__PURE__ */
|
|
52
|
-
|
|
45
|
+
onDismiss: m,
|
|
46
|
+
...d
|
|
47
|
+
}) => /* @__PURE__ */ f(e || "div", { className: p(c.item, o), "data-color": t, ...d, children: [
|
|
48
|
+
/* @__PURE__ */ l(v, { svgElement: n, className: c.icon }),
|
|
49
|
+
/* @__PURE__ */ l("div", { className: c.content, children: i }),
|
|
50
|
+
s && /* @__PURE__ */ l("div", { className: c.action, children: /* @__PURE__ */ l(
|
|
51
|
+
g,
|
|
53
52
|
{
|
|
54
53
|
icon: h,
|
|
55
|
-
variant: "
|
|
56
|
-
onClick:
|
|
57
|
-
className:
|
|
54
|
+
variant: "solid",
|
|
55
|
+
onClick: m,
|
|
56
|
+
className: c.dismiss,
|
|
58
57
|
iconAltText: "close"
|
|
59
58
|
}
|
|
60
59
|
) })
|
|
61
60
|
] });
|
|
62
61
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
j as SnackbarColorEnum,
|
|
63
|
+
H as SnackbarItem
|
|
65
64
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { ButtonBase as p } from "../Button/ButtonBase.js";
|
|
5
5
|
import { ButtonLabel as b } from "../Button/ButtonLabel.js";
|
|
@@ -7,32 +7,31 @@ import { ButtonIcon as u } from "../Button/ButtonIcon.js";
|
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import "../Searchbar/AutocompleteBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import '../../assets/TimelineLink.css';const _ = "
|
|
10
|
+
import '../../assets/TimelineLink.css';const _ = "_button_87kyt_1", f = "_label_87kyt_10", t = {
|
|
11
11
|
button: _,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
size: t = "custom",
|
|
12
|
+
label: f
|
|
13
|
+
}, L = ({
|
|
14
|
+
size: o = "xs",
|
|
16
15
|
color: m = "company",
|
|
17
|
-
icon:
|
|
18
|
-
reverse:
|
|
19
|
-
label:
|
|
20
|
-
children:
|
|
21
|
-
...
|
|
22
|
-
}) => /* @__PURE__ */
|
|
16
|
+
icon: r,
|
|
17
|
+
reverse: e,
|
|
18
|
+
label: l,
|
|
19
|
+
children: s,
|
|
20
|
+
...a
|
|
21
|
+
}) => /* @__PURE__ */ i(
|
|
23
22
|
p,
|
|
24
23
|
{
|
|
25
24
|
color: m,
|
|
26
25
|
variant: "link",
|
|
27
|
-
size:
|
|
28
|
-
className:
|
|
29
|
-
...
|
|
26
|
+
size: o,
|
|
27
|
+
className: c(t.button, { [t.reverse]: e }),
|
|
28
|
+
...a,
|
|
30
29
|
children: [
|
|
31
|
-
|
|
32
|
-
/* @__PURE__ */
|
|
30
|
+
r && /* @__PURE__ */ n(u, { className: t.icon, size: o, icon: r }),
|
|
31
|
+
/* @__PURE__ */ n(b, { className: t.label, size: o, children: s || l })
|
|
33
32
|
]
|
|
34
33
|
}
|
|
35
34
|
);
|
|
36
35
|
export {
|
|
37
|
-
|
|
36
|
+
L as TimelineLink
|
|
38
37
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { MenuItemProps, MenuProps, MenuSearchProps } from '../';
|
|
3
|
-
import { MenuItemsVirtualProps } from '../Menu
|
|
4
|
-
interface AccountSearchProps extends MenuSearchProps {
|
|
3
|
+
import { MenuItemsVirtualProps } from '../Menu';
|
|
4
|
+
export interface AccountSearchProps extends MenuSearchProps {
|
|
5
5
|
getResultsLabel?: (hits: number) => string;
|
|
6
6
|
hidden?: boolean;
|
|
7
7
|
}
|
|
8
|
-
interface AccountMenuItemProps extends MenuItemProps {
|
|
8
|
+
export interface AccountMenuItemProps extends MenuItemProps {
|
|
9
9
|
id: string;
|
|
10
10
|
type: 'person' | 'company' | 'group';
|
|
11
11
|
name: string;
|
|
@@ -19,4 +19,3 @@ export interface AccountMenuProps extends MenuProps {
|
|
|
19
19
|
scrollRefStyles?: CSSProperties;
|
|
20
20
|
}
|
|
21
21
|
export declare const AccountMenu: ({ items, groups, search, onSelectAccount, currentAccount, menuItemsVirtual, }: AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export {};
|
|
@@ -34,14 +34,14 @@ declare const meta: {
|
|
|
34
34
|
href?: string | undefined;
|
|
35
35
|
controls?: React.ReactNode;
|
|
36
36
|
selected?: boolean | undefined;
|
|
37
|
-
tabIndex?: number | undefined;
|
|
38
|
-
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
39
|
-
onClick?: (() => void) | undefined;
|
|
40
|
-
onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
41
37
|
interactive?: boolean | undefined;
|
|
42
|
-
|
|
38
|
+
onClick?: (() => void) | undefined;
|
|
39
|
+
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
40
|
+
tabIndex?: number | undefined;
|
|
43
41
|
description?: React.ReactNode | import('..').HeadingProps;
|
|
42
|
+
collapsible?: boolean | undefined;
|
|
44
43
|
linkIcon?: boolean | undefined;
|
|
44
|
+
onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
45
45
|
ariaLabel?: string | undefined;
|
|
46
46
|
shadow?: import('..').Shadow | undefined;
|
|
47
47
|
};
|