-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into chore/polyfill_web_st…
…reams
- Loading branch information
Showing
56 changed files
with
1,053 additions
and
111 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 |
---|---|---|
|
@@ -55,4 +55,6 @@ yarn-error.log* | |
.vscode/*.settings.json | ||
|
||
.sonar | ||
.sonar/**/* | ||
.sonar/**/* | ||
|
||
dependency-graph.svg |
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,91 @@ | ||
import "@storybook/csf"; | ||
|
||
type ChromaticModes = "mobile" | "mobile-wide" | "desktop" | "desktop-wide"; | ||
|
||
export function chromaticParams(modes: ChromaticModes[]) { | ||
return { | ||
chromatic: { | ||
modes: { | ||
...(modes.includes("mobile") && { | ||
mobile: { viewport: "mobile" }, | ||
}), | ||
...(modes.includes("mobile-wide") && { | ||
mobile: { viewport: "mobile-wide" }, | ||
}), | ||
...(modes.includes("desktop") && { | ||
desktop: { viewport: "desktop" }, | ||
}), | ||
...(modes.includes("desktop-wide") && { | ||
"desktop-wide": { viewport: "desktopWide" }, | ||
}), | ||
}, | ||
}, | ||
}; | ||
} | ||
|
||
declare module "@storybook/csf" { | ||
interface Parameters { | ||
/** | ||
* Parameters for chromatic | ||
*/ | ||
chromatic?: { | ||
/** | ||
* Delay capture for a fixed time (in milliseconds) to allow your story to get into | ||
* the intended state | ||
* | ||
* @see [delaying snapshots chromatic documentation](https://www.chromatic.com/docs/delay) | ||
*/ | ||
delay?: number; | ||
/** | ||
* Override this behavior in instances where a single pixel change is not flagged by | ||
* Chromatic but should be | ||
* | ||
* * @see [anti-aliasing chromatic documentation](https://www.chromatic.com/docs/threshold#anti-aliasing) | ||
* | ||
* @default false | ||
*/ | ||
diffIncludeAntiAliasing?: boolean; | ||
/** | ||
* The diffThreshold parameter allows you to fine tune the threshold for visual change | ||
* between snapshots before they're flagged by Chromatic. Sometimes you need assurance | ||
* to the sub-pixel and other times you want to skip visual noise generated by | ||
* non-deterministic rendering such as anti-aliasing. | ||
* | ||
* 0 is the most accurate. 1 is the least accurate. | ||
* | ||
* @default 0.063 | ||
*/ | ||
diffThreshold?: number; | ||
/** | ||
* You can omit stories entirely from Chromatic testing using the disable story parameter. | ||
* | ||
* @see [ignoring elements chromatic documentation](https://www.chromatic.com/docs/ignoring-elements) | ||
*/ | ||
disable?: boolean; | ||
/** | ||
* Modes | ||
* | ||
* @see [modes chromatic documentation](https://www.chromatic.com/docs/modes) | ||
*/ | ||
modes?: Record< | ||
string, | ||
{ | ||
viewport?: string | number; | ||
theme?: "light" | "dark"; | ||
backgrounds?: { value: string }; | ||
} | ||
>; | ||
/** | ||
* Define one or more viewport sizes to capture. Note, units are considered in pixels | ||
*/ | ||
viewports?: number[]; | ||
/** | ||
* To specify that Chromatic should pause the animation at the end instead of reseting | ||
* them to their beginning state. | ||
* | ||
* @see [animations chromatic documentation](https://www.chromatic.com/docs/animations) | ||
*/ | ||
pauseAnimationAtEnd?: 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
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
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.