@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,6 +1,10 @@
1
1
  "use client";
2
- import "../chunk-ORMEWXMH.js";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import {
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues
6
+ } from "../chunk-ORMEWXMH.js";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
4
8
  import {
5
9
  createContext,
6
10
  useCallback,
@@ -9,9 +13,28 @@ import {
9
13
  useRef,
10
14
  useState
11
15
  } from "react";
12
- import Link from "next/link";
13
- import { Plus, Loader2 } from "lucide-react";
16
+ import { Slot, Slottable } from "@radix-ui/react-slot";
17
+ import { blockWhenDisabled } from "./internal/button.js";
18
+ import { PlusIcon } from "./internal/icons.js";
19
+ import { SavingBar } from "./saving-bar.js";
14
20
  import { useSavingBarActive } from "./saving-bar-context.js";
21
+ function FAB(_a) {
22
+ var _b = _a, { children, icon, disabled, asChild, type = "button", className, onClick } = _b, rest = __objRest(_b, ["children", "icon", "disabled", "asChild", "type", "className", "onClick"]);
23
+ const Root = asChild ? Slot : "button";
24
+ return /* @__PURE__ */ jsxs(
25
+ Root,
26
+ __spreadProps(__spreadValues({}, rest), {
27
+ type: asChild ? void 0 : type,
28
+ className: ["rds-fab", className].filter(Boolean).join(" "),
29
+ "aria-disabled": disabled || void 0,
30
+ onClick: blockWhenDisabled(disabled, onClick),
31
+ children: [
32
+ icon && /* @__PURE__ */ jsx("span", { className: "rds-fab__icon", "aria-hidden": "true", children: icon }),
33
+ /* @__PURE__ */ jsx(Slottable, { children })
34
+ ]
35
+ })
36
+ );
37
+ }
15
38
  const FABContext = createContext({
16
39
  config: null,
17
40
  setFAB: () => {
@@ -50,61 +73,38 @@ function usePageFAB(config, deps = []) {
50
73
  }, [setFAB, clearFAB, ...deps]);
51
74
  }
52
75
  function FABRoot() {
76
+ var _a, _b, _c;
53
77
  const { config, bottomOffset, fabHidden } = useFAB();
54
78
  const savingBarActive = useSavingBarActive();
55
79
  const hiddenByBar = savingBarActive && (config == null ? void 0 : config.variant) !== "save";
56
80
  const visible = !!config && !fabHidden && !hiddenByBar;
57
81
  const wrapCls = [
58
- "fixed right-6 z-40 flex items-center gap-2 transition-all duration-200",
59
- visible ? "opacity-100 translate-y-0 pointer-events-auto" : "opacity-0 translate-y-2 pointer-events-none"
60
- ].join(" ");
61
- const bottomStyle = { bottom: `${24 + bottomOffset}px` };
62
- if ((config == null ? void 0 : config.variant) === "save") {
63
- return /* @__PURE__ */ jsx("div", { className: wrapCls, style: bottomStyle, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-(--radius-control) px-4 py-3 [background:var(--fab-save-bg)] [box-shadow:var(--fab-save-shadow)]", children: [
64
- config.secondary && /* @__PURE__ */ jsx(
65
- "button",
66
- {
67
- type: "button",
68
- onClick: config.secondary.onClick,
69
- disabled: config.loading,
70
- className: "rounded-(--radius-control) border px-3 py-1.5 text-label font-medium transition-colors disabled:opacity-40 cursor-pointer [border-color:var(--fab-save-discard-border)] [color:var(--fab-save-discard-text)] hover:[border-color:var(--fab-save-discard-border-hover)] hover:[color:var(--fab-save-discard-text-hover)]",
71
- children: config.secondary.label
72
- }
73
- ),
74
- /* @__PURE__ */ jsx(
75
- "button",
76
- {
77
- type: "button",
78
- onClick: config.onClick,
79
- disabled: config.disabled || config.loading,
80
- className: "rounded-(--radius-control) px-4 py-1.5 text-label font-medium transition-colors disabled:opacity-50 cursor-pointer flex items-center gap-2 [background:var(--fab-save-primary-bg)] [color:var(--fab-save-primary-text)] hover:[background:var(--fab-save-primary-bg-hover)]",
81
- children: config.loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
82
- /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin" }),
83
- "Salvando..."
84
- ] }) : config.label
85
- }
86
- )
87
- ] }) });
82
+ "rds-fab-root",
83
+ (config == null ? void 0 : config.variant) === "save" ? "rds-fab-root--bar" : "rds-fab-root--fab",
84
+ !visible && "rds-fab-root--hidden"
85
+ ].filter(Boolean).join(" ");
86
+ const bottomStyle = { bottom: `${((config == null ? void 0 : config.variant) === "save" ? 0 : 24) + bottomOffset}px` };
87
+ if (!config) return null;
88
+ if (config.variant === "save") {
89
+ return /* @__PURE__ */ jsx("div", { className: wrapCls, style: bottomStyle, children: /* @__PURE__ */ jsx(
90
+ SavingBar,
91
+ {
92
+ status: config.loading ? "saving" : "unsaved",
93
+ saveLabel: config.label,
94
+ onSave: () => {
95
+ var _a2;
96
+ return (_a2 = config.onClick) == null ? void 0 : _a2.call(config);
97
+ },
98
+ onDiscard: (_a = config.secondary) == null ? void 0 : _a.onClick,
99
+ discardLabel: (_b = config.secondary) == null ? void 0 : _b.label
100
+ }
101
+ ) });
88
102
  }
89
- const btnCls = "flex items-center gap-2 h-12 pl-4 pr-5 rounded-(--radius-control) text-label font-semibold shadow-lg transition-colors cursor-pointer [background:var(--fab-cta-bg)] [color:var(--fab-cta-text)] hover:[background:var(--fab-cta-bg-hover)]";
90
- return /* @__PURE__ */ jsx("div", { className: wrapCls, style: bottomStyle, children: (config == null ? void 0 : config.href) ? /* @__PURE__ */ jsxs(Link, { href: config.href, className: btnCls, children: [
91
- /* @__PURE__ */ jsx(Plus, { size: 16, strokeWidth: 2.5 }),
92
- config == null ? void 0 : config.label
93
- ] }) : /* @__PURE__ */ jsxs(
94
- "button",
95
- {
96
- type: "button",
97
- onClick: config == null ? void 0 : config.onClick,
98
- disabled: config == null ? void 0 : config.disabled,
99
- className: btnCls + " disabled:opacity-50",
100
- children: [
101
- /* @__PURE__ */ jsx(Plus, { size: 16, strokeWidth: 2.5 }),
102
- config == null ? void 0 : config.label
103
- ]
104
- }
105
- ) });
103
+ const icon = (_c = config.icon) != null ? _c : /* @__PURE__ */ jsx(PlusIcon, {});
104
+ return /* @__PURE__ */ jsx("div", { className: wrapCls, style: bottomStyle, children: config.href ? /* @__PURE__ */ jsx(FAB, { asChild: true, icon, disabled: config.disabled, children: /* @__PURE__ */ jsx("a", { href: config.href, children: config.label }) }) : /* @__PURE__ */ jsx(FAB, { icon, disabled: config.disabled, onClick: config.onClick, children: config.label }) });
106
105
  }
107
106
  export {
107
+ FAB,
108
108
  FABProvider,
109
109
  FABRoot,
110
110
  useFAB,
@@ -0,0 +1,21 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface FAQProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
5
+ eyebrow?: ReactNode;
6
+ /** The block's title, an h2 that names the section. */
7
+ title: ReactNode;
8
+ /** The Accordion with the questions (the Figma exposes it). Its items' titles are h3. */
9
+ children: ReactNode;
10
+ /** The support line (Figma: `showSupport` + `supportText`). */
11
+ supportText?: ReactNode;
12
+ /** The way to support: an action ghost Button, or a link through asChild. */
13
+ supportAction?: ReactNode;
14
+ }
15
+ /**
16
+ * FAQ — Figma [RDS] Blocks/FAQ. The frequent questions of a public page, in an Accordion, and the way to support.
17
+ * Adapts to the width of its container (Figma: `screen`). Styles: faq.css.
18
+ */
19
+ declare function FAQ({ eyebrow, title, children, supportText, supportAction, className, ...rest }: FAQProps): react.JSX.Element;
20
+
21
+ export { FAQ, type FAQProps };
@@ -0,0 +1,24 @@
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
+ function FAQ(_a) {
11
+ var _b = _a, { eyebrow, title, children, supportText, supportAction, className } = _b, rest = __objRest(_b, ["eyebrow", "title", "children", "supportText", "supportAction", "className"]);
12
+ const titleId = useId();
13
+ return /* @__PURE__ */ jsx("section", __spreadProps(__spreadValues({ "aria-labelledby": titleId }, rest), { className: ["rds-block", "rds-faq", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs("div", { className: "rds-block__inner", children: [
14
+ /* @__PURE__ */ jsx(BlockHeading, { eyebrow, title, titleId }),
15
+ /* @__PURE__ */ jsx("div", { className: "rds-faq__questions", children }),
16
+ (supportText || supportAction) && /* @__PURE__ */ jsxs("div", { className: "rds-faq__support", children: [
17
+ supportText && /* @__PURE__ */ jsx("p", { className: "rds-faq__support-text", children: supportText }),
18
+ supportAction
19
+ ] })
20
+ ] }) }));
21
+ }
22
+ export {
23
+ FAQ
24
+ };
@@ -0,0 +1,56 @@
1
+ import * as react from 'react';
2
+ import { ComponentPropsWithRef, ReactNode } from 'react';
3
+ import { FieldTextProps } from './internal/field.js';
4
+
5
+ type FileInputVariant = 'field' | 'dropzone' | 'tile';
6
+ interface FileInputProps extends Omit<FieldTextProps, 'labelPosition'>, Omit<ComponentPropsWithRef<'input'>, 'type' | 'children' | 'prefix' | 'value' | 'defaultValue' | 'size'> {
7
+ /**
8
+ * The shape (Figma: `variant`). field (default): the Input's box, for a dense form. dropzone: a dashed area to drop
9
+ * the file on, when the file is what the screen is about (a receipt, a spreadsheet). tile: a 112 square with the image's
10
+ * preview, for a photo or a logo.
11
+ */
12
+ variant?: FileInputVariant;
13
+ /** Controlled: the name shown (Figma: `fileName`). By default, the chosen file's name. */
14
+ fileName?: string;
15
+ /** Controlled: the size beside the name in the dropzone (Figma: `fileSize`). By default, the chosen file's, as "1,2 MB". */
16
+ fileSize?: string;
17
+ /**
18
+ * tile: the image shown (a URL). Passing it controls the preview, '' for none; by default, the chosen image. Use it
19
+ * for an image that is already saved.
20
+ */
21
+ preview?: string;
22
+ /** tile: the preview's alternative text. By default "Prévia de <label>". */
23
+ previewAlt?: string;
24
+ /** dropzone: the call in the empty area (Figma: `dropTitle`). */
25
+ dropTitle?: ReactNode;
26
+ /** tile: the text of the empty tile (Figma: `tileText`), such as "Enviar logo". */
27
+ tileText?: ReactNode;
28
+ /** The × that takes the file out (Figma: `showClear`). On by default: the person must be able to change the file. */
29
+ clearable?: boolean;
30
+ /** Called after the × takes the file out. */
31
+ onClear?: () => void;
32
+ /** Called with the files chosen or dropped (after `onChange`, which also fires). */
33
+ onFiles?: (files: FileList) => void;
34
+ /** The ×'s accessible name. By default "Remover arquivo" ("Remover imagem" in the tile). */
35
+ clearLabel?: string;
36
+ /** tile: the name of the button that swaps the image. */
37
+ replaceLabel?: string;
38
+ /** field: the text of the box that opens the file chooser. */
39
+ chooseLabel?: string;
40
+ /** field: what the box says before a file is chosen. */
41
+ emptyLabel?: string;
42
+ }
43
+ /** "1,2 MB", "830 KB", "512 B": the size the way a person reads it. */
44
+ declare function formatFileSize(bytes: number): string;
45
+ /**
46
+ * FileInput — Figma [RDS] Forms/FileInput. A file field in three shapes (`variant`): field, the Input's box with the
47
+ * clip, "Escolher arquivo" and the name; dropzone, a dashed area that takes a dragged file; tile, a square with the
48
+ * image's preview and the buttons to swap or remove it. In every shape the native <input type="file"> does the work:
49
+ * it lies transparent over the box, so a click, Enter or Space open the system's chooser, the label names it,
50
+ * `required` and the form get the file. A file dropped on the box goes into that same input. Say the formats and the
51
+ * size in the hint and check them in code (a failure is the errorMessage). Styles: file-input.css and
52
+ * internal/field.css.
53
+ */
54
+ declare function FileInput({ variant, label, hint, error, errorMessage, required, fileName, fileSize, preview, previewAlt, dropTitle, tileText, clearable, onClear, onFiles, clearLabel, replaceLabel, chooseLabel, emptyLabel, id, disabled, className, style, onChange, ref, ...input }: FileInputProps): react.JSX.Element;
55
+
56
+ export { FileInput, type FileInputProps, type FileInputVariant, formatFileSize };
@@ -0,0 +1,244 @@
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 {
9
+ useEffect,
10
+ useRef,
11
+ useState
12
+ } from "react";
13
+ import { FieldAction, FieldShell, hasContent, useFieldIds, warnIfUnlabelled } from "./internal/field.js";
14
+ import { CloseIcon, ImagePlusIcon, PaperclipIcon, UploadIcon } from "./internal/icons.js";
15
+ function formatFileSize(bytes) {
16
+ const units = ["B", "KB", "MB", "GB"];
17
+ let value = bytes;
18
+ let unit = 0;
19
+ while (value >= 1024 && unit < units.length - 1) {
20
+ value /= 1024;
21
+ unit += 1;
22
+ }
23
+ const digits = unit === 0 || value >= 100 ? 0 : 1;
24
+ return `${value.toLocaleString("pt-BR", { maximumFractionDigits: digits })} ${units[unit]}`;
25
+ }
26
+ function FileInput(_a) {
27
+ var _b = _a, {
28
+ variant = "field",
29
+ label,
30
+ hint,
31
+ error,
32
+ errorMessage,
33
+ required,
34
+ fileName,
35
+ fileSize,
36
+ preview,
37
+ previewAlt,
38
+ dropTitle = "Arraste o arquivo ou clique para escolher",
39
+ tileText = "Enviar imagem",
40
+ clearable = true,
41
+ onClear,
42
+ onFiles,
43
+ clearLabel,
44
+ replaceLabel = "Trocar imagem",
45
+ chooseLabel = "Escolher arquivo",
46
+ emptyLabel = "Nenhum arquivo",
47
+ id,
48
+ disabled,
49
+ className,
50
+ style,
51
+ onChange,
52
+ ref
53
+ } = _b, input = __objRest(_b, [
54
+ "variant",
55
+ "label",
56
+ "hint",
57
+ "error",
58
+ "errorMessage",
59
+ "required",
60
+ "fileName",
61
+ "fileSize",
62
+ "preview",
63
+ "previewAlt",
64
+ "dropTitle",
65
+ "tileText",
66
+ "clearable",
67
+ "onClear",
68
+ "onFiles",
69
+ "clearLabel",
70
+ "replaceLabel",
71
+ "chooseLabel",
72
+ "emptyLabel",
73
+ "id",
74
+ "disabled",
75
+ "className",
76
+ "style",
77
+ "onChange",
78
+ "ref"
79
+ ]);
80
+ var _a2, _b2, _c;
81
+ warnIfUnlabelled("FileInput", label, input["aria-label"], input["aria-labelledby"]);
82
+ const inside = variant === "dropzone";
83
+ const ids = useFieldIds(id, inside ? void 0 : hint, error, errorMessage);
84
+ const { controlId, errorId, invalid } = ids;
85
+ const own = useRef(null);
86
+ const [chosen, setChosen] = useState(null);
87
+ const [dragging, setDragging] = useState(false);
88
+ useEffect(() => () => revoke(chosen), [chosen]);
89
+ const shownName = (_a2 = fileName != null ? fileName : chosen == null ? void 0 : chosen.name) != null ? _a2 : "";
90
+ const shownSize = fileSize != null ? fileSize : fileName === void 0 && chosen ? formatFileSize(chosen.size) : void 0;
91
+ const shownPreview = (_b2 = preview != null ? preview : chosen == null ? void 0 : chosen.url) != null ? _b2 : "";
92
+ const filled = variant === "tile" ? Boolean(shownPreview) : Boolean(shownName);
93
+ const showClear = clearable && filled && !disabled;
94
+ const insideHintId = inside && hasContent(hint) && !filled ? `${controlId}-hint` : void 0;
95
+ const describedBy = [inside ? insideHintId : ids.hintId, errorId, input["aria-describedby"]].filter(Boolean).join(" ") || void 0;
96
+ const removeName = clearLabel != null ? clearLabel : variant === "tile" ? "Remover imagem" : "Remover arquivo";
97
+ function change(event) {
98
+ const files = event.target.files;
99
+ if (!(files == null ? void 0 : files.length)) {
100
+ setChosen(null);
101
+ } else {
102
+ const size = Array.from(files).reduce((sum, file) => sum + file.size, 0);
103
+ const first = files[0];
104
+ const url = variant === "tile" && first.type.startsWith("image/") && typeof URL.createObjectURL === "function" ? URL.createObjectURL(first) : void 0;
105
+ setChosen({ name: files.length === 1 ? first.name : `${files.length} arquivos`, size, url });
106
+ }
107
+ onChange == null ? void 0 : onChange(event);
108
+ if (files == null ? void 0 : files.length) onFiles == null ? void 0 : onFiles(files);
109
+ }
110
+ function setRef(node) {
111
+ own.current = node;
112
+ if (typeof ref === "function") ref(node);
113
+ else if (ref) ref.current = node;
114
+ }
115
+ function clear() {
116
+ var _a3;
117
+ if (own.current) own.current.value = "";
118
+ setChosen(null);
119
+ onClear == null ? void 0 : onClear();
120
+ (_a3 = own.current) == null ? void 0 : _a3.focus();
121
+ }
122
+ function drop(event) {
123
+ var _a3;
124
+ event.preventDefault();
125
+ setDragging(false);
126
+ const target = own.current;
127
+ const files = (_a3 = event.dataTransfer) == null ? void 0 : _a3.files;
128
+ if (disabled || !target || !(files == null ? void 0 : files.length)) return;
129
+ if (input.multiple || files.length === 1) {
130
+ target.files = files;
131
+ } else {
132
+ const one = new DataTransfer();
133
+ one.items.add(files[0]);
134
+ target.files = one.files;
135
+ }
136
+ target.dispatchEvent(new Event("change", { bubbles: true }));
137
+ }
138
+ const boxProps = {
139
+ onDragEnter: (event) => {
140
+ event.preventDefault();
141
+ if (!disabled) setDragging(true);
142
+ },
143
+ onDragOver: (event) => {
144
+ event.preventDefault();
145
+ if (event.dataTransfer) event.dataTransfer.dropEffect = disabled ? "none" : "copy";
146
+ },
147
+ onDragLeave: (event) => {
148
+ if (!event.currentTarget.contains(event.relatedTarget)) setDragging(false);
149
+ },
150
+ onDrop: drop
151
+ };
152
+ const covered = !(variant === "tile" && filled);
153
+ const control = /* @__PURE__ */ jsx(
154
+ "input",
155
+ __spreadProps(__spreadValues({}, input), {
156
+ ref: setRef,
157
+ id: controlId,
158
+ type: "file",
159
+ accept: (_c = input.accept) != null ? _c : variant === "tile" ? "image/*" : void 0,
160
+ className: ["rds-field__control", "rds-file-input__control", !covered && "rds-file-input__control--off"].filter(Boolean).join(" "),
161
+ tabIndex: covered ? input.tabIndex : -1,
162
+ required,
163
+ disabled,
164
+ "aria-invalid": invalid || void 0,
165
+ "aria-describedby": describedBy,
166
+ onChange: change
167
+ })
168
+ );
169
+ const clearButton = showClear && /* @__PURE__ */ jsx(FieldAction, { label: removeName, icon: /* @__PURE__ */ jsx(CloseIcon, {}), onClick: clear });
170
+ let face;
171
+ if (variant === "dropzone") {
172
+ face = filled ? /* @__PURE__ */ jsxs("span", { className: "rds-file-input__file", children: [
173
+ /* @__PURE__ */ jsx("span", { className: "rds-file-input__circle", "aria-hidden": "true", children: /* @__PURE__ */ jsx(PaperclipIcon, {}) }),
174
+ /* @__PURE__ */ jsxs("span", { className: "rds-file-input__file-texts", "aria-hidden": "true", children: [
175
+ /* @__PURE__ */ jsx("span", { className: "rds-file-input__file-name", children: shownName }),
176
+ shownSize && /* @__PURE__ */ jsx("span", { className: "rds-file-input__caption", children: shownSize })
177
+ ] }),
178
+ clearButton
179
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
180
+ /* @__PURE__ */ jsx("span", { className: "rds-file-input__circle", "aria-hidden": "true", children: /* @__PURE__ */ jsx(UploadIcon, {}) }),
181
+ /* @__PURE__ */ jsxs("span", { className: "rds-file-input__texts", children: [
182
+ /* @__PURE__ */ jsx("span", { className: "rds-file-input__title", "aria-hidden": "true", children: dropTitle }),
183
+ hasContent(hint) && /* @__PURE__ */ jsx("span", { id: insideHintId, className: "rds-file-input__caption", children: hint })
184
+ ] })
185
+ ] });
186
+ } else if (variant === "tile") {
187
+ face = filled ? /* @__PURE__ */ jsx("img", { className: "rds-file-input__preview", src: shownPreview, alt: previewAlt != null ? previewAlt : typeof label === "string" ? `Pr\xE9via de ${label}` : "Pr\xE9via" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
188
+ /* @__PURE__ */ jsx("span", { className: "rds-file-input__tile-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ImagePlusIcon, {}) }),
189
+ /* @__PURE__ */ jsx("span", { className: "rds-file-input__tile-text", "aria-hidden": "true", children: tileText })
190
+ ] });
191
+ } else {
192
+ face = /* @__PURE__ */ jsxs(Fragment, { children: [
193
+ /* @__PURE__ */ jsx("span", { className: "rds-field__icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(PaperclipIcon, {}) }),
194
+ /* @__PURE__ */ jsxs("span", { className: "rds-file-input__face", "aria-hidden": "true", children: [
195
+ /* @__PURE__ */ jsx("span", { className: "rds-file-input__choose", children: chooseLabel }),
196
+ /* @__PURE__ */ jsx("span", { className: ["rds-file-input__name", !shownName && "rds-file-input__name--empty"].filter(Boolean).join(" "), children: shownName || emptyLabel })
197
+ ] })
198
+ ] });
199
+ }
200
+ const boxClassName = [
201
+ variant === "field" && showClear && "rds-field__box--action",
202
+ variant === "dropzone" && "rds-file-input__area",
203
+ variant === "tile" && "rds-file-input__area rds-file-input__tile",
204
+ variant !== "field" && filled && "rds-file-input__area--filled",
205
+ variant !== "field" && dragging && "rds-file-input__area--dragging"
206
+ ].filter(Boolean).join(" ");
207
+ return /* @__PURE__ */ jsxs(
208
+ FieldShell,
209
+ {
210
+ kind: `rds-file-input rds-file-input--${variant}`,
211
+ controlId,
212
+ hintId: inside ? void 0 : ids.hintId,
213
+ errorId,
214
+ label,
215
+ hint: inside ? void 0 : hint,
216
+ errorMessage,
217
+ invalid,
218
+ required,
219
+ disabled,
220
+ boxClassName: boxClassName || void 0,
221
+ boxProps: variant === "field" ? void 0 : boxProps,
222
+ className,
223
+ style,
224
+ children: [
225
+ face,
226
+ control,
227
+ variant === "tile" ? filled && !disabled && /* @__PURE__ */ jsxs("span", { className: "rds-file-input__actions", children: [
228
+ /* @__PURE__ */ jsx(FieldAction, { label: replaceLabel, icon: /* @__PURE__ */ jsx(UploadIcon, {}), onClick: () => {
229
+ var _a3;
230
+ return (_a3 = own.current) == null ? void 0 : _a3.click();
231
+ } }),
232
+ clearButton
233
+ ] }) : variant === "field" && clearButton
234
+ ]
235
+ }
236
+ );
237
+ }
238
+ function revoke(chosen) {
239
+ if ((chosen == null ? void 0 : chosen.url) && typeof URL.revokeObjectURL === "function") URL.revokeObjectURL(chosen.url);
240
+ }
241
+ export {
242
+ FileInput,
243
+ formatFileSize
244
+ };
@@ -1,54 +1,41 @@
1
1
  import * as react from 'react';
2
+ import { ComponentPropsWithRef, ReactNode, HTMLAttributes } from 'react';
2
3
 
3
- interface FilterChipBaseProps {
4
- label: string;
5
- active: boolean;
6
- count?: number;
4
+ interface FilterChipProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
5
+ /** The filter's name (Figma: `label`): Todos, Entradas, Saídas. With `asChild`, the link goes here with it. */
6
+ children: ReactNode;
7
+ /** How many items the filter leaves, after the label (Figma: `hasCount` + `count`). */
8
+ count?: ReactNode;
9
+ /** An icon before the label, in the label's colour (Figma: `showIcon` + `icon`). Decorative. */
10
+ icon?: ReactNode;
11
+ /** Controlled: the filter is on (Figma: state=active). */
12
+ active?: boolean;
13
+ /** Uncontrolled: on at first. */
14
+ defaultActive?: boolean;
15
+ /** Called with the new state when the chip is pressed (a button, not a link). */
16
+ onActiveChange?: (active: boolean) => void;
17
+ /** Rendered as aria-disabled="true": stays in the tab order and takes focus, but does not turn on or navigate. */
7
18
  disabled?: boolean;
8
- className?: string;
9
- }
10
- interface FilterChipLinkProps extends FilterChipBaseProps {
11
- href: string;
12
- onClick?: never;
13
- }
14
- interface FilterChipButtonProps extends FilterChipBaseProps {
15
- onClick: () => void;
16
- href?: never;
17
- }
18
- type FilterChipProps = FilterChipLinkProps | FilterChipButtonProps;
19
- declare function FilterChip({ label, active, count, disabled, href, onClick, className }: FilterChipProps): react.JSX.Element;
20
- type FilterChipItem = {
21
- label: string;
22
- value: string | undefined;
23
- count?: number;
24
- href?: string;
25
- onClick?: () => void;
26
- disabled?: boolean;
27
- };
28
- interface FilterChipGroupProps {
29
- items: FilterChipItem[];
30
- active: string | undefined;
31
- label: string;
32
- className?: string;
19
+ /**
20
+ * Render the single child element (an `<a>`, a framework `Link`) with the chip's classes, for a filter that
21
+ * lives in the URL and should survive back/forward. The link gets aria-current when active.
22
+ */
23
+ asChild?: boolean;
33
24
  }
34
25
  /**
35
- * FilterChipGroup — barra de filtro com pills.
36
- *
37
- * Regra: ≤ 5 opções. Mais que isso → usar Select.
38
- * Renderiza como links (href) para preservar URL e back/forward,
39
- * ou como buttons (onClick) para filtro client-side.
40
- *
41
- * @example
42
- * <FilterChipGroup
43
- * label="Filtrar por tipo"
44
- * items={[
45
- * { label: 'Todos', value: undefined, href: '/stock' },
46
- * { label: 'Entradas', value: 'in', href: '/stock?filter=in' },
47
- * { label: 'Saídas', value: 'out', href: '/stock?filter=out' },
48
- * ]}
49
- * active={searchParams.filter}
50
- * />
26
+ * FilterChip — Figma [RDS] Forms/FilterChip. A pill that turns a cut of the list on (Todos, Entradas, Saídas).
27
+ * A button with aria-pressed, or, with `asChild`, a link with aria-current. Off: card fill, hairline; on: the
28
+ * brand tint, brand border and label. Up to 5 in a FilterChipGroup; more than that, the Select. A value that can
29
+ * be removed is the Chip. Styles: filter-chip.css.
51
30
  */
52
- declare function FilterChipGroup({ items, active, label, className }: FilterChipGroupProps): react.JSX.Element;
31
+ declare function FilterChip({ children, count, icon, active, defaultActive, onActiveChange, disabled, asChild, type, className, onClick, ...rest }: FilterChipProps): react.JSX.Element;
32
+ interface FilterChipGroupProps extends HTMLAttributes<HTMLDivElement> {
33
+ /** Required: what the filters cut, such as "Filtrar por tipo". Several groups on a page must be told apart. */
34
+ 'aria-label': string;
35
+ /** The FilterChips, up to 5. */
36
+ children: ReactNode;
37
+ }
38
+ /** The row of FilterChips: a named group, 8 apart, wrapping on a narrow screen. */
39
+ declare function FilterChipGroup({ className, children, ...rest }: FilterChipGroupProps): react.JSX.Element;
53
40
 
54
- export { FilterChip, FilterChipGroup, type FilterChipGroupProps, type FilterChipItem, type FilterChipProps };
41
+ export { FilterChip, FilterChipGroup, type FilterChipGroupProps, type FilterChipProps };