@retray-dev/ui-kit 6.1.0 → 7.0.1
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 +447 -13
- package/EXAMPLES.md +248 -0
- package/README.md +11 -10
- package/dist/Accordion.d.mts +28 -0
- package/dist/Accordion.d.ts +28 -0
- package/dist/Accordion.js +340 -0
- package/dist/Accordion.mjs +6 -0
- package/dist/AlertBanner.d.mts +16 -0
- package/dist/AlertBanner.d.ts +16 -0
- package/dist/AlertBanner.js +247 -0
- package/dist/AlertBanner.mjs +5 -0
- package/dist/Avatar.d.mts +20 -0
- package/dist/Avatar.d.ts +20 -0
- package/dist/Avatar.js +234 -0
- package/dist/Avatar.mjs +3 -0
- package/dist/Badge.d.mts +26 -0
- package/dist/Badge.d.ts +26 -0
- package/dist/Badge.js +247 -0
- package/dist/Badge.mjs +4 -0
- package/dist/Button.d.mts +25 -0
- package/dist/Button.d.ts +25 -0
- package/dist/Button.js +414 -0
- package/dist/Button.mjs +8 -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 +2 -0
- package/dist/Card.d.mts +39 -0
- package/dist/Card.d.ts +39 -0
- package/dist/Card.js +329 -0
- package/dist/Card.mjs +7 -0
- package/dist/CategoryStrip.d.mts +26 -0
- package/dist/CategoryStrip.d.ts +26 -0
- package/dist/CategoryStrip.js +396 -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 +304 -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 +370 -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 +530 -0
- package/dist/ConfirmDialog.mjs +9 -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 +3 -0
- package/dist/CurrencyInput.d.mts +26 -0
- package/dist/CurrencyInput.d.ts +26 -0
- package/dist/CurrencyInput.js +404 -0
- package/dist/CurrencyInput.mjs +7 -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 +4 -0
- package/dist/EmptyState.d.mts +27 -0
- package/dist/EmptyState.d.ts +27 -0
- package/dist/EmptyState.js +503 -0
- package/dist/EmptyState.mjs +9 -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 +3 -0
- package/dist/IconButton.d.mts +22 -0
- package/dist/IconButton.d.ts +22 -0
- package/dist/IconButton.js +383 -0
- package/dist/IconButton.mjs +7 -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 +6 -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 +4 -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 +4 -0
- package/dist/ListItem.d.mts +64 -0
- package/dist/ListItem.d.ts +64 -0
- package/dist/ListItem.js +430 -0
- package/dist/ListItem.mjs +8 -0
- package/dist/MediaCard.d.mts +39 -0
- package/dist/MediaCard.d.ts +39 -0
- package/dist/MediaCard.js +427 -0
- package/dist/MediaCard.mjs +8 -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 +4 -0
- package/dist/MenuItem.d.mts +48 -0
- package/dist/MenuItem.d.ts +48 -0
- package/dist/MenuItem.js +403 -0
- package/dist/MenuItem.mjs +8 -0
- package/dist/MonthPicker.d.mts +20 -0
- package/dist/MonthPicker.d.ts +20 -0
- package/dist/MonthPicker.js +234 -0
- package/dist/MonthPicker.mjs +4 -0
- package/dist/Pressable.d.mts +34 -0
- package/dist/Pressable.d.ts +34 -0
- package/dist/Pressable.js +132 -0
- package/dist/Pressable.mjs +4 -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 +4 -0
- package/dist/RadioGroup.d.mts +19 -0
- package/dist/RadioGroup.d.ts +19 -0
- package/dist/RadioGroup.js +341 -0
- package/dist/RadioGroup.mjs +7 -0
- package/dist/Select.d.mts +22 -0
- package/dist/Select.d.ts +22 -0
- package/dist/Select.js +441 -0
- package/dist/Select.mjs +6 -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 +2 -0
- package/dist/Sheet.d.mts +81 -0
- package/dist/Sheet.d.ts +81 -0
- package/dist/Sheet.js +340 -0
- package/dist/Sheet.mjs +4 -0
- package/dist/Skeleton.d.mts +17 -0
- package/dist/Skeleton.d.ts +17 -0
- package/dist/Skeleton.js +205 -0
- package/dist/Skeleton.mjs +4 -0
- package/dist/Slider.d.mts +20 -0
- package/dist/Slider.d.ts +20 -0
- package/dist/Slider.js +232 -0
- package/dist/Slider.mjs +4 -0
- package/dist/Spinner.d.mts +12 -0
- package/dist/Spinner.d.ts +12 -0
- package/dist/Spinner.js +172 -0
- package/dist/Spinner.mjs +3 -0
- package/dist/Switch.d.mts +13 -0
- package/dist/Switch.d.ts +13 -0
- package/dist/Switch.js +261 -0
- package/dist/Switch.mjs +5 -0
- package/dist/Tabs.d.mts +27 -0
- package/dist/Tabs.d.ts +27 -0
- package/dist/Tabs.js +389 -0
- package/dist/Tabs.mjs +6 -0
- package/dist/Text.d.mts +12 -0
- package/dist/Text.d.ts +12 -0
- package/dist/Text.js +311 -0
- package/dist/Text.mjs +4 -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 +6 -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 +3 -0
- package/dist/Toggle.d.mts +33 -0
- package/dist/Toggle.d.ts +33 -0
- package/dist/Toggle.js +397 -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 +1 -0
- package/dist/chunk-2CE3TQVY.mjs +11 -0
- package/dist/chunk-2UYENBLV.mjs +49 -0
- package/dist/chunk-3BBOZ3OQ.mjs +41 -0
- package/dist/chunk-5IKW3VNC.mjs +43 -0
- package/dist/chunk-63357L2X.mjs +51 -0
- package/dist/chunk-6LQYY7HC.mjs +127 -0
- package/dist/chunk-6Q64UFIA.mjs +71 -0
- package/dist/chunk-76PFOSM2.mjs +41 -0
- package/dist/chunk-7H2OR44A.mjs +14 -0
- package/dist/chunk-A4MDAP7G.mjs +42 -0
- package/dist/chunk-AU2VDY4P.mjs +190 -0
- package/dist/chunk-BRKYVJVV.mjs +60 -0
- package/dist/chunk-CRYBX2CM.mjs +146 -0
- package/dist/chunk-DITNP6PL.mjs +106 -0
- package/dist/chunk-FTLJOUOQ.mjs +97 -0
- package/dist/chunk-GCWOGZYL.mjs +104 -0
- package/dist/chunk-GNGLDL6Z.mjs +60 -0
- package/dist/chunk-GPOUINK5.mjs +148 -0
- package/dist/chunk-HSPSMN6U.mjs +115 -0
- package/dist/chunk-IRRY3CRZ.mjs +82 -0
- package/dist/chunk-JB67UOB5.mjs +92 -0
- package/dist/chunk-JBLL7U3U.mjs +64 -0
- package/dist/chunk-KWCPOM6W.mjs +136 -0
- package/dist/chunk-KZJRQOIU.mjs +64 -0
- package/dist/chunk-L7E7TVEZ.mjs +145 -0
- package/dist/chunk-LG4DO3DK.mjs +174 -0
- package/dist/chunk-LWG526VX.mjs +139 -0
- package/dist/chunk-MN7OG7IY.mjs +96 -0
- package/dist/chunk-MX6HRKMI.mjs +29 -0
- package/dist/chunk-NC5ZTR2Y.mjs +32 -0
- package/dist/chunk-NQGVLMWG.mjs +90 -0
- package/dist/chunk-QCNARS3X.mjs +46 -0
- package/dist/chunk-QXGYKWI7.mjs +134 -0
- package/dist/chunk-QY3X2UYR.mjs +191 -0
- package/dist/chunk-RKLHUDZS.mjs +92 -0
- package/dist/chunk-RMMK64W5.mjs +54 -0
- package/dist/chunk-RR2VQLKE.mjs +190 -0
- package/dist/chunk-RTC3CFXF.mjs +29 -0
- package/dist/chunk-SBZYEV4S.mjs +61 -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-TAJ2PQ2O.mjs +163 -0
- package/dist/chunk-U4N7WF4Z.mjs +108 -0
- package/dist/chunk-URDE3EUU.mjs +132 -0
- package/dist/chunk-URLL5JBR.mjs +245 -0
- package/dist/chunk-XDMN67KV.mjs +59 -0
- package/dist/chunk-Y6MXOREN.mjs +120 -0
- package/dist/chunk-YZJAFS4P.mjs +131 -0
- package/dist/index.d.mts +94 -852
- package/dist/index.d.ts +94 -852
- package/dist/index.js +1387 -942
- package/dist/index.mjs +50 -3844
- package/package.json +23 -14
- 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 +13 -15
- package/src/components/AlertBanner/AlertBanner.tsx +33 -12
- package/src/components/Avatar/Avatar.tsx +4 -2
- package/src/components/Badge/Badge.tsx +4 -2
- package/src/components/Button/Button.tsx +30 -29
- package/src/components/ButtonGroup/ButtonGroup.tsx +13 -10
- package/src/components/Card/Card.tsx +36 -65
- package/src/components/CategoryStrip/CategoryStrip.tsx +68 -58
- package/src/components/Checkbox/Checkbox.tsx +41 -55
- package/src/components/Chip/Chip.tsx +49 -84
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +2 -2
- package/src/components/CurrencyDisplay/CurrencyDisplay.tsx +4 -2
- package/src/components/CurrencyInput/CurrencyInput.tsx +2 -2
- package/src/components/DetailRow/DetailRow.tsx +9 -7
- package/src/components/EmptyState/EmptyState.tsx +2 -2
- package/src/components/Form/Form.tsx +149 -0
- package/src/components/Form/index.ts +1 -0
- package/src/components/IconButton/IconButton.tsx +24 -20
- package/src/components/Input/Input.tsx +63 -50
- 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 +30 -43
- package/src/components/MediaCard/MediaCard.tsx +31 -29
- package/src/components/MenuGroup/MenuGroup.tsx +145 -0
- package/src/components/MenuGroup/index.ts +1 -0
- package/src/components/MenuItem/MenuItem.tsx +29 -40
- package/src/components/MonthPicker/MonthPicker.tsx +14 -4
- package/src/components/Pressable/Pressable.tsx +27 -46
- package/src/components/Progress/Progress.tsx +21 -12
- package/src/components/RadioGroup/RadioGroup.tsx +55 -32
- package/src/components/Select/Select.tsx +23 -21
- package/src/components/Separator/Separator.tsx +1 -3
- package/src/components/Sheet/Sheet.tsx +85 -18
- package/src/components/Skeleton/Skeleton.tsx +25 -14
- package/src/components/Slider/Slider.tsx +13 -3
- package/src/components/Spinner/Spinner.tsx +1 -1
- package/src/components/Switch/Switch.tsx +70 -52
- package/src/components/Tabs/Tabs.tsx +59 -47
- package/src/components/Text/Text.tsx +3 -1
- package/src/components/Textarea/Textarea.tsx +44 -23
- package/src/components/Toast/Toast.tsx +6 -6
- package/src/components/Toggle/Toggle.tsx +86 -68
- package/src/components/VirtualList/VirtualList.tsx +60 -0
- package/src/components/VirtualList/index.ts +1 -0
- package/src/fonts.ts +38 -20
- package/src/index.ts +5 -1
- 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 +58 -0
- package/src/utils/icons.ts +47 -20
- package/src/utils/useColorTransition.ts +40 -0
- package/src/utils/usePressScale.ts +75 -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,503 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React3 = require('react');
|
|
4
|
+
var reactNative = require('react-native');
|
|
5
|
+
var reactNativeSizeMatters = require('react-native-size-matters');
|
|
6
|
+
var AntDesign = require('@expo/vector-icons/AntDesign');
|
|
7
|
+
var Entypo = require('@expo/vector-icons/Entypo');
|
|
8
|
+
var Feather = require('@expo/vector-icons/Feather');
|
|
9
|
+
var FontAwesome5 = require('@expo/vector-icons/FontAwesome5');
|
|
10
|
+
var MaterialIcons = require('@expo/vector-icons/MaterialIcons');
|
|
11
|
+
var Ionicons = require('@expo/vector-icons/Ionicons');
|
|
12
|
+
var Animated = require('react-native-reanimated');
|
|
13
|
+
|
|
14
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
|
|
16
|
+
var React3__default = /*#__PURE__*/_interopDefault(React3);
|
|
17
|
+
var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
|
|
18
|
+
var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
|
|
19
|
+
var Feather__default = /*#__PURE__*/_interopDefault(Feather);
|
|
20
|
+
var FontAwesome5__default = /*#__PURE__*/_interopDefault(FontAwesome5);
|
|
21
|
+
var MaterialIcons__default = /*#__PURE__*/_interopDefault(MaterialIcons);
|
|
22
|
+
var Ionicons__default = /*#__PURE__*/_interopDefault(Ionicons);
|
|
23
|
+
var Animated__default = /*#__PURE__*/_interopDefault(Animated);
|
|
24
|
+
|
|
25
|
+
// src/components/EmptyState/EmptyState.tsx
|
|
26
|
+
|
|
27
|
+
// src/theme/colorUtils.ts
|
|
28
|
+
function hexToRgb(hex) {
|
|
29
|
+
const clean = hex.replace("#", "");
|
|
30
|
+
const full = clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean;
|
|
31
|
+
if (full.length !== 6) return null;
|
|
32
|
+
return {
|
|
33
|
+
r: parseInt(full.slice(0, 2), 16),
|
|
34
|
+
g: parseInt(full.slice(2, 4), 16),
|
|
35
|
+
b: parseInt(full.slice(4, 6), 16)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function componentToHex(c) {
|
|
39
|
+
return Math.round(Math.max(0, Math.min(255, c))).toString(16).padStart(2, "0");
|
|
40
|
+
}
|
|
41
|
+
function rgbToHex(r, g, b) {
|
|
42
|
+
return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`;
|
|
43
|
+
}
|
|
44
|
+
function withAlphaOnWhite(hex, alpha) {
|
|
45
|
+
const rgb = hexToRgb(hex);
|
|
46
|
+
if (!rgb) return hex;
|
|
47
|
+
const r = rgb.r * alpha + 255 * (1 - alpha);
|
|
48
|
+
const g = rgb.g * alpha + 255 * (1 - alpha);
|
|
49
|
+
const b = rgb.b * alpha + 255 * (1 - alpha);
|
|
50
|
+
return rgbToHex(r, g, b);
|
|
51
|
+
}
|
|
52
|
+
function withAlphaOnDark(hex, alpha, bgHex = "#0f0f0f") {
|
|
53
|
+
const rgb = hexToRgb(hex);
|
|
54
|
+
const bg = hexToRgb(bgHex);
|
|
55
|
+
if (!rgb || !bg) return hex;
|
|
56
|
+
const r = rgb.r * alpha + bg.r * (1 - alpha);
|
|
57
|
+
const g = rgb.g * alpha + bg.g * (1 - alpha);
|
|
58
|
+
const b = rgb.b * alpha + bg.b * (1 - alpha);
|
|
59
|
+
return rgbToHex(r, g, b);
|
|
60
|
+
}
|
|
61
|
+
function mixWithBackground(fgHex, bgHex, opacity) {
|
|
62
|
+
const fg = hexToRgb(fgHex);
|
|
63
|
+
const bg = hexToRgb(bgHex);
|
|
64
|
+
if (!fg || !bg) return fgHex;
|
|
65
|
+
const r = fg.r * opacity + bg.r * (1 - opacity);
|
|
66
|
+
const g = fg.g * opacity + bg.g * (1 - opacity);
|
|
67
|
+
const b = fg.b * opacity + bg.b * (1 - opacity);
|
|
68
|
+
return rgbToHex(r, g, b);
|
|
69
|
+
}
|
|
70
|
+
function lighten(hex, amount) {
|
|
71
|
+
return withAlphaOnWhite(hex, 1 - amount);
|
|
72
|
+
}
|
|
73
|
+
function darken(hex, amount) {
|
|
74
|
+
const rgb = hexToRgb(hex);
|
|
75
|
+
if (!rgb) return hex;
|
|
76
|
+
return rgbToHex(rgb.r * (1 - amount), rgb.g * (1 - amount), rgb.b * (1 - amount));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// src/theme/colors.ts
|
|
80
|
+
var defaultLight = {
|
|
81
|
+
background: "#ffffff",
|
|
82
|
+
foreground: "#1a1a1a",
|
|
83
|
+
card: "#ffffff",
|
|
84
|
+
primary: "#1a1a1a",
|
|
85
|
+
primaryForeground: "#ffffff",
|
|
86
|
+
// AUDIT FIX: brand accent — was undefined; falls back to primary when omitted
|
|
87
|
+
accent: "#d4561d",
|
|
88
|
+
accentForeground: "#ffffff",
|
|
89
|
+
border: "#dddddd",
|
|
90
|
+
// AUDIT FIX: was #e53935 (4.22:1 on white — fails AA); #c72828 = 5.59:1 ✓
|
|
91
|
+
destructive: "#c72828",
|
|
92
|
+
destructiveForeground: "#ffffff",
|
|
93
|
+
success: "#1a7a45",
|
|
94
|
+
successForeground: "#ffffff",
|
|
95
|
+
// AUDIT FIX: was #e67e00 (2.86:1 — severe fail); #9a5200 = 5.86:1 ✓ AAA-near
|
|
96
|
+
warning: "#9a5200",
|
|
97
|
+
warningForeground: "#ffffff"
|
|
98
|
+
};
|
|
99
|
+
function deriveColors(t, scheme) {
|
|
100
|
+
const dark = scheme === "dark";
|
|
101
|
+
const bg = t.background;
|
|
102
|
+
const foregroundSubtle = mixWithBackground(t.foreground, bg, 0.7);
|
|
103
|
+
const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
|
|
104
|
+
const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
|
|
105
|
+
const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
|
|
106
|
+
const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
|
|
107
|
+
const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
|
|
108
|
+
const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
|
|
109
|
+
const successBorder = dark ? withAlphaOnDark(t.success, 0.45, bg) : withAlphaOnWhite(t.success, 0.3);
|
|
110
|
+
const warningTint = dark ? withAlphaOnDark(t.warning, 0.15, bg) : withAlphaOnWhite(t.warning, 0.08);
|
|
111
|
+
const warningBorder = dark ? withAlphaOnDark(t.warning, 0.45, bg) : withAlphaOnWhite(t.warning, 0.3);
|
|
112
|
+
return {
|
|
113
|
+
...t,
|
|
114
|
+
foregroundSubtle,
|
|
115
|
+
foregroundMuted,
|
|
116
|
+
surface,
|
|
117
|
+
surfaceStrong,
|
|
118
|
+
destructiveTint,
|
|
119
|
+
destructiveBorder,
|
|
120
|
+
successTint,
|
|
121
|
+
successBorder,
|
|
122
|
+
warningTint,
|
|
123
|
+
warningBorder,
|
|
124
|
+
overlay: t.overlay ?? "rgba(0,0,0,0.45)",
|
|
125
|
+
accentResolved: t.accent ?? t.primary,
|
|
126
|
+
accentForegroundResolved: t.accentForeground ?? t.primaryForeground,
|
|
127
|
+
ring: t.accent ?? t.primary,
|
|
128
|
+
input: t.border,
|
|
129
|
+
separator: dark ? lighten(t.border, 0.22) : darken(t.border, 0.16)
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// src/theme/ThemeProvider.tsx
|
|
134
|
+
var ThemeContext = React3.createContext({
|
|
135
|
+
colors: deriveColors(defaultLight, "light"),
|
|
136
|
+
colorScheme: "light"
|
|
137
|
+
});
|
|
138
|
+
function useTheme() {
|
|
139
|
+
const context = React3.useContext(ThemeContext);
|
|
140
|
+
if (!context) {
|
|
141
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
142
|
+
}
|
|
143
|
+
return context;
|
|
144
|
+
}
|
|
145
|
+
var isWeb = reactNative.Platform.OS === "web";
|
|
146
|
+
var s = isWeb ? (n) => n : reactNativeSizeMatters.scale;
|
|
147
|
+
var vs = isWeb ? (n) => n : reactNativeSizeMatters.verticalScale;
|
|
148
|
+
var ms = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateScale;
|
|
149
|
+
var mvs = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateVerticalScale;
|
|
150
|
+
var glyphMapOf = (mod) => mod.glyphMap ?? {};
|
|
151
|
+
var ALL_FAMILIES = [
|
|
152
|
+
{ name: "Ionicons", component: Ionicons__default.default, getGlyphMap: () => glyphMapOf(Ionicons__default.default) },
|
|
153
|
+
{ name: "MaterialIcons", component: MaterialIcons__default.default, getGlyphMap: () => glyphMapOf(MaterialIcons__default.default) },
|
|
154
|
+
{ name: "FontAwesome5", component: FontAwesome5__default.default, getGlyphMap: () => glyphMapOf(FontAwesome5__default.default) },
|
|
155
|
+
{ name: "Entypo", component: Entypo__default.default, getGlyphMap: () => glyphMapOf(Entypo__default.default) },
|
|
156
|
+
{ name: "AntDesign", component: AntDesign__default.default, getGlyphMap: () => glyphMapOf(AntDesign__default.default) },
|
|
157
|
+
{ name: "Feather", component: Feather__default.default, getGlyphMap: () => glyphMapOf(Feather__default.default) }
|
|
158
|
+
];
|
|
159
|
+
var activeFamilies = ALL_FAMILIES;
|
|
160
|
+
var resolvedCache = null;
|
|
161
|
+
function buildCache() {
|
|
162
|
+
const cache = /* @__PURE__ */ new Map();
|
|
163
|
+
for (const family of activeFamilies) {
|
|
164
|
+
const glyphMap = family.getGlyphMap();
|
|
165
|
+
for (const iconName of Object.keys(glyphMap)) {
|
|
166
|
+
cache.set(iconName, family);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return cache;
|
|
170
|
+
}
|
|
171
|
+
function resolveFamily(name) {
|
|
172
|
+
if (!resolvedCache) {
|
|
173
|
+
resolvedCache = buildCache();
|
|
174
|
+
}
|
|
175
|
+
return resolvedCache.get(name) ?? null;
|
|
176
|
+
}
|
|
177
|
+
function Icon({ name, size, color, family }) {
|
|
178
|
+
let resolved = null;
|
|
179
|
+
if (family) {
|
|
180
|
+
resolved = ALL_FAMILIES.find((f) => f.name === family) ?? null;
|
|
181
|
+
} else {
|
|
182
|
+
resolved = resolveFamily(name);
|
|
183
|
+
}
|
|
184
|
+
if (!resolved) return null;
|
|
185
|
+
const Component = resolved.component;
|
|
186
|
+
return React3__default.default.createElement(Component, { name, size, color });
|
|
187
|
+
}
|
|
188
|
+
function renderIcon(name, size, color) {
|
|
189
|
+
return React3__default.default.createElement(Icon, { name, size, color });
|
|
190
|
+
}
|
|
191
|
+
var _haptics = null;
|
|
192
|
+
async function getHaptics() {
|
|
193
|
+
if (reactNative.Platform.OS === "web") return null;
|
|
194
|
+
if (!_haptics) {
|
|
195
|
+
_haptics = await import('expo-haptics');
|
|
196
|
+
}
|
|
197
|
+
return _haptics;
|
|
198
|
+
}
|
|
199
|
+
function impactMedium() {
|
|
200
|
+
if (reactNative.Platform.OS === "web") return;
|
|
201
|
+
getHaptics().then((h) => h?.impactAsync(h.ImpactFeedbackStyle.Medium));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// src/tokens.ts
|
|
205
|
+
var RADIUS = {
|
|
206
|
+
md: 14};
|
|
207
|
+
var TYPOGRAPHY = {
|
|
208
|
+
"button-lg": {
|
|
209
|
+
fontFamily: "Sohne-Medium",
|
|
210
|
+
fontSize: 16,
|
|
211
|
+
fontWeight: "500",
|
|
212
|
+
lineHeight: 22,
|
|
213
|
+
letterSpacing: 0
|
|
214
|
+
},
|
|
215
|
+
"button-sm": {
|
|
216
|
+
fontFamily: "Sohne-Medium",
|
|
217
|
+
fontSize: 14,
|
|
218
|
+
fontWeight: "500",
|
|
219
|
+
lineHeight: 18,
|
|
220
|
+
letterSpacing: 0
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
var SPRINGS = {
|
|
224
|
+
/** Tight, premium press feel — Buttons, Toggle, Tabs triggers. */
|
|
225
|
+
pressIn: { stiffness: 600, damping: 35, mass: 0.8 },
|
|
226
|
+
pressOut: { stiffness: 280, damping: 22, mass: 0.8 }};
|
|
227
|
+
({
|
|
228
|
+
/** Material-style ease-out — natural deceleration for state changes. */
|
|
229
|
+
standard: Animated.Easing.bezier(0.2, 0, 0, 1),
|
|
230
|
+
/** Strong ease-out for expanding surfaces (Accordion open). */
|
|
231
|
+
expand: Animated.Easing.bezier(0.23, 1, 0.32, 1),
|
|
232
|
+
/** Quick ease-in for collapsing. */
|
|
233
|
+
collapse: Animated.Easing.in(Animated.Easing.ease)
|
|
234
|
+
});
|
|
235
|
+
var PRESS_SCALE = {
|
|
236
|
+
button: 0.95};
|
|
237
|
+
function useHover() {
|
|
238
|
+
const [hovered, setHovered] = React3.useState(false);
|
|
239
|
+
const onMouseEnter = React3.useCallback(() => setHovered(true), []);
|
|
240
|
+
const onMouseLeave = React3.useCallback(() => setHovered(false), []);
|
|
241
|
+
if (reactNative.Platform.OS !== "web") {
|
|
242
|
+
return { hovered: false, hoverHandlers: {} };
|
|
243
|
+
}
|
|
244
|
+
return { hovered, hoverHandlers: { onMouseEnter, onMouseLeave } };
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// src/utils/usePressScale.ts
|
|
248
|
+
function usePressScale({
|
|
249
|
+
pressScale = PRESS_SCALE.button,
|
|
250
|
+
hoverScale = 1.02,
|
|
251
|
+
pressInSpring = SPRINGS.pressIn,
|
|
252
|
+
pressOutSpring = SPRINGS.pressOut,
|
|
253
|
+
disabled = false
|
|
254
|
+
} = {}) {
|
|
255
|
+
const scale2 = Animated.useSharedValue(1);
|
|
256
|
+
const { hovered, hoverHandlers } = useHover();
|
|
257
|
+
const onPressIn = React3.useCallback(() => {
|
|
258
|
+
if (disabled) return;
|
|
259
|
+
scale2.value = Animated.withSpring(pressScale, pressInSpring);
|
|
260
|
+
}, [disabled, pressScale, pressInSpring, scale2]);
|
|
261
|
+
const onPressOut = React3.useCallback(() => {
|
|
262
|
+
if (disabled) return;
|
|
263
|
+
scale2.value = Animated.withSpring(1, pressOutSpring);
|
|
264
|
+
}, [disabled, pressOutSpring, scale2]);
|
|
265
|
+
const hoverActive = reactNative.Platform.OS === "web" && hovered && hoverScale !== 1 && !disabled;
|
|
266
|
+
const animatedStyle = Animated.useAnimatedStyle(() => ({
|
|
267
|
+
transform: [
|
|
268
|
+
{ scale: scale2.value * (hoverActive ? hoverScale : 1) }
|
|
269
|
+
]
|
|
270
|
+
}));
|
|
271
|
+
return {
|
|
272
|
+
animatedStyle,
|
|
273
|
+
onPressIn,
|
|
274
|
+
onPressOut,
|
|
275
|
+
hoverHandlers
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// src/components/Button/Button.tsx
|
|
280
|
+
var containerSizeStyles = {
|
|
281
|
+
sm: { paddingHorizontal: s(16), paddingVertical: vs(10), minHeight: 40 },
|
|
282
|
+
md: { paddingHorizontal: s(24), paddingVertical: vs(14), minHeight: 48 },
|
|
283
|
+
lg: { paddingHorizontal: s(28), paddingVertical: vs(16), minHeight: 56 }
|
|
284
|
+
};
|
|
285
|
+
var labelSizeStyles = {
|
|
286
|
+
sm: { ...TYPOGRAPHY["button-sm"], fontSize: ms(TYPOGRAPHY["button-sm"].fontSize) },
|
|
287
|
+
md: { ...TYPOGRAPHY["button-lg"], fontSize: ms(TYPOGRAPHY["button-lg"].fontSize) },
|
|
288
|
+
lg: { ...TYPOGRAPHY["button-lg"], fontSize: ms(TYPOGRAPHY["button-lg"].fontSize + 1), lineHeight: mvs(24) }
|
|
289
|
+
};
|
|
290
|
+
var iconSizeMap = { sm: 16, md: 18, lg: 20 };
|
|
291
|
+
function ButtonBase({
|
|
292
|
+
label,
|
|
293
|
+
variant = "primary",
|
|
294
|
+
size = "md",
|
|
295
|
+
loading = false,
|
|
296
|
+
fullWidth = false,
|
|
297
|
+
icon,
|
|
298
|
+
iconName,
|
|
299
|
+
iconColor,
|
|
300
|
+
iconPosition = "left",
|
|
301
|
+
disabled,
|
|
302
|
+
style,
|
|
303
|
+
onPress,
|
|
304
|
+
accessibilityLabel,
|
|
305
|
+
accessibilityHint,
|
|
306
|
+
...props
|
|
307
|
+
}) {
|
|
308
|
+
const { colors } = useTheme();
|
|
309
|
+
const isDisabled = disabled || loading;
|
|
310
|
+
const { animatedStyle, onPressIn, onPressOut, hoverHandlers } = usePressScale({
|
|
311
|
+
pressScale: PRESS_SCALE.button,
|
|
312
|
+
disabled: isDisabled
|
|
313
|
+
});
|
|
314
|
+
const handlePress = (e) => {
|
|
315
|
+
impactMedium();
|
|
316
|
+
onPress?.(e);
|
|
317
|
+
};
|
|
318
|
+
const containerVariantStyle = {
|
|
319
|
+
primary: { backgroundColor: colors.primary },
|
|
320
|
+
secondary: { backgroundColor: "transparent", borderWidth: 1.5, borderColor: colors.primary },
|
|
321
|
+
text: { backgroundColor: "transparent" },
|
|
322
|
+
destructive: { backgroundColor: colors.destructive }
|
|
323
|
+
}[variant];
|
|
324
|
+
const labelVariantStyle = {
|
|
325
|
+
primary: { color: colors.primaryForeground },
|
|
326
|
+
secondary: { color: colors.primary },
|
|
327
|
+
// AUDIT FIX: was colors.foreground — visually indistinguishable from plain text,
|
|
328
|
+
// no affordance that it's a CTA. Now uses accentResolved so text-only buttons
|
|
329
|
+
// carry the brand voltage. Falls back to primary when no accent is defined.
|
|
330
|
+
text: { color: colors.accentResolved },
|
|
331
|
+
destructive: { color: colors.destructiveForeground }
|
|
332
|
+
}[variant];
|
|
333
|
+
const textColor = iconColor ?? labelVariantStyle.color;
|
|
334
|
+
const effectiveIcon = iconName ? renderIcon(iconName, iconSizeMap[size], textColor) : typeof icon === "function" ? icon({ label, size, variant, color: textColor }) : icon;
|
|
335
|
+
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.accentResolved;
|
|
336
|
+
const styleArray = Array.isArray(style) ? style : style ? [style] : [];
|
|
337
|
+
const flatStyle = reactNative.StyleSheet.flatten(styleArray);
|
|
338
|
+
const { flex, ...restStyle } = flatStyle || {};
|
|
339
|
+
return /* @__PURE__ */ React3__default.default.createElement(
|
|
340
|
+
Animated__default.default.View,
|
|
341
|
+
{
|
|
342
|
+
style: [fullWidth && styles.fullWidth, flex !== void 0 && { flex }, animatedStyle],
|
|
343
|
+
...hoverHandlers
|
|
344
|
+
},
|
|
345
|
+
/* @__PURE__ */ React3__default.default.createElement(
|
|
346
|
+
reactNative.TouchableOpacity,
|
|
347
|
+
{
|
|
348
|
+
style: [
|
|
349
|
+
styles.base,
|
|
350
|
+
containerVariantStyle,
|
|
351
|
+
containerSizeStyles[size],
|
|
352
|
+
fullWidth && styles.fullWidth,
|
|
353
|
+
isDisabled && styles.disabled,
|
|
354
|
+
restStyle
|
|
355
|
+
],
|
|
356
|
+
disabled: isDisabled,
|
|
357
|
+
activeOpacity: 1,
|
|
358
|
+
touchSoundDisabled: true,
|
|
359
|
+
onPress: handlePress,
|
|
360
|
+
onPressIn,
|
|
361
|
+
onPressOut,
|
|
362
|
+
accessibilityRole: "button",
|
|
363
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
364
|
+
accessibilityHint,
|
|
365
|
+
accessibilityState: { disabled: isDisabled, busy: loading },
|
|
366
|
+
...props
|
|
367
|
+
},
|
|
368
|
+
loading ? /* @__PURE__ */ React3__default.default.createElement(React3__default.default.Fragment, null, /* @__PURE__ */ React3__default.default.createElement(reactNative.ActivityIndicator, { size: "small", color: spinnerColor, style: { marginRight: s(6) } }), /* @__PURE__ */ React3__default.default.createElement(
|
|
369
|
+
reactNative.Text,
|
|
370
|
+
{
|
|
371
|
+
style: [styles.label, labelVariantStyle, labelSizeStyles[size], styles.labelLoading],
|
|
372
|
+
allowFontScaling: true,
|
|
373
|
+
numberOfLines: 1
|
|
374
|
+
},
|
|
375
|
+
label
|
|
376
|
+
)) : /* @__PURE__ */ React3__default.default.createElement(React3__default.default.Fragment, null, effectiveIcon && iconPosition === "left" && /* @__PURE__ */ React3__default.default.createElement(React3__default.default.Fragment, null, effectiveIcon), /* @__PURE__ */ React3__default.default.createElement(
|
|
377
|
+
reactNative.Text,
|
|
378
|
+
{
|
|
379
|
+
style: [styles.label, labelVariantStyle, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0],
|
|
380
|
+
allowFontScaling: true,
|
|
381
|
+
numberOfLines: 1
|
|
382
|
+
},
|
|
383
|
+
label
|
|
384
|
+
), effectiveIcon && iconPosition === "right" && /* @__PURE__ */ React3__default.default.createElement(React3__default.default.Fragment, null, effectiveIcon))
|
|
385
|
+
)
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
var Button = React3__default.default.memo(ButtonBase);
|
|
389
|
+
var styles = reactNative.StyleSheet.create({
|
|
390
|
+
base: {
|
|
391
|
+
borderRadius: RADIUS.md,
|
|
392
|
+
alignItems: "center",
|
|
393
|
+
justifyContent: "center",
|
|
394
|
+
flexDirection: "row"
|
|
395
|
+
},
|
|
396
|
+
fullWidth: {
|
|
397
|
+
width: "100%"
|
|
398
|
+
},
|
|
399
|
+
disabled: {
|
|
400
|
+
opacity: 0.45
|
|
401
|
+
},
|
|
402
|
+
label: {
|
|
403
|
+
fontFamily: "Sohne-Medium",
|
|
404
|
+
flexShrink: 1
|
|
405
|
+
},
|
|
406
|
+
labelWithIcon: {
|
|
407
|
+
marginHorizontal: s(6)
|
|
408
|
+
},
|
|
409
|
+
labelLoading: {
|
|
410
|
+
opacity: 0.6
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
// src/components/EmptyState/EmptyState.tsx
|
|
415
|
+
function EmptyState({ icon, iconName, iconColor, title, description, action, actionLabel, onAction, size = "default", style }) {
|
|
416
|
+
const { colors } = useTheme();
|
|
417
|
+
const isCompact = size === "compact";
|
|
418
|
+
const effectiveIcon = iconName ? renderIcon(iconName, isCompact ? 32 : 48, iconColor ?? colors.foregroundMuted) : icon;
|
|
419
|
+
return /* @__PURE__ */ React3__default.default.createElement(
|
|
420
|
+
reactNative.View,
|
|
421
|
+
{
|
|
422
|
+
style: [
|
|
423
|
+
styles2.container,
|
|
424
|
+
isCompact && styles2.containerCompact,
|
|
425
|
+
{ borderColor: colors.border },
|
|
426
|
+
style
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
effectiveIcon ? /* @__PURE__ */ React3__default.default.createElement(
|
|
430
|
+
reactNative.View,
|
|
431
|
+
{
|
|
432
|
+
style: [
|
|
433
|
+
styles2.iconWrapper,
|
|
434
|
+
isCompact && styles2.iconWrapperCompact,
|
|
435
|
+
{ backgroundColor: colors.surface }
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
effectiveIcon
|
|
439
|
+
) : null,
|
|
440
|
+
/* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles2.textWrapper }, /* @__PURE__ */ React3__default.default.createElement(
|
|
441
|
+
reactNative.Text,
|
|
442
|
+
{
|
|
443
|
+
style: [styles2.title, isCompact && styles2.titleCompact, { color: colors.foreground }],
|
|
444
|
+
allowFontScaling: true
|
|
445
|
+
},
|
|
446
|
+
title
|
|
447
|
+
), description && !isCompact ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles2.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null),
|
|
448
|
+
!isCompact && (action ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles2.action }, action) : actionLabel && onAction ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles2.action }, /* @__PURE__ */ React3__default.default.createElement(Button, { label: actionLabel, variant: "primary", onPress: onAction })) : null)
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
var styles2 = reactNative.StyleSheet.create({
|
|
452
|
+
container: {
|
|
453
|
+
alignItems: "center",
|
|
454
|
+
justifyContent: "center",
|
|
455
|
+
borderWidth: 1,
|
|
456
|
+
borderStyle: "dashed",
|
|
457
|
+
borderRadius: ms(12)
|
|
458
|
+
},
|
|
459
|
+
containerCompact: {},
|
|
460
|
+
iconWrapper: {
|
|
461
|
+
width: s(80),
|
|
462
|
+
height: s(80),
|
|
463
|
+
borderRadius: ms(20),
|
|
464
|
+
alignItems: "center",
|
|
465
|
+
justifyContent: "center",
|
|
466
|
+
marginTop: s(32)
|
|
467
|
+
},
|
|
468
|
+
iconWrapperCompact: {
|
|
469
|
+
width: s(56),
|
|
470
|
+
height: s(56),
|
|
471
|
+
borderRadius: ms(14),
|
|
472
|
+
marginTop: s(20)
|
|
473
|
+
},
|
|
474
|
+
textWrapper: {
|
|
475
|
+
alignItems: "center",
|
|
476
|
+
gap: vs(8),
|
|
477
|
+
maxWidth: s(320),
|
|
478
|
+
paddingHorizontal: s(32),
|
|
479
|
+
marginTop: vs(16)
|
|
480
|
+
},
|
|
481
|
+
title: {
|
|
482
|
+
fontFamily: "Sohne-Medium",
|
|
483
|
+
fontSize: ms(18),
|
|
484
|
+
textAlign: "center"
|
|
485
|
+
},
|
|
486
|
+
titleCompact: {
|
|
487
|
+
fontSize: ms(15),
|
|
488
|
+
marginTop: vs(10)
|
|
489
|
+
},
|
|
490
|
+
description: {
|
|
491
|
+
fontFamily: "Sohne-Regular",
|
|
492
|
+
fontSize: ms(14),
|
|
493
|
+
lineHeight: mvs(20),
|
|
494
|
+
textAlign: "center"
|
|
495
|
+
},
|
|
496
|
+
action: {
|
|
497
|
+
marginTop: vs(8),
|
|
498
|
+
marginBottom: s(32),
|
|
499
|
+
paddingHorizontal: s(32)
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
exports.EmptyState = EmptyState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { EmptyState } from './chunk-MN7OG7IY.mjs';
|
|
2
|
+
import './chunk-CRYBX2CM.mjs';
|
|
3
|
+
import './chunk-T7XZ7H7Y.mjs';
|
|
4
|
+
import './chunk-QCNARS3X.mjs';
|
|
5
|
+
import './chunk-RTC3CFXF.mjs';
|
|
6
|
+
import './chunk-5IKW3VNC.mjs';
|
|
7
|
+
import './chunk-QY3X2UYR.mjs';
|
|
8
|
+
import './chunk-SOYNZDVY.mjs';
|
|
9
|
+
import './chunk-2CE3TQVY.mjs';
|
package/dist/Form.d.mts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface FormProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
style?: ViewStyle;
|
|
7
|
+
}
|
|
8
|
+
interface FormFieldProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
label?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
style?: ViewStyle;
|
|
14
|
+
labelStyle?: TextStyle;
|
|
15
|
+
errorStyle?: TextStyle;
|
|
16
|
+
}
|
|
17
|
+
interface FormSectionProps {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
title?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
style?: ViewStyle;
|
|
22
|
+
}
|
|
23
|
+
interface FormFooterProps {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
style?: ViewStyle;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Form wrapper with consistent spacing between fields.
|
|
29
|
+
* Use Form.Field for individual inputs with label + error,
|
|
30
|
+
* Form.Section for grouped fields, and Form.Footer for action buttons.
|
|
31
|
+
*/
|
|
32
|
+
declare function Form({ children, style }: FormProps): React.JSX.Element;
|
|
33
|
+
declare namespace Form {
|
|
34
|
+
var Field: typeof FormField;
|
|
35
|
+
var Section: typeof FormSection;
|
|
36
|
+
var Footer: typeof FormFooter;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Wraps a single form input with optional label and error message.
|
|
40
|
+
* Automatically spaces children properly.
|
|
41
|
+
*/
|
|
42
|
+
declare function FormField({ children, label, error, required, style, labelStyle, errorStyle, }: FormFieldProps): React.JSX.Element;
|
|
43
|
+
/**
|
|
44
|
+
* Groups related form fields with optional title and description.
|
|
45
|
+
*/
|
|
46
|
+
declare function FormSection({ children, title, description, style }: FormSectionProps): React.JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* Footer area for submit/cancel buttons or form actions.
|
|
49
|
+
*/
|
|
50
|
+
declare function FormFooter({ children, style }: FormFooterProps): React.JSX.Element;
|
|
51
|
+
|
|
52
|
+
export { Form, FormField, type FormFieldProps, FormFooter, type FormFooterProps, type FormProps, FormSection, type FormSectionProps };
|
package/dist/Form.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface FormProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
style?: ViewStyle;
|
|
7
|
+
}
|
|
8
|
+
interface FormFieldProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
label?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
style?: ViewStyle;
|
|
14
|
+
labelStyle?: TextStyle;
|
|
15
|
+
errorStyle?: TextStyle;
|
|
16
|
+
}
|
|
17
|
+
interface FormSectionProps {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
title?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
style?: ViewStyle;
|
|
22
|
+
}
|
|
23
|
+
interface FormFooterProps {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
style?: ViewStyle;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Form wrapper with consistent spacing between fields.
|
|
29
|
+
* Use Form.Field for individual inputs with label + error,
|
|
30
|
+
* Form.Section for grouped fields, and Form.Footer for action buttons.
|
|
31
|
+
*/
|
|
32
|
+
declare function Form({ children, style }: FormProps): React.JSX.Element;
|
|
33
|
+
declare namespace Form {
|
|
34
|
+
var Field: typeof FormField;
|
|
35
|
+
var Section: typeof FormSection;
|
|
36
|
+
var Footer: typeof FormFooter;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Wraps a single form input with optional label and error message.
|
|
40
|
+
* Automatically spaces children properly.
|
|
41
|
+
*/
|
|
42
|
+
declare function FormField({ children, label, error, required, style, labelStyle, errorStyle, }: FormFieldProps): React.JSX.Element;
|
|
43
|
+
/**
|
|
44
|
+
* Groups related form fields with optional title and description.
|
|
45
|
+
*/
|
|
46
|
+
declare function FormSection({ children, title, description, style }: FormSectionProps): React.JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* Footer area for submit/cancel buttons or form actions.
|
|
49
|
+
*/
|
|
50
|
+
declare function FormFooter({ children, style }: FormFooterProps): React.JSX.Element;
|
|
51
|
+
|
|
52
|
+
export { Form, FormField, type FormFieldProps, FormFooter, type FormFooterProps, type FormProps, FormSection, type FormSectionProps };
|