dhre-ui-kit 3.0.0 → 3.0.1

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
@@ -1,7 +1,7 @@
1
1
  import React, { createContext, useContext, useState, useEffect, useRef, useCallback, useMemo, memo } from 'react';
2
2
  import { useSelector } from 'react-redux';
3
3
  import { Dimensions, StyleSheet, Text, Pressable, View, Platform, KeyboardAvoidingView, ActivityIndicator, TextInput, ScrollView, Animated, FlatList, Easing, TouchableOpacity, Modal as Modal$1, Alert, Linking, I18nManager, PanResponder, Image } from 'react-native';
4
- import Svg, { Defs, LinearGradient, Stop, RadialGradient, Rect, Circle } from 'react-native-svg';
4
+ import Svg, { Defs, LinearGradient, Stop, RadialGradient, Rect, Circle, Svg as Svg$1, Path } from 'react-native-svg';
5
5
  import Modal from 'react-native-modal';
6
6
  import Clipboard from '@react-native-clipboard/clipboard';
7
7
  import LinearGradient$1 from 'react-native-linear-gradient';
@@ -186,6 +186,7 @@ var Theme = /* @__PURE__ */ ((Theme2) => {
186
186
  Theme2["STROKE_INFO"] = "STROKE_INFO";
187
187
  Theme2["STROKE_DISABLED_DARK"] = "STROKE_DISABLED_DARK";
188
188
  Theme2["STROKE_DISABLED_DARK2"] = "STROKE_DISABLED_DARK2";
189
+ Theme2["STROKE_ACTIVE"] = "STROKE_ACTIVE";
189
190
  return Theme2;
190
191
  })(Theme || {});
191
192
 
@@ -449,6 +450,14 @@ const DHRE_RED_ERROR = {
449
450
  TRANSPARENT_400_60: "rgba(235, 5, 66, 0.60)",
450
451
  TRANSPARENT_400_10: "rgba(235, 5, 66, 0.10)"
451
452
  };
453
+ const DHRE_CONFIRMATION_ERROR_GRADIENT = {
454
+ light: ["#F0809E", "#FFFFFF"],
455
+ dark: ["#EB0542", "#000A28"]
456
+ };
457
+ const DHRE_CONFIRMATION_BASE_GRADIENT = {
458
+ light: ["rgba(165, 233, 255, 0)", "#52C5E8"],
459
+ dark: ["rgba(165, 233, 255, 0)", "#279DC1"]
460
+ };
452
461
 
453
462
  const theme = {
454
463
  [Theme.SURFACE_PRIMARY]: {
@@ -529,7 +538,7 @@ const theme = {
529
538
  },
530
539
  [Theme.SURFACE_SUCCESS]: {
531
540
  light: "#89C798",
532
- dark: "#347243"
541
+ dark: "#4EAB65"
533
542
  },
534
543
  [Theme.SURFACE_SUCCESS_TRANSPARENT]: {
535
544
  light: "rgba(137, 199, 152, 0.10)",
@@ -537,7 +546,7 @@ const theme = {
537
546
  },
538
547
  [Theme.SURFACE_INFO]: {
539
548
  light: "#52C5E8",
540
- dark: "#07556C"
549
+ dark: "#279DC1"
541
550
  },
542
551
  [Theme.SURFACE_INFO_TRANSPARENT]: {
543
552
  light: "rgba(233, 248, 255, 0.35)",
@@ -552,8 +561,8 @@ const theme = {
552
561
  dark: "rgba(238, 170, 106, 0.60)"
553
562
  },
554
563
  [Theme.SURFACE_ERROR]: {
555
- light: "#FFF2F5",
556
- dark: "#9D032C"
564
+ light: "#F0809E",
565
+ dark: "#EB0542"
557
566
  },
558
567
  [Theme.SURFACE_ERROR_TRANSPARENT]: {
559
568
  light: "rgba(235, 5, 66, 0.10)",
@@ -568,8 +577,8 @@ const theme = {
568
577
  dark: "#BFC7DB"
569
578
  },
570
579
  [Theme.CONTENT_TERTIARY]: {
571
- light: "#4D5F86",
572
- dark: "#8994AF"
580
+ light: "#6F7681",
581
+ dark: "#9FA4AB"
573
582
  },
574
583
  [Theme.CONTENT_SECONDARY_TEXT]: {
575
584
  light: "#686868",
@@ -786,6 +795,11 @@ const theme = {
786
795
  [Theme.STROKE_DISABLED_DARK2]: {
787
796
  dark: DHRE_DEEP_SPACE_BLUE[800],
788
797
  light: DHRE_DEEP_SPACE_BLUE[200]
798
+ },
799
+ [Theme.STROKE_ACTIVE]: {
800
+ dark: "#009db3",
801
+ light: "#009db3"
802
+ // light-theme value pending DHDS Figma spec
789
803
  }
790
804
  };
791
805
 
@@ -817,64 +831,65 @@ const horizontalScale = (size) => width / guidelineBaseWidth * size;
817
831
  const verticalScale = (size) => height / guidelineBaseHeight * size;
818
832
  const moderateScale = (size, factor = 0.5) => size + (horizontalScale(size) - size) * factor;
819
833
 
820
- const createFontStyle = (fontFamily, fontSize, lineHeight) => ({
834
+ const createFontStyle = (fontFamily, fontSize, lineHeight, fontWeight) => ({
821
835
  fontSize: moderateScale(fontSize),
822
836
  lineHeight: verticalScale(lineHeight),
823
- fontFamily
837
+ fontFamily,
838
+ fontWeight
824
839
  });
825
840
  const InterBold = "Inter-Bold";
826
841
  const InterLight = "Inter-Light";
827
842
  const InterMedium = "Inter-Medium";
828
843
  const FONT_STYLES = {
829
- [FontStyle.H1_BOLD]: createFontStyle(InterBold, 48, 56),
830
- [FontStyle.H2_BOLD]: createFontStyle(InterBold, 40, 48),
831
- [FontStyle.H3_BOLD]: createFontStyle(InterBold, 32, 40),
832
- [FontStyle.H4_BOLD]: createFontStyle(InterBold, 24, 32),
833
- [FontStyle.H5_BOLD]: createFontStyle(InterBold, 20, 28),
834
- [FontStyle.H6_BOLD]: createFontStyle(InterBold, 16, 20),
835
- [FontStyle.H7_BOLD]: createFontStyle(InterBold, 20, 28),
836
- [FontStyle.H8_BOLD]: createFontStyle(InterBold, 18, 25.2),
837
- [FontStyle.H1_MEDIUM]: createFontStyle(InterMedium, 48, 56),
838
- [FontStyle.H2_MEDIUM]: createFontStyle(InterMedium, 40, 48),
839
- [FontStyle.H3_MEDIUM]: createFontStyle(InterMedium, 32, 40),
840
- [FontStyle.H4_MEDIUM]: createFontStyle(InterMedium, 24, 32),
841
- [FontStyle.H5_MEDIUM]: createFontStyle(InterMedium, 20, 28),
842
- [FontStyle.H6_MEDIUM]: createFontStyle(InterMedium, 16, 20),
843
- [FontStyle.H7_MEDIUM]: createFontStyle(InterMedium, 20, 28),
844
- [FontStyle.H8_MEDIUM]: createFontStyle(InterMedium, 18, 25.2),
845
- [FontStyle.H1_LIGHT]: createFontStyle(InterLight, 48, 56),
846
- [FontStyle.H2_LIGHT]: createFontStyle(InterLight, 40, 48),
847
- [FontStyle.H3_LIGHT]: createFontStyle(InterLight, 32, 40),
848
- [FontStyle.H4_LIGHT]: createFontStyle(InterLight, 24, 32),
849
- [FontStyle.H5_LIGHT]: createFontStyle(InterLight, 20, 28),
850
- [FontStyle.H6_LIGHT]: createFontStyle(InterLight, 16, 20),
851
- [FontStyle.H7_LIGHT]: createFontStyle(InterLight, 20, 28),
852
- [FontStyle.H8_LIGHT]: createFontStyle(InterLight, 18, 25.2),
853
- [FontStyle.H1_LINK]: createFontStyle(InterLight, 48, 56),
854
- [FontStyle.H2_LINK]: createFontStyle(InterLight, 40, 48),
855
- [FontStyle.H3_LINK]: createFontStyle(InterLight, 32, 40),
856
- [FontStyle.H4_LINK]: createFontStyle(InterLight, 24, 32),
857
- [FontStyle.H5_LINK]: createFontStyle(InterLight, 20, 28),
858
- [FontStyle.H6_LINK]: createFontStyle(InterLight, 16, 20),
859
- [FontStyle.H7_LINK]: createFontStyle(InterLight, 20, 28),
860
- [FontStyle.H8_LINK]: createFontStyle(InterLight, 18, 25.2),
844
+ [FontStyle.H1_BOLD]: createFontStyle(InterBold, 48, 56, "700"),
845
+ [FontStyle.H2_BOLD]: createFontStyle(InterBold, 40, 48, "700"),
846
+ [FontStyle.H3_BOLD]: createFontStyle(InterBold, 32, 40, "700"),
847
+ [FontStyle.H4_BOLD]: createFontStyle(InterBold, 24, 32, "700"),
848
+ [FontStyle.H5_BOLD]: createFontStyle(InterBold, 20, 28, "700"),
849
+ [FontStyle.H6_BOLD]: createFontStyle(InterBold, 16, 20, "700"),
850
+ [FontStyle.H7_BOLD]: createFontStyle(InterBold, 20, 28, "700"),
851
+ [FontStyle.H8_BOLD]: createFontStyle(InterBold, 18, 25.2, "700"),
852
+ [FontStyle.H1_MEDIUM]: createFontStyle(InterMedium, 48, 56, "500"),
853
+ [FontStyle.H2_MEDIUM]: createFontStyle(InterMedium, 40, 48, "500"),
854
+ [FontStyle.H3_MEDIUM]: createFontStyle(InterMedium, 32, 40, "500"),
855
+ [FontStyle.H4_MEDIUM]: createFontStyle(InterMedium, 24, 32, "500"),
856
+ [FontStyle.H5_MEDIUM]: createFontStyle(InterMedium, 20, 28, "500"),
857
+ [FontStyle.H6_MEDIUM]: createFontStyle(InterMedium, 16, 20, "500"),
858
+ [FontStyle.H7_MEDIUM]: createFontStyle(InterMedium, 20, 28, "500"),
859
+ [FontStyle.H8_MEDIUM]: createFontStyle(InterMedium, 18, 25.2, "500"),
860
+ [FontStyle.H1_LIGHT]: createFontStyle(InterLight, 48, 56, "300"),
861
+ [FontStyle.H2_LIGHT]: createFontStyle(InterLight, 40, 48, "300"),
862
+ [FontStyle.H3_LIGHT]: createFontStyle(InterLight, 32, 40, "300"),
863
+ [FontStyle.H4_LIGHT]: createFontStyle(InterLight, 24, 32, "300"),
864
+ [FontStyle.H5_LIGHT]: createFontStyle(InterLight, 20, 28, "300"),
865
+ [FontStyle.H6_LIGHT]: createFontStyle(InterLight, 16, 20, "300"),
866
+ [FontStyle.H7_LIGHT]: createFontStyle(InterLight, 20, 28, "300"),
867
+ [FontStyle.H8_LIGHT]: createFontStyle(InterLight, 18, 25.2, "300"),
868
+ [FontStyle.H1_LINK]: createFontStyle(InterLight, 48, 56, "300"),
869
+ [FontStyle.H2_LINK]: createFontStyle(InterLight, 40, 48, "300"),
870
+ [FontStyle.H3_LINK]: createFontStyle(InterLight, 32, 40, "300"),
871
+ [FontStyle.H4_LINK]: createFontStyle(InterLight, 24, 32, "300"),
872
+ [FontStyle.H5_LINK]: createFontStyle(InterLight, 20, 28, "300"),
873
+ [FontStyle.H6_LINK]: createFontStyle(InterLight, 16, 20, "500"),
874
+ [FontStyle.H7_LINK]: createFontStyle(InterLight, 20, 28, "500"),
875
+ [FontStyle.H8_LINK]: createFontStyle(InterLight, 18, 25.2, "500"),
861
876
  // Lifestyle body styles
862
- [FontStyle.BODY1_BOLD]: createFontStyle(InterBold, 16, 20),
863
- [FontStyle.BODY2_BOLD]: createFontStyle(InterBold, 14, 18),
864
- [FontStyle.BODY3_BOLD]: createFontStyle(InterBold, 12, 16),
865
- [FontStyle.BODY4_BOLD]: createFontStyle(InterBold, 11, 12),
866
- [FontStyle.BODY1_MEDIUM]: createFontStyle(InterMedium, 16, 20),
867
- [FontStyle.BODY2_MEDIUM]: createFontStyle(InterMedium, 14, 18),
868
- [FontStyle.BODY3_MEDIUM]: createFontStyle(InterMedium, 12, 16),
869
- [FontStyle.BODY4_MEDIUM]: createFontStyle(InterMedium, 11, 12),
870
- [FontStyle.BODY1_LIGHT]: createFontStyle(InterLight, 16, 20),
871
- [FontStyle.BODY2_LIGHT]: createFontStyle(InterLight, 14, 18),
872
- [FontStyle.BODY3_LIGHT]: createFontStyle(InterLight, 12, 16),
873
- [FontStyle.BODY4_LIGHT]: createFontStyle(InterLight, 11, 12),
874
- [FontStyle.BODY1_LINK]: createFontStyle(InterLight, 16, 20),
875
- [FontStyle.BODY2_LINK]: createFontStyle(InterLight, 14, 18),
876
- [FontStyle.BODY3_LINK]: createFontStyle(InterLight, 12, 16),
877
- [FontStyle.BODY4_LINK]: createFontStyle(InterLight, 11, 12)
877
+ [FontStyle.BODY1_BOLD]: createFontStyle(InterBold, 16, 20, "700"),
878
+ [FontStyle.BODY2_BOLD]: createFontStyle(InterBold, 14, 18, "700"),
879
+ [FontStyle.BODY3_BOLD]: createFontStyle(InterBold, 12, 16, "700"),
880
+ [FontStyle.BODY4_BOLD]: createFontStyle(InterBold, 11, 12, "700"),
881
+ [FontStyle.BODY1_MEDIUM]: createFontStyle(InterMedium, 16, 20, "500"),
882
+ [FontStyle.BODY2_MEDIUM]: createFontStyle(InterMedium, 14, 18, "500"),
883
+ [FontStyle.BODY3_MEDIUM]: createFontStyle(InterMedium, 12, 16, "500"),
884
+ [FontStyle.BODY4_MEDIUM]: createFontStyle(InterMedium, 11, 12, "500"),
885
+ [FontStyle.BODY1_LIGHT]: createFontStyle(InterLight, 16, 20, "300"),
886
+ [FontStyle.BODY2_LIGHT]: createFontStyle(InterLight, 14, 18, "300"),
887
+ [FontStyle.BODY3_LIGHT]: createFontStyle(InterLight, 12, 16, "300"),
888
+ [FontStyle.BODY4_LIGHT]: createFontStyle(InterLight, 11, 12, "300"),
889
+ [FontStyle.BODY1_LINK]: createFontStyle(InterLight, 16, 20, "500"),
890
+ [FontStyle.BODY2_LINK]: createFontStyle(InterLight, 14, 18, "500"),
891
+ [FontStyle.BODY3_LINK]: createFontStyle(InterLight, 12, 16, "500"),
892
+ [FontStyle.BODY4_LINK]: createFontStyle(InterLight, 11, 12, "500")
878
893
  };
879
894
 
880
895
  const CustomTypography = ({
@@ -2363,7 +2378,7 @@ const CustomTextInput = ({
2363
2378
  const CustomTooltip = (props) => {
2364
2379
  const { triggerElement, contentStyle } = props;
2365
2380
  return /* @__PURE__ */ React.createElement(Tooltip, { ...props, contentStyle: [contentStyle, {
2366
- borderRadius: 0
2381
+ borderRadius: DHRE_PADDING.MD
2367
2382
  }] }, triggerElement);
2368
2383
  };
2369
2384
 
@@ -3151,12 +3166,13 @@ const Accordion = ({
3151
3166
  return /* @__PURE__ */ React.createElement(
3152
3167
  View,
3153
3168
  {
3154
- style: [{
3155
- ...styles$l.container,
3156
- borderBottomColor: theme.SURFACE_PRIMARY_TRANSPARENT,
3157
- ...containerStyle,
3158
- borderRadius: 0
3159
- }],
3169
+ style: [
3170
+ {
3171
+ ...styles$l.container,
3172
+ borderRadius: 0,
3173
+ ...containerStyle
3174
+ }
3175
+ ],
3160
3176
  testID: testId
3161
3177
  },
3162
3178
  /* @__PURE__ */ React.createElement(
@@ -3184,16 +3200,22 @@ const Accordion = ({
3184
3200
  }) : null
3185
3201
  ),
3186
3202
  optionalElement ? optionalElement() : null,
3187
- isOpen && /* @__PURE__ */ React.createElement(Animated.View, { style: [styles$l.content, slideAnimation && { height: cardHeight }] }, /* @__PURE__ */ React.createElement(
3188
- View,
3203
+ isOpen && /* @__PURE__ */ React.createElement(
3204
+ Animated.View,
3189
3205
  {
3190
- ref: contentRef,
3191
- onLayout: (event) => {
3192
- setContentHeight(event.nativeEvent.layout.height);
3193
- }
3206
+ style: [styles$l.content, slideAnimation && { height: cardHeight }]
3194
3207
  },
3195
- children
3196
- ))
3208
+ /* @__PURE__ */ React.createElement(
3209
+ View,
3210
+ {
3211
+ ref: contentRef,
3212
+ onLayout: (event) => {
3213
+ setContentHeight(event.nativeEvent.layout.height);
3214
+ }
3215
+ },
3216
+ children
3217
+ )
3218
+ )
3197
3219
  );
3198
3220
  };
3199
3221
  var Accordion$1 = withThemeProvider(Accordion);
@@ -3823,7 +3845,8 @@ const CustomIcon = ({
3823
3845
  titleStyle,
3824
3846
  type,
3825
3847
  size = "large",
3826
- labelPosition
3848
+ labelPosition,
3849
+ outlinedBackgroundColor
3827
3850
  }) => {
3828
3851
  const { theme } = useTheme();
3829
3852
  const sizeSpec = size ? ICON_SIZE_SPEC[size] : null;
@@ -3892,7 +3915,7 @@ const CustomIcon = ({
3892
3915
  {
3893
3916
  width: innerSize,
3894
3917
  height: innerSize,
3895
- backgroundColor: theme[Theme.SURFACE_PRIMARY],
3918
+ backgroundColor: outlinedBackgroundColor ?? theme[Theme.SURFACE_PRIMARY],
3896
3919
  padding
3897
3920
  }
3898
3921
  ]
@@ -10632,25 +10655,75 @@ const styles$d = StyleSheet.create({
10632
10655
  var ContactModel = withThemeProvider(ContactModal);
10633
10656
 
10634
10657
  const styles$c = StyleSheet.create({
10658
+ // Outer card: wraps Calendar (which includes the custom header via renderHeader)
10659
+ // and provides the dark-blue background + rounded corners.
10660
+ calendarCard: {
10661
+ borderRadius: moderateScale(12),
10662
+ padding: moderateScale(16),
10663
+ overflow: "hidden"
10664
+ },
10665
+ // Rendered via Calendar's renderHeader prop — sits inside the card layout tree.
10666
+ // flex: 1 is required so justifyContent: 'space-between' works across the full row.
10667
+ calendarHeader: {
10668
+ flex: 1,
10669
+ flexDirection: "row",
10670
+ justifyContent: "space-between",
10671
+ alignItems: "center",
10672
+ paddingBottom: verticalScale(16),
10673
+ borderBottomWidth: 1
10674
+ },
10675
+ monthText: {
10676
+ fontSize: 14,
10677
+ fontWeight: "300",
10678
+ lineHeight: 18
10679
+ },
10680
+ arrowsContainer: {
10681
+ flexDirection: "row",
10682
+ gap: horizontalScale(24)
10683
+ },
10635
10684
  applyButton: {
10636
- marginTop: verticalScale(50),
10637
- paddingVertical: verticalScale(14),
10685
+ marginTop: verticalScale(16),
10686
+ height: verticalScale(48),
10687
+ minHeight: verticalScale(48),
10688
+ paddingHorizontal: horizontalScale(24),
10689
+ paddingVertical: verticalScale(12),
10638
10690
  justifyContent: "center",
10639
10691
  alignItems: "center",
10640
- borderRadius: 0
10641
- },
10642
- applyButtonText: {
10643
- ...FONT_STYLES.L1_REGULAR
10692
+ borderRadius: moderateScale(100),
10693
+ borderWidth: 1
10644
10694
  }
10645
10695
  });
10646
10696
 
10647
10697
  const DateRangePicker = (props) => {
10648
- const { onButtonPress, btnTitle = "Apply" } = props;
10698
+ const {
10699
+ onButtonPress,
10700
+ btnTitle = "Apply",
10701
+ style: _consumerStyle,
10702
+ theme: _consumerTheme,
10703
+ ...calendarProps
10704
+ } = props;
10649
10705
  const [selectedRange, setSelectedRange] = useState({
10650
10706
  startDate: "",
10651
10707
  endDate: ""
10652
10708
  });
10653
- const { theme, mode } = useTheme();
10709
+ const [currentMonth, setCurrentMonth] = useState(/* @__PURE__ */ new Date());
10710
+ const { theme } = useTheme();
10711
+ const prevMonth = () => setCurrentMonth((prev) => {
10712
+ const d = new Date(prev);
10713
+ d.setMonth(d.getMonth() - 1);
10714
+ return d;
10715
+ });
10716
+ const nextMonth = () => setCurrentMonth((prev) => {
10717
+ const d = new Date(prev);
10718
+ d.setMonth(d.getMonth() + 1);
10719
+ return d;
10720
+ });
10721
+ const monthKey = `${currentMonth.getFullYear()}-${currentMonth.getMonth()}`;
10722
+ const currentDateStr = currentMonth.toISOString().split("T")[0];
10723
+ const monthLabel = currentMonth.toLocaleDateString("en-US", {
10724
+ month: "long",
10725
+ year: "numeric"
10726
+ });
10654
10727
  const onDayPress = (day) => {
10655
10728
  const { dateString } = day;
10656
10729
  const { startDate, endDate } = selectedRange;
@@ -10673,65 +10746,168 @@ const DateRangePicker = (props) => {
10673
10746
  while (start < end) {
10674
10747
  start.setDate(start.getDate() + 1);
10675
10748
  markedDates[start.toISOString().split("T")[0]] = {
10676
- color: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
10677
- textColor: NAKHEEL_DEFAULT.NAKHEEL_TEXT_COLOR
10749
+ color: theme.SURFACE_PRIMARY_TRANSPARENT,
10750
+ textColor: theme.CONTENT_PRIMARY
10678
10751
  };
10679
10752
  }
10680
10753
  }
10681
10754
  if (startDate) {
10682
10755
  markedDates[startDate] = {
10683
10756
  startingDay: true,
10684
- textColor: theme.SURFACE_SECONDARY,
10685
- customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
10686
- backgroundColor: theme.SURFACE_INVERTED
10757
+ textColor: theme.CONTENT_INVERTED,
10758
+ customContainerStyle: {
10759
+ backgroundColor: theme.SURFACE_INVERTED,
10760
+ borderWidth: 1,
10761
+ borderColor: theme.NOTIFICATIONS_HIGHLIGHT,
10762
+ borderRadius: 200,
10763
+ width: moderateScale(36),
10764
+ height: moderateScale(36),
10765
+ alignItems: "center",
10766
+ justifyContent: "center"
10687
10767
  }
10688
10768
  };
10689
10769
  }
10690
10770
  if (endDate) {
10691
10771
  markedDates[endDate] = {
10692
10772
  endingDay: true,
10693
- color: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
10694
- textColor: theme.SURFACE_SECONDARY,
10695
- customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
10696
- backgroundColor: theme.SURFACE_INVERTED
10773
+ color: theme.SURFACE_PRIMARY_TRANSPARENT,
10774
+ textColor: theme.CONTENT_INVERTED,
10775
+ customContainerStyle: {
10776
+ backgroundColor: theme.SURFACE_INVERTED,
10777
+ borderWidth: 1,
10778
+ borderColor: theme.NOTIFICATIONS_HIGHLIGHT,
10779
+ borderRadius: 200,
10780
+ width: moderateScale(36),
10781
+ height: moderateScale(36),
10782
+ alignItems: "center",
10783
+ justifyContent: "center"
10697
10784
  }
10698
10785
  };
10699
10786
  markedDates[startDate] = {
10700
10787
  startingDay: true,
10701
- color: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
10702
- textColor: theme.SURFACE_SECONDARY,
10703
- customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
10704
- backgroundColor: theme.SURFACE_INVERTED
10788
+ color: theme.SURFACE_PRIMARY_TRANSPARENT,
10789
+ textColor: theme.CONTENT_INVERTED,
10790
+ customContainerStyle: {
10791
+ backgroundColor: theme.SURFACE_INVERTED,
10792
+ borderWidth: 1,
10793
+ borderColor: theme.NOTIFICATIONS_HIGHLIGHT,
10794
+ borderRadius: 200,
10795
+ width: moderateScale(36),
10796
+ height: moderateScale(36),
10797
+ alignItems: "center",
10798
+ justifyContent: "center"
10705
10799
  }
10706
10800
  };
10707
10801
  }
10708
10802
  return markedDates;
10709
10803
  };
10710
10804
  const isButtonDisabled = !selectedRange.startDate || !selectedRange.endDate;
10711
- return /* @__PURE__ */ React.createElement(View, null, /* @__PURE__ */ React.createElement(
10805
+ const renderCalendarHeader = () => /* @__PURE__ */ React.createElement(
10806
+ View,
10807
+ {
10808
+ style: [
10809
+ styles$c.calendarHeader,
10810
+ { borderBottomColor: theme.STROKE_TERTIARY }
10811
+ ]
10812
+ },
10813
+ /* @__PURE__ */ React.createElement(Text, { style: [styles$c.monthText, { color: theme.CONTENT_PRIMARY }] }, monthLabel),
10814
+ /* @__PURE__ */ React.createElement(View, { style: styles$c.arrowsContainer }, /* @__PURE__ */ React.createElement(
10815
+ TouchableOpacity,
10816
+ {
10817
+ onPress: prevMonth,
10818
+ hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
10819
+ },
10820
+ /* @__PURE__ */ React.createElement(Svg$1, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ React.createElement(
10821
+ Path,
10822
+ {
10823
+ d: "M15 19.5L7.5 12L15 4.5",
10824
+ stroke: theme.CONTENT_PRIMARY,
10825
+ strokeWidth: 1.5,
10826
+ strokeLinecap: "round",
10827
+ strokeLinejoin: "round"
10828
+ }
10829
+ ))
10830
+ ), /* @__PURE__ */ React.createElement(
10831
+ TouchableOpacity,
10832
+ {
10833
+ onPress: nextMonth,
10834
+ hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
10835
+ },
10836
+ /* @__PURE__ */ React.createElement(Svg$1, { width: 16, height: 16, viewBox: "0 0 18 18", fill: "none" }, /* @__PURE__ */ React.createElement(
10837
+ Path,
10838
+ {
10839
+ d: "M6.75 3.375L12.375 9L6.75 14.625",
10840
+ stroke: theme.CONTENT_PRIMARY,
10841
+ strokeWidth: 1.5,
10842
+ strokeLinecap: "round",
10843
+ strokeLinejoin: "round"
10844
+ }
10845
+ ))
10846
+ ))
10847
+ );
10848
+ return /* @__PURE__ */ React.createElement(View, null, /* @__PURE__ */ React.createElement(View, { style: [styles$c.calendarCard, { backgroundColor: theme.SURFACE_SECONDARY }] }, /* @__PURE__ */ React.createElement(
10712
10849
  Calendar,
10713
10850
  {
10851
+ key: monthKey,
10852
+ current: currentDateStr,
10714
10853
  markedDates: getMarkedDates(),
10715
- mode: "date",
10716
10854
  markingType: "period",
10855
+ hideArrows: true,
10856
+ renderHeader: renderCalendarHeader,
10717
10857
  theme: {
10718
10858
  calendarBackground: "transparent",
10719
- arrowColor: theme.CONTENT_PRIMARY,
10720
- monthTextColor: theme.CONTENT_PRIMARY,
10721
- dayTextColor: theme.CONTENT_SECONDRY,
10722
- todayTextColor: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
10723
- textDisabledColor: theme.CONTENT_DISABLE
10724
- },
10725
- style: {
10726
- backgroundColor: theme.SURFACE_SECONDARY,
10727
- color: theme.CONTENT_SECONDRY,
10728
- borderRadius: 0
10859
+ dayTextColor: theme.CONTENT_PRIMARY,
10860
+ textDisabledColor: theme.CONTENT_DISABLE,
10861
+ todayTextColor: theme.CONTENT_PRIMARY,
10862
+ textSectionTitleColor: theme.CONTENT_SECONDRY,
10863
+ textDayFontSize: 16,
10864
+ textDayFontWeight: "500",
10865
+ textDayHeaderFontSize: 11,
10866
+ textDayHeaderFontWeight: "300",
10867
+ // Reduce row gap from default 14px (7+7) to 4px (2+2) to match Figma.
10868
+ weekVerticalMargin: 2,
10869
+ // Remove the calendar body's default 5px horizontal padding so the date
10870
+ // grid aligns flush with the custom renderHeader content.
10871
+ "stylesheet.calendar.main": {
10872
+ container: {
10873
+ paddingLeft: 0,
10874
+ paddingRight: 0,
10875
+ backgroundColor: "transparent"
10876
+ }
10877
+ },
10878
+ // Strip Calendar header container's default padding/margin, zero the
10879
+ // day-names row top margin, and apply uppercase + correct sizing to
10880
+ // each day abbreviation label.
10881
+ "stylesheet.calendar.header": {
10882
+ header: {
10883
+ paddingLeft: 0,
10884
+ paddingRight: 0,
10885
+ marginTop: 0,
10886
+ marginBottom: 0
10887
+ },
10888
+ week: {
10889
+ marginTop: 8,
10890
+ flexDirection: "row",
10891
+ justifyContent: "space-around"
10892
+ },
10893
+ dayHeader: {
10894
+ marginTop: 2,
10895
+ marginBottom: 7,
10896
+ width: 32,
10897
+ textAlign: "center",
10898
+ textTransform: "uppercase",
10899
+ fontSize: 11,
10900
+ fontWeight: "300",
10901
+ color: theme.CONTENT_SECONDRY
10902
+ }
10903
+ }
10729
10904
  },
10905
+ style: { backgroundColor: "transparent", borderRadius: 0 },
10730
10906
  onDayPress,
10731
10907
  firstDay: 1,
10732
- ...props
10908
+ ...calendarProps
10733
10909
  }
10734
- ), /* @__PURE__ */ React.createElement(
10910
+ )), /* @__PURE__ */ React.createElement(
10735
10911
  Button,
10736
10912
  {
10737
10913
  title: btnTitle,
@@ -10740,7 +10916,8 @@ const DateRangePicker = (props) => {
10740
10916
  },
10741
10917
  containerStyle: {
10742
10918
  ...styles$c.applyButton,
10743
- backgroundColor: theme.SURFACE_INVERTED
10919
+ backgroundColor: theme.SURFACE_INVERTED,
10920
+ borderColor: theme.NOTIFICATIONS_HIGHLIGHT
10744
10921
  },
10745
10922
  textStyle: { color: theme.CONTENT_INVERTED },
10746
10923
  disabled: isButtonDisabled
@@ -11382,7 +11559,7 @@ const CommonTextInput = (props) => {
11382
11559
  const containerBackground = isDisabled ? theme[Theme.SURFACE_PRIMARY] : theme[Theme.SURFACE_TERTIARY_TRANSPARENT];
11383
11560
  const inputTextColor = isDisabled ? theme[Theme.CONTENT_TERTIARY] : theme[Theme.CONTENT_PRIMARY];
11384
11561
  const placeholderColor = theme[Theme.CONTENT_SECONDRY];
11385
- const labelColor = isError ? theme[Theme.ERROR] : isDisabled ? theme[Theme.CONTENT_TERTIARY] : isFocused ? theme[Theme.CONTENT_PRIMARY] : theme[Theme.CONTENT_TERTIARY];
11562
+ const labelColor = isError ? theme[Theme.ERROR] : isDisabled ? theme[Theme.CONTENT_TERTIARY] : theme[Theme.CONTENT_PRIMARY];
11386
11563
  const helperColor = isError ? theme[Theme.ERROR] : isDisabled ? theme[Theme.CONTENT_TERTIARY] : theme[Theme.CONTENT_SECONDRY];
11387
11564
  const helperMessage = errorMessage || helperText;
11388
11565
  return /* @__PURE__ */ React.createElement(Pressable, { onPress: handlePress, style: styles$8.container }, /* @__PURE__ */ React.createElement(
@@ -11548,7 +11725,7 @@ const CustomDropdown = (props) => {
11548
11725
  const valueTextColor = disable ? theme.CONTENT_TERTIARY : hasValue ? theme.CONTENT_PRIMARY : theme.CONTENT_SECONDRY;
11549
11726
  const helperColor = isError ? theme.ERROR : theme.CONTENT_SECONDRY;
11550
11727
  const helperMessage = errorMessage || helperText;
11551
- const fieldBackground = theme.SURFACE_SECONDARY;
11728
+ const fieldBackground = theme.SURFACE_TERTIARY_TRANSPARENT;
11552
11729
  const labelColor = theme.CONTENT_PRIMARY;
11553
11730
  const renderLabel = () => {
11554
11731
  if (value || isFocus) {
@@ -11559,8 +11736,8 @@ const CustomDropdown = (props) => {
11559
11736
  styles$7.label,
11560
11737
  FONT_STYLES[FontStyle.BODY2_LIGHT],
11561
11738
  {
11562
- backgroundColor: fieldBackground,
11563
- color: labelColor
11739
+ color: labelColor,
11740
+ backgroundColor: theme.SURFACE_PRIMARY
11564
11741
  },
11565
11742
  labelStyle,
11566
11743
  isFocus && (labelFocusStyle ?? { color: labelColor })
@@ -11643,7 +11820,7 @@ const CustomDropdown = (props) => {
11643
11820
  containerStyle: [
11644
11821
  {
11645
11822
  marginTop: verticalScale(5),
11646
- backgroundColor: fieldBackground,
11823
+ backgroundColor: theme.SURFACE_SECONDARY,
11647
11824
  borderColor: theme.STROKE_TERTIARY,
11648
11825
  borderWidth: 1,
11649
11826
  borderRadius: DHRE_RADIUS_BASE.RADIUS_8
@@ -13076,21 +13253,32 @@ var index$1 = withThemeProvider(AppointmentCard);
13076
13253
  const styles$1 = StyleSheet.create({
13077
13254
  container: {
13078
13255
  flexDirection: "row",
13079
- justifyContent: "space-between",
13080
13256
  alignItems: "center",
13081
- paddingHorizontal: horizontalScale(24),
13082
- paddingVertical: verticalScale(16),
13083
- borderTopWidth: 1,
13084
- borderBottomWidth: 1
13257
+ padding: moderateScale(12),
13258
+ columnGap: horizontalScale(12)
13259
+ },
13260
+ imageWrapper: {
13261
+ width: moderateScale(112),
13262
+ height: moderateScale(112),
13263
+ borderRadius: moderateScale(8),
13264
+ overflow: "hidden"
13265
+ },
13266
+ brandBadge: {
13267
+ position: "absolute",
13268
+ top: moderateScale(8),
13269
+ right: moderateScale(8),
13270
+ // width: moderateScale(40),
13271
+ // height: moderateScale(40),
13272
+ // borderRadius: moderateScale(120),
13273
+ overflow: "hidden",
13274
+ // backgroundColor: '#FFFFFF',
13275
+ alignItems: "center",
13276
+ justifyContent: "center"
13085
13277
  },
13086
13278
  propertyInfo: {
13087
13279
  flex: 1,
13088
- rowGap: verticalScale(4)
13089
- },
13090
- arrowIconContainer: {
13091
- width: moderateScale(32),
13092
- height: moderateScale(32),
13093
- borderRadius: moderateScale(25)
13280
+ justifyContent: "center",
13281
+ rowGap: verticalScale(8)
13094
13282
  },
13095
13283
  propertyNumber: {
13096
13284
  flexDirection: "row",
@@ -13111,57 +13299,60 @@ const PropertyDetails = ({
13111
13299
  subTitleStyle,
13112
13300
  propertyNumberStyle,
13113
13301
  onRightIconPress,
13114
- titleStyle
13302
+ titleStyle,
13303
+ isSelected = false
13115
13304
  }) => {
13116
13305
  const { theme } = useTheme();
13117
13306
  return /* @__PURE__ */ React.createElement(
13118
13307
  View,
13119
13308
  {
13120
- style: {
13121
- ...styles$1.container,
13122
- backgroundColor: theme.SURFACE_SECONDARY,
13123
- borderColor: theme.BORDER_SEPERATOR_HEADER,
13124
- ...containerStyle,
13125
- ...{ borderRadius: 0 }
13126
- }
13309
+ style: [
13310
+ styles$1.container,
13311
+ {
13312
+ backgroundColor: theme.SURFACE_PRIMARY,
13313
+ borderColor: isSelected ? theme.STROKE_ACTIVE : theme.STROKE_TERTIARY
13314
+ },
13315
+ isSelected && {
13316
+ shadowColor: "rgba(0,157,179,0.1)",
13317
+ shadowOffset: { width: 0, height: 4 },
13318
+ shadowOpacity: 1,
13319
+ shadowRadius: 10,
13320
+ elevation: 4
13321
+ },
13322
+ containerStyle
13323
+ ]
13127
13324
  },
13128
- React.cloneElement(icon, {
13129
- width: moderateScale(87),
13130
- height: moderateScale(87),
13131
- borderRadius: 0
13132
- }),
13133
- /* @__PURE__ */ React.createElement(View, { style: styles$1.propertyInfo }, brandIcon, /* @__PURE__ */ React.createElement(
13325
+ /* @__PURE__ */ React.createElement(View, { style: styles$1.imageWrapper }, React.cloneElement(icon, {
13326
+ width: "100%",
13327
+ height: "100%",
13328
+ borderRadius: DHRE_RADIUS.MD
13329
+ }), brandIcon && /* @__PURE__ */ React.createElement(View, { style: styles$1.brandBadge }, brandIcon)),
13330
+ /* @__PURE__ */ React.createElement(View, { style: styles$1.propertyInfo }, propertyNumber && /* @__PURE__ */ React.createElement(View, { style: [styles$1.propertyNumber, propertyNumberStyle] }, /* @__PURE__ */ React.createElement(
13134
13331
  CustomTypography,
13135
13332
  {
13136
- text: title,
13137
- variant: FontStyle.L2_REGULAR,
13138
- style: [{ color: theme.CONTENT_PRIMARY }, titleStyle]
13333
+ text: propertyNumber,
13334
+ variant: FontStyle.BODY3_LIGHT,
13335
+ style: { color: theme.CONTENT_SECONDRY }
13139
13336
  }
13140
- ), /* @__PURE__ */ React.createElement(
13337
+ ), hintIcon), /* @__PURE__ */ React.createElement(
13141
13338
  CustomTypography,
13142
13339
  {
13143
13340
  text: subTitle,
13144
- variant: FontStyle.L1_REGULAR,
13341
+ variant: FontStyle.BODY4_LIGHT,
13145
13342
  style: [{ color: theme.CONTENT_PRIMARY }, subTitleStyle]
13146
13343
  }
13147
- ), propertyNumber && /* @__PURE__ */ React.createElement(View, { style: [styles$1.propertyNumber, propertyNumberStyle] }, /* @__PURE__ */ React.createElement(
13344
+ ), /* @__PURE__ */ React.createElement(
13148
13345
  CustomTypography,
13149
13346
  {
13150
- text: propertyNumber,
13151
- variant: FontStyle.L2_REGULAR,
13152
- style: {
13153
- color: theme.CONTENT_SECONDRY
13154
- }
13347
+ text: title,
13348
+ variant: FontStyle.BODY1_MEDIUM,
13349
+ style: [{ color: theme.CONTENT_PRIMARY }, titleStyle]
13155
13350
  }
13156
- ), hintIcon)),
13351
+ )),
13157
13352
  btnIcon && /* @__PURE__ */ React.createElement(
13158
13353
  CustomIcon$1,
13159
13354
  {
13160
13355
  icon: btnIcon,
13161
- containerStyle: {
13162
- ...styles$1.arrowIconContainer,
13163
- backgroundColor: theme.SURFACE_INVERTED
13164
- },
13165
13356
  onPress: onRightIconPress
13166
13357
  }
13167
13358
  )
@@ -13235,5 +13426,5 @@ const RadioButtonGroup = ({
13235
13426
  )));
13236
13427
  };
13237
13428
 
13238
- export { Accordion$1 as Accordion, AnimationWithImperativeApi as AnimationLoitte, index$1 as AppointmentCard, Avatar$1 as Avatar, AvatarSize, Background$1 as Background, BackgroundVariant, Badge$1 as Badge, BottomDrawer$1 as BottomDrawer, Button, Cards, category as Category, CheckBox, Chip$1 as Chip, ContactModel, CountryDropDown as CountryPicker, CustomDropdown$1 as CustomDropdown, CustomHeader$1 as CustomHeader, CustomIcon$1 as CustomIcon, CustomLoader$1 as CustomLoader, CustomProgressBar$1 as CustomProgressBar, CustomSearchBar$1 as CustomSearchBar, index$2 as CustomSlideButton, CustomSwitchBtn, CustomText$1 as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_AVATAR_SIZE, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_COMPONENT_HEIGHT, DHRE_CORE_BLUE, DHRE_CYAN_HIGHLIGHT, DHRE_DEEP_SPACE_BLUE, DHRE_DEFAULT, DHRE_ICON_SIZE, DHRE_IMAGE_SIZE, DHRE_INFO_BLUE, DHRE_ORANGE_WARNING, DHRE_PADDING, DHRE_PADDING_BASE, DHRE_RADIUS, DHRE_RADIUS_BASE, DHRE_RED_ERROR, DHRE_SPACING, DHRE_SPACING_BASE, DHRE_STROKE, DHRE_SUCCESS_GREEN, DHRE_WHITE, DateRangePicker$1 as DateRangePicker, DropDown, FONT_STYLES, feedback as FeedbackForm, FileUpload, FontStyle, Line, Loader$1 as Loader, NAKHEEL_DEFAULT, NotificationBandge, OTPInput, OurOffices as OurOfficesButton, PdfView, PopUp, index as PropertyDetails, RadioButtonGroup, ShapeType, TagSingleSelection as SingleSelectionTags, Star as StarRating, index$3 as Stepper, SwipableList$1 as SwipableList, Tabs$1 as Tabs, Tags, TextDirectType, Textinput as TextInput, Theme, ToastWithProvider as Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, Topic$1 as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
13429
+ export { Accordion$1 as Accordion, AnimationWithImperativeApi as AnimationLoitte, index$1 as AppointmentCard, Avatar$1 as Avatar, AvatarSize, Background$1 as Background, BackgroundVariant, Badge$1 as Badge, BottomDrawer$1 as BottomDrawer, Button, Cards, category as Category, CheckBox, Chip$1 as Chip, ContactModel, CountryDropDown as CountryPicker, CustomDropdown$1 as CustomDropdown, CustomHeader$1 as CustomHeader, CustomIcon$1 as CustomIcon, CustomLoader$1 as CustomLoader, CustomProgressBar$1 as CustomProgressBar, CustomSearchBar$1 as CustomSearchBar, index$2 as CustomSlideButton, CustomSwitchBtn, CustomText$1 as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_AVATAR_SIZE, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_COMPONENT_HEIGHT, DHRE_CONFIRMATION_BASE_GRADIENT, DHRE_CONFIRMATION_ERROR_GRADIENT, DHRE_CORE_BLUE, DHRE_CYAN_HIGHLIGHT, DHRE_DEEP_SPACE_BLUE, DHRE_DEFAULT, DHRE_ICON_SIZE, DHRE_IMAGE_SIZE, DHRE_INFO_BLUE, DHRE_ORANGE_WARNING, DHRE_PADDING, DHRE_PADDING_BASE, DHRE_RADIUS, DHRE_RADIUS_BASE, DHRE_RED_ERROR, DHRE_SPACING, DHRE_SPACING_BASE, DHRE_STROKE, DHRE_SUCCESS_GREEN, DHRE_WHITE, DateRangePicker$1 as DateRangePicker, DropDown, FONT_STYLES, feedback as FeedbackForm, FileUpload, FontStyle, Line, Loader$1 as Loader, NAKHEEL_DEFAULT, NotificationBandge, OTPInput, OurOffices as OurOfficesButton, PdfView, PopUp, index as PropertyDetails, RadioButtonGroup, ShapeType, TagSingleSelection as SingleSelectionTags, Star as StarRating, index$3 as Stepper, SwipableList$1 as SwipableList, Tabs$1 as Tabs, Tags, TextDirectType, Textinput as TextInput, Theme, ToastWithProvider as Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, Topic$1 as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
13239
13430
  //# sourceMappingURL=index.mjs.map