mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 01:47:17 +02:00
chore: upgrade Infima to alpha.39 (#7306)
This commit is contained in:
parent
470e242eef
commit
be0dc6b0c9
30 changed files with 147 additions and 208 deletions
|
@ -15,7 +15,7 @@ export default function DebugRegistry(): JSX.Element {
|
|||
return (
|
||||
<DebugLayout>
|
||||
<h2>Registry</h2>
|
||||
<ul className={styles.list}>
|
||||
<ul className="clean-list">
|
||||
{Object.values(registry).map(([, aliasedPath, resolved]) => (
|
||||
<li key={aliasedPath} className={styles.listItem}>
|
||||
<div style={{marginBottom: '10px'}}>
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
.list {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.listItem {
|
||||
list-style: none;
|
||||
background-color: #242526;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
|
|
|
@ -16,7 +16,7 @@ export default function DebugRoutes(): JSX.Element {
|
|||
return (
|
||||
<DebugLayout>
|
||||
<h2>Routes</h2>
|
||||
<ul className={styles.list}>
|
||||
<ul className="clean-list">
|
||||
{routes.map(({path, exact, routes: childRoutes}) => (
|
||||
<li key={path} className={styles.listItem}>
|
||||
<div className={styles.route}>
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
.list {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.listItem {
|
||||
list-style: none;
|
||||
background-color: #242526;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
|
|
|
@ -24,7 +24,7 @@ export default function DebugMetadata(): JSX.Element {
|
|||
<code>{siteMetadata.siteVersion || 'No version specified'}</code>
|
||||
</div>
|
||||
<h3 className={styles.sectionTitle}>Plugins and themes</h3>
|
||||
<ul className={styles.list}>
|
||||
<ul className="clean-list">
|
||||
{Object.entries(siteMetadata.pluginVersions).map(
|
||||
([name, versionInformation]) => (
|
||||
<li key={name} className={styles.listItem}>
|
||||
|
|
|
@ -9,12 +9,7 @@
|
|||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.listItem {
|
||||
list-style: none;
|
||||
background-color: #242526;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.1.1",
|
||||
"copy-text-to-clipboard": "^3.0.1",
|
||||
"infima": "0.2.0-alpha.38",
|
||||
"infima": "0.2.0-alpha.39",
|
||||
"lodash": "^4.17.21",
|
||||
"nprogress": "^0.2.0",
|
||||
"postcss": "^8.4.13",
|
||||
|
|
|
@ -997,6 +997,7 @@ declare module '@theme/PaginatorNavLink' {
|
|||
export interface Props extends Omit<PropNavigationLink, 'title'> {
|
||||
readonly title: ReactNode;
|
||||
readonly subLabel?: JSX.Element;
|
||||
readonly isNext?: boolean;
|
||||
}
|
||||
|
||||
export default function PaginatorNavLink(props: Props): JSX.Element;
|
||||
|
|
|
@ -22,7 +22,6 @@ export default function BlogListPaginator(props: Props): JSX.Element {
|
|||
message: 'Blog list page navigation',
|
||||
description: 'The ARIA label for the blog pagination',
|
||||
})}>
|
||||
<div className="pagination-nav__item">
|
||||
{previousPage && (
|
||||
<PaginatorNavLink
|
||||
permalink={previousPage}
|
||||
|
@ -35,8 +34,6 @@ export default function BlogListPaginator(props: Props): JSX.Element {
|
|||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="pagination-nav__item pagination-nav__item--next">
|
||||
{nextPage && (
|
||||
<PaginatorNavLink
|
||||
permalink={nextPage}
|
||||
|
@ -47,9 +44,9 @@ export default function BlogListPaginator(props: Props): JSX.Element {
|
|||
Older Entries
|
||||
</Translate>
|
||||
}
|
||||
isNext
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -9,8 +9,6 @@ import React from 'react';
|
|||
import Link, {type Props as LinkProps} from '@docusaurus/Link';
|
||||
import type {Props} from '@theme/BlogPostAuthor';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function MaybeLink(props: LinkProps): JSX.Element {
|
||||
if (props.href) {
|
||||
return <Link {...props} />;
|
||||
|
@ -24,11 +22,9 @@ export default function BlogPostAuthor({author}: Props): JSX.Element {
|
|||
return (
|
||||
<div className="avatar margin-bottom--sm">
|
||||
{imageURL && (
|
||||
<span className="avatar__photo-link avatar__photo">
|
||||
<MaybeLink href={link}>
|
||||
<img className={styles.image} src={imageURL} alt={name} />
|
||||
<MaybeLink href={link} className="avatar__photo-link">
|
||||
<img className="avatar__photo" src={imageURL} alt={name} />
|
||||
</MaybeLink>
|
||||
</span>
|
||||
)}
|
||||
|
||||
{name && (
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
|
@ -21,7 +21,6 @@ export default function BlogPostPaginator(props: Props): JSX.Element {
|
|||
message: 'Blog post page navigation',
|
||||
description: 'The ARIA label for the blog posts pagination',
|
||||
})}>
|
||||
<div className="pagination-nav__item">
|
||||
{prevItem && (
|
||||
<PaginatorNavLink
|
||||
{...prevItem}
|
||||
|
@ -34,8 +33,6 @@ export default function BlogPostPaginator(props: Props): JSX.Element {
|
|||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="pagination-nav__item pagination-nav__item--next">
|
||||
{nextItem && (
|
||||
<PaginatorNavLink
|
||||
{...nextItem}
|
||||
|
@ -46,9 +43,9 @@ export default function BlogPostPaginator(props: Props): JSX.Element {
|
|||
Older Post
|
||||
</Translate>
|
||||
}
|
||||
isNext
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ export default function BlogSidebarDesktop({sidebar}: Props): JSX.Element {
|
|||
<div className={clsx(styles.sidebarItemTitle, 'margin-bottom--md')}>
|
||||
{sidebar.title}
|
||||
</div>
|
||||
<ul className={styles.sidebarItemList}>
|
||||
<ul className={clsx(styles.sidebarItemList, 'clean-list')}>
|
||||
{sidebar.items.map((item) => (
|
||||
<li key={item.permalink} className={styles.sidebarItem}>
|
||||
<Link
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
}
|
||||
|
||||
.sidebarItemList {
|
||||
list-style: none;
|
||||
font-size: 0.9rem;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.sidebarItem {
|
||||
|
|
|
@ -15,11 +15,12 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background-color var(--ifm-transition-fast) ease;
|
||||
background-color: var(--docusaurus-collapse-button-bg);
|
||||
}
|
||||
|
||||
.expandButton:hover,
|
||||
.expandButton:focus {
|
||||
background-color: var(--ifm-color-emphasis-200);
|
||||
background-color: var(--docusaurus-collapse-button-bg-hover);
|
||||
}
|
||||
|
||||
.expandButtonIcon {
|
||||
|
@ -29,9 +30,4 @@
|
|||
[dir='rtl'] .expandButtonIcon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
[data-theme='dark'] .expandButton:hover,
|
||||
[data-theme='dark'] .expandButton:focus {
|
||||
background-color: var(--collapse-button-bg-color-dark);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ export default function DocPaginator(props: Props): JSX.Element {
|
|||
message: 'Docs pages navigation',
|
||||
description: 'The ARIA label for the docs pagination',
|
||||
})}>
|
||||
<div className="pagination-nav__item">
|
||||
{previous && (
|
||||
<PaginatorNavLink
|
||||
{...previous}
|
||||
|
@ -34,8 +33,6 @@ export default function DocPaginator(props: Props): JSX.Element {
|
|||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="pagination-nav__item pagination-nav__item--next">
|
||||
{next && (
|
||||
<PaginatorNavLink
|
||||
{...next}
|
||||
|
@ -46,9 +43,9 @@ export default function DocPaginator(props: Props): JSX.Element {
|
|||
Next
|
||||
</Translate>
|
||||
}
|
||||
isNext
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -6,13 +6,19 @@
|
|||
*/
|
||||
|
||||
:root {
|
||||
--collapse-button-bg-color-dark: #2e333a;
|
||||
--docusaurus-collapse-button-bg: transparent;
|
||||
--docusaurus-collapse-button-bg-hover: rgb(0 0 0 / 10%);
|
||||
}
|
||||
|
||||
[data-theme='dark']:root {
|
||||
--docusaurus-collapse-button-bg: rgb(255 255 255 / 5%);
|
||||
--docusaurus-collapse-button-bg-hover: rgb(255 255 255 / 10%);
|
||||
}
|
||||
|
||||
@media (min-width: 997px) {
|
||||
.collapseSidebarButton {
|
||||
display: block !important;
|
||||
background-color: var(--ifm-button-background-color);
|
||||
background-color: var(--docusaurus-collapse-button-bg);
|
||||
height: 40px;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
|
@ -29,13 +35,9 @@
|
|||
transform: rotate(0);
|
||||
}
|
||||
|
||||
[data-theme='dark'] .collapseSidebarButton {
|
||||
background-color: var(--collapse-button-bg-color-dark);
|
||||
}
|
||||
|
||||
[data-theme='dark'] .collapseSidebarButton:hover,
|
||||
[data-theme='dark'] .collapseSidebarButton:focus {
|
||||
background-color: var(--ifm-color-emphasis-200);
|
||||
.collapseSidebarButton:hover,
|
||||
.collapseSidebarButton:focus {
|
||||
background-color: var(--docusaurus-collapse-button-bg-hover);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ function Column({column}: {column: ColumnType}) {
|
|||
return (
|
||||
<div className="col footer__col">
|
||||
<div className="footer__title">{column.title}</div>
|
||||
<ul className="footer__items">
|
||||
<ul className="footer__items clean-list">
|
||||
{column.items.map((item, i) => (
|
||||
<ColumnLinkItem key={i} item={item} />
|
||||
))}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
.contains-task-list {
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
}
|
|
@ -9,17 +9,13 @@ import React from 'react';
|
|||
import clsx from 'clsx';
|
||||
import type {Props} from '@theme/MDXComponents/Ul';
|
||||
|
||||
import styles from './Ul.module.css';
|
||||
|
||||
const containsClassListLocalClass = styles['contains-task-list'];
|
||||
|
||||
function transformUlClassName(className?: string): string {
|
||||
return clsx(
|
||||
className,
|
||||
// This class is set globally by GitHub/MDX
|
||||
// We keep the global class, but apply scoped CSS
|
||||
// We keep the global class, but add Infima class to get list without styling
|
||||
// See https://github.com/syntax-tree/mdast-util-to-hast/issues/28
|
||||
className?.includes('contains-task-list') && containsClassListLocalClass,
|
||||
className?.includes('contains-task-list') && 'clean-list',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ export default function NavbarLogo(): JSX.Element {
|
|||
<Logo
|
||||
className="navbar__brand"
|
||||
imageClassName="navbar__logo"
|
||||
titleClassName="navbar__title"
|
||||
titleClassName="navbar__title text--truncate"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -58,10 +58,10 @@ export default function LocaleDropdownNavbarItem({
|
|||
{...props}
|
||||
mobile={mobile}
|
||||
label={
|
||||
<span>
|
||||
<>
|
||||
<IconLanguage className={styles.iconLanguage} />
|
||||
{dropdownLabel}
|
||||
</span>
|
||||
</>
|
||||
}
|
||||
items={items}
|
||||
/>
|
||||
|
|
|
@ -6,13 +6,19 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Link from '@docusaurus/Link';
|
||||
import type {Props} from '@theme/PaginatorNavLink';
|
||||
|
||||
export default function PaginatorNavLink(props: Props): JSX.Element {
|
||||
const {permalink, title, subLabel} = props;
|
||||
const {permalink, title, subLabel, isNext} = props;
|
||||
return (
|
||||
<Link className="pagination-nav__link" to={permalink}>
|
||||
<Link
|
||||
className={clsx(
|
||||
'pagination-nav__link',
|
||||
isNext ? 'pagination-nav__link--next' : 'pagination-nav__link--prev',
|
||||
)}
|
||||
to={permalink}>
|
||||
{subLabel && <div className="pagination-nav__sublabel">{subLabel}</div>}
|
||||
<div className="pagination-nav__label">{title}</div>
|
||||
</Link>
|
||||
|
|
|
@ -25,7 +25,7 @@ html[data-theme='dark'] {
|
|||
--site-color-feedback-background: #f0f8ff;
|
||||
--site-color-favorite-background: #1d1e1e;
|
||||
--site-color-checkbox-checked-bg: hsl(167deg 56% 73% / 10%);
|
||||
--docusaurus-highlighted-code-line-bg: rgb(66 66 66 / 30%);
|
||||
--docusaurus-highlighted-code-line-bg: rgb(66 66 66 / 35%);
|
||||
}
|
||||
|
||||
[data-theme='light'] {
|
||||
|
|
|
@ -168,7 +168,7 @@ function ShowcaseFilters() {
|
|||
</div>
|
||||
<ShowcaseFilterToggle />
|
||||
</div>
|
||||
<ul className={styles.checkboxList}>
|
||||
<ul className="clean-list">
|
||||
{TagList.map((tag, i) => {
|
||||
const {label, description, color} = Tags[tag];
|
||||
const id = `showcase_checkbox_id_${tag}`;
|
||||
|
@ -287,7 +287,7 @@ function ShowcaseCards() {
|
|||
<FavoriteIcon svgClass={styles.svgIconFavorite} />
|
||||
<SearchBar />
|
||||
</div>
|
||||
<ul className={clsx('container', styles.showcaseList)}>
|
||||
<ul className="container clean-list">
|
||||
{favoriteUsers.map((user) => (
|
||||
<ShowcaseCard key={user.title} user={user} />
|
||||
))}
|
||||
|
@ -298,7 +298,7 @@ function ShowcaseCards() {
|
|||
<h2 className={styles.showcaseHeader}>
|
||||
<Translate id="showcase.usersList.allUsers">All sites</Translate>
|
||||
</h2>
|
||||
<ul className={styles.showcaseList}>
|
||||
<ul className="clean-list">
|
||||
{otherUsers.map((user) => (
|
||||
<ShowcaseCard key={user.title} user={user} />
|
||||
))}
|
||||
|
@ -314,7 +314,7 @@ function ShowcaseCards() {
|
|||
)}>
|
||||
<SearchBar />
|
||||
</div>
|
||||
<ul className={styles.showcaseList}>
|
||||
<ul className="clean-list">
|
||||
{filteredUsers.map((user) => (
|
||||
<ShowcaseCard key={user.title} user={user} />
|
||||
))}
|
||||
|
|
|
@ -30,12 +30,6 @@
|
|||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.checkboxList,
|
||||
.showcaseList {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.checkboxListItem {
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
|
|
|
@ -23,7 +23,6 @@ export default function ChangelogPaginator(props: Props): JSX.Element {
|
|||
message: 'Changelog item navigation',
|
||||
description: 'The ARIA label for the changelog pagination',
|
||||
})}>
|
||||
<div className="pagination-nav__item">
|
||||
{prevItem && (
|
||||
<PaginatorNavLink
|
||||
{...prevItem}
|
||||
|
@ -36,8 +35,6 @@ export default function ChangelogPaginator(props: Props): JSX.Element {
|
|||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="pagination-nav__item pagination-nav__item--next">
|
||||
{nextItem && (
|
||||
<PaginatorNavLink
|
||||
{...nextItem}
|
||||
|
@ -48,9 +45,9 @@ export default function ChangelogPaginator(props: Props): JSX.Element {
|
|||
Older release
|
||||
</Translate>
|
||||
}
|
||||
isNext
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import darkTheme from 'prism-react-renderer/themes/vsDark/index.cjs.js';
|
|||
export default {
|
||||
plain: {
|
||||
color: '#D4D4D4',
|
||||
backgroundColor: '#1E1E1E',
|
||||
backgroundColor: '#212121',
|
||||
},
|
||||
styles: [
|
||||
...darkTheme.styles,
|
||||
|
|
|
@ -32,11 +32,11 @@ const EXPECTED_CSS_MARKERS = [
|
|||
'.markdown>h2',
|
||||
'.button--outline.button--active',
|
||||
'.DocSearch-Hit-content-wrapper',
|
||||
'.navbar__title',
|
||||
'--ifm-color-scheme:light',
|
||||
'.col[class*=col--]',
|
||||
'.padding-vert--xl',
|
||||
'.footer__link-item',
|
||||
'.navbar__title',
|
||||
'.pagination__item',
|
||||
'.pills__item',
|
||||
'.tabs__item',
|
||||
|
|
|
@ -8617,10 +8617,10 @@ infer-owner@^1.0.4:
|
|||
resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467"
|
||||
integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==
|
||||
|
||||
infima@0.2.0-alpha.38:
|
||||
version "0.2.0-alpha.38"
|
||||
resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.38.tgz#e41d95c7cd82756549b17df12f613fed4af3d528"
|
||||
integrity sha512-1WsmqSMI5IqzrUx3goq+miJznHBonbE3aoqZ1AR/i/oHhroxNeSV6Awv5VoVfXBhfTzLSnxkHaRI2qpAMYcCzw==
|
||||
infima@0.2.0-alpha.39:
|
||||
version "0.2.0-alpha.39"
|
||||
resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.39.tgz#054b13ac44f3e9a42bc083988f1a1586add2f59c"
|
||||
integrity sha512-UyYiwD3nwHakGhuOUfpe3baJ8gkiPpRVx4a4sE/Ag+932+Y6swtLsdPoRR8ezhwqGnduzxmFkjumV9roz6QoLw==
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue