@rojaostudio/ds 1.0.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 (291) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +89 -0
  3. package/brand/rojao-black-on-white.png +0 -0
  4. package/brand/rojao-black.png +0 -0
  5. package/brand/rojao-white-on-black.png +0 -0
  6. package/brand/rojao-white.png +0 -0
  7. package/dist/chunk-ORMEWXMH.js +37 -0
  8. package/dist/compat/generate.d.ts +6 -0
  9. package/dist/compat/generate.js +1 -0
  10. package/dist/compat/recipes.d.ts +1 -0
  11. package/dist/compat/recipes.js +1 -0
  12. package/dist/compat/themes.d.ts +1 -0
  13. package/dist/compat/themes.js +1 -0
  14. package/dist/compat/tokens.d.ts +1 -0
  15. package/dist/compat/tokens.js +1 -0
  16. package/dist/components/accordion.d.ts +35 -0
  17. package/dist/components/accordion.js +95 -0
  18. package/dist/components/alert.d.ts +24 -0
  19. package/dist/components/alert.js +72 -0
  20. package/dist/components/avatar.d.ts +45 -0
  21. package/dist/components/avatar.js +97 -0
  22. package/dist/components/badge.d.ts +45 -0
  23. package/dist/components/badge.js +114 -0
  24. package/dist/components/blocker-card.d.ts +42 -0
  25. package/dist/components/blocker-card.js +45 -0
  26. package/dist/components/bottom-sheet.d.ts +31 -0
  27. package/dist/components/bottom-sheet.js +120 -0
  28. package/dist/components/breadcrumb.d.ts +28 -0
  29. package/dist/components/breadcrumb.js +52 -0
  30. package/dist/components/button.d.ts +27 -0
  31. package/dist/components/button.js +124 -0
  32. package/dist/components/card.d.ts +27 -0
  33. package/dist/components/card.js +52 -0
  34. package/dist/components/chat-bubble.d.ts +16 -0
  35. package/dist/components/chat-bubble.js +55 -0
  36. package/dist/components/checkbox.d.ts +14 -0
  37. package/dist/components/checkbox.js +78 -0
  38. package/dist/components/chip-input.d.ts +26 -0
  39. package/dist/components/chip-input.js +182 -0
  40. package/dist/components/chips.d.ts +22 -0
  41. package/dist/components/chips.js +94 -0
  42. package/dist/components/choice-card.d.ts +16 -0
  43. package/dist/components/choice-card.js +60 -0
  44. package/dist/components/choice-carousel.d.ts +16 -0
  45. package/dist/components/choice-carousel.js +154 -0
  46. package/dist/components/choice-preview-card.d.ts +37 -0
  47. package/dist/components/choice-preview-card.js +39 -0
  48. package/dist/components/color-input.d.ts +20 -0
  49. package/dist/components/color-input.js +79 -0
  50. package/dist/components/combobox.d.ts +70 -0
  51. package/dist/components/combobox.js +213 -0
  52. package/dist/components/context-menu.d.ts +33 -0
  53. package/dist/components/context-menu.js +70 -0
  54. package/dist/components/copilot-hint.d.ts +18 -0
  55. package/dist/components/copilot-hint.js +63 -0
  56. package/dist/components/copy-field.d.ts +16 -0
  57. package/dist/components/copy-field.js +41 -0
  58. package/dist/components/currency-input.d.ts +32 -0
  59. package/dist/components/currency-input.js +138 -0
  60. package/dist/components/danger-zone.d.ts +20 -0
  61. package/dist/components/danger-zone.js +21 -0
  62. package/dist/components/data-table-header.d.ts +43 -0
  63. package/dist/components/data-table-header.js +205 -0
  64. package/dist/components/date-picker.d.ts +40 -0
  65. package/dist/components/date-picker.js +252 -0
  66. package/dist/components/divider.d.ts +20 -0
  67. package/dist/components/divider.js +47 -0
  68. package/dist/components/drawer.d.ts +26 -0
  69. package/dist/components/drawer.js +82 -0
  70. package/dist/components/dropzone.d.ts +19 -0
  71. package/dist/components/dropzone.js +65 -0
  72. package/dist/components/empty-state.d.ts +48 -0
  73. package/dist/components/empty-state.js +91 -0
  74. package/dist/components/fab.d.ts +38 -0
  75. package/dist/components/fab.js +100 -0
  76. package/dist/components/filter-chip.d.ts +54 -0
  77. package/dist/components/filter-chip.js +66 -0
  78. package/dist/components/floating-stepper.d.ts +44 -0
  79. package/dist/components/floating-stepper.js +53 -0
  80. package/dist/components/form-card-header.d.ts +13 -0
  81. package/dist/components/form-card-header.js +8 -0
  82. package/dist/components/icon-button.d.ts +17 -0
  83. package/dist/components/icon-button.js +80 -0
  84. package/dist/components/image-crop-modal.d.ts +59 -0
  85. package/dist/components/image-crop-modal.js +240 -0
  86. package/dist/components/image-upload.d.ts +72 -0
  87. package/dist/components/image-upload.js +271 -0
  88. package/dist/components/index.d.ts +85 -0
  89. package/dist/components/index.js +200 -0
  90. package/dist/components/input.d.ts +25 -0
  91. package/dist/components/input.js +136 -0
  92. package/dist/components/insight-card.d.ts +19 -0
  93. package/dist/components/insight-card.js +27 -0
  94. package/dist/components/label.d.ts +16 -0
  95. package/dist/components/label.js +43 -0
  96. package/dist/components/media-tile.d.ts +24 -0
  97. package/dist/components/media-tile.js +28 -0
  98. package/dist/components/menu.d.ts +50 -0
  99. package/dist/components/menu.js +80 -0
  100. package/dist/components/modal.d.ts +25 -0
  101. package/dist/components/modal.js +71 -0
  102. package/dist/components/notice.d.ts +50 -0
  103. package/dist/components/notice.js +103 -0
  104. package/dist/components/option-tile.d.ts +60 -0
  105. package/dist/components/option-tile.js +144 -0
  106. package/dist/components/page-shell.d.ts +29 -0
  107. package/dist/components/page-shell.js +36 -0
  108. package/dist/components/page-skeleton.d.ts +35 -0
  109. package/dist/components/page-skeleton.js +12 -0
  110. package/dist/components/page-tabs.d.ts +35 -0
  111. package/dist/components/page-tabs.js +55 -0
  112. package/dist/components/pagination.d.ts +31 -0
  113. package/dist/components/pagination.js +80 -0
  114. package/dist/components/paywall-banner.d.ts +37 -0
  115. package/dist/components/paywall-banner.js +42 -0
  116. package/dist/components/paywall.d.ts +44 -0
  117. package/dist/components/paywall.js +55 -0
  118. package/dist/components/phone-frame.d.ts +9 -0
  119. package/dist/components/phone-frame.js +18 -0
  120. package/dist/components/phone-input.d.ts +24 -0
  121. package/dist/components/phone-input.js +92 -0
  122. package/dist/components/pix-icon.d.ts +8 -0
  123. package/dist/components/pix-icon.js +24 -0
  124. package/dist/components/popover.d.ts +44 -0
  125. package/dist/components/popover.js +140 -0
  126. package/dist/components/pricing-card.d.ts +42 -0
  127. package/dist/components/pricing-card.js +29 -0
  128. package/dist/components/qr-display.d.ts +19 -0
  129. package/dist/components/qr-display.js +24 -0
  130. package/dist/components/radio.d.ts +33 -0
  131. package/dist/components/radio.js +97 -0
  132. package/dist/components/row-actions.d.ts +24 -0
  133. package/dist/components/row-actions.js +76 -0
  134. package/dist/components/saving-bar-context.d.ts +40 -0
  135. package/dist/components/saving-bar-context.js +125 -0
  136. package/dist/components/saving-bar.d.ts +18 -0
  137. package/dist/components/saving-bar.js +72 -0
  138. package/dist/components/search.d.ts +30 -0
  139. package/dist/components/search.js +81 -0
  140. package/dist/components/section-card.d.ts +14 -0
  141. package/dist/components/section-card.js +49 -0
  142. package/dist/components/section-header.d.ts +29 -0
  143. package/dist/components/section-header.js +7 -0
  144. package/dist/components/select.d.ts +21 -0
  145. package/dist/components/select.js +140 -0
  146. package/dist/components/selectable-card.d.ts +35 -0
  147. package/dist/components/selectable-card.js +27 -0
  148. package/dist/components/setting-row.d.ts +33 -0
  149. package/dist/components/setting-row.js +19 -0
  150. package/dist/components/settings-list.d.ts +25 -0
  151. package/dist/components/settings-list.js +22 -0
  152. package/dist/components/skeleton.d.ts +24 -0
  153. package/dist/components/skeleton.js +49 -0
  154. package/dist/components/slider.d.ts +32 -0
  155. package/dist/components/slider.js +79 -0
  156. package/dist/components/spinner.d.ts +14 -0
  157. package/dist/components/spinner.js +36 -0
  158. package/dist/components/step-progress.d.ts +12 -0
  159. package/dist/components/step-progress.js +24 -0
  160. package/dist/components/summary-bar.d.ts +31 -0
  161. package/dist/components/summary-bar.js +54 -0
  162. package/dist/components/table.d.ts +23 -0
  163. package/dist/components/table.js +80 -0
  164. package/dist/components/textarea.d.ts +21 -0
  165. package/dist/components/textarea.js +95 -0
  166. package/dist/components/themed.d.ts +36 -0
  167. package/dist/components/themed.js +22 -0
  168. package/dist/components/time-picker.d.ts +34 -0
  169. package/dist/components/time-picker.js +213 -0
  170. package/dist/components/toaster.d.ts +84 -0
  171. package/dist/components/toaster.js +284 -0
  172. package/dist/components/toggle-card-compact.d.ts +21 -0
  173. package/dist/components/toggle-card-compact.js +99 -0
  174. package/dist/components/toggle-card.d.ts +15 -0
  175. package/dist/components/toggle-card.js +76 -0
  176. package/dist/components/toggle-group.d.ts +67 -0
  177. package/dist/components/toggle-group.js +80 -0
  178. package/dist/components/toggle.d.ts +13 -0
  179. package/dist/components/toggle.js +64 -0
  180. package/dist/components/tooltip.d.ts +17 -0
  181. package/dist/components/tooltip.js +89 -0
  182. package/dist/components/typing-indicator.d.ts +8 -0
  183. package/dist/components/typing-indicator.js +27 -0
  184. package/dist/components/use-dismiss.d.ts +9 -0
  185. package/dist/components/use-dismiss.js +28 -0
  186. package/dist/components/use-focus-trap.d.ts +5 -0
  187. package/dist/components/use-focus-trap.js +54 -0
  188. package/dist/icons/index.d.ts +1 -0
  189. package/dist/icons/index.js +89 -0
  190. package/dist/targets/native/components/accordion.d.ts +18 -0
  191. package/dist/targets/native/components/accordion.js +122 -0
  192. package/dist/targets/native/components/alert.d.ts +16 -0
  193. package/dist/targets/native/components/alert.js +58 -0
  194. package/dist/targets/native/components/avatar.d.ts +25 -0
  195. package/dist/targets/native/components/avatar.js +88 -0
  196. package/dist/targets/native/components/badge.d.ts +27 -0
  197. package/dist/targets/native/components/badge.js +59 -0
  198. package/dist/targets/native/components/button.d.ts +18 -0
  199. package/dist/targets/native/components/button.js +84 -0
  200. package/dist/targets/native/components/card.d.ts +6 -0
  201. package/dist/targets/native/components/card.js +36 -0
  202. package/dist/targets/native/components/checkbox.d.ts +12 -0
  203. package/dist/targets/native/components/checkbox.js +59 -0
  204. package/dist/targets/native/components/chips.d.ts +17 -0
  205. package/dist/targets/native/components/chips.js +77 -0
  206. package/dist/targets/native/components/choice-card.d.ts +11 -0
  207. package/dist/targets/native/components/choice-card.js +52 -0
  208. package/dist/targets/native/components/context-menu.d.ts +11 -0
  209. package/dist/targets/native/components/context-menu.js +19 -0
  210. package/dist/targets/native/components/currency-input.d.ts +22 -0
  211. package/dist/targets/native/components/currency-input.js +105 -0
  212. package/dist/targets/native/components/danger-zone.d.ts +13 -0
  213. package/dist/targets/native/components/danger-zone.js +27 -0
  214. package/dist/targets/native/components/date-picker.d.ts +13 -0
  215. package/dist/targets/native/components/date-picker.js +185 -0
  216. package/dist/targets/native/components/divider.d.ts +9 -0
  217. package/dist/targets/native/components/divider.js +36 -0
  218. package/dist/targets/native/components/empty-state.d.ts +13 -0
  219. package/dist/targets/native/components/empty-state.js +10 -0
  220. package/dist/targets/native/components/fab.d.ts +25 -0
  221. package/dist/targets/native/components/fab.js +112 -0
  222. package/dist/targets/native/components/filter-chip.d.ts +22 -0
  223. package/dist/targets/native/components/filter-chip.js +70 -0
  224. package/dist/targets/native/components/form-field.d.ts +13 -0
  225. package/dist/targets/native/components/form-field.js +29 -0
  226. package/dist/targets/native/components/form-screen.d.ts +19 -0
  227. package/dist/targets/native/components/form-screen.js +88 -0
  228. package/dist/targets/native/components/google-icon.d.ts +8 -0
  229. package/dist/targets/native/components/google-icon.js +32 -0
  230. package/dist/targets/native/components/icon-button.d.ts +18 -0
  231. package/dist/targets/native/components/icon-button.js +80 -0
  232. package/dist/targets/native/components/icon.d.ts +11 -0
  233. package/dist/targets/native/components/icon.js +9 -0
  234. package/dist/targets/native/components/image-upload.d.ts +12 -0
  235. package/dist/targets/native/components/image-upload.js +95 -0
  236. package/dist/targets/native/components/index.d.ts +45 -0
  237. package/dist/targets/native/components/index.js +100 -0
  238. package/dist/targets/native/components/input.d.ts +17 -0
  239. package/dist/targets/native/components/input.js +103 -0
  240. package/dist/targets/native/components/list-item.d.ts +20 -0
  241. package/dist/targets/native/components/list-item.js +71 -0
  242. package/dist/targets/native/components/menu.d.ts +24 -0
  243. package/dist/targets/native/components/menu.js +71 -0
  244. package/dist/targets/native/components/modal.d.ts +15 -0
  245. package/dist/targets/native/components/modal.js +110 -0
  246. package/dist/targets/native/components/paywall-banner.d.ts +11 -0
  247. package/dist/targets/native/components/paywall-banner.js +46 -0
  248. package/dist/targets/native/components/paywall.d.ts +18 -0
  249. package/dist/targets/native/components/paywall.js +61 -0
  250. package/dist/targets/native/components/radio.d.ts +20 -0
  251. package/dist/targets/native/components/radio.js +71 -0
  252. package/dist/targets/native/components/search.d.ts +22 -0
  253. package/dist/targets/native/components/search.js +92 -0
  254. package/dist/targets/native/components/select.d.ts +17 -0
  255. package/dist/targets/native/components/select.js +86 -0
  256. package/dist/targets/native/components/sheet.d.ts +11 -0
  257. package/dist/targets/native/components/sheet.js +51 -0
  258. package/dist/targets/native/components/skeleton.d.ts +18 -0
  259. package/dist/targets/native/components/skeleton.js +52 -0
  260. package/dist/targets/native/components/slider.d.ts +18 -0
  261. package/dist/targets/native/components/slider.js +153 -0
  262. package/dist/targets/native/components/spinner.d.ts +7 -0
  263. package/dist/targets/native/components/spinner.js +10 -0
  264. package/dist/targets/native/components/stepper.d.ts +10 -0
  265. package/dist/targets/native/components/stepper.js +33 -0
  266. package/dist/targets/native/components/switch.d.ts +20 -0
  267. package/dist/targets/native/components/switch.js +68 -0
  268. package/dist/targets/native/components/text.d.ts +12 -0
  269. package/dist/targets/native/components/text.js +31 -0
  270. package/dist/targets/native/components/textarea.d.ts +13 -0
  271. package/dist/targets/native/components/textarea.js +92 -0
  272. package/dist/targets/native/components/theme.d.ts +18 -0
  273. package/dist/targets/native/components/theme.js +20 -0
  274. package/dist/targets/native/components/toaster.d.ts +35 -0
  275. package/dist/targets/native/components/toaster.js +159 -0
  276. package/dist/targets/native/fonts.d.ts +9 -0
  277. package/dist/targets/native/fonts.js +10 -0
  278. package/dist/targets/native/icons.d.ts +1 -0
  279. package/dist/targets/native/icons.js +1 -0
  280. package/dist/targets/native/index.d.ts +3 -0
  281. package/dist/targets/native/index.js +11 -0
  282. package/dist/targets/native/preset.cjs +69 -0
  283. package/dist/targets/native/resolve.d.ts +22 -0
  284. package/dist/targets/native/resolve.js +85 -0
  285. package/dist/targets/native/theme.css +118 -0
  286. package/dist/targets/native/theme.d.ts +117 -0
  287. package/dist/targets/native/theme.js +118 -0
  288. package/package.json +194 -0
  289. package/styles/_primitives.generated.css +284 -0
  290. package/styles/base.css +950 -0
  291. package/styles/themes/rojao.css +107 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rojão Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # @rojaostudio/ds
2
+
3
+ React components, styles and a React Native target for [Rojão DS](https://ds.rojao.ai).
4
+
5
+ > **Only want the theme?** The engine is [`@rojaostudio/ds-core`](https://www.npmjs.com/package/@rojaostudio/ds-core) —
6
+ > tokens and theme derivation, with **zero peer dependencies**. It won't make you declare React
7
+ > or Tailwind.
8
+
9
+ ```bash
10
+ npm i @rojaostudio/ds
11
+ ```
12
+
13
+ ```css
14
+ /* your root stylesheet */
15
+ @import "tailwindcss";
16
+ @import "@rojaostudio/ds/styles/base.css";
17
+ @import "@rojaostudio/ds/styles/themes/rojao.css"; /* or your own generated theme */
18
+ ```
19
+
20
+ ```tsx
21
+ import { Button } from '@rojaostudio/ds/components/button';
22
+
23
+ <Button variant="primary">Save</Button>
24
+ ```
25
+
26
+ Then put the theme class on `<html>` — add `dark` for dark mode:
27
+
28
+ ```html
29
+ <html class="theme-rojao">
30
+ <html class="theme-rojao dark">
31
+ ```
32
+
33
+ ## Import the component, not the barrel
34
+
35
+ ```tsx
36
+ import { Button } from '@rojaostudio/ds/components/button'; // preferred
37
+ import { Button } from '@rojaostudio/ds/components'; // works, pulls the barrel
38
+ ```
39
+
40
+ Both work. The deep path keeps your bundler from walking 83 modules to find one. On Next.js you
41
+ can keep the barrel and add:
42
+
43
+ ```js
44
+ // next.config.js
45
+ experimental: { optimizePackageImports: ['@rojaostudio/ds'] }
46
+ ```
47
+
48
+ ## Requirements
49
+
50
+ Tailwind CSS 4 and React 19. `base.css` uses `@theme inline`, so Tailwind 4 isn't optional here —
51
+ it's the layer the utilities come from. If that's not your stack, `@rojaostudio/ds-core` gives you
52
+ the tokens without any of it.
53
+
54
+ ## React Native
55
+
56
+ ```tsx
57
+ import { DSThemeProvider } from '@rojaostudio/ds/native/components';
58
+
59
+ <DSThemeProvider theme={yourBrand}>{children}</DSThemeProvider>
60
+ ```
61
+
62
+ `theme` is optional — without it you get the default theme. Generate your own map from a brand
63
+ definition with `@rojaostudio/ds-core`.
64
+
65
+ NativeWind:
66
+
67
+ ```js
68
+ presets: [require('nativewind/preset'), require('@rojaostudio/ds/native/preset')]
69
+ ```
70
+
71
+ ```css
72
+ @import '@rojaostudio/ds/native/theme.css';
73
+ ```
74
+
75
+ ## Accessibility is checked, not claimed
76
+
77
+ Every text role is measured against every surface, in both modes, on every build. Text and
78
+ surface pairs meet **WCAG AA (4.5:1)**; control borders meet **1.4.11 (3:1)**. A regression in the
79
+ derivation fails CI — it doesn't ship and get found later in an audit.
80
+
81
+ ## Em português
82
+
83
+ O site é em português e gera o tema da sua marca sem escrever código:
84
+ **[ds.rojao.ai](https://ds.rojao.ai)**.
85
+
86
+ ## License
87
+
88
+ MIT — see [LICENSE](./LICENSE). The **name and logo are not**: see
89
+ [TRADEMARK.md](https://github.com/rojaostudio/ds/blob/main/TRADEMARK.md).
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,37 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ export {
34
+ __spreadValues,
35
+ __spreadProps,
36
+ __objRest
37
+ };
@@ -0,0 +1,6 @@
1
+ export * from '@rojaostudio/ds-core/generate';
2
+ import '@rojaostudio/ds-core/recipes';
3
+ import '@rojaostudio/ds-core/themes';
4
+ import '@rojaostudio/ds-core/tokens';
5
+ import 'lucide-react';
6
+ import 'lucide-react-native';
@@ -0,0 +1 @@
1
+ export * from "@rojaostudio/ds-core/generate";
@@ -0,0 +1 @@
1
+ export * from '@rojaostudio/ds-core/recipes';
@@ -0,0 +1 @@
1
+ export * from "@rojaostudio/ds-core/recipes";
@@ -0,0 +1 @@
1
+ export * from '@rojaostudio/ds-core/themes';
@@ -0,0 +1 @@
1
+ export * from "@rojaostudio/ds-core/themes";
@@ -0,0 +1 @@
1
+ export * from '@rojaostudio/ds-core/tokens';
@@ -0,0 +1 @@
1
+ export * from "@rojaostudio/ds-core/tokens";
@@ -0,0 +1,35 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface AccordionSingleProps {
5
+ type?: 'single';
6
+ defaultValue?: string;
7
+ value?: string | null;
8
+ onChange?: (value: string | null) => void;
9
+ collapsible?: boolean;
10
+ children: ReactNode;
11
+ className?: string;
12
+ }
13
+ interface AccordionMultiProps {
14
+ type: 'multi';
15
+ defaultValue?: string[];
16
+ value?: string[];
17
+ onChange?: (value: string[]) => void;
18
+ children: ReactNode;
19
+ className?: string;
20
+ }
21
+ type AccordionProps = AccordionSingleProps | AccordionMultiProps;
22
+ declare const Accordion: react.ForwardRefExoticComponent<AccordionProps & react.RefAttributes<HTMLDivElement>>;
23
+ interface AccordionItemProps {
24
+ value: string;
25
+ title: ReactNode;
26
+ /** Subtítulo opcional ao lado do título (ex: contagem, tag). */
27
+ meta?: ReactNode;
28
+ children: ReactNode;
29
+ /** Ícone leading no header. */
30
+ icon?: ReactNode;
31
+ disabled?: boolean;
32
+ }
33
+ declare function AccordionItem({ value, title, meta, children, icon, disabled }: AccordionItemProps): react.JSX.Element;
34
+
35
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps };
@@ -0,0 +1,95 @@
1
+ "use client";
2
+ import "../chunk-ORMEWXMH.js";
3
+ import { forwardRef, useState, useId, useImperativeHandle, useRef } from "react";
4
+ import { ChevronDown } from "lucide-react";
5
+ import { createContext, useContext } from "react";
6
+ const Ctx = createContext(null);
7
+ const Accordion = forwardRef(function Accordion2(props, ref) {
8
+ var _a, _b;
9
+ const rootRef = useRef(null);
10
+ useImperativeHandle(ref, () => rootRef.current);
11
+ const isMulti = props.type === "multi";
12
+ const [internalSingle, setInternalSingle] = useState(
13
+ isMulti ? null : (_a = props.defaultValue) != null ? _a : null
14
+ );
15
+ const [internalMulti, setInternalMulti] = useState(
16
+ isMulti ? (_b = props.defaultValue) != null ? _b : [] : []
17
+ );
18
+ const isControlled = props.value !== void 0;
19
+ const isOpen = (v) => {
20
+ if (isMulti) {
21
+ const value2 = isControlled ? props.value : internalMulti;
22
+ return value2.includes(v);
23
+ }
24
+ const value = isControlled ? props.value : internalSingle;
25
+ return value === v;
26
+ };
27
+ const toggle = (v) => {
28
+ var _a2, _b2;
29
+ if (isMulti) {
30
+ const current = isControlled ? props.value : internalMulti;
31
+ const next = current.includes(v) ? current.filter((x) => x !== v) : [...current, v];
32
+ if (!isControlled) setInternalMulti(next);
33
+ (_a2 = props.onChange) == null ? void 0 : _a2.call(props, next);
34
+ } else {
35
+ const single = props;
36
+ const current = isControlled ? props.value : internalSingle;
37
+ const collapsible = single.collapsible !== false;
38
+ const next = current === v ? collapsible ? null : current : v;
39
+ if (!isControlled) setInternalSingle(next);
40
+ (_b2 = single.onChange) == null ? void 0 : _b2.call(single, next);
41
+ }
42
+ };
43
+ return /* @__PURE__ */ React.createElement(Ctx.Provider, { value: { isOpen, toggle } }, /* @__PURE__ */ React.createElement("div", { ref: rootRef, className: ["border-y border-stroke-default divide-y divide-stroke-subtle", props.className].filter(Boolean).join(" ") }, props.children));
44
+ });
45
+ function AccordionItem({ value, title, meta, children, icon, disabled = false }) {
46
+ const ctx = useContext(Ctx);
47
+ if (!ctx) throw new Error("AccordionItem must be used inside Accordion");
48
+ const open = ctx.isOpen(value);
49
+ const id = useId();
50
+ const headerId = `${id}-header`;
51
+ const panelId = `${id}-panel`;
52
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h3", null, /* @__PURE__ */ React.createElement(
53
+ "button",
54
+ {
55
+ type: "button",
56
+ id: headerId,
57
+ "aria-expanded": open,
58
+ "aria-controls": panelId,
59
+ disabled,
60
+ onClick: () => ctx.toggle(value),
61
+ className: [
62
+ "w-full flex items-center gap-3 py-3 px-4 min-h-control-md text-left transition-colors",
63
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus focus-visible:ring-inset",
64
+ "disabled:cursor-not-allowed disabled:opacity-50",
65
+ "hover:bg-surface-raised"
66
+ ].join(" ")
67
+ },
68
+ icon && /* @__PURE__ */ React.createElement("span", { className: "shrink-0 text-fg-muted [&_svg]:size-4" }, icon),
69
+ /* @__PURE__ */ React.createElement("span", { className: "flex-1 font-medium text-fg-primary text-label" }, title),
70
+ meta && /* @__PURE__ */ React.createElement("span", { className: "shrink-0 text-caption text-fg-muted" }, meta),
71
+ /* @__PURE__ */ React.createElement(
72
+ ChevronDown,
73
+ {
74
+ size: 16,
75
+ className: ["shrink-0 text-fg-muted transition-transform", open ? "rotate-180" : ""].join(" ")
76
+ }
77
+ )
78
+ )), /* @__PURE__ */ React.createElement(
79
+ "div",
80
+ {
81
+ id: panelId,
82
+ role: "region",
83
+ "aria-labelledby": headerId,
84
+ className: [
85
+ "grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
86
+ open ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
87
+ ].join(" ")
88
+ },
89
+ /* @__PURE__ */ React.createElement("div", { className: "overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "px-4 pb-4 text-label text-fg-secondary leading-relaxed" }, children))
90
+ ));
91
+ }
92
+ export {
93
+ Accordion,
94
+ AccordionItem
95
+ };
@@ -0,0 +1,24 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ type AlertVariant = 'success' | 'danger' | 'warning' | 'info' | 'neutral';
5
+ interface AlertProps {
6
+ variant?: AlertVariant;
7
+ title?: ReactNode;
8
+ children?: ReactNode;
9
+ /** Botão close (X). */
10
+ onClose?: () => void;
11
+ /** Action button inline (label + onClick). */
12
+ action?: {
13
+ label: string;
14
+ onClick: () => void;
15
+ };
16
+ /** Ícone customizado (substitui o default da variant). */
17
+ icon?: ReactNode;
18
+ /** Esconde o ícone. default = false. */
19
+ hideIcon?: boolean;
20
+ className?: string;
21
+ }
22
+ declare function Alert({ variant, title, children, onClose, action, icon, hideIcon, className, }: AlertProps): react.JSX.Element;
23
+
24
+ export { Alert, type AlertProps, type AlertVariant };
@@ -0,0 +1,72 @@
1
+ import "../chunk-ORMEWXMH.js";
2
+ import { CheckCircle, AlertCircle, AlertTriangle, Info, X } from "lucide-react";
3
+ const VARIANTS = {
4
+ success: {
5
+ container: "bg-success-soft border-success-border text-success-text",
6
+ icon: /* @__PURE__ */ React.createElement(CheckCircle, { size: 16, className: "shrink-0 mt-0.5" }),
7
+ actionColor: "text-success-text hover:bg-success-soft/60"
8
+ },
9
+ danger: {
10
+ container: "bg-danger-soft border-danger-border text-danger-text",
11
+ icon: /* @__PURE__ */ React.createElement(AlertCircle, { size: 16, className: "shrink-0 mt-0.5" }),
12
+ actionColor: "text-danger-text hover:bg-danger-soft/60"
13
+ },
14
+ warning: {
15
+ container: "bg-warning-soft border-warning-border text-warning-text",
16
+ icon: /* @__PURE__ */ React.createElement(AlertTriangle, { size: 16, className: "shrink-0 mt-0.5" }),
17
+ actionColor: "text-warning-text hover:bg-warning-soft/60"
18
+ },
19
+ info: {
20
+ container: "bg-info-soft border-info-border text-info-text",
21
+ icon: /* @__PURE__ */ React.createElement(Info, { size: 16, className: "shrink-0 mt-0.5" }),
22
+ actionColor: "text-info-text hover:bg-info-soft/60"
23
+ },
24
+ neutral: {
25
+ container: "bg-neutral-soft border-neutral-border text-neutral-text",
26
+ icon: /* @__PURE__ */ React.createElement(Info, { size: 16, className: "shrink-0 mt-0.5" }),
27
+ actionColor: "text-neutral-text hover:bg-neutral-soft/60"
28
+ }
29
+ };
30
+ function Alert({
31
+ variant = "info",
32
+ title,
33
+ children,
34
+ onClose,
35
+ action,
36
+ icon,
37
+ hideIcon = false,
38
+ className = ""
39
+ }) {
40
+ const { container, icon: defaultIcon, actionColor } = VARIANTS[variant];
41
+ const iconEl = hideIcon ? null : icon != null ? icon : defaultIcon;
42
+ return /* @__PURE__ */ React.createElement(
43
+ "div",
44
+ {
45
+ role: variant === "danger" ? "alert" : "status",
46
+ className: ["flex items-start gap-3 px-4 py-3 rounded-(--radius-card) border text-label", container, className].join(" ")
47
+ },
48
+ iconEl,
49
+ /* @__PURE__ */ React.createElement("div", { className: "flex-1 min-w-0" }, title && /* @__PURE__ */ React.createElement("p", { className: "font-medium leading-snug" }, title), children && /* @__PURE__ */ React.createElement("div", { className: ["leading-snug", title ? "mt-0.5 opacity-80" : ""].join(" ") }, children), action && /* @__PURE__ */ React.createElement(
50
+ "button",
51
+ {
52
+ type: "button",
53
+ onClick: action.onClick,
54
+ className: ["mt-2 inline-flex text-caption font-semibold px-2 py-1 -mx-2 rounded transition-colors", actionColor].join(" ")
55
+ },
56
+ action.label
57
+ )),
58
+ onClose && /* @__PURE__ */ React.createElement(
59
+ "button",
60
+ {
61
+ type: "button",
62
+ onClick: onClose,
63
+ className: "shrink-0 opacity-60 hover:opacity-100 transition-opacity p-0.5 -m-0.5 rounded",
64
+ "aria-label": "Fechar"
65
+ },
66
+ /* @__PURE__ */ React.createElement(X, { size: 14 })
67
+ )
68
+ );
69
+ }
70
+ export {
71
+ Alert
72
+ };
@@ -0,0 +1,45 @@
1
+ import * as react from 'react';
2
+
3
+ /**
4
+ * Avatar — representação visual de usuário/entidade.
5
+ *
6
+ * Uso:
7
+ * <Avatar src="/u.jpg" alt="Marcos" />
8
+ * <Avatar name="Marcos Silva" /> // gera iniciais
9
+ * <Avatar name="A" size="lg" />
10
+ * <Avatar name="J" status="active" /> // dot indicador
11
+ *
12
+ * AvatarGroup — empilha avatares com overlap.
13
+ * <AvatarGroup max={3}>
14
+ * <Avatar name="A" />
15
+ * <Avatar name="B" />
16
+ * ...
17
+ * </AvatarGroup>
18
+ */
19
+ type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
20
+ type AvatarStatus = 'active' | 'inactive' | 'pending' | 'error';
21
+ interface AvatarProps {
22
+ src?: string;
23
+ alt?: string;
24
+ /** Nome completo — gera iniciais (até 2 letras). */
25
+ name?: string;
26
+ size?: AvatarSize;
27
+ status?: AvatarStatus;
28
+ /** Cor de fundo. default = brand-primary. */
29
+ variant?: 'brand' | 'neutral';
30
+ className?: string;
31
+ }
32
+ declare function initials(name: string): string;
33
+ declare function Avatar({ src, alt, name, size, status, variant, className, }: AvatarProps): react.JSX.Element;
34
+ interface AvatarGroupProps {
35
+ /** Máximo de avatares visíveis; o resto vira `+N`. default = 3. */
36
+ max?: number;
37
+ /** Sobreposição em px. default depende do size. */
38
+ spacing?: 'tight' | 'normal' | 'loose';
39
+ size?: AvatarSize;
40
+ children: React.ReactNode;
41
+ className?: string;
42
+ }
43
+ declare function AvatarGroup({ max, spacing, size, children, className, }: AvatarGroupProps): react.JSX.Element;
44
+
45
+ export { Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type AvatarStatus, initials };
@@ -0,0 +1,97 @@
1
+ import "../chunk-ORMEWXMH.js";
2
+ import { Children, isValidElement, cloneElement } from "react";
3
+ const SIZE_CLASSES = {
4
+ xs: "size-6 text-[10px]",
5
+ sm: "size-8 text-caption",
6
+ md: "size-10 text-label",
7
+ lg: "size-12 text-body",
8
+ xl: "size-16 text-heading-sm"
9
+ };
10
+ const STATUS_DOT_SIZE = {
11
+ xs: "size-1.5",
12
+ sm: "size-2",
13
+ md: "size-2.5",
14
+ lg: "size-3",
15
+ xl: "size-3.5"
16
+ };
17
+ const STATUS_COLOR = {
18
+ active: "bg-success",
19
+ inactive: "bg-state-disabled-text",
20
+ pending: "bg-warning",
21
+ error: "bg-danger"
22
+ };
23
+ function initials(name) {
24
+ const parts = name.trim().split(/\s+/).filter(Boolean);
25
+ if (parts.length === 0) return "?";
26
+ if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
27
+ return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
28
+ }
29
+ function Avatar({
30
+ src,
31
+ alt,
32
+ name,
33
+ size = "md",
34
+ status,
35
+ variant = "brand",
36
+ className = ""
37
+ }) {
38
+ var _a;
39
+ const showImage = !!src;
40
+ const label = (_a = alt != null ? alt : name) != null ? _a : "Avatar";
41
+ const bgClass = variant === "brand" ? "bg-brand-primary text-brand-on-primary" : "bg-surface-raised text-fg-secondary";
42
+ return /* @__PURE__ */ React.createElement("div", { className: ["relative inline-flex shrink-0", className].join(" ") }, /* @__PURE__ */ React.createElement(
43
+ "div",
44
+ {
45
+ className: [
46
+ "inline-flex items-center justify-center rounded-full overflow-hidden font-semibold select-none",
47
+ SIZE_CLASSES[size],
48
+ showImage ? "" : bgClass
49
+ ].join(" "),
50
+ "aria-label": label,
51
+ role: "img"
52
+ },
53
+ showImage ? /* @__PURE__ */ React.createElement("img", { src, alt: label, className: "size-full object-cover" }) : /* @__PURE__ */ React.createElement("span", null, initials(name != null ? name : "?"))
54
+ ), status && /* @__PURE__ */ React.createElement(
55
+ "span",
56
+ {
57
+ className: [
58
+ "absolute bottom-0 right-0 rounded-full ring-2 ring-surface-default",
59
+ STATUS_DOT_SIZE[size],
60
+ STATUS_COLOR[status]
61
+ ].join(" "),
62
+ "aria-label": `status: ${status}`
63
+ }
64
+ ));
65
+ }
66
+ const SPACING_CLASS = {
67
+ tight: "-ml-3",
68
+ normal: "-ml-2",
69
+ loose: "-ml-1"
70
+ };
71
+ function AvatarGroup({
72
+ max = 3,
73
+ spacing = "normal",
74
+ size = "md",
75
+ children,
76
+ className = ""
77
+ }) {
78
+ const items = Children.toArray(children).filter(isValidElement);
79
+ const visible = items.slice(0, max);
80
+ const overflow = items.length - visible.length;
81
+ return /* @__PURE__ */ React.createElement("div", { className: ["inline-flex items-center", className].join(" "), role: "group" }, visible.map((child, idx) => {
82
+ var _a;
83
+ return /* @__PURE__ */ React.createElement("div", { key: idx, className: idx === 0 ? "" : SPACING_CLASS[spacing] }, cloneElement(child, { size: (_a = child.props.size) != null ? _a : size }));
84
+ }), overflow > 0 && /* @__PURE__ */ React.createElement("div", { className: SPACING_CLASS[spacing] }, /* @__PURE__ */ React.createElement(
85
+ Avatar,
86
+ {
87
+ name: `+${overflow}`,
88
+ variant: "neutral",
89
+ size
90
+ }
91
+ )));
92
+ }
93
+ export {
94
+ Avatar,
95
+ AvatarGroup,
96
+ initials
97
+ };
@@ -0,0 +1,45 @@
1
+ import * as react from 'react';
2
+
3
+ declare const LABEL_VARIANTS: {
4
+ readonly default: "bg-surface-default text-fg-muted border border-stroke-default";
5
+ readonly primary: "bg-brand-primary text-brand-on-primary";
6
+ readonly success: "bg-success-soft text-success-text border border-success-border";
7
+ readonly warning: "bg-warning-soft text-warning-text border border-warning-border";
8
+ readonly danger: "bg-danger-soft text-danger-text border border-danger-border";
9
+ readonly info: "bg-info-soft text-info-text border border-info-border";
10
+ readonly neutral: "bg-neutral-soft text-neutral-text border border-neutral-border";
11
+ };
12
+ declare const STATUS_VARIANTS: {
13
+ readonly active: {
14
+ readonly dot: "bg-success";
15
+ readonly text: "text-success-text";
16
+ };
17
+ readonly inactive: {
18
+ readonly dot: "bg-state-disabled-text";
19
+ readonly text: "text-state-disabled-text";
20
+ };
21
+ readonly pending: {
22
+ readonly dot: "bg-warning";
23
+ readonly text: "text-warning-text";
24
+ };
25
+ readonly error: {
26
+ readonly dot: "bg-danger";
27
+ readonly text: "text-danger-text";
28
+ };
29
+ };
30
+ type BadgeVariant = keyof typeof LABEL_VARIANTS | keyof typeof STATUS_VARIANTS | 'count' | 'dot';
31
+ type BadgeSize = 'sm' | 'md';
32
+ interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
33
+ variant?: BadgeVariant;
34
+ size?: BadgeSize;
35
+ /** Para variant="count": número exibido. Acima de `max` mostra "max+". */
36
+ count?: number;
37
+ /** Limite pra count overflow. default = 99. */
38
+ max?: number;
39
+ /** Para variant="dot": cor da bolinha (default = brand-primary). */
40
+ dotColor?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
41
+ children?: React.ReactNode;
42
+ }
43
+ declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
44
+
45
+ export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant };