@sudobility/components-rn 1.0.41 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1092 -473
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1095 -476
- package/dist/index.esm.js.map +1 -1
- package/dist/ui/Alert/Alert.d.ts.map +1 -1
- package/dist/ui/Avatar/Avatar.d.ts.map +1 -1
- package/dist/ui/Badge/Badge.d.ts.map +1 -1
- package/dist/ui/Banner/Banner.d.ts.map +1 -1
- package/dist/ui/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/ui/BreadcrumbNav/BreadcrumbNav.d.ts.map +1 -1
- package/dist/ui/CTASection/CTASection.d.ts.map +1 -1
- package/dist/ui/Calendar/Calendar.d.ts.map +1 -1
- package/dist/ui/ChainBadge/ChainBadge.d.ts.map +1 -1
- package/dist/ui/Checkbox/Checkbox.d.ts +0 -22
- package/dist/ui/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/ui/Code/Code.d.ts +0 -17
- package/dist/ui/Code/Code.d.ts.map +1 -1
- package/dist/ui/CodeDisplay/CodeDisplay.d.ts +0 -21
- package/dist/ui/CodeDisplay/CodeDisplay.d.ts.map +1 -1
- package/dist/ui/CollapsibleSection/CollapsibleSection.d.ts.map +1 -1
- package/dist/ui/Combobox/Combobox.d.ts.map +1 -1
- package/dist/ui/Command/Command.d.ts.map +1 -1
- package/dist/ui/DashboardStatCard/DashboardStatCard.d.ts +0 -17
- package/dist/ui/DashboardStatCard/DashboardStatCard.d.ts.map +1 -1
- package/dist/ui/DataList/DataList.d.ts.map +1 -1
- package/dist/ui/Divider/Divider.d.ts.map +1 -1
- package/dist/ui/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/ui/ExternalLink/ExternalLink.d.ts.map +1 -1
- package/dist/ui/FeatureCard/FeatureCard.d.ts.map +1 -1
- package/dist/ui/FeatureGrid/FeatureGrid.d.ts.map +1 -1
- package/dist/ui/GradientIconContainer/GradientIconContainer.d.ts +0 -13
- package/dist/ui/GradientIconContainer/GradientIconContainer.d.ts.map +1 -1
- package/dist/ui/Heading/Heading.d.ts.map +1 -1
- package/dist/ui/HelperText/HelperText.d.ts.map +1 -1
- package/dist/ui/IconContainer/IconContainer.d.ts +0 -13
- package/dist/ui/IconContainer/IconContainer.d.ts.map +1 -1
- package/dist/ui/IconText/IconText.d.ts.map +1 -1
- package/dist/ui/InfiniteScroll/InfiniteScroll.d.ts.map +1 -1
- package/dist/ui/InfoBox/InfoBox.d.ts.map +1 -1
- package/dist/ui/Input/Input.d.ts.map +1 -1
- package/dist/ui/KeyValuePair/KeyValuePair.d.ts.map +1 -1
- package/dist/ui/Label/Label.d.ts.map +1 -1
- package/dist/ui/Link/Link.d.ts.map +1 -1
- package/dist/ui/ListItemWithAction/ListItemWithAction.d.ts.map +1 -1
- package/dist/ui/Modal/Modal.d.ts.map +1 -1
- package/dist/ui/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/ui/NavigationList/NavigationList.d.ts.map +1 -1
- package/dist/ui/PageSectionHeader/PageSectionHeader.d.ts.map +1 -1
- package/dist/ui/Pagination/Pagination.d.ts.map +1 -1
- package/dist/ui/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/dist/ui/PopupSelect/PopupSelect.d.ts.map +1 -1
- package/dist/ui/Progress/Progress.d.ts +0 -15
- package/dist/ui/Progress/Progress.d.ts.map +1 -1
- package/dist/ui/ProgressCircle/ProgressCircle.d.ts.map +1 -1
- package/dist/ui/PromotionalBanner/PromotionalBanner.d.ts.map +1 -1
- package/dist/ui/QuickActions/QuickActions.d.ts.map +1 -1
- package/dist/ui/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/ui/SectionHeader/SectionHeader.d.ts.map +1 -1
- package/dist/ui/Select/Select.d.ts.map +1 -1
- package/dist/ui/SettingsList/SettingsList.d.ts.map +1 -1
- package/dist/ui/Sheet/Sheet.d.ts.map +1 -1
- package/dist/ui/SideNav/SideNav.d.ts.map +1 -1
- package/dist/ui/SmartLink/SmartLink.d.ts.map +1 -1
- package/dist/ui/Spinner/Spinner.d.ts.map +1 -1
- package/dist/ui/StatDisplay/StatDisplay.d.ts +0 -12
- package/dist/ui/StatDisplay/StatDisplay.d.ts.map +1 -1
- package/dist/ui/StepList/StepList.d.ts.map +1 -1
- package/dist/ui/Table/Table.d.ts.map +1 -1
- package/dist/ui/Tabs/Tabs.d.ts.map +1 -1
- package/dist/ui/Text/Text.d.ts.map +1 -1
- package/dist/ui/TextArea/TextArea.d.ts.map +1 -1
- package/dist/ui/TextInputModal/TextInputModal.d.ts.map +1 -1
- package/dist/ui/Toast/Toast.d.ts.map +1 -1
- package/dist/ui/Tooltip/Tooltip.d.ts +0 -20
- package/dist/ui/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/ui/TransferList/TransferList.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/__tests__/alert.test.tsx +20 -10
- package/src/ui/Alert/Alert.tsx +13 -5
- package/src/ui/Avatar/Avatar.tsx +6 -5
- package/src/ui/Badge/Badge.tsx +61 -26
- package/src/ui/Banner/Banner.tsx +36 -25
- package/src/ui/Breadcrumb/Breadcrumb.tsx +8 -5
- package/src/ui/BreadcrumbNav/BreadcrumbNav.tsx +22 -3
- package/src/ui/CTASection/CTASection.tsx +8 -6
- package/src/ui/Calendar/Calendar.tsx +35 -6
- package/src/ui/Card/Card.tsx +2 -2
- package/src/ui/ChainBadge/ChainBadge.tsx +67 -42
- package/src/ui/Checkbox/Checkbox.tsx +47 -20
- package/src/ui/Code/Code.tsx +51 -21
- package/src/ui/CodeDisplay/CodeDisplay.tsx +46 -20
- package/src/ui/CollapsibleSection/CollapsibleSection.tsx +7 -3
- package/src/ui/Combobox/Combobox.tsx +2 -1
- package/src/ui/Command/Command.tsx +2 -1
- package/src/ui/DashboardStatCard/DashboardStatCard.tsx +29 -11
- package/src/ui/DataList/DataList.tsx +23 -5
- package/src/ui/Divider/Divider.tsx +12 -17
- package/src/ui/Dropdown/Dropdown.tsx +4 -1
- package/src/ui/ExternalLink/ExternalLink.tsx +5 -4
- package/src/ui/FeatureCard/FeatureCard.tsx +60 -29
- package/src/ui/FeatureGrid/FeatureGrid.tsx +7 -7
- package/src/ui/GradientIconContainer/GradientIconContainer.tsx +33 -8
- package/src/ui/Heading/Heading.tsx +15 -38
- package/src/ui/HelperText/HelperText.tsx +9 -8
- package/src/ui/IconContainer/IconContainer.tsx +26 -9
- package/src/ui/IconText/IconText.tsx +6 -5
- package/src/ui/InfiniteScroll/InfiniteScroll.tsx +2 -1
- package/src/ui/InfoBox/InfoBox.tsx +35 -17
- package/src/ui/Input/Input.tsx +10 -3
- package/src/ui/KeyValuePair/KeyValuePair.tsx +12 -5
- package/src/ui/Label/Label.tsx +3 -1
- package/src/ui/Link/Link.tsx +6 -5
- package/src/ui/ListItemWithAction/ListItemWithAction.tsx +2 -1
- package/src/ui/Modal/Modal.tsx +16 -2
- package/src/ui/MultiSelect/MultiSelect.tsx +2 -1
- package/src/ui/NavigationList/NavigationList.tsx +17 -3
- package/src/ui/PageSectionHeader/PageSectionHeader.tsx +2 -1
- package/src/ui/Pagination/Pagination.tsx +9 -6
- package/src/ui/PhoneInput/PhoneInput.tsx +3 -2
- package/src/ui/PopupSelect/PopupSelect.tsx +15 -14
- package/src/ui/Progress/Progress.tsx +63 -14
- package/src/ui/ProgressCircle/ProgressCircle.tsx +7 -6
- package/src/ui/PromotionalBanner/PromotionalBanner.tsx +7 -4
- package/src/ui/QuickActions/QuickActions.tsx +13 -9
- package/src/ui/SearchInput/SearchInput.tsx +3 -2
- package/src/ui/SectionHeader/SectionHeader.tsx +4 -1
- package/src/ui/Select/Select.tsx +20 -5
- package/src/ui/SettingsList/SettingsList.tsx +4 -1
- package/src/ui/Sheet/Sheet.tsx +20 -3
- package/src/ui/SideNav/SideNav.tsx +11 -2
- package/src/ui/SmartLink/SmartLink.tsx +6 -3
- package/src/ui/Spinner/Spinner.tsx +8 -6
- package/src/ui/StatDisplay/StatDisplay.tsx +59 -23
- package/src/ui/StepList/StepList.tsx +25 -3
- package/src/ui/Table/Table.tsx +22 -9
- package/src/ui/Tabs/Tabs.tsx +7 -2
- package/src/ui/Text/Text.tsx +19 -52
- package/src/ui/TextArea/TextArea.tsx +2 -1
- package/src/ui/TextInputModal/TextInputModal.tsx +2 -1
- package/src/ui/Toast/Toast.tsx +49 -14
- package/src/ui/Tooltip/Tooltip.tsx +47 -9
- package/src/ui/TransferList/TransferList.tsx +2 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const clsx = require("clsx");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const reactNative = require("react-native");
|
|
6
|
-
const classVarianceAuthority = require("class-variance-authority");
|
|
7
6
|
const design = require("@sudobility/design");
|
|
7
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
8
8
|
const reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
9
9
|
function _interopNamespaceDefault(e) {
|
|
10
10
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -1371,34 +1371,42 @@ logger.withContext("API");
|
|
|
1371
1371
|
logger.withContext("CONTRACT");
|
|
1372
1372
|
logger.withContext("ENS");
|
|
1373
1373
|
logger.withContext("STORAGE");
|
|
1374
|
+
const alert$1 = design.colors.component.alert;
|
|
1375
|
+
function splitAlertClasses$2(base, dark) {
|
|
1376
|
+
const all = `${base} ${dark}`.split(" ");
|
|
1377
|
+
return {
|
|
1378
|
+
container: all.filter((c) => c.includes("bg-") || c.includes("border-")).join(" "),
|
|
1379
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
const dsInfo$1 = splitAlertClasses$2(alert$1.info.base, alert$1.info.dark);
|
|
1383
|
+
const dsSuccess$1 = splitAlertClasses$2(alert$1.success.base, alert$1.success.dark);
|
|
1384
|
+
const dsWarning$1 = splitAlertClasses$2(alert$1.warning.base, alert$1.warning.dark);
|
|
1385
|
+
const dsError$1 = splitAlertClasses$2(alert$1.error.base, alert$1.error.dark);
|
|
1374
1386
|
const variantConfig = {
|
|
1375
1387
|
[InfoType.INFO]: {
|
|
1376
1388
|
icon: "ℹ",
|
|
1377
|
-
container:
|
|
1378
|
-
iconColor:
|
|
1379
|
-
|
|
1380
|
-
descriptionColor: "text-blue-700 dark:text-blue-300"
|
|
1389
|
+
container: dsInfo$1.container,
|
|
1390
|
+
iconColor: alert$1.info.icon,
|
|
1391
|
+
textColor: dsInfo$1.text
|
|
1381
1392
|
},
|
|
1382
1393
|
[InfoType.SUCCESS]: {
|
|
1383
1394
|
icon: "✓",
|
|
1384
|
-
container:
|
|
1385
|
-
iconColor:
|
|
1386
|
-
|
|
1387
|
-
descriptionColor: "text-green-700 dark:text-green-300"
|
|
1395
|
+
container: dsSuccess$1.container,
|
|
1396
|
+
iconColor: alert$1.success.icon,
|
|
1397
|
+
textColor: dsSuccess$1.text
|
|
1388
1398
|
},
|
|
1389
1399
|
[InfoType.WARNING]: {
|
|
1390
1400
|
icon: "⚠",
|
|
1391
|
-
container:
|
|
1392
|
-
iconColor:
|
|
1393
|
-
|
|
1394
|
-
descriptionColor: "text-yellow-700 dark:text-amber-300"
|
|
1401
|
+
container: dsWarning$1.container,
|
|
1402
|
+
iconColor: alert$1.warning.icon,
|
|
1403
|
+
textColor: dsWarning$1.text
|
|
1395
1404
|
},
|
|
1396
1405
|
[InfoType.ERROR]: {
|
|
1397
1406
|
icon: "✗",
|
|
1398
|
-
container:
|
|
1399
|
-
iconColor:
|
|
1400
|
-
|
|
1401
|
-
descriptionColor: "text-red-700 dark:text-red-300"
|
|
1407
|
+
container: dsError$1.container,
|
|
1408
|
+
iconColor: alert$1.error.icon,
|
|
1409
|
+
textColor: dsError$1.text
|
|
1402
1410
|
}
|
|
1403
1411
|
};
|
|
1404
1412
|
const Banner = ({
|
|
@@ -1495,8 +1503,8 @@ const Banner = ({
|
|
|
1495
1503
|
children: [
|
|
1496
1504
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-shrink-0 mt-0.5", children: icon || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-lg", config.iconColor), children: config.icon }) }),
|
|
1497
1505
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1 min-w-0", children: [
|
|
1498
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("font-semibold", config.
|
|
1499
|
-
description ? /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-sm mt-1", config.
|
|
1506
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("font-semibold", config.textColor), children: title }),
|
|
1507
|
+
description ? /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-sm mt-1", config.textColor), children: description }) : null
|
|
1500
1508
|
] }),
|
|
1501
1509
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1502
1510
|
reactNative.Pressable,
|
|
@@ -1648,7 +1656,7 @@ const Button = React__namespace.forwardRef(
|
|
|
1648
1656
|
}
|
|
1649
1657
|
);
|
|
1650
1658
|
Button.displayName = "Button";
|
|
1651
|
-
const calloutStyle = "
|
|
1659
|
+
const calloutStyle = design.getCardVariantColors("info");
|
|
1652
1660
|
const paddingStyles = {
|
|
1653
1661
|
none: "",
|
|
1654
1662
|
sm: "p-3",
|
|
@@ -1725,6 +1733,9 @@ const CardFooter = ({
|
|
|
1725
1733
|
}) => {
|
|
1726
1734
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("flex-row items-center pt-4", className), ...props, children });
|
|
1727
1735
|
};
|
|
1736
|
+
const inputFocusClass = "border-blue-500 dark:border-blue-400";
|
|
1737
|
+
const inputErrorClass = "border-red-500 dark:border-red-400";
|
|
1738
|
+
const inputDisabledClass = "opacity-50 bg-gray-100 dark:bg-gray-800";
|
|
1728
1739
|
const Input = React__namespace.forwardRef(
|
|
1729
1740
|
({ className, error, disabled, editable, onFocus, onBlur, ...props }, ref) => {
|
|
1730
1741
|
const [isFocused, setIsFocused] = React__namespace.useState(false);
|
|
@@ -1743,9 +1754,9 @@ const Input = React__namespace.forwardRef(
|
|
|
1743
1754
|
ref,
|
|
1744
1755
|
className: cn(
|
|
1745
1756
|
design.variants.input.default(),
|
|
1746
|
-
isFocused &&
|
|
1747
|
-
error &&
|
|
1748
|
-
disabled &&
|
|
1757
|
+
isFocused && inputFocusClass,
|
|
1758
|
+
error && inputErrorClass,
|
|
1759
|
+
disabled && inputDisabledClass,
|
|
1749
1760
|
className
|
|
1750
1761
|
),
|
|
1751
1762
|
editable: isEditable,
|
|
@@ -1767,15 +1778,11 @@ const sizeMap = {
|
|
|
1767
1778
|
extraLarge: "large"
|
|
1768
1779
|
};
|
|
1769
1780
|
const colorMap = {
|
|
1770
|
-
default:
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
warning: "#ea580c",
|
|
1776
|
-
// orange-600
|
|
1777
|
-
error: "#dc2626"
|
|
1778
|
-
// red-600
|
|
1781
|
+
default: design.colors.raw.blue[600],
|
|
1782
|
+
white: design.colors.raw.neutral[0],
|
|
1783
|
+
success: design.colors.raw.green[600],
|
|
1784
|
+
warning: design.colors.raw.orange[600],
|
|
1785
|
+
error: design.colors.raw.red[600]
|
|
1779
1786
|
};
|
|
1780
1787
|
const Spinner = ({
|
|
1781
1788
|
size = "default",
|
|
@@ -1797,7 +1804,7 @@ const Spinner = ({
|
|
|
1797
1804
|
...props,
|
|
1798
1805
|
children: [
|
|
1799
1806
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: activitySize, color }),
|
|
1800
|
-
showText && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "mt-2
|
|
1807
|
+
showText && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.body.sm(), "mt-2"), children: loadingText })
|
|
1801
1808
|
]
|
|
1802
1809
|
}
|
|
1803
1810
|
);
|
|
@@ -1809,8 +1816,8 @@ const defaultIcons = {
|
|
|
1809
1816
|
attention: "🔔",
|
|
1810
1817
|
error: "✕"
|
|
1811
1818
|
};
|
|
1812
|
-
const AlertTitle = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("
|
|
1813
|
-
const AlertDescription = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(
|
|
1819
|
+
const AlertTitle = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.label.default(), "mb-1", className), children });
|
|
1820
|
+
const AlertDescription = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.body.sm(), className), children });
|
|
1814
1821
|
const Alert = ({
|
|
1815
1822
|
variant = "info",
|
|
1816
1823
|
title,
|
|
@@ -1831,8 +1838,8 @@ const Alert = ({
|
|
|
1831
1838
|
children: [
|
|
1832
1839
|
IconComponent && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-shrink-0", children: IconComponent }),
|
|
1833
1840
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1", children: [
|
|
1834
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "
|
|
1835
|
-
description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className:
|
|
1841
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.label.default(), "mb-1"), children: title }),
|
|
1842
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: design.textVariants.body.sm(), children: description }),
|
|
1836
1843
|
children
|
|
1837
1844
|
] })
|
|
1838
1845
|
]
|
|
@@ -2077,6 +2084,11 @@ const Stack = ({
|
|
|
2077
2084
|
};
|
|
2078
2085
|
const VStack = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "vertical", ...props });
|
|
2079
2086
|
const HStack = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "horizontal", ...props });
|
|
2087
|
+
const lineVariantClasses = {
|
|
2088
|
+
light: "bg-gray-200 dark:bg-gray-700",
|
|
2089
|
+
medium: "bg-gray-300 dark:bg-gray-600",
|
|
2090
|
+
dark: "bg-gray-400 dark:bg-gray-500"
|
|
2091
|
+
};
|
|
2080
2092
|
const Divider = ({
|
|
2081
2093
|
label,
|
|
2082
2094
|
labelPosition = "center",
|
|
@@ -2109,18 +2121,13 @@ const Divider = ({
|
|
|
2109
2121
|
medium: 2,
|
|
2110
2122
|
thick: 4
|
|
2111
2123
|
};
|
|
2112
|
-
const variantClasses = {
|
|
2113
|
-
light: "bg-gray-200 dark:bg-gray-700",
|
|
2114
|
-
medium: "bg-gray-300 dark:bg-gray-600",
|
|
2115
|
-
dark: "bg-gray-400 dark:bg-gray-500"
|
|
2116
|
-
};
|
|
2117
2124
|
if (orientation === "vertical") {
|
|
2118
2125
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2119
2126
|
reactNative.View,
|
|
2120
2127
|
{
|
|
2121
2128
|
className: cn(
|
|
2122
2129
|
"self-stretch",
|
|
2123
|
-
|
|
2130
|
+
lineVariantClasses[variant],
|
|
2124
2131
|
spacingClasses.vertical[spacing],
|
|
2125
2132
|
className
|
|
2126
2133
|
),
|
|
@@ -2136,7 +2143,7 @@ const Divider = ({
|
|
|
2136
2143
|
{
|
|
2137
2144
|
className: cn(
|
|
2138
2145
|
"w-full",
|
|
2139
|
-
|
|
2146
|
+
lineVariantClasses[variant],
|
|
2140
2147
|
spacingClasses.horizontal[spacing],
|
|
2141
2148
|
lineClassName,
|
|
2142
2149
|
className
|
|
@@ -2167,24 +2174,15 @@ const Divider = ({
|
|
|
2167
2174
|
labelPosition !== "left" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2168
2175
|
reactNative.View,
|
|
2169
2176
|
{
|
|
2170
|
-
className: cn("flex-1",
|
|
2177
|
+
className: cn("flex-1", lineVariantClasses[variant], lineClassName),
|
|
2171
2178
|
style: { height: thicknessValues[thickness] }
|
|
2172
2179
|
}
|
|
2173
2180
|
),
|
|
2174
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2175
|
-
reactNative.Text,
|
|
2176
|
-
{
|
|
2177
|
-
className: cn(
|
|
2178
|
-
design.textVariants.body.sm(),
|
|
2179
|
-
"px-3 text-gray-500 dark:text-gray-400"
|
|
2180
|
-
),
|
|
2181
|
-
children: label
|
|
2182
|
-
}
|
|
2183
|
-
),
|
|
2181
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.caption.default(), "px-3"), children: label }),
|
|
2184
2182
|
labelPosition !== "right" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2185
2183
|
reactNative.View,
|
|
2186
2184
|
{
|
|
2187
|
-
className: cn("flex-1",
|
|
2185
|
+
className: cn("flex-1", lineVariantClasses[variant], lineClassName),
|
|
2188
2186
|
style: { height: thicknessValues[thickness] }
|
|
2189
2187
|
}
|
|
2190
2188
|
)
|
|
@@ -2422,7 +2420,7 @@ const Label = React__namespace.forwardRef(
|
|
|
2422
2420
|
...props,
|
|
2423
2421
|
children: [
|
|
2424
2422
|
children,
|
|
2425
|
-
required && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-red-
|
|
2423
|
+
required && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-red-600 dark:text-red-400 ml-1", children: "*" })
|
|
2426
2424
|
]
|
|
2427
2425
|
}
|
|
2428
2426
|
);
|
|
@@ -2479,7 +2477,7 @@ const TextArea = ({
|
|
|
2479
2477
|
readOnly && "bg-gray-50 dark:bg-gray-900",
|
|
2480
2478
|
inputClassName
|
|
2481
2479
|
),
|
|
2482
|
-
placeholderTextColor:
|
|
2480
|
+
placeholderTextColor: design.colors.raw.neutral[400],
|
|
2483
2481
|
accessibilityRole: "text",
|
|
2484
2482
|
accessibilityState: { disabled },
|
|
2485
2483
|
...textInputProps
|
|
@@ -2501,6 +2499,28 @@ const TextArea = ({
|
|
|
2501
2499
|
) })
|
|
2502
2500
|
] });
|
|
2503
2501
|
};
|
|
2502
|
+
let _checkboxColors = null;
|
|
2503
|
+
function getCheckboxColors() {
|
|
2504
|
+
if (!_checkboxColors) _checkboxColors = buildCheckboxColors();
|
|
2505
|
+
return _checkboxColors;
|
|
2506
|
+
}
|
|
2507
|
+
function buildCheckboxColors() {
|
|
2508
|
+
function extractCheckedColor(base) {
|
|
2509
|
+
const parts = base.split(" ");
|
|
2510
|
+
const bg = parts.find(
|
|
2511
|
+
(c) => c.startsWith("bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
2512
|
+
) || "";
|
|
2513
|
+
return `${bg} ${bg.replace("bg-", "border-")}`;
|
|
2514
|
+
}
|
|
2515
|
+
const btn = design.colors.component.button;
|
|
2516
|
+
return {
|
|
2517
|
+
primary: extractCheckedColor(btn.primary.base),
|
|
2518
|
+
success: extractCheckedColor(btn.success.base),
|
|
2519
|
+
warning: "bg-yellow-600 border-yellow-600",
|
|
2520
|
+
// DS has no yellow button; local fallback
|
|
2521
|
+
error: extractCheckedColor(btn.destructive.base)
|
|
2522
|
+
};
|
|
2523
|
+
}
|
|
2504
2524
|
const Checkbox = ({
|
|
2505
2525
|
checked: controlledChecked,
|
|
2506
2526
|
defaultChecked = false,
|
|
@@ -2524,31 +2544,33 @@ const Checkbox = ({
|
|
|
2524
2544
|
sm: {
|
|
2525
2545
|
box: "w-4 h-4",
|
|
2526
2546
|
check: "w-2 h-2",
|
|
2527
|
-
text:
|
|
2528
|
-
desc:
|
|
2547
|
+
text: design.designTokens.typography.size.sm,
|
|
2548
|
+
desc: design.designTokens.typography.size.xs
|
|
2529
2549
|
},
|
|
2530
2550
|
md: {
|
|
2531
2551
|
box: "w-5 h-5",
|
|
2532
2552
|
check: "w-3 h-3",
|
|
2533
|
-
text:
|
|
2534
|
-
desc:
|
|
2553
|
+
text: design.designTokens.typography.size.base,
|
|
2554
|
+
desc: design.designTokens.typography.size.sm
|
|
2535
2555
|
},
|
|
2536
2556
|
lg: {
|
|
2537
2557
|
box: "w-6 h-6",
|
|
2538
2558
|
check: "w-4 h-4",
|
|
2539
|
-
text:
|
|
2540
|
-
desc:
|
|
2559
|
+
text: design.designTokens.typography.size.lg,
|
|
2560
|
+
desc: design.designTokens.typography.size.base
|
|
2541
2561
|
}
|
|
2542
2562
|
};
|
|
2543
2563
|
const getVariantClasses = () => {
|
|
2564
|
+
const checkedColors = getCheckboxColors();
|
|
2544
2565
|
if (error) {
|
|
2545
|
-
return checked ?
|
|
2566
|
+
return checked ? checkedColors.error : "border-red-600 dark:border-red-500";
|
|
2546
2567
|
}
|
|
2568
|
+
const unchecked = "border-gray-300 dark:border-gray-600";
|
|
2547
2569
|
const variantClasses = {
|
|
2548
|
-
primary: checked ?
|
|
2549
|
-
success: checked ?
|
|
2550
|
-
warning: checked ?
|
|
2551
|
-
error: checked ?
|
|
2570
|
+
primary: checked ? checkedColors.primary : unchecked,
|
|
2571
|
+
success: checked ? checkedColors.success : unchecked,
|
|
2572
|
+
warning: checked ? checkedColors.warning : unchecked,
|
|
2573
|
+
error: checked ? checkedColors.error : unchecked
|
|
2552
2574
|
};
|
|
2553
2575
|
return variantClasses[variant];
|
|
2554
2576
|
};
|
|
@@ -2617,7 +2639,13 @@ const Checkbox = ({
|
|
|
2617
2639
|
]
|
|
2618
2640
|
}
|
|
2619
2641
|
),
|
|
2620
|
-
errorMessage && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2642
|
+
errorMessage && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2643
|
+
reactNative.Text,
|
|
2644
|
+
{
|
|
2645
|
+
className: `mt-1 ${design.designTokens.typography.size.sm} text-red-600 dark:text-red-400`,
|
|
2646
|
+
children: errorMessage
|
|
2647
|
+
}
|
|
2648
|
+
)
|
|
2621
2649
|
] });
|
|
2622
2650
|
};
|
|
2623
2651
|
const Switch = React__namespace.forwardRef(
|
|
@@ -2713,8 +2741,8 @@ const HelperText = ({
|
|
|
2713
2741
|
...textProps
|
|
2714
2742
|
}) => {
|
|
2715
2743
|
const sizeClasses = {
|
|
2716
|
-
sm:
|
|
2717
|
-
base:
|
|
2744
|
+
sm: design.designTokens.typography.size.sm,
|
|
2745
|
+
base: design.designTokens.typography.size.base
|
|
2718
2746
|
};
|
|
2719
2747
|
const iconSize = {
|
|
2720
2748
|
sm: "w-4 h-4",
|
|
@@ -2722,19 +2750,19 @@ const HelperText = ({
|
|
|
2722
2750
|
};
|
|
2723
2751
|
const variantConfig2 = {
|
|
2724
2752
|
default: {
|
|
2725
|
-
text:
|
|
2753
|
+
text: design.colors.component.alert.info.icon,
|
|
2726
2754
|
icon: "ℹ"
|
|
2727
2755
|
},
|
|
2728
2756
|
error: {
|
|
2729
|
-
text:
|
|
2757
|
+
text: design.colors.component.alert.error.icon,
|
|
2730
2758
|
icon: "⚠"
|
|
2731
2759
|
},
|
|
2732
2760
|
success: {
|
|
2733
|
-
text:
|
|
2761
|
+
text: design.colors.component.alert.success.icon,
|
|
2734
2762
|
icon: "✓"
|
|
2735
2763
|
},
|
|
2736
2764
|
warning: {
|
|
2737
|
-
text:
|
|
2765
|
+
text: design.colors.component.alert.warning.icon,
|
|
2738
2766
|
icon: "⚠"
|
|
2739
2767
|
}
|
|
2740
2768
|
};
|
|
@@ -2744,6 +2772,7 @@ const HelperText = ({
|
|
|
2744
2772
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(sizeClasses[size], config.text), ...textProps, children })
|
|
2745
2773
|
] });
|
|
2746
2774
|
};
|
|
2775
|
+
const { typography: typography$h } = design.designTokens;
|
|
2747
2776
|
const Select = ({
|
|
2748
2777
|
value,
|
|
2749
2778
|
onValueChange,
|
|
@@ -2782,8 +2811,8 @@ const Select = ({
|
|
|
2782
2811
|
reactNative.Text,
|
|
2783
2812
|
{
|
|
2784
2813
|
className: cn(
|
|
2785
|
-
|
|
2786
|
-
item.value === value ?
|
|
2814
|
+
typography$h.size.base,
|
|
2815
|
+
item.value === value ? `text-blue-600 dark:text-blue-400 ${typography$h.weight.medium}` : "text-gray-900 dark:text-gray-100"
|
|
2787
2816
|
),
|
|
2788
2817
|
children: item.label
|
|
2789
2818
|
}
|
|
@@ -2812,7 +2841,8 @@ const Select = ({
|
|
|
2812
2841
|
reactNative.Text,
|
|
2813
2842
|
{
|
|
2814
2843
|
className: cn(
|
|
2815
|
-
|
|
2844
|
+
typography$h.size.base,
|
|
2845
|
+
"flex-1",
|
|
2816
2846
|
selectedOption ? "text-gray-900 dark:text-gray-100" : "text-gray-400 dark:text-gray-500"
|
|
2817
2847
|
),
|
|
2818
2848
|
numberOfLines: 1,
|
|
@@ -2832,8 +2862,27 @@ const Select = ({
|
|
|
2832
2862
|
onRequestClose: () => setIsOpen(false),
|
|
2833
2863
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-1 justify-end bg-black/50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.SafeAreaView, { className: "bg-white dark:bg-gray-800 rounded-t-xl", children: [
|
|
2834
2864
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex flex-row items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: [
|
|
2835
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Pressable, { onPress: () => setIsOpen(false), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2836
|
-
|
|
2865
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Pressable, { onPress: () => setIsOpen(false), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2866
|
+
reactNative.Text,
|
|
2867
|
+
{
|
|
2868
|
+
className: cn(
|
|
2869
|
+
"text-blue-600 dark:text-blue-400",
|
|
2870
|
+
typography$h.size.base
|
|
2871
|
+
),
|
|
2872
|
+
children: "Cancel"
|
|
2873
|
+
}
|
|
2874
|
+
) }),
|
|
2875
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2876
|
+
reactNative.Text,
|
|
2877
|
+
{
|
|
2878
|
+
className: cn(
|
|
2879
|
+
typography$h.size.base,
|
|
2880
|
+
typography$h.weight.semibold,
|
|
2881
|
+
"text-gray-900 dark:text-white"
|
|
2882
|
+
),
|
|
2883
|
+
children: title
|
|
2884
|
+
}
|
|
2885
|
+
),
|
|
2837
2886
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { style: { width: 60 } })
|
|
2838
2887
|
] }),
|
|
2839
2888
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -2969,11 +3018,11 @@ const styles$4 = reactNative.StyleSheet.create({
|
|
|
2969
3018
|
alignItems: "center",
|
|
2970
3019
|
justifyContent: "space-between",
|
|
2971
3020
|
borderWidth: 1,
|
|
2972
|
-
borderColor:
|
|
3021
|
+
borderColor: design.colors.raw.neutral[300],
|
|
2973
3022
|
borderRadius: 8,
|
|
2974
3023
|
paddingHorizontal: 12,
|
|
2975
3024
|
paddingVertical: 12,
|
|
2976
|
-
backgroundColor:
|
|
3025
|
+
backgroundColor: design.colors.raw.neutral[0]
|
|
2977
3026
|
},
|
|
2978
3027
|
triggerDisabled: {
|
|
2979
3028
|
opacity: 0.5
|
|
@@ -2981,19 +3030,19 @@ const styles$4 = reactNative.StyleSheet.create({
|
|
|
2981
3030
|
triggerText: {
|
|
2982
3031
|
flex: 1,
|
|
2983
3032
|
fontSize: 16,
|
|
2984
|
-
color:
|
|
3033
|
+
color: design.colors.raw.neutral[900]
|
|
2985
3034
|
},
|
|
2986
3035
|
triggerPlaceholder: {
|
|
2987
|
-
color:
|
|
3036
|
+
color: design.colors.raw.neutral[400]
|
|
2988
3037
|
},
|
|
2989
3038
|
triggerArrow: {
|
|
2990
3039
|
fontSize: 10,
|
|
2991
|
-
color:
|
|
3040
|
+
color: design.colors.raw.neutral[400],
|
|
2992
3041
|
marginLeft: 8
|
|
2993
3042
|
},
|
|
2994
3043
|
modalContainer: {
|
|
2995
3044
|
flex: 1,
|
|
2996
|
-
backgroundColor:
|
|
3045
|
+
backgroundColor: design.colors.raw.neutral[0]
|
|
2997
3046
|
},
|
|
2998
3047
|
modalHeader: {
|
|
2999
3048
|
flexDirection: "row",
|
|
@@ -3002,12 +3051,12 @@ const styles$4 = reactNative.StyleSheet.create({
|
|
|
3002
3051
|
paddingHorizontal: 16,
|
|
3003
3052
|
paddingVertical: 12,
|
|
3004
3053
|
borderBottomWidth: 1,
|
|
3005
|
-
borderBottomColor:
|
|
3054
|
+
borderBottomColor: design.colors.raw.neutral[200]
|
|
3006
3055
|
},
|
|
3007
3056
|
modalTitle: {
|
|
3008
3057
|
fontSize: 18,
|
|
3009
3058
|
fontWeight: "600",
|
|
3010
|
-
color:
|
|
3059
|
+
color: design.colors.raw.neutral[900]
|
|
3011
3060
|
},
|
|
3012
3061
|
closeButton: {
|
|
3013
3062
|
padding: 8
|
|
@@ -3015,7 +3064,7 @@ const styles$4 = reactNative.StyleSheet.create({
|
|
|
3015
3064
|
closeButtonText: {
|
|
3016
3065
|
fontSize: 16,
|
|
3017
3066
|
fontWeight: "600",
|
|
3018
|
-
color:
|
|
3067
|
+
color: design.colors.raw.blue[500]
|
|
3019
3068
|
},
|
|
3020
3069
|
listContent: {
|
|
3021
3070
|
padding: 16
|
|
@@ -3024,27 +3073,27 @@ const styles$4 = reactNative.StyleSheet.create({
|
|
|
3024
3073
|
flexDirection: "row",
|
|
3025
3074
|
alignItems: "center",
|
|
3026
3075
|
padding: 16,
|
|
3027
|
-
backgroundColor:
|
|
3076
|
+
backgroundColor: design.colors.raw.neutral[50],
|
|
3028
3077
|
borderRadius: 12
|
|
3029
3078
|
},
|
|
3030
3079
|
optionItemSelected: {
|
|
3031
|
-
backgroundColor:
|
|
3080
|
+
backgroundColor: design.colors.raw.blue[100]
|
|
3032
3081
|
},
|
|
3033
3082
|
optionLabel: {
|
|
3034
3083
|
flex: 1,
|
|
3035
3084
|
fontSize: 16,
|
|
3036
|
-
color:
|
|
3085
|
+
color: design.colors.raw.neutral[900]
|
|
3037
3086
|
},
|
|
3038
3087
|
optionLabelSelected: {
|
|
3039
3088
|
fontWeight: "600",
|
|
3040
|
-
color:
|
|
3089
|
+
color: design.colors.raw.blue[500]
|
|
3041
3090
|
},
|
|
3042
3091
|
optionDisabled: {
|
|
3043
3092
|
opacity: 0.5
|
|
3044
3093
|
},
|
|
3045
3094
|
checkmark: {
|
|
3046
3095
|
fontSize: 18,
|
|
3047
|
-
color:
|
|
3096
|
+
color: design.colors.raw.blue[500],
|
|
3048
3097
|
fontWeight: "bold"
|
|
3049
3098
|
},
|
|
3050
3099
|
separator: {
|
|
@@ -3130,7 +3179,7 @@ const SearchInput = ({
|
|
|
3130
3179
|
disabled && "opacity-50",
|
|
3131
3180
|
loading && "opacity-60"
|
|
3132
3181
|
),
|
|
3133
|
-
placeholderTextColor:
|
|
3182
|
+
placeholderTextColor: design.colors.raw.neutral[400],
|
|
3134
3183
|
accessibilityRole: "search",
|
|
3135
3184
|
accessibilityState: { disabled },
|
|
3136
3185
|
...textInputProps
|
|
@@ -3147,7 +3196,7 @@ const SearchInput = ({
|
|
|
3147
3196
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(sizeConfig2.icon, "text-gray-400"), children: "✕" })
|
|
3148
3197
|
}
|
|
3149
3198
|
),
|
|
3150
|
-
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "absolute inset-y-0 right-0 flex items-center justify-center pr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color:
|
|
3199
|
+
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "absolute inset-y-0 right-0 flex items-center justify-center pr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color: design.colors.raw.neutral[400] }) })
|
|
3151
3200
|
] });
|
|
3152
3201
|
};
|
|
3153
3202
|
const NumberInput = ({
|
|
@@ -3351,6 +3400,15 @@ const NumberInput = ({
|
|
|
3351
3400
|
}
|
|
3352
3401
|
);
|
|
3353
3402
|
};
|
|
3403
|
+
const { typography: typography$g } = design.designTokens;
|
|
3404
|
+
const colorClasses$1 = {
|
|
3405
|
+
default: "text-gray-900 dark:text-gray-100",
|
|
3406
|
+
muted: "text-gray-600 dark:text-gray-400",
|
|
3407
|
+
primary: "text-blue-600 dark:text-blue-400",
|
|
3408
|
+
success: "text-green-600 dark:text-green-400",
|
|
3409
|
+
warning: "text-yellow-600 dark:text-yellow-400",
|
|
3410
|
+
danger: "text-red-600 dark:text-red-400"
|
|
3411
|
+
};
|
|
3354
3412
|
const Text = ({
|
|
3355
3413
|
children,
|
|
3356
3414
|
size = "base",
|
|
@@ -3361,51 +3419,15 @@ const Text = ({
|
|
|
3361
3419
|
numberOfLines,
|
|
3362
3420
|
className
|
|
3363
3421
|
}) => {
|
|
3364
|
-
const sizeClasses = {
|
|
3365
|
-
xs: "text-xs",
|
|
3366
|
-
sm: "text-sm",
|
|
3367
|
-
base: "text-base",
|
|
3368
|
-
lg: "text-lg",
|
|
3369
|
-
xl: "text-xl",
|
|
3370
|
-
"2xl": "text-2xl",
|
|
3371
|
-
"3xl": "text-3xl",
|
|
3372
|
-
"4xl": "text-4xl"
|
|
3373
|
-
};
|
|
3374
|
-
const weightClasses = {
|
|
3375
|
-
light: "font-light",
|
|
3376
|
-
normal: "font-normal",
|
|
3377
|
-
medium: "font-medium",
|
|
3378
|
-
semibold: "font-semibold",
|
|
3379
|
-
bold: "font-bold"
|
|
3380
|
-
};
|
|
3381
|
-
const colorClasses = {
|
|
3382
|
-
default: "text-gray-900 dark:text-gray-100",
|
|
3383
|
-
muted: "text-gray-600 dark:text-gray-400",
|
|
3384
|
-
primary: "text-blue-600 dark:text-blue-400",
|
|
3385
|
-
success: "text-green-600 dark:text-green-400",
|
|
3386
|
-
warning: "text-yellow-600 dark:text-yellow-400",
|
|
3387
|
-
danger: "text-red-600 dark:text-red-400"
|
|
3388
|
-
};
|
|
3389
|
-
const alignClasses = align ? {
|
|
3390
|
-
left: "text-left",
|
|
3391
|
-
center: "text-center",
|
|
3392
|
-
right: "text-right"
|
|
3393
|
-
}[align] : "";
|
|
3394
|
-
const transformClasses = {
|
|
3395
|
-
none: "",
|
|
3396
|
-
uppercase: "uppercase",
|
|
3397
|
-
lowercase: "lowercase",
|
|
3398
|
-
capitalize: "capitalize"
|
|
3399
|
-
};
|
|
3400
3422
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3401
3423
|
reactNative.Text,
|
|
3402
3424
|
{
|
|
3403
3425
|
className: cn(
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
colorClasses[color],
|
|
3407
|
-
|
|
3408
|
-
|
|
3426
|
+
typography$g.size[size],
|
|
3427
|
+
typography$g.weight[weight],
|
|
3428
|
+
colorClasses$1[color],
|
|
3429
|
+
align ? typography$g.align[align] : "",
|
|
3430
|
+
transform !== "none" ? typography$g.transform[transform] : "",
|
|
3409
3431
|
className
|
|
3410
3432
|
),
|
|
3411
3433
|
numberOfLines,
|
|
@@ -3413,6 +3435,12 @@ const Text = ({
|
|
|
3413
3435
|
}
|
|
3414
3436
|
);
|
|
3415
3437
|
};
|
|
3438
|
+
const { typography: typography$f } = design.designTokens;
|
|
3439
|
+
const colorClasses = {
|
|
3440
|
+
default: "text-gray-900 dark:text-gray-100",
|
|
3441
|
+
muted: "text-gray-700 dark:text-gray-300",
|
|
3442
|
+
primary: "text-blue-600 dark:text-blue-400"
|
|
3443
|
+
};
|
|
3416
3444
|
const Heading = ({
|
|
3417
3445
|
children,
|
|
3418
3446
|
level = 2,
|
|
@@ -3431,39 +3459,16 @@ const Heading = ({
|
|
|
3431
3459
|
6: "base"
|
|
3432
3460
|
};
|
|
3433
3461
|
const actualSize = size || defaultSizes[level];
|
|
3434
|
-
const sizeClasses = {
|
|
3435
|
-
"4xl": "text-4xl",
|
|
3436
|
-
"3xl": "text-3xl",
|
|
3437
|
-
"2xl": "text-2xl",
|
|
3438
|
-
xl: "text-xl",
|
|
3439
|
-
lg: "text-lg",
|
|
3440
|
-
base: "text-base"
|
|
3441
|
-
};
|
|
3442
|
-
const weightClasses = {
|
|
3443
|
-
normal: "font-normal",
|
|
3444
|
-
medium: "font-medium",
|
|
3445
|
-
semibold: "font-semibold",
|
|
3446
|
-
bold: "font-bold",
|
|
3447
|
-
extrabold: "font-extrabold"
|
|
3448
|
-
};
|
|
3449
|
-
const colorClasses = {
|
|
3450
|
-
default: "text-gray-900 dark:text-gray-100",
|
|
3451
|
-
muted: "text-gray-700 dark:text-gray-300",
|
|
3452
|
-
primary: "text-blue-600 dark:text-blue-400"
|
|
3453
|
-
};
|
|
3454
|
-
const alignClasses = align ? {
|
|
3455
|
-
left: "text-left",
|
|
3456
|
-
center: "text-center",
|
|
3457
|
-
right: "text-right"
|
|
3458
|
-
}[align] : "";
|
|
3459
3462
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3460
3463
|
reactNative.Text,
|
|
3461
3464
|
{
|
|
3462
3465
|
className: cn(
|
|
3463
|
-
|
|
3464
|
-
|
|
3466
|
+
typography$f.size[actualSize],
|
|
3467
|
+
typography$f.weight[weight],
|
|
3468
|
+
typography$f.leading.heading,
|
|
3469
|
+
typography$f.tracking.heading,
|
|
3465
3470
|
colorClasses[color],
|
|
3466
|
-
|
|
3471
|
+
align ? typography$f.align[align] : "",
|
|
3467
3472
|
className
|
|
3468
3473
|
),
|
|
3469
3474
|
accessibilityRole: "header",
|
|
@@ -3471,6 +3476,41 @@ const Heading = ({
|
|
|
3471
3476
|
}
|
|
3472
3477
|
);
|
|
3473
3478
|
};
|
|
3479
|
+
let _codeColors = null;
|
|
3480
|
+
function getCodeColors() {
|
|
3481
|
+
if (!_codeColors) _codeColors = buildCodeColors();
|
|
3482
|
+
return _codeColors;
|
|
3483
|
+
}
|
|
3484
|
+
function buildCodeColors() {
|
|
3485
|
+
const alert2 = design.colors.component.alert;
|
|
3486
|
+
function splitClasses(base, dark) {
|
|
3487
|
+
const all = `${base} ${dark}`.split(" ");
|
|
3488
|
+
return {
|
|
3489
|
+
bg: all.filter((c) => c.includes("bg-")).join(" "),
|
|
3490
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
3491
|
+
};
|
|
3492
|
+
}
|
|
3493
|
+
const info = splitClasses(alert2.info.base, alert2.info.dark);
|
|
3494
|
+
const success = splitClasses(alert2.success.base, alert2.success.dark);
|
|
3495
|
+
const warning = splitClasses(alert2.warning.base, alert2.warning.dark);
|
|
3496
|
+
const error = splitClasses(alert2.error.base, alert2.error.dark);
|
|
3497
|
+
return {
|
|
3498
|
+
bg: {
|
|
3499
|
+
default: "bg-gray-100 dark:bg-gray-800",
|
|
3500
|
+
primary: info.bg,
|
|
3501
|
+
success: success.bg,
|
|
3502
|
+
warning: warning.bg,
|
|
3503
|
+
danger: error.bg
|
|
3504
|
+
},
|
|
3505
|
+
text: {
|
|
3506
|
+
default: "text-gray-900 dark:text-gray-100",
|
|
3507
|
+
primary: info.text,
|
|
3508
|
+
success: success.text,
|
|
3509
|
+
warning: warning.text,
|
|
3510
|
+
danger: error.text
|
|
3511
|
+
}
|
|
3512
|
+
};
|
|
3513
|
+
}
|
|
3474
3514
|
const Code = ({
|
|
3475
3515
|
children,
|
|
3476
3516
|
size = "md",
|
|
@@ -3478,24 +3518,13 @@ const Code = ({
|
|
|
3478
3518
|
className
|
|
3479
3519
|
}) => {
|
|
3480
3520
|
const sizeClasses = {
|
|
3481
|
-
sm:
|
|
3482
|
-
md:
|
|
3483
|
-
lg:
|
|
3484
|
-
};
|
|
3485
|
-
const variantBgClasses = {
|
|
3486
|
-
default: "bg-gray-100 dark:bg-gray-800",
|
|
3487
|
-
primary: "bg-blue-50 dark:bg-blue-900/30",
|
|
3488
|
-
success: "bg-green-50 dark:bg-green-900/30",
|
|
3489
|
-
warning: "bg-yellow-50 dark:bg-yellow-900/30",
|
|
3490
|
-
danger: "bg-red-50 dark:bg-red-900/30"
|
|
3491
|
-
};
|
|
3492
|
-
const variantTextClasses = {
|
|
3493
|
-
default: "text-gray-900 dark:text-gray-100",
|
|
3494
|
-
primary: "text-blue-700 dark:text-blue-300",
|
|
3495
|
-
success: "text-green-700 dark:text-green-300",
|
|
3496
|
-
warning: "text-yellow-700 dark:text-yellow-300",
|
|
3497
|
-
danger: "text-red-700 dark:text-red-300"
|
|
3521
|
+
sm: `${design.designTokens.typography.size.xs} px-1 py-0.5`,
|
|
3522
|
+
md: `${design.designTokens.typography.size.sm} px-1.5 py-0.5`,
|
|
3523
|
+
lg: `${design.designTokens.typography.size.base} px-2 py-1`
|
|
3498
3524
|
};
|
|
3525
|
+
const codeColors = getCodeColors();
|
|
3526
|
+
const variantBgClasses = codeColors.bg;
|
|
3527
|
+
const variantTextClasses = codeColors.text;
|
|
3499
3528
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3500
3529
|
reactNative.View,
|
|
3501
3530
|
{
|
|
@@ -3508,7 +3537,11 @@ const Code = ({
|
|
|
3508
3537
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3509
3538
|
reactNative.Text,
|
|
3510
3539
|
{
|
|
3511
|
-
className: cn(
|
|
3540
|
+
className: cn(
|
|
3541
|
+
design.designTokens.typography.family.mono,
|
|
3542
|
+
design.designTokens.typography.weight.medium,
|
|
3543
|
+
variantTextClasses[variant]
|
|
3544
|
+
),
|
|
3512
3545
|
style: { fontFamily: "monospace" },
|
|
3513
3546
|
children
|
|
3514
3547
|
}
|
|
@@ -3567,6 +3600,28 @@ const AppVersion = ({
|
|
|
3567
3600
|
}
|
|
3568
3601
|
);
|
|
3569
3602
|
};
|
|
3603
|
+
function splitBadgeClasses$1(base, dark) {
|
|
3604
|
+
const all = `${base} ${dark}`.split(" ");
|
|
3605
|
+
return {
|
|
3606
|
+
bg: all.filter((c) => c.includes("bg-")).join(" "),
|
|
3607
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
3608
|
+
};
|
|
3609
|
+
}
|
|
3610
|
+
let _badgeColors = null;
|
|
3611
|
+
function getBadgeColors() {
|
|
3612
|
+
if (!_badgeColors) _badgeColors = buildBadgeColors();
|
|
3613
|
+
return _badgeColors;
|
|
3614
|
+
}
|
|
3615
|
+
function buildBadgeColors() {
|
|
3616
|
+
const badge = design.colors.component.badge;
|
|
3617
|
+
return {
|
|
3618
|
+
default: splitBadgeClasses$1(badge.default.base, badge.default.dark),
|
|
3619
|
+
primary: splitBadgeClasses$1(badge.primary.base, badge.primary.dark),
|
|
3620
|
+
success: splitBadgeClasses$1(badge.success.base, badge.success.dark),
|
|
3621
|
+
warning: splitBadgeClasses$1(badge.warning.base, badge.warning.dark),
|
|
3622
|
+
error: splitBadgeClasses$1(badge.error.base, badge.error.dark)
|
|
3623
|
+
};
|
|
3624
|
+
}
|
|
3570
3625
|
const Badge = ({
|
|
3571
3626
|
children,
|
|
3572
3627
|
variant = "default",
|
|
@@ -3582,29 +3637,30 @@ const Badge = ({
|
|
|
3582
3637
|
maxCount,
|
|
3583
3638
|
className
|
|
3584
3639
|
}) => {
|
|
3640
|
+
const ds = getBadgeColors();
|
|
3585
3641
|
const variantClasses = {
|
|
3586
|
-
default:
|
|
3587
|
-
primary:
|
|
3588
|
-
success:
|
|
3589
|
-
warning:
|
|
3590
|
-
danger:
|
|
3591
|
-
info:
|
|
3642
|
+
default: ds.default.bg,
|
|
3643
|
+
primary: ds.primary.bg,
|
|
3644
|
+
success: ds.success.bg,
|
|
3645
|
+
warning: ds.warning.bg,
|
|
3646
|
+
danger: ds.error.bg,
|
|
3647
|
+
info: ds.primary.bg,
|
|
3592
3648
|
purple: "bg-purple-100 dark:bg-purple-900/30"
|
|
3593
3649
|
};
|
|
3594
3650
|
const variantTextClasses = {
|
|
3595
|
-
default:
|
|
3596
|
-
primary:
|
|
3597
|
-
success:
|
|
3598
|
-
warning:
|
|
3599
|
-
danger:
|
|
3600
|
-
info:
|
|
3651
|
+
default: ds.default.text,
|
|
3652
|
+
primary: ds.primary.text,
|
|
3653
|
+
success: ds.success.text,
|
|
3654
|
+
warning: ds.warning.text,
|
|
3655
|
+
danger: ds.error.text,
|
|
3656
|
+
info: ds.primary.text,
|
|
3601
3657
|
purple: "text-purple-800 dark:text-purple-400"
|
|
3602
3658
|
};
|
|
3603
3659
|
const outlineClasses = {
|
|
3604
3660
|
default: "border border-gray-300 dark:border-gray-600",
|
|
3605
3661
|
primary: "border border-blue-600 dark:border-blue-400",
|
|
3606
3662
|
success: "border border-green-600 dark:border-green-400",
|
|
3607
|
-
warning: "border border-
|
|
3663
|
+
warning: "border border-orange-600 dark:border-orange-400",
|
|
3608
3664
|
danger: "border border-red-600 dark:border-red-400",
|
|
3609
3665
|
info: "border border-blue-600 dark:border-blue-400",
|
|
3610
3666
|
purple: "border border-purple-600 dark:border-purple-400"
|
|
@@ -3613,7 +3669,7 @@ const Badge = ({
|
|
|
3613
3669
|
default: "text-gray-700 dark:text-gray-300",
|
|
3614
3670
|
primary: "text-blue-600 dark:text-blue-400",
|
|
3615
3671
|
success: "text-green-600 dark:text-green-400",
|
|
3616
|
-
warning: "text-
|
|
3672
|
+
warning: "text-orange-600 dark:text-orange-400",
|
|
3617
3673
|
danger: "text-red-600 dark:text-red-400",
|
|
3618
3674
|
info: "text-blue-600 dark:text-blue-400",
|
|
3619
3675
|
purple: "text-purple-600 dark:text-purple-400"
|
|
@@ -3623,16 +3679,11 @@ const Badge = ({
|
|
|
3623
3679
|
md: "px-2.5 py-1",
|
|
3624
3680
|
lg: "px-3 py-1.5"
|
|
3625
3681
|
};
|
|
3626
|
-
const textSizeClasses = {
|
|
3627
|
-
sm: "text-xs",
|
|
3628
|
-
md: "text-sm",
|
|
3629
|
-
lg: "text-base"
|
|
3630
|
-
};
|
|
3631
3682
|
const dotColorClasses = {
|
|
3632
3683
|
default: "bg-gray-600 dark:bg-gray-400",
|
|
3633
3684
|
primary: "bg-blue-600 dark:bg-blue-400",
|
|
3634
3685
|
success: "bg-green-600 dark:bg-green-400",
|
|
3635
|
-
warning: "bg-
|
|
3686
|
+
warning: "bg-orange-600 dark:bg-orange-400",
|
|
3636
3687
|
danger: "bg-red-600 dark:bg-red-400",
|
|
3637
3688
|
info: "bg-blue-600 dark:bg-blue-400",
|
|
3638
3689
|
purple: "bg-purple-600 dark:bg-purple-400"
|
|
@@ -3645,9 +3696,15 @@ const Badge = ({
|
|
|
3645
3696
|
pill ? "rounded-full" : "rounded",
|
|
3646
3697
|
className
|
|
3647
3698
|
);
|
|
3699
|
+
const { typography: typography2 } = design.designTokens;
|
|
3700
|
+
const textSizeMap = {
|
|
3701
|
+
sm: typography2.size.xs,
|
|
3702
|
+
md: typography2.size.sm,
|
|
3703
|
+
lg: typography2.size.base
|
|
3704
|
+
};
|
|
3648
3705
|
const textClasses = cn(
|
|
3649
|
-
|
|
3650
|
-
|
|
3706
|
+
textSizeMap[size],
|
|
3707
|
+
typography2.weight.medium,
|
|
3651
3708
|
outline ? outlineTextClasses[variant] : variantTextClasses[variant]
|
|
3652
3709
|
);
|
|
3653
3710
|
const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -3720,10 +3777,14 @@ const Avatar = ({
|
|
|
3720
3777
|
xl: "w-4 h-4"
|
|
3721
3778
|
};
|
|
3722
3779
|
const statusClasses = {
|
|
3723
|
-
online:
|
|
3724
|
-
|
|
3780
|
+
online: design.statusIndicatorColors.success,
|
|
3781
|
+
// bg-green-500
|
|
3782
|
+
offline: design.statusIndicatorColors.neutral,
|
|
3783
|
+
// bg-gray-500
|
|
3725
3784
|
away: "bg-yellow-500",
|
|
3726
|
-
|
|
3785
|
+
// local fallback, no DS yellow status
|
|
3786
|
+
busy: design.statusIndicatorColors.error
|
|
3787
|
+
// bg-red-500
|
|
3727
3788
|
};
|
|
3728
3789
|
const generateInitials = (name2) => {
|
|
3729
3790
|
const parts = name2.trim().split(/\s+/);
|
|
@@ -4056,10 +4117,10 @@ const IconText = ({
|
|
|
4056
4117
|
};
|
|
4057
4118
|
const variantClasses = {
|
|
4058
4119
|
default: "text-gray-700 dark:text-gray-300",
|
|
4059
|
-
primary:
|
|
4060
|
-
success:
|
|
4061
|
-
warning:
|
|
4062
|
-
danger:
|
|
4120
|
+
primary: design.colors.component.alert.info.icon,
|
|
4121
|
+
success: design.colors.component.alert.success.icon,
|
|
4122
|
+
warning: design.colors.component.alert.warning.icon,
|
|
4123
|
+
danger: design.colors.component.alert.error.icon,
|
|
4063
4124
|
muted: "text-gray-500 dark:text-gray-400"
|
|
4064
4125
|
};
|
|
4065
4126
|
const layoutClasses = {
|
|
@@ -4123,6 +4184,19 @@ const FormattedNumber = ({
|
|
|
4123
4184
|
};
|
|
4124
4185
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(className), children: formatNumber() });
|
|
4125
4186
|
};
|
|
4187
|
+
const alert = design.colors.component.alert;
|
|
4188
|
+
function splitAlertClasses$1(base, dark) {
|
|
4189
|
+
const all = `${base} ${dark}`.split(" ");
|
|
4190
|
+
return {
|
|
4191
|
+
bg: all.filter((c) => c.includes("bg-")).join(" "),
|
|
4192
|
+
border: all.filter((c) => c.includes("border-")).join(" "),
|
|
4193
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
4194
|
+
};
|
|
4195
|
+
}
|
|
4196
|
+
const dsInfo = splitAlertClasses$1(alert.info.base, alert.info.dark);
|
|
4197
|
+
const dsSuccess = splitAlertClasses$1(alert.success.base, alert.success.dark);
|
|
4198
|
+
const dsWarning = splitAlertClasses$1(alert.warning.base, alert.warning.dark);
|
|
4199
|
+
const dsError = splitAlertClasses$1(alert.error.base, alert.error.dark);
|
|
4126
4200
|
const InfoBox = ({
|
|
4127
4201
|
children,
|
|
4128
4202
|
title,
|
|
@@ -4134,28 +4208,28 @@ const InfoBox = ({
|
|
|
4134
4208
|
}) => {
|
|
4135
4209
|
const variantClasses = {
|
|
4136
4210
|
info: {
|
|
4137
|
-
bg:
|
|
4138
|
-
border:
|
|
4139
|
-
title:
|
|
4140
|
-
text:
|
|
4211
|
+
bg: dsInfo.bg,
|
|
4212
|
+
border: dsInfo.border,
|
|
4213
|
+
title: dsInfo.text,
|
|
4214
|
+
text: dsInfo.text
|
|
4141
4215
|
},
|
|
4142
4216
|
success: {
|
|
4143
|
-
bg:
|
|
4144
|
-
border:
|
|
4145
|
-
title:
|
|
4146
|
-
text:
|
|
4217
|
+
bg: dsSuccess.bg,
|
|
4218
|
+
border: dsSuccess.border,
|
|
4219
|
+
title: dsSuccess.text,
|
|
4220
|
+
text: dsSuccess.text
|
|
4147
4221
|
},
|
|
4148
4222
|
warning: {
|
|
4149
|
-
bg:
|
|
4150
|
-
border:
|
|
4151
|
-
title:
|
|
4152
|
-
text:
|
|
4223
|
+
bg: dsWarning.bg,
|
|
4224
|
+
border: dsWarning.border,
|
|
4225
|
+
title: dsWarning.text,
|
|
4226
|
+
text: dsWarning.text
|
|
4153
4227
|
},
|
|
4154
4228
|
danger: {
|
|
4155
|
-
bg:
|
|
4156
|
-
border:
|
|
4157
|
-
title:
|
|
4158
|
-
text:
|
|
4229
|
+
bg: dsError.bg,
|
|
4230
|
+
border: dsError.border,
|
|
4231
|
+
title: dsError.text,
|
|
4232
|
+
text: dsError.text
|
|
4159
4233
|
},
|
|
4160
4234
|
neutral: {
|
|
4161
4235
|
bg: "bg-gray-50 dark:bg-gray-800",
|
|
@@ -4190,6 +4264,35 @@ const InfoBox = ({
|
|
|
4190
4264
|
}
|
|
4191
4265
|
);
|
|
4192
4266
|
};
|
|
4267
|
+
let _progressColors = null;
|
|
4268
|
+
function getProgressColors() {
|
|
4269
|
+
if (!_progressColors) _progressColors = buildProgressColors();
|
|
4270
|
+
return _progressColors;
|
|
4271
|
+
}
|
|
4272
|
+
function buildProgressColors() {
|
|
4273
|
+
function extractBg(base, darkStr) {
|
|
4274
|
+
const bg = base.split(" ").find(
|
|
4275
|
+
(c) => c.startsWith("bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
4276
|
+
) || "";
|
|
4277
|
+
const darkBg = darkStr.split(" ").find(
|
|
4278
|
+
(c) => c.startsWith("dark:bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
4279
|
+
) || "";
|
|
4280
|
+
return `${bg} ${darkBg}`;
|
|
4281
|
+
}
|
|
4282
|
+
const btn = design.colors.component.button;
|
|
4283
|
+
return {
|
|
4284
|
+
default: extractBg(btn.primary.base, btn.primary.dark),
|
|
4285
|
+
primary: extractBg(btn.primary.base, btn.primary.dark),
|
|
4286
|
+
success: extractBg(btn.success.base, btn.success.dark),
|
|
4287
|
+
warning: "bg-yellow-600 dark:bg-yellow-500",
|
|
4288
|
+
// DS has no yellow button; local fallback
|
|
4289
|
+
danger: extractBg(btn.destructive.base, btn.destructive.dark),
|
|
4290
|
+
purple: "bg-purple-600 dark:bg-purple-500",
|
|
4291
|
+
// DS has no purple button; local fallback
|
|
4292
|
+
gray: "bg-gray-600 dark:bg-gray-500"
|
|
4293
|
+
// local fallback
|
|
4294
|
+
};
|
|
4295
|
+
}
|
|
4193
4296
|
const Progress = ({
|
|
4194
4297
|
value = 0,
|
|
4195
4298
|
max = 100,
|
|
@@ -4220,11 +4323,12 @@ const Progress = ({
|
|
|
4220
4323
|
}
|
|
4221
4324
|
}, [indeterminate, animatedValue]);
|
|
4222
4325
|
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
4223
|
-
const
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4326
|
+
const allColors = getProgressColors();
|
|
4327
|
+
const colorClasses2 = {
|
|
4328
|
+
default: allColors.default,
|
|
4329
|
+
success: allColors.success,
|
|
4330
|
+
warning: allColors.warning,
|
|
4331
|
+
danger: allColors.danger
|
|
4228
4332
|
};
|
|
4229
4333
|
const sizeClasses = {
|
|
4230
4334
|
sm: "h-1",
|
|
@@ -4252,19 +4356,25 @@ const Progress = ({
|
|
|
4252
4356
|
children: indeterminate ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4253
4357
|
reactNative.Animated.View,
|
|
4254
4358
|
{
|
|
4255
|
-
className: cn("h-full rounded-full",
|
|
4359
|
+
className: cn("h-full rounded-full", colorClasses2[variant]),
|
|
4256
4360
|
style: { width: interpolatedWidth, opacity: 0.7 }
|
|
4257
4361
|
}
|
|
4258
4362
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4259
4363
|
reactNative.View,
|
|
4260
4364
|
{
|
|
4261
|
-
className: cn("h-full rounded-full",
|
|
4365
|
+
className: cn("h-full rounded-full", colorClasses2[variant]),
|
|
4262
4366
|
style: { width: `${percentage}%` }
|
|
4263
4367
|
}
|
|
4264
4368
|
)
|
|
4265
4369
|
}
|
|
4266
4370
|
),
|
|
4267
|
-
(showLabel || label) && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4371
|
+
(showLabel || label) && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4372
|
+
reactNative.Text,
|
|
4373
|
+
{
|
|
4374
|
+
className: `${design.designTokens.typography.size.xs} text-gray-600 dark:text-gray-400 text-right`,
|
|
4375
|
+
children: label || `${Math.round(percentage)}%`
|
|
4376
|
+
}
|
|
4377
|
+
) })
|
|
4268
4378
|
] });
|
|
4269
4379
|
};
|
|
4270
4380
|
const ProgressBar = ({
|
|
@@ -4280,13 +4390,14 @@ const ProgressBar = ({
|
|
|
4280
4390
|
}) => {
|
|
4281
4391
|
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
4282
4392
|
const displayLabel = label || `${Math.round(percentage)}%`;
|
|
4393
|
+
const progressColors = getProgressColors();
|
|
4283
4394
|
const variantClasses = {
|
|
4284
|
-
primary:
|
|
4285
|
-
success:
|
|
4286
|
-
warning:
|
|
4287
|
-
danger:
|
|
4288
|
-
purple:
|
|
4289
|
-
gray:
|
|
4395
|
+
primary: progressColors.primary,
|
|
4396
|
+
success: progressColors.success,
|
|
4397
|
+
warning: progressColors.warning,
|
|
4398
|
+
danger: progressColors.danger,
|
|
4399
|
+
purple: progressColors.purple,
|
|
4400
|
+
gray: progressColors.gray
|
|
4290
4401
|
};
|
|
4291
4402
|
const sizeClasses = {
|
|
4292
4403
|
sm: "h-1",
|
|
@@ -4316,9 +4427,16 @@ const ProgressBar = ({
|
|
|
4316
4427
|
)
|
|
4317
4428
|
}
|
|
4318
4429
|
),
|
|
4319
|
-
showLabel && labelPosition === "outside" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4430
|
+
showLabel && labelPosition === "outside" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4431
|
+
reactNative.Text,
|
|
4432
|
+
{
|
|
4433
|
+
className: `${design.designTokens.typography.size.sm} ${design.designTokens.typography.weight.medium} text-gray-600 dark:text-gray-400`,
|
|
4434
|
+
children: displayLabel
|
|
4435
|
+
}
|
|
4436
|
+
)
|
|
4320
4437
|
] }) });
|
|
4321
4438
|
};
|
|
4439
|
+
const { typography: typography$e } = design.designTokens;
|
|
4322
4440
|
const Modal = ({
|
|
4323
4441
|
isOpen,
|
|
4324
4442
|
onClose,
|
|
@@ -4369,7 +4487,17 @@ const Modal = ({
|
|
|
4369
4487
|
),
|
|
4370
4488
|
children: [
|
|
4371
4489
|
(title || showCloseButton) && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex flex-row items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: [
|
|
4372
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4490
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4491
|
+
reactNative.Text,
|
|
4492
|
+
{
|
|
4493
|
+
className: cn(
|
|
4494
|
+
typography$e.size.lg,
|
|
4495
|
+
typography$e.weight.semibold,
|
|
4496
|
+
"text-gray-900 dark:text-white flex-1"
|
|
4497
|
+
),
|
|
4498
|
+
children: title
|
|
4499
|
+
}
|
|
4500
|
+
),
|
|
4373
4501
|
showCloseButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4374
4502
|
reactNative.Pressable,
|
|
4375
4503
|
{
|
|
@@ -4377,7 +4505,16 @@ const Modal = ({
|
|
|
4377
4505
|
className: "p-1 -mr-1 rounded-full",
|
|
4378
4506
|
accessibilityRole: "button",
|
|
4379
4507
|
accessibilityLabel: "Close modal",
|
|
4380
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4508
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4509
|
+
reactNative.Text,
|
|
4510
|
+
{
|
|
4511
|
+
className: cn(
|
|
4512
|
+
typography$e.size.xl,
|
|
4513
|
+
"text-gray-500 dark:text-gray-400"
|
|
4514
|
+
),
|
|
4515
|
+
children: "✕"
|
|
4516
|
+
}
|
|
4517
|
+
)
|
|
4381
4518
|
}
|
|
4382
4519
|
)
|
|
4383
4520
|
] }),
|
|
@@ -4422,6 +4559,26 @@ const ModalFooter = ({
|
|
|
4422
4559
|
children
|
|
4423
4560
|
}
|
|
4424
4561
|
);
|
|
4562
|
+
function splitAlertClasses(base, dark) {
|
|
4563
|
+
const all = `${base} ${dark}`.split(" ");
|
|
4564
|
+
return {
|
|
4565
|
+
container: all.filter((c) => c.includes("bg-") || c.includes("border-")).join(" "),
|
|
4566
|
+
icon: all.filter((c) => c.includes("text-")).join(" ")
|
|
4567
|
+
};
|
|
4568
|
+
}
|
|
4569
|
+
let _alertColors = null;
|
|
4570
|
+
function getAlertColors() {
|
|
4571
|
+
if (!_alertColors) {
|
|
4572
|
+
const alert2 = design.colors.component.alert;
|
|
4573
|
+
_alertColors = {
|
|
4574
|
+
success: splitAlertClasses(alert2.success.base, alert2.success.dark),
|
|
4575
|
+
error: splitAlertClasses(alert2.error.base, alert2.error.dark),
|
|
4576
|
+
warning: splitAlertClasses(alert2.warning.base, alert2.warning.dark),
|
|
4577
|
+
info: splitAlertClasses(alert2.info.base, alert2.info.dark)
|
|
4578
|
+
};
|
|
4579
|
+
}
|
|
4580
|
+
return _alertColors;
|
|
4581
|
+
}
|
|
4425
4582
|
const ToastContext = React.createContext(void 0);
|
|
4426
4583
|
const useToast = () => {
|
|
4427
4584
|
const context = React.useContext(ToastContext);
|
|
@@ -4440,19 +4597,21 @@ const Toast = ({ toast, onRemove }) => {
|
|
|
4440
4597
|
friction: 8
|
|
4441
4598
|
}).start();
|
|
4442
4599
|
}, [slideAnim]);
|
|
4600
|
+
const ac = getAlertColors();
|
|
4443
4601
|
const variantBgClasses = {
|
|
4444
4602
|
default: "bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",
|
|
4445
|
-
success:
|
|
4446
|
-
error:
|
|
4447
|
-
warning:
|
|
4448
|
-
info:
|
|
4603
|
+
success: ac.success.container,
|
|
4604
|
+
error: ac.error.container,
|
|
4605
|
+
warning: ac.warning.container,
|
|
4606
|
+
info: ac.info.container
|
|
4449
4607
|
};
|
|
4608
|
+
const alert2 = design.colors.component.alert;
|
|
4450
4609
|
const iconColorClasses = {
|
|
4451
4610
|
default: "text-gray-600 dark:text-gray-400",
|
|
4452
|
-
success:
|
|
4453
|
-
error:
|
|
4454
|
-
warning:
|
|
4455
|
-
info:
|
|
4611
|
+
success: alert2.success.icon,
|
|
4612
|
+
error: alert2.error.icon,
|
|
4613
|
+
warning: alert2.warning.icon,
|
|
4614
|
+
info: alert2.info.icon
|
|
4456
4615
|
};
|
|
4457
4616
|
const icons = {
|
|
4458
4617
|
default: "ℹ",
|
|
@@ -4473,8 +4632,17 @@ const Toast = ({ toast, onRemove }) => {
|
|
|
4473
4632
|
children: [
|
|
4474
4633
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("flex-shrink-0", iconColorClasses[variant]), children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-lg", children: icons[variant] }) }),
|
|
4475
4634
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1 min-w-0", children: [
|
|
4476
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4477
|
-
|
|
4635
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4636
|
+
reactNative.Text,
|
|
4637
|
+
{
|
|
4638
|
+
className: cn(
|
|
4639
|
+
design.textVariants.label.default(),
|
|
4640
|
+
"text-gray-900 dark:text-white"
|
|
4641
|
+
),
|
|
4642
|
+
children: title
|
|
4643
|
+
}
|
|
4644
|
+
),
|
|
4645
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.body.sm(), "mt-1"), children: description }),
|
|
4478
4646
|
action && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Pressable, { onPress: action.onPress, className: "mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm font-medium text-blue-600 dark:text-blue-400", children: action.label }) })
|
|
4479
4647
|
] }),
|
|
4480
4648
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -4691,6 +4859,7 @@ const Backdrop = ({
|
|
|
4691
4859
|
}
|
|
4692
4860
|
);
|
|
4693
4861
|
};
|
|
4862
|
+
const { typography: typography$d } = design.designTokens;
|
|
4694
4863
|
const { height: SCREEN_HEIGHT, width: SCREEN_WIDTH$1 } = reactNative.Dimensions.get("window");
|
|
4695
4864
|
const Sheet = ({
|
|
4696
4865
|
isOpen,
|
|
@@ -4881,8 +5050,28 @@ const Sheet = ({
|
|
|
4881
5050
|
),
|
|
4882
5051
|
(title || description || showCloseButton) && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "px-4 py-4 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex flex-row items-start justify-between", children: [
|
|
4883
5052
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1", children: [
|
|
4884
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4885
|
-
|
|
5053
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5054
|
+
reactNative.Text,
|
|
5055
|
+
{
|
|
5056
|
+
className: cn(
|
|
5057
|
+
typography$d.size.lg,
|
|
5058
|
+
typography$d.weight.semibold,
|
|
5059
|
+
"text-gray-900 dark:text-white"
|
|
5060
|
+
),
|
|
5061
|
+
children: title
|
|
5062
|
+
}
|
|
5063
|
+
),
|
|
5064
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5065
|
+
reactNative.Text,
|
|
5066
|
+
{
|
|
5067
|
+
className: cn(
|
|
5068
|
+
"mt-1",
|
|
5069
|
+
typography$d.size.sm,
|
|
5070
|
+
"text-gray-600 dark:text-gray-400"
|
|
5071
|
+
),
|
|
5072
|
+
children: description
|
|
5073
|
+
}
|
|
5074
|
+
)
|
|
4886
5075
|
] }),
|
|
4887
5076
|
showCloseButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4888
5077
|
reactNative.Pressable,
|
|
@@ -4891,7 +5080,7 @@ const Sheet = ({
|
|
|
4891
5080
|
className: "ml-4 p-1",
|
|
4892
5081
|
accessibilityRole: "button",
|
|
4893
5082
|
accessibilityLabel: "Close sheet",
|
|
4894
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className:
|
|
5083
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(typography$d.size.xl, "text-gray-400"), children: "✕" })
|
|
4895
5084
|
}
|
|
4896
5085
|
)
|
|
4897
5086
|
] }) }),
|
|
@@ -4906,6 +5095,30 @@ const Sheet = ({
|
|
|
4906
5095
|
}
|
|
4907
5096
|
);
|
|
4908
5097
|
};
|
|
5098
|
+
let _tooltipColors = null;
|
|
5099
|
+
function getTooltipColors() {
|
|
5100
|
+
if (!_tooltipColors) {
|
|
5101
|
+
let extractBg = function(base, darkStr) {
|
|
5102
|
+
const bg = base.split(" ").find(
|
|
5103
|
+
(c) => c.startsWith("bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
5104
|
+
) || "";
|
|
5105
|
+
const darkBg = darkStr.split(" ").find(
|
|
5106
|
+
(c) => c.startsWith("dark:bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
5107
|
+
) || "";
|
|
5108
|
+
return `${bg} ${darkBg}`;
|
|
5109
|
+
};
|
|
5110
|
+
const btn = design.colors.component.button;
|
|
5111
|
+
_tooltipColors = {
|
|
5112
|
+
default: "bg-gray-900 dark:bg-gray-700",
|
|
5113
|
+
info: extractBg(btn.primary.base, btn.primary.dark),
|
|
5114
|
+
success: extractBg(btn.success.base, btn.success.dark),
|
|
5115
|
+
warning: "bg-yellow-600 dark:bg-yellow-500",
|
|
5116
|
+
// DS has no yellow button; local fallback
|
|
5117
|
+
error: extractBg(btn.destructive.base, btn.destructive.dark)
|
|
5118
|
+
};
|
|
5119
|
+
}
|
|
5120
|
+
return _tooltipColors;
|
|
5121
|
+
}
|
|
4909
5122
|
const Tooltip = ({
|
|
4910
5123
|
content,
|
|
4911
5124
|
children,
|
|
@@ -4958,13 +5171,7 @@ const Tooltip = ({
|
|
|
4958
5171
|
}
|
|
4959
5172
|
setIsVisible(false);
|
|
4960
5173
|
};
|
|
4961
|
-
const variantClasses =
|
|
4962
|
-
default: "bg-gray-900 dark:bg-gray-700",
|
|
4963
|
-
info: "bg-blue-600 dark:bg-blue-500",
|
|
4964
|
-
success: "bg-green-600 dark:bg-green-500",
|
|
4965
|
-
warning: "bg-yellow-600 dark:bg-yellow-500",
|
|
4966
|
-
error: "bg-red-600 dark:bg-red-500"
|
|
4967
|
-
};
|
|
5174
|
+
const variantClasses = getTooltipColors();
|
|
4968
5175
|
const getTooltipPosition = () => {
|
|
4969
5176
|
const TOOLTIP_OFFSET = 8;
|
|
4970
5177
|
const TOOLTIP_HEIGHT = 32;
|
|
@@ -5030,7 +5237,13 @@ const Tooltip = ({
|
|
|
5030
5237
|
variantClasses[variant],
|
|
5031
5238
|
className
|
|
5032
5239
|
),
|
|
5033
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5240
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5241
|
+
reactNative.Text,
|
|
5242
|
+
{
|
|
5243
|
+
className: `${design.designTokens.typography.size.xs} ${design.designTokens.typography.weight.medium} text-white`,
|
|
5244
|
+
children: content
|
|
5245
|
+
}
|
|
5246
|
+
)
|
|
5034
5247
|
}
|
|
5035
5248
|
)
|
|
5036
5249
|
}
|
|
@@ -5282,7 +5495,9 @@ const TabsList = ({
|
|
|
5282
5495
|
horizontal: true,
|
|
5283
5496
|
showsHorizontalScrollIndicator: false,
|
|
5284
5497
|
className: cn(
|
|
5285
|
-
"flex-row bg-gray-100 dark:bg-gray-800
|
|
5498
|
+
"flex-row bg-gray-100 dark:bg-gray-800",
|
|
5499
|
+
design.designTokens.radius.lg,
|
|
5500
|
+
"p-1",
|
|
5286
5501
|
className
|
|
5287
5502
|
),
|
|
5288
5503
|
contentContainerStyle: { flexGrow: 1 },
|
|
@@ -5315,7 +5530,9 @@ const TabsTrigger = ({
|
|
|
5315
5530
|
reactNative.Text,
|
|
5316
5531
|
{
|
|
5317
5532
|
className: cn(
|
|
5318
|
-
|
|
5533
|
+
design.designTokens.typography.size.sm,
|
|
5534
|
+
design.designTokens.typography.weight.medium,
|
|
5535
|
+
"text-center",
|
|
5319
5536
|
isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"
|
|
5320
5537
|
),
|
|
5321
5538
|
children
|
|
@@ -5347,11 +5564,11 @@ const Link = ({
|
|
|
5347
5564
|
}) => {
|
|
5348
5565
|
const isExternal = href.startsWith("http://") || href.startsWith("https://");
|
|
5349
5566
|
const variantClasses = {
|
|
5350
|
-
default:
|
|
5351
|
-
primary:
|
|
5352
|
-
secondary:
|
|
5567
|
+
default: design.textVariants.link.subtle(),
|
|
5568
|
+
primary: `${design.textVariants.link.default()} font-medium`,
|
|
5569
|
+
secondary: design.textVariants.link.muted(),
|
|
5353
5570
|
muted: "text-gray-500 dark:text-gray-500",
|
|
5354
|
-
underline:
|
|
5571
|
+
underline: design.textVariants.link.default()
|
|
5355
5572
|
};
|
|
5356
5573
|
const handlePress = async () => {
|
|
5357
5574
|
if (disabled) return;
|
|
@@ -5387,6 +5604,7 @@ const Link = ({
|
|
|
5387
5604
|
}
|
|
5388
5605
|
);
|
|
5389
5606
|
};
|
|
5607
|
+
const { typography: typography$c } = design.designTokens;
|
|
5390
5608
|
const Breadcrumb = ({
|
|
5391
5609
|
items,
|
|
5392
5610
|
separator = "/",
|
|
@@ -5396,9 +5614,9 @@ const Breadcrumb = ({
|
|
|
5396
5614
|
}) => {
|
|
5397
5615
|
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
5398
5616
|
const sizeClasses = {
|
|
5399
|
-
sm:
|
|
5400
|
-
md:
|
|
5401
|
-
lg:
|
|
5617
|
+
sm: typography$c.size.sm,
|
|
5618
|
+
md: typography$c.size.base,
|
|
5619
|
+
lg: typography$c.size.lg
|
|
5402
5620
|
};
|
|
5403
5621
|
const getDisplayItems = () => {
|
|
5404
5622
|
if (!maxItems || items.length <= maxItems || isExpanded) {
|
|
@@ -5419,7 +5637,7 @@ const Breadcrumb = ({
|
|
|
5419
5637
|
{
|
|
5420
5638
|
className: cn(
|
|
5421
5639
|
sizeClasses[size],
|
|
5422
|
-
|
|
5640
|
+
`text-gray-900 dark:text-white ${typography$c.weight.medium}`
|
|
5423
5641
|
),
|
|
5424
5642
|
accessibilityRole: "text",
|
|
5425
5643
|
children: item.label
|
|
@@ -5457,7 +5675,7 @@ const Breadcrumb = ({
|
|
|
5457
5675
|
{
|
|
5458
5676
|
className: cn(
|
|
5459
5677
|
sizeClasses[size],
|
|
5460
|
-
isCurrent ?
|
|
5678
|
+
isCurrent ? `text-gray-900 dark:text-white ${typography$c.weight.medium}` : "text-gray-600 dark:text-gray-400"
|
|
5461
5679
|
),
|
|
5462
5680
|
children: item.label
|
|
5463
5681
|
}
|
|
@@ -5505,6 +5723,7 @@ const Breadcrumb = ({
|
|
|
5505
5723
|
}
|
|
5506
5724
|
);
|
|
5507
5725
|
};
|
|
5726
|
+
const { typography: typography$b } = design.designTokens;
|
|
5508
5727
|
const Pagination = ({
|
|
5509
5728
|
currentPage,
|
|
5510
5729
|
totalPages,
|
|
@@ -5519,18 +5738,18 @@ const Pagination = ({
|
|
|
5519
5738
|
const sizeConfig2 = {
|
|
5520
5739
|
sm: {
|
|
5521
5740
|
button: "h-8 w-8",
|
|
5522
|
-
text:
|
|
5523
|
-
icon:
|
|
5741
|
+
text: typography$b.size.xs,
|
|
5742
|
+
icon: typography$b.size.xs
|
|
5524
5743
|
},
|
|
5525
5744
|
md: {
|
|
5526
5745
|
button: "h-10 w-10",
|
|
5527
|
-
text:
|
|
5528
|
-
icon:
|
|
5746
|
+
text: typography$b.size.sm,
|
|
5747
|
+
icon: typography$b.size.sm
|
|
5529
5748
|
},
|
|
5530
5749
|
lg: {
|
|
5531
5750
|
button: "h-12 w-12",
|
|
5532
|
-
text:
|
|
5533
|
-
icon:
|
|
5751
|
+
text: typography$b.size.base,
|
|
5752
|
+
icon: typography$b.size.base
|
|
5534
5753
|
}
|
|
5535
5754
|
};
|
|
5536
5755
|
const config = sizeConfig2[size];
|
|
@@ -5680,6 +5899,7 @@ const Pagination = ({
|
|
|
5680
5899
|
}
|
|
5681
5900
|
);
|
|
5682
5901
|
};
|
|
5902
|
+
const { typography: typography$a } = design.designTokens;
|
|
5683
5903
|
const SettingsList = ({
|
|
5684
5904
|
settings,
|
|
5685
5905
|
selectedSetting,
|
|
@@ -5712,7 +5932,7 @@ const SettingsList = ({
|
|
|
5712
5932
|
reactNative.Text,
|
|
5713
5933
|
{
|
|
5714
5934
|
className: cn(
|
|
5715
|
-
|
|
5935
|
+
typography$a.size.sm,
|
|
5716
5936
|
isSelected ? "text-orange-700 dark:text-orange-300" : "text-gray-700 dark:text-gray-300"
|
|
5717
5937
|
),
|
|
5718
5938
|
numberOfLines: 1,
|
|
@@ -5727,6 +5947,7 @@ const SettingsList = ({
|
|
|
5727
5947
|
}
|
|
5728
5948
|
);
|
|
5729
5949
|
};
|
|
5950
|
+
const { typography: typography$9 } = design.designTokens;
|
|
5730
5951
|
const NavigationList = ({
|
|
5731
5952
|
items,
|
|
5732
5953
|
selectedPath,
|
|
@@ -5768,15 +5989,34 @@ const NavigationList = ({
|
|
|
5768
5989
|
reactNative.Text,
|
|
5769
5990
|
{
|
|
5770
5991
|
className: cn(
|
|
5771
|
-
|
|
5992
|
+
typography$9.weight.medium,
|
|
5772
5993
|
isSelected ? "text-blue-600 dark:text-blue-400" : "text-gray-700 dark:text-gray-300"
|
|
5773
5994
|
),
|
|
5774
5995
|
children: item.label
|
|
5775
5996
|
}
|
|
5776
5997
|
),
|
|
5777
|
-
item.badge !== void 0 && item.badge > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "ml-2 px-2 py-0.5 bg-blue-100 dark:bg-blue-900 rounded-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5998
|
+
item.badge !== void 0 && item.badge > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "ml-2 px-2 py-0.5 bg-blue-100 dark:bg-blue-900 rounded-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5999
|
+
reactNative.Text,
|
|
6000
|
+
{
|
|
6001
|
+
className: cn(
|
|
6002
|
+
typography$9.size.xs,
|
|
6003
|
+
typography$9.weight.medium,
|
|
6004
|
+
"text-blue-800 dark:text-blue-200"
|
|
6005
|
+
),
|
|
6006
|
+
children: item.badge
|
|
6007
|
+
}
|
|
6008
|
+
) })
|
|
5778
6009
|
] }),
|
|
5779
|
-
item.description && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6010
|
+
item.description && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6011
|
+
reactNative.Text,
|
|
6012
|
+
{
|
|
6013
|
+
className: cn(
|
|
6014
|
+
typography$9.size.xs,
|
|
6015
|
+
"text-gray-500 dark:text-gray-400 mt-0.5"
|
|
6016
|
+
),
|
|
6017
|
+
children: item.description
|
|
6018
|
+
}
|
|
6019
|
+
)
|
|
5780
6020
|
] })
|
|
5781
6021
|
]
|
|
5782
6022
|
},
|
|
@@ -5784,6 +6024,7 @@ const NavigationList = ({
|
|
|
5784
6024
|
);
|
|
5785
6025
|
}) });
|
|
5786
6026
|
};
|
|
6027
|
+
const { typography: typography$8 } = design.designTokens;
|
|
5787
6028
|
const Dropdown = ({
|
|
5788
6029
|
trigger,
|
|
5789
6030
|
items,
|
|
@@ -5876,7 +6117,7 @@ const Dropdown = ({
|
|
|
5876
6117
|
reactNative.Text,
|
|
5877
6118
|
{
|
|
5878
6119
|
className: cn(
|
|
5879
|
-
|
|
6120
|
+
typography$8.size.sm,
|
|
5880
6121
|
item.disabled ? "text-gray-400 dark:text-gray-500" : "text-gray-700 dark:text-gray-200"
|
|
5881
6122
|
),
|
|
5882
6123
|
children: item.label
|
|
@@ -5946,6 +6187,7 @@ const AspectFitView = ({
|
|
|
5946
6187
|
}
|
|
5947
6188
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("flex-1", className), onLayout, children: size && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("items-center", innerClassName), children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ScrollView, { style: { width: innerWidth, height: innerHeight }, children }) }) });
|
|
5948
6189
|
};
|
|
6190
|
+
const { typography: typography$7 } = design.designTokens;
|
|
5949
6191
|
const QuickActions = ({
|
|
5950
6192
|
actions,
|
|
5951
6193
|
orientation = "horizontal",
|
|
@@ -5959,23 +6201,23 @@ const QuickActions = ({
|
|
|
5959
6201
|
text: "text-gray-900 dark:text-white"
|
|
5960
6202
|
},
|
|
5961
6203
|
primary: {
|
|
5962
|
-
bg: "bg-blue-
|
|
5963
|
-
bgActive: "active:bg-blue-
|
|
6204
|
+
bg: "bg-blue-600 border-blue-600",
|
|
6205
|
+
bgActive: "active:bg-blue-800",
|
|
5964
6206
|
text: "text-white"
|
|
5965
6207
|
},
|
|
5966
6208
|
success: {
|
|
5967
|
-
bg: "bg-green-
|
|
5968
|
-
bgActive: "active:bg-green-
|
|
6209
|
+
bg: "bg-green-600 border-green-600",
|
|
6210
|
+
bgActive: "active:bg-green-800",
|
|
5969
6211
|
text: "text-white"
|
|
5970
6212
|
},
|
|
5971
6213
|
warning: {
|
|
5972
|
-
bg: "bg-
|
|
5973
|
-
bgActive: "active:bg-
|
|
6214
|
+
bg: "bg-orange-600 border-orange-600",
|
|
6215
|
+
bgActive: "active:bg-orange-800",
|
|
5974
6216
|
text: "text-white"
|
|
5975
6217
|
},
|
|
5976
6218
|
danger: {
|
|
5977
|
-
bg: "bg-red-
|
|
5978
|
-
bgActive: "active:bg-red-
|
|
6219
|
+
bg: "bg-red-600 border-red-600",
|
|
6220
|
+
bgActive: "active:bg-red-800",
|
|
5979
6221
|
text: "text-white"
|
|
5980
6222
|
}
|
|
5981
6223
|
};
|
|
@@ -6009,7 +6251,7 @@ const QuickActions = ({
|
|
|
6009
6251
|
accessibilityState: { disabled: action.disabled },
|
|
6010
6252
|
children: [
|
|
6011
6253
|
action.icon && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "w-5 h-5", children: action.icon }),
|
|
6012
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(
|
|
6254
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(typography$7.weight.medium, styles2.text), children: action.label })
|
|
6013
6255
|
]
|
|
6014
6256
|
},
|
|
6015
6257
|
action.id
|
|
@@ -6087,6 +6329,7 @@ const EmptyState = ({
|
|
|
6087
6329
|
}
|
|
6088
6330
|
);
|
|
6089
6331
|
};
|
|
6332
|
+
const { typography: typography$6 } = design.designTokens;
|
|
6090
6333
|
const Calendar = ({
|
|
6091
6334
|
value,
|
|
6092
6335
|
onChange,
|
|
@@ -6175,10 +6418,29 @@ const Calendar = ({
|
|
|
6175
6418
|
className: "p-2 active:bg-gray-100 dark:active:bg-gray-800 rounded-md",
|
|
6176
6419
|
accessibilityRole: "button",
|
|
6177
6420
|
accessibilityLabel: "Previous month",
|
|
6178
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6421
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6422
|
+
reactNative.Text,
|
|
6423
|
+
{
|
|
6424
|
+
className: cn(
|
|
6425
|
+
typography$6.size.lg,
|
|
6426
|
+
"text-gray-700 dark:text-gray-300"
|
|
6427
|
+
),
|
|
6428
|
+
children: "‹"
|
|
6429
|
+
}
|
|
6430
|
+
)
|
|
6431
|
+
}
|
|
6432
|
+
),
|
|
6433
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6434
|
+
reactNative.Text,
|
|
6435
|
+
{
|
|
6436
|
+
className: cn(
|
|
6437
|
+
typography$6.size.base,
|
|
6438
|
+
typography$6.weight.semibold,
|
|
6439
|
+
"text-gray-900 dark:text-white"
|
|
6440
|
+
),
|
|
6441
|
+
children: monthYear
|
|
6179
6442
|
}
|
|
6180
6443
|
),
|
|
6181
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-base font-semibold text-gray-900 dark:text-white", children: monthYear }),
|
|
6182
6444
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6183
6445
|
reactNative.Pressable,
|
|
6184
6446
|
{
|
|
@@ -6186,11 +6448,30 @@ const Calendar = ({
|
|
|
6186
6448
|
className: "p-2 active:bg-gray-100 dark:active:bg-gray-800 rounded-md",
|
|
6187
6449
|
accessibilityRole: "button",
|
|
6188
6450
|
accessibilityLabel: "Next month",
|
|
6189
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6451
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6452
|
+
reactNative.Text,
|
|
6453
|
+
{
|
|
6454
|
+
className: cn(
|
|
6455
|
+
typography$6.size.lg,
|
|
6456
|
+
"text-gray-700 dark:text-gray-300"
|
|
6457
|
+
),
|
|
6458
|
+
children: "›"
|
|
6459
|
+
}
|
|
6460
|
+
)
|
|
6190
6461
|
}
|
|
6191
6462
|
)
|
|
6192
6463
|
] }),
|
|
6193
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row mb-2", children: weekDays.map((day) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-1 items-center py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6464
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row mb-2", children: weekDays.map((day) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-1 items-center py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6465
|
+
reactNative.Text,
|
|
6466
|
+
{
|
|
6467
|
+
className: cn(
|
|
6468
|
+
typography$6.size.xs,
|
|
6469
|
+
typography$6.weight.medium,
|
|
6470
|
+
"text-gray-600 dark:text-gray-400"
|
|
6471
|
+
),
|
|
6472
|
+
children: day
|
|
6473
|
+
}
|
|
6474
|
+
) }, day)) }),
|
|
6194
6475
|
weeks.map((week, weekIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row", children: week.map((date, dayIndex) => {
|
|
6195
6476
|
if (!date) {
|
|
6196
6477
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -6227,9 +6508,9 @@ const Calendar = ({
|
|
|
6227
6508
|
reactNative.Text,
|
|
6228
6509
|
{
|
|
6229
6510
|
className: cn(
|
|
6230
|
-
|
|
6511
|
+
typography$6.size.sm,
|
|
6231
6512
|
isCurrentMonth ? "text-gray-900 dark:text-white" : "text-gray-400 dark:text-gray-600",
|
|
6232
|
-
isSelected &&
|
|
6513
|
+
isSelected && `text-white ${typography$6.weight.semibold}`
|
|
6233
6514
|
),
|
|
6234
6515
|
children: date.getDate()
|
|
6235
6516
|
}
|
|
@@ -6257,18 +6538,40 @@ function DataList({
|
|
|
6257
6538
|
};
|
|
6258
6539
|
const renderHeader = () => {
|
|
6259
6540
|
if (!showHeader) return null;
|
|
6260
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6541
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6261
6542
|
reactNative.View,
|
|
6262
6543
|
{
|
|
6263
6544
|
className: cn(
|
|
6264
|
-
|
|
6265
|
-
|
|
6545
|
+
"flex-row",
|
|
6546
|
+
design.ui.table.thead,
|
|
6547
|
+
"border-b border-gray-200 dark:border-gray-700"
|
|
6266
6548
|
),
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6549
|
+
children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6550
|
+
reactNative.View,
|
|
6551
|
+
{
|
|
6552
|
+
className: cn(
|
|
6553
|
+
compact ? "px-3 py-2" : "px-4 py-3",
|
|
6554
|
+
alignClasses[column.align || "left"]
|
|
6555
|
+
),
|
|
6556
|
+
style: { flex: column.flex || 1 },
|
|
6557
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6558
|
+
reactNative.Text,
|
|
6559
|
+
{
|
|
6560
|
+
className: cn(
|
|
6561
|
+
design.designTokens.typography.size.xs,
|
|
6562
|
+
design.designTokens.typography.weight.medium,
|
|
6563
|
+
"text-gray-700 dark:text-gray-300",
|
|
6564
|
+
design.designTokens.typography.transform.uppercase,
|
|
6565
|
+
design.designTokens.typography.tracking.wider
|
|
6566
|
+
),
|
|
6567
|
+
children: column.label
|
|
6568
|
+
}
|
|
6569
|
+
)
|
|
6570
|
+
},
|
|
6571
|
+
column.key
|
|
6572
|
+
))
|
|
6573
|
+
}
|
|
6574
|
+
);
|
|
6272
6575
|
};
|
|
6273
6576
|
const renderRow = ({ item, index }) => {
|
|
6274
6577
|
const isOdd = index % 2 === 1;
|
|
@@ -6278,7 +6581,7 @@ function DataList({
|
|
|
6278
6581
|
onPress: () => onRowPress == null ? void 0 : onRowPress(item, index),
|
|
6279
6582
|
className: cn(
|
|
6280
6583
|
"flex-row border-b border-gray-200 dark:border-gray-700",
|
|
6281
|
-
isOdd &&
|
|
6584
|
+
isOdd && design.ui.table.trAlt,
|
|
6282
6585
|
onRowPress && "active:bg-gray-100 dark:active:bg-gray-800"
|
|
6283
6586
|
),
|
|
6284
6587
|
disabled: !onRowPress,
|
|
@@ -6295,7 +6598,10 @@ function DataList({
|
|
|
6295
6598
|
children: column.render ? column.render(item, index) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6296
6599
|
reactNative.Text,
|
|
6297
6600
|
{
|
|
6298
|
-
className:
|
|
6601
|
+
className: cn(
|
|
6602
|
+
design.designTokens.typography.size.sm,
|
|
6603
|
+
"text-gray-900 dark:text-white"
|
|
6604
|
+
),
|
|
6299
6605
|
numberOfLines: 1,
|
|
6300
6606
|
children: String(item[column.key] ?? "")
|
|
6301
6607
|
}
|
|
@@ -6307,7 +6613,7 @@ function DataList({
|
|
|
6307
6613
|
);
|
|
6308
6614
|
};
|
|
6309
6615
|
const renderEmpty = () => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "py-8 items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm text-gray-500 dark:text-gray-400", children: emptyMessage }) });
|
|
6310
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: cn(
|
|
6616
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: cn(design.ui.table.tr, className), children: [
|
|
6311
6617
|
renderHeader(),
|
|
6312
6618
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6313
6619
|
reactNative.FlatList,
|
|
@@ -6419,7 +6725,7 @@ const MultiSelect = ({
|
|
|
6419
6725
|
value: searchQuery,
|
|
6420
6726
|
onChangeText: setSearchQuery,
|
|
6421
6727
|
placeholder: searchPlaceholder,
|
|
6422
|
-
placeholderTextColor:
|
|
6728
|
+
placeholderTextColor: design.colors.raw.neutral[400],
|
|
6423
6729
|
className: "px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white rounded-md"
|
|
6424
6730
|
}
|
|
6425
6731
|
) }),
|
|
@@ -6496,15 +6802,15 @@ const ProgressCircle = ({
|
|
|
6496
6802
|
label,
|
|
6497
6803
|
variant = "primary",
|
|
6498
6804
|
color,
|
|
6499
|
-
trackColor =
|
|
6805
|
+
trackColor = design.colors.raw.neutral[200],
|
|
6500
6806
|
className
|
|
6501
6807
|
}) => {
|
|
6502
6808
|
const progress = Math.min(100, Math.max(0, value));
|
|
6503
6809
|
const variantColors = {
|
|
6504
|
-
primary:
|
|
6505
|
-
success:
|
|
6506
|
-
warning:
|
|
6507
|
-
danger:
|
|
6810
|
+
primary: design.colors.raw.blue[600],
|
|
6811
|
+
success: design.colors.raw.green[600],
|
|
6812
|
+
warning: design.colors.raw.amber[600],
|
|
6813
|
+
danger: design.colors.raw.red[600]
|
|
6508
6814
|
};
|
|
6509
6815
|
const progressColor = color || variantColors[variant];
|
|
6510
6816
|
const innerSize = size - strokeWidth * 2;
|
|
@@ -6583,6 +6889,7 @@ const ProgressCircle = ({
|
|
|
6583
6889
|
}
|
|
6584
6890
|
);
|
|
6585
6891
|
};
|
|
6892
|
+
const { typography: typography$5 } = design.designTokens;
|
|
6586
6893
|
const SideNav = ({ items, className }) => {
|
|
6587
6894
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("gap-1", className), accessibilityRole: "list", children: items.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
6588
6895
|
reactNative.Pressable,
|
|
@@ -6601,13 +6908,23 @@ const SideNav = ({ items, className }) => {
|
|
|
6601
6908
|
reactNative.Text,
|
|
6602
6909
|
{
|
|
6603
6910
|
className: cn(
|
|
6604
|
-
"flex-1
|
|
6911
|
+
"flex-1",
|
|
6912
|
+
typography$5.weight.medium,
|
|
6605
6913
|
item.active ? "text-blue-600 dark:text-blue-400" : "text-gray-700 dark:text-gray-300"
|
|
6606
6914
|
),
|
|
6607
6915
|
children: item.label
|
|
6608
6916
|
}
|
|
6609
6917
|
),
|
|
6610
|
-
item.badge !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6918
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6919
|
+
reactNative.Text,
|
|
6920
|
+
{
|
|
6921
|
+
className: cn(
|
|
6922
|
+
typography$5.size.xs,
|
|
6923
|
+
"text-gray-700 dark:text-gray-300"
|
|
6924
|
+
),
|
|
6925
|
+
children: item.badge
|
|
6926
|
+
}
|
|
6927
|
+
) })
|
|
6611
6928
|
]
|
|
6612
6929
|
},
|
|
6613
6930
|
item.id
|
|
@@ -6631,7 +6948,7 @@ const SectionHeader = ({
|
|
|
6631
6948
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center justify-between", children: [
|
|
6632
6949
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: title }),
|
|
6633
6950
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center gap-2", children: [
|
|
6634
|
-
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color:
|
|
6951
|
+
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color: design.colors.raw.blue[600] }),
|
|
6635
6952
|
actions,
|
|
6636
6953
|
onAdd && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6637
6954
|
reactNative.Pressable,
|
|
@@ -6851,7 +7168,7 @@ const PhoneInput = ({
|
|
|
6851
7168
|
value,
|
|
6852
7169
|
onChangeText: handleInputChange,
|
|
6853
7170
|
placeholder,
|
|
6854
|
-
placeholderTextColor:
|
|
7171
|
+
placeholderTextColor: design.colors.raw.neutral[400],
|
|
6855
7172
|
keyboardType: "phone-pad",
|
|
6856
7173
|
editable: !disabled,
|
|
6857
7174
|
className: cn(
|
|
@@ -6884,7 +7201,7 @@ const PhoneInput = ({
|
|
|
6884
7201
|
value: searchQuery,
|
|
6885
7202
|
onChangeText: setSearchQuery,
|
|
6886
7203
|
placeholder: "Search countries...",
|
|
6887
|
-
placeholderTextColor:
|
|
7204
|
+
placeholderTextColor: design.colors.raw.neutral[400],
|
|
6888
7205
|
className: "px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white rounded-md"
|
|
6889
7206
|
}
|
|
6890
7207
|
) }),
|
|
@@ -7229,7 +7546,7 @@ const Combobox = ({
|
|
|
7229
7546
|
value: searchQuery,
|
|
7230
7547
|
onChangeText: setSearchQuery,
|
|
7231
7548
|
placeholder: searchPlaceholder,
|
|
7232
|
-
placeholderTextColor:
|
|
7549
|
+
placeholderTextColor: design.colors.raw.neutral[400],
|
|
7233
7550
|
autoFocus: true,
|
|
7234
7551
|
className: "px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white rounded-md"
|
|
7235
7552
|
}
|
|
@@ -7492,6 +7809,32 @@ const AddressLink = ({
|
|
|
7492
7809
|
] })
|
|
7493
7810
|
] });
|
|
7494
7811
|
};
|
|
7812
|
+
let _displayColors = null;
|
|
7813
|
+
function getDisplayColors() {
|
|
7814
|
+
if (!_displayColors) _displayColors = buildDisplayColors();
|
|
7815
|
+
return _displayColors;
|
|
7816
|
+
}
|
|
7817
|
+
function buildDisplayColors() {
|
|
7818
|
+
const alert2 = design.colors.component.alert;
|
|
7819
|
+
function splitClasses(base, dark) {
|
|
7820
|
+
const all = `${base} ${dark}`.split(" ");
|
|
7821
|
+
return {
|
|
7822
|
+
text: all.filter((c) => c.includes("text-")).join(" "),
|
|
7823
|
+
bg: all.filter((c) => c.includes("bg-")).join(" ")
|
|
7824
|
+
};
|
|
7825
|
+
}
|
|
7826
|
+
const info = splitClasses(alert2.info.base, alert2.info.dark);
|
|
7827
|
+
const success = splitClasses(alert2.success.base, alert2.success.dark);
|
|
7828
|
+
const warning = splitClasses(alert2.warning.base, alert2.warning.dark);
|
|
7829
|
+
return {
|
|
7830
|
+
primary: `${info.text} ${info.bg}`,
|
|
7831
|
+
// secondary uses purple — no DS mapping, keep local
|
|
7832
|
+
secondary: "text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",
|
|
7833
|
+
success: `${success.text} ${success.bg}`,
|
|
7834
|
+
warning: `${warning.text} ${warning.bg}`,
|
|
7835
|
+
neutral: "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"
|
|
7836
|
+
};
|
|
7837
|
+
}
|
|
7495
7838
|
const CodeDisplay = ({
|
|
7496
7839
|
children,
|
|
7497
7840
|
variant = "primary",
|
|
@@ -7501,28 +7844,22 @@ const CodeDisplay = ({
|
|
|
7501
7844
|
wrap = false,
|
|
7502
7845
|
className
|
|
7503
7846
|
}) => {
|
|
7504
|
-
const variantClasses =
|
|
7505
|
-
primary: "text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",
|
|
7506
|
-
secondary: "text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",
|
|
7507
|
-
success: "text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",
|
|
7508
|
-
warning: "text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",
|
|
7509
|
-
neutral: "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"
|
|
7510
|
-
};
|
|
7847
|
+
const variantClasses = getDisplayColors();
|
|
7511
7848
|
const sizeClasses = {
|
|
7512
7849
|
xs: {
|
|
7513
|
-
text:
|
|
7850
|
+
text: design.designTokens.typography.size.xs,
|
|
7514
7851
|
padding: inline ? "px-1.5 py-0.5" : "px-2 py-1"
|
|
7515
7852
|
},
|
|
7516
7853
|
sm: {
|
|
7517
|
-
text:
|
|
7854
|
+
text: design.designTokens.typography.size.sm,
|
|
7518
7855
|
padding: inline ? "px-2 py-0.5" : "px-3 py-1.5"
|
|
7519
7856
|
},
|
|
7520
7857
|
md: {
|
|
7521
|
-
text:
|
|
7858
|
+
text: design.designTokens.typography.size.base,
|
|
7522
7859
|
padding: inline ? "px-2.5 py-1" : "px-4 py-2"
|
|
7523
7860
|
},
|
|
7524
7861
|
lg: {
|
|
7525
|
-
text:
|
|
7862
|
+
text: design.designTokens.typography.size.lg,
|
|
7526
7863
|
padding: inline ? "px-3 py-1" : "px-4 py-2"
|
|
7527
7864
|
}
|
|
7528
7865
|
};
|
|
@@ -7532,13 +7869,15 @@ const CodeDisplay = ({
|
|
|
7532
7869
|
right: "text-right"
|
|
7533
7870
|
};
|
|
7534
7871
|
const sizeConfig2 = sizeClasses[size];
|
|
7535
|
-
const
|
|
7872
|
+
const variantParts = variantClasses[variant].split(" ");
|
|
7873
|
+
const textColorClass = variantParts.filter((c) => c.includes("text-")).join(" ");
|
|
7874
|
+
const bgClass = variantParts.filter((c) => c.includes("bg-")).join(" ");
|
|
7536
7875
|
if (inline) {
|
|
7537
7876
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7538
7877
|
reactNative.Text,
|
|
7539
7878
|
{
|
|
7540
7879
|
className: cn(
|
|
7541
|
-
|
|
7880
|
+
`${design.designTokens.typography.family.mono} rounded-lg`,
|
|
7542
7881
|
textColorClass,
|
|
7543
7882
|
bgClass,
|
|
7544
7883
|
sizeConfig2.text,
|
|
@@ -7553,7 +7892,7 @@ const CodeDisplay = ({
|
|
|
7553
7892
|
reactNative.Text,
|
|
7554
7893
|
{
|
|
7555
7894
|
className: cn(
|
|
7556
|
-
|
|
7895
|
+
design.designTokens.typography.family.mono,
|
|
7557
7896
|
textColorClass,
|
|
7558
7897
|
sizeConfig2.text,
|
|
7559
7898
|
!inline && alignClasses[align],
|
|
@@ -7881,7 +8220,7 @@ function InfiniteScroll({
|
|
|
7881
8220
|
const defaultEmptyComponent = /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-1 justify-center items-center py-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-500 dark:text-gray-400", children: "No items found" }) });
|
|
7882
8221
|
const ListFooterComponent = React.useCallback(() => {
|
|
7883
8222
|
const footerLoader = /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row justify-center items-center py-4", children: [
|
|
7884
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color:
|
|
8223
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color: design.colors.raw.blue[500] }),
|
|
7885
8224
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "ml-2 text-sm text-gray-600 dark:text-gray-400", children: "Loading..." })
|
|
7886
8225
|
] });
|
|
7887
8226
|
const footerEndMessage = /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row justify-center items-center py-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm text-gray-600 dark:text-gray-400", children: "No more items to load" }) });
|
|
@@ -7949,9 +8288,9 @@ const ExternalLink = ({
|
|
|
7949
8288
|
lg: "text-base"
|
|
7950
8289
|
};
|
|
7951
8290
|
const variantClasses = {
|
|
7952
|
-
default:
|
|
7953
|
-
primary:
|
|
7954
|
-
muted:
|
|
8291
|
+
default: design.textVariants.link.external(),
|
|
8292
|
+
primary: `${design.textVariants.link.default()} font-semibold`,
|
|
8293
|
+
muted: design.textVariants.link.muted()
|
|
7955
8294
|
};
|
|
7956
8295
|
const handlePress = React.useCallback(async () => {
|
|
7957
8296
|
onPress == null ? void 0 : onPress();
|
|
@@ -8055,7 +8394,7 @@ const TextInputModal = ({
|
|
|
8055
8394
|
value,
|
|
8056
8395
|
onChangeText: setValue,
|
|
8057
8396
|
placeholder,
|
|
8058
|
-
placeholderTextColor:
|
|
8397
|
+
placeholderTextColor: design.colors.raw.neutral[400],
|
|
8059
8398
|
maxLength,
|
|
8060
8399
|
editable: !isLoading,
|
|
8061
8400
|
autoFocus: true,
|
|
@@ -8252,37 +8591,54 @@ const SectionBadge = ({
|
|
|
8252
8591
|
}
|
|
8253
8592
|
);
|
|
8254
8593
|
};
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8594
|
+
function splitBadgeClasses(base, dark) {
|
|
8595
|
+
const all = `${base} ${dark}`.split(" ");
|
|
8596
|
+
return {
|
|
8597
|
+
bg: all.filter((c) => c.includes("bg-")).join(" "),
|
|
8598
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
8599
|
+
};
|
|
8600
|
+
}
|
|
8601
|
+
let _chainColors = null;
|
|
8602
|
+
function getChainColors() {
|
|
8603
|
+
if (!_chainColors) _chainColors = buildChainColors();
|
|
8604
|
+
return _chainColors;
|
|
8605
|
+
}
|
|
8606
|
+
function buildChainColors() {
|
|
8607
|
+
const badge = design.colors.component.badge;
|
|
8608
|
+
return {
|
|
8609
|
+
evm: splitBadgeClasses(badge.ethereum.base, badge.ethereum.dark),
|
|
8610
|
+
solana: splitBadgeClasses(badge.solana.base, badge.solana.dark),
|
|
8611
|
+
bitcoin: splitBadgeClasses(badge.bitcoin.base, badge.bitcoin.dark),
|
|
8612
|
+
// DS has no cosmos badge — use local fallback (indigo)
|
|
8613
|
+
cosmos: {
|
|
8614
|
+
bg: "bg-indigo-50 dark:bg-indigo-900/20",
|
|
8615
|
+
text: "text-indigo-700 dark:text-indigo-300"
|
|
8616
|
+
}
|
|
8617
|
+
};
|
|
8618
|
+
}
|
|
8619
|
+
const chainMeta = {
|
|
8620
|
+
evm: { label: "EVM", emoji: "⟠" },
|
|
8621
|
+
solana: { label: "SOL", emoji: "◎" },
|
|
8622
|
+
bitcoin: { label: "BTC", emoji: "₿" },
|
|
8623
|
+
cosmos: { label: "ATOM", emoji: "⚛" }
|
|
8624
|
+
};
|
|
8625
|
+
const sizeConfig = {
|
|
8626
|
+
sm: {
|
|
8627
|
+
padding: "px-1.5 py-0.5",
|
|
8628
|
+
text: design.designTokens.typography.size.xs,
|
|
8629
|
+
gap: "gap-0.5"
|
|
8267
8630
|
},
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
textColor: "text-orange-700 dark:text-orange-300"
|
|
8631
|
+
md: {
|
|
8632
|
+
padding: "px-2 py-1",
|
|
8633
|
+
text: design.designTokens.typography.size.sm,
|
|
8634
|
+
gap: "gap-1"
|
|
8273
8635
|
},
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
textColor: "text-indigo-700 dark:text-indigo-300"
|
|
8636
|
+
lg: {
|
|
8637
|
+
padding: "px-2.5 py-1.5",
|
|
8638
|
+
text: design.designTokens.typography.size.base,
|
|
8639
|
+
gap: "gap-1.5"
|
|
8279
8640
|
}
|
|
8280
8641
|
};
|
|
8281
|
-
const sizeConfig = {
|
|
8282
|
-
sm: { padding: "px-1.5 py-0.5", text: "text-xs", gap: "gap-0.5" },
|
|
8283
|
-
md: { padding: "px-2 py-1", text: "text-sm", gap: "gap-1" },
|
|
8284
|
-
lg: { padding: "px-2.5 py-1.5", text: "text-base", gap: "gap-1.5" }
|
|
8285
|
-
};
|
|
8286
8642
|
const ChainBadge = ({
|
|
8287
8643
|
chainType,
|
|
8288
8644
|
size = "md",
|
|
@@ -8290,23 +8646,34 @@ const ChainBadge = ({
|
|
|
8290
8646
|
className,
|
|
8291
8647
|
...props
|
|
8292
8648
|
}) => {
|
|
8293
|
-
const
|
|
8649
|
+
const chainColors = getChainColors()[chainType];
|
|
8650
|
+
const meta = chainMeta[chainType];
|
|
8294
8651
|
const sizeStyles = sizeConfig[size];
|
|
8295
8652
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
8296
8653
|
reactNative.View,
|
|
8297
8654
|
{
|
|
8298
8655
|
className: cn(
|
|
8299
8656
|
"flex-row items-center rounded-md border",
|
|
8300
|
-
|
|
8657
|
+
chainColors.bg,
|
|
8301
8658
|
sizeStyles.padding,
|
|
8302
8659
|
sizeStyles.gap,
|
|
8303
8660
|
className
|
|
8304
8661
|
),
|
|
8305
|
-
accessibilityLabel: `${
|
|
8662
|
+
accessibilityLabel: `${meta.label} chain`,
|
|
8306
8663
|
...props,
|
|
8307
8664
|
children: [
|
|
8308
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(sizeStyles.text,
|
|
8309
|
-
showLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8665
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(sizeStyles.text, chainColors.text), children: meta.emoji }),
|
|
8666
|
+
showLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8667
|
+
reactNative.Text,
|
|
8668
|
+
{
|
|
8669
|
+
className: cn(
|
|
8670
|
+
design.designTokens.typography.weight.medium,
|
|
8671
|
+
sizeStyles.text,
|
|
8672
|
+
chainColors.text
|
|
8673
|
+
),
|
|
8674
|
+
children: meta.label
|
|
8675
|
+
}
|
|
8676
|
+
)
|
|
8310
8677
|
]
|
|
8311
8678
|
}
|
|
8312
8679
|
);
|
|
@@ -8353,7 +8720,7 @@ const ListItemWithAction = ({
|
|
|
8353
8720
|
reactNative.ActivityIndicator,
|
|
8354
8721
|
{
|
|
8355
8722
|
size: "small",
|
|
8356
|
-
color: destructive ?
|
|
8723
|
+
color: destructive ? design.colors.raw.red[600] : design.colors.raw.neutral[500]
|
|
8357
8724
|
}
|
|
8358
8725
|
) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8359
8726
|
actionIcon && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "mr-1", children: actionIcon }),
|
|
@@ -8502,7 +8869,7 @@ const TransferList = ({
|
|
|
8502
8869
|
value: searchValue,
|
|
8503
8870
|
onChangeText: onSearchChange,
|
|
8504
8871
|
placeholder: searchPlaceholder,
|
|
8505
|
-
placeholderTextColor:
|
|
8872
|
+
placeholderTextColor: design.colors.raw.neutral[400],
|
|
8506
8873
|
className: "px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white border border-gray-300 dark:border-gray-700 rounded-md"
|
|
8507
8874
|
}
|
|
8508
8875
|
) }),
|
|
@@ -9007,6 +9374,26 @@ const Masonry = ({
|
|
|
9007
9374
|
});
|
|
9008
9375
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("flex-row", className), style: { gap }, children: columnArrays.map((column, columnIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-1", style: { gap }, children: column.map((item, itemIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { children: item }, itemIndex)) }, columnIndex)) });
|
|
9009
9376
|
};
|
|
9377
|
+
let _iconContainerColors = null;
|
|
9378
|
+
function getIconContainerColors() {
|
|
9379
|
+
if (!_iconContainerColors) {
|
|
9380
|
+
let extractBg = function(base, dark) {
|
|
9381
|
+
const all = `${base} ${dark}`.split(" ");
|
|
9382
|
+
return all.filter((c) => c.includes("bg-")).join(" ");
|
|
9383
|
+
};
|
|
9384
|
+
const badge = design.colors.component.badge;
|
|
9385
|
+
_iconContainerColors = {
|
|
9386
|
+
primary: extractBg(badge.primary.base, badge.primary.dark),
|
|
9387
|
+
secondary: "bg-purple-100 dark:bg-purple-900/30",
|
|
9388
|
+
// DS has no purple badge variant; local fallback
|
|
9389
|
+
success: extractBg(badge.success.base, badge.success.dark),
|
|
9390
|
+
warning: extractBg(badge.warning.base, badge.warning.dark),
|
|
9391
|
+
error: extractBg(badge.error.base, badge.error.dark),
|
|
9392
|
+
neutral: extractBg(badge.default.base, badge.default.dark)
|
|
9393
|
+
};
|
|
9394
|
+
}
|
|
9395
|
+
return _iconContainerColors;
|
|
9396
|
+
}
|
|
9010
9397
|
const IconContainer = ({
|
|
9011
9398
|
children,
|
|
9012
9399
|
size = "md",
|
|
@@ -9020,14 +9407,7 @@ const IconContainer = ({
|
|
|
9020
9407
|
lg: "w-16 h-16",
|
|
9021
9408
|
xl: "w-20 h-20"
|
|
9022
9409
|
};
|
|
9023
|
-
const variantClasses =
|
|
9024
|
-
primary: "bg-blue-100 dark:bg-blue-900/30",
|
|
9025
|
-
secondary: "bg-purple-100 dark:bg-purple-900/30",
|
|
9026
|
-
success: "bg-green-100 dark:bg-green-900/30",
|
|
9027
|
-
warning: "bg-yellow-100 dark:bg-yellow-900/30",
|
|
9028
|
-
error: "bg-red-100 dark:bg-red-900/30",
|
|
9029
|
-
neutral: "bg-gray-100 dark:bg-gray-800"
|
|
9030
|
-
};
|
|
9410
|
+
const variantClasses = getIconContainerColors();
|
|
9031
9411
|
const shapeClasses = {
|
|
9032
9412
|
square: "rounded-lg",
|
|
9033
9413
|
rounded: "rounded-2xl",
|
|
@@ -9047,6 +9427,27 @@ const IconContainer = ({
|
|
|
9047
9427
|
}
|
|
9048
9428
|
);
|
|
9049
9429
|
};
|
|
9430
|
+
let _gradientIconColors = null;
|
|
9431
|
+
function getGradientIconColors() {
|
|
9432
|
+
if (!_gradientIconColors) {
|
|
9433
|
+
let extractBg = function(base) {
|
|
9434
|
+
return base.split(" ").find(
|
|
9435
|
+
(c) => c.startsWith("bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
9436
|
+
) || "";
|
|
9437
|
+
};
|
|
9438
|
+
const btn = design.colors.component.button;
|
|
9439
|
+
_gradientIconColors = {
|
|
9440
|
+
blue: extractBg(btn.primary.base),
|
|
9441
|
+
purple: "bg-purple-600",
|
|
9442
|
+
// DS has no purple button; local fallback
|
|
9443
|
+
green: extractBg(btn.success.base),
|
|
9444
|
+
orange: "bg-orange-600",
|
|
9445
|
+
// DS has no orange button; local fallback
|
|
9446
|
+
gray: "bg-gray-700 dark:bg-gray-600"
|
|
9447
|
+
};
|
|
9448
|
+
}
|
|
9449
|
+
return _gradientIconColors;
|
|
9450
|
+
}
|
|
9050
9451
|
const GradientIconContainer = ({
|
|
9051
9452
|
children,
|
|
9052
9453
|
size = "md",
|
|
@@ -9065,13 +9466,7 @@ const GradientIconContainer = ({
|
|
|
9065
9466
|
rounded: "rounded-xl",
|
|
9066
9467
|
circle: "rounded-full"
|
|
9067
9468
|
};
|
|
9068
|
-
const variantClasses =
|
|
9069
|
-
blue: "bg-blue-600",
|
|
9070
|
-
purple: "bg-purple-600",
|
|
9071
|
-
green: "bg-green-600",
|
|
9072
|
-
orange: "bg-orange-600",
|
|
9073
|
-
gray: "bg-gray-700 dark:bg-gray-600"
|
|
9074
|
-
};
|
|
9469
|
+
const variantClasses = getGradientIconColors();
|
|
9075
9470
|
const config = sizeConfig2[size];
|
|
9076
9471
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9077
9472
|
reactNative.View,
|
|
@@ -9152,7 +9547,7 @@ const PageSectionHeader = ({
|
|
|
9152
9547
|
}
|
|
9153
9548
|
),
|
|
9154
9549
|
loading && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center gap-2", children: [
|
|
9155
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color:
|
|
9550
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color: design.colors.raw.blue[500] }),
|
|
9156
9551
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9157
9552
|
reactNative.Text,
|
|
9158
9553
|
{
|
|
@@ -9204,6 +9599,7 @@ const styles = reactNative.StyleSheet.create({
|
|
|
9204
9599
|
// clipPath: 'inset(50%)', // Not supported in RN
|
|
9205
9600
|
}
|
|
9206
9601
|
});
|
|
9602
|
+
const { typography: typography$4 } = design.designTokens;
|
|
9207
9603
|
const BreadcrumbNav = ({
|
|
9208
9604
|
items,
|
|
9209
9605
|
separator = "/",
|
|
@@ -9216,14 +9612,42 @@ const BreadcrumbNav = ({
|
|
|
9216
9612
|
accessibilityRole: "none",
|
|
9217
9613
|
accessibilityLabel: "Breadcrumb navigation",
|
|
9218
9614
|
children: items.map((item, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(React__namespace.Fragment, { children: [
|
|
9219
|
-
index > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9220
|
-
|
|
9615
|
+
index > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9616
|
+
reactNative.Text,
|
|
9617
|
+
{
|
|
9618
|
+
className: cn(
|
|
9619
|
+
"text-gray-400 dark:text-gray-600",
|
|
9620
|
+
typography$4.size.sm
|
|
9621
|
+
),
|
|
9622
|
+
children: typeof separator === "string" ? separator : separator
|
|
9623
|
+
}
|
|
9624
|
+
),
|
|
9625
|
+
index === items.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9626
|
+
reactNative.Text,
|
|
9627
|
+
{
|
|
9628
|
+
className: cn(
|
|
9629
|
+
"text-gray-900 dark:text-white",
|
|
9630
|
+
typography$4.weight.medium,
|
|
9631
|
+
typography$4.size.sm
|
|
9632
|
+
),
|
|
9633
|
+
children: item.label
|
|
9634
|
+
}
|
|
9635
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9221
9636
|
reactNative.Pressable,
|
|
9222
9637
|
{
|
|
9223
9638
|
onPress: item.onPress,
|
|
9224
9639
|
accessibilityRole: "link",
|
|
9225
9640
|
accessibilityLabel: item.label,
|
|
9226
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9641
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9642
|
+
reactNative.Text,
|
|
9643
|
+
{
|
|
9644
|
+
className: cn(
|
|
9645
|
+
"text-blue-600 dark:text-blue-400",
|
|
9646
|
+
typography$4.size.sm
|
|
9647
|
+
),
|
|
9648
|
+
children: item.label
|
|
9649
|
+
}
|
|
9650
|
+
)
|
|
9227
9651
|
}
|
|
9228
9652
|
)
|
|
9229
9653
|
] }, index))
|
|
@@ -9302,7 +9726,8 @@ function Table({
|
|
|
9302
9726
|
reactNative.View,
|
|
9303
9727
|
{
|
|
9304
9728
|
className: cn(
|
|
9305
|
-
"flex-row
|
|
9729
|
+
"flex-row",
|
|
9730
|
+
design.ui.table.thead,
|
|
9306
9731
|
"border-b border-gray-200 dark:border-gray-700"
|
|
9307
9732
|
),
|
|
9308
9733
|
children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9325,7 +9750,19 @@ function Table({
|
|
|
9325
9750
|
alignClasses[column.align || "left"]
|
|
9326
9751
|
),
|
|
9327
9752
|
children: [
|
|
9328
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9753
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9754
|
+
reactNative.Text,
|
|
9755
|
+
{
|
|
9756
|
+
className: cn(
|
|
9757
|
+
design.designTokens.typography.size.xs,
|
|
9758
|
+
design.designTokens.typography.weight.medium,
|
|
9759
|
+
"text-gray-700 dark:text-gray-300",
|
|
9760
|
+
design.designTokens.typography.transform.uppercase,
|
|
9761
|
+
design.designTokens.typography.tracking.wider
|
|
9762
|
+
),
|
|
9763
|
+
children: column.label
|
|
9764
|
+
}
|
|
9765
|
+
),
|
|
9329
9766
|
column.sortable && (sort == null ? void 0 : sort.column) === column.key && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xs text-gray-500", children: sort.direction === "asc" ? "↑" : "↓" })
|
|
9330
9767
|
]
|
|
9331
9768
|
}
|
|
@@ -9335,7 +9772,7 @@ function Table({
|
|
|
9335
9772
|
))
|
|
9336
9773
|
}
|
|
9337
9774
|
),
|
|
9338
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className:
|
|
9775
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: design.ui.table.tr, children: data.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "px-4 py-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-center text-sm text-gray-500 dark:text-gray-400", children: emptyMessage }) }) : data.map((row, rowIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9339
9776
|
reactNative.Pressable,
|
|
9340
9777
|
{
|
|
9341
9778
|
onPress: () => onRowPress == null ? void 0 : onRowPress(row, rowIndex),
|
|
@@ -9343,7 +9780,7 @@ function Table({
|
|
|
9343
9780
|
className: cn(
|
|
9344
9781
|
"flex-row",
|
|
9345
9782
|
"border-b border-gray-200 dark:border-gray-700",
|
|
9346
|
-
striped && rowIndex % 2 === 1 &&
|
|
9783
|
+
striped && rowIndex % 2 === 1 && design.ui.table.trAlt
|
|
9347
9784
|
),
|
|
9348
9785
|
accessibilityRole: "button",
|
|
9349
9786
|
children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9355,7 +9792,16 @@ function Table({
|
|
|
9355
9792
|
bordered && "border-r border-gray-200 dark:border-gray-700 last:border-r-0"
|
|
9356
9793
|
),
|
|
9357
9794
|
style: { width: column.width },
|
|
9358
|
-
children: column.render ? column.render(row, rowIndex) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9795
|
+
children: column.render ? column.render(row, rowIndex) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9796
|
+
reactNative.Text,
|
|
9797
|
+
{
|
|
9798
|
+
className: cn(
|
|
9799
|
+
design.designTokens.typography.size.sm,
|
|
9800
|
+
"text-gray-900 dark:text-white"
|
|
9801
|
+
),
|
|
9802
|
+
children: String(row[column.key] ?? "")
|
|
9803
|
+
}
|
|
9804
|
+
)
|
|
9359
9805
|
},
|
|
9360
9806
|
column.key
|
|
9361
9807
|
))
|
|
@@ -9450,7 +9896,7 @@ const Command = ({
|
|
|
9450
9896
|
value: searchQuery,
|
|
9451
9897
|
onChangeText: setSearchQuery,
|
|
9452
9898
|
placeholder,
|
|
9453
|
-
placeholderTextColor:
|
|
9899
|
+
placeholderTextColor: design.colors.raw.neutral[400],
|
|
9454
9900
|
className: "flex-1 text-gray-900 dark:text-white text-base",
|
|
9455
9901
|
autoCapitalize: "none",
|
|
9456
9902
|
autoCorrect: false,
|
|
@@ -9676,6 +10122,7 @@ const StandardPageLayout = ({
|
|
|
9676
10122
|
}) => {
|
|
9677
10123
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("flex-1", backgroundClassName), children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("flex-1", contentClassName), children }) });
|
|
9678
10124
|
};
|
|
10125
|
+
const { typography: typography$3 } = design.designTokens;
|
|
9679
10126
|
const StepList = ({
|
|
9680
10127
|
items,
|
|
9681
10128
|
type = "ordered",
|
|
@@ -9686,10 +10133,30 @@ const StepList = ({
|
|
|
9686
10133
|
const renderStepNumber = (index) => {
|
|
9687
10134
|
if (type === "ordered") {
|
|
9688
10135
|
if (variant === "enhanced") {
|
|
9689
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "w-6 h-6 bg-blue-600 rounded-full items-center justify-center mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10136
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "w-6 h-6 bg-blue-600 rounded-full items-center justify-center mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10137
|
+
reactNative.Text,
|
|
10138
|
+
{
|
|
10139
|
+
className: cn(
|
|
10140
|
+
"text-white",
|
|
10141
|
+
typography$3.size.sm,
|
|
10142
|
+
typography$3.weight.medium
|
|
10143
|
+
),
|
|
10144
|
+
children: index + 1
|
|
10145
|
+
}
|
|
10146
|
+
) });
|
|
9690
10147
|
}
|
|
9691
10148
|
if (variant === "minimal") {
|
|
9692
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "w-6 h-6 bg-blue-100 dark:bg-blue-900/20 rounded-full items-center justify-center mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10149
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "w-6 h-6 bg-blue-100 dark:bg-blue-900/20 rounded-full items-center justify-center mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10150
|
+
reactNative.Text,
|
|
10151
|
+
{
|
|
10152
|
+
className: cn(
|
|
10153
|
+
"text-blue-600 dark:text-blue-400",
|
|
10154
|
+
typography$3.size.sm,
|
|
10155
|
+
typography$3.weight.medium
|
|
10156
|
+
),
|
|
10157
|
+
children: index + 1
|
|
10158
|
+
}
|
|
10159
|
+
) });
|
|
9693
10160
|
}
|
|
9694
10161
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "text-gray-600 dark:text-gray-400 mr-2", children: [
|
|
9695
10162
|
index + 1,
|
|
@@ -9720,7 +10187,16 @@ const StepList = ({
|
|
|
9720
10187
|
typeof content === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-600 dark:text-gray-400", children: content }) : content,
|
|
9721
10188
|
subItems && subItems.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "mt-2 ml-4 gap-1", children: subItems.map((subItem, subIndex) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row", children: [
|
|
9722
10189
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-500 dark:text-gray-500 mr-2", children: "•" }),
|
|
9723
|
-
typeof subItem === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10190
|
+
typeof subItem === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10191
|
+
reactNative.Text,
|
|
10192
|
+
{
|
|
10193
|
+
className: cn(
|
|
10194
|
+
typography$3.size.sm,
|
|
10195
|
+
"text-gray-500 dark:text-gray-500 flex-1"
|
|
10196
|
+
),
|
|
10197
|
+
children: subItem
|
|
10198
|
+
}
|
|
10199
|
+
) : subItem
|
|
9724
10200
|
] }, subIndex)) })
|
|
9725
10201
|
] })
|
|
9726
10202
|
]
|
|
@@ -9754,53 +10230,76 @@ const FeatureCard = ({
|
|
|
9754
10230
|
borderColor = false,
|
|
9755
10231
|
className
|
|
9756
10232
|
}) => {
|
|
9757
|
-
const
|
|
10233
|
+
const colorClasses2 = {
|
|
9758
10234
|
blue: "text-blue-600 dark:text-blue-400",
|
|
10235
|
+
// colors.raw.blue[600] / [400]
|
|
9759
10236
|
green: "text-green-600 dark:text-green-400",
|
|
10237
|
+
// colors.raw.green[600] / [400]
|
|
9760
10238
|
purple: "text-purple-600 dark:text-purple-400",
|
|
9761
10239
|
orange: "text-orange-600 dark:text-orange-400",
|
|
10240
|
+
// colors.raw.orange[600] / [400]
|
|
9762
10241
|
pink: "text-pink-600 dark:text-pink-400",
|
|
9763
10242
|
gray: "text-gray-600 dark:text-gray-400",
|
|
10243
|
+
// colors.raw.neutral[600] / [400]
|
|
9764
10244
|
red: "text-red-600 dark:text-red-400",
|
|
10245
|
+
// colors.raw.red[600] / [400]
|
|
9765
10246
|
indigo: "text-indigo-600 dark:text-indigo-400",
|
|
9766
10247
|
cyan: "text-cyan-600 dark:text-cyan-400",
|
|
9767
10248
|
emerald: "text-emerald-600 dark:text-emerald-400"
|
|
9768
10249
|
};
|
|
9769
10250
|
const borderColorClasses = {
|
|
9770
10251
|
green: "border-l-4 border-l-green-500",
|
|
10252
|
+
// colors.raw.green[500]
|
|
9771
10253
|
blue: "border-l-4 border-l-blue-500",
|
|
10254
|
+
// colors.raw.blue[500]
|
|
9772
10255
|
purple: "border-l-4 border-l-purple-500",
|
|
10256
|
+
// colors.raw.purple[500]
|
|
9773
10257
|
orange: "border-l-4 border-l-orange-500",
|
|
10258
|
+
// colors.raw.orange[500]
|
|
9774
10259
|
red: "border-l-4 border-l-red-500",
|
|
10260
|
+
// colors.raw.red[500]
|
|
9775
10261
|
indigo: "border-l-4 border-l-indigo-500",
|
|
9776
10262
|
cyan: "border-l-4 border-l-cyan-500",
|
|
9777
10263
|
emerald: "border-l-4 border-l-emerald-500",
|
|
9778
10264
|
pink: "border-l-4 border-l-pink-500",
|
|
9779
10265
|
gray: "border-l-4 border-l-gray-500"
|
|
10266
|
+
// colors.raw.neutral[500]
|
|
9780
10267
|
};
|
|
9781
10268
|
const iconBackgroundClasses = {
|
|
9782
10269
|
green: "bg-green-100 dark:bg-green-900/20",
|
|
10270
|
+
// colors.raw.green[100] / [900]
|
|
9783
10271
|
blue: "bg-blue-100 dark:bg-blue-900/20",
|
|
10272
|
+
// colors.raw.blue[100] / [900]
|
|
9784
10273
|
purple: "bg-purple-100 dark:bg-purple-900/20",
|
|
10274
|
+
// colors.raw.purple[100] / [900]
|
|
9785
10275
|
orange: "bg-orange-100 dark:bg-orange-900/20",
|
|
10276
|
+
// colors.raw.orange[100] / [900]
|
|
9786
10277
|
red: "bg-red-100 dark:bg-red-900/20",
|
|
10278
|
+
// colors.raw.red[100] / [900]
|
|
9787
10279
|
indigo: "bg-indigo-100 dark:bg-indigo-900/20",
|
|
9788
10280
|
cyan: "bg-cyan-100 dark:bg-cyan-900/20",
|
|
9789
10281
|
emerald: "bg-emerald-100 dark:bg-emerald-900/20",
|
|
9790
10282
|
pink: "bg-pink-100 dark:bg-pink-900/20",
|
|
9791
10283
|
gray: "bg-gray-100 dark:bg-gray-900/20"
|
|
10284
|
+
// colors.raw.neutral[100] / [900]
|
|
9792
10285
|
};
|
|
9793
10286
|
const bulletColorClasses = {
|
|
9794
10287
|
green: "bg-green-500",
|
|
10288
|
+
// colors.raw.green[500]
|
|
9795
10289
|
blue: "bg-blue-500",
|
|
10290
|
+
// colors.raw.blue[500]
|
|
9796
10291
|
purple: "bg-purple-500",
|
|
10292
|
+
// colors.raw.purple[500]
|
|
9797
10293
|
orange: "bg-orange-500",
|
|
10294
|
+
// colors.raw.orange[500]
|
|
9798
10295
|
red: "bg-red-500",
|
|
10296
|
+
// colors.raw.red[500]
|
|
9799
10297
|
indigo: "bg-indigo-500",
|
|
9800
10298
|
cyan: "bg-cyan-500",
|
|
9801
10299
|
emerald: "bg-emerald-500",
|
|
9802
10300
|
pink: "bg-pink-500",
|
|
9803
10301
|
gray: "bg-gray-500"
|
|
10302
|
+
// colors.raw.neutral[500]
|
|
9804
10303
|
};
|
|
9805
10304
|
const CardContent2 = () => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
9806
10305
|
borderColor ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9810,11 +10309,31 @@ const FeatureCard = ({
|
|
|
9810
10309
|
"w-12 h-12 rounded-lg items-center justify-center mb-4",
|
|
9811
10310
|
iconBackgroundClasses[color]
|
|
9812
10311
|
),
|
|
9813
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className:
|
|
10312
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: colorClasses2[color], children: icon })
|
|
10313
|
+
}
|
|
10314
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("mb-4", colorClasses2[color]), children: icon }),
|
|
10315
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10316
|
+
reactNative.Text,
|
|
10317
|
+
{
|
|
10318
|
+
className: cn(
|
|
10319
|
+
design.designTokens.typography.size.xl,
|
|
10320
|
+
design.designTokens.typography.weight.semibold,
|
|
10321
|
+
"text-gray-900 dark:text-white mb-3"
|
|
10322
|
+
),
|
|
10323
|
+
children: title
|
|
10324
|
+
}
|
|
10325
|
+
),
|
|
10326
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10327
|
+
reactNative.Text,
|
|
10328
|
+
{
|
|
10329
|
+
className: cn(
|
|
10330
|
+
design.designTokens.typography.size.base,
|
|
10331
|
+
design.designTokens.typography.leading.relaxed,
|
|
10332
|
+
"text-gray-600 dark:text-gray-300 mb-4"
|
|
10333
|
+
),
|
|
10334
|
+
children: description
|
|
9814
10335
|
}
|
|
9815
|
-
)
|
|
9816
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xl font-semibold text-gray-900 dark:text-white mb-3", children: title }),
|
|
9817
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: description }),
|
|
10336
|
+
),
|
|
9818
10337
|
cta && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "mt-3 mb-4", children: cta }),
|
|
9819
10338
|
benefits && benefits.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "gap-2 mb-4", children: benefits.map((benefit, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-start", children: [
|
|
9820
10339
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9826,15 +10345,44 @@ const FeatureCard = ({
|
|
|
9826
10345
|
)
|
|
9827
10346
|
}
|
|
9828
10347
|
),
|
|
9829
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10348
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10349
|
+
reactNative.Text,
|
|
10350
|
+
{
|
|
10351
|
+
className: cn(
|
|
10352
|
+
"flex-1",
|
|
10353
|
+
design.designTokens.typography.size.sm,
|
|
10354
|
+
"text-gray-600 dark:text-gray-400"
|
|
10355
|
+
),
|
|
10356
|
+
children: benefit
|
|
10357
|
+
}
|
|
10358
|
+
)
|
|
9830
10359
|
] }, index)) }),
|
|
9831
10360
|
metrics && Object.keys(metrics).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row flex-wrap gap-4 mt-4", children: Object.entries(metrics).map(([key, value], index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
9832
10361
|
reactNative.View,
|
|
9833
10362
|
{
|
|
9834
10363
|
className: "flex-1 min-w-[80px] items-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",
|
|
9835
10364
|
children: [
|
|
9836
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9837
|
-
|
|
10365
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10366
|
+
reactNative.Text,
|
|
10367
|
+
{
|
|
10368
|
+
className: cn(
|
|
10369
|
+
design.designTokens.typography.size.lg,
|
|
10370
|
+
design.designTokens.typography.weight.bold,
|
|
10371
|
+
colorClasses2[color]
|
|
10372
|
+
),
|
|
10373
|
+
children: value
|
|
10374
|
+
}
|
|
10375
|
+
),
|
|
10376
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10377
|
+
reactNative.Text,
|
|
10378
|
+
{
|
|
10379
|
+
className: cn(
|
|
10380
|
+
design.designTokens.typography.size.xs,
|
|
10381
|
+
"text-gray-500 dark:text-gray-400 mt-1"
|
|
10382
|
+
),
|
|
10383
|
+
children: key
|
|
10384
|
+
}
|
|
10385
|
+
)
|
|
9838
10386
|
]
|
|
9839
10387
|
},
|
|
9840
10388
|
index
|
|
@@ -9880,10 +10428,10 @@ const FeatureGrid = ({
|
|
|
9880
10428
|
lg: "w-20 h-20"
|
|
9881
10429
|
};
|
|
9882
10430
|
const badgeVariants = {
|
|
9883
|
-
success:
|
|
9884
|
-
info:
|
|
9885
|
-
warning:
|
|
9886
|
-
default:
|
|
10431
|
+
success: `${design.colors.component.badge.success.base} ${design.colors.component.badge.success.dark}`,
|
|
10432
|
+
info: `${design.colors.component.badge.primary.base} ${design.colors.component.badge.primary.dark}`,
|
|
10433
|
+
warning: `${design.colors.component.badge.attention.base} ${design.colors.component.badge.attention.dark}`,
|
|
10434
|
+
default: `${design.colors.component.badge.default.base} ${design.colors.component.badge.default.dark}`
|
|
9887
10435
|
};
|
|
9888
10436
|
const renderFeature = (feature, index) => {
|
|
9889
10437
|
const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -9891,7 +10439,7 @@ const FeatureGrid = ({
|
|
|
9891
10439
|
{
|
|
9892
10440
|
className: cn(
|
|
9893
10441
|
"items-center",
|
|
9894
|
-
cardVariant === "card" && "
|
|
10442
|
+
cardVariant === "card" && `${design.getCardVariantColors("elevated")} rounded-2xl p-6`,
|
|
9895
10443
|
cardVariant === "minimal" && "gap-4"
|
|
9896
10444
|
),
|
|
9897
10445
|
children: [
|
|
@@ -9975,14 +10523,14 @@ const CTASection = ({
|
|
|
9975
10523
|
lg: "py-16 px-8"
|
|
9976
10524
|
};
|
|
9977
10525
|
const titleSizeClasses = {
|
|
9978
|
-
sm: "
|
|
9979
|
-
md: "
|
|
9980
|
-
lg: "
|
|
10526
|
+
sm: design.designTokens.typography.size["2xl"],
|
|
10527
|
+
md: design.designTokens.typography.size["3xl"],
|
|
10528
|
+
lg: design.designTokens.typography.size["4xl"]
|
|
9981
10529
|
};
|
|
9982
10530
|
const descriptionSizeClasses = {
|
|
9983
|
-
sm:
|
|
9984
|
-
md:
|
|
9985
|
-
lg:
|
|
10531
|
+
sm: design.designTokens.typography.size.base,
|
|
10532
|
+
md: design.designTokens.typography.size.lg,
|
|
10533
|
+
lg: design.designTokens.typography.size.xl
|
|
9986
10534
|
};
|
|
9987
10535
|
const textColorClass = textColor === "light" ? "text-white" : "text-gray-900";
|
|
9988
10536
|
const renderButton = (button, isPrimary) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -10062,8 +10610,10 @@ const PromotionalBanner = ({
|
|
|
10062
10610
|
reactNative.View,
|
|
10063
10611
|
{
|
|
10064
10612
|
className: cn(
|
|
10065
|
-
|
|
10066
|
-
|
|
10613
|
+
// Derive green palette from DS alert.success colors
|
|
10614
|
+
design.colors.component.alert.success.base,
|
|
10615
|
+
design.colors.component.alert.success.dark,
|
|
10616
|
+
"border-b",
|
|
10067
10617
|
isProminent && "border-b-2",
|
|
10068
10618
|
className
|
|
10069
10619
|
),
|
|
@@ -10114,6 +10664,7 @@ const PromotionalBanner = ({
|
|
|
10114
10664
|
}
|
|
10115
10665
|
);
|
|
10116
10666
|
};
|
|
10667
|
+
const { typography: typography$2 } = design.designTokens;
|
|
10117
10668
|
if (reactNative.Platform.OS === "android" && reactNative.UIManager.setLayoutAnimationEnabledExperimental) {
|
|
10118
10669
|
reactNative.UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
10119
10670
|
}
|
|
@@ -10163,7 +10714,8 @@ const CollapsibleSection = ({
|
|
|
10163
10714
|
reactNative.Text,
|
|
10164
10715
|
{
|
|
10165
10716
|
className: cn(
|
|
10166
|
-
|
|
10717
|
+
typography$2.size.base,
|
|
10718
|
+
typography$2.weight.medium,
|
|
10167
10719
|
isSelected && !selectedSubsection ? "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300"
|
|
10168
10720
|
),
|
|
10169
10721
|
children: title
|
|
@@ -10178,7 +10730,7 @@ const CollapsibleSection = ({
|
|
|
10178
10730
|
className: "p-2 rounded-md",
|
|
10179
10731
|
accessibilityRole: "button",
|
|
10180
10732
|
accessibilityLabel: isExpanded ? "Collapse" : "Expand",
|
|
10181
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Animated.View, { style: { transform: [{ rotate: rotation }] }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-500
|
|
10733
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Animated.View, { style: { transform: [{ rotate: rotation }] }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-gray-500", typography$2.size.lg), children: "›" }) })
|
|
10182
10734
|
}
|
|
10183
10735
|
)
|
|
10184
10736
|
] }),
|
|
@@ -10198,7 +10750,7 @@ const CollapsibleSection = ({
|
|
|
10198
10750
|
reactNative.Text,
|
|
10199
10751
|
{
|
|
10200
10752
|
className: cn(
|
|
10201
|
-
|
|
10753
|
+
typography$2.size.sm,
|
|
10202
10754
|
selectedSubsection === subsection.id ? "text-blue-700 dark:text-blue-300" : "text-gray-600 dark:text-gray-400"
|
|
10203
10755
|
),
|
|
10204
10756
|
children: subsection.title
|
|
@@ -10209,6 +10761,19 @@ const CollapsibleSection = ({
|
|
|
10209
10761
|
] }, subsection.id)) })
|
|
10210
10762
|
] });
|
|
10211
10763
|
};
|
|
10764
|
+
let _cardColors = null;
|
|
10765
|
+
function getDashboardCardColors() {
|
|
10766
|
+
if (!_cardColors) {
|
|
10767
|
+
_cardColors = {
|
|
10768
|
+
default: design.getCardVariantColors("default"),
|
|
10769
|
+
primary: design.getCardVariantColors("info"),
|
|
10770
|
+
success: design.getCardVariantColors("success"),
|
|
10771
|
+
warning: design.getCardVariantColors("warning"),
|
|
10772
|
+
danger: design.getCardVariantColors("error")
|
|
10773
|
+
};
|
|
10774
|
+
}
|
|
10775
|
+
return _cardColors;
|
|
10776
|
+
}
|
|
10212
10777
|
const DashboardStatCard = ({
|
|
10213
10778
|
title,
|
|
10214
10779
|
value,
|
|
@@ -10218,13 +10783,7 @@ const DashboardStatCard = ({
|
|
|
10218
10783
|
variant = "default",
|
|
10219
10784
|
className
|
|
10220
10785
|
}) => {
|
|
10221
|
-
const variantClasses =
|
|
10222
|
-
default: "bg-white dark:bg-gray-900",
|
|
10223
|
-
primary: "bg-blue-50 dark:bg-blue-900/20",
|
|
10224
|
-
success: "bg-green-50 dark:bg-green-900/20",
|
|
10225
|
-
warning: "bg-yellow-50 dark:bg-yellow-900/20",
|
|
10226
|
-
danger: "bg-red-50 dark:bg-red-900/20"
|
|
10227
|
-
};
|
|
10786
|
+
const variantClasses = getDashboardCardColors();
|
|
10228
10787
|
const isPositive = change !== void 0 && change >= 0;
|
|
10229
10788
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10230
10789
|
reactNative.View,
|
|
@@ -10236,16 +10795,29 @@ const DashboardStatCard = ({
|
|
|
10236
10795
|
),
|
|
10237
10796
|
children: [
|
|
10238
10797
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-start justify-between mb-2", children: [
|
|
10239
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10798
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10799
|
+
reactNative.Text,
|
|
10800
|
+
{
|
|
10801
|
+
className: `${design.designTokens.typography.size.sm} ${design.designTokens.typography.weight.medium} text-gray-600 dark:text-gray-400`,
|
|
10802
|
+
children: title
|
|
10803
|
+
}
|
|
10804
|
+
),
|
|
10240
10805
|
icon && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "text-gray-400 dark:text-gray-600", children: icon })
|
|
10241
10806
|
] }),
|
|
10242
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10807
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10808
|
+
reactNative.Text,
|
|
10809
|
+
{
|
|
10810
|
+
className: `${design.designTokens.typography.size["3xl"]} ${design.designTokens.typography.weight.bold} text-gray-900 dark:text-white`,
|
|
10811
|
+
children: value
|
|
10812
|
+
}
|
|
10813
|
+
),
|
|
10243
10814
|
change !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center gap-1 mt-2", children: [
|
|
10244
10815
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10245
10816
|
reactNative.Text,
|
|
10246
10817
|
{
|
|
10247
10818
|
className: cn(
|
|
10248
|
-
|
|
10819
|
+
design.designTokens.typography.size.sm,
|
|
10820
|
+
design.designTokens.typography.weight.medium,
|
|
10249
10821
|
isPositive ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"
|
|
10250
10822
|
),
|
|
10251
10823
|
children: [
|
|
@@ -10256,37 +10828,40 @@ const DashboardStatCard = ({
|
|
|
10256
10828
|
]
|
|
10257
10829
|
}
|
|
10258
10830
|
),
|
|
10259
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10831
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10832
|
+
reactNative.Text,
|
|
10833
|
+
{
|
|
10834
|
+
className: `${design.designTokens.typography.size.xs} text-gray-500 dark:text-gray-400`,
|
|
10835
|
+
children: changePeriod
|
|
10836
|
+
}
|
|
10837
|
+
)
|
|
10260
10838
|
] })
|
|
10261
10839
|
]
|
|
10262
10840
|
}
|
|
10263
10841
|
);
|
|
10264
10842
|
};
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
className
|
|
10274
|
-
}) => {
|
|
10275
|
-
const variantClasses = {
|
|
10843
|
+
let _statColors = null;
|
|
10844
|
+
function getStatColors() {
|
|
10845
|
+
if (!_statColors) _statColors = buildStatColors();
|
|
10846
|
+
return _statColors;
|
|
10847
|
+
}
|
|
10848
|
+
function buildStatColors() {
|
|
10849
|
+
const alert2 = design.colors.component.alert;
|
|
10850
|
+
return {
|
|
10276
10851
|
primary: {
|
|
10277
|
-
value:
|
|
10852
|
+
value: `${alert2.info.icon}`,
|
|
10278
10853
|
label: "text-blue-600/70 dark:text-blue-400/70"
|
|
10279
10854
|
},
|
|
10280
10855
|
success: {
|
|
10281
|
-
value:
|
|
10856
|
+
value: `${alert2.success.icon}`,
|
|
10282
10857
|
label: "text-green-600/70 dark:text-green-400/70"
|
|
10283
10858
|
},
|
|
10284
10859
|
warning: {
|
|
10285
|
-
value:
|
|
10286
|
-
label: "text-
|
|
10860
|
+
value: `${alert2.warning.icon}`,
|
|
10861
|
+
label: "text-orange-600/70 dark:text-orange-400/70"
|
|
10287
10862
|
},
|
|
10288
10863
|
danger: {
|
|
10289
|
-
value:
|
|
10864
|
+
value: `${alert2.error.icon}`,
|
|
10290
10865
|
label: "text-red-600/70 dark:text-red-400/70"
|
|
10291
10866
|
},
|
|
10292
10867
|
neutral: {
|
|
@@ -10298,11 +10873,35 @@ const StatDisplay = ({
|
|
|
10298
10873
|
label: "text-white/70"
|
|
10299
10874
|
}
|
|
10300
10875
|
};
|
|
10876
|
+
}
|
|
10877
|
+
const StatDisplay = ({
|
|
10878
|
+
value,
|
|
10879
|
+
label,
|
|
10880
|
+
variant = "neutral",
|
|
10881
|
+
size = "md",
|
|
10882
|
+
align = "center",
|
|
10883
|
+
icon,
|
|
10884
|
+
iconPosition = "top",
|
|
10885
|
+
className
|
|
10886
|
+
}) => {
|
|
10887
|
+
const variantClasses = getStatColors();
|
|
10301
10888
|
const sizeClasses = {
|
|
10302
|
-
sm: {
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10889
|
+
sm: {
|
|
10890
|
+
value: design.designTokens.typography.size.xl,
|
|
10891
|
+
label: design.designTokens.typography.size.xs
|
|
10892
|
+
},
|
|
10893
|
+
md: {
|
|
10894
|
+
value: design.designTokens.typography.size["2xl"],
|
|
10895
|
+
label: design.designTokens.typography.size.sm
|
|
10896
|
+
},
|
|
10897
|
+
lg: {
|
|
10898
|
+
value: design.designTokens.typography.size["3xl"],
|
|
10899
|
+
label: design.designTokens.typography.size.base
|
|
10900
|
+
},
|
|
10901
|
+
xl: {
|
|
10902
|
+
value: design.designTokens.typography.size["4xl"],
|
|
10903
|
+
label: design.designTokens.typography.size.lg
|
|
10904
|
+
}
|
|
10306
10905
|
};
|
|
10307
10906
|
const alignClasses = {
|
|
10308
10907
|
left: "items-start",
|
|
@@ -10326,7 +10925,11 @@ const StatDisplay = ({
|
|
|
10326
10925
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10327
10926
|
reactNative.Text,
|
|
10328
10927
|
{
|
|
10329
|
-
className: cn(
|
|
10928
|
+
className: cn(
|
|
10929
|
+
design.designTokens.typography.weight.bold,
|
|
10930
|
+
sizeConfig2.value,
|
|
10931
|
+
variantConfig2.value
|
|
10932
|
+
),
|
|
10330
10933
|
children: value
|
|
10331
10934
|
}
|
|
10332
10935
|
),
|
|
@@ -10338,10 +10941,21 @@ const StatDisplay = ({
|
|
|
10338
10941
|
}
|
|
10339
10942
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: cn(alignClasses[align], className), children: [
|
|
10340
10943
|
icon && iconPosition === "top" && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("mb-2", variantConfig2.value), children: icon }),
|
|
10341
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10944
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10945
|
+
reactNative.Text,
|
|
10946
|
+
{
|
|
10947
|
+
className: cn(
|
|
10948
|
+
design.designTokens.typography.weight.bold,
|
|
10949
|
+
sizeConfig2.value,
|
|
10950
|
+
variantConfig2.value
|
|
10951
|
+
),
|
|
10952
|
+
children: value
|
|
10953
|
+
}
|
|
10954
|
+
),
|
|
10342
10955
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(sizeConfig2.label, variantConfig2.label), children: label })
|
|
10343
10956
|
] });
|
|
10344
10957
|
};
|
|
10958
|
+
const { typography: typography$1 } = design.designTokens;
|
|
10345
10959
|
const KeyValuePair = ({
|
|
10346
10960
|
label,
|
|
10347
10961
|
value,
|
|
@@ -10355,9 +10969,13 @@ const KeyValuePair = ({
|
|
|
10355
10969
|
className
|
|
10356
10970
|
}) => {
|
|
10357
10971
|
const sizeClasses = {
|
|
10358
|
-
sm: { label:
|
|
10359
|
-
md: {
|
|
10360
|
-
|
|
10972
|
+
sm: { label: typography$1.size.sm, value: typography$1.size.sm, gap: "gap-1" },
|
|
10973
|
+
md: {
|
|
10974
|
+
label: typography$1.size.base,
|
|
10975
|
+
value: typography$1.size.base,
|
|
10976
|
+
gap: "gap-2"
|
|
10977
|
+
},
|
|
10978
|
+
lg: { label: typography$1.size.lg, value: typography$1.size.lg, gap: "gap-3" }
|
|
10361
10979
|
};
|
|
10362
10980
|
const labelWidthStyles = {
|
|
10363
10981
|
auto: void 0,
|
|
@@ -10373,12 +10991,12 @@ const KeyValuePair = ({
|
|
|
10373
10991
|
const labelVariantClasses = {
|
|
10374
10992
|
default: "text-gray-700 dark:text-gray-300",
|
|
10375
10993
|
muted: "text-gray-600 dark:text-gray-400",
|
|
10376
|
-
strong:
|
|
10994
|
+
strong: `text-gray-900 dark:text-gray-100 ${typography$1.weight.semibold}`
|
|
10377
10995
|
};
|
|
10378
10996
|
const valueVariantClasses = {
|
|
10379
10997
|
default: "text-gray-900 dark:text-gray-100",
|
|
10380
10998
|
muted: "text-gray-600 dark:text-gray-400",
|
|
10381
|
-
strong:
|
|
10999
|
+
strong: `text-gray-900 dark:text-gray-100 ${typography$1.weight.semibold}`,
|
|
10382
11000
|
primary: "text-blue-600 dark:text-blue-400"
|
|
10383
11001
|
};
|
|
10384
11002
|
const sizeConfig2 = sizeClasses[size];
|
|
@@ -10416,6 +11034,7 @@ const KeyValuePair = ({
|
|
|
10416
11034
|
}
|
|
10417
11035
|
);
|
|
10418
11036
|
};
|
|
11037
|
+
const { typography } = design.designTokens;
|
|
10419
11038
|
const SmartLink = ({
|
|
10420
11039
|
to,
|
|
10421
11040
|
href,
|
|
@@ -10436,9 +11055,9 @@ const SmartLink = ({
|
|
|
10436
11055
|
inherit: "text-inherit"
|
|
10437
11056
|
};
|
|
10438
11057
|
const sizeClasses = {
|
|
10439
|
-
sm:
|
|
10440
|
-
default:
|
|
10441
|
-
lg:
|
|
11058
|
+
sm: typography.size.sm,
|
|
11059
|
+
default: typography.size.base,
|
|
11060
|
+
lg: typography.size.lg
|
|
10442
11061
|
};
|
|
10443
11062
|
const handlePress = async () => {
|
|
10444
11063
|
if (disabled || !destination) return;
|