@rojaostudio/ds 1.0.2 → 2.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/README.md +75 -13
  2. package/dist/compat/generate.d.ts +0 -1
  3. package/dist/components/accordion.d.ts +30 -20
  4. package/dist/components/accordion.js +31 -93
  5. package/dist/components/action-bar.d.ts +24 -0
  6. package/dist/components/action-bar.js +55 -0
  7. package/dist/components/alert-dialog.d.ts +31 -0
  8. package/dist/components/alert-dialog.js +43 -0
  9. package/dist/components/alert.d.ts +31 -19
  10. package/dist/components/alert.js +67 -65
  11. package/dist/components/attachment.d.ts +37 -0
  12. package/dist/components/attachment.js +76 -0
  13. package/dist/components/avatar.d.ts +43 -36
  14. package/dist/components/avatar.js +59 -90
  15. package/dist/components/badge.d.ts +30 -41
  16. package/dist/components/badge.js +13 -110
  17. package/dist/components/banner.d.ts +27 -0
  18. package/dist/components/banner.js +66 -0
  19. package/dist/components/benefits.d.ts +30 -0
  20. package/dist/components/benefits.js +32 -0
  21. package/dist/components/breadcrumb.d.ts +25 -18
  22. package/dist/components/breadcrumb.js +38 -56
  23. package/dist/components/browser.d.ts +18 -0
  24. package/dist/components/browser.js +32 -0
  25. package/dist/components/bubble.d.ts +29 -0
  26. package/dist/components/bubble.js +33 -0
  27. package/dist/components/button-group.d.ts +19 -0
  28. package/dist/components/button-group.js +20 -0
  29. package/dist/components/button.d.ts +47 -20
  30. package/dist/components/button.js +45 -108
  31. package/dist/components/calendar.d.ts +29 -0
  32. package/dist/components/calendar.js +149 -0
  33. package/dist/components/card.d.ts +47 -19
  34. package/dist/components/card.js +31 -46
  35. package/dist/components/carousel.d.ts +28 -0
  36. package/dist/components/carousel.js +130 -0
  37. package/dist/components/chart.d.ts +49 -0
  38. package/dist/components/chart.js +258 -0
  39. package/dist/components/checkbox-group.d.ts +16 -0
  40. package/dist/components/checkbox-group.js +13 -0
  41. package/dist/components/checkbox.d.ts +25 -10
  42. package/dist/components/checkbox.js +87 -81
  43. package/dist/components/chip-input.d.ts +46 -20
  44. package/dist/components/chip-input.js +172 -176
  45. package/dist/components/chip.d.ts +28 -0
  46. package/dist/components/chip.js +73 -0
  47. package/dist/components/choice-card.d.ts +10 -13
  48. package/dist/components/choice-card.js +11 -62
  49. package/dist/components/choice-carousel.d.ts +9 -0
  50. package/dist/components/choice-carousel.js +28 -44
  51. package/dist/components/choice-preview-card.d.ts +10 -20
  52. package/dist/components/choice-preview-card.js +12 -40
  53. package/dist/components/color-input.d.ts +36 -11
  54. package/dist/components/color-input.js +131 -59
  55. package/dist/components/combobox.d.ts +60 -57
  56. package/dist/components/combobox.js +210 -213
  57. package/dist/components/command.d.ts +58 -0
  58. package/dist/components/command.js +177 -0
  59. package/dist/components/contact.d.ts +23 -0
  60. package/dist/components/contact.js +32 -0
  61. package/dist/components/context-menu.d.ts +34 -26
  62. package/dist/components/context-menu.js +41 -68
  63. package/dist/components/copy-field.d.ts +10 -5
  64. package/dist/components/copy-field.js +24 -29
  65. package/dist/components/currency-input.d.ts +25 -11
  66. package/dist/components/currency-input.js +29 -65
  67. package/dist/components/danger-zone.d.ts +10 -1
  68. package/dist/components/danger-zone.js +14 -18
  69. package/dist/components/data-table-header.d.ts +13 -2
  70. package/dist/components/data-table-header.js +114 -190
  71. package/dist/components/date-picker.d.ts +31 -32
  72. package/dist/components/date-picker.js +119 -254
  73. package/dist/components/delta.d.ts +26 -0
  74. package/dist/components/delta.js +24 -0
  75. package/dist/components/dialog.d.ts +21 -0
  76. package/dist/components/dialog.js +16 -0
  77. package/dist/components/drawer.d.ts +15 -23
  78. package/dist/components/drawer.js +57 -89
  79. package/dist/components/dropdown-menu.d.ts +63 -0
  80. package/dist/components/dropdown-menu.js +62 -0
  81. package/dist/components/dropzone.d.ts +10 -4
  82. package/dist/components/dropzone.js +30 -58
  83. package/dist/components/empty.d.ts +29 -0
  84. package/dist/components/empty.js +42 -0
  85. package/dist/components/fab.d.ts +29 -6
  86. package/dist/components/fab.js +51 -51
  87. package/dist/components/faq.d.ts +21 -0
  88. package/dist/components/faq.js +24 -0
  89. package/dist/components/file-input.d.ts +56 -0
  90. package/dist/components/file-input.js +244 -0
  91. package/dist/components/filter-chip.d.ts +34 -47
  92. package/dist/components/filter-chip.js +61 -61
  93. package/dist/components/floating-stepper.d.ts +7 -18
  94. package/dist/components/floating-stepper.js +27 -55
  95. package/dist/components/footer.d.ts +36 -0
  96. package/dist/components/footer.js +38 -0
  97. package/dist/components/form-actions.d.ts +28 -0
  98. package/dist/components/form-actions.js +24 -0
  99. package/dist/components/google-account-chooser.d.ts +25 -0
  100. package/dist/components/google-account-chooser.js +44 -0
  101. package/dist/components/google-button.d.ts +26 -0
  102. package/dist/components/google-button.js +38 -0
  103. package/dist/components/google-consent.d.ts +23 -0
  104. package/dist/components/google-consent.js +28 -0
  105. package/dist/components/google-sign-in.d.ts +26 -0
  106. package/dist/components/google-sign-in.js +36 -0
  107. package/dist/components/hover-card.d.ts +30 -0
  108. package/dist/components/hover-card.js +55 -0
  109. package/dist/components/icon-button.d.ts +41 -11
  110. package/dist/components/icon-button.js +44 -64
  111. package/dist/components/image-crop-modal.d.ts +3 -3
  112. package/dist/components/image-crop-modal.js +32 -39
  113. package/dist/components/image-upload.d.ts +21 -29
  114. package/dist/components/image-upload.js +55 -259
  115. package/dist/components/index.d.ts +105 -49
  116. package/dist/components/index.js +190 -68
  117. package/dist/components/input-otp.d.ts +35 -0
  118. package/dist/components/input-otp.js +119 -0
  119. package/dist/components/input.d.ts +23 -17
  120. package/dist/components/input.js +104 -137
  121. package/dist/components/insight-card.d.ts +25 -9
  122. package/dist/components/insight-card.js +42 -27
  123. package/dist/components/internal/announce.d.ts +3 -0
  124. package/dist/components/internal/announce.js +20 -0
  125. package/dist/components/internal/block.d.ts +15 -0
  126. package/dist/components/internal/block.js +14 -0
  127. package/dist/components/internal/button.d.ts +23 -0
  128. package/dist/components/internal/button.js +30 -0
  129. package/dist/components/internal/choice-card.d.ts +52 -0
  130. package/dist/components/internal/choice-card.js +117 -0
  131. package/dist/components/internal/choice.d.ts +25 -0
  132. package/dist/components/internal/choice.js +44 -0
  133. package/dist/components/internal/dates.d.ts +17 -0
  134. package/dist/components/internal/dates.js +59 -0
  135. package/dist/components/internal/field.d.ts +66 -0
  136. package/dist/components/internal/field.js +105 -0
  137. package/dist/components/internal/fieldset.d.ts +25 -0
  138. package/dist/components/internal/fieldset.js +56 -0
  139. package/dist/components/internal/focus-after.d.ts +3 -0
  140. package/dist/components/internal/focus-after.js +13 -0
  141. package/dist/components/internal/google.d.ts +47 -0
  142. package/dist/components/internal/google.js +73 -0
  143. package/dist/components/internal/icons.d.ts +108 -0
  144. package/dist/components/internal/icons.js +316 -0
  145. package/dist/components/internal/menu.d.ts +16 -0
  146. package/dist/components/internal/menu.js +14 -0
  147. package/dist/components/internal/modal.d.ts +50 -0
  148. package/dist/components/internal/modal.js +85 -0
  149. package/dist/components/internal/option-content.d.ts +10 -0
  150. package/dist/components/internal/option-content.js +13 -0
  151. package/dist/components/internal/radio-context.d.ts +16 -0
  152. package/dist/components/internal/radio-context.js +6 -0
  153. package/dist/components/internal/toggle.d.ts +7 -0
  154. package/dist/components/internal/toggle.js +13 -0
  155. package/dist/components/internal/use-listbox.d.ts +56 -0
  156. package/dist/components/internal/use-listbox.js +69 -0
  157. package/dist/components/internal/whatsapp.d.ts +8 -0
  158. package/dist/components/internal/whatsapp.js +12 -0
  159. package/dist/components/item.d.ts +32 -0
  160. package/dist/components/item.js +35 -0
  161. package/dist/components/kbd.d.ts +17 -0
  162. package/dist/components/kbd.js +18 -0
  163. package/dist/components/listbox.d.ts +34 -0
  164. package/dist/components/listbox.js +114 -0
  165. package/dist/components/marker.d.ts +24 -0
  166. package/dist/components/marker.js +28 -0
  167. package/dist/components/media-tile.d.ts +17 -14
  168. package/dist/components/media-tile.js +19 -27
  169. package/dist/components/message-scroller.d.ts +20 -0
  170. package/dist/components/message-scroller.js +108 -0
  171. package/dist/components/message.d.ts +33 -0
  172. package/dist/components/message.js +23 -0
  173. package/dist/components/navigation-menu.d.ts +42 -0
  174. package/dist/components/navigation-menu.js +30 -0
  175. package/dist/components/newsletter.d.ts +27 -0
  176. package/dist/components/newsletter.js +75 -0
  177. package/dist/components/number-input.d.ts +60 -0
  178. package/dist/components/number-input.js +234 -0
  179. package/dist/components/option-tile.d.ts +20 -19
  180. package/dist/components/option-tile.js +52 -137
  181. package/dist/components/page-header.d.ts +31 -0
  182. package/dist/components/page-header.js +25 -0
  183. package/dist/components/page-shell.d.ts +11 -1
  184. package/dist/components/page-shell.js +8 -34
  185. package/dist/components/page-skeleton.d.ts +15 -21
  186. package/dist/components/page-skeleton.js +28 -25
  187. package/dist/components/pagination.d.ts +32 -22
  188. package/dist/components/pagination.js +78 -76
  189. package/dist/components/password-input.d.ts +26 -0
  190. package/dist/components/password-input.js +112 -0
  191. package/dist/components/phone-input.d.ts +12 -8
  192. package/dist/components/phone-input.js +75 -64
  193. package/dist/components/phone.d.ts +27 -0
  194. package/dist/components/phone.js +35 -0
  195. package/dist/components/popover.d.ts +25 -36
  196. package/dist/components/popover.js +30 -131
  197. package/dist/components/pricing-card.d.ts +9 -25
  198. package/dist/components/pricing-card.js +9 -40
  199. package/dist/components/pricing.d.ts +48 -0
  200. package/dist/components/pricing.js +64 -0
  201. package/dist/components/progress.d.ts +30 -0
  202. package/dist/components/progress.js +57 -0
  203. package/dist/components/qr-display.d.ts +11 -6
  204. package/dist/components/qr-display.js +6 -22
  205. package/dist/components/questionnaire.d.ts +42 -0
  206. package/dist/components/questionnaire.js +107 -0
  207. package/dist/components/radio-group.d.ts +21 -0
  208. package/dist/components/radio-group.js +40 -0
  209. package/dist/components/radio.d.ts +15 -29
  210. package/dist/components/radio.js +45 -103
  211. package/dist/components/row-actions.d.ts +5 -0
  212. package/dist/components/row-actions.js +27 -34
  213. package/dist/components/saving-bar-context.d.ts +0 -5
  214. package/dist/components/saving-bar-context.js +16 -40
  215. package/dist/components/saving-bar.d.ts +26 -11
  216. package/dist/components/saving-bar.js +50 -65
  217. package/dist/components/section-card.d.ts +18 -4
  218. package/dist/components/section-card.js +29 -50
  219. package/dist/components/section-header.d.ts +8 -12
  220. package/dist/components/section-header.js +5 -10
  221. package/dist/components/select.d.ts +44 -16
  222. package/dist/components/select.js +83 -154
  223. package/dist/components/selectable-card.d.ts +11 -19
  224. package/dist/components/selectable-card.js +4 -28
  225. package/dist/components/separator.d.ts +20 -0
  226. package/dist/components/separator.js +19 -0
  227. package/dist/components/setting-row.d.ts +11 -15
  228. package/dist/components/setting-row.js +10 -23
  229. package/dist/components/settings-list.d.ts +10 -12
  230. package/dist/components/settings-list.js +7 -19
  231. package/dist/components/sheet.d.ts +21 -0
  232. package/dist/components/sheet.js +16 -0
  233. package/dist/components/sidebar.d.ts +79 -0
  234. package/dist/components/sidebar.js +111 -0
  235. package/dist/components/skeleton.d.ts +14 -20
  236. package/dist/components/skeleton.js +8 -37
  237. package/dist/components/slider.d.ts +21 -23
  238. package/dist/components/slider.js +59 -64
  239. package/dist/components/sparkline.d.ts +19 -0
  240. package/dist/components/sparkline.js +32 -0
  241. package/dist/components/spinner.d.ts +16 -8
  242. package/dist/components/spinner.js +34 -37
  243. package/dist/components/star-rating.d.ts +22 -0
  244. package/dist/components/star-rating.js +25 -0
  245. package/dist/components/stat.d.ts +33 -0
  246. package/dist/components/stat.js +29 -0
  247. package/dist/components/status.d.ts +27 -0
  248. package/dist/components/status.js +34 -0
  249. package/dist/components/step-progress.d.ts +13 -6
  250. package/dist/components/step-progress.js +18 -16
  251. package/dist/components/summary-bar.d.ts +20 -20
  252. package/dist/components/summary-bar.js +13 -55
  253. package/dist/components/switch.d.ts +20 -0
  254. package/dist/components/switch.js +46 -0
  255. package/dist/components/table.d.ts +56 -17
  256. package/dist/components/table.js +59 -58
  257. package/dist/components/tabs.d.ts +67 -0
  258. package/dist/components/tabs.js +56 -0
  259. package/dist/components/testimonial.d.ts +30 -0
  260. package/dist/components/testimonial.js +36 -0
  261. package/dist/components/textarea.d.ts +11 -16
  262. package/dist/components/textarea.js +55 -91
  263. package/dist/components/tile.d.ts +24 -0
  264. package/dist/components/tile.js +21 -0
  265. package/dist/components/time-picker.d.ts +40 -25
  266. package/dist/components/time-picker.js +185 -203
  267. package/dist/components/toast.d.ts +63 -0
  268. package/dist/components/toast.js +132 -0
  269. package/dist/components/toggle-card-compact.d.ts +15 -5
  270. package/dist/components/toggle-card-compact.js +19 -86
  271. package/dist/components/toggle-card.d.ts +11 -2
  272. package/dist/components/toggle-card.js +8 -77
  273. package/dist/components/toggle-group.d.ts +21 -59
  274. package/dist/components/toggle-group.js +31 -80
  275. package/dist/components/toggle.d.ts +19 -9
  276. package/dist/components/toggle.js +16 -61
  277. package/dist/components/tooltip.d.ts +25 -12
  278. package/dist/components/tooltip.js +15 -88
  279. package/dist/components/top-navigation.d.ts +33 -0
  280. package/dist/components/top-navigation.js +85 -0
  281. package/dist/components/typing-indicator.d.ts +6 -0
  282. package/dist/components/typing-indicator.js +3 -24
  283. package/dist/components/whatsapp-chat.d.ts +28 -0
  284. package/dist/components/whatsapp-chat.js +95 -0
  285. package/dist/components/whatsapp-message.d.ts +22 -0
  286. package/dist/components/whatsapp-message.js +34 -0
  287. package/dist/components/whatsapp-notification.d.ts +27 -0
  288. package/dist/components/whatsapp-notification.js +73 -0
  289. package/dist/components/whatsapp-template.d.ts +42 -0
  290. package/dist/components/whatsapp-template.js +69 -0
  291. package/dist/icons/index.d.ts +2 -0
  292. package/dist/icons/index.js +2 -0
  293. package/dist/icons/pix.d.ts +16 -0
  294. package/dist/targets/native/components/index.d.ts +0 -2
  295. package/dist/targets/native/components/index.js +0 -4
  296. package/dist/targets/native/preset.cjs +0 -1
  297. package/dist/targets/native/theme.css +58 -60
  298. package/dist/targets/native/theme.d.ts +58 -60
  299. package/dist/targets/native/theme.js +58 -60
  300. package/package.json +34 -12
  301. package/styles/_primitives.generated.css +40 -0
  302. package/styles/base.css +12 -18
  303. package/styles/rds/components-styles.css +11365 -0
  304. package/styles/rds/components.css +993 -0
  305. package/styles/rds/foundation.css +74 -0
  306. package/styles/rds/theme.css +261 -0
  307. package/styles/rds.css +6 -0
  308. package/styles/themes/rojao.css +46 -53
  309. package/dist/components/blocker-card.d.ts +0 -42
  310. package/dist/components/blocker-card.js +0 -54
  311. package/dist/components/bottom-sheet.d.ts +0 -31
  312. package/dist/components/bottom-sheet.js +0 -127
  313. package/dist/components/chat-bubble.d.ts +0 -16
  314. package/dist/components/chat-bubble.js +0 -56
  315. package/dist/components/chips.d.ts +0 -22
  316. package/dist/components/chips.js +0 -101
  317. package/dist/components/copilot-hint.d.ts +0 -18
  318. package/dist/components/copilot-hint.js +0 -72
  319. package/dist/components/divider.d.ts +0 -20
  320. package/dist/components/divider.js +0 -50
  321. package/dist/components/empty-state.d.ts +0 -48
  322. package/dist/components/empty-state.js +0 -94
  323. package/dist/components/form-card-header.d.ts +0 -13
  324. package/dist/components/form-card-header.js +0 -16
  325. package/dist/components/label.d.ts +0 -16
  326. package/dist/components/label.js +0 -48
  327. package/dist/components/menu.d.ts +0 -50
  328. package/dist/components/menu.js +0 -83
  329. package/dist/components/modal.d.ts +0 -25
  330. package/dist/components/modal.js +0 -86
  331. package/dist/components/notice.d.ts +0 -50
  332. package/dist/components/notice.js +0 -121
  333. package/dist/components/page-tabs.d.ts +0 -35
  334. package/dist/components/page-tabs.js +0 -68
  335. package/dist/components/paywall-banner.d.ts +0 -37
  336. package/dist/components/paywall-banner.js +0 -58
  337. package/dist/components/paywall.d.ts +0 -44
  338. package/dist/components/paywall.js +0 -65
  339. package/dist/components/phone-frame.d.ts +0 -9
  340. package/dist/components/phone-frame.js +0 -19
  341. package/dist/components/pix-icon.d.ts +0 -8
  342. package/dist/components/search.d.ts +0 -30
  343. package/dist/components/search.js +0 -86
  344. package/dist/components/themed.d.ts +0 -36
  345. package/dist/components/themed.js +0 -23
  346. package/dist/components/toaster.d.ts +0 -84
  347. package/dist/components/toaster.js +0 -290
  348. package/dist/components/use-dismiss.d.ts +0 -9
  349. package/dist/components/use-dismiss.js +0 -28
  350. package/dist/components/use-focus-trap.d.ts +0 -5
  351. package/dist/components/use-focus-trap.js +0 -54
  352. package/dist/targets/native/components/paywall-banner.d.ts +0 -11
  353. package/dist/targets/native/components/paywall-banner.js +0 -55
  354. package/dist/targets/native/components/paywall.d.ts +0 -18
  355. package/dist/targets/native/components/paywall.js +0 -71
  356. /package/dist/{components/pix-icon.js → icons/pix.js} +0 -0
@@ -1,73 +1,58 @@
1
1
  "use client";
2
- import "../chunk-ORMEWXMH.js";
2
+ import {
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues
6
+ } from "../chunk-ORMEWXMH.js";
3
7
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Loader2 } from "lucide-react";
5
- function SavingBar({
6
- visible,
7
- onSave,
8
- onDiscard,
9
- pending = false,
10
- saveLabel = "Salvar",
11
- discardLabel = "Descartar",
12
- message,
13
- children,
14
- variant = "floating"
15
- }) {
16
- const pill = /* @__PURE__ */ jsxs(
8
+ import { Button } from "./button.js";
9
+ import { Loader } from "./internal/button.js";
10
+ import { AlertIcon } from "./internal/icons.js";
11
+ function SavingBar(_a) {
12
+ var _b = _a, {
13
+ status = "unsaved",
14
+ message = "Altera\xE7\xF5es n\xE3o salvas",
15
+ savingMessage = "Salvando\u2026",
16
+ errorMessage = "N\xE3o salvou. Tente de novo.",
17
+ onSave,
18
+ onDiscard,
19
+ saveLabel = "Salvar",
20
+ retryLabel = "Tentar de novo",
21
+ discardLabel = "Descartar",
22
+ className
23
+ } = _b, rest = __objRest(_b, [
24
+ "status",
25
+ "message",
26
+ "savingMessage",
27
+ "errorMessage",
28
+ "onSave",
29
+ "onDiscard",
30
+ "saveLabel",
31
+ "retryLabel",
32
+ "discardLabel",
33
+ "className"
34
+ ]);
35
+ const saving = status === "saving";
36
+ const error = status === "error";
37
+ return /* @__PURE__ */ jsxs(
17
38
  "div",
18
- {
19
- className: [
20
- "flex items-center gap-3 rounded-(--radius-card) px-4 py-3",
21
- "[background:var(--saving-bar-bg)]",
22
- variant === "floating" ? "[box-shadow:var(--saving-bar-shadow)]" : ""
23
- ].filter(Boolean).join(" "),
39
+ __spreadProps(__spreadValues({
40
+ role: "region",
41
+ "aria-label": "Salvar altera\xE7\xF5es"
42
+ }, rest), {
43
+ className: ["rds-savingbar", className].filter(Boolean).join(" "),
24
44
  children: [
25
- message && /* @__PURE__ */ jsx("span", { className: "text-label pr-1 [color:var(--saving-bar-message)]", children: message }),
26
- children,
27
- onDiscard && /* @__PURE__ */ jsx(
28
- "button",
29
- {
30
- type: "button",
31
- onClick: onDiscard,
32
- disabled: pending,
33
- className: "rounded-(--radius-card) border px-3 py-1.5 text-label font-medium transition-colors disabled:opacity-40 [border-color:var(--saving-bar-discard-border)] [color:var(--saving-bar-discard-text)] hover:[border-color:var(--saving-bar-discard-border-hover)] hover:[color:var(--saving-bar-discard-text-hover)]",
34
- children: discardLabel
35
- }
36
- ),
37
- onSave && /* @__PURE__ */ jsx(
38
- "button",
39
- {
40
- type: "button",
41
- onClick: onSave,
42
- disabled: pending,
43
- className: "rounded-(--radius-card) px-4 py-1.5 text-label font-medium transition-colors disabled:opacity-50 flex items-center gap-2 min-w-[80px] justify-center [background:var(--saving-bar-save-bg)] [color:var(--saving-bar-save-text)] hover:[background:var(--saving-bar-save-bg-hover)]",
44
- children: pending ? /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin" }) : saveLabel
45
- }
46
- )
45
+ /* @__PURE__ */ jsxs("p", { className: "rds-savingbar__message", role: "status", children: [
46
+ saving && /* @__PURE__ */ jsx("span", { className: "rds-savingbar__icon rds-savingbar__loader", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Loader, {}) }),
47
+ error && /* @__PURE__ */ jsx("span", { className: "rds-savingbar__icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(AlertIcon, {}) }),
48
+ /* @__PURE__ */ jsx("span", { children: saving ? savingMessage : error ? errorMessage : message })
49
+ ] }),
50
+ /* @__PURE__ */ jsxs("div", { className: "rds-savingbar__actions", children: [
51
+ onDiscard && /* @__PURE__ */ jsx(Button, { tone: "inverse", variant: "ghost", disabled: saving, onClick: onDiscard, children: discardLabel }),
52
+ /* @__PURE__ */ jsx(Button, { tone: "inverse", variant: "fill", disabled: saving, onClick: onSave, children: error ? retryLabel : saveLabel })
53
+ ] })
47
54
  ]
48
- }
49
- );
50
- if (variant === "inline") {
51
- return /* @__PURE__ */ jsx(
52
- "div",
53
- {
54
- className: [
55
- "flex justify-end mt-8 transition-all duration-300 ease-out",
56
- visible ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"
57
- ].join(" "),
58
- children: pill
59
- }
60
- );
61
- }
62
- return /* @__PURE__ */ jsx(
63
- "div",
64
- {
65
- className: [
66
- "fixed bottom-3 right-6 z-50 transition-all duration-300 ease-out",
67
- visible ? "translate-y-0 opacity-100 pointer-events-auto" : "translate-y-4 opacity-0 pointer-events-none"
68
- ].join(" "),
69
- children: pill
70
- }
55
+ })
71
56
  );
72
57
  }
73
58
  export {
@@ -2,13 +2,27 @@ import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
 
4
4
  interface SectionCardProps {
5
+ /** The section's name (Figma: `label`), shown in capitals. */
5
6
  label: string;
6
- /** Secondary text shown beside the label (e.g. a subtitle or count) */
7
+ /** A short summary beside the label (Figma: `hasBadge` + `badge`): "3 campos", "preenchido". */
7
8
  badge?: string;
8
- open: boolean;
9
- onToggle: () => void;
9
+ /** Open (Figma: `open`). Controlled with `onToggle`; leave it out and use `defaultOpen` to let the card decide. */
10
+ open?: boolean;
11
+ /** Open at first, when uncontrolled. */
12
+ defaultOpen?: boolean;
13
+ /** Called with the new state when the person opens or closes it. */
14
+ onToggle?: (open: boolean) => void;
15
+ /** The heading level that fits the page's heading order. */
16
+ titleAs?: 'h2' | 'h3' | 'h4';
17
+ /** The section's fields. */
10
18
  children: ReactNode;
19
+ className?: string;
11
20
  }
12
- declare function SectionCard({ label, badge, open, onToggle, children }: SectionCardProps): react.JSX.Element;
21
+ /**
22
+ * SectionCard — Figma [RDS] Content/SectionCard. A form section that opens and closes: a header with the label and a
23
+ * summary, the content under it when open. For long forms, one section open at a time. The header is a heading with
24
+ * a button (aria-expanded, aria-controls). Styles: section-card.css.
25
+ */
26
+ declare function SectionCard({ label, badge, open, defaultOpen, onToggle, titleAs: Title, children, className }: SectionCardProps): react.JSX.Element;
13
27
 
14
28
  export { SectionCard, type SectionCardProps };
@@ -1,56 +1,35 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { ChevronDown, ChevronRight } from "lucide-react";
5
- function SectionCard({ label, badge, open, onToggle, children }) {
6
- return /* @__PURE__ */ jsxs(
7
- "div",
8
- {
9
- className: [
10
- "rounded-(--radius-card) overflow-hidden transition-colors border",
11
- open ? "[border-color:var(--section-card-border-active)]" : "[border-color:var(--section-card-border)]"
12
- ].join(" "),
13
- children: [
14
- /* @__PURE__ */ jsxs(
15
- "button",
16
- {
17
- type: "button",
18
- onClick: onToggle,
19
- className: [
20
- "w-full flex items-center justify-between px-4 py-3 text-left transition-colors",
21
- open ? "[background:var(--section-card-header-bg-active)]" : "hover:[background:var(--section-card-header-bg-hover)]"
22
- ].join(" "),
23
- children: [
24
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
25
- /* @__PURE__ */ jsx(
26
- "span",
27
- {
28
- className: [
29
- "text-caption font-semibold uppercase tracking-wide shrink-0",
30
- open ? "[color:var(--section-card-label-active)]" : "[color:var(--section-card-label)]"
31
- ].join(" "),
32
- children: label
33
- }
34
- ),
35
- badge && /* @__PURE__ */ jsx(
36
- "span",
37
- {
38
- className: [
39
- "text-caption truncate min-w-0",
40
- open ? "[color:var(--section-card-badge-active)]" : "[color:var(--section-card-badge)]"
41
- ].join(" "),
42
- children: badge
43
- }
44
- )
45
- ] }),
46
- open ? /* @__PURE__ */ jsx(ChevronDown, { className: "w-4 h-4 shrink-0 [color:var(--section-card-chevron)]" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4 shrink-0 [color:var(--section-card-chevron)]" })
47
- ]
48
- }
49
- ),
50
- open && /* @__PURE__ */ jsx("div", { className: "px-4 pb-4 pt-4 space-y-4 [border-top:1px_solid_var(--section-card-divider)] [background:var(--surface-default)]", children })
51
- ]
52
- }
53
- );
4
+ import { useId, useState } from "react";
5
+ import { ChevronDownIcon, ChevronRightIcon } from "./internal/icons.js";
6
+ function SectionCard({ label, badge, open, defaultOpen = false, onToggle, titleAs: Title = "h3", children, className }) {
7
+ const [own, setOwn] = useState(defaultOpen);
8
+ const isOpen = open != null ? open : own;
9
+ const contentId = useId();
10
+ return /* @__PURE__ */ jsxs("div", { className: ["rds-section-card", isOpen && "rds-section-card--open", className].filter(Boolean).join(" "), children: [
11
+ /* @__PURE__ */ jsx(Title, { className: "rds-section-card__heading", children: /* @__PURE__ */ jsxs(
12
+ "button",
13
+ {
14
+ type: "button",
15
+ className: "rds-section-card__header",
16
+ "aria-expanded": isOpen,
17
+ "aria-controls": contentId,
18
+ onClick: () => {
19
+ setOwn(!isOpen);
20
+ onToggle == null ? void 0 : onToggle(!isOpen);
21
+ },
22
+ children: [
23
+ /* @__PURE__ */ jsxs("span", { className: "rds-section-card__title", children: [
24
+ /* @__PURE__ */ jsx("span", { className: "rds-section-card__label", children: label }),
25
+ badge && /* @__PURE__ */ jsx("span", { className: "rds-section-card__badge", children: badge })
26
+ ] }),
27
+ /* @__PURE__ */ jsx("span", { className: "rds-section-card__chevron", "aria-hidden": "true", children: isOpen ? /* @__PURE__ */ jsx(ChevronDownIcon, {}) : /* @__PURE__ */ jsx(ChevronRightIcon, {}) })
28
+ ]
29
+ }
30
+ ) }),
31
+ /* @__PURE__ */ jsx("div", { id: contentId, className: "rds-section-card__content", hidden: !isOpen, children })
32
+ ] });
54
33
  }
55
34
  export {
56
35
  SectionCard
@@ -2,28 +2,24 @@ import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
 
4
4
  /**
5
- * SectionHeader — cabeçalho de seção fora de card: eyebrow (overline) opcional
6
- * + título + texto de apoio. Areja a página agrupando conteúdo sem moldura.
5
+ * SectionHeader — deprecated: a thin wrapper over the PageHeader (Figma [RDS] Navigation/PageHeader) with an h2
6
+ * title, kept because SettingsList composes it and the products still use it. New code uses
7
+ * `<PageHeader titleAs="h2" title description actions />`.
7
8
  *
8
- * Uso:
9
- * <SectionHeader title="Seções da vitrine" />
10
- * <SectionHeader eyebrow="Conteúdo da vitrine" number="02" title="Seções da vitrine" description="Ative, desative e edite o que aparece" />
11
- * <SectionHeader title="Zonas" action={<Button size="sm">Adicionar</Button>} />
12
- *
13
- * O eyebrow consome os tokens --font-size/weight/letter-spacing-eyebrow — a
14
- * decisão de "quão pequeno/espaçado" vive em base.css, não em cada tela.
9
+ * action → actions. eyebrow and number (not in the Figma) still render as a line above the title. Styles: section-header.css.
15
10
  */
16
11
  interface SectionHeaderProps {
17
- /** Micro-rótulo uppercase acima do título (overline/kicker). */
12
+ /** Small uppercase line above the title (overline). */
18
13
  eyebrow?: string;
19
- /** Número de seção/etapa — prefixa o eyebrow: "02 · CONTEÚDO". */
14
+ /** Section or step number, before the eyebrow: "02 · CONTEÚDO". */
20
15
  number?: string;
21
16
  title: string;
22
17
  description?: string;
23
- /** Slot à direita do título (ação, badge). */
18
+ /** Slot on the right of the title (an action, a badge). */
24
19
  action?: ReactNode;
25
20
  className?: string;
26
21
  }
22
+ /** @deprecated Use PageHeader with titleAs="h2". */
27
23
  declare function SectionHeader({ eyebrow, number, title, description, action, className }: SectionHeaderProps): react.JSX.Element;
28
24
 
29
25
  export { SectionHeader, type SectionHeaderProps };
@@ -1,15 +1,10 @@
1
1
  import "../chunk-ORMEWXMH.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- function SectionHeader({ eyebrow, number, title, description, action, className = "" }) {
4
- return /* @__PURE__ */ jsxs("div", { className: ["mb-6", className].filter(Boolean).join(" "), children: [
5
- eyebrow && /* @__PURE__ */ jsx("p", { className: "uppercase text-fg-muted mb-1.5 [font-size:var(--font-size-eyebrow)] [font-weight:var(--font-weight-eyebrow)] [letter-spacing:var(--letter-spacing-eyebrow)]", children: number ? `${number} \xB7 ${eyebrow}` : eyebrow }),
6
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
7
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
8
- /* @__PURE__ */ jsx("h2", { className: "text-body font-semibold text-fg-primary", children: title }),
9
- description && /* @__PURE__ */ jsx("p", { className: "text-label text-fg-muted mt-1", children: description })
10
- ] }),
11
- action && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
12
- ] })
3
+ import { PageHeader } from "./page-header.js";
4
+ function SectionHeader({ eyebrow, number, title, description, action, className }) {
5
+ return /* @__PURE__ */ jsxs("div", { className: ["rds-section-header", className].filter(Boolean).join(" "), children: [
6
+ eyebrow && /* @__PURE__ */ jsx("p", { className: "rds-section-header__eyebrow", children: number ? `${number} \xB7 ${eyebrow}` : eyebrow }),
7
+ /* @__PURE__ */ jsx(PageHeader, { titleAs: "h2", title, description, actions: action })
13
8
  ] });
14
9
  }
15
10
  export {
@@ -1,21 +1,49 @@
1
1
  import * as react from 'react';
2
- import { SelectHTMLAttributes } from 'react';
2
+ import { ReactNode, CSSProperties } from 'react';
3
+ import { FieldTextProps } from './internal/field.js';
3
4
 
4
- type SelectSize = 'sm' | 'md' | 'lg';
5
- interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
6
- label?: string;
7
- helper?: string;
8
- error?: string;
5
+ interface SelectProps extends FieldTextProps {
6
+ /** The SelectItems (Figma: the Listbox slot `options`), in a clear order: alphabetical, or the most used first. */
7
+ children: ReactNode;
8
+ /** Controlled: the chosen item's value (Figma: `value`). */
9
+ value?: string;
10
+ /** Uncontrolled: the item chosen at first. */
11
+ defaultValue?: string;
12
+ onValueChange?: (value: string) => void;
13
+ /** What shows before a choice. It never counts as an answer. */
9
14
  placeholder?: string;
10
- options?: {
11
- value: string;
12
- label: string;
13
- disabled?: boolean;
14
- }[];
15
- size?: SelectSize;
16
- required?: boolean;
17
- optional?: boolean;
15
+ /** An icon on the left (Figma: `showLeadingIcon` + `leadingIcon`). Decorative. */
16
+ leadingIcon?: ReactNode;
17
+ /** The form field name: a hidden native select carries the value inside a form. */
18
+ name?: string;
19
+ disabled?: boolean;
20
+ id?: string;
21
+ className?: string;
22
+ style?: CSSProperties;
23
+ /** The name when there is no visible label. */
24
+ 'aria-label'?: string;
25
+ 'aria-labelledby'?: string;
18
26
  }
19
- declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
27
+ /**
28
+ * Select — Figma [RDS] Forms/Select. One choice in a closed list of 5 to 15 items: a button (role combobox)
29
+ * that opens the Listbox in a popover (Radix Select). Enter, Space or the arrows open it; the arrows move,
30
+ * typing jumps to an item, Enter chooses, Escape closes. Up to 4 options, show them all (RadioGroup).
31
+ * Styles: select.css, internal/field.css and internal/listbox.css.
32
+ */
33
+ declare function Select({ label, labelPosition, hint, error, errorMessage, required, children, value, defaultValue, onValueChange, placeholder, leadingIcon, name, disabled, id, className, style, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: SelectProps): react.JSX.Element;
34
+ interface SelectItemProps {
35
+ /** The value sent with the form. */
36
+ value: string;
37
+ /** The option text. */
38
+ children: ReactNode;
39
+ /** An icon before the text. Decorative. */
40
+ icon?: ReactNode;
41
+ /** Cannot be chosen now. An option that never applies should leave the list instead. */
42
+ disabled?: boolean;
43
+ /** The text typing jumps by, when the children are not plain text. */
44
+ textValue?: string;
45
+ }
46
+ /** One option of the Select (Figma: .listbox/option). The chosen one gets the tint and the check. */
47
+ declare function SelectItem({ value, children, icon, disabled, textValue }: SelectItemProps): react.JSX.Element;
20
48
 
21
- export { Select, type SelectProps, type SelectSize };
49
+ export { Select, SelectItem, type SelectItemProps, type SelectProps };
@@ -1,161 +1,90 @@
1
1
  "use client";
2
- import {
3
- __objRest,
4
- __spreadProps,
5
- __spreadValues
6
- } from "../chunk-ORMEWXMH.js";
2
+ import "../chunk-ORMEWXMH.js";
7
3
  import { jsx, jsxs } from "react/jsx-runtime";
8
- import {
9
- Children,
10
- forwardRef,
11
- isValidElement,
12
- useEffect,
13
- useId,
14
- useRef,
15
- useState
16
- } from "react";
17
- import { ChevronDown, Check } from "lucide-react";
18
- import { BottomSheet } from "./bottom-sheet.js";
19
- const SIZE = {
20
- sm: { h: "h-control-sm", text: "text-caption", padL: "pl-2.5", padR: "pr-7" },
21
- md: { h: "h-control-md", text: "text-label", padL: "pl-3", padR: "pr-9" },
22
- lg: { h: "h-control-lg", text: "text-body", padL: "pl-4", padR: "pr-10" }
23
- };
24
- function optionsFromChildren(children) {
25
- const out = [];
26
- Children.forEach(children, (child) => {
27
- var _a;
28
- if (!isValidElement(child)) return;
29
- const props = child.props;
30
- if (child.type === "option" && props.value !== void 0) {
31
- out.push({
32
- value: String(props.value),
33
- label: typeof props.children === "string" ? props.children : String((_a = props.children) != null ? _a : props.value),
34
- disabled: props.disabled
35
- });
4
+ import * as SelectPrimitive from "@radix-ui/react-select";
5
+ import { FieldShell, useFieldIds, warnIfUnlabelled } from "./internal/field.js";
6
+ import { CheckIcon, ChevronDownIcon } from "./internal/icons.js";
7
+ function Select({
8
+ label,
9
+ labelPosition,
10
+ hint,
11
+ error,
12
+ errorMessage,
13
+ required,
14
+ children,
15
+ value,
16
+ defaultValue,
17
+ onValueChange,
18
+ placeholder = "Selecione",
19
+ leadingIcon,
20
+ name,
21
+ disabled,
22
+ id,
23
+ className,
24
+ style,
25
+ "aria-label": ariaLabel,
26
+ "aria-labelledby": ariaLabelledBy
27
+ }) {
28
+ warnIfUnlabelled("Select", label, ariaLabel, ariaLabelledBy);
29
+ const { controlId, hintId, errorId, invalid, describedBy } = useFieldIds(id, hint, error, errorMessage);
30
+ return /* @__PURE__ */ jsxs(
31
+ SelectPrimitive.Root,
32
+ {
33
+ value,
34
+ defaultValue,
35
+ onValueChange,
36
+ name,
37
+ required,
38
+ disabled,
39
+ children: [
40
+ /* @__PURE__ */ jsx(
41
+ FieldShell,
42
+ {
43
+ kind: "rds-select",
44
+ controlId,
45
+ hintId,
46
+ errorId,
47
+ label,
48
+ labelPosition,
49
+ hint,
50
+ errorMessage,
51
+ invalid,
52
+ required,
53
+ disabled,
54
+ className,
55
+ style,
56
+ children: /* @__PURE__ */ jsxs(
57
+ SelectPrimitive.Trigger,
58
+ {
59
+ id: controlId,
60
+ className: "rds-field__control rds-select__trigger",
61
+ "aria-label": ariaLabel,
62
+ "aria-labelledby": ariaLabelledBy,
63
+ "aria-invalid": invalid || void 0,
64
+ "aria-describedby": describedBy,
65
+ "aria-required": required || void 0,
66
+ children: [
67
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "rds-field__icon", "aria-hidden": "true", children: leadingIcon }),
68
+ /* @__PURE__ */ jsx("span", { className: "rds-select__value", children: /* @__PURE__ */ jsx(SelectPrimitive.Value, { placeholder }) }),
69
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { className: "rds-field__icon rds-select__chevron", children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
70
+ ]
71
+ }
72
+ )
73
+ }
74
+ ),
75
+ /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(SelectPrimitive.Content, { position: "popper", sideOffset: 4, className: "rds-listbox rds-select__content", children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { children }) }) })
76
+ ]
36
77
  }
37
- });
38
- return out;
78
+ );
39
79
  }
40
- const Select = forwardRef(function Select2(_a, ref) {
41
- var _b = _a, { label, helper, error, options = [], placeholder, size = "md", required, optional, className = "", id, children } = _b, props = __objRest(_b, ["label", "helper", "error", "options", "placeholder", "size", "required", "optional", "className", "id", "children"]);
42
- var _a2;
43
- const generatedId = useId();
44
- const selectId = id != null ? id : generatedId;
45
- const sz = SIZE[size];
46
- const innerRef = useRef(null);
47
- const setRefs = (el) => {
48
- innerRef.current = el;
49
- if (typeof ref === "function") ref(el);
50
- else if (ref) ref.current = el;
51
- };
52
- const [isXs, setIsXs] = useState(false);
53
- const [sheetOpen, setSheetOpen] = useState(false);
54
- const [sheetValue, setSheetValue] = useState("");
55
- useEffect(() => {
56
- const mq = window.matchMedia("(max-width: 639px)");
57
- const update = () => setIsXs(mq.matches);
58
- update();
59
- mq.addEventListener("change", update);
60
- return () => mq.removeEventListener("change", update);
61
- }, []);
62
- const allOptions = options.length > 0 ? options : optionsFromChildren(children);
63
- function openSheet() {
64
- var _a3, _b2;
65
- setSheetValue((_b2 = (_a3 = innerRef.current) == null ? void 0 : _a3.value) != null ? _b2 : "");
66
- setSheetOpen(true);
67
- }
68
- function commitSheetValue(value) {
69
- var _a3;
70
- const el = innerRef.current;
71
- setSheetOpen(false);
72
- if (!el || el.value === value) return;
73
- const setter = (_a3 = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : _a3.set;
74
- setter == null ? void 0 : setter.call(el, value);
75
- el.dispatchEvent(new Event("change", { bubbles: true }));
76
- }
77
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5 w-full", children: [
78
- label && /* @__PURE__ */ jsxs("label", { htmlFor: selectId, className: "inline-flex items-center gap-1 text-label font-medium text-fg-primary", children: [
79
- /* @__PURE__ */ jsx("span", { children: label }),
80
- required && /* @__PURE__ */ jsx("span", { className: "text-danger", "aria-label": "obrigat\xF3rio", children: "*" }),
81
- optional && !required && /* @__PURE__ */ jsx("span", { className: "text-fg-muted font-normal", children: "(opcional)" })
82
- ] }),
83
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
84
- /* @__PURE__ */ jsxs(
85
- "select",
86
- __spreadProps(__spreadValues({
87
- ref: setRefs,
88
- id: selectId,
89
- required,
90
- className: [
91
- "w-full rounded-(--radius-control) appearance-none",
92
- "bg-surface-default text-fg-primary",
93
- "border transition-colors outline-none",
94
- sz.h,
95
- sz.text,
96
- sz.padL,
97
- sz.padR,
98
- error ? "border-danger focus:border-danger focus:ring-2 focus:ring-danger/20" : "border-stroke-control focus:border-stroke-focus focus:ring-2 focus:ring-stroke-focus/20",
99
- "disabled:opacity-50 disabled:cursor-not-allowed",
100
- className
101
- ].filter(Boolean).join(" "),
102
- "aria-invalid": error ? true : void 0,
103
- "aria-describedby": error ? `${selectId}-error` : helper ? `${selectId}-helper` : void 0
104
- }, props), {
105
- children: [
106
- placeholder && /* @__PURE__ */ jsx("option", { value: "", disabled: true, hidden: true, children: placeholder }),
107
- options.map((o) => /* @__PURE__ */ jsx("option", { value: o.value, disabled: o.disabled, children: o.label }, o.value)),
108
- children
109
- ]
110
- })
111
- ),
112
- /* @__PURE__ */ jsx(
113
- ChevronDown,
114
- {
115
- size: size === "sm" ? 14 : size === "lg" ? 18 : 16,
116
- className: [
117
- "absolute top-1/2 -translate-y-1/2 text-fg-muted pointer-events-none",
118
- size === "sm" ? "right-2.5" : size === "lg" ? "right-3.5" : "right-3"
119
- ].join(" ")
120
- }
121
- ),
122
- isXs && !props.disabled && allOptions.length > 0 && /* @__PURE__ */ jsx(
123
- "button",
124
- {
125
- type: "button",
126
- "aria-label": (_a2 = label != null ? label : placeholder) != null ? _a2 : "Selecionar",
127
- "aria-haspopup": "dialog",
128
- onClick: openSheet,
129
- className: "absolute inset-0 w-full h-full rounded-(--radius-control) opacity-0"
130
- }
131
- )
132
- ] }),
133
- error && /* @__PURE__ */ jsx("p", { id: `${selectId}-error`, className: "text-caption text-danger-text", children: error }),
134
- !error && helper && /* @__PURE__ */ jsx("p", { id: `${selectId}-helper`, className: "text-caption text-fg-muted", children: helper }),
135
- isXs && /* @__PURE__ */ jsx(BottomSheet, { open: sheetOpen, onClose: () => setSheetOpen(false), title: label != null ? label : placeholder, children: /* @__PURE__ */ jsx("div", { className: "pb-2", children: allOptions.map((o) => {
136
- const selected = o.value === sheetValue;
137
- return /* @__PURE__ */ jsxs(
138
- "button",
139
- {
140
- type: "button",
141
- disabled: o.disabled,
142
- onClick: () => commitSheetValue(o.value),
143
- className: [
144
- "w-full flex items-center justify-between gap-3 px-1 py-3.5 text-left text-label",
145
- "border-b border-stroke-subtle last:border-0 transition-colors",
146
- selected ? "font-medium text-fg-primary" : "text-fg-secondary",
147
- "disabled:opacity-50 disabled:cursor-not-allowed"
148
- ].join(" "),
149
- children: [
150
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1", children: o.label }),
151
- selected && /* @__PURE__ */ jsx(Check, { size: 16, className: "shrink-0" })
152
- ]
153
- },
154
- o.value
155
- );
156
- }) }) })
80
+ function SelectItem({ value, children, icon, disabled, textValue }) {
81
+ return /* @__PURE__ */ jsxs(SelectPrimitive.Item, { value, disabled, textValue, className: "rds-listbox__option", children: [
82
+ icon && /* @__PURE__ */ jsx("span", { className: "rds-listbox__icon", "aria-hidden": "true", children: icon }),
83
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children: /* @__PURE__ */ jsx("span", { className: "rds-listbox__text", children }) }),
84
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { className: "rds-listbox__check", children: /* @__PURE__ */ jsx(CheckIcon, {}) })
157
85
  ] });
158
- });
86
+ }
159
87
  export {
160
- Select
88
+ Select,
89
+ SelectItem
161
90
  };