@sincpro/mobile-ui 3.0.1 → 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/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 +437 -62
- package/dist/Dialog/Dialog.Sheet.d.ts +7 -3
- package/dist/Dialog/Dialog.Sheet.js +267 -15
- package/dist/Dialog/OverlayHost.d.ts +24 -0
- package/dist/Dialog/OverlayHost.js +230 -0
- package/dist/Dialog/SheetSurface.d.ts +43 -0
- package/dist/Dialog/SheetSurface.js +495 -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 +148 -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 +15 -11
- package/dist/Display/icon-map.js +344 -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 +507 -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 +497 -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 +223 -0
- package/dist/Form/Form.MonetaryInput.js +164 -17
- package/dist/Form/Form.PickerField.d.ts +31 -0
- package/dist/Form/Form.PickerField.js +539 -0
- package/dist/Form/Form.PinInput.js +150 -15
- package/dist/Form/Form.QuantitySelector.js +229 -25
- package/dist/Form/Form.RadioButton.d.ts +1 -0
- package/dist/Form/Form.RadioButton.js +26 -29
- package/dist/Form/Form.Select.d.ts +2 -1
- package/dist/Form/Form.Select.js +388 -60
- package/dist/Form/Form.Slider.js +133 -10
- package/dist/Form/Form.Switch.js +99 -4
- package/dist/Form/choice-row.d.ts +15 -0
- package/dist/Form/choice-row.js +236 -0
- 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.d.ts +2 -0
- package/dist/theme/active.js +33 -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.d.ts +4 -0
- package/dist/theme/useTheme.js +7 -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 +6 -1
- 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
|
@@ -1,29 +1,157 @@
|
|
|
1
|
-
import {
|
|
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";
|
|
7
8
|
import Swipeable from "react-native-gesture-handler/ReanimatedSwipeable";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
10
|
+
function ActionButtons(t0) {
|
|
11
|
+
const $ = _c(10);
|
|
12
|
+
const {
|
|
13
|
+
actions,
|
|
14
|
+
onDone
|
|
15
|
+
} = t0;
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
19
|
+
t1 = {
|
|
20
|
+
flexDirection: "row"
|
|
21
|
+
};
|
|
22
|
+
$[0] = t1;
|
|
23
|
+
} else {
|
|
24
|
+
t1 = $[0];
|
|
25
|
+
}
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[1] !== actions || $[2] !== onDone || $[3] !== theme) {
|
|
28
|
+
let t3;
|
|
29
|
+
if ($[5] !== onDone || $[6] !== theme) {
|
|
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
|
+
};
|
|
59
|
+
$[5] = onDone;
|
|
60
|
+
$[6] = theme;
|
|
61
|
+
$[7] = t3;
|
|
62
|
+
} else {
|
|
63
|
+
t3 = $[7];
|
|
64
|
+
}
|
|
65
|
+
t2 = actions.map(t3);
|
|
66
|
+
$[1] = actions;
|
|
67
|
+
$[2] = onDone;
|
|
68
|
+
$[3] = theme;
|
|
69
|
+
$[4] = t2;
|
|
70
|
+
} else {
|
|
71
|
+
t2 = $[4];
|
|
72
|
+
}
|
|
73
|
+
let t3;
|
|
74
|
+
if ($[8] !== t2) {
|
|
75
|
+
t3 = _jsx(View, {
|
|
76
|
+
style: t1,
|
|
77
|
+
children: t2
|
|
78
|
+
});
|
|
79
|
+
$[8] = t2;
|
|
80
|
+
$[9] = t3;
|
|
81
|
+
} else {
|
|
82
|
+
t3 = $[9];
|
|
83
|
+
}
|
|
84
|
+
return t3;
|
|
19
85
|
}
|
|
20
|
-
function SwipeableRow(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
86
|
+
function SwipeableRow(t0) {
|
|
87
|
+
const $ = _c(13);
|
|
88
|
+
const {
|
|
89
|
+
children,
|
|
90
|
+
visibleActions,
|
|
91
|
+
rightActions,
|
|
92
|
+
leftActions,
|
|
93
|
+
testID
|
|
94
|
+
} = t0;
|
|
95
|
+
const ref = useRef(null);
|
|
96
|
+
let t1;
|
|
97
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
98
|
+
t1 = () => ref.current?.close();
|
|
99
|
+
$[0] = t1;
|
|
100
|
+
} else {
|
|
101
|
+
t1 = $[0];
|
|
102
|
+
}
|
|
103
|
+
const close = t1;
|
|
104
|
+
let t2;
|
|
105
|
+
if ($[1] !== leftActions) {
|
|
106
|
+
t2 = leftActions?.length ? () => _jsx(ActionButtons, {
|
|
107
|
+
actions: leftActions,
|
|
108
|
+
onDone: close
|
|
109
|
+
}) : undefined;
|
|
110
|
+
$[1] = leftActions;
|
|
111
|
+
$[2] = t2;
|
|
112
|
+
} else {
|
|
113
|
+
t2 = $[2];
|
|
114
|
+
}
|
|
115
|
+
let t3;
|
|
116
|
+
if ($[3] !== rightActions) {
|
|
117
|
+
t3 = rightActions?.length ? () => _jsx(ActionButtons, {
|
|
118
|
+
actions: rightActions,
|
|
119
|
+
onDone: close
|
|
120
|
+
}) : undefined;
|
|
121
|
+
$[3] = rightActions;
|
|
122
|
+
$[4] = t3;
|
|
123
|
+
} else {
|
|
124
|
+
t3 = $[4];
|
|
125
|
+
}
|
|
126
|
+
let t4;
|
|
127
|
+
if ($[5] !== visibleActions) {
|
|
128
|
+
t4 = visibleActions ? _jsx(View, {
|
|
129
|
+
className: "flex-row",
|
|
130
|
+
children: visibleActions
|
|
131
|
+
}) : null;
|
|
132
|
+
$[5] = visibleActions;
|
|
133
|
+
$[6] = t4;
|
|
134
|
+
} else {
|
|
135
|
+
t4 = $[6];
|
|
136
|
+
}
|
|
137
|
+
let t5;
|
|
138
|
+
if ($[7] !== children || $[8] !== t2 || $[9] !== t3 || $[10] !== t4 || $[11] !== testID) {
|
|
139
|
+
t5 = _jsxs(Swipeable, {
|
|
140
|
+
ref: ref,
|
|
141
|
+
renderLeftActions: t2,
|
|
142
|
+
renderRightActions: t3,
|
|
143
|
+
testID: testID,
|
|
144
|
+
children: [children, t4]
|
|
145
|
+
});
|
|
146
|
+
$[7] = children;
|
|
147
|
+
$[8] = t2;
|
|
148
|
+
$[9] = t3;
|
|
149
|
+
$[10] = t4;
|
|
150
|
+
$[11] = testID;
|
|
151
|
+
$[12] = t5;
|
|
152
|
+
} else {
|
|
153
|
+
t5 = $[12];
|
|
154
|
+
}
|
|
155
|
+
return t5;
|
|
28
156
|
}
|
|
29
157
|
export default SwipeableRow;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { typographyVariants } from "../theme/typography.js";
|
|
1
2
|
import type { ReactNode } from "react";
|
|
2
3
|
export interface TagProps {
|
|
3
4
|
label: string;
|
|
@@ -5,7 +6,9 @@ export interface TagProps {
|
|
|
5
6
|
dotColor?: string;
|
|
6
7
|
className?: string;
|
|
7
8
|
testID?: string;
|
|
9
|
+
/** Typography variant of the label. Defaults to the shared pill metrics (12/16). */
|
|
10
|
+
textVariant?: keyof typeof typographyVariants;
|
|
8
11
|
}
|
|
9
|
-
declare function Tag({ label, leading, dotColor, className, testID }: TagProps): import("react").JSX.Element;
|
|
12
|
+
declare function Tag({ label, leading, dotColor, className, testID, textVariant }: TagProps): import("react").JSX.Element;
|
|
10
13
|
export default Tag;
|
|
11
14
|
export { Tag };
|
|
@@ -1,9 +1,71 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { PillLabel } from "./pill.js";
|
|
2
3
|
import { cn } from "../theme/tw.js";
|
|
3
|
-
import { Typography } from "../Typography/index.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
6
|
+
function Tag(t0) {
|
|
7
|
+
const $ = _c(13);
|
|
8
|
+
const {
|
|
9
|
+
label,
|
|
10
|
+
leading,
|
|
11
|
+
dotColor,
|
|
12
|
+
className,
|
|
13
|
+
testID,
|
|
14
|
+
textVariant
|
|
15
|
+
} = t0;
|
|
16
|
+
let t1;
|
|
17
|
+
if ($[0] !== className) {
|
|
18
|
+
t1 = cn("flex-row items-center self-start rounded-full bg-bg-muted px-2.5 py-1 gap-1.5", className);
|
|
19
|
+
$[0] = className;
|
|
20
|
+
$[1] = t1;
|
|
21
|
+
} else {
|
|
22
|
+
t1 = $[1];
|
|
23
|
+
}
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[2] !== dotColor) {
|
|
26
|
+
t2 = dotColor ? _jsx(View, {
|
|
27
|
+
style: {
|
|
28
|
+
width: 8,
|
|
29
|
+
height: 8,
|
|
30
|
+
borderRadius: 4,
|
|
31
|
+
backgroundColor: dotColor
|
|
32
|
+
}
|
|
33
|
+
}) : null;
|
|
34
|
+
$[2] = dotColor;
|
|
35
|
+
$[3] = t2;
|
|
36
|
+
} else {
|
|
37
|
+
t2 = $[3];
|
|
38
|
+
}
|
|
39
|
+
let t3;
|
|
40
|
+
if ($[4] !== label || $[5] !== textVariant) {
|
|
41
|
+
t3 = _jsx(PillLabel, {
|
|
42
|
+
className: "text-text-secondary",
|
|
43
|
+
variant: textVariant,
|
|
44
|
+
children: label
|
|
45
|
+
});
|
|
46
|
+
$[4] = label;
|
|
47
|
+
$[5] = textVariant;
|
|
48
|
+
$[6] = t3;
|
|
49
|
+
} else {
|
|
50
|
+
t3 = $[6];
|
|
51
|
+
}
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[7] !== leading || $[8] !== t1 || $[9] !== t2 || $[10] !== t3 || $[11] !== testID) {
|
|
54
|
+
t4 = _jsxs(View, {
|
|
55
|
+
className: t1,
|
|
56
|
+
testID: testID,
|
|
57
|
+
children: [t2, leading, t3]
|
|
58
|
+
});
|
|
59
|
+
$[7] = leading;
|
|
60
|
+
$[8] = t1;
|
|
61
|
+
$[9] = t2;
|
|
62
|
+
$[10] = t3;
|
|
63
|
+
$[11] = testID;
|
|
64
|
+
$[12] = t4;
|
|
65
|
+
} else {
|
|
66
|
+
t4 = $[12];
|
|
67
|
+
}
|
|
68
|
+
return t4;
|
|
7
69
|
}
|
|
8
70
|
export default Tag;
|
|
9
71
|
export { Tag };
|
|
@@ -1,19 +1,108 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import Icon from "./Display.Icon.js";
|
|
3
|
-
import {
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
8
|
+
function Timeline(t0) {
|
|
9
|
+
const $ = _c(12);
|
|
10
|
+
const {
|
|
11
|
+
steps,
|
|
12
|
+
current,
|
|
13
|
+
className,
|
|
14
|
+
testID
|
|
15
|
+
} = t0;
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] !== current || $[1] !== steps || $[2] !== theme) {
|
|
19
|
+
let t2;
|
|
20
|
+
if ($[4] !== current || $[5] !== steps.length || $[6] !== theme) {
|
|
21
|
+
t2 = (step, index) => {
|
|
22
|
+
const done = index < current;
|
|
23
|
+
const active = index === current;
|
|
24
|
+
const reached = done || active;
|
|
25
|
+
const isLast = index === steps.length - 1;
|
|
26
|
+
const dotColor = reached ? theme.primary : theme.bg.muted;
|
|
27
|
+
return _jsxs(View, {
|
|
28
|
+
className: "flex-row",
|
|
29
|
+
children: [_jsxs(View, {
|
|
30
|
+
className: "items-center",
|
|
31
|
+
style: {
|
|
32
|
+
width: 28
|
|
33
|
+
},
|
|
34
|
+
children: [_jsx(View, {
|
|
35
|
+
className: "w-6 h-6 rounded-full items-center justify-center",
|
|
36
|
+
style: {
|
|
37
|
+
backgroundColor: dotColor
|
|
38
|
+
},
|
|
39
|
+
children: done ? _jsx(Icon, {
|
|
40
|
+
color: theme.text.inverse,
|
|
41
|
+
name: "check",
|
|
42
|
+
size: 14
|
|
43
|
+
}) : _jsx(View, {
|
|
44
|
+
className: "w-2 h-2 rounded-full",
|
|
45
|
+
style: {
|
|
46
|
+
backgroundColor: active ? theme.text.inverse : theme.border.strong
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
}), !isLast ? _jsx(View, {
|
|
50
|
+
className: "flex-1 w-0.5 my-1",
|
|
51
|
+
style: {
|
|
52
|
+
backgroundColor: done ? theme.primary : theme.border.default
|
|
53
|
+
}
|
|
54
|
+
}) : null]
|
|
55
|
+
}), _jsxs(View, {
|
|
56
|
+
className: cn("flex-1 pb-5", isLast && "pb-0"),
|
|
57
|
+
children: [_jsxs(View, {
|
|
58
|
+
className: "flex-row items-center justify-between",
|
|
59
|
+
children: [_jsx(Typography.Text, {
|
|
60
|
+
className: reached ? "text-text-primary" : "text-text-tertiary",
|
|
61
|
+
semibold: active,
|
|
62
|
+
variant: "body",
|
|
63
|
+
children: step.title
|
|
64
|
+
}), step.time ? _jsx(Typography.Text, {
|
|
65
|
+
className: "text-text-tertiary",
|
|
66
|
+
variant: "caption",
|
|
67
|
+
children: step.time
|
|
68
|
+
}) : null]
|
|
69
|
+
}), step.description ? _jsx(Typography.Text, {
|
|
70
|
+
className: "text-text-secondary",
|
|
71
|
+
variant: "bodySmall",
|
|
72
|
+
children: step.description
|
|
73
|
+
}) : null]
|
|
74
|
+
})]
|
|
75
|
+
}, step.title);
|
|
76
|
+
};
|
|
77
|
+
$[4] = current;
|
|
78
|
+
$[5] = steps.length;
|
|
79
|
+
$[6] = theme;
|
|
80
|
+
$[7] = t2;
|
|
81
|
+
} else {
|
|
82
|
+
t2 = $[7];
|
|
83
|
+
}
|
|
84
|
+
t1 = steps.map(t2);
|
|
85
|
+
$[0] = current;
|
|
86
|
+
$[1] = steps;
|
|
87
|
+
$[2] = theme;
|
|
88
|
+
$[3] = t1;
|
|
89
|
+
} else {
|
|
90
|
+
t1 = $[3];
|
|
91
|
+
}
|
|
92
|
+
let t2;
|
|
93
|
+
if ($[8] !== className || $[9] !== t1 || $[10] !== testID) {
|
|
94
|
+
t2 = _jsx(View, {
|
|
95
|
+
className: className,
|
|
96
|
+
testID: testID,
|
|
97
|
+
children: t1
|
|
98
|
+
});
|
|
99
|
+
$[8] = className;
|
|
100
|
+
$[9] = t1;
|
|
101
|
+
$[10] = testID;
|
|
102
|
+
$[11] = t2;
|
|
103
|
+
} else {
|
|
104
|
+
t2 = $[11];
|
|
105
|
+
}
|
|
106
|
+
return t2;
|
|
18
107
|
}
|
|
19
108
|
export default Timeline;
|
|
@@ -1,35 +1,131 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import Pressable from "../primitives/Pressable.js";
|
|
3
3
|
import { useTheme } from "../theme/index.js";
|
|
4
4
|
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { View } from "react-native";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
7
8
|
function resolvePosition(placement) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
switch (placement) {
|
|
10
|
+
case "bottom":
|
|
11
|
+
return {
|
|
12
|
+
top: "100%",
|
|
13
|
+
left: 0,
|
|
14
|
+
marginVertical: 6
|
|
15
|
+
};
|
|
16
|
+
case "left":
|
|
17
|
+
return {
|
|
18
|
+
right: "100%",
|
|
19
|
+
top: 0,
|
|
20
|
+
marginHorizontal: 6
|
|
21
|
+
};
|
|
22
|
+
case "right":
|
|
23
|
+
return {
|
|
24
|
+
left: "100%",
|
|
25
|
+
top: 0,
|
|
26
|
+
marginHorizontal: 6
|
|
27
|
+
};
|
|
28
|
+
case "top":
|
|
29
|
+
default:
|
|
30
|
+
return {
|
|
31
|
+
bottom: "100%",
|
|
32
|
+
left: 0,
|
|
33
|
+
marginVertical: 6
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function Tooltip(t0) {
|
|
38
|
+
const $ = _c(15);
|
|
39
|
+
const {
|
|
40
|
+
content,
|
|
41
|
+
children,
|
|
42
|
+
placement: t1,
|
|
43
|
+
width: t2,
|
|
44
|
+
testID
|
|
45
|
+
} = t0;
|
|
46
|
+
const placement = t1 === undefined ? "top" : t1;
|
|
47
|
+
const width = t2 === undefined ? 200 : t2;
|
|
48
|
+
const theme = useTheme();
|
|
49
|
+
const [visible, setVisible] = useState(false);
|
|
50
|
+
let t3;
|
|
51
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
52
|
+
t3 = {
|
|
53
|
+
position: "relative",
|
|
54
|
+
alignSelf: "flex-start"
|
|
55
|
+
};
|
|
56
|
+
$[0] = t3;
|
|
57
|
+
} else {
|
|
58
|
+
t3 = $[0];
|
|
59
|
+
}
|
|
60
|
+
let t4;
|
|
61
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
62
|
+
t4 = () => setVisible(_temp);
|
|
63
|
+
$[1] = t4;
|
|
64
|
+
} else {
|
|
65
|
+
t4 = $[1];
|
|
66
|
+
}
|
|
67
|
+
let t5;
|
|
68
|
+
if ($[2] !== children || $[3] !== content) {
|
|
69
|
+
t5 = _jsx(Pressable, {
|
|
70
|
+
accessibilityHint: content,
|
|
71
|
+
accessibilityRole: "button",
|
|
72
|
+
onPress: t4,
|
|
73
|
+
children: children
|
|
74
|
+
});
|
|
75
|
+
$[2] = children;
|
|
76
|
+
$[3] = content;
|
|
77
|
+
$[4] = t5;
|
|
78
|
+
} else {
|
|
79
|
+
t5 = $[4];
|
|
80
|
+
}
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[5] !== content || $[6] !== placement || $[7] !== theme || $[8] !== visible || $[9] !== width) {
|
|
83
|
+
t6 = visible ? _jsx(View, {
|
|
84
|
+
style: {
|
|
85
|
+
position: "absolute",
|
|
86
|
+
...resolvePosition(placement),
|
|
87
|
+
width,
|
|
88
|
+
paddingHorizontal: 10,
|
|
89
|
+
paddingVertical: 8,
|
|
90
|
+
borderRadius: 8,
|
|
91
|
+
backgroundColor: theme.text.primary,
|
|
92
|
+
...theme.shadow.md,
|
|
93
|
+
zIndex: 1700
|
|
94
|
+
},
|
|
95
|
+
children: _jsx(Typography.Text, {
|
|
96
|
+
style: {
|
|
97
|
+
color: theme.bg.card
|
|
98
|
+
},
|
|
99
|
+
variant: "bodySmall",
|
|
100
|
+
children: content
|
|
101
|
+
})
|
|
102
|
+
}) : null;
|
|
103
|
+
$[5] = content;
|
|
104
|
+
$[6] = placement;
|
|
105
|
+
$[7] = theme;
|
|
106
|
+
$[8] = visible;
|
|
107
|
+
$[9] = width;
|
|
108
|
+
$[10] = t6;
|
|
109
|
+
} else {
|
|
110
|
+
t6 = $[10];
|
|
111
|
+
}
|
|
112
|
+
let t7;
|
|
113
|
+
if ($[11] !== t5 || $[12] !== t6 || $[13] !== testID) {
|
|
114
|
+
t7 = _jsxs(View, {
|
|
115
|
+
style: t3,
|
|
116
|
+
testID: testID,
|
|
117
|
+
children: [t5, t6]
|
|
118
|
+
});
|
|
119
|
+
$[11] = t5;
|
|
120
|
+
$[12] = t6;
|
|
121
|
+
$[13] = testID;
|
|
122
|
+
$[14] = t7;
|
|
123
|
+
} else {
|
|
124
|
+
t7 = $[14];
|
|
125
|
+
}
|
|
126
|
+
return t7;
|
|
19
127
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
const [visible, setVisible] = useState(false);
|
|
23
|
-
return (_jsxs(View, { style: { position: "relative", alignSelf: "flex-start" }, testID: testID, children: [_jsx(Pressable, { accessibilityHint: content, accessibilityRole: "button", onPress: () => setVisible((v) => !v), children: children }), visible ? (_jsx(View, { style: {
|
|
24
|
-
position: "absolute",
|
|
25
|
-
...resolvePosition(placement),
|
|
26
|
-
width,
|
|
27
|
-
paddingHorizontal: 10,
|
|
28
|
-
paddingVertical: 8,
|
|
29
|
-
borderRadius: 8,
|
|
30
|
-
backgroundColor: theme.text.primary,
|
|
31
|
-
...theme.shadow.md,
|
|
32
|
-
zIndex: 1700,
|
|
33
|
-
}, children: _jsx(Typography.Text, { style: { color: theme.bg.card }, variant: "bodySmall", children: content }) })) : null] }));
|
|
128
|
+
function _temp(v) {
|
|
129
|
+
return !v;
|
|
34
130
|
}
|
|
35
131
|
export default Tooltip;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The disclosure chevron of every navigational row (`MenuButton`, `ListItem`): the native
|
|
3
|
+
* chevron at the size of the text glyph the menus used, hidden from screen readers
|
|
4
|
+
* because the row already announces itself as a button.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Chevron(): import("react").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import Icon from "./Display.Icon.js";
|
|
3
|
+
import { useTheme } from "../theme/index.js";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The disclosure chevron of every navigational row (`MenuButton`, `ListItem`): the native
|
|
8
|
+
* chevron at the size of the text glyph the menus used, hidden from screen readers
|
|
9
|
+
* because the row already announces itself as a button.
|
|
10
|
+
*/
|
|
11
|
+
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
12
|
+
export function Chevron() {
|
|
13
|
+
const $ = _c(2);
|
|
14
|
+
const theme = useTheme();
|
|
15
|
+
let t0;
|
|
16
|
+
if ($[0] !== theme.icon.tertiary) {
|
|
17
|
+
t0 = _jsx(View, {
|
|
18
|
+
accessibilityElementsHidden: true,
|
|
19
|
+
importantForAccessibility: "no-hide-descendants",
|
|
20
|
+
children: _jsx(Icon, {
|
|
21
|
+
color: theme.icon.tertiary,
|
|
22
|
+
name: "next",
|
|
23
|
+
size: 10
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
$[0] = theme.icon.tertiary;
|
|
27
|
+
$[1] = t0;
|
|
28
|
+
} else {
|
|
29
|
+
t0 = $[1];
|
|
30
|
+
}
|
|
31
|
+
return t0;
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
2
|
+
export interface CountBadgeProps {
|
|
3
|
+
/** Number or short text. Numbers above `max` read `max+`. */
|
|
4
|
+
count?: number | string;
|
|
5
|
+
max?: number;
|
|
6
|
+
/** A bare dot instead of a count. */
|
|
7
|
+
dot?: boolean;
|
|
8
|
+
/** Fill of the badge. Defaults to `danger`. */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Ring that separates the badge from what it sits on. Defaults to the card surface. */
|
|
11
|
+
ringColor?: string;
|
|
12
|
+
/** Pins the badge over the top-right corner of its parent. */
|
|
13
|
+
anchor?: {
|
|
14
|
+
top: number;
|
|
15
|
+
right: number;
|
|
16
|
+
};
|
|
17
|
+
style?: StyleProp<ViewStyle>;
|
|
18
|
+
}
|
|
19
|
+
export declare function countLabel(count: number | string, max: number): string;
|
|
20
|
+
/** The one notification count of the DS: icon badges, app bar actions, tabs and menu rows. */
|
|
21
|
+
export declare function CountBadge({ count, max, dot, color, ringColor, anchor, style, }: CountBadgeProps): import("react").JSX.Element | null;
|