burne-ui 1.5.5 → 1.6.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/README.md +38 -3
- package/cli/init.js +71 -5
- package/dist/index.cjs +17 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13419 -14373
- package/dist/theme/BurneUIProvider.d.ts +2 -1
- package/dist/theme/ThemeProvider.d.ts +0 -1
- package/dist/theme/index.d.ts +5 -5
- package/dist/theme/themeConfig.d.ts +61 -14
- package/dist/theme/themeDefaults.d.ts +14 -185
- package/dist/theme/themePalettes.d.ts +1 -114
- package/dist/theme/themeRuntimeContext.d.ts +19 -0
- package/dist/tokens/config.d.ts +0 -1
- package/dist/tokens/index.d.ts +1 -1
- package/dist/ui.css +5 -25
- package/package.json +1 -1
- package/dist/theme/colorPresets.d.ts +0 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { MotionConfig } from '../components/core/utils/motionConfig';
|
|
3
3
|
import { ToastProviderProps } from '../components/core/Toast/toastTypes';
|
|
4
|
-
import { BurneThemeConfig, BurneThemeMode, ThemeTokenOverrides } from './themeConfig';
|
|
4
|
+
import { BurneThemeConfig, BurneThemeMode, CustomThemeTokens, ThemeTokenOverrides } from './themeConfig';
|
|
5
5
|
import { ThemeProviderProps } from './ThemeProvider';
|
|
6
6
|
export type BurneUIProviderProps = {
|
|
7
7
|
children: ReactNode;
|
|
@@ -14,6 +14,7 @@ export type BurneUIProviderProps = {
|
|
|
14
14
|
defaultTheme?: BurneThemeMode;
|
|
15
15
|
storageKey?: string | null;
|
|
16
16
|
tokens?: ThemeTokenOverrides;
|
|
17
|
+
customTokens?: CustomThemeTokens;
|
|
17
18
|
motion?: Partial<MotionConfig>;
|
|
18
19
|
/**
|
|
19
20
|
* Wrap with `Toast.Provider`.
|
|
@@ -8,7 +8,6 @@ export type BurneThemeContextValue = {
|
|
|
8
8
|
resolvedTheme: ThemeMode;
|
|
9
9
|
setTheme: (theme: BurneThemeMode) => void;
|
|
10
10
|
};
|
|
11
|
-
export declare function resolveBurneTheme(theme: BurneThemeMode): ThemeMode;
|
|
12
11
|
/** Apply `data-theme` on the root element (light → attribute, dark → remove). */
|
|
13
12
|
export declare function applyThemeMode(theme: ThemeMode, root?: HTMLElement): void;
|
|
14
13
|
export type ThemeProviderProps = {
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { applyThemeTokens, clearThemeInlineTokens, createDefaultThemeState,
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { ThemeProvider, applyThemeMode, resolveBurneTheme, useBurneTheme, useBurneThemeOptional, type BurneThemeContextValue, type ThemeProviderProps, } from './ThemeProvider';
|
|
1
|
+
export { applyThemeTokens, clearThemeInlineTokens, createDefaultThemeState, ensureModePalettes, activateThemeModePalette, patchThemeColor, exportThemeCss, COLOR_CSS_VAR, DEFAULT_FONT, DEFAULT_FONT_MONO, FONT_WEIGHT_CSS_VAR, FONT_WEIGHT_DEFAULTS, MOTION_DEFAULTS, SCALE_DEFAULTS, TEXT_SCALE_BASES, type ThemeColorKey, type ThemeColors, type ThemeDerivedColorKey, type ThemeFontWeightKey, type ThemeFontWeights, type ThemeMode, type ThemeStatusForegroundKey, type ThemeStatusForegrounds, type ThemeTokenState, } from './themeDefaults';
|
|
2
|
+
export { DARK_COLORS, LIGHT_COLORS } from './themePalettes';
|
|
3
|
+
export { applyBurneThemeConfig, applyCustomThemeTokens, applyTokens, clearCustomThemeTokens, exportBurneThemeConfigSource, exportBurneThemeCss, mergeThemeTokenOverrides, resolveTheme, resolveCustomThemeTokens, resolveThemeTokenState, createDefaultBurneThemeConfig, exportDefaultBurneThemeConfigSource, themeTokenStateToConfig, type BurneThemeConfig, type BurneThemeMode, type CustomThemeTokenControl, type CustomThemeTokenDefinition, type CustomThemeTokens, type CustomThemeTokenValue, type ThemeModeColorOverrides, type ThemeTokenOverrides, } from './themeConfig';
|
|
4
|
+
export { ThemeProvider, applyThemeMode, useBurneTheme, useBurneThemeOptional, type BurneThemeContextValue, type ThemeProviderProps, } from './ThemeProvider';
|
|
6
5
|
export { BurneUIProvider, type BurneUIProviderProps } from './BurneUIProvider';
|
|
6
|
+
export { useBurneThemeRuntime, useBurneThemeRuntimeOptional, type BurneThemeRuntimeContextValue, } from './themeRuntimeContext';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MotionConfig } from '../components/core/utils/motionConfig';
|
|
2
2
|
import { ToastProviderProps } from '../components/core/Toast/toastTypes';
|
|
3
|
-
import { ThemeColors, ThemeFontWeights, ThemeMode,
|
|
3
|
+
import { ThemeColors, ThemeFontWeights, ThemeMode, ThemeTokenState } from './themeDefaults';
|
|
4
4
|
/** Color mode for ThemeProvider / BurneUIProvider (`system` follows OS). */
|
|
5
5
|
export type BurneThemeMode = ThemeMode | "system";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Shared (mode-independent) token overrides.
|
|
8
|
+
* Colors live only under `BurneThemeConfig.colors`.
|
|
9
9
|
*/
|
|
10
10
|
export type ThemeTokenOverrides = {
|
|
11
11
|
space?: number;
|
|
@@ -20,14 +20,39 @@ export type ThemeTokenOverrides = {
|
|
|
20
20
|
shadowSize?: number;
|
|
21
21
|
toastScrimSize?: number;
|
|
22
22
|
toastScrimDensity?: number;
|
|
23
|
-
colors?: Partial<ThemeColors>;
|
|
24
|
-
statusForegrounds?: Partial<ThemeStatusForegrounds>;
|
|
25
|
-
/** When true, `--color-border` is set from `colors.border` instead of the CSS formula. */
|
|
26
|
-
borderCustomized?: boolean;
|
|
27
23
|
};
|
|
24
|
+
/** Per-mode flat palette (status + hover included as regular keys). */
|
|
25
|
+
export type ThemeModeColorOverrides = ThemeColors | Partial<ThemeColors>;
|
|
26
|
+
export type CustomThemeTokenValue = string | number | boolean;
|
|
27
|
+
export type CustomThemeTokenControl = "color" | "number" | "select" | "slider" | "switch" | "text";
|
|
28
|
+
export type CustomThemeTokenDefinition = {
|
|
29
|
+
/** Shared value. Use `values` when light and dark need different values. */
|
|
30
|
+
value?: CustomThemeTokenValue;
|
|
31
|
+
values?: Partial<Record<ThemeMode, CustomThemeTokenValue>>;
|
|
32
|
+
label?: string;
|
|
33
|
+
group?: string;
|
|
34
|
+
control?: CustomThemeTokenControl;
|
|
35
|
+
description?: string;
|
|
36
|
+
min?: number;
|
|
37
|
+
max?: number;
|
|
38
|
+
step?: number;
|
|
39
|
+
unit?: string;
|
|
40
|
+
options?: readonly (string | {
|
|
41
|
+
label: string;
|
|
42
|
+
value: string;
|
|
43
|
+
})[];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Project-specific CSS variables. Keys must be valid custom properties (`--*`).
|
|
47
|
+
* Primitive values get an inferred devtools control; use a definition for metadata.
|
|
48
|
+
*/
|
|
49
|
+
export type CustomThemeTokens = Record<`--${string}`, CustomThemeTokenValue | CustomThemeTokenDefinition>;
|
|
28
50
|
/**
|
|
29
51
|
* Serializable theme config for `BurneUIProvider`.
|
|
30
|
-
* Generate via `exportBurneThemeConfigSource()` from the playground
|
|
52
|
+
* Generate via `exportBurneThemeConfigSource()` from the playground.
|
|
53
|
+
*
|
|
54
|
+
* - `tokens` / `motion` — shared across light & dark
|
|
55
|
+
* - `colors.light` / `colors.dark` — flat palettes
|
|
31
56
|
*/
|
|
32
57
|
export type BurneThemeConfig = {
|
|
33
58
|
/** @default "dark" */
|
|
@@ -35,27 +60,49 @@ export type BurneThemeConfig = {
|
|
|
35
60
|
/** localStorage key for theme preference. Pass `null` to disable persistence. */
|
|
36
61
|
storageKey?: string | null;
|
|
37
62
|
tokens?: ThemeTokenOverrides;
|
|
63
|
+
colors?: Partial<Record<ThemeMode, ThemeModeColorOverrides>>;
|
|
64
|
+
customTokens?: CustomThemeTokens;
|
|
38
65
|
motion?: Partial<MotionConfig>;
|
|
39
66
|
/** Wrap children with `Toast.Provider`. @default true */
|
|
40
67
|
toast?: boolean | Omit<ToastProviderProps, "children">;
|
|
41
68
|
};
|
|
69
|
+
/** Merge shared `tokens` with `colors[mode]` into a full `ThemeTokenState`. */
|
|
70
|
+
export declare function resolveThemeTokenState(config: Pick<BurneThemeConfig, "tokens" | "colors">, mode: ThemeMode): ThemeTokenState;
|
|
42
71
|
/** Build a `BurneThemeConfig` snapshot from live playground state. */
|
|
43
72
|
export declare function themeTokenStateToConfig(state: ThemeTokenState): BurneThemeConfig;
|
|
44
|
-
/**
|
|
73
|
+
/** Resolve custom token definitions to CSS-ready values for the active mode. */
|
|
74
|
+
export declare function resolveCustomThemeTokens(customTokens: CustomThemeTokens | undefined, mode: ThemeMode): Record<`--${string}`, string>;
|
|
75
|
+
/** Apply custom CSS variables and remove stale variables previously owned by Burne UI. */
|
|
76
|
+
export declare function applyCustomThemeTokens(customTokens: CustomThemeTokens | undefined, root: HTMLElement, mode: ThemeMode): void;
|
|
77
|
+
/** Remove all custom variables last applied by Burne UI on this root. */
|
|
78
|
+
export declare function clearCustomThemeTokens(root?: HTMLElement): void;
|
|
79
|
+
/**
|
|
80
|
+
* Default app theme snapshot (shared tokens + light/dark colors + motion).
|
|
81
|
+
* Used by scaffolds / `burne-ui init` and as a starting point for Copy config edits.
|
|
82
|
+
*/
|
|
83
|
+
export declare function createDefaultBurneThemeConfig(options?: {
|
|
84
|
+
theme?: ThemeMode;
|
|
85
|
+
storageKey?: string | null;
|
|
86
|
+
}): BurneThemeConfig;
|
|
87
|
+
/** TypeScript source for a starter `burne-theme.ts` (same shape as playground Copy config). */
|
|
88
|
+
export declare function exportDefaultBurneThemeConfigSource(options?: {
|
|
89
|
+
exportName?: string;
|
|
90
|
+
}): string;
|
|
91
|
+
/** Merge shared token overrides into a full `ThemeTokenState` (no mode colors). */
|
|
45
92
|
export declare function mergeThemeTokenOverrides(overrides: ThemeTokenOverrides | undefined, theme?: ThemeMode): ThemeTokenState;
|
|
46
93
|
/**
|
|
47
|
-
* Apply a `BurneThemeConfig` to the document
|
|
48
|
-
*
|
|
94
|
+
* Apply a `BurneThemeConfig` to the document.
|
|
95
|
+
* Colors for the resolved mode come from `colors[mode]`.
|
|
49
96
|
*/
|
|
50
97
|
export declare function applyBurneThemeConfig(config: BurneThemeConfig, root?: HTMLElement, resolvedTheme?: ThemeMode): void;
|
|
51
|
-
export declare function
|
|
52
|
-
/** Alias: apply token overrides without
|
|
98
|
+
export declare function resolveTheme(theme?: BurneThemeMode | undefined): ThemeMode;
|
|
99
|
+
/** Alias: apply shared token overrides without mode colors. */
|
|
53
100
|
export declare function applyTokens(overrides: ThemeTokenOverrides, root?: HTMLElement, theme?: ThemeMode): void;
|
|
54
101
|
/** CSS string for `burne-theme-overrides.css` (same as playground “Copy CSS”). */
|
|
55
102
|
export declare function exportBurneThemeCss(config: BurneThemeConfig): string;
|
|
56
103
|
/**
|
|
57
104
|
* TypeScript source for a project file (e.g. `burne-theme.ts`).
|
|
58
|
-
*
|
|
105
|
+
* `tokens` / `motion` are shared; `colors.light` / `colors.dark` hold palettes.
|
|
59
106
|
*/
|
|
60
107
|
export declare function exportBurneThemeConfigSource(config: BurneThemeConfig, options?: {
|
|
61
108
|
exportName?: string;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { FONT_WEIGHT_CSS_VAR, FONT_WEIGHT_DEFAULTS, FontWeightStep } from '../tokens/fontWeights';
|
|
2
|
-
import {
|
|
2
|
+
import { DARK_COLORS, LIGHT_COLORS } from './themePalettes';
|
|
3
3
|
export type ThemeMode = "dark" | "light";
|
|
4
4
|
export { FONT_WEIGHT_DEFAULTS, FONT_WEIGHT_CSS_VAR };
|
|
5
|
-
export {
|
|
6
|
-
export type ThemeColorKey = "background" | "surface" | "secondary" | "secondaryForeground" | "tertiary" | "tertiaryForeground" | "border" | "foreground" | "muted" | "primary" | "primaryForeground" | "primaryTint" | "primaryTintStrong" | "focusRing" | "indicator" | "indicatorForeground" | "danger" | "success" | "info" | "warning";
|
|
5
|
+
export { DARK_COLORS, LIGHT_COLORS };
|
|
7
6
|
export type ThemeStatusForegroundKey = "dangerForeground" | "successForeground" | "infoForeground" | "warningForeground";
|
|
7
|
+
export type ThemeDerivedColorKey = "primaryHover" | "defaultHover" | "secondaryHover" | "tertiaryHover" | "surfaceTintDanger" | "surfaceTintDangerHover" | "dangerFillHover" | "surfaceTintSuccess" | "surfaceTintSuccessHover" | "successFillHover" | "surfaceTintInfo" | "surfaceTintInfoHover" | "infoFillHover" | "surfaceTintWarning" | "surfaceTintWarningHover" | "warningFillHover" | "convergeRipplePrimaryFill" | "convergeRippleNeutral" | "convergeRippleNeutralMuted" | "convergeRippleDanger" | "convergeRippleSuccess" | "convergeRippleInfo" | "convergeRippleWarning";
|
|
8
|
+
export type ThemeColorKey = "background" | "surface" | "secondary" | "secondaryForeground" | "tertiary" | "tertiaryForeground" | "border" | "foreground" | "muted" | "primary" | "primaryForeground" | "primaryTint" | "primaryTintStrong" | "focusRing" | "indicator" | "indicatorForeground" | "danger" | "success" | "info" | "warning" | ThemeStatusForegroundKey | ThemeDerivedColorKey;
|
|
8
9
|
export type ThemeFontWeightKey = FontWeightStep;
|
|
9
10
|
export type ThemeFontWeights = Record<ThemeFontWeightKey, number>;
|
|
10
11
|
export type ThemeColors = Record<ThemeColorKey, string>;
|
|
11
12
|
export type ThemeStatusForegrounds = Record<ThemeStatusForegroundKey, string>;
|
|
12
|
-
/** Color preset keys — each preset has dark and light palette slices. */
|
|
13
|
-
export type ColorPresetKey = "default" | "contrast" | "ocean" | "violet" | "emerald" | "rose" | "amber" | "slate" | "toffee" | "berry" | "paprika" | "cherry" | "rustic" | "earthy" | "peach" | "sand" | "bold" | "autumn" | "harvest" | "mystic";
|
|
14
13
|
export type ThemeTokenState = {
|
|
15
14
|
theme: ThemeMode;
|
|
16
15
|
space: number;
|
|
@@ -65,80 +64,13 @@ export type ThemeTokenState = {
|
|
|
65
64
|
enableProgressFill: boolean;
|
|
66
65
|
enableLoadingDots: boolean;
|
|
67
66
|
colors: ThemeColors;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
borderCustomized: boolean;
|
|
71
|
-
/** Active color preset; `null` — manual color editing. */
|
|
72
|
-
colorPreset: ColorPresetKey | null;
|
|
73
|
-
};
|
|
74
|
-
export declare const SCALE_TOKEN_LABELS: {
|
|
75
|
-
readonly space: "Spacing";
|
|
76
|
-
readonly size: "Control size";
|
|
77
|
-
readonly radius: "Radius";
|
|
78
|
-
readonly borderWidth: "Border width";
|
|
79
|
-
readonly textScale: "Type scale";
|
|
80
|
-
readonly shadowStrength: "Shadow intensity";
|
|
81
|
-
readonly shadowSize: "Shadow blur scale";
|
|
82
|
-
readonly toastScrimSize: "Toast scrim size";
|
|
83
|
-
readonly toastScrimDensity: "Toast scrim density";
|
|
84
|
-
};
|
|
85
|
-
export declare const MOTION_DURATION_LABELS: {
|
|
86
|
-
readonly interactiveDuration: "Interactive duration";
|
|
87
|
-
readonly tooltipDuration: "Tooltip duration";
|
|
88
|
-
readonly switchThumbDuration: "Switch thumb duration";
|
|
89
|
-
readonly selectionFillDuration: "Selection fill duration";
|
|
90
|
-
readonly expandDuration: "Expand duration";
|
|
91
|
-
readonly feedbackExpandDuration: "Feedback ring duration";
|
|
92
|
-
readonly rippleDefaultDuration: "Ripple duration";
|
|
93
|
-
readonly rippleExpandableDuration: "Expandable ripple duration";
|
|
94
|
-
readonly progressFillDuration: "Progress fill duration";
|
|
95
|
-
readonly loadingDotsDuration: "Loading dots duration";
|
|
96
|
-
};
|
|
97
|
-
export declare const MOTION_SCALE_LABELS: {
|
|
98
|
-
readonly hoverLiftScale: "Hover lift scale";
|
|
99
|
-
readonly badgeAnchorHoverLiftScale: "Badge anchor lift scale";
|
|
100
|
-
readonly pressSqueezeMid: "Press squeeze depth";
|
|
101
|
-
readonly rippleDefaultOpacityFrom: "Ripple opacity";
|
|
102
|
-
readonly rippleExpandableOpacityFrom: "Expandable ripple opacity";
|
|
103
|
-
};
|
|
104
|
-
export declare const MOTION_EASE_LABELS: {
|
|
105
|
-
readonly interactiveEase: "Interactive easing";
|
|
106
|
-
readonly hoverLiftEase: "Hover lift easing";
|
|
107
|
-
readonly switchThumbEase: "Switch thumb easing";
|
|
108
|
-
readonly selectionFillEase: "Selection fill easing";
|
|
109
|
-
readonly expandOpenEase: "Expand open easing";
|
|
110
|
-
readonly progressFillEase: "Progress fill easing";
|
|
111
|
-
readonly loadingDotsEaseUp: "Loading dots up";
|
|
112
|
-
readonly loadingDotsEaseDown: "Loading dots down";
|
|
113
|
-
};
|
|
114
|
-
export declare const GSAP_EASE_OPTIONS: readonly ["power1.out", "power2.out", "power3.out", "power1.inOut", "power2.inOut", "power3.inOut", "sine.inOut", "back.out(1.4)", "back.out(1.25)", "elastic.out(1, 0.5)"];
|
|
115
|
-
export declare const RIPPLE_EASE_CSS_OPTIONS: readonly ["cubic-bezier(0.25, 0.55, 0.35, 0.95)", "cubic-bezier(0.22, 1, 0.36, 1)", "ease-out", "ease-in-out"];
|
|
116
|
-
export declare const ANIMATION_FLAG_LABELS: {
|
|
117
|
-
readonly enableHoverLift: "Hover lift";
|
|
118
|
-
readonly enablePressSqueeze: "Press squeeze";
|
|
119
|
-
readonly enableToggleButtonFill: "Toggle & calendar fill";
|
|
120
|
-
readonly enableRipple: "Press ripple";
|
|
121
|
-
readonly enableExpandable: "Expandable / accordion";
|
|
122
|
-
readonly enableToastStack: "Toast stack";
|
|
123
|
-
readonly enableAsyncButtonCrossfade: "Button async crossfade";
|
|
124
|
-
readonly enableContentFade: "Content fade";
|
|
125
|
-
readonly enableFeedbackExpand: "Button feedback ring";
|
|
126
|
-
readonly enableProgressFill: "Progress bar fill";
|
|
127
|
-
readonly enableLoadingDots: "Loading dots wave";
|
|
67
|
+
/** Light/dark palettes — shared tokens stay on the root state; mode switch reads from here. */
|
|
68
|
+
modePalettes: Record<ThemeMode, ThemeColors>;
|
|
128
69
|
};
|
|
129
70
|
export declare const COLOR_CSS_VAR: Record<ThemeColorKey, string>;
|
|
130
|
-
export declare const STATUS_FOREGROUND_CSS_VAR: Record<ThemeStatusForegroundKey, string>;
|
|
131
|
-
export declare const FONT_WEIGHT_LABELS: Record<ThemeFontWeightKey, string>;
|
|
132
|
-
export declare const COLOR_LABELS: Record<ThemeColorKey, string>;
|
|
133
|
-
export declare const STATUS_FOREGROUND_LABELS: Record<ThemeStatusForegroundKey, string>;
|
|
134
|
-
/** Border formula for UI (dark and light — one line, as in tokens/styles.css). */
|
|
135
|
-
export declare const BORDER_COLOR_CSS_FORMULA_BY_THEME: Record<ThemeMode, string>;
|
|
136
|
-
export declare function isDefaultBorderColor(border: string): boolean;
|
|
137
|
-
export declare function isBorderColorCustomized(colors: ThemeColors): boolean;
|
|
138
71
|
export declare const SCALE_DEFAULTS: {
|
|
139
72
|
readonly space: 0.5;
|
|
140
73
|
readonly size: 1;
|
|
141
|
-
/** Base radius in rem; steps `rounded-*` — multipliers from `--radius`. */
|
|
142
74
|
readonly radius: 0.5;
|
|
143
75
|
readonly borderWidth: 1;
|
|
144
76
|
readonly textScale: 1;
|
|
@@ -146,6 +78,8 @@ export declare const SCALE_DEFAULTS: {
|
|
|
146
78
|
readonly shadowSize: 1;
|
|
147
79
|
readonly toastScrimSize: 1;
|
|
148
80
|
readonly toastScrimDensity: 1;
|
|
81
|
+
};
|
|
82
|
+
export declare const MOTION_DEFAULTS: {
|
|
149
83
|
readonly interactiveDuration: 280;
|
|
150
84
|
readonly interactiveEase: "power2.out";
|
|
151
85
|
readonly hoverLiftEase: "sine.inOut";
|
|
@@ -182,119 +116,8 @@ export declare const SCALE_DEFAULTS: {
|
|
|
182
116
|
readonly enableProgressFill: true;
|
|
183
117
|
readonly enableLoadingDots: true;
|
|
184
118
|
};
|
|
185
|
-
/** Sets only scale-values for layout presets. Don't touch the colors. */
|
|
186
|
-
export declare const LAYOUT_PRESETS: {
|
|
187
|
-
readonly compact: {
|
|
188
|
-
readonly space: 0.4;
|
|
189
|
-
readonly size: 0.9;
|
|
190
|
-
readonly radius: 0.375;
|
|
191
|
-
readonly borderWidth: 1;
|
|
192
|
-
readonly textScale: 0.95;
|
|
193
|
-
};
|
|
194
|
-
readonly spacious: {
|
|
195
|
-
readonly space: 0.625;
|
|
196
|
-
readonly size: 1.125;
|
|
197
|
-
readonly radius: 0.625;
|
|
198
|
-
readonly borderWidth: 1;
|
|
199
|
-
readonly textScale: 1.05;
|
|
200
|
-
};
|
|
201
|
-
readonly flat: {
|
|
202
|
-
readonly space: 0.5;
|
|
203
|
-
readonly size: 1;
|
|
204
|
-
readonly radius: 0.375;
|
|
205
|
-
readonly borderWidth: 0;
|
|
206
|
-
readonly textScale: 1;
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
export type LayoutPresetKey = keyof typeof LAYOUT_PRESETS;
|
|
210
119
|
export declare const DEFAULT_FONT = "ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif";
|
|
211
120
|
export declare const DEFAULT_FONT_MONO = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace";
|
|
212
|
-
export declare const FONT_PRESETS: readonly [{
|
|
213
|
-
readonly id: "system";
|
|
214
|
-
readonly label: "System UI";
|
|
215
|
-
readonly value: "ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif";
|
|
216
|
-
}, {
|
|
217
|
-
readonly id: "inter";
|
|
218
|
-
readonly label: "Inter";
|
|
219
|
-
readonly value: "Inter, ui-sans-serif, system-ui, sans-serif";
|
|
220
|
-
}, {
|
|
221
|
-
readonly id: "geist";
|
|
222
|
-
readonly label: "Geist";
|
|
223
|
-
readonly value: "Geist, ui-sans-serif, system-ui, sans-serif";
|
|
224
|
-
}, {
|
|
225
|
-
readonly id: "plex-sans";
|
|
226
|
-
readonly label: "IBM Plex Sans";
|
|
227
|
-
readonly value: "\"IBM Plex Sans\", ui-sans-serif, system-ui, sans-serif";
|
|
228
|
-
}, {
|
|
229
|
-
readonly id: "dm-sans";
|
|
230
|
-
readonly label: "DM Sans";
|
|
231
|
-
readonly value: "\"DM Sans\", ui-sans-serif, system-ui, sans-serif";
|
|
232
|
-
}, {
|
|
233
|
-
readonly id: "manrope";
|
|
234
|
-
readonly label: "Manrope";
|
|
235
|
-
readonly value: "Manrope, ui-sans-serif, system-ui, sans-serif";
|
|
236
|
-
}, {
|
|
237
|
-
readonly id: "source-sans";
|
|
238
|
-
readonly label: "Source Sans 3";
|
|
239
|
-
readonly value: "\"Source Sans 3\", ui-sans-serif, system-ui, sans-serif";
|
|
240
|
-
}, {
|
|
241
|
-
readonly id: "outfit";
|
|
242
|
-
readonly label: "Outfit";
|
|
243
|
-
readonly value: "Outfit, ui-sans-serif, system-ui, sans-serif";
|
|
244
|
-
}, {
|
|
245
|
-
readonly id: "plus-jakarta";
|
|
246
|
-
readonly label: "Plus Jakarta Sans";
|
|
247
|
-
readonly value: "\"Plus Jakarta Sans\", ui-sans-serif, system-ui, sans-serif";
|
|
248
|
-
}, {
|
|
249
|
-
readonly id: "roboto";
|
|
250
|
-
readonly label: "Roboto";
|
|
251
|
-
readonly value: "Roboto, ui-sans-serif, system-ui, sans-serif";
|
|
252
|
-
}, {
|
|
253
|
-
readonly id: "open-sans";
|
|
254
|
-
readonly label: "Open Sans";
|
|
255
|
-
readonly value: "\"Open Sans\", ui-sans-serif, system-ui, sans-serif";
|
|
256
|
-
}, {
|
|
257
|
-
readonly id: "figtree";
|
|
258
|
-
readonly label: "Figtree";
|
|
259
|
-
readonly value: "Figtree, ui-sans-serif, system-ui, sans-serif";
|
|
260
|
-
}, {
|
|
261
|
-
readonly id: "nunito-sans";
|
|
262
|
-
readonly label: "Nunito Sans";
|
|
263
|
-
readonly value: "\"Nunito Sans\", ui-sans-serif, system-ui, sans-serif";
|
|
264
|
-
}, {
|
|
265
|
-
readonly id: "work-sans";
|
|
266
|
-
readonly label: "Work Sans";
|
|
267
|
-
readonly value: "\"Work Sans\", ui-sans-serif, system-ui, sans-serif";
|
|
268
|
-
}];
|
|
269
|
-
export declare const MONO_FONT_PRESETS: readonly [{
|
|
270
|
-
readonly id: "system";
|
|
271
|
-
readonly label: "System Mono";
|
|
272
|
-
readonly value: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace";
|
|
273
|
-
}, {
|
|
274
|
-
readonly id: "jetbrains";
|
|
275
|
-
readonly label: "JetBrains Mono";
|
|
276
|
-
readonly value: "\"JetBrains Mono\", ui-monospace, monospace";
|
|
277
|
-
}, {
|
|
278
|
-
readonly id: "fira";
|
|
279
|
-
readonly label: "Fira Code";
|
|
280
|
-
readonly value: "\"Fira Code\", ui-monospace, monospace";
|
|
281
|
-
}, {
|
|
282
|
-
readonly id: "source-code-pro";
|
|
283
|
-
readonly label: "Source Code Pro";
|
|
284
|
-
readonly value: "\"Source Code Pro\", ui-monospace, monospace";
|
|
285
|
-
}, {
|
|
286
|
-
readonly id: "roboto-mono";
|
|
287
|
-
readonly label: "Roboto Mono";
|
|
288
|
-
readonly value: "\"Roboto Mono\", ui-monospace, monospace";
|
|
289
|
-
}, {
|
|
290
|
-
readonly id: "plex-mono";
|
|
291
|
-
readonly label: "IBM Plex Mono";
|
|
292
|
-
readonly value: "\"IBM Plex Mono\", ui-monospace, monospace";
|
|
293
|
-
}, {
|
|
294
|
-
readonly id: "space-mono";
|
|
295
|
-
readonly label: "Space Mono";
|
|
296
|
-
readonly value: "\"Space Mono\", ui-monospace, monospace";
|
|
297
|
-
}];
|
|
298
121
|
/** Basic typography sizes from `src/tokens/styles.css` (rem). */
|
|
299
122
|
export declare const TEXT_SCALE_BASES: {
|
|
300
123
|
readonly tools: {
|
|
@@ -334,6 +157,12 @@ export declare const TEXT_SCALE_BASES: {
|
|
|
334
157
|
readonly line: 2.5;
|
|
335
158
|
};
|
|
336
159
|
};
|
|
160
|
+
/** Ensure `modePalettes` exists (migration for older playground state snapshots). */
|
|
161
|
+
export declare function ensureModePalettes(state: ThemeTokenState): ThemeTokenState;
|
|
162
|
+
/** Copy the active mode palette onto top-level `colors`. */
|
|
163
|
+
export declare function activateThemeModePalette(state: ThemeTokenState, theme: ThemeMode): ThemeTokenState;
|
|
164
|
+
/** Patch a color on the active mode and keep `modePalettes` in sync. */
|
|
165
|
+
export declare function patchThemeColor(state: ThemeTokenState, key: ThemeColorKey, value: string): ThemeTokenState;
|
|
337
166
|
export declare function createDefaultThemeState(theme?: ThemeMode): ThemeTokenState;
|
|
338
167
|
export declare function clearThemeInlineTokens(root?: HTMLElement): void;
|
|
339
168
|
export declare function applyThemeTokens(state: ThemeTokenState, root?: HTMLElement): void;
|
|
@@ -1,116 +1,3 @@
|
|
|
1
|
-
import { ThemeColors
|
|
2
|
-
/** As in tokens/styles.css — follows when changing primary through var(). */
|
|
3
|
-
export declare const PRIMARY_TINT = "color-mix(in oklab, var(--color-primary) 20%, transparent)";
|
|
4
|
-
export declare const PRIMARY_TINT_STRONG = "color-mix(in oklab, var(--color-primary) 25%, transparent)";
|
|
5
|
-
/** Bold — mix with surface on a dark background. */
|
|
6
|
-
export declare const BOLD_PRIMARY_TINT = "color-mix(in oklab, var(--color-primary) 16%, var(--color-surface))";
|
|
7
|
-
export declare const BOLD_PRIMARY_TINT_STRONG = "color-mix(in oklab, #4361ee 24%, var(--color-surface))";
|
|
8
|
-
/** Autumn — warm strong-tint from Sunflower Gold. */
|
|
9
|
-
export declare const AUTUMN_PRIMARY_TINT = "color-mix(in oklab, var(--color-primary) 14%, var(--color-surface))";
|
|
10
|
-
export declare const AUTUMN_PRIMARY_TINT_STRONG = "color-mix(in oklab, #fcbf49 22%, var(--color-surface))";
|
|
11
|
-
/** As in tokens/styles.css — border from foreground (dark and light). */
|
|
12
|
-
export declare const BORDER_COLOR_CSS_FORMULA = "color-mix(in oklab, var(--color-foreground) 12%, transparent)";
|
|
1
|
+
import { ThemeColors } from './themeDefaults';
|
|
13
2
|
export declare const DARK_COLORS: ThemeColors;
|
|
14
3
|
export declare const LIGHT_COLORS: ThemeColors;
|
|
15
|
-
export declare const DARK_STATUS_FOREGROUNDS: ThemeStatusForegrounds;
|
|
16
|
-
export declare const LIGHT_STATUS_FOREGROUNDS: ThemeStatusForegrounds;
|
|
17
|
-
export declare const OCEAN_DARK_COLORS: ThemeColors;
|
|
18
|
-
export declare const VIOLET_DARK_COLORS: ThemeColors;
|
|
19
|
-
export declare const EMERALD_DARK_COLORS: ThemeColors;
|
|
20
|
-
export declare const ROSE_LIGHT_COLORS: ThemeColors;
|
|
21
|
-
export declare const AMBER_LIGHT_COLORS: ThemeColors;
|
|
22
|
-
export declare const SLATE_LIGHT_COLORS: ThemeColors;
|
|
23
|
-
/**
|
|
24
|
-
* Toffee — warm creamy brown light theme.
|
|
25
|
-
* Palette: Almond Cream → Desert Sand → Tan → Faded Copper → Coffee Bean → Toffee Brown
|
|
26
|
-
*/
|
|
27
|
-
export declare const TOFFEE_LIGHT_COLORS: ThemeColors;
|
|
28
|
-
/**
|
|
29
|
-
* Berry — light theme in tones of ripe berries.
|
|
30
|
-
* The lightest colors in the palette serve as backgrounds, Rich Mahogany — text, Berry Crush — accent.
|
|
31
|
-
* Palette: Almond Silk → Rosy Taupe → Berry Crush → Burgundy → Rich Mahogany
|
|
32
|
-
*/
|
|
33
|
-
export declare const BERRY_LIGHT_COLORS: ThemeColors;
|
|
34
|
-
/**
|
|
35
|
-
* Paprika — spicy light theme: warm neutrals + bright orange-red accent.
|
|
36
|
-
* Palette: Dust Grey ≈ Bone → Powder Blush → Spicy Paprika → Burnt Tangerine
|
|
37
|
-
*/
|
|
38
|
-
export declare const PAPRIKA_LIGHT_COLORS: ThemeColors;
|
|
39
|
-
/**
|
|
40
|
-
* Cherry — light theme in black cherry tones.
|
|
41
|
-
* Derived light backgrounds from the palette, dark red tones - text and accent.
|
|
42
|
-
* Palette: Brown Red → Dark Wine → Black Cherry → Rich Mahogany (#38040e / #250902)
|
|
43
|
-
*/
|
|
44
|
-
export declare const CHERRY_LIGHT_COLORS: ThemeColors;
|
|
45
|
-
/**
|
|
46
|
-
* Rustic Charm — wheat beige, charcoal, rust.
|
|
47
|
-
* Palette: Floral White → Silver → Charcoal Brown → Carbon Black → Spicy Paprika
|
|
48
|
-
*/
|
|
49
|
-
export declare const RUSTIC_LIGHT_COLORS: ThemeColors;
|
|
50
|
-
/**
|
|
51
|
-
* Earthy Tones — harvest wheat, olive, cocoa.
|
|
52
|
-
* Palette: Vanilla Cream → Cream → Muted Olive → Faded Copper → Ash Brown
|
|
53
|
-
*/
|
|
54
|
-
export declare const EARTHY_LIGHT_COLORS: ThemeColors;
|
|
55
|
-
/**
|
|
56
|
-
* Peach Sorbet — blush pinks and pastel peach.
|
|
57
|
-
* Palette: Light Coral → Sweet Salmon → Powder Blush → Peach Fuzz → Soft Apricot
|
|
58
|
-
*/
|
|
59
|
-
export declare const PEACH_LIGHT_COLORS: ThemeColors;
|
|
60
|
-
/**
|
|
61
|
-
* Soft Sand — creamy tans, blush, gentle browns.
|
|
62
|
-
* Palette: Parchment → Bone → Linen → Almond Cream → Almond Silk
|
|
63
|
-
*/
|
|
64
|
-
export declare const SAND_LIGHT_COLORS: ThemeColors;
|
|
65
|
-
/**
|
|
66
|
-
* Bold Hues — electric magenta, purple, crisp blues.
|
|
67
|
-
* Palette: Neon Pink → Indigo Bloom → Vivid Royal → Electric Sapphire → Sky Aqua
|
|
68
|
-
*/
|
|
69
|
-
export declare const BOLD_DARK_COLORS: ThemeColors;
|
|
70
|
-
/**
|
|
71
|
-
* Warm Autumn Glow — crimson, amber, gold on deep blue.
|
|
72
|
-
* Palette: Deep Space Blue → Flag Red → Princeton Orange → Sunflower Gold → Vanilla Custard
|
|
73
|
-
*/
|
|
74
|
-
export declare const AUTUMN_DARK_COLORS: ThemeColors;
|
|
75
|
-
export declare const CONTRAST_DARK_COLORS: ThemeColors;
|
|
76
|
-
export declare const OCEAN_LIGHT_COLORS: ThemeColors;
|
|
77
|
-
export declare const VIOLET_LIGHT_COLORS: ThemeColors;
|
|
78
|
-
export declare const EMERALD_LIGHT_COLORS: ThemeColors;
|
|
79
|
-
export declare const ROSE_DARK_COLORS: ThemeColors;
|
|
80
|
-
export declare const AMBER_DARK_COLORS: ThemeColors;
|
|
81
|
-
export declare const SLATE_DARK_COLORS: ThemeColors;
|
|
82
|
-
export declare const TOFFEE_DARK_COLORS: ThemeColors;
|
|
83
|
-
export declare const BERRY_DARK_COLORS: ThemeColors;
|
|
84
|
-
export declare const PAPRIKA_DARK_COLORS: ThemeColors;
|
|
85
|
-
export declare const CHERRY_DARK_COLORS: ThemeColors;
|
|
86
|
-
export declare const RUSTIC_DARK_COLORS: ThemeColors;
|
|
87
|
-
export declare const EARTHY_DARK_COLORS: ThemeColors;
|
|
88
|
-
export declare const PEACH_DARK_COLORS: ThemeColors;
|
|
89
|
-
export declare const SAND_DARK_COLORS: ThemeColors;
|
|
90
|
-
export declare const BOLD_LIGHT_COLORS: ThemeColors;
|
|
91
|
-
export declare const AUTUMN_LIGHT_COLORS: ThemeColors;
|
|
92
|
-
export declare const CONTRAST_LIGHT_COLORS: ThemeColors;
|
|
93
|
-
/**
|
|
94
|
-
* Pastel Dreamland Adventure — whimsical violets, candy pinks, gentle blues.
|
|
95
|
-
* Palette: Pink Orchid → Pastel Petal → Blush Pop → Icy Blue → Sky Blue
|
|
96
|
-
*/
|
|
97
|
-
export declare const DREAMLAND_LIGHT_COLORS: ThemeColors;
|
|
98
|
-
export declare const DREAMLAND_DARK_COLORS: ThemeColors;
|
|
99
|
-
/**
|
|
100
|
-
* Autumn Harvest — toasted reds, brown sugar, mellow golds.
|
|
101
|
-
* Palette: Dark Wine → Camel → Dark Coffee → Chocolate Brown → Light Apricot
|
|
102
|
-
*/
|
|
103
|
-
export declare const HARVEST_DARK_COLORS: ThemeColors;
|
|
104
|
-
export declare const HARVEST_LIGHT_COLORS: ThemeColors;
|
|
105
|
-
/**
|
|
106
|
-
* Mystic Evening — deep plum, lilac, rose, soft peach nocturne.
|
|
107
|
-
* Palette: Midnight Violet → Deep Violet → Mauve Shadow → Dusty Mauve → Almond Silk
|
|
108
|
-
*/
|
|
109
|
-
export declare const MYSTIC_DARK_COLORS: ThemeColors;
|
|
110
|
-
export declare const MYSTIC_LIGHT_COLORS: ThemeColors;
|
|
111
|
-
/**
|
|
112
|
-
* Soft Lavender — dusky indigo, soft mauve, smoky plum, blush beige, creamy white.
|
|
113
|
-
* Palette: Space Indigo → Dusty Grape → Lilac Ash → Almond Silk → Seashell
|
|
114
|
-
*/
|
|
115
|
-
export declare const LAVENDER_LIGHT_COLORS: ThemeColors;
|
|
116
|
-
export declare const LAVENDER_DARK_COLORS: ThemeColors;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
import { BurneThemeConfig } from './themeConfig';
|
|
3
|
+
import { ThemeMode } from './themeDefaults';
|
|
4
|
+
export type BurneThemeRuntimeContextValue = {
|
|
5
|
+
/** Config supplied to BurneUIProvider before a temporary preview is applied. */
|
|
6
|
+
baseConfig: BurneThemeConfig;
|
|
7
|
+
/** Config currently rendered by BurneUIProvider. */
|
|
8
|
+
config: BurneThemeConfig;
|
|
9
|
+
previewConfig: BurneThemeConfig | null;
|
|
10
|
+
resolvedTheme: ThemeMode;
|
|
11
|
+
setPreviewConfig: Dispatch<SetStateAction<BurneThemeConfig | null>>;
|
|
12
|
+
clearPreview: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare function BurneThemeRuntimeContextProvider({ children, value, }: {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
value: BurneThemeRuntimeContextValue;
|
|
17
|
+
}): import('react').FunctionComponentElement<import('react').ProviderProps<BurneThemeRuntimeContextValue | null>>;
|
|
18
|
+
export declare function useBurneThemeRuntime(): BurneThemeRuntimeContextValue;
|
|
19
|
+
export declare function useBurneThemeRuntimeOptional(): BurneThemeRuntimeContextValue | null;
|
package/dist/tokens/config.d.ts
CHANGED
|
@@ -77,7 +77,6 @@ export declare const tokensConfig: {
|
|
|
77
77
|
readonly "color-surface-tint-success-hover": "color-surface-tint-success-hover";
|
|
78
78
|
readonly "color-surface-tint-info-hover": "color-surface-tint-info-hover";
|
|
79
79
|
readonly "color-surface-tint-warning-hover": "color-surface-tint-warning-hover";
|
|
80
|
-
readonly "color-surface-tint-primary": "color-surface-tint-primary";
|
|
81
80
|
readonly "icon-xsmall": "icon-size-xsmall";
|
|
82
81
|
readonly "icon-small": "icon-size-small";
|
|
83
82
|
readonly "icon-base": "icon-size-base";
|
package/dist/tokens/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { burneFontWeightScale, FONT_WEIGHT_CSS_VAR, FONT_WEIGHT_DEFAULTS, fontWe
|
|
|
3
3
|
export { burneShadowScale, type ShadowSize, type ShadowLevel, SHADOW_CSS_VAR, shadowToken, } from './shadows';
|
|
4
4
|
export { TOAST_SCRIM_CSS_VAR, TOAST_SCRIM_DEFAULTS, toastScrimToken, type ToastScrimCssVar, } from './toastScrim';
|
|
5
5
|
/** CSS variable names for type-safe access and generators */
|
|
6
|
-
export declare const designTokenNames: readonly ["--border-width", "--color-background", "--color-surface", "--color-border", "--color-foreground", "--color-muted", "--color-primary", "--color-primary-foreground", "--color-primary-hover", "--color-default-hover", "--color-primary-tint", "--color-primary-tint-strong", "--color-indicator", "--color-indicator-foreground", "--color-secondary", "--color-secondary-foreground", "--color-secondary-hover", "--color-tertiary", "--color-tertiary-foreground", "--color-tertiary-hover", "--color-focus-ring", "--color-converge-ripple-primary-fill", "--color-converge-ripple-neutral", "--color-converge-ripple-neutral-muted", "--color-converge-ripple-danger", "--color-converge-ripple-info", "--color-converge-ripple-success", "--color-converge-ripple-warning", "--color-danger", "--color-danger-fill-hover", "--color-danger-foreground", "--color-success", "--color-success-foreground", "--color-success-fill-hover", "--color-info", "--color-info-foreground", "--color-info-fill-hover", "--color-warning", "--color-warning-foreground", "--color-warning-fill-hover", "--color-surface-tint-danger", "--color-surface-tint-success", "--color-surface-tint-info", "--color-surface-tint-warning", "--color-surface-tint-danger-hover", "--color-surface-tint-success-hover", "--color-surface-tint-info-hover", "--color-surface-tint-warning-hover", "--
|
|
6
|
+
export declare const designTokenNames: readonly ["--border-width", "--color-background", "--color-surface", "--color-border", "--color-foreground", "--color-muted", "--color-primary", "--color-primary-foreground", "--color-primary-hover", "--color-default-hover", "--color-primary-tint", "--color-primary-tint-strong", "--color-indicator", "--color-indicator-foreground", "--color-secondary", "--color-secondary-foreground", "--color-secondary-hover", "--color-tertiary", "--color-tertiary-foreground", "--color-tertiary-hover", "--color-focus-ring", "--color-converge-ripple-primary-fill", "--color-converge-ripple-neutral", "--color-converge-ripple-neutral-muted", "--color-converge-ripple-danger", "--color-converge-ripple-info", "--color-converge-ripple-success", "--color-converge-ripple-warning", "--color-danger", "--color-danger-fill-hover", "--color-danger-foreground", "--color-success", "--color-success-foreground", "--color-success-fill-hover", "--color-info", "--color-info-foreground", "--color-info-fill-hover", "--color-warning", "--color-warning-foreground", "--color-warning-fill-hover", "--color-surface-tint-danger", "--color-surface-tint-success", "--color-surface-tint-info", "--color-surface-tint-warning", "--color-surface-tint-danger-hover", "--color-surface-tint-success-hover", "--color-surface-tint-info-hover", "--color-surface-tint-warning-hover", "--font-family-sans", "--font-family-mono", "--font-w-small", "--font-w-base", "--font-w-mid", "--font-w-strong", "--font-w-bold", "--space", "--space-xsmall", "--space-small", "--space-base", "--space-plus", "--space-mid", "--space-large", "--space-xlarge", "--size", "--size-scale-xsmall", "--size-scale-small", "--size-scale-base", "--size-scale-plus", "--size-scale-mid", "--size-scale-large", "--size-scale-xlarge", "--selection-indicator-small", "--selection-indicator-base", "--selection-indicator-mid", "--selection-indicator-large", "--radius", "--radius-value-xsmall", "--radius-value-small", "--radius-value-base", "--radius-value-mid", "--radius-value-large", "--text-scale-tools", "--text-scale-tools--line-height", "--text-scale-xsmall", "--text-scale-xsmall--line-height", "--text-scale-small", "--text-scale-small--line-height", "--text-scale-base", "--text-scale-base--line-height", "--text-scale-mid", "--text-scale-mid--line-height", "--text-scale-large", "--text-scale-large--line-height", "--text-scale-xlarge", "--text-scale-xlarge--line-height", "--text-scale-2xlarge", "--text-scale-2xlarge--line-height", "--text-scale-3xlarge", "--text-scale-3xlarge--line-height", "--text-accent-header-size", "--text-accent-header-line-height", "--text-accent-header-weight", "--text-header-1-size", "--text-header-1-line-height", "--text-header-1-weight", "--text-header-2-size", "--text-header-2-line-height", "--text-header-2-weight", "--text-large-size", "--text-large-line-height", "--text-large-weight", "--text-base-size", "--text-base-line-height", "--text-base-weight", "--text-small-size", "--text-small-line-height", "--text-small-weight", "--text-mid-size", "--text-mid-line-height", "--text-mid-weight", "--text-tools-size", "--text-tools-line-height", "--text-tools-weight", "--max-component-small", "--max-component-base", "--max-component-mid", "--max-component-large", "--button-min-width-small", "--button-min-width-base", "--button-min-width-mid", "--button-min-width-large", "--control-height-small", "--control-height-base", "--control-height-mid", "--control-height-large", "--avatar-size-small", "--avatar-size-base", "--avatar-size-mid", "--avatar-size-large", "--icon-size-xsmall", "--icon-size-small", "--icon-size-base", "--icon-size-mid", "--icon-size-large", "--icon-size-xlarge", "--icon-size-2xlarge", "--shadow-size", "--shadow-none", "--shadow-base", "--shadow-mid", "--shadow-large", "--toast-scrim-size", "--toast-scrim-density"];
|
|
7
7
|
export type DesignCssVar = (typeof designTokenNames)[number];
|
|
8
8
|
type ColorCssVarName = Extract<DesignCssVar, `--color-${string}`>;
|
|
9
9
|
/** Suffix after `--color-` (same as theme key without the `color-` prefix) */
|
package/dist/ui.css
CHANGED
|
@@ -419,18 +419,6 @@
|
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
|
|
422
|
-
:root {
|
|
423
|
-
--color-surface-tint-primary: var(--color-primary);
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
427
|
-
:root {
|
|
428
|
-
--color-surface-tint-primary: color-mix(in oklab,
|
|
429
|
-
var(--color-primary) 28%,
|
|
430
|
-
black);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
|
|
434
422
|
:root {
|
|
435
423
|
--font-family-sans: ui-sans-serif, system-ui, sans-serif;
|
|
436
424
|
--font-family-mono: ui-monospace, monospace;
|
|
@@ -990,18 +978,6 @@
|
|
|
990
978
|
--gloss-tint-default: #fff;
|
|
991
979
|
--gloss-edge: #ffffff0d;
|
|
992
980
|
--gloss-press-inset: #00000007;
|
|
993
|
-
--color-surface-tint-primary: var(--color-primary);
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
997
|
-
[data-theme="light"] {
|
|
998
|
-
--color-surface-tint-primary: color-mix(in oklab,
|
|
999
|
-
var(--color-primary) 14%,
|
|
1000
|
-
white);
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
[data-theme="light"] {
|
|
1005
981
|
--shadow-none: 0 calc(2px * var(--shadow-size)) calc(4px * var(--shadow-size))
|
|
1006
982
|
calc(-2px * var(--shadow-size)) #0000;
|
|
1007
983
|
--shadow-base: 0 calc(2px * var(--shadow-size)) calc(4px * var(--shadow-size))
|
|
@@ -1014,6 +990,8 @@
|
|
|
1014
990
|
|
|
1015
991
|
@layer theme {
|
|
1016
992
|
:root, :host {
|
|
993
|
+
--font-sans: var(--font-family-sans);
|
|
994
|
+
--font-mono: var(--font-family-mono);
|
|
1017
995
|
--color-amber-300: oklch(87.9% .169 91.605);
|
|
1018
996
|
--color-amber-400: oklch(82.8% .189 84.429);
|
|
1019
997
|
--color-amber-500: oklch(76.9% .188 70.08);
|
|
@@ -1041,6 +1019,8 @@
|
|
|
1041
1019
|
--text-xs--line-height: calc(1 / .75);
|
|
1042
1020
|
--text-sm: .875rem;
|
|
1043
1021
|
--text-sm--line-height: calc(1.25 / .875);
|
|
1022
|
+
--text-base: var(--text-base-size);
|
|
1023
|
+
--text-base--line-height: var(--text-base-line-height);
|
|
1044
1024
|
--text-xl: 1.25rem;
|
|
1045
1025
|
--text-xl--line-height: calc(1.75 / 1.25);
|
|
1046
1026
|
--text-2xl: 1.5rem;
|
|
@@ -1111,7 +1091,7 @@
|
|
|
1111
1091
|
--color-surface-tint-success-hover: var(--color-surface-tint-success-hover);
|
|
1112
1092
|
--color-surface-tint-info-hover: var(--color-surface-tint-info-hover);
|
|
1113
1093
|
--color-surface-tint-warning-hover: var(--color-surface-tint-warning-hover);
|
|
1114
|
-
--
|
|
1094
|
+
--text-base--font-weight: var(--text-base-weight);
|
|
1115
1095
|
}
|
|
1116
1096
|
}
|
|
1117
1097
|
|