@redocly/theme 0.0.0-cache-perf-20240625144418 → 0.0.0-cache-perf-20240626070422
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/Buttons/EditPageButton.js +1 -1
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +1 -1
- package/lib/components/LanguagePicker/LanguagePicker.js +1 -1
- package/lib/components/Menu/MenuItem.js +21 -0
- package/lib/components/Navbar/Navbar.js +1 -1
- package/lib/components/UserMenu/LoginButton.js +1 -1
- package/lib/core/hooks/feedback/use-report-dialog.js +1 -1
- package/lib/core/styles/dark.js +3 -3
- package/package.json +2 -2
- package/src/components/Buttons/EditPageButton.tsx +1 -0
- package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +1 -1
- package/src/components/LanguagePicker/LanguagePicker.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +21 -0
- package/src/components/Navbar/Navbar.tsx +1 -1
- package/src/components/UserMenu/LoginButton.tsx +1 -1
- package/src/core/hooks/feedback/use-report-dialog.ts +1 -1
- package/src/core/styles/dark.ts +3 -3
|
@@ -13,7 +13,7 @@ function EditPageButton({ to }) {
|
|
|
13
13
|
const { useTranslate, useTelemetry } = (0, hooks_1.useThemeHooks)();
|
|
14
14
|
const { translate } = useTranslate();
|
|
15
15
|
const telemetry = useTelemetry();
|
|
16
|
-
return (react_1.default.createElement(EditPageButtonWrapper, { "data-component-name": "Buttons/EditPageButton", to: to, onClick: () => telemetry.send('edit_page_link_clicked', {}) },
|
|
16
|
+
return (react_1.default.createElement(EditPageButtonWrapper, { "data-component-name": "Buttons/EditPageButton", target: "_blank", to: to, onClick: () => telemetry.send('edit_page_link_clicked', {}) },
|
|
17
17
|
react_1.default.createElement(ButtonIcon, null),
|
|
18
18
|
react_1.default.createElement(ButtonText, { "data-translation-key": "theme.markdown.editPage.text" }, translate('theme.markdown.editPage.text', 'Edit'))));
|
|
19
19
|
}
|
|
@@ -16,7 +16,7 @@ function ColorModeSwitcher({ className }) {
|
|
|
16
16
|
if (isSwitcherHidden) {
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
|
-
return (react_1.default.createElement(Button_1.Button, { "data-component-name": "ColorModeSwitcher/ColorModeSwitcher", "data-testid": "color-mode-switcher", onClick: () => setActiveColorMode(switchColorMode()), extraClass: className, variant: "
|
|
19
|
+
return (react_1.default.createElement(Button_1.Button, { "data-component-name": "ColorModeSwitcher/ColorModeSwitcher", "data-testid": "color-mode-switcher", onClick: () => setActiveColorMode(switchColorMode()), extraClass: className, variant: "secondary", size: "medium", icon: react_1.default.createElement(ColorModeIcon_1.ColorModeIcon, { mode: activeColorMode }) }));
|
|
20
20
|
}
|
|
21
21
|
exports.ColorModeSwitcher = ColorModeSwitcher;
|
|
22
22
|
//# sourceMappingURL=ColorModeSwitcher.js.map
|
|
@@ -20,7 +20,7 @@ function LanguagePicker(props) {
|
|
|
20
20
|
if (locales.length < 2 || !currentLocale) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
const languagePickerButton = (react_1.default.createElement(Button_1.Button, { icon: react_1.default.createElement(GlobalOutlinedIcon_1.GlobalOutlinedIcon, { color: "--button-content-color" }), variant: "
|
|
23
|
+
const languagePickerButton = (react_1.default.createElement(Button_1.Button, { icon: react_1.default.createElement(GlobalOutlinedIcon_1.GlobalOutlinedIcon, { color: "--button-content-color" }), variant: "secondary", size: "medium" }));
|
|
24
24
|
const languageItems = locales.map((locale) => ({
|
|
25
25
|
content: locale.name || locale.code || '',
|
|
26
26
|
onAction: () => {
|
|
@@ -167,6 +167,13 @@ const MenuItemLabelWrapper = styled_components_1.default.li `
|
|
|
167
167
|
color: ${deprecated ? 'var(--menu-content-color-disabled)' : 'var(--menu-item-color-active)'};
|
|
168
168
|
background-color: var(--menu-item-bg-color-active);
|
|
169
169
|
|
|
170
|
+
${ChevronDownIcon_1.ChevronDownIcon} path {
|
|
171
|
+
fill: var(--menu-item-color-active);
|
|
172
|
+
}
|
|
173
|
+
${ChevronRightIcon_1.ChevronRightIcon} path {
|
|
174
|
+
fill: var(--menu-item-color-active);
|
|
175
|
+
}
|
|
176
|
+
|
|
170
177
|
&:hover {
|
|
171
178
|
background: var(--menu-item-bg-color-active);
|
|
172
179
|
}
|
|
@@ -184,11 +191,25 @@ const MenuItemLabelWrapper = styled_components_1.default.li `
|
|
|
184
191
|
&:hover {
|
|
185
192
|
color: var(--menu-item-color-hover);
|
|
186
193
|
background: var(--menu-item-bg-color-hover);
|
|
194
|
+
|
|
195
|
+
${ChevronDownIcon_1.ChevronDownIcon} path {
|
|
196
|
+
fill: var(--menu-item-color-hover);
|
|
197
|
+
}
|
|
198
|
+
${ChevronRightIcon_1.ChevronRightIcon} path {
|
|
199
|
+
fill: var(--menu-item-color-hover);
|
|
200
|
+
}
|
|
187
201
|
}
|
|
188
202
|
|
|
189
203
|
&:active {
|
|
190
204
|
color: var(--menu-item-color-active);
|
|
191
205
|
background: var(--menu-item-bg-color-active);
|
|
206
|
+
|
|
207
|
+
${ChevronDownIcon_1.ChevronDownIcon} path {
|
|
208
|
+
fill: var(--menu-item-color-active);
|
|
209
|
+
}
|
|
210
|
+
${ChevronRightIcon_1.ChevronRightIcon} path {
|
|
211
|
+
fill: var(--menu-item-color-active);
|
|
212
|
+
}
|
|
192
213
|
}
|
|
193
214
|
|
|
194
215
|
&:empty {
|
|
@@ -88,7 +88,7 @@ const NavbarRow = styled_components_1.default.div `
|
|
|
88
88
|
align-items: center;
|
|
89
89
|
justify-content: space-between;
|
|
90
90
|
width: 100%;
|
|
91
|
-
gap:
|
|
91
|
+
gap: 8px;
|
|
92
92
|
max-width: var(--navbar-container-max-width);
|
|
93
93
|
`;
|
|
94
94
|
const MobileMenuButton = (0, styled_components_1.default)(Button_1.Button) `
|
|
@@ -12,7 +12,7 @@ function LoginButton({ href, className }) {
|
|
|
12
12
|
const { translate } = useTranslate();
|
|
13
13
|
const telemetry = useTelemetry();
|
|
14
14
|
return (react_1.default.createElement("div", { "data-component-name": "UserMenu/LoginButton", className: className },
|
|
15
|
-
react_1.default.createElement(Button_1.Button, { "data-translation-key": "theme.userMenu.login", to: href, onClick: () => telemetry.send('login_button_clicked', {}), "data-testid": "login-btn", extraClass: className, variant: "
|
|
15
|
+
react_1.default.createElement(Button_1.Button, { "data-translation-key": "theme.userMenu.login", to: href, onClick: () => telemetry.send('login_button_clicked', {}), "data-testid": "login-btn", extraClass: className, variant: "primary", size: "medium" }, translate('theme.userMenu.login', 'Login'))));
|
|
16
16
|
}
|
|
17
17
|
exports.LoginButton = LoginButton;
|
|
18
18
|
//# sourceMappingURL=LoginButton.js.map
|
package/lib/core/styles/dark.js
CHANGED
|
@@ -16,9 +16,9 @@ const replayDarkMode = (0, styled_components_1.css) `
|
|
|
16
16
|
* @presenter Color
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
--replay-undefined-variable-color: rgba(249, 49, 109, 0.18); // @presenter Color
|
|
20
|
-
--replay-defined-variable-color: rgba(31, 124, 255, 0.18); // @presenter Color
|
|
21
|
-
--replay-server-variable-color: rgba(119, 45, 240, 0.2); // @presenter Color
|
|
19
|
+
--replay-undefined-variable-bg-color: rgba(249, 49, 109, 0.18); // @presenter Color
|
|
20
|
+
--replay-defined-variable-bg-color: rgba(31, 124, 255, 0.18); // @presenter Color
|
|
21
|
+
--replay-server-variable-bg-color: rgba(119, 45, 240, 0.2); // @presenter Color
|
|
22
22
|
|
|
23
23
|
// @tokens End
|
|
24
24
|
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.0.0-cache-perf-
|
|
3
|
+
"version": "0.0.0-cache-perf-20240626070422",
|
|
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.0.0-cache-perf-
|
|
101
|
+
"@redocly/config": "0.0.0-cache-perf-20240626070422"
|
|
102
102
|
},
|
|
103
103
|
"scripts": {
|
|
104
104
|
"start": "npm-run-all --parallel storybook storybook:tokens:watch",
|
|
@@ -26,7 +26,7 @@ export function ColorModeSwitcher({ className }: ColorModeSwitcherProps): JSX.El
|
|
|
26
26
|
data-testid="color-mode-switcher"
|
|
27
27
|
onClick={() => setActiveColorMode(switchColorMode())}
|
|
28
28
|
extraClass={className}
|
|
29
|
-
variant="
|
|
29
|
+
variant="secondary"
|
|
30
30
|
size="medium"
|
|
31
31
|
icon={<ColorModeIcon mode={activeColorMode} />}
|
|
32
32
|
/>
|
|
@@ -236,6 +236,13 @@ const MenuItemLabelWrapper = styled.li<{
|
|
|
236
236
|
color: ${deprecated ? 'var(--menu-content-color-disabled)' : 'var(--menu-item-color-active)'};
|
|
237
237
|
background-color: var(--menu-item-bg-color-active);
|
|
238
238
|
|
|
239
|
+
${ChevronDownIcon} path {
|
|
240
|
+
fill: var(--menu-item-color-active);
|
|
241
|
+
}
|
|
242
|
+
${ChevronRightIcon} path {
|
|
243
|
+
fill: var(--menu-item-color-active);
|
|
244
|
+
}
|
|
245
|
+
|
|
239
246
|
&:hover {
|
|
240
247
|
background: var(--menu-item-bg-color-active);
|
|
241
248
|
}
|
|
@@ -254,11 +261,25 @@ const MenuItemLabelWrapper = styled.li<{
|
|
|
254
261
|
&:hover {
|
|
255
262
|
color: var(--menu-item-color-hover);
|
|
256
263
|
background: var(--menu-item-bg-color-hover);
|
|
264
|
+
|
|
265
|
+
${ChevronDownIcon} path {
|
|
266
|
+
fill: var(--menu-item-color-hover);
|
|
267
|
+
}
|
|
268
|
+
${ChevronRightIcon} path {
|
|
269
|
+
fill: var(--menu-item-color-hover);
|
|
270
|
+
}
|
|
257
271
|
}
|
|
258
272
|
|
|
259
273
|
&:active {
|
|
260
274
|
color: var(--menu-item-color-active);
|
|
261
275
|
background: var(--menu-item-bg-color-active);
|
|
276
|
+
|
|
277
|
+
${ChevronDownIcon} path {
|
|
278
|
+
fill: var(--menu-item-color-active);
|
|
279
|
+
}
|
|
280
|
+
${ChevronRightIcon} path {
|
|
281
|
+
fill: var(--menu-item-color-active);
|
|
282
|
+
}
|
|
262
283
|
}
|
|
263
284
|
|
|
264
285
|
&:empty {
|
|
@@ -21,7 +21,7 @@ export function LoginButton({ href, className }: LoginButtonProps): JSX.Element
|
|
|
21
21
|
onClick={() => telemetry.send('login_button_clicked', {})}
|
|
22
22
|
data-testid="login-btn"
|
|
23
23
|
extraClass={className}
|
|
24
|
-
variant="
|
|
24
|
+
variant="primary"
|
|
25
25
|
size="medium"
|
|
26
26
|
>
|
|
27
27
|
{translate('theme.userMenu.login', 'Login')}
|
|
@@ -29,7 +29,7 @@ export function useReportDialog(): Record<string, ReportComponentsProps> {
|
|
|
29
29
|
const hideReportDialog = () => {
|
|
30
30
|
setTimeout(function () {
|
|
31
31
|
setIsReportDialogShown(false);
|
|
32
|
-
},
|
|
32
|
+
}, 3000);
|
|
33
33
|
};
|
|
34
34
|
const closeReportDialog = () => {
|
|
35
35
|
setIsReportDialogShown(false);
|
package/src/core/styles/dark.ts
CHANGED
|
@@ -15,9 +15,9 @@ const replayDarkMode = css`
|
|
|
15
15
|
* @presenter Color
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
--replay-undefined-variable-color: rgba(249, 49, 109, 0.18); // @presenter Color
|
|
19
|
-
--replay-defined-variable-color: rgba(31, 124, 255, 0.18); // @presenter Color
|
|
20
|
-
--replay-server-variable-color: rgba(119, 45, 240, 0.2); // @presenter Color
|
|
18
|
+
--replay-undefined-variable-bg-color: rgba(249, 49, 109, 0.18); // @presenter Color
|
|
19
|
+
--replay-defined-variable-bg-color: rgba(31, 124, 255, 0.18); // @presenter Color
|
|
20
|
+
--replay-server-variable-bg-color: rgba(119, 45, 240, 0.2); // @presenter Color
|
|
21
21
|
|
|
22
22
|
// @tokens End
|
|
23
23
|
`;
|