burne-ui 2.0.1 → 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.
- package/cli/tailwind.css +2 -2
- package/dist/components/composite/ButtonGroup/buttonGroupStyles.d.ts +1 -1
- package/dist/components/composite/ButtonGroup/buttonGroupStyles.js +7 -2
- package/dist/components/core/Badge/badgeStyles.d.ts +6 -1
- package/dist/components/core/Badge/badgeStyles.js +2 -2
- package/dist/components/core/Button/useButtonRootState.js +5 -2
- package/dist/components/core/ComboBox/comboBoxStyles.d.ts +2 -2
- package/dist/components/core/ComboBox/comboBoxStyles.js +2 -2
- package/dist/components/core/Disclosure/disclosureAnimations.js +9 -3
- package/dist/components/core/Disclosure/disclosureStyles.js +2 -1
- package/dist/components/core/Dropdown/dropdownAnimations.js +5 -3
- package/dist/components/core/Expandable/Expandable.js +2 -2
- package/dist/components/core/Expandable/expandableStyles.d.ts +2 -1
- package/dist/components/core/Expandable/expandableStyles.js +3 -1
- package/dist/components/core/HoverCard/hoverCardStyles.js +5 -2
- package/dist/components/core/Input/inputStyles.d.ts +1 -1
- package/dist/components/core/Input/inputStyles.js +1 -1
- package/dist/components/core/NumberInput/numberInputStyles.js +1 -1
- package/dist/components/core/Popover/popoverStyles.js +3 -3
- package/dist/components/core/SearchInput/searchInputStyles.d.ts +1 -1
- package/dist/components/core/SearchInput/searchInputStyles.js +1 -1
- package/dist/components/core/Select/selectStyles.d.ts +3 -3
- package/dist/components/core/Select/selectStyles.js +3 -3
- package/dist/components/core/Slider/sliderTypes.d.ts +1 -1
- package/dist/components/core/Slider/useSliderTrackState.js +1 -0
- package/dist/components/core/Stepper/Stepper.js +1 -1
- package/dist/components/core/Stepper/stepperAnimations.d.ts +9 -3
- package/dist/components/core/Stepper/stepperAnimations.js +32 -1
- package/dist/components/core/Stepper/stepperParts.js +32 -5
- package/dist/components/core/Stepper/stepperTypes.d.ts +3 -1
- package/dist/components/core/TextArea/textAreaStyles.js +1 -1
- package/dist/components/core/TimeField/timeFieldStyles.js +1 -1
- package/dist/components/core/ToggleButton/toggleButtonParts.js +3 -3
- package/dist/components/core/ToggleButton/toggleButtonStyles.d.ts +6 -1
- package/dist/components/core/ToggleButton/toggleButtonStyles.js +16 -3
- package/dist/components/core/utils/motionConfig.d.ts +18 -17
- package/dist/components/core/utils/motionConfig.js +38 -10
- package/dist/components/core/utils/motionConfigValidation.js +0 -1
- package/dist/components/core/utils/slotMotion/useMotionPart.js +1 -1
- package/dist/studio/themePresets.js +0 -7
- package/dist/studio/themeTokenSchema.js +2 -3
- package/dist/theme/themeConfig.d.ts +1 -1
- package/dist/theme/themeConfig.js +0 -1
- package/dist/theme/themeDefaults.d.ts +0 -3
- package/dist/theme/themeDefaults.js +15 -9
- package/dist/tokens/config.d.ts +1 -1
- package/dist/ui.css +62 -8
- 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-
|
|
183
|
-
border-color var(--motion-surface-duration) var(--motion-
|
|
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
|
|
|
@@ -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
|
-
/**
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
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 ?
|
|
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(
|
|
@@ -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
|
|
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
|
|
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,8 +26,10 @@ function resolveDisclosureMotionDefaults(variant) {
|
|
|
26
26
|
}
|
|
27
27
|
} : {},
|
|
28
28
|
titleLift: {
|
|
29
|
-
|
|
30
|
-
|
|
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, {
|
|
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
|
-
|
|
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
|
|
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 =
|
|
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,
|
|
232
|
+
left = Math.max(12, edge.left - estW - gap);
|
|
231
233
|
}
|
|
232
234
|
const panel = panelRef.current;
|
|
233
235
|
const ph = panel?.offsetHeight ?? 0;
|
|
@@ -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(
|
|
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
|
|
@@ -2,7 +2,7 @@ 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
|
|
5
|
+
export declare const INPUT_SHELL_BASE_CLASS = "flex items-stretch";
|
|
6
6
|
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
7
|
export declare const INPUT_FILE_INPUT_CLASS = "absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed field-control-mobile-no-zoom";
|
|
8
8
|
export declare const INPUT_FILE_EMPTY_ICON_CLASS = "pointer-events-none size-12 shrink-0 text-muted";
|
|
@@ -9,7 +9,7 @@ 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
|
|
12
|
+
const INPUT_SHELL_BASE_CLASS = "flex items-stretch";
|
|
13
13
|
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
14
|
const INPUT_FILE_INPUT_CLASS = `absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed ${FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS}`;
|
|
15
15
|
const INPUT_FILE_EMPTY_ICON_CLASS = "pointer-events-none size-12 shrink-0 text-muted";
|
|
@@ -52,7 +52,7 @@ function numberInputShellClass({
|
|
|
52
52
|
}) {
|
|
53
53
|
const kitSurface = usesKitElevation(variant, KIT_INPUT_VARIANTS);
|
|
54
54
|
return cn(
|
|
55
|
-
"relative flex w-full min-w-0 items-stretch
|
|
55
|
+
"relative flex w-full min-w-0 items-stretch rounded-base border-1",
|
|
56
56
|
NUMBER_INPUT_SHELL_MIN[size],
|
|
57
57
|
numberInputShellSurface(variant),
|
|
58
58
|
fieldShellFocusRingClass(status),
|
|
@@ -27,9 +27,9 @@ const POPOVER_CONTENT_CLASS = "pointer-events-auto z-popover w-max min-w-0 overf
|
|
|
27
27
|
const POPOVER_PANEL_RELATIVE_CLASS = "relative overflow-visible";
|
|
28
28
|
const POPOVER_PANEL_BASE_CLASS = "relative z-[1] flex min-w-0 flex-col overflow-hidden text-foreground";
|
|
29
29
|
const POPOVER_PANEL_SURFACE = {
|
|
30
|
-
default: "border-token bg-surface shadow-token-
|
|
31
|
-
outline: "bg-transparent border-token-outline text-foreground shadow-token-
|
|
32
|
-
secondary: "bg-secondary border-token text-secondary-foreground shadow-token-
|
|
30
|
+
default: "border-token bg-surface shadow-token-mid",
|
|
31
|
+
outline: "bg-transparent border-token-outline text-foreground shadow-token-mid",
|
|
32
|
+
secondary: "bg-secondary border-token text-secondary-foreground shadow-token-mid"
|
|
33
33
|
};
|
|
34
34
|
const POPOVER_ARROW_BASE_CLASS = "pointer-events-none absolute z-0 size-2 rotate-45";
|
|
35
35
|
const POPOVER_ARROW_FILL = {
|
|
@@ -9,7 +9,7 @@ export declare const SEARCH_INPUT_CONTROL_EXPANDED_CLASS = "pointer-events-auto
|
|
|
9
9
|
export declare const SEARCH_INPUT_CONTROL_COLLAPSED_CLASS = "pointer-events-none absolute inset-0 z-[2] opacity-0";
|
|
10
10
|
export declare const SEARCH_INPUT_CLEAR_BUTTON_CLASS = "absolute top-1/2 z-[3] flex -translate-y-1/2 items-center justify-center rounded-full border-0 bg-transparent p-0 text-foreground outline-none focus-ring-inset cursor-pointer";
|
|
11
11
|
export declare const SEARCH_INPUT_CLEAR_ICON_CLASS = "shrink-0";
|
|
12
|
-
export declare const SEARCH_INPUT_ROOT_BASE_CLASS = "relative box-border inline-block
|
|
12
|
+
export declare const SEARCH_INPUT_ROOT_BASE_CLASS = "relative box-border inline-block text-start";
|
|
13
13
|
export declare const SEARCH_INPUT_ROOT_BORDER_CLASS = "border-1 border-token";
|
|
14
14
|
export declare const SEARCH_INPUT_ROOT_COLLAPSED_ROUNDED_CLASS = "rounded-full";
|
|
15
15
|
export declare const SEARCH_INPUT_CURSOR_TEXT_CLASS = "cursor-text";
|
|
@@ -15,7 +15,7 @@ const SEARCH_INPUT_CONTROL_EXPANDED_CLASS = "pointer-events-auto absolute inset-
|
|
|
15
15
|
const SEARCH_INPUT_CONTROL_COLLAPSED_CLASS = "pointer-events-none absolute inset-0 z-[2] opacity-0";
|
|
16
16
|
const SEARCH_INPUT_CLEAR_BUTTON_CLASS = "absolute top-1/2 z-[3] flex -translate-y-1/2 items-center justify-center rounded-full border-0 bg-transparent p-0 text-foreground outline-none focus-ring-inset cursor-pointer";
|
|
17
17
|
const SEARCH_INPUT_CLEAR_ICON_CLASS = "shrink-0";
|
|
18
|
-
const SEARCH_INPUT_ROOT_BASE_CLASS = "relative box-border inline-block
|
|
18
|
+
const SEARCH_INPUT_ROOT_BASE_CLASS = "relative box-border inline-block text-start";
|
|
19
19
|
const SEARCH_INPUT_ROOT_BORDER_CLASS = "border-1 border-token";
|
|
20
20
|
const SEARCH_INPUT_ROOT_COLLAPSED_ROUNDED_CLASS = "rounded-full";
|
|
21
21
|
const SEARCH_INPUT_CURSOR_TEXT_CLASS = "cursor-text";
|
|
@@ -3,12 +3,12 @@ import { InputSize, InputVariant } from '../Input/index.js';
|
|
|
3
3
|
import { FieldShellStatus } from '../utils/fieldShellVariant.js';
|
|
4
4
|
export declare const SELECT_VALUE_CONTROL: Record<InputSize, string>;
|
|
5
5
|
export declare const SELECT_CHEVRON_ICON_SLOT: Record<InputSize, string>;
|
|
6
|
-
export declare const SELECT_TRIGGER_GROUP_BASE_CLASS = "relative z-0 flex min-w-0 items-stretch border-1 text-start
|
|
6
|
+
export declare const SELECT_TRIGGER_GROUP_BASE_CLASS = "relative z-0 flex min-w-0 items-stretch border-1 text-start motion-reduce:transition-none";
|
|
7
7
|
export declare const SELECT_CLEAR_CLASS = "inline-flex shrink-0 items-center self-center text-muted icon-slot icon-slot-base focus-ring";
|
|
8
8
|
export declare function selectClearClass(size: InputSize): string;
|
|
9
|
-
export declare const SELECT_VALUE_BASE_CLASS = "min-w-0 flex-1 truncate bg-transparent text-start text-foreground outline-none";
|
|
9
|
+
export declare const SELECT_VALUE_BASE_CLASS = "min-w-0 flex-1 cursor-pointer truncate bg-transparent text-start text-foreground outline-none disabled:cursor-not-allowed";
|
|
10
10
|
export declare const SELECT_VALUE_MUTED_CLASS = "text-muted";
|
|
11
|
-
export declare const SELECT_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";
|
|
11
|
+
export declare const SELECT_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";
|
|
12
12
|
export declare const SELECT_TRIGGER_DISABLED_CLASS = "pointer-events-none";
|
|
13
13
|
/** Same band as Popover; above Dialog when sharing a stacking context (not `showModal` top layer). */
|
|
14
14
|
export declare const SELECT_POPOVER_CLASS = "z-popover";
|
|
@@ -18,7 +18,7 @@ const SELECT_CHEVRON_ICON_SLOT = {
|
|
|
18
18
|
mid: iconSlotClass("mid"),
|
|
19
19
|
large: iconSlotClass("large")
|
|
20
20
|
};
|
|
21
|
-
const SELECT_TRIGGER_GROUP_BASE_CLASS = "relative z-0 flex min-w-0 items-stretch border-1 text-start
|
|
21
|
+
const SELECT_TRIGGER_GROUP_BASE_CLASS = "relative z-0 flex min-w-0 items-stretch border-1 text-start motion-reduce:transition-none";
|
|
22
22
|
const SELECT_CLEAR_CLASS = "inline-flex shrink-0 items-center self-center text-muted icon-slot icon-slot-base focus-ring";
|
|
23
23
|
const SELECT_CLEAR_END_PAD = {
|
|
24
24
|
small: "pe-base",
|
|
@@ -29,9 +29,9 @@ const SELECT_CLEAR_END_PAD = {
|
|
|
29
29
|
function selectClearClass(size) {
|
|
30
30
|
return cn(SELECT_CLEAR_CLASS, SELECT_CLEAR_END_PAD[size]);
|
|
31
31
|
}
|
|
32
|
-
const SELECT_VALUE_BASE_CLASS = "min-w-0 flex-1 truncate bg-transparent text-start text-foreground outline-none";
|
|
32
|
+
const SELECT_VALUE_BASE_CLASS = "min-w-0 flex-1 cursor-pointer truncate bg-transparent text-start text-foreground outline-none disabled:cursor-not-allowed";
|
|
33
33
|
const SELECT_VALUE_MUTED_CLASS = "text-muted";
|
|
34
|
-
const SELECT_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";
|
|
34
|
+
const SELECT_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";
|
|
35
35
|
const SELECT_TRIGGER_DISABLED_CLASS = "pointer-events-none";
|
|
36
36
|
const SELECT_POPOVER_CLASS = "z-popover";
|
|
37
37
|
const SELECT_POPOVER_BODY_CLASS = "gap-0 p-base";
|
|
@@ -232,7 +232,7 @@ export type FillSpan = {
|
|
|
232
232
|
end: number;
|
|
233
233
|
};
|
|
234
234
|
/** DOM rest of `Slider.Track` after the hook reads its own props. */
|
|
235
|
-
export type SliderTrackRestProps = Omit<SliderTrackProps, "orientation" | "size" | "thickness" | "min" | "max" | "step" | "marks" | "formatValue" | "icon" | "variant" | "disabled" | "readOnly" | "className" | "style" | "classNames" | "aria-label" | "aria-labelledby" | "range" | "children" | "onPointerDown" | "value" | "defaultValue" | "onValueChange" | "motion" | "motionController" | "motionState" | "motionPayload" | "playInitialState">;
|
|
235
|
+
export type SliderTrackRestProps = Omit<SliderTrackProps, "orientation" | "size" | "thickness" | "min" | "max" | "step" | "marks" | "formatValue" | "icon" | "variant" | "disabled" | "readOnly" | "className" | "style" | "classNames" | "aria-label" | "aria-labelledby" | "range" | "children" | "onPointerDown" | "value" | "defaultValue" | "onValueChange" | "onValueCommit" | "motion" | "motionController" | "motionState" | "motionPayload" | "playInitialState">;
|
|
236
236
|
/** Named so declaration emit does not inline `CSSProperties`. */
|
|
237
237
|
export type UseSliderTrackStateResult = {
|
|
238
238
|
setTrackRef: (node: HTMLDivElement | null) => void;
|
|
@@ -13,7 +13,7 @@ const StepperRoot = forwardRef(function StepperRoot2(props, ref) {
|
|
|
13
13
|
{
|
|
14
14
|
motion: state.motion,
|
|
15
15
|
defaults: motionDefaults,
|
|
16
|
-
params: {},
|
|
16
|
+
params: { hasHoverShadow: true },
|
|
17
17
|
controller: state.motionController,
|
|
18
18
|
motionState: state.motionState,
|
|
19
19
|
motionPayload: state.motionPayload,
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { ForwardedRef, PointerEventHandler } from 'react';
|
|
1
|
+
import { ForwardedRef, PointerEventHandler, RefObject } from 'react';
|
|
2
2
|
import { StepperMotion, StepperPartMotion } from './stepperTypes.js';
|
|
3
3
|
export declare function resolveStepperMotionDefaults(): StepperMotion;
|
|
4
|
+
/** Hover and press on the step mark, from the trigger that wraps the label. */
|
|
5
|
+
export declare function useStepperIndicatorPointer(indicatorRef: RefObject<HTMLElement | null>, enabled: boolean): {
|
|
6
|
+
onPointerOver: () => void;
|
|
7
|
+
onPointerOut: () => void;
|
|
8
|
+
onPointerDown: () => void;
|
|
9
|
+
};
|
|
4
10
|
type PointerProps<T extends HTMLElement> = {
|
|
5
11
|
forwardedRef?: ForwardedRef<T>;
|
|
6
12
|
onPointerOver?: PointerEventHandler<T>;
|
|
@@ -10,7 +16,7 @@ type PointerProps<T extends HTMLElement> = {
|
|
|
10
16
|
};
|
|
11
17
|
export declare function useStepperRootMotion(props: PointerProps<HTMLOListElement>): {
|
|
12
18
|
setRef: (node: HTMLOListElement | null) => void;
|
|
13
|
-
targetRef:
|
|
19
|
+
targetRef: RefObject<HTMLOListElement | null>;
|
|
14
20
|
pointerHandlers: {
|
|
15
21
|
onPointerOver: (e: import('react').PointerEvent<HTMLOListElement>) => void;
|
|
16
22
|
onPointerOut: (e: import('react').PointerEvent<HTMLOListElement>) => void;
|
|
@@ -23,7 +29,7 @@ export declare function useStepperSlotMotion<T extends HTMLElement>({ slot, moti
|
|
|
23
29
|
motion?: StepperPartMotion;
|
|
24
30
|
}): {
|
|
25
31
|
setRef: (node: T | null) => void;
|
|
26
|
-
targetRef:
|
|
32
|
+
targetRef: RefObject<T | null>;
|
|
27
33
|
pointerHandlers: {
|
|
28
34
|
onPointerOver: (e: import('react').PointerEvent<T>) => void;
|
|
29
35
|
onPointerOut: (e: import('react').PointerEvent<T>) => void;
|
|
@@ -1,8 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { bindLiftRecipes } from "../utils/slotMotion/recipes/bindLift.js";
|
|
1
4
|
import { useOptionalStepperMotionScope } from "./stepperContext.js";
|
|
2
5
|
import { hasPointerPhases, useOptionalEnterOnMount } from "../utils/slotMotion/useSlotLifecycle.js";
|
|
3
6
|
import { useMotionPart } from "../utils/slotMotion/useMotionPart.js";
|
|
7
|
+
bindLiftRecipes();
|
|
4
8
|
function resolveStepperMotionDefaults() {
|
|
5
|
-
return {
|
|
9
|
+
return {
|
|
10
|
+
indicator: {
|
|
11
|
+
hoverIn: "hoverLiftFirstLevel",
|
|
12
|
+
hoverOut: "hoverLiftFirstLevel",
|
|
13
|
+
pressIn: "pressSqueeze",
|
|
14
|
+
pressOut: false
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function useStepperIndicatorPointer(indicatorRef, enabled) {
|
|
19
|
+
const scope = useOptionalStepperMotionScope();
|
|
20
|
+
const play = useCallback(
|
|
21
|
+
(phase) => {
|
|
22
|
+
if (!enabled) return;
|
|
23
|
+
const el = indicatorRef.current;
|
|
24
|
+
if (!el || !scope) return;
|
|
25
|
+
const value = scope.resolve("indicator", phase);
|
|
26
|
+
if (value === void 0 || value === false) return;
|
|
27
|
+
scope.play("indicator", phase, { el });
|
|
28
|
+
},
|
|
29
|
+
[enabled, indicatorRef, scope]
|
|
30
|
+
);
|
|
31
|
+
return {
|
|
32
|
+
onPointerOver: () => play("hoverIn"),
|
|
33
|
+
onPointerOut: () => play("hoverOut"),
|
|
34
|
+
onPointerDown: () => play("pressIn")
|
|
35
|
+
};
|
|
6
36
|
}
|
|
7
37
|
function useStepperRootMotion(props) {
|
|
8
38
|
const scope = useOptionalStepperMotionScope();
|
|
@@ -49,6 +79,7 @@ function useStepperSlotMotion({
|
|
|
49
79
|
}
|
|
50
80
|
export {
|
|
51
81
|
resolveStepperMotionDefaults,
|
|
82
|
+
useStepperIndicatorPointer,
|
|
52
83
|
useStepperRootMotion,
|
|
53
84
|
useStepperSlotMotion
|
|
54
85
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, Children, isValidElement, cloneElement } from "react";
|
|
3
|
+
import { forwardRef, useRef, Children, isValidElement, cloneElement } from "react";
|
|
4
4
|
import { dataFlag } from "../utils/dataContract.js";
|
|
5
5
|
import { focusKeyboard } from "../utils/focusElement.js";
|
|
6
6
|
import { KitCheckmarkSharp } from "../utils/kitIcons.js";
|
|
7
7
|
import { mergeRefs } from "../utils/mergeRefs.js";
|
|
8
8
|
import { stepperKeyDelta, stepperCurrent } from "./stepperA11y.js";
|
|
9
|
-
import { useStepperSlotMotion, useStepperRootMotion } from "./stepperAnimations.js";
|
|
9
|
+
import { useStepperSlotMotion, useStepperIndicatorPointer, useStepperRootMotion } from "./stepperAnimations.js";
|
|
10
10
|
import { stepperStepState, stepperStepSelectable, isStepperTrigger, isStepperItem } from "./stepperAPI.js";
|
|
11
11
|
import { useStepperContext, useStepperClassNames, useStepperItemContext, StepperItemProvider } from "./stepperContext.js";
|
|
12
12
|
import { stepperDescriptionClass, stepperTitleClass, stepperIconClass, stepperIndicatorClass, stepperTriggerClass, stepperItemClass, stepperRootClass, stepperSeparatorClass } from "./stepperStyles.js";
|
|
@@ -29,7 +29,9 @@ const StepperIndicator = forwardRef(
|
|
|
29
29
|
return /* @__PURE__ */ jsx(
|
|
30
30
|
"span",
|
|
31
31
|
{
|
|
32
|
-
ref: part.setRef,
|
|
32
|
+
ref: mergeRefs(part.setRef, (node) => {
|
|
33
|
+
item.indicatorRef.current = node;
|
|
34
|
+
}),
|
|
33
35
|
...dom,
|
|
34
36
|
...part.pointerHandlers,
|
|
35
37
|
className: stepperIndicatorClass(orientation, size, slotClass, className),
|
|
@@ -100,10 +102,21 @@ function StepperSeparator() {
|
|
|
100
102
|
);
|
|
101
103
|
}
|
|
102
104
|
const StepperTrigger = forwardRef(
|
|
103
|
-
function StepperTrigger2({
|
|
105
|
+
function StepperTrigger2({
|
|
106
|
+
className,
|
|
107
|
+
children,
|
|
108
|
+
onClick,
|
|
109
|
+
onKeyDown,
|
|
110
|
+
onPointerEnter,
|
|
111
|
+
onPointerLeave,
|
|
112
|
+
onPointerDown,
|
|
113
|
+
onPointerUp,
|
|
114
|
+
...rest
|
|
115
|
+
}, ref) {
|
|
104
116
|
const root = useStepperContext();
|
|
105
117
|
const item = useStepperItemContext();
|
|
106
118
|
const slotClass = useStepperClassNames().trigger;
|
|
119
|
+
const mark = useStepperIndicatorPointer(item.indicatorRef, item.selectable);
|
|
107
120
|
const tabStop = item.selectable && (item.index === root.currentIndex || root.currentIndex < 0 && item.index === 0);
|
|
108
121
|
return /* @__PURE__ */ jsx(
|
|
109
122
|
"button",
|
|
@@ -117,6 +130,19 @@ const StepperTrigger = forwardRef(
|
|
|
117
130
|
...rest,
|
|
118
131
|
"data-value": item.value,
|
|
119
132
|
"data-disabled": dataFlag(!item.selectable),
|
|
133
|
+
onPointerEnter: (event) => {
|
|
134
|
+
onPointerEnter?.(event);
|
|
135
|
+
if (!event.defaultPrevented) mark.onPointerOver();
|
|
136
|
+
},
|
|
137
|
+
onPointerLeave: (event) => {
|
|
138
|
+
onPointerLeave?.(event);
|
|
139
|
+
if (!event.defaultPrevented) mark.onPointerOut();
|
|
140
|
+
},
|
|
141
|
+
onPointerDown: (event) => {
|
|
142
|
+
onPointerDown?.(event);
|
|
143
|
+
if (!event.defaultPrevented) mark.onPointerDown();
|
|
144
|
+
},
|
|
145
|
+
onPointerUp,
|
|
120
146
|
onClick: (event) => {
|
|
121
147
|
onClick?.(event);
|
|
122
148
|
if (event.defaultPrevented) return;
|
|
@@ -156,6 +182,7 @@ const StepperItem = forwardRef(
|
|
|
156
182
|
const slotClass = useStepperClassNames().item;
|
|
157
183
|
const state = stepperStepState(index, root.currentIndex);
|
|
158
184
|
const selectable = stepperStepSelectable(index, root.currentIndex, root.linear);
|
|
185
|
+
const indicatorRef = useRef(null);
|
|
159
186
|
const part = useStepperSlotMotion({
|
|
160
187
|
slot: "item",
|
|
161
188
|
motion,
|
|
@@ -173,7 +200,7 @@ const StepperItem = forwardRef(
|
|
|
173
200
|
...part.pointerHandlers,
|
|
174
201
|
className: stepperItemClass(root.orientation, isLast, slotClass, className),
|
|
175
202
|
"data-state": state,
|
|
176
|
-
children: /* @__PURE__ */ jsxs(StepperItemProvider, { value: { index, value, state, selectable, isLast }, children: [
|
|
203
|
+
children: /* @__PURE__ */ jsxs(StepperItemProvider, { value: { index, value, state, selectable, isLast, indicatorRef }, children: [
|
|
177
204
|
Children.toArray(children).some(isStepperTrigger) ? children : /* @__PURE__ */ jsx(StepperTrigger, { children: body }),
|
|
178
205
|
isLast ? null : /* @__PURE__ */ jsx(StepperSeparator, {})
|
|
179
206
|
] })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, HTMLAttributes, OlHTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, OlHTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { MotionController, MotionMapWithEvents, MotionStateHostProps, MotionValue } from '../utils/slotMotion/index.js';
|
|
3
3
|
import { Prettify } from '../../../utils/prettify.js';
|
|
4
4
|
import { ComponentSize } from '../utils/sizeLayout/index.js';
|
|
@@ -111,4 +111,6 @@ export type StepperItemContextValue = {
|
|
|
111
111
|
state: StepperStepState;
|
|
112
112
|
selectable: boolean;
|
|
113
113
|
isLast: boolean;
|
|
114
|
+
/** Step mark. The trigger plays hover / press on it. */
|
|
115
|
+
indicatorRef: RefObject<HTMLSpanElement | null>;
|
|
114
116
|
};
|
|
@@ -38,7 +38,7 @@ function textareaShellClass({
|
|
|
38
38
|
const visual = resolveVariantVisual(variant, KIT_TEXT_AREA_VARIANTS, "textArea.shell");
|
|
39
39
|
const kitSurface = usesKitElevation(variant, KIT_TEXT_AREA_VARIANTS);
|
|
40
40
|
return cn(
|
|
41
|
-
"relative w-full
|
|
41
|
+
"relative w-full rounded-base",
|
|
42
42
|
kitSurface && "border-1",
|
|
43
43
|
visual.className,
|
|
44
44
|
TEXTAREA_SHELL_LAYOUT_CLASS,
|
|
@@ -68,7 +68,7 @@ function timeFieldShellClass({
|
|
|
68
68
|
const visual = resolveVariantVisual(variant, KIT_TIME_FIELD_VARIANTS, "timeField.shell");
|
|
69
69
|
const kitSurface = usesKitElevation(variant, KIT_TIME_FIELD_VARIANTS);
|
|
70
70
|
return cn(
|
|
71
|
-
"relative m-0 min-w-0
|
|
71
|
+
"relative m-0 min-w-0 rounded-base p-0",
|
|
72
72
|
kitSurface && "border-1",
|
|
73
73
|
visual.className,
|
|
74
74
|
compact ? "w-fit shrink-0" : "w-full min-w-0",
|