burne-ui 2.0.0 → 2.0.2

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 (48) hide show
  1. package/cli/tailwind.css +2 -2
  2. package/dist/components/composite/ButtonGroup/buttonGroupStyles.d.ts +1 -1
  3. package/dist/components/composite/ButtonGroup/buttonGroupStyles.js +7 -2
  4. package/dist/components/core/Badge/badgeStyles.d.ts +6 -1
  5. package/dist/components/core/Badge/badgeStyles.js +2 -2
  6. package/dist/components/core/Button/useButtonRootState.js +5 -2
  7. package/dist/components/core/ComboBox/comboBoxStyles.d.ts +2 -2
  8. package/dist/components/core/ComboBox/comboBoxStyles.js +2 -2
  9. package/dist/components/core/Disclosure/disclosureAnimations.js +9 -3
  10. package/dist/components/core/Disclosure/disclosureStyles.js +2 -1
  11. package/dist/components/core/Dropdown/dropdownAnimations.js +5 -3
  12. package/dist/components/core/Expandable/Expandable.js +2 -2
  13. package/dist/components/core/Expandable/expandableStyles.d.ts +2 -1
  14. package/dist/components/core/Expandable/expandableStyles.js +3 -1
  15. package/dist/components/core/HoverCard/hoverCardStyles.js +5 -2
  16. package/dist/components/core/Input/inputStyles.d.ts +1 -1
  17. package/dist/components/core/Input/inputStyles.js +1 -1
  18. package/dist/components/core/NumberInput/numberInputStyles.js +1 -1
  19. package/dist/components/core/Popover/popoverStyles.js +3 -3
  20. package/dist/components/core/SearchInput/searchInputStyles.d.ts +1 -1
  21. package/dist/components/core/SearchInput/searchInputStyles.js +1 -1
  22. package/dist/components/core/Select/selectStyles.d.ts +3 -3
  23. package/dist/components/core/Select/selectStyles.js +3 -3
  24. package/dist/components/core/Slider/sliderTypes.d.ts +1 -1
  25. package/dist/components/core/Slider/useSliderTrackState.js +1 -0
  26. package/dist/components/core/Stepper/Stepper.js +1 -1
  27. package/dist/components/core/Stepper/stepperAnimations.d.ts +9 -3
  28. package/dist/components/core/Stepper/stepperAnimations.js +32 -1
  29. package/dist/components/core/Stepper/stepperParts.js +32 -5
  30. package/dist/components/core/Stepper/stepperTypes.d.ts +3 -1
  31. package/dist/components/core/TextArea/textAreaStyles.js +1 -1
  32. package/dist/components/core/TimeField/timeFieldStyles.js +1 -1
  33. package/dist/components/core/ToggleButton/toggleButtonParts.js +3 -3
  34. package/dist/components/core/ToggleButton/toggleButtonStyles.d.ts +6 -1
  35. package/dist/components/core/ToggleButton/toggleButtonStyles.js +16 -3
  36. package/dist/components/core/utils/motionConfig.d.ts +18 -17
  37. package/dist/components/core/utils/motionConfig.js +38 -10
  38. package/dist/components/core/utils/motionConfigValidation.js +0 -1
  39. package/dist/components/core/utils/slotMotion/useMotionPart.js +1 -1
  40. package/dist/studio/themePresets.js +0 -7
  41. package/dist/studio/themeTokenSchema.js +2 -3
  42. package/dist/theme/themeConfig.d.ts +1 -1
  43. package/dist/theme/themeConfig.js +0 -1
  44. package/dist/theme/themeDefaults.d.ts +0 -3
  45. package/dist/theme/themeDefaults.js +15 -9
  46. package/dist/tokens/config.d.ts +1 -1
  47. package/dist/ui.css +62 -8
  48. package/package.json +1 -1
@@ -4,7 +4,7 @@ import { forwardRef } from "react";
4
4
  import { mergeRefs } from "../utils/mergeRefs.js";
5
5
  import { cn } from "../../../utils/cn.js";
6
6
  import { useOptionalToggleButtonContext, useToggleButtonClassNames, useOptionalToggleButtonMotionScope } from "./toggleButtonContext.js";
7
- import { TOGGLE_BUTTON_TEXT_VARIANT, toggleButtonTextClass, toggleButtonIconClass, toggleButtonLabelClass, toggleButtonFillClass, toggleButtonContentClass } from "./toggleButtonStyles.js";
7
+ import { TOGGLE_BUTTON_TEXT_VARIANT, toggleButtonTextClass, toggleButtonIconClass, toggleButtonLabelClass, toggleButtonFillClass, toggleButtonFillClipClass, toggleButtonContentClass } from "./toggleButtonStyles.js";
8
8
  import { SELECTION_FILL_DATA_ATTR } from "./useToggleButtonFillAnimation.js";
9
9
  import { useMotionPart } from "../utils/slotMotion/useMotionPart.js";
10
10
  import { Text } from "../Text/Text.js";
@@ -19,7 +19,7 @@ const ToggleButtonFill = forwardRef(
19
19
  forwardedRef: ref
20
20
  });
21
21
  if (!ctx) return null;
22
- return /* @__PURE__ */ jsx(
22
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: toggleButtonFillClipClass(ctx.groupSegment, ctx.variant), children: /* @__PURE__ */ jsx(
23
23
  "span",
24
24
  {
25
25
  ref: mergeRefs(setRef, ctx.bindFillRef),
@@ -35,7 +35,7 @@ const ToggleButtonFill = forwardRef(
35
35
  ...{ [SELECTION_FILL_DATA_ATTR]: "" },
36
36
  "data-pressed": ctx.pressed ? "true" : "false"
37
37
  }
38
- );
38
+ ) });
39
39
  }
40
40
  );
41
41
  ToggleButtonFill.displayName = "ToggleButtonFill";
@@ -5,7 +5,12 @@ export declare const TOGGLE_BUTTON_ROOT_BASE_CLASS = "group/toggle relative inli
5
5
  export declare const TOGGLE_BUTTON_PRESSED_SURFACE_CLASS = "bg-transparent";
6
6
  export declare const TOGGLE_BUTTON_DISABLED_CLASS = "cursor-not-allowed opacity-50";
7
7
  export declare const TOGGLE_BUTTON_ENABLED_CLASS = "cursor-pointer";
8
- export declare const TOGGLE_BUTTON_FILL_BASE_CLASS = "pointer-events-none absolute -inset-px z-0 origin-center motion-reduce:transition-none";
8
+ export declare const TOGGLE_BUTTON_FILL_BASE_CLASS = "pointer-events-none absolute inset-0 z-0 origin-center motion-reduce:transition-none";
9
+ /**
10
+ * Clip sits on the border box (see `.toggle-fill-clip`), so inherited radius
11
+ * meets the outer corners. A joint side has no border — stay flush there.
12
+ */
13
+ export declare function toggleButtonFillClipClass(groupSegment: ButtonGroupSegment | undefined, variant: ToggleButtonVariant): string;
9
14
  export declare const TOGGLE_BUTTON_CONTENT_BASE_CLASS = "relative z-[1] inline-flex w-full min-w-0 items-center justify-center gap-xsmall";
10
15
  export declare const TOGGLE_BUTTON_CONTENT_GROUP_MOTION_CLASS = "origin-center";
11
16
  export declare const TOGGLE_BUTTON_ICON_SLOT_CLASS = "icon-slot inline-flex shrink-0 items-center justify-center";
@@ -1,4 +1,4 @@
1
- import { buttonGroupRoundingClasses, buttonGroupSegmentSurfaceClasses } from "../../composite/ButtonGroup/buttonGroupStyles.js";
1
+ import { buttonGroupRoundingClasses, buttonGroupOverlapBorderClasses, buttonGroupSegmentSurfaceClasses } from "../../composite/ButtonGroup/buttonGroupStyles.js";
2
2
  import { buttonRootClass } from "../Button/buttonStyles.js";
3
3
  import { SURFACE_COLOR_TRANSITION, hoverVariant } from "../utils/hoverVariant.js";
4
4
  import { SHADOW_LIFT_MOTION_CLASS } from "../utils/useShadowMotion.js";
@@ -23,7 +23,16 @@ const TOGGLE_BUTTON_ROOT_BASE_CLASS = "group/toggle relative inline-flex origin-
23
23
  const TOGGLE_BUTTON_PRESSED_SURFACE_CLASS = "bg-transparent";
24
24
  const TOGGLE_BUTTON_DISABLED_CLASS = "cursor-not-allowed opacity-50";
25
25
  const TOGGLE_BUTTON_ENABLED_CLASS = "cursor-pointer";
26
- const TOGGLE_BUTTON_FILL_BASE_CLASS = "pointer-events-none absolute -inset-px z-0 origin-center motion-reduce:transition-none";
26
+ const TOGGLE_BUTTON_FILL_BASE_CLASS = "pointer-events-none absolute inset-0 z-0 origin-center motion-reduce:transition-none";
27
+ function toggleButtonFillClipClass(groupSegment, variant) {
28
+ const visual = resolveVariantVisual(variant, KIT_TOGGLE_BUTTON_VARIANTS, "toggleButton.root");
29
+ const flush = groupSegment == null || groupSegment.position === "only" ? "" : groupSegment.orientation === "horizontal" ? groupSegment.position === "first" ? "toggle-fill-clip-flush-ie" : groupSegment.position === "last" ? "toggle-fill-clip-flush-is" : "toggle-fill-clip-flush-is toggle-fill-clip-flush-ie" : groupSegment.position === "first" ? "toggle-fill-clip-flush-be" : groupSegment.position === "last" ? "toggle-fill-clip-flush-bs" : "toggle-fill-clip-flush-bs toggle-fill-clip-flush-be";
30
+ return cn(
31
+ "toggle-fill-clip",
32
+ visual.key === "outline" && "toggle-fill-clip-outline",
33
+ flush
34
+ );
35
+ }
27
36
  const TOGGLE_BUTTON_CONTENT_BASE_CLASS = "relative z-[1] inline-flex w-full min-w-0 items-center justify-center gap-xsmall";
28
37
  const TOGGLE_BUTTON_CONTENT_GROUP_MOTION_CLASS = "origin-center";
29
38
  const TOGGLE_BUTTON_ICON_SLOT_CLASS = "icon-slot inline-flex shrink-0 items-center justify-center";
@@ -80,7 +89,10 @@ function toggleButtonRootClass({
80
89
  const visual = resolveVariantVisual(variant, KIT_TOGGLE_BUTTON_VARIANTS, "toggleButton.root");
81
90
  const kitSurface = usesKitElevation(variant, KIT_TOGGLE_BUTTON_VARIANTS);
82
91
  const roundingClass = groupSegment ? buttonGroupRoundingClasses(groupSegment) : CONTROL_SIZE_LAYOUT[size].rounded;
83
- const groupGlue = groupSegment ? buttonGroupSegmentSurfaceClasses(groupSegment) : "";
92
+ const groupGlue = groupSegment ? cn(
93
+ buttonGroupSegmentSurfaceClasses(groupSegment),
94
+ buttonGroupOverlapBorderClasses(groupSegment)
95
+ ) : "";
84
96
  if (visual.className !== void 0) {
85
97
  return cn(
86
98
  TOGGLE_BUTTON_ROOT_BASE_CLASS,
@@ -135,6 +147,7 @@ export {
135
147
  TOGGLE_BUTTON_TEXT_VARIANT,
136
148
  toggleButtonContentClass,
137
149
  toggleButtonFillClass,
150
+ toggleButtonFillClipClass,
138
151
  toggleButtonIconClass,
139
152
  toggleButtonLabelClass,
140
153
  toggleButtonRootClass,
@@ -15,7 +15,6 @@
15
15
  * interactiveDuration: 350,
16
16
  * pressSqueezeDurationFactor: 1.15,
17
17
  * modalDuration: 280,
18
- * surfaceTransitionDuration: 450,
19
18
  * toastDismissDuration: 220,
20
19
  * progressIndeterminateDuration: 1500,
21
20
  * selectionFillDuration: 400,
@@ -28,15 +27,22 @@ export { MOTION_CONFIG_LIMITS } from './motionConfigValidation.js';
28
27
  /** CSS custom properties written by `applyMotionCssTokens` / theme apply. */
29
28
  export declare const MOTION_CSS_VAR: {
30
29
  readonly surfaceDuration: "--motion-surface-duration";
30
+ readonly surfaceEase: "--motion-surface-ease";
31
31
  };
32
+ /**
33
+ * CSS timing for `sine.inOut`. `--motion-surface-ease` in `tokens/styles.css`
34
+ * must stay equal to this string (`check-color-single-owner`).
35
+ */
36
+ export declare const HOVER_LIFT_EASE_CSS = "cubic-bezier(0.37, 0, 0.63, 1)";
37
+ /** CSS timing function for a hover-lift ease. Unknown GSAP names use the sine.inOut bezier. */
38
+ export declare function hoverLiftEaseToCss(ease: string): string;
32
39
  /** Per-feature enable flags (AND with `enableAnimations`). */
33
40
  export type MotionFeatureFlag = "enableHoverLift" | "enablePressSqueeze" | "enableToggleButtonFill" | "enableRipple" | "enableExpandable" | "enableToastStack" | "enableContentFade" | "enableProgressFill" | "enableLoadingDots" | "enableModalMotion" | "enableSwitchThumb" | "enableTabsIndicator" | "enablePaginationFlip" | "enableSelectionFill";
34
41
  export interface MotionConfig {
35
42
  /**
36
- * Duration (ms) for most interactive UI animations:
37
- * hover-lift, press-squeeze, checkbox, radio, accordion, tab indicator, etc.
38
- * Modals use `modalDuration`.
39
- * @default 280
43
+ * Duration (ms) for hover lift, press, and CSS surface color transitions
44
+ * (`--motion-surface-duration`). Modals use `modalDuration`.
45
+ * @default 220
40
46
  */
41
47
  interactiveDuration: number;
42
48
  /**
@@ -45,8 +51,8 @@ export interface MotionConfig {
45
51
  */
46
52
  interactiveEase: string;
47
53
  /**
48
- * GSAP easing for hover lift (scale lift).
49
- * Softer than `interactiveEase`: same duration, smoother acceleration/deceleration.
54
+ * GSAP easing for hover lift (scale and shadow). The same curve is written to
55
+ * `--motion-surface-ease` so the background transition matches.
50
56
  * @default "sine.inOut"
51
57
  */
52
58
  hoverLiftEase: string;
@@ -91,7 +97,7 @@ export interface MotionConfig {
91
97
  * Multiplier on `interactiveDuration` for the full press-squeeze timeline.
92
98
  * Also sets the open delay in `runOpenAfterSqueeze` (Popover / Dropdown / Dialog /
93
99
  * Drawer / Select / ComboBox / AlertDialog) because open waits for squeeze to finish
94
- * (~322 ms at defaults: 280 × 1.15).
100
+ * (~253 ms at defaults: 220 × 1.15).
95
101
  * @default 1.15
96
102
  */
97
103
  pressSqueezeDurationFactor: number;
@@ -119,13 +125,6 @@ export interface MotionConfig {
119
125
  * @default "sine.inOut"
120
126
  */
121
127
  expandOpenEase: string;
122
- /**
123
- * Duration (ms) for CSS surface / text / shadow / focus-ring transitions
124
- * (`--motion-surface-duration` → `surface-color-transition`, `animate-shadow`, …).
125
- * Independent from GSAP `interactiveDuration`.
126
- * @default 180
127
- */
128
- surfaceTransitionDuration: number;
129
128
  /**
130
129
  * Duration (ms) for Toast dismiss slide + last-scrim fade-out.
131
130
  * @default 220
@@ -210,11 +209,13 @@ export declare function subscribeMotionConfig(onStoreChange: () => void): () =>
210
209
  /** Motion config revision counter — for `useSyncExternalStore`. */
211
210
  export declare function getMotionConfigRevision(): number;
212
211
  /**
213
- * Write / clear `--motion-surface-duration` on a root (diff vs kit defaults).
212
+ * Write / clear `--motion-surface-duration` and `--motion-surface-ease` on a root.
213
+ * Duration follows `interactiveDuration`; ease follows `hoverLiftEase`.
214
+ * Values that match the kit defaults are removed so `tokens/styles.css` wins.
214
215
  * Called from `configureMotion` (documentElement) and theme `applyMotionFromState`.
215
216
  * Uses `root` when passed; otherwise `document.documentElement` if `document` exists.
216
217
  */
217
- export declare function applyMotionCssTokens(root: HTMLElement | null | undefined, config?: Pick<MotionConfig, "surfaceTransitionDuration">): void;
218
+ export declare function applyMotionCssTokens(root: HTMLElement | null | undefined, config?: Partial<Pick<MotionConfig, "interactiveDuration" | "hoverLiftEase">>): void;
218
219
  /**
219
220
  * Overlay `motion` keys onto a base config (provider scope).
220
221
  * Empty / fully invalid overlay returns `base` (same reference).
@@ -1,10 +1,33 @@
1
1
  import { normalizeMotionConfig } from "./motionConfigValidation.js";
2
2
  import { MOTION_CONFIG_LIMITS } from "./motionConfigValidation.js";
3
3
  const MOTION_CSS_VAR = {
4
- surfaceDuration: "--motion-surface-duration"
4
+ surfaceDuration: "--motion-surface-duration",
5
+ surfaceEase: "--motion-surface-ease"
5
6
  };
7
+ const HOVER_LIFT_EASE_CSS = "cubic-bezier(0.37, 0, 0.63, 1)";
8
+ const GSAP_EASE_TO_CSS = {
9
+ "power1.in": "cubic-bezier(0.11, 0, 0.5, 0)",
10
+ "power1.out": "cubic-bezier(0.5, 1, 0.89, 1)",
11
+ "power1.inOut": "cubic-bezier(0.45, 0, 0.55, 1)",
12
+ "power2.in": "cubic-bezier(0.32, 0, 0.67, 0)",
13
+ "power2.out": "cubic-bezier(0.33, 1, 0.68, 1)",
14
+ "power2.inOut": "cubic-bezier(0.65, 0, 0.35, 1)",
15
+ "power3.in": "cubic-bezier(0.5, 0, 0.75, 0)",
16
+ "power3.out": "cubic-bezier(0.25, 1, 0.5, 1)",
17
+ "power3.inOut": "cubic-bezier(0.76, 0, 0.24, 1)",
18
+ "sine.inOut": HOVER_LIFT_EASE_CSS,
19
+ "expo.inOut": "cubic-bezier(0.87, 0, 0.13, 1)",
20
+ "back.out(1.4)": "cubic-bezier(0.34, 1.45, 0.64, 1)",
21
+ "back.out(1.25)": "cubic-bezier(0.34, 1.3, 0.64, 1)"
22
+ };
23
+ const CSS_TIMING_FUNCTION = /^(cubic-bezier|linear|steps|ease-in-out|ease-in|ease-out|ease)\b/;
24
+ function hoverLiftEaseToCss(ease) {
25
+ const trimmed = ease.trim();
26
+ if (CSS_TIMING_FUNCTION.test(trimmed)) return trimmed;
27
+ return GSAP_EASE_TO_CSS[trimmed] ?? HOVER_LIFT_EASE_CSS;
28
+ }
6
29
  const MOTION_CONFIG_DEFAULTS = {
7
- interactiveDuration: 280,
30
+ interactiveDuration: 220,
8
31
  interactiveEase: "power2.out",
9
32
  hoverLiftEase: "sine.inOut",
10
33
  tooltipDuration: 200,
@@ -24,7 +47,6 @@ const MOTION_CONFIG_DEFAULTS = {
24
47
  rippleEaseCss: "cubic-bezier(0.25, 0.55, 0.35, 0.95)",
25
48
  expandDuration: 200,
26
49
  expandOpenEase: "sine.inOut",
27
- surfaceTransitionDuration: 180,
28
50
  toastDismissDuration: 220,
29
51
  toastDismissEase: "power2.in",
30
52
  enableAnimations: true,
@@ -65,13 +87,17 @@ function getMotionConfigRevision() {
65
87
  function applyMotionCssTokens(root, config = _config) {
66
88
  const target = root ?? (typeof document !== "undefined" ? document.documentElement : null);
67
89
  if (!target?.style) return;
68
- const ms = config.surfaceTransitionDuration;
69
- if (!Number.isFinite(ms) || ms < 0) return;
70
- const name = MOTION_CSS_VAR.surfaceDuration;
71
- if (ms === MOTION_CONFIG_DEFAULTS.surfaceTransitionDuration) {
72
- target.style.removeProperty(name);
73
- } else {
74
- target.style.setProperty(name, `${ms}ms`);
90
+ const ms = config.interactiveDuration;
91
+ if (Number.isFinite(ms) && ms != null && ms >= 0) {
92
+ const duration = `${ms}ms`;
93
+ const durationDefault = `${MOTION_CONFIG_DEFAULTS.interactiveDuration}ms`;
94
+ if (duration === durationDefault) target.style.removeProperty(MOTION_CSS_VAR.surfaceDuration);
95
+ else target.style.setProperty(MOTION_CSS_VAR.surfaceDuration, duration);
96
+ }
97
+ if (config.hoverLiftEase) {
98
+ const ease = hoverLiftEaseToCss(config.hoverLiftEase);
99
+ if (ease === HOVER_LIFT_EASE_CSS) target.style.removeProperty(MOTION_CSS_VAR.surfaceEase);
100
+ else target.style.setProperty(MOTION_CSS_VAR.surfaceEase, ease);
75
101
  }
76
102
  }
77
103
  function overlayEqualsCurrent(accepted) {
@@ -201,6 +227,7 @@ function motionLoadingDotsFor(config) {
201
227
  };
202
228
  }
203
229
  export {
230
+ HOVER_LIFT_EASE_CSS,
204
231
  MOTION_CONFIG_DEFAULTS,
205
232
  MOTION_CONFIG_LIMITS,
206
233
  MOTION_CSS_VAR,
@@ -208,6 +235,7 @@ export {
208
235
  configureMotion,
209
236
  getMotionConfig,
210
237
  getMotionConfigRevision,
238
+ hoverLiftEaseToCss,
211
239
  isMotionEnabled,
212
240
  isMotionEnabledFor,
213
241
  isMotionFeatureEnabled,
@@ -14,7 +14,6 @@ const DURATION_KEYS = [
14
14
  "rippleDefaultDuration",
15
15
  "rippleExpandableDuration",
16
16
  "expandDuration",
17
- "surfaceTransitionDuration",
18
17
  "toastDismissDuration",
19
18
  "progressFillDuration",
20
19
  "progressIndeterminateDuration",
@@ -45,10 +45,10 @@ function useMotionPart({
45
45
  }) {
46
46
  const isLiveSlot = useStudioSlotCheck();
47
47
  const targetRef = useRef(null);
48
- const studioMarkRef = useRef(null);
49
48
  const motionRef = useRef(motion);
50
49
  motionRef.current = motion;
51
50
  const idRef = useLazyRef(() => Symbol(slot));
51
+ const studioMarkRef = useRef(null);
52
52
  const syncRegistration = useCallback(
53
53
  (node, partMotion) => {
54
54
  if (!scope) return;
@@ -47,7 +47,6 @@ const THEME_PRESETS = {
47
47
  tooltipDuration: 160,
48
48
  modalDuration: 240,
49
49
  expandDuration: 160,
50
- surfaceTransitionDuration: 420,
51
50
  toastDismissDuration: 180,
52
51
  hoverLiftScale: 1.015,
53
52
  badgeAnchorHoverLiftScale: 1.035,
@@ -73,7 +72,6 @@ const THEME_PRESETS = {
73
72
  tooltipDuration: 240,
74
73
  modalDuration: 340,
75
74
  expandDuration: 260,
76
- surfaceTransitionDuration: 740,
77
75
  hoverLiftScale: 1.035,
78
76
  badgeAnchorHoverLiftScale: 1.065,
79
77
  pressSqueezeMid: 0.985,
@@ -104,7 +102,6 @@ const THEME_PRESETS = {
104
102
  tooltipDuration: 140,
105
103
  modalDuration: 220,
106
104
  expandDuration: 150,
107
- surfaceTransitionDuration: 320,
108
105
  hoverLiftScale: 1,
109
106
  badgeAnchorHoverLiftScale: 1.02,
110
107
  pressSqueezeMid: 0.99,
@@ -168,7 +165,6 @@ const THEME_PRESETS = {
168
165
  modalDuration: 360,
169
166
  expandDuration: 280,
170
167
  switchThumbDuration: 400,
171
- surfaceTransitionDuration: 800,
172
168
  toastDismissDuration: 280,
173
169
  hoverLiftScale: 1.04,
174
170
  badgeAnchorHoverLiftScale: 1.07,
@@ -208,7 +204,6 @@ const THEME_PRESETS = {
208
204
  tooltipDuration: 120,
209
205
  modalDuration: 200,
210
206
  expandDuration: 140,
211
- surfaceTransitionDuration: 280,
212
207
  toastDismissDuration: 160,
213
208
  hoverLiftScale: 1.01,
214
209
  badgeAnchorHoverLiftScale: 1.025,
@@ -247,7 +242,6 @@ const THEME_PRESETS = {
247
242
  expandDuration: 140,
248
243
  switchThumbDuration: 260,
249
244
  selectionFillDuration: 220,
250
- surfaceTransitionDuration: 360,
251
245
  hoverLiftScale: 1.012,
252
246
  badgeAnchorHoverLiftScale: 1.03,
253
247
  pressSqueezeMid: 0.975,
@@ -284,7 +278,6 @@ const THEME_PRESETS = {
284
278
  modalDuration: 380,
285
279
  expandDuration: 300,
286
280
  switchThumbDuration: 420,
287
- surfaceTransitionDuration: 900,
288
281
  toastDismissDuration: 280,
289
282
  hoverLiftScale: 1.045,
290
283
  badgeAnchorHoverLiftScale: 1.08,
@@ -24,13 +24,12 @@ const KNOBS = [
24
24
  { key: "shadowOffsetY", group: "shadow", ru: "Сдвиг тени по Y", en: "Shadow offset Y", type: "shadow", unit: "px", min: -24, max: 24, step: 1 },
25
25
  { key: "toastScrimSize", group: "shadow", ru: "Размер подложки тоста", en: "Toast scrim size", type: "shadow", unit: "×", min: 0.5, max: 2, step: 0.05 },
26
26
  { key: "toastScrimDensity", group: "shadow", ru: "Плотность подложки тоста", en: "Toast scrim density", type: "shadow", unit: "×", min: 0, max: 2, step: 0.05 },
27
- { key: "interactiveDuration", group: "motion", ru: "Интерактив", en: "Interactive duration", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
27
+ { key: "interactiveDuration", group: "motion", ru: "Интерактив и фон", en: "Interactive and surface", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
28
28
  { key: "modalDuration", group: "motion", ru: "Модалка", en: "Modal duration", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
29
29
  { key: "tooltipDuration", group: "motion", ru: "Подсказка", en: "Tooltip duration", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
30
30
  { key: "switchThumbDuration", group: "motion", ru: "Бегунок свитча", en: "Switch thumb duration", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
31
31
  { key: "selectionFillDuration", group: "motion", ru: "Заливка выбора", en: "Selection fill duration", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
32
32
  { key: "expandDuration", group: "motion", ru: "Раскрытие", en: "Expand duration", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
33
- { key: "surfaceTransitionDuration", group: "motion", ru: "Поверхность", en: "Surface transition", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
34
33
  { key: "toastDismissDuration", group: "motion", ru: "Закрытие тоста", en: "Toast dismiss", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
35
34
  { key: "rippleDefaultDuration", group: "motion", ru: "Рябь", en: "Ripple duration", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
36
35
  { key: "rippleExpandableDuration", group: "motion", ru: "Рябь раскрытия", en: "Expandable ripple duration", type: "duration", unit: "ms", min: duration.min, max: duration.max, step: 10 },
@@ -38,7 +37,7 @@ const KNOBS = [
38
37
  { key: "progressIndeterminateDuration", group: "motion", ru: "Неопределённый прогресс", en: "Progress indeterminate duration", type: "duration", unit: "ms", min: longDuration.min, max: longDuration.max, step: 50 },
39
38
  { key: "loadingDotsDuration", group: "motion", ru: "Точки загрузки", en: "Loading dots duration", type: "duration", unit: "ms", min: longDuration.min, max: longDuration.max, step: 50 },
40
39
  { key: "interactiveEase", group: "motion", ru: "Ease интерактива", en: "Interactive easing", type: "ease" },
41
- { key: "hoverLiftEase", group: "motion", ru: "Ease подъёма", en: "Hover lift easing", type: "ease" },
40
+ { key: "hoverLiftEase", group: "motion", ru: "Ease подъёма и фона", en: "Hover and surface easing", type: "ease" },
42
41
  { key: "switchThumbEase", group: "motion", ru: "Ease бегунка", en: "Switch thumb easing", type: "ease" },
43
42
  { key: "selectionFillEase", group: "motion", ru: "Ease заливки", en: "Selection fill easing", type: "ease" },
44
43
  { key: "expandOpenEase", group: "motion", ru: "Ease раскрытия", en: "Expand easing", type: "ease" },
@@ -127,4 +127,4 @@ export declare function exportBurneThemeConfigSource(config: BurneThemeConfig, o
127
127
  exportName?: string;
128
128
  }): string;
129
129
  /** @internal used by docs — list of motion keys mirrored from ThemeTokenState */
130
- export declare const BURNE_THEME_MOTION_STATE_KEYS: readonly ["interactiveDuration", "interactiveEase", "hoverLiftEase", "tooltipDuration", "modalDuration", "switchThumbDuration", "switchThumbEase", "selectionFillDuration", "selectionFillEase", "hoverLiftScale", "badgeAnchorHoverLiftScale", "pressSqueezeDurationFactor", "rippleDefaultDuration", "rippleDefaultOpacityFrom", "rippleExpandableDuration", "rippleExpandableOpacityFrom", "rippleEaseCss", "expandDuration", "expandOpenEase", "surfaceTransitionDuration", "toastDismissDuration", "toastDismissEase", "progressFillDuration", "progressFillEase", "progressIndeterminateDuration", "progressIndeterminateEase", "loadingDotsDuration", "loadingDotsEaseUp", "loadingDotsEaseDown", "enableAnimations", "enableHoverLift", "enablePressSqueeze", "enableToggleButtonFill", "enableRipple", "enableExpandable", "enableToastStack", "enableContentFade", "enableProgressFill", "enableLoadingDots", "enableModalMotion", "enableSwitchThumb", "enableTabsIndicator", "enablePaginationFlip", "enableSelectionFill"];
130
+ export declare const BURNE_THEME_MOTION_STATE_KEYS: readonly ["interactiveDuration", "interactiveEase", "hoverLiftEase", "tooltipDuration", "modalDuration", "switchThumbDuration", "switchThumbEase", "selectionFillDuration", "selectionFillEase", "hoverLiftScale", "badgeAnchorHoverLiftScale", "pressSqueezeDurationFactor", "rippleDefaultDuration", "rippleDefaultOpacityFrom", "rippleExpandableDuration", "rippleExpandableOpacityFrom", "rippleEaseCss", "expandDuration", "expandOpenEase", "toastDismissDuration", "toastDismissEase", "progressFillDuration", "progressFillEase", "progressIndeterminateDuration", "progressIndeterminateEase", "loadingDotsDuration", "loadingDotsEaseUp", "loadingDotsEaseDown", "enableAnimations", "enableHoverLift", "enablePressSqueeze", "enableToggleButtonFill", "enableRipple", "enableExpandable", "enableToastStack", "enableContentFade", "enableProgressFill", "enableLoadingDots", "enableModalMotion", "enableSwitchThumb", "enableTabsIndicator", "enablePaginationFlip", "enableSelectionFill"];
@@ -21,7 +21,6 @@ const MOTION_STATE_KEYS = [
21
21
  "rippleEaseCss",
22
22
  "expandDuration",
23
23
  "expandOpenEase",
24
- "surfaceTransitionDuration",
25
24
  "toastDismissDuration",
26
25
  "toastDismissEase",
27
26
  "progressFillDuration",
@@ -75,8 +75,6 @@ export type ThemeTokenState = {
75
75
  loadingDotsDuration: number;
76
76
  loadingDotsEaseUp: string;
77
77
  loadingDotsEaseDown: string;
78
- /** CSS `--motion-surface-duration` (surface / text / shadow transitions), ms. */
79
- surfaceTransitionDuration: number;
80
78
  /** Toast dismiss + last-scrim out, ms. */
81
79
  toastDismissDuration: number;
82
80
  toastDismissEase: string;
@@ -138,7 +136,6 @@ export declare const MOTION_DEFAULTS: {
138
136
  rippleEaseCss: string;
139
137
  expandDuration: number;
140
138
  expandOpenEase: string;
141
- surfaceTransitionDuration: number;
142
139
  toastDismissDuration: number;
143
140
  toastDismissEase: string;
144
141
  enableAnimations: boolean;
@@ -1,4 +1,4 @@
1
- import { MOTION_CONFIG_DEFAULTS, applyMotionCssTokens } from "../components/core/utils/motionConfig.js";
1
+ import { MOTION_CONFIG_DEFAULTS, hoverLiftEaseToCss, applyMotionCssTokens } from "../components/core/utils/motionConfig.js";
2
2
  import { FONT_WEIGHT_DEFAULTS, FONT_WEIGHT_CSS_VAR } from "../tokens/fontWeights.js";
3
3
  import { TEXT_SCALE_BASES } from "../tokens/textScale.js";
4
4
  import tokenPrimitives from "../tokens/tokenPrimitives.json.js";
@@ -263,6 +263,7 @@ const INLINE_TOKEN_VARS = [
263
263
  "--focus-ring-width",
264
264
  "--focus-ring-offset",
265
265
  "--motion-surface-duration",
266
+ "--motion-surface-ease",
266
267
  "--font-family-sans",
267
268
  "--font-family-mono",
268
269
  "--letter-spacing",
@@ -288,7 +289,7 @@ function clearThemeInlineTokens(root) {
288
289
  }
289
290
  delete target.dataset.theme;
290
291
  }
291
- const lastCssDurationByRoot = /* @__PURE__ */ new WeakMap();
292
+ const lastCssMotionByRoot = /* @__PURE__ */ new WeakMap();
292
293
  function motionConfigFromThemeState(state) {
293
294
  return {
294
295
  interactiveDuration: state.interactiveDuration,
@@ -311,7 +312,6 @@ function motionConfigFromThemeState(state) {
311
312
  rippleEaseCss: state.rippleEaseCss,
312
313
  expandDuration: state.expandDuration,
313
314
  expandOpenEase: state.expandOpenEase,
314
- surfaceTransitionDuration: state.surfaceTransitionDuration,
315
315
  toastDismissDuration: state.toastDismissDuration,
316
316
  toastDismissEase: state.toastDismissEase,
317
317
  progressFillDuration: state.progressFillDuration,
@@ -339,10 +339,13 @@ function motionConfigFromThemeState(state) {
339
339
  };
340
340
  }
341
341
  function applyMotionFromState(state, root) {
342
- const ms = state.surfaceTransitionDuration;
343
- if (lastCssDurationByRoot.get(root) === ms) return;
344
- lastCssDurationByRoot.set(root, ms);
345
- applyMotionCssTokens(root, { surfaceTransitionDuration: ms });
342
+ const key = `${state.interactiveDuration}|${state.hoverLiftEase}`;
343
+ if (lastCssMotionByRoot.get(root) === key) return;
344
+ lastCssMotionByRoot.set(root, key);
345
+ applyMotionCssTokens(root, {
346
+ interactiveDuration: state.interactiveDuration,
347
+ hoverLiftEase: state.hoverLiftEase
348
+ });
346
349
  }
347
350
  function applyThemeTokens(state, root) {
348
351
  if (typeof document === "undefined") return;
@@ -485,8 +488,11 @@ function exportThemeCss(state) {
485
488
  if (full.toastScrimDensity !== defaults.toastScrimDensity) {
486
489
  lines.push(` --toast-scrim-density: ${full.toastScrimDensity};`);
487
490
  }
488
- if (full.surfaceTransitionDuration !== defaults.surfaceTransitionDuration) {
489
- lines.push(` --motion-surface-duration: ${full.surfaceTransitionDuration}ms;`);
491
+ if (full.interactiveDuration !== defaults.interactiveDuration) {
492
+ lines.push(` --motion-surface-duration: ${full.interactiveDuration}ms;`);
493
+ }
494
+ if (full.hoverLiftEase !== defaults.hoverLiftEase) {
495
+ lines.push(` --motion-surface-ease: ${hoverLiftEaseToCss(full.hoverLiftEase)};`);
490
496
  }
491
497
  if (full.textScale !== defaults.textScale) {
492
498
  for (const key of Object.keys(TEXT_SCALE_BASES)) {
@@ -34,7 +34,7 @@
34
34
  * - `--color-shadow` / `--color-shadow-secondary` — key + ambient shadow colors (theme palette).
35
35
  * - `--toast-scrim-size` / `--toast-scrim-density` — Toast scrim backdrop size and density.
36
36
  * - `--focus-ring-width` / `--focus-ring-offset` — keyboard focus ring geometry (`focus-ring*` utilities).
37
- * - `--motion-surface-duration` — CSS transitions for `surface-color-transition` / `animate-shadow` / field shells (from `surfaceTransitionDuration` in motion config).
37
+ * - `--motion-surface-duration` / `--motion-surface-ease` — CSS transitions for `surface-color-transition` and field shells. Duration is `interactiveDuration`; ease is the CSS form of `hoverLiftEase`.
38
38
  * - `--overlay-backdrop-color` / `--overlay-backdrop-blur` / `--overlay-backdrop-saturate` — frosted modal scrim (`overlay-backdrop`); `--overlay-backdrop-scrim` — solid dark-UI scrim.
39
39
  * - `--z-dialog` / `--z-dropdown` / `--z-popover` / `--z-toast` / `--z-tooltip` — overlay stacking (`z-*` utilities).
40
40
  * - `--max-component-*` — panel widths (`min/max-w-component-*`); Dialog size props map onto base…2xlarge.
package/dist/ui.css CHANGED
@@ -1515,6 +1515,10 @@
1515
1515
  height: calc(var(--border-width) * 3);
1516
1516
  }
1517
1517
 
1518
+ .h-\[length\:var\(--icon-size\)\] {
1519
+ height: var(--icon-size);
1520
+ }
1521
+
1518
1522
  .h-\[var\(--selection-indicator-base\)\] {
1519
1523
  height: var(--selection-indicator-base);
1520
1524
  }
@@ -1979,6 +1983,10 @@
1979
1983
  width: calc(var(--border-width) * 3);
1980
1984
  }
1981
1985
 
1986
+ .w-\[length\:var\(--icon-size\)\] {
1987
+ width: var(--icon-size);
1988
+ }
1989
+
1982
1990
  .w-\[min\(16rem\,70\%\)\] {
1983
1991
  width: min(16rem, 70%);
1984
1992
  }
@@ -3284,11 +3292,6 @@
3284
3292
  border-color: var(--color-warning);
3285
3293
  }
3286
3294
 
3287
- .border-s-0 {
3288
- border-inline-start-style: var(--tw-border-style);
3289
- border-inline-start-width: 0;
3290
- }
3291
-
3292
3295
  .border-s-token, .divide-x-token > * + * {
3293
3296
  border-inline-start-width: var(--border-width, 1px);
3294
3297
  border-inline-start-color: var(--border-color, var(--color-border));
@@ -5624,7 +5627,7 @@
5624
5627
  }
5625
5628
 
5626
5629
  .field-shell-transition {
5627
- transition: background-color var(--motion-surface-duration) var(--motion-shadow-ease), border-color var(--motion-surface-duration) var(--motion-shadow-ease), outline-color var(--motion-surface-duration) var(--motion-focus-ring-ease);
5630
+ transition: background-color var(--motion-surface-duration) var(--motion-surface-ease), border-color var(--motion-surface-duration) var(--motion-surface-ease), outline-color var(--motion-surface-duration) var(--motion-focus-ring-ease);
5628
5631
  }
5629
5632
 
5630
5633
  .icon-slot-2xlarge {
@@ -6813,6 +6816,12 @@
6813
6816
  margin-top: -1px;
6814
6817
  }
6815
6818
 
6819
+ :where(.accordion-root) {
6820
+ --accordion-item-radius: var(--radius-large);
6821
+ --radius-outer: var(--accordion-item-radius);
6822
+ --radius-pad: var(--space-xsmall);
6823
+ }
6824
+
6816
6825
  .portal-contained.z-dialog {
6817
6826
  z-index: calc(var(--z-dialog) + var(--z-overlay-nested-step));
6818
6827
  }
@@ -6860,6 +6869,51 @@
6860
6869
  .disabled\:hover\:text-muted[data-force-state~="disabled"][data-force-state~="hover"] {
6861
6870
  color: var(--color-muted-foreground);
6862
6871
  }
6872
+
6873
+ .button-group-joint-s {
6874
+ border-inline-start-width: 0;
6875
+ }
6876
+
6877
+ .button-group-joint-e {
6878
+ border-inline-end-width: 0;
6879
+ }
6880
+
6881
+ .button-group-joint-t {
6882
+ border-top-width: 0;
6883
+ }
6884
+
6885
+ .button-group-joint-b {
6886
+ border-bottom-width: 0;
6887
+ }
6888
+
6889
+ .toggle-fill-clip {
6890
+ pointer-events: none;
6891
+ z-index: 0;
6892
+ border-radius: inherit;
6893
+ inset: calc(var(--tb-fill-bw, var(--border-width)) * -1);
6894
+ position: absolute;
6895
+ overflow: hidden;
6896
+ }
6897
+
6898
+ .toggle-fill-clip-outline {
6899
+ --tb-fill-bw: var(--border-width-outline);
6900
+ }
6901
+
6902
+ .toggle-fill-clip-flush-is {
6903
+ inset-inline-start: 0;
6904
+ }
6905
+
6906
+ .toggle-fill-clip-flush-ie {
6907
+ inset-inline-end: 0;
6908
+ }
6909
+
6910
+ .toggle-fill-clip-flush-bs {
6911
+ inset-block-start: 0;
6912
+ }
6913
+
6914
+ .toggle-fill-clip-flush-be {
6915
+ inset-block-end: 0;
6916
+ }
6863
6917
  }
6864
6918
 
6865
6919
  :root {
@@ -6867,8 +6921,8 @@
6867
6921
  --border-width-outline: 1px;
6868
6922
  --focus-ring-width: 2px;
6869
6923
  --focus-ring-offset: 0px;
6870
- --motion-surface-duration: .18s;
6871
- --motion-surface-ease: cubic-bezier(.22, 1, .36, 1);
6924
+ --motion-surface-duration: .22s;
6925
+ --motion-surface-ease: cubic-bezier(.37, 0, .63, 1);
6872
6926
  --motion-shadow-ease: cubic-bezier(.16, 1, .3, 1);
6873
6927
  --motion-text-ease: var(--motion-shadow-ease);
6874
6928
  --motion-focus-ring-ease: var(--motion-shadow-ease);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "burne-ui",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "React UI kit (Burne UI)",
5
5
  "license": "MIT",
6
6
  "repository": {