@retray-dev/ui-kit 10.2.0 → 12.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/COMPONENTS.md +384 -40
- package/README.md +14 -5
- package/dist/Accordion.d.mts +6 -0
- package/dist/Accordion.d.ts +6 -0
- package/dist/Accordion.js +16 -0
- package/dist/Accordion.mjs +2 -2
- package/dist/AlertBanner.js +2 -0
- package/dist/AlertBanner.mjs +2 -2
- package/dist/AppHeader.js +2 -0
- package/dist/AppHeader.mjs +3 -3
- package/dist/Avatar.js +2 -0
- package/dist/Avatar.mjs +2 -2
- package/dist/Badge.js +2 -0
- package/dist/Badge.mjs +2 -2
- package/dist/Button.js +17 -17
- package/dist/Button.mjs +2 -2
- package/dist/Card.js +2 -0
- package/dist/Card.mjs +2 -2
- package/dist/CategoryStrip.js +2 -0
- package/dist/CategoryStrip.mjs +2 -2
- package/dist/Checkbox.js +2 -0
- package/dist/Checkbox.mjs +2 -2
- package/dist/Chip.js +2 -0
- package/dist/Chip.mjs +2 -2
- package/dist/ConfirmDialog.d.mts +1 -6
- package/dist/ConfirmDialog.d.ts +1 -6
- package/dist/ConfirmDialog.js +53 -41
- package/dist/ConfirmDialog.mjs +3 -3
- package/dist/CurrencyDisplay.js +2 -0
- package/dist/CurrencyDisplay.mjs +2 -2
- package/dist/CurrencyInput.d.mts +3 -8
- package/dist/CurrencyInput.d.ts +3 -8
- package/dist/CurrencyInput.js +5 -1
- package/dist/CurrencyInput.mjs +3 -3
- package/dist/DetailRow.js +2 -0
- package/dist/DetailRow.mjs +2 -2
- package/dist/EmptyState.js +17 -17
- package/dist/EmptyState.mjs +3 -3
- package/dist/ErrorBoundary.js +2 -0
- package/dist/ErrorBoundary.mjs +2 -2
- package/dist/Form.js +2 -0
- package/dist/Form.mjs +2 -2
- package/dist/IconButton.js +2 -0
- package/dist/IconButton.mjs +2 -2
- package/dist/IconPicker.js +677 -248
- package/dist/IconPicker.mjs +3 -2
- package/dist/ImageUpload.d.mts +3 -1
- package/dist/ImageUpload.d.ts +3 -1
- package/dist/ImageUpload.js +10 -3
- package/dist/ImageUpload.mjs +3 -3
- package/dist/ImageViewer.js +2 -0
- package/dist/ImageViewer.mjs +4 -4
- package/dist/Input.js +2 -0
- package/dist/Input.mjs +2 -2
- package/dist/LabelValue.js +2 -0
- package/dist/LabelValue.mjs +2 -2
- package/dist/ListGroup.js +2 -0
- package/dist/ListGroup.mjs +2 -2
- package/dist/ListItem.d.mts +7 -7
- package/dist/ListItem.d.ts +7 -7
- package/dist/ListItem.js +14 -7
- package/dist/ListItem.mjs +2 -2
- package/dist/MediaCard.js +2 -0
- package/dist/MediaCard.mjs +2 -2
- package/dist/MenuGroup.js +2 -0
- package/dist/MenuGroup.mjs +2 -2
- package/dist/MenuItem.js +2 -0
- package/dist/MenuItem.mjs +2 -2
- package/dist/MonthPicker.js +2 -0
- package/dist/MonthPicker.mjs +2 -2
- package/dist/NumberStepper.js +2 -0
- package/dist/NumberStepper.mjs +2 -2
- package/dist/PagerDots.js +2 -0
- package/dist/PagerDots.mjs +2 -2
- 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 +17 -17
- package/dist/PricingCard.mjs +4 -4
- package/dist/Progress.js +2 -0
- package/dist/Progress.mjs +2 -2
- package/dist/RadioGroup.js +2 -0
- package/dist/RadioGroup.mjs +2 -2
- package/dist/RetrayProvider.d.mts +1 -1
- package/dist/RetrayProvider.d.ts +1 -1
- package/dist/RetrayProvider.js +2 -0
- package/dist/RetrayProvider.mjs +3 -3
- package/dist/Select.js +2 -0
- package/dist/Select.mjs +2 -2
- package/dist/SelectableCard.d.mts +27 -0
- package/dist/SelectableCard.d.ts +27 -0
- package/dist/SelectableCard.js +511 -0
- package/dist/SelectableCard.mjs +8 -0
- package/dist/SelectableGrid.js +2 -0
- package/dist/SelectableGrid.mjs +2 -2
- package/dist/Separator.js +2 -0
- package/dist/Separator.mjs +2 -2
- package/dist/Sheet.d.mts +4 -46
- package/dist/Sheet.d.ts +4 -46
- package/dist/Sheet.js +55 -115
- package/dist/Sheet.mjs +2 -3
- package/dist/SheetSelect.js +2 -0
- package/dist/SheetSelect.mjs +2 -2
- package/dist/Skeleton.d.mts +3 -1
- package/dist/Skeleton.d.ts +3 -1
- package/dist/Skeleton.js +5 -2
- package/dist/Skeleton.mjs +2 -2
- package/dist/Slider.js +2 -0
- package/dist/Slider.mjs +2 -2
- package/dist/Spinner.js +2 -0
- package/dist/Spinner.mjs +2 -2
- package/dist/Stats.d.mts +33 -0
- package/dist/Stats.d.ts +33 -0
- package/dist/Stats.js +453 -0
- package/dist/Stats.mjs +9 -0
- package/dist/Switch.js +2 -0
- package/dist/Switch.mjs +2 -2
- package/dist/TabBar.js +2 -0
- package/dist/TabBar.mjs +2 -2
- package/dist/Tabs.js +2 -0
- package/dist/Tabs.mjs +2 -2
- package/dist/Text.d.mts +3 -1
- package/dist/Text.d.ts +3 -1
- package/dist/Text.js +5 -3
- package/dist/Text.mjs +2 -2
- package/dist/Textarea.js +2 -0
- package/dist/Textarea.mjs +2 -2
- package/dist/Toast.js +2 -0
- package/dist/Toast.mjs +2 -2
- package/dist/Toggle.js +2 -0
- package/dist/Toggle.mjs +2 -2
- package/dist/{chunk-U2XJFYED.mjs → chunk-2BA3JMKK.mjs} +1 -1
- package/dist/{chunk-NMU5FMQJ.mjs → chunk-2HFD4IHU.mjs} +4 -2
- package/dist/{chunk-S2R7UVOE.mjs → chunk-2LG326TT.mjs} +1 -1
- package/dist/chunk-2P2CB235.mjs +236 -0
- package/dist/{chunk-6L4G6PBT.mjs → chunk-3XCFYSX4.mjs} +1 -1
- package/dist/{chunk-HTHGSXFG.mjs → chunk-4J2PXL36.mjs} +16 -18
- package/dist/{chunk-BEMIQXXU.mjs → chunk-4OORJ2DY.mjs} +1 -1
- package/dist/chunk-4XOB5TTD.mjs +166 -0
- package/dist/{chunk-FCSSQK3L.mjs → chunk-57V2LXCK.mjs} +1 -1
- package/dist/{chunk-6Q64UFIA.mjs → chunk-7AFZWSCI.mjs} +1 -1
- package/dist/{chunk-IX3NYLYQ.mjs → chunk-7ELGZ66G.mjs} +1 -1
- package/dist/{chunk-GD6KXMG5.mjs → chunk-AENAVIKT.mjs} +1 -1
- package/dist/{chunk-ID72TK46.mjs → chunk-BXF4AMHY.mjs} +1 -1
- package/dist/{chunk-SOA2Z4RB.mjs → chunk-C43HRKXH.mjs} +1 -1
- package/dist/{chunk-TZDGAP5N.mjs → chunk-CF27NBXO.mjs} +11 -6
- package/dist/{chunk-SXLKNTA4.mjs → chunk-DF7JA72E.mjs} +1 -1
- package/dist/{chunk-AJRVDP2H.mjs → chunk-E5UKLSJZ.mjs} +3 -3
- package/dist/{chunk-MBMXYJJV.mjs → chunk-E7NEHHXV.mjs} +7 -3
- package/dist/{chunk-VKID2D2I.mjs → chunk-EDLCGYIO.mjs} +13 -8
- package/dist/{chunk-BUMAMSTZ.mjs → chunk-ELGEOM7I.mjs} +1 -1
- package/dist/{chunk-DYT7BG5I.mjs → chunk-F3YTWO3T.mjs} +1 -1
- package/dist/{chunk-VF2ATYN3.mjs → chunk-GH67YXG6.mjs} +1 -1
- package/dist/{chunk-WJLKJMKR.mjs → chunk-GUTDFUNF.mjs} +4 -4
- package/dist/{chunk-6SECQ2ZF.mjs → chunk-HC4VVCWY.mjs} +2 -2
- package/dist/{chunk-A3A6KNQN.mjs → chunk-HEDQPK4I.mjs} +1 -1
- package/dist/{chunk-GQYFLP3D.mjs → chunk-IVSRW4HS.mjs} +1 -1
- package/dist/{chunk-KOO4WITD.mjs → chunk-KSUWPU2F.mjs} +1 -1
- package/dist/{chunk-WBOOUHSS.mjs → chunk-LIS6I5UP.mjs} +1 -1
- package/dist/{chunk-X4G6APW6.mjs → chunk-LNPKGWBG.mjs} +1 -1
- package/dist/{chunk-T2KCAHOS.mjs → chunk-LOBLCFMN.mjs} +1 -1
- package/dist/{chunk-ELXBDILQ.mjs → chunk-LPV4NJJK.mjs} +2 -2
- package/dist/{chunk-Y2NS74WS.mjs → chunk-M3C7XM2M.mjs} +53 -99
- package/dist/{chunk-BRKYVJVV.mjs → chunk-MEPSKGBO.mjs} +1 -1
- package/dist/{chunk-TBNZHU6C.mjs → chunk-MVMGPZN6.mjs} +2 -2
- package/dist/{chunk-YJ7I257J.mjs → chunk-NHDI3VQB.mjs} +15 -1
- package/dist/{chunk-Z6SFHN6T.mjs → chunk-NJG7DHVF.mjs} +1 -1
- package/dist/{chunk-RYZC432S.mjs → chunk-NLZY4TXU.mjs} +1 -1
- package/dist/{chunk-ZZ2R6KZ3.mjs → chunk-OLVJFKXS.mjs} +1 -1
- package/dist/{chunk-AJ7ZDNBT.mjs → chunk-QDAZGZUF.mjs} +4 -3
- package/dist/{chunk-JT7HKXRB.mjs → chunk-QOLWA2PW.mjs} +1 -1
- package/dist/{chunk-WYEUNUTP.mjs → chunk-QXDGGOLC.mjs} +38 -25
- package/dist/{chunk-JMOZEC77.mjs → chunk-RJNLAH76.mjs} +1 -1
- package/dist/{chunk-WF2XDFRK.mjs → chunk-RMRS44MQ.mjs} +1 -1
- package/dist/chunk-SAWUXP3A.mjs +1114 -0
- package/dist/{chunk-OB4JUQ3O.mjs → chunk-TS7DGUIR.mjs} +1 -1
- package/dist/{chunk-AV4EMIRH.mjs → chunk-UBUXUMER.mjs} +1 -1
- package/dist/{chunk-IRRY3CRZ.mjs → chunk-ULGNQPNE.mjs} +1 -1
- package/dist/{chunk-7LWRKMF5.mjs → chunk-UNNRUJTM.mjs} +1 -1
- package/dist/{chunk-TB6SD2FT.mjs → chunk-UQ4742ET.mjs} +1 -1
- package/dist/{chunk-MX6HRKMI.mjs → chunk-VJBUCITV.mjs} +1 -1
- package/dist/{chunk-2UYENBLV.mjs → chunk-YMYIEVZP.mjs} +1 -1
- package/dist/{chunk-SOYNZDVY.mjs → chunk-YTXRIXNZ.mjs} +8 -1
- package/dist/{chunk-YFZ3ELX5.mjs → chunk-ZIMY2QUM.mjs} +2 -2
- package/dist/{chunk-Z4VHZ7B5.mjs → chunk-ZR6HSEAB.mjs} +1 -1
- 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-wt-orHUi.d.ts → index-CY34hxPN.d.mts} +1 -0
- package/dist/{index-wt-orHUi.d.mts → index-CY34hxPN.d.ts} +1 -0
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1517 -761
- package/dist/index.mjs +54 -52
- package/package.json +3 -3
- package/src/components/Accordion/Accordion.tsx +20 -0
- package/src/components/Button/Button.tsx +29 -26
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +47 -31
- package/src/components/CurrencyInput/CurrencyInput.tsx +4 -7
- package/src/components/IconPicker/IconPicker.tsx +124 -112
- package/src/components/ImageUpload/ImageUpload.tsx +10 -3
- package/src/components/ListItem/ListItem.tsx +43 -28
- package/src/components/Pressable/Pressable.tsx +20 -8
- package/src/components/SelectableCard/SelectableCard.tsx +304 -0
- package/src/components/SelectableCard/index.ts +1 -0
- package/src/components/Sheet/Sheet.tsx +72 -173
- package/src/components/Skeleton/Skeleton.tsx +5 -2
- package/src/components/Stats/Stats.tsx +254 -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 +5 -0
- package/src/theme/colorUtils.ts +9 -0
- package/src/theme/colors.ts +7 -0
- package/src/theme/types.ts +4 -1
- package/src/utils/curatedIcons.ts +698 -135
- package/src/utils/fontGuard.ts +2 -1
- package/dist/chunk-53Z3NYGE.mjs +0 -742
package/dist/index.mjs
CHANGED
|
@@ -1,63 +1,65 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { TabBar } from './chunk-Z6SFHN6T.mjs';
|
|
3
|
-
export { Tabs, TabsContent } from './chunk-GQYFLP3D.mjs';
|
|
4
|
-
export { Text } from './chunk-WJLKJMKR.mjs';
|
|
5
|
-
export { Textarea } from './chunk-U2XJFYED.mjs';
|
|
6
|
-
export { Toggle } from './chunk-7LWRKMF5.mjs';
|
|
1
|
+
export { Toggle } from './chunk-UNNRUJTM.mjs';
|
|
7
2
|
export { VirtualList } from './chunk-NC5ZTR2Y.mjs';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
3
|
+
export { Stats } from './chunk-4XOB5TTD.mjs';
|
|
4
|
+
export { Switch } from './chunk-RMRS44MQ.mjs';
|
|
5
|
+
export { TabBar } from './chunk-NJG7DHVF.mjs';
|
|
6
|
+
export { Tabs, TabsContent } from './chunk-IVSRW4HS.mjs';
|
|
7
|
+
export { Text } from './chunk-GUTDFUNF.mjs';
|
|
8
|
+
export { Textarea } from './chunk-2BA3JMKK.mjs';
|
|
9
|
+
export { Select } from './chunk-HEDQPK4I.mjs';
|
|
10
|
+
export { SelectableCard, SelectableCardGroup } from './chunk-2P2CB235.mjs';
|
|
11
|
+
export { SelectableGrid } from './chunk-ZR6HSEAB.mjs';
|
|
12
|
+
export { Separator } from './chunk-VJBUCITV.mjs';
|
|
13
|
+
export { BottomSheetModalProvider, Sheet, BottomSheetTextInput as SheetTextInput } from './chunk-M3C7XM2M.mjs';
|
|
14
|
+
export { SheetSelect } from './chunk-KSUWPU2F.mjs';
|
|
15
|
+
export { Skeleton } from './chunk-QDAZGZUF.mjs';
|
|
16
|
+
export { Slider } from './chunk-RJNLAH76.mjs';
|
|
17
|
+
export { MonthPicker, dateToMonthPickerValue, monthPickerValueToDate } from './chunk-AENAVIKT.mjs';
|
|
18
|
+
export { NumberStepper } from './chunk-ELGEOM7I.mjs';
|
|
19
|
+
export { Pressable } from './chunk-E7NEHHXV.mjs';
|
|
20
|
+
export { PricingCard } from './chunk-E5UKLSJZ.mjs';
|
|
21
|
+
export { Progress } from './chunk-TS7DGUIR.mjs';
|
|
22
|
+
export { RadioGroup } from './chunk-LNPKGWBG.mjs';
|
|
23
|
+
export { RetrayProvider } from './chunk-ZIMY2QUM.mjs';
|
|
24
|
+
export { ToastProvider, sonnerToast as toast, useToast } from './chunk-YMYIEVZP.mjs';
|
|
25
|
+
export { ImageViewer } from './chunk-LPV4NJJK.mjs';
|
|
26
|
+
export { PagerDots } from './chunk-OLVJFKXS.mjs';
|
|
27
|
+
export { LabelValue } from './chunk-57V2LXCK.mjs';
|
|
28
|
+
export { ListGroup, ListGroupFooter, ListGroupHeader } from './chunk-C43HRKXH.mjs';
|
|
29
|
+
export { ListItem } from './chunk-EDLCGYIO.mjs';
|
|
30
|
+
export { MediaCard } from './chunk-7ELGZ66G.mjs';
|
|
31
|
+
export { MenuGroup, MenuGroupFooter, MenuGroupHeader } from './chunk-ULGNQPNE.mjs';
|
|
32
|
+
export { MenuItem } from './chunk-UQ4742ET.mjs';
|
|
33
|
+
export { DetailRow } from './chunk-2LG326TT.mjs';
|
|
34
|
+
export { EmptyState } from './chunk-HC4VVCWY.mjs';
|
|
35
|
+
export { ErrorBoundary } from './chunk-NLZY4TXU.mjs';
|
|
36
|
+
export { Form, FormField, FormFooter, FormSection } from './chunk-7AFZWSCI.mjs';
|
|
37
|
+
export { IconPicker } from './chunk-SAWUXP3A.mjs';
|
|
38
|
+
export { ImageUpload } from './chunk-CF27NBXO.mjs';
|
|
39
|
+
export { Spinner } from './chunk-LIS6I5UP.mjs';
|
|
38
40
|
export { ButtonGroup } from './chunk-3BBOZ3OQ.mjs';
|
|
39
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './chunk-
|
|
40
|
-
export { CategoryStrip } from './chunk-
|
|
41
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './chunk-BXF4AMHY.mjs';
|
|
42
|
+
export { CategoryStrip } from './chunk-3XCFYSX4.mjs';
|
|
41
43
|
import './chunk-YNROWHQJ.mjs';
|
|
42
|
-
export { Checkbox } from './chunk-
|
|
43
|
-
export { Chip, ChipGroup } from './chunk-
|
|
44
|
-
export { ConfirmDialog } from './chunk-
|
|
45
|
-
export { CurrencyDisplay } from './chunk-
|
|
46
|
-
export { CurrencyInput } from './chunk-
|
|
47
|
-
export { Input } from './chunk-
|
|
48
|
-
export { Accordion } from './chunk-
|
|
49
|
-
export { AlertBanner } from './chunk-
|
|
50
|
-
export { AppHeader } from './chunk-
|
|
51
|
-
export { IconButton } from './chunk-
|
|
52
|
-
export { Avatar } from './chunk-
|
|
53
|
-
export { Badge } from './chunk-
|
|
54
|
-
export { Button } from './chunk-
|
|
44
|
+
export { Checkbox } from './chunk-UBUXUMER.mjs';
|
|
45
|
+
export { Chip, ChipGroup } from './chunk-F3YTWO3T.mjs';
|
|
46
|
+
export { ConfirmDialog } from './chunk-QXDGGOLC.mjs';
|
|
47
|
+
export { CurrencyDisplay } from './chunk-MEPSKGBO.mjs';
|
|
48
|
+
export { CurrencyInput } from './chunk-2HFD4IHU.mjs';
|
|
49
|
+
export { Input } from './chunk-DF7JA72E.mjs';
|
|
50
|
+
export { Accordion } from './chunk-NHDI3VQB.mjs';
|
|
51
|
+
export { AlertBanner } from './chunk-4OORJ2DY.mjs';
|
|
52
|
+
export { AppHeader } from './chunk-MVMGPZN6.mjs';
|
|
53
|
+
export { IconButton } from './chunk-LOBLCFMN.mjs';
|
|
54
|
+
export { Avatar } from './chunk-QOLWA2PW.mjs';
|
|
55
|
+
export { Badge } from './chunk-GH67YXG6.mjs';
|
|
56
|
+
export { Button } from './chunk-4J2PXL36.mjs';
|
|
55
57
|
import './chunk-3DKJ2GIC.mjs';
|
|
56
58
|
export { impactHeavy, impactLight, impactMedium, notificationError, notificationSuccess, notificationWarning, richHaptics, selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
57
59
|
import './chunk-DVK4G2GT.mjs';
|
|
58
60
|
export { BREAKPOINTS, ICON_SIZES, RADIUS, SHADOWS, SPACING, TYPOGRAPHY } from './chunk-QY3X2UYR.mjs';
|
|
59
61
|
export { Icon, configureIconFamilies, getValidIconNames, renderIcon } from './chunk-KA7LTET3.mjs';
|
|
60
|
-
export { ThemeProvider, defaultDark, defaultLight, deriveColors, useTheme } from './chunk-
|
|
62
|
+
export { ThemeProvider, defaultDark, defaultLight, deriveColors, useTheme, withAlpha } from './chunk-YTXRIXNZ.mjs';
|
|
61
63
|
import './chunk-2CE3TQVY.mjs';
|
|
62
64
|
import './chunk-Y6FXYEAI.mjs';
|
|
63
65
|
import { useState, useCallback } from 'react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retray-dev/ui-kit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "Personal UI Kit for React Native / Expo",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"react-native-worklets": "0.5.1",
|
|
111
111
|
"@types/react": "19.1.17",
|
|
112
112
|
"react-native-safe-area-context": "5.6.2",
|
|
113
|
-
"@gorhom/bottom-sheet": "5.2.
|
|
113
|
+
"@gorhom/bottom-sheet": "5.2.14"
|
|
114
114
|
},
|
|
115
115
|
"onlyBuiltDependencies": [
|
|
116
116
|
"esbuild"
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"@eslint/js": "^9.0.0",
|
|
121
121
|
"@expo/vector-icons": "^15.1.1",
|
|
122
|
-
"@gorhom/bottom-sheet": "5.2.
|
|
122
|
+
"@gorhom/bottom-sheet": "5.2.14",
|
|
123
123
|
"@react-native-community/slider": "5.0.1",
|
|
124
124
|
"@react-native-picker/picker": "2.11.1",
|
|
125
125
|
"@shopify/react-native-skia": "2.2.12",
|
|
@@ -29,6 +29,12 @@ export interface AccordionItem {
|
|
|
29
29
|
icon?: React.ReactNode
|
|
30
30
|
/** Override icon color. Defaults to foregroundMuted. */
|
|
31
31
|
iconColor?: string
|
|
32
|
+
/**
|
|
33
|
+
* Action buttons rendered after the trigger content but before the chevron.
|
|
34
|
+
* Automatically touch-isolated — taps on actions won't toggle the accordion.
|
|
35
|
+
* Use this instead of embedding interactive elements inside `trigger`.
|
|
36
|
+
*/
|
|
37
|
+
triggerActions?: React.ReactNode
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
export interface AccordionProps {
|
|
@@ -112,6 +118,14 @@ function AccordionItemComponent({
|
|
|
112
118
|
item.trigger
|
|
113
119
|
)}
|
|
114
120
|
</View>
|
|
121
|
+
{item.triggerActions ? (
|
|
122
|
+
<View
|
|
123
|
+
style={styles.triggerActions}
|
|
124
|
+
onTouchEnd={(e) => e.stopPropagation()}
|
|
125
|
+
>
|
|
126
|
+
{item.triggerActions}
|
|
127
|
+
</View>
|
|
128
|
+
) : null}
|
|
115
129
|
<Animated.View style={[styles.chevron, rotationStyle]}>
|
|
116
130
|
<Entypo name="chevron-down" size={18} color={colors.foregroundMuted} />
|
|
117
131
|
</Animated.View>
|
|
@@ -206,6 +220,12 @@ const styles = StyleSheet.create({
|
|
|
206
220
|
chevron: {
|
|
207
221
|
marginLeft: s(8),
|
|
208
222
|
},
|
|
223
|
+
triggerActions: {
|
|
224
|
+
flexDirection: 'row',
|
|
225
|
+
alignItems: 'center',
|
|
226
|
+
gap: s(4),
|
|
227
|
+
marginLeft: s(8),
|
|
228
|
+
},
|
|
209
229
|
// position:'absolute' is the key — the inner View escapes the animated wrapper's
|
|
210
230
|
// clipped height so onLayout always reports the true content height.
|
|
211
231
|
content: {
|
|
@@ -73,31 +73,38 @@ function ButtonBase({
|
|
|
73
73
|
onPress?.()
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
const containerVariantStyle: ViewStyle =
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
76
|
+
const containerVariantStyle: ViewStyle = isDisabled
|
|
77
|
+
? {
|
|
78
|
+
primary: { backgroundColor: colors.surface },
|
|
79
|
+
secondary: { backgroundColor: 'transparent', borderWidth: 1.5, borderColor: colors.border },
|
|
80
|
+
text: { backgroundColor: 'transparent' },
|
|
81
|
+
destructive: { backgroundColor: colors.surface },
|
|
82
|
+
}[variant]
|
|
83
|
+
: {
|
|
84
|
+
primary: { backgroundColor: colors.primary },
|
|
85
|
+
secondary: { backgroundColor: 'transparent', borderWidth: 1.5, borderColor: colors.primary },
|
|
86
|
+
text: { backgroundColor: 'transparent' },
|
|
87
|
+
destructive: { backgroundColor: colors.destructive },
|
|
88
|
+
}[variant]
|
|
89
|
+
|
|
90
|
+
const labelColor = isDisabled
|
|
91
|
+
? colors.foregroundMuted
|
|
92
|
+
: {
|
|
93
|
+
primary: colors.primaryForeground,
|
|
94
|
+
secondary: colors.primary,
|
|
95
|
+
text: colors.accentResolved,
|
|
96
|
+
destructive: colors.destructiveForeground,
|
|
97
|
+
}[variant]
|
|
98
|
+
|
|
99
|
+
const textColor = iconColor ?? labelColor
|
|
94
100
|
|
|
95
101
|
const effectiveIcon: React.ReactNode = iconName
|
|
96
102
|
? renderIcon(iconName, iconSizeMap[size], textColor)
|
|
97
103
|
: typeof icon === 'function' ? icon({ label, size, variant, color: textColor }) : icon
|
|
98
104
|
|
|
99
|
-
const spinnerColor =
|
|
100
|
-
|
|
105
|
+
const spinnerColor = isDisabled
|
|
106
|
+
? colors.foregroundMuted
|
|
107
|
+
: variant === 'destructive' ? colors.destructiveForeground
|
|
101
108
|
: variant === 'primary' ? colors.primaryForeground
|
|
102
109
|
: colors.accentResolved
|
|
103
110
|
|
|
@@ -113,7 +120,6 @@ function ButtonBase({
|
|
|
113
120
|
containerVariantStyle,
|
|
114
121
|
containerSizeStyles[size],
|
|
115
122
|
fullWidth && styles.fullWidth,
|
|
116
|
-
isDisabled && styles.disabled,
|
|
117
123
|
restStyle,
|
|
118
124
|
]}
|
|
119
125
|
enabled={!isDisabled}
|
|
@@ -130,7 +136,7 @@ function ButtonBase({
|
|
|
130
136
|
<>
|
|
131
137
|
<ActivityIndicator size="small" color={spinnerColor} style={{ marginRight: s(6) }} />
|
|
132
138
|
<Text
|
|
133
|
-
style={[styles.label,
|
|
139
|
+
style={[styles.label, { color: labelColor }, labelSizeStyles[size], styles.labelLoading]}
|
|
134
140
|
allowFontScaling={true}
|
|
135
141
|
numberOfLines={1}
|
|
136
142
|
>
|
|
@@ -141,7 +147,7 @@ function ButtonBase({
|
|
|
141
147
|
<>
|
|
142
148
|
{effectiveIcon && iconPosition === 'left' && <>{effectiveIcon}</>}
|
|
143
149
|
<Text
|
|
144
|
-
style={[styles.label,
|
|
150
|
+
style={[styles.label, { color: labelColor }, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : undefined]}
|
|
145
151
|
allowFontScaling={true}
|
|
146
152
|
numberOfLines={1}
|
|
147
153
|
>
|
|
@@ -167,9 +173,6 @@ const styles = StyleSheet.create({
|
|
|
167
173
|
fullWidth: {
|
|
168
174
|
width: '100%',
|
|
169
175
|
},
|
|
170
|
-
disabled: {
|
|
171
|
-
opacity: 0.45,
|
|
172
|
-
},
|
|
173
176
|
label: {
|
|
174
177
|
fontFamily: 'Sohne-Medium',
|
|
175
178
|
flexShrink: 1,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react'
|
|
1
|
+
import React, { useCallback, useEffect, useRef, useId } from 'react'
|
|
2
2
|
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native'
|
|
3
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
BottomSheetModal,
|
|
4
5
|
BottomSheetView,
|
|
5
6
|
BottomSheetBackdrop,
|
|
6
7
|
type BottomSheetBackdropProps,
|
|
7
8
|
} from '@gorhom/bottom-sheet'
|
|
9
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
8
10
|
import { Feather } from '@expo/vector-icons'
|
|
9
11
|
import { impactMedium, notificationSuccess, selectionAsync as hapticSelection } from '../../utils/haptics'
|
|
10
12
|
import { useTheme } from '../../theme'
|
|
@@ -14,16 +16,11 @@ import { s, vs, ms, mvs } from '../../utils/scaling'
|
|
|
14
16
|
export interface ConfirmDialogProps {
|
|
15
17
|
visible: boolean
|
|
16
18
|
title: string
|
|
17
|
-
/** Secondary text below title. */
|
|
18
19
|
subtitle?: string
|
|
19
|
-
/** @deprecated Use `subtitle` instead. */
|
|
20
|
-
description?: string
|
|
21
20
|
confirmLabel?: string
|
|
22
21
|
cancelLabel?: string
|
|
23
22
|
confirmVariant?: 'primary' | 'destructive'
|
|
24
|
-
/** Show a loading spinner in the confirm button (e.g. while async action completes). */
|
|
25
23
|
loading?: boolean
|
|
26
|
-
/** Show an X close button in the top-right corner. */
|
|
27
24
|
showCloseButton?: boolean
|
|
28
25
|
onConfirm: () => void
|
|
29
26
|
onCancel: () => void
|
|
@@ -33,7 +30,6 @@ export function ConfirmDialog({
|
|
|
33
30
|
visible,
|
|
34
31
|
title,
|
|
35
32
|
subtitle,
|
|
36
|
-
description,
|
|
37
33
|
confirmLabel = 'Confirm',
|
|
38
34
|
cancelLabel = 'Cancel',
|
|
39
35
|
confirmVariant = 'primary',
|
|
@@ -43,37 +39,51 @@ export function ConfirmDialog({
|
|
|
43
39
|
onCancel,
|
|
44
40
|
}: ConfirmDialogProps) {
|
|
45
41
|
const { colors } = useTheme()
|
|
46
|
-
const
|
|
47
|
-
const
|
|
42
|
+
const insets = useSafeAreaInsets()
|
|
43
|
+
const ref = useRef<BottomSheetModal>(null)
|
|
44
|
+
const wasOpened = useRef(false)
|
|
45
|
+
const isPresentedRef = useRef(false)
|
|
46
|
+
const name = useId()
|
|
47
|
+
|
|
48
|
+
const handleDismiss = useCallback(() => {
|
|
49
|
+
isPresentedRef.current = false
|
|
50
|
+
onCancel()
|
|
51
|
+
}, [onCancel])
|
|
48
52
|
|
|
49
53
|
useEffect(() => {
|
|
50
|
-
if (visible) {
|
|
54
|
+
if (visible && !isPresentedRef.current) {
|
|
51
55
|
impactMedium()
|
|
52
|
-
ref.current?.
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
ref.current?.present()
|
|
57
|
+
wasOpened.current = true
|
|
58
|
+
isPresentedRef.current = true
|
|
59
|
+
} else if (!visible && wasOpened.current && isPresentedRef.current) {
|
|
60
|
+
ref.current?.dismiss()
|
|
55
61
|
}
|
|
56
62
|
}, [visible])
|
|
57
63
|
|
|
58
|
-
const renderBackdrop = (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
const renderBackdrop = useCallback(
|
|
65
|
+
(props: BottomSheetBackdropProps) => (
|
|
66
|
+
<BottomSheetBackdrop
|
|
67
|
+
{...props}
|
|
68
|
+
disappearsOnIndex={-1}
|
|
69
|
+
appearsOnIndex={0}
|
|
70
|
+
pressBehavior="close"
|
|
71
|
+
/>
|
|
72
|
+
),
|
|
73
|
+
[]
|
|
65
74
|
)
|
|
66
75
|
|
|
67
76
|
return (
|
|
68
|
-
|
|
77
|
+
<BottomSheetModal
|
|
69
78
|
ref={ref}
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
name={name}
|
|
80
|
+
onDismiss={handleDismiss}
|
|
72
81
|
enableDynamicSizing
|
|
73
82
|
backdropComponent={renderBackdrop}
|
|
74
|
-
backgroundStyle={
|
|
75
|
-
handleIndicatorStyle={
|
|
83
|
+
backgroundStyle={{ ...styles.background, backgroundColor: colors.card }}
|
|
84
|
+
handleIndicatorStyle={{ ...styles.handle, backgroundColor: colors.border }}
|
|
76
85
|
enablePanDownToClose
|
|
86
|
+
topInset={insets.top}
|
|
77
87
|
>
|
|
78
88
|
<BottomSheetView style={styles.content}>
|
|
79
89
|
<View style={styles.header} accessibilityRole="header">
|
|
@@ -95,9 +105,9 @@ export function ConfirmDialog({
|
|
|
95
105
|
</TouchableOpacity>
|
|
96
106
|
) : null}
|
|
97
107
|
</View>
|
|
98
|
-
{
|
|
108
|
+
{subtitle ? (
|
|
99
109
|
<Text style={[styles.subtitle, { color: colors.foregroundMuted }]} allowFontScaling={true}>
|
|
100
|
-
{
|
|
110
|
+
{subtitle}
|
|
101
111
|
</Text>
|
|
102
112
|
) : null}
|
|
103
113
|
</View>
|
|
@@ -108,7 +118,10 @@ export function ConfirmDialog({
|
|
|
108
118
|
fullWidth
|
|
109
119
|
loading={loading}
|
|
110
120
|
disabled={loading}
|
|
111
|
-
onPress={() => {
|
|
121
|
+
onPress={() => {
|
|
122
|
+
notificationSuccess()
|
|
123
|
+
onConfirm()
|
|
124
|
+
}}
|
|
112
125
|
icon={
|
|
113
126
|
<Feather
|
|
114
127
|
name={confirmVariant === 'destructive' ? 'trash-2' : 'check'}
|
|
@@ -125,12 +138,15 @@ export function ConfirmDialog({
|
|
|
125
138
|
label={cancelLabel}
|
|
126
139
|
variant="secondary"
|
|
127
140
|
fullWidth
|
|
128
|
-
onPress={() => {
|
|
141
|
+
onPress={() => {
|
|
142
|
+
hapticSelection()
|
|
143
|
+
onCancel()
|
|
144
|
+
}}
|
|
129
145
|
icon={<Feather name="x" size={15} color={colors.foreground} />}
|
|
130
146
|
/>
|
|
131
147
|
</View>
|
|
132
148
|
</BottomSheetView>
|
|
133
|
-
</
|
|
149
|
+
</BottomSheetModal>
|
|
134
150
|
)
|
|
135
151
|
}
|
|
136
152
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { ViewStyle, TextStyle } from 'react-native'
|
|
2
|
+
import { ViewStyle, TextStyle, TextInputProps } from 'react-native'
|
|
3
3
|
import { Input } from '../Input'
|
|
4
4
|
import { ms, vs } from '../../utils/scaling'
|
|
5
5
|
|
|
6
|
-
export interface CurrencyInputProps {
|
|
7
|
-
value?: string
|
|
8
|
-
onChangeText?: (formatted: string) => void
|
|
6
|
+
export interface CurrencyInputProps extends TextInputProps {
|
|
9
7
|
/** Called with the parsed numeric value (no separators, no prefix). */
|
|
10
8
|
onChangeValue?: (raw: number) => void
|
|
11
9
|
/** Currency symbol shown left of the value. Any string (`'$'`, `'€'`, `'£'`, `'COP '`). Defaults to `'$'`. */
|
|
@@ -18,10 +16,7 @@ export interface CurrencyInputProps {
|
|
|
18
16
|
/** Red helper text; also changes input border to destructive color. */
|
|
19
17
|
error?: string
|
|
20
18
|
hint?: string
|
|
21
|
-
placeholder?: string
|
|
22
|
-
editable?: boolean
|
|
23
19
|
containerStyle?: ViewStyle
|
|
24
|
-
style?: TextStyle
|
|
25
20
|
/** Use inside a Sheet/BottomSheet — passes sheetMode to the underlying Input. */
|
|
26
21
|
sheetMode?: boolean
|
|
27
22
|
}
|
|
@@ -47,6 +42,7 @@ export function CurrencyInput({
|
|
|
47
42
|
containerStyle,
|
|
48
43
|
style,
|
|
49
44
|
sheetMode,
|
|
45
|
+
...props
|
|
50
46
|
}: CurrencyInputProps) {
|
|
51
47
|
const handleChange = (text: string) => {
|
|
52
48
|
const withoutPrefix = prefix && text.startsWith(prefix) ? text.slice(prefix.length) : text
|
|
@@ -73,6 +69,7 @@ export function CurrencyInput({
|
|
|
73
69
|
|
|
74
70
|
return (
|
|
75
71
|
<Input
|
|
72
|
+
{...props}
|
|
76
73
|
value={displayValue}
|
|
77
74
|
onChangeText={handleChange}
|
|
78
75
|
keyboardType="numeric"
|