dhre-ui-kit 2.0.23 → 3.0.1
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/lib/components/accordion/Accordion.styles.d.ts +0 -1
- package/lib/components/avatar/Avatar.d.ts +4 -0
- package/lib/components/avatar/Avatar.interface.d.ts +97 -0
- package/lib/components/avatar/Avatar.styles.d.ts +342 -0
- package/lib/components/avatar/index.d.ts +2 -0
- package/lib/components/background/Background.d.ts +4 -0
- package/lib/components/background/Background.interface.d.ts +16 -0
- package/lib/components/background/Background.styles.d.ts +10 -0
- package/lib/components/background/index.d.ts +2 -0
- package/lib/components/bottomDrawer/BottomDrawer.d.ts +2 -2
- package/lib/components/bottomDrawer/BottomDrawer.styles.d.ts +7 -1
- package/lib/components/button/Button.interface.d.ts +54 -2
- package/lib/components/button/Button.styles.d.ts +123 -0
- package/lib/components/checkBox/CheckBox.d.ts +2 -2
- package/lib/components/checkBox/CheckBox.interface.d.ts +35 -0
- package/lib/components/checkBox/CheckBox.styles.d.ts +4 -22
- package/lib/components/chip/Chip.d.ts +4 -0
- package/lib/components/chip/Chip.interface.d.ts +52 -0
- package/lib/components/chip/Chip.styles.d.ts +42 -0
- package/lib/components/chip/index.d.ts +2 -0
- package/lib/components/customDocumentPicker/CustomDocumentPicker.d.ts +0 -4
- package/lib/components/customDocumentPicker/CustomDocumentPicker.interface.d.ts +0 -16
- package/lib/components/customDocumentPicker/index.d.ts +0 -1
- package/lib/components/customHeader/CustomHeader.interface.d.ts +37 -6
- package/lib/components/customHeader/CustomHeader.styles.d.ts +10 -7
- package/lib/components/customIcon/CustomIcon.d.ts +2 -2
- package/lib/components/customIcon/CustomIcon.interface.d.ts +32 -2
- package/lib/components/customIcon/CustomIcon.styles.d.ts +76 -1
- package/lib/components/customInputText/CustomInputText.styles.d.ts +22 -53
- package/lib/components/customSearchBar/CustomSearchBar.d.ts +2 -2
- package/lib/components/customSearchBar/CustomSearchBar.interface.d.ts +1 -0
- package/lib/components/customSearchBar/CustomSearchBar.styles.d.ts +38 -59
- package/lib/components/dateRangePicker/DateRangePicker.styles.d.ts +26 -157
- package/lib/components/dropDown/DropDown.d.ts +7 -2
- package/lib/components/feedback/feedback.d.ts +1 -0
- package/lib/components/feedback/feedback.style.d.ts +20 -22
- package/lib/components/loader/Loader.d.ts +21 -0
- package/lib/components/loader/Loader.interface.d.ts +53 -0
- package/lib/components/loader/Loader.styles.d.ts +45 -0
- package/lib/components/loader/index.d.ts +2 -0
- package/lib/components/notificationBandge/NotificationBandge.styles.d.ts +22 -53
- package/lib/components/otp/otp.interface.d.ts +2 -0
- package/lib/components/otp/styles.d.ts +7 -4
- package/lib/components/progressBar/ProgressBar.d.ts +3 -23
- package/lib/components/progressBar/ProgressBar.interface.d.ts +94 -0
- package/lib/components/progressBar/ProgressBar.styles.d.ts +16 -0
- package/lib/components/property-details/property-details.interface.d.ts +1 -0
- package/lib/components/property-details/styles.d.ts +17 -10
- package/lib/components/scrollList/CategoryItem.d.ts +11 -0
- package/lib/components/scrollList/category.d.ts +2 -60
- package/lib/components/scrollList/category.interface.d.ts +46 -0
- package/lib/components/scrollList/category.styles.d.ts +67 -0
- package/lib/components/singleSelectionTag/TagSingleSelection.d.ts +2 -47
- package/lib/components/singleSelectionTag/TagSingleSelection.interface.d.ts +13 -0
- package/lib/components/singleSelectionTag/TagSingleSelection.styles.d.ts +33 -0
- package/lib/components/tabs/Tabs.styles.d.ts +1 -1
- package/lib/components/textInput/Textinput.d.ts +5 -7
- package/lib/components/toast/Toast.d.ts +2 -2
- package/lib/components/toast/Toast.styles.d.ts +19 -15
- package/lib/index.d.ts +13 -1
- package/lib/index.js +8644 -6494
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +8510 -6386
- package/lib/index.mjs.map +1 -1
- package/lib/theme/borderRadius.d.ts +34 -0
- package/lib/theme/colors.d.ts +82 -0
- package/lib/theme/fonts.d.ts +6 -6
- package/lib/theme/padding.d.ts +32 -0
- package/lib/theme/sizing.d.ts +53 -0
- package/lib/theme/spacing.d.ts +50 -0
- package/lib/theme/stroke.d.ts +15 -0
- package/lib/theme/themes.d.ts +180 -0
- package/lib/utils/appEnum.d.ts +78 -9
- package/package.json +9 -6
- package/src/assets/fonts/Inter-Bold.ttf +0 -0
- package/src/assets/fonts/Inter-Light.ttf +0 -0
- package/src/assets/fonts/Inter-Medium.ttf +0 -0
- package/src/assets/fonts/Meraas Aktiv Bold.ttf +0 -0
- package/src/assets/fonts/Meraas Aktiv Light.ttf +0 -0
- package/src/assets/fonts/Meraas Aktiv Regular.ttf +0 -0
- package/src/assets/fonts/Nakheel-HeadlineBold.otf +0 -0
- package/src/assets/fonts/Nakheel-HeadlineRegular.otf +0 -0
- package/src/assets/fonts/Nakheel-TextBold.otf +0 -0
- package/src/assets/fonts/Nakheel-TextRegular.otf +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { ImageSourcePropType, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import { FontStyle } from '../../utils/appEnum';
|
|
3
|
+
export declare enum AvatarSize {
|
|
4
|
+
SMALL = "small",
|
|
5
|
+
MEDIUM = "medium",
|
|
6
|
+
LARGE = "large"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Progress-related props that must be provided together
|
|
10
|
+
*/
|
|
11
|
+
export interface ProgressProps {
|
|
12
|
+
/** Progress percentage (0-100) for progress ring */
|
|
13
|
+
progress: number;
|
|
14
|
+
/** Function to update progress value */
|
|
15
|
+
setProgress: React.Dispatch<React.SetStateAction<number>>;
|
|
16
|
+
/** Whether to show percentage text */
|
|
17
|
+
percentage: number;
|
|
18
|
+
/** Whether avatar is in editable mode */
|
|
19
|
+
editable: boolean;
|
|
20
|
+
/** Custom progress circle color */
|
|
21
|
+
progressColor?: string;
|
|
22
|
+
cameraIcon: React.ReactElement;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Base props that are always available
|
|
26
|
+
*/
|
|
27
|
+
interface BaseAvatarProps {
|
|
28
|
+
/** Size variant of the avatar */
|
|
29
|
+
size?: AvatarSize;
|
|
30
|
+
/** Press handler for the avatar */
|
|
31
|
+
onPress?: () => void;
|
|
32
|
+
/** Custom background color */
|
|
33
|
+
backgroundColor?: string;
|
|
34
|
+
/** Custom text color for initials */
|
|
35
|
+
textColor?: string;
|
|
36
|
+
/** Custom border color */
|
|
37
|
+
borderColor?: string;
|
|
38
|
+
/** Additional container styles */
|
|
39
|
+
containerStyle?: ViewStyle;
|
|
40
|
+
/** Custom text styles for initials */
|
|
41
|
+
textStyle?: TextStyle;
|
|
42
|
+
/** Test ID for testing */
|
|
43
|
+
testId?: string;
|
|
44
|
+
/** Accessibility label */
|
|
45
|
+
accessibilityLabel?: string;
|
|
46
|
+
/** Font variant for initials text */
|
|
47
|
+
textVariant?: FontStyle;
|
|
48
|
+
/**
|
|
49
|
+
* Fallback icon rendered when neither `source` nor `name` is provided.
|
|
50
|
+
* Render priority: image → initials → placeholderIcon → empty circle.
|
|
51
|
+
* Pass a pre-sized React element; the component will render it as-is inside
|
|
52
|
+
* the avatar circle (e.g. a user silhouette SVG or icon component).
|
|
53
|
+
*/
|
|
54
|
+
placeholderIcon?: React.ReactElement;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Avatar with image source - source is mandatory, name is optional
|
|
58
|
+
*/
|
|
59
|
+
type AvatarWithSource = BaseAvatarProps & {
|
|
60
|
+
source: ImageSourcePropType;
|
|
61
|
+
name?: string;
|
|
62
|
+
} & ({
|
|
63
|
+
progressProps?: never;
|
|
64
|
+
} | {
|
|
65
|
+
progressProps: ProgressProps;
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* Avatar with name - name is mandatory, source is optional
|
|
69
|
+
*/
|
|
70
|
+
type AvatarWithName = BaseAvatarProps & {
|
|
71
|
+
source?: ImageSourcePropType;
|
|
72
|
+
name: string;
|
|
73
|
+
} & ({
|
|
74
|
+
progressProps?: never;
|
|
75
|
+
} | {
|
|
76
|
+
progressProps: ProgressProps;
|
|
77
|
+
});
|
|
78
|
+
/**
|
|
79
|
+
* Avatar with a placeholder icon — neither source nor name is required.
|
|
80
|
+
* Use when you want to display a generic icon (e.g. user silhouette) as the
|
|
81
|
+
* avatar content. Pass the icon via the `placeholderIcon` base prop.
|
|
82
|
+
*/
|
|
83
|
+
type AvatarWithPlaceholder = BaseAvatarProps & {
|
|
84
|
+
source?: never;
|
|
85
|
+
name?: never;
|
|
86
|
+
} & ({
|
|
87
|
+
progressProps?: never;
|
|
88
|
+
} | {
|
|
89
|
+
progressProps: ProgressProps;
|
|
90
|
+
});
|
|
91
|
+
/**
|
|
92
|
+
* Avatar props with enforced constraints:
|
|
93
|
+
* - Either `source`, `name`, or `placeholderIcon` (via AvatarWithPlaceholder) must be used
|
|
94
|
+
* - Progress-related props must be provided together via the `progressProps` object
|
|
95
|
+
*/
|
|
96
|
+
export type AvatarProps = AvatarWithSource | AvatarWithName | AvatarWithPlaceholder;
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
declare const AVATAR_SPEC: {
|
|
2
|
+
large: {
|
|
3
|
+
container: number;
|
|
4
|
+
fontSize: number;
|
|
5
|
+
lineHeight: number;
|
|
6
|
+
fontWeight: "500";
|
|
7
|
+
camera: number;
|
|
8
|
+
cameraIconSize: number;
|
|
9
|
+
cameraTop: number;
|
|
10
|
+
cameraRight: number;
|
|
11
|
+
cameraBorderWidth: number;
|
|
12
|
+
ringThickness: number;
|
|
13
|
+
ringInset: number;
|
|
14
|
+
};
|
|
15
|
+
medium: {
|
|
16
|
+
container: number;
|
|
17
|
+
fontSize: number;
|
|
18
|
+
lineHeight: number;
|
|
19
|
+
fontWeight: "500";
|
|
20
|
+
camera: number;
|
|
21
|
+
cameraIconSize: number;
|
|
22
|
+
cameraTop: number;
|
|
23
|
+
cameraRight: number;
|
|
24
|
+
cameraBorderWidth: number;
|
|
25
|
+
ringThickness: number;
|
|
26
|
+
ringInset: number;
|
|
27
|
+
};
|
|
28
|
+
small: {
|
|
29
|
+
container: number;
|
|
30
|
+
fontSize: number;
|
|
31
|
+
lineHeight: number;
|
|
32
|
+
fontWeight: "500";
|
|
33
|
+
camera: number;
|
|
34
|
+
cameraIconSize: number;
|
|
35
|
+
cameraTop: number;
|
|
36
|
+
cameraRight: number;
|
|
37
|
+
cameraBorderWidth: number;
|
|
38
|
+
ringThickness: number;
|
|
39
|
+
ringInset: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export declare const smallStyles: (theme: any) => {
|
|
43
|
+
container: {
|
|
44
|
+
alignItems: "center";
|
|
45
|
+
justifyContent: "center";
|
|
46
|
+
};
|
|
47
|
+
pressableContainer: {
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
justifyContent: "center";
|
|
51
|
+
alignItems: "center";
|
|
52
|
+
position: "relative";
|
|
53
|
+
};
|
|
54
|
+
progressContainer: {
|
|
55
|
+
position: "absolute";
|
|
56
|
+
top: number;
|
|
57
|
+
left: number;
|
|
58
|
+
right: number;
|
|
59
|
+
bottom: number;
|
|
60
|
+
justifyContent: "center";
|
|
61
|
+
alignItems: "center";
|
|
62
|
+
};
|
|
63
|
+
avatarContainer: {
|
|
64
|
+
borderRadius: number;
|
|
65
|
+
backgroundColor: any;
|
|
66
|
+
justifyContent: "center";
|
|
67
|
+
alignItems: "center";
|
|
68
|
+
overflow: "hidden";
|
|
69
|
+
};
|
|
70
|
+
initialsText: {
|
|
71
|
+
fontSize: number;
|
|
72
|
+
lineHeight: number;
|
|
73
|
+
fontWeight: "500";
|
|
74
|
+
textTransform: "uppercase";
|
|
75
|
+
alignSelf: "center";
|
|
76
|
+
color: any;
|
|
77
|
+
};
|
|
78
|
+
cameraOverlay: {
|
|
79
|
+
position: "absolute";
|
|
80
|
+
top: number;
|
|
81
|
+
right: number;
|
|
82
|
+
width: number;
|
|
83
|
+
height: number;
|
|
84
|
+
borderRadius: number;
|
|
85
|
+
backgroundColor: any;
|
|
86
|
+
justifyContent: "center";
|
|
87
|
+
alignItems: "center";
|
|
88
|
+
borderWidth: number;
|
|
89
|
+
borderColor: any;
|
|
90
|
+
shadowColor: string;
|
|
91
|
+
shadowOffset: {
|
|
92
|
+
width: number;
|
|
93
|
+
height: number;
|
|
94
|
+
};
|
|
95
|
+
shadowOpacity: number;
|
|
96
|
+
shadowRadius: number;
|
|
97
|
+
elevation: number;
|
|
98
|
+
};
|
|
99
|
+
percentagePill: {
|
|
100
|
+
height: number;
|
|
101
|
+
minWidth: number;
|
|
102
|
+
paddingHorizontal: number;
|
|
103
|
+
borderRadius: number;
|
|
104
|
+
borderWidth: number;
|
|
105
|
+
borderColor: any;
|
|
106
|
+
backgroundColor: any;
|
|
107
|
+
justifyContent: "center";
|
|
108
|
+
alignItems: "center";
|
|
109
|
+
};
|
|
110
|
+
percentagePillText: {
|
|
111
|
+
fontSize: number;
|
|
112
|
+
fontWeight: "300";
|
|
113
|
+
lineHeight: number;
|
|
114
|
+
color: any;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
export declare const mediumStyles: (theme: any) => {
|
|
118
|
+
container: {
|
|
119
|
+
alignItems: "center";
|
|
120
|
+
justifyContent: "center";
|
|
121
|
+
};
|
|
122
|
+
pressableContainer: {
|
|
123
|
+
width: number;
|
|
124
|
+
height: number;
|
|
125
|
+
justifyContent: "center";
|
|
126
|
+
alignItems: "center";
|
|
127
|
+
position: "relative";
|
|
128
|
+
};
|
|
129
|
+
progressContainer: {
|
|
130
|
+
position: "absolute";
|
|
131
|
+
top: number;
|
|
132
|
+
left: number;
|
|
133
|
+
right: number;
|
|
134
|
+
bottom: number;
|
|
135
|
+
justifyContent: "center";
|
|
136
|
+
alignItems: "center";
|
|
137
|
+
};
|
|
138
|
+
avatarContainer: {
|
|
139
|
+
borderRadius: number;
|
|
140
|
+
backgroundColor: any;
|
|
141
|
+
justifyContent: "center";
|
|
142
|
+
alignItems: "center";
|
|
143
|
+
overflow: "hidden";
|
|
144
|
+
};
|
|
145
|
+
initialsText: {
|
|
146
|
+
fontSize: number;
|
|
147
|
+
lineHeight: number;
|
|
148
|
+
fontWeight: "500";
|
|
149
|
+
textTransform: "uppercase";
|
|
150
|
+
alignSelf: "center";
|
|
151
|
+
color: any;
|
|
152
|
+
};
|
|
153
|
+
cameraOverlay: {
|
|
154
|
+
position: "absolute";
|
|
155
|
+
top: number;
|
|
156
|
+
right: number;
|
|
157
|
+
width: number;
|
|
158
|
+
height: number;
|
|
159
|
+
borderRadius: number;
|
|
160
|
+
backgroundColor: any;
|
|
161
|
+
justifyContent: "center";
|
|
162
|
+
alignItems: "center";
|
|
163
|
+
borderWidth: number;
|
|
164
|
+
borderColor: any;
|
|
165
|
+
shadowColor: string;
|
|
166
|
+
shadowOffset: {
|
|
167
|
+
width: number;
|
|
168
|
+
height: number;
|
|
169
|
+
};
|
|
170
|
+
shadowOpacity: number;
|
|
171
|
+
shadowRadius: number;
|
|
172
|
+
elevation: number;
|
|
173
|
+
};
|
|
174
|
+
percentagePill: {
|
|
175
|
+
height: number;
|
|
176
|
+
minWidth: number;
|
|
177
|
+
paddingHorizontal: number;
|
|
178
|
+
borderRadius: number;
|
|
179
|
+
borderWidth: number;
|
|
180
|
+
borderColor: any;
|
|
181
|
+
backgroundColor: any;
|
|
182
|
+
justifyContent: "center";
|
|
183
|
+
alignItems: "center";
|
|
184
|
+
};
|
|
185
|
+
percentagePillText: {
|
|
186
|
+
fontSize: number;
|
|
187
|
+
fontWeight: "300";
|
|
188
|
+
lineHeight: number;
|
|
189
|
+
color: any;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
export declare const largeStyles: (theme: any) => {
|
|
193
|
+
container: {
|
|
194
|
+
alignItems: "center";
|
|
195
|
+
justifyContent: "center";
|
|
196
|
+
};
|
|
197
|
+
pressableContainer: {
|
|
198
|
+
width: number;
|
|
199
|
+
height: number;
|
|
200
|
+
justifyContent: "center";
|
|
201
|
+
alignItems: "center";
|
|
202
|
+
position: "relative";
|
|
203
|
+
};
|
|
204
|
+
progressContainer: {
|
|
205
|
+
position: "absolute";
|
|
206
|
+
top: number;
|
|
207
|
+
left: number;
|
|
208
|
+
right: number;
|
|
209
|
+
bottom: number;
|
|
210
|
+
justifyContent: "center";
|
|
211
|
+
alignItems: "center";
|
|
212
|
+
};
|
|
213
|
+
avatarContainer: {
|
|
214
|
+
borderRadius: number;
|
|
215
|
+
backgroundColor: any;
|
|
216
|
+
justifyContent: "center";
|
|
217
|
+
alignItems: "center";
|
|
218
|
+
overflow: "hidden";
|
|
219
|
+
};
|
|
220
|
+
initialsText: {
|
|
221
|
+
fontSize: number;
|
|
222
|
+
lineHeight: number;
|
|
223
|
+
fontWeight: "500";
|
|
224
|
+
textTransform: "uppercase";
|
|
225
|
+
alignSelf: "center";
|
|
226
|
+
color: any;
|
|
227
|
+
};
|
|
228
|
+
cameraOverlay: {
|
|
229
|
+
position: "absolute";
|
|
230
|
+
top: number;
|
|
231
|
+
right: number;
|
|
232
|
+
width: number;
|
|
233
|
+
height: number;
|
|
234
|
+
borderRadius: number;
|
|
235
|
+
backgroundColor: any;
|
|
236
|
+
justifyContent: "center";
|
|
237
|
+
alignItems: "center";
|
|
238
|
+
borderWidth: number;
|
|
239
|
+
borderColor: any;
|
|
240
|
+
shadowColor: string;
|
|
241
|
+
shadowOffset: {
|
|
242
|
+
width: number;
|
|
243
|
+
height: number;
|
|
244
|
+
};
|
|
245
|
+
shadowOpacity: number;
|
|
246
|
+
shadowRadius: number;
|
|
247
|
+
elevation: number;
|
|
248
|
+
};
|
|
249
|
+
percentagePill: {
|
|
250
|
+
height: number;
|
|
251
|
+
minWidth: number;
|
|
252
|
+
paddingHorizontal: number;
|
|
253
|
+
borderRadius: number;
|
|
254
|
+
borderWidth: number;
|
|
255
|
+
borderColor: any;
|
|
256
|
+
backgroundColor: any;
|
|
257
|
+
justifyContent: "center";
|
|
258
|
+
alignItems: "center";
|
|
259
|
+
};
|
|
260
|
+
percentagePillText: {
|
|
261
|
+
fontSize: number;
|
|
262
|
+
fontWeight: "300";
|
|
263
|
+
lineHeight: number;
|
|
264
|
+
color: any;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
export declare const getStylesBySize: (size: keyof typeof AVATAR_SPEC, theme: any) => {
|
|
268
|
+
container: {
|
|
269
|
+
alignItems: "center";
|
|
270
|
+
justifyContent: "center";
|
|
271
|
+
};
|
|
272
|
+
pressableContainer: {
|
|
273
|
+
width: number;
|
|
274
|
+
height: number;
|
|
275
|
+
justifyContent: "center";
|
|
276
|
+
alignItems: "center";
|
|
277
|
+
position: "relative";
|
|
278
|
+
};
|
|
279
|
+
progressContainer: {
|
|
280
|
+
position: "absolute";
|
|
281
|
+
top: number;
|
|
282
|
+
left: number;
|
|
283
|
+
right: number;
|
|
284
|
+
bottom: number;
|
|
285
|
+
justifyContent: "center";
|
|
286
|
+
alignItems: "center";
|
|
287
|
+
};
|
|
288
|
+
avatarContainer: {
|
|
289
|
+
borderRadius: number;
|
|
290
|
+
backgroundColor: any;
|
|
291
|
+
justifyContent: "center";
|
|
292
|
+
alignItems: "center";
|
|
293
|
+
overflow: "hidden";
|
|
294
|
+
};
|
|
295
|
+
initialsText: {
|
|
296
|
+
fontSize: number;
|
|
297
|
+
lineHeight: number;
|
|
298
|
+
fontWeight: "500";
|
|
299
|
+
textTransform: "uppercase";
|
|
300
|
+
alignSelf: "center";
|
|
301
|
+
color: any;
|
|
302
|
+
};
|
|
303
|
+
cameraOverlay: {
|
|
304
|
+
position: "absolute";
|
|
305
|
+
top: number;
|
|
306
|
+
right: number;
|
|
307
|
+
width: number;
|
|
308
|
+
height: number;
|
|
309
|
+
borderRadius: number;
|
|
310
|
+
backgroundColor: any;
|
|
311
|
+
justifyContent: "center";
|
|
312
|
+
alignItems: "center";
|
|
313
|
+
borderWidth: number;
|
|
314
|
+
borderColor: any;
|
|
315
|
+
shadowColor: string;
|
|
316
|
+
shadowOffset: {
|
|
317
|
+
width: number;
|
|
318
|
+
height: number;
|
|
319
|
+
};
|
|
320
|
+
shadowOpacity: number;
|
|
321
|
+
shadowRadius: number;
|
|
322
|
+
elevation: number;
|
|
323
|
+
};
|
|
324
|
+
percentagePill: {
|
|
325
|
+
height: number;
|
|
326
|
+
minWidth: number;
|
|
327
|
+
paddingHorizontal: number;
|
|
328
|
+
borderRadius: number;
|
|
329
|
+
borderWidth: number;
|
|
330
|
+
borderColor: any;
|
|
331
|
+
backgroundColor: any;
|
|
332
|
+
justifyContent: "center";
|
|
333
|
+
alignItems: "center";
|
|
334
|
+
};
|
|
335
|
+
percentagePillText: {
|
|
336
|
+
fontSize: number;
|
|
337
|
+
fontWeight: "300";
|
|
338
|
+
lineHeight: number;
|
|
339
|
+
color: any;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
export { AVATAR_SPEC };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export declare enum BackgroundVariant {
|
|
4
|
+
PRIMARY = "primary",
|
|
5
|
+
SECONDARY = "secondary",
|
|
6
|
+
NAKHEEL = "nakheel",
|
|
7
|
+
MERAAS = "meraas",
|
|
8
|
+
DP = "dp"
|
|
9
|
+
}
|
|
10
|
+
export interface BackgroundProps {
|
|
11
|
+
variant?: BackgroundVariant;
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
testID?: string;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BottomDrawerProps } from './BottomDrawer.interface';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const _default: (props: BottomDrawerProps) => React.JSX.Element;
|
|
4
|
+
export default _default;
|
|
@@ -12,9 +12,10 @@ declare const styles: {
|
|
|
12
12
|
};
|
|
13
13
|
modalContainer: {
|
|
14
14
|
flex: number;
|
|
15
|
-
backgroundColor: string;
|
|
16
15
|
paddingTop: number;
|
|
17
16
|
paddingHorizontal: number;
|
|
17
|
+
borderTopLeftRadius: number;
|
|
18
|
+
borderTopRightRadius: number;
|
|
18
19
|
};
|
|
19
20
|
separator: {
|
|
20
21
|
height: number;
|
|
@@ -49,5 +50,10 @@ declare const styles: {
|
|
|
49
50
|
flexDirection: "row";
|
|
50
51
|
alignItems: "center";
|
|
51
52
|
};
|
|
53
|
+
leftSideStyle: {
|
|
54
|
+
flex: number;
|
|
55
|
+
flexDirection: "row";
|
|
56
|
+
alignItems: "center";
|
|
57
|
+
};
|
|
52
58
|
};
|
|
53
59
|
export default styles;
|
|
@@ -2,19 +2,71 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
3
|
import { SvgProps } from 'react-native-svg';
|
|
4
4
|
export interface CustomButtonProps {
|
|
5
|
+
/** Button label text. */
|
|
5
6
|
title: string;
|
|
7
|
+
/** Called when the button is tapped (no-op when disabled or loading). */
|
|
6
8
|
onPress: () => void;
|
|
9
|
+
/** Extra styles applied to the outermost container (LinearGradient or Pressable). */
|
|
7
10
|
containerStyle?: StyleProp<ViewStyle>;
|
|
11
|
+
/** Extra styles merged into the label text. */
|
|
8
12
|
textStyle?: TextStyle;
|
|
13
|
+
/** SVG icon rendered to the left of the label. */
|
|
9
14
|
leftIcon?: ReactElement<SvgProps>;
|
|
15
|
+
/** SVG icon rendered to the right of the label. */
|
|
10
16
|
rightIcon?: ReactElement<SvgProps>;
|
|
11
|
-
|
|
17
|
+
/** Style applied directly to the left icon element. */
|
|
18
|
+
leftIconStyle?: ViewStyle;
|
|
19
|
+
/** Style applied directly to the right icon element. */
|
|
20
|
+
rightIconStyle?: ViewStyle;
|
|
21
|
+
/**
|
|
22
|
+
* Theme key used to resolve the label colour via `useTheme`.
|
|
23
|
+
* When omitted the colour is derived from `variant` and `disabled` state
|
|
24
|
+
* per the DHDS Figma spec.
|
|
25
|
+
*/
|
|
12
26
|
titleColor?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Typography variant key forwarded to `CustomText`.
|
|
29
|
+
* When omitted, defaults to `BODY2_MEDIUM` (Large/Medium) or `BODY2_LIGHT` (Small).
|
|
30
|
+
*/
|
|
13
31
|
titleVariant?: string;
|
|
14
|
-
imagePosition?: 'left' | 'right';
|
|
15
32
|
testID?: string;
|
|
16
33
|
disabled?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Overrides the background colour when `disabled` is true.
|
|
36
|
+
* Accepts any valid React Native color string.
|
|
37
|
+
*/
|
|
17
38
|
disabledColor?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Overrides the label colour when `disabled` is true.
|
|
41
|
+
* Accepts any valid React Native color string.
|
|
42
|
+
*/
|
|
18
43
|
disableButtonTitleColor?: string;
|
|
44
|
+
/** When true, hides the label and shows a spinner instead. */
|
|
19
45
|
isLoading?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Colour of the loading spinner shown when `isLoading` is true.
|
|
48
|
+
* For `primary`, `secondary`, and `link` variants this is automatically
|
|
49
|
+
* derived from the active theme and usually doesn't need to be set.
|
|
50
|
+
* For the `default` variant, set this to match your custom background so
|
|
51
|
+
* the spinner remains visible (e.g. `'#FFFFFF'` on a dark fill).
|
|
52
|
+
* Accepts any valid React Native color string.
|
|
53
|
+
*/
|
|
54
|
+
loaderColor?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Visual style of the button.
|
|
57
|
+
* - `'primary'` – theme-aware fill (white on dark / navy on light) · cyan-to-blue gradient border · contrasting label
|
|
58
|
+
* - `'secondary'` – theme-aware inverted fill · contrasting border · contrasting label
|
|
59
|
+
* - `'link'` – no fill · no border · cyan link-colour label · compact content-height layout (DHDS Buttons/Link Text)
|
|
60
|
+
* - `'default'` – layout only (size-aware padding / height / gap) · no imposed colours · full consumer control via containerStyle / textStyle / titleColor
|
|
61
|
+
* @default 'primary'
|
|
62
|
+
*/
|
|
63
|
+
variant?: 'primary' | 'secondary' | 'link' | 'default';
|
|
64
|
+
/**
|
|
65
|
+
* Controls height and horizontal padding.
|
|
66
|
+
* - `'large'` – 48 dp · 24 dp h-padding · Body 2 Medium (Body 1 Medium for link)
|
|
67
|
+
* - `'medium'` – 40 dp · 24 dp h-padding · Body 2 Medium
|
|
68
|
+
* - `'small'` – 32 dp · 20 dp h-padding · Body 2 Light (Body 3 Medium for link)
|
|
69
|
+
* @default 'large'
|
|
70
|
+
*/
|
|
71
|
+
size?: 'large' | 'medium' | 'small';
|
|
20
72
|
}
|