@juspay/blend-design-system 0.0.19 → 0.0.20
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 +39 -20
- package/dist/components/Alert/alert.tokens.d.ts +63 -4
- package/dist/components/Avatar/avatar.tokens.d.ts +64 -53
- package/dist/components/Avatar/types.d.ts +1 -0
- package/dist/components/AvatarGroup/avatarGroup.tokens.d.ts +41 -67
- package/dist/components/Breadcrumb/breadcrumb.tokens.d.ts +26 -16
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Button/button.tokens.d.ts +38 -13
- package/dist/components/Button/types.d.ts +8 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/dist/components/ButtonGroup/types.d.ts +2 -2
- package/dist/components/Card/card.tokens.d.ts +80 -56
- package/dist/components/Card/types.d.ts +3 -3
- package/dist/components/Card/utils.d.ts +21 -24
- package/dist/components/Charts/ChartUtils.d.ts +92 -5
- package/dist/components/Charts/DateTimeFormatter.d.ts +151 -0
- package/dist/components/Charts/chart.tokens.d.ts +24 -82
- package/dist/components/Charts/types.d.ts +14 -5
- package/dist/components/Checkbox/checkbox.token.d.ts +41 -68
- package/dist/components/DataTable/TableCell/types.d.ts +1 -0
- package/dist/components/DateRangePicker/QuickRangeSelector.d.ts +2 -0
- package/dist/components/DateRangePicker/TimeSelector.d.ts +2 -0
- package/dist/components/DateRangePicker/components/mobile.tokens.d.ts +77 -0
- package/dist/components/DateRangePicker/dateRangePicker.tokens.d.ts +132 -249
- package/dist/components/DateRangePicker/utils.d.ts +9 -1
- package/dist/components/Drawer/drawer.tokens.d.ts +43 -44
- package/dist/components/Drawer/types.d.ts +3 -3
- package/dist/components/Inputs/DropdownInput/DropdownInput.d.ts +1 -1
- package/dist/components/Inputs/DropdownInput/dropdownInput.tokens.d.ts +55 -16
- package/dist/components/Inputs/DropdownInput/types.d.ts +3 -1
- package/dist/components/Inputs/MultiValueInput/multiValueInput.tokens.d.ts +55 -12
- package/dist/components/Inputs/NumberInput/numberInput.tokens.d.ts +74 -21
- package/dist/components/Inputs/OTPInput/otpInput.tokens.d.ts +48 -12
- package/dist/components/Inputs/SearchInput/searchInput.tokens.d.ts +52 -27
- package/dist/components/Inputs/TextArea/textarea.token.d.ts +58 -17
- package/dist/components/Inputs/TextInput/textInput.tokens.d.ts +54 -14
- package/dist/components/Inputs/UnitInput/unitInput.tokens.d.ts +72 -16
- package/dist/components/Inputs/utils/InputFooter/InputFooter.d.ts +17 -1
- package/dist/components/Inputs/utils/InputLabels/InputLabels.d.ts +31 -2
- package/dist/components/Menu/Menu.d.ts +2 -2
- package/dist/components/Menu/MenuItem.d.ts +2 -2
- package/dist/components/Menu/SubMenu.d.ts +2 -2
- package/dist/components/Menu/menu.tokens.d.ts +46 -26
- package/dist/components/Menu/types.d.ts +14 -10
- package/dist/components/Menu/utils.d.ts +3 -3
- package/dist/components/Modal/modal.tokens.d.ts +59 -33
- package/dist/components/Modal/types.d.ts +2 -2
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
- package/dist/components/MultiSelect/multiSelect.tokens.d.ts +72 -28
- package/dist/components/MultiSelect/types.d.ts +16 -0
- package/dist/components/Popover/PopoverFooter.d.ts +1 -1
- package/dist/components/Popover/popover.tokens.d.ts +49 -13
- package/dist/components/Popover/types.d.ts +2 -2
- package/dist/components/ProgressBar/index.d.ts +0 -1
- package/dist/components/ProgressBar/progressbar.tokens.d.ts +54 -41
- package/dist/components/Radio/radio.token.d.ts +21 -24
- package/dist/components/Sidebar/sidebar.tokens.d.ts +77 -0
- package/dist/components/Sidebar/utils.d.ts +3 -2
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/SingleSelectMenu.d.ts +11 -1
- package/dist/components/SingleSelect/singleSelect.tokens.d.ts +67 -23
- package/dist/components/SingleSelect/types.d.ts +7 -0
- package/dist/components/Snackbar/snackbar.tokens.d.ts +51 -25
- package/dist/components/StatCard/StatCard.d.ts +1 -1
- package/dist/components/StatCard/statcard.tokens.d.ts +51 -66
- package/dist/components/StatCard/types.d.ts +10 -3
- package/dist/components/Switch/switch.token.d.ts +57 -74
- package/dist/components/Tabs/tabs.token.d.ts +62 -40
- package/dist/components/Tags/tag.tokens.d.ts +35 -36
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/tooltip.tokens.d.ts +24 -10
- package/dist/components/Tooltip/types.d.ts +1 -0
- package/dist/components/VirtualList/VirtualList.d.ts +13 -0
- package/dist/components/VirtualList/index.d.ts +2 -0
- package/dist/components/VirtualList/types.d.ts +27 -0
- package/dist/components/VirtualList/utils.d.ts +39 -0
- package/dist/context/ThemeContext.d.ts +18 -12
- package/dist/context/useComponentToken.d.ts +11 -8
- package/dist/main.d.ts +1 -0
- package/dist/main.js +31316 -27358
- package/dist/tokens/unit.tokens.d.ts +3 -0
- package/package.json +1 -1
- package/dist/components/Menu/MenuPlayground.d.ts +0 -3
- package/dist/components/Menu/MenuPlaygroundComprehensive.d.ts +0 -3
- package/dist/components/ProgressBar/utils.d.ts +0 -7
|
@@ -2,7 +2,26 @@ import { CSSObject } from 'styled-components';
|
|
|
2
2
|
import { AccordionType } from './types';
|
|
3
3
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
4
|
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
-
export type AccordionState = 'default' | 'hover' | 'active' | 'disabled' | 'open'
|
|
5
|
+
export type AccordionState = 'default' | 'hover' | 'active' | 'disabled' | 'open';
|
|
6
|
+
/**
|
|
7
|
+
* Accordion Tokens following the pattern: [target].CSSProp.[variant].[state]
|
|
8
|
+
*
|
|
9
|
+
* Structure:
|
|
10
|
+
* - target: container | trigger | separator (defines what element the token applies to)
|
|
11
|
+
* - CSSProp: gap | borderRadius | padding | backgroundColor | border | fontSize | fontWeight | color
|
|
12
|
+
* - variant: border | noBorder (accordion variant)
|
|
13
|
+
* - state: default | hover | active | disabled | open (interaction state)
|
|
14
|
+
*
|
|
15
|
+
* Pattern examples:
|
|
16
|
+
* - container.gap.[variant]
|
|
17
|
+
* - container.borderRadius.[variant]
|
|
18
|
+
* - trigger.backgroundColor.[variant].[state]
|
|
19
|
+
* - trigger.border.[variant].[state]
|
|
20
|
+
* - trigger.padding.[variant]
|
|
21
|
+
* - text.fontSize (size-independent)
|
|
22
|
+
* - text.fontWeight (size-independent)
|
|
23
|
+
* - text.color.[state]
|
|
24
|
+
*/
|
|
6
25
|
export type AccordionTokenType = {
|
|
7
26
|
gap: {
|
|
8
27
|
[key in AccordionType]: CSSObject['gap'];
|
|
@@ -10,40 +29,40 @@ export type AccordionTokenType = {
|
|
|
10
29
|
borderRadius: {
|
|
11
30
|
[key in AccordionType]: CSSObject['borderRadius'];
|
|
12
31
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[key in
|
|
17
|
-
[key in AccordionState]?: CSSObject['border'];
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
padding: {
|
|
21
|
-
[key in AccordionType]: CSSObject['padding'];
|
|
32
|
+
trigger: {
|
|
33
|
+
backgroundColor: {
|
|
34
|
+
[key in AccordionType]: {
|
|
35
|
+
[key in AccordionState]: CSSObject['backgroundColor'];
|
|
22
36
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
};
|
|
38
|
+
border: {
|
|
39
|
+
[key in AccordionType]: {
|
|
40
|
+
[key in AccordionState]: CSSObject['border'];
|
|
27
41
|
};
|
|
42
|
+
};
|
|
43
|
+
padding: {
|
|
44
|
+
[key in AccordionType]: CSSObject['padding'];
|
|
45
|
+
};
|
|
46
|
+
text: {
|
|
28
47
|
title: {
|
|
29
48
|
fontSize: CSSObject['fontSize'];
|
|
30
49
|
fontWeight: CSSObject['fontWeight'];
|
|
31
50
|
color: {
|
|
32
|
-
[key in AccordionState]
|
|
51
|
+
[key in AccordionState]: CSSObject['color'];
|
|
33
52
|
};
|
|
34
53
|
};
|
|
35
54
|
subtext: {
|
|
36
55
|
fontSize: CSSObject['fontSize'];
|
|
37
56
|
gap: CSSObject['gap'];
|
|
38
57
|
color: {
|
|
39
|
-
[key in AccordionState]
|
|
58
|
+
[key in AccordionState]: CSSObject['color'];
|
|
40
59
|
};
|
|
41
60
|
};
|
|
42
61
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
};
|
|
63
|
+
separator: {
|
|
64
|
+
color: {
|
|
65
|
+
[key in AccordionType]: CSSObject['color'];
|
|
47
66
|
};
|
|
48
67
|
};
|
|
49
68
|
};
|
|
@@ -2,7 +2,24 @@ import { CSSObject } from 'styled-components';
|
|
|
2
2
|
import { AlertStyle, AlertVariant } from './types';
|
|
3
3
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
4
|
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
/**
|
|
6
|
+
* Alert Tokens following the pattern: [target].CSSProp.[variant].[style]
|
|
7
|
+
*
|
|
8
|
+
* Structure:
|
|
9
|
+
* - target: container | button (defines the element the token applies to)
|
|
10
|
+
* - CSSProp:
|
|
11
|
+
* - container: padding | borderRadius | background.[variant].[style] | border.[variant]
|
|
12
|
+
* - button: color per [variant]
|
|
13
|
+
* - variant: primary | warning | success | purple | neutral | error | orange
|
|
14
|
+
* - style: subtle | noFill (applies to background only)
|
|
15
|
+
*
|
|
16
|
+
* Notes:
|
|
17
|
+
* - Size-independent properties: padding, borderRadius, background, border, button
|
|
18
|
+
* - Background uses an additional style dimension; border/button are variant-only
|
|
19
|
+
*/
|
|
5
20
|
export type AlertTokenType = {
|
|
21
|
+
maxWidth: CSSObject['maxWidth'];
|
|
22
|
+
gap: CSSObject['gap'];
|
|
6
23
|
padding: CSSObject['padding'];
|
|
7
24
|
borderRadius: CSSObject['borderRadius'];
|
|
8
25
|
background: {
|
|
@@ -11,15 +28,57 @@ export type AlertTokenType = {
|
|
|
11
28
|
};
|
|
12
29
|
};
|
|
13
30
|
border: {
|
|
14
|
-
[key in AlertVariant]:
|
|
31
|
+
[key in AlertVariant]: {
|
|
32
|
+
[key in AlertStyle]: CSSObject['color'];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
text: {
|
|
36
|
+
heading: {
|
|
37
|
+
color: {
|
|
38
|
+
[key in AlertVariant]: CSSObject['color'];
|
|
39
|
+
};
|
|
40
|
+
fontWeight: CSSObject['fontWeight'];
|
|
41
|
+
fontSize: CSSObject['fontSize'];
|
|
42
|
+
lineHeight: CSSObject['lineHeight'];
|
|
43
|
+
};
|
|
44
|
+
description: {
|
|
45
|
+
color: {
|
|
46
|
+
[key in AlertVariant]: CSSObject['color'];
|
|
47
|
+
};
|
|
48
|
+
fontWeight: CSSObject['fontWeight'];
|
|
49
|
+
fontSize: CSSObject['fontSize'];
|
|
50
|
+
lineHeight: CSSObject['lineHeight'];
|
|
51
|
+
};
|
|
15
52
|
};
|
|
16
53
|
button: {
|
|
17
|
-
|
|
54
|
+
gap: CSSObject['gap'];
|
|
55
|
+
primaryAction: {
|
|
56
|
+
color: {
|
|
57
|
+
[key in AlertVariant]: CSSObject['color'];
|
|
58
|
+
};
|
|
59
|
+
fontWeight: CSSObject['fontWeight'];
|
|
60
|
+
fontSize: CSSObject['fontSize'];
|
|
61
|
+
lineHeight: CSSObject['lineHeight'];
|
|
62
|
+
};
|
|
63
|
+
secondaryAction: {
|
|
64
|
+
color: {
|
|
65
|
+
[key in AlertVariant]: CSSObject['color'];
|
|
66
|
+
};
|
|
67
|
+
fontWeight: CSSObject['fontWeight'];
|
|
68
|
+
fontSize: CSSObject['fontSize'];
|
|
69
|
+
lineHeight: CSSObject['lineHeight'];
|
|
70
|
+
};
|
|
71
|
+
closeButton: {
|
|
72
|
+
color: {
|
|
73
|
+
[key in AlertVariant]: CSSObject['color'];
|
|
74
|
+
};
|
|
75
|
+
fontWeight: CSSObject['fontWeight'];
|
|
76
|
+
fontSize: CSSObject['fontSize'];
|
|
77
|
+
lineHeight: CSSObject['lineHeight'];
|
|
78
|
+
};
|
|
18
79
|
};
|
|
19
80
|
};
|
|
20
81
|
export type ResponsiveAlertTokens = {
|
|
21
82
|
[key in keyof BreakpointType]: AlertTokenType;
|
|
22
83
|
};
|
|
23
|
-
declare const alertTokens: AlertTokenType;
|
|
24
84
|
export declare const getAlertTokens: (foundationToken: FoundationTokenType) => ResponsiveAlertTokens;
|
|
25
|
-
export default alertTokens;
|
|
@@ -1,71 +1,82 @@
|
|
|
1
|
-
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { ThemeType } from '../../tokens';
|
|
3
|
+
import { AvatarSize, AvatarShape } from './types';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
export type AvatarState = 'default' | 'online';
|
|
6
|
+
export type AvatarVariant = 'withImage' | 'withoutImage';
|
|
7
|
+
/**
|
|
8
|
+
* Avatar Tokens following the design system pattern
|
|
9
|
+
*
|
|
10
|
+
* Pattern: component.[target].CSSProp.[size].[variant].[subType].[state].value
|
|
11
|
+
*
|
|
12
|
+
* Structure:
|
|
13
|
+
* - gap: Spacing between avatar and slots
|
|
14
|
+
* - container: Main avatar container properties
|
|
15
|
+
* - text: Fallback text styling
|
|
16
|
+
* - indicator: Online status indicator
|
|
17
|
+
* - slot: Leading and trailing slot styling
|
|
18
|
+
*/
|
|
19
|
+
export type AvatarTokensType = {
|
|
20
|
+
gap: CSSObject['gap'];
|
|
2
21
|
container: {
|
|
3
|
-
|
|
4
|
-
|
|
22
|
+
size: {
|
|
23
|
+
[key in AvatarSize]: {
|
|
24
|
+
width: CSSObject['width'];
|
|
25
|
+
height: CSSObject['height'];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
backgroundColor: {
|
|
29
|
+
[key in AvatarVariant]: {
|
|
30
|
+
[key in AvatarState]: CSSObject['backgroundColor'];
|
|
31
|
+
};
|
|
5
32
|
};
|
|
6
33
|
border: {
|
|
7
|
-
|
|
8
|
-
|
|
34
|
+
[key in AvatarVariant]: {
|
|
35
|
+
[key in AvatarState]: CSSObject['border'];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
borderRadius: {
|
|
39
|
+
[key in AvatarShape]: CSSObject['borderRadius'];
|
|
9
40
|
};
|
|
10
41
|
};
|
|
11
42
|
text: {
|
|
12
43
|
color: {
|
|
13
|
-
|
|
44
|
+
[key in AvatarState]: CSSObject['color'];
|
|
14
45
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
background: {
|
|
18
|
-
default: string;
|
|
46
|
+
fontSize: {
|
|
47
|
+
[key in AvatarSize]: CSSObject['fontSize'];
|
|
19
48
|
};
|
|
20
|
-
|
|
21
|
-
|
|
49
|
+
fontWeight: {
|
|
50
|
+
[key in AvatarSize]: CSSObject['fontWeight'];
|
|
22
51
|
};
|
|
23
52
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
height: string;
|
|
28
|
-
fontSize: string;
|
|
29
|
-
fontWeight: string;
|
|
30
|
-
indicatorSize: string;
|
|
31
|
-
indicatorRingWidth: string;
|
|
32
|
-
indicatorOffset: string;
|
|
33
|
-
};
|
|
34
|
-
md: {
|
|
35
|
-
width: string;
|
|
36
|
-
height: string;
|
|
37
|
-
fontSize: string;
|
|
38
|
-
fontWeight: string;
|
|
39
|
-
indicatorSize: string;
|
|
40
|
-
indicatorRingWidth: string;
|
|
41
|
-
indicatorOffset: string;
|
|
53
|
+
indicator: {
|
|
54
|
+
backgroundColor: {
|
|
55
|
+
[key in AvatarState]: CSSObject['backgroundColor'];
|
|
42
56
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
indicatorSize: string;
|
|
49
|
-
indicatorRingWidth: string;
|
|
50
|
-
indicatorOffset: string;
|
|
57
|
+
border: {
|
|
58
|
+
[key in AvatarState]: {
|
|
59
|
+
color: CSSObject['borderColor'];
|
|
60
|
+
width: CSSObject['borderWidth'];
|
|
61
|
+
};
|
|
51
62
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
indicatorSize: string;
|
|
58
|
-
indicatorRingWidth: string;
|
|
59
|
-
indicatorOffset: string;
|
|
63
|
+
size: {
|
|
64
|
+
[key in AvatarSize]: {
|
|
65
|
+
width: CSSObject['width'];
|
|
66
|
+
height: CSSObject['height'];
|
|
67
|
+
};
|
|
60
68
|
};
|
|
69
|
+
borderRadius: CSSObject['borderRadius'];
|
|
70
|
+
boxShadow: CSSObject['boxShadow'];
|
|
61
71
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
rounded: {
|
|
67
|
-
borderRadius: string;
|
|
72
|
+
slot: {
|
|
73
|
+
spacing: CSSObject['margin'];
|
|
74
|
+
color: {
|
|
75
|
+
[key in AvatarState]: CSSObject['color'];
|
|
68
76
|
};
|
|
69
77
|
};
|
|
70
78
|
};
|
|
71
|
-
export
|
|
79
|
+
export type ResponsiveAvatarTokens = {
|
|
80
|
+
[key in keyof BreakpointType]: AvatarTokensType;
|
|
81
|
+
};
|
|
82
|
+
export declare const getAvatarTokens: (foundationToken: ThemeType) => ResponsiveAvatarTokens;
|
|
@@ -1,89 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { ThemeType } from '../../tokens';
|
|
3
|
+
import { AvatarSize, AvatarShape } from '../Avatar/types';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
/**
|
|
6
|
+
* AvatarGroup Tokens following the design system pattern
|
|
7
|
+
*
|
|
8
|
+
* Structure:
|
|
9
|
+
* - gap: Spacing between avatars in the group
|
|
10
|
+
* - container: Group container properties
|
|
11
|
+
* - avatar: Individual avatar styling within the group
|
|
12
|
+
* - overflowCounter: Overflow counter styling
|
|
13
|
+
*/
|
|
14
|
+
export type AvatarGroupTokensType = {
|
|
15
|
+
gap: CSSObject['gap'];
|
|
2
16
|
container: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
md: string;
|
|
6
|
-
lg: string;
|
|
7
|
-
xl: string;
|
|
17
|
+
marginLeft: {
|
|
18
|
+
[key in AvatarSize]: CSSObject['margin'];
|
|
8
19
|
};
|
|
9
20
|
};
|
|
10
21
|
avatar: {
|
|
11
|
-
stacking: {
|
|
12
|
-
zIndex: number;
|
|
13
|
-
};
|
|
14
22
|
selected: {
|
|
15
|
-
ringColor:
|
|
16
|
-
ringWidth:
|
|
17
|
-
ringOffset:
|
|
23
|
+
ringColor: CSSObject['borderColor'];
|
|
24
|
+
ringWidth: CSSObject['borderWidth'];
|
|
25
|
+
ringOffset: CSSObject['outlineOffset'];
|
|
18
26
|
};
|
|
19
27
|
border: {
|
|
20
|
-
width:
|
|
21
|
-
color:
|
|
28
|
+
width: CSSObject['borderWidth'];
|
|
29
|
+
color: CSSObject['borderColor'];
|
|
22
30
|
};
|
|
23
31
|
};
|
|
24
32
|
overflowCounter: {
|
|
25
33
|
background: {
|
|
26
|
-
default:
|
|
27
|
-
hover:
|
|
28
|
-
active:
|
|
34
|
+
default: CSSObject['backgroundColor'];
|
|
35
|
+
hover: CSSObject['backgroundColor'];
|
|
36
|
+
active: CSSObject['backgroundColor'];
|
|
29
37
|
};
|
|
30
38
|
text: {
|
|
31
|
-
color:
|
|
39
|
+
color: CSSObject['color'];
|
|
32
40
|
};
|
|
33
41
|
border: {
|
|
34
|
-
width:
|
|
35
|
-
color:
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
width:
|
|
40
|
-
height:
|
|
41
|
-
fontSize:
|
|
42
|
-
fontWeight: string;
|
|
43
|
-
indicatorSize: string;
|
|
44
|
-
indicatorRingWidth: string;
|
|
45
|
-
indicatorOffset: string;
|
|
46
|
-
};
|
|
47
|
-
md: {
|
|
48
|
-
width: string;
|
|
49
|
-
height: string;
|
|
50
|
-
fontSize: string;
|
|
51
|
-
fontWeight: string;
|
|
52
|
-
indicatorSize: string;
|
|
53
|
-
indicatorRingWidth: string;
|
|
54
|
-
indicatorOffset: string;
|
|
55
|
-
};
|
|
56
|
-
lg: {
|
|
57
|
-
width: string;
|
|
58
|
-
height: string;
|
|
59
|
-
fontSize: string;
|
|
60
|
-
fontWeight: string;
|
|
61
|
-
indicatorSize: string;
|
|
62
|
-
indicatorRingWidth: string;
|
|
63
|
-
indicatorOffset: string;
|
|
64
|
-
};
|
|
65
|
-
xl: {
|
|
66
|
-
width: string;
|
|
67
|
-
height: string;
|
|
68
|
-
fontSize: string;
|
|
69
|
-
fontWeight: string;
|
|
70
|
-
indicatorSize: string;
|
|
71
|
-
indicatorRingWidth: string;
|
|
72
|
-
indicatorOffset: string;
|
|
42
|
+
width: CSSObject['borderWidth'];
|
|
43
|
+
color: CSSObject['borderColor'];
|
|
44
|
+
};
|
|
45
|
+
size: {
|
|
46
|
+
[key in AvatarSize]: {
|
|
47
|
+
width: CSSObject['width'];
|
|
48
|
+
height: CSSObject['height'];
|
|
49
|
+
fontSize: CSSObject['fontSize'];
|
|
73
50
|
};
|
|
74
51
|
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
borderRadius: string;
|
|
78
|
-
};
|
|
79
|
-
rounded: {
|
|
80
|
-
borderRadius: string;
|
|
81
|
-
};
|
|
52
|
+
borderRadius: {
|
|
53
|
+
[key in AvatarShape]: CSSObject['borderRadius'];
|
|
82
54
|
};
|
|
83
55
|
};
|
|
84
56
|
menu: {
|
|
85
|
-
|
|
86
|
-
zIndex: number;
|
|
57
|
+
marginTop: CSSObject['margin'];
|
|
87
58
|
};
|
|
88
59
|
};
|
|
89
|
-
export
|
|
60
|
+
export type ResponsiveAvatarGroupTokens = {
|
|
61
|
+
[key in keyof BreakpointType]: AvatarGroupTokensType;
|
|
62
|
+
};
|
|
63
|
+
export declare const getAvatarGroupTokens: (foundationToken: ThemeType) => ResponsiveAvatarGroupTokens;
|
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
3
|
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
-
type
|
|
4
|
+
export type BreadcrumbState = 'default' | 'hover' | 'active';
|
|
5
|
+
/**
|
|
6
|
+
* Breadcrumb Tokens following the pattern: [target].CSSProp.[state]
|
|
7
|
+
*
|
|
8
|
+
* Structure:
|
|
9
|
+
* - target: container | item | separator (defines what element the token applies to)
|
|
10
|
+
* - CSSProp: height | padding | gap | fontSize | fontWeight | color | background
|
|
11
|
+
* - state: active | inactive (breadcrumb item state)
|
|
12
|
+
*
|
|
13
|
+
* Pattern examples:
|
|
14
|
+
* - container.height
|
|
15
|
+
* - container.padding
|
|
16
|
+
* - container.gap
|
|
17
|
+
* - item.padding
|
|
18
|
+
* - item.gap
|
|
19
|
+
* - item.text.fontSize.[state]
|
|
20
|
+
* - item.text.fontWeight.[state]
|
|
21
|
+
* - item.text.color.[state]
|
|
22
|
+
* - item.background.[state]
|
|
23
|
+
*/
|
|
5
24
|
export type BreadcrumbTokenType = {
|
|
6
|
-
height: CSSObject['height'];
|
|
7
|
-
padding: CSSObject['padding'];
|
|
8
25
|
gap: CSSObject['gap'];
|
|
9
26
|
item: {
|
|
10
27
|
padding: CSSObject['padding'];
|
|
11
28
|
gap: CSSObject['gap'];
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
color: {
|
|
19
|
-
[key in BreadcrumbItemType]: CSSObject['color'];
|
|
20
|
-
};
|
|
21
|
-
background: {
|
|
22
|
-
[key in BreadcrumbItemType]: CSSObject['background'];
|
|
29
|
+
text: {
|
|
30
|
+
fontSize: CSSObject['fontSize'];
|
|
31
|
+
fontWeight: CSSObject['fontWeight'];
|
|
32
|
+
color: {
|
|
33
|
+
[key in BreadcrumbState]: CSSObject['color'];
|
|
34
|
+
};
|
|
23
35
|
};
|
|
24
36
|
};
|
|
25
37
|
};
|
|
26
38
|
export type ResponsiveBreadcrumbTokens = {
|
|
27
39
|
[key in keyof BreakpointType]: BreadcrumbTokenType;
|
|
28
40
|
};
|
|
29
|
-
declare const breadcrumbTokens: BreadcrumbTokenType;
|
|
30
41
|
export declare const getBreadcrumbTokens: (foundationToken: FoundationTokenType) => ResponsiveBreadcrumbTokens;
|
|
31
|
-
export default breadcrumbTokens;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonSize, ButtonSubType, ButtonType } from './types';
|
|
1
|
+
import { ButtonSize, ButtonState, ButtonSubType, ButtonType } from './types';
|
|
2
2
|
declare const Button: import('react').ForwardRefExoticComponent<{
|
|
3
3
|
buttonType?: ButtonType;
|
|
4
4
|
size?: ButtonSize;
|
|
@@ -14,5 +14,6 @@ declare const Button: import('react').ForwardRefExoticComponent<{
|
|
|
14
14
|
buttonGroupPosition?: "center" | "left" | "right";
|
|
15
15
|
fullWidth?: boolean;
|
|
16
16
|
justifyContent?: import('styled-components').CSSObject["justifyContent"];
|
|
17
|
+
state?: ButtonState;
|
|
17
18
|
} & Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "style" | "className"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
18
19
|
export default Button;
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
|
-
import { ButtonSize, ButtonSubType, ButtonType } from './types';
|
|
2
|
+
import { ButtonSize, ButtonState, ButtonSubType, ButtonType } from './types';
|
|
3
3
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
4
|
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Button Tokens following the pattern: [target].CSSProp.[size].[variant].[subType].[state]
|
|
7
|
+
*
|
|
8
|
+
* Structure:
|
|
9
|
+
* - target: container | text (defines what element the token applies to)
|
|
10
|
+
* - CSSProp: backgroundColor | borderRadius | padding | border | shadow | outline | color
|
|
11
|
+
* - size: sm | md | lg (only for size-dependent properties like padding)
|
|
12
|
+
* - variant: primary | secondary | danger | success (button type/variant)
|
|
13
|
+
* - subType: default | iconOnly | inline (button sub-type)
|
|
14
|
+
* - state: default | hover | active | disabled (interaction state)
|
|
15
|
+
*
|
|
16
|
+
* Size-independent properties: backgroundColor, borderRadius, border, shadow, outline, color
|
|
17
|
+
* Size-dependent properties: padding
|
|
18
|
+
*/
|
|
6
19
|
export type ButtonTokensType = {
|
|
7
20
|
gap: CSSObject['gap'];
|
|
8
21
|
backgroundColor: {
|
|
@@ -12,23 +25,20 @@ export type ButtonTokensType = {
|
|
|
12
25
|
};
|
|
13
26
|
};
|
|
14
27
|
};
|
|
15
|
-
color: {
|
|
16
|
-
[key in ButtonType]: {
|
|
17
|
-
[key in ButtonSubType]: {
|
|
18
|
-
[key in ButtonState]: CSSObject['color'];
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
28
|
borderRadius: {
|
|
23
|
-
[key in
|
|
24
|
-
[key in
|
|
25
|
-
[key in
|
|
29
|
+
[key in ButtonSize]: {
|
|
30
|
+
[key in ButtonType]: {
|
|
31
|
+
[key in ButtonSubType]: {
|
|
32
|
+
[key in ButtonState]: CSSObject['borderRadius'];
|
|
33
|
+
};
|
|
26
34
|
};
|
|
27
35
|
};
|
|
28
36
|
};
|
|
29
37
|
padding: {
|
|
30
38
|
[key in ButtonSize]: {
|
|
31
|
-
[key in
|
|
39
|
+
[key in ButtonType]: {
|
|
40
|
+
[key in ButtonSubType]: CSSObject['padding'];
|
|
41
|
+
};
|
|
32
42
|
};
|
|
33
43
|
};
|
|
34
44
|
border: {
|
|
@@ -52,6 +62,21 @@ export type ButtonTokensType = {
|
|
|
52
62
|
};
|
|
53
63
|
};
|
|
54
64
|
};
|
|
65
|
+
text: {
|
|
66
|
+
color: {
|
|
67
|
+
[key in ButtonType]: {
|
|
68
|
+
[key in ButtonSubType]: {
|
|
69
|
+
[key in ButtonState]: CSSObject['color'];
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
fontSize: {
|
|
74
|
+
[key in ButtonSize]: CSSObject['fontSize'];
|
|
75
|
+
};
|
|
76
|
+
fontWeight: {
|
|
77
|
+
[key in ButtonSize]: CSSObject['fontWeight'];
|
|
78
|
+
};
|
|
79
|
+
};
|
|
55
80
|
};
|
|
56
81
|
export type ResponsiveButtonTokens = {
|
|
57
82
|
[key in keyof BreakpointType]: ButtonTokensType;
|
|
@@ -16,7 +16,13 @@ export declare enum ButtonSubType {
|
|
|
16
16
|
ICON_ONLY = "iconOnly",
|
|
17
17
|
INLINE = "inline"
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export declare enum ButtonState {
|
|
20
|
+
DEFAULT = "default",
|
|
21
|
+
HOBVER = "hover",
|
|
22
|
+
ACTIVE = "active",
|
|
23
|
+
DISABLED = "disabled"
|
|
24
|
+
}
|
|
25
|
+
export type ButtonProps = {
|
|
20
26
|
buttonType?: ButtonType;
|
|
21
27
|
size?: ButtonSize;
|
|
22
28
|
subType?: ButtonSubType;
|
|
@@ -31,4 +37,5 @@ export type ButtonV2Props = {
|
|
|
31
37
|
buttonGroupPosition?: 'center' | 'left' | 'right';
|
|
32
38
|
fullWidth?: boolean;
|
|
33
39
|
justifyContent?: CSSObject['justifyContent'];
|
|
40
|
+
state?: ButtonState;
|
|
34
41
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style' | 'className'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
3
|
export type ButtonGroupProps = {
|
|
4
4
|
stacked?: boolean;
|
|
5
|
-
children: ReactElement<
|
|
5
|
+
children: ReactElement<ButtonProps> | ReactElement<ButtonProps>[];
|
|
6
6
|
};
|