@lax-wp/design-system 0.6.2 → 0.6.4
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/navigation/tabs/Tabs.d.ts +1 -1
- package/dist/components/navigation/tabs/types.d.ts +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +4252 -4241
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +31 -31
- package/dist/index.umd.js.map +1 -1
- package/dist/providers/DesignSystemProvider.d.ts +32 -0
- package/dist/providers/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { TabsProps } from './types';
|
|
2
|
-
export declare const Tabs: <T extends string>({ variant, tabs, activeTab, onTabClick, suffixRecord, isLoading, size, className, draggable, showAllItems, copyLink, isDisabled, color, iconsOnly, tabIcons, height, fullWidth, fitContentWidth, disableAnimation, onDelete, onCopyLink, allowPin, isFullWidth, rightSection, initialTabs, tabConfig, onTabConfigChange, onTabsChange, portalContainer, }: TabsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Tabs: <T extends string>({ variant, tabs, activeTab, onTabClick, suffixRecord, isLoading, size, className, draggable, showAllItems, copyLink, isDisabled, color, iconsOnly, tabIcons, height, fullWidth, fitContentWidth, disableAnimation, onDelete, onCopyLink, allowPin, isFullWidth, rightSection, initialTabs: initialTabsProp, tabConfig: tabConfigProp, onTabConfigChange, onTabsChange, portalContainer, tabKey, linkConfig, }: TabsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -76,6 +76,15 @@ export type TabsProps<T extends string> = {
|
|
|
76
76
|
onDelete?(name: T): void;
|
|
77
77
|
/** Callback when copy link is triggered — receives tab name, should copy and return the URL */
|
|
78
78
|
onCopyLink?(name: T): Promise<string>;
|
|
79
|
+
/** Redux/API persistence key — when provided and a DesignSystemProvider exists,
|
|
80
|
+
* tab state is automatically loaded and persisted via the provider's tab config */
|
|
81
|
+
tabKey?: string;
|
|
82
|
+
/** URL sync config — when provided and a DesignSystemProvider exists,
|
|
83
|
+
* clicking a tab updates the URL search param via the provider's navigate */
|
|
84
|
+
linkConfig?: {
|
|
85
|
+
key: string;
|
|
86
|
+
defaultLink: string;
|
|
87
|
+
};
|
|
79
88
|
/** Tabs with hidden state pre-configured (e.g. from API) */
|
|
80
89
|
initialHiddenTabs?: readonly T[];
|
|
81
90
|
/** Full tab state injected from external source (e.g. Redux/API) */
|
package/dist/index.d.ts
CHANGED
|
@@ -231,3 +231,5 @@ export type { TabsProps, TabVariant, TabSize, Tab, TabOptionConfig, SuffixRecord
|
|
|
231
231
|
export { INITIAL_TAB_OPTION_CONFIG } from "./components/navigation/tabs";
|
|
232
232
|
export { useTabState } from "./hooks/useTabState";
|
|
233
233
|
export { useTextWidth } from "./hooks/useTextWidth";
|
|
234
|
+
export { DesignSystemProvider, useDesignSystem, useTabConfig, } from "./providers";
|
|
235
|
+
export type { DesignSystemConfig, TabConfig } from "./providers";
|