@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
@@ -0,0 +1,117 @@
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 { createContext, useContext, useId, useState } from "react";
9
+ import { CheckIcon, ImageIcon } from "./icons.js";
10
+ const Group = createContext(null);
11
+ function ChoiceCardControl(_a) {
12
+ var _b = _a, {
13
+ control,
14
+ children,
15
+ description,
16
+ icon,
17
+ selected,
18
+ onSelect,
19
+ value,
20
+ disabled,
21
+ className,
22
+ onChange,
23
+ name,
24
+ layout,
25
+ preview
26
+ } = _b, rest = __objRest(_b, [
27
+ "control",
28
+ "children",
29
+ "description",
30
+ "icon",
31
+ "selected",
32
+ "onSelect",
33
+ "value",
34
+ "disabled",
35
+ "className",
36
+ "onChange",
37
+ "name",
38
+ "layout",
39
+ "preview"
40
+ ]);
41
+ var _a2, _b2;
42
+ const group = useContext(Group);
43
+ const descriptionId = useId();
44
+ const checked = group && value !== void 0 && control === "radio" ? group.value === value : !!selected;
45
+ const isDisabled = disabled || (group == null ? void 0 : group.disabled);
46
+ const kind = (_a2 = layout != null ? layout : group == null ? void 0 : group.layout) != null ? _a2 : "row";
47
+ const check = checked && /* @__PURE__ */ jsx("span", { className: "rds-choice-card__check", "aria-hidden": "true", children: /* @__PURE__ */ jsx(CheckIcon, {}) });
48
+ return /* @__PURE__ */ jsxs(
49
+ "label",
50
+ {
51
+ className: [
52
+ "rds-choice-card",
53
+ `rds-choice-card--${kind}`,
54
+ checked && "rds-choice-card--selected",
55
+ isDisabled && "rds-choice-card--disabled",
56
+ className
57
+ ].filter(Boolean).join(" "),
58
+ children: [
59
+ /* @__PURE__ */ jsx(
60
+ "input",
61
+ __spreadProps(__spreadValues({}, rest), {
62
+ type: control,
63
+ className: "rds-choice-card__input",
64
+ name: (_b2 = group == null ? void 0 : group.name) != null ? _b2 : name,
65
+ value,
66
+ checked,
67
+ disabled: isDisabled,
68
+ "aria-describedby": description ? descriptionId : void 0,
69
+ onChange: (event) => {
70
+ onChange == null ? void 0 : onChange(event);
71
+ if (group && value !== void 0) group.select(value);
72
+ onSelect == null ? void 0 : onSelect();
73
+ }
74
+ })
75
+ ),
76
+ kind === "preview" ? /* @__PURE__ */ jsxs("span", { className: "rds-choice-card__preview", "aria-hidden": "true", children: [
77
+ preview != null ? preview : /* @__PURE__ */ jsx("span", { className: "rds-choice-card__placeholder", children: /* @__PURE__ */ jsx(ImageIcon, {}) }),
78
+ check
79
+ ] }) : icon && /* @__PURE__ */ jsx("span", { className: "rds-choice-card__icon", "aria-hidden": "true", children: icon }),
80
+ /* @__PURE__ */ jsxs("span", { className: "rds-choice-card__text", children: [
81
+ /* @__PURE__ */ jsx("span", { className: "rds-choice-card__label", children }),
82
+ description && /* @__PURE__ */ jsx("span", { id: descriptionId, className: "rds-choice-card__description", children: description })
83
+ ] }),
84
+ kind === "row" && /* @__PURE__ */ jsx("span", { className: "rds-choice-card__radio", "aria-hidden": "true" }),
85
+ kind === "tile" && check
86
+ ]
87
+ }
88
+ );
89
+ }
90
+ function ChoiceCardGroup({ legend, children, value, defaultValue, onValueChange, name, disabled, layout = "row", className }) {
91
+ const generated = useId();
92
+ const [own, setOwn] = useState(defaultValue);
93
+ const current = value != null ? value : own;
94
+ return /* @__PURE__ */ jsx(
95
+ Group.Provider,
96
+ {
97
+ value: {
98
+ name: name != null ? name : generated,
99
+ value: current,
100
+ disabled,
101
+ layout,
102
+ select: (next) => {
103
+ setOwn(next);
104
+ onValueChange == null ? void 0 : onValueChange(next);
105
+ }
106
+ },
107
+ children: /* @__PURE__ */ jsxs("fieldset", { className: ["rds-choice-card-group", `rds-choice-card-group--${layout}`, className].filter(Boolean).join(" "), children: [
108
+ /* @__PURE__ */ jsx("legend", { className: "rds-choice-card-group__legend", children: legend }),
109
+ children
110
+ ] })
111
+ }
112
+ );
113
+ }
114
+ export {
115
+ ChoiceCardControl,
116
+ ChoiceCardGroup
117
+ };
@@ -0,0 +1,25 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, CSSProperties } from 'react';
3
+
4
+ interface ChoiceRowProps {
5
+ /** The component class: rds-checkbox, rds-radio, rds-switch. */
6
+ kind: string;
7
+ /** Renders the native input with the id and the description it must carry. */
8
+ control: (ids: {
9
+ id: string;
10
+ describedBy: string | undefined;
11
+ }) => ReactNode;
12
+ /** The visible label (Figma: `showLabel` + `label`). Without it the input needs aria-label. */
13
+ label?: ReactNode;
14
+ hint?: ReactNode;
15
+ required?: boolean;
16
+ disabled?: boolean;
17
+ invalid?: boolean;
18
+ errorMessage?: ReactNode;
19
+ id?: string;
20
+ className?: string;
21
+ style?: CSSProperties;
22
+ }
23
+ declare function ChoiceRow({ kind, control, label, hint, required, disabled, invalid, errorMessage, id, className, style, }: ChoiceRowProps): react.JSX.Element;
24
+
25
+ export { ChoiceRow, type ChoiceRowProps };
@@ -0,0 +1,44 @@
1
+ import "../../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useId } from "react";
4
+ import { hasContent } from "./field.js";
5
+ function ChoiceRow({
6
+ kind,
7
+ control,
8
+ label,
9
+ hint,
10
+ required,
11
+ disabled,
12
+ invalid,
13
+ errorMessage,
14
+ id,
15
+ className,
16
+ style
17
+ }) {
18
+ const generated = useId();
19
+ const controlId = id != null ? id : generated;
20
+ const hintId = hasContent(hint) ? `${controlId}-hint` : void 0;
21
+ const errorId = invalid && hasContent(errorMessage) ? `${controlId}-error` : void 0;
22
+ const describedBy = [hintId, errorId].filter(Boolean).join(" ") || void 0;
23
+ return /* @__PURE__ */ jsxs(
24
+ "div",
25
+ {
26
+ className: ["rds-choice", kind, invalid && `${kind}--error`, disabled && `${kind}--disabled`, className].filter(Boolean).join(" "),
27
+ style,
28
+ children: [
29
+ /* @__PURE__ */ jsxs("label", { className: "rds-choice__row", htmlFor: controlId, children: [
30
+ /* @__PURE__ */ jsx("span", { className: `rds-choice__control ${kind}__control`, children: control({ id: controlId, describedBy }) }),
31
+ hasContent(label) && /* @__PURE__ */ jsxs("span", { className: `rds-choice__label ${kind}__label`, children: [
32
+ label,
33
+ required && /* @__PURE__ */ jsx("span", { className: `${kind}__required`, "aria-hidden": "true", children: " *" })
34
+ ] })
35
+ ] }),
36
+ hintId && /* @__PURE__ */ jsx("span", { id: hintId, className: `rds-choice__support ${kind}__support ${kind}__hint`, children: hint }),
37
+ errorId && /* @__PURE__ */ jsx("span", { id: errorId, className: `rds-choice__support ${kind}__support ${kind}__error-message`, children: errorMessage })
38
+ ]
39
+ }
40
+ );
41
+ }
42
+ export {
43
+ ChoiceRow
44
+ };
@@ -0,0 +1,17 @@
1
+ type IsoDate = string;
2
+ declare function toIso(date: Date): IsoDate;
3
+ declare function fromIso(iso: IsoDate | undefined | null): Date | null;
4
+ declare function addDays(date: Date, days: number): Date;
5
+ /** Same day of the month in another month, clamped to its last day (31/01 + 1 month = 28 or 29/02). */
6
+ declare function addMonths(date: Date, months: number): Date;
7
+ /** dd/mm/aaaa → ISO, or null when the date does not exist (31/02). */
8
+ declare function parseBr(text: string): IsoDate | null;
9
+ declare function formatBr(iso: IsoDate | undefined | null): string;
10
+ /** Keeps only digits and puts the slashes as the person types: 3009 → 30/09. */
11
+ declare function maskBr(text: string): string;
12
+ /** The full date in pt-BR words ("30 de setembro de 2026"): the name a screen reader hears for a day. */
13
+ declare const dayName: (date: Date) => string;
14
+ /** "Setembro de 2026". */
15
+ declare function monthName(date: Date): string;
16
+
17
+ export { type IsoDate, addDays, addMonths, dayName, formatBr, fromIso, maskBr, monthName, parseBr, toIso };
@@ -0,0 +1,59 @@
1
+ import "../../chunk-ORMEWXMH.js";
2
+ function toIso(date) {
3
+ const y = date.getFullYear();
4
+ const m = String(date.getMonth() + 1).padStart(2, "0");
5
+ const d = String(date.getDate()).padStart(2, "0");
6
+ return `${y}-${m}-${d}`;
7
+ }
8
+ function fromIso(iso) {
9
+ if (!iso || !/^\d{4}-\d{2}-\d{2}$/.test(iso)) return null;
10
+ const [y, m, d] = iso.split("-").map(Number);
11
+ const date = new Date(y, m - 1, d);
12
+ return date.getMonth() === m - 1 && date.getDate() === d ? date : null;
13
+ }
14
+ function addDays(date, days) {
15
+ const next = new Date(date);
16
+ next.setDate(next.getDate() + days);
17
+ return next;
18
+ }
19
+ function addMonths(date, months) {
20
+ const target = new Date(date.getFullYear(), date.getMonth() + months, 1);
21
+ const last = new Date(target.getFullYear(), target.getMonth() + 1, 0).getDate();
22
+ target.setDate(Math.min(date.getDate(), last));
23
+ return target;
24
+ }
25
+ function parseBr(text) {
26
+ const match = /^(\d{2})\/(\d{2})\/(\d{4})$/.exec(text.trim());
27
+ if (!match) return null;
28
+ const iso = `${match[3]}-${match[2]}-${match[1]}`;
29
+ return fromIso(iso) ? iso : null;
30
+ }
31
+ function formatBr(iso) {
32
+ const date = fromIso(iso);
33
+ if (!date) return "";
34
+ return `${String(date.getDate()).padStart(2, "0")}/${String(date.getMonth() + 1).padStart(2, "0")}/${date.getFullYear()}`;
35
+ }
36
+ function maskBr(text) {
37
+ const d = text.replace(/\D/g, "").slice(0, 8);
38
+ if (d.length > 4) return `${d.slice(0, 2)}/${d.slice(2, 4)}/${d.slice(4)}`;
39
+ if (d.length > 2) return `${d.slice(0, 2)}/${d.slice(2)}`;
40
+ return d;
41
+ }
42
+ const longDate = new Intl.DateTimeFormat("pt-BR", { day: "numeric", month: "long", year: "numeric" });
43
+ const monthTitle = new Intl.DateTimeFormat("pt-BR", { month: "long", year: "numeric" });
44
+ const dayName = (date) => longDate.format(date);
45
+ function monthName(date) {
46
+ const text = monthTitle.format(date);
47
+ return text.charAt(0).toUpperCase() + text.slice(1);
48
+ }
49
+ export {
50
+ addDays,
51
+ addMonths,
52
+ dayName,
53
+ formatBr,
54
+ fromIso,
55
+ maskBr,
56
+ monthName,
57
+ parseBr,
58
+ toIso
59
+ };
@@ -0,0 +1,66 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, ButtonHTMLAttributes, HTMLAttributes, CSSProperties } from 'react';
3
+
4
+ type FieldLabelPosition = 'top' | 'floating';
5
+ interface FieldTextProps {
6
+ /**
7
+ * The label (Figma: `showLabel` + `label`), always tied to the control. Without it the field has no
8
+ * visible name: pass aria-label (a search in a header).
9
+ */
10
+ label?: ReactNode;
11
+ /** top (default): the label above the box. floating: inside the box, shrinking on focus or with a value. */
12
+ labelPosition?: FieldLabelPosition;
13
+ /** A line under the box (Figma: `showHint` + `hint`), tied by aria-describedby. Gives way to the error message. */
14
+ hint?: ReactNode;
15
+ /** The error state (Figma: `error`): red border and aria-invalid. Passing `errorMessage` turns it on too. */
16
+ error?: boolean;
17
+ /** What went wrong and how to fix it, never just "campo inválido". Turns the error state on. */
18
+ errorMessage?: ReactNode;
19
+ /** Shows the asterisk and sets the native required (read as "obrigatório"). */
20
+ required?: boolean;
21
+ }
22
+ /** The ids a field's control points to, and whether it is in error. */
23
+ declare function useFieldIds(id: string | undefined, hint: ReactNode, error: boolean | undefined, errorMessage: ReactNode): {
24
+ controlId: string;
25
+ hintId: string | undefined;
26
+ errorId: string | undefined;
27
+ invalid: boolean;
28
+ describedBy: string | undefined;
29
+ };
30
+ declare const hasContent: (node: ReactNode) => boolean;
31
+ /** A field without a visible label needs a name, or a screen reader only says "edit text". */
32
+ declare function warnIfUnlabelled(component: string, label: ReactNode, ariaLabel: unknown, ariaLabelledBy: unknown): void;
33
+ interface FieldShellProps {
34
+ /** The component class (rds-input, rds-textarea, rds-select). */
35
+ kind: string;
36
+ controlId: string;
37
+ hintId?: string;
38
+ errorId?: string;
39
+ label?: ReactNode;
40
+ labelPosition?: FieldLabelPosition;
41
+ hint?: ReactNode;
42
+ errorMessage?: ReactNode;
43
+ invalid: boolean;
44
+ required?: boolean;
45
+ disabled?: boolean;
46
+ /** The box contents, in order: leading parts, the control, trailing parts. */
47
+ children: ReactNode;
48
+ /** Extra class on the box (for example when it ends on an action). */
49
+ boxClassName?: string;
50
+ /** What goes between the box and the hint or error (the NumberInput's named steps). */
51
+ afterBox?: ReactNode;
52
+ /** Event handlers on the box (the FileInput's drag and drop). */
53
+ boxProps?: Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'role' | 'children'>;
54
+ className?: string;
55
+ style?: CSSProperties;
56
+ }
57
+ declare function FieldShell({ kind, controlId, hintId, errorId, label, labelPosition, hint, errorMessage, invalid, required, disabled, children, boxClassName, afterBox, boxProps, className, style, }: FieldShellProps): react.JSX.Element;
58
+ /** The 32 × 32 button inside a field (Figma: .action): clear, show password. Always named. */
59
+ declare function FieldAction({ label, icon, ...rest }: {
60
+ label: string;
61
+ icon: ReactNode;
62
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>): react.JSX.Element;
63
+ /** Clears a field the way typing would: React's onChange fires, controlled or not. */
64
+ declare function clearNativeValue(element: HTMLInputElement | HTMLTextAreaElement | null): void;
65
+
66
+ export { FieldAction, type FieldLabelPosition, FieldShell, type FieldShellProps, type FieldTextProps, clearNativeValue, hasContent, useFieldIds, warnIfUnlabelled };
@@ -0,0 +1,105 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "../../chunk-ORMEWXMH.js";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { useId } from "react";
8
+ function useFieldIds(id, hint, error, errorMessage) {
9
+ const generated = useId();
10
+ const controlId = id != null ? id : generated;
11
+ const invalid = Boolean(error || hasContent(errorMessage));
12
+ const errorId = invalid && hasContent(errorMessage) ? `${controlId}-error` : void 0;
13
+ const hintId = hasContent(hint) && !errorId ? `${controlId}-hint` : void 0;
14
+ return { controlId, hintId, errorId, invalid, describedBy: [hintId, errorId].filter(Boolean).join(" ") || void 0 };
15
+ }
16
+ const hasContent = (node) => node !== void 0 && node !== null && node !== false && node !== "";
17
+ function warnIfUnlabelled(component, label, ariaLabel, ariaLabelledBy) {
18
+ if (!hasContent(label) && !ariaLabel && !ariaLabelledBy) {
19
+ console.warn(`[@rojaostudio/ds] ${component} without label needs aria-label.`);
20
+ }
21
+ }
22
+ function LabelText({ label, required }) {
23
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
24
+ label,
25
+ required && /* @__PURE__ */ jsx("span", { className: "rds-field__required", "aria-hidden": "true", children: " *" })
26
+ ] });
27
+ }
28
+ function FieldShell({
29
+ kind,
30
+ controlId,
31
+ hintId,
32
+ errorId,
33
+ label,
34
+ labelPosition = "top",
35
+ hint,
36
+ errorMessage,
37
+ invalid,
38
+ required,
39
+ disabled,
40
+ children,
41
+ boxClassName,
42
+ afterBox,
43
+ boxProps,
44
+ className,
45
+ style
46
+ }) {
47
+ const labelled = hasContent(label);
48
+ const floating = labelPosition === "floating" && labelled;
49
+ return /* @__PURE__ */ jsxs(
50
+ "div",
51
+ {
52
+ className: [
53
+ "rds-field",
54
+ kind,
55
+ floating && "rds-field--floating",
56
+ invalid && "rds-field--error",
57
+ disabled && "rds-field--disabled",
58
+ className
59
+ ].filter(Boolean).join(" "),
60
+ style,
61
+ children: [
62
+ labelled && !floating && /* @__PURE__ */ jsx("label", { htmlFor: controlId, className: "rds-field__label", children: /* @__PURE__ */ jsx(LabelText, { label, required }) }),
63
+ /* @__PURE__ */ jsxs(
64
+ "div",
65
+ __spreadProps(__spreadValues({}, boxProps), {
66
+ className: ["rds-field__box", boxClassName].filter(Boolean).join(" "),
67
+ role: disabled ? "group" : void 0,
68
+ "aria-disabled": disabled || void 0,
69
+ children: [
70
+ floating && /* @__PURE__ */ jsx("label", { htmlFor: controlId, className: "rds-field__float-label", children: /* @__PURE__ */ jsx(LabelText, { label, required }) }),
71
+ children
72
+ ]
73
+ })
74
+ ),
75
+ afterBox,
76
+ errorId ? /* @__PURE__ */ jsx("span", { id: errorId, className: "rds-field__support rds-field__error-message", children: errorMessage }) : hintId && /* @__PURE__ */ jsx("span", { id: hintId, className: "rds-field__support rds-field__hint", children: hint })
77
+ ]
78
+ }
79
+ );
80
+ }
81
+ function FieldAction(_a) {
82
+ var _b = _a, {
83
+ label,
84
+ icon
85
+ } = _b, rest = __objRest(_b, [
86
+ "label",
87
+ "icon"
88
+ ]);
89
+ return /* @__PURE__ */ jsx("button", __spreadProps(__spreadValues({ type: "button", "aria-label": label }, rest), { className: "rds-field__action", children: /* @__PURE__ */ jsx("span", { className: "rds-field__action-icon", "aria-hidden": "true", children: icon }) }));
90
+ }
91
+ function clearNativeValue(element) {
92
+ var _a, _b;
93
+ if (!element) return;
94
+ const prototype = element instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype;
95
+ (_b = (_a = Object.getOwnPropertyDescriptor(prototype, "value")) == null ? void 0 : _a.set) == null ? void 0 : _b.call(element, "");
96
+ element.dispatchEvent(new Event("input", { bubbles: true }));
97
+ }
98
+ export {
99
+ FieldAction,
100
+ FieldShell,
101
+ clearNativeValue,
102
+ hasContent,
103
+ useFieldIds,
104
+ warnIfUnlabelled
105
+ };
@@ -0,0 +1,25 @@
1
+ import * as react from 'react';
2
+ import { FieldsetHTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface ChoiceFieldsetProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'children'> {
5
+ /** The question (Figma: `legend`). It names the group: without it, a screen reader hears only the option. */
6
+ legend: ReactNode;
7
+ /** Shows the asterisk. */
8
+ required?: boolean;
9
+ /** A line under the question (Figma: `showHint` + `hint`), tied by aria-describedby. */
10
+ hint?: ReactNode;
11
+ /** The group is in error (Figma: `error`). Passing `errorMessage` turns it on too. */
12
+ error?: boolean;
13
+ /** What is missing and how to fix it: one message for the whole group. Turns the error state on. */
14
+ errorMessage?: ReactNode;
15
+ /** The options (Figma: slot `options`). */
16
+ children: ReactNode;
17
+ }
18
+ declare function ChoiceFieldset({ kind, legend, required, hint, error, errorMessage, requiredText, className, children, ...rest }: ChoiceFieldsetProps & {
19
+ /** The component class (rds-checkbox-group, rds-radio-group). */
20
+ kind: string;
21
+ /** Said after the legend when the group cannot carry aria-required (a plain group). */
22
+ requiredText?: string;
23
+ }): react.JSX.Element;
24
+
25
+ export { ChoiceFieldset, type ChoiceFieldsetProps };
@@ -0,0 +1,56 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "../../chunk-ORMEWXMH.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { useId } from "react";
8
+ import { hasContent } from "./field.js";
9
+ function ChoiceFieldset(_a) {
10
+ var _b = _a, {
11
+ kind,
12
+ legend,
13
+ required,
14
+ hint,
15
+ error,
16
+ errorMessage,
17
+ requiredText,
18
+ className,
19
+ children
20
+ } = _b, rest = __objRest(_b, [
21
+ "kind",
22
+ "legend",
23
+ "required",
24
+ "hint",
25
+ "error",
26
+ "errorMessage",
27
+ "requiredText",
28
+ "className",
29
+ "children"
30
+ ]);
31
+ const id = useId();
32
+ const invalid = Boolean(error || hasContent(errorMessage));
33
+ const hintId = hasContent(hint) ? `${id}-hint` : void 0;
34
+ const errorId = invalid && hasContent(errorMessage) ? `${id}-error` : void 0;
35
+ return /* @__PURE__ */ jsxs(
36
+ "fieldset",
37
+ __spreadProps(__spreadValues({
38
+ "aria-describedby": [hintId, errorId].filter(Boolean).join(" ") || void 0
39
+ }, rest), {
40
+ className: ["rds-fieldset", kind, invalid && `${kind}--error`, className].filter(Boolean).join(" "),
41
+ children: [
42
+ /* @__PURE__ */ jsxs("legend", { className: `rds-fieldset__legend ${kind}__legend`, children: [
43
+ legend,
44
+ required && /* @__PURE__ */ jsx("span", { className: `${kind}__required`, "aria-hidden": "true", children: " *" }),
45
+ required && requiredText && /* @__PURE__ */ jsx("span", { className: "rds-visually-hidden", children: ` (${requiredText})` })
46
+ ] }),
47
+ hintId && /* @__PURE__ */ jsx("span", { id: hintId, className: `rds-fieldset__support ${kind}__support ${kind}__hint`, children: hint }),
48
+ /* @__PURE__ */ jsx("div", { className: "rds-fieldset__options", children }),
49
+ errorId && /* @__PURE__ */ jsx("span", { id: errorId, className: `rds-fieldset__support ${kind}__support ${kind}__error-message`, children: errorMessage })
50
+ ]
51
+ })
52
+ );
53
+ }
54
+ export {
55
+ ChoiceFieldset
56
+ };
@@ -0,0 +1,3 @@
1
+ declare function focusAfter(element: HTMLElement | null): void;
2
+
3
+ export { focusAfter };
@@ -0,0 +1,13 @@
1
+ import "../../chunk-ORMEWXMH.js";
2
+ const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
3
+ function focusAfter(element) {
4
+ if (!element || typeof document === "undefined") return;
5
+ const all = Array.from(document.querySelectorAll(FOCUSABLE)).filter((el) => !element.contains(el));
6
+ const next = all.find((el) => element.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING);
7
+ const previous = [...all].reverse().find((el) => element.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_PRECEDING);
8
+ const target = next != null ? next : previous;
9
+ requestAnimationFrame(() => target == null ? void 0 : target.focus());
10
+ }
11
+ export {
12
+ focusAfter
13
+ };
@@ -0,0 +1,47 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ type GoogleLayout = 'm3' | 'oauth';
5
+ /**
6
+ * The G of Google, in its four colours (Figma: .google/g). The brand's own mark, drawn only where the Figma draws
7
+ * it (the sign-in button and the Google screens); never recoloured. The fills are the mark's, not the theme's.
8
+ */
9
+ declare function GoogleG(): react.JSX.Element;
10
+ /** The outlined field with the floating label (Figma: .google/field). focus: label on top, 2px primary border. */
11
+ declare function GoogleField({ label, value, state }: {
12
+ label: string;
13
+ value?: string;
14
+ state?: 'default' | 'focus' | 'filled';
15
+ }): react.JSX.Element;
16
+ /** The account the screen is about: initial, e-mail and the chevron to switch (Figma: .google/account-chip). */
17
+ declare function GoogleAccountChip({ email }: {
18
+ email: string;
19
+ }): react.JSX.Element;
20
+ /** The primary button and the text action on its left (Figma: actions). */
21
+ declare function GoogleActions({ secondary, primary }: {
22
+ secondary: string;
23
+ primary: string;
24
+ }): react.JSX.Element;
25
+ interface GoogleScreenProps {
26
+ layout: GoogleLayout;
27
+ /** What the mockup shows, for screen readers. */
28
+ label: string;
29
+ title: ReactNode;
30
+ /** Under the title: the "Prosseguir para <app>" line or the account chip. */
31
+ intro?: ReactNode;
32
+ children: ReactNode;
33
+ className?: string;
34
+ }
35
+ /**
36
+ * The Google screen: the page, the card and the footer. m3: a card in two panels (the G, the title and the intro on
37
+ * the left; the form on the right), stacked below 640 of container width. oauth: the narrow card with the "Fazer
38
+ * Login com o Google" header and everything centred, edge to edge below 640.
39
+ */
40
+ declare function GoogleScreen({ layout, label, title, intro, children, className }: GoogleScreenProps): react.JSX.Element;
41
+ /** "Prosseguir para <app>" (or another lead) with the app's name in the primary colour. */
42
+ declare function GoogleAppLine({ lead, appName }: {
43
+ lead: string;
44
+ appName: string;
45
+ }): react.JSX.Element;
46
+
47
+ export { GoogleAccountChip, GoogleActions, GoogleAppLine, GoogleField, GoogleG, type GoogleLayout, GoogleScreen, type GoogleScreenProps };
@@ -0,0 +1,73 @@
1
+ import "../../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ function GoogleG() {
4
+ return /* @__PURE__ */ jsxs("svg", { className: "rds-google-g", viewBox: "0 0 48 48", "aria-hidden": "true", focusable: "false", children: [
5
+ /* @__PURE__ */ jsx("path", { fill: "#EA4335", d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z" }),
6
+ /* @__PURE__ */ jsx("path", { fill: "#4285F4", d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z" }),
7
+ /* @__PURE__ */ jsx("path", { fill: "#FBBC05", d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z" }),
8
+ /* @__PURE__ */ jsx("path", { fill: "#34A853", d: "M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z" })
9
+ ] });
10
+ }
11
+ function GoogleField({ label, value, state = "default" }) {
12
+ return /* @__PURE__ */ jsxs("div", { className: `rds-google__field rds-google__field--${state}`, children: [
13
+ /* @__PURE__ */ jsx("span", { className: "rds-google__field-label", children: label }),
14
+ state === "filled" && value && /* @__PURE__ */ jsx("span", { className: "rds-google__field-value", children: value })
15
+ ] });
16
+ }
17
+ function GoogleAccountChip({ email }) {
18
+ return /* @__PURE__ */ jsxs("span", { className: "rds-google__chip", children: [
19
+ /* @__PURE__ */ jsx("span", { className: "rds-google__avatar rds-google__avatar--sm", "aria-hidden": "true", children: email.charAt(0).toUpperCase() }),
20
+ /* @__PURE__ */ jsx("span", { children: email }),
21
+ /* @__PURE__ */ jsx("span", { className: "rds-google__caret", "aria-hidden": "true" })
22
+ ] });
23
+ }
24
+ function GoogleActions({ secondary, primary }) {
25
+ return /* @__PURE__ */ jsxs("div", { className: "rds-google__actions", children: [
26
+ /* @__PURE__ */ jsx("span", { className: "rds-google__link", children: secondary }),
27
+ /* @__PURE__ */ jsx("span", { className: "rds-google__primary", children: primary })
28
+ ] });
29
+ }
30
+ function GoogleScreen({ layout, label, title, intro, children, className }) {
31
+ return /* @__PURE__ */ jsx("div", { role: "group", "aria-label": label, className: ["rds-google", `rds-google--${layout}`, className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs("div", { className: "rds-google__page", children: [
32
+ /* @__PURE__ */ jsxs("div", { className: "rds-google__card", children: [
33
+ layout === "oauth" && /* @__PURE__ */ jsxs("div", { className: "rds-google__header", children: [
34
+ /* @__PURE__ */ jsx(GoogleG, {}),
35
+ /* @__PURE__ */ jsx("span", { children: "Fazer Login com o Google" })
36
+ ] }),
37
+ /* @__PURE__ */ jsxs("div", { className: "rds-google__body", children: [
38
+ /* @__PURE__ */ jsxs("div", { className: "rds-google__intro", children: [
39
+ layout === "m3" && /* @__PURE__ */ jsx(GoogleG, {}),
40
+ /* @__PURE__ */ jsx("p", { className: "rds-google__title", children: title }),
41
+ intro
42
+ ] }),
43
+ /* @__PURE__ */ jsx("div", { className: "rds-google__form", children })
44
+ ] })
45
+ ] }),
46
+ /* @__PURE__ */ jsxs("div", { className: "rds-google__footer", children: [
47
+ /* @__PURE__ */ jsxs("span", { className: "rds-google__language", children: [
48
+ "Portugu\xEAs (Brasil)",
49
+ /* @__PURE__ */ jsx("span", { className: "rds-google__caret", "aria-hidden": "true" })
50
+ ] }),
51
+ /* @__PURE__ */ jsxs("span", { className: "rds-google__footer-links", children: [
52
+ /* @__PURE__ */ jsx("span", { children: "Ajuda" }),
53
+ /* @__PURE__ */ jsx("span", { children: "Privacidade" }),
54
+ /* @__PURE__ */ jsx("span", { children: "Termos" })
55
+ ] })
56
+ ] })
57
+ ] }) });
58
+ }
59
+ function GoogleAppLine({ lead, appName }) {
60
+ return /* @__PURE__ */ jsxs("p", { className: "rds-google__subtitle", children: [
61
+ lead,
62
+ " ",
63
+ /* @__PURE__ */ jsx("span", { className: "rds-google__app", children: appName })
64
+ ] });
65
+ }
66
+ export {
67
+ GoogleAccountChip,
68
+ GoogleActions,
69
+ GoogleAppLine,
70
+ GoogleField,
71
+ GoogleG,
72
+ GoogleScreen
73
+ };