@juspay/blend-design-system 0.0.37-beta.6 → 0.0.37-beta.8
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/CodeEditor/types.d.ts +22 -2
- package/dist/components/CodeEditorV2/CodeEditorV2.d.ts +1 -1
- package/dist/components/CodeEditorV2/codeEditorV2.types.d.ts +23 -2
- package/dist/components/DataTable/TableBody/types.d.ts +1 -0
- package/dist/components/DataTable/TableCell/types.d.ts +1 -0
- package/dist/components/DataTable/columnTypes.d.ts +5 -3
- package/dist/components/DataTable/dataTable.tokens.d.ts +4 -0
- package/dist/components/DataTable/types.d.ts +20 -2
- package/dist/components/DataTable/utils.d.ts +4 -3
- package/dist/components/MenuV2/MenuV2Content.d.ts +1 -0
- package/dist/components/MenuV2/menuV2.types.d.ts +5 -0
- package/dist/components/MenuV2/menuV2.utils.d.ts +10 -2
- 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 +2 -0
- package/dist/components/MultiSelectV2/MultiSelectV2.d.ts +1 -1
- package/dist/components/MultiSelectV2/MultiSelectV2Menu.d.ts +1 -1
- package/dist/components/MultiSelectV2/multiSelectV2.types.d.ts +2 -0
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/SingleSelectMenu.d.ts +2 -1
- package/dist/components/SingleSelect/types.d.ts +1 -0
- package/dist/components/SingleSelectV2/SingleSelectV2.d.ts +1 -1
- package/dist/components/SingleSelectV2/SingleSelectV2Menu.d.ts +1 -1
- package/dist/components/SingleSelectV2/singleSelectV2.tokens.types.d.ts +8 -0
- package/dist/components/SingleSelectV2/singleSelectV2.types.d.ts +2 -0
- package/dist/components/Skeleton/hooks/useSkeletonBase.d.ts +7 -11
- package/dist/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/components/Snackbar/snackbar.tokens.d.ts +1 -0
- package/dist/components/Snackbar/types.d.ts +2 -0
- package/dist/components/StatCardV2/StatCardV2.d.ts +1 -0
- package/dist/components/StatCardV2/StatCardV2NoData.d.ts +2 -2
- package/dist/components/StatCardV2/statcardV2.types.d.ts +1 -0
- package/dist/components/TabsV2/tabsV2.tokens.types.d.ts +3 -0
- package/dist/global-utils/GlobalUtils.d.ts +2 -1
- package/dist/main.js +27446 -27271
- package/dist/{node-CJ_Tft0g.js → node-CovJEwot.js} +65 -25
- package/dist/node.js +1 -1
- package/dist/{tokens.js → token-engine.js} +1 -1
- package/lib/components/Card/Card.tsx +1 -0
- package/lib/components/Charts/ChartHeader.tsx +4 -1
- package/lib/components/CodeBlock/CodeBlock.tsx +8 -4
- package/lib/components/CodeEditor/MonacoEditorWrapper.tsx +6 -2
- package/lib/components/CodeEditor/types.ts +52 -2
- package/lib/components/CodeEditorV2/MonacoEditor/MonacoEditorWrapper.tsx +6 -2
- package/lib/components/CodeEditorV2/codeEditorV2.types.ts +44 -5
- package/lib/components/DataTable/DataTable.tsx +2 -0
- package/lib/components/DataTable/TableBody/index.tsx +2 -0
- package/lib/components/DataTable/TableBody/types.ts +1 -0
- package/lib/components/DataTable/TableCell/index.tsx +45 -20
- package/lib/components/DataTable/TableCell/types.ts +1 -0
- package/lib/components/DataTable/columnTypes.ts +5 -3
- package/lib/components/DataTable/dataTable.tokens.ts +15 -0
- package/lib/components/DataTable/types.ts +33 -2
- package/lib/components/DataTable/utils.ts +91 -5
- package/lib/components/DateRangePicker/CalendarGrid.tsx +3 -0
- package/lib/components/DateRangePicker/DateRangePicker.tsx +5 -1
- package/lib/components/MenuV2/MenuV2.tsx +9 -2
- package/lib/components/MenuV2/MenuV2Content.tsx +6 -0
- package/lib/components/MenuV2/MenuV2SubMenu.tsx +16 -2
- package/lib/components/MenuV2/menuV2.types.ts +11 -0
- package/lib/components/MenuV2/menuV2.utils.ts +45 -3
- package/lib/components/MultiSelect/MultiSelect.tsx +2 -0
- package/lib/components/MultiSelect/MultiSelectMenu.tsx +8 -0
- package/lib/components/MultiSelect/types.ts +2 -0
- package/lib/components/MultiSelectV2/MultiSelectV2.tsx +2 -0
- package/lib/components/MultiSelectV2/MultiSelectV2Menu.tsx +8 -0
- package/lib/components/MultiSelectV2/multiSelectV2.types.ts +2 -0
- package/lib/components/SingleSelect/SingleSelect.tsx +2 -0
- package/lib/components/SingleSelect/SingleSelectMenu.tsx +171 -138
- package/lib/components/SingleSelect/types.ts +1 -0
- package/lib/components/SingleSelectV2/SingleSelectV2.tsx +2 -0
- package/lib/components/SingleSelectV2/SingleSelectV2Menu.tsx +84 -58
- package/lib/components/SingleSelectV2/SingleSelectV2Search.tsx +1 -0
- package/lib/components/SingleSelectV2/singleSelectV2.dark.tokens.ts +8 -0
- package/lib/components/SingleSelectV2/singleSelectV2.light.tokens.ts +8 -0
- package/lib/components/SingleSelectV2/singleSelectV2.tokens.types.ts +8 -0
- package/lib/components/SingleSelectV2/singleSelectV2.types.ts +2 -0
- package/lib/components/Skeleton/hooks/useSkeletonBase.ts +11 -1
- package/lib/components/Snackbar/Snackbar.tsx +18 -8
- package/lib/components/Snackbar/snackbar.tokens.ts +6 -0
- package/lib/components/Snackbar/types.ts +2 -0
- package/lib/components/StatCard/StatCard.tsx +39 -2
- package/lib/components/StatCardV2/StatCardV2.tsx +8 -6
- package/lib/components/StatCardV2/StatCardV2NoData.tsx +8 -6
- package/lib/components/StatCardV2/statcardV2.types.ts +1 -0
- package/lib/components/TabsV2/TabsV2List.tsx +5 -1
- package/lib/components/TabsV2/tabsV2.dark.tokens.ts +12 -0
- package/lib/components/TabsV2/tabsV2.light.tokens.ts +12 -0
- package/lib/components/TabsV2/tabsV2.tokens.types.ts +3 -0
- package/lib/global-utils/GlobalUtils.ts +10 -1
- package/package.json +5 -4
- package/dist/tokens.d.ts +0 -2
|
@@ -2,11 +2,21 @@ import { type ReactNode } from 'react'
|
|
|
2
2
|
import { useResponsiveTokens } from '../../../hooks/useResponsiveTokens'
|
|
3
3
|
import type { SkeletonTokensType } from '../skeleton.tokens'
|
|
4
4
|
|
|
5
|
+
export type UseSkeletonBaseResult = {
|
|
6
|
+
shouldRender: boolean
|
|
7
|
+
fallback: ReactNode | null
|
|
8
|
+
tokens: SkeletonTokensType | null
|
|
9
|
+
prefersReducedMotion: boolean
|
|
10
|
+
}
|
|
11
|
+
|
|
5
12
|
/**
|
|
6
13
|
* Shared hook for all skeleton components to eliminate code duplication
|
|
7
14
|
* Handles token fetching, loading state, and motion preferences
|
|
8
15
|
*/
|
|
9
|
-
export const useSkeletonBase = (
|
|
16
|
+
export const useSkeletonBase = (
|
|
17
|
+
loading: boolean,
|
|
18
|
+
children?: ReactNode
|
|
19
|
+
): UseSkeletonBaseResult => {
|
|
10
20
|
const tokens = useResponsiveTokens<SkeletonTokensType>('SKELETON')
|
|
11
21
|
|
|
12
22
|
// Check for motion preferences (accessibility)
|
|
@@ -45,6 +45,7 @@ export const StyledToast: React.FC<CustomToastProps> = ({
|
|
|
45
45
|
onClose,
|
|
46
46
|
actionButton,
|
|
47
47
|
toastId,
|
|
48
|
+
wrap = false,
|
|
48
49
|
...props
|
|
49
50
|
}) => {
|
|
50
51
|
const snackbarTokens = useResponsiveTokens<SnackbarTokens>('SNACKBAR')
|
|
@@ -75,14 +76,17 @@ export const StyledToast: React.FC<CustomToastProps> = ({
|
|
|
75
76
|
>
|
|
76
77
|
<Block
|
|
77
78
|
display="flex"
|
|
78
|
-
alignItems=
|
|
79
|
+
alignItems={wrap ? 'flex-start' : 'center'}
|
|
79
80
|
justifyContent="space-between"
|
|
80
81
|
gap={snackbarTokens.gap}
|
|
81
82
|
>
|
|
82
83
|
<Block
|
|
83
84
|
display="flex"
|
|
84
|
-
alignItems="
|
|
85
|
+
alignItems="center"
|
|
85
86
|
flexShrink={0}
|
|
87
|
+
height={
|
|
88
|
+
snackbarTokens.content.textContainer.header.lineHeight
|
|
89
|
+
}
|
|
86
90
|
data-element="icon"
|
|
87
91
|
aria-hidden="true"
|
|
88
92
|
>
|
|
@@ -107,12 +111,16 @@ export const StyledToast: React.FC<CustomToastProps> = ({
|
|
|
107
111
|
}
|
|
108
112
|
data-element="header"
|
|
109
113
|
data-id={header}
|
|
110
|
-
style={
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
style={
|
|
115
|
+
wrap
|
|
116
|
+
? { minWidth: 0 }
|
|
117
|
+
: {
|
|
118
|
+
minWidth: 0,
|
|
119
|
+
overflow: 'hidden',
|
|
120
|
+
textOverflow: 'ellipsis',
|
|
121
|
+
whiteSpace: 'nowrap',
|
|
122
|
+
}
|
|
123
|
+
}
|
|
116
124
|
>
|
|
117
125
|
{header}
|
|
118
126
|
</Text>
|
|
@@ -221,6 +229,7 @@ export const addSnackbar = ({
|
|
|
221
229
|
actionButton,
|
|
222
230
|
duration,
|
|
223
231
|
position,
|
|
232
|
+
wrap = false,
|
|
224
233
|
}: AddToastOptions) => {
|
|
225
234
|
// Determine if position includes "center" for proper alignment
|
|
226
235
|
const isCenter = position?.includes('center')
|
|
@@ -237,6 +246,7 @@ export const addSnackbar = ({
|
|
|
237
246
|
}}
|
|
238
247
|
actionButton={actionButton}
|
|
239
248
|
toastId={t}
|
|
249
|
+
wrap={wrap}
|
|
240
250
|
/>
|
|
241
251
|
),
|
|
242
252
|
{
|
|
@@ -61,6 +61,8 @@ export type SnackbarTokens = Readonly<{
|
|
|
61
61
|
fontSize: CSSObject['fontSize']
|
|
62
62
|
// Pattern: content.textContainer.header.fontWeight
|
|
63
63
|
fontWeight: CSSObject['fontWeight']
|
|
64
|
+
// Pattern: content.textContainer.header.lineHeight
|
|
65
|
+
lineHeight: CSSObject['lineHeight']
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
// Description text styling
|
|
@@ -149,6 +151,8 @@ export const getSnackbarTokens = (
|
|
|
149
151
|
},
|
|
150
152
|
fontSize: foundationToken.font.size.body.md.fontSize,
|
|
151
153
|
fontWeight: foundationToken.font.weight[500],
|
|
154
|
+
lineHeight:
|
|
155
|
+
foundationToken.font.size.body.md.lineHeight,
|
|
152
156
|
},
|
|
153
157
|
|
|
154
158
|
description: {
|
|
@@ -222,6 +226,8 @@ export const getSnackbarTokens = (
|
|
|
222
226
|
},
|
|
223
227
|
fontSize: foundationToken.font.size.body.lg.fontSize,
|
|
224
228
|
fontWeight: foundationToken.font.weight[600],
|
|
229
|
+
lineHeight:
|
|
230
|
+
foundationToken.font.size.body.lg.lineHeight,
|
|
225
231
|
},
|
|
226
232
|
|
|
227
233
|
description: {
|
|
@@ -26,6 +26,7 @@ export type AddToastOptions = {
|
|
|
26
26
|
}
|
|
27
27
|
duration?: number
|
|
28
28
|
position?: SnackbarPosition
|
|
29
|
+
wrap?: boolean
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export type CustomToastProps = {
|
|
@@ -39,6 +40,7 @@ export type CustomToastProps = {
|
|
|
39
40
|
autoDismiss?: boolean
|
|
40
41
|
}
|
|
41
42
|
toastId?: string | number
|
|
43
|
+
wrap?: boolean
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
export type SnackbarProps = {
|
|
@@ -39,6 +39,7 @@ import type { StatCardTokenType } from './statcard.tokens'
|
|
|
39
39
|
import { useResponsiveTokens } from '../../hooks/useResponsiveTokens'
|
|
40
40
|
import { BREAKPOINTS } from '../../breakpoints/breakPoints'
|
|
41
41
|
import { useBreakpoints } from '../../hooks/useBreakPoints'
|
|
42
|
+
import { useResizeObserver } from '../../hooks/useResizeObserver'
|
|
42
43
|
import {
|
|
43
44
|
SelectMenuSize,
|
|
44
45
|
SelectMenuVariant,
|
|
@@ -304,6 +305,12 @@ const StatCard = ({
|
|
|
304
305
|
const isSmallScreen = breakPointLabel === 'sm'
|
|
305
306
|
const titleIconRef = useRef<HTMLDivElement>(null)
|
|
306
307
|
const titleIconWidth = titleIconRef.current?.offsetWidth || 0
|
|
308
|
+
const actionIconRef = useRef<HTMLDivElement>(null)
|
|
309
|
+
const [actionIconWidth, setActionIconWidth] = useState(0)
|
|
310
|
+
|
|
311
|
+
useResizeObserver(actionIconRef, (rect) => {
|
|
312
|
+
setActionIconWidth(rect.width)
|
|
313
|
+
})
|
|
307
314
|
|
|
308
315
|
const [hoveredBarIndex, setHoveredBarIndex] = useState<number | null>(null)
|
|
309
316
|
|
|
@@ -588,7 +595,11 @@ const StatCard = ({
|
|
|
588
595
|
overflow="hidden"
|
|
589
596
|
backgroundColor={statCardToken.backgroundColor}
|
|
590
597
|
boxShadow={showBorder ? statCardToken.boxShadow : undefined}
|
|
591
|
-
padding={
|
|
598
|
+
padding={
|
|
599
|
+
showBorder
|
|
600
|
+
? `${statCardToken.padding.y} ${statCardToken.padding.x}`
|
|
601
|
+
: undefined
|
|
602
|
+
}
|
|
592
603
|
display="flex"
|
|
593
604
|
flexDirection="column"
|
|
594
605
|
// gap={statCardToken.gap}
|
|
@@ -737,7 +748,11 @@ const StatCard = ({
|
|
|
737
748
|
overflow="hidden"
|
|
738
749
|
backgroundColor={statCardToken.backgroundColor}
|
|
739
750
|
boxShadow={showBorder ? statCardToken.boxShadow : undefined}
|
|
740
|
-
padding={
|
|
751
|
+
padding={
|
|
752
|
+
showBorder
|
|
753
|
+
? `${statCardToken.padding.y} ${statCardToken.padding.x}`
|
|
754
|
+
: undefined
|
|
755
|
+
}
|
|
741
756
|
display="flex"
|
|
742
757
|
flexDirection="column"
|
|
743
758
|
// gap={statCardToken.gap}
|
|
@@ -816,6 +831,16 @@ const StatCard = ({
|
|
|
816
831
|
statCardToken.textContainer
|
|
817
832
|
.header.gap
|
|
818
833
|
}
|
|
834
|
+
paddingRight={
|
|
835
|
+
actionIcon
|
|
836
|
+
? actionIconWidth +
|
|
837
|
+
toPixels(
|
|
838
|
+
statCardToken
|
|
839
|
+
.textContainer
|
|
840
|
+
.header.gap
|
|
841
|
+
)
|
|
842
|
+
: undefined
|
|
843
|
+
}
|
|
819
844
|
>
|
|
820
845
|
<StatCardHeaderTitleText
|
|
821
846
|
title={title}
|
|
@@ -835,6 +860,7 @@ const StatCard = ({
|
|
|
835
860
|
direction !==
|
|
836
861
|
StatCardDirection.HORIZONTAL && (
|
|
837
862
|
<Block
|
|
863
|
+
ref={actionIconRef}
|
|
838
864
|
data-element="view-more"
|
|
839
865
|
display="flex"
|
|
840
866
|
alignItems="center"
|
|
@@ -1083,6 +1109,7 @@ const StatCard = ({
|
|
|
1083
1109
|
>
|
|
1084
1110
|
{actionIcon && (
|
|
1085
1111
|
<Block
|
|
1112
|
+
ref={actionIconRef}
|
|
1086
1113
|
data-element="action-icon"
|
|
1087
1114
|
display="flex"
|
|
1088
1115
|
alignItems="flex-start"
|
|
@@ -1123,6 +1150,16 @@ const StatCard = ({
|
|
|
1123
1150
|
statCardToken.textContainer.header
|
|
1124
1151
|
.gap
|
|
1125
1152
|
}
|
|
1153
|
+
paddingRight={
|
|
1154
|
+
actionIcon
|
|
1155
|
+
? actionIconWidth +
|
|
1156
|
+
toPixels(
|
|
1157
|
+
statCardToken
|
|
1158
|
+
.textContainer.header
|
|
1159
|
+
.gap
|
|
1160
|
+
)
|
|
1161
|
+
: undefined
|
|
1162
|
+
}
|
|
1126
1163
|
>
|
|
1127
1164
|
<StatCardHeaderTitleText
|
|
1128
1165
|
title={title}
|
|
@@ -48,6 +48,7 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
|
|
|
48
48
|
height,
|
|
49
49
|
options,
|
|
50
50
|
skeleton,
|
|
51
|
+
showBorder = true,
|
|
51
52
|
...props
|
|
52
53
|
},
|
|
53
54
|
ref
|
|
@@ -131,6 +132,7 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
|
|
|
131
132
|
tokens={tokens}
|
|
132
133
|
isSmallScreen={isSmallScreen}
|
|
133
134
|
filteredProps={filteredProps}
|
|
135
|
+
showBorder={showBorder}
|
|
134
136
|
/>
|
|
135
137
|
)
|
|
136
138
|
}
|
|
@@ -141,14 +143,14 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
|
|
|
141
143
|
display="flex"
|
|
142
144
|
flexDirection="column"
|
|
143
145
|
justifyContent="space-between"
|
|
144
|
-
paddingTop={tokens.paddingTop}
|
|
145
|
-
paddingBottom={tokens.paddingBottom}
|
|
146
|
-
paddingLeft={tokens.paddingLeft}
|
|
147
|
-
paddingRight={tokens.paddingRight}
|
|
148
|
-
border={tokens.border}
|
|
146
|
+
paddingTop={showBorder ? tokens.paddingTop : undefined}
|
|
147
|
+
paddingBottom={showBorder ? tokens.paddingBottom : undefined}
|
|
148
|
+
paddingLeft={showBorder ? tokens.paddingLeft : undefined}
|
|
149
|
+
paddingRight={showBorder ? tokens.paddingRight : undefined}
|
|
150
|
+
border={showBorder ? tokens.border : undefined}
|
|
149
151
|
borderRadius={tokens.borderRadius}
|
|
150
152
|
backgroundColor={tokens.backgroundColor}
|
|
151
|
-
boxShadow={tokens.boxShadow}
|
|
153
|
+
boxShadow={showBorder ? tokens.boxShadow : undefined}
|
|
152
154
|
maxWidth={maxWidth ?? tokens.maxWidth}
|
|
153
155
|
minWidth={minWidth ?? tokens.minWidth}
|
|
154
156
|
width={width ?? tokens.width}
|
|
@@ -19,6 +19,7 @@ type StatCardV2NoDataProps = Pick<
|
|
|
19
19
|
| 'minWidth'
|
|
20
20
|
| 'width'
|
|
21
21
|
| 'height'
|
|
22
|
+
| 'showBorder'
|
|
22
23
|
> & {
|
|
23
24
|
tokens: StatCardV2TokensType
|
|
24
25
|
isSmallScreen: boolean
|
|
@@ -35,6 +36,7 @@ const StatCardV2NoData = ({
|
|
|
35
36
|
minWidth,
|
|
36
37
|
width,
|
|
37
38
|
height,
|
|
39
|
+
showBorder = true,
|
|
38
40
|
tokens,
|
|
39
41
|
isSmallScreen,
|
|
40
42
|
filteredProps,
|
|
@@ -47,14 +49,14 @@ const StatCardV2NoData = ({
|
|
|
47
49
|
display="flex"
|
|
48
50
|
flexDirection="column"
|
|
49
51
|
justifyContent="space-between"
|
|
50
|
-
paddingTop={tokens.paddingTop}
|
|
51
|
-
paddingBottom={tokens.paddingBottom}
|
|
52
|
-
paddingLeft={tokens.paddingLeft}
|
|
53
|
-
paddingRight={tokens.paddingRight}
|
|
54
|
-
border={tokens.border}
|
|
52
|
+
paddingTop={showBorder ? tokens.paddingTop : undefined}
|
|
53
|
+
paddingBottom={showBorder ? tokens.paddingBottom : undefined}
|
|
54
|
+
paddingLeft={showBorder ? tokens.paddingLeft : undefined}
|
|
55
|
+
paddingRight={showBorder ? tokens.paddingRight : undefined}
|
|
56
|
+
border={showBorder ? tokens.border : undefined}
|
|
55
57
|
borderRadius={tokens.borderRadius}
|
|
56
58
|
backgroundColor={tokens.backgroundColor}
|
|
57
|
-
boxShadow={tokens.boxShadow}
|
|
59
|
+
boxShadow={showBorder ? tokens.boxShadow : undefined}
|
|
58
60
|
maxWidth={maxWidth ?? tokens.maxWidth}
|
|
59
61
|
minWidth={minWidth ?? tokens.minWidth}
|
|
60
62
|
width={width ?? tokens.width}
|
|
@@ -343,6 +343,7 @@ const TabsV2List = forwardRef<HTMLDivElement, TabsV2ListProps>(
|
|
|
343
343
|
data-element="tabs-list"
|
|
344
344
|
data-status={expanded ? 'expanded' : 'collapsed'}
|
|
345
345
|
style={{
|
|
346
|
+
width: '100%',
|
|
346
347
|
position: stickyHeader ? 'sticky' : 'relative',
|
|
347
348
|
top: stickyHeader ? offsetTop : 'auto',
|
|
348
349
|
zIndex: stickyHeader
|
|
@@ -351,7 +352,10 @@ const TabsV2List = forwardRef<HTMLDivElement, TabsV2ListProps>(
|
|
|
351
352
|
backgroundColor: stickyHeader
|
|
352
353
|
? stickyHeaderBackground
|
|
353
354
|
: 'transparent',
|
|
354
|
-
borderBottom:
|
|
355
|
+
borderBottom:
|
|
356
|
+
variant === TabsV2Variant.UNDERLINE && !hasAnySkeleton
|
|
357
|
+
? tabsToken.tabList.borderBottom[variant]
|
|
358
|
+
: 'none',
|
|
355
359
|
boxShadow: stickyHeader
|
|
356
360
|
? tabsToken.tabList.stickyHeader.boxShadow
|
|
357
361
|
: 'none',
|
|
@@ -123,6 +123,12 @@ export const getTabsV2DarkTokens = (
|
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
125
|
},
|
|
126
|
+
borderBottom: {
|
|
127
|
+
[TabsV2Variant.UNDERLINE]: `${foundationToken.border.width[1]} solid ${foundationToken.colors.gray[700]}`,
|
|
128
|
+
[TabsV2Variant.BOXED]: 'none',
|
|
129
|
+
[TabsV2Variant.FLOATING]: 'none',
|
|
130
|
+
[TabsV2Variant.PILLS]: 'none',
|
|
131
|
+
},
|
|
126
132
|
activeIndicator: {
|
|
127
133
|
height: foundationToken.border.width[2],
|
|
128
134
|
color: foundationToken.colors.gray[200],
|
|
@@ -458,6 +464,12 @@ export const getTabsV2DarkTokens = (
|
|
|
458
464
|
},
|
|
459
465
|
},
|
|
460
466
|
},
|
|
467
|
+
borderBottom: {
|
|
468
|
+
[TabsV2Variant.UNDERLINE]: `${foundationToken.border.width[1]} solid ${foundationToken.colors.gray[700]}`,
|
|
469
|
+
[TabsV2Variant.BOXED]: 'none',
|
|
470
|
+
[TabsV2Variant.FLOATING]: 'none',
|
|
471
|
+
[TabsV2Variant.PILLS]: 'none',
|
|
472
|
+
},
|
|
461
473
|
activeIndicator: {
|
|
462
474
|
height: foundationToken.border.width[2],
|
|
463
475
|
color: foundationToken.colors.gray[200],
|
|
@@ -123,6 +123,12 @@ export const getTabsV2LightTokens = (
|
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
125
|
},
|
|
126
|
+
borderBottom: {
|
|
127
|
+
[TabsV2Variant.UNDERLINE]: `${foundationToken.border.width[1]} solid ${foundationToken.colors.gray[200]}`,
|
|
128
|
+
[TabsV2Variant.BOXED]: 'none',
|
|
129
|
+
[TabsV2Variant.FLOATING]: 'none',
|
|
130
|
+
[TabsV2Variant.PILLS]: 'none',
|
|
131
|
+
},
|
|
126
132
|
activeIndicator: {
|
|
127
133
|
height: foundationToken.border.width[2],
|
|
128
134
|
color: foundationToken.colors.gray[700],
|
|
@@ -458,6 +464,12 @@ export const getTabsV2LightTokens = (
|
|
|
458
464
|
},
|
|
459
465
|
},
|
|
460
466
|
},
|
|
467
|
+
borderBottom: {
|
|
468
|
+
[TabsV2Variant.UNDERLINE]: `${foundationToken.border.width[1]} solid ${foundationToken.colors.gray[200]}`,
|
|
469
|
+
[TabsV2Variant.BOXED]: 'none',
|
|
470
|
+
[TabsV2Variant.FLOATING]: 'none',
|
|
471
|
+
[TabsV2Variant.PILLS]: 'none',
|
|
472
|
+
},
|
|
461
473
|
activeIndicator: {
|
|
462
474
|
height: foundationToken.border.width[2],
|
|
463
475
|
color: foundationToken.colors.gray[700],
|
|
@@ -18,7 +18,16 @@ export const capitalizeFirstLetter = (string: string): string => {
|
|
|
18
18
|
return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase()
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export
|
|
21
|
+
export type TruncatedTextResult = {
|
|
22
|
+
truncatedValue: string
|
|
23
|
+
fullValue: string
|
|
24
|
+
isTruncated: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const getTruncatedText = (
|
|
28
|
+
text: string,
|
|
29
|
+
limit?: number
|
|
30
|
+
): TruncatedTextResult => {
|
|
22
31
|
const shouldTruncate =
|
|
23
32
|
typeof limit === 'number' && limit > 0 && text.length > limit
|
|
24
33
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/blend-design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.37-beta.
|
|
4
|
+
"version": "0.0.37-beta.8",
|
|
5
5
|
"description": "A comprehensive React component library and design system by Juspay",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/main.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"types": "./dist/node.d.ts"
|
|
24
24
|
},
|
|
25
25
|
"./tokens": {
|
|
26
|
-
"import": "./dist/
|
|
27
|
-
"types": "./dist/
|
|
26
|
+
"import": "./dist/token-engine.js",
|
|
27
|
+
"types": "./dist/token-engine.d.ts"
|
|
28
28
|
},
|
|
29
29
|
"./tokens/server": {
|
|
30
30
|
"import": "./dist/tokens-server.js",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"scripts": {
|
|
37
37
|
"lint": "eslint .",
|
|
38
38
|
"check:circular": "node scripts/check-circular.mjs",
|
|
39
|
-
"
|
|
39
|
+
"check:dist": "node scripts/check-dist.mjs",
|
|
40
|
+
"build": "pnpm lint && vite build && pnpm check:dist",
|
|
40
41
|
"prepublishOnly": "pnpm run build",
|
|
41
42
|
"test": "vitest",
|
|
42
43
|
"test:ui": "vitest --ui",
|
package/dist/tokens.d.ts
DELETED