dhre-ui-kit 0.0.133 → 0.0.135
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 +13 -11
- package/lib/index.js +101 -67
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +99 -65
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -6,6 +6,8 @@ import { BlurView } from '@react-native-community/blur';
|
|
|
6
6
|
import Tooltip from 'rn-tooltip';
|
|
7
7
|
import Pdf from 'react-native-pdf';
|
|
8
8
|
import * as Progress from 'react-native-progress';
|
|
9
|
+
import { useTheme as useTheme$1 } from 'src/theme/ThemeContext';
|
|
10
|
+
import { withThemeProvider as withThemeProvider$1 } from 'src/theme/withThemeProvider';
|
|
9
11
|
import { Calendar } from 'react-native-calendars';
|
|
10
12
|
import CountryPicker from 'react-native-country-picker-modal';
|
|
11
13
|
import { TextInput as TextInput$1 } from 'react-native-paper';
|
|
@@ -635,7 +637,8 @@ const BottomDrawer = ({
|
|
|
635
637
|
onLeftIconPress,
|
|
636
638
|
titleStyle,
|
|
637
639
|
titleVariant = "B2_REGULAR",
|
|
638
|
-
showHeader = true
|
|
640
|
+
showHeader = true,
|
|
641
|
+
blurType = "light"
|
|
639
642
|
}) => {
|
|
640
643
|
const onSwipDown = (event) => {
|
|
641
644
|
const { translationY } = event.nativeEvent;
|
|
@@ -661,7 +664,7 @@ const BottomDrawer = ({
|
|
|
661
664
|
BlurView,
|
|
662
665
|
{
|
|
663
666
|
style: [styles$D.blurView, blurViewStyle],
|
|
664
|
-
blurType
|
|
667
|
+
blurType,
|
|
665
668
|
blurAmount
|
|
666
669
|
}
|
|
667
670
|
) : null, /* @__PURE__ */ React.createElement(View, { style: [styles$D.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(View, { style: styles$D.separator }), /* @__PURE__ */ React.createElement(View, { style: styles$D.headerContainer }, showLeftIcon && leftIcon ? React.cloneElement(leftIcon, {
|
|
@@ -1857,8 +1860,7 @@ const CustomSwitch = ({
|
|
|
1857
1860
|
const styles$p = StyleSheet.create({
|
|
1858
1861
|
container: {
|
|
1859
1862
|
paddingVertical: verticalScale(24),
|
|
1860
|
-
borderBottomWidth: moderateScale(1)
|
|
1861
|
-
borderBottomColor: "#282828"
|
|
1863
|
+
borderBottomWidth: moderateScale(1)
|
|
1862
1864
|
},
|
|
1863
1865
|
header: {
|
|
1864
1866
|
flexDirection: "row",
|
|
@@ -1866,7 +1868,7 @@ const styles$p = StyleSheet.create({
|
|
|
1866
1868
|
alignItems: "center",
|
|
1867
1869
|
paddingHorizontal: horizontalScale(24)
|
|
1868
1870
|
},
|
|
1869
|
-
title: { flex: 1
|
|
1871
|
+
title: { flex: 1 },
|
|
1870
1872
|
iconStyle: { marginLeft: horizontalScale(20) },
|
|
1871
1873
|
content: {
|
|
1872
1874
|
overflow: "scroll",
|
|
@@ -1888,11 +1890,13 @@ const Accordion = ({
|
|
|
1888
1890
|
headerComponent,
|
|
1889
1891
|
disabled = false,
|
|
1890
1892
|
icon,
|
|
1891
|
-
onHeaderPress
|
|
1893
|
+
onHeaderPress,
|
|
1894
|
+
titleVariant = "B4_REGULAR"
|
|
1892
1895
|
}) => {
|
|
1893
1896
|
const contentRef = useRef(null);
|
|
1894
1897
|
const [animation] = useState(new Animated.Value(0));
|
|
1895
1898
|
const [contentHeight, setContentHeight] = useState(0);
|
|
1899
|
+
const { theme } = useTheme$1();
|
|
1896
1900
|
useEffect(() => {
|
|
1897
1901
|
if (contentRef.current) {
|
|
1898
1902
|
contentRef.current.measure((x, y, width, height) => {
|
|
@@ -1911,28 +1915,46 @@ const Accordion = ({
|
|
|
1911
1915
|
inputRange: [0, 1],
|
|
1912
1916
|
outputRange: [0, contentHeight]
|
|
1913
1917
|
});
|
|
1914
|
-
return /* @__PURE__ */ React.createElement(
|
|
1915
|
-
CustomTypography,
|
|
1916
|
-
{
|
|
1917
|
-
variant: "B4_REGULAR",
|
|
1918
|
-
text: title,
|
|
1919
|
-
style: [styles$p.title, titleStyle]
|
|
1920
|
-
}
|
|
1921
|
-
)), /* @__PURE__ */ React.createElement(Pressable, { onPress: !disabled ? onToggle : void 0 }, React.cloneElement(icon, {
|
|
1922
|
-
width: moderateScale(20),
|
|
1923
|
-
height: moderateScale(20),
|
|
1924
|
-
style: styles$p.iconStyle
|
|
1925
|
-
}))), optionalElement ? optionalElement() : null, isOpen && /* @__PURE__ */ React.createElement(Animated.View, { style: [styles$p.content, { height: cardHeight }] }, /* @__PURE__ */ React.createElement(
|
|
1918
|
+
return /* @__PURE__ */ React.createElement(
|
|
1926
1919
|
View,
|
|
1927
1920
|
{
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1921
|
+
style: {
|
|
1922
|
+
...styles$p.container,
|
|
1923
|
+
borderBottomColor: theme.BORDER_SEPRATOR,
|
|
1924
|
+
...containerStyle
|
|
1925
|
+
},
|
|
1926
|
+
testID: testId
|
|
1932
1927
|
},
|
|
1933
|
-
|
|
1934
|
-
|
|
1928
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles$p.header, headerStyle, disabled && { opacity: 0.5 }] }, headerComponent ? headerComponent() : /* @__PURE__ */ React.createElement(Pressable, { onPress: onHeaderPress }, /* @__PURE__ */ React.createElement(
|
|
1929
|
+
CustomTypography,
|
|
1930
|
+
{
|
|
1931
|
+
variant: titleVariant,
|
|
1932
|
+
text: title,
|
|
1933
|
+
style: {
|
|
1934
|
+
...styles$p.title,
|
|
1935
|
+
color: theme.CONTENT_PRIMARY,
|
|
1936
|
+
...titleStyle
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
)), /* @__PURE__ */ React.createElement(Pressable, { onPress: !disabled ? onToggle : void 0 }, React.cloneElement(icon, {
|
|
1940
|
+
width: moderateScale(20),
|
|
1941
|
+
height: moderateScale(20),
|
|
1942
|
+
style: styles$p.iconStyle
|
|
1943
|
+
}))),
|
|
1944
|
+
optionalElement ? optionalElement() : null,
|
|
1945
|
+
isOpen && /* @__PURE__ */ React.createElement(Animated.View, { style: [styles$p.content, { height: cardHeight }] }, /* @__PURE__ */ React.createElement(
|
|
1946
|
+
View,
|
|
1947
|
+
{
|
|
1948
|
+
ref: contentRef,
|
|
1949
|
+
onLayout: (event) => {
|
|
1950
|
+
setContentHeight(event.nativeEvent.layout.height);
|
|
1951
|
+
}
|
|
1952
|
+
},
|
|
1953
|
+
children
|
|
1954
|
+
))
|
|
1955
|
+
);
|
|
1935
1956
|
};
|
|
1957
|
+
var Accordion$1 = withThemeProvider$1(Accordion);
|
|
1936
1958
|
|
|
1937
1959
|
const styles$o = StyleSheet.create({
|
|
1938
1960
|
container: {
|
|
@@ -2166,17 +2188,12 @@ const styles$m = StyleSheet.create({
|
|
|
2166
2188
|
paddingHorizontal: horizontalScale(16),
|
|
2167
2189
|
paddingTop: verticalScale(74),
|
|
2168
2190
|
paddingBottom: verticalScale(16),
|
|
2169
|
-
|
|
2170
|
-
borderBottomWidth: 1,
|
|
2171
|
-
borderBottomColor: "#282828"
|
|
2191
|
+
borderBottomWidth: 1
|
|
2172
2192
|
},
|
|
2173
2193
|
headderContainer: {
|
|
2174
2194
|
flexDirection: "row",
|
|
2175
2195
|
alignItems: "center"
|
|
2176
2196
|
},
|
|
2177
|
-
headerTitle: {
|
|
2178
|
-
color: "#FFFFFF"
|
|
2179
|
-
},
|
|
2180
2197
|
leftIconStyle: { marginRight: horizontalScale(9) },
|
|
2181
2198
|
rightIconStyle: { marginLeft: horizontalScale(8) }
|
|
2182
2199
|
});
|
|
@@ -2191,25 +2208,39 @@ const CustomHeader = ({
|
|
|
2191
2208
|
onLeftPress,
|
|
2192
2209
|
onRightPress
|
|
2193
2210
|
}) => {
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
onPress: onLeftPress,
|
|
2198
|
-
style: styles$m.leftIconStyle
|
|
2199
|
-
}) : null, /* @__PURE__ */ React.createElement(
|
|
2200
|
-
CustomTypography,
|
|
2211
|
+
const { theme } = useTheme$1();
|
|
2212
|
+
return /* @__PURE__ */ React.createElement(
|
|
2213
|
+
View,
|
|
2201
2214
|
{
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2215
|
+
style: {
|
|
2216
|
+
...styles$m.container,
|
|
2217
|
+
backgroundColor: theme.SURFACE_SECONDARY,
|
|
2218
|
+
borderBottomColor: theme.BORDER_SEPERATOR_HEADER
|
|
2219
|
+
},
|
|
2220
|
+
testID: testId
|
|
2221
|
+
},
|
|
2222
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$m.headderContainer }, showLeftIcon && leftIcon ? React.cloneElement(leftIcon, {
|
|
2223
|
+
width: moderateScale(24),
|
|
2224
|
+
height: moderateScale(24),
|
|
2225
|
+
onPress: onLeftPress,
|
|
2226
|
+
style: styles$m.leftIconStyle
|
|
2227
|
+
}) : null, /* @__PURE__ */ React.createElement(
|
|
2228
|
+
CustomTypography,
|
|
2229
|
+
{
|
|
2230
|
+
variant: "B2_REGULAR",
|
|
2231
|
+
text: title,
|
|
2232
|
+
style: { color: theme.CONTENT_PRIMARY }
|
|
2233
|
+
}
|
|
2234
|
+
)),
|
|
2235
|
+
showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
2236
|
+
width: moderateScale(24),
|
|
2237
|
+
height: moderateScale(24),
|
|
2238
|
+
onPress: onRightPress,
|
|
2239
|
+
style: styles$m.rightIconStyle
|
|
2240
|
+
}) : null
|
|
2241
|
+
);
|
|
2212
2242
|
};
|
|
2243
|
+
var CustomHeader$1 = withThemeProvider$1(CustomHeader);
|
|
2213
2244
|
|
|
2214
2245
|
const styles$l = StyleSheet.create({
|
|
2215
2246
|
container: {
|
|
@@ -2657,11 +2688,9 @@ const styles$f = StyleSheet.create({
|
|
|
2657
2688
|
marginTop: verticalScale(24),
|
|
2658
2689
|
height: verticalScale(48),
|
|
2659
2690
|
alignItems: "center",
|
|
2660
|
-
borderRadius: moderateScale(25)
|
|
2661
|
-
backgroundColor: "#fff"
|
|
2691
|
+
borderRadius: moderateScale(25)
|
|
2662
2692
|
},
|
|
2663
2693
|
applyButtonText: {
|
|
2664
|
-
color: "#000",
|
|
2665
2694
|
...FONT_STYLES.L1_REGULAR
|
|
2666
2695
|
}
|
|
2667
2696
|
});
|
|
@@ -2672,6 +2701,7 @@ const DateRangePicker = (props) => {
|
|
|
2672
2701
|
startDate: "",
|
|
2673
2702
|
endDate: ""
|
|
2674
2703
|
});
|
|
2704
|
+
const { theme } = useTheme();
|
|
2675
2705
|
const onDayPress = (day) => {
|
|
2676
2706
|
const { dateString } = day;
|
|
2677
2707
|
const { startDate, endDate } = selectedRange;
|
|
@@ -2691,15 +2721,15 @@ const DateRangePicker = (props) => {
|
|
|
2691
2721
|
if (startDate) {
|
|
2692
2722
|
markedDates[startDate] = {
|
|
2693
2723
|
startingDay: true,
|
|
2694
|
-
color:
|
|
2695
|
-
textColor:
|
|
2724
|
+
color: theme.SUCCESS,
|
|
2725
|
+
textColor: theme.CONTENT_PRIMARY
|
|
2696
2726
|
};
|
|
2697
2727
|
}
|
|
2698
2728
|
if (endDate) {
|
|
2699
2729
|
markedDates[endDate] = {
|
|
2700
2730
|
endingDay: true,
|
|
2701
|
-
color:
|
|
2702
|
-
textColor:
|
|
2731
|
+
color: theme.SUCCESS,
|
|
2732
|
+
textColor: theme.CONTENT_PRIMARY
|
|
2703
2733
|
};
|
|
2704
2734
|
}
|
|
2705
2735
|
if (startDate && endDate) {
|
|
@@ -2708,8 +2738,8 @@ const DateRangePicker = (props) => {
|
|
|
2708
2738
|
while (start < end) {
|
|
2709
2739
|
start.setDate(start.getDate() + 1);
|
|
2710
2740
|
markedDates[start.toISOString().split("T")[0]] = {
|
|
2711
|
-
color:
|
|
2712
|
-
textColor:
|
|
2741
|
+
color: theme.SUCCESS,
|
|
2742
|
+
textColor: theme.CONTENT_PRIMARY
|
|
2713
2743
|
};
|
|
2714
2744
|
}
|
|
2715
2745
|
}
|
|
@@ -2724,14 +2754,14 @@ const DateRangePicker = (props) => {
|
|
|
2724
2754
|
markingType: "period",
|
|
2725
2755
|
theme: {
|
|
2726
2756
|
calendarBackground: "transparent",
|
|
2727
|
-
arrowColor:
|
|
2728
|
-
monthTextColor:
|
|
2729
|
-
dayTextColor:
|
|
2730
|
-
todayTextColor:
|
|
2757
|
+
arrowColor: theme.CONTENT_PRIMARY,
|
|
2758
|
+
monthTextColor: theme.CONTENT_PRIMARY,
|
|
2759
|
+
dayTextColor: theme.CONTENT_SECONDRY,
|
|
2760
|
+
todayTextColor: theme.SUCCESS
|
|
2731
2761
|
},
|
|
2732
2762
|
style: {
|
|
2733
2763
|
backgroundColor: "transparent",
|
|
2734
|
-
color:
|
|
2764
|
+
color: theme.CONTENT_SECONDRY
|
|
2735
2765
|
},
|
|
2736
2766
|
onDayPress,
|
|
2737
2767
|
...props
|
|
@@ -2743,12 +2773,16 @@ const DateRangePicker = (props) => {
|
|
|
2743
2773
|
onPress: () => {
|
|
2744
2774
|
onButtonPress(selectedRange?.startDate, selectedRange?.endDate);
|
|
2745
2775
|
},
|
|
2746
|
-
containerStyle:
|
|
2747
|
-
|
|
2776
|
+
containerStyle: {
|
|
2777
|
+
...styles$f.applyButton,
|
|
2778
|
+
backgroundColor: theme.SURFACE_INVERTED
|
|
2779
|
+
},
|
|
2780
|
+
textStyle: { color: theme.CONTENT_PRIMARY },
|
|
2748
2781
|
disabled: isButtonDisabled
|
|
2749
2782
|
}
|
|
2750
2783
|
));
|
|
2751
2784
|
};
|
|
2785
|
+
var DateRangePicker$1 = withThemeProvider(DateRangePicker);
|
|
2752
2786
|
|
|
2753
2787
|
const OurOfficesButton = ({
|
|
2754
2788
|
leftIcon,
|
|
@@ -4151,7 +4185,7 @@ const AppointmentCard = ({
|
|
|
4151
4185
|
}) => {
|
|
4152
4186
|
const { theme } = useTheme();
|
|
4153
4187
|
return /* @__PURE__ */ React.createElement(
|
|
4154
|
-
Accordion,
|
|
4188
|
+
Accordion$1,
|
|
4155
4189
|
{
|
|
4156
4190
|
title,
|
|
4157
4191
|
isOpen,
|
|
@@ -4343,5 +4377,5 @@ const PropertyDetails = ({
|
|
|
4343
4377
|
};
|
|
4344
4378
|
var index = withThemeProvider(PropertyDetails);
|
|
4345
4379
|
|
|
4346
|
-
export { Accordion, index$1 as AppointmentCard, Badge$1 as Badge, BottomDrawer, CustomButton$1 as Button, Cards, category as Category, Checkbox as CheckBox, ContactModel, CountryDropDown as CountryPicker, CustomDocumentPicker$1 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, CustomHeader, CustomIcon, CustomLoader, CustomProgressBar, CustomSearchBar, index$2 as CustomSlideButton, CustomSwitchBtn, CustomText$1 as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, FeedbackForm, FileUpload, FontStyle, Line, NotificationBandge, index$4 as OTPInput, OurOffices as OurOfficesButton, PdfView, PopUp, index as PropertyDetails, ShapeType, TagsComponent as SingleSelectionTags, Star as StarRating, index$3 as Stepper, SwipableList, Tabs$1 as Tabs, Tags, TextDirectType, CommonTextInput as TextInput, Theme, Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, Topic$1 as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
|
|
4380
|
+
export { Accordion$1 as Accordion, index$1 as AppointmentCard, Badge$1 as Badge, BottomDrawer, CustomButton$1 as Button, Cards, category as Category, Checkbox as CheckBox, ContactModel, CountryDropDown as CountryPicker, CustomDocumentPicker$1 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, CustomHeader$1 as CustomHeader, CustomIcon, CustomLoader, CustomProgressBar, CustomSearchBar, index$2 as CustomSlideButton, CustomSwitchBtn, CustomText$1 as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, DateRangePicker$1 as DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, FeedbackForm, FileUpload, FontStyle, Line, NotificationBandge, index$4 as OTPInput, OurOffices as OurOfficesButton, PdfView, PopUp, index as PropertyDetails, ShapeType, TagsComponent as SingleSelectionTags, Star as StarRating, index$3 as Stepper, SwipableList, Tabs$1 as Tabs, Tags, TextDirectType, CommonTextInput as TextInput, Theme, Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, Topic$1 as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
|
|
4347
4381
|
//# sourceMappingURL=index.mjs.map
|