@und-ui/tokens 0.0.0-stage → 0.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.
- package/LICENSE +21 -0
- package/README.md +345 -2
- package/dist/android/values/und_colors.xml +91 -0
- package/dist/android/values/und_dimens.xml +93 -0
- package/dist/android/values-night/und_colors.xml +91 -0
- package/dist/css/base.css +2335 -0
- package/dist/css/motion.css +223 -0
- package/dist/css/themes/kesar.css +68 -0
- package/dist/css/themes/mitti.css +84 -0
- package/dist/css/themes/neem.css +84 -0
- package/dist/css/themes/raat.css +507 -0
- package/dist/css/themes/sutra.css +109 -0
- package/dist/css/themes/ujala.css +67 -0
- package/dist/css/tokens.css +3167 -0
- package/dist/dart/und_tokens.dart +3223 -0
- package/dist/js/contexts.d.ts +2 -0
- package/dist/js/contexts.js +3 -0
- package/dist/js/index.d.ts +1883 -0
- package/dist/js/index.js +2230 -0
- package/dist/json/flat/kesar.dark.json +737 -0
- package/dist/json/flat/kesar.darkMore.json +737 -0
- package/dist/json/flat/kesar.light.json +737 -0
- package/dist/json/flat/kesar.lightMore.json +737 -0
- package/dist/json/flat/mitti.dark.json +737 -0
- package/dist/json/flat/mitti.darkMore.json +737 -0
- package/dist/json/flat/mitti.light.json +737 -0
- package/dist/json/flat/mitti.lightMore.json +737 -0
- package/dist/json/flat/neem.dark.json +737 -0
- package/dist/json/flat/neem.darkMore.json +737 -0
- package/dist/json/flat/neem.light.json +737 -0
- package/dist/json/flat/neem.lightMore.json +737 -0
- package/dist/json/flat/raat.dark.json +737 -0
- package/dist/json/flat/raat.darkMore.json +737 -0
- package/dist/json/flat/sutra.dark.json +738 -0
- package/dist/json/flat/sutra.darkMore.json +738 -0
- package/dist/json/flat/sutra.light.json +738 -0
- package/dist/json/flat/sutra.lightMore.json +738 -0
- package/dist/json/flat/ujala.dark.json +737 -0
- package/dist/json/flat/ujala.darkMore.json +737 -0
- package/dist/json/flat/ujala.light.json +737 -0
- package/dist/json/flat/ujala.lightMore.json +737 -0
- package/dist/json/nested/kesar.dark.json +885 -0
- package/dist/json/nested/kesar.darkMore.json +885 -0
- package/dist/json/nested/kesar.light.json +885 -0
- package/dist/json/nested/kesar.lightMore.json +885 -0
- package/dist/json/nested/mitti.dark.json +885 -0
- package/dist/json/nested/mitti.darkMore.json +885 -0
- package/dist/json/nested/mitti.light.json +885 -0
- package/dist/json/nested/mitti.lightMore.json +885 -0
- package/dist/json/nested/neem.dark.json +885 -0
- package/dist/json/nested/neem.darkMore.json +885 -0
- package/dist/json/nested/neem.light.json +885 -0
- package/dist/json/nested/neem.lightMore.json +885 -0
- package/dist/json/nested/raat.dark.json +885 -0
- package/dist/json/nested/raat.darkMore.json +885 -0
- package/dist/json/nested/sutra.dark.json +886 -0
- package/dist/json/nested/sutra.darkMore.json +886 -0
- package/dist/json/nested/sutra.light.json +886 -0
- package/dist/json/nested/sutra.lightMore.json +886 -0
- package/dist/json/nested/ujala.dark.json +885 -0
- package/dist/json/nested/ujala.darkMore.json +885 -0
- package/dist/json/nested/ujala.light.json +885 -0
- package/dist/json/nested/ujala.lightMore.json +885 -0
- package/dist/kotlin/UndTokens.kt +2870 -0
- package/dist/lib/build/contexts.d.ts +13 -0
- package/dist/lib/build/contexts.js +20 -0
- package/dist/lib/build/css-values.d.ts +31 -0
- package/dist/lib/build/css-values.js +191 -0
- package/dist/lib/build/formats/css.d.ts +43 -0
- package/dist/lib/build/formats/css.js +380 -0
- package/dist/lib/build/formats/dart.d.ts +9 -0
- package/dist/lib/build/formats/dart.js +342 -0
- package/dist/lib/build/formats/js.d.ts +29 -0
- package/dist/lib/build/formats/js.js +297 -0
- package/dist/lib/build/formats/kotlin.d.ts +8 -0
- package/dist/lib/build/formats/kotlin.js +232 -0
- package/dist/lib/build/formats/react-native.d.ts +2 -0
- package/dist/lib/build/formats/react-native.js +208 -0
- package/dist/lib/build/formats/style-dictionary.d.ts +8 -0
- package/dist/lib/build/formats/style-dictionary.js +163 -0
- package/dist/lib/build/formats/swift.d.ts +8 -0
- package/dist/lib/build/formats/swift.js +395 -0
- package/dist/lib/build/formats/tailwind.d.ts +9 -0
- package/dist/lib/build/formats/tailwind.js +105 -0
- package/dist/lib/build/index.d.ts +12 -0
- package/dist/lib/build/index.js +133 -0
- package/dist/lib/build/materialize.d.ts +102 -0
- package/dist/lib/build/materialize.js +170 -0
- package/dist/lib/build/native-model.d.ts +46 -0
- package/dist/lib/build/native-model.js +177 -0
- package/dist/lib/color/contrast.d.ts +24 -0
- package/dist/lib/color/contrast.js +95 -0
- package/dist/lib/color/convert.d.ts +39 -0
- package/dist/lib/color/convert.js +91 -0
- package/dist/lib/color/pairs.d.ts +29 -0
- package/dist/lib/color/pairs.js +90 -0
- package/dist/lib/color/palette.d.ts +118 -0
- package/dist/lib/color/palette.js +199 -0
- package/dist/lib/color/scales.d.ts +18 -0
- package/dist/lib/color/scales.js +115 -0
- package/dist/lib/dtcg/engine.d.ts +75 -0
- package/dist/lib/dtcg/engine.js +395 -0
- package/dist/lib/dtcg/format-json.d.ts +1 -0
- package/dist/lib/dtcg/format-json.js +59 -0
- package/dist/lib/dtcg/types.d.ts +124 -0
- package/dist/lib/dtcg/types.js +54 -0
- package/dist/lib/index.d.ts +20 -0
- package/dist/lib/index.js +14 -0
- package/dist/lib/motion/spring.d.ts +40 -0
- package/dist/lib/motion/spring.js +129 -0
- package/dist/lib/source/generate.d.ts +28 -0
- package/dist/lib/source/generate.js +468 -0
- package/dist/lib/themes/definitions.d.ts +43 -0
- package/dist/lib/themes/definitions.js +140 -0
- package/dist/react-native/index.d.ts +130 -0
- package/dist/react-native/index.js +15 -0
- package/dist/react-native/tokens.d.ts +2 -0
- package/dist/react-native/tokens.js +4413 -0
- package/dist/scss/_variables.scss +738 -0
- package/dist/scss/_vars.scss +857 -0
- package/dist/scss/kesar.dark.scss +738 -0
- package/dist/scss/kesar.darkMore.scss +738 -0
- package/dist/scss/kesar.light.scss +738 -0
- package/dist/scss/kesar.lightMore.scss +738 -0
- package/dist/scss/mitti.dark.scss +738 -0
- package/dist/scss/mitti.darkMore.scss +738 -0
- package/dist/scss/mitti.light.scss +738 -0
- package/dist/scss/mitti.lightMore.scss +738 -0
- package/dist/scss/neem.dark.scss +738 -0
- package/dist/scss/neem.darkMore.scss +738 -0
- package/dist/scss/neem.light.scss +738 -0
- package/dist/scss/neem.lightMore.scss +738 -0
- package/dist/scss/raat.dark.scss +738 -0
- package/dist/scss/raat.darkMore.scss +738 -0
- package/dist/scss/sutra.dark.scss +739 -0
- package/dist/scss/sutra.darkMore.scss +739 -0
- package/dist/scss/sutra.light.scss +739 -0
- package/dist/scss/sutra.lightMore.scss +739 -0
- package/dist/scss/ujala.dark.scss +738 -0
- package/dist/scss/ujala.darkMore.scss +738 -0
- package/dist/scss/ujala.light.scss +738 -0
- package/dist/scss/ujala.lightMore.scss +738 -0
- package/dist/swift/UndTokens.swift +4117 -0
- package/dist/tailwind/und.css +586 -0
- package/package.json +84 -3
- package/tokens/contrast/more.tokens.json +46 -0
- package/tokens/density/comfortable.tokens.json +64 -0
- package/tokens/density/compact.tokens.json +68 -0
- package/tokens/density/touch.tokens.json +64 -0
- package/tokens/modes/dark.tokens.json +197 -0
- package/tokens/modes/light.tokens.json +166 -0
- package/tokens/motion/reduced.tokens.json +119 -0
- package/tokens/primitives/color.dark.tokens.json +2001 -0
- package/tokens/primitives/color.light.tokens.json +2077 -0
- package/tokens/primitives/dimension.tokens.json +181 -0
- package/tokens/primitives/motion.tokens.json +41 -0
- package/tokens/primitives/spring.tokens.json +138 -0
- package/tokens/primitives/typography.tokens.json +107 -0
- package/tokens/semantic/bridge.tokens.json +52 -0
- package/tokens/semantic/color.tokens.json +129 -0
- package/tokens/semantic/layout.tokens.json +84 -0
- package/tokens/semantic/motion.tokens.json +111 -0
- package/tokens/semantic/scale.tokens.json +66 -0
- package/tokens/semantic/typography.tokens.json +281 -0
- package/tokens/themes/kesar.tokens.json +105 -0
- package/tokens/themes/mitti.tokens.json +123 -0
- package/tokens/themes/neem.tokens.json +123 -0
- package/tokens/themes/raat.tokens.json +104 -0
- package/tokens/themes/sutra.tokens.json +126 -0
- package/tokens/themes/ujala.tokens.json +96 -0
- package/tokens/transparency/reduced.tokens.json +30 -0
- package/tokens/und.resolver.json +83 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// Generated by @und-ui/tokens. Do not edit.
|
|
2
|
+
export type UndThemeName = "ujala" | "kesar" | "neem" | "mitti" | "raat" | "sutra";
|
|
3
|
+
|
|
4
|
+
export interface UndColorRoles {
|
|
5
|
+
readonly accentBg: string;
|
|
6
|
+
readonly accentBgActive: string;
|
|
7
|
+
readonly accentBgHover: string;
|
|
8
|
+
readonly accentBorder: string;
|
|
9
|
+
readonly accentFg: string;
|
|
10
|
+
readonly accentFgStrong: string;
|
|
11
|
+
readonly accentSolid: string;
|
|
12
|
+
readonly accentSolidHover: string;
|
|
13
|
+
readonly bgCanvas: string;
|
|
14
|
+
readonly bgInverse: string;
|
|
15
|
+
readonly bgMuted: string;
|
|
16
|
+
readonly bgMutedActive: string;
|
|
17
|
+
readonly bgMutedHover: string;
|
|
18
|
+
readonly bgOverlay: string;
|
|
19
|
+
readonly bgRaised: string;
|
|
20
|
+
readonly bgSubtle: string;
|
|
21
|
+
readonly bgSurface: string;
|
|
22
|
+
readonly borderControl: string;
|
|
23
|
+
readonly borderControlHover: string;
|
|
24
|
+
readonly borderDefault: string;
|
|
25
|
+
readonly borderStrong: string;
|
|
26
|
+
readonly borderSubtle: string;
|
|
27
|
+
readonly dataviz1: string;
|
|
28
|
+
readonly dataviz2: string;
|
|
29
|
+
readonly dataviz3: string;
|
|
30
|
+
readonly dataviz4: string;
|
|
31
|
+
readonly dataviz5: string;
|
|
32
|
+
readonly dataviz6: string;
|
|
33
|
+
readonly dataviz7: string;
|
|
34
|
+
readonly dataviz8: string;
|
|
35
|
+
readonly datavizAxis: string;
|
|
36
|
+
readonly datavizGridline: string;
|
|
37
|
+
readonly fgDefault: string;
|
|
38
|
+
readonly fgDisabled: string;
|
|
39
|
+
readonly fgInverse: string;
|
|
40
|
+
readonly fgMuted: string;
|
|
41
|
+
readonly fgOnAccent: string;
|
|
42
|
+
readonly fgSubtle: string;
|
|
43
|
+
readonly focusRing: string;
|
|
44
|
+
readonly linkDefault: string;
|
|
45
|
+
readonly linkVisited: string;
|
|
46
|
+
readonly materialChromeBg: string;
|
|
47
|
+
readonly materialChromeBorder: string;
|
|
48
|
+
readonly materialChromeHighlight: string;
|
|
49
|
+
readonly materialRegularBg: string;
|
|
50
|
+
readonly materialRegularBorder: string;
|
|
51
|
+
readonly materialThickBg: string;
|
|
52
|
+
readonly materialThickBorder: string;
|
|
53
|
+
readonly materialThinBg: string;
|
|
54
|
+
readonly materialThinBorder: string;
|
|
55
|
+
readonly selectionBg: string;
|
|
56
|
+
readonly statusDangerBg: string;
|
|
57
|
+
readonly statusDangerBgHover: string;
|
|
58
|
+
readonly statusDangerBorder: string;
|
|
59
|
+
readonly statusDangerFg: string;
|
|
60
|
+
readonly statusDangerFgStrong: string;
|
|
61
|
+
readonly statusDangerOnSolid: string;
|
|
62
|
+
readonly statusDangerSolid: string;
|
|
63
|
+
readonly statusDangerSolidHover: string;
|
|
64
|
+
readonly statusInfoBg: string;
|
|
65
|
+
readonly statusInfoBgHover: string;
|
|
66
|
+
readonly statusInfoBorder: string;
|
|
67
|
+
readonly statusInfoFg: string;
|
|
68
|
+
readonly statusInfoFgStrong: string;
|
|
69
|
+
readonly statusInfoOnSolid: string;
|
|
70
|
+
readonly statusInfoSolid: string;
|
|
71
|
+
readonly statusInfoSolidHover: string;
|
|
72
|
+
readonly statusSuccessBg: string;
|
|
73
|
+
readonly statusSuccessBgHover: string;
|
|
74
|
+
readonly statusSuccessBorder: string;
|
|
75
|
+
readonly statusSuccessFg: string;
|
|
76
|
+
readonly statusSuccessFgStrong: string;
|
|
77
|
+
readonly statusSuccessOnSolid: string;
|
|
78
|
+
readonly statusSuccessSolid: string;
|
|
79
|
+
readonly statusSuccessSolidHover: string;
|
|
80
|
+
readonly statusWarningBg: string;
|
|
81
|
+
readonly statusWarningBgHover: string;
|
|
82
|
+
readonly statusWarningBorder: string;
|
|
83
|
+
readonly statusWarningFg: string;
|
|
84
|
+
readonly statusWarningFgStrong: string;
|
|
85
|
+
readonly statusWarningOnSolid: string;
|
|
86
|
+
readonly statusWarningSolid: string;
|
|
87
|
+
readonly statusWarningSolidHover: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface UndTextStyle {
|
|
91
|
+
readonly fontSize: number;
|
|
92
|
+
readonly lineHeight: number;
|
|
93
|
+
readonly lineHeightIndic: number;
|
|
94
|
+
readonly fontWeight: string;
|
|
95
|
+
readonly letterSpacing: number;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface UndRNTheme {
|
|
99
|
+
readonly name: UndThemeName;
|
|
100
|
+
readonly dark: boolean;
|
|
101
|
+
readonly color: UndColorRoles;
|
|
102
|
+
readonly spacing: Readonly<Record<string, number>>;
|
|
103
|
+
readonly radius: Readonly<Record<string, number>>;
|
|
104
|
+
readonly typography: Readonly<Record<string, UndTextStyle>>;
|
|
105
|
+
readonly motion: {
|
|
106
|
+
readonly tempo: number;
|
|
107
|
+
readonly character: 'crisp' | 'standard' | 'expressive';
|
|
108
|
+
readonly duration: Readonly<Record<string, number>>;
|
|
109
|
+
readonly easing: Readonly<Record<string, { readonly bezier: readonly number[]; readonly spring?: string }>>;
|
|
110
|
+
readonly spring: Readonly<Record<string, { readonly stiffness: number; readonly damping: number; readonly mass: number; readonly dampingRatio: number; readonly response: number; readonly settleMs: number }>>;
|
|
111
|
+
};
|
|
112
|
+
readonly reducedMotion: Readonly<Record<string, number>>;
|
|
113
|
+
readonly control: Readonly<Record<string, number>>;
|
|
114
|
+
readonly shadows: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
115
|
+
readonly fontFamily: Readonly<Record<'body' | 'heading' | 'display' | 'code', readonly string[]>> & { readonly mono: string };
|
|
116
|
+
readonly hairlineWidth: number;
|
|
117
|
+
readonly minTarget: number;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface UndRNThemeOptions {
|
|
121
|
+
theme?: UndThemeName;
|
|
122
|
+
scheme?: 'light' | 'dark';
|
|
123
|
+
highContrast?: boolean;
|
|
124
|
+
hairlineWidth?: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export declare const data: Readonly<Record<string, unknown>>;
|
|
128
|
+
export declare function createTheme(os: string, options?: UndRNThemeOptions): UndRNTheme;
|
|
129
|
+
export declare function getTheme(options?: Omit<UndRNThemeOptions, 'hairlineWidth'>): UndRNTheme;
|
|
130
|
+
export declare const themeNames: readonly UndThemeName[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by @und-ui/tokens. Do not edit.
|
|
2
|
+
import { Platform, StyleSheet } from 'react-native';
|
|
3
|
+
import { createTheme, data } from './tokens.js';
|
|
4
|
+
|
|
5
|
+
export { data, createTheme };
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Platform-aware theme: shadows (iOS shadow* props, Android elevation, web boxShadow),
|
|
9
|
+
* hit targets and hairlines resolved for the running OS.
|
|
10
|
+
*/
|
|
11
|
+
export function getTheme(options = {}) {
|
|
12
|
+
return createTheme(Platform.OS, { hairlineWidth: StyleSheet.hairlineWidth, ...options });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const themeNames = Object.keys(data.themes);
|