@castui/cast-ui 3.0.0 → 3.1.0

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 (49) hide show
  1. package/dist/components/Button/Button.d.ts +40 -0
  2. package/dist/components/Button/Button.d.ts.map +1 -0
  3. package/dist/components/Button/Button.js +93 -0
  4. package/dist/components/Button/Button.js.map +1 -0
  5. package/dist/components/Button/index.d.ts +2 -0
  6. package/dist/components/Button/index.d.ts.map +1 -0
  7. package/dist/components/Button/index.js +2 -0
  8. package/dist/components/Button/index.js.map +1 -0
  9. package/dist/components/Icon/Icon.d.ts +25 -0
  10. package/dist/components/Icon/Icon.d.ts.map +1 -0
  11. package/dist/components/Icon/Icon.js +28 -0
  12. package/dist/components/Icon/Icon.js.map +1 -0
  13. package/dist/components/Icon/index.d.ts +2 -0
  14. package/dist/components/Icon/index.d.ts.map +1 -0
  15. package/dist/components/Icon/index.js +2 -0
  16. package/dist/components/Icon/index.js.map +1 -0
  17. package/dist/index.d.ts +4 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +9 -3
  20. package/dist/index.js.map +1 -1
  21. package/dist/theme/ThemeContext.d.ts +59 -0
  22. package/dist/theme/ThemeContext.d.ts.map +1 -0
  23. package/dist/theme/ThemeContext.js +92 -0
  24. package/dist/theme/ThemeContext.js.map +1 -0
  25. package/dist/theme/index.d.ts +4 -0
  26. package/dist/theme/index.d.ts.map +1 -0
  27. package/dist/theme/index.js +3 -0
  28. package/dist/theme/index.js.map +1 -0
  29. package/dist/theme/themes.d.ts +14 -0
  30. package/dist/theme/themes.d.ts.map +1 -0
  31. package/dist/theme/themes.js +98 -0
  32. package/dist/theme/themes.js.map +1 -0
  33. package/dist/theme/types.d.ts +34 -0
  34. package/dist/theme/types.d.ts.map +1 -0
  35. package/dist/theme/types.js +8 -0
  36. package/dist/theme/types.js.map +1 -0
  37. package/dist/tokens/colors.d.ts +35 -0
  38. package/dist/tokens/colors.d.ts.map +1 -0
  39. package/dist/tokens/colors.js +74 -0
  40. package/dist/tokens/colors.js.map +1 -0
  41. package/dist/tokens/index.d.ts +3 -0
  42. package/dist/tokens/index.d.ts.map +1 -0
  43. package/dist/tokens/index.js +3 -0
  44. package/dist/tokens/index.js.map +1 -0
  45. package/dist/tokens/typography.d.ts +27 -0
  46. package/dist/tokens/typography.d.ts.map +1 -0
  47. package/dist/tokens/typography.js +30 -0
  48. package/dist/tokens/typography.js.map +1 -0
  49. package/package.json +1 -1
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Button — the foundational interactive component of Cast UI.
3
+ *
4
+ * Maps 1:1 to the Figma <Button> component:
5
+ * intent → neutral | brand | danger
6
+ * prominence → default | bold | subtle
7
+ * size → small | default | large
8
+ *
9
+ * Spacing tokens come from the density theme (compact/default/comfortable).
10
+ * Colours come from the semantic intent system (constant across densities).
11
+ * Typography uses the label scale (sm/md/lg) matched to the button size.
12
+ */
13
+ import React from 'react';
14
+ import { type ViewStyle, type StyleProp, type GestureResponderEvent } from 'react-native';
15
+ import type { IntentName, ProminenceName } from '../../tokens';
16
+ export type ButtonSize = 'small' | 'default' | 'large';
17
+ export type ButtonProps = {
18
+ /** The button label text. */
19
+ children: string;
20
+ /** Semantic intent — drives the colour scheme. */
21
+ intent?: IntentName;
22
+ /** Visual weight — default (outlined), bold (filled), or subtle (ghost). */
23
+ prominence?: ProminenceName;
24
+ /** Size variant — controls padding, gap, and typography scale. */
25
+ size?: ButtonSize;
26
+ /** Disables interaction and applies muted styling. */
27
+ disabled?: boolean;
28
+ /** Icon before the label — Material Symbols name string or a ReactNode. */
29
+ leadingIcon?: string | React.ReactNode;
30
+ /** Icon after the label — Material Symbols name string or a ReactNode. */
31
+ trailingIcon?: string | React.ReactNode;
32
+ /** Press handler. */
33
+ onPress?: (e: GestureResponderEvent) => void;
34
+ /** Outer style — use for positioning (margin, flex, alignSelf). */
35
+ style?: StyleProp<ViewStyle>;
36
+ /** Accessibility label — falls back to children text if not provided. */
37
+ accessibilityLabel?: string;
38
+ };
39
+ export declare function Button({ children, intent, prominence, size, disabled, leadingIcon, trailingIcon, onPress, style, accessibilityLabel, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
40
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,qBAAqB,EAC3B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAO/D,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvD,MAAM,MAAM,WAAW,GAAG;IACxB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,kEAAkE;IAClE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACvC,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACxC,qBAAqB;IACrB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7C,mEAAmE;IACnE,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAoBF,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,MAAkB,EAClB,UAAsB,EACtB,IAAgB,EAChB,QAAgB,EAChB,WAAW,EACX,YAAY,EACZ,OAAO,EACP,KAAK,EACL,kBAAkB,GACnB,EAAE,WAAW,2CAwGb"}
@@ -0,0 +1,93 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Button — the foundational interactive component of Cast UI.
4
+ *
5
+ * Maps 1:1 to the Figma <Button> component:
6
+ * intent → neutral | brand | danger
7
+ * prominence → default | bold | subtle
8
+ * size → small | default | large
9
+ *
10
+ * Spacing tokens come from the density theme (compact/default/comfortable).
11
+ * Colours come from the semantic intent system (constant across densities).
12
+ * Typography uses the label scale (sm/md/lg) matched to the button size.
13
+ */
14
+ import { useState, useCallback } from 'react';
15
+ import { Pressable, Text, View, Platform, } from 'react-native';
16
+ import { useTheme } from '../../theme';
17
+ import { fontFamily, fontWeight, label, controlTokens } from '../../tokens';
18
+ import { Icon } from '../Icon';
19
+ // ---------------------------------------------------------------------------
20
+ // Constants
21
+ // ---------------------------------------------------------------------------
22
+ /** Maps button size → label typography scale */
23
+ const LABEL_SCALE = {
24
+ small: 'sm',
25
+ default: 'md',
26
+ large: 'lg',
27
+ };
28
+ /** Icon size — fixed at 16px per Figma spec, all button sizes. */
29
+ const ICON_SIZE = 16;
30
+ // ---------------------------------------------------------------------------
31
+ // Component
32
+ // ---------------------------------------------------------------------------
33
+ export function Button({ children, intent = 'neutral', prominence = 'default', size = 'default', disabled = false, leadingIcon, trailingIcon, onPress, style, accessibilityLabel, }) {
34
+ const { components, colors } = useTheme();
35
+ const [isFocused, setIsFocused] = useState(false);
36
+ const [isHovered, setIsHovered] = useState(false);
37
+ // Resolve tokens for current size + density
38
+ const sizeTokens = components.button[size];
39
+ const labelTokens = label[LABEL_SCALE[size]];
40
+ const intentClrs = colors[intent];
41
+ // Resolve colours based on interaction state
42
+ const getStateColors = useCallback((pressed, hovered) => {
43
+ if (disabled) {
44
+ return {
45
+ bg: '#F3F4F6',
46
+ fg: '#9CA3AF',
47
+ border: '#E5E7EB',
48
+ };
49
+ }
50
+ if (pressed)
51
+ return intentClrs[prominence].active;
52
+ if (hovered)
53
+ return intentClrs[prominence].hover;
54
+ return intentClrs[prominence].default;
55
+ }, [disabled, intentClrs, prominence]);
56
+ return (_jsx(Pressable, { onPress: onPress, disabled: disabled, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), onHoverIn: () => setIsHovered(true), onHoverOut: () => setIsHovered(false), accessibilityRole: "button", accessibilityLabel: accessibilityLabel || children, accessibilityState: { disabled }, style: style, children: ({ pressed }) => {
57
+ const stateColors = getStateColors(pressed, isHovered);
58
+ const containerStyle = {
59
+ flexDirection: 'row',
60
+ alignItems: 'center',
61
+ justifyContent: 'center',
62
+ alignSelf: 'flex-start',
63
+ gap: sizeTokens.gap,
64
+ paddingHorizontal: sizeTokens.paddingX,
65
+ paddingVertical: sizeTokens.paddingY,
66
+ borderRadius: sizeTokens.borderRadius,
67
+ borderWidth: controlTokens.borderWidth,
68
+ borderColor: stateColors.border,
69
+ backgroundColor: stateColors.bg,
70
+ };
71
+ // Web-only: focus ring via CSS outline
72
+ const focusStyle = isFocused && !disabled && Platform.OS === 'web'
73
+ ? {
74
+ outlineWidth: sizeTokens.focusRingWidth,
75
+ outlineColor: intentClrs.ringColour,
76
+ outlineStyle: 'solid',
77
+ outlineOffset: sizeTokens.focusRingOffset,
78
+ }
79
+ : {};
80
+ // Resolve icon props — strings become <Icon> with auto-matched colour
81
+ const resolvedLeading = typeof leadingIcon === 'string' ? (_jsx(Icon, { name: leadingIcon, size: ICON_SIZE, color: stateColors.fg })) : (leadingIcon);
82
+ const resolvedTrailing = typeof trailingIcon === 'string' ? (_jsx(Icon, { name: trailingIcon, size: ICON_SIZE, color: stateColors.fg })) : (trailingIcon);
83
+ return (_jsxs(View, { style: [containerStyle, focusStyle], children: [resolvedLeading, _jsx(Text, { style: {
84
+ fontFamily: fontFamily.sans,
85
+ fontWeight: fontWeight.medium,
86
+ fontSize: labelTokens.fontSize,
87
+ lineHeight: labelTokens.lineHeight,
88
+ letterSpacing: labelTokens.letterSpacing,
89
+ color: stateColors.fg,
90
+ }, selectable: false, children: children }), resolvedTrailing] }));
91
+ } }));
92
+ }
93
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export { Button, type ButtonProps, type ButtonSize } from './Button';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAqC,MAAM,UAAU,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Icon — renders a Material Symbols Outlined icon by name.
3
+ *
4
+ * Uses the Material Symbols font with ligature rendering.
5
+ * The `name` prop matches Material Symbols names exactly
6
+ * (e.g., "star", "close", "chevron_right", "add").
7
+ *
8
+ * Requires the MaterialSymbolsOutlined font to be loaded:
9
+ * - Web: Google Fonts CSS import
10
+ * - Expo: expo-font
11
+ * - Bare RN: font asset linking
12
+ */
13
+ import { type TextStyle, type StyleProp } from 'react-native';
14
+ export type IconProps = {
15
+ /** Material Symbols icon name (e.g., "star", "close", "settings"). */
16
+ name: string;
17
+ /** Icon size in pixels. Defaults to 20. */
18
+ size?: number;
19
+ /** Icon colour. Defaults to "#374151" (neutral fg). */
20
+ color?: string;
21
+ /** Additional style overrides. */
22
+ style?: StyleProp<TextStyle>;
23
+ };
24
+ export declare function Icon({ name, size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
25
+ //# sourceMappingURL=Icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAkB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9E,MAAM,MAAM,SAAS,GAAG;IACtB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAOF,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,KAAiB,EAAE,KAAK,EAAE,EAAE,SAAS,2CA6B5E"}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Text, Platform } from 'react-native';
3
+ const FONT_FAMILY = Platform.select({
4
+ web: '"Material Symbols Outlined", sans-serif',
5
+ default: 'MaterialSymbolsOutlined',
6
+ });
7
+ export function Icon({ name, size = 20, color = '#374151', style }) {
8
+ return (_jsx(Text, { selectable: false, accessibilityElementsHidden: true, importantForAccessibility: "no", style: [
9
+ {
10
+ fontFamily: FONT_FAMILY,
11
+ fontSize: size,
12
+ lineHeight: size,
13
+ color,
14
+ // Prevent ligature text from taking extra space
15
+ width: size,
16
+ height: size,
17
+ textAlign: 'center',
18
+ // Reset any inherited text styles
19
+ fontWeight: '400',
20
+ fontStyle: 'normal',
21
+ letterSpacing: 0,
22
+ textTransform: 'none',
23
+ textDecorationLine: 'none',
24
+ },
25
+ style,
26
+ ], children: name }));
27
+ }
28
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAkC,MAAM,cAAc,CAAC;AAa9E,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC;IAClC,GAAG,EAAE,yCAAyC;IAC9C,OAAO,EAAE,yBAAyB;CACnC,CAAC,CAAC;AAEH,MAAM,UAAU,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,EAAa;IAC3E,OAAO,CACL,KAAC,IAAI,IACH,UAAU,EAAE,KAAK,EACjB,2BAA2B,QAC3B,yBAAyB,EAAC,IAAI,EAC9B,KAAK,EAAE;YACL;gBACE,UAAU,EAAE,WAAW;gBACvB,QAAQ,EAAE,IAAI;gBACd,UAAU,EAAE,IAAI;gBAChB,KAAK;gBACL,gDAAgD;gBAChD,KAAK,EAAE,IAAI;gBACX,MAAM,EAAE,IAAI;gBACZ,SAAS,EAAE,QAAQ;gBACnB,kCAAkC;gBAClC,UAAU,EAAE,KAAK;gBACjB,SAAS,EAAE,QAAQ;gBACnB,aAAa,EAAE,CAAC;gBAChB,aAAa,EAAE,MAAM;gBACrB,kBAAkB,EAAE,MAAM;aAC3B;YACD,KAAK;SACN,YAEA,IAAI,GACA,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Icon, type IconProps } from './Icon';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Icon } from './Icon';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1 +1,5 @@
1
+ export { intentColors, disabledColors, controlTokens, fontFamily, fontWeight, label, type IntentName, type ProminenceName, type StateName, type LabelSize, } from './tokens';
2
+ export { ThemeProvider, useTheme, themes, type Theme, type ThemeProviderProps, type DensityTheme, type ComponentTokens, type ButtonSizeTokens, type ButtonThemeTokens, type DeepPartial, } from './theme';
3
+ export { Button, type ButtonProps, type ButtonSize } from './components/Button';
4
+ export { Icon, type IconProps } from './components/Icon';
1
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,aAAa,EACb,UAAU,EACV,UAAU,EACV,KAAK,EACL,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,GACf,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,aAAa,EACb,QAAQ,EACR,MAAM,EACN,KAAK,KAAK,EACV,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,10 @@
1
- "use strict";
2
- // Cast UI - Component Library
3
- // Export components here as they are created
1
+ // Cast UI — Cross-platform design system component library
2
+ //
3
+ // Tokens
4
+ export { intentColors, disabledColors, controlTokens, fontFamily, fontWeight, label, } from './tokens';
5
+ // Theme
6
+ export { ThemeProvider, useTheme, themes, } from './theme';
7
+ // Components
8
+ export { Button } from './components/Button';
9
+ export { Icon } from './components/Icon';
4
10
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,6CAA6C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,SAAS;AACT,OAAO,EACL,YAAY,EACZ,cAAc,EACd,aAAa,EACb,UAAU,EACV,UAAU,EACV,KAAK,GAKN,MAAM,UAAU,CAAC;AAElB,QAAQ;AACR,OAAO,EACL,aAAa,EACb,QAAQ,EACR,MAAM,GAQP,MAAM,SAAS,CAAC;AAEjB,aAAa;AACb,OAAO,EAAE,MAAM,EAAqC,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAkB,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * ThemeProvider — wraps your app to enable density theming and colour customisation.
3
+ *
4
+ * @example Basic usage — switch density
5
+ * ```tsx
6
+ * import { ThemeProvider } from '@castui/cast-ui';
7
+ *
8
+ * <ThemeProvider density="comfortable">
9
+ * <App />
10
+ * </ThemeProvider>
11
+ * ```
12
+ *
13
+ * @example Rebrand — override intent colours
14
+ * ```tsx
15
+ * <ThemeProvider
16
+ * density="default"
17
+ * colors={{
18
+ * brand: {
19
+ * bold: {
20
+ * default: { bg: '#7C3AED', fg: '#FFFFFF', border: '#7C3AED' },
21
+ * hover: { bg: '#6D28D9', fg: '#FFFFFF', border: '#6D28D9' },
22
+ * active: { bg: '#5B21B6', fg: '#FFFFFF', border: '#5B21B6' },
23
+ * },
24
+ * },
25
+ * }}
26
+ * >
27
+ * <App />
28
+ * </ThemeProvider>
29
+ * ```
30
+ */
31
+ import React from 'react';
32
+ import { intentColors as defaultIntentColors, disabledColors as defaultDisabledColors } from '../tokens/colors';
33
+ import type { IntentName } from '../tokens/colors';
34
+ import type { DensityTheme, ComponentTokens, DeepPartial } from './types';
35
+ type IntentColorMap = typeof defaultIntentColors;
36
+ export type Theme = {
37
+ density: DensityTheme;
38
+ components: ComponentTokens;
39
+ colors: IntentColorMap;
40
+ disabledColors: typeof defaultDisabledColors;
41
+ };
42
+ export type ThemeProviderProps = {
43
+ /** Density theme — controls spacing and padding across all components. */
44
+ density?: DensityTheme;
45
+ /**
46
+ * Partial colour overrides — deep-merged with the default intent colours.
47
+ * Only provide the values you want to change; everything else stays default.
48
+ */
49
+ colors?: Partial<Record<IntentName, DeepPartial<IntentColorMap[IntentName]>>>;
50
+ children: React.ReactNode;
51
+ };
52
+ export declare function ThemeProvider({ density, colors, children, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
53
+ /**
54
+ * Access the current theme — density tokens, intent colours, and component tokens.
55
+ * Must be called within a ThemeProvider; falls back to the "default" density if not.
56
+ */
57
+ export declare function useTheme(): Theme;
58
+ export {};
59
+ //# sourceMappingURL=ThemeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAA6C,MAAM,OAAO,CAAC;AAElE,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,cAAc,IAAI,qBAAqB,EACxC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAM1E,KAAK,cAAc,GAAG,OAAO,mBAAmB,CAAC;AAEjD,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,eAAe,CAAC;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,cAAc,EAAE,OAAO,qBAAqB,CAAC;CAC9C,CAAC;AAkDF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,OAAmB,EACnB,MAAM,EACN,QAAQ,GACT,EAAE,kBAAkB,2CAiBpB;AAMD;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,KAAK,CAEhC"}
@@ -0,0 +1,92 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * ThemeProvider — wraps your app to enable density theming and colour customisation.
4
+ *
5
+ * @example Basic usage — switch density
6
+ * ```tsx
7
+ * import { ThemeProvider } from '@castui/cast-ui';
8
+ *
9
+ * <ThemeProvider density="comfortable">
10
+ * <App />
11
+ * </ThemeProvider>
12
+ * ```
13
+ *
14
+ * @example Rebrand — override intent colours
15
+ * ```tsx
16
+ * <ThemeProvider
17
+ * density="default"
18
+ * colors={{
19
+ * brand: {
20
+ * bold: {
21
+ * default: { bg: '#7C3AED', fg: '#FFFFFF', border: '#7C3AED' },
22
+ * hover: { bg: '#6D28D9', fg: '#FFFFFF', border: '#6D28D9' },
23
+ * active: { bg: '#5B21B6', fg: '#FFFFFF', border: '#5B21B6' },
24
+ * },
25
+ * },
26
+ * }}
27
+ * >
28
+ * <App />
29
+ * </ThemeProvider>
30
+ * ```
31
+ */
32
+ import { createContext, useContext, useMemo } from 'react';
33
+ import { themes } from './themes';
34
+ import { intentColors as defaultIntentColors, disabledColors as defaultDisabledColors, } from '../tokens/colors';
35
+ // ---------------------------------------------------------------------------
36
+ // Deep merge utility (for partial colour overrides)
37
+ // ---------------------------------------------------------------------------
38
+ function deepMerge(base, overrides) {
39
+ const result = { ...base };
40
+ for (const key of Object.keys(overrides)) {
41
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype')
42
+ continue;
43
+ const baseVal = base[key];
44
+ const overVal = overrides[key];
45
+ if (overVal &&
46
+ typeof overVal === 'object' &&
47
+ !Array.isArray(overVal) &&
48
+ baseVal &&
49
+ typeof baseVal === 'object') {
50
+ result[key] = deepMerge(baseVal, overVal);
51
+ }
52
+ else {
53
+ result[key] = overVal;
54
+ }
55
+ }
56
+ return result;
57
+ }
58
+ // ---------------------------------------------------------------------------
59
+ // Context
60
+ // ---------------------------------------------------------------------------
61
+ const defaultTheme = {
62
+ density: 'default',
63
+ components: themes.default,
64
+ colors: defaultIntentColors,
65
+ disabledColors: defaultDisabledColors,
66
+ };
67
+ const ThemeContext = createContext(defaultTheme);
68
+ export function ThemeProvider({ density = 'default', colors, children, }) {
69
+ const theme = useMemo(() => {
70
+ const resolvedColors = colors
71
+ ? deepMerge(defaultIntentColors, colors)
72
+ : defaultIntentColors;
73
+ return {
74
+ density,
75
+ components: themes[density],
76
+ colors: resolvedColors,
77
+ disabledColors: defaultDisabledColors,
78
+ };
79
+ }, [density, colors]);
80
+ return (_jsx(ThemeContext.Provider, { value: theme, children: children }));
81
+ }
82
+ // ---------------------------------------------------------------------------
83
+ // Hook
84
+ // ---------------------------------------------------------------------------
85
+ /**
86
+ * Access the current theme — density tokens, intent colours, and component tokens.
87
+ * Must be called within a ThemeProvider; falls back to the "default" density if not.
88
+ */
89
+ export function useTheme() {
90
+ return useContext(ThemeContext);
91
+ }
92
+ //# sourceMappingURL=ThemeContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,cAAc,IAAI,qBAAqB,GACxC,MAAM,kBAAkB,CAAC;AAiB1B,8EAA8E;AAC9E,oDAAoD;AACpD,8EAA8E;AAE9E,SAAS,SAAS,CAChB,IAAO,EACP,SAAkC;IAElC,MAAM,MAAM,GAA4B,EAAE,GAAG,IAAI,EAAE,CAAC;IACpD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACzC,IAAI,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,aAAa,IAAI,GAAG,KAAK,WAAW;YAAE,SAAS;QAClF,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;QAC/B,IACE,OAAO;YACP,OAAO,OAAO,KAAK,QAAQ;YAC3B,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;YACvB,OAAO;YACP,OAAO,OAAO,KAAK,QAAQ,EAC3B,CAAC;YACD,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CACrB,OAAkC,EAClC,OAAkC,CACnC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;QACxB,CAAC;IACH,CAAC;IACD,OAAO,MAAW,CAAC;AACrB,CAAC;AAED,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,MAAM,YAAY,GAAU;IAC1B,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,MAAM,CAAC,OAAO;IAC1B,MAAM,EAAE,mBAAmB;IAC3B,cAAc,EAAE,qBAAqB;CACtC,CAAC;AAEF,MAAM,YAAY,GAAG,aAAa,CAAQ,YAAY,CAAC,CAAC;AAiBxD,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,GAAG,SAAS,EACnB,MAAM,EACN,QAAQ,GACW;IACnB,MAAM,KAAK,GAAG,OAAO,CAAQ,GAAG,EAAE;QAChC,MAAM,cAAc,GAAG,MAAM;YAC3B,CAAC,CAAC,SAAS,CAAC,mBAAmB,EAAE,MAAiC,CAAC;YACnE,CAAC,CAAC,mBAAmB,CAAC;QAExB,OAAO;YACL,OAAO;YACP,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC;YAC3B,MAAM,EAAE,cAAgC;YACxC,cAAc,EAAE,qBAAqB;SACtC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtB,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CACxE,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,OAAO;AACP,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,UAAU,QAAQ;IACtB,OAAO,UAAU,CAAC,YAAY,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { ThemeProvider, useTheme, type ThemeProviderProps, type Theme } from './ThemeContext';
2
+ export { themes } from './themes';
3
+ export type { DensityTheme, ComponentTokens, ButtonSizeTokens, ButtonThemeTokens, DeepPartial, } from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,kBAAkB,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EACV,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,GACZ,MAAM,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ThemeProvider, useTheme } from './ThemeContext';
2
+ export { themes } from './themes';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAuC,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Density theme definitions — extracted from component token files.
3
+ *
4
+ * Source files:
5
+ * design-tokens/component/component-compact.tokens.json
6
+ * design-tokens/component/component-default.tokens.json
7
+ * design-tokens/component/component-comfortable.tokens.json
8
+ *
9
+ * Values verified against Figma variable defs.
10
+ * Only spacing/sizing tokens live here — colours are constant across densities.
11
+ */
12
+ import type { DensityTheme, ComponentTokens } from './types';
13
+ export declare const themes: Record<DensityTheme, ComponentTokens>;
14
+ //# sourceMappingURL=themes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/theme/themes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE7D,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,eAAe,CAuFxD,CAAC"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Density theme definitions — extracted from component token files.
3
+ *
4
+ * Source files:
5
+ * design-tokens/component/component-compact.tokens.json
6
+ * design-tokens/component/component-default.tokens.json
7
+ * design-tokens/component/component-comfortable.tokens.json
8
+ *
9
+ * Values verified against Figma variable defs.
10
+ * Only spacing/sizing tokens live here — colours are constant across densities.
11
+ */
12
+ export const themes = {
13
+ compact: {
14
+ button: {
15
+ small: {
16
+ gap: 4,
17
+ paddingX: 6,
18
+ paddingY: 2,
19
+ borderRadius: 8,
20
+ focusRingWidth: 2,
21
+ focusRingOffset: 2,
22
+ },
23
+ default: {
24
+ gap: 8,
25
+ paddingX: 10,
26
+ paddingY: 6,
27
+ borderRadius: 8,
28
+ focusRingWidth: 2,
29
+ focusRingOffset: 2,
30
+ },
31
+ large: {
32
+ gap: 16,
33
+ paddingX: 20,
34
+ paddingY: 14,
35
+ borderRadius: 8,
36
+ focusRingWidth: 2,
37
+ focusRingOffset: 2,
38
+ },
39
+ },
40
+ },
41
+ default: {
42
+ button: {
43
+ small: {
44
+ gap: 8,
45
+ paddingX: 10,
46
+ paddingY: 6,
47
+ borderRadius: 8,
48
+ focusRingWidth: 2,
49
+ focusRingOffset: 2,
50
+ },
51
+ default: {
52
+ gap: 12,
53
+ paddingX: 14,
54
+ paddingY: 10,
55
+ borderRadius: 8,
56
+ focusRingWidth: 2,
57
+ focusRingOffset: 2,
58
+ },
59
+ large: {
60
+ gap: 20,
61
+ paddingX: 24,
62
+ paddingY: 16,
63
+ borderRadius: 8,
64
+ focusRingWidth: 2,
65
+ focusRingOffset: 2,
66
+ },
67
+ },
68
+ },
69
+ comfortable: {
70
+ button: {
71
+ small: {
72
+ gap: 12,
73
+ paddingX: 14,
74
+ paddingY: 10,
75
+ borderRadius: 8,
76
+ focusRingWidth: 2,
77
+ focusRingOffset: 2,
78
+ },
79
+ default: {
80
+ gap: 16,
81
+ paddingX: 20,
82
+ paddingY: 14,
83
+ borderRadius: 8,
84
+ focusRingWidth: 2,
85
+ focusRingOffset: 2,
86
+ },
87
+ large: {
88
+ gap: 24,
89
+ paddingX: 32,
90
+ paddingY: 20,
91
+ borderRadius: 8,
92
+ focusRingWidth: 2,
93
+ focusRingOffset: 2,
94
+ },
95
+ },
96
+ },
97
+ };
98
+ //# sourceMappingURL=themes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/theme/themes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,MAAM,CAAC,MAAM,MAAM,GAA0C;IAC3D,OAAO,EAAE;QACP,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,GAAG,EAAE,CAAC;gBACN,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,CAAC;gBACX,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,eAAe,EAAE,CAAC;aACnB;YACD,OAAO,EAAE;gBACP,GAAG,EAAE,CAAC;gBACN,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,CAAC;gBACX,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,eAAe,EAAE,CAAC;aACnB;YACD,KAAK,EAAE;gBACL,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,EAAE;gBACZ,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,eAAe,EAAE,CAAC;aACnB;SACF;KACF;IAED,OAAO,EAAE;QACP,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,GAAG,EAAE,CAAC;gBACN,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,CAAC;gBACX,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,eAAe,EAAE,CAAC;aACnB;YACD,OAAO,EAAE;gBACP,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,EAAE;gBACZ,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,eAAe,EAAE,CAAC;aACnB;YACD,KAAK,EAAE;gBACL,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,EAAE;gBACZ,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,eAAe,EAAE,CAAC;aACnB;SACF;KACF;IAED,WAAW,EAAE;QACX,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,EAAE;gBACZ,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,eAAe,EAAE,CAAC;aACnB;YACD,OAAO,EAAE;gBACP,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,EAAE;gBACZ,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,eAAe,EAAE,CAAC;aACnB;YACD,KAAK,EAAE;gBACL,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,EAAE;gBACZ,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,eAAe,EAAE,CAAC;aACnB;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Theme type definitions for the Cast UI density system.
3
+ *
4
+ * The density axis controls spacing/sizing tokens only.
5
+ * Colours and typography are constants — they don't change with density.
6
+ */
7
+ export type DensityTheme = 'compact' | 'default' | 'comfortable';
8
+ /** Spacing/sizing tokens for a single button size variant */
9
+ export type ButtonSizeTokens = {
10
+ gap: number;
11
+ paddingX: number;
12
+ paddingY: number;
13
+ borderRadius: number;
14
+ focusRingWidth: number;
15
+ focusRingOffset: number;
16
+ };
17
+ /** All three button sizes */
18
+ export type ButtonThemeTokens = {
19
+ small: ButtonSizeTokens;
20
+ default: ButtonSizeTokens;
21
+ large: ButtonSizeTokens;
22
+ };
23
+ /**
24
+ * Component-level tokens that vary by density theme.
25
+ * Extended as new components are added to the library.
26
+ */
27
+ export type ComponentTokens = {
28
+ button: ButtonThemeTokens;
29
+ };
30
+ /** Utility type for partial overrides at any depth */
31
+ export type DeepPartial<T> = {
32
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
33
+ };
34
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AAEjE,6DAA6D;AAC7D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,6BAA6B;AAC7B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,sDAAsD;AACtD,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Theme type definitions for the Cast UI density system.
3
+ *
4
+ * The density axis controls spacing/sizing tokens only.
5
+ * Colours and typography are constants — they don't change with density.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Semantic intent colors — derived from semantic.tokens.json
3
+ * Maps: intent → prominence → state → { bg, fg, border }
4
+ *
5
+ * Source tokens: intent/{intent}/{prominence}/{state}/{bg|fg|border}
6
+ * Primitive palette refs: blue (brand), cool-grey (neutral), red (danger)
7
+ */
8
+ type StateColors = {
9
+ bg: string;
10
+ fg: string;
11
+ border: string;
12
+ };
13
+ type ProminenceColors = {
14
+ default: StateColors;
15
+ hover: StateColors;
16
+ active: StateColors;
17
+ };
18
+ type IntentColors = {
19
+ default: ProminenceColors;
20
+ bold: ProminenceColors;
21
+ subtle: ProminenceColors;
22
+ ringColour: string;
23
+ };
24
+ export type IntentName = 'brand' | 'neutral' | 'danger';
25
+ export type ProminenceName = 'default' | 'bold' | 'subtle';
26
+ export type StateName = 'default' | 'hover' | 'active';
27
+ export declare const intentColors: Record<IntentName, IntentColors>;
28
+ /** Disabled state — shared across all intents */
29
+ export declare const disabledColors: StateColors;
30
+ /** Semantic control constants */
31
+ export declare const controlTokens: {
32
+ borderWidth: number;
33
+ };
34
+ export {};
35
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/tokens/colors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC3D,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,CAuDzD,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,cAAc,EAAE,WAI5B,CAAC;AAEF,iCAAiC;AACjC,eAAO,MAAM,aAAa;;CAEzB,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Semantic intent colors — derived from semantic.tokens.json
3
+ * Maps: intent → prominence → state → { bg, fg, border }
4
+ *
5
+ * Source tokens: intent/{intent}/{prominence}/{state}/{bg|fg|border}
6
+ * Primitive palette refs: blue (brand), cool-grey (neutral), red (danger)
7
+ */
8
+ export const intentColors = {
9
+ neutral: {
10
+ default: {
11
+ default: { bg: '#FFFFFF', fg: '#374151', border: '#D1D5DB' },
12
+ hover: { bg: '#F9FAFB', fg: '#1F2937', border: '#9CA3AF' },
13
+ active: { bg: '#F3F4F6', fg: '#111827', border: '#6B7280' },
14
+ },
15
+ bold: {
16
+ default: { bg: '#374151', fg: '#FFFFFF', border: '#374151' },
17
+ hover: { bg: '#1F2937', fg: '#FFFFFF', border: '#1F2937' },
18
+ active: { bg: '#111827', fg: '#FFFFFF', border: '#111827' },
19
+ },
20
+ subtle: {
21
+ default: { bg: 'transparent', fg: '#374151', border: 'transparent' },
22
+ hover: { bg: '#F9FAFB', fg: '#1F2937', border: 'transparent' },
23
+ active: { bg: '#F3F4F6', fg: '#111827', border: 'transparent' },
24
+ },
25
+ ringColour: '#9CA3AF',
26
+ },
27
+ brand: {
28
+ default: {
29
+ default: { bg: '#FFFFFF', fg: '#2563EB', border: '#93C5FD' },
30
+ hover: { bg: '#EFF6FF', fg: '#1D4ED8', border: '#60A5FA' },
31
+ active: { bg: '#DBEAFE', fg: '#1E40AF', border: '#3B82F6' },
32
+ },
33
+ bold: {
34
+ default: { bg: '#2563EB', fg: '#FFFFFF', border: '#2563EB' },
35
+ hover: { bg: '#1D4ED8', fg: '#FFFFFF', border: '#1D4ED8' },
36
+ active: { bg: '#1E40AF', fg: '#FFFFFF', border: '#1E40AF' },
37
+ },
38
+ subtle: {
39
+ default: { bg: 'transparent', fg: '#2563EB', border: 'transparent' },
40
+ hover: { bg: '#EFF6FF', fg: '#1D4ED8', border: 'transparent' },
41
+ active: { bg: '#DBEAFE', fg: '#1E40AF', border: 'transparent' },
42
+ },
43
+ ringColour: '#60A5FA',
44
+ },
45
+ danger: {
46
+ default: {
47
+ default: { bg: '#FFFFFF', fg: '#DC2626', border: '#FCA5A5' },
48
+ hover: { bg: '#FEF2F2', fg: '#B91C1C', border: '#F87171' },
49
+ active: { bg: '#FEE2E2', fg: '#991B1B', border: '#EF4444' },
50
+ },
51
+ bold: {
52
+ default: { bg: '#DC2626', fg: '#FFFFFF', border: '#DC2626' },
53
+ hover: { bg: '#B91C1C', fg: '#FFFFFF', border: '#B91C1C' },
54
+ active: { bg: '#991B1B', fg: '#FFFFFF', border: '#991B1B' },
55
+ },
56
+ subtle: {
57
+ default: { bg: 'transparent', fg: '#DC2626', border: 'transparent' },
58
+ hover: { bg: '#FEF2F2', fg: '#B91C1C', border: 'transparent' },
59
+ active: { bg: '#FEE2E2', fg: '#991B1B', border: 'transparent' },
60
+ },
61
+ ringColour: '#F87171',
62
+ },
63
+ };
64
+ /** Disabled state — shared across all intents */
65
+ export const disabledColors = {
66
+ bg: '#F3F4F6',
67
+ fg: '#9CA3AF',
68
+ border: '#E5E7EB',
69
+ };
70
+ /** Semantic control constants */
71
+ export const controlTokens = {
72
+ borderWidth: 1,
73
+ };
74
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/tokens/colors.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ export { intentColors, disabledColors, controlTokens, type IntentName, type ProminenceName, type StateName, } from './colors';
2
+ export { fontFamily, fontWeight, label, type LabelSize } from './typography';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,aAAa,EACb,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { intentColors, disabledColors, controlTokens, } from './colors';
2
+ export { fontFamily, fontWeight, label } from './typography';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,aAAa,GAId,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAkB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Typography tokens — derived from primitive.tokens.json + semantic.tokens.json
3
+ *
4
+ * Source tokens:
5
+ * font-family/{sans|mono|serif}
6
+ * font-weight/{light|regular|medium|semibold|bold}
7
+ * label/{sm|md|lg} → fontSize, lineHeight, letterSpacing
8
+ */
9
+ export declare const fontFamily: {
10
+ readonly sans: string;
11
+ readonly mono: string;
12
+ readonly serif: string;
13
+ };
14
+ export declare const fontWeight: {
15
+ light: "300";
16
+ regular: "400";
17
+ medium: "500";
18
+ semibold: "600";
19
+ bold: "700";
20
+ };
21
+ export type LabelSize = 'sm' | 'md' | 'lg';
22
+ export declare const label: Record<LabelSize, {
23
+ fontSize: number;
24
+ lineHeight: number;
25
+ letterSpacing: number;
26
+ }>;
27
+ //# sourceMappingURL=typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/tokens/typography.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,UAAU;;;;CAOb,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,eAAO,MAAM,KAAK,EAAE,MAAM,CACxB,SAAS,EACT;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAKhE,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Typography tokens — derived from primitive.tokens.json + semantic.tokens.json
3
+ *
4
+ * Source tokens:
5
+ * font-family/{sans|mono|serif}
6
+ * font-weight/{light|regular|medium|semibold|bold}
7
+ * label/{sm|md|lg} → fontSize, lineHeight, letterSpacing
8
+ */
9
+ import { Platform } from 'react-native';
10
+ export const fontFamily = {
11
+ sans: Platform.select({ web: 'Inter, system-ui, sans-serif', default: 'Inter' }),
12
+ mono: Platform.select({
13
+ web: '"JetBrains Mono", monospace',
14
+ default: 'JetBrains Mono',
15
+ }),
16
+ serif: Platform.select({ web: '"Noto Serif", serif', default: 'Noto Serif' }),
17
+ };
18
+ export const fontWeight = {
19
+ light: '300',
20
+ regular: '400',
21
+ medium: '500',
22
+ semibold: '600',
23
+ bold: '700',
24
+ };
25
+ export const label = {
26
+ sm: { fontSize: 12, lineHeight: 16, letterSpacing: 0.25 },
27
+ md: { fontSize: 14, lineHeight: 20, letterSpacing: 0 },
28
+ lg: { fontSize: 16, lineHeight: 24, letterSpacing: 0 },
29
+ };
30
+ //# sourceMappingURL=typography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/tokens/typography.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,8BAA8B,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAChF,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;QACpB,GAAG,EAAE,6BAA6B;QAClC,OAAO,EAAE,gBAAgB;KAC1B,CAAC;IACF,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;CACrE,CAAC;AAEX,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,KAAc;IACrB,OAAO,EAAE,KAAc;IACvB,MAAM,EAAE,KAAc;IACtB,QAAQ,EAAE,KAAc;IACxB,IAAI,EAAE,KAAc;CACrB,CAAC;AAIF,MAAM,CAAC,MAAM,KAAK,GAGd;IACF,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;IACzD,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE;IACtD,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE;CACvD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@castui/cast-ui",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "A cross-platform design system for React Native (iOS, Android, Web) with multi-theme support.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",