@rojaostudio/ds 1.0.0 → 1.0.2

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 (134) hide show
  1. package/dist/components/accordion.js +43 -37
  2. package/dist/components/alert.js +35 -28
  3. package/dist/components/avatar.js +41 -34
  4. package/dist/components/badge.js +21 -14
  5. package/dist/components/blocker-card.js +11 -2
  6. package/dist/components/bottom-sheet.js +60 -53
  7. package/dist/components/breadcrumb.js +32 -22
  8. package/dist/components/button.js +18 -11
  9. package/dist/components/card.js +24 -9
  10. package/dist/components/chat-bubble.js +6 -5
  11. package/dist/components/checkbox.js +61 -48
  12. package/dist/components/chip-input.js +98 -81
  13. package/dist/components/chips.js +36 -29
  14. package/dist/components/choice-card.js +48 -42
  15. package/dist/components/choice-carousel.js +79 -74
  16. package/dist/components/choice-preview-card.js +17 -6
  17. package/dist/components/color-input.js +41 -35
  18. package/dist/components/combobox.js +97 -75
  19. package/dist/components/context-menu.js +17 -13
  20. package/dist/components/copilot-hint.js +40 -31
  21. package/dist/components/copy-field.js +8 -5
  22. package/dist/components/currency-input.js +40 -32
  23. package/dist/components/danger-zone.js +19 -9
  24. package/dist/components/data-table-header.js +185 -135
  25. package/dist/components/date-picker.js +114 -95
  26. package/dist/components/divider.js +11 -8
  27. package/dist/components/drawer.js +40 -28
  28. package/dist/components/dropzone.js +23 -20
  29. package/dist/components/empty-state.js +26 -23
  30. package/dist/components/fab.js +38 -26
  31. package/dist/components/filter-chip.js +20 -16
  32. package/dist/components/floating-stepper.js +42 -32
  33. package/dist/components/form-card-header.js +9 -1
  34. package/dist/components/icon-button.js +19 -13
  35. package/dist/components/image-crop-modal.js +69 -48
  36. package/dist/components/image-upload.js +172 -128
  37. package/dist/components/input.js +90 -62
  38. package/dist/components/insight-card.js +12 -1
  39. package/dist/components/label.js +12 -7
  40. package/dist/components/media-tile.js +11 -8
  41. package/dist/components/menu.js +28 -25
  42. package/dist/components/modal.js +43 -28
  43. package/dist/components/notice.js +34 -16
  44. package/dist/components/option-tile.js +55 -49
  45. package/dist/components/page-shell.js +13 -6
  46. package/dist/components/page-skeleton.js +32 -2
  47. package/dist/components/page-tabs.js +39 -26
  48. package/dist/components/pagination.js +38 -33
  49. package/dist/components/paywall-banner.js +19 -3
  50. package/dist/components/paywall.js +18 -8
  51. package/dist/components/phone-frame.js +5 -4
  52. package/dist/components/phone-input.js +50 -31
  53. package/dist/components/pix-icon.js +11 -6
  54. package/dist/components/popover.js +27 -23
  55. package/dist/components/pricing-card.js +16 -1
  56. package/dist/components/qr-display.js +16 -11
  57. package/dist/components/radio.js +73 -56
  58. package/dist/components/row-actions.js +61 -53
  59. package/dist/components/saving-bar-context.js +35 -29
  60. package/dist/components/saving-bar.js +36 -33
  61. package/dist/components/search.js +49 -44
  62. package/dist/components/section-card.js +43 -35
  63. package/dist/components/section-header.js +11 -1
  64. package/dist/components/select.js +83 -62
  65. package/dist/components/selectable-card.js +10 -3
  66. package/dist/components/setting-row.js +11 -1
  67. package/dist/components/settings-list.js +9 -5
  68. package/dist/components/skeleton.js +6 -5
  69. package/dist/components/slider.js +52 -38
  70. package/dist/components/spinner.js +18 -12
  71. package/dist/components/step-progress.js +11 -10
  72. package/dist/components/summary-bar.js +33 -28
  73. package/dist/components/table.js +20 -15
  74. package/dist/components/textarea.js +40 -24
  75. package/dist/components/themed.d.ts +1 -1
  76. package/dist/components/themed.js +2 -1
  77. package/dist/components/time-picker.js +117 -97
  78. package/dist/components/toaster.js +80 -74
  79. package/dist/components/toggle-card-compact.js +79 -71
  80. package/dist/components/toggle-card.js +61 -53
  81. package/dist/components/toggle-group.js +35 -29
  82. package/dist/components/toggle.js +46 -36
  83. package/dist/components/tooltip.js +30 -25
  84. package/dist/components/typing-indicator.js +10 -7
  85. package/dist/targets/native/components/accordion.js +31 -25
  86. package/dist/targets/native/components/alert.js +22 -16
  87. package/dist/targets/native/components/avatar.js +36 -29
  88. package/dist/targets/native/components/badge.js +4 -3
  89. package/dist/targets/native/components/button.js +11 -4
  90. package/dist/targets/native/components/card.js +2 -1
  91. package/dist/targets/native/components/checkbox.js +18 -15
  92. package/dist/targets/native/components/chips.js +19 -16
  93. package/dist/targets/native/components/choice-card.js +29 -23
  94. package/dist/targets/native/components/context-menu.js +13 -9
  95. package/dist/targets/native/components/currency-input.js +28 -25
  96. package/dist/targets/native/components/danger-zone.js +10 -4
  97. package/dist/targets/native/components/date-picker.js +86 -70
  98. package/dist/targets/native/components/divider.js +3 -2
  99. package/dist/targets/native/components/empty-state.js +6 -1
  100. package/dist/targets/native/components/fab.js +32 -26
  101. package/dist/targets/native/components/filter-chip.js +9 -8
  102. package/dist/targets/native/components/form-field.js +20 -10
  103. package/dist/targets/native/components/form-screen.js +50 -45
  104. package/dist/targets/native/components/google-icon.js +31 -25
  105. package/dist/targets/native/components/icon-button.js +6 -4
  106. package/dist/targets/native/components/icon.js +2 -1
  107. package/dist/targets/native/components/image-upload.js +59 -50
  108. package/dist/targets/native/components/input.js +41 -34
  109. package/dist/targets/native/components/list-item.js +29 -23
  110. package/dist/targets/native/components/menu.js +12 -10
  111. package/dist/targets/native/components/modal.js +41 -32
  112. package/dist/targets/native/components/paywall-banner.js +13 -4
  113. package/dist/targets/native/components/paywall.js +11 -1
  114. package/dist/targets/native/components/radio.js +19 -16
  115. package/dist/targets/native/components/search.js +41 -38
  116. package/dist/targets/native/components/select.js +71 -63
  117. package/dist/targets/native/components/sheet.js +36 -30
  118. package/dist/targets/native/components/skeleton.js +6 -5
  119. package/dist/targets/native/components/slider.js +51 -43
  120. package/dist/targets/native/components/spinner.js +2 -1
  121. package/dist/targets/native/components/stepper.js +14 -9
  122. package/dist/targets/native/components/switch.js +15 -14
  123. package/dist/targets/native/components/text.js +2 -1
  124. package/dist/targets/native/components/textarea.js +2 -1
  125. package/dist/targets/native/components/theme.js +2 -1
  126. package/dist/targets/native/components/toaster.js +24 -21
  127. package/dist/targets/native/index.d.ts +1 -1
  128. package/dist/targets/native/index.js +1 -3
  129. package/package.json +190 -194
  130. package/styles/base.css +3 -3
  131. package/brand/rojao-black-on-white.png +0 -0
  132. package/brand/rojao-black.png +0 -0
  133. package/brand/rojao-white-on-black.png +0 -0
  134. package/brand/rojao-white.png +0 -0
@@ -2,6 +2,7 @@ import {
2
2
  __spreadProps,
3
3
  __spreadValues
4
4
  } from "../../../chunk-ORMEWXMH.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import { Children, isValidElement } from "react";
6
7
  import { Image, StyleSheet, Text, View } from "react-native";
7
8
  import { useTheme } from "./theme.js";
@@ -39,41 +40,47 @@ function Avatar({ name, src, size = "md", status, variant = "brand" }) {
39
40
  const showImage = !!src;
40
41
  const bg = variant === "brand" ? t["--brand-primary"] : t["--surface-raised"];
41
42
  const fg = variant === "brand" ? t["--brand-on-primary"] : t["--text-muted"];
42
- return /* @__PURE__ */ React.createElement(View, { style: styles.wrap, accessibilityRole: "image", accessibilityLabel: label }, /* @__PURE__ */ React.createElement(
43
- View,
44
- {
45
- style: [
46
- styles.circle,
47
- { width: box, height: box, borderRadius: box / 2, backgroundColor: showImage ? void 0 : bg }
48
- ]
49
- },
50
- showImage ? /* @__PURE__ */ React.createElement(Image, { source: { uri: src }, style: { width: box, height: box }, resizeMode: "cover" }) : /* @__PURE__ */ React.createElement(Text, { style: { color: fg, fontSize: font, fontWeight: "600" }, numberOfLines: 1 }, initials(name != null ? name : "?"))
51
- ), status ? /* @__PURE__ */ React.createElement(
52
- View,
53
- {
54
- accessibilityLabel: `status: ${status}`,
55
- style: [
56
- styles.dot,
57
- {
58
- width: DOT_SIZE[size],
59
- height: DOT_SIZE[size],
60
- borderRadius: DOT_SIZE[size] / 2,
61
- backgroundColor: (_b = (_a = t[STATUS_TOKEN[status]]) != null ? _a : t["--brand-accent"]) != null ? _b : t["--icon-default"],
62
- borderColor: t["--surface-default"]
63
- }
64
- ]
65
- }
66
- ) : null);
43
+ return /* @__PURE__ */ jsxs(View, { style: styles.wrap, accessibilityRole: "image", accessibilityLabel: label, children: [
44
+ /* @__PURE__ */ jsx(
45
+ View,
46
+ {
47
+ style: [
48
+ styles.circle,
49
+ { width: box, height: box, borderRadius: box / 2, backgroundColor: showImage ? void 0 : bg }
50
+ ],
51
+ children: showImage ? /* @__PURE__ */ jsx(Image, { source: { uri: src }, style: { width: box, height: box }, resizeMode: "cover" }) : /* @__PURE__ */ jsx(Text, { style: { color: fg, fontSize: font, fontWeight: "600" }, numberOfLines: 1, children: initials(name != null ? name : "?") })
52
+ }
53
+ ),
54
+ status ? /* @__PURE__ */ jsx(
55
+ View,
56
+ {
57
+ accessibilityLabel: `status: ${status}`,
58
+ style: [
59
+ styles.dot,
60
+ {
61
+ width: DOT_SIZE[size],
62
+ height: DOT_SIZE[size],
63
+ borderRadius: DOT_SIZE[size] / 2,
64
+ backgroundColor: (_b = (_a = t[STATUS_TOKEN[status]]) != null ? _a : t["--brand-accent"]) != null ? _b : t["--icon-default"],
65
+ borderColor: t["--surface-default"]
66
+ }
67
+ ]
68
+ }
69
+ ) : null
70
+ ] });
67
71
  }
68
72
  function AvatarGroup({ max = 3, size = "md", children }) {
69
73
  const items = Children.toArray(children).filter(isValidElement);
70
74
  const visible = items.slice(0, max);
71
75
  const overflow = items.length - visible.length;
72
76
  const overlap = -Math.round(DIMENSION[size].box * 0.3);
73
- return /* @__PURE__ */ React.createElement(View, { style: styles.group, accessibilityRole: "none" }, visible.map((child, idx) => {
74
- var _a;
75
- return /* @__PURE__ */ React.createElement(View, { key: idx, style: idx === 0 ? void 0 : { marginLeft: overlap } }, /* @__PURE__ */ React.createElement(Avatar, __spreadProps(__spreadValues({}, child.props), { size: (_a = child.props.size) != null ? _a : size })));
76
- }), overflow > 0 ? /* @__PURE__ */ React.createElement(View, { style: { marginLeft: overlap } }, /* @__PURE__ */ React.createElement(Avatar, { name: `+${overflow}`, variant: "neutral", size })) : null);
77
+ return /* @__PURE__ */ jsxs(View, { style: styles.group, accessibilityRole: "none", children: [
78
+ visible.map((child, idx) => {
79
+ var _a;
80
+ return /* @__PURE__ */ jsx(View, { style: idx === 0 ? void 0 : { marginLeft: overlap }, children: /* @__PURE__ */ jsx(Avatar, __spreadProps(__spreadValues({}, child.props), { size: (_a = child.props.size) != null ? _a : size })) }, idx);
81
+ }),
82
+ overflow > 0 ? /* @__PURE__ */ jsx(View, { style: { marginLeft: overlap }, children: /* @__PURE__ */ jsx(Avatar, { name: `+${overflow}`, variant: "neutral", size }) }) : null
83
+ ] });
77
84
  }
78
85
  const styles = StyleSheet.create({
79
86
  wrap: { position: "relative", alignSelf: "flex-start" },
@@ -1,4 +1,5 @@
1
1
  import "../../../chunk-ORMEWXMH.js";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  import { StyleSheet, View } from "react-native";
3
4
  import { Text } from "./text.js";
4
5
  import { useTheme } from "./theme.js";
@@ -31,15 +32,15 @@ function Badge(props) {
31
32
  const t = useTheme();
32
33
  const tone = (_a = props.tone) != null ? _a : "neutral";
33
34
  if (props.dot) {
34
- return /* @__PURE__ */ React.createElement(View, { style: [styles.dot, { backgroundColor: t[DOT_BG[tone]] }], accessibilityRole: "image" });
35
+ return /* @__PURE__ */ jsx(View, { style: [styles.dot, { backgroundColor: t[DOT_BG[tone]] }], accessibilityRole: "image" });
35
36
  }
36
37
  if (props.count !== void 0) {
37
38
  if (props.count <= 0) return null;
38
39
  const max = (_b = props.max) != null ? _b : 99;
39
40
  const display = props.count > max ? `${max}+` : String(props.count);
40
- return /* @__PURE__ */ React.createElement(View, { style: [styles.count, { backgroundColor: t["--brand-primary"] }] }, /* @__PURE__ */ React.createElement(Text, { variant: "caption", style: { color: t["--brand-on-primary"], fontWeight: "500" } }, display));
41
+ return /* @__PURE__ */ jsx(View, { style: [styles.count, { backgroundColor: t["--brand-primary"] }], children: /* @__PURE__ */ jsx(Text, { variant: "caption", style: { color: t["--brand-on-primary"], fontWeight: "500" }, children: display }) });
41
42
  }
42
- return /* @__PURE__ */ React.createElement(View, { style: [styles.badge, { backgroundColor: t[BG[tone]] }] }, /* @__PURE__ */ React.createElement(Text, { variant: "caption", style: { color: t[FG[tone]], fontWeight: "500" } }, props.children));
43
+ return /* @__PURE__ */ jsx(View, { style: [styles.badge, { backgroundColor: t[BG[tone]] }], children: /* @__PURE__ */ jsx(Text, { variant: "caption", style: { color: t[FG[tone]], fontWeight: "500" }, children: props.children }) });
43
44
  }
44
45
  const styles = StyleSheet.create({
45
46
  badge: { alignSelf: "flex-start", borderRadius: 999, paddingHorizontal: 10, paddingVertical: 4 },
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  __objRest,
3
+ __spreadProps,
3
4
  __spreadValues
4
5
  } from "../../../chunk-ORMEWXMH.js";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
7
  import { cloneElement, isValidElement } from "react";
6
8
  import {
7
9
  ActivityIndicator,
@@ -46,9 +48,9 @@ function Button(_a) {
46
48
  ghost: { bg: "transparent", fg: t["--text-primary"], border: void 0 },
47
49
  danger: { bg: t["--danger"], fg: "#ffffff", border: void 0 }
48
50
  }[variant];
49
- return /* @__PURE__ */ React.createElement(
51
+ return /* @__PURE__ */ jsx(
50
52
  Pressable,
51
- __spreadValues({
53
+ __spreadProps(__spreadValues({
52
54
  accessibilityRole: "button",
53
55
  accessibilityState: { disabled: !!isDisabled, busy: loading },
54
56
  disabled: isDisabled,
@@ -64,8 +66,13 @@ function Button(_a) {
64
66
  alignSelf: fullWidth ? "stretch" : "flex-start"
65
67
  }
66
68
  ]
67
- }, rest),
68
- loading ? /* @__PURE__ */ React.createElement(ActivityIndicator, { color: skin.fg }) : /* @__PURE__ */ React.createElement(React.Fragment, null, tintIcon(leftIcon, skin.fg), /* @__PURE__ */ React.createElement(Text, { style: [styles.label, { color: skin.fg }] }, label), tintIcon(rightIcon, skin.fg))
69
+ }, rest), {
70
+ children: loading ? /* @__PURE__ */ jsx(ActivityIndicator, { color: skin.fg }) : /* @__PURE__ */ jsxs(Fragment, { children: [
71
+ tintIcon(leftIcon, skin.fg),
72
+ /* @__PURE__ */ jsx(Text, { style: [styles.label, { color: skin.fg }], children: label }),
73
+ tintIcon(rightIcon, skin.fg)
74
+ ] })
75
+ })
69
76
  );
70
77
  }
71
78
  const styles = StyleSheet.create({
@@ -2,12 +2,13 @@ import {
2
2
  __objRest,
3
3
  __spreadValues
4
4
  } from "../../../chunk-ORMEWXMH.js";
5
+ import { jsx } from "react/jsx-runtime";
5
6
  import { StyleSheet, View } from "react-native";
6
7
  import { useTheme } from "./theme.js";
7
8
  function Card(_a) {
8
9
  var _b = _a, { style } = _b, rest = __objRest(_b, ["style"]);
9
10
  const t = useTheme();
10
- return /* @__PURE__ */ React.createElement(
11
+ return /* @__PURE__ */ jsx(
11
12
  View,
12
13
  __spreadValues({
13
14
  style: [
@@ -1,4 +1,5 @@
1
1
  import "../../../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { Check } from "lucide-react-native";
3
4
  import { Pressable, StyleSheet, View } from "react-native";
4
5
  import { Text } from "./text.js";
@@ -6,7 +7,7 @@ import { useTheme } from "./theme.js";
6
7
  function Checkbox({ label, checked, onChange, disabled, indeterminate }) {
7
8
  const t = useTheme();
8
9
  const active = checked || indeterminate;
9
- return /* @__PURE__ */ React.createElement(
10
+ return /* @__PURE__ */ jsxs(
10
11
  Pressable,
11
12
  {
12
13
  accessibilityRole: "checkbox",
@@ -15,22 +16,24 @@ function Checkbox({ label, checked, onChange, disabled, indeterminate }) {
15
16
  disabled,
16
17
  hitSlop: 8,
17
18
  onPress: () => onChange(!checked),
18
- style: [styles.row, { opacity: disabled ? 0.5 : 1 }]
19
- },
20
- /* @__PURE__ */ React.createElement(
21
- View,
22
- {
23
- style: [
24
- styles.box,
19
+ style: [styles.row, { opacity: disabled ? 0.5 : 1 }],
20
+ children: [
21
+ /* @__PURE__ */ jsx(
22
+ View,
25
23
  {
26
- borderColor: active ? t["--brand-primary"] : t["--border-strong"],
27
- backgroundColor: active ? t["--brand-primary"] : "transparent"
24
+ style: [
25
+ styles.box,
26
+ {
27
+ borderColor: active ? t["--brand-primary"] : t["--border-strong"],
28
+ backgroundColor: active ? t["--brand-primary"] : "transparent"
29
+ }
30
+ ],
31
+ children: indeterminate ? /* @__PURE__ */ jsx(View, { style: [styles.dash, { backgroundColor: t["--brand-on-primary"] }] }) : checked ? /* @__PURE__ */ jsx(Check, { size: 14, color: t["--brand-on-primary"], strokeWidth: 3 }) : null
28
32
  }
29
- ]
30
- },
31
- indeterminate ? /* @__PURE__ */ React.createElement(View, { style: [styles.dash, { backgroundColor: t["--brand-on-primary"] }] }) : checked ? /* @__PURE__ */ React.createElement(Check, { size: 14, color: t["--brand-on-primary"], strokeWidth: 3 }) : null
32
- ),
33
- label ? /* @__PURE__ */ React.createElement(Text, { variant: "body", style: { color: t["--text-primary"] } }, label) : null
33
+ ),
34
+ label ? /* @__PURE__ */ jsx(Text, { variant: "body", style: { color: t["--text-primary"] }, children: label }) : null
35
+ ]
36
+ }
34
37
  );
35
38
  }
36
39
  const styles = StyleSheet.create({
@@ -1,4 +1,5 @@
1
1
  import "../../../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { Pressable, StyleSheet, View } from "react-native";
3
4
  import { X } from "lucide-react-native";
4
5
  import { Text } from "./text.js";
@@ -16,7 +17,7 @@ function Chip({
16
17
  const bg = selected ? t["--brand-primary"] : subtle ? t["--surface-raised"] : t["--surface-default"];
17
18
  const fg = selected ? t["--brand-on-primary"] : t["--text-primary"];
18
19
  const border = selected ? t["--brand-primary"] : subtle ? "transparent" : t["--border-default"];
19
- return /* @__PURE__ */ React.createElement(
20
+ return /* @__PURE__ */ jsxs(
20
21
  Pressable,
21
22
  {
22
23
  onPress: disabled ? void 0 : onPress,
@@ -32,22 +33,24 @@ function Chip({
32
33
  borderColor: border,
33
34
  opacity: disabled ? 0.5 : pressed && onPress ? 0.85 : 1
34
35
  }
36
+ ],
37
+ children: [
38
+ leadingIcon != null && /* @__PURE__ */ jsx(View, { style: styles.leading, children: leadingIcon }),
39
+ /* @__PURE__ */ jsx(Text, { variant: "caption", style: [styles.label, { color: fg }], children: label }),
40
+ onRemove && /* @__PURE__ */ jsx(
41
+ Pressable,
42
+ {
43
+ onPress: disabled ? void 0 : onRemove,
44
+ disabled,
45
+ hitSlop: 8,
46
+ accessibilityRole: "button",
47
+ accessibilityLabel: "Remove",
48
+ style: styles.remove,
49
+ children: /* @__PURE__ */ jsx(X, { size: 14, color: fg })
50
+ }
51
+ )
35
52
  ]
36
- },
37
- leadingIcon != null && /* @__PURE__ */ React.createElement(View, { style: styles.leading }, leadingIcon),
38
- /* @__PURE__ */ React.createElement(Text, { variant: "caption", style: [styles.label, { color: fg }] }, label),
39
- onRemove && /* @__PURE__ */ React.createElement(
40
- Pressable,
41
- {
42
- onPress: disabled ? void 0 : onRemove,
43
- disabled,
44
- hitSlop: 8,
45
- accessibilityRole: "button",
46
- accessibilityLabel: "Remove",
47
- style: styles.remove
48
- },
49
- /* @__PURE__ */ React.createElement(X, { size: 14, color: fg })
50
- )
53
+ }
51
54
  );
52
55
  }
53
56
  const styles = StyleSheet.create({
@@ -1,10 +1,11 @@
1
1
  import "../../../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { Pressable, View } from "react-native";
3
4
  import { Text } from "./text.js";
4
5
  import { useTheme } from "./theme.js";
5
6
  function ChoiceCard({ label, description, selected, onSelect }) {
6
7
  const t = useTheme();
7
- return /* @__PURE__ */ React.createElement(
8
+ return /* @__PURE__ */ jsxs(
8
9
  Pressable,
9
10
  {
10
11
  onPress: onSelect,
@@ -22,29 +23,34 @@ function ChoiceCard({ label, description, selected, onSelect }) {
22
23
  gap: 12,
23
24
  borderColor: selected ? t["--brand-primary"] : t["--border-default"],
24
25
  backgroundColor: selected ? t["--surface-raised"] : t["--surface-default"]
25
- }
26
- },
27
- /* @__PURE__ */ React.createElement(View, { style: { flex: 1 } }, /* @__PURE__ */ React.createElement(Text, { variant: "label" }, label), description ? /* @__PURE__ */ React.createElement(Text, { variant: "caption", color: "muted" }, description) : null),
28
- /* @__PURE__ */ React.createElement(
29
- View,
30
- {
31
- style: {
32
- width: 20,
33
- height: 20,
34
- borderRadius: 10,
35
- borderWidth: 2,
36
- alignItems: "center",
37
- justifyContent: "center",
38
- borderColor: selected ? t["--brand-primary"] : t["--border-strong"]
39
- }
40
26
  },
41
- selected ? /* @__PURE__ */ React.createElement(
42
- View,
43
- {
44
- style: { width: 10, height: 10, borderRadius: 5, backgroundColor: t["--brand-primary"] }
45
- }
46
- ) : null
47
- )
27
+ children: [
28
+ /* @__PURE__ */ jsxs(View, { style: { flex: 1 }, children: [
29
+ /* @__PURE__ */ jsx(Text, { variant: "label", children: label }),
30
+ description ? /* @__PURE__ */ jsx(Text, { variant: "caption", color: "muted", children: description }) : null
31
+ ] }),
32
+ /* @__PURE__ */ jsx(
33
+ View,
34
+ {
35
+ style: {
36
+ width: 20,
37
+ height: 20,
38
+ borderRadius: 10,
39
+ borderWidth: 2,
40
+ alignItems: "center",
41
+ justifyContent: "center",
42
+ borderColor: selected ? t["--brand-primary"] : t["--border-strong"]
43
+ },
44
+ children: selected ? /* @__PURE__ */ jsx(
45
+ View,
46
+ {
47
+ style: { width: 10, height: 10, borderRadius: 5, backgroundColor: t["--brand-primary"] }
48
+ }
49
+ ) : null
50
+ }
51
+ )
52
+ ]
53
+ }
48
54
  );
49
55
  }
50
56
  export {
@@ -1,18 +1,22 @@
1
1
  import "../../../chunk-ORMEWXMH.js";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
3
  import { useState } from "react";
3
4
  import { Pressable } from "react-native";
4
5
  import { Menu } from "./menu.js";
5
6
  function ContextMenu({ items, children }) {
6
7
  const [visible, setVisible] = useState(false);
7
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
8
- Pressable,
9
- {
10
- onLongPress: () => setVisible(true),
11
- accessibilityHint: "Mantenha pressionado para abrir as a\xE7\xF5es",
12
- delayLongPress: 350
13
- },
14
- children
15
- ), /* @__PURE__ */ React.createElement(Menu, { visible, onClose: () => setVisible(false), items }));
8
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
9
+ /* @__PURE__ */ jsx(
10
+ Pressable,
11
+ {
12
+ onLongPress: () => setVisible(true),
13
+ accessibilityHint: "Mantenha pressionado para abrir as a\xE7\xF5es",
14
+ delayLongPress: 350,
15
+ children
16
+ }
17
+ ),
18
+ /* @__PURE__ */ jsx(Menu, { visible, onClose: () => setVisible(false), items })
19
+ ] });
16
20
  }
17
21
  export {
18
22
  ContextMenu
@@ -2,6 +2,7 @@ import {
2
2
  __objRest,
3
3
  __spreadValues
4
4
  } from "../../../chunk-ORMEWXMH.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import { useState } from "react";
6
7
  import { StyleSheet, TextInput, View } from "react-native";
7
8
  import { Text } from "./text.js";
@@ -51,7 +52,7 @@ function CurrencyInput(_a) {
51
52
  const digits = text.replace(/\D/g, "").slice(0, 12);
52
53
  onChangeValueCents(digits ? parseInt(digits, 10) : 0);
53
54
  }
54
- return /* @__PURE__ */ React.createElement(
55
+ return /* @__PURE__ */ jsxs(
55
56
  View,
56
57
  {
57
58
  style: [
@@ -62,31 +63,33 @@ function CurrencyInput(_a) {
62
63
  opacity: disabled ? 0.5 : 1
63
64
  },
64
65
  style
66
+ ],
67
+ children: [
68
+ /* @__PURE__ */ jsx(Text, { variant: "body", color: "muted", style: { marginRight: 6 }, children: currency }),
69
+ /* @__PURE__ */ jsx(
70
+ TextInput,
71
+ __spreadValues({
72
+ value: display,
73
+ onChangeText: handle,
74
+ keyboardType: "number-pad",
75
+ editable: !disabled,
76
+ accessibilityLabel: accessibilityLabel != null ? accessibilityLabel : label,
77
+ accessibilityState: { disabled: !!disabled },
78
+ selectTextOnFocus: true,
79
+ placeholderTextColor: t["--text-placeholder"],
80
+ onFocus: (e) => {
81
+ setFocused(true);
82
+ onFocus == null ? void 0 : onFocus(e);
83
+ },
84
+ onBlur: (e) => {
85
+ setFocused(false);
86
+ onBlur == null ? void 0 : onBlur(e);
87
+ },
88
+ style: [styles.input, { color: disabled ? t["--text-disabled"] : t["--text-primary"] }]
89
+ }, rest)
90
+ )
65
91
  ]
66
- },
67
- /* @__PURE__ */ React.createElement(Text, { variant: "body", color: "muted", style: { marginRight: 6 } }, currency),
68
- /* @__PURE__ */ React.createElement(
69
- TextInput,
70
- __spreadValues({
71
- value: display,
72
- onChangeText: handle,
73
- keyboardType: "number-pad",
74
- editable: !disabled,
75
- accessibilityLabel: accessibilityLabel != null ? accessibilityLabel : label,
76
- accessibilityState: { disabled: !!disabled },
77
- selectTextOnFocus: true,
78
- placeholderTextColor: t["--text-placeholder"],
79
- onFocus: (e) => {
80
- setFocused(true);
81
- onFocus == null ? void 0 : onFocus(e);
82
- },
83
- onBlur: (e) => {
84
- setFocused(false);
85
- onBlur == null ? void 0 : onBlur(e);
86
- },
87
- style: [styles.input, { color: disabled ? t["--text-disabled"] : t["--text-primary"] }]
88
- }, rest)
89
- )
92
+ }
90
93
  );
91
94
  }
92
95
  const styles = StyleSheet.create({
@@ -1,20 +1,26 @@
1
1
  import "../../../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { StyleSheet, View } from "react-native";
3
4
  import { Text } from "./text.js";
4
5
  import { useTheme } from "./theme.js";
5
6
  function DangerZone({ title, description, children, style }) {
6
7
  const t = useTheme();
7
- return /* @__PURE__ */ React.createElement(
8
+ return /* @__PURE__ */ jsxs(
8
9
  View,
9
10
  {
10
11
  style: [
11
12
  styles.box,
12
13
  { backgroundColor: t["--danger-soft"], borderColor: t["--danger-border"] },
13
14
  style
15
+ ],
16
+ children: [
17
+ (title || description) && /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
18
+ title ? /* @__PURE__ */ jsx(Text, { variant: "label", color: "danger", children: title }) : null,
19
+ description ? /* @__PURE__ */ jsx(Text, { variant: "caption", color: "danger", style: styles.description, children: description }) : null
20
+ ] }),
21
+ children
14
22
  ]
15
- },
16
- (title || description) && /* @__PURE__ */ React.createElement(View, { style: styles.header }, title ? /* @__PURE__ */ React.createElement(Text, { variant: "label", color: "danger" }, title) : null, description ? /* @__PURE__ */ React.createElement(Text, { variant: "caption", color: "danger", style: styles.description }, description) : null),
17
- children
23
+ }
18
24
  );
19
25
  }
20
26
  const styles = StyleSheet.create({
@@ -1,4 +1,5 @@
1
1
  import "../../../chunk-ORMEWXMH.js";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
3
  import { Calendar, ChevronLeft, ChevronRight } from "lucide-react-native";
3
4
  import { useState } from "react";
4
5
  import { Modal, Pressable, StyleSheet, View } from "react-native";
@@ -76,79 +77,94 @@ function DatePicker({ value, onChange, min, max, placeholder, disabled }) {
76
77
  setOpen(false);
77
78
  }
78
79
  const cells = monthGrid(viewYear, viewMonth);
79
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
80
- Pressable,
81
- {
82
- onPress: openPicker,
83
- disabled,
84
- accessibilityRole: "button",
85
- accessibilityLabel: value ? `Data: ${formatLong(value)}` : placeholder != null ? placeholder : "Selecione uma data",
86
- accessibilityState: { disabled: !!disabled },
87
- style: [
88
- styles.field,
89
- {
90
- borderColor: t["--border-default"],
91
- backgroundColor: t["--surface-default"],
92
- opacity: disabled ? 0.5 : 1
93
- }
94
- ]
95
- },
96
- /* @__PURE__ */ React.createElement(Text, { variant: "body", color: value ? "primary" : "muted", style: { flex: 1 } }, value ? formatDate(value) : placeholder != null ? placeholder : "Selecione uma data"),
97
- /* @__PURE__ */ React.createElement(Calendar, { size: 20, color: t["--text-muted"] })
98
- ), /* @__PURE__ */ React.createElement(Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: () => setOpen(false) }, /* @__PURE__ */ React.createElement(Pressable, { style: styles.backdrop, onPress: () => setOpen(false) }, /* @__PURE__ */ React.createElement(
99
- Pressable,
100
- {
101
- style: [styles.card, { backgroundColor: t["--surface-default"] }],
102
- onPress: (e) => e.stopPropagation(),
103
- accessibilityViewIsModal: true
104
- },
105
- /* @__PURE__ */ React.createElement(View, { style: styles.header }, /* @__PURE__ */ React.createElement(Pressable, { onPress: () => shiftMonth(-1), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "M\xEAs anterior", style: styles.navBtn }, /* @__PURE__ */ React.createElement(ChevronLeft, { size: 22, color: t["--text-primary"] })), /* @__PURE__ */ React.createElement(Text, { variant: "label" }, MONTHS[viewMonth], " ", viewYear), /* @__PURE__ */ React.createElement(Pressable, { onPress: () => shiftMonth(1), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "Pr\xF3ximo m\xEAs", style: styles.navBtn }, /* @__PURE__ */ React.createElement(ChevronRight, { size: 22, color: t["--text-primary"] }))),
106
- /* @__PURE__ */ React.createElement(View, { style: styles.week }, WEEKDAYS.map((w, i) => /* @__PURE__ */ React.createElement(View, { key: i, style: styles.cell }, /* @__PURE__ */ React.createElement(Text, { variant: "caption", color: "muted" }, w)))),
107
- /* @__PURE__ */ React.createElement(View, { style: styles.grid }, cells.map((d, i) => {
108
- if (!d) return /* @__PURE__ */ React.createElement(View, { key: i, style: styles.cell });
109
- const selected = value ? sameDay(d, value) : false;
110
- const off = isDisabled(d);
111
- return /* @__PURE__ */ React.createElement(
112
- Pressable,
113
- {
114
- key: i,
115
- onPress: () => pick(d),
116
- disabled: off,
117
- accessibilityRole: "button",
118
- accessibilityLabel: formatLong(d),
119
- accessibilityState: { selected, disabled: off },
120
- style: [
121
- styles.cell,
122
- styles.day,
123
- selected ? { backgroundColor: t["--brand-primary"] } : null
124
- ]
125
- },
126
- /* @__PURE__ */ React.createElement(
127
- Text,
128
- {
129
- variant: "body-sm",
130
- style: {
131
- color: selected ? t["--brand-on-primary"] : off ? t["--text-placeholder"] : t["--text-primary"]
132
- }
133
- },
134
- d.getDate()
135
- )
136
- );
137
- })),
138
- value && /* @__PURE__ */ React.createElement(
80
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
81
+ /* @__PURE__ */ jsxs(
139
82
  Pressable,
140
83
  {
141
- onPress: () => {
142
- onChange(null);
143
- setOpen(false);
144
- },
84
+ onPress: openPicker,
85
+ disabled,
145
86
  accessibilityRole: "button",
146
- accessibilityLabel: "Limpar data",
147
- style: styles.clear
148
- },
149
- /* @__PURE__ */ React.createElement(Text, { variant: "body-sm", color: "muted" }, "Limpar")
150
- )
151
- ))));
87
+ accessibilityLabel: value ? `Data: ${formatLong(value)}` : placeholder != null ? placeholder : "Selecione uma data",
88
+ accessibilityState: { disabled: !!disabled },
89
+ style: [
90
+ styles.field,
91
+ {
92
+ borderColor: t["--border-default"],
93
+ backgroundColor: t["--surface-default"],
94
+ opacity: disabled ? 0.5 : 1
95
+ }
96
+ ],
97
+ children: [
98
+ /* @__PURE__ */ jsx(Text, { variant: "body", color: value ? "primary" : "muted", style: { flex: 1 }, children: value ? formatDate(value) : placeholder != null ? placeholder : "Selecione uma data" }),
99
+ /* @__PURE__ */ jsx(Calendar, { size: 20, color: t["--text-muted"] })
100
+ ]
101
+ }
102
+ ),
103
+ /* @__PURE__ */ jsx(Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: () => setOpen(false), children: /* @__PURE__ */ jsx(Pressable, { style: styles.backdrop, onPress: () => setOpen(false), children: /* @__PURE__ */ jsxs(
104
+ Pressable,
105
+ {
106
+ style: [styles.card, { backgroundColor: t["--surface-default"] }],
107
+ onPress: (e) => e.stopPropagation(),
108
+ accessibilityViewIsModal: true,
109
+ children: [
110
+ /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
111
+ /* @__PURE__ */ jsx(Pressable, { onPress: () => shiftMonth(-1), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "M\xEAs anterior", style: styles.navBtn, children: /* @__PURE__ */ jsx(ChevronLeft, { size: 22, color: t["--text-primary"] }) }),
112
+ /* @__PURE__ */ jsxs(Text, { variant: "label", children: [
113
+ MONTHS[viewMonth],
114
+ " ",
115
+ viewYear
116
+ ] }),
117
+ /* @__PURE__ */ jsx(Pressable, { onPress: () => shiftMonth(1), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "Pr\xF3ximo m\xEAs", style: styles.navBtn, children: /* @__PURE__ */ jsx(ChevronRight, { size: 22, color: t["--text-primary"] }) })
118
+ ] }),
119
+ /* @__PURE__ */ jsx(View, { style: styles.week, children: WEEKDAYS.map((w, i) => /* @__PURE__ */ jsx(View, { style: styles.cell, children: /* @__PURE__ */ jsx(Text, { variant: "caption", color: "muted", children: w }) }, i)) }),
120
+ /* @__PURE__ */ jsx(View, { style: styles.grid, children: cells.map((d, i) => {
121
+ if (!d) return /* @__PURE__ */ jsx(View, { style: styles.cell }, i);
122
+ const selected = value ? sameDay(d, value) : false;
123
+ const off = isDisabled(d);
124
+ return /* @__PURE__ */ jsx(
125
+ Pressable,
126
+ {
127
+ onPress: () => pick(d),
128
+ disabled: off,
129
+ accessibilityRole: "button",
130
+ accessibilityLabel: formatLong(d),
131
+ accessibilityState: { selected, disabled: off },
132
+ style: [
133
+ styles.cell,
134
+ styles.day,
135
+ selected ? { backgroundColor: t["--brand-primary"] } : null
136
+ ],
137
+ children: /* @__PURE__ */ jsx(
138
+ Text,
139
+ {
140
+ variant: "body-sm",
141
+ style: {
142
+ color: selected ? t["--brand-on-primary"] : off ? t["--text-placeholder"] : t["--text-primary"]
143
+ },
144
+ children: d.getDate()
145
+ }
146
+ )
147
+ },
148
+ i
149
+ );
150
+ }) }),
151
+ value && /* @__PURE__ */ jsx(
152
+ Pressable,
153
+ {
154
+ onPress: () => {
155
+ onChange(null);
156
+ setOpen(false);
157
+ },
158
+ accessibilityRole: "button",
159
+ accessibilityLabel: "Limpar data",
160
+ style: styles.clear,
161
+ children: /* @__PURE__ */ jsx(Text, { variant: "body-sm", color: "muted", children: "Limpar" })
162
+ }
163
+ )
164
+ ]
165
+ }
166
+ ) }) })
167
+ ] });
152
168
  }
153
169
  const styles = StyleSheet.create({
154
170
  field: {