@appquality/unguess-design-system 3.1.80 → 3.1.81

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/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ # v3.1.81 (Thu May 09 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Fix highlight for long selections [#331](https://github.com/AppQuality/unguess-design-system/pull/331) ([@iDome89](https://github.com/iDome89) [@marcbon](https://github.com/marcbon))
6
+ - removed border radius from highlighted word [#332](https://github.com/AppQuality/unguess-design-system/pull/332) ([@iDome89](https://github.com/iDome89))
7
+ - fixees for searched term and break word [#330](https://github.com/AppQuality/unguess-design-system/pull/330) ([@iDome89](https://github.com/iDome89))
8
+
9
+ #### Authors: 2
10
+
11
+ - [@iDome89](https://github.com/iDome89)
12
+ - Marco Bonomo ([@marcbon](https://github.com/marcbon))
13
+
14
+ ---
15
+
1
16
  # v3.1.80 (Tue May 07 2024)
2
17
 
3
18
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -3930,11 +3930,14 @@ const useHighlightContext = () => {
3930
3930
  return context; // Now we can use the context in the component, SAFELY.
3931
3931
  };
3932
3932
 
3933
+ const StyledSearchWord = styled__default["default"].span `
3934
+ background-color: ${({ theme }) => theme.palette.product.talk};
3935
+ color: ${({ theme }) => theme.palette.grey[700]};`;
3933
3936
  const Searchable = ({ start, text, }) => {
3934
3937
  const { searchTerm } = useHighlightContext();
3935
3938
  if (searchTerm) {
3936
3939
  const parts = text.split(new RegExp(`(${searchTerm})`, "gi"));
3937
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: parts.map((part, index) => part.toLowerCase() === searchTerm.toLowerCase() ? (jsxRuntime.jsx("mark", { children: part }, index)) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: part }))) }));
3940
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: parts.map((part, index) => part.toLowerCase() === searchTerm.toLowerCase() ? (jsxRuntime.jsx(StyledSearchWord, { children: part }, index)) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: part }))) }));
3938
3941
  }
3939
3942
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: text });
3940
3943
  };
@@ -3964,25 +3967,15 @@ const StyledWord = styled__default["default"](reactTypography.Span) `
3964
3967
  `;
3965
3968
  const ActiveWord = styled__default["default"].span `
3966
3969
  background-color: ${({ theme }) => getColor(theme.palette.fuschia, 700, undefined, 0.5)};
3967
- border-radius: ${({ theme }) => theme.borderRadii.lg};
3968
3970
  padding: 0 2px;
3969
3971
  `;
3970
3972
  const WordsContainer = styled__default["default"].div `
3973
+ word-wrap: break-word;
3971
3974
  ${StyledWord}, span {
3972
3975
  &::selection {
3973
3976
  background-color: ${({ theme }) => getColor(theme.palette.kale, 700, undefined, 0.5)};
3974
3977
  }
3975
3978
  }
3976
-
3977
- observation:first-of-type {
3978
- border-top-left-radius: ${({ theme }) => theme.borderRadii.lg};
3979
- border-bottom-left-radius: ${({ theme }) => theme.borderRadii.lg};
3980
- }
3981
-
3982
- observation:last-of-type {
3983
- border-top-right-radius: ${({ theme }) => theme.borderRadii.lg};
3984
- border-bottom-right-radius: ${({ theme }) => theme.borderRadii.lg};
3985
- }
3986
3979
  `;
3987
3980
  /**
3988
3981
  * Use Highlight to use highlight interation on any text element
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.80",
3
+ "version": "3.1.81",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",