@titan-design/react-ui 0.0.2 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/dist/{chunk-NA3EES23.mjs → chunk-MGW37MPO.mjs} +26 -4
  2. package/dist/chunk-MGW37MPO.mjs.map +1 -0
  3. package/dist/index.d.mts +115 -2
  4. package/dist/index.d.ts +115 -2
  5. package/dist/index.js +262 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +225 -3
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/theme/index.d.mts +124 -109
  10. package/dist/theme/index.d.ts +124 -109
  11. package/dist/theme/index.js +24 -1
  12. package/dist/theme/index.js.map +1 -1
  13. package/dist/theme/index.mjs +1 -1
  14. package/package.json +12 -5
  15. package/src/components/custom/DateTime/DateTime.stories.tsx +180 -0
  16. package/src/components/custom/DateTime/DateTime.test.tsx +152 -0
  17. package/src/components/custom/DateTime/DateTime.tsx +235 -0
  18. package/src/components/custom/DateTime/index.ts +2 -0
  19. package/src/components/custom/EmptyState/EmptyState.stories.tsx +99 -0
  20. package/src/components/custom/EmptyState/EmptyState.test.tsx +106 -0
  21. package/src/components/custom/EmptyState/EmptyState.tsx +68 -0
  22. package/src/components/custom/EmptyState/index.ts +2 -0
  23. package/src/components/custom/Metric/Metric.stories.tsx +133 -0
  24. package/src/components/custom/Metric/Metric.test.tsx +120 -0
  25. package/src/components/custom/Metric/Metric.tsx +92 -0
  26. package/src/components/custom/Metric/index.ts +2 -0
  27. package/src/components/custom/Sidebar/Sidebar.stories.tsx +227 -0
  28. package/src/components/custom/Sidebar/Sidebar.test.tsx +185 -0
  29. package/src/components/custom/Sidebar/Sidebar.tsx +257 -0
  30. package/src/components/custom/Sidebar/index.ts +18 -0
  31. package/src/components/custom/Table/Table.stories.tsx +481 -0
  32. package/src/components/custom/Table/Table.test.tsx +531 -0
  33. package/src/components/custom/Table/Table.tsx +696 -0
  34. package/src/components/custom/Table/index.ts +22 -0
  35. package/src/components/custom/Typography/Typography.stories.tsx +153 -0
  36. package/src/components/custom/Typography/Typography.test.tsx +107 -0
  37. package/src/components/custom/Typography/Typography.tsx +218 -0
  38. package/src/components/custom/Typography/index.ts +19 -0
  39. package/src/components/custom/index.ts +8 -0
  40. package/src/components/custom/stepper/Stepper.stories.tsx +245 -0
  41. package/src/components/custom/stepper/Stepper.test.tsx +230 -0
  42. package/src/components/custom/stepper/Stepper.tsx +250 -0
  43. package/src/components/custom/stepper/index.ts +10 -0
  44. package/src/components/index.ts +5 -0
  45. package/src/components/ui/alert/Alert.stories.tsx +154 -0
  46. package/src/components/ui/alert/Alert.test.tsx +202 -0
  47. package/src/components/ui/alert/Alert.tsx +170 -0
  48. package/src/components/ui/alert/index.ts +8 -0
  49. package/src/components/ui/autocomplete/Autocomplete.stories.tsx +299 -0
  50. package/src/components/ui/autocomplete/Autocomplete.test.tsx +247 -0
  51. package/src/components/ui/autocomplete/Autocomplete.tsx +332 -0
  52. package/src/components/ui/autocomplete/index.ts +2 -0
  53. package/src/components/ui/avatar/Avatar.stories.tsx +105 -0
  54. package/src/components/ui/avatar/Avatar.test.tsx +135 -0
  55. package/src/components/ui/avatar/Avatar.tsx +168 -0
  56. package/src/components/ui/avatar/index.ts +2 -0
  57. package/src/components/ui/badge/Badge.stories.tsx +100 -0
  58. package/src/components/ui/badge/Badge.test.tsx +86 -0
  59. package/src/components/ui/badge/Badge.tsx +105 -0
  60. package/src/components/ui/badge/index.ts +2 -0
  61. package/src/components/ui/breadcrumbs/Breadcrumbs.stories.tsx +70 -0
  62. package/src/components/ui/breadcrumbs/Breadcrumbs.test.tsx +156 -0
  63. package/src/components/ui/breadcrumbs/Breadcrumbs.tsx +127 -0
  64. package/src/components/ui/breadcrumbs/index.ts +2 -0
  65. package/src/components/ui/button/Button.stories.tsx +216 -0
  66. package/src/components/ui/button/Button.test.tsx +132 -0
  67. package/src/components/ui/button/Button.tsx +242 -0
  68. package/src/components/ui/button/index.ts +10 -0
  69. package/src/components/ui/card/Card.stories.tsx +443 -0
  70. package/src/components/ui/card/Card.test.tsx +265 -0
  71. package/src/components/ui/card/Card.tsx +380 -0
  72. package/src/components/ui/card/index.ts +20 -0
  73. package/src/components/ui/checkbox/Checkbox.stories.tsx +126 -0
  74. package/src/components/ui/checkbox/Checkbox.test.tsx +152 -0
  75. package/src/components/ui/checkbox/Checkbox.tsx +163 -0
  76. package/src/components/ui/checkbox/index.ts +2 -0
  77. package/src/components/ui/chip/Chip.stories.tsx +112 -0
  78. package/src/components/ui/chip/Chip.test.tsx +119 -0
  79. package/src/components/ui/chip/Chip.tsx +151 -0
  80. package/src/components/ui/chip/index.ts +2 -0
  81. package/src/components/ui/collapse/Collapse.stories.tsx +313 -0
  82. package/src/components/ui/collapse/Collapse.test.tsx +298 -0
  83. package/src/components/ui/collapse/Collapse.tsx +275 -0
  84. package/src/components/ui/collapse/index.ts +18 -0
  85. package/src/components/ui/data-row/DataRow.stories.tsx +78 -0
  86. package/src/components/ui/data-row/DataRow.test.tsx +78 -0
  87. package/src/components/ui/data-row/DataRow.tsx +29 -0
  88. package/src/components/ui/data-row/index.ts +2 -0
  89. package/src/components/ui/divider/Divider.stories.tsx +71 -0
  90. package/src/components/ui/divider/Divider.test.tsx +55 -0
  91. package/src/components/ui/divider/Divider.tsx +37 -0
  92. package/src/components/ui/divider/index.ts +2 -0
  93. package/src/components/ui/drawer/Drawer.stories.tsx +228 -0
  94. package/src/components/ui/drawer/Drawer.test.tsx +142 -0
  95. package/src/components/ui/drawer/Drawer.tsx +228 -0
  96. package/src/components/ui/drawer/index.ts +9 -0
  97. package/src/components/ui/form-field/FormField.stories.tsx +260 -0
  98. package/src/components/ui/form-field/FormField.test.tsx +280 -0
  99. package/src/components/ui/form-field/FormField.tsx +308 -0
  100. package/src/components/ui/form-field/index.ts +2 -0
  101. package/src/components/ui/help-tip/HelpTip.stories.tsx +250 -0
  102. package/src/components/ui/help-tip/HelpTip.test.tsx +198 -0
  103. package/src/components/ui/help-tip/HelpTip.tsx +229 -0
  104. package/src/components/ui/help-tip/index.ts +2 -0
  105. package/src/components/ui/icon-box/IconBox.stories.tsx +139 -0
  106. package/src/components/ui/icon-box/IconBox.test.tsx +120 -0
  107. package/src/components/ui/icon-box/IconBox.tsx +57 -0
  108. package/src/components/ui/icon-box/index.ts +1 -0
  109. package/src/components/ui/index.ts +36 -0
  110. package/src/components/ui/input/Input.stories.tsx +192 -0
  111. package/src/components/ui/input/Input.test.tsx +86 -0
  112. package/src/components/ui/input/Input.tsx +273 -0
  113. package/src/components/ui/input/index.ts +2 -0
  114. package/src/components/ui/link/Link.stories.tsx +78 -0
  115. package/src/components/ui/link/Link.test.tsx +94 -0
  116. package/src/components/ui/link/Link.tsx +86 -0
  117. package/src/components/ui/link/index.ts +2 -0
  118. package/src/components/ui/list-item/ListItem.stories.tsx +146 -0
  119. package/src/components/ui/list-item/ListItem.test.tsx +128 -0
  120. package/src/components/ui/list-item/ListItem.tsx +89 -0
  121. package/src/components/ui/list-item/index.ts +14 -0
  122. package/src/components/ui/menu/Menu.stories.tsx +180 -0
  123. package/src/components/ui/menu/Menu.test.tsx +353 -0
  124. package/src/components/ui/menu/Menu.tsx +222 -0
  125. package/src/components/ui/menu/index.ts +2 -0
  126. package/src/components/ui/modal/Modal.stories.tsx +350 -0
  127. package/src/components/ui/modal/Modal.test.tsx +159 -0
  128. package/src/components/ui/modal/Modal.tsx +254 -0
  129. package/src/components/ui/modal/index.ts +19 -0
  130. package/src/components/ui/popover/Popover.stories.tsx +190 -0
  131. package/src/components/ui/popover/Popover.test.tsx +277 -0
  132. package/src/components/ui/popover/Popover.tsx +162 -0
  133. package/src/components/ui/popover/index.ts +2 -0
  134. package/src/components/ui/progress/Progress.stories.tsx +190 -0
  135. package/src/components/ui/progress/Progress.test.tsx +181 -0
  136. package/src/components/ui/progress/Progress.tsx +320 -0
  137. package/src/components/ui/progress/index.ts +9 -0
  138. package/src/components/ui/radio/Radio.stories.tsx +199 -0
  139. package/src/components/ui/radio/Radio.test.tsx +166 -0
  140. package/src/components/ui/radio/Radio.tsx +200 -0
  141. package/src/components/ui/radio/index.ts +2 -0
  142. package/src/components/ui/section/Section.stories.tsx +111 -0
  143. package/src/components/ui/section/Section.test.tsx +121 -0
  144. package/src/components/ui/section/Section.tsx +52 -0
  145. package/src/components/ui/section/index.ts +6 -0
  146. package/src/components/ui/select/Select.stories.tsx +286 -0
  147. package/src/components/ui/select/Select.test.tsx +180 -0
  148. package/src/components/ui/select/Select.tsx +236 -0
  149. package/src/components/ui/select/index.ts +2 -0
  150. package/src/components/ui/skeleton/Skeleton.stories.tsx +153 -0
  151. package/src/components/ui/skeleton/Skeleton.test.tsx +162 -0
  152. package/src/components/ui/skeleton/Skeleton.tsx +229 -0
  153. package/src/components/ui/skeleton/index.ts +16 -0
  154. package/src/components/ui/spinner/Spinner.stories.tsx +67 -0
  155. package/src/components/ui/spinner/Spinner.test.tsx +67 -0
  156. package/src/components/ui/spinner/Spinner.tsx +72 -0
  157. package/src/components/ui/spinner/index.ts +2 -0
  158. package/src/components/ui/stack/Stack.stories.tsx +127 -0
  159. package/src/components/ui/stack/Stack.test.tsx +184 -0
  160. package/src/components/ui/stack/Stack.tsx +76 -0
  161. package/src/components/ui/stack/index.ts +2 -0
  162. package/src/components/ui/surface/Surface.stories.tsx +91 -0
  163. package/src/components/ui/surface/Surface.test.tsx +63 -0
  164. package/src/components/ui/surface/Surface.tsx +51 -0
  165. package/src/components/ui/surface/index.ts +1 -0
  166. package/src/components/ui/switch/Switch.stories.tsx +111 -0
  167. package/src/components/ui/switch/Switch.test.tsx +112 -0
  168. package/src/components/ui/switch/Switch.tsx +103 -0
  169. package/src/components/ui/switch/index.ts +2 -0
  170. package/src/components/ui/tabs/Tabs.stories.tsx +213 -0
  171. package/src/components/ui/tabs/Tabs.test.tsx +192 -0
  172. package/src/components/ui/tabs/Tabs.tsx +253 -0
  173. package/src/components/ui/tabs/index.ts +16 -0
  174. package/src/components/ui/toast/Toast.stories.tsx +255 -0
  175. package/src/components/ui/toast/Toast.test.tsx +207 -0
  176. package/src/components/ui/toast/Toast.tsx +327 -0
  177. package/src/components/ui/toast/index.ts +8 -0
  178. package/src/components/ui/toolbar-button/ToolbarButton.stories.tsx +415 -0
  179. package/src/components/ui/toolbar-button/ToolbarButton.test.tsx +224 -0
  180. package/src/components/ui/toolbar-button/ToolbarButton.tsx +307 -0
  181. package/src/components/ui/toolbar-button/index.ts +7 -0
  182. package/src/components/ui/tooltip/Tooltip.stories.tsx +126 -0
  183. package/src/components/ui/tooltip/Tooltip.test.tsx +179 -0
  184. package/src/components/ui/tooltip/Tooltip.tsx +143 -0
  185. package/src/components/ui/tooltip/index.ts +2 -0
  186. package/src/index.ts +10 -0
  187. package/src/test/setup.ts +19 -0
  188. package/src/theme/Colors.stories.tsx +258 -0
  189. package/src/theme/config.ts +193 -0
  190. package/src/theme/elevation.stories.tsx +346 -0
  191. package/src/theme/elevation.test.ts +27 -0
  192. package/src/theme/elevation.ts +567 -0
  193. package/src/theme/index.ts +39 -0
  194. package/src/theme/shadows.stories.tsx +523 -0
  195. package/src/theme/shadows.ts +439 -0
  196. package/src/theme/tokens/index.ts +2 -0
  197. package/src/theme/tokens/primitives.ts +354 -0
  198. package/src/theme/tokens/semantic.ts +381 -0
  199. package/src/types/jest-axe.d.ts +16 -0
  200. package/src/types/nativewind.d.ts +54 -0
  201. package/src/utils/cn.ts +14 -0
  202. package/src/utils/colors.ts +140 -0
  203. package/src/utils/form.ts +188 -0
  204. package/src/utils/index.ts +29 -0
  205. package/src/utils/useTheme.ts +72 -0
  206. package/dist/chunk-NA3EES23.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { semanticColorsDark, getHoverColors, getValidatedElevation, getBaseSurfaceColor, getElevationSurface, getElevationShadow, neumorphicShadows } from './chunk-NA3EES23.mjs';
2
- export { buttonSizes, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darkThemeCSSVars, darken, discreteRainbow, elevationSystem, getBaseSurfaceColor, getDiscreteRainbowColor, getElevationConfig, getElevationShadow, getElevationSurface, getHoverColors, getSemanticColors, getThemeCSSVars, getValidatedElevation, gluestackConfig, hexToRgb, hsvToRgb, isDark, lightThemeCSSVars, lighten, neumorphicShadows, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, rgbToHex, rgbToHsv, semanticColorsDark, semanticColorsLight, semanticTypography, shadowColors } from './chunk-NA3EES23.mjs';
1
+ import { semanticColorsDark, getHoverColors, getValidatedElevation, getBaseSurfaceColor, getElevationSurface, getElevationShadow, getGlowShadow, neumorphicShadows } from './chunk-MGW37MPO.mjs';
2
+ export { buttonSizes, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darkThemeCSSVars, darken, discreteRainbow, elevationSystem, getBaseSurfaceColor, getDiscreteRainbowColor, getElevationConfig, getElevationShadow, getElevationSurface, getGlowShadow, getHoverColors, getSemanticColors, getThemeCSSVars, getValidatedElevation, gluestackConfig, hexToRgb, hsvToRgb, isDark, lightThemeCSSVars, lighten, neumorphicShadows, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, rgbToHex, rgbToHsv, semanticColorsDark, semanticColorsLight, semanticTypography, shadowColors } from './chunk-MGW37MPO.mjs';
3
3
  import { Pressable, ActivityIndicator, Text, View, TextInput, StyleSheet, Platform, Image, Modal as Modal$1, ScrollView } from 'react-native';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
@@ -3431,6 +3431,177 @@ function FormRow({
3431
3431
  }
3432
3432
  );
3433
3433
  }
3434
+ var gapClasses = {
3435
+ 0: "gap-0",
3436
+ 1: "gap-1",
3437
+ 2: "gap-2",
3438
+ 3: "gap-3",
3439
+ 4: "gap-4",
3440
+ 5: "gap-5",
3441
+ 6: "gap-6",
3442
+ 8: "gap-8",
3443
+ 10: "gap-10",
3444
+ 12: "gap-12"
3445
+ };
3446
+ var alignMap = {
3447
+ start: "items-start",
3448
+ center: "items-center",
3449
+ end: "items-end",
3450
+ stretch: "items-stretch"
3451
+ };
3452
+ var justifyMap = {
3453
+ start: "justify-start",
3454
+ center: "justify-center",
3455
+ end: "justify-end",
3456
+ between: "justify-between",
3457
+ around: "justify-around"
3458
+ };
3459
+ function Stack({
3460
+ gap = 0,
3461
+ align,
3462
+ justify,
3463
+ wrap,
3464
+ className,
3465
+ children,
3466
+ ...props
3467
+ }) {
3468
+ return /* @__PURE__ */ jsx(
3469
+ View,
3470
+ {
3471
+ className: cn(
3472
+ "flex",
3473
+ gapClasses[gap],
3474
+ align && alignMap[align],
3475
+ justify && justifyMap[justify],
3476
+ wrap && "flex-wrap",
3477
+ className
3478
+ ),
3479
+ ...props,
3480
+ children
3481
+ }
3482
+ );
3483
+ }
3484
+ function HStack(props) {
3485
+ return /* @__PURE__ */ jsx(Stack, { ...props, className: cn("flex-row", props.className) });
3486
+ }
3487
+ function VStack(props) {
3488
+ return /* @__PURE__ */ jsx(Stack, { ...props, className: cn("flex-col", props.className) });
3489
+ }
3490
+ function Section({ className, children, ...props }) {
3491
+ return /* @__PURE__ */ jsx(View, { className: cn("mb-6", className), ...props, children });
3492
+ }
3493
+ function SectionHeader({ title, subtitle, trailing, className }) {
3494
+ return /* @__PURE__ */ jsxs(View, { className: cn("flex-row items-center justify-between mb-3 px-1", className), children: [
3495
+ /* @__PURE__ */ jsxs(View, { className: "flex-1", children: [
3496
+ /* @__PURE__ */ jsx(Text, { className: "text-sm font-semibold text-text-secondary uppercase tracking-wider", children: title }),
3497
+ subtitle && /* @__PURE__ */ jsx(Text, { className: "text-xs text-text-tertiary mt-0.5", children: subtitle })
3498
+ ] }),
3499
+ trailing && /* @__PURE__ */ jsx(View, { children: trailing })
3500
+ ] });
3501
+ }
3502
+ function SectionContent({ className, children, ...props }) {
3503
+ return /* @__PURE__ */ jsx(View, { className: cn(className), ...props, children });
3504
+ }
3505
+ function DataRow({ label, value, valueClassName, className, ...props }) {
3506
+ return /* @__PURE__ */ jsxs(View, { className: cn("flex-row items-center justify-between py-2", className), ...props, children: [
3507
+ /* @__PURE__ */ jsx(Text, { className: "text-sm text-text-secondary", children: label }),
3508
+ typeof value === "string" ? /* @__PURE__ */ jsx(Text, { className: cn("text-sm font-medium text-text-primary", valueClassName), children: value }) : /* @__PURE__ */ jsx(View, { className: cn(valueClassName), children: value })
3509
+ ] });
3510
+ }
3511
+ var colorClasses = {
3512
+ primary: { bg: "bg-brand-primary/10", icon: "text-brand-primary" },
3513
+ secondary: { bg: "bg-brand-secondary/10", icon: "text-brand-secondary" },
3514
+ success: { bg: "bg-status-success/10", icon: "text-status-success" },
3515
+ error: { bg: "bg-status-error/10", icon: "text-status-error" },
3516
+ warning: { bg: "bg-status-warning/10", icon: "text-status-warning" },
3517
+ info: { bg: "bg-status-info/10", icon: "text-status-info" },
3518
+ neutral: { bg: "bg-surface-elevated", icon: "text-text-secondary" }
3519
+ };
3520
+ var sizeClasses = {
3521
+ sm: { box: "w-8 h-8 rounded-lg", iconSize: 16 },
3522
+ md: { box: "w-10 h-10 rounded-xl", iconSize: 20 },
3523
+ lg: { box: "w-12 h-12 rounded-xl", iconSize: 24 }
3524
+ };
3525
+ function IconBox({
3526
+ icon: Icon,
3527
+ color = "neutral",
3528
+ size = "md",
3529
+ className,
3530
+ ...props
3531
+ }) {
3532
+ const colors = colorClasses[color];
3533
+ const sizes = sizeClasses[size];
3534
+ return /* @__PURE__ */ jsx(
3535
+ View,
3536
+ {
3537
+ className: cn("items-center justify-center", colors.bg, sizes.box, className),
3538
+ ...props,
3539
+ children: /* @__PURE__ */ jsx(Icon, { size: sizes.iconSize, className: colors.icon })
3540
+ }
3541
+ );
3542
+ }
3543
+ function Surface({
3544
+ elevation = 0,
3545
+ glowColor,
3546
+ glowIntensity,
3547
+ theme = "dark",
3548
+ className,
3549
+ style,
3550
+ children,
3551
+ ...props
3552
+ }) {
3553
+ const baseColor = getBaseSurfaceColor(theme);
3554
+ const surfaceColor = getElevationSurface(baseColor, elevation, theme);
3555
+ const shadowStyle = getElevationShadow(baseColor, elevation, theme);
3556
+ const glowStyle = glowColor ? getGlowShadow(glowColor, glowIntensity) : {};
3557
+ return /* @__PURE__ */ jsx(
3558
+ View,
3559
+ {
3560
+ className: cn("rounded-2xl", className),
3561
+ style: [
3562
+ { backgroundColor: surfaceColor },
3563
+ shadowStyle,
3564
+ glowStyle,
3565
+ style
3566
+ ],
3567
+ ...props,
3568
+ children
3569
+ }
3570
+ );
3571
+ }
3572
+ function ListItem({ className, children, onPress, ...props }) {
3573
+ const Container = onPress ? Pressable : View;
3574
+ const containerProps = onPress ? { onPress, ...props } : props;
3575
+ return /* @__PURE__ */ jsx(
3576
+ Container,
3577
+ {
3578
+ className: cn("flex-row items-center py-3 px-4 min-h-[48px]", className),
3579
+ ...containerProps,
3580
+ children
3581
+ }
3582
+ );
3583
+ }
3584
+ function ListItemIcon({ icon: Icon, className, ...props }) {
3585
+ return /* @__PURE__ */ jsx(View, { className: cn("mr-3 items-center justify-center", className), ...props, children: /* @__PURE__ */ jsx(Icon, { size: 20, className: "text-text-secondary" }) });
3586
+ }
3587
+ function ListItemContent({ title, subtitle, className, ...props }) {
3588
+ return /* @__PURE__ */ jsxs(View, { className: cn("flex-1 justify-center", className), ...props, children: [
3589
+ /* @__PURE__ */ jsx(Text, { className: "text-sm font-medium text-text-primary", children: title }),
3590
+ subtitle && /* @__PURE__ */ jsx(Text, { className: "text-xs text-text-secondary mt-0.5", children: subtitle })
3591
+ ] });
3592
+ }
3593
+ function ListItemTrailing({ className, children, ...props }) {
3594
+ return /* @__PURE__ */ jsx(View, { className: cn("ml-3 items-center justify-center", className), ...props, children });
3595
+ }
3596
+ function ListItemDivider({ inset = true, className, ...props }) {
3597
+ return /* @__PURE__ */ jsx(
3598
+ View,
3599
+ {
3600
+ className: cn("h-px bg-divider", inset ? "ml-14" : "", className),
3601
+ ...props
3602
+ }
3603
+ );
3604
+ }
3434
3605
  var variantStyles4 = {
3435
3606
  h1: "font-heading text-5xl font-bold leading-tight",
3436
3607
  h2: "font-heading text-4xl font-bold leading-tight",
@@ -4259,6 +4430,57 @@ function formatDateTime(value, format = "datetime", isUTC = false, fallback = "-
4259
4430
  }
4260
4431
  return formatDate(value, format, isUTC);
4261
4432
  }
4433
+ var sizeConfig2 = {
4434
+ sm: { value: "text-lg font-bold", label: "text-xs", unit: "text-xs" },
4435
+ md: { value: "text-2xl font-bold", label: "text-xs", unit: "text-sm" },
4436
+ lg: { value: "text-4xl font-bold", label: "text-sm", unit: "text-base" }
4437
+ };
4438
+ var trendColors = {
4439
+ up: "text-result-improve",
4440
+ down: "text-result-degrade",
4441
+ neutral: "text-result-inconclusive"
4442
+ };
4443
+ var trendArrows = {
4444
+ up: "\u2191",
4445
+ down: "\u2193",
4446
+ neutral: "\u2192"
4447
+ };
4448
+ function Metric({
4449
+ value,
4450
+ label,
4451
+ unit,
4452
+ trend,
4453
+ size = "md",
4454
+ className,
4455
+ ...props
4456
+ }) {
4457
+ const styles2 = sizeConfig2[size];
4458
+ return /* @__PURE__ */ jsxs(View, { className: cn("items-center", className), ...props, children: [
4459
+ /* @__PURE__ */ jsxs(View, { className: "flex-row items-baseline gap-1", children: [
4460
+ /* @__PURE__ */ jsx(Text, { className: cn(styles2.value, "text-text-primary"), children: value }),
4461
+ unit && /* @__PURE__ */ jsx(Text, { className: cn(styles2.unit, "text-text-tertiary"), children: unit }),
4462
+ trend && /* @__PURE__ */ jsx(Text, { className: cn(styles2.unit, trendColors[trend]), children: trendArrows[trend] })
4463
+ ] }),
4464
+ /* @__PURE__ */ jsx(Text, { className: cn(styles2.label, "text-text-secondary mt-1"), children: label })
4465
+ ] });
4466
+ }
4467
+ function MetricGroup({
4468
+ className,
4469
+ children,
4470
+ ...props
4471
+ }) {
4472
+ const items = React24.Children.toArray(children);
4473
+ return /* @__PURE__ */ jsx(View, { className: cn("flex-row items-center", className), ...props, children: items.map((child, i) => /* @__PURE__ */ jsxs(React24.Fragment, { children: [
4474
+ /* @__PURE__ */ jsx(View, { className: "flex-1 items-center", children: child }),
4475
+ i < items.length - 1 && /* @__PURE__ */ jsx(
4476
+ View,
4477
+ {
4478
+ className: "w-px h-8 bg-divider mx-2",
4479
+ testID: "metric-divider"
4480
+ }
4481
+ )
4482
+ ] }, i)) });
4483
+ }
4262
4484
 
4263
4485
  // src/utils/colors.ts
4264
4486
  function getStatusColor(status) {
@@ -4407,6 +4629,6 @@ function composeValidators(...validators) {
4407
4629
  };
4408
4630
  }
4409
4631
 
4410
- export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert, AlertDescription, AlertTitle, Autocomplete, Avatar, AvatarBadge, AvatarGroup, Badge, BadgeText, BreadcrumbItem, Breadcrumbs, Button, ButtonIcon, ButtonSpinner, ButtonText, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardSkeleton, CardTitle, Checkbox, CheckboxGroup, Chip, CircularProgress, Collapse, CollapseButton, CollapseContent, DateTime, Divider, Drawer, DrawerBody, DrawerFooter, DrawerHeader, EmptyState, FormActions, FormField, FormRow, FormSection, Heading, HelpTip, Input, InputGroup, Label, LabelWithHelp, Link, Menu, MenuDivider, MenuGroup, MenuItem, MenuList, MenuTrigger, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalTitle, Overline, Paragraph, PasswordInput, Popover, PopoverCloseButton, PopoverContent, PopoverTrigger, Progress, ProgressSteps, Radio, RadioGroup, Select, Sidebar, SidebarContent, SidebarDivider, SidebarFooter, SidebarHeader, SidebarItem, SidebarSection, Skeleton, SkeletonCard, SkeletonCircle, SkeletonListItem, SkeletonText, Spinner, Step, StepContent, StepIndicator, StepLabel, Stepper, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableBody, TableCell, TableHeader, TableHeaderCell, TablePagination, TableRow, Tabs, Toast, ToastProvider, ToolbarButton, ToolbarButtonGroup, Tooltip, Typography, alpha, cn, composeValidators, createFieldId, formatDateTime, getContrastText, getFieldAriaProps, getFieldValidationProps, getLuminance, getResultColor, getStatusColor, hasMaxLength, hasMinLength, isEmpty, isValidEmail, useTable, useToast, useToolbarButton, validationRules };
4632
+ export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert, AlertDescription, AlertTitle, Autocomplete, Avatar, AvatarBadge, AvatarGroup, Badge, BadgeText, BreadcrumbItem, Breadcrumbs, Button, ButtonIcon, ButtonSpinner, ButtonText, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardSkeleton, CardTitle, Checkbox, CheckboxGroup, Chip, CircularProgress, Collapse, CollapseButton, CollapseContent, DataRow, DateTime, Divider, Drawer, DrawerBody, DrawerFooter, DrawerHeader, EmptyState, FormActions, FormField, FormRow, FormSection, HStack, Heading, HelpTip, IconBox, Input, InputGroup, Label, LabelWithHelp, Link, ListItem, ListItemContent, ListItemDivider, ListItemIcon, ListItemTrailing, Menu, MenuDivider, MenuGroup, MenuItem, MenuList, MenuTrigger, Metric, MetricGroup, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalTitle, Overline, Paragraph, PasswordInput, Popover, PopoverCloseButton, PopoverContent, PopoverTrigger, Progress, ProgressSteps, Radio, RadioGroup, Section, SectionContent, SectionHeader, Select, Sidebar, SidebarContent, SidebarDivider, SidebarFooter, SidebarHeader, SidebarItem, SidebarSection, Skeleton, SkeletonCard, SkeletonCircle, SkeletonListItem, SkeletonText, Spinner, Stack, Step, StepContent, StepIndicator, StepLabel, Stepper, Surface, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableBody, TableCell, TableHeader, TableHeaderCell, TablePagination, TableRow, Tabs, Toast, ToastProvider, ToolbarButton, ToolbarButtonGroup, Tooltip, Typography, VStack, alpha, cn, composeValidators, createFieldId, formatDateTime, getContrastText, getFieldAriaProps, getFieldValidationProps, getLuminance, getResultColor, getStatusColor, hasMaxLength, hasMinLength, isEmpty, isValidEmail, useTable, useToast, useToolbarButton, validationRules };
4411
4633
  //# sourceMappingURL=index.mjs.map
4412
4634
  //# sourceMappingURL=index.mjs.map