@telefonica/mistica 13.1.2 → 13.2.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 (147) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/avatar.css-mistica.js +3 -3
  3. package/dist/badge.css-mistica.js +2 -2
  4. package/dist/button-group.css-mistica.js +1 -1
  5. package/dist/button-layout.css-mistica.js +8 -8
  6. package/dist/button.css-mistica.js +20 -20
  7. package/dist/callout.css-mistica.js +2 -2
  8. package/dist/card.css-mistica.js +7 -7
  9. package/dist/carousel.css-mistica.js +15 -15
  10. package/dist/checkbox.css-mistica.js +8 -8
  11. package/dist/chip.css-mistica.js +4 -4
  12. package/dist/circle.css-mistica.js +2 -2
  13. package/dist/credit-card-number-field.css-mistica.js +3 -3
  14. package/dist/cvv-field.css-mistica.js +3 -3
  15. package/dist/dialog.css-mistica.js +6 -6
  16. package/dist/double-field.css-mistica.js +4 -4
  17. package/dist/empty-state-card.css-mistica.js +4 -4
  18. package/dist/empty-state.css-mistica.js +7 -7
  19. package/dist/feedback.css-mistica.js +1 -1
  20. package/dist/fixed-footer-layout.css-mistica.js +4 -4
  21. package/dist/header.d.ts +20 -1
  22. package/dist/header.js +60 -59
  23. package/dist/highlighted-card.css-mistica.js +6 -6
  24. package/dist/hooks.js +47 -44
  25. package/dist/icon-button.css-mistica.js +1 -1
  26. package/dist/image.css-mistica.js +2 -2
  27. package/dist/image.d.ts +2 -2
  28. package/dist/image.js +63 -48
  29. package/dist/list.css-mistica.js +12 -12
  30. package/dist/loading-bar.css-mistica.js +6 -6
  31. package/dist/maybe-dismissable.css-mistica.js +3 -3
  32. package/dist/menu.css-mistica.js +2 -2
  33. package/dist/navigation-bar.css-mistica.js +12 -12
  34. package/dist/navigation-breadcrumbs.css-mistica.js +3 -3
  35. package/dist/package-version.js +1 -1
  36. package/dist/password-field.css-mistica.js +2 -2
  37. package/dist/popover.css-mistica.js +9 -9
  38. package/dist/progress-bar.css-mistica.js +3 -3
  39. package/dist/radio-button.css-mistica.js +5 -5
  40. package/dist/responsive-layout.css-mistica.js +3 -3
  41. package/dist/screen-reader-only.css-mistica.js +1 -1
  42. package/dist/select.css-mistica.js +13 -13
  43. package/dist/select.js +73 -73
  44. package/dist/skeleton-base.d.ts +2 -1
  45. package/dist/skeleton-base.js +6 -6
  46. package/dist/skeletons.css-mistica.js +3 -3
  47. package/dist/skeletons.d.ts +2 -1
  48. package/dist/skeletons.js +21 -20
  49. package/dist/skins/blau.js +19 -9
  50. package/dist/skins/movistar.js +17 -7
  51. package/dist/skins/o2-classic.js +17 -7
  52. package/dist/skins/o2.js +17 -7
  53. package/dist/skins/skin-contract.css-mistica.js +133 -123
  54. package/dist/skins/skin-contract.css.d.ts +10 -0
  55. package/dist/skins/telefonica.d.ts +1 -1
  56. package/dist/skins/telefonica.js +18 -8
  57. package/dist/skins/types.d.ts +5 -0
  58. package/dist/skins/vivo.js +17 -7
  59. package/dist/snackbar.css-mistica.js +5 -5
  60. package/dist/spinner.css-mistica.js +1 -1
  61. package/dist/sprinkles.css-mistica.js +336 -306
  62. package/dist/stepper.css-mistica.js +9 -9
  63. package/dist/switch-component.css-mistica.js +22 -22
  64. package/dist/tabs.css-mistica.js +14 -14
  65. package/dist/tag.css-mistica.js +2 -2
  66. package/dist/tag.js +21 -16
  67. package/dist/text-field-base.css-mistica.js +6 -6
  68. package/dist/text-field-components.css-mistica.js +8 -8
  69. package/dist/text-link.css-mistica.js +3 -3
  70. package/dist/text.js +5 -5
  71. package/dist/theme-context-provider.js +8 -7
  72. package/dist/theme.d.ts +2 -0
  73. package/dist/tooltip.css-mistica.js +4 -4
  74. package/dist/touchable.css-mistica.js +1 -1
  75. package/dist/utils/aspect-ratio-support.css-mistica.js +3 -3
  76. package/dist/utils/aspect-ratio-support.js +2 -3
  77. package/dist/video.css-mistica.js +2 -2
  78. package/dist-es/avatar.css-mistica.js +2 -2
  79. package/dist-es/badge.css-mistica.js +2 -2
  80. package/dist-es/button-group.css-mistica.js +1 -1
  81. package/dist-es/button-layout.css-mistica.js +7 -7
  82. package/dist-es/button.css-mistica.js +9 -9
  83. package/dist-es/callout.css-mistica.js +2 -2
  84. package/dist-es/card.css-mistica.js +2 -2
  85. package/dist-es/carousel.css-mistica.js +2 -2
  86. package/dist-es/checkbox.css-mistica.js +6 -6
  87. package/dist-es/chip.css-mistica.js +4 -4
  88. package/dist-es/circle.css-mistica.js +2 -2
  89. package/dist-es/credit-card-number-field.css-mistica.js +3 -3
  90. package/dist-es/cvv-field.css-mistica.js +2 -2
  91. package/dist-es/dialog.css-mistica.js +5 -5
  92. package/dist-es/double-field.css-mistica.js +4 -4
  93. package/dist-es/empty-state-card.css-mistica.js +2 -2
  94. package/dist-es/empty-state.css-mistica.js +3 -3
  95. package/dist-es/feedback.css-mistica.js +1 -1
  96. package/dist-es/fixed-footer-layout.css-mistica.js +3 -3
  97. package/dist-es/header.js +89 -88
  98. package/dist-es/highlighted-card.css-mistica.js +5 -5
  99. package/dist-es/hooks.js +43 -40
  100. package/dist-es/icon-button.css-mistica.js +1 -1
  101. package/dist-es/image.css-mistica.js +2 -2
  102. package/dist-es/image.js +74 -59
  103. package/dist-es/list.css-mistica.js +2 -2
  104. package/dist-es/loading-bar.css-mistica.js +2 -2
  105. package/dist-es/maybe-dismissable.css-mistica.js +2 -2
  106. package/dist-es/menu.css-mistica.js +2 -2
  107. package/dist-es/navigation-bar.css-mistica.js +9 -9
  108. package/dist-es/navigation-breadcrumbs.css-mistica.js +2 -2
  109. package/dist-es/package-version.js +1 -1
  110. package/dist-es/password-field.css-mistica.js +2 -2
  111. package/dist-es/popover.css-mistica.js +2 -2
  112. package/dist-es/progress-bar.css-mistica.js +2 -2
  113. package/dist-es/radio-button.css-mistica.js +4 -4
  114. package/dist-es/responsive-layout.css-mistica.js +2 -2
  115. package/dist-es/screen-reader-only.css-mistica.js +1 -1
  116. package/dist-es/select.css-mistica.js +10 -10
  117. package/dist-es/select.js +84 -84
  118. package/dist-es/skeleton-base.js +12 -12
  119. package/dist-es/skeletons.css-mistica.js +2 -2
  120. package/dist-es/skeletons.js +38 -37
  121. package/dist-es/skins/blau.js +19 -9
  122. package/dist-es/skins/movistar.js +19 -9
  123. package/dist-es/skins/o2-classic.js +17 -7
  124. package/dist-es/skins/o2.js +17 -7
  125. package/dist-es/skins/skin-contract.css-mistica.js +133 -123
  126. package/dist-es/skins/telefonica.js +20 -10
  127. package/dist-es/skins/vivo.js +19 -9
  128. package/dist-es/snackbar.css-mistica.js +2 -2
  129. package/dist-es/spinner.css-mistica.js +1 -1
  130. package/dist-es/sprinkles.css-mistica.js +336 -306
  131. package/dist-es/stepper.css-mistica.js +2 -2
  132. package/dist-es/style.css +1 -1
  133. package/dist-es/switch-component.css-mistica.js +19 -19
  134. package/dist-es/tabs.css-mistica.js +10 -10
  135. package/dist-es/tag.css-mistica.js +2 -2
  136. package/dist-es/tag.js +36 -31
  137. package/dist-es/text-field-base.css-mistica.js +2 -2
  138. package/dist-es/text-field-components.css-mistica.js +2 -2
  139. package/dist-es/text-link.css-mistica.js +3 -3
  140. package/dist-es/text.js +5 -5
  141. package/dist-es/theme-context-provider.js +10 -9
  142. package/dist-es/tooltip.css-mistica.js +3 -3
  143. package/dist-es/touchable.css-mistica.js +1 -1
  144. package/dist-es/utils/aspect-ratio-support.css-mistica.js +3 -3
  145. package/dist-es/utils/aspect-ratio-support.js +2 -3
  146. package/dist-es/video.css-mistica.js +2 -2
  147. package/package.json +1 -1
@@ -4,7 +4,7 @@ var t = {
4
4
  light: "cc7htn8 cc7htn7",
5
5
  dark: "cc7htn9 cc7htn7"
6
6
  }, v = {
7
- default: "cc7htn1 _1y2v1nf57 _1y2v1nf5f _1y2v1nf5l _1y2v1nf93 _1y2v1nf2k _1y2v1nf1m",
8
- active: "cc7htn6 cc7htn2 cc7htn1 _1y2v1nf57 _1y2v1nf5f _1y2v1nf5l _1y2v1nf93 _1y2v1nfy _1y2v1nf4t"
9
- }, f = "cc7htna", a = "cc7htnb";
10
- export { t as chipInteractiveVariants, v as chipVariants, f as icon, a as iconActive };
7
+ default: "cc7htn1 _1y2v1nf5h _1y2v1nf5p _1y2v1nf5v _1y2v1nf9d _1y2v1nf2p _1y2v1nf1n",
8
+ active: "cc7htn6 cc7htn2 cc7htn1 _1y2v1nf5h _1y2v1nf5p _1y2v1nf5v _1y2v1nf9d _1y2v1nfy _1y2v1nf4z"
9
+ }, h = "cc7htna", a = "cc7htnb";
10
+ export { t as chipInteractiveVariants, v as chipVariants, h as icon, a as iconActive };
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./circle.css.ts.vanilla.js";
3
- var p = "_1wpwyyp1 _1y2v1nf56 _1y2v1nf5l _1y2v1nf5f _1y2v1nf95";
4
- export { p as circle };
3
+ var y = "_1wpwyyp1 _1y2v1nf5g _1y2v1nf5v _1y2v1nf5p _1y2v1nf9f";
4
+ export { y as circle };
@@ -1,7 +1,7 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./credit-card-number-field.css.ts.vanilla.js";
3
- var a = "yvyo3q0", o = "yvyo3q2", r = "_1y2v1nf52", f = {
4
- default: "yvyo3q4 _1y2v1nf51 yvyo3q5",
5
- backface: "yvyo3q4 _1y2v1nf51 yvyo3q6"
3
+ var a = "yvyo3q0", o = "yvyo3q2", r = "_1y2v1nf5c", f = {
4
+ default: "yvyo3q4 _1y2v1nf5b yvyo3q5",
5
+ backface: "yvyo3q4 _1y2v1nf5b yvyo3q6"
6
6
  };
7
7
  export { a as flip, o as flipBack, r as flipFront, f as variants };
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./cvv-field.css.ts.vanilla.js";
3
- var v = "_10ijton2 _1y2v1nf1m", n = "_1y2v1nf56 _1y2v1nf5l";
4
- export { v as cvvText, n as tooltipContainer };
3
+ var n = "_10ijton2 _1y2v1nf1n", o = "_1y2v1nf5g _1y2v1nf5v";
4
+ export { n as cvvText, o as tooltipContainer };
@@ -1,7 +1,7 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./dialog.css.ts.vanilla.js";
3
- var _ = "_3dl29lb", y = "_3dl29l6", f = "_3dl29ll _1y2v1nf5z", l = "_3dl29lj _1y2v1nf5s _1y2v1nf8n", a = "_3dl29lm", d = "_3dl29l8 _1y2v1nf5y _1y2v1nf6c _1y2v1nf6q _1y2v1nf74 _1y2v1nf52 _1y2v1nf9e _1y2v1nfa6", r = "_3dl29la _1y2v1nf2j _1y2v1nf98", o = "_3dl29l5 _1y2v1nf53 _1y2v1nf56 _1y2v1nf5f _1y2v1nf5l _1y2v1nf5c _1y2v1nf9e _1y2v1nfa6 _1y2v1nfak _1y2v1nf9s _1y2v1nf2m", t = {
4
- dialog: "_3dl29ld _1y2v1nf56 _1y2v1nf5c _1y2v1nf5i _1y2v1nf6r _1y2v1nf75 _1y2v1nf61 _1y2v1nf6d",
5
- default: "_3dl29ld _1y2v1nf56 _1y2v1nf5c _1y2v1nf5i _1y2v1nf5z _1y2v1nf6d _1y2v1nf6r _1y2v1nf75"
6
- }, e = "_3dl29l3 _1y2v1nf51";
7
- export { _ as closedModalContent, y as closedOpactityLayer, f as dialogActions, l as dialogContent, a as iconContainer, d as modalCloseButtonContainer, r as modalContent, o as modalOpacityLayer, t as variants, e as wrapper };
3
+ var _ = "_3dl29lb", y = "_3dl29l6", f = "_3dl29ll _1y2v1nf69", l = "_3dl29lj _1y2v1nf62 _1y2v1nf8x", a = "_3dl29lm", d = "_3dl29l8 _1y2v1nf68 _1y2v1nf6m _1y2v1nf70 _1y2v1nf7e _1y2v1nf5c _1y2v1nf9o _1y2v1nfag", o = "_3dl29la _1y2v1nf2o _1y2v1nf9i", r = "_3dl29l5 _1y2v1nf5d _1y2v1nf5g _1y2v1nf5p _1y2v1nf5v _1y2v1nf5m _1y2v1nf9o _1y2v1nfag _1y2v1nfau _1y2v1nfa2 _1y2v1nf2r", t = {
4
+ dialog: "_3dl29ld _1y2v1nf5g _1y2v1nf5m _1y2v1nf5s _1y2v1nf71 _1y2v1nf7f _1y2v1nf6b _1y2v1nf6n",
5
+ default: "_3dl29ld _1y2v1nf5g _1y2v1nf5m _1y2v1nf5s _1y2v1nf69 _1y2v1nf6n _1y2v1nf71 _1y2v1nf7f"
6
+ }, e = "_3dl29l3 _1y2v1nf5b";
7
+ export { _ as closedModalContent, y as closedOpactityLayer, f as dialogActions, l as dialogContent, a as iconContainer, d as modalCloseButtonContainer, o as modalContent, r as modalOpacityLayer, t as variants, e as wrapper };
@@ -1,8 +1,8 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./text-field-components.css.ts.vanilla.js";
3
3
  import "./double-field.css.ts.vanilla.js";
4
- var n = {
5
- default: "skrulh1 _1y2v1nf56 _1y2v1nf5b _1y2v1nf7d",
6
- fullWidth: "skrulh2 _1y2v1nf56 _1y2v1nf5b _1y2v1nf7d"
4
+ var v = {
5
+ default: "skrulh1 _1y2v1nf5g _1y2v1nf5l _1y2v1nf7n",
6
+ fullWidth: "skrulh2 _1y2v1nf5g _1y2v1nf5l _1y2v1nf7n"
7
7
  };
8
- export { n as variants };
8
+ export { v as variants };
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./empty-state-card.css.ts.vanilla.js";
3
- var a = "_1azor6p0", n = "_1azor6p4 _1y2v1nf7o _1y2v1nf83", v = "_1azor6p2 _1y2v1nf58 _1y2v1nf85";
4
- export { a as container, n as iconContainer, v as image };
3
+ var n = "_1azor6p0", o = "_1azor6p4 _1y2v1nf7y _1y2v1nf8d", i = "_1azor6p2 _1y2v1nf5i _1y2v1nf8f";
4
+ export { n as container, o as iconContainer, i as image };
@@ -1,9 +1,9 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./empty-state.css.ts.vanilla.js";
3
- var n = "_13fzrua2 _1y2v1nf56 _1y2v1nf50", v = {
3
+ var n = "_13fzrua2 _1y2v1nf5g _1y2v1nf5a", f = {
4
4
  default: "_13fzrua3",
5
5
  largeImage: "_13fzrua4"
6
- }, e = "_13fzrua9 _1y2v1nf7q _1y2v1nf85", f = "_13fzruac", _ = "_13fzrua7 _1y2v1nf7t", o = "_13fzrua5", t = "_13fzruab _1y2v1nf58", u = {
6
+ }, v = "_13fzrua9 _1y2v1nf80 _1y2v1nf8f", e = "_13fzruac", _ = "_13fzrua7 _1y2v1nf83", o = "_13fzrua5", u = "_13fzruab _1y2v1nf5i", t = {
7
7
  backgroundColor: "var(--_13fzrua0)"
8
8
  };
9
- export { n as container, v as contentVariants, e as iconContainer, f as inverseBorder, _ as largeImage, o as largeImageContainer, t as smallImage, u as vars };
9
+ export { n as container, f as contentVariants, v as iconContainer, e as inverseBorder, _ as largeImage, o as largeImageContainer, u as smallImage, t as vars };
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./feedback.css.ts.vanilla.js";
3
- var n = "gx6h6a3 _1y2v1nf56 _1y2v1nf7t _1y2v1nf7d", r = "_1y2v1nf99 _1y2v1nf56 _1y2v1nf5i", t = "gx6h6a1", v = "gx6h6a7", f = "gx6h6a5", o = "gx6h6a6", p = "gx6h6a4";
3
+ var n = "gx6h6a3 _1y2v1nf5g _1y2v1nf83 _1y2v1nf7n", r = "_1y2v1nf9j _1y2v1nf5g _1y2v1nf5s", t = "gx6h6a1", v = "gx6h6a7", f = "gx6h6a5", o = "gx6h6a6", p = "gx6h6a4";
4
4
  export { n as container, r as desktopContainer, t as desktopContent, v as feedbackData, f as feedbackDataAppear, o as feedbackDataAppearActive, p as innerContainer };
@@ -1,7 +1,7 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./fixed-footer-layout.css.ts.vanilla.js";
3
- var v = "p5j8j58", j = "p5j8j56 _1y2v1nf2k", a = "p5j8j54", t = "p5j8j53 _1y2v1nf7d _1y2v1nf2j", e = {
3
+ var v = "p5j8j58", a = "p5j8j56 _1y2v1nf2p", j = "p5j8j54", t = "p5j8j53 _1y2v1nf7n _1y2v1nf2o", e = {
4
4
  footerHeight: "var(--p5j8j50)",
5
5
  backgroundColor: "var(--p5j8j51)"
6
- }, p = "_1y2v1nf55";
7
- export { v as container, j as elevated, a as fixedFooter, t as footer, e as vars, p as withoutFooter };
6
+ }, p = "_1y2v1nf5f";
7
+ export { v as container, a as elevated, j as fixedFooter, t as footer, e as vars, p as withoutFooter };
package/dist-es/header.js CHANGED
@@ -77,171 +77,172 @@ function _objectWithoutPropertiesLoose(source, excluded) {
77
77
  }
78
78
  return target;
79
79
  }
80
- import a from "./box.js";
81
- import n from "./stack.js";
82
- import { useIsInverseVariant as I } from "./theme-variant-context.js";
83
- import y from "./responsive-layout.js";
84
- import f from "./grid-layout.js";
85
- import { useScreenSize as m } from "./hooks.js";
86
- import S from "./overscroll-color-context.js";
87
- import { Text6 as v, Text8 as P, Text7 as R, Text3 as T } from "./text.js";
88
- import j from "./button-group.js";
89
- import { vars as s } from "./skins/skin-contract.css-mistica.js";
90
- import { jsxs as t, jsx as r } from "./_virtual/jsx-runtime.js";
91
- const F = (param)=>{
92
- let { pretitle: i , title: e , preamount: o , amount: l , button: c , subtitle: d , isErrorAmount: h , secondaryButton: u , dataAttributes: B } = param;
93
- const { isTabletOrSmaller: H } = m(), L = I(), g = (p, x)=>{
94
- if (typeof p == "string") return /* @__PURE__ */ r(T, _objectSpreadProps(_objectSpread({
80
+ import d from "./box.js";
81
+ import l from "./stack.js";
82
+ import { useIsInverseVariant as P } from "./theme-variant-context.js";
83
+ import S from "./responsive-layout.js";
84
+ import T from "./grid-layout.js";
85
+ import { useScreenSize as h } from "./hooks.js";
86
+ import v from "./overscroll-color-context.js";
87
+ import { Text6 as B, Text3 as u, Text8 as R, Text7 as j } from "./text.js";
88
+ import G from "./button-group.js";
89
+ import { vars as p } from "./skins/skin-contract.css-mistica.js";
90
+ import { jsxs as o, jsx as r } from "./_virtual/jsx-runtime.js";
91
+ const J = (param)=>{
92
+ let { pretitle: i , title: e , description: t , dataAttributes: n , preamount: a , amount: s , button: c , subtitle: g , isErrorAmount: H , secondaryButton: x } = param;
93
+ const { isTabletOrSmaller: L } = h(), O = P(), f = (m, y)=>{
94
+ if (typeof m == "string") return /* @__PURE__ */ r(u, _objectSpreadProps(_objectSpread({
95
95
  regular: !0
96
- }, x), {
97
- children: p
96
+ }, y), {
97
+ children: m
98
98
  }));
99
- const { text: G } = p, O = _objectWithoutProperties(p, [
99
+ const { text: M } = m, I = _objectWithoutProperties(m, [
100
100
  "text"
101
101
  ]);
102
- return /* @__PURE__ */ r(T, _objectSpreadProps(_objectSpread({
102
+ return /* @__PURE__ */ r(u, _objectSpreadProps(_objectSpread({
103
103
  regular: !0
104
- }, x, O), {
105
- children: p.text
104
+ }, y, I), {
105
+ children: m.text
106
106
  }));
107
107
  };
108
- return /* @__PURE__ */ t(n, {
109
- space: H ? 24 : 32,
110
- dataAttributes: B,
108
+ return /* @__PURE__ */ o(l, {
109
+ space: L ? 24 : 32,
110
+ dataAttributes: n,
111
111
  children: [
112
- (e || i) && /* @__PURE__ */ r(a, {
112
+ (e || i || t) && /* @__PURE__ */ r(d, {
113
113
  paddingRight: 16,
114
- children: /* @__PURE__ */ t(n, {
114
+ children: /* @__PURE__ */ o(l, {
115
115
  space: 8,
116
116
  children: [
117
- i && g(i, {
118
- color: s.colors.textPrimary
117
+ i && f(i, {
118
+ color: p.colors.textPrimary
119
119
  }),
120
- /* @__PURE__ */ r(v, {
120
+ /* @__PURE__ */ r(B, {
121
121
  role: "heading",
122
122
  "aria-level": 2,
123
123
  children: e
124
+ }),
125
+ t && /* @__PURE__ */ r(u, {
126
+ regular: !0,
127
+ color: p.colors.textSecondary,
128
+ children: t
124
129
  })
125
130
  ]
126
131
  })
127
132
  }),
128
- (o || l || c || d) && /* @__PURE__ */ t(n, {
133
+ (a || s || c || g) && /* @__PURE__ */ o(l, {
129
134
  space: 16,
130
135
  children: [
131
- (o || l) && /* @__PURE__ */ t(n, {
136
+ (a || s) && /* @__PURE__ */ o(l, {
132
137
  space: 8,
133
138
  children: [
134
- o && g(o, {
135
- color: s.colors.textPrimary
139
+ a && f(a, {
140
+ color: p.colors.textPrimary
136
141
  }),
137
- /* @__PURE__ */ r(P, {
138
- color: h && !L ? s.colors.highlight : s.colors.textPrimary,
139
- children: l
142
+ /* @__PURE__ */ r(R, {
143
+ color: H && !O ? p.colors.highlight : p.colors.textPrimary,
144
+ children: s
140
145
  })
141
146
  ]
142
147
  }),
143
- (c || u) && /* @__PURE__ */ r(j, {
148
+ (c || x) && /* @__PURE__ */ r(G, {
144
149
  primaryButton: c,
145
- secondaryButton: u
150
+ secondaryButton: x
146
151
  }),
147
- d && g(d, {})
152
+ g && f(g, {})
148
153
  ]
149
154
  })
150
155
  ]
151
156
  });
152
- }, J = (param)=>{
153
- let { title: i , description: e , button: o } = param;
154
- const { isTabletOrSmaller: l } = m();
155
- return /* @__PURE__ */ t(n, {
157
+ }, K = (param)=>{
158
+ let { title: i , description: e , button: t } = param;
159
+ const { isTabletOrSmaller: n } = h();
160
+ return /* @__PURE__ */ o(l, {
156
161
  space: 32,
157
162
  children: [
158
- /* @__PURE__ */ t(n, {
159
- space: l ? 12 : 16,
163
+ /* @__PURE__ */ o(l, {
164
+ space: n ? 12 : 16,
160
165
  children: [
161
- i && /* @__PURE__ */ r(R, {
166
+ i && /* @__PURE__ */ r(j, {
162
167
  role: "heading",
163
168
  "aria-level": 1,
164
169
  children: i
165
170
  }),
166
- e && /* @__PURE__ */ r(v, {
171
+ e && /* @__PURE__ */ r(B, {
167
172
  children: e
168
173
  })
169
174
  ]
170
175
  }),
171
- o
176
+ t
172
177
  ]
173
178
  });
174
- }, K = (param)=>{
175
- let { isInverse: i = !0 , breadcrumbs: e , header: o , extra: l , sideBySideExtraOnDesktop: c = !1 , dataAttributes: d } = param;
176
- const { isTabletOrSmaller: h } = m();
177
- return /* @__PURE__ */ t(y, {
179
+ }, N = (param)=>{
180
+ let { isInverse: i = !0 , breadcrumbs: e , header: t , extra: n , sideBySideExtraOnDesktop: a = !1 , dataAttributes: s } = param;
181
+ const { isTabletOrSmaller: c } = h();
182
+ return /* @__PURE__ */ o(S, {
178
183
  isInverse: i,
179
184
  dataAttributes: _objectSpread({
180
185
  "component-name": "HeaderLayout"
181
- }, d),
186
+ }, s),
182
187
  children: [
183
- /* @__PURE__ */ r(S, {}),
184
- h ? /* @__PURE__ */ r(a, {
188
+ /* @__PURE__ */ r(v, {}),
189
+ c ? /* @__PURE__ */ r(d, {
185
190
  paddingTop: 32,
186
191
  paddingBottom: 24,
187
- children: /* @__PURE__ */ t(n, {
192
+ children: /* @__PURE__ */ o(l, {
188
193
  space: 24,
189
194
  children: [
190
- o,
191
- l
195
+ t,
196
+ n
192
197
  ]
193
198
  })
194
- }) : c ? /* @__PURE__ */ r(a, {
199
+ }) : a ? /* @__PURE__ */ r(d, {
195
200
  paddingTop: e ? 16 : 48,
196
201
  paddingBottom: 48,
197
- children: /* @__PURE__ */ r(f, {
202
+ children: /* @__PURE__ */ r(T, {
198
203
  template: "6+6",
199
- left: /* @__PURE__ */ t(n, {
204
+ left: /* @__PURE__ */ o(l, {
200
205
  space: 32,
201
206
  children: [
202
207
  e,
203
- o
208
+ t
204
209
  ]
205
210
  }),
206
- right: l
211
+ right: n
207
212
  })
208
- }) : /* @__PURE__ */ r(a, {
213
+ }) : /* @__PURE__ */ r(d, {
209
214
  paddingTop: e ? 16 : 48,
210
215
  paddingBottom: 48,
211
- children: /* @__PURE__ */ r(f, {
212
- template: "6+6",
213
- left: /* @__PURE__ */ t(n, {
214
- space: 24,
215
- children: [
216
- /* @__PURE__ */ t(n, {
217
- space: 32,
218
- children: [
219
- e,
220
- o
221
- ]
222
- }),
223
- l
224
- ]
225
- }),
226
- right: null
216
+ children: /* @__PURE__ */ o(l, {
217
+ space: c ? 24 : 32,
218
+ children: [
219
+ /* @__PURE__ */ o(l, {
220
+ space: 32,
221
+ children: [
222
+ e,
223
+ t
224
+ ]
225
+ }),
226
+ n
227
+ ]
227
228
  })
228
229
  })
229
230
  ]
230
231
  });
231
- }, N = (param)=>{
232
+ }, Q = (param)=>{
232
233
  let { isInverse: i = !0 , children: e } = param;
233
- const { isTabletOrSmaller: o } = m();
234
- return /* @__PURE__ */ t(y, {
234
+ const { isTabletOrSmaller: t } = h();
235
+ return /* @__PURE__ */ o(S, {
235
236
  isInverse: i,
236
237
  children: [
237
- /* @__PURE__ */ r(S, {}),
238
- o ? /* @__PURE__ */ r(a, {
238
+ /* @__PURE__ */ r(v, {}),
239
+ t ? /* @__PURE__ */ r(d, {
239
240
  paddingTop: 12,
240
241
  paddingBottom: 24,
241
242
  children: e
242
- }) : /* @__PURE__ */ r(f, {
243
+ }) : /* @__PURE__ */ r(T, {
243
244
  template: "6+6",
244
- left: /* @__PURE__ */ r(a, {
245
+ left: /* @__PURE__ */ r(d, {
245
246
  paddingY: 48,
246
247
  children: e
247
248
  }),
@@ -250,4 +251,4 @@ const F = (param)=>{
250
251
  ]
251
252
  });
252
253
  };
253
- export { F as Header, K as HeaderLayout, J as MainSectionHeader, N as MainSectionHeaderLayout };
254
+ export { J as Header, N as HeaderLayout, K as MainSectionHeader, Q as MainSectionHeaderLayout };
@@ -1,7 +1,7 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./highlighted-card.css.ts.vanilla.js";
3
- var f = "wrb8722 _1y2v1nf56 _1y2v1nf5b _1y2v1nf5i _1y2v1nf5o", y = "wrb8725 _1y2v1nf56", _ = {
4
- withImage: "wrb8728 wrb8727 _1y2v1nf56 _1y2v1nf5c _1y2v1nf5k _1y2v1nf5z _1y2v1nf6d _1y2v1nf6q",
5
- withoutImage: "wrb8729 wrb8727 _1y2v1nf56 _1y2v1nf5c _1y2v1nf5k _1y2v1nf5z _1y2v1nf6d _1y2v1nf6q"
6
- }, r = "_1y2v1nf5t _1y2v1nf67 _1y2v1nf6l _1y2v1nf6z _1y2v1nf56 _1y2v1nf5o _1y2v1nf94 _1y2v1nf7d _1y2v1nf50";
7
- export { f as container, y as imageContent, _ as textContainerVariant, r as touchableContainer };
3
+ var y = "wrb8722 _1y2v1nf5g _1y2v1nf5l _1y2v1nf5s _1y2v1nf5y", f = "wrb8725 _1y2v1nf5g", _ = {
4
+ withImage: "wrb8728 wrb8727 _1y2v1nf5g _1y2v1nf5m _1y2v1nf5u _1y2v1nf69 _1y2v1nf6n _1y2v1nf70",
5
+ withoutImage: "wrb8729 wrb8727 _1y2v1nf5g _1y2v1nf5m _1y2v1nf5u _1y2v1nf69 _1y2v1nf6n _1y2v1nf70"
6
+ }, r = "_1y2v1nf63 _1y2v1nf6h _1y2v1nf6v _1y2v1nf79 _1y2v1nf5g _1y2v1nf5y _1y2v1nf9e _1y2v1nf7n _1y2v1nf5a";
7
+ export { y as container, f as imageContent, _ as textContainerVariant, r as touchableContainer };
package/dist-es/hooks.js CHANGED
@@ -1,24 +1,24 @@
1
1
  import * as n from "react";
2
- import f from "./theme-context.js";
2
+ import a from "./theme-context.js";
3
3
  import m from "./screen-size-context.js";
4
- import y from "./aria-id-getter-context.js";
5
- import { listenResize as g } from "./utils/dom.js";
6
- const H = ()=>{
7
- const t = n.useContext(f);
4
+ import g from "./aria-id-getter-context.js";
5
+ import { listenResize as y } from "./utils/dom.js";
6
+ const S = ()=>{
7
+ const t = n.useContext(a);
8
8
  if (!t) throw Error("To use @telefonica/mistica components you must instantiate <ThemeContextProvider> as their parent.");
9
9
  return t;
10
- }, T = (t)=>{
10
+ }, I = (t)=>{
11
11
  n.useEffect(()=>{
12
12
  if (t) {
13
- let i = "", e = 0, s = 0;
13
+ let i = "", e = 0, o = 0;
14
14
  const r = document.scrollingElement || document.documentElement, c = ()=>{
15
- var u, o, h, w;
16
- if (s++, !(s > 1) && (e = (u = r == null ? void 0 : r.scrollTop) != null ? u : 0, i = (h = (o = document.body) == null ? void 0 : o.style.cssText) != null ? h : "", document.body)) {
17
- const a = window.innerWidth > ((w = r == null ? void 0 : r.clientWidth) != null ? w : window.innerWidth) ? "scroll" : "hidden";
18
- document.body.style.cssText = `overflow:hidden;overflow-y:${a};position:fixed;top:${-e}px;left:0px;right:0px;bottom:0px`;
15
+ var u, s, h, w;
16
+ if (o++, !(o > 1) && (e = (u = r == null ? void 0 : r.scrollTop) != null ? u : 0, i = (h = (s = document.body) == null ? void 0 : s.style.cssText) != null ? h : "", document.body)) {
17
+ const f = window.innerWidth > ((w = r == null ? void 0 : r.clientWidth) != null ? w : window.innerWidth) ? "scroll" : "hidden";
18
+ document.body.style.cssText = `overflow:hidden;overflow-y:${f};position:fixed;top:${-e}px;left:0px;right:0px;bottom:0px`;
19
19
  }
20
20
  }, d = ()=>{
21
- s--, !(s > 0) && (document.body && (document.body.style.cssText = i), r && (r.scrollTop = e));
21
+ o--, !(o > 0) && (document.body && (document.body.style.cssText = i), r && (r.scrollTop = e));
22
22
  };
23
23
  return c(), d;
24
24
  }
@@ -26,23 +26,23 @@ const H = ()=>{
26
26
  }, [
27
27
  t
28
28
  ]);
29
- }, z = ()=>n.useContext(m), C = ()=>{
30
- const [t, i] = n.useState(0), [e, s] = n.useState(0), [r, c] = n.useState(null), d = n.useCallback((o)=>{
31
- if (!o) {
32
- i(0), s(0);
29
+ }, H = ()=>n.useContext(m), T = ()=>{
30
+ const [t, i] = n.useState(0), [e, o] = n.useState(0), [r, c] = n.useState(null), d = n.useCallback((s)=>{
31
+ if (!s) {
32
+ i(0), o(0);
33
33
  return;
34
34
  }
35
- const { width: h , height: w } = o[0].contentRect;
36
- i(h), s(w);
37
- }, []), u = n.useCallback((o)=>{
38
- c(o);
35
+ const { width: h , height: w } = s[0].contentRect;
36
+ i(h), o(w);
37
+ }, []), u = n.useCallback((s)=>{
38
+ c(s);
39
39
  }, []);
40
40
  return n.useEffect(()=>{
41
41
  if (!r) {
42
- i(0), s(0);
42
+ i(0), o(0);
43
43
  return;
44
44
  }
45
- return g(r, d);
45
+ return y(r, d);
46
46
  }, [
47
47
  r,
48
48
  d
@@ -51,20 +51,23 @@ const H = ()=>{
51
51
  height: e,
52
52
  ref: u
53
53
  };
54
- }, S = (t)=>{
55
- const i = n.useId();
56
- return t || i;
57
- }, b = n.useId !== void 0, R = b ? S : (t)=>{
58
- const i = n.useContext(y);
59
- return n.useRef(t || i()).current;
54
+ }, z = (t)=>{
55
+ const { useId: i } = S();
56
+ if (i) {
57
+ const e = i();
58
+ return t || e;
59
+ } else {
60
+ const e1 = n.useContext(g);
61
+ return n.useRef(t || e1()).current;
62
+ }
60
63
  }, l = ()=>{
61
- const [t, i] = n.useState(typeof window < "u" ? window.innerHeight : 1200), [e, s] = n.useState(typeof window < "u" ? window.innerWidth : 800), [r, c] = n.useState(typeof window < "u" ? window.screen.availHeight : 1200), [d, u] = n.useState(typeof window < "u" ? window.screen.availWidth : 800);
64
+ const [t, i] = n.useState(typeof window < "u" ? window.innerHeight : 1200), [e, o] = n.useState(typeof window < "u" ? window.innerWidth : 800), [r, c] = n.useState(typeof window < "u" ? window.screen.availHeight : 1200), [d, u] = n.useState(typeof window < "u" ? window.screen.availWidth : 800);
62
65
  return n.useEffect(()=>{
63
- const o = ()=>{
64
- i(window.innerHeight), s(window.innerWidth), c(window.screen.availHeight), u(window.screen.availWidth);
66
+ const s = ()=>{
67
+ i(window.innerHeight), o(window.innerWidth), c(window.screen.availHeight), u(window.screen.availWidth);
65
68
  };
66
- return window.addEventListener("resize", o), ()=>{
67
- window.removeEventListener("resize", o);
69
+ return window.addEventListener("resize", s), ()=>{
70
+ window.removeEventListener("resize", s);
68
71
  };
69
72
  }, []), n.useMemo(()=>({
70
73
  height: t,
@@ -77,17 +80,17 @@ const H = ()=>{
77
80
  r,
78
81
  d
79
82
  ]);
80
- }, A = ()=>{
83
+ }, C = ()=>{
81
84
  const { height: t } = l();
82
85
  return t;
83
- }, B = ()=>{
86
+ }, R = ()=>{
84
87
  const { width: t } = l();
85
88
  return t;
86
- }, L = ()=>{
89
+ }, B = ()=>{
87
90
  const { screenHeight: t } = l();
88
91
  return t;
89
- }, M = typeof window < "u" ? n.useLayoutEffect : n.useEffect, D = (t, i, e)=>{
90
- const [s, r] = n.useState(i);
92
+ }, L = typeof window < "u" ? n.useLayoutEffect : n.useEffect, M = (t, i, e)=>{
93
+ const [o, r] = n.useState(i);
91
94
  return n.useEffect(()=>{
92
95
  if (!t.current) return;
93
96
  if (typeof window.IntersectionObserver > "u") return ()=>{};
@@ -106,6 +109,6 @@ const H = ()=>{
106
109
  e == null ? void 0 : e.root,
107
110
  e == null ? void 0 : e.rootMargin,
108
111
  e == null ? void 0 : e.threshold
109
- ]), s;
112
+ ]), o;
110
113
  };
111
- export { R as useAriaId, T as useDisableBodyScroll, C as useElementDimensions, D as useIsInViewport, M as useIsomorphicLayoutEffect, L as useScreenHeight, z as useScreenSize, H as useTheme, A as useWindowHeight, l as useWindowSize, B as useWindowWidth };
114
+ export { z as useAriaId, I as useDisableBodyScroll, T as useElementDimensions, M as useIsInViewport, L as useIsomorphicLayoutEffect, B as useScreenHeight, H as useScreenSize, S as useTheme, C as useWindowHeight, l as useWindowSize, R as useWindowWidth };
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./icon-button.css.ts.vanilla.js";
3
- var t = "yqt1oe1 _1y2v1nf5a";
3
+ var t = "yqt1oe1 _1y2v1nf5k";
4
4
  export { t as base };
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./image.css.ts.vanilla.js";
3
- var y = 300, f = "_17tt25r1 _1y2v1nf9e _1y2v1nf9s _1y2v1nf58 _1y2v1nf7d _1y2v1nf7t _1y2v1nfay _1y2v1nf91 _1y2v1nf92";
4
- export { y as FADE_IN_DURATION_MS, f as image };
3
+ var n = 300, f = "_17tt25r1 _1y2v1nf9o _1y2v1nfa2 _1y2v1nf5i _1y2v1nf7n _1y2v1nf83 _1y2v1nfb8 _1y2v1nf9b _1y2v1nf9c";
4
+ export { n as FADE_IN_DURATION_MS, f as image };