-
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 vercel-analytics
- Loading branch information
Showing
28 changed files
with
311 additions
and
92 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
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
46 changes: 46 additions & 0 deletions
46
docs/content/components/accordion/basic-accordion.demo.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,46 @@ | ||
import { Accordion, Text } from '@marigold/components'; | ||
|
||
export default () => { | ||
return ( | ||
<Accordion defaultExpandedKeys={[1]}> | ||
<Accordion.Item key={1} title="Harry Potter and the Philosopher's Stone"> | ||
<Text> | ||
Harry Potter and the Philosopher's Stone is a 1997 fantasy novel | ||
written by British author J. K. Rowling. The first novel in the Harry | ||
Potter series and Rowling's debut novel, it follows Harry Potter, a | ||
young wizard who discovers his magical heritage on his eleventh | ||
birthday, when he receives a letter of acceptance to Hogwarts School | ||
of Witchcraft and Wizardry. Harry makes close friends and a few | ||
enemies during his first year at the school and with the help of his | ||
friends, Ron Weasley and Hermione Granger, he faces an attempted | ||
comeback by the dark wizard Lord Voldemort, who killed Harry's | ||
parents, but failed to kill Harry when he was just 15 months old. | ||
</Text> | ||
</Accordion.Item> | ||
<Accordion.Item key={2} title="Harry Potter and the Chamber of Secrets"> | ||
<Text> | ||
Harry Potter and the Chamber of Secrets is a fantasy novel written by | ||
British author J. K. Rowling and the second novel in the Harry Potter | ||
series. The plot follows Harry's second year at Hogwarts School of | ||
Witchcraft and Wizardry, during which a series of messages on the | ||
walls of the school's corridors warn that the "Chamber of Secrets" has | ||
been opened and that the "heir of Slytherin" would kill all pupils who | ||
do not come from all-magical families. These threats are found after | ||
attacks that leave residents of the school petrified. Throughout the | ||
year, Harry and his friends Ron and Hermione investigate the attacks. | ||
</Text> | ||
</Accordion.Item> | ||
<Accordion.Item key={3} title="Harry Potter and the Prisoner of Azkaban"> | ||
<Text> | ||
Harry Potter and the Prisoner of Azkaban is a fantasy novel written by | ||
British author J. K. Rowling and is the third in the Harry Potter | ||
series. The book follows Harry Potter, a young wizard, in his third | ||
year at Hogwarts School of Witchcraft and Wizardry. Along with friends | ||
Ronald Weasley and Hermione Granger, Harry investigates Sirius Black, | ||
an escaped prisoner from Azkaban, the wizard prison, believed to be | ||
one of Lord Voldemort's old allies. | ||
</Text> | ||
</Accordion.Item> | ||
</Accordion> | ||
); | ||
}; |
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 was deleted.
Oops, something went wrong.
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,21 @@ | ||
// @ts-nocheck | ||
// This file is autogenerated by scripts/build-registry.ts | ||
// Do not edit this file directly. | ||
import dynamic from 'next/dynamic'; | ||
|
||
export const registry = { | ||
'basic-accordion': { | ||
name: 'basic-accordion', | ||
demo: dynamic( | ||
() => import('@/content/components/accordion/basic-accordion.demo') | ||
), | ||
file: 'content/components/accordion/basic-accordion.demo.tsx', | ||
}, | ||
'button-variant': { | ||
name: 'button-variant', | ||
demo: dynamic( | ||
() => import('@/content/components/button/button-variant.demo') | ||
), | ||
file: 'content/components/button/button-variant.demo.tsx', | ||
}, | ||
} as const; |
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,34 @@ | ||
#!/usr/bin/env zx | ||
// Registry of demos ideas is based on https://github.com/shadcn/ui ! | ||
|
||
import fs from 'fs'; | ||
import path, { basename } from 'path'; | ||
import { glob } from 'zx'; | ||
|
||
let demoPath = await glob([`content/components/**/**.demo.tsx`]); | ||
|
||
console.log('📑 Building registry...'); | ||
|
||
let index = `// @ts-nocheck | ||
// This file is autogenerated by scripts/build-registry.ts | ||
// Do not edit this file directly. | ||
import dynamic from 'next/dynamic'; | ||
export const registry = {`; | ||
|
||
for (const item of demoPath) { | ||
const name = basename(item, '.demo.tsx'); | ||
index += ` | ||
'${name}': { | ||
name: '${name}', | ||
demo: dynamic( | ||
() => import('@/${item.replace('.tsx', '')}') | ||
), | ||
file: '${item}', | ||
},`; | ||
} | ||
index += ` | ||
} as const;`; | ||
|
||
fs.writeFileSync(path.join(process.cwd(), 'registry/index.tsx'), index); | ||
console.log('✅ Registry build successfully!'); |
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 was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
"private": true, | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=16.x" | ||
"node": "18.x" | ||
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
|
@@ -44,6 +44,7 @@ | |
"build:docs": "pnpm --filter @marigold/docs... build", | ||
"build:storybook": "pnpm --filter @marigold/storybook-config... build", | ||
"build:themes": "pnpm --filter \"@marigold/theme*...\" build", | ||
"registry": "pnpm --filter @marigold/docs registry", | ||
"test": "jest --config jest.config.js", | ||
"test:coverage": "jest --config jest.config.js --coverage --coverageReporters html", | ||
"test:ci": "jest --config jest.config.js --coverage --ci --no-cache", | ||
|
Oops, something went wrong.