@lax-wp/design-system 0.8.0 → 0.8.2
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/MoreButton.d.ts +2 -2
- package/dist/components/navigation/tabs/TabDragOverlay.d.ts +3 -3
- package/dist/components/navigation/tabs/TabSwitch.d.ts +1 -2
- package/dist/components/navigation/tabs/Tabs.d.ts +1 -1
- package/dist/components/navigation/tabs/icons/TrashIcon.d.ts +2 -0
- package/dist/components/navigation/tabs/icons/index.d.ts +1 -0
- package/dist/components/navigation/tabs/index.d.ts +6 -0
- package/dist/components/navigation/tabs/types.d.ts +13 -4
- package/dist/index.es.js +7047 -7024
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +30 -30
- package/dist/index.umd.js.map +1 -1
- package/dist/providers/design-system-provider/DesignSystemProvider.d.ts +7 -0
- package/dist/providers/design-system-provider/context.d.ts +2 -0
- package/dist/providers/design-system-provider/hooks.d.ts +5 -0
- package/dist/providers/design-system-provider/index.d.ts +3 -0
- package/dist/providers/{DesignSystemProvider.d.ts → design-system-provider/types.d.ts} +1 -10
- package/dist/providers/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/components/navigation/tabs/icons/PinIcon.d.ts +0 -7
- package/dist/components/navigation/tabs/icons/UnpinIcon.d.ts +0 -7
|
@@ -9,5 +9,5 @@ type MoreButtonProps = {
|
|
|
9
9
|
selectedId: string;
|
|
10
10
|
suffixRecord?: SuffixRecord;
|
|
11
11
|
};
|
|
12
|
-
declare const MoreButton: ({ variant, size, draggingOver, title, showMoreDropdown, handleShowMoreDropdown, selectedId, suffixRecord, }: MoreButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export
|
|
12
|
+
export declare const MoreButton: ({ variant, size, draggingOver, title, showMoreDropdown, handleShowMoreDropdown, selectedId, suffixRecord, }: MoreButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -5,7 +5,7 @@ type TabDragOverlayProps = {
|
|
|
5
5
|
size?: TabSize;
|
|
6
6
|
variant: TabVariant;
|
|
7
7
|
selectedId: string;
|
|
8
|
-
|
|
8
|
+
parentContainer?: HTMLElement | null;
|
|
9
9
|
};
|
|
10
|
-
declare const TabDragOverlay: ({ draggingTab, suffixRecord, size, variant, selectedId,
|
|
11
|
-
export
|
|
10
|
+
export declare const TabDragOverlay: ({ draggingTab, suffixRecord, size, variant, selectedId, parentContainer, }: TabDragOverlayProps) => import("react").ReactPortal;
|
|
11
|
+
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import type { TabSwitchProps } from './types';
|
|
2
|
-
declare const TabSwitch: ({ showCounts, title, icon, suffixRecord, classValue, isSelected, selectedClassValue, textClassValue, selectedId, iconsOnly, draggingTab, disableAnimation, tabOptions, color, onClick, }: TabSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export default TabSwitch;
|
|
2
|
+
export declare const TabSwitch: ({ showCounts, title, icon, suffixRecord, classValue, isSelected, selectedClassValue, textClassValue, selectedId, iconsOnly, draggingTab, disableAnimation, tabOptions, color, href, onClick, }: TabSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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: initialTabsProp, tabConfig: tabConfigProp, onTabConfigChange, onTabsChange,
|
|
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, onEdit, onDelete, onCopyLink, allowPin, isFullWidth, rightSection, initialTabs: initialTabsProp, tabConfig: tabConfigProp, onTabConfigChange, onTabsChange, parentContainer, tabKey, linkConfig, }: TabsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TrashIcon';
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export { Tabs } from './Tabs';
|
|
2
|
+
export { DropableWrapper } from './DropableWrapper';
|
|
3
|
+
export { MoreButton } from './MoreButton';
|
|
4
|
+
export { SortableTab } from './SortableTab';
|
|
5
|
+
export { TabDragOverlay } from './TabDragOverlay';
|
|
6
|
+
export { TabOptions } from './TabOptions';
|
|
7
|
+
export { TabSwitch } from './TabSwitch';
|
|
2
8
|
export type { TabsProps, TabVariant, TabSize, Tab, TabOptionConfig, SuffixRecord, } from './types';
|
|
3
9
|
export { INITIAL_TAB_OPTION_CONFIG } from './types';
|
|
@@ -70,12 +70,16 @@ export type TabsProps<T extends string> = {
|
|
|
70
70
|
allowPin?: boolean;
|
|
71
71
|
/** Show all tabs without overflow truncation */
|
|
72
72
|
showAllItems?: boolean;
|
|
73
|
-
/** Show copy link option in tab context menu
|
|
73
|
+
/** Show copy link option in tab context menu.
|
|
74
|
+
* Automatically enabled when `linkConfig` is provided. */
|
|
74
75
|
copyLink?: boolean;
|
|
76
|
+
/** Callback when a tab is edited — when provided, shows an "Edit" option in the tab context menu */
|
|
77
|
+
onEdit?(name: T): void;
|
|
75
78
|
/** Callback when a tab is deleted */
|
|
76
79
|
onDelete?(name: T): void;
|
|
77
|
-
/**
|
|
78
|
-
|
|
80
|
+
/** Called after the tab link is copied to the clipboard.
|
|
81
|
+
* Receives the tab name and the full URL that was copied — useful for showing a toast or analytics. */
|
|
82
|
+
onCopyLink?(name: T, href: string): void;
|
|
79
83
|
/** Redux/API persistence key — when provided and a DesignSystemProvider exists,
|
|
80
84
|
* tab state is automatically loaded and persisted via the provider's tab config */
|
|
81
85
|
tabKey?: string;
|
|
@@ -84,6 +88,8 @@ export type TabsProps<T extends string> = {
|
|
|
84
88
|
linkConfig?: {
|
|
85
89
|
key: string;
|
|
86
90
|
defaultLink: string;
|
|
91
|
+
/** Called with the URLSearchParams after the tab key is set — mutate to remove/add extra params before navigation */
|
|
92
|
+
onResolve?(searchParams: URLSearchParams): void;
|
|
87
93
|
};
|
|
88
94
|
/** Tabs with hidden state pre-configured (e.g. from API) */
|
|
89
95
|
initialHiddenTabs?: readonly T[];
|
|
@@ -96,7 +102,7 @@ export type TabsProps<T extends string> = {
|
|
|
96
102
|
/** Callback fired when tabs array changes (reorder, hide, pin — for external persistence) */
|
|
97
103
|
onTabsChange?(tabs: Tab<T>[]): void;
|
|
98
104
|
/** Container element for the drag overlay portal */
|
|
99
|
-
|
|
105
|
+
parentContainer?: HTMLElement | null;
|
|
100
106
|
};
|
|
101
107
|
export type ChildrenProps = {
|
|
102
108
|
isSelected?: boolean;
|
|
@@ -121,6 +127,9 @@ export type TabSwitchProps = {
|
|
|
121
127
|
tabOptions?: ReactNode;
|
|
122
128
|
color?: 'light' | 'dark';
|
|
123
129
|
showCounts?: boolean;
|
|
130
|
+
/** When provided, renders as `<a>` instead of `<button>` for native link behaviour
|
|
131
|
+
* (right-click → open in new tab, middle-click, Ctrl/Cmd+click). */
|
|
132
|
+
href?: string;
|
|
124
133
|
onClick?(): void;
|
|
125
134
|
};
|
|
126
135
|
export declare const INITIAL_TAB_OPTION_CONFIG: TabOptionConfig;
|