burne-ui 1.6.4 → 1.6.6
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 +50 -8
- package/cli/init.js +8 -2
- package/dist/components/composite/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/components/composite/AlertDialog/alertDialogA11y.d.ts +1 -0
- package/dist/components/composite/AlertDialog/alertDialogParts.d.ts +1 -1
- package/dist/components/composite/AlertDialog/alertDialogStyles.d.ts +5 -4
- package/dist/components/composite/AlertDialog/alertDialogTypes.d.ts +14 -1
- package/dist/components/composite/AlertDialog/useAlertDialogRootState.d.ts +1 -1
- package/dist/components/core/Breadcrumbs/breadcrumbsA11y.d.ts +3 -4
- package/dist/components/core/Calendar/calendarA11y.d.ts +5 -0
- package/dist/components/core/Calendar/calendarAPI.d.ts +22 -0
- package/dist/components/core/Calendar/calendarTypes.d.ts +9 -1
- package/dist/components/core/Card/cardStyles.d.ts +3 -3
- package/dist/components/core/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/core/Checkbox/index.d.ts +1 -1
- package/dist/components/core/CloseButton/closeButtonA11y.d.ts +1 -1
- package/dist/components/core/CloseButton/closeButtonStyles.d.ts +1 -2
- package/dist/components/core/ColorPicker/colorPickerA11y.d.ts +10 -5
- package/dist/components/core/ColorPicker/colorPickerAnimations.d.ts +3 -1
- package/dist/components/core/ColorPicker/colorPickerStyles.d.ts +5 -5
- package/dist/components/core/ComboBox/comboBoxA11y.d.ts +4 -1
- package/dist/components/core/ComboBox/comboBoxStyles.d.ts +2 -2
- package/dist/components/core/Dialog/dialogParts.d.ts +1 -1
- package/dist/components/core/Dialog/dialogStyles.d.ts +7 -6
- package/dist/components/core/Dialog/dialogTypes.d.ts +3 -0
- package/dist/components/core/Drawer/drawerA11y.d.ts +4 -2
- package/dist/components/core/Drawer/drawerParts.d.ts +2 -2
- package/dist/components/core/Drawer/drawerStyles.d.ts +11 -10
- package/dist/components/core/Drawer/drawerTypes.d.ts +3 -0
- package/dist/components/core/Dropdown/dropdownA11y.d.ts +1 -0
- package/dist/components/core/Dropdown/dropdownAnimations.d.ts +3 -1
- package/dist/components/core/Dropdown/dropdownStyles.d.ts +3 -3
- package/dist/components/core/Dropdown/dropdownTypes.d.ts +8 -0
- package/dist/components/core/Input/index.d.ts +1 -1
- package/dist/components/core/Input/inputA11y.d.ts +3 -3
- package/dist/components/core/Input/inputControlParts.d.ts +1 -1
- package/dist/components/core/Kbd/kbdStyles.d.ts +1 -1
- package/dist/components/core/ListBox/listBoxA11y.d.ts +3 -0
- package/dist/components/core/ListBox/listBoxAPI.d.ts +13 -0
- package/dist/components/core/ListBox/listBoxParts.d.ts +1 -1
- package/dist/components/core/ListBox/listBoxStyles.d.ts +5 -5
- package/dist/components/core/ListBox/listBoxTypes.d.ts +5 -0
- package/dist/components/core/Pagination/paginationA11y.d.ts +3 -4
- package/dist/components/core/Popover/popoverA11y.d.ts +8 -0
- package/dist/components/core/Popover/popoverStyles.d.ts +2 -2
- package/dist/components/core/Popover/popoverTypes.d.ts +1 -1
- package/dist/components/core/Radio/Radio.d.ts +1 -1
- package/dist/components/core/Radio/index.d.ts +1 -1
- package/dist/components/core/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/core/SearchInput/searchInputA11y.d.ts +3 -3
- package/dist/components/core/SearchInput/searchInputStyles.d.ts +2 -1
- package/dist/components/core/SearchInput/searchInputTypes.d.ts +2 -0
- package/dist/components/core/SearchInput/useSearchInputRootState.d.ts +2 -2
- package/dist/components/core/Select/selectA11y.d.ts +4 -1
- package/dist/components/core/Select/selectAPI.d.ts +3 -0
- package/dist/components/core/Select/selectStyles.d.ts +4 -4
- package/dist/components/core/Skeleton/Skeleton.d.ts +3 -3
- package/dist/components/core/Skeleton/index.d.ts +5 -1
- package/dist/components/core/Skeleton/skeletonA11y.d.ts +5 -0
- package/dist/components/core/Skeleton/skeletonParts.d.ts +4 -0
- package/dist/components/core/Skeleton/skeletonStyles.d.ts +1 -1
- package/dist/components/core/Skeleton/skeletonTypes.d.ts +9 -0
- package/dist/components/core/Slider/sliderThumbParts.d.ts +1 -1
- package/dist/components/core/Slider/useSliderTrackState.d.ts +2 -2
- package/dist/components/core/Surface/surfaceStyles.d.ts +1 -1
- package/dist/components/core/Surface/surfaceTypes.d.ts +1 -1
- package/dist/components/core/Switch/index.d.ts +1 -1
- package/dist/components/core/Switch/switchControlParts.d.ts +1 -1
- package/dist/components/core/Switch/useSwitchRootState.d.ts +1 -1
- package/dist/components/core/Table/tableA11y.d.ts +9 -2
- package/dist/components/core/Table/tableAPI.d.ts +5 -0
- package/dist/components/core/Table/tableStyles.d.ts +9 -4
- package/dist/components/core/Table/tableTypes.d.ts +5 -0
- package/dist/components/core/Text/textTypes.d.ts +1 -1
- package/dist/components/core/TextArea/textAreaA11y.d.ts +1 -1
- package/dist/components/core/TextArea/textAreaStyles.d.ts +1 -1
- package/dist/components/core/TextArea/useTextAreaResize.d.ts +2 -1
- package/dist/components/core/TimeField/timeFieldA11y.d.ts +7 -5
- package/dist/components/core/TimeField/useTimeFieldControlState.d.ts +1 -1
- package/dist/components/core/TimeField/useTimeFieldRootState.d.ts +0 -1
- package/dist/components/core/Toast/toastA11y.d.ts +8 -2
- package/dist/components/core/Toast/toastStyles.d.ts +1 -1
- package/dist/components/core/Toast/toastTypes.d.ts +6 -0
- package/dist/components/core/Toast/useToastProviderState.d.ts +2 -1
- package/dist/components/core/Toast/useToastRootState.d.ts +0 -1
- package/dist/components/core/ToggleButton/toggleButtonStyles.d.ts +2 -0
- package/dist/components/core/ToggleButton/toggleButtonTypes.d.ts +0 -2
- package/dist/components/core/Tooltip/tooltipStyles.d.ts +2 -2
- package/dist/components/core/utils/motionConfig.d.ts +42 -6
- package/dist/components/core/utils/typeahead.d.ts +20 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +14132 -12875
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.ts +3 -1
- package/dist/internal.js +75 -68
- package/dist/theme/BurneLabelsProvider.d.ts +17 -0
- package/dist/theme/BurneUIProvider.d.ts +11 -3
- package/dist/theme/burneLabels.d.ts +54 -0
- package/dist/theme/index.d.ts +5 -2
- package/dist/theme/themeConfig.d.ts +11 -1
- package/dist/theme/themeDefaults.d.ts +62 -76
- package/dist/theme/themeScript.d.ts +30 -0
- package/dist/themeRuntimeContext-DHGARM65.cjs +50 -0
- package/dist/{themeRuntimeContext-rM9wHr74.js → themeRuntimeContext-cixzM5Ix.js} +1867 -1767
- package/dist/tokens/config.d.ts +42 -12
- package/dist/tokens/index.d.ts +5 -2
- package/dist/tokens/overlayBackdrop.d.ts +17 -0
- package/dist/tokens/shadows.d.ts +21 -0
- package/dist/tokens/textScale.d.ts +36 -0
- package/dist/tokens/zIndex.d.ts +15 -0
- package/dist/ui.css +363 -244
- package/package.json +4 -3
- package/dist/components/core/Dialog/dialogA11y.d.ts +0 -1
- package/dist/themeRuntimeContext-Cn9YgR1F.cjs +0 -50
package/dist/internal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./themeRuntimeContext-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./themeRuntimeContext-DHGARM65.cjs");exports.COLOR_CSS_VAR=e.COLOR_CSS_VAR;exports.CONTROL_SIZE_LAYOUT=e.CONTROL_SIZE_LAYOUT;exports.ConvergeRippleLayer=e.ConvergeRippleLayer;exports.DARK_COLORS=e.DARK_COLORS;exports.DEFAULT_FONT=e.DEFAULT_FONT;exports.DEFAULT_FONT_MONO=e.DEFAULT_FONT_MONO;exports.FIELD_SHELL_FOCUS_CLASS=e.FIELD_SHELL_FOCUS_CLASS;exports.FIELD_SHELL_TRANSITION_CLASS=e.FIELD_SHELL_TRANSITION_CLASS;exports.FONT_WEIGHT_CSS_VAR=e.FONT_WEIGHT_CSS_VAR;exports.FONT_WEIGHT_DEFAULTS=e.FONT_WEIGHT_DEFAULTS;exports.LIGHT_COLORS=e.LIGHT_COLORS;exports.MOTION_CONFIG_DEFAULTS=e.MOTION_CONFIG_DEFAULTS;exports.MOTION_CSS_VAR=e.MOTION_CSS_VAR;exports.MOTION_DEFAULTS=e.MOTION_DEFAULTS;exports.SCALE_DEFAULTS=e.SCALE_DEFAULTS;exports.SHADOW_LAYER_GEOM=e.SHADOW_LAYER_GEOM;exports.SHADOW_LIFT_MOTION_CLASS=e.SHADOW_LIFT_MOTION_CLASS;exports.SHADOW_OPACITY_BASE=e.SHADOW_OPACITY_BASE;exports.SHADOW_SIZE_CSS_DEFAULT=e.SHADOW_SIZE_CSS_DEFAULT;exports.TEXT_SCALE_BASES=e.TEXT_SCALE_BASES;exports.activateThemeModePalette=e.activateThemeModePalette;exports.affixSlotClass=e.affixSlotClass;exports.affixToggleMinWClass=e.affixToggleMinWClass;exports.animateInteractiveHoverLift=e.animateInteractiveHoverLift;exports.animateInteractivePressSqueeze=e.animateInteractivePressSqueeze;exports.applyBurneThemeConfig=e.applyBurneThemeConfig;exports.applyCustomThemeTokens=e.applyCustomThemeTokens;exports.applyMotionCssTokens=e.applyMotionCssTokens;exports.applyThemeMode=e.applyThemeMode;exports.applyThemeTokens=e.applyThemeTokens;exports.applyTokens=e.applyTokens;exports.buttonGroupOverlapBorderClasses=e.buttonGroupOverlapBorderClasses;exports.buttonGroupRoundingClasses=e.buttonGroupRoundingClasses;exports.buttonGroupSegmentSurfaceClasses=e.buttonGroupSegmentSurfaceClasses;exports.buttonGroupTextFrameClass=e.buttonGroupTextFrameClass;exports.buttonGroupTextSurfaceClasses=e.buttonGroupTextSurfaceClasses;exports.buttonRippleTone=e.buttonRippleTone;exports.buttonRootClass=e.buttonRootClass;exports.buttonSpinnerClass=e.buttonSpinnerClass;exports.clearCustomThemeTokens=e.clearCustomThemeTokens;exports.clearThemeInlineTokens=e.clearThemeInlineTokens;exports.controlShellClass=e.controlShellClass;exports.createConvergeRippleAtPointer=e.createConvergeRippleAtPointer;exports.createConvergeRippleFromPointer=e.createConvergeRippleFromPointer;exports.createDefaultBurneThemeConfig=e.createDefaultBurneThemeConfig;exports.createDefaultThemeState=e.createDefaultThemeState;exports.ensureModePalettes=e.ensureModePalettes;exports.ensureRippleEase=e.ensureRippleEase;exports.exportBurneThemeConfigSource=e.exportBurneThemeConfigSource;exports.exportBurneThemeCss=e.exportBurneThemeCss;exports.exportDefaultBurneThemeConfigSource=e.exportDefaultBurneThemeConfigSource;exports.exportThemeCss=e.exportThemeCss;exports.fieldShellHoverClass=e.fieldShellHoverClass;exports.firstLevelHoverShadow=e.firstLevelHoverShadow;exports.fluidScaleRem=e.fluidScaleRem;exports.gsap=e.gsapWithCSS;exports.initElementShadow=e.initElementShadow;exports.killMotion=e.killMotion;exports.mergeThemeTokenOverrides=e.mergeThemeTokenOverrides;exports.patchThemeColor=e.patchThemeColor;exports.prefersReducedInteractiveHoverLift=e.prefersReducedInteractiveHoverLift;exports.readControlHeightPx=e.readControlHeightPx;exports.readShadowSize=e.readShadowSize;exports.resolveCustomThemeTokens=e.resolveCustomThemeTokens;exports.resolveTheme=e.resolveTheme;exports.resolveThemeTokenState=e.resolveThemeTokenState;exports.secondLevelShadow=e.secondLevelShadow;exports.shadowBase=e.shadowBase;exports.shadowLarge=e.shadowLarge;exports.shadowMid=e.shadowMid;exports.shadowNone=e.shadowNone;exports.shouldSkipInteractiveHoverLift=e.shouldSkipInteractiveHoverLift;exports.themeTokenStateToConfig=e.themeTokenStateToConfig;exports.useBurneThemeRuntime=e.useBurneThemeRuntime;exports.useBurneThemeRuntimeOptional=e.useBurneThemeRuntimeOptional;exports.useConvergeRipples=e.useConvergeRipples;exports.useFieldShellHoverLift=e.useFieldShellHoverLift;exports.useGSAP=e.useGSAP;exports.useInteractiveHoverLiftContainerHandlers=e.useInteractiveHoverLiftContainerHandlers;exports.usePersistentElShadow=e.usePersistentElShadow;exports.useSecondLevelShadow=e.useSecondLevelShadow;exports.useSecondLevelShadowContainer=e.useSecondLevelShadowContainer;
|
package/dist/internal.d.ts
CHANGED
|
@@ -14,4 +14,6 @@ export { animateInteractiveHoverLift, animateInteractivePressSqueeze, initElemen
|
|
|
14
14
|
export { FIELD_SHELL_FOCUS_CLASS, FIELD_SHELL_TRANSITION_CLASS, fieldShellHoverClass, useFieldShellHoverLift, type FieldShellStatus, } from './components/core/utils/useFieldShellHoverLift';
|
|
15
15
|
export { SHADOW_LIFT_MOTION_CLASS, firstLevelHoverShadow, secondLevelShadow, usePersistentElShadow, useSecondLevelShadow, useSecondLevelShadowContainer, } from './components/core/utils/useShadowMotion';
|
|
16
16
|
export { gsap, useGSAP, killMotion, ensureRippleEase } from './components/core/utils/gsapMotion';
|
|
17
|
-
export {
|
|
17
|
+
export { MOTION_CONFIG_DEFAULTS, MOTION_CSS_VAR, applyMotionCssTokens, } from './components/core/utils/motionConfig';
|
|
18
|
+
export { SHADOW_LAYER_GEOM, SHADOW_OPACITY_BASE, SHADOW_SIZE_CSS_DEFAULT, } from './tokens/shadows';
|
|
19
|
+
export { applyThemeTokens, clearThemeInlineTokens, createDefaultThemeState, ensureModePalettes, activateThemeModePalette, patchThemeColor, exportThemeCss, fluidScaleRem, 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, DARK_COLORS, LIGHT_COLORS, applyBurneThemeConfig, applyCustomThemeTokens, applyTokens, clearCustomThemeTokens, exportBurneThemeConfigSource, exportBurneThemeCss, mergeThemeTokenOverrides, resolveTheme, resolveCustomThemeTokens, resolveThemeTokenState, createDefaultBurneThemeConfig, exportDefaultBurneThemeConfigSource, themeTokenStateToConfig, applyThemeMode, useBurneThemeRuntime, useBurneThemeRuntimeOptional, type BurneThemeRuntimeContextValue, type ThemeModeColorOverrides, type ThemeTokenOverrides, type CustomThemeTokenControl, type CustomThemeTokenDefinition, type CustomThemeTokens, type CustomThemeTokenValue, type BurneThemeConfig, type BurneThemeMode, } from './theme';
|
package/dist/internal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as s, a as o, b as t, D as r, c as n, d as l, F as
|
|
1
|
+
import { C as s, a as o, b as t, D as r, c as n, d as l, F as S, e as T, f as i, g as u, L as C, M as p, h, i as _, S as L, j as m, k as O, l as d, m as A, T as v, n as f, o as E, p as c, q as I, r as R, s as F, t as g, u as H, v as D, w as N, x as k, y as M, z as w, A as B, B as G, E as x, G as b, H as P, I as U, J as y, K as W, N as V, O as Y, P as q, Q as z, R as Z, U as j, V as K, W as X, X as J, Y as Q, Z as $, _ as ee, $ as ae, a0 as se, a1 as oe, a2 as te, a3 as re, a4 as ne, a5 as le, a6 as Se, a7 as Te, a8 as ie, a9 as ue, aa as Ce, ab as pe, ac as he, ad as _e, ae as Le, af as me, ag as Oe, ah as de, ai as Ae, aj as ve, ak as fe, al as Ee, am as ce, an as Ie, ao as Re, ap as Fe, aq as ge, ar as He } from "./themeRuntimeContext-cixzM5Ix.js";
|
|
2
2
|
export {
|
|
3
3
|
s as COLOR_CSS_VAR,
|
|
4
4
|
o as CONTROL_SIZE_LAYOUT,
|
|
@@ -6,73 +6,80 @@ export {
|
|
|
6
6
|
r as DARK_COLORS,
|
|
7
7
|
n as DEFAULT_FONT,
|
|
8
8
|
l as DEFAULT_FONT_MONO,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
S as FIELD_SHELL_FOCUS_CLASS,
|
|
10
|
+
T as FIELD_SHELL_TRANSITION_CLASS,
|
|
11
|
+
i as FONT_WEIGHT_CSS_VAR,
|
|
12
12
|
u as FONT_WEIGHT_DEFAULTS,
|
|
13
13
|
C as LIGHT_COLORS,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
L as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
H as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
B as
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
P as
|
|
41
|
-
U as
|
|
42
|
-
y as
|
|
43
|
-
W as
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
J as
|
|
53
|
-
Q as
|
|
54
|
-
$ as
|
|
55
|
-
ee as
|
|
56
|
-
ae as
|
|
57
|
-
se as
|
|
58
|
-
oe as
|
|
59
|
-
te as
|
|
60
|
-
re as
|
|
61
|
-
ne as
|
|
62
|
-
le as
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
ue as
|
|
67
|
-
Ce as
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Le as
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
14
|
+
p as MOTION_CONFIG_DEFAULTS,
|
|
15
|
+
h as MOTION_CSS_VAR,
|
|
16
|
+
_ as MOTION_DEFAULTS,
|
|
17
|
+
L as SCALE_DEFAULTS,
|
|
18
|
+
m as SHADOW_LAYER_GEOM,
|
|
19
|
+
O as SHADOW_LIFT_MOTION_CLASS,
|
|
20
|
+
d as SHADOW_OPACITY_BASE,
|
|
21
|
+
A as SHADOW_SIZE_CSS_DEFAULT,
|
|
22
|
+
v as TEXT_SCALE_BASES,
|
|
23
|
+
f as activateThemeModePalette,
|
|
24
|
+
E as affixSlotClass,
|
|
25
|
+
c as affixToggleMinWClass,
|
|
26
|
+
I as animateInteractiveHoverLift,
|
|
27
|
+
R as animateInteractivePressSqueeze,
|
|
28
|
+
F as applyBurneThemeConfig,
|
|
29
|
+
g as applyCustomThemeTokens,
|
|
30
|
+
H as applyMotionCssTokens,
|
|
31
|
+
D as applyThemeMode,
|
|
32
|
+
N as applyThemeTokens,
|
|
33
|
+
k as applyTokens,
|
|
34
|
+
M as buttonGroupOverlapBorderClasses,
|
|
35
|
+
w as buttonGroupRoundingClasses,
|
|
36
|
+
B as buttonGroupSegmentSurfaceClasses,
|
|
37
|
+
G as buttonGroupTextFrameClass,
|
|
38
|
+
x as buttonGroupTextSurfaceClasses,
|
|
39
|
+
b as buttonRippleTone,
|
|
40
|
+
P as buttonRootClass,
|
|
41
|
+
U as buttonSpinnerClass,
|
|
42
|
+
y as clearCustomThemeTokens,
|
|
43
|
+
W as clearThemeInlineTokens,
|
|
44
|
+
V as controlShellClass,
|
|
45
|
+
Y as createConvergeRippleAtPointer,
|
|
46
|
+
q as createConvergeRippleFromPointer,
|
|
47
|
+
z as createDefaultBurneThemeConfig,
|
|
48
|
+
Z as createDefaultThemeState,
|
|
49
|
+
j as ensureModePalettes,
|
|
50
|
+
K as ensureRippleEase,
|
|
51
|
+
X as exportBurneThemeConfigSource,
|
|
52
|
+
J as exportBurneThemeCss,
|
|
53
|
+
Q as exportDefaultBurneThemeConfigSource,
|
|
54
|
+
$ as exportThemeCss,
|
|
55
|
+
ee as fieldShellHoverClass,
|
|
56
|
+
ae as firstLevelHoverShadow,
|
|
57
|
+
se as fluidScaleRem,
|
|
58
|
+
oe as gsap,
|
|
59
|
+
te as initElementShadow,
|
|
60
|
+
re as killMotion,
|
|
61
|
+
ne as mergeThemeTokenOverrides,
|
|
62
|
+
le as patchThemeColor,
|
|
63
|
+
Se as prefersReducedInteractiveHoverLift,
|
|
64
|
+
Te as readControlHeightPx,
|
|
65
|
+
ie as readShadowSize,
|
|
66
|
+
ue as resolveCustomThemeTokens,
|
|
67
|
+
Ce as resolveTheme,
|
|
68
|
+
pe as resolveThemeTokenState,
|
|
69
|
+
he as secondLevelShadow,
|
|
70
|
+
_e as shadowBase,
|
|
71
|
+
Le as shadowLarge,
|
|
72
|
+
me as shadowMid,
|
|
73
|
+
Oe as shadowNone,
|
|
74
|
+
de as shouldSkipInteractiveHoverLift,
|
|
75
|
+
Ae as themeTokenStateToConfig,
|
|
76
|
+
ve as useBurneThemeRuntime,
|
|
77
|
+
fe as useBurneThemeRuntimeOptional,
|
|
78
|
+
Ee as useConvergeRipples,
|
|
79
|
+
ce as useFieldShellHoverLift,
|
|
80
|
+
Ie as useGSAP,
|
|
81
|
+
Re as useInteractiveHoverLiftContainerHandlers,
|
|
82
|
+
Fe as usePersistentElShadow,
|
|
83
|
+
ge as useSecondLevelShadow,
|
|
84
|
+
He as useSecondLevelShadowContainer
|
|
78
85
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BurneLabels, BurneLabelsKey } from './burneLabels';
|
|
3
|
+
export type BurneLabelsProviderProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** Partial override of default accessible / UI strings. */
|
|
6
|
+
labels?: Partial<BurneLabels>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Provides localized default aria / UI strings for burne-ui components.
|
|
10
|
+
* Usually used via `BurneUIProvider` (`labels` prop); stand-alone when you
|
|
11
|
+
* only need strings without theme/toast.
|
|
12
|
+
*/
|
|
13
|
+
export declare function BurneLabelsProvider({ children, labels }: BurneLabelsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
/** Full merged label dictionary (defaults + overrides). Safe outside provider. */
|
|
15
|
+
export declare function useBurneLabels(): BurneLabels;
|
|
16
|
+
/** Single label by key. Safe outside provider (falls back to English defaults). */
|
|
17
|
+
export declare function useBurneLabel<K extends BurneLabelsKey>(key: K): BurneLabels[K];
|
|
@@ -1,6 +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 { BurneLabels } from './burneLabels';
|
|
4
5
|
import { BurneThemeConfig, BurneThemeMode, CustomThemeTokens, ThemeTokenOverrides } from './themeConfig';
|
|
5
6
|
import { ThemeProviderProps } from './ThemeProvider';
|
|
6
7
|
export type BurneUIProviderProps = {
|
|
@@ -16,6 +17,11 @@ export type BurneUIProviderProps = {
|
|
|
16
17
|
tokens?: ThemeTokenOverrides;
|
|
17
18
|
customTokens?: CustomThemeTokens;
|
|
18
19
|
motion?: Partial<MotionConfig>;
|
|
20
|
+
/**
|
|
21
|
+
* Override default accessible / UI strings (Close, Search, Pagination, …).
|
|
22
|
+
* Merged over English defaults. Prop wins over `config.labels`.
|
|
23
|
+
*/
|
|
24
|
+
labels?: Partial<BurneLabels>;
|
|
19
25
|
/**
|
|
20
26
|
* Wrap with `Toast.Provider`.
|
|
21
27
|
* Pass `false` to skip, or an options object for Toast defaults.
|
|
@@ -26,14 +32,16 @@ export type BurneUIProviderProps = {
|
|
|
26
32
|
onThemeChange?: ThemeProviderProps["onThemeChange"];
|
|
27
33
|
};
|
|
28
34
|
/**
|
|
29
|
-
* App-level provider: theme (`data-theme`), design tokens, motion, and Toast.
|
|
35
|
+
* App-level provider: theme (`data-theme`), design tokens, motion, labels, and Toast.
|
|
30
36
|
*
|
|
31
37
|
* @example
|
|
32
38
|
* ```tsx
|
|
33
|
-
* import { BurneUIProvider } from "burne-ui";
|
|
39
|
+
* import { BurneUIProvider, BURNE_LABELS_RU } from "burne-ui";
|
|
34
40
|
* import burneTheme from "./burne-theme";
|
|
35
41
|
*
|
|
36
|
-
* <BurneUIProvider config={burneTheme}
|
|
42
|
+
* <BurneUIProvider config={burneTheme} labels={BURNE_LABELS_RU}>
|
|
43
|
+
* {children}
|
|
44
|
+
* </BurneUIProvider>
|
|
37
45
|
* ```
|
|
38
46
|
*/
|
|
39
47
|
export declare function BurneUIProvider(props: BurneUIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default accessible / UI strings used when a component does not receive an
|
|
3
|
+
* explicit `aria-label` (or visible label override).
|
|
4
|
+
*
|
|
5
|
+
* Pass a partial override via `BurneUIProvider` `labels` / `config.labels`,
|
|
6
|
+
* or wrap with `BurneLabelsProvider`. Templates use `{name}` placeholders.
|
|
7
|
+
*/
|
|
8
|
+
export type BurneLabels = {
|
|
9
|
+
close: string;
|
|
10
|
+
openSearch: string;
|
|
11
|
+
search: string;
|
|
12
|
+
clearField: string;
|
|
13
|
+
time: string;
|
|
14
|
+
timeHours: string;
|
|
15
|
+
timeMinutes: string;
|
|
16
|
+
timeSeconds: string;
|
|
17
|
+
openList: string;
|
|
18
|
+
closeList: string;
|
|
19
|
+
showPassword: string;
|
|
20
|
+
hidePassword: string;
|
|
21
|
+
removeFile: string;
|
|
22
|
+
resizeHeight: string;
|
|
23
|
+
breadcrumbs: string;
|
|
24
|
+
/** Template: `{count}` */
|
|
25
|
+
breadcrumbsShowHidden: string;
|
|
26
|
+
breadcrumbsHiddenSections: string;
|
|
27
|
+
pagination: string;
|
|
28
|
+
paginationPrevious: string;
|
|
29
|
+
paginationNext: string;
|
|
30
|
+
/** Template: `{n}` */
|
|
31
|
+
paginationPage: string;
|
|
32
|
+
drawerDragDownToClose: string;
|
|
33
|
+
drawerDragUpToClose: string;
|
|
34
|
+
drawerDragLeftToClose: string;
|
|
35
|
+
drawerDragRightToClose: string;
|
|
36
|
+
/** Template: `{placement}` */
|
|
37
|
+
toastNotifications: string;
|
|
38
|
+
colorPickerArea: string;
|
|
39
|
+
/** Template: `{saturation}`, `{brightness}` */
|
|
40
|
+
colorPickerAreaValue: string;
|
|
41
|
+
colorPickerContent: string;
|
|
42
|
+
colorPickerHex: string;
|
|
43
|
+
colorPickerAlpha: string;
|
|
44
|
+
/** Template: `{hex}` */
|
|
45
|
+
colorPickerSelected: string;
|
|
46
|
+
};
|
|
47
|
+
export type BurneLabelsKey = keyof BurneLabels;
|
|
48
|
+
/** English defaults shipped with the library. */
|
|
49
|
+
export declare const DEFAULT_BURNE_LABELS: BurneLabels;
|
|
50
|
+
/** Russian preset — pass to `BurneUIProvider` `labels={BURNE_LABELS_RU}`. */
|
|
51
|
+
export declare const BURNE_LABELS_RU: BurneLabels;
|
|
52
|
+
export declare function mergeBurneLabels(partial?: Partial<BurneLabels> | null): BurneLabels;
|
|
53
|
+
/** Replace `{name}` placeholders in a label template. */
|
|
54
|
+
export declare function formatBurneLabel(template: string, vars: Record<string, string | number>): string;
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
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';
|
|
1
|
+
export { applyThemeTokens, clearThemeInlineTokens, createDefaultThemeState, ensureModePalettes, activateThemeModePalette, patchThemeColor, exportThemeCss, fluidScaleRem, 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
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';
|
|
3
|
+
export { applyBurneThemeConfig, applyCustomThemeTokens, applyTokens, clearCustomThemeTokens, exportBurneThemeConfigSource, exportBurneThemeCss, mergeThemeTokenOverrides, resolveTheme, resolveCustomThemeTokens, resolveThemeTokenState, createDefaultBurneThemeConfig, exportDefaultBurneThemeConfigSource, themeTokenStateToConfig, DEFAULT_THEME_STORAGE_KEY, type BurneThemeConfig, type BurneThemeMode, type CustomThemeTokenControl, type CustomThemeTokenDefinition, type CustomThemeTokens, type CustomThemeTokenValue, type ThemeModeColorOverrides, type ThemeTokenOverrides, } from './themeConfig';
|
|
4
4
|
export { ThemeProvider, applyThemeMode, useBurneTheme, useBurneThemeOptional, type BurneThemeContextValue, type ThemeProviderProps, } from './ThemeProvider';
|
|
5
|
+
export { ThemeScript, getThemeScript, type ThemeScriptOptions, type ThemeScriptProps, } from './themeScript';
|
|
5
6
|
export { BurneUIProvider, type BurneUIProviderProps } from './BurneUIProvider';
|
|
7
|
+
export { BurneLabelsProvider, useBurneLabel, useBurneLabels, type BurneLabelsProviderProps, } from './BurneLabelsProvider';
|
|
8
|
+
export { BURNE_LABELS_RU, DEFAULT_BURNE_LABELS, formatBurneLabel, mergeBurneLabels, type BurneLabels, type BurneLabelsKey, } from './burneLabels';
|
|
6
9
|
export { useBurneThemeRuntime, useBurneThemeRuntimeOptional, type BurneThemeRuntimeContextValue, } from './themeRuntimeContext';
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { MotionConfig } from '../components/core/utils/motionConfig';
|
|
2
2
|
import { ToastProviderProps } from '../components/core/Toast/toastTypes';
|
|
3
|
+
import { BurneLabels } from './burneLabels';
|
|
3
4
|
import { ThemeColors, ThemeFontWeights, ThemeMode, ThemeTokenState } from './themeDefaults';
|
|
4
5
|
/** Color mode for ThemeProvider / BurneUIProvider (`system` follows OS). */
|
|
5
6
|
export type BurneThemeMode = ThemeMode | "system";
|
|
7
|
+
/** Default `localStorage` key for theme persistence. */
|
|
8
|
+
export declare const DEFAULT_THEME_STORAGE_KEY = "burne-ui-theme";
|
|
6
9
|
/**
|
|
7
10
|
* Shared (mode-independent) token overrides.
|
|
8
11
|
* Colors live only under `BurneThemeConfig.colors`.
|
|
@@ -12,6 +15,8 @@ export type ThemeTokenOverrides = {
|
|
|
12
15
|
size?: number;
|
|
13
16
|
radius?: number;
|
|
14
17
|
borderWidth?: number;
|
|
18
|
+
focusRingWidth?: number;
|
|
19
|
+
focusRingOffset?: number;
|
|
15
20
|
textScale?: number;
|
|
16
21
|
fontFamily?: string;
|
|
17
22
|
fontFamilyMono?: string;
|
|
@@ -65,6 +70,11 @@ export type BurneThemeConfig = {
|
|
|
65
70
|
motion?: Partial<MotionConfig>;
|
|
66
71
|
/** Wrap children with `Toast.Provider`. @default true */
|
|
67
72
|
toast?: boolean | Omit<ToastProviderProps, "children">;
|
|
73
|
+
/**
|
|
74
|
+
* Override default accessible / UI strings (Close, Search, Pagination, …).
|
|
75
|
+
* Merged over English defaults. See `DEFAULT_BURNE_LABELS` / `BURNE_LABELS_RU`.
|
|
76
|
+
*/
|
|
77
|
+
labels?: Partial<BurneLabels>;
|
|
68
78
|
};
|
|
69
79
|
/** Merge shared `tokens` with `colors[mode]` into a full `ThemeTokenState`. */
|
|
70
80
|
export declare function resolveThemeTokenState(config: Pick<BurneThemeConfig, "tokens" | "colors">, mode: ThemeMode): ThemeTokenState;
|
|
@@ -109,4 +119,4 @@ export declare function exportBurneThemeConfigSource(config: BurneThemeConfig, o
|
|
|
109
119
|
exportName?: string;
|
|
110
120
|
}): string;
|
|
111
121
|
/** @internal used by docs — list of motion keys mirrored from ThemeTokenState */
|
|
112
|
-
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"];
|
|
122
|
+
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", "surfaceTransitionDuration", "toastDismissDuration", "toastDismissEase", "progressFillDuration", "progressFillEase", "loadingDotsDuration", "loadingDotsEaseUp", "loadingDotsEaseDown", "enableHoverLift", "enablePressSqueeze", "enableToggleButtonFill", "enableRipple", "enableExpandable", "enableToastStack", "enableAsyncButtonCrossfade", "enableContentFade", "enableFeedbackExpand", "enableProgressFill", "enableLoadingDots"];
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { FONT_WEIGHT_CSS_VAR, FONT_WEIGHT_DEFAULTS, FontWeightStep } from '../tokens/fontWeights';
|
|
2
|
+
import { TEXT_SCALE_BASES } from '../tokens/textScale';
|
|
2
3
|
import { DARK_COLORS, LIGHT_COLORS } from './themePalettes';
|
|
3
4
|
export type ThemeMode = "dark" | "light";
|
|
4
5
|
export { FONT_WEIGHT_DEFAULTS, FONT_WEIGHT_CSS_VAR };
|
|
5
6
|
export { DARK_COLORS, LIGHT_COLORS };
|
|
7
|
+
export { TEXT_SCALE_BASES };
|
|
6
8
|
export type ThemeStatusForegroundKey = "dangerForeground" | "successForeground" | "infoForeground" | "warningForeground";
|
|
7
9
|
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
10
|
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;
|
|
@@ -16,6 +18,10 @@ export type ThemeTokenState = {
|
|
|
16
18
|
size: number;
|
|
17
19
|
radius: number;
|
|
18
20
|
borderWidth: number;
|
|
21
|
+
/** Keyboard focus ring outline width (`--focus-ring-width`), px. */
|
|
22
|
+
focusRingWidth: number;
|
|
23
|
+
/** Keyboard focus ring outline offset (`--focus-ring-offset`), px. */
|
|
24
|
+
focusRingOffset: number;
|
|
19
25
|
textScale: number;
|
|
20
26
|
fontFamily: string;
|
|
21
27
|
fontFamilyMono: string;
|
|
@@ -52,6 +58,11 @@ export type ThemeTokenState = {
|
|
|
52
58
|
loadingDotsDuration: number;
|
|
53
59
|
loadingDotsEaseUp: string;
|
|
54
60
|
loadingDotsEaseDown: string;
|
|
61
|
+
/** CSS `--motion-surface-duration` (surface / text / shadow transitions), ms. */
|
|
62
|
+
surfaceTransitionDuration: number;
|
|
63
|
+
/** Toast dismiss + last-scrim out, ms. */
|
|
64
|
+
toastDismissDuration: number;
|
|
65
|
+
toastDismissEase: string;
|
|
55
66
|
enableHoverLift: boolean;
|
|
56
67
|
enablePressSqueeze: boolean;
|
|
57
68
|
enableToggleButtonFill: boolean;
|
|
@@ -73,6 +84,8 @@ export declare const SCALE_DEFAULTS: {
|
|
|
73
84
|
readonly size: 1;
|
|
74
85
|
readonly radius: 0.5;
|
|
75
86
|
readonly borderWidth: 1;
|
|
87
|
+
readonly focusRingWidth: 2;
|
|
88
|
+
readonly focusRingOffset: 0;
|
|
76
89
|
readonly textScale: 1;
|
|
77
90
|
readonly shadowStrength: 1;
|
|
78
91
|
readonly shadowSize: 1;
|
|
@@ -80,83 +93,49 @@ export declare const SCALE_DEFAULTS: {
|
|
|
80
93
|
readonly toastScrimDensity: 1;
|
|
81
94
|
};
|
|
82
95
|
export declare const MOTION_DEFAULTS: {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/** Basic typography sizes from `src/tokens/styles.css` (rem). */
|
|
122
|
-
export declare const TEXT_SCALE_BASES: {
|
|
123
|
-
readonly tools: {
|
|
124
|
-
readonly size: 0.6875;
|
|
125
|
-
readonly line: 0.875;
|
|
126
|
-
};
|
|
127
|
-
readonly xsmall: {
|
|
128
|
-
readonly size: 0.75;
|
|
129
|
-
readonly line: 1;
|
|
130
|
-
};
|
|
131
|
-
readonly small: {
|
|
132
|
-
readonly size: 0.875;
|
|
133
|
-
readonly line: 1.25;
|
|
134
|
-
};
|
|
135
|
-
readonly base: {
|
|
136
|
-
readonly size: 1;
|
|
137
|
-
readonly line: 1.5;
|
|
138
|
-
};
|
|
139
|
-
readonly mid: {
|
|
140
|
-
readonly size: 1.125;
|
|
141
|
-
readonly line: 1.75;
|
|
142
|
-
};
|
|
143
|
-
readonly large: {
|
|
144
|
-
readonly size: 1.25;
|
|
145
|
-
readonly line: 1.75;
|
|
146
|
-
};
|
|
147
|
-
readonly xlarge: {
|
|
148
|
-
readonly size: 1.5;
|
|
149
|
-
readonly line: 2;
|
|
150
|
-
};
|
|
151
|
-
readonly "2xlarge": {
|
|
152
|
-
readonly size: 1.875;
|
|
153
|
-
readonly line: 2.25;
|
|
154
|
-
};
|
|
155
|
-
readonly "3xlarge": {
|
|
156
|
-
readonly size: 2.25;
|
|
157
|
-
readonly line: 2.5;
|
|
158
|
-
};
|
|
96
|
+
pressSqueezeMid: number;
|
|
97
|
+
interactiveDuration: number;
|
|
98
|
+
interactiveEase: string;
|
|
99
|
+
hoverLiftEase: string;
|
|
100
|
+
tooltipDuration: number;
|
|
101
|
+
switchThumbDuration: number;
|
|
102
|
+
switchThumbEase: string;
|
|
103
|
+
selectionFillEase: string;
|
|
104
|
+
selectionFillDuration: number;
|
|
105
|
+
hoverLiftScale: number;
|
|
106
|
+
badgeAnchorHoverLiftScale: number;
|
|
107
|
+
rippleDefaultDuration: number;
|
|
108
|
+
rippleDefaultOpacityFrom: number;
|
|
109
|
+
rippleExpandableDuration: number;
|
|
110
|
+
rippleExpandableOpacityFrom: number;
|
|
111
|
+
rippleEaseCss: string;
|
|
112
|
+
feedbackExpandDuration: number;
|
|
113
|
+
expandDuration: number;
|
|
114
|
+
expandOpenEase: string;
|
|
115
|
+
surfaceTransitionDuration: number;
|
|
116
|
+
toastDismissDuration: number;
|
|
117
|
+
toastDismissEase: string;
|
|
118
|
+
enableHoverLift: boolean;
|
|
119
|
+
enablePressSqueeze: boolean;
|
|
120
|
+
enableToggleButtonFill: boolean;
|
|
121
|
+
enableRipple: boolean;
|
|
122
|
+
enableExpandable: boolean;
|
|
123
|
+
enableToastStack: boolean;
|
|
124
|
+
enableAsyncButtonCrossfade: boolean;
|
|
125
|
+
enableContentFade: boolean;
|
|
126
|
+
enableFeedbackExpand: boolean;
|
|
127
|
+
progressFillDuration: number;
|
|
128
|
+
progressFillEase: string;
|
|
129
|
+
enableProgressFill: boolean;
|
|
130
|
+
loadingDotsDuration: number;
|
|
131
|
+
loadingDotsEaseUp: string;
|
|
132
|
+
loadingDotsEaseDown: string;
|
|
133
|
+
enableLoadingDots: boolean;
|
|
159
134
|
};
|
|
135
|
+
export declare const DEFAULT_FONT: string;
|
|
136
|
+
export declare const DEFAULT_FONT_MONO: string;
|
|
137
|
+
/** CSS value for a fluid scale knob — matches default tokens when `maxRem` is the CSS max. */
|
|
138
|
+
export declare function fluidScaleRem(maxRem: number): string;
|
|
160
139
|
/** Ensure `modePalettes` exists (migration for older playground state snapshots). */
|
|
161
140
|
export declare function ensureModePalettes(state: ThemeTokenState): ThemeTokenState;
|
|
162
141
|
/** Copy the active mode palette onto top-level `colors`. */
|
|
@@ -165,5 +144,12 @@ export declare function activateThemeModePalette(state: ThemeTokenState, theme:
|
|
|
165
144
|
export declare function patchThemeColor(state: ThemeTokenState, key: ThemeColorKey, value: string): ThemeTokenState;
|
|
166
145
|
export declare function createDefaultThemeState(theme?: ThemeMode): ThemeTokenState;
|
|
167
146
|
export declare function clearThemeInlineTokens(root?: HTMLElement): void;
|
|
147
|
+
/**
|
|
148
|
+
* Apply theme tokens as inline CSS variables.
|
|
149
|
+
* Only values that differ from kit defaults are written — matching values are
|
|
150
|
+
* cleared so `burne-ui/styles.css` and user override sheets can still win
|
|
151
|
+
* (inline styles otherwise block all stylesheet redefinitions).
|
|
152
|
+
*/
|
|
168
153
|
export declare function applyThemeTokens(state: ThemeTokenState, root?: HTMLElement): void;
|
|
154
|
+
/** CSS snapshot of tokens that differ from kit defaults (for override stylesheets). */
|
|
169
155
|
export declare function exportThemeCss(state: ThemeTokenState): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { DEFAULT_THEME_STORAGE_KEY, BurneThemeMode } from './themeConfig';
|
|
3
|
+
export type ThemeScriptOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Same key as `ThemeProvider` / `BurneUIProvider` `storageKey`.
|
|
6
|
+
* @default "burne-ui-theme"
|
|
7
|
+
*/
|
|
8
|
+
storageKey?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Same as provider `defaultTheme` when storage is empty / invalid.
|
|
11
|
+
* @default "dark"
|
|
12
|
+
*/
|
|
13
|
+
defaultTheme?: BurneThemeMode;
|
|
14
|
+
};
|
|
15
|
+
export type ThemeScriptProps = ThemeScriptOptions & {
|
|
16
|
+
/** CSP nonce for the inline `<script>`. */
|
|
17
|
+
nonce?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Blocking inline script that applies `data-theme` before first paint.
|
|
21
|
+
* Place in root layout `<head>` (or as first child of `<html>`) with
|
|
22
|
+
* `suppressHydrationWarning` on `<html>` to avoid SSR theme flash.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getThemeScript(options?: ThemeScriptOptions): string;
|
|
25
|
+
/**
|
|
26
|
+
* Renders the no-flash theme bootstrap `<script>`.
|
|
27
|
+
* Safe in Server Components (no hooks) — e.g. Next.js App Router `layout.tsx`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function ThemeScript({ storageKey, defaultTheme, nonce, }?: ThemeScriptProps): ReactElement;
|
|
30
|
+
export { DEFAULT_THEME_STORAGE_KEY };
|