@fumadocs/base-ui 16.4.0 → 16.4.1

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.
@@ -1,6 +1,10 @@
1
1
  import * as Base from '../../components/sidebar/base.js';
2
2
  import { type ComponentProps } from 'react';
3
- export declare const Sidebar: typeof Base.SidebarProvider, SidebarFolder: typeof Base.SidebarFolder, SidebarCollapseTrigger: typeof Base.SidebarCollapseTrigger, SidebarViewport: typeof Base.SidebarViewport, SidebarTrigger: typeof Base.SidebarTrigger;
3
+ export declare function Sidebar(props: ComponentProps<typeof Base.SidebarProvider>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function SidebarFolder(props: ComponentProps<typeof Base.SidebarFolder>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function SidebarCollapseTrigger(props: ComponentProps<typeof Base.SidebarCollapseTrigger>): import("react/jsx-runtime").JSX.Element;
6
+ export declare function SidebarViewport(props: ComponentProps<typeof Base.SidebarViewport>): import("react/jsx-runtime").JSX.Element;
7
+ export declare function SidebarTrigger(props: ComponentProps<typeof Base.SidebarTrigger>): import("react/jsx-runtime").JSX.Element;
4
8
  export declare function SidebarContent({ ref: refProp, className, children, ...props }: ComponentProps<'aside'>): import("react/jsx-runtime").JSX.Element;
5
9
  export declare function SidebarDrawer({ children, className, ...props }: ComponentProps<typeof Base.SidebarDrawerContent>): import("react/jsx-runtime").JSX.Element;
6
10
  export declare function SidebarSeparator({ className, style, children, ...props }: ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/layouts/docs/sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAE,KAAK,cAAc,EAAU,MAAM,OAAO,CAAC;AA6BpD,eAAO,MACY,OAAO,+BACxB,aAAa,6BACb,sBAAsB,sCACtB,eAAe,+BACf,cAAc,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AAoB,CAAC,EACnC,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,oBAAoB,CAAC,2CAkBlD;AAED,eAAO,MAAM,eAAe,sIAO1B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;6CAM1B,CAAC"}
@@ -24,7 +24,21 @@ const itemVariants = cva('relative flex flex-row items-center gap-2 rounded-lg p
24
24
  function getItemOffset(depth) {
25
25
  return `calc(${2 + 3 * depth} * var(--spacing))`;
26
26
  }
27
- export const { SidebarProvider: Sidebar, SidebarFolder, SidebarCollapseTrigger, SidebarViewport, SidebarTrigger, } = Base;
27
+ export function Sidebar(props) {
28
+ return _jsx(Base.SidebarProvider, { ...props });
29
+ }
30
+ export function SidebarFolder(props) {
31
+ return _jsx(Base.SidebarFolder, { ...props });
32
+ }
33
+ export function SidebarCollapseTrigger(props) {
34
+ return _jsx(Base.SidebarCollapseTrigger, { ...props });
35
+ }
36
+ export function SidebarViewport(props) {
37
+ return _jsx(Base.SidebarViewport, { ...props });
38
+ }
39
+ export function SidebarTrigger(props) {
40
+ return _jsx(Base.SidebarTrigger, { ...props });
41
+ }
28
42
  export function SidebarContent({ ref: refProp, className, children, ...props }) {
29
43
  const ref = useRef(null);
30
44
  return (_jsx(Base.SidebarContent, { children: ({ collapsed, hovered, ref: asideRef, ...rest }) => (_jsxs(_Fragment, { children: [_jsxs("div", { "data-sidebar-placeholder": "", className: "sticky top-(--fd-docs-row-1) z-20 [grid-area:sidebar] pointer-events-none *:pointer-events-auto h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] md:layout:[--fd-sidebar-width:268px] max-md:hidden", children: [collapsed && (_jsx("div", { className: "absolute start-0 inset-y-0 w-4", ...rest })), _jsx("aside", { id: "nd-sidebar", ref: mergeRefs(ref, refProp, asideRef), "data-collapsed": collapsed, "data-hovered": collapsed && hovered, className: cn('absolute flex flex-col w-full start-0 inset-y-0 items-end bg-fd-card text-sm border-e duration-250 *:w-(--fd-sidebar-width)', collapsed && [
@@ -35,7 +49,7 @@ export function SidebarContent({ ref: refProp, className, children, ...props })
35
49
  ], ref.current &&
36
50
  (ref.current.getAttribute('data-collapsed') === 'true') !==
37
51
  collapsed &&
38
- 'transition-[width,inset-block,translate,background-color]', className), ...props, ...rest, children: children })] }), _jsxs("div", { "data-sidebar-panel": "", className: cn('fixed flex top-[calc(--spacing(4)+var(--fd-docs-row-3))] start-4 shadow-lg transition-opacity rounded-xl p-0.5 border bg-fd-muted text-fd-muted-foreground z-10', (!collapsed || hovered) && 'pointer-events-none opacity-0'), children: [_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
52
+ 'transition-[width,inset-block,translate,background-color]', className), ...props, ...rest, children: children })] }), _jsxs("div", { "data-sidebar-panel": "", className: cn('fixed flex top-[calc(--spacing(4)+var(--fd-docs-row-3))] start-4 shadow-lg transition-opacity rounded-xl p-0.5 border bg-fd-muted text-fd-muted-foreground z-10', (!collapsed || hovered) && 'pointer-events-none opacity-0'), children: [_jsx(Base.SidebarCollapseTrigger, { className: cn(buttonVariants({
39
53
  color: 'ghost',
40
54
  size: 'icon-sm',
41
55
  className: 'rounded-lg',
package/dist/style.css CHANGED
@@ -317,6 +317,9 @@
317
317
  .top-\(--fd-docs-row-3\) {
318
318
  top: var(--fd-docs-row-3);
319
319
  }
320
+ .top-\(--fd-top\) {
321
+ top: var(--fd-top);
322
+ }
320
323
  .top-0 {
321
324
  top: calc(var(--spacing) * 0);
322
325
  }
@@ -1705,6 +1708,11 @@
1705
1708
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
1706
1709
  transition-duration: var(--tw-duration, var(--default-transition-duration));
1707
1710
  }
1711
+ .transition-\[top\,height\] {
1712
+ transition-property: top,height;
1713
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
1714
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
1715
+ }
1708
1716
  .transition-\[translate\,height\] {
1709
1717
  transition-property: translate,height;
1710
1718
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -1763,6 +1771,10 @@
1763
1771
  --tw-ease: var(--easing);
1764
1772
  transition-timing-function: var(--easing);
1765
1773
  }
1774
+ .ease-linear {
1775
+ --tw-ease: linear;
1776
+ transition-timing-function: linear;
1777
+ }
1766
1778
  .ease-out {
1767
1779
  --tw-ease: var(--ease-out);
1768
1780
  transition-timing-function: var(--ease-out);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fumadocs/base-ui",
3
- "version": "16.4.0",
3
+ "version": "16.4.1",
4
4
  "description": "The Base UI version of Fumadocs UI",
5
5
  "keywords": [
6
6
  "Fumadocs",
@@ -88,8 +88,8 @@
88
88
  "next-themes": "^0.4.6",
89
89
  "react-medium-image-zoom": "^5.4.0",
90
90
  "scroll-into-view-if-needed": "^3.1.0",
91
- "@fumadocs/ui": "16.4.0",
92
- "fumadocs-core": "16.4.0"
91
+ "@fumadocs/ui": "16.4.1",
92
+ "fumadocs-core": "16.4.1"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@tailwindcss/cli": "^4.1.18",
@@ -100,7 +100,7 @@
100
100
  "tsc-alias": "^1.8.16",
101
101
  "@fumadocs/cli": "1.2.0",
102
102
  "eslint-config-custom": "0.0.0",
103
- "fumadocs-core": "16.4.0",
103
+ "fumadocs-core": "16.4.1",
104
104
  "tsconfig": "0.0.0"
105
105
  },
106
106
  "peerDependencies": {