Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/graph/transactio…
Browse files Browse the repository at this point in the history
…n-polling
  • Loading branch information
MRVDH committed Sep 4, 2023
2 parents 982545b + 5ed7f3d commit cf854f6
Show file tree
Hide file tree
Showing 104 changed files with 3,129 additions and 618 deletions.
2 changes: 2 additions & 0 deletions .changeset/brave-hats-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/late-files-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@kadena/react-ui': none
---

Refactor Accordion component
2 changes: 2 additions & 0 deletions .changeset/many-beds-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { articleMetaDataItemClass } from './styles.css';

import React, { FC, PropsWithChildren } from 'react';

export const ArticleMetadataItem: FC<PropsWithChildren> = ({ children }) => (
<span className={articleMetaDataItemClass}>{children}</span>
);
30 changes: 0 additions & 30 deletions packages/apps/docs/src/components/Layout/Blog/Blog.css.ts

This file was deleted.

20 changes: 13 additions & 7 deletions packages/apps/docs/src/components/Layout/Blog/Blog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Grid, Stack } from '@kadena/react-ui';

import { baseGridClass } from '../basestyles.css';
import {
articleClass,
contentClass,
Expand All @@ -9,12 +10,16 @@ import {
import { Template } from '../components/Template';
import { globalClass } from '../global.css';

import { articleTopMetadataClass, bottomWrapperClass } from './Blog.css';
import { ArticleMetadataItem, PageGrid } from './styles';
import { ArticleMetadataItem } from './ArticleMetadataItem';
import {
articleTopMetadataClass,
bottomWrapperClass,
pageGridClass,
} from './styles.css';

import { IPageProps } from '@/types/Layout';
import { formatDateDistance } from '@/utils/dates';
import classNames from 'classnames';
import classnames from 'classnames';
import React, { FC } from 'react';

export const Blog: FC<IPageProps> = ({
Expand All @@ -26,20 +31,21 @@ export const Blog: FC<IPageProps> = ({
const readingTimeLabel =
readingTimeInMinutes && readingTimeInMinutes > 1 ? 'minutes' : 'minute';

const contentClassNames = classNames(
const contentClassNames = classnames(
contentClass,
contentClassVariants[frontmatter.layout] ?? '',
);

const gridClassNames = classnames(globalClass, baseGridClass, pageGridClass);

return (
<PageGrid className={globalClass}>
<div className={gridClassNames}>
<Template menuItems={leftMenuTree} hideSideMenu layout="landing">
<TitleHeader
title="BlogChain"
subTitle="The place where the blog meets the chain"
icon="BlogChain"
/>

<div id="maincontent" className={contentClassNames}>
<article className={articleClass}>
<div className={articleTopMetadataClass}>
Expand Down Expand Up @@ -74,7 +80,7 @@ export const Blog: FC<IPageProps> = ({
</article>
</div>
</Template>
</PageGrid>
</div>
);
};

Expand Down
73 changes: 73 additions & 0 deletions packages/apps/docs/src/components/Layout/Blog/styles.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { breakpoints, sprinkles, vars } from '@kadena/react-ui/theme';

import { style } from '@vanilla-extract/css';

export const bottomWrapperClass = style([
sprinkles({
width: '100%',
paddingTop: '$20',
marginTop: '$20',
}),
{
borderTop: `1px solid ${vars.colors.$borderDefault}`,
},
]);

export const articleTopMetadataClass = style([
sprinkles({
display: 'flex',
justifyContent: 'flex-start',
alignItems: 'center',
width: '100%',
marginBottom: '$5',
paddingX: 0,
paddingY: '$5',
}),
{
borderBottom: `1px solid ${vars.colors.$borderDefault}`,
opacity: '0.6',
},
]);

export const pageGridClass = style({
gridTemplateColumns: 'auto auto',
gridTemplateAreas: `
"header header"
"pageheader pageheader"
"content"
"footer footer"
`,

'@media': {
[`screen and ${breakpoints.md}`]: {
gridTemplateColumns: '0% 5% auto 5%',

gridTemplateAreas: `
"header header header header"
"pageheader pageheader pageheader pageheader"
". content . ."
"footer footer footer footer"
`,
},

[`screen and ${breakpoints.xxl}`]: {
gridTemplateColumns: '0% minmax(20%, auto) auto minmax(20%, auto)',
gridTemplateAreas: `
"header header header header"
"pageheader pageheader pageheader pageheader"
". content ."
"footer footer footer footer"
`,
},
},
});

export const articleMetaDataItemClass = style({
selectors: {
'&:not(:first-of-type)::before': {
content: '"•"',
height: '100%',
margin: vars.sizes.$3,
},
},
});
44 changes: 0 additions & 44 deletions packages/apps/docs/src/components/Layout/Blog/styles.ts

This file was deleted.

35 changes: 18 additions & 17 deletions packages/apps/docs/src/components/Layout/Full/Full.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Heading } from '@kadena/react-ui';

import { basebackgroundClass } from '../basestyles.css';
import { basebackgroundClass, baseGridClass } from '../basestyles.css';
import {
articleClass,
contentClass,
Expand All @@ -9,15 +9,14 @@ import {
import { Template } from '../components/Template';
import { globalClass } from '../global.css';

import { AsideList, ListItem } from './components/Aside';
import {
Aside,
AsideList,
ListItem,
StickyAside,
StickyAsideWrapper,
} from './components/Aside';
import { PageGrid } from './styles';
import { asidebackgroundClass } from './styles.css';
asidebackgroundClass,
asideClass,
pageGridClass,
stickyAsideClass,
stickyAsideWrapperClass,
} from './styles.css';

import { BottomPageSection } from '@/components/BottomPageSection';
import { Breadcrumbs } from '@/components/Breadcrumbs';
Expand Down Expand Up @@ -84,8 +83,10 @@ export const Full: FC<IPageProps> = ({
asidebackgroundClass,
);

const gridClassNames = classnames(globalClass, baseGridClass, pageGridClass);

return (
<PageGrid className={globalClass}>
<div className={gridClassNames}>
<Template menuItems={leftMenuTree}>
<div className={contentClassNames} id="maincontent">
<article className={articleClass} ref={scrollRef}>
Expand All @@ -99,10 +100,10 @@ export const Full: FC<IPageProps> = ({
</article>
</div>
<div className={backgroundClassnames} />
<Aside data-cy="aside">
<aside className={asideClass} data-cy="aside">
{showSideMenu && (
<StickyAsideWrapper>
<StickyAside>
<div className={stickyAsideWrapperClass}>
<div className={stickyAsideClass}>
<Heading as="h6" transform="uppercase">
On this page
</Heading>
Expand All @@ -120,12 +121,12 @@ export const Full: FC<IPageProps> = ({
);
})}
</AsideList>
</StickyAside>
</StickyAsideWrapper>
</div>
</div>
)}
</Aside>
</aside>
</Template>
</PageGrid>
</div>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { AsideItem, AsideItemLink } from './AsideStyles';
import {
asideItemClass,
asideItemLinkActiveVariants,
asideItemLinkClass,
} from './styles.css';

import classNames from 'classnames';
import Link from 'next/link';
import React, { FC, MouseEventHandler, ReactNode } from 'react';

interface IProps {
Expand All @@ -17,12 +23,17 @@ export const AsideLink: FC<IProps> = ({
isActive,
onClick,
}) => {
const linkClass = classNames(
asideItemLinkClass,
asideItemLinkActiveVariants[isActive ? 'true' : 'false'],
);

return (
<AsideItem>
<AsideItemLink href={href} onClick={onClick} isActive={isActive}>
<li className={asideItemClass}>
<Link href={href} onClick={onClick} className={linkClass}>
{label}
</AsideItemLink>
</Link>
{children}
</AsideItem>
</li>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { asideListClass, asideListInnerVariants } from './styles.css';

import classNames from 'classnames';
import React, { FC, ReactNode } from 'react';

interface IProps {
children: ReactNode;
inner?: boolean;
ref?: React.MutableRefObject<HTMLUListElement | null>;
}

export const AsideList: FC<IProps> = ({ children, inner = false, ref }) => {
const classes = classNames(
asideListClass,
asideListInnerVariants[inner ? 'true' : 'false'],
);
return (
<ul ref={ref} className={classes}>
{children}
</ul>
);
};
Loading

0 comments on commit cf854f6

Please sign in to comment.