@pk-design/react-tailwind 1.1.7 → 1.3.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/react-tailwind.cjs.js +68 -62
- package/dist/react-tailwind.cjs.js.map +1 -1
- package/dist/react-tailwind.css +1 -1
- package/dist/react-tailwind.css.map +1 -1
- package/dist/react-tailwind.es.js +68 -62
- package/dist/react-tailwind.es.js.map +1 -1
- package/dist/types/components/Tabs/Tabs.types.d.ts +28 -22
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7,42 +7,48 @@ export type TabsItem = {
|
|
|
7
7
|
label: ReactNode;
|
|
8
8
|
/** Content rendered inside the TabPanel for this tab */
|
|
9
9
|
content: ReactNode;
|
|
10
|
-
/** Optional icon
|
|
10
|
+
/** Optional icon rendered before the label */
|
|
11
11
|
icon?: ReactNode;
|
|
12
|
-
/**
|
|
12
|
+
/** Unique key for this tab; falls back to index when omitted */
|
|
13
13
|
id?: string | number;
|
|
14
|
+
/** Prevents this tab from being selected */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Extra classes applied to this specific tab button */
|
|
17
|
+
tabClass?: string;
|
|
18
|
+
/** Override the default panel className for this specific tab */
|
|
19
|
+
panelClass?: string;
|
|
14
20
|
};
|
|
15
21
|
/**
|
|
16
22
|
* Tabs component props
|
|
17
23
|
*/
|
|
18
24
|
export interface TabsProps {
|
|
19
|
-
/**
|
|
20
|
-
* Tabs data (label + panel). Order defines visual order.
|
|
21
|
-
*/
|
|
25
|
+
/** Tab data array. Order defines visual order. */
|
|
22
26
|
tabs: TabsItem[];
|
|
23
27
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* - "
|
|
28
|
-
* - "segmented": segmented pill style where selected tab looks like a pill
|
|
29
|
-
* - "solid": solid nav tabs (selected tab has solid background)
|
|
28
|
+
* Visual style of the tab list.
|
|
29
|
+
* - "underline" (default): active tab shows a bottom indicator line
|
|
30
|
+
* - "segmented": active tab renders as a filled pill
|
|
31
|
+
* - "solid": active tab renders with a solid block background
|
|
30
32
|
*/
|
|
31
33
|
variant?: 'underline' | 'segmented' | 'solid';
|
|
32
|
-
/**
|
|
33
|
-
* Starting tab index (controlled by TabGroup defaultIndex)
|
|
34
|
-
*/
|
|
34
|
+
/** Initial selected index (uncontrolled) */
|
|
35
35
|
defaultIndex?: number;
|
|
36
|
+
/** Controlled selected index — pair with onChange */
|
|
37
|
+
selectedIndex?: number;
|
|
38
|
+
/** Called with the new index whenever the selected tab changes */
|
|
39
|
+
onChange?: (index: number) => void;
|
|
36
40
|
/**
|
|
37
|
-
*
|
|
41
|
+
* Layout direction of the tab list.
|
|
42
|
+
* - "horizontal" (default): tabs sit in a row above the panel
|
|
43
|
+
* - "vertical": tabs sit in a column to the left of the panel
|
|
38
44
|
*/
|
|
45
|
+
orientation?: 'horizontal' | 'vertical';
|
|
46
|
+
/** Stretch tabs to fill equal width across the tab list (horizontal only) */
|
|
47
|
+
stretch?: boolean;
|
|
48
|
+
/** Extra classes for the outer TabGroup container */
|
|
39
49
|
className?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Extra classes to apply to the TabList wrapper
|
|
42
|
-
*/
|
|
50
|
+
/** Extra classes for the TabList wrapper */
|
|
43
51
|
listClass?: string;
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
*/
|
|
47
|
-
panelClass?: string;
|
|
52
|
+
/** Extra classes for the TabPanels wrapper */
|
|
53
|
+
panelsClass?: string;
|
|
48
54
|
}
|
package/dist/types/index.d.ts
CHANGED