burne-ui 2.1.1 → 2.1.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/skin-live-slots.json +13 -0
- package/dist/components/composite/AlertDialog/alertDialogAnimations.d.ts +2 -0
- package/dist/components/composite/AlertDialog/alertDialogAnimations.js +7 -0
- package/dist/components/composite/AlertDialog/alertDialogParts.d.ts +11 -6
- package/dist/components/composite/AlertDialog/alertDialogParts.js +65 -31
- package/dist/components/composite/AlertDialog/alertDialogStyles.d.ts +6 -3
- package/dist/components/composite/AlertDialog/alertDialogStyles.js +12 -8
- package/dist/components/composite/AlertDialog/alertDialogTypes.d.ts +8 -3
- package/dist/components/composite/AlertDialog/index.d.ts +10 -2
- package/dist/components/core/Dialog/dialogStyles.js +1 -1
- package/dist/components/core/Drawer/drawerStyles.d.ts +1 -1
- package/dist/components/core/Drawer/drawerStyles.js +2 -2
- package/dist/components/core/Meter/meterStyles.d.ts +1 -1
- package/dist/components/core/Meter/meterStyles.js +1 -1
- package/dist/components/core/Popover/popoverStyles.js +2 -2
- package/dist/components/core/ProgressBar/progressBarStyles.d.ts +1 -1
- package/dist/components/core/ProgressBar/progressBarStyles.js +1 -1
- package/dist/components/core/Skeleton/Skeleton.js +3 -2
- package/dist/components/core/Skeleton/skeletonParts.js +8 -8
- package/dist/components/core/Skeleton/skeletonStyles.d.ts +3 -2
- package/dist/components/core/Skeleton/skeletonStyles.js +6 -35
- package/dist/components/core/Switch/switchAnimations.js +7 -4
- package/dist/components/core/Tabs/useSlidingTabIndicator.js +8 -4
- package/dist/components/core/Toast/toastStyles.js +1 -1
- package/dist/components/core/Tooltip/tooltipStyles.js +2 -2
- package/dist/components/core/utils/modalSurfaceMotion.js +4 -3
- package/dist/components/core/utils/slotMotion/recipes/modalSurface.js +12 -12
- package/dist/skin.d.ts +1 -1
- package/dist/skin.js +2 -1
- package/dist/skins/skinLiveSlots.generated.d.ts +2 -2
- package/dist/skins/skinLiveSlots.generated.js +13 -0
- package/dist/ui.css +23 -0
- package/package.json +1 -1
package/cli/skin-live-slots.json
CHANGED
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"tooltip.panel"
|
|
63
63
|
],
|
|
64
64
|
"layers": [
|
|
65
|
+
"alertDialog.panel",
|
|
65
66
|
"card.root",
|
|
66
67
|
"dialog.panel",
|
|
67
68
|
"drawer.panel",
|
|
@@ -73,6 +74,18 @@
|
|
|
73
74
|
"alert.indicator",
|
|
74
75
|
"alert.root",
|
|
75
76
|
"alert.title",
|
|
77
|
+
"alertDialog.body",
|
|
78
|
+
"alertDialog.close",
|
|
79
|
+
"alertDialog.content",
|
|
80
|
+
"alertDialog.description",
|
|
81
|
+
"alertDialog.footer",
|
|
82
|
+
"alertDialog.header",
|
|
83
|
+
"alertDialog.headingBlock",
|
|
84
|
+
"alertDialog.indicator",
|
|
85
|
+
"alertDialog.overlay",
|
|
86
|
+
"alertDialog.panel",
|
|
87
|
+
"alertDialog.title",
|
|
88
|
+
"alertDialog.trigger",
|
|
76
89
|
"avatar.fallback",
|
|
77
90
|
"avatar.groupItem",
|
|
78
91
|
"avatar.image",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { MotionScopeValue } from '../../core/utils/slotMotion/index.js';
|
|
2
|
+
import { AlertVariant } from '../../core/Alert/alertTypes.js';
|
|
2
3
|
import { AlertDialogMotion, UseAlertDialogModalMotionProps } from './alertDialogTypes.js';
|
|
3
4
|
export declare const ALERT_DIALOG_MOTION_HOST_SLOTS: readonly ["overlay", "panel"];
|
|
4
5
|
export declare const ALERT_DIALOG_MOTION_DEFAULTS: AlertDialogMotion;
|
|
6
|
+
export declare function resolveAlertDialogMotionDefaults(variant: AlertVariant): AlertDialogMotion;
|
|
5
7
|
export declare function useAlertDialogModalMotion({ open, onOpenChange, closeOnEscape, closeOnInteractOutside, onEscapeKeyDown, onInteractOutside, initialFocus, contained, motionScope, }: UseAlertDialogModalMotionProps & {
|
|
6
8
|
motionScope?: MotionScopeValue | null;
|
|
7
9
|
}): {
|
|
@@ -3,12 +3,17 @@ import { useCallback } from "react";
|
|
|
3
3
|
import { useModalMotion } from "../../core/utils/useModalMotion.js";
|
|
4
4
|
import { useModalSlotMotionController } from "../../core/utils/slotMotion/modalSlotMotionHost.js";
|
|
5
5
|
import { applyModalOverlayInstant, applyModalPanelInstant } from "../../core/utils/slotMotion/recipes/modalSurface.js";
|
|
6
|
+
import { overlaySkinMotion } from "../../../skins/resolveVariantVisual.js";
|
|
7
|
+
import { KIT_ALERT_VARIANTS } from "../../core/Alert/alertTypes.js";
|
|
6
8
|
import { bindModalRecipes } from "../../core/utils/slotMotion/recipes/bindModal.js";
|
|
7
9
|
bindModalRecipes();
|
|
8
10
|
const ALERT_DIALOG_MOTION_DEFAULTS = {
|
|
9
11
|
overlay: { enter: "modalOverlayEnter", leave: "modalOverlayLeave" },
|
|
10
12
|
panel: { enter: "modalPanelEnter", leave: "modalPanelLeave" }
|
|
11
13
|
};
|
|
14
|
+
function resolveAlertDialogMotionDefaults(variant) {
|
|
15
|
+
return overlaySkinMotion(ALERT_DIALOG_MOTION_DEFAULTS, variant, KIT_ALERT_VARIANTS, "alertDialog");
|
|
16
|
+
}
|
|
12
17
|
function applyAlertDialogHostInstant(slot, el, phase) {
|
|
13
18
|
const open = phase === "enter";
|
|
14
19
|
if (slot === "overlay") applyModalOverlayInstant(el, open);
|
|
@@ -36,6 +41,7 @@ function useAlertDialogModalMotion({
|
|
|
36
41
|
onEscapeKeyDown,
|
|
37
42
|
onInteractOutside,
|
|
38
43
|
initialFocus,
|
|
44
|
+
enableContainedEscape: true,
|
|
39
45
|
slotMotion
|
|
40
46
|
});
|
|
41
47
|
return {
|
|
@@ -50,5 +56,6 @@ function useAlertDialogModalMotion({
|
|
|
50
56
|
}
|
|
51
57
|
export {
|
|
52
58
|
ALERT_DIALOG_MOTION_DEFAULTS,
|
|
59
|
+
resolveAlertDialogMotionDefaults,
|
|
53
60
|
useAlertDialogModalMotion
|
|
54
61
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AlertDialogPortalShellProps } from './alertDialogTypes.js';
|
|
2
2
|
export declare const AlertDialogContent: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
motion?: import('../../../index.js').Prettify<import('./alertDialogTypes.js').AlertDialogLifecycleMotion>;
|
|
4
4
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -48,8 +48,13 @@ export declare const AlertDialogTrigger: import('react').ForwardRefExoticCompone
|
|
|
48
48
|
children?: import('react').ReactNode;
|
|
49
49
|
motion?: import('../../../index.js').Prettify<import('./alertDialogTypes.js').AlertDialogPartMotion>;
|
|
50
50
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
51
|
-
export declare
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
export declare const AlertDialogPanel: import('react').ForwardRefExoticComponent<Omit<import('react').HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
52
|
+
variant?: import('../../../index.js').AlertVariant;
|
|
53
|
+
style?: import('react').CSSProperties;
|
|
54
|
+
themeAnchor?: HTMLElement | null;
|
|
55
|
+
portalContainer?: HTMLElement | null;
|
|
56
|
+
children?: import('react').ReactNode;
|
|
57
|
+
motion?: import('../../../index.js').Prettify<import('../../core/utils/slotMotion/index.js').MotionMapWithEvents<import('./alertDialogTypes.js').AlertDialogMotion>>;
|
|
58
|
+
motionController?: import('../../core/utils/slotMotion/index.js').MotionController;
|
|
59
|
+
} & import('../../core/utils/slotMotion/index.js').MotionStateHostProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
60
|
+
export declare function AlertDialogPortalShell({ open, children, className, style, variant, sizePreset, portalTheme, lightUi, titleId, descriptionId, hasTitle, hasDescription, onDialogClose, onDialogCancel, onBackdropMouseDown, dialogRef, overlayRef, panelRef, panelForwardedRef, panelRest, contained, }: AlertDialogPortalShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,16 +8,17 @@ import { dataOpenState, dataVariantProps } from "../../core/utils/dataContract.j
|
|
|
8
8
|
import { mergeAsChildProps } from "../../core/utils/mergeAsChildProps.js";
|
|
9
9
|
import { mergeRefs } from "../../core/utils/mergeRefs.js";
|
|
10
10
|
import { isContainedPortal, resolvePortalContainer, isOwnNativeDialogEvent } from "../../core/utils/portalContainer.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { resolveAlertVariant } from "../../core/Alert/alertAPI.js";
|
|
12
|
+
import { useSkinRegistryRevision, useSkinSurfaceStyle, mergeSkinSurfaceStyle, useApplySkinPortal } from "../../../skins/skinContext.js";
|
|
13
|
+
import { SkinShell } from "../../../skins/skinShell.js";
|
|
13
14
|
import { focusElement } from "../../core/utils/focusElement.js";
|
|
14
15
|
import { messageBannerCloseCellClass, messageBannerDescriptionCellClass, messageBannerTitleCellClass, messageBannerIndicatorCellClass, messageBannerGridClass } from "../../core/utils/messageBannerGridLayout.js";
|
|
15
16
|
import { useOverlayTriggerSlot } from "../../core/utils/overlayTriggerSqueeze.js";
|
|
16
17
|
import { alertDialogTriggerA11y, ALERT_DIALOG_ROLE, alertDialogDescribedBy, alertDialogLabelledBy } from "./alertDialogA11y.js";
|
|
17
18
|
import { injectFooterButtonSize, alertDialogShowsDefaultHeaderIcon, alertDialogHasIndicator, alertDialogHasClose, resolveAlertDialogHeaderGridSlots, alertDialogDefaultHeaderIcon } from "./alertDialogAPI.js";
|
|
18
|
-
import {
|
|
19
|
+
import { resolveAlertDialogMotionDefaults, useAlertDialogModalMotion } from "./alertDialogAnimations.js";
|
|
19
20
|
import { useAlertDialog, useOptionalAlertDialogHeaderContext, useAlertDialogClassNames, useOptionalAlertDialogMotionScope, useAlertDialogHeaderContext, AlertDialogHeaderProvider, AlertDialogMotionProvider, useAlertDialogMotionScope } from "./alertDialogContext.js";
|
|
20
|
-
import { ALERT_DIALOG_CLOSE_CLASS, ALERT_DIALOG_FOOTER_CLASS, alertDialogBodyClass, ALERT_DIALOG_TITLE_CLASS, ALERT_DIALOG_HEADING_BLOCK_CLASS, alertDialogHeaderIconWrapperClass, ALERT_DIALOG_INDICATOR_CLASS, ALERT_DIALOG_HEADER_CLASS, alertDialogContentClass, ALERT_DIALOG_TRIGGER_BASE_CLASS, alertDialogOverlayEnterStyle, alertDialogOverlayClass, alertDialogPanelClass, alertDialogNativeClass } from "./alertDialogStyles.js";
|
|
21
|
+
import { ALERT_DIALOG_CLOSE_CLASS, ALERT_DIALOG_FOOTER_CLASS, alertDialogBodyClass, ALERT_DIALOG_TITLE_CLASS, ALERT_DIALOG_HEADING_BLOCK_CLASS, alertDialogHeaderIconWrapperClass, ALERT_DIALOG_INDICATOR_CLASS, ALERT_DIALOG_HEADER_CLASS, alertDialogContentClass, ALERT_DIALOG_TRIGGER_BASE_CLASS, alertDialogOverlayEnterStyle, alertDialogOverlayClass, ALERT_DIALOG_PANEL_LAYER_CONTENT_CLASS, alertDialogPanelClass, alertDialogNativeClass } from "./alertDialogStyles.js";
|
|
21
22
|
import { cn } from "../../../utils/cn.js";
|
|
22
23
|
import { useMotionPart } from "../../core/utils/slotMotion/useMotionPart.js";
|
|
23
24
|
import { CloseButton } from "../../core/CloseButton/CloseButton.js";
|
|
@@ -475,33 +476,45 @@ const AlertDialogTrigger = forwardRef(
|
|
|
475
476
|
}
|
|
476
477
|
);
|
|
477
478
|
AlertDialogTrigger.displayName = "AlertDialog.Trigger";
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
479
|
+
const AlertDialogPanel = forwardRef(
|
|
480
|
+
function AlertDialogPanel2({ motion, motionController, motionState, motionPayload, playInitialState, variant: variantProp, ...props }, forwardedRef) {
|
|
481
|
+
const { variant: rootVariant } = useAlertDialog();
|
|
482
|
+
const variant = variantProp !== void 0 ? resolveAlertVariant(variantProp) : rootVariant;
|
|
483
|
+
const parentScope = useOptionalAlertDialogMotionScope();
|
|
484
|
+
const skinRevision = useSkinRegistryRevision();
|
|
485
|
+
const motionDefaults = useMemo(() => {
|
|
486
|
+
return resolveAlertDialogMotionDefaults(variant);
|
|
487
|
+
}, [skinRevision, variant]);
|
|
488
|
+
const mergedSlots = mergeMotionSlotMaps(parentScope?.getRootMotion(), motion);
|
|
489
|
+
const siblings = mergeMotionRootSiblings(
|
|
490
|
+
{ events: parentScope?.getEvents(), states: parentScope?.getStates() },
|
|
491
|
+
motion
|
|
492
|
+
);
|
|
493
|
+
const merged = { ...mergedSlots, ...siblings };
|
|
494
|
+
return /* @__PURE__ */ jsx(
|
|
495
|
+
AlertDialogMotionProvider,
|
|
496
|
+
{
|
|
497
|
+
motion: merged,
|
|
498
|
+
defaults: motionDefaults,
|
|
499
|
+
controller: motionController,
|
|
500
|
+
motionState,
|
|
501
|
+
motionPayload,
|
|
502
|
+
playInitialState,
|
|
503
|
+
children: /* @__PURE__ */ jsx(AlertDialogPanelHost, { ...props, variant, forwardedRef })
|
|
504
|
+
}
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
);
|
|
499
508
|
AlertDialogPanel.displayName = "AlertDialog.Panel";
|
|
500
509
|
function AlertDialogPanelHost({
|
|
510
|
+
variant: variantProp,
|
|
501
511
|
className,
|
|
512
|
+
style,
|
|
502
513
|
themeAnchor,
|
|
503
514
|
portalContainer: portalContainerProp,
|
|
504
|
-
children
|
|
515
|
+
children,
|
|
516
|
+
forwardedRef,
|
|
517
|
+
...rest
|
|
505
518
|
}) {
|
|
506
519
|
const {
|
|
507
520
|
open,
|
|
@@ -509,7 +522,7 @@ function AlertDialogPanelHost({
|
|
|
509
522
|
descriptionId,
|
|
510
523
|
hasTitle,
|
|
511
524
|
hasDescription,
|
|
512
|
-
variant,
|
|
525
|
+
variant: rootVariant,
|
|
513
526
|
sizePreset,
|
|
514
527
|
closeOnEscape,
|
|
515
528
|
closeOnInteractOutside,
|
|
@@ -519,6 +532,8 @@ function AlertDialogPanelHost({
|
|
|
519
532
|
onOpenChange,
|
|
520
533
|
portalContainer: portalContainerFromRoot
|
|
521
534
|
} = useAlertDialog();
|
|
535
|
+
const variant = variantProp ?? rootVariant;
|
|
536
|
+
const surfaceStyle = useSkinSurfaceStyle(variant);
|
|
522
537
|
const motionScope = useAlertDialogMotionScope();
|
|
523
538
|
const portalHost = resolvePortalContainer(
|
|
524
539
|
portalContainerProp ?? portalContainerFromRoot
|
|
@@ -545,6 +560,7 @@ function AlertDialogPanelHost({
|
|
|
545
560
|
{
|
|
546
561
|
open,
|
|
547
562
|
className,
|
|
563
|
+
style: mergeSkinSurfaceStyle(surfaceStyle, style),
|
|
548
564
|
variant,
|
|
549
565
|
sizePreset,
|
|
550
566
|
portalTheme,
|
|
@@ -553,11 +569,14 @@ function AlertDialogPanelHost({
|
|
|
553
569
|
descriptionId,
|
|
554
570
|
hasTitle,
|
|
555
571
|
hasDescription,
|
|
572
|
+
onDialogClose: () => onOpenChange(false),
|
|
556
573
|
onDialogCancel: motion.handleDialogCancel,
|
|
557
574
|
onBackdropMouseDown: motion.handleBackdropPointerDown,
|
|
558
575
|
dialogRef: motion.dialogRef,
|
|
559
576
|
overlayRef: motion.overlayRef,
|
|
560
577
|
panelRef: motion.panelRef,
|
|
578
|
+
panelForwardedRef: forwardedRef,
|
|
579
|
+
panelRest: rest,
|
|
561
580
|
contained,
|
|
562
581
|
children
|
|
563
582
|
}
|
|
@@ -569,6 +588,7 @@ function AlertDialogPortalShell({
|
|
|
569
588
|
open,
|
|
570
589
|
children,
|
|
571
590
|
className,
|
|
591
|
+
style,
|
|
572
592
|
variant,
|
|
573
593
|
sizePreset,
|
|
574
594
|
portalTheme,
|
|
@@ -577,17 +597,19 @@ function AlertDialogPortalShell({
|
|
|
577
597
|
descriptionId,
|
|
578
598
|
hasTitle,
|
|
579
599
|
hasDescription,
|
|
600
|
+
onDialogClose,
|
|
580
601
|
onDialogCancel,
|
|
581
602
|
onBackdropMouseDown,
|
|
582
603
|
dialogRef,
|
|
583
604
|
overlayRef,
|
|
584
605
|
panelRef,
|
|
606
|
+
panelForwardedRef,
|
|
607
|
+
panelRest,
|
|
585
608
|
contained = false
|
|
586
609
|
}) {
|
|
587
610
|
const slotClassNames = useAlertDialogClassNames();
|
|
588
611
|
const { size, status } = useAlertDialog();
|
|
589
612
|
const motionScope = useOptionalAlertDialogMotionScope();
|
|
590
|
-
const studioPanelRef = useStudioSlotRef("alertDialog.panel", motionScope);
|
|
591
613
|
useApplySkinPortal(dialogRef);
|
|
592
614
|
return /* @__PURE__ */ jsxs(
|
|
593
615
|
"dialog",
|
|
@@ -596,6 +618,10 @@ function AlertDialogPortalShell({
|
|
|
596
618
|
ref: dialogRef,
|
|
597
619
|
"data-state": dataOpenState(open),
|
|
598
620
|
role: ALERT_DIALOG_ROLE,
|
|
621
|
+
onClose: (e) => {
|
|
622
|
+
if (!isOwnNativeDialogEvent(e)) return;
|
|
623
|
+
onDialogClose();
|
|
624
|
+
},
|
|
599
625
|
onCancel: (e) => {
|
|
600
626
|
if (!isOwnNativeDialogEvent(e)) return;
|
|
601
627
|
e.preventDefault();
|
|
@@ -619,17 +645,25 @@ function AlertDialogPortalShell({
|
|
|
619
645
|
}
|
|
620
646
|
),
|
|
621
647
|
/* @__PURE__ */ jsx(
|
|
622
|
-
|
|
648
|
+
SkinShell,
|
|
623
649
|
{
|
|
624
|
-
ref: mergeRefs(panelRef, studioPanelRef, (node) => motionScope?.registerTarget("panel", node)),
|
|
625
650
|
tabIndex: -1,
|
|
651
|
+
style,
|
|
652
|
+
...panelRest,
|
|
653
|
+
...dataVariantProps({ size, variant, status }),
|
|
654
|
+
part: "alertDialog.panel",
|
|
655
|
+
variant,
|
|
656
|
+
scope: motionScope,
|
|
657
|
+
slot: "panel",
|
|
658
|
+
enterOnMount: false,
|
|
626
659
|
className: alertDialogPanelClass({
|
|
627
660
|
variant,
|
|
628
661
|
sizePreset,
|
|
629
662
|
className,
|
|
630
663
|
slotClass: slotClassNames.panel
|
|
631
664
|
}),
|
|
632
|
-
|
|
665
|
+
contentClassName: ALERT_DIALOG_PANEL_LAYER_CONTENT_CLASS,
|
|
666
|
+
ref: mergeRefs(panelRef, panelForwardedRef),
|
|
633
667
|
children: /* @__PURE__ */ jsx(AlertDialogContent, { children })
|
|
634
668
|
}
|
|
635
669
|
)
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { AlertStatus, AlertVariant } from '../../core/Alert/alertTypes.js';
|
|
1
|
+
import { AlertStatus, AlertVariant, KitAlertVariant } from '../../core/Alert/alertTypes.js';
|
|
2
2
|
import { AlertDialogSize, AlertDialogSizePreset } from './alertDialogTypes.js';
|
|
3
3
|
import { ButtonSize } from '../../core/Button/buttonTypes.js';
|
|
4
4
|
export declare const ALERT_DIALOG_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col text-start";
|
|
5
5
|
export declare const ALERT_DIALOG_SIZE: Record<AlertDialogSize, AlertDialogSizePreset>;
|
|
6
6
|
export declare const ALERT_DIALOG_NATIVE_CLASS = "m-0 flex h-full w-full max-h-none max-w-none items-center justify-center border-0 bg-transparent p-large open:flex [&::backdrop]:bg-transparent";
|
|
7
7
|
export declare const ALERT_DIALOG_NATIVE_POSITION_FIXED_CLASS = "fixed inset-0 z-dialog";
|
|
8
|
-
export declare const ALERT_DIALOG_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-dialog";
|
|
8
|
+
export declare const ALERT_DIALOG_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-dialog portal-contained";
|
|
9
9
|
export declare function alertDialogNativeClass(contained: boolean): string;
|
|
10
10
|
export declare const ALERT_DIALOG_PANEL_SHELL_CLASS = "relative z-10 w-full outline-none";
|
|
11
|
-
export declare const ALERT_DIALOG_PANEL_SURFACE_CLASS = "flex min-h-0 flex-col overflow-hidden text-start";
|
|
11
|
+
export declare const ALERT_DIALOG_PANEL_SURFACE_CLASS = "flex min-h-0 flex-col overflow-hidden text-start text-foreground";
|
|
12
|
+
export declare const ALERT_DIALOG_PANEL_SURFACE: Record<KitAlertVariant, string>;
|
|
13
|
+
/** Fills the panel when `SkinShell` wraps children in a declarative content node. */
|
|
14
|
+
export declare const ALERT_DIALOG_PANEL_LAYER_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col";
|
|
12
15
|
export declare const ALERT_DIALOG_CLOSE_CLASS = "shrink-0";
|
|
13
16
|
export declare const ALERT_DIALOG_TRIGGER_BASE_CLASS = "outline-none focus-ring";
|
|
14
17
|
export declare const ALERT_DIALOG_INDICATOR_CLASS = "shrink-0 [&_svg]:block";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { alertIndicatorWrapperTextClass
|
|
1
|
+
import { alertIndicatorWrapperTextClass } 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
4
|
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
@@ -33,7 +33,7 @@ const ALERT_DIALOG_SIZE = {
|
|
|
33
33
|
};
|
|
34
34
|
const ALERT_DIALOG_NATIVE_CLASS = "m-0 flex h-full w-full max-h-none max-w-none items-center justify-center border-0 bg-transparent p-large open:flex [&::backdrop]:bg-transparent";
|
|
35
35
|
const ALERT_DIALOG_NATIVE_POSITION_FIXED_CLASS = "fixed inset-0 z-dialog";
|
|
36
|
-
const ALERT_DIALOG_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-dialog";
|
|
36
|
+
const ALERT_DIALOG_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-dialog portal-contained";
|
|
37
37
|
function alertDialogNativeClass(contained) {
|
|
38
38
|
return cn(
|
|
39
39
|
contained ? ALERT_DIALOG_NATIVE_POSITION_CONTAINED_CLASS : ALERT_DIALOG_NATIVE_POSITION_FIXED_CLASS,
|
|
@@ -41,7 +41,13 @@ function alertDialogNativeClass(contained) {
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
const ALERT_DIALOG_PANEL_SHELL_CLASS = "relative z-10 w-full outline-none";
|
|
44
|
-
const ALERT_DIALOG_PANEL_SURFACE_CLASS = "flex min-h-0 flex-col overflow-hidden text-start";
|
|
44
|
+
const ALERT_DIALOG_PANEL_SURFACE_CLASS = "flex min-h-0 flex-col overflow-hidden text-start text-foreground";
|
|
45
|
+
const ALERT_DIALOG_PANEL_SURFACE = {
|
|
46
|
+
default: "border-token bg-surface shadow-token-large",
|
|
47
|
+
outline: "bg-background border-token-outline text-foreground shadow-token-large",
|
|
48
|
+
secondary: "bg-secondary border-token text-secondary-foreground shadow-token-large"
|
|
49
|
+
};
|
|
50
|
+
const ALERT_DIALOG_PANEL_LAYER_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col";
|
|
45
51
|
const ALERT_DIALOG_CLOSE_CLASS = "shrink-0";
|
|
46
52
|
const ALERT_DIALOG_TRIGGER_BASE_CLASS = "outline-none focus-ring";
|
|
47
53
|
const ALERT_DIALOG_INDICATOR_CLASS = "shrink-0 [&_svg]:block";
|
|
@@ -50,9 +56,6 @@ const ALERT_DIALOG_HEADING_BLOCK_CLASS = "contents";
|
|
|
50
56
|
const ALERT_DIALOG_TITLE_CLASS = "font-w-mid";
|
|
51
57
|
const ALERT_DIALOG_BODY_BASE_CLASS = "min-h-0 flex-1 overflow-y-auto overscroll-contain py-small";
|
|
52
58
|
const ALERT_DIALOG_FOOTER_CLASS = "flex shrink-0 flex-wrap items-center justify-end gap-base";
|
|
53
|
-
function alertDialogPanelSurfaceClass(variant) {
|
|
54
|
-
return cn(alertSurfaceClass(variant, "default"), "shadow-token-large");
|
|
55
|
-
}
|
|
56
59
|
function alertDialogOverlayClass(lightUi, slotClass) {
|
|
57
60
|
return dialogOverlayClass(lightUi, slotClass);
|
|
58
61
|
}
|
|
@@ -83,7 +86,7 @@ function alertDialogPanelClass({
|
|
|
83
86
|
sizePreset.rounded,
|
|
84
87
|
ALERT_DIALOG_PANEL_SURFACE_CLASS,
|
|
85
88
|
sizePreset.maxHeight,
|
|
86
|
-
skinVisualClass(visual,
|
|
89
|
+
skinVisualClass(visual, ALERT_DIALOG_PANEL_SURFACE[visual.key]),
|
|
87
90
|
slotClass,
|
|
88
91
|
className
|
|
89
92
|
);
|
|
@@ -105,7 +108,9 @@ export {
|
|
|
105
108
|
ALERT_DIALOG_NATIVE_CLASS,
|
|
106
109
|
ALERT_DIALOG_NATIVE_POSITION_CONTAINED_CLASS,
|
|
107
110
|
ALERT_DIALOG_NATIVE_POSITION_FIXED_CLASS,
|
|
111
|
+
ALERT_DIALOG_PANEL_LAYER_CONTENT_CLASS,
|
|
108
112
|
ALERT_DIALOG_PANEL_SHELL_CLASS,
|
|
113
|
+
ALERT_DIALOG_PANEL_SURFACE,
|
|
109
114
|
ALERT_DIALOG_PANEL_SURFACE_CLASS,
|
|
110
115
|
ALERT_DIALOG_SIZE,
|
|
111
116
|
ALERT_DIALOG_TITLE_CLASS,
|
|
@@ -117,6 +122,5 @@ export {
|
|
|
117
122
|
alertDialogOverlayClass,
|
|
118
123
|
alertDialogOverlayEnterStyle,
|
|
119
124
|
alertDialogPanelClass,
|
|
120
|
-
alertDialogPanelSurfaceClass,
|
|
121
125
|
footerButtonSizeForAlertDialog
|
|
122
126
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, HTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, CSSProperties, ForwardedRef, HTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { Prettify } from '../../../utils/prettify.js';
|
|
3
3
|
import { AlertStatus, AlertVariant } from '../../core/Alert/alertTypes.js';
|
|
4
4
|
import { CloseButtonProps } from '../../core/CloseButton/index.js';
|
|
@@ -97,8 +97,9 @@ export type AlertDialogClassNamesProviderProps = {
|
|
|
97
97
|
classNames?: Prettify<AlertDialogClassNames>;
|
|
98
98
|
children?: ReactNode;
|
|
99
99
|
};
|
|
100
|
-
export type AlertDialogPanelProps = {
|
|
101
|
-
|
|
100
|
+
export type AlertDialogPanelProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
101
|
+
variant?: AlertVariant;
|
|
102
|
+
style?: CSSProperties;
|
|
102
103
|
/**
|
|
103
104
|
* Anchor for inheriting the light theme from the wrapper (`data-theme`).
|
|
104
105
|
* By default — `document.activeElement` at the moment of opening.
|
|
@@ -202,6 +203,7 @@ export type AlertDialogPortalShellProps = {
|
|
|
202
203
|
open: boolean;
|
|
203
204
|
children: ReactNode;
|
|
204
205
|
className?: string;
|
|
206
|
+
style?: CSSProperties;
|
|
205
207
|
variant: AlertVariant;
|
|
206
208
|
sizePreset: AlertDialogSizePreset;
|
|
207
209
|
portalTheme: Record<string, string | undefined>;
|
|
@@ -210,11 +212,14 @@ export type AlertDialogPortalShellProps = {
|
|
|
210
212
|
descriptionId: string;
|
|
211
213
|
hasTitle: boolean;
|
|
212
214
|
hasDescription: boolean;
|
|
215
|
+
onDialogClose: () => void;
|
|
213
216
|
onDialogCancel: (event: OverlayDismissEvent) => void;
|
|
214
217
|
onBackdropMouseDown: (event: MouseEvent<HTMLDivElement>) => void;
|
|
215
218
|
dialogRef: React.RefObject<HTMLDialogElement | null>;
|
|
216
219
|
overlayRef: React.RefObject<HTMLDivElement | null>;
|
|
217
220
|
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
221
|
+
panelForwardedRef?: ForwardedRef<HTMLDivElement>;
|
|
222
|
+
panelRest?: HTMLAttributes<HTMLDivElement>;
|
|
218
223
|
/** Custom portal host — use absolute positioning instead of fixed/top-layer. */
|
|
219
224
|
contained?: boolean;
|
|
220
225
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AlertDialogRoot } from './AlertDialog.js';
|
|
2
2
|
export declare const AlertDialog: typeof AlertDialogRoot & {
|
|
3
3
|
Trigger: import('react').ForwardRefExoticComponent<import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
4
|
asChild?: boolean;
|
|
@@ -6,7 +6,15 @@ export declare const AlertDialog: typeof AlertDialogRoot & {
|
|
|
6
6
|
motion?: import('../../../index.js').Prettify<import('./alertDialogTypes.js').AlertDialogPartMotion>;
|
|
7
7
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
8
8
|
Overlay: import('react').ForwardRefExoticComponent<import('../../core/utils/overlayLayer.js').OverlayDismissProps & import('react').RefAttributes<unknown>>;
|
|
9
|
-
Panel:
|
|
9
|
+
Panel: import('react').ForwardRefExoticComponent<Omit<import('react').HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
10
|
+
variant?: import('../../../index.js').AlertVariant;
|
|
11
|
+
style?: import('react').CSSProperties;
|
|
12
|
+
themeAnchor?: HTMLElement | null;
|
|
13
|
+
portalContainer?: HTMLElement | null;
|
|
14
|
+
children?: import('react').ReactNode;
|
|
15
|
+
motion?: import('../../../index.js').Prettify<import('../../../index.js').MotionMapWithEvents<import('./alertDialogTypes.js').AlertDialogMotion>>;
|
|
16
|
+
motionController?: import('../../../index.js').MotionController;
|
|
17
|
+
} & import('../../../index.js').MotionStateHostProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
18
|
Action: import('react').ForwardRefExoticComponent<import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
11
19
|
children?: import('react').ReactNode;
|
|
12
20
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -45,7 +45,7 @@ const DIALOG_PANEL_BASE_CLASS = "relative z-10 w-full outline-none";
|
|
|
45
45
|
const DIALOG_PANEL_LAYOUT_CLASS = "flex min-h-0 flex-col overflow-hidden text-start text-foreground";
|
|
46
46
|
const DIALOG_PANEL_SURFACE = {
|
|
47
47
|
default: "border-token bg-surface shadow-token-large",
|
|
48
|
-
outline: "bg-
|
|
48
|
+
outline: "bg-background border-token-outline text-foreground shadow-token-large",
|
|
49
49
|
secondary: "bg-secondary border-token text-secondary-foreground shadow-token-large"
|
|
50
50
|
};
|
|
51
51
|
const DIALOG_PANEL_LAYER_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col";
|
|
@@ -5,7 +5,7 @@ export declare const DRAWER_SIZE: Record<DrawerSize, DrawerSizePreset>;
|
|
|
5
5
|
export declare const DRAWER_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col text-start";
|
|
6
6
|
export declare const DRAWER_NATIVE_CLASS = "m-0 h-full w-full max-h-none max-w-none border-0 bg-transparent p-0 open:block [&::backdrop]:bg-transparent";
|
|
7
7
|
export declare const DRAWER_NATIVE_POSITION_FIXED_CLASS = "fixed inset-0 z-dialog";
|
|
8
|
-
export declare const DRAWER_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-dialog";
|
|
8
|
+
export declare const DRAWER_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-dialog portal-contained";
|
|
9
9
|
export declare function drawerNativeClass(contained: boolean): string;
|
|
10
10
|
export declare const DRAWER_OVERLAY_LIGHT_CLASS = "overlay-backdrop";
|
|
11
11
|
export declare const DRAWER_OVERLAY_DARK_CLASS = "overlay-backdrop-scrim";
|
|
@@ -82,7 +82,7 @@ const DRAWER_SIZE = {
|
|
|
82
82
|
const DRAWER_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col text-start";
|
|
83
83
|
const DRAWER_NATIVE_CLASS = "m-0 h-full w-full max-h-none max-w-none border-0 bg-transparent p-0 open:block [&::backdrop]:bg-transparent";
|
|
84
84
|
const DRAWER_NATIVE_POSITION_FIXED_CLASS = "fixed inset-0 z-dialog";
|
|
85
|
-
const DRAWER_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-dialog";
|
|
85
|
+
const DRAWER_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-dialog portal-contained";
|
|
86
86
|
function drawerNativeClass(contained) {
|
|
87
87
|
return cn(
|
|
88
88
|
contained ? DRAWER_NATIVE_POSITION_CONTAINED_CLASS : DRAWER_NATIVE_POSITION_FIXED_CLASS,
|
|
@@ -94,7 +94,7 @@ const DRAWER_OVERLAY_DARK_CLASS = "overlay-backdrop-scrim";
|
|
|
94
94
|
const DRAWER_PANEL_BASE_CLASS = "absolute z-10 flex flex-col outline-none overflow-hidden text-foreground";
|
|
95
95
|
const DRAWER_PANEL_SURFACE = {
|
|
96
96
|
default: "border-token bg-surface text-foreground shadow-token-large",
|
|
97
|
-
outline: "bg-
|
|
97
|
+
outline: "bg-background border-token-outline text-foreground shadow-token-large",
|
|
98
98
|
secondary: "bg-secondary border-token text-secondary-foreground shadow-token-large"
|
|
99
99
|
};
|
|
100
100
|
const DRAWER_PANEL_LAYER_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col";
|
|
@@ -3,7 +3,7 @@ import { SemanticStatus } from '../utils/semanticStatusIcons.js';
|
|
|
3
3
|
import { MeterOrientation, MeterSize } from './meterTypes.js';
|
|
4
4
|
export declare const METER_RAIL_HEIGHT_CLASS: Record<MeterSize, string>;
|
|
5
5
|
export declare const METER_RAIL_WIDTH_CLASS: Record<MeterSize, string>;
|
|
6
|
-
export declare const METER_TRACK_BASE_CLASS = "relative overflow-hidden rounded-full bg-primary-tint";
|
|
6
|
+
export declare const METER_TRACK_BASE_CLASS = "relative overflow-hidden rounded-full bg-primary-tint [contain:paint]";
|
|
7
7
|
export declare const METER_TRACK_HORIZONTAL_CLASS = "w-full";
|
|
8
8
|
export declare const METER_TRACK_VERTICAL_CLASS = "h-48";
|
|
9
9
|
export declare const METER_FILL_BASE_CLASS = "absolute rounded-full";
|
|
@@ -14,7 +14,7 @@ const METER_RAIL_WIDTH_CLASS = {
|
|
|
14
14
|
mid: "w-mid",
|
|
15
15
|
large: "w-large"
|
|
16
16
|
};
|
|
17
|
-
const METER_TRACK_BASE_CLASS = "relative overflow-hidden rounded-full bg-primary-tint";
|
|
17
|
+
const METER_TRACK_BASE_CLASS = "relative overflow-hidden rounded-full bg-primary-tint [contain:paint]";
|
|
18
18
|
const METER_TRACK_HORIZONTAL_CLASS = "w-full";
|
|
19
19
|
const METER_TRACK_VERTICAL_CLASS = "h-48";
|
|
20
20
|
const METER_FILL_BASE_CLASS = "absolute rounded-full";
|
|
@@ -28,13 +28,13 @@ 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
30
|
default: "border-token bg-surface shadow-token-mid",
|
|
31
|
-
outline: "bg-
|
|
31
|
+
outline: "bg-background border-token-outline text-foreground shadow-token-mid",
|
|
32
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 = {
|
|
36
36
|
default: "border-token bg-surface",
|
|
37
|
-
outline: "border-token-outline bg-
|
|
37
|
+
outline: "border-token-outline bg-background",
|
|
38
38
|
secondary: "border-token bg-secondary"
|
|
39
39
|
};
|
|
40
40
|
const POPOVER_HEADER_CLASS = "flex shrink-0 flex-col text-start";
|
|
@@ -3,7 +3,7 @@ import { SemanticStatus } from '../utils/semanticStatusIcons.js';
|
|
|
3
3
|
import { ProgressBarOrientation, ProgressBarSize } from './progressBarTypes.js';
|
|
4
4
|
export declare const PROGRESS_BAR_RAIL_HEIGHT_CLASS: Record<ProgressBarSize, string>;
|
|
5
5
|
export declare const PROGRESS_BAR_RAIL_WIDTH_CLASS: Record<ProgressBarSize, string>;
|
|
6
|
-
export declare const PROGRESS_BAR_TRACK_BASE_CLASS = "relative overflow-hidden rounded-full bg-primary-tint";
|
|
6
|
+
export declare const PROGRESS_BAR_TRACK_BASE_CLASS = "relative overflow-hidden rounded-full bg-primary-tint [contain:paint]";
|
|
7
7
|
export declare const PROGRESS_BAR_TRACK_HORIZONTAL_CLASS = "w-full";
|
|
8
8
|
export declare const PROGRESS_BAR_TRACK_VERTICAL_CLASS = "h-48";
|
|
9
9
|
export declare const PROGRESS_BAR_FILL_BASE_CLASS = "absolute rounded-full";
|
|
@@ -14,7 +14,7 @@ const PROGRESS_BAR_RAIL_WIDTH_CLASS = {
|
|
|
14
14
|
mid: "w-mid",
|
|
15
15
|
large: "w-large"
|
|
16
16
|
};
|
|
17
|
-
const PROGRESS_BAR_TRACK_BASE_CLASS = "relative overflow-hidden rounded-full bg-primary-tint";
|
|
17
|
+
const PROGRESS_BAR_TRACK_BASE_CLASS = "relative overflow-hidden rounded-full bg-primary-tint [contain:paint]";
|
|
18
18
|
const PROGRESS_BAR_TRACK_HORIZONTAL_CLASS = "w-full";
|
|
19
19
|
const PROGRESS_BAR_TRACK_VERTICAL_CLASS = "h-48";
|
|
20
20
|
const PROGRESS_BAR_FILL_BASE_CLASS = "absolute rounded-full";
|
|
@@ -6,7 +6,7 @@ import { resolveSkeletonMotionDefaults, useSkeletonSlotMotion } from "./skeleton
|
|
|
6
6
|
import { SkeletonMotionProvider, useSkeletonMotionScope } from "./skeletonContext.js";
|
|
7
7
|
import { SkeletonWave } from "./skeletonParts.js";
|
|
8
8
|
import { SkeletonBlock, SkeletonCircle, SkeletonRegion, SkeletonText } from "./skeletonParts.js";
|
|
9
|
-
import {
|
|
9
|
+
import { skeletonRadiusClass, skeletonVariantClass, SKELETON_BASE_CLASS } from "./skeletonStyles.js";
|
|
10
10
|
import { useSkeletonRootState } from "./useSkeletonRootState.js";
|
|
11
11
|
import { cn } from "../../../utils/cn.js";
|
|
12
12
|
const SkeletonRoot = forwardRef(function SkeletonRoot2({
|
|
@@ -84,11 +84,12 @@ function SkeletonRootSurface({
|
|
|
84
84
|
ref: part.setRef,
|
|
85
85
|
className: cn(
|
|
86
86
|
SKELETON_BASE_CLASS,
|
|
87
|
+
skeletonVariantClass(animation),
|
|
87
88
|
skeletonRadiusClass(radius),
|
|
88
89
|
classNames?.root,
|
|
89
90
|
className
|
|
90
91
|
),
|
|
91
|
-
style
|
|
92
|
+
style,
|
|
92
93
|
...skeletonPresentationProps(),
|
|
93
94
|
...domRest,
|
|
94
95
|
...part.pointerHandlers,
|
|
@@ -4,7 +4,7 @@ import { forwardRef, useMemo } from "react";
|
|
|
4
4
|
import { skeletonRegionA11yProps, skeletonPresentationProps } from "./skeletonA11y.js";
|
|
5
5
|
import { resolveSkeletonMotionDefaults, useSkeletonSlotMotion } from "./skeletonAnimations.js";
|
|
6
6
|
import { SkeletonMotionProvider, useSkeletonMotionScope } from "./skeletonContext.js";
|
|
7
|
-
import { SKELETON_CIRCLE_SIZE_DEFAULT,
|
|
7
|
+
import { SKELETON_CIRCLE_SIZE_DEFAULT, SKELETON_BLOCK_CLASS, skeletonVariantClass, SKELETON_BASE_CLASS, SKELETON_TEXT_LINE_LAST_SHORT_CLASS, SKELETON_TEXT_LINE_FULL_CLASS, skeletonLineAnimationDelay, SKELETON_TEXT_LINE_CLASS, SKELETON_TEXT_ROOT_CLASS, SKELETON_CIRCLE_RADIUS_CLASS, SKELETON_WAVE_OVERLAY_CLASS } from "./skeletonStyles.js";
|
|
8
8
|
import { dataVariantProps } from "../utils/dataContract.js";
|
|
9
9
|
import { cn } from "../../../utils/cn.js";
|
|
10
10
|
function SkeletonWave({ className, style }) {
|
|
@@ -13,7 +13,7 @@ function SkeletonWave({ className, style }) {
|
|
|
13
13
|
{
|
|
14
14
|
"aria-hidden": true,
|
|
15
15
|
className: cn(SKELETON_WAVE_OVERLAY_CLASS, className),
|
|
16
|
-
style
|
|
16
|
+
style
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
}
|
|
@@ -105,12 +105,13 @@ function SkeletonCircleSurface({
|
|
|
105
105
|
ref: part.setRef,
|
|
106
106
|
className: cn(
|
|
107
107
|
SKELETON_BASE_CLASS,
|
|
108
|
+
skeletonVariantClass(animation),
|
|
108
109
|
SKELETON_CIRCLE_RADIUS_CLASS,
|
|
109
110
|
size,
|
|
110
111
|
classNames?.root,
|
|
111
112
|
className
|
|
112
113
|
),
|
|
113
|
-
style
|
|
114
|
+
style,
|
|
114
115
|
...skeletonPresentationProps(),
|
|
115
116
|
...domRest,
|
|
116
117
|
...part.pointerHandlers,
|
|
@@ -199,14 +200,12 @@ function SkeletonTextSurface({
|
|
|
199
200
|
{
|
|
200
201
|
className: cn(
|
|
201
202
|
SKELETON_BASE_CLASS,
|
|
203
|
+
skeletonVariantClass(animation),
|
|
202
204
|
SKELETON_TEXT_LINE_CLASS,
|
|
203
205
|
widthClass,
|
|
204
206
|
classNames?.line
|
|
205
207
|
),
|
|
206
|
-
style: {
|
|
207
|
-
...skeletonVariantStyle(animation),
|
|
208
|
-
animationDelay: skeletonLineAnimationDelay(index)
|
|
209
|
-
},
|
|
208
|
+
style: index > 0 ? { animationDelay: skeletonLineAnimationDelay(index) } : void 0,
|
|
210
209
|
children: animation === "wave" ? /* @__PURE__ */ jsx(SkeletonWave, { className: classNames?.wave }) : null
|
|
211
210
|
},
|
|
212
211
|
index
|
|
@@ -267,11 +266,12 @@ function SkeletonBlockSurface({
|
|
|
267
266
|
ref: part.setRef,
|
|
268
267
|
className: cn(
|
|
269
268
|
SKELETON_BASE_CLASS,
|
|
269
|
+
skeletonVariantClass(animation),
|
|
270
270
|
SKELETON_BLOCK_CLASS,
|
|
271
271
|
classNames?.root,
|
|
272
272
|
className
|
|
273
273
|
),
|
|
274
|
-
style
|
|
274
|
+
style,
|
|
275
275
|
...skeletonPresentationProps(),
|
|
276
276
|
...domRest,
|
|
277
277
|
...part.pointerHandlers,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { SkeletonAnimation, SkeletonRadius } from './skeletonTypes.js';
|
|
3
3
|
export declare const SKELETON_BASE_CLASS = "relative overflow-hidden bg-primary-tint skeleton-animate";
|
|
4
|
-
export declare const SKELETON_WAVE_OVERLAY_CLASS = "pointer-events-none absolute inset-0 -translate-x-full skeleton-animate";
|
|
4
|
+
export declare const SKELETON_WAVE_OVERLAY_CLASS = "pointer-events-none absolute inset-0 -translate-x-full skeleton-animate skeleton-wave";
|
|
5
5
|
export declare const SKELETON_CIRCLE_RADIUS_CLASS = "rounded-full";
|
|
6
6
|
export declare const SKELETON_CIRCLE_SIZE_DEFAULT = "min-h-control-base w-control-base";
|
|
7
7
|
export declare const SKELETON_TEXT_ROOT_CLASS = "flex flex-col gap-small";
|
|
@@ -17,7 +17,8 @@ export declare const SKELETON_WAVE_GRADIENT = "linear-gradient(90deg, transparen
|
|
|
17
17
|
export declare const SKELETON_SHIMMER_GRADIENT = "linear-gradient(90deg, var(--color-primary-tint) 0%, var(--color-primary-tint-strong) 50%, var(--color-primary-tint) 100%)";
|
|
18
18
|
export declare function skeletonPulseStyle(): CSSProperties;
|
|
19
19
|
export declare function skeletonShimmerStyle(): CSSProperties;
|
|
20
|
-
export declare function
|
|
20
|
+
export declare function skeletonVariantClass(variant: SkeletonAnimation): string;
|
|
21
|
+
export declare function skeletonVariantStyle(_variant: SkeletonAnimation): CSSProperties;
|
|
21
22
|
export declare function skeletonWaveOverlayStyle(): CSSProperties;
|
|
22
23
|
export declare function skeletonRadiusClass(radius: SkeletonRadius): string;
|
|
23
24
|
export declare function skeletonLineAnimationDelay(index: number): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const SKELETON_BASE_CLASS = "relative overflow-hidden bg-primary-tint skeleton-animate";
|
|
2
|
-
const SKELETON_WAVE_OVERLAY_CLASS = "pointer-events-none absolute inset-0 -translate-x-full skeleton-animate";
|
|
2
|
+
const SKELETON_WAVE_OVERLAY_CLASS = "pointer-events-none absolute inset-0 -translate-x-full skeleton-animate skeleton-wave";
|
|
3
3
|
const SKELETON_CIRCLE_RADIUS_CLASS = "rounded-full";
|
|
4
4
|
const SKELETON_CIRCLE_SIZE_DEFAULT = "min-h-control-base w-control-base";
|
|
5
5
|
const SKELETON_TEXT_ROOT_CLASS = "flex flex-col gap-small";
|
|
@@ -13,31 +13,10 @@ const SKELETON_RADIUS_CLASS = {
|
|
|
13
13
|
mid: "rounded-mid",
|
|
14
14
|
full: "rounded-full"
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const SKELETON_SHIMMER_GRADIENT = "linear-gradient(90deg, var(--color-primary-tint) 0%, var(--color-primary-tint-strong) 50%, var(--color-primary-tint) 100%)";
|
|
21
|
-
function skeletonPulseStyle() {
|
|
22
|
-
return { animation: SKELETON_PULSE_ANIMATION };
|
|
23
|
-
}
|
|
24
|
-
function skeletonShimmerStyle() {
|
|
25
|
-
return {
|
|
26
|
-
backgroundImage: SKELETON_SHIMMER_GRADIENT,
|
|
27
|
-
backgroundSize: "400% 100%",
|
|
28
|
-
animation: SKELETON_SHIMMER_ANIMATION
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function skeletonVariantStyle(variant) {
|
|
32
|
-
if (variant === "pulse") return skeletonPulseStyle();
|
|
33
|
-
if (variant === "shimmer") return skeletonShimmerStyle();
|
|
34
|
-
return {};
|
|
35
|
-
}
|
|
36
|
-
function skeletonWaveOverlayStyle() {
|
|
37
|
-
return {
|
|
38
|
-
animation: SKELETON_WAVE_ANIMATION,
|
|
39
|
-
background: SKELETON_WAVE_GRADIENT
|
|
40
|
-
};
|
|
16
|
+
function skeletonVariantClass(variant) {
|
|
17
|
+
if (variant === "pulse") return "skeleton-pulse";
|
|
18
|
+
if (variant === "shimmer") return "skeleton-shimmer";
|
|
19
|
+
return "";
|
|
41
20
|
}
|
|
42
21
|
function skeletonRadiusClass(radius) {
|
|
43
22
|
return SKELETON_RADIUS_CLASS[radius];
|
|
@@ -50,21 +29,13 @@ export {
|
|
|
50
29
|
SKELETON_BLOCK_CLASS,
|
|
51
30
|
SKELETON_CIRCLE_RADIUS_CLASS,
|
|
52
31
|
SKELETON_CIRCLE_SIZE_DEFAULT,
|
|
53
|
-
SKELETON_PULSE_ANIMATION,
|
|
54
32
|
SKELETON_RADIUS_CLASS,
|
|
55
|
-
SKELETON_SHIMMER_ANIMATION,
|
|
56
|
-
SKELETON_SHIMMER_GRADIENT,
|
|
57
33
|
SKELETON_TEXT_LINE_CLASS,
|
|
58
34
|
SKELETON_TEXT_LINE_FULL_CLASS,
|
|
59
35
|
SKELETON_TEXT_LINE_LAST_SHORT_CLASS,
|
|
60
36
|
SKELETON_TEXT_ROOT_CLASS,
|
|
61
|
-
SKELETON_WAVE_ANIMATION,
|
|
62
|
-
SKELETON_WAVE_GRADIENT,
|
|
63
37
|
SKELETON_WAVE_OVERLAY_CLASS,
|
|
64
38
|
skeletonLineAnimationDelay,
|
|
65
|
-
skeletonPulseStyle,
|
|
66
39
|
skeletonRadiusClass,
|
|
67
|
-
|
|
68
|
-
skeletonVariantStyle,
|
|
69
|
-
skeletonWaveOverlayStyle
|
|
40
|
+
skeletonVariantClass
|
|
70
41
|
};
|
|
@@ -84,6 +84,7 @@ function useSwitchTrackAnimations({
|
|
|
84
84
|
const switchMotionOff = reduceMotion || !isMotionFeatureEnabledFor(config, "enableSwitchThumb");
|
|
85
85
|
const fallbackTravelPx = resolveFallbackThumbPx(thickness, size);
|
|
86
86
|
const firstLayoutRef = useRef(true);
|
|
87
|
+
const prevCheckedRef = useRef(checked);
|
|
87
88
|
const applyInstant = useCallback(
|
|
88
89
|
(nextChecked, travelPx) => {
|
|
89
90
|
if (thumbRef.current) applySwitchThumbInstant(thumbRef.current, nextChecked, travelPx);
|
|
@@ -123,12 +124,14 @@ function useSwitchTrackAnimations({
|
|
|
123
124
|
[iconOffRef, iconOnRef, scope, thumbRef, trackFillRef, trackRef]
|
|
124
125
|
);
|
|
125
126
|
const syncThumbPosition = useCallback(
|
|
126
|
-
(nextChecked, travelPx) => {
|
|
127
|
+
(nextChecked, travelPx, animate = true) => {
|
|
127
128
|
travelPxRef.current = travelPx;
|
|
128
129
|
if (!thumbRef.current && !trackFillRef.current && !iconOffRef.current && !iconOnRef.current) {
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
131
|
-
|
|
132
|
+
const checkedChanged = prevCheckedRef.current !== nextChecked;
|
|
133
|
+
prevCheckedRef.current = nextChecked;
|
|
134
|
+
if (firstLayoutRef.current || switchMotionOff || !animate || !checkedChanged) {
|
|
132
135
|
firstLayoutRef.current = false;
|
|
133
136
|
applyInstant(nextChecked, travelPx);
|
|
134
137
|
return;
|
|
@@ -148,11 +151,11 @@ function useSwitchTrackAnimations({
|
|
|
148
151
|
}
|
|
149
152
|
};
|
|
150
153
|
measure();
|
|
151
|
-
syncThumbPosition(checked, travelPxRef.current);
|
|
154
|
+
syncThumbPosition(checked, travelPxRef.current, true);
|
|
152
155
|
if (!track || !shell || typeof ResizeObserver === "undefined") return void 0;
|
|
153
156
|
const ro = new ResizeObserver(() => {
|
|
154
157
|
measure();
|
|
155
|
-
syncThumbPosition(checked, travelPxRef.current);
|
|
158
|
+
syncThumbPosition(checked, travelPxRef.current, false);
|
|
156
159
|
});
|
|
157
160
|
ro.observe(track);
|
|
158
161
|
ro.observe(shell);
|
|
@@ -63,7 +63,7 @@ function useSlidingTabIndicator(listRef, indicatorRef, activeValue, orientation,
|
|
|
63
63
|
const firstLayoutRef = useRef(true);
|
|
64
64
|
const layoutMetricsRef = useRef(null);
|
|
65
65
|
const reduceMotionPreferred = usePrefersReducedMotion();
|
|
66
|
-
const updateIndicator = useCallback(() => {
|
|
66
|
+
const updateIndicator = useCallback((animate = true) => {
|
|
67
67
|
const list = listRef.current;
|
|
68
68
|
const indicator = indicatorRef.current;
|
|
69
69
|
const activeTab = activeValue == null ? void 0 : tabElementsRef.current?.get(activeValue);
|
|
@@ -78,7 +78,7 @@ function useSlidingTabIndicator(listRef, indicatorRef, activeValue, orientation,
|
|
|
78
78
|
const from = layout ? readVisualMetrics(indicator, layout) : to;
|
|
79
79
|
applyIndicatorLayout(indicator, to);
|
|
80
80
|
layoutMetricsRef.current = to;
|
|
81
|
-
if (reduceMotion || firstLayoutRef.current || !scope) {
|
|
81
|
+
if (!animate || reduceMotion || firstLayoutRef.current || !scope) {
|
|
82
82
|
applyTabsIndicatorRest(indicator);
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
@@ -86,6 +86,10 @@ function useSlidingTabIndicator(listRef, indicatorRef, activeValue, orientation,
|
|
|
86
86
|
const dy = from.top - to.top;
|
|
87
87
|
const sx = to.width > 0 ? from.width / to.width : 1;
|
|
88
88
|
const sy = to.height > 0 ? from.height / to.height : 1;
|
|
89
|
+
if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5 && Math.abs(sx - 1) < 5e-3 && Math.abs(sy - 1) < 5e-3) {
|
|
90
|
+
applyTabsIndicatorRest(indicator);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
89
93
|
const value = scope.resolve("indicator", "change");
|
|
90
94
|
if (value === false || value === void 0) {
|
|
91
95
|
applyTabsIndicatorRest(indicator);
|
|
@@ -107,13 +111,13 @@ function useSlidingTabIndicator(listRef, indicatorRef, activeValue, orientation,
|
|
|
107
111
|
variant
|
|
108
112
|
]);
|
|
109
113
|
useLayoutEffect(() => {
|
|
110
|
-
updateIndicator();
|
|
114
|
+
updateIndicator(true);
|
|
111
115
|
firstLayoutRef.current = false;
|
|
112
116
|
}, [updateIndicator]);
|
|
113
117
|
useLayoutEffect(() => {
|
|
114
118
|
const list = listRef.current;
|
|
115
119
|
if (!list || typeof ResizeObserver === "undefined") return;
|
|
116
|
-
const ro = new ResizeObserver(() => updateIndicator());
|
|
120
|
+
const ro = new ResizeObserver(() => updateIndicator(false));
|
|
117
121
|
ro.observe(list);
|
|
118
122
|
for (const tab of tabElementsRef.current?.values() ?? []) {
|
|
119
123
|
ro.observe(tab);
|
|
@@ -6,7 +6,7 @@ import { messageBannerSizePreset } from "../utils/sizeLayout/banner.js";
|
|
|
6
6
|
const TOAST_LIVE_REGION_CLASS = "sr-only absolute m-0 h-px w-px overflow-hidden whitespace-nowrap border-0 p-0";
|
|
7
7
|
const TOAST_VARIANT_SURFACE = {
|
|
8
8
|
default: "bg-surface border-token text-foreground",
|
|
9
|
-
outline: "bg-
|
|
9
|
+
outline: "bg-background border-token-outline text-foreground",
|
|
10
10
|
secondary: "bg-secondary border-token text-secondary-foreground"
|
|
11
11
|
};
|
|
12
12
|
const TOAST_SHADOW_SIZE = "mid";
|
|
@@ -8,7 +8,7 @@ import { iconSlotClass } from "../utils/sizeLayout/iconSlot.js";
|
|
|
8
8
|
const TOOLTIP_DEFAULT_OFFSET = 8;
|
|
9
9
|
const TOOLTIP_VARIANT_SURFACE_CLASS = {
|
|
10
10
|
default: "border-token bg-surface text-foreground",
|
|
11
|
-
outline: "bg-
|
|
11
|
+
outline: "bg-background border-token-outline text-foreground",
|
|
12
12
|
secondary: "bg-secondary border-token text-secondary-foreground"
|
|
13
13
|
};
|
|
14
14
|
const TOOLTIP_TEXT_LAYOUT = {
|
|
@@ -56,7 +56,7 @@ const TOOLTIP_DESCRIPTION_MUTED_CLASS = "text-muted";
|
|
|
56
56
|
const TOOLTIP_ARROW_BASE_CLASS = "pointer-events-none absolute z-0 size-2 rotate-45";
|
|
57
57
|
const TOOLTIP_ARROW_FILL_CLASS = {
|
|
58
58
|
default: "bg-surface",
|
|
59
|
-
outline: "bg-
|
|
59
|
+
outline: "border-token-outline bg-background",
|
|
60
60
|
secondary: "bg-secondary"
|
|
61
61
|
};
|
|
62
62
|
const TOOLTIP_CONTENT_BASE_CLASS = "pointer-events-none z-tooltip w-max min-w-0 overflow-visible text-start outline-none";
|
|
@@ -30,12 +30,13 @@ function animateModalOpen({
|
|
|
30
30
|
panelTo = { scale: 1 }
|
|
31
31
|
}) {
|
|
32
32
|
killMotion(overlay, panel);
|
|
33
|
+
preparePortalSurfaceForEnter(panel);
|
|
33
34
|
gsap.fromTo(overlay, { opacity: 0 }, { opacity: 1, ...vars });
|
|
34
|
-
setWillChangeTransform(panel, true);
|
|
35
35
|
gsap.fromTo(panel, panelFrom, {
|
|
36
|
+
force3D: false,
|
|
37
|
+
clearProps: "transform",
|
|
36
38
|
...panelTo,
|
|
37
|
-
...vars
|
|
38
|
-
onComplete: clearWillChangeOnComplete(panel, vars.onComplete)
|
|
39
|
+
...vars
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
42
|
function animateModalClose({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { killMotion
|
|
2
|
+
import { killMotion } from "../../gsapMotion.js";
|
|
3
3
|
import { motionModalFor } from "../../motionConfig.js";
|
|
4
|
-
import { MODAL_PANEL_SCALE_FROM } from "../../modalSurfaceMotion.js";
|
|
4
|
+
import { isReducedModalMotion, MODAL_PANEL_SCALE_FROM, preparePortalSurfaceForEnter } from "../../modalSurfaceMotion.js";
|
|
5
5
|
import gsap from "gsap";
|
|
6
6
|
function applyModalOverlayInstant(el, open) {
|
|
7
7
|
killMotion(el);
|
|
@@ -26,7 +26,7 @@ function modalVars(ctx) {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
function modalOverlayEnterRecipe(ctx) {
|
|
29
|
-
if (ctx.reduced) {
|
|
29
|
+
if (isReducedModalMotion(ctx.config, ctx.reduced)) {
|
|
30
30
|
ctx.el.style.opacity = "1";
|
|
31
31
|
return void 0;
|
|
32
32
|
}
|
|
@@ -38,7 +38,7 @@ function modalOverlayEnterRecipe(ctx) {
|
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
function modalOverlayLeaveRecipe(ctx) {
|
|
41
|
-
if (ctx.reduced) {
|
|
41
|
+
if (isReducedModalMotion(ctx.config, ctx.reduced)) {
|
|
42
42
|
ctx.el.style.opacity = "0";
|
|
43
43
|
return void 0;
|
|
44
44
|
}
|
|
@@ -49,38 +49,38 @@ function modalOverlayLeaveRecipe(ctx) {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
function modalPanelEnterRecipe(ctx) {
|
|
52
|
-
if (ctx.reduced) {
|
|
52
|
+
if (isReducedModalMotion(ctx.config, ctx.reduced)) {
|
|
53
53
|
ctx.el.style.opacity = "1";
|
|
54
54
|
ctx.el.style.visibility = "visible";
|
|
55
55
|
gsap.set(ctx.el, { scale: 1, clearProps: "transform" });
|
|
56
56
|
return void 0;
|
|
57
57
|
}
|
|
58
58
|
killMotion(ctx.el);
|
|
59
|
-
|
|
59
|
+
preparePortalSurfaceForEnter(ctx.el);
|
|
60
60
|
const vars = modalVars(ctx);
|
|
61
61
|
return gsap.fromTo(
|
|
62
62
|
ctx.el,
|
|
63
63
|
{ scale: MODAL_PANEL_SCALE_FROM },
|
|
64
64
|
{
|
|
65
65
|
scale: 1,
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
force3D: false,
|
|
67
|
+
clearProps: "transform",
|
|
68
|
+
...vars
|
|
68
69
|
}
|
|
69
70
|
);
|
|
70
71
|
}
|
|
71
72
|
function modalPanelLeaveRecipe(ctx) {
|
|
72
|
-
if (ctx.reduced) {
|
|
73
|
+
if (isReducedModalMotion(ctx.config, ctx.reduced)) {
|
|
73
74
|
gsap.set(ctx.el, { autoAlpha: 0, scale: MODAL_PANEL_SCALE_FROM });
|
|
74
75
|
return void 0;
|
|
75
76
|
}
|
|
76
77
|
killMotion(ctx.el);
|
|
77
|
-
armWillChangeTransform(ctx.el, ctx.onCleanup);
|
|
78
78
|
const vars = modalVars(ctx);
|
|
79
79
|
return gsap.to(ctx.el, {
|
|
80
80
|
autoAlpha: 0,
|
|
81
81
|
scale: MODAL_PANEL_SCALE_FROM,
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
force3D: false,
|
|
83
|
+
...vars
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
export {
|
package/dist/skin.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* devtools hatch; skins do not depend on it.
|
|
5
5
|
*/
|
|
6
6
|
export { killMotion } from './components/core/utils/gsapMotion.js';
|
|
7
|
-
export { getMotionConfig, motionPressSqueezeTotalFor, } from './components/core/utils/motionConfig.js';
|
|
7
|
+
export { getMotionConfig, isMotionFeatureEnabledFor, motionPressSqueezeTotalFor, } from './components/core/utils/motionConfig.js';
|
|
8
8
|
export { resolveAdaptiveHoverLiftScale, resolveAdaptivePressSqueezeScale, shouldSkipInteractiveHoverLift, } from './components/core/utils/hoverInteractiveLift.js';
|
|
9
9
|
export { playShadowFade, removeShadowFadeHost, snapShadowFade, } from './components/core/utils/shadowFade.js';
|
|
10
10
|
export { defineSkin, defineSkinRecipe, skinRecipeName } from './skins/defineSkin.js';
|
package/dist/skin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { killMotion } from "./components/core/utils/gsapMotion.js";
|
|
2
|
-
import { getMotionConfig, motionPressSqueezeTotalFor } from "./components/core/utils/motionConfig.js";
|
|
2
|
+
import { getMotionConfig, isMotionFeatureEnabledFor, motionPressSqueezeTotalFor } from "./components/core/utils/motionConfig.js";
|
|
3
3
|
import { resolveAdaptiveHoverLiftScale, resolveAdaptivePressSqueezeScale, shouldSkipInteractiveHoverLift } from "./components/core/utils/hoverInteractiveLift.js";
|
|
4
4
|
import { playShadowFade, removeShadowFadeHost, snapShadowFade } from "./components/core/utils/shadowFade.js";
|
|
5
5
|
import { defineSkin, defineSkinRecipe, skinRecipeName } from "./skins/defineSkin.js";
|
|
@@ -11,6 +11,7 @@ export {
|
|
|
11
11
|
defineSkinRecipe,
|
|
12
12
|
getMotionConfig,
|
|
13
13
|
getSkinRevision,
|
|
14
|
+
isMotionFeatureEnabledFor,
|
|
14
15
|
killMotion,
|
|
15
16
|
mergeSkinSurfaceStyle,
|
|
16
17
|
motionPressSqueezeTotalFor,
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
export declare const SKIN_TARGET_SLOTS: readonly ["alert.root", "alertDialog.panel", "appShell.root", "aspectRatio.root", "avatar.root", "badge.root", "button.root", "buttonGroup.root", "calendar.root", "card.root", "closeButton.root", "comboBox.shell", "container.root", "datePicker.trigger", "dialog.panel", "disclosure.content", "disclosure.contentWrap", "disclosure.group", "disclosure.root", "disclosure.trigger", "drawer.panel", "dropdown.subPopover", "expandable.root", "grid.root", "header.root", "input.shell", "kbd.root", "listBox.root", "numberInput.shell", "pinInput.control", "popover.arrow", "popover.panel", "resizable.root", "searchInput.root", "select.shell", "selectionIndicator.fill", "selectionIndicator.mark", "selectionIndicator.root", "selectionThumbIcon.root", "sidebar.root", "slider.fill", "stack.root", "surface.root", "switch.fill", "table.cell", "table.column", "table.content", "table.root", "table.row", "tabs.indicator", "tabs.list", "tabs.tab", "tagsInput.shell", "textArea.shell", "timeField.shell", "toast.root", "toggleButton.root", "toggleButtonGroup.root", "tooltip.arrow", "tooltip.panel"];
|
|
4
4
|
export type SkinTargetSlot = (typeof SKIN_TARGET_SLOTS)[number];
|
|
5
5
|
/** Slots that `SkinShell` / `resolveSkinLayer` actually host. */
|
|
6
|
-
export declare const SKIN_LAYER_SLOTS: readonly ["card.root", "dialog.panel", "drawer.panel", "surface.root"];
|
|
6
|
+
export declare const SKIN_LAYER_SLOTS: readonly ["alertDialog.panel", "card.root", "dialog.panel", "drawer.panel", "surface.root"];
|
|
7
7
|
export type SkinLayerSlot = (typeof SKIN_LAYER_SLOTS)[number];
|
|
8
8
|
/** Slots that `overlaySkinMotion` can reach: prefix plus a `useMotionPart` slot in that component. */
|
|
9
|
-
export declare const SKIN_MOTION_SLOTS: readonly ["alert.action", "alert.description", "alert.indicator", "alert.root", "alert.title", "avatar.fallback", "avatar.groupItem", "avatar.image", "avatar.root", "badge.anchor", "badge.root", "button.error", "button.icon", "button.label", "button.loader", "button.root", "button.success", "button.text", "calendar.cell", "calendar.cellFill", "calendar.cellText", "calendar.footer", "calendar.footerClear", "calendar.footerToday", "calendar.grid", "calendar.header", "calendar.navNext", "calendar.navPrev", "calendar.rangeHalfFill", "calendar.root", "calendar.title", "card.body", "card.description", "card.footer", "card.header", "card.headingBlock", "card.root", "card.title", "closeButton.icon", "closeButton.root", "comboBox.input", "comboBox.popover", "comboBox.shell", "comboBox.trigger", "comboBox.triggerIconWrap", "datePicker.icon", "datePicker.label", "datePicker.popover", "datePicker.trigger", "dialog.body", "dialog.close", "dialog.content", "dialog.description", "dialog.footer", "dialog.header", "dialog.headingBlock", "dialog.overlay", "dialog.panel", "dialog.title", "dialog.trigger", "disclosure.chevron", "disclosure.content", "disclosure.contentShell", "disclosure.icon", "disclosure.panelInner", "disclosure.root", "disclosure.title", "disclosure.titleLift", "drawer.body", "drawer.close", "drawer.content", "drawer.description", "drawer.footer", "drawer.handle", "drawer.header", "drawer.headingBlock", "drawer.overlay", "drawer.panel", "drawer.title", "drawer.trigger", "expandable.chevron", "expandable.description", "expandable.icon", "expandable.panel", "expandable.panelInner", "expandable.panelShell", "expandable.root", "expandable.title", "expandable.triggerLift", "input.control", "input.fileRemove", "input.fileRow", "input.passwordToggle", "input.shell", "kbd.group", "kbd.root", "kbd.text", "numberInput.control", "numberInput.decrement", "numberInput.increment", "numberInput.label", "numberInput.shell", "pinInput.control", "pinInput.label", "pinInput.shell", "popover.arrow", "popover.body", "popover.content", "popover.description", "popover.header", "popover.title", "popover.trigger", "searchInput.clear", "searchInput.expandTrigger", "searchInput.icon", "searchInput.input", "searchInput.root", "select.popover", "select.shell", "select.trigger", "select.triggerIconWrap", "select.value", "selectionIndicator.fill", "selectionIndicator.mark", "selectionIndicator.root", "selectionThumb.icon", "selectionThumb.root", "slider.fill", "slider.header", "slider.icon", "slider.rail", "slider.thumb", "slider.track", "slider.value", "surface.root", "switch.fill", "switch.thumb", "switch.track", "table.body", "table.caption", "table.cell", "table.column", "table.columnSortIcon", "table.content", "table.empty", "table.footer", "table.header", "table.headerRow", "table.label", "table.root", "table.row", "table.scrollContainer", "tabs.indicator", "tabs.list", "tabs.panel", "tabs.root", "tabs.tab", "tabs.tabText", "tagsInput.control", "tagsInput.label", "tagsInput.remove", "tagsInput.shell", "tagsInput.tag", "textArea.control", "textArea.resizeHandle", "textArea.shell", "timeField.segments", "timeField.shell", "toast.action", "toast.close", "toast.description", "toast.indicator", "toast.root", "toast.scrim", "toast.stackItem", "toast.title", "toggleButton.content", "toggleButton.fill", "toggleButton.iconEnd", "toggleButton.iconStart", "toggleButton.label", "toggleButton.root", "toggleButton.text", "tooltip.arrow", "tooltip.content", "tooltip.description", "tooltip.indicator", "tooltip.panel", "tooltip.title"];
|
|
9
|
+
export declare const SKIN_MOTION_SLOTS: readonly ["alert.action", "alert.description", "alert.indicator", "alert.root", "alert.title", "alertDialog.body", "alertDialog.close", "alertDialog.content", "alertDialog.description", "alertDialog.footer", "alertDialog.header", "alertDialog.headingBlock", "alertDialog.indicator", "alertDialog.overlay", "alertDialog.panel", "alertDialog.title", "alertDialog.trigger", "avatar.fallback", "avatar.groupItem", "avatar.image", "avatar.root", "badge.anchor", "badge.root", "button.error", "button.icon", "button.label", "button.loader", "button.root", "button.success", "button.text", "calendar.cell", "calendar.cellFill", "calendar.cellText", "calendar.footer", "calendar.footerClear", "calendar.footerToday", "calendar.grid", "calendar.header", "calendar.navNext", "calendar.navPrev", "calendar.rangeHalfFill", "calendar.root", "calendar.title", "card.body", "card.description", "card.footer", "card.header", "card.headingBlock", "card.root", "card.title", "closeButton.icon", "closeButton.root", "comboBox.input", "comboBox.popover", "comboBox.shell", "comboBox.trigger", "comboBox.triggerIconWrap", "datePicker.icon", "datePicker.label", "datePicker.popover", "datePicker.trigger", "dialog.body", "dialog.close", "dialog.content", "dialog.description", "dialog.footer", "dialog.header", "dialog.headingBlock", "dialog.overlay", "dialog.panel", "dialog.title", "dialog.trigger", "disclosure.chevron", "disclosure.content", "disclosure.contentShell", "disclosure.icon", "disclosure.panelInner", "disclosure.root", "disclosure.title", "disclosure.titleLift", "drawer.body", "drawer.close", "drawer.content", "drawer.description", "drawer.footer", "drawer.handle", "drawer.header", "drawer.headingBlock", "drawer.overlay", "drawer.panel", "drawer.title", "drawer.trigger", "expandable.chevron", "expandable.description", "expandable.icon", "expandable.panel", "expandable.panelInner", "expandable.panelShell", "expandable.root", "expandable.title", "expandable.triggerLift", "input.control", "input.fileRemove", "input.fileRow", "input.passwordToggle", "input.shell", "kbd.group", "kbd.root", "kbd.text", "numberInput.control", "numberInput.decrement", "numberInput.increment", "numberInput.label", "numberInput.shell", "pinInput.control", "pinInput.label", "pinInput.shell", "popover.arrow", "popover.body", "popover.content", "popover.description", "popover.header", "popover.title", "popover.trigger", "searchInput.clear", "searchInput.expandTrigger", "searchInput.icon", "searchInput.input", "searchInput.root", "select.popover", "select.shell", "select.trigger", "select.triggerIconWrap", "select.value", "selectionIndicator.fill", "selectionIndicator.mark", "selectionIndicator.root", "selectionThumb.icon", "selectionThumb.root", "slider.fill", "slider.header", "slider.icon", "slider.rail", "slider.thumb", "slider.track", "slider.value", "surface.root", "switch.fill", "switch.thumb", "switch.track", "table.body", "table.caption", "table.cell", "table.column", "table.columnSortIcon", "table.content", "table.empty", "table.footer", "table.header", "table.headerRow", "table.label", "table.root", "table.row", "table.scrollContainer", "tabs.indicator", "tabs.list", "tabs.panel", "tabs.root", "tabs.tab", "tabs.tabText", "tagsInput.control", "tagsInput.label", "tagsInput.remove", "tagsInput.shell", "tagsInput.tag", "textArea.control", "textArea.resizeHandle", "textArea.shell", "timeField.segments", "timeField.shell", "toast.action", "toast.close", "toast.description", "toast.indicator", "toast.root", "toast.scrim", "toast.stackItem", "toast.title", "toggleButton.content", "toggleButton.fill", "toggleButton.iconEnd", "toggleButton.iconStart", "toggleButton.label", "toggleButton.root", "toggleButton.text", "tooltip.arrow", "tooltip.content", "tooltip.description", "tooltip.indicator", "tooltip.panel", "tooltip.title"];
|
|
10
10
|
export type SkinMotionSlot = (typeof SKIN_MOTION_SLOTS)[number];
|
|
@@ -61,6 +61,7 @@ const SKIN_TARGET_SLOTS = [
|
|
|
61
61
|
"tooltip.panel"
|
|
62
62
|
];
|
|
63
63
|
const SKIN_LAYER_SLOTS = [
|
|
64
|
+
"alertDialog.panel",
|
|
64
65
|
"card.root",
|
|
65
66
|
"dialog.panel",
|
|
66
67
|
"drawer.panel",
|
|
@@ -72,6 +73,18 @@ const SKIN_MOTION_SLOTS = [
|
|
|
72
73
|
"alert.indicator",
|
|
73
74
|
"alert.root",
|
|
74
75
|
"alert.title",
|
|
76
|
+
"alertDialog.body",
|
|
77
|
+
"alertDialog.close",
|
|
78
|
+
"alertDialog.content",
|
|
79
|
+
"alertDialog.description",
|
|
80
|
+
"alertDialog.footer",
|
|
81
|
+
"alertDialog.header",
|
|
82
|
+
"alertDialog.headingBlock",
|
|
83
|
+
"alertDialog.indicator",
|
|
84
|
+
"alertDialog.overlay",
|
|
85
|
+
"alertDialog.panel",
|
|
86
|
+
"alertDialog.title",
|
|
87
|
+
"alertDialog.trigger",
|
|
75
88
|
"avatar.fallback",
|
|
76
89
|
"avatar.groupItem",
|
|
77
90
|
"avatar.image",
|
package/dist/ui.css
CHANGED
|
@@ -447,6 +447,25 @@
|
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
@layer components {
|
|
450
|
+
.skeleton-animate {
|
|
451
|
+
contain: paint;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.skeleton-pulse {
|
|
455
|
+
animation: 1.6s ease-in-out infinite skeleton-pulse;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.skeleton-shimmer {
|
|
459
|
+
background-image: linear-gradient(90deg, var(--color-primary-tint) 0%, var(--color-primary-tint-strong) 50%, var(--color-primary-tint) 100%);
|
|
460
|
+
background-size: 400% 100%;
|
|
461
|
+
animation: 2s linear infinite skeleton-shimmer;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.skeleton-wave {
|
|
465
|
+
background: linear-gradient(90deg, transparent 0%, var(--color-primary-tint-strong) 50%, transparent 100%);
|
|
466
|
+
animation: 2s linear .2s infinite skeleton-wave-slide;
|
|
467
|
+
}
|
|
468
|
+
|
|
450
469
|
.avatar-size-small {
|
|
451
470
|
width: var(--avatar-size-small);
|
|
452
471
|
height: var(--avatar-size-small);
|
|
@@ -5562,6 +5581,10 @@
|
|
|
5562
5581
|
will-change: transform;
|
|
5563
5582
|
}
|
|
5564
5583
|
|
|
5584
|
+
.\[contain\:paint\] {
|
|
5585
|
+
contain: paint;
|
|
5586
|
+
}
|
|
5587
|
+
|
|
5565
5588
|
.outline-none {
|
|
5566
5589
|
--tw-outline-style: none;
|
|
5567
5590
|
outline-style: none;
|