dhre-ui-kit 0.0.135 → 0.0.137
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/index.d.ts +1 -0
- package/lib/index.js +19 -10
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +20 -11
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -508,6 +508,7 @@ declare const _default$9: (props: ContactModalProps) => React$1.JSX.Element;
|
|
|
508
508
|
|
|
509
509
|
interface DateRangePickerProps extends CalendarProps {
|
|
510
510
|
onButtonPress: (startDate: string, endDate: string) => void;
|
|
511
|
+
btnTitle?: string;
|
|
511
512
|
}
|
|
512
513
|
|
|
513
514
|
declare const _default$8: (props: DateRangePickerProps) => React$1.JSX.Element;
|
package/lib/index.js
CHANGED
|
@@ -10,8 +10,6 @@ var blur = require('@react-native-community/blur');
|
|
|
10
10
|
var Tooltip = require('rn-tooltip');
|
|
11
11
|
var Pdf = require('react-native-pdf');
|
|
12
12
|
var Progress = require('react-native-progress');
|
|
13
|
-
var ThemeContext$1 = require('src/theme/ThemeContext');
|
|
14
|
-
var withThemeProvider$1 = require('src/theme/withThemeProvider');
|
|
15
13
|
var reactNativeCalendars = require('react-native-calendars');
|
|
16
14
|
var CountryPicker = require('react-native-country-picker-modal');
|
|
17
15
|
var reactNativePaper = require('react-native-paper');
|
|
@@ -359,8 +357,19 @@ const CustomTypography = ({
|
|
|
359
357
|
...props
|
|
360
358
|
}) => {
|
|
361
359
|
const textStyle = FONT_STYLES[variant];
|
|
362
|
-
return /* @__PURE__ */ React__default["default"].createElement(
|
|
360
|
+
return /* @__PURE__ */ React__default["default"].createElement(
|
|
361
|
+
reactNative.Text,
|
|
362
|
+
{
|
|
363
|
+
testID,
|
|
364
|
+
style: [textStyle, styles$F.container, style],
|
|
365
|
+
...props
|
|
366
|
+
},
|
|
367
|
+
text
|
|
368
|
+
);
|
|
363
369
|
};
|
|
370
|
+
const styles$F = reactNative.StyleSheet.create({
|
|
371
|
+
container: { writingDirection: "auto", alignSelf: "flex-start" }
|
|
372
|
+
});
|
|
364
373
|
|
|
365
374
|
const CustomText = ({
|
|
366
375
|
text,
|
|
@@ -1929,7 +1938,7 @@ const Accordion = ({
|
|
|
1929
1938
|
const contentRef = React.useRef(null);
|
|
1930
1939
|
const [animation] = React.useState(new reactNative.Animated.Value(0));
|
|
1931
1940
|
const [contentHeight, setContentHeight] = React.useState(0);
|
|
1932
|
-
const { theme } =
|
|
1941
|
+
const { theme } = useTheme();
|
|
1933
1942
|
React.useEffect(() => {
|
|
1934
1943
|
if (contentRef.current) {
|
|
1935
1944
|
contentRef.current.measure((x, y, width, height) => {
|
|
@@ -1987,7 +1996,7 @@ const Accordion = ({
|
|
|
1987
1996
|
))
|
|
1988
1997
|
);
|
|
1989
1998
|
};
|
|
1990
|
-
var Accordion$1 = withThemeProvider
|
|
1999
|
+
var Accordion$1 = withThemeProvider(Accordion);
|
|
1991
2000
|
|
|
1992
2001
|
const styles$o = reactNative.StyleSheet.create({
|
|
1993
2002
|
container: {
|
|
@@ -2241,7 +2250,7 @@ const CustomHeader = ({
|
|
|
2241
2250
|
onLeftPress,
|
|
2242
2251
|
onRightPress
|
|
2243
2252
|
}) => {
|
|
2244
|
-
const { theme } =
|
|
2253
|
+
const { theme } = useTheme();
|
|
2245
2254
|
return /* @__PURE__ */ React__default["default"].createElement(
|
|
2246
2255
|
reactNative.View,
|
|
2247
2256
|
{
|
|
@@ -2273,7 +2282,7 @@ const CustomHeader = ({
|
|
|
2273
2282
|
}) : null
|
|
2274
2283
|
);
|
|
2275
2284
|
};
|
|
2276
|
-
var CustomHeader$1 = withThemeProvider
|
|
2285
|
+
var CustomHeader$1 = withThemeProvider(CustomHeader);
|
|
2277
2286
|
|
|
2278
2287
|
const styles$l = reactNative.StyleSheet.create({
|
|
2279
2288
|
container: {
|
|
@@ -2729,7 +2738,7 @@ const styles$f = reactNative.StyleSheet.create({
|
|
|
2729
2738
|
});
|
|
2730
2739
|
|
|
2731
2740
|
const DateRangePicker = (props) => {
|
|
2732
|
-
const { onButtonPress } = props;
|
|
2741
|
+
const { onButtonPress, btnTitle = "Apply" } = props;
|
|
2733
2742
|
const [selectedRange, setSelectedRange] = React.useState({
|
|
2734
2743
|
startDate: "",
|
|
2735
2744
|
endDate: ""
|
|
@@ -2802,7 +2811,7 @@ const DateRangePicker = (props) => {
|
|
|
2802
2811
|
), /* @__PURE__ */ React__default["default"].createElement(
|
|
2803
2812
|
CustomButton$1,
|
|
2804
2813
|
{
|
|
2805
|
-
title:
|
|
2814
|
+
title: btnTitle,
|
|
2806
2815
|
onPress: () => {
|
|
2807
2816
|
onButtonPress(selectedRange?.startDate, selectedRange?.endDate);
|
|
2808
2817
|
},
|
|
@@ -2810,7 +2819,7 @@ const DateRangePicker = (props) => {
|
|
|
2810
2819
|
...styles$f.applyButton,
|
|
2811
2820
|
backgroundColor: theme.SURFACE_INVERTED
|
|
2812
2821
|
},
|
|
2813
|
-
textStyle: { color: theme.
|
|
2822
|
+
textStyle: { color: theme.CONTENT_INVERTED },
|
|
2814
2823
|
disabled: isButtonDisabled
|
|
2815
2824
|
}
|
|
2816
2825
|
));
|