@juspay/blend-design-system 0.0.25 → 0.0.26-beta
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/Checkbox/checkboxUtils.d.ts +0 -19
- package/dist/components/Checkbox/types.d.ts +1 -1
- package/dist/components/DataTable/TableBody/types.d.ts +5 -0
- package/dist/components/DataTable/types.d.ts +6 -14
- package/dist/components/Drawer/components/DrawerBase.d.ts +1 -1
- package/dist/components/Drawer/types.d.ts +1 -0
- package/dist/components/Menu/Menu.d.ts +1 -1
- package/dist/components/Menu/types.d.ts +6 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
- package/dist/components/MultiSelect/types.d.ts +11 -0
- package/dist/components/Radio/utils.d.ts +0 -1
- package/dist/components/Sidebar/TenantPanel.d.ts +2 -1
- package/dist/components/Sidebar/sidebar.tokens.d.ts +1 -0
- package/dist/components/Sidebar/types.d.ts +21 -1
- package/dist/components/Sidebar/utils.d.ts +1 -1
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/SingleSelectMenu.d.ts +7 -1
- package/dist/components/SingleSelect/types.d.ts +6 -0
- package/dist/components/StatCard/StatCard.d.ts +1 -1
- package/dist/components/StatCard/types.d.ts +1 -0
- package/dist/components/Switch/utils.d.ts +0 -1
- package/dist/components/Tabs/StyledTabs.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +2 -0
- package/dist/components/Tabs/TabsList.d.ts +2 -0
- package/dist/components/Tabs/TabsTrigger.d.ts +5 -0
- package/dist/components/Tabs/types.d.ts +12 -0
- package/dist/components/Tabs/utils.d.ts +20 -0
- package/dist/components/Topbar/topbar.tokens.d.ts +19 -10
- package/dist/components/Topbar/types.d.ts +2 -0
- package/dist/main.js +31044 -25947
- package/package.json +2 -1
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
import { CheckboxSize } from './types';
|
|
2
2
|
import { CheckboxTokensType } from './checkbox.token';
|
|
3
3
|
export declare const getCheckboxDataState: (checked: boolean | "indeterminate") => string;
|
|
4
|
-
export declare const extractPixelValue: (tokenValue: string | number | undefined) => number;
|
|
5
|
-
/**
|
|
6
|
-
* Determines if the checkbox component is controlled based on the checked prop
|
|
7
|
-
*/
|
|
8
|
-
export declare const isControlledCheckbox: (checked: boolean | "indeterminate" | undefined) => boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Creates input props for controlled vs uncontrolled components
|
|
11
|
-
*/
|
|
12
|
-
export declare const createCheckboxInputProps: (checked: boolean | "indeterminate" | undefined, defaultChecked: boolean) => {
|
|
13
|
-
checked: boolean | undefined;
|
|
14
|
-
defaultChecked?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
defaultChecked: boolean;
|
|
17
|
-
checked?: undefined;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Gets the current checked state for styling purposes
|
|
21
|
-
*/
|
|
22
|
-
export declare const getCurrentCheckedState: (checked: boolean | "indeterminate" | undefined, defaultChecked: boolean) => boolean | "indeterminate";
|
|
23
4
|
/**
|
|
24
5
|
* Gets the icon color based on checkbox state
|
|
25
6
|
*/
|
|
@@ -16,7 +16,7 @@ export declare enum CheckboxInteractionState {
|
|
|
16
16
|
}
|
|
17
17
|
export type CheckboxProps = {
|
|
18
18
|
id?: string;
|
|
19
|
-
|
|
19
|
+
name?: string;
|
|
20
20
|
checked?: boolean | 'indeterminate';
|
|
21
21
|
defaultChecked?: boolean;
|
|
22
22
|
onCheckedChange?: (checked: boolean | 'indeterminate') => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnDefinition, RowActionsConfig } from '../types';
|
|
2
2
|
import { MobileDataTableConfig } from '../hooks/useMobileDataTable';
|
|
3
|
+
import { SkeletonVariant } from '../../Skeleton/skeleton.tokens';
|
|
3
4
|
export type TableBodyProps<T extends Record<string, unknown>> = {
|
|
4
5
|
currentData: T[];
|
|
5
6
|
visibleColumns: ColumnDefinition<T>[];
|
|
@@ -35,4 +36,8 @@ export type TableBodyProps<T extends Record<string, unknown>> = {
|
|
|
35
36
|
getColumnWidth: (column: ColumnDefinition<T>, index: number) => React.CSSProperties;
|
|
36
37
|
getRowStyle?: (row: T, index: number) => React.CSSProperties;
|
|
37
38
|
getDisplayValue?: (value: unknown, column: ColumnDefinition<T>) => unknown;
|
|
39
|
+
isLoading?: boolean;
|
|
40
|
+
showSkeleton?: boolean;
|
|
41
|
+
skeletonVariant?: SkeletonVariant;
|
|
42
|
+
isRowLoading?: (row: T, index: number) => boolean;
|
|
38
43
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ButtonType, ButtonSize, ButtonSubType } from '../Button/types';
|
|
3
|
+
import { SkeletonVariant } from '../Skeleton/skeleton.tokens';
|
|
3
4
|
export declare enum SortDirection {
|
|
4
5
|
NONE = "none",
|
|
5
6
|
ASCENDING = "asc",
|
|
@@ -121,6 +122,8 @@ export type BaseColumnDefinition<T> = {
|
|
|
121
122
|
frozen?: boolean;
|
|
122
123
|
className?: string;
|
|
123
124
|
filterType?: FilterType;
|
|
125
|
+
showSkeleton?: boolean;
|
|
126
|
+
skeletonVariant?: SkeletonVariant;
|
|
124
127
|
};
|
|
125
128
|
export type ColumnDefinition<T> = (BaseColumnDefinition<T> & {
|
|
126
129
|
type: ColumnType.TEXT;
|
|
@@ -257,6 +260,9 @@ export type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
257
260
|
onPageChange?: (page: number) => void;
|
|
258
261
|
onPageSizeChange?: (pageSize: number) => void;
|
|
259
262
|
isLoading?: boolean;
|
|
263
|
+
showSkeleton?: boolean;
|
|
264
|
+
skeletonVariant?: SkeletonVariant;
|
|
265
|
+
isRowLoading?: (row: T, index: number) => boolean;
|
|
260
266
|
showHeader?: boolean;
|
|
261
267
|
showToolbar?: boolean;
|
|
262
268
|
showSettings?: boolean;
|
|
@@ -282,19 +288,5 @@ export type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
282
288
|
rowActions?: RowActionsConfig<T>;
|
|
283
289
|
getRowStyle?: (row: T, index: number) => React.CSSProperties;
|
|
284
290
|
tableBodyHeight?: string | number;
|
|
285
|
-
/**
|
|
286
|
-
* Approximate height of a single row in pixels.
|
|
287
|
-
* Used to calculate minimum table height based on page size.
|
|
288
|
-
* Helps maintain consistent layout and prevent shifting.
|
|
289
|
-
* @default 52
|
|
290
|
-
*/
|
|
291
|
-
rowHeight?: number;
|
|
292
|
-
/**
|
|
293
|
-
* Whether to maintain minimum height based on page size.
|
|
294
|
-
* When true, table maintains consistent height preventing layout shifts.
|
|
295
|
-
* When false, table height adjusts to content.
|
|
296
|
-
* @default true
|
|
297
|
-
*/
|
|
298
|
-
maintainMinHeight?: boolean;
|
|
299
291
|
mobileColumnsToShow?: number;
|
|
300
292
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DrawerProps, DrawerTriggerProps, DrawerContentProps, DrawerHeaderProps, DrawerTitleProps, DrawerDescriptionProps, DrawerFooterProps, DrawerCloseProps } from '../types';
|
|
3
|
-
export declare const Drawer: ({ open, onOpenChange, direction, modal, dismissible, nested, snapPoints, activeSnapPoint, onSnapPointChange, fadeFromIndex, snapToSequentialPoint, children, }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const Drawer: ({ open, onOpenChange, direction, modal, dismissible, nested, snapPoints, activeSnapPoint, onSnapPointChange, fadeFromIndex, snapToSequentialPoint, disableDrag, children, }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const DrawerTrigger: React.ForwardRefExoticComponent<DrawerTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
export declare const DrawerPortal: typeof import('vaul').Portal;
|
|
6
6
|
export declare const DrawerOverlay: React.ForwardRefExoticComponent<{
|
|
@@ -2,7 +2,7 @@ import { CSSObject } from 'styled-components';
|
|
|
2
2
|
import { MenuProps } from './types';
|
|
3
3
|
export declare const contentBaseStyle: CSSObject;
|
|
4
4
|
declare const Menu: {
|
|
5
|
-
({ trigger, items, asModal, alignment, side, sideOffset, alignOffset, collisonBoundaryRef, maxHeight, enableSearch, searchPlaceholder, minWidth, maxWidth, open, onOpenChange, enableVirtualScrolling, virtualItemHeight, virtualOverscan, virtualScrollThreshold, }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
({ trigger, items, asModal, alignment, side, sideOffset, alignOffset, collisonBoundaryRef, maxHeight, enableSearch, searchPlaceholder, minWidth, maxWidth, open, onOpenChange, enableVirtualScrolling, virtualItemHeight, virtualOverscan, virtualScrollThreshold, skeleton, }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
8
8
|
export default Menu;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
1
2
|
import { TooltipSide, TooltipAlign, TooltipSize } from '../Tooltip/types';
|
|
2
3
|
export declare enum MenuAlignment {
|
|
3
4
|
START = "start",
|
|
@@ -31,6 +32,11 @@ export type MenuProps = {
|
|
|
31
32
|
sideOffset?: number;
|
|
32
33
|
alignOffset?: number;
|
|
33
34
|
collisonBoundaryRef?: Element | null | Array<Element | null>;
|
|
35
|
+
skeleton?: {
|
|
36
|
+
count?: number;
|
|
37
|
+
show?: boolean;
|
|
38
|
+
variant?: SkeletonVariant;
|
|
39
|
+
};
|
|
34
40
|
};
|
|
35
41
|
export declare enum MenuItemVariant {
|
|
36
42
|
DEFAULT = "default",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MultiSelectProps } from './types';
|
|
2
|
-
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, customTrigger, useDrawerOnMobile, minMenuWidth, maxMenuWidth, maxMenuHeight, alignment, side, sideOffset, alignOffset, inline, onBlur, onFocus, error, errorMessage, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, itemsToRender, onEndReached, endReachedThreshold, hasMore, loadingComponent, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, customTrigger, useDrawerOnMobile, minMenuWidth, maxMenuWidth, maxMenuHeight, alignment, side, sideOffset, alignOffset, inline, onBlur, onFocus, error, errorMessage, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, itemsToRender, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelect;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MultiSelectMenuProps } from './types';
|
|
2
|
-
declare const MultiSelectMenu: ({ items, selected, onSelect, trigger, minMenuWidth, maxMenuWidth, maxMenuHeight, disabled, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, onSelectAll, alignment, side, sideOffset, alignOffset, open, onOpenChange, showActionButtons, primaryAction, secondaryAction, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, }: MultiSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MultiSelectMenu: ({ items, selected, onSelect, trigger, minMenuWidth, maxMenuWidth, maxMenuHeight, disabled, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, onSelectAll, alignment, side, sideOffset, alignOffset, open, onOpenChange, showActionButtons, primaryAction, secondaryAction, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, skeleton, }: MultiSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelectMenu;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
1
2
|
import { TooltipSide, TooltipAlign, TooltipSize } from '../Tooltip/types';
|
|
2
3
|
export declare enum MultiSelectVariant {
|
|
3
4
|
CONTAINER = "container",
|
|
@@ -112,6 +113,11 @@ export type MultiSelectProps = {
|
|
|
112
113
|
endReachedThreshold?: number;
|
|
113
114
|
hasMore?: boolean;
|
|
114
115
|
loadingComponent?: React.ReactNode;
|
|
116
|
+
skeleton?: {
|
|
117
|
+
count?: number;
|
|
118
|
+
show?: boolean;
|
|
119
|
+
variant?: SkeletonVariant;
|
|
120
|
+
};
|
|
115
121
|
};
|
|
116
122
|
export type MultiSelectMenuProps = {
|
|
117
123
|
items: MultiSelectMenuGroupType[];
|
|
@@ -155,4 +161,9 @@ export type MultiSelectMenuProps = {
|
|
|
155
161
|
endReachedThreshold?: number;
|
|
156
162
|
hasMore?: boolean;
|
|
157
163
|
loadingComponent?: React.ReactNode;
|
|
164
|
+
skeleton?: {
|
|
165
|
+
count?: number;
|
|
166
|
+
show?: boolean;
|
|
167
|
+
variant?: SkeletonVariant;
|
|
168
|
+
};
|
|
158
169
|
};
|
|
@@ -2,7 +2,6 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { RadioSize, RadioProps } from './types';
|
|
3
3
|
import { RadioTokensType } from './radio.token';
|
|
4
4
|
export declare const getRadioDataState: (checked: boolean) => string;
|
|
5
|
-
export declare const extractPixelValue: (tokenValue: string) => number;
|
|
6
5
|
export declare const getSpacingBySize: (size: RadioSize) => {
|
|
7
6
|
marginLeft: string;
|
|
8
7
|
marginTop: string;
|
|
@@ -4,7 +4,8 @@ type TenantPanelProps = {
|
|
|
4
4
|
items: TenantItem[];
|
|
5
5
|
selected: string;
|
|
6
6
|
onSelect: (label: string) => void;
|
|
7
|
-
|
|
7
|
+
tenantSlot1?: React.ReactNode;
|
|
8
|
+
tenantSlot2?: React.ReactNode;
|
|
8
9
|
tenantFooter?: React.ReactNode;
|
|
9
10
|
};
|
|
10
11
|
declare const TenantPanel: React.FC<TenantPanelProps>;
|
|
@@ -5,18 +5,29 @@ export type LeftPanelItem = {
|
|
|
5
5
|
label: string;
|
|
6
6
|
icon: ReactNode;
|
|
7
7
|
value?: string;
|
|
8
|
+
/**
|
|
9
|
+
* When true, item appears in main panel. When false or undefined, item appears in overflow menu (3-dots)
|
|
10
|
+
* Defaults to false (hidden in overflow)
|
|
11
|
+
*/
|
|
12
|
+
showInPanel?: boolean;
|
|
8
13
|
};
|
|
9
14
|
export type LeftPanelInfo = {
|
|
10
15
|
items: LeftPanelItem[];
|
|
11
16
|
selected: string;
|
|
12
17
|
onSelect: (value: string) => void;
|
|
13
|
-
|
|
18
|
+
tenantSlot1?: ReactNode;
|
|
19
|
+
tenantSlot2?: ReactNode;
|
|
14
20
|
tenantFooter?: ReactNode;
|
|
15
21
|
};
|
|
16
22
|
export type TenantItem = {
|
|
17
23
|
label: string;
|
|
18
24
|
value?: string;
|
|
19
25
|
icon: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* When true, item appears in main panel. When false or undefined, item appears in overflow menu (3-dots)
|
|
28
|
+
* Defaults to false (hidden in overflow)
|
|
29
|
+
*/
|
|
30
|
+
showInPanel?: boolean;
|
|
20
31
|
};
|
|
21
32
|
export type SidebarMerchantInfo = {
|
|
22
33
|
items: Array<{
|
|
@@ -70,6 +81,15 @@ export type SidebarProps = {
|
|
|
70
81
|
* Only used when isExpanded is not provided
|
|
71
82
|
*/
|
|
72
83
|
defaultIsExpanded?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* When true, shows only the left panel without any sidebar content
|
|
86
|
+
* In this mode:
|
|
87
|
+
* - Only left panel is visible (no directory, header, footer, toggle)
|
|
88
|
+
* - Left panel is always shown (no intermediate/hover states)
|
|
89
|
+
* - Sidebar cannot be expanded
|
|
90
|
+
* Only applies when leftPanel is provided
|
|
91
|
+
*/
|
|
92
|
+
panelOnlyMode?: boolean;
|
|
73
93
|
/**
|
|
74
94
|
* Show primary action button in mobile navigation
|
|
75
95
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MobileNavigationItem, TenantItem } from './types';
|
|
2
2
|
import { SidebarTokenType } from './sidebar.tokens';
|
|
3
3
|
import { DirectoryData } from '../Directory/types';
|
|
4
|
-
export declare const arrangeTenants: (tenants: TenantItem[], selectedLabel: string
|
|
4
|
+
export declare const arrangeTenants: (tenants: TenantItem[], selectedLabel: string) => {
|
|
5
5
|
visibleTenants: TenantItem[];
|
|
6
6
|
hiddenTenants: TenantItem[];
|
|
7
7
|
hasMoreTenants: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SingleSelectProps } from './types';
|
|
2
|
-
declare const SingleSelect: ({ label, subLabel, hintText, required, helpIconText, placeholder, error, errorMessage, size, items, name, variant, disabled, selected, onSelect, enableSearch, searchPlaceholder, slot, customTrigger, useDrawerOnMobile, alignment, side, sideOffset, alignOffset, minMenuWidth, maxMenuWidth, maxMenuHeight, onBlur, onFocus, inline, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, loadingComponent, }: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const SingleSelect: ({ label, subLabel, hintText, required, helpIconText, placeholder, error, errorMessage, size, items, name, variant, disabled, selected, onSelect, enableSearch, searchPlaceholder, slot, customTrigger, useDrawerOnMobile, alignment, side, sideOffset, alignOffset, minMenuWidth, maxMenuWidth, maxMenuHeight, onBlur, onFocus, inline, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, }: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SingleSelect;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SelectMenuAlignment, SelectMenuSide, SelectMenuGroupType } from '../Select';
|
|
3
3
|
import { SelectMenuSize, SelectMenuVariant } from './types';
|
|
4
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
4
5
|
type SingleSelectMenuProps = {
|
|
5
6
|
items: SelectMenuGroupType[];
|
|
6
7
|
selected: string;
|
|
@@ -27,6 +28,11 @@ type SingleSelectMenuProps = {
|
|
|
27
28
|
endReachedThreshold?: number;
|
|
28
29
|
hasMore?: boolean;
|
|
29
30
|
loadingComponent?: React.ReactNode;
|
|
31
|
+
skeleton?: {
|
|
32
|
+
count?: number;
|
|
33
|
+
show?: boolean;
|
|
34
|
+
variant?: SkeletonVariant;
|
|
35
|
+
};
|
|
30
36
|
};
|
|
31
|
-
declare const SingleSelectMenu: ({ items, selected, onSelect, trigger, minMenuWidth, maxMenuWidth, maxMenuHeight, enableSearch, searchPlaceholder, disabled, alignment, side, sideOffset, alignOffset, open, onOpenChange, size, variant, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, }: SingleSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare const SingleSelectMenu: ({ items, selected, onSelect, trigger, minMenuWidth, maxMenuWidth, maxMenuHeight, enableSearch, searchPlaceholder, disabled, alignment, side, sideOffset, alignOffset, open, onOpenChange, size, variant, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, skeleton, }: SingleSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
38
|
export default SingleSelectMenu;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
1
2
|
import { TooltipSide, TooltipAlign, TooltipSize } from '../Tooltip/types';
|
|
2
3
|
export declare enum SelectMenuAlignment {
|
|
3
4
|
START = "start",
|
|
@@ -102,4 +103,9 @@ export type SingleSelectProps = {
|
|
|
102
103
|
endReachedThreshold?: number;
|
|
103
104
|
hasMore?: boolean;
|
|
104
105
|
loadingComponent?: React.ReactNode;
|
|
106
|
+
skeleton?: {
|
|
107
|
+
count?: number;
|
|
108
|
+
show?: boolean;
|
|
109
|
+
variant?: SkeletonVariant;
|
|
110
|
+
};
|
|
105
111
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StatCardProps } from './types';
|
|
2
2
|
declare const StatCard: {
|
|
3
|
-
({ title, value, valueTooltip, change, subtitle, variant, chartData, progressValue, titleIcon, actionIcon, helpIconText, dropdownProps, maxWidth, xAxis, yAxis, valueFormatter, height, direction, ...props }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ title, value, valueTooltip, change, subtitle, variant, chartData, progressValue, titleIcon, actionIcon, helpIconText, dropdownProps, minWidth, maxWidth, xAxis, yAxis, valueFormatter, height, direction, ...props }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
export default StatCard;
|
|
@@ -2,7 +2,6 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { SwitchSize, SwitchProps } from './types';
|
|
3
3
|
import { SwitchTokensType } from './switch.token';
|
|
4
4
|
export declare const getSwitchDataState: (checked: boolean) => string;
|
|
5
|
-
export declare const extractPixelValue: (tokenValue: string) => number;
|
|
6
5
|
export declare const getSpacingBySize: (size: SwitchSize) => {
|
|
7
6
|
marginLeft: string;
|
|
8
7
|
marginTop: string;
|
|
@@ -11,11 +11,13 @@ export declare const StyledTabsList: import('styled-components/dist/types').ISty
|
|
|
11
11
|
$expanded: boolean;
|
|
12
12
|
$fitContent: boolean;
|
|
13
13
|
$tabsToken: TabsTokensType;
|
|
14
|
+
$hideIndicator?: boolean;
|
|
14
15
|
}>> & string & Omit<import('react').ForwardRefExoticComponent<TabsPrimitive.TabsListProps & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
15
16
|
export declare const StyledTabsTrigger: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<TabsPrimitive.TabsTriggerProps & import('react').RefAttributes<HTMLButtonElement>, {
|
|
16
17
|
$variant: TabsVariant;
|
|
17
18
|
$size: TabsSize;
|
|
18
19
|
$tabsToken: TabsTokensType;
|
|
20
|
+
$isOverlay?: boolean;
|
|
19
21
|
}>> & string & Omit<import('react').ForwardRefExoticComponent<TabsPrimitive.TabsTriggerProps & import('react').RefAttributes<HTMLButtonElement>>, keyof import('react').Component<any, {}, any>>;
|
|
20
22
|
export declare const IconContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
21
23
|
$tabsToken: TabsTokensType;
|
|
@@ -11,5 +11,7 @@ declare const Tabs: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react
|
|
|
11
11
|
addButtonTooltip?: string;
|
|
12
12
|
maxDisplayTabs?: number;
|
|
13
13
|
disable?: boolean;
|
|
14
|
+
showSkeleton?: boolean;
|
|
15
|
+
skeletonVariant?: import('../Skeleton').SkeletonVariant;
|
|
14
16
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
17
|
export default Tabs;
|
|
@@ -16,5 +16,7 @@ declare const TabsList: React.ForwardRefExoticComponent<Omit<import('@radix-ui/r
|
|
|
16
16
|
onTabChange?: (value: string) => void;
|
|
17
17
|
activeTab?: string;
|
|
18
18
|
disable?: boolean;
|
|
19
|
+
showSkeleton?: boolean;
|
|
20
|
+
skeletonVariant?: import('../Skeleton').SkeletonVariant;
|
|
19
21
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
20
22
|
export default TabsList;
|
|
@@ -9,5 +9,10 @@ declare const TabsTrigger: import('react').ForwardRefExoticComponent<Omit<import
|
|
|
9
9
|
closable?: boolean;
|
|
10
10
|
onClose?: () => void;
|
|
11
11
|
disable?: boolean;
|
|
12
|
+
isActive?: boolean;
|
|
13
|
+
isOverlay?: boolean;
|
|
14
|
+
tabsGroupId?: string;
|
|
15
|
+
showSkeleton?: boolean;
|
|
16
|
+
skeletonVariant?: import('../Skeleton').SkeletonVariant;
|
|
12
17
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
13
18
|
export default TabsTrigger;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { SkeletonVariant } from '../Skeleton/skeleton.tokens';
|
|
2
3
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
4
|
export declare enum TabsVariant {
|
|
4
5
|
BOXED = "boxed",
|
|
@@ -17,6 +18,8 @@ export type TabItem = {
|
|
|
17
18
|
closable?: boolean;
|
|
18
19
|
isDefault?: boolean;
|
|
19
20
|
disable?: boolean;
|
|
21
|
+
showSkeleton?: boolean;
|
|
22
|
+
skeletonVariant?: SkeletonVariant;
|
|
20
23
|
};
|
|
21
24
|
export type TabsProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {
|
|
22
25
|
variant?: TabsVariant;
|
|
@@ -30,6 +33,8 @@ export type TabsProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {
|
|
|
30
33
|
addButtonTooltip?: string;
|
|
31
34
|
maxDisplayTabs?: number;
|
|
32
35
|
disable?: boolean;
|
|
36
|
+
showSkeleton?: boolean;
|
|
37
|
+
skeletonVariant?: SkeletonVariant;
|
|
33
38
|
};
|
|
34
39
|
export type TabsListProps = ComponentPropsWithoutRef<typeof TabsPrimitive.List> & {
|
|
35
40
|
variant?: TabsVariant;
|
|
@@ -47,6 +52,8 @@ export type TabsListProps = ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
|
47
52
|
onTabChange?: (value: string) => void;
|
|
48
53
|
activeTab?: string;
|
|
49
54
|
disable?: boolean;
|
|
55
|
+
showSkeleton?: boolean;
|
|
56
|
+
skeletonVariant?: SkeletonVariant;
|
|
50
57
|
};
|
|
51
58
|
export type TabsTriggerProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> & {
|
|
52
59
|
value: string;
|
|
@@ -58,6 +65,11 @@ export type TabsTriggerProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Tri
|
|
|
58
65
|
closable?: boolean;
|
|
59
66
|
onClose?: () => void;
|
|
60
67
|
disable?: boolean;
|
|
68
|
+
isActive?: boolean;
|
|
69
|
+
isOverlay?: boolean;
|
|
70
|
+
tabsGroupId?: string;
|
|
71
|
+
showSkeleton?: boolean;
|
|
72
|
+
skeletonVariant?: SkeletonVariant;
|
|
61
73
|
};
|
|
62
74
|
export type TabsContentProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Content>;
|
|
63
75
|
export type TabsStyles = {
|
|
@@ -38,3 +38,23 @@ export declare const prepareDropdownItems: (tabs: TabItem[]) => {
|
|
|
38
38
|
* Returns all tabs for display (no limiting - let horizontal scroll handle overflow)
|
|
39
39
|
*/
|
|
40
40
|
export declare const getDisplayTabs: (tabs: TabItem[]) => TabItem[];
|
|
41
|
+
/**
|
|
42
|
+
* Calculates the position and width for the tab indicator
|
|
43
|
+
*/
|
|
44
|
+
export declare const calculateTabIndicatorPosition: (tabElement: HTMLButtonElement, listElement: HTMLDivElement) => {
|
|
45
|
+
tabLeft: number;
|
|
46
|
+
tabWidth: number;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Determines if the tab movement is from left to right
|
|
50
|
+
*/
|
|
51
|
+
export declare const isMovingRight: (oldTab: HTMLButtonElement, newTab: HTMLButtonElement) => boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Calculates transition dimensions for the animated underline
|
|
54
|
+
*/
|
|
55
|
+
export declare const calculateTransitionDimensions: (oldTab: HTMLButtonElement, newTab: HTMLButtonElement, listElement: HTMLDivElement) => {
|
|
56
|
+
left: number;
|
|
57
|
+
width: number;
|
|
58
|
+
finalLeft: number;
|
|
59
|
+
finalWidth: number;
|
|
60
|
+
};
|
|
@@ -2,8 +2,24 @@ import { CSSObject } from 'styled-components';
|
|
|
2
2
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
3
|
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
4
|
export type TopbarState = 'default' | 'hover' | 'active';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Topbar Tokens following the pattern: [target].CSSProp.[variant].[state]
|
|
7
|
+
*
|
|
8
|
+
* Structure matches Sidebar pattern for consistency:
|
|
9
|
+
* - Base properties: borderBottom, backgroundColor, backdropFilter, padding, gap
|
|
10
|
+
* - Target sections: toggleButton.*, actionButton.*, tenantIconButton.*, merchantSelectTrigger.*, leftSection.*, rightSection.*, sidebarSection.*
|
|
11
|
+
* - Each target has: backgroundColor, padding, borderRadius, gap, specific properties
|
|
12
|
+
* - Interactive elements have state-based styling: [state] = default | hover | active
|
|
13
|
+
*
|
|
14
|
+
* Pattern examples:
|
|
15
|
+
* - backgroundColor (topbar background color)
|
|
16
|
+
* - padding (topbar content padding)
|
|
17
|
+
* - toggleButton.backgroundColor.[state] (interactive toggle button)
|
|
18
|
+
* - actionButton.padding (action button spacing)
|
|
19
|
+
* - leftSection.gap (left section item spacing)
|
|
20
|
+
* - merchantSelectTrigger.text.color (merchant text color)
|
|
21
|
+
*/
|
|
22
|
+
export type TopbarTokenType = {
|
|
7
23
|
zIndex: CSSObject['zIndex'];
|
|
8
24
|
borderBottom: CSSObject['borderBottom'];
|
|
9
25
|
backgroundColor: CSSObject['backgroundColor'];
|
|
@@ -65,13 +81,6 @@ export type TopbarTokensType = {
|
|
|
65
81
|
color: CSSObject['color'];
|
|
66
82
|
};
|
|
67
83
|
};
|
|
68
|
-
centerSection: {
|
|
69
|
-
title: {
|
|
70
|
-
fontSize: CSSObject['fontSize'];
|
|
71
|
-
fontWeight: CSSObject['fontWeight'];
|
|
72
|
-
color: CSSObject['color'];
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
84
|
rightSection: {
|
|
76
85
|
gap: CSSObject['gap'];
|
|
77
86
|
};
|
|
@@ -80,6 +89,6 @@ export type TopbarTokensType = {
|
|
|
80
89
|
};
|
|
81
90
|
};
|
|
82
91
|
export type ResponsiveTopbarTokens = {
|
|
83
|
-
[key in keyof BreakpointType]:
|
|
92
|
+
[key in keyof BreakpointType]: TopbarTokenType;
|
|
84
93
|
};
|
|
85
94
|
export declare const getTopbarTokens: (foundationToken: FoundationTokenType) => ResponsiveTopbarTokens;
|
|
@@ -15,6 +15,8 @@ export type TopbarProps = {
|
|
|
15
15
|
isExpanded?: boolean;
|
|
16
16
|
onToggleExpansion?: () => void;
|
|
17
17
|
showToggleButton?: boolean;
|
|
18
|
+
/** When true, hides toggle button (used in panel only mode) */
|
|
19
|
+
panelOnlyMode?: boolean;
|
|
18
20
|
/** Controlled mode: Show/hide topbar */
|
|
19
21
|
isVisible?: boolean;
|
|
20
22
|
/** Callback when visibility changes (controlled mode) */
|