raft-ui 0.0.11 → 0.0.12

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,3 +1,9 @@
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
+
1
7
  ## [0.0.10](https://github.com/botiverse/rui/compare/v0.0.9...v0.0.10) (2026-07-03)
2
8
 
3
9
  ### Features
package/dist/index.d.mts CHANGED
@@ -1036,6 +1036,7 @@ declare function DropdownMenuSubmenu(props: DropdownMenuSubmenuProps): import("r
1036
1036
  type DropdownMenuTriggerProps = StyledProps<Menu.Trigger.Props>;
1037
1037
  declare function DropdownMenuTrigger({
1038
1038
  className,
1039
+ render,
1039
1040
  ...props
1040
1041
  }: DropdownMenuTriggerProps): import("react").JSX.Element;
1041
1042
  type DropdownMenuPortalProps = Menu.Portal.Props;
package/dist/index.mjs CHANGED
@@ -2448,6 +2448,11 @@ const dropdownMenu = tv({
2448
2448
  indicator: []
2449
2449
  },
2450
2450
  elegant: {
2451
+ trigger: [
2452
+ "hover:bg-[color-mix(in_oklch,var(--line-subtle)_22%,var(--layer-panel))]",
2453
+ "data-[popup-open]:[--button-focus-outline:transparent] focus-visible:[--button-focus-outline:transparent]",
2454
+ "data-[popup-open]:shadow-[0_0_0_0.5px_oklch(0.21_0.006_285_/_0.14),0_0_0_3px_color-mix(in_oklch,var(--primary-400)_35%,transparent)] focus-visible:shadow-[0_0_0_0.5px_oklch(0.21_0.006_285_/_0.14),0_0_0_3px_color-mix(in_oklch,var(--primary-400)_35%,transparent)]"
2455
+ ],
2451
2456
  content: [
2452
2457
  "gap-0.5 rounded-md bg-layer-popover p-1",
2453
2458
  "shadow-lg outline-none",
@@ -2514,10 +2519,14 @@ function DropdownMenuSubmenu(props) {
2514
2519
  ...props
2515
2520
  });
2516
2521
  }
2517
- function DropdownMenuTrigger({ className, ...props }) {
2522
+ function DropdownMenuTrigger({ className, render = /* @__PURE__ */ jsx(Button, {
2523
+ variant: "outline",
2524
+ size: "md"
2525
+ }), ...props }) {
2518
2526
  const { trigger } = dropdownMenu({ theme: useThemeFamily() });
2519
2527
  return /* @__PURE__ */ jsx(Menu.Trigger, {
2520
2528
  "data-slot": "dropdown-menu-trigger",
2529
+ render,
2521
2530
  className: trigger({ className }),
2522
2531
  ...props
2523
2532
  });
@@ -2536,8 +2545,10 @@ function DropdownMenuPopup({ className, ...props }) {
2536
2545
  ...props
2537
2546
  });
2538
2547
  }
2539
- function DropdownMenuContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "bottom", sideOffset = 4, sticky, portalProps, className, ...props }) {
2540
- const { positioner, content } = dropdownMenu({ theme: useThemeFamily() });
2548
+ function DropdownMenuContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "bottom", sideOffset, sticky, portalProps, className, ...props }) {
2549
+ const theme = useThemeFamily();
2550
+ const resolvedSideOffset = sideOffset ?? (theme === "elegant" ? 6 : 4);
2551
+ const { positioner, content } = dropdownMenu({ theme });
2541
2552
  return /* @__PURE__ */ jsx(Menu.Portal, {
2542
2553
  ...portalProps,
2543
2554
  children: /* @__PURE__ */ jsx(Menu.Positioner, {
@@ -2551,7 +2562,7 @@ function DropdownMenuContent({ align = "start", alignOffset = 0, anchor, arrowPa
2551
2562
  disableAnchorTracking,
2552
2563
  positionMethod,
2553
2564
  side,
2554
- sideOffset,
2565
+ sideOffset: resolvedSideOffset,
2555
2566
  sticky,
2556
2567
  className: positioner(),
2557
2568
  children: /* @__PURE__ */ jsx(Menu.Popup, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "raft-ui",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "React UI components for Raft.",
5
5
  "license": "MIT",
6
6
  "repository": {