@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.esm.js
CHANGED
|
@@ -2,9 +2,9 @@ import { clsx } from "clsx";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import React__default, { useState, useRef, useCallback, useEffect, createContext, useContext } from "react";
|
|
4
4
|
import { Animated, View, Text as Text$1, Pressable, ActivityIndicator, TextInput, Dimensions, Modal as Modal$1, SafeAreaView, FlatList, StyleSheet, TouchableOpacity, Image, KeyboardAvoidingView, ScrollView, Platform, PanResponder, Linking, TouchableWithoutFeedback, useWindowDimensions, RefreshControl, UIManager, LayoutAnimation, Alert as Alert$1 } from "react-native";
|
|
5
|
+
import { colors, variants, getCardVariantColors, textVariants, designTokens, statusIndicatorColors, ui } from "@sudobility/design";
|
|
6
|
+
import { colors as colors2, designTokens as designTokens2, textVariants as textVariants2, variants as variants2 } from "@sudobility/design";
|
|
5
7
|
import { cva } from "class-variance-authority";
|
|
6
|
-
import { variants, getCardVariantColors, textVariants } from "@sudobility/design";
|
|
7
|
-
import { colors, designTokens, textVariants as textVariants2, variants as variants2 } from "@sudobility/design";
|
|
8
8
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
9
|
function cn(...inputs) {
|
|
10
10
|
return clsx(inputs);
|
|
@@ -1354,34 +1354,42 @@ logger.withContext("API");
|
|
|
1354
1354
|
logger.withContext("CONTRACT");
|
|
1355
1355
|
logger.withContext("ENS");
|
|
1356
1356
|
logger.withContext("STORAGE");
|
|
1357
|
+
const alert$1 = colors.component.alert;
|
|
1358
|
+
function splitAlertClasses$2(base, dark) {
|
|
1359
|
+
const all = `${base} ${dark}`.split(" ");
|
|
1360
|
+
return {
|
|
1361
|
+
container: all.filter((c) => c.includes("bg-") || c.includes("border-")).join(" "),
|
|
1362
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
1363
|
+
};
|
|
1364
|
+
}
|
|
1365
|
+
const dsInfo$1 = splitAlertClasses$2(alert$1.info.base, alert$1.info.dark);
|
|
1366
|
+
const dsSuccess$1 = splitAlertClasses$2(alert$1.success.base, alert$1.success.dark);
|
|
1367
|
+
const dsWarning$1 = splitAlertClasses$2(alert$1.warning.base, alert$1.warning.dark);
|
|
1368
|
+
const dsError$1 = splitAlertClasses$2(alert$1.error.base, alert$1.error.dark);
|
|
1357
1369
|
const variantConfig = {
|
|
1358
1370
|
[InfoType.INFO]: {
|
|
1359
1371
|
icon: "ℹ",
|
|
1360
|
-
container:
|
|
1361
|
-
iconColor:
|
|
1362
|
-
|
|
1363
|
-
descriptionColor: "text-blue-700 dark:text-blue-300"
|
|
1372
|
+
container: dsInfo$1.container,
|
|
1373
|
+
iconColor: alert$1.info.icon,
|
|
1374
|
+
textColor: dsInfo$1.text
|
|
1364
1375
|
},
|
|
1365
1376
|
[InfoType.SUCCESS]: {
|
|
1366
1377
|
icon: "✓",
|
|
1367
|
-
container:
|
|
1368
|
-
iconColor:
|
|
1369
|
-
|
|
1370
|
-
descriptionColor: "text-green-700 dark:text-green-300"
|
|
1378
|
+
container: dsSuccess$1.container,
|
|
1379
|
+
iconColor: alert$1.success.icon,
|
|
1380
|
+
textColor: dsSuccess$1.text
|
|
1371
1381
|
},
|
|
1372
1382
|
[InfoType.WARNING]: {
|
|
1373
1383
|
icon: "⚠",
|
|
1374
|
-
container:
|
|
1375
|
-
iconColor:
|
|
1376
|
-
|
|
1377
|
-
descriptionColor: "text-yellow-700 dark:text-amber-300"
|
|
1384
|
+
container: dsWarning$1.container,
|
|
1385
|
+
iconColor: alert$1.warning.icon,
|
|
1386
|
+
textColor: dsWarning$1.text
|
|
1378
1387
|
},
|
|
1379
1388
|
[InfoType.ERROR]: {
|
|
1380
1389
|
icon: "✗",
|
|
1381
|
-
container:
|
|
1382
|
-
iconColor:
|
|
1383
|
-
|
|
1384
|
-
descriptionColor: "text-red-700 dark:text-red-300"
|
|
1390
|
+
container: dsError$1.container,
|
|
1391
|
+
iconColor: alert$1.error.icon,
|
|
1392
|
+
textColor: dsError$1.text
|
|
1385
1393
|
}
|
|
1386
1394
|
};
|
|
1387
1395
|
const Banner = ({
|
|
@@ -1478,8 +1486,8 @@ const Banner = ({
|
|
|
1478
1486
|
children: [
|
|
1479
1487
|
/* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-shrink-0 mt-0.5", children: icon || /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("text-lg", config.iconColor), children: config.icon }) }),
|
|
1480
1488
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-1 min-w-0", children: [
|
|
1481
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("font-semibold", config.
|
|
1482
|
-
description ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("text-sm mt-1", config.
|
|
1489
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("font-semibold", config.textColor), children: title }),
|
|
1490
|
+
description ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("text-sm mt-1", config.textColor), children: description }) : null
|
|
1483
1491
|
] }),
|
|
1484
1492
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1485
1493
|
Pressable,
|
|
@@ -1631,7 +1639,7 @@ const Button = React.forwardRef(
|
|
|
1631
1639
|
}
|
|
1632
1640
|
);
|
|
1633
1641
|
Button.displayName = "Button";
|
|
1634
|
-
const calloutStyle = "
|
|
1642
|
+
const calloutStyle = getCardVariantColors("info");
|
|
1635
1643
|
const paddingStyles = {
|
|
1636
1644
|
none: "",
|
|
1637
1645
|
sm: "p-3",
|
|
@@ -1708,6 +1716,9 @@ const CardFooter = ({
|
|
|
1708
1716
|
}) => {
|
|
1709
1717
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("flex-row items-center pt-4", className), ...props, children });
|
|
1710
1718
|
};
|
|
1719
|
+
const inputFocusClass = "border-blue-500 dark:border-blue-400";
|
|
1720
|
+
const inputErrorClass = "border-red-500 dark:border-red-400";
|
|
1721
|
+
const inputDisabledClass = "opacity-50 bg-gray-100 dark:bg-gray-800";
|
|
1711
1722
|
const Input = React.forwardRef(
|
|
1712
1723
|
({ className, error, disabled, editable, onFocus, onBlur, ...props }, ref) => {
|
|
1713
1724
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
@@ -1726,9 +1737,9 @@ const Input = React.forwardRef(
|
|
|
1726
1737
|
ref,
|
|
1727
1738
|
className: cn(
|
|
1728
1739
|
variants.input.default(),
|
|
1729
|
-
isFocused &&
|
|
1730
|
-
error &&
|
|
1731
|
-
disabled &&
|
|
1740
|
+
isFocused && inputFocusClass,
|
|
1741
|
+
error && inputErrorClass,
|
|
1742
|
+
disabled && inputDisabledClass,
|
|
1732
1743
|
className
|
|
1733
1744
|
),
|
|
1734
1745
|
editable: isEditable,
|
|
@@ -1750,15 +1761,11 @@ const sizeMap = {
|
|
|
1750
1761
|
extraLarge: "large"
|
|
1751
1762
|
};
|
|
1752
1763
|
const colorMap = {
|
|
1753
|
-
default:
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
warning: "#ea580c",
|
|
1759
|
-
// orange-600
|
|
1760
|
-
error: "#dc2626"
|
|
1761
|
-
// red-600
|
|
1764
|
+
default: colors.raw.blue[600],
|
|
1765
|
+
white: colors.raw.neutral[0],
|
|
1766
|
+
success: colors.raw.green[600],
|
|
1767
|
+
warning: colors.raw.orange[600],
|
|
1768
|
+
error: colors.raw.red[600]
|
|
1762
1769
|
};
|
|
1763
1770
|
const Spinner = ({
|
|
1764
1771
|
size = "default",
|
|
@@ -1780,7 +1787,7 @@ const Spinner = ({
|
|
|
1780
1787
|
...props,
|
|
1781
1788
|
children: [
|
|
1782
1789
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ActivityIndicator, { size: activitySize, color }),
|
|
1783
|
-
showText && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "mt-2
|
|
1790
|
+
showText && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(textVariants.body.sm(), "mt-2"), children: loadingText })
|
|
1784
1791
|
]
|
|
1785
1792
|
}
|
|
1786
1793
|
);
|
|
@@ -1792,8 +1799,8 @@ const defaultIcons = {
|
|
|
1792
1799
|
attention: "🔔",
|
|
1793
1800
|
error: "✕"
|
|
1794
1801
|
};
|
|
1795
|
-
const AlertTitle = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("
|
|
1796
|
-
const AlertDescription = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(
|
|
1802
|
+
const AlertTitle = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(textVariants.label.default(), "mb-1", className), children });
|
|
1803
|
+
const AlertDescription = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(textVariants.body.sm(), className), children });
|
|
1797
1804
|
const Alert = ({
|
|
1798
1805
|
variant = "info",
|
|
1799
1806
|
title,
|
|
@@ -1814,8 +1821,8 @@ const Alert = ({
|
|
|
1814
1821
|
children: [
|
|
1815
1822
|
IconComponent && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-shrink-0", children: IconComponent }),
|
|
1816
1823
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-1", children: [
|
|
1817
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "
|
|
1818
|
-
description && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className:
|
|
1824
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(textVariants.label.default(), "mb-1"), children: title }),
|
|
1825
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: textVariants.body.sm(), children: description }),
|
|
1819
1826
|
children
|
|
1820
1827
|
] })
|
|
1821
1828
|
]
|
|
@@ -2060,6 +2067,11 @@ const Stack = ({
|
|
|
2060
2067
|
};
|
|
2061
2068
|
const VStack = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "vertical", ...props });
|
|
2062
2069
|
const HStack = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "horizontal", ...props });
|
|
2070
|
+
const lineVariantClasses = {
|
|
2071
|
+
light: "bg-gray-200 dark:bg-gray-700",
|
|
2072
|
+
medium: "bg-gray-300 dark:bg-gray-600",
|
|
2073
|
+
dark: "bg-gray-400 dark:bg-gray-500"
|
|
2074
|
+
};
|
|
2063
2075
|
const Divider = ({
|
|
2064
2076
|
label,
|
|
2065
2077
|
labelPosition = "center",
|
|
@@ -2092,18 +2104,13 @@ const Divider = ({
|
|
|
2092
2104
|
medium: 2,
|
|
2093
2105
|
thick: 4
|
|
2094
2106
|
};
|
|
2095
|
-
const variantClasses = {
|
|
2096
|
-
light: "bg-gray-200 dark:bg-gray-700",
|
|
2097
|
-
medium: "bg-gray-300 dark:bg-gray-600",
|
|
2098
|
-
dark: "bg-gray-400 dark:bg-gray-500"
|
|
2099
|
-
};
|
|
2100
2107
|
if (orientation === "vertical") {
|
|
2101
2108
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2102
2109
|
View,
|
|
2103
2110
|
{
|
|
2104
2111
|
className: cn(
|
|
2105
2112
|
"self-stretch",
|
|
2106
|
-
|
|
2113
|
+
lineVariantClasses[variant],
|
|
2107
2114
|
spacingClasses.vertical[spacing],
|
|
2108
2115
|
className
|
|
2109
2116
|
),
|
|
@@ -2119,7 +2126,7 @@ const Divider = ({
|
|
|
2119
2126
|
{
|
|
2120
2127
|
className: cn(
|
|
2121
2128
|
"w-full",
|
|
2122
|
-
|
|
2129
|
+
lineVariantClasses[variant],
|
|
2123
2130
|
spacingClasses.horizontal[spacing],
|
|
2124
2131
|
lineClassName,
|
|
2125
2132
|
className
|
|
@@ -2150,24 +2157,15 @@ const Divider = ({
|
|
|
2150
2157
|
labelPosition !== "left" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2151
2158
|
View,
|
|
2152
2159
|
{
|
|
2153
|
-
className: cn("flex-1",
|
|
2160
|
+
className: cn("flex-1", lineVariantClasses[variant], lineClassName),
|
|
2154
2161
|
style: { height: thicknessValues[thickness] }
|
|
2155
2162
|
}
|
|
2156
2163
|
),
|
|
2157
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2158
|
-
Text$1,
|
|
2159
|
-
{
|
|
2160
|
-
className: cn(
|
|
2161
|
-
textVariants.body.sm(),
|
|
2162
|
-
"px-3 text-gray-500 dark:text-gray-400"
|
|
2163
|
-
),
|
|
2164
|
-
children: label
|
|
2165
|
-
}
|
|
2166
|
-
),
|
|
2164
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(textVariants.caption.default(), "px-3"), children: label }),
|
|
2167
2165
|
labelPosition !== "right" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2168
2166
|
View,
|
|
2169
2167
|
{
|
|
2170
|
-
className: cn("flex-1",
|
|
2168
|
+
className: cn("flex-1", lineVariantClasses[variant], lineClassName),
|
|
2171
2169
|
style: { height: thicknessValues[thickness] }
|
|
2172
2170
|
}
|
|
2173
2171
|
)
|
|
@@ -2405,7 +2403,7 @@ const Label = React.forwardRef(
|
|
|
2405
2403
|
...props,
|
|
2406
2404
|
children: [
|
|
2407
2405
|
children,
|
|
2408
|
-
required && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-red-
|
|
2406
|
+
required && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-red-600 dark:text-red-400 ml-1", children: "*" })
|
|
2409
2407
|
]
|
|
2410
2408
|
}
|
|
2411
2409
|
);
|
|
@@ -2462,7 +2460,7 @@ const TextArea = ({
|
|
|
2462
2460
|
readOnly && "bg-gray-50 dark:bg-gray-900",
|
|
2463
2461
|
inputClassName
|
|
2464
2462
|
),
|
|
2465
|
-
placeholderTextColor:
|
|
2463
|
+
placeholderTextColor: colors.raw.neutral[400],
|
|
2466
2464
|
accessibilityRole: "text",
|
|
2467
2465
|
accessibilityState: { disabled },
|
|
2468
2466
|
...textInputProps
|
|
@@ -2484,6 +2482,28 @@ const TextArea = ({
|
|
|
2484
2482
|
) })
|
|
2485
2483
|
] });
|
|
2486
2484
|
};
|
|
2485
|
+
let _checkboxColors = null;
|
|
2486
|
+
function getCheckboxColors() {
|
|
2487
|
+
if (!_checkboxColors) _checkboxColors = buildCheckboxColors();
|
|
2488
|
+
return _checkboxColors;
|
|
2489
|
+
}
|
|
2490
|
+
function buildCheckboxColors() {
|
|
2491
|
+
function extractCheckedColor(base) {
|
|
2492
|
+
const parts = base.split(" ");
|
|
2493
|
+
const bg = parts.find(
|
|
2494
|
+
(c) => c.startsWith("bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
2495
|
+
) || "";
|
|
2496
|
+
return `${bg} ${bg.replace("bg-", "border-")}`;
|
|
2497
|
+
}
|
|
2498
|
+
const btn = colors.component.button;
|
|
2499
|
+
return {
|
|
2500
|
+
primary: extractCheckedColor(btn.primary.base),
|
|
2501
|
+
success: extractCheckedColor(btn.success.base),
|
|
2502
|
+
warning: "bg-yellow-600 border-yellow-600",
|
|
2503
|
+
// DS has no yellow button; local fallback
|
|
2504
|
+
error: extractCheckedColor(btn.destructive.base)
|
|
2505
|
+
};
|
|
2506
|
+
}
|
|
2487
2507
|
const Checkbox = ({
|
|
2488
2508
|
checked: controlledChecked,
|
|
2489
2509
|
defaultChecked = false,
|
|
@@ -2507,31 +2527,33 @@ const Checkbox = ({
|
|
|
2507
2527
|
sm: {
|
|
2508
2528
|
box: "w-4 h-4",
|
|
2509
2529
|
check: "w-2 h-2",
|
|
2510
|
-
text:
|
|
2511
|
-
desc:
|
|
2530
|
+
text: designTokens.typography.size.sm,
|
|
2531
|
+
desc: designTokens.typography.size.xs
|
|
2512
2532
|
},
|
|
2513
2533
|
md: {
|
|
2514
2534
|
box: "w-5 h-5",
|
|
2515
2535
|
check: "w-3 h-3",
|
|
2516
|
-
text:
|
|
2517
|
-
desc:
|
|
2536
|
+
text: designTokens.typography.size.base,
|
|
2537
|
+
desc: designTokens.typography.size.sm
|
|
2518
2538
|
},
|
|
2519
2539
|
lg: {
|
|
2520
2540
|
box: "w-6 h-6",
|
|
2521
2541
|
check: "w-4 h-4",
|
|
2522
|
-
text:
|
|
2523
|
-
desc:
|
|
2542
|
+
text: designTokens.typography.size.lg,
|
|
2543
|
+
desc: designTokens.typography.size.base
|
|
2524
2544
|
}
|
|
2525
2545
|
};
|
|
2526
2546
|
const getVariantClasses = () => {
|
|
2547
|
+
const checkedColors = getCheckboxColors();
|
|
2527
2548
|
if (error) {
|
|
2528
|
-
return checked ?
|
|
2549
|
+
return checked ? checkedColors.error : "border-red-600 dark:border-red-500";
|
|
2529
2550
|
}
|
|
2551
|
+
const unchecked = "border-gray-300 dark:border-gray-600";
|
|
2530
2552
|
const variantClasses = {
|
|
2531
|
-
primary: checked ?
|
|
2532
|
-
success: checked ?
|
|
2533
|
-
warning: checked ?
|
|
2534
|
-
error: checked ?
|
|
2553
|
+
primary: checked ? checkedColors.primary : unchecked,
|
|
2554
|
+
success: checked ? checkedColors.success : unchecked,
|
|
2555
|
+
warning: checked ? checkedColors.warning : unchecked,
|
|
2556
|
+
error: checked ? checkedColors.error : unchecked
|
|
2535
2557
|
};
|
|
2536
2558
|
return variantClasses[variant];
|
|
2537
2559
|
};
|
|
@@ -2600,7 +2622,13 @@ const Checkbox = ({
|
|
|
2600
2622
|
]
|
|
2601
2623
|
}
|
|
2602
2624
|
),
|
|
2603
|
-
errorMessage && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2625
|
+
errorMessage && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2626
|
+
Text$1,
|
|
2627
|
+
{
|
|
2628
|
+
className: `mt-1 ${designTokens.typography.size.sm} text-red-600 dark:text-red-400`,
|
|
2629
|
+
children: errorMessage
|
|
2630
|
+
}
|
|
2631
|
+
)
|
|
2604
2632
|
] });
|
|
2605
2633
|
};
|
|
2606
2634
|
const Switch = React.forwardRef(
|
|
@@ -2696,8 +2724,8 @@ const HelperText = ({
|
|
|
2696
2724
|
...textProps
|
|
2697
2725
|
}) => {
|
|
2698
2726
|
const sizeClasses = {
|
|
2699
|
-
sm:
|
|
2700
|
-
base:
|
|
2727
|
+
sm: designTokens.typography.size.sm,
|
|
2728
|
+
base: designTokens.typography.size.base
|
|
2701
2729
|
};
|
|
2702
2730
|
const iconSize = {
|
|
2703
2731
|
sm: "w-4 h-4",
|
|
@@ -2705,19 +2733,19 @@ const HelperText = ({
|
|
|
2705
2733
|
};
|
|
2706
2734
|
const variantConfig2 = {
|
|
2707
2735
|
default: {
|
|
2708
|
-
text:
|
|
2736
|
+
text: colors.component.alert.info.icon,
|
|
2709
2737
|
icon: "ℹ"
|
|
2710
2738
|
},
|
|
2711
2739
|
error: {
|
|
2712
|
-
text:
|
|
2740
|
+
text: colors.component.alert.error.icon,
|
|
2713
2741
|
icon: "⚠"
|
|
2714
2742
|
},
|
|
2715
2743
|
success: {
|
|
2716
|
-
text:
|
|
2744
|
+
text: colors.component.alert.success.icon,
|
|
2717
2745
|
icon: "✓"
|
|
2718
2746
|
},
|
|
2719
2747
|
warning: {
|
|
2720
|
-
text:
|
|
2748
|
+
text: colors.component.alert.warning.icon,
|
|
2721
2749
|
icon: "⚠"
|
|
2722
2750
|
}
|
|
2723
2751
|
};
|
|
@@ -2727,6 +2755,7 @@ const HelperText = ({
|
|
|
2727
2755
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(sizeClasses[size], config.text), ...textProps, children })
|
|
2728
2756
|
] });
|
|
2729
2757
|
};
|
|
2758
|
+
const { typography: typography$h } = designTokens;
|
|
2730
2759
|
const Select = ({
|
|
2731
2760
|
value,
|
|
2732
2761
|
onValueChange,
|
|
@@ -2765,8 +2794,8 @@ const Select = ({
|
|
|
2765
2794
|
Text$1,
|
|
2766
2795
|
{
|
|
2767
2796
|
className: cn(
|
|
2768
|
-
|
|
2769
|
-
item.value === value ?
|
|
2797
|
+
typography$h.size.base,
|
|
2798
|
+
item.value === value ? `text-blue-600 dark:text-blue-400 ${typography$h.weight.medium}` : "text-gray-900 dark:text-gray-100"
|
|
2770
2799
|
),
|
|
2771
2800
|
children: item.label
|
|
2772
2801
|
}
|
|
@@ -2795,7 +2824,8 @@ const Select = ({
|
|
|
2795
2824
|
Text$1,
|
|
2796
2825
|
{
|
|
2797
2826
|
className: cn(
|
|
2798
|
-
|
|
2827
|
+
typography$h.size.base,
|
|
2828
|
+
"flex-1",
|
|
2799
2829
|
selectedOption ? "text-gray-900 dark:text-gray-100" : "text-gray-400 dark:text-gray-500"
|
|
2800
2830
|
),
|
|
2801
2831
|
numberOfLines: 1,
|
|
@@ -2815,8 +2845,27 @@ const Select = ({
|
|
|
2815
2845
|
onRequestClose: () => setIsOpen(false),
|
|
2816
2846
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-1 justify-end bg-black/50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(SafeAreaView, { className: "bg-white dark:bg-gray-800 rounded-t-xl", children: [
|
|
2817
2847
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex flex-row items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: [
|
|
2818
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Pressable, { onPress: () => setIsOpen(false), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2819
|
-
|
|
2848
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Pressable, { onPress: () => setIsOpen(false), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2849
|
+
Text$1,
|
|
2850
|
+
{
|
|
2851
|
+
className: cn(
|
|
2852
|
+
"text-blue-600 dark:text-blue-400",
|
|
2853
|
+
typography$h.size.base
|
|
2854
|
+
),
|
|
2855
|
+
children: "Cancel"
|
|
2856
|
+
}
|
|
2857
|
+
) }),
|
|
2858
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2859
|
+
Text$1,
|
|
2860
|
+
{
|
|
2861
|
+
className: cn(
|
|
2862
|
+
typography$h.size.base,
|
|
2863
|
+
typography$h.weight.semibold,
|
|
2864
|
+
"text-gray-900 dark:text-white"
|
|
2865
|
+
),
|
|
2866
|
+
children: title
|
|
2867
|
+
}
|
|
2868
|
+
),
|
|
2820
2869
|
/* @__PURE__ */ jsxRuntimeExports.jsx(View, { style: { width: 60 } })
|
|
2821
2870
|
] }),
|
|
2822
2871
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -2952,11 +3001,11 @@ const styles$4 = StyleSheet.create({
|
|
|
2952
3001
|
alignItems: "center",
|
|
2953
3002
|
justifyContent: "space-between",
|
|
2954
3003
|
borderWidth: 1,
|
|
2955
|
-
borderColor:
|
|
3004
|
+
borderColor: colors.raw.neutral[300],
|
|
2956
3005
|
borderRadius: 8,
|
|
2957
3006
|
paddingHorizontal: 12,
|
|
2958
3007
|
paddingVertical: 12,
|
|
2959
|
-
backgroundColor:
|
|
3008
|
+
backgroundColor: colors.raw.neutral[0]
|
|
2960
3009
|
},
|
|
2961
3010
|
triggerDisabled: {
|
|
2962
3011
|
opacity: 0.5
|
|
@@ -2964,19 +3013,19 @@ const styles$4 = StyleSheet.create({
|
|
|
2964
3013
|
triggerText: {
|
|
2965
3014
|
flex: 1,
|
|
2966
3015
|
fontSize: 16,
|
|
2967
|
-
color:
|
|
3016
|
+
color: colors.raw.neutral[900]
|
|
2968
3017
|
},
|
|
2969
3018
|
triggerPlaceholder: {
|
|
2970
|
-
color:
|
|
3019
|
+
color: colors.raw.neutral[400]
|
|
2971
3020
|
},
|
|
2972
3021
|
triggerArrow: {
|
|
2973
3022
|
fontSize: 10,
|
|
2974
|
-
color:
|
|
3023
|
+
color: colors.raw.neutral[400],
|
|
2975
3024
|
marginLeft: 8
|
|
2976
3025
|
},
|
|
2977
3026
|
modalContainer: {
|
|
2978
3027
|
flex: 1,
|
|
2979
|
-
backgroundColor:
|
|
3028
|
+
backgroundColor: colors.raw.neutral[0]
|
|
2980
3029
|
},
|
|
2981
3030
|
modalHeader: {
|
|
2982
3031
|
flexDirection: "row",
|
|
@@ -2985,12 +3034,12 @@ const styles$4 = StyleSheet.create({
|
|
|
2985
3034
|
paddingHorizontal: 16,
|
|
2986
3035
|
paddingVertical: 12,
|
|
2987
3036
|
borderBottomWidth: 1,
|
|
2988
|
-
borderBottomColor:
|
|
3037
|
+
borderBottomColor: colors.raw.neutral[200]
|
|
2989
3038
|
},
|
|
2990
3039
|
modalTitle: {
|
|
2991
3040
|
fontSize: 18,
|
|
2992
3041
|
fontWeight: "600",
|
|
2993
|
-
color:
|
|
3042
|
+
color: colors.raw.neutral[900]
|
|
2994
3043
|
},
|
|
2995
3044
|
closeButton: {
|
|
2996
3045
|
padding: 8
|
|
@@ -2998,7 +3047,7 @@ const styles$4 = StyleSheet.create({
|
|
|
2998
3047
|
closeButtonText: {
|
|
2999
3048
|
fontSize: 16,
|
|
3000
3049
|
fontWeight: "600",
|
|
3001
|
-
color:
|
|
3050
|
+
color: colors.raw.blue[500]
|
|
3002
3051
|
},
|
|
3003
3052
|
listContent: {
|
|
3004
3053
|
padding: 16
|
|
@@ -3007,27 +3056,27 @@ const styles$4 = StyleSheet.create({
|
|
|
3007
3056
|
flexDirection: "row",
|
|
3008
3057
|
alignItems: "center",
|
|
3009
3058
|
padding: 16,
|
|
3010
|
-
backgroundColor:
|
|
3059
|
+
backgroundColor: colors.raw.neutral[50],
|
|
3011
3060
|
borderRadius: 12
|
|
3012
3061
|
},
|
|
3013
3062
|
optionItemSelected: {
|
|
3014
|
-
backgroundColor:
|
|
3063
|
+
backgroundColor: colors.raw.blue[100]
|
|
3015
3064
|
},
|
|
3016
3065
|
optionLabel: {
|
|
3017
3066
|
flex: 1,
|
|
3018
3067
|
fontSize: 16,
|
|
3019
|
-
color:
|
|
3068
|
+
color: colors.raw.neutral[900]
|
|
3020
3069
|
},
|
|
3021
3070
|
optionLabelSelected: {
|
|
3022
3071
|
fontWeight: "600",
|
|
3023
|
-
color:
|
|
3072
|
+
color: colors.raw.blue[500]
|
|
3024
3073
|
},
|
|
3025
3074
|
optionDisabled: {
|
|
3026
3075
|
opacity: 0.5
|
|
3027
3076
|
},
|
|
3028
3077
|
checkmark: {
|
|
3029
3078
|
fontSize: 18,
|
|
3030
|
-
color:
|
|
3079
|
+
color: colors.raw.blue[500],
|
|
3031
3080
|
fontWeight: "bold"
|
|
3032
3081
|
},
|
|
3033
3082
|
separator: {
|
|
@@ -3113,7 +3162,7 @@ const SearchInput = ({
|
|
|
3113
3162
|
disabled && "opacity-50",
|
|
3114
3163
|
loading && "opacity-60"
|
|
3115
3164
|
),
|
|
3116
|
-
placeholderTextColor:
|
|
3165
|
+
placeholderTextColor: colors.raw.neutral[400],
|
|
3117
3166
|
accessibilityRole: "search",
|
|
3118
3167
|
accessibilityState: { disabled },
|
|
3119
3168
|
...textInputProps
|
|
@@ -3130,7 +3179,7 @@ const SearchInput = ({
|
|
|
3130
3179
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(sizeConfig2.icon, "text-gray-400"), children: "✕" })
|
|
3131
3180
|
}
|
|
3132
3181
|
),
|
|
3133
|
-
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "absolute inset-y-0 right-0 flex items-center justify-center pr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActivityIndicator, { size: "small", color:
|
|
3182
|
+
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "absolute inset-y-0 right-0 flex items-center justify-center pr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActivityIndicator, { size: "small", color: colors.raw.neutral[400] }) })
|
|
3134
3183
|
] });
|
|
3135
3184
|
};
|
|
3136
3185
|
const NumberInput = ({
|
|
@@ -3334,6 +3383,15 @@ const NumberInput = ({
|
|
|
3334
3383
|
}
|
|
3335
3384
|
);
|
|
3336
3385
|
};
|
|
3386
|
+
const { typography: typography$g } = designTokens;
|
|
3387
|
+
const colorClasses$1 = {
|
|
3388
|
+
default: "text-gray-900 dark:text-gray-100",
|
|
3389
|
+
muted: "text-gray-600 dark:text-gray-400",
|
|
3390
|
+
primary: "text-blue-600 dark:text-blue-400",
|
|
3391
|
+
success: "text-green-600 dark:text-green-400",
|
|
3392
|
+
warning: "text-yellow-600 dark:text-yellow-400",
|
|
3393
|
+
danger: "text-red-600 dark:text-red-400"
|
|
3394
|
+
};
|
|
3337
3395
|
const Text = ({
|
|
3338
3396
|
children,
|
|
3339
3397
|
size = "base",
|
|
@@ -3344,51 +3402,15 @@ const Text = ({
|
|
|
3344
3402
|
numberOfLines,
|
|
3345
3403
|
className
|
|
3346
3404
|
}) => {
|
|
3347
|
-
const sizeClasses = {
|
|
3348
|
-
xs: "text-xs",
|
|
3349
|
-
sm: "text-sm",
|
|
3350
|
-
base: "text-base",
|
|
3351
|
-
lg: "text-lg",
|
|
3352
|
-
xl: "text-xl",
|
|
3353
|
-
"2xl": "text-2xl",
|
|
3354
|
-
"3xl": "text-3xl",
|
|
3355
|
-
"4xl": "text-4xl"
|
|
3356
|
-
};
|
|
3357
|
-
const weightClasses = {
|
|
3358
|
-
light: "font-light",
|
|
3359
|
-
normal: "font-normal",
|
|
3360
|
-
medium: "font-medium",
|
|
3361
|
-
semibold: "font-semibold",
|
|
3362
|
-
bold: "font-bold"
|
|
3363
|
-
};
|
|
3364
|
-
const colorClasses = {
|
|
3365
|
-
default: "text-gray-900 dark:text-gray-100",
|
|
3366
|
-
muted: "text-gray-600 dark:text-gray-400",
|
|
3367
|
-
primary: "text-blue-600 dark:text-blue-400",
|
|
3368
|
-
success: "text-green-600 dark:text-green-400",
|
|
3369
|
-
warning: "text-yellow-600 dark:text-yellow-400",
|
|
3370
|
-
danger: "text-red-600 dark:text-red-400"
|
|
3371
|
-
};
|
|
3372
|
-
const alignClasses = align ? {
|
|
3373
|
-
left: "text-left",
|
|
3374
|
-
center: "text-center",
|
|
3375
|
-
right: "text-right"
|
|
3376
|
-
}[align] : "";
|
|
3377
|
-
const transformClasses = {
|
|
3378
|
-
none: "",
|
|
3379
|
-
uppercase: "uppercase",
|
|
3380
|
-
lowercase: "lowercase",
|
|
3381
|
-
capitalize: "capitalize"
|
|
3382
|
-
};
|
|
3383
3405
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3384
3406
|
Text$1,
|
|
3385
3407
|
{
|
|
3386
3408
|
className: cn(
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
colorClasses[color],
|
|
3390
|
-
|
|
3391
|
-
|
|
3409
|
+
typography$g.size[size],
|
|
3410
|
+
typography$g.weight[weight],
|
|
3411
|
+
colorClasses$1[color],
|
|
3412
|
+
align ? typography$g.align[align] : "",
|
|
3413
|
+
transform !== "none" ? typography$g.transform[transform] : "",
|
|
3392
3414
|
className
|
|
3393
3415
|
),
|
|
3394
3416
|
numberOfLines,
|
|
@@ -3396,6 +3418,12 @@ const Text = ({
|
|
|
3396
3418
|
}
|
|
3397
3419
|
);
|
|
3398
3420
|
};
|
|
3421
|
+
const { typography: typography$f } = designTokens;
|
|
3422
|
+
const colorClasses = {
|
|
3423
|
+
default: "text-gray-900 dark:text-gray-100",
|
|
3424
|
+
muted: "text-gray-700 dark:text-gray-300",
|
|
3425
|
+
primary: "text-blue-600 dark:text-blue-400"
|
|
3426
|
+
};
|
|
3399
3427
|
const Heading = ({
|
|
3400
3428
|
children,
|
|
3401
3429
|
level = 2,
|
|
@@ -3414,39 +3442,16 @@ const Heading = ({
|
|
|
3414
3442
|
6: "base"
|
|
3415
3443
|
};
|
|
3416
3444
|
const actualSize = size || defaultSizes[level];
|
|
3417
|
-
const sizeClasses = {
|
|
3418
|
-
"4xl": "text-4xl",
|
|
3419
|
-
"3xl": "text-3xl",
|
|
3420
|
-
"2xl": "text-2xl",
|
|
3421
|
-
xl: "text-xl",
|
|
3422
|
-
lg: "text-lg",
|
|
3423
|
-
base: "text-base"
|
|
3424
|
-
};
|
|
3425
|
-
const weightClasses = {
|
|
3426
|
-
normal: "font-normal",
|
|
3427
|
-
medium: "font-medium",
|
|
3428
|
-
semibold: "font-semibold",
|
|
3429
|
-
bold: "font-bold",
|
|
3430
|
-
extrabold: "font-extrabold"
|
|
3431
|
-
};
|
|
3432
|
-
const colorClasses = {
|
|
3433
|
-
default: "text-gray-900 dark:text-gray-100",
|
|
3434
|
-
muted: "text-gray-700 dark:text-gray-300",
|
|
3435
|
-
primary: "text-blue-600 dark:text-blue-400"
|
|
3436
|
-
};
|
|
3437
|
-
const alignClasses = align ? {
|
|
3438
|
-
left: "text-left",
|
|
3439
|
-
center: "text-center",
|
|
3440
|
-
right: "text-right"
|
|
3441
|
-
}[align] : "";
|
|
3442
3445
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3443
3446
|
Text$1,
|
|
3444
3447
|
{
|
|
3445
3448
|
className: cn(
|
|
3446
|
-
|
|
3447
|
-
|
|
3449
|
+
typography$f.size[actualSize],
|
|
3450
|
+
typography$f.weight[weight],
|
|
3451
|
+
typography$f.leading.heading,
|
|
3452
|
+
typography$f.tracking.heading,
|
|
3448
3453
|
colorClasses[color],
|
|
3449
|
-
|
|
3454
|
+
align ? typography$f.align[align] : "",
|
|
3450
3455
|
className
|
|
3451
3456
|
),
|
|
3452
3457
|
accessibilityRole: "header",
|
|
@@ -3454,6 +3459,41 @@ const Heading = ({
|
|
|
3454
3459
|
}
|
|
3455
3460
|
);
|
|
3456
3461
|
};
|
|
3462
|
+
let _codeColors = null;
|
|
3463
|
+
function getCodeColors() {
|
|
3464
|
+
if (!_codeColors) _codeColors = buildCodeColors();
|
|
3465
|
+
return _codeColors;
|
|
3466
|
+
}
|
|
3467
|
+
function buildCodeColors() {
|
|
3468
|
+
const alert2 = colors.component.alert;
|
|
3469
|
+
function splitClasses(base, dark) {
|
|
3470
|
+
const all = `${base} ${dark}`.split(" ");
|
|
3471
|
+
return {
|
|
3472
|
+
bg: all.filter((c) => c.includes("bg-")).join(" "),
|
|
3473
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
3474
|
+
};
|
|
3475
|
+
}
|
|
3476
|
+
const info = splitClasses(alert2.info.base, alert2.info.dark);
|
|
3477
|
+
const success = splitClasses(alert2.success.base, alert2.success.dark);
|
|
3478
|
+
const warning = splitClasses(alert2.warning.base, alert2.warning.dark);
|
|
3479
|
+
const error = splitClasses(alert2.error.base, alert2.error.dark);
|
|
3480
|
+
return {
|
|
3481
|
+
bg: {
|
|
3482
|
+
default: "bg-gray-100 dark:bg-gray-800",
|
|
3483
|
+
primary: info.bg,
|
|
3484
|
+
success: success.bg,
|
|
3485
|
+
warning: warning.bg,
|
|
3486
|
+
danger: error.bg
|
|
3487
|
+
},
|
|
3488
|
+
text: {
|
|
3489
|
+
default: "text-gray-900 dark:text-gray-100",
|
|
3490
|
+
primary: info.text,
|
|
3491
|
+
success: success.text,
|
|
3492
|
+
warning: warning.text,
|
|
3493
|
+
danger: error.text
|
|
3494
|
+
}
|
|
3495
|
+
};
|
|
3496
|
+
}
|
|
3457
3497
|
const Code = ({
|
|
3458
3498
|
children,
|
|
3459
3499
|
size = "md",
|
|
@@ -3461,24 +3501,13 @@ const Code = ({
|
|
|
3461
3501
|
className
|
|
3462
3502
|
}) => {
|
|
3463
3503
|
const sizeClasses = {
|
|
3464
|
-
sm:
|
|
3465
|
-
md:
|
|
3466
|
-
lg:
|
|
3467
|
-
};
|
|
3468
|
-
const variantBgClasses = {
|
|
3469
|
-
default: "bg-gray-100 dark:bg-gray-800",
|
|
3470
|
-
primary: "bg-blue-50 dark:bg-blue-900/30",
|
|
3471
|
-
success: "bg-green-50 dark:bg-green-900/30",
|
|
3472
|
-
warning: "bg-yellow-50 dark:bg-yellow-900/30",
|
|
3473
|
-
danger: "bg-red-50 dark:bg-red-900/30"
|
|
3474
|
-
};
|
|
3475
|
-
const variantTextClasses = {
|
|
3476
|
-
default: "text-gray-900 dark:text-gray-100",
|
|
3477
|
-
primary: "text-blue-700 dark:text-blue-300",
|
|
3478
|
-
success: "text-green-700 dark:text-green-300",
|
|
3479
|
-
warning: "text-yellow-700 dark:text-yellow-300",
|
|
3480
|
-
danger: "text-red-700 dark:text-red-300"
|
|
3504
|
+
sm: `${designTokens.typography.size.xs} px-1 py-0.5`,
|
|
3505
|
+
md: `${designTokens.typography.size.sm} px-1.5 py-0.5`,
|
|
3506
|
+
lg: `${designTokens.typography.size.base} px-2 py-1`
|
|
3481
3507
|
};
|
|
3508
|
+
const codeColors = getCodeColors();
|
|
3509
|
+
const variantBgClasses = codeColors.bg;
|
|
3510
|
+
const variantTextClasses = codeColors.text;
|
|
3482
3511
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3483
3512
|
View,
|
|
3484
3513
|
{
|
|
@@ -3491,7 +3520,11 @@ const Code = ({
|
|
|
3491
3520
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3492
3521
|
Text$1,
|
|
3493
3522
|
{
|
|
3494
|
-
className: cn(
|
|
3523
|
+
className: cn(
|
|
3524
|
+
designTokens.typography.family.mono,
|
|
3525
|
+
designTokens.typography.weight.medium,
|
|
3526
|
+
variantTextClasses[variant]
|
|
3527
|
+
),
|
|
3495
3528
|
style: { fontFamily: "monospace" },
|
|
3496
3529
|
children
|
|
3497
3530
|
}
|
|
@@ -3550,6 +3583,28 @@ const AppVersion = ({
|
|
|
3550
3583
|
}
|
|
3551
3584
|
);
|
|
3552
3585
|
};
|
|
3586
|
+
function splitBadgeClasses$1(base, dark) {
|
|
3587
|
+
const all = `${base} ${dark}`.split(" ");
|
|
3588
|
+
return {
|
|
3589
|
+
bg: all.filter((c) => c.includes("bg-")).join(" "),
|
|
3590
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
3591
|
+
};
|
|
3592
|
+
}
|
|
3593
|
+
let _badgeColors = null;
|
|
3594
|
+
function getBadgeColors() {
|
|
3595
|
+
if (!_badgeColors) _badgeColors = buildBadgeColors();
|
|
3596
|
+
return _badgeColors;
|
|
3597
|
+
}
|
|
3598
|
+
function buildBadgeColors() {
|
|
3599
|
+
const badge = colors.component.badge;
|
|
3600
|
+
return {
|
|
3601
|
+
default: splitBadgeClasses$1(badge.default.base, badge.default.dark),
|
|
3602
|
+
primary: splitBadgeClasses$1(badge.primary.base, badge.primary.dark),
|
|
3603
|
+
success: splitBadgeClasses$1(badge.success.base, badge.success.dark),
|
|
3604
|
+
warning: splitBadgeClasses$1(badge.warning.base, badge.warning.dark),
|
|
3605
|
+
error: splitBadgeClasses$1(badge.error.base, badge.error.dark)
|
|
3606
|
+
};
|
|
3607
|
+
}
|
|
3553
3608
|
const Badge = ({
|
|
3554
3609
|
children,
|
|
3555
3610
|
variant = "default",
|
|
@@ -3565,29 +3620,30 @@ const Badge = ({
|
|
|
3565
3620
|
maxCount,
|
|
3566
3621
|
className
|
|
3567
3622
|
}) => {
|
|
3623
|
+
const ds = getBadgeColors();
|
|
3568
3624
|
const variantClasses = {
|
|
3569
|
-
default:
|
|
3570
|
-
primary:
|
|
3571
|
-
success:
|
|
3572
|
-
warning:
|
|
3573
|
-
danger:
|
|
3574
|
-
info:
|
|
3625
|
+
default: ds.default.bg,
|
|
3626
|
+
primary: ds.primary.bg,
|
|
3627
|
+
success: ds.success.bg,
|
|
3628
|
+
warning: ds.warning.bg,
|
|
3629
|
+
danger: ds.error.bg,
|
|
3630
|
+
info: ds.primary.bg,
|
|
3575
3631
|
purple: "bg-purple-100 dark:bg-purple-900/30"
|
|
3576
3632
|
};
|
|
3577
3633
|
const variantTextClasses = {
|
|
3578
|
-
default:
|
|
3579
|
-
primary:
|
|
3580
|
-
success:
|
|
3581
|
-
warning:
|
|
3582
|
-
danger:
|
|
3583
|
-
info:
|
|
3634
|
+
default: ds.default.text,
|
|
3635
|
+
primary: ds.primary.text,
|
|
3636
|
+
success: ds.success.text,
|
|
3637
|
+
warning: ds.warning.text,
|
|
3638
|
+
danger: ds.error.text,
|
|
3639
|
+
info: ds.primary.text,
|
|
3584
3640
|
purple: "text-purple-800 dark:text-purple-400"
|
|
3585
3641
|
};
|
|
3586
3642
|
const outlineClasses = {
|
|
3587
3643
|
default: "border border-gray-300 dark:border-gray-600",
|
|
3588
3644
|
primary: "border border-blue-600 dark:border-blue-400",
|
|
3589
3645
|
success: "border border-green-600 dark:border-green-400",
|
|
3590
|
-
warning: "border border-
|
|
3646
|
+
warning: "border border-orange-600 dark:border-orange-400",
|
|
3591
3647
|
danger: "border border-red-600 dark:border-red-400",
|
|
3592
3648
|
info: "border border-blue-600 dark:border-blue-400",
|
|
3593
3649
|
purple: "border border-purple-600 dark:border-purple-400"
|
|
@@ -3596,7 +3652,7 @@ const Badge = ({
|
|
|
3596
3652
|
default: "text-gray-700 dark:text-gray-300",
|
|
3597
3653
|
primary: "text-blue-600 dark:text-blue-400",
|
|
3598
3654
|
success: "text-green-600 dark:text-green-400",
|
|
3599
|
-
warning: "text-
|
|
3655
|
+
warning: "text-orange-600 dark:text-orange-400",
|
|
3600
3656
|
danger: "text-red-600 dark:text-red-400",
|
|
3601
3657
|
info: "text-blue-600 dark:text-blue-400",
|
|
3602
3658
|
purple: "text-purple-600 dark:text-purple-400"
|
|
@@ -3606,16 +3662,11 @@ const Badge = ({
|
|
|
3606
3662
|
md: "px-2.5 py-1",
|
|
3607
3663
|
lg: "px-3 py-1.5"
|
|
3608
3664
|
};
|
|
3609
|
-
const textSizeClasses = {
|
|
3610
|
-
sm: "text-xs",
|
|
3611
|
-
md: "text-sm",
|
|
3612
|
-
lg: "text-base"
|
|
3613
|
-
};
|
|
3614
3665
|
const dotColorClasses = {
|
|
3615
3666
|
default: "bg-gray-600 dark:bg-gray-400",
|
|
3616
3667
|
primary: "bg-blue-600 dark:bg-blue-400",
|
|
3617
3668
|
success: "bg-green-600 dark:bg-green-400",
|
|
3618
|
-
warning: "bg-
|
|
3669
|
+
warning: "bg-orange-600 dark:bg-orange-400",
|
|
3619
3670
|
danger: "bg-red-600 dark:bg-red-400",
|
|
3620
3671
|
info: "bg-blue-600 dark:bg-blue-400",
|
|
3621
3672
|
purple: "bg-purple-600 dark:bg-purple-400"
|
|
@@ -3628,9 +3679,15 @@ const Badge = ({
|
|
|
3628
3679
|
pill ? "rounded-full" : "rounded",
|
|
3629
3680
|
className
|
|
3630
3681
|
);
|
|
3682
|
+
const { typography: typography2 } = designTokens;
|
|
3683
|
+
const textSizeMap = {
|
|
3684
|
+
sm: typography2.size.xs,
|
|
3685
|
+
md: typography2.size.sm,
|
|
3686
|
+
lg: typography2.size.base
|
|
3687
|
+
};
|
|
3631
3688
|
const textClasses = cn(
|
|
3632
|
-
|
|
3633
|
-
|
|
3689
|
+
textSizeMap[size],
|
|
3690
|
+
typography2.weight.medium,
|
|
3634
3691
|
outline ? outlineTextClasses[variant] : variantTextClasses[variant]
|
|
3635
3692
|
);
|
|
3636
3693
|
const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -3703,10 +3760,14 @@ const Avatar = ({
|
|
|
3703
3760
|
xl: "w-4 h-4"
|
|
3704
3761
|
};
|
|
3705
3762
|
const statusClasses = {
|
|
3706
|
-
online:
|
|
3707
|
-
|
|
3763
|
+
online: statusIndicatorColors.success,
|
|
3764
|
+
// bg-green-500
|
|
3765
|
+
offline: statusIndicatorColors.neutral,
|
|
3766
|
+
// bg-gray-500
|
|
3708
3767
|
away: "bg-yellow-500",
|
|
3709
|
-
|
|
3768
|
+
// local fallback, no DS yellow status
|
|
3769
|
+
busy: statusIndicatorColors.error
|
|
3770
|
+
// bg-red-500
|
|
3710
3771
|
};
|
|
3711
3772
|
const generateInitials = (name2) => {
|
|
3712
3773
|
const parts = name2.trim().split(/\s+/);
|
|
@@ -4039,10 +4100,10 @@ const IconText = ({
|
|
|
4039
4100
|
};
|
|
4040
4101
|
const variantClasses = {
|
|
4041
4102
|
default: "text-gray-700 dark:text-gray-300",
|
|
4042
|
-
primary:
|
|
4043
|
-
success:
|
|
4044
|
-
warning:
|
|
4045
|
-
danger:
|
|
4103
|
+
primary: colors.component.alert.info.icon,
|
|
4104
|
+
success: colors.component.alert.success.icon,
|
|
4105
|
+
warning: colors.component.alert.warning.icon,
|
|
4106
|
+
danger: colors.component.alert.error.icon,
|
|
4046
4107
|
muted: "text-gray-500 dark:text-gray-400"
|
|
4047
4108
|
};
|
|
4048
4109
|
const layoutClasses = {
|
|
@@ -4106,6 +4167,19 @@ const FormattedNumber = ({
|
|
|
4106
4167
|
};
|
|
4107
4168
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(className), children: formatNumber() });
|
|
4108
4169
|
};
|
|
4170
|
+
const alert = colors.component.alert;
|
|
4171
|
+
function splitAlertClasses$1(base, dark) {
|
|
4172
|
+
const all = `${base} ${dark}`.split(" ");
|
|
4173
|
+
return {
|
|
4174
|
+
bg: all.filter((c) => c.includes("bg-")).join(" "),
|
|
4175
|
+
border: all.filter((c) => c.includes("border-")).join(" "),
|
|
4176
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
4177
|
+
};
|
|
4178
|
+
}
|
|
4179
|
+
const dsInfo = splitAlertClasses$1(alert.info.base, alert.info.dark);
|
|
4180
|
+
const dsSuccess = splitAlertClasses$1(alert.success.base, alert.success.dark);
|
|
4181
|
+
const dsWarning = splitAlertClasses$1(alert.warning.base, alert.warning.dark);
|
|
4182
|
+
const dsError = splitAlertClasses$1(alert.error.base, alert.error.dark);
|
|
4109
4183
|
const InfoBox = ({
|
|
4110
4184
|
children,
|
|
4111
4185
|
title,
|
|
@@ -4117,28 +4191,28 @@ const InfoBox = ({
|
|
|
4117
4191
|
}) => {
|
|
4118
4192
|
const variantClasses = {
|
|
4119
4193
|
info: {
|
|
4120
|
-
bg:
|
|
4121
|
-
border:
|
|
4122
|
-
title:
|
|
4123
|
-
text:
|
|
4194
|
+
bg: dsInfo.bg,
|
|
4195
|
+
border: dsInfo.border,
|
|
4196
|
+
title: dsInfo.text,
|
|
4197
|
+
text: dsInfo.text
|
|
4124
4198
|
},
|
|
4125
4199
|
success: {
|
|
4126
|
-
bg:
|
|
4127
|
-
border:
|
|
4128
|
-
title:
|
|
4129
|
-
text:
|
|
4200
|
+
bg: dsSuccess.bg,
|
|
4201
|
+
border: dsSuccess.border,
|
|
4202
|
+
title: dsSuccess.text,
|
|
4203
|
+
text: dsSuccess.text
|
|
4130
4204
|
},
|
|
4131
4205
|
warning: {
|
|
4132
|
-
bg:
|
|
4133
|
-
border:
|
|
4134
|
-
title:
|
|
4135
|
-
text:
|
|
4206
|
+
bg: dsWarning.bg,
|
|
4207
|
+
border: dsWarning.border,
|
|
4208
|
+
title: dsWarning.text,
|
|
4209
|
+
text: dsWarning.text
|
|
4136
4210
|
},
|
|
4137
4211
|
danger: {
|
|
4138
|
-
bg:
|
|
4139
|
-
border:
|
|
4140
|
-
title:
|
|
4141
|
-
text:
|
|
4212
|
+
bg: dsError.bg,
|
|
4213
|
+
border: dsError.border,
|
|
4214
|
+
title: dsError.text,
|
|
4215
|
+
text: dsError.text
|
|
4142
4216
|
},
|
|
4143
4217
|
neutral: {
|
|
4144
4218
|
bg: "bg-gray-50 dark:bg-gray-800",
|
|
@@ -4173,6 +4247,35 @@ const InfoBox = ({
|
|
|
4173
4247
|
}
|
|
4174
4248
|
);
|
|
4175
4249
|
};
|
|
4250
|
+
let _progressColors = null;
|
|
4251
|
+
function getProgressColors() {
|
|
4252
|
+
if (!_progressColors) _progressColors = buildProgressColors();
|
|
4253
|
+
return _progressColors;
|
|
4254
|
+
}
|
|
4255
|
+
function buildProgressColors() {
|
|
4256
|
+
function extractBg(base, darkStr) {
|
|
4257
|
+
const bg = base.split(" ").find(
|
|
4258
|
+
(c) => c.startsWith("bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
4259
|
+
) || "";
|
|
4260
|
+
const darkBg = darkStr.split(" ").find(
|
|
4261
|
+
(c) => c.startsWith("dark:bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
4262
|
+
) || "";
|
|
4263
|
+
return `${bg} ${darkBg}`;
|
|
4264
|
+
}
|
|
4265
|
+
const btn = colors.component.button;
|
|
4266
|
+
return {
|
|
4267
|
+
default: extractBg(btn.primary.base, btn.primary.dark),
|
|
4268
|
+
primary: extractBg(btn.primary.base, btn.primary.dark),
|
|
4269
|
+
success: extractBg(btn.success.base, btn.success.dark),
|
|
4270
|
+
warning: "bg-yellow-600 dark:bg-yellow-500",
|
|
4271
|
+
// DS has no yellow button; local fallback
|
|
4272
|
+
danger: extractBg(btn.destructive.base, btn.destructive.dark),
|
|
4273
|
+
purple: "bg-purple-600 dark:bg-purple-500",
|
|
4274
|
+
// DS has no purple button; local fallback
|
|
4275
|
+
gray: "bg-gray-600 dark:bg-gray-500"
|
|
4276
|
+
// local fallback
|
|
4277
|
+
};
|
|
4278
|
+
}
|
|
4176
4279
|
const Progress = ({
|
|
4177
4280
|
value = 0,
|
|
4178
4281
|
max = 100,
|
|
@@ -4203,11 +4306,12 @@ const Progress = ({
|
|
|
4203
4306
|
}
|
|
4204
4307
|
}, [indeterminate, animatedValue]);
|
|
4205
4308
|
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
4206
|
-
const
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4309
|
+
const allColors = getProgressColors();
|
|
4310
|
+
const colorClasses2 = {
|
|
4311
|
+
default: allColors.default,
|
|
4312
|
+
success: allColors.success,
|
|
4313
|
+
warning: allColors.warning,
|
|
4314
|
+
danger: allColors.danger
|
|
4211
4315
|
};
|
|
4212
4316
|
const sizeClasses = {
|
|
4213
4317
|
sm: "h-1",
|
|
@@ -4235,19 +4339,25 @@ const Progress = ({
|
|
|
4235
4339
|
children: indeterminate ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4236
4340
|
Animated.View,
|
|
4237
4341
|
{
|
|
4238
|
-
className: cn("h-full rounded-full",
|
|
4342
|
+
className: cn("h-full rounded-full", colorClasses2[variant]),
|
|
4239
4343
|
style: { width: interpolatedWidth, opacity: 0.7 }
|
|
4240
4344
|
}
|
|
4241
4345
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4242
4346
|
View,
|
|
4243
4347
|
{
|
|
4244
|
-
className: cn("h-full rounded-full",
|
|
4348
|
+
className: cn("h-full rounded-full", colorClasses2[variant]),
|
|
4245
4349
|
style: { width: `${percentage}%` }
|
|
4246
4350
|
}
|
|
4247
4351
|
)
|
|
4248
4352
|
}
|
|
4249
4353
|
),
|
|
4250
|
-
(showLabel || label) && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4354
|
+
(showLabel || label) && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4355
|
+
Text$1,
|
|
4356
|
+
{
|
|
4357
|
+
className: `${designTokens.typography.size.xs} text-gray-600 dark:text-gray-400 text-right`,
|
|
4358
|
+
children: label || `${Math.round(percentage)}%`
|
|
4359
|
+
}
|
|
4360
|
+
) })
|
|
4251
4361
|
] });
|
|
4252
4362
|
};
|
|
4253
4363
|
const ProgressBar = ({
|
|
@@ -4263,13 +4373,14 @@ const ProgressBar = ({
|
|
|
4263
4373
|
}) => {
|
|
4264
4374
|
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
4265
4375
|
const displayLabel = label || `${Math.round(percentage)}%`;
|
|
4376
|
+
const progressColors = getProgressColors();
|
|
4266
4377
|
const variantClasses = {
|
|
4267
|
-
primary:
|
|
4268
|
-
success:
|
|
4269
|
-
warning:
|
|
4270
|
-
danger:
|
|
4271
|
-
purple:
|
|
4272
|
-
gray:
|
|
4378
|
+
primary: progressColors.primary,
|
|
4379
|
+
success: progressColors.success,
|
|
4380
|
+
warning: progressColors.warning,
|
|
4381
|
+
danger: progressColors.danger,
|
|
4382
|
+
purple: progressColors.purple,
|
|
4383
|
+
gray: progressColors.gray
|
|
4273
4384
|
};
|
|
4274
4385
|
const sizeClasses = {
|
|
4275
4386
|
sm: "h-1",
|
|
@@ -4299,9 +4410,16 @@ const ProgressBar = ({
|
|
|
4299
4410
|
)
|
|
4300
4411
|
}
|
|
4301
4412
|
),
|
|
4302
|
-
showLabel && labelPosition === "outside" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4413
|
+
showLabel && labelPosition === "outside" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4414
|
+
Text$1,
|
|
4415
|
+
{
|
|
4416
|
+
className: `${designTokens.typography.size.sm} ${designTokens.typography.weight.medium} text-gray-600 dark:text-gray-400`,
|
|
4417
|
+
children: displayLabel
|
|
4418
|
+
}
|
|
4419
|
+
)
|
|
4303
4420
|
] }) });
|
|
4304
4421
|
};
|
|
4422
|
+
const { typography: typography$e } = designTokens;
|
|
4305
4423
|
const Modal = ({
|
|
4306
4424
|
isOpen,
|
|
4307
4425
|
onClose,
|
|
@@ -4352,7 +4470,17 @@ const Modal = ({
|
|
|
4352
4470
|
),
|
|
4353
4471
|
children: [
|
|
4354
4472
|
(title || showCloseButton) && /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex flex-row items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: [
|
|
4355
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4473
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4474
|
+
Text$1,
|
|
4475
|
+
{
|
|
4476
|
+
className: cn(
|
|
4477
|
+
typography$e.size.lg,
|
|
4478
|
+
typography$e.weight.semibold,
|
|
4479
|
+
"text-gray-900 dark:text-white flex-1"
|
|
4480
|
+
),
|
|
4481
|
+
children: title
|
|
4482
|
+
}
|
|
4483
|
+
),
|
|
4356
4484
|
showCloseButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4357
4485
|
Pressable,
|
|
4358
4486
|
{
|
|
@@ -4360,7 +4488,16 @@ const Modal = ({
|
|
|
4360
4488
|
className: "p-1 -mr-1 rounded-full",
|
|
4361
4489
|
accessibilityRole: "button",
|
|
4362
4490
|
accessibilityLabel: "Close modal",
|
|
4363
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4491
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4492
|
+
Text$1,
|
|
4493
|
+
{
|
|
4494
|
+
className: cn(
|
|
4495
|
+
typography$e.size.xl,
|
|
4496
|
+
"text-gray-500 dark:text-gray-400"
|
|
4497
|
+
),
|
|
4498
|
+
children: "✕"
|
|
4499
|
+
}
|
|
4500
|
+
)
|
|
4364
4501
|
}
|
|
4365
4502
|
)
|
|
4366
4503
|
] }),
|
|
@@ -4405,6 +4542,26 @@ const ModalFooter = ({
|
|
|
4405
4542
|
children
|
|
4406
4543
|
}
|
|
4407
4544
|
);
|
|
4545
|
+
function splitAlertClasses(base, dark) {
|
|
4546
|
+
const all = `${base} ${dark}`.split(" ");
|
|
4547
|
+
return {
|
|
4548
|
+
container: all.filter((c) => c.includes("bg-") || c.includes("border-")).join(" "),
|
|
4549
|
+
icon: all.filter((c) => c.includes("text-")).join(" ")
|
|
4550
|
+
};
|
|
4551
|
+
}
|
|
4552
|
+
let _alertColors = null;
|
|
4553
|
+
function getAlertColors() {
|
|
4554
|
+
if (!_alertColors) {
|
|
4555
|
+
const alert2 = colors.component.alert;
|
|
4556
|
+
_alertColors = {
|
|
4557
|
+
success: splitAlertClasses(alert2.success.base, alert2.success.dark),
|
|
4558
|
+
error: splitAlertClasses(alert2.error.base, alert2.error.dark),
|
|
4559
|
+
warning: splitAlertClasses(alert2.warning.base, alert2.warning.dark),
|
|
4560
|
+
info: splitAlertClasses(alert2.info.base, alert2.info.dark)
|
|
4561
|
+
};
|
|
4562
|
+
}
|
|
4563
|
+
return _alertColors;
|
|
4564
|
+
}
|
|
4408
4565
|
const ToastContext = createContext(void 0);
|
|
4409
4566
|
const useToast = () => {
|
|
4410
4567
|
const context = useContext(ToastContext);
|
|
@@ -4423,19 +4580,21 @@ const Toast = ({ toast, onRemove }) => {
|
|
|
4423
4580
|
friction: 8
|
|
4424
4581
|
}).start();
|
|
4425
4582
|
}, [slideAnim]);
|
|
4583
|
+
const ac = getAlertColors();
|
|
4426
4584
|
const variantBgClasses = {
|
|
4427
4585
|
default: "bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",
|
|
4428
|
-
success:
|
|
4429
|
-
error:
|
|
4430
|
-
warning:
|
|
4431
|
-
info:
|
|
4586
|
+
success: ac.success.container,
|
|
4587
|
+
error: ac.error.container,
|
|
4588
|
+
warning: ac.warning.container,
|
|
4589
|
+
info: ac.info.container
|
|
4432
4590
|
};
|
|
4591
|
+
const alert2 = colors.component.alert;
|
|
4433
4592
|
const iconColorClasses = {
|
|
4434
4593
|
default: "text-gray-600 dark:text-gray-400",
|
|
4435
|
-
success:
|
|
4436
|
-
error:
|
|
4437
|
-
warning:
|
|
4438
|
-
info:
|
|
4594
|
+
success: alert2.success.icon,
|
|
4595
|
+
error: alert2.error.icon,
|
|
4596
|
+
warning: alert2.warning.icon,
|
|
4597
|
+
info: alert2.info.icon
|
|
4439
4598
|
};
|
|
4440
4599
|
const icons = {
|
|
4441
4600
|
default: "ℹ",
|
|
@@ -4456,8 +4615,17 @@ const Toast = ({ toast, onRemove }) => {
|
|
|
4456
4615
|
children: [
|
|
4457
4616
|
/* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("flex-shrink-0", iconColorClasses[variant]), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-lg", children: icons[variant] }) }),
|
|
4458
4617
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-1 min-w-0", children: [
|
|
4459
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4460
|
-
|
|
4618
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4619
|
+
Text$1,
|
|
4620
|
+
{
|
|
4621
|
+
className: cn(
|
|
4622
|
+
textVariants.label.default(),
|
|
4623
|
+
"text-gray-900 dark:text-white"
|
|
4624
|
+
),
|
|
4625
|
+
children: title
|
|
4626
|
+
}
|
|
4627
|
+
),
|
|
4628
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(textVariants.body.sm(), "mt-1"), children: description }),
|
|
4461
4629
|
action && /* @__PURE__ */ jsxRuntimeExports.jsx(Pressable, { onPress: action.onPress, className: "mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-sm font-medium text-blue-600 dark:text-blue-400", children: action.label }) })
|
|
4462
4630
|
] }),
|
|
4463
4631
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -4674,6 +4842,7 @@ const Backdrop = ({
|
|
|
4674
4842
|
}
|
|
4675
4843
|
);
|
|
4676
4844
|
};
|
|
4845
|
+
const { typography: typography$d } = designTokens;
|
|
4677
4846
|
const { height: SCREEN_HEIGHT, width: SCREEN_WIDTH$1 } = Dimensions.get("window");
|
|
4678
4847
|
const Sheet = ({
|
|
4679
4848
|
isOpen,
|
|
@@ -4864,8 +5033,28 @@ const Sheet = ({
|
|
|
4864
5033
|
),
|
|
4865
5034
|
(title || description || showCloseButton) && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-4 py-4 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex flex-row items-start justify-between", children: [
|
|
4866
5035
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-1", children: [
|
|
4867
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4868
|
-
|
|
5036
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5037
|
+
Text$1,
|
|
5038
|
+
{
|
|
5039
|
+
className: cn(
|
|
5040
|
+
typography$d.size.lg,
|
|
5041
|
+
typography$d.weight.semibold,
|
|
5042
|
+
"text-gray-900 dark:text-white"
|
|
5043
|
+
),
|
|
5044
|
+
children: title
|
|
5045
|
+
}
|
|
5046
|
+
),
|
|
5047
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5048
|
+
Text$1,
|
|
5049
|
+
{
|
|
5050
|
+
className: cn(
|
|
5051
|
+
"mt-1",
|
|
5052
|
+
typography$d.size.sm,
|
|
5053
|
+
"text-gray-600 dark:text-gray-400"
|
|
5054
|
+
),
|
|
5055
|
+
children: description
|
|
5056
|
+
}
|
|
5057
|
+
)
|
|
4869
5058
|
] }),
|
|
4870
5059
|
showCloseButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4871
5060
|
Pressable,
|
|
@@ -4874,7 +5063,7 @@ const Sheet = ({
|
|
|
4874
5063
|
className: "ml-4 p-1",
|
|
4875
5064
|
accessibilityRole: "button",
|
|
4876
5065
|
accessibilityLabel: "Close sheet",
|
|
4877
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className:
|
|
5066
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(typography$d.size.xl, "text-gray-400"), children: "✕" })
|
|
4878
5067
|
}
|
|
4879
5068
|
)
|
|
4880
5069
|
] }) }),
|
|
@@ -4889,6 +5078,30 @@ const Sheet = ({
|
|
|
4889
5078
|
}
|
|
4890
5079
|
);
|
|
4891
5080
|
};
|
|
5081
|
+
let _tooltipColors = null;
|
|
5082
|
+
function getTooltipColors() {
|
|
5083
|
+
if (!_tooltipColors) {
|
|
5084
|
+
let extractBg = function(base, darkStr) {
|
|
5085
|
+
const bg = base.split(" ").find(
|
|
5086
|
+
(c) => c.startsWith("bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
5087
|
+
) || "";
|
|
5088
|
+
const darkBg = darkStr.split(" ").find(
|
|
5089
|
+
(c) => c.startsWith("dark:bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
5090
|
+
) || "";
|
|
5091
|
+
return `${bg} ${darkBg}`;
|
|
5092
|
+
};
|
|
5093
|
+
const btn = colors.component.button;
|
|
5094
|
+
_tooltipColors = {
|
|
5095
|
+
default: "bg-gray-900 dark:bg-gray-700",
|
|
5096
|
+
info: extractBg(btn.primary.base, btn.primary.dark),
|
|
5097
|
+
success: extractBg(btn.success.base, btn.success.dark),
|
|
5098
|
+
warning: "bg-yellow-600 dark:bg-yellow-500",
|
|
5099
|
+
// DS has no yellow button; local fallback
|
|
5100
|
+
error: extractBg(btn.destructive.base, btn.destructive.dark)
|
|
5101
|
+
};
|
|
5102
|
+
}
|
|
5103
|
+
return _tooltipColors;
|
|
5104
|
+
}
|
|
4892
5105
|
const Tooltip = ({
|
|
4893
5106
|
content,
|
|
4894
5107
|
children,
|
|
@@ -4941,13 +5154,7 @@ const Tooltip = ({
|
|
|
4941
5154
|
}
|
|
4942
5155
|
setIsVisible(false);
|
|
4943
5156
|
};
|
|
4944
|
-
const variantClasses =
|
|
4945
|
-
default: "bg-gray-900 dark:bg-gray-700",
|
|
4946
|
-
info: "bg-blue-600 dark:bg-blue-500",
|
|
4947
|
-
success: "bg-green-600 dark:bg-green-500",
|
|
4948
|
-
warning: "bg-yellow-600 dark:bg-yellow-500",
|
|
4949
|
-
error: "bg-red-600 dark:bg-red-500"
|
|
4950
|
-
};
|
|
5157
|
+
const variantClasses = getTooltipColors();
|
|
4951
5158
|
const getTooltipPosition = () => {
|
|
4952
5159
|
const TOOLTIP_OFFSET = 8;
|
|
4953
5160
|
const TOOLTIP_HEIGHT = 32;
|
|
@@ -5013,7 +5220,13 @@ const Tooltip = ({
|
|
|
5013
5220
|
variantClasses[variant],
|
|
5014
5221
|
className
|
|
5015
5222
|
),
|
|
5016
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5223
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5224
|
+
Text$1,
|
|
5225
|
+
{
|
|
5226
|
+
className: `${designTokens.typography.size.xs} ${designTokens.typography.weight.medium} text-white`,
|
|
5227
|
+
children: content
|
|
5228
|
+
}
|
|
5229
|
+
)
|
|
5017
5230
|
}
|
|
5018
5231
|
)
|
|
5019
5232
|
}
|
|
@@ -5265,7 +5478,9 @@ const TabsList = ({
|
|
|
5265
5478
|
horizontal: true,
|
|
5266
5479
|
showsHorizontalScrollIndicator: false,
|
|
5267
5480
|
className: cn(
|
|
5268
|
-
"flex-row bg-gray-100 dark:bg-gray-800
|
|
5481
|
+
"flex-row bg-gray-100 dark:bg-gray-800",
|
|
5482
|
+
designTokens.radius.lg,
|
|
5483
|
+
"p-1",
|
|
5269
5484
|
className
|
|
5270
5485
|
),
|
|
5271
5486
|
contentContainerStyle: { flexGrow: 1 },
|
|
@@ -5298,7 +5513,9 @@ const TabsTrigger = ({
|
|
|
5298
5513
|
Text$1,
|
|
5299
5514
|
{
|
|
5300
5515
|
className: cn(
|
|
5301
|
-
|
|
5516
|
+
designTokens.typography.size.sm,
|
|
5517
|
+
designTokens.typography.weight.medium,
|
|
5518
|
+
"text-center",
|
|
5302
5519
|
isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"
|
|
5303
5520
|
),
|
|
5304
5521
|
children
|
|
@@ -5330,11 +5547,11 @@ const Link = ({
|
|
|
5330
5547
|
}) => {
|
|
5331
5548
|
const isExternal = href.startsWith("http://") || href.startsWith("https://");
|
|
5332
5549
|
const variantClasses = {
|
|
5333
|
-
default:
|
|
5334
|
-
primary:
|
|
5335
|
-
secondary:
|
|
5550
|
+
default: textVariants.link.subtle(),
|
|
5551
|
+
primary: `${textVariants.link.default()} font-medium`,
|
|
5552
|
+
secondary: textVariants.link.muted(),
|
|
5336
5553
|
muted: "text-gray-500 dark:text-gray-500",
|
|
5337
|
-
underline:
|
|
5554
|
+
underline: textVariants.link.default()
|
|
5338
5555
|
};
|
|
5339
5556
|
const handlePress = async () => {
|
|
5340
5557
|
if (disabled) return;
|
|
@@ -5370,6 +5587,7 @@ const Link = ({
|
|
|
5370
5587
|
}
|
|
5371
5588
|
);
|
|
5372
5589
|
};
|
|
5590
|
+
const { typography: typography$c } = designTokens;
|
|
5373
5591
|
const Breadcrumb = ({
|
|
5374
5592
|
items,
|
|
5375
5593
|
separator = "/",
|
|
@@ -5379,9 +5597,9 @@ const Breadcrumb = ({
|
|
|
5379
5597
|
}) => {
|
|
5380
5598
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
5381
5599
|
const sizeClasses = {
|
|
5382
|
-
sm:
|
|
5383
|
-
md:
|
|
5384
|
-
lg:
|
|
5600
|
+
sm: typography$c.size.sm,
|
|
5601
|
+
md: typography$c.size.base,
|
|
5602
|
+
lg: typography$c.size.lg
|
|
5385
5603
|
};
|
|
5386
5604
|
const getDisplayItems = () => {
|
|
5387
5605
|
if (!maxItems || items.length <= maxItems || isExpanded) {
|
|
@@ -5402,7 +5620,7 @@ const Breadcrumb = ({
|
|
|
5402
5620
|
{
|
|
5403
5621
|
className: cn(
|
|
5404
5622
|
sizeClasses[size],
|
|
5405
|
-
|
|
5623
|
+
`text-gray-900 dark:text-white ${typography$c.weight.medium}`
|
|
5406
5624
|
),
|
|
5407
5625
|
accessibilityRole: "text",
|
|
5408
5626
|
children: item.label
|
|
@@ -5440,7 +5658,7 @@ const Breadcrumb = ({
|
|
|
5440
5658
|
{
|
|
5441
5659
|
className: cn(
|
|
5442
5660
|
sizeClasses[size],
|
|
5443
|
-
isCurrent ?
|
|
5661
|
+
isCurrent ? `text-gray-900 dark:text-white ${typography$c.weight.medium}` : "text-gray-600 dark:text-gray-400"
|
|
5444
5662
|
),
|
|
5445
5663
|
children: item.label
|
|
5446
5664
|
}
|
|
@@ -5488,6 +5706,7 @@ const Breadcrumb = ({
|
|
|
5488
5706
|
}
|
|
5489
5707
|
);
|
|
5490
5708
|
};
|
|
5709
|
+
const { typography: typography$b } = designTokens;
|
|
5491
5710
|
const Pagination = ({
|
|
5492
5711
|
currentPage,
|
|
5493
5712
|
totalPages,
|
|
@@ -5502,18 +5721,18 @@ const Pagination = ({
|
|
|
5502
5721
|
const sizeConfig2 = {
|
|
5503
5722
|
sm: {
|
|
5504
5723
|
button: "h-8 w-8",
|
|
5505
|
-
text:
|
|
5506
|
-
icon:
|
|
5724
|
+
text: typography$b.size.xs,
|
|
5725
|
+
icon: typography$b.size.xs
|
|
5507
5726
|
},
|
|
5508
5727
|
md: {
|
|
5509
5728
|
button: "h-10 w-10",
|
|
5510
|
-
text:
|
|
5511
|
-
icon:
|
|
5729
|
+
text: typography$b.size.sm,
|
|
5730
|
+
icon: typography$b.size.sm
|
|
5512
5731
|
},
|
|
5513
5732
|
lg: {
|
|
5514
5733
|
button: "h-12 w-12",
|
|
5515
|
-
text:
|
|
5516
|
-
icon:
|
|
5734
|
+
text: typography$b.size.base,
|
|
5735
|
+
icon: typography$b.size.base
|
|
5517
5736
|
}
|
|
5518
5737
|
};
|
|
5519
5738
|
const config = sizeConfig2[size];
|
|
@@ -5663,6 +5882,7 @@ const Pagination = ({
|
|
|
5663
5882
|
}
|
|
5664
5883
|
);
|
|
5665
5884
|
};
|
|
5885
|
+
const { typography: typography$a } = designTokens;
|
|
5666
5886
|
const SettingsList = ({
|
|
5667
5887
|
settings,
|
|
5668
5888
|
selectedSetting,
|
|
@@ -5695,7 +5915,7 @@ const SettingsList = ({
|
|
|
5695
5915
|
Text$1,
|
|
5696
5916
|
{
|
|
5697
5917
|
className: cn(
|
|
5698
|
-
|
|
5918
|
+
typography$a.size.sm,
|
|
5699
5919
|
isSelected ? "text-orange-700 dark:text-orange-300" : "text-gray-700 dark:text-gray-300"
|
|
5700
5920
|
),
|
|
5701
5921
|
numberOfLines: 1,
|
|
@@ -5710,6 +5930,7 @@ const SettingsList = ({
|
|
|
5710
5930
|
}
|
|
5711
5931
|
);
|
|
5712
5932
|
};
|
|
5933
|
+
const { typography: typography$9 } = designTokens;
|
|
5713
5934
|
const NavigationList = ({
|
|
5714
5935
|
items,
|
|
5715
5936
|
selectedPath,
|
|
@@ -5751,15 +5972,34 @@ const NavigationList = ({
|
|
|
5751
5972
|
Text$1,
|
|
5752
5973
|
{
|
|
5753
5974
|
className: cn(
|
|
5754
|
-
|
|
5975
|
+
typography$9.weight.medium,
|
|
5755
5976
|
isSelected ? "text-blue-600 dark:text-blue-400" : "text-gray-700 dark:text-gray-300"
|
|
5756
5977
|
),
|
|
5757
5978
|
children: item.label
|
|
5758
5979
|
}
|
|
5759
5980
|
),
|
|
5760
|
-
item.badge !== void 0 && item.badge > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "ml-2 px-2 py-0.5 bg-blue-100 dark:bg-blue-900 rounded-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5981
|
+
item.badge !== void 0 && item.badge > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "ml-2 px-2 py-0.5 bg-blue-100 dark:bg-blue-900 rounded-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5982
|
+
Text$1,
|
|
5983
|
+
{
|
|
5984
|
+
className: cn(
|
|
5985
|
+
typography$9.size.xs,
|
|
5986
|
+
typography$9.weight.medium,
|
|
5987
|
+
"text-blue-800 dark:text-blue-200"
|
|
5988
|
+
),
|
|
5989
|
+
children: item.badge
|
|
5990
|
+
}
|
|
5991
|
+
) })
|
|
5761
5992
|
] }),
|
|
5762
|
-
item.description && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5993
|
+
item.description && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5994
|
+
Text$1,
|
|
5995
|
+
{
|
|
5996
|
+
className: cn(
|
|
5997
|
+
typography$9.size.xs,
|
|
5998
|
+
"text-gray-500 dark:text-gray-400 mt-0.5"
|
|
5999
|
+
),
|
|
6000
|
+
children: item.description
|
|
6001
|
+
}
|
|
6002
|
+
)
|
|
5763
6003
|
] })
|
|
5764
6004
|
]
|
|
5765
6005
|
},
|
|
@@ -5767,6 +6007,7 @@ const NavigationList = ({
|
|
|
5767
6007
|
);
|
|
5768
6008
|
}) });
|
|
5769
6009
|
};
|
|
6010
|
+
const { typography: typography$8 } = designTokens;
|
|
5770
6011
|
const Dropdown = ({
|
|
5771
6012
|
trigger,
|
|
5772
6013
|
items,
|
|
@@ -5859,7 +6100,7 @@ const Dropdown = ({
|
|
|
5859
6100
|
Text$1,
|
|
5860
6101
|
{
|
|
5861
6102
|
className: cn(
|
|
5862
|
-
|
|
6103
|
+
typography$8.size.sm,
|
|
5863
6104
|
item.disabled ? "text-gray-400 dark:text-gray-500" : "text-gray-700 dark:text-gray-200"
|
|
5864
6105
|
),
|
|
5865
6106
|
children: item.label
|
|
@@ -5929,6 +6170,7 @@ const AspectFitView = ({
|
|
|
5929
6170
|
}
|
|
5930
6171
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("flex-1", className), onLayout, children: size && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("items-center", innerClassName), children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollView, { style: { width: innerWidth, height: innerHeight }, children }) }) });
|
|
5931
6172
|
};
|
|
6173
|
+
const { typography: typography$7 } = designTokens;
|
|
5932
6174
|
const QuickActions = ({
|
|
5933
6175
|
actions,
|
|
5934
6176
|
orientation = "horizontal",
|
|
@@ -5942,23 +6184,23 @@ const QuickActions = ({
|
|
|
5942
6184
|
text: "text-gray-900 dark:text-white"
|
|
5943
6185
|
},
|
|
5944
6186
|
primary: {
|
|
5945
|
-
bg: "bg-blue-
|
|
5946
|
-
bgActive: "active:bg-blue-
|
|
6187
|
+
bg: "bg-blue-600 border-blue-600",
|
|
6188
|
+
bgActive: "active:bg-blue-800",
|
|
5947
6189
|
text: "text-white"
|
|
5948
6190
|
},
|
|
5949
6191
|
success: {
|
|
5950
|
-
bg: "bg-green-
|
|
5951
|
-
bgActive: "active:bg-green-
|
|
6192
|
+
bg: "bg-green-600 border-green-600",
|
|
6193
|
+
bgActive: "active:bg-green-800",
|
|
5952
6194
|
text: "text-white"
|
|
5953
6195
|
},
|
|
5954
6196
|
warning: {
|
|
5955
|
-
bg: "bg-
|
|
5956
|
-
bgActive: "active:bg-
|
|
6197
|
+
bg: "bg-orange-600 border-orange-600",
|
|
6198
|
+
bgActive: "active:bg-orange-800",
|
|
5957
6199
|
text: "text-white"
|
|
5958
6200
|
},
|
|
5959
6201
|
danger: {
|
|
5960
|
-
bg: "bg-red-
|
|
5961
|
-
bgActive: "active:bg-red-
|
|
6202
|
+
bg: "bg-red-600 border-red-600",
|
|
6203
|
+
bgActive: "active:bg-red-800",
|
|
5962
6204
|
text: "text-white"
|
|
5963
6205
|
}
|
|
5964
6206
|
};
|
|
@@ -5992,7 +6234,7 @@ const QuickActions = ({
|
|
|
5992
6234
|
accessibilityState: { disabled: action.disabled },
|
|
5993
6235
|
children: [
|
|
5994
6236
|
action.icon && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "w-5 h-5", children: action.icon }),
|
|
5995
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(
|
|
6237
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(typography$7.weight.medium, styles2.text), children: action.label })
|
|
5996
6238
|
]
|
|
5997
6239
|
},
|
|
5998
6240
|
action.id
|
|
@@ -6070,6 +6312,7 @@ const EmptyState = ({
|
|
|
6070
6312
|
}
|
|
6071
6313
|
);
|
|
6072
6314
|
};
|
|
6315
|
+
const { typography: typography$6 } = designTokens;
|
|
6073
6316
|
const Calendar = ({
|
|
6074
6317
|
value,
|
|
6075
6318
|
onChange,
|
|
@@ -6158,10 +6401,29 @@ const Calendar = ({
|
|
|
6158
6401
|
className: "p-2 active:bg-gray-100 dark:active:bg-gray-800 rounded-md",
|
|
6159
6402
|
accessibilityRole: "button",
|
|
6160
6403
|
accessibilityLabel: "Previous month",
|
|
6161
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6404
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6405
|
+
Text$1,
|
|
6406
|
+
{
|
|
6407
|
+
className: cn(
|
|
6408
|
+
typography$6.size.lg,
|
|
6409
|
+
"text-gray-700 dark:text-gray-300"
|
|
6410
|
+
),
|
|
6411
|
+
children: "‹"
|
|
6412
|
+
}
|
|
6413
|
+
)
|
|
6414
|
+
}
|
|
6415
|
+
),
|
|
6416
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6417
|
+
Text$1,
|
|
6418
|
+
{
|
|
6419
|
+
className: cn(
|
|
6420
|
+
typography$6.size.base,
|
|
6421
|
+
typography$6.weight.semibold,
|
|
6422
|
+
"text-gray-900 dark:text-white"
|
|
6423
|
+
),
|
|
6424
|
+
children: monthYear
|
|
6162
6425
|
}
|
|
6163
6426
|
),
|
|
6164
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-base font-semibold text-gray-900 dark:text-white", children: monthYear }),
|
|
6165
6427
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6166
6428
|
Pressable,
|
|
6167
6429
|
{
|
|
@@ -6169,11 +6431,30 @@ const Calendar = ({
|
|
|
6169
6431
|
className: "p-2 active:bg-gray-100 dark:active:bg-gray-800 rounded-md",
|
|
6170
6432
|
accessibilityRole: "button",
|
|
6171
6433
|
accessibilityLabel: "Next month",
|
|
6172
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6434
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6435
|
+
Text$1,
|
|
6436
|
+
{
|
|
6437
|
+
className: cn(
|
|
6438
|
+
typography$6.size.lg,
|
|
6439
|
+
"text-gray-700 dark:text-gray-300"
|
|
6440
|
+
),
|
|
6441
|
+
children: "›"
|
|
6442
|
+
}
|
|
6443
|
+
)
|
|
6173
6444
|
}
|
|
6174
6445
|
)
|
|
6175
6446
|
] }),
|
|
6176
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-row mb-2", children: weekDays.map((day) => /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-1 items-center py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6447
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-row mb-2", children: weekDays.map((day) => /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-1 items-center py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6448
|
+
Text$1,
|
|
6449
|
+
{
|
|
6450
|
+
className: cn(
|
|
6451
|
+
typography$6.size.xs,
|
|
6452
|
+
typography$6.weight.medium,
|
|
6453
|
+
"text-gray-600 dark:text-gray-400"
|
|
6454
|
+
),
|
|
6455
|
+
children: day
|
|
6456
|
+
}
|
|
6457
|
+
) }, day)) }),
|
|
6177
6458
|
weeks.map((week, weekIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-row", children: week.map((date, dayIndex) => {
|
|
6178
6459
|
if (!date) {
|
|
6179
6460
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -6210,9 +6491,9 @@ const Calendar = ({
|
|
|
6210
6491
|
Text$1,
|
|
6211
6492
|
{
|
|
6212
6493
|
className: cn(
|
|
6213
|
-
|
|
6494
|
+
typography$6.size.sm,
|
|
6214
6495
|
isCurrentMonth ? "text-gray-900 dark:text-white" : "text-gray-400 dark:text-gray-600",
|
|
6215
|
-
isSelected &&
|
|
6496
|
+
isSelected && `text-white ${typography$6.weight.semibold}`
|
|
6216
6497
|
),
|
|
6217
6498
|
children: date.getDate()
|
|
6218
6499
|
}
|
|
@@ -6240,18 +6521,40 @@ function DataList({
|
|
|
6240
6521
|
};
|
|
6241
6522
|
const renderHeader = () => {
|
|
6242
6523
|
if (!showHeader) return null;
|
|
6243
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6524
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6244
6525
|
View,
|
|
6245
6526
|
{
|
|
6246
6527
|
className: cn(
|
|
6247
|
-
|
|
6248
|
-
|
|
6528
|
+
"flex-row",
|
|
6529
|
+
ui.table.thead,
|
|
6530
|
+
"border-b border-gray-200 dark:border-gray-700"
|
|
6249
6531
|
),
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6532
|
+
children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6533
|
+
View,
|
|
6534
|
+
{
|
|
6535
|
+
className: cn(
|
|
6536
|
+
compact ? "px-3 py-2" : "px-4 py-3",
|
|
6537
|
+
alignClasses[column.align || "left"]
|
|
6538
|
+
),
|
|
6539
|
+
style: { flex: column.flex || 1 },
|
|
6540
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6541
|
+
Text$1,
|
|
6542
|
+
{
|
|
6543
|
+
className: cn(
|
|
6544
|
+
designTokens.typography.size.xs,
|
|
6545
|
+
designTokens.typography.weight.medium,
|
|
6546
|
+
"text-gray-700 dark:text-gray-300",
|
|
6547
|
+
designTokens.typography.transform.uppercase,
|
|
6548
|
+
designTokens.typography.tracking.wider
|
|
6549
|
+
),
|
|
6550
|
+
children: column.label
|
|
6551
|
+
}
|
|
6552
|
+
)
|
|
6553
|
+
},
|
|
6554
|
+
column.key
|
|
6555
|
+
))
|
|
6556
|
+
}
|
|
6557
|
+
);
|
|
6255
6558
|
};
|
|
6256
6559
|
const renderRow = ({ item, index }) => {
|
|
6257
6560
|
const isOdd = index % 2 === 1;
|
|
@@ -6261,7 +6564,7 @@ function DataList({
|
|
|
6261
6564
|
onPress: () => onRowPress == null ? void 0 : onRowPress(item, index),
|
|
6262
6565
|
className: cn(
|
|
6263
6566
|
"flex-row border-b border-gray-200 dark:border-gray-700",
|
|
6264
|
-
isOdd &&
|
|
6567
|
+
isOdd && ui.table.trAlt,
|
|
6265
6568
|
onRowPress && "active:bg-gray-100 dark:active:bg-gray-800"
|
|
6266
6569
|
),
|
|
6267
6570
|
disabled: !onRowPress,
|
|
@@ -6278,7 +6581,10 @@ function DataList({
|
|
|
6278
6581
|
children: column.render ? column.render(item, index) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6279
6582
|
Text$1,
|
|
6280
6583
|
{
|
|
6281
|
-
className:
|
|
6584
|
+
className: cn(
|
|
6585
|
+
designTokens.typography.size.sm,
|
|
6586
|
+
"text-gray-900 dark:text-white"
|
|
6587
|
+
),
|
|
6282
6588
|
numberOfLines: 1,
|
|
6283
6589
|
children: String(item[column.key] ?? "")
|
|
6284
6590
|
}
|
|
@@ -6290,7 +6596,7 @@ function DataList({
|
|
|
6290
6596
|
);
|
|
6291
6597
|
};
|
|
6292
6598
|
const renderEmpty = () => /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "py-8 items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-sm text-gray-500 dark:text-gray-400", children: emptyMessage }) });
|
|
6293
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: cn(
|
|
6599
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: cn(ui.table.tr, className), children: [
|
|
6294
6600
|
renderHeader(),
|
|
6295
6601
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6296
6602
|
FlatList,
|
|
@@ -6402,7 +6708,7 @@ const MultiSelect = ({
|
|
|
6402
6708
|
value: searchQuery,
|
|
6403
6709
|
onChangeText: setSearchQuery,
|
|
6404
6710
|
placeholder: searchPlaceholder,
|
|
6405
|
-
placeholderTextColor:
|
|
6711
|
+
placeholderTextColor: colors.raw.neutral[400],
|
|
6406
6712
|
className: "px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white rounded-md"
|
|
6407
6713
|
}
|
|
6408
6714
|
) }),
|
|
@@ -6479,15 +6785,15 @@ const ProgressCircle = ({
|
|
|
6479
6785
|
label,
|
|
6480
6786
|
variant = "primary",
|
|
6481
6787
|
color,
|
|
6482
|
-
trackColor =
|
|
6788
|
+
trackColor = colors.raw.neutral[200],
|
|
6483
6789
|
className
|
|
6484
6790
|
}) => {
|
|
6485
6791
|
const progress = Math.min(100, Math.max(0, value));
|
|
6486
6792
|
const variantColors = {
|
|
6487
|
-
primary:
|
|
6488
|
-
success:
|
|
6489
|
-
warning:
|
|
6490
|
-
danger:
|
|
6793
|
+
primary: colors.raw.blue[600],
|
|
6794
|
+
success: colors.raw.green[600],
|
|
6795
|
+
warning: colors.raw.amber[600],
|
|
6796
|
+
danger: colors.raw.red[600]
|
|
6491
6797
|
};
|
|
6492
6798
|
const progressColor = color || variantColors[variant];
|
|
6493
6799
|
const innerSize = size - strokeWidth * 2;
|
|
@@ -6566,6 +6872,7 @@ const ProgressCircle = ({
|
|
|
6566
6872
|
}
|
|
6567
6873
|
);
|
|
6568
6874
|
};
|
|
6875
|
+
const { typography: typography$5 } = designTokens;
|
|
6569
6876
|
const SideNav = ({ items, className }) => {
|
|
6570
6877
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("gap-1", className), accessibilityRole: "list", children: items.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
6571
6878
|
Pressable,
|
|
@@ -6584,13 +6891,23 @@ const SideNav = ({ items, className }) => {
|
|
|
6584
6891
|
Text$1,
|
|
6585
6892
|
{
|
|
6586
6893
|
className: cn(
|
|
6587
|
-
"flex-1
|
|
6894
|
+
"flex-1",
|
|
6895
|
+
typography$5.weight.medium,
|
|
6588
6896
|
item.active ? "text-blue-600 dark:text-blue-400" : "text-gray-700 dark:text-gray-300"
|
|
6589
6897
|
),
|
|
6590
6898
|
children: item.label
|
|
6591
6899
|
}
|
|
6592
6900
|
),
|
|
6593
|
-
item.badge !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6901
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6902
|
+
Text$1,
|
|
6903
|
+
{
|
|
6904
|
+
className: cn(
|
|
6905
|
+
typography$5.size.xs,
|
|
6906
|
+
"text-gray-700 dark:text-gray-300"
|
|
6907
|
+
),
|
|
6908
|
+
children: item.badge
|
|
6909
|
+
}
|
|
6910
|
+
) })
|
|
6594
6911
|
]
|
|
6595
6912
|
},
|
|
6596
6913
|
item.id
|
|
@@ -6614,7 +6931,7 @@ const SectionHeader = ({
|
|
|
6614
6931
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center justify-between", children: [
|
|
6615
6932
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: title }),
|
|
6616
6933
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center gap-2", children: [
|
|
6617
|
-
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(ActivityIndicator, { size: "small", color:
|
|
6934
|
+
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(ActivityIndicator, { size: "small", color: colors.raw.blue[600] }),
|
|
6618
6935
|
actions,
|
|
6619
6936
|
onAdd && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6620
6937
|
Pressable,
|
|
@@ -6834,7 +7151,7 @@ const PhoneInput = ({
|
|
|
6834
7151
|
value,
|
|
6835
7152
|
onChangeText: handleInputChange,
|
|
6836
7153
|
placeholder,
|
|
6837
|
-
placeholderTextColor:
|
|
7154
|
+
placeholderTextColor: colors.raw.neutral[400],
|
|
6838
7155
|
keyboardType: "phone-pad",
|
|
6839
7156
|
editable: !disabled,
|
|
6840
7157
|
className: cn(
|
|
@@ -6867,7 +7184,7 @@ const PhoneInput = ({
|
|
|
6867
7184
|
value: searchQuery,
|
|
6868
7185
|
onChangeText: setSearchQuery,
|
|
6869
7186
|
placeholder: "Search countries...",
|
|
6870
|
-
placeholderTextColor:
|
|
7187
|
+
placeholderTextColor: colors.raw.neutral[400],
|
|
6871
7188
|
className: "px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white rounded-md"
|
|
6872
7189
|
}
|
|
6873
7190
|
) }),
|
|
@@ -7212,7 +7529,7 @@ const Combobox = ({
|
|
|
7212
7529
|
value: searchQuery,
|
|
7213
7530
|
onChangeText: setSearchQuery,
|
|
7214
7531
|
placeholder: searchPlaceholder,
|
|
7215
|
-
placeholderTextColor:
|
|
7532
|
+
placeholderTextColor: colors.raw.neutral[400],
|
|
7216
7533
|
autoFocus: true,
|
|
7217
7534
|
className: "px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white rounded-md"
|
|
7218
7535
|
}
|
|
@@ -7475,6 +7792,32 @@ const AddressLink = ({
|
|
|
7475
7792
|
] })
|
|
7476
7793
|
] });
|
|
7477
7794
|
};
|
|
7795
|
+
let _displayColors = null;
|
|
7796
|
+
function getDisplayColors() {
|
|
7797
|
+
if (!_displayColors) _displayColors = buildDisplayColors();
|
|
7798
|
+
return _displayColors;
|
|
7799
|
+
}
|
|
7800
|
+
function buildDisplayColors() {
|
|
7801
|
+
const alert2 = colors.component.alert;
|
|
7802
|
+
function splitClasses(base, dark) {
|
|
7803
|
+
const all = `${base} ${dark}`.split(" ");
|
|
7804
|
+
return {
|
|
7805
|
+
text: all.filter((c) => c.includes("text-")).join(" "),
|
|
7806
|
+
bg: all.filter((c) => c.includes("bg-")).join(" ")
|
|
7807
|
+
};
|
|
7808
|
+
}
|
|
7809
|
+
const info = splitClasses(alert2.info.base, alert2.info.dark);
|
|
7810
|
+
const success = splitClasses(alert2.success.base, alert2.success.dark);
|
|
7811
|
+
const warning = splitClasses(alert2.warning.base, alert2.warning.dark);
|
|
7812
|
+
return {
|
|
7813
|
+
primary: `${info.text} ${info.bg}`,
|
|
7814
|
+
// secondary uses purple — no DS mapping, keep local
|
|
7815
|
+
secondary: "text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",
|
|
7816
|
+
success: `${success.text} ${success.bg}`,
|
|
7817
|
+
warning: `${warning.text} ${warning.bg}`,
|
|
7818
|
+
neutral: "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"
|
|
7819
|
+
};
|
|
7820
|
+
}
|
|
7478
7821
|
const CodeDisplay = ({
|
|
7479
7822
|
children,
|
|
7480
7823
|
variant = "primary",
|
|
@@ -7484,28 +7827,22 @@ const CodeDisplay = ({
|
|
|
7484
7827
|
wrap = false,
|
|
7485
7828
|
className
|
|
7486
7829
|
}) => {
|
|
7487
|
-
const variantClasses =
|
|
7488
|
-
primary: "text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",
|
|
7489
|
-
secondary: "text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",
|
|
7490
|
-
success: "text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",
|
|
7491
|
-
warning: "text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",
|
|
7492
|
-
neutral: "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"
|
|
7493
|
-
};
|
|
7830
|
+
const variantClasses = getDisplayColors();
|
|
7494
7831
|
const sizeClasses = {
|
|
7495
7832
|
xs: {
|
|
7496
|
-
text:
|
|
7833
|
+
text: designTokens.typography.size.xs,
|
|
7497
7834
|
padding: inline ? "px-1.5 py-0.5" : "px-2 py-1"
|
|
7498
7835
|
},
|
|
7499
7836
|
sm: {
|
|
7500
|
-
text:
|
|
7837
|
+
text: designTokens.typography.size.sm,
|
|
7501
7838
|
padding: inline ? "px-2 py-0.5" : "px-3 py-1.5"
|
|
7502
7839
|
},
|
|
7503
7840
|
md: {
|
|
7504
|
-
text:
|
|
7841
|
+
text: designTokens.typography.size.base,
|
|
7505
7842
|
padding: inline ? "px-2.5 py-1" : "px-4 py-2"
|
|
7506
7843
|
},
|
|
7507
7844
|
lg: {
|
|
7508
|
-
text:
|
|
7845
|
+
text: designTokens.typography.size.lg,
|
|
7509
7846
|
padding: inline ? "px-3 py-1" : "px-4 py-2"
|
|
7510
7847
|
}
|
|
7511
7848
|
};
|
|
@@ -7515,13 +7852,15 @@ const CodeDisplay = ({
|
|
|
7515
7852
|
right: "text-right"
|
|
7516
7853
|
};
|
|
7517
7854
|
const sizeConfig2 = sizeClasses[size];
|
|
7518
|
-
const
|
|
7855
|
+
const variantParts = variantClasses[variant].split(" ");
|
|
7856
|
+
const textColorClass = variantParts.filter((c) => c.includes("text-")).join(" ");
|
|
7857
|
+
const bgClass = variantParts.filter((c) => c.includes("bg-")).join(" ");
|
|
7519
7858
|
if (inline) {
|
|
7520
7859
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7521
7860
|
Text$1,
|
|
7522
7861
|
{
|
|
7523
7862
|
className: cn(
|
|
7524
|
-
|
|
7863
|
+
`${designTokens.typography.family.mono} rounded-lg`,
|
|
7525
7864
|
textColorClass,
|
|
7526
7865
|
bgClass,
|
|
7527
7866
|
sizeConfig2.text,
|
|
@@ -7536,7 +7875,7 @@ const CodeDisplay = ({
|
|
|
7536
7875
|
Text$1,
|
|
7537
7876
|
{
|
|
7538
7877
|
className: cn(
|
|
7539
|
-
|
|
7878
|
+
designTokens.typography.family.mono,
|
|
7540
7879
|
textColorClass,
|
|
7541
7880
|
sizeConfig2.text,
|
|
7542
7881
|
!inline && alignClasses[align],
|
|
@@ -7864,7 +8203,7 @@ function InfiniteScroll({
|
|
|
7864
8203
|
const defaultEmptyComponent = /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-1 justify-center items-center py-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-gray-500 dark:text-gray-400", children: "No items found" }) });
|
|
7865
8204
|
const ListFooterComponent = useCallback(() => {
|
|
7866
8205
|
const footerLoader = /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row justify-center items-center py-4", children: [
|
|
7867
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ActivityIndicator, { size: "small", color:
|
|
8206
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ActivityIndicator, { size: "small", color: colors.raw.blue[500] }),
|
|
7868
8207
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "ml-2 text-sm text-gray-600 dark:text-gray-400", children: "Loading..." })
|
|
7869
8208
|
] });
|
|
7870
8209
|
const footerEndMessage = /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-row justify-center items-center py-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-sm text-gray-600 dark:text-gray-400", children: "No more items to load" }) });
|
|
@@ -7932,9 +8271,9 @@ const ExternalLink = ({
|
|
|
7932
8271
|
lg: "text-base"
|
|
7933
8272
|
};
|
|
7934
8273
|
const variantClasses = {
|
|
7935
|
-
default:
|
|
7936
|
-
primary:
|
|
7937
|
-
muted:
|
|
8274
|
+
default: textVariants.link.external(),
|
|
8275
|
+
primary: `${textVariants.link.default()} font-semibold`,
|
|
8276
|
+
muted: textVariants.link.muted()
|
|
7938
8277
|
};
|
|
7939
8278
|
const handlePress = useCallback(async () => {
|
|
7940
8279
|
onPress == null ? void 0 : onPress();
|
|
@@ -8038,7 +8377,7 @@ const TextInputModal = ({
|
|
|
8038
8377
|
value,
|
|
8039
8378
|
onChangeText: setValue,
|
|
8040
8379
|
placeholder,
|
|
8041
|
-
placeholderTextColor:
|
|
8380
|
+
placeholderTextColor: colors.raw.neutral[400],
|
|
8042
8381
|
maxLength,
|
|
8043
8382
|
editable: !isLoading,
|
|
8044
8383
|
autoFocus: true,
|
|
@@ -8235,37 +8574,54 @@ const SectionBadge = ({
|
|
|
8235
8574
|
}
|
|
8236
8575
|
);
|
|
8237
8576
|
};
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8577
|
+
function splitBadgeClasses(base, dark) {
|
|
8578
|
+
const all = `${base} ${dark}`.split(" ");
|
|
8579
|
+
return {
|
|
8580
|
+
bg: all.filter((c) => c.includes("bg-")).join(" "),
|
|
8581
|
+
text: all.filter((c) => c.includes("text-")).join(" ")
|
|
8582
|
+
};
|
|
8583
|
+
}
|
|
8584
|
+
let _chainColors = null;
|
|
8585
|
+
function getChainColors() {
|
|
8586
|
+
if (!_chainColors) _chainColors = buildChainColors();
|
|
8587
|
+
return _chainColors;
|
|
8588
|
+
}
|
|
8589
|
+
function buildChainColors() {
|
|
8590
|
+
const badge = colors.component.badge;
|
|
8591
|
+
return {
|
|
8592
|
+
evm: splitBadgeClasses(badge.ethereum.base, badge.ethereum.dark),
|
|
8593
|
+
solana: splitBadgeClasses(badge.solana.base, badge.solana.dark),
|
|
8594
|
+
bitcoin: splitBadgeClasses(badge.bitcoin.base, badge.bitcoin.dark),
|
|
8595
|
+
// DS has no cosmos badge — use local fallback (indigo)
|
|
8596
|
+
cosmos: {
|
|
8597
|
+
bg: "bg-indigo-50 dark:bg-indigo-900/20",
|
|
8598
|
+
text: "text-indigo-700 dark:text-indigo-300"
|
|
8599
|
+
}
|
|
8600
|
+
};
|
|
8601
|
+
}
|
|
8602
|
+
const chainMeta = {
|
|
8603
|
+
evm: { label: "EVM", emoji: "⟠" },
|
|
8604
|
+
solana: { label: "SOL", emoji: "◎" },
|
|
8605
|
+
bitcoin: { label: "BTC", emoji: "₿" },
|
|
8606
|
+
cosmos: { label: "ATOM", emoji: "⚛" }
|
|
8607
|
+
};
|
|
8608
|
+
const sizeConfig = {
|
|
8609
|
+
sm: {
|
|
8610
|
+
padding: "px-1.5 py-0.5",
|
|
8611
|
+
text: designTokens.typography.size.xs,
|
|
8612
|
+
gap: "gap-0.5"
|
|
8250
8613
|
},
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
textColor: "text-orange-700 dark:text-orange-300"
|
|
8614
|
+
md: {
|
|
8615
|
+
padding: "px-2 py-1",
|
|
8616
|
+
text: designTokens.typography.size.sm,
|
|
8617
|
+
gap: "gap-1"
|
|
8256
8618
|
},
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
textColor: "text-indigo-700 dark:text-indigo-300"
|
|
8619
|
+
lg: {
|
|
8620
|
+
padding: "px-2.5 py-1.5",
|
|
8621
|
+
text: designTokens.typography.size.base,
|
|
8622
|
+
gap: "gap-1.5"
|
|
8262
8623
|
}
|
|
8263
8624
|
};
|
|
8264
|
-
const sizeConfig = {
|
|
8265
|
-
sm: { padding: "px-1.5 py-0.5", text: "text-xs", gap: "gap-0.5" },
|
|
8266
|
-
md: { padding: "px-2 py-1", text: "text-sm", gap: "gap-1" },
|
|
8267
|
-
lg: { padding: "px-2.5 py-1.5", text: "text-base", gap: "gap-1.5" }
|
|
8268
|
-
};
|
|
8269
8625
|
const ChainBadge = ({
|
|
8270
8626
|
chainType,
|
|
8271
8627
|
size = "md",
|
|
@@ -8273,23 +8629,34 @@ const ChainBadge = ({
|
|
|
8273
8629
|
className,
|
|
8274
8630
|
...props
|
|
8275
8631
|
}) => {
|
|
8276
|
-
const
|
|
8632
|
+
const chainColors = getChainColors()[chainType];
|
|
8633
|
+
const meta = chainMeta[chainType];
|
|
8277
8634
|
const sizeStyles = sizeConfig[size];
|
|
8278
8635
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
8279
8636
|
View,
|
|
8280
8637
|
{
|
|
8281
8638
|
className: cn(
|
|
8282
8639
|
"flex-row items-center rounded-md border",
|
|
8283
|
-
|
|
8640
|
+
chainColors.bg,
|
|
8284
8641
|
sizeStyles.padding,
|
|
8285
8642
|
sizeStyles.gap,
|
|
8286
8643
|
className
|
|
8287
8644
|
),
|
|
8288
|
-
accessibilityLabel: `${
|
|
8645
|
+
accessibilityLabel: `${meta.label} chain`,
|
|
8289
8646
|
...props,
|
|
8290
8647
|
children: [
|
|
8291
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(sizeStyles.text,
|
|
8292
|
-
showLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8648
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(sizeStyles.text, chainColors.text), children: meta.emoji }),
|
|
8649
|
+
showLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8650
|
+
Text$1,
|
|
8651
|
+
{
|
|
8652
|
+
className: cn(
|
|
8653
|
+
designTokens.typography.weight.medium,
|
|
8654
|
+
sizeStyles.text,
|
|
8655
|
+
chainColors.text
|
|
8656
|
+
),
|
|
8657
|
+
children: meta.label
|
|
8658
|
+
}
|
|
8659
|
+
)
|
|
8293
8660
|
]
|
|
8294
8661
|
}
|
|
8295
8662
|
);
|
|
@@ -8336,7 +8703,7 @@ const ListItemWithAction = ({
|
|
|
8336
8703
|
ActivityIndicator,
|
|
8337
8704
|
{
|
|
8338
8705
|
size: "small",
|
|
8339
|
-
color: destructive ?
|
|
8706
|
+
color: destructive ? colors.raw.red[600] : colors.raw.neutral[500]
|
|
8340
8707
|
}
|
|
8341
8708
|
) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8342
8709
|
actionIcon && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "mr-1", children: actionIcon }),
|
|
@@ -8485,7 +8852,7 @@ const TransferList = ({
|
|
|
8485
8852
|
value: searchValue,
|
|
8486
8853
|
onChangeText: onSearchChange,
|
|
8487
8854
|
placeholder: searchPlaceholder,
|
|
8488
|
-
placeholderTextColor:
|
|
8855
|
+
placeholderTextColor: colors.raw.neutral[400],
|
|
8489
8856
|
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"
|
|
8490
8857
|
}
|
|
8491
8858
|
) }),
|
|
@@ -8990,6 +9357,26 @@ const Masonry = ({
|
|
|
8990
9357
|
});
|
|
8991
9358
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("flex-row", className), style: { gap }, children: columnArrays.map((column, columnIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-1", style: { gap }, children: column.map((item, itemIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(View, { children: item }, itemIndex)) }, columnIndex)) });
|
|
8992
9359
|
};
|
|
9360
|
+
let _iconContainerColors = null;
|
|
9361
|
+
function getIconContainerColors() {
|
|
9362
|
+
if (!_iconContainerColors) {
|
|
9363
|
+
let extractBg = function(base, dark) {
|
|
9364
|
+
const all = `${base} ${dark}`.split(" ");
|
|
9365
|
+
return all.filter((c) => c.includes("bg-")).join(" ");
|
|
9366
|
+
};
|
|
9367
|
+
const badge = colors.component.badge;
|
|
9368
|
+
_iconContainerColors = {
|
|
9369
|
+
primary: extractBg(badge.primary.base, badge.primary.dark),
|
|
9370
|
+
secondary: "bg-purple-100 dark:bg-purple-900/30",
|
|
9371
|
+
// DS has no purple badge variant; local fallback
|
|
9372
|
+
success: extractBg(badge.success.base, badge.success.dark),
|
|
9373
|
+
warning: extractBg(badge.warning.base, badge.warning.dark),
|
|
9374
|
+
error: extractBg(badge.error.base, badge.error.dark),
|
|
9375
|
+
neutral: extractBg(badge.default.base, badge.default.dark)
|
|
9376
|
+
};
|
|
9377
|
+
}
|
|
9378
|
+
return _iconContainerColors;
|
|
9379
|
+
}
|
|
8993
9380
|
const IconContainer = ({
|
|
8994
9381
|
children,
|
|
8995
9382
|
size = "md",
|
|
@@ -9003,14 +9390,7 @@ const IconContainer = ({
|
|
|
9003
9390
|
lg: "w-16 h-16",
|
|
9004
9391
|
xl: "w-20 h-20"
|
|
9005
9392
|
};
|
|
9006
|
-
const variantClasses =
|
|
9007
|
-
primary: "bg-blue-100 dark:bg-blue-900/30",
|
|
9008
|
-
secondary: "bg-purple-100 dark:bg-purple-900/30",
|
|
9009
|
-
success: "bg-green-100 dark:bg-green-900/30",
|
|
9010
|
-
warning: "bg-yellow-100 dark:bg-yellow-900/30",
|
|
9011
|
-
error: "bg-red-100 dark:bg-red-900/30",
|
|
9012
|
-
neutral: "bg-gray-100 dark:bg-gray-800"
|
|
9013
|
-
};
|
|
9393
|
+
const variantClasses = getIconContainerColors();
|
|
9014
9394
|
const shapeClasses = {
|
|
9015
9395
|
square: "rounded-lg",
|
|
9016
9396
|
rounded: "rounded-2xl",
|
|
@@ -9030,6 +9410,27 @@ const IconContainer = ({
|
|
|
9030
9410
|
}
|
|
9031
9411
|
);
|
|
9032
9412
|
};
|
|
9413
|
+
let _gradientIconColors = null;
|
|
9414
|
+
function getGradientIconColors() {
|
|
9415
|
+
if (!_gradientIconColors) {
|
|
9416
|
+
let extractBg = function(base) {
|
|
9417
|
+
return base.split(" ").find(
|
|
9418
|
+
(c) => c.startsWith("bg-") && !c.includes("hover:") && !c.includes("active:")
|
|
9419
|
+
) || "";
|
|
9420
|
+
};
|
|
9421
|
+
const btn = colors.component.button;
|
|
9422
|
+
_gradientIconColors = {
|
|
9423
|
+
blue: extractBg(btn.primary.base),
|
|
9424
|
+
purple: "bg-purple-600",
|
|
9425
|
+
// DS has no purple button; local fallback
|
|
9426
|
+
green: extractBg(btn.success.base),
|
|
9427
|
+
orange: "bg-orange-600",
|
|
9428
|
+
// DS has no orange button; local fallback
|
|
9429
|
+
gray: "bg-gray-700 dark:bg-gray-600"
|
|
9430
|
+
};
|
|
9431
|
+
}
|
|
9432
|
+
return _gradientIconColors;
|
|
9433
|
+
}
|
|
9033
9434
|
const GradientIconContainer = ({
|
|
9034
9435
|
children,
|
|
9035
9436
|
size = "md",
|
|
@@ -9048,13 +9449,7 @@ const GradientIconContainer = ({
|
|
|
9048
9449
|
rounded: "rounded-xl",
|
|
9049
9450
|
circle: "rounded-full"
|
|
9050
9451
|
};
|
|
9051
|
-
const variantClasses =
|
|
9052
|
-
blue: "bg-blue-600",
|
|
9053
|
-
purple: "bg-purple-600",
|
|
9054
|
-
green: "bg-green-600",
|
|
9055
|
-
orange: "bg-orange-600",
|
|
9056
|
-
gray: "bg-gray-700 dark:bg-gray-600"
|
|
9057
|
-
};
|
|
9452
|
+
const variantClasses = getGradientIconColors();
|
|
9058
9453
|
const config = sizeConfig2[size];
|
|
9059
9454
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9060
9455
|
View,
|
|
@@ -9135,7 +9530,7 @@ const PageSectionHeader = ({
|
|
|
9135
9530
|
}
|
|
9136
9531
|
),
|
|
9137
9532
|
loading && /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center gap-2", children: [
|
|
9138
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ActivityIndicator, { size: "small", color:
|
|
9533
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ActivityIndicator, { size: "small", color: colors.raw.blue[500] }),
|
|
9139
9534
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9140
9535
|
Text$1,
|
|
9141
9536
|
{
|
|
@@ -9187,6 +9582,7 @@ const styles = StyleSheet.create({
|
|
|
9187
9582
|
// clipPath: 'inset(50%)', // Not supported in RN
|
|
9188
9583
|
}
|
|
9189
9584
|
});
|
|
9585
|
+
const { typography: typography$4 } = designTokens;
|
|
9190
9586
|
const BreadcrumbNav = ({
|
|
9191
9587
|
items,
|
|
9192
9588
|
separator = "/",
|
|
@@ -9199,14 +9595,42 @@ const BreadcrumbNav = ({
|
|
|
9199
9595
|
accessibilityRole: "none",
|
|
9200
9596
|
accessibilityLabel: "Breadcrumb navigation",
|
|
9201
9597
|
children: items.map((item, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(React.Fragment, { children: [
|
|
9202
|
-
index > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9203
|
-
|
|
9598
|
+
index > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9599
|
+
Text$1,
|
|
9600
|
+
{
|
|
9601
|
+
className: cn(
|
|
9602
|
+
"text-gray-400 dark:text-gray-600",
|
|
9603
|
+
typography$4.size.sm
|
|
9604
|
+
),
|
|
9605
|
+
children: typeof separator === "string" ? separator : separator
|
|
9606
|
+
}
|
|
9607
|
+
),
|
|
9608
|
+
index === items.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9609
|
+
Text$1,
|
|
9610
|
+
{
|
|
9611
|
+
className: cn(
|
|
9612
|
+
"text-gray-900 dark:text-white",
|
|
9613
|
+
typography$4.weight.medium,
|
|
9614
|
+
typography$4.size.sm
|
|
9615
|
+
),
|
|
9616
|
+
children: item.label
|
|
9617
|
+
}
|
|
9618
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9204
9619
|
Pressable,
|
|
9205
9620
|
{
|
|
9206
9621
|
onPress: item.onPress,
|
|
9207
9622
|
accessibilityRole: "link",
|
|
9208
9623
|
accessibilityLabel: item.label,
|
|
9209
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9624
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9625
|
+
Text$1,
|
|
9626
|
+
{
|
|
9627
|
+
className: cn(
|
|
9628
|
+
"text-blue-600 dark:text-blue-400",
|
|
9629
|
+
typography$4.size.sm
|
|
9630
|
+
),
|
|
9631
|
+
children: item.label
|
|
9632
|
+
}
|
|
9633
|
+
)
|
|
9210
9634
|
}
|
|
9211
9635
|
)
|
|
9212
9636
|
] }, index))
|
|
@@ -9285,7 +9709,8 @@ function Table({
|
|
|
9285
9709
|
View,
|
|
9286
9710
|
{
|
|
9287
9711
|
className: cn(
|
|
9288
|
-
"flex-row
|
|
9712
|
+
"flex-row",
|
|
9713
|
+
ui.table.thead,
|
|
9289
9714
|
"border-b border-gray-200 dark:border-gray-700"
|
|
9290
9715
|
),
|
|
9291
9716
|
children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9308,7 +9733,19 @@ function Table({
|
|
|
9308
9733
|
alignClasses[column.align || "left"]
|
|
9309
9734
|
),
|
|
9310
9735
|
children: [
|
|
9311
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9736
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9737
|
+
Text$1,
|
|
9738
|
+
{
|
|
9739
|
+
className: cn(
|
|
9740
|
+
designTokens.typography.size.xs,
|
|
9741
|
+
designTokens.typography.weight.medium,
|
|
9742
|
+
"text-gray-700 dark:text-gray-300",
|
|
9743
|
+
designTokens.typography.transform.uppercase,
|
|
9744
|
+
designTokens.typography.tracking.wider
|
|
9745
|
+
),
|
|
9746
|
+
children: column.label
|
|
9747
|
+
}
|
|
9748
|
+
),
|
|
9312
9749
|
column.sortable && (sort == null ? void 0 : sort.column) === column.key && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-xs text-gray-500", children: sort.direction === "asc" ? "↑" : "↓" })
|
|
9313
9750
|
]
|
|
9314
9751
|
}
|
|
@@ -9318,7 +9755,7 @@ function Table({
|
|
|
9318
9755
|
))
|
|
9319
9756
|
}
|
|
9320
9757
|
),
|
|
9321
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(View, { className:
|
|
9758
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: ui.table.tr, children: data.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-4 py-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-center text-sm text-gray-500 dark:text-gray-400", children: emptyMessage }) }) : data.map((row, rowIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9322
9759
|
Pressable,
|
|
9323
9760
|
{
|
|
9324
9761
|
onPress: () => onRowPress == null ? void 0 : onRowPress(row, rowIndex),
|
|
@@ -9326,7 +9763,7 @@ function Table({
|
|
|
9326
9763
|
className: cn(
|
|
9327
9764
|
"flex-row",
|
|
9328
9765
|
"border-b border-gray-200 dark:border-gray-700",
|
|
9329
|
-
striped && rowIndex % 2 === 1 &&
|
|
9766
|
+
striped && rowIndex % 2 === 1 && ui.table.trAlt
|
|
9330
9767
|
),
|
|
9331
9768
|
accessibilityRole: "button",
|
|
9332
9769
|
children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9338,7 +9775,16 @@ function Table({
|
|
|
9338
9775
|
bordered && "border-r border-gray-200 dark:border-gray-700 last:border-r-0"
|
|
9339
9776
|
),
|
|
9340
9777
|
style: { width: column.width },
|
|
9341
|
-
children: column.render ? column.render(row, rowIndex) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9778
|
+
children: column.render ? column.render(row, rowIndex) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9779
|
+
Text$1,
|
|
9780
|
+
{
|
|
9781
|
+
className: cn(
|
|
9782
|
+
designTokens.typography.size.sm,
|
|
9783
|
+
"text-gray-900 dark:text-white"
|
|
9784
|
+
),
|
|
9785
|
+
children: String(row[column.key] ?? "")
|
|
9786
|
+
}
|
|
9787
|
+
)
|
|
9342
9788
|
},
|
|
9343
9789
|
column.key
|
|
9344
9790
|
))
|
|
@@ -9433,7 +9879,7 @@ const Command = ({
|
|
|
9433
9879
|
value: searchQuery,
|
|
9434
9880
|
onChangeText: setSearchQuery,
|
|
9435
9881
|
placeholder,
|
|
9436
|
-
placeholderTextColor:
|
|
9882
|
+
placeholderTextColor: colors.raw.neutral[400],
|
|
9437
9883
|
className: "flex-1 text-gray-900 dark:text-white text-base",
|
|
9438
9884
|
autoCapitalize: "none",
|
|
9439
9885
|
autoCorrect: false,
|
|
@@ -9659,6 +10105,7 @@ const StandardPageLayout = ({
|
|
|
9659
10105
|
}) => {
|
|
9660
10106
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("flex-1", backgroundClassName), children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("flex-1", contentClassName), children }) });
|
|
9661
10107
|
};
|
|
10108
|
+
const { typography: typography$3 } = designTokens;
|
|
9662
10109
|
const StepList = ({
|
|
9663
10110
|
items,
|
|
9664
10111
|
type = "ordered",
|
|
@@ -9669,10 +10116,30 @@ const StepList = ({
|
|
|
9669
10116
|
const renderStepNumber = (index) => {
|
|
9670
10117
|
if (type === "ordered") {
|
|
9671
10118
|
if (variant === "enhanced") {
|
|
9672
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "w-6 h-6 bg-blue-600 rounded-full items-center justify-center mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10119
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "w-6 h-6 bg-blue-600 rounded-full items-center justify-center mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10120
|
+
Text$1,
|
|
10121
|
+
{
|
|
10122
|
+
className: cn(
|
|
10123
|
+
"text-white",
|
|
10124
|
+
typography$3.size.sm,
|
|
10125
|
+
typography$3.weight.medium
|
|
10126
|
+
),
|
|
10127
|
+
children: index + 1
|
|
10128
|
+
}
|
|
10129
|
+
) });
|
|
9673
10130
|
}
|
|
9674
10131
|
if (variant === "minimal") {
|
|
9675
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(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(
|
|
10132
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(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(
|
|
10133
|
+
Text$1,
|
|
10134
|
+
{
|
|
10135
|
+
className: cn(
|
|
10136
|
+
"text-blue-600 dark:text-blue-400",
|
|
10137
|
+
typography$3.size.sm,
|
|
10138
|
+
typography$3.weight.medium
|
|
10139
|
+
),
|
|
10140
|
+
children: index + 1
|
|
10141
|
+
}
|
|
10142
|
+
) });
|
|
9676
10143
|
}
|
|
9677
10144
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Text$1, { className: "text-gray-600 dark:text-gray-400 mr-2", children: [
|
|
9678
10145
|
index + 1,
|
|
@@ -9703,7 +10170,16 @@ const StepList = ({
|
|
|
9703
10170
|
typeof content === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-gray-600 dark:text-gray-400", children: content }) : content,
|
|
9704
10171
|
subItems && subItems.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "mt-2 ml-4 gap-1", children: subItems.map((subItem, subIndex) => /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row", children: [
|
|
9705
10172
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-gray-500 dark:text-gray-500 mr-2", children: "•" }),
|
|
9706
|
-
typeof subItem === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10173
|
+
typeof subItem === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10174
|
+
Text$1,
|
|
10175
|
+
{
|
|
10176
|
+
className: cn(
|
|
10177
|
+
typography$3.size.sm,
|
|
10178
|
+
"text-gray-500 dark:text-gray-500 flex-1"
|
|
10179
|
+
),
|
|
10180
|
+
children: subItem
|
|
10181
|
+
}
|
|
10182
|
+
) : subItem
|
|
9707
10183
|
] }, subIndex)) })
|
|
9708
10184
|
] })
|
|
9709
10185
|
]
|
|
@@ -9737,53 +10213,76 @@ const FeatureCard = ({
|
|
|
9737
10213
|
borderColor = false,
|
|
9738
10214
|
className
|
|
9739
10215
|
}) => {
|
|
9740
|
-
const
|
|
10216
|
+
const colorClasses2 = {
|
|
9741
10217
|
blue: "text-blue-600 dark:text-blue-400",
|
|
10218
|
+
// colors.raw.blue[600] / [400]
|
|
9742
10219
|
green: "text-green-600 dark:text-green-400",
|
|
10220
|
+
// colors.raw.green[600] / [400]
|
|
9743
10221
|
purple: "text-purple-600 dark:text-purple-400",
|
|
9744
10222
|
orange: "text-orange-600 dark:text-orange-400",
|
|
10223
|
+
// colors.raw.orange[600] / [400]
|
|
9745
10224
|
pink: "text-pink-600 dark:text-pink-400",
|
|
9746
10225
|
gray: "text-gray-600 dark:text-gray-400",
|
|
10226
|
+
// colors.raw.neutral[600] / [400]
|
|
9747
10227
|
red: "text-red-600 dark:text-red-400",
|
|
10228
|
+
// colors.raw.red[600] / [400]
|
|
9748
10229
|
indigo: "text-indigo-600 dark:text-indigo-400",
|
|
9749
10230
|
cyan: "text-cyan-600 dark:text-cyan-400",
|
|
9750
10231
|
emerald: "text-emerald-600 dark:text-emerald-400"
|
|
9751
10232
|
};
|
|
9752
10233
|
const borderColorClasses = {
|
|
9753
10234
|
green: "border-l-4 border-l-green-500",
|
|
10235
|
+
// colors.raw.green[500]
|
|
9754
10236
|
blue: "border-l-4 border-l-blue-500",
|
|
10237
|
+
// colors.raw.blue[500]
|
|
9755
10238
|
purple: "border-l-4 border-l-purple-500",
|
|
10239
|
+
// colors.raw.purple[500]
|
|
9756
10240
|
orange: "border-l-4 border-l-orange-500",
|
|
10241
|
+
// colors.raw.orange[500]
|
|
9757
10242
|
red: "border-l-4 border-l-red-500",
|
|
10243
|
+
// colors.raw.red[500]
|
|
9758
10244
|
indigo: "border-l-4 border-l-indigo-500",
|
|
9759
10245
|
cyan: "border-l-4 border-l-cyan-500",
|
|
9760
10246
|
emerald: "border-l-4 border-l-emerald-500",
|
|
9761
10247
|
pink: "border-l-4 border-l-pink-500",
|
|
9762
10248
|
gray: "border-l-4 border-l-gray-500"
|
|
10249
|
+
// colors.raw.neutral[500]
|
|
9763
10250
|
};
|
|
9764
10251
|
const iconBackgroundClasses = {
|
|
9765
10252
|
green: "bg-green-100 dark:bg-green-900/20",
|
|
10253
|
+
// colors.raw.green[100] / [900]
|
|
9766
10254
|
blue: "bg-blue-100 dark:bg-blue-900/20",
|
|
10255
|
+
// colors.raw.blue[100] / [900]
|
|
9767
10256
|
purple: "bg-purple-100 dark:bg-purple-900/20",
|
|
10257
|
+
// colors.raw.purple[100] / [900]
|
|
9768
10258
|
orange: "bg-orange-100 dark:bg-orange-900/20",
|
|
10259
|
+
// colors.raw.orange[100] / [900]
|
|
9769
10260
|
red: "bg-red-100 dark:bg-red-900/20",
|
|
10261
|
+
// colors.raw.red[100] / [900]
|
|
9770
10262
|
indigo: "bg-indigo-100 dark:bg-indigo-900/20",
|
|
9771
10263
|
cyan: "bg-cyan-100 dark:bg-cyan-900/20",
|
|
9772
10264
|
emerald: "bg-emerald-100 dark:bg-emerald-900/20",
|
|
9773
10265
|
pink: "bg-pink-100 dark:bg-pink-900/20",
|
|
9774
10266
|
gray: "bg-gray-100 dark:bg-gray-900/20"
|
|
10267
|
+
// colors.raw.neutral[100] / [900]
|
|
9775
10268
|
};
|
|
9776
10269
|
const bulletColorClasses = {
|
|
9777
10270
|
green: "bg-green-500",
|
|
10271
|
+
// colors.raw.green[500]
|
|
9778
10272
|
blue: "bg-blue-500",
|
|
10273
|
+
// colors.raw.blue[500]
|
|
9779
10274
|
purple: "bg-purple-500",
|
|
10275
|
+
// colors.raw.purple[500]
|
|
9780
10276
|
orange: "bg-orange-500",
|
|
10277
|
+
// colors.raw.orange[500]
|
|
9781
10278
|
red: "bg-red-500",
|
|
10279
|
+
// colors.raw.red[500]
|
|
9782
10280
|
indigo: "bg-indigo-500",
|
|
9783
10281
|
cyan: "bg-cyan-500",
|
|
9784
10282
|
emerald: "bg-emerald-500",
|
|
9785
10283
|
pink: "bg-pink-500",
|
|
9786
10284
|
gray: "bg-gray-500"
|
|
10285
|
+
// colors.raw.neutral[500]
|
|
9787
10286
|
};
|
|
9788
10287
|
const CardContent2 = () => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
9789
10288
|
borderColor ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9793,11 +10292,31 @@ const FeatureCard = ({
|
|
|
9793
10292
|
"w-12 h-12 rounded-lg items-center justify-center mb-4",
|
|
9794
10293
|
iconBackgroundClasses[color]
|
|
9795
10294
|
),
|
|
9796
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className:
|
|
10295
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: colorClasses2[color], children: icon })
|
|
10296
|
+
}
|
|
10297
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("mb-4", colorClasses2[color]), children: icon }),
|
|
10298
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10299
|
+
Text$1,
|
|
10300
|
+
{
|
|
10301
|
+
className: cn(
|
|
10302
|
+
designTokens.typography.size.xl,
|
|
10303
|
+
designTokens.typography.weight.semibold,
|
|
10304
|
+
"text-gray-900 dark:text-white mb-3"
|
|
10305
|
+
),
|
|
10306
|
+
children: title
|
|
10307
|
+
}
|
|
10308
|
+
),
|
|
10309
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10310
|
+
Text$1,
|
|
10311
|
+
{
|
|
10312
|
+
className: cn(
|
|
10313
|
+
designTokens.typography.size.base,
|
|
10314
|
+
designTokens.typography.leading.relaxed,
|
|
10315
|
+
"text-gray-600 dark:text-gray-300 mb-4"
|
|
10316
|
+
),
|
|
10317
|
+
children: description
|
|
9797
10318
|
}
|
|
9798
|
-
)
|
|
9799
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-xl font-semibold text-gray-900 dark:text-white mb-3", children: title }),
|
|
9800
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: description }),
|
|
10319
|
+
),
|
|
9801
10320
|
cta && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "mt-3 mb-4", children: cta }),
|
|
9802
10321
|
benefits && benefits.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "gap-2 mb-4", children: benefits.map((benefit, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-start", children: [
|
|
9803
10322
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9809,15 +10328,44 @@ const FeatureCard = ({
|
|
|
9809
10328
|
)
|
|
9810
10329
|
}
|
|
9811
10330
|
),
|
|
9812
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10331
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10332
|
+
Text$1,
|
|
10333
|
+
{
|
|
10334
|
+
className: cn(
|
|
10335
|
+
"flex-1",
|
|
10336
|
+
designTokens.typography.size.sm,
|
|
10337
|
+
"text-gray-600 dark:text-gray-400"
|
|
10338
|
+
),
|
|
10339
|
+
children: benefit
|
|
10340
|
+
}
|
|
10341
|
+
)
|
|
9813
10342
|
] }, index)) }),
|
|
9814
10343
|
metrics && Object.keys(metrics).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-row flex-wrap gap-4 mt-4", children: Object.entries(metrics).map(([key, value], index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
9815
10344
|
View,
|
|
9816
10345
|
{
|
|
9817
10346
|
className: "flex-1 min-w-[80px] items-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",
|
|
9818
10347
|
children: [
|
|
9819
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9820
|
-
|
|
10348
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10349
|
+
Text$1,
|
|
10350
|
+
{
|
|
10351
|
+
className: cn(
|
|
10352
|
+
designTokens.typography.size.lg,
|
|
10353
|
+
designTokens.typography.weight.bold,
|
|
10354
|
+
colorClasses2[color]
|
|
10355
|
+
),
|
|
10356
|
+
children: value
|
|
10357
|
+
}
|
|
10358
|
+
),
|
|
10359
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10360
|
+
Text$1,
|
|
10361
|
+
{
|
|
10362
|
+
className: cn(
|
|
10363
|
+
designTokens.typography.size.xs,
|
|
10364
|
+
"text-gray-500 dark:text-gray-400 mt-1"
|
|
10365
|
+
),
|
|
10366
|
+
children: key
|
|
10367
|
+
}
|
|
10368
|
+
)
|
|
9821
10369
|
]
|
|
9822
10370
|
},
|
|
9823
10371
|
index
|
|
@@ -9863,10 +10411,10 @@ const FeatureGrid = ({
|
|
|
9863
10411
|
lg: "w-20 h-20"
|
|
9864
10412
|
};
|
|
9865
10413
|
const badgeVariants = {
|
|
9866
|
-
success:
|
|
9867
|
-
info:
|
|
9868
|
-
warning:
|
|
9869
|
-
default:
|
|
10414
|
+
success: `${colors.component.badge.success.base} ${colors.component.badge.success.dark}`,
|
|
10415
|
+
info: `${colors.component.badge.primary.base} ${colors.component.badge.primary.dark}`,
|
|
10416
|
+
warning: `${colors.component.badge.attention.base} ${colors.component.badge.attention.dark}`,
|
|
10417
|
+
default: `${colors.component.badge.default.base} ${colors.component.badge.default.dark}`
|
|
9870
10418
|
};
|
|
9871
10419
|
const renderFeature = (feature, index) => {
|
|
9872
10420
|
const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -9874,7 +10422,7 @@ const FeatureGrid = ({
|
|
|
9874
10422
|
{
|
|
9875
10423
|
className: cn(
|
|
9876
10424
|
"items-center",
|
|
9877
|
-
cardVariant === "card" && "
|
|
10425
|
+
cardVariant === "card" && `${getCardVariantColors("elevated")} rounded-2xl p-6`,
|
|
9878
10426
|
cardVariant === "minimal" && "gap-4"
|
|
9879
10427
|
),
|
|
9880
10428
|
children: [
|
|
@@ -9958,14 +10506,14 @@ const CTASection = ({
|
|
|
9958
10506
|
lg: "py-16 px-8"
|
|
9959
10507
|
};
|
|
9960
10508
|
const titleSizeClasses = {
|
|
9961
|
-
sm: "
|
|
9962
|
-
md: "
|
|
9963
|
-
lg: "
|
|
10509
|
+
sm: designTokens.typography.size["2xl"],
|
|
10510
|
+
md: designTokens.typography.size["3xl"],
|
|
10511
|
+
lg: designTokens.typography.size["4xl"]
|
|
9964
10512
|
};
|
|
9965
10513
|
const descriptionSizeClasses = {
|
|
9966
|
-
sm:
|
|
9967
|
-
md:
|
|
9968
|
-
lg:
|
|
10514
|
+
sm: designTokens.typography.size.base,
|
|
10515
|
+
md: designTokens.typography.size.lg,
|
|
10516
|
+
lg: designTokens.typography.size.xl
|
|
9969
10517
|
};
|
|
9970
10518
|
const textColorClass = textColor === "light" ? "text-white" : "text-gray-900";
|
|
9971
10519
|
const renderButton = (button, isPrimary) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -10045,8 +10593,10 @@ const PromotionalBanner = ({
|
|
|
10045
10593
|
View,
|
|
10046
10594
|
{
|
|
10047
10595
|
className: cn(
|
|
10048
|
-
|
|
10049
|
-
|
|
10596
|
+
// Derive green palette from DS alert.success colors
|
|
10597
|
+
colors.component.alert.success.base,
|
|
10598
|
+
colors.component.alert.success.dark,
|
|
10599
|
+
"border-b",
|
|
10050
10600
|
isProminent && "border-b-2",
|
|
10051
10601
|
className
|
|
10052
10602
|
),
|
|
@@ -10097,6 +10647,7 @@ const PromotionalBanner = ({
|
|
|
10097
10647
|
}
|
|
10098
10648
|
);
|
|
10099
10649
|
};
|
|
10650
|
+
const { typography: typography$2 } = designTokens;
|
|
10100
10651
|
if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) {
|
|
10101
10652
|
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
10102
10653
|
}
|
|
@@ -10146,7 +10697,8 @@ const CollapsibleSection = ({
|
|
|
10146
10697
|
Text$1,
|
|
10147
10698
|
{
|
|
10148
10699
|
className: cn(
|
|
10149
|
-
|
|
10700
|
+
typography$2.size.base,
|
|
10701
|
+
typography$2.weight.medium,
|
|
10150
10702
|
isSelected && !selectedSubsection ? "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300"
|
|
10151
10703
|
),
|
|
10152
10704
|
children: title
|
|
@@ -10161,7 +10713,7 @@ const CollapsibleSection = ({
|
|
|
10161
10713
|
className: "p-2 rounded-md",
|
|
10162
10714
|
accessibilityRole: "button",
|
|
10163
10715
|
accessibilityLabel: isExpanded ? "Collapse" : "Expand",
|
|
10164
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Animated.View, { style: { transform: [{ rotate: rotation }] }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-gray-500
|
|
10716
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Animated.View, { style: { transform: [{ rotate: rotation }] }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("text-gray-500", typography$2.size.lg), children: "›" }) })
|
|
10165
10717
|
}
|
|
10166
10718
|
)
|
|
10167
10719
|
] }),
|
|
@@ -10181,7 +10733,7 @@ const CollapsibleSection = ({
|
|
|
10181
10733
|
Text$1,
|
|
10182
10734
|
{
|
|
10183
10735
|
className: cn(
|
|
10184
|
-
|
|
10736
|
+
typography$2.size.sm,
|
|
10185
10737
|
selectedSubsection === subsection.id ? "text-blue-700 dark:text-blue-300" : "text-gray-600 dark:text-gray-400"
|
|
10186
10738
|
),
|
|
10187
10739
|
children: subsection.title
|
|
@@ -10192,6 +10744,19 @@ const CollapsibleSection = ({
|
|
|
10192
10744
|
] }, subsection.id)) })
|
|
10193
10745
|
] });
|
|
10194
10746
|
};
|
|
10747
|
+
let _cardColors = null;
|
|
10748
|
+
function getDashboardCardColors() {
|
|
10749
|
+
if (!_cardColors) {
|
|
10750
|
+
_cardColors = {
|
|
10751
|
+
default: getCardVariantColors("default"),
|
|
10752
|
+
primary: getCardVariantColors("info"),
|
|
10753
|
+
success: getCardVariantColors("success"),
|
|
10754
|
+
warning: getCardVariantColors("warning"),
|
|
10755
|
+
danger: getCardVariantColors("error")
|
|
10756
|
+
};
|
|
10757
|
+
}
|
|
10758
|
+
return _cardColors;
|
|
10759
|
+
}
|
|
10195
10760
|
const DashboardStatCard = ({
|
|
10196
10761
|
title,
|
|
10197
10762
|
value,
|
|
@@ -10201,13 +10766,7 @@ const DashboardStatCard = ({
|
|
|
10201
10766
|
variant = "default",
|
|
10202
10767
|
className
|
|
10203
10768
|
}) => {
|
|
10204
|
-
const variantClasses =
|
|
10205
|
-
default: "bg-white dark:bg-gray-900",
|
|
10206
|
-
primary: "bg-blue-50 dark:bg-blue-900/20",
|
|
10207
|
-
success: "bg-green-50 dark:bg-green-900/20",
|
|
10208
|
-
warning: "bg-yellow-50 dark:bg-yellow-900/20",
|
|
10209
|
-
danger: "bg-red-50 dark:bg-red-900/20"
|
|
10210
|
-
};
|
|
10769
|
+
const variantClasses = getDashboardCardColors();
|
|
10211
10770
|
const isPositive = change !== void 0 && change >= 0;
|
|
10212
10771
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10213
10772
|
View,
|
|
@@ -10219,16 +10778,29 @@ const DashboardStatCard = ({
|
|
|
10219
10778
|
),
|
|
10220
10779
|
children: [
|
|
10221
10780
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-start justify-between mb-2", children: [
|
|
10222
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10781
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10782
|
+
Text$1,
|
|
10783
|
+
{
|
|
10784
|
+
className: `${designTokens.typography.size.sm} ${designTokens.typography.weight.medium} text-gray-600 dark:text-gray-400`,
|
|
10785
|
+
children: title
|
|
10786
|
+
}
|
|
10787
|
+
),
|
|
10223
10788
|
icon && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "text-gray-400 dark:text-gray-600", children: icon })
|
|
10224
10789
|
] }),
|
|
10225
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10790
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10791
|
+
Text$1,
|
|
10792
|
+
{
|
|
10793
|
+
className: `${designTokens.typography.size["3xl"]} ${designTokens.typography.weight.bold} text-gray-900 dark:text-white`,
|
|
10794
|
+
children: value
|
|
10795
|
+
}
|
|
10796
|
+
),
|
|
10226
10797
|
change !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center gap-1 mt-2", children: [
|
|
10227
10798
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10228
10799
|
Text$1,
|
|
10229
10800
|
{
|
|
10230
10801
|
className: cn(
|
|
10231
|
-
|
|
10802
|
+
designTokens.typography.size.sm,
|
|
10803
|
+
designTokens.typography.weight.medium,
|
|
10232
10804
|
isPositive ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"
|
|
10233
10805
|
),
|
|
10234
10806
|
children: [
|
|
@@ -10239,37 +10811,40 @@ const DashboardStatCard = ({
|
|
|
10239
10811
|
]
|
|
10240
10812
|
}
|
|
10241
10813
|
),
|
|
10242
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10814
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10815
|
+
Text$1,
|
|
10816
|
+
{
|
|
10817
|
+
className: `${designTokens.typography.size.xs} text-gray-500 dark:text-gray-400`,
|
|
10818
|
+
children: changePeriod
|
|
10819
|
+
}
|
|
10820
|
+
)
|
|
10243
10821
|
] })
|
|
10244
10822
|
]
|
|
10245
10823
|
}
|
|
10246
10824
|
);
|
|
10247
10825
|
};
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
className
|
|
10257
|
-
}) => {
|
|
10258
|
-
const variantClasses = {
|
|
10826
|
+
let _statColors = null;
|
|
10827
|
+
function getStatColors() {
|
|
10828
|
+
if (!_statColors) _statColors = buildStatColors();
|
|
10829
|
+
return _statColors;
|
|
10830
|
+
}
|
|
10831
|
+
function buildStatColors() {
|
|
10832
|
+
const alert2 = colors.component.alert;
|
|
10833
|
+
return {
|
|
10259
10834
|
primary: {
|
|
10260
|
-
value:
|
|
10835
|
+
value: `${alert2.info.icon}`,
|
|
10261
10836
|
label: "text-blue-600/70 dark:text-blue-400/70"
|
|
10262
10837
|
},
|
|
10263
10838
|
success: {
|
|
10264
|
-
value:
|
|
10839
|
+
value: `${alert2.success.icon}`,
|
|
10265
10840
|
label: "text-green-600/70 dark:text-green-400/70"
|
|
10266
10841
|
},
|
|
10267
10842
|
warning: {
|
|
10268
|
-
value:
|
|
10269
|
-
label: "text-
|
|
10843
|
+
value: `${alert2.warning.icon}`,
|
|
10844
|
+
label: "text-orange-600/70 dark:text-orange-400/70"
|
|
10270
10845
|
},
|
|
10271
10846
|
danger: {
|
|
10272
|
-
value:
|
|
10847
|
+
value: `${alert2.error.icon}`,
|
|
10273
10848
|
label: "text-red-600/70 dark:text-red-400/70"
|
|
10274
10849
|
},
|
|
10275
10850
|
neutral: {
|
|
@@ -10281,11 +10856,35 @@ const StatDisplay = ({
|
|
|
10281
10856
|
label: "text-white/70"
|
|
10282
10857
|
}
|
|
10283
10858
|
};
|
|
10859
|
+
}
|
|
10860
|
+
const StatDisplay = ({
|
|
10861
|
+
value,
|
|
10862
|
+
label,
|
|
10863
|
+
variant = "neutral",
|
|
10864
|
+
size = "md",
|
|
10865
|
+
align = "center",
|
|
10866
|
+
icon,
|
|
10867
|
+
iconPosition = "top",
|
|
10868
|
+
className
|
|
10869
|
+
}) => {
|
|
10870
|
+
const variantClasses = getStatColors();
|
|
10284
10871
|
const sizeClasses = {
|
|
10285
|
-
sm: {
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10872
|
+
sm: {
|
|
10873
|
+
value: designTokens.typography.size.xl,
|
|
10874
|
+
label: designTokens.typography.size.xs
|
|
10875
|
+
},
|
|
10876
|
+
md: {
|
|
10877
|
+
value: designTokens.typography.size["2xl"],
|
|
10878
|
+
label: designTokens.typography.size.sm
|
|
10879
|
+
},
|
|
10880
|
+
lg: {
|
|
10881
|
+
value: designTokens.typography.size["3xl"],
|
|
10882
|
+
label: designTokens.typography.size.base
|
|
10883
|
+
},
|
|
10884
|
+
xl: {
|
|
10885
|
+
value: designTokens.typography.size["4xl"],
|
|
10886
|
+
label: designTokens.typography.size.lg
|
|
10887
|
+
}
|
|
10289
10888
|
};
|
|
10290
10889
|
const alignClasses = {
|
|
10291
10890
|
left: "items-start",
|
|
@@ -10309,7 +10908,11 @@ const StatDisplay = ({
|
|
|
10309
10908
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10310
10909
|
Text$1,
|
|
10311
10910
|
{
|
|
10312
|
-
className: cn(
|
|
10911
|
+
className: cn(
|
|
10912
|
+
designTokens.typography.weight.bold,
|
|
10913
|
+
sizeConfig2.value,
|
|
10914
|
+
variantConfig2.value
|
|
10915
|
+
),
|
|
10313
10916
|
children: value
|
|
10314
10917
|
}
|
|
10315
10918
|
),
|
|
@@ -10321,10 +10924,21 @@ const StatDisplay = ({
|
|
|
10321
10924
|
}
|
|
10322
10925
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: cn(alignClasses[align], className), children: [
|
|
10323
10926
|
icon && iconPosition === "top" && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("mb-2", variantConfig2.value), children: icon }),
|
|
10324
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10927
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10928
|
+
Text$1,
|
|
10929
|
+
{
|
|
10930
|
+
className: cn(
|
|
10931
|
+
designTokens.typography.weight.bold,
|
|
10932
|
+
sizeConfig2.value,
|
|
10933
|
+
variantConfig2.value
|
|
10934
|
+
),
|
|
10935
|
+
children: value
|
|
10936
|
+
}
|
|
10937
|
+
),
|
|
10325
10938
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(sizeConfig2.label, variantConfig2.label), children: label })
|
|
10326
10939
|
] });
|
|
10327
10940
|
};
|
|
10941
|
+
const { typography: typography$1 } = designTokens;
|
|
10328
10942
|
const KeyValuePair = ({
|
|
10329
10943
|
label,
|
|
10330
10944
|
value,
|
|
@@ -10338,9 +10952,13 @@ const KeyValuePair = ({
|
|
|
10338
10952
|
className
|
|
10339
10953
|
}) => {
|
|
10340
10954
|
const sizeClasses = {
|
|
10341
|
-
sm: { label:
|
|
10342
|
-
md: {
|
|
10343
|
-
|
|
10955
|
+
sm: { label: typography$1.size.sm, value: typography$1.size.sm, gap: "gap-1" },
|
|
10956
|
+
md: {
|
|
10957
|
+
label: typography$1.size.base,
|
|
10958
|
+
value: typography$1.size.base,
|
|
10959
|
+
gap: "gap-2"
|
|
10960
|
+
},
|
|
10961
|
+
lg: { label: typography$1.size.lg, value: typography$1.size.lg, gap: "gap-3" }
|
|
10344
10962
|
};
|
|
10345
10963
|
const labelWidthStyles = {
|
|
10346
10964
|
auto: void 0,
|
|
@@ -10356,12 +10974,12 @@ const KeyValuePair = ({
|
|
|
10356
10974
|
const labelVariantClasses = {
|
|
10357
10975
|
default: "text-gray-700 dark:text-gray-300",
|
|
10358
10976
|
muted: "text-gray-600 dark:text-gray-400",
|
|
10359
|
-
strong:
|
|
10977
|
+
strong: `text-gray-900 dark:text-gray-100 ${typography$1.weight.semibold}`
|
|
10360
10978
|
};
|
|
10361
10979
|
const valueVariantClasses = {
|
|
10362
10980
|
default: "text-gray-900 dark:text-gray-100",
|
|
10363
10981
|
muted: "text-gray-600 dark:text-gray-400",
|
|
10364
|
-
strong:
|
|
10982
|
+
strong: `text-gray-900 dark:text-gray-100 ${typography$1.weight.semibold}`,
|
|
10365
10983
|
primary: "text-blue-600 dark:text-blue-400"
|
|
10366
10984
|
};
|
|
10367
10985
|
const sizeConfig2 = sizeClasses[size];
|
|
@@ -10399,6 +11017,7 @@ const KeyValuePair = ({
|
|
|
10399
11017
|
}
|
|
10400
11018
|
);
|
|
10401
11019
|
};
|
|
11020
|
+
const { typography } = designTokens;
|
|
10402
11021
|
const SmartLink = ({
|
|
10403
11022
|
to,
|
|
10404
11023
|
href,
|
|
@@ -10419,9 +11038,9 @@ const SmartLink = ({
|
|
|
10419
11038
|
inherit: "text-inherit"
|
|
10420
11039
|
};
|
|
10421
11040
|
const sizeClasses = {
|
|
10422
|
-
sm:
|
|
10423
|
-
default:
|
|
10424
|
-
lg:
|
|
11041
|
+
sm: typography.size.sm,
|
|
11042
|
+
default: typography.size.base,
|
|
11043
|
+
lg: typography.size.lg
|
|
10425
11044
|
};
|
|
10426
11045
|
const handlePress = async () => {
|
|
10427
11046
|
if (disabled || !destination) return;
|
|
@@ -11103,9 +11722,9 @@ export {
|
|
|
11103
11722
|
VisuallyHidden,
|
|
11104
11723
|
buttonVariants,
|
|
11105
11724
|
cn,
|
|
11106
|
-
colors,
|
|
11725
|
+
colors2 as colors,
|
|
11107
11726
|
createFeature,
|
|
11108
|
-
designTokens,
|
|
11727
|
+
designTokens2 as designTokens,
|
|
11109
11728
|
getButtonVariantClass,
|
|
11110
11729
|
mapSizeToVariantKey,
|
|
11111
11730
|
textVariants2 as textVariants,
|