@altinn/altinn-components 0.67.5 → 0.67.7

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.
@@ -0,0 +1,19 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import './assets/LayoutBase.css';const o = "_base_1084c_1", c = "_bannerWrapperPinned_1084c_14", d = {
3
+ base: o,
4
+ bannerWrapperPinned: c
5
+ }, i = ({ currentId: e, color: n, theme: s, bannerHeight: a, children: r }) => /* @__PURE__ */ t(
6
+ "div",
7
+ {
8
+ className: d.base,
9
+ "data-color": n,
10
+ "data-theme": s,
11
+ "data-current-id": e,
12
+ style: a ? { "--altinn-banner-height": `${a}px` } : void 0,
13
+ children: r
14
+ }
15
+ );
16
+ export {
17
+ i as L,
18
+ d as s
19
+ };
@@ -1 +1 @@
1
- ._header_17ppp_1{z-index:1;background-color:#fff;width:100%}._container_17ppp_7{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;padding:.625rem;width:100%;max-width:1512px;margin:0 auto}._backdrop_17ppp_19{display:none}._header_17ppp_1[data-current-id=menu],._header_17ppp_1[data-current-id=locale]{background-color:#fff}@media(min-width:1024px){._header_17ppp_1[data-current-id=menu] ._backdrop_17ppp_19,._header_17ppp_1[data-current-id=locale] ._backdrop_17ppp_19{display:block}}@media(max-width:1023px){._header_17ppp_1{gap:0}}._header_17ppp_1{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}._nav_17ppp_53{position:relative;display:flex;align-items:center;justify-content:end;column-gap:1rem;width:100%}._logo_17ppp_62{margin-right:auto}
1
+ ._header_1apfp_1{z-index:1;background-color:#fff;width:100%}._header_1apfp_1[data-current-id=account],._header_1apfp_1[data-current-id=menu],._header_1apfp_1[data-current-id=locale]{position:fixed;top:var(--altinn-banner-height, 0px);left:0;right:0}._container_1apfp_21{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;padding:.625rem;width:100%;max-width:1512px;margin:0 auto}._backdrop_1apfp_33{display:none}._header_1apfp_1[data-current-id=menu],._header_1apfp_1[data-current-id=locale]{background-color:#fff}@media(min-width:1024px){._header_1apfp_1[data-current-id=menu] ._backdrop_1apfp_33,._header_1apfp_1[data-current-id=locale] ._backdrop_1apfp_33{display:block}}@media(max-width:1023px){._header_1apfp_1{gap:0}}._header_1apfp_1{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}._nav_1apfp_67{position:relative;display:flex;align-items:center;justify-content:end;column-gap:1rem;width:100%}._logo_1apfp_76{margin-right:auto}
@@ -1 +1 @@
1
- html:has(dialog[open]){overflow:hidden;scrollbar-gutter:stable}._backdrop_yn0zc_11{display:block;z-index:1;background-color:#111d4640;position:fixed;top:calc(4.5rem + var(--altinn-banner-height, 0px));right:0;bottom:0;left:0;width:100%;height:100%}._backdrop_yn0zc_11[aria-hidden=true]{display:none}._drawer_yn0zc_28{position:fixed;z-index:2;background-color:#fff;width:100%;max-width:100vw;height:auto;max-height:none;box-sizing:border-box;padding:0;margin:0;border:0;top:calc(4.5rem + var(--altinn-banner-height, 0px));bottom:0;display:flex;flex-direction:column;overflow-y:scroll}._drawer_yn0zc_28::backdrop{background-color:transparent}._drawer_yn0zc_28:not([data-open=true]){display:none}._footer_yn0zc_60{display:none}._body_yn0zc_64{padding:0 .5rem}@media(min-width:1024px){._body_yn0zc_64{padding:0 1rem}._drawer_yn0zc_28{inset:auto;position:fixed;top:calc(4.5rem + var(--altinn-banner-height, 0px));left:0;right:0;margin:0;height:auto;max-height:55vh;overflow-y:auto}._drawer_yn0zc_28[data-expanded=true]{bottom:0;height:auto;max-height:none;overflow-y:scroll}._footer_yn0zc_60{position:sticky;z-index:2000;display:flex;bottom:0;left:0;right:0;justify-content:center;align-items:center;background-color:#fff}._toggleButton_yn0zc_104{margin:1rem 0}}
1
+ html:has(dialog[open]){overflow:hidden;scrollbar-gutter:stable}._backdrop_c7eii_11{display:block;z-index:1;background-color:#111d4640;position:fixed;top:calc(4.5rem + var(--altinn-banner-height, 0px));right:0;bottom:0;left:0;width:100%;height:100%}._backdrop_c7eii_11[aria-hidden=true]{display:none}._drawer_c7eii_28{position:fixed;z-index:2;background-color:#fff;width:100%;max-width:100vw;height:auto;max-height:none;box-sizing:border-box;padding:0;margin:0;border:0;top:calc(4.5rem + var(--altinn-banner-height, 0px));bottom:0;display:flex;flex-direction:column;overflow-y:scroll;overscroll-behavior:contain}._drawer_c7eii_28::backdrop{background-color:transparent}._drawer_c7eii_28:not([data-open=true]){display:none}._footer_c7eii_62{display:none}._body_c7eii_66{padding:0 .5rem}@media(min-width:1024px){._body_c7eii_66{padding:0 1rem}._drawer_c7eii_28{inset:auto;position:fixed;top:calc(4.5rem + var(--altinn-banner-height, 0px));left:0;right:0;margin:0;height:auto;max-height:55vh;overflow-y:auto}._drawer_c7eii_28[data-expanded=true]{bottom:0;height:auto;max-height:none;overflow-y:scroll}._footer_c7eii_62{position:sticky;z-index:2000;display:flex;bottom:0;left:0;right:0;justify-content:center;align-items:center;background-color:#fff}._toggleButton_c7eii_106{margin:1rem 0}}
@@ -1 +1 @@
1
- ._base_1hj0u_1{position:relative;display:flex;flex-direction:column;min-height:100vh;background-color:var(--altinn-layout-background);--altinn-banner-height: 0px}._base_1hj0u_1[data-theme=default]{--altinn-layout-background: var(--ds-color-background-default)}._base_1hj0u_1[data-theme=subtle]{--altinn-layout-background: var(--ds-color-background-tinted)}._base_1hj0u_1[data-theme=neutral]{--altinn-layout-background: var(--ds-color-neutral-background-tinted)}._base_1hj0u_1[data-theme=inbox]{--altinn-layout-background: var(--ds-color-background-tinted)}._base_1hj0u_1[data-theme=inbox][data-color=person],._base_1hj0u_1[data-theme=settings]{--altinn-layout-background: var(--ds-color-neutral-background-tinted)}
1
+ ._base_1084c_1{position:relative;display:flex;flex-direction:column;min-height:100vh;background-color:var(--altinn-layout-background);--altinn-banner-height: 0px}._bannerWrapperPinned_1084c_14{position:fixed;top:0;left:0;right:0;z-index:2}._base_1084c_1[data-theme=default]{--altinn-layout-background: var(--ds-color-background-default)}._base_1084c_1[data-theme=subtle]{--altinn-layout-background: var(--ds-color-background-tinted)}._base_1084c_1[data-theme=neutral]{--altinn-layout-background: var(--ds-color-neutral-background-tinted)}._base_1084c_1[data-theme=inbox]{--altinn-layout-background: var(--ds-color-background-tinted)}._base_1084c_1[data-theme=inbox][data-color=person],._base_1084c_1[data-theme=settings]{--altinn-layout-background: var(--ds-color-neutral-background-tinted)}
@@ -1 +1 @@
1
- ._stack_ilsfl_1{position:fixed;inset:auto 0 0;display:flex;flex-direction:column;row-gap:.5rem;padding:1rem;pointer-events:none}._stack_ilsfl_1>*{pointer-events:auto}@media(min-width:1024px){._stack_ilsfl_1{align-items:center}}
1
+ ._stack_1q54g_1{inset:auto 0 0;width:100%;margin:0;border:none;padding:1rem;background:transparent;overflow:visible;display:flex;flex-direction:column;row-gap:.5rem;pointer-events:none}._stack_1q54g_1>*{pointer-events:auto}@media(min-width:1024px){._stack_1q54g_1{align-items:center}}
@@ -1,97 +1,104 @@
1
- import { jsx as a, jsxs as p } from "react/jsx-runtime";
2
- import { c as _ } from "../../index-p1eeF8LQ.js";
3
- import { useState as i, useRef as R, useEffect as b } from "react";
4
- import { AccountMenu as y } from "../Account/AccountMenu.js";
5
- import { r as F, H as I } from "../../tooltip-Ct39-719.js";
1
+ import { jsx as r, jsxs as w } from "react/jsx-runtime";
2
+ import { c as A } from "../../index-p1eeF8LQ.js";
3
+ import { useState as i, useRef as l, useEffect as T } from "react";
4
+ import { AccountMenu as M } from "../Account/AccountMenu.js";
5
+ import { r as O, H as E } from "../../tooltip-Ct39-719.js";
6
6
  import "../Typography/Link.js";
7
7
  import "../Button/Button.js";
8
8
  import "react-dom";
9
- import { w as E, S as M } from "../../ToolbarSearch-DyVcALSw.js";
9
+ import { w as q, S as P } from "../../ToolbarSearch-DyVcALSw.js";
10
10
  import "../GlobalMenu/GlobalMenuBase.js";
11
11
  import "../Snackbar/useSnackbar.js";
12
- import { Switch as O } from "../Forms/Switch.js";
13
- import '../../assets/AccountSelector.css';const V = "_accountSelector_ttjvg_1", W = "_heading_ttjvg_11", $ = "_searchSection_ttjvg_17", K = "_searchField_ttjvg_30", U = "_accountMenu_ttjvg_34", X = "_virtualized_ttjvg_42", q = "_spinner_ttjvg_51", c = {
14
- accountSelector: V,
15
- heading: W,
16
- searchSection: $,
12
+ import { Switch as V } from "../Forms/Switch.js";
13
+ import '../../assets/AccountSelector.css';const W = "_accountSelector_ttjvg_1", $ = "_heading_ttjvg_11", B = "_searchSection_ttjvg_17", K = "_searchField_ttjvg_30", U = "_accountMenu_ttjvg_34", X = "_virtualized_ttjvg_42", Y = "_spinner_ttjvg_51", o = {
14
+ accountSelector: W,
15
+ heading: $,
16
+ searchSection: B,
17
17
  searchField: K,
18
18
  accountMenu: U,
19
19
  virtualized: X,
20
- spinner: q
21
- }, B = 5, oe = ({
20
+ spinner: Y
21
+ }, D = 5, G = typeof navigator < "u" && (/iP(hone|ad|od)/.test(navigator.userAgent) || // iPadOS 13+ reports itself as Mac
22
+ navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1), de = ({
22
23
  accountMenu: e,
23
24
  forceOpenFullScreen: n,
24
- className: r,
25
- loading: A,
26
- showDeletedUnits: l,
27
- onShowDeletedUnitsChange: w,
28
- isFullScreen: x,
29
- accountCount: j
25
+ className: a,
26
+ loading: x,
27
+ showDeletedUnits: u,
28
+ onShowDeletedUnitsChange: j,
29
+ isFullScreen: k,
30
+ accountCount: C
30
31
  }) => {
31
- const { closeAll: u, languageCode: d, currentId: k } = E(), s = k === "account" || !!n, h = (j ?? e.items.length) > B, g = l !== void 0, [m, v] = i(""), [C, S] = i(n), [N, T] = i(0), f = R(s);
32
- b(() => {
33
- s && !f.current && T((t) => t + 1), f.current = s;
34
- }, [s]), b(() => {
35
- !n && C && u(), S(n);
32
+ const { closeAll: d, languageCode: h, currentId: N } = q(), c = N === "account" || !!n, g = (C ?? e.items.length) > D, m = u !== void 0, [v, f] = i(""), [z, S] = i(n), [F, I] = i(0), p = l(c), _ = l(null), b = l(null);
33
+ T(() => {
34
+ c && !p.current && (I((t) => t + 1), requestAnimationFrame(() => {
35
+ b.current?.scrollTo({ top: 0 }), _.current?.closest("dialog")?.scrollTo({ top: 0 });
36
+ })), p.current = c;
37
+ }, [c]), T(() => {
38
+ !n && z && d(), S(n);
36
39
  }, [n]);
37
- const { searchText: o, heading: z, switchLabel: L } = D(d), H = (t) => {
38
- e.onSelectAccount?.(t), u(), S(!1);
40
+ const { searchText: s, heading: L, switchLabel: R } = J(h), H = () => {
41
+ G && requestAnimationFrame(() => window.scrollTo({ top: -window.scrollY, behavior: "instant" }));
42
+ }, y = (t) => {
43
+ e.onSelectAccount?.(t), d(), S(!1);
39
44
  };
40
- return A ? /* @__PURE__ */ a(F, { "aria-hidden": !0, "data-color": "neutral", className: c.spinner }) : /* @__PURE__ */ p("div", { className: _(r, c.accountSelector), children: [
41
- /* @__PURE__ */ a(I, { "data-size": "sm", level: 2, className: c.heading, id: "account-selector-heading", children: z }),
42
- (h || g) && /* @__PURE__ */ p("div", { className: c.searchSection, children: [
43
- h && /* @__PURE__ */ a(
44
- M,
45
+ return x ? /* @__PURE__ */ r(O, { "aria-hidden": !0, "data-color": "neutral", className: o.spinner }) : /* @__PURE__ */ w("div", { ref: _, className: A(a, o.accountSelector), children: [
46
+ /* @__PURE__ */ r(E, { "data-size": "sm", level: 2, className: o.heading, id: "account-selector-heading", children: L }),
47
+ (g || m) && /* @__PURE__ */ w("div", { className: o.searchSection, children: [
48
+ g && /* @__PURE__ */ r(
49
+ P,
45
50
  {
46
51
  size: "sm",
47
52
  "aria-labelledby": "account-selector-heading",
48
- label: o,
53
+ label: s,
49
54
  hideLabel: !0,
50
- name: o,
51
- placeholder: o,
52
- value: m,
53
- onChange: (t) => v(t.target.value),
54
- onClear: () => v(""),
55
- className: c.searchField
55
+ name: s,
56
+ placeholder: s,
57
+ value: v,
58
+ onChange: (t) => f(t.target.value),
59
+ onClear: () => f(""),
60
+ onBlur: H,
61
+ className: o.searchField
56
62
  }
57
63
  ),
58
- g && /* @__PURE__ */ a(
59
- O,
64
+ m && /* @__PURE__ */ r(
65
+ V,
60
66
  {
61
67
  size: "sm",
62
- checked: l,
63
- onChange: (t) => w?.(t.target.checked),
64
- label: L
68
+ checked: u,
69
+ onChange: (t) => j?.(t.target.checked),
70
+ label: R
65
71
  }
66
72
  )
67
73
  ] }),
68
- /* @__PURE__ */ a(
74
+ /* @__PURE__ */ r(
69
75
  "div",
70
76
  {
71
- className: _(
72
- c.accountMenu,
73
- x && c.fullScreen,
74
- e.virtualized && c.virtualized
77
+ ref: b,
78
+ className: A(
79
+ o.accountMenu,
80
+ k && o.fullScreen,
81
+ e.virtualized && o.virtualized
75
82
  ),
76
- children: /* @__PURE__ */ a(
77
- y,
83
+ children: /* @__PURE__ */ r(
84
+ M,
78
85
  {
79
86
  ...e,
80
- onSelectAccount: H,
87
+ onSelectAccount: y,
81
88
  keyboardEvents: !1,
82
89
  search: {
83
90
  hidden: !0,
84
91
  name: "",
85
- value: m,
86
- getResultsLabel: (t) => G(t, d)
92
+ value: v,
93
+ getResultsLabel: (t) => Q(t, h)
87
94
  }
88
95
  },
89
- N
96
+ F
90
97
  )
91
98
  }
92
99
  )
93
100
  ] });
94
- }, D = (e) => {
101
+ }, J = (e) => {
95
102
  switch (e) {
96
103
  case "nn":
97
104
  return {
@@ -112,10 +119,10 @@ import '../../assets/AccountSelector.css';const V = "_accountSelector_ttjvg_1",
112
119
  switchLabel: "Vis slettede"
113
120
  };
114
121
  }
115
- }, G = (e, n) => {
116
- const r = n === "nb" || n === "nn";
117
- return e === 0 ? r ? "Ingen treff" : "No hits" : r ? `${e} treff` : e === 1 ? "1 hit" : `${e} hits`;
122
+ }, Q = (e, n) => {
123
+ const a = n === "nb" || n === "nn";
124
+ return e === 0 ? a ? "Ingen treff" : "No hits" : a ? `${e} treff` : e === 1 ? "1 hit" : `${e} hits`;
118
125
  };
119
126
  export {
120
- oe as AccountSelector
127
+ de as AccountSelector
121
128
  };
@@ -1,46 +1,46 @@
1
1
  "use client";
2
- import { jsx as n, jsxs as p, Fragment as A } from "react/jsx-runtime";
3
- import { useState as O } from "react";
4
- import { useIsDesktop as v } from "../../hooks/useIsDesktop.js";
5
- import { AccountSelector as F } from "../AccountSelector/AccountSelector.js";
2
+ import { jsx as n, jsxs as i, Fragment as O } from "react/jsx-runtime";
3
+ import { useState as b } from "react";
4
+ import { useIsDesktop as F } from "../../hooks/useIsDesktop.js";
5
+ import { AccountSelector as v } from "../AccountSelector/AccountSelector.js";
6
6
  import { GlobalMenu as C } from "../GlobalMenu/GlobalMenu.js";
7
7
  import "../../index-p1eeF8LQ.js";
8
8
  import "../../tooltip-Ct39-719.js";
9
9
  import "../Typography/Link.js";
10
10
  import "../Button/Button.js";
11
11
  import "react-dom";
12
- import { w } from "../../ToolbarSearch-DyVcALSw.js";
13
- import { GlobalMenuButton as D } from "./GlobalMenuButton.js";
14
- import { GlobalAccountButton as M } from "./GlobalAccountButton.js";
12
+ import { w as D } from "../../ToolbarSearch-DyVcALSw.js";
13
+ import { GlobalMenuButton as M } from "./GlobalMenuButton.js";
14
+ import { GlobalAccountButton as N } from "./GlobalAccountButton.js";
15
15
  import "../Snackbar/useSnackbar.js";
16
- import { HeaderDrawer as N } from "./HeaderDrawer.js";
17
- import { HeaderDropdown as E } from "./HeaderDropdown.js";
18
- import { HeaderLogo as I } from "./HeaderLogo.js";
19
- import '../../assets/GlobalHeader.css';const T = "_header_17ppp_1", k = "_container_17ppp_7", y = "_nav_17ppp_53", B = "_logo_17ppp_62", a = {
20
- header: T,
21
- container: k,
22
- nav: y,
23
- logo: B
24
- }, G = 5, $ = ({
16
+ import { HeaderDrawer as E } from "./HeaderDrawer.js";
17
+ import { HeaderDropdown as I } from "./HeaderDropdown.js";
18
+ import { HeaderLogo as k } from "./HeaderLogo.js";
19
+ import '../../assets/GlobalHeader.css';const w = "_header_1apfp_1", y = "_container_1apfp_21", B = "_nav_1apfp_67", G = "_logo_1apfp_76", a = {
20
+ header: w,
21
+ container: y,
22
+ nav: B,
23
+ logo: G
24
+ }, H = 5, $ = ({
25
25
  globalMenu: r,
26
- desktopMenu: s,
27
- mobileMenu: d,
26
+ desktopMenu: d,
27
+ mobileMenu: p,
28
28
  locale: m,
29
29
  accountSelector: e,
30
30
  logo: u = {},
31
31
  badge: f,
32
32
  onLoginClick: g
33
33
  }) => {
34
- const { currentId: o, toggleId: l, closeAll: t } = w(), h = () => {
35
- o !== "account" && window.scrollTo({ top: 0, behavior: "instant" }), l("account");
34
+ const { currentId: o, toggleId: l, closeAll: t } = D(), h = () => {
35
+ l("account");
36
36
  }, _ = () => {
37
37
  l("menu");
38
- }, c = o === "account" || e?.forceOpenFullScreen || !1, [i, b] = O(!1), x = v();
39
- return /* @__PURE__ */ n("header", { className: a.header, "data-current-id": o, children: /* @__PURE__ */ n("div", { className: a.container, children: /* @__PURE__ */ p("nav", { className: a.nav, "aria-label": "hovednavigasjon", children: [
40
- /* @__PURE__ */ n(I, { ...u, badge: f, className: a.logo }),
41
- e && /* @__PURE__ */ p(A, { children: [
38
+ }, c = o === "account" || e?.forceOpenFullScreen || !1, [s, x] = b(!1), A = F();
39
+ return /* @__PURE__ */ n("header", { className: a.header, "data-current-id": o, children: /* @__PURE__ */ n("div", { className: a.container, children: /* @__PURE__ */ i("nav", { className: a.nav, "aria-label": "hovednavigasjon", children: [
40
+ /* @__PURE__ */ n(k, { ...u, badge: f, className: a.logo }),
41
+ e && /* @__PURE__ */ i(O, { children: [
42
42
  /* @__PURE__ */ n(
43
- M,
43
+ N,
44
44
  {
45
45
  currentAccount: e.accountMenu?.currentAccount,
46
46
  onClick: e.accountMenu?.currentAccount ? h : g,
@@ -50,28 +50,28 @@ import '../../assets/GlobalHeader.css';const T = "_header_17ppp_1", k = "_contai
50
50
  }
51
51
  ),
52
52
  /* @__PURE__ */ n(
53
- N,
53
+ E,
54
54
  {
55
55
  id: "header-account",
56
56
  open: c,
57
57
  onClose: t,
58
58
  closedBy: e?.forceOpenFullScreen ? "none" : "any",
59
59
  ariaLabelledby: "account-selector-heading",
60
- expanded: e?.forceOpenFullScreen || i,
61
- onToggle: () => b(!i),
62
- expandable: (e.accountCount ?? e.accountMenu.items.length) > G,
63
- children: /* @__PURE__ */ n(F, { ...e, forceOpenFullScreen: e.forceOpenFullScreen })
60
+ expanded: e?.forceOpenFullScreen || s,
61
+ onToggle: () => x(!s),
62
+ expandable: (e.accountCount ?? e.accountMenu.items.length) > H,
63
+ children: /* @__PURE__ */ n(v, { ...e, forceOpenFullScreen: e.forceOpenFullScreen })
64
64
  }
65
65
  )
66
66
  ] }),
67
67
  /* @__PURE__ */ n(
68
- E,
68
+ I,
69
69
  {
70
70
  id: "header-menu",
71
71
  open: o === "menu",
72
72
  onClose: t,
73
73
  trigger: /* @__PURE__ */ n(
74
- D,
74
+ M,
75
75
  {
76
76
  onClick: _,
77
77
  expanded: o === "menu",
@@ -83,7 +83,7 @@ import '../../assets/GlobalHeader.css';const T = "_header_17ppp_1", k = "_contai
83
83
  C,
84
84
  {
85
85
  ...r,
86
- menu: x ? s || r?.menu : d || r?.menu,
86
+ menu: A ? d || r?.menu : p || r?.menu,
87
87
  onClose: t,
88
88
  localeSwitcher: m,
89
89
  isOpen: o === "menu"
@@ -1,4 +1,4 @@
1
- import { jsxs as a, Fragment as l, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as a, Fragment as l, jsx as n } from "react/jsx-runtime";
2
2
  import { useRef as D, useEffect as h } from "react";
3
3
  import { Button as j } from "../Button/Button.js";
4
4
  import "../../index-p1eeF8LQ.js";
@@ -10,7 +10,7 @@ import "../GlobalMenu/GlobalMenuBase.js";
10
10
  import "../Snackbar/useSnackbar.js";
11
11
  import { S as L } from "../../ChevronUp-hn05LboH.js";
12
12
  import { S as M } from "../../ChevronDown-D_a7nb-G.js";
13
- import '../../assets/HeaderDrawer.css';const R = "_backdrop_yn0zc_11", B = "_drawer_yn0zc_28", F = "_footer_yn0zc_60", V = "_body_yn0zc_64", q = "_toggleButton_yn0zc_104", n = {
13
+ import '../../assets/HeaderDrawer.css';const R = "_backdrop_c7eii_11", B = "_drawer_c7eii_28", F = "_footer_c7eii_62", V = "_body_c7eii_66", q = "_toggleButton_c7eii_106", t = {
14
14
  backdrop: R,
15
15
  drawer: B,
16
16
  footer: F,
@@ -18,7 +18,7 @@ import '../../assets/HeaderDrawer.css';const R = "_backdrop_yn0zc_11", B = "_dra
18
18
  toggleButton: q
19
19
  }, $ = ({
20
20
  id: c,
21
- open: r,
21
+ open: i,
22
22
  onClose: v,
23
23
  closedBy: o = "any",
24
24
  expanded: d,
@@ -27,31 +27,31 @@ import '../../assets/HeaderDrawer.css';const R = "_backdrop_yn0zc_11", B = "_dra
27
27
  children: w,
28
28
  ariaLabelledby: k
29
29
  }) => {
30
- const { languageCode: y } = I(), m = A(y), s = D(null);
30
+ const { languageCode: C } = I(), m = A(C), s = D(null);
31
31
  h(() => {
32
- const e = s.current, u = (i) => {
32
+ const e = s.current, u = (r) => {
33
33
  if (window.getSelection()?.toString()) return;
34
- const { clientY: g, clientX: p, target: C } = i;
35
- if (e && C === e && o === "any") {
36
- const { top: x, left: S, right: N, bottom: E } = e.getBoundingClientRect();
37
- x <= g && g <= E && S <= p && p <= N || e.close();
34
+ const { clientY: g, clientX: p, target: S } = r;
35
+ if (e && S === e && o === "any") {
36
+ const { top: N, left: y, right: z, bottom: E } = e.getBoundingClientRect();
37
+ N <= g && g <= E && y <= p && p <= z || e.close();
38
38
  }
39
39
  }, f = () => {
40
- const i = e?.querySelector("[autofocus]");
41
- document.activeElement !== i && i?.focus();
40
+ const r = e?.querySelector("[autofocus]");
41
+ document.activeElement !== r && r?.focus();
42
42
  };
43
43
  return e?.addEventListener("animationend", f), e?.addEventListener("click", u), () => {
44
44
  e?.removeEventListener("animationend", f), e?.removeEventListener("click", u);
45
45
  };
46
46
  }, [o]), h(() => {
47
47
  const e = s.current;
48
- e && (r ? e.open || e.showModal() : e.open && e.close());
49
- }, [r]);
50
- const z = (e) => {
48
+ e && (i ? e.open || e.showModal() : e.open && e.close());
49
+ }, [i]);
50
+ const x = (e) => {
51
51
  o === "none" && e.preventDefault();
52
52
  };
53
53
  return /* @__PURE__ */ a(l, { children: [
54
- /* @__PURE__ */ t("div", { className: n.backdrop, "aria-hidden": !r }),
54
+ /* @__PURE__ */ n("div", { className: t.backdrop, "aria-hidden": !i }),
55
55
  /* @__PURE__ */ a(
56
56
  "dialog",
57
57
  {
@@ -59,18 +59,18 @@ import '../../assets/HeaderDrawer.css';const R = "_backdrop_yn0zc_11", B = "_dra
59
59
  ref: s,
60
60
  "aria-modal": "true",
61
61
  "aria-labelledby": k,
62
- "data-open": r,
62
+ "data-open": i,
63
63
  "data-expanded": d,
64
- onCancel: z,
65
- className: n.drawer,
64
+ onCancel: x,
65
+ className: t.drawer,
66
66
  onClose: o !== "none" ? v : void 0,
67
67
  children: [
68
- /* @__PURE__ */ t("div", { className: n.body, children: w }),
69
- o !== "none" && _ && /* @__PURE__ */ t("footer", { className: n.footer, children: /* @__PURE__ */ t(j, { className: n.toggleButton, size: "xs", variant: "outline", onClick: b, children: d ? /* @__PURE__ */ a(l, { children: [
70
- /* @__PURE__ */ t(L, { className: n.btnIcon, "aria-hidden": "true" }),
68
+ /* @__PURE__ */ n("div", { className: t.body, children: w }),
69
+ o !== "none" && _ && /* @__PURE__ */ n("footer", { className: t.footer, children: /* @__PURE__ */ n(j, { className: t.toggleButton, size: "xs", variant: "outline", onClick: b, children: d ? /* @__PURE__ */ a(l, { children: [
70
+ /* @__PURE__ */ n(L, { className: t.btnIcon, "aria-hidden": "true" }),
71
71
  m.minimize
72
72
  ] }) : /* @__PURE__ */ a(l, { children: [
73
- /* @__PURE__ */ t(M, { className: n.btnIcon, "aria-hidden": "true" }),
73
+ /* @__PURE__ */ n(M, { className: t.btnIcon, "aria-hidden": "true" }),
74
74
  m.fullscreen
75
75
  ] }) }) })
76
76
  ]
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { jsxs as e, jsx as t, Fragment as L } from "react/jsx-runtime";
3
- import { useRef as v, useState as B, useEffect as x } from "react";
4
- import { L as R, s as S } from "../../LayoutBase-CAdjuw9Q.js";
2
+ import { jsxs as i, jsx as t, Fragment as v } from "react/jsx-runtime";
3
+ import { useRef as L, useState as B, useEffect as x } from "react";
4
+ import { L as R, s as S } from "../../LayoutBase-CrlzKACr.js";
5
5
  import { LayoutGrid as H } from "./LayoutGrid.js";
6
6
  import { LayoutBody as z } from "./LayoutBody.js";
7
7
  import { LayoutContent as j } from "./LayoutContent.js";
@@ -22,16 +22,16 @@ import { SkipLink as N } from "../SkipLink/SkipLink.js";
22
22
  const ro = ({
23
23
  banner: o,
24
24
  color: u,
25
- theme: h = "subtle",
25
+ theme: d = "subtle",
26
26
  header: n,
27
- footer: m,
27
+ footer: c,
28
28
  sidebar: r,
29
- content: d = {},
29
+ content: h = {},
30
30
  children: y,
31
- skipLink: c,
31
+ skipLink: m,
32
32
  breadcrumbs: l
33
33
  }) => {
34
- const { currentId: i } = E(), s = v(null), [k, g] = B(0);
34
+ const { currentId: e } = E(), s = L(null), [k, g] = B(0);
35
35
  return x(() => {
36
36
  const f = s.current;
37
37
  if (!f) return;
@@ -39,27 +39,35 @@ const ro = ({
39
39
  g(a.borderBoxSize[0]?.blockSize ?? a.contentRect.height);
40
40
  });
41
41
  return p.observe(f), () => p.disconnect();
42
- }, []), /* @__PURE__ */ e(R, { color: u, theme: h, currentId: i, bannerHeight: o ? k : 0, children: [
43
- c && /* @__PURE__ */ t(N, { ...c }),
44
- o && /* @__PURE__ */ t("div", { ref: s, className: S.bannerWrapper, "data-color": "company", children: /* @__PURE__ */ t(
45
- C,
42
+ }, []), /* @__PURE__ */ i(R, { color: u, theme: d, currentId: e, bannerHeight: o ? k : 0, children: [
43
+ m && /* @__PURE__ */ t(N, { ...m }),
44
+ o && /* @__PURE__ */ t(
45
+ "div",
46
46
  {
47
- title: o.link ? /* @__PURE__ */ e(L, { children: [
48
- o.title,
49
- " ",
50
- /* @__PURE__ */ t("a", { href: o.link.href, target: "_blank", rel: "noreferrer", children: o.link.label })
51
- ] }) : o.title,
52
- color: o.color,
53
- variant: o.variant || "strong",
54
- icon: o.icon,
55
- sticky: !1
47
+ ref: s,
48
+ className: e === "account" || e === "menu" || e === "locale" ? S.bannerWrapperPinned : void 0,
49
+ "data-color": "company",
50
+ children: /* @__PURE__ */ t(
51
+ C,
52
+ {
53
+ title: o.link ? /* @__PURE__ */ i(v, { children: [
54
+ o.title,
55
+ " ",
56
+ /* @__PURE__ */ t("a", { href: o.link.href, target: "_blank", rel: "noreferrer", children: o.link.label })
57
+ ] }) : o.title,
58
+ color: o.color,
59
+ variant: o.variant || "strong",
60
+ icon: o.icon,
61
+ sticky: !1
62
+ }
63
+ )
56
64
  }
57
- ) }),
65
+ ),
58
66
  n && /* @__PURE__ */ t(M, { ...n }),
59
- /* @__PURE__ */ e(H, { currentId: i, children: [
67
+ /* @__PURE__ */ i(H, { currentId: e, children: [
60
68
  l && /* @__PURE__ */ t(F, { ...l }),
61
- /* @__PURE__ */ e(z, { currentId: i, children: [
62
- r && /* @__PURE__ */ e(
69
+ /* @__PURE__ */ i(z, { currentId: e, children: [
70
+ r && /* @__PURE__ */ i(
63
71
  w,
64
72
  {
65
73
  sticky: r?.sticky,
@@ -72,10 +80,10 @@ const ro = ({
72
80
  ]
73
81
  }
74
82
  ),
75
- /* @__PURE__ */ t(j, { color: d?.color, id: "main-content", children: y })
83
+ /* @__PURE__ */ t(j, { color: h?.color, id: "main-content", children: y })
76
84
  ] })
77
85
  ] }),
78
- m && /* @__PURE__ */ t(G, { ...m })
86
+ c && /* @__PURE__ */ t(G, { ...c })
79
87
  ] });
80
88
  };
81
89
  export {
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { L as t } from "../../LayoutBase-CAdjuw9Q.js";
2
+ import { L as t } from "../../LayoutBase-CrlzKACr.js";
3
3
  export {
4
4
  t as LayoutBase
5
5
  };
@@ -1,4 +1,4 @@
1
- import { L as t } from "../../LayoutBase-CAdjuw9Q.js";
1
+ import { L as t } from "../../LayoutBase-CrlzKACr.js";
2
2
  import { LayoutGrid as e } from "./LayoutGrid.js";
3
3
  import { LayoutBody as L } from "./LayoutBody.js";
4
4
  import { LayoutContent as m } from "./LayoutContent.js";
@@ -1,27 +1,30 @@
1
1
  "use client";
2
- import { jsx as n } from "react/jsx-runtime";
3
- import { SnackbarBase as l } from "./SnackbarBase.js";
4
- import { SnackbarItem as d } from "./SnackbarItem.js";
5
- import { useSnackbar as b } from "./useSnackbar.js";
6
- const u = 0.3, S = 0.4, y = ({ className: e }) => {
7
- const { storedMessages: o, open: r, closeSnackbarItem: a } = b();
8
- if (!r)
9
- return null;
10
- const t = o || [], c = t.length - 1;
11
- return /* @__PURE__ */ n(l, { className: e, children: t.map((s, i) => {
12
- const m = c - i, p = Math.max(S, 1 - m * u);
13
- return /* @__PURE__ */ n(
14
- d,
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ import { useRef as l, useEffect as d } from "react";
4
+ import { SnackbarBase as u } from "./SnackbarBase.js";
5
+ import { SnackbarItem as b } from "./SnackbarItem.js";
6
+ import { useSnackbar as h } from "./useSnackbar.js";
7
+ const S = 0.3, k = 0.4, w = ({ className: n }) => {
8
+ const { storedMessages: c, open: s, closeSnackbarItem: a } = h(), o = l(null);
9
+ d(() => {
10
+ const e = o.current;
11
+ e && (s ? e.showPopover() : e.matches(":popover-open") && e.hidePopover());
12
+ }, [s]);
13
+ const t = c || [], i = t.length - 1;
14
+ return /* @__PURE__ */ r(u, { ref: o, className: n, children: t.map((e, p) => {
15
+ const m = i - p, f = Math.max(k, 1 - m * S);
16
+ return /* @__PURE__ */ r(
17
+ b,
15
18
  {
16
- onDismiss: () => a(s.id),
17
- dismissable: s.dismissable,
18
- style: { opacity: p },
19
- ...s
19
+ onDismiss: () => a(e.id),
20
+ dismissable: e.dismissable,
21
+ style: { opacity: f },
22
+ ...e
20
23
  },
21
- s.id
24
+ e.id
22
25
  );
23
26
  }) });
24
27
  };
25
28
  export {
26
- y as Snackbar
29
+ w as Snackbar
27
30
  };
@@ -1,7 +1,7 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import '../../assets/SnackbarBase.css';const c = "_stack_ilsfl_1", a = {
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import '../../assets/SnackbarBase.css';const c = "_stack_1q54g_1", o = {
3
3
  stack: c
4
- }, e = ({ children: s }) => /* @__PURE__ */ t("section", { className: a.stack, children: s });
4
+ }, n = ({ children: s, ref: t }) => /* @__PURE__ */ a("section", { ref: t, popover: "manual", className: o.stack, children: s });
5
5
  export {
6
- e as SnackbarBase
6
+ n as SnackbarBase
7
7
  };
@@ -1,59 +1,78 @@
1
1
  "use client";
2
- import { jsx as i, jsxs as f } from "react/jsx-runtime";
3
- import { c as u } from "../../index-p1eeF8LQ.js";
4
- import { I as v, s as _ } from "../../ToolbarSearch-DyVcALSw.js";
5
- import a, { forwardRef as g } from "react";
2
+ import { jsx as a, jsxs as v } from "react/jsx-runtime";
3
+ import { c as h } from "../../index-p1eeF8LQ.js";
4
+ import d, { forwardRef as _, useEffect as g } from "react";
5
+ import { I as b, s as y } from "../../ToolbarSearch-DyVcALSw.js";
6
6
  import "../../tooltip-Ct39-719.js";
7
7
  import "../Typography/Link.js";
8
- import { Button as h } from "../Button/Button.js";
8
+ import { Button as w } from "../Button/Button.js";
9
9
  import "react-dom";
10
10
  import "../GlobalMenu/GlobalMenuBase.js";
11
11
  import "./useSnackbar.js";
12
- import { u as y } from "../../useId-BVFxCjkq.js";
13
- import '../../assets/SnackbarItem.css';var w = function(e, o) {
14
- var n = {};
15
- for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
12
+ import { u as x } from "../../useId-BVFxCjkq.js";
13
+ import '../../assets/SnackbarItem.css';var O = function(e, n) {
14
+ var i = {};
15
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (i[t] = e[t]);
16
16
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
17
17
  for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
18
- o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
19
- return n;
18
+ n.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (i[t[r]] = e[t[r]]);
19
+ return i;
20
20
  };
21
- const O = g((e, o) => {
22
- var { title: n, titleId: t } = e, r = w(e, ["title", "titleId"]);
23
- let l = y();
24
- return l = n ? t || "title-" + l : void 0, a.createElement(
21
+ const I = _((e, n) => {
22
+ var { title: i, titleId: t } = e, r = O(e, ["title", "titleId"]);
23
+ let l = x();
24
+ return l = i ? t || "title-" + l : void 0, d.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: o, "aria-labelledby": l }, r),
27
- n ? a.createElement("title", { id: l }, n) : null,
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" })
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: n, "aria-labelledby": l }, r),
27
+ i ? d.createElement("title", { id: l }, i) : null,
28
+ d.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
- }), b = "_item_18ro3_1", x = "_itemWrapper_18ro3_24", I = "_icon_18ro3_29", j = "_content_18ro3_39", N = "_action_18ro3_47", c = {
31
- item: b,
32
- itemWrapper: x,
33
- icon: I,
34
- content: j,
35
- action: N
30
+ }), j = "_item_18ro3_1", A = "_itemWrapper_18ro3_24", N = "_icon_18ro3_29", S = "_content_18ro3_39", B = "_action_18ro3_47", c = {
31
+ item: j,
32
+ itemWrapper: A,
33
+ icon: N,
34
+ content: S,
35
+ action: B
36
36
  };
37
- var B = /* @__PURE__ */ ((e) => (e.company = "company", e.success = "success", e.warning = "warning", e.danger = "danger", e.info = "info", e))(B || {});
38
- const X = ({
37
+ var R = /* @__PURE__ */ ((e) => (e.company = "company", e.success = "success", e.warning = "warning", e.danger = "danger", e.info = "info", e))(R || {});
38
+ const T = ({
39
39
  as: e,
40
- message: o,
41
- className: n,
40
+ message: n,
41
+ className: i,
42
42
  color: t,
43
- icon: r = O,
43
+ icon: r = I,
44
44
  iconAltText: l = "Bell icon",
45
- dismissable: s = !0,
45
+ dismissable: p = !0,
46
46
  onDismiss: m,
47
- ...d
47
+ ...f
48
48
  }) => {
49
- const p = e || "div";
50
- return /* @__PURE__ */ i("span", { className: c.itemWrapper, children: /* @__PURE__ */ f(p, { className: u(c.item, n), "data-color": t, role: "alert", ...d, children: [
51
- /* @__PURE__ */ i(v, { svgElement: r, className: c.icon, "aria-hidden": "true" }),
52
- /* @__PURE__ */ i("div", { className: c.content, children: o }),
53
- s && /* @__PURE__ */ i("div", { className: c.action, children: /* @__PURE__ */ i(h, { variant: "solid", onClick: m, "aria-label": "close", children: /* @__PURE__ */ i(_, { style: { fontSize: "1.5em" } }) }) })
49
+ const u = e || "div";
50
+ return g(() => {
51
+ if (!n)
52
+ return;
53
+ const s = document.querySelector("dialog[open]");
54
+ if (!s)
55
+ return;
56
+ let o = s.querySelector("[data-snackbar-live]");
57
+ o || (o = document.createElement("div"), o.setAttribute("data-snackbar-live", ""), o.setAttribute("aria-live", "polite"), o.setAttribute("aria-atomic", "true"), Object.assign(o.style, {
58
+ position: "absolute",
59
+ width: "1px",
60
+ height: "1px",
61
+ padding: "0",
62
+ overflow: "hidden",
63
+ clip: "rect(0,0,0,0)",
64
+ whiteSpace: "nowrap",
65
+ border: "0"
66
+ }), s.appendChild(o)), o.textContent = "", requestAnimationFrame(() => {
67
+ o.textContent = n;
68
+ });
69
+ }, [n]), /* @__PURE__ */ a("span", { className: c.itemWrapper, children: /* @__PURE__ */ v(u, { className: h(c.item, i), "data-color": t, role: "alert", ...f, children: [
70
+ /* @__PURE__ */ a(b, { svgElement: r, className: c.icon, "aria-hidden": "true" }),
71
+ /* @__PURE__ */ a("div", { className: c.content, children: n }),
72
+ p && /* @__PURE__ */ a("div", { className: c.action, children: /* @__PURE__ */ a(w, { variant: "solid", onClick: m, "aria-label": "close", children: /* @__PURE__ */ a(y, { style: { fontSize: "1.5em" } }) }) })
54
73
  ] }) });
55
74
  };
56
75
  export {
57
- B as SnackbarColorEnum,
58
- X as SnackbarItem
76
+ R as SnackbarColorEnum,
77
+ T as SnackbarItem
59
78
  };
@@ -69,7 +69,7 @@ import { ItemControls as pe } from "./Item/ItemControls.js";
69
69
  import { ItemSelect as xe } from "./Item/ItemSelect.js";
70
70
  import { ItemBase as se } from "./Item/ItemBase.js";
71
71
  import { ItemLink as le } from "./Item/ItemLink.js";
72
- import { L as ue } from "../LayoutBase-CAdjuw9Q.js";
72
+ import { L as ue } from "../LayoutBase-CrlzKACr.js";
73
73
  import { LayoutGrid as ge } from "./Layout/LayoutGrid.js";
74
74
  import { LayoutBody as Le } from "./Layout/LayoutBody.js";
75
75
  import { LayoutContent as Ie } from "./Layout/LayoutContent.js";
@@ -1,14 +1,21 @@
1
1
  "use client";
2
- import { useEffect as n } from "react";
3
- const c = (t) => {
4
- n(() => {
5
- if (!t) return;
6
- const { overflow: e, paddingRight: d } = document.body.style, o = window.innerWidth - document.documentElement.clientWidth;
7
- return document.body.style.overflow = "hidden", o > 0 && (document.body.style.paddingRight = `${o}px`), () => {
8
- document.body.style.overflow = e, document.body.style.paddingRight = d;
2
+ import { useEffect as s } from "react";
3
+ const l = typeof navigator < "u" && (/iP(hone|ad|od)/.test(navigator.userAgent) || // iPadOS 13+ reports itself as Mac
4
+ navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1), r = (e) => {
5
+ s(() => {
6
+ if (!e || !l) return;
7
+ const { body: t } = document, { scrollY: i } = window, o = {
8
+ position: t.style.position,
9
+ top: t.style.top,
10
+ left: t.style.left,
11
+ right: t.style.right,
12
+ width: t.style.width
9
13
  };
10
- }, [t]);
14
+ return t.style.position = "fixed", t.style.top = `-${i}px`, t.style.left = "0", t.style.right = "0", t.style.width = "100%", () => {
15
+ t.style.position = o.position, t.style.top = o.top, t.style.left = o.left, t.style.right = o.right, t.style.width = o.width, window.scrollTo(0, i);
16
+ };
17
+ }, [e]);
11
18
  };
12
19
  export {
13
- c as useLockBodyScroll
20
+ r as useLockBodyScroll
14
21
  };
package/dist/index.js CHANGED
@@ -69,7 +69,7 @@ import { ItemControls as pe } from "./components/Item/ItemControls.js";
69
69
  import { ItemSelect as ie } from "./components/Item/ItemSelect.js";
70
70
  import { ItemBase as se } from "./components/Item/ItemBase.js";
71
71
  import { ItemLink as ce } from "./components/Item/ItemLink.js";
72
- import { L as ue } from "./LayoutBase-CAdjuw9Q.js";
72
+ import { L as ue } from "./LayoutBase-CrlzKACr.js";
73
73
  import { LayoutGrid as ge } from "./components/Layout/LayoutGrid.js";
74
74
  import { LayoutBody as Le } from "./components/Layout/LayoutBody.js";
75
75
  import { LayoutContent as Ie } from "./components/Layout/LayoutContent.js";
@@ -2,4 +2,4 @@ export interface SnackbarProps {
2
2
  /** Optional classname */
3
3
  className?: string;
4
4
  }
5
- export declare const Snackbar: ({ className }: SnackbarProps) => import("react/jsx-runtime").JSX.Element | null;
5
+ export declare const Snackbar: ({ className }: SnackbarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ className }: import('./Snackbar.tsx').SnackbarProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ component: ({ className }: import('./Snackbar.tsx').SnackbarProps) => import("react/jsx-runtime").JSX.Element;
4
4
  tags: string[];
5
5
  parameters: {};
6
6
  args: {};
@@ -1,8 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, Ref } from 'react';
2
2
  export interface SnackbarBaseProps {
3
3
  /** Optional classname */
4
4
  className?: string;
5
5
  /** Children */
6
6
  children: string | ReactNode;
7
+ ref?: Ref<HTMLElement>;
7
8
  }
8
- export declare const SnackbarBase: ({ children }: SnackbarBaseProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const SnackbarBase: ({ children, ref }: SnackbarBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1,18 @@
1
+ /**
2
+ * Locks background scroll while a header overlay (drawer) is open.
3
+ *
4
+ * Non-iOS platforms are already handled globally by the
5
+ * `html:has(dialog[open]) { overflow: hidden }` rule, so this hook only adds the
6
+ * part CSS can't do: iOS Safari ignores `overflow: hidden` on body/html for
7
+ * touch scrolling, so a short / non-scrollable overlay lets the gesture chain to
8
+ * the page behind it (and rubber-band the whole viewport). Pinning <body> with
9
+ * `position: fixed` removes it from the scroll flow entirely — the only reliable
10
+ * lock on iOS.
11
+ *
12
+ * The page keeps its scroll position (`top: -scrollY`); it doesn't need to be at
13
+ * the top because the header is pinned independently (via `position: fixed`
14
+ * while the overlay is open, see globalHeader.module.css), so the overlay stays
15
+ * aligned regardless of scroll. The locked background is covered by the overlay
16
+ * anyway. The scroll position is restored on close.
17
+ */
1
18
  export declare const useLockBodyScroll: (locked: boolean) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.67.5",
3
+ "version": "0.67.7",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",
@@ -1,18 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import './assets/LayoutBase.css';const n = "_base_1hj0u_1", c = {
3
- base: n
4
- }, i = ({ currentId: s, color: t, theme: e, bannerHeight: a, children: o }) => /* @__PURE__ */ r(
5
- "div",
6
- {
7
- className: c.base,
8
- "data-color": t,
9
- "data-theme": e,
10
- "data-current-id": s,
11
- style: a ? { "--altinn-banner-height": `${a}px` } : void 0,
12
- children: o
13
- }
14
- );
15
- export {
16
- i as L,
17
- c as s
18
- };