@storybook/blocks
Advanced tools
Comparing version 0.0.0-pr-28882-sha-e607100a to 0.0.0-pr-28920-sha-480f404a
@@ -16,17 +16,9 @@ import { Conditional, DocsContextProps, PreparedStory, ModuleExports, Renderer as Renderer$1, Args as Args$1, StoryId, ModuleExport, ResolvedModuleExportType, ResolvedModuleExportFromType, Parameters as Parameters$1, ProjectAnnotations, BaseAnnotations, ComponentTitle } from 'storybook/internal/types'; | ||
interface SourceCodeProps { | ||
/** | ||
* The language the syntax highlighter uses for your story’s code | ||
*/ | ||
/** The language the syntax highlighter uses for your story’s code */ | ||
language?: SupportedLanguage; | ||
/** | ||
* Use this to override the content of the source block. | ||
*/ | ||
/** Use this to override the content of the source block. */ | ||
code?: string; | ||
/** | ||
* The (prettier) formatter the syntax highlighter uses for your story’s code. | ||
*/ | ||
/** The (prettier) formatter the syntax highlighter uses for your story’s code. */ | ||
format?: ComponentProps<typeof SyntaxHighlighter>['format']; | ||
/** | ||
* Display the source snippet in a dark mode. | ||
*/ | ||
/** Display the source snippet in a dark mode. */ | ||
dark?: boolean; | ||
@@ -38,5 +30,3 @@ } | ||
} | ||
/** | ||
* Syntax-highlighted source code for a component (or anything!) | ||
*/ | ||
/** Syntax-highlighted source code for a component (or anything!) */ | ||
declare const Source$1: FunctionComponent<SourceProps$1>; | ||
@@ -118,4 +108,4 @@ | ||
/** | ||
* Display the props for a component as a props table. Each row is a collection of | ||
* ArgDefs, usually derived from docgen info for the component. | ||
* Display the props for a component as a props table. Each row is a collection of ArgDefs, usually | ||
* derived from docgen info for the component. | ||
*/ | ||
@@ -150,4 +140,4 @@ declare const ArgsTable: FC<ArgsTableProps>; | ||
/** | ||
* Convenient styleguide documentation showing examples of type | ||
* with different sizes and weights and configurable sample text. | ||
* Convenient styleguide documentation showing examples of type with different sizes and weights and | ||
* configurable sample text. | ||
*/ | ||
@@ -165,4 +155,4 @@ declare const Typeset: FC<TypesetProps>; | ||
/** | ||
* A single color row your styleguide showing title, subtitle and one or more colors, used | ||
* as a child of `ColorPalette`. | ||
* A single color row your styleguide showing title, subtitle and one or more colors, used as a | ||
* child of `ColorPalette`. | ||
*/ | ||
@@ -174,4 +164,4 @@ declare const ColorItem: FunctionComponent<ColorItemProps>; | ||
/** | ||
* Styleguide documentation for colors, including names, captions, and color swatches, | ||
* all specified as `ColorItem` children of this wrapper component. | ||
* Styleguide documentation for colors, including names, captions, and color swatches, all specified | ||
* as `ColorItem` children of this wrapper component. | ||
*/ | ||
@@ -184,5 +174,3 @@ declare const ColorPalette: FunctionComponent<ColorPaletteProps>; | ||
} | ||
/** | ||
* An individual icon with a caption and an example (passed as `children`). | ||
*/ | ||
/** An individual icon with a caption and an example (passed as `children`). */ | ||
declare const IconItem: FunctionComponent<IconItemProps>; | ||
@@ -192,5 +180,3 @@ interface IconGalleryProps { | ||
} | ||
/** | ||
* Show a grid of icons, as specified by `IconItem`. | ||
*/ | ||
/** Show a grid of icons, as specified by `IconItem`. */ | ||
declare const IconGallery: FunctionComponent<IconGalleryProps>; | ||
@@ -234,13 +220,7 @@ | ||
type SourceParameters = SourceCodeProps & { | ||
/** | ||
* Where to read the source code from, see `SourceType` | ||
*/ | ||
/** Where to read the source code from, see `SourceType` */ | ||
type?: SourceType; | ||
/** | ||
* Transform the detected source for display | ||
*/ | ||
/** Transform the detected source for display */ | ||
transform?: (code: string, storyContext: ReturnType<DocsContextProps['getStoryContext']>) => string; | ||
/** | ||
* Internal: set by our CSF loader (`enrichCsf` in `@storybook/csf-tools`). | ||
*/ | ||
/** Internal: set by our CSF loader (`enrichCsf` in `@storybook/csf-tools`). */ | ||
originalSource?: string; | ||
@@ -256,9 +236,7 @@ }; | ||
* | ||
* <Source of={ButtonStories.Primary} /> | ||
* <Source of={ButtonStories.Primary} />; | ||
* ``` | ||
*/ | ||
of?: ModuleExport; | ||
/** | ||
* Internal prop to control if a story re-renders on args updates | ||
*/ | ||
/** Internal prop to control if a story re-renders on args updates */ | ||
__forceInitialArgs?: boolean; | ||
@@ -269,5 +247,4 @@ }; | ||
/** | ||
* Story source doc block renders source code if provided, | ||
* or the source for a story if `storyId` is provided, or | ||
* the source for the current story if nothing is provided. | ||
* Story source doc block renders source code if provided, or the source for a story if `storyId` is | ||
* provided, or the source for the current story if nothing is provided. | ||
*/ | ||
@@ -277,5 +254,3 @@ declare const Source: FC<SourceProps>; | ||
type PureStoryProps = ComponentProps<typeof Story$1>; | ||
/** | ||
* Props to reference another story | ||
*/ | ||
/** Props to reference another story */ | ||
type StoryRefProps = { | ||
@@ -301,3 +276,3 @@ /** | ||
* | ||
* <Story of={ButtonStories.Primary} meta={ButtonStories} /> | ||
* <Story of={ButtonStories.Primary} meta={ButtonStories} />; | ||
* ``` | ||
@@ -308,21 +283,11 @@ */ | ||
type StoryParameters = { | ||
/** | ||
* Render the story inline or in an iframe | ||
*/ | ||
/** Render the story inline or in an iframe */ | ||
inline?: boolean; | ||
/** | ||
* When rendering in an iframe (`inline={false}`), set the story height | ||
*/ | ||
/** When rendering in an iframe (`inline={false}`), set the story height */ | ||
height?: string; | ||
/** | ||
* Whether to run the story's play function | ||
*/ | ||
/** Whether to run the story's play function */ | ||
autoplay?: boolean; | ||
/** | ||
* Internal prop to control if a story re-renders on args updates | ||
*/ | ||
/** Internal prop to control if a story re-renders on args updates */ | ||
__forceInitialArgs?: boolean; | ||
/** | ||
* Internal prop if this story is the primary story | ||
*/ | ||
/** Internal prop if this story is the primary story */ | ||
__primary?: boolean; | ||
@@ -355,3 +320,3 @@ }; | ||
* | ||
* <Canvas of={ButtonStories.Primary} meta={ButtonStories} /> | ||
* <Canvas of={ButtonStories.Primary} meta={ButtonStories} />; | ||
* ``` | ||
@@ -361,6 +326,6 @@ */ | ||
/** | ||
* Specify the initial state of the source panel | ||
* hidden: the source panel is hidden by default | ||
* shown: the source panel is shown by default | ||
* none: the source panel is not available and the button to show it is hidden | ||
* Specify the initial state of the source panel hidden: the source panel is hidden by default | ||
* shown: the source panel is shown by default none: the source panel is not available and the | ||
* button to show it is hidden | ||
* | ||
* @default 'hidden' | ||
@@ -370,16 +335,12 @@ */ | ||
/** | ||
* how to layout the story within the canvas | ||
* padded: the story has padding within the canvas | ||
* fullscreen: the story is rendered edge to edge within the canvas | ||
* centered: the story is centered within the canvas | ||
* How to layout the story within the canvas padded: the story has padding within the canvas | ||
* fullscreen: the story is rendered edge to edge within the canvas centered: the story is | ||
* centered within the canvas | ||
* | ||
* @default 'padded' | ||
*/ | ||
layout?: Layout; | ||
/** | ||
* @see {SourceProps} | ||
*/ | ||
/** @see {SourceProps} */ | ||
source?: Omit<SourceProps, 'dark'>; | ||
/** | ||
* @see {StoryProps} | ||
*/ | ||
/** @see {StoryProps} */ | ||
story?: Pick<StoryProps, 'inline' | 'height' | 'autoplay' | '__forceInitialArgs' | '__primary'>; | ||
@@ -401,6 +362,5 @@ }; | ||
/** | ||
* A hook to resolve the `of` prop passed to a block. | ||
* will return the resolved module | ||
* if the resolved module is a meta it will include a preparedMeta property similar to a preparedStory | ||
* if the resolved module is a component it will include the project annotations | ||
* A hook to resolve the `of` prop passed to a block. will return the resolved module if the | ||
* resolved module is a meta it will include a preparedMeta property similar to a preparedStory if | ||
* the resolved module is a component it will include the project annotations | ||
*/ | ||
@@ -417,4 +377,4 @@ declare const useOf: <TType extends ResolvedModuleExportType>(moduleExportOrType: Of, validTypes?: TType[]) => ResolvedModuleExportFromType<TType>; | ||
/** | ||
* Specify where to get the description from. Can be a component, a CSF file or a story. | ||
* If not specified, the description will be extracted from the meta of the attached CSF file. | ||
* Specify where to get the description from. Can be a component, a CSF file or a story. If not | ||
* specified, the description will be extracted from the meta of the attached CSF file. | ||
*/ | ||
@@ -473,4 +433,4 @@ of?: Of; | ||
/** | ||
* This component is used to declare component metadata in docs | ||
* and gets transformed into a default export underneath the hood. | ||
* This component is used to declare component metadata in docs and gets transformed into a default | ||
* export underneath the hood. | ||
*/ | ||
@@ -480,5 +440,3 @@ declare const Meta: FC<MetaProps>; | ||
interface PrimaryProps { | ||
/** | ||
* Specify where to get the primary story from. | ||
*/ | ||
/** Specify where to get the primary story from. */ | ||
of?: Of; | ||
@@ -499,4 +457,4 @@ } | ||
/** | ||
* Specify where to get the subtitle from. | ||
* If not specified, the subtitle will be extracted from the meta of the attached CSF file. | ||
* Specify where to get the subtitle from. If not specified, the subtitle will be extracted from | ||
* the meta of the attached CSF file. | ||
*/ | ||
@@ -509,9 +467,7 @@ of?: Of; | ||
/** | ||
* Specify where to get the title from. Must be a CSF file's default export. | ||
* If not specified, the title will be read from children, or extracted from the meta of the attached CSF file. | ||
* Specify where to get the title from. Must be a CSF file's default export. If not specified, the | ||
* title will be read from children, or extracted from the meta of the attached CSF file. | ||
*/ | ||
of?: Of; | ||
/** | ||
* Specify content to display as the title. | ||
*/ | ||
/** Specify content to display as the title. */ | ||
children?: ReactNode; | ||
@@ -565,2 +521,3 @@ } | ||
* Whether the color picker should be open by default when rendered. | ||
* | ||
* @default false | ||
@@ -609,10 +566,10 @@ */ | ||
* # Boolean Control | ||
* Renders a switch toggle with "True" or "False". | ||
* or if the value is `undefined`, renders a button to set the boolean. | ||
* | ||
* Renders a switch toggle with "True" or "False". or if the value is `undefined`, renders a button | ||
* to set the boolean. | ||
* | ||
* ## Example usage | ||
* | ||
* ``` | ||
* | ||
* <BooleanControl name="isTrue" value={value} onChange={handleValueChange}/> | ||
* <BooleanControl name="isTrue" value={value} onChange={handleValueChange} />; | ||
* ``` | ||
@@ -648,9 +605,11 @@ */ | ||
/** | ||
* The accept attribute value is a string that defines the file types the file input should accept. This string is a comma-separated list of unique file type specifiers. | ||
* @example | ||
* *\/* | ||
* @example | ||
* .webm,video/webm | ||
* @example | ||
* .doc,.docx,application/msword | ||
* The accept attribute value is a string that defines the file types the file input should | ||
* accept. This string is a comma-separated list of unique file type specifiers. | ||
* | ||
* @example _/_ | ||
* | ||
* @example .webm,video/webm | ||
* | ||
* @example .doc,.docx,application/msword | ||
* | ||
* @defaultValue `image/*` | ||
@@ -657,0 +616,0 @@ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept |
{ | ||
"name": "@storybook/blocks", | ||
"version": "0.0.0-pr-28882-sha-e607100a", | ||
"version": "0.0.0-pr-28920-sha-480f404a", | ||
"description": "Storybook Doc Blocks", | ||
@@ -63,5 +63,5 @@ "keywords": [ | ||
"devDependencies": { | ||
"@storybook/addon-actions": "0.0.0-pr-28882-sha-e607100a", | ||
"@storybook/react": "0.0.0-pr-28882-sha-e607100a", | ||
"@storybook/test": "0.0.0-pr-28882-sha-e607100a", | ||
"@storybook/addon-actions": "0.0.0-pr-28920-sha-480f404a", | ||
"@storybook/react": "0.0.0-pr-28920-sha-480f404a", | ||
"@storybook/test": "0.0.0-pr-28920-sha-480f404a", | ||
"@types/color-convert": "^2.0.0", | ||
@@ -73,3 +73,3 @@ "tocbot": "^4.20.1" | ||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", | ||
"storybook": "^0.0.0-pr-28882-sha-e607100a" | ||
"storybook": "^0.0.0-pr-28920-sha-480f404a" | ||
}, | ||
@@ -76,0 +76,0 @@ "peerDependenciesMeta": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
359380
1924