@juspay/blend-design-system 0.0.20-beta → 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/chart.tokens.d.ts +24 -82
- package/dist/components/Charts/types.d.ts +7 -2
- 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 +11 -11
- 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/MultiSelectMenu.d.ts +1 -1
- package/dist/components/MultiSelect/multiSelect.tokens.d.ts +72 -28
- 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 +4 -2
- package/dist/components/SingleSelect/singleSelect.tokens.d.ts +67 -23
- package/dist/components/SingleSelect/types.d.ts +0 -1
- 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 +5 -0
- 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.tokens.d.ts +24 -10
- package/dist/components/VirtualList/VirtualList.d.ts +10 -1
- package/dist/components/VirtualList/index.d.ts +1 -2
- package/dist/components/VirtualList/types.d.ts +10 -62
- package/dist/components/VirtualList/utils.d.ts +31 -22
- package/dist/context/ThemeContext.d.ts +18 -12
- package/dist/context/useComponentToken.d.ts +11 -8
- package/dist/main.js +31120 -28305
- 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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
3
|
+
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
4
|
+
/**
|
|
5
|
+
* Mobile DateRangePicker Tokens for mobile-specific components
|
|
6
|
+
*
|
|
7
|
+
* Separate tokens for mobile components that have different styling requirements
|
|
8
|
+
* These tokens are used by ScrollablePicker, ActionButtons, and DatePickerComponent
|
|
9
|
+
*
|
|
10
|
+
* Note: PresetItem now uses SelectItem tokens, tabs use existing Tabs component tokens
|
|
11
|
+
*/
|
|
12
|
+
export type MobileTokenType = {
|
|
13
|
+
picker: {
|
|
14
|
+
itemHeight: CSSObject['height'];
|
|
15
|
+
containerHeight: CSSObject['height'];
|
|
16
|
+
divider: {
|
|
17
|
+
width: CSSObject['width'];
|
|
18
|
+
strokeColor: CSSObject['color'];
|
|
19
|
+
strokeColorEnd: CSSObject['color'];
|
|
20
|
+
};
|
|
21
|
+
text: {
|
|
22
|
+
selected: {
|
|
23
|
+
fontSize: CSSObject['fontSize'];
|
|
24
|
+
fontWeight: CSSObject['fontWeight'];
|
|
25
|
+
color: CSSObject['color'];
|
|
26
|
+
opacity: CSSObject['opacity'];
|
|
27
|
+
};
|
|
28
|
+
unselected: {
|
|
29
|
+
fontSize: CSSObject['fontSize'];
|
|
30
|
+
fontWeight: CSSObject['fontWeight'];
|
|
31
|
+
color: CSSObject['color'];
|
|
32
|
+
opacity: CSSObject['opacity'];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
title: {
|
|
36
|
+
padding: {
|
|
37
|
+
x: CSSObject['padding'];
|
|
38
|
+
y: CSSObject['padding'];
|
|
39
|
+
};
|
|
40
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
41
|
+
text: {
|
|
42
|
+
fontSize: CSSObject['fontSize'];
|
|
43
|
+
fontWeight: CSSObject['fontWeight'];
|
|
44
|
+
color: CSSObject['color'];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
footer: {
|
|
49
|
+
gap: CSSObject['gap'];
|
|
50
|
+
padding: {
|
|
51
|
+
x: CSSObject['padding'];
|
|
52
|
+
y: CSSObject['padding'];
|
|
53
|
+
};
|
|
54
|
+
borderTop: CSSObject['borderTop'];
|
|
55
|
+
};
|
|
56
|
+
padding: {
|
|
57
|
+
x: CSSObject['padding'];
|
|
58
|
+
y: CSSObject['padding'];
|
|
59
|
+
};
|
|
60
|
+
gap: CSSObject['gap'];
|
|
61
|
+
header: {
|
|
62
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
63
|
+
padding: {
|
|
64
|
+
x: CSSObject['padding'];
|
|
65
|
+
y: CSSObject['padding'];
|
|
66
|
+
};
|
|
67
|
+
text: {
|
|
68
|
+
fontSize: CSSObject['fontSize'];
|
|
69
|
+
fontWeight: CSSObject['fontWeight'];
|
|
70
|
+
color: CSSObject['color'];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export type ResponsiveMobileTokens = {
|
|
75
|
+
[key in keyof BreakpointType]: MobileTokenType;
|
|
76
|
+
};
|
|
77
|
+
export declare const getMobileToken: (foundationToken: FoundationTokenType) => ResponsiveMobileTokens;
|
|
@@ -1,187 +1,79 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
3
|
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
+
export type CalendarState = 'default' | 'hover' | 'active' | 'disabled';
|
|
5
|
+
export type CalendarSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
/**
|
|
7
|
+
* DateRangePicker Tokens following proper hierarchy pattern
|
|
8
|
+
*
|
|
9
|
+
* Structure:
|
|
10
|
+
* - Base properties (shared across all components)
|
|
11
|
+
* - Target sections: trigger, calendar, quickRange, mobileDrawer
|
|
12
|
+
* - Each target has consistent sub-structure with x/y padding and state management
|
|
13
|
+
*
|
|
14
|
+
* Pattern:
|
|
15
|
+
* - target.property.[size].[state] (for size/state-dependent properties)
|
|
16
|
+
* - target.text.property (for text styling)
|
|
17
|
+
* - target.padding.x/y (for consistent padding structure)
|
|
18
|
+
*/
|
|
4
19
|
export type CalendarTokenType = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
justifyContent: CSSObject['justifyContent'];
|
|
14
|
-
alignItems: CSSObject['alignItems'];
|
|
15
|
-
cursor: CSSObject['cursor'];
|
|
16
|
-
width: CSSObject['width'];
|
|
20
|
+
trigger: {
|
|
21
|
+
quickSelector: {
|
|
22
|
+
borderRadius: {
|
|
23
|
+
topLeft: CSSObject['borderTopLeftRadius'];
|
|
24
|
+
topRight: CSSObject['borderTopRightRadius'];
|
|
25
|
+
bottomLeft: CSSObject['borderBottomLeftRadius'];
|
|
26
|
+
bottomRight: CSSObject['borderBottomRightRadius'];
|
|
27
|
+
};
|
|
17
28
|
backgroundColor: CSSObject['backgroundColor'];
|
|
18
|
-
iconSize: CSSObject['iconSize'];
|
|
19
|
-
text: CSSObject;
|
|
20
29
|
gap: CSSObject['gap'];
|
|
21
30
|
padding: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
fontSize: {
|
|
27
|
-
sm: CSSObject['fontSize'];
|
|
28
|
-
md: CSSObject['fontSize'];
|
|
29
|
-
lg: CSSObject['fontSize'];
|
|
30
|
-
};
|
|
31
|
-
disabled: {
|
|
32
|
-
borderLeft: CSSObject['borderLeft'];
|
|
33
|
-
borderTop: CSSObject['borderTop'];
|
|
34
|
-
borderBottom: CSSObject['borderBottom'];
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
content: {
|
|
38
|
-
padding: CSSObject['padding'];
|
|
39
|
-
width: CSSObject['width'];
|
|
40
|
-
maxHeight: CSSObject['maxHeight'];
|
|
41
|
-
zIndex: CSSObject['zIndex'];
|
|
42
|
-
backgroundColor: CSSObject['backgroundColor'];
|
|
43
|
-
borderRadius: CSSObject['borderRadius'];
|
|
44
|
-
boxShadow: CSSObject['boxShadow'];
|
|
45
|
-
overflowY: CSSObject['overflowY'];
|
|
46
|
-
overflowX: CSSObject['overflowX'];
|
|
47
|
-
};
|
|
48
|
-
item: {
|
|
49
|
-
width: CSSObject['width'];
|
|
50
|
-
textAlign: CSSObject['textAlign'];
|
|
51
|
-
padding: CSSObject['padding'];
|
|
52
|
-
borderRadius: CSSObject['borderRadius'];
|
|
53
|
-
transition: CSSObject['transition'];
|
|
54
|
-
cursor: CSSObject['cursor'];
|
|
55
|
-
border: CSSObject['border'];
|
|
56
|
-
backgroundColor: CSSObject['backgroundColor'];
|
|
57
|
-
display: CSSObject['display'];
|
|
58
|
-
active: CSSObject;
|
|
59
|
-
text: CSSObject;
|
|
60
|
-
'&:hover': CSSObject;
|
|
61
|
-
'&:focus': CSSObject;
|
|
62
|
-
'&[data-highlighted]': CSSObject;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
mobileDrawer: {
|
|
66
|
-
picker: {
|
|
67
|
-
itemHeight: CSSObject['height'];
|
|
68
|
-
containerHeight: CSSObject['height'];
|
|
69
|
-
gradients: {
|
|
70
|
-
top: CSSObject['background'];
|
|
71
|
-
bottom: CSSObject['background'];
|
|
72
|
-
};
|
|
73
|
-
divider: {
|
|
74
|
-
width: CSSObject['width'];
|
|
75
|
-
height: CSSObject['height'];
|
|
76
|
-
strokeColor: CSSObject['color'];
|
|
77
|
-
strokeColorEnd: CSSObject['color'];
|
|
78
|
-
};
|
|
79
|
-
text: {
|
|
80
|
-
selected: {
|
|
81
|
-
fontSize: CSSObject['fontSize'];
|
|
82
|
-
fontWeight: CSSObject['fontWeight'];
|
|
83
|
-
color: CSSObject['color'];
|
|
84
|
-
opacity: CSSObject['opacity'];
|
|
85
|
-
};
|
|
86
|
-
unselected: {
|
|
87
|
-
fontSize: CSSObject['fontSize'];
|
|
88
|
-
fontWeight: CSSObject['fontWeight'];
|
|
89
|
-
color: CSSObject['color'];
|
|
90
|
-
opacity: CSSObject['opacity'];
|
|
31
|
+
[key in CalendarSize]: {
|
|
32
|
+
x: CSSObject['padding'];
|
|
33
|
+
y: CSSObject['padding'];
|
|
91
34
|
};
|
|
92
35
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
scrollArea: {
|
|
101
|
-
zIndex: CSSObject['zIndex'];
|
|
102
|
-
opacity: CSSObject['opacity'];
|
|
36
|
+
border: {
|
|
37
|
+
[key in CalendarState]: {
|
|
38
|
+
left: CSSObject['borderLeft'];
|
|
39
|
+
top: CSSObject['borderTop'];
|
|
40
|
+
bottom: CSSObject['borderBottom'];
|
|
41
|
+
right: CSSObject['borderRight'];
|
|
42
|
+
};
|
|
103
43
|
};
|
|
104
|
-
};
|
|
105
|
-
header: {
|
|
106
|
-
padding: CSSObject['padding'];
|
|
107
|
-
backgroundColor: CSSObject['backgroundColor'];
|
|
108
|
-
zIndex: CSSObject['zIndex'];
|
|
109
44
|
text: {
|
|
110
|
-
fontSize: CSSObject['fontSize'];
|
|
111
|
-
fontWeight: CSSObject['fontWeight'];
|
|
112
45
|
color: CSSObject['color'];
|
|
46
|
+
fontWeight: CSSObject['fontWeight'];
|
|
47
|
+
fontSize: {
|
|
48
|
+
[key in CalendarSize]: CSSObject['fontSize'];
|
|
49
|
+
};
|
|
113
50
|
};
|
|
51
|
+
iconSize: CSSObject['width'];
|
|
114
52
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
active: {
|
|
120
|
-
fontWeight: CSSObject['fontWeight'];
|
|
121
|
-
color: CSSObject['color'];
|
|
122
|
-
};
|
|
123
|
-
inactive: {
|
|
124
|
-
fontWeight: CSSObject['fontWeight'];
|
|
125
|
-
color: CSSObject['color'];
|
|
126
|
-
};
|
|
53
|
+
dateInput: {
|
|
54
|
+
borderRadius: {
|
|
55
|
+
withQuickSelector: CSSObject['borderRadius'];
|
|
56
|
+
withoutQuickSelector: CSSObject['borderRadius'];
|
|
127
57
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
58
|
+
padding: {
|
|
59
|
+
[key in CalendarSize]: {
|
|
60
|
+
x: CSSObject['padding'];
|
|
61
|
+
y: CSSObject['padding'];
|
|
62
|
+
};
|
|
131
63
|
};
|
|
132
|
-
|
|
133
|
-
size: CSSObject['width'];
|
|
64
|
+
text: {
|
|
134
65
|
color: CSSObject['color'];
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
container: {
|
|
140
|
-
gap: CSSObject['gap'];
|
|
141
|
-
padding: CSSObject['padding'];
|
|
142
|
-
marginTop: CSSObject['marginTop'];
|
|
143
|
-
borderTop: CSSObject['borderTop'];
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
tabs: {
|
|
147
|
-
marginTop: CSSObject['marginTop'];
|
|
148
|
-
content: {
|
|
149
|
-
marginTop: CSSObject['marginTop'];
|
|
66
|
+
fontSize: {
|
|
67
|
+
[key in CalendarSize]: CSSObject['fontSize'];
|
|
68
|
+
};
|
|
69
|
+
fontWeight: CSSObject['fontWeight'];
|
|
150
70
|
};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
container: {
|
|
154
|
-
padding: CSSObject['padding'];
|
|
155
|
-
gap: CSSObject['gap'];
|
|
71
|
+
border: {
|
|
72
|
+
[key in CalendarState]: CSSObject['border'];
|
|
156
73
|
};
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
display: CSSObject['display'];
|
|
161
|
-
alignItems: CSSObject['alignItems'];
|
|
162
|
-
justifyContent: CSSObject['justifyContent'];
|
|
163
|
-
border: CSSObject['border'];
|
|
164
|
-
borderRadius: CSSObject['borderRadius'];
|
|
165
|
-
boxShadow: CSSObject['boxShadow'];
|
|
166
|
-
backgroundColor: CSSObject['backgroundColor'];
|
|
167
|
-
color: CSSObject['color'];
|
|
168
|
-
cursor: CSSObject['cursor'];
|
|
169
|
-
disabled: {
|
|
170
|
-
opacity: CSSObject['opacity'];
|
|
171
|
-
cursor: CSSObject['cursor'];
|
|
172
|
-
border: CSSObject['border'];
|
|
173
|
-
};
|
|
174
|
-
borderRadiusWithPresets: CSSObject['borderRadius'];
|
|
175
|
-
borderRadiusWithoutPresets: CSSObject['borderRadius'];
|
|
176
|
-
padding: {
|
|
177
|
-
sm: CSSObject['padding'];
|
|
178
|
-
md: CSSObject['padding'];
|
|
179
|
-
lg: CSSObject['padding'];
|
|
180
|
-
};
|
|
181
|
-
fontSize: {
|
|
182
|
-
sm: CSSObject['fontSize'];
|
|
183
|
-
md: CSSObject['fontSize'];
|
|
184
|
-
lg: CSSObject['fontSize'];
|
|
74
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
75
|
+
iconSize: CSSObject['width'];
|
|
76
|
+
gap: CSSObject['gap'];
|
|
185
77
|
};
|
|
186
78
|
};
|
|
187
79
|
calendar: {
|
|
@@ -191,9 +83,11 @@ export type CalendarTokenType = {
|
|
|
191
83
|
border: CSSObject['border'];
|
|
192
84
|
borderRadius: CSSObject['borderRadius'];
|
|
193
85
|
boxShadow: CSSObject['boxShadow'];
|
|
194
|
-
zIndex: CSSObject['zIndex'];
|
|
195
86
|
inputs: {
|
|
196
|
-
padding:
|
|
87
|
+
padding: {
|
|
88
|
+
x: CSSObject['padding'];
|
|
89
|
+
y: CSSObject['padding'];
|
|
90
|
+
};
|
|
197
91
|
dateInput: {
|
|
198
92
|
gap: CSSObject['gap'];
|
|
199
93
|
label: {
|
|
@@ -207,119 +101,108 @@ export type CalendarTokenType = {
|
|
|
207
101
|
};
|
|
208
102
|
};
|
|
209
103
|
calendarGrid: {
|
|
210
|
-
container: {
|
|
211
|
-
maxHeight: CSSObject['maxHeight'];
|
|
212
|
-
overflowY: CSSObject['overflowY'];
|
|
213
|
-
overflow: CSSObject['overflow'];
|
|
214
|
-
position: CSSObject['position'];
|
|
215
|
-
};
|
|
216
104
|
month: {
|
|
217
105
|
header: {
|
|
218
106
|
fontSize: CSSObject['fontSize'];
|
|
219
107
|
fontWeight: CSSObject['fontWeight'];
|
|
220
108
|
color: CSSObject['color'];
|
|
221
|
-
padding:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
marginBottom: CSSObject['marginBottom'];
|
|
109
|
+
padding: {
|
|
110
|
+
x: CSSObject['padding'];
|
|
111
|
+
y: CSSObject['padding'];
|
|
112
|
+
};
|
|
113
|
+
gap: CSSObject['gap'];
|
|
227
114
|
};
|
|
228
115
|
};
|
|
229
116
|
week: {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
117
|
+
gap: CSSObject['gap'];
|
|
118
|
+
fontSize: CSSObject['fontSize'];
|
|
119
|
+
fontWeight: CSSObject['fontWeight'];
|
|
120
|
+
boxShadow: CSSObject['boxShadow'];
|
|
121
|
+
color: CSSObject['color'];
|
|
122
|
+
padding: {
|
|
123
|
+
x: CSSObject['padding'];
|
|
124
|
+
y: CSSObject['padding'];
|
|
235
125
|
};
|
|
236
|
-
|
|
237
|
-
display: CSSObject['display'];
|
|
238
|
-
flexDirection: CSSObject['flexDirection'];
|
|
126
|
+
row: {
|
|
239
127
|
gap: CSSObject['gap'];
|
|
240
128
|
};
|
|
241
|
-
header: {
|
|
242
|
-
display: CSSObject['display'];
|
|
243
|
-
gridTemplateColumns: CSSObject['gridTemplateColumns'];
|
|
244
|
-
textAlign: CSSObject['textAlign'];
|
|
245
|
-
color: CSSObject['color'];
|
|
246
|
-
padding: CSSObject['padding'];
|
|
247
|
-
position: CSSObject['position'];
|
|
248
|
-
top: CSSObject['top'];
|
|
249
|
-
zIndex: CSSObject['zIndex'];
|
|
250
|
-
backgroundColor: CSSObject['backgroundColor'];
|
|
251
|
-
boxShadow: CSSObject['boxShadow'];
|
|
252
|
-
};
|
|
253
|
-
dayName: {
|
|
254
|
-
padding: CSSObject['padding'];
|
|
255
|
-
fontSize: CSSObject['fontSize'];
|
|
256
|
-
fontWeight: CSSObject['fontWeight'];
|
|
257
|
-
color: CSSObject['color'];
|
|
258
|
-
};
|
|
259
129
|
};
|
|
260
130
|
day: {
|
|
261
131
|
cell: {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
132
|
+
padding: {
|
|
133
|
+
x: CSSObject['padding'];
|
|
134
|
+
y: CSSObject['padding'];
|
|
135
|
+
};
|
|
266
136
|
fontWeight: CSSObject['fontWeight'];
|
|
267
|
-
boxSizing: CSSObject['boxSizing'];
|
|
268
|
-
outline: CSSObject['outline'];
|
|
269
137
|
fontSize: CSSObject['fontSize'];
|
|
270
138
|
lineHeight: CSSObject['lineHeight'];
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
width: CSSObject['width'];
|
|
275
|
-
height: CSSObject['height'];
|
|
276
|
-
};
|
|
277
|
-
hover: {
|
|
278
|
-
outline: CSSObject['outline'];
|
|
139
|
+
outline: {
|
|
140
|
+
[key in CalendarState]: CSSObject['outline'];
|
|
141
|
+
};
|
|
279
142
|
borderRadius: CSSObject['borderRadius'];
|
|
280
143
|
};
|
|
281
|
-
empty: {
|
|
282
|
-
padding: CSSObject['padding'];
|
|
283
|
-
};
|
|
284
144
|
states: {
|
|
285
|
-
startDate:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
145
|
+
startDate: {
|
|
146
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
147
|
+
borderRadius: {
|
|
148
|
+
topLeft: CSSObject['borderTopLeftRadius'];
|
|
149
|
+
bottomLeft: CSSObject['borderBottomLeftRadius'];
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
endDate: {
|
|
153
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
154
|
+
borderRadius: {
|
|
155
|
+
topRight: CSSObject['borderTopRightRadius'];
|
|
156
|
+
bottomRight: CSSObject['borderBottomRightRadius'];
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
singleDate: {
|
|
160
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
161
|
+
borderRadius: CSSObject['borderRadius'];
|
|
162
|
+
};
|
|
163
|
+
rangeDay: {
|
|
164
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
165
|
+
};
|
|
166
|
+
todayDay: {
|
|
167
|
+
fontWeight: CSSObject['fontWeight'];
|
|
168
|
+
};
|
|
169
|
+
hoverState: {
|
|
170
|
+
boxShadow: CSSObject['boxShadow'];
|
|
171
|
+
borderRadius: CSSObject['borderRadius'];
|
|
172
|
+
};
|
|
173
|
+
disabledDay: {
|
|
174
|
+
opacity: CSSObject['opacity'];
|
|
175
|
+
cursor: CSSObject['cursor'];
|
|
176
|
+
pointerEvents: CSSObject['pointerEvents'];
|
|
177
|
+
};
|
|
292
178
|
};
|
|
293
179
|
text: {
|
|
294
|
-
dayNumber:
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
180
|
+
dayNumber: {
|
|
181
|
+
color: CSSObject['color'];
|
|
182
|
+
};
|
|
183
|
+
selectedDay: {
|
|
184
|
+
color: CSSObject['color'];
|
|
185
|
+
};
|
|
186
|
+
rangeDay: {
|
|
187
|
+
color: CSSObject['color'];
|
|
188
|
+
};
|
|
189
|
+
todayDay: {
|
|
190
|
+
color: CSSObject['color'];
|
|
191
|
+
};
|
|
298
192
|
};
|
|
299
193
|
todayIndicator: {
|
|
300
|
-
position: CSSObject['position'];
|
|
301
194
|
width: CSSObject['width'];
|
|
302
|
-
height: CSSObject['height'];
|
|
303
195
|
backgroundColor: CSSObject['backgroundColor'];
|
|
304
|
-
borderRadius: CSSObject['borderRadius'];
|
|
305
|
-
bottom: CSSObject['bottom'];
|
|
306
|
-
left: CSSObject['left'];
|
|
307
|
-
transform: CSSObject['transform'];
|
|
308
196
|
};
|
|
309
197
|
};
|
|
310
198
|
};
|
|
311
199
|
footer: {
|
|
312
|
-
padding:
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
gap: CSSObject['gap'];
|
|
316
|
-
color: CSSObject['color'];
|
|
317
|
-
fontWeight: CSSObject['fontWeight'];
|
|
318
|
-
fontSize: CSSObject['fontSize'];
|
|
319
|
-
};
|
|
320
|
-
button: {
|
|
321
|
-
gap: CSSObject['gap'];
|
|
200
|
+
padding: {
|
|
201
|
+
x: CSSObject['padding'];
|
|
202
|
+
y: CSSObject['padding'];
|
|
322
203
|
};
|
|
204
|
+
borderTop: CSSObject['borderTop'];
|
|
205
|
+
gap: CSSObject['gap'];
|
|
323
206
|
};
|
|
324
207
|
};
|
|
325
208
|
};
|
|
@@ -595,7 +595,7 @@ export declare class AppleCalendarHapticManager {
|
|
|
595
595
|
reset(): void;
|
|
596
596
|
destroy(): void;
|
|
597
597
|
}
|
|
598
|
-
export declare const
|
|
598
|
+
export declare const MOBILE_CALENDAR_CONSTANTS: {
|
|
599
599
|
readonly SNAP_DURATION: 300;
|
|
600
600
|
readonly MOMENTUM_THRESHOLD: 0.03;
|
|
601
601
|
readonly DECELERATION_RATE: 0.95;
|
|
@@ -747,6 +747,14 @@ export declare const matchesYesterdayPreset: (range: DateRange) => boolean;
|
|
|
747
747
|
* Checks if a date range matches "Tomorrow" preset
|
|
748
748
|
*/
|
|
749
749
|
export declare const matchesTomorrowPreset: (range: DateRange) => boolean;
|
|
750
|
+
/**
|
|
751
|
+
* Checks if a date range matches "This Month" preset
|
|
752
|
+
*/
|
|
753
|
+
export declare const matchesThisMonthPreset: (range: DateRange) => boolean;
|
|
754
|
+
/**
|
|
755
|
+
* Checks if a date range matches "Last Month" preset
|
|
756
|
+
*/
|
|
757
|
+
export declare const matchesLastMonthPreset: (range: DateRange) => boolean;
|
|
750
758
|
/**
|
|
751
759
|
* Robust preset detection that works with both UTC and local timezone dates
|
|
752
760
|
*/
|
|
@@ -1,60 +1,59 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
+
export type DrawerDirection = 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
/**
|
|
6
|
+
* Drawer Tokens following the pattern: [target].CSSProp.[variant].[state]
|
|
7
|
+
*
|
|
8
|
+
* Structure:
|
|
9
|
+
* - target: overlay | content | handle | header | body | footer | mobileOffset (defines what element the token applies to)
|
|
10
|
+
* - CSSProp: backgroundColor | borderRadius | boxShadow | zIndex | border | padding | fontSize | fontWeight | color | gap | etc.
|
|
11
|
+
* - variant: top | bottom | left | right (drawer direction)
|
|
12
|
+
* - state: default (interaction state)
|
|
13
|
+
*
|
|
14
|
+
* Pattern examples:
|
|
15
|
+
* - overlay.backgroundColor.[state]
|
|
16
|
+
* - overlay.zIndex (no variant dependency)
|
|
17
|
+
* - content.backgroundColor.[variant].[state]
|
|
18
|
+
* - content.borderRadius.[variant]
|
|
19
|
+
* - handle.backgroundColor.[variant].[state]
|
|
20
|
+
* - header.padding.[variant]
|
|
21
|
+
* - header.text.title.fontSize (no variant dependency)
|
|
22
|
+
* - body.padding.[variant]
|
|
23
|
+
* - footer.gap.[variant]
|
|
24
|
+
* - mobileOffset.top.[variant]
|
|
25
|
+
*/
|
|
3
26
|
export type DrawerTokensType = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
27
|
+
borderRadius: {
|
|
28
|
+
topLeft: CSSObject['borderTopLeftRadius'];
|
|
29
|
+
topRight: CSSObject['borderTopRightRadius'];
|
|
30
|
+
bottomLeft: CSSObject['borderBottomLeftRadius'];
|
|
31
|
+
bottomRight: CSSObject['borderBottomRightRadius'];
|
|
7
32
|
};
|
|
8
|
-
|
|
33
|
+
overlay: {
|
|
9
34
|
backgroundColor: CSSObject['backgroundColor'];
|
|
10
|
-
borderRadius: CSSObject['borderRadius'];
|
|
11
|
-
boxShadow: CSSObject['boxShadow'];
|
|
12
|
-
zIndex: CSSObject['zIndex'];
|
|
13
|
-
border: CSSObject['border'];
|
|
14
35
|
};
|
|
15
|
-
|
|
36
|
+
offset: {
|
|
16
37
|
top: CSSObject['top'];
|
|
17
38
|
bottom: CSSObject['bottom'];
|
|
18
39
|
left: CSSObject['left'];
|
|
19
40
|
right: CSSObject['right'];
|
|
20
41
|
};
|
|
21
|
-
|
|
22
|
-
backgroundColor: CSSObject['backgroundColor'];
|
|
23
|
-
borderRadius: CSSObject['borderRadius'];
|
|
24
|
-
width: CSSObject['width'];
|
|
25
|
-
height: CSSObject['height'];
|
|
26
|
-
};
|
|
27
|
-
header: {
|
|
28
|
-
padding: CSSObject['padding'];
|
|
29
|
-
borderBottom: CSSObject['borderBottom'];
|
|
42
|
+
content: {
|
|
30
43
|
backgroundColor: CSSObject['backgroundColor'];
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
fontWeight: CSSObject['fontWeight'];
|
|
35
|
-
lineHeight: CSSObject['lineHeight'];
|
|
44
|
+
padding: {
|
|
45
|
+
x: CSSObject['padding'];
|
|
46
|
+
y: CSSObject['padding'];
|
|
36
47
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
48
|
+
handle: {
|
|
49
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
50
|
+
borderRadius: CSSObject['borderRadius'];
|
|
51
|
+
width: CSSObject['width'];
|
|
52
|
+
height: CSSObject['height'];
|
|
41
53
|
};
|
|
42
54
|
};
|
|
43
|
-
body: {
|
|
44
|
-
padding: CSSObject['padding'];
|
|
45
|
-
backgroundColor: CSSObject['backgroundColor'];
|
|
46
|
-
overflowY: CSSObject['overflowY'];
|
|
47
|
-
borderRadius: CSSObject['borderRadius'];
|
|
48
|
-
};
|
|
49
|
-
footer: {
|
|
50
|
-
padding: CSSObject['padding'];
|
|
51
|
-
borderTop: CSSObject['borderTop'];
|
|
52
|
-
backgroundColor: CSSObject['backgroundColor'];
|
|
53
|
-
gap: CSSObject['gap'];
|
|
54
|
-
alignItems: CSSObject['alignItems'];
|
|
55
|
-
justifyContent: CSSObject['justifyContent'];
|
|
56
|
-
};
|
|
57
55
|
};
|
|
58
|
-
export
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
export type ResponsiveDrawerTokens = {
|
|
57
|
+
[key in keyof BreakpointType]: DrawerTokensType;
|
|
58
|
+
};
|
|
59
|
+
export declare const getDrawerComponentTokens: (foundationToken: FoundationTokenType) => ResponsiveDrawerTokens;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonProps } from '../Button/types';
|
|
3
3
|
export type DrawerDirection = 'top' | 'bottom' | 'left' | 'right';
|
|
4
4
|
export type DrawerProps = {
|
|
5
5
|
/**
|
|
@@ -192,11 +192,11 @@ export type StatusDrawerProps = {
|
|
|
192
192
|
/**
|
|
193
193
|
* Primary action button props (e.g., Delete, OK, Confirm)
|
|
194
194
|
*/
|
|
195
|
-
primaryButtonProps:
|
|
195
|
+
primaryButtonProps: ButtonProps;
|
|
196
196
|
/**
|
|
197
197
|
* Secondary action button props (e.g., Cancel) - optional
|
|
198
198
|
*/
|
|
199
|
-
secondaryButtonProps?:
|
|
199
|
+
secondaryButtonProps?: ButtonProps;
|
|
200
200
|
/**
|
|
201
201
|
* 56x56px slot for any React element (icon, image, etc.)
|
|
202
202
|
*/
|