@redocly/theme 0.30.5 → 0.30.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.
Files changed (82) hide show
  1. package/lib/components/Breadcrumbs/Breadcrumb.d.ts +2 -2
  2. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  3. package/lib/components/Catalog/Catalog.d.ts +2 -2
  4. package/lib/components/CodeBlock/CodeBlockControls.js +8 -8
  5. package/lib/components/Dropdown/Dropdown.d.ts +1 -1
  6. package/lib/components/Feedback/Emotions.d.ts +4 -4
  7. package/lib/components/Feedback/Feedback.d.ts +2 -2
  8. package/lib/components/Feedback/Thumbs.d.ts +3 -3
  9. package/lib/components/Filter/Filter.d.ts +2 -2
  10. package/lib/components/Filter/FilterContent.d.ts +2 -2
  11. package/lib/components/Filter/FilterPopover.d.ts +2 -2
  12. package/lib/components/Filter/FilterTag.d.ts +2 -2
  13. package/lib/components/Filter/FilterTags.d.ts +2 -2
  14. package/lib/components/Footer/FooterColumn.js +12 -1
  15. package/lib/components/Image/Image.d.ts +2 -2
  16. package/lib/components/Menu/Menu.d.ts +2 -2
  17. package/lib/components/Menu/MenuItemSwitch.d.ts +2 -1
  18. package/lib/components/Navbar/NavbarItem.d.ts +2 -2
  19. package/lib/components/NavbarLogo/NavbarLogo.js +1 -1
  20. package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.d.ts +2 -2
  21. package/lib/components/OpenApiDocs/ScorecardBadges.d.ts +2 -2
  22. package/lib/components/OpenApiDocs/TryItSecurityApps.d.ts +2 -2
  23. package/lib/components/Product/ProductPicker.d.ts +2 -2
  24. package/lib/components/Profile/AuthUserProfile.d.ts +2 -2
  25. package/lib/components/Profile/MobileUserProfile.d.ts +2 -2
  26. package/lib/components/Profile/UserProfileData.d.ts +2 -2
  27. package/lib/components/Scorecard/Gauge.d.ts +2 -2
  28. package/lib/components/Scorecard/StatusByLevelWidget.d.ts +2 -2
  29. package/lib/components/Search/ClearIcon.d.ts +2 -1
  30. package/lib/components/Search/ClockBackwardsIcon.d.ts +2 -1
  31. package/lib/components/Search/RecentSearches.d.ts +2 -2
  32. package/lib/components/Search/SearchIcon.d.ts +2 -1
  33. package/lib/components/Search/SuggestedPages.d.ts +2 -2
  34. package/lib/components/Select/Select.d.ts +1 -1
  35. package/lib/components/Sidebar/VersionPicker.d.ts +2 -2
  36. package/lib/components/SidebarActions/SidebarActions.d.ts +1 -1
  37. package/lib/components/SidebarActions/styled.d.ts +7 -7
  38. package/lib/components/Tabs/Tabs.d.ts +0 -1
  39. package/lib/components/Tabs/Tabs.js +2 -2
  40. package/lib/config.d.ts +16 -2
  41. package/lib/config.js +6 -1
  42. package/lib/i18n/LanguagePicker.d.ts +2 -2
  43. package/lib/icons/AlertIcon/AlertIcon.d.ts +2 -2
  44. package/lib/icons/AnchorIcon/AnchorIcon.d.ts +2 -2
  45. package/lib/icons/ArrowIcon/ArrowIcon.d.ts +2 -2
  46. package/lib/icons/BurgerIcon/BurgerIcon.d.ts +3 -3
  47. package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +2 -2
  48. package/lib/icons/CloseIcon/CloseIcon.d.ts +3 -3
  49. package/lib/icons/CollapseIcon/CollapseIcon.d.ts +2 -2
  50. package/lib/icons/ColorModeIcon/ColorModeIcon.d.ts +2 -2
  51. package/lib/icons/CopyIcon/CopyIcon.d.ts +2 -2
  52. package/lib/icons/CopyIcon/CopyIcon.js +4 -5
  53. package/lib/icons/DeselectIcon/DeselectIcon.d.ts +2 -2
  54. package/lib/icons/DissatisfiedIcon/DissatisfiedIcon.d.ts +2 -2
  55. package/lib/icons/EditIcon/EditIcon.d.ts +2 -2
  56. package/lib/icons/ErrorIcon/ErrorIcon.d.ts +2 -2
  57. package/lib/icons/ExpandIcon/ExpandIcon.d.ts +2 -2
  58. package/lib/icons/FileIcon/FileIcon.d.ts +2 -2
  59. package/lib/icons/LanguageIcon/LanguageIcon.d.ts +2 -2
  60. package/lib/icons/LogoutIcon/LogoutIcon.d.ts +3 -3
  61. package/lib/icons/NeutralIcon/NeutralIcon.d.ts +2 -2
  62. package/lib/icons/PlusIcon/PlusIcon.d.ts +3 -3
  63. package/lib/icons/PointingArrowIcon/PointingArrowIcon.d.ts +2 -2
  64. package/lib/icons/RadioCheckButtonIcon/RadioCheckButtonIcon.d.ts +2 -2
  65. package/lib/icons/ReportIcon/ReportIcon.d.ts +2 -2
  66. package/lib/icons/ReportIcon/ReportIcon.js +2 -2
  67. package/lib/icons/RocketIcon/RocketIcon.d.ts +2 -2
  68. package/lib/icons/SatisfiedIcon/SatisfiedIcon.d.ts +2 -2
  69. package/lib/icons/SelectIcon/SelectIcon.d.ts +2 -2
  70. package/lib/icons/SpinnerIcon/SpinnerIcon.d.ts +3 -3
  71. package/lib/icons/ThumbDownIcon/ThumbDownIcon.d.ts +2 -2
  72. package/lib/icons/ThumbUpIcon/ThumbUpIcon.d.ts +2 -2
  73. package/lib/mocks/Sidebar/useDrilldown.d.ts +2 -2
  74. package/lib/mocks/Sidebar/useMenuGroup.d.ts +2 -2
  75. package/package.json +1 -1
  76. package/src/components/CodeBlock/CodeBlockControls.tsx +26 -26
  77. package/src/components/Footer/FooterColumn.tsx +20 -1
  78. package/src/components/NavbarLogo/NavbarLogo.tsx +1 -1
  79. package/src/components/Tabs/Tabs.tsx +3 -3
  80. package/src/config.ts +6 -1
  81. package/src/icons/CopyIcon/CopyIcon.tsx +19 -13
  82. package/src/icons/ReportIcon/ReportIcon.tsx +2 -2
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare const CheckboxIcon: import("styled-components").StyledComponent<({ className, checked, onClick, }: {
3
3
  className?: string | undefined;
4
4
  checked?: boolean | undefined;
5
5
  onClick?: (() => void) | undefined;
6
- }) => JSX.Element, any, {}, never>;
6
+ }) => React.JSX.Element, any, {}, never>;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- export declare const Icon: () => JSX.Element;
3
- export declare const CloseIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const Icon: () => React.JSX.Element;
3
+ export declare const CloseIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
4
4
  'data-component-name': string;
5
5
  }, "data-component-name">;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IconProps {
3
3
  className?: string;
4
4
  color?: string;
5
5
  }
6
- export declare const CollapseIcon: import("styled-components").StyledComponent<({ className }: IconProps) => JSX.Element, any, {}, never>;
6
+ export declare const CollapseIcon: import("styled-components").StyledComponent<({ className }: IconProps) => React.JSX.Element, any, {}, never>;
7
7
  export {};
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export interface ColorModeIconProps {
3
3
  mode?: 'dark' | 'light' | string;
4
4
  className?: string;
5
5
  }
6
- declare function Icon({ mode, className }: ColorModeIconProps): JSX.Element;
6
+ declare function Icon({ mode, className }: ColorModeIconProps): React.JSX.Element;
7
7
  export declare const ColorModeIcon: import("styled-components").StyledComponent<typeof Icon, any, {
8
8
  'data-component-name': string;
9
9
  }, "data-component-name">;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IconProps {
3
3
  className?: string;
4
4
  }
5
- export declare const CopyIcon: import("styled-components").StyledComponent<({ className }: IconProps) => JSX.Element, any, {}, never>;
5
+ export declare const CopyIcon: import("styled-components").StyledComponent<({ className }: IconProps) => React.JSX.Element, any, {}, never>;
6
6
  export {};
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CopyIcon = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
- const Icon = ({ className }) => (react_1.default.createElement("span", { "data-component-name": "icons/CopyIcon", className: className },
10
- react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
11
- react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.16667 2.66667C5.16667 2.57462 5.24129 2.5 5.33333 2.5H12C12.092 2.5 12.1667 2.57462 12.1667 2.66667V10.6667C12.1667 10.7587 12.092 10.8333 12 10.8333H10H5.33333C5.24129 10.8333 5.16667 10.7587 5.16667 10.6667V4.66667V2.66667ZM4.16667 4.16667V2.66667C4.16667 2.02233 4.689 1.5 5.33333 1.5H12C12.6443 1.5 13.1667 2.02233 13.1667 2.66667V10.6667C13.1667 11.311 12.6443 11.8333 12 11.8333H10.5V13.3333C10.5 13.6428 10.3771 13.9395 10.1583 14.1583C9.9395 14.3771 9.64275 14.5 9.33333 14.5H2.66667C2.35725 14.5 2.0605 14.3771 1.84171 14.1583C1.62292 13.9395 1.5 13.6428 1.5 13.3333V5.33333C1.5 5.02391 1.62292 4.72717 1.84171 4.50838C2.0605 4.28958 2.35725 4.16667 2.66667 4.16667H4.16667ZM9.5 11.8333V13.3333C9.5 13.3775 9.48244 13.4199 9.45118 13.4512C9.41993 13.4824 9.37754 13.5 9.33333 13.5H2.66667C2.62246 13.5 2.58007 13.4824 2.54882 13.4512C2.51756 13.4199 2.5 13.3775 2.5 13.3333V5.33333C2.5 5.28913 2.51756 5.24674 2.54882 5.21548C2.58007 5.18423 2.62246 5.16667 2.66667 5.16667H4.16667V10.6667C4.16667 11.311 4.689 11.8333 5.33333 11.8333H9.5Z", fill: "currentColor", fillOpacity: "1" }))));
9
+ const Icon = ({ className }) => (react_1.default.createElement("svg", { "data-component-name": "icons/CopyIcon", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: className },
10
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.16667 2.66667C5.16667 2.57462 5.24129 2.5 5.33333 2.5H12C12.092 2.5 12.1667 2.57462 12.1667 2.66667V10.6667C12.1667 10.7587 12.092 10.8333 12 10.8333H10H5.33333C5.24129 10.8333 5.16667 10.7587 5.16667 10.6667V4.66667V2.66667ZM4.16667 4.16667V2.66667C4.16667 2.02233 4.689 1.5 5.33333 1.5H12C12.6443 1.5 13.1667 2.02233 13.1667 2.66667V10.6667C13.1667 11.311 12.6443 11.8333 12 11.8333H10.5V13.3333C10.5 13.6428 10.3771 13.9395 10.1583 14.1583C9.9395 14.3771 9.64275 14.5 9.33333 14.5H2.66667C2.35725 14.5 2.0605 14.3771 1.84171 14.1583C1.62292 13.9395 1.5 13.6428 1.5 13.3333V5.33333C1.5 5.02391 1.62292 4.72717 1.84171 4.50838C2.0605 4.28958 2.35725 4.16667 2.66667 4.16667H4.16667ZM9.5 11.8333V13.3333C9.5 13.3775 9.48244 13.4199 9.45118 13.4512C9.41993 13.4824 9.37754 13.5 9.33333 13.5H2.66667C2.62246 13.5 2.58007 13.4824 2.54882 13.4512C2.51756 13.4199 2.5 13.3775 2.5 13.3333V5.33333C2.5 5.28913 2.51756 5.24674 2.54882 5.21548C2.58007 5.18423 2.62246 5.16667 2.66667 5.16667H4.16667V10.6667C4.16667 11.311 4.689 11.8333 5.33333 11.8333H9.5Z", fill: "currentColor", fillOpacity: "1" })));
12
11
  exports.CopyIcon = (0, styled_components_1.default)(Icon) `
13
- width: 1em;
14
- height: 1em;
12
+ width: 1.1em;
13
+ height: 1.1em;
15
14
  vertical-align: middle;
16
15
  `;
17
16
  //# sourceMappingURL=CopyIcon.js.map
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IconProps {
3
3
  className?: string;
4
4
  color?: string;
5
5
  }
6
- export declare const DeselectIcon: import("styled-components").StyledComponent<({ className }: IconProps) => JSX.Element, any, {}, never>;
6
+ export declare const DeselectIcon: import("styled-components").StyledComponent<({ className }: IconProps) => React.JSX.Element, any, {}, never>;
7
7
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const DissatisfiedIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const DissatisfiedIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
3
3
  'data-component-name': string;
4
4
  }, "data-component-name">;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IconProps {
3
3
  className?: string;
4
4
  }
5
- export declare const EditIcon: import("styled-components").StyledComponent<({ className }: IconProps) => JSX.Element, any, {}, never>;
5
+ export declare const EditIcon: import("styled-components").StyledComponent<({ className }: IconProps) => React.JSX.Element, any, {}, never>;
6
6
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const ErrorIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const ErrorIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
3
3
  'data-component-name': string;
4
4
  }, "data-component-name">;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IconProps {
3
3
  className?: string;
4
4
  }
5
- export declare const ExpandIcon: import("styled-components").StyledComponent<({ className }: IconProps) => JSX.Element, any, {}, never>;
5
+ export declare const ExpandIcon: import("styled-components").StyledComponent<({ className }: IconProps) => React.JSX.Element, any, {}, never>;
6
6
  export {};
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IconProps {
3
3
  className?: string;
4
4
  }
5
- export declare const FileIcon: import("styled-components").StyledComponent<({ className }: IconProps) => JSX.Element, any, {}, never>;
5
+ export declare const FileIcon: import("styled-components").StyledComponent<({ className }: IconProps) => React.JSX.Element, any, {}, never>;
6
6
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const LanguageIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const LanguageIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
3
3
  'data-component-name': string;
4
4
  }, "data-component-name">;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- export declare const Icon: () => JSX.Element;
3
- export declare const LogoutIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const Icon: () => React.JSX.Element;
3
+ export declare const LogoutIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
4
4
  'data-component-name': string;
5
5
  }, "data-component-name">;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const NeutralIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const NeutralIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
3
3
  'data-component-name': string;
4
4
  }, "data-component-name">;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- export declare const Icon: () => JSX.Element;
3
- export declare const PlusIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const Icon: () => React.JSX.Element;
3
+ export declare const PlusIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
4
4
  'data-component-name': string;
5
5
  }, "data-component-name">;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const PointingArrowIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const PointingArrowIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
3
3
  'data-component-name': string;
4
4
  }, "data-component-name">;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const RadioCheckButtonIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const RadioCheckButtonIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
3
3
  'data-component-name': string;
4
4
  }, "data-component-name">;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IconProps {
3
3
  className?: string;
4
4
  }
5
- export declare const ReportIcon: import("styled-components").StyledComponent<({ className }: IconProps) => JSX.Element, any, {}, never>;
5
+ export declare const ReportIcon: import("styled-components").StyledComponent<({ className }: IconProps) => React.JSX.Element, any, {}, never>;
6
6
  export {};
@@ -12,8 +12,8 @@ const Icon = ({ className }) => (react_1.default.createElement("svg", { xmlns: "
12
12
  react_1.default.createElement("path", { d: "M8.5 4.5H7.5V9H8.5V4.5Z", fill: "currentColor", fillOpacity: "1" }),
13
13
  react_1.default.createElement("path", { d: "M13 14H3C2.73488 13.9997 2.4807 13.8942 2.29323 13.7068C2.10576 13.5193 2.0003 13.2651 2 13V3C2.0003 2.73488 2.10576 2.4807 2.29323 2.29323C2.4807 2.10576 2.73488 2.0003 3 2H13C13.2651 2.0003 13.5193 2.10576 13.7068 2.29323C13.8942 2.4807 13.9997 2.73488 14 3V13C13.9997 13.2651 13.8942 13.5193 13.7068 13.7068C13.5193 13.8942 13.2651 13.9997 13 14ZM3 3V13H13.0006L13 3H3Z", fill: "currentColor", fillOpacity: "1" })));
14
14
  exports.ReportIcon = (0, styled_components_1.default)(Icon) `
15
- width: 1.3em;
16
- height: 1.3em;
15
+ width: 1.2em;
16
+ height: 1.2em;
17
17
  vertical-align: middle;
18
18
  `;
19
19
  //# sourceMappingURL=ReportIcon.js.map
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IconProps {
3
3
  className?: string;
4
4
  color?: string;
5
5
  }
6
- export declare const RocketIcon: import("styled-components").StyledComponent<({ className }: IconProps) => JSX.Element, any, {}, never>;
6
+ export declare const RocketIcon: import("styled-components").StyledComponent<({ className }: IconProps) => React.JSX.Element, any, {}, never>;
7
7
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const SatisfiedIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const SatisfiedIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
3
3
  'data-component-name': string;
4
4
  }, "data-component-name">;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IconProps {
3
3
  className?: string;
4
4
  }
5
- export declare const SelectIcon: import("styled-components").StyledComponent<({ className }: IconProps) => JSX.Element, any, {}, never>;
5
+ export declare const SelectIcon: import("styled-components").StyledComponent<({ className }: IconProps) => React.JSX.Element, any, {}, never>;
6
6
  export {};
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export interface SpinnerIconProps {
3
3
  className?: string;
4
4
  }
5
- export declare const Icon: ({ className }: SpinnerIconProps) => JSX.Element;
6
- export declare const SpinnerIcon: import("styled-components").StyledComponent<({ className }: SpinnerIconProps) => JSX.Element, any, {
5
+ export declare const Icon: ({ className }: SpinnerIconProps) => React.JSX.Element;
6
+ export declare const SpinnerIcon: import("styled-components").StyledComponent<({ className }: SpinnerIconProps) => React.JSX.Element, any, {
7
7
  'data-component-name': string;
8
8
  }, "data-component-name">;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const ThumbDownIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const ThumbDownIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
3
3
  'data-component-name': string;
4
4
  }, "data-component-name">;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const ThumbUpIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
1
+ import React from 'react';
2
+ export declare const ThumbUpIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
3
3
  'data-component-name': string;
4
4
  }, "data-component-name">;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare function useDrilldown(_props: any): {
3
- Drilldown: ({ children }: any) => JSX.Element;
3
+ Drilldown: ({ children }: any) => React.JSX.Element;
4
4
  handleBack: () => void;
5
5
  handleExpand: () => void;
6
6
  isExpanded: boolean;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare function useMenuGroup(_item: any): {
3
- MenuGroup: ({ children }: any) => JSX.Element;
3
+ MenuGroup: ({ children }: any) => React.JSX.Element;
4
4
  handleGroupClick: () => void;
5
5
  isExpanded: boolean;
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.30.5",
3
+ "version": "0.30.7",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -49,7 +49,7 @@ export function CodeBlockControls({
49
49
  controls,
50
50
  }: CodeBlockControlsProps): JSX.Element | null {
51
51
  const { codeSnippet } = useThemeConfig();
52
- const controlsType = (codeSnippet?.controlsStyle as ControlItemType) || 'icon';
52
+ const controlsType = (codeSnippet?.elementFormat as ControlItemType) || 'icon';
53
53
  const { copy, expand, collapse, select, deselect, report } = controls
54
54
  ? controls
55
55
  : { copy: null, expand: null, collapse: null, select: null, deselect: null, report: null };
@@ -58,21 +58,16 @@ export function CodeBlockControls({
58
58
  <>
59
59
  <Title>{title}</Title>
60
60
  <ControlsWrapper>
61
- {copy && !codeSnippet?.copy?.hide ? (
62
- <CopyButton
63
- data={copy.data}
64
- data-source={copy.dataSource}
65
- data-hash={copy.dataHash}
66
- type={controlsType}
67
- toasterPlacement={copy.toasterPlacement}
68
- toasterDuration={copy.toasterDuration}
69
- buttonText={copy.label}
70
- tooltipText={copy.tooltipText}
71
- onCopyClick={() => {
72
- copy?.onClick;
73
- telemetry.send('code_snippet_copied', {});
74
- }}
75
- />
61
+ {report && report?.props?.visible ? (
62
+ <CodeBlockControlButton
63
+ data-cy="report-button"
64
+ data-testid="report-button"
65
+ asIcon={controlsType === 'icon'}
66
+ title={report.props?.tooltip}
67
+ {...report.props}
68
+ >
69
+ {controlsType === 'icon' ? <ReportIcon /> : report.props?.buttonText || 'Report'}
70
+ </CodeBlockControlButton>
76
71
  ) : null}
77
72
 
78
73
  {expand && !codeSnippet?.expand?.hide ? (
@@ -135,16 +130,21 @@ export function CodeBlockControls({
135
130
  </CodeBlockControlButton>
136
131
  ) : null}
137
132
 
138
- {report && report?.props?.visible ? (
139
- <CodeBlockControlButton
140
- data-cy="report-button"
141
- data-testid="report-button"
142
- asIcon={controlsType === 'icon'}
143
- title={report.props?.tooltip}
144
- {...report.props}
145
- >
146
- {controlsType === 'icon' ? <ReportIcon /> : report.props?.buttonText || 'Report'}
147
- </CodeBlockControlButton>
133
+ {copy && !codeSnippet?.copy?.hide ? (
134
+ <CopyButton
135
+ data={copy.data}
136
+ data-source={copy.dataSource}
137
+ data-hash={copy.dataHash}
138
+ type={controlsType}
139
+ toasterPlacement={copy.toasterPlacement}
140
+ toasterDuration={copy.toasterDuration}
141
+ buttonText={copy.label}
142
+ tooltipText={copy.tooltipText}
143
+ onCopyClick={() => {
144
+ copy?.onClick;
145
+ telemetry.send('code_snippet_copied', {});
146
+ }}
147
+ />
148
148
  ) : null}
149
149
  </ControlsWrapper>
150
150
  </>
@@ -19,9 +19,19 @@ export function FooterColumn({ column, className }: FooterColumnProps): JSX.Elem
19
19
 
20
20
  const iconsOnly = items.every((item) => item.label === item.link && (item.icon || item.srcSet));
21
21
 
22
+ const label = translate(column.labelTranslationKey, column.label);
23
+ const labelOrLink =
24
+ column.type === 'link' ? (
25
+ <Link to={column.link} external={column.external} target={column.target}>
26
+ {label}
27
+ </Link>
28
+ ) : (
29
+ label
30
+ );
31
+
22
32
  return (
23
33
  <FooterColumnContainer data-component-name="Footer/FooterColumn" className={className}>
24
- <FooterColumnTitle>{translate(column.labelTranslationKey, column.label)}</FooterColumnTitle>
34
+ <FooterColumnTitle>{labelOrLink}</FooterColumnTitle>
25
35
  <FooterColumnItems iconsOnly={iconsOnly}>
26
36
  {items?.map((columnItem, columnItemIndex) => {
27
37
  if (columnItem.type === 'error') {
@@ -68,6 +78,15 @@ const FooterColumnTitle = styled.p`
68
78
  ${({ theme }) => theme.mediaQueries.small} {
69
79
  margin-bottom: var(--footer-title-margin-bottom);
70
80
  }
81
+
82
+ a {
83
+ text-decoration: none;
84
+ color: var(--footer-title-text-color);
85
+
86
+ &:hover {
87
+ color: var(--footer-title-hover-color);
88
+ }
89
+ }
71
90
  `;
72
91
 
73
92
  const FooterSeparator = styled.div`
@@ -12,7 +12,7 @@ export type NavbarLogoProps = {
12
12
  };
13
13
 
14
14
  export function NavbarLogo({ logo, className }: NavbarLogoProps): JSX.Element | null {
15
- if (!logo.image && !logo.srcSet) {
15
+ if (!logo?.image && !logo?.srcSet) {
16
16
  return null;
17
17
  }
18
18
  const img = (
@@ -5,7 +5,7 @@ import type { PropsWithChildren } from 'react';
5
5
 
6
6
  import { Tab } from '@theme/components/Tabs';
7
7
 
8
- type Child = { props: { label: string; key?: string } & TabsProps };
8
+ type Child = { props: { label: string } & TabsProps };
9
9
  type TabsProps = PropsWithChildren<{ children: Child[]; className?: string }>;
10
10
 
11
11
  export function Tabs(props: TabsProps): JSX.Element {
@@ -17,11 +17,11 @@ export function Tabs(props: TabsProps): JSX.Element {
17
17
  <TabsContainer data-component-name="Markdown/Tabs/Tabs" className={props.className}>
18
18
  <TabList>
19
19
  {children.map((child, idx) => {
20
- const { label, key } = child.props;
20
+ const { label } = child.props;
21
21
  return (
22
22
  <Tab
23
23
  activeTab={activeTab}
24
- key={`${key || label}-${idx}`}
24
+ key={`${label}-${idx}`}
25
25
  label={label}
26
26
  onClick={onTabSelect}
27
27
  />
package/src/config.ts CHANGED
@@ -72,6 +72,11 @@ const markdownConfigSchema = {
72
72
  items: { type: 'string' },
73
73
  default: ['image', 'links'],
74
74
  },
75
+ partialsFolders: {
76
+ type: 'array',
77
+ items: { type: 'string' },
78
+ default: ['_partials'],
79
+ },
75
80
  lastUpdatedBlock: {
76
81
  type: 'object',
77
82
  properties: {
@@ -564,7 +569,7 @@ export const themeConfigSchema = {
564
569
  codeSnippet: {
565
570
  type: 'object',
566
571
  properties: {
567
- controlsStyle: { type: 'string', default: 'icon' },
572
+ elementFormat: { type: 'string', default: 'icon' },
568
573
  copy: {
569
574
  type: 'object',
570
575
  properties: {
@@ -6,21 +6,27 @@ interface IconProps {
6
6
  }
7
7
 
8
8
  const Icon = ({ className }: IconProps) => (
9
- <span data-component-name="icons/CopyIcon" className={className}>
10
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
11
- <path
12
- fillRule="evenodd"
13
- clipRule="evenodd"
14
- d="M5.16667 2.66667C5.16667 2.57462 5.24129 2.5 5.33333 2.5H12C12.092 2.5 12.1667 2.57462 12.1667 2.66667V10.6667C12.1667 10.7587 12.092 10.8333 12 10.8333H10H5.33333C5.24129 10.8333 5.16667 10.7587 5.16667 10.6667V4.66667V2.66667ZM4.16667 4.16667V2.66667C4.16667 2.02233 4.689 1.5 5.33333 1.5H12C12.6443 1.5 13.1667 2.02233 13.1667 2.66667V10.6667C13.1667 11.311 12.6443 11.8333 12 11.8333H10.5V13.3333C10.5 13.6428 10.3771 13.9395 10.1583 14.1583C9.9395 14.3771 9.64275 14.5 9.33333 14.5H2.66667C2.35725 14.5 2.0605 14.3771 1.84171 14.1583C1.62292 13.9395 1.5 13.6428 1.5 13.3333V5.33333C1.5 5.02391 1.62292 4.72717 1.84171 4.50838C2.0605 4.28958 2.35725 4.16667 2.66667 4.16667H4.16667ZM9.5 11.8333V13.3333C9.5 13.3775 9.48244 13.4199 9.45118 13.4512C9.41993 13.4824 9.37754 13.5 9.33333 13.5H2.66667C2.62246 13.5 2.58007 13.4824 2.54882 13.4512C2.51756 13.4199 2.5 13.3775 2.5 13.3333V5.33333C2.5 5.28913 2.51756 5.24674 2.54882 5.21548C2.58007 5.18423 2.62246 5.16667 2.66667 5.16667H4.16667V10.6667C4.16667 11.311 4.689 11.8333 5.33333 11.8333H9.5Z"
15
- fill="currentColor"
16
- fillOpacity="1"
17
- />
18
- </svg>
19
- </span>
9
+ <svg
10
+ data-component-name="icons/CopyIcon"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ width="16"
13
+ height="16"
14
+ viewBox="0 0 16 16"
15
+ fill="none"
16
+ className={className}
17
+ >
18
+ <path
19
+ fillRule="evenodd"
20
+ clipRule="evenodd"
21
+ d="M5.16667 2.66667C5.16667 2.57462 5.24129 2.5 5.33333 2.5H12C12.092 2.5 12.1667 2.57462 12.1667 2.66667V10.6667C12.1667 10.7587 12.092 10.8333 12 10.8333H10H5.33333C5.24129 10.8333 5.16667 10.7587 5.16667 10.6667V4.66667V2.66667ZM4.16667 4.16667V2.66667C4.16667 2.02233 4.689 1.5 5.33333 1.5H12C12.6443 1.5 13.1667 2.02233 13.1667 2.66667V10.6667C13.1667 11.311 12.6443 11.8333 12 11.8333H10.5V13.3333C10.5 13.6428 10.3771 13.9395 10.1583 14.1583C9.9395 14.3771 9.64275 14.5 9.33333 14.5H2.66667C2.35725 14.5 2.0605 14.3771 1.84171 14.1583C1.62292 13.9395 1.5 13.6428 1.5 13.3333V5.33333C1.5 5.02391 1.62292 4.72717 1.84171 4.50838C2.0605 4.28958 2.35725 4.16667 2.66667 4.16667H4.16667ZM9.5 11.8333V13.3333C9.5 13.3775 9.48244 13.4199 9.45118 13.4512C9.41993 13.4824 9.37754 13.5 9.33333 13.5H2.66667C2.62246 13.5 2.58007 13.4824 2.54882 13.4512C2.51756 13.4199 2.5 13.3775 2.5 13.3333V5.33333C2.5 5.28913 2.51756 5.24674 2.54882 5.21548C2.58007 5.18423 2.62246 5.16667 2.66667 5.16667H4.16667V10.6667C4.16667 11.311 4.689 11.8333 5.33333 11.8333H9.5Z"
22
+ fill="currentColor"
23
+ fillOpacity="1"
24
+ />
25
+ </svg>
20
26
  );
21
27
 
22
28
  export const CopyIcon = styled(Icon)`
23
- width: 1em;
24
- height: 1em;
29
+ width: 1.1em;
30
+ height: 1.1em;
25
31
  vertical-align: middle;
26
32
  `;
@@ -30,7 +30,7 @@ const Icon = ({ className }: IconProps) => (
30
30
  );
31
31
 
32
32
  export const ReportIcon = styled(Icon)`
33
- width: 1.3em;
34
- height: 1.3em;
33
+ width: 1.2em;
34
+ height: 1.2em;
35
35
  vertical-align: middle;
36
36
  `;