@telefonica/mistica 14.15.0 → 14.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.
- package/css/mistica.css +1 -1
- package/dist/card.d.ts +3 -3
- package/dist/checkbox.css-mistica.js +4 -4
- package/dist/checkbox.js +10 -9
- package/dist/credit-card-number-field.js +22 -19
- package/dist/cvv-field.js +60 -47
- package/dist/date-time-picker.d.ts +10 -0
- package/dist/date-time-picker.js +54 -35
- package/dist/hooks.d.ts +1 -1
- package/dist/icons/icon-cvv-amex.d.ts +1 -0
- package/dist/icons/icon-cvv-amex.js +5 -4
- package/dist/icons/icon-cvv-visa-mc.d.ts +1 -0
- package/dist/icons/icon-cvv-visa-mc.js +7 -6
- package/dist/index.d.ts +1 -0
- package/dist/list.css-mistica.js +1 -1
- package/dist/list.js +90 -91
- package/dist/package-version.js +1 -1
- package/dist/radio-button.css-mistica.js +12 -12
- package/dist/radio-button.js +34 -33
- package/dist/search-field.js +8 -8
- package/dist/select.css-mistica.js +6 -6
- package/dist/select.js +145 -142
- package/dist/skins/blau.js +10 -0
- package/dist/skins/defaults.js +10 -0
- package/dist/skins/movistar-legacy.js +10 -0
- package/dist/skins/movistar.js +10 -0
- package/dist/skins/o2.js +10 -0
- package/dist/skins/telefonica.js +12 -2
- package/dist/skins/types/index.d.ts +10 -0
- package/dist/skins/vivo-new.js +10 -0
- package/dist/skins/vivo.js +10 -0
- package/dist/switch-component.css-mistica.js +9 -9
- package/dist/switch-component.js +16 -15
- package/dist/tabs.js +32 -28
- package/dist/text-field-base.js +44 -44
- package/dist/theme-context-provider.js +25 -24
- package/dist/theme.d.ts +5 -2
- package/dist/theme.js +73 -24
- package/dist/video.d.ts +7 -1
- package/dist/video.js +116 -76
- package/dist-es/checkbox.css-mistica.js +4 -4
- package/dist-es/checkbox.js +21 -20
- package/dist-es/credit-card-number-field.js +23 -20
- package/dist-es/cvv-field.js +74 -61
- package/dist-es/date-time-picker.js +66 -47
- package/dist-es/icons/icon-cvv-amex.js +5 -4
- package/dist-es/icons/icon-cvv-visa-mc.js +9 -8
- package/dist-es/list.css-mistica.js +1 -1
- package/dist-es/list.js +114 -115
- package/dist-es/package-version.js +1 -1
- package/dist-es/radio-button.css-mistica.js +6 -6
- package/dist-es/radio-button.js +38 -37
- package/dist-es/search-field.js +7 -7
- package/dist-es/select.css-mistica.js +5 -5
- package/dist-es/select.js +173 -170
- package/dist-es/skins/blau.js +10 -0
- package/dist-es/skins/defaults.js +10 -0
- package/dist-es/skins/movistar-legacy.js +10 -0
- package/dist-es/skins/movistar.js +10 -0
- package/dist-es/skins/o2.js +10 -0
- package/dist-es/skins/telefonica.js +12 -2
- package/dist-es/skins/vivo-new.js +10 -0
- package/dist-es/skins/vivo.js +10 -0
- package/dist-es/style.css +1 -1
- package/dist-es/switch-component.css-mistica.js +7 -7
- package/dist-es/switch-component.js +37 -36
- package/dist-es/tabs.js +49 -45
- package/dist-es/text-field-base.js +64 -64
- package/dist-es/theme-context-provider.js +56 -55
- package/dist-es/theme.js +69 -20
- package/dist-es/video.js +121 -81
- package/package.json +2 -2
- package/dist/cvv-field.css-mistica.js +0 -21
- package/dist/cvv-field.css.d.ts +0 -2
- package/dist/cvv-field.css.ts.vanilla.css-mistica.js +0 -11
- package/dist/icons/icon-creditcard.d.ts +0 -7
- package/dist/icons/icon-creditcard.js +0 -33
- package/dist/icons/icon-info-cvv.d.ts +0 -7
- package/dist/icons/icon-info-cvv.js +0 -26
- package/dist/icons/icon-search.d.ts +0 -7
- package/dist/icons/icon-search.js +0 -32
- package/dist-es/cvv-field.css-mistica.js +0 -4
- package/dist-es/cvv-field.css.ts.vanilla.css-mistica.js +0 -2
- package/dist-es/icons/icon-creditcard.js +0 -24
- package/dist-es/icons/icon-info-cvv.js +0 -17
- package/dist-es/icons/icon-search.js +0 -23
|
@@ -81,16 +81,16 @@ import { jsxs as te, jsx as i } from "react/jsx-runtime";
|
|
|
81
81
|
import * as s from "react";
|
|
82
82
|
import { FieldContainer as ie, HelperText as ne, Label as re } from "./text-field-components.js";
|
|
83
83
|
import { LABEL_LEFT_POSITION as R, LABEL_SCALE_MOBILE as se, LABEL_SCALE_DESKTOP as le } from "./text-field-components.css-mistica.js";
|
|
84
|
-
import { Text3 as
|
|
85
|
-
import { isSafari as oe,
|
|
86
|
-
import { useAriaId as
|
|
87
|
-
import
|
|
88
|
-
import { combineRefs as
|
|
89
|
-
import { startIcon as
|
|
90
|
-
import { sprinkles as
|
|
91
|
-
import { vars as
|
|
92
|
-
const
|
|
93
|
-
var { error: c , helperText:
|
|
84
|
+
import { Text3 as I } from "./text.js";
|
|
85
|
+
import { isSafari as oe, isRunningAcceptanceTest as q, isFirefox as ae } from "./utils/platform.js";
|
|
86
|
+
import { useAriaId as O, useScreenSize as de, useTheme as B, useIsomorphicLayoutEffect as ce } from "./hooks.js";
|
|
87
|
+
import A from "classnames";
|
|
88
|
+
import { combineRefs as j } from "./utils/common.js";
|
|
89
|
+
import { startIcon as fe, prefix as he, prefixWithLabel as ge, prefixWithoutLabel as me, fullWidth as ue, textArea as Se, textAreaWithLabel as pe, textAreaWithoutLabel as be, input as ye, inputWithLabel as Le, inputWithoutLabel as xe, inputFirefoxStyles as Ce, endIcon as Ae, menuItem as Te, menuItemSelected as Ee, suggestionsContainer as Re } from "./text-field-base.css-mistica.js";
|
|
90
|
+
import { sprinkles as We } from "./sprinkles.css-mistica.js";
|
|
91
|
+
import { vars as Ie } from "./skins/skin-contract.css-mistica.js";
|
|
92
|
+
const W = /*#__PURE__*/ s.forwardRef((_param, M)=>{
|
|
93
|
+
var { error: c , helperText: T , label: n , inputProps: m , inputRef: y , defaultValue: o , value: t , onFocus: u , onBlur: S , inputComponent: h , prefix: g , startIcon: e , endIcon: a , endIconOverlay: L , shrinkLabel: z , multiline: x = !1 , focus: C , fieldRef: D , maxLength: p , id: G , autoComplete: H , fullWidth: K } = _param, r = _object_without_properties(_param, [
|
|
94
94
|
"error",
|
|
95
95
|
"helperText",
|
|
96
96
|
"label",
|
|
@@ -115,8 +115,8 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
|
|
|
115
115
|
"fullWidth"
|
|
116
116
|
]);
|
|
117
117
|
var _ref;
|
|
118
|
-
const F =
|
|
119
|
-
|
|
118
|
+
const F = O(G), [f, d] = s.useState(o != null && o.length || t != null && t.length ? "filled" : "default"), { isTabletOrSmaller: J } = de(), [Q, N] = s.useState((_ref = o == null ? void 0 : o.length) !== null && _ref !== void 0 ? _ref : 0), E = !!n || !r.required, U = B(), w = z || (r.type === "date" || r.type === "datetime-local" || r.type === "month") && !r.required, [X, Y] = s.useState("baseline");
|
|
119
|
+
ce(()=>{
|
|
120
120
|
oe() && Y("initial");
|
|
121
121
|
}, []), s.useEffect(()=>{
|
|
122
122
|
f !== "focused" && t != null && t.length && (N(t.length), d("filled")), C && d("focused"), C === !1 && !(t != null && t.length) && d("default"), C === !1 && t != null && t.length && d("filled");
|
|
@@ -129,77 +129,77 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
|
|
|
129
129
|
}, [
|
|
130
130
|
r.autoFocus
|
|
131
131
|
]);
|
|
132
|
-
const Z =
|
|
132
|
+
const Z = x ? "textarea" : "input", $ = h ? {
|
|
133
133
|
inputRef: y
|
|
134
134
|
} : {
|
|
135
|
-
ref:
|
|
135
|
+
ref: j(M, y)
|
|
136
136
|
}, b = _object_spread(_object_spread_props(_object_spread({}, r), {
|
|
137
|
-
maxLength:
|
|
138
|
-
autoComplete:
|
|
139
|
-
}),
|
|
137
|
+
maxLength: p,
|
|
138
|
+
autoComplete: H
|
|
139
|
+
}), m), P = w || f === "focused" || f === "filled", v = P ? J ? se : le : 1, V = {
|
|
140
140
|
left: e ? 48 : R,
|
|
141
141
|
// shrinking means applying a scale transformation, so width will be proportionally reduced.
|
|
142
142
|
// Let's keep the original width.
|
|
143
|
-
width: `calc(((100% - ${R + (e ? 48 : R)}px)) / ${
|
|
144
|
-
paddingRight: a && !
|
|
145
|
-
},
|
|
143
|
+
width: `calc(((100% - ${R + (e ? 48 : R)}px)) / ${v})`,
|
|
144
|
+
paddingRight: a && !P ? 36 : 0
|
|
145
|
+
}, k = We({
|
|
146
146
|
paddingRight: a ? 0 : 16,
|
|
147
|
-
paddingLeft:
|
|
148
|
-
}), ee = r.type === "password" &&
|
|
147
|
+
paddingLeft: g ? 0 : e ? 48 : 12
|
|
148
|
+
}), ee = r.type === "password" && !q(U.platformOverrides) ? "Lucida Grande, Arial, sans-serif" : "inherit";
|
|
149
149
|
return /* @__PURE__ */ te(ie, {
|
|
150
150
|
disabled: r.disabled,
|
|
151
151
|
helperText: /* @__PURE__ */ i(ne, {
|
|
152
152
|
error: c,
|
|
153
|
-
leftText:
|
|
154
|
-
rightText:
|
|
153
|
+
leftText: T,
|
|
154
|
+
rightText: x && p ? `${Q}/${p}` : void 0
|
|
155
155
|
}),
|
|
156
|
-
multiline:
|
|
157
|
-
fullWidth:
|
|
158
|
-
fieldRef:
|
|
156
|
+
multiline: x,
|
|
157
|
+
fullWidth: K,
|
|
158
|
+
fieldRef: D,
|
|
159
159
|
readOnly: r.readOnly,
|
|
160
160
|
children: [
|
|
161
161
|
e && /* @__PURE__ */ i("div", {
|
|
162
|
-
className:
|
|
162
|
+
className: fe,
|
|
163
163
|
children: e
|
|
164
164
|
}),
|
|
165
|
-
|
|
166
|
-
className:
|
|
165
|
+
g && /* @__PURE__ */ i("div", {
|
|
166
|
+
className: A(he, E ? ge : me),
|
|
167
167
|
style: {
|
|
168
168
|
opacity: f === "default" ? 0 : 1,
|
|
169
169
|
alignSelf: X
|
|
170
170
|
},
|
|
171
|
-
children: /* @__PURE__ */ i(
|
|
172
|
-
color:
|
|
171
|
+
children: /* @__PURE__ */ i(I, {
|
|
172
|
+
color: Ie.colors.textSecondary,
|
|
173
173
|
regular: !0,
|
|
174
174
|
wordBreak: !1,
|
|
175
|
-
children:
|
|
175
|
+
children: g
|
|
176
176
|
})
|
|
177
177
|
}),
|
|
178
178
|
/* @__PURE__ */ i("div", {
|
|
179
|
-
className:
|
|
179
|
+
className: ue,
|
|
180
180
|
style: {
|
|
181
|
-
alignSelf:
|
|
181
|
+
alignSelf: g ? "baseline" : "initial"
|
|
182
182
|
},
|
|
183
|
-
children: /* @__PURE__ */ i(
|
|
183
|
+
children: /* @__PURE__ */ i(I, {
|
|
184
184
|
as: "div",
|
|
185
185
|
regular: !0,
|
|
186
|
-
children: /*#__PURE__*/ s.createElement(h || Z, _object_spread(_object_spread_props(_object_spread({},
|
|
186
|
+
children: /*#__PURE__*/ s.createElement(h || Z, _object_spread(_object_spread_props(_object_spread({}, $, b), {
|
|
187
187
|
id: F,
|
|
188
188
|
style: _object_spread_props(_object_spread({}, b.style), {
|
|
189
189
|
fontFamily: ee
|
|
190
190
|
}),
|
|
191
|
-
className:
|
|
192
|
-
[
|
|
191
|
+
className: x ? A(Se, E ? pe : be, k) : A(ye, E ? Le : xe, k, {
|
|
192
|
+
[Ce]: ae()
|
|
193
193
|
}),
|
|
194
194
|
onFocus: (l)=>{
|
|
195
195
|
d("focused"), u == null || u(l);
|
|
196
196
|
},
|
|
197
197
|
onBlur: (l)=>{
|
|
198
|
-
l.target.value.length > 0 ? d("filled") : d("default"),
|
|
198
|
+
l.target.value.length > 0 ? d("filled") : d("default"), S == null || S(l);
|
|
199
199
|
},
|
|
200
200
|
onChange: (l)=>{
|
|
201
|
-
var
|
|
202
|
-
|
|
201
|
+
var _;
|
|
202
|
+
p === void 0 || l.target.value.length <= p ? (N(l.target.value.length), l.target.value.length > 0 && f !== "focused" && d("filled"), (_ = b.onChange) == null || _.call(b, l)) : (l.stopPropagation(), l.preventDefault());
|
|
203
203
|
},
|
|
204
204
|
defaultValue: o,
|
|
205
205
|
value: t
|
|
@@ -213,7 +213,7 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
|
|
|
213
213
|
error: c,
|
|
214
214
|
forId: F,
|
|
215
215
|
inputState: f,
|
|
216
|
-
shrinkLabel:
|
|
216
|
+
shrinkLabel: w,
|
|
217
217
|
optional: !r.required,
|
|
218
218
|
children: n
|
|
219
219
|
}),
|
|
@@ -221,41 +221,41 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
|
|
|
221
221
|
className: Ae,
|
|
222
222
|
children: a
|
|
223
223
|
}),
|
|
224
|
-
|
|
224
|
+
L
|
|
225
225
|
]
|
|
226
226
|
});
|
|
227
|
-
}),
|
|
228
|
-
var { getSuggestions: c , id:
|
|
227
|
+
}), Oe = /*#__PURE__*/ s.lazy(()=>import(/* webpackChunkName: "react-autosuggest" */ "react-autosuggest")), Ge = /*#__PURE__*/ s.forwardRef((_param, m)=>{
|
|
228
|
+
var { getSuggestions: c , id: T } = _param, n = _object_without_properties(_param, [
|
|
229
229
|
"getSuggestions",
|
|
230
230
|
"id"
|
|
231
231
|
]);
|
|
232
|
-
const [y, o] = s.useState([]), t = s.useRef(null), { platformOverrides: u , texts:
|
|
232
|
+
const [y, o] = s.useState([]), t = s.useRef(null), { platformOverrides: u , texts: S } = B(), h = O(T), g = O();
|
|
233
233
|
if (c && (n.value === void 0 || n.defaultValue !== void 0)) throw Error("Fields with suggestions must be used in controlled mode");
|
|
234
234
|
return c ? /* @__PURE__ */ i(s.Suspense, {
|
|
235
|
-
fallback: /* @__PURE__ */ i(
|
|
236
|
-
label:
|
|
235
|
+
fallback: /* @__PURE__ */ i(W, _object_spread_props(_object_spread({}, n), {
|
|
236
|
+
label: q(u) ? "" : n.label,
|
|
237
237
|
autoComplete: "off",
|
|
238
|
-
ref:
|
|
238
|
+
ref: m,
|
|
239
239
|
id: h
|
|
240
240
|
})),
|
|
241
|
-
children: /* @__PURE__ */ i(
|
|
242
|
-
id:
|
|
241
|
+
children: /* @__PURE__ */ i(Oe, {
|
|
242
|
+
id: g,
|
|
243
243
|
inputProps: _object_spread_props(_object_spread({}, n), {
|
|
244
244
|
id: h,
|
|
245
245
|
autoComplete: "off",
|
|
246
246
|
// @ts-expect-error Autosuggest expects slightly different types
|
|
247
247
|
onChange: (e, param)=>{
|
|
248
248
|
let { newValue: a } = param;
|
|
249
|
-
var
|
|
249
|
+
var L;
|
|
250
250
|
e.target = _object_spread_props(_object_spread({}, e.target), {
|
|
251
251
|
value: a
|
|
252
252
|
}), e.currentTarget = _object_spread_props(_object_spread({}, e.currentTarget), {
|
|
253
253
|
value: a
|
|
254
|
-
}), (
|
|
254
|
+
}), (L = n.onChange) == null || L.call(n, e);
|
|
255
255
|
}
|
|
256
256
|
}),
|
|
257
|
-
renderInputComponent: (e)=>/* @__PURE__ */ i(
|
|
258
|
-
inputRef:
|
|
257
|
+
renderInputComponent: (e)=>/* @__PURE__ */ i(W, _object_spread_props(_object_spread({}, e), {
|
|
258
|
+
inputRef: j(t, n.inputRef, m)
|
|
259
259
|
})),
|
|
260
260
|
suggestions: y,
|
|
261
261
|
onSuggestionsFetchRequested: (param)=>{
|
|
@@ -268,10 +268,10 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
|
|
|
268
268
|
let { isHighlighted: a } = param;
|
|
269
269
|
return i("div", {
|
|
270
270
|
role: "menuitem",
|
|
271
|
-
className:
|
|
272
|
-
[
|
|
271
|
+
className: A(Te, {
|
|
272
|
+
[Ee]: a
|
|
273
273
|
}),
|
|
274
|
-
children: /* @__PURE__ */ i(
|
|
274
|
+
children: /* @__PURE__ */ i(I, {
|
|
275
275
|
regular: !0,
|
|
276
276
|
children: e
|
|
277
277
|
})
|
|
@@ -281,14 +281,14 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
|
|
|
281
281
|
style: {
|
|
282
282
|
width: t.current ? t.current.clientWidth + 2 : 0
|
|
283
283
|
},
|
|
284
|
-
className:
|
|
285
|
-
"aria-label": `${n.label} ${
|
|
284
|
+
className: Re,
|
|
285
|
+
"aria-label": `${n.label} ${S.menuLabelSuffix}`,
|
|
286
286
|
children: e.children
|
|
287
287
|
}))
|
|
288
288
|
})
|
|
289
|
-
}) : /* @__PURE__ */ i(
|
|
289
|
+
}) : /* @__PURE__ */ i(W, _object_spread_props(_object_spread({}, n), {
|
|
290
290
|
id: h,
|
|
291
|
-
ref:
|
|
291
|
+
ref: m
|
|
292
292
|
}));
|
|
293
293
|
});
|
|
294
|
-
export {
|
|
294
|
+
export { W as TextFieldBase, Ge as TextFieldBaseAutosuggest };
|
|
@@ -26,112 +26,113 @@ function _object_spread(target) {
|
|
|
26
26
|
}
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
|
-
import { jsx as r, jsxs as
|
|
29
|
+
import { jsx as r, jsxs as y, Fragment as A } from "react/jsx-runtime";
|
|
30
30
|
import * as a from "react";
|
|
31
31
|
import { assignInlineVars as N } from "@vanilla-extract/dynamic";
|
|
32
32
|
import O from "./dialog.js";
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import { getTexts as
|
|
36
|
-
import { getPlatform as
|
|
37
|
-
import
|
|
38
|
-
import { useIsomorphicLayoutEffect as
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import { DocumentVisibilityProvider as
|
|
42
|
-
import { AspectRatioSupportProvider as
|
|
43
|
-
import { TrackingConfig as
|
|
44
|
-
import { vars as
|
|
45
|
-
import { fromHexToRgb as
|
|
46
|
-
import { defaultTextPresetsConfig as e, defaultBorderRadiiConfig as
|
|
47
|
-
const
|
|
33
|
+
import w from "./screen-size-context-provider.js";
|
|
34
|
+
import F from "./aria-id-getter-context.js";
|
|
35
|
+
import { getTexts as $, dimensions as V, getMisticaLinkComponent as j, NAVBAR_HEIGHT_MOBILE as _ } from "./theme.js";
|
|
36
|
+
import { getPlatform as I, isInsideNovumNativeApp as h } from "./utils/platform.js";
|
|
37
|
+
import B from "./theme-context.js";
|
|
38
|
+
import { useIsomorphicLayoutEffect as z } from "./hooks.js";
|
|
39
|
+
import G from "./tab-focus.js";
|
|
40
|
+
import q from "./modal-context-provider.js";
|
|
41
|
+
import { DocumentVisibilityProvider as W } from "./utils/document-visibility.js";
|
|
42
|
+
import { AspectRatioSupportProvider as J } from "./utils/aspect-ratio-support.js";
|
|
43
|
+
import { TrackingConfig as K } from "./utils/analytics.js";
|
|
44
|
+
import { vars as Q } from "./skins/skin-contract.css-mistica.js";
|
|
45
|
+
import { fromHexToRgb as U } from "./utils/color.js";
|
|
46
|
+
import { defaultTextPresetsConfig as e, defaultBorderRadiiConfig as X } from "./skins/defaults.js";
|
|
47
|
+
const Y = "(prefers-color-scheme: dark)", Z = ()=>{
|
|
48
48
|
const [t, c] = a.useState(!1);
|
|
49
|
-
return
|
|
49
|
+
return z(()=>{
|
|
50
50
|
if (!window.matchMedia) return;
|
|
51
|
-
const o = window.matchMedia(
|
|
51
|
+
const o = window.matchMedia(Y), s = ()=>{
|
|
52
52
|
c(o.matches);
|
|
53
53
|
};
|
|
54
54
|
return o.addListener(s), s(), ()=>o.removeListener(s);
|
|
55
55
|
}, []), t;
|
|
56
|
-
},
|
|
57
|
-
headerMobileHeight: (t == null ? void 0 : t.headerMobileHeight) === "mistica" ?
|
|
58
|
-
}),
|
|
56
|
+
}, tt = ()=>(t)=>t, et = (t)=>({
|
|
57
|
+
headerMobileHeight: (t == null ? void 0 : t.headerMobileHeight) === "mistica" ? _ : t == null ? void 0 : t.headerMobileHeight
|
|
58
|
+
}), rt = (param)=>{
|
|
59
59
|
let { theme: t , children: c , as: o } = param;
|
|
60
60
|
var _t_colorScheme, _t_skin_borderRadii;
|
|
61
|
-
const s = a.useRef(1),
|
|
62
|
-
var i, n, d, x, f,
|
|
61
|
+
const s = a.useRef(1), E = a.useCallback(()=>`aria-id-hook-${s.current++}`, []), L = Z(), k = (_t_colorScheme = t.colorScheme) !== null && _t_colorScheme !== void 0 ? _t_colorScheme : "auto", R = t.skin.colors, H = _object_spread({}, t.skin.colors, t.skin.darkModeColors), u = k === "auto" && L || k === "dark", m = u ? H : R, p = a.useMemo(()=>{
|
|
62
|
+
var i, n, d, x, f, v, P, g, M, C, T, D;
|
|
63
63
|
const l = _object_spread({
|
|
64
|
-
platform:
|
|
65
|
-
insideNovumNativeApp:
|
|
64
|
+
platform: I(),
|
|
65
|
+
insideNovumNativeApp: h()
|
|
66
66
|
}, t.platformOverrides);
|
|
67
|
-
var
|
|
67
|
+
var _t_useHrefDecorator;
|
|
68
68
|
return {
|
|
69
69
|
skinName: t.skin.name,
|
|
70
70
|
i18n: t.i18n,
|
|
71
71
|
platformOverrides: l,
|
|
72
|
-
texts: _object_spread({},
|
|
72
|
+
texts: _object_spread({}, $(t.i18n.locale), t.texts),
|
|
73
73
|
analytics: _object_spread({
|
|
74
74
|
logEvent: ()=>Promise.resolve(),
|
|
75
75
|
eventFormat: "universal-analytics"
|
|
76
76
|
}, t.analytics),
|
|
77
|
-
dimensions: _object_spread({},
|
|
77
|
+
dimensions: _object_spread({}, V, et(t.dimensions)),
|
|
78
78
|
textPresets: {
|
|
79
79
|
text5: _object_spread({}, e.text5, (i = t.skin.textPresets) == null ? void 0 : i.text5),
|
|
80
80
|
text6: _object_spread({}, e.text6, (n = t.skin.textPresets) == null ? void 0 : n.text6),
|
|
81
81
|
text7: _object_spread({}, e.text7, (d = t.skin.textPresets) == null ? void 0 : d.text7),
|
|
82
82
|
text8: _object_spread({}, e.text8, (x = t.skin.textPresets) == null ? void 0 : x.text8),
|
|
83
83
|
text9: _object_spread({}, e.text9, (f = t.skin.textPresets) == null ? void 0 : f.text9),
|
|
84
|
-
text10: _object_spread({}, e.text10, (
|
|
85
|
-
cardTitle: _object_spread({}, e.cardTitle, (
|
|
84
|
+
text10: _object_spread({}, e.text10, (v = t.skin.textPresets) == null ? void 0 : v.text10),
|
|
85
|
+
cardTitle: _object_spread({}, e.cardTitle, (P = t.skin.textPresets) == null ? void 0 : P.cardTitle),
|
|
86
86
|
button: _object_spread({}, e.button, (g = t.skin.textPresets) == null ? void 0 : g.button),
|
|
87
87
|
link: _object_spread({}, e.link, (M = t.skin.textPresets) == null ? void 0 : M.link),
|
|
88
|
-
title1: _object_spread({}, e.title1, (
|
|
89
|
-
indicator: _object_spread({}, e.indicator, (
|
|
88
|
+
title1: _object_spread({}, e.title1, (C = t.skin.textPresets) == null ? void 0 : C.title1),
|
|
89
|
+
indicator: _object_spread({}, e.indicator, (T = t.skin.textPresets) == null ? void 0 : T.indicator),
|
|
90
|
+
tabsLabel: _object_spread({}, e.tabsLabel, (D = t.skin.textPresets) == null ? void 0 : D.tabsLabel)
|
|
90
91
|
},
|
|
91
|
-
Link: (
|
|
92
|
+
Link: j(t.Link),
|
|
92
93
|
isDarkMode: u,
|
|
93
|
-
isIos:
|
|
94
|
-
useHrefDecorator: (_t_useHrefDecorator = t.useHrefDecorator) !== null && _t_useHrefDecorator !== void 0 ? _t_useHrefDecorator :
|
|
94
|
+
isIos: I(l) === "ios",
|
|
95
|
+
useHrefDecorator: (_t_useHrefDecorator = t.useHrefDecorator) !== null && _t_useHrefDecorator !== void 0 ? _t_useHrefDecorator : tt,
|
|
95
96
|
useId: t.useId
|
|
96
97
|
};
|
|
97
98
|
}, [
|
|
98
99
|
t,
|
|
99
100
|
u
|
|
100
|
-
]),
|
|
101
|
+
]), S = Object.fromEntries(Object.entries(m).map((param)=>{
|
|
101
102
|
let [l, i] = param;
|
|
102
103
|
let n = "";
|
|
103
104
|
if (i.startsWith("#")) {
|
|
104
|
-
const [d, x, f] =
|
|
105
|
+
const [d, x, f] = U(i);
|
|
105
106
|
n = `${d}, ${x}, ${f}`;
|
|
106
107
|
}
|
|
107
108
|
return [
|
|
108
109
|
l,
|
|
109
110
|
n
|
|
110
111
|
];
|
|
111
|
-
})),
|
|
112
|
-
colors:
|
|
113
|
-
rawColors:
|
|
114
|
-
borderRadii: (_t_skin_borderRadii = t.skin.borderRadii) !== null && _t_skin_borderRadii !== void 0 ? _t_skin_borderRadii :
|
|
112
|
+
})), b = N(Q, {
|
|
113
|
+
colors: m,
|
|
114
|
+
rawColors: S,
|
|
115
|
+
borderRadii: (_t_skin_borderRadii = t.skin.borderRadii) !== null && _t_skin_borderRadii !== void 0 ? _t_skin_borderRadii : X
|
|
115
116
|
});
|
|
116
|
-
return /* @__PURE__ */ r(
|
|
117
|
+
return /* @__PURE__ */ r(G, {
|
|
117
118
|
disabled: !t.enableTabFocus,
|
|
118
|
-
children: /* @__PURE__ */ r(
|
|
119
|
-
children: /* @__PURE__ */ r(
|
|
119
|
+
children: /* @__PURE__ */ r(q, {
|
|
120
|
+
children: /* @__PURE__ */ r(B.Provider, {
|
|
120
121
|
value: p,
|
|
121
|
-
children: /* @__PURE__ */ r(
|
|
122
|
+
children: /* @__PURE__ */ r(K, {
|
|
122
123
|
eventFormat: p.analytics.eventFormat,
|
|
123
|
-
children: /* @__PURE__ */ r(
|
|
124
|
-
children: /* @__PURE__ */ r(
|
|
125
|
-
children: /* @__PURE__ */ r(
|
|
126
|
-
value:
|
|
127
|
-
children: /* @__PURE__ */ r(
|
|
124
|
+
children: /* @__PURE__ */ r(J, {
|
|
125
|
+
children: /* @__PURE__ */ r(W, {
|
|
126
|
+
children: /* @__PURE__ */ r(F.Provider, {
|
|
127
|
+
value: E,
|
|
128
|
+
children: /* @__PURE__ */ r(w, {
|
|
128
129
|
children: /* @__PURE__ */ r(O, {
|
|
129
130
|
children: o ? /*#__PURE__*/ a.createElement(o, {
|
|
130
|
-
style:
|
|
131
|
-
}, c) : /* @__PURE__ */
|
|
131
|
+
style: b
|
|
132
|
+
}, c) : /* @__PURE__ */ y(A, {
|
|
132
133
|
children: [
|
|
133
134
|
(process.env.NODE_ENV !== "test" || process.env.SSR_TEST) && /* @__PURE__ */ r("style", {
|
|
134
|
-
children: `:root {${
|
|
135
|
+
children: `:root {${b}}`
|
|
135
136
|
}),
|
|
136
137
|
c
|
|
137
138
|
]
|
|
@@ -145,5 +146,5 @@ const X = "(prefers-color-scheme: dark)", Y = ()=>{
|
|
|
145
146
|
})
|
|
146
147
|
})
|
|
147
148
|
});
|
|
148
|
-
},
|
|
149
|
-
export {
|
|
149
|
+
}, gt = rt;
|
|
150
|
+
export { gt as default, Z as useIsOsDarkModeEnabled };
|
package/dist-es/theme.js
CHANGED
|
@@ -77,8 +77,8 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
77
77
|
}
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
|
-
import { jsx as
|
|
81
|
-
const
|
|
80
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
81
|
+
const l = {
|
|
82
82
|
expirationDatePlaceholder: "MM/AA",
|
|
83
83
|
togglePasswordVisibilityLabel: "Mostrar u ocultar contrase\xf1a",
|
|
84
84
|
loading: "Cargando",
|
|
@@ -109,7 +109,7 @@ const t = {
|
|
|
109
109
|
clearButton: "Borrar",
|
|
110
110
|
carouselNextButton: "siguiente",
|
|
111
111
|
carouselPrevButton: "anterior"
|
|
112
|
-
},
|
|
112
|
+
}, n = {
|
|
113
113
|
expirationDatePlaceholder: "MM/YY",
|
|
114
114
|
togglePasswordVisibilityLabel: "Toggle password visibility",
|
|
115
115
|
loading: "Loading",
|
|
@@ -140,7 +140,7 @@ const t = {
|
|
|
140
140
|
clearButton: "Clear",
|
|
141
141
|
carouselNextButton: "next",
|
|
142
142
|
carouselPrevButton: "previous"
|
|
143
|
-
},
|
|
143
|
+
}, d = {
|
|
144
144
|
expirationDatePlaceholder: "MM/JJ",
|
|
145
145
|
togglePasswordVisibilityLabel: "Passwort un-/sichtbar machen",
|
|
146
146
|
loading: "Wird gespeichert",
|
|
@@ -171,7 +171,7 @@ const t = {
|
|
|
171
171
|
clearButton: "L\xf6schen",
|
|
172
172
|
carouselNextButton: "n\xe4chste",
|
|
173
173
|
carouselPrevButton: "vorherige"
|
|
174
|
-
},
|
|
174
|
+
}, s = {
|
|
175
175
|
expirationDatePlaceholder: "MM/AA",
|
|
176
176
|
togglePasswordVisibilityLabel: "Mostrar ou ocultar senha",
|
|
177
177
|
loading: "Carregando",
|
|
@@ -202,32 +202,81 @@ const t = {
|
|
|
202
202
|
clearButton: "Apagar",
|
|
203
203
|
carouselNextButton: "pr\xf3ximo",
|
|
204
204
|
carouselPrevButton: "anterior"
|
|
205
|
-
},
|
|
205
|
+
}, b = (r)=>{
|
|
206
206
|
switch(r.toLocaleLowerCase().split(/[-_]/)[0]){
|
|
207
207
|
case "es":
|
|
208
|
-
return t;
|
|
209
|
-
case "pt":
|
|
210
208
|
return l;
|
|
209
|
+
case "pt":
|
|
210
|
+
return s;
|
|
211
211
|
case "de":
|
|
212
|
-
return
|
|
212
|
+
return d;
|
|
213
213
|
case "en":
|
|
214
|
-
return
|
|
214
|
+
return n;
|
|
215
215
|
default:
|
|
216
|
-
return process.env.NODE_ENV !== "production" && console.error(`Invalid locale: ${r}`),
|
|
216
|
+
return process.env.NODE_ENV !== "production" && console.error(`Invalid locale: ${r}`), n;
|
|
217
217
|
}
|
|
218
|
-
},
|
|
219
|
-
headerMobileHeight:
|
|
220
|
-
headerDesktopHeight:
|
|
221
|
-
},
|
|
222
|
-
var { to: r , innerRef: e } = _param,
|
|
218
|
+
}, c = 56, C = 80, E = {
|
|
219
|
+
headerMobileHeight: c,
|
|
220
|
+
headerDesktopHeight: C
|
|
221
|
+
}, m = (_param)=>/* @__PURE__ */ {
|
|
222
|
+
var { to: r , innerRef: e } = _param, o = _object_without_properties(_param, [
|
|
223
223
|
"to",
|
|
224
224
|
"innerRef"
|
|
225
225
|
]);
|
|
226
|
-
return
|
|
226
|
+
return a("a", _object_spread_props(_object_spread({
|
|
227
227
|
ref: e,
|
|
228
228
|
href: typeof r == "string" ? r : r == null ? void 0 : r.pathname
|
|
229
|
-
},
|
|
230
|
-
children:
|
|
229
|
+
}, o), {
|
|
230
|
+
children: o.children
|
|
231
231
|
}));
|
|
232
|
+
}, u = (r)=>r, f = (r)=>(_param)=>/* @__PURE__ */ {
|
|
233
|
+
var { innerRef: e } = _param, o = _object_without_properties(_param, [
|
|
234
|
+
"innerRef"
|
|
235
|
+
]);
|
|
236
|
+
return a(r, _object_spread({
|
|
237
|
+
ref: e
|
|
238
|
+
}, o));
|
|
239
|
+
}, v = (r)=>(_param)=>/* @__PURE__ */ {
|
|
240
|
+
var { to: e , innerRef: o , children: t } = _param, i = _object_without_properties(_param, [
|
|
241
|
+
"to",
|
|
242
|
+
"innerRef",
|
|
243
|
+
"children"
|
|
244
|
+
]);
|
|
245
|
+
return a(r, {
|
|
246
|
+
href: e,
|
|
247
|
+
children: /* @__PURE__ */ a("a", _object_spread_props(_object_spread({
|
|
248
|
+
ref: o
|
|
249
|
+
}, i), {
|
|
250
|
+
children: t
|
|
251
|
+
}))
|
|
252
|
+
});
|
|
253
|
+
}, p = (r)=>(_param)=>/* @__PURE__ */ {
|
|
254
|
+
var { to: e , innerRef: o , children: t } = _param, i = _object_without_properties(_param, [
|
|
255
|
+
"to",
|
|
256
|
+
"innerRef",
|
|
257
|
+
"children"
|
|
258
|
+
]);
|
|
259
|
+
return a(r, _object_spread_props(_object_spread({
|
|
260
|
+
href: e,
|
|
261
|
+
ref: o
|
|
262
|
+
}, i), {
|
|
263
|
+
children: t
|
|
264
|
+
}));
|
|
265
|
+
}, h = (r)=>{
|
|
266
|
+
if (!r) return m;
|
|
267
|
+
if (typeof r == "function" || r.$$typeof) return r;
|
|
268
|
+
switch(r.type){
|
|
269
|
+
case "ReactRouter5":
|
|
270
|
+
return u(r.Component);
|
|
271
|
+
case "ReactRouter6":
|
|
272
|
+
return f(r.Component);
|
|
273
|
+
case "Next12":
|
|
274
|
+
return v(r.Component);
|
|
275
|
+
case "Next13":
|
|
276
|
+
return p(r.Component);
|
|
277
|
+
default:
|
|
278
|
+
const e = r.type;
|
|
279
|
+
throw new Error(`Invalid Link type: ${e}`);
|
|
280
|
+
}
|
|
232
281
|
};
|
|
233
|
-
export {
|
|
282
|
+
export { C as NAVBAR_HEIGHT_DESKTOP, c as NAVBAR_HEIGHT_MOBILE, E as dimensions, h as getMisticaLinkComponent, b as getTexts };
|