@sincpro/mobile-ui 3.0.0 → 3.1.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/Actions/Actions.Button.d.ts +6 -6
- package/dist/Actions/Actions.Button.js +650 -180
- package/dist/Actions/Actions.Dock.d.ts +1 -1
- package/dist/Actions/Actions.Dock.js +297 -18
- package/dist/Actions/Actions.FAB.js +100 -12
- package/dist/Actions/Actions.FilterButton.d.ts +17 -0
- package/dist/Actions/Actions.FilterButton.js +263 -33
- package/dist/Actions/Actions.IconButton.d.ts +1 -0
- package/dist/Actions/Actions.IconButton.js +196 -33
- package/dist/Actions/index.js +13 -13
- package/dist/Dialog/Confirmation.context.js +82 -16
- package/dist/Dialog/Dialog.ActionSheet.js +200 -41
- package/dist/Dialog/Dialog.Confirmation.js +168 -31
- package/dist/Dialog/Dialog.EditValue.js +449 -61
- package/dist/Dialog/Dialog.Sheet.d.ts +7 -3
- package/dist/Dialog/Dialog.Sheet.js +231 -15
- package/dist/Dialog/OverlayHost.d.ts +23 -0
- package/dist/Dialog/OverlayHost.js +196 -0
- package/dist/Dialog/SheetSurface.d.ts +24 -0
- package/dist/Dialog/SheetSurface.js +441 -0
- package/dist/Dialog/dialog-actions.d.ts +17 -0
- package/dist/Dialog/dialog-actions.js +59 -0
- package/dist/Dialog/index.d.ts +4 -1
- package/dist/Dialog/index.js +8 -7
- package/dist/Dialog/overlay.store.d.ts +24 -0
- package/dist/Dialog/overlay.store.js +59 -0
- package/dist/Dialog/requestConfirmation.js +20 -10
- package/dist/Display/Display.Accordion.js +185 -13
- package/dist/Display/Display.AmountSummary.js +206 -15
- package/dist/Display/Display.Avatar.js +93 -31
- package/dist/Display/Display.AvatarGroup.js +132 -17
- package/dist/Display/Display.Badge.d.ts +18 -2
- package/dist/Display/Display.Badge.js +117 -49
- package/dist/Display/Display.Card.js +163 -26
- package/dist/Display/Display.Carousel.js +459 -105
- package/dist/Display/Display.Chip.d.ts +4 -1
- package/dist/Display/Display.Chip.js +165 -31
- package/dist/Display/Display.CircleButton.d.ts +1 -0
- package/dist/Display/Display.CircleButton.js +86 -27
- package/dist/Display/Display.CopyableText.js +289 -66
- package/dist/Display/Display.CountRecords.js +60 -3
- package/dist/Display/Display.DataTable.js +123 -13
- package/dist/Display/Display.Date.js +243 -33
- package/dist/Display/Display.Divider.d.ts +10 -10
- package/dist/Display/Display.Divider.js +67 -20
- package/dist/Display/Display.ExpoImage.js +97 -8
- package/dist/Display/Display.GradientSurface.d.ts +9 -4
- package/dist/Display/Display.GradientSurface.js +196 -46
- package/dist/Display/Display.Icon.js +129 -15
- package/dist/Display/Display.IconBadge.js +95 -25
- package/dist/Display/Display.Image.d.ts +7 -1
- package/dist/Display/Display.Image.js +344 -39
- package/dist/Display/Display.KeyValue.js +90 -5
- package/dist/Display/Display.ListGroup.js +181 -9
- package/dist/Display/Display.ListItem.js +324 -28
- package/dist/Display/Display.Logo.js +84 -29
- package/dist/Display/Display.MediaCard.js +125 -4
- package/dist/Display/Display.MediaEmbed.d.ts +0 -5
- package/dist/Display/Display.MediaEmbed.js +170 -26
- package/dist/Display/Display.MenuButton.d.ts +2 -2
- package/dist/Display/Display.MenuButton.js +380 -94
- package/dist/Display/Display.MenuCard.js +122 -18
- package/dist/Display/Display.MenuGrid.js +43 -3
- package/dist/Display/Display.Monetary.js +90 -5
- package/dist/Display/Display.Pattern.js +306 -47
- package/dist/Display/Display.PriceTag.js +117 -14
- package/dist/Display/Display.ProductCard.js +154 -4
- package/dist/Display/Display.Rating.js +92 -11
- package/dist/Display/Display.SearchHistory.js +132 -6
- package/dist/Display/Display.SectionHeader.d.ts +5 -1
- package/dist/Display/Display.SectionHeader.js +125 -12
- package/dist/Display/Display.Stat.js +62 -3
- package/dist/Display/Display.StatCard.js +131 -7
- package/dist/Display/Display.StatusBadge.d.ts +29 -0
- package/dist/Display/Display.StatusBadge.js +68 -0
- package/dist/Display/Display.StatusDot.js +93 -18
- package/dist/Display/Display.Story.js +285 -35
- package/dist/Display/Display.StoryTray.js +354 -34
- package/dist/Display/Display.StoryViewer.js +571 -72
- package/dist/Display/Display.SwipeableRow.js +141 -20
- package/dist/Display/Display.Tag.d.ts +4 -1
- package/dist/Display/Display.Tag.js +66 -4
- package/dist/Display/Display.Timeline.js +102 -13
- package/dist/Display/Display.Tooltip.js +122 -26
- package/dist/Display/chevron.d.ts +6 -0
- package/dist/Display/chevron.js +32 -0
- package/dist/Display/count-badge.d.ts +21 -0
- package/dist/Display/count-badge.js +124 -0
- package/dist/Display/group-title.d.ts +10 -0
- package/dist/Display/group-title.js +53 -0
- package/dist/Display/icon-font.d.ts +3 -0
- package/dist/Display/icon-font.ios.d.ts +3 -0
- package/dist/Display/icon-font.ios.js +4 -0
- package/dist/Display/icon-font.js +7 -0
- package/dist/Display/icon-glyphs.d.ts +2 -0
- package/dist/Display/icon-glyphs.js +87 -0
- package/dist/Display/icon-map.d.ts +5 -1
- package/dist/Display/icon-map.js +340 -84
- package/dist/Display/icon-registry.d.ts +21 -0
- package/dist/Display/icon-registry.js +21 -0
- package/dist/Display/index.d.ts +6 -1
- package/dist/Display/index.js +53 -48
- package/dist/Display/pill.d.ts +16 -0
- package/dist/Display/pill.js +47 -0
- package/dist/Feedback/ErrorBoundary.js +35 -23
- package/dist/Feedback/Feedback.Banner.js +202 -24
- package/dist/Feedback/Feedback.DomainSplashScreen.js +246 -70
- package/dist/Feedback/Feedback.Empty.js +54 -3
- package/dist/Feedback/Feedback.EmptyState.js +114 -5
- package/dist/Feedback/Feedback.Error.d.ts +1 -1
- package/dist/Feedback/Feedback.Error.js +130 -5
- package/dist/Feedback/Feedback.Loading.d.ts +1 -1
- package/dist/Feedback/Feedback.Loading.js +70 -3
- package/dist/Feedback/Feedback.PermissionCard.js +161 -5
- package/dist/Feedback/Feedback.Progress.js +199 -41
- package/dist/Feedback/Feedback.ProgressCircle.js +184 -12
- package/dist/Feedback/Feedback.Skeleton.js +149 -36
- package/dist/Feedback/Feedback.Spinner.js +407 -79
- package/dist/Feedback/Feedback.Splash.js +240 -33
- package/dist/Feedback/Feedback.State.d.ts +17 -0
- package/dist/Feedback/Feedback.State.js +104 -0
- package/dist/Feedback/Toast.context.js +883 -167
- package/dist/Feedback/index.d.ts +3 -0
- package/dist/Feedback/index.js +15 -13
- package/dist/Form/Form.Checkbox.js +212 -22
- package/dist/Form/Form.ControlledCheckbox.d.ts +1 -1
- package/dist/Form/Form.ControlledCheckbox.js +46 -4
- package/dist/Form/Form.ControlledDropdown.d.ts +1 -1
- package/dist/Form/Form.ControlledDropdown.js +62 -4
- package/dist/Form/Form.ControlledInput.d.ts +4 -3
- package/dist/Form/Form.ControlledInput.js +72 -4
- package/dist/Form/Form.ControlledMonetaryInput.d.ts +6 -3
- package/dist/Form/Form.ControlledMonetaryInput.js +50 -4
- package/dist/Form/Form.ControlledRadioButton.d.ts +2 -2
- package/dist/Form/Form.ControlledRadioButton.js +45 -4
- package/dist/Form/Form.DatePicker.js +505 -107
- package/dist/Form/Form.Dropdown.js +303 -52
- package/dist/Form/Form.ErrorSummary.js +236 -44
- package/dist/Form/Form.Field.d.ts +24 -0
- package/dist/Form/Form.Field.js +55 -0
- package/dist/Form/Form.FractionalQuantityInput.js +508 -96
- package/dist/Form/Form.Input.d.ts +17 -3
- package/dist/Form/Form.Input.js +478 -29
- package/dist/Form/Form.KeyboardForm.d.ts +22 -8
- package/dist/Form/Form.KeyboardForm.js +83 -8
- package/dist/Form/Form.KeyboardToolbarHost.d.ts +14 -0
- package/dist/Form/Form.KeyboardToolbarHost.js +182 -0
- package/dist/Form/Form.MonetaryInput.js +164 -17
- package/dist/Form/Form.PickerField.d.ts +31 -0
- package/dist/Form/Form.PickerField.js +562 -0
- package/dist/Form/Form.PinInput.js +150 -15
- package/dist/Form/Form.QuantitySelector.js +229 -25
- package/dist/Form/Form.RadioButton.js +132 -24
- package/dist/Form/Form.Select.js +487 -56
- package/dist/Form/Form.Slider.js +133 -10
- package/dist/Form/Form.Switch.js +99 -4
- package/dist/Form/index.d.ts +11 -6
- package/dist/Form/index.js +26 -27
- package/dist/Form/input-text.d.ts +7 -0
- package/dist/Form/input-text.js +18 -0
- package/dist/Navigation/Navigation.AppBar.d.ts +3 -4
- package/dist/Navigation/Navigation.AppBar.js +535 -99
- package/dist/Navigation/Navigation.BottomNav.js +363 -98
- package/dist/Navigation/Navigation.CollapsingHeader.d.ts +28 -13
- package/dist/Navigation/Navigation.CollapsingHeader.js +369 -36
- package/dist/Navigation/Navigation.FloatingBar.js +71 -11
- package/dist/Navigation/Navigation.Menu.js +309 -95
- package/dist/Navigation/Navigation.MenuSection.js +80 -11
- package/dist/Navigation/Navigation.RowItem.d.ts +4 -2
- package/dist/Navigation/Navigation.RowItem.js +93 -8
- package/dist/Navigation/Navigation.Search.js +241 -27
- package/dist/Navigation/Navigation.SearchBar.d.ts +7 -1
- package/dist/Navigation/Navigation.SearchBar.js +218 -29
- package/dist/Navigation/Navigation.SearchSuggestions.js +77 -3
- package/dist/Navigation/Navigation.SegmentedControl.js +152 -14
- package/dist/Navigation/Navigation.Steps.js +105 -11
- package/dist/Navigation/Navigation.Tabs.js +449 -41
- package/dist/Navigation/index.d.ts +9 -4
- package/dist/Navigation/index.js +13 -13
- package/dist/Typography/Typography.Heading.js +33 -3
- package/dist/Typography/Typography.SelectableText.js +95 -7
- package/dist/Typography/Typography.Text.d.ts +4 -2
- package/dist/Typography/Typography.Text.js +217 -7
- package/dist/Typography/index.js +3 -3
- package/dist/branding.js +29 -13
- package/dist/icons/AddItemIcon.js +76 -2
- package/dist/icons/ArrangeCircle.js +82 -2
- package/dist/icons/ArrowDownIcon.js +63 -3
- package/dist/icons/ArrowUpIcon.js +63 -3
- package/dist/icons/BoxIcon.js +64 -2
- package/dist/icons/BoxTimeIcon.js +63 -2
- package/dist/icons/CalendarIcon.js +145 -2
- package/dist/icons/CardIcon.js +80 -2
- package/dist/icons/CashierIcon.js +39 -2
- package/dist/icons/CreditIcon.js +76 -3
- package/dist/icons/DuoIcon.js +75 -2
- package/dist/icons/HomeIcon.js +39 -2
- package/dist/icons/HomeIconOutlined.js +53 -2
- package/dist/icons/LogoIcon.js +87 -2
- package/dist/icons/MoneyReceiveIcon.js +86 -2
- package/dist/icons/PinIcon.js +39 -2
- package/dist/icons/ProfileIcon.js +47 -2
- package/dist/icons/SettingsIcon.js +114 -2
- package/dist/icons/SinpeIcon.js +60 -2
- package/dist/icons/ToggleOffIcon.js +53 -2
- package/dist/icons/WalletMoneyIcon.js +81 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -2
- package/dist/layouts/AuthContainer.d.ts +4 -5
- package/dist/layouts/AuthContainer.js +231 -7
- package/dist/layouts/BottomInset.js +4 -1
- package/dist/layouts/Container.d.ts +2 -2
- package/dist/layouts/Container.js +45 -3
- package/dist/layouts/GradientContainer.js +37 -5
- package/dist/layouts/PlainLayout.js +19 -3
- package/dist/layouts/ScrollContainer.d.ts +14 -9
- package/dist/layouts/ScrollContainer.js +125 -4
- package/dist/layouts/edges.d.ts +2 -0
- package/dist/layouts/edges.js +1 -0
- package/dist/primitives/AspectRatio.js +75 -3
- package/dist/primitives/Box.js +45 -3
- package/dist/primitives/Pressable.js +95 -5
- package/dist/primitives/Row.js +84 -13
- package/dist/primitives/Spacer.js +42 -5
- package/dist/primitives/Stack.js +66 -7
- package/dist/primitives/index.js +1 -1
- package/dist/theme/active.js +20 -18
- package/dist/theme/build.js +118 -87
- package/dist/theme/color.js +87 -87
- package/dist/theme/components/ThemedActivityIndicator.d.ts +2 -15
- package/dist/theme/components/ThemedActivityIndicator.js +35 -3
- package/dist/theme/components/index.js +1 -0
- package/dist/theme/contrast.js +32 -33
- package/dist/theme/css-vars.js +71 -75
- package/dist/theme/dark.js +116 -97
- package/dist/theme/default.js +116 -97
- package/dist/theme/define.js +16 -12
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +7 -6
- package/dist/theme/on-dark-surface.d.ts +12 -0
- package/dist/theme/on-dark-surface.js +13 -0
- package/dist/theme/theme.js +1 -0
- package/dist/theme/tw.js +3 -1
- package/dist/theme/types.js +0 -18
- package/dist/theme/typography.d.ts +1 -1
- package/dist/theme/typography.js +337 -303
- package/dist/theme/useTheme.js +12 -3
- package/dist/theme/useThemeVars.d.ts +9 -0
- package/dist/theme/useThemeVars.js +23 -0
- package/dist/theme/validate.js +175 -166
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/motion.js +30 -13
- package/dist/utils/async.d.ts +14 -0
- package/dist/utils/async.js +22 -0
- package/dist/utils/criteria.js +66 -85
- package/dist/utils/date.d.ts +8 -2
- package/dist/utils/date.js +63 -50
- package/dist/utils/image.js +8 -8
- package/dist/utils/intl.d.ts +1 -0
- package/dist/utils/intl.js +13 -0
- package/dist/utils/keys.js +3 -5
- package/dist/utils/monetary.d.ts +1 -0
- package/dist/utils/monetary.js +28 -24
- package/dist/utils/progress.js +2 -3
- package/dist/utils/quantity.js +25 -26
- package/dist/utils/reorder.js +11 -20
- package/dist/utils/search.d.ts +4 -0
- package/dist/utils/search.js +12 -0
- package/dist/utils/serializer.js +38 -38
- package/dist/utils/useReducedMotion.js +32 -30
- package/dist/views/AppSplashView.js +117 -3
- package/dist/views/AuthFormView.d.ts +4 -5
- package/dist/views/AuthFormView.js +119 -11
- package/dist/views/FormViewV2.context.js +75 -23
- package/dist/views/FormViewV2.d.ts +4 -5
- package/dist/views/FormViewV2.js +658 -92
- package/dist/views/ListViewV2.context.js +91 -47
- package/dist/views/ListViewV2.d.ts +84 -43
- package/dist/views/ListViewV2.js +1350 -200
- package/dist/views/Wizard/Wizard.context.js +248 -84
- package/dist/views/Wizard/Wizard.js +260 -67
- package/dist/views/types/IListView.js +34 -31
- package/dist/widgets/CollectionOptions.js +557 -138
- package/dist/widgets/FilterBar.js +159 -7
- package/dist/widgets/FilterBuilder.js +375 -102
- package/dist/widgets/JSONViewer.js +275 -129
- package/dist/widgets/PromoBanner.js +336 -42
- package/dist/widgets/PromoModal.d.ts +2 -2
- package/dist/widgets/PromoModal.js +389 -62
- package/dist/widgets/QueryChoice.js +150 -8
- package/dist/widgets/QuickActions.js +120 -31
- package/dist/widgets/ReorderableList.js +399 -128
- package/dist/widgets/TimeZoneSelectorModal.js +458 -51
- package/dist/widgets/index.js +3 -3
- package/package.json +7 -2
- package/tailwind.preset.js +7 -5
- package/dist/Form/Form.InputField.d.ts +0 -10
- package/dist/Form/Form.InputField.js +0 -38
- package/dist/Form/Form.KeyboardToolbar.d.ts +0 -22
- package/dist/Form/Form.KeyboardToolbar.js +0 -66
- package/dist/Form/Form.PasswordInput.d.ts +0 -9
- package/dist/Form/Form.PasswordInput.js +0 -17
- package/dist/Form/Form.TextInput.d.ts +0 -8
- package/dist/Form/Form.TextInput.js +0 -8
- package/dist/primitives/BaseButton.d.ts +0 -150
- package/dist/primitives/BaseButton.js +0 -229
- package/dist/utils/useSheetTranslation.d.ts +0 -5
- package/dist/utils/useSheetTranslation.js +0 -23
package/dist/Form/Form.Slider.js
CHANGED
|
@@ -1,17 +1,140 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import NativeSlider from "@expo/ui/community/slider";
|
|
3
3
|
import { useTheme } from "../theme/index.js";
|
|
4
4
|
import { cn } from "../theme/tw.js";
|
|
5
5
|
import { Typography } from "../Typography/index.js";
|
|
6
6
|
import { View } from "react-native";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
8
|
+
function Slider(t0) {
|
|
9
|
+
const $ = _c(30);
|
|
10
|
+
const {
|
|
11
|
+
value,
|
|
12
|
+
onChange,
|
|
13
|
+
min: t1,
|
|
14
|
+
max: t2,
|
|
15
|
+
step: t3,
|
|
16
|
+
label,
|
|
17
|
+
formatValue,
|
|
18
|
+
disabled: t4,
|
|
19
|
+
readOnly: t5,
|
|
20
|
+
accessibilityLabel,
|
|
21
|
+
accessibilityHint,
|
|
22
|
+
className,
|
|
23
|
+
testID
|
|
24
|
+
} = t0;
|
|
25
|
+
const min = t1 === undefined ? 0 : t1;
|
|
26
|
+
const max = t2 === undefined ? 100 : t2;
|
|
27
|
+
const step = t3 === undefined ? 1 : t3;
|
|
28
|
+
const disabled = t4 === undefined ? false : t4;
|
|
29
|
+
const readOnly = t5 === undefined ? false : t5;
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
const blocked = disabled || readOnly;
|
|
32
|
+
let t6;
|
|
33
|
+
if ($[0] !== className) {
|
|
34
|
+
t6 = cn("gap-1", className);
|
|
35
|
+
$[0] = className;
|
|
36
|
+
$[1] = t6;
|
|
37
|
+
} else {
|
|
38
|
+
t6 = $[1];
|
|
39
|
+
}
|
|
40
|
+
let t7;
|
|
41
|
+
if ($[2] !== formatValue || $[3] !== label || $[4] !== value) {
|
|
42
|
+
t7 = label || formatValue ? _jsxs(View, {
|
|
43
|
+
className: "flex-row items-center justify-between",
|
|
44
|
+
children: [label ? _jsx(Typography.Text, {
|
|
45
|
+
className: "text-text-primary",
|
|
46
|
+
semibold: true,
|
|
47
|
+
variant: "bodySmall",
|
|
48
|
+
children: label
|
|
49
|
+
}) : null, formatValue ? _jsx(Typography.Text, {
|
|
50
|
+
className: "text-text-secondary",
|
|
51
|
+
variant: "bodySmall",
|
|
52
|
+
children: formatValue(value)
|
|
53
|
+
}) : null]
|
|
54
|
+
}) : null;
|
|
55
|
+
$[2] = formatValue;
|
|
56
|
+
$[3] = label;
|
|
57
|
+
$[4] = value;
|
|
58
|
+
$[5] = t7;
|
|
59
|
+
} else {
|
|
60
|
+
t7 = $[5];
|
|
61
|
+
}
|
|
62
|
+
const t8 = accessibilityLabel ?? label ?? "Valor";
|
|
63
|
+
let t9;
|
|
64
|
+
if ($[6] !== blocked || $[7] !== max || $[8] !== min || $[9] !== onChange || $[10] !== step) {
|
|
65
|
+
t9 = next => {
|
|
66
|
+
if (blocked) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const snapped = step > 0 ? min + Math.round((next - min) / step) * step : next;
|
|
70
|
+
onChange(Math.min(max, Math.max(min, snapped)));
|
|
71
|
+
};
|
|
72
|
+
$[6] = blocked;
|
|
73
|
+
$[7] = max;
|
|
74
|
+
$[8] = min;
|
|
75
|
+
$[9] = onChange;
|
|
76
|
+
$[10] = step;
|
|
77
|
+
$[11] = t9;
|
|
78
|
+
} else {
|
|
79
|
+
t9 = $[11];
|
|
80
|
+
}
|
|
81
|
+
let t10;
|
|
82
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
83
|
+
t10 = {
|
|
84
|
+
minHeight: 48
|
|
85
|
+
};
|
|
86
|
+
$[12] = t10;
|
|
87
|
+
} else {
|
|
88
|
+
t10 = $[12];
|
|
89
|
+
}
|
|
90
|
+
const t11 = testID ? `${testID}-slider` : undefined;
|
|
91
|
+
let t12;
|
|
92
|
+
if ($[13] !== accessibilityHint || $[14] !== blocked || $[15] !== max || $[16] !== min || $[17] !== step || $[18] !== t11 || $[19] !== t8 || $[20] !== t9 || $[21] !== theme.container.primary || $[22] !== theme.primary || $[23] !== value) {
|
|
93
|
+
t12 = _jsx(NativeSlider, {
|
|
94
|
+
accessibilityHint: accessibilityHint,
|
|
95
|
+
accessibilityLabel: t8,
|
|
96
|
+
disabled: blocked,
|
|
97
|
+
maximumTrackTintColor: theme.container.primary,
|
|
98
|
+
maximumValue: max,
|
|
99
|
+
minimumTrackTintColor: theme.primary,
|
|
100
|
+
minimumValue: min,
|
|
101
|
+
onValueChange: t9,
|
|
102
|
+
step: step,
|
|
103
|
+
style: t10,
|
|
104
|
+
testID: t11,
|
|
105
|
+
thumbTintColor: theme.primary,
|
|
106
|
+
value: value
|
|
107
|
+
});
|
|
108
|
+
$[13] = accessibilityHint;
|
|
109
|
+
$[14] = blocked;
|
|
110
|
+
$[15] = max;
|
|
111
|
+
$[16] = min;
|
|
112
|
+
$[17] = step;
|
|
113
|
+
$[18] = t11;
|
|
114
|
+
$[19] = t8;
|
|
115
|
+
$[20] = t9;
|
|
116
|
+
$[21] = theme.container.primary;
|
|
117
|
+
$[22] = theme.primary;
|
|
118
|
+
$[23] = value;
|
|
119
|
+
$[24] = t12;
|
|
120
|
+
} else {
|
|
121
|
+
t12 = $[24];
|
|
122
|
+
}
|
|
123
|
+
let t13;
|
|
124
|
+
if ($[25] !== t12 || $[26] !== t6 || $[27] !== t7 || $[28] !== testID) {
|
|
125
|
+
t13 = _jsxs(View, {
|
|
126
|
+
className: t6,
|
|
127
|
+
testID: testID,
|
|
128
|
+
children: [t7, t12]
|
|
129
|
+
});
|
|
130
|
+
$[25] = t12;
|
|
131
|
+
$[26] = t6;
|
|
132
|
+
$[27] = t7;
|
|
133
|
+
$[28] = testID;
|
|
134
|
+
$[29] = t13;
|
|
135
|
+
} else {
|
|
136
|
+
t13 = $[29];
|
|
137
|
+
}
|
|
138
|
+
return t13;
|
|
16
139
|
}
|
|
17
140
|
export default Slider;
|
package/dist/Form/Form.Switch.js
CHANGED
|
@@ -1,10 +1,105 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useTheme } from "../theme/index.js";
|
|
3
3
|
import { cn } from "../theme/tw.js";
|
|
4
4
|
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { Switch as RNSwitch, View } from "react-native";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
7
|
+
function Switch(t0) {
|
|
8
|
+
const $ = _c(25);
|
|
9
|
+
const {
|
|
10
|
+
value,
|
|
11
|
+
onValueChange,
|
|
12
|
+
label,
|
|
13
|
+
disabled: t1,
|
|
14
|
+
className,
|
|
15
|
+
testID
|
|
16
|
+
} = t0;
|
|
17
|
+
const disabled = t1 === undefined ? false : t1;
|
|
18
|
+
const theme = useTheme();
|
|
19
|
+
let t2;
|
|
20
|
+
if ($[0] !== className) {
|
|
21
|
+
t2 = cn("flex-row items-center justify-between gap-3", className);
|
|
22
|
+
$[0] = className;
|
|
23
|
+
$[1] = t2;
|
|
24
|
+
} else {
|
|
25
|
+
t2 = $[1];
|
|
26
|
+
}
|
|
27
|
+
let t3;
|
|
28
|
+
if ($[2] !== disabled || $[3] !== label) {
|
|
29
|
+
t3 = label ? _jsx(Typography.Text, {
|
|
30
|
+
className: cn("flex-1 text-text-primary", disabled && "text-text-disabled"),
|
|
31
|
+
children: label
|
|
32
|
+
}) : null;
|
|
33
|
+
$[2] = disabled;
|
|
34
|
+
$[3] = label;
|
|
35
|
+
$[4] = t3;
|
|
36
|
+
} else {
|
|
37
|
+
t3 = $[4];
|
|
38
|
+
}
|
|
39
|
+
let t4;
|
|
40
|
+
if ($[5] !== disabled || $[6] !== value) {
|
|
41
|
+
t4 = {
|
|
42
|
+
checked: value,
|
|
43
|
+
disabled
|
|
44
|
+
};
|
|
45
|
+
$[5] = disabled;
|
|
46
|
+
$[6] = value;
|
|
47
|
+
$[7] = t4;
|
|
48
|
+
} else {
|
|
49
|
+
t4 = $[7];
|
|
50
|
+
}
|
|
51
|
+
let t5;
|
|
52
|
+
if ($[8] !== theme.bg.muted || $[9] !== theme.primary) {
|
|
53
|
+
t5 = {
|
|
54
|
+
false: theme.bg.muted,
|
|
55
|
+
true: theme.primary
|
|
56
|
+
};
|
|
57
|
+
$[8] = theme.bg.muted;
|
|
58
|
+
$[9] = theme.primary;
|
|
59
|
+
$[10] = t5;
|
|
60
|
+
} else {
|
|
61
|
+
t5 = $[10];
|
|
62
|
+
}
|
|
63
|
+
let t6;
|
|
64
|
+
if ($[11] !== disabled || $[12] !== label || $[13] !== onValueChange || $[14] !== t4 || $[15] !== t5 || $[16] !== testID || $[17] !== theme.bg.card || $[18] !== theme.bg.muted || $[19] !== value) {
|
|
65
|
+
t6 = _jsx(RNSwitch, {
|
|
66
|
+
accessibilityLabel: label,
|
|
67
|
+
accessibilityRole: "switch",
|
|
68
|
+
accessibilityState: t4,
|
|
69
|
+
disabled: disabled,
|
|
70
|
+
ios_backgroundColor: theme.bg.muted,
|
|
71
|
+
onValueChange: onValueChange,
|
|
72
|
+
testID: testID,
|
|
73
|
+
thumbColor: theme.bg.card,
|
|
74
|
+
trackColor: t5,
|
|
75
|
+
value: value
|
|
76
|
+
});
|
|
77
|
+
$[11] = disabled;
|
|
78
|
+
$[12] = label;
|
|
79
|
+
$[13] = onValueChange;
|
|
80
|
+
$[14] = t4;
|
|
81
|
+
$[15] = t5;
|
|
82
|
+
$[16] = testID;
|
|
83
|
+
$[17] = theme.bg.card;
|
|
84
|
+
$[18] = theme.bg.muted;
|
|
85
|
+
$[19] = value;
|
|
86
|
+
$[20] = t6;
|
|
87
|
+
} else {
|
|
88
|
+
t6 = $[20];
|
|
89
|
+
}
|
|
90
|
+
let t7;
|
|
91
|
+
if ($[21] !== t2 || $[22] !== t3 || $[23] !== t6) {
|
|
92
|
+
t7 = _jsxs(View, {
|
|
93
|
+
className: t2,
|
|
94
|
+
children: [t3, t6]
|
|
95
|
+
});
|
|
96
|
+
$[21] = t2;
|
|
97
|
+
$[22] = t3;
|
|
98
|
+
$[23] = t6;
|
|
99
|
+
$[24] = t7;
|
|
100
|
+
} else {
|
|
101
|
+
t7 = $[24];
|
|
102
|
+
}
|
|
103
|
+
return t7;
|
|
9
104
|
}
|
|
10
105
|
export default Switch;
|
package/dist/Form/index.d.ts
CHANGED
|
@@ -7,11 +7,13 @@ import ControlledRadioButton from "./Form.ControlledRadioButton.js";
|
|
|
7
7
|
import DatePicker from "./Form.DatePicker.js";
|
|
8
8
|
import Dropdown from "./Form.Dropdown.js";
|
|
9
9
|
import ErrorSummary from "./Form.ErrorSummary.js";
|
|
10
|
+
import Field from "./Form.Field.js";
|
|
10
11
|
import FractionalQuantityInput from "./Form.FractionalQuantityInput.js";
|
|
11
12
|
import Input from "./Form.Input.js";
|
|
12
13
|
import KeyboardForm from "./Form.KeyboardForm.js";
|
|
13
|
-
import
|
|
14
|
+
import KeyboardToolbarHost from "./Form.KeyboardToolbarHost.js";
|
|
14
15
|
import MonetaryInput from "./Form.MonetaryInput.js";
|
|
16
|
+
import PickerField from "./Form.PickerField.js";
|
|
15
17
|
import PinInput from "./Form.PinInput.js";
|
|
16
18
|
import QuantitySelector from "./Form.QuantitySelector.js";
|
|
17
19
|
import RadioButton from "./Form.RadioButton.js";
|
|
@@ -19,13 +21,11 @@ import Select from "./Form.Select.js";
|
|
|
19
21
|
import Slider from "./Form.Slider.js";
|
|
20
22
|
import Switch from "./Form.Switch.js";
|
|
21
23
|
export declare const Form: {
|
|
22
|
-
|
|
24
|
+
Field: typeof Field;
|
|
23
25
|
Input: typeof Input;
|
|
24
|
-
InputField: import("react").FC<import("./Form.InputField.js").InputFieldProps>;
|
|
25
26
|
KeyboardForm: typeof KeyboardForm;
|
|
26
|
-
|
|
27
|
+
KeyboardToolbarHost: typeof KeyboardToolbarHost;
|
|
27
28
|
ErrorSummary: typeof ErrorSummary;
|
|
28
|
-
PasswordInput: import("react").FC<import("./Form.PasswordInput.js").PasswordFieldProps>;
|
|
29
29
|
QuantitySelector: typeof QuantitySelector;
|
|
30
30
|
FractionalQuantityInput: typeof FractionalQuantityInput;
|
|
31
31
|
RadioButton: typeof RadioButton;
|
|
@@ -33,6 +33,7 @@ export declare const Form: {
|
|
|
33
33
|
Switch: typeof Switch;
|
|
34
34
|
Select: typeof Select;
|
|
35
35
|
PinInput: typeof PinInput;
|
|
36
|
+
PickerField: typeof PickerField;
|
|
36
37
|
Slider: typeof Slider;
|
|
37
38
|
DatePicker: typeof DatePicker;
|
|
38
39
|
Dropdown: typeof Dropdown;
|
|
@@ -47,8 +48,12 @@ export type { ControlledDropdownProps } from "./Form.ControlledDropdown.js";
|
|
|
47
48
|
export type { DatePickerProps } from "./Form.DatePicker.js";
|
|
48
49
|
export type { DropdownButtonProps, DropdownOption, } from "./Form.Dropdown.js";
|
|
49
50
|
export type { ErrorSummaryItem, ErrorSummaryProps, } from "./Form.ErrorSummary.js";
|
|
51
|
+
export type { FieldProps, FieldRenderProps, FieldRules, } from "./Form.Field.js";
|
|
52
|
+
export type { FormInputProps } from "./Form.Input.js";
|
|
50
53
|
export type { KeyboardFormProps } from "./Form.KeyboardForm.js";
|
|
51
|
-
export type {
|
|
54
|
+
export type { KeyboardToolbarHostProps } from "./Form.KeyboardToolbarHost.js";
|
|
55
|
+
export { useKeyboardToolbarInset } from "./Form.KeyboardToolbarHost.js";
|
|
56
|
+
export type { PickerFieldProps, PickerOption, } from "./Form.PickerField.js";
|
|
52
57
|
export type { SelectOption, SelectProps } from "./Form.Select.js";
|
|
53
58
|
export type { SliderProps } from "./Form.Slider.js";
|
|
54
59
|
export default Form;
|
package/dist/Form/index.js
CHANGED
|
@@ -7,43 +7,42 @@ import ControlledRadioButton from "./Form.ControlledRadioButton.js";
|
|
|
7
7
|
import DatePicker from "./Form.DatePicker.js";
|
|
8
8
|
import Dropdown from "./Form.Dropdown.js";
|
|
9
9
|
import ErrorSummary from "./Form.ErrorSummary.js";
|
|
10
|
+
import Field from "./Form.Field.js";
|
|
10
11
|
import FractionalQuantityInput from "./Form.FractionalQuantityInput.js";
|
|
11
12
|
import Input from "./Form.Input.js";
|
|
12
|
-
import InputField from "./Form.InputField.js";
|
|
13
13
|
import KeyboardForm from "./Form.KeyboardForm.js";
|
|
14
|
-
import
|
|
14
|
+
import KeyboardToolbarHost from "./Form.KeyboardToolbarHost.js";
|
|
15
15
|
import MonetaryInput from "./Form.MonetaryInput.js";
|
|
16
|
-
import
|
|
16
|
+
import PickerField from "./Form.PickerField.js";
|
|
17
17
|
import PinInput from "./Form.PinInput.js";
|
|
18
18
|
import QuantitySelector from "./Form.QuantitySelector.js";
|
|
19
19
|
import RadioButton from "./Form.RadioButton.js";
|
|
20
20
|
import Select from "./Form.Select.js";
|
|
21
21
|
import Slider from "./Form.Slider.js";
|
|
22
22
|
import Switch from "./Form.Switch.js";
|
|
23
|
-
import TextInput from "./Form.TextInput.js";
|
|
24
23
|
export const Form = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
ControlledMonetaryInput,
|
|
24
|
+
Field,
|
|
25
|
+
Input,
|
|
26
|
+
KeyboardForm,
|
|
27
|
+
KeyboardToolbarHost,
|
|
28
|
+
ErrorSummary,
|
|
29
|
+
QuantitySelector,
|
|
30
|
+
FractionalQuantityInput,
|
|
31
|
+
RadioButton,
|
|
32
|
+
Checkbox,
|
|
33
|
+
Switch,
|
|
34
|
+
Select,
|
|
35
|
+
PinInput,
|
|
36
|
+
PickerField,
|
|
37
|
+
Slider,
|
|
38
|
+
DatePicker,
|
|
39
|
+
Dropdown,
|
|
40
|
+
MonetaryInput,
|
|
41
|
+
ControlledInput,
|
|
42
|
+
ControlledRadioButton,
|
|
43
|
+
ControlledCheckbox,
|
|
44
|
+
ControlledDropdown,
|
|
45
|
+
ControlledMonetaryInput
|
|
48
46
|
};
|
|
47
|
+
export { useKeyboardToolbarInset } from "./Form.KeyboardToolbarHost.js";
|
|
49
48
|
export default Form;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TextStyle } from "react-native";
|
|
2
|
+
/**
|
|
3
|
+
* What the user types in any DS field: the `body` face and size of the configured fonts.
|
|
4
|
+
* Without it a TextInput falls back to the system font. No line height: on iOS it pushes
|
|
5
|
+
* single-line text off center.
|
|
6
|
+
*/
|
|
7
|
+
export declare function inputTextStyle(): TextStyle;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { appliedTextStyle } from "../theme/typography.js";
|
|
2
|
+
/**
|
|
3
|
+
* What the user types in any DS field: the `body` face and size of the configured fonts.
|
|
4
|
+
* Without it a TextInput falls back to the system font. No line height: on iOS it pushes
|
|
5
|
+
* single-line text off center.
|
|
6
|
+
*/
|
|
7
|
+
export function inputTextStyle() {
|
|
8
|
+
const {
|
|
9
|
+
fontFamily,
|
|
10
|
+
fontSize,
|
|
11
|
+
fontWeight
|
|
12
|
+
} = appliedTextStyle("body");
|
|
13
|
+
return {
|
|
14
|
+
fontFamily,
|
|
15
|
+
fontSize,
|
|
16
|
+
fontWeight
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { IconName } from "../Display/index.js";
|
|
2
|
-
import { type GradientPreset } from "../Display/Display.GradientSurface.js";
|
|
2
|
+
import { type GradientPoint, type GradientPreset } from "../Display/Display.GradientSurface.js";
|
|
3
3
|
import { type PatternKind } from "../Display/Display.Pattern.js";
|
|
4
|
-
import type { LinearGradientPoint } from "expo-linear-gradient";
|
|
5
4
|
import type { ReactNode } from "react";
|
|
6
5
|
export interface AppBarActionProps {
|
|
7
6
|
/** Ionicon name. Optional when `label` is set (text-only CTA). */
|
|
@@ -85,9 +84,9 @@ export interface AppBarBackground {
|
|
|
85
84
|
/** Custom color stops — overrides `surface`. Minimum 2 colors. */
|
|
86
85
|
colors?: readonly [string, string, ...string[]];
|
|
87
86
|
/** Gradient start point. Default: top-left `{ x: 0, y: 0 }`. */
|
|
88
|
-
start?:
|
|
87
|
+
start?: GradientPoint;
|
|
89
88
|
/** Gradient end point. Default: bottom-right `{ x: 1, y: 1 }`. */
|
|
90
|
-
end?:
|
|
89
|
+
end?: GradientPoint;
|
|
91
90
|
/** SVG texture overlay kind. */
|
|
92
91
|
pattern?: PatternKind;
|
|
93
92
|
/** Texture opacity (0–1). Default 0.18. */
|