@retray-dev/ui-kit 10.1.0 → 12.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/COMPONENTS.md +419 -38
- package/README.md +14 -5
- package/dist/Accordion.js +1 -1
- package/dist/Accordion.mjs +3 -3
- package/dist/AlertBanner.js +1 -1
- package/dist/AlertBanner.mjs +3 -3
- package/dist/AppHeader.js +1 -1
- package/dist/AppHeader.mjs +4 -4
- package/dist/Avatar.mjs +2 -2
- package/dist/Badge.js +1 -1
- package/dist/Badge.mjs +3 -3
- package/dist/Button.js +1 -1
- package/dist/Button.mjs +3 -3
- package/dist/Card.mjs +2 -2
- package/dist/CategoryStrip.js +1 -1
- package/dist/CategoryStrip.mjs +3 -3
- package/dist/Checkbox.mjs +2 -2
- package/dist/Chip.js +1 -1
- package/dist/Chip.mjs +3 -3
- package/dist/ConfirmDialog.d.mts +1 -6
- package/dist/ConfirmDialog.d.ts +1 -6
- package/dist/ConfirmDialog.js +30 -24
- package/dist/ConfirmDialog.mjs +4 -4
- package/dist/CurrencyDisplay.mjs +2 -2
- package/dist/CurrencyInput.d.mts +3 -8
- package/dist/CurrencyInput.d.ts +3 -8
- package/dist/CurrencyInput.js +4 -2
- package/dist/CurrencyInput.mjs +4 -4
- package/dist/DetailRow.d.mts +1 -1
- package/dist/DetailRow.d.ts +1 -1
- package/dist/DetailRow.js +1 -1
- package/dist/DetailRow.mjs +3 -3
- package/dist/EmptyState.js +1 -1
- package/dist/EmptyState.mjs +4 -4
- package/dist/ErrorBoundary.js +1 -1
- package/dist/ErrorBoundary.mjs +3 -3
- package/dist/Form.mjs +2 -2
- package/dist/IconButton.js +1 -1
- package/dist/IconButton.mjs +3 -3
- package/dist/IconPicker.d.mts +17 -0
- package/dist/IconPicker.d.ts +17 -0
- package/dist/IconPicker.js +1424 -0
- package/dist/IconPicker.mjs +8 -0
- package/dist/ImageUpload.d.mts +3 -1
- package/dist/ImageUpload.d.ts +3 -1
- package/dist/ImageUpload.js +28 -10
- package/dist/ImageUpload.mjs +3 -3
- package/dist/ImageViewer.js +1 -1
- package/dist/ImageViewer.mjs +5 -5
- package/dist/Input.js +1 -1
- package/dist/Input.mjs +3 -3
- package/dist/LabelValue.js +1 -1
- package/dist/LabelValue.mjs +3 -3
- package/dist/ListGroup.mjs +2 -2
- package/dist/ListItem.d.mts +7 -7
- package/dist/ListItem.d.ts +7 -7
- package/dist/ListItem.js +13 -8
- package/dist/ListItem.mjs +3 -3
- package/dist/MediaCard.js +1 -1
- package/dist/MediaCard.mjs +3 -3
- package/dist/MenuGroup.mjs +2 -2
- package/dist/MenuItem.js +1 -1
- package/dist/MenuItem.mjs +3 -3
- package/dist/MonthPicker.mjs +2 -2
- package/dist/NumberStepper.d.mts +19 -0
- package/dist/NumberStepper.d.ts +19 -0
- package/dist/NumberStepper.js +410 -0
- package/dist/NumberStepper.mjs +9 -0
- package/dist/PagerDots.js +1 -1
- package/dist/PagerDots.mjs +3 -3
- package/dist/Pressable.d.mts +15 -7
- package/dist/Pressable.d.ts +15 -7
- package/dist/Pressable.js +7 -3
- package/dist/Pressable.mjs +1 -1
- package/dist/PricingCard.js +1 -1
- package/dist/PricingCard.mjs +5 -5
- package/dist/Progress.mjs +2 -2
- package/dist/RadioGroup.mjs +2 -2
- package/dist/RetrayProvider.mjs +3 -3
- package/dist/Select.mjs +2 -2
- package/dist/SelectableGrid.js +1 -1
- package/dist/SelectableGrid.mjs +3 -3
- package/dist/Separator.mjs +2 -2
- package/dist/Sheet.d.mts +4 -46
- package/dist/Sheet.d.ts +4 -46
- package/dist/Sheet.js +46 -114
- package/dist/Sheet.mjs +2 -3
- package/dist/SheetSelect.js +1 -1
- package/dist/SheetSelect.mjs +3 -3
- package/dist/Skeleton.mjs +2 -2
- package/dist/Slider.mjs +2 -2
- package/dist/Spinner.mjs +2 -2
- package/dist/Stats.d.mts +30 -0
- package/dist/Stats.d.ts +30 -0
- package/dist/Stats.js +429 -0
- package/dist/Stats.mjs +9 -0
- package/dist/Switch.mjs +2 -2
- package/dist/TabBar.js +1 -1
- package/dist/TabBar.mjs +3 -3
- package/dist/Tabs.mjs +2 -2
- package/dist/Text.d.mts +3 -1
- package/dist/Text.d.ts +3 -1
- package/dist/Text.js +3 -3
- package/dist/Text.mjs +2 -2
- package/dist/Textarea.js +1 -1
- package/dist/Textarea.mjs +3 -3
- package/dist/Toast.mjs +2 -2
- package/dist/Toggle.js +1 -1
- package/dist/Toggle.mjs +3 -3
- package/dist/{chunk-DJ7RN37L.mjs → chunk-265G6A46.mjs} +2 -2
- package/dist/{chunk-WOEYDUJZ.mjs → chunk-2A2LEFZG.mjs} +2 -2
- package/dist/{chunk-ID72TK46.mjs → chunk-2CBQKU7H.mjs} +1 -1
- package/dist/{chunk-OB4JUQ3O.mjs → chunk-2I2AYECM.mjs} +1 -1
- package/dist/{chunk-WJLKJMKR.mjs → chunk-357YO24D.mjs} +4 -4
- package/dist/{chunk-GQYFLP3D.mjs → chunk-3GEYJ7I5.mjs} +1 -1
- package/dist/{chunk-AV4EMIRH.mjs → chunk-3N2M3WZL.mjs} +1 -1
- package/dist/{chunk-TERDKCLE.mjs → chunk-3UYAZ7I4.mjs} +2 -2
- package/dist/{chunk-JMOZEC77.mjs → chunk-4WFMPFZB.mjs} +1 -1
- package/dist/chunk-5OLNXP3S.mjs +144 -0
- package/dist/{chunk-6OAZJ577.mjs → chunk-7HSILTC4.mjs} +3 -3
- package/dist/{chunk-IRRY3CRZ.mjs → chunk-AKM4EPOT.mjs} +1 -1
- package/dist/{chunk-VGTDN7SW.mjs → chunk-AQEVCEXV.mjs} +2 -2
- package/dist/{chunk-WBOOUHSS.mjs → chunk-BCWEHE34.mjs} +1 -1
- package/dist/{chunk-AJ7ZDNBT.mjs → chunk-BOVUP27T.mjs} +1 -1
- package/dist/{chunk-BRKYVJVV.mjs → chunk-BQZE3HAW.mjs} +1 -1
- package/dist/{chunk-MLF3EZFW.mjs → chunk-D3Y2T42P.mjs} +2 -2
- package/dist/{chunk-3U4SSNWP.mjs → chunk-DF6DU42P.mjs} +2 -2
- package/dist/{chunk-ZJKGQMYH.mjs → chunk-DI7CBDL6.mjs} +2 -2
- package/dist/{chunk-2TFTAWVJ.mjs → chunk-DOGIPOF5.mjs} +2 -2
- package/dist/{chunk-MBMXYJJV.mjs → chunk-E7NEHHXV.mjs} +7 -3
- package/dist/{chunk-MX6HRKMI.mjs → chunk-EFLFRAHD.mjs} +1 -1
- package/dist/{chunk-SOYNZDVY.mjs → chunk-EMUWGDWC.mjs} +6 -1
- package/dist/{chunk-4I7D47FH.mjs → chunk-F4V6XLP4.mjs} +4 -4
- package/dist/{chunk-UREA2GYY.mjs → chunk-FA2KMTH5.mjs} +2 -2
- package/dist/{chunk-Y2NS74WS.mjs → chunk-FFTYLPSB.mjs} +46 -98
- package/dist/{chunk-OHBNABL5.mjs → chunk-FUVYSVGR.mjs} +14 -9
- package/dist/{chunk-KIHCWCWL.mjs → chunk-FVTVCJAH.mjs} +2 -2
- package/dist/{chunk-Y4GL2MHX.mjs → chunk-GK4VRMNE.mjs} +30 -12
- package/dist/{chunk-6Q64UFIA.mjs → chunk-HJ46DTJE.mjs} +1 -1
- package/dist/{chunk-WF2XDFRK.mjs → chunk-HLMPMUK2.mjs} +1 -1
- package/dist/{chunk-GD6KXMG5.mjs → chunk-I4V5XZPS.mjs} +1 -1
- package/dist/{chunk-AZJF2BLK.mjs → chunk-ISY26JQJ.mjs} +2 -2
- package/dist/{chunk-X4G6APW6.mjs → chunk-J6Q2YJEV.mjs} +1 -1
- package/dist/{chunk-KZL5VTYK.mjs → chunk-JCZQOY4O.mjs} +31 -24
- package/dist/{chunk-CZCQZHG6.mjs → chunk-JNVAIDLK.mjs} +2 -2
- package/dist/{chunk-SOA2Z4RB.mjs → chunk-JULSIZDM.mjs} +1 -1
- package/dist/{chunk-T7XZ7H7Y.mjs → chunk-KA7LTET3.mjs} +17 -3
- package/dist/chunk-KHYX4IOM.mjs +1114 -0
- package/dist/{chunk-LXJIIOYQ.mjs → chunk-LRM4AVYY.mjs} +2 -2
- package/dist/{chunk-VQ57HWPL.mjs → chunk-MYZ2EDYU.mjs} +2 -2
- package/dist/chunk-N4ZPVCJH.mjs +126 -0
- package/dist/{chunk-NA7PARID.mjs → chunk-NXI4YDZ2.mjs} +2 -2
- package/dist/{chunk-4K625MVM.mjs → chunk-OULVKTWL.mjs} +2 -2
- package/dist/{chunk-A4MDAP7G.mjs → chunk-P64WHW4A.mjs} +2 -2
- package/dist/{chunk-URI2WBIV.mjs → chunk-P73V2EKS.mjs} +2 -2
- package/dist/{chunk-ZUR7AU5R.mjs → chunk-PGERH3P7.mjs} +2 -2
- package/dist/{chunk-2UYENBLV.mjs → chunk-QSFV2P7O.mjs} +1 -1
- package/dist/{chunk-JT7HKXRB.mjs → chunk-S3KJCPEJ.mjs} +1 -1
- package/dist/{chunk-6MKGPAR2.mjs → chunk-V6NFJXKO.mjs} +2 -2
- package/dist/{chunk-A3A6KNQN.mjs → chunk-WOEWGSTU.mjs} +1 -1
- package/dist/{chunk-JUXSWN54.mjs → chunk-X26S5EVZ.mjs} +4 -2
- package/dist/{chunk-YFZ3ELX5.mjs → chunk-XBAGGKLW.mjs} +2 -2
- package/dist/{chunk-JB67UOB5.mjs → chunk-ZHMSAYLT.mjs} +2 -2
- package/dist/fonts.d.mts +1 -7
- package/dist/fonts.d.ts +1 -7
- package/dist/fonts.js +0 -2
- package/dist/fonts.mjs +1 -2
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1831 -475
- package/dist/index.mjs +54 -51
- package/package.json +3 -3
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +39 -30
- package/src/components/CurrencyInput/CurrencyInput.tsx +4 -7
- package/src/components/DetailRow/DetailRow.tsx +1 -1
- package/src/components/IconPicker/IconPicker.tsx +395 -0
- package/src/components/IconPicker/index.ts +1 -0
- package/src/components/ImageUpload/ImageUpload.tsx +34 -12
- package/src/components/ListItem/ListItem.tsx +43 -28
- package/src/components/NumberStepper/NumberStepper.tsx +147 -0
- package/src/components/NumberStepper/index.ts +1 -0
- package/src/components/Pressable/Pressable.tsx +20 -8
- package/src/components/Sheet/Sheet.tsx +64 -172
- package/src/components/Stats/Stats.tsx +226 -0
- package/src/components/Stats/index.ts +2 -0
- package/src/components/Text/Text.tsx +4 -2
- package/src/fonts.ts +0 -7
- package/src/index.ts +7 -1
- package/src/theme/colorUtils.ts +9 -0
- package/src/utils/curatedIcons.ts +849 -0
- package/src/utils/fontGuard.ts +2 -1
- package/src/utils/icons.ts +20 -2
package/dist/Sheet.d.mts
CHANGED
|
@@ -18,72 +18,30 @@ interface SheetProps {
|
|
|
18
18
|
open: boolean;
|
|
19
19
|
onClose: () => void;
|
|
20
20
|
title?: string;
|
|
21
|
-
/** Secondary text below title. */
|
|
22
21
|
subtitle?: string;
|
|
23
|
-
/** @deprecated Use `subtitle` instead. */
|
|
24
|
-
description?: string;
|
|
25
|
-
/** Show an X close button in the header. */
|
|
26
22
|
showCloseButton?: boolean;
|
|
27
23
|
children?: React.ReactNode;
|
|
28
|
-
/** Style for the inner content container. */
|
|
29
24
|
style?: ViewStyle;
|
|
30
|
-
/** Style for the content wrapper (outside the scroll container). */
|
|
31
25
|
contentStyle?: ViewStyle;
|
|
32
|
-
/** Render children inside BottomSheetScrollView. */
|
|
26
|
+
/** Render children inside BottomSheetScrollView instead of BottomSheetView. */
|
|
33
27
|
scrollable?: boolean;
|
|
34
|
-
/** Cap sheet height (dp).
|
|
28
|
+
/** Cap sheet height (dp). Content scrolls when exceeding this value. Requires `scrollable`. */
|
|
35
29
|
maxHeight?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Keyboard behavior — how the sheet responds to keyboard appearance.
|
|
38
|
-
* - 'interactive': offset sheet by keyboard size (default, works on both platforms)
|
|
39
|
-
* - 'fillParent': extend sheet to fill parent view (can cause restore issues with dynamic sizing)
|
|
40
|
-
* - 'extend': extend sheet to maximum snap point
|
|
41
|
-
*
|
|
42
|
-
* Default: 'interactive' on both platforms.
|
|
43
|
-
*/
|
|
44
30
|
keyboardBehavior?: 'extend' | 'fillParent' | 'interactive';
|
|
45
|
-
/**
|
|
46
|
-
* Keyboard blur behavior — what happens when keyboard dismisses.
|
|
47
|
-
* - 'none': do nothing
|
|
48
|
-
* - 'restore': restore sheet to previous position (default)
|
|
49
|
-
*/
|
|
50
31
|
keyboardBlurBehavior?: 'none' | 'restore';
|
|
51
|
-
/**
|
|
52
|
-
* Blur keyboard when user starts dragging the sheet down.
|
|
53
|
-
* Default: true (recommended for better UX)
|
|
54
|
-
*/
|
|
55
32
|
enableBlurKeyboardOnGesture?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Android-only: defines keyboard input mode.
|
|
58
|
-
* - 'adjustPan': pan the sheet content (default, fixes restore issues with dynamic sizing)
|
|
59
|
-
* - 'adjustResize': resize the sheet container (can cause transparent gap on dismiss)
|
|
60
|
-
*/
|
|
61
33
|
android_keyboardInputMode?: 'adjustPan' | 'adjustResize';
|
|
62
|
-
/** Sticky footer rendered below the scroll area. */
|
|
63
34
|
footer?: React.ReactNode;
|
|
64
35
|
/**
|
|
65
|
-
* Array of snap points
|
|
36
|
+
* Array of snap points (e.g., ['50%', '85%'] or [200, 500]).
|
|
66
37
|
* When provided, disables enableDynamicSizing.
|
|
67
|
-
* When omitted, sheet uses dynamic sizing (auto-fits content).
|
|
68
38
|
*/
|
|
69
39
|
snapPoints?: (string | number)[];
|
|
70
|
-
/**
|
|
71
|
-
* When true, render as a centered modal dialog on wide screens (width ≥
|
|
72
|
-
* `BREAKPOINTS.wide`) instead of a bottom sheet. On narrow screens it stays a
|
|
73
|
-
* bottom sheet. Use for store/category/picker dialogs that should feel native
|
|
74
|
-
* on tablets and web.
|
|
75
|
-
*
|
|
76
|
-
* Note: the centered-dialog path uses a plain RN `Modal`, so `SheetTextInput`
|
|
77
|
-
* is not required there — use a regular `TextInput`.
|
|
78
|
-
*/
|
|
79
|
-
responsive?: boolean;
|
|
80
|
-
/** Max width of the centered dialog (dp). Only applies when `responsive`. Defaults to 480. */
|
|
81
|
-
dialogMaxWidth?: number;
|
|
82
40
|
}
|
|
83
41
|
declare function SheetHeader({ children, style }: SheetHeaderProps): React.JSX.Element;
|
|
84
42
|
declare function SheetContent({ children, style }: SheetContentProps): React.JSX.Element;
|
|
85
43
|
declare function SheetFooter({ children, style }: SheetFooterProps): React.JSX.Element;
|
|
86
|
-
declare function Sheet({ open, onClose, title, subtitle,
|
|
44
|
+
declare function Sheet({ open, onClose, title, subtitle, showCloseButton, children, style, contentStyle, scrollable, maxHeight, keyboardBehavior, keyboardBlurBehavior, enableBlurKeyboardOnGesture, android_keyboardInputMode, footer, snapPoints, }: SheetProps): React.JSX.Element;
|
|
87
45
|
declare namespace Sheet {
|
|
88
46
|
var Header: typeof SheetHeader;
|
|
89
47
|
var Content: typeof SheetContent;
|
package/dist/Sheet.d.ts
CHANGED
|
@@ -18,72 +18,30 @@ interface SheetProps {
|
|
|
18
18
|
open: boolean;
|
|
19
19
|
onClose: () => void;
|
|
20
20
|
title?: string;
|
|
21
|
-
/** Secondary text below title. */
|
|
22
21
|
subtitle?: string;
|
|
23
|
-
/** @deprecated Use `subtitle` instead. */
|
|
24
|
-
description?: string;
|
|
25
|
-
/** Show an X close button in the header. */
|
|
26
22
|
showCloseButton?: boolean;
|
|
27
23
|
children?: React.ReactNode;
|
|
28
|
-
/** Style for the inner content container. */
|
|
29
24
|
style?: ViewStyle;
|
|
30
|
-
/** Style for the content wrapper (outside the scroll container). */
|
|
31
25
|
contentStyle?: ViewStyle;
|
|
32
|
-
/** Render children inside BottomSheetScrollView. */
|
|
26
|
+
/** Render children inside BottomSheetScrollView instead of BottomSheetView. */
|
|
33
27
|
scrollable?: boolean;
|
|
34
|
-
/** Cap sheet height (dp).
|
|
28
|
+
/** Cap sheet height (dp). Content scrolls when exceeding this value. Requires `scrollable`. */
|
|
35
29
|
maxHeight?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Keyboard behavior — how the sheet responds to keyboard appearance.
|
|
38
|
-
* - 'interactive': offset sheet by keyboard size (default, works on both platforms)
|
|
39
|
-
* - 'fillParent': extend sheet to fill parent view (can cause restore issues with dynamic sizing)
|
|
40
|
-
* - 'extend': extend sheet to maximum snap point
|
|
41
|
-
*
|
|
42
|
-
* Default: 'interactive' on both platforms.
|
|
43
|
-
*/
|
|
44
30
|
keyboardBehavior?: 'extend' | 'fillParent' | 'interactive';
|
|
45
|
-
/**
|
|
46
|
-
* Keyboard blur behavior — what happens when keyboard dismisses.
|
|
47
|
-
* - 'none': do nothing
|
|
48
|
-
* - 'restore': restore sheet to previous position (default)
|
|
49
|
-
*/
|
|
50
31
|
keyboardBlurBehavior?: 'none' | 'restore';
|
|
51
|
-
/**
|
|
52
|
-
* Blur keyboard when user starts dragging the sheet down.
|
|
53
|
-
* Default: true (recommended for better UX)
|
|
54
|
-
*/
|
|
55
32
|
enableBlurKeyboardOnGesture?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Android-only: defines keyboard input mode.
|
|
58
|
-
* - 'adjustPan': pan the sheet content (default, fixes restore issues with dynamic sizing)
|
|
59
|
-
* - 'adjustResize': resize the sheet container (can cause transparent gap on dismiss)
|
|
60
|
-
*/
|
|
61
33
|
android_keyboardInputMode?: 'adjustPan' | 'adjustResize';
|
|
62
|
-
/** Sticky footer rendered below the scroll area. */
|
|
63
34
|
footer?: React.ReactNode;
|
|
64
35
|
/**
|
|
65
|
-
* Array of snap points
|
|
36
|
+
* Array of snap points (e.g., ['50%', '85%'] or [200, 500]).
|
|
66
37
|
* When provided, disables enableDynamicSizing.
|
|
67
|
-
* When omitted, sheet uses dynamic sizing (auto-fits content).
|
|
68
38
|
*/
|
|
69
39
|
snapPoints?: (string | number)[];
|
|
70
|
-
/**
|
|
71
|
-
* When true, render as a centered modal dialog on wide screens (width ≥
|
|
72
|
-
* `BREAKPOINTS.wide`) instead of a bottom sheet. On narrow screens it stays a
|
|
73
|
-
* bottom sheet. Use for store/category/picker dialogs that should feel native
|
|
74
|
-
* on tablets and web.
|
|
75
|
-
*
|
|
76
|
-
* Note: the centered-dialog path uses a plain RN `Modal`, so `SheetTextInput`
|
|
77
|
-
* is not required there — use a regular `TextInput`.
|
|
78
|
-
*/
|
|
79
|
-
responsive?: boolean;
|
|
80
|
-
/** Max width of the centered dialog (dp). Only applies when `responsive`. Defaults to 480. */
|
|
81
|
-
dialogMaxWidth?: number;
|
|
82
40
|
}
|
|
83
41
|
declare function SheetHeader({ children, style }: SheetHeaderProps): React.JSX.Element;
|
|
84
42
|
declare function SheetContent({ children, style }: SheetContentProps): React.JSX.Element;
|
|
85
43
|
declare function SheetFooter({ children, style }: SheetFooterProps): React.JSX.Element;
|
|
86
|
-
declare function Sheet({ open, onClose, title, subtitle,
|
|
44
|
+
declare function Sheet({ open, onClose, title, subtitle, showCloseButton, children, style, contentStyle, scrollable, maxHeight, keyboardBehavior, keyboardBlurBehavior, enableBlurKeyboardOnGesture, android_keyboardInputMode, footer, snapPoints, }: SheetProps): React.JSX.Element;
|
|
87
45
|
declare namespace Sheet {
|
|
88
46
|
var Header: typeof SheetHeader;
|
|
89
47
|
var Content: typeof SheetContent;
|
package/dist/Sheet.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React2 = require('react');
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
|
-
var
|
|
5
|
+
var bottomSheet = require('@gorhom/bottom-sheet');
|
|
6
6
|
var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
7
7
|
var vectorIcons = require('@expo/vector-icons');
|
|
8
8
|
var reactNativeSizeMatters = require('react-native-size-matters');
|
|
@@ -10,7 +10,6 @@ var reactNativeSizeMatters = require('react-native-size-matters');
|
|
|
10
10
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
|
|
12
12
|
var React2__default = /*#__PURE__*/_interopDefault(React2);
|
|
13
|
-
var BottomSheet__default = /*#__PURE__*/_interopDefault(BottomSheet);
|
|
14
13
|
|
|
15
14
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
16
15
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
@@ -197,26 +196,7 @@ var vs = isWeb ? (n) => n : reactNativeSizeMatters.verticalScale;
|
|
|
197
196
|
var ms = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateScale;
|
|
198
197
|
var mvs = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateVerticalScale;
|
|
199
198
|
|
|
200
|
-
// src/tokens.ts
|
|
201
|
-
var RADIUS = {
|
|
202
|
-
lg: 20};
|
|
203
|
-
var SHADOWS = {
|
|
204
|
-
xl: {
|
|
205
|
-
shadowColor: "#000",
|
|
206
|
-
shadowOffset: { width: 0, height: 12 },
|
|
207
|
-
shadowOpacity: 0.24,
|
|
208
|
-
shadowRadius: 24,
|
|
209
|
-
elevation: 18
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
var BREAKPOINTS = {
|
|
213
|
-
wide: 700
|
|
214
|
-
};
|
|
215
|
-
|
|
216
199
|
// src/components/Sheet/Sheet.tsx
|
|
217
|
-
var SCREEN_HEIGHT = reactNative.Dimensions.get("window").height;
|
|
218
|
-
var DEFAULT_MAX_HEIGHT = SCREEN_HEIGHT * 0.85;
|
|
219
|
-
var isAndroid = reactNative.Platform.OS === "android";
|
|
220
200
|
function SheetHeader({ children, style }) {
|
|
221
201
|
return /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: [styles.header, style] }, children);
|
|
222
202
|
}
|
|
@@ -232,45 +212,45 @@ function Sheet({
|
|
|
232
212
|
onClose,
|
|
233
213
|
title,
|
|
234
214
|
subtitle,
|
|
235
|
-
description,
|
|
236
215
|
showCloseButton = false,
|
|
237
216
|
children,
|
|
238
217
|
style,
|
|
239
218
|
contentStyle,
|
|
240
|
-
scrollable,
|
|
219
|
+
scrollable = false,
|
|
241
220
|
maxHeight,
|
|
242
|
-
keyboardBehavior,
|
|
221
|
+
keyboardBehavior = "interactive",
|
|
243
222
|
keyboardBlurBehavior = "restore",
|
|
244
223
|
enableBlurKeyboardOnGesture = true,
|
|
245
224
|
android_keyboardInputMode = "adjustPan",
|
|
246
225
|
footer,
|
|
247
|
-
snapPoints
|
|
248
|
-
responsive = false,
|
|
249
|
-
dialogMaxWidth = 480
|
|
226
|
+
snapPoints
|
|
250
227
|
}) {
|
|
251
228
|
const { colors } = useTheme();
|
|
252
229
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
253
|
-
const { width: windowWidth } = reactNative.useWindowDimensions();
|
|
254
230
|
const ref = React2.useRef(null);
|
|
255
|
-
const
|
|
256
|
-
const
|
|
231
|
+
const wasOpened = React2.useRef(false);
|
|
232
|
+
const name = React2.useId();
|
|
257
233
|
React2.useEffect(() => {
|
|
258
234
|
if (open) {
|
|
259
235
|
impactMedium();
|
|
260
|
-
ref.current?.
|
|
261
|
-
|
|
262
|
-
|
|
236
|
+
ref.current?.present();
|
|
237
|
+
wasOpened.current = true;
|
|
238
|
+
} else if (wasOpened.current) {
|
|
239
|
+
ref.current?.dismiss();
|
|
263
240
|
}
|
|
264
241
|
}, [open]);
|
|
265
|
-
const renderBackdrop = React2.useCallback(
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
242
|
+
const renderBackdrop = React2.useCallback(
|
|
243
|
+
(props) => /* @__PURE__ */ React2__default.default.createElement(
|
|
244
|
+
bottomSheet.BottomSheetBackdrop,
|
|
245
|
+
{
|
|
246
|
+
...props,
|
|
247
|
+
disappearsOnIndex: -1,
|
|
248
|
+
appearsOnIndex: 0,
|
|
249
|
+
pressBehavior: "close"
|
|
250
|
+
}
|
|
251
|
+
),
|
|
252
|
+
[]
|
|
253
|
+
);
|
|
274
254
|
const childArray = React2__default.default.Children.toArray(children);
|
|
275
255
|
const customHeader = childArray.find((child) => React2__default.default.isValidElement(child) && child.type === SheetHeader);
|
|
276
256
|
const customContent = childArray.find((child) => React2__default.default.isValidElement(child) && child.type === SheetContent);
|
|
@@ -278,8 +258,7 @@ function Sheet({
|
|
|
278
258
|
const filteredChildren = customHeader || customContent || customFooter ? childArray.filter(
|
|
279
259
|
(child) => !React2__default.default.isValidElement(child) || child.type !== SheetHeader && child.type !== SheetContent && child.type !== SheetFooter
|
|
280
260
|
) : children;
|
|
281
|
-
const
|
|
282
|
-
const showHeader = !!(title || effectiveSubtitle || showCloseButton) && !customHeader;
|
|
261
|
+
const showHeader = !!(title || subtitle || showCloseButton) && !customHeader;
|
|
283
262
|
const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: [styles.header, { backgroundColor: colors.card }], accessibilityRole: "header" }, /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: styles.headerRow }, title ? /* @__PURE__ */ React2__default.default.createElement(reactNative.Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title) : /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: { flex: 1 } }), showCloseButton ? /* @__PURE__ */ React2__default.default.createElement(
|
|
284
263
|
reactNative.TouchableOpacity,
|
|
285
264
|
{
|
|
@@ -292,77 +271,49 @@ function Sheet({
|
|
|
292
271
|
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
293
272
|
},
|
|
294
273
|
/* @__PURE__ */ React2__default.default.createElement(vectorIcons.AntDesign, { name: "close", size: ms(18), color: colors.foregroundMuted })
|
|
295
|
-
) : null),
|
|
274
|
+
) : null), subtitle ? /* @__PURE__ */ React2__default.default.createElement(reactNative.Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null) : null;
|
|
296
275
|
const contentNode = customContent ? customContent : filteredChildren;
|
|
297
276
|
const effectiveFooter = customFooter ? customFooter : footer;
|
|
298
|
-
const renderFooter = React2.useCallback(
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
{
|
|
306
|
-
style: [
|
|
307
|
-
styles.dialogCard,
|
|
308
|
-
{ backgroundColor: colors.card, maxWidth: dialogMaxWidth, maxHeight: SCREEN_HEIGHT * 0.85 }
|
|
309
|
-
],
|
|
310
|
-
onPress: () => {
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
headerNode,
|
|
314
|
-
/* @__PURE__ */ React2__default.default.createElement(
|
|
315
|
-
reactNative.ScrollView,
|
|
316
|
-
{
|
|
317
|
-
contentContainerStyle: [styles.dialogContent, style],
|
|
318
|
-
style: contentStyle,
|
|
319
|
-
showsVerticalScrollIndicator: true,
|
|
320
|
-
bounces: false
|
|
321
|
-
},
|
|
322
|
-
contentNode
|
|
323
|
-
),
|
|
324
|
-
effectiveFooter
|
|
325
|
-
)));
|
|
326
|
-
}
|
|
327
|
-
const useScroll = scrollable || !!maxHeight;
|
|
328
|
-
const effectiveMaxHeight = maxHeight ?? DEFAULT_MAX_HEIGHT;
|
|
277
|
+
const renderFooter = React2.useCallback(
|
|
278
|
+
(props) => {
|
|
279
|
+
if (!effectiveFooter) return null;
|
|
280
|
+
return /* @__PURE__ */ React2__default.default.createElement(bottomSheet.BottomSheetFooter, { ...props }, effectiveFooter);
|
|
281
|
+
},
|
|
282
|
+
[effectiveFooter]
|
|
283
|
+
);
|
|
329
284
|
const useDynamicSizing = !snapPoints;
|
|
330
285
|
return /* @__PURE__ */ React2__default.default.createElement(
|
|
331
|
-
|
|
286
|
+
bottomSheet.BottomSheetModal,
|
|
332
287
|
{
|
|
333
288
|
ref,
|
|
334
|
-
|
|
335
|
-
onClose,
|
|
289
|
+
name,
|
|
290
|
+
onDismiss: onClose,
|
|
336
291
|
enableDynamicSizing: useDynamicSizing,
|
|
337
292
|
snapPoints,
|
|
338
|
-
maxDynamicContentSize: useDynamicSizing ?
|
|
293
|
+
maxDynamicContentSize: useDynamicSizing && maxHeight ? maxHeight : void 0,
|
|
339
294
|
backdropComponent: renderBackdrop,
|
|
340
295
|
footerComponent: effectiveFooter ? renderFooter : void 0,
|
|
341
|
-
backgroundStyle:
|
|
342
|
-
handleIndicatorStyle:
|
|
296
|
+
backgroundStyle: { ...styles.background, backgroundColor: colors.card },
|
|
297
|
+
handleIndicatorStyle: { ...styles.handle, backgroundColor: colors.border },
|
|
343
298
|
enablePanDownToClose: true,
|
|
344
299
|
topInset: insets.top,
|
|
345
|
-
keyboardBehavior
|
|
300
|
+
keyboardBehavior,
|
|
346
301
|
keyboardBlurBehavior,
|
|
347
302
|
android_keyboardInputMode,
|
|
348
303
|
enableBlurKeyboardOnGesture
|
|
349
304
|
},
|
|
350
|
-
|
|
351
|
-
|
|
305
|
+
scrollable ? /* @__PURE__ */ React2__default.default.createElement(
|
|
306
|
+
bottomSheet.BottomSheetScrollView,
|
|
352
307
|
{
|
|
353
|
-
contentContainerStyle: [
|
|
354
|
-
styles.scrollContent,
|
|
355
|
-
style
|
|
356
|
-
],
|
|
308
|
+
contentContainerStyle: [styles.scrollContent, style],
|
|
357
309
|
style: contentStyle,
|
|
358
310
|
showsVerticalScrollIndicator: true,
|
|
359
|
-
|
|
360
|
-
persistentScrollbar: isAndroid,
|
|
311
|
+
bounces: false,
|
|
361
312
|
stickyHeaderIndices: headerNode ? [0] : void 0
|
|
362
313
|
},
|
|
363
314
|
headerNode,
|
|
364
315
|
contentNode
|
|
365
|
-
) : /* @__PURE__ */ React2__default.default.createElement(
|
|
316
|
+
) : /* @__PURE__ */ React2__default.default.createElement(bottomSheet.BottomSheetView, { style: [styles.content, contentStyle, style] }, headerNode, contentNode)
|
|
366
317
|
);
|
|
367
318
|
}
|
|
368
319
|
Sheet.Header = SheetHeader;
|
|
@@ -409,8 +360,7 @@ var styles = reactNative.StyleSheet.create({
|
|
|
409
360
|
},
|
|
410
361
|
scrollContent: {
|
|
411
362
|
paddingHorizontal: s(16),
|
|
412
|
-
paddingBottom: vs(32)
|
|
413
|
-
paddingRight: s(16)
|
|
363
|
+
paddingBottom: vs(32)
|
|
414
364
|
},
|
|
415
365
|
sheetContent: {
|
|
416
366
|
gap: vs(16)
|
|
@@ -421,33 +371,15 @@ var styles = reactNative.StyleSheet.create({
|
|
|
421
371
|
borderTopWidth: 1,
|
|
422
372
|
flexDirection: "row",
|
|
423
373
|
gap: s(12)
|
|
424
|
-
},
|
|
425
|
-
dialogBackdrop: {
|
|
426
|
-
flex: 1,
|
|
427
|
-
backgroundColor: "rgba(0,0,0,0.5)",
|
|
428
|
-
alignItems: "center",
|
|
429
|
-
justifyContent: "center",
|
|
430
|
-
padding: s(24)
|
|
431
|
-
},
|
|
432
|
-
dialogCard: {
|
|
433
|
-
width: "100%",
|
|
434
|
-
borderRadius: RADIUS.lg,
|
|
435
|
-
paddingTop: vs(16),
|
|
436
|
-
overflow: "hidden",
|
|
437
|
-
...SHADOWS.xl
|
|
438
|
-
},
|
|
439
|
-
dialogContent: {
|
|
440
|
-
paddingHorizontal: s(16),
|
|
441
|
-
paddingBottom: vs(16)
|
|
442
374
|
}
|
|
443
375
|
});
|
|
444
376
|
|
|
445
377
|
Object.defineProperty(exports, "BottomSheetModalProvider", {
|
|
446
378
|
enumerable: true,
|
|
447
|
-
get: function () { return
|
|
379
|
+
get: function () { return bottomSheet.BottomSheetModalProvider; }
|
|
448
380
|
});
|
|
449
381
|
Object.defineProperty(exports, "SheetTextInput", {
|
|
450
382
|
enumerable: true,
|
|
451
|
-
get: function () { return
|
|
383
|
+
get: function () { return bottomSheet.BottomSheetTextInput; }
|
|
452
384
|
});
|
|
453
385
|
exports.Sheet = Sheet;
|
package/dist/Sheet.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export { BottomSheetModalProvider, Sheet, BottomSheetTextInput as SheetTextInput } from './chunk-
|
|
1
|
+
export { BottomSheetModalProvider, Sheet, BottomSheetTextInput as SheetTextInput } from './chunk-FFTYLPSB.mjs';
|
|
2
2
|
import './chunk-EJ7ZPXOH.mjs';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-SOYNZDVY.mjs';
|
|
3
|
+
import './chunk-EMUWGDWC.mjs';
|
|
5
4
|
import './chunk-2CE3TQVY.mjs';
|
|
6
5
|
import './chunk-Y6FXYEAI.mjs';
|
package/dist/SheetSelect.js
CHANGED
|
@@ -218,7 +218,7 @@ var ALL_FAMILIES = [
|
|
|
218
218
|
];
|
|
219
219
|
var activeFamilies = ALL_FAMILIES;
|
|
220
220
|
var resolvedCache = null;
|
|
221
|
-
function buildCache() {
|
|
221
|
+
function buildCache(families) {
|
|
222
222
|
const cache = /* @__PURE__ */ new Map();
|
|
223
223
|
for (const family of activeFamilies) {
|
|
224
224
|
const glyphMap = family.getGlyphMap();
|
package/dist/SheetSelect.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { SheetSelect } from './chunk-
|
|
1
|
+
export { SheetSelect } from './chunk-P73V2EKS.mjs';
|
|
2
2
|
import './chunk-3DKJ2GIC.mjs';
|
|
3
3
|
import './chunk-EJ7ZPXOH.mjs';
|
|
4
4
|
import './chunk-DVK4G2GT.mjs';
|
|
5
5
|
import './chunk-QY3X2UYR.mjs';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-KA7LTET3.mjs';
|
|
7
|
+
import './chunk-EMUWGDWC.mjs';
|
|
8
8
|
import './chunk-2CE3TQVY.mjs';
|
|
9
9
|
import './chunk-Y6FXYEAI.mjs';
|
package/dist/Skeleton.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Skeleton } from './chunk-
|
|
1
|
+
export { Skeleton } from './chunk-BOVUP27T.mjs';
|
|
2
2
|
import './chunk-DVK4G2GT.mjs';
|
|
3
3
|
import './chunk-QY3X2UYR.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-EMUWGDWC.mjs';
|
|
5
5
|
import './chunk-2CE3TQVY.mjs';
|
|
6
6
|
import './chunk-Y6FXYEAI.mjs';
|
package/dist/Slider.mjs
CHANGED
package/dist/Spinner.mjs
CHANGED
package/dist/Stats.d.mts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
type StatsVariant = 'elevated' | 'outlined' | 'filled';
|
|
5
|
+
interface StatsProps {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
iconName?: string;
|
|
11
|
+
iconColor?: string;
|
|
12
|
+
variant?: StatsVariant;
|
|
13
|
+
onPress?: () => void;
|
|
14
|
+
style?: ViewStyle;
|
|
15
|
+
accessibilityLabel?: string;
|
|
16
|
+
}
|
|
17
|
+
interface StatsGroupProps {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
gap?: number;
|
|
20
|
+
style?: ViewStyle;
|
|
21
|
+
}
|
|
22
|
+
declare function StatsComponent({ value, label, description, icon, iconName, iconColor, variant, onPress, style, accessibilityLabel, }: StatsProps): React.JSX.Element;
|
|
23
|
+
declare function StatsGroup({ children, gap, style }: StatsGroupProps): React.JSX.Element;
|
|
24
|
+
declare const Stats: React.NamedExoticComponent<StatsProps> & {
|
|
25
|
+
readonly type: typeof StatsComponent;
|
|
26
|
+
} & {
|
|
27
|
+
Group: typeof StatsGroup;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { Stats, type StatsGroupProps, type StatsProps, type StatsVariant };
|
package/dist/Stats.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
type StatsVariant = 'elevated' | 'outlined' | 'filled';
|
|
5
|
+
interface StatsProps {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
iconName?: string;
|
|
11
|
+
iconColor?: string;
|
|
12
|
+
variant?: StatsVariant;
|
|
13
|
+
onPress?: () => void;
|
|
14
|
+
style?: ViewStyle;
|
|
15
|
+
accessibilityLabel?: string;
|
|
16
|
+
}
|
|
17
|
+
interface StatsGroupProps {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
gap?: number;
|
|
20
|
+
style?: ViewStyle;
|
|
21
|
+
}
|
|
22
|
+
declare function StatsComponent({ value, label, description, icon, iconName, iconColor, variant, onPress, style, accessibilityLabel, }: StatsProps): React.JSX.Element;
|
|
23
|
+
declare function StatsGroup({ children, gap, style }: StatsGroupProps): React.JSX.Element;
|
|
24
|
+
declare const Stats: React.NamedExoticComponent<StatsProps> & {
|
|
25
|
+
readonly type: typeof StatsComponent;
|
|
26
|
+
} & {
|
|
27
|
+
Group: typeof StatsGroup;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { Stats, type StatsGroupProps, type StatsProps, type StatsVariant };
|