@redocly/theme 0.9.6 → 0.9.7

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.
@@ -44,7 +44,7 @@ function CopyButtonWrapperComponent({ data, children, onCopyClick, dataTestId =
44
44
  onCopyClick === null || onCopyClick === void 0 ? void 0 : onCopyClick();
45
45
  };
46
46
  const renderCopyButton = (placement = 'top') => {
47
- return (react_1.default.createElement(Tooltip_1.Tooltip, { className: "copy-button", tip: utils_1.ClipboardService.isSupported() ? 'Copied' : 'Not supported in your browser', isOpen: tooltip.isOpened, placement: placement },
47
+ return (react_1.default.createElement(Tooltip_1.Tooltip, { className: "copy-button", tip: "Copied", isOpen: tooltip.isOpened, placement: placement },
48
48
  react_1.default.createElement(SamplesPanelControls_1.SamplesControlButton, { onClick: copy, "data-cy": dataTestId }, "Copy")));
49
49
  };
50
50
  return children({ renderCopyButton });
@@ -117,6 +117,6 @@ const Overlay = styled_components_1.default.div `
117
117
  `;
118
118
  const Message = styled_components_1.default.div `
119
119
  padding: 24px;
120
- color: var(--text-color);
120
+ color: var(--search-item-title-text-color);
121
121
  `;
122
122
  //# sourceMappingURL=Autocomplete.js.map
@@ -1,5 +1,4 @@
1
1
  export declare class ClipboardService {
2
- static isSupported(): boolean;
3
2
  static copyCustom(text: string): boolean;
4
3
  static selectElement(element: HTMLDivElement | null): void;
5
4
  }
@@ -6,9 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ClipboardService = void 0;
7
7
  const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
8
8
  class ClipboardService {
9
- static isSupported() {
10
- return typeof navigator !== 'undefined' && !!navigator.clipboard;
11
- }
12
9
  static copyCustom(text) {
13
10
  return (0, copy_to_clipboard_1.default)(text);
14
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Shared UI components lib",
5
5
  "author": "team@redocly.com",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -41,12 +41,7 @@ function CopyButtonWrapperComponent({
41
41
 
42
42
  const renderCopyButton = (placement: TooltipProps['placement'] = 'top'): JSX.Element => {
43
43
  return (
44
- <Tooltip
45
- className="copy-button"
46
- tip={ClipboardService.isSupported() ? 'Copied' : 'Not supported in your browser'}
47
- isOpen={tooltip.isOpened}
48
- placement={placement}
49
- >
44
+ <Tooltip className="copy-button" tip="Copied" isOpen={tooltip.isOpened} placement={placement}>
50
45
  <SamplesControlButton onClick={copy} data-cy={dataTestId}>
51
46
  Copy
52
47
  </SamplesControlButton>
@@ -144,5 +144,5 @@ const Overlay = styled.div`
144
144
 
145
145
  const Message = styled.div`
146
146
  padding: 24px;
147
- color: var(--text-color);
147
+ color: var(--search-item-title-text-color);
148
148
  `;
@@ -1,9 +1,5 @@
1
1
  import copy from 'copy-to-clipboard';
2
2
  export class ClipboardService {
3
- static isSupported(): boolean {
4
- return typeof navigator !== 'undefined' && !!navigator.clipboard;
5
- }
6
-
7
3
  static copyCustom(text: string): boolean {
8
4
  return copy(text);
9
5
  }