@sudobility/components-rn 1.0.41 → 1.0.42

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.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 } 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: "bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800",
1361
- iconColor: "text-blue-600 dark:text-blue-400",
1362
- titleColor: "text-blue-900 dark:text-blue-100",
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: "bg-green-50 dark:bg-green-950 border-green-200 dark:border-green-800",
1368
- iconColor: "text-green-600 dark:text-green-400",
1369
- titleColor: "text-green-900 dark:text-green-100",
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: "bg-yellow-50 dark:bg-amber-950 border-yellow-200 dark:border-amber-800",
1375
- iconColor: "text-yellow-600 dark:text-amber-400",
1376
- titleColor: "text-yellow-900 dark:text-amber-100",
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: "bg-red-50 dark:bg-red-950 border-red-200 dark:border-red-800",
1382
- iconColor: "text-red-600 dark:text-red-400",
1383
- titleColor: "text-red-900 dark:text-red-100",
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.titleColor), children: title }),
1482
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("text-sm mt-1", config.descriptionColor), children: description }) : null
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 = "bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800";
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 && "border-blue-500 dark:border-blue-400",
1730
- error && "border-red-500 dark:border-red-400",
1731
- disabled && "opacity-50 bg-gray-100 dark:bg-gray-800",
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: "#2563eb",
1754
- // blue-600
1764
+ default: colors.raw.blue[600],
1755
1765
  white: "#ffffff",
1756
- success: "#16a34a",
1757
- // green-600
1758
- warning: "#ea580c",
1759
- // orange-600
1760
- error: "#dc2626"
1761
- // red-600
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 text-gray-600 dark:text-gray-400 text-sm", children: loadingText })
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("font-medium mb-1", className), children });
1796
- const AlertDescription = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("text-sm", className), children });
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: "font-medium mb-1", children: title }),
1818
- description && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-sm", children: description }),
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
- variantClasses[variant],
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
- variantClasses[variant],
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", variantClasses[variant], lineClassName),
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", variantClasses[variant], lineClassName),
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-500 ml-1", children: "*" })
2406
+ required && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-red-600 dark:text-red-400 ml-1", children: "*" })
2409
2407
  ]
2410
2408
  }
2411
2409
  );
@@ -3334,6 +3332,15 @@ const NumberInput = ({
3334
3332
  }
3335
3333
  );
3336
3334
  };
3335
+ const { typography: typography$2 } = designTokens;
3336
+ const colorClasses$1 = {
3337
+ default: "text-gray-900 dark:text-gray-100",
3338
+ muted: "text-gray-600 dark:text-gray-400",
3339
+ primary: "text-blue-600 dark:text-blue-400",
3340
+ success: "text-green-600 dark:text-green-400",
3341
+ warning: "text-yellow-600 dark:text-yellow-400",
3342
+ danger: "text-red-600 dark:text-red-400"
3343
+ };
3337
3344
  const Text = ({
3338
3345
  children,
3339
3346
  size = "base",
@@ -3344,51 +3351,15 @@ const Text = ({
3344
3351
  numberOfLines,
3345
3352
  className
3346
3353
  }) => {
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
3354
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
3384
3355
  Text$1,
3385
3356
  {
3386
3357
  className: cn(
3387
- sizeClasses[size],
3388
- weightClasses[weight],
3389
- colorClasses[color],
3390
- alignClasses,
3391
- transformClasses[transform],
3358
+ typography$2.size[size],
3359
+ typography$2.weight[weight],
3360
+ colorClasses$1[color],
3361
+ align ? typography$2.align[align] : "",
3362
+ transform !== "none" ? typography$2.transform[transform] : "",
3392
3363
  className
3393
3364
  ),
3394
3365
  numberOfLines,
@@ -3396,6 +3367,12 @@ const Text = ({
3396
3367
  }
3397
3368
  );
3398
3369
  };
3370
+ const { typography: typography$1 } = designTokens;
3371
+ const colorClasses = {
3372
+ default: "text-gray-900 dark:text-gray-100",
3373
+ muted: "text-gray-700 dark:text-gray-300",
3374
+ primary: "text-blue-600 dark:text-blue-400"
3375
+ };
3399
3376
  const Heading = ({
3400
3377
  children,
3401
3378
  level = 2,
@@ -3414,39 +3391,16 @@ const Heading = ({
3414
3391
  6: "base"
3415
3392
  };
3416
3393
  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
3394
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
3443
3395
  Text$1,
3444
3396
  {
3445
3397
  className: cn(
3446
- sizeClasses[actualSize],
3447
- weightClasses[weight],
3398
+ typography$1.size[actualSize],
3399
+ typography$1.weight[weight],
3400
+ typography$1.leading.heading,
3401
+ typography$1.tracking.heading,
3448
3402
  colorClasses[color],
3449
- alignClasses,
3403
+ align ? typography$1.align[align] : "",
3450
3404
  className
3451
3405
  ),
3452
3406
  accessibilityRole: "header",
@@ -3550,6 +3504,28 @@ const AppVersion = ({
3550
3504
  }
3551
3505
  );
3552
3506
  };
3507
+ function splitBadgeClasses(base, dark) {
3508
+ const all = `${base} ${dark}`.split(" ");
3509
+ return {
3510
+ bg: all.filter((c) => c.includes("bg-")).join(" "),
3511
+ text: all.filter((c) => c.includes("text-")).join(" ")
3512
+ };
3513
+ }
3514
+ let _badgeColors = null;
3515
+ function getBadgeColors() {
3516
+ if (!_badgeColors) _badgeColors = buildBadgeColors();
3517
+ return _badgeColors;
3518
+ }
3519
+ function buildBadgeColors() {
3520
+ const badge = colors.component.badge;
3521
+ return {
3522
+ default: splitBadgeClasses(badge.default.base, badge.default.dark),
3523
+ primary: splitBadgeClasses(badge.primary.base, badge.primary.dark),
3524
+ success: splitBadgeClasses(badge.success.base, badge.success.dark),
3525
+ warning: splitBadgeClasses(badge.warning.base, badge.warning.dark),
3526
+ error: splitBadgeClasses(badge.error.base, badge.error.dark)
3527
+ };
3528
+ }
3553
3529
  const Badge = ({
3554
3530
  children,
3555
3531
  variant = "default",
@@ -3565,29 +3541,30 @@ const Badge = ({
3565
3541
  maxCount,
3566
3542
  className
3567
3543
  }) => {
3544
+ const ds = getBadgeColors();
3568
3545
  const variantClasses = {
3569
- default: "bg-gray-100 dark:bg-gray-700",
3570
- primary: "bg-blue-100 dark:bg-blue-900/30",
3571
- success: "bg-green-100 dark:bg-green-900/30",
3572
- warning: "bg-yellow-100 dark:bg-yellow-900/30",
3573
- danger: "bg-red-100 dark:bg-red-900/30",
3574
- info: "bg-blue-100 dark:bg-blue-900/30",
3546
+ default: ds.default.bg,
3547
+ primary: ds.primary.bg,
3548
+ success: ds.success.bg,
3549
+ warning: ds.warning.bg,
3550
+ danger: ds.error.bg,
3551
+ info: ds.primary.bg,
3575
3552
  purple: "bg-purple-100 dark:bg-purple-900/30"
3576
3553
  };
3577
3554
  const variantTextClasses = {
3578
- default: "text-gray-800 dark:text-gray-300",
3579
- primary: "text-blue-800 dark:text-blue-400",
3580
- success: "text-green-800 dark:text-green-400",
3581
- warning: "text-yellow-800 dark:text-yellow-400",
3582
- danger: "text-red-800 dark:text-red-400",
3583
- info: "text-blue-800 dark:text-blue-400",
3555
+ default: ds.default.text,
3556
+ primary: ds.primary.text,
3557
+ success: ds.success.text,
3558
+ warning: ds.warning.text,
3559
+ danger: ds.error.text,
3560
+ info: ds.primary.text,
3584
3561
  purple: "text-purple-800 dark:text-purple-400"
3585
3562
  };
3586
3563
  const outlineClasses = {
3587
3564
  default: "border border-gray-300 dark:border-gray-600",
3588
3565
  primary: "border border-blue-600 dark:border-blue-400",
3589
3566
  success: "border border-green-600 dark:border-green-400",
3590
- warning: "border border-yellow-600 dark:border-yellow-400",
3567
+ warning: "border border-orange-600 dark:border-orange-400",
3591
3568
  danger: "border border-red-600 dark:border-red-400",
3592
3569
  info: "border border-blue-600 dark:border-blue-400",
3593
3570
  purple: "border border-purple-600 dark:border-purple-400"
@@ -3596,7 +3573,7 @@ const Badge = ({
3596
3573
  default: "text-gray-700 dark:text-gray-300",
3597
3574
  primary: "text-blue-600 dark:text-blue-400",
3598
3575
  success: "text-green-600 dark:text-green-400",
3599
- warning: "text-yellow-600 dark:text-yellow-400",
3576
+ warning: "text-orange-600 dark:text-orange-400",
3600
3577
  danger: "text-red-600 dark:text-red-400",
3601
3578
  info: "text-blue-600 dark:text-blue-400",
3602
3579
  purple: "text-purple-600 dark:text-purple-400"
@@ -3606,16 +3583,11 @@ const Badge = ({
3606
3583
  md: "px-2.5 py-1",
3607
3584
  lg: "px-3 py-1.5"
3608
3585
  };
3609
- const textSizeClasses = {
3610
- sm: "text-xs",
3611
- md: "text-sm",
3612
- lg: "text-base"
3613
- };
3614
3586
  const dotColorClasses = {
3615
3587
  default: "bg-gray-600 dark:bg-gray-400",
3616
3588
  primary: "bg-blue-600 dark:bg-blue-400",
3617
3589
  success: "bg-green-600 dark:bg-green-400",
3618
- warning: "bg-yellow-600 dark:bg-yellow-400",
3590
+ warning: "bg-orange-600 dark:bg-orange-400",
3619
3591
  danger: "bg-red-600 dark:bg-red-400",
3620
3592
  info: "bg-blue-600 dark:bg-blue-400",
3621
3593
  purple: "bg-purple-600 dark:bg-purple-400"
@@ -3628,9 +3600,15 @@ const Badge = ({
3628
3600
  pill ? "rounded-full" : "rounded",
3629
3601
  className
3630
3602
  );
3603
+ const { typography: typography2 } = designTokens;
3604
+ const textSizeMap = {
3605
+ sm: typography2.size.xs,
3606
+ md: typography2.size.sm,
3607
+ lg: typography2.size.base
3608
+ };
3631
3609
  const textClasses = cn(
3632
- textSizeClasses[size],
3633
- "font-medium",
3610
+ textSizeMap[size],
3611
+ typography2.weight.medium,
3634
3612
  outline ? outlineTextClasses[variant] : variantTextClasses[variant]
3635
3613
  );
3636
3614
  const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
@@ -4106,6 +4084,19 @@ const FormattedNumber = ({
4106
4084
  };
4107
4085
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(className), children: formatNumber() });
4108
4086
  };
4087
+ const alert = colors.component.alert;
4088
+ function splitAlertClasses$1(base, dark) {
4089
+ const all = `${base} ${dark}`.split(" ");
4090
+ return {
4091
+ bg: all.filter((c) => c.includes("bg-")).join(" "),
4092
+ border: all.filter((c) => c.includes("border-")).join(" "),
4093
+ text: all.filter((c) => c.includes("text-")).join(" ")
4094
+ };
4095
+ }
4096
+ const dsInfo = splitAlertClasses$1(alert.info.base, alert.info.dark);
4097
+ const dsSuccess = splitAlertClasses$1(alert.success.base, alert.success.dark);
4098
+ const dsWarning = splitAlertClasses$1(alert.warning.base, alert.warning.dark);
4099
+ const dsError = splitAlertClasses$1(alert.error.base, alert.error.dark);
4109
4100
  const InfoBox = ({
4110
4101
  children,
4111
4102
  title,
@@ -4117,28 +4108,28 @@ const InfoBox = ({
4117
4108
  }) => {
4118
4109
  const variantClasses = {
4119
4110
  info: {
4120
- bg: "bg-blue-50 dark:bg-blue-900/20",
4121
- border: "border-blue-200 dark:border-blue-800",
4122
- title: "text-blue-900 dark:text-blue-300",
4123
- text: "text-blue-800 dark:text-blue-400"
4111
+ bg: dsInfo.bg,
4112
+ border: dsInfo.border,
4113
+ title: dsInfo.text,
4114
+ text: dsInfo.text
4124
4115
  },
4125
4116
  success: {
4126
- bg: "bg-green-50 dark:bg-green-900/20",
4127
- border: "border-green-200 dark:border-green-800",
4128
- title: "text-green-900 dark:text-green-300",
4129
- text: "text-green-800 dark:text-green-400"
4117
+ bg: dsSuccess.bg,
4118
+ border: dsSuccess.border,
4119
+ title: dsSuccess.text,
4120
+ text: dsSuccess.text
4130
4121
  },
4131
4122
  warning: {
4132
- bg: "bg-yellow-50 dark:bg-yellow-900/20",
4133
- border: "border-yellow-200 dark:border-yellow-800",
4134
- title: "text-yellow-900 dark:text-yellow-300",
4135
- text: "text-yellow-800 dark:text-yellow-400"
4123
+ bg: dsWarning.bg,
4124
+ border: dsWarning.border,
4125
+ title: dsWarning.text,
4126
+ text: dsWarning.text
4136
4127
  },
4137
4128
  danger: {
4138
- bg: "bg-red-50 dark:bg-red-900/20",
4139
- border: "border-red-200 dark:border-red-800",
4140
- title: "text-red-900 dark:text-red-300",
4141
- text: "text-red-800 dark:text-red-400"
4129
+ bg: dsError.bg,
4130
+ border: dsError.border,
4131
+ title: dsError.text,
4132
+ text: dsError.text
4142
4133
  },
4143
4134
  neutral: {
4144
4135
  bg: "bg-gray-50 dark:bg-gray-800",
@@ -4203,7 +4194,7 @@ const Progress = ({
4203
4194
  }
4204
4195
  }, [indeterminate, animatedValue]);
4205
4196
  const percentage = Math.min(Math.max(value / max * 100, 0), 100);
4206
- const colorClasses = {
4197
+ const colorClasses2 = {
4207
4198
  default: "bg-blue-600 dark:bg-blue-500",
4208
4199
  success: "bg-green-600 dark:bg-green-500",
4209
4200
  warning: "bg-yellow-600 dark:bg-yellow-500",
@@ -4235,13 +4226,13 @@ const Progress = ({
4235
4226
  children: indeterminate ? /* @__PURE__ */ jsxRuntimeExports.jsx(
4236
4227
  Animated.View,
4237
4228
  {
4238
- className: cn("h-full rounded-full", colorClasses[variant]),
4229
+ className: cn("h-full rounded-full", colorClasses2[variant]),
4239
4230
  style: { width: interpolatedWidth, opacity: 0.7 }
4240
4231
  }
4241
4232
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
4242
4233
  View,
4243
4234
  {
4244
- className: cn("h-full rounded-full", colorClasses[variant]),
4235
+ className: cn("h-full rounded-full", colorClasses2[variant]),
4245
4236
  style: { width: `${percentage}%` }
4246
4237
  }
4247
4238
  )
@@ -4405,6 +4396,26 @@ const ModalFooter = ({
4405
4396
  children
4406
4397
  }
4407
4398
  );
4399
+ function splitAlertClasses(base, dark) {
4400
+ const all = `${base} ${dark}`.split(" ");
4401
+ return {
4402
+ container: all.filter((c) => c.includes("bg-") || c.includes("border-")).join(" "),
4403
+ icon: all.filter((c) => c.includes("text-")).join(" ")
4404
+ };
4405
+ }
4406
+ let _alertColors = null;
4407
+ function getAlertColors() {
4408
+ if (!_alertColors) {
4409
+ const alert2 = colors.component.alert;
4410
+ _alertColors = {
4411
+ success: splitAlertClasses(alert2.success.base, alert2.success.dark),
4412
+ error: splitAlertClasses(alert2.error.base, alert2.error.dark),
4413
+ warning: splitAlertClasses(alert2.warning.base, alert2.warning.dark),
4414
+ info: splitAlertClasses(alert2.info.base, alert2.info.dark)
4415
+ };
4416
+ }
4417
+ return _alertColors;
4418
+ }
4408
4419
  const ToastContext = createContext(void 0);
4409
4420
  const useToast = () => {
4410
4421
  const context = useContext(ToastContext);
@@ -4423,19 +4434,21 @@ const Toast = ({ toast, onRemove }) => {
4423
4434
  friction: 8
4424
4435
  }).start();
4425
4436
  }, [slideAnim]);
4437
+ const ac = getAlertColors();
4426
4438
  const variantBgClasses = {
4427
4439
  default: "bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",
4428
- success: "bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",
4429
- error: "bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",
4430
- warning: "bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",
4431
- info: "bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"
4440
+ success: ac.success.container,
4441
+ error: ac.error.container,
4442
+ warning: ac.warning.container,
4443
+ info: ac.info.container
4432
4444
  };
4445
+ const alert2 = colors.component.alert;
4433
4446
  const iconColorClasses = {
4434
4447
  default: "text-gray-600 dark:text-gray-400",
4435
- success: "text-green-600 dark:text-green-400",
4436
- error: "text-red-600 dark:text-red-400",
4437
- warning: "text-yellow-600 dark:text-yellow-400",
4438
- info: "text-blue-600 dark:text-blue-400"
4448
+ success: alert2.success.icon,
4449
+ error: alert2.error.icon,
4450
+ warning: alert2.warning.icon,
4451
+ info: alert2.info.icon
4439
4452
  };
4440
4453
  const icons = {
4441
4454
  default: "ℹ",
@@ -4456,8 +4469,17 @@ const Toast = ({ toast, onRemove }) => {
4456
4469
  children: [
4457
4470
  /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("flex-shrink-0", iconColorClasses[variant]), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-lg", children: icons[variant] }) }),
4458
4471
  /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-1 min-w-0", children: [
4459
- title && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "font-semibold text-gray-900 dark:text-white", children: title }),
4460
- description && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-sm text-gray-600 dark:text-gray-300 mt-1", children: description }),
4472
+ title && /* @__PURE__ */ jsxRuntimeExports.jsx(
4473
+ Text$1,
4474
+ {
4475
+ className: cn(
4476
+ textVariants.label.default(),
4477
+ "text-gray-900 dark:text-white"
4478
+ ),
4479
+ children: title
4480
+ }
4481
+ ),
4482
+ description && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(textVariants.body.sm(), "mt-1"), children: description }),
4461
4483
  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
4484
  ] }),
4463
4485
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -5929,6 +5951,7 @@ const AspectFitView = ({
5929
5951
  }
5930
5952
  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
5953
  };
5954
+ const { typography } = designTokens;
5932
5955
  const QuickActions = ({
5933
5956
  actions,
5934
5957
  orientation = "horizontal",
@@ -5942,23 +5965,23 @@ const QuickActions = ({
5942
5965
  text: "text-gray-900 dark:text-white"
5943
5966
  },
5944
5967
  primary: {
5945
- bg: "bg-blue-500 border-blue-500",
5946
- bgActive: "active:bg-blue-600",
5968
+ bg: "bg-blue-600 border-blue-600",
5969
+ bgActive: "active:bg-blue-800",
5947
5970
  text: "text-white"
5948
5971
  },
5949
5972
  success: {
5950
- bg: "bg-green-500 border-green-500",
5951
- bgActive: "active:bg-green-600",
5973
+ bg: "bg-green-600 border-green-600",
5974
+ bgActive: "active:bg-green-800",
5952
5975
  text: "text-white"
5953
5976
  },
5954
5977
  warning: {
5955
- bg: "bg-yellow-500 border-yellow-500",
5956
- bgActive: "active:bg-yellow-600",
5978
+ bg: "bg-orange-600 border-orange-600",
5979
+ bgActive: "active:bg-orange-800",
5957
5980
  text: "text-white"
5958
5981
  },
5959
5982
  danger: {
5960
- bg: "bg-red-500 border-red-500",
5961
- bgActive: "active:bg-red-600",
5983
+ bg: "bg-red-600 border-red-600",
5984
+ bgActive: "active:bg-red-800",
5962
5985
  text: "text-white"
5963
5986
  }
5964
5987
  };
@@ -5992,7 +6015,7 @@ const QuickActions = ({
5992
6015
  accessibilityState: { disabled: action.disabled },
5993
6016
  children: [
5994
6017
  action.icon && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "w-5 h-5", children: action.icon }),
5995
- /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("font-medium", styles2.text), children: action.label })
6018
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn(typography.weight.medium, styles2.text), children: action.label })
5996
6019
  ]
5997
6020
  },
5998
6021
  action.id
@@ -6479,15 +6502,15 @@ const ProgressCircle = ({
6479
6502
  label,
6480
6503
  variant = "primary",
6481
6504
  color,
6482
- trackColor = "#e5e7eb",
6505
+ trackColor = colors.raw.neutral[200],
6483
6506
  className
6484
6507
  }) => {
6485
6508
  const progress = Math.min(100, Math.max(0, value));
6486
6509
  const variantColors = {
6487
- primary: "#2563eb",
6488
- success: "#16a34a",
6489
- warning: "#ca8a04",
6490
- danger: "#dc2626"
6510
+ primary: colors.raw.blue[600],
6511
+ success: colors.raw.green[600],
6512
+ warning: colors.raw.amber[600],
6513
+ danger: colors.raw.red[600]
6491
6514
  };
6492
6515
  const progressColor = color || variantColors[variant];
6493
6516
  const innerSize = size - strokeWidth * 2;
@@ -9737,7 +9760,7 @@ const FeatureCard = ({
9737
9760
  borderColor = false,
9738
9761
  className
9739
9762
  }) => {
9740
- const colorClasses = {
9763
+ const colorClasses2 = {
9741
9764
  blue: "text-blue-600 dark:text-blue-400",
9742
9765
  green: "text-green-600 dark:text-green-400",
9743
9766
  purple: "text-purple-600 dark:text-purple-400",
@@ -9793,9 +9816,9 @@ const FeatureCard = ({
9793
9816
  "w-12 h-12 rounded-lg items-center justify-center mb-4",
9794
9817
  iconBackgroundClasses[color]
9795
9818
  ),
9796
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: colorClasses[color], children: icon })
9819
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: colorClasses2[color], children: icon })
9797
9820
  }
9798
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("mb-4", colorClasses[color]), children: icon }),
9821
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("mb-4", colorClasses2[color]), children: icon }),
9799
9822
  /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-xl font-semibold text-gray-900 dark:text-white mb-3", children: title }),
9800
9823
  /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: description }),
9801
9824
  cta && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "mt-3 mb-4", children: cta }),
@@ -9816,7 +9839,7 @@ const FeatureCard = ({
9816
9839
  {
9817
9840
  className: "flex-1 min-w-[80px] items-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",
9818
9841
  children: [
9819
- /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("text-lg font-bold", colorClasses[color]), children: value }),
9842
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: cn("text-lg font-bold", colorClasses2[color]), children: value }),
9820
9843
  /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: key })
9821
9844
  ]
9822
9845
  },
@@ -11103,9 +11126,9 @@ export {
11103
11126
  VisuallyHidden,
11104
11127
  buttonVariants,
11105
11128
  cn,
11106
- colors,
11129
+ colors2 as colors,
11107
11130
  createFeature,
11108
- designTokens,
11131
+ designTokens2 as designTokens,
11109
11132
  getButtonVariantClass,
11110
11133
  mapSizeToVariantKey,
11111
11134
  textVariants2 as textVariants,