Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: upgrade dependencies * docs: regenerated docs
- Loading branch information
1 parent
8ee11b7
commit 688c72e
Showing
360 changed files
with
37,648 additions
and
42,969 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Meta } from '@storybook/blocks' | ||
|
||
import { HomePage } from './Welcome' | ||
|
||
<Meta title="Welcome" /> | ||
|
||
<div className="sb-unstyled"> | ||
<HomePage /> | ||
</div> |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { StorybookConfig } from '@storybook/react-vite'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['./docs/pages/Welcome.mdx', "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: ['@storybook/addon-actions', '@storybook/addon-storysource', { | ||
name: '@storybook/addon-styling', | ||
options: { | ||
implementation: require("postcss"), | ||
}, | ||
}, { | ||
name: '@storybook/addon-essentials', | ||
options: { | ||
backgrounds: false | ||
} | ||
}], | ||
framework: '@storybook/react-vite', | ||
docs: { | ||
autodocs: false | ||
} | ||
}; | ||
|
||
export default config; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { addons } from '@storybook/manager-api' | ||
import theme from './theme' | ||
|
||
addons.setConfig({ | ||
theme: theme, | ||
}) |
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 |
---|---|---|
@@ -1,74 +1,83 @@ | ||
import React from 'react' | ||
import type { Preview } from "@storybook/react"; | ||
|
||
import StoryLayout from './story-layout' | ||
import StoryLayout from './StoryLayout' | ||
|
||
import '../src/styles.css' | ||
import { DEFAULT_THEME, STORAGE_KEY, THEME_PICKER_LIST } from './theming' | ||
import { docsTheme } from './theme.cjs' | ||
import theme from './theme' | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
previewTabs: { | ||
'storybook/docs/panel': { hidden: true }, | ||
}, | ||
controls: { | ||
matchers: { | ||
date: /Date$/, | ||
}, | ||
}, | ||
layout: 'fullscreen', | ||
options: { | ||
storySort: { | ||
order: [ | ||
'Welcome', | ||
'Utils', | ||
'Actions', | ||
'Data Display', | ||
'Data Input', | ||
'Layout', | ||
'Navigation', | ||
'Mockup', | ||
], | ||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
previewTabs: { | ||
'storybook/docs/panel': { hidden: true }, | ||
}, | ||
}, | ||
themes: { | ||
default: window.localStorage.getItem(STORAGE_KEY) || DEFAULT_THEME, | ||
onChange: (theme) => { | ||
// STORAGE_KEY does not work in onChange... not sure why | ||
if (theme) { | ||
window.localStorage.setItem( | ||
'sb-react-daisyui-preview-theme', | ||
theme.class | ||
) | ||
} else { | ||
window.localStorage.removeItem('sb-react-daisyui-preview-theme') | ||
} | ||
controls: { | ||
matchers: { | ||
date: /Date$/, | ||
}, | ||
}, | ||
list: THEME_PICKER_LIST, | ||
}, | ||
docs: { | ||
theme: docsTheme, | ||
layout: 'fullscreen', | ||
options: { | ||
layout: 'fullscreen', | ||
storySort: { | ||
order: [ | ||
'Welcome', | ||
'Utils', | ||
'Actions', | ||
'Data Display', | ||
'Data Input', | ||
'Layout', | ||
'Navigation', | ||
'Mockup', | ||
], | ||
}, | ||
}, | ||
themes: { | ||
default: window.localStorage.getItem(STORAGE_KEY) || DEFAULT_THEME, | ||
onChange: (theme) => { | ||
// STORAGE_KEY does not work in onChange... not sure why | ||
if (theme) { | ||
window.localStorage.setItem( | ||
'sb-react-daisyui-preview-theme', | ||
theme.class | ||
) | ||
} else { | ||
window.localStorage.removeItem('sb-react-daisyui-preview-theme') | ||
} | ||
}, | ||
list: THEME_PICKER_LIST, | ||
}, | ||
docs: { | ||
theme: theme, | ||
options: { | ||
layout: 'fullscreen', | ||
}, | ||
}, | ||
}, | ||
decorators: [ | ||
(Story, options) => ( | ||
<StoryLayout | ||
title={options.title} | ||
description={options.name} | ||
source={ | ||
options.parameters.docs.source.originalSource. | ||
/* TODO: clean up all this string formatting/regex */ | ||
/* Removes the args arrow function */ | ||
replace(/^args\s*=>\s*\{\s*/, ' '). | ||
replace(/\(.*args.*\)\s*=>\s*\{\s*\n/, ' '). | ||
replace(/^(\s*)return\s+/, '$1'). | ||
replace(/_s\(\);/, ''). | ||
/* Removes the last occurence of a closing bracket (from the lambda) */ | ||
replace(/}([^}]*)$/, '$1') | ||
/* Removes the last occurence of a semicolon */ | ||
.replace(/;(?=[^;]*$)/, '') | ||
} | ||
> | ||
<Story /> | ||
</StoryLayout> | ||
), | ||
] | ||
} | ||
|
||
export const decorators = [ | ||
(Story, options) => ( | ||
<StoryLayout | ||
title={options.title} | ||
description={options.story} | ||
source={ | ||
options.parameters.storySource.source. | ||
/* TODO: clean up all this string formatting/regex */ | ||
/* Removes the args arrow function */ | ||
replace(/\(.*args.*\)\s*=>\s*\{\s*\n/, ''). | ||
/* Removes the last occurence of a closing bracket (from the lambda) */ | ||
replace(/}([^}]*)$/, '$1') | ||
} | ||
> | ||
<Story /> | ||
</StoryLayout> | ||
), | ||
] | ||
export default preview |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.