@npm-questionpro/wick-ui-lib 2.5.1 → 2.7.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/dist/components/tab/WuTab.d.ts +13 -11
- package/dist/components/tab/hooks/useTabScroll.d.ts +11 -0
- package/dist/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +1112 -1172
- package/package.json +3 -3
- package/dist/components/tab/components/BaseTabContent.d.ts +0 -8
- package/dist/components/tab/hooks/useHorizontalTabScroll.d.ts +0 -8
- package/dist/components/tab/hooks/useTabIndicator.d.ts +0 -9
- package/dist/components/tab/hooks/useVerticalTabScroll.d.ts +0 -8
- package/dist/components/tab/shadcn/tabs.d.ts +0 -7
- package/dist/components/tab/ui/_horizontalTab.d.ts +0 -3
- package/dist/components/tab/ui/_verticalTab.d.ts +0 -3
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { IWuTabItem } from './types/IWuItems';
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
export interface IWuTabProps extends TabsPrimitive.Root.Props {
|
|
5
|
+
/** Tabs to render. Each item supplies a `value`, a `Trigger` node, and a `Content` node. */
|
|
5
6
|
items: IWuTabItem[];
|
|
6
|
-
|
|
7
|
-
value?: string;
|
|
8
|
-
onValueChange?: (value: string) => void;
|
|
9
|
-
dir?: 'ltr' | 'rtl';
|
|
10
|
-
orientation?: 'horizontal' | 'vertical';
|
|
11
|
-
className?: string;
|
|
12
|
-
enableAnimation?: boolean;
|
|
7
|
+
/** Side the trigger list sits on. `top`/`bottom` for horizontal, `left`/`right` for vertical. @default 'top' */
|
|
13
8
|
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
9
|
+
/** @deprecated Animation is always enabled. This prop is a no-op and will be removed in a future release. */
|
|
10
|
+
enableAnimation?: boolean;
|
|
14
11
|
}
|
|
15
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Accessible tabbed interface for switching between related content panels.
|
|
14
|
+
*
|
|
15
|
+
* @summary Tabs component — organize content into switchable panels, horizontal or vertical, with overflow scrolling.
|
|
16
|
+
*/
|
|
17
|
+
export declare function WuTab({ items, className, position, orientation, value, defaultValue, enableAnimation, dir, ...props }: IWuTabProps): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IWuUseTabScrollProps {
|
|
3
|
+
listRef: React.RefObject<HTMLDivElement | null>;
|
|
4
|
+
orientation?: 'horizontal' | 'vertical';
|
|
5
|
+
}
|
|
6
|
+
export interface IWuUseTabScrollReturn {
|
|
7
|
+
showPrev: boolean;
|
|
8
|
+
showNext: boolean;
|
|
9
|
+
scrollByTab: (direction: 'prev' | 'next') => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function useTabScroll({ listRef, orientation }: IWuUseTabScrollProps): IWuUseTabScrollReturn;
|