@telefonica/mistica 15.15.0 → 15.16.0

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.
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function() {
9
- return $e;
9
+ return Se;
10
10
  }
11
11
  });
12
12
  const _jsxruntime = require("react/jsx-runtime");
@@ -68,72 +68,72 @@ function _interop_require_wildcard(obj, nodeInterop) {
68
68
  }
69
69
  return newObj;
70
70
  }
71
- const ne = (e)=>e === document.documentElement ? window : e, ce = (e)=>{
71
+ const ie = (e)=>e === document.documentElement ? window : e, ne = (e)=>{
72
72
  const l = setTimeout(e, 0);
73
73
  return {
74
74
  cancel: ()=>clearTimeout(l)
75
75
  };
76
- }, le = 200, me = (param)=>{
76
+ }, ce = 200, le = (param)=>{
77
77
  let { isFooterVisible: e = !0, footer: l, footerHeight: k = "auto", footerBgColor: i = _skincontractcssmistica.vars.colors.background, containerBgColor: F = _skincontractcssmistica.vars.colors.background, children: L, onChangeFooterHeight: n } = param;
78
- const [w, h] = _react.useState(!1), m = _react.useRef(null), { height: d } = (0, _hooks.useBoundingRect)(m) || {
78
+ const [$, g] = _react.useState(!1), d = _react.useRef(null), { height: m } = (0, _hooks.useBoundingRect)(d) || {
79
79
  height: 0
80
- }, { isTabletOrSmaller: u } = (0, _hooks.useScreenSize)(), { platformOverrides: x } = (0, _hooks.useTheme)(), { height: r, ref: D } = (0, _hooks.useElementDimensions)(), { visualHeight: I } = (0, _hooks.useWindowSize)(), s = (0, _fixedtotop.useFixedToTopHeight)(), t = I - s - r > le, { topColor: N = i } = (0, _overscrollcolorcontext.useOverScrollColor)(), { height: y, ref: R } = (0, _hooks.useElementDimensions)();
80
+ }, { isTabletOrSmaller: u } = (0, _hooks.useScreenSize)(), { platformOverrides: h } = (0, _hooks.useTheme)(), { height: r, ref: w } = (0, _hooks.useElementDimensions)({
81
+ includeMargins: !0
82
+ }), { visualHeight: D } = (0, _hooks.useWindowSize)(), s = (0, _fixedtotop.useFixedToTopHeight)(), t = D - s - r > ce, { topColor: I = i } = (0, _overscrollcolorcontext.useOverScrollColor)(), { height: x, ref: N } = (0, _hooks.useElementDimensions)();
81
83
  (0, _hooks.useIsomorphicLayoutEffect)(()=>{
82
84
  n == null || n(r);
83
85
  }, [
84
86
  n,
85
87
  r
86
- ]);
87
- const A = `calc(${_css.safeAreaInsetBottom} + ${r}px)`;
88
- _react.useEffect(()=>{
89
- if (!u || (0, _platform.isRunningAcceptanceTest)(x) || !t) {
90
- h(!1);
88
+ ]), _react.useEffect(()=>{
89
+ if (!u || (0, _platform.isRunningAcceptanceTest)(h) || !t) {
90
+ g(!1);
91
91
  return;
92
92
  }
93
- const f = (0, _dom.getScrollableParentElement)(m.current), B = ()=>(0, _dom.hasScroll)(f) && (0, _dom.getScrollDistanceToBottom)(f) > s + 1, o = (0, _helpers.debounce)(()=>{
94
- h(B());
93
+ const f = (0, _dom.getScrollableParentElement)(d.current), A = ()=>(0, _dom.hasScroll)(f) && (0, _dom.getScrollDistanceToBottom)(f) > s + 1, o = (0, _helpers.debounce)(()=>{
94
+ g(A());
95
95
  }, 50, {
96
96
  leading: !0,
97
97
  maxWait: 100
98
- }), z = ce(o), c = ne(f);
98
+ }), B = ne(o), c = ie(f);
99
99
  return (0, _dom.addPassiveEventListener)(c, "resize", o), (0, _dom.addPassiveEventListener)(c, "scroll", o), ()=>{
100
- o.cancel(), (0, _dom.removePassiveEventListener)(c, "scroll", o), (0, _dom.removePassiveEventListener)(c, "resize", o), z.cancel();
100
+ o.cancel(), (0, _dom.removePassiveEventListener)(c, "scroll", o), (0, _dom.removePassiveEventListener)(c, "resize", o), B.cancel();
101
101
  };
102
102
  }, [
103
- x,
103
+ h,
104
104
  u,
105
105
  t,
106
106
  // `topDistance` and `contentHeight` dependencies are needed to recalculate the elevation state
107
107
  s,
108
- d
108
+ m
109
109
  ]);
110
- const H = ()=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_portal.Portal, {
110
+ const R = ()=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_portal.Portal, {
111
111
  className: _fixedfooterlayoutcssmistica.portal,
112
112
  children: [
113
113
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
114
114
  className: _fixedfooterlayoutcssmistica.fixedBackgroundLayer,
115
115
  style: {
116
- background: `linear-gradient(180deg, ${N} 50%, ${i} 50% 100%)`
116
+ background: `linear-gradient(180deg, ${I} 50%, ${i} 50% 100%)`
117
117
  }
118
118
  }),
119
119
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
120
- ref: R,
120
+ ref: N,
121
121
  className: _fixedfooterlayoutcssmistica.absoluteBackgroundLayer,
122
122
  style: {
123
123
  background: F,
124
124
  // this color could be a gradient
125
125
  top: s - 1,
126
126
  // -1 because the navigationbar could have a 1px transparent background
127
- bottom: t ? A : "unset",
128
- height: t ? "unset" : d
127
+ bottom: t ? r : "unset",
128
+ height: t ? "unset" : m
129
129
  }
130
130
  }),
131
131
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
132
132
  className: _fixedfooterlayoutcssmistica.absoluteBackgroundLayer,
133
133
  style: {
134
134
  background: i,
135
- top: y + s - 1,
136
- height: `calc(${d}px - ${y}px)`
135
+ top: x + s - 1,
136
+ height: `calc(${m}px - ${x}px)`
137
137
  }
138
138
  })
139
139
  ]
@@ -141,20 +141,20 @@ const ne = (e)=>e === document.documentElement ? window : e, ce = (e)=>{
141
141
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
142
142
  children: [
143
143
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
144
- ref: m,
144
+ ref: d,
145
145
  className: _fixedfooterlayoutcssmistica.container,
146
146
  style: (0, _css.applyCssVars)({
147
- [_fixedfooterlayoutcssmistica.vars.footerHeight]: t ? `calc(${_css.safeAreaInsetBottom} + ${r}px)` : "0px"
147
+ [_fixedfooterlayoutcssmistica.vars.footerHeight]: t ? `${r}px` : "0px"
148
148
  }),
149
149
  children: [
150
- H(),
150
+ R(),
151
151
  L
152
152
  ]
153
153
  }),
154
154
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
155
155
  className: (0, _classnames.default)(_fixedfooterlayoutcssmistica.footer, {
156
156
  [_fixedfooterlayoutcssmistica.withoutFooter]: !e,
157
- [_fixedfooterlayoutcssmistica.elevated]: w,
157
+ [_fixedfooterlayoutcssmistica.elevated]: $,
158
158
  [_fixedfooterlayoutcssmistica.fixedFooter]: t
159
159
  }),
160
160
  style: {
@@ -163,7 +163,7 @@ const ne = (e)=>e === document.documentElement ? window : e, ce = (e)=>{
163
163
  "data-testid": `fixed-footer${e ? "-visible" : "-hidden"}`,
164
164
  "data-position-fixed": "bottom",
165
165
  children: e && /* @__PURE__ */ (0, _jsxruntime.jsx)("aside", {
166
- ref: D,
166
+ ref: w,
167
167
  "data-component-name": "FixedFooter",
168
168
  style: {
169
169
  height: k,
@@ -174,4 +174,4 @@ const ne = (e)=>e === document.documentElement ? window : e, ce = (e)=>{
174
174
  })
175
175
  ]
176
176
  });
177
- }, $e = me;
177
+ }, Se = le;
@@ -7,8 +7,8 @@ export declare const vars: {
7
7
  export declare const grid: string;
8
8
  export declare const gridTemplateColumnsAutoRepeat: string;
9
9
  export declare const gridTemplateRowsAutoRepeat: string;
10
- export declare const gridTemplateColumns: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 9 | 10 | 7 | 11, string>;
11
- export declare const gridTemplateRows: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 9 | 10 | 7 | 11, string>;
10
+ export declare const gridTemplateColumns: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 10 | 9 | 7 | 11, string>;
11
+ export declare const gridTemplateRows: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 10 | 9 | 7 | 11, string>;
12
12
  export declare const gridAutoFlow: Record<"column" | "row" | "row dense" | "column dense", string>;
13
13
  export declare const gridJustifyItems: Record<"stretch" | "center" | "end" | "start", string>;
14
14
  export declare const gridAlignItems: Record<"stretch" | "center" | "end" | "start" | "baseline", string>;
@@ -16,9 +16,9 @@ export declare const gridJustifyContent: Record<"space-around" | "space-between"
16
16
  export declare const gridAlignContent: Record<"space-around" | "space-between" | "space-evenly" | "stretch" | "center" | "end" | "start", string>;
17
17
  export declare const fullColumns: string;
18
18
  export declare const fullRows: string;
19
- export declare const spanColumns: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 9 | 10 | 7 | 11, string>;
20
- export declare const spanRows: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 9 | 10 | 7 | 11, string>;
21
- export declare const columnStart: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 9 | 10 | 7 | 11, string>;
22
- export declare const rowStart: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 9 | 10 | 7 | 11, string>;
19
+ export declare const spanColumns: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 10 | 9 | 7 | 11, string>;
20
+ export declare const spanRows: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 10 | 9 | 7 | 11, string>;
21
+ export declare const columnStart: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 10 | 9 | 7 | 11, string>;
22
+ export declare const rowStart: Record<1 | 2 | 4 | 8 | 12 | 5 | 6 | 3 | 10 | 9 | 7 | 11, string>;
23
23
  export declare const justifySelf: Record<"stretch" | "center" | "end" | "start", string>;
24
24
  export declare const alignSelf: Record<"stretch" | "center" | "end" | "start" | "baseline", string>;
package/dist/hooks.d.ts CHANGED
@@ -4,7 +4,9 @@ import type { ScreenSizeContextType } from './screen-size-context';
4
4
  export declare const useTheme: () => Theme;
5
5
  export declare const useDisableBodyScroll: (disable: boolean) => void;
6
6
  export declare const useScreenSize: () => ScreenSizeContextType;
7
- export declare const useElementDimensions: () => {
7
+ export declare const useElementDimensions: ({ includeMargins }?: {
8
+ includeMargins?: boolean;
9
+ }) => {
8
10
  width: number;
9
11
  height: number;
10
12
  ref: (node: HTMLElement | null) => void;
package/dist/hooks.js CHANGED
@@ -10,37 +10,37 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  useAriaId: function() {
13
- return D;
13
+ return $;
14
14
  },
15
15
  useBoundingRect: function() {
16
- return j;
16
+ return P;
17
17
  },
18
18
  useDisableBodyScroll: function() {
19
- return L;
19
+ return M;
20
20
  },
21
21
  useElementDimensions: function() {
22
- return q;
22
+ return F;
23
23
  },
24
24
  useIsInViewport: function() {
25
- return I;
25
+ return B;
26
26
  },
27
27
  useIsomorphicLayoutEffect: function() {
28
- return $;
28
+ return O;
29
29
  },
30
30
  useScreenSize: function() {
31
- return M;
31
+ return k;
32
32
  },
33
33
  useTheme: function() {
34
- return H;
34
+ return C;
35
35
  },
36
36
  useWindowHeight: function() {
37
- return k;
37
+ return j;
38
38
  },
39
39
  useWindowSize: function() {
40
- return v;
40
+ return y;
41
41
  },
42
42
  useWindowWidth: function() {
43
- return F;
43
+ return G;
44
44
  }
45
45
  });
46
46
  const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
@@ -96,157 +96,163 @@ function _interop_require_wildcard(obj, nodeInterop) {
96
96
  }
97
97
  return newObj;
98
98
  }
99
- const H = ()=>{
99
+ const C = ()=>{
100
100
  const t = _react.useContext(_themecontext.default);
101
101
  if (!t) throw Error("To use @telefonica/mistica components you must instantiate <ThemeContextProvider> as their parent.");
102
102
  return t;
103
103
  };
104
- let a = "", m = 0, w = 0;
105
- const L = (t)=>{
104
+ let f = "", S = 0, g = 0;
105
+ const M = (t)=>{
106
106
  _react.useEffect(()=>{
107
107
  if (t) {
108
- const n = document.scrollingElement || document.documentElement, e = ()=>{
108
+ const r = document.scrollingElement || document.documentElement, e = ()=>{
109
109
  var i;
110
110
  var _ref, _ref1;
111
- if (w++, !(w > 1) && (m = (_ref = n == null ? void 0 : n.scrollTop) !== null && _ref !== void 0 ? _ref : 0, a = (_ref1 = (i = document.body) == null ? void 0 : i.style.cssText) !== null && _ref1 !== void 0 ? _ref1 : "", document.body)) {
111
+ if (g++, !(g > 1) && (S = (_ref = r == null ? void 0 : r.scrollTop) !== null && _ref !== void 0 ? _ref : 0, f = (_ref1 = (i = document.body) == null ? void 0 : i.style.cssText) !== null && _ref1 !== void 0 ? _ref1 : "", document.body)) {
112
112
  var _ref2;
113
- const o = window.innerWidth > ((_ref2 = n == null ? void 0 : n.clientWidth) !== null && _ref2 !== void 0 ? _ref2 : window.innerWidth) ? "scroll" : "hidden";
114
- document.body.style.cssText = a + (a.endsWith(";") ? "" : ";") + [
113
+ const o = window.innerWidth > ((_ref2 = r == null ? void 0 : r.clientWidth) !== null && _ref2 !== void 0 ? _ref2 : window.innerWidth) ? "scroll" : "hidden";
114
+ document.body.style.cssText = f + (f.endsWith(";") ? "" : ";") + [
115
115
  "overflow: hidden;",
116
116
  `overflow-y: ${o};`,
117
117
  "position: fixed;",
118
- `top: ${-m}px;`,
118
+ `top: ${-S}px;`,
119
119
  "left: 0px;",
120
120
  "right: 0px;",
121
121
  "bottom: 0px;",
122
122
  "overscroll-behavior-y: contain;"
123
123
  ].join("");
124
124
  }
125
- }, s = ()=>{
126
- w--, !(w > 0) && (document.body && (document.body.style.cssText = a), n && (n.scrollTop = m));
125
+ }, c = ()=>{
126
+ g--, !(g > 0) && (document.body && (document.body.style.cssText = f), r && (r.scrollTop = S));
127
127
  };
128
- return e(), s;
128
+ return e(), c;
129
129
  }
130
130
  return ()=>{};
131
131
  }, [
132
132
  t
133
133
  ]);
134
- }, M = ()=>_react.useContext(_screensizecontext.default), q = ()=>{
135
- const [t, n] = _react.useState(0), [e, s] = _react.useState(0), [i, c] = _react.useState(null), o = _react.useCallback((d)=>{
136
- if (!d) {
137
- n(0), s(0);
134
+ }, k = ()=>_react.useContext(_screensizecontext.default), F = function() {
135
+ let { includeMargins: t = !1 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
136
+ const [r, e] = _react.useState(0), [c, i] = _react.useState(0), [s, o] = _react.useState(null), d = _react.useCallback((a)=>{
137
+ if (!a) {
138
+ e(0), i(0);
138
139
  return;
139
140
  }
140
- const { width: f, height: l } = d[0].contentRect;
141
- n(f), s(l);
142
- }, []), u = _react.useCallback((d)=>{
143
- c(d);
141
+ const { width: w, height: m } = a[0].contentRect;
142
+ if (t) {
143
+ const h = window.getComputedStyle(a[0].target), v = parseInt(h.marginTop, 10), b = parseInt(h.marginBottom, 10), W = parseInt(h.marginLeft, 10), x = parseInt(h.marginRight, 10);
144
+ e(w + W + x), i(m + v + b);
145
+ } else e(w), i(m);
146
+ }, [
147
+ t
148
+ ]), u = _react.useCallback((a)=>{
149
+ o(a);
144
150
  }, []);
145
151
  return _react.useEffect(()=>{
146
- if (!i) {
147
- n(0), s(0);
152
+ if (!s) {
153
+ e(0), i(0);
148
154
  return;
149
155
  }
150
- return (0, _dom.listenResize)(i, o);
156
+ return (0, _dom.listenResize)(s, d);
151
157
  }, [
152
- i,
153
- o
158
+ s,
159
+ d
154
160
  ]), {
155
- width: t,
156
- height: e,
161
+ width: r,
162
+ height: c,
157
163
  ref: u
158
164
  };
159
- }, D = (t)=>{
160
- const { useId: n } = H();
161
- if (n) {
162
- const e = n();
165
+ }, $ = (t)=>{
166
+ const { useId: r } = C();
167
+ if (r) {
168
+ const e = r();
163
169
  return t || e;
164
170
  } else {
165
171
  const e = _react.useContext(_ariaidgettercontext.default);
166
172
  return _react.useRef(t || e()).current;
167
173
  }
168
- }, v = ()=>{
169
- var l;
170
- const [t, n] = _react.useState((0, _environment.isClientSide)() ? window.innerHeight : 1200), [e, s] = _react.useState((0, _environment.isClientSide)() ? window.innerWidth : 800), [i, c] = _react.useState((0, _environment.isClientSide)() ? window.screen.availHeight : 1200), [o, u] = _react.useState((0, _environment.isClientSide)() ? window.screen.availWidth : 800), [d, f] = _react.useState((0, _environment.isClientSide)() ? ((l = window.visualViewport) == null ? void 0 : l.height) || window.screen.availHeight : 1200);
174
+ }, y = ()=>{
175
+ var w;
176
+ const [t, r] = _react.useState((0, _environment.isClientSide)() ? window.innerHeight : 1200), [e, c] = _react.useState((0, _environment.isClientSide)() ? window.innerWidth : 800), [i, s] = _react.useState((0, _environment.isClientSide)() ? window.screen.availHeight : 1200), [o, d] = _react.useState((0, _environment.isClientSide)() ? window.screen.availWidth : 800), [u, a] = _react.useState((0, _environment.isClientSide)() ? ((w = window.visualViewport) == null ? void 0 : w.height) || window.screen.availHeight : 1200);
171
177
  return _react.useEffect(()=>{
172
- const g = ()=>{
173
- var S;
174
- n(window.innerHeight), s(window.innerWidth), c(window.screen.availHeight), u(window.screen.availWidth), f(((S = window.visualViewport) == null ? void 0 : S.height) || window.screen.availHeight);
178
+ const m = ()=>{
179
+ var h;
180
+ r(window.innerHeight), c(window.innerWidth), s(window.screen.availHeight), d(window.screen.availWidth), a(((h = window.visualViewport) == null ? void 0 : h.height) || window.screen.availHeight);
175
181
  };
176
- return window.addEventListener("resize", g), ()=>{
177
- window.removeEventListener("resize", g);
182
+ return window.addEventListener("resize", m), ()=>{
183
+ window.removeEventListener("resize", m);
178
184
  };
179
185
  }, []), _react.useMemo(()=>({
180
186
  height: t,
181
187
  width: e,
182
188
  screenHeight: i,
183
189
  screenWidth: o,
184
- visualHeight: d
190
+ visualHeight: u
185
191
  }), [
186
192
  t,
187
193
  e,
188
194
  i,
189
195
  o,
190
- d
196
+ u
191
197
  ]);
192
- }, k = ()=>{
193
- const { height: t } = v();
198
+ }, j = ()=>{
199
+ const { height: t } = y();
194
200
  return t;
195
- }, F = ()=>{
196
- const { width: t } = v();
201
+ }, G = ()=>{
202
+ const { width: t } = y();
197
203
  return t;
198
- }, $ = (0, _environment.isClientSide)() ? _react.useLayoutEffect : _react.useEffect, I = (t, n, e)=>{
199
- const [s, i] = _react.useState(n);
204
+ }, O = (0, _environment.isClientSide)() ? _react.useLayoutEffect : _react.useEffect, B = (t, r, e)=>{
205
+ const [c, i] = _react.useState(r);
200
206
  return _react.useEffect(()=>{
201
207
  if (!t.current) return;
202
208
  if (typeof window.IntersectionObserver > "u") return ()=>{};
203
- const c = new IntersectionObserver((o)=>{
209
+ const s = new IntersectionObserver((o)=>{
204
210
  i(o[0].isIntersecting);
205
211
  }, {
206
212
  root: e == null ? void 0 : e.root,
207
213
  rootMargin: e == null ? void 0 : e.rootMargin,
208
214
  threshold: e == null ? void 0 : e.threshold
209
215
  });
210
- return c.observe(t.current), ()=>{
211
- c.disconnect();
216
+ return s.observe(t.current), ()=>{
217
+ s.disconnect();
212
218
  };
213
219
  }, [
214
220
  t,
215
221
  e == null ? void 0 : e.root,
216
222
  e == null ? void 0 : e.rootMargin,
217
223
  e == null ? void 0 : e.threshold
218
- ]), s;
219
- }, T = (t)=>{
220
- const { top: n, right: e, bottom: s, left: i, width: c, height: o, x: u, y: d } = t.getBoundingClientRect();
224
+ ]), c;
225
+ }, z = (t)=>{
226
+ const { top: r, right: e, bottom: c, left: i, width: s, height: o, x: d, y: u } = t.getBoundingClientRect();
221
227
  return {
222
- top: n,
228
+ top: r,
223
229
  right: e,
224
- bottom: s,
230
+ bottom: c,
225
231
  left: i,
226
- width: c,
232
+ width: s,
227
233
  height: o,
228
- x: u,
229
- y: d
234
+ x: d,
235
+ y: u
230
236
  };
231
- }, j = function(t) {
232
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
233
- const [s, i] = _react.useState(), c = I(t, !1);
237
+ }, P = function(t) {
238
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
239
+ const [c, i] = _react.useState(), s = B(t, !1);
234
240
  return _react.useEffect(()=>{
235
241
  let o;
236
- const u = ()=>{
237
- if (t.current && (c || e)) {
238
- const d = T(t.current);
239
- (0, _helpers.isEqual)(s, d) || i(d), n && (o = requestAnimationFrame(u));
242
+ const d = ()=>{
243
+ if (t.current && (s || e)) {
244
+ const u = z(t.current);
245
+ (0, _helpers.isEqual)(c, u) || i(u), r && (o = requestAnimationFrame(d));
240
246
  } else i(void 0);
241
247
  };
242
- return o = requestAnimationFrame(u), ()=>{
248
+ return o = requestAnimationFrame(d), ()=>{
243
249
  cancelAnimationFrame(o);
244
250
  };
245
251
  }, [
246
252
  t,
247
- s,
248
253
  c,
249
- n,
254
+ s,
255
+ r,
250
256
  e
251
- ]), s;
257
+ ]), c;
252
258
  };
@@ -8,4 +8,4 @@ Object.defineProperty(exports, "PACKAGE_VERSION", {
8
8
  return o;
9
9
  }
10
10
  });
11
- const o = "15.15.0";
11
+ const o = "15.16.0";
@@ -21,35 +21,38 @@ _export(exports, {
21
21
  cellTextAlign: function() {
22
22
  return k;
23
23
  },
24
- collapsedRowTitle: function() {
24
+ collapsedRowHeaderItem: function() {
25
25
  return _;
26
26
  },
27
+ collapsedRowTitle: function() {
28
+ return v;
29
+ },
27
30
  collapsedRowsInMobile: function() {
28
31
  return i;
29
32
  },
30
33
  fullWidth: function() {
31
- return v;
34
+ return s;
32
35
  },
33
36
  hiddenHeadersInDesktop: function() {
34
- return s;
37
+ return d;
35
38
  },
36
39
  hiddenHeadersInMobile: function() {
37
- return d;
40
+ return n;
38
41
  },
39
42
  mobileCellHeading: function() {
40
- return n;
43
+ return c;
41
44
  },
42
45
  rowFirstItem: function() {
43
- return c;
46
+ return p;
44
47
  },
45
48
  rowLastCollapsedItem: function() {
46
- return p;
49
+ return m;
47
50
  },
48
51
  rowLastItem: function() {
49
- return m;
52
+ return b;
50
53
  },
51
54
  scrollContainer: function() {
52
- return b;
55
+ return I;
53
56
  },
54
57
  scrollOverResponsiveLayout: function() {
55
58
  return g;
@@ -58,10 +61,10 @@ _export(exports, {
58
61
  return h;
59
62
  },
60
63
  topActions: function() {
61
- return I;
64
+ return w;
62
65
  },
63
66
  vars: function() {
64
- return w;
67
+ return H;
65
68
  },
66
69
  verticalAlign: function() {
67
70
  return x;
@@ -74,7 +77,7 @@ var r = "_107ok88f", l = "_107ok88g", t = "_107ok886", k = {
74
77
  left: "_107ok888 _107ok887",
75
78
  right: "_107ok889 _107ok887",
76
79
  center: "_107ok88a _107ok887"
77
- }, _ = "_107ok88j", i = "_107ok883", v = "_107ok882", s = "_107ok885", d = "_107ok884", n = "_107ok88i", c = "_107ok88k", p = "_107ok88m", m = "_107ok88l", b = "_107ok88b", g = "_107ok88c", h = "_107ok881", I = "_107ok88h", w = {
80
+ }, _ = "_107ok88i", v = "_107ok88k", i = "_107ok883", s = "_107ok882", d = "_107ok885", n = "_107ok884", c = "_107ok88j", p = "_107ok88l", m = "_107ok88n", b = "_107ok88m", I = "_107ok88b", g = "_107ok88c", h = "_107ok881", w = "_107ok88h", H = {
78
81
  maxHeight: "var(--_107ok880)"
79
82
  }, x = {
80
83
  top: "_107ok88d",
@@ -14,6 +14,7 @@ export declare const verticalAlign: Record<"top" | "middle", string>;
14
14
  export declare const actionsHeaderText: string;
15
15
  export declare const actionsTableCell: string;
16
16
  export declare const topActions: string;
17
+ export declare const collapsedRowHeaderItem: string;
17
18
  export declare const mobileCellHeading: string;
18
19
  export declare const collapsedRowTitle: string;
19
20
  export declare const rowFirstItem: string;
package/dist/table.d.ts CHANGED
@@ -39,6 +39,7 @@ type TableProps = {
39
39
  hideHeaders?: boolean | 'desktop' | 'mobile';
40
40
  /** "data-" prefix is automatically added. For example, use "testid" instead of "data-testid" */
41
41
  dataAttributes?: DataAttributes;
42
+ rowHeaderIndex?: number;
42
43
  'aria-label'?: string;
43
44
  'aria-labelledby'?: string;
44
45
  'aria-describedby'?: string;