sag_components 2.0.0-beta332 → 2.0.0-beta334

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.js CHANGED
@@ -449,16 +449,21 @@ const CalendarInOpen = _ref => {
449
449
  }));
450
450
  };
451
451
 
452
- const Calendar = () => /*#__PURE__*/React__default["default"].createElement("svg", {
453
- width: "11",
454
- height: "12",
455
- viewBox: "0 0 11 12",
456
- fill: "none",
457
- xmlns: "http://www.w3.org/2000/svg"
458
- }, /*#__PURE__*/React__default["default"].createElement("path", {
459
- 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",
460
- fill: "#568202"
461
- }));
452
+ const Calendar = _ref => {
453
+ let {
454
+ fill = '#568202'
455
+ } = _ref;
456
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
457
+ width: "11",
458
+ height: "12",
459
+ viewBox: "0 0 11 12",
460
+ fill: "none",
461
+ xmlns: "http://www.w3.org/2000/svg"
462
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
463
+ 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",
464
+ fill: fill
465
+ }));
466
+ };
462
467
 
463
468
  // eslint-disable-next-line react/prop-types
464
469
  const ErrorIcon = _ref => {
@@ -10187,7 +10192,8 @@ const DatePicker = ({
10187
10192
  selectedColor,
10188
10193
  hoverColor,
10189
10194
  inRangeColor,
10190
- clearButtonColor
10195
+ clearButtonColor,
10196
+ showClearButton
10191
10197
  }) => {
10192
10198
  const [startDate, setStartDate] = React$1.useState(null);
10193
10199
  const [endDate, setEndDate] = React$1.useState(null);
@@ -10298,7 +10304,7 @@ const DatePicker = ({
10298
10304
  return /*#__PURE__*/React__default["default"].createElement(DateCell$2, {
10299
10305
  key: date.toISOString()
10300
10306
  });
10301
- })), /*#__PURE__*/React__default["default"].createElement(DatePickerFooter, null, /*#__PURE__*/React__default["default"].createElement(ClearButton$1, {
10307
+ })), /*#__PURE__*/React__default["default"].createElement(DatePickerFooter, null, showClearButton && /*#__PURE__*/React__default["default"].createElement(ClearButton$1, {
10302
10308
  clearButtonColor: clearButtonColor,
10303
10309
  onClick: clearSelection
10304
10310
  }, "Clear")));
@@ -10326,7 +10332,10 @@ const RangePicker = _ref => {
10326
10332
  selectedColor,
10327
10333
  hoverColor,
10328
10334
  inRangeColor,
10329
- clearButtonColor
10335
+ clearButtonColor,
10336
+ calendarIconColor,
10337
+ showClearButton,
10338
+ showOpenIcon
10330
10339
  } = _ref;
10331
10340
  const [isFocused, setIsFocused] = React$1.useState(false);
10332
10341
  const [isOpen, setIsOpen] = React$1.useState(false);
@@ -10441,10 +10450,12 @@ const RangePicker = _ref => {
10441
10450
  }), /*#__PURE__*/React__default["default"].createElement(CalendarDiv$3, {
10442
10451
  className: "CalendarDiv",
10443
10452
  onClick: toggleDatePicker
10444
- }, isOpen === true ? /*#__PURE__*/React__default["default"].createElement(CalendarInOpen, {
10445
- className: "CalendarInOpen"
10453
+ }, isOpen && showOpenIcon ? /*#__PURE__*/React__default["default"].createElement(CalendarInOpen, {
10454
+ className: "CalendarInOpen",
10455
+ fill: calendarIconColor
10446
10456
  }) : /*#__PURE__*/React__default["default"].createElement(Calendar, {
10447
- className: "Calendar"
10457
+ className: "Calendar",
10458
+ fill: calendarIconColor
10448
10459
  }))), /*#__PURE__*/React__default["default"].createElement(OptionsContainer$5, {
10449
10460
  className: "OptionsContainer",
10450
10461
  onMouseEnter: () => setHoverOptionsContainer(true),
@@ -10460,7 +10471,8 @@ const RangePicker = _ref => {
10460
10471
  selectedColor: selectedColor,
10461
10472
  hoverColor: hoverColor,
10462
10473
  inRangeColor: inRangeColor,
10463
- clearButtonColor: clearButtonColor
10474
+ clearButtonColor: clearButtonColor,
10475
+ showClearButton: showClearButton
10464
10476
  })));
10465
10477
  };
10466
10478
  RangePicker.propTypes = {
@@ -10481,7 +10493,10 @@ RangePicker.propTypes = {
10481
10493
  selectedColor: PropTypes.string,
10482
10494
  hoverColor: PropTypes.string,
10483
10495
  inRangeColor: PropTypes.string,
10484
- clearButtonColor: PropTypes.string
10496
+ clearButtonColor: PropTypes.string,
10497
+ calendarIconColor: PropTypes.string,
10498
+ showClearButton: PropTypes.bool,
10499
+ showOpenIcon: PropTypes.bool
10485
10500
  };
10486
10501
 
10487
10502
  // Adding defaultProps
@@ -10500,7 +10515,10 @@ RangePicker.defaultProps = {
10500
10515
  selectedColor: '#229e38',
10501
10516
  hoverColor: '#f4faf5',
10502
10517
  inRangeColor: '#effef2',
10503
- clearButtonColor: '#568202'
10518
+ clearButtonColor: '#568202',
10519
+ calendarIconColor: '#568202',
10520
+ showClearButton: true,
10521
+ showOpenIcon: true
10504
10522
  };
10505
10523
 
10506
10524
  /* eslint-disable no-nested-ternary */