@altinn/altinn-components 0.18.4 → 0.18.5
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.
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as a, jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as m from "react";
|
|
5
5
|
import { forwardRef as f } from "react";
|
|
6
|
-
import { Button as
|
|
6
|
+
import { Button as p } from "../Button/Button.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import { ListBase as
|
|
8
|
+
import { ListBase as c } from "../List/ListBase.js";
|
|
9
9
|
import { Heading as d } from "../Typography/Heading.js";
|
|
10
10
|
import "../Search/AutocompleteBase.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
12
|
import { Flex as s } from "../Page/Flex.js";
|
|
13
13
|
import { Section as u } from "../Page/Section.js";
|
|
14
14
|
import { u as g } from "../../useId-CsCRkvK3.js";
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (
|
|
15
|
+
var v = function(e, i) {
|
|
16
|
+
var r = {};
|
|
17
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (r[t] = e[t]);
|
|
18
18
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
19
|
-
for (var
|
|
20
|
-
i.indexOf(t[
|
|
21
|
-
return
|
|
19
|
+
for (var o = 0, t = Object.getOwnPropertySymbols(e); o < t.length; o++)
|
|
20
|
+
i.indexOf(t[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[o]) && (r[t[o]] = e[t[o]]);
|
|
21
|
+
return r;
|
|
22
22
|
};
|
|
23
|
-
const
|
|
24
|
-
var { title:
|
|
25
|
-
let
|
|
26
|
-
return
|
|
23
|
+
const w = f((e, i) => {
|
|
24
|
+
var { title: r, titleId: t } = e, o = v(e, ["title", "titleId"]);
|
|
25
|
+
let n = g();
|
|
26
|
+
return n = r ? t || "title-" + n : void 0, m.createElement(
|
|
27
27
|
"svg",
|
|
28
|
-
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":
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
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": n }, o),
|
|
29
|
+
r ? m.createElement("title", { id: n }, r) : null,
|
|
30
|
+
m.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M18.998 6.94a.75.75 0 0 1 .063 1.058l-8 9a.75.75 0 0 1-1.091.032l-5-5a.75.75 0 1 1 1.06-1.06l4.438 4.437 7.471-8.405A.75.75 0 0 1 19 6.939", clipRule: "evenodd" })
|
|
31
31
|
);
|
|
32
|
-
}), P = ({ title: e, children: i }) => /* @__PURE__ */
|
|
33
|
-
e && /* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
32
|
+
}), P = ({ title: e, children: i, checkAllLabel: r }) => /* @__PURE__ */ a(u, { spacing: 3, children: [
|
|
33
|
+
e && /* @__PURE__ */ a(s, { direction: "row", align: "center", justify: "between", children: [
|
|
34
|
+
/* @__PURE__ */ l(d, { size: "lg", children: e }),
|
|
35
|
+
r && /* @__PURE__ */ l(p, { variant: "text", icon: w, size: "sm", children: r })
|
|
36
36
|
] }),
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ l(c, { spacing: 3, children: i })
|
|
38
38
|
] });
|
|
39
39
|
export {
|
|
40
40
|
P as DialogListGroup
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as C, jsx as
|
|
2
|
+
import { jsxs as C, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { c as I } from "../../index-L8X2o7IH.js";
|
|
4
4
|
import { useRef as N } from "react";
|
|
5
5
|
import { Icon as v } from "../Icon/Icon.js";
|
|
@@ -19,31 +19,31 @@ import '../../assets/SearchField.css';const j = "_field_1y3oc_1", A = "_icon_1y3
|
|
|
19
19
|
className: m,
|
|
20
20
|
expanded: p,
|
|
21
21
|
name: u = "q",
|
|
22
|
-
value:
|
|
22
|
+
value: o,
|
|
23
23
|
placeholder: d = "Search",
|
|
24
24
|
closeButtonAltText: f = "Close search",
|
|
25
25
|
clearButtonAltText: _ = "Clear search",
|
|
26
26
|
onFocus: y,
|
|
27
27
|
onBlur: h,
|
|
28
28
|
onChange: x,
|
|
29
|
-
onClear:
|
|
30
|
-
onClose:
|
|
31
|
-
onEnter:
|
|
29
|
+
onClear: b,
|
|
30
|
+
onClose: S,
|
|
31
|
+
onEnter: c,
|
|
32
32
|
tabIndex: g
|
|
33
33
|
}) => {
|
|
34
|
-
const
|
|
34
|
+
const i = N(null), k = (e) => {
|
|
35
35
|
var a, r;
|
|
36
|
-
e.key === "Escape" && ((a =
|
|
36
|
+
e.key === "Escape" && ((a = i.current) == null || a.blur()), e.key === "Enter" && ((r = i.current) == null || r.blur(), c == null || c());
|
|
37
37
|
};
|
|
38
38
|
return /* @__PURE__ */ C("div", { className: I(s.field, m), children: [
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ t(
|
|
40
40
|
"input",
|
|
41
41
|
{
|
|
42
|
-
ref:
|
|
42
|
+
ref: i,
|
|
43
43
|
onFocus: y,
|
|
44
44
|
onBlur: h,
|
|
45
45
|
name: u,
|
|
46
|
-
value:
|
|
46
|
+
value: o,
|
|
47
47
|
onChange: x,
|
|
48
48
|
placeholder: d,
|
|
49
49
|
className: s.input,
|
|
@@ -52,28 +52,29 @@ import '../../assets/SearchField.css';const j = "_field_1y3oc_1", A = "_icon_1y3
|
|
|
52
52
|
"aria-haspopup": !0,
|
|
53
53
|
autoComplete: "off",
|
|
54
54
|
"aria-autocomplete": "list",
|
|
55
|
-
tabIndex: g ?? 0
|
|
55
|
+
tabIndex: g ?? 0,
|
|
56
|
+
"data-testid": "searchbar-input"
|
|
56
57
|
}
|
|
57
58
|
),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
59
|
+
/* @__PURE__ */ t(v, { svgElement: T, className: s.icon }),
|
|
60
|
+
o && /* @__PURE__ */ t(
|
|
60
61
|
n,
|
|
61
62
|
{
|
|
62
63
|
icon: l,
|
|
63
64
|
variant: "solid",
|
|
64
65
|
size: "custom",
|
|
65
66
|
className: s.clear,
|
|
66
|
-
onClick:
|
|
67
|
+
onClick: b,
|
|
67
68
|
dataTestId: "search-button-clear",
|
|
68
69
|
iconAltText: _
|
|
69
70
|
}
|
|
70
|
-
) || p && /* @__PURE__ */
|
|
71
|
+
) || p && /* @__PURE__ */ t(
|
|
71
72
|
n,
|
|
72
73
|
{
|
|
73
74
|
icon: l,
|
|
74
75
|
variant: "text",
|
|
75
76
|
className: s.dismiss,
|
|
76
|
-
onClick:
|
|
77
|
+
onClick: S,
|
|
77
78
|
dataTestId: "search-button-close",
|
|
78
79
|
iconAltText: f
|
|
79
80
|
}
|
|
@@ -2,5 +2,6 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
export interface DialogListGroupProps {
|
|
3
3
|
title?: string;
|
|
4
4
|
children?: ReactNode;
|
|
5
|
+
checkAllLabel?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare const DialogListGroup: ({ title, children }: DialogListGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const DialogListGroup: ({ title, children, checkAllLabel }: DialogListGroupProps) => import("react/jsx-runtime").JSX.Element;
|