@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
@@ -0,0 +1,13 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ type Props = {
5
+ label?: string;
6
+ hint?: string;
7
+ error?: string;
8
+ required?: boolean;
9
+ children: ReactNode;
10
+ };
11
+ declare function FormField({ label, hint, error, required, children }: Props): react.JSX.Element;
12
+
13
+ export { FormField };
@@ -0,0 +1,29 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { AlertCircle } from "lucide-react-native";
3
+ import { cloneElement, isValidElement } from "react";
4
+ import { View } from "react-native";
5
+ import { Text } from "./text.js";
6
+ import { useTheme } from "./theme.js";
7
+ function FormField({ label, hint, error, required, children }) {
8
+ var _a, _b;
9
+ const t = useTheme();
10
+ const a11yLabel = label ? required ? `${label}, obrigat\xF3rio` : label : void 0;
11
+ const field = isValidElement(children) ? cloneElement(children, {
12
+ // só injeta se o controle não trouxe o seu próprio
13
+ error: (_a = children.props.error) != null ? _a : error ? true : void 0,
14
+ accessibilityLabel: (_b = children.props.accessibilityLabel) != null ? _b : a11yLabel
15
+ }) : children;
16
+ return /* @__PURE__ */ React.createElement(View, { style: { gap: 6 } }, label ? /* @__PURE__ */ React.createElement(View, { style: { flexDirection: "row", alignItems: "center", gap: 4 } }, /* @__PURE__ */ React.createElement(Text, { variant: "label", style: { flexShrink: 1 } }, label), required ? /* @__PURE__ */ React.createElement(Text, { variant: "label", color: "danger", accessibilityElementsHidden: true, importantForAccessibility: "no" }, "*") : null) : null, field, error ? /* @__PURE__ */ React.createElement(
17
+ View,
18
+ {
19
+ style: { flexDirection: "row", alignItems: "flex-start", gap: 4 },
20
+ accessibilityLiveRegion: "polite",
21
+ accessibilityRole: "alert"
22
+ },
23
+ /* @__PURE__ */ React.createElement(AlertCircle, { size: 14, color: t["--danger-text"], style: { marginTop: 2 } }),
24
+ /* @__PURE__ */ React.createElement(Text, { variant: "caption", color: "danger", style: { flex: 1 } }, error)
25
+ ) : hint ? /* @__PURE__ */ React.createElement(Text, { variant: "caption", color: "muted" }, hint) : null);
26
+ }
27
+ export {
28
+ FormField
29
+ };
@@ -0,0 +1,19 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ declare function SavingBar({ label, onSave, onDiscard, discardLabel, message, loading, disabled, visible, }: {
5
+ label?: string;
6
+ onSave: () => void;
7
+ onDiscard?: () => void;
8
+ discardLabel?: string;
9
+ message?: string;
10
+ loading?: boolean;
11
+ disabled?: boolean;
12
+ visible?: boolean;
13
+ }): react.JSX.Element | null;
14
+ declare function FormScreen({ children, saveBar }: {
15
+ children: ReactNode;
16
+ saveBar?: ReactNode;
17
+ }): react.JSX.Element;
18
+
19
+ export { FormScreen, SavingBar };
@@ -0,0 +1,88 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { KeyboardAvoidingView, Platform, ScrollView, Text, View } from "react-native";
3
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
4
+ import { Button } from "./button.js";
5
+ import { useTheme } from "./theme.js";
6
+ function SavingBar({
7
+ label = "Salvar",
8
+ onSave,
9
+ onDiscard,
10
+ discardLabel = "Descartar",
11
+ message,
12
+ loading,
13
+ disabled,
14
+ visible = true
15
+ }) {
16
+ const t = useTheme();
17
+ const insets = useSafeAreaInsets();
18
+ if (!visible) return null;
19
+ return /* @__PURE__ */ React.createElement(
20
+ View,
21
+ {
22
+ style: {
23
+ borderTopWidth: 1,
24
+ borderTopColor: t["--border-subtle"],
25
+ backgroundColor: t["--surface-default"],
26
+ paddingTop: 16,
27
+ paddingHorizontal: 16,
28
+ // Respeita o home indicator do iPhone; soma 16 de respiro quando não há inset.
29
+ paddingBottom: insets.bottom > 0 ? insets.bottom : 16,
30
+ gap: 8
31
+ }
32
+ },
33
+ message ? /* @__PURE__ */ React.createElement(
34
+ Text,
35
+ {
36
+ style: {
37
+ color: t["--text-muted"],
38
+ fontSize: 13
39
+ }
40
+ },
41
+ message
42
+ ) : null,
43
+ /* @__PURE__ */ React.createElement(
44
+ Button,
45
+ {
46
+ label,
47
+ variant: "primary",
48
+ fullWidth: true,
49
+ onPress: onSave,
50
+ loading,
51
+ disabled
52
+ }
53
+ ),
54
+ onDiscard ? /* @__PURE__ */ React.createElement(
55
+ Button,
56
+ {
57
+ label: discardLabel,
58
+ variant: "secondary",
59
+ fullWidth: true,
60
+ onPress: onDiscard,
61
+ disabled: loading
62
+ }
63
+ ) : null
64
+ );
65
+ }
66
+ function FormScreen({ children, saveBar }) {
67
+ const t = useTheme();
68
+ return /* @__PURE__ */ React.createElement(
69
+ KeyboardAvoidingView,
70
+ {
71
+ style: { flex: 1, backgroundColor: t["--surface-page"] },
72
+ behavior: Platform.OS === "ios" ? "padding" : void 0
73
+ },
74
+ /* @__PURE__ */ React.createElement(
75
+ ScrollView,
76
+ {
77
+ contentContainerStyle: { padding: 16, gap: 16 },
78
+ keyboardShouldPersistTaps: "handled"
79
+ },
80
+ children
81
+ ),
82
+ saveBar
83
+ );
84
+ }
85
+ export {
86
+ FormScreen,
87
+ SavingBar
88
+ };
@@ -0,0 +1,8 @@
1
+ import * as react from 'react';
2
+
3
+ interface GoogleIconProps {
4
+ size?: number;
5
+ }
6
+ declare function GoogleIcon({ size }: GoogleIconProps): react.JSX.Element;
7
+
8
+ export { GoogleIcon, type GoogleIconProps };
@@ -0,0 +1,32 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import Svg, { Path } from "react-native-svg";
3
+ function GoogleIcon({ size = 18 }) {
4
+ return /* @__PURE__ */ React.createElement(Svg, { width: size, height: size, viewBox: "0 0 48 48" }, /* @__PURE__ */ React.createElement(
5
+ Path,
6
+ {
7
+ fill: "#FFC107",
8
+ d: "M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z"
9
+ }
10
+ ), /* @__PURE__ */ React.createElement(
11
+ Path,
12
+ {
13
+ fill: "#FF3D00",
14
+ d: "M6.306 14.691l6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z"
15
+ }
16
+ ), /* @__PURE__ */ React.createElement(
17
+ Path,
18
+ {
19
+ fill: "#4CAF50",
20
+ d: "M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238C29.211 35.091 26.715 36 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z"
21
+ }
22
+ ), /* @__PURE__ */ React.createElement(
23
+ Path,
24
+ {
25
+ fill: "#1976D2",
26
+ d: "M43.611 20.083H42V20H24v8h11.303c-0.792 2.237-2.231 4.166-4.087 5.571l6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z"
27
+ }
28
+ ));
29
+ }
30
+ export {
31
+ GoogleIcon
32
+ };
@@ -0,0 +1,18 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { PressableProps } from 'react-native';
4
+
5
+ type IconButtonVariant = 'filled' | 'outline' | 'ghost';
6
+ type IconButtonColor = 'primary' | 'neutral' | 'danger';
7
+ type IconButtonSize = 'sm' | 'md' | 'lg';
8
+ type Props = Omit<PressableProps, 'children' | 'style'> & {
9
+ icon: ReactNode;
10
+ accessibilityLabel: string;
11
+ variant?: IconButtonVariant;
12
+ color?: IconButtonColor;
13
+ size?: IconButtonSize;
14
+ loading?: boolean;
15
+ };
16
+ declare function IconButton({ icon, accessibilityLabel, variant, color, size, loading, disabled, ...rest }: Props): react.JSX.Element;
17
+
18
+ export { IconButton, type IconButtonColor, type IconButtonSize, type IconButtonVariant };
@@ -0,0 +1,80 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "../../../chunk-ORMEWXMH.js";
6
+ import {
7
+ ActivityIndicator,
8
+ Pressable,
9
+ StyleSheet,
10
+ View
11
+ } from "react-native";
12
+ import { useTheme } from "./theme.js";
13
+ const BOX = { sm: 36, md: 44, lg: 52 };
14
+ function IconButton(_a) {
15
+ var _b = _a, {
16
+ icon,
17
+ accessibilityLabel,
18
+ variant = "ghost",
19
+ color = "neutral",
20
+ size = "md",
21
+ loading = false,
22
+ disabled
23
+ } = _b, rest = __objRest(_b, [
24
+ "icon",
25
+ "accessibilityLabel",
26
+ "variant",
27
+ "color",
28
+ "size",
29
+ "loading",
30
+ "disabled"
31
+ ]);
32
+ const t = useTheme();
33
+ const isDisabled = disabled || loading;
34
+ const ink = {
35
+ primary: t["--brand-primary"],
36
+ neutral: t["--icon-default"],
37
+ danger: t["--danger"]
38
+ }[color];
39
+ const onInk = {
40
+ primary: t["--brand-on-primary"],
41
+ neutral: t["--text-primary"],
42
+ danger: t["--brand-on-primary"]
43
+ }[color];
44
+ const skin = {
45
+ filled: { bg: ink, fg: onInk },
46
+ outline: { bg: t["--surface-default"], border: ink, fg: ink },
47
+ ghost: { bg: "transparent", fg: ink }
48
+ }[variant];
49
+ const box = BOX[size];
50
+ const hit = Math.max(0, Math.round((44 - box) / 2)) + 4;
51
+ return /* @__PURE__ */ React.createElement(
52
+ Pressable,
53
+ __spreadValues({
54
+ accessibilityRole: "button",
55
+ accessibilityLabel,
56
+ accessibilityState: { disabled: !!isDisabled, busy: loading },
57
+ disabled: isDisabled,
58
+ hitSlop: hit,
59
+ style: ({ pressed }) => __spreadProps(__spreadValues({}, styles.base), {
60
+ width: box,
61
+ height: box,
62
+ backgroundColor: skin.bg,
63
+ borderColor: skin.border,
64
+ borderWidth: skin.border ? 1 : 0,
65
+ opacity: isDisabled ? 0.5 : pressed ? 0.8 : 1
66
+ })
67
+ }, rest),
68
+ loading ? /* @__PURE__ */ React.createElement(ActivityIndicator, { color: skin.fg }) : /* @__PURE__ */ React.createElement(View, null, icon)
69
+ );
70
+ }
71
+ const styles = StyleSheet.create({
72
+ base: {
73
+ alignItems: "center",
74
+ justifyContent: "center",
75
+ borderRadius: 12
76
+ }
77
+ });
78
+ export {
79
+ IconButton
80
+ };
@@ -0,0 +1,11 @@
1
+ import * as react from 'react';
2
+ import { LucideIcon } from 'lucide-react-native';
3
+
4
+ type Props = {
5
+ icon: LucideIcon;
6
+ size?: number;
7
+ color?: string;
8
+ };
9
+ declare function Icon({ icon: Glyph, size, color }: Props): react.JSX.Element;
10
+
11
+ export { Icon };
@@ -0,0 +1,9 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { useTheme } from "./theme.js";
3
+ function Icon({ icon: Glyph, size = 24, color }) {
4
+ const t = useTheme();
5
+ return /* @__PURE__ */ React.createElement(Glyph, { size, color: color != null ? color : t["--icon-default"] });
6
+ }
7
+ export {
8
+ Icon
9
+ };
@@ -0,0 +1,12 @@
1
+ import * as react from 'react';
2
+
3
+ type Props = {
4
+ value: string[];
5
+ onChange: (urls: string[]) => void;
6
+ onUpload: (localUri: string) => Promise<string>;
7
+ max?: number;
8
+ onError?: (e: unknown) => void;
9
+ };
10
+ declare function ImageUpload({ value, onChange, onUpload, max, onError }: Props): react.JSX.Element;
11
+
12
+ export { ImageUpload };
@@ -0,0 +1,95 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { Image } from "expo-image";
3
+ import * as ImagePicker from "expo-image-picker";
4
+ import { ImagePlus, X } from "lucide-react-native";
5
+ import { useState } from "react";
6
+ import { ActivityIndicator, Pressable, View } from "react-native";
7
+ import { Text } from "./text.js";
8
+ import { useTheme } from "./theme.js";
9
+ const TILE = 88;
10
+ function ImageUpload({ value, onChange, onUpload, max = 10, onError }) {
11
+ const t = useTheme();
12
+ const [busy, setBusy] = useState(false);
13
+ async function pick() {
14
+ var _a;
15
+ try {
16
+ const perm = await ImagePicker.requestMediaLibraryPermissionsAsync();
17
+ if (!perm.granted) {
18
+ onError == null ? void 0 : onError(new Error("Permiss\xE3o de acesso \xE0s fotos negada."));
19
+ return;
20
+ }
21
+ const result = await ImagePicker.launchImageLibraryAsync({
22
+ mediaTypes: ["images"],
23
+ quality: 0.7
24
+ });
25
+ if (result.canceled || !((_a = result.assets) == null ? void 0 : _a[0])) return;
26
+ setBusy(true);
27
+ const url = await onUpload(result.assets[0].uri);
28
+ onChange([...value, url]);
29
+ } catch (e) {
30
+ onError == null ? void 0 : onError(e);
31
+ } finally {
32
+ setBusy(false);
33
+ }
34
+ }
35
+ return /* @__PURE__ */ React.createElement(View, { style: { flexDirection: "row", flexWrap: "wrap", gap: 8 } }, value.map((url) => /* @__PURE__ */ React.createElement(
36
+ View,
37
+ {
38
+ key: url,
39
+ style: {
40
+ width: TILE,
41
+ height: TILE,
42
+ borderRadius: 12,
43
+ overflow: "hidden",
44
+ backgroundColor: t["--surface-raised"]
45
+ }
46
+ },
47
+ /* @__PURE__ */ React.createElement(Image, { source: { uri: url }, style: { width: "100%", height: "100%" }, contentFit: "cover" }),
48
+ /* @__PURE__ */ React.createElement(
49
+ Pressable,
50
+ {
51
+ onPress: () => onChange(value.filter((u) => u !== url)),
52
+ hitSlop: 11,
53
+ accessibilityRole: "button",
54
+ accessibilityLabel: "Remover foto",
55
+ style: {
56
+ position: "absolute",
57
+ top: 4,
58
+ right: 4,
59
+ width: 22,
60
+ height: 22,
61
+ borderRadius: 11,
62
+ alignItems: "center",
63
+ justifyContent: "center",
64
+ backgroundColor: "rgba(0, 0, 0, 0.55)"
65
+ }
66
+ },
67
+ /* @__PURE__ */ React.createElement(X, { size: 14, color: "#ffffff" })
68
+ )
69
+ )), value.length < max ? /* @__PURE__ */ React.createElement(
70
+ Pressable,
71
+ {
72
+ onPress: pick,
73
+ disabled: busy,
74
+ accessibilityRole: "button",
75
+ accessibilityLabel: busy ? "Enviando foto" : "Adicionar foto",
76
+ accessibilityState: { busy, disabled: busy },
77
+ style: {
78
+ width: TILE,
79
+ height: TILE,
80
+ borderRadius: 12,
81
+ borderWidth: 1,
82
+ borderStyle: "dashed",
83
+ borderColor: t["--border-default"],
84
+ alignItems: "center",
85
+ justifyContent: "center",
86
+ gap: 4,
87
+ backgroundColor: t["--surface-default"]
88
+ }
89
+ },
90
+ busy ? /* @__PURE__ */ React.createElement(ActivityIndicator, { color: t["--brand-primary"] }) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ImagePlus, { size: 22, color: t["--text-muted"] }), /* @__PURE__ */ React.createElement(Text, { variant: "caption", color: "muted" }, "Foto"))
91
+ ) : null);
92
+ }
93
+ export {
94
+ ImageUpload
95
+ };
@@ -0,0 +1,45 @@
1
+ export { DSThemeProvider, ThemeTokens, useTheme } from './theme.js';
2
+ export { Text, TextColor, TextVariant } from './text.js';
3
+ export { Button, ButtonSize, ButtonVariant } from './button.js';
4
+ export { Input } from './input.js';
5
+ export { Badge, BadgeTone } from './badge.js';
6
+ export { Card } from './card.js';
7
+ export { EmptyState } from './empty-state.js';
8
+ export { Spinner } from './spinner.js';
9
+ export { Icon } from './icon.js';
10
+ export { GoogleIcon, GoogleIconProps } from './google-icon.js';
11
+ export { DangerZone, DangerZoneProps } from './danger-zone.js';
12
+ export { Sheet } from './sheet.js';
13
+ export { ChoiceCard } from './choice-card.js';
14
+ export { CurrencyInput } from './currency-input.js';
15
+ export { DatePicker, DatePickerProps } from './date-picker.js';
16
+ export { Select, SelectOption } from './select.js';
17
+ export { SegmentedControl, Switch } from './switch.js';
18
+ export { Stepper } from './stepper.js';
19
+ export { TextArea } from './textarea.js';
20
+ export { FormField } from './form-field.js';
21
+ export { ListItem } from './list-item.js';
22
+ export { FormScreen, SavingBar } from './form-screen.js';
23
+ export { ImageUpload } from './image-upload.js';
24
+ export { Alert, AlertProps, AlertVariant } from './alert.js';
25
+ export { ToastFn, ToastOptions, ToastPosition, ToastVariant, Toaster, ToasterProps, toast } from './toaster.js';
26
+ export { Modal } from './modal.js';
27
+ export { Skeleton, SkeletonText } from './skeleton.js';
28
+ export { Checkbox } from './checkbox.js';
29
+ export { Radio, RadioGroup } from './radio.js';
30
+ export { Divider } from './divider.js';
31
+ export { Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, AvatarSize, AvatarStatus, initials } from './avatar.js';
32
+ export { IconButton, IconButtonColor, IconButtonSize, IconButtonVariant } from './icon-button.js';
33
+ export { Search } from './search.js';
34
+ export { FAB, FABProps, FABProvider, useFAB } from './fab.js';
35
+ export { Accordion, AccordionItem, AccordionItemProps, AccordionProps } from './accordion.js';
36
+ export { PaywallBanner, PaywallBannerProps } from './paywall-banner.js';
37
+ export { PaywallContent, PaywallContentProps, PaywallIcon, PaywallReason } from './paywall.js';
38
+ export { Menu, MenuItem } from './menu.js';
39
+ export { ContextMenu } from './context-menu.js';
40
+ export { Slider } from './slider.js';
41
+ export { Chip } from './chips.js';
42
+ export { FilterChip, FilterChipGroup } from './filter-chip.js';
43
+ import 'react';
44
+ import 'react-native';
45
+ import 'lucide-react-native';
@@ -0,0 +1,100 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { DSThemeProvider, useTheme } from "./theme.js";
3
+ import { Text } from "./text.js";
4
+ import { Button } from "./button.js";
5
+ import { Input } from "./input.js";
6
+ import { Badge } from "./badge.js";
7
+ import { Card } from "./card.js";
8
+ import { EmptyState } from "./empty-state.js";
9
+ import { Spinner } from "./spinner.js";
10
+ import { Icon } from "./icon.js";
11
+ import { GoogleIcon } from "./google-icon.js";
12
+ import { DangerZone } from "./danger-zone.js";
13
+ import { Sheet } from "./sheet.js";
14
+ import { ChoiceCard } from "./choice-card.js";
15
+ import { CurrencyInput } from "./currency-input.js";
16
+ import { DatePicker } from "./date-picker.js";
17
+ import { Select } from "./select.js";
18
+ import { Switch, SegmentedControl } from "./switch.js";
19
+ import { Stepper } from "./stepper.js";
20
+ import { TextArea } from "./textarea.js";
21
+ import { FormField } from "./form-field.js";
22
+ import { ListItem } from "./list-item.js";
23
+ import { SavingBar, FormScreen } from "./form-screen.js";
24
+ import { ImageUpload } from "./image-upload.js";
25
+ import { Alert } from "./alert.js";
26
+ import { Toaster, toast } from "./toaster.js";
27
+ import { Modal } from "./modal.js";
28
+ import { Skeleton, SkeletonText } from "./skeleton.js";
29
+ import { Checkbox } from "./checkbox.js";
30
+ import { Radio, RadioGroup } from "./radio.js";
31
+ import { Divider } from "./divider.js";
32
+ import { Avatar, AvatarGroup, initials } from "./avatar.js";
33
+ import { IconButton } from "./icon-button.js";
34
+ import { Search } from "./search.js";
35
+ import { FAB, FABProvider, useFAB } from "./fab.js";
36
+ import { Accordion, AccordionItem } from "./accordion.js";
37
+ import { PaywallBanner } from "./paywall-banner.js";
38
+ import { PaywallContent } from "./paywall.js";
39
+ import { Menu, MenuItem } from "./menu.js";
40
+ import { ContextMenu } from "./context-menu.js";
41
+ import { Slider } from "./slider.js";
42
+ import { Chip } from "./chips.js";
43
+ import { FilterChip, FilterChipGroup } from "./filter-chip.js";
44
+ export {
45
+ Accordion,
46
+ AccordionItem,
47
+ Alert,
48
+ Avatar,
49
+ AvatarGroup,
50
+ Badge,
51
+ Button,
52
+ Card,
53
+ Checkbox,
54
+ Chip,
55
+ ChoiceCard,
56
+ ContextMenu,
57
+ CurrencyInput,
58
+ DSThemeProvider,
59
+ DangerZone,
60
+ DatePicker,
61
+ Divider,
62
+ EmptyState,
63
+ FAB,
64
+ FABProvider,
65
+ FilterChip,
66
+ FilterChipGroup,
67
+ FormField,
68
+ FormScreen,
69
+ GoogleIcon,
70
+ Icon,
71
+ IconButton,
72
+ ImageUpload,
73
+ Input,
74
+ ListItem,
75
+ Menu,
76
+ MenuItem,
77
+ Modal,
78
+ PaywallBanner,
79
+ PaywallContent,
80
+ Radio,
81
+ RadioGroup,
82
+ SavingBar,
83
+ Search,
84
+ SegmentedControl,
85
+ Select,
86
+ Sheet,
87
+ Skeleton,
88
+ SkeletonText,
89
+ Slider,
90
+ Spinner,
91
+ Stepper,
92
+ Switch,
93
+ Text,
94
+ TextArea,
95
+ Toaster,
96
+ initials,
97
+ toast,
98
+ useFAB,
99
+ useTheme
100
+ };
@@ -0,0 +1,17 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { TextInputProps } from 'react-native';
4
+
5
+ type Props = TextInputProps & {
6
+ label?: string;
7
+ error?: string | boolean;
8
+ /** Conteúdo dentro do campo, à esquerda (ícone ou texto, ex.: "R$"). */
9
+ prefix?: ReactNode;
10
+ /** Conteúdo dentro do campo, à direita (ícone ou texto). */
11
+ suffix?: ReactNode;
12
+ /** Mostra botão X que limpa o valor (via onChangeText('')) quando há texto. */
13
+ clearable?: boolean;
14
+ };
15
+ declare function Input({ label, error, prefix, suffix, clearable, style, onFocus, onBlur, onChangeText, accessibilityLabel, ...rest }: Props): react.JSX.Element;
16
+
17
+ export { Input };