@spscommerce/ds-react 4.37.1 → 4.37.2
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.cjs.js +73 -73
- package/lib/index.es.js +8 -5
- package/package.json +10 -11
package/lib/index.es.js
CHANGED
|
@@ -1558,6 +1558,13 @@ const SpsOptionList = React.forwardRef((props2, ref2) => {
|
|
|
1558
1558
|
onPositionFlip(openingUpward);
|
|
1559
1559
|
}
|
|
1560
1560
|
}, [isOpen]);
|
|
1561
|
+
function highlightText(text, pattern2) {
|
|
1562
|
+
return pattern2 ? /* @__PURE__ */ React.createElement(React.Fragment, null, text.split(pattern2).map((part, partIdx) => pattern2.test(part) ? /* @__PURE__ */ React.createElement("u", {
|
|
1563
|
+
key: partIdx
|
|
1564
|
+
}, part) : /* @__PURE__ */ React.createElement(React.Fragment, {
|
|
1565
|
+
key: partIdx
|
|
1566
|
+
}, part))) : /* @__PURE__ */ React.createElement(React.Fragment, null, text);
|
|
1567
|
+
}
|
|
1561
1568
|
return portal(/* @__PURE__ */ React.createElement("div", __spreadValues({
|
|
1562
1569
|
className: classes,
|
|
1563
1570
|
id: id2,
|
|
@@ -1590,11 +1597,7 @@ const SpsOptionList = React.forwardRef((props2, ref2) => {
|
|
|
1590
1597
|
className: clsx("sps-icon", "sps-option-list__option-icon", `sps-icon-${String(option.value.icon)}`)
|
|
1591
1598
|
}), (!option.value || !option.value.icon && anyOptionHasIcon) && /* @__PURE__ */ React.createElement("span", {
|
|
1592
1599
|
className: "sps-option-list__option-icon-spacer"
|
|
1593
|
-
}), /* @__PURE__ */ React.createElement("span", {
|
|
1594
|
-
dangerouslySetInnerHTML: {
|
|
1595
|
-
__html: option.getHtml(searchState.replacementPattern)
|
|
1596
|
-
}
|
|
1597
|
-
}), option.caption && /* @__PURE__ */ React.createElement("div", {
|
|
1600
|
+
}), /* @__PURE__ */ React.createElement("span", null, highlightText(option.text, searchState.replacementPattern)), option.caption && /* @__PURE__ */ React.createElement("div", {
|
|
1598
1601
|
className: "sps-option-list__option-caption"
|
|
1599
1602
|
}, option.caption));
|
|
1600
1603
|
})), specialActionOption && specialAction.label && /* @__PURE__ */ React.createElement("a", {
|
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": "4.37.
|
|
4
|
+
"version": "4.37.2",
|
|
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": "4.37.
|
|
32
|
-
"@spscommerce/ds-shared": "4.37.
|
|
33
|
-
"@spscommerce/positioning": "4.37.
|
|
34
|
-
"@spscommerce/utils": "4.37.
|
|
31
|
+
"@spscommerce/ds-colors": "4.37.2",
|
|
32
|
+
"@spscommerce/ds-shared": "4.37.2",
|
|
33
|
+
"@spscommerce/positioning": "4.37.2",
|
|
34
|
+
"@spscommerce/utils": "4.37.2",
|
|
35
35
|
"moment": "^2.25.3",
|
|
36
36
|
"moment-timezone": "^0.5.28",
|
|
37
37
|
"react": "^16.9.0",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@react-stately/collections": "^3.3.3",
|
|
42
|
-
"@spscommerce/ds-colors": "4.37.
|
|
43
|
-
"@spscommerce/ds-shared": "4.37.
|
|
44
|
-
"@spscommerce/positioning": "4.37.
|
|
45
|
-
"@spscommerce/utils": "4.37.
|
|
42
|
+
"@spscommerce/ds-colors": "4.37.2",
|
|
43
|
+
"@spscommerce/ds-shared": "4.37.2",
|
|
44
|
+
"@spscommerce/positioning": "4.37.2",
|
|
45
|
+
"@spscommerce/utils": "4.37.2",
|
|
46
46
|
"@testing-library/jest-dom": "^4.2.4",
|
|
47
47
|
"@testing-library/react": "^9.3.2",
|
|
48
48
|
"@types/prop-types": "^15.7.1",
|
|
@@ -63,6 +63,5 @@
|
|
|
63
63
|
"watch": "vite build --watch",
|
|
64
64
|
"clean": "git clean -fdX",
|
|
65
65
|
"pub": "pnpm pack && node ../../scripts/publish-package.js"
|
|
66
|
-
}
|
|
67
|
-
"readme": "[//]: # \"START_AUTOGENERATED\"\n\n## [@spscommerce/ds-react](https://github.com/spscommerce/ui-angular/tree/master/packages/@spscommerce/ds-react#readme)\n\n\n\n\n\nSPS Design System React components \n \n ### Installation \n \n ```shell\nnpm install --save @spscommerce/ds-react\n```\n\n#### Peer Dependencies\n\n<div class=\"row\">\n <div class=\"col-5\"> \n <table class=\"sps-table\">\n <thead class=\"sps-table__head\">\n <tr class=\"sps-table__row\">\n <th class=\"sps-table__header\">\n <span class=\"sps-table__header-cell-body\"> \n Package\n </span>\n </th>\n <th class=\"sps-table__header text-right\">\n <span class=\"sps-table__header-cell-body\"> \n Version\n </span>\n </th>\n </tr>\n </thead>\n <tbody class=\"sps-table__body\">\n <tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-shared#readme\">@spscommerce/ds-shared</a></td><td class=\"sps-table__cell text-right\">^1.1.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/positioning#readme\">@spscommerce/positioning</a></td><td class=\"sps-table__cell text-right\">^1.1.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/utils#readme\">@spscommerce/utils</a></td><td class=\"sps-table__cell text-right\">^1.1.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"lukeed/clsx\">clsx</a></td><td class=\"sps-table__cell text-right\">^1.0.3</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://momentjs.com\">moment</a></td><td class=\"sps-table__cell text-right\">^2.25.3</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"http://momentjs.com/timezone/\">moment-timezone</a></td><td class=\"sps-table__cell text-right\">^0.5.28</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"ai/nanoid\">nanoid</a></td><td class=\"sps-table__cell text-right\">^2.1.6</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://facebook.github.io/react/\">prop-types</a></td><td class=\"sps-table__cell text-right\">^15.7.2</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://reactjs.org/\">react</a></td><td class=\"sps-table__cell text-right\">^16.9.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://reactjs.org/\">react-dom</a></td><td class=\"sps-table__cell text-right\">^16.9.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://scroll-into-view-if-needed.netlify.com\">scroll-into-view-if-needed</a></td><td class=\"sps-table__cell text-right\">^2.2.20</td></tr>\n </tbody>\n </table>\n </div>\n <div class=\"col-7\">\n \n </div>\n</div>\n\n[//]: # \"END_AUTOGENERATED\"\n"
|
|
66
|
+
}
|
|
68
67
|
}
|