@redocly/theme 0.81.2-rc.2 → 0.82.2-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/CodeBlock/variables.js +1 -1
- package/lib/components/Dropdown/Dropdown.js +1 -1
- package/lib/core/styles/global.js +9 -17
- package/lib/core/types/search.d.ts +5 -0
- package/package.json +2 -2
- package/src/components/CodeBlock/variables.ts +1 -1
- package/src/components/Dropdown/Dropdown.tsx +1 -1
- package/src/core/styles/global.ts +9 -17
- package/src/core/types/search.ts +2 -0
|
@@ -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))));
|
|
@@ -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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { REDOCLY_ROUTE_RBAC } from '@redocly/config';
|
|
1
2
|
import type { ProductConfig } from '../../config';
|
|
2
3
|
export type OperationParameter = {
|
|
3
4
|
name: string | string[];
|
|
@@ -22,4 +23,8 @@ export type SearchDocument = {
|
|
|
22
23
|
'redocly::teams-rbac'?: {
|
|
23
24
|
[x: string]: string;
|
|
24
25
|
};
|
|
26
|
+
[REDOCLY_ROUTE_RBAC]?: {
|
|
27
|
+
slug?: string;
|
|
28
|
+
fsPath?: string;
|
|
29
|
+
};
|
|
25
30
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.2-rc.1",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -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,
|
|
@@ -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;
|
package/src/core/types/search.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { REDOCLY_ROUTE_RBAC } from '@redocly/config';
|
|
1
2
|
import type { ProductConfig } from '@redocly/theme/config';
|
|
2
3
|
|
|
3
4
|
export type OperationParameter = {
|
|
@@ -22,4 +23,5 @@ export type SearchDocument = {
|
|
|
22
23
|
isDefaultVersion?: boolean;
|
|
23
24
|
product?: ProductConfig;
|
|
24
25
|
'redocly::teams-rbac'?: { [x: string]: string };
|
|
26
|
+
[REDOCLY_ROUTE_RBAC]?: { slug?: string; fsPath?: string };
|
|
25
27
|
};
|