burne-ui 1.3.5 → 1.4.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.
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ import { MotionConfig } from '../components/core/utils/motionConfig';
3
+ import { ToastProviderProps } from '../components/core/Toast/toastTypes';
4
+ import { BurneThemeConfig, BurneThemeMode, ThemeTokenOverrides } from './themeConfig';
5
+ import { ThemeProviderProps } from './ThemeProvider';
6
+ export type BurneUIProviderProps = {
7
+ children: ReactNode;
8
+ /**
9
+ * Full config object (e.g. imported from a playground-exported `burne-theme.ts`).
10
+ * Individual props below override matching fields from `config`.
11
+ */
12
+ config?: BurneThemeConfig;
13
+ theme?: BurneThemeMode;
14
+ defaultTheme?: BurneThemeMode;
15
+ storageKey?: string | null;
16
+ tokens?: ThemeTokenOverrides;
17
+ motion?: Partial<MotionConfig>;
18
+ /**
19
+ * Wrap with `Toast.Provider`.
20
+ * Pass `false` to skip, or an options object for Toast defaults.
21
+ * @default true
22
+ */
23
+ toast?: boolean | Omit<ToastProviderProps, "children">;
24
+ root?: ThemeProviderProps["root"];
25
+ onThemeChange?: ThemeProviderProps["onThemeChange"];
26
+ };
27
+ /**
28
+ * App-level provider: theme (`data-theme`), design tokens, motion, and Toast.
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * import { BurneUIProvider } from "burne-ui";
33
+ * import burneTheme from "./burne-theme";
34
+ *
35
+ * <BurneUIProvider config={burneTheme}>{children}</BurneUIProvider>
36
+ * ```
37
+ */
38
+ export declare function BurneUIProvider(props: BurneUIProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react';
2
+ import { BurneThemeMode } from './themeConfig';
3
+ import { ThemeMode } from './themeDefaults';
4
+ export type BurneThemeContextValue = {
5
+ /** User preference: light | dark | system */
6
+ theme: BurneThemeMode;
7
+ /** Resolved light | dark after system preference */
8
+ resolvedTheme: ThemeMode;
9
+ setTheme: (theme: BurneThemeMode) => void;
10
+ };
11
+ export declare function resolveBurneTheme(theme: BurneThemeMode): ThemeMode;
12
+ /** Apply `data-theme` on the root element (light → attribute, dark → remove). */
13
+ export declare function applyThemeMode(theme: ThemeMode, root?: HTMLElement): void;
14
+ export type ThemeProviderProps = {
15
+ children: ReactNode;
16
+ /** Controlled theme. When set, `defaultTheme` is ignored. */
17
+ theme?: BurneThemeMode;
18
+ /** Uncontrolled initial theme. @default "dark" */
19
+ defaultTheme?: BurneThemeMode;
20
+ /**
21
+ * localStorage key for persistence.
22
+ * Pass `null` to disable. @default "burne-ui-theme"
23
+ */
24
+ storageKey?: string | null;
25
+ /** Element that receives `data-theme`. @default document.documentElement */
26
+ root?: HTMLElement | null;
27
+ onThemeChange?: (theme: BurneThemeMode) => void;
28
+ };
29
+ export declare function ThemeProvider({ children, theme: themeProp, defaultTheme, storageKey, root, onThemeChange, }: ThemeProviderProps): import('react').FunctionComponentElement<import('react').ProviderProps<BurneThemeContextValue | null>>;
30
+ export declare function useBurneTheme(): BurneThemeContextValue;
31
+ /** Optional hook — returns null outside provider (for progressive enhancement). */
32
+ export declare function useBurneThemeOptional(): BurneThemeContextValue | null;
@@ -0,0 +1,13 @@
1
+ import { ColorPresetKey, ThemeColors, ThemeMode, ThemeStatusForegrounds, ThemeTokenState } from './themeDefaults';
2
+ export type ColorPresetSlice = {
3
+ colors: ThemeColors;
4
+ statusForegrounds: ThemeStatusForegrounds;
5
+ shadowStrength?: number;
6
+ };
7
+ export type ColorPresetDefinition = Record<ThemeMode, ColorPresetSlice>;
8
+ export declare const COLOR_PRESET_DEFINITIONS: Record<ColorPresetKey, ColorPresetDefinition>;
9
+ export declare function colorPresetSlice(preset: ColorPresetKey, mode: ThemeMode): ColorPresetSlice;
10
+ export declare function applyColorPresetToState(prev: ThemeTokenState, preset: ColorPresetKey, options?: {
11
+ resetScale?: boolean;
12
+ }): ThemeTokenState;
13
+ export declare function applyThemeModeToState(prev: ThemeTokenState, theme: ThemeMode): ThemeTokenState;
@@ -0,0 +1,6 @@
1
+ export { applyThemeTokens, clearThemeInlineTokens, createDefaultThemeState, exportThemeCss, isBorderColorCustomized, isDefaultBorderColor, ANIMATION_FLAG_LABELS, BORDER_COLOR_CSS_FORMULA_BY_THEME, COLOR_CSS_VAR, COLOR_LABELS, DEFAULT_FONT, DEFAULT_FONT_MONO, FONT_PRESETS, FONT_WEIGHT_CSS_VAR, FONT_WEIGHT_DEFAULTS, FONT_WEIGHT_LABELS, GSAP_EASE_OPTIONS, LAYOUT_PRESETS, MONO_FONT_PRESETS, MOTION_DURATION_LABELS, MOTION_EASE_LABELS, MOTION_SCALE_LABELS, RIPPLE_EASE_CSS_OPTIONS, SCALE_DEFAULTS, SCALE_TOKEN_LABELS, STATUS_FOREGROUND_CSS_VAR, STATUS_FOREGROUND_LABELS, TEXT_SCALE_BASES, type ColorPresetKey, type LayoutPresetKey, type ThemeColorKey, type ThemeColors, type ThemeFontWeightKey, type ThemeFontWeights, type ThemeMode, type ThemeStatusForegroundKey, type ThemeStatusForegrounds, type ThemeTokenState, } from './themeDefaults';
2
+ export { BORDER_COLOR_CSS_FORMULA, DARK_COLORS, DARK_STATUS_FOREGROUNDS, LIGHT_COLORS, LIGHT_STATUS_FOREGROUNDS, } from './themePalettes';
3
+ export { COLOR_PRESET_DEFINITIONS, applyColorPresetToState, applyThemeModeToState, colorPresetSlice, type ColorPresetDefinition, type ColorPresetSlice, } from './colorPresets';
4
+ export { applyBurneThemeConfig, applyTokens, exportBurneThemeConfigSource, exportBurneThemeCss, mergeThemeTokenOverrides, resolveConfigTheme, themeTokenStateToConfig, type BurneThemeConfig, type BurneThemeMode, type ThemeTokenOverrides, } from './themeConfig';
5
+ export { ThemeProvider, applyThemeMode, resolveBurneTheme, useBurneTheme, useBurneThemeOptional, type BurneThemeContextValue, type ThemeProviderProps, } from './ThemeProvider';
6
+ export { BurneUIProvider, type BurneUIProviderProps } from './BurneUIProvider';
@@ -0,0 +1,64 @@
1
+ import { MotionConfig } from '../components/core/utils/motionConfig';
2
+ import { ToastProviderProps } from '../components/core/Toast/toastTypes';
3
+ import { ThemeColors, ThemeFontWeights, ThemeMode, ThemeStatusForegrounds, ThemeTokenState } from './themeDefaults';
4
+ /** Color mode for ThemeProvider / BurneUIProvider (`system` follows OS). */
5
+ export type BurneThemeMode = ThemeMode | "system";
6
+ /**
7
+ * Runtime CSS token overrides. Omit fields to keep values from `burne-ui/styles.css`.
8
+ * When exporting from the playground, all fields are filled for a faithful snapshot.
9
+ */
10
+ export type ThemeTokenOverrides = {
11
+ space?: number;
12
+ size?: number;
13
+ radius?: number;
14
+ borderWidth?: number;
15
+ textScale?: number;
16
+ fontFamily?: string;
17
+ fontFamilyMono?: string;
18
+ fontWeights?: ThemeFontWeights;
19
+ shadowStrength?: number;
20
+ shadowSize?: number;
21
+ toastScrimSize?: number;
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
+ };
28
+ /**
29
+ * Serializable theme config for `BurneUIProvider`.
30
+ * Generate via `exportBurneThemeConfigSource()` from the playground and save as e.g. `burne-theme.ts`.
31
+ */
32
+ export type BurneThemeConfig = {
33
+ /** @default "dark" */
34
+ theme?: BurneThemeMode;
35
+ /** localStorage key for theme preference. Pass `null` to disable persistence. */
36
+ storageKey?: string | null;
37
+ tokens?: ThemeTokenOverrides;
38
+ motion?: Partial<MotionConfig>;
39
+ /** Wrap children with `Toast.Provider`. @default true */
40
+ toast?: boolean | Omit<ToastProviderProps, "children">;
41
+ };
42
+ /** Build a `BurneThemeConfig` snapshot from live playground state. */
43
+ export declare function themeTokenStateToConfig(state: ThemeTokenState): BurneThemeConfig;
44
+ /** Merge token overrides into a full `ThemeTokenState` (for `applyThemeTokens`). */
45
+ export declare function mergeThemeTokenOverrides(overrides: ThemeTokenOverrides | undefined, theme?: ThemeMode): ThemeTokenState;
46
+ /**
47
+ * Apply a `BurneThemeConfig` to the document (tokens + motion via `applyThemeTokens`).
48
+ * Theme mode `system` is resolved by `ThemeProvider` — pass the resolved `"light" | "dark"` here.
49
+ */
50
+ export declare function applyBurneThemeConfig(config: BurneThemeConfig, root?: HTMLElement, resolvedTheme?: ThemeMode): void;
51
+ export declare function resolveConfigTheme(theme: BurneThemeMode | undefined): ThemeMode;
52
+ /** Alias: apply token overrides without a full config object. */
53
+ export declare function applyTokens(overrides: ThemeTokenOverrides, root?: HTMLElement, theme?: ThemeMode): void;
54
+ /** CSS string for `burne-theme-overrides.css` (same as playground “Copy CSS”). */
55
+ export declare function exportBurneThemeCss(config: BurneThemeConfig): string;
56
+ /**
57
+ * TypeScript source for a project file (e.g. `burne-theme.ts`).
58
+ * Paste into the project and pass to `<BurneUIProvider config={burneTheme} />`.
59
+ */
60
+ export declare function exportBurneThemeConfigSource(config: BurneThemeConfig, options?: {
61
+ exportName?: string;
62
+ }): string;
63
+ /** @internal used by docs — list of motion keys mirrored from ThemeTokenState */
64
+ export declare const BURNE_THEME_MOTION_STATE_KEYS: readonly ["interactiveDuration", "interactiveEase", "hoverLiftEase", "tooltipDuration", "switchThumbDuration", "switchThumbEase", "selectionFillDuration", "selectionFillEase", "hoverLiftScale", "badgeAnchorHoverLiftScale", "rippleDefaultDuration", "rippleDefaultOpacityFrom", "rippleExpandableDuration", "rippleExpandableOpacityFrom", "rippleEaseCss", "feedbackExpandDuration", "expandDuration", "expandOpenEase", "progressFillDuration", "progressFillEase", "loadingDotsDuration", "loadingDotsEaseUp", "loadingDotsEaseDown", "enableHoverLift", "enablePressSqueeze", "enableToggleButtonFill", "enableRipple", "enableExpandable", "enableToastStack", "enableAsyncButtonCrossfade", "enableContentFade", "enableFeedbackExpand", "enableProgressFill", "enableLoadingDots"];
@@ -0,0 +1,340 @@
1
+ import { FONT_WEIGHT_CSS_VAR, FONT_WEIGHT_DEFAULTS, FontWeightStep } from '../tokens/fontWeights';
2
+ import { BORDER_COLOR_CSS_FORMULA, DARK_COLORS, LIGHT_COLORS, DARK_STATUS_FOREGROUNDS, LIGHT_STATUS_FOREGROUNDS } from './themePalettes';
3
+ export type ThemeMode = "dark" | "light";
4
+ export { FONT_WEIGHT_DEFAULTS, FONT_WEIGHT_CSS_VAR };
5
+ export { BORDER_COLOR_CSS_FORMULA, DARK_COLORS, LIGHT_COLORS, DARK_STATUS_FOREGROUNDS, LIGHT_STATUS_FOREGROUNDS, };
6
+ export type ThemeColorKey = "background" | "surface" | "secondary" | "secondaryForeground" | "tertiary" | "tertiaryForeground" | "border" | "foreground" | "muted" | "primary" | "primaryForeground" | "primaryTint" | "primaryTintStrong" | "focusRing" | "indicator" | "indicatorForeground" | "danger" | "success" | "info" | "warning";
7
+ export type ThemeStatusForegroundKey = "dangerForeground" | "successForeground" | "infoForeground" | "warningForeground";
8
+ export type ThemeFontWeightKey = FontWeightStep;
9
+ export type ThemeFontWeights = Record<ThemeFontWeightKey, number>;
10
+ export type ThemeColors = Record<ThemeColorKey, string>;
11
+ 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
+ export type ThemeTokenState = {
15
+ theme: ThemeMode;
16
+ space: number;
17
+ size: number;
18
+ radius: number;
19
+ borderWidth: number;
20
+ textScale: number;
21
+ fontFamily: string;
22
+ fontFamilyMono: string;
23
+ fontWeights: ThemeFontWeights;
24
+ shadowStrength: number;
25
+ /** Factor blur/offset shadows (`--shadow-size`). */
26
+ shadowSize: number;
27
+ /** Substrate size multiplier Toast (`--toast-scrim-size`). */
28
+ toastScrimSize: number;
29
+ /** Substrate Density Multiplier Toast (`--toast-scrim-density`). */
30
+ toastScrimDensity: number;
31
+ interactiveDuration: number;
32
+ interactiveEase: string;
33
+ hoverLiftEase: string;
34
+ tooltipDuration: number;
35
+ switchThumbDuration: number;
36
+ switchThumbEase: string;
37
+ selectionFillDuration: number;
38
+ selectionFillEase: string;
39
+ hoverLiftScale: number;
40
+ badgeAnchorHoverLiftScale: number;
41
+ /** Middle keyframe of `pressSqueezeScale` ([1, mid, 1]). */
42
+ pressSqueezeMid: number;
43
+ rippleDefaultDuration: number;
44
+ rippleDefaultOpacityFrom: number;
45
+ rippleExpandableDuration: number;
46
+ rippleExpandableOpacityFrom: number;
47
+ rippleEaseCss: string;
48
+ feedbackExpandDuration: number;
49
+ expandDuration: number;
50
+ expandOpenEase: string;
51
+ progressFillDuration: number;
52
+ progressFillEase: string;
53
+ loadingDotsDuration: number;
54
+ loadingDotsEaseUp: string;
55
+ loadingDotsEaseDown: string;
56
+ enableHoverLift: boolean;
57
+ enablePressSqueeze: boolean;
58
+ enableToggleButtonFill: boolean;
59
+ enableRipple: boolean;
60
+ enableExpandable: boolean;
61
+ enableToastStack: boolean;
62
+ enableAsyncButtonCrossfade: boolean;
63
+ enableContentFade: boolean;
64
+ enableFeedbackExpand: boolean;
65
+ enableProgressFill: boolean;
66
+ enableLoadingDots: boolean;
67
+ colors: ThemeColors;
68
+ statusForegrounds: ThemeStatusForegrounds;
69
+ /** true — `--color-border` is given inline; false — formula from tokens/styles.css (as in Storybook). */
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";
128
+ };
129
+ 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
+ export declare const SCALE_DEFAULTS: {
139
+ readonly space: 0.5;
140
+ readonly size: 1;
141
+ /** Base radius in rem; steps `rounded-*` — multipliers from `--radius`. */
142
+ readonly radius: 0.5;
143
+ readonly borderWidth: 1;
144
+ readonly textScale: 1;
145
+ readonly shadowStrength: 1;
146
+ readonly shadowSize: 1;
147
+ readonly toastScrimSize: 1;
148
+ readonly toastScrimDensity: 1;
149
+ readonly interactiveDuration: 280;
150
+ readonly interactiveEase: "power2.out";
151
+ readonly hoverLiftEase: "sine.inOut";
152
+ readonly tooltipDuration: 200;
153
+ readonly switchThumbDuration: 340;
154
+ readonly switchThumbEase: "back.out(1.4)";
155
+ readonly selectionFillDuration: 200;
156
+ readonly selectionFillEase: "back.out(1.25)";
157
+ readonly hoverLiftScale: 1.025;
158
+ readonly badgeAnchorHoverLiftScale: 1.052;
159
+ readonly pressSqueezeMid: 0.98;
160
+ readonly rippleDefaultDuration: 700;
161
+ readonly rippleDefaultOpacityFrom: 0.42;
162
+ readonly rippleExpandableDuration: 700;
163
+ readonly rippleExpandableOpacityFrom: 0.34;
164
+ readonly rippleEaseCss: "cubic-bezier(0.25, 0.55, 0.35, 0.95)";
165
+ readonly feedbackExpandDuration: 720;
166
+ readonly expandDuration: 200;
167
+ readonly expandOpenEase: "sine.inOut";
168
+ readonly progressFillDuration: 600;
169
+ readonly progressFillEase: "power2.out";
170
+ readonly loadingDotsDuration: 900;
171
+ readonly loadingDotsEaseUp: "power2.out";
172
+ readonly loadingDotsEaseDown: "power2.in";
173
+ readonly enableHoverLift: true;
174
+ readonly enablePressSqueeze: true;
175
+ readonly enableToggleButtonFill: true;
176
+ readonly enableRipple: true;
177
+ readonly enableExpandable: true;
178
+ readonly enableToastStack: true;
179
+ readonly enableAsyncButtonCrossfade: true;
180
+ readonly enableContentFade: true;
181
+ readonly enableFeedbackExpand: true;
182
+ readonly enableProgressFill: true;
183
+ readonly enableLoadingDots: true;
184
+ };
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
+ export declare const DEFAULT_FONT = "ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif";
211
+ 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
+ /** Basic typography sizes from `src/tokens/styles.css` (rem). */
299
+ export declare const TEXT_SCALE_BASES: {
300
+ readonly tools: {
301
+ readonly size: 0.6875;
302
+ readonly line: 0.875;
303
+ };
304
+ readonly xsmall: {
305
+ readonly size: 0.75;
306
+ readonly line: 1;
307
+ };
308
+ readonly small: {
309
+ readonly size: 0.875;
310
+ readonly line: 1.25;
311
+ };
312
+ readonly base: {
313
+ readonly size: 1;
314
+ readonly line: 1.5;
315
+ };
316
+ readonly mid: {
317
+ readonly size: 1.125;
318
+ readonly line: 1.75;
319
+ };
320
+ readonly large: {
321
+ readonly size: 1.25;
322
+ readonly line: 1.75;
323
+ };
324
+ readonly xlarge: {
325
+ readonly size: 1.5;
326
+ readonly line: 2;
327
+ };
328
+ readonly "2xlarge": {
329
+ readonly size: 1.875;
330
+ readonly line: 2.25;
331
+ };
332
+ readonly "3xlarge": {
333
+ readonly size: 2.25;
334
+ readonly line: 2.5;
335
+ };
336
+ };
337
+ export declare function createDefaultThemeState(theme?: ThemeMode): ThemeTokenState;
338
+ export declare function clearThemeInlineTokens(root?: HTMLElement): void;
339
+ export declare function applyThemeTokens(state: ThemeTokenState, root?: HTMLElement): void;
340
+ export declare function exportThemeCss(state: ThemeTokenState): string;
@@ -0,0 +1,116 @@
1
+ import { ThemeColors, ThemeStatusForegrounds } from './themeDefaults';
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)";
13
+ export declare const DARK_COLORS: ThemeColors;
14
+ 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;
package/dist/ui.css CHANGED
@@ -1060,6 +1060,7 @@
1060
1060
  --radius-lg: .5rem;
1061
1061
  --radius-2xl: 1rem;
1062
1062
  --shadow-sm: 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
1063
+ --ease-out: cubic-bezier(0, 0, .2, 1);
1063
1064
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
1064
1065
  --animate-spin: spin 1s linear infinite;
1065
1066
  --blur-md: 12px;
@@ -5620,6 +5621,11 @@
5620
5621
  transition-timing-function: var(--ease-in-out);
5621
5622
  }
5622
5623
 
5624
+ .ease-out {
5625
+ --tw-ease: var(--ease-out);
5626
+ transition-timing-function: var(--ease-out);
5627
+ }
5628
+
5623
5629
  .will-change-\[transform\,opacity\] {
5624
5630
  will-change: transform,opacity;
5625
5631
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "burne-ui",
3
- "version": "1.3.5",
3
+ "version": "1.4.0",
4
4
  "description": "React UI kit (Burne UI)",
5
5
  "type": "module",
6
6
  "sideEffects": [