@telefonica/mistica 16.1.1 → 16.3.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 (167) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.css-mistica.js +12 -9
  3. package/dist/accordion.css.d.ts +1 -0
  4. package/dist/accordion.js +36 -39
  5. package/dist/align.css-mistica.js +12 -0
  6. package/dist/align.css.d.ts +1 -0
  7. package/dist/align.css.ts.vanilla.css-mistica.js +11 -0
  8. package/dist/align.d.ts +12 -0
  9. package/dist/align.js +79 -0
  10. package/dist/box.css-mistica.js +41 -0
  11. package/dist/box.css.d.ts +23 -0
  12. package/dist/box.css.ts.vanilla.css-mistica.js +11 -0
  13. package/dist/box.d.ts +4 -0
  14. package/dist/box.js +39 -31
  15. package/dist/boxed.css-mistica.js +10 -5
  16. package/dist/boxed.css.d.ts +3 -0
  17. package/dist/boxed.js +20 -24
  18. package/dist/callout.css-mistica.js +12 -4
  19. package/dist/callout.css.d.ts +1 -0
  20. package/dist/callout.js +14 -22
  21. package/dist/card.css-mistica.js +39 -24
  22. package/dist/card.css.d.ts +5 -0
  23. package/dist/card.js +236 -270
  24. package/dist/chip.css-mistica.js +19 -7
  25. package/dist/chip.css.d.ts +2 -0
  26. package/dist/chip.js +33 -49
  27. package/dist/community/advanced-data-card.css-mistica.js +30 -21
  28. package/dist/community/advanced-data-card.css.d.ts +4 -1
  29. package/dist/community/advanced-data-card.js +56 -68
  30. package/dist/empty-state-card.js +12 -11
  31. package/dist/empty-state.css-mistica.js +11 -8
  32. package/dist/empty-state.css.d.ts +1 -0
  33. package/dist/empty-state.js +10 -13
  34. package/dist/form.css-mistica.js +12 -0
  35. package/dist/form.css.d.ts +1 -0
  36. package/dist/form.js +8 -10
  37. package/dist/grid.css-mistica.js +143 -126
  38. package/dist/grid.css.d.ts +13 -0
  39. package/dist/grid.js +35 -38
  40. package/dist/hero.css-mistica.js +14 -8
  41. package/dist/hero.css.d.ts +2 -0
  42. package/dist/hero.js +35 -37
  43. package/dist/highlighted-card.js +15 -14
  44. package/dist/image.js +23 -25
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.js +4 -0
  47. package/dist/inline.js +10 -11
  48. package/dist/list.css-mistica.js +26 -17
  49. package/dist/list.css.d.ts +3 -0
  50. package/dist/list.js +120 -122
  51. package/dist/loading-screen.js +16 -16
  52. package/dist/logo-blau.d.ts +1 -1
  53. package/dist/logo-blau.js +10 -10
  54. package/dist/logo-common.d.ts +1 -0
  55. package/dist/logo-movistar.d.ts +1 -1
  56. package/dist/logo-movistar.js +4 -4
  57. package/dist/logo-o2-new.d.ts +1 -1
  58. package/dist/logo-o2-new.js +5 -5
  59. package/dist/logo-o2.d.ts +1 -1
  60. package/dist/logo-o2.js +5 -5
  61. package/dist/logo-telefonica.d.ts +1 -1
  62. package/dist/logo-telefonica.js +4 -4
  63. package/dist/logo-tu.d.ts +1 -1
  64. package/dist/logo-tu.js +5 -5
  65. package/dist/logo-vivo.d.ts +1 -1
  66. package/dist/logo-vivo.js +7 -7
  67. package/dist/logo.d.ts +9 -8
  68. package/dist/logo.js +125 -102
  69. package/dist/menu.css-mistica.js +9 -9
  70. package/dist/menu.js +9 -10
  71. package/dist/navigation-bar.css-mistica.js +23 -20
  72. package/dist/navigation-bar.css.d.ts +1 -0
  73. package/dist/navigation-bar.js +30 -37
  74. package/dist/package-version.js +1 -1
  75. package/dist/popover.d.ts +1 -0
  76. package/dist/popover.js +9 -10
  77. package/dist/sheet-common.js +3 -2
  78. package/dist/skeleton-base.js +10 -12
  79. package/dist/skeletons.css-mistica.js +11 -5
  80. package/dist/skeletons.css.d.ts +1 -0
  81. package/dist/snackbar.css-mistica.js +20 -14
  82. package/dist/snackbar.css.d.ts +3 -1
  83. package/dist/snackbar.js +65 -75
  84. package/dist/table.js +52 -51
  85. package/dist/tag.css-mistica.js +15 -4
  86. package/dist/tag.css.d.ts +2 -0
  87. package/dist/tag.js +22 -27
  88. package/dist/text-field-components.css-mistica.js +16 -10
  89. package/dist/text-field-components.css.d.ts +1 -0
  90. package/dist/text-field-components.js +32 -35
  91. package/dist/text-props.d.ts +60 -0
  92. package/dist/text-props.js +93 -0
  93. package/dist/text.d.ts +0 -62
  94. package/dist/text.js +156 -219
  95. package/dist/timer.js +42 -43
  96. package/dist/title.js +10 -9
  97. package/dist/tooltip.d.ts +3 -1
  98. package/dist/tooltip.js +106 -106
  99. package/dist/touchable.js +47 -42
  100. package/dist-es/accordion.css-mistica.js +3 -3
  101. package/dist-es/accordion.js +58 -61
  102. package/dist-es/align.css-mistica.js +3 -0
  103. package/dist-es/align.css.ts.vanilla.css-mistica.js +2 -0
  104. package/dist-es/align.js +70 -0
  105. package/dist-es/box.css-mistica.js +24 -0
  106. package/dist-es/box.css.ts.vanilla.css-mistica.js +2 -0
  107. package/dist-es/box.js +43 -35
  108. package/dist-es/boxed.css-mistica.js +5 -3
  109. package/dist-es/boxed.js +28 -32
  110. package/dist-es/callout.css-mistica.js +7 -2
  111. package/dist-es/callout.js +44 -52
  112. package/dist-es/card.css-mistica.js +4 -4
  113. package/dist-es/card.js +343 -377
  114. package/dist-es/chip.css-mistica.js +10 -4
  115. package/dist-es/chip.js +44 -60
  116. package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
  117. package/dist-es/community/advanced-data-card.js +94 -106
  118. package/dist-es/empty-state-card.js +17 -16
  119. package/dist-es/empty-state.css-mistica.js +3 -3
  120. package/dist-es/empty-state.js +19 -22
  121. package/dist-es/form.css-mistica.js +3 -0
  122. package/dist-es/form.js +12 -14
  123. package/dist-es/grid.css-mistica.js +123 -112
  124. package/dist-es/grid.js +38 -41
  125. package/dist-es/hero.css-mistica.js +2 -2
  126. package/dist-es/hero.js +75 -77
  127. package/dist-es/highlighted-card.js +19 -18
  128. package/dist-es/image.js +28 -30
  129. package/dist-es/index.js +1844 -1843
  130. package/dist-es/inline.js +19 -20
  131. package/dist-es/list.css-mistica.js +2 -2
  132. package/dist-es/list.js +170 -172
  133. package/dist-es/loading-screen.js +30 -30
  134. package/dist-es/logo-blau.js +11 -11
  135. package/dist-es/logo-movistar.js +5 -5
  136. package/dist-es/logo-o2-new.js +8 -8
  137. package/dist-es/logo-o2.js +8 -8
  138. package/dist-es/logo-telefonica.js +4 -4
  139. package/dist-es/logo-tu.js +8 -8
  140. package/dist-es/logo-vivo.js +16 -16
  141. package/dist-es/logo.js +132 -109
  142. package/dist-es/menu.css-mistica.js +3 -3
  143. package/dist-es/menu.js +21 -22
  144. package/dist-es/navigation-bar.css-mistica.js +11 -11
  145. package/dist-es/navigation-bar.js +80 -87
  146. package/dist-es/package-version.js +1 -1
  147. package/dist-es/popover.js +17 -18
  148. package/dist-es/sheet-common.js +12 -11
  149. package/dist-es/skeleton-base.js +15 -17
  150. package/dist-es/skeletons.css-mistica.js +5 -2
  151. package/dist-es/snackbar.css-mistica.js +4 -4
  152. package/dist-es/snackbar.js +93 -103
  153. package/dist-es/style.css +1 -1
  154. package/dist-es/table.js +89 -88
  155. package/dist-es/tag.css-mistica.js +2 -2
  156. package/dist-es/tag.js +36 -41
  157. package/dist-es/text-field-components.css-mistica.js +5 -2
  158. package/dist-es/text-field-components.js +48 -51
  159. package/dist-es/text-props.js +52 -0
  160. package/dist-es/text.js +171 -231
  161. package/dist-es/timer.js +80 -81
  162. package/dist-es/title.js +14 -13
  163. package/dist-es/tooltip.js +148 -148
  164. package/dist-es/touchable.js +55 -50
  165. package/package.json +3 -3
  166. package/dist/sprinkles.css-mistica.js +0 -2494
  167. package/dist-es/sprinkles.css-mistica.js +0 -2485
package/dist-es/table.js CHANGED
@@ -77,44 +77,45 @@ function _object_without_properties_loose(source, excluded) {
77
77
  }
78
78
  return target;
79
79
  }
80
- import { jsxs as f, jsx as e } from "react/jsx-runtime";
81
- import * as x from "react";
82
- import { getPrefixedDataAttributes as V } from "./utils/dom.js";
83
- import { table as X, boxed as W, collapsedRowsInMobile as E, fullWidth as M, hiddenHeadersInDesktop as ee, hiddenHeadersInMobile as te, cellTextAlign as _, verticalAlign as N, rowFirstItem as L, rowLastItem as R, rowLastCollapsedItem as H, collapsedRowHeaderItem as le, mobileCellHeading as re, collapsedRowTitle as ae, actionsTableCell as Y, topActions as oe, scrollContainer as se, scrollOverResponsiveLayout as ne, vars as ie } from "./table.css-mistica.js";
84
- import { vars as j } from "./skins/skin-contract.css-mistica.js";
85
- import ce, { Text1 as F, textProps as h, Text2 as me } from "./text.js";
86
- import { InternalBoxed as pe } from "./boxed.js";
80
+ import { jsxs as y, jsx as e } from "react/jsx-runtime";
81
+ import * as E from "react";
82
+ import { getPrefixedDataAttributes as X } from "./utils/dom.js";
83
+ import { table as W, boxed as ee, collapsedRowsInMobile as M, fullWidth as _, hiddenHeadersInDesktop as te, hiddenHeadersInMobile as le, cellTextAlign as H, verticalAlign as N, rowFirstItem as L, rowLastItem as R, rowLastCollapsedItem as Y, collapsedRowHeaderItem as re, mobileCellHeading as oe, collapsedRowTitle as ae, actionsTableCell as j, topActions as se, scrollContainer as ne, scrollOverResponsiveLayout as ie, vars as ce } from "./table.css-mistica.js";
84
+ import { vars as F } from "./skins/skin-contract.css-mistica.js";
85
+ import me, { Text1 as x, Text2 as pe } from "./text.js";
86
+ import { text2 as f, text4 as G } from "./text-props.js";
87
+ import { InternalBoxed as de } from "./boxed.js";
87
88
  import c from "classnames";
88
- import de from "./box.js";
89
- import { applyCssVars as he } from "./utils/css.js";
90
- import be from "./inline.js";
91
- import { IconButton as ue, ToggleIconButton as ge } from "./icon-button.js";
92
- import { iconContainerSize as G, iconSize as ye } from "./icon-button.css-mistica.js";
93
- import { TableActionsHeader as fe } from "./table-actions-header.js";
94
- const P = {
89
+ import he from "./box.js";
90
+ import { applyCssVars as be } from "./utils/css.js";
91
+ import ue from "./inline.js";
92
+ import { IconButton as ge, ToggleIconButton as ye } from "./icon-button.js";
93
+ import { iconContainerSize as Z, iconSize as fe } from "./icon-button.css-mistica.js";
94
+ import { TableActionsHeader as ke } from "./table-actions-header.js";
95
+ const $ = {
95
96
  default: "8px",
96
97
  boxed: "16px"
97
- }, Z = "1px", ke = (a)=>a.Icon ? /* @__PURE__ */ e(ue, _object_spread_props(_object_spread({}, a), {
98
- "aria-label": a.label,
98
+ }, q = "1px", ve = (o)=>o.Icon ? /* @__PURE__ */ e(ge, _object_spread_props(_object_spread({}, o), {
99
+ "aria-label": o.label,
99
100
  small: !0,
100
101
  type: "neutral",
101
102
  backgroundType: "transparent",
102
103
  bleedY: !0
103
- })) : /* @__PURE__ */ e(ge, _object_spread_props(_object_spread({}, a), {
104
- checkedProps: _object_spread_props(_object_spread({}, a.checkedProps), {
105
- "aria-label": a.checkedProps.label,
104
+ })) : /* @__PURE__ */ e(ye, _object_spread_props(_object_spread({}, o), {
105
+ checkedProps: _object_spread_props(_object_spread({}, o.checkedProps), {
106
+ "aria-label": o.checkedProps.label,
106
107
  type: "brand",
107
108
  backgroundType: "solid"
108
109
  }),
109
- uncheckedProps: _object_spread_props(_object_spread({}, a.uncheckedProps), {
110
- "aria-label": a.uncheckedProps.label,
110
+ uncheckedProps: _object_spread_props(_object_spread({}, o.uncheckedProps), {
111
+ "aria-label": o.uncheckedProps.label,
111
112
  type: "neutral",
112
113
  backgroundType: "transparent"
113
114
  }),
114
115
  small: !0,
115
116
  bleedY: !0
116
- })), q = "left", Oe = /*#__PURE__*/ x.forwardRef((_param, $)=>{
117
- var { dataAttributes: a, heading: m = [], content: k = [], boxed: b, responsive: J, fullWidth: u = !0, maxHeight: v, emptyCase: A, columnTextAlign: T = q, rowVerticalAlign: C = "middle", columnWidth: p, hideHeaders: g, scrollOverResponsiveLayout: K, rowHeaderIndex: s } = _param, S = _object_without_properties(_param, [
117
+ })), J = "left", Ee = /*#__PURE__*/ E.forwardRef((_param, z)=>{
118
+ var { dataAttributes: o, heading: m = [], content: k = [], boxed: h, responsive: K, fullWidth: b = !0, maxHeight: v, emptyCase: A, columnTextAlign: T = J, rowVerticalAlign: C = "middle", columnWidth: p, hideHeaders: u, scrollOverResponsiveLayout: Q, rowHeaderIndex: s } = _param, S = _object_without_properties(_param, [
118
119
  "dataAttributes",
119
120
  "heading",
120
121
  "content",
@@ -130,68 +131,68 @@ const P = {
130
131
  "scrollOverResponsiveLayout",
131
132
  "rowHeaderIndex"
132
133
  ]);
133
- const z = (l)=>{
134
+ const B = (l)=>{
134
135
  var _T_l;
135
- return Array.isArray(T) ? (_T_l = T[l]) !== null && _T_l !== void 0 ? _T_l : q : T;
136
- }, r = J === "collapse-rows", B = g === !0 || g === "mobile", Q = g === !0 || g === "desktop", y = k.some((l)=>!Array.isArray(l) && l.actions.length > 0), D = /* @__PURE__ */ f("table", {
137
- className: c(X, {
138
- [W]: b,
139
- [E]: r,
140
- [M]: u,
141
- [ee]: Q,
142
- [te]: B || r
136
+ return Array.isArray(T) ? (_T_l = T[l]) !== null && _T_l !== void 0 ? _T_l : J : T;
137
+ }, r = K === "collapse-rows", P = u === !0 || u === "mobile", U = u === !0 || u === "desktop", g = k.some((l)=>!Array.isArray(l) && l.actions.length > 0), D = /* @__PURE__ */ y("table", {
138
+ className: c(W, {
139
+ [ee]: h,
140
+ [M]: r,
141
+ [_]: b,
142
+ [te]: U,
143
+ [le]: P || r
143
144
  }),
144
145
  "aria-label": S["aria-label"],
145
146
  "aria-labelledby": S["aria-labelledby"],
146
147
  "aria-describedby": S["aria-describedby"],
147
148
  children: [
148
149
  m.length > 0 && /* @__PURE__ */ e("thead", {
149
- children: /* @__PURE__ */ f(F, {
150
+ children: /* @__PURE__ */ y(x, {
150
151
  as: "tr",
151
152
  medium: !0,
152
153
  transform: "uppercase",
153
- color: j.colors.textSecondary,
154
+ color: F.colors.textSecondary,
154
155
  wordBreak: !1,
155
156
  children: [
156
- m.map((l, o)=>/* @__PURE__ */ e("th", {
157
+ m.map((l, a)=>/* @__PURE__ */ e("th", {
157
158
  scope: "col",
158
- className: c(_[z(o)], N[C], {
159
- [L]: o === 0,
160
- [R]: o === m.length - 1 && !y
159
+ className: c(H[B(a)], N[C], {
160
+ [L]: a === 0,
161
+ [R]: a === m.length - 1 && !g
161
162
  }),
162
163
  style: {
163
- minWidth: p == null ? void 0 : p[o],
164
- width: p == null ? void 0 : p[o]
164
+ minWidth: p == null ? void 0 : p[a],
165
+ width: p == null ? void 0 : p[a]
165
166
  },
166
167
  children: l
167
- }, o)),
168
- y && /* @__PURE__ */ e(fe, {})
168
+ }, a)),
169
+ g && /* @__PURE__ */ e(ke, {})
169
170
  ]
170
171
  })
171
172
  }),
172
173
  /* @__PURE__ */ e("tbody", {
173
- children: k.length > 0 ? k.map((l, o)=>{
174
+ children: k.length > 0 ? k.map((l, a)=>{
174
175
  var _l_actions;
175
- const n = Array.isArray(l) ? l : l.cells, i = Array.isArray(l) ? [] : (_l_actions = l.actions) !== null && _l_actions !== void 0 ? _l_actions : [], w = /* @__PURE__ */ e(be, {
176
+ const n = Array.isArray(l) ? l : l.cells, i = Array.isArray(l) ? [] : (_l_actions = l.actions) !== null && _l_actions !== void 0 ? _l_actions : [], w = /* @__PURE__ */ e(ue, {
176
177
  space: 16,
177
- children: i.map((d, t)=>"Icon" in d || "checkedProps" in d ? /* @__PURE__ */ e(ke, _object_spread({}, d), t) : /* @__PURE__ */ e(x.Fragment, {
178
+ children: i.map((d, t)=>"Icon" in d || "checkedProps" in d ? /* @__PURE__ */ e(ve, _object_spread({}, d), t) : /* @__PURE__ */ e(E.Fragment, {
178
179
  children: d
179
180
  }, t))
180
- }), I = i.length ? `calc(${G.small} * ${i.length} + 16px * ${i.length - 1})` : "0px";
181
+ }), I = i.length ? `calc(${Z.small} * ${i.length} + 16px * ${i.length - 1})` : "0px";
181
182
  return(// Add position relative because in collapse-rows mode, actions are positioned absolutely in the row
182
- /* @__PURE__ */ f("tr", {
183
+ /* @__PURE__ */ y("tr", {
183
184
  style: {
184
185
  position: "relative"
185
186
  },
186
187
  children: [
187
188
  n.map((d, t)=>{
188
- const U = s === n.length - 1 ? t === n.length - 2 || n.length === 1 : t === n.length - 1;
189
- return /* @__PURE__ */ f(t === s ? "th" : "td", {
189
+ const V = s === n.length - 1 ? t === n.length - 2 || n.length === 1 : t === n.length - 1;
190
+ return /* @__PURE__ */ y(t === s ? "th" : "td", {
190
191
  className: c(N[C], {
191
192
  [L]: t === 0,
192
- [R]: t === n.length - 1 && !y,
193
- [H]: U && r,
194
- [le]: t === s && r
193
+ [R]: t === n.length - 1 && !g,
194
+ [Y]: V && r,
195
+ [re]: t === s && r
195
196
  }),
196
197
  style: {
197
198
  // add space between top actions and content
@@ -199,30 +200,30 @@ const P = {
199
200
  },
200
201
  scope: t === s ? "row" : void 0,
201
202
  children: [
202
- t !== s && r && m[t] && !B && // this is aria-hidden because screen readers already read the column heading from the th
203
+ t !== s && r && m[t] && !P && // this is aria-hidden because screen readers already read the column heading from the th
203
204
  /* @__PURE__ */ e("div", {
204
- className: re,
205
+ className: oe,
205
206
  "aria-hidden": !0,
206
- children: /* @__PURE__ */ e(F, {
207
+ children: /* @__PURE__ */ e(x, {
207
208
  medium: !0,
208
- color: j.colors.textSecondary,
209
+ color: F.colors.textSecondary,
209
210
  children: m[t]
210
211
  })
211
212
  }),
212
- /* @__PURE__ */ e(ce, _object_spread_props(_object_spread({
213
- desktopSize: h.text2.desktopSize,
214
- desktopLineHeight: h.text2.desktopLineHeight
213
+ /* @__PURE__ */ e(me, _object_spread_props(_object_spread({
214
+ desktopSize: f.desktopSize,
215
+ desktopLineHeight: f.desktopLineHeight
215
216
  }, t === s && r ? {
216
- mobileSize: h.text4.mobileSize,
217
- mobileLineHeight: h.text4.mobileLineHeight
217
+ mobileSize: G.mobileSize,
218
+ mobileLineHeight: G.mobileLineHeight
218
219
  } : {
219
- mobileSize: h.text2.mobileSize,
220
- mobileLineHeight: h.text2.mobileLineHeight
220
+ mobileSize: f.mobileSize,
221
+ mobileLineHeight: f.mobileLineHeight
221
222
  }), {
222
223
  as: "div",
223
224
  wordBreak: !1,
224
225
  children: /* @__PURE__ */ e("div", {
225
- className: c(_[z(t)], {
226
+ className: c(H[B(t)], {
226
227
  [ae]: t === s && r
227
228
  }),
228
229
  children: d
@@ -232,7 +233,7 @@ const P = {
232
233
  }, t);
233
234
  }),
234
235
  i.length > 0 ? /* @__PURE__ */ e("td", {
235
- className: c(N[C], Y, R, {
236
+ className: c(N[C], j, R, {
236
237
  [L]: n.length === 0
237
238
  }),
238
239
  align: "right",
@@ -240,30 +241,30 @@ const P = {
240
241
  width: `calc(${I} + 12px)`
241
242
  },
242
243
  children: w
243
- }) : y && /* @__PURE__ */ e("td", {
244
- className: Y
244
+ }) : g && /* @__PURE__ */ e("td", {
245
+ className: j
245
246
  }),
246
247
  process.env.NODE_ENV !== "test" && r && i.length > 0 && /* @__PURE__ */ e("td", {
247
- className: oe,
248
+ className: se,
248
249
  style: {
249
250
  position: "absolute",
250
- top: `calc(${b ? P.boxed : P.default} - ${Z} + (${G.small} - ${ye.small}) / 2)`,
251
- right: b ? `calc(${P.boxed} - ${Z})` : 0,
251
+ top: `calc(${h ? $.boxed : $.default} - ${q} + (${Z.small} - ${fe.small}) / 2)`,
252
+ right: h ? `calc(${$.boxed} - ${q})` : 0,
252
253
  width: I
253
254
  },
254
255
  children: w
255
256
  })
256
257
  ]
257
- }, o));
258
+ }, a));
258
259
  }) : /* @__PURE__ */ e("tr", {
259
260
  children: /* @__PURE__ */ e("td", {
260
261
  colSpan: m.length,
261
262
  className: c({
262
- [H]: r
263
+ [Y]: r
263
264
  }),
264
- children: typeof A == "string" ? /* @__PURE__ */ e(de, {
265
+ children: typeof A == "string" ? /* @__PURE__ */ e(he, {
265
266
  paddingY: 56,
266
- children: /* @__PURE__ */ e(me, {
267
+ children: /* @__PURE__ */ e(pe, {
267
268
  regular: !0,
268
269
  textAlign: "center",
269
270
  as: "div",
@@ -277,35 +278,35 @@ const P = {
277
278
  }), O = function() {
278
279
  let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
279
280
  return {
280
- className: c(se, {
281
- [ne]: l,
282
- [E]: r,
283
- [M]: u
281
+ className: c(ne, {
282
+ [ie]: l,
283
+ [M]: r,
284
+ [_]: b
284
285
  }),
285
- style: he({
286
- [ie.maxHeight]: typeof v == "number" ? `${v}px` : v !== null && v !== void 0 ? v : "auto"
286
+ style: be({
287
+ [ce.maxHeight]: typeof v == "number" ? `${v}px` : v !== null && v !== void 0 ? v : "auto"
287
288
  })
288
289
  };
289
290
  };
290
- return b ? /* @__PURE__ */ e(pe, {
291
+ return h ? /* @__PURE__ */ e(de, {
291
292
  desktopOnly: r,
292
293
  width: "fit-content",
293
294
  maxWidth: "100%",
294
295
  minWidth: {
295
- desktop: u ? "100%" : "auto",
296
- mobile: r || u ? "100%" : "auto"
296
+ desktop: b ? "100%" : "auto",
297
+ mobile: r || b ? "100%" : "auto"
297
298
  },
298
- ref: $,
299
+ ref: z,
299
300
  dataAttributes: _object_spread({
300
301
  "component-name": "Table"
301
- }, a),
302
+ }, o),
302
303
  children: /* @__PURE__ */ e("div", _object_spread_props(_object_spread({}, O()), {
303
304
  children: D
304
305
  }))
305
306
  }) : /* @__PURE__ */ e("div", _object_spread_props(_object_spread({
306
- ref: $
307
- }, V(a, "Table"), O(K)), {
307
+ ref: z
308
+ }, X(o, "Table"), O(Q)), {
308
309
  children: D
309
310
  }));
310
311
  });
311
- export { Oe as Table };
312
+ export { Ee as Table };
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./tag.css.ts.vanilla.css-mistica.js";
3
- var _ = "_1wy08671 _1y2v1nf7j _1y2v1nf8s _1y2v1nfhl _1y2v1nfhp _1y2v1nfhz _1y2v1nfht _1y2v1nfjg";
4
- export { _ as tag };
3
+ var y = "_1y2v1nfhl _1y2v1nfa1", _ = "_1y2v1nfhm", f = "_1wy08671 _1y2v1nf7j _1y2v1nf8s _1y2v1nfhl _1y2v1nfhp _1y2v1nfhz _1y2v1nfht _1y2v1nfjg";
4
+ export { y as badge, _ as icon, f as tag };
package/dist-es/tag.js CHANGED
@@ -51,23 +51,22 @@ function _object_spread_props(target, source) {
51
51
  }
52
52
  return target;
53
53
  }
54
- import { jsxs as c, jsx as r } from "react/jsx-runtime";
55
- import g from "./box.js";
56
- import { Text as x } from "./text.js";
57
- import { useThemeVariant as T, ThemeVariant as h } from "./theme-variant-context.js";
54
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
55
+ import p from "./box.js";
56
+ import { Text as f } from "./text.js";
57
+ import { useThemeVariant as T, ThemeVariant as x } from "./theme-variant-context.js";
58
58
  import { pxToRem as v } from "./utils/css.js";
59
- import { getPrefixedDataAttributes as k } from "./utils/dom.js";
60
- import { tag as B } from "./tag.css-mistica.js";
61
- import { sprinkles as a } from "./sprinkles.css-mistica.js";
62
- import { vars as b } from "./skins/skin-contract.css-mistica.js";
63
- import w from "classnames";
64
- import { useTheme as A } from "./hooks.js";
65
- import P from "./badge.js";
66
- const { colors: t } = b, V = (param)=>{
67
- let { Icon: e, children: i, dataAttributes: m, type: l = "promo", badge: n } = param;
68
- const { textPresets: d } = A(), p = T(), o = n === !0 ? void 0 : n || 0;
69
- if (!i) return null;
70
- const u = {
59
+ import { getPrefixedDataAttributes as h } from "./utils/dom.js";
60
+ import { tag as k, icon as B, badge as b } from "./tag.css-mistica.js";
61
+ import { vars as w } from "./skins/skin-contract.css-mistica.js";
62
+ import A from "classnames";
63
+ import { useTheme as P } from "./hooks.js";
64
+ import V from "./badge.js";
65
+ const { colors: t } = w, C = (param)=>{
66
+ let { Icon: e, children: o, dataAttributes: g, type: c = "promo", badge: i } = param;
67
+ const { textPresets: m } = P(), d = T(), a = i === !0 ? void 0 : i || 0;
68
+ if (!o) return null;
69
+ const l = {
71
70
  // [textColor, backgroundColor]
72
71
  promo: [
73
72
  t.tagTextPromo,
@@ -80,7 +79,7 @@ const { colors: t } = b, V = (param)=>{
80
79
  inactive: [
81
80
  t.tagTextInactive,
82
81
  // TODO: remove logic for alternative variant (https://jira.tid.es/browse/WEB-1803)
83
- p === "alternative" ? t.neutralLowAlternative : t.tagBackgroundInactive
82
+ d === "alternative" ? t.neutralLowAlternative : t.tagBackgroundInactive
84
83
  ],
85
84
  success: [
86
85
  t.tagTextSuccess,
@@ -94,47 +93,43 @@ const { colors: t } = b, V = (param)=>{
94
93
  t.tagTextError,
95
94
  t.tagBackgroundError
96
95
  ]
97
- }, [s, f] = u[l];
98
- return /* @__PURE__ */ c("span", _object_spread_props(_object_spread({}, k(m, "Tag")), {
99
- className: w(B, a({
96
+ }, [n, u] = l[c];
97
+ return /* @__PURE__ */ s("span", _object_spread_props(_object_spread({}, h(g, "Tag")), {
98
+ className: A(k),
99
+ style: {
100
100
  paddingLeft: e ? 8 : 12,
101
- paddingRight: o !== 0 ? 8 : 12,
102
- background: f
103
- })),
101
+ paddingRight: a !== 0 ? 8 : 12,
102
+ background: u
103
+ },
104
104
  children: [
105
- e && /* @__PURE__ */ r(g, {
105
+ e && /* @__PURE__ */ r(p, {
106
106
  paddingRight: 4,
107
107
  children: /* @__PURE__ */ r(e, {
108
- color: s,
108
+ color: n,
109
109
  size: v(16),
110
- className: a({
111
- display: "block"
112
- })
110
+ className: B
113
111
  })
114
112
  }),
115
- /* @__PURE__ */ c(h, {
113
+ /* @__PURE__ */ s(x, {
116
114
  isInverse: !1,
117
115
  children: [
118
- /* @__PURE__ */ r(x, {
119
- color: s,
116
+ /* @__PURE__ */ r(f, {
117
+ color: n,
120
118
  size: 14,
121
119
  lineHeight: 20,
122
- weight: d.indicator.weight,
120
+ weight: m.indicator.weight,
123
121
  truncate: !0,
124
- children: i
122
+ children: o
125
123
  }),
126
- o !== 0 && /* @__PURE__ */ r(g, {
127
- paddingLeft: 4,
128
- className: a({
129
- display: "inline-flex"
130
- }),
131
- children: /* @__PURE__ */ r(P, {
132
- value: o
124
+ a !== 0 && /* @__PURE__ */ r("div", {
125
+ className: b,
126
+ children: /* @__PURE__ */ r(V, {
127
+ value: a
133
128
  })
134
129
  })
135
130
  ]
136
131
  })
137
132
  ]
138
133
  }));
139
- }, I = V;
134
+ }, I = C;
140
135
  export { I as default };
@@ -2,5 +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 a = 328, f = 0.78, e = 0.75, y = "_15k6ur97", k = "_1y2v1nfkl _1y2v1nfk1 _1y2v1nfhk _1y2v1nfka _1y2v1nfhe", i = "_15k6ur96 _1y2v1nfhk _1y2v1nfhq", l = "_1y2v1nfi7", h = "_1y2v1nfa7 _1y2v1nfbj _1y2v1nfhk", t = "_1y2v1nfi5 _1y2v1nf7j", o = "_15k6ur91 _1y2v1nfhf _1y2v1nfhk _1y2v1nfhp", p = "_15k6ur93 _1y2v1nfkl _1y2v1nfi3", u = "_15k6ur9e _1y2v1nfhk", L = "_15k6ur99 _1y2v1nfi7", d = "_15k6ur94", E = "_15k6ur9g";
6
- export { a as DEFAULT_WIDTH, f as LABEL_SCALE_DESKTOP, e as LABEL_SCALE_MOBILE, y as disabled, k as field, i as fieldContainer, l as fullWidth, h as helperContainer, t as helperText, o as labelContainer, p as labelText, u as leftHelperText, L as normalWidth, d as shrinked, E as warnIcon };
5
+ var a = 328, f = 0.78, e = 0.75, y = {
6
+ default: "_1y2v1nf3q",
7
+ readOnly: "_1y2v1nf5k"
8
+ }, k = "_15k6ur97", l = "_1y2v1nfkl _1y2v1nfk1 _1y2v1nfhk _1y2v1nfka _1y2v1nfhe", i = "_15k6ur96 _1y2v1nfhk _1y2v1nfhq", t = "_1y2v1nfi7", h = "_1y2v1nfa7 _1y2v1nfbj _1y2v1nfhk", o = "_1y2v1nfi5 _1y2v1nf7j", u = "_15k6ur91 _1y2v1nfhf _1y2v1nfhk _1y2v1nfhp", d = "_15k6ur93 _1y2v1nfkl _1y2v1nfi3", p = "_15k6ur9e _1y2v1nfhk", L = "_15k6ur99 _1y2v1nfi7", E = "_15k6ur94", T = "_15k6ur9g";
9
+ export { a as DEFAULT_WIDTH, f as LABEL_SCALE_DESKTOP, e as LABEL_SCALE_MOBILE, y as background, k as disabled, l as field, i as fieldContainer, t as fullWidth, h as helperContainer, o as helperText, u as labelContainer, d as labelText, p as leftHelperText, L as normalWidth, E as shrinked, T as warnIcon };
@@ -51,81 +51,80 @@ function _object_spread_props(target, source) {
51
51
  }
52
52
  return target;
53
53
  }
54
- import { jsxs as c, jsx as o, Fragment as C } from "react/jsx-runtime";
54
+ import { jsxs as c, jsx as r, Fragment as C } from "react/jsx-runtime";
55
55
  import * as g from "react";
56
56
  import m from "classnames";
57
57
  import { useIsInverseOrMediaVariant as I } from "./theme-variant-context.js";
58
58
  import { useTheme as S } from "./hooks.js";
59
59
  import { Text1 as x } from "./text.js";
60
- import { labelContainer as T, shrinked as k, labelText as E, helperText as b, leftHelperText as F, warnIcon as L, fieldContainer as O, fullWidth as W, normalWidth as w, disabled as A, field as P, helperContainer as j } from "./text-field-components.css-mistica.js";
61
- import { sprinkles as v } from "./sprinkles.css-mistica.js";
62
- import { vars as r } from "./skins/skin-contract.css-mistica.js";
60
+ import { labelContainer as T, shrinked as E, labelText as F, helperText as v, leftHelperText as O, warnIcon as k, fieldContainer as W, fullWidth as A, normalWidth as L, disabled as P, field as j, background as b, helperContainer as w } from "./text-field-components.css-mistica.js";
61
+ import { vars as t } from "./skins/skin-contract.css-mistica.js";
63
62
  import { getPrefixedDataAttributes as D } from "./utils/dom.js";
64
63
  import { formFieldOptionalLabelSuffix as H } from "./text-tokens.js";
65
64
  import R from "./generated/mistica-icons/icon-warning-regular.js";
66
- const X = (param)=>{
67
- let { shrinkLabel: t, forId: l, inputState: e, error: s, children: i, style: n, optional: a } = param;
68
- const f = t || e === "focused" || e === "filled", [u, p] = g.useState("initial"), { texts: d, t: N } = S();
65
+ const U = (param)=>{
66
+ let { shrinkLabel: o, forId: l, inputState: e, error: s, children: i, style: a, optional: n } = param;
67
+ const f = o || e === "focused" || e === "filled", [u, h] = g.useState("initial"), { texts: d, t: y } = S();
69
68
  g.useEffect(()=>{
70
- const y = setTimeout(()=>{
71
- process.env.NODE_ENV !== "test" && p("transform 150ms, width 150ms");
69
+ const N = setTimeout(()=>{
70
+ process.env.NODE_ENV !== "test" && h("transform 150ms, width 150ms");
72
71
  });
73
72
  return ()=>{
74
- clearTimeout(y);
73
+ clearTimeout(N);
75
74
  };
76
75
  }, []);
77
- let h = r.colors.textSecondary;
78
- return s && e !== "default" ? h = r.colors.textError : e === "focused" && (h = r.colors.textActivated), /* @__PURE__ */ c("label", {
76
+ let p = t.colors.textSecondary;
77
+ return s && e !== "default" ? p = t.colors.textError : e === "focused" && (p = t.colors.textActivated), /* @__PURE__ */ c("label", {
79
78
  className: m(T, {
80
- [k]: f
81
- }, v({
82
- color: h
83
- })),
79
+ [E]: f
80
+ }),
84
81
  htmlFor: l,
85
- style: _object_spread_props(_object_spread({}, n), {
82
+ style: _object_spread_props(_object_spread({
83
+ color: p
84
+ }, a), {
86
85
  transition: u
87
86
  }),
88
87
  children: [
89
- /* @__PURE__ */ o("span", {
90
- className: E,
88
+ /* @__PURE__ */ r("span", {
89
+ className: F,
91
90
  children: i
92
91
  }),
93
- a ? /* @__PURE__ */ c("span", {
92
+ n ? /* @__PURE__ */ c("span", {
94
93
  children: [
95
94
  "\xa0(",
96
- d.formFieldOptionalLabelSuffix || N(H),
95
+ d.formFieldOptionalLabelSuffix || y(H),
97
96
  ")"
98
97
  ]
99
98
  }) : null
100
99
  ]
101
100
  });
102
- }, Y = (param)=>{
103
- let { leftText: t, rightText: l, error: e, id: s } = param;
104
- const i = I(), n = i ? r.colors.textPrimaryInverse : e ? r.colors.textError : r.colors.textSecondary, a = i ? r.colors.textPrimaryInverse : r.colors.textSecondary;
101
+ }, X = (param)=>{
102
+ let { leftText: o, rightText: l, error: e, id: s } = param;
103
+ const i = I(), a = i ? t.colors.textPrimaryInverse : e ? t.colors.textError : t.colors.textSecondary, n = i ? t.colors.textPrimaryInverse : t.colors.textSecondary;
105
104
  return /* @__PURE__ */ c(C, {
106
105
  children: [
107
- t && /* @__PURE__ */ c("p", {
108
- className: m(b, F),
106
+ o && /* @__PURE__ */ c("p", {
107
+ className: m(v, O),
109
108
  children: [
110
- e && /* @__PURE__ */ o(x, {
109
+ e && /* @__PURE__ */ r(x, {
111
110
  regular: !0,
112
- children: /* @__PURE__ */ o(R, {
113
- color: n,
114
- className: L
111
+ children: /* @__PURE__ */ r(R, {
112
+ color: a,
113
+ className: k
115
114
  })
116
115
  }),
117
- /* @__PURE__ */ o(x, {
118
- color: n,
116
+ /* @__PURE__ */ r(x, {
117
+ color: a,
119
118
  regular: !0,
120
119
  id: s,
121
- children: t
120
+ children: o
122
121
  })
123
122
  ]
124
123
  }),
125
- l && /* @__PURE__ */ o("div", {
126
- className: m(b),
127
- children: /* @__PURE__ */ o(x, {
128
- color: a,
124
+ l && /* @__PURE__ */ r("div", {
125
+ className: m(v),
126
+ children: /* @__PURE__ */ r(x, {
127
+ color: n,
129
128
  regular: !0,
130
129
  as: "p",
131
130
  textAlign: "right",
@@ -134,31 +133,29 @@ const X = (param)=>{
134
133
  })
135
134
  ]
136
135
  });
137
- }, Z = (param)=>{
138
- let { multiline: t, disabled: l, children: e, helperText: s, className: i, fieldRef: n, fullWidth: a, readOnly: f, dataAttributes: u } = param;
136
+ }, Y = (param)=>{
137
+ let { multiline: o, disabled: l, children: e, helperText: s, className: i, fieldRef: a, fullWidth: n, readOnly: f, dataAttributes: u } = param;
139
138
  return(// eslint-disable-next-line jsx-a11y/no-static-element-interactions
140
139
  /* @__PURE__ */ c("div", _object_spread_props(_object_spread({
141
- className: m(O, a ? W : w, {
142
- [A]: l
140
+ className: m(W, n ? A : L, {
141
+ [P]: l
143
142
  }),
144
- onClick: (p)=>{
143
+ onClick: (h)=>{
145
144
  var d;
146
- (d = p.currentTarget.querySelector(t ? "textarea" : "input")) == null || d.focus();
145
+ (d = h.currentTarget.querySelector(o ? "textarea" : "input")) == null || d.focus();
147
146
  }
148
147
  }, D(u)), {
149
148
  children: [
150
- /* @__PURE__ */ o("div", {
151
- className: m(P, v({
152
- background: f ? r.colors.neutralLow : r.colors.backgroundContainer
153
- }), i),
154
- ref: n,
149
+ /* @__PURE__ */ r("div", {
150
+ className: m(j, f ? b.readOnly : b.default, i),
151
+ ref: a,
155
152
  children: e
156
153
  }),
157
- s && /* @__PURE__ */ o("div", {
158
- className: j,
154
+ s && /* @__PURE__ */ r("div", {
155
+ className: w,
159
156
  children: s
160
157
  })
161
158
  ]
162
159
  })));
163
160
  };
164
- export { Z as FieldContainer, Y as HelperText, X as Label };
161
+ export { Y as FieldContainer, X as HelperText, U as Label };