raft-ui 0.0.12 → 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 CHANGED
@@ -1,51 +1,16 @@
1
- ## [0.0.12](https://github.com/botiverse/rui/compare/v0.0.11...v0.0.12) (2026-07-03)
2
-
3
- ### Features
4
-
5
- - **dropdown-menu:** refine trigger defaults ([d6d3745](https://github.com/botiverse/rui/commit/d6d3745b90b5d5a3ea56cc19fcffce09077df56e))
6
-
7
- ## [0.0.10](https://github.com/botiverse/rui/compare/v0.0.9...v0.0.10) (2026-07-03)
8
-
9
- ### Features
10
-
11
- - **lightbox:** add navigation and info slots ([84b273d](https://github.com/botiverse/rui/commit/84b273ddac4b0e3bec94ce19c311dbd9562ec2cb))
12
- - **lightbox:** refine preview chrome styling ([d441ace](https://github.com/botiverse/rui/commit/d441ace1740f3010cfbb5aa8b1c54e94fdb3f8ec))
13
- - **preview-card:** add hover preview card docs ([e91545c](https://github.com/botiverse/rui/commit/e91545c32a594dc4e7c10e6e6113914dea6f6063))
14
- - **separator:** support labeled content ([3d3509b](https://github.com/botiverse/rui/commit/3d3509bf1b5098788c99276401c6f553aa269f14))
15
- - **skeleton:** add skeleton primitive ([a64471b](https://github.com/botiverse/rui/commit/a64471be70cf00457a4376fd37dd308034f378f8))
16
- - **toast:** add ToastActions slot and refine theme layouts ([c4e06c0](https://github.com/botiverse/rui/commit/c4e06c0464e399fc2cf0b6e9165f5823b841bf81))
17
- - **toast:** add wip toast docs and primitives ([894ea03](https://github.com/botiverse/rui/commit/894ea031527801716cb75105a5be9ba5d4ba9574))
18
- - **toast:** polish toast component and docs ([fa70814](https://github.com/botiverse/rui/commit/fa7081441205283af80d1a89f859cbf8645c3636))
19
- - **toast:** promote toast api ([c2701db](https://github.com/botiverse/rui/commit/c2701db58409115e985c83adc8cb94c33e55e11b))
20
- - **toast:** refine composition previews ([5177704](https://github.com/botiverse/rui/commit/51777044ec4950dc10639960bc917027da4d513d))
21
- - **toast:** refine elegant glass styling ([e047a66](https://github.com/botiverse/rui/commit/e047a66ae8dfc0eb0f1f1cf4fc1fa86ff55265ff))
22
- - **ui:** add Progress component ([135ec9c](https://github.com/botiverse/rui/commit/135ec9c19493d139f352ecf7d0811a5281d53ba1))
1
+ ## [0.0.14](https://github.com/botiverse/rui/compare/v0.0.13...v0.0.14) (2026-07-06)
23
2
 
24
3
  ### Bug Fixes
25
4
 
26
- - **home:** improve dialog gallery previews ([6da45e8](https://github.com/botiverse/rui/commit/6da45e8af605680f73dc5943c32f98720273c3b4))
27
- - **preview-card:** point mention links to docs route ([50ea8c3](https://github.com/botiverse/rui/commit/50ea8c389c1255a7cc3b45415f0c357a4eedae03))
28
- - **toast:** align source comparison variants ([041820c](https://github.com/botiverse/rui/commit/041820c3277a25ca548672ea696bb73d65733b96))
29
- - **toast:** refine layout variants ([88f443f](https://github.com/botiverse/rui/commit/88f443f281480c9515b669f107dce22324f35f67))
30
- - **tooltip:** loosen elegant trigger offset ([4955a67](https://github.com/botiverse/rui/commit/4955a67ad50944e3f804f312ee1eaf8aff76236e))
31
- - **tooltip:** refine elegant tooltip styling ([750a9d3](https://github.com/botiverse/rui/commit/750a9d38db802b2b51125d1d621b5983db4af712))
32
- - **ui:** preserve separator semantics ([78c3096](https://github.com/botiverse/rui/commit/78c3096ced4506292fdfe3a5c72f1fdeb7029983))
5
+ - **toast:** refine anchored and stacked behavior ([cc53edb](https://github.com/botiverse/rui/commit/cc53edbb7365ee452a27ec04ffbf6f306fe8bb47))
33
6
 
34
- ## [0.0.9](https://github.com/botiverse/rui/compare/v0.0.8...v0.0.9) (2026-06-30)
7
+ ## [0.0.13](https://github.com/botiverse/rui/compare/v0.0.12...v0.0.13) (2026-07-06)
35
8
 
36
9
  ### Features
37
10
 
38
- - **bottom-sheet:** rebuild sheet with vaul ([86f626a](https://github.com/botiverse/rui/commit/86f626a59225c8b1b972c793776d1536cd98ad06))
39
- - **bottom-sheet:** refine sheet composition and previews ([01db061](https://github.com/botiverse/rui/commit/01db06136c6de020d347f83bda177f9a53cc2b2f))
40
- - **overlays:** refine elegant modal surfaces ([09d4cd3](https://github.com/botiverse/rui/commit/09d4cd33a65c8fcd2cd38be2e92a3f7191f1d090))
11
+ - **message-item:** add wip composition docs ([e122875](https://github.com/botiverse/rui/commit/e1228758f553d343bb9ff0212d996b9caca19e08))
41
12
 
42
13
  ### Bug Fixes
43
14
 
44
- - **bottom-sheet:** align themed action order ([56d4a00](https://github.com/botiverse/rui/commit/56d4a00aef12324aef495765409908d72af46599))
45
- - **button:** align elegant button sizing ([95ef82a](https://github.com/botiverse/rui/commit/95ef82aa29484b9ac63cc30cf56e97489f6c1080))
46
- - **button:** align elegant outline visual height ([2f82b41](https://github.com/botiverse/rui/commit/2f82b412e0aa7859365a5bce316520aa29557559))
47
- - **button:** tighten inline icon padding ([50c4d20](https://github.com/botiverse/rui/commit/50c4d2061757a65560e632e1dba3715acefd3585))
48
- - **dialog:** align source comparison previews ([fc7da30](https://github.com/botiverse/rui/commit/fc7da30adad1bc96e299d662af0e9a7df092fd5c))
49
- - **dialog:** smooth modal transitions ([7ca0707](https://github.com/botiverse/rui/commit/7ca0707ddd83a84850430ff6d29d21320ae88b33))
50
- - **docs:** stabilize hydration and font imports ([45b272b](https://github.com/botiverse/rui/commit/45b272b520381d8ce6e818cb692c4240cb3a778c))
51
- - **overlays:** use themed backdrop tokens ([de06dd7](https://github.com/botiverse/rui/commit/de06dd7fd5552db56f847e0c1eb6542505760a6e))
15
+ - **segmented-control:** make selection updates immediate ([87e1d05](https://github.com/botiverse/rui/commit/87e1d05e6b6a0c2e9a911898d18d0d9f9fcde91d))
16
+ - **tooltip:** tighten content padding ([ce37fde](https://github.com/botiverse/rui/commit/ce37fde21b8be7adab49e81723b331e01a87c2df))
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(props: NotificationCenterTriggerProps): import("react").JSX.Element;
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
@@ -2924,7 +2924,7 @@ const tooltip = tv({
2924
2924
  trigger: ["select-none"],
2925
2925
  positioner: ["isolate z-50 outline-none"],
2926
2926
  content: [
2927
- "relative inline-block max-w-[min(20rem,var(--available-width,20rem))] min-w-0 px-3 py-2",
2927
+ "relative inline-block max-w-[min(20rem,var(--available-width,20rem))] min-w-0 px-2.5 py-1",
2928
2928
  "text-[13px] leading-[18px] whitespace-normal break-words",
2929
2929
  "origin-[var(--transform-origin)] outline-none",
2930
2930
  "transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)]",
@@ -4614,7 +4614,7 @@ const segmentedControl = tv({
4614
4614
  root: ["inline-flex max-w-full flex-wrap items-center gap-1"],
4615
4615
  item: [
4616
4616
  "inline-flex min-w-0 shrink-0 items-center gap-1.5",
4617
- "text-xs leading-4 transition-colors",
4617
+ "text-xs leading-4",
4618
4618
  "outline-none disabled:pointer-events-none",
4619
4619
  "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5"
4620
4620
  ],
@@ -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-[-6px]",
6254
- "data-[side=bottom]:top-[-6px] data-[side=bottom]:rotate-180",
6255
- "data-[side=left]:right-[-8px] data-[side=left]:-rotate-90",
6256
- "data-[side=right]:left-[-8px] data-[side=right]:rotate-90",
6257
- "data-[side=inline-start]:right-[-8px] data-[side=inline-start]:-rotate-90",
6258
- "data-[side=inline-end]:left-[-8px] data-[side=inline-end]:rotate-90"
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: theme === "elegant" ? "stroke-white/28" : "stroke-line-strong",
6691
+ className: "stroke-line-strong",
6671
6692
  strokeLinecap: "round",
6672
6693
  strokeLinejoin: "round",
6673
6694
  vectorEffect: "non-scaling-stroke"