dhre-ui-kit 2.0.23 → 3.0.0
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 +30 -1
- 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 +22 -53
- 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/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 +8373 -6416
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +8339 -6406
- package/lib/index.mjs.map +1 -1
- package/lib/theme/borderRadius.d.ts +34 -0
- package/lib/theme/colors.d.ts +74 -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 +176 -0
- package/lib/utils/appEnum.d.ts +77 -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,53 @@
|
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
|
+
export interface LoaderProps {
|
|
3
|
+
/**
|
|
4
|
+
* Controls visibility. Component renders null when false.
|
|
5
|
+
* Mirrors the `loading` prop on CustomLoader.
|
|
6
|
+
*/
|
|
7
|
+
loading: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Optional label rendered at the centre of the spinner (e.g. "50%").
|
|
10
|
+
* When omitted the text layer is not rendered.
|
|
11
|
+
*/
|
|
12
|
+
text?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Diameter of the spinner in dp (pre-scale).
|
|
15
|
+
* Will be passed through horizontalScale internally.
|
|
16
|
+
* @default 96
|
|
17
|
+
*/
|
|
18
|
+
size?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Colour applied to both the active arc and the centre label.
|
|
21
|
+
* Defaults to DHRE_WHITE[100] (#FFFFFF).
|
|
22
|
+
*/
|
|
23
|
+
color?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Opacity of the background track circle (0–1).
|
|
26
|
+
* @default 0.2
|
|
27
|
+
*/
|
|
28
|
+
trackOpacity?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Width of the arc stroke in dp (pre-scale).
|
|
31
|
+
* @default 6
|
|
32
|
+
*/
|
|
33
|
+
strokeWidth?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Overrides the outermost full-screen absolute overlay View.
|
|
36
|
+
* Mirrors `customeContainer` on CustomLoader.
|
|
37
|
+
*/
|
|
38
|
+
containerStyle?: ViewStyle;
|
|
39
|
+
/**
|
|
40
|
+
* Overrides the semi-transparent backdrop View.
|
|
41
|
+
* Mirrors `customeBackDrop` on CustomLoader.
|
|
42
|
+
*/
|
|
43
|
+
backdropStyle?: ViewStyle;
|
|
44
|
+
/**
|
|
45
|
+
* Overrides the centred box that wraps the spinner and label.
|
|
46
|
+
* Mirrors `customeBox` on CustomLoader.
|
|
47
|
+
*/
|
|
48
|
+
boxStyle?: ViewStyle;
|
|
49
|
+
/**
|
|
50
|
+
* testID forwarded to the root View for testing.
|
|
51
|
+
*/
|
|
52
|
+
testID?: string;
|
|
53
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare const createStyles: (scaledSize: number, color: string) => {
|
|
2
|
+
container: {
|
|
3
|
+
position: "absolute";
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
right: number;
|
|
7
|
+
bottom: number;
|
|
8
|
+
};
|
|
9
|
+
backdrop: {
|
|
10
|
+
flex: number;
|
|
11
|
+
justifyContent: "center";
|
|
12
|
+
alignItems: "center";
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
};
|
|
15
|
+
box: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
alignItems: "center";
|
|
19
|
+
justifyContent: "center";
|
|
20
|
+
};
|
|
21
|
+
svgWrapper: {
|
|
22
|
+
position: "absolute";
|
|
23
|
+
top: number;
|
|
24
|
+
left: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
textWrapper: {
|
|
29
|
+
position: "absolute";
|
|
30
|
+
top: number;
|
|
31
|
+
left: number;
|
|
32
|
+
right: number;
|
|
33
|
+
bottom: number;
|
|
34
|
+
alignItems: "center";
|
|
35
|
+
justifyContent: "center";
|
|
36
|
+
};
|
|
37
|
+
labelText: {
|
|
38
|
+
color: string;
|
|
39
|
+
fontSize: number;
|
|
40
|
+
lineHeight: number;
|
|
41
|
+
fontWeight: "500";
|
|
42
|
+
textAlign: "center";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export default createStyles;
|
|
@@ -19,7 +19,7 @@ declare const styles: {
|
|
|
19
19
|
fontFamily?: string | undefined;
|
|
20
20
|
fontSize?: number | undefined;
|
|
21
21
|
fontStyle?: "normal" | "italic" | undefined;
|
|
22
|
-
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" |
|
|
22
|
+
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
|
|
23
23
|
letterSpacing?: number | undefined;
|
|
24
24
|
lineHeight?: number | undefined;
|
|
25
25
|
textAlign?: "auto" | "left" | "right" | "center" | "justify" | undefined;
|
|
@@ -33,7 +33,7 @@ declare const styles: {
|
|
|
33
33
|
} | undefined;
|
|
34
34
|
textShadowRadius?: number | undefined;
|
|
35
35
|
textTransform?: "none" | "capitalize" | "uppercase" | "lowercase" | undefined;
|
|
36
|
-
|
|
36
|
+
testID?: string | undefined;
|
|
37
37
|
fontVariant?: import("react-native").FontVariant[] | undefined;
|
|
38
38
|
writingDirection?: "auto" | "ltr" | "rtl" | undefined;
|
|
39
39
|
backfaceVisibility?: "visible" | "hidden" | undefined;
|
|
@@ -42,41 +42,31 @@ declare const styles: {
|
|
|
42
42
|
borderBlockEndColor?: import("react-native").ColorValue | undefined;
|
|
43
43
|
borderBlockStartColor?: import("react-native").ColorValue | undefined;
|
|
44
44
|
borderBottomColor?: import("react-native").ColorValue | undefined;
|
|
45
|
-
borderBottomEndRadius?: import("react-native").AnimatableNumericValue |
|
|
46
|
-
borderBottomLeftRadius?: import("react-native").AnimatableNumericValue |
|
|
47
|
-
borderBottomRightRadius?: import("react-native").AnimatableNumericValue |
|
|
48
|
-
borderBottomStartRadius?: import("react-native").AnimatableNumericValue |
|
|
45
|
+
borderBottomEndRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
46
|
+
borderBottomLeftRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
47
|
+
borderBottomRightRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
48
|
+
borderBottomStartRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
49
49
|
borderColor?: import("react-native").ColorValue | undefined;
|
|
50
50
|
borderCurve?: "circular" | "continuous" | undefined;
|
|
51
51
|
borderEndColor?: import("react-native").ColorValue | undefined;
|
|
52
|
-
borderEndEndRadius?: import("react-native").AnimatableNumericValue |
|
|
53
|
-
borderEndStartRadius?: import("react-native").AnimatableNumericValue |
|
|
52
|
+
borderEndEndRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
53
|
+
borderEndStartRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
54
54
|
borderLeftColor?: import("react-native").ColorValue | undefined;
|
|
55
|
-
borderRadius?: import("react-native").AnimatableNumericValue |
|
|
55
|
+
borderRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
56
56
|
borderRightColor?: import("react-native").ColorValue | undefined;
|
|
57
57
|
borderStartColor?: import("react-native").ColorValue | undefined;
|
|
58
|
-
borderStartEndRadius?: import("react-native").AnimatableNumericValue |
|
|
59
|
-
borderStartStartRadius?: import("react-native").AnimatableNumericValue |
|
|
58
|
+
borderStartEndRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
59
|
+
borderStartStartRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
60
60
|
borderStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
61
61
|
borderTopColor?: import("react-native").ColorValue | undefined;
|
|
62
|
-
borderTopEndRadius?: import("react-native").AnimatableNumericValue |
|
|
63
|
-
borderTopLeftRadius?: import("react-native").AnimatableNumericValue |
|
|
64
|
-
borderTopRightRadius?: import("react-native").AnimatableNumericValue |
|
|
65
|
-
borderTopStartRadius?: import("react-native").AnimatableNumericValue |
|
|
66
|
-
outlineColor?: import("react-native").ColorValue | undefined;
|
|
67
|
-
outlineOffset?: import("react-native").AnimatableNumericValue | undefined;
|
|
68
|
-
outlineStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
69
|
-
outlineWidth?: import("react-native").AnimatableNumericValue | undefined;
|
|
62
|
+
borderTopEndRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
63
|
+
borderTopLeftRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
64
|
+
borderTopRightRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
65
|
+
borderTopStartRadius?: import("react-native").AnimatableNumericValue | undefined;
|
|
70
66
|
opacity?: import("react-native").AnimatableNumericValue | undefined;
|
|
71
67
|
elevation?: number | undefined;
|
|
72
68
|
pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
|
|
73
|
-
|
|
74
|
-
cursor?: import("react-native").CursorValue | undefined;
|
|
75
|
-
boxShadow?: ReadonlyArray<import("react-native").BoxShadowValue> | string | undefined;
|
|
76
|
-
filter?: ReadonlyArray<import("react-native").FilterFunction> | string | undefined;
|
|
77
|
-
mixBlendMode?: import("react-native").BlendMode | undefined;
|
|
78
|
-
experimental_backgroundImage?: ReadonlyArray<import("react-native").GradientValue> | string | undefined;
|
|
79
|
-
alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
69
|
+
alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around" | undefined;
|
|
80
70
|
alignItems?: import("react-native").FlexAlignType | undefined;
|
|
81
71
|
alignSelf?: "auto" | import("react-native").FlexAlignType | undefined;
|
|
82
72
|
aspectRatio?: number | string | undefined;
|
|
@@ -88,15 +78,14 @@ declare const styles: {
|
|
|
88
78
|
borderTopWidth?: number | undefined;
|
|
89
79
|
borderWidth?: number | undefined;
|
|
90
80
|
bottom?: import("react-native").DimensionValue | undefined;
|
|
91
|
-
|
|
92
|
-
display?: "none" | "flex" | "contents" | undefined;
|
|
81
|
+
display?: "none" | "flex" | undefined;
|
|
93
82
|
end?: import("react-native").DimensionValue | undefined;
|
|
94
83
|
flex?: number | undefined;
|
|
95
84
|
flexBasis?: import("react-native").DimensionValue | undefined;
|
|
96
85
|
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
97
|
-
rowGap?: number |
|
|
98
|
-
gap?: number |
|
|
99
|
-
columnGap?: number |
|
|
86
|
+
rowGap?: number | undefined;
|
|
87
|
+
gap?: number | undefined;
|
|
88
|
+
columnGap?: number | undefined;
|
|
100
89
|
flexGrow?: number | undefined;
|
|
101
90
|
flexShrink?: number | undefined;
|
|
102
91
|
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
@@ -126,32 +115,13 @@ declare const styles: {
|
|
|
126
115
|
paddingStart?: import("react-native").DimensionValue | undefined;
|
|
127
116
|
paddingTop?: import("react-native").DimensionValue | undefined;
|
|
128
117
|
paddingVertical?: import("react-native").DimensionValue | undefined;
|
|
129
|
-
position?: "absolute" | "relative" |
|
|
118
|
+
position?: "absolute" | "relative" | undefined;
|
|
130
119
|
right?: import("react-native").DimensionValue | undefined;
|
|
131
120
|
start?: import("react-native").DimensionValue | undefined;
|
|
132
121
|
top?: import("react-native").DimensionValue | undefined;
|
|
133
122
|
width?: import("react-native").DimensionValue | undefined;
|
|
134
123
|
zIndex?: number | undefined;
|
|
135
124
|
direction?: "inherit" | "ltr" | "rtl" | undefined;
|
|
136
|
-
inset?: import("react-native").DimensionValue | undefined;
|
|
137
|
-
insetBlock?: import("react-native").DimensionValue | undefined;
|
|
138
|
-
insetBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
139
|
-
insetBlockStart?: import("react-native").DimensionValue | undefined;
|
|
140
|
-
insetInline?: import("react-native").DimensionValue | undefined;
|
|
141
|
-
insetInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
142
|
-
insetInlineStart?: import("react-native").DimensionValue | undefined;
|
|
143
|
-
marginBlock?: import("react-native").DimensionValue | undefined;
|
|
144
|
-
marginBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
145
|
-
marginBlockStart?: import("react-native").DimensionValue | undefined;
|
|
146
|
-
marginInline?: import("react-native").DimensionValue | undefined;
|
|
147
|
-
marginInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
148
|
-
marginInlineStart?: import("react-native").DimensionValue | undefined;
|
|
149
|
-
paddingBlock?: import("react-native").DimensionValue | undefined;
|
|
150
|
-
paddingBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
151
|
-
paddingBlockStart?: import("react-native").DimensionValue | undefined;
|
|
152
|
-
paddingInline?: import("react-native").DimensionValue | undefined;
|
|
153
|
-
paddingInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
154
|
-
paddingInlineStart?: import("react-native").DimensionValue | undefined;
|
|
155
125
|
shadowColor?: import("react-native").ColorValue | undefined;
|
|
156
126
|
shadowOffset?: Readonly<{
|
|
157
127
|
width: number;
|
|
@@ -159,8 +129,7 @@ declare const styles: {
|
|
|
159
129
|
}> | undefined;
|
|
160
130
|
shadowOpacity?: import("react-native").AnimatableNumericValue | undefined;
|
|
161
131
|
shadowRadius?: number | undefined;
|
|
162
|
-
transform?:
|
|
163
|
-
transformOrigin?: Array<string | number> | string | undefined;
|
|
132
|
+
transform?: (import("react-native").PerpectiveTransform | import("react-native").RotateTransform | import("react-native").RotateXTransform | import("react-native").RotateYTransform | import("react-native").RotateZTransform | import("react-native").ScaleTransform | import("react-native").ScaleXTransform | import("react-native").ScaleYTransform | import("react-native").TranslateXTransform | import("react-native").TranslateYTransform | import("react-native").SkewXTransform | import("react-native").SkewYTransform | import("react-native").MatrixTransform)[] | undefined;
|
|
164
133
|
transformMatrix?: Array<number> | undefined;
|
|
165
134
|
rotation?: import("react-native").AnimatableNumericValue | undefined;
|
|
166
135
|
scaleX?: import("react-native").AnimatableNumericValue | undefined;
|
|
@@ -18,8 +18,10 @@ export interface IProps {
|
|
|
18
18
|
maxResendCount?: number;
|
|
19
19
|
timerToResend?: number;
|
|
20
20
|
timerIcon?: React.ReactElement;
|
|
21
|
+
errorIcon?: React.ReactElement;
|
|
21
22
|
errorMessageMaxReachCountProps?: string;
|
|
22
23
|
isInValidOtp?: boolean;
|
|
24
|
+
editable?: boolean;
|
|
23
25
|
}
|
|
24
26
|
export type OTPInputHandle = {
|
|
25
27
|
reset?: () => void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
2
|
textInputContainer: {
|
|
3
3
|
flexDirection: "row";
|
|
4
|
-
|
|
4
|
+
gap: number;
|
|
5
5
|
marginTop: number;
|
|
6
6
|
direction: "ltr";
|
|
7
7
|
writingDirection: "ltr";
|
|
8
8
|
};
|
|
9
9
|
textInputStyle: {
|
|
10
|
+
flex: number;
|
|
10
11
|
height: number;
|
|
11
|
-
width: number;
|
|
12
12
|
borderRadius: number;
|
|
13
13
|
borderWidth: number;
|
|
14
14
|
textAlign: "center";
|
|
@@ -24,17 +24,20 @@ declare const styles: {
|
|
|
24
24
|
textDecorationLine: "underline";
|
|
25
25
|
};
|
|
26
26
|
resendOTPStyle: {
|
|
27
|
-
alignSelf: "flex-
|
|
27
|
+
alignSelf: "flex-start";
|
|
28
28
|
};
|
|
29
29
|
timerContainer: {
|
|
30
30
|
flexDirection: "row";
|
|
31
31
|
justifyContent: "space-between";
|
|
32
|
+
alignItems: "flex-start";
|
|
32
33
|
marginTop: number;
|
|
33
34
|
};
|
|
34
35
|
timerIconContainer: {
|
|
36
|
+
flex: number;
|
|
35
37
|
flexDirection: "row";
|
|
36
38
|
gap: number;
|
|
37
|
-
alignItems: "
|
|
39
|
+
alignItems: "flex-start";
|
|
40
|
+
marginRight: number;
|
|
38
41
|
};
|
|
39
42
|
};
|
|
40
43
|
export { styles };
|
|
@@ -1,24 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: number;
|
|
6
|
-
type: ShapeType.LINE | ShapeType.CIRCLE;
|
|
7
|
-
width: number;
|
|
8
|
-
height?: number;
|
|
9
|
-
fillColor: string;
|
|
10
|
-
unfilledColor: string;
|
|
11
|
-
borderWidth?: number;
|
|
12
|
-
borderRadius?: number;
|
|
13
|
-
circleSize?: number;
|
|
14
|
-
thickness?: number;
|
|
15
|
-
progress: number;
|
|
16
|
-
setProgress: React.Dispatch<React.SetStateAction<number>>;
|
|
17
|
-
increment?: number;
|
|
18
|
-
interval?: number;
|
|
19
|
-
percentageText?: string;
|
|
20
|
-
valueTextStyle?: TextStyle;
|
|
21
|
-
percentageTextStyle?: TextStyle;
|
|
22
|
-
}
|
|
23
|
-
declare const CustomProgressBar: React.FC<CustomProgressBarProps>;
|
|
24
|
-
export default CustomProgressBar;
|
|
2
|
+
import { CustomProgressBarProps } from './ProgressBar.interface';
|
|
3
|
+
declare const _default: (props: CustomProgressBarProps) => React.JSX.Element;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { TextStyle } from 'react-native';
|
|
2
|
+
import { FontStyle, ShapeType } from '../../utils/appEnum';
|
|
3
|
+
export type CircleSize = 'large' | 'medium' | 'small' | 'xsmall';
|
|
4
|
+
export interface CircleSizeConfig {
|
|
5
|
+
circleSize: number;
|
|
6
|
+
thickness: number;
|
|
7
|
+
fontStyle: FontStyle;
|
|
8
|
+
}
|
|
9
|
+
export declare const CIRCLE_SIZE_CONFIG: Record<CircleSize, CircleSizeConfig>;
|
|
10
|
+
export type CircleVariant = 'grey' | 'coloured';
|
|
11
|
+
export interface CircleVariantColorKeys {
|
|
12
|
+
/** Theme key for the progress arc (0–99 %). */
|
|
13
|
+
fillColorKey: string;
|
|
14
|
+
/** Theme key for the progress arc when progress reaches 100 %. */
|
|
15
|
+
completedFillColorKey: string;
|
|
16
|
+
/** Theme key for the unfilled portion of the ring. */
|
|
17
|
+
unfilledColorKey: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const CIRCLE_VARIANT_CONFIG: Record<CircleVariant, CircleVariantColorKeys>;
|
|
20
|
+
export declare const LINE_DEFAULTS: {
|
|
21
|
+
readonly trackHeight: number;
|
|
22
|
+
readonly borderRadius: number;
|
|
23
|
+
readonly borderWidth: 0;
|
|
24
|
+
readonly labelGap: number;
|
|
25
|
+
};
|
|
26
|
+
export declare const LINE_COLOR_KEYS: {
|
|
27
|
+
readonly fillColor: "SUCCESS_EMPHASIS";
|
|
28
|
+
readonly unfilledColor: "SURFACE_PRIMARY_TRANSPARENT";
|
|
29
|
+
};
|
|
30
|
+
export interface CustomProgressBarProps {
|
|
31
|
+
/** Target progress value the animation counts toward (0–100). */
|
|
32
|
+
value: number;
|
|
33
|
+
type: ShapeType.LINE | ShapeType.CIRCLE;
|
|
34
|
+
/** LINE: fixed bar width in px. CIRCLE: pass 0 (unused). */
|
|
35
|
+
width: number;
|
|
36
|
+
/** LINE track height override. Defaults to 8 px (Figma). */
|
|
37
|
+
height?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Progress arc / fill colour override.
|
|
40
|
+
* When omitted, resolved from `variant` (CIRCLE) or LINE_COLOR_KEYS (LINE)
|
|
41
|
+
* against the current theme — light or dark.
|
|
42
|
+
*/
|
|
43
|
+
fillColor?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Unfilled-track colour override.
|
|
46
|
+
* When omitted, resolved from `variant` / LINE_COLOR_KEYS against the theme.
|
|
47
|
+
*/
|
|
48
|
+
unfilledColor?: string;
|
|
49
|
+
/** Border width override. Defaults to 0 (Figma: no border). */
|
|
50
|
+
borderWidth?: number;
|
|
51
|
+
/** Border radius override. Defaults to 4 px (Figma). */
|
|
52
|
+
borderRadius?: number;
|
|
53
|
+
/** CIRCLE diameter override (px). Takes precedence over the `size` preset. */
|
|
54
|
+
circleSize?: number;
|
|
55
|
+
/** CIRCLE stroke thickness override (px). Takes precedence over the `size` preset. */
|
|
56
|
+
thickness?: number;
|
|
57
|
+
/** Current animated progress value (0–100). Owned by the caller via useState. */
|
|
58
|
+
progress: number;
|
|
59
|
+
setProgress: React.Dispatch<React.SetStateAction<number>>;
|
|
60
|
+
/** Progress increment per animation tick. Default: 1. */
|
|
61
|
+
increment?: number;
|
|
62
|
+
/** Animation tick interval in ms. Default: 100. */
|
|
63
|
+
interval?: number;
|
|
64
|
+
/** Secondary label string rendered below the % text inside a CIRCLE. */
|
|
65
|
+
percentageText?: string;
|
|
66
|
+
/** Style override for the primary percentage text. */
|
|
67
|
+
valueTextStyle?: TextStyle;
|
|
68
|
+
/** Style override for the secondary label text. */
|
|
69
|
+
percentageTextStyle?: TextStyle;
|
|
70
|
+
/**
|
|
71
|
+
* CIRCLE size preset — resolves circleSize, thickness, and centre-text
|
|
72
|
+
* font size from DHDS design tokens.
|
|
73
|
+
* Explicit `circleSize` / `thickness` props override the preset.
|
|
74
|
+
*/
|
|
75
|
+
size?: CircleSize;
|
|
76
|
+
/**
|
|
77
|
+
* CIRCLE colour variant — resolves fillColor and unfilledColor from DHDS
|
|
78
|
+
* design tokens, adapting automatically to light / dark mode.
|
|
79
|
+
* For `'coloured'`, the fill automatically switches from orange to
|
|
80
|
+
* success-green when `progress` reaches 100.
|
|
81
|
+
* Explicit `fillColor` / `unfilledColor` props always take precedence.
|
|
82
|
+
*/
|
|
83
|
+
variant?: CircleVariant;
|
|
84
|
+
/**
|
|
85
|
+
* LINE only. When true, renders the current `progress` value as a
|
|
86
|
+
* percentage label to the right of the bar (12 px gap, Body 2 / Medium).
|
|
87
|
+
*/
|
|
88
|
+
showLabel?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* LINE only. When true, the fill grows from the right edge — for
|
|
91
|
+
* Arabic / RTL layouts.
|
|
92
|
+
*/
|
|
93
|
+
isRTL?: boolean;
|
|
94
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
lineContainer: {
|
|
3
|
+
flexDirection: "row";
|
|
4
|
+
alignItems: "center";
|
|
5
|
+
gap: number;
|
|
6
|
+
};
|
|
7
|
+
lineContainerRTL: {
|
|
8
|
+
flexDirection: "row-reverse";
|
|
9
|
+
};
|
|
10
|
+
circleCenter: {
|
|
11
|
+
flexDirection: "column";
|
|
12
|
+
justifyContent: "center";
|
|
13
|
+
alignItems: "center";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default styles;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CategoryItemProps } from './category.interface';
|
|
3
|
+
/**
|
|
4
|
+
* A single tab item in the ScrollableList (Category) component.
|
|
5
|
+
*
|
|
6
|
+
* Wrapped in React.memo — only re-renders when its own props change,
|
|
7
|
+
* so tapping a tab does not re-render every sibling item.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
declare const CategoryItem: React.MemoExoticComponent<({ item, isActive, onPress, itemStyle, selectedItemStyle, selectedItemTextColor, defaultItemTextColor, errorStyle, inActiveErrorStyle, activeTextStyle, inActiveTextStyle, errorTextStyle, inActiveErrorTextStyle, enableTextWrap, }: CategoryItemProps) => React.JSX.Element>;
|
|
11
|
+
export default CategoryItem;
|
|
@@ -1,63 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
data: {
|
|
5
|
-
name: string;
|
|
6
|
-
value: string;
|
|
7
|
-
isError?: boolean;
|
|
8
|
-
errorText?: string;
|
|
9
|
-
}[] | undefined;
|
|
10
|
-
handleSelectCategory: (name: string, value: string) => void;
|
|
11
|
-
containerStyle?: object;
|
|
12
|
-
scrollViewContentStyle?: object;
|
|
13
|
-
itemStyle?: object;
|
|
14
|
-
selectedItemStyle?: object;
|
|
15
|
-
selectedItemTextColor?: string;
|
|
16
|
-
defaultItemTextColor?: string;
|
|
17
|
-
activeTab?: string;
|
|
18
|
-
errorStyle?: object;
|
|
19
|
-
inActiveErrorStyle?: object;
|
|
20
|
-
activeTextStyle?: TextStyle;
|
|
21
|
-
enableTextWrap?: boolean;
|
|
22
|
-
errorTextStyle?: TextStyle;
|
|
23
|
-
inActiveErrorTextStyle?: TextStyle;
|
|
24
|
-
inActiveTextStyle?: TextStyle;
|
|
25
|
-
}
|
|
26
|
-
export declare const createStyles: (theme: any) => {
|
|
27
|
-
container: {
|
|
28
|
-
paddingVertical: number;
|
|
29
|
-
};
|
|
30
|
-
scrollViewContent: {
|
|
31
|
-
flexDirection: "row";
|
|
32
|
-
alignItems: "center";
|
|
33
|
-
};
|
|
34
|
-
item: {
|
|
35
|
-
flexDirection: "row";
|
|
36
|
-
alignItems: "center";
|
|
37
|
-
gap: number;
|
|
38
|
-
padding: number;
|
|
39
|
-
borderBottomWidth: number;
|
|
40
|
-
borderBottomColor: any;
|
|
41
|
-
flexShrink: number;
|
|
42
|
-
};
|
|
43
|
-
enableTextWrapStyle: {
|
|
44
|
-
flexShrink: number;
|
|
45
|
-
flexGrow: number;
|
|
46
|
-
};
|
|
47
|
-
selectedItem: {
|
|
48
|
-
borderBottomWidth: number;
|
|
49
|
-
borderBottomColor: any;
|
|
50
|
-
};
|
|
51
|
-
errorViewStyle: {
|
|
52
|
-
width: number;
|
|
53
|
-
height: number;
|
|
54
|
-
borderRadius: number;
|
|
55
|
-
backgroundColor: any;
|
|
56
|
-
};
|
|
57
|
-
errorTextStyle: {
|
|
58
|
-
justifyContent: "center";
|
|
59
|
-
alignSelf: "center";
|
|
60
|
-
};
|
|
61
|
-
};
|
|
2
|
+
import type { ScrollableListProps } from './category.interface';
|
|
3
|
+
export { createStyles } from './category.styles';
|
|
62
4
|
declare const _default: (props: ScrollableListProps) => React.JSX.Element;
|
|
63
5
|
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextStyle } from 'react-native';
|
|
3
|
+
export interface CategoryItemData {
|
|
4
|
+
name: string;
|
|
5
|
+
value: string;
|
|
6
|
+
isError?: boolean;
|
|
7
|
+
errorText?: string;
|
|
8
|
+
leadingIcon?: React.ReactNode;
|
|
9
|
+
trailingIcon?: React.ReactNode;
|
|
10
|
+
showBadgeDot?: boolean;
|
|
11
|
+
badgeCount?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface CategoryItemProps {
|
|
14
|
+
item: CategoryItemData;
|
|
15
|
+
isActive: boolean;
|
|
16
|
+
onPress: (name: string, value: string) => void;
|
|
17
|
+
itemStyle?: object;
|
|
18
|
+
selectedItemStyle?: object;
|
|
19
|
+
selectedItemTextColor?: string;
|
|
20
|
+
defaultItemTextColor?: string;
|
|
21
|
+
errorStyle?: object;
|
|
22
|
+
inActiveErrorStyle?: object;
|
|
23
|
+
activeTextStyle?: TextStyle;
|
|
24
|
+
inActiveTextStyle?: TextStyle;
|
|
25
|
+
errorTextStyle?: TextStyle;
|
|
26
|
+
inActiveErrorTextStyle?: TextStyle;
|
|
27
|
+
enableTextWrap?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface ScrollableListProps {
|
|
30
|
+
data: CategoryItemData[] | undefined;
|
|
31
|
+
handleSelectCategory: (name: string, value: string) => void;
|
|
32
|
+
containerStyle?: object;
|
|
33
|
+
scrollViewContentStyle?: object;
|
|
34
|
+
itemStyle?: object;
|
|
35
|
+
selectedItemStyle?: object;
|
|
36
|
+
selectedItemTextColor?: string;
|
|
37
|
+
defaultItemTextColor?: string;
|
|
38
|
+
activeTab?: string;
|
|
39
|
+
errorStyle?: object;
|
|
40
|
+
inActiveErrorStyle?: object;
|
|
41
|
+
activeTextStyle?: TextStyle;
|
|
42
|
+
enableTextWrap?: boolean;
|
|
43
|
+
errorTextStyle?: TextStyle;
|
|
44
|
+
inActiveErrorTextStyle?: TextStyle;
|
|
45
|
+
inActiveTextStyle?: TextStyle;
|
|
46
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare const createStyles: (theme: Record<string, string>) => {
|
|
2
|
+
container: {
|
|
3
|
+
paddingVertical: number;
|
|
4
|
+
};
|
|
5
|
+
scrollViewContent: {
|
|
6
|
+
flexDirection: "row";
|
|
7
|
+
alignItems: "center";
|
|
8
|
+
};
|
|
9
|
+
item: {
|
|
10
|
+
flexDirection: "row";
|
|
11
|
+
alignItems: "center";
|
|
12
|
+
gap: number;
|
|
13
|
+
padding: number;
|
|
14
|
+
height: number;
|
|
15
|
+
borderBottomWidth: number;
|
|
16
|
+
borderBottomColor: string;
|
|
17
|
+
flexShrink: number;
|
|
18
|
+
};
|
|
19
|
+
selectedItem: {
|
|
20
|
+
borderBottomWidth: number;
|
|
21
|
+
borderBottomColor: string;
|
|
22
|
+
};
|
|
23
|
+
textContainer: {
|
|
24
|
+
minHeight: number;
|
|
25
|
+
};
|
|
26
|
+
enableTextWrapStyle: {
|
|
27
|
+
flexShrink: number;
|
|
28
|
+
flexGrow: number;
|
|
29
|
+
};
|
|
30
|
+
iconContainer: {
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
flexShrink: number;
|
|
34
|
+
overflow: "hidden";
|
|
35
|
+
};
|
|
36
|
+
badgeDot: {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
borderRadius: number;
|
|
40
|
+
backgroundColor: string;
|
|
41
|
+
flexShrink: number;
|
|
42
|
+
};
|
|
43
|
+
badgeNumber: {
|
|
44
|
+
minWidth: number;
|
|
45
|
+
height: number;
|
|
46
|
+
paddingHorizontal: number;
|
|
47
|
+
borderRadius: number;
|
|
48
|
+
backgroundColor: string;
|
|
49
|
+
flexShrink: number;
|
|
50
|
+
justifyContent: "center";
|
|
51
|
+
alignItems: "center";
|
|
52
|
+
};
|
|
53
|
+
badgeNumberText: {
|
|
54
|
+
textAlign: "center";
|
|
55
|
+
alignSelf: "stretch";
|
|
56
|
+
};
|
|
57
|
+
errorViewStyle: {
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
borderRadius: number;
|
|
61
|
+
backgroundColor: string;
|
|
62
|
+
};
|
|
63
|
+
errorTextStyle: {
|
|
64
|
+
justifyContent: "center";
|
|
65
|
+
alignSelf: "center";
|
|
66
|
+
};
|
|
67
|
+
};
|