@juspay/blend-design-system 0.0.33 → 0.0.34-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/AlertV2/AlertV2.d.ts +19 -0
- package/dist/components/AlertV2/alertV2.dark.tokens.d.ts +3 -0
- package/dist/components/AlertV2/alertV2.light.tokens.d.ts +3 -0
- package/dist/components/AlertV2/alertV2.tokens.d.ts +87 -0
- package/dist/components/AlertV2/alertV2.types.d.ts +54 -0
- package/dist/components/AlertV2/index.d.ts +3 -0
- package/dist/components/ButtonV2/utils.d.ts +46 -0
- package/dist/components/Drawer/components/DrawerBase.d.ts +1 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/components/MultiSelect/types.d.ts +1 -0
- package/dist/components/MultiSelect/utils.d.ts +7 -1
- package/dist/components/MultiSelectGroup/MultiSelectGroup.d.ts +3 -0
- package/dist/components/MultiSelectGroup/MultiselectGroupProps.types.d.ts +7 -0
- package/dist/components/MultiSelectGroup/index.d.ts +3 -0
- package/dist/components/Primitives/Block/Block.d.ts +17 -3
- package/dist/components/Primitives/PrimitiveButton/PrimitiveButton.d.ts +20 -4
- package/dist/components/SelectorsContent/SelectorsContent.types.d.ts +45 -0
- package/dist/components/SelectorsContent/SelectorsLabel.d.ts +3 -0
- package/dist/components/SelectorsContent/SelectorsSubLabel.d.ts +6 -0
- package/dist/components/SelectorsContent/index.d.ts +3 -0
- package/dist/components/Sidebar/SidebarContent.d.ts +24 -0
- package/dist/components/Sidebar/SidebarFooter.d.ts +1 -0
- package/dist/components/Sidebar/SidebarHeader.d.ts +1 -0
- package/dist/components/Sidebar/TenantPanel.d.ts +1 -1
- package/dist/components/Sidebar/types.d.ts +1 -72
- package/dist/components/Sidebar/utils.d.ts +1 -7
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/types.d.ts +1 -0
- package/dist/components/SingleSelect/utils.d.ts +6 -4
- package/dist/components/SingleSelectGroup/SingleSelectGroup.d.ts +3 -0
- package/dist/components/SingleSelectGroup/SingleSelectGroupProps.types.d.ts +7 -0
- package/dist/components/SingleSelectGroup/index.d.ts +3 -0
- package/dist/components/SnackbarV2/SnackbarV2.d.ts +6 -0
- package/dist/components/SnackbarV2/index.d.ts +4 -0
- package/dist/components/SnackbarV2/snackbarV2.dark.tokens.d.ts +3 -0
- package/dist/components/SnackbarV2/snackbarV2.light.tokens.d.ts +3 -0
- package/dist/components/SnackbarV2/snackbarV2.tokens.d.ts +73 -0
- package/dist/components/SnackbarV2/snackbarV2.types.d.ts +56 -0
- package/dist/components/Switch/switch.token.d.ts +0 -1
- package/dist/components/SwitchV2/SwitchV2.d.ts +19 -0
- package/dist/components/SwitchV2/index.d.ts +3 -0
- package/dist/components/SwitchV2/switchV2.dark.tokens.d.ts +3 -0
- package/dist/components/SwitchV2/switchV2.light.tokens.d.ts +3 -0
- package/dist/components/SwitchV2/switchV2.tokens.d.ts +76 -0
- package/dist/components/SwitchV2/switchV2.types.d.ts +53 -0
- package/dist/components/TagV2/TagV2.d.ts +4 -4
- package/dist/components/TagV2/TagV2.types.d.ts +11 -5
- package/dist/components/TagV2/tagV2.tokens.d.ts +2 -3
- package/dist/components/Tags/tag.dark.tokens.d.ts +3 -0
- package/dist/components/Tags/tag.light.tokens.d.ts +3 -0
- package/dist/components/Upload/utils.d.ts +3 -10
- package/dist/components/common/Seperator.d.ts +8 -0
- package/dist/context/ThemeContext.d.ts +8 -2
- package/dist/context/useComponentToken.d.ts +4 -1
- package/dist/global-utils/GlobalUtils.d.ts +2 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/usePreventParentScroll.d.ts +3 -0
- package/dist/main.js +28763 -27270
- package/dist/tokens/font.tokens.d.ts +2 -0
- package/dist/tokens/unit.tokens.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React, ReactElement } from 'react';
|
|
2
|
+
import { AlertV2Type, AlertV2SubType, AlertV2Actions } from './alertV2.types';
|
|
3
|
+
import { CSSObject } from 'styled-components';
|
|
4
|
+
declare const AlertV2: React.ForwardRefExoticComponent<{
|
|
5
|
+
type?: AlertV2Type;
|
|
6
|
+
subType?: AlertV2SubType;
|
|
7
|
+
slot?: {
|
|
8
|
+
slot: ReactElement;
|
|
9
|
+
maxHeight?: CSSObject["maxHeight"];
|
|
10
|
+
};
|
|
11
|
+
heading?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
actions?: AlertV2Actions;
|
|
14
|
+
closeButton?: {
|
|
15
|
+
show?: boolean;
|
|
16
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
17
|
+
};
|
|
18
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "className" | "slot"> & import('./alertV2.types').AlertV2Dimensions & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export default AlertV2;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { AlertV2Type, AlertV2SubType, AlertV2ActionPosition, AlertV2PaddingDirection } from './alertV2.types';
|
|
3
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
import { Theme } from '../../context/theme.enum';
|
|
6
|
+
export type AlertV2TokensType = {
|
|
7
|
+
width: CSSObject['width'];
|
|
8
|
+
maxWidth: CSSObject['maxWidth'];
|
|
9
|
+
minWidth: CSSObject['minWidth'];
|
|
10
|
+
border: {
|
|
11
|
+
[key in AlertV2Type]: {
|
|
12
|
+
[key in AlertV2SubType]: CSSObject['color'];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
borderRadius: CSSObject['borderRadius'];
|
|
16
|
+
backgroundColor: {
|
|
17
|
+
[key in AlertV2Type]: {
|
|
18
|
+
[key in AlertV2SubType]: CSSObject['color'];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
padding: {
|
|
22
|
+
[key in AlertV2PaddingDirection]: CSSObject['padding'];
|
|
23
|
+
};
|
|
24
|
+
gap: {
|
|
25
|
+
[key in AlertV2ActionPosition]: CSSObject['gap'];
|
|
26
|
+
};
|
|
27
|
+
slot: {
|
|
28
|
+
maxHeight: CSSObject['maxHeight'];
|
|
29
|
+
};
|
|
30
|
+
mainContainer: {
|
|
31
|
+
gap: CSSObject['gap'];
|
|
32
|
+
content: {
|
|
33
|
+
gap: {
|
|
34
|
+
[key in AlertV2ActionPosition]: CSSObject['gap'];
|
|
35
|
+
};
|
|
36
|
+
textContainer: {
|
|
37
|
+
gap: CSSObject['gap'];
|
|
38
|
+
heading: {
|
|
39
|
+
color: {
|
|
40
|
+
[key in AlertV2Type]: CSSObject['color'];
|
|
41
|
+
};
|
|
42
|
+
fontWeight: CSSObject['fontWeight'];
|
|
43
|
+
fontSize: CSSObject['fontSize'];
|
|
44
|
+
lineHeight: CSSObject['lineHeight'];
|
|
45
|
+
};
|
|
46
|
+
description: {
|
|
47
|
+
color: {
|
|
48
|
+
[key in AlertV2Type]: CSSObject['color'];
|
|
49
|
+
};
|
|
50
|
+
fontWeight: CSSObject['fontWeight'];
|
|
51
|
+
fontSize: CSSObject['fontSize'];
|
|
52
|
+
lineHeight: CSSObject['lineHeight'];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
actionContainer: {
|
|
56
|
+
gap: CSSObject['gap'];
|
|
57
|
+
primaryAction: {
|
|
58
|
+
color: {
|
|
59
|
+
[key in AlertV2Type]: CSSObject['color'];
|
|
60
|
+
};
|
|
61
|
+
fontWeight: CSSObject['fontWeight'];
|
|
62
|
+
fontSize: CSSObject['fontSize'];
|
|
63
|
+
lineHeight: CSSObject['lineHeight'];
|
|
64
|
+
};
|
|
65
|
+
secondaryAction: {
|
|
66
|
+
color: {
|
|
67
|
+
[key in AlertV2Type]: CSSObject['color'];
|
|
68
|
+
};
|
|
69
|
+
fontWeight: CSSObject['fontWeight'];
|
|
70
|
+
fontSize: CSSObject['fontSize'];
|
|
71
|
+
lineHeight: CSSObject['lineHeight'];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
closeButton: {
|
|
76
|
+
color: {
|
|
77
|
+
[key in AlertV2Type]: CSSObject['color'];
|
|
78
|
+
};
|
|
79
|
+
height: CSSObject['height'];
|
|
80
|
+
width: CSSObject['width'];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export type ResponsiveAlertV2Tokens = {
|
|
85
|
+
[key in keyof BreakpointType]: AlertV2TokensType;
|
|
86
|
+
};
|
|
87
|
+
export declare const getAlertV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveAlertV2Tokens;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
export declare enum AlertV2PaddingDirection {
|
|
4
|
+
TOP = "top",
|
|
5
|
+
BOTTOM = "bottom",
|
|
6
|
+
LEFT = "left",
|
|
7
|
+
RIGHT = "right"
|
|
8
|
+
}
|
|
9
|
+
export declare enum AlertV2Type {
|
|
10
|
+
PRIMARY = "primary",
|
|
11
|
+
SUCCESS = "success",
|
|
12
|
+
WARNING = "warning",
|
|
13
|
+
ERROR = "error",
|
|
14
|
+
PURPLE = "purple",
|
|
15
|
+
ORANGE = "orange",
|
|
16
|
+
NEUTRAL = "neutral"
|
|
17
|
+
}
|
|
18
|
+
export declare enum AlertV2SubType {
|
|
19
|
+
SUBTLE = "subtle",
|
|
20
|
+
NO_FILL = "noFill"
|
|
21
|
+
}
|
|
22
|
+
export declare enum AlertV2ActionPosition {
|
|
23
|
+
BOTTOM = "bottom",
|
|
24
|
+
RIGHT = "right"
|
|
25
|
+
}
|
|
26
|
+
export type AlertV2Action = {
|
|
27
|
+
text: string;
|
|
28
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
29
|
+
};
|
|
30
|
+
export type AlertV2Actions = {
|
|
31
|
+
position?: AlertV2ActionPosition;
|
|
32
|
+
primaryAction?: AlertV2Action;
|
|
33
|
+
secondaryAction?: AlertV2Action;
|
|
34
|
+
};
|
|
35
|
+
export type AlertV2Dimensions = {
|
|
36
|
+
width?: CSSObject['width'];
|
|
37
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
38
|
+
minWidth?: CSSObject['minWidth'];
|
|
39
|
+
};
|
|
40
|
+
export type AlertV2Props = {
|
|
41
|
+
type?: AlertV2Type;
|
|
42
|
+
subType?: AlertV2SubType;
|
|
43
|
+
slot?: {
|
|
44
|
+
slot: ReactElement;
|
|
45
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
46
|
+
};
|
|
47
|
+
heading?: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
actions?: AlertV2Actions;
|
|
50
|
+
closeButton?: {
|
|
51
|
+
show?: boolean;
|
|
52
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
53
|
+
};
|
|
54
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, 'slot' | 'className' | 'style'> & AlertV2Dimensions;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { ButtonV2Size, ButtonV2State, ButtonV2SubType, ButtonV2Type } from './buttonV2.types';
|
|
3
|
+
import { ButtonV2TokensType } from './buttonV2.tokens';
|
|
4
|
+
export declare function getBorderRadius(size: ButtonV2Size, buttonType: ButtonV2Type, subType: ButtonV2SubType, buttonGroupPosition: 'center' | 'left' | 'right' | undefined, tokens: ButtonV2TokensType): string;
|
|
5
|
+
export declare function createButtonClickHandler(onClick?: (event?: MouseEvent<HTMLButtonElement>) => void, isSkeleton?: boolean, isDisabled?: boolean, isLoading?: boolean): (event: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
export declare function getButtonHeight(subType: ButtonV2SubType): string | undefined;
|
|
7
|
+
export declare function getIconMaxHeight(subType: ButtonV2SubType, leftSlotMaxHeight: string | number | undefined, rightSlotMaxHeight: string | number | undefined, size: ButtonV2Size): string;
|
|
8
|
+
export declare function getButtonStatus(isLoading: boolean | undefined, isDisabled: boolean | undefined): 'loading' | 'disabled' | 'enabled';
|
|
9
|
+
export declare function getButtonTabIndex(isDisabled: boolean, providedTabIndex?: number): number;
|
|
10
|
+
export declare function getSkeletonBorderRadius(size: ButtonV2Size, buttonType: ButtonV2Type, subType: ButtonV2SubType, buttonGroupPosition: 'center' | 'left' | 'right' | undefined, tokens: ButtonV2TokensType): string;
|
|
11
|
+
export declare function getSkeletonWidth(width?: string | number): string;
|
|
12
|
+
export declare function getButtonBorderStyles(buttonGroupPosition: 'center' | 'left' | 'right' | undefined, defaultBorder: string | undefined): {
|
|
13
|
+
border?: string;
|
|
14
|
+
borderTop?: string;
|
|
15
|
+
borderRight?: string;
|
|
16
|
+
borderBottom?: string;
|
|
17
|
+
borderLeft?: string;
|
|
18
|
+
};
|
|
19
|
+
/** Return type for getButtonStyles (explicit to avoid csstype reference in .d.ts) */
|
|
20
|
+
export type ButtonStylesReturn = {
|
|
21
|
+
background?: string;
|
|
22
|
+
color?: string;
|
|
23
|
+
border?: string;
|
|
24
|
+
borderTop?: string;
|
|
25
|
+
borderBottom?: string;
|
|
26
|
+
borderLeft?: string;
|
|
27
|
+
borderRight?: string;
|
|
28
|
+
cursor?: string;
|
|
29
|
+
_active?: Record<string, string | number | undefined>;
|
|
30
|
+
_hover?: Record<string, string | number | undefined>;
|
|
31
|
+
_focusVisible?: Record<string, string | number | undefined>;
|
|
32
|
+
_disabled?: Record<string, string | number | undefined>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Get all button styles in one call for better performance
|
|
36
|
+
*/
|
|
37
|
+
export declare function getButtonStyles(isSkeleton: boolean, isDisabled: boolean, buttonType: ButtonV2Type, subType: ButtonV2SubType, tokens: ButtonV2TokensType, buttonGroupPosition?: 'center' | 'left' | 'right'): ButtonStylesReturn;
|
|
38
|
+
export declare function getIconColor(isSkeleton: boolean, disabled: boolean | undefined, buttonType: ButtonV2Type, subType: ButtonV2SubType, tokens: ButtonV2TokensType): string;
|
|
39
|
+
export declare function getTextColor(isSkeleton: boolean, disabled: boolean | undefined, state: ButtonV2State, buttonType: ButtonV2Type, subType: ButtonV2SubType, tokens: ButtonV2TokensType): string;
|
|
40
|
+
export declare function getButtonPadding(size: ButtonV2Size, buttonType: ButtonV2Type, subType: ButtonV2SubType, tokens: ButtonV2TokensType): {
|
|
41
|
+
top: string;
|
|
42
|
+
right: string;
|
|
43
|
+
bottom: string;
|
|
44
|
+
left: string;
|
|
45
|
+
};
|
|
46
|
+
export declare function getButtonLineHeight(size: ButtonV2Size, tokens: ButtonV2TokensType): string;
|
|
@@ -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, skeleton, maxTriggerWidth, minTriggerWidth, allowCustomValue, customValueLabel, showClearButton, onClearAllClick, onOpenChange, }: 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, maxTriggerWidth, minTriggerWidth, allowCustomValue, customValueLabel, showClearButton, onClearAllClick, onOpenChange, multiSelectGroupPosition, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelect;
|
|
@@ -126,6 +126,7 @@ export type MultiSelectProps = {
|
|
|
126
126
|
customValueLabel?: string;
|
|
127
127
|
showClearButton?: boolean;
|
|
128
128
|
onClearAllClick?: () => void;
|
|
129
|
+
multiSelectGroupPosition?: 'center' | 'left' | 'right';
|
|
129
130
|
};
|
|
130
131
|
export type MultiSelectMenuProps = {
|
|
131
132
|
items: MultiSelectMenuGroupType[];
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MultiSelectTokensType } from './multiSelect.tokens';
|
|
2
|
+
import { MultiSelectMenuSize, MultiSelectVariant, MultiSelectMenuGroupType, MultiSelectMenuItemType } from './types';
|
|
2
3
|
export declare const getSelectAllState: (selected: string[], availableValues: string[]) => {
|
|
3
4
|
allSelected: boolean;
|
|
4
5
|
someSelected: boolean;
|
|
5
6
|
};
|
|
7
|
+
export declare function getMultiSelectBorderRadius(size: MultiSelectMenuSize, varient: MultiSelectVariant, multiSelectGroupPosition: 'center' | 'left' | 'right' | undefined, tokens: MultiSelectTokensType, shouldShowClearButton: boolean): string;
|
|
8
|
+
export declare function getMultiSelectCrossBorderRadius(size: MultiSelectMenuSize, varient: MultiSelectVariant, multiSelectGroupPosition: 'center' | 'left' | 'right' | undefined, tokens: MultiSelectTokensType): {
|
|
9
|
+
borderRadius: string;
|
|
10
|
+
borderRight?: string;
|
|
11
|
+
};
|
|
6
12
|
export declare const map: (groups: MultiSelectMenuGroupType[]) => Record<string, string>;
|
|
7
13
|
export declare const getAllValues: (groups: MultiSelectMenuGroupType[]) => string[];
|
|
8
14
|
export declare const handleSelectAll: (selectAll: boolean, items: MultiSelectMenuGroupType[], selectedValues: string[], onChange: (value: string) => void) => void;
|
|
@@ -78,7 +78,6 @@ type StyledBlockProps = StateStyles & {
|
|
|
78
78
|
overflowX?: CSSObject['overflowX'];
|
|
79
79
|
overflowY?: CSSObject['overflowY'];
|
|
80
80
|
whiteSpace?: CSSObject['whiteSpace'];
|
|
81
|
-
transition?: CSSObject['transition'];
|
|
82
81
|
contentCentered?: boolean;
|
|
83
82
|
cursor?: CSSObject['cursor'];
|
|
84
83
|
fontSize?: CSSObject['fontSize'];
|
|
@@ -89,8 +88,16 @@ type StyledBlockProps = StateStyles & {
|
|
|
89
88
|
textTransform?: CSSObject['textTransform'];
|
|
90
89
|
textOverflow?: CSSObject['textOverflow'];
|
|
91
90
|
userSelect?: CSSObject['userSelect'];
|
|
91
|
+
transform?: CSSObject['transform'];
|
|
92
|
+
willChange?: CSSObject['willChange'];
|
|
93
|
+
transformOrigin?: CSSObject['transformOrigin'];
|
|
94
|
+
backfaceVisibility?: CSSObject['backfaceVisibility'];
|
|
95
|
+
transition?: CSSObject['transition'];
|
|
96
|
+
transitionDuration?: CSSObject['transitionDuration'];
|
|
97
|
+
transitionTimingFunction?: CSSObject['transitionTimingFunction'];
|
|
98
|
+
transitionDelay?: CSSObject['transitionDelay'];
|
|
92
99
|
};
|
|
93
|
-
type SemanticTagType = keyof Pick<JSX.IntrinsicElements, 'div' | 'section' | 'article' | 'header' | 'footer' | 'main' | 'span' | 'nav' | 'hr'>;
|
|
100
|
+
type SemanticTagType = keyof Pick<JSX.IntrinsicElements, 'div' | 'section' | 'article' | 'header' | 'footer' | 'main' | 'span' | 'nav' | 'hr' | 'label'>;
|
|
94
101
|
export type BlockProps = StyledBlockProps & Omit<React.HTMLAttributes<HTMLElement>, 'as' | 'color'> & {
|
|
95
102
|
children?: React.ReactNode;
|
|
96
103
|
as?: SemanticTagType;
|
|
@@ -173,7 +180,6 @@ declare const Block: React.ForwardRefExoticComponent<StateStyles & {
|
|
|
173
180
|
overflowX?: CSSObject["overflowX"];
|
|
174
181
|
overflowY?: CSSObject["overflowY"];
|
|
175
182
|
whiteSpace?: CSSObject["whiteSpace"];
|
|
176
|
-
transition?: CSSObject["transition"];
|
|
177
183
|
contentCentered?: boolean;
|
|
178
184
|
cursor?: CSSObject["cursor"];
|
|
179
185
|
fontSize?: CSSObject["fontSize"];
|
|
@@ -184,6 +190,14 @@ declare const Block: React.ForwardRefExoticComponent<StateStyles & {
|
|
|
184
190
|
textTransform?: CSSObject["textTransform"];
|
|
185
191
|
textOverflow?: CSSObject["textOverflow"];
|
|
186
192
|
userSelect?: CSSObject["userSelect"];
|
|
193
|
+
transform?: CSSObject["transform"];
|
|
194
|
+
willChange?: CSSObject["willChange"];
|
|
195
|
+
transformOrigin?: CSSObject["transformOrigin"];
|
|
196
|
+
backfaceVisibility?: CSSObject["backfaceVisibility"];
|
|
197
|
+
transition?: CSSObject["transition"];
|
|
198
|
+
transitionDuration?: CSSObject["transitionDuration"];
|
|
199
|
+
transitionTimingFunction?: CSSObject["transitionTimingFunction"];
|
|
200
|
+
transitionDelay?: CSSObject["transitionDelay"];
|
|
187
201
|
} & Omit<React.HTMLAttributes<HTMLElement>, "color" | "as"> & {
|
|
188
202
|
children?: React.ReactNode;
|
|
189
203
|
as?: SemanticTagType;
|
|
@@ -32,6 +32,7 @@ type PrimitiveButtonProps = StateStyles & {
|
|
|
32
32
|
maxWidth?: CSSObject['maxWidth'];
|
|
33
33
|
minHeight?: CSSObject['minHeight'];
|
|
34
34
|
maxHeight?: CSSObject['maxHeight'];
|
|
35
|
+
opacity?: CSSObject['opacity'];
|
|
35
36
|
flexGrow?: CSSObject['flexGrow'];
|
|
36
37
|
flexShrink?: CSSObject['flexShrink'];
|
|
37
38
|
flexBasis?: CSSObject['flexBasis'];
|
|
@@ -62,15 +63,22 @@ type PrimitiveButtonProps = StateStyles & {
|
|
|
62
63
|
outlineStyle?: CSSObject['outlineStyle'];
|
|
63
64
|
outlineWidth?: CSSObject['outlineWidth'];
|
|
64
65
|
outlineColor?: CSSObject['outlineColor'];
|
|
65
|
-
transform?: CSSObject['transform'];
|
|
66
|
-
transition?: CSSObject['transition'];
|
|
67
66
|
disabled?: boolean;
|
|
68
67
|
fontWeight?: CSSObject['fontWeight'];
|
|
68
|
+
lineHeight?: CSSObject['lineHeight'];
|
|
69
69
|
fontSize?: CSSObject['fontSize'];
|
|
70
70
|
fontFamily?: CSSObject['fontFamily'];
|
|
71
71
|
textDecoration?: CSSObject['textDecoration'];
|
|
72
72
|
textUnderlineOffset?: CSSObject['textUnderlineOffset'];
|
|
73
73
|
textTransform?: CSSObject['textTransform'];
|
|
74
|
+
willChange?: CSSObject['willChange'];
|
|
75
|
+
transformOrigin?: CSSObject['transformOrigin'];
|
|
76
|
+
backfaceVisibility?: CSSObject['backfaceVisibility'];
|
|
77
|
+
transform?: CSSObject['transform'];
|
|
78
|
+
transition?: CSSObject['transition'];
|
|
79
|
+
transitionDuration?: CSSObject['transitionDuration'];
|
|
80
|
+
transitionTimingFunction?: CSSObject['transitionTimingFunction'];
|
|
81
|
+
transitionDelay?: CSSObject['transitionDelay'];
|
|
74
82
|
};
|
|
75
83
|
export type ButtonProps = PrimitiveButtonProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'> & {
|
|
76
84
|
children?: React.ReactNode;
|
|
@@ -98,6 +106,7 @@ declare const PrimitiveButton: React.ForwardRefExoticComponent<StateStyles & {
|
|
|
98
106
|
maxWidth?: CSSObject["maxWidth"];
|
|
99
107
|
minHeight?: CSSObject["minHeight"];
|
|
100
108
|
maxHeight?: CSSObject["maxHeight"];
|
|
109
|
+
opacity?: CSSObject["opacity"];
|
|
101
110
|
flexGrow?: CSSObject["flexGrow"];
|
|
102
111
|
flexShrink?: CSSObject["flexShrink"];
|
|
103
112
|
flexBasis?: CSSObject["flexBasis"];
|
|
@@ -128,15 +137,22 @@ declare const PrimitiveButton: React.ForwardRefExoticComponent<StateStyles & {
|
|
|
128
137
|
outlineStyle?: CSSObject["outlineStyle"];
|
|
129
138
|
outlineWidth?: CSSObject["outlineWidth"];
|
|
130
139
|
outlineColor?: CSSObject["outlineColor"];
|
|
131
|
-
transform?: CSSObject["transform"];
|
|
132
|
-
transition?: CSSObject["transition"];
|
|
133
140
|
disabled?: boolean;
|
|
134
141
|
fontWeight?: CSSObject["fontWeight"];
|
|
142
|
+
lineHeight?: CSSObject["lineHeight"];
|
|
135
143
|
fontSize?: CSSObject["fontSize"];
|
|
136
144
|
fontFamily?: CSSObject["fontFamily"];
|
|
137
145
|
textDecoration?: CSSObject["textDecoration"];
|
|
138
146
|
textUnderlineOffset?: CSSObject["textUnderlineOffset"];
|
|
139
147
|
textTransform?: CSSObject["textTransform"];
|
|
148
|
+
willChange?: CSSObject["willChange"];
|
|
149
|
+
transformOrigin?: CSSObject["transformOrigin"];
|
|
150
|
+
backfaceVisibility?: CSSObject["backfaceVisibility"];
|
|
151
|
+
transform?: CSSObject["transform"];
|
|
152
|
+
transition?: CSSObject["transition"];
|
|
153
|
+
transitionDuration?: CSSObject["transitionDuration"];
|
|
154
|
+
transitionTimingFunction?: CSSObject["transitionTimingFunction"];
|
|
155
|
+
transitionDelay?: CSSObject["transitionDelay"];
|
|
140
156
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color"> & {
|
|
141
157
|
children?: React.ReactNode;
|
|
142
158
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { SwitchV2Size, SwitchV2State } from '../SwitchV2/switchV2.types';
|
|
2
|
+
export type SelectorsSize = SwitchV2Size;
|
|
3
|
+
export type SelectorsLabelTokensType = {
|
|
4
|
+
content: {
|
|
5
|
+
label: {
|
|
6
|
+
fontSize: Record<SelectorsSize, string | number>;
|
|
7
|
+
fontWeight: Record<SelectorsSize, string | number>;
|
|
8
|
+
lineHeight: Record<SelectorsSize, string | number>;
|
|
9
|
+
color: Record<SwitchV2State, string>;
|
|
10
|
+
};
|
|
11
|
+
required: {
|
|
12
|
+
color: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type SelectorsSubLabelTokensType = {
|
|
17
|
+
content: {
|
|
18
|
+
subLabel: {
|
|
19
|
+
fontSize: Record<SelectorsSize, string | number>;
|
|
20
|
+
fontWeight: Record<SelectorsSize, string | number>;
|
|
21
|
+
lineHeight: Record<SelectorsSize, string | number>;
|
|
22
|
+
color: Record<SwitchV2State, string>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type SelectorsLabelProps = {
|
|
27
|
+
id?: string;
|
|
28
|
+
uniqueId: string;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
error: boolean;
|
|
31
|
+
required: boolean;
|
|
32
|
+
size: SelectorsSize;
|
|
33
|
+
label: string;
|
|
34
|
+
tokens: SelectorsLabelTokensType;
|
|
35
|
+
maxLength?: number;
|
|
36
|
+
};
|
|
37
|
+
export type SelectorsSubLabelProps = {
|
|
38
|
+
id?: string;
|
|
39
|
+
subLabel: string;
|
|
40
|
+
size: SelectorsSize;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
error: boolean;
|
|
43
|
+
tokens: SelectorsSubLabelTokensType;
|
|
44
|
+
maxLength?: number;
|
|
45
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SelectorsLabelProps } from './SelectorsContent.types';
|
|
2
|
+
declare const SelectorsLabel: ({ id, uniqueId, disabled, error, required, size, label, tokens, maxLength, }: SelectorsLabelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
export default SelectorsLabel;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SelectorsSubLabelProps } from './SelectorsContent.types';
|
|
2
|
+
declare const SelectorsSubLabel: {
|
|
3
|
+
({ id, subLabel, size, disabled, error, tokens, maxLength, }: SelectorsSubLabelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default SelectorsSubLabel;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DirectoryData } from '../Directory/types';
|
|
3
|
+
import { SidebarMerchantInfo } from './types';
|
|
4
|
+
export type SidebarContentProps = {
|
|
5
|
+
sidebarTopSlot?: React.ReactNode;
|
|
6
|
+
merchantInfo?: SidebarMerchantInfo;
|
|
7
|
+
isExpanded: boolean;
|
|
8
|
+
isScrolled: boolean;
|
|
9
|
+
sidebarCollapseKey: string;
|
|
10
|
+
onToggle: () => void;
|
|
11
|
+
sidebarNavId?: string;
|
|
12
|
+
showTopBlur: boolean;
|
|
13
|
+
showBottomBlur: boolean;
|
|
14
|
+
data: DirectoryData[];
|
|
15
|
+
idPrefix: string;
|
|
16
|
+
activeItem?: string | null;
|
|
17
|
+
onActiveItemChange?: (item: string | null) => void;
|
|
18
|
+
defaultActiveItem?: string | null;
|
|
19
|
+
iconOnlyMode?: boolean;
|
|
20
|
+
footer?: React.ReactNode;
|
|
21
|
+
setIsHovering?: (isHovering: boolean) => void;
|
|
22
|
+
};
|
|
23
|
+
declare const SidebarContent: React.FC<SidebarContentProps>;
|
|
24
|
+
export default SidebarContent;
|
|
@@ -8,7 +8,7 @@ type TenantPanelProps = {
|
|
|
8
8
|
tenantSlot2?: React.ReactNode;
|
|
9
9
|
tenantFooter?: React.ReactNode;
|
|
10
10
|
};
|
|
11
|
-
declare const TenantPanel: React.
|
|
11
|
+
declare const TenantPanel: React.ForwardRefExoticComponent<TenantPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const TenantItem: React.FC<{
|
|
13
13
|
tenant: TenantItem;
|
|
14
14
|
isSelected: boolean;
|
|
@@ -5,10 +5,6 @@ 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
8
|
showInPanel?: boolean;
|
|
13
9
|
};
|
|
14
10
|
export type LeftPanelInfo = {
|
|
@@ -23,10 +19,6 @@ export type TenantItem = {
|
|
|
23
19
|
label: string;
|
|
24
20
|
value?: string;
|
|
25
21
|
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
22
|
showInPanel?: boolean;
|
|
31
23
|
};
|
|
32
24
|
export type SidebarMerchantInfo = {
|
|
@@ -39,6 +31,7 @@ export type SidebarMerchantInfo = {
|
|
|
39
31
|
onSelect: (value: string) => void;
|
|
40
32
|
};
|
|
41
33
|
export type SidebarProps = {
|
|
34
|
+
showLeftPanel?: boolean;
|
|
42
35
|
children: ReactNode;
|
|
43
36
|
data: DirectoryData[];
|
|
44
37
|
leftPanel?: LeftPanelInfo;
|
|
@@ -49,81 +42,17 @@ export type SidebarProps = {
|
|
|
49
42
|
merchantInfo?: MerchantInfo;
|
|
50
43
|
rightActions?: ReactNode;
|
|
51
44
|
enableTopbarAutoHide?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Controlled state: Show/hide topbar
|
|
54
|
-
* When provided, topbar operates in controlled mode - parent must handle visibility updates
|
|
55
|
-
*/
|
|
56
45
|
isTopbarVisible?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Callback fired when topbar visibility should change
|
|
59
|
-
* In controlled mode: Parent should update isTopbarVisible prop based on this callback
|
|
60
|
-
* In uncontrolled mode: Optional callback for visibility change notifications
|
|
61
|
-
*/
|
|
62
46
|
onTopbarVisibilityChange?: (isVisible: boolean) => void;
|
|
63
|
-
/**
|
|
64
|
-
* Uncontrolled mode: Initial topbar visibility (defaults to true)
|
|
65
|
-
* Only used when isTopbarVisible is not provided
|
|
66
|
-
*/
|
|
67
47
|
defaultIsTopbarVisible?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Controlled state: Current expanded state of the sidebar
|
|
70
|
-
* When provided, sidebar operates in controlled mode - parent must handle state updates
|
|
71
|
-
*/
|
|
72
48
|
isExpanded?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Callback fired when sidebar expand/collapse state should change
|
|
75
|
-
* In controlled mode: Parent should update isExpanded prop based on this callback
|
|
76
|
-
* In uncontrolled mode: Optional callback for state change notifications
|
|
77
|
-
*/
|
|
78
49
|
onExpandedChange?: (isExpanded: boolean) => void;
|
|
79
|
-
/**
|
|
80
|
-
* Uncontrolled mode: Initial expanded state (defaults to true)
|
|
81
|
-
* Only used when isExpanded is not provided
|
|
82
|
-
*/
|
|
83
50
|
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
51
|
panelOnlyMode?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* When true, disables the intermediate state that appears on hover
|
|
95
|
-
* When false or undefined, hovering over the collapsed sidebar will temporarily show it in an intermediate/expanded state
|
|
96
|
-
* The intermediate state allows users to see the sidebar content without fully expanding it
|
|
97
|
-
* Defaults to false (intermediate state enabled)
|
|
98
|
-
*/
|
|
99
52
|
disableIntermediateState?: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* When true, shows only icons (52px width) with tooltips on hover
|
|
102
|
-
* In this mode:
|
|
103
|
-
* - Directory items show only their icons
|
|
104
|
-
* - Tooltips appear on hover showing the item label
|
|
105
|
-
* - Sections render as horizontal dividers
|
|
106
|
-
* - Merchant switcher moves to topbar
|
|
107
|
-
* - Intermediate/hover state expansion is disabled
|
|
108
|
-
* - Toggle button appears at the top of the icon-only panel
|
|
109
|
-
* Defaults to false
|
|
110
|
-
*/
|
|
111
53
|
iconOnlyMode?: boolean;
|
|
112
|
-
/**
|
|
113
|
-
* When true, clicking the toggle button in icon-only mode will completely hide the sidebar.
|
|
114
|
-
* When false, clicking the toggle button will expand to full sidebar view.
|
|
115
|
-
* Only applies when iconOnlyMode is true
|
|
116
|
-
* @default false
|
|
117
|
-
*/
|
|
118
54
|
hideOnIconOnlyToggle?: boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Show primary action button in mobile navigation
|
|
121
|
-
*/
|
|
122
55
|
showPrimaryActionButton?: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Props for the primary action button in mobile navigation
|
|
125
|
-
* Extends HTML button attributes
|
|
126
|
-
*/
|
|
127
56
|
primaryActionButtonProps?: Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'>;
|
|
128
57
|
activeItem?: string | null;
|
|
129
58
|
onActiveItemChange?: (item: string | null) => void;
|
|
@@ -8,13 +8,7 @@ export declare const arrangeTenants: (tenants: TenantItem[], selectedLabel: stri
|
|
|
8
8
|
};
|
|
9
9
|
export declare const getSidebarWidth: (isExpanded: boolean, isHovering: boolean, hasLeftPanel: boolean, tokens: SidebarTokenType, iconOnlyMode?: boolean) => string;
|
|
10
10
|
export declare const getSidebarBorder: (isExpanded: boolean, isHovering: boolean, tokens: SidebarTokenType) => string;
|
|
11
|
-
export declare const getTopbarStyles: (enableAutoHide: boolean, showTopbar: boolean) => {
|
|
12
|
-
transform?: undefined;
|
|
13
|
-
transition?: undefined;
|
|
14
|
-
} | {
|
|
15
|
-
transform: string;
|
|
16
|
-
transition: string;
|
|
17
|
-
};
|
|
11
|
+
export declare const getTopbarStyles: (enableAutoHide: boolean, showTopbar: boolean) => {};
|
|
18
12
|
export declare const getDefaultMerchantInfo: () => {
|
|
19
13
|
items: {
|
|
20
14
|
label: string;
|
|
@@ -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, skeleton, maxTriggerWidth, minTriggerWidth, allowCustomValue, customValueLabel, ...rest }: 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, maxTriggerWidth, minTriggerWidth, allowCustomValue, customValueLabel, singleSelectGroupPosition, ...rest }: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SingleSelect;
|