@lexibase/rdx-ui 1.0.0-beta.2 → 1.1.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/README.md CHANGED
@@ -43,11 +43,8 @@ manual-copy guidance instead of a false success message.
43
43
 
44
44
  ## Base UI composition
45
45
 
46
- The shared components use `@base-ui/react`. Existing RDX colors, variants,
47
- dimensions and layout are preserved; `components.json` selects `base-nova` for
48
- future shadcn additions, without regenerating the existing theme.
49
-
50
- This beta changes the composition API: `asChild` is no longer supported.
46
+ The shared components use `@base-ui/react` and the RDX theme.
47
+ `components.json` selects shadcn/ui's `base-nova` style.
51
48
  Use `render` for interactive composition and `ButtonLink` for navigation:
52
49
 
53
50
  ```tsx
@@ -80,12 +77,12 @@ import Link from 'next/link'
80
77
 
81
78
  `ButtonLink` renders a Next.js link with button styling, not `role="button"`.
82
79
  `Button` renders a native button; use `type="submit"` explicitly for form submission.
83
- Menu actions use `onClick` instead of Radix's `onSelect`. Labels must be inside
84
- `DropdownMenuGroup`. Checkbox values are boolean, not the Radix `indeterminate`
85
- string; checkbox/radio items remain open unless `closeOnClick` is enabled.
80
+ Menu actions use `onClick`. Labels must be inside `DropdownMenuGroup`.
81
+ Checkbox values are boolean; checkbox/radio items remain open unless
82
+ `closeOnClick` is enabled.
86
83
  Navigation items use `DropdownMenuLinkItem` (with `closeOnClick` when desired).
87
84
  Components accept Base UI state-aware `className` callbacks and `render` props.
88
- For custom CSS, replace Radix state selectors/variables with Base UI's
85
+ For custom CSS, use Base UI's
89
86
  `data-open`, `data-closed`, `data-highlighted`, `data-popup-open`,
90
87
  `--available-height` and `--transform-origin`. `Separator` remains decorative by
91
88
  default; set `decorative={false}` for an accessible separator role.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@lexibase/rdx-ui",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "engines": {
6
- "node": ">=20.9"
6
+ "node": "^22.18.0 || ^24.11.0"
7
7
  },
8
8
  "description": "The shared RDX documentation theme and UI components.",
9
9
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "tailwind-merge": "^3.7.0",
34
34
  "tailwindcss": "^4.3.3",
35
35
  "tw-animate-css": "^1.4.0",
36
- "@lexibase/rdx-types": "1.0.0-beta.5"
36
+ "@lexibase/rdx-types": "1.1.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "next": "^16.4.2",
@@ -64,8 +64,6 @@
64
64
  "./postcss-plugin": "./postcss-plugin.cjs",
65
65
  "./lib/*": "./src/lib/*.ts",
66
66
  "./components/*": "./src/components/*.tsx",
67
- "./hooks/*": "./src/hooks/*.ts",
68
- "./contenxts/*": "./src/contexts/*",
69
67
  "./providers/*": "./src/providers/*.tsx"
70
68
  },
71
69
  "scripts": {
@@ -0,0 +1,41 @@
1
+ import type { ReactNode } from 'react'
2
+
3
+ import { ButtonLink } from './button-link'
4
+
5
+ /** Shared site identity and framework credit for documentation footers. */
6
+ export function FooterCredit({
7
+ name,
8
+ since,
9
+ children,
10
+ }: {
11
+ name: string
12
+ since?: number
13
+ children?: ReactNode
14
+ }) {
15
+ const currentYear = new Date().getFullYear()
16
+ const years =
17
+ since !== undefined && since !== currentYear
18
+ ? `${since}–${currentYear}`
19
+ : currentYear
20
+
21
+ return (
22
+ <section className="flex items-center justify-center w-full py-5">
23
+ <p className="text-sm text-muted-foreground text-center">
24
+ &copy; {years} <strong>{name}</strong>
25
+ {children}
26
+ <span className="inline-block">
27
+ {' · Powered by '}
28
+ <ButtonLink
29
+ variant="link"
30
+ size="link"
31
+ href="https://github.com/lexibase/rdx"
32
+ target="_blank"
33
+ rel="noopener noreferrer"
34
+ >
35
+ RDX
36
+ </ButtonLink>
37
+ </span>
38
+ </p>
39
+ </section>
40
+ )
41
+ }
@@ -48,7 +48,7 @@ export function Navbar({
48
48
  {title !== '' && <span>{title}</span>}
49
49
  </ButtonLink>
50
50
  </div>
51
- <div className="flex items-center md:gap-x-2 h-4">
51
+ <div className="flex items-center gap-x-1 md:gap-x-2 h-4">
52
52
  {search}
53
53
  {versionMenu}
54
54
  {docsLink ?? (
@@ -86,20 +86,20 @@ export function VersionDropdown({
86
86
  data-rdx-version-trigger
87
87
  variant="outline"
88
88
  size="sm"
89
- className="min-w-[134px] capitalize"
89
+ className="min-w-0 capitalize sm:min-w-[134px]"
90
90
  aria-label={`Documentation version: ${current.label}`}
91
91
  />
92
92
  }
93
93
  >
94
94
  {current.label}
95
95
  <DropdownMenuShortcut
96
- className={
96
+ className={`ml-0 sm:ml-auto ${
97
97
  current.kind === 'live'
98
98
  ? 'text-blue-500'
99
99
  : current.kind === 'archived'
100
100
  ? 'text-red-500'
101
101
  : 'text-primary'
102
- }
102
+ }`}
103
103
  >
104
104
  <VersionIcon kind={current.kind} />
105
105
  </DropdownMenuShortcut>
@@ -108,13 +108,15 @@ export function VersionDropdown({
108
108
  {live.length > 0 && (
109
109
  <>
110
110
  <DropdownMenuGroup>{live.map(item)}</DropdownMenuGroup>
111
- <DropdownMenuSeparator />
111
+ {(active.length > 0 || archived.length > 0 || Boolean(footer)) && (
112
+ <DropdownMenuSeparator />
113
+ )}
112
114
  </>
113
115
  )}
114
116
  {active.map(item)}
115
117
  {archived.length > 0 && (
116
118
  <>
117
- <DropdownMenuSeparator />
119
+ {active.length > 0 && <DropdownMenuSeparator />}
118
120
  <DropdownMenuGroup>
119
121
  <DropdownMenuLabel className="text-center py-px cursor-default">
120
122
  Archived