@telefonica/mistica 12.9.1 → 12.10.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 (274) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/avatar.css-mistica.js +3 -4
  3. package/dist/badge.css-mistica.js +3 -3
  4. package/dist/box.js +18 -24
  5. package/dist/boxed.css-mistica.js +12 -0
  6. package/dist/boxed.css.d.ts +1 -0
  7. package/dist/boxed.css.js.flow +3 -0
  8. package/dist/boxed.css.ts.vanilla.js +11 -0
  9. package/dist/boxed.js +24 -30
  10. package/dist/button-group.css-mistica.js +27 -0
  11. package/dist/button-group.css.d.ts +4 -0
  12. package/dist/button-group.css.js.flow +6 -0
  13. package/dist/button-group.css.ts.vanilla.js +11 -0
  14. package/dist/button-group.js +20 -45
  15. package/dist/button-layout.css-mistica.js +50 -0
  16. package/dist/button-layout.css.d.ts +11 -0
  17. package/dist/button-layout.css.js.flow +21 -0
  18. package/dist/button-layout.css.ts.vanilla.js +11 -0
  19. package/dist/button-layout.js +63 -107
  20. package/dist/button.css-mistica.js +80 -0
  21. package/dist/button.css.d.ts +20 -0
  22. package/dist/button.css.js.flow +30 -0
  23. package/dist/button.css.ts.vanilla.js +11 -0
  24. package/dist/button.d.ts +0 -1
  25. package/dist/button.js +128 -336
  26. package/dist/button.js.flow +0 -1
  27. package/dist/callout.css-mistica.js +21 -0
  28. package/dist/callout.css.d.ts +2 -0
  29. package/dist/callout.css.js.flow +4 -0
  30. package/dist/{avatar.css.ts.vanilla.js → callout.css.ts.vanilla.js} +0 -0
  31. package/dist/callout.js +24 -59
  32. package/dist/card.css-mistica.js +39 -0
  33. package/dist/card.css.d.ts +8 -0
  34. package/dist/card.css.js.flow +10 -0
  35. package/dist/card.css.ts.vanilla.js +11 -0
  36. package/dist/card.js +128 -200
  37. package/dist/carousel.js +208 -222
  38. package/dist/checkbox.css-mistica.js +34 -0
  39. package/dist/checkbox.css.d.ts +5 -0
  40. package/dist/checkbox.css.js.flow +7 -0
  41. package/dist/checkbox.css.ts.vanilla.js +11 -0
  42. package/dist/checkbox.js +37 -82
  43. package/dist/chip.css-mistica.js +33 -0
  44. package/dist/chip.css.d.ts +4 -0
  45. package/dist/chip.css.js.flow +6 -0
  46. package/dist/chip.css.ts.vanilla.js +11 -0
  47. package/dist/chip.js +22 -67
  48. package/dist/circle.css-mistica.js +13 -0
  49. package/dist/circle.css.d.ts +1 -0
  50. package/dist/circle.css.js.flow +3 -0
  51. package/dist/circle.css.ts.vanilla.js +11 -0
  52. package/dist/circle.js +11 -37
  53. package/dist/credit-card-number-field.css-mistica.js +30 -0
  54. package/dist/credit-card-number-field.css.d.ts +4 -0
  55. package/dist/credit-card-number-field.css.js.flow +6 -0
  56. package/dist/credit-card-number-field.css.ts.vanilla.js +11 -0
  57. package/dist/credit-card-number-field.js +44 -72
  58. package/dist/cvv-field.css-mistica.js +21 -0
  59. package/dist/cvv-field.css.d.ts +2 -0
  60. package/dist/cvv-field.css.js.flow +4 -0
  61. package/dist/cvv-field.css.ts.vanilla.js +11 -0
  62. package/dist/cvv-field.js +43 -57
  63. package/dist/date-time-picker.css-mistica.js +12 -0
  64. package/dist/date-time-picker.css.d.ts +1 -0
  65. package/dist/date-time-picker.css.js.flow +3 -0
  66. package/dist/date-time-picker.css.ts.vanilla.js +11 -0
  67. package/dist/date-time-picker.js +46 -225
  68. package/dist/dialog.css-mistica.js +48 -0
  69. package/dist/dialog.css.d.ts +10 -0
  70. package/dist/dialog.css.js.flow +12 -0
  71. package/dist/dialog.css.ts.vanilla.js +11 -0
  72. package/dist/dialog.js +136 -231
  73. package/dist/divider.css-mistica.js +15 -0
  74. package/dist/divider.css.d.ts +1 -0
  75. package/dist/divider.css.js.flow +3 -0
  76. package/dist/divider.css.ts.vanilla.js +11 -0
  77. package/dist/divider.js +5 -34
  78. package/dist/double-field.css-mistica.js +16 -0
  79. package/dist/double-field.css.d.ts +1 -0
  80. package/dist/double-field.css.js.flow +3 -0
  81. package/dist/double-field.css.ts.vanilla.js +11 -0
  82. package/dist/double-field.js +13 -45
  83. package/dist/empty-state-card.css-mistica.js +24 -0
  84. package/dist/empty-state-card.css.d.ts +3 -0
  85. package/dist/empty-state-card.css.js.flow +5 -0
  86. package/dist/empty-state-card.css.ts.vanilla.js +11 -0
  87. package/dist/empty-state-card.js +23 -57
  88. package/dist/empty-state.css-mistica.js +44 -0
  89. package/dist/empty-state.css.d.ts +10 -0
  90. package/dist/empty-state.css.js.flow +15 -0
  91. package/dist/empty-state.css.ts.vanilla.js +11 -0
  92. package/dist/empty-state.js +70 -134
  93. package/dist/feedback.js +61 -60
  94. package/dist/fixed-footer-layout.js +41 -42
  95. package/dist/grid-layout.css-mistica.js +26 -0
  96. package/dist/grid-layout.css.d.ts +6 -0
  97. package/dist/grid-layout.css.js.flow +14 -0
  98. package/dist/grid-layout.css.ts.vanilla.js +11 -0
  99. package/dist/grid-layout.js +73 -196
  100. package/dist/header.js +8 -7
  101. package/dist/image.css-mistica.js +21 -0
  102. package/dist/image.css.d.ts +3 -0
  103. package/dist/image.css.js.flow +5 -0
  104. package/dist/image.css.ts.vanilla.js +11 -0
  105. package/dist/image.js +42 -63
  106. package/dist/inline.css-mistica.js +25 -0
  107. package/dist/inline.css.d.ts +6 -0
  108. package/dist/inline.css.js.flow +8 -0
  109. package/dist/inline.css.ts.vanilla.js +11 -0
  110. package/dist/inline.js +27 -52
  111. package/dist/list.d.ts +5 -52
  112. package/dist/list.js +59 -53
  113. package/dist/list.js.flow +16 -6
  114. package/dist/maybe-dismissable.js +21 -20
  115. package/dist/media-queries.css.d.ts +2 -2
  116. package/dist/media-queries.css.js.flow +2 -2
  117. package/dist/navigation-bar.d.ts +1 -1
  118. package/dist/navigation-bar.js +167 -166
  119. package/dist/navigation-bar.js.flow +1 -1
  120. package/dist/package-version.js +1 -1
  121. package/dist/placeholder.js +7 -8
  122. package/dist/radio-button.js +76 -72
  123. package/dist/responsive-layout.css-mistica.js +29 -0
  124. package/dist/responsive-layout.css.d.ts +6 -0
  125. package/dist/responsive-layout.css.js.flow +11 -0
  126. package/dist/responsive-layout.css.ts.vanilla.js +11 -0
  127. package/dist/responsive-layout.d.ts +0 -1
  128. package/dist/responsive-layout.js +18 -101
  129. package/dist/responsive-layout.js.flow +0 -1
  130. package/dist/screen-size-context.d.ts +10 -3
  131. package/dist/screen-size-context.js.flow +12 -3
  132. package/dist/search-field.d.ts +1 -1
  133. package/dist/search-field.js.flow +1 -1
  134. package/dist/skins/skin-contract.css-mistica.js +86 -0
  135. package/dist/skins/skin-contract.css.d.ts +91 -0
  136. package/dist/snackbar.css-mistica.js +6 -6
  137. package/dist/sprinkles.css-mistica.js +595 -291
  138. package/dist/sprinkles.css.d.ts +71 -10
  139. package/dist/stack.css-mistica.js +25 -0
  140. package/dist/stack.css.d.ts +5 -0
  141. package/dist/stack.css.js.flow +7 -0
  142. package/dist/stack.css.ts.vanilla.js +11 -0
  143. package/dist/stack.js +11 -32
  144. package/dist/stepper.d.ts +1 -1
  145. package/dist/stepper.js.flow +1 -1
  146. package/dist/tag.css-mistica.js +1 -1
  147. package/dist/text-field-base.d.ts +3 -2
  148. package/dist/text-field-base.js.flow +3 -2
  149. package/dist/text-field.d.ts +1 -1
  150. package/dist/text-field.js.flow +1 -1
  151. package/dist/text.css-mistica.js +38 -0
  152. package/dist/text.css.d.ts +13 -0
  153. package/dist/text.css.js.flow +30 -0
  154. package/dist/text.css.ts.vanilla.js +11 -0
  155. package/dist/text.d.ts +1 -1
  156. package/dist/text.js +87 -164
  157. package/dist/text.js.flow +1 -1
  158. package/dist/theme-context-provider.js +52 -39
  159. package/dist/theme.d.ts +13 -13
  160. package/dist/theme.js.flow +13 -13
  161. package/dist/title.js +9 -10
  162. package/dist/touchable.css-mistica.js +24 -0
  163. package/dist/touchable.css.d.ts +3 -0
  164. package/dist/touchable.css.js.flow +5 -0
  165. package/dist/touchable.css.ts.vanilla.js +11 -0
  166. package/dist/touchable.d.ts +1 -0
  167. package/dist/touchable.js +58 -74
  168. package/dist/touchable.js.flow +1 -0
  169. package/dist/utils/color.d.ts +6 -0
  170. package/dist/utils/color.js +12 -4
  171. package/dist/utils/color.js.flow +6 -0
  172. package/dist/utils/utility-types.js.flow +3 -0
  173. package/dist/video.css-mistica.js +12 -0
  174. package/dist/video.css.d.ts +1 -0
  175. package/dist/video.css.js.flow +3 -0
  176. package/dist/video.d.ts +1 -1
  177. package/dist/video.js +17 -29
  178. package/dist/video.js.flow +5 -1
  179. package/dist-es/avatar.css-mistica.js +2 -3
  180. package/dist-es/badge.css-mistica.js +2 -2
  181. package/dist-es/box.js +22 -28
  182. package/dist-es/boxed.css-mistica.js +3 -0
  183. package/dist-es/boxed.css.ts.vanilla.js +2 -0
  184. package/dist-es/boxed.js +30 -36
  185. package/dist-es/button-group.css-mistica.js +4 -0
  186. package/dist-es/button-group.css.ts.vanilla.js +2 -0
  187. package/dist-es/button-group.js +24 -49
  188. package/dist-es/button-layout.css-mistica.js +12 -0
  189. package/dist-es/button-layout.css.ts.vanilla.js +2 -0
  190. package/dist-es/button-layout.js +77 -121
  191. package/dist-es/button.css-mistica.js +12 -0
  192. package/dist-es/button.css.ts.vanilla.js +2 -0
  193. package/dist-es/button.js +154 -359
  194. package/dist-es/callout.css-mistica.js +4 -0
  195. package/dist-es/{avatar.css.ts.vanilla.js → callout.css.ts.vanilla.js} +0 -0
  196. package/dist-es/callout.js +40 -75
  197. package/dist-es/card.css-mistica.js +4 -0
  198. package/dist-es/card.css.ts.vanilla.js +2 -0
  199. package/dist-es/card.js +148 -220
  200. package/dist-es/carousel.js +237 -251
  201. package/dist-es/checkbox.css-mistica.js +8 -0
  202. package/dist-es/checkbox.css.ts.vanilla.js +2 -0
  203. package/dist-es/checkbox.js +56 -101
  204. package/dist-es/chip.css-mistica.js +10 -0
  205. package/dist-es/chip.css.ts.vanilla.js +2 -0
  206. package/dist-es/chip.js +34 -79
  207. package/dist-es/circle.css-mistica.js +4 -0
  208. package/dist-es/circle.css.ts.vanilla.js +2 -0
  209. package/dist-es/circle.js +13 -39
  210. package/dist-es/credit-card-number-field.css-mistica.js +7 -0
  211. package/dist-es/credit-card-number-field.css.ts.vanilla.js +2 -0
  212. package/dist-es/credit-card-number-field.js +58 -86
  213. package/dist-es/cvv-field.css-mistica.js +4 -0
  214. package/dist-es/cvv-field.css.ts.vanilla.js +2 -0
  215. package/dist-es/cvv-field.js +63 -77
  216. package/dist-es/date-time-picker.css-mistica.js +3 -0
  217. package/dist-es/date-time-picker.css.ts.vanilla.js +2 -0
  218. package/dist-es/date-time-picker.js +63 -242
  219. package/dist-es/dialog.css-mistica.js +7 -0
  220. package/dist-es/dialog.css.ts.vanilla.js +2 -0
  221. package/dist-es/dialog.js +169 -264
  222. package/dist-es/divider.css-mistica.js +6 -0
  223. package/dist-es/divider.css.ts.vanilla.js +2 -0
  224. package/dist-es/divider.js +8 -32
  225. package/dist-es/double-field.css-mistica.js +7 -0
  226. package/dist-es/double-field.css.ts.vanilla.js +2 -0
  227. package/dist-es/double-field.js +21 -53
  228. package/dist-es/empty-state-card.css-mistica.js +4 -0
  229. package/dist-es/empty-state-card.css.ts.vanilla.js +2 -0
  230. package/dist-es/empty-state-card.js +36 -70
  231. package/dist-es/empty-state.css-mistica.js +9 -0
  232. package/dist-es/empty-state.css.ts.vanilla.js +2 -0
  233. package/dist-es/empty-state.js +77 -141
  234. package/dist-es/feedback.js +79 -78
  235. package/dist-es/fixed-footer-layout.js +50 -51
  236. package/dist-es/grid-layout.css-mistica.js +6 -0
  237. package/dist-es/grid-layout.css.ts.vanilla.js +2 -0
  238. package/dist-es/grid-layout.js +88 -211
  239. package/dist-es/header.js +22 -21
  240. package/dist-es/image.css-mistica.js +4 -0
  241. package/dist-es/image.css.ts.vanilla.js +2 -0
  242. package/dist-es/image.js +54 -75
  243. package/dist-es/inline.css-mistica.js +5 -0
  244. package/dist-es/inline.css.ts.vanilla.js +2 -0
  245. package/dist-es/inline.js +32 -57
  246. package/dist-es/list.js +73 -67
  247. package/dist-es/maybe-dismissable.js +29 -28
  248. package/dist-es/navigation-bar.js +231 -230
  249. package/dist-es/package-version.js +1 -1
  250. package/dist-es/placeholder.js +12 -13
  251. package/dist-es/radio-button.js +96 -92
  252. package/dist-es/responsive-layout.css-mistica.js +6 -0
  253. package/dist-es/responsive-layout.css.ts.vanilla.js +2 -0
  254. package/dist-es/responsive-layout.js +19 -55
  255. package/dist-es/skins/skin-contract.css-mistica.js +86 -0
  256. package/dist-es/snackbar.css-mistica.js +2 -2
  257. package/dist-es/sprinkles.css-mistica.js +595 -291
  258. package/dist-es/stack.css-mistica.js +5 -0
  259. package/dist-es/stack.css.ts.vanilla.js +2 -0
  260. package/dist-es/stack.js +15 -36
  261. package/dist-es/style.css +1 -1
  262. package/dist-es/tag.css-mistica.js +1 -1
  263. package/dist-es/text.css-mistica.js +9 -0
  264. package/dist-es/text.css.ts.vanilla.js +2 -0
  265. package/dist-es/text.js +83 -160
  266. package/dist-es/theme-context-provider.js +89 -76
  267. package/dist-es/title.js +16 -17
  268. package/dist-es/touchable.css-mistica.js +4 -0
  269. package/dist-es/touchable.css.ts.vanilla.js +2 -0
  270. package/dist-es/touchable.js +60 -84
  271. package/dist-es/utils/color.js +2 -2
  272. package/dist-es/video.css-mistica.js +3 -0
  273. package/dist-es/video.js +29 -41
  274. package/package.json +8 -5
package/dist/text.js CHANGED
@@ -10,49 +10,51 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  Text: function() {
13
- return n;
13
+ return r;
14
14
  },
15
15
  Text1: function() {
16
- return Z;
16
+ return xe;
17
17
  },
18
18
  Text10: function() {
19
- return U;
19
+ return te;
20
20
  },
21
21
  Text2: function() {
22
- return Y;
22
+ return me;
23
23
  },
24
24
  Text3: function() {
25
- return X;
25
+ return he;
26
26
  },
27
27
  Text4: function() {
28
- return Q;
28
+ return le;
29
29
  },
30
30
  Text5: function() {
31
- return K;
31
+ return se;
32
32
  },
33
33
  Text6: function() {
34
- return J;
34
+ return oe;
35
35
  },
36
36
  Text7: function() {
37
- return G;
37
+ return ne;
38
38
  },
39
39
  Text8: function() {
40
- return F;
40
+ return re;
41
41
  },
42
42
  Text9: function() {
43
- return V;
43
+ return ie;
44
44
  },
45
45
  default: function() {
46
- return n;
46
+ return r;
47
47
  }
48
48
  });
49
49
  var _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
50
50
  var _classnames = /*#__PURE__*/ _interopRequireDefault(require("classnames"));
51
- var _jssJs = require("./jss.js");
51
+ var _dynamic = require("@vanilla-extract/dynamic");
52
52
  var _themeVariantContextJs = require("./theme-variant-context.js");
53
53
  var _cssJs = require("./utils/css.js");
54
54
  var _domJs = require("./utils/dom.js");
55
55
  var _hooksJs = require("./hooks.js");
56
+ var _skinContractCssMisticaJs = require("./skins/skin-contract.css-mistica.js");
57
+ var _textCssMisticaJs = require("./text.css-mistica.js");
56
58
  var _jsxRuntimeJs = require("./_virtual/jsx-runtime.js");
57
59
  function _interopRequireDefault(obj) {
58
60
  return obj && obj.__esModule ? obj : {
@@ -150,223 +152,144 @@ function _objectSpreadProps(target, source) {
150
152
  }
151
153
  return target;
152
154
  }
153
- var C = (0, _jssJs.createUseStyles)(function(e) {
154
- var _obj;
155
- var i = {
156
- light: 300,
157
- regular: 400,
158
- medium: 500,
159
- bold: 700
160
- }, c = (_obj = {}, _defineProperty(_obj, e.colors.textPrimary, e.colors.textPrimaryInverse), _defineProperty(_obj, e.colors.textSecondary, e.colors.textSecondaryInverse), _defineProperty(_obj, e.colors.textLink, e.colors.textLinkInverse), _obj), s = function s(param) {
161
- var t = param.truncate;
162
- return t === !0 ? 1 : t || "initial";
163
- };
164
- return {
165
- text: _defineProperty({
166
- lineHeight: function lineHeight(param) {
167
- var t = param.desktopLineHeight;
168
- return (0, _cssJs.pxToRem)(t);
169
- },
170
- textTransform: function textTransform(param) {
171
- var t = param.transform;
172
- return t || "inherit";
173
- },
174
- fontSize: function fontSize(param) {
175
- var t = param.desktopSize;
176
- return (0, _cssJs.pxToRem)(t);
177
- },
178
- fontWeight: function fontWeight(param) {
179
- var t = param.weight;
180
- return t ? i[t] : "inherit";
181
- },
182
- color: function color(param) {
183
- var t = param.isInverse, tmp = param.color, o = tmp === void 0 ? e.colors.textPrimary : tmp;
184
- var h;
185
- return t && (h = c[o]) != null ? h : o;
186
- },
187
- textDecoration: function textDecoration(t) {
188
- var o;
189
- return (o = t.decoration) != null ? o : "inherit";
190
- },
191
- letterSpacing: function letterSpacing(param) {
192
- var t = param.letterSpacing;
193
- return t;
194
- },
195
- overflowWrap: function overflowWrap(param) {
196
- var t = param.wordBreak;
197
- return t ? "anywhere" : "inherit";
198
- },
199
- "@supports not (overflow-wrap: anywhere)": {
200
- wordBreak: function wordBreak(param) {
201
- var t = param.wordBreak;
202
- return t ? "break-word" : "inherit";
203
- }
204
- },
205
- hyphens: function hyphens(param) {
206
- var t = param.hyphens;
207
- return t;
208
- },
209
- margin: 0
210
- }, e.mq.tabletOrSmaller, {
211
- lineHeight: function lineHeight(param) {
212
- var t = param.mobileLineHeight;
213
- return (0, _cssJs.pxToRem)(t);
214
- },
215
- fontSize: function fontSize(param) {
216
- var t = param.mobileSize;
217
- return (0, _cssJs.pxToRem)(t);
218
- }
219
- }),
220
- truncate: {
221
- "-webkit-line-clamp": s,
222
- lineClamp: s,
223
- wordBreak: function wordBreak(param) {
224
- var t = param.truncate;
225
- return t === 1 || t === !0 ? "break-all" : "break-word";
226
- },
227
- "@supports (overflow-wrap: anywhere)": {
228
- overflowWrap: "anywhere",
229
- wordBreak: function wordBreak(param) {
230
- var t = param.truncate;
231
- return t === 1 || t === !0 ? "break-all" : "normal";
232
- }
233
- },
234
- display: "-webkit-box",
235
- boxOrient: "vertical",
236
- overflow: "hidden"
237
- }
238
- };
239
- }), n = function n(param) {
240
- var e = param.weight, i = param.color, c = param.decoration, s = param.truncate, t = param.transform, tmp = param.wordBreak, o = tmp === void 0 ? !0 : tmp, h = param.hyphens, tmp1 = param.as, b = tmp1 === void 0 ? "span" : tmp1, x = param.children, d = param.size, tmp2 = param.mobileSize, k = tmp2 === void 0 ? d : tmp2, tmp3 = param.desktopSize, p = tmp3 === void 0 ? d : tmp3, m = param.lineHeight, tmp4 = param.mobileLineHeight, S = tmp4 === void 0 ? m : tmp4, tmp5 = param.desktopLineHeight, f = tmp5 === void 0 ? m : tmp5, z = param.letterSpacing, H = param.id, L = param.role, T = param["aria-level"], v = param.dataAttributes;
241
- var y = (0, _themeVariantContextJs.useIsInverseVariant)(), g = C({
242
- isInverse: y,
243
- mobileSize: k,
244
- desktopSize: p,
245
- mobileLineHeight: S,
246
- desktopLineHeight: f,
247
- weight: e,
248
- color: i,
249
- decoration: c,
250
- transform: t,
251
- wordBreak: o,
252
- hyphens: h,
253
- letterSpacing: z,
254
- truncate: s
255
- });
256
- if (!x && x !== 0) return null;
257
- var P = (0, _classnames.default)(g.text, _defineProperty({}, g.truncate, !!s));
258
- return /*#__PURE__*/ _react.createElement(b, _objectSpread({
259
- className: P,
260
- id: H,
261
- role: L,
262
- "aria-level": T
263
- }, (0, _domJs.getPrefixedDataAttributes)(v)), x);
264
- }, u = function u(e) {
265
- return e.regular && "regular" || e.medium && "medium";
266
- }, w = function w(e) {
267
- return e.light && "light" || e.regular && "regular" || e.medium && "medium";
268
- }, U = function U(e) {
269
- var ref = (0, _hooksJs.useTheme)(), i = ref.textPresets;
270
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
155
+ var _obj;
156
+ var q = {
157
+ light: 300,
158
+ regular: 400,
159
+ medium: 500,
160
+ bold: 700
161
+ }, F = (_obj = {}, _defineProperty(_obj, _skinContractCssMisticaJs.vars.colors.textPrimary, _skinContractCssMisticaJs.vars.colors.textPrimaryInverse), _defineProperty(_obj, _skinContractCssMisticaJs.vars.colors.textSecondary, _skinContractCssMisticaJs.vars.colors.textSecondaryInverse), _defineProperty(_obj, _skinContractCssMisticaJs.vars.colors.textLink, _skinContractCssMisticaJs.vars.colors.textLinkInverse), _obj), G = function G(e) {
162
+ return e === !0 ? 1 : e || "initial";
163
+ }, r = function r(param) {
164
+ var e = param.weight, tmp = param.color, t = tmp === void 0 ? _skinContractCssMisticaJs.vars.colors.textPrimary : tmp, x = param.decoration, o = param.truncate, f = param.transform, tmp1 = param.wordBreak, g = tmp1 === void 0 ? !0 : tmp1, z = param.hyphens, tmp2 = param.as, w = tmp2 === void 0 ? "span" : tmp2, c = param.children, d = param.size, tmp3 = param.mobileSize, a = tmp3 === void 0 ? d : tmp3, tmp4 = param.desktopSize, u = tmp4 === void 0 ? d : tmp4, p = param.lineHeight, tmp5 = param.mobileLineHeight, S = tmp5 === void 0 ? p : tmp5, tmp6 = param.desktopLineHeight, k = tmp6 === void 0 ? p : tmp6, H = param.letterSpacing, T = param.id, v = param.role, P = param["aria-level"], y = param.dataAttributes;
165
+ var L;
166
+ var I = (0, _themeVariantContextJs.useIsInverseVariant)(), W = G(o);
167
+ if (!c && c !== 0) return null;
168
+ var _obj, _obj1;
169
+ var V = (0, _classnames.default)(_textCssMisticaJs.text, g ? _textCssMisticaJs.withWordBreak : _textCssMisticaJs.withoutWordBreak, (_obj = {}, _defineProperty(_obj, _textCssMisticaJs.truncateToOneLine, o === 1 || o === !0), _defineProperty(_obj, _textCssMisticaJs.truncateToMoreThanOneLine, o && o > 1), _obj)), C = (0, _dynamic.assignInlineVars)((_obj1 = {}, _defineProperty(_obj1, _textCssMisticaJs.vars.mobileSize, a ? (0, _cssJs.pxToRem)(a) : ""), _defineProperty(_obj1, _textCssMisticaJs.vars.mobileLineHeight, S ? (0, _cssJs.pxToRem)(S) : ""), _defineProperty(_obj1, _textCssMisticaJs.vars.desktopSize, u ? (0, _cssJs.pxToRem)(u) : ""), _defineProperty(_obj1, _textCssMisticaJs.vars.desktopLineHeight, k ? (0, _cssJs.pxToRem)(k) : ""), _obj1)), D = o ? (0, _dynamic.assignInlineVars)(_defineProperty({}, _textCssMisticaJs.vars.lineClamp, String(W))) : {};
170
+ return /*#__PURE__*/ _react.createElement(w, _objectSpreadProps(_objectSpread({
171
+ className: V,
172
+ id: T,
173
+ role: v,
174
+ "aria-level": P
175
+ }, (0, _domJs.getPrefixedDataAttributes)(y)), {
176
+ style: _objectSpreadProps(_objectSpread({}, C, D), {
177
+ margin: 0,
178
+ hyphens: z,
179
+ letterSpacing: H,
180
+ fontWeight: e ? q[e] : "inherit",
181
+ textTransform: f || "inherit",
182
+ textDecoration: x != null ? x : "inherit",
183
+ overflowWrap: g ? "anywhere" : "inherit",
184
+ color: I && (L = F[t]) != null ? L : t
185
+ })
186
+ }), c);
187
+ }, m = function m(e) {
188
+ if (e.light) return "light";
189
+ if (e.regular) return "regular";
190
+ if (e.medium) return "medium";
191
+ }, te = function te(e) {
192
+ var ref = (0, _hooksJs.useTheme)(), t = ref.textPresets;
193
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
271
194
  mobileSize: 32,
272
195
  mobileLineHeight: "40px",
273
196
  desktopSize: 64,
274
197
  desktopLineHeight: "72px",
275
- weight: i.text10.weight
198
+ weight: t.text10.weight
276
199
  }, e), {
277
200
  children: e.children
278
201
  }));
279
- }, V = function V(e) {
280
- var ref = (0, _hooksJs.useTheme)(), i = ref.textPresets;
281
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
202
+ }, ie = function ie(e) {
203
+ var ref = (0, _hooksJs.useTheme)(), t = ref.textPresets;
204
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
282
205
  mobileSize: 32,
283
206
  mobileLineHeight: "40px",
284
207
  desktopSize: 56,
285
208
  desktopLineHeight: "64px",
286
- weight: i.text9.weight
209
+ weight: t.text9.weight
287
210
  }, e), {
288
211
  children: e.children
289
212
  }));
290
- }, F = function F(e) {
291
- var ref = (0, _hooksJs.useTheme)(), i = ref.textPresets;
292
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
213
+ }, re = function re(e) {
214
+ var ref = (0, _hooksJs.useTheme)(), t = ref.textPresets;
215
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
293
216
  mobileSize: 32,
294
217
  mobileLineHeight: "40px",
295
218
  desktopSize: 48,
296
219
  desktopLineHeight: "56px",
297
- weight: i.text8.weight
220
+ weight: t.text8.weight
298
221
  }, e), {
299
222
  children: e.children
300
223
  }));
301
- }, G = function G(e) {
302
- var ref = (0, _hooksJs.useTheme)(), i = ref.textPresets;
303
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
224
+ }, ne = function ne(e) {
225
+ var ref = (0, _hooksJs.useTheme)(), t = ref.textPresets;
226
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
304
227
  mobileSize: 28,
305
228
  mobileLineHeight: "32px",
306
229
  desktopSize: 40,
307
230
  desktopLineHeight: "48px",
308
- weight: i.text7.weight
231
+ weight: t.text7.weight
309
232
  }, e), {
310
233
  children: e.children
311
234
  }));
312
- }, J = function J(e) {
313
- var ref = (0, _hooksJs.useTheme)(), i = ref.textPresets;
314
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
235
+ }, oe = function oe(e) {
236
+ var ref = (0, _hooksJs.useTheme)(), t = ref.textPresets;
237
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
315
238
  mobileSize: 24,
316
239
  mobileLineHeight: "32px",
317
240
  desktopSize: 32,
318
241
  desktopLineHeight: "40px",
319
- weight: i.text6.weight
242
+ weight: t.text6.weight
320
243
  }, e), {
321
244
  children: e.children
322
245
  }));
323
- }, K = function K(e) {
324
- var ref = (0, _hooksJs.useTheme)(), i = ref.textPresets;
325
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
246
+ }, se = function se(e) {
247
+ var ref = (0, _hooksJs.useTheme)(), t = ref.textPresets;
248
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
326
249
  mobileSize: 22,
327
250
  mobileLineHeight: "24px",
328
251
  desktopSize: 28,
329
252
  desktopLineHeight: "32px",
330
- weight: i.text5.weight
253
+ weight: t.text5.weight
331
254
  }, e), {
332
255
  children: e.children
333
256
  }));
334
- }, Q = function Q(e) {
335
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
257
+ }, le = function le(e) {
258
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
336
259
  mobileSize: 18,
337
260
  mobileLineHeight: "24px",
338
261
  desktopSize: 20,
339
262
  desktopLineHeight: "28px",
340
- weight: w(e)
263
+ weight: m(e)
341
264
  }, e), {
342
265
  children: e.children
343
266
  }));
344
- }, X = function X(e) {
345
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
267
+ }, he = function he(e) {
268
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
346
269
  mobileSize: 16,
347
270
  desktopSize: 18,
348
271
  lineHeight: "24px",
349
- weight: w(e)
272
+ weight: m(e)
350
273
  }, e), {
351
274
  children: e.children
352
275
  }));
353
- }, Y = function Y(e) {
354
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
276
+ }, me = function me(e) {
277
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
355
278
  mobileSize: 14,
356
279
  mobileLineHeight: "20px",
357
280
  desktopSize: 16,
358
281
  desktopLineHeight: "24px",
359
- weight: u(e)
282
+ weight: m(e)
360
283
  }, e), {
361
284
  children: e.children
362
285
  }));
363
- }, Z = function Z(e) {
364
- return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(n, _objectSpreadProps(_objectSpread({
286
+ }, xe = function xe(e) {
287
+ return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(r, _objectSpreadProps(_objectSpread({
365
288
  mobileSize: 12,
366
289
  mobileLineHeight: "16px",
367
290
  desktopSize: 14,
368
291
  desktopLineHeight: "20px",
369
- weight: u(e)
292
+ weight: m(e)
370
293
  }, e), {
371
294
  children: e.children
372
295
  }));
package/dist/text.js.flow CHANGED
@@ -20,7 +20,7 @@ export type TextPresetProps = {
20
20
  declare type TextProps = {
21
21
  ...$Exact<TextPresetProps>,
22
22
 
23
- weight?: FontWeight | boolean,
23
+ weight?: FontWeight,
24
24
 
25
25
  /**
26
26
  * in pixels, will be converted to rem in runtime