@retray-dev/ui-kit 6.2.0 → 9.0.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 +997 -20
- package/EXAMPLES.md +250 -2
- package/README.md +21 -14
- package/dist/Accordion.d.mts +28 -0
- package/dist/Accordion.d.ts +28 -0
- package/dist/Accordion.js +392 -0
- package/dist/Accordion.mjs +7 -0
- package/dist/AlertBanner.d.mts +16 -0
- package/dist/AlertBanner.d.ts +16 -0
- package/dist/AlertBanner.js +250 -0
- package/dist/AlertBanner.mjs +6 -0
- package/dist/AppHeader.d.mts +40 -0
- package/dist/AppHeader.d.ts +40 -0
- package/dist/AppHeader.js +515 -0
- package/dist/AppHeader.mjs +10 -0
- package/dist/Avatar.d.mts +20 -0
- package/dist/Avatar.d.ts +20 -0
- package/dist/Avatar.js +244 -0
- package/dist/Avatar.mjs +4 -0
- package/dist/Badge.d.mts +26 -0
- package/dist/Badge.d.ts +26 -0
- package/dist/Badge.js +257 -0
- package/dist/Badge.mjs +5 -0
- package/dist/Button.d.mts +30 -0
- package/dist/Button.d.ts +30 -0
- package/dist/Button.js +432 -0
- package/dist/Button.mjs +9 -0
- package/dist/ButtonGroup.d.mts +26 -0
- package/dist/ButtonGroup.d.ts +26 -0
- package/dist/ButtonGroup.js +52 -0
- package/dist/ButtonGroup.mjs +3 -0
- package/dist/Card.d.mts +39 -0
- package/dist/Card.d.ts +39 -0
- package/dist/Card.js +349 -0
- package/dist/Card.mjs +8 -0
- package/dist/CategoryStrip.d.mts +26 -0
- package/dist/CategoryStrip.d.ts +26 -0
- package/dist/CategoryStrip.js +453 -0
- package/dist/CategoryStrip.mjs +9 -0
- package/dist/Checkbox.d.mts +14 -0
- package/dist/Checkbox.d.ts +14 -0
- package/dist/Checkbox.js +336 -0
- package/dist/Checkbox.mjs +7 -0
- package/dist/Chip.d.mts +31 -0
- package/dist/Chip.d.ts +31 -0
- package/dist/Chip.js +403 -0
- package/dist/Chip.mjs +8 -0
- package/dist/ConfirmDialog.d.mts +15 -0
- package/dist/ConfirmDialog.d.ts +15 -0
- package/dist/ConfirmDialog.js +560 -0
- package/dist/ConfirmDialog.mjs +10 -0
- package/dist/CurrencyDisplay.d.mts +24 -0
- package/dist/CurrencyDisplay.d.ts +24 -0
- package/dist/CurrencyDisplay.js +189 -0
- package/dist/CurrencyDisplay.mjs +4 -0
- package/dist/CurrencyInput.d.mts +26 -0
- package/dist/CurrencyInput.d.ts +26 -0
- package/dist/CurrencyInput.js +408 -0
- package/dist/CurrencyInput.mjs +8 -0
- package/dist/DetailRow.d.mts +32 -0
- package/dist/DetailRow.d.ts +32 -0
- package/dist/DetailRow.js +275 -0
- package/dist/DetailRow.mjs +5 -0
- package/dist/EmptyState.d.mts +27 -0
- package/dist/EmptyState.d.ts +27 -0
- package/dist/EmptyState.js +523 -0
- package/dist/EmptyState.mjs +10 -0
- package/dist/ErrorBoundary.d.mts +42 -0
- package/dist/ErrorBoundary.d.ts +42 -0
- package/dist/ErrorBoundary.js +351 -0
- package/dist/ErrorBoundary.mjs +7 -0
- package/dist/Form.d.mts +52 -0
- package/dist/Form.d.ts +52 -0
- package/dist/Form.js +204 -0
- package/dist/Form.mjs +4 -0
- package/dist/HolographicCard.d.mts +55 -0
- package/dist/HolographicCard.d.ts +55 -0
- package/dist/HolographicCard.js +316 -0
- package/dist/HolographicCard.mjs +191 -0
- package/dist/IconButton.d.mts +27 -0
- package/dist/IconButton.d.ts +27 -0
- package/dist/IconButton.js +400 -0
- package/dist/IconButton.mjs +8 -0
- package/dist/ImageViewer.d.mts +23 -0
- package/dist/ImageViewer.d.ts +23 -0
- package/dist/ImageViewer.js +582 -0
- package/dist/ImageViewer.mjs +8 -0
- package/dist/Input.d.mts +23 -0
- package/dist/Input.d.ts +23 -0
- package/dist/Input.js +351 -0
- package/dist/Input.mjs +7 -0
- package/dist/LabelValue.d.mts +16 -0
- package/dist/LabelValue.d.ts +16 -0
- package/dist/LabelValue.js +225 -0
- package/dist/LabelValue.mjs +5 -0
- package/dist/ListGroup.d.mts +34 -0
- package/dist/ListGroup.d.ts +34 -0
- package/dist/ListGroup.js +217 -0
- package/dist/ListGroup.mjs +5 -0
- package/dist/ListItem.d.mts +64 -0
- package/dist/ListItem.d.ts +64 -0
- package/dist/ListItem.js +444 -0
- package/dist/ListItem.mjs +9 -0
- package/dist/MediaCard.d.mts +39 -0
- package/dist/MediaCard.d.ts +39 -0
- package/dist/MediaCard.js +475 -0
- package/dist/MediaCard.mjs +9 -0
- package/dist/MenuGroup.d.mts +34 -0
- package/dist/MenuGroup.d.ts +34 -0
- package/dist/MenuGroup.js +217 -0
- package/dist/MenuGroup.mjs +5 -0
- package/dist/MenuItem.d.mts +48 -0
- package/dist/MenuItem.d.ts +48 -0
- package/dist/MenuItem.js +415 -0
- package/dist/MenuItem.mjs +9 -0
- package/dist/MonthPicker.d.mts +28 -0
- package/dist/MonthPicker.d.ts +28 -0
- package/dist/MonthPicker.js +297 -0
- package/dist/MonthPicker.mjs +5 -0
- package/dist/PagerDots.d.mts +35 -0
- package/dist/PagerDots.d.ts +35 -0
- package/dist/PagerDots.js +392 -0
- package/dist/PagerDots.mjs +7 -0
- package/dist/Pressable.d.mts +34 -0
- package/dist/Pressable.d.ts +34 -0
- package/dist/Pressable.js +143 -0
- package/dist/Pressable.mjs +5 -0
- package/dist/PricingCard.d.mts +50 -0
- package/dist/PricingCard.d.ts +50 -0
- package/dist/PricingCard.js +636 -0
- package/dist/PricingCard.mjs +11 -0
- package/dist/Progress.d.mts +14 -0
- package/dist/Progress.d.ts +14 -0
- package/dist/Progress.js +191 -0
- package/dist/Progress.mjs +5 -0
- package/dist/RadioGroup.d.mts +19 -0
- package/dist/RadioGroup.d.ts +19 -0
- package/dist/RadioGroup.js +392 -0
- package/dist/RadioGroup.mjs +7 -0
- package/dist/RetrayProvider.d.mts +2 -0
- package/dist/RetrayProvider.d.ts +2 -0
- package/dist/RetrayProvider.js +214 -0
- package/dist/RetrayProvider.mjs +5 -0
- package/dist/Select.d.mts +22 -0
- package/dist/Select.d.ts +22 -0
- package/dist/Select.js +488 -0
- package/dist/Select.mjs +7 -0
- package/dist/SelectableGrid.d.mts +44 -0
- package/dist/SelectableGrid.d.ts +44 -0
- package/dist/SelectableGrid.js +448 -0
- package/dist/SelectableGrid.mjs +9 -0
- package/dist/Separator.d.mts +10 -0
- package/dist/Separator.d.ts +10 -0
- package/dist/Separator.js +156 -0
- package/dist/Separator.mjs +3 -0
- package/dist/Sheet.d.mts +93 -0
- package/dist/Sheet.d.ts +93 -0
- package/dist/Sheet.js +450 -0
- package/dist/Sheet.mjs +6 -0
- package/dist/Skeleton.d.mts +67 -0
- package/dist/Skeleton.d.ts +67 -0
- package/dist/Skeleton.js +266 -0
- package/dist/Skeleton.mjs +6 -0
- package/dist/Slider.d.mts +20 -0
- package/dist/Slider.d.ts +20 -0
- package/dist/Slider.js +279 -0
- package/dist/Slider.mjs +5 -0
- package/dist/Spinner.d.mts +12 -0
- package/dist/Spinner.d.ts +12 -0
- package/dist/Spinner.js +193 -0
- package/dist/Spinner.mjs +4 -0
- package/dist/Switch.d.mts +13 -0
- package/dist/Switch.d.ts +13 -0
- package/dist/Switch.js +311 -0
- package/dist/Switch.mjs +6 -0
- package/dist/TabBar.d.mts +42 -0
- package/dist/TabBar.d.ts +42 -0
- package/dist/TabBar.js +361 -0
- package/dist/TabBar.mjs +6 -0
- package/dist/Tabs.d.mts +27 -0
- package/dist/Tabs.d.ts +27 -0
- package/dist/Tabs.js +419 -0
- package/dist/Tabs.mjs +7 -0
- package/dist/Text.d.mts +12 -0
- package/dist/Text.d.ts +12 -0
- package/dist/Text.js +327 -0
- package/dist/Text.mjs +5 -0
- package/dist/Textarea.d.mts +16 -0
- package/dist/Textarea.d.ts +16 -0
- package/dist/Textarea.js +333 -0
- package/dist/Textarea.mjs +7 -0
- package/dist/Toast.d.mts +47 -0
- package/dist/Toast.d.ts +47 -0
- package/dist/Toast.js +185 -0
- package/dist/Toast.mjs +4 -0
- package/dist/Toggle.d.mts +36 -0
- package/dist/Toggle.d.ts +36 -0
- package/dist/Toggle.js +412 -0
- package/dist/Toggle.mjs +8 -0
- package/dist/VirtualList.d.mts +19 -0
- package/dist/VirtualList.d.ts +19 -0
- package/dist/VirtualList.js +38 -0
- package/dist/VirtualList.mjs +2 -0
- package/dist/chunk-26BCI223.mjs +14 -0
- package/dist/chunk-2CE3TQVY.mjs +11 -0
- package/dist/chunk-2TFTAWVJ.mjs +131 -0
- package/dist/chunk-2UYENBLV.mjs +49 -0
- package/dist/chunk-3BBOZ3OQ.mjs +41 -0
- package/dist/chunk-3DKJ2GIC.mjs +30 -0
- package/dist/chunk-3U4SSNWP.mjs +120 -0
- package/dist/chunk-4I7D47FH.mjs +139 -0
- package/dist/chunk-4K625MVM.mjs +142 -0
- package/dist/chunk-6OAZJ577.mjs +98 -0
- package/dist/chunk-6Q64UFIA.mjs +71 -0
- package/dist/chunk-756RAKE4.mjs +145 -0
- package/dist/chunk-7QHVVCB3.mjs +115 -0
- package/dist/chunk-A3A6KNQN.mjs +245 -0
- package/dist/chunk-A4MDAP7G.mjs +42 -0
- package/dist/chunk-AJ7ZDNBT.mjs +120 -0
- package/dist/chunk-AV4EMIRH.mjs +94 -0
- package/dist/chunk-AZJF2BLK.mjs +115 -0
- package/dist/chunk-BNP626TY.mjs +159 -0
- package/dist/chunk-BRKYVJVV.mjs +60 -0
- package/dist/chunk-DVK4G2GT.mjs +59 -0
- package/dist/chunk-EH745HE5.mjs +127 -0
- package/dist/chunk-EJ7ZPXOH.mjs +163 -0
- package/dist/chunk-GD6KXMG5.mjs +106 -0
- package/dist/chunk-GQYFLP3D.mjs +187 -0
- package/dist/chunk-ID72TK46.mjs +111 -0
- package/dist/chunk-IRRY3CRZ.mjs +82 -0
- package/dist/chunk-JB67UOB5.mjs +92 -0
- package/dist/chunk-JMOZEC77.mjs +90 -0
- package/dist/chunk-JT7HKXRB.mjs +114 -0
- package/dist/chunk-KIHCWCWL.mjs +124 -0
- package/dist/chunk-LXJIIOYQ.mjs +104 -0
- package/dist/chunk-M6ZXVBTK.mjs +64 -0
- package/dist/chunk-MAC465BB.mjs +61 -0
- package/dist/chunk-MBMXYJJV.mjs +36 -0
- package/dist/chunk-MLF3EZFW.mjs +119 -0
- package/dist/chunk-MX6HRKMI.mjs +29 -0
- package/dist/chunk-NA7PARID.mjs +147 -0
- package/dist/chunk-NC5ZTR2Y.mjs +32 -0
- package/dist/chunk-O3HA6TYM.mjs +139 -0
- package/dist/chunk-OB4JUQ3O.mjs +51 -0
- package/dist/chunk-PFZTM6D5.mjs +238 -0
- package/dist/chunk-QKH5ZOD5.mjs +97 -0
- package/dist/chunk-QY3X2UYR.mjs +191 -0
- package/dist/chunk-SOA2Z4RB.mjs +82 -0
- package/dist/chunk-SOYNZDVY.mjs +151 -0
- package/dist/chunk-T7XZ7H7Y.mjs +57 -0
- package/dist/chunk-TERDKCLE.mjs +74 -0
- package/dist/chunk-UREA2GYY.mjs +113 -0
- package/dist/chunk-VGTDN7SW.mjs +164 -0
- package/dist/chunk-VQ57HWPL.mjs +144 -0
- package/dist/chunk-WBOOUHSS.mjs +62 -0
- package/dist/chunk-WJLKJMKR.mjs +78 -0
- package/dist/chunk-X4G6APW6.mjs +134 -0
- package/dist/chunk-Y6FXYEAI.mjs +8 -0
- package/dist/chunk-YFZ3ELX5.mjs +16 -0
- package/dist/chunk-YNROWHQJ.mjs +46 -0
- package/dist/chunk-Z4BVUWW6.mjs +196 -0
- package/dist/chunk-ZJKGQMYH.mjs +131 -0
- package/dist/index-wt-orHUi.d.mts +85 -0
- package/dist/index-wt-orHUi.d.ts +85 -0
- package/dist/index.d.mts +149 -920
- package/dist/index.d.ts +149 -920
- package/dist/index.js +2560 -970
- package/dist/index.mjs +60 -3895
- package/package.json +55 -16
- package/src/assets/fonts/Sohne-Bold.otf +0 -0
- package/src/assets/fonts/Sohne-BoldItalic.otf +0 -0
- package/src/assets/fonts/Sohne-ExtraBold.otf +0 -0
- package/src/assets/fonts/Sohne-ExtraBoldItalic.otf +0 -0
- package/src/assets/fonts/Sohne-ExtraLight.otf +0 -0
- package/src/assets/fonts/Sohne-ExtraLightItalic.otf +0 -0
- package/src/assets/fonts/Sohne-Italic.otf +0 -0
- package/src/assets/fonts/Sohne-Light.otf +0 -0
- package/src/assets/fonts/Sohne-LightItalic.otf +0 -0
- package/src/assets/fonts/Sohne-Medium.otf +0 -0
- package/src/assets/fonts/Sohne-MediumItalic.otf +0 -0
- package/src/assets/fonts/Sohne-Regular.otf +0 -0
- package/src/assets/fonts/Sohne-SemiBold.otf +0 -0
- package/src/assets/fonts/Sohne-SemiBoldItalic.otf +0 -0
- package/src/assets/fonts/SohneMono-Bold.otf +0 -0
- package/src/assets/fonts/SohneMono-BoldItalic.otf +0 -0
- package/src/assets/fonts/SohneMono-ExtraBold.otf +0 -0
- package/src/assets/fonts/SohneMono-ExtraBoldItalic.otf +0 -0
- package/src/assets/fonts/SohneMono-ExtraLight.otf +0 -0
- package/src/assets/fonts/SohneMono-ExtraLightItalic.otf +0 -0
- package/src/assets/fonts/SohneMono-Italic.otf +0 -0
- package/src/assets/fonts/SohneMono-Light.otf +0 -0
- package/src/assets/fonts/SohneMono-LightItalic.otf +0 -0
- package/src/assets/fonts/SohneMono-Medium.otf +0 -0
- package/src/assets/fonts/SohneMono-MediumItalic.otf +0 -0
- package/src/assets/fonts/SohneMono-Regular.otf +0 -0
- package/src/assets/fonts/SohneMono-SemiBold.otf +0 -0
- package/src/assets/fonts/SohneMono-SemiBoldItalic.otf +0 -0
- package/src/components/Accordion/Accordion.tsx +15 -4
- package/src/components/AlertBanner/AlertBanner.tsx +38 -12
- package/src/components/AppHeader/AppHeader.tsx +172 -0
- package/src/components/AppHeader/index.ts +1 -0
- package/src/components/Avatar/Avatar.tsx +14 -4
- package/src/components/Badge/Badge.tsx +12 -3
- package/src/components/Button/Button.tsx +30 -38
- package/src/components/ButtonGroup/ButtonGroup.tsx +13 -10
- package/src/components/Card/Card.tsx +29 -57
- package/src/components/CategoryStrip/CategoryStrip.tsx +41 -42
- package/src/components/Checkbox/Checkbox.tsx +36 -45
- package/src/components/Chip/Chip.tsx +41 -48
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +2 -2
- package/src/components/CurrencyDisplay/CurrencyDisplay.tsx +4 -2
- package/src/components/CurrencyInput/CurrencyInput.tsx +12 -10
- package/src/components/DetailRow/DetailRow.tsx +9 -7
- package/src/components/EmptyState/EmptyState.tsx +4 -3
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +153 -0
- package/src/components/ErrorBoundary/index.ts +1 -0
- package/src/components/Form/Form.tsx +149 -0
- package/src/components/Form/index.ts +1 -0
- package/src/components/HolographicCard/HolographicCard.tsx +315 -0
- package/src/components/HolographicCard/index.ts +1 -0
- package/src/components/IconButton/IconButton.tsx +23 -29
- package/src/components/ImageViewer/ImageViewer.tsx +290 -0
- package/src/components/ImageViewer/index.ts +1 -0
- package/src/components/Input/Input.tsx +27 -31
- package/src/components/LabelValue/LabelValue.tsx +6 -4
- package/src/components/ListGroup/ListGroup.tsx +145 -0
- package/src/components/ListGroup/index.ts +1 -0
- package/src/components/ListItem/ListItem.tsx +78 -76
- package/src/components/MediaCard/MediaCard.tsx +15 -7
- package/src/components/MenuGroup/MenuGroup.tsx +145 -0
- package/src/components/MenuGroup/index.ts +1 -0
- package/src/components/MenuItem/MenuItem.tsx +16 -33
- package/src/components/MonthPicker/MonthPicker.tsx +41 -15
- package/src/components/MonthPicker/index.ts +1 -1
- package/src/components/PagerDots/PagerDots.tsx +200 -0
- package/src/components/PagerDots/index.ts +1 -0
- package/src/components/Pressable/Pressable.tsx +19 -35
- package/src/components/PricingCard/PricingCard.tsx +220 -0
- package/src/components/PricingCard/index.ts +1 -0
- package/src/components/RadioGroup/RadioGroup.tsx +23 -39
- package/src/components/RetrayProvider/RetrayProvider.tsx +59 -0
- package/src/components/RetrayProvider/index.ts +1 -0
- package/src/components/Select/Select.tsx +6 -6
- package/src/components/SelectableGrid/SelectableGrid.tsx +205 -0
- package/src/components/SelectableGrid/index.ts +1 -0
- package/src/components/Separator/Separator.tsx +1 -3
- package/src/components/Sheet/Sheet.tsx +146 -18
- package/src/components/Skeleton/Skeleton.tsx +143 -2
- package/src/components/Slider/Slider.tsx +2 -2
- package/src/components/Spinner/Spinner.tsx +18 -3
- package/src/components/Switch/Switch.tsx +44 -49
- package/src/components/TabBar/TabBar.tsx +169 -0
- package/src/components/TabBar/index.ts +1 -0
- package/src/components/Tabs/Tabs.tsx +45 -44
- package/src/components/Text/Text.tsx +5 -1
- package/src/components/Textarea/Textarea.tsx +18 -14
- package/src/components/Toast/Toast.tsx +6 -6
- package/src/components/Toggle/Toggle.tsx +80 -72
- package/src/components/VirtualList/VirtualList.tsx +60 -0
- package/src/components/VirtualList/index.ts +1 -0
- package/src/fonts.ts +41 -20
- package/src/index.ts +28 -3
- package/src/theme/colors.ts +53 -39
- package/src/theme/types.ts +3 -0
- package/src/tokens.ts +49 -39
- package/src/utils/animations.ts +29 -1
- package/src/utils/fontGuard.ts +34 -0
- package/src/utils/haptics.ts +211 -9
- package/src/utils/icons.ts +47 -20
- package/src/utils/pressable.ts +66 -0
- package/src/utils/usePressScale.ts +2 -0
- package/src/assets/fonts/Poppins-Black.ttf +0 -0
- package/src/assets/fonts/Poppins-BlackItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Bold.ttf +0 -0
- package/src/assets/fonts/Poppins-BoldItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraBoldItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraLight.ttf +0 -0
- package/src/assets/fonts/Poppins-ExtraLightItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Italic.ttf +0 -0
- package/src/assets/fonts/Poppins-Light.ttf +0 -0
- package/src/assets/fonts/Poppins-LightItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Medium.ttf +0 -0
- package/src/assets/fonts/Poppins-MediumItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Regular.ttf +0 -0
- package/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/src/assets/fonts/Poppins-SemiBoldItalic.ttf +0 -0
- package/src/assets/fonts/Poppins-Thin.ttf +0 -0
- package/src/assets/fonts/Poppins-ThinItalic.ttf +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { PressableButton } from './chunk-3DKJ2GIC.mjs';
|
|
2
|
+
import { impactMedium } from './chunk-EJ7ZPXOH.mjs';
|
|
3
|
+
import { TYPOGRAPHY, RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
4
|
+
import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
|
|
5
|
+
import { useTheme } from './chunk-SOYNZDVY.mjs';
|
|
6
|
+
import { vs, s, mvs, ms } from './chunk-2CE3TQVY.mjs';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { StyleSheet, View, ActivityIndicator, Text } from 'react-native';
|
|
9
|
+
|
|
10
|
+
var containerSizeStyles = {
|
|
11
|
+
// AUDIT FIX: sm was 40pt — below Apple HIG 44pt minimum touch target.
|
|
12
|
+
sm: { paddingHorizontal: s(16), paddingVertical: vs(12), minHeight: 44 },
|
|
13
|
+
md: { paddingHorizontal: s(24), paddingVertical: vs(14), minHeight: 48 },
|
|
14
|
+
lg: { paddingHorizontal: s(28), paddingVertical: vs(16), minHeight: 56 }
|
|
15
|
+
};
|
|
16
|
+
var labelSizeStyles = {
|
|
17
|
+
sm: { ...TYPOGRAPHY["button-sm"], fontSize: ms(TYPOGRAPHY["button-sm"].fontSize) },
|
|
18
|
+
md: { ...TYPOGRAPHY["button-lg"], fontSize: ms(TYPOGRAPHY["button-lg"].fontSize) },
|
|
19
|
+
lg: { ...TYPOGRAPHY["button-lg"], fontSize: ms(TYPOGRAPHY["button-lg"].fontSize + 1), lineHeight: mvs(24) }
|
|
20
|
+
};
|
|
21
|
+
var iconSizeMap = { sm: 16, md: 18, lg: 20 };
|
|
22
|
+
function ButtonBase({
|
|
23
|
+
label,
|
|
24
|
+
variant = "primary",
|
|
25
|
+
size = "md",
|
|
26
|
+
loading = false,
|
|
27
|
+
fullWidth = false,
|
|
28
|
+
icon,
|
|
29
|
+
iconName,
|
|
30
|
+
iconColor,
|
|
31
|
+
iconPosition = "left",
|
|
32
|
+
disabled,
|
|
33
|
+
style,
|
|
34
|
+
onPress,
|
|
35
|
+
accessibilityLabel,
|
|
36
|
+
accessibilityHint
|
|
37
|
+
}) {
|
|
38
|
+
const { colors } = useTheme();
|
|
39
|
+
const isDisabled = disabled || loading;
|
|
40
|
+
const handlePress = () => {
|
|
41
|
+
impactMedium();
|
|
42
|
+
onPress?.();
|
|
43
|
+
};
|
|
44
|
+
const containerVariantStyle = {
|
|
45
|
+
primary: { backgroundColor: colors.primary },
|
|
46
|
+
secondary: { backgroundColor: "transparent", borderWidth: 1.5, borderColor: colors.primary },
|
|
47
|
+
text: { backgroundColor: "transparent" },
|
|
48
|
+
destructive: { backgroundColor: colors.destructive }
|
|
49
|
+
}[variant];
|
|
50
|
+
const labelVariantStyle = {
|
|
51
|
+
primary: { color: colors.primaryForeground },
|
|
52
|
+
secondary: { color: colors.primary },
|
|
53
|
+
// AUDIT FIX: was colors.foreground — visually indistinguishable from plain text,
|
|
54
|
+
// no affordance that it's a CTA. Now uses accentResolved so text-only buttons
|
|
55
|
+
// carry the brand voltage. Falls back to primary when no accent is defined.
|
|
56
|
+
text: { color: colors.accentResolved },
|
|
57
|
+
destructive: { color: colors.destructiveForeground }
|
|
58
|
+
}[variant];
|
|
59
|
+
const textColor = iconColor ?? labelVariantStyle.color;
|
|
60
|
+
const effectiveIcon = iconName ? renderIcon(iconName, iconSizeMap[size], textColor) : typeof icon === "function" ? icon({ label, size, variant, color: textColor }) : icon;
|
|
61
|
+
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.accentResolved;
|
|
62
|
+
const styleArray = Array.isArray(style) ? style : style ? [style] : [];
|
|
63
|
+
const flatStyle = StyleSheet.flatten(styleArray);
|
|
64
|
+
const { flex, ...restStyle } = flatStyle || {};
|
|
65
|
+
return /* @__PURE__ */ React.createElement(View, { style: [fullWidth && styles.fullWidth, flex !== void 0 && { flex }] }, /* @__PURE__ */ React.createElement(
|
|
66
|
+
PressableButton,
|
|
67
|
+
{
|
|
68
|
+
style: [
|
|
69
|
+
styles.base,
|
|
70
|
+
containerVariantStyle,
|
|
71
|
+
containerSizeStyles[size],
|
|
72
|
+
fullWidth && styles.fullWidth,
|
|
73
|
+
isDisabled && styles.disabled,
|
|
74
|
+
restStyle
|
|
75
|
+
],
|
|
76
|
+
enabled: !isDisabled,
|
|
77
|
+
onPress: handlePress,
|
|
78
|
+
rippleColor: "transparent",
|
|
79
|
+
touchSoundDisabled: true,
|
|
80
|
+
activateOnHover: true,
|
|
81
|
+
accessibilityRole: "button",
|
|
82
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
83
|
+
accessibilityHint,
|
|
84
|
+
accessibilityState: { disabled: isDisabled, busy: loading }
|
|
85
|
+
},
|
|
86
|
+
loading ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ActivityIndicator, { size: "small", color: spinnerColor, style: { marginRight: s(6) } }), /* @__PURE__ */ React.createElement(
|
|
87
|
+
Text,
|
|
88
|
+
{
|
|
89
|
+
style: [styles.label, labelVariantStyle, labelSizeStyles[size], styles.labelLoading],
|
|
90
|
+
allowFontScaling: true,
|
|
91
|
+
numberOfLines: 1
|
|
92
|
+
},
|
|
93
|
+
label
|
|
94
|
+
)) : /* @__PURE__ */ React.createElement(React.Fragment, null, effectiveIcon && iconPosition === "left" && /* @__PURE__ */ React.createElement(React.Fragment, null, effectiveIcon), /* @__PURE__ */ React.createElement(
|
|
95
|
+
Text,
|
|
96
|
+
{
|
|
97
|
+
style: [styles.label, labelVariantStyle, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0],
|
|
98
|
+
allowFontScaling: true,
|
|
99
|
+
numberOfLines: 1
|
|
100
|
+
},
|
|
101
|
+
label
|
|
102
|
+
), effectiveIcon && iconPosition === "right" && /* @__PURE__ */ React.createElement(React.Fragment, null, effectiveIcon))
|
|
103
|
+
));
|
|
104
|
+
}
|
|
105
|
+
var Button = React.memo(ButtonBase);
|
|
106
|
+
var styles = StyleSheet.create({
|
|
107
|
+
base: {
|
|
108
|
+
borderRadius: RADIUS.md,
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
justifyContent: "center",
|
|
111
|
+
flexDirection: "row"
|
|
112
|
+
},
|
|
113
|
+
fullWidth: {
|
|
114
|
+
width: "100%"
|
|
115
|
+
},
|
|
116
|
+
disabled: {
|
|
117
|
+
opacity: 0.45
|
|
118
|
+
},
|
|
119
|
+
label: {
|
|
120
|
+
fontFamily: "Sohne-Medium",
|
|
121
|
+
flexShrink: 1
|
|
122
|
+
},
|
|
123
|
+
labelWithIcon: {
|
|
124
|
+
marginHorizontal: s(6)
|
|
125
|
+
},
|
|
126
|
+
labelLoading: {
|
|
127
|
+
opacity: 0.6
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
export { Button };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useTheme } from './chunk-SOYNZDVY.mjs';
|
|
2
|
+
import { ms, vs, s } from './chunk-2CE3TQVY.mjs';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { toast, Toaster } from 'sonner-native';
|
|
5
|
+
export { toast as sonnerToast } from 'sonner-native';
|
|
6
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
|
+
|
|
8
|
+
function useToast() {
|
|
9
|
+
return {
|
|
10
|
+
toast: toast,
|
|
11
|
+
dismiss: toast.dismiss
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function ToastProvider({ children }) {
|
|
15
|
+
const { colorScheme } = useTheme();
|
|
16
|
+
const insets = useSafeAreaInsets();
|
|
17
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children, /* @__PURE__ */ React.createElement(
|
|
18
|
+
Toaster,
|
|
19
|
+
{
|
|
20
|
+
theme: colorScheme,
|
|
21
|
+
position: "top-center",
|
|
22
|
+
richColors: true,
|
|
23
|
+
gap: vs(8),
|
|
24
|
+
offset: insets.top + vs(8),
|
|
25
|
+
visibleToasts: 3,
|
|
26
|
+
closeButton: false,
|
|
27
|
+
swipeToDismissDirection: "up",
|
|
28
|
+
duration: 4e3,
|
|
29
|
+
toastOptions: {
|
|
30
|
+
style: {
|
|
31
|
+
borderRadius: ms(12),
|
|
32
|
+
paddingHorizontal: s(12),
|
|
33
|
+
paddingVertical: vs(10)
|
|
34
|
+
},
|
|
35
|
+
titleStyle: {
|
|
36
|
+
fontFamily: "Sohne-Medium",
|
|
37
|
+
fontSize: ms(13)
|
|
38
|
+
},
|
|
39
|
+
descriptionStyle: {
|
|
40
|
+
fontFamily: "Sohne-Regular",
|
|
41
|
+
fontSize: ms(12),
|
|
42
|
+
opacity: 0.85
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { ToastProvider, useToast };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { s } from './chunk-2CE3TQVY.mjs';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
|
|
5
|
+
function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
6
|
+
return /* @__PURE__ */ React.createElement(
|
|
7
|
+
View,
|
|
8
|
+
{
|
|
9
|
+
style: [
|
|
10
|
+
styles.container,
|
|
11
|
+
vertical ? styles.vertical : styles.horizontal,
|
|
12
|
+
{ gap: s(gap) },
|
|
13
|
+
style
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
React.Children.map(children, (child) => {
|
|
17
|
+
if (!React.isValidElement(child)) return child;
|
|
18
|
+
const childProps = child.props;
|
|
19
|
+
const extraProps = {
|
|
20
|
+
style: [child.props.style, { flex: 1 }]
|
|
21
|
+
};
|
|
22
|
+
if (!vertical && "label" in childProps && childProps["size"] === void 0) {
|
|
23
|
+
extraProps["size"] = "sm";
|
|
24
|
+
}
|
|
25
|
+
return React.cloneElement(child, extraProps);
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
var styles = StyleSheet.create({
|
|
30
|
+
container: {
|
|
31
|
+
width: "100%"
|
|
32
|
+
},
|
|
33
|
+
horizontal: {
|
|
34
|
+
flexDirection: "row"
|
|
35
|
+
},
|
|
36
|
+
vertical: {
|
|
37
|
+
flexDirection: "column"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export { ButtonGroup };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PRESS_SCALE } from './chunk-DVK4G2GT.mjs';
|
|
2
|
+
import { createAnimatedPressable } from 'pressto';
|
|
3
|
+
|
|
4
|
+
var PressableButton = createAnimatedPressable((progress) => {
|
|
5
|
+
"worklet";
|
|
6
|
+
const scale = 1 - (1 - PRESS_SCALE.button) * progress;
|
|
7
|
+
return { transform: [{ scale }] };
|
|
8
|
+
});
|
|
9
|
+
var PressableCard = createAnimatedPressable((progress) => {
|
|
10
|
+
"worklet";
|
|
11
|
+
const scale = 1 - (1 - PRESS_SCALE.card) * progress;
|
|
12
|
+
return { transform: [{ scale }] };
|
|
13
|
+
});
|
|
14
|
+
var PressableRow = createAnimatedPressable((progress) => {
|
|
15
|
+
"worklet";
|
|
16
|
+
const scale = 1 - (1 - PRESS_SCALE.row) * progress;
|
|
17
|
+
return { transform: [{ scale }] };
|
|
18
|
+
});
|
|
19
|
+
var PressableChip = createAnimatedPressable((progress) => {
|
|
20
|
+
"worklet";
|
|
21
|
+
const scale = 1 - (1 - PRESS_SCALE.chip) * progress;
|
|
22
|
+
return { transform: [{ scale }] };
|
|
23
|
+
});
|
|
24
|
+
var PressableTab = createAnimatedPressable((progress) => {
|
|
25
|
+
"worklet";
|
|
26
|
+
const scale = 1 - (1 - PRESS_SCALE.button) * progress;
|
|
27
|
+
return { transform: [{ scale }] };
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export { PressableButton, PressableCard, PressableChip, PressableRow, PressableTab };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { PressableButton } from './chunk-3DKJ2GIC.mjs';
|
|
2
|
+
import { impactLight } from './chunk-EJ7ZPXOH.mjs';
|
|
3
|
+
import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
|
|
4
|
+
import { useTheme } from './chunk-SOYNZDVY.mjs';
|
|
5
|
+
import { s, ms } from './chunk-2CE3TQVY.mjs';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { StyleSheet, View, ActivityIndicator, Text } from 'react-native';
|
|
8
|
+
|
|
9
|
+
var sizeMap = {
|
|
10
|
+
// AUDIT FIX: sm was 32pt — below Apple HIG 44pt minimum touch target.
|
|
11
|
+
sm: { container: s(44), icon: 18 },
|
|
12
|
+
md: { container: s(44), icon: 20 },
|
|
13
|
+
lg: { container: s(52), icon: 24 }
|
|
14
|
+
};
|
|
15
|
+
function IconButtonBase({
|
|
16
|
+
iconName,
|
|
17
|
+
icon,
|
|
18
|
+
iconColor,
|
|
19
|
+
variant = "primary",
|
|
20
|
+
size = "md",
|
|
21
|
+
loading = false,
|
|
22
|
+
badge,
|
|
23
|
+
disabled,
|
|
24
|
+
style,
|
|
25
|
+
onPress,
|
|
26
|
+
accessibilityLabel,
|
|
27
|
+
accessibilityHint
|
|
28
|
+
}) {
|
|
29
|
+
const { colors } = useTheme();
|
|
30
|
+
const isDisabled = disabled || loading;
|
|
31
|
+
const handlePress = () => {
|
|
32
|
+
impactLight();
|
|
33
|
+
onPress?.();
|
|
34
|
+
};
|
|
35
|
+
const containerVariantStyle = {
|
|
36
|
+
primary: { backgroundColor: colors.primary },
|
|
37
|
+
secondary: { backgroundColor: colors.surface },
|
|
38
|
+
outline: { backgroundColor: "transparent", borderWidth: 1.5, borderColor: colors.border },
|
|
39
|
+
text: { backgroundColor: "transparent" },
|
|
40
|
+
destructive: { backgroundColor: colors.destructive }
|
|
41
|
+
}[variant];
|
|
42
|
+
const defaultIconColor = {
|
|
43
|
+
primary: colors.primaryForeground,
|
|
44
|
+
secondary: colors.foreground,
|
|
45
|
+
outline: colors.foreground,
|
|
46
|
+
text: colors.foreground,
|
|
47
|
+
destructive: colors.destructiveForeground
|
|
48
|
+
}[variant];
|
|
49
|
+
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.foreground;
|
|
50
|
+
const { container: containerSize, icon: iconSize } = sizeMap[size];
|
|
51
|
+
const resolvedIcon = iconName ? renderIcon(iconName, iconSize, iconColor ?? defaultIconColor) : icon;
|
|
52
|
+
const showBadge = badge !== void 0 && badge !== false && badge !== 0;
|
|
53
|
+
const badgeCount = typeof badge === "number" ? Math.min(badge, 99) : null;
|
|
54
|
+
const showCount = typeof badge === "number" && badge > 0;
|
|
55
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles.wrapper }, /* @__PURE__ */ React.createElement(
|
|
56
|
+
PressableButton,
|
|
57
|
+
{
|
|
58
|
+
style: [
|
|
59
|
+
styles.base,
|
|
60
|
+
containerVariantStyle,
|
|
61
|
+
{ width: containerSize, height: containerSize },
|
|
62
|
+
isDisabled && styles.disabled,
|
|
63
|
+
style
|
|
64
|
+
],
|
|
65
|
+
enabled: !isDisabled,
|
|
66
|
+
onPress: handlePress,
|
|
67
|
+
rippleColor: "transparent",
|
|
68
|
+
touchSoundDisabled: true,
|
|
69
|
+
activateOnHover: true,
|
|
70
|
+
accessibilityRole: "button",
|
|
71
|
+
accessibilityLabel: accessibilityLabel ?? iconName ?? "icon button",
|
|
72
|
+
accessibilityHint,
|
|
73
|
+
accessibilityState: { disabled: isDisabled, busy: loading }
|
|
74
|
+
},
|
|
75
|
+
loading ? /* @__PURE__ */ React.createElement(ActivityIndicator, { size: "small", color: spinnerColor }) : resolvedIcon
|
|
76
|
+
), showBadge && /* @__PURE__ */ React.createElement(View, { style: [
|
|
77
|
+
styles.badge,
|
|
78
|
+
{ backgroundColor: colors.primary },
|
|
79
|
+
showCount ? styles.badgeCount : styles.badgeDot
|
|
80
|
+
] }, showCount && /* @__PURE__ */ React.createElement(Text, { style: [styles.badgeText, { color: colors.primaryForeground }] }, badgeCount)));
|
|
81
|
+
}
|
|
82
|
+
var IconButton = React.memo(IconButtonBase);
|
|
83
|
+
var styles = StyleSheet.create({
|
|
84
|
+
wrapper: {
|
|
85
|
+
alignSelf: "flex-start"
|
|
86
|
+
},
|
|
87
|
+
base: {
|
|
88
|
+
borderRadius: 9999,
|
|
89
|
+
alignItems: "center",
|
|
90
|
+
justifyContent: "center"
|
|
91
|
+
},
|
|
92
|
+
disabled: {
|
|
93
|
+
opacity: 0.45
|
|
94
|
+
},
|
|
95
|
+
badge: {
|
|
96
|
+
position: "absolute",
|
|
97
|
+
top: -2,
|
|
98
|
+
right: -2,
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
justifyContent: "center"
|
|
101
|
+
},
|
|
102
|
+
badgeDot: {
|
|
103
|
+
width: 8,
|
|
104
|
+
height: 8,
|
|
105
|
+
borderRadius: 9999
|
|
106
|
+
},
|
|
107
|
+
badgeCount: {
|
|
108
|
+
minWidth: 16,
|
|
109
|
+
height: 16,
|
|
110
|
+
borderRadius: 9999,
|
|
111
|
+
paddingHorizontal: 3
|
|
112
|
+
},
|
|
113
|
+
badgeText: {
|
|
114
|
+
fontFamily: "Sohne-Bold",
|
|
115
|
+
fontSize: ms(9),
|
|
116
|
+
lineHeight: 14
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
export { IconButton };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Badge } from './chunk-TERDKCLE.mjs';
|
|
2
|
+
import { Button } from './chunk-2TFTAWVJ.mjs';
|
|
3
|
+
import { RADIUS, SHADOWS } from './chunk-QY3X2UYR.mjs';
|
|
4
|
+
import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
|
|
5
|
+
import { useTheme } from './chunk-SOYNZDVY.mjs';
|
|
6
|
+
import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { StyleSheet, View, Text } from 'react-native';
|
|
9
|
+
|
|
10
|
+
var normalize = (f) => typeof f === "string" ? { label: f, included: true } : { included: true, ...f };
|
|
11
|
+
function PricingCard({
|
|
12
|
+
name,
|
|
13
|
+
price,
|
|
14
|
+
period,
|
|
15
|
+
description,
|
|
16
|
+
features = [],
|
|
17
|
+
ctaLabel,
|
|
18
|
+
onCtaPress,
|
|
19
|
+
badge,
|
|
20
|
+
highlighted = false,
|
|
21
|
+
footnote,
|
|
22
|
+
style
|
|
23
|
+
}) {
|
|
24
|
+
const { colors } = useTheme();
|
|
25
|
+
return /* @__PURE__ */ React.createElement(
|
|
26
|
+
View,
|
|
27
|
+
{
|
|
28
|
+
style: [
|
|
29
|
+
styles.card,
|
|
30
|
+
{
|
|
31
|
+
backgroundColor: colors.card,
|
|
32
|
+
borderColor: highlighted ? colors.primary : colors.border,
|
|
33
|
+
borderWidth: highlighted ? 2 : StyleSheet.hairlineWidth
|
|
34
|
+
},
|
|
35
|
+
highlighted && SHADOWS.md,
|
|
36
|
+
style
|
|
37
|
+
],
|
|
38
|
+
accessibilityRole: "summary"
|
|
39
|
+
},
|
|
40
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.header }, /* @__PURE__ */ React.createElement(Text, { style: [styles.name, { color: colors.foreground }], allowFontScaling: true }, name), badge ? /* @__PURE__ */ React.createElement(Badge, { label: badge, variant: highlighted ? "default" : "secondary", size: "sm" }) : null),
|
|
41
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.priceRow }, /* @__PURE__ */ React.createElement(Text, { style: [styles.price, { color: colors.foreground }], allowFontScaling: true }, price), period ? /* @__PURE__ */ React.createElement(Text, { style: [styles.period, { color: colors.foregroundMuted }], allowFontScaling: true }, period) : null),
|
|
42
|
+
description ? /* @__PURE__ */ React.createElement(Text, { style: [styles.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null,
|
|
43
|
+
features.length > 0 ? /* @__PURE__ */ React.createElement(View, { style: styles.features }, features.map(normalize).map((f, i) => /* @__PURE__ */ React.createElement(View, { key: i, style: styles.featureRow }, renderIcon(
|
|
44
|
+
f.included ? "check" : "minus",
|
|
45
|
+
ms(16),
|
|
46
|
+
f.included ? colors.success : colors.foregroundMuted
|
|
47
|
+
), /* @__PURE__ */ React.createElement(
|
|
48
|
+
Text,
|
|
49
|
+
{
|
|
50
|
+
style: [
|
|
51
|
+
styles.featureLabel,
|
|
52
|
+
{ color: f.included ? colors.foreground : colors.foregroundMuted },
|
|
53
|
+
!f.included && styles.featureExcluded
|
|
54
|
+
],
|
|
55
|
+
allowFontScaling: true
|
|
56
|
+
},
|
|
57
|
+
f.label
|
|
58
|
+
)))) : null,
|
|
59
|
+
ctaLabel ? /* @__PURE__ */ React.createElement(
|
|
60
|
+
Button,
|
|
61
|
+
{
|
|
62
|
+
label: ctaLabel,
|
|
63
|
+
variant: highlighted ? "primary" : "secondary",
|
|
64
|
+
fullWidth: true,
|
|
65
|
+
onPress: onCtaPress,
|
|
66
|
+
style: styles.cta
|
|
67
|
+
}
|
|
68
|
+
) : null,
|
|
69
|
+
footnote ? /* @__PURE__ */ React.createElement(Text, { style: [styles.footnote, { color: colors.foregroundMuted }], allowFontScaling: true }, footnote) : null
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
var styles = StyleSheet.create({
|
|
73
|
+
card: {
|
|
74
|
+
borderRadius: RADIUS.md,
|
|
75
|
+
padding: s(16),
|
|
76
|
+
gap: vs(8)
|
|
77
|
+
},
|
|
78
|
+
header: {
|
|
79
|
+
flexDirection: "row",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
justifyContent: "space-between",
|
|
82
|
+
gap: s(8)
|
|
83
|
+
},
|
|
84
|
+
name: {
|
|
85
|
+
fontFamily: "Sohne-SemiBold",
|
|
86
|
+
fontSize: ms(16),
|
|
87
|
+
lineHeight: mvs(20)
|
|
88
|
+
},
|
|
89
|
+
priceRow: {
|
|
90
|
+
flexDirection: "row",
|
|
91
|
+
alignItems: "baseline",
|
|
92
|
+
gap: s(3)
|
|
93
|
+
},
|
|
94
|
+
price: {
|
|
95
|
+
fontFamily: "Sohne-Bold",
|
|
96
|
+
fontSize: ms(28),
|
|
97
|
+
lineHeight: mvs(32),
|
|
98
|
+
letterSpacing: -0.5
|
|
99
|
+
},
|
|
100
|
+
period: {
|
|
101
|
+
fontFamily: "Sohne-Regular",
|
|
102
|
+
fontSize: ms(13),
|
|
103
|
+
lineHeight: mvs(16)
|
|
104
|
+
},
|
|
105
|
+
description: {
|
|
106
|
+
fontFamily: "Sohne-Regular",
|
|
107
|
+
fontSize: ms(13),
|
|
108
|
+
lineHeight: mvs(18)
|
|
109
|
+
},
|
|
110
|
+
features: {
|
|
111
|
+
gap: vs(6),
|
|
112
|
+
marginTop: vs(2)
|
|
113
|
+
},
|
|
114
|
+
featureRow: {
|
|
115
|
+
flexDirection: "row",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
gap: s(6)
|
|
118
|
+
},
|
|
119
|
+
featureLabel: {
|
|
120
|
+
flex: 1,
|
|
121
|
+
fontFamily: "Sohne-Regular",
|
|
122
|
+
fontSize: ms(13),
|
|
123
|
+
lineHeight: mvs(18)
|
|
124
|
+
},
|
|
125
|
+
featureExcluded: {
|
|
126
|
+
textDecorationLine: "line-through"
|
|
127
|
+
},
|
|
128
|
+
cta: {
|
|
129
|
+
marginTop: vs(2)
|
|
130
|
+
},
|
|
131
|
+
footnote: {
|
|
132
|
+
fontFamily: "Sohne-Regular",
|
|
133
|
+
fontSize: ms(11),
|
|
134
|
+
lineHeight: mvs(14),
|
|
135
|
+
textAlign: "center"
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export { PricingCard };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
2
|
+
import { SPRINGS } from './chunk-DVK4G2GT.mjs';
|
|
3
|
+
import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
|
|
4
|
+
import { useTheme } from './chunk-SOYNZDVY.mjs';
|
|
5
|
+
import { s } from './chunk-2CE3TQVY.mjs';
|
|
6
|
+
import React, { useEffect } from 'react';
|
|
7
|
+
import { StyleSheet, View, TouchableOpacity } from 'react-native';
|
|
8
|
+
import Animated, { useSharedValue, withSpring, useAnimatedStyle, interpolateColor } from 'react-native-reanimated';
|
|
9
|
+
|
|
10
|
+
function Dot({ active, size, activeColor, inactiveColor, onPress, index, total }) {
|
|
11
|
+
const progress = useSharedValue(active ? 1 : 0);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
progress.value = withSpring(active ? 1 : 0, SPRINGS.glide);
|
|
14
|
+
}, [active, progress]);
|
|
15
|
+
const animatedStyle = useAnimatedStyle(() => ({
|
|
16
|
+
width: size + progress.value * size * 1.5,
|
|
17
|
+
backgroundColor: interpolateColor(progress.value, [0, 1], [inactiveColor, activeColor])
|
|
18
|
+
}));
|
|
19
|
+
const dot = /* @__PURE__ */ React.createElement(Animated.View, { style: [{ height: size, borderRadius: size / 2 }, animatedStyle] });
|
|
20
|
+
if (!onPress) return dot;
|
|
21
|
+
const handlePress = () => {
|
|
22
|
+
selectionAsync();
|
|
23
|
+
onPress();
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ React.createElement(
|
|
26
|
+
TouchableOpacity,
|
|
27
|
+
{
|
|
28
|
+
onPress: handlePress,
|
|
29
|
+
activeOpacity: 0.7,
|
|
30
|
+
touchSoundDisabled: true,
|
|
31
|
+
accessibilityRole: "button",
|
|
32
|
+
accessibilityLabel: `Page ${index + 1} of ${total}${active ? ", current page" : ""}`,
|
|
33
|
+
hitSlop: { top: 8, bottom: 8, left: 4, right: 4 }
|
|
34
|
+
},
|
|
35
|
+
dot
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function PagerDots({
|
|
39
|
+
count,
|
|
40
|
+
activeIndex,
|
|
41
|
+
onDotPress,
|
|
42
|
+
showControls = false,
|
|
43
|
+
dotSize = 8,
|
|
44
|
+
spacing = 8,
|
|
45
|
+
activeColor,
|
|
46
|
+
inactiveColor,
|
|
47
|
+
style
|
|
48
|
+
}) {
|
|
49
|
+
const { colors } = useTheme();
|
|
50
|
+
const resolvedActive = activeColor ?? colors.primary;
|
|
51
|
+
const resolvedInactive = inactiveColor ?? colors.border;
|
|
52
|
+
const size = s(dotSize);
|
|
53
|
+
const hasControls = showControls !== false;
|
|
54
|
+
const canGoPrev = activeIndex > 0;
|
|
55
|
+
const canGoNext = activeIndex < count - 1;
|
|
56
|
+
const handlePrevious = () => {
|
|
57
|
+
if (!canGoPrev) return;
|
|
58
|
+
selectionAsync();
|
|
59
|
+
if (typeof showControls === "object" && showControls.onPrevious) {
|
|
60
|
+
showControls.onPrevious();
|
|
61
|
+
} else if (onDotPress) {
|
|
62
|
+
onDotPress(activeIndex - 1);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const handleNext = () => {
|
|
66
|
+
if (!canGoNext) return;
|
|
67
|
+
selectionAsync();
|
|
68
|
+
if (typeof showControls === "object" && showControls.onNext) {
|
|
69
|
+
showControls.onNext();
|
|
70
|
+
} else if (onDotPress) {
|
|
71
|
+
onDotPress(activeIndex + 1);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ React.createElement(
|
|
75
|
+
View,
|
|
76
|
+
{
|
|
77
|
+
style: [styles.container, { gap: s(spacing) }, style],
|
|
78
|
+
accessibilityRole: "adjustable",
|
|
79
|
+
accessibilityLabel: `Page ${activeIndex + 1} of ${count}`
|
|
80
|
+
},
|
|
81
|
+
hasControls && /* @__PURE__ */ React.createElement(
|
|
82
|
+
TouchableOpacity,
|
|
83
|
+
{
|
|
84
|
+
onPress: handlePrevious,
|
|
85
|
+
disabled: !canGoPrev,
|
|
86
|
+
activeOpacity: 0.7,
|
|
87
|
+
touchSoundDisabled: true,
|
|
88
|
+
accessibilityRole: "button",
|
|
89
|
+
accessibilityLabel: "Previous page",
|
|
90
|
+
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 },
|
|
91
|
+
style: [styles.controlBtn, !canGoPrev && styles.controlBtnDisabled]
|
|
92
|
+
},
|
|
93
|
+
renderIcon("chevron-left", s(18), canGoPrev ? colors.foreground : colors.foregroundMuted)
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles.dotsRow, { gap: s(spacing) }] }, Array.from({ length: count }).map((_, i) => /* @__PURE__ */ React.createElement(
|
|
96
|
+
Dot,
|
|
97
|
+
{
|
|
98
|
+
key: i,
|
|
99
|
+
active: i === activeIndex,
|
|
100
|
+
size,
|
|
101
|
+
activeColor: resolvedActive,
|
|
102
|
+
inactiveColor: resolvedInactive,
|
|
103
|
+
index: i,
|
|
104
|
+
total: count,
|
|
105
|
+
onPress: onDotPress ? () => onDotPress(i) : void 0
|
|
106
|
+
}
|
|
107
|
+
))),
|
|
108
|
+
hasControls && /* @__PURE__ */ React.createElement(
|
|
109
|
+
TouchableOpacity,
|
|
110
|
+
{
|
|
111
|
+
onPress: handleNext,
|
|
112
|
+
disabled: !canGoNext,
|
|
113
|
+
activeOpacity: 0.7,
|
|
114
|
+
touchSoundDisabled: true,
|
|
115
|
+
accessibilityRole: "button",
|
|
116
|
+
accessibilityLabel: "Next page",
|
|
117
|
+
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 },
|
|
118
|
+
style: [styles.controlBtn, !canGoNext && styles.controlBtnDisabled]
|
|
119
|
+
},
|
|
120
|
+
renderIcon("chevron-right", s(18), canGoNext ? colors.foreground : colors.foregroundMuted)
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
var styles = StyleSheet.create({
|
|
125
|
+
container: {
|
|
126
|
+
flexDirection: "row",
|
|
127
|
+
alignItems: "center",
|
|
128
|
+
justifyContent: "center"
|
|
129
|
+
},
|
|
130
|
+
dotsRow: {
|
|
131
|
+
flexDirection: "row",
|
|
132
|
+
alignItems: "center"
|
|
133
|
+
},
|
|
134
|
+
controlBtn: {
|
|
135
|
+
padding: s(4)
|
|
136
|
+
},
|
|
137
|
+
controlBtnDisabled: {
|
|
138
|
+
opacity: 0.3
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
export { PagerDots };
|