dhre-ui-kit 3.0.2 → 3.1.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/checkBox/CheckBox.interface.d.ts +3 -0
- package/lib/components/checkBox/CheckBox.styles.d.ts +5 -0
- package/lib/components/toast/Toast.styles.d.ts +0 -1
- package/lib/index.js +90 -8
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +88 -9
- package/lib/index.mjs.map +1 -1
- package/lib/theme/colors.d.ts +12 -0
- package/lib/theme/themes.d.ts +4 -0
- package/lib/utils/appEnum.d.ts +2 -1
- package/package.json +1 -1
- package/lib/components/customDocumentPicker/CustomDocumentPicker.d.ts +0 -0
- package/lib/components/customDocumentPicker/CustomDocumentPicker.interface.d.ts +0 -0
- package/lib/components/customDocumentPicker/CustomDocumentPicker.styles.d.ts +0 -30
- package/lib/components/customDocumentPicker/index.d.ts +0 -0
|
@@ -3,6 +3,8 @@ export interface CheckBoxProps {
|
|
|
3
3
|
isChecked: boolean;
|
|
4
4
|
onCheck?: (checked: boolean) => void;
|
|
5
5
|
labelName: string;
|
|
6
|
+
/** Icon rendered to the left of the label text. Optional — when omitted no icon is rendered. */
|
|
7
|
+
labelIcon?: React.ReactElement;
|
|
6
8
|
disable?: boolean;
|
|
7
9
|
isCircle?: boolean;
|
|
8
10
|
testID?: string;
|
|
@@ -17,6 +19,7 @@ export interface CheckBoxProps {
|
|
|
17
19
|
titleStyle?: TextStyle;
|
|
18
20
|
containerStyle?: ViewStyle;
|
|
19
21
|
checkboxStyle?: StyleProp<ViewStyle>;
|
|
22
|
+
checkBoxHeaderStyle?: StyleProp<ViewStyle>;
|
|
20
23
|
onPress?: () => void;
|
|
21
24
|
hideCheckbox?: boolean;
|
|
22
25
|
/**
|
package/lib/index.js
CHANGED
|
@@ -224,6 +224,7 @@ var Theme = /* @__PURE__ */ ((Theme2) => {
|
|
|
224
224
|
Theme2["STROKE_DISABLED_DARK2"] = "STROKE_DISABLED_DARK2";
|
|
225
225
|
Theme2["STROKE_ACTIVE"] = "STROKE_ACTIVE";
|
|
226
226
|
Theme2["STROKE_DISABLED_SELECTED"] = "STROKE_DISABLED_SELECTED";
|
|
227
|
+
Theme2["SHADOW_10"] = "SHADOW_10";
|
|
227
228
|
return Theme2;
|
|
228
229
|
})(Theme || {});
|
|
229
230
|
|
|
@@ -495,6 +496,70 @@ const DHRE_CONFIRMATION_BASE_GRADIENT = {
|
|
|
495
496
|
light: ["rgba(165, 233, 255, 0)", "#52C5E8"],
|
|
496
497
|
dark: ["rgba(165, 233, 255, 0)", "#279DC1"]
|
|
497
498
|
};
|
|
499
|
+
const GRADIENT_COLORS_SUCCESS = {
|
|
500
|
+
light: [
|
|
501
|
+
"#89C798",
|
|
502
|
+
"#FFFFFF",
|
|
503
|
+
"#A5E9FF",
|
|
504
|
+
"#52C5E8",
|
|
505
|
+
"#0B214A",
|
|
506
|
+
"#355D7A"
|
|
507
|
+
],
|
|
508
|
+
// NEED TO UPDATE GRADIENT COLORS
|
|
509
|
+
dark: [
|
|
510
|
+
"#24584B",
|
|
511
|
+
"#123D46",
|
|
512
|
+
"#00113A",
|
|
513
|
+
"#000A28",
|
|
514
|
+
"#0B214A",
|
|
515
|
+
"#355D7A"
|
|
516
|
+
]
|
|
517
|
+
};
|
|
518
|
+
const GRADIENT_COLORS_ERROR = {
|
|
519
|
+
light: [
|
|
520
|
+
"#F0809E",
|
|
521
|
+
"#FFFFFF",
|
|
522
|
+
"#A5E9FF",
|
|
523
|
+
"#52C5E8",
|
|
524
|
+
"#0B214A",
|
|
525
|
+
"#355D7A"
|
|
526
|
+
],
|
|
527
|
+
// NEED TO UPDATE GRADIENT COLORS
|
|
528
|
+
dark: [
|
|
529
|
+
"#EB0542",
|
|
530
|
+
// 0%
|
|
531
|
+
"#780835",
|
|
532
|
+
// ~2%
|
|
533
|
+
"#00113A",
|
|
534
|
+
// 28%
|
|
535
|
+
"#000A28",
|
|
536
|
+
// 45%
|
|
537
|
+
"#0B214A",
|
|
538
|
+
// 88%
|
|
539
|
+
"#355D7A"
|
|
540
|
+
// 100%
|
|
541
|
+
]
|
|
542
|
+
};
|
|
543
|
+
const GRADIENT_COLORS_PENDING = {
|
|
544
|
+
light: ["#E9F8FF", "#52C5E8"],
|
|
545
|
+
// NEED TO UPDATE GRADIENT COLORS
|
|
546
|
+
dark: [
|
|
547
|
+
"#EB0542",
|
|
548
|
+
// 0%
|
|
549
|
+
"#780835",
|
|
550
|
+
// ~2%
|
|
551
|
+
"#00113A",
|
|
552
|
+
// 28%
|
|
553
|
+
"#000A28",
|
|
554
|
+
// 45%
|
|
555
|
+
"#000A28",
|
|
556
|
+
// 72%
|
|
557
|
+
"#0B214A",
|
|
558
|
+
// 88%
|
|
559
|
+
"#355D7A"
|
|
560
|
+
// 100%
|
|
561
|
+
]
|
|
562
|
+
};
|
|
498
563
|
|
|
499
564
|
const theme = {
|
|
500
565
|
[Theme.SURFACE_PRIMARY]: {
|
|
@@ -841,6 +906,10 @@ const theme = {
|
|
|
841
906
|
[Theme.STROKE_DISABLED_SELECTED]: {
|
|
842
907
|
dark: "#003f48",
|
|
843
908
|
light: "#9ADFE8"
|
|
909
|
+
},
|
|
910
|
+
[Theme.SHADOW_10]: {
|
|
911
|
+
dark: "rgba(255, 255, 255, 0.20)",
|
|
912
|
+
light: "rgba(0, 0, 0, 0.10)"
|
|
844
913
|
}
|
|
845
914
|
};
|
|
846
915
|
|
|
@@ -2082,6 +2151,11 @@ const styles$u = reactNative.StyleSheet.create({
|
|
|
2082
2151
|
borderRadius: DHRE_RADIUS.SM,
|
|
2083
2152
|
borderWidth: 1,
|
|
2084
2153
|
overflow: "hidden"
|
|
2154
|
+
},
|
|
2155
|
+
labelContainer: {
|
|
2156
|
+
flexDirection: "row",
|
|
2157
|
+
alignItems: "center",
|
|
2158
|
+
gap: DHRE_PADDING.SM
|
|
2085
2159
|
}
|
|
2086
2160
|
});
|
|
2087
2161
|
|
|
@@ -2119,9 +2193,11 @@ const Checkbox = ({
|
|
|
2119
2193
|
titleVariant,
|
|
2120
2194
|
titleStyle,
|
|
2121
2195
|
containerStyle,
|
|
2196
|
+
checkBoxHeaderStyle,
|
|
2122
2197
|
checkboxStyle,
|
|
2123
2198
|
onPress,
|
|
2124
|
-
hideCheckbox = false
|
|
2199
|
+
hideCheckbox = false,
|
|
2200
|
+
labelIcon
|
|
2125
2201
|
}) => {
|
|
2126
2202
|
const { theme } = useTheme();
|
|
2127
2203
|
const [checked, setChecked] = React.useState(isChecked || false);
|
|
@@ -2157,16 +2233,21 @@ const Checkbox = ({
|
|
|
2157
2233
|
borderColor: disable ? theme[Theme.CONTENT_DISABLE_DARK] : theme[Theme.STROKE_ACTIVE],
|
|
2158
2234
|
borderWidth: disable && isFilledState ? 0 : 1
|
|
2159
2235
|
};
|
|
2160
|
-
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { testID, style: containerStyle }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$u.directionStyle }, hideCheckbox ? null : /* @__PURE__ */ React__default["default"].createElement(
|
|
2236
|
+
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { testID, style: containerStyle }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$u.directionStyle, checkBoxHeaderStyle] }, hideCheckbox ? null : /* @__PURE__ */ React__default["default"].createElement(
|
|
2161
2237
|
reactNative.Pressable,
|
|
2162
2238
|
{
|
|
2163
2239
|
testID: "Checkbox-Press",
|
|
2164
2240
|
onPressIn: handlePress,
|
|
2165
2241
|
disabled: disable,
|
|
2166
|
-
style: [
|
|
2242
|
+
style: [
|
|
2243
|
+
styles$u.checkboxContainer,
|
|
2244
|
+
iconContainerSizeStyle,
|
|
2245
|
+
checkboxContainerDynamicStyle,
|
|
2246
|
+
checkboxStyle
|
|
2247
|
+
]
|
|
2167
2248
|
},
|
|
2168
2249
|
resolvedIcon ? React__default["default"].cloneElement(resolvedIcon) : null
|
|
2169
|
-
), /* @__PURE__ */ React__default["default"].createElement(
|
|
2250
|
+
), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$u.labelContainer }, labelIcon && React__default["default"].cloneElement(labelIcon, { width: 20, height: 20 }), /* @__PURE__ */ React__default["default"].createElement(
|
|
2170
2251
|
CustomTypography,
|
|
2171
2252
|
{
|
|
2172
2253
|
variant: resolvedVariant,
|
|
@@ -2174,7 +2255,7 @@ const Checkbox = ({
|
|
|
2174
2255
|
style: [labelColorStyle, titleStyle],
|
|
2175
2256
|
onPressIn: onPress
|
|
2176
2257
|
}
|
|
2177
|
-
)));
|
|
2258
|
+
))));
|
|
2178
2259
|
};
|
|
2179
2260
|
var CheckBox = withThemeProvider(Checkbox);
|
|
2180
2261
|
|
|
@@ -3292,8 +3373,7 @@ const styles$j = reactNative.StyleSheet.create({
|
|
|
3292
3373
|
top: DHRE_SPACING.XXL,
|
|
3293
3374
|
borderRadius: DHRE_RADIUS.MD,
|
|
3294
3375
|
overflow: "hidden",
|
|
3295
|
-
minHeight: DHRE_SPACING.XXL
|
|
3296
|
-
height: DHRE_SPACING.XXL
|
|
3376
|
+
minHeight: DHRE_SPACING.XXL
|
|
3297
3377
|
},
|
|
3298
3378
|
toastContainer: {
|
|
3299
3379
|
paddingVertical: DHRE_PADDING.LG,
|
|
@@ -3404,7 +3484,6 @@ const Toast = React__default["default"].forwardRef(
|
|
|
3404
3484
|
{
|
|
3405
3485
|
style: [
|
|
3406
3486
|
styles$j.container,
|
|
3407
|
-
{ bottom },
|
|
3408
3487
|
{ backgroundColor: theme.SURFACE_TERTIARY }
|
|
3409
3488
|
],
|
|
3410
3489
|
testID: "TOAST"
|
|
@@ -13637,6 +13716,9 @@ exports.FONT_STYLES = FONT_STYLES;
|
|
|
13637
13716
|
exports.FeedbackForm = feedback;
|
|
13638
13717
|
exports.FileUpload = FileUpload;
|
|
13639
13718
|
exports.FontStyle = FontStyle;
|
|
13719
|
+
exports.GRADIENT_COLORS_ERROR = GRADIENT_COLORS_ERROR;
|
|
13720
|
+
exports.GRADIENT_COLORS_PENDING = GRADIENT_COLORS_PENDING;
|
|
13721
|
+
exports.GRADIENT_COLORS_SUCCESS = GRADIENT_COLORS_SUCCESS;
|
|
13640
13722
|
exports.Line = Line;
|
|
13641
13723
|
exports.Loader = Loader$1;
|
|
13642
13724
|
exports.NAKHEEL_DEFAULT = NAKHEEL_DEFAULT;
|