dhre-ui-kit 0.0.134 → 0.0.136
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 +105 -80
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +103 -78
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -635,7 +635,8 @@ const BottomDrawer = ({
|
|
|
635
635
|
onLeftIconPress,
|
|
636
636
|
titleStyle,
|
|
637
637
|
titleVariant = "B2_REGULAR",
|
|
638
|
-
showHeader = true
|
|
638
|
+
showHeader = true,
|
|
639
|
+
blurType = "light"
|
|
639
640
|
}) => {
|
|
640
641
|
const onSwipDown = (event) => {
|
|
641
642
|
const { translationY } = event.nativeEvent;
|
|
@@ -661,7 +662,7 @@ const BottomDrawer = ({
|
|
|
661
662
|
BlurView,
|
|
662
663
|
{
|
|
663
664
|
style: [styles$D.blurView, blurViewStyle],
|
|
664
|
-
blurType
|
|
665
|
+
blurType,
|
|
665
666
|
blurAmount
|
|
666
667
|
}
|
|
667
668
|
) : 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 +1858,7 @@ const CustomSwitch = ({
|
|
|
1857
1858
|
const styles$p = StyleSheet.create({
|
|
1858
1859
|
container: {
|
|
1859
1860
|
paddingVertical: verticalScale(24),
|
|
1860
|
-
borderBottomWidth: moderateScale(1)
|
|
1861
|
-
borderBottomColor: "#282828"
|
|
1861
|
+
borderBottomWidth: moderateScale(1)
|
|
1862
1862
|
},
|
|
1863
1863
|
header: {
|
|
1864
1864
|
flexDirection: "row",
|
|
@@ -1866,7 +1866,7 @@ const styles$p = StyleSheet.create({
|
|
|
1866
1866
|
alignItems: "center",
|
|
1867
1867
|
paddingHorizontal: horizontalScale(24)
|
|
1868
1868
|
},
|
|
1869
|
-
title: { flex: 1
|
|
1869
|
+
title: { flex: 1 },
|
|
1870
1870
|
iconStyle: { marginLeft: horizontalScale(20) },
|
|
1871
1871
|
content: {
|
|
1872
1872
|
overflow: "scroll",
|
|
@@ -1888,11 +1888,13 @@ const Accordion = ({
|
|
|
1888
1888
|
headerComponent,
|
|
1889
1889
|
disabled = false,
|
|
1890
1890
|
icon,
|
|
1891
|
-
onHeaderPress
|
|
1891
|
+
onHeaderPress,
|
|
1892
|
+
titleVariant = "B4_REGULAR"
|
|
1892
1893
|
}) => {
|
|
1893
1894
|
const contentRef = useRef(null);
|
|
1894
1895
|
const [animation] = useState(new Animated.Value(0));
|
|
1895
1896
|
const [contentHeight, setContentHeight] = useState(0);
|
|
1897
|
+
const { theme } = useTheme();
|
|
1896
1898
|
useEffect(() => {
|
|
1897
1899
|
if (contentRef.current) {
|
|
1898
1900
|
contentRef.current.measure((x, y, width, height) => {
|
|
@@ -1911,28 +1913,46 @@ const Accordion = ({
|
|
|
1911
1913
|
inputRange: [0, 1],
|
|
1912
1914
|
outputRange: [0, contentHeight]
|
|
1913
1915
|
});
|
|
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(
|
|
1916
|
+
return /* @__PURE__ */ React.createElement(
|
|
1926
1917
|
View,
|
|
1927
1918
|
{
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1919
|
+
style: {
|
|
1920
|
+
...styles$p.container,
|
|
1921
|
+
borderBottomColor: theme.BORDER_SEPRATOR,
|
|
1922
|
+
...containerStyle
|
|
1923
|
+
},
|
|
1924
|
+
testID: testId
|
|
1932
1925
|
},
|
|
1933
|
-
|
|
1934
|
-
|
|
1926
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles$p.header, headerStyle, disabled && { opacity: 0.5 }] }, headerComponent ? headerComponent() : /* @__PURE__ */ React.createElement(Pressable, { onPress: onHeaderPress }, /* @__PURE__ */ React.createElement(
|
|
1927
|
+
CustomTypography,
|
|
1928
|
+
{
|
|
1929
|
+
variant: titleVariant,
|
|
1930
|
+
text: title,
|
|
1931
|
+
style: {
|
|
1932
|
+
...styles$p.title,
|
|
1933
|
+
color: theme.CONTENT_PRIMARY,
|
|
1934
|
+
...titleStyle
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
)), /* @__PURE__ */ React.createElement(Pressable, { onPress: !disabled ? onToggle : void 0 }, React.cloneElement(icon, {
|
|
1938
|
+
width: moderateScale(20),
|
|
1939
|
+
height: moderateScale(20),
|
|
1940
|
+
style: styles$p.iconStyle
|
|
1941
|
+
}))),
|
|
1942
|
+
optionalElement ? optionalElement() : null,
|
|
1943
|
+
isOpen && /* @__PURE__ */ React.createElement(Animated.View, { style: [styles$p.content, { height: cardHeight }] }, /* @__PURE__ */ React.createElement(
|
|
1944
|
+
View,
|
|
1945
|
+
{
|
|
1946
|
+
ref: contentRef,
|
|
1947
|
+
onLayout: (event) => {
|
|
1948
|
+
setContentHeight(event.nativeEvent.layout.height);
|
|
1949
|
+
}
|
|
1950
|
+
},
|
|
1951
|
+
children
|
|
1952
|
+
))
|
|
1953
|
+
);
|
|
1935
1954
|
};
|
|
1955
|
+
var Accordion$1 = withThemeProvider(Accordion);
|
|
1936
1956
|
|
|
1937
1957
|
const styles$o = StyleSheet.create({
|
|
1938
1958
|
container: {
|
|
@@ -2166,17 +2186,12 @@ const styles$m = StyleSheet.create({
|
|
|
2166
2186
|
paddingHorizontal: horizontalScale(16),
|
|
2167
2187
|
paddingTop: verticalScale(74),
|
|
2168
2188
|
paddingBottom: verticalScale(16),
|
|
2169
|
-
|
|
2170
|
-
borderBottomWidth: 1,
|
|
2171
|
-
borderBottomColor: "#282828"
|
|
2189
|
+
borderBottomWidth: 1
|
|
2172
2190
|
},
|
|
2173
2191
|
headderContainer: {
|
|
2174
2192
|
flexDirection: "row",
|
|
2175
2193
|
alignItems: "center"
|
|
2176
2194
|
},
|
|
2177
|
-
headerTitle: {
|
|
2178
|
-
color: "#FFFFFF"
|
|
2179
|
-
},
|
|
2180
2195
|
leftIconStyle: { marginRight: horizontalScale(9) },
|
|
2181
2196
|
rightIconStyle: { marginLeft: horizontalScale(8) }
|
|
2182
2197
|
});
|
|
@@ -2191,25 +2206,39 @@ const CustomHeader = ({
|
|
|
2191
2206
|
onLeftPress,
|
|
2192
2207
|
onRightPress
|
|
2193
2208
|
}) => {
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
onPress: onLeftPress,
|
|
2198
|
-
style: styles$m.leftIconStyle
|
|
2199
|
-
}) : null, /* @__PURE__ */ React.createElement(
|
|
2200
|
-
CustomTypography,
|
|
2209
|
+
const { theme } = useTheme();
|
|
2210
|
+
return /* @__PURE__ */ React.createElement(
|
|
2211
|
+
View,
|
|
2201
2212
|
{
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2213
|
+
style: {
|
|
2214
|
+
...styles$m.container,
|
|
2215
|
+
backgroundColor: theme.SURFACE_SECONDARY,
|
|
2216
|
+
borderBottomColor: theme.BORDER_SEPERATOR_HEADER
|
|
2217
|
+
},
|
|
2218
|
+
testID: testId
|
|
2219
|
+
},
|
|
2220
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$m.headderContainer }, showLeftIcon && leftIcon ? React.cloneElement(leftIcon, {
|
|
2221
|
+
width: moderateScale(24),
|
|
2222
|
+
height: moderateScale(24),
|
|
2223
|
+
onPress: onLeftPress,
|
|
2224
|
+
style: styles$m.leftIconStyle
|
|
2225
|
+
}) : null, /* @__PURE__ */ React.createElement(
|
|
2226
|
+
CustomTypography,
|
|
2227
|
+
{
|
|
2228
|
+
variant: "B2_REGULAR",
|
|
2229
|
+
text: title,
|
|
2230
|
+
style: { color: theme.CONTENT_PRIMARY }
|
|
2231
|
+
}
|
|
2232
|
+
)),
|
|
2233
|
+
showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
2234
|
+
width: moderateScale(24),
|
|
2235
|
+
height: moderateScale(24),
|
|
2236
|
+
onPress: onRightPress,
|
|
2237
|
+
style: styles$m.rightIconStyle
|
|
2238
|
+
}) : null
|
|
2239
|
+
);
|
|
2212
2240
|
};
|
|
2241
|
+
var CustomHeader$1 = withThemeProvider(CustomHeader);
|
|
2213
2242
|
|
|
2214
2243
|
const styles$l = StyleSheet.create({
|
|
2215
2244
|
container: {
|
|
@@ -2218,21 +2247,14 @@ const styles$l = StyleSheet.create({
|
|
|
2218
2247
|
swippableContainer: { paddingVertical: verticalScale(16) },
|
|
2219
2248
|
actionButton: {
|
|
2220
2249
|
justifyContent: "center",
|
|
2221
|
-
alignItems: "center"
|
|
2250
|
+
alignItems: "center",
|
|
2251
|
+
paddingHorizontal: horizontalScale(24)
|
|
2222
2252
|
},
|
|
2223
2253
|
titleStyle: {
|
|
2224
2254
|
color: "#fff"
|
|
2225
2255
|
},
|
|
2226
|
-
|
|
2227
|
-
flexDirection: "row"
|
|
2228
|
-
justifyContent: "center",
|
|
2229
|
-
alignItems: "center",
|
|
2230
|
-
width: horizontalScale(150),
|
|
2231
|
-
gap: horizontalScale(24)
|
|
2232
|
-
},
|
|
2233
|
-
rightActions: {
|
|
2234
|
-
flexDirection: "row",
|
|
2235
|
-
paddingHorizontal: horizontalScale(24)
|
|
2256
|
+
actionBtn: {
|
|
2257
|
+
flexDirection: "row"
|
|
2236
2258
|
},
|
|
2237
2259
|
seprator: {
|
|
2238
2260
|
height: verticalScale(16)
|
|
@@ -2284,7 +2306,7 @@ const SwipableList = (props) => {
|
|
|
2284
2306
|
}
|
|
2285
2307
|
)
|
|
2286
2308
|
);
|
|
2287
|
-
const leftActionHandle = (item, leftPrimaryActionIcon, leftPrimaryActionTitle, leftSecondaryActionIcon, leftSecondaryActionTitle) => /* @__PURE__ */ React.createElement(View, { style:
|
|
2309
|
+
const leftActionHandle = (item, leftPrimaryActionIcon, leftPrimaryActionTitle, leftSecondaryActionIcon, leftSecondaryActionTitle) => /* @__PURE__ */ React.createElement(View, { style: styles$l.actionBtn }, leftPrimaryActionIcon && /* @__PURE__ */ React.createElement(
|
|
2288
2310
|
ActionButton,
|
|
2289
2311
|
{
|
|
2290
2312
|
icon: leftPrimaryActionIcon,
|
|
@@ -2303,7 +2325,7 @@ const SwipableList = (props) => {
|
|
|
2303
2325
|
testID: `${testId}-LEFT-SECONDARY-${item.id}`
|
|
2304
2326
|
}
|
|
2305
2327
|
));
|
|
2306
|
-
const rightActionHandle = (item) => /* @__PURE__ */ React.createElement(View, { style: [styles$l.
|
|
2328
|
+
const rightActionHandle = (item) => /* @__PURE__ */ React.createElement(View, { style: [styles$l.actionBtn, rightPrimaryActionStyle] }, rightPrimaryActionIcon && /* @__PURE__ */ React.createElement(
|
|
2307
2329
|
ActionButton,
|
|
2308
2330
|
{
|
|
2309
2331
|
icon: rightPrimaryActionIcon,
|
|
@@ -2664,11 +2686,9 @@ const styles$f = StyleSheet.create({
|
|
|
2664
2686
|
marginTop: verticalScale(24),
|
|
2665
2687
|
height: verticalScale(48),
|
|
2666
2688
|
alignItems: "center",
|
|
2667
|
-
borderRadius: moderateScale(25)
|
|
2668
|
-
backgroundColor: "#fff"
|
|
2689
|
+
borderRadius: moderateScale(25)
|
|
2669
2690
|
},
|
|
2670
2691
|
applyButtonText: {
|
|
2671
|
-
color: "#000",
|
|
2672
2692
|
...FONT_STYLES.L1_REGULAR
|
|
2673
2693
|
}
|
|
2674
2694
|
});
|
|
@@ -2679,6 +2699,7 @@ const DateRangePicker = (props) => {
|
|
|
2679
2699
|
startDate: "",
|
|
2680
2700
|
endDate: ""
|
|
2681
2701
|
});
|
|
2702
|
+
const { theme } = useTheme();
|
|
2682
2703
|
const onDayPress = (day) => {
|
|
2683
2704
|
const { dateString } = day;
|
|
2684
2705
|
const { startDate, endDate } = selectedRange;
|
|
@@ -2698,15 +2719,15 @@ const DateRangePicker = (props) => {
|
|
|
2698
2719
|
if (startDate) {
|
|
2699
2720
|
markedDates[startDate] = {
|
|
2700
2721
|
startingDay: true,
|
|
2701
|
-
color:
|
|
2702
|
-
textColor:
|
|
2722
|
+
color: theme.SUCCESS,
|
|
2723
|
+
textColor: theme.CONTENT_PRIMARY
|
|
2703
2724
|
};
|
|
2704
2725
|
}
|
|
2705
2726
|
if (endDate) {
|
|
2706
2727
|
markedDates[endDate] = {
|
|
2707
2728
|
endingDay: true,
|
|
2708
|
-
color:
|
|
2709
|
-
textColor:
|
|
2729
|
+
color: theme.SUCCESS,
|
|
2730
|
+
textColor: theme.CONTENT_PRIMARY
|
|
2710
2731
|
};
|
|
2711
2732
|
}
|
|
2712
2733
|
if (startDate && endDate) {
|
|
@@ -2715,8 +2736,8 @@ const DateRangePicker = (props) => {
|
|
|
2715
2736
|
while (start < end) {
|
|
2716
2737
|
start.setDate(start.getDate() + 1);
|
|
2717
2738
|
markedDates[start.toISOString().split("T")[0]] = {
|
|
2718
|
-
color:
|
|
2719
|
-
textColor:
|
|
2739
|
+
color: theme.SUCCESS,
|
|
2740
|
+
textColor: theme.CONTENT_PRIMARY
|
|
2720
2741
|
};
|
|
2721
2742
|
}
|
|
2722
2743
|
}
|
|
@@ -2731,14 +2752,14 @@ const DateRangePicker = (props) => {
|
|
|
2731
2752
|
markingType: "period",
|
|
2732
2753
|
theme: {
|
|
2733
2754
|
calendarBackground: "transparent",
|
|
2734
|
-
arrowColor:
|
|
2735
|
-
monthTextColor:
|
|
2736
|
-
dayTextColor:
|
|
2737
|
-
todayTextColor:
|
|
2755
|
+
arrowColor: theme.CONTENT_PRIMARY,
|
|
2756
|
+
monthTextColor: theme.CONTENT_PRIMARY,
|
|
2757
|
+
dayTextColor: theme.CONTENT_SECONDRY,
|
|
2758
|
+
todayTextColor: theme.SUCCESS
|
|
2738
2759
|
},
|
|
2739
2760
|
style: {
|
|
2740
2761
|
backgroundColor: "transparent",
|
|
2741
|
-
color:
|
|
2762
|
+
color: theme.CONTENT_SECONDRY
|
|
2742
2763
|
},
|
|
2743
2764
|
onDayPress,
|
|
2744
2765
|
...props
|
|
@@ -2750,12 +2771,16 @@ const DateRangePicker = (props) => {
|
|
|
2750
2771
|
onPress: () => {
|
|
2751
2772
|
onButtonPress(selectedRange?.startDate, selectedRange?.endDate);
|
|
2752
2773
|
},
|
|
2753
|
-
containerStyle:
|
|
2754
|
-
|
|
2774
|
+
containerStyle: {
|
|
2775
|
+
...styles$f.applyButton,
|
|
2776
|
+
backgroundColor: theme.SURFACE_INVERTED
|
|
2777
|
+
},
|
|
2778
|
+
textStyle: { color: theme.CONTENT_PRIMARY },
|
|
2755
2779
|
disabled: isButtonDisabled
|
|
2756
2780
|
}
|
|
2757
2781
|
));
|
|
2758
2782
|
};
|
|
2783
|
+
var DateRangePicker$1 = withThemeProvider(DateRangePicker);
|
|
2759
2784
|
|
|
2760
2785
|
const OurOfficesButton = ({
|
|
2761
2786
|
leftIcon,
|
|
@@ -4158,7 +4183,7 @@ const AppointmentCard = ({
|
|
|
4158
4183
|
}) => {
|
|
4159
4184
|
const { theme } = useTheme();
|
|
4160
4185
|
return /* @__PURE__ */ React.createElement(
|
|
4161
|
-
Accordion,
|
|
4186
|
+
Accordion$1,
|
|
4162
4187
|
{
|
|
4163
4188
|
title,
|
|
4164
4189
|
isOpen,
|
|
@@ -4350,5 +4375,5 @@ const PropertyDetails = ({
|
|
|
4350
4375
|
};
|
|
4351
4376
|
var index = withThemeProvider(PropertyDetails);
|
|
4352
4377
|
|
|
4353
|
-
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 };
|
|
4378
|
+
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 };
|
|
4354
4379
|
//# sourceMappingURL=index.mjs.map
|