sag_components 2.0.0-beta331 → 2.0.0-beta333

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/dist/index.d.ts CHANGED
@@ -1670,7 +1670,7 @@ declare function QuickFilterCards({ data, onCardToggle, width, CardsContainerCla
1670
1670
  CardsContainerClassName?: string;
1671
1671
  }): react_jsx_runtime.JSX.Element;
1672
1672
 
1673
- declare function RangePicker({ label, onChange, borderRadius, required, width, height, placeholder, disabled, borderColor, borderColorFocus, textColor, selectedValue, }: {
1673
+ declare function RangePicker({ label, onChange, borderRadius, required, width, height, placeholder, disabled, borderColor, borderColorFocus, textColor, selectedValue, selectedColor, hoverColor, inRangeColor, clearButtonColor, calendarIconColor, }: {
1674
1674
  label: any;
1675
1675
  onChange: any;
1676
1676
  borderRadius: any;
@@ -1683,6 +1683,11 @@ declare function RangePicker({ label, onChange, borderRadius, required, width, h
1683
1683
  borderColorFocus: any;
1684
1684
  textColor: any;
1685
1685
  selectedValue: any;
1686
+ selectedColor: any;
1687
+ hoverColor: any;
1688
+ inRangeColor: any;
1689
+ clearButtonColor: any;
1690
+ calendarIconColor: any;
1686
1691
  }): react_jsx_runtime.JSX.Element;
1687
1692
  declare namespace RangePicker {
1688
1693
  namespace propTypes {
@@ -1698,6 +1703,11 @@ declare namespace RangePicker {
1698
1703
  const borderColorFocus: PropTypes.Requireable<string>;
1699
1704
  const textColor: PropTypes.Requireable<string>;
1700
1705
  const selectedValue: PropTypes.Requireable<string>;
1706
+ const selectedColor: PropTypes.Requireable<string>;
1707
+ const hoverColor: PropTypes.Requireable<string>;
1708
+ const inRangeColor: PropTypes.Requireable<string>;
1709
+ const clearButtonColor: PropTypes.Requireable<string>;
1710
+ const calendarIconColor: PropTypes.Requireable<string>;
1701
1711
  }
1702
1712
  namespace defaultProps {
1703
1713
  const required_1: boolean;
@@ -1718,6 +1728,16 @@ declare namespace RangePicker {
1718
1728
  export { textColor_1 as textColor };
1719
1729
  const selectedValue_1: string;
1720
1730
  export { selectedValue_1 as selectedValue };
1731
+ const selectedColor_1: string;
1732
+ export { selectedColor_1 as selectedColor };
1733
+ const hoverColor_1: string;
1734
+ export { hoverColor_1 as hoverColor };
1735
+ const inRangeColor_1: string;
1736
+ export { inRangeColor_1 as inRangeColor };
1737
+ const clearButtonColor_1: string;
1738
+ export { clearButtonColor_1 as clearButtonColor };
1739
+ const calendarIconColor_1: string;
1740
+ export { calendarIconColor_1 as calendarIconColor };
1721
1741
  }
1722
1742
  }
1723
1743
 
package/dist/index.esm.js CHANGED
@@ -439,16 +439,21 @@ const CalendarInOpen = _ref => {
439
439
  }));
440
440
  };
441
441
 
442
- const Calendar = () => /*#__PURE__*/React$1.createElement("svg", {
443
- width: "11",
444
- height: "12",
445
- viewBox: "0 0 11 12",
446
- fill: "none",
447
- xmlns: "http://www.w3.org/2000/svg"
448
- }, /*#__PURE__*/React$1.createElement("path", {
449
- d: "M2.625 0C2.8125 0 3 0.1875 3 0.375V1.5H7.5V0.375C7.5 0.1875 7.66406 0 7.875 0C8.0625 0 8.25 0.1875 8.25 0.375V1.5H9C9.82031 1.5 10.5 2.17969 10.5 3V3.75V4.5V10.5C10.5 11.3438 9.82031 12 9 12H1.5C0.65625 12 0 11.3438 0 10.5V4.5V3.75V3C0 2.17969 0.65625 1.5 1.5 1.5H2.25V0.375C2.25 0.1875 2.41406 0 2.625 0ZM9.75 4.5H0.75V10.5C0.75 10.9219 1.07812 11.25 1.5 11.25H9C9.39844 11.25 9.75 10.9219 9.75 10.5V4.5ZM9 2.25H1.5C1.07812 2.25 0.75 2.60156 0.75 3V3.75H9.75V3C9.75 2.60156 9.39844 2.25 9 2.25Z",
450
- fill: "#568202"
451
- }));
442
+ const Calendar = _ref => {
443
+ let {
444
+ fill = '#568202'
445
+ } = _ref;
446
+ return /*#__PURE__*/React$1.createElement("svg", {
447
+ width: "11",
448
+ height: "12",
449
+ viewBox: "0 0 11 12",
450
+ fill: "none",
451
+ xmlns: "http://www.w3.org/2000/svg"
452
+ }, /*#__PURE__*/React$1.createElement("path", {
453
+ d: "M2.625 0C2.8125 0 3 0.1875 3 0.375V1.5H7.5V0.375C7.5 0.1875 7.66406 0 7.875 0C8.0625 0 8.25 0.1875 8.25 0.375V1.5H9C9.82031 1.5 10.5 2.17969 10.5 3V3.75V4.5V10.5C10.5 11.3438 9.82031 12 9 12H1.5C0.65625 12 0 11.3438 0 10.5V4.5V3.75V3C0 2.17969 0.65625 1.5 1.5 1.5H2.25V0.375C2.25 0.1875 2.41406 0 2.625 0ZM9.75 4.5H0.75V10.5C0.75 10.9219 1.07812 11.25 1.5 11.25H9C9.39844 11.25 9.75 10.9219 9.75 10.5V4.5ZM9 2.25H1.5C1.07812 2.25 0.75 2.60156 0.75 3V3.75H9.75V3C9.75 2.60156 9.39844 2.25 9 2.25Z",
454
+ fill: fill
455
+ }));
456
+ };
452
457
 
453
458
  // eslint-disable-next-line react/prop-types
454
459
  const ErrorIcon = _ref => {
@@ -10090,7 +10095,9 @@ const DatePickerFooter = styled.div`
10090
10095
  margin-top: 10px;
10091
10096
  `;
10092
10097
  const ClearButton$1 = styled.button`
10093
- color: #568202;
10098
+ color: ${({
10099
+ clearButtonColor
10100
+ }) => clearButtonColor || '#568202'};
10094
10101
  text-align: center;
10095
10102
  font-family: Poppins;
10096
10103
  font-size: 12px;
@@ -10140,19 +10147,27 @@ const DateCell$2 = styled.div`
10140
10147
  transition: background-color 0.3s ease;
10141
10148
 
10142
10149
  &:hover {
10143
- background: #f4faf5;
10150
+ background: ${({
10151
+ hoverColor
10152
+ }) => hoverColor || '#f4faf5'};
10144
10153
  }
10145
10154
 
10146
10155
  &.selected {
10147
- background-color: #229e38;
10156
+ background-color: ${({
10157
+ selectedColor
10158
+ }) => selectedColor || '#229e38'};
10148
10159
  color: #fff;
10149
10160
  }
10150
10161
  &.startselected {
10151
- border: 1px solid #229e38;
10162
+ border: 1px solid ${({
10163
+ selectedColor
10164
+ }) => selectedColor || '#229e38'};
10152
10165
  }
10153
10166
  &.inrange {
10154
10167
  border-radius: 0px;
10155
- background-color: #effef2;
10168
+ background-color: ${({
10169
+ inRangeColor
10170
+ }) => inRangeColor || '#effef2'};
10156
10171
  }
10157
10172
  `;
10158
10173
  const daysOfWeek = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
@@ -10163,7 +10178,11 @@ const DatePicker = ({
10163
10178
  value,
10164
10179
  setValue,
10165
10180
  startDateValue,
10166
- endDateValue
10181
+ endDateValue,
10182
+ selectedColor,
10183
+ hoverColor,
10184
+ inRangeColor,
10185
+ clearButtonColor
10167
10186
  }) => {
10168
10187
  const [startDate, setStartDate] = useState(null);
10169
10188
  const [endDate, setEndDate] = useState(null);
@@ -10234,12 +10253,15 @@ const DatePicker = ({
10234
10253
  }, /*#__PURE__*/React$1.createElement(ChervronRightIcon, null)))), /*#__PURE__*/React$1.createElement(DatePickerCalendar$2, {
10235
10254
  className: "DatePickerCalendar"
10236
10255
  }, daysOfWeek.map(day => /*#__PURE__*/React$1.createElement(DateCell$2, {
10237
- key: day
10256
+ key: day,
10257
+ hoverColor: hoverColor
10238
10258
  }, day)), dates.map(date => {
10239
10259
  if (startDate && endDate && (date.getTime() === startDate.getTime() || date.getTime() === endDate.getTime())) {
10240
10260
  return /*#__PURE__*/React$1.createElement(DateCell$2, {
10241
10261
  key: date.toISOString(),
10242
10262
  className: "selected",
10263
+ selectedColor: selectedColor,
10264
+ hoverColor: hoverColor,
10243
10265
  onClick: () => handleDateSelect(date)
10244
10266
  }, date.getDate());
10245
10267
  }
@@ -10247,6 +10269,8 @@ const DatePicker = ({
10247
10269
  return /*#__PURE__*/React$1.createElement(DateCell$2, {
10248
10270
  key: date.toISOString(),
10249
10271
  className: "inrange",
10272
+ inRangeColor: inRangeColor,
10273
+ hoverColor: hoverColor,
10250
10274
  onClick: () => handleDateSelect(date)
10251
10275
  }, date.getDate());
10252
10276
  }
@@ -10254,12 +10278,15 @@ const DatePicker = ({
10254
10278
  return /*#__PURE__*/React$1.createElement(DateCell$2, {
10255
10279
  key: date.toISOString(),
10256
10280
  className: "startselected",
10281
+ selectedColor: selectedColor,
10282
+ hoverColor: hoverColor,
10257
10283
  onClick: () => handleDateSelect(date)
10258
10284
  }, date.getDate());
10259
10285
  }
10260
10286
  if (date.getMonth() === currentDate.getMonth()) {
10261
10287
  return /*#__PURE__*/React$1.createElement(DateCell$2, {
10262
10288
  key: date.toISOString(),
10289
+ hoverColor: hoverColor,
10263
10290
  onClick: () => handleDateSelect(date)
10264
10291
  }, date.getDate());
10265
10292
  }
@@ -10267,6 +10294,7 @@ const DatePicker = ({
10267
10294
  key: date.toISOString()
10268
10295
  });
10269
10296
  })), /*#__PURE__*/React$1.createElement(DatePickerFooter, null, /*#__PURE__*/React$1.createElement(ClearButton$1, {
10297
+ clearButtonColor: clearButtonColor,
10270
10298
  onClick: clearSelection
10271
10299
  }, "Clear")));
10272
10300
  };
@@ -10289,7 +10317,12 @@ const RangePicker = _ref => {
10289
10317
  borderColor,
10290
10318
  borderColorFocus,
10291
10319
  textColor,
10292
- selectedValue
10320
+ selectedValue,
10321
+ selectedColor,
10322
+ hoverColor,
10323
+ inRangeColor,
10324
+ clearButtonColor,
10325
+ calendarIconColor
10293
10326
  } = _ref;
10294
10327
  const [isFocused, setIsFocused] = useState(false);
10295
10328
  const [isOpen, setIsOpen] = useState(false);
@@ -10405,9 +10438,11 @@ const RangePicker = _ref => {
10405
10438
  className: "CalendarDiv",
10406
10439
  onClick: toggleDatePicker
10407
10440
  }, isOpen === true ? /*#__PURE__*/React$1.createElement(CalendarInOpen, {
10408
- className: "CalendarInOpen"
10441
+ className: "CalendarInOpen",
10442
+ fill: calendarIconColor
10409
10443
  }) : /*#__PURE__*/React$1.createElement(Calendar, {
10410
- className: "Calendar"
10444
+ className: "Calendar",
10445
+ fill: calendarIconColor
10411
10446
  }))), /*#__PURE__*/React$1.createElement(OptionsContainer$5, {
10412
10447
  className: "OptionsContainer",
10413
10448
  onMouseEnter: () => setHoverOptionsContainer(true),
@@ -10419,7 +10454,11 @@ const RangePicker = _ref => {
10419
10454
  value: value,
10420
10455
  setValue: setValue,
10421
10456
  startDateValue: startDateValue,
10422
- endDateValue: endDateValue
10457
+ endDateValue: endDateValue,
10458
+ selectedColor: selectedColor,
10459
+ hoverColor: hoverColor,
10460
+ inRangeColor: inRangeColor,
10461
+ clearButtonColor: clearButtonColor
10423
10462
  })));
10424
10463
  };
10425
10464
  RangePicker.propTypes = {
@@ -10436,7 +10475,12 @@ RangePicker.propTypes = {
10436
10475
  borderColorFocus: PropTypes.string,
10437
10476
  textColor: PropTypes.string,
10438
10477
  // Added textColor prop
10439
- selectedValue: PropTypes.string
10478
+ selectedValue: PropTypes.string,
10479
+ selectedColor: PropTypes.string,
10480
+ hoverColor: PropTypes.string,
10481
+ inRangeColor: PropTypes.string,
10482
+ clearButtonColor: PropTypes.string,
10483
+ calendarIconColor: PropTypes.string
10440
10484
  };
10441
10485
 
10442
10486
  // Adding defaultProps
@@ -10451,7 +10495,12 @@ RangePicker.defaultProps = {
10451
10495
  borderColorFocus: '#000000',
10452
10496
  textColor: '#000000',
10453
10497
  // Default textColor prop value
10454
- selectedValue: ''
10498
+ selectedValue: '',
10499
+ selectedColor: '#229e38',
10500
+ hoverColor: '#f4faf5',
10501
+ inRangeColor: '#effef2',
10502
+ clearButtonColor: '#568202',
10503
+ calendarIconColor: '#568202'
10455
10504
  };
10456
10505
 
10457
10506
  /* eslint-disable no-nested-ternary */