@rojaostudio/ds 1.0.2 → 2.0.0-next.1

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 -52
  116. package/dist/components/index.js +190 -74
  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,31 +1,31 @@
1
1
  import * as react from 'react';
2
- import { ReactNode } from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+ import { StatTone } from './stat.js';
3
4
 
4
- type SummaryBarTone = 'default' | 'positive' | 'negative' | 'warning' | 'muted';
5
+ /** @deprecated Use StatTone. */
6
+ type SummaryBarTone = StatTone;
7
+ /** @deprecated Pass Stats as children. */
5
8
  interface SummaryBarItem {
6
- /** Short label, e.g. "Valor em estoque" */
7
9
  label: string;
8
- /** Pre-formatted value (currency, count, etc.) — formatting is the consumer's job */
9
10
  value: string;
10
- /** Tints the value. Counters use warning/negative; money uses default/positive. */
11
- tone?: SummaryBarTone;
12
- /** Optional leading icon shown before the value */
11
+ tone?: StatTone;
12
+ /** Ignored: the Stat has no icon in the Figma [RDS]. */
13
13
  icon?: ReactNode;
14
14
  }
15
- interface SummaryBarProps {
16
- items: SummaryBarItem[];
17
- className?: string;
15
+ /** row: the wide screen, the cells share the width (many scroll sideways). grid: the phone, two columns. */
16
+ type SummaryBarLayout = 'row' | 'grid';
17
+ interface SummaryBarProps extends Omit<HTMLAttributes<HTMLUListElement>, 'children'> {
18
+ /** The Stats (Figma: slot `items`). Inside the bar a Stat is a cell (framed=false) by default. */
19
+ children?: ReactNode;
20
+ /** Figma: `layout`. In grid, the last cell takes the whole line when the count is odd. */
21
+ layout?: SummaryBarLayout;
22
+ /** @deprecated Pass Stats as children. Kept so 1.x code compiles; the icon is dropped. */
23
+ items?: SummaryBarItem[];
18
24
  }
19
25
  /**
20
- * Strip of aggregated metrics shown above a list (stock summary, finance totals,
21
- * report KPIs). Mobile: grid 2-colunas (não estoura nem esconde scroll). sm+: linha
22
- * flex com scroll horizontal se precisar. Contagem ímpar → último item ocupa a linha
23
- * inteira no mobile (sem célula vazia). Valores são pré-formatados pelo consumidor.
24
- *
25
- * Truque do divisor: no mobile, o fundo do CONTAINER é a cor do divisor e o gap-px
26
- * revela essa cor entre as células (cada célula tem o fundo normal) → linhas de grade
27
- * limpas. No sm+, o fundo volta ao normal e os divisores são border-left por item.
26
+ * SummaryBar — Figma [RDS] Content/SummaryBar. The strip of aggregated numbers above a list (stock, finance,
27
+ * report): Stats 1px apart, the gap showing summary-bar/divider. A list: each Stat is an item. Styles: summary-bar.css.
28
28
  */
29
- declare function SummaryBar({ items, className }: SummaryBarProps): react.JSX.Element;
29
+ declare function SummaryBar({ children, layout, items, className, ...rest }: SummaryBarProps): react.JSX.Element;
30
30
 
31
- export { SummaryBar, type SummaryBarItem, type SummaryBarProps, type SummaryBarTone };
31
+ export { SummaryBar, type SummaryBarItem, type SummaryBarLayout, type SummaryBarProps, type SummaryBarTone };
@@ -1,58 +1,16 @@
1
- import "../chunk-ORMEWXMH.js";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- const TONE_CLASS = {
4
- default: "[color:var(--summary-bar-value)]",
5
- positive: "[color:var(--summary-bar-value-positive)]",
6
- negative: "[color:var(--summary-bar-value-negative)]",
7
- warning: "[color:var(--summary-bar-value-warning)]",
8
- muted: "[color:var(--summary-bar-value-muted)]"
9
- };
10
- function SummaryBar({ items, className }) {
11
- const odd = items.length % 2 === 1;
12
- return /* @__PURE__ */ jsx(
13
- "div",
14
- {
15
- className: [
16
- "grid grid-cols-2 gap-px overflow-hidden rounded-(--radius-card) border",
17
- "sm:flex sm:gap-0 sm:overflow-x-auto sm:[scrollbar-width:none]",
18
- "[background:var(--summary-bar-divider)] sm:[background:var(--summary-bar-bg)]",
19
- "[border-color:var(--summary-bar-border)]",
20
- className != null ? className : ""
21
- ].join(" "),
22
- children: items.map((item, i) => {
23
- var _a;
24
- const spanFull = odd && i === items.length - 1;
25
- return /* @__PURE__ */ jsxs(
26
- "div",
27
- {
28
- className: [
29
- "flex flex-1 flex-col gap-1.5 px-4 py-3 [background:var(--summary-bar-bg)]",
30
- "min-w-0 sm:min-w-[7.5rem] sm:whitespace-nowrap",
31
- spanFull ? "col-span-2 sm:col-span-1" : "",
32
- i > 0 ? "sm:[border-left:1px_solid_var(--summary-bar-divider)]" : ""
33
- ].join(" "),
34
- children: [
35
- /* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium uppercase tracking-wide [color:var(--summary-bar-label)]", children: item.label }),
36
- /* @__PURE__ */ jsxs(
37
- "span",
38
- {
39
- className: [
40
- "flex items-center gap-1.5 text-heading-sm font-semibold leading-none tabular-nums",
41
- TONE_CLASS[(_a = item.tone) != null ? _a : "default"]
42
- ].join(" "),
43
- children: [
44
- item.icon,
45
- item.value
46
- ]
47
- }
48
- )
49
- ]
50
- },
51
- i
52
- );
53
- })
54
- }
55
- );
1
+ "use client";
2
+ import {
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues
6
+ } from "../chunk-ORMEWXMH.js";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { Children } from "react";
9
+ import { Stat, StatFramedDefault } from "./stat.js";
10
+ function SummaryBar(_a) {
11
+ var _b = _a, { children, layout = "row", items, className } = _b, rest = __objRest(_b, ["children", "layout", "items", "className"]);
12
+ const cells = items ? items.map((item, i) => /* @__PURE__ */ jsx(Stat, { label: item.label, value: item.value, tone: item.tone }, i)) : Children.toArray(children);
13
+ return /* @__PURE__ */ jsx(StatFramedDefault.Provider, { value: false, children: /* @__PURE__ */ jsx("ul", __spreadProps(__spreadValues({}, rest), { className: ["rds-summary-bar", `rds-summary-bar--${layout}`, className].filter(Boolean).join(" "), children: cells.map((cell, i) => /* @__PURE__ */ jsx("li", { className: "rds-summary-bar__cell", children: cell }, i)) })) });
56
14
  }
57
15
  export {
58
16
  SummaryBar
@@ -0,0 +1,20 @@
1
+ import * as react from 'react';
2
+ import { ComponentPropsWithRef, ReactNode } from 'react';
3
+
4
+ interface SwitchProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'children' | 'role' | 'size'> {
5
+ /** The setting it turns on (Figma: `showLabel` + `label`). It never changes with the state. Without it, pass aria-label. */
6
+ children?: ReactNode;
7
+ /** A line under the label (Figma: `showHint` + `hint`), tied by aria-describedby. */
8
+ hint?: ReactNode;
9
+ /** Called with the new state on every change (Figma: `checked`; `checked` + `onCheckedChange` to control it). */
10
+ onCheckedChange?: (checked: boolean) => void;
11
+ }
12
+ /**
13
+ * Switch — Figma [RDS] Forms/Switch. Turns on and off a setting that applies right away, with no save
14
+ * button (so no error and no required). Native <input type="checkbox" role="switch">: Space toggles it.
15
+ * Not the Toggle, which turns on a mode or a format. If the setting fails, turn it back and say so.
16
+ * Styles: switch.css and internal/choice.css.
17
+ */
18
+ declare function Switch({ children, hint, disabled, id, className, style, onChange, onCheckedChange, ...input }: SwitchProps): react.JSX.Element;
19
+
20
+ export { Switch, type SwitchProps };
@@ -0,0 +1,46 @@
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 { ChoiceRow } from "./internal/choice.js";
9
+ import { warnIfUnlabelled } from "./internal/field.js";
10
+ function Switch(_a) {
11
+ var _b = _a, { children, hint, disabled, id, className, style, onChange, onCheckedChange } = _b, input = __objRest(_b, ["children", "hint", "disabled", "id", "className", "style", "onChange", "onCheckedChange"]);
12
+ warnIfUnlabelled("Switch", children, input["aria-label"], input["aria-labelledby"]);
13
+ function change(event) {
14
+ onChange == null ? void 0 : onChange(event);
15
+ onCheckedChange == null ? void 0 : onCheckedChange(event.target.checked);
16
+ }
17
+ return /* @__PURE__ */ jsx(
18
+ ChoiceRow,
19
+ {
20
+ kind: "rds-switch",
21
+ id,
22
+ label: children,
23
+ hint,
24
+ disabled,
25
+ className,
26
+ style,
27
+ control: ({ id: controlId, describedBy }) => /* @__PURE__ */ jsxs(Fragment, { children: [
28
+ /* @__PURE__ */ jsx(
29
+ "input",
30
+ __spreadProps(__spreadValues({}, input), {
31
+ id: controlId,
32
+ type: "checkbox",
33
+ role: "switch",
34
+ disabled,
35
+ "aria-describedby": [describedBy, input["aria-describedby"]].filter(Boolean).join(" ") || void 0,
36
+ onChange: change
37
+ })
38
+ ),
39
+ /* @__PURE__ */ jsx("span", { className: "rds-switch__track", "aria-hidden": "true", children: /* @__PURE__ */ jsx("span", { className: "rds-switch__thumb" }) })
40
+ ] })
41
+ }
42
+ );
43
+ }
44
+ export {
45
+ Switch
46
+ };
@@ -1,23 +1,62 @@
1
1
  import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode, TdHTMLAttributes, ThHTMLAttributes } from 'react';
2
3
 
3
- type Align = 'left' | 'right' | 'center';
4
- declare function Table({ className, children, ...props }: React.HTMLAttributes<HTMLTableElement>): react.JSX.Element;
5
- declare function TableHead({ className, children, ...props }: React.HTMLAttributes<HTMLTableSectionElement>): react.JSX.Element;
6
- declare function TableBody({ className, children, ...props }: React.HTMLAttributes<HTMLTableSectionElement>): react.JSX.Element;
7
- interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
8
- header?: boolean;
9
- noHover?: boolean;
4
+ type TableAlign = 'start' | 'end';
5
+ type TableSort = 'ascending' | 'descending' | 'none';
6
+ interface TableProps extends HTMLAttributes<HTMLTableElement> {
7
+ /** What the table shows. Required: it names the table (and its scroll area) for screen readers. */
8
+ caption: ReactNode;
9
+ /** Show the caption on screen. By default it is only for screen readers. */
10
+ showCaption?: boolean;
11
+ /** TableHeader and TableBody (Figma: the `rows` slot). */
12
+ children: ReactNode;
13
+ /** loading marks the table busy. Outside default, put a TableStatus in the body. */
14
+ status?: TableStatus;
10
15
  }
11
- declare function TableRow({ header, noHover, className, children, onClick, ...props }: TableRowProps): react.JSX.Element;
12
- interface ThProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
13
- align?: Align;
16
+ /**
17
+ * Table — Figma [RDS] Content/Table. Data to compare across rows: text on the left, numbers on the right. On a narrow
18
+ * screen it scrolls sideways inside its border (a focusable, named region). Styles: table.css.
19
+ */
20
+ declare function Table({ caption, showCaption, status, className, children, ...rest }: TableProps): react.JSX.Element;
21
+ declare function TableHeader(props: HTMLAttributes<HTMLTableSectionElement>): react.JSX.Element;
22
+ declare function TableBody(props: HTMLAttributes<HTMLTableSectionElement>): react.JSX.Element;
23
+ declare function TableRow(props: HTMLAttributes<HTMLTableRowElement>): react.JSX.Element;
24
+ interface TableHeadProps extends Omit<ThHTMLAttributes<HTMLTableCellElement>, 'align'> {
25
+ /** start for text columns, end for number columns. Same as the column's cells. */
26
+ align?: TableAlign;
27
+ /** A column that sorts: its current order. The header becomes a button, and aria-sort says the order. */
28
+ sort?: TableSort;
29
+ /** Called when the person asks to sort by this column. Required with `sort`. */
30
+ onSort?: () => void;
14
31
  }
15
- declare function Th({ align, className, children, ...props }: ThProps): react.JSX.Element;
16
- interface TdProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
17
- align?: Align;
18
- muted?: boolean;
19
- bold?: boolean;
32
+ /** A column header (Figma: .table/cell type=header). */
33
+ declare function TableHead({ align, sort, onSort, className, children, ...rest }: TableHeadProps): react.JSX.Element;
34
+ interface TableCellProps extends Omit<TdHTMLAttributes<HTMLTableCellElement>, 'align'> {
35
+ /** start for text, end for numbers (tabular figures). */
36
+ align?: TableAlign;
37
+ /** body for text; slot when the cell holds a component (Status, Badge, Avatar, Button): less padding. */
38
+ type?: 'body' | 'slot';
20
39
  }
21
- declare function Td({ align, muted, bold, className, children, ...props }: TdProps): react.JSX.Element;
40
+ /** A body cell (Figma: .table/cell type=body or slot). */
41
+ declare function TableCell({ align, type, className, ...rest }: TableCellProps): react.JSX.Element;
42
+ interface TableStatusProps {
43
+ /** loading: 3 rows of Skeleton; empty, noResults and error: an Empty across the columns. */
44
+ status: Exclude<TableStatus, 'default'>;
45
+ /** How many columns the table has, so the state spans all of them. */
46
+ columns: number;
47
+ /** Which columns hold numbers (aligned to the end), for the loading rows. */
48
+ numericColumns?: number[];
49
+ /** The Empty's title, in the words of the screen ("Nenhum pedido ainda"). */
50
+ title?: ReactNode;
51
+ description?: ReactNode;
52
+ /** The Empty title's level, one below the page's last heading. */
53
+ titleAs?: 'h2' | 'h3' | 'h4';
54
+ /** The way out, an outline Button: create, clear the search, try again. */
55
+ action?: ReactNode;
56
+ }
57
+ /** The data's life cycle (Figma: `status`). */
58
+ type TableStatus = 'default' | 'loading' | 'empty' | 'noResults' | 'error';
59
+ /** The table's body when there is no data to show yet: loading, empty, no results or error. Inside TableBody. */
60
+ declare function TableStatus({ status, columns, numericColumns, title, titleAs, description, action }: TableStatusProps): react.JSX.Element;
22
61
 
23
- export { Table, TableBody, TableHead, TableRow, type TableRowProps, Td, type TdProps, Th, type ThProps };
62
+ export { Table, type TableAlign, TableBody, TableCell, type TableCellProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableSort, TableStatus, type TableStatusProps };
@@ -1,85 +1,86 @@
1
+ "use client";
1
2
  import {
2
3
  __objRest,
3
4
  __spreadProps,
4
5
  __spreadValues
5
6
  } from "../chunk-ORMEWXMH.js";
6
- import { jsx } from "react/jsx-runtime";
7
- const ALIGN = { left: "text-left", right: "text-right", center: "text-center" };
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ import { useId } from "react";
9
+ import { Empty } from "./empty.js";
10
+ import { Skeleton } from "./skeleton.js";
11
+ import { AlertIcon, ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon, SearchXIcon, TableIcon } from "./internal/icons.js";
8
12
  function Table(_a) {
9
- var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
10
- return /* @__PURE__ */ jsx("table", __spreadProps(__spreadValues({ className: ["w-full text-label", className].join(" ") }, props), { children }));
13
+ var _b = _a, { caption, showCaption, status = "default", className, children } = _b, rest = __objRest(_b, ["caption", "showCaption", "status", "className", "children"]);
14
+ const captionId = useId();
15
+ return /* @__PURE__ */ jsx("div", { className: ["rds-table", className].filter(Boolean).join(" "), role: "region", "aria-labelledby": captionId, tabIndex: 0, children: /* @__PURE__ */ jsxs("table", __spreadProps(__spreadValues({}, rest), { className: "rds-table__table", "aria-busy": status === "loading" || void 0, children: [
16
+ /* @__PURE__ */ jsx("caption", { id: captionId, className: showCaption ? "rds-table__caption" : "rds-visually-hidden", children: caption }),
17
+ children
18
+ ] })) });
11
19
  }
12
- function TableHead(_c) {
13
- var _d = _c, { className = "", children } = _d, props = __objRest(_d, ["className", "children"]);
14
- return /* @__PURE__ */ jsx("thead", __spreadProps(__spreadValues({ className: className || void 0 }, props), { children }));
20
+ function TableHeader(props) {
21
+ return /* @__PURE__ */ jsx("thead", __spreadValues({}, props));
15
22
  }
16
- function TableBody(_e) {
17
- var _f = _e, { className = "", children } = _f, props = __objRest(_f, ["className", "children"]);
18
- return /* @__PURE__ */ jsx("tbody", __spreadProps(__spreadValues({ className: ["divide-y divide-stroke-default", className].join(" ") }, props), { children }));
23
+ function TableBody(props) {
24
+ return /* @__PURE__ */ jsx("tbody", __spreadValues({}, props));
19
25
  }
20
- function TableRow(_g) {
21
- var _h = _g, { header, noHover, className = "", children, onClick } = _h, props = __objRest(_h, ["header", "noHover", "className", "children", "onClick"]);
22
- const base = header ? "border-b border-stroke-default" : [
23
- !noHover && "hover:bg-surface-raised transition-colors",
24
- onClick && "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-stroke-focus"
25
- ].filter(Boolean).join(" ");
26
- const interactiveProps = !header && onClick ? {
27
- role: "button",
28
- tabIndex: 0,
29
- onKeyDown: (e) => {
30
- if (e.key === "Enter" || e.key === " ") {
31
- e.preventDefault();
32
- onClick(e);
33
- }
34
- }
35
- } : {};
36
- return /* @__PURE__ */ jsx(
37
- "tr",
38
- __spreadProps(__spreadValues(__spreadValues({
39
- className: [base, className].filter(Boolean).join(" "),
40
- onClick
41
- }, interactiveProps), props), {
42
- children
43
- })
44
- );
26
+ function TableRow(props) {
27
+ return /* @__PURE__ */ jsx("tr", __spreadValues({}, props));
45
28
  }
46
- function Th(_i) {
47
- var _j = _i, { align = "left", className = "", children } = _j, props = __objRest(_j, ["align", "className", "children"]);
29
+ function TableHead(_c) {
30
+ var _d = _c, { align = "start", sort, onSort, className, children } = _d, rest = __objRest(_d, ["align", "sort", "onSort", "className", "children"]);
31
+ const SortIcon = sort === "ascending" ? ArrowUpIcon : sort === "descending" ? ArrowDownIcon : ArrowUpDownIcon;
48
32
  return /* @__PURE__ */ jsx(
49
33
  "th",
50
34
  __spreadProps(__spreadValues({
51
- className: [
52
- "px-5 py-3 text-caption font-semibold text-fg-muted uppercase tracking-wide whitespace-nowrap",
53
- ALIGN[align],
54
- className
55
- ].filter(Boolean).join(" ")
56
- }, props), {
57
- children
35
+ scope: "col",
36
+ "aria-sort": sort
37
+ }, rest), {
38
+ className: ["rds-table__head", `rds-table__cell--${align}`, className].filter(Boolean).join(" "),
39
+ children: sort ? /* @__PURE__ */ jsxs("button", { type: "button", className: "rds-table__sort", onClick: onSort, children: [
40
+ children,
41
+ /* @__PURE__ */ jsx("span", { className: "rds-table__sort-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(SortIcon, {}) })
42
+ ] }) : children
58
43
  })
59
44
  );
60
45
  }
61
- function Td(_k) {
62
- var _l = _k, { align = "left", muted, bold, className = "", children } = _l, props = __objRest(_l, ["align", "muted", "bold", "className", "children"]);
46
+ function TableCell(_e) {
47
+ var _f = _e, { align = "start", type = "body", className } = _f, rest = __objRest(_f, ["align", "type", "className"]);
63
48
  return /* @__PURE__ */ jsx(
64
49
  "td",
65
- __spreadProps(__spreadValues({
66
- className: [
67
- "px-5 py-3",
68
- ALIGN[align],
69
- muted ? "text-fg-muted" : "text-fg-primary",
70
- bold ? "font-medium" : "",
71
- className
72
- ].filter(Boolean).join(" ")
73
- }, props), {
74
- children
50
+ __spreadProps(__spreadValues({}, rest), {
51
+ className: ["rds-table__cell", `rds-table__cell--${align}`, type === "slot" && "rds-table__cell--slot", className].filter(Boolean).join(" ")
75
52
  })
76
53
  );
77
54
  }
55
+ const STATUS_COPY = {
56
+ empty: { icon: /* @__PURE__ */ jsx(TableIcon, {}), title: "Nada por aqui ainda", description: "Quando houver dados, eles aparecem nesta tabela." },
57
+ noResults: { icon: /* @__PURE__ */ jsx(SearchXIcon, {}), title: "Nada encontrado", description: "Tente outro termo ou limpe a busca." },
58
+ error: { icon: /* @__PURE__ */ jsx(AlertIcon, {}), title: "N\xE3o deu para carregar", description: "Verifique a conex\xE3o e tente de novo." }
59
+ };
60
+ function TableStatus({ status, columns, numericColumns = [], title, titleAs, description, action }) {
61
+ if (status === "loading") {
62
+ return /* @__PURE__ */ jsx(Fragment, { children: [0, 1, 2].map((row) => /* @__PURE__ */ jsx("tr", { children: Array.from({ length: columns }, (_, col) => /* @__PURE__ */ jsx(TableCell, { type: "slot", align: numericColumns.includes(col) ? "end" : "start", children: /* @__PURE__ */ jsx(Skeleton, { width: numericColumns.includes(col) ? 48 : "70%" }) }, col)) }, row)) });
63
+ }
64
+ const copy = STATUS_COPY[status];
65
+ return /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { className: "rds-table__status", colSpan: columns, children: /* @__PURE__ */ jsx(
66
+ Empty,
67
+ {
68
+ icon: copy.icon,
69
+ tone: status === "error" ? "danger" : "neutral",
70
+ title: title != null ? title : copy.title,
71
+ titleAs,
72
+ description: description != null ? description : copy.description,
73
+ action,
74
+ role: status === "error" ? "alert" : void 0
75
+ }
76
+ ) }) });
77
+ }
78
78
  export {
79
79
  Table,
80
80
  TableBody,
81
+ TableCell,
81
82
  TableHead,
83
+ TableHeader,
82
84
  TableRow,
83
- Td,
84
- Th
85
+ TableStatus
85
86
  };
@@ -0,0 +1,67 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface TabsProps {
5
+ /** The TabsList and a TabsContent per tab. */
6
+ children: ReactNode;
7
+ /** The open tab (controlled). With links (asChild), the value of the current route. */
8
+ value?: string;
9
+ defaultValue?: string;
10
+ onValueChange?: (value: string) => void;
11
+ /**
12
+ * automatic (default): the arrows open the tab they land on. manual: the arrows only move the focus, Enter or
13
+ * Space opens. Use manual when the tabs are links (asChild), so the arrows do not change the selection without
14
+ * navigating.
15
+ */
16
+ activationMode?: 'automatic' | 'manual';
17
+ className?: string;
18
+ }
19
+ /**
20
+ * Tabs — Figma [RDS] Navigation/Tabs. Views of the same place, one at a time (Radix Tabs): role="tablist",
21
+ * the arrows, Home and End move between tabs, aria-selected marks the open one. Styles: tabs.css.
22
+ */
23
+ declare function Tabs({ className, activationMode, ...props }: TabsProps): react.JSX.Element;
24
+ interface TabsListProps {
25
+ /** What the tabs switch ("Pedidos"). The tablist's accessible name. */
26
+ 'aria-label': string;
27
+ /** The TabsTriggers, in the order of use (Figma: the `tabs` slot). */
28
+ children: ReactNode;
29
+ /** A page action at the right end of the strip, outside the tablist: a small Button, a filter (Figma: `trailing`). */
30
+ trailing?: ReactNode;
31
+ className?: string;
32
+ }
33
+ /** The strip of tabs over the baseline (Figma: the `tabs` slot), with the `trailing` slot on the right. */
34
+ declare function TabsList({ children, trailing, className, ...rest }: TabsListProps): react.JSX.Element;
35
+ interface TabsTriggerProps {
36
+ value: string;
37
+ /**
38
+ * The tab's name (Figma: `label`). With `asChild`, a single link element (an `<a>`, a framework `Link`) whose
39
+ * text is the name: the tab is then that link.
40
+ */
41
+ children: ReactNode;
42
+ /** A count after the name, when the number helps choosing (Figma: `showCount` + `count`). */
43
+ count?: number | string;
44
+ /** The "em breve" tag: the view is not there yet (Figma: `showSoon`). Usually with `disabled`. */
45
+ soon?: boolean;
46
+ /** The status dot: there is something new in this view (Figma: `showDot`). */
47
+ dot?: boolean;
48
+ /** What the dot means, read by screen readers (the dot alone is only colour). */
49
+ dotLabel?: string;
50
+ disabled?: boolean;
51
+ /**
52
+ * Render the single child element (an `<a>`, a framework `Link`) as the tab instead of a `<button>`: the way
53
+ * to make tabs that navigate. Control `value` from the current route.
54
+ */
55
+ asChild?: boolean;
56
+ }
57
+ /** One tab (Figma: .tabs/tab). Order inside: name, "em breve", dot, count. */
58
+ declare function TabsTrigger({ value, children, count, soon, dot, dotLabel, disabled, asChild }: TabsTriggerProps): react.JSX.Element;
59
+ interface TabsContentProps {
60
+ value: string;
61
+ children: ReactNode;
62
+ className?: string;
63
+ }
64
+ /** The view of one tab: role="tabpanel", named by its tab. */
65
+ declare function TabsContent({ value, children, className }: TabsContentProps): react.JSX.Element;
66
+
67
+ export { Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps };
@@ -0,0 +1,56 @@
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 { cloneElement, isValidElement } from "react";
9
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
10
+ function Tabs(_a) {
11
+ var _b = _a, { className, activationMode = "automatic" } = _b, props = __objRest(_b, ["className", "activationMode"]);
12
+ return /* @__PURE__ */ jsx(
13
+ TabsPrimitive.Root,
14
+ __spreadProps(__spreadValues({}, props), {
15
+ activationMode,
16
+ className: ["rds-tabs", className].filter(Boolean).join(" ")
17
+ })
18
+ );
19
+ }
20
+ function TabsList(_c) {
21
+ var _d = _c, { children, trailing, className } = _d, rest = __objRest(_d, ["children", "trailing", "className"]);
22
+ return /* @__PURE__ */ jsxs("div", { className: ["rds-tabs__bar", className].filter(Boolean).join(" "), children: [
23
+ /* @__PURE__ */ jsx(TabsPrimitive.List, __spreadProps(__spreadValues({}, rest), { className: "rds-tabs__list", children })),
24
+ trailing && /* @__PURE__ */ jsx("div", { className: "rds-tabs__trailing", children: trailing })
25
+ ] });
26
+ }
27
+ function TabsTrigger({ value, children, count, soon, dot, dotLabel = "Tem novidade", disabled, asChild }) {
28
+ const extras = /* @__PURE__ */ jsxs(Fragment, { children: [
29
+ soon && /* @__PURE__ */ jsx("span", { className: "rds-tabs__soon", children: "em breve" }),
30
+ dot && /* @__PURE__ */ jsx("span", { className: "rds-tabs__dot", children: /* @__PURE__ */ jsx("span", { className: "rds-visually-hidden", children: dotLabel }) }),
31
+ count !== void 0 && /* @__PURE__ */ jsx("span", { className: "rds-tabs__count", children: count })
32
+ ] });
33
+ if (asChild && isValidElement(children)) {
34
+ const link = children;
35
+ return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, { value, disabled, asChild: true, children: cloneElement(link, {
36
+ className: ["rds-tabs__tab", link.props.className].filter(Boolean).join(" "),
37
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
38
+ /* @__PURE__ */ jsx("span", { className: "rds-tabs__label", children: link.props.children }),
39
+ extras
40
+ ] })
41
+ }) });
42
+ }
43
+ return /* @__PURE__ */ jsxs(TabsPrimitive.Trigger, { value, disabled, className: "rds-tabs__tab", children: [
44
+ /* @__PURE__ */ jsx("span", { className: "rds-tabs__label", children }),
45
+ extras
46
+ ] });
47
+ }
48
+ function TabsContent({ value, children, className }) {
49
+ return /* @__PURE__ */ jsx(TabsPrimitive.Content, { value, className: ["rds-tabs__panel", className].filter(Boolean).join(" "), children });
50
+ }
51
+ export {
52
+ Tabs,
53
+ TabsContent,
54
+ TabsList,
55
+ TabsTrigger
56
+ };
@@ -0,0 +1,30 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface TestimonialProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
5
+ eyebrow?: ReactNode;
6
+ /** The block's title, an h2 that names the section. */
7
+ title: ReactNode;
8
+ description?: ReactNode;
9
+ /** TestimonialItem cards (Figma: slot `items`): 3 per row, one column below 640 of container width. */
10
+ children: ReactNode;
11
+ }
12
+ /**
13
+ * Testimonial — Figma [RDS] Blocks/Testimonial. Testimonials of a public page: only real ones, with the consent of
14
+ * who said them. Adapts to the width of its container (Figma: `screen`). Styles: testimonial.css.
15
+ */
16
+ declare function Testimonial({ eyebrow, title, description, children, className, ...rest }: TestimonialProps): react.JSX.Element;
17
+ interface TestimonialItemProps extends HTMLAttributes<HTMLLIElement> {
18
+ /** The words of who said it (Figma: `quote`). */
19
+ quote: ReactNode;
20
+ /** Who said it (Figma: `name`). */
21
+ name: ReactNode;
22
+ /** Job title and company (Figma: `jobTitle`). */
23
+ jobTitle?: ReactNode;
24
+ /** An Avatar of the person (the Figma exposes it). */
25
+ avatar?: ReactNode;
26
+ }
27
+ /** One testimonial card (Figma: .testimonial/item), a figure with the quote and its author. Only inside a Testimonial. */
28
+ declare function TestimonialItem({ quote, name, jobTitle, avatar, className, ...rest }: TestimonialItemProps): react.JSX.Element;
29
+
30
+ export { Testimonial, TestimonialItem, type TestimonialItemProps, type TestimonialProps };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import {
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues
6
+ } from "../chunk-ORMEWXMH.js";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { useId } from "react";
9
+ import { BlockHeading } from "./internal/block.js";
10
+ import { QuoteIcon } from "./internal/icons.js";
11
+ function Testimonial(_a) {
12
+ var _b = _a, { eyebrow, title, description, children, className } = _b, rest = __objRest(_b, ["eyebrow", "title", "description", "children", "className"]);
13
+ const titleId = useId();
14
+ return /* @__PURE__ */ jsx("section", __spreadProps(__spreadValues({ "aria-labelledby": titleId }, rest), { className: ["rds-block", "rds-testimonial", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs("div", { className: "rds-block__inner", children: [
15
+ /* @__PURE__ */ jsx(BlockHeading, { eyebrow, title, description, titleId }),
16
+ /* @__PURE__ */ jsx("ul", { className: "rds-testimonial__items", children })
17
+ ] }) }));
18
+ }
19
+ function TestimonialItem(_c) {
20
+ var _d = _c, { quote, name, jobTitle, avatar, className } = _d, rest = __objRest(_d, ["quote", "name", "jobTitle", "avatar", "className"]);
21
+ return /* @__PURE__ */ jsx("li", __spreadProps(__spreadValues({}, rest), { className: ["rds-testimonial__item", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs("figure", { className: "rds-testimonial__figure", children: [
22
+ /* @__PURE__ */ jsx("span", { className: "rds-testimonial__mark", "aria-hidden": "true", children: /* @__PURE__ */ jsx(QuoteIcon, {}) }),
23
+ /* @__PURE__ */ jsx("blockquote", { className: "rds-testimonial__quote", children: quote }),
24
+ /* @__PURE__ */ jsxs("figcaption", { className: "rds-testimonial__author", children: [
25
+ avatar,
26
+ /* @__PURE__ */ jsxs("span", { className: "rds-testimonial__byline", children: [
27
+ /* @__PURE__ */ jsx("span", { className: "rds-testimonial__name", children: name }),
28
+ jobTitle && /* @__PURE__ */ jsx("span", { className: "rds-testimonial__role", children: jobTitle })
29
+ ] })
30
+ ] })
31
+ ] }) }));
32
+ }
33
+ export {
34
+ Testimonial,
35
+ TestimonialItem
36
+ };