-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into react-aria-1.4
- Loading branch information
Showing
49 changed files
with
2,558 additions
and
1,538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
"@marigold/components": patch | ||
--- | ||
|
||
feat(components): Expose `Selection` type for easy usage with `Table` and other components | ||
|
||
When working with a `<Table>` you can now use | ||
|
||
```ts | ||
import type { Selection } from '@marigold/components'; | ||
``` | ||
|
||
instead of creating the type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@marigold/docs": patch | ||
"@marigold/theme-docs": patch | ||
--- | ||
|
||
docs: add landing page to the site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@marigold/components": minor | ||
"@marigold/types": minor | ||
--- | ||
|
||
feat(components): Make `<Text>` and `<Headline>` accessible by allowing ARIA labelling props | ||
|
||
`<Text>` and `<Headline>` will no longer cause type errors when ARIA labelling is used (`aria-label`, `id`, ...). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@marigold/docs": patch | ||
--- | ||
|
||
docs: Apply root styles to overlay portal so they are displayed correctly. | ||
|
||
Overlay components (e.g. `<Dialog>` did not display correctly in the docs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
docs/app/_components/SiteFooter.tsx → docs/app/[...slug]/_components/Footer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import type { PropsWithChildren } from 'react'; | ||
import { Footer } from './_components/Footer'; | ||
import { SectionNavigation } from './_components/SectionNavigation'; | ||
|
||
// Layout | ||
// --------------- | ||
const Layout = ({ children }: PropsWithChildren) => ( | ||
<> | ||
<aside | ||
className={[ | ||
'top-[--page-header-height]', | ||
'py-[--page-sub-nav-padding] xl:py-[--page-sub-nav-padding-xl]', | ||
'pl-[--page-padding-md] xl:pl-[--page-padding-xl]', | ||
'h-[calc(100vh-var(--page-header-height))] w-[--page-sub-nav-width] xl:w-[--page-sub-nav-width-xl]', | ||
'fixed z-10 hidden overflow-hidden hover:overflow-y-auto md:block', | ||
'scrollbar-thin scrollbar-thumb-secondary-400 scrollbar-thumb-rounded-full scrollbar-track-transparent', | ||
'border-secondary-200 border-r', | ||
].join(' ')} | ||
> | ||
<SectionNavigation /> | ||
</aside> | ||
<main | ||
className={[ | ||
'pt-[--page-main-padding] xl:pt-[--page-main-padding-xl]', | ||
'px-[--page-padding] md:px-[--page-padding-md] xl:pr-[--page-padding-xl]', | ||
'md:pl-[calc(var(--page-sub-nav-width)+var(--page-main-padding))] xl:pl-[calc(var(--page-sub-nav-width-xl)+var(--page-main-padding-xl))]', | ||
].join(' ')} | ||
> | ||
{children} | ||
<Footer /> | ||
</main> | ||
</> | ||
); | ||
|
||
export default Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
docs/app/_components/landingpage/AccessibiltySection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
'use client'; | ||
|
||
import { coreTheme } from '@/theme'; | ||
import { | ||
Badge, | ||
Button, | ||
FieldGroup, | ||
Grid, | ||
MarigoldProvider, | ||
NumberField, | ||
OverlayContainerProvider, | ||
Radio, | ||
Stack, | ||
Switch, | ||
Tag, | ||
XLoader, | ||
} from '@/ui'; | ||
import type { PropsWithChildren } from 'react'; | ||
import { useResponsiveValue } from '@marigold/system'; | ||
import { BlurFade } from '@/ui/BlurFade'; | ||
import { StatusSelect } from './StatusSelect'; | ||
|
||
const Block = ({ | ||
children, | ||
name, | ||
order, | ||
}: PropsWithChildren<{ name: string; order: number }>) => ( | ||
<Grid.Area name={name}> | ||
<BlurFade | ||
key={name} | ||
className="bg-bg-surface grid h-full place-items-center rounded-lg border border-black/5 px-2 py-2 shadow" | ||
delay={0.2 + order * 0.05} | ||
inView | ||
> | ||
{children} | ||
</BlurFade> | ||
</Grid.Area> | ||
); | ||
|
||
export const AccessibiltySection = () => { | ||
const isLargeScreeen = useResponsiveValue([false, false, false, true], 3); | ||
|
||
const areas = isLargeScreeen | ||
? [ | ||
'select select radio radio', | ||
'button badge radio radio', | ||
'button badge loader switch', | ||
'number-field badge loader switch', | ||
'tag tag tag tag', | ||
] | ||
: [ | ||
'select select select select', | ||
'button button badge badge', | ||
'button button badge badge', | ||
'number-field number-field badge badge', | ||
'tag tag tag tag', | ||
]; | ||
return ( | ||
<div data-theme="core" className="flex flex-col"> | ||
<OverlayContainerProvider value="portalContainer"> | ||
<MarigoldProvider theme={coreTheme} className="bg-transparent"> | ||
<Grid | ||
areas={areas} | ||
columns={[3, 2, 2, 1]} | ||
rows={['70px', '40px', '10px', '50px', '70px']} | ||
space={2} | ||
> | ||
<Block name="select" order={1}> | ||
<StatusSelect /> | ||
</Block> | ||
{isLargeScreeen ? ( | ||
<Block name="loader" order={2}> | ||
<XLoader className="size-full" /> | ||
</Block> | ||
) : null} | ||
{isLargeScreeen ? ( | ||
<Block name="radio" order={3}> | ||
<FieldGroup labelWidth="75px"> | ||
<Radio.Group label="Event type" defaultValue="concerts"> | ||
<Radio value="concerts">Concerts</Radio> | ||
<Radio value="festival">Festival</Radio> | ||
<Radio value="sports">Sport</Radio> | ||
<Radio value="exhibition">Exhibition</Radio> | ||
</Radio.Group> | ||
</FieldGroup> | ||
</Block> | ||
) : null} | ||
{isLargeScreeen ? ( | ||
<Block name="switch" order={4}> | ||
<FieldGroup labelWidth="0px"> | ||
<Switch aria-label="WiFi" defaultSelected width="fit" /> | ||
</FieldGroup> | ||
</Block> | ||
) : null} | ||
<Block name="button" order={5}> | ||
<Button variant="primary">Buy ticket</Button> | ||
</Block> | ||
<Block name="number-field" order={7}> | ||
<FieldGroup labelWidth="40px"> | ||
<NumberField | ||
label="Price" | ||
width={36} | ||
defaultValue={10} | ||
formatOptions={{ | ||
style: 'currency', | ||
currency: 'EUR', | ||
}} | ||
/> | ||
</FieldGroup> | ||
</Block> | ||
<Block name="badge" order={6}> | ||
<Stack space={2} alignX="center"> | ||
<Badge variant="success">New arrival</Badge> | ||
<Badge variant="warning">Selling fast</Badge> | ||
<Badge variant="error">Sold out</Badge> | ||
</Stack> | ||
</Block> | ||
<Block name="tag" order={8}> | ||
<FieldGroup labelWidth="40px"> | ||
<Tag.Group label="Perks" selectionMode="multiple"> | ||
<Tag id="parking-pass">Parking Pass</Tag> | ||
<Tag id="vip">VIP Access</Tag> | ||
<Tag id="glamping">Glamping Package</Tag> | ||
<Tag id="shuttle-service">Shuttle Service</Tag> | ||
</Tag.Group> | ||
</FieldGroup> | ||
</Block> | ||
</Grid> | ||
</MarigoldProvider> | ||
</OverlayContainerProvider> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { Card } from '@/ui'; | ||
import { colors } from '@marigold/theme-core/tokens'; | ||
import { BlurFade } from '@/ui/BlurFade'; | ||
|
||
const Token = ({ name, value }: { name: string; value: string }) => ( | ||
<> | ||
<code className="block text-xs">--{name}</code> | ||
<div | ||
className="size-5 rounded-full bg-[--token] shadow-md" | ||
style={{ '--token': value } as any} | ||
/> | ||
</> | ||
); | ||
|
||
export const CollaborationSection = () => { | ||
/** | ||
* Note: can not use Tailwind's "group" feature here for the hover effect, | ||
* since our custom "group" matcher only works with data attributes. | ||
*/ | ||
return ( | ||
<BlurFade | ||
className="grid items-end justify-center md:col-span-3 [&:hover>:nth-child(1)]:rotate-[-21deg] [&:hover>:nth-child(2)]:rotate-[-10deg] [&:hover>:nth-child(3)]:rotate-[7deg]" | ||
inView | ||
yOffset={16} | ||
inViewMargin="-180px" | ||
> | ||
<div className="col-start-1 row-start-1 w-[300px] origin-bottom rotate-[-17deg] transition-transform duration-700"> | ||
<Card variant="image"> | ||
<div className="h-[500px] w-[300px] bg-[url(/ui-kit.jpg)] bg-[length:350px_auto]" /> | ||
</Card> | ||
</div> | ||
<div className="col-start-1 row-start-1 w-[300px] origin-bottom rotate-[-8deg] transition-transform duration-700"> | ||
<Card variant="image"> | ||
<div className="h-[500px] w-[300px] origin-bottom bg-[url(/storybook-sidebar.png)] bg-[length:350px_auto]" /> | ||
</Card> | ||
</div> | ||
<div className="col-start-1 row-start-1 w-[300px] origin-bottom rotate-6 transition-transform duration-700"> | ||
<Card px={6} py={4}> | ||
<div className="grid grid-cols-[max-content,auto] items-center justify-between gap-5"> | ||
<Token name="text-base" value={colors.text.base.DEFAULT} /> | ||
<Token name="text-base-hover" value={colors.text.base.hover} /> | ||
<Token | ||
name="text-base-disabled" | ||
value={colors.text.base.disabled} | ||
/> | ||
<Token name="text-inverted" value={colors.text.inverted.DEFAULT} /> | ||
<Token | ||
name="text-inverted-hover" | ||
value={colors.text.inverted.hover} | ||
/> | ||
<Token | ||
name="text-inverted-disabled" | ||
value={colors.text.inverted.disabled} | ||
/> | ||
<Token name="text-info" value={colors.text.info.DEFAULT} /> | ||
<Token name="text-info-hover" value={colors.text.info.hover} /> | ||
<Token name="text-success" value={colors.text.success.DEFAULT} /> | ||
<Token | ||
name="text-success-hover" | ||
value={colors.text.success.hover} | ||
/> | ||
<Token name="text-warning" value={colors.text.warning.DEFAULT} /> | ||
<Token | ||
name="text-warning-hover" | ||
value={colors.text.warning.hover} | ||
/> | ||
</div> | ||
</Card> | ||
</div> | ||
</BlurFade> | ||
); | ||
}; |
Oops, something went wrong.