raft-ui 0.0.15 → 0.0.16

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,13 @@
1
+ ## [0.0.16](https://github.com/botiverse/rui/compare/v0.0.15...v0.0.16) (2026-07-07)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **docs:** hide color token theme switchers ([104f3cd](https://github.com/botiverse/rui/commit/104f3cd58f1a8d773aae78eca8ff097460af0a24))
6
+ - **docs:** provide preview theme globally ([91b35a4](https://github.com/botiverse/rui/commit/91b35a49ea87c9ec6bce83bc0b13754183992896))
7
+ - **dropdown-menu:** align brutal menu typography ([d93c940](https://github.com/botiverse/rui/commit/d93c940b15a9b392b6f8e5fa695f0117bec75fbb))
8
+ - **dropdown-menu:** match brutal hover colors ([142692f](https://github.com/botiverse/rui/commit/142692f9dea4cd5ac4e73be768fb6380e7a480ce))
9
+ - **dropdown-menu:** simplify radio item layout ([7a34b52](https://github.com/botiverse/rui/commit/7a34b520e7cb656c9b2a6c8edc9444309321ce74))
10
+
1
11
  ## [0.0.15](https://github.com/botiverse/rui/compare/v0.0.14...v0.0.15) (2026-07-07)
2
12
 
3
13
  ### Features
package/dist/index.mjs CHANGED
@@ -2418,31 +2418,33 @@ const dropdownMenu = tv({
2418
2418
  shortcut: ["ml-auto"],
2419
2419
  itemCount: ["ml-auto inline-flex min-w-5 justify-center gap-0 px-1 tabular-nums"],
2420
2420
  separator: ["border-t-2"],
2421
- indicator: ["pointer-events-none ml-auto flex size-3 shrink-0 items-center justify-center"]
2421
+ indicator: ["pointer-events-none ml-auto flex size-3 shrink-0 items-center justify-center"],
2422
+ radioLabel: []
2422
2423
  },
2423
2424
  variants: { theme: {
2424
2425
  brutal: {
2425
2426
  trigger: ["data-[popup-open]:translate-x-0 data-[popup-open]:translate-y-0", "data-[popup-open]:hover:translate-x-0 data-[popup-open]:hover:translate-y-0"],
2426
2427
  content: ["border-2 border-black bg-white shadow-lg"],
2427
2428
  item: [
2428
- "py-1.5 font-sans text-sm font-semibold leading-6 text-black hover:bg-brutal-yellow data-[highlighted]:bg-brutal-yellow",
2429
+ "py-2 font-sans text-sm font-medium text-black hover:bg-soft-signal/30 data-[highlighted]:bg-soft-signal/30",
2429
2430
  "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
2430
- "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3.5"
2431
+ "[&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg]:stroke-2 [&>svg_*]:stroke-2 [&>svg:not([class*='size-'])]:size-3.5"
2431
2432
  ],
2432
2433
  radioItem: [
2433
- "h-9 overflow-hidden font-sans text-sm font-semibold leading-6 text-black",
2434
+ "overflow-hidden py-2 font-sans text-sm font-medium leading-5 text-black",
2434
2435
  "border-b border-black/10 last:border-b-0",
2435
- "hover:bg-brutal-yellow/30 data-[highlighted]:bg-brutal-yellow/30",
2436
+ "hover:bg-soft-signal/30 data-[highlighted]:bg-soft-signal/30",
2436
2437
  "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
2437
- "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3.5"
2438
+ "[&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg]:stroke-2 [&>svg_*]:stroke-2 [&>svg:not([class*='size-'])]:size-3.5"
2438
2439
  ],
2440
+ radioLabel: ["min-w-0 flex-1 truncate"],
2439
2441
  submenuTrigger: [
2440
- "py-1.5 font-sans text-sm font-semibold leading-6 text-black hover:bg-brutal-yellow data-[highlighted]:bg-brutal-yellow data-[popup-open]:bg-brutal-yellow",
2442
+ "py-2 font-sans text-sm font-medium text-black hover:bg-soft-signal/30 data-[highlighted]:bg-soft-signal/30 data-[popup-open]:bg-soft-signal/30",
2441
2443
  "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
2442
- "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3.5"
2444
+ "[&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg]:stroke-2 [&>svg_*]:stroke-2 [&>svg:not([class*='size-'])]:size-3.5"
2443
2445
  ],
2444
2446
  label: ["border-b border-black px-3 py-2", "font-sans text-[10px] font-bold uppercase leading-none tracking-wide text-black/60"],
2445
- shortcut: ["font-sans text-sm font-semibold leading-6"],
2447
+ shortcut: ["font-sans text-sm font-medium"],
2446
2448
  itemCount: ["rounded border border-black bg-brutal-pink px-1 py-0.5", "font-sans text-[10px] leading-none font-bold text-white"],
2447
2449
  separator: ["border-black"],
2448
2450
  indicator: []
@@ -2484,6 +2486,7 @@ const dropdownMenu = tv({
2484
2486
  "hover:[&>svg]:text-foreground-strong",
2485
2487
  "data-[highlighted]:[&>svg]:text-foreground-strong"
2486
2488
  ],
2489
+ radioLabel: ["min-w-0 flex-1 truncate"],
2487
2490
  submenuTrigger: [
2488
2491
  "gap-2.5 rounded-sm px-3 py-2 text-[13px] font-medium tracking-[-0.005em]",
2489
2492
  "text-foreground-muted",
@@ -2645,17 +2648,30 @@ function DropdownMenuRadioGroup({ ...props }) {
2645
2648
  });
2646
2649
  }
2647
2650
  function DropdownMenuRadioItem({ className, children, ...props }) {
2648
- const { radioItem, indicator } = dropdownMenu({ theme: useThemeFamily() });
2651
+ const { radioItem, radioLabel, indicator } = dropdownMenu({ theme: useThemeFamily() });
2649
2652
  return /* @__PURE__ */ jsxs(Menu.RadioItem, {
2650
2653
  "data-slot": "dropdown-menu-radio-item",
2651
2654
  className: radioItem({ className }),
2652
2655
  ...props,
2653
- children: [children, /* @__PURE__ */ jsx("span", {
2656
+ children: [renderRadioItemChildren(children, radioLabel()), /* @__PURE__ */ jsx("span", {
2654
2657
  className: indicator(),
2655
2658
  children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(DropdownMenuCheckIcon, {}) })
2656
2659
  })]
2657
2660
  });
2658
2661
  }
2662
+ function renderRadioItemChildren(children, className) {
2663
+ if (typeof children === "string" || typeof children === "number") return /* @__PURE__ */ jsx("span", {
2664
+ "data-slot": "dropdown-menu-radio-item-label",
2665
+ className,
2666
+ children
2667
+ });
2668
+ if (Array.isArray(children) && children.every((child) => typeof child === "string")) return /* @__PURE__ */ jsx("span", {
2669
+ "data-slot": "dropdown-menu-radio-item-label",
2670
+ className,
2671
+ children
2672
+ });
2673
+ return children;
2674
+ }
2659
2675
  function DropdownMenuRadioItemIndicator({ className, ...props }) {
2660
2676
  return /* @__PURE__ */ jsx(Menu.RadioItemIndicator, {
2661
2677
  "data-slot": "dropdown-menu-radio-item-indicator",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "raft-ui",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "React UI components for Raft.",
5
5
  "license": "MIT",
6
6
  "repository": {