@castui/cast-ui 0.3.0 → 0.4.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/README.md +123 -61
- package/dist/default.reference.json +125 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeProvider.d.ts +7 -5
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +8 -6
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/createTheme.d.ts +49 -0
- package/dist/theme/createTheme.d.ts.map +1 -0
- package/dist/theme/createTheme.js +85 -0
- package/dist/theme/createTheme.js.map +1 -0
- package/dist/theme/fonts.d.ts +41 -17
- package/dist/theme/fonts.d.ts.map +1 -1
- package/dist/theme/fonts.js +63 -22
- package/dist/theme/fonts.js.map +1 -1
- package/dist/theme/index.d.ts +3 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/types.d.ts +4 -3
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/types.js +3 -2
- package/dist/theme/types.js.map +1 -1
- package/dist/tokens/generated/default.d.ts +3 -0
- package/dist/tokens/generated/default.d.ts.map +1 -0
- package/dist/tokens/generated/{white-label.js → default.js} +3 -3
- package/dist/tokens/generated/default.js.map +1 -0
- package/dist/tokens/generated/index.d.ts +1 -4
- package/dist/tokens/generated/index.d.ts.map +1 -1
- package/dist/tokens/generated/index.js +1 -4
- package/dist/tokens/generated/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/tokens/generated/consumer.d.ts +0 -3
- package/dist/tokens/generated/consumer.d.ts.map +0 -1
- package/dist/tokens/generated/consumer.js +0 -126
- package/dist/tokens/generated/consumer.js.map +0 -1
- package/dist/tokens/generated/corporate.d.ts +0 -3
- package/dist/tokens/generated/corporate.d.ts.map +0 -1
- package/dist/tokens/generated/corporate.js +0 -126
- package/dist/tokens/generated/corporate.js.map +0 -1
- package/dist/tokens/generated/luxury.d.ts +0 -3
- package/dist/tokens/generated/luxury.d.ts.map +0 -1
- package/dist/tokens/generated/luxury.js +0 -126
- package/dist/tokens/generated/luxury.js.map +0 -1
- package/dist/tokens/generated/white-label.d.ts +0 -3
- package/dist/tokens/generated/white-label.d.ts.map +0 -1
- package/dist/tokens/generated/white-label.js.map +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme creation utility.
|
|
3
|
+
*
|
|
4
|
+
* `createTheme()` deep-merges partial overrides with the default base theme,
|
|
5
|
+
* producing a complete `CastTheme` object. This is the primary API for
|
|
6
|
+
* creating custom branded themes.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { createTheme, defaultTheme } from '@castui/cast-ui';
|
|
10
|
+
* import overrides from './my-brand.json';
|
|
11
|
+
*
|
|
12
|
+
* const myTheme = createTheme(overrides);
|
|
13
|
+
* // → complete CastTheme with your overrides applied on top of defaultTheme
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Deep merge
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
/**
|
|
20
|
+
* Recursively merge `source` into `target`, returning a new object.
|
|
21
|
+
* - Objects are recursed into.
|
|
22
|
+
* - Arrays and primitives from `source` replace `target` values.
|
|
23
|
+
*/
|
|
24
|
+
function deepMerge(target, source) {
|
|
25
|
+
const result = { ...target };
|
|
26
|
+
for (const key of Object.keys(source)) {
|
|
27
|
+
const sourceVal = source[key];
|
|
28
|
+
const targetVal = result[key];
|
|
29
|
+
if (sourceVal !== null &&
|
|
30
|
+
typeof sourceVal === 'object' &&
|
|
31
|
+
!Array.isArray(sourceVal) &&
|
|
32
|
+
targetVal !== null &&
|
|
33
|
+
typeof targetVal === 'object' &&
|
|
34
|
+
!Array.isArray(targetVal)) {
|
|
35
|
+
result[key] = deepMerge(targetVal, sourceVal);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
result[key] = sourceVal;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// createTheme
|
|
45
|
+
// ---------------------------------------------------------------------------
|
|
46
|
+
// Lazy reference to avoid circular import at module load time.
|
|
47
|
+
// `defaultTheme` is generated and imports from `types.ts`; this file also
|
|
48
|
+
// imports from `types.ts`, but we only need the *value* at call time.
|
|
49
|
+
let _defaultTheme;
|
|
50
|
+
function getDefaultTheme() {
|
|
51
|
+
if (!_defaultTheme) {
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
53
|
+
_defaultTheme = require('../tokens/generated').defaultTheme;
|
|
54
|
+
}
|
|
55
|
+
return _defaultTheme;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create a complete `CastTheme` by deep-merging partial overrides with a
|
|
59
|
+
* base theme (defaults to `defaultTheme`).
|
|
60
|
+
*
|
|
61
|
+
* Works with both small partial overrides *and* complete theme objects
|
|
62
|
+
* exported from Figma.
|
|
63
|
+
*
|
|
64
|
+
* @param overrides – Partial theme values to apply on top of the base.
|
|
65
|
+
* @param base – Optional base theme. Defaults to `defaultTheme`.
|
|
66
|
+
* @returns A complete, merged `CastTheme` object.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* // Minimal override – only change the primary colour
|
|
71
|
+
* const myTheme = createTheme({
|
|
72
|
+
* name: 'my-brand',
|
|
73
|
+
* semantic: { color: { primary: '#FF0000' } },
|
|
74
|
+
* });
|
|
75
|
+
*
|
|
76
|
+
* // Full override from a JSON file
|
|
77
|
+
* import overrides from './my-brand.json';
|
|
78
|
+
* const myTheme = createTheme(overrides);
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export function createTheme(overrides, base) {
|
|
82
|
+
const baseTheme = base ?? getDefaultTheme();
|
|
83
|
+
return deepMerge(baseTheme, overrides);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=createTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTheme.js","sourceRoot":"","sources":["../../src/theme/createTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgBH,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;GAIG;AACH,SAAS,SAAS,CAChB,MAAS,EACT,MAA+B;IAE/B,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAA6B,CAAC;IAExD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAE9B,IACE,SAAS,KAAK,IAAI;YAClB,OAAO,SAAS,KAAK,QAAQ;YAC7B,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;YACzB,SAAS,KAAK,IAAI;YAClB,OAAO,SAAS,KAAK,QAAQ;YAC7B,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EACzB,CAAC;YACD,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CACrB,SAAoC,EACpC,SAAoC,CACrC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,OAAO,MAAW,CAAC;AACrB,CAAC;AAED,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E,+DAA+D;AAC/D,0EAA0E;AAC1E,sEAAsE;AACtE,IAAI,aAAoC,CAAC;AAEzC,SAAS,eAAe;IACtB,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,iEAAiE;QACjE,aAAa,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC,YAAyB,CAAC;IAC3E,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,WAAW,CACzB,SAAiC,EACjC,IAAgB;IAEhB,MAAM,SAAS,GAAG,IAAI,IAAI,eAAe,EAAE,CAAC;IAC5C,OAAO,SAAS,CACd,SAA+C,EAC/C,SAA+C,CACxB,CAAC;AAC5B,CAAC"}
|
package/dist/theme/fonts.d.ts
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Font-loading helpers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* font-family names to `require()`-able assets (for Expo) or Google Fonts
|
|
6
|
-
* URLs (for web).
|
|
4
|
+
* Provides utilities for loading custom fonts used by any Cast UI theme.
|
|
7
5
|
*
|
|
8
|
-
* **
|
|
9
|
-
* rendering themed components:
|
|
6
|
+
* **Web** – use `googleFontsUrl(theme)` to generate a `<link>` href:
|
|
10
7
|
*
|
|
11
8
|
* ```ts
|
|
12
|
-
* import {
|
|
13
|
-
* import { THEME_FONTS } from '@castui/cast-ui/theme/fonts';
|
|
9
|
+
* import { googleFontsUrl } from '@castui/cast-ui';
|
|
14
10
|
*
|
|
15
|
-
* const
|
|
11
|
+
* const url = googleFontsUrl(myTheme);
|
|
12
|
+
* if (url) document.head.innerHTML += `<link href="${url}" rel="stylesheet" />`;
|
|
16
13
|
* ```
|
|
17
14
|
*
|
|
18
|
-
* **
|
|
19
|
-
*
|
|
15
|
+
* **React Native / Expo** – use `getThemeFontFamilies(theme)` to discover
|
|
16
|
+
* which font families need loading, then pass them to `expo-font`.
|
|
20
17
|
*
|
|
21
18
|
* ### Android font registration convention
|
|
22
19
|
*
|
|
@@ -34,18 +31,45 @@
|
|
|
34
31
|
* Use {@link resolveFont} in component styles to transparently handle this.
|
|
35
32
|
*/
|
|
36
33
|
import { type TextStyle } from 'react-native';
|
|
37
|
-
import type {
|
|
34
|
+
import type { CastTheme } from './types';
|
|
38
35
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
36
|
+
* Dynamically extract all non-`system-ui` font families from a theme object.
|
|
37
|
+
*
|
|
38
|
+
* Scans both the semantic `fontFamily` layer and component-level font
|
|
39
|
+
* properties to discover every custom font the theme uses. Returns a
|
|
40
|
+
* deduplicated array of family names suitable for loading via Google Fonts
|
|
41
|
+
* or `expo-font`.
|
|
42
|
+
*
|
|
43
|
+
* @param theme – Any complete `CastTheme` object.
|
|
44
|
+
* @returns Array of unique font family names (excluding `system-ui`).
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const families = getThemeFontFamilies(myTheme);
|
|
49
|
+
* // → ['Poppins'] or ['Inter', 'Merriweather'] etc.
|
|
50
|
+
* ```
|
|
42
51
|
*/
|
|
43
|
-
export declare
|
|
52
|
+
export declare function getThemeFontFamilies(theme: CastTheme): string[];
|
|
44
53
|
/**
|
|
45
54
|
* Google Fonts `<link>` href for a given theme.
|
|
46
|
-
*
|
|
55
|
+
*
|
|
56
|
+
* Dynamically inspects the theme to discover which font families are needed.
|
|
57
|
+
* Returns `null` if the theme uses only system fonts.
|
|
58
|
+
*
|
|
59
|
+
* @param theme – Any complete `CastTheme` object.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const url = googleFontsUrl(myTheme);
|
|
64
|
+
* if (url) {
|
|
65
|
+
* const link = document.createElement('link');
|
|
66
|
+
* link.href = url;
|
|
67
|
+
* link.rel = 'stylesheet';
|
|
68
|
+
* document.head.appendChild(link);
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
47
71
|
*/
|
|
48
|
-
export declare function googleFontsUrl(
|
|
72
|
+
export declare function googleFontsUrl(theme: CastTheme): string | null;
|
|
49
73
|
/**
|
|
50
74
|
* Suffix appended to a font family name on Android to select a specific
|
|
51
75
|
* weight. Matches the Expo Google Fonts registration convention.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/theme/fonts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/theme/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,EAAE,CAyB/D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAS9D;AAMD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIxD,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,YAAY,CAAC,CAmB9C"}
|
package/dist/theme/fonts.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Font-loading helpers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* font-family names to `require()`-able assets (for Expo) or Google Fonts
|
|
6
|
-
* URLs (for web).
|
|
4
|
+
* Provides utilities for loading custom fonts used by any Cast UI theme.
|
|
7
5
|
*
|
|
8
|
-
* **
|
|
9
|
-
* rendering themed components:
|
|
6
|
+
* **Web** – use `googleFontsUrl(theme)` to generate a `<link>` href:
|
|
10
7
|
*
|
|
11
8
|
* ```ts
|
|
12
|
-
* import {
|
|
13
|
-
* import { THEME_FONTS } from '@castui/cast-ui/theme/fonts';
|
|
9
|
+
* import { googleFontsUrl } from '@castui/cast-ui';
|
|
14
10
|
*
|
|
15
|
-
* const
|
|
11
|
+
* const url = googleFontsUrl(myTheme);
|
|
12
|
+
* if (url) document.head.innerHTML += `<link href="${url}" rel="stylesheet" />`;
|
|
16
13
|
* ```
|
|
17
14
|
*
|
|
18
|
-
* **
|
|
19
|
-
*
|
|
15
|
+
* **React Native / Expo** – use `getThemeFontFamilies(theme)` to discover
|
|
16
|
+
* which font families need loading, then pass them to `expo-font`.
|
|
20
17
|
*
|
|
21
18
|
* ### Android font registration convention
|
|
22
19
|
*
|
|
@@ -35,22 +32,66 @@
|
|
|
35
32
|
*/
|
|
36
33
|
import { Platform } from 'react-native';
|
|
37
34
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
35
|
+
* Dynamically extract all non-`system-ui` font families from a theme object.
|
|
36
|
+
*
|
|
37
|
+
* Scans both the semantic `fontFamily` layer and component-level font
|
|
38
|
+
* properties to discover every custom font the theme uses. Returns a
|
|
39
|
+
* deduplicated array of family names suitable for loading via Google Fonts
|
|
40
|
+
* or `expo-font`.
|
|
41
|
+
*
|
|
42
|
+
* @param theme – Any complete `CastTheme` object.
|
|
43
|
+
* @returns Array of unique font family names (excluding `system-ui`).
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const families = getThemeFontFamilies(myTheme);
|
|
48
|
+
* // → ['Poppins'] or ['Inter', 'Merriweather'] etc.
|
|
49
|
+
* ```
|
|
41
50
|
*/
|
|
42
|
-
export
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
export function getThemeFontFamilies(theme) {
|
|
52
|
+
const families = new Set();
|
|
53
|
+
// Semantic font families
|
|
54
|
+
const sf = theme.semantic.fontFamily;
|
|
55
|
+
for (const key of Object.keys(sf)) {
|
|
56
|
+
const family = sf[key];
|
|
57
|
+
if (family && family !== 'system-ui') {
|
|
58
|
+
families.add(family);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Component-level font families
|
|
62
|
+
const { button, card } = theme.component;
|
|
63
|
+
if (button.fontFamily && button.fontFamily !== 'system-ui') {
|
|
64
|
+
families.add(button.fontFamily);
|
|
65
|
+
}
|
|
66
|
+
if (card.headingFontFamily && card.headingFontFamily !== 'system-ui') {
|
|
67
|
+
families.add(card.headingFontFamily);
|
|
68
|
+
}
|
|
69
|
+
if (card.bodyFontFamily && card.bodyFontFamily !== 'system-ui') {
|
|
70
|
+
families.add(card.bodyFontFamily);
|
|
71
|
+
}
|
|
72
|
+
return Array.from(families);
|
|
73
|
+
}
|
|
48
74
|
/**
|
|
49
75
|
* Google Fonts `<link>` href for a given theme.
|
|
50
|
-
*
|
|
76
|
+
*
|
|
77
|
+
* Dynamically inspects the theme to discover which font families are needed.
|
|
78
|
+
* Returns `null` if the theme uses only system fonts.
|
|
79
|
+
*
|
|
80
|
+
* @param theme – Any complete `CastTheme` object.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const url = googleFontsUrl(myTheme);
|
|
85
|
+
* if (url) {
|
|
86
|
+
* const link = document.createElement('link');
|
|
87
|
+
* link.href = url;
|
|
88
|
+
* link.rel = 'stylesheet';
|
|
89
|
+
* document.head.appendChild(link);
|
|
90
|
+
* }
|
|
91
|
+
* ```
|
|
51
92
|
*/
|
|
52
|
-
export function googleFontsUrl(
|
|
53
|
-
const families =
|
|
93
|
+
export function googleFontsUrl(theme) {
|
|
94
|
+
const families = getThemeFontFamilies(theme);
|
|
54
95
|
if (families.length === 0)
|
|
55
96
|
return null;
|
|
56
97
|
const params = families
|
package/dist/theme/fonts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../src/theme/fonts.ts"],"names":[],"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ED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { CastThemeProvider, useTheme } from './ThemeProvider';
|
|
2
2
|
export type { CastThemeProviderProps } from './ThemeProvider';
|
|
3
|
-
export {
|
|
3
|
+
export { createTheme } from './createTheme';
|
|
4
|
+
export type { DeepPartial } from './createTheme';
|
|
5
|
+
export { getThemeFontFamilies, googleFontsUrl, resolveFont, ANDROID_WEIGHT_SUFFIX } from './fonts';
|
|
4
6
|
export type { CastTheme, ThemeName, SemanticTokens, SemanticColors, SemanticFontFamily, SemanticFontSize, SemanticFontWeight, SemanticLineHeight, SemanticLetterSpacing, SemanticParagraphSpacing, SemanticParagraphIndent, SemanticBorderRadius, ComponentTokens, ButtonTokens, ButtonVariantTokens, ButtonOutlineTokens, ButtonStateTokens, CardTokens, } from './types';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,YAAY,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,YAAY,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACnG,YAAY,EACV,SAAS,EACT,SAAS,EACT,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,GACX,MAAM,SAAS,CAAC"}
|
package/dist/theme/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { CastThemeProvider, useTheme } from './ThemeProvider';
|
|
2
|
-
export {
|
|
2
|
+
export { createTheme } from './createTheme';
|
|
3
|
+
export { getThemeFontFamilies, googleFontsUrl, resolveFont, ANDROID_WEIGHT_SUFFIX } from './fonts';
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
package/dist/theme/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cast Design System theme type.
|
|
3
3
|
*
|
|
4
|
-
* Every theme
|
|
5
|
-
*
|
|
4
|
+
* Every theme conforms to this interface. The library ships a Default base
|
|
5
|
+
* theme; consumers create custom themes via `createTheme()` with partial
|
|
6
|
+
* overrides. Components consume tokens via `useTheme()` and reference
|
|
6
7
|
* properties from the semantic and component layers.
|
|
7
8
|
*
|
|
8
9
|
* Generated theme objects resolve all Figma token aliases to final values.
|
|
@@ -141,7 +142,7 @@ export interface ComponentTokens {
|
|
|
141
142
|
button: ButtonTokens;
|
|
142
143
|
card: CardTokens;
|
|
143
144
|
}
|
|
144
|
-
export type ThemeName =
|
|
145
|
+
export type ThemeName = string;
|
|
145
146
|
export interface CastTheme {
|
|
146
147
|
name: ThemeName;
|
|
147
148
|
semantic: SemanticTokens;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IAEvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IAErB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IAEnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE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,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,eAAe,CAAC;CAC5B"}
|
package/dist/theme/types.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cast Design System theme type.
|
|
3
3
|
*
|
|
4
|
-
* Every theme
|
|
5
|
-
*
|
|
4
|
+
* Every theme conforms to this interface. The library ships a Default base
|
|
5
|
+
* theme; consumers create custom themes via `createTheme()` with partial
|
|
6
|
+
* overrides. Components consume tokens via `useTheme()` and reference
|
|
6
7
|
* properties from the semantic and component layers.
|
|
7
8
|
*
|
|
8
9
|
* Generated theme objects resolve all Figma token aliases to final values.
|
package/dist/theme/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/tokens/generated/default.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAO,MAAM,YAAY,EAAE,SA8I1B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: '
|
|
1
|
+
export const defaultTheme = {
|
|
2
|
+
name: 'default',
|
|
3
3
|
semantic: {
|
|
4
4
|
color: {
|
|
5
5
|
surface: "#FFFFFF",
|
|
@@ -123,4 +123,4 @@ export const whiteLabel = {
|
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
125
|
};
|
|
126
|
-
//# sourceMappingURL=
|
|
126
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/tokens/generated/default.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,YAAY,GAAc;IACrC,IAAI,EAAE,SAAS;IAEf,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,SAAS;YACpB,cAAc,EAAE,SAAS;YACzB,gBAAgB,EAAE,SAAS;YAE3B,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,SAAS;YACpB,YAAY,EAAE,SAAS;YACvB,cAAc,EAAE,SAAS;YAEzB,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE,SAAS;YAEtB,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,SAAS;YACpB,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,SAAS;YAEpB,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,SAAS;YAEvB,iBAAiB,EAAE,SAAS;YAC5B,UAAU,EAAE,SAAS;YAErB,gBAAgB,EAAE,SAAS;YAC3B,kBAAkB,EAAE,SAAS;YAC7B,kBAAkB,EAAE,SAAS;YAC7B,oBAAoB,EAAE,SAAS;YAC/B,cAAc,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S;gBACrB,OAAO,EAAE,SAAS;aACnB;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,SAAS;gBACrB,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,SAAS;aACnB;YACD,IAAI,EAAE;gBACJ,UAAU,EAAE,SAAS;gBACrB,OAAO,EAAE,SAAS;aACnB;YACD,KAAK,EAAE;gBACL,eAAe,EAAE,SAAS;gBAC1B,iBAAiB,EAAE,SAAS;gBAC5B,kBAAkB,EAAE,SAAS;gBAC7B,eAAe,EAAE,SAAS;aAC3B;SACF;QAED,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE;YACX,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,SAAS;YACrB,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,EAAE;YAChB,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,EAAE;YACf,aAAa,EAAE,GAAG;YAClB,iBAAiB,EAAE,WAAW;YAC9B,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,GAAG;YACf,cAAc,EAAE,WAAW;SAC5B;KACF;CACF,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
export type { CastTheme, ThemeName } from '../../theme/types';
|
|
2
|
-
export {
|
|
3
|
-
export { consumer } from './consumer';
|
|
4
|
-
export { corporate } from './corporate';
|
|
5
|
-
export { luxury } from './luxury';
|
|
2
|
+
export { defaultTheme } from './default';
|
|
6
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tokens/generated/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tokens/generated/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tokens/generated/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tokens/generated/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@castui/cast-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
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",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"storybook": "STORYBOOK_DISABLE_TELEMETRY=1 storybook dev -p 6006",
|
|
16
16
|
"prebuild-storybook": "npm run build:tokens",
|
|
17
17
|
"build-storybook": "STORYBOOK_DISABLE_TELEMETRY=1 storybook build",
|
|
18
|
-
"build": "npm run build:tokens && tsc --project tsconfig.build.json",
|
|
18
|
+
"build": "npm run build:tokens && tsc --project tsconfig.build.json && cp src/tokens/generated/default.reference.json dist/",
|
|
19
19
|
"prepublishOnly": "npm run build",
|
|
20
20
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
21
21
|
"zh:track-package": "zh-adoption track-package"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consumer.d.ts","sourceRoot":"","sources":["../../../src/tokens/generated/consumer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAO,MAAM,QAAQ,EAAE,SA8ItB,CAAC"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
export const consumer = {
|
|
2
|
-
name: 'consumer',
|
|
3
|
-
semantic: {
|
|
4
|
-
color: {
|
|
5
|
-
surface: "#FFFFFF",
|
|
6
|
-
onSurface: "#553C9A",
|
|
7
|
-
onSurfaceMuted: "#475569",
|
|
8
|
-
surfaceContainer: "#F8FAFC",
|
|
9
|
-
primary: "#553C9A",
|
|
10
|
-
onPrimary: "#FFFFFF",
|
|
11
|
-
primaryHover: "#9F7AEA",
|
|
12
|
-
primaryPressed: "#D6BCFA",
|
|
13
|
-
secondary: "#D6BCFA",
|
|
14
|
-
onSecondary: "#553C9A",
|
|
15
|
-
success: "#3DC253",
|
|
16
|
-
onSuccess: "#FFFFFF",
|
|
17
|
-
error: "#E46262",
|
|
18
|
-
onError: "#FFFFFF",
|
|
19
|
-
warning: "#CAAD5F",
|
|
20
|
-
onWarning: "#000000",
|
|
21
|
-
border: "#E2E8F0",
|
|
22
|
-
borderSubtle: "#F8FAFC",
|
|
23
|
-
disabledContainer: "#E2E8F0",
|
|
24
|
-
onDisabled: "#94A3B8",
|
|
25
|
-
primaryContainer: "#F5F0FF",
|
|
26
|
-
onPrimaryContainer: "#3B2870",
|
|
27
|
-
secondaryContainer: "#F5F0FF",
|
|
28
|
-
onSecondaryContainer: "#3B2870",
|
|
29
|
-
errorContainer: "#FDF2F2",
|
|
30
|
-
onErrorContainer: "#4A0808",
|
|
31
|
-
successContainer: "#F0FDF1",
|
|
32
|
-
onSuccessContainer: "#084A14",
|
|
33
|
-
warningContainer: "#FDF8EB",
|
|
34
|
-
onWarningContainer: "#6B592D",
|
|
35
|
-
},
|
|
36
|
-
fontFamily: {
|
|
37
|
-
brand: "Poppins",
|
|
38
|
-
interface: "Poppins",
|
|
39
|
-
data: "JetBrains Mono",
|
|
40
|
-
},
|
|
41
|
-
fontSize: {
|
|
42
|
-
display: 39,
|
|
43
|
-
h1: 31,
|
|
44
|
-
h2: 25,
|
|
45
|
-
h3: 20,
|
|
46
|
-
body: 16,
|
|
47
|
-
small: 12.800000190734863,
|
|
48
|
-
button: 16,
|
|
49
|
-
},
|
|
50
|
-
fontWeight: {
|
|
51
|
-
heading: 700,
|
|
52
|
-
body: 400,
|
|
53
|
-
button: 500,
|
|
54
|
-
},
|
|
55
|
-
lineHeight: {
|
|
56
|
-
heading: 1.2000000476837158,
|
|
57
|
-
body: 1.5,
|
|
58
|
-
uiLabel: 1,
|
|
59
|
-
},
|
|
60
|
-
letterSpacing: {
|
|
61
|
-
heading: -0.019999999552965164,
|
|
62
|
-
body: 0,
|
|
63
|
-
label: 0.019999999552965164,
|
|
64
|
-
},
|
|
65
|
-
paragraphSpacing: {
|
|
66
|
-
body: 16,
|
|
67
|
-
editorial: 24,
|
|
68
|
-
},
|
|
69
|
-
paragraphIndent: {
|
|
70
|
-
editorial: 0,
|
|
71
|
-
},
|
|
72
|
-
borderRadius: {
|
|
73
|
-
small: 8,
|
|
74
|
-
medium: 24,
|
|
75
|
-
large: 16,
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
component: {
|
|
79
|
-
button: {
|
|
80
|
-
paddingHorizontal: 16,
|
|
81
|
-
paddingVertical: 12,
|
|
82
|
-
gap: 8,
|
|
83
|
-
cornerRadius: 24,
|
|
84
|
-
borderWidth: 2,
|
|
85
|
-
textSize: 16,
|
|
86
|
-
fontWeight: 500,
|
|
87
|
-
lineHeight: 1,
|
|
88
|
-
fontFamily: "Poppins",
|
|
89
|
-
filled: {
|
|
90
|
-
background: "#553C9A",
|
|
91
|
-
content: "#FFFFFF",
|
|
92
|
-
},
|
|
93
|
-
outline: {
|
|
94
|
-
background: "#FFFFFF",
|
|
95
|
-
border: "#553C9A",
|
|
96
|
-
content: "#553C9A",
|
|
97
|
-
},
|
|
98
|
-
text: {
|
|
99
|
-
background: "#FFFFFF",
|
|
100
|
-
content: "#553C9A",
|
|
101
|
-
},
|
|
102
|
-
state: {
|
|
103
|
-
hoverBackground: "#9F7AEA",
|
|
104
|
-
pressedBackground: "#D6BCFA",
|
|
105
|
-
disabledBackground: "#E2E8F0",
|
|
106
|
-
disabledContent: "#94A3B8",
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
card: {
|
|
110
|
-
padding: 24,
|
|
111
|
-
gap: 12,
|
|
112
|
-
background: "#F8FAFC",
|
|
113
|
-
stroke: "#E2E8F0",
|
|
114
|
-
strokeWidth: 2,
|
|
115
|
-
cornerRadius: 16,
|
|
116
|
-
elevation: 4,
|
|
117
|
-
headingSize: 20,
|
|
118
|
-
headingWeight: 700,
|
|
119
|
-
headingFontFamily: "Poppins",
|
|
120
|
-
bodySize: 16,
|
|
121
|
-
bodyWeight: 400,
|
|
122
|
-
bodyFontFamily: "Poppins",
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
//# sourceMappingURL=consumer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consumer.js","sourceRoot":"","sources":["../../../src/tokens/generated/consumer.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,QAAQ,GAAc;IACjC,IAAI,EAAE,UAAU;IAEhB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,SAAS;YACpB,cAAc,EAAE,SAAS;YACzB,gBAAgB,EAAE,SAAS;YAE3B,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,SAAS;YACpB,YAAY,EAAE,SAAS;YACvB,cAAc,EAAE,SAAS;YAEzB,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE,SAAS;YAEtB,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,SAAS;YACpB,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,SAAS;YAEpB,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,SAAS;YAEvB,iBAAiB,EAAE,SAAS;YAC5B,UAAU,EAAE,SAAS;YAErB,gBAAgB,EAAE,SAAS;Y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AE,GAAG;YACf,UAAU,EAAE,CAAC;YACb,UAAU,EAAE,SAAS;YAErB,MAAM,EAAE;gBACN,UAAU,EAAE,SAAS;gBACrB,OAAO,EAAE,SAAS;aACnB;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,SAAS;gBACrB,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,SAAS;aACnB;YACD,IAAI,EAAE;gBACJ,UAAU,EAAE,SAAS;gBACrB,OAAO,EAAE,SAAS;aACnB;YACD,KAAK,EAAE;gBACL,eAAe,EAAE,SAAS;gBAC1B,iBAAiB,EAAE,SAAS;gBAC5B,kBAAkB,EAAE,SAAS;gBAC7B,eAAe,EAAE,SAAS;aAC3B;SACF;QAED,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE;YACX,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,SAAS;YACrB,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,EAAE;YAChB,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,EAAE;YACf,aAAa,EAAE,GAAG;YAClB,iBAAiB,EAAE,SAAS;YAC5B,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,GAAG;YACf,cAAc,EAAE,SAAS;SAC1B;KACF;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"corporate.d.ts","sourceRoot":"","sources":["../../../src/tokens/generated/corporate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAO,MAAM,SAAS,EAAE,SA8IvB,CAAC"}
|