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.mjs CHANGED
@@ -618,65 +618,6 @@ const styles$B = StyleSheet.create({
618
618
  rightIconStyle: { marginLeft: 8 }
619
619
  });
620
620
 
621
- var _path$2;
622
- 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); }
623
- var SvgCrossIcon = function SvgCrossIcon(props) {
624
- return /*#__PURE__*/React.createElement("svg", _extends$3({
625
- xmlns: "http://www.w3.org/2000/svg",
626
- width: 24,
627
- height: 25,
628
- fill: "none"
629
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
630
- fill: "#fff",
631
- 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"
632
- })));
633
- };
634
-
635
- 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); }
636
- var SvgCaretLeft = function SvgCaretLeft(props) {
637
- return /*#__PURE__*/React.createElement("svg", _extends$2({
638
- xmlns: "http://www.w3.org/2000/svg",
639
- width: 24,
640
- height: 24,
641
- fill: "none"
642
- }, props));
643
- };
644
-
645
- var _path$1, _path2;
646
- 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); }
647
- var SvgDotsThreeVertical = function SvgDotsThreeVertical(props) {
648
- return /*#__PURE__*/React.createElement("svg", _extends$1({
649
- xmlns: "http://www.w3.org/2000/svg",
650
- width: 24,
651
- height: 24,
652
- fill: "none"
653
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
654
- fill: "#fff",
655
- stroke: "#fff",
656
- strokeWidth: 0.125,
657
- 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"
658
- })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
659
- fill: "#fff",
660
- d: "M12 19.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"
661
- })));
662
- };
663
-
664
- var _path;
665
- 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); }
666
- var SvgArrowLeft = function SvgArrowLeft(props) {
667
- return /*#__PURE__*/React.createElement("svg", _extends({
668
- xmlns: "http://www.w3.org/2000/svg",
669
- width: 24,
670
- height: 24,
671
- fill: "none"
672
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
673
- fill: "#fff",
674
- fillRule: "evenodd",
675
- 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",
676
- clipRule: "evenodd"
677
- })));
678
- };
679
-
680
621
  const BottomDrawer = ({
681
622
  isModalVisible,
682
623
  toggleModal,
@@ -690,8 +631,8 @@ const BottomDrawer = ({
690
631
  showBlurView = true,
691
632
  showLeftIcon = false,
692
633
  showRightIcon = true,
693
- leftIcon = /* @__PURE__ */ React__default.createElement(SvgArrowLeft, null),
694
- rightIcon = /* @__PURE__ */ React__default.createElement(SvgCrossIcon, null),
634
+ leftIcon,
635
+ rightIcon,
695
636
  onLeftIconPress,
696
637
  titleStyle,
697
638
  titleVariant = "B2_REGULAR",
@@ -724,14 +665,24 @@ const BottomDrawer = ({
724
665
  blurType: "light",
725
666
  blurAmount
726
667
  }
727
- ) : null, /* @__PURE__ */ React__default.createElement(View, { style: [styles$B.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(View, { style: styles$B.separator }), /* @__PURE__ */ React__default.createElement(View, { style: styles$B.headerContainer }, /* @__PURE__ */ React__default.createElement(
668
+ ) : null, /* @__PURE__ */ React__default.createElement(View, { style: [styles$B.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(View, { style: styles$B.separator }), /* @__PURE__ */ React__default.createElement(View, { style: styles$B.headerContainer }, showLeftIcon && leftIcon ? React__default.cloneElement(leftIcon, {
669
+ width: moderateScale(24),
670
+ height: moderateScale(24),
671
+ style: styles$B.leftIconStyle,
672
+ onPress: onLeftIconPress
673
+ }) : null, /* @__PURE__ */ React__default.createElement(
728
674
  CustomTypography,
729
675
  {
730
676
  variant: titleVariant,
731
677
  text: title,
732
678
  style: { ...styles$B.title, ...titleStyle }
733
679
  }
734
- ))), children))
680
+ ), showRightIcon && rightIcon ? React__default.cloneElement(rightIcon, {
681
+ width: moderateScale(24),
682
+ height: moderateScale(24),
683
+ style: styles$B.rightIconStyle,
684
+ onPress: toggleModal
685
+ }) : null)), children))
735
686
  ))
736
687
  );
737
688
  };
@@ -1936,7 +1887,8 @@ const Accordion = ({
1936
1887
  optionalElement,
1937
1888
  // Destructure the new prop,
1938
1889
  headerComponent,
1939
- disabled = false
1890
+ disabled = false,
1891
+ icon
1940
1892
  }) => {
1941
1893
  const contentRef = useRef(null);
1942
1894
  const [animation] = useState(new Animated.Value(0));
@@ -1972,7 +1924,12 @@ const Accordion = ({
1972
1924
  text: title,
1973
1925
  style: [styles$n.title, titleStyle]
1974
1926
  }
1975
- )
1927
+ ),
1928
+ React__default.cloneElement(icon, {
1929
+ width: moderateScale(20),
1930
+ height: moderateScale(20),
1931
+ style: styles$n.iconStyle
1932
+ })
1976
1933
  ), optionalElement ? optionalElement() : null, isOpen && /* @__PURE__ */ React__default.createElement(Animated.View, { style: [styles$n.content, { height: cardHeight }] }, /* @__PURE__ */ React__default.createElement(
1977
1934
  View,
1978
1935
  {
@@ -2110,6 +2067,20 @@ const Toast = React__default.forwardRef((_props, ref) => {
2110
2067
  });
2111
2068
  Toast.displayName = "Toast";
2112
2069
 
2070
+ var _path;
2071
+ 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); }
2072
+ var SvgCrossIcon = function SvgCrossIcon(props) {
2073
+ return /*#__PURE__*/React.createElement("svg", _extends({
2074
+ xmlns: "http://www.w3.org/2000/svg",
2075
+ width: 24,
2076
+ height: 25,
2077
+ fill: "none"
2078
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
2079
+ fill: "#fff",
2080
+ 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"
2081
+ })));
2082
+ };
2083
+
2113
2084
  const styles$l = StyleSheet.create({
2114
2085
  inputContainer: {
2115
2086
  flexDirection: "row",
@@ -2229,31 +2200,31 @@ const styles$k = StyleSheet.create({
2229
2200
  const CustomHeader = ({
2230
2201
  title,
2231
2202
  testId = "CUSTOM-HEADER",
2232
- leftIcon = /* @__PURE__ */ React__default.createElement(SvgCaretLeft, null),
2233
- rightIcon = /* @__PURE__ */ React__default.createElement(SvgDotsThreeVertical, null),
2203
+ leftIcon,
2204
+ rightIcon,
2234
2205
  showLeftIcon = true,
2235
2206
  showRightIcon = true,
2236
2207
  onLeftPress,
2237
2208
  onRightPress
2238
2209
  }) => {
2239
- return /* @__PURE__ */ React__default.createElement(View, { style: styles$k.container, testID: testId }, /* @__PURE__ */ React__default.createElement(View, { style: styles$k.headderContainer }, showLeftIcon && React__default.cloneElement(leftIcon, {
2210
+ return /* @__PURE__ */ React__default.createElement(View, { style: styles$k.container, testID: testId }, /* @__PURE__ */ React__default.createElement(View, { style: styles$k.headderContainer }, showLeftIcon && leftIcon ? React__default.cloneElement(leftIcon, {
2240
2211
  width: moderateScale(24),
2241
2212
  height: moderateScale(24),
2242
2213
  onPress: onLeftPress,
2243
2214
  style: styles$k.leftIconStyle
2244
- }), /* @__PURE__ */ React__default.createElement(
2215
+ }) : null, /* @__PURE__ */ React__default.createElement(
2245
2216
  CustomTypography,
2246
2217
  {
2247
2218
  variant: "B2_REGULAR",
2248
2219
  text: title,
2249
2220
  style: styles$k.headerTitle
2250
2221
  }
2251
- )), showRightIcon && React__default.cloneElement(rightIcon, {
2222
+ )), showRightIcon && rightIcon ? React__default.cloneElement(rightIcon, {
2252
2223
  width: moderateScale(24),
2253
2224
  height: moderateScale(24),
2254
2225
  onPress: onRightPress,
2255
2226
  style: styles$k.rightIconStyle
2256
- }));
2227
+ }) : null);
2257
2228
  };
2258
2229
 
2259
2230
  const styles$j = StyleSheet.create({