@endfield-ui/react 0.2.0 → 0.3.0
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/dist/index.d.ts +9 -2
- package/dist/index.js +87 -32
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/checkbox/choice-style.ts +5 -2
- package/src/components/corner-brackets/CornerBrackets.tsx +2 -1
- package/src/components/dialog/Dialog.tsx +4 -2
- package/src/components/dropdown-menu/menu-style.ts +9 -2
- package/src/components/file-upload/FileUpload.tsx +1 -1
- package/src/components/image-viewer/ImageViewer.tsx +58 -18
- package/src/components/item-slot/ItemSlot.tsx +2 -1
- package/src/components/nav-menu/NavMenu.tsx +14 -1
- package/src/components/otp-input/OtpInput.tsx +5 -2
- package/src/components/slider/Slider.tsx +6 -2
- package/src/components/steps/Steps.tsx +12 -3
- package/src/components/toast/Toast.tsx +18 -5
- package/src/components/tooltip/Tooltip.tsx +5 -1
- package/src/components/viewfinder/Viewfinder.tsx +9 -0
- package/src/lib/README.md +1 -0
- package/src/lib/cn.ts +2 -0
- package/src/lib/motion.ts +15 -0
- package/src/styles/theme.css +43 -0
- package/src/styles/utilities.css +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -578,6 +578,7 @@ type CornerBracketsProps = ComponentProps<"div"> & {
|
|
|
578
578
|
* 用于矩阵里的单选(物品格、名册卡、图鉴);列表行用左缘色条,页签用底色,都不用它。
|
|
579
579
|
*
|
|
580
580
|
* 括号画在盒子之外 4px:它所在的容器不能贴着盒子裁切。
|
|
581
|
+
* 出现时八段短线从角的顶点伸到满长(200ms),消失是直接消失。
|
|
581
582
|
* 括号只是给眼睛看的,选中态另外要有 `aria-selected` / `aria-pressed`。
|
|
582
583
|
*/
|
|
583
584
|
export declare function CornerBrackets({ visible, size, className, ...props }: CornerBracketsProps): import("react").JSX.Element;
|
|
@@ -1667,7 +1668,7 @@ type ItemOwnProps$2 = {
|
|
|
1667
1668
|
};
|
|
1668
1669
|
type NavMenuItemProps = ItemOwnProps$2 & Omit<ComponentProps<"li">, keyof ItemOwnProps$2>;
|
|
1669
1670
|
/** 全屏菜单里的一个栏目。 */
|
|
1670
|
-
export declare function NavMenuItem({ icon, current, disabled, closeOnClick, href, target, rel, render, onClick, children, ...props }: NavMenuItemProps): import("react").JSX.Element;
|
|
1671
|
+
export declare function NavMenuItem({ icon, current, disabled, closeOnClick, href, target, rel, render, onClick, className, children, ...props }: NavMenuItemProps): import("react").JSX.Element;
|
|
1671
1672
|
//#endregion
|
|
1672
1673
|
//#region src/components/navigator/Navigator.d.ts
|
|
1673
1674
|
type NavigatorSize = "sm" | "md";
|
|
@@ -3212,6 +3213,12 @@ type ViewfinderProps = ComponentProps<"div"> & {
|
|
|
3212
3213
|
size?: ViewfinderSize;
|
|
3213
3214
|
/** 正中放一个小准星,标出焦点 */
|
|
3214
3215
|
crosshair?: boolean;
|
|
3216
|
+
/**
|
|
3217
|
+
* 挂上的时候取景角落位:八段短线各自从角上伸出来,播一次。
|
|
3218
|
+
* 默认不动——取景角平时是静态的装饰。要它晚一点再动(等外面那一层先淡入完),
|
|
3219
|
+
* 在外层设 `--bracket-delay`
|
|
3220
|
+
*/
|
|
3221
|
+
animate?: boolean;
|
|
3215
3222
|
/**
|
|
3216
3223
|
* 四个角上的读数:坐标、比例、版本、时间码。
|
|
3217
3224
|
* 必须是真实的数据;没有就不放。
|
|
@@ -3224,7 +3231,7 @@ type ViewfinderProps = ComponentProps<"div"> & {
|
|
|
3224
3231
|
*
|
|
3225
3232
|
* 只用在展示性的画面上,一屏一处。取景角与准星是装饰,读数是真实信息、读屏读得到。
|
|
3226
3233
|
*/
|
|
3227
|
-
export declare function Viewfinder({ size, crosshair, readouts, className, children, ...props }: ViewfinderProps): import("react").JSX.Element;
|
|
3234
|
+
export declare function Viewfinder({ size, crosshair, animate, readouts, className, children, ...props }: ViewfinderProps): import("react").JSX.Element;
|
|
3228
3235
|
//#endregion
|
|
3229
3236
|
//#region src/hooks/useControllableState.d.ts
|
|
3230
3237
|
type Options$1<T> = {
|
package/dist/index.js
CHANGED
|
@@ -76,7 +76,9 @@ const twMerge = extendTailwindMerge({ extend: { theme: {
|
|
|
76
76
|
"slide-in",
|
|
77
77
|
"turn-in",
|
|
78
78
|
"fade-in",
|
|
79
|
-
"indeterminate"
|
|
79
|
+
"indeterminate",
|
|
80
|
+
"bracket-in",
|
|
81
|
+
"shift-in"
|
|
80
82
|
]
|
|
81
83
|
} } });
|
|
82
84
|
function cn(...inputs) {
|
|
@@ -1524,8 +1526,11 @@ const choiceControl = "flex h-[1lh] shrink-0 items-center";
|
|
|
1524
1526
|
const choiceBox = "peer size-5 shrink-0 appearance-none border-2 choice-diamond:size-3.5 choice-diamond:rotate-45 choice-diamond:checked:disabled:bg-ink-disabled border-line-strong bg-surface-sunken transition-colors duration-(--duration-fast) ease-standard group-hover:border-ink-secondary checked:border-surface-inverse checked:bg-surface-inverse aria-invalid:border-danger disabled:cursor-not-allowed disabled:border-ink-disabled disabled:bg-surface-sunken";
|
|
1525
1527
|
/** 方格 / 圆的定位盒:菱形比它小一圈,所以居中 */
|
|
1526
1528
|
const choiceFrame = "relative inline-flex size-5 items-center justify-center";
|
|
1527
|
-
/**
|
|
1528
|
-
|
|
1529
|
+
/**
|
|
1530
|
+
* 压在方格 / 圆正中的记号,默认透明,由 peer 的状态点亮。
|
|
1531
|
+
* 淡入淡出,和方格换底色的那一下同时走——底色有过渡而记号硬切,看起来是两件事
|
|
1532
|
+
*/
|
|
1533
|
+
const choiceMark = "pointer-events-none absolute inset-0 m-auto text-accent-ink-inverse opacity-0 transition-opacity duration-(--duration-fast) ease-standard peer-disabled:text-ink-disabled";
|
|
1529
1534
|
//#endregion
|
|
1530
1535
|
//#region src/components/checkbox/Checkbox.tsx
|
|
1531
1536
|
/**
|
|
@@ -1717,14 +1722,37 @@ function MenuCheck({ checked, disabled = false }) {
|
|
|
1717
1722
|
});
|
|
1718
1723
|
}
|
|
1719
1724
|
//#endregion
|
|
1725
|
+
//#region src/lib/motion.ts
|
|
1726
|
+
/**
|
|
1727
|
+
* 浮层从触发它的那一侧来:进场的起点往触发处偏 `--motion-shift`,走完归位。
|
|
1728
|
+
* 用在基元的浮层面板上——它们带着 `data-side`(面板在触发元素的哪一侧)。
|
|
1729
|
+
*
|
|
1730
|
+
* 位移只写在 `data-starting-style` 上:退场不走位移,只淡出。
|
|
1731
|
+
* 用的地方自己给 `translate` 加过渡。`inline-start` / `inline-end` 按从左往右的排版算。
|
|
1732
|
+
*/
|
|
1733
|
+
const enterFromSide = [
|
|
1734
|
+
"data-starting-style:data-[side=bottom]:-translate-y-(--motion-shift)",
|
|
1735
|
+
"data-starting-style:data-[side=top]:translate-y-(--motion-shift)",
|
|
1736
|
+
"data-starting-style:data-[side=right]:-translate-x-(--motion-shift)",
|
|
1737
|
+
"data-starting-style:data-[side=left]:translate-x-(--motion-shift)",
|
|
1738
|
+
"data-starting-style:data-[side=inline-end]:-translate-x-(--motion-shift)",
|
|
1739
|
+
"data-starting-style:data-[side=inline-start]:translate-x-(--motion-shift)"
|
|
1740
|
+
].join(" ");
|
|
1741
|
+
//#endregion
|
|
1720
1742
|
//#region src/components/dropdown-menu/menu-style.ts
|
|
1721
1743
|
/** 选项要知道自己在哪种面板里,才知道"当前项"怎么画 */
|
|
1722
1744
|
const MenuVariantContext = createContext("plain");
|
|
1723
|
-
/**
|
|
1745
|
+
/**
|
|
1746
|
+
* 面板:直角、1px 线、环境阴影;顶部一条半宽的行动色细条,展开时从 0 伸到一半宽。
|
|
1747
|
+
*
|
|
1748
|
+
* 进场:淡入(200ms),同时从触发处那一侧挪过来 4px(300ms,和细条同一拍)。
|
|
1749
|
+
* 退场只淡出——位移只写在起点上。两个时长、两条缓动按属性一一对应
|
|
1750
|
+
*/
|
|
1724
1751
|
const menuPanel = [
|
|
1725
1752
|
"relative min-w-40 border border-line bg-surface-raised py-1 text-ink shadow-sm outline-none",
|
|
1726
|
-
"origin-(--transform-origin) transition-opacity duration-(--duration-fast) ease-standard",
|
|
1753
|
+
"origin-(--transform-origin) transition-[opacity,translate] duration-[var(--duration-fast),var(--duration-base)] ease-[var(--ease-standard),var(--ease-exit)]",
|
|
1727
1754
|
"data-ending-style:opacity-0 data-starting-style:opacity-0",
|
|
1755
|
+
enterFromSide,
|
|
1728
1756
|
"before:pointer-events-none before:absolute before:-top-px before:-left-px before:h-[3px] before:w-1/2 before:origin-left before:bg-action before:content-['']",
|
|
1729
1757
|
"before:transition-transform before:duration-(--duration-base) before:ease-exit data-starting-style:before:scale-x-0",
|
|
1730
1758
|
"forced-colors:before:hidden"
|
|
@@ -2205,13 +2233,14 @@ const sizeClass$7 = {
|
|
|
2205
2233
|
* 用于矩阵里的单选(物品格、名册卡、图鉴);列表行用左缘色条,页签用底色,都不用它。
|
|
2206
2234
|
*
|
|
2207
2235
|
* 括号画在盒子之外 4px:它所在的容器不能贴着盒子裁切。
|
|
2236
|
+
* 出现时八段短线从角的顶点伸到满长(200ms),消失是直接消失。
|
|
2208
2237
|
* 括号只是给眼睛看的,选中态另外要有 `aria-selected` / `aria-pressed`。
|
|
2209
2238
|
*/
|
|
2210
2239
|
function CornerBrackets({ visible = true, size = "sm", className, ...props }) {
|
|
2211
2240
|
return /* @__PURE__ */ jsx("div", {
|
|
2212
2241
|
...props,
|
|
2213
2242
|
"data-visible": visible ? "" : void 0,
|
|
2214
|
-
className: cn("relative", visible && "corner-brackets", sizeClass$7[size], className)
|
|
2243
|
+
className: cn("relative", visible && "corner-brackets after:animate-bracket-in", sizeClass$7[size], className)
|
|
2215
2244
|
});
|
|
2216
2245
|
}
|
|
2217
2246
|
//#endregion
|
|
@@ -2868,7 +2897,7 @@ function Dialog({ trigger, open, defaultOpen, onOpenChange, title, description,
|
|
|
2868
2897
|
initialFocus: initialFocus ?? firstFocusableIn(contentRef),
|
|
2869
2898
|
finalFocus,
|
|
2870
2899
|
"data-size": size,
|
|
2871
|
-
className: cn(overlaySurface, "relative flex max-h-full min-h-0 w-full flex-col", "transition-[
|
|
2900
|
+
className: cn(overlaySurface, "relative flex max-h-full min-h-0 w-full flex-col", "transition-[opacity,translate] duration-[var(--duration-fast),var(--duration-base)] ease-[var(--ease-standard),var(--ease-exit)]", "data-ending-style:opacity-0 data-starting-style:translate-y-(--motion-shift-lg) data-starting-style:opacity-0", sizeClass$5[size], className),
|
|
2872
2901
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
2873
2902
|
"data-theme": "dark",
|
|
2874
2903
|
className: cn(overlayHeader, "min-h-16 justify-center px-12"),
|
|
@@ -3620,7 +3649,7 @@ function FileUpload({ value, defaultValue, onValueChange, multiple = false, acce
|
|
|
3620
3649
|
dragging && /* @__PURE__ */ jsx("span", {
|
|
3621
3650
|
"aria-hidden": "true",
|
|
3622
3651
|
"data-brackets": "",
|
|
3623
|
-
className: cn("pointer-events-none select-none forced-colors:hidden print:hidden", "corner-brackets absolute inset-1.5 [--bracket-offset:0px]")
|
|
3652
|
+
className: cn("pointer-events-none select-none forced-colors:hidden print:hidden", "corner-brackets absolute inset-1.5 [--bracket-offset:0px] after:animate-bracket-in")
|
|
3624
3653
|
}),
|
|
3625
3654
|
/* @__PURE__ */ jsx("input", {
|
|
3626
3655
|
ref: mergeRefs(inputRef, ref),
|
|
@@ -3849,7 +3878,7 @@ const readoutPosition = {
|
|
|
3849
3878
|
*
|
|
3850
3879
|
* 只用在展示性的画面上,一屏一处。取景角与准星是装饰,读数是真实信息、读屏读得到。
|
|
3851
3880
|
*/
|
|
3852
|
-
function Viewfinder({ size = "sm", crosshair = false, readouts, className, children, ...props }) {
|
|
3881
|
+
function Viewfinder({ size = "sm", crosshair = false, animate = false, readouts, className, children, ...props }) {
|
|
3853
3882
|
return /* @__PURE__ */ jsxs("div", {
|
|
3854
3883
|
...props,
|
|
3855
3884
|
className: cn("relative text-ink", className),
|
|
@@ -3857,7 +3886,7 @@ function Viewfinder({ size = "sm", crosshair = false, readouts, className, child
|
|
|
3857
3886
|
children,
|
|
3858
3887
|
/* @__PURE__ */ jsx("span", {
|
|
3859
3888
|
"aria-hidden": "true",
|
|
3860
|
-
className: cn(decor, "corner-brackets absolute inset-3 [--bracket-color:currentColor] [--bracket-offset:0px] [--bracket-width:1.5px]", armClass[size])
|
|
3889
|
+
className: cn(decor, "corner-brackets absolute inset-3 [--bracket-color:currentColor] [--bracket-offset:0px] [--bracket-width:1.5px]", armClass[size], animate && "after:animate-bracket-in after:[animation-delay:var(--bracket-delay,0s)]")
|
|
3861
3890
|
}),
|
|
3862
3891
|
crosshair && /* @__PURE__ */ jsx("svg", {
|
|
3863
3892
|
"aria-hidden": "true",
|
|
@@ -4016,22 +4045,17 @@ function Stage({ label, items, index, setIndex, loop, previousLabel, nextLabel,
|
|
|
4016
4045
|
}),
|
|
4017
4046
|
/* @__PURE__ */ jsx(Viewfinder, {
|
|
4018
4047
|
size: "md",
|
|
4019
|
-
|
|
4048
|
+
animate: true,
|
|
4049
|
+
className: "min-h-0 flex-1 [--bracket-delay:var(--duration-fast)]",
|
|
4020
4050
|
children: /* @__PURE__ */ jsx("div", {
|
|
4021
4051
|
ref: trackRef,
|
|
4022
4052
|
"data-image-viewer-track": "",
|
|
4023
4053
|
onScroll,
|
|
4024
4054
|
className: "absolute inset-0 flex snap-x snap-mandatory overflow-x-auto overscroll-x-contain [scrollbar-width:none]",
|
|
4025
|
-
children: items.map((item, position) => /* @__PURE__ */ jsx(
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
inert: position !== index,
|
|
4030
|
-
"data-current": position === index ? "" : void 0,
|
|
4031
|
-
onClick: (event) => {
|
|
4032
|
-
if (event.target === event.currentTarget) onClose();
|
|
4033
|
-
},
|
|
4034
|
-
className: cn("flex size-full shrink-0 snap-start items-center justify-center p-6 sm:p-10", "*:max-h-full *:max-w-full [&>img]:object-contain [&>video]:object-contain"),
|
|
4055
|
+
children: items.map((item, position) => /* @__PURE__ */ jsx(Slide, {
|
|
4056
|
+
label: `第 ${position + 1} 张,共 ${count} 张`,
|
|
4057
|
+
current: position === index,
|
|
4058
|
+
onClose,
|
|
4035
4059
|
children: Math.abs(position - index) <= 1 ? item.props.children : null
|
|
4036
4060
|
}, position))
|
|
4037
4061
|
})
|
|
@@ -4077,6 +4101,30 @@ function Stage({ label, items, index, setIndex, loop, previousLabel, nextLabel,
|
|
|
4077
4101
|
]
|
|
4078
4102
|
});
|
|
4079
4103
|
}
|
|
4104
|
+
/**
|
|
4105
|
+
* 轨道上的一张。图是使用方给的元素,这里不碰它,只在外面听它的 `load`:
|
|
4106
|
+
* 还没取到的图是透明的,取到了淡入——不是"啪"地一下出现。
|
|
4107
|
+
* 只管直接放进来的 `<img>`;视频、别的内容不等,和原来一样直接在
|
|
4108
|
+
*/
|
|
4109
|
+
function Slide({ label, current, onClose, children }) {
|
|
4110
|
+
const [loaded, setLoaded] = useState(false);
|
|
4111
|
+
const settle = () => setLoaded(true);
|
|
4112
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4113
|
+
role: "group",
|
|
4114
|
+
"aria-roledescription": "幻灯片",
|
|
4115
|
+
"aria-label": label,
|
|
4116
|
+
inert: !current,
|
|
4117
|
+
"data-current": current ? "" : void 0,
|
|
4118
|
+
"data-loaded": loaded ? "" : void 0,
|
|
4119
|
+
onLoadCapture: settle,
|
|
4120
|
+
onErrorCapture: settle,
|
|
4121
|
+
onClick: (event) => {
|
|
4122
|
+
if (event.target === event.currentTarget) onClose();
|
|
4123
|
+
},
|
|
4124
|
+
className: cn("flex size-full shrink-0 snap-start items-center justify-center p-6 sm:p-10", "*:max-h-full *:max-w-full [&>img]:object-contain [&>video]:object-contain", "[&>img]:transition-opacity [&>img]:duration-(--duration-fast) [&>img]:ease-standard not-data-loaded:[&>img]:opacity-0"),
|
|
4125
|
+
children
|
|
4126
|
+
});
|
|
4127
|
+
}
|
|
4080
4128
|
/** 图片查看里的一张。直接放在 `ImageViewer` 里。 */
|
|
4081
4129
|
function ImageViewerItem({ title, description: _description, thumbnail, "aria-label": ariaLabel, className, children, ...props }) {
|
|
4082
4130
|
const item = useContext(ItemContext);
|
|
@@ -4397,7 +4445,7 @@ function ItemSlot({ name, label, count, rarity, ratio = "1/1", selected = false,
|
|
|
4397
4445
|
...props,
|
|
4398
4446
|
"data-selected": selected ? "" : void 0,
|
|
4399
4447
|
"data-rarity": rarity,
|
|
4400
|
-
className: cn("relative", ratioClass$1[ratio], selected && "corner-brackets", className),
|
|
4448
|
+
className: cn("relative", ratioClass$1[ratio], selected && "corner-brackets after:animate-bracket-in", className),
|
|
4401
4449
|
children: node
|
|
4402
4450
|
});
|
|
4403
4451
|
}
|
|
@@ -4895,8 +4943,13 @@ function NavMenu({ trigger, open, defaultOpen = false, onOpenChange, title, bran
|
|
|
4895
4943
|
})]
|
|
4896
4944
|
});
|
|
4897
4945
|
}
|
|
4946
|
+
const itemEnter = [
|
|
4947
|
+
"animate-shift-in [--shift-x:calc(var(--motion-shift-lg)*-1)]",
|
|
4948
|
+
"[animation-delay:100ms] nth-2:[animation-delay:150ms] nth-3:[animation-delay:200ms]",
|
|
4949
|
+
"nth-4:[animation-delay:250ms] nth-5:[animation-delay:300ms] nth-[n+6]:[animation-delay:350ms]"
|
|
4950
|
+
].join(" ");
|
|
4898
4951
|
/** 全屏菜单里的一个栏目。 */
|
|
4899
|
-
function NavMenuItem({ icon, current = false, disabled = false, closeOnClick = true, href, target, rel, render, onClick, children, ...props }) {
|
|
4952
|
+
function NavMenuItem({ icon, current = false, disabled = false, closeOnClick = true, href, target, rel, render, onClick, className, children, ...props }) {
|
|
4900
4953
|
const close = useContext(NavMenuContext);
|
|
4901
4954
|
const isLink = href !== void 0 || render !== void 0;
|
|
4902
4955
|
const handleClick = (event) => {
|
|
@@ -4933,6 +4986,7 @@ function NavMenuItem({ icon, current = false, disabled = false, closeOnClick = t
|
|
|
4933
4986
|
] });
|
|
4934
4987
|
return /* @__PURE__ */ jsx("li", {
|
|
4935
4988
|
...props,
|
|
4989
|
+
className: cn(itemEnter, className),
|
|
4936
4990
|
children: isLink ? /* @__PURE__ */ jsx(LinkElement, {
|
|
4937
4991
|
render,
|
|
4938
4992
|
href: disabled ? void 0 : href,
|
|
@@ -5071,7 +5125,7 @@ function OtpInput({ length = 6, value, defaultValue, onValueChange, onComplete,
|
|
|
5071
5125
|
const labelId = useId();
|
|
5072
5126
|
const ownLabel = ariaLabelledBy ?? (ariaLabel ? labelId : void 0);
|
|
5073
5127
|
const groupLabel = ownLabel ?? fieldContext?.labelId;
|
|
5074
|
-
const slotClass = cn("min-w-0 shrink text-center font-tech font-medium tabular-nums text-
|
|
5128
|
+
const slotClass = cn("min-w-0 shrink text-center font-tech font-medium tabular-nums text-transparent caret-ink", "transition-colors duration-(--duration-fast) ease-standard", disabled ? "data-filled:text-ink-disabled" : "data-filled:text-ink", focusRing, slotSize[size], slotFrame[variant], readOnly ? "border-transparent bg-transparent" : slotFill[variant], disabled ? "cursor-not-allowed border-line" : invalid ? "border-danger" : !readOnly && "border-line-strong hover:not-focus:border-ink-secondary focus:border-ink");
|
|
5075
5129
|
const group = groupSize !== void 0 && groupSize > 0 ? groupSize : 0;
|
|
5076
5130
|
return /* @__PURE__ */ jsxs(OTPField.Root, {
|
|
5077
5131
|
...props,
|
|
@@ -6685,8 +6739,9 @@ const THUMB_HALF = 6;
|
|
|
6685
6739
|
const markLeft = (ratio) => `calc(${THUMB_HALF}px + (100% - 12px) * ${ratio})`;
|
|
6686
6740
|
const thumb = [
|
|
6687
6741
|
"relative h-5 w-3 bg-surface-inverse shadow-[0_0_0_2px_var(--ef-surface)]",
|
|
6742
|
+
"transition-[inset-inline-start] duration-(--duration-fast) ease-standard data-dragging:transition-none",
|
|
6688
6743
|
"before:absolute before:-inset-x-3.5 before:-inset-y-2.5 before:content-['']",
|
|
6689
|
-
"after:absolute after:inset-y-1 after:left-1/2 after:w-0.5 after:-translate-x-1/2 after:bg-accent-ink-inverse after:opacity-0 after:content-[''] data-dragging:after:opacity-100",
|
|
6744
|
+
"after:absolute after:inset-y-1 after:left-1/2 after:w-0.5 after:-translate-x-1/2 after:bg-accent-ink-inverse after:opacity-0 after:transition-opacity after:duration-(--duration-fast) after:ease-standard after:content-[''] data-dragging:after:opacity-100",
|
|
6690
6745
|
"choice-diamond:size-3.5 choice-diamond:rotate-45 choice-diamond:after:inset-1 choice-diamond:after:w-auto choice-diamond:after:translate-x-0",
|
|
6691
6746
|
"data-disabled:bg-ink-disabled",
|
|
6692
6747
|
focusRingWithin
|
|
@@ -6741,7 +6796,7 @@ function Slider(props) {
|
|
|
6741
6796
|
className: cn("flex touch-none items-center px-1.5 select-none data-disabled:cursor-not-allowed", controlSize[size]),
|
|
6742
6797
|
children: /* @__PURE__ */ jsxs(Slider$1.Track, {
|
|
6743
6798
|
className: "h-1 w-full bg-line",
|
|
6744
|
-
children: [/* @__PURE__ */ jsx(Slider$1.Indicator, { className: "bg-ink data-disabled:bg-ink-disabled" }), (range ? [0, 1] : [0]).map((index) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
|
|
6799
|
+
children: [/* @__PURE__ */ jsx(Slider$1.Indicator, { className: "bg-ink transition-[inset-inline-start,width] duration-(--duration-fast) ease-standard data-disabled:bg-ink-disabled data-dragging:transition-none" }), (range ? [0, 1] : [0]).map((index) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
|
|
6745
6800
|
index,
|
|
6746
6801
|
...range ? { "aria-label": thumbLabels[index] } : {
|
|
6747
6802
|
"aria-label": ariaLabel,
|
|
@@ -7108,9 +7163,9 @@ function Step({ title, description, invalid = false, href, target, rel, render,
|
|
|
7108
7163
|
"aria-hidden": "true",
|
|
7109
7164
|
className: cn("flex shrink-0 items-center", railLayout[orientation]),
|
|
7110
7165
|
children: [/* @__PURE__ */ jsx("span", {
|
|
7111
|
-
className: cn("flex shrink-0 items-center justify-center font-tech leading-none tabular-nums", nodeSize[size], invalid ? "border border-danger text-danger" : nodeClass$1[status]),
|
|
7166
|
+
className: cn("flex shrink-0 items-center justify-center font-tech leading-none tabular-nums", "transition-colors duration-(--duration-fast) ease-standard", nodeSize[size], invalid ? "border border-danger text-danger" : nodeClass$1[status]),
|
|
7112
7167
|
children: invalid ? /* @__PURE__ */ jsx(StatusDanger, {}) : status === "done" ? /* @__PURE__ */ jsx(Check, {}) : String(index + 1).padStart(2, "0")
|
|
7113
|
-
}), /* @__PURE__ */ jsx("span", { className: cn("flex-1 group-last/step:hidden", lineLayout[orientation], status === "done" ? "
|
|
7168
|
+
}), /* @__PURE__ */ jsx("span", { className: cn("relative flex-1 overflow-clip bg-line-strong group-last/step:hidden", "before:absolute before:top-0 before:-right-4 before:-bottom-4 before:left-0 before:origin-top-left before:bg-ink before:transition-[scale] before:duration-(--duration-base) before:ease-exit before:content-['']", lineLayout[orientation], status === "done" ? "before:scale-100" : "before:scale-0") })]
|
|
7114
7169
|
}), /* @__PURE__ */ jsxs("div", {
|
|
7115
7170
|
className: cn("min-w-0 flex-1", bodyLayout[orientation]),
|
|
7116
7171
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -8101,11 +8156,11 @@ const toneText = {
|
|
|
8101
8156
|
const placementClass = {
|
|
8102
8157
|
bottom: {
|
|
8103
8158
|
viewport: "bottom-6",
|
|
8104
|
-
root: "bottom-0 translate-
|
|
8159
|
+
root: "bottom-0 transform-[translate(calc(-50%+var(--toast-swipe-movement-x,0px)),var(--toast-swipe-movement-y,0px))] data-starting-style:translate-y-(--motion-shift-lg)"
|
|
8105
8160
|
},
|
|
8106
8161
|
center: {
|
|
8107
8162
|
viewport: "top-1/2",
|
|
8108
|
-
root: "top-0 translate-
|
|
8163
|
+
root: "top-0 transform-[translate(calc(-50%+var(--toast-swipe-movement-x,0px)),calc(-50%+var(--toast-swipe-movement-y,0px)))]"
|
|
8109
8164
|
}
|
|
8110
8165
|
};
|
|
8111
8166
|
function isOptions(input) {
|
|
@@ -8152,7 +8207,7 @@ function ToastHost({ placement, label, closeLabel, children }) {
|
|
|
8152
8207
|
return /* @__PURE__ */ jsx(Toast.Root, {
|
|
8153
8208
|
toast,
|
|
8154
8209
|
"data-theme": "dark",
|
|
8155
|
-
className: cn("pointer-events-auto absolute left-1/2 w-max max-w-full
|
|
8210
|
+
className: cn("pointer-events-auto absolute left-1/2 w-max max-w-full", "border border-line bg-black/80 text-base leading-[1.4] text-white", "transition-[opacity,translate,transform] duration-[var(--duration-fast),var(--duration-base),var(--duration-fast)] ease-[var(--ease-standard),var(--ease-exit),var(--ease-standard)]", "data-ending-style:opacity-0 data-starting-style:opacity-0", "data-swiping:select-none", focusRingInset, placementClass[placement].root),
|
|
8156
8211
|
children: /* @__PURE__ */ jsxs(Toast.Content, {
|
|
8157
8212
|
className: cn("flex items-center gap-3 py-2.5 pl-5", toast.data?.dismissible ? "pr-2" : "pr-5"),
|
|
8158
8213
|
children: [
|
|
@@ -8568,7 +8623,7 @@ function Tooltip({ content, children, side = "top", align = "center", delay, arr
|
|
|
8568
8623
|
sideOffset: arrow ? 8 : 2,
|
|
8569
8624
|
className: "z-(--z-overlay)",
|
|
8570
8625
|
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
|
|
8571
|
-
className: cn("relative max-w-64 border border-transparent bg-surface-raised px-2.5 py-1.5 text-sm wrap-anywhere text-ink", "origin-(--transform-origin) transition-opacity duration-(--duration-fast) ease-standard", "data-ending-style:opacity-0 data-instant:transition-none data-starting-style:opacity-0", className),
|
|
8626
|
+
className: cn("relative max-w-64 border border-transparent bg-surface-raised px-2.5 py-1.5 text-sm wrap-anywhere text-ink", "origin-(--transform-origin) transition-[opacity,translate] duration-(--duration-fast) ease-standard", "data-ending-style:opacity-0 data-instant:transition-none data-starting-style:opacity-0", enterFromSide, className),
|
|
8572
8627
|
children: [arrow && /* @__PURE__ */ jsx(Tooltip$1.Arrow, {
|
|
8573
8628
|
"aria-hidden": "true",
|
|
8574
8629
|
className: cn("size-2 rotate-45 bg-surface-raised forced-colors:hidden", "data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1 data-[side=top]:-bottom-1")
|