@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.
- package/dist/components/accordion.js +43 -37
- package/dist/components/alert.js +35 -28
- package/dist/components/avatar.js +41 -34
- package/dist/components/badge.js +21 -14
- package/dist/components/blocker-card.js +11 -2
- package/dist/components/bottom-sheet.js +60 -53
- package/dist/components/breadcrumb.js +32 -22
- package/dist/components/button.js +18 -11
- package/dist/components/card.js +24 -9
- package/dist/components/chat-bubble.js +6 -5
- package/dist/components/checkbox.js +61 -48
- package/dist/components/chip-input.js +98 -81
- package/dist/components/chips.js +36 -29
- package/dist/components/choice-card.js +48 -42
- package/dist/components/choice-carousel.js +79 -74
- package/dist/components/choice-preview-card.js +17 -6
- package/dist/components/color-input.js +41 -35
- package/dist/components/combobox.js +97 -75
- package/dist/components/context-menu.js +17 -13
- package/dist/components/copilot-hint.js +40 -31
- package/dist/components/copy-field.js +8 -5
- package/dist/components/currency-input.js +40 -32
- package/dist/components/danger-zone.js +19 -9
- package/dist/components/data-table-header.js +185 -135
- package/dist/components/date-picker.js +114 -95
- package/dist/components/divider.js +11 -8
- package/dist/components/drawer.js +40 -28
- package/dist/components/dropzone.js +23 -20
- package/dist/components/empty-state.js +26 -23
- package/dist/components/fab.js +38 -26
- package/dist/components/filter-chip.js +20 -16
- package/dist/components/floating-stepper.js +42 -32
- package/dist/components/form-card-header.js +9 -1
- package/dist/components/icon-button.js +19 -13
- package/dist/components/image-crop-modal.js +69 -48
- package/dist/components/image-upload.js +172 -128
- package/dist/components/input.js +90 -62
- package/dist/components/insight-card.js +12 -1
- package/dist/components/label.js +12 -7
- package/dist/components/media-tile.js +11 -8
- package/dist/components/menu.js +28 -25
- package/dist/components/modal.js +43 -28
- package/dist/components/notice.js +34 -16
- package/dist/components/option-tile.js +55 -49
- package/dist/components/page-shell.js +13 -6
- package/dist/components/page-skeleton.js +32 -2
- package/dist/components/page-tabs.js +39 -26
- package/dist/components/pagination.js +38 -33
- package/dist/components/paywall-banner.js +19 -3
- package/dist/components/paywall.js +18 -8
- package/dist/components/phone-frame.js +5 -4
- package/dist/components/phone-input.js +50 -31
- package/dist/components/pix-icon.js +11 -6
- package/dist/components/popover.js +27 -23
- package/dist/components/pricing-card.js +16 -1
- package/dist/components/qr-display.js +16 -11
- package/dist/components/radio.js +73 -56
- package/dist/components/row-actions.js +61 -53
- package/dist/components/saving-bar-context.js +35 -29
- package/dist/components/saving-bar.js +36 -33
- package/dist/components/search.js +49 -44
- package/dist/components/section-card.js +43 -35
- package/dist/components/section-header.js +11 -1
- package/dist/components/select.js +83 -62
- package/dist/components/selectable-card.js +10 -3
- package/dist/components/setting-row.js +11 -1
- package/dist/components/settings-list.js +9 -5
- package/dist/components/skeleton.js +6 -5
- package/dist/components/slider.js +52 -38
- package/dist/components/spinner.js +18 -12
- package/dist/components/step-progress.js +11 -10
- package/dist/components/summary-bar.js +33 -28
- package/dist/components/table.js +20 -15
- package/dist/components/textarea.js +40 -24
- package/dist/components/themed.d.ts +1 -1
- package/dist/components/themed.js +2 -1
- package/dist/components/time-picker.js +117 -97
- package/dist/components/toaster.js +80 -74
- package/dist/components/toggle-card-compact.js +79 -71
- package/dist/components/toggle-card.js +61 -53
- package/dist/components/toggle-group.js +35 -29
- package/dist/components/toggle.js +46 -36
- package/dist/components/tooltip.js +30 -25
- package/dist/components/typing-indicator.js +10 -7
- package/dist/targets/native/components/accordion.js +31 -25
- package/dist/targets/native/components/alert.js +22 -16
- package/dist/targets/native/components/avatar.js +36 -29
- package/dist/targets/native/components/badge.js +4 -3
- package/dist/targets/native/components/button.js +11 -4
- package/dist/targets/native/components/card.js +2 -1
- package/dist/targets/native/components/checkbox.js +18 -15
- package/dist/targets/native/components/chips.js +19 -16
- package/dist/targets/native/components/choice-card.js +29 -23
- package/dist/targets/native/components/context-menu.js +13 -9
- package/dist/targets/native/components/currency-input.js +28 -25
- package/dist/targets/native/components/danger-zone.js +10 -4
- package/dist/targets/native/components/date-picker.js +86 -70
- package/dist/targets/native/components/divider.js +3 -2
- package/dist/targets/native/components/empty-state.js +6 -1
- package/dist/targets/native/components/fab.js +32 -26
- package/dist/targets/native/components/filter-chip.js +9 -8
- package/dist/targets/native/components/form-field.js +20 -10
- package/dist/targets/native/components/form-screen.js +50 -45
- package/dist/targets/native/components/google-icon.js +31 -25
- package/dist/targets/native/components/icon-button.js +6 -4
- package/dist/targets/native/components/icon.js +2 -1
- package/dist/targets/native/components/image-upload.js +59 -50
- package/dist/targets/native/components/input.js +41 -34
- package/dist/targets/native/components/list-item.js +29 -23
- package/dist/targets/native/components/menu.js +12 -10
- package/dist/targets/native/components/modal.js +41 -32
- package/dist/targets/native/components/paywall-banner.js +13 -4
- package/dist/targets/native/components/paywall.js +11 -1
- package/dist/targets/native/components/radio.js +19 -16
- package/dist/targets/native/components/search.js +41 -38
- package/dist/targets/native/components/select.js +71 -63
- package/dist/targets/native/components/sheet.js +36 -30
- package/dist/targets/native/components/skeleton.js +6 -5
- package/dist/targets/native/components/slider.js +51 -43
- package/dist/targets/native/components/spinner.js +2 -1
- package/dist/targets/native/components/stepper.js +14 -9
- package/dist/targets/native/components/switch.js +15 -14
- package/dist/targets/native/components/text.js +2 -1
- package/dist/targets/native/components/textarea.js +2 -1
- package/dist/targets/native/components/theme.js +2 -1
- package/dist/targets/native/components/toaster.js +24 -21
- package/dist/targets/native/index.d.ts +1 -1
- package/dist/targets/native/index.js +1 -3
- package/package.json +190 -194
- package/styles/base.css +3 -3
- package/brand/rojao-black-on-white.png +0 -0
- package/brand/rojao-black.png +0 -0
- package/brand/rojao-white-on-black.png +0 -0
- package/brand/rojao-white.png +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { StyleSheet, View } from "react-native";
|
|
3
4
|
import { useTheme } from "./theme.js";
|
|
4
5
|
function Divider({ vertical, spacing }) {
|
|
5
6
|
const t = useTheme();
|
|
6
7
|
const hairline = StyleSheet.hairlineWidth;
|
|
7
8
|
if (vertical) {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
9
10
|
View,
|
|
10
11
|
{
|
|
11
12
|
accessibilityRole: "none",
|
|
@@ -18,7 +19,7 @@ function Divider({ vertical, spacing }) {
|
|
|
18
19
|
}
|
|
19
20
|
);
|
|
20
21
|
}
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
22
23
|
View,
|
|
23
24
|
{
|
|
24
25
|
accessibilityRole: "none",
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { View } from "react-native";
|
|
3
4
|
import { Button } from "./button.js";
|
|
4
5
|
import { Text } from "./text.js";
|
|
5
6
|
function EmptyState({ title, description, cta }) {
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsxs(View, { style: { flex: 1, alignItems: "center", justifyContent: "center", gap: 12, paddingHorizontal: 32 }, children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Text, { variant: "title", style: { textAlign: "center" }, children: title }),
|
|
9
|
+
description ? /* @__PURE__ */ jsx(Text, { variant: "body-sm", color: "muted", style: { textAlign: "center" }, children: description }) : null,
|
|
10
|
+
cta ? /* @__PURE__ */ jsx(Button, { label: cta.label, onPress: cta.onPress, fullWidth: true }) : null
|
|
11
|
+
] });
|
|
7
12
|
}
|
|
8
13
|
export {
|
|
9
14
|
EmptyState
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../../../chunk-ORMEWXMH.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { Plus } from "lucide-react-native";
|
|
5
6
|
import {
|
|
6
7
|
cloneElement,
|
|
@@ -30,37 +31,39 @@ function FAB({
|
|
|
30
31
|
const t = useTheme();
|
|
31
32
|
const insets = useSafeAreaInsets();
|
|
32
33
|
const fg = t["--brand-on-primary"];
|
|
33
|
-
const glyph = tintIcon(icon != null ? icon : /* @__PURE__ */
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
const glyph = tintIcon(icon != null ? icon : /* @__PURE__ */ jsx(Plus, {}), fg, 24);
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
35
36
|
View,
|
|
36
37
|
{
|
|
37
38
|
pointerEvents: "box-none",
|
|
38
39
|
style: [
|
|
39
40
|
styles.anchor,
|
|
40
41
|
{ right: 16, bottom: (insets.bottom > 0 ? insets.bottom : 16) + 16 }
|
|
41
|
-
]
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
],
|
|
43
|
+
children: /* @__PURE__ */ jsxs(
|
|
44
|
+
Pressable,
|
|
45
|
+
{
|
|
46
|
+
accessibilityRole: "button",
|
|
47
|
+
accessibilityLabel,
|
|
48
|
+
accessibilityState: { disabled },
|
|
49
|
+
disabled,
|
|
50
|
+
hitSlop: 8,
|
|
51
|
+
onPress,
|
|
52
|
+
style: ({ pressed }) => [
|
|
53
|
+
styles.base,
|
|
54
|
+
extended ? styles.extended : styles.circle,
|
|
55
|
+
{
|
|
56
|
+
backgroundColor: t["--brand-primary"],
|
|
57
|
+
opacity: disabled ? 0.5 : pressed ? 0.85 : 1
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
children: [
|
|
61
|
+
glyph,
|
|
62
|
+
extended && label ? /* @__PURE__ */ jsx(Text, { style: [styles.label, { color: fg }], numberOfLines: 1, children: label }) : null
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
64
67
|
);
|
|
65
68
|
}
|
|
66
69
|
const FABContext = createContext({
|
|
@@ -71,7 +74,10 @@ const FABContext = createContext({
|
|
|
71
74
|
function FABProvider({ children }) {
|
|
72
75
|
const [config, setConfig] = useState(null);
|
|
73
76
|
const setFAB = useCallback((next) => setConfig(next), []);
|
|
74
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ jsxs(FABContext.Provider, { value: { config, setFAB }, children: [
|
|
78
|
+
children,
|
|
79
|
+
config ? /* @__PURE__ */ jsx(FAB, __spreadValues({}, config)) : null
|
|
80
|
+
] });
|
|
75
81
|
}
|
|
76
82
|
function useFAB() {
|
|
77
83
|
return useContext(FABContext);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
3
4
|
import { Text } from "./text.js";
|
|
4
5
|
import { useTheme } from "./theme.js";
|
|
@@ -7,7 +8,7 @@ function FilterChip({ label, active, onPress, disabled = false }) {
|
|
|
7
8
|
const bg = active ? t["--brand-primary"] : t["--surface-default"];
|
|
8
9
|
const fg = active ? t["--brand-on-primary"] : t["--text-primary"];
|
|
9
10
|
const border = active ? t["--brand-primary"] : t["--border-default"];
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
11
12
|
Pressable,
|
|
12
13
|
{
|
|
13
14
|
onPress: disabled ? void 0 : onPress,
|
|
@@ -23,9 +24,9 @@ function FilterChip({ label, active, onPress, disabled = false }) {
|
|
|
23
24
|
borderColor: border,
|
|
24
25
|
opacity: disabled ? 0.5 : pressed ? 0.85 : 1
|
|
25
26
|
}
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
],
|
|
28
|
+
children: /* @__PURE__ */ jsx(Text, { variant: "caption", style: [styles.label, { color: fg }], children: label })
|
|
29
|
+
}
|
|
29
30
|
);
|
|
30
31
|
}
|
|
31
32
|
function FilterChipGroup({
|
|
@@ -34,16 +35,16 @@ function FilterChipGroup({
|
|
|
34
35
|
onChange,
|
|
35
36
|
disabled = false
|
|
36
37
|
}) {
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ jsx(View, { style: styles.group, children: items.map((item) => /* @__PURE__ */ jsx(
|
|
38
39
|
FilterChip,
|
|
39
40
|
{
|
|
40
|
-
key: item.value,
|
|
41
41
|
label: item.label,
|
|
42
42
|
active: item.value === value,
|
|
43
43
|
onPress: () => onChange(item.value),
|
|
44
44
|
disabled
|
|
45
|
-
}
|
|
46
|
-
|
|
45
|
+
},
|
|
46
|
+
item.value
|
|
47
|
+
)) });
|
|
47
48
|
}
|
|
48
49
|
const styles = StyleSheet.create({
|
|
49
50
|
chip: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { AlertCircle } from "lucide-react-native";
|
|
3
4
|
import { cloneElement, isValidElement } from "react";
|
|
4
5
|
import { View } from "react-native";
|
|
@@ -13,16 +14,25 @@ function FormField({ label, hint, error, required, children }) {
|
|
|
13
14
|
error: (_a = children.props.error) != null ? _a : error ? true : void 0,
|
|
14
15
|
accessibilityLabel: (_b = children.props.accessibilityLabel) != null ? _b : a11yLabel
|
|
15
16
|
}) : children;
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
View,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
return /* @__PURE__ */ jsxs(View, { style: { gap: 6 }, children: [
|
|
18
|
+
label ? /* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Text, { variant: "label", style: { flexShrink: 1 }, children: label }),
|
|
20
|
+
required ? /* @__PURE__ */ jsx(Text, { variant: "label", color: "danger", accessibilityElementsHidden: true, importantForAccessibility: "no", children: "*" }) : null
|
|
21
|
+
] }) : null,
|
|
22
|
+
field,
|
|
23
|
+
error ? /* @__PURE__ */ jsxs(
|
|
24
|
+
View,
|
|
25
|
+
{
|
|
26
|
+
style: { flexDirection: "row", alignItems: "flex-start", gap: 4 },
|
|
27
|
+
accessibilityLiveRegion: "polite",
|
|
28
|
+
accessibilityRole: "alert",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx(AlertCircle, { size: 14, color: t["--danger-text"], style: { marginTop: 2 } }),
|
|
31
|
+
/* @__PURE__ */ jsx(Text, { variant: "caption", color: "danger", style: { flex: 1 }, children: error })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
) : hint ? /* @__PURE__ */ jsx(Text, { variant: "caption", color: "muted", children: hint }) : null
|
|
35
|
+
] });
|
|
26
36
|
}
|
|
27
37
|
export {
|
|
28
38
|
FormField
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { KeyboardAvoidingView, Platform, ScrollView, Text, View } from "react-native";
|
|
3
4
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
5
|
import { Button } from "./button.js";
|
|
@@ -16,7 +17,7 @@ function SavingBar({
|
|
|
16
17
|
const t = useTheme();
|
|
17
18
|
const insets = useSafeAreaInsets();
|
|
18
19
|
if (!visible) return null;
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
20
21
|
View,
|
|
21
22
|
{
|
|
22
23
|
style: {
|
|
@@ -28,58 +29,62 @@ function SavingBar({
|
|
|
28
29
|
// Respeita o home indicator do iPhone; soma 16 de respiro quando não há inset.
|
|
29
30
|
paddingBottom: insets.bottom > 0 ? insets.bottom : 16,
|
|
30
31
|
gap: 8
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
message ? /* @__PURE__ */ React.createElement(
|
|
34
|
-
Text,
|
|
35
|
-
{
|
|
36
|
-
style: {
|
|
37
|
-
color: t["--text-muted"],
|
|
38
|
-
fontSize: 13
|
|
39
|
-
}
|
|
40
32
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
33
|
+
children: [
|
|
34
|
+
message ? /* @__PURE__ */ jsx(
|
|
35
|
+
Text,
|
|
36
|
+
{
|
|
37
|
+
style: {
|
|
38
|
+
color: t["--text-muted"],
|
|
39
|
+
fontSize: 13
|
|
40
|
+
},
|
|
41
|
+
children: message
|
|
42
|
+
}
|
|
43
|
+
) : null,
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
Button,
|
|
46
|
+
{
|
|
47
|
+
label,
|
|
48
|
+
variant: "primary",
|
|
49
|
+
fullWidth: true,
|
|
50
|
+
onPress: onSave,
|
|
51
|
+
loading,
|
|
52
|
+
disabled
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
onDiscard ? /* @__PURE__ */ jsx(
|
|
56
|
+
Button,
|
|
57
|
+
{
|
|
58
|
+
label: discardLabel,
|
|
59
|
+
variant: "secondary",
|
|
60
|
+
fullWidth: true,
|
|
61
|
+
onPress: onDiscard,
|
|
62
|
+
disabled: loading
|
|
63
|
+
}
|
|
64
|
+
) : null
|
|
65
|
+
]
|
|
66
|
+
}
|
|
64
67
|
);
|
|
65
68
|
}
|
|
66
69
|
function FormScreen({ children, saveBar }) {
|
|
67
70
|
const t = useTheme();
|
|
68
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ jsxs(
|
|
69
72
|
KeyboardAvoidingView,
|
|
70
73
|
{
|
|
71
74
|
style: { flex: 1, backgroundColor: t["--surface-page"] },
|
|
72
|
-
behavior: Platform.OS === "ios" ? "padding" : void 0
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
behavior: Platform.OS === "ios" ? "padding" : void 0,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
ScrollView,
|
|
79
|
+
{
|
|
80
|
+
contentContainerStyle: { padding: 16, gap: 16 },
|
|
81
|
+
keyboardShouldPersistTaps: "handled",
|
|
82
|
+
children
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
saveBar
|
|
86
|
+
]
|
|
87
|
+
}
|
|
83
88
|
);
|
|
84
89
|
}
|
|
85
90
|
export {
|
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import Svg, { Path } from "react-native-svg";
|
|
3
4
|
function GoogleIcon({ size = 18 }) {
|
|
4
|
-
return /* @__PURE__ */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
5
|
+
return /* @__PURE__ */ jsxs(Svg, { width: size, height: size, viewBox: "0 0 48 48", children: [
|
|
6
|
+
/* @__PURE__ */ jsx(
|
|
7
|
+
Path,
|
|
8
|
+
{
|
|
9
|
+
fill: "#FFC107",
|
|
10
|
+
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"
|
|
11
|
+
}
|
|
12
|
+
),
|
|
13
|
+
/* @__PURE__ */ jsx(
|
|
14
|
+
Path,
|
|
15
|
+
{
|
|
16
|
+
fill: "#FF3D00",
|
|
17
|
+
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"
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
Path,
|
|
22
|
+
{
|
|
23
|
+
fill: "#4CAF50",
|
|
24
|
+
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"
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
Path,
|
|
29
|
+
{
|
|
30
|
+
fill: "#1976D2",
|
|
31
|
+
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"
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
] });
|
|
29
35
|
}
|
|
30
36
|
export {
|
|
31
37
|
GoogleIcon
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
__spreadProps,
|
|
4
4
|
__spreadValues
|
|
5
5
|
} from "../../../chunk-ORMEWXMH.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
import {
|
|
7
8
|
ActivityIndicator,
|
|
8
9
|
Pressable,
|
|
@@ -48,9 +49,9 @@ function IconButton(_a) {
|
|
|
48
49
|
}[variant];
|
|
49
50
|
const box = BOX[size];
|
|
50
51
|
const hit = Math.max(0, Math.round((44 - box) / 2)) + 4;
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
52
53
|
Pressable,
|
|
53
|
-
__spreadValues({
|
|
54
|
+
__spreadProps(__spreadValues({
|
|
54
55
|
accessibilityRole: "button",
|
|
55
56
|
accessibilityLabel,
|
|
56
57
|
accessibilityState: { disabled: !!isDisabled, busy: loading },
|
|
@@ -64,8 +65,9 @@ function IconButton(_a) {
|
|
|
64
65
|
borderWidth: skin.border ? 1 : 0,
|
|
65
66
|
opacity: isDisabled ? 0.5 : pressed ? 0.8 : 1
|
|
66
67
|
})
|
|
67
|
-
}, rest),
|
|
68
|
-
|
|
68
|
+
}, rest), {
|
|
69
|
+
children: loading ? /* @__PURE__ */ jsx(ActivityIndicator, { color: skin.fg }) : /* @__PURE__ */ jsx(View, { children: icon })
|
|
70
|
+
})
|
|
69
71
|
);
|
|
70
72
|
}
|
|
71
73
|
const styles = StyleSheet.create({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { useTheme } from "./theme.js";
|
|
3
4
|
function Icon({ icon: Glyph, size = 24, color }) {
|
|
4
5
|
const t = useTheme();
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsx(Glyph, { size, color: color != null ? color : t["--icon-default"] });
|
|
6
7
|
}
|
|
7
8
|
export {
|
|
8
9
|
Icon
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Image } from "expo-image";
|
|
3
4
|
import * as ImagePicker from "expo-image-picker";
|
|
4
5
|
import { ImagePlus, X } from "lucide-react-native";
|
|
@@ -32,63 +33,71 @@ function ImageUpload({ value, onChange, onUpload, max = 10, onError }) {
|
|
|
32
33
|
setBusy(false);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
return /* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", flexWrap: "wrap", gap: 8 }, children: [
|
|
37
|
+
value.map((url) => /* @__PURE__ */ jsxs(
|
|
38
|
+
View,
|
|
39
|
+
{
|
|
40
|
+
style: {
|
|
41
|
+
width: TILE,
|
|
42
|
+
height: TILE,
|
|
43
|
+
borderRadius: 12,
|
|
44
|
+
overflow: "hidden",
|
|
45
|
+
backgroundColor: t["--surface-raised"]
|
|
46
|
+
},
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx(Image, { source: { uri: url }, style: { width: "100%", height: "100%" }, contentFit: "cover" }),
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
Pressable,
|
|
51
|
+
{
|
|
52
|
+
onPress: () => onChange(value.filter((u) => u !== url)),
|
|
53
|
+
hitSlop: 11,
|
|
54
|
+
accessibilityRole: "button",
|
|
55
|
+
accessibilityLabel: "Remover foto",
|
|
56
|
+
style: {
|
|
57
|
+
position: "absolute",
|
|
58
|
+
top: 4,
|
|
59
|
+
right: 4,
|
|
60
|
+
width: 22,
|
|
61
|
+
height: 22,
|
|
62
|
+
borderRadius: 11,
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
justifyContent: "center",
|
|
65
|
+
backgroundColor: "rgba(0, 0, 0, 0.55)"
|
|
66
|
+
},
|
|
67
|
+
children: /* @__PURE__ */ jsx(X, { size: 14, color: "#ffffff" })
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
url
|
|
73
|
+
)),
|
|
74
|
+
value.length < max ? /* @__PURE__ */ jsx(
|
|
49
75
|
Pressable,
|
|
50
76
|
{
|
|
51
|
-
onPress:
|
|
52
|
-
|
|
77
|
+
onPress: pick,
|
|
78
|
+
disabled: busy,
|
|
53
79
|
accessibilityRole: "button",
|
|
54
|
-
accessibilityLabel: "
|
|
80
|
+
accessibilityLabel: busy ? "Enviando foto" : "Adicionar foto",
|
|
81
|
+
accessibilityState: { busy, disabled: busy },
|
|
55
82
|
style: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
83
|
+
width: TILE,
|
|
84
|
+
height: TILE,
|
|
85
|
+
borderRadius: 12,
|
|
86
|
+
borderWidth: 1,
|
|
87
|
+
borderStyle: "dashed",
|
|
88
|
+
borderColor: t["--border-default"],
|
|
62
89
|
alignItems: "center",
|
|
63
90
|
justifyContent: "center",
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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"]
|
|
91
|
+
gap: 4,
|
|
92
|
+
backgroundColor: t["--surface-default"]
|
|
93
|
+
},
|
|
94
|
+
children: busy ? /* @__PURE__ */ jsx(ActivityIndicator, { color: t["--brand-primary"] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
95
|
+
/* @__PURE__ */ jsx(ImagePlus, { size: 22, color: t["--text-muted"] }),
|
|
96
|
+
/* @__PURE__ */ jsx(Text, { variant: "caption", color: "muted", children: "Foto" })
|
|
97
|
+
] })
|
|
88
98
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
) : null);
|
|
99
|
+
) : null
|
|
100
|
+
] });
|
|
92
101
|
}
|
|
93
102
|
export {
|
|
94
103
|
ImageUpload
|