dhre-ui-kit 2.0.5 → 2.0.7

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
@@ -590,6 +590,7 @@ interface ScrollableListProps {
590
590
  activeTab?: string;
591
591
  errorStyle?: object;
592
592
  activeTextStyle?: TextStyle;
593
+ enableTextWrap?: boolean;
593
594
  }
594
595
  declare const _default$7: (props: ScrollableListProps) => React$1.JSX.Element;
595
596
 
@@ -1084,6 +1085,10 @@ declare const DHRE_COLORS_BG: {
1084
1085
  DH_BG_GREY_900: string;
1085
1086
  DH_BG_GREY: string;
1086
1087
  };
1088
+ declare const NAKHEEL_DEFAULT: {
1089
+ NAKHEEL_BACKGROUND_SANDY: string;
1090
+ NAKHEEL_TEXT_COLOR: string;
1091
+ };
1087
1092
  declare const DHRE_DEFAULT: {
1088
1093
  DH_LINE_GREY_0: string;
1089
1094
  DH_LINE_GREY_100: string;
@@ -1195,5 +1200,5 @@ interface RadioButtonGroupProps {
1195
1200
 
1196
1201
  declare const RadioButtonGroup: React$1.FC<RadioButtonGroupProps>;
1197
1202
 
1198
- export { _default$g as Accordion, AnimationWithImperativeApi as AnimationLoitte, _default$1 as AppointmentCard, _default$j as Badge, BottomDrawer, _default$i as Button, Cards, _default$7 as Category, Checkbox as CheckBox, _default$a as ContactModel, CountryDropDown as CountryPicker, _default$4 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, _default$f as CustomHeader, CustomIcon, _default$d as CustomLoader, CustomProgressBar, CustomSearchBar, _default$2 as CustomSlideButton, CustomSwitchBtn, _default$k as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, _default$9 as DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, _default$6 as FeedbackForm, FileUpload, FontStyle, _default$c as Line, NotificationBandge, OTPInput, _default$8 as OurOfficesButton, PdfView, PopUp, _default as PropertyDetails, RadioButtonGroup, ShapeType, _default$5 as SingleSelectionTags, Star as StarRating, _default$3 as Stepper, _default$e as SwipableList, _default$h as Tabs, Tags, TextDirectType, CommonTextInput as TextInput, Theme, Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, _default$b as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
1203
+ export { _default$g as Accordion, AnimationWithImperativeApi as AnimationLoitte, _default$1 as AppointmentCard, _default$j as Badge, BottomDrawer, _default$i as Button, Cards, _default$7 as Category, Checkbox as CheckBox, _default$a as ContactModel, CountryDropDown as CountryPicker, _default$4 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, _default$f as CustomHeader, CustomIcon, _default$d as CustomLoader, CustomProgressBar, CustomSearchBar, _default$2 as CustomSlideButton, CustomSwitchBtn, _default$k as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, _default$9 as DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, _default$6 as FeedbackForm, FileUpload, FontStyle, _default$c as Line, NAKHEEL_DEFAULT, NotificationBandge, OTPInput, _default$8 as OurOfficesButton, PdfView, PopUp, _default as PropertyDetails, RadioButtonGroup, ShapeType, _default$5 as SingleSelectionTags, Star as StarRating, _default$3 as Stepper, _default$e as SwipableList, _default$h as Tabs, Tags, TextDirectType, CommonTextInput as TextInput, Theme, Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, _default$b as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
1199
1204
  export type { CustomHeaderProps, SlideButtonHandle, ToastRef };
package/lib/index.js CHANGED
@@ -573,6 +573,10 @@ const DHRE_COLORS_BG = {
573
573
  DH_BG_GREY_900: "#6F7387",
574
574
  DH_BG_GREY: "#F2F3F8"
575
575
  };
576
+ const NAKHEEL_DEFAULT = {
577
+ NAKHEEL_BACKGROUND_SANDY: "#E7DBB9",
578
+ NAKHEEL_TEXT_COLOR: "#686868"
579
+ };
576
580
  const DHRE_DEFAULT = {
577
581
  DH_LINE_GREY_0: "#FAFAFA",
578
582
  DH_LINE_GREY_100: "#F6F6F6",
@@ -7416,7 +7420,7 @@ const DateRangePicker = (props) => {
7416
7420
  startDate: "",
7417
7421
  endDate: ""
7418
7422
  });
7419
- const { theme: theme$1, mode } = useTheme();
7423
+ const { theme, mode } = useTheme();
7420
7424
  const onDayPress = (day) => {
7421
7425
  const { dateString } = day;
7422
7426
  const { startDate, endDate } = selectedRange;
@@ -7439,35 +7443,35 @@ const DateRangePicker = (props) => {
7439
7443
  while (start < end) {
7440
7444
  start.setDate(start.getDate() + 1);
7441
7445
  markedDates[start.toISOString().split("T")[0]] = {
7442
- color: theme.SUCCESS.dark,
7443
- textColor: theme$1.CONTENT_INVERTED
7446
+ color: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
7447
+ textColor: NAKHEEL_DEFAULT.NAKHEEL_TEXT_COLOR
7444
7448
  };
7445
7449
  }
7446
7450
  }
7447
7451
  if (startDate) {
7448
7452
  markedDates[startDate] = {
7449
7453
  startingDay: true,
7450
- textColor: theme$1.CONTENT_INVERTED,
7451
- customContainerStyle: mode === "dark" ? { backgroundColor: theme$1.SURFACE_INVERTED } : {
7452
- backgroundColor: theme$1.SURFACE_INVERTED
7454
+ textColor: theme.SURFACE_STATIC,
7455
+ customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
7456
+ backgroundColor: theme.SURFACE_INVERTED
7453
7457
  }
7454
7458
  };
7455
7459
  }
7456
7460
  if (endDate) {
7457
7461
  markedDates[endDate] = {
7458
7462
  endingDay: true,
7459
- color: theme.SUCCESS.dark,
7460
- textColor: theme$1.CONTENT_INVERTED,
7461
- customContainerStyle: mode === "dark" ? { backgroundColor: theme$1.SURFACE_INVERTED } : {
7462
- backgroundColor: theme$1.SURFACE_INVERTED
7463
+ color: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
7464
+ textColor: theme.SURFACE_STATIC,
7465
+ customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
7466
+ backgroundColor: theme.SURFACE_INVERTED
7463
7467
  }
7464
7468
  };
7465
7469
  markedDates[startDate] = {
7466
7470
  startingDay: true,
7467
- color: theme.SUCCESS.dark,
7468
- textColor: theme$1.CONTENT_INVERTED,
7469
- customContainerStyle: mode === "dark" ? { backgroundColor: theme$1.SURFACE_INVERTED } : {
7470
- backgroundColor: theme$1.SURFACE_INVERTED
7471
+ color: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
7472
+ textColor: theme.SURFACE_STATIC,
7473
+ customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
7474
+ backgroundColor: theme.SURFACE_INVERTED
7471
7475
  }
7472
7476
  };
7473
7477
  }
@@ -7482,15 +7486,15 @@ const DateRangePicker = (props) => {
7482
7486
  markingType: "period",
7483
7487
  theme: {
7484
7488
  calendarBackground: "transparent",
7485
- arrowColor: theme$1.CONTENT_PRIMARY,
7486
- monthTextColor: theme$1.CONTENT_PRIMARY,
7487
- dayTextColor: theme$1.CONTENT_SECONDRY,
7488
- todayTextColor: theme$1.SUCCESS,
7489
- textDisabledColor: theme$1.CONTENT_DISABLE
7489
+ arrowColor: theme.CONTENT_PRIMARY,
7490
+ monthTextColor: theme.CONTENT_PRIMARY,
7491
+ dayTextColor: theme.CONTENT_SECONDRY,
7492
+ todayTextColor: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
7493
+ textDisabledColor: theme.CONTENT_DISABLE
7490
7494
  },
7491
7495
  style: {
7492
- backgroundColor: theme$1.SURFACE_SECONDARY,
7493
- color: theme$1.CONTENT_SECONDRY,
7496
+ backgroundColor: theme.SURFACE_SECONDARY,
7497
+ color: theme.CONTENT_SECONDRY,
7494
7498
  borderRadius: 0
7495
7499
  },
7496
7500
  onDayPress,
@@ -7506,9 +7510,9 @@ const DateRangePicker = (props) => {
7506
7510
  },
7507
7511
  containerStyle: {
7508
7512
  ...styles$d.applyButton,
7509
- backgroundColor: theme$1.SURFACE_INVERTED
7513
+ backgroundColor: theme.SURFACE_INVERTED
7510
7514
  },
7511
- textStyle: { color: theme$1.CONTENT_INVERTED },
7515
+ textStyle: { color: theme.CONTENT_INVERTED },
7512
7516
  disabled: isButtonDisabled
7513
7517
  }
7514
7518
  ));
@@ -7626,7 +7630,8 @@ const ScrollableList = ({
7626
7630
  defaultItemTextColor = "CONTENT_SECONDRY",
7627
7631
  activeTab,
7628
7632
  errorStyle,
7629
- activeTextStyle
7633
+ activeTextStyle,
7634
+ enableTextWrap
7630
7635
  }) => {
7631
7636
  const [selectedItem, setSelectedItem] = React.useState(
7632
7637
  data && data.length > 0 ? data[0].name : null
@@ -7660,7 +7665,7 @@ const ScrollableList = ({
7660
7665
  handleSelectCategory(item.name, item.value);
7661
7666
  }
7662
7667
  },
7663
- /* @__PURE__ */ React__default["default"].createElement(
7668
+ /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [enableTextWrap && styles.enableTextWrapStyle] }, /* @__PURE__ */ React__default["default"].createElement(
7664
7669
  CustomText$1,
7665
7670
  {
7666
7671
  text: item.name,
@@ -7668,7 +7673,7 @@ const ScrollableList = ({
7668
7673
  textColor: (activeTab ?? selectedItem) === item.name ? selectedItemTextColor : defaultItemTextColor,
7669
7674
  style: (activeTab ?? selectedItem) === item.name ? activeTextStyle ? activeTextStyle : {} : {}
7670
7675
  }
7671
- ),
7676
+ )),
7672
7677
  item?.isError ? /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles.errorViewStyle, errorStyle] }, item?.errorText ? /* @__PURE__ */ React__default["default"].createElement(
7673
7678
  CustomText$1,
7674
7679
  {
@@ -7696,7 +7701,12 @@ const createStyles$2 = (theme) => {
7696
7701
  gap: 8,
7697
7702
  padding: 12,
7698
7703
  borderBottomWidth: 1,
7699
- borderBottomColor: theme[Theme.BORDER_SEPERATOR_HEADER]
7704
+ borderBottomColor: theme[Theme.BORDER_SEPERATOR_HEADER],
7705
+ flexShrink: 1
7706
+ },
7707
+ enableTextWrapStyle: {
7708
+ flexShrink: 1,
7709
+ flexGrow: 1
7700
7710
  },
7701
7711
  selectedItem: {
7702
7712
  borderBottomWidth: 2,
@@ -7999,10 +8009,27 @@ const CommonTextInput = (props) => {
7999
8009
  secureTextEntry: isSecureTextEntry,
8000
8010
  keyboardType,
8001
8011
  theme: {
8012
+ ...reactNativePaper.MD3LightTheme,
8002
8013
  colors: {
8014
+ ...reactNativePaper.MD3LightTheme.colors,
8003
8015
  onSurfaceVariant: currentBorderColor,
8004
8016
  error: errorMessage?.length || onlyErrorBorderLabel ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : currentBorderColor,
8005
8017
  primary: errorMessage?.length || onlyErrorBorderLabel ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : currentBorderColor
8018
+ },
8019
+ fonts: {
8020
+ ...reactNativePaper.MD3LightTheme.fonts,
8021
+ bodyLarge: {
8022
+ ...reactNativePaper.MD3LightTheme.fonts.bodyLarge,
8023
+ fontFamily: "Nakheel-TextRegular"
8024
+ },
8025
+ bodyMedium: {
8026
+ ...reactNativePaper.MD3LightTheme.fonts.bodyMedium,
8027
+ fontFamily: "Nakheel-TextRegular"
8028
+ },
8029
+ labelLarge: {
8030
+ ...reactNativePaper.MD3LightTheme.fonts.labelLarge,
8031
+ fontFamily: "Nakheel-TextRegular"
8032
+ }
8006
8033
  }
8007
8034
  },
8008
8035
  style: [
@@ -8011,6 +8038,9 @@ const CommonTextInput = (props) => {
8011
8038
  multiline && styles$9.multilineInput
8012
8039
  // Apply multiline style if true
8013
8040
  ],
8041
+ contentStyle: {
8042
+ fontFamily: "Nakheel-TextRegular"
8043
+ },
8014
8044
  maxLength,
8015
8045
  textColor,
8016
8046
  placeholder: placeholderText,
@@ -8170,7 +8200,7 @@ const CustomDropdown = (props) => {
8170
8200
  dropdownPosition: "bottom",
8171
8201
  renderItem,
8172
8202
  itemTextStyle,
8173
- containerStyle: menuContainerStyle,
8203
+ containerStyle: [{ marginTop: verticalScale(5) }, menuContainerStyle],
8174
8204
  activeColor,
8175
8205
  itemContainerStyle: [styles$8.itemListStyle, itemContainerStyle],
8176
8206
  disable,
@@ -8413,7 +8443,7 @@ const createStyles = (theme) => {
8413
8443
  alignItems: "center",
8414
8444
  paddingVertical: 8,
8415
8445
  paddingHorizontal: 12,
8416
- borderRadius: 20,
8446
+ borderRadius: 0,
8417
8447
  marginHorizontal: 8
8418
8448
  },
8419
8449
  selectedTagButton: {
@@ -9587,6 +9617,7 @@ exports.FeedbackForm = feedback;
9587
9617
  exports.FileUpload = FileUpload;
9588
9618
  exports.FontStyle = FontStyle;
9589
9619
  exports.Line = Line;
9620
+ exports.NAKHEEL_DEFAULT = NAKHEEL_DEFAULT;
9590
9621
  exports.NotificationBandge = NotificationBandge;
9591
9622
  exports.OTPInput = OTPInput;
9592
9623
  exports.OurOfficesButton = OurOffices;