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.mjs CHANGED
@@ -11,7 +11,7 @@ import { GestureHandlerRootView, Swipeable, ScrollView as ScrollView$1 } from 'r
11
11
  import DeviceInfo from 'react-native-device-info';
12
12
  import { Calendar } from 'react-native-calendars';
13
13
  import CountryPicker from 'react-native-country-picker-modal';
14
- import { TextInput as TextInput$1 } from 'react-native-paper';
14
+ import { TextInput as TextInput$1, MD3LightTheme } from 'react-native-paper';
15
15
  import { Dropdown } from 'react-native-element-dropdown';
16
16
  import DocumentPicker from 'react-native-document-picker';
17
17
  import RNFS from 'react-native-fs';
@@ -537,6 +537,10 @@ const DHRE_COLORS_BG = {
537
537
  DH_BG_GREY_900: "#6F7387",
538
538
  DH_BG_GREY: "#F2F3F8"
539
539
  };
540
+ const NAKHEEL_DEFAULT = {
541
+ NAKHEEL_BACKGROUND_SANDY: "#E7DBB9",
542
+ NAKHEEL_TEXT_COLOR: "#686868"
543
+ };
540
544
  const DHRE_DEFAULT = {
541
545
  DH_LINE_GREY_0: "#FAFAFA",
542
546
  DH_LINE_GREY_100: "#F6F6F6",
@@ -7380,7 +7384,7 @@ const DateRangePicker = (props) => {
7380
7384
  startDate: "",
7381
7385
  endDate: ""
7382
7386
  });
7383
- const { theme: theme$1, mode } = useTheme();
7387
+ const { theme, mode } = useTheme();
7384
7388
  const onDayPress = (day) => {
7385
7389
  const { dateString } = day;
7386
7390
  const { startDate, endDate } = selectedRange;
@@ -7403,35 +7407,35 @@ const DateRangePicker = (props) => {
7403
7407
  while (start < end) {
7404
7408
  start.setDate(start.getDate() + 1);
7405
7409
  markedDates[start.toISOString().split("T")[0]] = {
7406
- color: theme.SUCCESS.dark,
7407
- textColor: theme$1.CONTENT_INVERTED
7410
+ color: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
7411
+ textColor: NAKHEEL_DEFAULT.NAKHEEL_TEXT_COLOR
7408
7412
  };
7409
7413
  }
7410
7414
  }
7411
7415
  if (startDate) {
7412
7416
  markedDates[startDate] = {
7413
7417
  startingDay: true,
7414
- textColor: theme$1.CONTENT_INVERTED,
7415
- customContainerStyle: mode === "dark" ? { backgroundColor: theme$1.SURFACE_INVERTED } : {
7416
- backgroundColor: theme$1.SURFACE_INVERTED
7418
+ textColor: theme.SURFACE_STATIC,
7419
+ customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
7420
+ backgroundColor: theme.SURFACE_INVERTED
7417
7421
  }
7418
7422
  };
7419
7423
  }
7420
7424
  if (endDate) {
7421
7425
  markedDates[endDate] = {
7422
7426
  endingDay: true,
7423
- color: theme.SUCCESS.dark,
7424
- textColor: theme$1.CONTENT_INVERTED,
7425
- customContainerStyle: mode === "dark" ? { backgroundColor: theme$1.SURFACE_INVERTED } : {
7426
- backgroundColor: theme$1.SURFACE_INVERTED
7427
+ color: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
7428
+ textColor: theme.SURFACE_STATIC,
7429
+ customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
7430
+ backgroundColor: theme.SURFACE_INVERTED
7427
7431
  }
7428
7432
  };
7429
7433
  markedDates[startDate] = {
7430
7434
  startingDay: true,
7431
- color: theme.SUCCESS.dark,
7432
- textColor: theme$1.CONTENT_INVERTED,
7433
- customContainerStyle: mode === "dark" ? { backgroundColor: theme$1.SURFACE_INVERTED } : {
7434
- backgroundColor: theme$1.SURFACE_INVERTED
7435
+ color: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
7436
+ textColor: theme.SURFACE_STATIC,
7437
+ customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
7438
+ backgroundColor: theme.SURFACE_INVERTED
7435
7439
  }
7436
7440
  };
7437
7441
  }
@@ -7446,15 +7450,15 @@ const DateRangePicker = (props) => {
7446
7450
  markingType: "period",
7447
7451
  theme: {
7448
7452
  calendarBackground: "transparent",
7449
- arrowColor: theme$1.CONTENT_PRIMARY,
7450
- monthTextColor: theme$1.CONTENT_PRIMARY,
7451
- dayTextColor: theme$1.CONTENT_SECONDRY,
7452
- todayTextColor: theme$1.SUCCESS,
7453
- textDisabledColor: theme$1.CONTENT_DISABLE
7453
+ arrowColor: theme.CONTENT_PRIMARY,
7454
+ monthTextColor: theme.CONTENT_PRIMARY,
7455
+ dayTextColor: theme.CONTENT_SECONDRY,
7456
+ todayTextColor: NAKHEEL_DEFAULT.NAKHEEL_BACKGROUND_SANDY,
7457
+ textDisabledColor: theme.CONTENT_DISABLE
7454
7458
  },
7455
7459
  style: {
7456
- backgroundColor: theme$1.SURFACE_SECONDARY,
7457
- color: theme$1.CONTENT_SECONDRY,
7460
+ backgroundColor: theme.SURFACE_SECONDARY,
7461
+ color: theme.CONTENT_SECONDRY,
7458
7462
  borderRadius: 0
7459
7463
  },
7460
7464
  onDayPress,
@@ -7470,9 +7474,9 @@ const DateRangePicker = (props) => {
7470
7474
  },
7471
7475
  containerStyle: {
7472
7476
  ...styles$d.applyButton,
7473
- backgroundColor: theme$1.SURFACE_INVERTED
7477
+ backgroundColor: theme.SURFACE_INVERTED
7474
7478
  },
7475
- textStyle: { color: theme$1.CONTENT_INVERTED },
7479
+ textStyle: { color: theme.CONTENT_INVERTED },
7476
7480
  disabled: isButtonDisabled
7477
7481
  }
7478
7482
  ));
@@ -7590,7 +7594,8 @@ const ScrollableList = ({
7590
7594
  defaultItemTextColor = "CONTENT_SECONDRY",
7591
7595
  activeTab,
7592
7596
  errorStyle,
7593
- activeTextStyle
7597
+ activeTextStyle,
7598
+ enableTextWrap
7594
7599
  }) => {
7595
7600
  const [selectedItem, setSelectedItem] = useState(
7596
7601
  data && data.length > 0 ? data[0].name : null
@@ -7624,7 +7629,7 @@ const ScrollableList = ({
7624
7629
  handleSelectCategory(item.name, item.value);
7625
7630
  }
7626
7631
  },
7627
- /* @__PURE__ */ React.createElement(
7632
+ /* @__PURE__ */ React.createElement(View, { style: [enableTextWrap && styles.enableTextWrapStyle] }, /* @__PURE__ */ React.createElement(
7628
7633
  CustomText$1,
7629
7634
  {
7630
7635
  text: item.name,
@@ -7632,7 +7637,7 @@ const ScrollableList = ({
7632
7637
  textColor: (activeTab ?? selectedItem) === item.name ? selectedItemTextColor : defaultItemTextColor,
7633
7638
  style: (activeTab ?? selectedItem) === item.name ? activeTextStyle ? activeTextStyle : {} : {}
7634
7639
  }
7635
- ),
7640
+ )),
7636
7641
  item?.isError ? /* @__PURE__ */ React.createElement(View, { style: [styles.errorViewStyle, errorStyle] }, item?.errorText ? /* @__PURE__ */ React.createElement(
7637
7642
  CustomText$1,
7638
7643
  {
@@ -7660,7 +7665,12 @@ const createStyles$2 = (theme) => {
7660
7665
  gap: 8,
7661
7666
  padding: 12,
7662
7667
  borderBottomWidth: 1,
7663
- borderBottomColor: theme[Theme.BORDER_SEPERATOR_HEADER]
7668
+ borderBottomColor: theme[Theme.BORDER_SEPERATOR_HEADER],
7669
+ flexShrink: 1
7670
+ },
7671
+ enableTextWrapStyle: {
7672
+ flexShrink: 1,
7673
+ flexGrow: 1
7664
7674
  },
7665
7675
  selectedItem: {
7666
7676
  borderBottomWidth: 2,
@@ -7963,10 +7973,27 @@ const CommonTextInput = (props) => {
7963
7973
  secureTextEntry: isSecureTextEntry,
7964
7974
  keyboardType,
7965
7975
  theme: {
7976
+ ...MD3LightTheme,
7966
7977
  colors: {
7978
+ ...MD3LightTheme.colors,
7967
7979
  onSurfaceVariant: currentBorderColor,
7968
7980
  error: errorMessage?.length || onlyErrorBorderLabel ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : currentBorderColor,
7969
7981
  primary: errorMessage?.length || onlyErrorBorderLabel ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : currentBorderColor
7982
+ },
7983
+ fonts: {
7984
+ ...MD3LightTheme.fonts,
7985
+ bodyLarge: {
7986
+ ...MD3LightTheme.fonts.bodyLarge,
7987
+ fontFamily: "Nakheel-TextRegular"
7988
+ },
7989
+ bodyMedium: {
7990
+ ...MD3LightTheme.fonts.bodyMedium,
7991
+ fontFamily: "Nakheel-TextRegular"
7992
+ },
7993
+ labelLarge: {
7994
+ ...MD3LightTheme.fonts.labelLarge,
7995
+ fontFamily: "Nakheel-TextRegular"
7996
+ }
7970
7997
  }
7971
7998
  },
7972
7999
  style: [
@@ -7975,6 +8002,9 @@ const CommonTextInput = (props) => {
7975
8002
  multiline && styles$9.multilineInput
7976
8003
  // Apply multiline style if true
7977
8004
  ],
8005
+ contentStyle: {
8006
+ fontFamily: "Nakheel-TextRegular"
8007
+ },
7978
8008
  maxLength,
7979
8009
  textColor,
7980
8010
  placeholder: placeholderText,
@@ -8134,7 +8164,7 @@ const CustomDropdown = (props) => {
8134
8164
  dropdownPosition: "bottom",
8135
8165
  renderItem,
8136
8166
  itemTextStyle,
8137
- containerStyle: menuContainerStyle,
8167
+ containerStyle: [{ marginTop: verticalScale(5) }, menuContainerStyle],
8138
8168
  activeColor,
8139
8169
  itemContainerStyle: [styles$8.itemListStyle, itemContainerStyle],
8140
8170
  disable,
@@ -8377,7 +8407,7 @@ const createStyles = (theme) => {
8377
8407
  alignItems: "center",
8378
8408
  paddingVertical: 8,
8379
8409
  paddingHorizontal: 12,
8380
- borderRadius: 20,
8410
+ borderRadius: 0,
8381
8411
  marginHorizontal: 8
8382
8412
  },
8383
8413
  selectedTagButton: {
@@ -9514,5 +9544,5 @@ const RadioButtonGroup = ({
9514
9544
  )));
9515
9545
  };
9516
9546
 
9517
- export { Accordion$1 as Accordion, AnimationWithImperativeApi as AnimationLoitte, index$1 as AppointmentCard, Badge$1 as Badge, BottomDrawer, CustomButton$1 as Button, Cards, category as Category, Checkbox as CheckBox, ContactModel, CountryDropDown as CountryPicker, CustomDocumentPicker$1 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, CustomHeader$1 as CustomHeader, CustomIcon, CustomLoader$1 as CustomLoader, CustomProgressBar, CustomSearchBar, index$2 as CustomSlideButton, CustomSwitchBtn, CustomText$1 as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, DateRangePicker$1 as DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, feedback as FeedbackForm, FileUpload, FontStyle, Line, 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, CommonTextInput as TextInput, Theme, Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, Topic$1 as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
9547
+ export { Accordion$1 as Accordion, AnimationWithImperativeApi as AnimationLoitte, index$1 as AppointmentCard, Badge$1 as Badge, BottomDrawer, CustomButton$1 as Button, Cards, category as Category, Checkbox as CheckBox, ContactModel, CountryDropDown as CountryPicker, CustomDocumentPicker$1 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, CustomHeader$1 as CustomHeader, CustomIcon, CustomLoader$1 as CustomLoader, CustomProgressBar, CustomSearchBar, index$2 as CustomSlideButton, CustomSwitchBtn, CustomText$1 as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, DateRangePicker$1 as DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, feedback as FeedbackForm, FileUpload, FontStyle, Line, 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, CommonTextInput as TextInput, Theme, Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, Topic$1 as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
9518
9548
  //# sourceMappingURL=index.mjs.map