burne-ui 1.8.1 → 1.8.3

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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/dist/components/core/Alert/Alert.d.ts +1 -0
  3. package/dist/components/core/Alert/alertAnimations.d.ts +3 -1
  4. package/dist/components/core/Alert/alertTypes.d.ts +8 -1
  5. package/dist/components/core/Alert/index.d.ts +1 -0
  6. package/dist/components/core/Badge/badgeAnimations.d.ts +1 -1
  7. package/dist/components/core/Badge/badgeTypes.d.ts +1 -1
  8. package/dist/components/core/Card/Card.d.ts +1 -0
  9. package/dist/components/core/Card/cardAnimations.d.ts +1 -1
  10. package/dist/components/core/Card/cardStyles.d.ts +4 -3
  11. package/dist/components/core/Card/cardTypes.d.ts +7 -0
  12. package/dist/components/core/Card/index.d.ts +1 -0
  13. package/dist/components/core/Kbd/kbdTypes.d.ts +1 -1
  14. package/dist/components/core/Surface/surfaceStyles.d.ts +1 -0
  15. package/dist/components/core/utils/fieldShellVariant.d.ts +2 -1
  16. package/dist/components/core/utils/glossInteractiveMotion.d.ts +1 -1
  17. package/dist/components/core/utils/hoverInteractiveLift.d.ts +50 -39
  18. package/dist/components/core/utils/useFieldShellHoverLift.d.ts +3 -2
  19. package/dist/components/core/utils/useFirstLevelInteractiveMotion.d.ts +1 -1
  20. package/dist/components/core/utils/useShadowMotion.d.ts +31 -10
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +5111 -5091
  23. package/dist/internal.cjs +1 -1
  24. package/dist/internal.d.ts +4 -4
  25. package/dist/internal.js +83 -74
  26. package/dist/theme/index.d.ts +1 -1
  27. package/dist/theme/themeConfig.d.ts +6 -2
  28. package/dist/theme/themeDefaults.d.ts +35 -7
  29. package/dist/themeRuntimeContext-BHMufYQ1.cjs +14 -0
  30. package/dist/{themeRuntimeContext-Ba-UDP4h.js → themeRuntimeContext-Bw0KCdrV.js} +1566 -1382
  31. package/dist/tokens/config.d.ts +7 -1
  32. package/dist/tokens/index.d.ts +2 -2
  33. package/dist/tokens/shadows.d.ts +91 -12
  34. package/dist/ui.css +591 -32
  35. package/package.json +1 -1
  36. package/dist/themeRuntimeContext-kHgoMsjE.cjs +0 -14
@@ -27,7 +27,10 @@
27
27
  * - `--size` — control sizes (icons, indicators, button min-width, modal max-w); fluid `clamp` by viewport.
28
28
  * - `--radius` — base radius; `rounded-*` steps via multipliers
29
29
  * (`0.618 / 0.875 / 1 / 1.125 / 1.25`); fluid `clamp` by viewport.
30
- * - `--shadow-size` — blur/offset multiplier for `--shadow-base|mid|large` (`calc(… * var(--shadow-size))`; do not bake px).
30
+ * - `--shadow-opacity` / `--shadow-blur` / `--shadow-spread` — multipliers for `--shadow-small|base|mid|large`
31
+ * (opacity × theme base; blur/spread × primitive px). `--shadow-offset-x` / `--shadow-offset-y` — px nudge
32
+ * added to primitive offsets (`calc(Npx + var(--shadow-offset-*))`).
33
+ * - `--color-shadow` / `--color-shadow-secondary` — key + ambient shadow colors (theme palette).
31
34
  * - `--toast-scrim-size` / `--toast-scrim-density` — Toast scrim backdrop size and density.
32
35
  * - `--focus-ring-width` / `--focus-ring-offset` — keyboard focus ring geometry (`focus-ring*` utilities).
33
36
  * - `--motion-surface-duration` — CSS transitions for `surface-color-transition` / `animate-shadow` / field shells (from `surfaceTransitionDuration` in motion config).
@@ -35,6 +38,7 @@
35
38
  * - `--z-dialog` / `--z-dropdown` / `--z-popover` / `--z-toast` / `--z-tooltip` — overlay stacking (`z-*` utilities).
36
39
  * - `--max-component-*` — panel/container widths (`min/max-w-component-*`); Dialog size props map onto base…2xlarge.
37
40
  * - `NARROW_VIEWPORT_MAX_PX` (1024) — shared with CSS `field-control-mobile-no-zoom` media query.
41
+ * - `--letter-spacing` — global tracking (em); apply on `html`/`body` as `letter-spacing: var(--letter-spacing)`.
38
42
  * - `--text-scale-*` — primitive typography; roles `text-base` / `text-mid` / … map 1:1 by name.
39
43
  * - `--font-w-*` — primitive font-weight scale;
40
44
  *
@@ -66,6 +70,8 @@ export declare const tokensConfig: {
66
70
  readonly "color-surface": "color-surface";
67
71
  readonly "color-border": "color-border";
68
72
  readonly "border-token": "color-border";
73
+ readonly "color-shadow": "color-shadow";
74
+ readonly "color-shadow-secondary": "color-shadow-secondary";
69
75
  readonly "color-primary": "color-primary";
70
76
  readonly "color-primary-foreground": "color-primary-foreground";
71
77
  readonly "color-primary-hover": "color-primary-hover";
@@ -1,13 +1,13 @@
1
1
  export { tokensConfig, type TokensConfig } from './config';
2
2
  export { burneFontWeightScale, FONT_WEIGHT_CSS_VAR, FONT_WEIGHT_DEFAULTS, fontWeightToken, type FontWeightStep, } from './fontWeights';
3
- export { burneShadowScale, type ShadowSize, type ShadowLevel, SHADOW_CSS_VAR, SHADOW_LAYER_GEOM, SHADOW_OPACITY_BASE, SHADOW_SIZE_CSS_DEFAULT, shadowToken, } from './shadows';
3
+ export { burneShadowScale, type ShadowSize, type ShadowLevel, type ShadowInteraction, SHADOW_CSS_VAR, SHADOW_LIFT_CSS_VAR, SHADOW_INTERACTION_GEOM, SHADOW_KNOB_CSS_DEFAULTS, SHADOW_LAYER_GEOM, SHADOW_OPACITY_BASE, shadowToken, } from './shadows';
4
4
  export { TEXT_SCALE_BASES, type TextScaleStep, } from './textScale';
5
5
  export { TOAST_SCRIM_CSS_VAR, TOAST_SCRIM_DEFAULTS, toastScrimToken, type ToastScrimCssVar, } from './toastScrim';
6
6
  export { OVERLAY_BACKDROP_CSS_VAR, OVERLAY_BACKDROP_DEFAULTS, overlayBackdropToken, type OverlayBackdropCssVar, } from './overlayBackdrop';
7
7
  export { burneZIndexScale, Z_INDEX_CSS_VAR, Z_INDEX_DEFAULTS, zIndexToken, type ZIndexLayer, } from './zIndex';
8
8
  export { NARROW_VIEWPORT_MAX_PX, TOUCH_OR_NARROW_VIEWPORT_MQL, TOUCH_OR_NARROW_VIEWPORT_MQL_ANY_POINTER, } from './breakpoints';
9
9
  /** CSS variable names for type-safe access and generators */
10
- export declare const designTokenNames: readonly ["--border-width", "--focus-ring-width", "--focus-ring-offset", "--motion-surface-duration", "--motion-surface-ease", "--motion-shadow-ease", "--overlay-backdrop-color", "--overlay-backdrop-blur", "--overlay-backdrop-saturate", "--overlay-backdrop-scrim", "--z-dialog", "--z-dropdown", "--z-dropdown-sub", "--z-popover", "--z-toast", "--z-tooltip", "--color-background", "--color-surface", "--color-border", "--color-foreground", "--color-muted", "--color-muted-foreground", "--color-primary", "--color-primary-foreground", "--color-primary-hover", "--color-default-hover", "--color-transparent-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-focus-ring-danger", "--color-focus-ring-success", "--color-focus-ring-info", "--color-focus-ring-warning", "--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-mid", "--space-large", "--space-xlarge", "--space-2xlarge", "--space-3xlarge", "--size", "--size-scale-xsmall", "--size-scale-small", "--size-scale-base", "--size-scale-mid", "--size-scale-large", "--size-scale-xlarge", "--size-scale-2xlarge", "--size-scale-3xlarge", "--selection-indicator-xsmall", "--selection-indicator-small", "--selection-indicator-base", "--selection-indicator-mid", "--selection-indicator-large", "--selection-indicator-radius-xsmall", "--selection-indicator-radius-small", "--selection-indicator-radius-base", "--selection-indicator-radius-mid", "--selection-indicator-radius-large", "--radius", "--radius-xsmall", "--radius-small", "--radius-base", "--radius-mid", "--radius-large", "--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-xsmall-size", "--text-xsmall-line-height", "--text-xsmall-weight", "--max-component-xsmall", "--max-component-small", "--max-component-base", "--max-component-mid", "--max-component-large", "--max-component-xlarge", "--max-component-2xlarge", "--button-min-width-small", "--button-min-width-base", "--button-min-width-mid", "--button-min-width-large", "--control-height-xsmall", "--control-height-small", "--control-height-base", "--control-height-mid", "--control-height-large", "--control-size-xsmall", "--control-size-small", "--control-size-base", "--control-size-mid", "--control-size-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", "--icon-size-3xlarge", "--shadow-size", "--shadow-none", "--shadow-base", "--shadow-mid", "--shadow-large", "--toast-scrim-size", "--toast-scrim-density"];
10
+ export declare const designTokenNames: readonly ["--border-width", "--border-width-outline", "--border-color", "--focus-ring-width", "--focus-ring-offset", "--motion-surface-duration", "--motion-surface-ease", "--motion-shadow-ease", "--overlay-backdrop-color", "--overlay-backdrop-blur", "--overlay-backdrop-saturate", "--overlay-backdrop-scrim", "--z-dialog", "--z-dropdown", "--z-dropdown-sub", "--z-popover", "--z-toast", "--z-tooltip", "--color-background", "--color-surface", "--color-border", "--color-shadow", "--color-shadow-secondary", "--color-foreground", "--color-muted", "--color-muted-foreground", "--color-primary", "--color-primary-foreground", "--color-primary-hover", "--color-default-hover", "--color-transparent-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-focus-ring-danger", "--color-focus-ring-success", "--color-focus-ring-info", "--color-focus-ring-warning", "--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", "--letter-spacing", "--font-w-small", "--font-w-base", "--font-w-mid", "--font-w-strong", "--font-w-bold", "--space", "--space-xsmall", "--space-small", "--space-base", "--space-mid", "--space-large", "--space-xlarge", "--space-2xlarge", "--space-3xlarge", "--size", "--size-scale-xsmall", "--size-scale-small", "--size-scale-base", "--size-scale-mid", "--size-scale-large", "--size-scale-xlarge", "--size-scale-2xlarge", "--size-scale-3xlarge", "--selection-indicator-xsmall", "--selection-indicator-small", "--selection-indicator-base", "--selection-indicator-mid", "--selection-indicator-large", "--selection-indicator-radius-xsmall", "--selection-indicator-radius-small", "--selection-indicator-radius-base", "--selection-indicator-radius-mid", "--selection-indicator-radius-large", "--radius", "--radius-xsmall", "--radius-small", "--radius-base", "--radius-mid", "--radius-large", "--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-xsmall-size", "--text-xsmall-line-height", "--text-xsmall-weight", "--max-component-xsmall", "--max-component-small", "--max-component-base", "--max-component-mid", "--max-component-large", "--max-component-xlarge", "--max-component-2xlarge", "--button-min-width-small", "--button-min-width-base", "--button-min-width-mid", "--button-min-width-large", "--control-height-xsmall", "--control-height-small", "--control-height-base", "--control-height-mid", "--control-height-large", "--control-size-xsmall", "--control-size-small", "--control-size-base", "--control-size-mid", "--control-size-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", "--icon-size-3xlarge", "--shadow-opacity", "--shadow-blur", "--shadow-spread", "--shadow-offset-x", "--shadow-offset-y", "--shadow-none", "--shadow-small", "--shadow-base", "--shadow-mid", "--shadow-large", "--toast-scrim-size", "--toast-scrim-density"];
11
11
  export type DesignCssVar = (typeof designTokenNames)[number];
12
12
  type ColorCssVarName = Extract<DesignCssVar, `--color-${string}`>;
13
13
  /** Suffix after `--color-` (same as theme key without the `color-` prefix) */
@@ -1,28 +1,107 @@
1
1
  /** Component shadow levels — match `shadow-token-*` and `--shadow-*`. */
2
- export declare const burneShadowScale: readonly ["none", "base", "mid", "large"];
2
+ export declare const burneShadowScale: readonly ["none", "small", "base", "mid", "large"];
3
3
  export type ShadowSize = (typeof burneShadowScale)[number];
4
4
  export type ShadowLevel = Exclude<ShadowSize, "none">;
5
+ /** Rest / hover / press within one size family (not cross-tier). */
6
+ export type ShadowInteraction = "rest" | "hover" | "press";
5
7
  export declare const SHADOW_CSS_VAR: Record<ShadowLevel, `--shadow-${ShadowLevel}`>;
6
- /** Default `--shadow-size` in `tokens/styles.css` (theme knob identity is separate in SCALE_DEFAULTS). */
7
- export declare const SHADOW_SIZE_CSS_DEFAULT: number;
8
- /** Opacity bases per theme × level — single source with `tokens/styles.css` (via sync script). */
8
+ /** First-level appear-from-none (Button) — independent of `--shadow-base`. */
9
+ export declare const SHADOW_LIFT_CSS_VAR: "--shadow-lift";
10
+ /** Theme knobs for `--shadow-opacity|blur|spread|offset-x|offset-y` (CSS defaults). */
11
+ export declare const SHADOW_KNOB_CSS_DEFAULTS: {
12
+ readonly opacity: 1;
13
+ readonly blur: 1;
14
+ readonly spread: 1;
15
+ readonly offsetX: 0;
16
+ readonly offsetY: 0;
17
+ };
18
+ /** Opacity bases per theme × level × interaction — SSOT with `tokens/styles.css`. */
9
19
  export declare const SHADOW_OPACITY_BASE: {
10
20
  dark: {
11
- base: number;
12
- mid: number;
13
- large: number;
21
+ small: {
22
+ rest: number;
23
+ hover: number;
24
+ press: number;
25
+ };
26
+ base: {
27
+ rest: number;
28
+ hover: number;
29
+ press: number;
30
+ };
31
+ mid: {
32
+ rest: number;
33
+ hover: number;
34
+ press: number;
35
+ };
36
+ large: {
37
+ rest: number;
38
+ hover: number;
39
+ press: number;
40
+ };
41
+ lift: {
42
+ hover: number;
43
+ };
14
44
  };
15
45
  light: {
16
- base: number;
17
- mid: number;
18
- large: number;
46
+ small: {
47
+ rest: number;
48
+ hover: number;
49
+ press: number;
50
+ };
51
+ base: {
52
+ rest: number;
53
+ hover: number;
54
+ press: number;
55
+ };
56
+ mid: {
57
+ rest: number;
58
+ hover: number;
59
+ press: number;
60
+ };
61
+ large: {
62
+ rest: number;
63
+ hover: number;
64
+ press: number;
65
+ };
66
+ lift: {
67
+ hover: number;
68
+ };
19
69
  };
20
70
  };
21
- /** One layer: [offsetX, offsetY, blur, spread] — single source with CSS (via sync script). */
71
+ /**
72
+ * Geometry per level × interaction: `[offsetX, offsetY, blur, spread]`.
73
+ * Rest arrays also exposed as single-layer lists for legacy `SHADOW_LAYER_GEOM[level][0]` readers.
74
+ */
22
75
  export declare const SHADOW_LAYER_GEOM: {
76
+ readonly small: readonly [number[]];
23
77
  readonly base: readonly [number[]];
24
78
  readonly mid: readonly [number[]];
25
79
  readonly large: readonly [number[]];
26
80
  };
27
- /** CSS `var(--shadow-base|mid|large)` for inline styles and documentation. */
81
+ export declare const SHADOW_INTERACTION_GEOM: {
82
+ small: {
83
+ rest: number[];
84
+ hover: number[];
85
+ press: number[];
86
+ };
87
+ base: {
88
+ rest: number[];
89
+ hover: number[];
90
+ press: number[];
91
+ };
92
+ mid: {
93
+ rest: number[];
94
+ hover: number[];
95
+ press: number[];
96
+ };
97
+ large: {
98
+ rest: number[];
99
+ hover: number[];
100
+ press: number[];
101
+ };
102
+ lift: {
103
+ hover: number[];
104
+ };
105
+ };
106
+ /** CSS `var(--shadow-small|base|mid|large)` for inline styles and documentation. */
28
107
  export declare function shadowToken<S extends ShadowLevel>(level: S): `var(--shadow-${S})`;