@sincpro/mobile-ui 3.1.0 → 3.2.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.
- package/dist/Dialog/Dialog.EditValue.js +6 -19
- package/dist/Dialog/Dialog.Sheet.js +48 -12
- package/dist/Dialog/OverlayHost.d.ts +2 -1
- package/dist/Dialog/OverlayHost.js +36 -2
- package/dist/Dialog/SheetSurface.d.ts +19 -0
- package/dist/Dialog/SheetSurface.js +279 -225
- package/dist/Display/Display.SwipeableRow.js +30 -23
- package/dist/Display/icon-map.d.ts +10 -10
- package/dist/Display/icon-map.js +14 -10
- package/dist/Form/Form.DatePicker.js +2 -0
- package/dist/Form/Form.Input.d.ts +1 -1
- package/dist/Form/Form.Input.js +234 -215
- package/dist/Form/Form.KeyboardToolbarHost.js +78 -37
- package/dist/Form/Form.PickerField.js +133 -156
- package/dist/Form/Form.RadioButton.d.ts +1 -0
- package/dist/Form/Form.RadioButton.js +11 -122
- package/dist/Form/Form.Select.d.ts +2 -1
- package/dist/Form/Form.Select.js +183 -286
- package/dist/Form/choice-row.d.ts +15 -0
- package/dist/Form/choice-row.js +236 -0
- package/dist/theme/active.d.ts +2 -0
- package/dist/theme/active.js +13 -0
- package/dist/theme/useTheme.d.ts +4 -0
- package/dist/theme/useTheme.js +7 -12
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import Icon from "./Display.Icon.js";
|
|
3
3
|
import { useTheme } from "../theme/index.js";
|
|
4
|
+
import { resolveOnColor } from "../theme/contrast.js";
|
|
4
5
|
import { Typography } from "../Typography/index.js";
|
|
5
6
|
import { useRef } from "react";
|
|
6
7
|
import { TouchableOpacity, View } from "react-native";
|
|
@@ -26,29 +27,35 @@ function ActionButtons(t0) {
|
|
|
26
27
|
if ($[1] !== actions || $[2] !== onDone || $[3] !== theme) {
|
|
27
28
|
let t3;
|
|
28
29
|
if ($[5] !== onDone || $[6] !== theme) {
|
|
29
|
-
t3 = (action, index) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
30
|
+
t3 = (action, index) => {
|
|
31
|
+
const ink = action.color ? resolveOnColor(action.color) : theme.text.onDanger;
|
|
32
|
+
return _jsxs(TouchableOpacity, {
|
|
33
|
+
accessibilityLabel: action.label ?? "Acci\xF3n",
|
|
34
|
+
accessibilityRole: "button",
|
|
35
|
+
activeOpacity: 0.8,
|
|
36
|
+
onPress: () => {
|
|
37
|
+
onDone();
|
|
38
|
+
action.onPress();
|
|
39
|
+
},
|
|
40
|
+
style: {
|
|
41
|
+
backgroundColor: action.color ?? theme.danger,
|
|
42
|
+
justifyContent: "center",
|
|
43
|
+
alignItems: "center",
|
|
44
|
+
paddingHorizontal: 20
|
|
45
|
+
},
|
|
46
|
+
children: [action.icon ? _jsx(Icon, {
|
|
47
|
+
color: ink,
|
|
48
|
+
name: action.icon,
|
|
49
|
+
size: 20
|
|
50
|
+
}) : null, action.label ? _jsx(Typography.Text, {
|
|
51
|
+
className: "mt-1",
|
|
52
|
+
style: {
|
|
53
|
+
color: ink
|
|
54
|
+
},
|
|
55
|
+
children: action.label
|
|
56
|
+
}) : null]
|
|
57
|
+
}, index);
|
|
58
|
+
};
|
|
52
59
|
$[5] = onDone;
|
|
53
60
|
$[6] = theme;
|
|
54
61
|
$[7] = t3;
|
|
@@ -10,7 +10,7 @@ export declare const ICON_MAP: {
|
|
|
10
10
|
readonly md: "add";
|
|
11
11
|
};
|
|
12
12
|
readonly "add-circle": {
|
|
13
|
-
readonly sf: "plus.circle
|
|
13
|
+
readonly sf: "plus.circle";
|
|
14
14
|
readonly md: "add_circle";
|
|
15
15
|
};
|
|
16
16
|
readonly archive: {
|
|
@@ -90,7 +90,7 @@ export declare const ICON_MAP: {
|
|
|
90
90
|
readonly md: "delete";
|
|
91
91
|
};
|
|
92
92
|
readonly dismiss: {
|
|
93
|
-
readonly sf: "xmark.circle
|
|
93
|
+
readonly sf: "xmark.circle";
|
|
94
94
|
readonly md: "cancel";
|
|
95
95
|
};
|
|
96
96
|
readonly document: {
|
|
@@ -118,7 +118,7 @@ export declare const ICON_MAP: {
|
|
|
118
118
|
readonly md: "inbox";
|
|
119
119
|
};
|
|
120
120
|
readonly error: {
|
|
121
|
-
readonly sf: "exclamationmark.circle
|
|
121
|
+
readonly sf: "exclamationmark.circle";
|
|
122
122
|
readonly md: "error";
|
|
123
123
|
};
|
|
124
124
|
readonly expand: {
|
|
@@ -146,7 +146,7 @@ export declare const ICON_MAP: {
|
|
|
146
146
|
readonly md: "visibility_off";
|
|
147
147
|
};
|
|
148
148
|
readonly home: {
|
|
149
|
-
readonly sf: "house
|
|
149
|
+
readonly sf: "house";
|
|
150
150
|
readonly md: "home";
|
|
151
151
|
};
|
|
152
152
|
readonly image: {
|
|
@@ -158,7 +158,7 @@ export declare const ICON_MAP: {
|
|
|
158
158
|
readonly md: "inbox";
|
|
159
159
|
};
|
|
160
160
|
readonly info: {
|
|
161
|
-
readonly sf: "info.circle
|
|
161
|
+
readonly sf: "info.circle";
|
|
162
162
|
readonly md: "info";
|
|
163
163
|
};
|
|
164
164
|
readonly link: {
|
|
@@ -206,7 +206,7 @@ export declare const ICON_MAP: {
|
|
|
206
206
|
readonly md: "more_vert";
|
|
207
207
|
};
|
|
208
208
|
readonly mute: {
|
|
209
|
-
readonly sf: "speaker.slash
|
|
209
|
+
readonly sf: "speaker.slash";
|
|
210
210
|
readonly md: "volume_off";
|
|
211
211
|
};
|
|
212
212
|
readonly next: {
|
|
@@ -290,11 +290,11 @@ export declare const ICON_MAP: {
|
|
|
290
290
|
readonly md: "share";
|
|
291
291
|
};
|
|
292
292
|
readonly stop: {
|
|
293
|
-
readonly sf: "hand.raised
|
|
293
|
+
readonly sf: "hand.raised";
|
|
294
294
|
readonly md: "front_hand";
|
|
295
295
|
};
|
|
296
296
|
readonly success: {
|
|
297
|
-
readonly sf: "checkmark.circle
|
|
297
|
+
readonly sf: "checkmark.circle";
|
|
298
298
|
readonly md: "check_circle";
|
|
299
299
|
};
|
|
300
300
|
readonly sync: {
|
|
@@ -326,7 +326,7 @@ export declare const ICON_MAP: {
|
|
|
326
326
|
readonly md: "visibility";
|
|
327
327
|
};
|
|
328
328
|
readonly volume: {
|
|
329
|
-
readonly sf: "speaker.wave.2
|
|
329
|
+
readonly sf: "speaker.wave.2";
|
|
330
330
|
readonly md: "volume_up";
|
|
331
331
|
};
|
|
332
332
|
readonly wallet: {
|
|
@@ -334,7 +334,7 @@ export declare const ICON_MAP: {
|
|
|
334
334
|
readonly md: "wallet";
|
|
335
335
|
};
|
|
336
336
|
readonly warning: {
|
|
337
|
-
readonly sf: "exclamationmark.triangle
|
|
337
|
+
readonly sf: "exclamationmark.triangle";
|
|
338
338
|
readonly md: "warning";
|
|
339
339
|
};
|
|
340
340
|
readonly wifi: {
|
package/dist/Display/icon-map.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
// Android and web draw from Material Symbols 400, an outline-only font. SF Symbols use the
|
|
2
|
+
// outline variant too, so an icon looks the same on both platforms. Only glyphs that are
|
|
3
|
+
// solid in Material as well (play, pause) or whose fill is the meaning against an empty pair
|
|
4
|
+
// (rating / rating-empty, bookmark / bookmark-empty) use `.fill`.
|
|
1
5
|
export const ICON_MAP = {
|
|
2
6
|
add: {
|
|
3
7
|
sf: "plus",
|
|
4
8
|
md: "add"
|
|
5
9
|
},
|
|
6
10
|
"add-circle": {
|
|
7
|
-
sf: "plus.circle
|
|
11
|
+
sf: "plus.circle",
|
|
8
12
|
md: "add_circle"
|
|
9
13
|
},
|
|
10
14
|
archive: {
|
|
@@ -84,7 +88,7 @@ export const ICON_MAP = {
|
|
|
84
88
|
md: "delete"
|
|
85
89
|
},
|
|
86
90
|
dismiss: {
|
|
87
|
-
sf: "xmark.circle
|
|
91
|
+
sf: "xmark.circle",
|
|
88
92
|
md: "cancel"
|
|
89
93
|
},
|
|
90
94
|
document: {
|
|
@@ -112,7 +116,7 @@ export const ICON_MAP = {
|
|
|
112
116
|
md: "inbox"
|
|
113
117
|
},
|
|
114
118
|
error: {
|
|
115
|
-
sf: "exclamationmark.circle
|
|
119
|
+
sf: "exclamationmark.circle",
|
|
116
120
|
md: "error"
|
|
117
121
|
},
|
|
118
122
|
expand: {
|
|
@@ -140,7 +144,7 @@ export const ICON_MAP = {
|
|
|
140
144
|
md: "visibility_off"
|
|
141
145
|
},
|
|
142
146
|
home: {
|
|
143
|
-
sf: "house
|
|
147
|
+
sf: "house",
|
|
144
148
|
md: "home"
|
|
145
149
|
},
|
|
146
150
|
image: {
|
|
@@ -152,7 +156,7 @@ export const ICON_MAP = {
|
|
|
152
156
|
md: "inbox"
|
|
153
157
|
},
|
|
154
158
|
info: {
|
|
155
|
-
sf: "info.circle
|
|
159
|
+
sf: "info.circle",
|
|
156
160
|
md: "info"
|
|
157
161
|
},
|
|
158
162
|
link: {
|
|
@@ -200,7 +204,7 @@ export const ICON_MAP = {
|
|
|
200
204
|
md: "more_vert"
|
|
201
205
|
},
|
|
202
206
|
mute: {
|
|
203
|
-
sf: "speaker.slash
|
|
207
|
+
sf: "speaker.slash",
|
|
204
208
|
md: "volume_off"
|
|
205
209
|
},
|
|
206
210
|
next: {
|
|
@@ -284,11 +288,11 @@ export const ICON_MAP = {
|
|
|
284
288
|
md: "share"
|
|
285
289
|
},
|
|
286
290
|
stop: {
|
|
287
|
-
sf: "hand.raised
|
|
291
|
+
sf: "hand.raised",
|
|
288
292
|
md: "front_hand"
|
|
289
293
|
},
|
|
290
294
|
success: {
|
|
291
|
-
sf: "checkmark.circle
|
|
295
|
+
sf: "checkmark.circle",
|
|
292
296
|
md: "check_circle"
|
|
293
297
|
},
|
|
294
298
|
sync: {
|
|
@@ -320,7 +324,7 @@ export const ICON_MAP = {
|
|
|
320
324
|
md: "visibility"
|
|
321
325
|
},
|
|
322
326
|
volume: {
|
|
323
|
-
sf: "speaker.wave.2
|
|
327
|
+
sf: "speaker.wave.2",
|
|
324
328
|
md: "volume_up"
|
|
325
329
|
},
|
|
326
330
|
wallet: {
|
|
@@ -328,7 +332,7 @@ export const ICON_MAP = {
|
|
|
328
332
|
md: "wallet"
|
|
329
333
|
},
|
|
330
334
|
warning: {
|
|
331
|
-
sf: "exclamationmark.triangle
|
|
335
|
+
sf: "exclamationmark.triangle",
|
|
332
336
|
md: "warning"
|
|
333
337
|
},
|
|
334
338
|
wifi: {
|
|
@@ -49,6 +49,7 @@ function withClockTime(base, time) {
|
|
|
49
49
|
next.setHours(time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds());
|
|
50
50
|
return next;
|
|
51
51
|
}
|
|
52
|
+
const CALENDAR_SNAP_POINTS = ["90%"];
|
|
52
53
|
function DatePicker(t0) {
|
|
53
54
|
const $ = _c(107);
|
|
54
55
|
const {
|
|
@@ -464,6 +465,7 @@ function DatePicker(t0) {
|
|
|
464
465
|
title: "Aplicar"
|
|
465
466
|
}),
|
|
466
467
|
onClose: close,
|
|
468
|
+
snapPoints: mode === "date" ? CALENDAR_SNAP_POINTS : undefined,
|
|
467
469
|
title: label ?? (mode === "time" ? "Seleccionar hora" : "Seleccionar fecha"),
|
|
468
470
|
visible: open,
|
|
469
471
|
children: [open ? _jsx(View, {
|
|
@@ -21,5 +21,5 @@ export interface FormInputProps extends Omit<TextInputProps, "secureTextEntry">
|
|
|
21
21
|
* | `card` | bodySmall, semibold | card surface, rounded-lg, ≥48 | 8 |
|
|
22
22
|
* | `outline` | bodyLarge | border only, rounded, 44 high | 16 |
|
|
23
23
|
*/
|
|
24
|
-
declare function FormInput({ label, error, tooltip, look, secure, style, multiline, numberOfLines, onFocus, onBlur, className, ref, ...props }: FormInputProps): import("react").JSX.Element;
|
|
24
|
+
declare function FormInput({ label, error, tooltip, look, secure, style, multiline, numberOfLines, onFocus, onBlur, onSubmitEditing, submitBehavior, className, ref, ...props }: FormInputProps): import("react").JSX.Element;
|
|
25
25
|
export default FormInput;
|