@telefonica/mistica 12.11.0 → 12.12.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 (333) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/avatar.css-mistica.js +2 -2
  3. package/dist/avatar.d.ts +3 -2
  4. package/dist/avatar.js +72 -17
  5. package/dist/avatar.js.flow +2 -1
  6. package/dist/badge.css-mistica.js +4 -4
  7. package/dist/badge.d.ts +2 -0
  8. package/dist/badge.js +49 -8
  9. package/dist/badge.js.flow +2 -0
  10. package/dist/boxed.js +5 -5
  11. package/dist/button-group.css-mistica.js +1 -1
  12. package/dist/button-group.js +7 -7
  13. package/dist/button-layout.css-mistica.js +15 -12
  14. package/dist/button-layout.css.d.ts +1 -0
  15. package/dist/button-layout.css.js.flow +1 -0
  16. package/dist/button-layout.js +10 -10
  17. package/dist/button.css-mistica.js +26 -26
  18. package/dist/button.js +127 -77
  19. package/dist/callout.css-mistica.js +2 -2
  20. package/dist/callout.d.ts +2 -1
  21. package/dist/callout.js +68 -16
  22. package/dist/callout.js.flow +2 -1
  23. package/dist/card.css-mistica.js +5 -5
  24. package/dist/card.js +47 -41
  25. package/dist/carousel.css-mistica.js +16 -19
  26. package/dist/carousel.js +153 -143
  27. package/dist/checkbox.css-mistica.js +6 -6
  28. package/dist/checkbox.js +1 -1
  29. package/dist/chip.css-mistica.js +2 -2
  30. package/dist/chip.d.ts +7 -11
  31. package/dist/chip.js +65 -22
  32. package/dist/chip.js.flow +11 -6
  33. package/dist/circle.css-mistica.js +1 -1
  34. package/dist/credit-card-number-field.css-mistica.js +3 -3
  35. package/dist/cvv-field.css-mistica.js +1 -1
  36. package/dist/date-time-picker.js +2 -2
  37. package/dist/dialog.css-mistica.js +6 -6
  38. package/dist/dialog.d.ts +2 -10
  39. package/dist/dialog.js +1 -0
  40. package/dist/dialog.js.flow +6 -4
  41. package/dist/double-field.css-mistica.js +5 -4
  42. package/dist/empty-state-card.css-mistica.js +1 -1
  43. package/dist/empty-state.css-mistica.js +2 -2
  44. package/dist/empty-state.js +5 -5
  45. package/dist/fade-in.d.ts +2 -0
  46. package/dist/fade-in.js +59 -6
  47. package/dist/fade-in.js.flow +2 -0
  48. package/dist/feedback.css-mistica.js +1 -1
  49. package/dist/feedback.js +130 -115
  50. package/dist/fixed-footer-layout.css-mistica.js +36 -0
  51. package/dist/fixed-footer-layout.css.d.ts +9 -0
  52. package/dist/fixed-footer-layout.css.js.flow +17 -0
  53. package/dist/fixed-footer-layout.css.ts.vanilla.js +11 -0
  54. package/dist/fixed-footer-layout.js +35 -84
  55. package/dist/header.js +99 -129
  56. package/dist/highlighted-card.css-mistica.js +5 -5
  57. package/dist/highlighted-card.d.ts +1 -1
  58. package/dist/highlighted-card.js +20 -15
  59. package/dist/highlighted-card.js.flow +1 -1
  60. package/dist/icon-button.css-mistica.js +13 -0
  61. package/dist/icon-button.css.d.ts +1 -0
  62. package/dist/icon-button.css.js.flow +3 -0
  63. package/dist/icon-button.css.ts.vanilla.js +11 -0
  64. package/dist/icon-button.d.ts +2 -1
  65. package/dist/icon-button.js +51 -28
  66. package/dist/icon-button.js.flow +2 -1
  67. package/dist/icons/icon-error.css-mistica.js +20 -0
  68. package/dist/icons/icon-error.css.d.ts +2 -0
  69. package/dist/icons/icon-error.css.js.flow +4 -0
  70. package/dist/icons/icon-error.css.ts.vanilla.js +11 -0
  71. package/dist/icons/icon-error.js +22 -33
  72. package/dist/icons/icon-info.js +16 -28
  73. package/dist/icons/icon-success-vivo.js +10 -20
  74. package/dist/icons/icon-success.js +28 -44
  75. package/dist/image.css-mistica.js +3 -3
  76. package/dist/index.d.ts +2 -0
  77. package/dist/index.js +8 -0
  78. package/dist/index.js.flow +2 -0
  79. package/dist/list.css-mistica.js +7 -7
  80. package/dist/list.js +112 -71
  81. package/dist/loading-bar.css-mistica.js +6 -6
  82. package/dist/loading-bar.d.ts +2 -0
  83. package/dist/loading-bar.js +60 -6
  84. package/dist/loading-bar.js.flow +5 -1
  85. package/dist/maybe-dismissable.css-mistica.js +24 -0
  86. package/dist/maybe-dismissable.css.d.ts +3 -0
  87. package/dist/maybe-dismissable.css.js.flow +5 -0
  88. package/dist/maybe-dismissable.css.ts.vanilla.js +11 -0
  89. package/dist/maybe-dismissable.js +16 -51
  90. package/dist/media-queries.css-mistica.js +37 -5
  91. package/dist/menu.css-mistica.js +34 -0
  92. package/dist/menu.css.d.ts +11 -0
  93. package/dist/menu.css.js.flow +19 -0
  94. package/dist/menu.css.ts.vanilla.js +11 -0
  95. package/dist/menu.d.ts +2 -0
  96. package/dist/menu.js +53 -99
  97. package/dist/menu.js.flow +2 -0
  98. package/dist/navigation-bar.css-mistica.js +79 -0
  99. package/dist/navigation-bar.css.d.ts +17 -0
  100. package/dist/navigation-bar.css.js.flow +26 -0
  101. package/dist/navigation-bar.css.ts.vanilla.js +11 -0
  102. package/dist/navigation-bar.js +206 -334
  103. package/dist/navigation-breadcrumbs.css-mistica.js +27 -0
  104. package/dist/navigation-breadcrumbs.css.d.ts +5 -0
  105. package/dist/navigation-breadcrumbs.css.js.flow +7 -0
  106. package/dist/navigation-breadcrumbs.css.ts.vanilla.js +11 -0
  107. package/dist/navigation-breadcrumbs.js +20 -38
  108. package/dist/overlay.d.ts +2 -0
  109. package/dist/overlay.js +37 -11
  110. package/dist/overlay.js.flow +2 -0
  111. package/dist/package-version.js +1 -1
  112. package/dist/password-field.css-mistica.js +13 -0
  113. package/dist/password-field.css.d.ts +1 -0
  114. package/dist/password-field.css.js.flow +3 -0
  115. package/dist/password-field.css.ts.vanilla.js +11 -0
  116. package/dist/password-field.js +39 -55
  117. package/dist/popover.css-mistica.js +51 -0
  118. package/dist/popover.css.d.ts +12 -0
  119. package/dist/popover.css.js.flow +14 -0
  120. package/dist/popover.css.ts.vanilla.js +11 -0
  121. package/dist/popover.d.ts +2 -1
  122. package/dist/popover.js +97 -118
  123. package/dist/popover.js.flow +2 -1
  124. package/dist/progress-bar.css-mistica.js +3 -3
  125. package/dist/progress-bar.d.ts +2 -0
  126. package/dist/progress-bar.js +60 -7
  127. package/dist/progress-bar.js.flow +2 -0
  128. package/dist/radio-button.css-mistica.js +39 -0
  129. package/dist/radio-button.css.d.ts +6 -0
  130. package/dist/radio-button.css.js.flow +8 -0
  131. package/dist/radio-button.css.ts.vanilla.js +11 -0
  132. package/dist/radio-button.d.ts +1 -0
  133. package/dist/radio-button.js +81 -125
  134. package/dist/radio-button.js.flow +1 -0
  135. package/dist/responsive-layout.css-mistica.js +7 -4
  136. package/dist/responsive-layout.css.d.ts +1 -0
  137. package/dist/responsive-layout.css.js.flow +1 -0
  138. package/dist/responsive-layout.d.ts +2 -0
  139. package/dist/responsive-layout.js +19 -11
  140. package/dist/responsive-layout.js.flow +2 -0
  141. package/dist/screen-reader-only.css-mistica.js +2 -2
  142. package/dist/select.css-mistica.js +60 -0
  143. package/dist/select.css.d.ts +16 -0
  144. package/dist/select.css.js.flow +30 -0
  145. package/dist/select.css.ts.vanilla.js +11 -0
  146. package/dist/select.js +150 -272
  147. package/dist/skeleton-base.js +13 -32
  148. package/dist/skeletons.css-mistica.js +1 -1
  149. package/dist/skeletons.js +52 -42
  150. package/dist/skins/skin-contract.css.js.flow +1 -0
  151. package/dist/snackbar.css-mistica.js +4 -4
  152. package/dist/snackbar.d.ts +2 -0
  153. package/dist/snackbar.js +70 -23
  154. package/dist/snackbar.js.flow +2 -0
  155. package/dist/spinner.css-mistica.js +2 -2
  156. package/dist/spinner.js +14 -11
  157. package/dist/sprinkles.css-mistica.js +217 -479
  158. package/dist/sprinkles.css.d.ts +0 -25
  159. package/dist/stepper.css-mistica.js +7 -7
  160. package/dist/stepper.d.ts +2 -0
  161. package/dist/stepper.js +52 -11
  162. package/dist/stepper.js.flow +2 -0
  163. package/dist/switch-component.css-mistica.js +54 -0
  164. package/dist/switch-component.css.d.ts +14 -0
  165. package/dist/switch-component.css.js.flow +43 -0
  166. package/dist/switch-component.css.ts.vanilla.js +11 -0
  167. package/dist/switch-component.js +35 -96
  168. package/dist/tabs.css-mistica.js +6 -6
  169. package/dist/tabs.js +16 -15
  170. package/dist/tag.css-mistica.js +2 -2
  171. package/dist/tag.js +5 -5
  172. package/dist/text-field-base.css-mistica.js +63 -0
  173. package/dist/text-field-base.css.d.ts +17 -0
  174. package/dist/text-field-base.css.js.flow +19 -0
  175. package/dist/text-field-base.css.ts.vanilla.js +11 -0
  176. package/dist/text-field-base.js +120 -314
  177. package/dist/text-field-components.css-mistica.js +69 -0
  178. package/dist/text-field-components.css.d.ts +18 -0
  179. package/dist/text-field-components.css.js.flow +20 -0
  180. package/dist/text-field-components.css.ts.vanilla.js +11 -0
  181. package/dist/text-field-components.d.ts +0 -4
  182. package/dist/text-field-components.js +46 -159
  183. package/dist/text-field-components.js.flow +0 -4
  184. package/dist/text-link.css-mistica.js +3 -3
  185. package/dist/text.js +159 -92
  186. package/dist/theme-context-provider.js +1 -1
  187. package/dist/title.js +44 -12
  188. package/dist/tooltip.css-mistica.js +7 -7
  189. package/dist/tooltip.d.ts +2 -0
  190. package/dist/tooltip.js +62 -36
  191. package/dist/tooltip.js.flow +2 -0
  192. package/dist/touchable.css-mistica.js +3 -3
  193. package/dist/touchable.js +10 -10
  194. package/dist/utils/animation.d.ts +0 -6
  195. package/dist/utils/animation.js +18 -55
  196. package/dist/utils/animation.js.flow +0 -8
  197. package/dist/utils/aspect-ratio-support.css-mistica.js +29 -0
  198. package/dist/utils/aspect-ratio-support.css.d.ts +6 -0
  199. package/dist/utils/aspect-ratio-support.css.js.flow +11 -0
  200. package/dist/utils/aspect-ratio-support.css.ts.vanilla.js +11 -0
  201. package/dist/utils/aspect-ratio-support.js +37 -56
  202. package/dist/utils/color.d.ts +1 -1
  203. package/dist/utils/color.js.flow +1 -1
  204. package/dist/utils/dom.d.ts +1 -1
  205. package/dist/utils/dom.js +7 -5
  206. package/dist/utils/dom.js.flow +2 -1
  207. package/dist/video.css-mistica.js +2 -2
  208. package/dist-es/avatar.css-mistica.js +2 -2
  209. package/dist-es/avatar.js +77 -22
  210. package/dist-es/badge.css-mistica.js +2 -2
  211. package/dist-es/badge.js +56 -15
  212. package/dist-es/boxed.js +5 -5
  213. package/dist-es/button-group.css-mistica.js +1 -1
  214. package/dist-es/button-group.js +10 -10
  215. package/dist-es/button-layout.css-mistica.js +7 -7
  216. package/dist-es/button-layout.js +19 -19
  217. package/dist-es/button.css-mistica.js +9 -9
  218. package/dist-es/button.js +152 -102
  219. package/dist-es/callout.css-mistica.js +2 -2
  220. package/dist-es/callout.js +79 -27
  221. package/dist-es/card.css-mistica.js +2 -2
  222. package/dist-es/card.js +78 -72
  223. package/dist-es/carousel.css-mistica.js +2 -2
  224. package/dist-es/carousel.js +191 -181
  225. package/dist-es/checkbox.css-mistica.js +5 -5
  226. package/dist-es/checkbox.js +1 -1
  227. package/dist-es/chip.css-mistica.js +2 -2
  228. package/dist-es/chip.js +79 -36
  229. package/dist-es/circle.css-mistica.js +1 -1
  230. package/dist-es/credit-card-number-field.css-mistica.js +3 -3
  231. package/dist-es/cvv-field.css-mistica.js +1 -1
  232. package/dist-es/date-time-picker.js +1 -1
  233. package/dist-es/dialog.css-mistica.js +5 -5
  234. package/dist-es/dialog.js +1 -0
  235. package/dist-es/double-field.css-mistica.js +5 -4
  236. package/dist-es/empty-state-card.css-mistica.js +1 -1
  237. package/dist-es/empty-state.css-mistica.js +2 -2
  238. package/dist-es/empty-state.js +18 -18
  239. package/dist-es/fade-in.js +60 -7
  240. package/dist-es/feedback.css-mistica.js +1 -1
  241. package/dist-es/feedback.js +170 -155
  242. package/dist-es/fixed-footer-layout.css-mistica.js +7 -0
  243. package/dist-es/fixed-footer-layout.css.ts.vanilla.js +2 -0
  244. package/dist-es/fixed-footer-layout.js +47 -96
  245. package/dist-es/header.js +116 -146
  246. package/dist-es/highlighted-card.css-mistica.js +5 -5
  247. package/dist-es/highlighted-card.js +44 -39
  248. package/dist-es/icon-button.css-mistica.js +4 -0
  249. package/dist-es/icon-button.css.ts.vanilla.js +2 -0
  250. package/dist-es/icon-button.js +41 -26
  251. package/dist-es/icons/icon-error.css-mistica.js +3 -0
  252. package/dist-es/icons/icon-error.css.ts.vanilla.js +2 -0
  253. package/dist-es/icons/icon-error.js +46 -57
  254. package/dist-es/icons/icon-info.js +28 -40
  255. package/dist-es/icons/icon-success-vivo.js +18 -28
  256. package/dist-es/icons/icon-success.js +45 -56
  257. package/dist-es/image.css-mistica.js +2 -2
  258. package/dist-es/index.js +1738 -1736
  259. package/dist-es/list.css-mistica.js +2 -2
  260. package/dist-es/list.js +126 -85
  261. package/dist-es/loading-bar.css-mistica.js +2 -2
  262. package/dist-es/loading-bar.js +73 -19
  263. package/dist-es/maybe-dismissable.css-mistica.js +4 -0
  264. package/dist-es/maybe-dismissable.css.ts.vanilla.js +2 -0
  265. package/dist-es/maybe-dismissable.js +24 -59
  266. package/dist-es/media-queries.css-mistica.js +3 -3
  267. package/dist-es/menu.css-mistica.js +11 -0
  268. package/dist-es/menu.css.ts.vanilla.js +2 -0
  269. package/dist-es/menu.js +61 -107
  270. package/dist-es/navigation-bar.css-mistica.js +17 -0
  271. package/dist-es/navigation-bar.css.ts.vanilla.js +2 -0
  272. package/dist-es/navigation-bar.js +253 -381
  273. package/dist-es/navigation-breadcrumbs.css-mistica.js +4 -0
  274. package/dist-es/navigation-breadcrumbs.css.ts.vanilla.js +2 -0
  275. package/dist-es/navigation-breadcrumbs.js +34 -52
  276. package/dist-es/overlay.js +41 -15
  277. package/dist-es/package-version.js +1 -1
  278. package/dist-es/password-field.css-mistica.js +4 -0
  279. package/dist-es/password-field.css.ts.vanilla.js +2 -0
  280. package/dist-es/password-field.js +45 -61
  281. package/dist-es/popover.css-mistica.js +4 -0
  282. package/dist-es/popover.css.ts.vanilla.js +2 -0
  283. package/dist-es/popover.js +121 -141
  284. package/dist-es/progress-bar.css-mistica.js +2 -2
  285. package/dist-es/progress-bar.js +68 -15
  286. package/dist-es/radio-button.css-mistica.js +10 -0
  287. package/dist-es/radio-button.css.ts.vanilla.js +2 -0
  288. package/dist-es/radio-button.js +99 -143
  289. package/dist-es/responsive-layout.css-mistica.js +2 -2
  290. package/dist-es/responsive-layout.js +23 -15
  291. package/dist-es/screen-reader-only.css-mistica.js +2 -2
  292. package/dist-es/select.css-mistica.js +22 -0
  293. package/dist-es/select.css.ts.vanilla.js +2 -0
  294. package/dist-es/select.js +177 -299
  295. package/dist-es/skeleton-base.js +17 -36
  296. package/dist-es/skeletons.css-mistica.js +1 -1
  297. package/dist-es/skeletons.js +66 -56
  298. package/dist-es/snackbar.css-mistica.js +2 -2
  299. package/dist-es/snackbar.js +89 -42
  300. package/dist-es/spinner.css-mistica.js +2 -2
  301. package/dist-es/spinner.js +14 -11
  302. package/dist-es/sprinkles.css-mistica.js +217 -479
  303. package/dist-es/stepper.css-mistica.js +2 -2
  304. package/dist-es/stepper.js +68 -27
  305. package/dist-es/style.css +1 -1
  306. package/dist-es/switch-component.css-mistica.js +22 -0
  307. package/dist-es/switch-component.css.ts.vanilla.js +2 -0
  308. package/dist-es/switch-component.js +51 -112
  309. package/dist-es/tabs.css-mistica.js +6 -6
  310. package/dist-es/tabs.js +24 -23
  311. package/dist-es/tag.css-mistica.js +2 -2
  312. package/dist-es/tag.js +11 -11
  313. package/dist-es/text-field-base.css-mistica.js +4 -0
  314. package/dist-es/text-field-base.css.ts.vanilla.js +2 -0
  315. package/dist-es/text-field-base.js +134 -328
  316. package/dist-es/text-field-components.css-mistica.js +4 -0
  317. package/dist-es/text-field-components.css.ts.vanilla.js +2 -0
  318. package/dist-es/text-field-components.js +56 -157
  319. package/dist-es/text-link.css-mistica.js +3 -3
  320. package/dist-es/text.js +159 -92
  321. package/dist-es/theme-context-provider.js +1 -1
  322. package/dist-es/title.js +50 -18
  323. package/dist-es/tooltip.css-mistica.js +3 -3
  324. package/dist-es/tooltip.js +90 -64
  325. package/dist-es/touchable.css-mistica.js +2 -2
  326. package/dist-es/touchable.js +10 -10
  327. package/dist-es/utils/animation.js +28 -62
  328. package/dist-es/utils/aspect-ratio-support.css-mistica.js +6 -0
  329. package/dist-es/utils/aspect-ratio-support.css.ts.vanilla.js +2 -0
  330. package/dist-es/utils/aspect-ratio-support.js +34 -58
  331. package/dist-es/utils/dom.js +7 -5
  332. package/dist-es/video.css-mistica.js +2 -2
  333. package/package.json +2 -1
@@ -123,184 +123,19 @@ function _unsupportedIterableToArray(o, minLen) {
123
123
  if (n === "Map" || n === "Set") return Array.from(n);
124
124
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
125
125
  }
126
- import * as l from "react";
127
- import { createUseStyles as B } from "./jss.js";
128
- import { FieldContainer as ne, HelperText as oe, Label as ae, LABEL_LEFT_POSITION as L, LABEL_SCALE_MOBILE as re, LABEL_SCALE_DESKTOP as le } from "./text-field-components.js";
126
+ import * as s from "react";
127
+ import { FieldContainer as ne, HelperText as re, Label as se } from "./text-field-components.js";
128
+ import { LABEL_LEFT_POSITION as R, LABEL_SCALE_MOBILE as oe, LABEL_SCALE_DESKTOP as le } from "./text-field-components.css-mistica.js";
129
129
  import { Text3 as O } from "./text.js";
130
- import { isSafari as se, isRunningAcceptanceTest as _, isFirefox as R, isIos as de } from "./utils/platform.js";
131
- import { useAriaId as P, useTheme as $, useScreenSize as ce, useIsomorphicLayoutEffect as pe } from "./hooks.js";
132
- import ge from "classnames";
130
+ import { isSafari as ae, isIos as de, isRunningAcceptanceTest as z, isFirefox as ce } from "./utils/platform.js";
131
+ import { useAriaId as W, useTheme as F, useScreenSize as fe, useIsomorphicLayoutEffect as he } from "./hooks.js";
132
+ import T from "classnames";
133
133
  import { combineRefs as D } from "./utils/common.js";
134
- import { jsxs as fe, jsx as a } from "./_virtual/jsx-runtime.js";
135
- var v = function(i) {
136
- return {
137
- background: "none",
138
- border: 0,
139
- outline: 0,
140
- fontSize: "inherit",
141
- lineHeight: "inherit",
142
- paddingRight: function(param) {
143
- var e = param.endIcon;
144
- return e ? 0 : 16;
145
- },
146
- paddingLeft: function(param) {
147
- var e = param.prefix, o = param.startIcon;
148
- return e ? 0 : o ? 48 : 12;
149
- },
150
- fontFamily: function(param) {
151
- var e = param.type;
152
- return e === "password" && de(i.platformOverrides) && !_(i.platformOverrides) ? "arial" : "inherit";
153
- },
154
- color: i.colors.textPrimary,
155
- caretColor: i.colors.controlActivated,
156
- width: "100%",
157
- minWidth: 0,
158
- textOverflow: "ellipsis",
159
- "&::placeholder ": {
160
- opacity: 0,
161
- transition: "opacity 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms"
162
- },
163
- "&:focus": {
164
- "&::placeholder ": {
165
- opacity: 0.5
166
- }
167
- },
168
- boxShadow: "none"
169
- };
170
- }, ue = B(function(i) {
171
- var _obj, _obj1, _obj2;
172
- return {
173
- container: {
174
- display: "flex",
175
- flexDirection: "column",
176
- minWidth: 96
177
- },
178
- fullWidth: {
179
- width: "100%",
180
- display: "inline-flex",
181
- alignSelf: function(param) {
182
- var e = param.prefix;
183
- return e ? "baseline" : "initial";
184
- },
185
- "& > div": {
186
- width: "100%",
187
- display: "inline-flex"
188
- }
189
- },
190
- textArea: _objectSpread((_obj = {
191
- resize: "none",
192
- padding: 0,
193
- marginTop: function(param) {
194
- var e = param.hasLabel;
195
- return e ? 28 : 16;
196
- }
197
- }, _defineProperty(_obj, i.mq.tabletOrSmaller, {
198
- marginTop: function(param) {
199
- var e = param.hasLabel;
200
- return e ? 24 : 16;
201
- }
202
- }), _defineProperty(_obj, "paddingBottom", "8px"), _obj), v(i)),
203
- input: _objectSpreadProps(_objectSpread((_obj1 = {
204
- position: "relative",
205
- paddingTop: function(param) {
206
- var e = param.hasLabel;
207
- return e ? 28 : 16;
208
- }
209
- }, _defineProperty(_obj1, i.mq.tabletOrSmaller, {
210
- paddingTop: function(param) {
211
- var e = param.hasLabel;
212
- return e ? 24 : 16;
213
- }
214
- }), _defineProperty(_obj1, "paddingBottom", function(param) {
215
- var e = param.hasLabel;
216
- return e ? 8 : 16;
217
- }), _defineProperty(_obj1, "height", "100%"), _obj1), v(i)), {
218
- WebkitAppearance: "none",
219
- "&::-webkit-search-cancel-button": {
220
- WebkitAppearance: "none"
221
- },
222
- "&::-webkit-search-decoration": {
223
- WebkitAppearance: "none"
224
- },
225
- "&::-webkit-calendar-picker-indicator": {
226
- position: "absolute",
227
- top: 0,
228
- left: -24,
229
- right: 0,
230
- bottom: 0,
231
- width: "auto",
232
- height: "auto",
233
- opacity: 0,
234
- color: "transparent",
235
- background: "transparent"
236
- },
237
- '&[type="month"]:not(:valid):not(:focus)::-webkit-datetime-edit': {
238
- color: "transparent",
239
- opacity: 0
240
- },
241
- '&[type="date"]:not(:valid):not(:focus)::-webkit-datetime-edit': {
242
- color: "transparent",
243
- opacity: 0
244
- },
245
- '&[type="datetime-local"]:not(:valid):not(:focus)::-webkit-datetime-edit': {
246
- color: "transparent",
247
- opacity: 0
248
- },
249
- '&[type="month"]:not(:valid):not(:focus)': R() ? {
250
- color: "transparent"
251
- } : {},
252
- '&[type="date"]:not(:valid):not(:focus)': R() ? {
253
- color: "transparent"
254
- } : {},
255
- '&[type="datetime-local"]:not(:valid):not(:focus)': R() ? {
256
- color: "transparent"
257
- } : {},
258
- "&:-webkit-autofill": {
259
- textFillColor: i.colors.textPrimary,
260
- transitionProperty: "background-color",
261
- transitionDelay: "99999s"
262
- }
263
- }),
264
- endIcon: {
265
- paddingLeft: 8,
266
- paddingRight: 16,
267
- display: "flex",
268
- alignItems: "center",
269
- alignSelf: "center"
270
- },
271
- startIcon: {
272
- pointerEvents: "none",
273
- paddingLeft: 12,
274
- paddingRight: 12,
275
- display: "flex",
276
- alignItems: "center",
277
- height: "100%",
278
- position: "absolute"
279
- },
280
- prefix: (_obj2 = {
281
- alignSelf: function(param) {
282
- var e = param.prefixAlignSelf;
283
- return e;
284
- },
285
- paddingTop: function(param) {
286
- var e = param.hasLabel;
287
- return e ? 28 : 16;
288
- }
289
- }, _defineProperty(_obj2, i.mq.tabletOrSmaller, {
290
- paddingTop: function(param) {
291
- var e = param.hasLabel;
292
- return e ? 24 : 16;
293
- }
294
- }), _defineProperty(_obj2, "paddingBottom", function(param) {
295
- var e = param.hasLabel;
296
- return e ? 8 : 16;
297
- }), _defineProperty(_obj2, "paddingLeft", 12), _defineProperty(_obj2, "paddingRight", 16), _defineProperty(_obj2, "opacity", function(param) {
298
- var e = param.inputState;
299
- return e === "default" ? 0 : 1;
300
- }), _defineProperty(_obj2, "transition", "opacity 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms"), _obj2)
301
- };
302
- }), E = /*#__PURE__*/ l.forwardRef(function(_param, U) {
303
- var i = _param.error, e = _param.helperText, o = _param.label, b = _param.inputProps, k = _param.inputRef, s = _param.defaultValue, n = _param.value, p = _param.onFocus, x = _param.onBlur, C = _param.inputComponent, g = _param.prefix, f = _param.startIcon, t = _param.endIcon, u = _param.endIconOverlay, w = _param.shrinkLabel, tmp = _param.multiline, y = tmp === void 0 ? !1 : tmp, T = _param.focus, j = _param.fieldRef, S = _param.maxLength, H = _param.id, K = _param.autoComplete, M = _param.fullWidth, r = _objectWithoutProperties(_param, [
134
+ import { startIcon as me, prefix as ge, prefixWithLabel as ue, prefixWithoutLabel as Se, fullWidth as pe, textArea as be, textAreaWithLabel as ye, textAreaWithoutLabel as xe, input as Le, inputWithLabel as Ce, inputWithoutLabel as Te, inputFirefoxStyles as Ae, endIcon as Ee, menuItem as Re, menuItemSelected as Ie, suggestionsContainer as Oe } from "./text-field-base.css-mistica.js";
135
+ import { sprinkles as We } from "./sprinkles.css-mistica.js";
136
+ import { jsxs as Fe, jsx as i } from "./_virtual/jsx-runtime.js";
137
+ var I = /*#__PURE__*/ s.forwardRef(function(_param, Q) {
138
+ var c = _param.error, A = _param.helperText, n = _param.label, g = _param.inputProps, y = _param.inputRef, o = _param.defaultValue, t = _param.value, u = _param.onFocus, S = _param.onBlur, f = _param.inputComponent, h = _param.prefix, e = _param.startIcon, a = _param.endIcon, x = _param.endIconOverlay, H = _param.shrinkLabel, tmp = _param.multiline, L = tmp === void 0 ? !1 : tmp, C = _param.focus, K = _param.fieldRef, p = _param.maxLength, M = _param.id, G = _param.autoComplete, J = _param.fullWidth, r = _objectWithoutProperties(_param, [
304
139
  "error",
305
140
  "helperText",
306
141
  "label",
@@ -324,213 +159,184 @@ var v = function(i) {
324
159
  "autoComplete",
325
160
  "fullWidth"
326
161
  ]);
327
- var N;
328
- var q = P(H), ref = _slicedToArray(l.useState((s == null ? void 0 : s.length) || (n == null ? void 0 : n.length) ? "filled" : "default"), 2), m = ref[0], c = ref[1], ref1 = $(), G = ref1.colors, ref2 = ce(), J = ref2.isTabletOrSmaller, ref3 = _slicedToArray(l.useState((N = s == null ? void 0 : s.length) != null ? N : 0), 2), Q = ref3[0], z = ref3[1], X = !!o || !r.required, I = w || (r.type === "date" || r.type === "datetime-local" || r.type === "month") && !r.required, ref4 = _slicedToArray(l.useState("baseline"), 2), Y = ref4[0], Z = ref4[1];
329
- pe(function() {
330
- se() && Z("initial");
331
- }, []);
332
- var h = ue({
333
- inputState: m,
334
- error: i,
335
- endIcon: t,
336
- startIcon: f,
337
- shrinkLabel: I,
338
- hasLabel: X,
339
- prefix: g,
340
- multiline: y,
341
- type: r.type,
342
- disabled: r.disabled,
343
- prefixAlignSelf: Y
344
- });
345
- l.useEffect(function() {
346
- m !== "focused" && (n == null ? void 0 : n.length) && (z(n.length), c("filled")), T && c("focused"), T === !1 && !(n != null && n.length) && c("default"), T === !1 && (n == null ? void 0 : n.length) && c("filled");
162
+ var B;
163
+ var N = W(M), ref = _slicedToArray(s.useState((o == null ? void 0 : o.length) || (t == null ? void 0 : t.length) ? "filled" : "default"), 2), m = ref[0], d = ref[1], ref1 = F(), U = ref1.colors, ref2 = fe(), X = ref2.isTabletOrSmaller, ref3 = _slicedToArray(s.useState((B = o == null ? void 0 : o.length) != null ? B : 0), 2), Y = ref3[0], w = ref3[1], E = !!n || !r.required, P = F(), k = H || (r.type === "date" || r.type === "datetime-local" || r.type === "month") && !r.required, ref4 = _slicedToArray(s.useState("baseline"), 2), Z = ref4[0], $ = ref4[1];
164
+ he(function() {
165
+ ae() && $("initial");
166
+ }, []), s.useEffect(function() {
167
+ m !== "focused" && (t == null ? void 0 : t.length) && (w(t.length), d("filled")), C && d("focused"), C === !1 && !(t != null && t.length) && d("default"), C === !1 && (t == null ? void 0 : t.length) && d("filled");
347
168
  }, [
348
169
  m,
349
- n,
350
- T
351
- ]), l.useEffect(function() {
352
- r.autoFocus && c("focused");
170
+ t,
171
+ C
172
+ ]), s.useEffect(function() {
173
+ r.autoFocus && d("focused");
353
174
  }, [
354
175
  r.autoFocus
355
176
  ]);
356
- var V = y ? "textarea" : "input", ee = C ? {
357
- inputRef: k
177
+ var v = L ? "textarea" : "input", V = f ? {
178
+ inputRef: y
358
179
  } : {
359
- ref: D(U, k)
360
- }, A = _objectSpread(_objectSpreadProps(_objectSpread({}, r), {
361
- maxLength: S,
362
- autoComplete: K
363
- }), b), F = I || m === "focused" || m === "filled", te = F ? J ? re : le : 1, ie = {
364
- left: f ? 48 : L,
365
- width: "calc(((100% - ".concat(L + (f ? 48 : L), "px)) / ").concat(te, ")"),
366
- paddingRight: t && !F ? 36 : 0
367
- };
368
- return /* @__PURE__ */ fe(ne, {
180
+ ref: D(Q, y)
181
+ }, b = _objectSpread(_objectSpreadProps(_objectSpread({}, r), {
182
+ maxLength: p,
183
+ autoComplete: G
184
+ }), g), _ = k || m === "focused" || m === "filled", ee = _ ? X ? oe : le : 1, te = {
185
+ left: e ? 48 : R,
186
+ width: "calc(((100% - ".concat(R + (e ? 48 : R), "px)) / ").concat(ee, ")"),
187
+ paddingRight: a && !_ ? 36 : 0
188
+ }, q = We({
189
+ paddingRight: a ? 0 : 16,
190
+ paddingLeft: h ? 0 : e ? 48 : 12
191
+ }), ie = r.type === "password" && de(P.platformOverrides) && !z(P.platformOverrides) ? "arial" : "inherit";
192
+ return /* @__PURE__ */ Fe(ne, {
369
193
  disabled: r.disabled,
370
- helperText: /* @__PURE__ */ a(oe, {
371
- error: i,
372
- leftText: e,
373
- rightText: y && S ? "".concat(Q, "/").concat(S) : void 0
194
+ helperText: /* @__PURE__ */ i(re, {
195
+ error: c,
196
+ leftText: A,
197
+ rightText: L && p ? "".concat(Y, "/").concat(p) : void 0
374
198
  }),
375
- multiline: y,
376
- fullWidth: M,
377
- fieldRef: j,
199
+ multiline: L,
200
+ fullWidth: J,
201
+ fieldRef: K,
378
202
  readOnly: r.readOnly,
379
203
  children: [
380
- f && /* @__PURE__ */ a("div", {
381
- className: h.startIcon,
382
- children: f
204
+ e && /* @__PURE__ */ i("div", {
205
+ className: me,
206
+ children: e
383
207
  }),
384
- g && /* @__PURE__ */ a("div", {
385
- className: h.prefix,
386
- children: /* @__PURE__ */ a(O, {
387
- color: G.textSecondary,
208
+ h && /* @__PURE__ */ i("div", {
209
+ className: T(ge, E ? ue : Se),
210
+ style: {
211
+ opacity: m === "default" ? 0 : 1,
212
+ alignSelf: Z
213
+ },
214
+ children: /* @__PURE__ */ i(O, {
215
+ color: U.textSecondary,
388
216
  regular: !0,
389
217
  wordBreak: !1,
390
- children: g
218
+ children: h
391
219
  })
392
220
  }),
393
- /* @__PURE__ */ a("div", {
394
- className: h.fullWidth,
395
- children: /* @__PURE__ */ a(O, {
221
+ /* @__PURE__ */ i("div", {
222
+ className: pe,
223
+ style: {
224
+ alignSelf: h ? "baseline" : "initial"
225
+ },
226
+ children: /* @__PURE__ */ i(O, {
396
227
  as: "div",
397
228
  regular: !0,
398
- children: /*#__PURE__*/ l.createElement(C || V, _objectSpread(_objectSpreadProps(_objectSpread({}, ee, A), {
399
- id: q,
400
- className: y ? h.textArea : h.input,
401
- onFocus: function(d) {
402
- c("focused"), p == null || p(d);
229
+ children: /*#__PURE__*/ s.createElement(f || v, _objectSpread(_objectSpreadProps(_objectSpread({}, V, b), {
230
+ id: N,
231
+ style: _objectSpreadProps(_objectSpread({}, b.style), {
232
+ fontFamily: ie
233
+ }),
234
+ className: L ? T(be, E ? ye : xe, q) : T(Le, E ? Ce : Te, q, _defineProperty({}, Ae, ce())),
235
+ onFocus: function(l) {
236
+ d("focused"), u == null || u(l);
403
237
  },
404
- onBlur: function(d) {
405
- d.target.value.length > 0 ? c("filled") : c("default"), x == null || x(d);
238
+ onBlur: function(l) {
239
+ l.target.value.length > 0 ? d("filled") : d("default"), S == null || S(l);
406
240
  },
407
- onChange: function(d) {
408
- var W;
409
- S === void 0 || d.target.value.length <= S ? (z(d.target.value.length), (W = A.onChange) == null || W.call(A, d)) : (d.stopPropagation(), d.preventDefault());
241
+ onChange: function(l) {
242
+ var j;
243
+ p === void 0 || l.target.value.length <= p ? (w(l.target.value.length), (j = b.onChange) == null || j.call(b, l)) : (l.stopPropagation(), l.preventDefault());
410
244
  },
411
- defaultValue: s,
412
- value: n
413
- }), i && {
245
+ defaultValue: o,
246
+ value: t
247
+ }), c && {
414
248
  "aria-invalid": !0
415
249
  }))
416
250
  })
417
251
  }),
418
- o && /* @__PURE__ */ a(ae, {
419
- style: ie,
420
- error: i,
421
- forId: q,
252
+ n && /* @__PURE__ */ i(se, {
253
+ style: te,
254
+ error: c,
255
+ forId: N,
422
256
  inputState: m,
423
- shrinkLabel: I,
257
+ shrinkLabel: k,
424
258
  optional: !r.required,
425
- children: o
259
+ children: n
426
260
  }),
427
- t && /* @__PURE__ */ a("div", {
428
- className: h.endIcon,
429
- children: t
261
+ a && /* @__PURE__ */ i("div", {
262
+ className: Ee,
263
+ children: a
430
264
  }),
431
- u
265
+ x
432
266
  ]
433
267
  });
434
- }), me = B(function() {
435
- return {
436
- menuItem: {
437
- padding: "6px 16px",
438
- height: 48,
439
- transition: "background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
440
- "& hover": {
441
- backgroundColor: "rgba(0, 0, 0, 0.08)"
442
- },
443
- display: "flex",
444
- alignItems: "center",
445
- cursor: "pointer"
446
- },
447
- menuItemSelected: {
448
- backgroundColor: "rgba(0, 0, 0, 0.14)"
449
- },
450
- suggestionsContainer: {
451
- boxShadow: "0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12)",
452
- backgroundColor: "white",
453
- position: "absolute",
454
- zIndex: 2,
455
- "& > ul": {
456
- listStyleType: "none",
457
- padding: 0,
458
- margin: 0
459
- }
460
- }
461
- };
462
- }), he = /*#__PURE__*/ l.lazy(function() {
268
+ }), Ne = /*#__PURE__*/ s.lazy(function() {
463
269
  return import(/* webpackChunkName: "react-autosuggest" */ "react-autosuggest");
464
- }), Ae = /*#__PURE__*/ l.forwardRef(function(_param, b) {
465
- var i = _param.getSuggestions, e = _param.id, o = _objectWithoutProperties(_param, [
270
+ }), Ke = /*#__PURE__*/ s.forwardRef(function(_param, g) {
271
+ var c = _param.getSuggestions, A = _param.id, n = _objectWithoutProperties(_param, [
466
272
  "getSuggestions",
467
273
  "id"
468
274
  ]);
469
- var ref = _slicedToArray(l.useState([]), 2), k = ref[0], s = ref[1], n = l.useRef(null), p = me(), ref1 = $(), x = ref1.platformOverrides, C = ref1.texts, g = P(e), f = P();
470
- if (i && (o.value === void 0 || o.defaultValue !== void 0)) throw Error("Fields with suggestions must be used in controlled mode");
471
- return i ? /* @__PURE__ */ a(l.Suspense, {
472
- fallback: /* @__PURE__ */ a(E, _objectSpreadProps(_objectSpread({}, o), {
473
- label: _(x) ? "" : o.label,
275
+ var ref = _slicedToArray(s.useState([]), 2), y = ref[0], o = ref[1], t = s.useRef(null), ref1 = F(), u = ref1.platformOverrides, S = ref1.texts, f = W(A), h = W();
276
+ if (c && (n.value === void 0 || n.defaultValue !== void 0)) throw Error("Fields with suggestions must be used in controlled mode");
277
+ return c ? /* @__PURE__ */ i(s.Suspense, {
278
+ fallback: /* @__PURE__ */ i(I, _objectSpreadProps(_objectSpread({}, n), {
279
+ label: z(u) ? "" : n.label,
474
280
  autoComplete: "off",
475
- ref: b,
476
- id: g
281
+ ref: g,
282
+ id: f
477
283
  })),
478
- children: /* @__PURE__ */ a(he, {
479
- id: f,
480
- inputProps: _objectSpreadProps(_objectSpread({}, o), {
481
- id: g,
284
+ children: /* @__PURE__ */ i(Ne, {
285
+ id: h,
286
+ inputProps: _objectSpreadProps(_objectSpread({}, n), {
287
+ id: f,
482
288
  autoComplete: "off",
483
- onChange: function(t, param) {
484
- var u = param.newValue;
485
- var w;
486
- t.target = _objectSpreadProps(_objectSpread({}, t.target), {
487
- value: u
488
- }), t.currentTarget = _objectSpreadProps(_objectSpread({}, t.currentTarget), {
489
- value: u
490
- }), (w = o.onChange) == null || w.call(o, t);
289
+ onChange: function(e, param) {
290
+ var a = param.newValue;
291
+ var x;
292
+ e.target = _objectSpreadProps(_objectSpread({}, e.target), {
293
+ value: a
294
+ }), e.currentTarget = _objectSpreadProps(_objectSpread({}, e.currentTarget), {
295
+ value: a
296
+ }), (x = n.onChange) == null || x.call(n, e);
491
297
  }
492
298
  }),
493
- renderInputComponent: function(t) {
494
- return /* @__PURE__ */ a(E, _objectSpreadProps(_objectSpread({}, t), {
495
- inputRef: D(n, o.inputRef, b)
299
+ renderInputComponent: function(e) {
300
+ return /* @__PURE__ */ i(I, _objectSpreadProps(_objectSpread({}, e), {
301
+ inputRef: D(t, n.inputRef, g)
496
302
  }));
497
303
  },
498
- suggestions: k,
304
+ suggestions: y,
499
305
  onSuggestionsFetchRequested: function(param) {
500
- var t = param.value;
501
- return s(i(t));
306
+ var e = param.value;
307
+ return o(c(e));
502
308
  },
503
309
  onSuggestionsClearRequested: function() {
504
- return s([]);
310
+ return o([]);
505
311
  },
506
- getSuggestionValue: function(t) {
507
- return t;
312
+ getSuggestionValue: function(e) {
313
+ return e;
508
314
  },
509
- renderSuggestion: function(t, param) {
510
- var u = param.isHighlighted;
511
- return /* @__PURE__ */ a("div", {
315
+ renderSuggestion: function(e, param) {
316
+ var a = param.isHighlighted;
317
+ return /* @__PURE__ */ i("div", {
512
318
  role: "menuitem",
513
- className: ge(p.menuItem, _defineProperty({}, p.menuItemSelected, u)),
514
- children: /* @__PURE__ */ a(O, {
319
+ className: T(Re, _defineProperty({}, Ie, a)),
320
+ children: /* @__PURE__ */ i(O, {
515
321
  regular: !0,
516
- children: t
322
+ children: e
517
323
  })
518
324
  });
519
325
  },
520
- renderSuggestionsContainer: function(t) {
521
- return /* @__PURE__ */ a("div", _objectSpreadProps(_objectSpread({}, t.containerProps), {
326
+ renderSuggestionsContainer: function(e) {
327
+ return /* @__PURE__ */ i("div", _objectSpreadProps(_objectSpread({}, e.containerProps), {
522
328
  style: {
523
- width: n.current ? n.current.clientWidth + 2 : 0
329
+ width: t.current ? t.current.clientWidth + 2 : 0
524
330
  },
525
- className: p.suggestionsContainer,
526
- "aria-label": "".concat(o.label, " ").concat(C.menuLabelSuffix),
527
- children: t.children
331
+ className: Oe,
332
+ "aria-label": "".concat(n.label, " ").concat(S.menuLabelSuffix),
333
+ children: e.children
528
334
  }));
529
335
  }
530
336
  })
531
- }) : /* @__PURE__ */ a(E, _objectSpreadProps(_objectSpread({}, o), {
532
- id: g,
533
- ref: b
337
+ }) : /* @__PURE__ */ i(I, _objectSpreadProps(_objectSpread({}, n), {
338
+ id: f,
339
+ ref: g
534
340
  }));
535
341
  });
536
- export { E as TextFieldBase, Ae as TextFieldBaseAutosuggest };
342
+ export { I as TextFieldBase, Ke as TextFieldBaseAutosuggest };
@@ -0,0 +1,4 @@
1
+ import "./sprinkles.css.ts.vanilla.js";
2
+ import "./text-field-components.css.ts.vanilla.js";
3
+ var _ = 328, n = 12, f = 0.78, a = 0.75, y = "_15k6ur97", e = "_1y2v1nf94 _1y2v1nf8v _1y2v1nf4y _1y2v1nf90 _1y2v1nf4t", i = "_15k6ur96 _1y2v1nf4y _1y2v1nf54", l = "_15k6ur9e", t = "_15k6ur9d _1y2v1nf7w", u = "_1y2v1nf75", k = "_1y2v1nf6h _1y2v1nf6w _1y2v1nf4y", L = "_15k6ur9g", d = "_15k6ur91 _1y2v1nf4u _1y2v1nf96 _1y2v1nf7s _1y2v1nf4y _1y2v1nf53 _1y2v1nf9o", h = "_15k6ur93 _1y2v1nf94 _1y2v1nf5h", E = "_15k6ur9h", T = "_15k6ur99 _1y2v1nf75", o = "_15k6ur9i", A = "_15k6ur94";
4
+ export { _ as DEFAULT_WIDTH, n as LABEL_LEFT_POSITION, f as LABEL_SCALE_DESKTOP, a as LABEL_SCALE_MOBILE, y as disabled, e as field, i as fieldContainer, l as fieldMulti, t as fieldSingle, u as fullWidth, k as helperContainer, L as helperText, d as labelContainer, h as labelText, E as leftText, T as normalWidth, o as rightText, A as shrinked };
@@ -0,0 +1,2 @@
1
+ var t = "";
2
+ export { t as default };