@telefonica/mistica 16.30.1 → 16.32.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 (281) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.css-mistica.js +6 -6
  3. package/dist/align.css-mistica.js +1 -1
  4. package/dist/avatar.css-mistica.js +2 -2
  5. package/dist/badge.css-mistica.js +1 -1
  6. package/dist/box.css-mistica.js +13 -13
  7. package/dist/box.js +5 -5
  8. package/dist/boxed.css-mistica.js +25 -25
  9. package/dist/button-group.css-mistica.js +1 -1
  10. package/dist/button-group.js +2 -2
  11. package/dist/button-layout.css-mistica.js +13 -13
  12. package/dist/button.css-mistica.js +16 -16
  13. package/dist/button.d.ts +4 -0
  14. package/dist/button.js +10 -6
  15. package/dist/callout.css-mistica.js +5 -5
  16. package/dist/card.css-mistica.js +3 -3
  17. package/dist/card.d.ts +22 -0
  18. package/dist/card.js +491 -424
  19. package/dist/carousel.css-mistica.js +99 -44
  20. package/dist/carousel.css.d.ts +35 -16
  21. package/dist/carousel.d.ts +43 -5
  22. package/dist/carousel.js +570 -384
  23. package/dist/checkbox.css-mistica.js +7 -7
  24. package/dist/checkbox.js +2 -2
  25. package/dist/chip.css-mistica.js +12 -12
  26. package/dist/circle.css-mistica.js +1 -1
  27. package/dist/community/advanced-data-card.css-mistica.js +6 -6
  28. package/dist/community/advanced-data-card.js +4 -4
  29. package/dist/community/blocks.css-mistica.js +3 -3
  30. package/dist/community/example-component.css-mistica.js +1 -1
  31. package/dist/counter.css-mistica.js +1 -1
  32. package/dist/counter.js +8 -8
  33. package/dist/cover-hero.css-mistica.js +14 -15
  34. package/dist/credit-card-number-field.css-mistica.js +3 -3
  35. package/dist/date-field.css-mistica.js +1 -1
  36. package/dist/date-time-picker.css-mistica.js +1 -1
  37. package/dist/dialog-context.js +32 -27
  38. package/dist/dialog.css-mistica.js +4 -4
  39. package/dist/dialog.d.ts +1 -0
  40. package/dist/dialog.js +14 -14
  41. package/dist/divider.css-mistica.js +2 -2
  42. package/dist/double-field.css-mistica.js +2 -2
  43. package/dist/drawer.css-mistica.js +1 -1
  44. package/dist/drawer.d.ts +5 -0
  45. package/dist/empty-state-card.css-mistica.js +1 -1
  46. package/dist/empty-state.css-mistica.js +7 -7
  47. package/dist/fade-in.css-mistica.js +1 -1
  48. package/dist/feedback.css-mistica.js +1 -1
  49. package/dist/fixed-footer-layout.css-mistica.js +4 -4
  50. package/dist/fixed-footer-layout.js +5 -5
  51. package/dist/form.css-mistica.js +1 -1
  52. package/dist/form.js +5 -5
  53. package/dist/grid-layout.css-mistica.js +5 -5
  54. package/dist/grid.css-mistica.js +124 -124
  55. package/dist/grid.js +9 -9
  56. package/dist/header.css-mistica.js +1 -1
  57. package/dist/hero.css-mistica.js +2 -2
  58. package/dist/highlighted-card.css-mistica.js +4 -4
  59. package/dist/horizontal-scroll.css-mistica.js +3 -3
  60. package/dist/horizontal-scroll.js +2 -2
  61. package/dist/icon-button.css-mistica.js +42 -42
  62. package/dist/icon-button.js +43 -47
  63. package/dist/icons/icon-chevron.css-mistica.js +2 -2
  64. package/dist/icons/icon-error.css-mistica.js +1 -1
  65. package/dist/image.css-mistica.js +3 -3
  66. package/dist/image.js +5 -5
  67. package/dist/index.d.ts +1 -1
  68. package/dist/index.js +6 -0
  69. package/dist/inline.css-mistica.js +13 -13
  70. package/dist/list.css-mistica.js +1 -1
  71. package/dist/list.d.ts +10 -5
  72. package/dist/list.js +79 -76
  73. package/dist/loading-bar.css-mistica.js +1 -1
  74. package/dist/loading-bar.js +2 -2
  75. package/dist/loading-screen.css-mistica.js +5 -5
  76. package/dist/loading-screen.js +3 -3
  77. package/dist/logo.css-mistica.js +6 -6
  78. package/dist/maybe-dismissable.css-mistica.js +1 -1
  79. package/dist/menu.css-mistica.js +12 -12
  80. package/dist/menu.js +7 -7
  81. package/dist/mosaic.css-mistica.js +2 -2
  82. package/dist/mosaic.d.ts +2 -1
  83. package/dist/mosaic.js +33 -32
  84. package/dist/navigation-bar.css-mistica.js +16 -16
  85. package/dist/navigation-breadcrumbs.css-mistica.js +1 -1
  86. package/dist/package-version.js +1 -1
  87. package/dist/pin-field.css-mistica.js +1 -1
  88. package/dist/pin-field.js +2 -2
  89. package/dist/popover.css-mistica.js +1 -1
  90. package/dist/progress-bar.css-mistica.js +5 -5
  91. package/dist/progress-bar.js +2 -2
  92. package/dist/radio-button.css-mistica.js +14 -14
  93. package/dist/radio-button.d.ts +1 -0
  94. package/dist/radio-button.js +72 -61
  95. package/dist/rating.css-mistica.js +3 -3
  96. package/dist/rating.js +8 -8
  97. package/dist/responsive-layout.css-mistica.js +6 -6
  98. package/dist/responsive-layout.js +6 -6
  99. package/dist/screen-reader-only.css-mistica.js +1 -1
  100. package/dist/select.css-mistica.js +15 -15
  101. package/dist/select.js +9 -9
  102. package/dist/sheet-action-row.css-mistica.js +1 -1
  103. package/dist/sheet-common.css-mistica.js +1 -1
  104. package/dist/sheet-info.css-mistica.js +2 -2
  105. package/dist/sheet-root.js +42 -38
  106. package/dist/skeletons.css-mistica.js +4 -4
  107. package/dist/skins/skin-contract.css-mistica.js +354 -354
  108. package/dist/slider.css-mistica.js +10 -10
  109. package/dist/slider.js +9 -9
  110. package/dist/snackbar.css-mistica.js +4 -4
  111. package/dist/spinner.css-mistica.js +1 -1
  112. package/dist/stack.css-mistica.js +7 -7
  113. package/dist/stacking-group.css-mistica.js +1 -1
  114. package/dist/stepper.css-mistica.js +12 -9
  115. package/dist/stepper.css.d.ts +1 -0
  116. package/dist/stepper.d.ts +4 -2
  117. package/dist/stepper.js +54 -39
  118. package/dist/switch-component.css-mistica.js +26 -26
  119. package/dist/table.css-mistica.js +8 -8
  120. package/dist/table.js +8 -8
  121. package/dist/tabs.css-mistica.js +12 -12
  122. package/dist/tabs.d.ts +15 -1
  123. package/dist/tabs.js +154 -81
  124. package/dist/tag.css-mistica.js +1 -1
  125. package/dist/text-field-base.css-mistica.js +1 -1
  126. package/dist/text-field-base.js +126 -115
  127. package/dist/text-field-components.css-mistica.js +6 -6
  128. package/dist/text-field-components.js +2 -2
  129. package/dist/text-link.css-mistica.js +5 -5
  130. package/dist/text-tokens.d.ts +12 -0
  131. package/dist/text-tokens.js +154 -106
  132. package/dist/text.css-mistica.js +9 -9
  133. package/dist/text.js +7 -7
  134. package/dist/theme-context.css-mistica.js +398 -398
  135. package/dist/timeline.css-mistica.js +10 -10
  136. package/dist/timer.css-mistica.js +6 -6
  137. package/dist/tooltip.css-mistica.js +1 -1
  138. package/dist/touchable.css-mistica.js +1 -1
  139. package/dist/touchable.d.ts +5 -2
  140. package/dist/touchable.js +53 -53
  141. package/dist/utils/aspect-ratio-support.css-mistica.js +3 -3
  142. package/dist/utils/aspect-ratio-support.js +3 -3
  143. package/dist/video.css-mistica.js +2 -2
  144. package/dist/video.js +2 -2
  145. package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +3 -3
  146. package/dist-es/accordion.css-mistica.js +6 -6
  147. package/dist-es/align.css-mistica.js +1 -1
  148. package/dist-es/avatar.css-mistica.js +2 -2
  149. package/dist-es/badge.css-mistica.js +1 -1
  150. package/dist-es/box.css-mistica.js +13 -13
  151. package/dist-es/box.js +9 -9
  152. package/dist-es/boxed.css-mistica.js +24 -24
  153. package/dist-es/button-group.css-mistica.js +1 -1
  154. package/dist-es/button-group.js +4 -4
  155. package/dist-es/button-layout.css-mistica.js +13 -13
  156. package/dist-es/button.css-mistica.js +16 -16
  157. package/dist-es/button.js +14 -10
  158. package/dist-es/callout.css-mistica.js +5 -5
  159. package/dist-es/callout.js +5 -5
  160. package/dist-es/card.css-mistica.js +3 -3
  161. package/dist-es/card.js +627 -559
  162. package/dist-es/carousel.css-mistica.js +9 -8
  163. package/dist-es/carousel.js +587 -407
  164. package/dist-es/checkbox.css-mistica.js +7 -7
  165. package/dist-es/checkbox.js +6 -6
  166. package/dist-es/chip.css-mistica.js +12 -12
  167. package/dist-es/circle.css-mistica.js +1 -1
  168. package/dist-es/community/advanced-data-card.css-mistica.js +6 -6
  169. package/dist-es/community/advanced-data-card.js +11 -11
  170. package/dist-es/community/blocks.css-mistica.js +2 -2
  171. package/dist-es/community/example-component.css-mistica.js +1 -1
  172. package/dist-es/counter.css-mistica.js +1 -1
  173. package/dist-es/counter.js +8 -8
  174. package/dist-es/cover-hero.css-mistica.js +4 -5
  175. package/dist-es/credit-card-number-field.css-mistica.js +3 -3
  176. package/dist-es/date-field.css-mistica.js +1 -1
  177. package/dist-es/date-time-picker.css-mistica.js +1 -1
  178. package/dist-es/dialog-context.js +33 -28
  179. package/dist-es/dialog.css-mistica.js +4 -4
  180. package/dist-es/dialog.js +31 -31
  181. package/dist-es/divider.css-mistica.js +2 -2
  182. package/dist-es/double-field.css-mistica.js +2 -2
  183. package/dist-es/drawer.css-mistica.js +1 -1
  184. package/dist-es/empty-state-card.css-mistica.js +1 -1
  185. package/dist-es/empty-state.css-mistica.js +6 -6
  186. package/dist-es/empty-state.js +7 -7
  187. package/dist-es/fade-in.css-mistica.js +1 -1
  188. package/dist-es/feedback.css-mistica.js +1 -1
  189. package/dist-es/fixed-footer-layout.css-mistica.js +4 -4
  190. package/dist-es/fixed-footer-layout.js +5 -5
  191. package/dist-es/form.css-mistica.js +1 -1
  192. package/dist-es/form.js +5 -5
  193. package/dist-es/grid-layout.css-mistica.js +4 -4
  194. package/dist-es/grid.css-mistica.js +124 -124
  195. package/dist-es/grid.js +10 -10
  196. package/dist-es/header.css-mistica.js +1 -1
  197. package/dist-es/hero.css-mistica.js +2 -2
  198. package/dist-es/highlighted-card.css-mistica.js +4 -4
  199. package/dist-es/horizontal-scroll.css-mistica.js +2 -2
  200. package/dist-es/horizontal-scroll.js +2 -2
  201. package/dist-es/icon-button.css-mistica.js +42 -42
  202. package/dist-es/icon-button.js +52 -56
  203. package/dist-es/icons/icon-chevron.css-mistica.js +2 -2
  204. package/dist-es/icons/icon-error.css-mistica.js +1 -1
  205. package/dist-es/image.css-mistica.js +3 -3
  206. package/dist-es/image.js +5 -5
  207. package/dist-es/index.js +1843 -1843
  208. package/dist-es/inline.css-mistica.js +11 -11
  209. package/dist-es/list.css-mistica.js +1 -1
  210. package/dist-es/list.js +108 -105
  211. package/dist-es/loading-bar.css-mistica.js +1 -1
  212. package/dist-es/loading-bar.js +6 -6
  213. package/dist-es/loading-screen.css-mistica.js +5 -5
  214. package/dist-es/loading-screen.js +8 -8
  215. package/dist-es/logo.css-mistica.js +6 -6
  216. package/dist-es/maybe-dismissable.css-mistica.js +1 -1
  217. package/dist-es/menu.css-mistica.js +12 -12
  218. package/dist-es/menu.js +7 -7
  219. package/dist-es/mosaic.css-mistica.js +2 -2
  220. package/dist-es/mosaic.js +47 -46
  221. package/dist-es/navigation-bar.css-mistica.js +16 -16
  222. package/dist-es/navigation-breadcrumbs.css-mistica.js +1 -1
  223. package/dist-es/package-version.js +1 -1
  224. package/dist-es/pin-field.css-mistica.js +1 -1
  225. package/dist-es/pin-field.js +8 -8
  226. package/dist-es/popover.css-mistica.js +1 -1
  227. package/dist-es/progress-bar.css-mistica.js +5 -5
  228. package/dist-es/progress-bar.js +10 -10
  229. package/dist-es/radio-button.css-mistica.js +14 -14
  230. package/dist-es/radio-button.js +98 -88
  231. package/dist-es/rating.css-mistica.js +3 -3
  232. package/dist-es/rating.js +12 -12
  233. package/dist-es/responsive-layout.css-mistica.js +6 -6
  234. package/dist-es/responsive-layout.js +15 -15
  235. package/dist-es/screen-reader-only.css-mistica.js +1 -1
  236. package/dist-es/select.css-mistica.js +15 -15
  237. package/dist-es/select.js +15 -15
  238. package/dist-es/sheet-action-row.css-mistica.js +1 -1
  239. package/dist-es/sheet-common.css-mistica.js +1 -1
  240. package/dist-es/sheet-common.js +6 -6
  241. package/dist-es/sheet-info.css-mistica.js +2 -2
  242. package/dist-es/sheet-root.js +44 -40
  243. package/dist-es/skeletons.css-mistica.js +4 -4
  244. package/dist-es/skins/skin-contract.css-mistica.js +354 -354
  245. package/dist-es/slider.css-mistica.js +10 -10
  246. package/dist-es/slider.js +9 -9
  247. package/dist-es/snackbar.css-mistica.js +4 -4
  248. package/dist-es/spinner.css-mistica.js +1 -1
  249. package/dist-es/stack.css-mistica.js +6 -6
  250. package/dist-es/stacking-group.css-mistica.js +1 -1
  251. package/dist-es/stepper.css-mistica.js +3 -3
  252. package/dist-es/stepper.js +76 -60
  253. package/dist-es/style.css +1 -1
  254. package/dist-es/switch-component.css-mistica.js +26 -26
  255. package/dist-es/table.css-mistica.js +8 -8
  256. package/dist-es/table.js +12 -12
  257. package/dist-es/tabs.css-mistica.js +12 -12
  258. package/dist-es/tabs.js +166 -93
  259. package/dist-es/tag.css-mistica.js +1 -1
  260. package/dist-es/tag.js +8 -8
  261. package/dist-es/text-field-base.css-mistica.js +1 -1
  262. package/dist-es/text-field-base.js +153 -141
  263. package/dist-es/text-field-components.css-mistica.js +5 -5
  264. package/dist-es/text-field-components.js +4 -4
  265. package/dist-es/text-link.css-mistica.js +5 -5
  266. package/dist-es/text-tokens.js +87 -57
  267. package/dist-es/text.css-mistica.js +8 -8
  268. package/dist-es/text.js +6 -6
  269. package/dist-es/theme-context.css-mistica.js +396 -396
  270. package/dist-es/timeline.css-mistica.js +10 -10
  271. package/dist-es/timeline.js +4 -4
  272. package/dist-es/timer.css-mistica.js +6 -6
  273. package/dist-es/tooltip.css-mistica.js +1 -1
  274. package/dist-es/touchable.css-mistica.js +1 -1
  275. package/dist-es/touchable.js +67 -67
  276. package/dist-es/utils/aspect-ratio-support.css-mistica.js +3 -3
  277. package/dist-es/utils/aspect-ratio-support.js +10 -10
  278. package/dist-es/video.css-mistica.js +2 -2
  279. package/dist-es/video.js +5 -5
  280. package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +2 -2
  281. package/package.json +1 -1
@@ -79,50 +79,51 @@ function _object_without_properties_loose(source, excluded) {
79
79
  return target;
80
80
  }
81
81
  import { jsx as n, jsxs as ce } from "react/jsx-runtime";
82
- import * as a from "react";
83
- import { FieldContainer as ue, HelperText as fe, Label as me } from "./text-field-components.js";
84
- import { LABEL_SCALE_MOBILE as he, LABEL_SCALE_DESKTOP as ge } from "./text-field-components.css-mistica.js";
85
- import { Text3 as N } from "./text.js";
86
- import { isFirefox as pe, isRunningAcceptanceTest as xe } from "./utils/platform.js";
87
- import { useTheme as k, useScreenSize as Se, useIsomorphicLayoutEffect as Ie } from "./hooks.js";
82
+ import * as r from "react";
83
+ import { createElement as ue } from "react";
84
+ import { FieldContainer as fe, HelperText as me, Label as he } from "./text-field-components.js";
85
+ import { LABEL_SCALE_MOBILE as ge, LABEL_SCALE_DESKTOP as pe } from "./text-field-components.css-mistica.js";
86
+ import { Text3 as P } from "./text.js";
87
+ import { isFirefox as xe, isRunningAcceptanceTest as Se } from "./utils/platform.js";
88
+ import { useTheme as K, useScreenSize as ye, useIsomorphicLayoutEffect as Ie } from "./hooks.js";
88
89
  import $ from "classnames";
89
- import { combineRefs as K } from "./utils/common.js";
90
- import { startIcon as be, prefix as ye, inputWithLabel as H, inputWithoutLabel as _, fullWidth as Ce, fieldRightPadding as G, fieldLeftPadding as R, textArea as Te, textAreaWithLabel as Ee, textAreaWithoutLabel as ve, input as Re, inputFirefoxStyles as $e, hiddenDatePlaceholder as Le, emptyDateValue as Ae, endIconContainer as Fe, menuItem as We, menuItemSelected as we, suggestionsContainer as Ne, fieldEndIconContainer as Oe, fieldElementsGap as Pe, iconButtonSize as De, fieldEndIconGap as Be } from "./text-field-base.css-mistica.js";
91
- import { vars as Me } from "./skins/skin-contract.css-mistica.js";
92
- import { InternalToggleIconButton as qe, InternalIconButton as ze } from "./icon-button.js";
93
- import { ThemeVariant as He } from "./theme-variant-context.js";
94
- import { iconSize as _e } from "./icon-button.css-mistica.js";
95
- import { formTextMultilineMaxCount as Ge, menuLabelSuffix as je } from "./text-tokens.js";
96
- const ke = (l, u)=>{
97
- if (!u) return !0;
90
+ import { combineRefs as j } from "./utils/common.js";
91
+ import { startIcon as be, prefix as Ce, inputWithLabel as H, inputWithoutLabel as _, fullWidth as Te, fieldRightPadding as k, fieldLeftPadding as v, textArea as Re, textAreaWithLabel as Ee, textAreaWithoutLabel as ve, input as $e, inputFirefoxStyles as Le, hiddenDatePlaceholder as We, emptyDateValue as Ae, endIconContainer as Fe, menuItem as Ne, menuItemSelected as Pe, suggestionsContainer as we, fieldEndIconContainer as Oe, fieldElementsGap as De, iconButtonSize as Be, fieldEndIconGap as Me } from "./text-field-base.css-mistica.js";
92
+ import { vars as qe } from "./skins/skin-contract.css-mistica.js";
93
+ import { InternalToggleIconButton as ze, InternalIconButton as He } from "./icon-button.js";
94
+ import { ThemeVariant as _e } from "./theme-variant-context.js";
95
+ import { iconSize as ke } from "./icon-button.css-mistica.js";
96
+ import { formTextMultilineMaxCount as Ge, menuLabelSuffix as Ke } from "./text-tokens.js";
97
+ const je = (o, m)=>{
98
+ if (!m) return !0;
98
99
  const t = document.createElement("input");
99
- return t.type = u, t.value = l || "", t.value !== "";
100
- }, dt = (param)=>{
101
- let { hasBackgroundColor: l = !0, onPress: u, onChange: t, disabled: h, Icon: S, checkedProps: o, uncheckedProps: r, "aria-label": p } = param;
100
+ return t.type = m, t.value = o || "", t.value !== "";
101
+ }, ct = (param)=>{
102
+ let { hasBackgroundColor: o = !0, onPress: m, onChange: t, disabled: g, Icon: y, checkedProps: l, uncheckedProps: d, "aria-label": h } = param;
102
103
  return /* @__PURE__ */ n("div", {
103
104
  className: Oe,
104
- children: o ? /* @__PURE__ */ n(qe, {
105
- checkedProps: _object_spread_props(_object_spread({}, o), {
106
- "aria-label": o["aria-label"] || ""
105
+ children: l ? /* @__PURE__ */ n(ze, {
106
+ checkedProps: _object_spread_props(_object_spread({}, l), {
107
+ "aria-label": l["aria-label"] || ""
107
108
  }),
108
- uncheckedProps: _object_spread_props(_object_spread({}, r), {
109
- "aria-label": r["aria-label"] || ""
109
+ uncheckedProps: _object_spread_props(_object_spread({}, d), {
110
+ "aria-label": d["aria-label"] || ""
110
111
  }),
111
112
  onChange: t,
112
- hasOverlay: l,
113
- disabled: h
114
- }) : /* @__PURE__ */ n(ze, {
115
- Icon: S,
116
- disabled: h,
117
- "aria-label": p || "",
118
- onPress: u,
119
- hasOverlay: l
113
+ hasOverlay: o,
114
+ disabled: g
115
+ }) : /* @__PURE__ */ n(He, {
116
+ Icon: y,
117
+ disabled: g,
118
+ "aria-label": h || "",
119
+ onPress: m,
120
+ hasOverlay: o
120
121
  })
121
122
  });
122
- }, j = (l)=>{
123
- l.preventDefault();
124
- }, w = /*#__PURE__*/ a.forwardRef((_param, V)=>{
125
- var { error: l, helperText: u, label: t, inputProps: h, inputRef: S, defaultValue: o, value: r, onFocus: p, onBlur: b, inputComponent: v, prefix: y, startIcon: f, endIcon: I, endIconOverlay: i, shrinkLabel: x, multiline: m = !1, focus: C, fieldRef: J, maxLength: g, id: Q, autoComplete: U, fullWidth: X, dataAttributes: Y, preventCopy: L, showOptionalLabel: Z = !0 } = _param, d = _object_without_properties(_param, [
123
+ }, G = (o)=>{
124
+ o.preventDefault();
125
+ }, N = /*#__PURE__*/ r.forwardRef((_param, V)=>{
126
+ var { error: o, helperText: m, label: t, inputProps: g, inputRef: y, defaultValue: l, value: d, onFocus: h, onBlur: I, inputComponent: E, prefix: b, startIcon: S, endIcon: p, endIconOverlay: C, shrinkLabel: i, multiline: a = !1, focus: c, fieldRef: J, maxLength: x, id: Q, autoComplete: U, fullWidth: X, dataAttributes: Y, preventCopy: L, showOptionalLabel: Z = !0 } = _param, s = _object_without_properties(_param, [
126
127
  "error",
127
128
  "helperText",
128
129
  "label",
@@ -149,198 +150,209 @@ const ke = (l, u)=>{
149
150
  "preventCopy",
150
151
  "showOptionalLabel"
151
152
  ]);
152
- const { preventCopyInFormFields: ee, texts: te, t: ie } = k();
153
+ const { preventCopyInFormFields: ee, texts: te, t: ie } = K();
153
154
  L = L !== null && L !== void 0 ? L : ee;
154
155
  var _ref;
155
- const ne = a.useId(), O = Q || ne, P = a.useId(), D = a.useId(), [s, c] = a.useState(o != null && o.length || r != null && r.length ? "filled" : "default"), { isTabletOrSmaller: re } = Se(), [A, B] = a.useState((_ref = o == null ? void 0 : o.length) !== null && _ref !== void 0 ? _ref : 0), F = !!t || !d.required, T = d.type === "date" || d.type === "datetime-local" || d.type === "month", M = a.useRef(void 0);
156
+ const ne = r.useId(), w = Q || ne, O = r.useId(), D = r.useId(), [u, f] = r.useState(l != null && l.length || d != null && d.length ? "filled" : "default"), { isTabletOrSmaller: re } = ye(), [W, B] = r.useState((_ref = l == null ? void 0 : l.length) !== null && _ref !== void 0 ? _ref : 0), A = !!t || !s.required, T = s.type === "date" || s.type === "datetime-local" || s.type === "month", M = r.useRef(void 0);
156
157
  Ie(()=>{
157
- const e = T && !ke(r, d.type) ? "" : r;
158
- M.current !== r && T && !(e != null && e.length) && s === "filled" && C === void 0 && c("default"), M.current = r, s !== "focused" && e != null && e.length && (B(e.length), c("filled")), C && c("focused"), C === !1 && !(e != null && e.length) && c("default"), C === !1 && e != null && e.length && c("filled");
158
+ const e = T && !je(d, s.type) ? "" : d;
159
+ M.current !== d && T && !(e != null && e.length) && u === "filled" && c === void 0 && f("default"), M.current = d, u !== "focused" && e != null && e.length && (B(e.length), f("filled")), c && f("focused"), c === !1 && !(e != null && e.length) && f("default"), c === !1 && e != null && e.length && f("filled");
159
160
  }, [
160
- s,
161
- r,
162
- C,
161
+ u,
162
+ d,
163
+ c,
163
164
  T,
164
- d.type
165
- ]), a.useEffect(()=>{
166
- d.autoFocus && c("focused");
165
+ s.type
166
+ ]), r.useEffect(()=>{
167
+ s.autoFocus && f("focused");
167
168
  }, [
168
- d.autoFocus
169
+ s.autoFocus
169
170
  ]);
170
- const ae = m ? "textarea" : "input", le = v ? {
171
- inputRef: S
171
+ const ae = a ? "textarea" : "input", oe = E ? {
172
+ inputRef: y
172
173
  } : {
173
- ref: K(V, S)
174
- }, E = _object_spread(_object_spread_props(_object_spread({}, d), {
175
- maxLength: g,
174
+ ref: j(V, y)
175
+ }, R = _object_spread(_object_spread_props(_object_spread({}, s), {
176
+ maxLength: x,
176
177
  autoComplete: U
177
- }), h), W = `calc(${_e.default} + ${Pe}px)`, q = `calc(${De} + ${Be}px)`, oe = x || s === "focused" || s === "filled" ? re ? he : ge : 1, de = {
178
- left: `calc(${R}px + ${f ? W : "0px"})`,
178
+ }), g), F = `calc(${ke.default} + ${De}px)`, q = `calc(${Be} + ${Me}px)`, le = i || u === "focused" || u === "filled" ? re ? ge : pe : 1, de = {
179
+ left: `calc(${v}px + ${S ? F : "0px"})`,
179
180
  // shrinking means applying a scale transformation, so width will be proportionally reduced.
180
181
  // Let's keep the original width.
181
- width: `calc((100% - ${R}px - ${f ? W : "0px"} - ${I || i ? q : `${G}px`}) / ${oe})`
182
- }, se = d.type === "password" && A > 0 ? "Lucida Grande, Arial, sans-serif" : "inherit";
183
- return /* @__PURE__ */ n(ue, {
184
- disabled: d.disabled,
185
- helperText: /* @__PURE__ */ n(fe, {
186
- error: l,
187
- leftText: u,
188
- leftTextId: P,
182
+ width: `calc((100% - ${v}px - ${S ? F : "0px"} - ${p || C ? q : `${k}px`}) / ${le})`
183
+ }, se = s.type === "password" && W > 0 ? "Lucida Grande, Arial, sans-serif" : "inherit";
184
+ return /* @__PURE__ */ n(fe, {
185
+ disabled: s.disabled,
186
+ helperText: /* @__PURE__ */ n(me, {
187
+ error: o,
188
+ leftText: m,
189
+ leftTextId: O,
189
190
  rightTextId: D,
190
- rightText: m && g ? `${A}/${g}` : void 0,
191
- rightTextLabel: m && g ? te.formTextMultilineMaxCount || ie(Ge).replace("1$s", String(A)).replace("2$s", String(g)) : void 0
191
+ rightText: a && x ? `${W}/${x}` : void 0,
192
+ rightTextLabel: a && x ? te.formTextMultilineMaxCount || ie(Ge).replace("1$s", String(W)).replace("2$s", String(x)) : void 0
192
193
  }),
193
- multiline: m,
194
+ multiline: a,
194
195
  fullWidth: X,
195
196
  fieldRef: J,
196
- readOnly: d.readOnly,
197
+ readOnly: s.readOnly,
197
198
  dataAttributes: Y,
198
- children: /* @__PURE__ */ ce(He, {
199
+ children: /* @__PURE__ */ ce(_e, {
199
200
  variant: "default",
200
201
  children: [
201
- f && /* @__PURE__ */ n("div", {
202
+ S && /* @__PURE__ */ n("div", {
202
203
  className: be,
203
204
  "data-testid": "startIcon",
204
- children: f
205
+ children: S
205
206
  }),
206
- y && /* @__PURE__ */ n("div", {
207
+ b && /* @__PURE__ */ n("div", {
207
208
  "aria-hidden": !0,
208
- className: $(ye, F ? H : _),
209
+ className: $(Ce, A ? H : _),
209
210
  style: {
210
- opacity: s === "default" ? 0 : 1
211
+ opacity: u === "default" ? 0 : 1
211
212
  },
212
- children: /* @__PURE__ */ n(N, {
213
- color: Me.colors.textSecondary,
213
+ children: /* @__PURE__ */ n(P, {
214
+ color: qe.colors.textSecondary,
214
215
  regular: !0,
215
216
  wordBreak: !1,
216
- children: y
217
+ children: b
217
218
  })
218
219
  }),
219
- t && /* @__PURE__ */ n(me, {
220
+ t && /* @__PURE__ */ n(he, {
220
221
  style: de,
221
- error: l,
222
- forId: O,
223
- inputState: s,
224
- shrinkLabel: x,
225
- showOptional: !d.required && Z,
222
+ error: o,
223
+ forId: w,
224
+ inputState: u,
225
+ shrinkLabel: i,
226
+ showOptional: !s.required && Z,
226
227
  children: t
227
228
  }),
228
229
  /* @__PURE__ */ n("div", {
229
- className: Ce,
230
- children: /* @__PURE__ */ n(N, {
230
+ className: Te,
231
+ children: /* @__PURE__ */ n(P, {
231
232
  as: "div",
232
233
  regular: !0,
233
- children: /*#__PURE__*/ a.createElement(v || ae, _object_spread(_object_spread_props(_object_spread({}, le, E), {
234
- id: O,
234
+ children: /*#__PURE__*/ r.createElement(E || ae, _object_spread(_object_spread_props(_object_spread({}, oe, R), {
235
+ id: w,
235
236
  style: _object_spread_props(_object_spread({
236
- paddingRight: I ? 0 : i ? q : G,
237
- paddingLeft: y ? 0 : f ? `calc(${W} + ${R}px)` : R
238
- }, E.style), {
237
+ paddingRight: p ? 0 : C ? q : k,
238
+ paddingLeft: b ? 0 : S ? `calc(${F} + ${v}px)` : v
239
+ }, R.style), {
239
240
  fontFamily: se
240
241
  }),
241
- className: m ? $(Te, F ? Ee : ve) : $(Re, F ? H : _, {
242
- [$e]: pe(),
242
+ className: a ? $(Re, A ? Ee : ve) : $($e, A ? H : _, {
243
+ [Le]: xe(),
243
244
  // Hide webkit placeholder when label is not shrinked and value is empty
244
- [Le]: T && s === "default",
245
+ [We]: T && u === "default",
245
246
  // Force height of input when value is empty to avoid field from having height 0 in iOS
246
- [Ae]: T && s !== "filled"
247
+ [Ae]: T && u !== "filled"
247
248
  }),
248
249
  onFocus: (e)=>{
249
- c("focused"), p == null || p(e);
250
+ f("focused"), h == null || h(e);
250
251
  },
251
252
  onBlur: (e)=>{
252
- e.target.value.length > 0 ? c("filled") : c("default"), b == null || b(e);
253
+ e.target.value.length > 0 ? f("filled") : f("default"), I == null || I(e);
253
254
  },
254
255
  onChange: (e)=>{
255
256
  var z;
256
- g === void 0 || e.target.value.length <= g ? (B(e.target.value.length), e.target.value.length > 0 && s !== "focused" && c(e.target.value.length > 0 ? "filled" : "default"), (z = E.onChange) == null || z.call(E, e)) : (e.stopPropagation(), e.preventDefault());
257
+ x === void 0 || e.target.value.length <= x ? (B(e.target.value.length), e.target.value.length > 0 && u !== "focused" && f(e.target.value.length > 0 ? "filled" : "default"), (z = R.onChange) == null || z.call(R, e)) : (e.stopPropagation(), e.preventDefault());
257
258
  },
258
- defaultValue: o,
259
- value: r
260
- }), l && {
259
+ defaultValue: l,
260
+ value: d
261
+ }), o && {
261
262
  "aria-invalid": !0
262
- }, (u || m && g) && {
263
- "aria-describedby": `${P} ${D}`
263
+ }, (m || a && x) && {
264
+ "aria-describedby": `${O} ${D}`
264
265
  }, L && {
265
- onCopy: j,
266
- onCut: j
266
+ onCopy: G,
267
+ onCut: G
267
268
  }))
268
269
  })
269
270
  }),
270
- I && /* @__PURE__ */ n("div", {
271
+ p && /* @__PURE__ */ n("div", {
271
272
  className: Fe,
272
273
  "data-testid": "endIcon",
273
- children: I
274
+ children: p
274
275
  }),
275
- i
276
+ C
276
277
  ]
277
278
  })
278
279
  });
279
- }), Ke = /*#__PURE__*/ a.lazy(()=>import(/* webpackChunkName: "react-autosuggest" */ "react-autosuggest")), st = /*#__PURE__*/ a.forwardRef((_param, h)=>{
280
- var { getSuggestions: l, id: u } = _param, t = _object_without_properties(_param, [
280
+ }), Je = /*#__PURE__*/ r.lazy(()=>import(/* webpackChunkName: "react-autosuggest" */ "react-autosuggest")), ut = /*#__PURE__*/ r.forwardRef((_param, g)=>{
281
+ var { getSuggestions: o, id: m } = _param, t = _object_without_properties(_param, [
281
282
  "getSuggestions",
282
283
  "id"
283
284
  ]);
284
- const [S, o] = a.useState([]), r = a.useRef(null), { platformOverrides: p, texts: b, t: v } = k(), y = a.useId(), f = u || y, I = a.useId();
285
- if (l && (t.value === void 0 || t.defaultValue !== void 0)) throw Error("Fields with suggestions must be used in controlled mode");
286
- return l ? /* @__PURE__ */ n(a.Suspense, {
287
- fallback: /* @__PURE__ */ n(w, _object_spread_props(_object_spread({}, t), {
288
- label: xe(p) ? "" : t.label,
285
+ const [y, l] = r.useState([]), d = r.useRef(null), h = r.useRef(null), { platformOverrides: I, texts: E, t: b } = K(), S = r.useId(), p = m || S, C = r.useId();
286
+ if (o && (t.value === void 0 || t.defaultValue !== void 0)) throw Error("Fields with suggestions must be used in controlled mode");
287
+ return o ? /* @__PURE__ */ n(r.Suspense, {
288
+ fallback: /* @__PURE__ */ n(N, _object_spread_props(_object_spread({}, t), {
289
+ label: Se(I) ? "" : t.label,
289
290
  autoComplete: "off",
290
- ref: h,
291
- id: f
291
+ ref: g,
292
+ id: p
292
293
  })),
293
- children: /* @__PURE__ */ n(Ke, {
294
- id: I,
294
+ children: /* @__PURE__ */ n(Je, {
295
+ id: C,
295
296
  inputProps: _object_spread_props(_object_spread({}, t), {
296
- id: f,
297
+ id: p,
297
298
  autoComplete: "off",
298
299
  // @ts-expect-error Autosuggest expects slightly different types
299
300
  onChange: (i, param)=>{
300
- let { newValue: x } = param;
301
- var m;
301
+ let { newValue: a } = param;
302
+ var c;
302
303
  i.target = _object_spread_props(_object_spread({}, i.target), {
303
- value: x
304
+ value: a
304
305
  }), i.currentTarget = _object_spread_props(_object_spread({}, i.currentTarget), {
305
- value: x
306
- }), (m = t.onChange) == null || m.call(t, i);
306
+ value: a
307
+ }), (c = t.onChange) == null || c.call(t, i);
307
308
  }
308
309
  }),
309
- renderInputComponent: (i)=>/* @__PURE__ */ n(w, _object_spread_props(_object_spread({}, i), {
310
- inputRef: K(r, t.inputRef, h)
311
- })),
312
- suggestions: S,
310
+ renderInputComponent: (i)=>{
311
+ const { key: a } = i, c = _object_without_properties(i, [
312
+ "key"
313
+ ]);
314
+ return /* @__PURE__ */ n(N, _object_spread_props(_object_spread({}, c), {
315
+ fieldRef: h,
316
+ inputRef: j(d, t.inputRef, g)
317
+ }), a);
318
+ },
319
+ suggestions: y,
313
320
  onSuggestionsFetchRequested: (param)=>{
314
321
  let { value: i } = param;
315
- return o(l(i));
322
+ return l(o(i));
316
323
  },
317
- onSuggestionsClearRequested: ()=>o([]),
324
+ onSuggestionsClearRequested: ()=>l([]),
318
325
  getSuggestionValue: (i)=>i,
319
326
  renderSuggestion: (i, param)=>{
320
- let { isHighlighted: x } = param;
327
+ let { isHighlighted: a } = param;
321
328
  return /* @__PURE__ */ n("div", {
322
329
  role: "menuitem",
323
- className: $(We, {
324
- [we]: x
330
+ className: $(Ne, {
331
+ [Pe]: a
325
332
  }),
326
- children: /* @__PURE__ */ n(N, {
333
+ children: /* @__PURE__ */ n(P, {
327
334
  regular: !0,
328
335
  children: i
329
336
  })
330
337
  });
331
338
  },
332
- renderSuggestionsContainer: (i)=>/* @__PURE__ */ n("div", _object_spread_props(_object_spread({}, i.containerProps), {
339
+ renderSuggestionsContainer: (i)=>{
340
+ const _i_containerProps = i.containerProps, { key: a } = _i_containerProps, c = _object_without_properties(_i_containerProps, [
341
+ "key"
342
+ ]);
343
+ return /* @__PURE__ */ /*#__PURE__*/ ue("div", _object_spread_props(_object_spread({}, c), {
344
+ key: a,
333
345
  style: {
334
- width: r.current ? r.current.clientWidth + 2 : 0
346
+ width: h.current ? h.current.clientWidth + 2 : 0
335
347
  },
336
- className: Ne,
337
- "aria-label": `${t.label} ${b.menuLabelSuffix || v(je)}`,
338
- children: i.children
339
- }))
348
+ className: we,
349
+ "aria-label": `${t.label} ${E.menuLabelSuffix || b(Ke)}`
350
+ }), i.children);
351
+ }
340
352
  })
341
- }) : /* @__PURE__ */ n(w, _object_spread_props(_object_spread({}, t), {
342
- id: f,
343
- ref: h
353
+ }) : /* @__PURE__ */ n(N, _object_spread_props(_object_spread({}, t), {
354
+ id: p,
355
+ ref: g
344
356
  }));
345
357
  });
346
- export { dt as FieldEndIcon, w as TextFieldBase, st as TextFieldBaseAutosuggest };
358
+ export { ct as FieldEndIcon, N as TextFieldBase, ut as TextFieldBaseAutosuggest };
@@ -2,8 +2,8 @@ import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./icon-button.css.ts.vanilla.css-mistica.js";
3
3
  import "./text-field-base.css.ts.vanilla.css-mistica.js";
4
4
  import "./text-field-components.css.ts.vanilla.css-mistica.js";
5
- var f = 328, a = 0.78, e = 0.75, y = {
6
- default: "v16_30_1_1y2v1nf4c",
7
- readOnly: "v16_30_1_1y2v1nf6c"
8
- }, i = "v16_30_1_15k6ur97", l = "v16_30_1_1y2v1nflu v16_30_1_1y2v1nflb v16_30_1_1y2v1nfis v16_30_1_1y2v1nflj v16_30_1_1y2v1nfim", t = "v16_30_1_15k6ur96 v16_30_1_1y2v1nfis v16_30_1_1y2v1nfiy", u = "v16_30_1_1y2v1nfjf", d = "v16_30_1_1y2v1nfbf v16_30_1_1y2v1nfcr v16_30_1_1y2v1nfis", o = "v16_30_1_1y2v1nfjd v16_30_1_1y2v1nf8r", k = "v16_30_1_15k6ur91 v16_30_1_1y2v1nfin v16_30_1_1y2v1nfis v16_30_1_1y2v1nfix", p = "v16_30_1_15k6ur93 v16_30_1_1y2v1nflu v16_30_1_1y2v1nfjb", b = "v16_30_1_15k6ur9e v16_30_1_1y2v1nfis", L = "v16_30_1_15k6ur99 v16_30_1_1y2v1nfjf", h = "v16_30_1_1y2v1nfbi", s = "v16_30_1_15k6ur94", E = "v16_30_1_15k6ur9h";
9
- export { f as DEFAULT_WIDTH, a as LABEL_SCALE_DESKTOP, e as LABEL_SCALE_MOBILE, y as background, i as disabled, l as field, t as fieldContainer, u as fullWidth, d as helperContainer, o as helperText, k as labelContainer, p as labelText, b as leftHelperText, L as normalWidth, h as rightHelperText, s as shrinked, E as warnIcon };
5
+ var f = 328, a = 0.78, e = 0.75, i = {
6
+ default: "v16_32_1y2v1nf4c",
7
+ readOnly: "v16_32_1y2v1nf6c"
8
+ }, y = "v16_32_15k6ur97", l = "v16_32_1y2v1nflb v16_32_1y2v1nfis v16_32_1y2v1nflj v16_32_1y2v1nfim", t = "v16_32_15k6ur96 v16_32_1y2v1nfis v16_32_1y2v1nfiy", u = "v16_32_1y2v1nfjf", d = "v16_32_1y2v1nfbf v16_32_1y2v1nfcr v16_32_1y2v1nfis", o = "v16_32_1y2v1nfjd v16_32_1y2v1nf8r", k = "v16_32_15k6ur91 v16_32_1y2v1nfin v16_32_1y2v1nfis v16_32_1y2v1nfix", p = "v16_32_15k6ur93 v16_32_1y2v1nflu v16_32_1y2v1nfjb", b = "v16_32_15k6ur9e v16_32_1y2v1nfis", L = "v16_32_15k6ur99 v16_32_1y2v1nfjf", h = "v16_32_1y2v1nfbi", s = "v16_32_15k6ur94", E = "v16_32_15k6ur9h";
9
+ export { f as DEFAULT_WIDTH, a as LABEL_SCALE_DESKTOP, e as LABEL_SCALE_MOBILE, i as background, y as disabled, l as field, t as fieldContainer, u as fullWidth, d as helperContainer, o as helperText, k as labelContainer, p as labelText, b as leftHelperText, L as normalWidth, h as rightHelperText, s as shrinked, E as warnIcon };
@@ -57,7 +57,7 @@ import f from "classnames";
57
57
  import { useIsInverseOrMediaVariant as T } from "./theme-variant-context.js";
58
58
  import { useTheme as C } from "./hooks.js";
59
59
  import { Text1 as x } from "./text.js";
60
- import { labelContainer as I, shrinked as O, labelText as k, helperText as y, leftHelperText as E, warnIcon as F, rightHelperText as H, fieldContainer as W, fullWidth as w, normalWidth as A, disabled as P, field as R, background as g, helperContainer as j } from "./text-field-components.css-mistica.js";
60
+ import { labelContainer as I, shrinked as O, labelText as k, helperText as y, leftHelperText as E, warnIcon as F, rightHelperText as H, fieldContainer as W, fullWidth as w, normalWidth as A, disabled as P, field as R, background as N, helperContainer as j } from "./text-field-components.css-mistica.js";
61
61
  import { vars as o } from "./skins/skin-contract.css-mistica.js";
62
62
  import { getPrefixedDataAttributes as D } from "./utils/dom.js";
63
63
  import { formFieldOptionalLabelSuffix as V } from "./text-tokens.js";
@@ -65,7 +65,7 @@ import q from "./generated/mistica-icons/icon-warning-regular.js";
65
65
  import B from "./screen-reader-only.js";
66
66
  const Z = (param)=>{
67
67
  let { shrinkLabel: l, forId: d, inputState: r, error: s, children: i, style: t, showOptional: a } = param;
68
- const n = l || r === "focused" || r === "filled", [m, p] = v.useState("initial"), { texts: u, t: N } = C();
68
+ const n = l || r === "focused" || r === "filled", [m, p] = v.useState("initial"), { texts: u, t: g } = C();
69
69
  v.useEffect(()=>{
70
70
  const b = setTimeout(()=>{
71
71
  process.env.NODE_ENV !== "test" && p("transform 150ms, width 150ms");
@@ -94,7 +94,7 @@ const Z = (param)=>{
94
94
  a ? /* @__PURE__ */ c("span", {
95
95
  children: [
96
96
  "\xa0(",
97
- u.formFieldOptionalLabelSuffix || N(V),
97
+ u.formFieldOptionalLabelSuffix || g(V),
98
98
  ")"
99
99
  ]
100
100
  }) : null
@@ -166,7 +166,7 @@ const Z = (param)=>{
166
166
  }, D(m)), {
167
167
  children: [
168
168
  /* @__PURE__ */ e("div", {
169
- className: f(R, n ? g.readOnly : g.default, i),
169
+ className: f(R, n ? N.readOnly : N.default, i),
170
170
  ref: t,
171
171
  children: r
172
172
  }),
@@ -1,11 +1,11 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./text-link.css.ts.vanilla.css-mistica.js";
3
3
  var n = {
4
- underlineAlways: "v16_30_1_1m1n0pr2",
5
- underlineOnHover: "v16_30_1_1m1n0pr3"
4
+ underlineAlways: "v16_32_1m1n0pr2",
5
+ underlineOnHover: "v16_32_1m1n0pr3"
6
6
  }, r = {
7
- default: "v16_30_1_1m1n0pr1 v16_30_1_1y2v1nfjg v16_30_1_1y2v1nfiv v16_30_1_1y2v1nflt v16_30_1_1y2v1nf2p",
8
- inverseLight: "v16_30_1_1m1n0pr1 v16_30_1_1y2v1nfjg v16_30_1_1y2v1nfiv v16_30_1_1y2v1nflt v16_30_1_1y2v1nf2q",
9
- inverseDark: "v16_30_1_1m1n0pr1 v16_30_1_1y2v1nfjg v16_30_1_1y2v1nfiv v16_30_1_1y2v1nflt v16_30_1_1y2v1nf2p"
7
+ default: "v16_32_1m1n0pr1 v16_32_1y2v1nfjg v16_32_1y2v1nfiv v16_32_1y2v1nflt v16_32_1y2v1nf2p",
8
+ inverseLight: "v16_32_1m1n0pr1 v16_32_1y2v1nfjg v16_32_1y2v1nfiv v16_32_1y2v1nflt v16_32_1y2v1nf2q",
9
+ inverseDark: "v16_32_1m1n0pr1 v16_32_1y2v1nfjg v16_32_1y2v1nfiv v16_32_1y2v1nflt v16_32_1y2v1nf2p"
10
10
  };
11
11
  export { n as linkStyles, r as variants };