burne-ui 2.0.1 → 2.0.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 (69) hide show
  1. package/cli/tailwind.css +2 -2
  2. package/cli/templates/skin-tier-2/src/skin.css +1 -1
  3. package/cli/templates/skin-tier-3/src/skin.css +1 -1
  4. package/dist/components/composite/ButtonGroup/buttonGroupStyles.d.ts +1 -1
  5. package/dist/components/composite/ButtonGroup/buttonGroupStyles.js +7 -2
  6. package/dist/components/core/Badge/badgeStyles.d.ts +6 -1
  7. package/dist/components/core/Badge/badgeStyles.js +2 -2
  8. package/dist/components/core/Button/useButtonRootState.js +5 -2
  9. package/dist/components/core/Calendar/calendarParts.js +15 -13
  10. package/dist/components/core/Calendar/calendarStyles.d.ts +5 -2
  11. package/dist/components/core/Calendar/calendarStyles.js +3 -3
  12. package/dist/components/core/ComboBox/comboBoxStyles.d.ts +2 -2
  13. package/dist/components/core/ComboBox/comboBoxStyles.js +2 -2
  14. package/dist/components/core/DatePicker/datePickerAnimations.d.ts +2 -0
  15. package/dist/components/core/DatePicker/datePickerAnimations.js +31 -2
  16. package/dist/components/core/DatePicker/datePickerParts.js +20 -2
  17. package/dist/components/core/Disclosure/disclosureAnimations.js +9 -3
  18. package/dist/components/core/Disclosure/disclosureStyles.js +2 -1
  19. package/dist/components/core/Dropdown/dropdownAnimations.js +5 -3
  20. package/dist/components/core/Dropdown/dropdownStyles.d.ts +1 -1
  21. package/dist/components/core/Dropdown/dropdownStyles.js +1 -1
  22. package/dist/components/core/Expandable/Expandable.js +2 -2
  23. package/dist/components/core/Expandable/expandableStyles.d.ts +2 -1
  24. package/dist/components/core/Expandable/expandableStyles.js +3 -1
  25. package/dist/components/core/HoverCard/hoverCardStyles.js +5 -2
  26. package/dist/components/core/Input/inputControlParts.js +4 -4
  27. package/dist/components/core/Input/inputStyles.d.ts +3 -1
  28. package/dist/components/core/Input/inputStyles.js +8 -1
  29. package/dist/components/core/NumberInput/numberInputAnimations.d.ts +21 -21
  30. package/dist/components/core/NumberInput/numberInputAnimations.js +22 -4
  31. package/dist/components/core/NumberInput/numberInputStyles.js +1 -1
  32. package/dist/components/core/PinInput/pinInputStyles.js +7 -1
  33. package/dist/components/core/Popover/popoverStyles.js +3 -3
  34. package/dist/components/core/SearchInput/searchInputStyles.d.ts +1 -1
  35. package/dist/components/core/SearchInput/searchInputStyles.js +1 -1
  36. package/dist/components/core/Select/selectStyles.d.ts +3 -3
  37. package/dist/components/core/Select/selectStyles.js +3 -3
  38. package/dist/components/core/Slider/sliderTypes.d.ts +1 -1
  39. package/dist/components/core/Slider/useSliderTrackState.js +1 -0
  40. package/dist/components/core/Stepper/Stepper.js +1 -1
  41. package/dist/components/core/Stepper/stepperAnimations.d.ts +9 -3
  42. package/dist/components/core/Stepper/stepperAnimations.js +32 -1
  43. package/dist/components/core/Stepper/stepperParts.js +32 -5
  44. package/dist/components/core/Stepper/stepperTypes.d.ts +3 -1
  45. package/dist/components/core/Table/tableParts.js +21 -3
  46. package/dist/components/core/Table/tableStyles.d.ts +10 -1
  47. package/dist/components/core/Table/tableStyles.js +7 -1
  48. package/dist/components/core/TextArea/textAreaStyles.js +1 -1
  49. package/dist/components/core/TimeField/timeFieldStyles.d.ts +5 -2
  50. package/dist/components/core/TimeField/timeFieldStyles.js +3 -2
  51. package/dist/components/core/ToggleButton/toggleButtonParts.js +3 -3
  52. package/dist/components/core/ToggleButton/toggleButtonStyles.d.ts +6 -1
  53. package/dist/components/core/ToggleButton/toggleButtonStyles.js +16 -3
  54. package/dist/components/core/Tooltip/tooltipStyles.d.ts +1 -1
  55. package/dist/components/core/Tooltip/tooltipStyles.js +1 -1
  56. package/dist/components/core/utils/motionConfig.d.ts +18 -17
  57. package/dist/components/core/utils/motionConfig.js +38 -10
  58. package/dist/components/core/utils/motionConfigValidation.js +0 -1
  59. package/dist/components/core/utils/sizeLayout/iconSlot.d.ts +1 -1
  60. package/dist/components/core/utils/slotMotion/useMotionPart.js +1 -1
  61. package/dist/studio/themePresets.js +0 -7
  62. package/dist/studio/themeTokenSchema.js +2 -3
  63. package/dist/theme/themeConfig.d.ts +1 -1
  64. package/dist/theme/themeConfig.js +0 -1
  65. package/dist/theme/themeDefaults.d.ts +0 -3
  66. package/dist/theme/themeDefaults.js +15 -9
  67. package/dist/tokens/config.d.ts +1 -1
  68. package/dist/ui.css +101 -23
  69. package/package.json +1 -1
package/cli/tailwind.css CHANGED
@@ -179,8 +179,8 @@
179
179
 
180
180
  @utility field-shell-transition {
181
181
  transition:
182
- background-color var(--motion-surface-duration) var(--motion-shadow-ease),
183
- border-color var(--motion-surface-duration) var(--motion-shadow-ease),
182
+ background-color var(--motion-surface-duration) var(--motion-surface-ease),
183
+ border-color var(--motion-surface-duration) var(--motion-surface-ease),
184
184
  outline-color var(--motion-surface-duration) var(--motion-focus-ring-ease);
185
185
  }
186
186
 
@@ -1,4 +1,4 @@
1
- @layer ui-kit {
1
+ @layer components {
2
2
  .__SKIN_NAME__-surface {
3
3
  --__SKIN_NAME__-ink: var(--color-foreground);
4
4
  }
@@ -1,4 +1,4 @@
1
- @layer ui-kit {
1
+ @layer components {
2
2
  .__SKIN_NAME__-surface {
3
3
  --__SKIN_NAME__-tilt: 2deg;
4
4
  }
@@ -17,7 +17,7 @@ export declare function buttonGroupRoundingClasses(seg: ButtonGroupSegment | und
17
17
  * (Dropdown root, ComboBox/Select `Field`) so `rounded-*- [inherit]` resolves.
18
18
  */
19
19
  export declare const BUTTON_GROUP_RADIUS_BRIDGE_CLASS = "min-h-0 min-w-0 self-stretch rounded-[inherit]";
20
- /** Remove the double line at the internal joints. */
20
+ /** Drop the segment border that sits against the group separator, so the joint is one line. */
21
21
  export declare function buttonGroupOverlapBorderClasses(seg: ButtonGroupSegment | undefined): string;
22
22
  /** Surface of the segment inside the joined group: without its own frame. */
23
23
  export declare function buttonGroupSegmentSurfaceClasses(seg: ButtonGroupSegment | undefined): string;
@@ -36,9 +36,13 @@ function buttonGroupOverlapBorderClasses(seg) {
36
36
  if (seg == null || seg.position === "only") return "";
37
37
  const { orientation, position } = seg;
38
38
  if (orientation === "horizontal") {
39
- return position === "first" ? "" : "border-s-0";
39
+ if (position === "first") return "button-group-joint-e";
40
+ if (position === "last") return "button-group-joint-s";
41
+ return "button-group-joint-s button-group-joint-e";
40
42
  }
41
- return position === "first" ? "" : "border-t-0";
43
+ if (position === "first") return "button-group-joint-b";
44
+ if (position === "last") return "button-group-joint-t";
45
+ return "button-group-joint-t button-group-joint-b";
42
46
  }
43
47
  function buttonGroupSegmentSurfaceClasses(seg) {
44
48
  if (seg == null) return "";
@@ -48,6 +52,7 @@ function buttonGroupTextSurfaceClasses(seg) {
48
52
  return cn(
49
53
  "relative inline-flex shrink-0 select-none items-center justify-center border-token bg-surface text-muted",
50
54
  buttonGroupRoundingClasses(seg),
55
+ buttonGroupOverlapBorderClasses(seg),
51
56
  seg != null && buttonGroupSegmentSurfaceClasses(seg),
52
57
  "z-0"
53
58
  );
@@ -18,7 +18,12 @@ export declare const BADGE_DOT_RING = "box-border isolate inline-flex shrink-0 r
18
18
  export declare function dotFillClass(variant: BadgeVariant, status: BadgeStatus): string;
19
19
  /** Variant root — mirrors `buttonVariantRootClass` (outline drops border when status paints it). */
20
20
  export declare function badgeVariantRootClass(variant: BadgeVariant, status: BadgeStatus): string;
21
- /** Status overlay — same matrix as `buttonStatusClass`. A skin keeps the glass and colors the text. */
21
+ /**
22
+ * Status overlay. `default` keeps `bg-surface` and only recolors the text,
23
+ * same as a default button's surface. `primary` fills, `outline` recolors
24
+ * the border, `secondary` keeps its surface. A skin keeps its glass and
25
+ * colors the text.
26
+ */
22
27
  export declare function badgeStatusClass(variant: BadgeVariant, status: BadgeStatus): string;
23
28
  /** Surface = variant root + status overlay (Button pattern). */
24
29
  export declare function badgeSurfaceClass(variant: BadgeVariant, status?: BadgeStatus): string;
@@ -1,4 +1,4 @@
1
- import { SEMANTIC_STATUS_TEXT, SEMANTIC_STATUS_OUTLINE_BORDER, SEMANTIC_STATUS_FILL, SEMANTIC_STATUS_SURFACE_TINT } from "../utils/semanticStatusSurface.js";
1
+ import { SEMANTIC_STATUS_TEXT, SEMANTIC_STATUS_OUTLINE_BORDER, SEMANTIC_STATUS_FILL } from "../utils/semanticStatusSurface.js";
2
2
  import { cn } from "../../../utils/cn.js";
3
3
  import { KIT_BADGE_VARIANTS } from "./badgeTypes.js";
4
4
  import { resolveVariantVisual, isKitVariant } from "../../../skins/resolveVariantVisual.js";
@@ -84,7 +84,7 @@ function badgeStatusClass(variant, status) {
84
84
  if (visual.className !== void 0) return SEMANTIC_STATUS_TEXT[status];
85
85
  switch (visual.key) {
86
86
  case "default":
87
- return cn(SEMANTIC_STATUS_SURFACE_TINT[status], SEMANTIC_STATUS_TEXT[status]);
87
+ return SEMANTIC_STATUS_TEXT[status];
88
88
  case "primary":
89
89
  return SEMANTIC_STATUS_FILL[status];
90
90
  case "outline":
@@ -2,7 +2,7 @@
2
2
  import { useMemo } from "react";
3
3
  import { useSkinVariant, useSkinSurfaceStyle } from "../../../skins/skinContext.js";
4
4
  import { useOptionalButtonGroupLayout, useOptionalButtonGroupSegment } from "../../composite/ButtonGroup/buttonGroupContext.js";
5
- import { buttonGroupRoundingClasses, buttonGroupSegmentSurfaceClasses } from "../../composite/ButtonGroup/buttonGroupStyles.js";
5
+ import { buttonGroupRoundingClasses, buttonGroupOverlapBorderClasses, buttonGroupSegmentSurfaceClasses } from "../../composite/ButtonGroup/buttonGroupStyles.js";
6
6
  import { useOptionalFormBindingContext } from "../../composite/Form/formContext.js";
7
7
  import { cn } from "../../../utils/cn.js";
8
8
  import { hasButtonCompoundChildren } from "./buttonAPI.js";
@@ -35,7 +35,10 @@ function useButtonRootState({
35
35
  const blocked = userDisabled;
36
36
  const sizeRounded = CONTROL_SIZE_LAYOUT[size].rounded;
37
37
  const roundingClass = groupSegment ? buttonGroupRoundingClasses(groupSegment) : sizeRounded;
38
- const groupGlue = groupSegment ? buttonGroupSegmentSurfaceClasses(groupSegment) : "";
38
+ const groupGlue = groupSegment ? cn(
39
+ buttonGroupSegmentSurfaceClasses(groupSegment),
40
+ buttonGroupOverlapBorderClasses(groupSegment)
41
+ ) : "";
39
42
  const clipClass = groupSegment ? buttonGroupRoundingClasses(groupSegment) : sizeRounded;
40
43
  const isCompound = useMemo(() => hasButtonCompoundChildren(children), [children]);
41
44
  const buttonClass = cn(
@@ -16,7 +16,7 @@ import { calendarNavBackLabel, calendarNavForwardLabel, calendarFocusDayKey, cal
16
16
  import { chunkCalendarCells, isSameDay, moveCalendarFocusDate, moveCalendarMonthFocusIndex, moveCalendarYearFocusIndex } from "./calendarAPI.js";
17
17
  import { useCalendarSlotMotion, resolveCalendarCellMotionDefaults } from "./calendarAnimations.js";
18
18
  import { useCalendar, useCalendarClassNames, useOptionalCalendarMotionScope, CalendarMotionProvider } from "./calendarContext.js";
19
- import { calendarHeaderTitleClass, CALENDAR_FOOTER_TODAY_BUTTON_CLASS, CALENDAR_FOOTER_CLASS, CALENDAR_GRID_CLASS, CALENDAR_HEADER_CLASS, CALENDAR_NAV_ICON_CLASS, CALENDAR_NAV_ICON_WRAP_CLASS, calendarNavButtonClass, calendarWeekdayLabelClass, CALENDAR_DAYS_WEEKDAY_GRID_CLASS, CALENDAR_CONTENTS_CLASS, calendarDayEmptyClass, CALENDAR_DAY_CELL_LAYER_CLASS, CALENDAR_DAY_CELL_WRAPPER_CLASS, CALENDAR_DAYS_CELL_GRID_CLASS, calendarMonthsGridClass, calendarYearCellClass, calendarYearsGridClass, CALENDAR_RANGE_HALF_FILL_CLASS, calendarRangeHalfFillSideClass, CALENDAR_CELL_FILL_CLASS, CALENDAR_CELL_TEXT_CLASS, CALENDAR_CELL_TODAY_DOT_CLASS, calendarInteractiveCellClass, calendarInteractiveCellTextVariant } from "./calendarStyles.js";
19
+ import { calendarHeaderTitleClass, CALENDAR_FOOTER_TODAY_BUTTON_CLASS, CALENDAR_FOOTER_CLASS, CALENDAR_GRID_CLASS, CALENDAR_HEADER_CLASS, CALENDAR_NAV_ICON_CLASS, CALENDAR_NAV_ICON_WRAP_CLASS, calendarNavButtonClass, calendarWeekdayLabelClass, CALENDAR_DAYS_WEEKDAY_GRID_CLASS, CALENDAR_CONTENTS_CLASS, calendarDayEmptyClass, CALENDAR_DAY_CELL_LAYER_CLASS, CALENDAR_DAY_CELL_WRAPPER_CLASS, CALENDAR_DAYS_CELL_GRID_CLASS, calendarMonthsGridClass, calendarYearCellClass, calendarYearsGridClass, CALENDAR_RANGE_HALF_FILL_CLASS, calendarRangeHalfFillSideClass, CALENDAR_CELL_FILL_CLASS, CALENDAR_CELL_TODAY_DOT_CLASS, CALENDAR_CELL_TEXT_CLASS, calendarInteractiveCellClass, calendarInteractiveCellTextVariant } from "./calendarStyles.js";
20
20
  import { useCalendarHeaderTitle, useCalendarDayCellModels, useCalendarMonthCellModels, useCalendarYearCellModels } from "./useCalendarViewModels.js";
21
21
  import { hasPointerPhases, useOptionalEnterOnMount } from "../utils/slotMotion/useSlotLifecycle.js";
22
22
  import { useMotionPart } from "../utils/slotMotion/useMotionPart.js";
@@ -312,7 +312,7 @@ function CalendarInteractiveCellSurface({
312
312
  className: cn(CALENDAR_CELL_FILL_CLASS, slotClassNames.cellFill)
313
313
  }
314
314
  ),
315
- /* @__PURE__ */ jsx(
315
+ /* @__PURE__ */ jsxs(
316
316
  Text,
317
317
  {
318
318
  ref: setTextRef,
@@ -321,17 +321,19 @@ function CalendarInteractiveCellSurface({
321
321
  inheritColor: true,
322
322
  className: cn(CALENDAR_CELL_TEXT_CLASS, slotClassNames.cellText),
323
323
  ...textPointerHandlers,
324
- children
325
- }
326
- ),
327
- isToday && !selected && /* @__PURE__ */ jsx(
328
- "span",
329
- {
330
- "aria-hidden": true,
331
- className: cn(
332
- CALENDAR_CELL_TODAY_DOT_CLASS,
333
- slotClassNames.cellTodayDot
334
- )
324
+ children: [
325
+ children,
326
+ isToday && !selected && /* @__PURE__ */ jsx(
327
+ "span",
328
+ {
329
+ "aria-hidden": true,
330
+ className: cn(
331
+ CALENDAR_CELL_TODAY_DOT_CLASS,
332
+ slotClassNames.cellTodayDot
333
+ )
334
+ }
335
+ )
336
+ ]
335
337
  }
336
338
  )
337
339
  ]
@@ -34,8 +34,11 @@ export declare const CALENDAR_CELL_BUTTON_CLASS = "group/calendar-cell relative
34
34
  export declare const CALENDAR_CELL_FILL_CLASS: string;
35
35
  export declare const CALENDAR_HEADER_TITLE_BASE_CLASS: string;
36
36
  export declare const CALENDAR_CELL_TEXT_CLASS = "relative z-[1] min-w-0 shrink-0 leading-none";
37
- /** Today marker — 3× border-width so it stays a hairline dot on the size scale. */
38
- export declare const CALENDAR_CELL_TODAY_DOT_CLASS = "absolute bottom-[length:calc(var(--border-width)*3)] left-1/2 z-[1] h-[length:calc(var(--border-width)*3)] w-[length:calc(var(--border-width)*3)] -translate-x-1/2 rounded-full bg-primary";
37
+ /**
38
+ * Today marker, anchored to the numeral (`top-full` of `cellText`).
39
+ * Size and gap are em, so a text-scale / space / border shuffle cannot park the dot on the digit.
40
+ */
41
+ export declare const CALENDAR_CELL_TODAY_DOT_CLASS = "pointer-events-none absolute top-full left-1/2 z-[1] mt-[0.1em] size-[0.22em] -translate-x-1/2 rounded-full bg-primary";
39
42
  export declare const CALENDAR_NAV_ICON_CLASS = "icon-xsmall";
40
43
  export declare const CALENDAR_NAV_ICON_WRAP_CLASS = "inline-flex items-center justify-center";
41
44
  export declare const CALENDAR_CELL_SELECTED_CLASS = "bg-transparent font-w-mid text-primary-foreground";
@@ -91,16 +91,16 @@ const CALENDAR_NAV_BUTTON_CLASS = cn(
91
91
  );
92
92
  const CALENDAR_CELL_BUTTON_CLASS = "group/calendar-cell relative inline-flex origin-center items-center justify-center overflow-hidden outline-none focus-ring rounded-mid";
93
93
  const CALENDAR_CELL_FILL_CLASS = cn(
94
- "pointer-events-none absolute -inset-px z-0 origin-center bg-primary",
94
+ "pointer-events-none absolute inset-0 z-0 origin-center rounded-[inherit] bg-primary",
95
95
  SURFACE_COLOR_TRANSITION,
96
- "motion-reduce:transition-none group-hover/calendar-cell:bg-primary-hover rounded-mid"
96
+ "motion-reduce:transition-none group-hover/calendar-cell:bg-primary-hover"
97
97
  );
98
98
  const CALENDAR_HEADER_TITLE_BASE_CLASS = cn(
99
99
  CALENDAR_HEADER_TITLE_CLASS,
100
100
  TEXT_COLOR_TRANSITION
101
101
  );
102
102
  const CALENDAR_CELL_TEXT_CLASS = "relative z-[1] min-w-0 shrink-0 leading-none";
103
- const CALENDAR_CELL_TODAY_DOT_CLASS = "absolute bottom-[length:calc(var(--border-width)*3)] left-1/2 z-[1] h-[length:calc(var(--border-width)*3)] w-[length:calc(var(--border-width)*3)] -translate-x-1/2 rounded-full bg-primary";
103
+ const CALENDAR_CELL_TODAY_DOT_CLASS = "pointer-events-none absolute top-full left-1/2 z-[1] mt-[0.1em] size-[0.22em] -translate-x-1/2 rounded-full bg-primary";
104
104
  const CALENDAR_NAV_ICON_CLASS = "icon-xsmall";
105
105
  const CALENDAR_NAV_ICON_WRAP_CLASS = "inline-flex items-center justify-center";
106
106
  const CALENDAR_CELL_SELECTED_CLASS = "bg-transparent font-w-mid text-primary-foreground";
@@ -4,10 +4,10 @@ import { FieldShellStatus } from '../utils/fieldShellVariant.js';
4
4
  export declare const COMBOBOX_LOADING_CLASS = "px-mid py-small text-muted";
5
5
  export declare const COMBOBOX_INPUT_CONTROL: Record<InputSize, string>;
6
6
  export declare const COMBOBOX_CHEVRON_ICON_SLOT: Record<InputSize, string>;
7
- export declare const COMBOBOX_INPUT_GROUP_BASE_CLASS = "relative z-0 flex min-w-0 items-stretch border-1 text-start overflow-hidden motion-reduce:transition-none";
7
+ export declare const COMBOBOX_INPUT_GROUP_BASE_CLASS = "relative z-0 flex min-w-0 items-stretch border-1 text-start motion-reduce:transition-none";
8
8
  export declare const COMBOBOX_INPUT_BASE_CLASS = "min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted field-control-mobile-no-zoom";
9
9
  export declare const COMBOBOX_INPUT_MUTED_CLASS = "text-muted";
10
- export declare const COMBOBOX_TRIGGER_BASE_CLASS = "flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring-inset";
10
+ export declare const COMBOBOX_TRIGGER_BASE_CLASS = "flex shrink-0 origin-center cursor-pointer items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring-inset disabled:cursor-not-allowed";
11
11
  export declare const COMBOBOX_TRIGGER_DISABLED_CLASS = "pointer-events-none";
12
12
  export declare const COMBOBOX_POPOVER_CLASS = "z-popover";
13
13
  export declare const COMBOBOX_POPOVER_BODY_CLASS = "gap-0 p-base";
@@ -20,10 +20,10 @@ const COMBOBOX_CHEVRON_ICON_SLOT = {
20
20
  mid: iconSlotClass("mid"),
21
21
  large: iconSlotClass("large")
22
22
  };
23
- const COMBOBOX_INPUT_GROUP_BASE_CLASS = "relative z-0 flex min-w-0 items-stretch border-1 text-start overflow-hidden motion-reduce:transition-none";
23
+ const COMBOBOX_INPUT_GROUP_BASE_CLASS = "relative z-0 flex min-w-0 items-stretch border-1 text-start motion-reduce:transition-none";
24
24
  const COMBOBOX_INPUT_BASE_CLASS = `min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS}`;
25
25
  const COMBOBOX_INPUT_MUTED_CLASS = "text-muted";
26
- const COMBOBOX_TRIGGER_BASE_CLASS = "flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring-inset";
26
+ const COMBOBOX_TRIGGER_BASE_CLASS = "flex shrink-0 origin-center cursor-pointer items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring-inset disabled:cursor-not-allowed";
27
27
  const COMBOBOX_TRIGGER_DISABLED_CLASS = "pointer-events-none";
28
28
  const COMBOBOX_POPOVER_CLASS = "z-popover";
29
29
  const COMBOBOX_POPOVER_BODY_CLASS = "gap-0 p-base";
@@ -26,6 +26,8 @@ export declare function useDatePickerTriggerMotion({ motion, forwardedRef, onPoi
26
26
  onPointerUp?: PointerEventHandler<HTMLButtonElement>;
27
27
  }): {
28
28
  setRef: (node: HTMLButtonElement | null) => void;
29
+ openingRef: import('react').RefObject<boolean>;
30
+ openAfterSqueeze: (setOpen: (open: boolean) => void) => void;
29
31
  pointerHandlers: {
30
32
  onPointerOver: (e: import('react').PointerEvent<HTMLButtonElement>) => void;
31
33
  onPointerOut: (e: import('react').PointerEvent<HTMLButtonElement>) => void;
@@ -1,5 +1,8 @@
1
1
  "use client";
2
- import { useRef } from "react";
2
+ import { useRef, useCallback } from "react";
3
+ import { useMotionConfig } from "../utils/motionConfigContext.js";
4
+ import { playOverlayTriggerOpenSqueeze } from "../utils/overlayTriggerSqueeze.js";
5
+ import { useOpeningRef, runOpenAfterSqueeze } from "../utils/runOpenAfterSqueeze.js";
3
6
  import { useChevronRotation } from "../utils/useChevronRotation.js";
4
7
  import { useSecondLevelShadow } from "../utils/useShadowMotion.js";
5
8
  import { KIT_INPUT_VARIANTS } from "../Input/inputTypes.js";
@@ -74,7 +77,9 @@ function useDatePickerTriggerMotion({
74
77
  motion,
75
78
  forwardedRef,
76
79
  pointerPhases: !disabled,
77
- pressPhases: !disabled,
80
+ // Open plays `pressIn` itself and waits for the release. A pointer-down
81
+ // press would race that timeline and the panel would open mid-squeeze.
82
+ pressPhases: false,
78
83
  onPointerOver: (event) => {
79
84
  pointerInsideRef.current = true;
80
85
  onPointerOver?.(event);
@@ -87,12 +92,36 @@ function useDatePickerTriggerMotion({
87
92
  onPointerUp
88
93
  });
89
94
  useOptionalEnterOnMount(scope, "trigger", part.targetRef);
95
+ const openingRef = useOpeningRef();
96
+ const config = useMotionConfig();
97
+ const partMotionRef = useRef(motion);
98
+ partMotionRef.current = motion;
99
+ const openAfterSqueeze = useCallback(
100
+ (setOpen) => {
101
+ runOpenAfterSqueeze({
102
+ triggerRef,
103
+ openingRef,
104
+ setOpen,
105
+ disabled,
106
+ config,
107
+ runSqueeze: (el) => playOverlayTriggerOpenSqueeze({
108
+ scope,
109
+ el,
110
+ partMotion: partMotionRef.current,
111
+ config
112
+ })
113
+ });
114
+ },
115
+ [config, disabled, openingRef, scope, triggerRef]
116
+ );
90
117
  const setRef = (node) => {
91
118
  triggerRef.current = node;
92
119
  part.setRef(node);
93
120
  };
94
121
  return {
95
122
  setRef,
123
+ openingRef,
124
+ openAfterSqueeze,
96
125
  pointerHandlers: part.pointerHandlers,
97
126
  shellHoverMotionClass: kitSurface ? shadow.motionClass : ""
98
127
  };
@@ -55,6 +55,7 @@ const DatePickerTrigger = forwardRef(
55
55
  className,
56
56
  motion,
57
57
  onClick,
58
+ onKeyDown,
58
59
  onPointerOver,
59
60
  onPointerOut,
60
61
  onPointerDown,
@@ -75,8 +76,23 @@ const DatePickerTrigger = forwardRef(
75
76
  const text = field.empty ? field.placeholder : field.display;
76
77
  const handleClick = (event) => {
77
78
  onClick?.(event);
78
- if (event.defaultPrevented || field.disabled) return;
79
- field.setOpen(!field.open);
79
+ if (event.defaultPrevented || field.disabled || field.readOnly) return;
80
+ if (field.open) field.setOpen(false);
81
+ };
82
+ const handlePointerDown = (event) => {
83
+ trigger.pointerHandlers.onPointerDown?.(event);
84
+ if (event.defaultPrevented || field.disabled || field.readOnly) return;
85
+ if (field.open || trigger.openingRef.current || event.button !== 0) return;
86
+ event.preventDefault();
87
+ trigger.openAfterSqueeze(() => field.setOpen(true));
88
+ };
89
+ const handleKeyDown = (event) => {
90
+ onKeyDown?.(event);
91
+ if (event.defaultPrevented || field.disabled || field.readOnly) return;
92
+ if (event.key !== "Enter" && event.key !== " ") return;
93
+ event.preventDefault();
94
+ if (field.open) field.setOpen(false);
95
+ else trigger.openAfterSqueeze(() => field.setOpen(true));
80
96
  };
81
97
  return /* @__PURE__ */ jsx(
82
98
  "button",
@@ -96,8 +112,10 @@ const DatePickerTrigger = forwardRef(
96
112
  className
97
113
  }),
98
114
  onClick: handleClick,
115
+ onKeyDown: handleKeyDown,
99
116
  ...rest,
100
117
  ...trigger.pointerHandlers,
118
+ onPointerDown: handlePointerDown,
101
119
  role: "combobox",
102
120
  "aria-haspopup": "dialog",
103
121
  "aria-expanded": field.open,
@@ -26,8 +26,10 @@ function resolveDisclosureMotionDefaults(variant) {
26
26
  }
27
27
  } : {},
28
28
  titleLift: {
29
- hoverIn: "hoverLiftFirstLevel",
30
- hoverOut: "hoverLiftFirstLevel",
29
+ // Hover lift would mount elevation layers on this span, inside the button.
30
+ // Card shadow stays on `root`. Press only squeezes the title.
31
+ hoverIn: false,
32
+ hoverOut: false,
31
33
  pressIn: "pressSqueeze",
32
34
  pressOut: false
33
35
  },
@@ -159,7 +161,11 @@ function useDisclosureTriggerMotion({
159
161
  }
160
162
  const value = scope.resolve("titleLift", phase, motion);
161
163
  if (value === void 0) return;
162
- scope.play("titleLift", phase, { partMotion: motion, el });
164
+ scope.play("titleLift", phase, {
165
+ partMotion: motion,
166
+ el,
167
+ params: { hasHoverShadow: false }
168
+ });
163
169
  },
164
170
  [config, disabled, motion, scope]
165
171
  );
@@ -25,7 +25,8 @@ const VARIANT_TRIGGER = {
25
25
  default: cn("rounded-mid", TRIGGER_INTERACTIVE),
26
26
  outline: cn("rounded-mid", TRIGGER_INTERACTIVE),
27
27
  secondary: cn("rounded-mid", TRIGGER_INTERACTIVE),
28
- card: TRIGGER_INTERACTIVE,
28
+ // Card hover is the shell shadow only. A header wash reads as a second surface.
29
+ card: "bg-transparent text-foreground",
29
30
  ghost: cn("rounded-mid", TRIGGER_INTERACTIVE)
30
31
  };
31
32
  const DISCLOSURE_TRIGGER_BASE_CLASS = "flex w-full select-none items-center gap-small text-start outline-none focus-ring";
@@ -221,13 +221,15 @@ function useDropdownSubPopoverPortal({
221
221
  const t = triggerRef.current;
222
222
  if (!t) return;
223
223
  const r = t.getBoundingClientRect();
224
- const gap = 6;
224
+ const menu = t.closest("[role='menu']");
225
+ const edge = menu instanceof HTMLElement ? menu.getBoundingClientRect() : r;
226
+ const gap = 0;
225
227
  const minW = Math.max(r.width, 10 * 16);
226
- let left = r.right + gap;
228
+ let left = edge.right + gap;
227
229
  let top = r.top;
228
230
  const estW = minW;
229
231
  if (left + estW > window.innerWidth - 12) {
230
- left = Math.max(12, r.left - estW - gap);
232
+ left = Math.max(12, edge.left - estW - gap);
231
233
  }
232
234
  const panel = panelRef.current;
233
235
  const ph = panel?.offsetHeight ?? 0;
@@ -21,7 +21,7 @@ export declare const DROPDOWN_SUB_TRIGGER_CHEVRON_CLASS = "shrink-0 text-muted i
21
21
  export declare const DROPDOWN_SUB_CONTENT_BASE_CLASS = "fixed z-dropdown-sub outline-none";
22
22
  export declare const DROPDOWN_SUB_CONTENT_LAYOUT_CLASS = "flex min-h-0 flex-col rounded-mid text-start";
23
23
  export declare const DROPDOWN_SUB_CONTENT_BODY_CLASS = "flex max-h-[min(22rem,65dvh)] min-h-0 flex-col gap-xsmall overflow-y-auto overflow-x-hidden p-base text-start";
24
- export declare const DROPDOWN_SUB_CONTENT_SURFACE_CLASS = "border-token bg-surface shadow-token-large";
24
+ export declare const DROPDOWN_SUB_CONTENT_SURFACE_CLASS = "border-token bg-surface shadow-token-mid";
25
25
  export declare const DROPDOWN_ITEM_BASE_CLASS = "w-full min-w-0 origin-center rounded-mid px-base py-small text-start no-underline outline-none text-base";
26
26
  export declare const DROPDOWN_ITEM_DISABLED_CLASS = "cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent";
27
27
  export declare function dropdownItemRowClass({ status, disabled, hasHint, showIndicatorSlot, hasIcon, className, slotClass, size, }: {
@@ -29,7 +29,7 @@ const DROPDOWN_SUB_TRIGGER_CHEVRON_CLASS = "shrink-0 text-muted icon-base";
29
29
  const DROPDOWN_SUB_CONTENT_BASE_CLASS = "fixed z-dropdown-sub outline-none";
30
30
  const DROPDOWN_SUB_CONTENT_LAYOUT_CLASS = "flex min-h-0 flex-col rounded-mid text-start";
31
31
  const DROPDOWN_SUB_CONTENT_BODY_CLASS = "flex max-h-[min(22rem,65dvh)] min-h-0 flex-col gap-xsmall overflow-y-auto overflow-x-hidden p-base text-start";
32
- const DROPDOWN_SUB_CONTENT_SURFACE_CLASS = "border-token bg-surface shadow-token-large";
32
+ const DROPDOWN_SUB_CONTENT_SURFACE_CLASS = "border-token bg-surface shadow-token-mid";
33
33
  const DROPDOWN_ITEM_BASE_CLASS = "w-full min-w-0 origin-center rounded-mid px-base py-small text-start no-underline outline-none text-base";
34
34
  const DROPDOWN_ITEM_DISABLED_CLASS = "cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent";
35
35
  const DROPDOWN_ITEM_STATUS_CLASS = {
@@ -10,7 +10,7 @@ import { ExpandableProvider, ExpandableClassNamesProvider, ExpandableMotionProvi
10
10
  import { resolveExpandableMotionDefaults } from "./expandableAnimations.js";
11
11
  import { ExpandableSimpleBody } from "./expandableParts.js";
12
12
  import { ExpandableChevron, ExpandableContent, ExpandableDescription, ExpandableIcon, ExpandableMessage, ExpandablePanel, ExpandableTitle, ExpandableTrigger } from "./expandableParts.js";
13
- import { expandableRootClass } from "./expandableStyles.js";
13
+ import { expandableRootClass, EXPANDABLE_FACE_CLIP_CLASS } from "./expandableStyles.js";
14
14
  import { KIT_EXPANDABLE_VARIANTS } from "./expandableTypes.js";
15
15
  import { useExpandableRootState } from "./useExpandableRootState.js";
16
16
  import { useMotionPart } from "../utils/slotMotion/useMotionPart.js";
@@ -127,7 +127,7 @@ function ExpandableRootSurface({
127
127
  style,
128
128
  ...dataVariantProps({ size, variant }),
129
129
  "data-state": dataExpandedState(open),
130
- children
130
+ children: children ? /* @__PURE__ */ jsx("div", { className: EXPANDABLE_FACE_CLIP_CLASS, children }) : null
131
131
  }
132
132
  );
133
133
  }
@@ -1,5 +1,6 @@
1
1
  import { MessageBannerGridSlots } from '../utils/messageBannerGridLayout.js';
2
2
  import { ExpandableSize, ExpandableVariant, KitExpandableVariant } from './expandableTypes.js';
3
+ export declare const EXPANDABLE_FACE_CLIP_CLASS = "overflow-hidden rounded-[inherit]";
3
4
  export declare const EXPANDABLE_ROOT_BASE_CLASS = "rounded-mid text-start text-foreground";
4
5
  export declare const EXPANDABLE_VARIANT_SURFACE: Record<KitExpandableVariant, string>;
5
6
  export declare const EXPANDABLE_TRIGGER_BASE_CLASS = "relative w-full overflow-hidden rounded-[inherit] text-start outline-none focus-ring";
@@ -11,7 +12,7 @@ export declare const EXPANDABLE_COMPOUND_CONTENTS_CLASS = "contents";
11
12
  export declare const EXPANDABLE_TRIGGER_CHEVRON_WRAP_CLASS = "relative z-[1] flex shrink-0 origin-center self-center";
12
13
  export declare const EXPANDABLE_CHEVRON_SVG_CLASS = "shrink-0";
13
14
  export declare const EXPANDABLE_MESSAGE_CLASS = "contents";
14
- export declare const EXPANDABLE_ICON_BASE_CLASS = "icon-slot shrink-0 text-primary";
15
+ export declare const EXPANDABLE_ICON_BASE_CLASS = "icon-slot inline-flex h-[length:var(--icon-size)] w-[length:var(--icon-size)] shrink-0 items-center justify-center text-primary";
15
16
  export declare const EXPANDABLE_CONTENT_CLASS = "contents";
16
17
  export declare const EXPANDABLE_DESCRIPTION_CLASS = "text-muted";
17
18
  export declare const EXPANDABLE_TITLE_CLASS = "font-w-mid";
@@ -5,6 +5,7 @@ import { KIT_EXPANDABLE_VARIANTS } from "./expandableTypes.js";
5
5
  import { collapsibleSizeLayout } from "../utils/sizeLayout/collapsible.js";
6
6
  import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
7
7
  import { iconSlotSizeClass } from "../utils/sizeLayout/iconSlot.js";
8
+ const EXPANDABLE_FACE_CLIP_CLASS = "overflow-hidden rounded-[inherit]";
8
9
  const EXPANDABLE_ROOT_BASE_CLASS = "rounded-mid text-start text-foreground";
9
10
  const EXPANDABLE_VARIANT_SURFACE = {
10
11
  default: "border-token bg-surface",
@@ -19,7 +20,7 @@ const EXPANDABLE_COMPOUND_CONTENTS_CLASS = "contents";
19
20
  const EXPANDABLE_TRIGGER_CHEVRON_WRAP_CLASS = "relative z-[1] flex shrink-0 origin-center self-center";
20
21
  const EXPANDABLE_CHEVRON_SVG_CLASS = "shrink-0";
21
22
  const EXPANDABLE_MESSAGE_CLASS = EXPANDABLE_COMPOUND_CONTENTS_CLASS;
22
- const EXPANDABLE_ICON_BASE_CLASS = "icon-slot shrink-0 text-primary";
23
+ const EXPANDABLE_ICON_BASE_CLASS = "icon-slot inline-flex h-[length:var(--icon-size)] w-[length:var(--icon-size)] shrink-0 items-center justify-center text-primary";
23
24
  const EXPANDABLE_CONTENT_CLASS = EXPANDABLE_COMPOUND_CONTENTS_CLASS;
24
25
  const EXPANDABLE_DESCRIPTION_CLASS = "text-muted";
25
26
  const EXPANDABLE_TITLE_CLASS = "font-w-mid";
@@ -108,6 +109,7 @@ export {
108
109
  EXPANDABLE_COMPOUND_CONTENTS_CLASS,
109
110
  EXPANDABLE_CONTENT_CLASS,
110
111
  EXPANDABLE_DESCRIPTION_CLASS,
112
+ EXPANDABLE_FACE_CLIP_CLASS,
111
113
  EXPANDABLE_ICON_BASE_CLASS,
112
114
  EXPANDABLE_MESSAGE_CLASS,
113
115
  EXPANDABLE_PANEL_SHELL_CLASS,
@@ -1,10 +1,13 @@
1
- import { POPOVER_TRIGGER_CLASS } from "../Popover/popoverStyles.js";
2
1
  import { cn } from "../../../utils/cn.js";
3
2
  function hoverCardTriggerClass({
4
3
  slotClass,
5
4
  className
6
5
  }) {
7
- return cn(POPOVER_TRIGGER_CLASS, slotClass, className);
6
+ return cn(
7
+ "inline-flex shrink-0 border-0 bg-transparent outline-none focus-ring",
8
+ slotClass,
9
+ className
10
+ );
8
11
  }
9
12
  export {
10
13
  hoverCardTriggerClass
@@ -15,7 +15,7 @@ import { resolveInputMotionDefaults, resolveInputMotionParams, useInputShellAnim
15
15
  import { inputSizeFromButtonSize, assignInputFiles, isImageFile } from "./inputAPI.js";
16
16
  import { AffixSlot, InputFileRow, FileGlyph, FileRemoveButton, PasswordVisibilityAffix } from "./inputAffixParts.js";
17
17
  import { useOptionalInputFieldContext, useInputClassNames, useOptionalInputMotionScope, InputMotionProvider } from "./inputContext.js";
18
- import { inputShellSurfaceClass, inputFileEmptySurfaceClass, INPUT_FILE_EMPTY_ICON_CLASS, INPUT_FILE_EMPTY_TEXT_CLASS, INPUT_FILE_PREVIEW_CLASS, INPUT_FILE_NAME_CLASS, INPUT_FILE_ROW_CLASS, INPUT_FILE_ROW_SINGLE_CLASS, INPUT_FILE_INPUT_CLASS, inputFileEmptyAreaClass, inputFileFilledAreaClass, inputShellClass, INPUT_CONTROL_PAD, INPUT_CONTROL_BASE_CLASS } from "./inputStyles.js";
18
+ import { inputShellSurfaceClass, inputFileEmptySurfaceClass, INPUT_FILE_EMPTY_ICON_CLASS, INPUT_FILE_EMPTY_TEXT_CLASS, INPUT_FILE_PREVIEW_CLASS, INPUT_FILE_NAME_CLASS, INPUT_FILE_ROW_CLASS, INPUT_FILE_ROW_SINGLE_CLASS, INPUT_FILE_INPUT_CLASS, inputFileEmptyAreaClass, inputFileFilledAreaClass, inputShellClipClass, inputShellClass, INPUT_CONTROL_PAD, INPUT_CONTROL_BASE_CLASS } from "./inputStyles.js";
19
19
  import { cn } from "../../../utils/cn.js";
20
20
  import { mergeMotionSlotMaps } from "../utils/slotMotion/resolveMotionValue.js";
21
21
  import { mergeMotionRootSiblings } from "../utils/slotMotion/motionEvents.js";
@@ -378,7 +378,7 @@ function InputControlSurface({
378
378
  const fileListEmpty = isFile && pickedFilesLength === 0;
379
379
  const shellSurface = inputShellSurfaceClass({ variant });
380
380
  const shellFileEmptySurface = fileListEmpty ? inputFileEmptySurfaceClass(shellSurface) : null;
381
- return /* @__PURE__ */ jsxs(
381
+ return /* @__PURE__ */ jsx(
382
382
  "div",
383
383
  {
384
384
  ref: bindShellRef,
@@ -402,7 +402,7 @@ function InputControlSurface({
402
402
  }),
403
403
  style: mergeSkinSurfaceStyle(surfaceStyle),
404
404
  ...dataVariantProps({ size, variant }),
405
- children: [
405
+ children: /* @__PURE__ */ jsxs("div", { className: inputShellClipClass(variant), children: [
406
406
  showAffixes && prefix != null ? /* @__PURE__ */ jsx(AffixSlot, { side: "prefix", controlSize: size, children: prefix }) : null,
407
407
  isFile ? /* @__PURE__ */ jsxs(
408
408
  "div",
@@ -542,7 +542,7 @@ function InputControlSurface({
542
542
  onToggle: onTogglePassword
543
543
  }
544
544
  ) : null
545
- ]
545
+ ] })
546
546
  }
547
547
  );
548
548
  }
@@ -2,7 +2,9 @@ import { ButtonGroupSegment } from '../../composite/ButtonGroup/buttonGroupTypes
2
2
  import { FieldShellStatus } from '../utils/fieldShellVariant.js';
3
3
  import { InputSize, InputVariant } from './inputTypes.js';
4
4
  export declare const INPUT_AFFIX_SURFACE_CLASS = "bg-primary-tint";
5
- export declare const INPUT_SHELL_BASE_CLASS = "flex items-stretch overflow-hidden";
5
+ export declare const INPUT_SHELL_BASE_CLASS = "flex items-stretch";
6
+ /** Clips prefix/suffix tint to the shell's inner curve. Shadow layers stay on the shell. */
7
+ export declare function inputShellClipClass(variant: InputVariant): string;
6
8
  export declare const INPUT_CONTROL_BASE_CLASS = "min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted field-control-mobile-no-zoom";
7
9
  export declare const INPUT_FILE_INPUT_CLASS = "absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed field-control-mobile-no-zoom";
8
10
  export declare const INPUT_FILE_EMPTY_ICON_CLASS = "pointer-events-none size-12 shrink-0 text-muted";
@@ -9,7 +9,13 @@ import { cn } from "../../../utils/cn.js";
9
9
  import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
10
10
  import { affixToggleMinWClass, affixSlotClass } from "../utils/inputAffixStyles.js";
11
11
  const INPUT_AFFIX_SURFACE_CLASS = "bg-primary-tint";
12
- const INPUT_SHELL_BASE_CLASS = "flex items-stretch overflow-hidden";
12
+ const INPUT_SHELL_BASE_CLASS = "flex items-stretch";
13
+ function inputShellClipClass(variant) {
14
+ return cn(
15
+ "field-radius-clip flex min-w-0 flex-1 items-stretch",
16
+ variant === "outline" && "field-radius-clip-outline"
17
+ );
18
+ }
13
19
  const INPUT_CONTROL_BASE_CLASS = `min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS}`;
14
20
  const INPUT_FILE_INPUT_CLASS = `absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed ${FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS}`;
15
21
  const INPUT_FILE_EMPTY_ICON_CLASS = "pointer-events-none size-12 shrink-0 text-muted";
@@ -196,6 +202,7 @@ export {
196
202
  inputFileRemoveButtonClass,
197
203
  inputPasswordToggleButtonClass,
198
204
  inputShellClass,
205
+ inputShellClipClass,
199
206
  inputShellRoundingClass,
200
207
  inputShellSurfaceClass
201
208
  };