sag_components 2.0.0-beta283 → 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.js CHANGED
@@ -2332,7 +2332,7 @@ const TooltipContainer$4 = styled__default["default"].div`
2332
2332
  `;
2333
2333
 
2334
2334
  /* Wrapping */
2335
- const TooltipWrapper$2 = styled__default["default"].div`
2335
+ const TooltipWrapper$3 = styled__default["default"].div`
2336
2336
  display: inline-block;
2337
2337
  position: relative;
2338
2338
  `;
@@ -2439,7 +2439,7 @@ const Tooltip$2 = props => {
2439
2439
  };
2440
2440
  return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$4, {
2441
2441
  className: className
2442
- }, /*#__PURE__*/React__default["default"].createElement(TooltipWrapper$2, {
2442
+ }, /*#__PURE__*/React__default["default"].createElement(TooltipWrapper$3, {
2443
2443
  className: "tooltip-wrapper",
2444
2444
  onMouseEnter: showTooltip ? showTip : () => {},
2445
2445
  onMouseLeave: showTooltip ? hideTip : () => {}
@@ -8940,27 +8940,28 @@ const IconContainer$5 = styled__default["default"].div`
8940
8940
  cursor: pointer;
8941
8941
  `;
8942
8942
 
8943
- const DropdownSingleNew = ({
8944
- label,
8945
- labelEmptyValue,
8946
- options,
8947
- selectedValue,
8948
- onChange,
8949
- required,
8950
- disabled,
8951
- width,
8952
- height,
8953
- minHeight,
8954
- withMarginBottom = true,
8955
- error,
8956
- errorMessage,
8957
- xIconShow,
8958
- labelColor,
8959
- showLabelOnTop,
8960
- orderBy,
8961
- placeHolder = "",
8962
- elementType
8963
- }) => {
8943
+ const DropdownSingleNew = _ref => {
8944
+ let {
8945
+ label,
8946
+ labelEmptyValue,
8947
+ options,
8948
+ selectedValue,
8949
+ onChange,
8950
+ required,
8951
+ disabled,
8952
+ width,
8953
+ height,
8954
+ minHeight,
8955
+ withMarginBottom = true,
8956
+ error,
8957
+ errorMessage,
8958
+ xIconShow,
8959
+ labelColor,
8960
+ showLabelOnTop,
8961
+ orderBy,
8962
+ placeHolder = "",
8963
+ elementType
8964
+ } = _ref;
8964
8965
  const [isFocused, setIsFocused] = React$1.useState(false);
8965
8966
  const [showOptions, setShowOptions] = React$1.useState(false);
8966
8967
  const [showAbove, setShowAbove] = React$1.useState(false);
@@ -12175,7 +12176,7 @@ const PaginationContainer = styled__default["default"].div`
12175
12176
  cursor: default;
12176
12177
  }
12177
12178
  `;
12178
- const TooltipWrapper$1 = styled__default["default"].div`
12179
+ const TooltipWrapper$2 = styled__default["default"].div`
12179
12180
  width: max-content;
12180
12181
  max-width: 330px;
12181
12182
  /* white-space: wrap; */
@@ -12493,7 +12494,7 @@ const ReportTable = props => {
12493
12494
  }
12494
12495
  return colNumber;
12495
12496
  };
12496
- const getTooltipText = value => /*#__PURE__*/React__default["default"].createElement(TooltipWrapper$1, null, value);
12497
+ const getTooltipText = value => /*#__PURE__*/React__default["default"].createElement(TooltipWrapper$2, null, value);
12497
12498
  const truncateString = (str, maxLength) => {
12498
12499
  let val = str.length > maxLength ? str.slice(0, maxLength) + "..." : str;
12499
12500
  return val;
@@ -24653,25 +24654,26 @@ const IconContainer$2 = styled__default["default"].div`
24653
24654
  cursor: pointer;
24654
24655
  `;
24655
24656
 
24656
- const QuickFilterDropdownMultiSelection = ({
24657
- label,
24658
- labelEmptyValue,
24659
- options,
24660
- selectedValue,
24661
- placeHolder,
24662
- onChange,
24663
- required,
24664
- disabled,
24665
- width,
24666
- height,
24667
- error,
24668
- errorMessage,
24669
- labelColor,
24670
- xIconShow,
24671
- checkBoxColor,
24672
- showLabelOnTop,
24673
- dropdownHeight
24674
- }) => {
24657
+ const QuickFilterDropdownMultiSelection = _ref => {
24658
+ let {
24659
+ label,
24660
+ labelEmptyValue,
24661
+ options,
24662
+ selectedValue,
24663
+ placeHolder,
24664
+ onChange,
24665
+ required,
24666
+ disabled,
24667
+ width,
24668
+ height,
24669
+ error,
24670
+ errorMessage,
24671
+ labelColor,
24672
+ xIconShow,
24673
+ checkBoxColor,
24674
+ showLabelOnTop,
24675
+ dropdownHeight
24676
+ } = _ref;
24675
24677
  const [isFocused, setIsFocused] = React$1.useState(false);
24676
24678
  const [showOptions, setShowOptions] = React$1.useState(false);
24677
24679
  const [inputValue, setInputValue] = React$1.useState('');
@@ -26582,7 +26584,7 @@ const TooltipContainer$3 = styled__default["default"].div`
26582
26584
  top: ${props => props.top};
26583
26585
  left: ${props => props.left};
26584
26586
  `;
26585
- const TooltipWrapper = styled__default["default"].div`
26587
+ const TooltipWrapper$1 = styled__default["default"].div`
26586
26588
  display: inline-block;
26587
26589
  position: relative;
26588
26590
  `;
@@ -26682,7 +26684,7 @@ const Tooltip$1 = props => {
26682
26684
  className: className,
26683
26685
  top: `${top}px`,
26684
26686
  left: `${left}px`
26685
- }, /*#__PURE__*/React__default["default"].createElement(TooltipWrapper, null, /*#__PURE__*/React__default["default"].createElement(TooltipTip, {
26687
+ }, /*#__PURE__*/React__default["default"].createElement(TooltipWrapper$1, null, /*#__PURE__*/React__default["default"].createElement(TooltipTip, {
26686
26688
  className: `controls ${direction || 'top'}`
26687
26689
  }, content)));
26688
26690
  };
@@ -34984,17 +34986,18 @@ styled.css`
34984
34986
  * • onApply(start,end) — callback, both numbers (inclusive)
34985
34987
  * • onCancel() — callback
34986
34988
  */
34987
- const WeeksCalendar = ({
34988
- year,
34989
- defaultStartWeek = null,
34990
- defaultEndWeek = null,
34991
- backgroundColor = "#066768",
34992
- hoverBackgroundColor = "#E6F0F0",
34993
- allowedWeekRange = null,
34994
- // New prop for range restriction
34995
- onApply,
34996
- onCancel
34997
- }) => {
34989
+ const WeeksCalendar = _ref => {
34990
+ let {
34991
+ year,
34992
+ defaultStartWeek = null,
34993
+ defaultEndWeek = null,
34994
+ backgroundColor = "#066768",
34995
+ hoverBackgroundColor = "#E6F0F0",
34996
+ allowedWeekRange = null,
34997
+ // New prop for range restriction
34998
+ onApply,
34999
+ onCancel
35000
+ } = _ref;
34998
35001
  // state -------------------------------------------------
34999
35002
  const [startWeek, setStartWeek] = React$1.useState(defaultStartWeek);
35000
35003
  const [endWeek, setEndWeek] = React$1.useState(defaultEndWeek);
@@ -57457,6 +57460,9 @@ const scrollableStyles = `
57457
57460
  border-radius: 4px;
57458
57461
  }
57459
57462
  `;
57463
+ const TooltipWrapper = styled__default["default"](Tooltip$2)`
57464
+ max-width: 100%;
57465
+ `;
57460
57466
  const DropdownContainer = styled__default["default"].div`
57461
57467
  position: relative;
57462
57468
  width: ${props => props.width || '100%'};
@@ -57490,7 +57496,7 @@ const DropdownList = styled__default["default"].ul`
57490
57496
  border-radius: 10px;
57491
57497
  margin: 0;
57492
57498
  padding: 8px 0;
57493
- width: ${props => props.width || '100%'};
57499
+ min-width: ${props => props.width || '100%'};
57494
57500
  max-height: ${props => props.dropdownMaxHeight || '420px'};
57495
57501
  overflow-y: auto;
57496
57502
  left: 0;
@@ -57531,12 +57537,12 @@ const SectionTitle = styled__default["default"].li`
57531
57537
  list-style: none;
57532
57538
  `;
57533
57539
  const DropdownItem = styled__default["default"].li`
57534
- padding: 8px 12px;
57540
+ padding: 8px 20px;
57535
57541
  cursor: pointer;
57536
57542
  display: flex;
57537
57543
  align-items: center;
57544
+ gap: 8px;
57538
57545
  justify-content: space-between;
57539
- margin: 0 12px;
57540
57546
  background: ${props => props.selected ? props.selectedColor || '#066768' : 'transparent'};
57541
57547
  font-weight: ${props => props.selected ? '500' : '400'};
57542
57548
  color: ${props => props.disabled ? '#D0D0D0' : props.selected ? '#fff' : '#212121'};
@@ -57565,21 +57571,6 @@ const TruncatedText = styled__default["default"].span`
57565
57571
  font-weight: 400;
57566
57572
  color: ${props => props.color};
57567
57573
  `;
57568
- styled__default["default"].div`
57569
- position: absolute;
57570
- left: 0; // <- Align with left edge of parent
57571
- bottom: 100%; // <- Position ABOVE the element
57572
- margin-bottom: 8px; // <- Add space between tooltip and element
57573
- background: #fff;
57574
- color: #222;
57575
- border: 1px solid #e0e0e0;
57576
- border-radius: 6px;
57577
- box-shadow: 0 2px 12px rgba(0,0,0,0.12);
57578
- padding: 8px 12px;
57579
- font-size: 13px;
57580
- /* max-width: 320px; */
57581
- white-space: pre-line;
57582
- `;
57583
57574
  const Label$1 = styled__default["default"].label`
57584
57575
  font-size: 14px;
57585
57576
  font-weight: 400;
@@ -57885,8 +57876,6 @@ OverlayTemplateDialog.propTypes = {
57885
57876
  };
57886
57877
 
57887
57878
  // OverlayDropdown.jsx
57888
-
57889
- // Main Component
57890
57879
  const OverlayDropdown = _ref => {
57891
57880
  let {
57892
57881
  // Data / selection
@@ -58136,7 +58125,12 @@ const OverlayDropdown = _ref => {
58136
58125
  isDarkerBackground: isDarkerBackground,
58137
58126
  height: height,
58138
58127
  type: "button"
58128
+ }, /*#__PURE__*/React__default["default"].createElement(TooltipWrapper, {
58129
+ topFactor: -0.7,
58130
+ content: selected?.label,
58131
+ showTooltip: !!selected
58139
58132
  }, /*#__PURE__*/React__default["default"].createElement(Wrapper, null, /*#__PURE__*/React__default["default"].createElement(TruncatedText, {
58133
+ className: "selected",
58140
58134
  onMouseEnter: () => setHoveredText(selected?.label),
58141
58135
  onMouseLeave: () => setHoveredText(null),
58142
58136
  color: !selected && open ? placeHolderColor : "inherit"
@@ -58148,7 +58142,7 @@ const OverlayDropdown = _ref => {
58148
58142
  width: "12px",
58149
58143
  height: "12px",
58150
58144
  color: "#B1B1B1"
58151
- }))), open && /*#__PURE__*/React__default["default"].createElement(DropdownList, {
58145
+ })))), open && /*#__PURE__*/React__default["default"].createElement(DropdownList, {
58152
58146
  ref: dropdownRef,
58153
58147
  role: "listbox",
58154
58148
  dropdownMaxHeight: dropdownMaxHeight,