burne-ui 2.0.2 → 2.0.4
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/templates/skin-tier-2/src/skin.css +1 -1
- package/cli/templates/skin-tier-3/src/skin.css +1 -1
- package/dist/components/composite/AlertDialog/alertDialogStyles.js +2 -2
- package/dist/components/composite/ButtonGroup/buttonGroupStyles.js +5 -2
- package/dist/components/core/Alert/alertStyles.js +2 -3
- package/dist/components/core/Avatar/avatarStyles.js +2 -2
- package/dist/components/core/Badge/badgeStyles.js +5 -4
- package/dist/components/core/Button/buttonStyles.js +3 -5
- package/dist/components/core/Calendar/calendarParts.js +15 -13
- package/dist/components/core/Calendar/calendarStyles.d.ts +5 -2
- package/dist/components/core/Calendar/calendarStyles.js +5 -5
- package/dist/components/core/Card/cardStyles.js +1 -0
- package/dist/components/core/CloseButton/closeButtonStyles.js +1 -0
- package/dist/components/core/ComboBox/comboBoxStyles.js +2 -3
- package/dist/components/core/DatePicker/datePickerAnimations.d.ts +2 -0
- package/dist/components/core/DatePicker/datePickerAnimations.js +31 -2
- package/dist/components/core/DatePicker/datePickerParts.js +20 -2
- package/dist/components/core/DatePicker/datePickerStyles.js +2 -3
- package/dist/components/core/Dialog/dialogStyles.js +2 -2
- package/dist/components/core/Disclosure/disclosureStyles.js +5 -3
- package/dist/components/core/Drawer/drawerStyles.js +2 -2
- package/dist/components/core/Dropdown/dropdownStyles.d.ts +1 -1
- package/dist/components/core/Dropdown/dropdownStyles.js +3 -3
- package/dist/components/core/Expandable/expandableStyles.js +2 -2
- package/dist/components/core/Input/inputControlParts.js +4 -4
- package/dist/components/core/Input/inputStyles.d.ts +2 -0
- package/dist/components/core/Input/inputStyles.js +9 -3
- package/dist/components/core/Kbd/kbdStyles.js +2 -3
- package/dist/components/core/ListBox/listBoxStyles.js +2 -2
- package/dist/components/core/NumberInput/numberInputAnimations.d.ts +21 -21
- package/dist/components/core/NumberInput/numberInputAnimations.js +22 -4
- package/dist/components/core/NumberInput/numberInputStyles.js +2 -3
- package/dist/components/core/PinInput/pinInputStyles.js +9 -4
- package/dist/components/core/Popover/popoverStyles.js +3 -3
- package/dist/components/core/SearchInput/searchInputStyles.js +1 -0
- package/dist/components/core/Select/selectStyles.js +2 -3
- package/dist/components/core/SelectionIndicator/selectionIndicatorStyles.js +6 -13
- package/dist/components/core/SelectionThumb/selectionThumbStyles.js +3 -4
- package/dist/components/core/Slider/sliderStyles.js +3 -2
- package/dist/components/core/Surface/surfaceStyles.js +2 -3
- package/dist/components/core/Switch/switchStyles.js +3 -4
- package/dist/components/core/Table/tableParts.js +21 -3
- package/dist/components/core/Table/tableStyles.d.ts +10 -1
- package/dist/components/core/Table/tableStyles.js +13 -7
- package/dist/components/core/Tabs/tabsStyles.js +4 -3
- package/dist/components/core/TagsInput/tagsInputStyles.js +2 -3
- package/dist/components/core/TextArea/textAreaStyles.js +1 -0
- package/dist/components/core/TimeField/timeFieldStyles.d.ts +5 -2
- package/dist/components/core/TimeField/timeFieldStyles.js +3 -1
- package/dist/components/core/Toast/toastStyles.js +2 -2
- package/dist/components/core/ToggleButton/toggleButtonStyles.js +1 -0
- package/dist/components/core/Tooltip/tooltipStyles.d.ts +1 -1
- package/dist/components/core/Tooltip/tooltipStyles.js +4 -4
- package/dist/components/core/utils/sizeLayout/iconSlot.d.ts +1 -1
- package/dist/skins/resolveVariantVisual.d.ts +6 -0
- package/dist/skins/resolveVariantVisual.js +7 -1
- package/dist/ui.css +43 -19
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { alertIndicatorWrapperTextClass, alertSurfaceClass } from "../../core/Alert/alertStyles.js";
|
|
2
2
|
import { KIT_ALERT_VARIANTS } from "../../core/Alert/alertTypes.js";
|
|
3
3
|
import { dialogOverlayEnterStyle, dialogOverlayClass } from "../../core/Dialog/dialogStyles.js";
|
|
4
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
4
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
5
5
|
import { cn } from "../../../utils/cn.js";
|
|
6
6
|
import { panelSizeLayout, PANEL_SIZE_LAYOUT } from "../../core/utils/sizeLayout/panel.js";
|
|
7
7
|
const ALERT_DIALOG_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col text-start";
|
|
@@ -83,7 +83,7 @@ function alertDialogPanelClass({
|
|
|
83
83
|
sizePreset.rounded,
|
|
84
84
|
ALERT_DIALOG_PANEL_SURFACE_CLASS,
|
|
85
85
|
sizePreset.maxHeight,
|
|
86
|
-
visual
|
|
86
|
+
skinVisualClass(visual, alertDialogPanelSurfaceClass(variant)),
|
|
87
87
|
slotClass,
|
|
88
88
|
className
|
|
89
89
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KIT_BUTTON_VARIANTS } from "../../core/Button/buttonTypes.js";
|
|
2
|
-
import { usesKitElevation, resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { usesKitElevation, resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
4
|
import { CONTROL_SIZE_LAYOUT } from "../../core/utils/sizeLayout/control.js";
|
|
5
5
|
const BUTTON_GROUP_TEXT_VARIANT = {
|
|
@@ -74,7 +74,10 @@ function buttonGroupRootClass({
|
|
|
74
74
|
// border-color come from the root so `rounded-*` / `border-primary` on
|
|
75
75
|
// classNames.root retarget the visible frame without `after:*` overrides.
|
|
76
76
|
"relative rounded-base border-border",
|
|
77
|
-
|
|
77
|
+
skinVisualClass(
|
|
78
|
+
visual,
|
|
79
|
+
"after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:border-solid after:[border-width:var(--border-width,1px)] after:border-inherit after:content-['']"
|
|
80
|
+
)
|
|
78
81
|
),
|
|
79
82
|
orientation === "horizontal" ? cn("flex-row flex-nowrap items-stretch", segmented && "gap-xsmall") : cn("flex-col flex-nowrap items-stretch", segmented && "gap-xsmall"),
|
|
80
83
|
className
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SEMANTIC_STATUS_TEXT } from "../utils/semanticStatusSurface.js";
|
|
2
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
4
|
import { KIT_ALERT_VARIANTS } from "./alertTypes.js";
|
|
5
5
|
const ALERT_VARIANT_SURFACE = {
|
|
@@ -9,8 +9,7 @@ const ALERT_VARIANT_SURFACE = {
|
|
|
9
9
|
};
|
|
10
10
|
function alertSurfaceClass(variant, _status = "default") {
|
|
11
11
|
const visual = resolveVariantVisual(variant, KIT_ALERT_VARIANTS, "alert.root");
|
|
12
|
-
|
|
13
|
-
return ALERT_VARIANT_SURFACE[visual.key];
|
|
12
|
+
return skinVisualClass(visual, ALERT_VARIANT_SURFACE[visual.key]);
|
|
14
13
|
}
|
|
15
14
|
function alertIndicatorWrapperTextClass(status) {
|
|
16
15
|
if (status !== "default") return SEMANTIC_STATUS_TEXT[status];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
1
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
3
|
import { KIT_AVATAR_VARIANTS } from "./avatarTypes.js";
|
|
4
4
|
const AVATAR_SIZE_CLASS = {
|
|
@@ -18,7 +18,7 @@ function avatarRootClass(size, variant, className) {
|
|
|
18
18
|
const visual = resolveVariantVisual(variant, KIT_AVATAR_VARIANTS, "avatar.root");
|
|
19
19
|
return cn(
|
|
20
20
|
"relative inline-flex shrink-0 select-none overflow-hidden text-start",
|
|
21
|
-
visual
|
|
21
|
+
skinVisualClass(visual, AVATAR_KIT_SURFACE),
|
|
22
22
|
AVATAR_SIZE_CLASS[size].root,
|
|
23
23
|
className
|
|
24
24
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
|
-
import { resolveVariantVisual, isKitVariant } from "../../../skins/resolveVariantVisual.js";
|
|
4
|
+
import { resolveVariantVisual, skinVisualClass, isKitVariant } from "../../../skins/resolveVariantVisual.js";
|
|
5
5
|
import { ICON_SLOT_CLASS, iconSlotSizeClass } from "../utils/sizeLayout/iconSlot.js";
|
|
6
6
|
const BADGE_VARIANT_SURFACE = {
|
|
7
7
|
default: "bg-surface border-token text-foreground",
|
|
@@ -69,7 +69,9 @@ function dotFillClass(variant, status) {
|
|
|
69
69
|
}
|
|
70
70
|
function badgeVariantRootClass(variant, status) {
|
|
71
71
|
const visual = resolveVariantVisual(variant, KIT_BADGE_VARIANTS, "badge.root");
|
|
72
|
-
|
|
72
|
+
return skinVisualClass(visual, badgeKitSurfaceClass(variant, status));
|
|
73
|
+
}
|
|
74
|
+
function badgeKitSurfaceClass(variant, status) {
|
|
73
75
|
if (variant === "outline" && status !== "default") {
|
|
74
76
|
return "bg-transparent text-foreground";
|
|
75
77
|
}
|
|
@@ -104,8 +106,7 @@ function badgeSurfaceClass(variant, status = "default") {
|
|
|
104
106
|
}
|
|
105
107
|
function badgeDotSurfaceClass(variant, status) {
|
|
106
108
|
const visual = resolveVariantVisual(variant, KIT_BADGE_VARIANTS, "badge.root");
|
|
107
|
-
|
|
108
|
-
return dotFillClass(variant, status);
|
|
109
|
+
return skinVisualClass(visual, dotFillClass(variant, status));
|
|
109
110
|
}
|
|
110
111
|
const BADGE_ICON_SLOT_BASE = `inline-flex shrink-0 ${ICON_SLOT_CLASS}`;
|
|
111
112
|
function badgeIconSlotClass(size, slotClass) {
|
|
@@ -3,7 +3,7 @@ import { hoverVariant } from "../utils/hoverVariant.js";
|
|
|
3
3
|
import { SHADOW_LIFT_MOTION_CLASS } from "../utils/useShadowMotion.js";
|
|
4
4
|
import { colorToken } from "../../../tokens/index.js";
|
|
5
5
|
import { cn } from "../../../utils/cn.js";
|
|
6
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
6
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
7
7
|
import { KIT_BUTTON_VARIANTS } from "./buttonTypes.js";
|
|
8
8
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
9
9
|
import { ICON_SLOT_CLASS, iconSlotSizeClass } from "../utils/sizeLayout/iconSlot.js";
|
|
@@ -264,10 +264,8 @@ function buttonRippleTone(variant, status = "default") {
|
|
|
264
264
|
}
|
|
265
265
|
function buttonSurfaceMotionClass(status, variant, hasGroupSegment, blocked) {
|
|
266
266
|
const visual = resolveVariantVisual(variant, KIT_BUTTON_VARIANTS, "button.root");
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
return cn(
|
|
267
|
+
return skinVisualClass(
|
|
268
|
+
visual,
|
|
271
269
|
buttonVariantRootClass(variant, status),
|
|
272
270
|
buttonStatusClass(variant, status),
|
|
273
271
|
hasGroupSegment && "border-0 shadow-none",
|
|
@@ -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,
|
|
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__ */
|
|
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
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
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
|
-
/**
|
|
38
|
-
|
|
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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TEXT_COLOR_TRANSITION, hoverVariant, SURFACE_COLOR_TRANSITION } from "../utils/hoverVariant.js";
|
|
2
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
4
|
import { KIT_CALENDAR_VARIANTS } from "./calendarTypes.js";
|
|
5
5
|
const CALENDAR_WEEKDAY_CELL = {
|
|
@@ -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
|
|
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
|
|
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
|
|
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";
|
|
@@ -120,7 +120,7 @@ function calendarRootClass(variant, size, className) {
|
|
|
120
120
|
const visual = resolveVariantVisual(variant, KIT_CALENDAR_VARIANTS, "calendar.root");
|
|
121
121
|
return cn(
|
|
122
122
|
CALENDAR_ROOT_SHELL_CLASS,
|
|
123
|
-
visual
|
|
123
|
+
skinVisualClass(visual, CALENDAR_ROOT_SURFACE[visual.key]),
|
|
124
124
|
CALENDAR_ROOT_PAD[size],
|
|
125
125
|
CALENDAR_ROOT_MIN_W[size],
|
|
126
126
|
className
|
|
@@ -88,6 +88,7 @@ function closeButtonRootClass({
|
|
|
88
88
|
usesKitElevation(variant, KIT_CLOSE_BUTTON_VARIANTS) && SHADOW_LIFT_MOTION_CLASS,
|
|
89
89
|
!disabled && hoverVariant(CLOSE_BUTTON_HOVER_VARIANT[visual.key]),
|
|
90
90
|
INTERACTIVE_VARIANT_ROOT[visual.key],
|
|
91
|
+
visual.extend,
|
|
91
92
|
sizeClasses.root,
|
|
92
93
|
disabled && CLOSE_BUTTON_DISABLED_CLASS,
|
|
93
94
|
slotRoot,
|
|
@@ -3,7 +3,7 @@ import { fieldShellHoverClass, fieldShellFocusRingClass, FIELD_SHELL_TRANSITION_
|
|
|
3
3
|
import { buttonGroupSegmentSurfaceClasses, buttonGroupRoundingClasses } from "../../composite/ButtonGroup/buttonGroupStyles.js";
|
|
4
4
|
import { KIT_INPUT_VARIANTS } from "../Input/inputTypes.js";
|
|
5
5
|
import { resolveFieldShellSurfaceClass } from "../utils/fieldShellVariant.js";
|
|
6
|
-
import { usesKitElevation, resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
6
|
+
import { usesKitElevation, resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
7
7
|
import { cn } from "../../../utils/cn.js";
|
|
8
8
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
9
9
|
import { iconSlotClass } from "../utils/sizeLayout/iconSlot.js";
|
|
@@ -34,8 +34,7 @@ function comboBoxShellSurface({
|
|
|
34
34
|
variant
|
|
35
35
|
}) {
|
|
36
36
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "comboBox.shell");
|
|
37
|
-
|
|
38
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
37
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
39
38
|
}
|
|
40
39
|
function comboBoxGroupShellClass(groupSegment) {
|
|
41
40
|
if (groupSegment) {
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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,
|
|
@@ -2,7 +2,7 @@ import { resolveFieldShellSurfaceClass } from "../utils/fieldShellVariant.js";
|
|
|
2
2
|
import { iconSlotClass } from "../utils/sizeLayout/iconSlot.js";
|
|
3
3
|
import { fieldShellHoverClass, FIELD_SHELL_TRANSITION_CLASS, fieldShellFocusRingClass } from "../utils/useFieldShellHoverLift.js";
|
|
4
4
|
import { KIT_INPUT_VARIANTS } from "../Input/inputTypes.js";
|
|
5
|
-
import { usesKitElevation, resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
5
|
+
import { usesKitElevation, resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
6
6
|
import { cn } from "../../../utils/cn.js";
|
|
7
7
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
8
8
|
const DATE_PICKER_ROOT_CLASS = "w-fit max-w-full min-w-0";
|
|
@@ -35,8 +35,7 @@ function datePickerIconClass(size) {
|
|
|
35
35
|
}
|
|
36
36
|
function datePickerShellSurface(variant) {
|
|
37
37
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "datePicker.trigger");
|
|
38
|
-
|
|
39
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
38
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
40
39
|
}
|
|
41
40
|
function datePickerTriggerClass({
|
|
42
41
|
size,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { modalOverlayEnterStyle } from "../utils/modalSurfaceMotion.js";
|
|
2
2
|
import { KIT_DIALOG_VARIANTS } from "./dialogTypes.js";
|
|
3
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
3
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
4
4
|
import { cn } from "../../../utils/cn.js";
|
|
5
5
|
import { panelSizeLayout, PANEL_SIZE_LAYOUT } from "../utils/sizeLayout/panel.js";
|
|
6
6
|
const DIALOG_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col text-start";
|
|
@@ -78,7 +78,7 @@ function dialogPanelClass({
|
|
|
78
78
|
DIALOG_PANEL_LAYOUT_CLASS,
|
|
79
79
|
sizePreset.panelMax,
|
|
80
80
|
sizePreset.rounded,
|
|
81
|
-
visual
|
|
81
|
+
skinVisualClass(visual, DIALOG_PANEL_SURFACE[visual.key]),
|
|
82
82
|
sizePreset.maxHeight,
|
|
83
83
|
slotClass,
|
|
84
84
|
className
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hoverVariant } from "../utils/hoverVariant.js";
|
|
2
2
|
import { TEXT_COLOR_TRANSITION } from "../utils/hoverVariant.js";
|
|
3
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
3
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
4
4
|
import { cn } from "../../../utils/cn.js";
|
|
5
5
|
import { KIT_DISCLOSURE_VARIANTS } from "./disclosureTypes.js";
|
|
6
6
|
import { collapsibleSizeLayout } from "../utils/sizeLayout/collapsible.js";
|
|
@@ -76,7 +76,7 @@ function disclosureRootClass({
|
|
|
76
76
|
slotClass
|
|
77
77
|
}) {
|
|
78
78
|
const visual = resolveVariantVisual(variant, KIT_DISCLOSURE_VARIANTS, "disclosure.root");
|
|
79
|
-
const rootCls = visual.key === "card" && groupedCardShell ? "" : visual
|
|
79
|
+
const rootCls = visual.key === "card" && groupedCardShell ? "" : skinVisualClass(visual, VARIANT_ROOT[visual.key]);
|
|
80
80
|
return cn(rootCls, slotClass, className);
|
|
81
81
|
}
|
|
82
82
|
function disclosureTriggerClass({
|
|
@@ -91,7 +91,7 @@ function disclosureTriggerClass({
|
|
|
91
91
|
return cn(
|
|
92
92
|
DISCLOSURE_TRIGGER_BASE_CLASS,
|
|
93
93
|
shell.pad,
|
|
94
|
-
visual
|
|
94
|
+
skinVisualClass(visual, VARIANT_TRIGGER[visual.key]),
|
|
95
95
|
disabled ? DISCLOSURE_TRIGGER_DISABLED_CLASS : DISCLOSURE_TRIGGER_ENABLED_CLASS,
|
|
96
96
|
slotClass,
|
|
97
97
|
className
|
|
@@ -128,6 +128,7 @@ function disclosureContentClass({
|
|
|
128
128
|
key === "card" && "border-t-token",
|
|
129
129
|
key === "ghost" && "text-muted",
|
|
130
130
|
key === "default" && "text-muted",
|
|
131
|
+
visual.extend,
|
|
131
132
|
slotClass,
|
|
132
133
|
className
|
|
133
134
|
);
|
|
@@ -147,6 +148,7 @@ function disclosureGroupClass({
|
|
|
147
148
|
!separated && key === "card" && "rounded-mid border-token bg-surface",
|
|
148
149
|
!separated && (key === "outline" || key === "secondary" || key === "ghost") && "gap-small",
|
|
149
150
|
visual.className,
|
|
151
|
+
visual.extend,
|
|
150
152
|
slotClass,
|
|
151
153
|
className
|
|
152
154
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { modalOverlayEnterStyle } from "../utils/modalSurfaceMotion.js";
|
|
2
2
|
import { KIT_DRAWER_VARIANTS } from "./drawerTypes.js";
|
|
3
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
3
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
4
4
|
import { cn } from "../../../utils/cn.js";
|
|
5
5
|
import { panelSizeLayout, PANEL_SIZE_LAYOUT } from "../utils/sizeLayout/panel.js";
|
|
6
6
|
const PANEL_PLACEMENT_CLASS = {
|
|
@@ -143,7 +143,7 @@ function drawerPanelClass({
|
|
|
143
143
|
const visual = resolveVariantVisual(variant, KIT_DRAWER_VARIANTS, "drawer.panel");
|
|
144
144
|
return cn(
|
|
145
145
|
DRAWER_PANEL_BASE_CLASS,
|
|
146
|
-
visual
|
|
146
|
+
skinVisualClass(visual, DRAWER_PANEL_SURFACE[visual.key]),
|
|
147
147
|
PANEL_PLACEMENT_CLASS[placement],
|
|
148
148
|
drawerExtentClass(placement, extent),
|
|
149
149
|
drawerEdgeRoundedClass(placement, size, extent),
|
|
@@ -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-
|
|
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, }: {
|
|
@@ -2,7 +2,7 @@ import { hoverVariant } from "../utils/hoverVariant.js";
|
|
|
2
2
|
import { optionListItemGridClass } from "../utils/optionControlGridLayout.js";
|
|
3
3
|
import { BUTTON_GROUP_RADIUS_BRIDGE_CLASS } from "../../composite/ButtonGroup/buttonGroupStyles.js";
|
|
4
4
|
import { KIT_POPOVER_VARIANTS } from "../Popover/popoverTypes.js";
|
|
5
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
5
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
6
6
|
import { cn } from "../../../utils/cn.js";
|
|
7
7
|
import { OPTION_CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/option.js";
|
|
8
8
|
const DROPDOWN_ROOT_CLASS = "relative inline-flex";
|
|
@@ -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-
|
|
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 = {
|
|
@@ -93,7 +93,7 @@ function dropdownSubContentClass({
|
|
|
93
93
|
return cn(
|
|
94
94
|
DROPDOWN_SUB_CONTENT_BASE_CLASS,
|
|
95
95
|
DROPDOWN_SUB_CONTENT_LAYOUT_CLASS,
|
|
96
|
-
visual
|
|
96
|
+
skinVisualClass(visual, DROPDOWN_SUB_CONTENT_SURFACE_CLASS),
|
|
97
97
|
!subOpen && portalMounted && "pointer-events-none",
|
|
98
98
|
slotClass,
|
|
99
99
|
className
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { messageBannerGridClass } from "../utils/messageBannerGridLayout.js";
|
|
2
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
4
|
import { KIT_EXPANDABLE_VARIANTS } from "./expandableTypes.js";
|
|
5
5
|
import { collapsibleSizeLayout } from "../utils/sizeLayout/collapsible.js";
|
|
@@ -35,7 +35,7 @@ function expandableRootClass({
|
|
|
35
35
|
const visual = resolveVariantVisual(variant, KIT_EXPANDABLE_VARIANTS, "expandable.root");
|
|
36
36
|
return cn(
|
|
37
37
|
EXPANDABLE_ROOT_BASE_CLASS,
|
|
38
|
-
visual
|
|
38
|
+
skinVisualClass(visual, EXPANDABLE_VARIANT_SURFACE[visual.key]),
|
|
39
39
|
slotClass,
|
|
40
40
|
className
|
|
41
41
|
);
|
|
@@ -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__ */
|
|
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
|
}
|
|
@@ -3,6 +3,8 @@ 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
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";
|