@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 m, jsx as n } from "react/jsx-runtime";
2
+ import { jsxs as a, jsx as l } from "react/jsx-runtime";
3
3
  import "../../index-L8X2o7IH.js";
4
- import * as a from "react";
4
+ import * as m from "react";
5
5
  import { forwardRef as f } from "react";
6
- import { Button as c } from "../Button/Button.js";
6
+ import { Button as p } from "../Button/Button.js";
7
7
  import "../RootProvider/RootProvider.js";
8
- import { ListBase as p } from "../List/ListBase.js";
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 b = function(e, i) {
16
- var o = {};
17
- for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (o[t] = e[t]);
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 r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
20
- i.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (o[t[r]] = e[t[r]]);
21
- return o;
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 h = f((e, i) => {
24
- var { title: o, titleId: t } = e, r = b(e, ["title", "titleId"]);
25
- let l = g();
26
- return l = o ? t || "title-" + l : void 0, a.createElement(
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": l }, r),
29
- o ? a.createElement("title", { id: l }, o) : null,
30
- a.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" })
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__ */ m(u, { spacing: 3, children: [
33
- e && /* @__PURE__ */ m(s, { direction: "row", align: "center", justify: "between", children: [
34
- /* @__PURE__ */ n(d, { size: "lg", children: e }),
35
- /* @__PURE__ */ n(c, { variant: "text", icon: h, size: "sm", children: "Velg alle" })
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__ */ n(p, { spacing: 3, children: i })
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 o } from "react/jsx-runtime";
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: i,
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: S,
30
- onClose: b,
31
- onEnter: t,
29
+ onClear: b,
30
+ onClose: S,
31
+ onEnter: c,
32
32
  tabIndex: g
33
33
  }) => {
34
- const c = N(null), k = (e) => {
34
+ const i = N(null), k = (e) => {
35
35
  var a, r;
36
- e.key === "Escape" && ((a = c.current) == null || a.blur()), e.key === "Enter" && ((r = c.current) == null || r.blur(), t == null || t());
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__ */ o(
39
+ /* @__PURE__ */ t(
40
40
  "input",
41
41
  {
42
- ref: c,
42
+ ref: i,
43
43
  onFocus: y,
44
44
  onBlur: h,
45
45
  name: u,
46
- value: i,
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__ */ o(v, { svgElement: T, className: s.icon }),
59
- i && /* @__PURE__ */ o(
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: S,
67
+ onClick: b,
67
68
  dataTestId: "search-button-clear",
68
69
  iconAltText: _
69
70
  }
70
- ) || p && /* @__PURE__ */ o(
71
+ ) || p && /* @__PURE__ */ t(
71
72
  n,
72
73
  {
73
74
  icon: l,
74
75
  variant: "text",
75
76
  className: s.dismiss,
76
- onClick: b,
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.18.4",
3
+ "version": "0.18.5",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",