@telefonica/mistica 15.2.0 → 15.3.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.
Files changed (83) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/box.js +3 -3
  3. package/dist/boxed.js +2 -2
  4. package/dist/button-group.js +2 -2
  5. package/dist/button.js +5 -5
  6. package/dist/carousel.js +29 -29
  7. package/dist/chip.js +2 -2
  8. package/dist/community/advanced-data-card.d.ts +6 -2
  9. package/dist/community/advanced-data-card.js +4 -4
  10. package/dist/counter.js +7 -7
  11. package/dist/feedback.js +2 -2
  12. package/dist/fixed-footer-layout.css-mistica.js +5 -5
  13. package/dist/fixed-footer-layout.js +19 -17
  14. package/dist/form.js +6 -6
  15. package/dist/hero.css-mistica.js +12 -6
  16. package/dist/hero.css.d.ts +2 -0
  17. package/dist/hero.d.ts +2 -1
  18. package/dist/hero.js +80 -69
  19. package/dist/horizontal-scroll.js +2 -2
  20. package/dist/image.js +9 -7
  21. package/dist/list.js +19 -15
  22. package/dist/loading-bar.js +2 -2
  23. package/dist/loading-screen.js +3 -3
  24. package/dist/package-version.js +1 -1
  25. package/dist/pin-field.js +2 -2
  26. package/dist/progress-bar.js +4 -4
  27. package/dist/radio-button.js +3 -3
  28. package/dist/responsive-layout.css-mistica.js +18 -9
  29. package/dist/responsive-layout.d.ts +1 -0
  30. package/dist/responsive-layout.js +15 -15
  31. package/dist/select.js +16 -16
  32. package/dist/sheet.js +82 -81
  33. package/dist/slider.js +8 -8
  34. package/dist/tag.js +2 -2
  35. package/dist/text-field-base.js +3 -3
  36. package/dist/text-field-components.js +2 -2
  37. package/dist/text.js +105 -84
  38. package/dist/utils/aspect-ratio-support.js +8 -8
  39. package/dist/utils/browser.js +1 -1
  40. package/dist/video.js +2 -2
  41. package/dist-es/box.js +7 -7
  42. package/dist-es/boxed.js +2 -2
  43. package/dist-es/button-group.js +4 -4
  44. package/dist-es/button-layout.js +5 -5
  45. package/dist-es/button.js +11 -11
  46. package/dist-es/callout.js +8 -8
  47. package/dist-es/carousel.js +29 -29
  48. package/dist-es/checkbox.js +7 -7
  49. package/dist-es/chip.js +4 -4
  50. package/dist-es/community/advanced-data-card.js +14 -14
  51. package/dist-es/counter.js +21 -21
  52. package/dist-es/empty-state.js +12 -12
  53. package/dist-es/feedback.js +5 -5
  54. package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
  55. package/dist-es/fixed-footer-layout.js +33 -31
  56. package/dist-es/form.js +9 -9
  57. package/dist-es/grid.js +3 -3
  58. package/dist-es/hero.css-mistica.js +2 -2
  59. package/dist-es/hero.js +119 -108
  60. package/dist-es/horizontal-scroll.js +2 -2
  61. package/dist-es/image.js +15 -13
  62. package/dist-es/list.js +15 -11
  63. package/dist-es/loading-bar.js +6 -6
  64. package/dist-es/loading-screen.js +8 -8
  65. package/dist-es/package-version.js +1 -1
  66. package/dist-es/pin-field.js +10 -10
  67. package/dist-es/progress-bar.js +9 -9
  68. package/dist-es/radio-button.js +9 -9
  69. package/dist-es/responsive-layout.css-mistica.js +3 -3
  70. package/dist-es/responsive-layout.js +21 -21
  71. package/dist-es/select.js +22 -22
  72. package/dist-es/sheet.js +124 -123
  73. package/dist-es/slider.js +8 -8
  74. package/dist-es/style.css +1 -1
  75. package/dist-es/tag.js +4 -4
  76. package/dist-es/text-field-base.js +11 -11
  77. package/dist-es/text-field-components.js +9 -9
  78. package/dist-es/text-link.js +5 -5
  79. package/dist-es/text.js +103 -82
  80. package/dist-es/utils/aspect-ratio-support.js +14 -14
  81. package/dist-es/utils/browser.js +1 -1
  82. package/dist-es/video.js +5 -5
  83. package/package.json +1 -1
@@ -54,12 +54,12 @@ function _object_spread_props(target, source) {
54
54
  import { jsxs as t, jsx as r } from "react/jsx-runtime";
55
55
  import x from "classnames";
56
56
  import { useIsInverseVariant as k } from "./theme-variant-context.js";
57
- import { ButtonPrimary as N } from "./button.js";
58
- import { useTheme as B } from "./hooks.js";
59
- import l from "./stack.js";
60
- import { Text6 as C, Text3 as I } from "./text.js";
57
+ import { ButtonPrimary as B } from "./button.js";
58
+ import { useTheme as C } from "./hooks.js";
59
+ import n from "./stack.js";
60
+ import { Text6 as I, Text3 as N } from "./text.js";
61
61
  import S from "./button-group.js";
62
- import { container as E, inverseBorder as T, vars as V, contentVariants as n, iconContainer as $, largeImageContainer as b, largeImage as j, smallImage as A } from "./empty-state.css-mistica.js";
62
+ import { container as E, inverseBorder as T, vars as V, contentVariants as l, iconContainer as $, largeImageContainer as b, largeImage as j, smallImage as A } from "./empty-state.css-mistica.js";
63
63
  import { vars as a } from "./skins/skin-contract.css-mistica.js";
64
64
  import { AspectRatioContainer as D } from "./utils/aspect-ratio-support.js";
65
65
  import { getPrefixedDataAttributes as P } from "./utils/dom.js";
@@ -67,11 +67,11 @@ import { sprinkles as R } from "./sprinkles.css-mistica.js";
67
67
  import { applyCssVars as G } from "./utils/css.js";
68
68
  const M = (param)=>{
69
69
  let { title: c, titleAs: p = "h1", description: d, button: e, buttonLink: f, largeImageUrl: o, imageUrl: i, icon: m, "aria-label": g, dataAttributes: v } = param;
70
- const { isDarkMode: h } = B(), s = k(), u = i ? /* @__PURE__ */ r("img", {
70
+ const { isDarkMode: h } = C(), s = k(), u = i ? /* @__PURE__ */ r("img", {
71
71
  className: A,
72
72
  alt: "",
73
73
  src: i
74
- }) : void 0, y = _object_spread_props(_object_spread({}, (e == null ? void 0 : e.type) === N ? {
74
+ }) : void 0, y = _object_spread_props(_object_spread({}, (e == null ? void 0 : e.type) === B ? {
75
75
  primaryButton: e
76
76
  } : {
77
77
  secondaryButton: e
@@ -93,22 +93,22 @@ const M = (param)=>{
93
93
  style: {
94
94
  flex: 1
95
95
  },
96
- children: /* @__PURE__ */ t(l, {
96
+ children: /* @__PURE__ */ t(n, {
97
97
  space: 24,
98
- className: o ? n.largeImage : n.default,
98
+ className: o ? l.largeImage : l.default,
99
99
  children: [
100
100
  u !== null && u !== void 0 ? u : m && /* @__PURE__ */ r("div", {
101
101
  className: $,
102
102
  children: m
103
103
  }),
104
- /* @__PURE__ */ t(l, {
104
+ /* @__PURE__ */ t(n, {
105
105
  space: 16,
106
106
  children: [
107
- /* @__PURE__ */ r(C, {
107
+ /* @__PURE__ */ r(I, {
108
108
  as: p,
109
109
  children: c
110
110
  }),
111
- /* @__PURE__ */ r(I, {
111
+ /* @__PURE__ */ r(N, {
112
112
  regular: !0,
113
113
  as: "p",
114
114
  color: s ? a.colors.inverse : a.colors.textSecondary,
@@ -99,7 +99,7 @@ import p from "./stack.js";
99
99
  import u from "classnames";
100
100
  import re from "./button-group.js";
101
101
  import { vars as s } from "./skins/skin-contract.css-mistica.js";
102
- import { container as te, innerContainer as ce, innerContainerWithButtons as ne, backgroundBrand as ae, iconContainer as ie, feedbackData as se, feedbackTextAppearFast as de, feedbackTextAppearMedium as N, feedbackTextAppearSlow as le, desktopContainer as me, desktopContent as ue, desktopImage as pe } from "./feedback.css-mistica.js";
102
+ import { container as te, innerContainer as ce, innerContainerWithButtons as ne, backgroundBrand as ae, iconContainer as ie, feedbackData as se, feedbackTextAppearFast as de, feedbackTextAppearMedium as I, feedbackTextAppearSlow as le, desktopContainer as me, desktopContent as ue, desktopImage as pe } from "./feedback.css-mistica.js";
103
103
  import V from "./icons/icon-success-vivo-new.js";
104
104
  const O = (r)=>!J(r), D = (param)=>{
105
105
  let { primaryButton: r, secondaryButton: o } = param;
@@ -112,12 +112,12 @@ const O = (r)=>!J(r), D = (param)=>{
112
112
  return /* @__PURE__ */ e("style", {
113
113
  children: o
114
114
  });
115
- }, I = (r)=>{
115
+ }, N = (r)=>{
116
116
  U() && X(r).catch(()=>{});
117
117
  }, E = (r)=>{
118
118
  H.useEffect(()=>{
119
119
  let o;
120
- return r === "success" && (o = setTimeout(()=>I("success"), 700)), r === "error" && (o = setTimeout(()=>I("error"), 1e3)), ()=>{
120
+ return r === "success" && (o = setTimeout(()=>N("success"), 700)), r === "error" && (o = setTimeout(()=>N("error"), 1e3)), ()=>{
121
121
  clearTimeout(o);
122
122
  };
123
123
  }, [
@@ -150,7 +150,7 @@ const O = (r)=>!J(r), D = (param)=>{
150
150
  })
151
151
  }),
152
152
  a && /* @__PURE__ */ e("div", {
153
- className: u(n && N),
153
+ className: u(n && I),
154
154
  children: a && /* @__PURE__ */ e(Z, {
155
155
  regular: !0,
156
156
  color: s.colors.textSecondary,
@@ -158,7 +158,7 @@ const O = (r)=>!J(r), D = (param)=>{
158
158
  })
159
159
  }),
160
160
  c && /* @__PURE__ */ e("div", {
161
- className: u(n && (a ? le : N)),
161
+ className: u(n && (a ? le : I)),
162
162
  children: c
163
163
  })
164
164
  ]
@@ -1,7 +1,7 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./fixed-footer-layout.css.ts.vanilla.css-mistica.js";
3
- var v = "p5j8j58", a = "p5j8j56 _1y2v1nf3l", j = "p5j8j54", t = "p5j8j53 _1y2v1nfhx", e = {
3
+ var a = "p5j8j57", j = "p5j8j55", t = "p5j8j54", v = "p5j8j53 _1y2v1nfhx", e = {
4
4
  footerHeight: "var(--p5j8j50)",
5
5
  backgroundColor: "var(--p5j8j51)"
6
6
  }, p = "_1y2v1nfh9";
7
- export { v as container, a as elevated, j as fixedFooter, t as footer, e as vars, p as withoutFooter };
7
+ export { a as container, j as elevated, t as fixedFooter, v as footer, e as vars, p as withoutFooter };
@@ -51,73 +51,75 @@ function _object_spread_props(target, source) {
51
51
  }
52
52
  return target;
53
53
  }
54
- import { jsxs as L, Fragment as O, jsx as c } from "react/jsx-runtime";
55
- import * as l from "react";
54
+ import { jsxs as L, Fragment as O, jsx as l } from "react/jsx-runtime";
55
+ import * as m from "react";
56
56
  import $ from "classnames";
57
57
  import { debounce as k } from "./utils/helpers.js";
58
- import { isRunningAcceptanceTest as N } from "./utils/platform.js";
59
- import { useScreenSize as W, useTheme as z, useElementDimensions as P, useIsWithinIFrame as j, useWindowHeight as B, useScreenHeight as _, useIsomorphicLayoutEffect as H } from "./hooks.js";
60
- import { getScrollableParentElement as V, addPassiveEventListener as v, removePassiveEventListener as h, hasScroll as q, getScrollDistanceToBottom as G } from "./utils/dom.js";
58
+ import { isRunningAcceptanceTest as W } from "./utils/platform.js";
59
+ import { useScreenSize as z, useTheme as N, useElementDimensions as P, useIsWithinIFrame as j, useWindowHeight as B, useScreenHeight as _, useIsomorphicLayoutEffect as H } from "./hooks.js";
60
+ import { getScrollableParentElement as V, addPassiveEventListener as h, removePassiveEventListener as E, hasScroll as q, getScrollDistanceToBottom as G } from "./utils/dom.js";
61
61
  import { vars as J } from "./skins/skin-contract.css-mistica.js";
62
- import { container as K, vars as E, footer as M, withoutFooter as Q, elevated as U, fixedFooter as X } from "./fixed-footer-layout.css-mistica.js";
63
- import { applyCssVars as Y, safeAreaInsetBottom as x } from "./utils/css.js";
62
+ import { container as K, vars as x, footer as M, withoutFooter as Q, elevated as U, fixedFooter as X } from "./fixed-footer-layout.css-mistica.js";
63
+ import { applyCssVars as Y, safeAreaInsetBottom as S } from "./utils/css.js";
64
64
  const Z = 2, C = (e)=>e === document.documentElement ? window : e, ee = (e)=>{
65
65
  const n = setTimeout(e, 0);
66
66
  return {
67
67
  cancel: ()=>clearTimeout(n)
68
68
  };
69
69
  }, te = (param)=>{
70
- let { isFooterVisible: e = !0, footer: n, footerHeight: S = "auto", footerBgColor: T = J.colors.background, containerBgColor: m, children: y, onChangeFooterHeight: o } = param;
71
- const [g, w] = l.useState(!1), d = l.useRef(null), { isTabletOrSmaller: F } = W(), { platformOverrides: u } = z(), { height: s, ref: b } = P(), I = j(), f = B(), A = _(), i = f - s > (I ? f : A) / Z;
70
+ let { isFooterVisible: e = !0, footer: n, footerHeight: T = "auto", footerBgColor: y = J.colors.background, containerBgColor: d, children: g, onChangeFooterHeight: o } = param;
71
+ const [w, F] = m.useState(!1), u = m.useRef(null), { isTabletOrSmaller: i } = z(), { platformOverrides: f } = N(), { height: s, ref: b } = P(), I = j(), p = B(), A = _(), a = p - s > (I ? p : A) / Z;
72
72
  H(()=>{
73
73
  o == null || o(s);
74
74
  }, [
75
75
  o,
76
76
  s
77
- ]), l.useEffect(()=>{
78
- const a = V(d.current), R = ()=>N(u) || !i ? !1 : q(a) ? G(a) > 1 : !1, t = k(()=>{
79
- w(R());
77
+ ]), m.useEffect(()=>{
78
+ if (!i || W(f) || a) return;
79
+ const c = V(u.current), R = ()=>q(c) && G(c) > 1, t = k(()=>{
80
+ F(R());
80
81
  }, 50, {
81
82
  leading: !0,
82
83
  maxWait: 200
83
- }), D = ee(t), r = C(a);
84
- return v(r, "resize", t), v(r, "scroll", t), ()=>{
85
- t.cancel(), h(r, "scroll", t), h(r, "resize", t), D.cancel();
84
+ }), D = ee(t), r = C(c);
85
+ return h(r, "resize", t), h(r, "scroll", t), ()=>{
86
+ t.cancel(), E(r, "scroll", t), E(r, "resize", t), D.cancel();
86
87
  };
87
88
  }, [
88
- i,
89
- u
89
+ a,
90
+ f,
91
+ i
90
92
  ]);
91
- const p = i;
93
+ const v = a;
92
94
  return /* @__PURE__ */ L(O, {
93
95
  children: [
94
- /* @__PURE__ */ c("div", {
95
- ref: d,
96
+ /* @__PURE__ */ l("div", {
97
+ ref: u,
96
98
  className: K,
97
- style: Y(_object_spread_props(_object_spread({}, m && {
98
- [E.backgroundColor]: m
99
+ style: Y(_object_spread_props(_object_spread({}, d && {
100
+ [x.backgroundColor]: d
99
101
  }), {
100
- [E.footerHeight]: p ? `calc(${x} + ${s}px)` : "0px"
102
+ [x.footerHeight]: v ? `calc(${S} + ${s}px)` : "0px"
101
103
  })),
102
- children: y
104
+ children: g
103
105
  }),
104
- /* @__PURE__ */ c("div", {
106
+ /* @__PURE__ */ l("div", {
105
107
  className: $(M, {
106
108
  [Q]: !e,
107
- [U]: g,
108
- [X]: p
109
+ [U]: w,
110
+ [X]: v
109
111
  }),
110
112
  style: {
111
- background: F ? T : void 0
113
+ background: i ? y : void 0
112
114
  },
113
115
  "data-testid": `fixed-footer${e ? "-visible" : "-hidden"}`,
114
116
  "data-position-fixed": "bottom",
115
- children: e && /* @__PURE__ */ c("aside", {
117
+ children: e && /* @__PURE__ */ l("aside", {
116
118
  ref: b,
117
119
  "data-component-name": "FixedFooter",
118
120
  style: {
119
- height: S,
120
- marginBottom: x
121
+ height: T,
122
+ marginBottom: S
121
123
  },
122
124
  children: n
123
125
  })
package/dist-es/form.js CHANGED
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
51
51
  }
52
52
  return target;
53
53
  }
54
- import { jsx as F } from "react/jsx-runtime";
54
+ import { jsx as N } from "react/jsx-runtime";
55
55
  import * as n from "react";
56
56
  import { useTheme as A, useAriaId as _ } from "./hooks.js";
57
57
  import { FormContext as q } from "./form-context.js";
@@ -83,8 +83,8 @@ const W = (param)=>{
83
83
  if (s.disabled) continue;
84
84
  if (s.required && !((o = l[t]) != null && o.trim())) e[t] = g.formFieldErrorIsMandatory;
85
85
  else {
86
- const C = u == null ? void 0 : u(i[t], l[t]);
87
- C && (e[t] = C);
86
+ const F = u == null ? void 0 : u(i[t], l[t]);
87
+ F && (e[t] = F);
88
88
  }
89
89
  }
90
90
  const r = Object.keys(e).map((t)=>{
@@ -120,14 +120,14 @@ const W = (param)=>{
120
120
  }, 100);
121
121
  }, [
122
122
  h
123
- ]), N = (e)=>[
123
+ ]), O = (e)=>[
124
124
  ...c.current.keys()
125
125
  ].reduce((r, o)=>{
126
126
  var t, s;
127
127
  return (s = (t = c.current.get(o)) == null ? void 0 : t.input) != null && s.disabled ? r : _object_spread_props(_object_spread({}, r), {
128
128
  [o]: e[o]
129
129
  });
130
- }, {}), O = n.useCallback((e)=>(e == null || e.preventDefault(), m("sending"), Object.keys(p()).length > 0 ? (m("filling"), Promise.resolve()) : Promise.resolve(b(N(i), N(l))).finally(()=>{
130
+ }, {}), C = n.useCallback((e)=>(e == null || e.preventDefault(), m("sending"), Object.keys(p()).length > 0 ? (m("filling"), Promise.resolve()) : Promise.resolve(b(O(i), O(l))).finally(()=>{
131
131
  f.current && m("filling");
132
132
  })), [
133
133
  b,
@@ -145,7 +145,7 @@ const W = (param)=>{
145
145
  [e]: r
146
146
  }));
147
147
  }, []);
148
- return /* @__PURE__ */ F(q.Provider, {
148
+ return /* @__PURE__ */ N(q.Provider, {
149
149
  value: {
150
150
  formStatus: w,
151
151
  values: i,
@@ -157,12 +157,12 @@ const W = (param)=>{
157
157
  register: j,
158
158
  jumpToNext: T,
159
159
  validate: p,
160
- submit: O,
160
+ submit: C,
161
161
  formId: v
162
162
  },
163
- children: /* @__PURE__ */ F("form", {
163
+ children: /* @__PURE__ */ N("form", {
164
164
  id: v,
165
- onSubmit: O,
165
+ onSubmit: C,
166
166
  ref: d,
167
167
  className: B(L({
168
168
  width: "100%"
package/dist-es/grid.js CHANGED
@@ -28,7 +28,7 @@ function _object_spread(target) {
28
28
  }
29
29
  import c from "classnames";
30
30
  import * as d from "react";
31
- import { grid as G, gridTemplateColumns as C, gridTemplateColumnsAutoRepeat as M, gridTemplateRows as T, gridTemplateRowsAutoRepeat as j, gridAutoFlow as v, gridJustifyItems as N, gridAlignItems as V, gridJustifyContent as k, gridAlignContent as E, fullColumns as J, spanColumns as h, fullRows as w, spanRows as D, columnStart as F, rowStart as I, justifySelf as P, alignSelf as q, vars as p } from "./grid.css-mistica.js";
31
+ import { grid as G, gridTemplateColumns as C, gridTemplateColumnsAutoRepeat as M, gridTemplateRows as T, gridTemplateRowsAutoRepeat as j, gridAutoFlow as v, gridJustifyItems as V, gridAlignItems as k, gridJustifyContent as E, gridAlignContent as J, fullColumns as N, spanColumns as h, fullRows as w, spanRows as D, columnStart as F, rowStart as I, justifySelf as P, alignSelf as q, vars as p } from "./grid.css-mistica.js";
32
32
  import { applyCssVars as B } from "./utils/css.js";
33
33
  import { getPrefixedDataAttributes as R } from "./utils/dom.js";
34
34
  import { sprinkles as H } from "./sprinkles.css-mistica.js";
@@ -60,7 +60,7 @@ const K = (t, e)=>{
60
60
  }
61
61
  return /*#__PURE__*/ d.createElement(z, _object_spread({
62
62
  ref: x,
63
- className: c(G, g, e ? typeof e == "number" ? C[e] : M : "", t ? typeof t == "number" ? T[t] : j : "", f ? v[f] : "", o ? N[o] : "", r ? V[r] : "", l ? k[l] : "", n ? E[n] : ""),
63
+ className: c(G, g, e ? typeof e == "number" ? C[e] : M : "", t ? typeof t == "number" ? T[t] : j : "", f ? v[f] : "", o ? V[o] : "", r ? k[r] : "", l ? E[l] : "", n ? J[n] : ""),
64
64
  style: _object_spread({
65
65
  height: u,
66
66
  minHeight: y
@@ -70,7 +70,7 @@ const K = (t, e)=>{
70
70
  let { rowStart: t, rowSpan: e, columnStart: i, columnSpan: f, span: o, justifySelf: r, alignSelf: l, children: n, as: u = "div", dataAttributes: y } = param;
71
71
  return o && (Array.isArray(o) ? (f = o[0], e = o[1]) : (f = o, e = o)), /*#__PURE__*/ d.createElement(u, _object_spread({
72
72
  ref: s,
73
- className: c(f ? f === "full" ? J : h[f] : "", e ? e === "full" ? w : D[e] : "", i ? F[i] : "", t ? I[t] : "", r ? P[r] : "", l ? q[l] : "")
73
+ className: c(f ? f === "full" ? N : h[f] : "", e ? e === "full" ? w : D[e] : "", i ? F[i] : "", t ? I[t] : "", r ? P[r] : "", l ? q[l] : "")
74
74
  }, R(y)), n);
75
75
  });
76
76
  export { Y as Grid, Z as GridItem };
@@ -1,7 +1,7 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./responsive-layout.css.ts.vanilla.css-mistica.js";
3
3
  import "./hero.css.ts.vanilla.css-mistica.js";
4
- var t = "_16rbpto6 _1y2v1nfha _1y2v1nfhw _1y2v1nfhq", v = "_16rbpto2 _1y2v1nfha", n = "_1y2v1nfhp _1y2v1nfie", _ = "_1y2v1nfhg", i = "_16rbpto7", p = {
4
+ var n = "_16rbpto7 _1y2v1nfha _1y2v1nfhw _1y2v1nfhq", o = "_16rbpto2 _1y2v1nfha", v = "_1y2v1nfhp _1y2v1nfie", i = "_16rbpto3", _ = "_1y2v1nfhg", e = "_16rbpto8", p = "_16rbpto9", h = {
5
5
  height: "var(--_16rbpto0)"
6
6
  };
7
- export { t as actions, v as container, n as containerDesktop, _ as containerMobile, i as layout, p as vars };
7
+ export { n as actions, o as container, v as containerDesktop, i as containerMinHeight, _ as containerMobile, e as layout, p as mediaContainer, h as vars };
package/dist-es/hero.js CHANGED
@@ -78,173 +78,184 @@ function _object_without_properties_loose(source, excluded) {
78
78
  }
79
79
  return target;
80
80
  }
81
- import { jsx as r, jsxs as m } from "react/jsx-runtime";
82
- import * as I from "react";
81
+ import { jsx as r, jsxs as p } from "react/jsx-runtime";
82
+ import * as T from "react";
83
83
  import u from "classnames";
84
- import { useScreenSize as T } from "./hooks.js";
85
- import { Text3 as y, Text8 as D } from "./text.js";
86
- import O from "./grid-layout.js";
87
- import d from "./box.js";
88
- import x from "./stack.js";
89
- import j from "./button-group.js";
90
- import { vars as a } from "./skins/skin-contract.css-mistica.js";
91
- import { container as g, containerMobile as G, containerDesktop as b, layout as L, actions as $, vars as B } from "./hero.css-mistica.js";
92
- import { vars as N } from "./image.css-mistica.js";
93
- import { useIsInsideSlideshowContext as A } from "./carousel.js";
94
- import { getPrefixedDataAttributes as S } from "./utils/dom.js";
95
- import { sprinkles as k } from "./sprinkles.css-mistica.js";
96
- import { ThemeVariant as V } from "./theme-variant-context.js";
97
- import { applyCssVars as f } from "./utils/css.js";
98
- const C = (param)=>{
99
- let { children: e, isInverse: o } = param;
100
- return /* @__PURE__ */ r(V, {
101
- isInverse: o,
102
- children: /* @__PURE__ */ r("div", {
103
- className: L,
104
- children: e
105
- })
84
+ import { useScreenSize as j } from "./hooks.js";
85
+ import { Text3 as b, Text8 as G } from "./text.js";
86
+ import $ from "./grid-layout.js";
87
+ import m from "./box.js";
88
+ import N from "./stack.js";
89
+ import A from "./button-group.js";
90
+ import { vars as i } from "./skins/skin-contract.css-mistica.js";
91
+ import { container as v, containerMobile as V, containerMinHeight as C, mediaContainer as z, layout as y, containerDesktop as B, actions as E, vars as R } from "./hero.css-mistica.js";
92
+ import { vars as S } from "./image.css-mistica.js";
93
+ import { useIsInsideSlideshowContext as K } from "./carousel.js";
94
+ import { getPrefixedDataAttributes as k } from "./utils/dom.js";
95
+ import { sprinkles as w } from "./sprinkles.css-mistica.js";
96
+ import { useIsInverseVariant as M } from "./theme-variant-context.js";
97
+ import { applyCssVars as h } from "./utils/css.js";
98
+ import { InternalResponsiveLayout as U } from "./responsive-layout.js";
99
+ const H = (param)=>{
100
+ let { children: o, isInverse: e, isInsideSlideShow: a } = param;
101
+ return /* @__PURE__ */ r(U, {
102
+ isInverse: e,
103
+ className: y,
104
+ innerDivClassName: y,
105
+ shouldExpandWhenNested: a ? "desktop" : !0,
106
+ backgroundColor: "transparent",
107
+ children: o
106
108
  });
107
- }, v = (param)=>{
108
- let { headline: e, title: o, titleAs: i = "h1", pretitle: t, description: n, descriptionLinesMax: l, extra: s, button: p, secondaryButton: h, buttonLink: c } = param;
109
- return /* @__PURE__ */ m("section", {
110
- className: k({
109
+ }, g = (param)=>{
110
+ let { headline: o, title: e, titleAs: a = "h1", pretitle: s, description: l, descriptionLinesMax: n, extra: t, button: c, secondaryButton: f, buttonLink: d } = param;
111
+ return /* @__PURE__ */ p("section", {
112
+ className: w({
111
113
  height: "100%",
112
114
  display: "flex",
113
115
  justifyContent: "space-between",
114
116
  flexDirection: "column"
115
117
  }),
116
118
  children: [
117
- /* @__PURE__ */ m("div", {
119
+ /* @__PURE__ */ p("div", {
118
120
  children: [
119
- /* @__PURE__ */ m(x, {
121
+ /* @__PURE__ */ p(N, {
120
122
  space: 16,
121
123
  children: [
122
- e && e,
123
- /* @__PURE__ */ m(x, {
124
+ o && o,
125
+ /* @__PURE__ */ p(N, {
124
126
  space: 8,
125
127
  children: [
126
- t && /* @__PURE__ */ r(y, {
128
+ s && /* @__PURE__ */ r(b, {
127
129
  as: "p",
128
130
  regular: !0,
129
- children: t
131
+ children: s
130
132
  }),
131
- o && /* @__PURE__ */ r(D, {
132
- as: i,
133
- children: o
133
+ e && /* @__PURE__ */ r(G, {
134
+ as: a,
135
+ children: e
134
136
  })
135
137
  ]
136
138
  }),
137
- n && /* @__PURE__ */ r(y, {
139
+ l && /* @__PURE__ */ r(b, {
138
140
  as: "p",
139
141
  regular: !0,
140
- color: a.colors.textSecondary,
141
- truncate: l,
142
- children: n
142
+ color: i.colors.textSecondary,
143
+ truncate: n,
144
+ children: l
143
145
  })
144
146
  ]
145
147
  }),
146
- s && /* @__PURE__ */ r("div", {
147
- children: s
148
+ t && /* @__PURE__ */ r("div", {
149
+ children: t
148
150
  })
149
151
  ]
150
152
  }),
151
- (p || c) && /* @__PURE__ */ r("div", {
152
- className: $,
153
- children: /* @__PURE__ */ r(j, {
154
- primaryButton: p,
155
- secondaryButton: h,
156
- link: c
153
+ (c || d) && /* @__PURE__ */ r("div", {
154
+ className: E,
155
+ children: /* @__PURE__ */ r(A, {
156
+ primaryButton: c,
157
+ secondaryButton: f,
158
+ link: d
157
159
  })
158
160
  })
159
161
  ]
160
162
  });
161
- }, R = {
162
- default: a.colors.background,
163
- alternative: a.colors.backgroundAlternative,
164
- brand: a.colors.backgroundBrand,
165
- "brand-secondary": a.colors.backgroundBrandSecondary
166
- }, Y = /*#__PURE__*/ I.forwardRef((_param, s)=>{
167
- var { height: e, background: o = "default", media: i, desktopMediaPosition: t = "left", dataAttributes: n } = _param, l = _object_without_properties(_param, [
163
+ }, I = {
164
+ default: i.colors.background,
165
+ alternative: i.colors.backgroundAlternative,
166
+ brand: i.colors.backgroundBrand,
167
+ "brand-secondary": i.colors.backgroundBrandSecondary,
168
+ none: "transparent"
169
+ }, W = /*#__PURE__*/ T.forwardRef((_param, c)=>{
170
+ var { height: o, background: e = "default", media: a, desktopMediaPosition: s = "left", dataAttributes: l, noPaddingY: n } = _param, t = _object_without_properties(_param, [
168
171
  "height",
169
172
  "background",
170
173
  "media",
171
174
  "desktopMediaPosition",
172
- "dataAttributes"
175
+ "dataAttributes",
176
+ "noPaddingY"
173
177
  ]);
174
- const { isTabletOrSmaller: p } = T(), h = A(), c = o === "brand" || o === "brand-secondary";
175
- if (p) return /* @__PURE__ */ r("div", {
176
- style: f({
177
- [N.mediaBorderRadius]: "0px"
178
+ const { isTabletOrSmaller: f } = j(), d = K(), D = M(), x = e === "none" ? D : e === "brand" || e === "brand-secondary";
179
+ if (f) return /* @__PURE__ */ r("div", {
180
+ style: h({
181
+ [S.mediaBorderRadius]: "0px"
178
182
  }),
179
- children: /* @__PURE__ */ m("div", _object_spread_props(_object_spread({}, S(_object_spread({
183
+ children: /* @__PURE__ */ r("div", _object_spread_props(_object_spread({}, k(_object_spread({
180
184
  "component-name": "Hero"
181
- }, n))), {
182
- ref: s,
185
+ }, l))), {
186
+ ref: c,
183
187
  style: _object_spread({
184
- backgroundColor: R[o]
185
- }, e === "100vh" ? {
188
+ backgroundColor: I[e]
189
+ }, o === "100vh" ? {
186
190
  maxHeight: "-webkit-fill-available"
187
- } : {}, f({
188
- [B.height]: e !== null && e !== void 0 ? e : "100%"
191
+ } : {}, h({
192
+ [R.height]: o !== null && o !== void 0 ? o : "100%"
189
193
  })),
190
- className: u(g, G),
191
- children: [
192
- i,
193
- /* @__PURE__ */ r(C, {
194
- isInverse: c,
195
- children: /* @__PURE__ */ r(d, {
194
+ className: u(v, V, {
195
+ [C]: !n
196
+ }),
197
+ children: /* @__PURE__ */ p(H, {
198
+ isInverse: x,
199
+ isInsideSlideShow: d,
200
+ children: [
201
+ /* @__PURE__ */ r("div", {
202
+ className: z,
203
+ children: a
204
+ }),
205
+ /* @__PURE__ */ r(m, {
196
206
  paddingTop: 24,
197
- paddingBottom: h ? 48 : 24,
198
- children: /* @__PURE__ */ r(v, _object_spread({}, l))
207
+ paddingBottom: d ? 48 : n ? 0 : 24,
208
+ className: y,
209
+ children: /* @__PURE__ */ r(g, _object_spread({}, t))
199
210
  })
200
- })
201
- ]
211
+ ]
212
+ })
202
213
  }))
203
214
  });
204
- const H = t === "left" ? i : /* @__PURE__ */ r(d, {
215
+ const O = s === "left" ? a : /* @__PURE__ */ r(m, {
205
216
  paddingRight: 24,
206
- children: /* @__PURE__ */ r(v, _object_spread({}, l))
207
- }), w = t === "right" ? i : /* @__PURE__ */ r(d, {
217
+ children: /* @__PURE__ */ r(g, _object_spread({}, t))
218
+ }), L = s === "right" ? a : /* @__PURE__ */ r(m, {
208
219
  paddingLeft: 24,
209
- children: /* @__PURE__ */ r(v, _object_spread({}, l))
220
+ children: /* @__PURE__ */ r(g, _object_spread({}, t))
210
221
  });
211
222
  return /* @__PURE__ */ r("div", {
212
- style: f({
213
- [N.mediaBorderRadius]: a.borderRadii.container
223
+ style: h({
224
+ [S.mediaBorderRadius]: i.borderRadii.container
214
225
  }),
215
- children: /* @__PURE__ */ r("div", _object_spread_props(_object_spread({}, S(_object_spread({
226
+ children: /* @__PURE__ */ r("div", _object_spread_props(_object_spread({}, k(_object_spread({
216
227
  "component-name": "Hero"
217
- }, n))), {
218
- ref: s,
228
+ }, l))), {
229
+ ref: c,
219
230
  style: _object_spread({
220
- backgroundColor: R[o]
221
- }, e === "100vh" ? {
231
+ backgroundColor: I[e]
232
+ }, o === "100vh" ? {
222
233
  maxHeight: "-webkit-fill-available"
223
- } : {}, f({
224
- [B.height]: e !== null && e !== void 0 ? e : "100%"
234
+ } : {}, h({
235
+ [R.height]: o !== null && o !== void 0 ? o : "100%"
225
236
  })),
226
- className: k({
227
- height: "100%",
228
- display: "flex",
229
- alignItems: "center"
237
+ className: w({
238
+ height: "100%"
230
239
  }),
231
- children: /* @__PURE__ */ r(C, {
232
- isInverse: c,
233
- children: /* @__PURE__ */ r(O, {
240
+ children: /* @__PURE__ */ r(H, {
241
+ isInverse: x,
242
+ children: /* @__PURE__ */ r($, {
234
243
  template: "6+6",
235
- left: /* @__PURE__ */ r(d, {
236
- paddingY: 56,
237
- className: u(g, b),
238
- children: H
244
+ left: /* @__PURE__ */ r(m, {
245
+ paddingY: n ? 0 : 56,
246
+ className: u(v, B, {
247
+ [C]: !n
248
+ }),
249
+ children: O
239
250
  }),
240
- right: /* @__PURE__ */ r(d, {
241
- paddingY: 56,
242
- className: u(g, b),
243
- children: w
251
+ right: /* @__PURE__ */ r(m, {
252
+ paddingY: n ? 0 : 56,
253
+ className: u(v, B),
254
+ children: L
244
255
  })
245
256
  })
246
257
  })
247
258
  }))
248
259
  });
249
- }), or = Y;
250
- export { or as default };
260
+ }), lr = W;
261
+ export { lr as default };
@@ -2,7 +2,7 @@ import { jsx as a } from "react/jsx-runtime";
2
2
  import t from "classnames";
3
3
  import * as s from "react";
4
4
  import { scroll as c, noScrollbar as m } from "./horizontal-scroll.css-mistica.js";
5
- const e = /*#__PURE__*/ s.forwardRef((param, l)=>{
5
+ const n = /*#__PURE__*/ s.forwardRef((param, l)=>{
6
6
  let { children: o, noScrollbar: r } = param;
7
7
  return /* @__PURE__ */ a("div", {
8
8
  className: t(c, {
@@ -11,5 +11,5 @@ const e = /*#__PURE__*/ s.forwardRef((param, l)=>{
11
11
  ref: l,
12
12
  children: o
13
13
  });
14
- }), p = e;
14
+ }), p = n;
15
15
  export { p as default };