@juspay/blend-design-system 0.0.35-beta → 0.0.35-beta.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/Accordion/accordion.tokens.d.ts +3 -0
- package/dist/components/Accordion/types.d.ts +9 -0
- package/dist/components/Checkbox/checkbox.token.d.ts +3 -0
- package/dist/components/Sidebar/types.d.ts +2 -0
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/types.d.ts +1 -0
- package/dist/components/Tags/Tag.d.ts +2 -0
- package/dist/components/Tags/TagBase.d.ts +2 -0
- package/dist/components/Tags/Tags.d.ts +2 -0
- package/dist/components/Tags/tag.tokens.d.ts +3 -0
- package/dist/components/Tags/types.d.ts +3 -0
- package/dist/components/common/TruncatedTextWithTooltip.d.ts +3 -2
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useDropdownInteractionLock.d.ts +6 -0
- package/dist/hooks/useTruncationDetection.d.ts +6 -0
- package/dist/main.js +18351 -18120
- package/package.json +1 -1
|
@@ -7,6 +7,13 @@ export declare enum AccordionChevronPosition {
|
|
|
7
7
|
LEFT = "left",
|
|
8
8
|
RIGHT = "right"
|
|
9
9
|
}
|
|
10
|
+
export type SlotRenderProps = {
|
|
11
|
+
isExpanded: boolean;
|
|
12
|
+
toggle: () => void;
|
|
13
|
+
value: string;
|
|
14
|
+
isDisabled: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type SlotType = ReactNode | ((props: SlotRenderProps) => ReactNode);
|
|
10
17
|
export type AccordionItemProps = {
|
|
11
18
|
value: string;
|
|
12
19
|
title: string;
|
|
@@ -14,6 +21,8 @@ export type AccordionItemProps = {
|
|
|
14
21
|
leftSlot?: ReactNode;
|
|
15
22
|
rightSlot?: ReactNode;
|
|
16
23
|
subtextSlot?: ReactNode;
|
|
24
|
+
triggerSlot?: SlotType;
|
|
25
|
+
triggerSlotWidth?: string | number;
|
|
17
26
|
children: ReactNode;
|
|
18
27
|
isDisabled?: boolean;
|
|
19
28
|
chevronPosition?: AccordionChevronPosition;
|
|
@@ -30,6 +30,7 @@ export type SidebarMerchantInfo = {
|
|
|
30
30
|
selected: string;
|
|
31
31
|
onSelect: (value: string) => void;
|
|
32
32
|
};
|
|
33
|
+
export type SidebarStateChangeType = 'collapsed' | 'expanded' | 'intermediate';
|
|
33
34
|
export type SidebarProps = {
|
|
34
35
|
showLeftPanel?: boolean;
|
|
35
36
|
children: ReactNode;
|
|
@@ -47,6 +48,7 @@ export type SidebarProps = {
|
|
|
47
48
|
defaultIsTopbarVisible?: boolean;
|
|
48
49
|
isExpanded?: boolean;
|
|
49
50
|
onExpandedChange?: (isExpanded: boolean) => void;
|
|
51
|
+
onSidebarStateChange?: (state: SidebarStateChangeType) => void;
|
|
50
52
|
defaultIsExpanded?: boolean;
|
|
51
53
|
panelOnlyMode?: boolean;
|
|
52
54
|
disableIntermediateState?: 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, skeleton, maxTriggerWidth, minTriggerWidth, allowCustomValue, customValueLabel, singleSelectGroupPosition, ...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, allowDeselect, ...rest }: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SingleSelect;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { TagColor, TagShape, TagSize, TagVariant } from './types';
|
|
2
2
|
declare const Tag: import('react').ForwardRefExoticComponent<Omit<import('../Primitives/Block/Block').BlockProps, "children"> & {
|
|
3
|
+
maxWidth?: import('styled-components').CSSObject["maxWidth"];
|
|
4
|
+
width?: import('styled-components').CSSObject["width"];
|
|
3
5
|
text: string;
|
|
4
6
|
variant?: TagVariant;
|
|
5
7
|
color?: TagColor;
|
|
@@ -5,6 +5,8 @@ export type TagBaseProps = TagProps & {
|
|
|
5
5
|
tokens?: TagTokensType;
|
|
6
6
|
};
|
|
7
7
|
declare const TagBase: import('react').ForwardRefExoticComponent<Omit<import('../Primitives/Block/Block').BlockProps, "children"> & {
|
|
8
|
+
maxWidth?: import('styled-components').CSSObject["maxWidth"];
|
|
9
|
+
width?: import('styled-components').CSSObject["width"];
|
|
8
10
|
text: string;
|
|
9
11
|
variant?: TagVariant;
|
|
10
12
|
color?: TagColor;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { TagColor, TagShape, TagSize, TagVariant } from './types';
|
|
2
2
|
declare const Tag: import('react').ForwardRefExoticComponent<Omit<import('../Primitives/Block/Block').BlockProps, "children"> & {
|
|
3
|
+
maxWidth?: import('styled-components').CSSObject["maxWidth"];
|
|
4
|
+
width?: import('styled-components').CSSObject["width"];
|
|
3
5
|
text: string;
|
|
4
6
|
variant?: TagVariant;
|
|
5
7
|
color?: TagColor;
|
|
@@ -17,6 +17,9 @@ import { Theme } from '../../context/theme.enum';
|
|
|
17
17
|
* Size-dependent properties: borderRadius, padding, fontSize, fontWeight, gap, height
|
|
18
18
|
*/
|
|
19
19
|
export type TagTokensType = Readonly<{
|
|
20
|
+
minWidth: CSSObject['minWidth'];
|
|
21
|
+
maxWidth: CSSObject['maxWidth'];
|
|
22
|
+
width: CSSObject['width'];
|
|
20
23
|
gap: CSSObject['gap'];
|
|
21
24
|
backgroundColor: {
|
|
22
25
|
[key in TagVariant]: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SkeletonVariant } from '../Skeleton/skeleton.tokens';
|
|
3
3
|
import { BlockProps } from '../Primitives/Block/Block';
|
|
4
|
+
import { CSSObject } from 'styled-components';
|
|
4
5
|
export declare enum TagVariant {
|
|
5
6
|
NO_FILL = "noFill",
|
|
6
7
|
ATTENTIVE = "attentive",
|
|
@@ -25,6 +26,8 @@ export declare enum TagShape {
|
|
|
25
26
|
SQUARICAL = "squarical"
|
|
26
27
|
}
|
|
27
28
|
export type TagProps = Omit<BlockProps, 'children'> & {
|
|
29
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
30
|
+
width?: CSSObject['width'];
|
|
28
31
|
text: string;
|
|
29
32
|
variant?: TagVariant;
|
|
30
33
|
color?: TagColor;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { TooltipSize } from '../Tooltip/types';
|
|
2
|
+
import { TooltipSide, TooltipSize } from '../Tooltip/types';
|
|
3
3
|
export type TruncatedTextWithTooltipProps = {
|
|
4
4
|
text: string;
|
|
5
5
|
style?: React.CSSProperties;
|
|
6
6
|
tooltipSize?: TooltipSize;
|
|
7
7
|
delayDuration?: number;
|
|
8
|
+
side?: TooltipSide;
|
|
8
9
|
'data-id'?: string;
|
|
9
10
|
'data-element'?: string;
|
|
10
11
|
} & {
|
|
11
12
|
[key: `data-${string}`]: string | undefined;
|
|
12
13
|
};
|
|
13
|
-
export declare const TruncatedTextWithTooltip: ({ text, style, tooltipSize, delayDuration, "data-id": dataId, "data-element": dataElement, ...restProps }: TruncatedTextWithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const TruncatedTextWithTooltip: ({ text, style, tooltipSize, delayDuration, "data-id": dataId, "data-element": dataElement, side, ...restProps }: TruncatedTextWithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { default as useClickOutside } from './useClickOutside';
|
|
2
2
|
export { default as useScrollLock } from './useScrollLock';
|
|
3
3
|
export { default as usePreventParentScroll } from './usePreventParentScroll';
|
|
4
|
+
export { default as useDropdownInteractionLock } from './useDropdownInteractionLock';
|
|
5
|
+
export { default as useTruncationDetection } from './useTruncationDetection';
|
|
6
|
+
export type { UseTruncationDetectionOptions } from './useTruncationDetection';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DependencyList } from 'react';
|
|
2
|
+
export type UseTruncationDetectionOptions = {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
deps?: DependencyList;
|
|
5
|
+
};
|
|
6
|
+
export default function useTruncationDetection(elementRef: React.RefObject<HTMLElement>, selector?: string, options?: UseTruncationDetectionOptions): boolean;
|