raft-ui 0.0.13 → 0.0.14
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/CHANGELOG.md +6 -0
- package/dist/index.d.mts +12 -3
- package/dist/index.mjs +35 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [0.0.14](https://github.com/botiverse/rui/compare/v0.0.13...v0.0.14) (2026-07-06)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **toast:** refine anchored and stacked behavior ([cc53edb](https://github.com/botiverse/rui/commit/cc53edbb7365ee452a27ec04ffbf6f306fe8bb47))
|
|
6
|
+
|
|
1
7
|
## [0.0.13](https://github.com/botiverse/rui/compare/v0.0.12...v0.0.13) (2026-07-06)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/dist/index.d.mts
CHANGED
|
@@ -3381,6 +3381,7 @@ declare const notificationCenter: import("tailwind-variants/lite").TVReturnType<
|
|
|
3381
3381
|
actionButton: never[];
|
|
3382
3382
|
};
|
|
3383
3383
|
elegant: {
|
|
3384
|
+
trigger: string[];
|
|
3384
3385
|
popup: string[];
|
|
3385
3386
|
header: string[];
|
|
3386
3387
|
title: string[];
|
|
@@ -3431,6 +3432,7 @@ declare const notificationCenter: import("tailwind-variants/lite").TVReturnType<
|
|
|
3431
3432
|
secondary: {};
|
|
3432
3433
|
};
|
|
3433
3434
|
}, {
|
|
3435
|
+
trigger: never[];
|
|
3434
3436
|
popup: string[];
|
|
3435
3437
|
header: string[];
|
|
3436
3438
|
title: string[];
|
|
@@ -3459,6 +3461,7 @@ declare const notificationCenter: import("tailwind-variants/lite").TVReturnType<
|
|
|
3459
3461
|
actionButton: never[];
|
|
3460
3462
|
};
|
|
3461
3463
|
elegant: {
|
|
3464
|
+
trigger: string[];
|
|
3462
3465
|
popup: string[];
|
|
3463
3466
|
header: string[];
|
|
3464
3467
|
title: string[];
|
|
@@ -3509,6 +3512,7 @@ declare const notificationCenter: import("tailwind-variants/lite").TVReturnType<
|
|
|
3509
3512
|
secondary: {};
|
|
3510
3513
|
};
|
|
3511
3514
|
}, {
|
|
3515
|
+
trigger: never[];
|
|
3512
3516
|
popup: string[];
|
|
3513
3517
|
header: string[];
|
|
3514
3518
|
title: string[];
|
|
@@ -3537,6 +3541,7 @@ declare const notificationCenter: import("tailwind-variants/lite").TVReturnType<
|
|
|
3537
3541
|
actionButton: never[];
|
|
3538
3542
|
};
|
|
3539
3543
|
elegant: {
|
|
3544
|
+
trigger: string[];
|
|
3540
3545
|
popup: string[];
|
|
3541
3546
|
header: string[];
|
|
3542
3547
|
title: string[];
|
|
@@ -3587,6 +3592,7 @@ declare const notificationCenter: import("tailwind-variants/lite").TVReturnType<
|
|
|
3587
3592
|
secondary: {};
|
|
3588
3593
|
};
|
|
3589
3594
|
}, {
|
|
3595
|
+
trigger: never[];
|
|
3590
3596
|
popup: string[];
|
|
3591
3597
|
header: string[];
|
|
3592
3598
|
title: string[];
|
|
@@ -3607,8 +3613,11 @@ declare function NotificationCenter({
|
|
|
3607
3613
|
modal,
|
|
3608
3614
|
...props
|
|
3609
3615
|
}: NotificationCenterProps): import("react").JSX.Element;
|
|
3610
|
-
type NotificationCenterTriggerProps = Popover$1.Trigger.Props
|
|
3611
|
-
declare function NotificationCenterTrigger(
|
|
3616
|
+
type NotificationCenterTriggerProps = StyledProps<Popover$1.Trigger.Props>;
|
|
3617
|
+
declare function NotificationCenterTrigger({
|
|
3618
|
+
className,
|
|
3619
|
+
...props
|
|
3620
|
+
}: NotificationCenterTriggerProps): import("react").JSX.Element;
|
|
3612
3621
|
type NotificationCenterPortalProps = Popover$1.Portal.Props;
|
|
3613
3622
|
type NotificationCenterPopupProps = StyledProps<Popover$1.Popup.Props> & Pick<VariantProps<typeof notificationCenter>, "size" | "viewport"> & Pick<Popover$1.Positioner.Props, "align" | "alignOffset" | "anchor" | "arrowPadding" | "collisionAvoidance" | "collisionBoundary" | "collisionPadding" | "disableAnchorTracking" | "positionMethod" | "side" | "sideOffset" | "sticky"> & {
|
|
3614
3623
|
portalProps?: NotificationCenterPortalProps;
|
|
@@ -4068,7 +4077,7 @@ type ToastArrowProps = StyledProps<Toast.Arrow.Props>;
|
|
|
4068
4077
|
declare function ToastArrow({
|
|
4069
4078
|
className,
|
|
4070
4079
|
...props
|
|
4071
|
-
}: ToastArrowProps): import("react").JSX.Element;
|
|
4080
|
+
}: ToastArrowProps): import("react").JSX.Element | null;
|
|
4072
4081
|
//#endregion
|
|
4073
4082
|
//#region src/components/tabs/tabs.d.ts
|
|
4074
4083
|
declare const tabs: import("tailwind-variants/lite").TVReturnType<{
|
package/dist/index.mjs
CHANGED
|
@@ -5878,6 +5878,7 @@ function EmptyStateActions({ render, className, ...props }) {
|
|
|
5878
5878
|
//#region src/components/notification-center/notification-center.tsx
|
|
5879
5879
|
const notificationCenter = tv({
|
|
5880
5880
|
slots: {
|
|
5881
|
+
trigger: [],
|
|
5881
5882
|
popup: ["flex flex-col overflow-hidden bg-layer-panel"],
|
|
5882
5883
|
header: ["flex items-center gap-2 px-4 py-2"],
|
|
5883
5884
|
title: ["text-xs"],
|
|
@@ -5907,6 +5908,12 @@ const notificationCenter = tv({
|
|
|
5907
5908
|
actionButton: []
|
|
5908
5909
|
},
|
|
5909
5910
|
elegant: {
|
|
5911
|
+
trigger: [
|
|
5912
|
+
"relative inline-flex size-9 items-center justify-center overflow-visible border-0 bg-transparent p-0",
|
|
5913
|
+
"select-none text-foreground-muted transition-colors hover:text-foreground-strong",
|
|
5914
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/35",
|
|
5915
|
+
"[&>svg]:size-5 [&>svg]:shrink-0"
|
|
5916
|
+
],
|
|
5910
5917
|
popup: ["rounded-md bg-layer-popover", "shadow-lg"],
|
|
5911
5918
|
header: ["border-b border-line-muted bg-white pt-2.5"],
|
|
5912
5919
|
title: ["text-sm font-medium normal-case tracking-normal text-foreground-strong"],
|
|
@@ -6004,9 +6011,11 @@ function NotificationCenter({ modal = false, ...props }) {
|
|
|
6004
6011
|
...props
|
|
6005
6012
|
});
|
|
6006
6013
|
}
|
|
6007
|
-
function NotificationCenterTrigger(props) {
|
|
6014
|
+
function NotificationCenterTrigger({ className, ...props }) {
|
|
6015
|
+
const { trigger } = notificationCenter({ theme: useThemeFamily() });
|
|
6008
6016
|
return /* @__PURE__ */ jsx(Popover$1.Trigger, {
|
|
6009
6017
|
"data-slot": "notification-center-trigger",
|
|
6018
|
+
className: trigger({ className }),
|
|
6010
6019
|
...props
|
|
6011
6020
|
});
|
|
6012
6021
|
}
|
|
@@ -6207,7 +6216,7 @@ function NotificationCenterEmptyState(props) {
|
|
|
6207
6216
|
const toastStyles = tv({
|
|
6208
6217
|
slots: {
|
|
6209
6218
|
viewport: ["pointer-events-none isolate z-[70] w-[min(24rem,calc(100vw-2rem))]", "outline-none"],
|
|
6210
|
-
positioner: ["isolate z-[70] outline-none"],
|
|
6219
|
+
positioner: ["isolate z-[calc(70-var(--toast-index))] outline-none"],
|
|
6211
6220
|
root: [
|
|
6212
6221
|
"group/toast pointer-events-auto",
|
|
6213
6222
|
"select-text overflow-hidden text-foreground-strong",
|
|
@@ -6232,7 +6241,6 @@ const toastStyles = tv({
|
|
|
6232
6241
|
"[&:not(:has([data-slot=toast-icon])):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:py-[var(--toast-title-only-py,0.5rem)]",
|
|
6233
6242
|
"[&:not(:has([data-slot=toast-description]))>[data-slot=toast-body]:only-child]:justify-self-center [&:not(:has([data-slot=toast-description]))>[data-slot=toast-body]:only-child]:text-center",
|
|
6234
6243
|
"transition-opacity duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
6235
|
-
"data-[behind]:opacity-0 data-[expanded]:opacity-100",
|
|
6236
6244
|
"motion-reduce:transition-none"
|
|
6237
6245
|
],
|
|
6238
6246
|
icon: ["flex size-5 shrink-0 items-center justify-center", "[&_svg]:size-3.5 [&_svg]:shrink-0"],
|
|
@@ -6250,12 +6258,12 @@ const toastStyles = tv({
|
|
|
6250
6258
|
],
|
|
6251
6259
|
arrow: [
|
|
6252
6260
|
"pointer-events-none flex",
|
|
6253
|
-
"data-[side=top]:bottom-[-
|
|
6254
|
-
"data-[side=bottom]:top-[-
|
|
6255
|
-
"data-[side=left]:right-[-
|
|
6256
|
-
"data-[side=right]:left-[-
|
|
6257
|
-
"data-[side=inline-start]:right-[-
|
|
6258
|
-
"data-[side=inline-end]:left-[-
|
|
6261
|
+
"data-[side=top]:bottom-[-5px]",
|
|
6262
|
+
"data-[side=bottom]:top-[-5px] data-[side=bottom]:rotate-180",
|
|
6263
|
+
"data-[side=left]:right-[-7px] data-[side=left]:-rotate-90",
|
|
6264
|
+
"data-[side=right]:left-[-7px] data-[side=right]:rotate-90",
|
|
6265
|
+
"data-[side=inline-start]:right-[-7px] data-[side=inline-start]:-rotate-90",
|
|
6266
|
+
"data-[side=inline-end]:left-[-7px] data-[side=inline-end]:rotate-90"
|
|
6259
6267
|
]
|
|
6260
6268
|
},
|
|
6261
6269
|
variants: {
|
|
@@ -6289,6 +6297,7 @@ const toastStyles = tv({
|
|
|
6289
6297
|
"[&:has([data-slot=toast-actions])]:min-h-14",
|
|
6290
6298
|
"[&:has([data-slot=toast-actions])]:py-3",
|
|
6291
6299
|
"[&:has([data-slot=toast-actions])]:pl-3.5",
|
|
6300
|
+
"[&:has([data-slot=toast-actions])]:pr-3",
|
|
6292
6301
|
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:min-h-14",
|
|
6293
6302
|
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:min-w-[18rem]",
|
|
6294
6303
|
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:py-3",
|
|
@@ -6342,13 +6351,15 @@ const toastStyles = tv({
|
|
|
6342
6351
|
"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+120%))_translateY(var(--toast-y))]",
|
|
6343
6352
|
"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-120%))_translateY(var(--toast-y))]",
|
|
6344
6353
|
"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+120%))]",
|
|
6345
|
-
"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-120%))]"
|
|
6354
|
+
"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-120%))]",
|
|
6355
|
+
"[&_[data-slot=toast-content][data-behind]]:opacity-0 [&_[data-slot=toast-content][data-expanded]]:opacity-100"
|
|
6346
6356
|
] },
|
|
6347
6357
|
inline: { root: [
|
|
6348
6358
|
"relative mx-auto w-max max-w-[min(24rem,var(--available-width,calc(100vw-2rem)))] overflow-visible",
|
|
6349
6359
|
"origin-[var(--transform-origin)]",
|
|
6350
6360
|
"data-[starting-style]:[transform:scale(0.97)]",
|
|
6351
|
-
"data-[ending-style]:[transform:scale(0.99)]"
|
|
6361
|
+
"data-[ending-style]:[transform:scale(0.99)]",
|
|
6362
|
+
"[&_[data-slot=toast-content]]:opacity-100"
|
|
6352
6363
|
] }
|
|
6353
6364
|
},
|
|
6354
6365
|
tone: {
|
|
@@ -6383,6 +6394,16 @@ const toastStyles = tv({
|
|
|
6383
6394
|
theme: "brutal",
|
|
6384
6395
|
layout: "stacked",
|
|
6385
6396
|
class: { root: "w-max max-w-full" }
|
|
6397
|
+
},
|
|
6398
|
+
{
|
|
6399
|
+
theme: "elegant",
|
|
6400
|
+
layout: "stacked",
|
|
6401
|
+
class: { root: "w-max max-w-full" }
|
|
6402
|
+
},
|
|
6403
|
+
{
|
|
6404
|
+
theme: "elegant",
|
|
6405
|
+
layout: "inline",
|
|
6406
|
+
class: { root: "bg-[oklch(0.263_0.009_294.9_/_0.62)] after:hidden dark:bg-[oklch(0.230_0.010_294.8_/_0.62)]" }
|
|
6386
6407
|
}
|
|
6387
6408
|
]
|
|
6388
6409
|
});
|
|
@@ -6611,6 +6632,7 @@ function ToastClose({ className, children, ...props }) {
|
|
|
6611
6632
|
function ToastArrow({ className, ...props }) {
|
|
6612
6633
|
const theme = useThemeFamily();
|
|
6613
6634
|
const { arrow } = toastStyles({ theme });
|
|
6635
|
+
if (theme === "elegant") return null;
|
|
6614
6636
|
return /* @__PURE__ */ jsx(Toast.Arrow, {
|
|
6615
6637
|
"data-slot": "toast-arrow",
|
|
6616
6638
|
className: arrow({ className }),
|
|
@@ -6640,7 +6662,6 @@ function DefaultToastItem({ toast: toastObject }) {
|
|
|
6640
6662
|
const showIcon = toastObject.data?.hasIcon !== false;
|
|
6641
6663
|
return /* @__PURE__ */ jsx(ToastRoot, {
|
|
6642
6664
|
toast: toastObject,
|
|
6643
|
-
layout: !showIcon && !showDescription && !showAction && !showClose ? "inline" : "stacked",
|
|
6644
6665
|
children: /* @__PURE__ */ jsxs(ToastContent, {
|
|
6645
6666
|
className: toastObject.data?.contentClassName,
|
|
6646
6667
|
children: [
|
|
@@ -6665,9 +6686,9 @@ function ToastArrowSvg({ theme, ...props }) {
|
|
|
6665
6686
|
children: [/* @__PURE__ */ jsx("path", {
|
|
6666
6687
|
d: "M1 0H11L6 5.25Z",
|
|
6667
6688
|
className: theme === "elegant" ? "fill-[oklch(0.263_0.009_294.9_/_0.50)] dark:fill-[oklch(0.230_0.010_294.8_/_0.50)]" : "fill-soft-signal"
|
|
6668
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
6689
|
+
}), theme === "elegant" ? null : /* @__PURE__ */ jsx("path", {
|
|
6669
6690
|
d: "M1 0.5L6 5.25L11 0.5",
|
|
6670
|
-
className:
|
|
6691
|
+
className: "stroke-line-strong",
|
|
6671
6692
|
strokeLinecap: "round",
|
|
6672
6693
|
strokeLinejoin: "round",
|
|
6673
6694
|
vectorEffect: "non-scaling-stroke"
|