sag_components 2.0.0-beta282 → 2.0.0-beta284

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.esm.js CHANGED
@@ -2322,7 +2322,7 @@ const TooltipContainer$4 = styled.div`
2322
2322
  `;
2323
2323
 
2324
2324
  /* Wrapping */
2325
- const TooltipWrapper$2 = styled.div`
2325
+ const TooltipWrapper$3 = styled.div`
2326
2326
  display: inline-block;
2327
2327
  position: relative;
2328
2328
  `;
@@ -2429,7 +2429,7 @@ const Tooltip$2 = props => {
2429
2429
  };
2430
2430
  return /*#__PURE__*/React$1.createElement(TooltipContainer$4, {
2431
2431
  className: className
2432
- }, /*#__PURE__*/React$1.createElement(TooltipWrapper$2, {
2432
+ }, /*#__PURE__*/React$1.createElement(TooltipWrapper$3, {
2433
2433
  className: "tooltip-wrapper",
2434
2434
  onMouseEnter: showTooltip ? showTip : () => {},
2435
2435
  onMouseLeave: showTooltip ? hideTip : () => {}
@@ -8930,27 +8930,28 @@ const IconContainer$5 = styled.div`
8930
8930
  cursor: pointer;
8931
8931
  `;
8932
8932
 
8933
- const DropdownSingleNew = ({
8934
- label,
8935
- labelEmptyValue,
8936
- options,
8937
- selectedValue,
8938
- onChange,
8939
- required,
8940
- disabled,
8941
- width,
8942
- height,
8943
- minHeight,
8944
- withMarginBottom = true,
8945
- error,
8946
- errorMessage,
8947
- xIconShow,
8948
- labelColor,
8949
- showLabelOnTop,
8950
- orderBy,
8951
- placeHolder = "",
8952
- elementType
8953
- }) => {
8933
+ const DropdownSingleNew = _ref => {
8934
+ let {
8935
+ label,
8936
+ labelEmptyValue,
8937
+ options,
8938
+ selectedValue,
8939
+ onChange,
8940
+ required,
8941
+ disabled,
8942
+ width,
8943
+ height,
8944
+ minHeight,
8945
+ withMarginBottom = true,
8946
+ error,
8947
+ errorMessage,
8948
+ xIconShow,
8949
+ labelColor,
8950
+ showLabelOnTop,
8951
+ orderBy,
8952
+ placeHolder = "",
8953
+ elementType
8954
+ } = _ref;
8954
8955
  const [isFocused, setIsFocused] = useState(false);
8955
8956
  const [showOptions, setShowOptions] = useState(false);
8956
8957
  const [showAbove, setShowAbove] = useState(false);
@@ -12165,7 +12166,7 @@ const PaginationContainer = styled.div`
12165
12166
  cursor: default;
12166
12167
  }
12167
12168
  `;
12168
- const TooltipWrapper$1 = styled.div`
12169
+ const TooltipWrapper$2 = styled.div`
12169
12170
  width: max-content;
12170
12171
  max-width: 330px;
12171
12172
  /* white-space: wrap; */
@@ -12483,7 +12484,7 @@ const ReportTable = props => {
12483
12484
  }
12484
12485
  return colNumber;
12485
12486
  };
12486
- const getTooltipText = value => /*#__PURE__*/React$1.createElement(TooltipWrapper$1, null, value);
12487
+ const getTooltipText = value => /*#__PURE__*/React$1.createElement(TooltipWrapper$2, null, value);
12487
12488
  const truncateString = (str, maxLength) => {
12488
12489
  let val = str.length > maxLength ? str.slice(0, maxLength) + "..." : str;
12489
12490
  return val;
@@ -26573,7 +26574,7 @@ const TooltipContainer$3 = styled.div`
26573
26574
  top: ${props => props.top};
26574
26575
  left: ${props => props.left};
26575
26576
  `;
26576
- const TooltipWrapper = styled.div`
26577
+ const TooltipWrapper$1 = styled.div`
26577
26578
  display: inline-block;
26578
26579
  position: relative;
26579
26580
  `;
@@ -26673,7 +26674,7 @@ const Tooltip$1 = props => {
26673
26674
  className: className,
26674
26675
  top: `${top}px`,
26675
26676
  left: `${left}px`
26676
- }, /*#__PURE__*/React$1.createElement(TooltipWrapper, null, /*#__PURE__*/React$1.createElement(TooltipTip, {
26677
+ }, /*#__PURE__*/React$1.createElement(TooltipWrapper$1, null, /*#__PURE__*/React$1.createElement(TooltipTip, {
26677
26678
  className: `controls ${direction || 'top'}`
26678
26679
  }, content)));
26679
26680
  };
@@ -34975,17 +34976,18 @@ css`
34975
34976
  * • onApply(start,end) — callback, both numbers (inclusive)
34976
34977
  * • onCancel() — callback
34977
34978
  */
34978
- const WeeksCalendar = ({
34979
- year,
34980
- defaultStartWeek = null,
34981
- defaultEndWeek = null,
34982
- backgroundColor = "#066768",
34983
- hoverBackgroundColor = "#E6F0F0",
34984
- allowedWeekRange = null,
34985
- // New prop for range restriction
34986
- onApply,
34987
- onCancel
34988
- }) => {
34979
+ const WeeksCalendar = _ref => {
34980
+ let {
34981
+ year,
34982
+ defaultStartWeek = null,
34983
+ defaultEndWeek = null,
34984
+ backgroundColor = "#066768",
34985
+ hoverBackgroundColor = "#E6F0F0",
34986
+ allowedWeekRange = null,
34987
+ // New prop for range restriction
34988
+ onApply,
34989
+ onCancel
34990
+ } = _ref;
34989
34991
  // state -------------------------------------------------
34990
34992
  const [startWeek, setStartWeek] = useState(defaultStartWeek);
34991
34993
  const [endWeek, setEndWeek] = useState(defaultEndWeek);
@@ -57448,6 +57450,9 @@ const scrollableStyles = `
57448
57450
  border-radius: 4px;
57449
57451
  }
57450
57452
  `;
57453
+ const TooltipWrapper = styled(Tooltip$2)`
57454
+ max-width: 100%;
57455
+ `;
57451
57456
  const DropdownContainer = styled.div`
57452
57457
  position: relative;
57453
57458
  width: ${props => props.width || '100%'};
@@ -57481,7 +57486,7 @@ const DropdownList = styled.ul`
57481
57486
  border-radius: 10px;
57482
57487
  margin: 0;
57483
57488
  padding: 8px 0;
57484
- width: ${props => props.width || '100%'};
57489
+ min-width: ${props => props.width || '100%'};
57485
57490
  max-height: ${props => props.dropdownMaxHeight || '420px'};
57486
57491
  overflow-y: auto;
57487
57492
  left: 0;
@@ -57522,12 +57527,12 @@ const SectionTitle = styled.li`
57522
57527
  list-style: none;
57523
57528
  `;
57524
57529
  const DropdownItem = styled.li`
57525
- padding: 8px 12px;
57530
+ padding: 8px 20px;
57526
57531
  cursor: pointer;
57527
57532
  display: flex;
57528
57533
  align-items: center;
57534
+ gap: 8px;
57529
57535
  justify-content: space-between;
57530
- margin: 0 12px;
57531
57536
  background: ${props => props.selected ? props.selectedColor || '#066768' : 'transparent'};
57532
57537
  font-weight: ${props => props.selected ? '500' : '400'};
57533
57538
  color: ${props => props.disabled ? '#D0D0D0' : props.selected ? '#fff' : '#212121'};
@@ -57556,21 +57561,6 @@ const TruncatedText = styled.span`
57556
57561
  font-weight: 400;
57557
57562
  color: ${props => props.color};
57558
57563
  `;
57559
- styled.div`
57560
- position: absolute;
57561
- left: 0; // <- Align with left edge of parent
57562
- bottom: 100%; // <- Position ABOVE the element
57563
- margin-bottom: 8px; // <- Add space between tooltip and element
57564
- background: #fff;
57565
- color: #222;
57566
- border: 1px solid #e0e0e0;
57567
- border-radius: 6px;
57568
- box-shadow: 0 2px 12px rgba(0,0,0,0.12);
57569
- padding: 8px 12px;
57570
- font-size: 13px;
57571
- /* max-width: 320px; */
57572
- white-space: pre-line;
57573
- `;
57574
57564
  const Label$1 = styled.label`
57575
57565
  font-size: 14px;
57576
57566
  font-weight: 400;
@@ -57876,8 +57866,6 @@ OverlayTemplateDialog.propTypes = {
57876
57866
  };
57877
57867
 
57878
57868
  // OverlayDropdown.jsx
57879
-
57880
- // Main Component
57881
57869
  const OverlayDropdown = _ref => {
57882
57870
  let {
57883
57871
  // Data / selection
@@ -58127,7 +58115,12 @@ const OverlayDropdown = _ref => {
58127
58115
  isDarkerBackground: isDarkerBackground,
58128
58116
  height: height,
58129
58117
  type: "button"
58118
+ }, /*#__PURE__*/React$1.createElement(TooltipWrapper, {
58119
+ topFactor: -0.7,
58120
+ content: selected?.label,
58121
+ showTooltip: !!selected
58130
58122
  }, /*#__PURE__*/React$1.createElement(Wrapper, null, /*#__PURE__*/React$1.createElement(TruncatedText, {
58123
+ className: "selected",
58131
58124
  onMouseEnter: () => setHoveredText(selected?.label),
58132
58125
  onMouseLeave: () => setHoveredText(null),
58133
58126
  color: !selected && open ? placeHolderColor : "inherit"
@@ -58139,7 +58132,7 @@ const OverlayDropdown = _ref => {
58139
58132
  width: "12px",
58140
58133
  height: "12px",
58141
58134
  color: "#B1B1B1"
58142
- }))), open && /*#__PURE__*/React$1.createElement(DropdownList, {
58135
+ })))), open && /*#__PURE__*/React$1.createElement(DropdownList, {
58143
58136
  ref: dropdownRef,
58144
58137
  role: "listbox",
58145
58138
  dropdownMaxHeight: dropdownMaxHeight,