@telefonica/mistica 14.3.0 → 14.4.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.
@@ -83,14 +83,14 @@ import R from "./generated/mistica-icons/icon-calendar-regular.js";
83
83
  import H from "react-datetime";
84
84
  import S from "./overlay.js";
85
85
  import { DEFAULT_WIDTH as I } from "./text-field-components.css-mistica.js";
86
- import g from "./icon-button.js";
86
+ import h from "./icon-button.js";
87
87
  import { cancelEvent as B, createChangeEvent as E } from "./utils/dom.js";
88
88
  import { useTheme as F, useElementDimensions as L } from "./hooks.js";
89
89
  import T from "./generated/mistica-icons/icon-close-regular.js";
90
90
  import { reactDatePicker as V } from "./date-time-picker.css-mistica.js";
91
91
  import { jsxs as Y, Fragment as j, jsx as r } from "./_virtual/jsx-runtime.js";
92
- const h = navigator.language.toLocaleLowerCase().split("-")[0];
93
- import(/* webpackChunkName: "moment-locale" */ `moment/locale/${h}`).finally(()=>{});
92
+ const g = navigator.language.toLocaleLowerCase().split("-")[0];
93
+ import(/* webpackChunkName: "moment-locale" */ `moment/locale/${g}`).finally(()=>{});
94
94
  const Q = (_param)=>{
95
95
  var { withTime: s , mode: l , isValidDate: y , optional: u } = _param, t = _objectWithoutProperties(_param, [
96
96
  "withTime",
@@ -98,15 +98,15 @@ const Q = (_param)=>{
98
98
  "isValidDate",
99
99
  "optional"
100
100
  ]);
101
- const [m, x] = d.useState(!1), { texts: b } = F(), n = d.useRef(null), { height: k , ref: v } = L(), a = (e)=>{
101
+ const [m, x] = d.useState(!1), { texts: b } = F(), n = d.useRef(null), { height: k , ref: v } = L(), i = (e)=>{
102
102
  t.disabled || x(e);
103
103
  }, w = ()=>{
104
104
  var p;
105
- const { top: e = 0 , bottom: o = 0 , left: i = 0 } = ((p = n.current) == null ? void 0 : p.getBoundingClientRect()) || {}, P = 260 + o < window.innerHeight;
105
+ const { top: e = 0 , bottom: o = 0 , left: a = 0 } = ((p = n.current) == null ? void 0 : p.getBoundingClientRect()) || {}, P = 260 + o < window.innerHeight;
106
106
  return {
107
107
  width: I,
108
108
  top: P ? o : e - k,
109
- left: i,
109
+ left: a,
110
110
  position: "absolute",
111
111
  borderRadius: 8,
112
112
  overflow: "hidden",
@@ -117,21 +117,21 @@ const Q = (_param)=>{
117
117
  const e = (o = n.current) == null ? void 0 : o.value;
118
118
  return e ? new Date(e) : void 0;
119
119
  }, C = (e)=>s ? e.format("yyyy-MM-DD HH:mm") : l === "year-month" ? e.format("yyyy-MM") : e.format("yyyy-MM-DD"), f = (e)=>{
120
- var i;
120
+ var a;
121
121
  const o = typeof e == "string" ? e : C(e);
122
- n.current && (n.current.focus(), (i = t.onChange) == null || i.call(t, E(n.current, o)));
123
- }, D = ()=>c() && u ? /* @__PURE__ */ r(g, {
122
+ n.current && (n.current.focus(), (a = t.onChange) == null || a.call(t, E(n.current, o)));
123
+ }, D = ()=>c() && u ? /* @__PURE__ */ r(h, {
124
124
  "aria-label": b.clearButton,
125
125
  size: 32,
126
- onPress: (e)=>{
127
- e.stopPropagation(), f("");
126
+ onPress: ()=>{
127
+ f("");
128
128
  },
129
129
  children: /* @__PURE__ */ r(T, {})
130
- }) : /* @__PURE__ */ r(g, {
130
+ }) : /* @__PURE__ */ r(h, {
131
131
  disabled: t.disabled,
132
132
  "aria-label": "",
133
133
  size: 32,
134
- onPress: ()=>a(!m),
134
+ onPress: ()=>i(!m),
135
135
  children: /* @__PURE__ */ r(R, {})
136
136
  });
137
137
  return /* @__PURE__ */ Y(j, {
@@ -150,14 +150,14 @@ const Q = (_param)=>{
150
150
  (o = t == null ? void 0 : t.inputRef) == null || o.call(t, e), n.current = e;
151
151
  },
152
152
  readOnly: !0,
153
- onKeyDown: ()=>a(!0),
153
+ onKeyDown: ()=>i(!0),
154
154
  onClick: ()=>{
155
- a(!0);
155
+ i(!0);
156
156
  }
157
157
  })),
158
158
  m && /* @__PURE__ */ r(S, {
159
159
  onPress: (e)=>{
160
- B(e), a(!1);
160
+ B(e), i(!1);
161
161
  },
162
162
  disableScroll: !0,
163
163
  children: /* @__PURE__ */ r("div", {
@@ -169,7 +169,7 @@ const Q = (_param)=>{
169
169
  dateFormat: l === "year-month" ? "YYYY-MM" : void 0,
170
170
  timeFormat: s ? "HH:mm" : !1,
171
171
  initialValue: c(),
172
- locale: h,
172
+ locale: g,
173
173
  input: !1,
174
174
  onChange: f,
175
175
  isValidDate: y
@@ -1,56 +1,60 @@
1
- import c from "./box.js";
2
- import { Boxed as S } from "./boxed.js";
3
- import { useScreenSize as u } from "./hooks.js";
4
- import p from "./stack.js";
5
- import { Text4 as N, Text2 as g } from "./text.js";
6
- import y from "./button-group.js";
7
- import { container as B, iconContainer as E, image as v } from "./empty-state-card.css-mistica.js";
8
- import { vars as C } from "./skins/skin-contract.css-mistica.js";
9
- import { jsx as r, jsxs as d } from "./_virtual/jsx-runtime.js";
10
- const Y = (param)=>{
11
- let { title: n , description: f , button: e , secondaryButton: o , buttonLink: i , icon: l , imageUrl: m , "aria-label": h , dataAttributes: x } = param;
12
- var s;
13
- const { isTabletOrSmaller: t } = u();
14
- let a;
15
- return m && (a = /* @__PURE__ */ r("img", {
1
+ import p from "./box.js";
2
+ import { Boxed as g } from "./boxed.js";
3
+ import { useScreenSize as u, useTheme as N } from "./hooks.js";
4
+ import c from "./stack.js";
5
+ import { Text as T, Text2 as y } from "./text.js";
6
+ import B from "./button-group.js";
7
+ import { container as E, iconContainer as k, image as v } from "./empty-state-card.css-mistica.js";
8
+ import { vars as z } from "./skins/skin-contract.css-mistica.js";
9
+ import { jsx as e, jsxs as d } from "./_virtual/jsx-runtime.js";
10
+ const V = (param)=>{
11
+ let { title: n , description: h , button: r , secondaryButton: o , buttonLink: t , icon: a , imageUrl: l , "aria-label": f , dataAttributes: x } = param;
12
+ var m;
13
+ const { isTabletOrSmaller: s } = u(), { textPresets: S } = N();
14
+ let i;
15
+ return l && (i = /* @__PURE__ */ e("img", {
16
16
  className: v,
17
17
  alt: "",
18
- src: m
19
- })), process.env.NODE_ENV !== "production" && e && !((s = e == null ? void 0 : e.props) != null && s.small) && console.error("button property in EmptyStateCard must be a a small Button. Set small prop to true"), /* @__PURE__ */ r(S, {
18
+ src: l
19
+ })), process.env.NODE_ENV !== "production" && r && !((m = r == null ? void 0 : r.props) != null && m.small) && console.error("button property in EmptyStateCard must be a a small Button. Set small prop to true"), /* @__PURE__ */ e(g, {
20
20
  dataAttributes: x,
21
- children: /* @__PURE__ */ r(c, {
22
- paddingY: t ? 24 : 40,
23
- paddingX: t ? 16 : 40,
24
- children: /* @__PURE__ */ r("section", {
25
- className: B,
26
- "aria-label": h,
27
- children: /* @__PURE__ */ d(p, {
21
+ children: /* @__PURE__ */ e(p, {
22
+ paddingY: s ? 24 : 40,
23
+ paddingX: s ? 16 : 40,
24
+ children: /* @__PURE__ */ e("section", {
25
+ className: E,
26
+ "aria-label": f,
27
+ children: /* @__PURE__ */ d(c, {
28
28
  space: 16,
29
29
  children: [
30
- a != null ? a : l && /* @__PURE__ */ r("div", {
31
- className: E,
32
- children: l
30
+ i != null ? i : a && /* @__PURE__ */ e("div", {
31
+ className: k,
32
+ children: a
33
33
  }),
34
- /* @__PURE__ */ r(c, {
35
- children: /* @__PURE__ */ d(p, {
34
+ /* @__PURE__ */ e(p, {
35
+ children: /* @__PURE__ */ d(c, {
36
36
  space: 8,
37
37
  children: [
38
- /* @__PURE__ */ r(N, {
39
- regular: !0,
38
+ /* @__PURE__ */ e(T, {
39
+ mobileSize: 18,
40
+ mobileLineHeight: "24px",
41
+ desktopSize: 20,
42
+ desktopLineHeight: "28px",
43
+ weight: S.cardTitle.weight,
40
44
  children: n
41
45
  }),
42
- /* @__PURE__ */ r(g, {
46
+ /* @__PURE__ */ e(y, {
43
47
  regular: !0,
44
- color: C.colors.textSecondary,
45
- children: f
48
+ color: z.colors.textSecondary,
49
+ children: h
46
50
  })
47
51
  ]
48
52
  })
49
53
  }),
50
- (e || o || i) && /* @__PURE__ */ r(y, {
51
- primaryButton: e,
54
+ (r || o || t) && /* @__PURE__ */ e(B, {
55
+ primaryButton: r,
52
56
  secondaryButton: o,
53
- link: i
57
+ link: t
54
58
  })
55
59
  ]
56
60
  })
@@ -58,4 +62,4 @@ const Y = (param)=>{
58
62
  })
59
63
  });
60
64
  };
61
- export { Y as default };
65
+ export { V as default };
@@ -78,48 +78,53 @@ function _objectWithoutPropertiesLoose(source, excluded) {
78
78
  return target;
79
79
  }
80
80
  import * as g from "react";
81
- import { useIsInverseVariant as b } from "./theme-variant-context.js";
82
- import v from "./box.js";
81
+ import { useIsInverseVariant as v } from "./theme-variant-context.js";
82
+ import w from "./box.js";
83
83
  import { BaseTouchable as c } from "./touchable.js";
84
- import { Text4 as w, Text2 as x } from "./text.js";
85
- import { Boxed as k } from "./boxed.js";
86
- import I, { useIsDismissable as C } from "./maybe-dismissable.js";
87
- import { container as E, textContainerVariant as N, imageContent as P, touchableContainer as s } from "./highlighted-card.css-mistica.js";
88
- import { vars as T } from "./skins/skin-contract.css-mistica.js";
89
- import { jsxs as d, jsx as t, Fragment as y } from "./_virtual/jsx-runtime.js";
90
- const R = /*#__PURE__*/ g.forwardRef((e, i)=>{
91
- var u;
92
- const { title: a , description: r , imageUrl: o , imageFit: l } = e, h = b(), f = (u = e.isInverse) != null ? u : h, m = C(), n = /* @__PURE__ */ d(k, {
84
+ import { Text as x, Text2 as k } from "./text.js";
85
+ import { Boxed as I } from "./boxed.js";
86
+ import C, { useIsDismissable as T } from "./maybe-dismissable.js";
87
+ import { container as P, textContainerVariant as E, imageContent as N, touchableContainer as s } from "./highlighted-card.css-mistica.js";
88
+ import { vars as H } from "./skins/skin-contract.css-mistica.js";
89
+ import { useTheme as y } from "./hooks.js";
90
+ import { jsxs as m, jsx as t, Fragment as R } from "./_virtual/jsx-runtime.js";
91
+ const S = /*#__PURE__*/ g.forwardRef((e, i)=>{
92
+ var h;
93
+ const { title: a , description: r , imageUrl: o , imageFit: l } = e, u = v(), f = (h = e.isInverse) != null ? h : u, d = T(), { textPresets: b } = y(), n = /* @__PURE__ */ m(I, {
93
94
  ref: i,
94
95
  isInverse: f,
95
- className: E,
96
+ className: P,
96
97
  dataAttributes: _objectSpread({
97
98
  "component-name": "HighlightedCard"
98
99
  }, e.dataAttributes),
99
100
  width: e.width ? `${e.width}px` : "100%",
100
101
  children: [
101
- /* @__PURE__ */ d("div", {
102
- role: m ? void 0 : "region",
103
- className: N[o ? "withImage" : "withoutImage"],
104
- "aria-label": m ? void 0 : e["aria-label"],
102
+ /* @__PURE__ */ m("div", {
103
+ role: d ? void 0 : "region",
104
+ className: E[o ? "withImage" : "withoutImage"],
105
+ "aria-label": d ? void 0 : e["aria-label"],
105
106
  children: [
106
- /* @__PURE__ */ t(w, {
107
- as: "h3",
108
- regular: !0,
107
+ /* @__PURE__ */ t(x, {
108
+ mobileSize: 18,
109
+ mobileLineHeight: "24px",
110
+ desktopSize: 20,
111
+ desktopLineHeight: "28px",
109
112
  truncate: e.titleLinesMax,
113
+ weight: b.cardTitle.weight,
114
+ as: "h3",
110
115
  children: a
111
116
  }),
112
- /* @__PURE__ */ t(v, {
117
+ /* @__PURE__ */ t(w, {
113
118
  paddingTop: 8,
114
- children: /* @__PURE__ */ t(x, {
119
+ children: /* @__PURE__ */ t(k, {
115
120
  regular: !0,
116
- color: T.colors.textSecondary,
121
+ color: H.colors.textSecondary,
117
122
  truncate: e.descriptionLinesMax,
118
123
  as: "p",
119
124
  children: r
120
125
  })
121
126
  }),
122
- e.button && /* @__PURE__ */ d(y, {
127
+ e.button && /* @__PURE__ */ m(R, {
123
128
  children: [
124
129
  /* @__PURE__ */ t("div", {
125
130
  style: {
@@ -133,7 +138,7 @@ const R = /*#__PURE__*/ g.forwardRef((e, i)=>{
133
138
  ]
134
139
  }),
135
140
  o && /* @__PURE__ */ t("div", {
136
- className: P,
141
+ className: N,
137
142
  style: {
138
143
  backgroundImage: `url(${o})`,
139
144
  backgroundRepeat: "no-repeat",
@@ -161,19 +166,19 @@ const R = /*#__PURE__*/ g.forwardRef((e, i)=>{
161
166
  className: s,
162
167
  children: n
163
168
  }) : n;
164
- }), F = /*#__PURE__*/ g.forwardRef((_param, a)=>{
169
+ }), W = /*#__PURE__*/ g.forwardRef((_param, a)=>{
165
170
  var { "aria-label": e } = _param, i = _objectWithoutProperties(_param, [
166
171
  "aria-label"
167
172
  ]);
168
173
  const r = e != null ? e : i.title;
169
- return /* @__PURE__ */ t(I, {
174
+ return /* @__PURE__ */ t(C, {
170
175
  onClose: i.onClose,
171
176
  "aria-label": r,
172
177
  width: i.width,
173
- children: /* @__PURE__ */ t(R, _objectSpreadProps(_objectSpread({}, i), {
178
+ children: /* @__PURE__ */ t(S, _objectSpreadProps(_objectSpread({}, i), {
174
179
  "aria-label": r,
175
180
  ref: a
176
181
  }))
177
182
  });
178
183
  });
179
- export { F as default };
184
+ export { W as default };
@@ -50,19 +50,19 @@ function _objectSpreadProps(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import * as i from "react";
53
+ import * as r from "react";
54
54
  import o from "classnames";
55
- import { BaseTouchable as r } from "./touchable.js";
56
- import { base as d } from "./icon-button.css-mistica.js";
57
- import { jsx as l } from "./_virtual/jsx-runtime.js";
58
- const s = 24, b = (e, a, t, n, c)=>{
55
+ import { BaseTouchable as c } from "./touchable.js";
56
+ import { base as s } from "./icon-button.css-mistica.js";
57
+ import { jsx as i } from "./_virtual/jsx-runtime.js";
58
+ const d = 24, b = (e, a, t, n, l)=>{
59
59
  const m = n ? `${n}px ${n}px` : "100% 100%";
60
60
  return {
61
61
  padding: 0,
62
62
  backgroundColor: t,
63
63
  backgroundImage: e ? `url(${e})` : "initial",
64
64
  backgroundSize: m,
65
- cursor: c ? "default" : "pointer",
65
+ cursor: l ? "default" : "pointer",
66
66
  height: a,
67
67
  width: a
68
68
  };
@@ -77,35 +77,37 @@ const s = 24, b = (e, a, t, n, c)=>{
77
77
  "component-name": "IconButton"
78
78
  }, e.dataAttributes)
79
79
  };
80
- return e.href ? /* @__PURE__ */ l(r, _objectSpreadProps(_objectSpread({}, n), {
80
+ return e.href ? /* @__PURE__ */ i(c, _objectSpreadProps(_objectSpread({}, n), {
81
81
  href: e.href,
82
82
  newTab: e.newTab,
83
83
  "aria-label": e["aria-label"],
84
- children: !a && i.Children.only(t)
85
- })) : e.to ? /* @__PURE__ */ l(r, _objectSpreadProps(_objectSpread({}, n), {
84
+ children: !a && r.Children.only(t)
85
+ })) : e.to ? /* @__PURE__ */ i(c, _objectSpreadProps(_objectSpread({}, n), {
86
86
  to: e.to,
87
87
  fullPageOnWebView: e.fullPageOnWebView,
88
88
  replace: e.replace,
89
89
  "aria-label": e["aria-label"],
90
- children: !a && i.Children.only(t)
91
- })) : e.onPress ? /* @__PURE__ */ l(r, _objectSpreadProps(_objectSpread({}, n), {
92
- onPress: e.onPress,
90
+ children: !a && r.Children.only(t)
91
+ })) : e.onPress ? /* @__PURE__ */ i(c, _objectSpreadProps(_objectSpread({}, n), {
92
+ onPress: (l)=>{
93
+ l.stopPropagation(), e.onPress(l);
94
+ },
93
95
  "aria-label": e["aria-label"],
94
- children: !a && i.Children.only(t)
95
- })) : /* @__PURE__ */ l(r, _objectSpreadProps(_objectSpread({}, n), {
96
+ children: !a && r.Children.only(t)
97
+ })) : /* @__PURE__ */ i(c, _objectSpreadProps(_objectSpread({}, n), {
96
98
  maybe: !0,
97
- children: !a && i.Children.only(t)
99
+ children: !a && r.Children.only(t)
98
100
  }));
99
101
  }, I = (e)=>{
100
- const { icon: a , backgroundColor: t = "transparent" , iconSize: n , size: c = s } = e;
101
- return /* @__PURE__ */ l(u, _objectSpreadProps(_objectSpread({}, e), {
102
- className: o(d, e.className),
103
- style: _objectSpread({}, b(a, c, t, n, e.disabled), e.style)
102
+ const { icon: a , backgroundColor: t = "transparent" , iconSize: n , size: l = d } = e;
103
+ return /* @__PURE__ */ i(u, _objectSpreadProps(_objectSpread({}, e), {
104
+ className: o(s, e.className),
105
+ style: _objectSpread({}, b(a, l, t, n, e.disabled), e.style)
104
106
  }));
105
107
  }, w = (e)=>{
106
- const { size: a = s , disabled: t } = e;
107
- return /* @__PURE__ */ l(u, _objectSpreadProps(_objectSpread({}, e), {
108
- className: o(d, e.className),
108
+ const { size: a = d , disabled: t } = e;
109
+ return /* @__PURE__ */ i(u, _objectSpreadProps(_objectSpread({}, e), {
110
+ className: o(s, e.className),
109
111
  style: {
110
112
  height: a,
111
113
  width: a,
@@ -1,9 +1,9 @@
1
1
  import "./inline.css.ts.vanilla.js";
2
2
  var v = "kkfbnv2 kkfbnv1", n = {
3
- between: "kkfbnv4",
4
- around: "kkfbnv5",
5
- evenly: "kkfbnv6"
6
- }, a = "kkfbnv3 kkfbnv1", f = {
3
+ between: "kkfbnv5",
4
+ around: "kkfbnv6",
5
+ evenly: "kkfbnv7"
6
+ }, a = "kkfbnv4 kkfbnv1", f = {
7
7
  space: "var(--kkfbnv0)"
8
- };
9
- export { v as fullWidth, n as justifyVariants, a as noFullWidth, f as vars };
8
+ }, r = "kkfbnv3 kkfbnv1";
9
+ export { v as fullWidth, n as justifyVariants, a as noFullWidth, f as vars, r as wrap };
package/dist-es/inline.js CHANGED
@@ -51,28 +51,28 @@ function _objectSpreadProps(target, source) {
51
51
  return target;
52
52
  }
53
53
  import * as d from "react";
54
- import p from "classnames";
55
- import { assignInlineVars as u } from "@vanilla-extract/dynamic";
56
- import { sprinkles as b } from "./sprinkles.css-mistica.js";
57
- import { getPrefixedDataAttributes as y } from "./utils/dom.js";
58
- import { fullWidth as h, noFullWidth as v, justifyVariants as x, vars as W } from "./inline.css-mistica.js";
54
+ import u from "classnames";
55
+ import { assignInlineVars as b } from "@vanilla-extract/dynamic";
56
+ import { sprinkles as y } from "./sprinkles.css-mistica.js";
57
+ import { getPrefixedDataAttributes as h } from "./utils/dom.js";
58
+ import { wrap as v, fullWidth as x, noFullWidth as W, justifyVariants as c, vars as g } from "./inline.css-mistica.js";
59
59
  import { jsx as i } from "./_virtual/jsx-runtime.js";
60
- const k = (param)=>{
61
- let { space: r , className: e , children: l , role: o , alignItems: s = "stretch" , "aria-labelledby": a , fullWidth: m , dataAttributes: n } = param;
62
- const f = m || typeof r == "string";
60
+ const A = (param)=>{
61
+ let { space: r , className: e , children: l , role: o , alignItems: a = "stretch" , "aria-labelledby": s , fullWidth: m , wrap: n , dataAttributes: f } = param;
62
+ const p = m || typeof r == "string";
63
63
  return /* @__PURE__ */ i("div", _objectSpreadProps(_objectSpread({
64
- className: p(e, b({
65
- alignItems: s
66
- }), f ? h : v, typeof r != "number" && x[r]),
67
- style: typeof r == "number" ? u({
68
- [W.space]: `${r}px`
64
+ className: u(e, y({
65
+ alignItems: a
66
+ }), n ? v : p ? x : W, typeof r != "number" && c[r]),
67
+ style: typeof r == "number" ? b({
68
+ [g.space]: `${r}px`
69
69
  }) : void 0,
70
70
  role: o,
71
- "aria-labelledby": a
72
- }, y(n)), {
71
+ "aria-labelledby": s
72
+ }, h(f)), {
73
73
  children: d.Children.map(l, (t)=>!!t || t === 0 ? /* @__PURE__ */ i("div", {
74
74
  children: t
75
75
  }) : null)
76
76
  }));
77
77
  };
78
- export { k as default };
78
+ export { A as default };
@@ -1,2 +1,2 @@
1
- const o = "14.3.0";
1
+ const o = "14.4.0";
2
2
  export { o as PACKAGE_VERSION };
@@ -51,23 +51,23 @@ function _objectSpreadProps(target, source) {
51
51
  return target;
52
52
  }
53
53
  import * as c from "react";
54
- import W from "./generated/mistica-icons/icon-close-regular.js";
55
- import E from "./icon-button.js";
56
- import { useTheme as P, useScreenSize as A } from "./hooks.js";
57
- import j from "./stack.js";
54
+ import M from "./generated/mistica-icons/icon-close-regular.js";
55
+ import W from "./icon-button.js";
56
+ import { useTheme as E, useScreenSize as A } from "./hooks.js";
57
+ import P from "./stack.js";
58
58
  import u from "./box.js";
59
- import H from "./inline.js";
60
- import { Text3 as X, Text2 as $ } from "./text.js";
61
- import * as O from "./popover.css-mistica.js";
62
- import { container as _, arrowWrapper as q, arrow as C, textAlign as F, textContent as G, closeButtonIcon as J } from "./popover.css-mistica.js";
59
+ import j from "./inline.js";
60
+ import { Text3 as H, Text2 as X } from "./text.js";
61
+ import * as $ from "./popover.css-mistica.js";
62
+ import { container as O, arrowWrapper as _, arrow as q, textAlign as C, textContent as F, closeButtonIcon as G } from "./popover.css-mistica.js";
63
63
  import { sprinkles as T } from "./sprinkles.css-mistica.js";
64
64
  import { vars as k } from "./skins/skin-contract.css-mistica.js";
65
- import { getPrefixedDataAttributes as K } from "./utils/dom.js";
65
+ import { getPrefixedDataAttributes as J } from "./utils/dom.js";
66
66
  import { jsxs as i, jsx as o } from "./_virtual/jsx-runtime.js";
67
- const { defaultPositionDesktop: Q , defaultPositionMobile: U , distanceToTarget: m , marginLeftRightMobile: d , maxWidthDesktop: Z , arrowSize: L } = O, V = (t)=>t || Z, tt = function() {
68
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Q, r = arguments.length > 1 ? arguments[1] : void 0;
69
- return r && (t === "left" || t === "right") ? U : t;
70
- }, et = (t, r, e)=>t ? (r ? window.screen.width : window.innerWidth) - d * 2 : V(e), rt = (t, r, e, s)=>{
67
+ const { defaultPositionDesktop: K , defaultPositionMobile: Q , distanceToTarget: m , marginLeftRightMobile: d , maxWidthDesktop: U , arrowSize: L } = $, Z = (t)=>t || U, V = function() {
68
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : K, r = arguments.length > 1 ? arguments[1] : void 0;
69
+ return r && (t === "left" || t === "right") ? Q : t;
70
+ }, tt = (t, r, e)=>t ? (r ? window.screen.width : window.innerWidth) - d * 2 : Z(e), et = (t, r, e, s)=>{
71
71
  const a = {
72
72
  right: {
73
73
  left: e.width + m,
@@ -125,11 +125,11 @@ const { defaultPositionDesktop: Q , defaultPositionMobile: U , distanceToTarget:
125
125
  width: t.offsetWidth,
126
126
  height: t.offsetHeight,
127
127
  parentLeft: t.parentNode.offsetLeft
128
- } : null, ut = (param)=>{
128
+ } : null, pt = (param)=>{
129
129
  let { description: t , title: r , onClose: e , trackingEvent: s , position: n , width: a , target: w , asset: f , isVisible: g = !0 , extra: Y , dataAttributes: B } = param;
130
- const { texts: R , isIos: z , isDarkMode: D } = P(), { isTabletOrSmaller: h } = A(), [x, b] = c.useState(null), p = c.useRef(null);
131
- n = tt(n, h);
132
- const y = et(h, z, a), S = D ? 1 : 0.2;
130
+ const { texts: R , isIos: z , isDarkMode: D } = E(), { isTabletOrSmaller: h } = A(), [x, b] = c.useState(null), p = c.useRef(null);
131
+ n = V(n, h);
132
+ const y = tt(h, z, a), S = D ? 1 : 0.2;
133
133
  c.useEffect(()=>{
134
134
  const l = ()=>{
135
135
  b(N(p.current));
@@ -144,20 +144,20 @@ const { defaultPositionDesktop: Q , defaultPositionMobile: U , distanceToTarget:
144
144
  ]);
145
145
  let v = null;
146
146
  if (g && x) {
147
- const { containerStyles: l , arrowStyles: I } = rt(n, y, x, h);
147
+ const { containerStyles: l , arrowStyles: I } = et(n, y, x, h);
148
148
  v = /* @__PURE__ */ i("div", _objectSpreadProps(_objectSpread({
149
- className: _,
149
+ className: O,
150
150
  style: _objectSpread({
151
151
  width: y,
152
152
  boxShadow: `0 2px 4px 0 rgba(0, 0, 0, ${S})`
153
153
  }, l)
154
- }, K(B, "Popover")), {
154
+ }, J(B, "Popover")), {
155
155
  children: [
156
156
  /* @__PURE__ */ o("div", {
157
- className: q,
157
+ className: _,
158
158
  style: I,
159
159
  children: /* @__PURE__ */ o("div", {
160
- className: C,
160
+ className: q,
161
161
  style: {
162
162
  width: L,
163
163
  height: L,
@@ -174,21 +174,21 @@ const { defaultPositionDesktop: Q , defaultPositionMobile: U , distanceToTarget:
174
174
  className: T({
175
175
  display: "flex"
176
176
  }),
177
- children: /* @__PURE__ */ i(H, {
177
+ children: /* @__PURE__ */ i(j, {
178
178
  space: 16,
179
179
  children: [
180
180
  f,
181
181
  /* @__PURE__ */ o(u, {
182
- className: F,
183
- children: /* @__PURE__ */ i(j, {
182
+ className: C,
183
+ children: /* @__PURE__ */ i(P, {
184
184
  space: 4,
185
- className: G,
185
+ className: F,
186
186
  children: [
187
- r && /* @__PURE__ */ o(X, {
187
+ r && /* @__PURE__ */ o(H, {
188
188
  regular: !0,
189
189
  children: r
190
190
  }),
191
- /* @__PURE__ */ o($, {
191
+ /* @__PURE__ */ o(X, {
192
192
  regular: !0,
193
193
  color: k.colors.textSecondary,
194
194
  children: t
@@ -199,14 +199,14 @@ const { defaultPositionDesktop: Q , defaultPositionMobile: U , distanceToTarget:
199
199
  ]
200
200
  })
201
201
  }),
202
- /* @__PURE__ */ o(E, {
203
- className: J,
204
- onPress: (M)=>{
205
- e == null || e(), M.stopPropagation();
202
+ /* @__PURE__ */ o(W, {
203
+ className: G,
204
+ onPress: ()=>{
205
+ e == null || e();
206
206
  },
207
207
  trackingEvent: s,
208
208
  "aria-label": R.modalClose,
209
- children: /* @__PURE__ */ o(W, {
209
+ children: /* @__PURE__ */ o(M, {
210
210
  color: k.colors.neutralHigh
211
211
  })
212
212
  }),
@@ -229,4 +229,4 @@ const { defaultPositionDesktop: Q , defaultPositionMobile: U , distanceToTarget:
229
229
  ]
230
230
  });
231
231
  };
232
- export { ut as default };
232
+ export { pt as default };