@telefonica/mistica 17.5.0 → 17.7.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 (289) 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/autocomplete.css-mistica.js +1 -1
  5. package/dist/avatar.css-mistica.js +1 -1
  6. package/dist/badge.css-mistica.js +1 -1
  7. package/dist/box.css-mistica.js +13 -13
  8. package/dist/boxed.css-mistica.js +24 -24
  9. package/dist/button-group.css-mistica.js +1 -1
  10. package/dist/button-layout.css-mistica.js +14 -14
  11. package/dist/button.css-mistica.js +34 -34
  12. package/dist/callout.css-mistica.js +11 -11
  13. package/dist/card-cover.d.ts +2 -2
  14. package/dist/card-data.d.ts +2 -2
  15. package/dist/card-data.js +6 -8
  16. package/dist/card-internal.css-mistica.js +47 -29
  17. package/dist/card-internal.css.d.ts +4 -0
  18. package/dist/card-internal.d.ts +38 -3
  19. package/dist/card-internal.js +394 -301
  20. package/dist/card-media.d.ts +2 -2
  21. package/dist/card-media.js +7 -9
  22. package/dist/card-naked.d.ts +2 -2
  23. package/dist/card-naked.js +9 -11
  24. package/dist/carousel.css-mistica.js +8 -8
  25. package/dist/checkbox.css-mistica.js +11 -11
  26. package/dist/checkbox.d.ts +2 -0
  27. package/dist/checkbox.js +10 -10
  28. package/dist/chip.css-mistica.js +15 -15
  29. package/dist/circle.css-mistica.js +1 -1
  30. package/dist/community/advanced-data-card.css-mistica.js +20 -11
  31. package/dist/community/advanced-data-card.css.d.ts +2 -0
  32. package/dist/community/advanced-data-card.d.ts +7 -3
  33. package/dist/community/advanced-data-card.js +164 -142
  34. package/dist/community/ai-card.css-mistica.js +13 -13
  35. package/dist/community/ai-card.js +1 -1
  36. package/dist/community/blocks.css-mistica.js +1 -1
  37. package/dist/community/cyber/example-component.css-mistica.js +1 -1
  38. package/dist/community/example-component.css-mistica.js +2 -2
  39. package/dist/counter.css-mistica.js +1 -1
  40. package/dist/cover-hero.css-mistica.js +2 -2
  41. package/dist/credit-card-number-field.css-mistica.js +3 -3
  42. package/dist/date-field.css-mistica.js +1 -1
  43. package/dist/date-time-picker.css-mistica.js +1 -1
  44. package/dist/dialog.css-mistica.js +4 -4
  45. package/dist/divider.css-mistica.js +5 -5
  46. package/dist/double-field.css-mistica.js +2 -2
  47. package/dist/drawer.css-mistica.js +1 -1
  48. package/dist/empty-state-card.css-mistica.js +1 -1
  49. package/dist/empty-state.css-mistica.js +5 -5
  50. package/dist/fade-in.css-mistica.js +1 -1
  51. package/dist/fade-out.css-mistica.js +1 -1
  52. package/dist/feedback.css-mistica.js +1 -1
  53. package/dist/file-upload.css-mistica.js +7 -7
  54. package/dist/fixed-footer-layout.css-mistica.js +2 -2
  55. package/dist/form.css-mistica.js +1 -1
  56. package/dist/generated/mistica-icons/icon-document-information-filled.js +165 -0
  57. package/dist/generated/mistica-icons/icon-document-information-light.js +165 -0
  58. package/dist/generated/mistica-icons/icon-document-information-regular.js +165 -0
  59. package/dist/generated/mistica-icons/icon-internet-roaming-filled.js +159 -0
  60. package/dist/generated/mistica-icons/icon-internet-roaming-light.js +159 -0
  61. package/dist/generated/mistica-icons/icon-internet-roaming-regular.js +159 -0
  62. package/dist/generated/mistica-icons/icon-mobile-information-filled.js +165 -0
  63. package/dist/generated/mistica-icons/icon-mobile-information-light.js +173 -0
  64. package/dist/generated/mistica-icons/icon-mobile-information-regular.js +165 -0
  65. package/dist/generated/mistica-icons/icon-search-ai-filled.js +165 -0
  66. package/dist/generated/mistica-icons/icon-search-ai-light.js +165 -0
  67. package/dist/generated/mistica-icons/icon-search-ai-regular.js +165 -0
  68. package/dist/grid-layout.css-mistica.js +3 -3
  69. package/dist/grid.css-mistica.js +120 -120
  70. package/dist/header.css-mistica.js +1 -1
  71. package/dist/hero.css-mistica.js +2 -2
  72. package/dist/horizontal-scroll.css-mistica.js +1 -1
  73. package/dist/icon-button.css-mistica.js +53 -53
  74. package/dist/icons/icon-chevron.css-mistica.js +2 -2
  75. package/dist/icons/icon-error.css-mistica.js +1 -1
  76. package/dist/image.css-mistica.js +10 -10
  77. package/dist/index.d.ts +12 -0
  78. package/dist/index.js +48 -0
  79. package/dist/inline.css-mistica.js +11 -11
  80. package/dist/list.css-mistica.js +7 -7
  81. package/dist/loading-bar.css-mistica.js +1 -1
  82. package/dist/loading-screen.css-mistica.js +4 -4
  83. package/dist/logo.css-mistica.js +5 -5
  84. package/dist/menu.css-mistica.js +26 -24
  85. package/dist/menu.css.d.ts +2 -2
  86. package/dist/menu.d.ts +15 -3
  87. package/dist/menu.js +184 -162
  88. package/dist/mosaic.css-mistica.js +1 -1
  89. package/dist/navigation-bar.css-mistica.js +9 -9
  90. package/dist/navigation-breadcrumbs.css-mistica.js +1 -1
  91. package/dist/navigation-shared.css-mistica.js +9 -9
  92. package/dist/package-version.js +1 -1
  93. package/dist/pagination.css-mistica.js +18 -18
  94. package/dist/pin-field.css-mistica.js +1 -1
  95. package/dist/popover.css-mistica.js +1 -1
  96. package/dist/popover.d.ts +1 -0
  97. package/dist/progress-bar.css-mistica.js +6 -6
  98. package/dist/radio-button.css-mistica.js +19 -19
  99. package/dist/radio-button.d.ts +3 -1
  100. package/dist/radio-button.js +73 -72
  101. package/dist/rating.css-mistica.js +2 -2
  102. package/dist/responsive-layout.css-mistica.js +6 -6
  103. package/dist/screen-reader-only.css-mistica.js +1 -1
  104. package/dist/select.css-mistica.js +15 -15
  105. package/dist/sheet-action-row.css-mistica.js +1 -1
  106. package/dist/sheet-common.css-mistica.js +1 -1
  107. package/dist/sheet-info.css-mistica.js +1 -1
  108. package/dist/sidenav-bar-layout.css-mistica.js +1 -1
  109. package/dist/sidenav-bar.css-mistica.js +71 -71
  110. package/dist/sidenav-bar.js +55 -50
  111. package/dist/skeletons.css-mistica.js +6 -6
  112. package/dist/skins/skin-contract.css-mistica.js +738 -738
  113. package/dist/skip-link.css-mistica.js +1 -1
  114. package/dist/slider.css-mistica.js +18 -18
  115. package/dist/snackbar.css-mistica.js +4 -4
  116. package/dist/spinner.css-mistica.js +1 -1
  117. package/dist/square.css-mistica.js +1 -1
  118. package/dist/stack.css-mistica.js +5 -5
  119. package/dist/stacking-group.css-mistica.js +1 -1
  120. package/dist/stepper.css-mistica.js +2 -2
  121. package/dist/switch-component.css-mistica.js +35 -35
  122. package/dist/switch-component.d.ts +2 -0
  123. package/dist/switch-component.js +19 -18
  124. package/dist/table.css-mistica.js +9 -9
  125. package/dist/tabs.css-mistica.js +17 -17
  126. package/dist/tag.css-mistica.js +1 -1
  127. package/dist/text-field-base.css-mistica.js +16 -16
  128. package/dist/text-field-components.css-mistica.js +3 -3
  129. package/dist/text-link.css-mistica.js +6 -6
  130. package/dist/text.css-mistica.js +6 -6
  131. package/dist/timeline.css-mistica.js +9 -9
  132. package/dist/timer.css-mistica.js +6 -6
  133. package/dist/tooltip.css-mistica.js +1 -1
  134. package/dist/tooltip.d.ts +3 -1
  135. package/dist/tooltip.js +158 -147
  136. package/dist/touchable.css-mistica.js +1 -1
  137. package/dist/utils/aspect-ratio-support.css-mistica.js +2 -2
  138. package/dist/video.css-mistica.js +1 -1
  139. package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +1 -1
  140. package/dist-es/accordion.css-mistica.js +6 -6
  141. package/dist-es/align.css-mistica.js +1 -1
  142. package/dist-es/autocomplete.css-mistica.js +1 -1
  143. package/dist-es/avatar.css-mistica.js +1 -1
  144. package/dist-es/badge.css-mistica.js +1 -1
  145. package/dist-es/box.css-mistica.js +13 -13
  146. package/dist-es/boxed.css-mistica.js +23 -23
  147. package/dist-es/button-group.css-mistica.js +1 -1
  148. package/dist-es/button-layout.css-mistica.js +14 -14
  149. package/dist-es/button.css-mistica.js +34 -34
  150. package/dist-es/callout.css-mistica.js +11 -11
  151. package/dist-es/card-data.js +10 -12
  152. package/dist-es/card-internal.css-mistica.js +25 -19
  153. package/dist-es/card-internal.js +482 -395
  154. package/dist-es/card-media.js +11 -13
  155. package/dist-es/card-naked.js +14 -16
  156. package/dist-es/carousel.css-mistica.js +8 -8
  157. package/dist-es/checkbox.css-mistica.js +11 -11
  158. package/dist-es/checkbox.js +19 -19
  159. package/dist-es/chip.css-mistica.js +15 -15
  160. package/dist-es/circle.css-mistica.js +1 -1
  161. package/dist-es/community/advanced-data-card.css-mistica.js +10 -7
  162. package/dist-es/community/advanced-data-card.js +214 -192
  163. package/dist-es/community/ai-card.css-mistica.js +4 -4
  164. package/dist-es/community/ai-card.js +1 -1
  165. package/dist-es/community/blocks.css-mistica.js +1 -1
  166. package/dist-es/community/cyber/example-component.css-mistica.js +1 -1
  167. package/dist-es/community/example-component.css-mistica.js +2 -2
  168. package/dist-es/counter.css-mistica.js +1 -1
  169. package/dist-es/cover-hero.css-mistica.js +2 -2
  170. package/dist-es/credit-card-number-field.css-mistica.js +3 -3
  171. package/dist-es/date-field.css-mistica.js +1 -1
  172. package/dist-es/date-time-picker.css-mistica.js +1 -1
  173. package/dist-es/dialog.css-mistica.js +4 -4
  174. package/dist-es/divider.css-mistica.js +5 -5
  175. package/dist-es/double-field.css-mistica.js +2 -2
  176. package/dist-es/drawer.css-mistica.js +1 -1
  177. package/dist-es/empty-state-card.css-mistica.js +1 -1
  178. package/dist-es/empty-state.css-mistica.js +5 -5
  179. package/dist-es/fade-in.css-mistica.js +1 -1
  180. package/dist-es/fade-out.css-mistica.js +1 -1
  181. package/dist-es/feedback.css-mistica.js +1 -1
  182. package/dist-es/file-upload.css-mistica.js +7 -7
  183. package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
  184. package/dist-es/form.css-mistica.js +1 -1
  185. package/dist-es/generated/mistica-icons/icon-document-information-filled.js +115 -0
  186. package/dist-es/generated/mistica-icons/icon-document-information-light.js +115 -0
  187. package/dist-es/generated/mistica-icons/icon-document-information-regular.js +115 -0
  188. package/dist-es/generated/mistica-icons/icon-internet-roaming-filled.js +109 -0
  189. package/dist-es/generated/mistica-icons/icon-internet-roaming-light.js +109 -0
  190. package/dist-es/generated/mistica-icons/icon-internet-roaming-regular.js +109 -0
  191. package/dist-es/generated/mistica-icons/icon-mobile-information-filled.js +115 -0
  192. package/dist-es/generated/mistica-icons/icon-mobile-information-light.js +123 -0
  193. package/dist-es/generated/mistica-icons/icon-mobile-information-regular.js +115 -0
  194. package/dist-es/generated/mistica-icons/icon-search-ai-filled.js +115 -0
  195. package/dist-es/generated/mistica-icons/icon-search-ai-light.js +115 -0
  196. package/dist-es/generated/mistica-icons/icon-search-ai-regular.js +115 -0
  197. package/dist-es/grid-layout.css-mistica.js +3 -3
  198. package/dist-es/grid.css-mistica.js +120 -120
  199. package/dist-es/header.css-mistica.js +1 -1
  200. package/dist-es/hero.css-mistica.js +2 -2
  201. package/dist-es/horizontal-scroll.css-mistica.js +1 -1
  202. package/dist-es/icon-button.css-mistica.js +53 -53
  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 +4 -4
  206. package/dist-es/index.js +1501 -1489
  207. package/dist-es/inline.css-mistica.js +11 -11
  208. package/dist-es/list.css-mistica.js +7 -7
  209. package/dist-es/loading-bar.css-mistica.js +1 -1
  210. package/dist-es/loading-screen.css-mistica.js +4 -4
  211. package/dist-es/logo.css-mistica.js +5 -5
  212. package/dist-es/menu.css-mistica.js +14 -15
  213. package/dist-es/menu.js +238 -216
  214. package/dist-es/mosaic.css-mistica.js +1 -1
  215. package/dist-es/navigation-bar.css-mistica.js +9 -9
  216. package/dist-es/navigation-breadcrumbs.css-mistica.js +1 -1
  217. package/dist-es/navigation-shared.css-mistica.js +9 -9
  218. package/dist-es/package-version.js +1 -1
  219. package/dist-es/pagination.css-mistica.js +18 -18
  220. package/dist-es/pin-field.css-mistica.js +1 -1
  221. package/dist-es/popover.css-mistica.js +1 -1
  222. package/dist-es/progress-bar.css-mistica.js +6 -6
  223. package/dist-es/radio-button.css-mistica.js +19 -19
  224. package/dist-es/radio-button.js +91 -90
  225. package/dist-es/rating.css-mistica.js +2 -2
  226. package/dist-es/responsive-layout.css-mistica.js +6 -6
  227. package/dist-es/screen-reader-only.css-mistica.js +1 -1
  228. package/dist-es/select.css-mistica.js +15 -15
  229. package/dist-es/sheet-action-row.css-mistica.js +1 -1
  230. package/dist-es/sheet-common.css-mistica.js +1 -1
  231. package/dist-es/sheet-info.css-mistica.js +1 -1
  232. package/dist-es/sidenav-bar-layout.css-mistica.js +1 -1
  233. package/dist-es/sidenav-bar.css-mistica.js +71 -71
  234. package/dist-es/sidenav-bar.js +70 -65
  235. package/dist-es/skeletons.css-mistica.js +6 -6
  236. package/dist-es/skins/skin-contract.css-mistica.js +738 -738
  237. package/dist-es/skip-link.css-mistica.js +1 -1
  238. package/dist-es/slider.css-mistica.js +18 -18
  239. package/dist-es/snackbar.css-mistica.js +4 -4
  240. package/dist-es/spinner.css-mistica.js +1 -1
  241. package/dist-es/square.css-mistica.js +1 -1
  242. package/dist-es/stack.css-mistica.js +5 -5
  243. package/dist-es/stacking-group.css-mistica.js +1 -1
  244. package/dist-es/stepper.css-mistica.js +2 -2
  245. package/dist-es/style.css +1 -1
  246. package/dist-es/switch-component.css-mistica.js +35 -35
  247. package/dist-es/switch-component.js +34 -33
  248. package/dist-es/table.css-mistica.js +9 -9
  249. package/dist-es/tabs.css-mistica.js +17 -17
  250. package/dist-es/tag.css-mistica.js +1 -1
  251. package/dist-es/text-field-base.css-mistica.js +16 -16
  252. package/dist-es/text-field-components.css-mistica.js +3 -3
  253. package/dist-es/text-link.css-mistica.js +6 -6
  254. package/dist-es/text.css-mistica.js +6 -6
  255. package/dist-es/timeline.css-mistica.js +9 -9
  256. package/dist-es/timer.css-mistica.js +6 -6
  257. package/dist-es/tooltip.css-mistica.js +1 -1
  258. package/dist-es/tooltip.js +198 -187
  259. package/dist-es/touchable.css-mistica.js +1 -1
  260. package/dist-es/utils/aspect-ratio-support.css-mistica.js +2 -2
  261. package/dist-es/video.css-mistica.js +1 -1
  262. package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +1 -1
  263. package/doc/components.md +35 -0
  264. package/package.json +4 -3
  265. package/src/card-cover.tsx +2 -2
  266. package/src/card-data.tsx +3 -4
  267. package/src/card-internal.css.ts +36 -0
  268. package/src/card-internal.tsx +162 -9
  269. package/src/card-media.tsx +3 -4
  270. package/src/card-naked.tsx +3 -4
  271. package/src/checkbox.tsx +6 -1
  272. package/src/community/__screenshot_tests__/__image_snapshots__/ai-card-screenshot-test-tsx-ai-card-line-break-at-chars-1-snap.png +0 -0
  273. package/src/community/__screenshot_tests__/__image_snapshots__/ai-card-screenshot-test-tsx-ai-card-static-text-1-snap.png +0 -0
  274. package/src/community/__screenshot_tests__/ai-card-screenshot-test.tsx +28 -0
  275. package/src/community/__stories__/advanced-data-card-story.tsx +5 -0
  276. package/src/community/__type_tests__/advanced-data-card-type-test.tsx +3 -0
  277. package/src/community/advanced-data-card.css.ts +26 -1
  278. package/src/community/advanced-data-card.tsx +123 -73
  279. package/src/community/ai-card.tsx +3 -3
  280. package/src/index.tsx +12 -0
  281. package/src/menu.css.ts +5 -9
  282. package/src/menu.tsx +82 -64
  283. package/src/package-version.tsx +1 -1
  284. package/src/popover.tsx +1 -0
  285. package/src/radio-button.tsx +7 -1
  286. package/src/sidenav-bar.tsx +9 -2
  287. package/src/switch-component.tsx +7 -3
  288. package/src/tooltip.css.ts +1 -0
  289. package/src/tooltip.tsx +94 -90
@@ -78,280 +78,291 @@ function _object_without_properties_loose(source, excluded) {
78
78
  }
79
79
  return target;
80
80
  }
81
- import { jsx as i, jsxs as D, Fragment as bt } from "react/jsx-runtime";
81
+ import { jsx as i, jsxs as k, Fragment as _t } from "react/jsx-runtime";
82
82
  import * as s from "react";
83
- import { useTheme as vt, useBoundingRect as lt, useWindowSize as xt } from "./hooks.js";
84
- import { Portal as Mt } from "./portal.js";
85
- import { Transition as Et } from "react-transition-group";
86
- import { content as St, CONTENT_MIN_WIDTH as wt, tooltipTransitionClasses as Ot, tooltip as Rt, closeButtonIcon as Ct, contentContainer as It, tooltipCenter as _t, arrowContainer as Nt, arrow as yt, container as Lt } from "./tooltip.css-mistica.js";
87
- import kt from "./stack.js";
88
- import { Text2 as ct } from "./text.js";
89
- import { getCssVarValue as At } from "./utils/dom.js";
90
- import { TAB as $t, ESC as Ft } from "./utils/keys.js";
91
- import { isTouchableDevice as Bt } from "./utils/environment.js";
92
- import { isEqual as dt } from "./utils/helpers.js";
83
+ import { useTheme as wt, useBoundingRect as tt, useWindowSize as Ct } from "./hooks.js";
84
+ import { Portal as Nt } from "./portal.js";
85
+ import { Transition as yt } from "react-transition-group";
86
+ import { content as Lt, tooltipTransitionClasses as kt, tooltip as Ft, closeButtonIcon as $t, contentContainer as At, tooltipCenter as Dt, arrowContainer as Bt, arrow as Pt, container as Wt, CONTENT_MIN_WIDTH as zt } from "./tooltip.css-mistica.js";
87
+ import Xt from "./stack.js";
88
+ import { Text2 as dt } from "./text.js";
89
+ import { TAB as Ht, ESC as Yt } from "./utils/keys.js";
90
+ import { isTouchableDevice as Vt } from "./utils/environment.js";
91
+ import { isEqual as pt } from "./utils/helpers.js";
93
92
  import et from "classnames";
94
- import { vars as C } from "./skins/skin-contract.css-mistica.js";
95
- import { useThemeVariant as Dt, ThemeVariant as Wt } from "./theme-variant-context.js";
96
- import { combineRefs as Vt } from "./utils/common.js";
97
- import { useTooltipState as Ht, useSetTooltipState as Xt } from "./tooltip-context-provider.js";
98
- import { isRunningAcceptanceTest as zt } from "./utils/platform.js";
99
- import { IconButton as Pt } from "./icon-button.js";
100
- import Yt from "./generated/mistica-icons/icon-close-regular.js";
101
- import { closeButtonLabel as Gt } from "./text-tokens.js";
102
- const ft = (t)=>({
93
+ import { vars as L } from "./skins/skin-contract.css-mistica.js";
94
+ import { useThemeVariant as Gt, ThemeVariant as Kt } from "./theme-variant-context.js";
95
+ import { combineRefs as Ut } from "./utils/common.js";
96
+ import { useTooltipState as jt, useSetTooltipState as Zt } from "./tooltip-context-provider.js";
97
+ import { isRunningAcceptanceTest as qt } from "./utils/platform.js";
98
+ import { IconButton as Jt } from "./icon-button.js";
99
+ import Qt from "./generated/mistica-icons/icon-close-regular.js";
100
+ import { closeButtonLabel as te } from "./text-tokens.js";
101
+ const ft = (e)=>({
103
102
  border: `1px solid ${({
104
- default: C.colors.border,
105
- alternative: C.colors.border,
106
- brand: C.colors.backgroundContainer,
107
- negative: C.colors.backgroundContainer,
108
- media: C.colors.backgroundContainer
109
- })[t]}`
110
- }), pt = 496, Kt = 300, Ut = 500, jt = 100, p = 20, E = 6, I = E + p / 2 + 1, qt = (t)=>{
111
- switch(t){
103
+ default: L.colors.border,
104
+ alternative: L.colors.border,
105
+ brand: L.colors.backgroundContainer,
106
+ negative: L.colors.backgroundContainer,
107
+ media: L.colors.backgroundContainer
108
+ })[e]}`
109
+ }), mt = 496, ee = 300, oe = 500, re = 100, l = 20, I = 6, z = 1, w = I + l / 2 + z, se = {
110
+ top: "bottom",
111
+ bottom: "top",
112
+ left: "right",
113
+ right: "left"
114
+ }, ie = (e)=>{
115
+ switch(e){
112
116
  case "left":
113
- return `translateX(-${E}px)`;
117
+ return `translateX(-${I}px)`;
114
118
  case "right":
115
- return `translateX(${E}px)`;
119
+ return `translateX(${I}px)`;
116
120
  case "top":
117
- return `translateY(-${E}px)`;
121
+ return `translateY(-${I}px)`;
118
122
  case "bottom":
119
- return `translateY(${E}px)`;
123
+ return `translateY(${I}px)`;
120
124
  default:
121
125
  return "";
122
126
  }
123
- }, mt = (t)=>{
124
- const u = parseFloat(getComputedStyle(t, null).paddingLeft) + parseFloat(getComputedStyle(t, null).paddingRight), T = parseFloat(getComputedStyle(t, null).paddingTop) + parseFloat(getComputedStyle(t, null).paddingBottom), g = t.offsetWidth - u, c = t.offsetHeight - T;
127
+ }, ut = (e)=>{
128
+ const u = parseFloat(getComputedStyle(e, null).paddingLeft) + parseFloat(getComputedStyle(e, null).paddingRight), n = parseFloat(getComputedStyle(e, null).paddingTop) + parseFloat(getComputedStyle(e, null).paddingBottom), x = e.offsetWidth - u, h = e.offsetHeight - n;
125
129
  return {
126
- width: g,
127
- height: c
130
+ width: x,
131
+ height: h
128
132
  };
129
- }, ut = (t, u, T, g, c)=>{
130
- if (!t || !u) return;
131
- const { top: b, bottom: _, left: W, right: V } = t, v = g - _, S = c - V, o = b, w = W, { width: X, height: z } = mt(u), d = X + I, N = z + I, O = d <= Math.max(w, S), R = N <= Math.max(v, o);
132
- if (!(!R && !O)) switch(T){
133
- case "left":
134
- return O ? d <= w ? "left" : "right" : v > o ? "bottom" : "top";
135
- case "right":
136
- return O ? d <= S ? "right" : "left" : v > o ? "bottom" : "top";
137
- case "top":
138
- return R ? N <= o ? "top" : "bottom" : w > S ? "left" : "right";
139
- case "bottom":
140
- return R ? N <= v ? "bottom" : "top" : w > S ? "left" : "right";
141
- default:
142
- return;
143
- }
144
- }, Zt = (param)=>{
145
- let { content: t, target: u, targetStyle: T, width: g, position: c = "top", dataAttributes: b, delay: _ = !0, centerContent: W, open: V, onClose: v, closeButtonLabel: S, hasPointerInteractionOnly: o = !1, trackingEvent: w } = param;
146
- const { texts: X, t: z } = vt(), d = s.useId(), { openTooltipId: N } = Ht(), { openTooltip: O, closeTooltip: R } = Xt(), [H, P] = s.useState(), [Y, G] = s.useState(), K = s.useRef(null), U = s.useRef(null), [y, ht] = s.useState(null), m = Bt(), j = _ ? Ut : 0, [ot, q] = s.useState(!1), [Z, L] = s.useState(!1), J = V !== void 0, [rt, Q] = s.useState(!1), x = J ? V : d === N, st = Dt(), f = lt(K, x), it = lt(U, x, !0), n = xt(), M = s.useCallback(()=>{
147
- Q(!1), q(!1), L(!1);
133
+ }, ne = (e, u, n, x, h, p)=>{
134
+ if (!e || !u) return;
135
+ const f = {
136
+ top: e.top,
137
+ bottom: x - e.bottom,
138
+ left: e.left,
139
+ right: h - e.right
140
+ }, F = ut(u), $ = F.width, A = p === void 0 ? F.height : p + 2 * z, C = (n === "top" || n === "bottom" ? A : $) + w, D = se[n], r = f[n] < C && f[D] > f[n] ? D : n;
141
+ return (r === "left" || r === "right") && f[r] < C ? f.bottom > f.top ? "bottom" : "top" : r;
142
+ }, ae = (param)=>{
143
+ let { content: e, target: u, targetStyle: n, width: x, position: h = "top", alignment: p = "middle", dataAttributes: f, delay: F = !0, centerContent: $, open: A, onClose: C, closeButtonLabel: D, hasPointerInteractionOnly: r = !1, trackingEvent: ht } = param;
144
+ var _a_top, _a_bottom;
145
+ const { texts: Tt, t: gt, borderRadii: bt } = wt(), m = parseFloat(bt.popup), X = Math.max(zt, 2 * (m + z) + l), E = s.useId(), { openTooltipId: vt } = jt(), { openTooltip: ot, closeTooltip: rt } = Zt(), [B, H] = s.useState(), [Y, V] = s.useState(), G = s.useRef(null), K = s.useRef(null), st = s.useRef(null), [P, xt] = s.useState(null), T = Vt(), U = F ? oe : 0, [it, j] = s.useState(!1), [Z, N] = s.useState(!1), q = A !== void 0, [nt, J] = s.useState(!1), b = q ? A : E === vt, at = Gt(), a = tt(G, b), lt = tt(K, b, !0), Et = tt(st, b, !0), g = Ct(), c = ne(a, P, h, g.height, g.width, Et === null || Et === void 0 ? void 0 : Et.height), St = Math.max(0, (c === "top" ? (_a_top = a === null || a === void 0 ? void 0 : a.top) !== null && _a_top !== void 0 ? _a_top : g.height : c === "bottom" ? g.height - ((_a_bottom = a === null || a === void 0 ? void 0 : a.bottom) !== null && _a_bottom !== void 0 ? _a_bottom : 0) : g.height) - (c === "top" || c === "bottom" ? w : 0) - 2 * z), S = s.useCallback(()=>{
146
+ J(!1), j(!1), N(!1);
148
147
  }, []);
149
148
  s.useEffect(()=>{
150
- x || M();
149
+ b || S();
151
150
  }, [
152
- x,
153
- M
151
+ b,
152
+ S
154
153
  ]), s.useEffect(()=>{
155
- if (!y || !x) return;
156
- const a = ut(f, y, c, n.height, n.width);
157
- if (!a || !f) {
158
- P(void 0), G(void 0), M();
154
+ if (!P || !b) return;
155
+ if (!c || !a) {
156
+ H(void 0), V(void 0), S();
159
157
  return;
160
158
  }
161
- let r, e;
162
- var _parseInt;
163
- const { left: l, right: k, top: A, bottom: $ } = f, { width: F, height: B } = mt(y), nt = n.width - F, at = n.height - B, h = (_parseInt = parseInt(At(C.borderRadii.popup))) !== null && _parseInt !== void 0 ? _parseInt : 8;
164
- switch(a){
159
+ let o, t;
160
+ const { left: v, right: d, top: y, bottom: W } = a, { width: R, height: O } = ut(P), Rt = g.width - R, Ot = g.height - O, ct = p === "start" ? 0 : p === "end" ? 1 : 0.5, M = Math.max(0, Math.min(Rt, v + (d - v - R) * ct)), _ = Math.max(0, Math.min(Ot, y + (W - y - O) * ct));
161
+ switch(c){
165
162
  case "top":
166
- r = {
167
- left: Math.max(0, Math.min(nt, (l + k - F) / 2)),
168
- top: A - B - p / 2,
169
- padding: `0px 0px ${I}px 0px`
170
- }, e = {
171
- left: Math.max(h, Math.min(n.width - h - p, (l + k - p) / 2)),
163
+ o = {
164
+ left: M,
165
+ top: y - O - l / 2,
166
+ padding: `0px 0px ${w}px 0px`
167
+ }, t = {
168
+ left: Math.max(M + m, Math.min(M + R - m - l, (v + d - l) / 2)),
172
169
  top: "100%"
173
170
  };
174
171
  break;
175
172
  case "bottom":
176
- r = {
177
- left: Math.max(0, Math.min(nt, (l + k - F) / 2)),
178
- top: $ - E,
179
- padding: `${I}px 0px 0px 0px`
180
- }, e = {
181
- left: Math.max(h, Math.min(n.width - h - p, (l + k - p) / 2)),
173
+ o = {
174
+ left: M,
175
+ top: W - I,
176
+ padding: `${w}px 0px 0px 0px`
177
+ }, t = {
178
+ left: Math.max(M + m, Math.min(M + R - m - l, (v + d - l) / 2)),
182
179
  bottom: "100%",
183
180
  transform: "rotate(180deg)"
184
181
  };
185
182
  break;
186
183
  case "left":
187
- r = {
188
- left: l - F - p / 2,
189
- top: Math.max(0, Math.min(at, (A + $ - B) / 2)),
190
- padding: `0px ${I}px 0px 0px`
191
- }, e = {
192
- top: Math.max(h, Math.min(n.height - h - p, (A + $ - p) / 2)),
184
+ o = {
185
+ left: v - R - l / 2,
186
+ top: _,
187
+ padding: `0px ${w}px 0px 0px`
188
+ }, t = {
189
+ top: Math.max(_ + m, Math.min(_ + O - m - l, (y + W - l) / 2)),
193
190
  left: "100%",
194
191
  transform: "rotate(-90deg)",
195
192
  transformOrigin: "bottom"
196
193
  };
197
194
  break;
198
195
  case "right":
199
- default:
200
- r = {
201
- left: k - E,
202
- top: Math.max(0, Math.min(at, (A + $ - B) / 2)),
203
- padding: `0px 0px 0px ${I}px`
204
- }, e = {
205
- top: Math.max(h, Math.min(n.height - h - p, (A + $ - p) / 2)),
196
+ o = {
197
+ left: d - I,
198
+ top: _,
199
+ padding: `0px 0px 0px ${w}px`
200
+ }, t = {
201
+ top: Math.max(_ + m, Math.min(_ + O - m - l, (y + W - l) / 2)),
206
202
  right: "100%",
207
203
  transform: "rotate(90deg)",
208
204
  transformOrigin: "bottom"
209
205
  };
210
206
  break;
207
+ default:
208
+ {
209
+ const Mt = c;
210
+ throw new Error(`Invalid tooltip position: ${Mt}`);
211
+ }
211
212
  }
212
- typeof e.top == "number" && (e.top -= r.top, e.top = `${e.top / B * 100}%`), typeof e.left == "number" && (e.left -= r.left, e.left = `${e.left / F * 100}%`), dt(r, H) || P(r), dt(e, Y) || G(e);
213
+ typeof t.top == "number" && (t.top -= o.top, t.top = `${t.top / O * 100}%`), typeof t.left == "number" && (t.left -= o.left, t.left = `${t.left / R * 100}%`), pt(o, B) || H(o), pt(t, Y) || V(t);
213
214
  }, [
214
- y,
215
- f,
216
- it,
217
- x,
215
+ P,
216
+ a,
217
+ lt,
218
+ b,
218
219
  c,
219
- n,
220
- H,
220
+ p,
221
+ g,
222
+ B,
221
223
  Y,
222
224
  m,
223
- d,
224
- M
225
+ T,
226
+ E,
227
+ S
225
228
  ]);
226
- const tt = s.useRef(!1);
229
+ const Q = s.useRef(!1);
227
230
  s.useEffect(()=>{
228
- const a = (l)=>{
229
- switch(l.key){
230
- case Ft:
231
- o || M();
231
+ const o = (d)=>{
232
+ switch(d.key){
233
+ case Yt:
234
+ r || S();
232
235
  break;
233
- case $t:
234
- tt.current = !0;
236
+ case Ht:
237
+ Q.current = !0;
235
238
  break;
236
239
  }
237
- }, r = ()=>tt.current = !1, e = (l)=>{
238
- !o && m && f && (l.clientX < f.left || l.clientX > f.right || l.clientY < f.top || l.clientY > f.bottom) && M();
240
+ }, t = ()=>Q.current = !1, v = (d)=>{
241
+ !r && T && a && (d.clientX < a.left || d.clientX > a.right || d.clientY < a.top || d.clientY > a.bottom) && S();
239
242
  };
240
- return document.addEventListener("keydown", a, !1), document.addEventListener("keyup", r, !1), document.addEventListener("click", e, !1), ()=>{
241
- document.removeEventListener("keydown", a, !1), document.removeEventListener("keyup", r, !1), document.removeEventListener("click", e, !1);
243
+ return document.addEventListener("keydown", o, !1), document.addEventListener("keyup", t, !1), document.addEventListener("click", v, !1), ()=>{
244
+ document.removeEventListener("keydown", o, !1), document.removeEventListener("keyup", t, !1), document.removeEventListener("click", v, !1);
242
245
  };
243
246
  }, [
244
- m,
245
- M,
246
- f,
247
- o
247
+ T,
248
+ S,
249
+ a,
250
+ r
248
251
  ]), s.useEffect(()=>{
249
- J || (Z || ot || rt ? O(d) : R(d));
252
+ q || (Z || it || nt ? ot(E) : rt(E));
250
253
  }, [
251
254
  Z,
255
+ it,
256
+ nt,
257
+ E,
252
258
  ot,
253
259
  rt,
254
- d,
255
- O,
256
- R,
257
- J
260
+ q
258
261
  ]);
259
- const Tt = ut(f, y, c, n.height, n.width), gt = W !== void 0 ? W : (it === null || it === void 0 ? void 0 : it.width) === wt;
260
- return /* @__PURE__ */ D(bt, {
262
+ const It = $ !== void 0 ? $ : (lt === null || lt === void 0 ? void 0 : lt.width) === X;
263
+ return /* @__PURE__ */ k(_t, {
261
264
  children: [
262
265
  /* @__PURE__ */ i("div", {
263
- style: T,
264
- ref: (a)=>{
265
- const r = a === null || a === void 0 ? void 0 : a.firstElementChild;
266
- r && r !== K.current && (K.current = r);
266
+ style: n,
267
+ ref: (o)=>{
268
+ const t = o === null || o === void 0 ? void 0 : o.firstElementChild;
269
+ t && t !== G.current && (G.current = t);
267
270
  },
268
271
  onMouseOver: ()=>{
269
- !m && !o && L(!0);
272
+ !T && !r && N(!0);
270
273
  },
271
274
  onMouseLeave: ()=>{
272
- !m && !o && L(!1);
275
+ !T && !r && N(!1);
273
276
  },
274
277
  onClick: ()=>{
275
- (m || o) && L(o ? !Z : !0);
278
+ (T || r) && N(r ? !Z : !0);
276
279
  },
277
280
  onFocus: ()=>{
278
- tt.current && !o && Q(!0);
281
+ Q.current && !r && J(!0);
279
282
  },
280
283
  onBlur: ()=>{
281
- !m && !o && Q(!1);
284
+ !T && !r && J(!1);
282
285
  },
283
- "aria-describedby": d,
286
+ "aria-describedby": E,
284
287
  children: u
285
288
  }),
286
- /* @__PURE__ */ i(Mt, {
287
- children: /* @__PURE__ */ i(Et, {
288
- in: x,
289
- nodeRef: U,
290
- timeout: zt() ? 0 : {
291
- enter: Kt + j,
292
- exit: jt
289
+ /* @__PURE__ */ i(Nt, {
290
+ children: /* @__PURE__ */ i(yt, {
291
+ in: b,
292
+ nodeRef: K,
293
+ timeout: qt() ? 0 : {
294
+ enter: ee + U,
295
+ exit: re
293
296
  },
294
297
  onExited: ()=>{
295
- P(void 0), G(void 0);
298
+ H(void 0), V(void 0);
296
299
  },
297
300
  mountOnEnter: !0,
298
301
  unmountOnExit: !0,
299
- children: (a)=>/* @__PURE__ */ i("div", _object_spread_props(_object_spread({
302
+ children: (o)=>/* @__PURE__ */ i("div", _object_spread_props(_object_spread({
300
303
  style: {
301
304
  /**
302
305
  * Hack to prevent text from wrapping automatically when touching the viewport's edges,
303
306
  * even if the content's width didn't reach the max width.
304
307
  * https://stackoverflow.com/questions/66106629/how-to-disable-text-wrapping-when-viewport-border-is-reached
305
- */ width: `calc(100vw + ${pt}px)`,
308
+ */ width: `calc(100vw + ${mt}px)`,
306
309
  top: 0,
307
310
  left: 0,
308
311
  position: "fixed",
309
- visibility: H ? "visible" : "hidden"
312
+ visibility: B ? "visible" : "hidden"
310
313
  }
311
- }, b), {
314
+ }, f), {
312
315
  role: "tooltip",
313
- "aria-label": d,
316
+ "aria-label": E,
314
317
  tabIndex: -1,
315
318
  children: /* @__PURE__ */ i("div", {
316
- className: et(Lt),
319
+ className: et(Wt),
317
320
  style: _object_spread_props(_object_spread({
318
- pointerEvents: a === "entered" ? "auto" : "none",
319
- transform: qt(Tt)
320
- }, H, Ot[a]), {
321
- transition: a === "entering" ? `opacity .1s linear ${j}ms,transform .3s cubic-bezier(0.215,0.61,0.335,1) ${j}ms` : "opacity .1s linear"
321
+ pointerEvents: o === "entered" ? "auto" : "none",
322
+ transform: ie(c)
323
+ }, B, kt[o]), {
324
+ transition: o === "entering" ? `opacity .1s linear ${U}ms,transform .3s cubic-bezier(0.215,0.61,0.335,1) ${U}ms` : "opacity .1s linear"
322
325
  }),
323
- ref: Vt(ht, U),
326
+ ref: Ut(xt, K),
324
327
  onMouseEnter: ()=>{
325
- !m && a === "entered" && !o && q(!0);
328
+ !T && o === "entered" && !r && j(!0);
326
329
  },
327
330
  onMouseLeave: ()=>{
328
- !m && !o && q(!1);
331
+ !T && !r && j(!1);
329
332
  },
330
- children: /* @__PURE__ */ D("div", {
331
- className: Rt,
333
+ children: /* @__PURE__ */ k("div", {
334
+ className: Ft,
332
335
  style: _object_spread_props(_object_spread({
333
- width: g
334
- }, ft(st)), {
335
- maxWidth: Math.min(pt, n.width)
336
+ width: x,
337
+ minWidth: X,
338
+ minHeight: c === "left" || c === "right" ? X : void 0
339
+ }, ft(at)), {
340
+ maxWidth: Math.min(mt, g.width)
336
341
  }),
337
342
  children: [
338
343
  /* @__PURE__ */ i("div", {
339
- className: et(It, {
340
- [_t]: gt
344
+ style: {
345
+ maxHeight: St
346
+ },
347
+ className: et(At, {
348
+ [Dt]: It
341
349
  }),
342
- children: /* @__PURE__ */ D(Wt, {
350
+ children: /* @__PURE__ */ k(Kt, {
343
351
  variant: "default",
344
352
  children: [
345
- t,
346
- v && /* @__PURE__ */ i("div", {
347
- className: Ct,
348
- children: /* @__PURE__ */ i(Pt, {
353
+ /* @__PURE__ */ i("div", {
354
+ ref: st,
355
+ children: e
356
+ }),
357
+ C && /* @__PURE__ */ i("div", {
358
+ className: $t,
359
+ children: /* @__PURE__ */ i(Jt, {
349
360
  onPress: ()=>{
350
- L(!1), v();
361
+ N(!1), C();
351
362
  },
352
- trackingEvent: w,
353
- "aria-label": S || X.closeButtonLabel || z(Gt),
354
- Icon: Yt,
363
+ trackingEvent: ht,
364
+ "aria-label": D || Tt.closeButtonLabel || gt(te),
365
+ Icon: Qt,
355
366
  small: !0
356
367
  })
357
368
  })
@@ -359,11 +370,11 @@ const ft = (t)=>({
359
370
  })
360
371
  }),
361
372
  /* @__PURE__ */ i("div", {
362
- className: Nt,
373
+ className: Bt,
363
374
  style: Y,
364
375
  children: /* @__PURE__ */ i("div", {
365
- className: et(yt),
366
- style: ft(st)
376
+ className: et(Pt),
377
+ style: ft(at)
367
378
  })
368
379
  })
369
380
  ]
@@ -374,8 +385,8 @@ const ft = (t)=>({
374
385
  })
375
386
  ]
376
387
  });
377
- }, be = (_param)=>{
378
- var { centerContent: t, slot: u, children: T, dataAttributes: g, title: c, description: b } = _param, _ = _object_without_properties(_param, [
388
+ }, _e = (_param)=>{
389
+ var { centerContent: e, slot: u, children: n, dataAttributes: x, title: h, description: p } = _param, f = _object_without_properties(_param, [
379
390
  "centerContent",
380
391
  "slot",
381
392
  "children",
@@ -383,30 +394,30 @@ const ft = (t)=>({
383
394
  "title",
384
395
  "description"
385
396
  ]);
386
- return /* @__PURE__ */ i(Zt, _object_spread({
387
- content: /* @__PURE__ */ D("div", {
388
- className: St,
397
+ return /* @__PURE__ */ i(ae, _object_spread({
398
+ content: /* @__PURE__ */ k("div", {
399
+ className: Lt,
389
400
  children: [
390
- (c || b) && /* @__PURE__ */ D(kt, {
401
+ (h || p) && /* @__PURE__ */ k(Xt, {
391
402
  space: 4,
392
403
  children: [
393
- c && /* @__PURE__ */ i(ct, {
404
+ h && /* @__PURE__ */ i(dt, {
394
405
  medium: !0,
395
- children: c
406
+ children: h
396
407
  }),
397
- b && /* @__PURE__ */ i(ct, {
408
+ p && /* @__PURE__ */ i(dt, {
398
409
  regular: !0,
399
- children: b
410
+ children: p
400
411
  })
401
412
  ]
402
413
  }),
403
- u !== null && u !== void 0 ? u : T
414
+ u !== null && u !== void 0 ? u : n
404
415
  ]
405
416
  }),
406
- centerContent: t,
417
+ centerContent: e,
407
418
  dataAttributes: _object_spread({
408
419
  testid: "Tooltip"
409
- }, g)
410
- }, _));
420
+ }, x)
421
+ }, f));
411
422
  };
412
- export { Zt as BaseTooltip, be as default };
423
+ export { ae as BaseTooltip, _e as default };
@@ -1,2 +1,2 @@
1
- /* empty css */ /* empty css */ var t = "v17_5_mhti6u0", h = "v17_5_mhti6u2 v17_5_mhti6u1 v17_5_1y2v1nfuh", n = "v17_5_mhti6u4 v17_5_mhti6u2 v17_5_mhti6u1 v17_5_1y2v1nfuh v17_5_mhti6u3 v17_5_1y2v1nfh7 v17_5_1y2v1nfig v17_5_1y2v1nfjp v17_5_1y2v1nfky v17_5_1y2v1nfrg v17_5_1y2v1nftw v17_5_1y2v1nfs1 v17_5_1y2v1nf8k v17_5_1y2v1nfh6 v17_5_1y2v1nfuj", u = "v17_5_mhti6u5";
1
+ /* empty css */ /* empty css */ var t = "v17_7_mhti6u0", h = "v17_7_mhti6u2 v17_7_mhti6u1 v17_7_1y2v1nfuh", n = "v17_7_mhti6u4 v17_7_mhti6u2 v17_7_mhti6u1 v17_7_1y2v1nfuh v17_7_mhti6u3 v17_7_1y2v1nfh7 v17_7_1y2v1nfig v17_7_1y2v1nfjp v17_7_1y2v1nfky v17_7_1y2v1nfrg v17_7_1y2v1nftw v17_7_1y2v1nfs1 v17_7_1y2v1nf8k v17_7_1y2v1nfh6 v17_7_1y2v1nfuj", u = "v17_7_mhti6u5";
2
2
  export { h as base, t as marginReset, u as notTouchable, n as touchable };
@@ -1,4 +1,4 @@
1
1
  /* empty css */ /* empty css */ var r = {
2
- aspectRatio: "var(--v17_5_yqswj60)"
3
- }, a = "v17_5_yqswj61 v17_5_1y2v1nfui v17_5_1y2v1nftt v17_5_1y2v1nftu v17_5_1y2v1nfr8", n = "v17_5_yqswj62", y = "v17_5_yqswj63 v17_5_1y2v1nfs1 v17_5_1y2v1nfsi v17_5_1y2v1nfuo v17_5_1y2v1nfv3";
2
+ aspectRatio: "var(--v17_7_yqswj60)"
3
+ }, a = "v17_7_yqswj61 v17_7_1y2v1nfui v17_7_1y2v1nftt v17_7_1y2v1nftu v17_7_1y2v1nfr8", n = "v17_7_yqswj62", y = "v17_7_yqswj63 v17_7_1y2v1nfs1 v17_7_1y2v1nfsi v17_7_1y2v1nfuo v17_7_1y2v1nfv3";
4
4
  export { n as container, y as containerWithWrapper, r as vars, a as wrapper };
@@ -1,2 +1,2 @@
1
- /* empty css */ /* empty css */ var f = "v17_5_19h163j0 v17_5_1y2v1nfuo v17_5_1y2v1nfv3 v17_5_1y2v1nfrg v17_5_1y2v1nfh6 v17_5_1y2v1nftt v17_5_1y2v1nftu v17_5_1y2v1nfwc";
1
+ /* empty css */ /* empty css */ var f = "v17_7_19h163j0 v17_7_1y2v1nfuo v17_7_1y2v1nfv3 v17_7_1y2v1nfrg v17_7_1y2v1nfh6 v17_7_1y2v1nftt v17_7_1y2v1nftu v17_7_1y2v1nfwc";
2
2
  export { f as video };
@@ -1,2 +1,2 @@
1
- /* empty css */ var a = "v17_5_1ezqdj90", r = "v17_5_1ezqdj91";
1
+ /* empty css */ var a = "v17_7_1ezqdj90", r = "v17_7_1ezqdj91";
2
2
  export { a as container, r as waveFadeOut };
package/doc/components.md CHANGED
@@ -161,6 +161,41 @@ Common props: `color`, `truncate`, `textAlign`, `as` (HTML tag), `wordBreak`, `d
161
161
  All cards support touchable props (`onPress`, `href`, `to`), buttons (`buttonPrimary`, `buttonSecondary`,
162
162
  `buttonLink`), and content props (`headline`, `pretitle`, `title`, `subtitle`, `description`, `slot`).
163
163
 
164
+ ### Card selection
165
+
166
+ Use `checkbox`, `switch`, or `radioValue` to make a card selectable. The selector appears in the top-right
167
+ corner, and the card body becomes the interaction target. It exposes the control's role and checked state,
168
+ supports Space, and preserves arrow navigation for radios inside a `RadioGroup`. AdvancedDataCard supports the
169
+ same selection props.
170
+
171
+ These props are mutually exclusive with each other and with `selected`, `onPress`, `href`, `to`, top actions
172
+ and dismiss. Footer actions remain independent.
173
+
174
+ ```tsx
175
+ <DataCard title="Notifications" switch={{name: 'notifications', defaultValue: true}} />
176
+ <DataCard title="Option" checkbox={{name: 'option'}} />
177
+ <RadioGroup name="options" defaultValue="first">
178
+ <DataCard title="First option" radioValue="first" />
179
+ <DataCard title="Second option" radioValue="second" />
180
+ </RadioGroup>
181
+ ```
182
+
183
+ Checkbox and switch configurations support `name`, `value`, `defaultValue`, `onChange` and `disabled`.
184
+ Controls placed in `slot` or `footerSlot` remain independent and do not automatically select the card.
185
+
186
+ Use `selected` to control the outline from a custom control or an external action. It cannot be combined with
187
+ the built-in selector props. It does not change the card's existing interaction, actions or video behavior,
188
+ and can be used with or without `onPress`. The outline uses the card variant.
189
+
190
+ ```tsx
191
+ <DataCard
192
+ title="Custom selection"
193
+ selected={selected}
194
+ slot={<Checkbox name="custom-selection" checked={selected} onChange={setSelected}>Select card</Checkbox>}
195
+ />
196
+ <DataCard title="Favorite" selected={favorite} slot={customFavoriteControl} />
197
+ ```
198
+
164
199
  ### DataCard
165
200
 
166
201
  General-purpose card for data display. Supports `size`: `'default'`, `'snap'`, `'display'`.