@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.cjs.js CHANGED
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const clsx = require("clsx");
4
4
  const React = require("react");
5
5
  const reactNative = require("react-native");
6
- const classVarianceAuthority = require("class-variance-authority");
7
6
  const design = require("@sudobility/design");
7
+ const classVarianceAuthority = require("class-variance-authority");
8
8
  const reactNativeSafeAreaContext = require("react-native-safe-area-context");
9
9
  function _interopNamespaceDefault(e) {
10
10
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -1371,34 +1371,42 @@ logger.withContext("API");
1371
1371
  logger.withContext("CONTRACT");
1372
1372
  logger.withContext("ENS");
1373
1373
  logger.withContext("STORAGE");
1374
+ const alert$1 = design.colors.component.alert;
1375
+ function splitAlertClasses$2(base, dark) {
1376
+ const all = `${base} ${dark}`.split(" ");
1377
+ return {
1378
+ container: all.filter((c) => c.includes("bg-") || c.includes("border-")).join(" "),
1379
+ text: all.filter((c) => c.includes("text-")).join(" ")
1380
+ };
1381
+ }
1382
+ const dsInfo$1 = splitAlertClasses$2(alert$1.info.base, alert$1.info.dark);
1383
+ const dsSuccess$1 = splitAlertClasses$2(alert$1.success.base, alert$1.success.dark);
1384
+ const dsWarning$1 = splitAlertClasses$2(alert$1.warning.base, alert$1.warning.dark);
1385
+ const dsError$1 = splitAlertClasses$2(alert$1.error.base, alert$1.error.dark);
1374
1386
  const variantConfig = {
1375
1387
  [InfoType.INFO]: {
1376
1388
  icon: "ℹ",
1377
- container: "bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800",
1378
- iconColor: "text-blue-600 dark:text-blue-400",
1379
- titleColor: "text-blue-900 dark:text-blue-100",
1380
- descriptionColor: "text-blue-700 dark:text-blue-300"
1389
+ container: dsInfo$1.container,
1390
+ iconColor: alert$1.info.icon,
1391
+ textColor: dsInfo$1.text
1381
1392
  },
1382
1393
  [InfoType.SUCCESS]: {
1383
1394
  icon: "✓",
1384
- container: "bg-green-50 dark:bg-green-950 border-green-200 dark:border-green-800",
1385
- iconColor: "text-green-600 dark:text-green-400",
1386
- titleColor: "text-green-900 dark:text-green-100",
1387
- descriptionColor: "text-green-700 dark:text-green-300"
1395
+ container: dsSuccess$1.container,
1396
+ iconColor: alert$1.success.icon,
1397
+ textColor: dsSuccess$1.text
1388
1398
  },
1389
1399
  [InfoType.WARNING]: {
1390
1400
  icon: "⚠",
1391
- container: "bg-yellow-50 dark:bg-amber-950 border-yellow-200 dark:border-amber-800",
1392
- iconColor: "text-yellow-600 dark:text-amber-400",
1393
- titleColor: "text-yellow-900 dark:text-amber-100",
1394
- descriptionColor: "text-yellow-700 dark:text-amber-300"
1401
+ container: dsWarning$1.container,
1402
+ iconColor: alert$1.warning.icon,
1403
+ textColor: dsWarning$1.text
1395
1404
  },
1396
1405
  [InfoType.ERROR]: {
1397
1406
  icon: "✗",
1398
- container: "bg-red-50 dark:bg-red-950 border-red-200 dark:border-red-800",
1399
- iconColor: "text-red-600 dark:text-red-400",
1400
- titleColor: "text-red-900 dark:text-red-100",
1401
- descriptionColor: "text-red-700 dark:text-red-300"
1407
+ container: dsError$1.container,
1408
+ iconColor: alert$1.error.icon,
1409
+ textColor: dsError$1.text
1402
1410
  }
1403
1411
  };
1404
1412
  const Banner = ({
@@ -1495,8 +1503,8 @@ const Banner = ({
1495
1503
  children: [
1496
1504
  /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-shrink-0 mt-0.5", children: icon || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-lg", config.iconColor), children: config.icon }) }),
1497
1505
  /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1 min-w-0", children: [
1498
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("font-semibold", config.titleColor), children: title }),
1499
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-sm mt-1", config.descriptionColor), children: description }) : null
1506
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("font-semibold", config.textColor), children: title }),
1507
+ description ? /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-sm mt-1", config.textColor), children: description }) : null
1500
1508
  ] }),
1501
1509
  /* @__PURE__ */ jsxRuntimeExports.jsx(
1502
1510
  reactNative.Pressable,
@@ -1648,7 +1656,7 @@ const Button = React__namespace.forwardRef(
1648
1656
  }
1649
1657
  );
1650
1658
  Button.displayName = "Button";
1651
- const calloutStyle = "bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800";
1659
+ const calloutStyle = design.getCardVariantColors("info");
1652
1660
  const paddingStyles = {
1653
1661
  none: "",
1654
1662
  sm: "p-3",
@@ -1725,6 +1733,9 @@ const CardFooter = ({
1725
1733
  }) => {
1726
1734
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("flex-row items-center pt-4", className), ...props, children });
1727
1735
  };
1736
+ const inputFocusClass = "border-blue-500 dark:border-blue-400";
1737
+ const inputErrorClass = "border-red-500 dark:border-red-400";
1738
+ const inputDisabledClass = "opacity-50 bg-gray-100 dark:bg-gray-800";
1728
1739
  const Input = React__namespace.forwardRef(
1729
1740
  ({ className, error, disabled, editable, onFocus, onBlur, ...props }, ref) => {
1730
1741
  const [isFocused, setIsFocused] = React__namespace.useState(false);
@@ -1743,9 +1754,9 @@ const Input = React__namespace.forwardRef(
1743
1754
  ref,
1744
1755
  className: cn(
1745
1756
  design.variants.input.default(),
1746
- isFocused && "border-blue-500 dark:border-blue-400",
1747
- error && "border-red-500 dark:border-red-400",
1748
- disabled && "opacity-50 bg-gray-100 dark:bg-gray-800",
1757
+ isFocused && inputFocusClass,
1758
+ error && inputErrorClass,
1759
+ disabled && inputDisabledClass,
1749
1760
  className
1750
1761
  ),
1751
1762
  editable: isEditable,
@@ -1767,15 +1778,11 @@ const sizeMap = {
1767
1778
  extraLarge: "large"
1768
1779
  };
1769
1780
  const colorMap = {
1770
- default: "#2563eb",
1771
- // blue-600
1781
+ default: design.colors.raw.blue[600],
1772
1782
  white: "#ffffff",
1773
- success: "#16a34a",
1774
- // green-600
1775
- warning: "#ea580c",
1776
- // orange-600
1777
- error: "#dc2626"
1778
- // red-600
1783
+ success: design.colors.raw.green[600],
1784
+ warning: design.colors.raw.orange[600],
1785
+ error: design.colors.raw.red[600]
1779
1786
  };
1780
1787
  const Spinner = ({
1781
1788
  size = "default",
@@ -1797,7 +1804,7 @@ const Spinner = ({
1797
1804
  ...props,
1798
1805
  children: [
1799
1806
  /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: activitySize, color }),
1800
- showText && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "mt-2 text-gray-600 dark:text-gray-400 text-sm", children: loadingText })
1807
+ showText && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.body.sm(), "mt-2"), children: loadingText })
1801
1808
  ]
1802
1809
  }
1803
1810
  );
@@ -1809,8 +1816,8 @@ const defaultIcons = {
1809
1816
  attention: "🔔",
1810
1817
  error: "✕"
1811
1818
  };
1812
- const AlertTitle = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("font-medium mb-1", className), children });
1813
- const AlertDescription = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-sm", className), children });
1819
+ const AlertTitle = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.label.default(), "mb-1", className), children });
1820
+ const AlertDescription = ({ children, className }) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.body.sm(), className), children });
1814
1821
  const Alert = ({
1815
1822
  variant = "info",
1816
1823
  title,
@@ -1831,8 +1838,8 @@ const Alert = ({
1831
1838
  children: [
1832
1839
  IconComponent && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-shrink-0", children: IconComponent }),
1833
1840
  /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1", children: [
1834
- title && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "font-medium mb-1", children: title }),
1835
- description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm", children: description }),
1841
+ title && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.label.default(), "mb-1"), children: title }),
1842
+ description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: design.textVariants.body.sm(), children: description }),
1836
1843
  children
1837
1844
  ] })
1838
1845
  ]
@@ -2077,6 +2084,11 @@ const Stack = ({
2077
2084
  };
2078
2085
  const VStack = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "vertical", ...props });
2079
2086
  const HStack = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "horizontal", ...props });
2087
+ const lineVariantClasses = {
2088
+ light: "bg-gray-200 dark:bg-gray-700",
2089
+ medium: "bg-gray-300 dark:bg-gray-600",
2090
+ dark: "bg-gray-400 dark:bg-gray-500"
2091
+ };
2080
2092
  const Divider = ({
2081
2093
  label,
2082
2094
  labelPosition = "center",
@@ -2109,18 +2121,13 @@ const Divider = ({
2109
2121
  medium: 2,
2110
2122
  thick: 4
2111
2123
  };
2112
- const variantClasses = {
2113
- light: "bg-gray-200 dark:bg-gray-700",
2114
- medium: "bg-gray-300 dark:bg-gray-600",
2115
- dark: "bg-gray-400 dark:bg-gray-500"
2116
- };
2117
2124
  if (orientation === "vertical") {
2118
2125
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
2119
2126
  reactNative.View,
2120
2127
  {
2121
2128
  className: cn(
2122
2129
  "self-stretch",
2123
- variantClasses[variant],
2130
+ lineVariantClasses[variant],
2124
2131
  spacingClasses.vertical[spacing],
2125
2132
  className
2126
2133
  ),
@@ -2136,7 +2143,7 @@ const Divider = ({
2136
2143
  {
2137
2144
  className: cn(
2138
2145
  "w-full",
2139
- variantClasses[variant],
2146
+ lineVariantClasses[variant],
2140
2147
  spacingClasses.horizontal[spacing],
2141
2148
  lineClassName,
2142
2149
  className
@@ -2167,24 +2174,15 @@ const Divider = ({
2167
2174
  labelPosition !== "left" && /* @__PURE__ */ jsxRuntimeExports.jsx(
2168
2175
  reactNative.View,
2169
2176
  {
2170
- className: cn("flex-1", variantClasses[variant], lineClassName),
2177
+ className: cn("flex-1", lineVariantClasses[variant], lineClassName),
2171
2178
  style: { height: thicknessValues[thickness] }
2172
2179
  }
2173
2180
  ),
2174
- /* @__PURE__ */ jsxRuntimeExports.jsx(
2175
- reactNative.Text,
2176
- {
2177
- className: cn(
2178
- design.textVariants.body.sm(),
2179
- "px-3 text-gray-500 dark:text-gray-400"
2180
- ),
2181
- children: label
2182
- }
2183
- ),
2181
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.caption.default(), "px-3"), children: label }),
2184
2182
  labelPosition !== "right" && /* @__PURE__ */ jsxRuntimeExports.jsx(
2185
2183
  reactNative.View,
2186
2184
  {
2187
- className: cn("flex-1", variantClasses[variant], lineClassName),
2185
+ className: cn("flex-1", lineVariantClasses[variant], lineClassName),
2188
2186
  style: { height: thicknessValues[thickness] }
2189
2187
  }
2190
2188
  )
@@ -2422,7 +2420,7 @@ const Label = React__namespace.forwardRef(
2422
2420
  ...props,
2423
2421
  children: [
2424
2422
  children,
2425
- required && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-red-500 ml-1", children: "*" })
2423
+ required && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-red-600 dark:text-red-400 ml-1", children: "*" })
2426
2424
  ]
2427
2425
  }
2428
2426
  );
@@ -3351,6 +3349,15 @@ const NumberInput = ({
3351
3349
  }
3352
3350
  );
3353
3351
  };
3352
+ const { typography: typography$2 } = design.designTokens;
3353
+ const colorClasses$1 = {
3354
+ default: "text-gray-900 dark:text-gray-100",
3355
+ muted: "text-gray-600 dark:text-gray-400",
3356
+ primary: "text-blue-600 dark:text-blue-400",
3357
+ success: "text-green-600 dark:text-green-400",
3358
+ warning: "text-yellow-600 dark:text-yellow-400",
3359
+ danger: "text-red-600 dark:text-red-400"
3360
+ };
3354
3361
  const Text = ({
3355
3362
  children,
3356
3363
  size = "base",
@@ -3361,51 +3368,15 @@ const Text = ({
3361
3368
  numberOfLines,
3362
3369
  className
3363
3370
  }) => {
3364
- const sizeClasses = {
3365
- xs: "text-xs",
3366
- sm: "text-sm",
3367
- base: "text-base",
3368
- lg: "text-lg",
3369
- xl: "text-xl",
3370
- "2xl": "text-2xl",
3371
- "3xl": "text-3xl",
3372
- "4xl": "text-4xl"
3373
- };
3374
- const weightClasses = {
3375
- light: "font-light",
3376
- normal: "font-normal",
3377
- medium: "font-medium",
3378
- semibold: "font-semibold",
3379
- bold: "font-bold"
3380
- };
3381
- const colorClasses = {
3382
- default: "text-gray-900 dark:text-gray-100",
3383
- muted: "text-gray-600 dark:text-gray-400",
3384
- primary: "text-blue-600 dark:text-blue-400",
3385
- success: "text-green-600 dark:text-green-400",
3386
- warning: "text-yellow-600 dark:text-yellow-400",
3387
- danger: "text-red-600 dark:text-red-400"
3388
- };
3389
- const alignClasses = align ? {
3390
- left: "text-left",
3391
- center: "text-center",
3392
- right: "text-right"
3393
- }[align] : "";
3394
- const transformClasses = {
3395
- none: "",
3396
- uppercase: "uppercase",
3397
- lowercase: "lowercase",
3398
- capitalize: "capitalize"
3399
- };
3400
3371
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
3401
3372
  reactNative.Text,
3402
3373
  {
3403
3374
  className: cn(
3404
- sizeClasses[size],
3405
- weightClasses[weight],
3406
- colorClasses[color],
3407
- alignClasses,
3408
- transformClasses[transform],
3375
+ typography$2.size[size],
3376
+ typography$2.weight[weight],
3377
+ colorClasses$1[color],
3378
+ align ? typography$2.align[align] : "",
3379
+ transform !== "none" ? typography$2.transform[transform] : "",
3409
3380
  className
3410
3381
  ),
3411
3382
  numberOfLines,
@@ -3413,6 +3384,12 @@ const Text = ({
3413
3384
  }
3414
3385
  );
3415
3386
  };
3387
+ const { typography: typography$1 } = design.designTokens;
3388
+ const colorClasses = {
3389
+ default: "text-gray-900 dark:text-gray-100",
3390
+ muted: "text-gray-700 dark:text-gray-300",
3391
+ primary: "text-blue-600 dark:text-blue-400"
3392
+ };
3416
3393
  const Heading = ({
3417
3394
  children,
3418
3395
  level = 2,
@@ -3431,39 +3408,16 @@ const Heading = ({
3431
3408
  6: "base"
3432
3409
  };
3433
3410
  const actualSize = size || defaultSizes[level];
3434
- const sizeClasses = {
3435
- "4xl": "text-4xl",
3436
- "3xl": "text-3xl",
3437
- "2xl": "text-2xl",
3438
- xl: "text-xl",
3439
- lg: "text-lg",
3440
- base: "text-base"
3441
- };
3442
- const weightClasses = {
3443
- normal: "font-normal",
3444
- medium: "font-medium",
3445
- semibold: "font-semibold",
3446
- bold: "font-bold",
3447
- extrabold: "font-extrabold"
3448
- };
3449
- const colorClasses = {
3450
- default: "text-gray-900 dark:text-gray-100",
3451
- muted: "text-gray-700 dark:text-gray-300",
3452
- primary: "text-blue-600 dark:text-blue-400"
3453
- };
3454
- const alignClasses = align ? {
3455
- left: "text-left",
3456
- center: "text-center",
3457
- right: "text-right"
3458
- }[align] : "";
3459
3411
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
3460
3412
  reactNative.Text,
3461
3413
  {
3462
3414
  className: cn(
3463
- sizeClasses[actualSize],
3464
- weightClasses[weight],
3415
+ typography$1.size[actualSize],
3416
+ typography$1.weight[weight],
3417
+ typography$1.leading.heading,
3418
+ typography$1.tracking.heading,
3465
3419
  colorClasses[color],
3466
- alignClasses,
3420
+ align ? typography$1.align[align] : "",
3467
3421
  className
3468
3422
  ),
3469
3423
  accessibilityRole: "header",
@@ -3567,6 +3521,28 @@ const AppVersion = ({
3567
3521
  }
3568
3522
  );
3569
3523
  };
3524
+ function splitBadgeClasses(base, dark) {
3525
+ const all = `${base} ${dark}`.split(" ");
3526
+ return {
3527
+ bg: all.filter((c) => c.includes("bg-")).join(" "),
3528
+ text: all.filter((c) => c.includes("text-")).join(" ")
3529
+ };
3530
+ }
3531
+ let _badgeColors = null;
3532
+ function getBadgeColors() {
3533
+ if (!_badgeColors) _badgeColors = buildBadgeColors();
3534
+ return _badgeColors;
3535
+ }
3536
+ function buildBadgeColors() {
3537
+ const badge = design.colors.component.badge;
3538
+ return {
3539
+ default: splitBadgeClasses(badge.default.base, badge.default.dark),
3540
+ primary: splitBadgeClasses(badge.primary.base, badge.primary.dark),
3541
+ success: splitBadgeClasses(badge.success.base, badge.success.dark),
3542
+ warning: splitBadgeClasses(badge.warning.base, badge.warning.dark),
3543
+ error: splitBadgeClasses(badge.error.base, badge.error.dark)
3544
+ };
3545
+ }
3570
3546
  const Badge = ({
3571
3547
  children,
3572
3548
  variant = "default",
@@ -3582,29 +3558,30 @@ const Badge = ({
3582
3558
  maxCount,
3583
3559
  className
3584
3560
  }) => {
3561
+ const ds = getBadgeColors();
3585
3562
  const variantClasses = {
3586
- default: "bg-gray-100 dark:bg-gray-700",
3587
- primary: "bg-blue-100 dark:bg-blue-900/30",
3588
- success: "bg-green-100 dark:bg-green-900/30",
3589
- warning: "bg-yellow-100 dark:bg-yellow-900/30",
3590
- danger: "bg-red-100 dark:bg-red-900/30",
3591
- info: "bg-blue-100 dark:bg-blue-900/30",
3563
+ default: ds.default.bg,
3564
+ primary: ds.primary.bg,
3565
+ success: ds.success.bg,
3566
+ warning: ds.warning.bg,
3567
+ danger: ds.error.bg,
3568
+ info: ds.primary.bg,
3592
3569
  purple: "bg-purple-100 dark:bg-purple-900/30"
3593
3570
  };
3594
3571
  const variantTextClasses = {
3595
- default: "text-gray-800 dark:text-gray-300",
3596
- primary: "text-blue-800 dark:text-blue-400",
3597
- success: "text-green-800 dark:text-green-400",
3598
- warning: "text-yellow-800 dark:text-yellow-400",
3599
- danger: "text-red-800 dark:text-red-400",
3600
- info: "text-blue-800 dark:text-blue-400",
3572
+ default: ds.default.text,
3573
+ primary: ds.primary.text,
3574
+ success: ds.success.text,
3575
+ warning: ds.warning.text,
3576
+ danger: ds.error.text,
3577
+ info: ds.primary.text,
3601
3578
  purple: "text-purple-800 dark:text-purple-400"
3602
3579
  };
3603
3580
  const outlineClasses = {
3604
3581
  default: "border border-gray-300 dark:border-gray-600",
3605
3582
  primary: "border border-blue-600 dark:border-blue-400",
3606
3583
  success: "border border-green-600 dark:border-green-400",
3607
- warning: "border border-yellow-600 dark:border-yellow-400",
3584
+ warning: "border border-orange-600 dark:border-orange-400",
3608
3585
  danger: "border border-red-600 dark:border-red-400",
3609
3586
  info: "border border-blue-600 dark:border-blue-400",
3610
3587
  purple: "border border-purple-600 dark:border-purple-400"
@@ -3613,7 +3590,7 @@ const Badge = ({
3613
3590
  default: "text-gray-700 dark:text-gray-300",
3614
3591
  primary: "text-blue-600 dark:text-blue-400",
3615
3592
  success: "text-green-600 dark:text-green-400",
3616
- warning: "text-yellow-600 dark:text-yellow-400",
3593
+ warning: "text-orange-600 dark:text-orange-400",
3617
3594
  danger: "text-red-600 dark:text-red-400",
3618
3595
  info: "text-blue-600 dark:text-blue-400",
3619
3596
  purple: "text-purple-600 dark:text-purple-400"
@@ -3623,16 +3600,11 @@ const Badge = ({
3623
3600
  md: "px-2.5 py-1",
3624
3601
  lg: "px-3 py-1.5"
3625
3602
  };
3626
- const textSizeClasses = {
3627
- sm: "text-xs",
3628
- md: "text-sm",
3629
- lg: "text-base"
3630
- };
3631
3603
  const dotColorClasses = {
3632
3604
  default: "bg-gray-600 dark:bg-gray-400",
3633
3605
  primary: "bg-blue-600 dark:bg-blue-400",
3634
3606
  success: "bg-green-600 dark:bg-green-400",
3635
- warning: "bg-yellow-600 dark:bg-yellow-400",
3607
+ warning: "bg-orange-600 dark:bg-orange-400",
3636
3608
  danger: "bg-red-600 dark:bg-red-400",
3637
3609
  info: "bg-blue-600 dark:bg-blue-400",
3638
3610
  purple: "bg-purple-600 dark:bg-purple-400"
@@ -3645,9 +3617,15 @@ const Badge = ({
3645
3617
  pill ? "rounded-full" : "rounded",
3646
3618
  className
3647
3619
  );
3620
+ const { typography: typography2 } = design.designTokens;
3621
+ const textSizeMap = {
3622
+ sm: typography2.size.xs,
3623
+ md: typography2.size.sm,
3624
+ lg: typography2.size.base
3625
+ };
3648
3626
  const textClasses = cn(
3649
- textSizeClasses[size],
3650
- "font-medium",
3627
+ textSizeMap[size],
3628
+ typography2.weight.medium,
3651
3629
  outline ? outlineTextClasses[variant] : variantTextClasses[variant]
3652
3630
  );
3653
3631
  const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
@@ -4123,6 +4101,19 @@ const FormattedNumber = ({
4123
4101
  };
4124
4102
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(className), children: formatNumber() });
4125
4103
  };
4104
+ const alert = design.colors.component.alert;
4105
+ function splitAlertClasses$1(base, dark) {
4106
+ const all = `${base} ${dark}`.split(" ");
4107
+ return {
4108
+ bg: all.filter((c) => c.includes("bg-")).join(" "),
4109
+ border: all.filter((c) => c.includes("border-")).join(" "),
4110
+ text: all.filter((c) => c.includes("text-")).join(" ")
4111
+ };
4112
+ }
4113
+ const dsInfo = splitAlertClasses$1(alert.info.base, alert.info.dark);
4114
+ const dsSuccess = splitAlertClasses$1(alert.success.base, alert.success.dark);
4115
+ const dsWarning = splitAlertClasses$1(alert.warning.base, alert.warning.dark);
4116
+ const dsError = splitAlertClasses$1(alert.error.base, alert.error.dark);
4126
4117
  const InfoBox = ({
4127
4118
  children,
4128
4119
  title,
@@ -4134,28 +4125,28 @@ const InfoBox = ({
4134
4125
  }) => {
4135
4126
  const variantClasses = {
4136
4127
  info: {
4137
- bg: "bg-blue-50 dark:bg-blue-900/20",
4138
- border: "border-blue-200 dark:border-blue-800",
4139
- title: "text-blue-900 dark:text-blue-300",
4140
- text: "text-blue-800 dark:text-blue-400"
4128
+ bg: dsInfo.bg,
4129
+ border: dsInfo.border,
4130
+ title: dsInfo.text,
4131
+ text: dsInfo.text
4141
4132
  },
4142
4133
  success: {
4143
- bg: "bg-green-50 dark:bg-green-900/20",
4144
- border: "border-green-200 dark:border-green-800",
4145
- title: "text-green-900 dark:text-green-300",
4146
- text: "text-green-800 dark:text-green-400"
4134
+ bg: dsSuccess.bg,
4135
+ border: dsSuccess.border,
4136
+ title: dsSuccess.text,
4137
+ text: dsSuccess.text
4147
4138
  },
4148
4139
  warning: {
4149
- bg: "bg-yellow-50 dark:bg-yellow-900/20",
4150
- border: "border-yellow-200 dark:border-yellow-800",
4151
- title: "text-yellow-900 dark:text-yellow-300",
4152
- text: "text-yellow-800 dark:text-yellow-400"
4140
+ bg: dsWarning.bg,
4141
+ border: dsWarning.border,
4142
+ title: dsWarning.text,
4143
+ text: dsWarning.text
4153
4144
  },
4154
4145
  danger: {
4155
- bg: "bg-red-50 dark:bg-red-900/20",
4156
- border: "border-red-200 dark:border-red-800",
4157
- title: "text-red-900 dark:text-red-300",
4158
- text: "text-red-800 dark:text-red-400"
4146
+ bg: dsError.bg,
4147
+ border: dsError.border,
4148
+ title: dsError.text,
4149
+ text: dsError.text
4159
4150
  },
4160
4151
  neutral: {
4161
4152
  bg: "bg-gray-50 dark:bg-gray-800",
@@ -4220,7 +4211,7 @@ const Progress = ({
4220
4211
  }
4221
4212
  }, [indeterminate, animatedValue]);
4222
4213
  const percentage = Math.min(Math.max(value / max * 100, 0), 100);
4223
- const colorClasses = {
4214
+ const colorClasses2 = {
4224
4215
  default: "bg-blue-600 dark:bg-blue-500",
4225
4216
  success: "bg-green-600 dark:bg-green-500",
4226
4217
  warning: "bg-yellow-600 dark:bg-yellow-500",
@@ -4252,13 +4243,13 @@ const Progress = ({
4252
4243
  children: indeterminate ? /* @__PURE__ */ jsxRuntimeExports.jsx(
4253
4244
  reactNative.Animated.View,
4254
4245
  {
4255
- className: cn("h-full rounded-full", colorClasses[variant]),
4246
+ className: cn("h-full rounded-full", colorClasses2[variant]),
4256
4247
  style: { width: interpolatedWidth, opacity: 0.7 }
4257
4248
  }
4258
4249
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
4259
4250
  reactNative.View,
4260
4251
  {
4261
- className: cn("h-full rounded-full", colorClasses[variant]),
4252
+ className: cn("h-full rounded-full", colorClasses2[variant]),
4262
4253
  style: { width: `${percentage}%` }
4263
4254
  }
4264
4255
  )
@@ -4422,6 +4413,26 @@ const ModalFooter = ({
4422
4413
  children
4423
4414
  }
4424
4415
  );
4416
+ function splitAlertClasses(base, dark) {
4417
+ const all = `${base} ${dark}`.split(" ");
4418
+ return {
4419
+ container: all.filter((c) => c.includes("bg-") || c.includes("border-")).join(" "),
4420
+ icon: all.filter((c) => c.includes("text-")).join(" ")
4421
+ };
4422
+ }
4423
+ let _alertColors = null;
4424
+ function getAlertColors() {
4425
+ if (!_alertColors) {
4426
+ const alert2 = design.colors.component.alert;
4427
+ _alertColors = {
4428
+ success: splitAlertClasses(alert2.success.base, alert2.success.dark),
4429
+ error: splitAlertClasses(alert2.error.base, alert2.error.dark),
4430
+ warning: splitAlertClasses(alert2.warning.base, alert2.warning.dark),
4431
+ info: splitAlertClasses(alert2.info.base, alert2.info.dark)
4432
+ };
4433
+ }
4434
+ return _alertColors;
4435
+ }
4425
4436
  const ToastContext = React.createContext(void 0);
4426
4437
  const useToast = () => {
4427
4438
  const context = React.useContext(ToastContext);
@@ -4440,19 +4451,21 @@ const Toast = ({ toast, onRemove }) => {
4440
4451
  friction: 8
4441
4452
  }).start();
4442
4453
  }, [slideAnim]);
4454
+ const ac = getAlertColors();
4443
4455
  const variantBgClasses = {
4444
4456
  default: "bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",
4445
- success: "bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",
4446
- error: "bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",
4447
- warning: "bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",
4448
- info: "bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"
4457
+ success: ac.success.container,
4458
+ error: ac.error.container,
4459
+ warning: ac.warning.container,
4460
+ info: ac.info.container
4449
4461
  };
4462
+ const alert2 = design.colors.component.alert;
4450
4463
  const iconColorClasses = {
4451
4464
  default: "text-gray-600 dark:text-gray-400",
4452
- success: "text-green-600 dark:text-green-400",
4453
- error: "text-red-600 dark:text-red-400",
4454
- warning: "text-yellow-600 dark:text-yellow-400",
4455
- info: "text-blue-600 dark:text-blue-400"
4465
+ success: alert2.success.icon,
4466
+ error: alert2.error.icon,
4467
+ warning: alert2.warning.icon,
4468
+ info: alert2.info.icon
4456
4469
  };
4457
4470
  const icons = {
4458
4471
  default: "ℹ",
@@ -4473,8 +4486,17 @@ const Toast = ({ toast, onRemove }) => {
4473
4486
  children: [
4474
4487
  /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("flex-shrink-0", iconColorClasses[variant]), children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-lg", children: icons[variant] }) }),
4475
4488
  /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1 min-w-0", children: [
4476
- title && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "font-semibold text-gray-900 dark:text-white", children: title }),
4477
- description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm text-gray-600 dark:text-gray-300 mt-1", children: description }),
4489
+ title && /* @__PURE__ */ jsxRuntimeExports.jsx(
4490
+ reactNative.Text,
4491
+ {
4492
+ className: cn(
4493
+ design.textVariants.label.default(),
4494
+ "text-gray-900 dark:text-white"
4495
+ ),
4496
+ children: title
4497
+ }
4498
+ ),
4499
+ description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(design.textVariants.body.sm(), "mt-1"), children: description }),
4478
4500
  action && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Pressable, { onPress: action.onPress, className: "mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm font-medium text-blue-600 dark:text-blue-400", children: action.label }) })
4479
4501
  ] }),
4480
4502
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -5946,6 +5968,7 @@ const AspectFitView = ({
5946
5968
  }
5947
5969
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("flex-1", className), onLayout, children: size && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("items-center", innerClassName), children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ScrollView, { style: { width: innerWidth, height: innerHeight }, children }) }) });
5948
5970
  };
5971
+ const { typography } = design.designTokens;
5949
5972
  const QuickActions = ({
5950
5973
  actions,
5951
5974
  orientation = "horizontal",
@@ -5959,23 +5982,23 @@ const QuickActions = ({
5959
5982
  text: "text-gray-900 dark:text-white"
5960
5983
  },
5961
5984
  primary: {
5962
- bg: "bg-blue-500 border-blue-500",
5963
- bgActive: "active:bg-blue-600",
5985
+ bg: "bg-blue-600 border-blue-600",
5986
+ bgActive: "active:bg-blue-800",
5964
5987
  text: "text-white"
5965
5988
  },
5966
5989
  success: {
5967
- bg: "bg-green-500 border-green-500",
5968
- bgActive: "active:bg-green-600",
5990
+ bg: "bg-green-600 border-green-600",
5991
+ bgActive: "active:bg-green-800",
5969
5992
  text: "text-white"
5970
5993
  },
5971
5994
  warning: {
5972
- bg: "bg-yellow-500 border-yellow-500",
5973
- bgActive: "active:bg-yellow-600",
5995
+ bg: "bg-orange-600 border-orange-600",
5996
+ bgActive: "active:bg-orange-800",
5974
5997
  text: "text-white"
5975
5998
  },
5976
5999
  danger: {
5977
- bg: "bg-red-500 border-red-500",
5978
- bgActive: "active:bg-red-600",
6000
+ bg: "bg-red-600 border-red-600",
6001
+ bgActive: "active:bg-red-800",
5979
6002
  text: "text-white"
5980
6003
  }
5981
6004
  };
@@ -6009,7 +6032,7 @@ const QuickActions = ({
6009
6032
  accessibilityState: { disabled: action.disabled },
6010
6033
  children: [
6011
6034
  action.icon && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "w-5 h-5", children: action.icon }),
6012
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("font-medium", styles2.text), children: action.label })
6035
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn(typography.weight.medium, styles2.text), children: action.label })
6013
6036
  ]
6014
6037
  },
6015
6038
  action.id
@@ -6496,15 +6519,15 @@ const ProgressCircle = ({
6496
6519
  label,
6497
6520
  variant = "primary",
6498
6521
  color,
6499
- trackColor = "#e5e7eb",
6522
+ trackColor = design.colors.raw.neutral[200],
6500
6523
  className
6501
6524
  }) => {
6502
6525
  const progress = Math.min(100, Math.max(0, value));
6503
6526
  const variantColors = {
6504
- primary: "#2563eb",
6505
- success: "#16a34a",
6506
- warning: "#ca8a04",
6507
- danger: "#dc2626"
6527
+ primary: design.colors.raw.blue[600],
6528
+ success: design.colors.raw.green[600],
6529
+ warning: design.colors.raw.amber[600],
6530
+ danger: design.colors.raw.red[600]
6508
6531
  };
6509
6532
  const progressColor = color || variantColors[variant];
6510
6533
  const innerSize = size - strokeWidth * 2;
@@ -9754,7 +9777,7 @@ const FeatureCard = ({
9754
9777
  borderColor = false,
9755
9778
  className
9756
9779
  }) => {
9757
- const colorClasses = {
9780
+ const colorClasses2 = {
9758
9781
  blue: "text-blue-600 dark:text-blue-400",
9759
9782
  green: "text-green-600 dark:text-green-400",
9760
9783
  purple: "text-purple-600 dark:text-purple-400",
@@ -9810,9 +9833,9 @@ const FeatureCard = ({
9810
9833
  "w-12 h-12 rounded-lg items-center justify-center mb-4",
9811
9834
  iconBackgroundClasses[color]
9812
9835
  ),
9813
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: colorClasses[color], children: icon })
9836
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: colorClasses2[color], children: icon })
9814
9837
  }
9815
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("mb-4", colorClasses[color]), children: icon }),
9838
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("mb-4", colorClasses2[color]), children: icon }),
9816
9839
  /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xl font-semibold text-gray-900 dark:text-white mb-3", children: title }),
9817
9840
  /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: description }),
9818
9841
  cta && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "mt-3 mb-4", children: cta }),
@@ -9833,7 +9856,7 @@ const FeatureCard = ({
9833
9856
  {
9834
9857
  className: "flex-1 min-w-[80px] items-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",
9835
9858
  children: [
9836
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-lg font-bold", colorClasses[color]), children: value }),
9859
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: cn("text-lg font-bold", colorClasses2[color]), children: value }),
9837
9860
  /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: key })
9838
9861
  ]
9839
9862
  },