burne-ui 2.0.2 → 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.
- 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/core/Calendar/calendarParts.js +15 -13
- package/dist/components/core/Calendar/calendarStyles.d.ts +5 -2
- package/dist/components/core/Calendar/calendarStyles.js +3 -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/Dropdown/dropdownStyles.d.ts +1 -1
- package/dist/components/core/Dropdown/dropdownStyles.js +1 -1
- 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 +7 -0
- package/dist/components/core/NumberInput/numberInputAnimations.d.ts +21 -21
- package/dist/components/core/NumberInput/numberInputAnimations.js +22 -4
- package/dist/components/core/PinInput/pinInputStyles.js +7 -1
- 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 +7 -1
- package/dist/components/core/TimeField/timeFieldStyles.d.ts +5 -2
- package/dist/components/core/TimeField/timeFieldStyles.js +2 -1
- package/dist/components/core/Tooltip/tooltipStyles.d.ts +1 -1
- package/dist/components/core/Tooltip/tooltipStyles.js +1 -1
- package/dist/components/core/utils/sizeLayout/iconSlot.d.ts +1 -1
- package/dist/ui.css +43 -19
- package/package.json +1 -1
|
@@ -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";
|
|
@@ -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";
|
|
@@ -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,
|
|
@@ -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, }: {
|
|
@@ -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 = {
|
|
@@ -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";
|
|
@@ -10,6 +10,12 @@ 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
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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ForwardedRef, MutableRefObject, PointerEventHandler } from 'react';
|
|
1
|
+
import { ForwardedRef, MutableRefObject, PointerEvent as ReactPointerEvent, PointerEventHandler } from 'react';
|
|
2
2
|
import { MotionPartPhases } from '../utils/slotMotion/index.js';
|
|
3
3
|
import { InputVariant } from '../Input/inputTypes.js';
|
|
4
4
|
import { NumberInputMotion, NumberInputPartMotion } from './numberInputTypes.js';
|
|
@@ -18,10 +18,10 @@ export declare function resolveNumberInputMotionParams({ variant, disabled, poin
|
|
|
18
18
|
export declare function useNumberInputShellMotion(): {
|
|
19
19
|
setRef: (node: HTMLDivElement | null) => void;
|
|
20
20
|
pointerHandlers: {
|
|
21
|
-
onPointerOver: (e:
|
|
22
|
-
onPointerOut: (e:
|
|
23
|
-
onPointerDown: (e:
|
|
24
|
-
onPointerUp: (e:
|
|
21
|
+
onPointerOver: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
22
|
+
onPointerOut: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
23
|
+
onPointerDown: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
24
|
+
onPointerUp: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
25
25
|
};
|
|
26
26
|
shellHoverMotionClass: string;
|
|
27
27
|
};
|
|
@@ -36,10 +36,10 @@ export declare function useNumberInputControlMotion({ motion, forwardedRef, onPo
|
|
|
36
36
|
setRef: (node: HTMLInputElement | null) => void;
|
|
37
37
|
targetRef: import('react').RefObject<HTMLInputElement | null>;
|
|
38
38
|
pointerHandlers: {
|
|
39
|
-
onPointerOver: (e:
|
|
40
|
-
onPointerOut: (e:
|
|
41
|
-
onPointerDown: (e:
|
|
42
|
-
onPointerUp: (e:
|
|
39
|
+
onPointerOver: (e: ReactPointerEvent<HTMLInputElement>) => void;
|
|
40
|
+
onPointerOut: (e: ReactPointerEvent<HTMLInputElement>) => void;
|
|
41
|
+
onPointerDown: (e: ReactPointerEvent<HTMLInputElement>) => void;
|
|
42
|
+
onPointerUp: (e: ReactPointerEvent<HTMLInputElement>) => void;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
export declare function useNumberInputDecrementMotion({ motion, forwardedRef, blocked, onPointerOver, onPointerOut, onPointerDown, onPointerUp, }: {
|
|
@@ -54,10 +54,10 @@ export declare function useNumberInputDecrementMotion({ motion, forwardedRef, bl
|
|
|
54
54
|
setRef: (node: HTMLButtonElement | null) => void;
|
|
55
55
|
targetRef: import('react').RefObject<HTMLButtonElement | null>;
|
|
56
56
|
pointerHandlers: {
|
|
57
|
-
onPointerOver: (e:
|
|
58
|
-
onPointerOut: (e:
|
|
59
|
-
onPointerDown: (e:
|
|
60
|
-
onPointerUp: (e:
|
|
57
|
+
onPointerOver: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
58
|
+
onPointerOut: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
59
|
+
onPointerDown: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
60
|
+
onPointerUp: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
export declare function useNumberInputIncrementMotion({ motion, forwardedRef, blocked, onPointerOver, onPointerOut, onPointerDown, onPointerUp, }: {
|
|
@@ -72,10 +72,10 @@ export declare function useNumberInputIncrementMotion({ motion, forwardedRef, bl
|
|
|
72
72
|
setRef: (node: HTMLButtonElement | null) => void;
|
|
73
73
|
targetRef: import('react').RefObject<HTMLButtonElement | null>;
|
|
74
74
|
pointerHandlers: {
|
|
75
|
-
onPointerOver: (e:
|
|
76
|
-
onPointerOut: (e:
|
|
77
|
-
onPointerDown: (e:
|
|
78
|
-
onPointerUp: (e:
|
|
75
|
+
onPointerOver: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
76
|
+
onPointerOut: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
77
|
+
onPointerDown: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
78
|
+
onPointerUp: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
export declare function useNumberInputChromeSlot(slot: "label" | "hint" | "error", { motion, forwardedRef, onPointerOver, onPointerOut, onPointerDown, onPointerUp, }?: {
|
|
@@ -89,9 +89,9 @@ export declare function useNumberInputChromeSlot(slot: "label" | "hint" | "error
|
|
|
89
89
|
setRef: (node: HTMLElement | null) => void;
|
|
90
90
|
targetRef: import('react').RefObject<HTMLElement | null>;
|
|
91
91
|
pointerHandlers: {
|
|
92
|
-
onPointerOver: (e:
|
|
93
|
-
onPointerOut: (e:
|
|
94
|
-
onPointerDown: (e:
|
|
95
|
-
onPointerUp: (e:
|
|
92
|
+
onPointerOver: (e: ReactPointerEvent<HTMLElement>) => void;
|
|
93
|
+
onPointerOut: (e: ReactPointerEvent<HTMLElement>) => void;
|
|
94
|
+
onPointerDown: (e: ReactPointerEvent<HTMLElement>) => void;
|
|
95
|
+
onPointerUp: (e: ReactPointerEvent<HTMLElement>) => void;
|
|
96
96
|
};
|
|
97
97
|
};
|
|
@@ -77,6 +77,18 @@ function useNumberInputShellMotion() {
|
|
|
77
77
|
shellHoverMotionClass: kitSurface ? shadow.motionClass : ""
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
+
const STEPPER_PRESS_PARAMS = {
|
|
81
|
+
hasHoverShadow: false,
|
|
82
|
+
restoreHover: false,
|
|
83
|
+
shadow: void 0,
|
|
84
|
+
shadowSize: void 0
|
|
85
|
+
};
|
|
86
|
+
function playStepperPress(scope, slot, motion, event) {
|
|
87
|
+
if (!scope || event.defaultPrevented) return;
|
|
88
|
+
const el = event.currentTarget;
|
|
89
|
+
if (!el) return;
|
|
90
|
+
scope.play(slot, "pressIn", { el, partMotion: motion, params: STEPPER_PRESS_PARAMS });
|
|
91
|
+
}
|
|
80
92
|
function useNumberInputControlMotion({
|
|
81
93
|
motion,
|
|
82
94
|
forwardedRef,
|
|
@@ -117,10 +129,13 @@ function useNumberInputDecrementMotion({
|
|
|
117
129
|
slot: "decrement",
|
|
118
130
|
motion,
|
|
119
131
|
forwardedRef,
|
|
120
|
-
pressPhases: !blocked,
|
|
121
132
|
onPointerOver,
|
|
122
133
|
onPointerOut,
|
|
123
|
-
onPointerDown
|
|
134
|
+
onPointerDown: (event) => {
|
|
135
|
+
onPointerDown?.(event);
|
|
136
|
+
if (blocked) return;
|
|
137
|
+
playStepperPress(scope, "decrement", motion, event);
|
|
138
|
+
},
|
|
124
139
|
onPointerUp
|
|
125
140
|
});
|
|
126
141
|
useOptionalEnterOnMount(scope, "decrement", part.targetRef);
|
|
@@ -141,10 +156,13 @@ function useNumberInputIncrementMotion({
|
|
|
141
156
|
slot: "increment",
|
|
142
157
|
motion,
|
|
143
158
|
forwardedRef,
|
|
144
|
-
pressPhases: !blocked,
|
|
145
159
|
onPointerOver,
|
|
146
160
|
onPointerOut,
|
|
147
|
-
onPointerDown
|
|
161
|
+
onPointerDown: (event) => {
|
|
162
|
+
onPointerDown?.(event);
|
|
163
|
+
if (blocked) return;
|
|
164
|
+
playStepperPress(scope, "increment", motion, event);
|
|
165
|
+
},
|
|
148
166
|
onPointerUp
|
|
149
167
|
});
|
|
150
168
|
useOptionalEnterOnMount(scope, "increment", part.targetRef);
|
|
@@ -14,6 +14,12 @@ const PIN_INPUT_CELL_BOX = {
|
|
|
14
14
|
mid: "w-control-mid min-h-control-mid",
|
|
15
15
|
large: "w-control-large min-h-control-large"
|
|
16
16
|
};
|
|
17
|
+
const PIN_INPUT_CELL_TEXT = {
|
|
18
|
+
small: "p-0 text-center text-small",
|
|
19
|
+
base: "p-0 text-center text-base",
|
|
20
|
+
mid: "p-0 text-center text-mid",
|
|
21
|
+
large: "p-0 text-center text-mid"
|
|
22
|
+
};
|
|
17
23
|
const PIN_INPUT_DISABLED_CLASS = "cursor-not-allowed opacity-55";
|
|
18
24
|
const PIN_INPUT_MASK_CLASS = "[-webkit-text-security:disc] [text-security:disc]";
|
|
19
25
|
function pinInputFieldSurface(variant) {
|
|
@@ -42,7 +48,7 @@ function pinInputFieldClass({
|
|
|
42
48
|
"box-border shrink-0 border-1 text-center text-foreground outline-none tabular-nums placeholder:text-muted",
|
|
43
49
|
PIN_INPUT_CELL_BOX[size],
|
|
44
50
|
CONTROL_SIZE_LAYOUT[size].rounded,
|
|
45
|
-
|
|
51
|
+
PIN_INPUT_CELL_TEXT[size],
|
|
46
52
|
pinInputFieldSurface(variant),
|
|
47
53
|
fieldShellFocusRingClass(status),
|
|
48
54
|
FIELD_SHELL_TRANSITION_CLASS,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, memo, useRef, useCallback,
|
|
3
|
+
import { forwardRef, memo, useRef, useCallback, useLayoutEffect, useState, Children, isValidElement, useMemo } from "react";
|
|
4
4
|
import { focusKeyboard } from "../utils/focusElement.js";
|
|
5
5
|
import { dataFlag } from "../utils/dataContract.js";
|
|
6
6
|
import { tableCellRole, tableRowRole, columnAriaSort, tableColumnHeaderRole, tableAriaMultiSelectable, tableContentRole, rowAriaSelected, tableIsSelectableGrid } from "./tableA11y.js";
|
|
7
7
|
import { isTableEmptyElement, resolveColumnSortDirection, resolveNextSortDescriptor, tableSortButtons, tableBumpSortButton, hasTableLabel, TONED_ROW_DEFAULT_TONE, moveVirtualTableRow, tableSelectableRows, tableBumpRow, TABLE_ROW_KEY_ATTR, TABLE_VIRTUAL_INDEX_ATTR } from "./tableAPI.js";
|
|
8
8
|
import { useTableSlotMotion, TableSortChevron, useTableRowSelectionMotion } from "./tableAnimations.js";
|
|
9
9
|
import { useTableClassNames, useTableContent, useTableVariant, useTableSize, useTableRow, useOptionalTableMotionScope, TableMotionProvider, useTableMotionScope, useTableRowIsSelected, useTableRowIsFocusTarget, useTableVirtual, TableRowProvider } from "./tableContext.js";
|
|
10
|
-
import { TABLE_FOOTER_CLASS, TABLE_BODY_EMPTY_CELL_CLASS, TABLE_CAPTION_CLASS, tableColumnLabelClass, TABLE_COLUMN_MIN_WIDTH, TABLE_COLUMN_INNER_CLASS, tableColumnSortButtonClass, TABLE_COLUMN_RESIZE_HANDLE_CLASS, tableColumnClass, TABLE_HEADER_ROW_VARIANT_CLASS, tableContentClass, TABLE_SCROLL_STICKY_CLASS, TABLE_SCROLL_CONTAINER_CLASS, tableCellClass, tableRowClass } from "./tableStyles.js";
|
|
10
|
+
import { TABLE_FOOTER_CLASS, TABLE_BODY_EMPTY_CELL_CLASS, TABLE_CAPTION_CLASS, tableColumnLabelClass, TABLE_COLUMN_MIN_WIDTH, TABLE_COLUMN_INNER_CLASS, tableColumnSortButtonClass, TABLE_COLUMN_RESIZE_HANDLE_CLASS, TABLE_COLUMN_RESIZE_GRIP_CLASS, TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS, TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS, tableColumnClass, TABLE_HEADER_ROW_VARIANT_CLASS, tableContentClass, TABLE_SCROLL_STICKY_CLASS, TABLE_SCROLL_CONTAINER_CLASS, tableCellClass, tableRowClass } from "./tableStyles.js";
|
|
11
11
|
import { TableVirtualRows } from "./tableVirtualRows.js";
|
|
12
12
|
import { isRtlElement } from "../utils/readingDirection.js";
|
|
13
13
|
import { formatBurneLabel } from "../../../theme/burneLabels.js";
|
|
@@ -289,6 +289,19 @@ const TableColumn = forwardRef(
|
|
|
289
289
|
const headerName = typeof children === "string" ? children : void 0;
|
|
290
290
|
const resizeLabel = headerName ? formatBurneLabel(labels.resizeColumnNamed, { name: headerName }) : labels.resizeColumn;
|
|
291
291
|
const columnRef = useRef(null);
|
|
292
|
+
useLayoutEffect(() => {
|
|
293
|
+
const cell = columnRef.current;
|
|
294
|
+
if (!cell || !columnResize) return;
|
|
295
|
+
const row = cell.parentElement;
|
|
296
|
+
if (!row) return;
|
|
297
|
+
const cells = [...row.children];
|
|
298
|
+
const index = cells.indexOf(cell);
|
|
299
|
+
if (index < 0) return;
|
|
300
|
+
cell.style.zIndex = String(10 + cells.length - index);
|
|
301
|
+
return () => {
|
|
302
|
+
cell.style.zIndex = "";
|
|
303
|
+
};
|
|
304
|
+
}, [columnResize]);
|
|
292
305
|
const [columnMax, setColumnMax] = useState();
|
|
293
306
|
useLayoutEffect(() => {
|
|
294
307
|
const table = columnRef.current?.closest("table");
|
|
@@ -403,7 +416,12 @@ const TableColumn = forwardRef(
|
|
|
403
416
|
onPointerUp: endResize,
|
|
404
417
|
onPointerCancel: endResize,
|
|
405
418
|
onLostPointerCapture: endResize,
|
|
406
|
-
onKeyDown: onResizeKeyDown
|
|
419
|
+
onKeyDown: onResizeKeyDown,
|
|
420
|
+
children: /* @__PURE__ */ jsxs("span", { className: TABLE_COLUMN_RESIZE_GRIP_CLASS, "aria-hidden": "true", children: [
|
|
421
|
+
/* @__PURE__ */ jsx("span", { className: TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS }),
|
|
422
|
+
/* @__PURE__ */ jsx("span", { className: TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS }),
|
|
423
|
+
/* @__PURE__ */ jsx("span", { className: TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS })
|
|
424
|
+
] })
|
|
407
425
|
}
|
|
408
426
|
)
|
|
409
427
|
) : null
|
|
@@ -8,7 +8,16 @@ export declare const TABLE_SCROLL_STICKY_CLASS = "overflow-y-auto max-h-[var(--m
|
|
|
8
8
|
export declare const TABLE_VIRTUAL_SPACER_CELL_CLASS = "border-0 p-0";
|
|
9
9
|
export declare const TABLE_CONTENT_BASE_CLASS = "w-full";
|
|
10
10
|
export declare const TABLE_CONTENT_FIXED_CLASS = "table-fixed";
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Sits on the column's inline end and shifts halfway across that edge,
|
|
13
|
+
* so the rule is the boundary with the next column. The last column has
|
|
14
|
+
* no next column: `in-[th:last-child]` hides its handle.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TABLE_COLUMN_RESIZE_HANDLE_CLASS = "absolute inset-y-0 end-0 z-10 flex cursor-col-resize touch-none items-center justify-center focus-ring ltr:translate-x-1/2 rtl:-translate-x-1/2 in-[th:last-child]:hidden";
|
|
17
|
+
/** Decorative grip: one short mark, the column rule, one short mark. */
|
|
18
|
+
export declare const TABLE_COLUMN_RESIZE_GRIP_CLASS = "pointer-events-none flex h-full items-center gap-px";
|
|
19
|
+
export declare const TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS = "h-mid w-px shrink-0 rounded-full bg-border";
|
|
20
|
+
export declare const TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS = "h-full w-px shrink-0 self-stretch bg-border";
|
|
12
21
|
export declare const TABLE_COLUMN_MIN_WIDTH = 64;
|
|
13
22
|
export declare const TABLE_CONTENT_VARIANT_CLASS: Record<KitTableVariant, string>;
|
|
14
23
|
export declare const TABLE_HEADER_ROW_VARIANT_CLASS: Record<KitTableVariant, string>;
|
|
@@ -14,7 +14,10 @@ const TABLE_SCROLL_STICKY_CLASS = "overflow-y-auto max-h-[var(--max-component-2x
|
|
|
14
14
|
const TABLE_VIRTUAL_SPACER_CELL_CLASS = "border-0 p-0";
|
|
15
15
|
const TABLE_CONTENT_BASE_CLASS = "w-full";
|
|
16
16
|
const TABLE_CONTENT_FIXED_CLASS = "table-fixed";
|
|
17
|
-
const TABLE_COLUMN_RESIZE_HANDLE_CLASS = "absolute inset-y-0 end-0 z-10
|
|
17
|
+
const TABLE_COLUMN_RESIZE_HANDLE_CLASS = "absolute inset-y-0 end-0 z-10 flex cursor-col-resize touch-none items-center justify-center focus-ring ltr:translate-x-1/2 rtl:-translate-x-1/2 in-[th:last-child]:hidden";
|
|
18
|
+
const TABLE_COLUMN_RESIZE_GRIP_CLASS = "pointer-events-none flex h-full items-center gap-px";
|
|
19
|
+
const TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS = "h-mid w-px shrink-0 rounded-full bg-border";
|
|
20
|
+
const TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS = "h-full w-px shrink-0 self-stretch bg-border";
|
|
18
21
|
const TABLE_COLUMN_MIN_WIDTH = 64;
|
|
19
22
|
const TABLE_CONTENT_VARIANT_CLASS = {
|
|
20
23
|
default: "border-collapse",
|
|
@@ -215,6 +218,9 @@ export {
|
|
|
215
218
|
TABLE_COLUMN_INNER_CLASS,
|
|
216
219
|
TABLE_COLUMN_LABEL_CLASS,
|
|
217
220
|
TABLE_COLUMN_MIN_WIDTH,
|
|
221
|
+
TABLE_COLUMN_RESIZE_GRIP_CLASS,
|
|
222
|
+
TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS,
|
|
223
|
+
TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS,
|
|
218
224
|
TABLE_COLUMN_RESIZE_HANDLE_CLASS,
|
|
219
225
|
TABLE_COLUMN_SORTABLE_CLASS,
|
|
220
226
|
TABLE_COLUMN_SORT_BUTTON_CLASS,
|
|
@@ -15,8 +15,11 @@ export declare const TIME_FIELD_SEGMENT_SEPARATOR_BASE_CLASS = "inline-flex w-[0
|
|
|
15
15
|
export declare const TIME_FIELD_SEGMENT_SEPARATOR_SEGMENTED_CLASS = "mx-[length:var(--border-width)]";
|
|
16
16
|
export declare const TIME_FIELD_SEGMENT_GROUP_CLASS = "inline-flex items-center";
|
|
17
17
|
export declare const TIME_FIELD_SEGMENTS_BASE_CLASS = "relative flex min-w-0 flex-1 items-center font-mono tabular-nums leading-none";
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Flex row inside `<fieldset>` — flex on fieldset itself breaks height on resize.
|
|
20
|
+
* `field-radius-clip` meets the border corners. Shadow layers stay on the fieldset.
|
|
21
|
+
*/
|
|
22
|
+
export declare const TIME_FIELD_SHELL_INNER_CLASS = "field-radius-clip flex min-w-0 items-stretch";
|
|
20
23
|
export declare const TIME_FIELD_SEGMENTS_SEGMENTED_CLASS = "gap-xsmall";
|
|
21
24
|
export declare function timeFieldAffixSurfaceClass(): string;
|
|
22
25
|
export declare function timeFieldAffixSlotClass({ side, size, slotClass, }: {
|
|
@@ -25,7 +25,7 @@ const TIME_FIELD_SEGMENT_SEPARATOR_BASE_CLASS = "inline-flex w-[0.45em] shrink-0
|
|
|
25
25
|
const TIME_FIELD_SEGMENT_SEPARATOR_SEGMENTED_CLASS = "mx-[length:var(--border-width)]";
|
|
26
26
|
const TIME_FIELD_SEGMENT_GROUP_CLASS = "inline-flex items-center";
|
|
27
27
|
const TIME_FIELD_SEGMENTS_BASE_CLASS = "relative flex min-w-0 flex-1 items-center font-mono tabular-nums leading-none";
|
|
28
|
-
const TIME_FIELD_SHELL_INNER_CLASS = "flex min-w-0
|
|
28
|
+
const TIME_FIELD_SHELL_INNER_CLASS = "field-radius-clip flex min-w-0 items-stretch";
|
|
29
29
|
const TIME_FIELD_SEGMENTS_SEGMENTED_CLASS = "gap-xsmall";
|
|
30
30
|
const AFFIX_PADDING = {
|
|
31
31
|
small: affixSlotClass("small"),
|
|
@@ -88,6 +88,7 @@ function timeFieldShellInnerClass({
|
|
|
88
88
|
}) {
|
|
89
89
|
return cn(
|
|
90
90
|
TIME_FIELD_SHELL_INNER_CLASS,
|
|
91
|
+
variant === "outline" && "field-radius-clip-outline",
|
|
91
92
|
usesKitElevation(variant, KIT_TIME_FIELD_VARIANTS) && "min-h-full",
|
|
92
93
|
slotClass
|
|
93
94
|
);
|
|
@@ -27,7 +27,7 @@ export declare const TOOLTIP_CONTENT_INNER_CLASS = "relative overflow-visible";
|
|
|
27
27
|
/** Compound slots (`Tooltip.Message`) — pass-through grid children. */
|
|
28
28
|
export declare const TOOLTIP_COMPOUND_CONTENTS_CLASS = "contents";
|
|
29
29
|
export declare const TOOLTIP_PANEL_BASE_CLASS = "relative z-[1] w-max min-w-0 rounded-mid text-start";
|
|
30
|
-
export declare const TOOLTIP_PANEL_SHADOW_CLASS = "shadow-token-
|
|
30
|
+
export declare const TOOLTIP_PANEL_SHADOW_CLASS = "shadow-token-mid";
|
|
31
31
|
export declare function tooltipTitleClass(status: SemanticStatus): string;
|
|
32
32
|
export declare function tooltipIndicatorClass(status: SemanticStatus, size: TooltipSize, gridSlots: MessageBannerGridSlots, slotClass?: string, className?: string): string;
|
|
33
33
|
export declare function tooltipPanelClass({ variant, size, gridSlots, slotClass, contentSlot, className, }: {
|
|
@@ -63,7 +63,7 @@ const TOOLTIP_CONTENT_BASE_CLASS = "pointer-events-none z-tooltip w-max min-w-0
|
|
|
63
63
|
const TOOLTIP_CONTENT_INNER_CLASS = "relative overflow-visible";
|
|
64
64
|
const TOOLTIP_COMPOUND_CONTENTS_CLASS = "contents";
|
|
65
65
|
const TOOLTIP_PANEL_BASE_CLASS = "relative z-[1] w-max min-w-0 rounded-mid text-start";
|
|
66
|
-
const TOOLTIP_PANEL_SHADOW_CLASS = "shadow-token-
|
|
66
|
+
const TOOLTIP_PANEL_SHADOW_CLASS = "shadow-token-mid";
|
|
67
67
|
function tooltipTitleClass(status) {
|
|
68
68
|
return cn(
|
|
69
69
|
TOOLTIP_TITLE_CLASS,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Steps of `icon-slot-*`. Each utility sets `--icon-size`; `.icon-slot > svg` reads it. */
|
|
2
2
|
export type IconSlotStep = "xsmall" | "small" | "base" | "mid" | "large" | "xlarge" | "2xlarge" | "3xlarge" | "16" | "24";
|
|
3
|
-
/** Marker on the icon wrap. The child rule lives in `@layer
|
|
3
|
+
/** Marker on the icon wrap. The child rule lives in `@layer components`. */
|
|
4
4
|
export declare const ICON_SLOT_CLASS = "icon-slot";
|
|
5
5
|
/** Size utility. `cn` treats every `icon-slot-*` as one group. */
|
|
6
6
|
export declare function iconSlotSizeClass(step: IconSlotStep): string;
|
package/dist/ui.css
CHANGED
|
@@ -446,7 +446,7 @@
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
@layer
|
|
449
|
+
@layer components {
|
|
450
450
|
.avatar-size-small {
|
|
451
451
|
width: var(--avatar-size-small);
|
|
452
452
|
height: var(--avatar-size-small);
|
|
@@ -524,8 +524,6 @@
|
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
-
@layer components;
|
|
528
|
-
|
|
529
527
|
@layer utilities {
|
|
530
528
|
.\[pointer-events\:var\(--toast-stack-events\)\] {
|
|
531
529
|
pointer-events: var(--toast-stack-events);
|
|
@@ -608,10 +606,6 @@
|
|
|
608
606
|
inset: calc(var(--border-width) * -1);
|
|
609
607
|
}
|
|
610
608
|
|
|
611
|
-
.-inset-px {
|
|
612
|
-
inset: -1px;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
609
|
.inset-0 {
|
|
616
610
|
inset: calc(var(--spacing) * 0);
|
|
617
611
|
}
|
|
@@ -676,6 +670,10 @@
|
|
|
676
670
|
top: calc(var(--spacing) * 12);
|
|
677
671
|
}
|
|
678
672
|
|
|
673
|
+
.top-full {
|
|
674
|
+
top: 100%;
|
|
675
|
+
}
|
|
676
|
+
|
|
679
677
|
.top-large {
|
|
680
678
|
top: var(--space-large);
|
|
681
679
|
}
|
|
@@ -732,10 +730,6 @@
|
|
|
732
730
|
bottom: calc(var(--spacing) * 6);
|
|
733
731
|
}
|
|
734
732
|
|
|
735
|
-
.bottom-\[length\:calc\(var\(--border-width\)\*3\)\] {
|
|
736
|
-
bottom: calc(var(--border-width) * 3);
|
|
737
|
-
}
|
|
738
|
-
|
|
739
733
|
.left-0 {
|
|
740
734
|
left: calc(var(--spacing) * 0);
|
|
741
735
|
}
|
|
@@ -990,6 +984,10 @@
|
|
|
990
984
|
margin-top: var(--space-2xlarge);
|
|
991
985
|
}
|
|
992
986
|
|
|
987
|
+
.mt-\[0\.1em\] {
|
|
988
|
+
margin-top: .1em;
|
|
989
|
+
}
|
|
990
|
+
|
|
993
991
|
.mt-\[calc\(\(var\(--control-size-base\)-1px\)\/2\)\] {
|
|
994
992
|
margin-top: calc((var(--control-size-base) - 1px) / 2);
|
|
995
993
|
}
|
|
@@ -1198,6 +1196,11 @@
|
|
|
1198
1196
|
height: calc(var(--spacing) * 12);
|
|
1199
1197
|
}
|
|
1200
1198
|
|
|
1199
|
+
.size-\[0\.22em\] {
|
|
1200
|
+
width: .22em;
|
|
1201
|
+
height: .22em;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1201
1204
|
.size-\[1em\] {
|
|
1202
1205
|
width: 1em;
|
|
1203
1206
|
height: 1em;
|
|
@@ -1511,10 +1514,6 @@
|
|
|
1511
1514
|
height: calc(100dvh - 3rem);
|
|
1512
1515
|
}
|
|
1513
1516
|
|
|
1514
|
-
.h-\[length\:calc\(var\(--border-width\)\*3\)\] {
|
|
1515
|
-
height: calc(var(--border-width) * 3);
|
|
1516
|
-
}
|
|
1517
|
-
|
|
1518
1517
|
.h-\[length\:var\(--icon-size\)\] {
|
|
1519
1518
|
height: var(--icon-size);
|
|
1520
1519
|
}
|
|
@@ -1979,10 +1978,6 @@
|
|
|
1979
1978
|
width: calc(2 * var(--selection-indicator-small));
|
|
1980
1979
|
}
|
|
1981
1980
|
|
|
1982
|
-
.w-\[length\:calc\(var\(--border-width\)\*3\)\] {
|
|
1983
|
-
width: calc(var(--border-width) * 3);
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
1981
|
.w-\[length\:var\(--icon-size\)\] {
|
|
1987
1982
|
width: var(--icon-size);
|
|
1988
1983
|
}
|
|
@@ -6476,6 +6471,10 @@
|
|
|
6476
6471
|
color: var(--color-muted);
|
|
6477
6472
|
}
|
|
6478
6473
|
|
|
6474
|
+
:where(:is(th:last-child)) .in-\[th\:last-child\]\:hidden {
|
|
6475
|
+
display: none;
|
|
6476
|
+
}
|
|
6477
|
+
|
|
6479
6478
|
.has-\[\:focus-visible\]\:border-primary:has(:focus-visible) {
|
|
6480
6479
|
border-color: var(--color-primary);
|
|
6481
6480
|
}
|
|
@@ -6719,10 +6718,20 @@
|
|
|
6719
6718
|
}
|
|
6720
6719
|
}
|
|
6721
6720
|
|
|
6721
|
+
.ltr\:translate-x-1\/2:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *) {
|
|
6722
|
+
--tw-translate-x: calc(1 / 2 * 100%);
|
|
6723
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
6724
|
+
}
|
|
6725
|
+
|
|
6722
6726
|
.rtl\:origin-right:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
|
|
6723
6727
|
transform-origin: 100%;
|
|
6724
6728
|
}
|
|
6725
6729
|
|
|
6730
|
+
.rtl\:-translate-x-1\/2:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
|
|
6731
|
+
--tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
|
|
6732
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
6733
|
+
}
|
|
6734
|
+
|
|
6726
6735
|
@media (prefers-color-scheme: dark) {
|
|
6727
6736
|
.dark\:border-amber-500\/40 {
|
|
6728
6737
|
border-color: #f99c0066;
|
|
@@ -6899,6 +6908,21 @@
|
|
|
6899
6908
|
--tb-fill-bw: var(--border-width-outline);
|
|
6900
6909
|
}
|
|
6901
6910
|
|
|
6911
|
+
.field-radius-clip {
|
|
6912
|
+
box-sizing: border-box;
|
|
6913
|
+
width: calc(100% + 2 * var(--field-clip-bw, var(--border-width, 1px)));
|
|
6914
|
+
margin: calc(var(--field-clip-bw, var(--border-width, 1px)) * -1);
|
|
6915
|
+
border-width: var(--field-clip-bw, var(--border-width, 1px));
|
|
6916
|
+
border-radius: inherit;
|
|
6917
|
+
border-style: solid;
|
|
6918
|
+
border-color: #0000;
|
|
6919
|
+
overflow: hidden;
|
|
6920
|
+
}
|
|
6921
|
+
|
|
6922
|
+
.field-radius-clip-outline {
|
|
6923
|
+
--field-clip-bw: var(--border-width-outline, 1px);
|
|
6924
|
+
}
|
|
6925
|
+
|
|
6902
6926
|
.toggle-fill-clip-flush-is {
|
|
6903
6927
|
inset-inline-start: 0;
|
|
6904
6928
|
}
|