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.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,66 +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
- viewBox: "0 0 24 24"
676
- }, props));
677
- };
678
-
679
- var _path$1, _path2;
680
- 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); }
681
- var SvgDotsThreeVertical = function SvgDotsThreeVertical(props) {
682
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
683
- xmlns: "http://www.w3.org/2000/svg",
684
- width: 24,
685
- height: 24,
686
- fill: "none"
687
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
688
- fill: "#fff",
689
- stroke: "#fff",
690
- strokeWidth: 0.125,
691
- 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"
692
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
693
- fill: "#fff",
694
- d: "M12 19.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"
695
- })));
696
- };
697
-
698
- var _path;
699
- 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); }
700
- var SvgArrowLeft = function SvgArrowLeft(props) {
701
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
702
- xmlns: "http://www.w3.org/2000/svg",
703
- width: 24,
704
- height: 24,
705
- fill: "none"
706
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
707
- fill: "#fff",
708
- fillRule: "evenodd",
709
- 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",
710
- clipRule: "evenodd"
711
- })));
712
- };
713
-
714
654
  const BottomDrawer = ({
715
655
  isModalVisible,
716
656
  toggleModal,
@@ -724,8 +664,8 @@ const BottomDrawer = ({
724
664
  showBlurView = true,
725
665
  showLeftIcon = false,
726
666
  showRightIcon = true,
727
- leftIcon = /* @__PURE__ */ React__default["default"].createElement(SvgArrowLeft, null),
728
- rightIcon = /* @__PURE__ */ React__default["default"].createElement(SvgCrossIcon, null),
667
+ leftIcon,
668
+ rightIcon,
729
669
  onLeftIconPress,
730
670
  titleStyle,
731
671
  titleVariant = "B2_REGULAR",
@@ -758,14 +698,24 @@ const BottomDrawer = ({
758
698
  blurType: "light",
759
699
  blurAmount
760
700
  }
761
- ) : 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 }, /* @__PURE__ */ React__default["default"].createElement(
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(
762
707
  CustomTypography,
763
708
  {
764
709
  variant: titleVariant,
765
710
  text: title,
766
711
  style: { ...styles$B.title, ...titleStyle }
767
712
  }
768
- ))), children))
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))
769
719
  ))
770
720
  );
771
721
  };
@@ -1970,7 +1920,8 @@ const Accordion = ({
1970
1920
  optionalElement,
1971
1921
  // Destructure the new prop,
1972
1922
  headerComponent,
1973
- disabled = false
1923
+ disabled = false,
1924
+ icon
1974
1925
  }) => {
1975
1926
  const contentRef = React.useRef(null);
1976
1927
  const [animation] = React.useState(new reactNative.Animated.Value(0));
@@ -2006,7 +1957,12 @@ const Accordion = ({
2006
1957
  text: title,
2007
1958
  style: [styles$n.title, titleStyle]
2008
1959
  }
2009
- )
1960
+ ),
1961
+ React__default["default"].cloneElement(icon, {
1962
+ width: moderateScale(20),
1963
+ height: moderateScale(20),
1964
+ style: styles$n.iconStyle
1965
+ })
2010
1966
  ), optionalElement ? optionalElement() : null, isOpen && /* @__PURE__ */ React__default["default"].createElement(reactNative.Animated.View, { style: [styles$n.content, { height: cardHeight }] }, /* @__PURE__ */ React__default["default"].createElement(
2011
1967
  reactNative.View,
2012
1968
  {
@@ -2144,6 +2100,20 @@ const Toast = React__default["default"].forwardRef((_props, ref) => {
2144
2100
  });
2145
2101
  Toast.displayName = "Toast";
2146
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
+
2147
2117
  const styles$l = reactNative.StyleSheet.create({
2148
2118
  inputContainer: {
2149
2119
  flexDirection: "row",
@@ -2263,31 +2233,31 @@ const styles$k = reactNative.StyleSheet.create({
2263
2233
  const CustomHeader = ({
2264
2234
  title,
2265
2235
  testId = "CUSTOM-HEADER",
2266
- leftIcon = /* @__PURE__ */ React__default["default"].createElement(SvgCaretLeft, null),
2267
- rightIcon = /* @__PURE__ */ React__default["default"].createElement(SvgDotsThreeVertical, null),
2236
+ leftIcon,
2237
+ rightIcon,
2268
2238
  showLeftIcon = true,
2269
2239
  showRightIcon = true,
2270
2240
  onLeftPress,
2271
2241
  onRightPress
2272
2242
  }) => {
2273
- 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, {
2274
2244
  width: moderateScale(24),
2275
2245
  height: moderateScale(24),
2276
2246
  onPress: onLeftPress,
2277
2247
  style: styles$k.leftIconStyle
2278
- }), /* @__PURE__ */ React__default["default"].createElement(
2248
+ }) : null, /* @__PURE__ */ React__default["default"].createElement(
2279
2249
  CustomTypography,
2280
2250
  {
2281
2251
  variant: "B2_REGULAR",
2282
2252
  text: title,
2283
2253
  style: styles$k.headerTitle
2284
2254
  }
2285
- )), showRightIcon && React__default["default"].cloneElement(rightIcon, {
2255
+ )), showRightIcon && rightIcon ? React__default["default"].cloneElement(rightIcon, {
2286
2256
  width: moderateScale(24),
2287
2257
  height: moderateScale(24),
2288
2258
  onPress: onRightPress,
2289
2259
  style: styles$k.rightIconStyle
2290
- }));
2260
+ }) : null);
2291
2261
  };
2292
2262
 
2293
2263
  const styles$j = reactNative.StyleSheet.create({