dhre-ui-kit 0.0.116 → 0.0.117
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 +2 -1
- package/lib/index.js +42 -71
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +42 -71
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -352,9 +352,10 @@ interface AccordionProps {
|
|
|
352
352
|
optionalElement?: () => React$1.ReactNode;
|
|
353
353
|
headerComponent?: () => React$1.ReactNode;
|
|
354
354
|
disabled?: boolean;
|
|
355
|
+
icon: React$1.ReactElement;
|
|
355
356
|
}
|
|
356
357
|
|
|
357
|
-
declare const Accordion: ({ title, testId, containerStyle, titleStyle, headerStyle, children, isOpen, onToggle, optionalElement, headerComponent, disabled, }: AccordionProps) => React$1.JSX.Element;
|
|
358
|
+
declare const Accordion: ({ title, testId, containerStyle, titleStyle, headerStyle, children, isOpen, onToggle, optionalElement, headerComponent, disabled, icon, }: AccordionProps) => React$1.JSX.Element;
|
|
358
359
|
|
|
359
360
|
interface ToastProps {
|
|
360
361
|
}
|
package/lib/index.js
CHANGED
|
@@ -651,65 +651,6 @@ const styles$B = reactNative.StyleSheet.create({
|
|
|
651
651
|
rightIconStyle: { marginLeft: 8 }
|
|
652
652
|
});
|
|
653
653
|
|
|
654
|
-
var _path$2;
|
|
655
|
-
function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
|
|
656
|
-
var SvgCrossIcon = function SvgCrossIcon(props) {
|
|
657
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
658
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
659
|
-
width: 24,
|
|
660
|
-
height: 25,
|
|
661
|
-
fill: "none"
|
|
662
|
-
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
663
|
-
fill: "#fff",
|
|
664
|
-
d: "M17.657 8.032a.686.686 0 0 0-.97-.97L12 11.749 7.313 7.062a.686.686 0 1 0-.97.97l4.687 4.687-4.687 4.687a.686.686 0 1 0 .97.97L12 13.688l4.687 4.688a.686.686 0 1 0 .97-.97l-4.687-4.687z"
|
|
665
|
-
})));
|
|
666
|
-
};
|
|
667
|
-
|
|
668
|
-
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
|
|
669
|
-
var SvgCaretLeft = function SvgCaretLeft(props) {
|
|
670
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
671
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
672
|
-
width: 24,
|
|
673
|
-
height: 24,
|
|
674
|
-
fill: "none"
|
|
675
|
-
}, props));
|
|
676
|
-
};
|
|
677
|
-
|
|
678
|
-
var _path$1, _path2;
|
|
679
|
-
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
680
|
-
var SvgDotsThreeVertical = function SvgDotsThreeVertical(props) {
|
|
681
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
682
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
683
|
-
width: 24,
|
|
684
|
-
height: 24,
|
|
685
|
-
fill: "none"
|
|
686
|
-
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
687
|
-
fill: "#fff",
|
|
688
|
-
stroke: "#fff",
|
|
689
|
-
strokeWidth: 0.125,
|
|
690
|
-
d: "M13.438 6a1.438 1.438 0 1 1-2.876 0 1.438 1.438 0 0 1 2.876 0ZM13.438 12a1.438 1.438 0 1 1-2.876 0 1.438 1.438 0 0 1 2.876 0Z"
|
|
691
|
-
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
692
|
-
fill: "#fff",
|
|
693
|
-
d: "M12 19.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"
|
|
694
|
-
})));
|
|
695
|
-
};
|
|
696
|
-
|
|
697
|
-
var _path;
|
|
698
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
699
|
-
var SvgArrowLeft = function SvgArrowLeft(props) {
|
|
700
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
701
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
702
|
-
width: 24,
|
|
703
|
-
height: 24,
|
|
704
|
-
fill: "none"
|
|
705
|
-
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
706
|
-
fill: "#fff",
|
|
707
|
-
fillRule: "evenodd",
|
|
708
|
-
d: "M15.6 4.186a.774.774 0 0 1 .085 1.092L9.923 12l5.762 6.722a.774.774 0 0 1-1.176 1.008l-6.194-7.226a.774.774 0 0 1 0-1.008L14.51 4.27a.774.774 0 0 1 1.092-.084",
|
|
709
|
-
clipRule: "evenodd"
|
|
710
|
-
})));
|
|
711
|
-
};
|
|
712
|
-
|
|
713
654
|
const BottomDrawer = ({
|
|
714
655
|
isModalVisible,
|
|
715
656
|
toggleModal,
|
|
@@ -723,8 +664,8 @@ const BottomDrawer = ({
|
|
|
723
664
|
showBlurView = true,
|
|
724
665
|
showLeftIcon = false,
|
|
725
666
|
showRightIcon = true,
|
|
726
|
-
leftIcon
|
|
727
|
-
rightIcon
|
|
667
|
+
leftIcon,
|
|
668
|
+
rightIcon,
|
|
728
669
|
onLeftIconPress,
|
|
729
670
|
titleStyle,
|
|
730
671
|
titleVariant = "B2_REGULAR",
|
|
@@ -757,14 +698,24 @@ const BottomDrawer = ({
|
|
|
757
698
|
blurType: "light",
|
|
758
699
|
blurAmount
|
|
759
700
|
}
|
|
760
|
-
) : null, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$B.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$B.separator }), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$B.headerContainer },
|
|
701
|
+
) : null, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$B.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$B.separator }), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$B.headerContainer }, showLeftIcon && leftIcon ? React__default["default"].cloneElement(leftIcon, {
|
|
702
|
+
width: moderateScale(24),
|
|
703
|
+
height: moderateScale(24),
|
|
704
|
+
style: styles$B.leftIconStyle,
|
|
705
|
+
onPress: onLeftIconPress
|
|
706
|
+
}) : null, /* @__PURE__ */ React__default["default"].createElement(
|
|
761
707
|
CustomTypography,
|
|
762
708
|
{
|
|
763
709
|
variant: titleVariant,
|
|
764
710
|
text: title,
|
|
765
711
|
style: { ...styles$B.title, ...titleStyle }
|
|
766
712
|
}
|
|
767
|
-
)
|
|
713
|
+
), showRightIcon && rightIcon ? React__default["default"].cloneElement(rightIcon, {
|
|
714
|
+
width: moderateScale(24),
|
|
715
|
+
height: moderateScale(24),
|
|
716
|
+
style: styles$B.rightIconStyle,
|
|
717
|
+
onPress: toggleModal
|
|
718
|
+
}) : null)), children))
|
|
768
719
|
))
|
|
769
720
|
);
|
|
770
721
|
};
|
|
@@ -1969,7 +1920,8 @@ const Accordion = ({
|
|
|
1969
1920
|
optionalElement,
|
|
1970
1921
|
// Destructure the new prop,
|
|
1971
1922
|
headerComponent,
|
|
1972
|
-
disabled = false
|
|
1923
|
+
disabled = false,
|
|
1924
|
+
icon
|
|
1973
1925
|
}) => {
|
|
1974
1926
|
const contentRef = React.useRef(null);
|
|
1975
1927
|
const [animation] = React.useState(new reactNative.Animated.Value(0));
|
|
@@ -2005,7 +1957,12 @@ const Accordion = ({
|
|
|
2005
1957
|
text: title,
|
|
2006
1958
|
style: [styles$n.title, titleStyle]
|
|
2007
1959
|
}
|
|
2008
|
-
)
|
|
1960
|
+
),
|
|
1961
|
+
React__default["default"].cloneElement(icon, {
|
|
1962
|
+
width: moderateScale(20),
|
|
1963
|
+
height: moderateScale(20),
|
|
1964
|
+
style: styles$n.iconStyle
|
|
1965
|
+
})
|
|
2009
1966
|
), optionalElement ? optionalElement() : null, isOpen && /* @__PURE__ */ React__default["default"].createElement(reactNative.Animated.View, { style: [styles$n.content, { height: cardHeight }] }, /* @__PURE__ */ React__default["default"].createElement(
|
|
2010
1967
|
reactNative.View,
|
|
2011
1968
|
{
|
|
@@ -2143,6 +2100,20 @@ const Toast = React__default["default"].forwardRef((_props, ref) => {
|
|
|
2143
2100
|
});
|
|
2144
2101
|
Toast.displayName = "Toast";
|
|
2145
2102
|
|
|
2103
|
+
var _path;
|
|
2104
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2105
|
+
var SvgCrossIcon = function SvgCrossIcon(props) {
|
|
2106
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
2107
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2108
|
+
width: 24,
|
|
2109
|
+
height: 25,
|
|
2110
|
+
fill: "none"
|
|
2111
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2112
|
+
fill: "#fff",
|
|
2113
|
+
d: "M17.657 8.032a.686.686 0 0 0-.97-.97L12 11.749 7.313 7.062a.686.686 0 1 0-.97.97l4.687 4.687-4.687 4.687a.686.686 0 1 0 .97.97L12 13.688l4.687 4.688a.686.686 0 1 0 .97-.97l-4.687-4.687z"
|
|
2114
|
+
})));
|
|
2115
|
+
};
|
|
2116
|
+
|
|
2146
2117
|
const styles$l = reactNative.StyleSheet.create({
|
|
2147
2118
|
inputContainer: {
|
|
2148
2119
|
flexDirection: "row",
|
|
@@ -2262,31 +2233,31 @@ const styles$k = reactNative.StyleSheet.create({
|
|
|
2262
2233
|
const CustomHeader = ({
|
|
2263
2234
|
title,
|
|
2264
2235
|
testId = "CUSTOM-HEADER",
|
|
2265
|
-
leftIcon
|
|
2266
|
-
rightIcon
|
|
2236
|
+
leftIcon,
|
|
2237
|
+
rightIcon,
|
|
2267
2238
|
showLeftIcon = true,
|
|
2268
2239
|
showRightIcon = true,
|
|
2269
2240
|
onLeftPress,
|
|
2270
2241
|
onRightPress
|
|
2271
2242
|
}) => {
|
|
2272
|
-
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$k.container, testID: testId }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$k.headderContainer }, showLeftIcon && React__default["default"].cloneElement(leftIcon, {
|
|
2243
|
+
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$k.container, testID: testId }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$k.headderContainer }, showLeftIcon && leftIcon ? React__default["default"].cloneElement(leftIcon, {
|
|
2273
2244
|
width: moderateScale(24),
|
|
2274
2245
|
height: moderateScale(24),
|
|
2275
2246
|
onPress: onLeftPress,
|
|
2276
2247
|
style: styles$k.leftIconStyle
|
|
2277
|
-
}), /* @__PURE__ */ React__default["default"].createElement(
|
|
2248
|
+
}) : null, /* @__PURE__ */ React__default["default"].createElement(
|
|
2278
2249
|
CustomTypography,
|
|
2279
2250
|
{
|
|
2280
2251
|
variant: "B2_REGULAR",
|
|
2281
2252
|
text: title,
|
|
2282
2253
|
style: styles$k.headerTitle
|
|
2283
2254
|
}
|
|
2284
|
-
)), showRightIcon && React__default["default"].cloneElement(rightIcon, {
|
|
2255
|
+
)), showRightIcon && rightIcon ? React__default["default"].cloneElement(rightIcon, {
|
|
2285
2256
|
width: moderateScale(24),
|
|
2286
2257
|
height: moderateScale(24),
|
|
2287
2258
|
onPress: onRightPress,
|
|
2288
2259
|
style: styles$k.rightIconStyle
|
|
2289
|
-
}));
|
|
2260
|
+
}) : null);
|
|
2290
2261
|
};
|
|
2291
2262
|
|
|
2292
2263
|
const styles$j = reactNative.StyleSheet.create({
|