@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,77 +1,79 @@
1
- import "../chunk-ORMEWXMH.js";
1
+ "use client";
2
+ import {
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues
6
+ } from "../chunk-ORMEWXMH.js";
2
7
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { CheckCircle, AlertCircle, AlertTriangle, Info, X } from "lucide-react";
4
- const VARIANTS = {
5
- success: {
6
- container: "bg-success-soft border-success-border text-success-text",
7
- icon: /* @__PURE__ */ jsx(CheckCircle, { size: 16, className: "shrink-0 mt-0.5" }),
8
- actionColor: "text-success-text hover:bg-success-soft/60"
9
- },
10
- danger: {
11
- container: "bg-danger-soft border-danger-border text-danger-text",
12
- icon: /* @__PURE__ */ jsx(AlertCircle, { size: 16, className: "shrink-0 mt-0.5" }),
13
- actionColor: "text-danger-text hover:bg-danger-soft/60"
14
- },
15
- warning: {
16
- container: "bg-warning-soft border-warning-border text-warning-text",
17
- icon: /* @__PURE__ */ jsx(AlertTriangle, { size: 16, className: "shrink-0 mt-0.5" }),
18
- actionColor: "text-warning-text hover:bg-warning-soft/60"
19
- },
20
- info: {
21
- container: "bg-info-soft border-info-border text-info-text",
22
- icon: /* @__PURE__ */ jsx(Info, { size: 16, className: "shrink-0 mt-0.5" }),
23
- actionColor: "text-info-text hover:bg-info-soft/60"
24
- },
25
- neutral: {
26
- container: "bg-neutral-soft border-neutral-border text-neutral-text",
27
- icon: /* @__PURE__ */ jsx(Info, { size: 16, className: "shrink-0 mt-0.5" }),
28
- actionColor: "text-neutral-text hover:bg-neutral-soft/60"
29
- }
8
+ import { useRef, useState } from "react";
9
+ import { IconButton } from "./icon-button.js";
10
+ import { Tooltip } from "./tooltip.js";
11
+ import { focusAfter } from "./internal/focus-after.js";
12
+ import { AlertIcon, CircleCheckIcon, CloseIcon, InfoIcon, TriangleAlertIcon } from "./internal/icons.js";
13
+ const ICONS = {
14
+ neutral: InfoIcon,
15
+ info: InfoIcon,
16
+ success: CircleCheckIcon,
17
+ warning: TriangleAlertIcon,
18
+ danger: AlertIcon
30
19
  };
31
- function Alert({
32
- variant = "info",
33
- title,
34
- children,
35
- onClose,
36
- action,
37
- icon,
38
- hideIcon = false,
39
- className = ""
40
- }) {
41
- const { container, icon: defaultIcon, actionColor } = VARIANTS[variant];
42
- const iconEl = hideIcon ? null : icon != null ? icon : defaultIcon;
20
+ function Alert(_a) {
21
+ var _b = _a, {
22
+ tone = "neutral",
23
+ title,
24
+ description,
25
+ showIcon = true,
26
+ action,
27
+ onClose,
28
+ closeLabel = "Fechar aviso",
29
+ announce = "none",
30
+ className
31
+ } = _b, rest = __objRest(_b, [
32
+ "tone",
33
+ "title",
34
+ "description",
35
+ "showIcon",
36
+ "action",
37
+ "onClose",
38
+ "closeLabel",
39
+ "announce",
40
+ "className"
41
+ ]);
42
+ const [open, setOpen] = useState(true);
43
+ const ref = useRef(null);
44
+ if (!open) return null;
45
+ const Icon = ICONS[tone];
43
46
  return /* @__PURE__ */ jsxs(
44
47
  "div",
45
- {
46
- role: variant === "danger" ? "alert" : "status",
47
- className: ["flex items-start gap-3 px-4 py-3 rounded-(--radius-card) border text-label", container, className].join(" "),
48
+ __spreadProps(__spreadValues({
49
+ ref,
50
+ role: announce === "none" ? void 0 : announce
51
+ }, rest), {
52
+ className: ["rds-alert", `rds-alert--${tone}`, className].filter(Boolean).join(" "),
48
53
  children: [
49
- iconEl,
50
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
51
- title && /* @__PURE__ */ jsx("p", { className: "font-medium leading-snug", children: title }),
52
- children && /* @__PURE__ */ jsx("div", { className: ["leading-snug", title ? "mt-0.5 opacity-80" : ""].join(" "), children }),
53
- action && /* @__PURE__ */ jsx(
54
- "button",
55
- {
56
- type: "button",
57
- onClick: action.onClick,
58
- className: ["mt-2 inline-flex text-caption font-semibold px-2 py-1 -mx-2 rounded transition-colors", actionColor].join(" "),
59
- children: action.label
60
- }
61
- )
54
+ showIcon && /* @__PURE__ */ jsx("span", { className: "rds-alert__icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, {}) }),
55
+ /* @__PURE__ */ jsxs("div", { className: "rds-alert__content", children: [
56
+ /* @__PURE__ */ jsx("p", { className: "rds-alert__title", children: title }),
57
+ description && /* @__PURE__ */ jsx("div", { className: "rds-alert__description", children: description }),
58
+ action && /* @__PURE__ */ jsx("div", { className: "rds-alert__action", children: action })
62
59
  ] }),
63
- onClose && /* @__PURE__ */ jsx(
64
- "button",
60
+ onClose && /* @__PURE__ */ jsx(Tooltip, { text: closeLabel, children: /* @__PURE__ */ jsx(
61
+ IconButton,
65
62
  {
66
- type: "button",
67
- onClick: onClose,
68
- className: "shrink-0 opacity-60 hover:opacity-100 transition-opacity p-0.5 -m-0.5 rounded",
69
- "aria-label": "Fechar",
70
- children: /* @__PURE__ */ jsx(X, { size: 14 })
63
+ icon: /* @__PURE__ */ jsx(CloseIcon, {}),
64
+ label: closeLabel,
65
+ tone: "neutral",
66
+ variant: "ghost",
67
+ className: "rds-alert__close",
68
+ onClick: () => {
69
+ focusAfter(ref.current);
70
+ setOpen(false);
71
+ onClose();
72
+ }
71
73
  }
72
- )
74
+ ) })
73
75
  ]
74
- }
76
+ })
75
77
  );
76
78
  }
77
79
  export {
@@ -0,0 +1,37 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ type AttachmentStatus = 'idle' | 'uploading' | 'processing' | 'error' | 'done';
5
+ type AttachmentOrientation = 'horizontal' | 'vertical';
6
+ interface AttachmentProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
7
+ /** The file name (Figma: `title`). It also names the actions and the status said to screen readers. */
8
+ title: string;
9
+ /** Type and size, such as "PDF · 240 KB" (Figma: `description`). In error, say what went wrong here. */
10
+ description?: ReactNode;
11
+ /**
12
+ * The upload's life cycle (Figma: `status`). idle: ready; uploading: the bar (`progress`); processing: a Spinner
13
+ * in place of the icon; error: error border and text, and the retry action; done: a check in place of the icon.
14
+ * Every change is said to screen readers ("Enviando…", "Enviado"), in a polite live region.
15
+ */
16
+ status?: AttachmentStatus;
17
+ /** horizontal: a document, icon in a 40 box; vertical: an image, a 112 tall preview (Figma: `orientation`). */
18
+ orientation?: AttachmentOrientation;
19
+ /**
20
+ * The file icon (Figma: `icon`). By default a document, or an image when vertical. Vertical, an `<img alt="">`
21
+ * here fills the preview.
22
+ */
23
+ icon?: ReactNode;
24
+ /** 0 to 100 while uploading. */
25
+ progress?: number;
26
+ /** Shows the × (Figma: `showAction`), named "Remover <title>". */
27
+ onRemove?: () => void;
28
+ /** In error, the action becomes "Enviar <title> de novo". */
29
+ onRetry?: () => void;
30
+ }
31
+ /**
32
+ * Attachment — Figma [RDS] Chat/Attachment. A file in the conversation or in the send field: before, during and
33
+ * after the upload. Styles: attachment.css.
34
+ */
35
+ declare function Attachment({ title, description, status, orientation, icon, progress, onRemove, onRetry, className, ...rest }: AttachmentProps): react.JSX.Element;
36
+
37
+ export { Attachment, type AttachmentOrientation, type AttachmentProps, type AttachmentStatus };
@@ -0,0 +1,76 @@
1
+ "use client";
2
+ import {
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues
6
+ } from "../chunk-ORMEWXMH.js";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ import { IconButton } from "./icon-button.js";
9
+ import { Tooltip } from "./tooltip.js";
10
+ import { AlertIcon, CircleCheckIcon, CloseIcon, FileTextIcon, ImageIcon, RotateCcwIcon } from "./internal/icons.js";
11
+ import { Progress } from "./progress.js";
12
+ import { Spinner } from "./spinner.js";
13
+ const SAID = {
14
+ idle: () => "",
15
+ uploading: (title) => `Enviando ${title}`,
16
+ processing: (title) => `Processando ${title}`,
17
+ error: (title) => `N\xE3o deu para enviar ${title}`,
18
+ done: (title) => `${title} enviado`
19
+ };
20
+ function Attachment(_a) {
21
+ var _b = _a, {
22
+ title,
23
+ description,
24
+ status = "idle",
25
+ orientation = "horizontal",
26
+ icon,
27
+ progress = 0,
28
+ onRemove,
29
+ onRetry,
30
+ className
31
+ } = _b, rest = __objRest(_b, [
32
+ "title",
33
+ "description",
34
+ "status",
35
+ "orientation",
36
+ "icon",
37
+ "progress",
38
+ "onRemove",
39
+ "onRetry",
40
+ "className"
41
+ ]);
42
+ const busy = status === "uploading" || status === "processing";
43
+ let media;
44
+ if (status === "processing") media = /* @__PURE__ */ jsx(Spinner, { size: "sm" });
45
+ else if (status === "error") media = /* @__PURE__ */ jsx(AlertIcon, {});
46
+ else if (status === "done") media = /* @__PURE__ */ jsx(CircleCheckIcon, {});
47
+ else media = icon != null ? icon : orientation === "vertical" ? /* @__PURE__ */ jsx(ImageIcon, {}) : /* @__PURE__ */ jsx(FileTextIcon, {});
48
+ const action = status === "error" && onRetry ? /* @__PURE__ */ jsx(Tooltip, { text: `Enviar ${title} de novo`, children: /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(RotateCcwIcon, {}), label: `Enviar ${title} de novo`, tone: "neutral", variant: "ghost", onClick: onRetry }) }) : onRemove ? /* @__PURE__ */ jsx(Tooltip, { text: `Remover ${title}`, children: /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(CloseIcon, {}), label: `Remover ${title}`, tone: "neutral", variant: "ghost", onClick: onRemove }) }) : null;
49
+ const content = /* @__PURE__ */ jsxs("div", { className: "rds-attachment__content", children: [
50
+ /* @__PURE__ */ jsx("span", { className: "rds-attachment__title", children: title }),
51
+ description && /* @__PURE__ */ jsx("span", { className: "rds-attachment__description", children: description }),
52
+ status === "uploading" && /* @__PURE__ */ jsx(Progress, { size: "sm", value: progress, label: `Enviando ${title}`, showLabel: false, showValue: false })
53
+ ] });
54
+ return /* @__PURE__ */ jsxs(
55
+ "div",
56
+ __spreadProps(__spreadValues({
57
+ "aria-busy": busy || void 0
58
+ }, rest), {
59
+ className: ["rds-attachment", `rds-attachment--${orientation}`, `rds-attachment--${status}`, className].filter(Boolean).join(" "),
60
+ children: [
61
+ /* @__PURE__ */ jsx("div", { className: "rds-attachment__media", "aria-hidden": "true", children: media }),
62
+ orientation === "vertical" ? /* @__PURE__ */ jsxs("div", { className: "rds-attachment__row", children: [
63
+ content,
64
+ action
65
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
66
+ content,
67
+ action
68
+ ] }),
69
+ /* @__PURE__ */ jsx("span", { className: "rds-visually-hidden", role: "status", children: SAID[status](title) })
70
+ ]
71
+ })
72
+ );
73
+ }
74
+ export {
75
+ Attachment
76
+ };
@@ -1,45 +1,52 @@
1
1
  import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
2
3
 
3
- /**
4
- * Avatar — representação visual de usuário/entidade.
5
- *
6
- * Uso:
7
- * <Avatar src="/u.jpg" alt="Marcos" />
8
- * <Avatar name="Marcos Silva" /> // gera iniciais
9
- * <Avatar name="A" size="lg" />
10
- * <Avatar name="J" status="active" /> // dot indicador
11
- *
12
- * AvatarGroup — empilha avatares com overlap.
13
- * <AvatarGroup max={3}>
14
- * <Avatar name="A" />
15
- * <Avatar name="B" />
16
- * ...
17
- * </AvatarGroup>
18
- */
19
- type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
20
- type AvatarStatus = 'active' | 'inactive' | 'pending' | 'error';
21
- interface AvatarProps {
4
+ /** person is a circle; brand is a rounded square (a brand, a company, a campaign). */
5
+ type AvatarType = 'person' | 'brand';
6
+ type AvatarSize = 'sm' | 'default' | 'lg' | 'xl';
7
+ /** What the Avatar shows. It follows from the props: a photo (`src`), initials (a name) or an icon (no name). */
8
+ type AvatarVariant = 'image' | 'fallback' | 'icon';
9
+ interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
10
+ /** person is a circle; brand is a square with rounded corners, initials in bold on the brand's mark colour. */
11
+ type?: AvatarType;
12
+ /** sm 24, default 32, lg 40, xl 56. Inside an AvatarGroup, the group's size. */
13
+ size?: AvatarSize;
14
+ /** The photo (Figma: `variant=image`). If it fails to load, the initials (or the icon) show instead. */
22
15
  src?: string;
23
- alt?: string;
24
- /** Nome completo — gera iniciais (até 2 letras). */
16
+ /**
17
+ * The full name: the photo's alt, the initials' aria-label and the source of the initials. Leave it out only for an
18
+ * avatar without a name (a visitor): it is then decorative and hidden from screen readers.
19
+ */
25
20
  name?: string;
26
- size?: AvatarSize;
27
- status?: AvatarStatus;
28
- /** Cor de fundo. default = brand-primary. */
29
- variant?: 'brand' | 'neutral';
30
- className?: string;
21
+ /** The initials (Figma: `fallbackText`). By default two letters from `name`, one on a brand. */
22
+ fallbackText?: string;
23
+ /** The icon when there is no name (Figma: `variant=icon` + `icon`). By default a person, or a building on a brand. */
24
+ icon?: ReactNode;
25
+ /** The presence dot (Figma: `showBadge`). The colour is not the only sign: `badgeLabel` goes into the accessible name. */
26
+ showBadge?: boolean;
27
+ /** What the dot means, said after the name. */
28
+ badgeLabel?: string;
31
29
  }
30
+ /** Two letters: first and last name, or the first two letters of a single word. "?" for an empty name. */
32
31
  declare function initials(name: string): string;
33
- declare function Avatar({ src, alt, name, size, status, variant, className, }: AvatarProps): react.JSX.Element;
34
- interface AvatarGroupProps {
35
- /** Máximo de avatares visíveis; o resto vira `+N`. default = 3. */
32
+ /**
33
+ * Avatar — Figma [RDS] Content/Avatar. A person, or a brand, in miniature: photo, initials or icon. Not
34
+ * interactive. The Figma `variant` follows from the props: `src` → image, a name → fallback, neither → icon.
35
+ * Styles: avatar.css.
36
+ */
37
+ declare function Avatar({ type, size, src, name, fallbackText, icon, showBadge, badgeLabel, className, ...rest }: AvatarProps): react.JSX.Element;
38
+ type AvatarGroupSize = Exclude<AvatarSize, 'xl'>;
39
+ interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {
40
+ /** Who the group is ("Equipe do projeto"). Required: it names the group for screen readers. */
41
+ 'aria-label': string;
42
+ /** The size of every Avatar inside (Figma: sm, default, lg). */
43
+ size?: AvatarGroupSize;
44
+ /** Show only the first `max` and a "+N" with the rest. 3 or 4 is a good limit. */
36
45
  max?: number;
37
- /** Sobreposição em px. default depende do size. */
38
- spacing?: 'tight' | 'normal' | 'loose';
39
- size?: AvatarSize;
40
- children: React.ReactNode;
41
- className?: string;
46
+ /** The Avatars. */
47
+ children: ReactNode;
42
48
  }
43
- declare function AvatarGroup({ max, spacing, size, children, className, }: AvatarGroupProps): react.JSX.Element;
49
+ /** AvatarGroup — Figma [RDS] Content/AvatarGroup. Overlapping avatars, each with a ring that separates it. */
50
+ declare function AvatarGroup({ size, max, className, children, ...rest }: AvatarGroupProps): react.JSX.Element;
44
51
 
45
- export { Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type AvatarStatus, initials };
52
+ export { Avatar, AvatarGroup, type AvatarGroupProps, type AvatarGroupSize, type AvatarProps, type AvatarSize, type AvatarType, type AvatarVariant, initials };
@@ -1,101 +1,70 @@
1
- import "../chunk-ORMEWXMH.js";
1
+ "use client";
2
+ import {
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues
6
+ } from "../chunk-ORMEWXMH.js";
2
7
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Children, isValidElement, cloneElement } from "react";
4
- const SIZE_CLASSES = {
5
- xs: "size-6 text-[10px]",
6
- sm: "size-8 text-caption",
7
- md: "size-10 text-label",
8
- lg: "size-12 text-body",
9
- xl: "size-16 text-heading-sm"
10
- };
11
- const STATUS_DOT_SIZE = {
12
- xs: "size-1.5",
13
- sm: "size-2",
14
- md: "size-2.5",
15
- lg: "size-3",
16
- xl: "size-3.5"
17
- };
18
- const STATUS_COLOR = {
19
- active: "bg-success",
20
- inactive: "bg-state-disabled-text",
21
- pending: "bg-warning",
22
- error: "bg-danger"
23
- };
8
+ import { Children, createContext, useContext, useState } from "react";
9
+ import { BuildingIcon, UserIcon } from "./internal/icons.js";
10
+ const GroupSize = createContext(void 0);
24
11
  function initials(name) {
25
12
  const parts = name.trim().split(/\s+/).filter(Boolean);
26
13
  if (parts.length === 0) return "?";
27
14
  if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
28
15
  return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
29
16
  }
30
- function Avatar({
31
- src,
32
- alt,
33
- name,
34
- size = "md",
35
- status,
36
- variant = "brand",
37
- className = ""
38
- }) {
39
- var _a;
40
- const showImage = !!src;
41
- const label = (_a = alt != null ? alt : name) != null ? _a : "Avatar";
42
- const bgClass = variant === "brand" ? "bg-brand-primary text-brand-on-primary" : "bg-surface-raised text-fg-secondary";
43
- return /* @__PURE__ */ jsxs("div", { className: ["relative inline-flex shrink-0", className].join(" "), children: [
44
- /* @__PURE__ */ jsx(
45
- "div",
46
- {
47
- className: [
48
- "inline-flex items-center justify-center rounded-full overflow-hidden font-semibold select-none",
49
- SIZE_CLASSES[size],
50
- showImage ? "" : bgClass
51
- ].join(" "),
52
- "aria-label": label,
53
- role: "img",
54
- children: showImage ? /* @__PURE__ */ jsx("img", { src, alt: label, className: "size-full object-cover" }) : /* @__PURE__ */ jsx("span", { children: initials(name != null ? name : "?") })
55
- }
56
- ),
57
- status && /* @__PURE__ */ jsx(
58
- "span",
59
- {
60
- className: [
61
- "absolute bottom-0 right-0 rounded-full ring-2 ring-surface-default",
62
- STATUS_DOT_SIZE[size],
63
- STATUS_COLOR[status]
64
- ].join(" "),
65
- "aria-label": `status: ${status}`
66
- }
67
- )
68
- ] });
17
+ function Avatar(_a) {
18
+ var _b = _a, {
19
+ type = "person",
20
+ size,
21
+ src,
22
+ name,
23
+ fallbackText,
24
+ icon,
25
+ showBadge,
26
+ badgeLabel = "online",
27
+ className
28
+ } = _b, rest = __objRest(_b, [
29
+ "type",
30
+ "size",
31
+ "src",
32
+ "name",
33
+ "fallbackText",
34
+ "icon",
35
+ "showBadge",
36
+ "badgeLabel",
37
+ "className"
38
+ ]);
39
+ var _a2, _b2;
40
+ const groupSize = useContext(GroupSize);
41
+ const finalSize = (_a2 = size != null ? size : groupSize) != null ? _a2 : "default";
42
+ const [failed, setFailed] = useState(null);
43
+ const trimmed = (_b2 = name == null ? void 0 : name.trim()) != null ? _b2 : "";
44
+ const letters = fallbackText != null ? fallbackText : trimmed ? type === "brand" ? trimmed[0].toUpperCase() : initials(trimmed) : "";
45
+ const variant = src && failed !== src ? "image" : letters ? "fallback" : "icon";
46
+ const label = trimmed ? showBadge ? `${trimmed}, ${badgeLabel}` : trimmed : void 0;
47
+ const semantics = variant === "image" ? {} : label ? { role: "img", "aria-label": label } : { "aria-hidden": true };
48
+ return /* @__PURE__ */ jsxs(
49
+ "span",
50
+ __spreadProps(__spreadValues(__spreadValues({}, semantics), rest), {
51
+ className: ["rds-avatar", `rds-avatar--${type}`, `rds-avatar--${finalSize}`, `rds-avatar--${variant}`, className].filter(Boolean).join(" "),
52
+ children: [
53
+ variant === "image" ? /* @__PURE__ */ jsx("img", { className: "rds-avatar__image", src, alt: label != null ? label : "", onError: () => setFailed(src != null ? src : null) }) : /* @__PURE__ */ jsx("span", { className: "rds-avatar__fallback", "aria-hidden": "true", children: variant === "fallback" ? letters : icon != null ? icon : type === "brand" ? /* @__PURE__ */ jsx(BuildingIcon, {}) : /* @__PURE__ */ jsx(UserIcon, {}) }),
54
+ showBadge && /* @__PURE__ */ jsx("span", { className: "rds-avatar__badge", "aria-hidden": "true" })
55
+ ]
56
+ })
57
+ );
69
58
  }
70
- const SPACING_CLASS = {
71
- tight: "-ml-3",
72
- normal: "-ml-2",
73
- loose: "-ml-1"
74
- };
75
- function AvatarGroup({
76
- max = 3,
77
- spacing = "normal",
78
- size = "md",
79
- children,
80
- className = ""
81
- }) {
82
- const items = Children.toArray(children).filter(isValidElement);
83
- const visible = items.slice(0, max);
84
- const overflow = items.length - visible.length;
85
- return /* @__PURE__ */ jsxs("div", { className: ["inline-flex items-center", className].join(" "), role: "group", children: [
86
- visible.map((child, idx) => {
87
- var _a;
88
- return /* @__PURE__ */ jsx("div", { className: idx === 0 ? "" : SPACING_CLASS[spacing], children: cloneElement(child, { size: (_a = child.props.size) != null ? _a : size }) }, idx);
89
- }),
90
- overflow > 0 && /* @__PURE__ */ jsx("div", { className: SPACING_CLASS[spacing], children: /* @__PURE__ */ jsx(
91
- Avatar,
92
- {
93
- name: `+${overflow}`,
94
- variant: "neutral",
95
- size
96
- }
97
- ) })
98
- ] });
59
+ function AvatarGroup(_c) {
60
+ var _d = _c, { size = "default", max, className, children } = _d, rest = __objRest(_d, ["size", "max", "className", "children"]);
61
+ const items = Children.toArray(children);
62
+ const shown = max && items.length > max ? items.slice(0, max) : items;
63
+ const hidden = items.length - shown.length;
64
+ return /* @__PURE__ */ jsx(GroupSize.Provider, { value: size, children: /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ role: "group" }, rest), { className: ["rds-avatar-group", `rds-avatar-group--${size}`, className].filter(Boolean).join(" "), children: [
65
+ shown,
66
+ hidden > 0 && /* @__PURE__ */ jsx(Avatar, { fallbackText: `+${hidden}`, name: `mais ${hidden} ${hidden === 1 ? "pessoa" : "pessoas"}` })
67
+ ] })) });
99
68
  }
100
69
  export {
101
70
  Avatar,
@@ -1,45 +1,34 @@
1
1
  import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
2
3
 
3
- declare const LABEL_VARIANTS: {
4
- readonly default: "bg-surface-default text-fg-muted border border-stroke-default";
5
- readonly primary: "bg-brand-primary text-brand-on-primary";
6
- readonly success: "bg-success-soft text-success-text border border-success-border";
7
- readonly warning: "bg-warning-soft text-warning-text border border-warning-border";
8
- readonly danger: "bg-danger-soft text-danger-text border border-danger-border";
9
- readonly info: "bg-info-soft text-info-text border border-info-border";
10
- readonly neutral: "bg-neutral-soft text-neutral-text border border-neutral-border";
11
- };
12
- declare const STATUS_VARIANTS: {
13
- readonly active: {
14
- readonly dot: "bg-success";
15
- readonly text: "text-success-text";
16
- };
17
- readonly inactive: {
18
- readonly dot: "bg-state-disabled-text";
19
- readonly text: "text-state-disabled-text";
20
- };
21
- readonly pending: {
22
- readonly dot: "bg-warning";
23
- readonly text: "text-warning-text";
24
- };
25
- readonly error: {
26
- readonly dot: "bg-danger";
27
- readonly text: "text-danger-text";
28
- };
29
- };
30
- type BadgeVariant = keyof typeof LABEL_VARIANTS | keyof typeof STATUS_VARIANTS | 'count' | 'dot';
31
- type BadgeSize = 'sm' | 'md';
32
- interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
33
- variant?: BadgeVariant;
34
- size?: BadgeSize;
35
- /** Para variant="count": número exibido. Acima de `max` mostra "max+". */
36
- count?: number;
37
- /** Limite pra count overflow. default = 99. */
38
- max?: number;
39
- /** Para variant="dot": cor da bolinha (default = brand-primary). */
40
- dotColor?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
41
- children?: React.ReactNode;
4
+ type BadgeTone = 'neutral' | 'action' | 'accent' | 'inverse';
5
+ /** Figma calls this property `style`. */
6
+ type BadgeVariant = 'fill' | 'soft' | 'highlight';
7
+ interface BadgeBase extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
8
+ /** The label (Figma: `label`): "Nova", "Grátis". Ignored when `value` is given. */
9
+ children?: ReactNode;
10
+ /** Counter mode (Figma: `number=true` + `value`). Above 99 it shows "99+". */
11
+ value?: number;
42
12
  }
43
- declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
13
+ /**
14
+ * Not every tone has every variant (as in Figma): soft only on neutral and action, highlight only on accent,
15
+ * inverse only fill. The types allow only those.
16
+ */
17
+ type BadgeProps = BadgeBase & ({
18
+ tone?: 'neutral' | 'action';
19
+ variant?: 'fill' | 'soft';
20
+ } | {
21
+ tone: 'accent';
22
+ variant?: 'fill' | 'highlight';
23
+ } | {
24
+ tone: 'inverse';
25
+ variant?: 'fill';
26
+ });
27
+ declare function formatBadgeValue(value: number): string;
28
+ /**
29
+ * Badge — Figma [RDS] Indicators/Badge. A short brand or layout label ("Nova", "Grátis") or a counter. Not
30
+ * interactive and not a state: a state that changes over time is the Status. Styles: badge.css.
31
+ */
32
+ declare function Badge({ tone, variant, value, children, className, ...rest }: BadgeProps): react.JSX.Element;
44
33
 
45
- export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant };
34
+ export { Badge, type BadgeProps, type BadgeTone, type BadgeVariant, formatBadgeValue };