@redocly/theme 0.81.2-rc.1 → 0.82.1-rc.1
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/components/Breadcrumbs/Breadcrumb.d.ts +1 -0
- package/lib/components/Buttons/EditPageButton.d.ts +1 -0
- package/lib/components/Catalog/Catalog.d.ts +1 -0
- package/lib/components/Catalog/CatalogActions.d.ts +1 -0
- package/lib/components/Catalog/CatalogCard.d.ts +1 -0
- package/lib/components/Catalog/CatalogInfoBlock.d.ts +1 -0
- package/lib/components/CodeBlock/CodeBlockTabs.d.ts +1 -0
- package/lib/components/CodeBlock/variables.js +1 -1
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.d.ts +1 -0
- package/lib/components/Dropdown/Dropdown.js +1 -1
- package/lib/components/Feedback/Comment.d.ts +1 -0
- package/lib/components/Feedback/Mood.d.ts +1 -0
- package/lib/components/Feedback/Rating.d.ts +1 -0
- package/lib/components/Feedback/Reasons.d.ts +1 -0
- package/lib/components/Feedback/ReportDialog.d.ts +1 -0
- package/lib/components/Feedback/Scale.d.ts +1 -0
- package/lib/components/Feedback/Sentiment.d.ts +1 -0
- package/lib/components/Feedback/Stars.d.ts +1 -0
- package/lib/components/Filter/Filter.d.ts +1 -0
- package/lib/components/Filter/FilterCheckboxes.d.ts +1 -0
- package/lib/components/Filter/FilterContent.d.ts +1 -0
- package/lib/components/Filter/FilterDateRange.d.ts +1 -0
- package/lib/components/Filter/FilterInput.d.ts +1 -0
- package/lib/components/Filter/FilterPopover.d.ts +1 -0
- package/lib/components/Filter/FilterSelect.d.ts +1 -0
- package/lib/components/Footer/Footer.d.ts +1 -0
- package/lib/components/Footer/FooterColumn.d.ts +1 -0
- package/lib/components/Footer/FooterCopyright.d.ts +1 -0
- package/lib/components/Footer/FooterItem.d.ts +1 -0
- package/lib/components/LanguagePicker/LanguagePicker.d.ts +1 -0
- package/lib/components/LastUpdated/LastUpdated.d.ts +1 -0
- package/lib/components/Loading/Loading.d.ts +1 -0
- package/lib/components/Logo/Logo.d.ts +1 -0
- package/lib/components/Menu/Menu.d.ts +1 -0
- package/lib/components/Menu/MenuMobile.d.ts +1 -0
- package/lib/components/Navbar/Navbar.d.ts +1 -0
- package/lib/components/Navbar/NavbarItem.d.ts +1 -0
- package/lib/components/Navbar/NavbarMenu.d.ts +1 -0
- package/lib/components/PageNavigation/NextButton.d.ts +1 -0
- package/lib/components/PageNavigation/PageNavigation.d.ts +1 -0
- package/lib/components/PageNavigation/PreviousButton.d.ts +1 -0
- package/lib/components/Product/Product.d.ts +1 -0
- package/lib/components/Product/ProductPicker.d.ts +1 -0
- package/lib/components/Search/Search.d.ts +1 -0
- package/lib/components/Search/SearchDialog.d.ts +1 -0
- package/lib/components/Search/SearchHighlight.d.ts +1 -0
- package/lib/components/Search/SearchItem.d.ts +1 -0
- package/lib/components/Search/SearchRecent.d.ts +1 -0
- package/lib/components/Search/SearchShortcut.d.ts +1 -0
- package/lib/components/Search/SearchSuggestedPages.d.ts +1 -0
- package/lib/components/Search/SearchTrigger.d.ts +1 -0
- package/lib/components/SidebarActions/ChangeViewButton.d.ts +1 -0
- package/lib/components/SidebarLogo/SidebarLogo.d.ts +1 -0
- package/lib/components/TableOfContent/TableOfContent.d.ts +1 -0
- package/lib/components/UserMenu/LoginButton.d.ts +1 -0
- package/lib/components/UserMenu/LogoutMenuItem.d.ts +1 -0
- package/lib/components/UserMenu/UserAvatar.d.ts +1 -0
- package/lib/components/UserMenu/UserInfoMenuItem.d.ts +1 -0
- package/lib/components/UserMenu/UserMenuMobile.d.ts +1 -0
- package/lib/core/hooks/__mocks__/index.d.ts +1 -0
- package/lib/core/hooks/__mocks__/index.js +1 -0
- package/lib/core/hooks/__mocks__/use-controlled-state.d.ts +2 -0
- package/lib/core/hooks/__mocks__/use-controlled-state.js +6 -0
- package/lib/core/hooks/menu/use-menu-item-expanded.js +1 -0
- package/lib/core/hooks/use-codeblock-tabs-controls.js +10 -3
- package/lib/core/hooks/use-search.js +1 -0
- package/lib/core/styles/global.js +9 -17
- package/lib/layouts/Forbidden.d.ts +1 -0
- package/lib/layouts/NotFound.d.ts +1 -0
- package/lib/layouts/OIDCForbidden.d.ts +1 -0
- package/lib/markdoc/components/Mermaid/Mermaid.d.ts +1 -0
- package/package.json +4 -4
- package/src/components/CodeBlock/variables.ts +1 -1
- package/src/components/Dropdown/Dropdown.tsx +1 -1
- package/src/core/hooks/__mocks__/index.ts +1 -0
- package/src/core/hooks/__mocks__/use-controlled-state.ts +1 -0
- package/src/core/hooks/menu/use-menu-item-expanded.ts +1 -0
- package/src/core/hooks/use-codeblock-tabs-controls.ts +8 -2
- package/src/core/hooks/use-search.ts +1 -0
- package/src/core/styles/global.ts +9 -17
|
@@ -36,7 +36,7 @@ exports.code = (0, styled_components_1.css) `
|
|
|
36
36
|
--code-block-bg-color: var(--layer-color); // @presenter Color
|
|
37
37
|
--code-block-padding: var(--spacing-xs) 0 var(--spacing-xs) var(--spacing-sm);
|
|
38
38
|
--code-block-margin: 0;
|
|
39
|
-
--code-block-max-height: calc(100vh -
|
|
39
|
+
--code-block-max-height: calc(100vh - 300px); // Where 300 is combined value of navbar, code block heading, controls height and paddings
|
|
40
40
|
--code-block-word-break: initial;
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -53,7 +53,7 @@ function Dropdown({ children, className, active, trigger, triggerEvent = 'click'
|
|
|
53
53
|
};
|
|
54
54
|
(0, hooks_1.useOutsideClick)(dropdownRef, handleClose);
|
|
55
55
|
const triggerChild = react_1.default.Children.only(trigger);
|
|
56
|
-
const dropdownTrigger = (0, react_1.cloneElement)(triggerChild, Object.assign(Object.assign({ onClick: triggerEvent === 'click' ? handleToggle : undefined, icon: withArrow ? isOpen ? react_1.default.createElement(ChevronUpIcon_1.ChevronUpIcon, null) : react_1.default.createElement(ChevronDownIcon_1.ChevronDownIcon, null) : undefined,
|
|
56
|
+
const dropdownTrigger = (0, react_1.cloneElement)(triggerChild, Object.assign(Object.assign(Object.assign(Object.assign({ onClick: triggerEvent === 'click' ? handleToggle : undefined, icon: withArrow ? isOpen ? react_1.default.createElement(ChevronUpIcon_1.ChevronUpIcon, null) : react_1.default.createElement(ChevronDownIcon_1.ChevronDownIcon, null) : undefined }, (withArrow ? { iconPosition: 'right' } : {})), { tabIndex: 0 }), triggerChild.props), { onKeyDown: triggerEvent === 'click' ? handleKeyDown : undefined }));
|
|
57
57
|
return (react_1.default.createElement(DropdownWrapper, Object.assign({ "data-component-name": "Dropdown/Dropdown", "data-testid": "dropdown" }, dataAttributes, { className: className, ref: dropdownRef, onPointerEnter: triggerEvent === 'hover' ? handleOpen : undefined, onPointerLeave: triggerEvent === 'hover' ? handleClose : undefined }),
|
|
58
58
|
dropdownTrigger,
|
|
59
59
|
isOpen && (react_1.default.createElement(ChildrenWrapper, { placement: placement, alignment: alignment, onClick: closeOnClick ? handleClose : undefined }, children))));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from '../../../core/hooks/__mocks__/use-theme-config';
|
|
2
2
|
export * from '../../../core/hooks/__mocks__/use-theme-hooks';
|
|
3
3
|
export * from '../../../core/hooks/__mocks__/use-mobile-menu';
|
|
4
|
+
export * from '../../../core/hooks/__mocks__/use-controlled-state';
|
|
4
5
|
export * from '../../../core/hooks/__mocks__/search/use-recent-searches';
|
|
5
6
|
export * from '../../../core/hooks/__mocks__/search/use-suggested-pages';
|
|
6
7
|
export * from '../../../core/hooks/menu/__mocks__/use-mobile-menu-items';
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("../../../core/hooks/__mocks__/use-theme-config"), exports);
|
|
18
18
|
__exportStar(require("../../../core/hooks/__mocks__/use-theme-hooks"), exports);
|
|
19
19
|
__exportStar(require("../../../core/hooks/__mocks__/use-mobile-menu"), exports);
|
|
20
|
+
__exportStar(require("../../../core/hooks/__mocks__/use-controlled-state"), exports);
|
|
20
21
|
__exportStar(require("../../../core/hooks/__mocks__/search/use-recent-searches"), exports);
|
|
21
22
|
__exportStar(require("../../../core/hooks/__mocks__/search/use-suggested-pages"), exports);
|
|
22
23
|
__exportStar(require("../../../core/hooks/menu/__mocks__/use-mobile-menu-items"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useControlledState = void 0;
|
|
4
|
+
const useControlledState = () => [false, jest.fn()];
|
|
5
|
+
exports.useControlledState = useControlledState;
|
|
6
|
+
//# sourceMappingURL=use-controlled-state.js.map
|
|
@@ -18,6 +18,7 @@ function useMenuItemExpanded(item) {
|
|
|
18
18
|
setIsExpanded(newValue);
|
|
19
19
|
setControlledValue(newValue);
|
|
20
20
|
// we have different sensitivity to changes for items from openapi-docs sidebar and for items from portal sidebar
|
|
21
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21
22
|
}, [!item.modified ? item : item.active, item.hasActiveSubItem, item.expanded]);
|
|
22
23
|
return [isExpanded, setControlledValue];
|
|
23
24
|
}
|
|
@@ -10,7 +10,9 @@ function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }) {
|
|
|
10
10
|
return ((_a = tabRefs === null || tabRefs === void 0 ? void 0 : tabRefs.current) === null || _a === void 0 ? void 0 : _a.reduce((acc, tabRef) => {
|
|
11
11
|
return tabRef ? acc + tabRef.offsetWidth : acc;
|
|
12
12
|
}, 0)) || 0;
|
|
13
|
-
},
|
|
13
|
+
},
|
|
14
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15
|
+
[(_a = tabRefs === null || tabRefs === void 0 ? void 0 : tabRefs.current) === null || _a === void 0 ? void 0 : _a.length]);
|
|
14
16
|
const { currentIndex, isFirstTab, isLastTab } = (0, react_1.useMemo)(() => {
|
|
15
17
|
const currentIndex = tabs.files.findIndex((file) => file.name === tabs.activeTabName);
|
|
16
18
|
return {
|
|
@@ -18,30 +20,35 @@ function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }) {
|
|
|
18
20
|
isFirstTab: currentIndex === 0,
|
|
19
21
|
isLastTab: currentIndex === tabs.files.length - 1,
|
|
20
22
|
};
|
|
23
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21
24
|
}, [tabs]);
|
|
22
25
|
(0, react_1.useEffect)(() => {
|
|
23
26
|
if (containerRef.current) {
|
|
27
|
+
const container = containerRef.current;
|
|
24
28
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
25
29
|
const containerWidth = entries[0].contentRect.width;
|
|
26
30
|
setShowControls(tabsWidth > containerWidth);
|
|
27
31
|
});
|
|
28
|
-
resizeObserver.observe(
|
|
32
|
+
resizeObserver.observe(container);
|
|
29
33
|
return () => {
|
|
30
|
-
resizeObserver.unobserve(
|
|
34
|
+
resizeObserver.unobserve(container);
|
|
31
35
|
};
|
|
32
36
|
}
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
38
|
}, [containerRef.current]);
|
|
34
39
|
const handlePrevTab = (0, react_1.useCallback)(() => {
|
|
35
40
|
if (!isFirstTab) {
|
|
36
41
|
const prevTab = tabs.files[currentIndex - 1].name;
|
|
37
42
|
tabs.handleTabSwitch(prevTab);
|
|
38
43
|
}
|
|
44
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
45
|
}, [currentIndex]);
|
|
40
46
|
const handleNextTab = (0, react_1.useCallback)(() => {
|
|
41
47
|
if (!isLastTab) {
|
|
42
48
|
const nextTab = tabs.files[currentIndex + 1].name;
|
|
43
49
|
tabs.handleTabSwitch(nextTab);
|
|
44
50
|
}
|
|
51
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
52
|
}, [currentIndex]);
|
|
46
53
|
return { showControls, handlePrevTab, handleNextTab };
|
|
47
54
|
}
|
|
@@ -31,6 +31,7 @@ function useSearch() {
|
|
|
31
31
|
const onOpen = (0, react_1.useCallback)(function () {
|
|
32
32
|
telemetry.send('search_opened', { method: 'click' });
|
|
33
33
|
setIsOpen(true);
|
|
34
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
34
35
|
}, []);
|
|
35
36
|
const onClose = (0, react_1.useCallback)(() => {
|
|
36
37
|
setIsOpen(false);
|
|
@@ -956,26 +956,18 @@ const pages = (0, styled_components_1.css) `
|
|
|
956
956
|
// @tokens End
|
|
957
957
|
`;
|
|
958
958
|
const error = (0, styled_components_1.css) `
|
|
959
|
-
--error-bubble-padding: var(--spacing-
|
|
960
|
-
--error-bubble-
|
|
961
|
-
--error-bubble-left: var(--spacing-xl);
|
|
962
|
-
--error-bubble-max-width: 20%;
|
|
963
|
-
--error-bubble-mobile-max-width: 50%;
|
|
964
|
-
--error-bubble-text-overflow: ellipsis;
|
|
965
|
-
--error-bubble-gap: var(--spacing-base);
|
|
959
|
+
--error-bubble-padding: var(--spacing-sm);
|
|
960
|
+
--error-bubble-gap: var(--spacing-xxs);
|
|
966
961
|
--error-bubble-font-family: var(--font-family-base);
|
|
962
|
+
--error-bubble-font-size: var(--font-size-base);
|
|
967
963
|
--error-bubble-z-index: var(--z-index-popover);
|
|
964
|
+
--error-bubble-bg-color: var(--color-raspberry-1);
|
|
965
|
+
--error-bubble-bg-color-hover: var(--color-raspberry-2);
|
|
966
|
+
--error-bubble-bg-color-pressed: var(--color-raspberry-3);
|
|
967
|
+
--error-bubble-content-color: var(--color-raspberry-6);
|
|
968
|
+
--error-bubble-content-color-hover: var(--color-raspberry-6);
|
|
969
|
+
--error-bubble-content-color-pressed: var(--color-raspberry-6);
|
|
968
970
|
|
|
969
|
-
--error-card-border-radius: calc(var(--spacing-xxs) * 1.5);
|
|
970
|
-
--error-card-bg-color: var(--bg-color-raised);
|
|
971
|
-
--error-card-padding: var(--spacing-xs) var(--spacing-base);
|
|
972
|
-
--error-card-text-color: var(--text-color-primary);
|
|
973
|
-
--error-card-font-size: var(--font-size-base);
|
|
974
|
-
--error-card-font-style: normal;
|
|
975
|
-
--error-card-font-weight: var(--font-weight-regular);
|
|
976
|
-
--error-card-line-height: var(--line-height-base);
|
|
977
|
-
--error-card-box-shadow: var(--bg-raised-shadow);
|
|
978
|
-
--error-card-icon-margin: 0 var(--spacing-xs) 0 0;
|
|
979
971
|
|
|
980
972
|
--detailed-error-overlay-bg-color: #4f4f4f;
|
|
981
973
|
--detailed-error-overlay-opacity: 0.9;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.1-rc.1",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"@types/lodash.throttle": "4.1.9",
|
|
57
57
|
"@types/node": "18.19.3",
|
|
58
58
|
"@types/prismjs": "1.26.3",
|
|
59
|
-
"@types/react": "18.2.
|
|
60
|
-
"@types/react-dom": "18.2.
|
|
59
|
+
"@types/react": "18.2.79",
|
|
60
|
+
"@types/react-dom": "18.2.25",
|
|
61
61
|
"@types/styled-components": "5.1.34",
|
|
62
62
|
"@types/styled-system": "5.1.22",
|
|
63
63
|
"@types/nprogress": "^0.2.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"timeago.js": "^4.0.2",
|
|
99
99
|
"i18next": "^22.4.12",
|
|
100
100
|
"nprogress": "^0.2.0",
|
|
101
|
-
"@redocly/config": "0.
|
|
101
|
+
"@redocly/config": "0.5.0"
|
|
102
102
|
},
|
|
103
103
|
"scripts": {
|
|
104
104
|
"start": "npm-run-all --parallel storybook storybook:tokens:watch",
|
|
@@ -34,7 +34,7 @@ export const code = css`
|
|
|
34
34
|
--code-block-bg-color: var(--layer-color); // @presenter Color
|
|
35
35
|
--code-block-padding: var(--spacing-xs) 0 var(--spacing-xs) var(--spacing-sm);
|
|
36
36
|
--code-block-margin: 0;
|
|
37
|
-
--code-block-max-height: calc(100vh -
|
|
37
|
+
--code-block-max-height: calc(100vh - 300px); // Where 300 is combined value of navbar, code block heading, controls height and paddings
|
|
38
38
|
--code-block-word-break: initial;
|
|
39
39
|
|
|
40
40
|
/**
|
|
@@ -63,7 +63,7 @@ export function Dropdown({
|
|
|
63
63
|
const dropdownTrigger = cloneElement(triggerChild, {
|
|
64
64
|
onClick: triggerEvent === 'click' ? handleToggle : undefined,
|
|
65
65
|
icon: withArrow ? isOpen ? <ChevronUpIcon /> : <ChevronDownIcon /> : undefined,
|
|
66
|
-
|
|
66
|
+
...(withArrow ? { iconPosition: 'right' } : {}),
|
|
67
67
|
tabIndex: 0,
|
|
68
68
|
...triggerChild.props,
|
|
69
69
|
onKeyDown: triggerEvent === 'click' ? handleKeyDown : undefined,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from '@redocly/theme/core/hooks/__mocks__/use-theme-config';
|
|
2
2
|
export * from '@redocly/theme/core/hooks/__mocks__/use-theme-hooks';
|
|
3
3
|
export * from '@redocly/theme/core/hooks/__mocks__/use-mobile-menu';
|
|
4
|
+
export * from '@redocly/theme/core/hooks/__mocks__/use-controlled-state';
|
|
4
5
|
export * from '@redocly/theme/core/hooks/__mocks__/search/use-recent-searches';
|
|
5
6
|
export * from '@redocly/theme/core/hooks/__mocks__/search/use-suggested-pages';
|
|
6
7
|
export * from '@redocly/theme/core/hooks/menu/__mocks__/use-mobile-menu-items';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const useControlledState = () => [false, jest.fn()];
|
|
@@ -24,6 +24,7 @@ export function useMenuItemExpanded(item: ItemState): [boolean, Dispatch<SetStat
|
|
|
24
24
|
setIsExpanded(newValue);
|
|
25
25
|
setControlledValue(newValue);
|
|
26
26
|
// we have different sensitivity to changes for items from openapi-docs sidebar and for items from portal sidebar
|
|
27
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27
28
|
}, [!item.modified ? item : item.active, item.hasActiveSubItem, item.expanded]);
|
|
28
29
|
|
|
29
30
|
return [isExpanded, setControlledValue];
|
|
@@ -16,6 +16,7 @@ export function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }: CodeBl
|
|
|
16
16
|
tabRefs?.current?.reduce((acc, tabRef) => {
|
|
17
17
|
return tabRef ? acc + tabRef.offsetWidth : acc;
|
|
18
18
|
}, 0) || 0,
|
|
19
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
20
|
[tabRefs?.current?.length],
|
|
20
21
|
);
|
|
21
22
|
|
|
@@ -26,22 +27,25 @@ export function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }: CodeBl
|
|
|
26
27
|
isFirstTab: currentIndex === 0,
|
|
27
28
|
isLastTab: currentIndex === tabs.files.length - 1,
|
|
28
29
|
};
|
|
30
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
29
31
|
}, [tabs]);
|
|
30
32
|
|
|
31
33
|
useEffect(() => {
|
|
32
34
|
if (containerRef.current) {
|
|
35
|
+
const container = containerRef.current;
|
|
33
36
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
34
37
|
const containerWidth = entries[0].contentRect.width;
|
|
35
38
|
|
|
36
39
|
setShowControls(tabsWidth > containerWidth);
|
|
37
40
|
});
|
|
38
41
|
|
|
39
|
-
resizeObserver.observe(
|
|
42
|
+
resizeObserver.observe(container);
|
|
40
43
|
|
|
41
44
|
return () => {
|
|
42
|
-
resizeObserver.unobserve(
|
|
45
|
+
resizeObserver.unobserve(container as HTMLDivElement);
|
|
43
46
|
};
|
|
44
47
|
}
|
|
48
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
49
|
}, [containerRef.current]);
|
|
46
50
|
|
|
47
51
|
const handlePrevTab = useCallback(() => {
|
|
@@ -49,6 +53,7 @@ export function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }: CodeBl
|
|
|
49
53
|
const prevTab = tabs.files[currentIndex - 1].name;
|
|
50
54
|
tabs.handleTabSwitch(prevTab);
|
|
51
55
|
}
|
|
56
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52
57
|
}, [currentIndex]);
|
|
53
58
|
|
|
54
59
|
const handleNextTab = useCallback(() => {
|
|
@@ -56,6 +61,7 @@ export function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }: CodeBl
|
|
|
56
61
|
const nextTab = tabs.files[currentIndex + 1].name;
|
|
57
62
|
tabs.handleTabSwitch(nextTab);
|
|
58
63
|
}
|
|
64
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
59
65
|
}, [currentIndex]);
|
|
60
66
|
|
|
61
67
|
return { showControls, handlePrevTab, handleNextTab };
|
|
@@ -29,6 +29,7 @@ export function useSearch() {
|
|
|
29
29
|
const onOpen = useCallback(function () {
|
|
30
30
|
telemetry.send('search_opened', { method: 'click' });
|
|
31
31
|
setIsOpen(true);
|
|
32
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32
33
|
}, []);
|
|
33
34
|
|
|
34
35
|
const onClose = useCallback(() => {
|
|
@@ -970,26 +970,18 @@ const pages = css`
|
|
|
970
970
|
`;
|
|
971
971
|
|
|
972
972
|
const error = css`
|
|
973
|
-
--error-bubble-padding: var(--spacing-
|
|
974
|
-
--error-bubble-
|
|
975
|
-
--error-bubble-left: var(--spacing-xl);
|
|
976
|
-
--error-bubble-max-width: 20%;
|
|
977
|
-
--error-bubble-mobile-max-width: 50%;
|
|
978
|
-
--error-bubble-text-overflow: ellipsis;
|
|
979
|
-
--error-bubble-gap: var(--spacing-base);
|
|
973
|
+
--error-bubble-padding: var(--spacing-sm);
|
|
974
|
+
--error-bubble-gap: var(--spacing-xxs);
|
|
980
975
|
--error-bubble-font-family: var(--font-family-base);
|
|
976
|
+
--error-bubble-font-size: var(--font-size-base);
|
|
981
977
|
--error-bubble-z-index: var(--z-index-popover);
|
|
978
|
+
--error-bubble-bg-color: var(--color-raspberry-1);
|
|
979
|
+
--error-bubble-bg-color-hover: var(--color-raspberry-2);
|
|
980
|
+
--error-bubble-bg-color-pressed: var(--color-raspberry-3);
|
|
981
|
+
--error-bubble-content-color: var(--color-raspberry-6);
|
|
982
|
+
--error-bubble-content-color-hover: var(--color-raspberry-6);
|
|
983
|
+
--error-bubble-content-color-pressed: var(--color-raspberry-6);
|
|
982
984
|
|
|
983
|
-
--error-card-border-radius: calc(var(--spacing-xxs) * 1.5);
|
|
984
|
-
--error-card-bg-color: var(--bg-color-raised);
|
|
985
|
-
--error-card-padding: var(--spacing-xs) var(--spacing-base);
|
|
986
|
-
--error-card-text-color: var(--text-color-primary);
|
|
987
|
-
--error-card-font-size: var(--font-size-base);
|
|
988
|
-
--error-card-font-style: normal;
|
|
989
|
-
--error-card-font-weight: var(--font-weight-regular);
|
|
990
|
-
--error-card-line-height: var(--line-height-base);
|
|
991
|
-
--error-card-box-shadow: var(--bg-raised-shadow);
|
|
992
|
-
--error-card-icon-margin: 0 var(--spacing-xs) 0 0;
|
|
993
985
|
|
|
994
986
|
--detailed-error-overlay-bg-color: #4f4f4f;
|
|
995
987
|
--detailed-error-overlay-opacity: 0.9;
|