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