@altinn/altinn-components 0.48.0 → 0.48.1

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 +1 @@
1
- ._virtualScrollRef_o3xco_1{height:100vh;overflow-y:auto;overflow-x:hidden;padding:0 .5rem;margin:0 -.5rem}._virtualList_o3xco_9{list-style-type:none;padding:0;margin:0}._virtualListItem_o3xco_15{position:absolute;top:0;left:0;width:100%}._virtualListItem_o3xco_15>*{margin:0}._lastChild_o3xco_26{padding-bottom:1rem}._virtualTitleItem_o3xco_30{position:absolute;top:0;left:0;width:100%;padding-top:1rem;padding-bottom:1rem}._virtualTitleItem_o3xco_30:first-child{padding-top:0}
1
+ ._virtualScrollRef_rixtf_1{height:100vh;overflow-y:auto;overflow-x:hidden;padding:0 .5rem;margin:0 -.5rem}._virtualList_rixtf_9{list-style-type:none;padding:0;margin:0}._virtualListItem_rixtf_15{position:absolute;top:0;left:0;width:100%;z-index:1}._virtualListItem_rixtf_15:focus-within,._virtualListItem_rixtf_15:has([data-state=open]){z-index:20}._virtualListItem_rixtf_15>*{margin:0}._lastChild_rixtf_32{padding-bottom:1rem}._virtualTitleItem_rixtf_36{position:absolute;top:0;left:0;width:100%;padding-top:1rem;padding-bottom:1rem}._virtualTitleItem_rixtf_36:first-child{padding-top:0}
@@ -9,7 +9,7 @@ import { Heading as L } from "../Typography/Heading.js";
9
9
  import "../RootProvider/RootProvider.js";
10
10
  import "../Snackbar/useSnackbar.js";
11
11
  import { Section as S } from "../Page/Section.js";
12
- import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_o3xco_1", C = "_virtualList_o3xco_9", P = "_virtualListItem_o3xco_15", E = "_lastChild_o3xco_26", z = "_virtualTitleItem_o3xco_30", a = {
12
+ import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_rixtf_1", C = "_virtualList_rixtf_9", P = "_virtualListItem_rixtf_15", E = "_lastChild_rixtf_32", z = "_virtualTitleItem_rixtf_36", o = {
13
13
  virtualScrollRef: $,
14
14
  virtualList: C,
15
15
  virtualListItem: P,
@@ -22,7 +22,7 @@ import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_o3xco_
22
22
  groupByKey: "groupId",
23
23
  keyboardEvents: !1,
24
24
  sortGroupBy: f
25
- }), o = y.flatMap((t) => {
25
+ }), a = y.flatMap((t) => {
26
26
  const e = (t == null ? void 0 : t.props) || {}, { title: i } = e, r = (t == null ? void 0 : t.items) || [];
27
27
  return [
28
28
  ...i ? [{ type: "title", title: i }] : [],
@@ -32,14 +32,14 @@ import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_o3xco_
32
32
  }))
33
33
  ];
34
34
  }), m = x({
35
- count: o.length,
35
+ count: a.length,
36
36
  gap: 8,
37
37
  estimateSize: (t) => {
38
38
  var c;
39
- const e = o[t];
39
+ const e = a[t];
40
40
  if (!e) return 44;
41
41
  if (e.type === "title") return t === 0 ? 48 : 88;
42
- const i = o[t + 1], r = e.itemProps;
42
+ const i = a[t + 1], r = e.itemProps;
43
43
  return (r == null ? void 0 : r.parentId) && (!i || i.type === "title" || i.type === "item" && !((c = i.itemProps) != null && c.parentId)) ? 96 : 80;
44
44
  },
45
45
  getScrollElement: () => n.current
@@ -50,36 +50,36 @@ import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_o3xco_
50
50
  const s = ((t = n.current) == null ? void 0 : t.querySelector(`[data-index="${r.index}"]`)) ?? ((e = n.current) == null ? void 0 : e.querySelector(`[dataindex="${r.index}"]`)) ?? ((i = n.current) == null ? void 0 : i.querySelector(`[dataIndex="${r.index}"]`));
51
51
  s && m.measureElement(s);
52
52
  }
53
- }, [u]), /* @__PURE__ */ l(S, { spacing: 6, children: /* @__PURE__ */ l("div", { ref: n, className: a.virtualScrollRef, children: /* @__PURE__ */ l(
53
+ }, [u]), /* @__PURE__ */ l(S, { spacing: 6, children: /* @__PURE__ */ l("div", { ref: n, className: o.virtualScrollRef, children: /* @__PURE__ */ l(
54
54
  "ul",
55
55
  {
56
- className: a.virtualList,
56
+ className: o.virtualList,
57
57
  style: {
58
58
  position: "relative",
59
59
  height: `${m.getTotalSize()}px`
60
60
  },
61
61
  children: u.map((t) => {
62
62
  var i, r;
63
- const e = o[t.index];
63
+ const e = a[t.index];
64
64
  if (!e) return null;
65
65
  if (e.type === "title")
66
66
  return /* @__PURE__ */ l(
67
67
  "li",
68
68
  {
69
69
  "data-index": t.index,
70
- className: a.virtualTitleItem,
70
+ className: o.virtualTitleItem,
71
71
  style: { transform: `translateY(${t.start}px)` },
72
72
  children: /* @__PURE__ */ l(L, { size: "lg", children: e.title })
73
73
  },
74
74
  t.key
75
75
  );
76
76
  if (e.type === "item") {
77
- const s = o[t.index + 1], c = ((i = e.itemProps) == null ? void 0 : i.parentId) && (!s || s.type === "title" || s.type === "item" && !((r = s.itemProps) != null && r.parentId));
77
+ const s = a[t.index + 1], c = ((i = e.itemProps) == null ? void 0 : i.parentId) && (!s || s.type === "title" || s.type === "item" && !((r = s.itemProps) != null && r.parentId));
78
78
  return /* @__PURE__ */ l(
79
79
  "li",
80
80
  {
81
81
  "data-index": t.index,
82
- className: `${a.virtualListItem} ${c ? a.lastChild : ""}`,
82
+ className: `${o.virtualListItem} ${c ? o.lastChild : ""}`,
83
83
  style: { transform: `translateY(${t.start}px)` },
84
84
  children: /* @__PURE__ */ l(v, { ...e.itemProps, containerAs: "div" })
85
85
  },
@@ -17,8 +17,9 @@ interface ControlledProps {
17
17
  collapsible?: boolean;
18
18
  color?: 'neutral';
19
19
  variant?: 'subtle' | 'tinted' | 'default';
20
+ isVirtualized?: boolean;
20
21
  }
21
- export declare const Controlled: ({ includeGroups, collapsible, contextMenu, variant, color, }: ControlledProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const Controlled: ({ includeGroups, collapsible, contextMenu, variant, color, isVirtualized, }: ControlledProps) => import("react/jsx-runtime").JSX.Element;
22
23
  export declare const ControlledTinted: () => import("react/jsx-runtime").JSX.Element;
23
24
  export declare const Collapsible: () => import("react/jsx-runtime").JSX.Element;
24
25
  export declare const CollapsibleWithGroups: () => 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.48.0",
3
+ "version": "0.48.1",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",