sag_components 2.0.0-beta211 → 2.0.0-beta212

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
@@ -34635,7 +34635,7 @@ const ModalBody = styled__default["default"].div`
34635
34635
  width: 100%;
34636
34636
  height: 100%;
34637
34637
  `;
34638
- const TooltipContent$1 = styled__default["default"].span`
34638
+ const TooltipContent$3 = styled__default["default"].span`
34639
34639
  color: #212121;
34640
34640
  font-family: Poppins;
34641
34641
  font-size: 14px;
@@ -34708,7 +34708,7 @@ const ModalWithOverlay = props => {
34708
34708
  }), showOkButton && (disableOkButton && tooltipContent !== '' ? /*#__PURE__*/React__default["default"].createElement(Tooltip$2, {
34709
34709
  direction: "top",
34710
34710
  topFactor: -0.85,
34711
- content: /*#__PURE__*/React__default["default"].createElement(TooltipContent$1, {
34711
+ content: /*#__PURE__*/React__default["default"].createElement(TooltipContent$3, {
34712
34712
  dangerouslySetInnerHTML: {
34713
34713
  __html: tooltipContent
34714
34714
  }
@@ -34896,17 +34896,18 @@ styled.css`
34896
34896
  * • onApply(start,end) — callback, both numbers (inclusive)
34897
34897
  * • onCancel() — callback
34898
34898
  */
34899
- const WeeksCalendar = ({
34900
- year,
34901
- defaultStartWeek = null,
34902
- defaultEndWeek = null,
34903
- backgroundColor = "#066768",
34904
- hoverBackgroundColor = "#E6F0F0",
34905
- allowedWeekRange = null,
34906
- // New prop for range restriction
34907
- onApply,
34908
- onCancel
34909
- }) => {
34899
+ const WeeksCalendar = _ref => {
34900
+ let {
34901
+ year,
34902
+ defaultStartWeek = null,
34903
+ defaultEndWeek = null,
34904
+ backgroundColor = "#066768",
34905
+ hoverBackgroundColor = "#E6F0F0",
34906
+ allowedWeekRange = null,
34907
+ // New prop for range restriction
34908
+ onApply,
34909
+ onCancel
34910
+ } = _ref;
34910
34911
  // state -------------------------------------------------
34911
34912
  const [startWeek, setStartWeek] = React$1.useState(defaultStartWeek);
34912
34913
  const [endWeek, setEndWeek] = React$1.useState(defaultEndWeek);
@@ -35988,9 +35989,12 @@ const ToggleSwitchLabel = styled__default["default"].label`
35988
35989
  position: relative;
35989
35990
  cursor: pointer;
35990
35991
  user-select: none;
35991
- opacity: ${({
35992
- disabled
35993
- }) => disabled ? 0.5 : 1};
35992
+ opacity: ${_ref => {
35993
+ let {
35994
+ disabled
35995
+ } = _ref;
35996
+ return disabled ? 0.5 : 1;
35997
+ }};
35994
35998
  `;
35995
35999
  const ToggleInput = styled__default["default"].input`
35996
36000
  display: none;
@@ -35998,15 +36002,19 @@ const ToggleInput = styled__default["default"].input`
35998
36002
  const ToggleSlider = styled__default["default"].span`
35999
36003
  display: block;
36000
36004
  position: relative;
36001
- background: ${({
36002
- checked,
36003
- disabled
36004
- }) => checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc"};
36005
+ background: ${_ref2 => {
36006
+ let {
36007
+ checked,
36008
+ disabled
36009
+ } = _ref2;
36010
+ return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
36011
+ }};
36005
36012
  border-radius: 999px;
36006
36013
  transition: background 0.2s;
36007
- ${({
36008
- size
36009
- }) => {
36014
+ ${_ref3 => {
36015
+ let {
36016
+ size
36017
+ } = _ref3;
36010
36018
  switch (size) {
36011
36019
  case "s":
36012
36020
  return styled.css`width: 40px; height: 20px;`;
@@ -36025,9 +36033,10 @@ const ToggleSlider = styled__default["default"].span`
36025
36033
  background: #fff;
36026
36034
  border-radius: 50%;
36027
36035
  transition: left 0.2s, width 0.2s, height 0.2s;
36028
- ${({
36029
- size
36030
- }) => {
36036
+ ${_ref4 => {
36037
+ let {
36038
+ size
36039
+ } = _ref4;
36031
36040
  switch (size) {
36032
36041
  case "s":
36033
36042
  return styled.css`width: 14px; height: 14px;`;
@@ -36037,10 +36046,11 @@ const ToggleSlider = styled__default["default"].span`
36037
36046
  return styled.css`width: 20px; height: 20px;`;
36038
36047
  }
36039
36048
  }}
36040
- left: ${({
36041
- checked,
36042
- size
36043
- }) => {
36049
+ left: ${_ref5 => {
36050
+ let {
36051
+ checked,
36052
+ size
36053
+ } = _ref5;
36044
36054
  if (!checked) return "3px";
36045
36055
  switch (size) {
36046
36056
  case "s":
@@ -36054,9 +36064,9 @@ const ToggleSlider = styled__default["default"].span`
36054
36064
  }
36055
36065
  `;
36056
36066
 
36057
- /**
36058
- * ToggleSwitch component for on/off states.
36059
- * Supports small/large sizes and disabled state.
36067
+ /**
36068
+ * ToggleSwitch component for on/off states.
36069
+ * Supports small/large sizes and disabled state.
36060
36070
  */
36061
36071
  function ToggleSwitch(_ref) {
36062
36072
  let {
@@ -39566,7 +39576,7 @@ const CloseButton = styled__default["default"].button`
39566
39576
  transform: scale(0.95);
39567
39577
  }
39568
39578
  `;
39569
- const TooltipContent = styled__default["default"].span`
39579
+ const TooltipContent$2 = styled__default["default"].span`
39570
39580
  color: #212121;
39571
39581
  font-family: Poppins;
39572
39582
  font-size: 14px;
@@ -39655,7 +39665,7 @@ const MessageBox = _ref => {
39655
39665
  direction: "top",
39656
39666
  showTooltip: isDisabled,
39657
39667
  topFactor: -0.85,
39658
- content: /*#__PURE__*/React__default["default"].createElement(TooltipContent, {
39668
+ content: /*#__PURE__*/React__default["default"].createElement(TooltipContent$2, {
39659
39669
  dangerouslySetInnerHTML: {
39660
39670
  __html: tooltipContent
39661
39671
  }
@@ -39743,7 +39753,7 @@ const TrashIcon = ({
39743
39753
  const DisabledTrashIcon = ({
39744
39754
  width = "22",
39745
39755
  height = "22",
39746
- color = "#D9D9D9"
39756
+ color = "#B1B1B1"
39747
39757
  }) => {
39748
39758
  return /*#__PURE__*/React__default["default"].createElement("svg", {
39749
39759
  width: width,
@@ -39756,7 +39766,7 @@ const DisabledTrashIcon = ({
39756
39766
  fill: color
39757
39767
  }), /*#__PURE__*/React__default["default"].createElement("path", {
39758
39768
  d: "M0.853591 21.8534L0.146484 21.1463L21.1463 0.146484L21.8534 0.853591L0.853591 21.8534Z",
39759
- fill: "#D9D9D9"
39769
+ fill: "#B1B1B1"
39760
39770
  }));
39761
39771
  };
39762
39772
 
@@ -44480,12 +44490,12 @@ const VendorItem$1 = styled.styled.div`
44480
44490
  cursor: pointer;
44481
44491
 
44482
44492
  &:hover {
44483
- background: #f7f7fa;
44493
+ background: #E6F0F0;
44484
44494
  .trash-icon svg path {
44485
44495
  fill: #B1B1B1;
44486
44496
  }
44487
44497
  .trash-icon-disabled svg path {
44488
- fill: #D9D9D9;
44498
+ fill: #B1B1B1;
44489
44499
  }
44490
44500
  }
44491
44501
  `;
@@ -44548,6 +44558,14 @@ const CustomTooltip$1 = styled.styled(Tooltip$2)`
44548
44558
  }
44549
44559
  }
44550
44560
  `;
44561
+ const TooltipContent$1 = styled.styled.span`
44562
+ color: #212121;
44563
+ font-family: Poppins;
44564
+ font-size: 14px;
44565
+ font-style: normal;
44566
+ font-weight: 400;
44567
+ line-height: normal;
44568
+ `;
44551
44569
  const Container$1 = styled.styled.div`
44552
44570
  display: flex;
44553
44571
  align-items: center;
@@ -44644,6 +44662,7 @@ const DisabledTrashIconWrapper = styled.styled.div`
44644
44662
  &[data-tooltip]:hover::after {
44645
44663
  left: calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2 - 50px);
44646
44664
  }
44665
+
44647
44666
  `;
44648
44667
  const TrashIconWrapper = styled.styled.div`
44649
44668
  ${baseIconWrapperStyles}
@@ -44969,8 +44988,19 @@ const Item$1 = styled__default["default"].div`
44969
44988
  .trash-icon svg path {
44970
44989
  fill: #b1b1b1;
44971
44990
  }
44991
+ .trash-icon-disabled svg path {
44992
+ fill: #B1B1B1;
44993
+ }
44972
44994
  }
44973
44995
  `;
44996
+ const TooltipContent = styled__default["default"].span`
44997
+ color: #212121;
44998
+ font-family: Poppins;
44999
+ font-size: 14px;
45000
+ font-style: normal;
45001
+ font-weight: 400;
45002
+ line-height: normal;
45003
+ `;
44974
45004
  const Title$2 = styled__default["default"].div`
44975
45005
  font-size: 14px;
44976
45006
  overflow: hidden;
@@ -45160,6 +45190,7 @@ const NewSubitemList = props => {
45160
45190
  linkColor
45161
45191
  } = props;
45162
45192
  const [isHovered, setIsHovered] = React$1.useState(false);
45193
+ const [trashIsHovered, setTrashIsHovered] = React$1.useState(false);
45163
45194
  const vendorItems = itemAndPackage.find(i => i.name === vendor.name).packages || [];
45164
45195
  const onDeletePackage = item => {
45165
45196
  const updatedPackages = vendorItems.filter(pkg => pkg.brands !== item.brands);
@@ -45194,6 +45225,8 @@ const NewSubitemList = props => {
45194
45225
  };
45195
45226
  const handleMouseEnter = () => setIsHovered(true);
45196
45227
  const handleMouseLeave = () => setIsHovered(false);
45228
+ const handleMouseTrashEnter = () => setTrashIsHovered(true);
45229
+ const handleMouseTrashLeave = () => setTrashIsHovered(false);
45197
45230
  return /*#__PURE__*/React__default["default"].createElement(NewSubitemContainer$1, null, /*#__PURE__*/React__default["default"].createElement(Header$1, null, /*#__PURE__*/React__default["default"].createElement(BackButton$1, {
45198
45231
  onClick: onBack
45199
45232
  }, /*#__PURE__*/React__default["default"].createElement(ArrowLeftIcon, null)), /*#__PURE__*/React__default["default"].createElement(BackTitle$1, null, "All Vendors")), /*#__PURE__*/React__default["default"].createElement(SelectionTitle$1, null, vendor.name), /*#__PURE__*/React__default["default"].createElement(AddButtonContainer, null, /*#__PURE__*/React__default["default"].createElement(LinkButton, {
@@ -45210,7 +45243,11 @@ const NewSubitemList = props => {
45210
45243
  ref: el => setupTooltip(el, "Package was Sent")
45211
45244
  }, /*#__PURE__*/React__default["default"].createElement(CustomTooltip, {
45212
45245
  hideTooltip: isHovered,
45213
- content: "Package was Sent",
45246
+ content: /*#__PURE__*/React__default["default"].createElement(TooltipContent, {
45247
+ dangerouslySetInnerHTML: {
45248
+ __html: "Package was Sent"
45249
+ }
45250
+ }),
45214
45251
  topFactor: 0,
45215
45252
  direction: "right"
45216
45253
  }, item.status && Number(item.status) > 1 ? /*#__PURE__*/React__default["default"].createElement(PackageSendIcon, {
@@ -45222,14 +45259,25 @@ const NewSubitemList = props => {
45222
45259
  }
45223
45260
  }, item.brands && /*#__PURE__*/React__default["default"].createElement(Title$2, {
45224
45261
  title: item.brands
45225
- }, item.brands), item.component && /*#__PURE__*/React__default["default"].createElement(ComponentContainer, null, item.component[0]), /*#__PURE__*/React__default["default"].createElement(Chevron, null, /*#__PURE__*/React__default["default"].createElement(ArrowRightFullIcon, null))), item.status && Number(item.status) > 1 ? /*#__PURE__*/React__default["default"].createElement(DisabledTrashIconWrapper, {
45262
+ }, item.brands), item.component && /*#__PURE__*/React__default["default"].createElement(ComponentContainer, null, item.component[0]), /*#__PURE__*/React__default["default"].createElement(Chevron, null, /*#__PURE__*/React__default["default"].createElement(ArrowRightFullIcon, null))), item.status && Number(item.status) > 1 ? /*#__PURE__*/React__default["default"].createElement(CustomTooltip, {
45263
+ hideTooltip: trashIsHovered,
45264
+ content: /*#__PURE__*/React__default["default"].createElement(TooltipContent, {
45265
+ dangerouslySetInnerHTML: {
45266
+ __html: "Package cannot be deleted since it<br/> has been sent to the vendor as a form."
45267
+ }
45268
+ }),
45269
+ topFactor: 0,
45270
+ direction: "left"
45271
+ }, /*#__PURE__*/React__default["default"].createElement(DisabledTrashIconWrapper, {
45226
45272
  className: "trash-icon-disabled"
45227
45273
 
45228
45274
  // ref={(el) => setupTooltip(el, trashTooltipText)}
45229
45275
  }, /*#__PURE__*/React__default["default"].createElement(DisabledTrashIcon, {
45276
+ onMouseEnter: handleMouseTrashEnter,
45277
+ onMouseLeave: handleMouseTrashLeave,
45230
45278
  width: "22",
45231
45279
  height: "22"
45232
- })) : /*#__PURE__*/React__default["default"].createElement(TrashIconWrapper, {
45280
+ }))) : /*#__PURE__*/React__default["default"].createElement(TrashIconWrapper, {
45233
45281
  className: "trash-icon",
45234
45282
  onClick: e => {
45235
45283
  e.stopPropagation();
@@ -54142,7 +54190,7 @@ const ItemManagerPanel = _ref => {
54142
54190
  linkColor = "#212121",
54143
54191
  backgroundColor = 'white',
54144
54192
  buttonTooltipText = "Please fill out all forms before sending.",
54145
- trashTooltipText = 'Package cannot be deleted since it<br/> has been sent to the vendor as a form.',
54193
+ trashTooltipText = 'Vendor cannot be deleted since its packages <br/> have already been sent as a form.',
54146
54194
  maxVisibleVendors = 12,
54147
54195
  componentText = "Scale"
54148
54196
  } = _ref;
@@ -54348,7 +54396,11 @@ const ItemManagerPanel = _ref => {
54348
54396
  ref: headerRef
54349
54397
  }, /*#__PURE__*/React__default["default"].createElement(Container$1, null, /*#__PURE__*/React__default["default"].createElement(TitleContainer, null, /*#__PURE__*/React__default["default"].createElement(SectionTitle$1, null, "Vendors"), /*#__PURE__*/React__default["default"].createElement(SubtitleContainer, null, /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).length.toString(), " ", "Vendors", " "), /*#__PURE__*/React__default["default"].createElement("span", null, "\xB7"), /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).reduce((acc, item) => acc + (item.packages ? item.packages.length : 0), 0), " ", "Packages"))), editMode && /*#__PURE__*/React__default["default"].createElement(ButtonContainer, null, /*#__PURE__*/React__default["default"].createElement(CustomTooltip$1, {
54350
54398
  hideTooltip: !disabledSendForms,
54351
- content: buttonTooltipText,
54399
+ content: /*#__PURE__*/React__default["default"].createElement(TooltipContent$1, {
54400
+ dangerouslySetInnerHTML: {
54401
+ __html: buttonTooltipText
54402
+ }
54403
+ }),
54352
54404
  topFactor: 2,
54353
54405
  direction: "bottom"
54354
54406
  }, /*#__PURE__*/React__default["default"].createElement(Button$1, {
@@ -54398,9 +54450,15 @@ const ItemManagerPanel = _ref => {
54398
54450
  } else {
54399
54451
  return `${sentPackagesLength}/${packagesLength} Packages Sent`;
54400
54452
  }
54401
- })())), /*#__PURE__*/React__default["default"].createElement(VendorChevron$1, null, /*#__PURE__*/React__default["default"].createElement(ArrowRightFullIcon, null))), sentPackagesLength > 0 ? /*#__PURE__*/React__default["default"].createElement(DisabledTrashIconWrapper, null, /*#__PURE__*/React__default["default"].createElement(CustomTooltip$1, {
54453
+ })())), /*#__PURE__*/React__default["default"].createElement(VendorChevron$1, null, /*#__PURE__*/React__default["default"].createElement(ArrowRightFullIcon, null))), sentPackagesLength > 0 ? /*#__PURE__*/React__default["default"].createElement(DisabledTrashIconWrapper, {
54454
+ className: "trash-icon-disabled"
54455
+ }, /*#__PURE__*/React__default["default"].createElement(CustomTooltip$1, {
54402
54456
  hideTooltip: trashIsHovered,
54403
- content: trashTooltipText,
54457
+ content: /*#__PURE__*/React__default["default"].createElement(TooltipContent$1, {
54458
+ dangerouslySetInnerHTML: {
54459
+ __html: trashTooltipText
54460
+ }
54461
+ }),
54404
54462
  topFactor: 0,
54405
54463
  direction: "left"
54406
54464
  }, /*#__PURE__*/React__default["default"].createElement(DisabledTrashIcon, {
@@ -54550,10 +54608,11 @@ const DropdownList = styled__default["default"].ul`
54550
54608
  `}
54551
54609
  `;
54552
54610
  const SectionDiv = styled__default["default"].div`
54553
- ${({
54554
- $showBorder,
54555
- margin
54556
- }) => {
54611
+ ${_ref => {
54612
+ let {
54613
+ $showBorder,
54614
+ margin
54615
+ } = _ref;
54557
54616
  switch ($showBorder) {
54558
54617
  case 'Template Offer':
54559
54618
  return styled.css`border-top: 1px solid #e6e2e2ff;