dhre-ui-kit 3.5.0 → 3.7.0

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.
@@ -0,0 +1,30 @@
1
+ declare const styles: {
2
+ container: {
3
+ flexDirection: "row";
4
+ alignItems: "center";
5
+ justifyContent: "space-between";
6
+ paddingVertical: number;
7
+ paddingHorizontal: number;
8
+ borderWidth: number;
9
+ borderStyle: "dashed";
10
+ borderRadius: number;
11
+ marginBottom: number;
12
+ };
13
+ fileUploadContainerStyle: {
14
+ flexDirection: "row";
15
+ alignItems: "center";
16
+ justifyContent: "space-between";
17
+ paddingVertical: number;
18
+ paddingHorizontal: number;
19
+ borderRadius: number;
20
+ marginBottom: number;
21
+ };
22
+ innerContainer: {
23
+ flexDirection: "row";
24
+ columnGap: number;
25
+ };
26
+ titleContainer: {
27
+ gap: number;
28
+ };
29
+ };
30
+ export default styles;
File without changes
@@ -21,6 +21,8 @@ interface CommonTextInputProps extends BaseTextInputProps {
21
21
  disableBorder?: boolean;
22
22
  /** Force RTL layout. When omitted, auto-detected from the label/value text. */
23
23
  forceRTL?: boolean;
24
+ /** Overrides the computed outline/border color (error/disabled/focused/filled logic). */
25
+ borderColor?: string;
24
26
  }
25
27
  declare const _default: (props: CommonTextInputProps) => React.JSX.Element;
26
28
  export default _default;
package/lib/index.js CHANGED
@@ -2013,7 +2013,7 @@ function buildPlainContainerStyle(variant, disabled, disabledColor, theme) {
2013
2013
  }
2014
2014
  if (variant === "quaternary") {
2015
2015
  return {
2016
- backgroundColor: "transparent",
2016
+ backgroundColor: theme[Theme.BUTTON_INVRTED_FILL],
2017
2017
  borderWidth: 1,
2018
2018
  borderColor: disabled ? theme[Theme.BUTTON_QUATERNARY_DISABLED_STROKE] : theme[Theme.BUTTON_QUATERNARY_DEFAULT_STROKE]
2019
2019
  };
@@ -3813,7 +3813,7 @@ const CustomHeader = ({
3813
3813
  {
3814
3814
  variant: "BODY1_MEDIUM",
3815
3815
  text: title,
3816
- style: { color: titleColor ?? theme.CONTENT_PRIMARY["dark"] }
3816
+ style: { color: titleColor ?? theme.CONTENT_PRIMARY }
3817
3817
  }
3818
3818
  ), titleSuffixIcon && React__default["default"].cloneElement(titleSuffixIcon, {
3819
3819
  width: ICON_SIZE,
@@ -10979,15 +10979,15 @@ const DateRangePicker = (props) => {
10979
10979
  while (start < end) {
10980
10980
  start.setDate(start.getDate() + 1);
10981
10981
  markedDates[start.toISOString().split("T")[0]] = {
10982
- color: theme.SURFACE_PRIMARY_TRANSPARENT,
10983
- textColor: theme.CONTENT_PRIMARY
10982
+ color: theme.SURFACE_SECONDARY_TRANSPARENT,
10983
+ textColor: theme.CONTENT_INVERTED
10984
10984
  };
10985
10985
  }
10986
10986
  }
10987
10987
  if (startDate) {
10988
10988
  markedDates[startDate] = {
10989
10989
  startingDay: true,
10990
- textColor: theme.CONTENT_PRIMARY,
10990
+ textColor: theme.CONTENT_INVERTED,
10991
10991
  customContainerStyle: {
10992
10992
  backgroundColor: theme.CONTENT_ARROW_HIGHLIGHT,
10993
10993
  borderRadius: 200,
@@ -11001,8 +11001,8 @@ const DateRangePicker = (props) => {
11001
11001
  if (endDate) {
11002
11002
  markedDates[endDate] = {
11003
11003
  endingDay: true,
11004
- color: theme.SURFACE_PRIMARY_TRANSPARENT,
11005
- textColor: theme.CONTENT_PRIMARY,
11004
+ color: theme.SURFACE_SECONDARY_TRANSPARENT,
11005
+ textColor: theme.CONTENT_INVERTED,
11006
11006
  customContainerStyle: {
11007
11007
  backgroundColor: theme.CONTENT_ARROW_HIGHLIGHT,
11008
11008
  borderRadius: 200,
@@ -11014,8 +11014,8 @@ const DateRangePicker = (props) => {
11014
11014
  };
11015
11015
  markedDates[startDate] = {
11016
11016
  startingDay: true,
11017
- color: theme.SURFACE_PRIMARY_TRANSPARENT,
11018
- textColor: theme.CONTENT_PRIMARY,
11017
+ color: theme.SURFACE_SECONDARY_TRANSPARENT,
11018
+ textColor: theme.CONTENT_INVERTED,
11019
11019
  customContainerStyle: {
11020
11020
  backgroundColor: theme.CONTENT_ARROW_HIGHLIGHT,
11021
11021
  borderRadius: 200,
@@ -11034,10 +11034,10 @@ const DateRangePicker = (props) => {
11034
11034
  {
11035
11035
  style: [
11036
11036
  styles$b.calendarHeader,
11037
- { borderBottomColor: theme.STROKE_TERTIARY }
11037
+ { borderBottomColor: theme.STROKE_SECONDARY }
11038
11038
  ]
11039
11039
  },
11040
- /* @__PURE__ */ React__default["default"].createElement(reactNative.Text, { style: [styles$b.monthText, { color: theme.CONTENT_PRIMARY }] }, monthLabel),
11040
+ /* @__PURE__ */ React__default["default"].createElement(reactNative.Text, { style: [styles$b.monthText, { color: theme.CONTENT_INVERTED }] }, monthLabel),
11041
11041
  /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$b.arrowsContainer }, /* @__PURE__ */ React__default["default"].createElement(
11042
11042
  reactNative.TouchableOpacity,
11043
11043
  {
@@ -11048,7 +11048,7 @@ const DateRangePicker = (props) => {
11048
11048
  Svg.Path,
11049
11049
  {
11050
11050
  d: "M15 19.5L7.5 12L15 4.5",
11051
- stroke: theme.CONTENT_PRIMARY,
11051
+ stroke: theme.CONTENT_INVERTED,
11052
11052
  strokeWidth: 1.5,
11053
11053
  strokeLinecap: "round",
11054
11054
  strokeLinejoin: "round"
@@ -11064,7 +11064,7 @@ const DateRangePicker = (props) => {
11064
11064
  Svg.Path,
11065
11065
  {
11066
11066
  d: "M6.75 3.375L12.375 9L6.75 14.625",
11067
- stroke: theme.CONTENT_PRIMARY,
11067
+ stroke: theme.CONTENT_INVERTED,
11068
11068
  strokeWidth: 1.5,
11069
11069
  strokeLinecap: "round",
11070
11070
  strokeLinejoin: "round"
@@ -11075,7 +11075,10 @@ const DateRangePicker = (props) => {
11075
11075
  return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, null, /* @__PURE__ */ React__default["default"].createElement(
11076
11076
  reactNative.View,
11077
11077
  {
11078
- style: [styles$b.calendarCard, { backgroundColor: theme.SURFACE_PRIMARY }]
11078
+ style: [
11079
+ styles$b.calendarCard,
11080
+ { backgroundColor: theme.SURFACE_INVERTED }
11081
+ ]
11079
11082
  },
11080
11083
  /* @__PURE__ */ React__default["default"].createElement(
11081
11084
  reactNativeCalendars.Calendar,
@@ -11088,9 +11091,9 @@ const DateRangePicker = (props) => {
11088
11091
  renderHeader: renderCalendarHeader,
11089
11092
  theme: {
11090
11093
  calendarBackground: "transparent",
11091
- dayTextColor: theme.CONTENT_PRIMARY,
11094
+ dayTextColor: theme.CONTENT_INVERTED,
11092
11095
  textDisabledColor: theme.CONTENT_DISABLE_DARK,
11093
- todayTextColor: theme.CONTENT_PRIMARY,
11096
+ todayTextColor: theme.CONTENT_INVERTED,
11094
11097
  todayBackgroundColor: theme.CONTENT_ARROW_HIGHLIGHT,
11095
11098
  textSectionTitleColor: theme.CONTENT_DISABLE_LIGHT,
11096
11099
  textDayFontSize: 16,
@@ -11144,11 +11147,12 @@ const DateRangePicker = (props) => {
11144
11147
  ), /* @__PURE__ */ React__default["default"].createElement(
11145
11148
  Button,
11146
11149
  {
11150
+ containerStyle: styles$b.applyButton,
11147
11151
  title: btnTitle,
11148
11152
  onPress: () => {
11149
11153
  onButtonPress(selectedRange?.startDate, selectedRange?.endDate);
11150
11154
  },
11151
- variant: "primary",
11155
+ variant: "tertiary",
11152
11156
  size: "large",
11153
11157
  disabled: isButtonDisabled
11154
11158
  }
@@ -11776,7 +11780,8 @@ const CommonTextInput = (props) => {
11776
11780
  onRightIconPress,
11777
11781
  onlyErrorBorderLabel,
11778
11782
  disableBorder = false,
11779
- forceRTL
11783
+ forceRTL,
11784
+ borderColor: borderColorOverride
11780
11785
  } = props;
11781
11786
  const [isFocused, setIsFocused] = React.useState(false);
11782
11787
  const handleFocus = () => setIsFocused(true);
@@ -11785,7 +11790,7 @@ const CommonTextInput = (props) => {
11785
11790
  const isDisabled = !editable;
11786
11791
  const isError = !!(errorMessage?.length || onlyErrorBorderLabel);
11787
11792
  const hasValue = !!value?.length;
11788
- const currentBorderColor = isError ? theme[Theme.ERROR] : isDisabled ? theme[Theme.STROKE_TERTIARY] : isFocused || hasValue && !disableBorder ? theme[Theme.STROKE_ACTIVE] : theme[Theme.STROKE_SECONDARY];
11793
+ const currentBorderColor = borderColorOverride ?? (isError ? theme[Theme.ERROR] : isDisabled ? theme[Theme.STROKE_TERTIARY] : isFocused || hasValue && !disableBorder ? theme[Theme.STROKE_ACTIVE] : theme[Theme.STROKE_SECONDARY]);
11789
11794
  const borderWidth = isFocused && !isDisabled ? 2 : 1;
11790
11795
  const inputTextColor = isDisabled ? theme[Theme.CONTENT_TERTIARY] : theme[Theme.CONTENT_PRIMARY];
11791
11796
  const placeholderColor = theme[Theme.CONTENT_SECONDRY];