@rojaostudio/ds 1.0.2 → 2.0.0-next.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 (356) hide show
  1. package/README.md +75 -13
  2. package/dist/compat/generate.d.ts +0 -1
  3. package/dist/components/accordion.d.ts +30 -20
  4. package/dist/components/accordion.js +31 -93
  5. package/dist/components/action-bar.d.ts +24 -0
  6. package/dist/components/action-bar.js +55 -0
  7. package/dist/components/alert-dialog.d.ts +31 -0
  8. package/dist/components/alert-dialog.js +43 -0
  9. package/dist/components/alert.d.ts +31 -19
  10. package/dist/components/alert.js +67 -65
  11. package/dist/components/attachment.d.ts +37 -0
  12. package/dist/components/attachment.js +76 -0
  13. package/dist/components/avatar.d.ts +43 -36
  14. package/dist/components/avatar.js +59 -90
  15. package/dist/components/badge.d.ts +30 -41
  16. package/dist/components/badge.js +13 -110
  17. package/dist/components/banner.d.ts +27 -0
  18. package/dist/components/banner.js +66 -0
  19. package/dist/components/benefits.d.ts +30 -0
  20. package/dist/components/benefits.js +32 -0
  21. package/dist/components/breadcrumb.d.ts +25 -18
  22. package/dist/components/breadcrumb.js +38 -56
  23. package/dist/components/browser.d.ts +18 -0
  24. package/dist/components/browser.js +32 -0
  25. package/dist/components/bubble.d.ts +29 -0
  26. package/dist/components/bubble.js +33 -0
  27. package/dist/components/button-group.d.ts +19 -0
  28. package/dist/components/button-group.js +20 -0
  29. package/dist/components/button.d.ts +47 -20
  30. package/dist/components/button.js +45 -108
  31. package/dist/components/calendar.d.ts +29 -0
  32. package/dist/components/calendar.js +149 -0
  33. package/dist/components/card.d.ts +47 -19
  34. package/dist/components/card.js +31 -46
  35. package/dist/components/carousel.d.ts +28 -0
  36. package/dist/components/carousel.js +130 -0
  37. package/dist/components/chart.d.ts +49 -0
  38. package/dist/components/chart.js +258 -0
  39. package/dist/components/checkbox-group.d.ts +16 -0
  40. package/dist/components/checkbox-group.js +13 -0
  41. package/dist/components/checkbox.d.ts +25 -10
  42. package/dist/components/checkbox.js +87 -81
  43. package/dist/components/chip-input.d.ts +46 -20
  44. package/dist/components/chip-input.js +172 -176
  45. package/dist/components/chip.d.ts +28 -0
  46. package/dist/components/chip.js +73 -0
  47. package/dist/components/choice-card.d.ts +10 -13
  48. package/dist/components/choice-card.js +11 -62
  49. package/dist/components/choice-carousel.d.ts +9 -0
  50. package/dist/components/choice-carousel.js +28 -44
  51. package/dist/components/choice-preview-card.d.ts +10 -20
  52. package/dist/components/choice-preview-card.js +12 -40
  53. package/dist/components/color-input.d.ts +36 -11
  54. package/dist/components/color-input.js +131 -59
  55. package/dist/components/combobox.d.ts +60 -57
  56. package/dist/components/combobox.js +210 -213
  57. package/dist/components/command.d.ts +58 -0
  58. package/dist/components/command.js +177 -0
  59. package/dist/components/contact.d.ts +23 -0
  60. package/dist/components/contact.js +32 -0
  61. package/dist/components/context-menu.d.ts +34 -26
  62. package/dist/components/context-menu.js +41 -68
  63. package/dist/components/copy-field.d.ts +10 -5
  64. package/dist/components/copy-field.js +24 -29
  65. package/dist/components/currency-input.d.ts +25 -11
  66. package/dist/components/currency-input.js +29 -65
  67. package/dist/components/danger-zone.d.ts +10 -1
  68. package/dist/components/danger-zone.js +14 -18
  69. package/dist/components/data-table-header.d.ts +13 -2
  70. package/dist/components/data-table-header.js +114 -190
  71. package/dist/components/date-picker.d.ts +31 -32
  72. package/dist/components/date-picker.js +119 -254
  73. package/dist/components/delta.d.ts +26 -0
  74. package/dist/components/delta.js +24 -0
  75. package/dist/components/dialog.d.ts +21 -0
  76. package/dist/components/dialog.js +16 -0
  77. package/dist/components/drawer.d.ts +15 -23
  78. package/dist/components/drawer.js +57 -89
  79. package/dist/components/dropdown-menu.d.ts +63 -0
  80. package/dist/components/dropdown-menu.js +62 -0
  81. package/dist/components/dropzone.d.ts +10 -4
  82. package/dist/components/dropzone.js +30 -58
  83. package/dist/components/empty.d.ts +29 -0
  84. package/dist/components/empty.js +42 -0
  85. package/dist/components/fab.d.ts +29 -6
  86. package/dist/components/fab.js +51 -51
  87. package/dist/components/faq.d.ts +21 -0
  88. package/dist/components/faq.js +24 -0
  89. package/dist/components/file-input.d.ts +56 -0
  90. package/dist/components/file-input.js +244 -0
  91. package/dist/components/filter-chip.d.ts +34 -47
  92. package/dist/components/filter-chip.js +61 -61
  93. package/dist/components/floating-stepper.d.ts +7 -18
  94. package/dist/components/floating-stepper.js +27 -55
  95. package/dist/components/footer.d.ts +36 -0
  96. package/dist/components/footer.js +38 -0
  97. package/dist/components/form-actions.d.ts +28 -0
  98. package/dist/components/form-actions.js +24 -0
  99. package/dist/components/google-account-chooser.d.ts +25 -0
  100. package/dist/components/google-account-chooser.js +44 -0
  101. package/dist/components/google-button.d.ts +26 -0
  102. package/dist/components/google-button.js +38 -0
  103. package/dist/components/google-consent.d.ts +23 -0
  104. package/dist/components/google-consent.js +28 -0
  105. package/dist/components/google-sign-in.d.ts +26 -0
  106. package/dist/components/google-sign-in.js +36 -0
  107. package/dist/components/hover-card.d.ts +30 -0
  108. package/dist/components/hover-card.js +55 -0
  109. package/dist/components/icon-button.d.ts +41 -11
  110. package/dist/components/icon-button.js +44 -64
  111. package/dist/components/image-crop-modal.d.ts +3 -3
  112. package/dist/components/image-crop-modal.js +32 -39
  113. package/dist/components/image-upload.d.ts +21 -29
  114. package/dist/components/image-upload.js +55 -259
  115. package/dist/components/index.d.ts +105 -49
  116. package/dist/components/index.js +190 -68
  117. package/dist/components/input-otp.d.ts +35 -0
  118. package/dist/components/input-otp.js +119 -0
  119. package/dist/components/input.d.ts +23 -17
  120. package/dist/components/input.js +104 -137
  121. package/dist/components/insight-card.d.ts +25 -9
  122. package/dist/components/insight-card.js +42 -27
  123. package/dist/components/internal/announce.d.ts +3 -0
  124. package/dist/components/internal/announce.js +20 -0
  125. package/dist/components/internal/block.d.ts +15 -0
  126. package/dist/components/internal/block.js +14 -0
  127. package/dist/components/internal/button.d.ts +23 -0
  128. package/dist/components/internal/button.js +30 -0
  129. package/dist/components/internal/choice-card.d.ts +52 -0
  130. package/dist/components/internal/choice-card.js +117 -0
  131. package/dist/components/internal/choice.d.ts +25 -0
  132. package/dist/components/internal/choice.js +44 -0
  133. package/dist/components/internal/dates.d.ts +17 -0
  134. package/dist/components/internal/dates.js +59 -0
  135. package/dist/components/internal/field.d.ts +66 -0
  136. package/dist/components/internal/field.js +105 -0
  137. package/dist/components/internal/fieldset.d.ts +25 -0
  138. package/dist/components/internal/fieldset.js +56 -0
  139. package/dist/components/internal/focus-after.d.ts +3 -0
  140. package/dist/components/internal/focus-after.js +13 -0
  141. package/dist/components/internal/google.d.ts +47 -0
  142. package/dist/components/internal/google.js +73 -0
  143. package/dist/components/internal/icons.d.ts +108 -0
  144. package/dist/components/internal/icons.js +316 -0
  145. package/dist/components/internal/menu.d.ts +16 -0
  146. package/dist/components/internal/menu.js +14 -0
  147. package/dist/components/internal/modal.d.ts +50 -0
  148. package/dist/components/internal/modal.js +85 -0
  149. package/dist/components/internal/option-content.d.ts +10 -0
  150. package/dist/components/internal/option-content.js +13 -0
  151. package/dist/components/internal/radio-context.d.ts +16 -0
  152. package/dist/components/internal/radio-context.js +6 -0
  153. package/dist/components/internal/toggle.d.ts +7 -0
  154. package/dist/components/internal/toggle.js +13 -0
  155. package/dist/components/internal/use-listbox.d.ts +56 -0
  156. package/dist/components/internal/use-listbox.js +69 -0
  157. package/dist/components/internal/whatsapp.d.ts +8 -0
  158. package/dist/components/internal/whatsapp.js +12 -0
  159. package/dist/components/item.d.ts +32 -0
  160. package/dist/components/item.js +35 -0
  161. package/dist/components/kbd.d.ts +17 -0
  162. package/dist/components/kbd.js +18 -0
  163. package/dist/components/listbox.d.ts +34 -0
  164. package/dist/components/listbox.js +114 -0
  165. package/dist/components/marker.d.ts +24 -0
  166. package/dist/components/marker.js +28 -0
  167. package/dist/components/media-tile.d.ts +17 -14
  168. package/dist/components/media-tile.js +19 -27
  169. package/dist/components/message-scroller.d.ts +20 -0
  170. package/dist/components/message-scroller.js +108 -0
  171. package/dist/components/message.d.ts +33 -0
  172. package/dist/components/message.js +23 -0
  173. package/dist/components/navigation-menu.d.ts +42 -0
  174. package/dist/components/navigation-menu.js +30 -0
  175. package/dist/components/newsletter.d.ts +27 -0
  176. package/dist/components/newsletter.js +75 -0
  177. package/dist/components/number-input.d.ts +60 -0
  178. package/dist/components/number-input.js +234 -0
  179. package/dist/components/option-tile.d.ts +20 -19
  180. package/dist/components/option-tile.js +52 -137
  181. package/dist/components/page-header.d.ts +31 -0
  182. package/dist/components/page-header.js +25 -0
  183. package/dist/components/page-shell.d.ts +11 -1
  184. package/dist/components/page-shell.js +8 -34
  185. package/dist/components/page-skeleton.d.ts +15 -21
  186. package/dist/components/page-skeleton.js +28 -25
  187. package/dist/components/pagination.d.ts +32 -22
  188. package/dist/components/pagination.js +78 -76
  189. package/dist/components/password-input.d.ts +26 -0
  190. package/dist/components/password-input.js +112 -0
  191. package/dist/components/phone-input.d.ts +12 -8
  192. package/dist/components/phone-input.js +75 -64
  193. package/dist/components/phone.d.ts +27 -0
  194. package/dist/components/phone.js +35 -0
  195. package/dist/components/popover.d.ts +25 -36
  196. package/dist/components/popover.js +30 -131
  197. package/dist/components/pricing-card.d.ts +9 -25
  198. package/dist/components/pricing-card.js +9 -40
  199. package/dist/components/pricing.d.ts +48 -0
  200. package/dist/components/pricing.js +64 -0
  201. package/dist/components/progress.d.ts +30 -0
  202. package/dist/components/progress.js +57 -0
  203. package/dist/components/qr-display.d.ts +11 -6
  204. package/dist/components/qr-display.js +6 -22
  205. package/dist/components/questionnaire.d.ts +42 -0
  206. package/dist/components/questionnaire.js +107 -0
  207. package/dist/components/radio-group.d.ts +21 -0
  208. package/dist/components/radio-group.js +40 -0
  209. package/dist/components/radio.d.ts +15 -29
  210. package/dist/components/radio.js +45 -103
  211. package/dist/components/row-actions.d.ts +5 -0
  212. package/dist/components/row-actions.js +27 -34
  213. package/dist/components/saving-bar-context.d.ts +0 -5
  214. package/dist/components/saving-bar-context.js +16 -40
  215. package/dist/components/saving-bar.d.ts +26 -11
  216. package/dist/components/saving-bar.js +50 -65
  217. package/dist/components/section-card.d.ts +18 -4
  218. package/dist/components/section-card.js +29 -50
  219. package/dist/components/section-header.d.ts +8 -12
  220. package/dist/components/section-header.js +5 -10
  221. package/dist/components/select.d.ts +44 -16
  222. package/dist/components/select.js +83 -154
  223. package/dist/components/selectable-card.d.ts +11 -19
  224. package/dist/components/selectable-card.js +4 -28
  225. package/dist/components/separator.d.ts +20 -0
  226. package/dist/components/separator.js +19 -0
  227. package/dist/components/setting-row.d.ts +11 -15
  228. package/dist/components/setting-row.js +10 -23
  229. package/dist/components/settings-list.d.ts +10 -12
  230. package/dist/components/settings-list.js +7 -19
  231. package/dist/components/sheet.d.ts +21 -0
  232. package/dist/components/sheet.js +16 -0
  233. package/dist/components/sidebar.d.ts +79 -0
  234. package/dist/components/sidebar.js +111 -0
  235. package/dist/components/skeleton.d.ts +14 -20
  236. package/dist/components/skeleton.js +8 -37
  237. package/dist/components/slider.d.ts +21 -23
  238. package/dist/components/slider.js +59 -64
  239. package/dist/components/sparkline.d.ts +19 -0
  240. package/dist/components/sparkline.js +32 -0
  241. package/dist/components/spinner.d.ts +16 -8
  242. package/dist/components/spinner.js +34 -37
  243. package/dist/components/star-rating.d.ts +22 -0
  244. package/dist/components/star-rating.js +25 -0
  245. package/dist/components/stat.d.ts +33 -0
  246. package/dist/components/stat.js +29 -0
  247. package/dist/components/status.d.ts +27 -0
  248. package/dist/components/status.js +34 -0
  249. package/dist/components/step-progress.d.ts +13 -6
  250. package/dist/components/step-progress.js +18 -16
  251. package/dist/components/summary-bar.d.ts +20 -20
  252. package/dist/components/summary-bar.js +13 -55
  253. package/dist/components/switch.d.ts +20 -0
  254. package/dist/components/switch.js +46 -0
  255. package/dist/components/table.d.ts +56 -17
  256. package/dist/components/table.js +59 -58
  257. package/dist/components/tabs.d.ts +67 -0
  258. package/dist/components/tabs.js +56 -0
  259. package/dist/components/testimonial.d.ts +30 -0
  260. package/dist/components/testimonial.js +36 -0
  261. package/dist/components/textarea.d.ts +11 -16
  262. package/dist/components/textarea.js +55 -91
  263. package/dist/components/tile.d.ts +24 -0
  264. package/dist/components/tile.js +21 -0
  265. package/dist/components/time-picker.d.ts +40 -25
  266. package/dist/components/time-picker.js +185 -203
  267. package/dist/components/toast.d.ts +63 -0
  268. package/dist/components/toast.js +132 -0
  269. package/dist/components/toggle-card-compact.d.ts +15 -5
  270. package/dist/components/toggle-card-compact.js +19 -86
  271. package/dist/components/toggle-card.d.ts +11 -2
  272. package/dist/components/toggle-card.js +8 -77
  273. package/dist/components/toggle-group.d.ts +21 -59
  274. package/dist/components/toggle-group.js +31 -80
  275. package/dist/components/toggle.d.ts +19 -9
  276. package/dist/components/toggle.js +16 -61
  277. package/dist/components/tooltip.d.ts +25 -12
  278. package/dist/components/tooltip.js +15 -88
  279. package/dist/components/top-navigation.d.ts +33 -0
  280. package/dist/components/top-navigation.js +85 -0
  281. package/dist/components/typing-indicator.d.ts +6 -0
  282. package/dist/components/typing-indicator.js +3 -24
  283. package/dist/components/whatsapp-chat.d.ts +28 -0
  284. package/dist/components/whatsapp-chat.js +95 -0
  285. package/dist/components/whatsapp-message.d.ts +22 -0
  286. package/dist/components/whatsapp-message.js +34 -0
  287. package/dist/components/whatsapp-notification.d.ts +27 -0
  288. package/dist/components/whatsapp-notification.js +73 -0
  289. package/dist/components/whatsapp-template.d.ts +42 -0
  290. package/dist/components/whatsapp-template.js +69 -0
  291. package/dist/icons/index.d.ts +2 -0
  292. package/dist/icons/index.js +2 -0
  293. package/dist/icons/pix.d.ts +16 -0
  294. package/dist/targets/native/components/index.d.ts +0 -2
  295. package/dist/targets/native/components/index.js +0 -4
  296. package/dist/targets/native/preset.cjs +0 -1
  297. package/dist/targets/native/theme.css +58 -60
  298. package/dist/targets/native/theme.d.ts +58 -60
  299. package/dist/targets/native/theme.js +58 -60
  300. package/package.json +34 -12
  301. package/styles/_primitives.generated.css +40 -0
  302. package/styles/base.css +12 -18
  303. package/styles/rds/components-styles.css +11365 -0
  304. package/styles/rds/components.css +993 -0
  305. package/styles/rds/foundation.css +74 -0
  306. package/styles/rds/theme.css +261 -0
  307. package/styles/rds.css +6 -0
  308. package/styles/themes/rojao.css +46 -53
  309. package/dist/components/blocker-card.d.ts +0 -42
  310. package/dist/components/blocker-card.js +0 -54
  311. package/dist/components/bottom-sheet.d.ts +0 -31
  312. package/dist/components/bottom-sheet.js +0 -127
  313. package/dist/components/chat-bubble.d.ts +0 -16
  314. package/dist/components/chat-bubble.js +0 -56
  315. package/dist/components/chips.d.ts +0 -22
  316. package/dist/components/chips.js +0 -101
  317. package/dist/components/copilot-hint.d.ts +0 -18
  318. package/dist/components/copilot-hint.js +0 -72
  319. package/dist/components/divider.d.ts +0 -20
  320. package/dist/components/divider.js +0 -50
  321. package/dist/components/empty-state.d.ts +0 -48
  322. package/dist/components/empty-state.js +0 -94
  323. package/dist/components/form-card-header.d.ts +0 -13
  324. package/dist/components/form-card-header.js +0 -16
  325. package/dist/components/label.d.ts +0 -16
  326. package/dist/components/label.js +0 -48
  327. package/dist/components/menu.d.ts +0 -50
  328. package/dist/components/menu.js +0 -83
  329. package/dist/components/modal.d.ts +0 -25
  330. package/dist/components/modal.js +0 -86
  331. package/dist/components/notice.d.ts +0 -50
  332. package/dist/components/notice.js +0 -121
  333. package/dist/components/page-tabs.d.ts +0 -35
  334. package/dist/components/page-tabs.js +0 -68
  335. package/dist/components/paywall-banner.d.ts +0 -37
  336. package/dist/components/paywall-banner.js +0 -58
  337. package/dist/components/paywall.d.ts +0 -44
  338. package/dist/components/paywall.js +0 -65
  339. package/dist/components/phone-frame.d.ts +0 -9
  340. package/dist/components/phone-frame.js +0 -19
  341. package/dist/components/pix-icon.d.ts +0 -8
  342. package/dist/components/search.d.ts +0 -30
  343. package/dist/components/search.js +0 -86
  344. package/dist/components/themed.d.ts +0 -36
  345. package/dist/components/themed.js +0 -23
  346. package/dist/components/toaster.d.ts +0 -84
  347. package/dist/components/toaster.js +0 -290
  348. package/dist/components/use-dismiss.d.ts +0 -9
  349. package/dist/components/use-dismiss.js +0 -28
  350. package/dist/components/use-focus-trap.d.ts +0 -5
  351. package/dist/components/use-focus-trap.js +0 -54
  352. package/dist/targets/native/components/paywall-banner.d.ts +0 -11
  353. package/dist/targets/native/components/paywall-banner.js +0 -55
  354. package/dist/targets/native/components/paywall.d.ts +0 -18
  355. package/dist/targets/native/components/paywall.js +0 -71
  356. /package/dist/{components/pix-icon.js → icons/pix.js} +0 -0
@@ -1,7 +1,11 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Pencil } from "lucide-react";
4
+ import { IconButton } from "./icon-button.js";
5
+ import { PencilIcon } from "./internal/icons.js";
6
+ import { Item } from "./item.js";
7
+ import { Switch } from "./switch.js";
8
+ import { Tooltip } from "./tooltip.js";
5
9
  function ToggleCardCompact({
6
10
  icon,
7
11
  label,
@@ -11,94 +15,23 @@ function ToggleCardCompact({
11
15
  onCheckedChange,
12
16
  onEdit,
13
17
  editLabel = "Editar",
14
- name
18
+ name,
19
+ disabled,
20
+ className
15
21
  }) {
16
- return /* @__PURE__ */ jsxs(
17
- "div",
22
+ return /* @__PURE__ */ jsx(
23
+ Item,
18
24
  {
19
- className: [
20
- "rounded-(--radius-card) overflow-hidden transition-colors border",
21
- checked ? "[border-color:var(--section-card-border-active)]" : "[border-color:var(--section-card-border)]"
22
- ].join(" "),
23
- children: [
25
+ variant: "outline",
26
+ className: ["rds-toggle-card-compact", className].filter(Boolean).join(" "),
27
+ media: icon,
28
+ title: label,
29
+ description: (checked ? summary : description) || void 0,
30
+ action: /* @__PURE__ */ jsxs("span", { className: "rds-toggle-card-compact__actions", children: [
24
31
  name && /* @__PURE__ */ jsx("input", { type: "hidden", name, value: checked ? "on" : "" }),
25
- /* @__PURE__ */ jsxs(
26
- "div",
27
- {
28
- className: [
29
- "flex items-center gap-3 px-4 py-3 transition-colors",
30
- checked ? "[background:var(--section-card-header-bg-active)]" : ""
31
- ].join(" "),
32
- children: [
33
- icon && /* @__PURE__ */ jsx(
34
- "span",
35
- {
36
- className: [
37
- "shrink-0",
38
- checked ? "[color:var(--section-card-label-active)] opacity-80" : "text-(--text-disabled)"
39
- ].join(" "),
40
- children: icon
41
- }
42
- ),
43
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
44
- /* @__PURE__ */ jsx(
45
- "p",
46
- {
47
- className: [
48
- "text-caption font-semibold uppercase tracking-wide",
49
- checked ? "[color:var(--section-card-label-active)]" : "[color:var(--section-card-label)]"
50
- ].join(" "),
51
- children: label
52
- }
53
- ),
54
- (checked ? summary : description) && /* @__PURE__ */ jsx(
55
- "p",
56
- {
57
- className: [
58
- "text-caption leading-snug mt-0.5 truncate",
59
- checked ? "[color:var(--section-card-badge-active)]" : "[color:var(--section-card-badge)]"
60
- ].join(" "),
61
- children: checked ? summary : description
62
- }
63
- )
64
- ] }),
65
- checked && onEdit && /* @__PURE__ */ jsx(
66
- "button",
67
- {
68
- type: "button",
69
- onClick: onEdit,
70
- "aria-label": editLabel,
71
- className: "shrink-0 [color:var(--section-card-label-active)] opacity-70 hover:opacity-100 transition-opacity p-1 -m-1 rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-white/40",
72
- children: /* @__PURE__ */ jsx(Pencil, { size: 14 })
73
- }
74
- ),
75
- /* @__PURE__ */ jsx(
76
- "button",
77
- {
78
- type: "button",
79
- role: "switch",
80
- "aria-checked": checked,
81
- "aria-label": label,
82
- onClick: () => onCheckedChange == null ? void 0 : onCheckedChange(!checked),
83
- className: [
84
- "relative inline-flex shrink-0 h-5 w-9 rounded-full transition-colors focus:outline-none focus-visible:ring-2",
85
- checked ? "bg-(--surface-default)/30 focus-visible:ring-white/40" : "bg-(--surface-raised) border border-stroke-default focus-visible:ring-stroke-focus/30"
86
- ].join(" "),
87
- children: /* @__PURE__ */ jsx(
88
- "span",
89
- {
90
- className: [
91
- "absolute top-0.5 inline-block h-4 w-4 rounded-full bg-(--surface-default) shadow-sm transition-transform",
92
- checked ? "translate-x-[18px]" : "translate-x-0.5"
93
- ].join(" ")
94
- }
95
- )
96
- }
97
- )
98
- ]
99
- }
100
- )
101
- ]
32
+ checked && onEdit && /* @__PURE__ */ jsx(Tooltip, { text: editLabel, children: /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(PencilIcon, {}), label: editLabel, variant: "ghost", tone: "neutral", onClick: onEdit, disabled }) }),
33
+ /* @__PURE__ */ jsx(Switch, { "aria-label": label, checked, onCheckedChange, disabled })
34
+ ] })
102
35
  }
103
36
  );
104
37
  }
@@ -2,14 +2,23 @@ import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
 
4
4
  interface ToggleCardProps {
5
+ /** The setting it turns on (the Switch's label). */
5
6
  label: string;
7
+ /** A line under the label (the Switch's hint). */
6
8
  description?: string;
7
9
  checked: boolean;
8
10
  onCheckedChange: (checked: boolean) => void;
9
- /** Hidden input name — when present, renders a hidden input so the value submits with native forms. */
11
+ /** Submits 'on' (or '') under this name with a native form, through a hidden input. */
10
12
  name?: string;
13
+ /** The setting's options, shown under it while it is on. */
11
14
  children?: ReactNode;
15
+ disabled?: boolean;
16
+ className?: string;
12
17
  }
13
- declare function ToggleCard({ label, description, checked, onCheckedChange, name, children, }: ToggleCardProps): react.JSX.Element;
18
+ /**
19
+ * ToggleCard — a composition of the Card and the Switch (Figma [RDS] Forms/Switch): a setting that, when on, opens
20
+ * its own options below it. Styles: toggle-card.css.
21
+ */
22
+ declare function ToggleCard({ label, description, checked, onCheckedChange, name, children, disabled, className }: ToggleCardProps): react.JSX.Element;
14
23
 
15
24
  export { ToggleCard, type ToggleCardProps };
@@ -1,83 +1,14 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
- function ToggleCard({
5
- label,
6
- description,
7
- checked,
8
- onCheckedChange,
9
- name,
10
- children
11
- }) {
12
- return /* @__PURE__ */ jsxs(
13
- "div",
14
- {
15
- className: [
16
- "rounded-(--radius-card) overflow-hidden transition-colors border",
17
- checked ? "[border-color:var(--section-card-border-active)]" : "[border-color:var(--section-card-border)]"
18
- ].join(" "),
19
- children: [
20
- name && /* @__PURE__ */ jsx("input", { type: "hidden", name, value: checked ? "on" : "" }),
21
- /* @__PURE__ */ jsxs(
22
- "button",
23
- {
24
- type: "button",
25
- role: "switch",
26
- "aria-checked": checked,
27
- onClick: () => onCheckedChange(!checked),
28
- className: [
29
- "w-full flex items-center justify-between gap-3 px-4 py-3 text-left transition-colors",
30
- checked ? "[background:var(--section-card-header-bg-active)]" : "hover:[background:var(--section-card-header-bg-hover)]"
31
- ].join(" "),
32
- children: [
33
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
34
- /* @__PURE__ */ jsx(
35
- "span",
36
- {
37
- className: [
38
- "text-caption font-semibold uppercase tracking-wide",
39
- checked ? "[color:var(--section-card-label-active)]" : "[color:var(--section-card-label)]"
40
- ].join(" "),
41
- children: label
42
- }
43
- ),
44
- description && /* @__PURE__ */ jsx(
45
- "span",
46
- {
47
- className: [
48
- "text-caption leading-snug",
49
- checked ? "[color:var(--section-card-badge-active)]" : "[color:var(--section-card-badge)]"
50
- ].join(" "),
51
- children: description
52
- }
53
- )
54
- ] }),
55
- /* @__PURE__ */ jsx(
56
- "span",
57
- {
58
- "aria-hidden": true,
59
- className: [
60
- "relative inline-flex shrink-0 h-5 w-9 rounded-full transition-colors",
61
- checked ? "bg-(--surface-default)/30" : "bg-(--surface-raised) border border-stroke-default"
62
- ].join(" "),
63
- children: /* @__PURE__ */ jsx(
64
- "span",
65
- {
66
- className: [
67
- "absolute top-0.5 inline-block h-4 w-4 rounded-full bg-(--surface-default) shadow-sm transition-transform",
68
- checked ? "translate-x-[18px]" : "translate-x-0.5"
69
- ].join(" ")
70
- }
71
- )
72
- }
73
- )
74
- ]
75
- }
76
- ),
77
- checked && children && /* @__PURE__ */ jsx("div", { className: "px-4 pb-4 pt-4 space-y-4 [border-top:1px_solid_var(--section-card-divider)] [background:var(--surface-default)]", children })
78
- ]
79
- }
80
- );
4
+ import { Card } from "./card.js";
5
+ import { Switch } from "./switch.js";
6
+ function ToggleCard({ label, description, checked, onCheckedChange, name, children, disabled, className }) {
7
+ return /* @__PURE__ */ jsxs(Card, { as: "div", className: ["rds-toggle-card", className].filter(Boolean).join(" "), children: [
8
+ name && /* @__PURE__ */ jsx("input", { type: "hidden", name, value: checked ? "on" : "" }),
9
+ /* @__PURE__ */ jsx("div", { className: "rds-toggle-card__header", children: /* @__PURE__ */ jsx(Switch, { checked, onCheckedChange, hint: description, disabled, children: label }) }),
10
+ checked && children && /* @__PURE__ */ jsx("div", { className: "rds-toggle-card__content", children })
11
+ ] });
81
12
  }
82
13
  export {
83
14
  ToggleCard
@@ -1,67 +1,29 @@
1
1
  import * as react from 'react';
2
- import { ReactNode } from 'react';
2
+ import { ComponentPropsWithRef, ReactNode } from 'react';
3
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
4
+ import { ToggleVariant } from './internal/toggle.js';
3
5
 
6
+ type ToggleGroupProps = ComponentPropsWithRef<typeof ToggleGroupPrimitive.Root> & {
7
+ /** One emphasis for every item (the Toggle `style`; ghost and outline are not mixed in a group). */
8
+ variant?: ToggleVariant;
9
+ /** Required: what the group chooses ("Vista", "Estilo do texto"). */
10
+ 'aria-label': string;
11
+ };
4
12
  /**
5
- * ToggleGroup — botões segmentados (M3 segmented buttons / shadcn ToggleGroup).
6
- *
7
- * Uso (single):
8
- * <ToggleGroup value={view} onChange={setView} options={[
9
- * { value: 'day', label: 'Dia' },
10
- * { value: 'week', label: 'Semana' },
11
- * { value: 'month', label: 'Mês' },
12
- * ]} />
13
- *
14
- * Uso (multi):
15
- * <ToggleGroup type="multi" value={selected} onChange={setSelected} options={[
16
- * { value: 'bold', icon: <Bold /> },
17
- * { value: 'italic', icon: <Italic /> },
18
- * ]} />
13
+ * ToggleGroup — Figma [RDS] Actions/ToggleGroup. Toggles side by side (Figma: slot `items`).
14
+ * `type="single"`: only one on (Lista or Grade). `type="multiple"`: each one on its own (bold, italic).
15
+ * Tab enters the group, the arrow keys move between items. Styles: toggle-group.css and toggle.css.
19
16
  */
20
- interface ToggleOption<T extends string = string> {
21
- value: T;
22
- label?: string;
17
+ declare function ToggleGroup({ variant, className, ...rest }: ToggleGroupProps): react.JSX.Element;
18
+ interface ToggleGroupItemProps extends Omit<ComponentPropsWithRef<typeof ToggleGroupPrimitive.Item>, 'children' | 'disabled'> {
19
+ /** The option's name (the Toggle `label`). Without it, pass aria-label. */
20
+ children?: ReactNode;
21
+ /** Icon before the text. Decorative, rendered with aria-hidden. */
23
22
  icon?: ReactNode;
24
- /** Estilos inline aplicados ao botão — use para fontFamily por opção, etc. */
25
- style?: React.CSSProperties;
23
+ /** Rendered as aria-disabled="true", as in the Toggle. */
26
24
  disabled?: boolean;
27
25
  }
28
- interface ToggleGroupSingleProps<T extends string> {
29
- type?: 'single';
30
- /** Label renderada acima do controle (mesmo padrão do Input do DS). */
31
- label?: ReactNode;
32
- value: T | null;
33
- /** null quando allowDeselect=true e o item ativo é clicado novamente. */
34
- onChange: (value: T | null) => void;
35
- options: ToggleOption<T>[];
36
- size?: 'sm' | 'md' | 'lg';
37
- /** Cor do item selecionado. 'brand' (default) pinta com a cor da marca; 'neutral'
38
- * usa tinta neutra de alto contraste (surface-invert) — para controles utilitários
39
- * que não devem vestir a paleta da loja. */
40
- selectedTone?: 'brand' | 'neutral';
41
- /** Se permite desselecionar o ativo (clica de novo = null). default = false. */
42
- allowDeselect?: boolean;
43
- /** Botões crescem para preencher toda a largura do container. */
44
- stretch?: boolean;
45
- className?: string;
46
- 'aria-label'?: string;
47
- }
48
- interface ToggleGroupMultiProps<T extends string> {
49
- type: 'multi';
50
- /** Label renderada acima do controle (mesmo padrão do Input do DS). */
51
- label?: ReactNode;
52
- value: T[];
53
- onChange: (value: T[]) => void;
54
- options: ToggleOption<T>[];
55
- size?: 'sm' | 'md' | 'lg';
56
- /** Cor do item selecionado. 'brand' (default) pinta com a cor da marca; 'neutral'
57
- * usa tinta neutra de alto contraste (surface-invert). */
58
- selectedTone?: 'brand' | 'neutral';
59
- /** Botões crescem para preencher toda a largura do container. */
60
- stretch?: boolean;
61
- className?: string;
62
- 'aria-label'?: string;
63
- }
64
- type ToggleGroupProps<T extends string = string> = ToggleGroupSingleProps<T> | ToggleGroupMultiProps<T>;
65
- declare function ToggleGroup<T extends string = string>(props: ToggleGroupProps<T>): react.JSX.Element;
26
+ /** One option of a ToggleGroup: a Toggle that the group turns on and off. */
27
+ declare function ToggleGroupItem({ icon, children, disabled, className, onClick, ...rest }: ToggleGroupItemProps): react.JSX.Element;
66
28
 
67
- export { ToggleGroup, type ToggleGroupProps, type ToggleOption };
29
+ export { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps };
@@ -1,86 +1,37 @@
1
1
  "use client";
2
- import "../chunk-ORMEWXMH.js";
2
+ import {
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues
6
+ } from "../chunk-ORMEWXMH.js";
3
7
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { useId } from "react";
5
- const SIZE_CLASS = {
6
- sm: "h-control-sm text-caption px-2.5 gap-1",
7
- md: "h-control-md text-label px-3 gap-1.5",
8
- lg: "h-control-lg text-label px-4 gap-2"
9
- };
10
- function ToggleGroup(props) {
11
- var _a, _b, _c, _d;
12
- const options = props.options;
13
- const size = (_a = props.size) != null ? _a : "md";
14
- const className = (_b = props.className) != null ? _b : "";
15
- const stretch = (_c = props.stretch) != null ? _c : false;
16
- const label = props.label;
17
- const selectedTone = (_d = props.selectedTone) != null ? _d : "brand";
18
- const isMulti = props.type === "multi";
19
- const groupId = useId();
20
- function isActive(opt) {
21
- return isMulti ? props.value.includes(opt.value) : props.value === opt.value;
22
- }
23
- function handleClick(opt) {
24
- if (opt.disabled) return;
25
- if (isMulti) {
26
- const current = props.value;
27
- const next = current.includes(opt.value) ? current.filter((v) => v !== opt.value) : [...current, opt.value];
28
- props.onChange(next);
29
- } else {
30
- const single = props;
31
- if (single.allowDeselect && single.value === opt.value) {
32
- single.onChange(null);
33
- } else {
34
- single.onChange(opt.value);
35
- }
36
- }
37
- }
38
- const group = /* @__PURE__ */ jsx(
39
- "div",
40
- {
41
- id: groupId,
42
- role: isMulti ? "group" : "radiogroup",
43
- "aria-label": props["aria-label"],
44
- className: [
45
- stretch ? "flex w-full" : "inline-flex",
46
- "rounded-(--radius-control) border border-stroke-default bg-surface-default p-0.5 gap-0.5",
47
- label ? "" : className
48
- ].join(" "),
49
- children: options.map((opt) => {
50
- const active = isActive(opt);
51
- return /* @__PURE__ */ jsxs(
52
- "button",
53
- {
54
- type: "button",
55
- role: isMulti ? "switch" : "radio",
56
- "aria-checked": active,
57
- disabled: opt.disabled,
58
- style: opt.style,
59
- onClick: () => handleClick(opt),
60
- className: [
61
- "inline-flex items-center justify-center rounded-(--radius-control) font-medium transition-colors",
62
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus focus-visible:z-10",
63
- "disabled:cursor-not-allowed disabled:opacity-50",
64
- stretch ? "flex-1" : "",
65
- SIZE_CLASS[size],
66
- active ? selectedTone === "neutral" ? "bg-surface-invert text-fg-inverse" : "bg-brand-primary text-brand-on-primary" : "text-fg-secondary hover:text-fg-primary hover:bg-surface-raised"
67
- ].join(" "),
68
- children: [
69
- opt.icon && /* @__PURE__ */ jsx("span", { className: "[&_svg]:size-4 shrink-0", children: opt.icon }),
70
- opt.label && /* @__PURE__ */ jsx("span", { children: opt.label })
71
- ]
72
- },
73
- opt.value
74
- );
75
- })
76
- }
8
+ import { createContext, useContext } from "react";
9
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
10
+ import { blockWhenDisabled } from "./internal/button.js";
11
+ import { toggleClassName, warnIfUnnamed } from "./internal/toggle.js";
12
+ const VariantContext = createContext("outline");
13
+ function ToggleGroup(_a) {
14
+ var _b = _a, { variant = "outline", className } = _b, rest = __objRest(_b, ["variant", "className"]);
15
+ return /* @__PURE__ */ jsx(VariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, __spreadProps(__spreadValues({}, rest), { className: ["rds-toggle-group", className].filter(Boolean).join(" ") })) });
16
+ }
17
+ function ToggleGroupItem(_c) {
18
+ var _d = _c, { icon, children, disabled, className, onClick } = _d, rest = __objRest(_d, ["icon", "children", "disabled", "className", "onClick"]);
19
+ const variant = useContext(VariantContext);
20
+ warnIfUnnamed("ToggleGroupItem", Boolean(children), rest["aria-label"], rest["aria-labelledby"]);
21
+ return /* @__PURE__ */ jsxs(
22
+ ToggleGroupPrimitive.Item,
23
+ __spreadProps(__spreadValues({}, rest), {
24
+ className: toggleClassName(variant, className),
25
+ "aria-disabled": disabled || void 0,
26
+ onClick: blockWhenDisabled(disabled, onClick),
27
+ children: [
28
+ icon && /* @__PURE__ */ jsx("span", { className: "rds-toggle__icon", "aria-hidden": "true", children: icon }),
29
+ children
30
+ ]
31
+ })
77
32
  );
78
- if (!label) return group;
79
- return /* @__PURE__ */ jsxs("div", { className: ["flex flex-col gap-1.5", className].join(" "), children: [
80
- /* @__PURE__ */ jsx("label", { htmlFor: groupId, className: "text-label font-medium text-fg-primary", children: label }),
81
- group
82
- ] });
83
33
  }
84
34
  export {
85
- ToggleGroup
35
+ ToggleGroup,
36
+ ToggleGroupItem
86
37
  };
@@ -1,13 +1,23 @@
1
1
  import * as react from 'react';
2
- import { InputHTMLAttributes, ReactNode } from 'react';
2
+ import { ComponentPropsWithRef, ReactNode } from 'react';
3
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
4
+ import { ToggleVariant } from './internal/toggle.js';
3
5
 
4
- interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
5
- label?: ReactNode;
6
- description?: ReactNode;
7
- size?: 'sm' | 'md' | 'lg';
8
- /** Posição do label em relação ao switch. default = "right". */
9
- labelPosition?: 'left' | 'right';
6
+ interface ToggleProps extends Omit<ComponentPropsWithRef<typeof TogglePrimitive.Root>, 'children' | 'disabled'> {
7
+ /** The name of what it turns on (Figma: `showLabel` + `label`). It never changes when pressed. Without it, pass aria-label. */
8
+ children?: ReactNode;
9
+ /** Icon before the text (Figma: `showIcon` + `iconName`). Decorative, rendered with aria-hidden. */
10
+ icon?: ReactNode;
11
+ /** The emphasis (Figma: `style`): ghost in a toolbar, outline when it stands alone. */
12
+ variant?: ToggleVariant;
13
+ /** Rendered as aria-disabled="true": stays in the tab order and takes focus, but does not toggle. */
14
+ disabled?: boolean;
10
15
  }
11
- declare const Toggle: react.ForwardRefExoticComponent<ToggleProps & react.RefAttributes<HTMLInputElement>>;
16
+ /**
17
+ * Toggle — Figma [RDS] Actions/Toggle. A button that stays on or off (aria-pressed). `pressed` +
18
+ * `onPressedChange` to control it, `defaultPressed` to start on (Figma: `pressed`). Not the Switch:
19
+ * a Toggle turns on a mode or a format (bold, list view); a Switch, a setting. Styles: toggle.css.
20
+ */
21
+ declare function Toggle({ variant, icon, children, disabled, className, onClick, ...rest }: ToggleProps): react.JSX.Element;
12
22
 
13
- export { Toggle, type ToggleProps };
23
+ export { Toggle, type ToggleProps, ToggleVariant };
@@ -1,74 +1,29 @@
1
1
  "use client";
2
2
  import {
3
3
  __objRest,
4
+ __spreadProps,
4
5
  __spreadValues
5
6
  } from "../chunk-ORMEWXMH.js";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import { forwardRef, useId } from "react";
8
- const SIZE = {
9
- sm: { track: "h-4 w-7", thumb: "size-3 peer-checked:translate-x-3.5", text: "text-caption" },
10
- md: { track: "h-5 w-9", thumb: "size-4 peer-checked:translate-x-4", text: "text-label" },
11
- lg: { track: "h-6 w-11", thumb: "size-5 peer-checked:translate-x-5", text: "text-label" }
12
- };
13
- const Toggle = forwardRef(function Toggle2(_a, ref) {
14
- var _b = _a, { label, description, size = "md", labelPosition = "right", className = "", id } = _b, props = __objRest(_b, ["label", "description", "size", "labelPosition", "className", "id"]);
15
- const generatedId = useId();
16
- const inputId = id != null ? id : generatedId;
17
- const sz = SIZE[size];
18
- const labelEl = (label || description) && /* @__PURE__ */ jsxs("span", { className: "flex flex-col gap-0.5 select-none", children: [
19
- label && /* @__PURE__ */ jsx("span", { className: [sz.text, "text-fg-primary leading-snug"].join(" "), children: label }),
20
- description && /* @__PURE__ */ jsx("span", { className: "text-caption text-fg-muted leading-snug", children: description })
21
- ] });
22
- const switchEl = /* @__PURE__ */ jsxs("span", { className: ["relative inline-flex shrink-0 items-center", sz.track].join(" "), children: [
23
- /* @__PURE__ */ jsx(
24
- "input",
25
- __spreadValues({
26
- ref,
27
- type: "checkbox",
28
- role: "switch",
29
- id: inputId,
30
- className: "peer sr-only"
31
- }, props)
32
- ),
33
- /* @__PURE__ */ jsx(
34
- "span",
35
- {
36
- className: [
37
- "absolute inset-0 rounded-full transition-colors",
38
- "bg-surface-raised border border-stroke-control",
39
- "peer-checked:bg-(--toggle-track-active) peer-checked:border-transparent",
40
- "peer-focus-visible:ring-2 peer-focus-visible:ring-stroke-focus/30",
41
- "peer-disabled:cursor-not-allowed"
42
- ].join(" ")
43
- }
44
- ),
45
- /* @__PURE__ */ jsx(
46
- "span",
47
- {
48
- className: [
49
- "relative rounded-full bg-surface-default shadow-sm transition-transform translate-x-0.5",
50
- sz.thumb
51
- ].join(" ")
52
- }
53
- )
54
- ] });
8
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
9
+ import { blockWhenDisabled } from "./internal/button.js";
10
+ import { toggleClassName, warnIfUnnamed } from "./internal/toggle.js";
11
+ function Toggle(_a) {
12
+ var _b = _a, { variant = "ghost", icon, children, disabled, className, onClick } = _b, rest = __objRest(_b, ["variant", "icon", "children", "disabled", "className", "onClick"]);
13
+ warnIfUnnamed("Toggle", Boolean(children), rest["aria-label"], rest["aria-labelledby"]);
55
14
  return /* @__PURE__ */ jsxs(
56
- "label",
57
- {
58
- htmlFor: inputId,
59
- className: [
60
- "inline-flex items-start gap-2.5 cursor-pointer",
61
- "has-[:disabled]:opacity-50 has-[:disabled]:cursor-not-allowed",
62
- className
63
- ].filter(Boolean).join(" "),
15
+ TogglePrimitive.Root,
16
+ __spreadProps(__spreadValues({}, rest), {
17
+ className: toggleClassName(variant, className),
18
+ "aria-disabled": disabled || void 0,
19
+ onClick: blockWhenDisabled(disabled, onClick),
64
20
  children: [
65
- labelPosition === "left" && labelEl,
66
- /* @__PURE__ */ jsx("span", { className: "flex items-center pt-0.5", children: switchEl }),
67
- labelPosition === "right" && labelEl
21
+ icon && /* @__PURE__ */ jsx("span", { className: "rds-toggle__icon", "aria-hidden": "true", children: icon }),
22
+ children
68
23
  ]
69
- }
24
+ })
70
25
  );
71
- });
26
+ }
72
27
  export {
73
28
  Toggle
74
29
  };
@@ -1,17 +1,30 @@
1
1
  import * as react from 'react';
2
- import { ReactNode } from 'react';
2
+ import { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
3
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
4
 
4
- interface TooltipProps {
5
- content: ReactNode;
6
- children: ReactNode;
7
- side?: 'top' | 'bottom' | 'left' | 'right';
5
+ type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
6
+ interface TooltipProps extends Omit<ComponentPropsWithRef<typeof TooltipPrimitive.Trigger>, 'children' | 'asChild'> {
7
+ /**
8
+ * The control it describes, almost always an IconButton. It must be a single focusable element: it receives the
9
+ * aria-describedby that ties it to the balloon (Radix Tooltip with asChild), not a wrapper around it.
10
+ */
11
+ children: ReactElement;
12
+ /** The action's name, in up to four words (Figma: `text`). Never something the person needs: touch does not show it. */
13
+ text: ReactNode;
14
+ /** Which side of the control the balloon sits on (Figma: `side`). */
15
+ side?: TooltipSide;
16
+ /** ms before it opens on hover. On keyboard focus it opens at once. */
8
17
  delay?: number;
9
- /** Extra classes on the tooltip bubble — use to override whitespace-nowrap for rich content */
10
- className?: string;
11
- /** Classes on the trigger wrapper span — override the default `inline-flex items-center` when the
12
- * target must fill a flex/grid cell (e.g. `relative flex-1`, `block w-full`). */
13
- wrapperClassName?: string;
14
18
  }
15
- declare function Tooltip({ content, children, side, delay, className, wrapperClassName }: TooltipProps): react.JSX.Element;
19
+ /**
20
+ * Tooltip — Figma [RDS] Feedback/Tooltip. A short label on hovering or focusing a control (Radix Tooltip):
21
+ * role="tooltip", tied to the focusable control with aria-describedby. Escape closes; the mouse can go over the
22
+ * balloon without it disappearing (WCAG 1.4.13). Styles: tooltip.css.
23
+ *
24
+ * Every IconButton goes with one, with the same text as its label (Figma: IconButton, "Com Tooltip"): they are two
25
+ * components, always together. Any other prop and the ref go to the control, so the pair can itself be the child of
26
+ * another asChild trigger (a DropdownMenu, a Dialog close).
27
+ */
28
+ declare function Tooltip({ children, text, side, delay, ...trigger }: TooltipProps): react.JSX.Element;
16
29
 
17
- export { Tooltip, type TooltipProps };
30
+ export { Tooltip, type TooltipProps, type TooltipSide };