-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'kasper/csf-factories' into kasper/base-factories
- Loading branch information
Showing
162 changed files
with
4,328 additions
and
1,398 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
22.6.0 | ||
22.13.1 | ||
|
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
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
Large diffs are not rendered by default.
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
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 |
---|---|---|
@@ -1,3 +1,49 @@ | ||
import type { AxeResults } from 'axe-core'; | ||
import type { AxeResults, ElementContext, RunOptions, Spec } from 'axe-core'; | ||
|
||
export type A11YReport = AxeResults | { error: Error }; | ||
|
||
export interface A11yParameters { | ||
/** | ||
* Accessibility configuration | ||
* | ||
* @see https://storybook.js.org/docs/writing-tests/accessibility-testing | ||
*/ | ||
a11y?: { | ||
/** Manual configuration for specific elements */ | ||
element?: ElementContext; | ||
|
||
/** | ||
* Configuration for the accessibility rules | ||
* | ||
* @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure | ||
*/ | ||
config?: Spec; | ||
|
||
/** | ||
* Options for the accessibility checks To learn more about the available options, | ||
* | ||
* @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter | ||
*/ | ||
options?: RunOptions; | ||
|
||
/** Remove the addon panel and disable the addon's behavior */ | ||
disable?: boolean; | ||
}; | ||
} | ||
|
||
export interface A11yGlobals { | ||
/** | ||
* Accessibility configuration | ||
* | ||
* @see https://storybook.js.org/docs/writing-tests/accessibility-testing | ||
*/ | ||
a11y: { | ||
/** | ||
* Prevent the addon from executing automated accessibility checks upon visiting a story. You | ||
* can still trigger the checks from the addon panel. | ||
* | ||
* @see https://storybook.js.org/docs/writing-tests/accessibility-testing#turn-off-automated-a11y-tests | ||
*/ | ||
manual?: boolean; | ||
}; | ||
} |
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,38 @@ | ||
export interface ActionsParameters { | ||
/** | ||
* Actions configuration | ||
* | ||
* @see https://storybook.js.org/docs/essentials/actions#parameters | ||
*/ | ||
actions: { | ||
/** | ||
* Create actions for each arg that matches the regex. (**NOT recommended, see below**) | ||
* | ||
* This is quite useful when your component has dozens (or hundreds) of methods and you do not | ||
* want to manually apply the fn utility for each of those methods. However, this is not the | ||
* recommended way of writing actions. That's because automatically inferred args are not | ||
* available as spies in your play function. If you use argTypesRegex and your stories have play | ||
* functions, you will need to also define args with the fn utility to test them in your play | ||
* function. | ||
* | ||
* @example `argTypesRegex: '^on.*'` | ||
*/ | ||
argTypesRegex?: string; | ||
|
||
/** Remove the addon panel and disable the addon's behavior */ | ||
disable?: boolean; | ||
|
||
/** | ||
* Binds a standard HTML event handler to the outermost HTML element rendered by your component | ||
* and triggers an action when the event is called for a given selector. The format is | ||
* `<eventname> <selector>`. The selector is optional; it defaults to all elements. | ||
* | ||
* **To enable this feature, you must use the `withActions` decorator.** | ||
* | ||
* @example `handles: ['mouseover', 'click .btn']` | ||
* | ||
* @see https://storybook.js.org/docs/essentials/actions#action-event-handlers | ||
*/ | ||
handles?: string[]; | ||
}; | ||
} |
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
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,37 @@ | ||
export interface ControlsParameters { | ||
/** | ||
* Controls configuration | ||
* | ||
* @see https://storybook.js.org/docs/essentials/controls#parameters-1 | ||
*/ | ||
controls: { | ||
/** Remove the addon panel and disable the addon's behavior */ | ||
disable?: boolean; | ||
|
||
/** Disable the ability to create or edit stories from the Controls panel */ | ||
disableSaveFromUI?: boolean; | ||
|
||
/** Exclude specific properties from the Controls panel */ | ||
exclude?: string[] | RegExp; | ||
|
||
/** | ||
* Show the full documentation for each property in the Controls addon panel, including the | ||
* description and default value. | ||
*/ | ||
expanded?: boolean; | ||
|
||
/** Exclude only specific properties in the Controls panel */ | ||
include?: string[] | RegExp; | ||
|
||
/** | ||
* Preset color swatches for the color picker control | ||
* | ||
* @example PresetColors: [{ color: '#ff4785', title: 'Coral' }, 'rgba(0, 159, 183, 1)', | ||
* '#fe4a49'] | ||
*/ | ||
presetColors?: Array<string | { color: string; title?: string }>; | ||
|
||
/** Controls sorting order */ | ||
sort?: 'none' | 'alpha' | 'requiredFirst'; | ||
}; | ||
} |
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
Oops, something went wrong.