@spscommerce/ds-react 6.12.1 → 6.14.0

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/lib/index.es.js CHANGED
@@ -24981,7 +24981,8 @@ function SpsLabel(_y) {
24981
24981
  const [, setShowPriorityTooltip] = getPriorityTooltip();
24982
24982
  setShowPriorityTooltip(TooltipVisibility.VISIBLE);
24983
24983
  }
24984
- function handleHelpClick() {
24984
+ function handleHelpClick(e2) {
24985
+ e2.preventDefault();
24985
24986
  hideTooltips();
24986
24987
  setShowHelpTip(toggleTooltipState(showHelpTip));
24987
24988
  }
@@ -25040,17 +25041,12 @@ function SpsLabel(_y) {
25040
25041
  "data-testid": `${testId}__suggested-icon`,
25041
25042
  className: clsx("sps-icon", "sps-icon-exclamation-triangle", "orange200", "sps-form-group__label-suggested-icon", !stronglySuggested && "d-none"),
25042
25043
  onClick: handleSuggestedIconClick,
25043
- onMouseEnter: () => {
25044
- hideTooltips();
25045
- setShowSuggestedTip(TooltipVisibility.VISIBLE);
25046
- },
25047
25044
  onMouseLeave: delayedHideTooltips
25048
25045
  }), /* @__PURE__ */ React.createElement("i", {
25049
25046
  ref: errorIcon,
25050
25047
  "data-testid": `${testId}__error-icon`,
25051
25048
  className: clsx("sps-icon", "sps-icon-exclamation-circle", "sps-form-group__label--error-icon"),
25052
25049
  onClick: handleLabelClick,
25053
- onMouseEnter: doShowPriorityTooltip,
25054
25050
  onMouseLeave: delayedHideTooltips
25055
25051
  }), /* @__PURE__ */ React.createElement("span", {
25056
25052
  ref: labelRef,
@@ -25060,10 +25056,6 @@ function SpsLabel(_y) {
25060
25056
  "data-testid": `${testId}__help-icon`,
25061
25057
  className: clsx("sps-icon", `sps-icon-${helpIcon}`, helpIconColor, !help && "d-none"),
25062
25058
  onClick: handleHelpClick,
25063
- onMouseEnter: () => {
25064
- hideTooltips();
25065
- setShowHelpTip(TooltipVisibility.VISIBLE);
25066
- },
25067
25059
  onMouseLeave: delayedHideTooltips
25068
25060
  })), /* @__PURE__ */ React.createElement(SpsTooltip, {
25069
25061
  kind: TooltipKind.DEFAULT,
@@ -25769,8 +25761,11 @@ const useColumnResizer = ({
25769
25761
  tableHeaderRef.current.style.width = width;
25770
25762
  tableHeaderRef.current.style.maxWidth = width;
25771
25763
  tableHeaderRef.current.style.minWidth = width;
25772
- tableHeaderRef.current.style.overflow = width ? "hidden" : null;
25773
- tableHeaderRef.current.style.textOverflow = width ? "ellipsis" : null;
25764
+ const tableHeaderBody = tableHeaderRef.current.querySelector(".sps-table__header-cell-body");
25765
+ if (tableHeaderBody) {
25766
+ tableHeaderBody.style.overflow = width ? "hidden" : null;
25767
+ tableHeaderBody.style.textOverflow = width ? "ellipsis" : null;
25768
+ }
25774
25769
  if (start) {
25775
25770
  const resizer = tableHeaderRef.current.querySelector(".sps-table__column-resizer");
25776
25771
  if (resizer) {
@@ -25781,13 +25776,20 @@ const useColumnResizer = ({
25781
25776
  tableHeaderRef.current.style.position = "relative";
25782
25777
  }
25783
25778
  if (table) {
25779
+ const tableHeaders = table.querySelectorAll("thead > tr > th");
25780
+ for (let i2 = 0; i2 < tableHeaders.length; i2 += 1) {
25781
+ const tableHeaderBody2 = tableHeaders[i2].querySelector(".sps-table__header-cell-body");
25782
+ if (tableHeaderBody2 && !tableHeaderBody2.title) {
25783
+ tableHeaderBody2.title = tableHeaderBody2.textContent;
25784
+ }
25785
+ }
25784
25786
  const cells = table.querySelectorAll(`tbody > tr > td:nth-of-type(${tableHeaderRef.current.cellIndex + 1})`);
25785
25787
  for (let i2 = 0; i2 < cells.length; i2 += 1) {
25786
25788
  cells[i2].style.width = width;
25787
25789
  cells[i2].style.maxWidth = width;
25788
25790
  cells[i2].style.minWidth = width;
25789
- cells[i2].style.overflow = width ? "hidden" : null;
25790
- cells[i2].style.textOverflow = width ? "ellipsis" : null;
25791
+ cells[i2].style.overflowWrap = width ? "break-word" : null;
25792
+ cells[i2].style.whiteSpace = width ? "normal" : null;
25791
25793
  if (!cells[i2].title) {
25792
25794
  cells[i2].title = cells[i2].textContent;
25793
25795
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spscommerce/ds-react",
3
3
  "description": "SPS Design System React components",
4
- "version": "6.12.1",
4
+ "version": "6.14.0",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-react",
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@react-stately/collections": "^3.3.3",
31
- "@spscommerce/ds-colors": "6.12.1",
32
- "@spscommerce/ds-illustrations": "6.12.1",
33
- "@spscommerce/ds-shared": "6.12.1",
34
- "@spscommerce/positioning": "6.12.1",
31
+ "@spscommerce/ds-colors": "6.14.0",
32
+ "@spscommerce/ds-illustrations": "6.14.0",
33
+ "@spscommerce/ds-shared": "6.14.0",
34
+ "@spscommerce/positioning": "6.14.0",
35
35
  "@spscommerce/utils": "^6.11.3",
36
36
  "moment": "^2.25.3",
37
37
  "moment-timezone": "^0.5.28",
@@ -40,10 +40,10 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@react-stately/collections": "^3.3.3",
43
- "@spscommerce/ds-colors": "6.12.1",
44
- "@spscommerce/ds-illustrations": "6.12.1",
45
- "@spscommerce/ds-shared": "6.12.1",
46
- "@spscommerce/positioning": "6.12.1",
43
+ "@spscommerce/ds-colors": "6.14.0",
44
+ "@spscommerce/ds-illustrations": "6.14.0",
45
+ "@spscommerce/ds-shared": "6.14.0",
46
+ "@spscommerce/positioning": "6.14.0",
47
47
  "@spscommerce/utils": "^6.11.3",
48
48
  "@testing-library/react": "^9.3.2",
49
49
  "@types/prop-types": "^15.7.1",