@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,92 @@
1
+ import {
2
+ __objRest,
3
+ __spreadValues
4
+ } from "../../../chunk-ORMEWXMH.js";
5
+ import { Pressable, StyleSheet, TextInput, View } from "react-native";
6
+ import { Search as SearchIcon, X } from "lucide-react-native";
7
+ import { useTheme } from "./theme.js";
8
+ function Search(_a) {
9
+ var _b = _a, {
10
+ value,
11
+ onChangeText,
12
+ placeholder = "Search",
13
+ onClear,
14
+ onSubmit,
15
+ action,
16
+ accessibilityLabel
17
+ } = _b, rest = __objRest(_b, [
18
+ "value",
19
+ "onChangeText",
20
+ "placeholder",
21
+ "onClear",
22
+ "onSubmit",
23
+ "action",
24
+ "accessibilityLabel"
25
+ ]);
26
+ const t = useTheme();
27
+ const hasValue = !!value;
28
+ function handleClear() {
29
+ onChangeText("");
30
+ onClear == null ? void 0 : onClear();
31
+ }
32
+ return /* @__PURE__ */ React.createElement(
33
+ View,
34
+ {
35
+ style: [
36
+ styles.wrap,
37
+ { backgroundColor: t["--surface-raised"], borderColor: t["--border-default"] }
38
+ ]
39
+ },
40
+ /* @__PURE__ */ React.createElement(SearchIcon, { size: 18, color: t["--icon-default"] }),
41
+ /* @__PURE__ */ React.createElement(
42
+ TextInput,
43
+ __spreadValues({
44
+ value,
45
+ onChangeText,
46
+ placeholder,
47
+ placeholderTextColor: t["--text-muted"],
48
+ accessibilityLabel: accessibilityLabel != null ? accessibilityLabel : placeholder,
49
+ returnKeyType: "search",
50
+ onSubmitEditing: (e) => onSubmit == null ? void 0 : onSubmit(e.nativeEvent.text),
51
+ style: [styles.input, { color: t["--text-primary"] }]
52
+ }, rest)
53
+ ),
54
+ action ? /* @__PURE__ */ React.createElement(
55
+ Pressable,
56
+ {
57
+ accessibilityRole: "button",
58
+ accessibilityLabel: action.accessibilityLabel,
59
+ hitSlop: 8,
60
+ onPress: action.onPress,
61
+ style: ({ pressed }) => ({ opacity: pressed ? 0.6 : 1 })
62
+ },
63
+ action.icon
64
+ ) : null,
65
+ hasValue ? /* @__PURE__ */ React.createElement(
66
+ Pressable,
67
+ {
68
+ accessibilityRole: "button",
69
+ accessibilityLabel: "Clear search",
70
+ hitSlop: 8,
71
+ onPress: handleClear,
72
+ style: ({ pressed }) => ({ opacity: pressed ? 0.6 : 1 })
73
+ },
74
+ /* @__PURE__ */ React.createElement(X, { size: 18, color: t["--icon-default"] })
75
+ ) : null
76
+ );
77
+ }
78
+ const styles = StyleSheet.create({
79
+ wrap: {
80
+ flexDirection: "row",
81
+ alignItems: "center",
82
+ height: 48,
83
+ borderRadius: 12,
84
+ borderWidth: 1,
85
+ paddingHorizontal: 12,
86
+ gap: 8
87
+ },
88
+ input: { flex: 1, fontSize: 16, padding: 0 }
89
+ });
90
+ export {
91
+ Search
92
+ };
@@ -0,0 +1,17 @@
1
+ import * as react from 'react';
2
+
3
+ type SelectOption = {
4
+ label: string;
5
+ value: string;
6
+ disabled?: boolean;
7
+ };
8
+ type Props = {
9
+ options: SelectOption[];
10
+ value: string | null;
11
+ onChange: (value: string) => void;
12
+ placeholder?: string;
13
+ disabled?: boolean;
14
+ };
15
+ declare function Select({ options, value, onChange, placeholder, disabled, }: Props): react.JSX.Element;
16
+
17
+ export { Select, type SelectOption };
@@ -0,0 +1,86 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { Check, ChevronDown } from "lucide-react-native";
3
+ import { useState } from "react";
4
+ import { Pressable, ScrollView } from "react-native";
5
+ import { Sheet } from "./sheet.js";
6
+ import { Text } from "./text.js";
7
+ import { useTheme } from "./theme.js";
8
+ function Select({
9
+ options,
10
+ value,
11
+ onChange,
12
+ placeholder = "Selecionar",
13
+ disabled = false
14
+ }) {
15
+ var _a;
16
+ const t = useTheme();
17
+ const [open, setOpen] = useState(false);
18
+ const selected = (_a = options.find((o) => o.value === value)) != null ? _a : null;
19
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
20
+ Pressable,
21
+ {
22
+ onPress: () => {
23
+ if (disabled) return;
24
+ setOpen(true);
25
+ },
26
+ disabled,
27
+ accessibilityRole: "button",
28
+ accessibilityState: { expanded: open, disabled },
29
+ accessibilityLabel: selected ? selected.label : placeholder,
30
+ style: {
31
+ height: 48,
32
+ borderRadius: 12,
33
+ borderWidth: 1,
34
+ borderColor: t["--border-default"],
35
+ backgroundColor: t["--surface-default"],
36
+ paddingHorizontal: 16,
37
+ flexDirection: "row",
38
+ alignItems: "center",
39
+ justifyContent: "space-between",
40
+ opacity: disabled ? 0.5 : 1
41
+ }
42
+ },
43
+ /* @__PURE__ */ React.createElement(Text, { variant: "body", color: selected ? "primary" : "muted" }, selected ? selected.label : placeholder),
44
+ /* @__PURE__ */ React.createElement(ChevronDown, { size: 20, color: t["--text-muted"] })
45
+ ), /* @__PURE__ */ React.createElement(Sheet, { visible: open, onClose: () => setOpen(false) }, /* @__PURE__ */ React.createElement(
46
+ ScrollView,
47
+ {
48
+ contentContainerStyle: { paddingHorizontal: 16, paddingBottom: 8, gap: 4 },
49
+ keyboardShouldPersistTaps: "handled"
50
+ },
51
+ options.map((o) => {
52
+ var _a2;
53
+ const sel = o.value === value;
54
+ const optDisabled = (_a2 = o.disabled) != null ? _a2 : false;
55
+ return /* @__PURE__ */ React.createElement(
56
+ Pressable,
57
+ {
58
+ key: o.value,
59
+ onPress: () => {
60
+ if (optDisabled) return;
61
+ onChange(o.value);
62
+ setOpen(false);
63
+ },
64
+ disabled: optDisabled,
65
+ accessibilityRole: "menuitem",
66
+ accessibilityState: { selected: sel, disabled: optDisabled },
67
+ style: {
68
+ minHeight: 48,
69
+ flexDirection: "row",
70
+ alignItems: "center",
71
+ justifyContent: "space-between",
72
+ paddingHorizontal: 12,
73
+ borderRadius: 10,
74
+ backgroundColor: sel ? t["--surface-raised"] : "transparent",
75
+ opacity: optDisabled ? 0.5 : 1
76
+ }
77
+ },
78
+ /* @__PURE__ */ React.createElement(Text, { variant: "body" }, o.label),
79
+ sel ? /* @__PURE__ */ React.createElement(Check, { size: 18, color: t["--brand-primary"] }) : null
80
+ );
81
+ })
82
+ )));
83
+ }
84
+ export {
85
+ Select
86
+ };
@@ -0,0 +1,11 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ type Props = {
5
+ visible: boolean;
6
+ onClose: () => void;
7
+ children: ReactNode;
8
+ };
9
+ declare function Sheet({ visible, onClose, children }: Props): react.JSX.Element;
10
+
11
+ export { Sheet };
@@ -0,0 +1,51 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { useEffect, useRef } from "react";
3
+ import { Animated, Modal, Pressable, View } from "react-native";
4
+ import { useTheme } from "./theme.js";
5
+ function Sheet({ visible, onClose, children }) {
6
+ const t = useTheme();
7
+ const translateY = useRef(new Animated.Value(800)).current;
8
+ useEffect(() => {
9
+ if (visible) {
10
+ Animated.timing(translateY, { toValue: 0, duration: 220, useNativeDriver: true }).start();
11
+ } else {
12
+ translateY.setValue(800);
13
+ }
14
+ }, [visible, translateY]);
15
+ return /* @__PURE__ */ React.createElement(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose }, /* @__PURE__ */ React.createElement(
16
+ Pressable,
17
+ {
18
+ style: { flex: 1, backgroundColor: "rgba(0, 0, 0, 0.45)" },
19
+ onPress: onClose,
20
+ accessibilityRole: "button",
21
+ accessibilityLabel: "Fechar"
22
+ }
23
+ ), /* @__PURE__ */ React.createElement(
24
+ Animated.View,
25
+ {
26
+ accessibilityViewIsModal: true,
27
+ style: {
28
+ position: "absolute",
29
+ left: 0,
30
+ right: 0,
31
+ bottom: 0,
32
+ maxHeight: "88%",
33
+ transform: [{ translateY }],
34
+ backgroundColor: t["--surface-default"],
35
+ borderTopLeftRadius: 20,
36
+ borderTopRightRadius: 20,
37
+ paddingBottom: 28
38
+ }
39
+ },
40
+ /* @__PURE__ */ React.createElement(View, { style: { alignItems: "center", paddingVertical: 10 } }, /* @__PURE__ */ React.createElement(
41
+ View,
42
+ {
43
+ style: { width: 40, height: 4, borderRadius: 2, backgroundColor: t["--border-strong"] }
44
+ }
45
+ )),
46
+ children
47
+ ));
48
+ }
49
+ export {
50
+ Sheet
51
+ };
@@ -0,0 +1,18 @@
1
+ import * as react from 'react';
2
+ import { DimensionValue } from 'react-native';
3
+
4
+ type Props = {
5
+ width?: DimensionValue;
6
+ height?: DimensionValue;
7
+ radius?: number;
8
+ circle?: boolean;
9
+ };
10
+ declare function Skeleton({ width, height, radius, circle }: Props): react.JSX.Element;
11
+ type SkeletonTextProps = {
12
+ lines?: number;
13
+ gap?: number;
14
+ lineHeight?: number;
15
+ };
16
+ declare function SkeletonText({ lines, gap, lineHeight }: SkeletonTextProps): react.JSX.Element;
17
+
18
+ export { Skeleton, SkeletonText };
@@ -0,0 +1,52 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { useEffect, useRef } from "react";
3
+ import { Animated, StyleSheet, View } from "react-native";
4
+ import { useTheme } from "./theme.js";
5
+ function Skeleton({ width = "100%", height = 16, radius = 8, circle = false }) {
6
+ const t = useTheme();
7
+ const pulse = useRef(new Animated.Value(0.4)).current;
8
+ useEffect(() => {
9
+ const loop = Animated.loop(
10
+ Animated.sequence([
11
+ Animated.timing(pulse, { toValue: 1, duration: 700, useNativeDriver: true }),
12
+ Animated.timing(pulse, { toValue: 0.4, duration: 700, useNativeDriver: true })
13
+ ])
14
+ );
15
+ loop.start();
16
+ return () => loop.stop();
17
+ }, [pulse]);
18
+ const size = circle ? typeof height === "number" ? height : 40 : void 0;
19
+ return /* @__PURE__ */ React.createElement(
20
+ Animated.View,
21
+ {
22
+ accessibilityElementsHidden: true,
23
+ importantForAccessibility: "no-hide-descendants",
24
+ style: {
25
+ width: circle ? size : width,
26
+ height: circle ? size : height,
27
+ borderRadius: circle ? (size != null ? size : 40) / 2 : radius,
28
+ backgroundColor: t["--surface-raised"],
29
+ opacity: pulse
30
+ }
31
+ }
32
+ );
33
+ }
34
+ function SkeletonText({ lines = 3, gap = 8, lineHeight = 12 }) {
35
+ return /* @__PURE__ */ React.createElement(View, { style: [styles.stack, { gap }] }, Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ React.createElement(
36
+ Skeleton,
37
+ {
38
+ key: i,
39
+ height: lineHeight,
40
+ width: i === lines - 1 ? "70%" : "100%"
41
+ }
42
+ )));
43
+ }
44
+ const styles = StyleSheet.create({
45
+ stack: {
46
+ flexDirection: "column"
47
+ }
48
+ });
49
+ export {
50
+ Skeleton,
51
+ SkeletonText
52
+ };
@@ -0,0 +1,18 @@
1
+ import * as react from 'react';
2
+
3
+ type Props = {
4
+ value: number;
5
+ onChange: (value: number) => void;
6
+ min?: number;
7
+ max?: number;
8
+ step?: number;
9
+ /** Mostra o valor atual à direita do trilho. */
10
+ showValue?: boolean;
11
+ /** Formata o valor exibido (ex: `v => `${v}%``). */
12
+ formatValue?: (value: number) => string;
13
+ disabled?: boolean;
14
+ accessibilityLabel?: string;
15
+ };
16
+ declare function Slider({ value, onChange, min, max, step, showValue, formatValue, disabled, accessibilityLabel, }: Props): react.JSX.Element;
17
+
18
+ export { Slider };
@@ -0,0 +1,153 @@
1
+ import {
2
+ __spreadValues
3
+ } from "../../../chunk-ORMEWXMH.js";
4
+ import { useRef, useState } from "react";
5
+ import {
6
+ PanResponder,
7
+ StyleSheet,
8
+ View
9
+ } from "react-native";
10
+ import { Text } from "./text.js";
11
+ import { useTheme } from "./theme.js";
12
+ const TRACK_HEIGHT = 6;
13
+ const THUMB_SIZE = 24;
14
+ function clamp(n, lo, hi) {
15
+ return Math.min(hi, Math.max(lo, n));
16
+ }
17
+ function snap(raw, min, max, step) {
18
+ const stepped = Math.round((raw - min) / step) * step + min;
19
+ return clamp(stepped, min, max);
20
+ }
21
+ function Slider({
22
+ value,
23
+ onChange,
24
+ min = 0,
25
+ max = 100,
26
+ step = 1,
27
+ showValue = false,
28
+ formatValue,
29
+ disabled = false,
30
+ accessibilityLabel
31
+ }) {
32
+ const t = useTheme();
33
+ const [trackWidth, setTrackWidth] = useState(0);
34
+ const widthRef = useRef(0);
35
+ const valueRef = useRef(value);
36
+ valueRef.current = value;
37
+ const fmt = formatValue != null ? formatValue : ((v) => String(v));
38
+ const range = max - min || 1;
39
+ const pct = clamp((value - min) / range, 0, 1);
40
+ function commitFromX(x) {
41
+ const w = widthRef.current;
42
+ if (w <= 0) return;
43
+ const ratio = clamp(x / w, 0, 1);
44
+ const next = snap(min + ratio * range, min, max, step);
45
+ if (next !== valueRef.current) onChange(next);
46
+ }
47
+ const responder = useRef(
48
+ PanResponder.create({
49
+ onStartShouldSetPanResponder: () => !disabled,
50
+ onMoveShouldSetPanResponder: () => !disabled,
51
+ onPanResponderGrant: (e) => {
52
+ commitFromX(e.nativeEvent.locationX);
53
+ },
54
+ onPanResponderMove: (e) => {
55
+ commitFromX(e.nativeEvent.locationX);
56
+ }
57
+ })
58
+ ).current;
59
+ function onLayout(e) {
60
+ const w = e.nativeEvent.layout.width;
61
+ widthRef.current = w;
62
+ setTrackWidth(w);
63
+ }
64
+ function onAccessibilityAction(e) {
65
+ if (disabled) return;
66
+ const name = e.nativeEvent.actionName;
67
+ if (name === "increment") onChange(snap(value + step, min, max, step));
68
+ else if (name === "decrement") onChange(snap(value - step, min, max, step));
69
+ }
70
+ const thumbLeft = Math.max(0, pct * trackWidth - THUMB_SIZE / 2);
71
+ return /* @__PURE__ */ React.createElement(View, { style: styles.row }, /* @__PURE__ */ React.createElement(
72
+ View,
73
+ __spreadValues({
74
+ accessible: true,
75
+ accessibilityRole: "adjustable",
76
+ accessibilityLabel,
77
+ accessibilityState: { disabled },
78
+ accessibilityValue: { min, max, now: value },
79
+ accessibilityActions: [{ name: "increment" }, { name: "decrement" }],
80
+ onAccessibilityAction,
81
+ onLayout,
82
+ hitSlop: { top: 12, bottom: 12, left: 4, right: 4 },
83
+ style: [styles.trackArea, { opacity: disabled ? 0.5 : 1 }]
84
+ }, responder.panHandlers),
85
+ /* @__PURE__ */ React.createElement(
86
+ View,
87
+ {
88
+ pointerEvents: "none",
89
+ style: [styles.track, { backgroundColor: t["--border-strong"] }]
90
+ }
91
+ ),
92
+ /* @__PURE__ */ React.createElement(
93
+ View,
94
+ {
95
+ pointerEvents: "none",
96
+ style: [
97
+ styles.fill,
98
+ { width: pct * trackWidth, backgroundColor: t["--brand-primary"] }
99
+ ]
100
+ }
101
+ ),
102
+ /* @__PURE__ */ React.createElement(
103
+ View,
104
+ {
105
+ pointerEvents: "none",
106
+ style: [
107
+ styles.thumb,
108
+ {
109
+ left: thumbLeft,
110
+ backgroundColor: t["--brand-primary"],
111
+ borderColor: t["--surface-default"]
112
+ }
113
+ ]
114
+ }
115
+ )
116
+ ), showValue && /* @__PURE__ */ React.createElement(Text, { variant: "label", style: [styles.value, { color: t["--text-primary"] }] }, fmt(value)));
117
+ }
118
+ const styles = StyleSheet.create({
119
+ row: {
120
+ flexDirection: "row",
121
+ alignItems: "center",
122
+ gap: 12
123
+ },
124
+ trackArea: {
125
+ flex: 1,
126
+ height: THUMB_SIZE,
127
+ justifyContent: "center"
128
+ },
129
+ track: {
130
+ height: TRACK_HEIGHT,
131
+ borderRadius: TRACK_HEIGHT / 2
132
+ },
133
+ fill: {
134
+ position: "absolute",
135
+ left: 0,
136
+ height: TRACK_HEIGHT,
137
+ borderRadius: TRACK_HEIGHT / 2
138
+ },
139
+ thumb: {
140
+ position: "absolute",
141
+ width: THUMB_SIZE,
142
+ height: THUMB_SIZE,
143
+ borderRadius: THUMB_SIZE / 2,
144
+ borderWidth: 2
145
+ },
146
+ value: {
147
+ minWidth: 40,
148
+ textAlign: "right"
149
+ }
150
+ });
151
+ export {
152
+ Slider
153
+ };
@@ -0,0 +1,7 @@
1
+ import * as react from 'react';
2
+
3
+ declare function Spinner({ size }: {
4
+ size?: 'small' | 'large';
5
+ }): react.JSX.Element;
6
+
7
+ export { Spinner };
@@ -0,0 +1,10 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { ActivityIndicator, View } from "react-native";
3
+ import { useTheme } from "./theme.js";
4
+ function Spinner({ size = "large" }) {
5
+ const t = useTheme();
6
+ return /* @__PURE__ */ React.createElement(View, { style: { flex: 1, alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React.createElement(ActivityIndicator, { size, color: t["--brand-primary"] }));
7
+ }
8
+ export {
9
+ Spinner
10
+ };
@@ -0,0 +1,10 @@
1
+ import * as react from 'react';
2
+
3
+ declare function Stepper({ value, onChange, min, max, }: {
4
+ value: number;
5
+ onChange: (v: number) => void;
6
+ min?: number;
7
+ max?: number;
8
+ }): react.JSX.Element;
9
+
10
+ export { Stepper };
@@ -0,0 +1,33 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { Pressable, View } from "react-native";
3
+ import { Text } from "./text.js";
4
+ import { useTheme } from "./theme.js";
5
+ function Stepper({
6
+ value,
7
+ onChange,
8
+ min = 0,
9
+ max
10
+ }) {
11
+ const t = useTheme();
12
+ const btn = {
13
+ width: 36,
14
+ height: 36,
15
+ borderRadius: 8,
16
+ borderWidth: 1,
17
+ borderColor: t["--border-default"],
18
+ alignItems: "center",
19
+ justifyContent: "center"
20
+ };
21
+ return /* @__PURE__ */ React.createElement(View, { style: { flexDirection: "row", alignItems: "center", gap: 8 } }, /* @__PURE__ */ React.createElement(Pressable, { onPress: () => onChange(Math.max(min, value - 1)), hitSlop: 8, style: btn }, /* @__PURE__ */ React.createElement(Text, { variant: "label" }, "\u2212")), /* @__PURE__ */ React.createElement(Text, { variant: "label", style: { minWidth: 24, textAlign: "center" } }, value), /* @__PURE__ */ React.createElement(
22
+ Pressable,
23
+ {
24
+ onPress: () => onChange(max != null ? Math.min(max, value + 1) : value + 1),
25
+ hitSlop: 8,
26
+ style: btn
27
+ },
28
+ /* @__PURE__ */ React.createElement(Text, { variant: "label" }, "+")
29
+ ));
30
+ }
31
+ export {
32
+ Stepper
33
+ };
@@ -0,0 +1,20 @@
1
+ import * as react from 'react';
2
+
3
+ declare function Switch({ value, onValueChange, disabled, accessibilityLabel, }: {
4
+ value: boolean;
5
+ onValueChange: (v: boolean) => void;
6
+ disabled?: boolean;
7
+ accessibilityLabel?: string;
8
+ }): react.JSX.Element;
9
+ type Segment<T extends string> = {
10
+ label: string;
11
+ value: T;
12
+ };
13
+ declare function SegmentedControl<T extends string>({ segments, value, onChange, disabled, }: {
14
+ segments: Segment<T>[];
15
+ value: T;
16
+ onChange: (v: T) => void;
17
+ disabled?: boolean;
18
+ }): react.JSX.Element;
19
+
20
+ export { SegmentedControl, Switch };
@@ -0,0 +1,68 @@
1
+ import "../../../chunk-ORMEWXMH.js";
2
+ import { Pressable, Switch as RNSwitch, View } from "react-native";
3
+ import { Text } from "./text.js";
4
+ import { useTheme } from "./theme.js";
5
+ function Switch({
6
+ value,
7
+ onValueChange,
8
+ disabled,
9
+ accessibilityLabel
10
+ }) {
11
+ const t = useTheme();
12
+ return /* @__PURE__ */ React.createElement(
13
+ RNSwitch,
14
+ {
15
+ value,
16
+ onValueChange,
17
+ disabled,
18
+ accessibilityLabel,
19
+ trackColor: { false: t["--border-strong"], true: t["--brand-primary"] },
20
+ thumbColor: t["--surface-default"]
21
+ }
22
+ );
23
+ }
24
+ function SegmentedControl({
25
+ segments,
26
+ value,
27
+ onChange,
28
+ disabled
29
+ }) {
30
+ const t = useTheme();
31
+ return /* @__PURE__ */ React.createElement(View, { style: { flexDirection: "row", gap: 6, opacity: disabled ? 0.5 : 1 } }, segments.map((s) => {
32
+ const sel = s.value === value;
33
+ return /* @__PURE__ */ React.createElement(
34
+ Pressable,
35
+ {
36
+ key: s.value,
37
+ onPress: () => onChange(s.value),
38
+ disabled,
39
+ hitSlop: 8,
40
+ accessibilityRole: "button",
41
+ accessibilityLabel: s.label,
42
+ accessibilityState: { selected: sel, disabled: !!disabled },
43
+ style: {
44
+ flex: 1,
45
+ minHeight: 48,
46
+ borderRadius: 8,
47
+ borderWidth: 1,
48
+ alignItems: "center",
49
+ justifyContent: "center",
50
+ borderColor: sel ? t["--brand-primary"] : t["--border-default"],
51
+ backgroundColor: sel ? t["--brand-primary"] : t["--surface-default"]
52
+ }
53
+ },
54
+ /* @__PURE__ */ React.createElement(
55
+ Text,
56
+ {
57
+ variant: "label",
58
+ style: { color: sel ? t["--brand-on-primary"] : t["--text-primary"] }
59
+ },
60
+ s.label
61
+ )
62
+ );
63
+ }));
64
+ }
65
+ export {
66
+ SegmentedControl,
67
+ Switch
68
+ };
@@ -0,0 +1,12 @@
1
+ import * as react from 'react';
2
+ import { TextProps } from 'react-native';
3
+
4
+ type TextVariant = 'heading' | 'title' | 'label' | 'body' | 'body-sm' | 'caption';
5
+ type TextColor = 'primary' | 'secondary' | 'muted' | 'inverse' | 'danger' | 'brand';
6
+ type Props = TextProps & {
7
+ variant?: TextVariant;
8
+ color?: TextColor;
9
+ };
10
+ declare function Text({ variant, color, style, ...rest }: Props): react.JSX.Element;
11
+
12
+ export { Text, type TextColor, type TextVariant };