@redocly/theme 0.64.0-next.2 → 0.64.0-next.3
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/Admonition/Admonition.d.ts +1 -1
- package/lib/components/Admonition/Admonition.js +2 -0
- package/lib/components/Admonition/variables.dark.js +3 -0
- package/lib/components/Admonition/variables.js +13 -0
- package/lib/components/Button/variables.dark.js +2 -2
- package/lib/components/Button/variables.js +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +3 -1
- package/lib/components/Filter/variables.js +1 -1
- package/lib/components/Link/Link.js +2 -2
- package/lib/components/Menu/MenuItem.js +1 -0
- package/lib/components/Menu/variables.dark.js +2 -0
- package/lib/components/Menu/variables.js +4 -3
- package/lib/components/SvgViewer/variables.dark.js +1 -1
- package/lib/components/Switch/variables.dark.js +2 -2
- package/lib/components/Switch/variables.js +1 -1
- package/lib/components/TableOfContent/TableOfContent.js +1 -0
- package/lib/components/TableOfContent/variables.js +3 -2
- package/lib/components/Toast/Toast.d.ts +14 -0
- package/lib/components/Toast/Toast.js +239 -0
- package/lib/components/Toast/variables.d.ts +1 -0
- package/lib/components/Toast/variables.js +64 -0
- package/lib/components/Tooltip/JsTooltip.js +1 -1
- package/lib/core/constants/toast.d.ts +1 -0
- package/lib/core/constants/toast.js +5 -0
- package/lib/core/contexts/Toast/ToastContext.d.ts +2 -0
- package/lib/core/contexts/Toast/ToastContext.js +6 -0
- package/lib/core/contexts/Toast/ToastProvider.d.ts +3 -0
- package/lib/core/contexts/Toast/ToastProvider.js +156 -0
- package/lib/core/contexts/index.d.ts +2 -0
- package/lib/core/contexts/index.js +2 -0
- package/lib/core/hooks/index.d.ts +2 -0
- package/lib/core/hooks/index.js +2 -0
- package/lib/core/hooks/use-toast-logic.d.ts +18 -0
- package/lib/core/hooks/use-toast-logic.js +141 -0
- package/lib/core/hooks/use-toast.d.ts +11 -0
- package/lib/core/hooks/use-toast.js +17 -0
- package/lib/core/styles/dark.js +35 -38
- package/lib/core/styles/global.js +54 -52
- package/lib/core/styles/palette.dark.js +15 -30
- package/lib/core/styles/palette.js +130 -134
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/search.d.ts +1 -0
- package/lib/core/types/toast.d.ts +23 -0
- package/lib/core/types/toast.js +3 -0
- package/lib/core/utils/get-auto-dismiss-duration.d.ts +2 -0
- package/lib/core/utils/get-auto-dismiss-duration.js +15 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/icons/CheckboxIcon/CheckboxIcon.js +6 -4
- package/lib/icons/CheckboxIcon/variables.dark.js +2 -1
- package/lib/icons/CheckboxIcon/variables.js +3 -3
- package/lib/icons/IdeaIcon/IdeaIcon.d.ts +9 -0
- package/lib/icons/IdeaIcon/IdeaIcon.js +24 -0
- package/lib/icons/NewChatIcon/NewChatIcon.d.ts +11 -0
- package/lib/icons/NewChatIcon/NewChatIcon.js +25 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +4 -0
- package/lib/markdoc/components/Mermaid/Mermaid.js +0 -2
- package/lib/markdoc/components/Tabs/variables.js +3 -3
- package/lib/markdoc/components/default.d.ts +0 -1
- package/lib/markdoc/components/default.js +0 -1
- package/lib/markdoc/tags/admonition.js +1 -1
- package/package.json +2 -2
- package/src/components/Admonition/Admonition.tsx +3 -1
- package/src/components/Admonition/variables.dark.ts +3 -0
- package/src/components/Admonition/variables.ts +13 -0
- package/src/components/Button/variables.dark.ts +2 -2
- package/src/components/Button/variables.ts +3 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +3 -1
- package/src/components/Filter/variables.ts +1 -1
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +5 -1
- package/src/components/Menu/variables.dark.ts +2 -0
- package/src/components/Menu/variables.ts +4 -3
- package/src/components/SvgViewer/variables.dark.ts +1 -1
- package/src/components/Switch/variables.dark.ts +2 -2
- package/src/components/Switch/variables.ts +1 -1
- package/src/components/TableOfContent/TableOfContent.tsx +1 -0
- package/src/components/TableOfContent/variables.ts +3 -2
- package/src/components/Toast/Toast.tsx +289 -0
- package/src/components/Toast/variables.ts +61 -0
- package/src/components/Tooltip/JsTooltip.tsx +1 -1
- package/src/core/constants/toast.ts +1 -0
- package/src/core/contexts/Toast/ToastContext.tsx +5 -0
- package/src/core/contexts/Toast/ToastProvider.tsx +206 -0
- package/src/core/contexts/index.ts +2 -0
- package/src/core/hooks/index.ts +2 -0
- package/src/core/hooks/use-toast-logic.ts +203 -0
- package/src/core/hooks/use-toast.ts +47 -0
- package/src/core/styles/dark.ts +5 -8
- package/src/core/styles/global.ts +26 -24
- package/src/core/styles/palette.dark.ts +15 -30
- package/src/core/styles/palette.ts +130 -134
- package/src/core/types/index.ts +1 -0
- package/src/core/types/search.ts +1 -0
- package/src/core/types/toast.ts +28 -0
- package/src/core/utils/get-auto-dismiss-duration.ts +20 -0
- package/src/core/utils/index.ts +1 -0
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +26 -17
- package/src/icons/CheckboxIcon/variables.dark.ts +2 -1
- package/src/icons/CheckboxIcon/variables.ts +3 -3
- package/src/icons/IdeaIcon/IdeaIcon.tsx +32 -0
- package/src/icons/NewChatIcon/NewChatIcon.tsx +39 -0
- package/src/index.ts +4 -0
- package/src/markdoc/components/Mermaid/Mermaid.tsx +0 -2
- package/src/markdoc/components/Tabs/variables.ts +3 -3
- package/src/markdoc/components/default.ts +0 -1
- package/src/markdoc/tags/admonition.ts +1 -1
- package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.d.ts +0 -7
- package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.js +0 -95
- package/lib/markdoc/components/ExcalidrawDiagram/variables.d.ts +0 -1
- package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.d.ts +0 -1
- package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.js +0 -8
- package/lib/markdoc/components/ExcalidrawDiagram/variables.js +0 -15
- package/src/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.tsx +0 -85
- package/src/markdoc/components/ExcalidrawDiagram/variables.dark.ts +0 -5
- package/src/markdoc/components/ExcalidrawDiagram/variables.ts +0 -12
|
@@ -6,10 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.CheckboxIcon = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const Icon = ({ className, checked = false, onClick, }) => (react_1.default.createElement("span", { className: className, onClick: onClick }, checked ? (react_1.default.createElement("svg", { width: "
|
|
10
|
-
react_1.default.createElement("path", { d: "M0 4C0 1.79086 1.79086 0 4
|
|
11
|
-
react_1.default.createElement("path", {
|
|
12
|
-
react_1.default.createElement("
|
|
9
|
+
const Icon = ({ className, checked = false, onClick, }) => (react_1.default.createElement("span", { className: className, onClick: onClick }, checked ? (react_1.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
10
|
+
react_1.default.createElement("path", { d: "M0 4C0 1.79086 1.79086 0 4 0H10C12.2091 0 14 1.79086 14 4V10C14 12.2091 12.2091 14 10 14H4C1.79086 14 0 12.2091 0 10V4Z", fill: "var(--checkbox-content-color-inverse)" }),
|
|
11
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 1H4C2.34315 1 1 2.34315 1 4V10C1 11.6569 2.34315 13 4 13H10C11.6569 13 13 11.6569 13 10V4C13 2.34315 11.6569 1 10 1ZM4 0C1.79086 0 0 1.79086 0 4V10C0 12.2091 1.79086 14 4 14H10C12.2091 14 14 12.2091 14 10V4C14 1.79086 12.2091 0 10 0H4Z", fill: "var(--checkbox-box-color-active)" }),
|
|
12
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.36018 9.98574L10.9106 4.21938C11.0343 4.06448 10.9203 3.83984 10.7272 3.83984H10.0758C9.93597 3.83984 9.80268 3.90389 9.71608 4.01474L9.03424 4.8785L5.99975 8.72257L4.28308 6.54742C4.24025 6.49305 4.18567 6.44909 4.12342 6.41883C4.06118 6.38858 3.99269 6.37282 3.92348 6.37273H3.27208C3.07619 6.37273 2.96673 6.59854 3.08778 6.75208L5.64029 9.98581C5.82388 10.2182 6.17616 10.2168 6.36018 9.98574Z", fill: "var(--checkbox-box-color-active)" }))) : (react_1.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "var(--checkbox-box-color)", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
|
+
react_1.default.createElement("path", { d: "M0 4C0 1.79086 1.79086 0 4 0H10C12.2091 0 14 1.79086 14 4V10C14 12.2091 12.2091 14 10 14H4C1.79086 14 0 12.2091 0 10V4Z", fill: "var(--checkbox-content-color-inverse)" }),
|
|
14
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 1H4C2.34315 1 1 2.34315 1 4V10C1 11.6569 2.34315 13 4 13H10C11.6569 13 13 11.6569 13 10V4C13 2.34315 11.6569 1 10 1ZM4 0C1.79086 0 0 1.79086 0 4V10C0 12.2091 1.79086 14 4 14H10C12.2091 14 14 12.2091 14 10V4C14 1.79086 12.2091 0 10 0H4Z", fill: "var(--checkbox-border-color)" })))));
|
|
13
15
|
exports.CheckboxIcon = (0, styled_components_1.default)(Icon).attrs({
|
|
14
16
|
'data-component-name': 'icons/CheckboxIcon/CheckboxIcon',
|
|
15
17
|
}) `
|
|
@@ -5,6 +5,7 @@ const styled_components_1 = require("styled-components");
|
|
|
5
5
|
exports.checkboxDarkMode = (0, styled_components_1.css) `
|
|
6
6
|
--checkbox-box-color-disabled: var(--color-warm-grey-3);
|
|
7
7
|
--checkbox-border-color-disabled: var(--border-color-primary);
|
|
8
|
-
--checkbox-content-color-inverse:
|
|
8
|
+
--checkbox-content-color-inverse: transparent;
|
|
9
|
+
--checkbox-border-color: var(--color-brand-subtle-border, var(--checkbox-border-color-legacy));
|
|
9
10
|
`;
|
|
10
11
|
//# sourceMappingURL=variables.dark.js.map
|
|
@@ -9,14 +9,14 @@ exports.checkbox = (0, styled_components_1.css) `
|
|
|
9
9
|
--checkbox-content-color-disabled: var(--text-color-disabled);
|
|
10
10
|
|
|
11
11
|
--checkbox-box-color: transparent;
|
|
12
|
-
--checkbox-box-color-active: var(--color-
|
|
12
|
+
--checkbox-box-color-active: var(--color-primary-base, var(--checkbox-box-color-active-legacy));
|
|
13
13
|
--checkbox-box-color-focused: var(--color-warm-grey-9);
|
|
14
14
|
--checkbox-box-color-disabled: var(--color-warm-grey-1);
|
|
15
15
|
|
|
16
|
-
--checkbox-border-color: var(--border-color-
|
|
16
|
+
--checkbox-border-color: var(--color-primary-border, var(--checkbox-border-color-legacy));
|
|
17
17
|
--checkbox-border-color-active: var(--color-warm-grey-8);
|
|
18
18
|
--checkbox-border-color-disabled: var(--border-color-secondary);
|
|
19
19
|
|
|
20
|
-
--checkbox-content-color-inverse:
|
|
20
|
+
--checkbox-content-color-inverse: transparent;
|
|
21
21
|
`;
|
|
22
22
|
//# sourceMappingURL=variables.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const IdeaIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IdeaIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "12", height: "16", viewBox: "0 0 12 16", fill: "none" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M8.44309 12.375H2.81809V13.5H8.44309V12.375Z" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M7.31809 14.625H3.94309V15.75H7.31809V14.625Z" }),
|
|
13
|
+
react_1.default.createElement("path", { d: "M5.63059 0C4.13874 0 2.708 0.592632 1.65311 1.64752C0.59822 2.70242 0.00558778 4.13316 0.00558778 5.625C-0.0324517 6.4425 0.124148 7.25735 0.462504 8.00252C0.80086 8.74768 1.3113 9.40187 1.95184 9.91125C2.51434 10.4344 2.81809 10.7325 2.81809 11.25H3.94309C3.94309 10.215 3.31871 9.63562 2.71121 9.07875C2.18548 8.67615 1.76648 8.15078 1.49091 7.54866C1.21535 6.94654 1.09163 6.28603 1.13059 5.625C1.13059 4.43153 1.60469 3.28693 2.44861 2.44302C3.29252 1.59911 4.43711 1.125 5.63059 1.125C6.82406 1.125 7.96865 1.59911 8.81257 2.44302C9.65648 3.28693 10.1306 4.43153 10.1306 5.625C10.1689 6.28652 10.0443 6.94734 9.76775 7.5495C9.49119 8.15166 9.0711 8.67676 8.54434 9.07875C7.94246 9.64125 7.31809 10.2037 7.31809 11.25H8.44309C8.44309 10.7325 8.74121 10.4344 9.30934 9.90563C9.94943 9.39711 10.4596 8.74389 10.798 7.99971C11.1364 7.25552 11.2932 6.44163 11.2556 5.625C11.2556 4.88631 11.1101 4.15486 10.8274 3.47241C10.5447 2.78995 10.1304 2.16985 9.60806 1.64752C9.08573 1.12519 8.46564 0.71086 7.78318 0.428178C7.10073 0.145495 6.36927 0 5.63059 0Z" })));
|
|
14
|
+
exports.IdeaIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
15
|
+
'data-component-name': 'icons/IdeaIcon/IdeaIcon',
|
|
16
|
+
})) `
|
|
17
|
+
path {
|
|
18
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
height: ${({ size }) => size || '16px'};
|
|
22
|
+
width: ${({ size }) => size || '16px'};
|
|
23
|
+
`;
|
|
24
|
+
//# sourceMappingURL=IdeaIcon.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
declare function Icon(props: IconProps): React.JSX.Element;
|
|
4
|
+
export declare const NewChatIcon: import("styled-components").StyledComponent<typeof Icon, any, {
|
|
5
|
+
'data-component-name': string;
|
|
6
|
+
} & {
|
|
7
|
+
color?: string;
|
|
8
|
+
size?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NewChatIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
function Icon(props) {
|
|
11
|
+
return (react_1.default.createElement("svg", Object.assign({ width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
12
|
+
react_1.default.createElement("path", { fill: "currentColor", d: "M11.375 11.375H2.625V2.625H7V1.75H2.625C2.39301 1.75023 2.17058 1.84249 2.00654 2.00654C1.84249 2.17058 1.75023 2.39301 1.75 2.625V11.375C1.75023 11.607 1.84249 11.8294 2.00654 11.9935C2.17058 12.1575 2.39301 12.2498 2.625 12.25H11.375C11.607 12.2498 11.8294 12.1575 11.9935 11.9935C12.1575 11.8294 12.2498 11.607 12.25 11.375V7H11.375V11.375Z" }),
|
|
13
|
+
react_1.default.createElement("path", { fill: "currentColor", d: "M11.375 2.625V0.875H10.5V2.625H8.75V3.5H10.5V5.25H11.375V3.5H13.125V2.625H11.375Z" })));
|
|
14
|
+
}
|
|
15
|
+
exports.NewChatIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
16
|
+
'data-component-name': 'icons/NewChatIcon/NewChatIcon',
|
|
17
|
+
})) `
|
|
18
|
+
path {
|
|
19
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
height: ${({ size = '14px' }) => size};
|
|
23
|
+
width: ${({ size = '14px' }) => size};
|
|
24
|
+
`;
|
|
25
|
+
//# sourceMappingURL=NewChatIcon.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export * from './components/Loaders/Loading';
|
|
|
17
17
|
export * from './components/LoadMore/LoadMore';
|
|
18
18
|
export * from './components/Link/Link';
|
|
19
19
|
export * from './components/Portal/Portal';
|
|
20
|
+
export * from './components/Toast/Toast';
|
|
21
|
+
export * from './core/contexts/Toast/ToastProvider';
|
|
20
22
|
export * from './components/Segmented/Segmented';
|
|
21
23
|
export * from './components/LanguagePicker/LanguagePicker';
|
|
22
24
|
export * from './components/Tooltip/Tooltip';
|
|
@@ -271,6 +273,8 @@ export * from './icons/ShareIcon/ShareIcon';
|
|
|
271
273
|
export * from './icons/HashtagIcon/HashtagIcon';
|
|
272
274
|
export * from './icons/FitToViewIcon/FitToViewIcon';
|
|
273
275
|
export * from './icons/ColorPaletteIcon/ColorPaletteIcon';
|
|
276
|
+
export * from './icons/IdeaIcon/IdeaIcon';
|
|
277
|
+
export * from './icons/NewChatIcon/NewChatIcon';
|
|
274
278
|
export * from './layouts/RootLayout';
|
|
275
279
|
export * from './layouts/PageLayout';
|
|
276
280
|
export * from './layouts/NotFound';
|
package/lib/index.js
CHANGED
|
@@ -56,6 +56,8 @@ __exportStar(require("./components/Loaders/Loading"), exports);
|
|
|
56
56
|
__exportStar(require("./components/LoadMore/LoadMore"), exports);
|
|
57
57
|
__exportStar(require("./components/Link/Link"), exports);
|
|
58
58
|
__exportStar(require("./components/Portal/Portal"), exports);
|
|
59
|
+
__exportStar(require("./components/Toast/Toast"), exports);
|
|
60
|
+
__exportStar(require("./core/contexts/Toast/ToastProvider"), exports);
|
|
59
61
|
__exportStar(require("./components/Segmented/Segmented"), exports);
|
|
60
62
|
__exportStar(require("./components/LanguagePicker/LanguagePicker"), exports);
|
|
61
63
|
__exportStar(require("./components/Tooltip/Tooltip"), exports);
|
|
@@ -334,6 +336,8 @@ __exportStar(require("./icons/ShareIcon/ShareIcon"), exports);
|
|
|
334
336
|
__exportStar(require("./icons/HashtagIcon/HashtagIcon"), exports);
|
|
335
337
|
__exportStar(require("./icons/FitToViewIcon/FitToViewIcon"), exports);
|
|
336
338
|
__exportStar(require("./icons/ColorPaletteIcon/ColorPaletteIcon"), exports);
|
|
339
|
+
__exportStar(require("./icons/IdeaIcon/IdeaIcon"), exports);
|
|
340
|
+
__exportStar(require("./icons/NewChatIcon/NewChatIcon"), exports);
|
|
337
341
|
/* Layouts */
|
|
338
342
|
__exportStar(require("./layouts/RootLayout"), exports);
|
|
339
343
|
__exportStar(require("./layouts/PageLayout"), exports);
|
|
@@ -54,11 +54,11 @@ exports.markdownTabs = (0, styled_components_1.css) `
|
|
|
54
54
|
--md-tabs-small-tab-line-height: var(--line-height-base); // @presenter LineHeight
|
|
55
55
|
--md-tabs-small-tab-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
56
56
|
|
|
57
|
-
--md-tabs-active-tab-text-color: var(--text-color-
|
|
57
|
+
--md-tabs-active-tab-text-color: var(--color-primary-text, var(--md-tabs-active-tab-text-color-legacy)); // @presenter Color
|
|
58
58
|
--md-tabs-active-tab-font-family: var(--md-tabs-tab-font-family); // @presenter FontFamily
|
|
59
59
|
--md-tabs-active-tab-font-style: normal; // @presenter FontStyle
|
|
60
|
-
--md-tabs-active-tab-bg-color: var(--bg-color-
|
|
61
|
-
--md-tabs-active-tab-border-color: var(--
|
|
60
|
+
--md-tabs-active-tab-bg-color: var(--color-primary-bg, var(--md-tabs-active-tab-bg-color-legacy)); // @presenter Color
|
|
61
|
+
--md-tabs-active-tab-border-color: var(--color-primary-active, var(--md-tabs-active-tab-border-color-legacy)); // @presenter Color
|
|
62
62
|
|
|
63
63
|
--md-tabs-medium-active-tab-font-size: var(--md-tabs-medium-tab-font-size); // @presenter FontSize
|
|
64
64
|
--md-tabs-medium-active-tab-font-weight: var(--md-tabs-medium-tab-font-weight); // @presenter FontWeight
|
|
@@ -3,7 +3,6 @@ export * from '../../markdoc/components/InlineSvg/InlineSvg';
|
|
|
3
3
|
export * from '../../markdoc/components/MarkdocExample/MarkdocExample';
|
|
4
4
|
export * from '../../markdoc/components/Heading/Heading';
|
|
5
5
|
export * from '../../markdoc/components/Mermaid/Mermaid';
|
|
6
|
-
export * from '../../markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram';
|
|
7
6
|
export * from '../../markdoc/components/HtmlBlock/HtmlBlock';
|
|
8
7
|
export * from '../../markdoc/components/Tabs/Tab';
|
|
9
8
|
export * from '../../markdoc/components/Tabs/TabList';
|
|
@@ -19,7 +19,6 @@ __exportStar(require("../../markdoc/components/InlineSvg/InlineSvg"), exports);
|
|
|
19
19
|
__exportStar(require("../../markdoc/components/MarkdocExample/MarkdocExample"), exports);
|
|
20
20
|
__exportStar(require("../../markdoc/components/Heading/Heading"), exports);
|
|
21
21
|
__exportStar(require("../../markdoc/components/Mermaid/Mermaid"), exports);
|
|
22
|
-
__exportStar(require("../../markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram"), exports);
|
|
23
22
|
__exportStar(require("../../markdoc/components/HtmlBlock/HtmlBlock"), exports);
|
|
24
23
|
__exportStar(require("../../markdoc/components/Tabs/Tab"), exports);
|
|
25
24
|
__exportStar(require("../../markdoc/components/Tabs/TabList"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.64.0-next.
|
|
3
|
+
"version": "0.64.0-next.3",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"openapi-sampler": "^1.7.2",
|
|
82
82
|
"react-calendar": "5.1.0",
|
|
83
83
|
"react-date-picker": "11.0.0",
|
|
84
|
-
"@redocly/config": "0.
|
|
84
|
+
"@redocly/config": "0.46.0"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"watch": "tsc -p tsconfig.build.json && (concurrently \"tsc -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\")",
|
|
@@ -7,9 +7,10 @@ import { WarningCycleIcon } from '@redocly/theme/icons/WarningCycleIcon/WarningC
|
|
|
7
7
|
import { CheckmarkOutlineIcon } from '@redocly/theme/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon';
|
|
8
8
|
import { ErrorIcon } from '@redocly/theme/icons/ErrorIcon/ErrorIcon';
|
|
9
9
|
import { InformationIcon } from '@redocly/theme/icons/InformationIcon/InformationIcon';
|
|
10
|
+
import { IdeaIcon } from '@redocly/theme/icons/IdeaIcon/IdeaIcon';
|
|
10
11
|
|
|
11
12
|
type AdmonitionTypeProps = {
|
|
12
|
-
type: 'warning' | 'success' | 'danger' | 'info';
|
|
13
|
+
type: 'warning' | 'success' | 'danger' | 'info' | 'default';
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
export type AdmonitionProps = Partial<AdmonitionTypeProps> & {
|
|
@@ -24,6 +25,7 @@ const IconsMap: Record<AdmonitionTypeProps['type'], FC<{ color?: string }>> = {
|
|
|
24
25
|
success: CheckmarkOutlineIcon,
|
|
25
26
|
danger: ErrorIcon,
|
|
26
27
|
info: InformationIcon,
|
|
28
|
+
default: IdeaIcon,
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
export function Admonition({
|
|
@@ -12,4 +12,7 @@ export const admonitionDarkMode = css`
|
|
|
12
12
|
|
|
13
13
|
--admonition-success-bg-color: color-mix(in srgb, var(--color-green-1) 40%, transparent); // @presenter Color
|
|
14
14
|
--admonition-success-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-green-3) 40%, transparent); // @presenter Border
|
|
15
|
+
|
|
16
|
+
--admonition-default-bg-color: color-mix(in srgb, var(--color-primary-bg, var(--admonition-default-bg-color-legacy)) 40%, transparent); // @presenter Color
|
|
17
|
+
--admonition-default-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-primary-border, var(--admonition-default-border-color-legacy)) 40%, transparent); // @presenter Border
|
|
15
18
|
`;
|
|
@@ -89,5 +89,18 @@ export const admonition = css`
|
|
|
89
89
|
--admonition-success-border-width: var(--admonition-border-width); // @presenter Color
|
|
90
90
|
--admonition-success-border: var(--admonition-success-border-width) var(--admonition-success-border-style) var(--admonition-success-border-color); // @presenter Border
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* @tokens Admonition type primary
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
--admonition-default-bg-color: var(--color-primary-bg, var(--admonition-default-bg-color-legacy)); // @presenter Color
|
|
97
|
+
--admonition-default-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
98
|
+
--admonition-default-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
99
|
+
--admonition-default-icon-color: var(--color-primary-base, var(--admonition-default-icon-color-legacy)); // @presenter Color
|
|
100
|
+
--admonition-default-border-color: var(--color-primary-border, var(--admonition-default-border-color-legacy)); // @presenter Color
|
|
101
|
+
--admonition-default-border-style: var(--admonition-border-style); // @presenter Color
|
|
102
|
+
--admonition-default-border-width: var(--admonition-border-width); // @presenter Color
|
|
103
|
+
--admonition-default-border: var(--admonition-default-border-width) var(--admonition-default-border-style) var(--admonition-default-border-color); // @presenter Border
|
|
104
|
+
|
|
92
105
|
// @tokens End
|
|
93
106
|
`;
|
|
@@ -17,8 +17,8 @@ export const buttonDarkMode = css`
|
|
|
17
17
|
--button-bg-color-secondary-hover: var(--color-warm-grey-5);
|
|
18
18
|
--button-bg-color-secondary-pressed: var(--color-warm-grey-6);
|
|
19
19
|
--button-bg-color-secondary-danger-pressed: var(--color-raspberry-9);
|
|
20
|
-
--button-bg-color-primary-hover: var(--color-
|
|
21
|
-
--button-bg-color-primary-pressed: var(--color-
|
|
20
|
+
--button-bg-color-primary-hover: var(--color-primary-hover, var(--button-bg-color-primary-hover-legacy));
|
|
21
|
+
--button-bg-color-primary-pressed: var(--color-primary-active, var(--button-bg-color-primary-pressed-legacy));
|
|
22
22
|
--button-bg-color-primary-danger-hover: var(--color-raspberry-5);
|
|
23
23
|
--button-bg-color-primary-danger-pressed: var(--color-raspberry-4);
|
|
24
24
|
--button-bg-color-disabled: var(--color-warm-grey-3);
|
|
@@ -24,9 +24,9 @@ export const button = css`
|
|
|
24
24
|
--button-content-color-primary-hover: var(--color-blue-7); // @presenter Color
|
|
25
25
|
--button-content-color-primary-pressed: var(--color-blue-8); // @presenter Color
|
|
26
26
|
|
|
27
|
-
--button-bg-color-primary: var(--color-
|
|
28
|
-
--button-bg-color-primary-hover: var(--color-
|
|
29
|
-
--button-bg-color-primary-pressed: var(--color-
|
|
27
|
+
--button-bg-color-primary: var(--color-primary-base, var(--button-bg-color-primary-legacy)); // @presenter Color
|
|
28
|
+
--button-bg-color-primary-hover: var(--color-primary-hover, var(--button-bg-color-primary-hover-legacy)); // @presenter Color
|
|
29
|
+
--button-bg-color-primary-pressed: var(--color-primary-active, var(--button-bg-color-primary-pressed-legacy)); // @presenter Color
|
|
30
30
|
|
|
31
31
|
--button-bg-color-primary-danger: var(--color-raspberry-6); // @presenter Color
|
|
32
32
|
--button-bg-color-primary-danger-hover: var(--color-raspberry-7); // @presenter Color
|
package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx
CHANGED
|
@@ -187,7 +187,9 @@ const VersionIcon = styled.div<{ $isCurrent?: boolean }>`
|
|
|
187
187
|
flex-shrink: 0;
|
|
188
188
|
border-radius: 50%;
|
|
189
189
|
background-color: ${({ $isCurrent }) =>
|
|
190
|
-
$isCurrent
|
|
190
|
+
$isCurrent
|
|
191
|
+
? 'var(--color-primary-base, var(--color-blueberry-6))'
|
|
192
|
+
: 'var(--catalog-avatar-bg-color)'};
|
|
191
193
|
transition: background-color 0.2s ease;
|
|
192
194
|
margin-right: var(--catalog-history-sidebar-version-icon-margin-right);
|
|
193
195
|
|
|
@@ -22,7 +22,7 @@ export const filter = css`
|
|
|
22
22
|
--filter-option-margin: 0;
|
|
23
23
|
|
|
24
24
|
--filter-option-label-font-size: var(--font-size-base);
|
|
25
|
-
--filter-option-label-color: var(--text-color-
|
|
25
|
+
--filter-option-label-color: var(--text-color-primary);
|
|
26
26
|
|
|
27
27
|
--filter-option-checkbox-padding-left: var(--spacing-xs);
|
|
28
28
|
|
|
@@ -4,7 +4,7 @@ import { Link as ReactLink } from 'react-router-dom';
|
|
|
4
4
|
|
|
5
5
|
import type { JSX } from 'react';
|
|
6
6
|
|
|
7
|
-
import { ThemeDataContext } from '@redocly/theme/core/contexts';
|
|
7
|
+
import { ThemeDataContext } from '@redocly/theme/core/contexts/ThemeDataContext';
|
|
8
8
|
|
|
9
9
|
export type LinkProps = {
|
|
10
10
|
to: string;
|
|
@@ -291,6 +291,7 @@ const MenuItemLabelWrapper = styled.li<{
|
|
|
291
291
|
css`
|
|
292
292
|
color: ${deprecated ? 'var(--menu-content-color-disabled)' : 'var(--menu-item-color-active)'};
|
|
293
293
|
background-color: var(--menu-item-bg-color-active);
|
|
294
|
+
font-weight: var(--menu-item-font-weight-active);
|
|
294
295
|
|
|
295
296
|
${ChevronDownIcon} path {
|
|
296
297
|
fill: var(--menu-item-color-active);
|
|
@@ -369,7 +370,10 @@ const MenuItemLink = styled(Link)`
|
|
|
369
370
|
order: 1;
|
|
370
371
|
`;
|
|
371
372
|
|
|
372
|
-
const MenuItemSeparatorLine = styled.div<{
|
|
373
|
+
const MenuItemSeparatorLine = styled.div<{
|
|
374
|
+
depth?: number;
|
|
375
|
+
linePosition?: string;
|
|
376
|
+
}>`
|
|
373
377
|
height: var(--menu-item-separator-line-height);
|
|
374
378
|
background-color: var(--menu-item-separator-line-bg-color);
|
|
375
379
|
margin: ${({ depth }) => `
|
|
@@ -5,4 +5,6 @@ export const menuDarkMode = css`
|
|
|
5
5
|
--menu-content-title-color: var(--text-color-secondary); // @presenter Color
|
|
6
6
|
--menu-content-color-active: var(--text-color-primary); // @presenter Color
|
|
7
7
|
--menu-content-color-disabled: var(--text-color-disabled); // @presenter Color
|
|
8
|
+
|
|
9
|
+
--menu-item-bg-color-active: var(--color-primary-bg, var(--menu-item-bg-color-active-legacy)); // @presenter Color
|
|
8
10
|
`;
|
|
@@ -19,6 +19,7 @@ export const menu = css`
|
|
|
19
19
|
--menu-item-font-family: var(--sidebar-font-family); // @presenter FontFamily
|
|
20
20
|
--menu-item-font-size: var(--sidebar-font-size); // @presenter FontSize
|
|
21
21
|
--menu-item-font-weight: var(--font-weight-regular); // @presenter FontSize
|
|
22
|
+
--menu-item-font-weight-active: var(--font-weight-medium); // @presenter FontWeight
|
|
22
23
|
--menu-item-line-height: var(--line-height-base); // @presenter LineHeight
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -28,11 +29,11 @@ export const menu = css`
|
|
|
28
29
|
--menu-item-text-color: var(--sidebar-text-color); // @presenter Color
|
|
29
30
|
--menu-item-bg-color: transparent; // @presenter Color
|
|
30
31
|
--menu-item-bg-color-hover: var(--color-hover-base); // @presenter Color
|
|
31
|
-
--menu-item-bg-color-active: var(--
|
|
32
|
+
--menu-item-bg-color-active: var(--color-primary-bg, var(--menu-item-bg-color-active-legacy)); // @presenter Color
|
|
32
33
|
|
|
33
34
|
--menu-item-color-hover: var(--tree-content-color-hover); // @presenter Color
|
|
34
|
-
--menu-item-color-active: var(--
|
|
35
|
-
|
|
35
|
+
--menu-item-color-active: var(--color-primary-text, var(--menu-item-color-active-legacy)); // @presenter Color
|
|
36
|
+
|
|
36
37
|
/**
|
|
37
38
|
* @tokens Menu item spacing
|
|
38
39
|
* @presenter Spacing
|
|
@@ -2,7 +2,7 @@ import { css } from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
export const switcherDarkMode = css`
|
|
4
4
|
--switch-bg-color: transparent; // @presenter Color
|
|
5
|
-
--switch-bg-color-selected: var(--color-
|
|
5
|
+
--switch-bg-color-selected: var(--color-primary-base, var(--switch-bg-color-selected-legacy)); // @presenter Color
|
|
6
6
|
--switch-bg-color-hover: transparent; // @presenter Color
|
|
7
7
|
--switch-bg-color-pressed: transparent; // @presenter Color
|
|
8
8
|
--switch-bg-color-disabled: transparent; // @presenter Color
|
|
@@ -12,7 +12,7 @@ export const switcherDarkMode = css`
|
|
|
12
12
|
--switch-border-color-hover: var(--color-warm-grey-7); // @presenter Color
|
|
13
13
|
--switch-border-color-pressed: var(--color-warm-grey-8); // @presenter Color
|
|
14
14
|
--switch-border-color-disabled: var(--color-warm-grey-5); // @presenter Color
|
|
15
|
-
--switch-border-color-selected: var(--color-
|
|
15
|
+
--switch-border-color-selected: var(--color-primary-base, var(--switch-border-color-selected-legacy)); // @presenter Color
|
|
16
16
|
--switch-border-width: var(--border-width); // @presenter Border
|
|
17
17
|
--switch-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
18
18
|
|
|
@@ -2,7 +2,7 @@ import { css } from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
export const switcher = css`
|
|
4
4
|
--switch-bg-color: var(--color-warm-grey-4); // @presenter Color
|
|
5
|
-
--switch-bg-color-selected: var(--color-
|
|
5
|
+
--switch-bg-color-selected: var(--color-primary-base, var(--switch-bg-color-selected-legacy)); // @presenter Color
|
|
6
6
|
--switch-bg-color-hover: var(--color-warm-grey-5); // @presenter Color
|
|
7
7
|
--switch-bg-color-pressed: var(--color-warm-grey-6); // @presenter Color
|
|
8
8
|
--switch-bg-color-disabled: var(--color-warm-grey-3); // @presenter Color
|
|
@@ -128,6 +128,7 @@ const TableOfContentMenuItem = styled.a<{ depth: number }>`
|
|
|
128
128
|
&.active {
|
|
129
129
|
color: var(--toc-item-text-color-active);
|
|
130
130
|
border-left: solid 2px var(--toc-item-border-color-active);
|
|
131
|
+
font-weight: var(--toc-item-font-weight-active);
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
:empty {
|
|
@@ -24,12 +24,13 @@ export const toc = css`
|
|
|
24
24
|
|
|
25
25
|
--toc-item-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
26
26
|
--toc-item-text-color: var(--text-color-description); // @presenter Color
|
|
27
|
-
--toc-item-text-color-active: var(--text-color-
|
|
27
|
+
--toc-item-text-color-active: var(--color-primary-text, var(--toc-item-text-color-active-legacy)); // @presenter Color
|
|
28
28
|
--toc-item-bg-color: transparent; // @presenter Color
|
|
29
29
|
--toc-item-nested-offset: calc(var(--toc-spacing-unit) * 2); // @presenter Spacing
|
|
30
30
|
--toc-item-padding-vertical: calc(var(--toc-spacing-unit) / 2); // @presenter Spacing
|
|
31
31
|
--toc-item-padding-horizontal: calc(var(--toc-spacing-unit) * 2); // @presenter Spacing
|
|
32
|
-
--toc-item-border-color-active: var(--border-color-
|
|
32
|
+
--toc-item-border-color-active: var(--color-primary-base, var(--toc-item-border-color-active-legacy));
|
|
33
|
+
--toc-item-font-weight-active: var(--font-weight-medium); // @presenter FontWeight
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* @tokens TOC header
|