@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.
- package/dist/{chunk-NA3EES23.mjs → chunk-MGW37MPO.mjs} +26 -4
- package/dist/chunk-MGW37MPO.mjs.map +1 -0
- package/dist/index.d.mts +115 -2
- package/dist/index.d.ts +115 -2
- package/dist/index.js +262 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +225 -3
- package/dist/index.mjs.map +1 -1
- package/dist/theme/index.d.mts +124 -109
- package/dist/theme/index.d.ts +124 -109
- package/dist/theme/index.js +24 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +1 -1
- package/package.json +12 -5
- package/src/components/custom/DateTime/DateTime.stories.tsx +180 -0
- package/src/components/custom/DateTime/DateTime.test.tsx +152 -0
- package/src/components/custom/DateTime/DateTime.tsx +235 -0
- package/src/components/custom/DateTime/index.ts +2 -0
- package/src/components/custom/EmptyState/EmptyState.stories.tsx +99 -0
- package/src/components/custom/EmptyState/EmptyState.test.tsx +106 -0
- package/src/components/custom/EmptyState/EmptyState.tsx +68 -0
- package/src/components/custom/EmptyState/index.ts +2 -0
- package/src/components/custom/Metric/Metric.stories.tsx +133 -0
- package/src/components/custom/Metric/Metric.test.tsx +120 -0
- package/src/components/custom/Metric/Metric.tsx +92 -0
- package/src/components/custom/Metric/index.ts +2 -0
- package/src/components/custom/Sidebar/Sidebar.stories.tsx +227 -0
- package/src/components/custom/Sidebar/Sidebar.test.tsx +185 -0
- package/src/components/custom/Sidebar/Sidebar.tsx +257 -0
- package/src/components/custom/Sidebar/index.ts +18 -0
- package/src/components/custom/Table/Table.stories.tsx +481 -0
- package/src/components/custom/Table/Table.test.tsx +531 -0
- package/src/components/custom/Table/Table.tsx +696 -0
- package/src/components/custom/Table/index.ts +22 -0
- package/src/components/custom/Typography/Typography.stories.tsx +153 -0
- package/src/components/custom/Typography/Typography.test.tsx +107 -0
- package/src/components/custom/Typography/Typography.tsx +218 -0
- package/src/components/custom/Typography/index.ts +19 -0
- package/src/components/custom/index.ts +8 -0
- package/src/components/custom/stepper/Stepper.stories.tsx +245 -0
- package/src/components/custom/stepper/Stepper.test.tsx +230 -0
- package/src/components/custom/stepper/Stepper.tsx +250 -0
- package/src/components/custom/stepper/index.ts +10 -0
- package/src/components/index.ts +5 -0
- package/src/components/ui/alert/Alert.stories.tsx +154 -0
- package/src/components/ui/alert/Alert.test.tsx +202 -0
- package/src/components/ui/alert/Alert.tsx +170 -0
- package/src/components/ui/alert/index.ts +8 -0
- package/src/components/ui/autocomplete/Autocomplete.stories.tsx +299 -0
- package/src/components/ui/autocomplete/Autocomplete.test.tsx +247 -0
- package/src/components/ui/autocomplete/Autocomplete.tsx +332 -0
- package/src/components/ui/autocomplete/index.ts +2 -0
- package/src/components/ui/avatar/Avatar.stories.tsx +105 -0
- package/src/components/ui/avatar/Avatar.test.tsx +135 -0
- package/src/components/ui/avatar/Avatar.tsx +168 -0
- package/src/components/ui/avatar/index.ts +2 -0
- package/src/components/ui/badge/Badge.stories.tsx +100 -0
- package/src/components/ui/badge/Badge.test.tsx +86 -0
- package/src/components/ui/badge/Badge.tsx +105 -0
- package/src/components/ui/badge/index.ts +2 -0
- package/src/components/ui/breadcrumbs/Breadcrumbs.stories.tsx +70 -0
- package/src/components/ui/breadcrumbs/Breadcrumbs.test.tsx +156 -0
- package/src/components/ui/breadcrumbs/Breadcrumbs.tsx +127 -0
- package/src/components/ui/breadcrumbs/index.ts +2 -0
- package/src/components/ui/button/Button.stories.tsx +216 -0
- package/src/components/ui/button/Button.test.tsx +132 -0
- package/src/components/ui/button/Button.tsx +242 -0
- package/src/components/ui/button/index.ts +10 -0
- package/src/components/ui/card/Card.stories.tsx +443 -0
- package/src/components/ui/card/Card.test.tsx +265 -0
- package/src/components/ui/card/Card.tsx +380 -0
- package/src/components/ui/card/index.ts +20 -0
- package/src/components/ui/checkbox/Checkbox.stories.tsx +126 -0
- package/src/components/ui/checkbox/Checkbox.test.tsx +152 -0
- package/src/components/ui/checkbox/Checkbox.tsx +163 -0
- package/src/components/ui/checkbox/index.ts +2 -0
- package/src/components/ui/chip/Chip.stories.tsx +112 -0
- package/src/components/ui/chip/Chip.test.tsx +119 -0
- package/src/components/ui/chip/Chip.tsx +151 -0
- package/src/components/ui/chip/index.ts +2 -0
- package/src/components/ui/collapse/Collapse.stories.tsx +313 -0
- package/src/components/ui/collapse/Collapse.test.tsx +298 -0
- package/src/components/ui/collapse/Collapse.tsx +275 -0
- package/src/components/ui/collapse/index.ts +18 -0
- package/src/components/ui/data-row/DataRow.stories.tsx +78 -0
- package/src/components/ui/data-row/DataRow.test.tsx +78 -0
- package/src/components/ui/data-row/DataRow.tsx +29 -0
- package/src/components/ui/data-row/index.ts +2 -0
- package/src/components/ui/divider/Divider.stories.tsx +71 -0
- package/src/components/ui/divider/Divider.test.tsx +55 -0
- package/src/components/ui/divider/Divider.tsx +37 -0
- package/src/components/ui/divider/index.ts +2 -0
- package/src/components/ui/drawer/Drawer.stories.tsx +228 -0
- package/src/components/ui/drawer/Drawer.test.tsx +142 -0
- package/src/components/ui/drawer/Drawer.tsx +228 -0
- package/src/components/ui/drawer/index.ts +9 -0
- package/src/components/ui/form-field/FormField.stories.tsx +260 -0
- package/src/components/ui/form-field/FormField.test.tsx +280 -0
- package/src/components/ui/form-field/FormField.tsx +308 -0
- package/src/components/ui/form-field/index.ts +2 -0
- package/src/components/ui/help-tip/HelpTip.stories.tsx +250 -0
- package/src/components/ui/help-tip/HelpTip.test.tsx +198 -0
- package/src/components/ui/help-tip/HelpTip.tsx +229 -0
- package/src/components/ui/help-tip/index.ts +2 -0
- package/src/components/ui/icon-box/IconBox.stories.tsx +139 -0
- package/src/components/ui/icon-box/IconBox.test.tsx +120 -0
- package/src/components/ui/icon-box/IconBox.tsx +57 -0
- package/src/components/ui/icon-box/index.ts +1 -0
- package/src/components/ui/index.ts +36 -0
- package/src/components/ui/input/Input.stories.tsx +192 -0
- package/src/components/ui/input/Input.test.tsx +86 -0
- package/src/components/ui/input/Input.tsx +273 -0
- package/src/components/ui/input/index.ts +2 -0
- package/src/components/ui/link/Link.stories.tsx +78 -0
- package/src/components/ui/link/Link.test.tsx +94 -0
- package/src/components/ui/link/Link.tsx +86 -0
- package/src/components/ui/link/index.ts +2 -0
- package/src/components/ui/list-item/ListItem.stories.tsx +146 -0
- package/src/components/ui/list-item/ListItem.test.tsx +128 -0
- package/src/components/ui/list-item/ListItem.tsx +89 -0
- package/src/components/ui/list-item/index.ts +14 -0
- package/src/components/ui/menu/Menu.stories.tsx +180 -0
- package/src/components/ui/menu/Menu.test.tsx +353 -0
- package/src/components/ui/menu/Menu.tsx +222 -0
- package/src/components/ui/menu/index.ts +2 -0
- package/src/components/ui/modal/Modal.stories.tsx +350 -0
- package/src/components/ui/modal/Modal.test.tsx +159 -0
- package/src/components/ui/modal/Modal.tsx +254 -0
- package/src/components/ui/modal/index.ts +19 -0
- package/src/components/ui/popover/Popover.stories.tsx +190 -0
- package/src/components/ui/popover/Popover.test.tsx +277 -0
- package/src/components/ui/popover/Popover.tsx +162 -0
- package/src/components/ui/popover/index.ts +2 -0
- package/src/components/ui/progress/Progress.stories.tsx +190 -0
- package/src/components/ui/progress/Progress.test.tsx +181 -0
- package/src/components/ui/progress/Progress.tsx +320 -0
- package/src/components/ui/progress/index.ts +9 -0
- package/src/components/ui/radio/Radio.stories.tsx +199 -0
- package/src/components/ui/radio/Radio.test.tsx +166 -0
- package/src/components/ui/radio/Radio.tsx +200 -0
- package/src/components/ui/radio/index.ts +2 -0
- package/src/components/ui/section/Section.stories.tsx +111 -0
- package/src/components/ui/section/Section.test.tsx +121 -0
- package/src/components/ui/section/Section.tsx +52 -0
- package/src/components/ui/section/index.ts +6 -0
- package/src/components/ui/select/Select.stories.tsx +286 -0
- package/src/components/ui/select/Select.test.tsx +180 -0
- package/src/components/ui/select/Select.tsx +236 -0
- package/src/components/ui/select/index.ts +2 -0
- package/src/components/ui/skeleton/Skeleton.stories.tsx +153 -0
- package/src/components/ui/skeleton/Skeleton.test.tsx +162 -0
- package/src/components/ui/skeleton/Skeleton.tsx +229 -0
- package/src/components/ui/skeleton/index.ts +16 -0
- package/src/components/ui/spinner/Spinner.stories.tsx +67 -0
- package/src/components/ui/spinner/Spinner.test.tsx +67 -0
- package/src/components/ui/spinner/Spinner.tsx +72 -0
- package/src/components/ui/spinner/index.ts +2 -0
- package/src/components/ui/stack/Stack.stories.tsx +127 -0
- package/src/components/ui/stack/Stack.test.tsx +184 -0
- package/src/components/ui/stack/Stack.tsx +76 -0
- package/src/components/ui/stack/index.ts +2 -0
- package/src/components/ui/surface/Surface.stories.tsx +91 -0
- package/src/components/ui/surface/Surface.test.tsx +63 -0
- package/src/components/ui/surface/Surface.tsx +51 -0
- package/src/components/ui/surface/index.ts +1 -0
- package/src/components/ui/switch/Switch.stories.tsx +111 -0
- package/src/components/ui/switch/Switch.test.tsx +112 -0
- package/src/components/ui/switch/Switch.tsx +103 -0
- package/src/components/ui/switch/index.ts +2 -0
- package/src/components/ui/tabs/Tabs.stories.tsx +213 -0
- package/src/components/ui/tabs/Tabs.test.tsx +192 -0
- package/src/components/ui/tabs/Tabs.tsx +253 -0
- package/src/components/ui/tabs/index.ts +16 -0
- package/src/components/ui/toast/Toast.stories.tsx +255 -0
- package/src/components/ui/toast/Toast.test.tsx +207 -0
- package/src/components/ui/toast/Toast.tsx +327 -0
- package/src/components/ui/toast/index.ts +8 -0
- package/src/components/ui/toolbar-button/ToolbarButton.stories.tsx +415 -0
- package/src/components/ui/toolbar-button/ToolbarButton.test.tsx +224 -0
- package/src/components/ui/toolbar-button/ToolbarButton.tsx +307 -0
- package/src/components/ui/toolbar-button/index.ts +7 -0
- package/src/components/ui/tooltip/Tooltip.stories.tsx +126 -0
- package/src/components/ui/tooltip/Tooltip.test.tsx +179 -0
- package/src/components/ui/tooltip/Tooltip.tsx +143 -0
- package/src/components/ui/tooltip/index.ts +2 -0
- package/src/index.ts +10 -0
- package/src/test/setup.ts +19 -0
- package/src/theme/Colors.stories.tsx +258 -0
- package/src/theme/config.ts +193 -0
- package/src/theme/elevation.stories.tsx +346 -0
- package/src/theme/elevation.test.ts +27 -0
- package/src/theme/elevation.ts +567 -0
- package/src/theme/index.ts +39 -0
- package/src/theme/shadows.stories.tsx +523 -0
- package/src/theme/shadows.ts +439 -0
- package/src/theme/tokens/index.ts +2 -0
- package/src/theme/tokens/primitives.ts +354 -0
- package/src/theme/tokens/semantic.ts +381 -0
- package/src/types/jest-axe.d.ts +16 -0
- package/src/types/nativewind.d.ts +54 -0
- package/src/utils/cn.ts +14 -0
- package/src/utils/colors.ts +140 -0
- package/src/utils/form.ts +188 -0
- package/src/utils/index.ts +29 -0
- package/src/utils/useTheme.ts +72 -0
- package/dist/chunk-NA3EES23.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ViewProps, PressableProps, View, TextInputProps, TextInput, ImageSourcePropType, ModalProps as ModalProps$1, TextProps } from 'react-native';
|
|
4
|
-
|
|
4
|
+
import { ElevationLevel, GlowIntensity } from './theme/index.js';
|
|
5
|
+
export { ComponentType, ElevationConfig, ShadowIntensity, ShadowSurface, ThemeConfig, ThemeMode, 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 './theme/index.js';
|
|
5
6
|
import { ClassValue } from 'clsx';
|
|
6
7
|
|
|
7
8
|
type AlertStatus = 'success' | 'info' | 'warning' | 'error';
|
|
@@ -1815,6 +1816,102 @@ interface FormRowProps extends ViewProps {
|
|
|
1815
1816
|
*/
|
|
1816
1817
|
declare function FormRow({ gap, className, children, ...props }: FormRowProps): react_jsx_runtime.JSX.Element;
|
|
1817
1818
|
|
|
1819
|
+
type Gap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12;
|
|
1820
|
+
interface StackProps extends ViewProps {
|
|
1821
|
+
gap?: Gap;
|
|
1822
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
1823
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'around';
|
|
1824
|
+
wrap?: boolean;
|
|
1825
|
+
className?: string;
|
|
1826
|
+
children: React.ReactNode;
|
|
1827
|
+
}
|
|
1828
|
+
declare function Stack({ gap, align, justify, wrap, className, children, ...props }: StackProps): react_jsx_runtime.JSX.Element;
|
|
1829
|
+
declare function HStack(props: StackProps): react_jsx_runtime.JSX.Element;
|
|
1830
|
+
declare function VStack(props: StackProps): react_jsx_runtime.JSX.Element;
|
|
1831
|
+
|
|
1832
|
+
interface SectionProps extends ViewProps {
|
|
1833
|
+
className?: string;
|
|
1834
|
+
children: React.ReactNode;
|
|
1835
|
+
}
|
|
1836
|
+
declare function Section({ className, children, ...props }: SectionProps): react_jsx_runtime.JSX.Element;
|
|
1837
|
+
interface SectionHeaderProps {
|
|
1838
|
+
title: string;
|
|
1839
|
+
subtitle?: string;
|
|
1840
|
+
trailing?: React.ReactNode;
|
|
1841
|
+
className?: string;
|
|
1842
|
+
}
|
|
1843
|
+
declare function SectionHeader({ title, subtitle, trailing, className }: SectionHeaderProps): react_jsx_runtime.JSX.Element;
|
|
1844
|
+
interface SectionContentProps extends ViewProps {
|
|
1845
|
+
className?: string;
|
|
1846
|
+
children: React.ReactNode;
|
|
1847
|
+
}
|
|
1848
|
+
declare function SectionContent({ className, children, ...props }: SectionContentProps): react_jsx_runtime.JSX.Element;
|
|
1849
|
+
|
|
1850
|
+
interface DataRowProps extends ViewProps {
|
|
1851
|
+
/** Descriptive label shown on the left */
|
|
1852
|
+
label: string;
|
|
1853
|
+
/** Value shown on the right -- string renders as Text, ReactNode renders inside a View */
|
|
1854
|
+
value: React.ReactNode;
|
|
1855
|
+
/** Additional className applied to the value element */
|
|
1856
|
+
valueClassName?: string;
|
|
1857
|
+
/** Additional className applied to the root container */
|
|
1858
|
+
className?: string;
|
|
1859
|
+
}
|
|
1860
|
+
declare function DataRow({ label, value, valueClassName, className, ...props }: DataRowProps): react_jsx_runtime.JSX.Element;
|
|
1861
|
+
|
|
1862
|
+
type IconBoxColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'neutral';
|
|
1863
|
+
type IconBoxSize = 'sm' | 'md' | 'lg';
|
|
1864
|
+
interface IconBoxProps extends ViewProps {
|
|
1865
|
+
icon: React.ComponentType<{
|
|
1866
|
+
size?: number;
|
|
1867
|
+
className?: string;
|
|
1868
|
+
}>;
|
|
1869
|
+
color?: IconBoxColor;
|
|
1870
|
+
size?: IconBoxSize;
|
|
1871
|
+
className?: string;
|
|
1872
|
+
}
|
|
1873
|
+
declare function IconBox({ icon: Icon, color, size, className, ...props }: IconBoxProps): react_jsx_runtime.JSX.Element;
|
|
1874
|
+
|
|
1875
|
+
interface SurfaceProps extends ViewProps {
|
|
1876
|
+
elevation?: ElevationLevel;
|
|
1877
|
+
glowColor?: string;
|
|
1878
|
+
glowIntensity?: GlowIntensity;
|
|
1879
|
+
theme?: 'light' | 'dark';
|
|
1880
|
+
className?: string;
|
|
1881
|
+
children: React.ReactNode;
|
|
1882
|
+
}
|
|
1883
|
+
declare function Surface({ elevation, glowColor, glowIntensity, theme, className, style, children, ...props }: SurfaceProps): react_jsx_runtime.JSX.Element;
|
|
1884
|
+
|
|
1885
|
+
interface ListItemProps extends PressableProps {
|
|
1886
|
+
className?: string;
|
|
1887
|
+
children: React.ReactNode;
|
|
1888
|
+
}
|
|
1889
|
+
declare function ListItem({ className, children, onPress, ...props }: ListItemProps): react_jsx_runtime.JSX.Element;
|
|
1890
|
+
interface ListItemIconProps extends ViewProps {
|
|
1891
|
+
icon: React.ComponentType<{
|
|
1892
|
+
size?: number;
|
|
1893
|
+
className?: string;
|
|
1894
|
+
}>;
|
|
1895
|
+
className?: string;
|
|
1896
|
+
}
|
|
1897
|
+
declare function ListItemIcon({ icon: Icon, className, ...props }: ListItemIconProps): react_jsx_runtime.JSX.Element;
|
|
1898
|
+
interface ListItemContentProps extends ViewProps {
|
|
1899
|
+
title: string;
|
|
1900
|
+
subtitle?: string;
|
|
1901
|
+
className?: string;
|
|
1902
|
+
}
|
|
1903
|
+
declare function ListItemContent({ title, subtitle, className, ...props }: ListItemContentProps): react_jsx_runtime.JSX.Element;
|
|
1904
|
+
interface ListItemTrailingProps extends ViewProps {
|
|
1905
|
+
className?: string;
|
|
1906
|
+
children: React.ReactNode;
|
|
1907
|
+
}
|
|
1908
|
+
declare function ListItemTrailing({ className, children, ...props }: ListItemTrailingProps): react_jsx_runtime.JSX.Element;
|
|
1909
|
+
interface ListItemDividerProps extends ViewProps {
|
|
1910
|
+
inset?: boolean;
|
|
1911
|
+
className?: string;
|
|
1912
|
+
}
|
|
1913
|
+
declare function ListItemDivider({ inset, className, ...props }: ListItemDividerProps): react_jsx_runtime.JSX.Element;
|
|
1914
|
+
|
|
1818
1915
|
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body1' | 'body2' | 'subtitle1' | 'subtitle2' | 'caption' | 'overline' | 'button';
|
|
1819
1916
|
type TypographyColor = 'primary' | 'secondary' | 'tertiary' | 'disabled' | 'inverse' | 'success' | 'error' | 'warning' | 'info' | 'inherit';
|
|
1820
1917
|
type TypographyAlign = 'left' | 'center' | 'right' | 'justify';
|
|
@@ -2313,6 +2410,22 @@ declare function DateTime({ value, format, customFormat, isUTC, fallback, color,
|
|
|
2313
2410
|
*/
|
|
2314
2411
|
declare function formatDateTime(value: number | Date | string | null | undefined, format?: DateTimeFormat, isUTC?: boolean, fallback?: string): string;
|
|
2315
2412
|
|
|
2413
|
+
type MetricTrend = 'up' | 'down' | 'neutral';
|
|
2414
|
+
interface MetricProps extends ViewProps {
|
|
2415
|
+
value: string;
|
|
2416
|
+
label: string;
|
|
2417
|
+
unit?: string;
|
|
2418
|
+
trend?: MetricTrend;
|
|
2419
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2420
|
+
className?: string;
|
|
2421
|
+
}
|
|
2422
|
+
declare function Metric({ value, label, unit, trend, size, className, ...props }: MetricProps): react_jsx_runtime.JSX.Element;
|
|
2423
|
+
interface MetricGroupProps extends ViewProps {
|
|
2424
|
+
className?: string;
|
|
2425
|
+
children: React.ReactNode;
|
|
2426
|
+
}
|
|
2427
|
+
declare function MetricGroup({ className, children, ...props }: MetricGroupProps): react_jsx_runtime.JSX.Element;
|
|
2428
|
+
|
|
2316
2429
|
/**
|
|
2317
2430
|
* Utility function to merge Tailwind CSS classes with proper conflict resolution.
|
|
2318
2431
|
* Combines clsx for conditional classes with tailwind-merge for deduplication.
|
|
@@ -2481,4 +2594,4 @@ type FormErrors<T extends FormValues> = Partial<Record<keyof T, string>>;
|
|
|
2481
2594
|
*/
|
|
2482
2595
|
type FormTouched<T extends FormValues> = Partial<Record<keyof T, boolean>>;
|
|
2483
2596
|
|
|
2484
|
-
export { Accordion, AccordionButton, type AccordionButtonProps, AccordionItem, type AccordionItemProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, type AlertStatus, AlertTitle, type AlertTitleProps, type AlertVariant, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarBadge, type AvatarBadgeProps, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeColor, type BadgeProps, type BadgeSize, BadgeText, type BadgeTextProps, type BadgeVariant, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonColor, ButtonIcon, type ButtonIconProps, type ButtonProps, type ButtonSize, ButtonSpinner, type ButtonSpinnerProps, ButtonText, type ButtonTextProps, type ButtonVariant, Caption, type CaptionProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, type CardElevation, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardSkeleton, type CardSkeletonProps, CardTitle, type CardTitleProps, type CardVariant, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, Chip, type ChipColor, type ChipProps, type ChipSize, type ChipVariant, CircularProgress, type CircularProgressProps, Collapse, CollapseButton, type CollapseButtonProps, CollapseContent, type CollapseContentProps, type CollapseProps, DateTime, type DateTimeFormat, type DateTimeProps, Divider, type DividerOrientation, type DividerProps, Drawer, DrawerBody, type DrawerBodyProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, type DrawerProps, type DrawerSize, EmptyState, type EmptyStateProps, type FieldState, type FieldWrapperProps, FormActions, type FormActionsProps, type FormErrors, FormField, type FormFieldProps, FormRow, type FormRowProps, FormSection, type FormSectionProps, type FormTouched, type FormValues, Heading, type HeadingProps, HelpTip, type HelpTipIcon, type HelpTipPlacement, type HelpTipProps, type HelpTipSize, Input, InputGroup, type InputGroupProps, type InputProps, type InputSize, type InputVariant, Label, type LabelProps, LabelWithHelp, type LabelWithHelpProps, Link, type LinkColor, type LinkProps, type LinkUnderline, Menu, MenuDivider, type MenuDividerProps, MenuGroup, type MenuGroupProps, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MenuTrigger, type MenuTriggerProps, Modal, ModalBody, type ModalBodyProps, ModalCloseButton, type ModalCloseButtonProps, ModalContent, type ModalContentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalSize, ModalTitle, type ModalTitleProps, Overline, type OverlineProps, Paragraph, type ParagraphProps, PasswordInput, type PasswordInputProps, Popover, PopoverCloseButton, type PopoverCloseButtonProps, PopoverContent, type PopoverContentProps, type PopoverPlacement, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressColor, type ProgressProps, type ProgressSize, ProgressSteps, type ProgressStepsProps, type ProgressVariant, Radio, type RadioColor, RadioGroup, type RadioGroupProps, type RadioProps, type RadioSize, type ResultType, Select, type SelectOption, type SelectProps, Sidebar, SidebarContent, type SidebarContentProps, SidebarDivider, type SidebarDividerProps, SidebarFooter, type SidebarFooterProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonAnimation, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonListItem, type SkeletonListItemProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SkeletonVariant, type SortDirection, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, type StatusType, Step, StepContent, type StepContentProps, StepIndicator, type StepIndicatorProps, StepLabel, type StepLabelProps, type StepProps, type StepStatus, Stepper, type StepperOrientation, type StepperProps, Switch, type SwitchProps, type SwitchSize, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsOrientation, type TabsProps, type TabsVariant, Toast, type ToastConfig, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastStatus, ToolbarButton, ToolbarButtonGroup, type ToolbarButtonGroupProps, type ToolbarButtonProps, type ToolbarButtonSize, type ToolbarButtonVariant, Tooltip, type TooltipPlacement, type TooltipProps, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type UseTableOptions, type UseTableReturn, alpha, cn, composeValidators, createFieldId, formatDateTime, getContrastText, getFieldAriaProps, getFieldValidationProps, getLuminance, getResultColor, getStatusColor, hasMaxLength, hasMinLength, isEmpty, isValidEmail, useTable, useToast, useToolbarButton, validationRules };
|
|
2597
|
+
export { Accordion, AccordionButton, type AccordionButtonProps, AccordionItem, type AccordionItemProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, type AlertStatus, AlertTitle, type AlertTitleProps, type AlertVariant, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarBadge, type AvatarBadgeProps, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeColor, type BadgeProps, type BadgeSize, BadgeText, type BadgeTextProps, type BadgeVariant, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonColor, ButtonIcon, type ButtonIconProps, type ButtonProps, type ButtonSize, ButtonSpinner, type ButtonSpinnerProps, ButtonText, type ButtonTextProps, type ButtonVariant, Caption, type CaptionProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, type CardElevation, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardSkeleton, type CardSkeletonProps, CardTitle, type CardTitleProps, type CardVariant, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, Chip, type ChipColor, type ChipProps, type ChipSize, type ChipVariant, CircularProgress, type CircularProgressProps, Collapse, CollapseButton, type CollapseButtonProps, CollapseContent, type CollapseContentProps, type CollapseProps, DataRow, type DataRowProps, DateTime, type DateTimeFormat, type DateTimeProps, Divider, type DividerOrientation, type DividerProps, Drawer, DrawerBody, type DrawerBodyProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, type DrawerProps, type DrawerSize, ElevationLevel, EmptyState, type EmptyStateProps, type FieldState, type FieldWrapperProps, FormActions, type FormActionsProps, type FormErrors, FormField, type FormFieldProps, FormRow, type FormRowProps, FormSection, type FormSectionProps, type FormTouched, type FormValues, GlowIntensity, HStack, Heading, type HeadingProps, HelpTip, type HelpTipIcon, type HelpTipPlacement, type HelpTipProps, type HelpTipSize, IconBox, type IconBoxProps, Input, InputGroup, type InputGroupProps, type InputProps, type InputSize, type InputVariant, Label, type LabelProps, LabelWithHelp, type LabelWithHelpProps, Link, type LinkColor, type LinkProps, type LinkUnderline, ListItem, ListItemContent, type ListItemContentProps, ListItemDivider, type ListItemDividerProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemTrailing, type ListItemTrailingProps, Menu, MenuDivider, type MenuDividerProps, MenuGroup, type MenuGroupProps, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MenuTrigger, type MenuTriggerProps, Metric, MetricGroup, type MetricGroupProps, type MetricProps, type MetricTrend, Modal, ModalBody, type ModalBodyProps, ModalCloseButton, type ModalCloseButtonProps, ModalContent, type ModalContentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalSize, ModalTitle, type ModalTitleProps, Overline, type OverlineProps, Paragraph, type ParagraphProps, PasswordInput, type PasswordInputProps, Popover, PopoverCloseButton, type PopoverCloseButtonProps, PopoverContent, type PopoverContentProps, type PopoverPlacement, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressColor, type ProgressProps, type ProgressSize, ProgressSteps, type ProgressStepsProps, type ProgressVariant, Radio, type RadioColor, RadioGroup, type RadioGroupProps, type RadioProps, type RadioSize, type ResultType, Section, SectionContent, type SectionContentProps, SectionHeader, type SectionHeaderProps, type SectionProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarContent, type SidebarContentProps, SidebarDivider, type SidebarDividerProps, SidebarFooter, type SidebarFooterProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonAnimation, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonListItem, type SkeletonListItemProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SkeletonVariant, type SortDirection, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, Stack, type StackProps, type StatusType, Step, StepContent, type StepContentProps, StepIndicator, type StepIndicatorProps, StepLabel, type StepLabelProps, type StepProps, type StepStatus, Stepper, type StepperOrientation, type StepperProps, Surface, type SurfaceProps, Switch, type SwitchProps, type SwitchSize, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsOrientation, type TabsProps, type TabsVariant, Toast, type ToastConfig, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastStatus, ToolbarButton, ToolbarButtonGroup, type ToolbarButtonGroupProps, type ToolbarButtonProps, type ToolbarButtonSize, type ToolbarButtonVariant, Tooltip, type TooltipPlacement, type TooltipProps, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type UseTableOptions, type UseTableReturn, VStack, alpha, cn, composeValidators, createFieldId, formatDateTime, getContrastText, getFieldAriaProps, getFieldValidationProps, getLuminance, getResultColor, getStatusColor, hasMaxLength, hasMinLength, isEmpty, isValidEmail, useTable, useToast, useToolbarButton, validationRules };
|
package/dist/index.js
CHANGED
|
@@ -1329,7 +1329,7 @@ function hsvToRgb(h, s, v) {
|
|
|
1329
1329
|
const c = v * s;
|
|
1330
1330
|
const x = c * (1 - Math.abs(h / 60 % 2 - 1));
|
|
1331
1331
|
const m = v - c;
|
|
1332
|
-
let rPrime
|
|
1332
|
+
let rPrime, gPrime, bPrime;
|
|
1333
1333
|
if (h >= 0 && h < 60) {
|
|
1334
1334
|
rPrime = c;
|
|
1335
1335
|
gPrime = x;
|
|
@@ -1880,6 +1880,28 @@ function getValidatedElevation(component, requested) {
|
|
|
1880
1880
|
(prev, curr) => Math.abs(curr - requested) < Math.abs(prev - requested) ? curr : prev
|
|
1881
1881
|
);
|
|
1882
1882
|
}
|
|
1883
|
+
var glowConfig = {
|
|
1884
|
+
subtle: { blur: 12, spread: 0, opacity: 0.25 },
|
|
1885
|
+
medium: { blur: 20, spread: 2, opacity: 0.4 },
|
|
1886
|
+
strong: { blur: 30, spread: 4, opacity: 0.55 }
|
|
1887
|
+
};
|
|
1888
|
+
function getGlowShadow(color, intensity = "medium") {
|
|
1889
|
+
const config = glowConfig[intensity];
|
|
1890
|
+
const rgb = hexToRgb(color);
|
|
1891
|
+
if (!rgb) return {};
|
|
1892
|
+
return reactNative.Platform.select({
|
|
1893
|
+
web: {
|
|
1894
|
+
boxShadow: `0 0 ${config.blur}px ${config.spread}px rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${config.opacity})`
|
|
1895
|
+
},
|
|
1896
|
+
default: {
|
|
1897
|
+
shadowColor: color,
|
|
1898
|
+
shadowOffset: { width: 0, height: 0 },
|
|
1899
|
+
shadowOpacity: config.opacity,
|
|
1900
|
+
shadowRadius: config.blur / 2,
|
|
1901
|
+
elevation: 0
|
|
1902
|
+
}
|
|
1903
|
+
});
|
|
1904
|
+
}
|
|
1883
1905
|
function getTheme() {
|
|
1884
1906
|
if (typeof document === "undefined") return "dark";
|
|
1885
1907
|
return document.documentElement.classList.contains("light") ? "light" : "dark";
|
|
@@ -4912,6 +4934,177 @@ function FormRow({
|
|
|
4912
4934
|
}
|
|
4913
4935
|
);
|
|
4914
4936
|
}
|
|
4937
|
+
var gapClasses = {
|
|
4938
|
+
0: "gap-0",
|
|
4939
|
+
1: "gap-1",
|
|
4940
|
+
2: "gap-2",
|
|
4941
|
+
3: "gap-3",
|
|
4942
|
+
4: "gap-4",
|
|
4943
|
+
5: "gap-5",
|
|
4944
|
+
6: "gap-6",
|
|
4945
|
+
8: "gap-8",
|
|
4946
|
+
10: "gap-10",
|
|
4947
|
+
12: "gap-12"
|
|
4948
|
+
};
|
|
4949
|
+
var alignMap = {
|
|
4950
|
+
start: "items-start",
|
|
4951
|
+
center: "items-center",
|
|
4952
|
+
end: "items-end",
|
|
4953
|
+
stretch: "items-stretch"
|
|
4954
|
+
};
|
|
4955
|
+
var justifyMap = {
|
|
4956
|
+
start: "justify-start",
|
|
4957
|
+
center: "justify-center",
|
|
4958
|
+
end: "justify-end",
|
|
4959
|
+
between: "justify-between",
|
|
4960
|
+
around: "justify-around"
|
|
4961
|
+
};
|
|
4962
|
+
function Stack({
|
|
4963
|
+
gap = 0,
|
|
4964
|
+
align,
|
|
4965
|
+
justify,
|
|
4966
|
+
wrap,
|
|
4967
|
+
className,
|
|
4968
|
+
children,
|
|
4969
|
+
...props
|
|
4970
|
+
}) {
|
|
4971
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4972
|
+
reactNative.View,
|
|
4973
|
+
{
|
|
4974
|
+
className: cn(
|
|
4975
|
+
"flex",
|
|
4976
|
+
gapClasses[gap],
|
|
4977
|
+
align && alignMap[align],
|
|
4978
|
+
justify && justifyMap[justify],
|
|
4979
|
+
wrap && "flex-wrap",
|
|
4980
|
+
className
|
|
4981
|
+
),
|
|
4982
|
+
...props,
|
|
4983
|
+
children
|
|
4984
|
+
}
|
|
4985
|
+
);
|
|
4986
|
+
}
|
|
4987
|
+
function HStack(props) {
|
|
4988
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Stack, { ...props, className: cn("flex-row", props.className) });
|
|
4989
|
+
}
|
|
4990
|
+
function VStack(props) {
|
|
4991
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Stack, { ...props, className: cn("flex-col", props.className) });
|
|
4992
|
+
}
|
|
4993
|
+
function Section({ className, children, ...props }) {
|
|
4994
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: cn("mb-6", className), ...props, children });
|
|
4995
|
+
}
|
|
4996
|
+
function SectionHeader({ title, subtitle, trailing, className }) {
|
|
4997
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: cn("flex-row items-center justify-between mb-3 px-1", className), children: [
|
|
4998
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: "flex-1", children: [
|
|
4999
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: "text-sm font-semibold text-text-secondary uppercase tracking-wider", children: title }),
|
|
5000
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: "text-xs text-text-tertiary mt-0.5", children: subtitle })
|
|
5001
|
+
] }),
|
|
5002
|
+
trailing && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { children: trailing })
|
|
5003
|
+
] });
|
|
5004
|
+
}
|
|
5005
|
+
function SectionContent({ className, children, ...props }) {
|
|
5006
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: cn(className), ...props, children });
|
|
5007
|
+
}
|
|
5008
|
+
function DataRow({ label, value, valueClassName, className, ...props }) {
|
|
5009
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: cn("flex-row items-center justify-between py-2", className), ...props, children: [
|
|
5010
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: "text-sm text-text-secondary", children: label }),
|
|
5011
|
+
typeof value === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: cn("text-sm font-medium text-text-primary", valueClassName), children: value }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: cn(valueClassName), children: value })
|
|
5012
|
+
] });
|
|
5013
|
+
}
|
|
5014
|
+
var colorClasses = {
|
|
5015
|
+
primary: { bg: "bg-brand-primary/10", icon: "text-brand-primary" },
|
|
5016
|
+
secondary: { bg: "bg-brand-secondary/10", icon: "text-brand-secondary" },
|
|
5017
|
+
success: { bg: "bg-status-success/10", icon: "text-status-success" },
|
|
5018
|
+
error: { bg: "bg-status-error/10", icon: "text-status-error" },
|
|
5019
|
+
warning: { bg: "bg-status-warning/10", icon: "text-status-warning" },
|
|
5020
|
+
info: { bg: "bg-status-info/10", icon: "text-status-info" },
|
|
5021
|
+
neutral: { bg: "bg-surface-elevated", icon: "text-text-secondary" }
|
|
5022
|
+
};
|
|
5023
|
+
var sizeClasses = {
|
|
5024
|
+
sm: { box: "w-8 h-8 rounded-lg", iconSize: 16 },
|
|
5025
|
+
md: { box: "w-10 h-10 rounded-xl", iconSize: 20 },
|
|
5026
|
+
lg: { box: "w-12 h-12 rounded-xl", iconSize: 24 }
|
|
5027
|
+
};
|
|
5028
|
+
function IconBox({
|
|
5029
|
+
icon: Icon,
|
|
5030
|
+
color = "neutral",
|
|
5031
|
+
size = "md",
|
|
5032
|
+
className,
|
|
5033
|
+
...props
|
|
5034
|
+
}) {
|
|
5035
|
+
const colors = colorClasses[color];
|
|
5036
|
+
const sizes = sizeClasses[size];
|
|
5037
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5038
|
+
reactNative.View,
|
|
5039
|
+
{
|
|
5040
|
+
className: cn("items-center justify-center", colors.bg, sizes.box, className),
|
|
5041
|
+
...props,
|
|
5042
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: sizes.iconSize, className: colors.icon })
|
|
5043
|
+
}
|
|
5044
|
+
);
|
|
5045
|
+
}
|
|
5046
|
+
function Surface({
|
|
5047
|
+
elevation = 0,
|
|
5048
|
+
glowColor,
|
|
5049
|
+
glowIntensity,
|
|
5050
|
+
theme = "dark",
|
|
5051
|
+
className,
|
|
5052
|
+
style,
|
|
5053
|
+
children,
|
|
5054
|
+
...props
|
|
5055
|
+
}) {
|
|
5056
|
+
const baseColor = getBaseSurfaceColor(theme);
|
|
5057
|
+
const surfaceColor = getElevationSurface(baseColor, elevation, theme);
|
|
5058
|
+
const shadowStyle = getElevationShadow(baseColor, elevation, theme);
|
|
5059
|
+
const glowStyle = glowColor ? getGlowShadow(glowColor, glowIntensity) : {};
|
|
5060
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5061
|
+
reactNative.View,
|
|
5062
|
+
{
|
|
5063
|
+
className: cn("rounded-2xl", className),
|
|
5064
|
+
style: [
|
|
5065
|
+
{ backgroundColor: surfaceColor },
|
|
5066
|
+
shadowStyle,
|
|
5067
|
+
glowStyle,
|
|
5068
|
+
style
|
|
5069
|
+
],
|
|
5070
|
+
...props,
|
|
5071
|
+
children
|
|
5072
|
+
}
|
|
5073
|
+
);
|
|
5074
|
+
}
|
|
5075
|
+
function ListItem({ className, children, onPress, ...props }) {
|
|
5076
|
+
const Container = onPress ? reactNative.Pressable : reactNative.View;
|
|
5077
|
+
const containerProps = onPress ? { onPress, ...props } : props;
|
|
5078
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5079
|
+
Container,
|
|
5080
|
+
{
|
|
5081
|
+
className: cn("flex-row items-center py-3 px-4 min-h-[48px]", className),
|
|
5082
|
+
...containerProps,
|
|
5083
|
+
children
|
|
5084
|
+
}
|
|
5085
|
+
);
|
|
5086
|
+
}
|
|
5087
|
+
function ListItemIcon({ icon: Icon, className, ...props }) {
|
|
5088
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: cn("mr-3 items-center justify-center", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 20, className: "text-text-secondary" }) });
|
|
5089
|
+
}
|
|
5090
|
+
function ListItemContent({ title, subtitle, className, ...props }) {
|
|
5091
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: cn("flex-1 justify-center", className), ...props, children: [
|
|
5092
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: "text-sm font-medium text-text-primary", children: title }),
|
|
5093
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: "text-xs text-text-secondary mt-0.5", children: subtitle })
|
|
5094
|
+
] });
|
|
5095
|
+
}
|
|
5096
|
+
function ListItemTrailing({ className, children, ...props }) {
|
|
5097
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: cn("ml-3 items-center justify-center", className), ...props, children });
|
|
5098
|
+
}
|
|
5099
|
+
function ListItemDivider({ inset = true, className, ...props }) {
|
|
5100
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5101
|
+
reactNative.View,
|
|
5102
|
+
{
|
|
5103
|
+
className: cn("h-px bg-divider", inset ? "ml-14" : "", className),
|
|
5104
|
+
...props
|
|
5105
|
+
}
|
|
5106
|
+
);
|
|
5107
|
+
}
|
|
4915
5108
|
var variantStyles4 = {
|
|
4916
5109
|
h1: "font-heading text-5xl font-bold leading-tight",
|
|
4917
5110
|
h2: "font-heading text-4xl font-bold leading-tight",
|
|
@@ -5740,6 +5933,57 @@ function formatDateTime(value, format = "datetime", isUTC = false, fallback = "-
|
|
|
5740
5933
|
}
|
|
5741
5934
|
return formatDate(value, format, isUTC);
|
|
5742
5935
|
}
|
|
5936
|
+
var sizeConfig2 = {
|
|
5937
|
+
sm: { value: "text-lg font-bold", label: "text-xs", unit: "text-xs" },
|
|
5938
|
+
md: { value: "text-2xl font-bold", label: "text-xs", unit: "text-sm" },
|
|
5939
|
+
lg: { value: "text-4xl font-bold", label: "text-sm", unit: "text-base" }
|
|
5940
|
+
};
|
|
5941
|
+
var trendColors = {
|
|
5942
|
+
up: "text-result-improve",
|
|
5943
|
+
down: "text-result-degrade",
|
|
5944
|
+
neutral: "text-result-inconclusive"
|
|
5945
|
+
};
|
|
5946
|
+
var trendArrows = {
|
|
5947
|
+
up: "\u2191",
|
|
5948
|
+
down: "\u2193",
|
|
5949
|
+
neutral: "\u2192"
|
|
5950
|
+
};
|
|
5951
|
+
function Metric({
|
|
5952
|
+
value,
|
|
5953
|
+
label,
|
|
5954
|
+
unit,
|
|
5955
|
+
trend,
|
|
5956
|
+
size = "md",
|
|
5957
|
+
className,
|
|
5958
|
+
...props
|
|
5959
|
+
}) {
|
|
5960
|
+
const styles2 = sizeConfig2[size];
|
|
5961
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: cn("items-center", className), ...props, children: [
|
|
5962
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: "flex-row items-baseline gap-1", children: [
|
|
5963
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: cn(styles2.value, "text-text-primary"), children: value }),
|
|
5964
|
+
unit && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: cn(styles2.unit, "text-text-tertiary"), children: unit }),
|
|
5965
|
+
trend && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: cn(styles2.unit, trendColors[trend]), children: trendArrows[trend] })
|
|
5966
|
+
] }),
|
|
5967
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: cn(styles2.label, "text-text-secondary mt-1"), children: label })
|
|
5968
|
+
] });
|
|
5969
|
+
}
|
|
5970
|
+
function MetricGroup({
|
|
5971
|
+
className,
|
|
5972
|
+
children,
|
|
5973
|
+
...props
|
|
5974
|
+
}) {
|
|
5975
|
+
const items = React24__default.default.Children.toArray(children);
|
|
5976
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: cn("flex-row items-center", className), ...props, children: items.map((child, i) => /* @__PURE__ */ jsxRuntime.jsxs(React24__default.default.Fragment, { children: [
|
|
5977
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "flex-1 items-center", children: child }),
|
|
5978
|
+
i < items.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5979
|
+
reactNative.View,
|
|
5980
|
+
{
|
|
5981
|
+
className: "w-px h-8 bg-divider mx-2",
|
|
5982
|
+
testID: "metric-divider"
|
|
5983
|
+
}
|
|
5984
|
+
)
|
|
5985
|
+
] }, i)) });
|
|
5986
|
+
}
|
|
5743
5987
|
|
|
5744
5988
|
// src/utils/colors.ts
|
|
5745
5989
|
function getStatusColor(status) {
|
|
@@ -5922,6 +6166,7 @@ exports.CircularProgress = CircularProgress;
|
|
|
5922
6166
|
exports.Collapse = Collapse;
|
|
5923
6167
|
exports.CollapseButton = CollapseButton;
|
|
5924
6168
|
exports.CollapseContent = CollapseContent;
|
|
6169
|
+
exports.DataRow = DataRow;
|
|
5925
6170
|
exports.DateTime = DateTime;
|
|
5926
6171
|
exports.Divider = Divider;
|
|
5927
6172
|
exports.Drawer = Drawer;
|
|
@@ -5933,19 +6178,28 @@ exports.FormActions = FormActions;
|
|
|
5933
6178
|
exports.FormField = FormField;
|
|
5934
6179
|
exports.FormRow = FormRow;
|
|
5935
6180
|
exports.FormSection = FormSection;
|
|
6181
|
+
exports.HStack = HStack;
|
|
5936
6182
|
exports.Heading = Heading;
|
|
5937
6183
|
exports.HelpTip = HelpTip;
|
|
6184
|
+
exports.IconBox = IconBox;
|
|
5938
6185
|
exports.Input = Input;
|
|
5939
6186
|
exports.InputGroup = InputGroup;
|
|
5940
6187
|
exports.Label = Label;
|
|
5941
6188
|
exports.LabelWithHelp = LabelWithHelp;
|
|
5942
6189
|
exports.Link = Link;
|
|
6190
|
+
exports.ListItem = ListItem;
|
|
6191
|
+
exports.ListItemContent = ListItemContent;
|
|
6192
|
+
exports.ListItemDivider = ListItemDivider;
|
|
6193
|
+
exports.ListItemIcon = ListItemIcon;
|
|
6194
|
+
exports.ListItemTrailing = ListItemTrailing;
|
|
5943
6195
|
exports.Menu = Menu;
|
|
5944
6196
|
exports.MenuDivider = MenuDivider;
|
|
5945
6197
|
exports.MenuGroup = MenuGroup;
|
|
5946
6198
|
exports.MenuItem = MenuItem;
|
|
5947
6199
|
exports.MenuList = MenuList;
|
|
5948
6200
|
exports.MenuTrigger = MenuTrigger;
|
|
6201
|
+
exports.Metric = Metric;
|
|
6202
|
+
exports.MetricGroup = MetricGroup;
|
|
5949
6203
|
exports.Modal = Modal;
|
|
5950
6204
|
exports.ModalBody = ModalBody;
|
|
5951
6205
|
exports.ModalCloseButton = ModalCloseButton;
|
|
@@ -5964,6 +6218,9 @@ exports.Progress = Progress;
|
|
|
5964
6218
|
exports.ProgressSteps = ProgressSteps;
|
|
5965
6219
|
exports.Radio = Radio;
|
|
5966
6220
|
exports.RadioGroup = RadioGroup;
|
|
6221
|
+
exports.Section = Section;
|
|
6222
|
+
exports.SectionContent = SectionContent;
|
|
6223
|
+
exports.SectionHeader = SectionHeader;
|
|
5967
6224
|
exports.Select = Select;
|
|
5968
6225
|
exports.Sidebar = Sidebar;
|
|
5969
6226
|
exports.SidebarContent = SidebarContent;
|
|
@@ -5978,11 +6235,13 @@ exports.SkeletonCircle = SkeletonCircle;
|
|
|
5978
6235
|
exports.SkeletonListItem = SkeletonListItem;
|
|
5979
6236
|
exports.SkeletonText = SkeletonText;
|
|
5980
6237
|
exports.Spinner = Spinner;
|
|
6238
|
+
exports.Stack = Stack;
|
|
5981
6239
|
exports.Step = Step;
|
|
5982
6240
|
exports.StepContent = StepContent;
|
|
5983
6241
|
exports.StepIndicator = StepIndicator;
|
|
5984
6242
|
exports.StepLabel = StepLabel;
|
|
5985
6243
|
exports.Stepper = Stepper;
|
|
6244
|
+
exports.Surface = Surface;
|
|
5986
6245
|
exports.Switch = Switch;
|
|
5987
6246
|
exports.Tab = Tab;
|
|
5988
6247
|
exports.TabList = TabList;
|
|
@@ -6002,6 +6261,7 @@ exports.ToolbarButton = ToolbarButton;
|
|
|
6002
6261
|
exports.ToolbarButtonGroup = ToolbarButtonGroup;
|
|
6003
6262
|
exports.Tooltip = Tooltip;
|
|
6004
6263
|
exports.Typography = Typography;
|
|
6264
|
+
exports.VStack = VStack;
|
|
6005
6265
|
exports.alpha = alpha;
|
|
6006
6266
|
exports.buttonSizes = buttonSizes;
|
|
6007
6267
|
exports.cn = cn;
|
|
@@ -6026,6 +6286,7 @@ exports.getElevationShadow = getElevationShadow;
|
|
|
6026
6286
|
exports.getElevationSurface = getElevationSurface;
|
|
6027
6287
|
exports.getFieldAriaProps = getFieldAriaProps;
|
|
6028
6288
|
exports.getFieldValidationProps = getFieldValidationProps;
|
|
6289
|
+
exports.getGlowShadow = getGlowShadow;
|
|
6029
6290
|
exports.getHoverColors = getHoverColors;
|
|
6030
6291
|
exports.getLuminance = getLuminance;
|
|
6031
6292
|
exports.getResultColor = getResultColor;
|